summaryrefslogtreecommitdiff
path: root/include/sfx2
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2017-11-06 16:55:15 +0900
committerTomaž Vajngerl <quikee@gmail.com>2017-11-06 11:46:55 +0100
commitfe2e279c0817827ba61c37735dfd098bfe3337fe (patch)
tree0664303c2cab146ce3b96f33cd268e115fc5851b /include/sfx2
parenta2577767623e4250cc72701ff4075d27aaf4291f (diff)
TSCP: need to enumerate the marker and IPPart properties too
Change-Id: Ibc8643667c3ae352107a93dcce2be02b1a9af06f Reviewed-on: https://gerrit.libreoffice.org/44344 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/sfx2')
-rw-r--r--include/sfx2/classificationhelper.hxx22
1 files changed, 18 insertions, 4 deletions
diff --git a/include/sfx2/classificationhelper.hxx b/include/sfx2/classificationhelper.hxx
index 0ea432ffbe99..c5c6294d603b 100644
--- a/include/sfx2/classificationhelper.hxx
+++ b/include/sfx2/classificationhelper.hxx
@@ -116,6 +116,8 @@ private:
const SfxClassificationPolicyType m_ePolicyType;
const OUString m_sPolicy;
sal_Int32 m_nTextNumber;
+ sal_Int32 m_nIPPartNumber;
+ sal_Int32 m_nMarkingNumber;
OUString getPolicyKey() const
{
@@ -126,21 +128,23 @@ public:
: m_ePolicyType(ePolicyType)
, m_sPolicy(SfxClassificationHelper::policyTypeToString(m_ePolicyType))
, m_nTextNumber(1)
+ , m_nIPPartNumber(1)
+ , m_nMarkingNumber(1)
{}
- OUString makeMarkingTextKey() const
+ OUString makeTextKey() const
{
return getPolicyKey() + "Marking:Text";
}
- OUString makeNumberedMarkingTextKey()
+ OUString makeNumberedTextKey()
{
- return makeMarkingTextKey() + ":" + OUString::number(m_nTextNumber++);
+ return makeTextKey() + ":" + OUString::number(m_nTextNumber++);
}
bool isMarkingTextKey(OUString const & aKey) const
{
- return aKey.startsWith(makeMarkingTextKey());
+ return aKey.startsWith(makeTextKey());
}
OUString makeCategoryNameKey() const
@@ -168,6 +172,11 @@ public:
return getPolicyKey() + "Extension:Marking";
}
+ OUString makeNumberedMarkingKey()
+ {
+ return makeMarkingKey() + ":" + OUString::number(m_nMarkingNumber++);
+ }
+
bool isMarkingKey(OUString const & aKey) const
{
return aKey.startsWith(makeMarkingKey());
@@ -178,6 +187,11 @@ public:
return getPolicyKey() + "Extension:IntellectualPropertyPart";
}
+ OUString makeNumberedIntellectualPropertyPartKey()
+ {
+ return makeIntellectualPropertyPartKey() + ":" + OUString::number(m_nIPPartNumber++);
+ }
+
bool isIntellectualPropertyPartKey(OUString const & aKey) const
{
return aKey.startsWith(makeIntellectualPropertyPartKey());