diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-03 11:05:07 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-03 13:40:14 +0100 |
commit | a56ba98ec5e287f872d957493f9e81ee27a24c00 (patch) | |
tree | d6a5c873f44c4c12b61ce5ed32420b1533d8c32d /sd | |
parent | 6e7e8af8ed2ee873a5c8a8b7b42fe3b99797be90 (diff) |
sd: add classification toolbar
This is really just a UI, all the functionality is already shared in
sfx2 with Writer.
Change-Id: Ide5697fe51d30f74490306a70164a3957a8a6429
Diffstat (limited to 'sd')
-rw-r--r-- | sd/UIConfig_simpress.mk | 1 | ||||
-rw-r--r-- | sd/sdi/_drvwsh.sdi | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 24 | ||||
-rw-r--r-- | sd/uiconfig/simpress/toolbar/classificationbar.xml | 12 |
4 files changed, 41 insertions, 0 deletions
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk index b880ca7bbe2d..531175a49a8c 100644 --- a/sd/UIConfig_simpress.mk +++ b/sd/UIConfig_simpress.mk @@ -58,6 +58,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/simpress,\ sd/uiconfig/simpress/toolbar/bezierobjectbar \ sd/uiconfig/simpress/toolbar/calloutshapes \ sd/uiconfig/simpress/toolbar/choosemodebar \ + sd/uiconfig/simpress/toolbar/classificationbar \ sd/uiconfig/simpress/toolbar/colorbar \ sd/uiconfig/simpress/toolbar/commentsbar \ sd/uiconfig/simpress/toolbar/commontaskbar \ diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index dee3df203924..c8b3d53166aa 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -2746,5 +2746,9 @@ interface DrawView ExecMethod = ExecGoToLastPage ; StateMethod = GetStateGoToLastPage ; ] + SID_CLASSIFICATION_APPLY + [ + ExecMethod = FuTemporary ; + ] } diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 3ee00b3bf899..bf7ecd0306fc 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -170,6 +170,7 @@ #include "undolayer.hxx" #include "unmodpg.hxx" #include <sfx2/sidebar/Sidebar.hxx> +#include <sfx2/classificationhelper.hxx> #include "ViewShellBase.hxx" #include <memory> @@ -1141,6 +1142,29 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) } break; #endif + case SID_CLASSIFICATION_APPLY: + { + const SfxItemSet* pArgs = rReq.GetArgs(); + const SfxPoolItem* pItem = 0; + if (pArgs && pArgs->GetItemState(nSId, false, &pItem) == SfxItemState::SET) + { + const OUString& rName = static_cast<const SfxStringItem*>(pItem)->GetValue(); + if (SfxViewFrame* pViewFrame = GetViewFrame()) + { + if (SfxObjectShell* pObjectShell = pViewFrame->GetObjectShell()) + { + SfxClassificationHelper aHelper(*pObjectShell); + aHelper.SetBACName(rName); + } + } + } + else + SAL_WARN("sd.ui", "missing parameter for SID_CLASSIFICATION_APPLY"); + + Cancel(); + rReq.Ignore(); + } + break; case SID_COPYOBJECTS: { diff --git a/sd/uiconfig/simpress/toolbar/classificationbar.xml b/sd/uiconfig/simpress/toolbar/classificationbar.xml new file mode 100644 index 000000000000..3ee34071e040 --- /dev/null +++ b/sd/uiconfig/simpress/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> |