Difference between revisions of "Calc:Tab Color Patches"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Tab Color Core Support)
(Tab Color Core Support)
Line 86: Line 86:
 
----
 
----
 
:sc/source/ui/view/tabvwshf.cxx
 
:sc/source/ui/view/tabvwshf.cxx
 +
::Add code to execute the Dialog and save the color information.
 +
::Add code to invalidate the menu items according to criteria in spec
 
----
 
----
 
:sc/source/ui/view/viewdata.cxx
 
:sc/source/ui/view/viewdata.cxx
 +
::Add code to set aTabBgColor to COL_AUTO on ScViewDataTable::ScViewDataTable()
 +
::Add support to save to ODS in ScViewDataTable::WriteUserDataSequence(...)
 +
::Add support to read from ODS in ScViewDataTable::ReadUserDataSequence(...)
 +
::Add code for ScViewData::SetTabBgColor(...)
 +
::Add code for ScViewData::GetTabBgColor(...)
 +
::Add code for ScViewData::IsDefaultTabBgColor(...)
 +
::Add code to save the color to the ScExtTabSettings Struct in ScViewData::WriteExtOptions(...)
 +
::Add code to read the color from the ScExtTabSettings Struct in ScViewData::ReadExtOptions(...)
 
----
 
----
 
:sc/source/ui/view/viewfun2.cxx
 
:sc/source/ui/view/viewfun2.cxx

Revision as of 05:21, 14 February 2009

Code Change Justifications and Explanation

Tab Color Core Support

officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
Add entries for ".uno:SetTabBgColor" and ".uno:TabBgColor"

sc/inc/globstr.hrc
Define Global Strings

sc/inc/scextopt.hxx
Add Color maTabBgColor and BOOL IsDefaultTabBgColor() to the ScExtTabSettings Struct

sc/inc/sc.hrc
Define ID's for the CalcCommand
Define Sc Strings
Define the dialog id

sc/inc/tabbgcolor.hxx (new)
Define a struct: "ScUndoSetTabBgColorInfo" to store Tab Color Undo information
Declare a list: "ScUndoSetTabBgColorInfoList" of "ScUndoSetTabBgColorInfo"

sc/inc/unonames.hxx ***NEED TO ADD TO SPECS!!
define the uno name SC_UNO_TABCOLOR as "TabColor" for ODS XML label

sc/inc/ViewSettingsSequenceDefines.hxx
Add SC_TABLE_TAB_BG_COLOR to the Table View Settings Sequence

sc/sdi/docsh.sdi ***When does this get executed? This may need to be removed...
Add FID_TAB_SET_TAB_BG_COLOR command to TableSelection interface

sc/sdi/scalc.sd
Add SvxColorItem TabBgColor FID_TAB_SET_TAB_BG_COLOR definition ***When does this get executed? This may need to be removed...
Add SfxVoidItem SetTabBgColor FID_TAB_MENU_SET_TAB_BG_COLOR(SvxColorItem TabBgColor FID_TAB_SET_TAB_BG_COLOR) definition

sc/sdi/tabvwsh.sdi
Add FID_TAB_MENU_SET_TAB_BG_COLOR command to Tables interface

sc/source/ui/docshell/docfunc.cxx
Add Source for ScDocFunc::SetTabBgColor

sc/source/ui/inc/docfunc.hxx
Define ScDocFunc::ScTabBgColor

sc/source/ui/inc/undotab.hxx
Define ScUndoSetTabBgColor Class

sc/source/ui/inc/viewdata.hxx
Define Private Color aTabBgColor in ScViewDataTable Class
Define Private BOOL IsDefaultTabBgColor(...) in ScViewDataTable Class
Define Public void SetTabBgColor(...) in ScViewData Class
Define Public BOOL IsDefaultTabBgColor(...) in ScViewData Class
Define Public Color GetTabBgColor(...) in ScViewData Class

sc/source/ui/inc/viewfunc.hxx
Define Public BOOL SetTabBgColor(...) in ScViewFunc Class

sc/source/ui/src/globstr.src
Add String data to Global Strings

sc/source/ui/src/popup.src
Add Separator
Add FID_TAB_MENU_SET_TAB_BG_COLOR to RID_POPUP_TAB

sc/source/ui/src/scstring.src
Add String data to Sc Strings

sc/source/ui/undo/undotab.cxx
Add ScUndoSetTabBgColor as an SfxUndoAction class
Undo/Redo action supports single and multiple tab color operations
When a single tab is colored, then set the comment to Global String: STR_UNDO_SET_TAB_BG_COLOR
When multiple tabs were colored, then set the comment to Global String: STR_UNDO_SET_MULTI_TAB_BG_COLOR

sc/source/ui/view/scextopt.cxx
Set maTabBgColor to COL_AUTO on ScExtTabSettings::ScExtTabSettings()

sc/source/ui/view/tabcont.cxx
Add the following logic to ScTabControl::ScTabControl(...)
Check to see if the current tab has a tab color value not equal to COL_AUTO
Call ScTabControl::SetTabBgColor which belongs to the TabBar Class
Invalidate FID_TAB_SET_TAB_BG_COLOR with the rest of the items from the table Interface in ScTabControl::Select()
Add the following logic to ScTabControl::UpdateStatus()
Check to see if new color is the same as the old color.
If the color is different set bModified to TRUE
Check to see if the current tab has a tab color value not equal to COL_AUTO
Call ScTabControl::SetTabBgColor which belongs to the TabBar Class

sc/source/ui/view/tabvwshf.cxx
Add code to execute the Dialog and save the color information.
Add code to invalidate the menu items according to criteria in spec

sc/source/ui/view/viewdata.cxx
Add code to set aTabBgColor to COL_AUTO on ScViewDataTable::ScViewDataTable()
Add support to save to ODS in ScViewDataTable::WriteUserDataSequence(...)
Add support to read from ODS in ScViewDataTable::ReadUserDataSequence(...)
Add code for ScViewData::SetTabBgColor(...)
Add code for ScViewData::GetTabBgColor(...)
Add code for ScViewData::IsDefaultTabBgColor(...)
Add code to save the color to the ScExtTabSettings Struct in ScViewData::WriteExtOptions(...)
Add code to read the color from the ScExtTabSettings Struct in ScViewData::ReadExtOptions(...)

sc/source/ui/view/viewfun2.cxx

sc/uiconfig/scalc/menubar/menubar.xml

svtools/inc/tabbar.hxx

svtools/source/control/tabbar.cxx

Tab Color Dialog

sc/inc/scabstdlg.hxx
sc/source/ui/attrdlg/scdlgfact.cxx
sc/source/ui/attrdlg/scdlgfact.hxx
sc/source/ui/inc/miscdlgs.hrc
sc/source/ui/inc/tabbgcolordlg.hxx (new)
sc/source/ui/miscdlgs/makefile.mk
sc/source/ui/miscdlgs/tabbgcolordlg.cxx (new)
sc/source/ui/src/miscdlgs.src
sc/util/makefile.mk

Excel 2003 Binary Support

sc/source/filter/excel/read.cxx
sc/source/filter/excel/xestyle.cxx
sc/source/filter/excel/xeview.cxx
sc/source/filter/excel/xichart.cxx
sc/source/filter/excel/xiview.cxx
sc/source/filter/excel/xlview.cxx
sc/source/filter/inc/xestyle.hxx
sc/source/filter/inc/xeview.hxx
sc/source/filter/inc/xiview.hxx
sc/source/filter/inc/xlview.hxx

Excel 2003 XML Support

filter/source/xslt/export/spreadsheetml/formular.xsl
filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl

Excel 2007 Binary / OOX Support

oox/inc/oox/xls/viewsettings.hxx
oox/source/xls/chartsheetfragment.cxx
oox/source/xls/viewsettings.cxx
oox/source/xls/worksheetfragment.cxx
oox/source/xls/worksheethelper.cxx
oox/source/xls/worksheetsettings.cxx

Patch Download List

  • Download Patch

See Also


Danielbw 01:23, 22 January 2009 (UTC)


Personal tools