summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/ui/index/cnttab.cxx2
-rw-r--r--sw/source/uibase/inc/unotools.hxx5
-rw-r--r--sw/source/uibase/utlui/unotools.cxx2
3 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 3fc5120696ed..1531ad09e987 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -432,7 +432,7 @@ IMPL_LINK_NOARG(SwMultiTOXTabDialog, ShowPreviewHdl, weld::ToggleButton&, void)
else
{
Link<SwOneExampleFrame&,void> aLink(LINK(this, SwMultiTOXTabDialog, CreateExample_Hdl));
- m_xExampleFrame.reset(new SwOneExampleFrame(EX_SHOW_ONLINE_LAYOUT, &aLink, &sTemplate));
+ m_xExampleFrame.reset(new SwOneExampleFrame(EX_SHOW_ONLINE_LAYOUT | EX_LOCALIZE_TOC_STRINGS, &aLink, &sTemplate));
m_xExampleFrameWin.reset(new weld::CustomWeld(*m_xBuilder, "example", *m_xExampleFrame));
}
m_xShowExampleCB->set_visible(m_xExampleFrame != nullptr);
diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx
index 1c6c3708d433..4e72a5309920 100644
--- a/sw/source/uibase/inc/unotools.hxx
+++ b/sw/source/uibase/inc/unotools.hxx
@@ -26,12 +26,13 @@
#include <com/sun/star/text/XTextCursor.hpp>
#include <swdllapi.h>
-#define EX_SHOW_ONLINE_LAYOUT 0x001
-
+#define EX_SHOW_ONLINE_LAYOUT 0x01
// hard zoom value
#define EX_SHOW_BUSINESS_CARDS 0x02
//don't modify page size
#define EX_SHOW_DEFAULT_PAGE 0x04
+//replace sample toc strings in the template to localized versions
+#define EX_LOCALIZE_TOC_STRINGS 0x08
class SwView;
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index dd4470b0667f..fbad314f1309 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -294,7 +294,7 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer, void )
auto pCursor = comphelper::getUnoTunnelImplementation<OTextCursorHelper>(m_xCursor);
SwDoc *pDoc = pCursor ? pCursor->GetDoc() : nullptr;
- if (pDoc)
+ if (pDoc && (m_nStyleFlags & EX_LOCALIZE_TOC_STRINGS))
{
SwEditShell* pSh = pDoc->GetEditShell();