summaryrefslogtreecommitdiff
path: root/sfx2
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 /sfx2
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 'sfx2')
-rw-r--r--sfx2/sdi/sfx.sdi2
-rw-r--r--sfx2/source/view/classificationhelper.cxx10
2 files changed, 11 insertions, 1 deletions
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index ee791052d446..2c80801384f2 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -4388,7 +4388,7 @@ SfxBoolItem StyleWatercanMode SID_STYLE_WATERCAN
]
SfxVoidItem ClassificationApply SID_CLASSIFICATION_APPLY
-(SfxStringItem Name SID_CLASSIFICATION_APPLY)
+(SfxStringItem Name SID_CLASSIFICATION_APPLY, SfxStringItem Type SID_TYPE_NAME)
[
AutoUpdate = FALSE,
FastCall = FALSE,
diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx
index bb6febe015c9..c8d2715f3d2a 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -745,6 +745,16 @@ void SfxClassificationHelper::UpdateInfobar(SfxViewFrame& rViewFrame)
}
}
+SfxClassificationPolicyType SfxClassificationHelper::stringToPolicyType(const OUString& rType)
+{
+ if (rType == PROP_PREFIX_EXPORTCONTROL())
+ return SfxClassificationPolicyType::ExportControl;
+ else if (rType == PROP_PREFIX_NATIONALSECURITY())
+ return SfxClassificationPolicyType::NationalSecurity;
+ else
+ return SfxClassificationPolicyType::IntellectualProperty;
+}
+
const OUString& SfxClassificationHelper::PROP_DOCHEADER()
{
static OUString sProp("Marking:document-header");