[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - officecfg/registry sc/inc sc/sdi sc/source
Maxim Monastirsky
momonasmon at gmail.com
Fri Mar 7 13:39:08 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 | 26 -----
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(+), 93 deletions(-)
New commits:
commit cb2a2813f8fdcb3c888c203a72370883df178c60
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).
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>
(cherry picked from commit c3403ac888c2e62edaf8befe7982f5f8cc95c16f)
Conflicts:
sc/sdi/scalc.sdi
sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
Change-Id: I90bdfaef86adcbfa44129b8f7f9df61ca7f35114
Reviewed-on: https://gerrit.libreoffice.org/8463
Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
Tested-by: Kohei Yoshida <libreoffice at kohei.us>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index f397ed9..c204e5e 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -809,11 +809,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 a717395..4c72f1c 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -676,8 +676,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 6938133..48557e0 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 ec4fbc1..f4bba08 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -8776,32 +8776,6 @@ SfxVoidItem ExportAsGraphic SID_EXPORT_AS_GRAPHIC
GroupId = GID_CHART;
]
-//--------------------------------------------------------------------------
-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 1f8b872..4386a2a 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -179,8 +179,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 7dcbc9f..309da2c 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1112,7 +1112,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 34b823b..1c1c85d 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -160,7 +160,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),
@@ -358,8 +358,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, false, 0L);
+ SfxBoolItem aItem(FID_TAB_TOGGLE_GRID, bState);
+ GetBindings()->GetDispatcher()->Execute(FID_TAB_TOGGLE_GRID, SFX_CALLMODE_RECORD, &aItem, false, 0L);
return 0;
}
@@ -670,7 +670,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 fdc054b..3ddb49a 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2786,52 +2786,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 5c6784f..92aaadc 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