diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-05-04 13:32:51 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-05-10 10:01:17 +0200 |
commit | 44784c7428503a5a6588ce23b52fe62404cc2f51 (patch) | |
tree | a4758a32c5024185a6cd58ba106c938742bd8c13 /svx | |
parent | 410d1ff92edaa0cf544ee79e77711c1eb2283b22 (diff) |
Fix style previews widget with multiple languages
Broadcast also universal name (English identifier) for styles
on change. This allows to select correct style without knowledge
about all languages that other users use in other views.
Fixes style previews widget in online with multiple sessions in
different languages
Change-Id: I9b9bcc92d96b5a5482a97a5947f148a638f257d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115093
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115300
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/StylesPreviewWindow.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx index a4b937eb6790..b557aade7ce3 100644 --- a/svx/source/tbxctrls/StylesPreviewWindow.cxx +++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx @@ -71,7 +71,12 @@ void StyleStatusListener::StateChanged(SfxItemState /*eState*/, const SfxPoolIte { const SfxTemplateItem* pStateItem = dynamic_cast<const SfxTemplateItem*>(pState); if (pStateItem) - m_pPreviewControl->Select(pStateItem->GetStyleName()); + { + if (pStateItem->GetStyleIdentifier().isEmpty()) + m_pPreviewControl->Select(pStateItem->GetStyleName()); + else + m_pPreviewControl->Select(pStateItem->GetStyleIdentifier()); + } } StylePoolChangeListener::StylePoolChangeListener(StylesPreviewWindow_Base* pPreviewControl) |