[ooo-build-commit] patches/dev300
Petr Mladek
pmladek at kemper.freedesktop.org
Thu Oct 1 10:49:46 PDT 2009
patches/dev300/apply | 9 ++-
patches/dev300/cws-calctabcolor-oox-m58.diff | 75 +++++++++++++++++++++++++++
2 files changed, 83 insertions(+), 1 deletion(-)
New commits:
commit 02421405cd7e50d9f62f012ea5a470b74b8b5b7d
Author: Petr Mladek <pmladek at suse.cz>
Date: Thu Oct 1 19:47:39 2009 +0200
Put back cws-calctabcolor-oox-m58.diff
* patches/dev300/cws-calctabcolor-oox-m58.diff:
* patches/dev300/apply: add back the version compatible with
dev300-m58
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 681c102..0021561 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -193,10 +193,17 @@ cws-kohei03-sc-m58.diff, kohei
# calctabcolor cws (tab color feature by Daniel Watson)
cws-calctabcolor-filter.diff, kohei
cws-calctabcolor-officecfg.diff, kohei
-cws-calctabcolor-oox.diff, kohei
cws-calctabcolor-sc.diff, kohei
cws-calctabcolor-svtools.diff, kohei
+[ CWSBackports > dev300-m58 ]
+# calctabcolor cws (tab color feature by Daniel Watson)
+cws-calctabcolor-oox.diff, kohei
+
+[ CWSBackports <= dev300-m58 ]
+# calctabcolor cws (tab color feature by Daniel Watson)
+cws-calctabcolor-oox-m58.diff, kohei
+
[ LinuxOnly ]
# Don't stat tons of config files we don't need to read on startup
speed-configmgr.diff, i#56783, michael
diff --git a/patches/dev300/cws-calctabcolor-oox-m58.diff b/patches/dev300/cws-calctabcolor-oox-m58.diff
new file mode 100644
index 0000000..9e37e21
--- /dev/null
+++ b/patches/dev300/cws-calctabcolor-oox-m58.diff
@@ -0,0 +1,75 @@
+diff --git oox/inc/oox/xls/viewsettings.hxx oox/inc/oox/xls/viewsettings.hxx
+index fceb1bc..f1160a1 100644
+--- oox/inc/oox/xls/viewsettings.hxx
++++ oox/inc/oox/xls/viewsettings.hxx
+@@ -83,6 +83,7 @@ struct SheetViewModel
+ bool mbShowZeros; /// True = show zero value zells.
+ bool mbShowOutline; /// True = show outlines.
+ bool mbZoomToFit; /// True = zoom chart sheet to fit window.
++ Color maTabColor; /// Sheet tab color. (TODO: Move to sheet settings later.)
+
+ explicit SheetViewModel();
+
+@@ -112,6 +113,8 @@ public:
+
+ /** Imports the sheetView element containing sheet view settings. */
+ void importSheetView( const AttributeList& rAttribs );
++ /** Imports the tabcolor element containing tab color settings. */
++ void importTabColor( const AttributeList& rAttribs );
+ /** Imports the pane element containing sheet pane settings. */
+ void importPane( const AttributeList& rAttribs );
+ /** Imports the selection element containing selection settings for a pane. */
+diff --git oox/source/token/properties.txt oox/source/token/properties.txt
+index 958a9ac..89a65cd 100644
+--- oox/source/token/properties.txt
++++ oox/source/token/properties.txt
+@@ -355,6 +355,7 @@ Suffix
+ SwapXAndYAxis
+ Symbol
+ SymbolColor
++TabColor
+ TableBorder
+ TableLayout
+ TableSelected
+diff --git oox/source/xls/viewsettings.cxx oox/source/xls/viewsettings.cxx
+index caeacaf..ce8c009 100644
+--- oox/source/xls/viewsettings.cxx
++++ oox/source/xls/viewsettings.cxx
+@@ -245,6 +245,12 @@ void SheetViewSettings::importSheetView( const AttributeList& rAttribs )
+ rModel.mbShowOutline = rAttribs.getBool( XML_showOutlineSymbols, true );
+ }
+
++void SheetViewSettings::importTabColor( const AttributeList& rAttribs )
++{
++ SheetViewModel& rModel = maSheetViews.empty() ? *createSheetView() : *maSheetViews.back();
++ rModel.maTabColor.importColor( rAttribs );
++}
++
+ void SheetViewSettings::importPane( const AttributeList& rAttribs )
+ {
+ OSL_ENSURE( !maSheetViews.empty(), "SheetViewSettings::importPane - missing sheet view model" );
+@@ -589,6 +595,9 @@ void SheetViewSettings::finalizeImport()
+ aPropMap[ PROP_ShowZeroValues ] <<= xModel->mbShowZeros;
+ aPropMap[ PROP_IsOutlineSymbolsSet ] <<= xModel->mbShowOutline;
+
++ if (!xModel->maTabColor.isAuto())
++ aPropMap[ PROP_TabColor ] <<= static_cast< sal_Int32 >(xModel->maTabColor.getColor(*this));
++
+ // store sheet view settings in global view settings object
+ getViewSettings().setSheetViewSettings( getSheetIndex(), xModel, Any( aPropMap.makePropertyValueSequence() ) );
+ }
+diff --git oox/source/xls/worksheetfragment.cxx oox/source/xls/worksheetfragment.cxx
+index 4b75411..d2bed72 100644
+--- oox/source/xls/worksheetfragment.cxx
++++ oox/source/xls/worksheetfragment.cxx
+@@ -297,7 +297,9 @@ ContextHandlerRef OoxWorksheetFragment::onCreateContext( sal_Int32 nElement, con
+ case XLS_TOKEN( sheetPr ):
+ switch( nElement )
+ {
+- case XLS_TOKEN( tabColor ): getWorksheetSettings().importTabColor( rAttribs ); break;
++// TODO: Treat tab color as a sheet setting later.
++// case XLS_TOKEN( tabColor ): getWorksheetSettings().importTabColor( rAttribs ); break;
++ case XLS_TOKEN( tabColor ): getSheetViewSettings().importTabColor( rAttribs ); break;
+ case XLS_TOKEN( outlinePr ): getWorksheetSettings().importOutlinePr( rAttribs ); break;
+ case XLS_TOKEN( pageSetUpPr ): importPageSetUpPr( rAttribs ); break;
+ }
More information about the ooo-build-commit
mailing list