summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2017-11-16 18:32:14 +0900
committerTomaž Vajngerl <quikee@gmail.com>2017-11-17 04:52:53 +0100
commit5fd90dcf5b12af4bf8ca21866b23209aa4d3d531 (patch)
tree132eb88ef7664b655b556944fcea694f2dbddb97 /sfx2
parent35107521b799232bcba1e8d0ccad6005012d56dc (diff)
TSCP: resolve identifier to name, abbr. name is for category only
In paragraph classification we store only the identifier and not the name, but for the ClassificationDialog we use the name as an identifier, so we need to resovle the identifier to the name when reading in the input classification results. It might make sense to switch to identifiers in the dialog also as they are language independent. Abbreviated name is only for the classification category and has no effect for other classefication elementslike markers and IP parts, so always fill them with the full name directly. Change-Id: I23bd0e8e92b16807a5b4d3162e503b799aa40718 Reviewed-on: https://gerrit.libreoffice.org/44845 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/classificationhelper.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx
index 82287da47171..a1e4aea55324 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -614,6 +614,21 @@ const OUString& SfxClassificationHelper::GetAbbreviatedBACName(const OUString& s
return sFullName;
}
+OUString SfxClassificationHelper::GetBACNameForIdentifier(const OUString& sIdentifier)
+{
+ OUString aRet;
+ if (sIdentifier.isEmpty())
+ return aRet;
+
+ for (const auto& category : m_pImpl->m_aCategories)
+ {
+ if (category.m_aIdentifier == sIdentifier)
+ return category.m_aName;
+ }
+
+ return aRet;
+}
+
OUString SfxClassificationHelper::GetHigherClass(const OUString& first, const OUString& second)
{
size_t nFirstConfidentiality = 0;