diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/strings.hrc | 1 | ||||
-rw-r--r-- | sw/inc/viewsh.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentSettingManager.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 11 | ||||
-rw-r--r-- | sw/source/ui/config/optcomp.cxx | 6 |
5 files changed, 21 insertions, 0 deletions
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index a0d04e35ba29..6a36f4740926 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -1492,6 +1492,7 @@ #define STR_COMPAT_OPT_NOGAPAFTERNOTENUMBER NC_("STR_COMPAT_OPT_NOGAPAFTERNOTENUMBER", "Do not add an extra space after number in footnotes / endnotes with hanging first line") #define STR_COMPAT_OPT_TABSRELATIVETOINDENT NC_("STR_COMPAT_OPT_TABSRELATIVETOINDENT", "Set tabstops relative to indent of paragraph") #define STR_COMPAT_OPT_TABOVERMARGIN NC_("STR_COMPAT_OPT_TABOVERMARGIN", "Allow tabs to extend beyond the right margin") +#define STR_COMPAT_OPT_DO_NOT_MIRROR_RTL_DRAW_OBJS NC_("DO_NOT_MIRROR_RTL_DRAW_OBJS", "Do not mirror drawing objects anchored in paragraphs with an RTL writing direction") #define STR_TABLE_PANEL_ALIGN_AUTO NC_("sidebartableedit|alignautolabel", "Automatic") #define STR_TABLE_PANEL_ALIGN_LEFT NC_("sidebartableedit|alignleftlabel", "Left") diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 9417702f5b86..18d33266b627 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -451,6 +451,8 @@ public: SW_DLLPUBLIC void SetTabOverMargin(bool bNew); + SW_DLLPUBLIC void SetDoNotMirrorRtlDrawObjs(bool bDoNotMirrorRtlDrawObjs); + // DOCUMENT COMPATIBILITY FLAGS END // Calls Idle-formatter of Layout. diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx index 55b625932efb..501344ca8108 100644 --- a/sw/source/core/doc/DocumentSettingManager.cxx +++ b/sw/source/core/doc/DocumentSettingManager.cxx @@ -139,6 +139,7 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc) mbNoGapAfterNoteNumber = aOptions.get(u"NoGapAfterNoteNumber"_ustr); mbTabRelativeToIndent = aOptions.get(u"TabsRelativeToIndent"_ustr); mbTabOverMargin = aOptions.get(u"TabOverMargin"_ustr); + mbDoNotMirrorRtlDrawObjs = aOptions.get(u"DoNotMirrorRtlDrawObjs"_ustr); } else { diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 5ec658a9cd14..f20eb694e8f4 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1083,6 +1083,17 @@ void SwViewShell::SetTabOverMargin(bool bNew) } } +void SwViewShell::SetDoNotMirrorRtlDrawObjs(bool bDoNotMirrorRtlDrawObjs) +{ + IDocumentSettingAccess& rIDSA = getIDocumentSettingAccess(); + if (rIDSA.get(DocumentSettingId::DO_NOT_MIRROR_RTL_DRAW_OBJS) != bDoNotMirrorRtlDrawObjs) + { + SwWait aWait(*GetDoc()->GetDocShell(), true); + rIDSA.set(DocumentSettingId::DO_NOT_MIRROR_RTL_DRAW_OBJS, bDoNotMirrorRtlDrawObjs); + lcl_InvalidateAllObjPos(*this); + } +} + void SwViewShell::Reformat() { SwWait aWait( *GetDoc()->GetDocShell(), true ); diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index 9ed4c850bd4d..9d60a786ce8b 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -62,6 +62,7 @@ constexpr std::pair<OUString, TranslateId> options_list[]{ { u"NoGapAfterNoteNumber"_ustr, STR_COMPAT_OPT_NOGAPAFTERNOTENUMBER }, { u"TabsRelativeToIndent"_ustr, STR_COMPAT_OPT_TABSRELATIVETOINDENT }, { u"TabOverMargin"_ustr, STR_COMPAT_OPT_TABOVERMARGIN }, + { u"DoNotMirrorRtlDrawObjs"_ustr, STR_COMPAT_OPT_DO_NOT_MIRROR_RTL_DRAW_OBJS }, }; // DocumentSettingId, negate? @@ -86,6 +87,7 @@ std::pair<DocumentSettingId, bool> DocumentSettingForOption(const OUString& opti { u"NoGapAfterNoteNumber"_ustr, { DocumentSettingId::NO_GAP_AFTER_NOTE_NUMBER, false } }, { u"TabsRelativeToIndent"_ustr, { DocumentSettingId::TABS_RELATIVE_TO_INDENT, false } }, { u"TabOverMargin"_ustr, { DocumentSettingId::TAB_OVER_MARGIN, false } }, + { u"DoNotMirrorRtlDrawObjs"_ustr, { DocumentSettingId::DO_NOT_MIRROR_RTL_DRAW_OBJS, false } }, // { u"AddTableLineSpacing"_ustr, { DocumentSettingId::ADD_PARA_LINE_SPACING_TO_TABLE_CELLS, false } }, }; return map.at(option); @@ -318,6 +320,10 @@ bool SwCompatibilityOptPage::FillItemSet( SfxItemSet* ) m_pWrtShell->SetTabOverMargin(bChecked); break; + case DocumentSettingId::DO_NOT_MIRROR_RTL_DRAW_OBJS: + m_pWrtShell->SetDoNotMirrorRtlDrawObjs(bChecked); + break; + default: break; } |