diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-25 16:22:34 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-25 17:21:53 +0100 |
commit | f66ac468c63dc770f0b70f305187930a03c38f84 (patch) | |
tree | c982e96082d63afb0d3600a4ae5f507894ea437d | |
parent | edc4634119485efd3af87a48a7b419716e1bd406 (diff) |
sfx ClassificationCategoriesController: read category names from policy
Change-Id: Ia50d5b958d15af3c8959d7fb4ef4d502c1356044
-rw-r--r-- | sfx2/source/view/classificationcontroller.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sfx2/source/view/classificationcontroller.cxx b/sfx2/source/view/classificationcontroller.cxx index acdc9bf5073e..de9bd3cee0eb 100644 --- a/sfx2/source/view/classificationcontroller.cxx +++ b/sfx2/source/view/classificationcontroller.cxx @@ -106,7 +106,17 @@ uno::Reference<awt::XWindow> ClassificationCategoriesController::createItemWindo void ClassificationCategoriesController::statusChanged(const frame::FeatureStateEvent& /*rEvent*/) throw (uno::RuntimeException, std::exception) { - return; + if (!m_pCategories || m_pCategories->GetEntryCount() > 0) + return; + + SfxObjectShell* pObjectShell = SfxObjectShell::Current(); + if (!pObjectShell) + return; + + SfxClassificationHelper aHelper(*pObjectShell); + std::vector<OUString> aNames = aHelper.GetBACNames(); + for (const OUString& rName : aNames) + m_pCategories->InsertEntry(rName); } } // namespace sfx2 |