summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2015-08-22 11:58:11 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-08-22 13:02:08 +0000
commit25accda781bc0bc79ca2e887c54ca981068bf407 (patch)
tree0f551b4f516dd289df523d71bff08a26de2c3622 /filter
parent159bace378aefa5e48967f1e5089acef9a7f2378 (diff)
tdf#39440 reduce scope of local variables
This addresses some cppcheck warnings. Change-Id: I6ab170c4426494ab9fc53017f88e47fbfdbd9aad Reviewed-on: https://gerrit.libreoffice.org/17920 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/escherex.cxx19
-rw-r--r--filter/source/svg/svgexport.cxx9
2 files changed, 15 insertions, 13 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index c18ee94f1d64..fa693fc5ad6c 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1423,25 +1423,26 @@ bool EscherPropertyContainer::CreateGraphicProperties(
bool bRetValue = false;
bool bCreateFillStyles = false;
- bool bMirrored = false;
- bool bRotate = true;
boost::scoped_ptr<GraphicAttr> pGraphicAttr;
GraphicObject aGraphicObject;
OUString aGraphicUrl;
OString aUniqueId;
- bool bIsGraphicMtf(false);
- // #121074#
- sal_Int16 nTransparency(0);
- sal_Int16 nRed(0);
- sal_Int16 nGreen(0);
- sal_Int16 nBlue(0);
- double fGamma(1.0);
::com::sun::star::drawing::BitmapMode eBitmapMode( ::com::sun::star::drawing::BitmapMode_NO_REPEAT );
::com::sun::star::uno::Any aAny;
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, rSource ) )
{
+ bool bMirrored = false;
+ bool bRotate = true;
+ bool bIsGraphicMtf = false;
+ // #121074#
+ sal_Int16 nTransparency(0);
+ sal_Int16 nRed(0);
+ sal_Int16 nGreen(0);
+ sal_Int16 nBlue(0);
+ double fGamma(1.0);
+
sal_uInt16 nAngle = 0;
if ( rSource == "MetaFile" )
{
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index b0ddc8c4eb97..d600fb9e5694 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -1005,10 +1005,6 @@ bool SVGFilter::implGenerateMetaData()
{
bool bBackgroundVisibility = true; // default: visible
bool bBackgroundObjectsVisibility = true; // default: visible
- bool bPageNumberVisibility = false; // default: hidden
- bool bDateTimeVisibility = true; // default: visible
- bool bFooterVisibility = true; // default: visible
- bool bDateTimeFixed = true; // default: fixed
FixedDateTimeField aFixedDateTimeField;
VariableDateTimeField aVariableDateTimeField;
@@ -1024,6 +1020,11 @@ bool SVGFilter::implGenerateMetaData()
xPropSet->getPropertyValue( "IsBackgroundObjectsVisible" ) >>= bBackgroundObjectsVisibility;
if( bBackgroundObjectsVisibility ) // visibility default value: 'visible'
{
+ bool bPageNumberVisibility = false; // default: hidden
+ bool bDateTimeVisibility = true; // default: visible
+ bool bFooterVisibility = true; // default: visible
+ bool bDateTimeFixed = true; // default: fixed
+
/*
* Page Number Field
*/