sw/source/uibase/shells/textfld.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 511505f0ca11632be19b5923791c39d65c994673
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Thu Apr 27 09:32:41 2023 -0400
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Fri Apr 28 12:48:44 2023 +0200

    tdf#86630 sw page number wizard: mirror margins as well
    
    This is only done in a very specific situation,
    when no heading/footer is defined at all.
    If we turn on mirroring at this point,
    then be helpful and mirror the margins as well.
    
    By default, this is irrelevant because the margins are identical.
    
    It isn't necessary for page numbering,
    but I think it is a nice touch to add something
    that most people wouldn't find otherwise.
    If they really want mirrorred page numbers,
    then it is highly likely they also want mirrored margins.
    
    Helping out people is the whole point of wizards after all.
    
    Change-Id: I20cde65dc95ea3115951a4ea3a01534399f19f3d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151153
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>

diff --git a/sw/source/uibase/shells/textfld.cxx 
b/sw/source/uibase/shells/textfld.cxx
index eb21afce0482..2c0474cf4f6a 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -1057,6 +1057,12 @@ FIELD_INSERT:
 
                 SvxPageItem aPageItem(SID_ATTR_PAGE);
                 aPageItem.SetNumType(pDlg->GetPageNumberType());
+                // Might as well turn on margin mirroring too - if appropriate
+                if (!bHeaderAlreadyOn && !bFooterAlreadyOn && !bIsSinglePage
+                    && pDlg->GetMirrorOnEvenPages() && (rDesc.GetUseOn() & 
UseOnPage::All))
+                {
+                    aPageItem.SetPageUsage(SvxPageUsage::Mirror);
+                }
                 rSh.GetView().GetDispatcher().ExecuteList(SID_ATTR_PAGE,
                                                           SfxCallMode::API | 
SfxCallMode::SYNCHRON,
                                                           { &aPageItem });

Reply via email to