Kaydet (Commit) bff9f2d4 authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst cc3d29dc
......@@ -51,6 +51,8 @@ public:
static const OUString& PROP_DOCHEADER();
/// Brief text located at the bottom of each document's pages.
static const OUString& PROP_DOCFOOTER();
/// Brief text formatted as a watermark on each document's page.
static const OUString& PROP_DOCWATERMARK();
};
#endif
......
......@@ -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: */
......@@ -277,6 +277,9 @@ void SwEditShell::SetClassification(const OUString& rName)
else
it->Value <<= aPropertyValues;
xPropertySet->setPropertyValue("CustomShapeGeometry", uno::makeAny(comphelper::containerToSequence(aGeomPropVec)));
uno::Reference<container::XNamed> xNamed(xShape, uno::UNO_QUERY);
xNamed->setName(SfxClassificationHelper::PROP_DOCWATERMARK());
xLockable->removeActionLock();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment