Kaydet (Commit) a3abc602 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Caolán McNamara

remove some dodgy defines from the ICGM filter

One of these looks it was somebodys temporary debugging code.
The others constants are are always defined,
so the #ifdef blocks are pointless.

Change-Id: I4817e9ce268ab58f5e329830e2e332e2b4ebf4dc
Reviewed-on: https://gerrit.libreoffice.org/9163Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 3d91d54c
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
#ifdef CGM_EXPORT_IMPRESS
CGM::CGM( sal_uInt32 nMode, uno::Reference< frame::XModel > & rModel ) CGM::CGM( sal_uInt32 nMode, uno::Reference< frame::XModel > & rModel )
: mnOutdx(28000) : mnOutdx(28000)
, mnOutdy(21000) , mnOutdy(21000)
...@@ -66,20 +64,16 @@ CGM::CGM( sal_uInt32 nMode, uno::Reference< frame::XModel > & rModel ) ...@@ -66,20 +64,16 @@ CGM::CGM( sal_uInt32 nMode, uno::Reference< frame::XModel > & rModel )
, mnElementClass(0) , mnElementClass(0)
, mnElementID(0) , mnElementID(0)
, mnElementSize(0) , mnElementSize(0)
#ifdef CGM_EXPORT_META
, mpVirDev(NULL) , mpVirDev(NULL)
, mpGDIMetaFile(NULL) , mpGDIMetaFile(NULL)
#endif
{ {
pElement = new CGMElements( *this ); pElement = new CGMElements( *this );
pCopyOfE = new CGMElements( *this ); pCopyOfE = new CGMElements( *this );
} }
#endif
CGM::~CGM() CGM::~CGM()
{ {
#ifdef CGM_EXPORT_META
if ( mpGraphic ) if ( mpGraphic )
{ {
mpGDIMetaFile->Stop(); mpGDIMetaFile->Stop();
...@@ -88,7 +82,6 @@ CGM::~CGM() ...@@ -88,7 +82,6 @@ CGM::~CGM()
delete mpVirDev; delete mpVirDev;
*mpGraphic = Graphic( *mpGDIMetaFile ); *mpGraphic = Graphic( *mpGDIMetaFile );
} }
#endif
for( size_t i = 0, n = maDefRepList.size(); i < n; ++i ) for( size_t i = 0, n = maDefRepList.size(); i < n; ++i )
delete maDefRepList[ i ]; delete maDefRepList[ i ];
maDefRepList.clear(); maDefRepList.clear();
...@@ -594,13 +587,6 @@ void CGM::ImplMapPoint( FloatPoint& rFloatPoint ) ...@@ -594,13 +587,6 @@ void CGM::ImplMapPoint( FloatPoint& rFloatPoint )
void CGM::ImplDoClass() void CGM::ImplDoClass()
{ {
#ifdef CGM_USER_BREAKPOINT
#ifdef WNT
#define CGM_BREAK_ACTION 0xffffffff
if ( mnActCount == CGM_BREAK_ACTION )
_asm int 0x3;
#endif
#endif
switch ( mnElementClass ) switch ( mnElementClass )
{ {
case 0 : ImplDoClass0(); break; case 0 : ImplDoClass0(); break;
...@@ -695,14 +681,6 @@ bool CGM::Write( SvStream& rIStm ) ...@@ -695,14 +681,6 @@ bool CGM::Write( SvStream& rIStm )
rIStm.SeekRel( 1 ); rIStm.SeekRel( 1 );
ImplDoClass(); ImplDoClass();
#ifdef CGM_USER_BREAKPOINT
#ifdef WNT
if ( !mbStatus || mnParaSize && ( mnElementSize != mnParaSize ) )
_asm int 0x3;
#endif
#endif
return mbStatus; return mbStatus;
}; };
...@@ -731,7 +709,6 @@ ImportCGM( OUString& rFileName, uno::Reference< frame::XModel > & rXModel, sal_u ...@@ -731,7 +709,6 @@ ImportCGM( OUString& rFileName, uno::Reference< frame::XModel > & rXModel, sal_u
sal_uInt64 const nInSize = pIn->remainingSize(); sal_uInt64 const nInSize = pIn->remainingSize();
pIn->Seek( 0 ); pIn->Seek( 0 );
#ifdef CGM_EXPORT_IMPRESS
uno::Reference< task::XStatusIndicator > aXStatInd; uno::Reference< task::XStatusIndicator > aXStatInd;
sal_uInt32 nNext = 0; sal_uInt32 nNext = 0;
sal_uInt32 nAdd = nInSize / 20; sal_uInt32 nAdd = nInSize / 20;
...@@ -740,14 +717,9 @@ ImportCGM( OUString& rFileName, uno::Reference< frame::XModel > & rXModel, sal_u ...@@ -740,14 +717,9 @@ ImportCGM( OUString& rFileName, uno::Reference< frame::XModel > & rXModel, sal_u
bProgressBar = aXStatInd.is(); bProgressBar = aXStatInd.is();
if ( bProgressBar ) if ( bProgressBar )
aXStatInd->start( "CGM Import" , nInSize ); aXStatInd->start( "CGM Import" , nInSize );
#endif
while ( pCGM->IsValid() && ( pIn->Tell() < nInSize ) && !pCGM->IsFinished() ) while ( pCGM->IsValid() && ( pIn->Tell() < nInSize ) && !pCGM->IsFinished() )
{ {
#ifdef CGM_EXPORT_IMPRESS
if ( bProgressBar ) if ( bProgressBar )
{ {
sal_uInt32 nCurrentPos = pIn->Tell(); sal_uInt32 nCurrentPos = pIn->Tell();
...@@ -757,7 +729,6 @@ ImportCGM( OUString& rFileName, uno::Reference< frame::XModel > & rXModel, sal_u ...@@ -757,7 +729,6 @@ ImportCGM( OUString& rFileName, uno::Reference< frame::XModel > & rXModel, sal_u
nNext = nCurrentPos + nAdd; nNext = nCurrentPos + nAdd;
} }
} }
#endif
if ( pCGM->Write( *pIn ) == false ) if ( pCGM->Write( *pIn ) == false )
break; break;
...@@ -766,10 +737,8 @@ ImportCGM( OUString& rFileName, uno::Reference< frame::XModel > & rXModel, sal_u ...@@ -766,10 +737,8 @@ ImportCGM( OUString& rFileName, uno::Reference< frame::XModel > & rXModel, sal_u
{ {
nStatus = pCGM->GetBackGroundColor() | 0xff000000; nStatus = pCGM->GetBackGroundColor() | 0xff000000;
} }
#ifdef CGM_EXPORT_IMPRESS
if ( bProgressBar ) if ( bProgressBar )
aXStatInd->end(); aXStatInd->end();
#endif
} }
} }
} }
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/frame/XModel.hpp>
#undef CGM_USER_BREAKPOINT
#define CGM_IMPORT_CGM 0x00000001 #define CGM_IMPORT_CGM 0x00000001
#define CGM_EXPORT_IMPRESS 0x00000100 #define CGM_EXPORT_IMPRESS 0x00000100
#define CGM_EXPORT_META 0x00000200 #define CGM_EXPORT_META 0x00000200
...@@ -61,7 +59,7 @@ class CGM ...@@ -61,7 +59,7 @@ class CGM
double mnYFraction; double mnYFraction;
bool mbAngReverse; // AngularDirection bool mbAngReverse; // AngularDirection
Graphic* mpGraphic; // ifdef CGM_EXPORT_META Graphic* mpGraphic;
bool mbStatus; bool mbStatus;
bool mbMetaFile; bool mbMetaFile;
...@@ -139,10 +137,8 @@ class CGM ...@@ -139,10 +137,8 @@ class CGM
~CGM(); ~CGM();
CGM( sal_uInt32 nMode, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rModel ); CGM( sal_uInt32 nMode, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rModel );
#ifdef CGM_EXPORT_META
VirtualDevice* mpVirDev; VirtualDevice* mpVirDev;
GDIMetaFile* mpGDIMetaFile; GDIMetaFile* mpGDIMetaFile;
#endif
sal_uInt32 GetBackGroundColor(); sal_uInt32 GetBackGroundColor();
bool IsValid() const { return mbStatus; }; bool IsValid() const { return mbStatus; };
bool IsFinished() const { return mbIsFinished; }; bool IsFinished() const { return mbIsFinished; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment