sfx2/source/view/classificationhelper.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
New commits: commit b0f964d3c32b276613b07b3cc0312ed94618169f Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Tue May 17 14:39:23 2016 +0200 sfx2 classification: make categories list independent from policy type This needs adding the policy type prefix in SfxClassificationHelper::SetBACName() (when selecting a category), not early in SfxClassificationHelper::Impl::parsePolicy(). Change-Id: Id2881ecf2fa2caad58be237e3563026ae270801f Reviewed-on: https://gerrit.libreoffice.org/25059 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Jenkins <c...@libreoffice.org> diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx index 0bc615f..f1e7212 100644 --- a/sfx2/source/view/classificationhelper.cxx +++ b/sfx2/source/view/classificationhelper.cxx @@ -359,15 +359,7 @@ void SfxClassificationHelper::Impl::parsePolicy() { SAL_WARN("sfx.view", "parsePolicy() failed: " << rException.Message); } - m_aCategories.clear(); - for (const SfxClassificationCategory& rCategory : xClassificationParser->m_aCategories) - { - SfxClassificationCategory aCategory; - aCategory.m_aName = rCategory.m_aName; - for (const auto& rLabel : rCategory.m_aLabels) - aCategory.m_aLabels[PROP_PREFIX_INTELLECTUALPROPERTY() + rLabel.first] = rLabel.second; - m_aCategories.push_back(aCategory); - } + m_aCategories = xClassificationParser->m_aCategories; } bool lcl_containsProperty(const uno::Sequence<beans::Property>& rProperties, const OUString& rName) @@ -692,7 +684,10 @@ void SfxClassificationHelper::SetBACName(const OUString& rName) return; } - m_pImpl->m_aCategory = *it; + m_pImpl->m_aCategory.m_aName = it->m_aName; + m_pImpl->m_aCategory.m_aLabels.clear(); + for (const auto& rLabel : it->m_aLabels) + m_pImpl->m_aCategory.m_aLabels[PROP_PREFIX_INTELLECTUALPROPERTY() + rLabel.first] = rLabel.second; m_pImpl->setStartValidity(); m_pImpl->pushToDocumentProperties(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits