diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-05 09:27:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-05 14:42:12 +0200 |
commit | 8e34b8ce575bab7e71de20db10cc49ae956d7ff1 (patch) | |
tree | 7abda9ad90ad4aed940a3a1e08a4a8de726b94a4 /writerfilter | |
parent | 8ec183056dd7a954d9af7b26432d7680a31e9896 (diff) |
loplugin:reducevarscope in writerfilter
Change-Id: I19f12959a04be07cdd2083a6aa519943d069fae6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103947
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 8 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsdrimport.cxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 4e66b5aff0ea..a0ff5002e1ee 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -874,12 +874,12 @@ void ListsManager::lcl_sprm( Sprm& rSprm ) // Respect only the aspect ratio of the picture, not its size. awt::Size aPrefSize = xShape->getSize(); - // See SwDefBulletConfig::InitFont(), default height is 14. - const int nFontHeight = 14; - // Point -> mm100. - const int nHeight = nFontHeight * 35; if ( aPrefSize.Height * aPrefSize.Width != 0 ) { + // See SwDefBulletConfig::InitFont(), default height is 14. + const int nFontHeight = 14; + // Point -> mm100. + const int nHeight = nFontHeight * 35; int nWidth = (nHeight * aPrefSize.Width) / aPrefSize.Height; awt::Size aSize( convertMm100ToTwip(nWidth), convertMm100ToTwip(nHeight) ); diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index 473e42395444..64177ee88f91 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -778,9 +778,9 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap oRelativeWidth = 100; } nRelativeWidthRelation = text::RelOrientation::FRAME; - sal_Int16 const nVertOrient = text::VertOrientation::CENTER; if (xPropertySet.is()) { + sal_Int16 const nVertOrient = text::VertOrientation::CENTER; xPropertySet->setPropertyValue("VertOrient", uno::makeAny(nVertOrient)); } } |