summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-02-24 09:29:51 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-02-24 13:45:46 +0100
commitd599122730a84be29b2649b66a582d2269c4ed2b (patch)
tree9003fc7126e6ae41688ca14514f11c541749525b
parentb8ee342576b707dbffe877f5c225b640ee65276d (diff)
sfx2 classification: expose document header presence
Change-Id: Ic69af56982a89356571f0016164b60e22ab94cf8
-rw-r--r--include/sfx2/classificationhelper.hxx5
-rw-r--r--sfx2/source/view/classificationhelper.cxx15
2 files changed, 20 insertions, 0 deletions
diff --git a/include/sfx2/classificationhelper.hxx b/include/sfx2/classificationhelper.hxx
index c8892dc1a955..0e279c7e2f1c 100644
--- a/include/sfx2/classificationhelper.hxx
+++ b/include/sfx2/classificationhelper.hxx
@@ -41,7 +41,12 @@ public:
bool HasImpactLevel();
basegfx::BColor GetImpactLevelColor();
OUString GetDocumentWatermark();
+ /// The selected category has some content for the document header.
+ bool HasDocumentHeader();
void UpdateInfobar(SfxViewFrame& rViewFrame);
+
+ /// Brief text located at the top of each document's pages.
+ static const OUString& PROP_DOCHEADER();
};
#endif
diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx
index 705c15e5308e..5680e1a68338 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -416,6 +416,15 @@ bool SfxClassificationHelper::HasImpactLevel()
return true;
}
+bool SfxClassificationHelper::HasDocumentHeader()
+{
+ std::map<OUString, OUString>::iterator it = m_pImpl->m_aLabels.find("urn:bails:IntellectualProperty:Marking:document-header");
+ if (it == m_pImpl->m_aLabels.end() || it->second.isEmpty())
+ return false;
+
+ return true;
+}
+
basegfx::BColor SfxClassificationHelper::GetImpactLevelColor()
{
basegfx::BColor aRet;
@@ -512,4 +521,10 @@ void SfxClassificationHelper::UpdateInfobar(SfxViewFrame& rViewFrame)
}
}
+const OUString& SfxClassificationHelper::PROP_DOCHEADER()
+{
+ static OUString sProp("urn:bails:IntellectualProperty:Marking:document-header");
+ return sProp;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */