diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-29 14:57:45 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-29 17:19:49 +0100 |
commit | 78f2b0b364930493085f4ee9bafb90c2536d6ae6 (patch) | |
tree | 28188bc85b553d67c805cabed241c73cc36692ed /sfx2 | |
parent | 98f7e70aeb5c445a04a45cebce7553cb23d57e65 (diff) |
sfx2 classification: set initial listbox state based on doc model
This way the listbox selections shows the state of the document model,
instead of showing an empty selection by default, as it is for empty,
non-classified documents.
Change-Id: Ibda0565e3ca9ec6611d8e256a78747437b52c42a
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/classificationcontroller.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sfx2/source/view/classificationcontroller.cxx b/sfx2/source/view/classificationcontroller.cxx index 0e861a10b21b..737eefd351af 100644 --- a/sfx2/source/view/classificationcontroller.cxx +++ b/sfx2/source/view/classificationcontroller.cxx @@ -134,6 +134,11 @@ void ClassificationCategoriesController::statusChanged(const frame::FeatureState // Normally VclBuilder::makeObject() does this. m_pCategories->EnableAutoSize(true); m_pCategories->SetSizePixel(m_pCategories->GetOptimalSize()); + + // Restore state based on the doc. model. + const OUString& rCategoryName = aHelper.GetBACName(); + if (!rCategoryName.isEmpty()) + m_pCategories->SelectEntry(rCategoryName); } } // namespace sfx2 |