ooo-build r12262 - in trunk: . patches/dev300 patches/src680



Author: kyoshida
Date: Mon Apr 21 17:53:47 2008
New Revision: 12262
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12262&view=rev

Log:
2008-04-21  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/apply:
	* patches/src680/sc-sheet-gridline-toggle.diff: adjusted for DEV300.


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply
   trunk/patches/src680/sc-sheet-gridline-toggle.diff

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Mon Apr 21 17:53:47 2008
@@ -1564,7 +1564,7 @@
 #FIXME dev300: sc-fix-range-ref-window.diff, n#358558, kohei
 
 # Toggle gridline display per sheet.
-#FIXME dev300: sc-sheet-gridline-toggle.diff, kohei
+sc-sheet-gridline-toggle.diff, i#14893, kohei
 
 # Skip overlapped cells (cells that are hidden under a merged cell) when 
 # navigating through cells.

Modified: trunk/patches/src680/sc-sheet-gridline-toggle.diff
==============================================================================
--- trunk/patches/src680/sc-sheet-gridline-toggle.diff	(original)
+++ trunk/patches/src680/sc-sheet-gridline-toggle.diff	Mon Apr 21 17:53:47 2008
@@ -1,45 +1,18 @@
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=officecfg.vpj officecfg.clean/registry/data/org/openoffice/Office/UI/CalcCommands.xcu officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
---- officecfg.clean/registry/data/org/openoffice/Office/UI/CalcCommands.xcu	2008-02-20 15:04:18.000000000 -0500
-+++ officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu	2008-02-21 11:25:19.000000000 -0500
-@@ -1439,6 +1439,14 @@
-                     <value xml:lang="en-US">E-mail as ~OpenDocument Spreadsheet...</value>
-                 </prop>
-             </node>
-+            <node oor:name=".uno:ToggleSheetGrid" oor:op="replace">
-+                <prop oor:name="Label" oor:type="xs:string">
-+                    <value xml:lang="en-US">Toggle Grid Lines for Current Sheet</value>
-+                </prop>
-+                <prop oor:name="Properties" oor:type="xs:int">
-+                    <value>1</value>
-+                </prop>
-+            </node>
-         </node>
- 		<node oor:name="Popups">
- 			<node oor:name=".uno:AuditMenu" oor:op="replace">
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/inc/document.hxx sc/inc/document.hxx
---- sc.clean/inc/document.hxx	2008-02-05 11:16:54.000000000 -0500
-+++ sc/inc/document.hxx	2008-02-20 00:41:43.000000000 -0500
-@@ -162,6 +162,7 @@ class ScAutoNameCache;
- class ScTemporaryChartLock;
- class ScLookupCache;
- struct ScLookupCacheMapImpl;
-+struct ScTableViewOptions;
- 
- namespace com { namespace sun { namespace star {
-     namespace lang {
-@@ -1703,6 +1704,8 @@ public:
-                     /// an ID unique to each document instance
-     sal_uInt32      GetDocumentID() const;
- 
-+    ScTableViewOptions* GetTableViewOptions( SCTAB nTab ) const;
-+
-     void            InvalidateStyleSheetUsage()
-                         { bStyleSheetUsageInvalid = TRUE; }
- 	void GetSortParam( ScSortParam& rParam, SCTAB nTab );
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/inc/scextopt.hxx sc/inc/scextopt.hxx
+--- sc.clean/inc/scextopt.hxx	2008-04-01 12:26:30.000000000 -0400
++++ sc/inc/scextopt.hxx	2008-04-21 13:29:55.000000000 -0400
+@@ -97,6 +97,7 @@ struct ScExtTabSettings
+     bool                mbSelected;         /// true = Sheet is selected.
+     bool                mbFrozenPanes;      /// true = Frozen panes; false = Normal splits.
+     bool                mbPageMode;         /// true = Pagebreak mode; false = Normal view mode.
++    bool                mbShowGrid;         /// Whether or not to display gridlines.
+ 
+     explicit            ScExtTabSettings();
+ };
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/inc/sc.hrc sc/inc/sc.hrc
---- sc.clean/inc/sc.hrc	2008-02-05 11:16:54.000000000 -0500
-+++ sc/inc/sc.hrc	2008-02-20 18:35:44.000000000 -0500
-@@ -821,6 +821,7 @@
+--- sc.clean/inc/sc.hrc	2008-04-01 12:26:30.000000000 -0400
++++ sc/inc/sc.hrc	2008-04-21 13:29:55.000000000 -0400
+@@ -833,6 +833,7 @@
  #define FID_TAB_APPEND			(TAB_POPUP_START+5)
  #define FID_TAB_INDEX			(TAB_POPUP_START+6)
  #define FID_TAB_RTL				(TAB_POPUP_START+7)
@@ -47,46 +20,10 @@
  
  #define TAB_POPUP_END			(DATA_MENU_END + 20)
  
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/inc/table.hxx sc/inc/table.hxx
---- sc.clean/inc/table.hxx	2008-02-05 11:16:54.000000000 -0500
-+++ sc/inc/table.hxx	2008-02-20 00:30:49.000000000 -0500
-@@ -37,6 +37,7 @@
- #define SC_TABLE_HXX
- 
- #include <vector>
-+#include <memory>
- 
- #ifndef _GEN_HXX //autogen
- #include <tools/gen.hxx>
-@@ -89,6 +90,7 @@ class ScIndexMap;
- struct RowInfo;
- struct ScFunctionData;
- struct ScLineFlags;
-+struct ScTableViewOptions;
- class CollatorWrapper;
- 
- 
-@@ -166,6 +168,8 @@ private:
- 	USHORT			nScenarioFlags;
- 	BOOL			bActiveScenario;
- 
-+    ::std::auto_ptr<ScTableViewOptions> pViewOptions;
-+
- friend class ScDocument;					// fuer FillInfo
- friend class ScDocumentIterator;
- friend class ScValueIterator;
-@@ -183,6 +187,7 @@ public:
- 							BOOL bColInfo = TRUE, BOOL bRowInfo = TRUE );
- 				~ScTable();
- 
-+    ScTableViewOptions* GetViewOptions();
- 	ScOutlineTable*	GetOutlineTable()				{ return pOutlineTable; }
- 
- 	ULONG		GetCellCount() const;
-Only in sc/inc: tabviewoptions.hxx
+Only in sc/inc: sc.hrc.orig
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/inc/ViewSettingsSequenceDefines.hxx sc/inc/ViewSettingsSequenceDefines.hxx
---- sc.clean/inc/ViewSettingsSequenceDefines.hxx	2008-02-05 11:16:54.000000000 -0500
-+++ sc/inc/ViewSettingsSequenceDefines.hxx	2008-02-21 00:06:54.000000000 -0500
+--- sc.clean/inc/ViewSettingsSequenceDefines.hxx	2008-04-01 12:26:30.000000000 -0400
++++ sc/inc/ViewSettingsSequenceDefines.hxx	2008-04-21 13:29:55.000000000 -0400
 @@ -69,7 +69,7 @@
  // this are the defines for the position of the settings in the
  // TableViewSettingsSequence
@@ -105,8 +42,8 @@
  #define SC_CURSORPOSITIONX					"CursorPositionX"
  #define SC_CURSORPOSITIONY					"CursorPositionY"
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/sdi/docsh.sdi sc/sdi/docsh.sdi
---- sc.clean/sdi/docsh.sdi	2008-02-05 11:16:54.000000000 -0500
-+++ sc/sdi/docsh.sdi	2008-02-20 18:33:41.000000000 -0500
+--- sc.clean/sdi/docsh.sdi	2008-04-01 12:26:30.000000000 -0400
++++ sc/sdi/docsh.sdi	2008-04-21 13:29:55.000000000 -0400
 @@ -68,6 +68,7 @@ interface TableSelection
  	FID_DELETE_TABLE	[ ExecMethod = ExecuteTable; StateMethod = GetStateTable; ]
  	FID_TAB_RENAME		[ ExecMethod = ExecuteTable; StateMethod = GetStateTable; ]
@@ -116,116 +53,45 @@
  	SID_TABLE_ACTIVATE	[ ExecMethod = Execute; ]
  }
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/sdi/scalc.sdi sc/sdi/scalc.sdi
---- sc.clean/sdi/scalc.sdi	2008-02-05 11:16:54.000000000 -0500
-+++ sc/sdi/scalc.sdi	2008-02-20 18:05:05.000000000 -0500
-@@ -7706,3 +7706,28 @@ SfxBoolItem SheetRightToLeft FID_TAB_RTL
- 	GroupId = GID_FORMAT;
+--- sc.clean/sdi/scalc.sdi	2008-04-01 12:26:30.000000000 -0400
++++ sc/sdi/scalc.sdi	2008-04-21 13:31:28.000000000 -0400
+@@ -7780,3 +7780,30 @@ SfxVoidItem ShareDocument SID_SHARE_DOC
+     ToolBoxConfig = FALSE,
+     GroupId = GID_OPTIONS;
  ]
- 
++
 +//--------------------------------------------------------------------------
 +SfxBoolItem ToggleSheetGrid FID_TAB_TOGGLE_GRID
 +
 +[
-+	/* flags: */
-+	AutoUpdate = FALSE,
-+	Cachable = Cachable,
-+	FastCall = FALSE,
-+	HasCoreId = FALSE,
-+	HasDialog = FALSE,
-+	ReadOnlyDoc = TRUE,
-+	Toggle = FALSE,
-+	Container = FALSE,
-+	RecordAbsolute = FALSE,
-+	RecordPerSet;
-+	Synchron;
-+
-+	/* config: */
-+	AccelConfig = TRUE,
-+	MenuConfig = TRUE,
-+	StatusBarConfig = FALSE,
-+	ToolBoxConfig = TRUE,
-+	GroupId = GID_FORMAT;
++    /* flags: */
++    AutoUpdate = FALSE,
++    Cachable = Cachable,
++    FastCall = FALSE,
++    HasCoreId = FALSE,
++    HasDialog = FALSE,
++    ReadOnlyDoc = TRUE,
++    Toggle = FALSE,
++    Container = FALSE,
++    RecordAbsolute = FALSE,
++    RecordPerSet;
++    Synchron;
++    
++    /* config: */
++    AccelConfig = TRUE,
++    MenuConfig = TRUE,
++    StatusBarConfig = FALSE,
++    ToolBoxConfig = TRUE,
++    GroupId = GID_FORMAT;
 +]
 +
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/core/data/documen2.cxx sc/source/core/data/documen2.cxx
---- sc.clean/source/core/data/documen2.cxx	2008-02-05 11:16:59.000000000 -0500
-+++ sc/source/core/data/documen2.cxx	2008-02-20 00:46:26.000000000 -0500
-@@ -277,6 +277,13 @@ sal_uInt32 ScDocument::GetDocumentID() c
-     return nCrc;
- }
- 
-+ScTableViewOptions* ScDocument::GetTableViewOptions( SCTAB nTab ) const
-+{
-+    if (ValidTab(nTab) && pTab[nTab])
-+        return pTab[nTab]->GetViewOptions();
 +
-+    return NULL;
-+}
- 
- void ScDocument::StartChangeTracking()
- {
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/core/data/makefile.mk sc/source/core/data/makefile.mk
---- sc.clean/source/core/data/makefile.mk	2008-02-05 11:16:59.000000000 -0500
-+++ sc/source/core/data/makefile.mk	2008-02-20 01:16:25.000000000 -0500
-@@ -113,7 +113,8 @@ SLOFILES =  \
- 	$(SLO)$/table6.obj \
- 	$(SLO)$/userdat.obj \
- 	$(SLO)$/validat.obj \
--	$(SLO)$/postit.obj
-+	$(SLO)$/postit.obj \
-+	$(SLO)$/tabviewoptions.obj
- 
- EXCEPTIONSFILES= \
-     $(SLO)$/autonamecache.obj \
-diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/core/data/table1.cxx sc/source/core/data/table1.cxx
---- sc.clean/source/core/data/table1.cxx	2008-02-05 11:16:59.000000000 -0500
-+++ sc/source/core/data/table1.cxx	2008-02-20 00:33:00.000000000 -0500
-@@ -119,6 +119,7 @@
- #include "progress.hxx"
- #include "hints.hxx"		// fuer Paint-Broadcast
- #include "prnsave.hxx"
-+#include "tabviewoptions.hxx"
- 
- // STATIC DATA -----------------------------------------------------------
- 
-@@ -158,7 +159,8 @@ ScTable::ScTable( ScDocument* pDoc, SCTA
- 	pScenarioRanges( NULL ),
- 	aScenarioColor( COL_LIGHTGRAY ),
- 	nScenarioFlags( 0 ),
--	bActiveScenario( FALSE )
-+	bActiveScenario( FALSE ),
-+    pViewOptions( NULL )
- {
- 
- 	if (bColInfo)
-@@ -228,6 +230,13 @@ ScTable::~ScTable()
- 	DestroySortCollator();
- }
- 
-+ScTableViewOptions* ScTable::GetViewOptions()
-+{
-+    if (!pViewOptions.get())
-+        pViewOptions.reset(new ScTableViewOptions);
-+    return pViewOptions.get();
-+}
-+
- void ScTable::GetName( String& rName ) const
- {
- 	rName = aName;
-Only in sc/source/core/data: tabviewoptions.cxx
+Only in sc/sdi: scalc.sdi.orig
+Only in sc/sdi: scalc.sdi.rej
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/filter/excel/xeview.cxx sc/source/filter/excel/xeview.cxx
---- sc.clean/source/filter/excel/xeview.cxx	2008-02-05 11:16:59.000000000 -0500
-+++ sc/source/filter/excel/xeview.cxx	2008-02-20 12:40:45.000000000 -0500
-@@ -57,6 +57,8 @@
- #include "xestyle.hxx"
- #endif
- 
-+#include "tabviewoptions.hxx"
-+
- // Workbook view settings records =============================================
- 
- XclExpWindow1::XclExpWindow1( const XclExpRoot& rRoot ) :
-@@ -249,11 +251,14 @@ XclExpTabViewSettings::XclExpTabViewSett
+--- sc.clean/source/filter/excel/xeview.cxx	2008-04-01 12:26:37.000000000 -0400
++++ sc/source/filter/excel/xeview.cxx	2008-04-21 13:29:55.000000000 -0400
+@@ -249,7 +249,6 @@ XclExpTabViewSettings::XclExpTabViewSett
  
      const ScViewOptions& rViewOpt = GetDoc().GetViewOptions();
      maData.mbShowFormulas   = rViewOpt.GetOption( VOPT_FORMULAS );
@@ -233,27 +99,28 @@
      maData.mbShowHeadings   = rViewOpt.GetOption( VOPT_HEADER );
      maData.mbShowZeros      = rViewOpt.GetOption( VOPT_NULLVALS );
      maData.mbShowOutline    = rViewOpt.GetOption( VOPT_OUTLINER );
+@@ -324,6 +323,7 @@ XclExpTabViewSettings::XclExpTabViewSett
+             else
+                 maData.maGridColor = rGridColor;
+         }
++        maData.mbShowGrid       = rTabSett.mbShowGrid;
  
-+    // Save per-sheet view options.
-+    const ScTableViewOptions* pTabViewOpt = GetDoc().GetTableViewOptions(nScTab);
-+    maData.mbShowGrid = pTabViewOpt->mbDisplayGrid;
-+
-     // *** sheet options: cursor, selection, splits, grid color, zoom ***
- 
-     if( const ScExtTabSettings* pTabSett = GetExtDocOptions().GetTabSettings( nScTab ) )
+         // view mode and zoom
+         maData.mbPageMode       = (GetBiff() == EXC_BIFF8) && rTabSett.mbPageMode;
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/filter/excel/xiview.cxx sc/source/filter/excel/xiview.cxx
---- sc.clean/source/filter/excel/xiview.cxx	2008-02-05 11:16:59.000000000 -0500
-+++ sc/source/filter/excel/xiview.cxx	2008-02-20 12:28:11.000000000 -0500
-@@ -60,6 +60,8 @@
- #include "xistyle.hxx"
- #endif
- 
-+#include "tabviewoptions.hxx"
-+
- // Document view settings =====================================================
- 
- XclImpDocViewSettings::XclImpDocViewSettings( const XclImpRoot& rRoot ) :
-@@ -295,12 +297,16 @@ void XclImpTabViewSettings::Finalize()
+--- sc.clean/source/filter/excel/xiview.cxx	2008-04-01 12:26:38.000000000 -0400
++++ sc/source/filter/excel/xiview.cxx	2008-04-21 13:29:55.000000000 -0400
+@@ -281,6 +281,9 @@ void XclImpTabViewSettings::Finalize()
+     else
+         rTabSett.maGridColor = maData.maGridColor;
+ 
++    // show grid option
++    rTabSett.mbShowGrid      = maData.mbShowGrid;
++
+     // view mode and zoom
+     if( maData.mnCurrentZoom != 0 )
+         (maData.mbPageMode ? maData.mnPageZoom : maData.mnNormalZoom) = maData.mnCurrentZoom;
+@@ -295,7 +298,6 @@ void XclImpTabViewSettings::Finalize()
          // set Excel sheet settings globally at Calc document, take settings from displayed sheet
          ScViewOptions aViewOpt( rDoc.GetViewOptions() );
          aViewOpt.SetOption( VOPT_FORMULAS, maData.mbShowFormulas );
@@ -261,45 +128,57 @@
          aViewOpt.SetOption( VOPT_HEADER,   maData.mbShowHeadings );
          aViewOpt.SetOption( VOPT_NULLVALS, maData.mbShowZeros );
          aViewOpt.SetOption( VOPT_OUTLINER, maData.mbShowOutline );
-         rDoc.SetViewOptions( aViewOpt );
-     }
-+
-+    // Store sheet view options.
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/inc/viewdata.hxx sc/source/ui/inc/viewdata.hxx
+--- sc.clean/source/ui/inc/viewdata.hxx	2008-04-01 12:26:30.000000000 -0400
++++ sc/source/ui/inc/viewdata.hxx	2008-04-21 13:29:55.000000000 -0400
+@@ -136,6 +136,8 @@ private:
+ 	SCCOL			nPosX[2];
+ 	SCROW			nPosY[2];
+ 
++    bool            bShowGrid;                  // per-sheet show grid-lines option.
++
+ 	BOOL			bOldCurValid;				// "virtuelle" Cursorpos. bei zusammengefassten
+ 
+ 					ScViewDataTable();
+@@ -314,6 +316,9 @@ public:
+     const Fraction&	GetZoomX() const        { return bPagebreak ? pThisTab->aPageZoomX : pThisTab->aZoomX; }
+     const Fraction&	GetZoomY() const        { return bPagebreak ? pThisTab->aPageZoomY : pThisTab->aZoomY; }
+ 
++    void            SetShowGrid( bool bShow );
++    bool            GetShowGrid() const { return pThisTab->bShowGrid; }
 +
-+    ScTableViewOptions* pTabViewOptions = rDoc.GetTableViewOptions(nScTab);
-+    pTabViewOptions->mbDisplayGrid = maData.mbShowGrid;
- }
+ 	const MapMode&	GetLogicMode( ScSplitPos eWhich );
+ 	const MapMode&	GetLogicMode();						// Offset 0
  
- // ============================================================================
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/view/gridwin4.cxx sc/source/ui/view/gridwin4.cxx
---- sc.clean/source/ui/view/gridwin4.cxx	2008-02-05 11:16:56.000000000 -0500
-+++ sc/source/ui/view/gridwin4.cxx	2008-02-21 10:13:46.000000000 -0500
-@@ -79,6 +79,7 @@
- #include "inputopt.hxx"
- #include "fillinfo.hxx"
- #include "sc.hrc"
-+#include "tabviewoptions.hxx"
- 
- #ifndef _SV_VIRDEV_HXX
- #include <vcl/virdev.hxx>
-@@ -564,7 +565,13 @@ void ScGridWindow::Draw( SCCOL nX1, SCRO
+--- sc.clean/source/ui/view/gridwin4.cxx	2008-04-01 12:26:33.000000000 -0400
++++ sc/source/ui/view/gridwin4.cxx	2008-04-21 13:29:55.000000000 -0400
+@@ -564,7 +564,8 @@ void ScGridWindow::Draw( SCCOL nX1, SCRO
  	aOutputData.SetEditObject( GetEditObject() );
  	aOutputData.SetViewShell( pViewData->GetViewShell() );
  
 -	BOOL bGrid = rOpts.GetOption( VOPT_GRID );
-+    BOOL bGrid = rOpts.GetOption( VOPT_GRID );
-+    if (bGrid)
-+    {
-+        const ScTableViewOptions* pTabOptions = pDoc->GetTableViewOptions(nTab);
-+        bGrid = pTabOptions->mbDisplayGrid;
-+    }
++    BOOL bGrid = rOpts.GetOption( VOPT_GRID ) && pViewData->GetShowGrid();
 +
  	BOOL bPage = rOpts.GetOption( VOPT_PAGEBREAKS );
  
  	if ( eMode == SC_UPDATE_CHANGED )
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/view/scextopt.cxx sc/source/ui/view/scextopt.cxx
+--- sc.clean/source/ui/view/scextopt.cxx	2008-04-01 12:26:33.000000000 -0400
++++ sc/source/ui/view/scextopt.cxx	2008-04-21 13:29:55.000000000 -0400
+@@ -70,7 +70,8 @@ ScExtTabSettings::ScExtTabSettings() :
+     mnPageZoom( 0 ),
+     mbSelected( false ),
+     mbFrozenPanes( false ),
+-    mbPageMode( false )
++    mbPageMode( false ),
++    mbShowGrid( true )
+ {
+ }
+ 
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/view/tabvwshf.cxx sc/source/ui/view/tabvwshf.cxx
---- sc.clean/source/ui/view/tabvwshf.cxx	2008-02-05 11:16:56.000000000 -0500
-+++ sc/source/ui/view/tabvwshf.cxx	2008-02-20 23:48:40.000000000 -0500
+--- sc.clean/source/ui/view/tabvwshf.cxx	2008-04-01 12:26:33.000000000 -0400
++++ sc/source/ui/view/tabvwshf.cxx	2008-04-21 13:29:55.000000000 -0400
 @@ -42,6 +42,8 @@
  
  #include "scitems.hxx"
@@ -309,23 +188,14 @@
  #include <basic/sbstar.hxx>
  #include <svtools/languageoptions.hxx>
  #include <svtools/stritem.hxx>
-@@ -59,7 +61,7 @@
- //CHINA001 #include "strindlg.hxx"
- //CHINA001 #include "mvtabdlg.hxx"
- #include "docfunc.hxx"
--
-+#include "tabviewoptions.hxx"
- 
- #include "scabstdlg.hxx" //CHINA001
- 
 @@ -685,6 +687,17 @@ void ScTabViewShell::ExecuteTable( SfxRe
  			}
  			break;
  
 +        case FID_TAB_TOGGLE_GRID:
 +            {
-+                ScTableViewOptions* pViewOpt = pDoc->GetTableViewOptions(nCurrentTab);
-+                pViewOpt->mbDisplayGrid = !pViewOpt->mbDisplayGrid;
++                bool bShowGrid = pViewData->GetShowGrid();
++                pViewData->SetShowGrid(!bShowGrid);
 +                SfxBindings& rBindings = GetViewFrame()->GetBindings();
 +                rBindings.Invalidate( FID_TAB_TOGGLE_GRID );
 +                PaintGrid();
@@ -336,168 +206,106 @@
  		default:
  			DBG_ERROR("Unbekannte Message bei ViewShell");
  			break;
-@@ -800,6 +813,13 @@ void ScTabViewShell::GetStateTable( SfxI
+@@ -800,6 +813,10 @@ void ScTabViewShell::GetStateTable( SfxI
  						rSet.Put( SfxBoolItem( nWhich, pDoc->IsLayoutRTL( nTab ) ) );
  				}
  				break;
 +
 +            case FID_TAB_TOGGLE_GRID:
-+                {
-+                    const ScTableViewOptions* pTabViewOptions = pDoc->GetTableViewOptions(nTab);
-+                    rSet.Put( SfxBoolItem(nWhich, pTabViewOptions->mbDisplayGrid) );
-+                }
++                rSet.Put( SfxBoolItem(nWhich, pViewData->GetShowGrid()) );
 +                break;
  		}
  		nWhich = aIter.NextWhich();
  	}
+Only in sc/source/ui/view: tabvwshf.cxx.orig
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/view/viewdata.cxx sc/source/ui/view/viewdata.cxx
---- sc.clean/source/ui/view/viewdata.cxx	2008-02-05 11:16:56.000000000 -0500
-+++ sc/source/ui/view/viewdata.cxx	2008-02-21 00:17:16.000000000 -0500
-@@ -73,6 +73,7 @@
- #include "miscuno.hxx"
- #include "unonames.hxx"
- #include "inputopt.hxx"
-+#include "tabviewoptions.hxx"
- 
- #ifndef _XMLOFF_XMLUCONV_HXX
- #include <xmloff/xmluconv.hxx>
-@@ -137,7 +138,7 @@ ScViewDataTable::~ScViewDataTable()
+--- sc.clean/source/ui/view/viewdata.cxx	2008-04-01 12:26:33.000000000 -0400
++++ sc/source/ui/view/viewdata.cxx	2008-04-21 13:29:55.000000000 -0400
+@@ -121,6 +121,7 @@ ScViewDataTable::ScViewDataTable() :
+ 				nFixPosY( 0 ),
+ 				nCurX( 0 ),
+ 				nCurY( 0 ),
++                bShowGrid( true ),
+                 bOldCurValid( FALSE )
  {
- }
- 
--void ScViewDataTable::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSettings, const ScViewData& /*rViewData*/, SCTAB /*nTab*/)
-+void ScViewDataTable::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSettings, const ScViewData& rViewData, SCTAB nTab)
- {
- 	rSettings.realloc(SC_TABLE_VIEWSETTINGS_COUNT);
- 	beans::PropertyValue* pSettings = rSettings.getArray();
-@@ -180,6 +180,10 @@ void ScViewDataTable::WriteUserDataSeque
-         pSettings[SC_TABLE_ZOOM_VALUE].Value <<= nZoomValue;
+ 	nPosX[0]=nPosX[1]=0;
+@@ -181,6 +182,9 @@ void ScViewDataTable::WriteUserDataSeque
          pSettings[SC_TABLE_PAGE_VIEW_ZOOM_VALUE].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_PAGEVIEWZOOMVALUE));
          pSettings[SC_TABLE_PAGE_VIEW_ZOOM_VALUE].Value <<= nPageZoomValue;
-+
-+        const ScTableViewOptions* pTabViewOpt = rViewData.GetDocument()->GetTableViewOptions(nTab);
+ 
 +        pSettings[SC_TABLE_SHOWGRID].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_SHOWGRID));
-+        pSettings[SC_TABLE_SHOWGRID].Value <<= static_cast<sal_Bool>(pTabViewOpt->mbDisplayGrid);
++        pSettings[SC_TABLE_SHOWGRID].Value <<= static_cast<sal_Bool>(bShowGrid);
++
+ //        pSettings[SC_TABLE_SELECTED].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_TABLESELECTED));
+ //        pSettings[SC_TABLE_SELECTED].Value <<= bool(rViewData.GetMarkData().GetTableSelect( nTab ));
  	}
- }
-
-@@ -287,6 +292,12 @@ void ScViewDataTable::ReadUserDataSequen
+@@ -287,6 +291,10 @@ void ScViewDataTable::ReadUserDataSequen
              aPageZoomX = aPageZoomY = aZoom;
              rHasZoom = true;
          }
 +        else if (sName.compareToAscii(SC_UNO_SHOWGRID) == 0)
 +        {
-+            bool bShowGrid = true;
 +            aSettings[i].Value >>= bShowGrid;
-+            rViewData.GetDocument()->GetTableViewOptions(nTab)->mbDisplayGrid = bShowGrid;
 +        }
          else if (sName.compareToAscii(SC_TABLESELECTED) == 0)
          {
              bool bSelected = false;
+@@ -677,6 +685,12 @@ void ScViewData::SetZoom( const Fraction
+ 	RefreshZoom();
+ }
+ 
++void ScViewData::SetShowGrid( bool bShow )
++{
++    CreateSelectedTabData();
++    pTabData[nTabNo]->bShowGrid = bShow;
++}
++
+ void ScViewData::RefreshZoom()
+ {
+     // recalculate zoom-dependent values (only for current sheet)
+@@ -2476,6 +2490,7 @@ void ScViewData::WriteExtOptions( ScExtD
+                 if( rGridColor.GetColor() != SC_STD_GRIDCOLOR )
+                     rTabSett.maGridColor = rGridColor;
+             }
++            rTabSett.mbShowGrid = pViewTab->bShowGrid;
+ 
+             // view mode and zoom
+             rTabSett.mbPageMode = bPagebreak;
+@@ -2608,6 +2623,8 @@ void ScViewData::ReadExtOptions( const S
+             if( rTabSett.mnPageZoom )
+                 rViewTab.aPageZoomX = rViewTab.aPageZoomY = Fraction( rTabSett.mnPageZoom, 100L );
+ 
++            rViewTab.bShowGrid = rTabSett.mbShowGrid;
++
+             // get some settings from displayed Excel sheet, set at Calc document
+             if( nTab == GetTabNo() )
+             {
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/uiconfig/scalc/toolbar/formatobjectbar.xml sc/uiconfig/scalc/toolbar/formatobjectbar.xml
---- sc.clean/uiconfig/scalc/toolbar/formatobjectbar.xml	2008-02-05 11:16:54.000000000 -0500
-+++ sc/uiconfig/scalc/toolbar/formatobjectbar.xml	2008-02-21 11:32:04.000000000 -0500
+--- sc.clean/uiconfig/scalc/toolbar/formatobjectbar.xml	2008-04-01 12:26:30.000000000 -0400
++++ sc/uiconfig/scalc/toolbar/formatobjectbar.xml	2008-04-21 13:29:55.000000000 -0400
 @@ -50,4 +50,6 @@
   <toolbar:toolbaritem xlink:href=".uno:InsertColumns" toolbar:helpid="helpid:26268"  toolbar:visible="false" />
   <toolbar:toolbaritem xlink:href=".uno:DeleteRows" toolbar:helpid="helpid:26236"  toolbar:visible="false" />
   <toolbar:toolbaritem xlink:href=".uno:DeleteColumns" toolbar:helpid="helpid:26237"  toolbar:visible="false" />
 + <toolbar:toolbarseparator/>
-+ <toolbar:toolbaritem xlink:href=".uno:ToggleSheetGrid" toolbar:helpid="helpid:26237"  toolbar:visible="true" />
++ <toolbar:toolbaritem xlink:href=".uno:ToggleSheetGrid" toolbar:helpid="helpid:26238"  toolbar:visible="true" />
  </toolbar:toolbar>
---- /dev/null	2007-03-30 11:25:40.000000000 -0400
-+++ sc/inc/tabviewoptions.hxx	2008-02-20 01:15:22.000000000 -0500
-@@ -0,0 +1,50 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile: table.hxx,v $
-+ *
-+ *  $Revision: 1.32 $
-+ *
-+ *  last change: $Author: vg $ $Date: 2007/09/21 09:22:40 $
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2008 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+
-+#ifndef SC_TAB_VIEW_OPTIONS_HXX
-+#define SC_TAB_VIEW_OPTIONS_HXX
-+
-+/** This class stores a set of persistent sheet view options that are saved
-+    with the document.  This class is still work in progress, thus will
-+    likely grow with more options in future. */
-+struct ScTableViewOptions
-+{
-+    bool mbDisplayGrid;
-+
-+    ScTableViewOptions();
-+};
-+
-+
-+#endif
---- /dev/null	2007-03-30 11:25:40.000000000 -0400
-+++ sc/source/core/data/tabviewoptions.cxx	2008-02-20 16:04:37.000000000 -0500
-@@ -0,0 +1,41 @@
-+/*************************************************************************
-+ *
-+ *  OpenOffice.org - a multi-platform office productivity suite
-+ *
-+ *  $RCSfile: table.hxx,v $
-+ *
-+ *  $Revision: 1.32 $
-+ *
-+ *  last change: $Author: vg $ $Date: 2007/09/21 09:22:40 $
-+ *
-+ *  The Contents of this file are made available subject to
-+ *  the terms of GNU Lesser General Public License Version 2.1.
-+ *
-+ *
-+ *    GNU Lesser General Public License Version 2.1
-+ *    =============================================
-+ *    Copyright 2008 by Sun Microsystems, Inc.
-+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
-+ *
-+ *    This library is free software; you can redistribute it and/or
-+ *    modify it under the terms of the GNU Lesser General Public
-+ *    License version 2.1, as published by the Free Software Foundation.
-+ *
-+ *    This library is distributed in the hope that it will be useful,
-+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ *    Lesser General Public License for more details.
-+ *
-+ *    You should have received a copy of the GNU Lesser General Public
-+ *    License along with this library; if not, write to the Free Software
-+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ *    MA  02111-1307  USA
-+ *
-+ ************************************************************************/
-+
-+#include "tabviewoptions.hxx"
-+
-+ScTableViewOptions::ScTableViewOptions() :
-+    mbDisplayGrid(true)
-+{
-+}
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=officecfg.vpj officecfg.clean/registry/data/org/openoffice/Office/UI/CalcCommands.xcu officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+--- officecfg.clean/registry/data/org/openoffice/Office/UI/CalcCommands.xcu	2008-04-21 13:22:35.000000000 -0400
++++ officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu	2008-04-21 13:29:55.000000000 -0400
+@@ -1454,6 +1454,14 @@
+                     <value xml:lang="en-US">S~hare Document...</value>
+                 </prop>
+             </node>
++            <node oor:name=".uno:ToggleSheetGrid" oor:op="replace">
++                <prop oor:name="Label" oor:type="xs:string">
++                    <value xml:lang="en-US">Toggle Grid Lines for Current Sheet</value>
++                </prop>
++                <prop oor:name="Properties" oor:type="xs:int">
++                    <value>1</value>
++                </prop>
++            </node>
+         </node>
+ 		<node oor:name="Popups">
+ 			<node oor:name=".uno:AuditMenu" oor:op="replace">
+Only in officecfg/registry/data/org/openoffice/Office/UI: CalcCommands.xcu.orig



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]