summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/classificationhelper.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx
index 3ff9047db16a..f6bb6da7eb4c 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -10,6 +10,7 @@
#include <sfx2/classificationhelper.hxx>
#include <map>
+#include <algorithm>
#include <com/sun/star/beans/XPropertyContainer.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
@@ -493,6 +494,19 @@ OUString SfxClassificationHelper::GetDocumentWatermark()
return OUString();
}
+std::vector<OUString> SfxClassificationHelper::GetBACNames()
+{
+ if (m_pImpl->m_aCategories.empty())
+ m_pImpl->parsePolicy();
+
+ std::vector<OUString> aRet;
+ std::transform(m_pImpl->m_aCategories.begin(), m_pImpl->m_aCategories.end(), std::back_inserter(aRet), [](const std::pair<OUString, SfxClassificationCategory>& rPair)
+ {
+ return rPair.first;
+ });
+ return aRet;
+}
+
void SfxClassificationHelper::SetBACName(const OUString& rName)
{
if (m_pImpl->m_aCategories.empty())