[Libreoffice-commits] core.git: officecfg/registry sc/inc sc/sdi sc/source

Maxim Monastirsky momonasmon at gmail.com
Wed Mar 5 05:07:11 PST 2014


 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |    5 -
 sc/inc/sc.hrc                                                     |    3 
 sc/sdi/formatsh.sdi                                               |    1 
 sc/sdi/scalc.sdi                                                  |   25 -----
 sc/source/core/data/docpool.cxx                                   |    3 
 sc/source/ui/app/scmod.cxx                                        |    1 
 sc/source/ui/inc/formatsh.hxx                                     |    3 
 sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx              |    8 -
 sc/source/ui/view/formatsh.cxx                                    |   48 ----------
 sc/source/ui/view/tabview3.cxx                                    |    1 
 10 files changed, 6 insertions(+), 92 deletions(-)

New commits:
commit c3403ac888c2e62edaf8befe7982f5f8cc95c16f
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Wed Mar 5 09:42:30 2014 +0200

    fdo#67104 Use correct command for show grid
    
    Not sure why .uno:ViewGridLines & SID_SCGRIDSHOW were
    introduced (in "merge sidebar feature" and related commits).
    
    Change-Id: I90bdfaef86adcbfa44129b8f7f9df61ca7f35114
    Reviewed-on: https://gerrit.libreoffice.org/8459
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 5c75e98..cdfd826 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -835,11 +835,6 @@
           <value xml:lang="en-US">~Formula Bar</value>
         </prop>
       </node>
-      <node oor:name=".uno:ViewGridLines" oor:op="replace">
-        <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">View Grid lines</value>
-        </prop>
-      </node>
       <node oor:name=".uno:ViewRowColumnHeaders" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">C~olumn & Row Headers</value>
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 3ed851a..ae92cf8 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -677,8 +677,7 @@
 // Sidebar -------------------------------------------------------------
 
 #define SID_PROPERTY_PANEL_CELLTEXT_DLG (SC_SIDEBAR_PROPERTY_BEGIN+0)
-#define SID_SCGRIDSHOW                  (SC_SIDEBAR_PROPERTY_BEGIN+1)
-#define SID_NUMBER_TYPE_FORMAT          (SC_SIDEBAR_PROPERTY_BEGIN+2)
+#define SID_NUMBER_TYPE_FORMAT          (SC_SIDEBAR_PROPERTY_BEGIN+1)
 
 // resources
 
diff --git a/sc/sdi/formatsh.sdi b/sc/sdi/formatsh.sdi
index 72e1e14..903c5e5 100644
--- a/sc/sdi/formatsh.sdi
+++ b/sc/sdi/formatsh.sdi
@@ -101,7 +101,6 @@ interface FormatForSelection
     SID_ALIGNCENTERVER  [ ExecMethod = ExecuteTextAttr; StateMethod = GetTextAttrState; ]
     SID_ALIGNBLOCK      [ ExecMethod = ExecuteTextAttr; StateMethod = GetTextAttrState; ]
     SID_ALIGNCENTERHOR  [ ExecMethod = ExecuteTextAttr; StateMethod = GetTextAttrState; ]
-    SID_SCGRIDSHOW      [ ExecMethod = ExecViewOptions; StateMethod = GetViewOptions; ]
 
     SID_V_ALIGNCELL         [ ExecMethod = ExecuteAlignment; StateMethod = GetAlignState; ]
     SID_H_ALIGNCELL         [ ExecMethod = ExecuteAlignment; StateMethod = GetAlignState; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 1313bdb..ca7b225 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -8801,31 +8801,6 @@ SfxVoidItem ExportAsGraphic SID_EXPORT_AS_GRAPHIC
 ]
 
 
-SfxBoolItem ViewGridLines SID_SCGRIDSHOW
-[
-    AutoUpdate = TRUE,
-    Cachable = Cachable,
-    FastCall = FALSE,
-    HasCoreId = FALSE,
-    HasDialog = FALSE,
-    ReadOnlyDoc = FALSE, //TRUE
-    Toggle = FALSE,
-    Container = FALSE,
-    RecordAbsolute = FALSE,
-    RecordPerSet;
-    Synchron;
-
-    Readonly = FALSE,
-
-    /* config */
-    AccelConfig = FALSE,
-    MenuConfig = FALSE,
-    StatusBarConfig = FALSE,
-    ToolBoxConfig = FALSE,
-    GroupId = GID_VIEW;
-]
-
-
 SfxUInt16Item NumberFormatType SID_NUMBER_TYPE_FORMAT
 [
     /* flags: */
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index db06224..3c7e52d 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -182,8 +182,7 @@ static SfxItemInfo const  aItemInfos[] =
     { SID_ATTR_PAGE_FOOTERSET,      SFX_ITEM_POOLABLE },    // ATTR_PAGE_FOOTERSET
     { SID_SCATTR_PAGE_FORMULAS,     SFX_ITEM_POOLABLE },    // ATTR_PAGE_FORMULAS
     { SID_SCATTR_PAGE_NULLVALS,     SFX_ITEM_POOLABLE },    // ATTR_PAGE_NULLVALS
-    { SID_SCATTR_PAGE_SCALETO,      SFX_ITEM_POOLABLE },    // ATTR_PAGE_SCALETO
-    { SID_SCGRIDSHOW,               SFX_ITEM_POOLABLE }
+    { SID_SCATTR_PAGE_SCALETO,      SFX_ITEM_POOLABLE }     // ATTR_PAGE_SCALETO
 };
 
 
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 496062b..ba7aec8 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1121,7 +1121,6 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
         if (pBindings)
         {
             pBindings->Invalidate(SID_HELPLINES_MOVE);
-            pBindings->Invalidate(SID_SCGRIDSHOW);
         }
     }
 
diff --git a/sc/source/ui/inc/formatsh.hxx b/sc/source/ui/inc/formatsh.hxx
index ccf69ca..975e2ad 100644
--- a/sc/source/ui/inc/formatsh.hxx
+++ b/sc/source/ui/inc/formatsh.hxx
@@ -67,9 +67,6 @@ public:
     void        ExecFormatPaintbrush( SfxRequest& rReq );
     void        StateFormatPaintbrush( SfxItemSet& rSet );
 
-    void        ExecViewOptions( SfxRequest& rReq );
-    void        GetViewOptions( SfxItemSet& rSet );
-
 private:
     short       GetCurrentNumberFormatType();
 };
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index 2ebc5bf..adc77f8 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -161,7 +161,7 @@ CellAppearancePropertyPanel::CellAppearancePropertyPanel(
     maLineStyleControl(SID_FRAME_LINESTYLE, *pBindings, *this),
     maBorderOuterControl(SID_ATTR_BORDER_OUTER, *pBindings, *this),
     maBorderInnerControl(SID_ATTR_BORDER_INNER, *pBindings, *this),
-    maGridShowControl(SID_SCGRIDSHOW, *pBindings, *this),
+    maGridShowControl(FID_TAB_TOGGLE_GRID, *pBindings, *this),
     maBorderTLBRControl(SID_ATTR_BORDER_DIAG_TLBR, *pBindings, *this),
     maBorderBLTRControl(SID_ATTR_BORDER_DIAG_BLTR, *pBindings, *this),
 
@@ -359,8 +359,8 @@ IMPL_LINK(CellAppearancePropertyPanel, TbxLineStyleSelectHdl, ToolBox*, pToolBox
 IMPL_LINK(CellAppearancePropertyPanel, CBOXGridShowClkHdl, void*, EMPTYARG)
 {
     bool bState = mpCBXShowGrid->IsChecked();
-    SfxBoolItem aItem( SID_SCGRIDSHOW , bState);
-    GetBindings()->GetDispatcher()->Execute(SID_SCGRIDSHOW, SFX_CALLMODE_RECORD, &aItem, 0L);
+    SfxBoolItem aItem( FID_TAB_TOGGLE_GRID , bState);
+    GetBindings()->GetDispatcher()->Execute(FID_TAB_TOGGLE_GRID, SFX_CALLMODE_RECORD, &aItem, 0L);
     return 0;
 }
 
@@ -671,7 +671,7 @@ void CellAppearancePropertyPanel::NotifyItemUpdate(
         mbBLTR = false;
         UpdateControlState();
         break;
-    case SID_SCGRIDSHOW:
+    case FID_TAB_TOGGLE_GRID:
         if(eState >= SFX_ITEM_DEFAULT)
         {
             const SfxBoolItem* pItem = dynamic_cast< const SfxBoolItem* >(pState);
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index a8c30d9..9d9d9b3 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2788,52 +2788,4 @@ short ScFormatShell::GetCurrentNumberFormatType()
     return nType;
 }
 
-void  ScFormatShell::ExecViewOptions( SfxRequest& rReq )
-{
-    ScTabViewShell* pTabViewShell       = GetViewData()->GetViewShell();
-    SfxBindings&        rBindings = pViewData->GetBindings();
-    const SfxItemSet*   pNewAttrs = rReq.GetArgs();
-
-    if ( pNewAttrs )
-    {
-        sal_uInt16 nSlot = rReq.GetSlot();
-
-        if( nSlot  == SID_SCGRIDSHOW)
-        {
-
-            ScViewData*             pLclViewData = pTabViewShell->GetViewData();
-            const ScViewOptions&    rOldOpt = pLclViewData->GetOptions();
-            ScDocShell*             pDocSh  = PTR_CAST(ScDocShell, SfxObjectShell::Current());
-            bool bState =   ((const SfxBoolItem &)pNewAttrs->Get( pNewAttrs->GetPool()->GetWhich( nSlot ) )).GetValue();
-
-            if ( (bool)rOldOpt.GetOption( VOPT_GRID ) !=  bState)
-            {
-                ScViewOptions rNewOpt(rOldOpt);
-                rNewOpt.SetOption( VOPT_GRID,  bState);
-                pLclViewData->SetOptions( rNewOpt );
-                pLclViewData->GetDocument()->SetViewOptions( rNewOpt );
-                pDocSh->SetDocumentModified();
-                //add , write the change to sc view config
-                ScModule*           pScMod      = SC_MOD();
-                pScMod->SetViewOptions( rNewOpt );
-                //add end
-                rBindings.Invalidate( nSlot );
-            }
-        }
-    }
-
-}
-
-void  ScFormatShell::GetViewOptions( SfxItemSet& rSet )
-{
-    ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
-    if( pTabViewShell )
-    {
-        ScViewOptions   aViewOpt = pTabViewShell->GetViewData()->GetOptions();
-        rSet.ClearItem(SID_SCGRIDSHOW);
-        SfxBoolItem aItem( SID_SCGRIDSHOW, aViewOpt.GetOption( VOPT_GRID ) );
-        rSet.Put(aItem);
-    }
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 3f1578b..255dfb9 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -242,7 +242,6 @@ void ScTabView::InvalidateAttribs()
         rBindings.Invalidate( SID_FRAME_LINESTYLE );
         rBindings.Invalidate( SID_ATTR_BORDER_OUTER );
         rBindings.Invalidate( SID_ATTR_BORDER_INNER );
-        rBindings.Invalidate( SID_SCGRIDSHOW );
         rBindings.Invalidate( SID_ATTR_BORDER_DIAG_TLBR );
         rBindings.Invalidate( SID_ATTR_BORDER_DIAG_BLTR );
         rBindings.Invalidate( SID_NUMBER_TYPE_FORMAT );


More information about the Libreoffice-commits mailing list