[Libreoffice-commits] core.git: cui/source

heiko tietze tietze.heiko at gmail.com
Fri Nov 17 22:17:39 UTC 2017


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

New commits:
commit 637d96a25926e299fff5b4cf5a0055b1d171b23b
Author: heiko tietze <tietze.heiko at 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 <ci at libreoffice.org>
    Reviewed-by: Yousuf Philips <philipz85 at hotmail.com>
    Tested-by: Yousuf Philips <philipz85 at hotmail.com>
    Reviewed-by: Heiko Tietze <tietze.heiko at 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 );
 }


More information about the Libreoffice-commits mailing list