summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-05-18 09:16:30 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-05-18 08:52:27 +0000
commitff42ad90bae398285eb630c34be230a4f0619d68 (patch)
tree0fe566cc0e1234a554c0678b38a224b1ca60a357 /sd
parent433cb02f88c75428fe5a34ca090fd43ae1cc855d (diff)
sfx2 classification: add Type parameter to the UNO command
So that sc/sd/sw doesn't have to hardcode SfxClassificationPolicyType::IntellectualProperty. Change-Id: Ib7c2376622ecaa8c7fc8401cec2ba16d12b8b8d2 Reviewed-on: https://gerrit.libreoffice.org/25078 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews2.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index d3bf56761e22..40606950f007 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1151,12 +1151,18 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (pArgs && pArgs->GetItemState(nSId, false, &pItem) == SfxItemState::SET)
{
const OUString& rName = static_cast<const SfxStringItem*>(pItem)->GetValue();
+ auto eType = SfxClassificationPolicyType::IntellectualProperty;
+ if (pArgs->GetItemState(SID_TYPE_NAME, false, &pItem) == SfxItemState::SET)
+ {
+ const OUString& rType = static_cast<const SfxStringItem*>(pItem)->GetValue();
+ eType = SfxClassificationHelper::stringToPolicyType(rType);
+ }
if (SfxViewFrame* pViewFrame = GetViewFrame())
{
if (SfxObjectShell* pObjectShell = pViewFrame->GetObjectShell())
{
SfxClassificationHelper aHelper(pObjectShell->getDocProperties());
- aHelper.SetBACName(rName, SfxClassificationPolicyType::IntellectualProperty);
+ aHelper.SetBACName(rName, eType);
}
}
}