diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-26 13:28:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-27 10:24:59 +0100 |
commit | 68e6706fb931ed2f53c08bc9c0a02cbb559c8c53 (patch) | |
tree | d24225c6da5eda1cf7070f419deb3d2f6f94c36a /sw/source/filter/xml/xmltexti.cxx | |
parent | be5af6cefea2fa43479ec6124e2c847956144a6d (diff) |
drop old tools/gen.hxx methods in sw
Change-Id: I1db8954b86e9b2ec27ecc1f65e8ff7715612d756
Reviewed-on: https://gerrit.libreoffice.org/50363
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/xml/xmltexti.cxx')
-rw-r--r-- | sw/source/filter/xml/xmltexti.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 0986e089a6ae..cf4f328c47b3 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -94,7 +94,7 @@ const XMLServiceMapEntry_Impl aServiceMap[] = }; static void lcl_putHeightAndWidth ( SfxItemSet &rItemSet, sal_Int32 nHeight, sal_Int32 nWidth, - long *pTwipHeight=nullptr, long *pTwipWidth=nullptr ) + Size *pTwipSize = nullptr ) { if( nWidth > 0 && nHeight > 0 ) { @@ -110,10 +110,11 @@ static void lcl_putHeightAndWidth ( SfxItemSet &rItemSet, SwFormatAnchor aAnchor( RndStdIds::FLY_AT_CHAR ); rItemSet.Put( aAnchor ); - if( pTwipWidth ) - *pTwipWidth = nWidth; - if( pTwipHeight ) - *pTwipHeight = nHeight; + if( pTwipSize ) + { + pTwipSize->setWidth( nWidth ); + pTwipSize->setHeight( nHeight); + } } static void lcl_setObjectVisualArea( const uno::Reference< embed::XEmbeddedObject >& xObj, @@ -238,7 +239,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( Size aTwipSize( 0, 0 ); tools::Rectangle aVisArea( 0, 0, nWidth, nHeight ); lcl_putHeightAndWidth( aItemSet, nHeight, nWidth, - &aTwipSize.Height(), &aTwipSize.Width() ); + &aTwipSize ); SwFrameFormat *pFrameFormat = nullptr; SwOLENode *pOLENd = nullptr; @@ -550,7 +551,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( RES_FRMATR_END>{} ); Size aTwipSize( 0, 0 ); lcl_putHeightAndWidth( aItemSet, nHeight, nWidth, - &aTwipSize.Height(), &aTwipSize.Width() ); + &aTwipSize ); // We'll need a (valid) URL. If we don't have do not insert the link and return early. // Copy URL into URL object on the way. @@ -810,14 +811,14 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra { sal_Int32 nVal = SIZE_NOT_SET; rProp.maValue >>= nVal; - aMargin.Width() = nVal; + aMargin.setWidth( nVal ); } break; case CTF_FRAME_MARGIN_VERT: { sal_Int32 nVal = SIZE_NOT_SET; rProp.maValue >>= nVal; - aMargin.Height() = nVal; + aMargin.setHeight( nVal ); } break; } |