diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-28 16:10:06 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-10-28 15:05:32 +0100 |
commit | 3040d328c944d91b0cd612d86d358823b5c5b883 (patch) | |
tree | 689dd912ebff40137de98a7cf61b4042b9ec2cf2 /xmloff/source/draw/sdxmlexp.cxx | |
parent | d86778573a1ef207748cf8a6ca67eaef5cf04b02 (diff) |
tdf#120703 PVS: V547 Expression is always true/false
Change-Id: Iaa1a1811b638aadfe6b06b3465a182cb675031b5
Reviewed-on: https://gerrit.libreoffice.org/62476
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'xmloff/source/draw/sdxmlexp.cxx')
-rw-r--r-- | xmloff/source/draw/sdxmlexp.cxx | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 23f35442eae5..3f09010adfd0 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -2426,11 +2426,6 @@ void SdXMLExport::exportFormsElement( const Reference< XDrawPage >& xDrawPage ) void SdXMLExport::GetViewSettings(uno::Sequence<beans::PropertyValue>& rProps) { - rProps.realloc(4); - beans::PropertyValue* pProps = rProps.getArray(); - if(!pProps) - return; - Reference< beans::XPropertySet > xPropSet( GetModel(), UNO_QUERY ); if( !xPropSet.is() ) return; @@ -2438,15 +2433,17 @@ void SdXMLExport::GetViewSettings(uno::Sequence<beans::PropertyValue>& rProps) awt::Rectangle aVisArea; xPropSet->getPropertyValue("VisibleArea") >>= aVisArea; - sal_uInt16 i = 0; - pProps[i].Name = "VisibleAreaTop"; - pProps[i++].Value <<= aVisArea.Y; - pProps[i].Name = "VisibleAreaLeft"; - pProps[i++].Value <<= aVisArea.X; - pProps[i].Name = "VisibleAreaWidth"; - pProps[i++].Value <<= aVisArea.Width; - pProps[i].Name = "VisibleAreaHeight"; - pProps[i++].Value <<= aVisArea.Height; + rProps.realloc(4); + beans::PropertyValue* pProps = rProps.getArray(); + + pProps[0].Name = "VisibleAreaTop"; + pProps[0].Value <<= aVisArea.Y; + pProps[1].Name = "VisibleAreaLeft"; + pProps[1].Value <<= aVisArea.X; + pProps[2].Name = "VisibleAreaWidth"; + pProps[2].Value <<= aVisArea.Width; + pProps[3].Name = "VisibleAreaHeight"; + pProps[3].Value <<= aVisArea.Height; } |