summaryrefslogtreecommitdiff
path: root/filter/source/graphicfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-01 19:01:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-01 19:51:18 +0100
commit537fff14c233ad85a22588557ff0e9a3caeea155 (patch)
treec3e425a2aca86b9fd35f03181fbf013b279b2804 /filter/source/graphicfilter
parent252f59b70223c8fdbd16532125a1089ff8c12c8b (diff)
CGM_IMPORT_CGM is always used
Change-Id: I77616b97970486aa6bb3c9af577d4bb412c35ca2
Diffstat (limited to 'filter/source/graphicfilter')
-rw-r--r--filter/source/graphicfilter/icgm/cgm.cxx53
-rw-r--r--filter/source/graphicfilter/icgm/cgm.hxx1
2 files changed, 25 insertions, 29 deletions
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index 3e9e0fcdf05e..0183cb2fc539 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -717,42 +717,39 @@ ImportCGM(SvStream& rIn, uno::Reference< frame::XModel > const & rXModel, sal_uI
try
{
std::unique_ptr<CGM> pCGM(new CGM( nMode, rXModel ));
- if ( pCGM && pCGM->IsValid() )
+ if (pCGM && pCGM->IsValid())
{
- if ( nMode & CGM_IMPORT_CGM )
- {
- rIn.SetEndian(SvStreamEndian::BIG);
- sal_uInt64 const nInSize = rIn.remainingSize();
- rIn.Seek(0);
+ rIn.SetEndian(SvStreamEndian::BIG);
+ sal_uInt64 const nInSize = rIn.remainingSize();
+ rIn.Seek(0);
- sal_uInt32 nNext = 0;
- sal_uInt32 nAdd = nInSize / 20;
- bool bProgressBar = aXStatInd.is();
- if ( bProgressBar )
- aXStatInd->start( "CGM Import" , nInSize );
+ sal_uInt32 nNext = 0;
+ sal_uInt32 nAdd = nInSize / 20;
+ bool bProgressBar = aXStatInd.is();
+ if ( bProgressBar )
+ aXStatInd->start( "CGM Import" , nInSize );
- while (pCGM->IsValid() && (rIn.Tell() < nInSize) && !pCGM->IsFinished())
+ while (pCGM->IsValid() && (rIn.Tell() < nInSize) && !pCGM->IsFinished())
+ {
+ if ( bProgressBar )
{
- if ( bProgressBar )
+ sal_uInt32 nCurrentPos = rIn.Tell();
+ if ( nCurrentPos >= nNext )
{
- sal_uInt32 nCurrentPos = rIn.Tell();
- if ( nCurrentPos >= nNext )
- {
- aXStatInd->setValue( nCurrentPos );
- nNext = nCurrentPos + nAdd;
- }
+ aXStatInd->setValue( nCurrentPos );
+ nNext = nCurrentPos + nAdd;
}
-
- if (!pCGM->Write(rIn))
- break;
}
- if ( pCGM->IsValid() )
- {
- nStatus = pCGM->GetBackGroundColor() | 0xff000000;
- }
- if ( bProgressBar )
- aXStatInd->end();
+
+ if (!pCGM->Write(rIn))
+ break;
+ }
+ if ( pCGM->IsValid() )
+ {
+ nStatus = pCGM->GetBackGroundColor() | 0xff000000;
}
+ if ( bProgressBar )
+ aXStatInd->end();
}
}
catch (const css::uno::Exception&)
diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx
index 777e53913e24..a9e8fbffb70d 100644
--- a/filter/source/graphicfilter/icgm/cgm.hxx
+++ b/filter/source/graphicfilter/icgm/cgm.hxx
@@ -22,7 +22,6 @@
#include <com/sun/star/frame/XModel.hpp>
-#define CGM_IMPORT_CGM 0x00000001
#define CGM_EXPORT_IMPRESS 0x00000100
#include <rtl/ustring.hxx>