sw/source/uibase/sidebar/PageFormatPanel.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
New commits: commit 32bf352c61754fe5ef39e0794b5d6dc71be99194 Author: Ilhan Yesil <ilhanye...@gmx.de> AuthorDate: Thu Aug 30 09:21:36 2018 +0200 Commit: Katarina Behrens <katarina.behr...@cib.de> CommitDate: Thu Aug 30 12:38:33 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.behr...@cib.de> 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits