summaryrefslogtreecommitdiff
path: root/sfx2/source/view/classificationhelper.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-02-24 16:45:01 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-02-24 17:58:55 +0100
commitbff9f2d469736d20261ba8ff488dd98452e3fe88 (patch)
treed6208b41889d7a81799c09b7cbe764347bc0879a /sfx2/source/view/classificationhelper.cxx
parentcc3d29dc412902ea8d6a85426ba72b77166a8c95 (diff)
sw classification: name watermark objects, so later it's possible to find them
Given that they are not fields, it's necessary to re-create them every time their textural content would change. Change-Id: I1276ef686b1b622dccaa8ac4996af8e4cb4de329
Diffstat (limited to 'sfx2/source/view/classificationhelper.cxx')
-rw-r--r--sfx2/source/view/classificationhelper.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx
index d2e123de68cf..3ff9047db16a 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -165,7 +165,7 @@ throw (xml::sax::SAXException, uno::RuntimeException, std::exception)
rCategory.m_aLabels["urn:bails:IntellectualProperty:Marking:general-distribution-statement:ext:4"].clear();
rCategory.m_aLabels[SfxClassificationHelper::PROP_DOCHEADER()].clear();
rCategory.m_aLabels[SfxClassificationHelper::PROP_DOCFOOTER()].clear();
- rCategory.m_aLabels["urn:bails:IntellectualProperty:Marking:document-watermark"].clear();
+ rCategory.m_aLabels[SfxClassificationHelper::PROP_DOCWATERMARK()].clear();
rCategory.m_aLabels["urn:bails:IntellectualProperty:Marking:email-first-line-of-text"].clear();
rCategory.m_aLabels["urn:bails:IntellectualProperty:Marking:email-last-line-of-text"].clear();
rCategory.m_aLabels["urn:bails:IntellectualProperty:Marking:email-subject-prefix"].clear();
@@ -239,7 +239,7 @@ void SAL_CALL SfxClassificationParser::endElement(const OUString& rName) throw (
else if (m_aIdentifier == "Document: Footer")
m_pCategory->m_aLabels[SfxClassificationHelper::PROP_DOCFOOTER()] = m_aValue;
else if (m_aIdentifier == "Document: Watermark")
- m_pCategory->m_aLabels["urn:bails:IntellectualProperty:Marking:document-watermark"] = m_aValue;
+ m_pCategory->m_aLabels[SfxClassificationHelper::PROP_DOCWATERMARK()] = m_aValue;
}
}
}
@@ -486,7 +486,7 @@ basegfx::BColor SfxClassificationHelper::GetImpactLevelColor()
OUString SfxClassificationHelper::GetDocumentWatermark()
{
- std::map<OUString, OUString>::iterator it = m_pImpl->m_aLabels.find("urn:bails:IntellectualProperty:Marking:document-watermark");
+ std::map<OUString, OUString>::iterator it = m_pImpl->m_aLabels.find(SfxClassificationHelper::PROP_DOCWATERMARK());
if (it != m_pImpl->m_aLabels.end())
return it->second;
@@ -542,4 +542,10 @@ const OUString& SfxClassificationHelper::PROP_DOCFOOTER()
return sProp;
}
+const OUString& SfxClassificationHelper::PROP_DOCWATERMARK()
+{
+ static OUString sProp("urn:bails:IntellectualProperty:Marking:document-watermark");
+ return sProp;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */