diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu index a89f8a59963c..4a8cbb7d888d 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu @@ -133,6 +133,23 @@ true + + + 0,3 + + + 0 + + + true + + + false + + + Classification + + 0,2 diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index 0594195090c6..74cb3751ecc6 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -50,6 +50,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/scalc,\ sc/uiconfig/scalc/toolbar/arrowshapes \ sc/uiconfig/scalc/toolbar/basicshapes \ sc/uiconfig/scalc/toolbar/calloutshapes \ + sc/uiconfig/scalc/toolbar/classificationbar \ sc/uiconfig/scalc/toolbar/colorbar \ sc/uiconfig/scalc/toolbar/datastreams \ sc/uiconfig/scalc/toolbar/drawbar \ diff --git a/sc/sdi/formatsh.sdi b/sc/sdi/formatsh.sdi index 2c90f60e9855..740e0024bdfd 100644 --- a/sc/sdi/formatsh.sdi +++ b/sc/sdi/formatsh.sdi @@ -56,6 +56,7 @@ interface FormatForSelection SID_STYLE_SHOW [ ExecMethod = ExecuteStyle; StateMethod = GetStyleState; ] SID_STYLE_PREVIEW [ ExecMethod = ExecuteStyle; ] SID_STYLE_END_PREVIEW [ ExecMethod = ExecuteStyle; ] + SID_CLASSIFICATION_APPLY [ ExecMethod = ExecuteStyle; ] // } Slot's die in der DrawShell disabled werden. SID_ATTR_ALIGN_HOR_JUSTIFY [ ExecMethod = ExecuteAlignment; StateMethod = GetAttrState; ] diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index c7d409757c8e..8d7440bb4ae9 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -81,6 +81,7 @@ #include "scabstdlg.hxx" #include +#include #include @@ -967,6 +968,18 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) if ( bListAction ) pDocSh->GetUndoManager()->LeaveListAction(); } + else if (nSlotId == SID_CLASSIFICATION_APPLY) + { + const SfxPoolItem* pItem = 0; + if (pArgs && pArgs->GetItemState(nSlotId, false, &pItem) == SfxItemState::SET) + { + const OUString& rName = static_cast(pItem)->GetValue(); + SfxClassificationHelper aHelper(*pDocSh); + aHelper.SetBACName(rName); + } + else + SAL_WARN("sc.ui", "missing parameter for SID_CLASSIFICATION_APPLY"); + } else { OSL_FAIL( "Unknown slot (ScViewShell::ExecuteStyle)" ); diff --git a/sc/uiconfig/scalc/toolbar/classificationbar.xml b/sc/uiconfig/scalc/toolbar/classificationbar.xml new file mode 100644 index 000000000000..3ee34071e040 --- /dev/null +++ b/sc/uiconfig/scalc/toolbar/classificationbar.xml @@ -0,0 +1,12 @@ + + + + + +