diff options
author | Ilhan Yesil <ilhanyesil@gmx.de> | 2018-08-30 09:21:36 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-08-30 12:38:33 +0200 |
commit | 32bf352c61754fe5ef39e0794b5d6dc71be99194 (patch) | |
tree | b80e80f452d367d2088ef2527d8ab9467b07f8d7 | |
parent | 897d64a5370770f526d7709f8b27096407f06e1c (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>
-rw-r--r-- | sw/source/uibase/sidebar/PageFormatPanel.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx b/sw/source/uibase/sidebar/PageFormatPanel.cxx index e0d6b385acd7..bda95ea0dd34 100644 --- a/sw/source/uibase/sidebar/PageFormatPanel.cxx +++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx @@ -216,9 +216,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); |