Kaydet (Commit) 1be26845 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

sw lok: Make the default for the Web view larger.

Change-Id: I943711e084adcfa0af2a79cf83d5c3e1b6dc45e6
Reviewed-on: https://gerrit.libreoffice.org/37758Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst 8b110102
...@@ -34,20 +34,14 @@ enum class MapUnit ...@@ -34,20 +34,14 @@ enum class MapUnit
LASTENUMDUMMY // used as an error return LASTENUMDUMMY // used as an error return
}; };
inline sal_Int64 convertTwipToMm100(sal_Int64 n) constexpr sal_Int64 convertTwipToMm100(sal_Int64 n)
{ {
if (n >= 0) return (n >= 0)? (n*127+36)/72: (n*127-36)/72;
return (n*127+36)/72;
else
return (n*127-36)/72;
} }
inline sal_Int64 convertMm100ToTwip(sal_Int64 n) constexpr sal_Int64 convertMm100ToTwip(sal_Int64 n)
{ {
if (n >= 0) return (n >= 0)? (n*72+63)/127: (n*72-63)/127;
return (n*72+63)/127;
else
return (n*72-63)/127;
} }
#endif #endif
......
...@@ -96,6 +96,9 @@ class SwRootFrame: public SwLayoutFrame ...@@ -96,6 +96,9 @@ class SwRootFrame: public SwLayoutFrame
static bool s_isInPaint; // Protection against double Paints static bool s_isInPaint; // Protection against double Paints
static bool s_isNoVirDev;// No virt. Device for SystemPaints static bool s_isNoVirDev;// No virt. Device for SystemPaints
/// Width of the HTML / Web document if not defined otherwise: 20cm.
static constexpr sal_Int64 MIN_BROWSE_WIDTH = convertMm100ToTwip(20000);
bool mbCheckSuperfluous :1; // Search for empty Pages? bool mbCheckSuperfluous :1; // Search for empty Pages?
bool mbIdleFormat :1; // Trigger Idle Formatter? bool mbIdleFormat :1; // Trigger Idle Formatter?
bool mbBrowseWidthValid :1; // Is mnBrowseWidth valid? bool mbBrowseWidthValid :1; // Is mnBrowseWidth valid?
......
...@@ -464,7 +464,7 @@ SwRootFrame::SwRootFrame( SwFrameFormat *pFormat, SwViewShell * pSh ) : ...@@ -464,7 +464,7 @@ SwRootFrame::SwRootFrame( SwFrameFormat *pFormat, SwViewShell * pSh ) :
mbIsNewLayout( true ), mbIsNewLayout( true ),
mbCallbackActionEnabled ( false ), mbCallbackActionEnabled ( false ),
mbLayoutFreezed ( false ), mbLayoutFreezed ( false ),
mnBrowseWidth( MM50*4 ), //2cm minimum mnBrowseWidth(MIN_BROWSE_WIDTH),
mpTurbo( nullptr ), mpTurbo( nullptr ),
mpLastPage( nullptr ), mpLastPage( nullptr ),
mpCurrShell( pSh ), mpCurrShell( pSh ),
......
...@@ -1604,10 +1604,8 @@ void SwRootFrame::ImplCalcBrowseWidth() ...@@ -1604,10 +1604,8 @@ void SwRootFrame::ImplCalcBrowseWidth()
mbBrowseWidthValid = true; mbBrowseWidthValid = true;
SwViewShell *pSh = getRootFrame()->GetCurrShell(); SwViewShell *pSh = getRootFrame()->GetCurrShell();
mnBrowseWidth = pSh mnBrowseWidth = (!comphelper::LibreOfficeKit::isActive() && pSh)? MINLAY + 2 * pSh->GetOut()-> PixelToLogic( pSh->GetBrowseBorder() ).Width(): MIN_BROWSE_WIDTH;
? MINLAY + 2 * pSh->GetOut()->
PixelToLogic( pSh->GetBrowseBorder() ).Width()
: 5000;
do do
{ {
if ( pFrame->IsInTab() ) if ( pFrame->IsInTab() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment