cui/source/tabpages/page.cxx |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 637d96a25926e299fff5b4cf5a0055b1d171b23b
Author: heiko tietze <tietze.he...@gmail.com>
Date:   Fri Nov 17 13:23:08 2017 +0100

    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 <c...@libreoffice.org>
    Reviewed-by: Yousuf Philips <philip...@hotmail.com>
    Tested-by: Yousuf Philips <philip...@hotmail.com>
    Reviewed-by: Heiko Tietze <tietze.he...@googlemail.com>

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 );
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to