[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 16 10:35:14 UTC 2018


 sw/source/uibase/sidebar/PageFormatPanel.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 577e16a03f689ac906cbe68e8528b422ecccf99b
Author:     Ilhan Yesil <ilhanyesil at gmx.de>
AuthorDate: Thu Aug 30 09:21:36 2018 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Oct 16 12:34:41 2018 +0200

    tdf#113848 Sidebar: Get user-defined sizes while changing orientation
    
    If the orientation of the page is changed, the user
    defined page sizes are now accessed directly to swap the sizes
    correctly.
    
    Change-Id: I91d256d35dcd910a8c3151a3f9e669413c9a57db
    Reviewed-on: https://gerrit.libreoffice.org/59577
    Tested-by: Jenkins
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    (cherry picked from commit 32bf352c61754fe5ef39e0794b5d6dc71be99194)
    Reviewed-on: https://gerrit.libreoffice.org/61667
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx b/sw/source/uibase/sidebar/PageFormatPanel.cxx
index 82c182dd8a36..3c0dbeaeebe1 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx
@@ -215,9 +215,14 @@ void PageFormatPanel::NotifyItemUpdate(
 IMPL_LINK_NOARG(PageFormatPanel, PaperFormatModifyHdl, ListBox&, void)
 {
     Paper ePaper = mpPaperSizeBox->GetSelection();
-    Size  aSize(SvxPaperInfo::GetPaperSize(ePaper, meUnit));
+    Size  aSize;
 
-    if(mpPaperOrientation->GetSelectedEntryPos() == 1)
+    if(ePaper!=PAPER_USER)
+       aSize = SvxPaperInfo::GetPaperSize(ePaper, meUnit);
+    else
+       aSize = Size(GetCoreValue( *mpPaperWidth, meUnit ), GetCoreValue( *mpPaperHeight, meUnit));
+
+    if(mpPaperOrientation->GetSelectedEntryPos() == 1 || ePaper==PAPER_USER)
         Swap(aSize);
 
     mpPageItem->SetLandscape(mpPaperOrientation->GetSelectedEntryPos() == 1);


More information about the Libreoffice-commits mailing list