summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell/docsh2.cxx')
-rw-r--r--sc/source/ui/docshell/docsh2.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx
index 0c8da05362b0..e02b815d2181 100644
--- a/sc/source/ui/docshell/docsh2.cxx
+++ b/sc/source/ui/docshell/docsh2.cxx
@@ -26,6 +26,7 @@
#include <config_folders.h>
#include <unotools/configmgr.hxx>
#include <comphelper/processfactory.hxx>
+#include <o3tl/unit_conversion.hxx>
#include <drwlayer.hxx>
#include <stlpool.hxx>
@@ -46,8 +47,10 @@ bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
// Additional tables are created by the first View, if bIsEmpty is still sal_True
if( bRet )
{
- Size aSize( tools::Long( STD_COL_WIDTH * HMM_PER_TWIPS * OLE_STD_CELLS_X ),
- static_cast<tools::Long>( ScGlobal::nStdRowHeight * HMM_PER_TWIPS * OLE_STD_CELLS_Y ) );
+ Size aSize(
+ o3tl::convert(STD_COL_WIDTH * OLE_STD_CELLS_X, o3tl::Length::twip, o3tl::Length::mm100),
+ o3tl::convert(ScGlobal::nStdRowHeight * OLE_STD_CELLS_Y, o3tl::Length::twip,
+ o3tl::Length::mm100));
// Also adjust start here
SetVisAreaOrSize( tools::Rectangle( Point(), aSize ) );
}