summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorIlhan Yesil <ilhanyesil@gmx.de>2018-08-30 09:21:36 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-10-16 12:34:41 +0200
commit577e16a03f689ac906cbe68e8528b422ecccf99b (patch)
treef7ed0fb761d460b8735d0d6b20613157c4777187 /sw/source/uibase
parent2cf13c31c6aa262e4bb4b075597f3543ecd3c4a6 (diff)
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@cib.de> (cherry picked from commit 32bf352c61754fe5ef39e0794b5d6dc71be99194) Reviewed-on: https://gerrit.libreoffice.org/61667 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/sidebar/PageFormatPanel.cxx9
1 files changed, 7 insertions, 2 deletions
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);