summaryrefslogtreecommitdiff
path: root/filter/source/graphicfilter/eos2met/eos2met.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2014-12-12 19:34:29 +0100
committerNoel Grandin <noelgrandin@gmail.com>2014-12-14 11:32:53 +0000
commitc1fcafb4ac234e8d9912d3bb6be978a6509593e3 (patch)
tree404b59031bd753e78d6c5bf7a2a9bce46e385633 /filter/source/graphicfilter/eos2met/eos2met.cxx
parentec382367c8dd90a0cd728fb18c03c186416bbaee (diff)
fdo#39440 reduce scope of local variables
This addresses some cppcheck warnings. in addition: simplified some simple bool checks: "if (!bVar)" instead of "if(bVar == false)" Change-Id: I609b4a3ee7d43bbeeb91ba141af2c90511d0c8d7 Reviewed-on: https://gerrit.libreoffice.org/13455 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'filter/source/graphicfilter/eos2met/eos2met.cxx')
-rw-r--r--filter/source/graphicfilter/eos2met/eos2met.cxx19
1 files changed, 7 insertions, 12 deletions
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx
index 8975fdab5538..36ffc74ffb27 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -308,11 +308,9 @@ void METWriter::WriteClipRect( const Rectangle& rRect )
void METWriter::CountActionsAndBitmaps(const GDIMetaFile * pMTF)
{
- const MetaAction* pMA;
-
for( size_t nAction = 0, nActionCount=pMTF->GetActionSize(); nAction < nActionCount; nAction++ )
{
- pMA = pMTF->GetAction(nAction);
+ const MetaAction* pMA = pMTF->GetAction(nAction);
switch (pMA->GetType())
{
@@ -398,16 +396,15 @@ void METWriter::WriteFieldId(sal_uInt32 nId)
void METWriter::CreateChrSets(const GDIMetaFile * pMTF)
{
size_t nAction, nActionCount;
- const MetaAction * pMA;
- if (bStatus==false)
+ if (!bStatus)
return;
nActionCount = pMTF->GetActionSize();
for (nAction = 0; nAction < nActionCount; nAction++)
{
- pMA = pMTF->GetAction(nAction);
+ const MetaAction * pMA = pMTF->GetAction(nAction);
switch (pMA->GetType())
{
@@ -734,14 +731,12 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
void METWriter::WriteImageObjects(const GDIMetaFile * pMTF)
{
- const MetaAction* pMA;
-
- if (bStatus==false)
+ if (!bStatus)
return;
for ( size_t nAction = 0, nActionCount = pMTF->GetActionSize(); nAction < nActionCount; nAction++)
{
- pMA = pMTF->GetAction(nAction);
+ const MetaAction* pMA = pMTF->GetAction(nAction);
switch (pMA->GetType())
{
@@ -808,7 +803,7 @@ void METWriter::WriteImageObjects(const GDIMetaFile * pMTF)
break;
}
- if (bStatus==false)
+ if (!bStatus)
break;
}
@@ -818,7 +813,7 @@ void METWriter::WriteImageObjects(const GDIMetaFile * pMTF)
void METWriter::WriteDataDescriptor(const GDIMetaFile *)
{
- if (bStatus==false)
+ if (!bStatus)
return;
WriteFieldIntroducer(0,DscGrfObjMagic,0,0);