summaryrefslogtreecommitdiff
path: root/sfx2/source/view/classificationhelper.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-02-23 12:26:11 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-02-23 14:01:15 +0100
commit0926adba5557eab2114a57c30d92c977d334f57a (patch)
tree5418dab8542f32432148b010d3e0276814c37d8e /sfx2/source/view/classificationhelper.cxx
parent24d6ac273bc272dd19f795919df643388e974be2 (diff)
sfx2 classification result: copy category labels to document labels
Still need to push them back to the user-defined document property map, though. Change-Id: Ic6f48ce30af42e975cd69b2a9cc7fad01702c1dc
Diffstat (limited to 'sfx2/source/view/classificationhelper.cxx')
-rw-r--r--sfx2/source/view/classificationhelper.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx
index 55b1efaececf..58e17c6935a8 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -431,10 +431,19 @@ OUString SfxClassificationHelper::GetDocumentWatermark()
return OUString();
}
-void SfxClassificationHelper::SetBACName(const OUString& /*rName*/)
+void SfxClassificationHelper::SetBACName(const OUString& rName)
{
if (m_pImpl->m_aCategories.empty())
m_pImpl->parsePolicy();
+
+ std::map<OUString, SfxClassificationCategory>::iterator it = m_pImpl->m_aCategories.find(rName);
+ if (it == m_pImpl->m_aCategories.end())
+ {
+ SAL_WARN("sfx.view", "'" << rName << "' is not a recognized category name");
+ return;
+ }
+
+ m_pImpl->m_aLabels = it->second.m_aLabels;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */