sw/source/uibase/wrtsh/wrtsh1.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit b20ab49eeb703c755f3ac51ca12214fb4a2b6f63 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Thu Nov 25 22:57:47 2021 +0100 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Sat Dec 4 12:42:28 2021 +0100 sw: just use o3tl::toTwip for 1cm instead of the magic number 567 Change-Id: I19c1cc2abc8af8d5bd58b2cb4ed096d02e277408 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126333 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index c6dee2be2ec6..1120bed817b9 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -88,6 +88,7 @@ #include <vcl/uitest/logger.hxx> #include <vcl/uitest/eventdescription.hxx> #include <osl/diagnose.h> +#include <o3tl/unit_conversion.hxx> #include <PostItMgr.hxx> #include <FrameControlsManager.hxx> @@ -311,8 +312,8 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, Size aSz( pFrameMgr->GetSize() ); if ( !aSz.Width() || !aSz.Height() ) { - aSz.setWidth(567); - aSz.setHeight( 567); + aSz.setWidth(o3tl::toTwips(1, o3tl::Length::cm)); + aSz.setHeight(o3tl::toTwips(1, o3tl::Length::cm)); pFrameMgr->SetSize( aSz ); } else if ( aSz.Width() != DFLT_WIDTH && aSz.Height() != DFLT_HEIGHT )