summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheiko tietze <tietze.heiko@gmail.com>2017-11-17 13:23:08 +0100
committerHeiko Tietze <tietze.heiko@googlemail.com>2017-11-17 23:17:18 +0100
commit637d96a25926e299fff5b4cf5a0055b1d171b23b (patch)
treec1706855c84353ff1c9fcca3d2237f119616e078
parent6e6e5cd3b6320de24953f275281780ff25f17110 (diff)
tdf#106890 Page orientation of User page size
Radio buttons are adjusted when width/height is modified Change-Id: Ia660a25314a46f2bb04b248a4fef937f10c4941d Reviewed-on: https://gerrit.libreoffice.org/44876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Yousuf Philips <philipz85@hotmail.com> Tested-by: Yousuf Philips <philipz85@hotmail.com> Reviewed-by: Heiko Tietze <tietze.heiko@googlemail.com>
-rw-r--r--cui/source/tabpages/page.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index bc83dcfc3f57..f1de9a5e2185 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -996,8 +996,19 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperSizeModify_Impl, Edit&, void)
MapUnit eUnit = GetItemSet().GetPool()->GetMetric( nWhich );
Size aSize( GetCoreValue( *m_pPaperWidthEdit, eUnit ),
GetCoreValue( *m_pPaperHeightEdit, eUnit ) );
- Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, eUnit );
+ if ( aSize.Width() > aSize.Height() )
+ {
+ m_pLandscapeBtn->Check(true);
+ bLandscape = true;
+ }
+ else
+ {
+ m_pPortraitBtn->Check(true);
+ bLandscape = false;
+ }
+
+ Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, eUnit );
m_pPaperSizeBox->SetSelection( ePaper );
UpdateExample_Impl( true );
}