[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sw/source

Jan Holesovsky kendy at collabora.com
Thu May 18 12:05:12 UTC 2017


 sw/source/core/inc/rootfrm.hxx    |    3 +++
 sw/source/core/layout/newfrm.cxx  |    2 +-
 sw/source/core/layout/pagechg.cxx |    6 ++----
 3 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit fe579905acc511b98aeae370528e87810c9cd9d1
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu May 18 13:25:31 2017 +0200

    sw lok: Make the default for the Web view larger.
    
    Change-Id: I943711e084adcfa0af2a79cf83d5c3e1b6dc45e6
    Reviewed-on: https://gerrit.libreoffice.org/37759
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index f67665eafbb7..e784efd9d51d 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -96,6 +96,9 @@ class SwRootFrame: public SwLayoutFrame
     static bool           s_isInPaint; // Protection against double Paints
     static bool           s_isNoVirDev;// No virt. Device for SystemPaints
 
+    /// Width of the HTML / Web document if not defined otherwise: 20cm.
+    static const sal_Int64 MIN_BROWSE_WIDTH = 20 * 2 * MM50;
+
     bool    mbCheckSuperfluous   :1; // Search for empty Pages?
     bool    mbIdleFormat         :1; // Trigger Idle Formatter?
     bool    mbBrowseWidthValid   :1; // Is mnBrowseWidth valid?
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index e1a96cd25ac1..b5785c4b0330 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -464,7 +464,7 @@ SwRootFrame::SwRootFrame( SwFrameFormat *pFormat, SwViewShell * pSh ) :
     mbIsNewLayout( true ),
     mbCallbackActionEnabled ( false ),
     mbLayoutFreezed ( false ),
-    mnBrowseWidth( MM50*4 ), //2cm minimum
+    mnBrowseWidth(MIN_BROWSE_WIDTH),
     mpTurbo( nullptr ),
     mpLastPage( nullptr ),
     mpCurrShell( pSh ),
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index ef167d34cf99..bafe1a96d7d1 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1603,10 +1603,8 @@ void SwRootFrame::ImplCalcBrowseWidth()
 
     mbBrowseWidthValid = true;
     SwViewShell *pSh = getRootFrame()->GetCurrShell();
-    mnBrowseWidth = pSh
-                    ? MINLAY + 2 * pSh->GetOut()->
-                                PixelToLogic( pSh->GetBrowseBorder() ).Width()
-                    : 5000;
+    mnBrowseWidth = (!comphelper::LibreOfficeKit::isActive() && pSh)? MINLAY + 2 * pSh->GetOut()-> PixelToLogic( pSh->GetBrowseBorder() ).Width(): MIN_BROWSE_WIDTH;
+
     do
     {
         if ( pFrame->IsInTab() )


More information about the Libreoffice-commits mailing list