diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-03 12:18:59 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-03 13:40:14 +0100 |
commit | e4fe540aa4f77a4d76e4c6042d5790211aebc450 (patch) | |
tree | 606e0ac16dccae322aa15dbb6b2c701ca1acba0e | |
parent | a56ba98ec5e287f872d957493f9e81ee27a24c00 (diff) |
sc: add classification toolbar
Again this is just UI to call into sfx2, where the functionality is
shared with Writer and Impress.
Change-Id: I73ce6fb54d50c23df19ed2c610766b7c515e94d6
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu | 17 | ||||
-rw-r--r-- | sc/UIConfig_scalc.mk | 1 | ||||
-rw-r--r-- | sc/sdi/formatsh.sdi | 1 | ||||
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 13 | ||||
-rw-r--r-- | sc/uiconfig/scalc/toolbar/classificationbar.xml | 12 |
5 files changed, 44 insertions, 0 deletions
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 @@ <value>true</value> </prop> </node> + <node oor:name="private:resource/toolbar/classificationbar" oor:op="replace"> + <prop oor:name="DockPos" oor:type="xs:string"> + <value>0,3</value> + </prop> + <prop oor:name="DockingArea" oor:type="xs:int"> + <value>0</value> + </prop> + <prop oor:name="Docked" oor:type="xs:boolean"> + <value>true</value> + </prop> + <prop oor:name="Visible" oor:type="xs:boolean"> + <value>false</value> + </prop> + <prop oor:name="UIName" oor:type="xs:string"> + <value xml:lang="en-US">Classification</value> + </prop> + </node> <node oor:name="private:resource/toolbar/graphicobjectbar" oor:op="replace"> <prop oor:name="DockPos" oor:type="xs:string"> <value>0,2</value> 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 <editeng/fontitem.hxx> +#include <sfx2/classificationhelper.hxx> #include <memory> @@ -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<const SfxStringItem*>(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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. +--> +<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar"> + <toolbar:toolbaritem xlink:href=".uno:ClassificationApply"/> +</toolbar:toolbar> |