diff options
Diffstat (limited to 'svtools/source/filter.vcl')
45 files changed, 2241 insertions, 2241 deletions
diff --git a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx b/svtools/source/filter.vcl/filter/FilterConfigCache.cxx index 324b267eb7c4..2aba8ff9f751 100644 --- a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx +++ b/svtools/source/filter.vcl/filter/FilterConfigCache.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,11 +43,11 @@ // #define TOKEN_INDEX_FOR_HASDIALOG 2 using namespace ::com::sun::star::lang ; // XMultiServiceFactory -using namespace ::com::sun::star::container ; // XNameAccess -using namespace ::com::sun::star::uno ; // Reference -using namespace ::com::sun::star::beans ; // PropertyValue +using namespace ::com::sun::star::container ; // XNameAccess +using namespace ::com::sun::star::uno ; // Reference +using namespace ::com::sun::star::beans ; // PropertyValue using namespace ::utl ; // getProcessServiceFactory(); -using namespace ::rtl ; +using namespace ::rtl ; const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameList[] = { @@ -313,9 +313,9 @@ void FilterConfigCache::ImplInitSmart() const char** pPtr; for ( pPtr = InternalFilterListForSvxLight; *pPtr; pPtr++ ) { - FilterConfigCacheEntry aEntry; + FilterConfigCacheEntry aEntry; - OUString sExtension( OUString::createFromAscii( *pPtr++ ) ); + OUString sExtension( OUString::createFromAscii( *pPtr++ ) ); aEntry.lExtensionList.realloc( 1 ); aEntry.lExtensionList[ 0 ] = sExtension; @@ -326,7 +326,7 @@ void FilterConfigCache::ImplInitSmart() ByteString sFlags( *pPtr++ ); aEntry.nFlags = sFlags.ToInt32(); - OUString sUserData( OUString::createFromAscii( *pPtr ) ); + OUString sUserData( OUString::createFromAscii( *pPtr ) ); aEntry.CreateFilterName( sUserData ); if ( aEntry.nFlags & 1 ) diff --git a/svtools/source/filter.vcl/filter/FilterConfigCache.hxx b/svtools/source/filter.vcl/filter/FilterConfigCache.hxx index b1579bec092a..9e663e329717 100644 --- a/svtools/source/filter.vcl/filter/FilterConfigCache.hxx +++ b/svtools/source/filter.vcl/filter/FilterConfigCache.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,27 +49,27 @@ class SVT_DLLPUBLIC FilterConfigCache ::rtl::OUString sInternalFilterName; ::rtl::OUString sType; ::com::sun::star::uno::Sequence< ::rtl::OUString > lExtensionList; - ::rtl::OUString sUIName; - ::rtl::OUString sDocumentService; + ::rtl::OUString sUIName; + ::rtl::OUString sDocumentService; ::rtl::OUString sFilterService; ::rtl::OUString sTemplateName; - ::rtl::OUString sMediaType; + ::rtl::OUString sMediaType; ::rtl::OUString sFilterType; - sal_Int32 nFlags; - sal_Int32 nFileFormatVersion; + sal_Int32 nFlags; + sal_Int32 nFileFormatVersion; // user data - String sFilterName; - sal_Bool bHasDialog : 1; - sal_Bool bIsInternalFilter : 1; - sal_Bool bIsPixelFormat : 1; + String sFilterName; + sal_Bool bHasDialog : 1; + sal_Bool bIsInternalFilter : 1; + sal_Bool bIsPixelFormat : 1; - sal_Bool IsValid(); - sal_Bool CreateFilterName( const ::rtl::OUString& rUserDataEntry ); + sal_Bool IsValid(); + sal_Bool CreateFilterName( const ::rtl::OUString& rUserDataEntry ); String GetShortName( ); - + static const char* InternalPixelFilterNameList[]; static const char* InternalVectorFilterNameList[]; static const char* ExternalPixelFilterNameList[]; @@ -78,9 +78,9 @@ class SVT_DLLPUBLIC FilterConfigCache typedef std::vector< FilterConfigCacheEntry > CacheVector; - CacheVector aImport; - CacheVector aExport; - sal_Bool bUseConfig; + CacheVector aImport; + CacheVector aExport; + sal_Bool bUseConfig; static sal_Bool bInitialized; static sal_Int32 nIndType; @@ -92,56 +92,56 @@ class SVT_DLLPUBLIC FilterConfigCache static sal_Int32 nIndFileFormatVersion; static sal_Int32 nIndTemplateName; - static const char* InternalFilterListForSvxLight[]; - - SVT_DLLPRIVATE void ImplInit(); - SVT_DLLPRIVATE void ImplInitSmart(); + static const char* InternalFilterListForSvxLight[]; + SVT_DLLPRIVATE void ImplInit(); + SVT_DLLPRIVATE void ImplInitSmart(); + public : - sal_uInt16 GetImportFormatCount() const + sal_uInt16 GetImportFormatCount() const { return sal::static_int_cast< sal_uInt16 >(aImport.size()); }; - sal_uInt16 GetImportFormatNumber( const String& rFormatName ); - sal_uInt16 GetImportFormatNumberForMediaType( const String& rMediaType ); - sal_uInt16 GetImportFormatNumberForShortName( const String& rShortName ); - sal_uInt16 GetImportFormatNumberForTypeName( const String& rType ); - String GetImportFilterName( sal_uInt16 nFormat ); - String GetImportFormatName( sal_uInt16 nFormat ); - String GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0); - String GetImportFormatMediaType( sal_uInt16 nFormat ); - String GetImportFormatShortName( sal_uInt16 nFormat ); - String GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry ); + sal_uInt16 GetImportFormatNumber( const String& rFormatName ); + sal_uInt16 GetImportFormatNumberForMediaType( const String& rMediaType ); + sal_uInt16 GetImportFormatNumberForShortName( const String& rShortName ); + sal_uInt16 GetImportFormatNumberForTypeName( const String& rType ); + String GetImportFilterName( sal_uInt16 nFormat ); + String GetImportFormatName( sal_uInt16 nFormat ); + String GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0); + String GetImportFormatMediaType( sal_uInt16 nFormat ); + String GetImportFormatShortName( sal_uInt16 nFormat ); + String GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry ); String GetImportFilterType( sal_uInt16 nFormat ); String GetImportFilterTypeName( sal_uInt16 nFormat ); - sal_Bool IsImportInternalFilter( sal_uInt16 nFormat ); - sal_Bool IsImportPixelFormat( sal_uInt16 nFormat ); - sal_Bool IsImportDialog( sal_uInt16 nFormat ); + sal_Bool IsImportInternalFilter( sal_uInt16 nFormat ); + sal_Bool IsImportPixelFormat( sal_uInt16 nFormat ); + sal_Bool IsImportDialog( sal_uInt16 nFormat ); - sal_uInt16 GetExportFormatCount() const + sal_uInt16 GetExportFormatCount() const { return sal::static_int_cast< sal_uInt16 >(aExport.size()); }; - sal_uInt16 GetExportFormatNumber( const String& rFormatName ); - sal_uInt16 GetExportFormatNumberForMediaType( const String& rMediaType ); - sal_uInt16 GetExportFormatNumberForShortName( const String& rShortName ); - sal_uInt16 GetExportFormatNumberForTypeName( const String& rType ); - String GetExportFilterName( sal_uInt16 nFormat ); - String GetExportFormatName( sal_uInt16 nFormat ); - String GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0 ); - String GetExportFormatMediaType( sal_uInt16 nFormat ); - String GetExportFormatShortName( sal_uInt16 nFormat ); - String GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry ); + sal_uInt16 GetExportFormatNumber( const String& rFormatName ); + sal_uInt16 GetExportFormatNumberForMediaType( const String& rMediaType ); + sal_uInt16 GetExportFormatNumberForShortName( const String& rShortName ); + sal_uInt16 GetExportFormatNumberForTypeName( const String& rType ); + String GetExportFilterName( sal_uInt16 nFormat ); + String GetExportFormatName( sal_uInt16 nFormat ); + String GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0 ); + String GetExportFormatMediaType( sal_uInt16 nFormat ); + String GetExportFormatShortName( sal_uInt16 nFormat ); + String GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry ); String GetExportFilterTypeName( sal_uInt16 nFormat ); String GetExportInternalFilterName( sal_uInt16 nFormat ); - sal_Bool IsExportInternalFilter( sal_uInt16 nFormat ); - sal_Bool IsExportPixelFormat( sal_uInt16 nFormat ); - sal_Bool IsExportDialog( sal_uInt16 nFormat ); + sal_Bool IsExportInternalFilter( sal_uInt16 nFormat ); + sal_Bool IsExportPixelFormat( sal_uInt16 nFormat ); + sal_Bool IsExportDialog( sal_uInt16 nFormat ); FilterConfigCache( sal_Bool bUseConfig ); ~FilterConfigCache(); }; -#endif // _FILTER_CONFIG_CACHE_HXX_ +#endif // _FILTER_CONFIG_CACHE_HXX_ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx index ee788458e609..d6b23770dc41 100644 --- a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx +++ b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,22 +40,22 @@ #include <com/sun/star/container/XHierarchicalNameAccess.hpp> using namespace ::rtl; -using namespace ::utl ; // getProcessServiceFactory -using namespace ::com::sun::star::lang ; // XMultiServiceFactory -using namespace ::com::sun::star::beans ; // PropertyValue -using namespace ::com::sun::star::uno ; // Reference -using namespace ::com::sun::star::util ; // XChangesBatch -using namespace ::com::sun::star::awt ; // Size -using namespace ::com::sun::star::container ; // -using namespace ::com::sun::star::task ; // XStatusIndicator +using namespace ::utl ; // getProcessServiceFactory +using namespace ::com::sun::star::lang ; // XMultiServiceFactory +using namespace ::com::sun::star::beans ; // PropertyValue +using namespace ::com::sun::star::uno ; // Reference +using namespace ::com::sun::star::util ; // XChangesBatch +using namespace ::com::sun::star::awt ; // Size +using namespace ::com::sun::star::container ; // +using namespace ::com::sun::star::task ; // XStatusIndicator static sal_Bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv, const String& rTree ) { - sal_Bool bAvailable = rTree.Len() != 0; + sal_Bool bAvailable = rTree.Len() != 0; if ( bAvailable ) { - xub_StrLen nTokenCount = rTree.GetTokenCount( (sal_Unicode)'/' ); - xub_StrLen i = 0; + xub_StrLen nTokenCount = rTree.GetTokenCount( (sal_Unicode)'/' ); + xub_StrLen i = 0; if ( rTree.GetChar( 0 ) == (sal_Unicode)'/' ) i++; @@ -65,7 +65,7 @@ static sal_Bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv Any aAny; aAny <<= (OUString)rTree.GetToken( i++, (sal_Unicode)'/' ); - // creation arguments: nodepath + // creation arguments: nodepath PropertyValue aPathArgument; aPathArgument.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); aPathArgument.Value = aAny; @@ -83,7 +83,7 @@ static sal_Bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv catch ( ::com::sun::star::uno::Exception& ) { bAvailable = sal_False; - } + } if ( xReadAccess.is() ) { for ( ; bAvailable && ( i < nTokenCount ); i++ ) @@ -109,7 +109,7 @@ static sal_Bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv { bAvailable = sal_False; } - } + } } } } @@ -123,9 +123,9 @@ void FilterConfigItem::ImpInitTree( const String& rSubTree ) OUString sTree( ConfigManager::GetConfigBaseURL() ); sTree += rSubTree; - Reference< XMultiServiceFactory > xSMGR = getProcessServiceFactory(); // get global uno service manager + Reference< XMultiServiceFactory > xSMGR = getProcessServiceFactory(); // get global uno service manager - Reference< XMultiServiceFactory > xCfgProv( + Reference< XMultiServiceFactory > xCfgProv( xSMGR->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" ) ) ), UNO_QUERY ); @@ -134,19 +134,19 @@ void FilterConfigItem::ImpInitTree( const String& rSubTree ) if ( ImpIsTreeAvailable( xCfgProv, String( sTree ) ) ) { Any aAny; - // creation arguments: nodepath + // creation arguments: nodepath PropertyValue aPathArgument; aAny <<= sTree; aPathArgument.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); aPathArgument.Value = aAny; - // creation arguments: commit mode + // creation arguments: commit mode PropertyValue aModeArgument; sal_Bool bAsyncron = sal_True; aAny <<= bAsyncron; aModeArgument.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "lazywrite" ) ); aModeArgument.Value = aAny; - + Sequence< Any > aArguments( 2 ); aArguments[ 0 ] <<= aPathArgument; aArguments[ 1 ] <<= aModeArgument; @@ -178,7 +178,7 @@ FilterConfigItem::FilterConfigItem( ::com::sun::star::uno::Sequence< ::com::sun: aFilterData = *pFilterData; } -FilterConfigItem::FilterConfigItem( const OUString& rSubTree, +FilterConfigItem::FilterConfigItem( const OUString& rSubTree, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) { ImpInitTree( rSubTree ); diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx index 6a5d9306241d..09cc71e50df4 100644 --- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,9 +51,9 @@ #include "vcl/svapp.hxx" #if defined WIN || (defined OS2 && !defined ICC) -#define EXPDLG_FUNCTION_NAME "_DoExportDialog" +#define EXPDLG_FUNCTION_NAME "_DoExportDialog" #else -#define EXPDLG_FUNCTION_NAME "DoExportDialog" +#define EXPDLG_FUNCTION_NAME "DoExportDialog" #endif using namespace ::rtl; @@ -95,8 +95,8 @@ uno::Sequence< OUString > SAL_CALL SvFilterOptionsDialog_getSupportedServiceName // ----------------------------------------------------------------------------- SvFilterOptionsDialog::SvFilterOptionsDialog( const uno::Reference< lang::XMultiServiceFactory > & xMgr ) : - rxMgr ( xMgr ), - eFieldUnit ( FUNIT_CM ) + rxMgr ( xMgr ), + eFieldUnit ( FUNIT_CM ) { } @@ -151,7 +151,7 @@ uno::Sequence< beans::PropertyValue > SvFilterOptionsDialog::getPropertyValues() sal_Int32 i, nCount; for ( i = 0, nCount = aMediaDescriptor.getLength(); i < nCount; i++ ) { - if ( aMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) ) + if ( aMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) ) break; } if ( i == nCount ) @@ -164,7 +164,7 @@ uno::Sequence< beans::PropertyValue > SvFilterOptionsDialog::getPropertyValues() } void SvFilterOptionsDialog::setPropertyValues( const uno::Sequence< beans::PropertyValue > & aProps ) - throw ( beans::UnknownPropertyException, beans::PropertyVetoException, + throw ( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException ) { @@ -173,7 +173,7 @@ void SvFilterOptionsDialog::setPropertyValues( const uno::Sequence< beans::Prope sal_Int32 i, nCount; for ( i = 0, nCount = aMediaDescriptor.getLength(); i < nCount; i++ ) { - if ( aMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) ) + if ( aMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) ) { aMediaDescriptor[ i ].Value >>= aFilterDataSequence; break; @@ -207,14 +207,14 @@ sal_Int16 SvFilterOptionsDialog::execute() aInternalFilterName.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "impress_" ) ), String(), 0 ); break; } - } + } if ( aInternalFilterName.Len() ) { GraphicFilter aGraphicFilter( sal_True ); sal_uInt16 nFormat, nFilterCount = aGraphicFilter.pConfig->GetExportFormatCount(); for ( nFormat = 0; nFormat < nFilterCount; nFormat++ ) - { + { if ( aGraphicFilter.pConfig->GetExportInternalFilterName( nFormat ) == aInternalFilterName ) break; } @@ -223,7 +223,7 @@ sal_Int16 SvFilterOptionsDialog::execute() FltCallDialogParameter aFltCallDlgPara( Application::GetDefDialogParent(), NULL, eFieldUnit ); aFltCallDlgPara.aFilterData = aFilterDataSequence; - String aFilterName( aGraphicFilter.pConfig->GetExportFilterName( nFormat ) ); + String aFilterName( aGraphicFilter.pConfig->GetExportFilterName( nFormat ) ); if ( aGraphicFilter.pConfig->IsExportInternalFilter( nFormat ) ) { // Export-Dialog fuer Bitmap's, SVM's und WMF's @@ -234,8 +234,8 @@ sal_Int16 SvFilterOptionsDialog::execute() ( aFilterName.EqualsIgnoreCaseAscii( EXP_JPEG ) )|| ( aFilterName.EqualsIgnoreCaseAscii( EXP_PNG ) ) ) { - ByteString aResMgrName( "svt", 3 ); - ResMgr* pResMgr; + ByteString aResMgrName( "svt", 3 ); + ResMgr* pResMgr; pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); aFltCallDlgPara.pResMgr = pResMgr; @@ -258,15 +258,15 @@ sal_Int16 SvFilterOptionsDialog::execute() nRet = ui::dialogs::ExecutableDialogResults::OK; } else - { + { aFltCallDlgPara.aFilterExt = aGraphicFilter.pConfig->GetExportFormatShortName( nFormat ); if ( DlgExportVec( aFltCallDlgPara ).Execute() == RET_OK ) nRet = ui::dialogs::ExecutableDialogResults::OK; } delete pResMgr; } - } - else // ladbare Filter + } + else // ladbare Filter { xub_StrLen i, nTokenCount = aGraphicFilter.aFilterPath.GetTokenCount( ';' ); for ( i = 0; i < nTokenCount; i++ ) @@ -282,7 +282,7 @@ sal_Int16 SvFilterOptionsDialog::execute() aSystemPath += OUString( aFilterName ); osl::Module aLibrary( aSystemPath ); - PFilterDlgCall pFunc = (PFilterDlgCall) aLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPDLG_FUNCTION_NAME ) ); + PFilterDlgCall pFunc = (PFilterDlgCall) aLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPDLG_FUNCTION_NAME ) ); // Dialog in DLL ausfuehren if( pFunc ) { diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx index 3e9fce6cf4ca..e6e27af1aadd 100644 --- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx +++ b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,7 +54,7 @@ class SvFilterOptionsDialog : public cppu::WeakImplHelper5 com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aFilterDataSequence; rtl::OUString aDialogTitle; - FieldUnit eFieldUnit; + FieldUnit eFieldUnit; public: @@ -70,18 +70,18 @@ public: throw ( com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException ); // XServiceInfo - virtual rtl::OUString SAL_CALL getImplementationName() + virtual rtl::OUString SAL_CALL getImplementationName() throw ( com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& ServiceName ) + virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& ServiceName ) throw ( com::sun::star::uno::RuntimeException ); - virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() + virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw ( com::sun::star::uno::RuntimeException ); // XPropertyAccess virtual com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPropertyValues() throw ( com::sun::star::uno::RuntimeException ); virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > & aProps ) - throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, + throw ( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException ); @@ -92,7 +92,7 @@ public: throw ( ::com::sun::star::uno::RuntimeException ); // XExporter - virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) + virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) throw ( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); }; diff --git a/svtools/source/filter.vcl/filter/dlgejpg.cxx b/svtools/source/filter.vcl/filter/dlgejpg.cxx index 4cedaf70e509..1a0ae297402d 100644 --- a/svtools/source/filter.vcl/filter/dlgejpg.cxx +++ b/svtools/source/filter.vcl/filter/dlgejpg.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,8 +33,8 @@ #include "strings.hrc" #include <svtools/FilterConfigItem.hxx> -#define KEY_QUALITY "Quality" -#define KEY_GRAYSCALES "ColorMode" +#define KEY_QUALITY "Quality" +#define KEY_GRAYSCALES "ColorMode" /************************************************************************* |* @@ -44,7 +44,7 @@ DlgExportEJPG::DlgExportEJPG( FltCallDialogParameter& rPara ) : ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_JPG, *rPara.pResMgr ) ), - rFltCallPara ( rPara ), + rFltCallPara ( rPara ), aFiDescr ( this, ResId( FI_DESCR, *rPara.pResMgr ) ), aNumFldQuality ( this, ResId( NUM_FLD_QUALITY, *rPara.pResMgr ) ), aGrpQuality ( this, ResId( GRP_QUALITY, *rPara.pResMgr ) ), @@ -56,7 +56,7 @@ DlgExportEJPG::DlgExportEJPG( FltCallDialogParameter& rPara ) : aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ) { FreeResource(); - String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/JPG" ) ); + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/JPG" ) ); pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); // reading filter options diff --git a/svtools/source/filter.vcl/filter/dlgejpg.hrc b/svtools/source/filter.vcl/filter/dlgejpg.hrc index 90a3c1d162be..c5fc85483532 100644 --- a/svtools/source/filter.vcl/filter/dlgejpg.hrc +++ b/svtools/source/filter.vcl/filter/dlgejpg.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svtools/source/filter.vcl/filter/dlgejpg.hxx b/svtools/source/filter.vcl/filter/dlgejpg.hxx index efc5daa7105c..12a7922d7600 100644 --- a/svtools/source/filter.vcl/filter/dlgejpg.hxx +++ b/svtools/source/filter.vcl/filter/dlgejpg.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -51,16 +51,16 @@ private: FltCallDialogParameter& rFltCallPara; - FixedInfo aFiDescr; - NumericField aNumFldQuality; + FixedInfo aFiDescr; + NumericField aNumFldQuality; FixedLine aGrpQuality; - RadioButton aRbGray; - RadioButton aRbRGB; + RadioButton aRbGray; + RadioButton aRbRGB; FixedLine aGrpColors; - OKButton aBtnOK; - CancelButton aBtnCancel; - HelpButton aBtnHelp; - FilterConfigItem* pConfigItem; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + FilterConfigItem* pConfigItem; DECL_LINK( OK, void * ); diff --git a/svtools/source/filter.vcl/filter/dlgejpg.src b/svtools/source/filter.vcl/filter/dlgejpg.src index fd224f22c409..c0c58d7a1b82 100644 --- a/svtools/source/filter.vcl/filter/dlgejpg.src +++ b/svtools/source/filter.vcl/filter/dlgejpg.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svtools/source/filter.vcl/filter/dlgepng.cxx b/svtools/source/filter.vcl/filter/dlgepng.cxx index 1b400cba87c6..95e25de06be5 100644 --- a/svtools/source/filter.vcl/filter/dlgepng.cxx +++ b/svtools/source/filter.vcl/filter/dlgepng.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,8 +44,8 @@ using namespace ::com::sun::star::uno; DlgExportEPNG::DlgExportEPNG( FltCallDialogParameter& rPara ) : ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EPNG, *rPara.pResMgr ) ), - FilterConfigItem ( OUString( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/PNG" ) ), &rPara.aFilterData ), - rFltCallPara ( rPara ), + FilterConfigItem ( OUString( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/PNG" ) ), &rPara.aFilterData ), + rFltCallPara ( rPara ), aGrpCompression ( this, ResId( GRP_COMPRESSION, *rPara.pResMgr ) ), aFiCompression ( this, ResId( FI_COMPRESSION, *rPara.pResMgr ) ), aNumCompression ( this, ResId( NUM_COMPRESSION, *rPara.pResMgr ) ), @@ -53,18 +53,18 @@ DlgExportEPNG::DlgExportEPNG( FltCallDialogParameter& rPara ) : aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ), - pMgr ( rPara.pResMgr ) + pMgr ( rPara.pResMgr ) { FreeResource(); // Config-Parameter lesen - sal_Int32 nCompression = ReadInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), 6 ); + sal_Int32 nCompression = ReadInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Compression" ) ), 6 ); if ( ( nCompression < 0 ) || ( nCompression > 9 ) ) nCompression = 6; aNumCompression.SetValue( nCompression ); - sal_Int32 nInterlaced = ReadInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 0 ); - sal_Bool bInterlaced = nInterlaced != 0; + sal_Int32 nInterlaced = ReadInt32( OUString( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 0 ); + sal_Bool bInterlaced = nInterlaced != 0; aCbxInterlaced.Check( bInterlaced ); aBtnOK.SetClickHdl( LINK( this, DlgExportEPNG, OK ) ); diff --git a/svtools/source/filter.vcl/filter/dlgepng.hrc b/svtools/source/filter.vcl/filter/dlgepng.hrc index b3ffaab3ab1e..d63234de40fb 100644 --- a/svtools/source/filter.vcl/filter/dlgepng.hrc +++ b/svtools/source/filter.vcl/filter/dlgepng.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svtools/source/filter.vcl/filter/dlgepng.hxx b/svtools/source/filter.vcl/filter/dlgepng.hxx index b43feafc0d49..e4f9123b1190 100644 --- a/svtools/source/filter.vcl/filter/dlgepng.hxx +++ b/svtools/source/filter.vcl/filter/dlgepng.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,14 +53,14 @@ class DlgExportEPNG : public ModalDialog, FilterConfigItem FltCallDialogParameter& rFltCallPara; - FixedLine aGrpCompression; - FixedInfo aFiCompression; - NumericField aNumCompression; - CheckBox aCbxInterlaced; - OKButton aBtnOK; - CancelButton aBtnCancel; - HelpButton aBtnHelp; - ResMgr* pMgr; + FixedLine aGrpCompression; + FixedInfo aFiCompression; + NumericField aNumCompression; + CheckBox aCbxInterlaced; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + ResMgr* pMgr; DECL_LINK( OK, void * ); diff --git a/svtools/source/filter.vcl/filter/dlgepng.src b/svtools/source/filter.vcl/filter/dlgepng.src index aa778842dc48..9924441fbfc3 100644 --- a/svtools/source/filter.vcl/filter/dlgepng.src +++ b/svtools/source/filter.vcl/filter/dlgepng.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svtools/source/filter.vcl/filter/dlgexpor.cxx b/svtools/source/filter.vcl/filter/dlgexpor.cxx index 951dd2c1a551..0157549c8d89 100644 --- a/svtools/source/filter.vcl/filter/dlgexpor.cxx +++ b/svtools/source/filter.vcl/filter/dlgexpor.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,7 +30,7 @@ #include "precompiled_svtools.hxx" #ifndef GCC -# pragma hdrstop +# pragma hdrstop #endif #include <tools/ref.hxx> @@ -49,7 +49,7 @@ DlgExportPix::DlgExportPix( FltCallDialogParameter& rPara ) : ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_PIX, *rPara.pResMgr ) ), - rFltCallPara ( rPara ), + rFltCallPara ( rPara ), aBtnOK ( this, ResId( BTN_OK_PIX, *rPara.pResMgr ) ), aBtnCancel ( this, ResId( BTN_CANCEL_PIX, *rPara.pResMgr ) ), aBtnHelp ( this, ResId( BTN_HELP_PIX, *rPara.pResMgr ) ), @@ -65,15 +65,15 @@ DlgExportPix::DlgExportPix( FltCallDialogParameter& rPara ) : aMtfSizeY ( this, ResId( MTF_SIZEY_PIX, *rPara.pResMgr ) ), aGrpMode ( this, ResId( GRP_MODE_PIX, *rPara.pResMgr ) ), aCbbRes ( this, ResId( CBB_RES_PIX, *rPara.pResMgr ) ), - pMgr ( rPara.pResMgr ), - aExt ( rPara.aFilterExt ) + pMgr ( rPara.pResMgr ), + aExt ( rPara.aFilterExt ) { aExt.ToUpperAscii(); - String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/" ) ); + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/" ) ); aFilterConfigPath.Append( aExt ); pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); - String aTitle( aExt ); + String aTitle( aExt ); FreeResource(); aBtnOK.SetClickHdl( LINK( this, DlgExportPix, OK ) ); @@ -112,13 +112,13 @@ DlgExportPix::DlgExportPix( FltCallDialogParameter& rPara ) : switch ( rPara.eFieldUnit ) { -// case FUNIT_NONE : -// case FUNIT_KM : -// case FUNIT_PERCENT : -// case FUNIT_CUSTOM : -// case FUNIT_MILE : -// case FUNIT_FOOT : -// case FUNIT_M : +// case FUNIT_NONE : +// case FUNIT_KM : +// case FUNIT_PERCENT : +// case FUNIT_CUSTOM : +// case FUNIT_MILE : +// case FUNIT_FOOT : +// case FUNIT_M : case FUNIT_MM : case FUNIT_CM : case FUNIT_TWIP : @@ -133,7 +133,7 @@ DlgExportPix::DlgExportPix( FltCallDialogParameter& rPara ) : break; default: - break; // -Wall multiple values not handled. + break; // -Wall multiple values not handled. } switch ( nMode ) @@ -176,7 +176,7 @@ IMPL_LINK( DlgExportPix, OK, void *, EMPTYARG ) { // Config-Parameter schreiben - sal_Int32 nRes = Max( Min( aCbbRes.GetText().ToInt32(), sal_Int32( 600 ) ), sal_Int32( 75 ) ); + sal_Int32 nRes = Max( Min( aCbbRes.GetText().ToInt32(), sal_Int32( 600 ) ), sal_Int32( 75 ) ); ::com::sun::star::awt::Size aSize( static_cast<long>(MetricField::ConvertDoubleValue( static_cast<double>(aMtfSizeX.GetValue()), 2, aMtfSizeX.GetUnit(), MAP_100TH_MM )), static_cast<long>(MetricField::ConvertDoubleValue( static_cast<double>(aMtfSizeY.GetValue()), 2, aMtfSizeY.GetUnit(), MAP_100TH_MM )) ); @@ -287,7 +287,7 @@ IMPL_LINK( DlgExportPix, SelectLbColors, void*, EMPTYARG ) DlgExportVec::DlgExportVec( FltCallDialogParameter& rPara ) : ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_VEC, *rPara.pResMgr ) ), - rFltCallPara ( rPara ), + rFltCallPara ( rPara ), aBtnOK ( this, ResId( BTN_OK_VEC, *rPara.pResMgr ) ), aBtnCancel ( this, ResId( BTN_CANCEL_VEC, *rPara.pResMgr ) ), aBtnHelp ( this, ResId( BTN_HELP_VEC, *rPara.pResMgr ) ), @@ -299,15 +299,15 @@ DlgExportVec::DlgExportVec( FltCallDialogParameter& rPara ) : aFtSizeY ( this, ResId( FT_SIZEY_VEC, *rPara.pResMgr ) ), aMtfSizeY ( this, ResId( MTF_SIZEY_VEC, *rPara.pResMgr ) ), aGrpSize ( this, ResId( GRP_SIZE_VEC, *rPara.pResMgr ) ), - pMgr ( rPara.pResMgr ), - aExt ( rPara.aFilterExt ) + pMgr ( rPara.pResMgr ), + aExt ( rPara.aFilterExt ) { aExt.ToUpperAscii(); - String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/" ) ); + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/" ) ); aFilterConfigPath.Append( aExt ); pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); - String aTitle( aExt ); + String aTitle( aExt ); FreeResource(); aBtnOK.SetClickHdl( LINK( this, DlgExportVec, OK ) ); @@ -332,12 +332,12 @@ DlgExportVec::DlgExportVec( FltCallDialogParameter& rPara ) : switch ( rPara.eFieldUnit ) { -// case FUNIT_NONE : -// case FUNIT_KM : -// case FUNIT_PERCENT : -// case FUNIT_CUSTOM : -// case FUNIT_MILE : -// case FUNIT_FOOT : +// case FUNIT_NONE : +// case FUNIT_KM : +// case FUNIT_PERCENT : +// case FUNIT_CUSTOM : +// case FUNIT_MILE : +// case FUNIT_FOOT : case FUNIT_MM : case FUNIT_CM : case FUNIT_M : @@ -352,7 +352,7 @@ DlgExportVec::DlgExportVec( FltCallDialogParameter& rPara ) : } break; default: - break; // -Wall Multiple values not handled. + break; // -Wall Multiple values not handled. } switch ( nMode ) diff --git a/svtools/source/filter.vcl/filter/dlgexpor.hrc b/svtools/source/filter.vcl/filter/dlgexpor.hrc index 69870c9b00b0..d25380b6dd18 100644 --- a/svtools/source/filter.vcl/filter/dlgexpor.hrc +++ b/svtools/source/filter.vcl/filter/dlgexpor.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svtools/source/filter.vcl/filter/dlgexpor.hxx b/svtools/source/filter.vcl/filter/dlgexpor.hxx index 4c8b926335cd..13a518c97938 100644 --- a/svtools/source/filter.vcl/filter/dlgexpor.hxx +++ b/svtools/source/filter.vcl/filter/dlgexpor.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,28 +50,28 @@ private: FltCallDialogParameter& rFltCallPara; - OKButton aBtnOK; - CancelButton aBtnCancel; - HelpButton aBtnHelp; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; - ListBox aLbColors; - CheckBox aCbxRLE; - FixedLine aGrpColors; + ListBox aLbColors; + CheckBox aCbxRLE; + FixedLine aGrpColors; - RadioButton aRbOriginal; - RadioButton aRbRes; - RadioButton aRbSize; - FixedText aFtSizeX; - MetricField aMtfSizeX; - FixedText aFtSizeY; - MetricField aMtfSizeY; - FixedLine aGrpMode; - ComboBox aCbbRes; + RadioButton aRbOriginal; + RadioButton aRbRes; + RadioButton aRbSize; + FixedText aFtSizeX; + MetricField aMtfSizeX; + FixedText aFtSizeY; + MetricField aMtfSizeY; + FixedLine aGrpMode; + ComboBox aCbbRes; - FilterConfigItem* pConfigItem; - ResMgr* pMgr; + FilterConfigItem* pConfigItem; + ResMgr* pMgr; - String aExt; + String aExt; DECL_LINK( OK, void* p ); DECL_LINK( ClickRbOriginal,void* p ); @@ -96,24 +96,24 @@ private: FltCallDialogParameter& rFltCallPara; - OKButton aBtnOK; - CancelButton aBtnCancel; - HelpButton aBtnHelp; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; - RadioButton aRbOriginal; - RadioButton aRbSize; - FixedLine aGrpMode; + RadioButton aRbOriginal; + RadioButton aRbSize; + FixedLine aGrpMode; - FixedText aFtSizeX; - MetricField aMtfSizeX; - FixedText aFtSizeY; - MetricField aMtfSizeY; - FixedLine aGrpSize; + FixedText aFtSizeX; + MetricField aMtfSizeX; + FixedText aFtSizeY; + MetricField aMtfSizeY; + FixedLine aGrpSize; - FilterConfigItem* pConfigItem; - ResMgr* pMgr; + FilterConfigItem* pConfigItem; + ResMgr* pMgr; - String aExt; + String aExt; DECL_LINK( OK, void* p ); DECL_LINK( ClickRbOriginal,void* p ); diff --git a/svtools/source/filter.vcl/filter/dlgexpor.src b/svtools/source/filter.vcl/filter/dlgexpor.src index 7573b394d72f..1edef36ed5f7 100644 --- a/svtools/source/filter.vcl/filter/dlgexpor.src +++ b/svtools/source/filter.vcl/filter/dlgexpor.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -198,7 +198,7 @@ ModalDialog DLG_EXPORT_VEC RadioButton RB_SIZE_VEC { Pos = MAP_APPFONT ( 12 , 28 ) ; - Size = MAP_APPFONT ( 98 , 10 ) ; + Size = MAP_APPFONT ( 98 , 10 ) ; TabStop = TRUE ; Text [ en-US ] = "~Size" ; }; diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx index 879bf684b5a6..e8ddf8828ea9 100644 --- a/svtools/source/filter.vcl/filter/filter.cxx +++ b/svtools/source/filter.vcl/filter/filter.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -76,21 +76,21 @@ #include "SvFilterOptionsDialog.hxx" -#define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF +#define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF #if defined WIN || (defined OS2 && !defined ICC) -#define IMPORT_FUNCTION_NAME "_GraphicImport" -#define EXPORT_FUNCTION_NAME "_GraphicExport" -#define IMPDLG_FUNCTION_NAME "_DoImportDialog" -#define EXPDLG_FUNCTION_NAME "_DoExportDialog" +#define IMPORT_FUNCTION_NAME "_GraphicImport" +#define EXPORT_FUNCTION_NAME "_GraphicExport" +#define IMPDLG_FUNCTION_NAME "_DoImportDialog" +#define EXPDLG_FUNCTION_NAME "_DoExportDialog" #else -#define IMPORT_FUNCTION_NAME "GraphicImport" -#define EXPORT_FUNCTION_NAME "GraphicExport" -#define IMPDLG_FUNCTION_NAME "DoImportDialog" -#define EXPDLG_FUNCTION_NAME "DoExportDialog" +#define IMPORT_FUNCTION_NAME "GraphicImport" +#define EXPORT_FUNCTION_NAME "GraphicExport" +#define IMPDLG_FUNCTION_NAME "DoImportDialog" +#define EXPDLG_FUNCTION_NAME "DoExportDialog" #endif @@ -106,11 +106,11 @@ using namespace ::rtl; using namespace ::com::sun::star; -static List* pFilterHdlList = NULL; +static List* pFilterHdlList = NULL; static ::osl::Mutex& getListMutex() { - static ::osl::Mutex s_aListProtection; + static ::osl::Mutex s_aListProtection; return s_aListProtection; } @@ -124,11 +124,11 @@ class ImpFilterOutputStream : public ::cppu::WeakImplHelper1< ::com::sun::star:: { protected: - SvStream& mrStm; + SvStream& mrStm; - virtual void SAL_CALL writeBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& rData ) throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { mrStm.Write( rData.getConstArray(), rData.getLength() ); } - virtual void SAL_CALL flush() throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { mrStm.Flush(); } - virtual void SAL_CALL closeOutput() throw() {} + virtual void SAL_CALL writeBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& rData ) throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { mrStm.Write( rData.getConstArray(), rData.getLength() ); } + virtual void SAL_CALL flush() throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { mrStm.Flush(); } + virtual void SAL_CALL closeOutput() throw() {} public: @@ -142,8 +142,8 @@ BOOL ImplDirEntryHelper::Exists( const INetURLObject& rObj ) try { - ::rtl::OUString aTitle; - ::ucbhelper::Content aCnt( rObj.GetMainURL( INetURLObject::NO_DECODE ), + ::rtl::OUString aTitle; + ::ucbhelper::Content aCnt( rObj.GetMainURL( INetURLObject::NO_DECODE ), ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() ); bExists = aCnt.isDocument(); @@ -158,7 +158,7 @@ BOOL ImplDirEntryHelper::Exists( const INetURLObject& rObj ) } catch( ... ) { -// DBG_ERRORFILE( "Any other exception" ); +// DBG_ERRORFILE( "Any other exception" ); } return bExists; } @@ -212,8 +212,8 @@ BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize ) inline String ImpGetExtension( const String &rPath ) { - String aExt; - INetURLObject aURL( rPath ); + String aExt; + INetURLObject aURL( rPath ); aExt = aURL.GetFileExtension().toAsciiUpperCase(); return aExt; } @@ -256,7 +256,7 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B USHORT i; BYTE sFirstBytes[ 256 ]; ULONG nFirstLong,nSecondLong; - ULONG nStreamPos = rStream.Tell(); + ULONG nStreamPos = rStream.Tell(); rStream.Seek( STREAM_SEEK_TO_END ); ULONG nStreamLen = rStream.Tell() - nStreamPos; @@ -552,7 +552,7 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B { bSomethingTested = TRUE; BYTE sBuf[4]; - sal_uInt32 nOffset; // in ms documents the pict format is used without the first 512 bytes + sal_uInt32 nOffset; // in ms documents the pict format is used without the first 512 bytes for ( nOffset = 10; ( nOffset <= 522 ) && ( ( nStreamPos + nOffset + 3 ) <= nStreamLen ); nOffset += 512 ) { rStream.Seek( nStreamPos + nOffset ); @@ -740,9 +740,9 @@ sal_uInt16 GraphicFilter::ImpTestOrFindFormat( const String& rPath, SvStream& rS static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& rConfigItem ) { - Graphic aGraphic; - ByteString aResMgrName( "svt", 3 ); - ResMgr* pResMgr; + Graphic aGraphic; + ByteString aResMgrName( "svt", 3 ); + ResMgr* pResMgr; pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); @@ -753,9 +753,9 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r { sal_Int32 nMode = rConfigItem.ReadInt32( String( ResId( KEY_MODE, *pResMgr ) ), -1 ); - if ( nMode == -1 ) // the property is not there, this is possible, if the graphic filter - { // is called via UnoGraphicExporter and not from a graphic export Dialog - nMode = 0; // then we are defaulting this mode to 0 + if ( nMode == -1 ) // the property is not there, this is possible, if the graphic filter + { // is called via UnoGraphicExporter and not from a graphic export Dialog + nMode = 0; // then we are defaulting this mode to 0 if ( nLogicalWidth || nLogicalHeight ) nMode = 2; } @@ -778,11 +778,11 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r // Aufloesung wird eingestellt if( nMode == 1 ) { - Bitmap aBitmap( rGraphic.GetBitmap() ); - MapMode aMap( MAP_100TH_INCH ); + Bitmap aBitmap( rGraphic.GetBitmap() ); + MapMode aMap( MAP_100TH_INCH ); sal_Int32 nDPI = rConfigItem.ReadInt32( String( ResId( KEY_RES, *pResMgr ) ), 75 ); - Fraction aFrac( 1, Min( Max( nDPI, sal_Int32( 75 ) ), sal_Int32( 600 ) ) ); + Fraction aFrac( 1, Min( Max( nDPI, sal_Int32( 75 ) ), sal_Int32( 600 ) ) ); aMap.SetScaleX( aFrac ); aMap.SetScaleY( aFrac ); @@ -817,7 +817,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r { if( ( nMode == 1 ) || ( nMode == 2 ) ) { - GDIMetaFile aMtf( rGraphic.GetGDIMetaFile() ); + GDIMetaFile aMtf( rGraphic.GetGDIMetaFile() ); ::com::sun::star::awt::Size aDefaultSize( 10000, 10000 ); Size aNewSize( OutputDevice::LogicToLogic( Size( nLogicalWidth, nLogicalHeight ), MAP_100TH_MM, aMtf.GetPrefMapMode() ) ); @@ -844,12 +844,12 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r static String ImpCreateFullFilterPath( const String& rPath, const String& rFilterName ) { - ::rtl::OUString aPathURL; + ::rtl::OUString aPathURL; ::osl::FileBase::getFileURLFromSystemPath( rPath, aPathURL ); aPathURL += String( '/' ); - ::rtl::OUString aSystemPath; + ::rtl::OUString aSystemPath; ::osl::FileBase::getSystemPathFromFileURL( aPathURL, aSystemPath ); aSystemPath += ::rtl::OUString( rFilterName ); @@ -865,29 +865,29 @@ class ImpFilterLibCache; struct ImpFilterLibCacheEntry { - ImpFilterLibCacheEntry* mpNext; - osl::Module maLibrary; - String maFiltername; - PFilterCall mpfnImport; - PFilterDlgCall mpfnImportDlg; + ImpFilterLibCacheEntry* mpNext; + osl::Module maLibrary; + String maFiltername; + PFilterCall mpfnImport; + PFilterDlgCall mpfnImportDlg; ImpFilterLibCacheEntry( const String& rPathname, const String& rFiltername ); - int operator==( const String& rFiltername ) const { return maFiltername == rFiltername; } + int operator==( const String& rFiltername ) const { return maFiltername == rFiltername; } - PFilterCall GetImportFunction(); - PFilterDlgCall GetImportDlgFunction(); - PFilterCall GetExportFunction() { return (PFilterCall) maLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPORT_FUNCTION_NAME ) ); } - PFilterDlgCall GetExportDlgFunction() { return (PFilterDlgCall) maLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPDLG_FUNCTION_NAME ) ); } + PFilterCall GetImportFunction(); + PFilterDlgCall GetImportDlgFunction(); + PFilterCall GetExportFunction() { return (PFilterCall) maLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPORT_FUNCTION_NAME ) ); } + PFilterDlgCall GetExportDlgFunction() { return (PFilterDlgCall) maLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPDLG_FUNCTION_NAME ) ); } }; // ------------------------------------------------------------------------ ImpFilterLibCacheEntry::ImpFilterLibCacheEntry( const String& rPathname, const String& rFiltername ) : - mpNext ( NULL ), - maLibrary ( rPathname ), - maFiltername ( rFiltername ), - mpfnImport ( NULL ), - mpfnImportDlg ( NULL ) + mpNext ( NULL ), + maLibrary ( rPathname ), + maFiltername ( rFiltername ), + mpfnImport ( NULL ), + mpfnImportDlg ( NULL ) { } @@ -917,21 +917,21 @@ PFilterDlgCall ImpFilterLibCacheEntry::GetImportDlgFunction() class ImpFilterLibCache { - ImpFilterLibCacheEntry* mpFirst; - ImpFilterLibCacheEntry* mpLast; + ImpFilterLibCacheEntry* mpFirst; + ImpFilterLibCacheEntry* mpLast; public: ImpFilterLibCache(); ~ImpFilterLibCache(); - ImpFilterLibCacheEntry* GetFilter( const String& rFilterPath, const String& rFiltername ); + ImpFilterLibCacheEntry* GetFilter( const String& rFilterPath, const String& rFiltername ); }; // ------------------------------------------------------------------------ ImpFilterLibCache::ImpFilterLibCache() : - mpFirst ( NULL ), - mpLast ( NULL ) + mpFirst ( NULL ), + mpLast ( NULL ) { } @@ -939,7 +939,7 @@ ImpFilterLibCache::ImpFilterLibCache() : ImpFilterLibCache::~ImpFilterLibCache() { - ImpFilterLibCacheEntry* pEntry = mpFirst; + ImpFilterLibCacheEntry* pEntry = mpFirst; while( pEntry ) { ImpFilterLibCacheEntry* pNext = pEntry->mpNext; @@ -952,7 +952,7 @@ ImpFilterLibCache::~ImpFilterLibCache() ImpFilterLibCacheEntry* ImpFilterLibCache::GetFilter( const String& rFilterPath, const String& rFilterName ) { - ImpFilterLibCacheEntry* pEntry = mpFirst; + ImpFilterLibCacheEntry* pEntry = mpFirst; while( pEntry ) { @@ -991,7 +991,7 @@ namespace { struct Cache : public rtl::Static<ImpFilterLibCache, Cache> {}; } // ----------------- GraphicFilter::GraphicFilter( sal_Bool bConfig ) : - bUseConfig ( bConfig ), + bUseConfig ( bConfig ), nExpGraphHint ( 0 ) { ImplInit(); @@ -1231,11 +1231,11 @@ BOOL GraphicFilter::IsExportPixelFormat( USHORT nFormat ) USHORT GraphicFilter::CanImportGraphic( const INetURLObject& rPath, USHORT nFormat, USHORT* pDeterminedFormat ) { - sal_uInt16 nRetValue = GRFILTER_FORMATERROR; + sal_uInt16 nRetValue = GRFILTER_FORMATERROR; DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::CanImportGraphic() : ProtType == INET_PROT_NOT_VALID" ); - String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); - SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_READ | STREAM_SHARE_DENYNONE ); + String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); + SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_READ | STREAM_SHARE_DENYNONE ); if ( pStream ) { nRetValue = CanImportGraphic( aMainUrl, *pStream, nFormat, pDeterminedFormat ); @@ -1268,8 +1268,8 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject& rPa sal_uInt16 nRetValue = GRFILTER_FORMATERROR; DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ImportGraphic() : ProtType == INET_PROT_NOT_VALID" ); - String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); - SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_READ | STREAM_SHARE_DENYNONE ); + String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); + SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_READ | STREAM_SHARE_DENYNONE ); if ( pStream ) { nRetValue = ImportGraphic( rGraphic, aMainUrl, *pStream, nFormat, pDeterminedFormat, nImportFlags ); @@ -1290,18 +1290,18 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS USHORT nFormat, USHORT* pDeterminedFormat, sal_uInt32 nImportFlags, com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData ) { - String aFilterName; - ULONG nStmBegin; - USHORT nStatus; - GraphicReader* pContext = rGraphic.GetContext(); - GfxLinkType eLinkType = GFX_LINK_TYPE_NONE; - BOOL bDummyContext = ( pContext == (GraphicReader*) 1 ); - const BOOL bLinkSet = rGraphic.IsLink(); + String aFilterName; + ULONG nStmBegin; + USHORT nStatus; + GraphicReader* pContext = rGraphic.GetContext(); + GfxLinkType eLinkType = GFX_LINK_TYPE_NONE; + BOOL bDummyContext = ( pContext == (GraphicReader*) 1 ); + const BOOL bLinkSet = rGraphic.IsLink(); FilterConfigItem* pFilterConfigItem = NULL; - Size aPreviewSizeHint( 0, 0 ); - sal_Bool bAllowPartialStreamRead = sal_False; - sal_Bool bCreateNativeLink = sal_True; + Size aPreviewSizeHint( 0, 0 ); + sal_Bool bAllowPartialStreamRead = sal_False; + sal_Bool bCreateNativeLink = sal_True; ResetLastError(); @@ -1496,8 +1496,8 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS else if( aFilterName.EqualsIgnoreCaseAscii( IMP_SVSGF ) || aFilterName.EqualsIgnoreCaseAscii( IMP_SVSGV ) ) { - USHORT nVersion; - unsigned char nTyp = CheckSgfTyp( rIStream, nVersion ); + USHORT nVersion; + unsigned char nTyp = CheckSgfTyp( rIStream, nVersion ); switch( nTyp ) { @@ -1560,7 +1560,7 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS } else { - ImpFilterLibCacheEntry* pFilter = NULL; + ImpFilterLibCacheEntry* pFilter = NULL; // find first filter in filter pathes xub_StrLen i, nTokenCount = aFilterPath.GetTokenCount( ';' ); @@ -1609,11 +1609,11 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS if( nStatus == GRFILTER_OK && bCreateNativeLink && ( eLinkType != GFX_LINK_TYPE_NONE ) && !rGraphic.GetContext() && !bLinkSet ) { const ULONG nStmEnd = rIStream.Tell(); - const ULONG nBufSize = nStmEnd - nStmBegin; + const ULONG nBufSize = nStmEnd - nStmBegin; if( nBufSize ) { - BYTE* pBuf=0; + BYTE* pBuf=0; try { pBuf = new BYTE[ nBufSize ]; @@ -1653,12 +1653,12 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath, sal_uInt16 nFormat, const uno::Sequence< beans::PropertyValue >* pFilterData ) { - sal_uInt16 nRetValue = GRFILTER_FORMATERROR; + sal_uInt16 nRetValue = GRFILTER_FORMATERROR; DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ExportGraphic() : ProtType == INET_PROT_NOT_VALID" ); - BOOL bAlreadyExists = ImplDirEntryHelper::Exists( rPath ); + BOOL bAlreadyExists = ImplDirEntryHelper::Exists( rPath ); - String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); - SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_WRITE | STREAM_TRUNC ); + String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) ); + SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_WRITE | STREAM_TRUNC ); if ( pStream ) { nRetValue = ExportGraphic( rGraphic, aMainUrl, *pStream, nFormat, pFilterData ); @@ -1701,10 +1701,10 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData ); String aFilterName( pConfig->GetExportFilterName( nFormat ) ); - bAbort = FALSE; - USHORT nStatus = GRFILTER_OK; - GraphicType eType; - Graphic aGraphic( rGraphic ); + bAbort = FALSE; + USHORT nStatus = GRFILTER_OK; + GraphicType eType; + Graphic aGraphic( rGraphic ); aGraphic = ImpGetScaledGraphic( rGraphic, aConfigItem ); eType = aGraphic.GetType(); @@ -1718,9 +1718,9 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat VirtualDevice aVirDev; // Maximalen Speicherbedarf fuer das Bildes holen: -// if( GetOptionsConfig() ) -// nMaxMem = (UINT32)GetOptionsConfig()->ReadKey( "VEC-TO-PIX-MAX-KB", "1024" ).ToInt32(); -// else +// if( GetOptionsConfig() ) +// nMaxMem = (UINT32)GetOptionsConfig()->ReadKey( "VEC-TO-PIX-MAX-KB", "1024" ).ToInt32(); +// else nMaxMem = 1024; nMaxMem *= 1024; // In Bytes @@ -1769,7 +1769,7 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat if( !aBmp.Convert( (BmpConversion) nColorRes ) ) aBmp = aGraphic.GetBitmap(); } - ResMgr* pResMgr = CREATERESMGR( svt ); + ResMgr* pResMgr = CREATERESMGR( svt ); sal_Bool bRleCoding = aConfigItem.ReadBool( String( ResId( KEY_RLE_CODING, *pResMgr ) ), sal_True ); // Wollen wir RLE-Kodiert speichern? aBmp.Write( rOStm, bRleCoding ); @@ -1783,7 +1783,7 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat sal_Int32 nVersion = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), 0 ) ; if ( nVersion ) rOStm.SetVersion( nVersion ); - GDIMetaFile aMTF; + GDIMetaFile aMTF; if ( eType != GRAPHIC_BITMAP ) aMTF = aGraphic.GetGDIMetaFile(); @@ -1810,9 +1810,9 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat } else { - Bitmap aBmp( aGraphic.GetBitmap() ); - GDIMetaFile aMTF; - VirtualDevice aVirDev; + Bitmap aBmp( aGraphic.GetBitmap() ); + GDIMetaFile aMTF; + VirtualDevice aVirDev; aMTF.Record( &aVirDev ); aVirDev.DrawBitmap( Point(), aBmp ); @@ -1834,9 +1834,9 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat } else { - Bitmap aBmp( aGraphic.GetBitmap() ); - GDIMetaFile aMTF; - VirtualDevice aVirDev; + Bitmap aBmp( aGraphic.GetBitmap() ); + GDIMetaFile aMTF; + VirtualDevice aVirDev; aMTF.Record( &aVirDev ); aVirDev.DrawBitmap( Point(), aBmp ); @@ -1933,7 +1933,7 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat if( xActiveDataSource.is() ) { - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xStmIf( + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xStmIf( static_cast< ::cppu::OWeakObject* >( new ImpFilterOutputStream( rOStm ) ) ); SvMemoryStream aMemStm( 65535, 65535 ); @@ -2002,7 +2002,7 @@ BOOL GraphicFilter::Setup( USHORT ) BOOL GraphicFilter::HasImportDialog( USHORT ) { return sal_True; -// return pConfig->IsImportDialog( nFormat ); +// return pConfig->IsImportDialog( nFormat ); } // ------------------------------------------------------------------------ @@ -2084,8 +2084,8 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, pData ) if( pData ) { - USHORT nFormat = GRFILTER_FORMAT_DONTKNOW; - ByteString aShortName; + USHORT nFormat = GRFILTER_FORMAT_DONTKNOW; + ByteString aShortName; switch( pData->mnFormat ) { case( CVT_BMP ): aShortName = BMP_SHORTNAME; break; diff --git a/svtools/source/filter.vcl/filter/filter2.cxx b/svtools/source/filter.vcl/filter/filter2.cxx index 0220961b657a..985da72df106 100644 --- a/svtools/source/filter.vcl/filter/filter2.cxx +++ b/svtools/source/filter.vcl/filter/filter2.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ #include "FilterConfigCache.hxx" #include <unotools/ucbstreamhelper.hxx> -#define DATA_SIZE 640 +#define DATA_SIZE 640 BYTE* ImplSearchEntry( BYTE* , BYTE* , ULONG , ULONG ); @@ -51,7 +51,7 @@ BYTE* ImplSearchEntry( BYTE* , BYTE* , ULONG , ULONG ); \************************************************************************/ GraphicDescriptor::GraphicDescriptor( const String* pPath ) : - pFileStm ( NULL ) + pFileStm ( NULL ) { ImpConstruct(); @@ -96,7 +96,7 @@ GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) : \************************************************************************/ GraphicDescriptor::GraphicDescriptor( SvStream& rInStream, const String* pPath) : - pFileStm ( NULL ) + pFileStm ( NULL ) { ImpConstruct(); @@ -150,32 +150,32 @@ BOOL GraphicDescriptor::Detect( BOOL bExtendedInfo ) if ( bDataReady ) { - SvStream& rStm = GetSearchStream(); - UINT16 nOldFormat = rStm.GetNumberFormatInt(); - - if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = TRUE; - else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = TRUE; + SvStream& rStm = GetSearchStream(); + UINT16 nOldFormat = rStm.GetNumberFormatInt(); + + if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = TRUE; + else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = TRUE; // diese Formate lassen sich nur bei WideSearch im gesamten // Stream ermitteln @@ -262,8 +262,8 @@ ULONG GraphicDescriptor::GetRequestedByteCount() const /******************************************************************************/ -/* IMP-Methoden */ -/* */ +/* IMP-Methoden */ +/* */ /************************************************************************* @@ -296,8 +296,8 @@ void GraphicDescriptor::ImpConstruct() BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo ) { - UINT16 nTemp16; - BOOL bRet = FALSE; + UINT16 nTemp16; + BOOL bRet = FALSE; rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); rStm.Seek( nStmPos ); @@ -319,8 +319,8 @@ BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo ) if ( bExtendedInfo ) { - UINT32 nTemp32; - UINT32 nCompression; + UINT32 nTemp32; + UINT32 nCompression; // bis zur ersten Information rStm.SeekRel( 0x10 ); @@ -378,10 +378,10 @@ BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo ) BOOL GraphicDescriptor::ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo ) { - UINT32 n32; - UINT16 n16; - BOOL bRet = FALSE; - BYTE cByte; + UINT32 n32; + UINT16 n16; + BOOL bRet = FALSE; + BYTE cByte; rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); rStm.Seek( nStmPos ); @@ -426,10 +426,10 @@ BOOL GraphicDescriptor::ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo ) BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo ) { - UINT32 nTemp32; - BOOL bRet = FALSE; - BYTE cByte = 0; - BOOL bM_COM; + UINT32 nTemp32; + BOOL bRet = FALSE; + BYTE cByte = 0; + BOOL bM_COM; rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); rStm.Seek( nStmPos ); @@ -460,12 +460,12 @@ BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo ) if( bExtendedInfo ) { MapMode aMap; - UINT16 nTemp16; - ULONG nCount = 9; - ULONG nMax; - ULONG nResX; - ULONG nResY; - BYTE cUnit; + UINT16 nTemp16; + ULONG nCount = 9; + ULONG nMax; + ULONG nResX; + ULONG nResY; + BYTE cUnit; // Groesse des verbleibenden Puffers ermitteln if ( bLinked ) @@ -555,16 +555,16 @@ BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo ) BOOL GraphicDescriptor::ImpDetectPCD( SvStream& rStm, BOOL ) { - BOOL bRet = FALSE; + BOOL bRet = FALSE; rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); rStm.Seek( nStmPos ); if ( bWideSearch ) { - UINT32 nTemp32; - UINT16 nTemp16; - BYTE cByte; + UINT32 nTemp32; + UINT16 nTemp16; + BYTE cByte; rStm.SeekRel( 2048 ); rStm >> nTemp32; @@ -606,8 +606,8 @@ BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo ) // We must detect the whole header. bExtendedInfo = TRUE; - BOOL bRet = FALSE; - BYTE cByte; + BOOL bRet = FALSE; + BYTE cByte; rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); rStm.Seek( nStmPos ); @@ -620,13 +620,13 @@ BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo ) if ( bExtendedInfo ) { - UINT16 nTemp16; - USHORT nXmin; - USHORT nXmax; - USHORT nYmin; - USHORT nYmax; - USHORT nDPIx; - USHORT nDPIy; + UINT16 nTemp16; + USHORT nXmin; + USHORT nXmax; + USHORT nYmin; + USHORT nYmax; + USHORT nDPIx; + USHORT nDPIy; rStm.SeekRel( 1 ); @@ -661,7 +661,7 @@ BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo ) nDPIy = nTemp16; // logische Groesse setzen - MapMode aMap( MAP_INCH, Point(), + MapMode aMap( MAP_INCH, Point(), Fraction( 1, nDPIx ), Fraction( 1, nDPIy ) ); aLogSize = OutputDevice::LogicToLogic( aPixSize, aMap, MapMode( MAP_100TH_MM ) ); @@ -688,8 +688,8 @@ BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo ) BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo ) { - UINT32 nTemp32; - BOOL bRet = FALSE; + UINT32 nTemp32; + BOOL bRet = FALSE; rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); rStm.Seek( nStmPos ); @@ -729,7 +729,7 @@ BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo ) if ( bWideSearch ) { - UINT32 nLen32; + UINT32 nLen32; rStm.SeekRel( 8 ); @@ -746,8 +746,8 @@ BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo ) if ( nTemp32 == 0x70485973 ) { - ULONG nXRes; - ULONG nYRes; + ULONG nXRes; + ULONG nYRes; // horizontale Aufloesung rStm >> nTemp32; @@ -788,10 +788,10 @@ BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo ) BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo ) { - BOOL bDetectOk = FALSE; - BOOL bRet = FALSE; - BYTE cByte1; - BYTE cByte2; + BOOL bDetectOk = FALSE; + BOOL bRet = FALSE; + BYTE cByte1; + BYTE cByte2; rStm.Seek( nStmPos ); rStm >> cByte1; @@ -811,7 +811,7 @@ BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo ) if ( bDetectOk ) { - UINT16 nTemp16; + UINT16 nTemp16; rStm >> nTemp16; if ( nTemp16 == 0x2a ) @@ -821,10 +821,10 @@ BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo ) if ( bExtendedInfo ) { - ULONG nCount; - ULONG nMax = DATA_SIZE - 48; - UINT32 nTemp32; - BOOL bOk = FALSE; + ULONG nCount; + ULONG nMax = DATA_SIZE - 48; + UINT32 nTemp32; + BOOL bOk = FALSE; // Offset des ersten IFD einlesen rStm >> nTemp32; @@ -966,7 +966,7 @@ BOOL GraphicDescriptor::ImpDetectPBM( SvStream& rStm, BOOL ) bRet = TRUE; else { - BYTE nFirst, nSecond; + BYTE nFirst, nSecond; rStm.Seek( nStmPos ); rStm >> nFirst >> nSecond; if ( nFirst == 'P' && ( ( nSecond == '1' ) || ( nSecond == '4' ) ) ) @@ -993,7 +993,7 @@ BOOL GraphicDescriptor::ImpDetectPGM( SvStream& rStm, BOOL ) bRet = TRUE; else { - BYTE nFirst, nSecond; + BYTE nFirst, nSecond; rStm.Seek( nStmPos ); rStm >> nFirst >> nSecond; if ( nFirst == 'P' && ( ( nSecond == '2' ) || ( nSecond == '5' ) ) ) @@ -1020,7 +1020,7 @@ BOOL GraphicDescriptor::ImpDetectPPM( SvStream& rStm, BOOL ) bRet = TRUE; else { - BYTE nFirst, nSecond; + BYTE nFirst, nSecond; rStm.Seek( nStmPos ); rStm >> nFirst >> nSecond; if ( nFirst == 'P' && ( ( nSecond == '3' ) || ( nSecond == '6' ) ) ) @@ -1079,7 +1079,7 @@ BOOL GraphicDescriptor::ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo ) { BOOL bRet = FALSE; - UINT32 nMagicNumber; + UINT32 nMagicNumber; rStm.Seek( nStmPos ); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); rStm >> nMagicNumber; @@ -1097,7 +1097,7 @@ BOOL GraphicDescriptor::ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo ) UINT32 nColumns; UINT16 nDepth; UINT16 nMode; - rStm.SeekRel( 6 ); // Pad + rStm.SeekRel( 6 ); // Pad rStm >> nChannels >> nRows >> nColumns >> nDepth >> nMode; if ( ( nDepth == 1 ) || ( nDepth == 8 ) || ( nDepth == 16 ) ) { @@ -1138,8 +1138,8 @@ BOOL GraphicDescriptor::ImpDetectEPS( SvStream& rStm, BOOL ) // es wird die EPS mit Vorschaubild Variante und die Extensionuebereinstimmung // geprueft - sal_uInt32 nFirstLong; - sal_uInt8 nFirstBytes[20]; + sal_uInt32 nFirstLong; + sal_uInt8 nFirstBytes[20]; rStm.Seek( nStmPos ); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); @@ -1276,9 +1276,9 @@ BOOL GraphicDescriptor::ImpDetectSGV( SvStream&, BOOL ) BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo ) { - UINT32 n32; - BOOL bRet = FALSE; - BYTE cByte; + UINT32 n32; + BOOL bRet = FALSE; + BYTE cByte; rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); rStm.Seek( nStmPos ); @@ -1294,8 +1294,8 @@ BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo ) if ( bExtendedInfo ) { - UINT32 nTemp32; - UINT16 nTemp16; + UINT32 nTemp32; + UINT16 nTemp16; rStm.SeekRel( 0x04 ); @@ -1386,34 +1386,34 @@ BOOL GraphicDescriptor::ImpDetectEMF( SvStream&, BOOL ) String GraphicDescriptor::GetImportFormatShortName( sal_uInt16 nFormat ) { - ByteString aKeyName; + ByteString aKeyName; switch( nFormat ) { - case( GFF_BMP ) : aKeyName = "bmp"; break; - case( GFF_GIF ) : aKeyName = "gif"; break; - case( GFF_JPG ) : aKeyName = "jpg"; break; - case( GFF_PCD ) : aKeyName = "pcd"; break; - case( GFF_PCX ) : aKeyName = "pcx"; break; - case( GFF_PNG ) : aKeyName = "png"; break; - case( GFF_XBM ) : aKeyName = "xbm"; break; - case( GFF_XPM ) : aKeyName = "xpm"; break; - case( GFF_PBM ) : aKeyName = "pbm"; break; - case( GFF_PGM ) : aKeyName = "pgm"; break; - case( GFF_PPM ) : aKeyName = "ppm"; break; - case( GFF_RAS ) : aKeyName = "ras"; break; - case( GFF_TGA ) : aKeyName = "tga"; break; - case( GFF_PSD ) : aKeyName = "psd"; break; - case( GFF_EPS ) : aKeyName = "eps"; break; - case( GFF_TIF ) : aKeyName = "tif"; break; - case( GFF_DXF ) : aKeyName = "dxf"; break; - case( GFF_MET ) : aKeyName = "met"; break; - case( GFF_PCT ) : aKeyName = "pct"; break; - case( GFF_SGF ) : aKeyName = "sgf"; break; - case( GFF_SGV ) : aKeyName = "sgv"; break; - case( GFF_SVM ) : aKeyName = "svm"; break; - case( GFF_WMF ) : aKeyName = "wmf"; break; - case( GFF_EMF ) : aKeyName = "emf"; break; + case( GFF_BMP ) : aKeyName = "bmp"; break; + case( GFF_GIF ) : aKeyName = "gif"; break; + case( GFF_JPG ) : aKeyName = "jpg"; break; + case( GFF_PCD ) : aKeyName = "pcd"; break; + case( GFF_PCX ) : aKeyName = "pcx"; break; + case( GFF_PNG ) : aKeyName = "png"; break; + case( GFF_XBM ) : aKeyName = "xbm"; break; + case( GFF_XPM ) : aKeyName = "xpm"; break; + case( GFF_PBM ) : aKeyName = "pbm"; break; + case( GFF_PGM ) : aKeyName = "pgm"; break; + case( GFF_PPM ) : aKeyName = "ppm"; break; + case( GFF_RAS ) : aKeyName = "ras"; break; + case( GFF_TGA ) : aKeyName = "tga"; break; + case( GFF_PSD ) : aKeyName = "psd"; break; + case( GFF_EPS ) : aKeyName = "eps"; break; + case( GFF_TIF ) : aKeyName = "tif"; break; + case( GFF_DXF ) : aKeyName = "dxf"; break; + case( GFF_MET ) : aKeyName = "met"; break; + case( GFF_PCT ) : aKeyName = "pct"; break; + case( GFF_SGF ) : aKeyName = "sgf"; break; + case( GFF_SGV ) : aKeyName = "sgv"; break; + case( GFF_SVM ) : aKeyName = "svm"; break; + case( GFF_WMF ) : aKeyName = "wmf"; break; + case( GFF_EMF ) : aKeyName = "emf"; break; } return String( aKeyName, RTL_TEXTENCODING_ASCII_US ); diff --git a/svtools/source/filter.vcl/filter/fldll.cxx b/svtools/source/filter.vcl/filter/fldll.cxx index a9559070a8b8..a744db615055 100644 --- a/svtools/source/filter.vcl/filter/fldll.cxx +++ b/svtools/source/filter.vcl/filter/fldll.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svtools/source/filter.vcl/filter/gradwrap.cxx b/svtools/source/filter.vcl/filter/gradwrap.cxx index d1afb0dd743c..fb90e5fe9049 100644 --- a/svtools/source/filter.vcl/filter/gradwrap.cxx +++ b/svtools/source/filter.vcl/filter/gradwrap.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,8 +41,8 @@ GradientWrapper::GradientWrapper(const Link& rDrawPolyRecordHdl, const Link& rDrawPolyPolyRecordHdl, const Link& rSetFillInBrushRecordHdl) : - aDrawPolyRecordHdl (rDrawPolyRecordHdl), - aDrawPolyPolyRecordHdl (rDrawPolyPolyRecordHdl), + aDrawPolyRecordHdl (rDrawPolyRecordHdl), + aDrawPolyPolyRecordHdl (rDrawPolyPolyRecordHdl), aSetFillInBrushRecordHdl(rSetFillInBrushRecordHdl) { } @@ -266,7 +266,7 @@ void GradientWrapper::WriteLinearGradient(const Rectangle& rRect, void GradientWrapper::WriteRadialGradient(const Rectangle& rRect, const Gradient& rGradient) { - USHORT nStepCount = 100; + USHORT nStepCount = 100; Rectangle aClipRect = rRect; Rectangle aRect = rRect; long nZWidth = aRect.GetWidth() * (long)rGradient.GetOfsX() / 100; @@ -412,9 +412,9 @@ void GradientWrapper::WriteRadialGradient(const Rectangle& rRect, void GradientWrapper::WriteRectGradient(const Rectangle& rRect, const Gradient& rGradient) { - USHORT nStepCount = 100; + USHORT nStepCount = 100; Rectangle aClipRect = rRect; - Rectangle aRect = rRect; + Rectangle aRect = rRect; aRect.Left()--; aRect.Top()--; diff --git a/svtools/source/filter.vcl/filter/sgfbram.cxx b/svtools/source/filter.vcl/filter/sgfbram.cxx index f07c8a7dbf0c..a4166bb0686a 100644 --- a/svtools/source/filter.vcl/filter/sgfbram.cxx +++ b/svtools/source/filter.vcl/filter/sgfbram.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svtools/source/filter.vcl/filter/sgvmain.cxx b/svtools/source/filter.vcl/filter/sgvmain.cxx index 5c72dc6ba04f..3269624918d9 100644 --- a/svtools/source/filter.vcl/filter/sgvmain.cxx +++ b/svtools/source/filter.vcl/filter/sgvmain.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -809,12 +809,12 @@ void CircType::Draw(OutputDevice& rOut) void BmapType::Draw(OutputDevice& rOut) { //ifstream aInp; - unsigned char nSgfTyp; - USHORT nVersion; - String aStr( + unsigned char nSgfTyp; + USHORT nVersion; + String aStr( reinterpret_cast< char const * >(&Filename[ 1 ]), (xub_StrLen)Filename[ 0 ], RTL_TEXTENCODING_UTF8 ); - INetURLObject aFNam( aStr ); + INetURLObject aFNam( aStr ); SvStream* pInp = ::utl::UcbStreamHelper::CreateStream( aFNam.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ); if ( pInp ) @@ -1065,7 +1065,7 @@ BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) BOOL bRet=FALSE; // Returncode aIniPath.Append( String::CreateFromAscii( "sgf.ini", 7 ) ); -// aIniPath.ToAbs(); +// aIniPath.ToAbs(); pSgfFonts = new SgfFontLst; diff --git a/svtools/source/filter.vcl/filter/sgvspln.cxx b/svtools/source/filter.vcl/filter/sgvspln.cxx index 8bd09a4680dc..860fdb4dfe76 100644 --- a/svtools/source/filter.vcl/filter/sgvspln.cxx +++ b/svtools/source/filter.vcl/filter/sgvspln.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svtools/source/filter.vcl/filter/sgvtext.cxx b/svtools/source/filter.vcl/filter/sgvtext.cxx index 1655c53a5393..cbb4e5684865 100644 --- a/svtools/source/filter.vcl/filter/sgvtext.cxx +++ b/svtools/source/filter.vcl/filter/sgvtext.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svtools/source/filter.vcl/filter/strings.hrc b/svtools/source/filter.vcl/filter/strings.hrc index 0eea67fb2338..b4029f513830 100644 --- a/svtools/source/filter.vcl/filter/strings.hrc +++ b/svtools/source/filter.vcl/filter/strings.hrc @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svtools/source/filter.vcl/filter/strings.src b/svtools/source/filter.vcl/filter/strings.src index 60e628ee0b5c..060570430021 100644 --- a/svtools/source/filter.vcl/filter/strings.src +++ b/svtools/source/filter.vcl/filter/strings.src @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svtools/source/filter.vcl/igif/decode.cxx b/svtools/source/filter.vcl/igif/decode.cxx index d40cfab7cc50..5fde71796ab6 100644 --- a/svtools/source/filter.vcl/igif/decode.cxx +++ b/svtools/source/filter.vcl/igif/decode.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,21 +35,21 @@ struct GIFLZWTableEntry { - GIFLZWTableEntry* pPrev; - GIFLZWTableEntry* pFirst; - BYTE nData; + GIFLZWTableEntry* pPrev; + GIFLZWTableEntry* pFirst; + BYTE nData; }; // ------------------------------------------------------------------------ GIFLZWDecompressor::GIFLZWDecompressor( BYTE cDataSize ) : - nInputBitsBuf ( 0 ), - nOutBufDataLen ( 0 ), - nInputBitsBufSize ( 0 ), - bEOIFound ( FALSE ), - nDataSize ( cDataSize ) + nInputBitsBuf ( 0 ), + nOutBufDataLen ( 0 ), + nInputBitsBufSize ( 0 ), + bEOIFound ( FALSE ), + nDataSize ( cDataSize ) { - pOutBuf = new BYTE[ 4096 ]; + pOutBuf = new BYTE[ 4096 ]; nClearCode = 1 << nDataSize; nEOICode = nClearCode + 1; @@ -81,10 +81,10 @@ GIFLZWDecompressor::~GIFLZWDecompressor() HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, BYTE cBufSize, ULONG& rCount, BOOL& rEOI ) { - ULONG nTargetSize = 4096; - ULONG nCount = 0; - HPBYTE pTarget = (HPBYTE) rtl_allocateMemory( nTargetSize ); - HPBYTE pTmpTarget = pTarget; + ULONG nTargetSize = 4096; + ULONG nCount = 0; + HPBYTE pTarget = (HPBYTE) rtl_allocateMemory( nTargetSize ); + HPBYTE pTmpTarget = pTarget; nBlockBufSize = cBufSize; nBlockBufPos = 0; @@ -96,9 +96,9 @@ HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, BYTE cBufSize, if( nCount > nTargetSize ) { - ULONG nNewSize = nTargetSize << 1; - ULONG nOffset = pTmpTarget - pTarget; - HPBYTE pTmp = (HPBYTE) rtl_allocateMemory( nNewSize ); + ULONG nNewSize = nTargetSize << 1; + ULONG nOffset = pTmpTarget - pTarget; + HPBYTE pTmp = (HPBYTE) rtl_allocateMemory( nNewSize ); memcpy( pTmp, pTarget, nTargetSize ); rtl_freeMemory( pTarget ); @@ -145,10 +145,10 @@ void GIFLZWDecompressor::AddToTable( USHORT nPrevCode, USHORT nCodeFirstData ) BOOL GIFLZWDecompressor::ProcessOneCode() { - GIFLZWTableEntry* pE; - USHORT nCode; - BOOL bRet = FALSE; - BOOL bEndOfBlock = FALSE; + GIFLZWTableEntry* pE; + USHORT nCode; + BOOL bRet = FALSE; + BOOL bEndOfBlock = FALSE; while( nInputBitsBufSize < nCodeSize ) { diff --git a/svtools/source/filter.vcl/igif/decode.hxx b/svtools/source/filter.vcl/igif/decode.hxx index 5bce26b724f1..affe3a4d4f6a 100644 --- a/svtools/source/filter.vcl/igif/decode.hxx +++ b/svtools/source/filter.vcl/igif/decode.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,25 +35,25 @@ struct GIFLZWTableEntry; class GIFLZWDecompressor { - GIFLZWTableEntry* pTable; - HPBYTE pOutBuf; - HPBYTE pOutBufData; - HPBYTE pBlockBuf; - ULONG nInputBitsBuf; - USHORT nTableSize; - USHORT nClearCode; - USHORT nEOICode; - USHORT nCodeSize; - USHORT nOldCode; - USHORT nOutBufDataLen; - USHORT nInputBitsBufSize; - BOOL bEOIFound; - BYTE nDataSize; - BYTE nBlockBufSize; - BYTE nBlockBufPos; + GIFLZWTableEntry* pTable; + HPBYTE pOutBuf; + HPBYTE pOutBufData; + HPBYTE pBlockBuf; + ULONG nInputBitsBuf; + USHORT nTableSize; + USHORT nClearCode; + USHORT nEOICode; + USHORT nCodeSize; + USHORT nOldCode; + USHORT nOutBufDataLen; + USHORT nInputBitsBufSize; + BOOL bEOIFound; + BYTE nDataSize; + BYTE nBlockBufSize; + BYTE nBlockBufPos; - void AddToTable(USHORT nPrevCode, USHORT nCodeFirstData); - BOOL ProcessOneCode(); + void AddToTable(USHORT nPrevCode, USHORT nCodeFirstData); + BOOL ProcessOneCode(); public: @@ -61,7 +61,7 @@ public: GIFLZWDecompressor( BYTE cDataSize ); ~GIFLZWDecompressor(); - HPBYTE DecompressBlock( HPBYTE pSrc, BYTE cBufSize, ULONG& rCount, BOOL& rEOI ); + HPBYTE DecompressBlock( HPBYTE pSrc, BYTE cBufSize, ULONG& rCount, BOOL& rEOI ); }; #endif diff --git a/svtools/source/filter.vcl/igif/gifread.cxx b/svtools/source/filter.vcl/igif/gifread.cxx index 62d1413e145f..5a53eebed217 100644 --- a/svtools/source/filter.vcl/igif/gifread.cxx +++ b/svtools/source/filter.vcl/igif/gifread.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,18 +45,18 @@ // ------------- GIFReader::GIFReader( SvStream& rStm ) : - aGPalette ( 256 ), - aLPalette ( 256 ), - rIStm ( rStm ), - pAcc8 ( NULL ), - pAcc1 ( NULL ), - nLastPos ( rStm.Tell() ), - nLogWidth100 ( 0UL ), - nLogHeight100 ( 0UL ), - nLoops ( 1 ), - eActAction ( GLOBAL_HEADER_READING ), - bGCTransparent ( FALSE ), - bImGraphicReady ( FALSE ) + aGPalette ( 256 ), + aLPalette ( 256 ), + rIStm ( rStm ), + pAcc8 ( NULL ), + pAcc1 ( NULL ), + nLastPos ( rStm.Tell() ), + nLogWidth100 ( 0UL ), + nLogHeight100 ( 0UL ), + nLoops ( 1 ), + eActAction ( GLOBAL_HEADER_READING ), + bGCTransparent ( FALSE ), + bImGraphicReady ( FALSE ) { maUpperName = UniString::CreateFromAscii( "SVIGIF", 6 ); pSrcBuf = new BYTE[ 256 ]; @@ -134,10 +134,10 @@ BOOL GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, BOOL GIFReader::ReadGlobalHeader() { - char pBuf[ 7 ]; - BYTE nRF; - BYTE nAspect; - BOOL bRet = FALSE; + char pBuf[ 7 ]; + BYTE nRF; + BYTE nAspect; + BOOL bRet = FALSE; rIStm.Read( pBuf, 6 ); if( NO_PENDING( rIStm ) ) @@ -179,8 +179,8 @@ BOOL GIFReader::ReadGlobalHeader() void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, ULONG nCount ) { - const ULONG nLen = 3UL * nCount; - BYTE* pBuf = new BYTE[ nLen ]; + const ULONG nLen = 3UL * nCount; + BYTE* pBuf = new BYTE[ nLen ]; rIStm.Read( pBuf, nLen ); if( NO_PENDING( rIStm ) ) @@ -213,11 +213,11 @@ void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, ULONG nCount ) BOOL GIFReader::ReadExtension() { - BYTE cFunction; - BYTE cSize; - BYTE cByte; - BOOL bRet = FALSE; - BOOL bOverreadDataBlocks = FALSE; + BYTE cFunction; + BYTE cSize; + BYTE cByte; + BOOL bRet = FALSE; + BOOL bOverreadDataBlocks = FALSE; // Extension-Label rIStm >> cFunction; @@ -259,8 +259,8 @@ BOOL GIFReader::ReadExtension() // Appl.-Extension hat Laenge 11 if ( cSize == 0x0b ) { - ByteString aAppId; - ByteString aAppCode; + ByteString aAppId; + ByteString aAppCode; rIStm.Read( aAppId.AllocBuffer( 8 ), 8 ); rIStm.Read( aAppCode.AllocBuffer( 3 ), 3 ); @@ -328,8 +328,8 @@ BOOL GIFReader::ReadExtension() bRet = TRUE; while( cSize && bStatus && !rIStm.IsEof() ) { - USHORT nCount = (USHORT) cSize + 1; - char* pBuffer = new char[ nCount ]; + USHORT nCount = (USHORT) cSize + 1; + char* pBuffer = new char[ nCount ]; bRet = FALSE; rIStm.Read( pBuffer, nCount ); @@ -353,15 +353,15 @@ BOOL GIFReader::ReadExtension() BOOL GIFReader::ReadLocalHeader() { - BYTE pBuf[ 9 ]; - BOOL bRet = FALSE; + BYTE pBuf[ 9 ]; + BOOL bRet = FALSE; rIStm.Read( pBuf, 9 ); if( NO_PENDING( rIStm ) ) { - SvMemoryStream aMemStm; - BitmapPalette* pPal; - BYTE nFlags; + SvMemoryStream aMemStm; + BitmapPalette* pPal; + BYTE nFlags; aMemStm.SetBuffer( (char*) pBuf, 9, FALSE, 9 ); aMemStm >> nImagePosX; @@ -402,9 +402,9 @@ BOOL GIFReader::ReadLocalHeader() ULONG GIFReader::ReadNextBlock() { - ULONG nRet = 0UL; - ULONG nRead; - BYTE cBlockSize; + ULONG nRet = 0UL; + ULONG nRead; + BYTE cBlockSize; rIStm >> cBlockSize; @@ -424,8 +424,8 @@ ULONG GIFReader::ReadNextBlock() nRet = 3UL; else { - BOOL bEOI; - HPBYTE pTarget = pDecomp->DecompressBlock( pSrcBuf, cBlockSize, nRead, bEOI ); + BOOL bEOI; + HPBYTE pTarget = pDecomp->DecompressBlock( pSrcBuf, cBlockSize, nRead, bEOI ); nRet = ( bEOI ? 3 : 1 ); @@ -463,10 +463,10 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount ) // nicht zusanmmenfallen ( kommt vorm wenn wir am Ende des Bildes sind ) if( ( nMinY > nLastImageY ) && ( nLastImageY < ( nImageHeight - 1 ) ) ) { - HPBYTE pScanline8 = pAcc8->GetScanline( nYAcc ); - ULONG nSize8 = pAcc8->GetScanlineSize(); - HPBYTE pScanline1 = 0; - ULONG nSize1 = 0; + HPBYTE pScanline8 = pAcc8->GetScanline( nYAcc ); + ULONG nSize8 = pAcc8->GetScanlineSize(); + HPBYTE pScanline1 = 0; + ULONG nSize1 = 0; if( bGCTransparent ) { @@ -550,7 +550,7 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount ) void GIFReader::CreateNewBitmaps() { - AnimationBitmap aAnimBmp; + AnimationBitmap aAnimBmp; aBmp8.ReleaseAccess( pAcc8 ); pAcc8 = NULL; @@ -594,7 +594,7 @@ const Graphic& GIFReader::GetIntermediateGraphic() // vollstaendig eingelesen wurde if ( bImGraphicReady && !aAnimation.Count() ) { - Bitmap aBmp; + Bitmap aBmp; aBmp8.ReleaseAccess( pAcc8 ); @@ -715,9 +715,9 @@ BOOL GIFReader::ProcessGIF() // naechsten Datenblock lesen case( NEXT_BLOCK_READING ): { - USHORT nLastX = nImageX; - USHORT nLastY = nImageY; - ULONG nRet = ReadNextBlock(); + USHORT nLastX = nImageX; + USHORT nLastY = nImageY; + ULONG nRet = ReadNextBlock(); // Return: 0:Pending / 1:OK; / 2:OK und letzter Block: / 3:EOI / 4:HardAbort if( nRet ) @@ -827,10 +827,10 @@ ReadState GIFReader::ReadGIF( Graphic& rGraphic ) BOOL ImportGIF( SvStream & rStm, Graphic& rGraphic ) { - GIFReader* pGIFReader = (GIFReader*) rGraphic.GetContext(); - USHORT nOldFormat = rStm.GetNumberFormatInt(); - ReadState eReadState; - BOOL bRet = TRUE; + GIFReader* pGIFReader = (GIFReader*) rGraphic.GetContext(); + USHORT nOldFormat = rStm.GetNumberFormatInt(); + ReadState eReadState; + BOOL bRet = TRUE; rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); diff --git a/svtools/source/filter.vcl/ixbm/xbmread.cxx b/svtools/source/filter.vcl/ixbm/xbmread.cxx index 6d0c34cc5c56..01bb7c4a8c02 100644 --- a/svtools/source/filter.vcl/ixbm/xbmread.cxx +++ b/svtools/source/filter.vcl/ixbm/xbmread.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,12 +40,12 @@ // ------------- XBMReader::XBMReader( SvStream& rStm ) : - rIStm ( rStm ), - pAcc1 ( NULL ), - nLastPos ( rStm.Tell() ), - nWidth ( 0 ), - nHeight ( 0 ), - bStatus ( TRUE ) + rIStm ( rStm ), + pAcc1 ( NULL ), + nLastPos ( rStm.Tell() ), + nWidth ( 0 ), + nHeight ( 0 ), + bStatus ( TRUE ) { pHexTable = new short[ 256 ]; maUpperName = String::CreateFromAscii( "SVIXBM", 6 ); @@ -92,7 +92,7 @@ void XBMReader::InitTable() pHexTable['e'] = 14; pHexTable['f'] = 15; pHexTable['x'] = 0; - pHexTable[' '] = -1; + pHexTable[' '] = -1; pHexTable[','] = -1; pHexTable['}'] = -1; pHexTable['\n'] = -1; @@ -105,10 +105,10 @@ void XBMReader::InitTable() ByteString XBMReader::FindTokenLine( SvStream* pInStm, const char* pTok1, const char* pTok2, const char* pTok3 ) { - ByteString aRet; - long nPos1; - long nPos2; - long nPos3; + ByteString aRet; + long nPos1; + long nPos2; + long nPos3; bStatus = FALSE; @@ -153,9 +153,9 @@ ByteString XBMReader::FindTokenLine( SvStream* pInStm, const char* pTok1, long XBMReader::ParseDefine( const sal_Char* pDefine ) { - long nRet = 0; - char* pTmp = (char*) pDefine; - unsigned char cTmp; + long nRet = 0; + char* pTmp = (char*) pDefine; + unsigned char cTmp; // bis zum Ende gehen pTmp += ( strlen( pDefine ) - 1 ); @@ -202,14 +202,14 @@ long XBMReader::ParseDefine( const sal_Char* pDefine ) BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat ) { - ByteString aLine; - long nRow = 0; - long nCol = 0; - long nBits = ( eFormat == XBM10 ) ? 16 : 8; - long nBit; - USHORT nValue; - USHORT nDigits; - BOOL bFirstLine = TRUE; + ByteString aLine; + long nRow = 0; + long nCol = 0; + long nBits = ( eFormat == XBM10 ) ? 16 : 8; + long nBit; + USHORT nValue; + USHORT nDigits; + BOOL bFirstLine = TRUE; while( nRow < nHeight ) { @@ -232,16 +232,16 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor for( USHORT i = 0; ( i < nCount ) && ( nRow < nHeight ); i++ ) { - const ByteString aToken( aLine.GetToken( i, ',' ) ); + const ByteString aToken( aLine.GetToken( i, ',' ) ); const xub_StrLen nLen = aToken.Len(); - BOOL bProcessed = FALSE; + BOOL bProcessed = FALSE; nBit = nDigits = nValue = 0; for( xub_StrLen n = 0UL; n < nLen; n++ ) { const unsigned char cChar = aToken.GetChar( n ); - const short nTable = pHexTable[ cChar ]; + const short nTable = pHexTable[ cChar ]; if( isxdigit( cChar ) || !nTable ) { @@ -275,8 +275,8 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor ReadState XBMReader::ReadXBM( Graphic& rGraphic ) { - ReadState eReadState; - BYTE cDummy; + ReadState eReadState; + BYTE cDummy; // sehen, ob wir _alles_ lesen koennen rIStm.Seek( STREAM_SEEK_TO_END ); @@ -286,8 +286,8 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic ) // kehren wir zurueck und warten auf neue Daten if ( rIStm.GetError() != ERRCODE_IO_PENDING ) { - ByteString aLine; - int nValue; + ByteString aLine; + int nValue; rIStm.Seek( nLastPos ); bStatus = FALSE; @@ -375,9 +375,9 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic ) BOOL ImportXBM( SvStream& rStm, Graphic& rGraphic ) { - XBMReader* pXBMReader = (XBMReader*) rGraphic.GetContext(); - ReadState eReadState; - BOOL bRet = TRUE; + XBMReader* pXBMReader = (XBMReader*) rGraphic.GetContext(); + ReadState eReadState; + BOOL bRet = TRUE; if( !pXBMReader ) pXBMReader = new XBMReader( rStm ); diff --git a/svtools/source/filter.vcl/ixpm/rgbtable.hxx b/svtools/source/filter.vcl/ixpm/rgbtable.hxx index f3506a1d0465..a222d9285a0e 100644 --- a/svtools/source/filter.vcl/ixpm/rgbtable.hxx +++ b/svtools/source/filter.vcl/ixpm/rgbtable.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,664 +35,664 @@ struct XPMRGBTab }; static XPMRGBTab pRGBTable[] = { -{ "white", 255, 255, 255 }, -{ "black", 0, 0, 0 }, -{ "snow", 255, 250, 250 }, -{ "GhostWhite", 248, 248, 255 }, -{ "WhiteSmoke", 245, 245, 245 }, -{ "gainsboro", 220, 220, 220 }, -{ "FloralWhite", 255, 250, 240 }, -{ "OldLace", 253, 245, 230 }, -{ "linen", 250, 240, 230 }, -{ "AntiqueWhite", 250, 235, 215 }, -{ "PapayaWhip", 255, 239, 213 }, -{ "BlanchedAlmond", 255, 235, 205 }, -{ "bisque", 255, 228, 196 }, -{ "PeachPuff", 255, 218, 185 }, -{ "NavajoWhite", 255, 222, 173 }, -{ "moccasin", 255, 228, 181 }, -{ "cornsilk", 255, 248, 220 }, -{ "ivory", 255, 255, 240 }, -{ "LemonChiffon", 255, 250, 205 }, -{ "seashell", 255, 245, 238 }, -{ "honeydew", 240, 255, 240 }, -{ "MintCream", 245, 255, 250 }, -{ "azure", 240, 255, 255 }, -{ "AliceBlue", 240, 248, 255 }, -{ "lavender", 230, 230, 250 }, -{ "LavenderBlush", 255, 240, 245 }, -{ "MistyRose", 255, 228, 225 }, -{ "DarkSlateGray", 47, 79, 79 }, -{ "DarkSlateGrey", 47, 79, 79 }, -{ "DimGray", 105, 105, 105 }, -{ "DimGrey", 105, 105, 105 }, -{ "SlateGray", 112, 128, 144 }, -{ "SlateGrey", 112, 128, 144 }, -{ "LightSlateGray", 119, 136, 153 }, -{ "LightSlateGrey", 119, 136, 153 }, -{ "gray", 190, 190, 190 }, -{ "grey", 190, 190, 190 }, -{ "LightGrey", 211, 211, 211 }, -{ "LightGray", 211, 211, 211 }, -{ "MidnightBlue", 25, 25, 112 }, -{ "navy", 0, 0, 128 }, -{ "NavyBlue", 0, 0, 128 }, -{ "CornflowerBlue", 100, 149, 237 }, -{ "DarkSlateBlue", 72, 61, 139 }, -{ "SlateBlue", 106, 90, 205 }, -{ "MediumSlateBlue", 123, 104, 238 }, -{ "LightSlateBlue", 132, 112, 255 }, -{ "MediumBlue", 0, 0, 205 }, -{ "RoyalBlue", 65, 105, 225 }, -{ "blue", 0, 0, 255 }, -{ "DodgerBlue", 30, 144, 255 }, -{ "DeepSkyBlue", 0, 191, 255 }, -{ "SkyBlue", 135, 206, 235 }, -{ "LightSkyBlue", 135, 206, 250 }, -{ "SteelBlue", 70, 130, 180 }, -{ "LightSteelBlue", 176, 196, 222 }, -{ "LightBlue", 173, 216, 230 }, -{ "PowderBlue", 176, 224, 230 }, -{ "PaleTurquoise", 175, 238, 238 }, -{ "DarkTurquoise", 0, 206, 209 }, -{ "MediumTurquoise", 72, 209, 204 }, -{ "turquoise", 64, 224, 208 }, -{ "cyan", 0, 255, 255 }, -{ "LightCyan", 224, 255, 255 }, -{ "CadetBlue", 95, 158, 160 }, -{ "MediumAquamarine", 102, 205, 170 }, -{ "aquamarine", 127, 255, 212 }, -{ "DarkGreen", 0, 100, 0 }, -{ "DarkOliveGreen", 85, 107, 47 }, -{ "DarkSeaGreen", 143, 188, 143 }, -{ "SeaGreen", 46, 139, 87 }, -{ "MediumSeaGreen", 60, 179, 113 }, -{ "LightSeaGreen", 32, 178, 170 }, -{ "PaleGreen", 152, 251, 152 }, -{ "SpringGreen", 0, 255, 127 }, -{ "LawnGreen", 124, 252, 0 }, -{ "green", 0, 255, 0 }, -{ "chartreuse", 127, 255, 0 }, -{ "MediumSpringGreen", 0, 250, 154 }, -{ "GreenYellow", 173, 255 , 47 }, -{ "LimeGreen", 50, 205, 50 }, -{ "YellowGreen", 154, 205, 50 }, -{ "ForestGreen", 34, 139, 34 }, -{ "OliveDrab", 107, 142, 35 }, -{ "DarkKhaki", 189, 183, 107 }, -{ "khaki", 240, 230, 140 }, -{ "PaleGoldenrod", 238, 232, 170 }, -{ "LightGoldenrodYellow", 250, 250, 210 }, -{ "LightYellow", 255, 255, 224 }, -{ "yellow", 255, 255, 0 }, -{ "gold", 255, 215, 0 }, -{ "LightGoldenrod", 238, 221, 130 }, -{ "goldenrod", 218, 165, 32 }, -{ "DarkGoldenrod", 184, 134, 11 }, -{ "RosyBrown", 188, 143, 143 }, -{ "IndianRed", 205, 92, 92 }, -{ "SaddleBrown", 139, 69, 19 }, -{ "sienna", 160, 82, 45 }, -{ "peru", 205, 133, 63 }, -{ "burlywood", 222, 184, 135 }, -{ "beige", 245, 245, 220 }, -{ "wheat", 245, 222, 179 }, -{ "SandyBrown", 244, 164, 96 }, -{ "tan", 210, 180, 140 }, -{ "chocolate", 210, 105, 30 }, -{ "firebrick", 178, 34, 34 }, -{ "brown", 165, 42, 42 }, -{ "DarkSalmon", 233, 150, 122 }, -{ "salmon", 250, 128, 114 }, -{ "LightSalmon", 255, 160, 122 }, -{ "orange", 255, 165, 0 }, -{ "DarkOrange", 255, 140, 0 }, -{ "coral", 255, 127, 80 }, -{ "LightCoral", 240, 128, 128 }, -{ "tomato", 255, 99, 71 }, -{ "OrangeRed", 255, 69, 0 }, -{ "red", 255, 0, 0 }, -{ "HotPink", 255, 105, 180 }, -{ "DeepPink", 255, 20, 147 }, -{ "pink", 255, 192, 203 }, -{ "LightPink", 255, 182, 193 }, -{ "PaleVioletRed", 219, 112, 147 }, -{ "maroon", 176, 48, 96 }, -{ "MediumVioletRed", 199, 21, 133 }, -{ "VioletRed", 208, 32, 144 }, -{ "magenta", 255, 0, 255 }, -{ "violet", 238, 130, 238 }, -{ "plum", 221, 160, 221 }, -{ "orchid", 218, 112, 214 }, -{ "MediumOrchid", 186, 85, 211 }, -{ "DarkOrchid", 153, 50, 204 }, -{ "DarkViolet", 148, 0, 211 }, -{ "BlueViolet", 138, 43, 226 }, -{ "purple", 160, 32, 240 }, -{ "MediumPurple", 147, 112, 219 }, -{ "thistle", 216, 191, 216 }, -{ "snow1", 255, 250, 250 }, -{ "snow2", 238, 233, 233 }, -{ "snow3", 205, 201, 201 }, -{ "snow4", 139, 137, 137 }, -{ "seashell1", 255, 245, 238 }, -{ "seashell2", 238, 229, 222 }, -{ "seashell3", 205, 197, 191 }, -{ "seashell4", 139, 134, 130 }, -{ "AntiqueWhite1", 255, 239, 219 }, -{ "AntiqueWhite2", 238, 223, 204 }, -{ "AntiqueWhite3", 205, 192, 176 }, -{ "AntiqueWhite4", 139, 131, 120 }, -{ "bisque1", 255, 228, 196 }, -{ "bisque2", 238, 213, 183 }, -{ "bisque3", 205, 183, 158 }, -{ "bisque4", 139, 125, 107 }, -{ "PeachPuff1", 255, 218, 185 }, -{ "PeachPuff2", 238, 203, 173 }, -{ "PeachPuff3", 205, 175, 149 }, -{ "PeachPuff4", 139, 119, 101 }, -{ "NavajoWhite1", 255, 222, 173 }, -{ "NavajoWhite2", 238, 207, 161 }, -{ "NavajoWhite3", 205, 179, 139 }, -{ "NavajoWhite4", 139, 121, 94 }, -{ "LemonChiffon1", 255, 250, 205 }, -{ "LemonChiffon2", 238, 233, 191 }, -{ "LemonChiffon3", 205, 201, 165 }, -{ "LemonChiffon4", 139, 137, 112 }, -{ "cornsilk1", 255, 248, 220 }, -{ "cornsilk2", 238, 232, 205 }, -{ "cornsilk3", 205, 200, 177 }, -{ "cornsilk4", 139, 136, 120 }, -{ "ivory1", 255, 255, 240 }, -{ "ivory2", 238, 238, 224 }, -{ "ivory3", 205, 205, 193 }, -{ "ivory4", 139, 139, 131 }, -{ "honeydew1", 240, 255, 240 }, -{ "honeydew2", 224, 238, 224 }, -{ "honeydew3", 193, 205, 193 }, -{ "honeydew4", 131, 139, 131 }, -{ "LavenderBlush1", 255, 240, 245 }, -{ "LavenderBlush2", 238, 224, 229 }, -{ "LavenderBlush3", 205, 193, 197 }, -{ "LavenderBlush4", 139, 131, 134 }, -{ "MistyRose1", 255, 228, 225 }, -{ "MistyRose2", 238, 213, 210 }, -{ "MistyRose3", 205, 183, 181 }, -{ "MistyRose4", 139, 125, 123 }, -{ "azure1", 240, 255, 255 }, -{ "azure2", 224, 238, 238 }, -{ "azure3", 193, 205, 205 }, -{ "azure4", 131, 139, 139 }, -{ "SlateBlue1", 131, 111, 255 }, -{ "SlateBlue2", 122, 103, 238 }, -{ "SlateBlue3", 105, 89, 205 }, -{ "SlateBlue4", 71, 60, 139 }, -{ "RoyalBlue1", 72, 118, 255 }, -{ "RoyalBlue2", 67, 110, 238 }, -{ "RoyalBlue3", 58, 95, 205 }, -{ "RoyalBlue4", 39, 64, 139 }, -{ "blue1", 0, 0, 255 }, -{ "blue2", 0, 0, 238 }, -{ "blue3", 0, 0, 205 }, -{ "blue4", 0, 0, 139 }, -{ "DodgerBlue1", 30, 144, 255 }, -{ "DodgerBlue2", 28, 134, 238 }, -{ "DodgerBlue3", 24, 116, 205 }, -{ "DodgerBlue4", 16, 78, 139 }, -{ "SteelBlue1", 99, 184, 255 }, -{ "SteelBlue2", 92, 172, 238 }, -{ "SteelBlue3", 79, 148, 205 }, -{ "SteelBlue4", 54, 100, 139 }, -{ "DeepSkyBlue1", 0, 191, 255 }, -{ "DeepSkyBlue2", 0, 178, 238 }, -{ "DeepSkyBlue3", 0, 154, 205 }, -{ "DeepSkyBlue4", 0, 104, 139 }, -{ "SkyBlue1", 135, 206, 255 }, -{ "SkyBlue2", 126, 192, 238 }, -{ "SkyBlue3", 108, 166, 205 }, -{ "SkyBlue4", 74, 112, 139 }, -{ "LightSkyBlue1", 176, 226, 255 }, -{ "LightSkyBlue2", 164, 211, 238 }, -{ "LightSkyBlue3", 141, 182, 205 }, -{ "LightSkyBlue4", 96, 123, 139 }, -{ "SlateGray1", 198, 226, 255 }, -{ "SlateGray2", 185, 211, 238 }, -{ "SlateGray3", 159, 182, 205 }, -{ "SlateGray4", 108, 123, 139 }, -{ "LightSteelBlue1", 202, 225, 255 }, -{ "LightSteelBlue2", 188, 210, 238 }, -{ "LightSteelBlue3", 162, 181, 205 }, -{ "LightSteelBlue4", 110, 123, 139 }, -{ "LightBlue1", 191, 239, 255 }, -{ "LightBlue2", 178, 223, 238 }, -{ "LightBlue3", 154, 192, 205 }, -{ "LightBlue4", 104, 131, 139 }, -{ "LightCyan1", 224, 255, 255 }, -{ "LightCyan2", 209, 238, 238 }, -{ "LightCyan3", 180, 205, 205 }, -{ "LightCyan4", 122, 139, 139 }, -{ "PaleTurquoise1", 187, 255, 255 }, -{ "PaleTurquoise2", 174, 238, 238 }, -{ "PaleTurquoise3", 150, 205, 205 }, -{ "PaleTurquoise4", 102, 139, 139 }, -{ "CadetBlue1", 152, 245, 255 }, -{ "CadetBlue2", 142, 229, 238 }, -{ "CadetBlue3", 122, 197, 205 }, -{ "CadetBlue4", 83, 134, 139 }, -{ "turquoise1", 0, 245, 255 }, -{ "turquoise2", 0, 229, 238 }, -{ "turquoise3", 0, 197, 205 }, -{ "turquoise4", 0, 134, 139 }, -{ "cyan1", 0, 255, 255 }, -{ "cyan2", 0, 238, 238 }, -{ "cyan3", 0, 205, 205 }, -{ "cyan4", 0, 139, 139 }, -{ "DarkSlateGray1", 151, 255, 255 }, -{ "DarkSlateGray2", 141, 238, 238 }, -{ "DarkSlateGray3", 121, 205, 205 }, -{ "DarkSlateGray4", 82, 139, 139 }, -{ "aquamarine1", 127, 255, 212 }, -{ "aquamarine2", 118, 238, 198 }, -{ "aquamarine3", 102, 205, 170 }, -{ "aquamarine4", 69, 139, 116 }, -{ "DarkSeaGreen1", 193, 255, 193 }, -{ "DarkSeaGreen2", 180, 238, 180 }, -{ "DarkSeaGreen3", 155, 205, 155 }, -{ "DarkSeaGreen4", 105, 139, 105 }, -{ "SeaGreen1", 84, 255, 159 }, -{ "SeaGreen2", 78, 238, 148 }, -{ "SeaGreen3", 67, 205, 128 }, -{ "SeaGreen4", 46, 139, 87 }, -{ "PaleGreen1", 154, 255, 154 }, -{ "PaleGreen2", 144, 238, 144 }, -{ "PaleGreen3", 124, 205, 124 }, -{ "PaleGreen4", 84, 139, 84 }, -{ "SpringGreen1", 0, 255, 127 }, -{ "SpringGreen2", 0, 238, 118 }, -{ "SpringGreen3", 0, 205, 102 }, -{ "SpringGreen4", 0, 139, 69 }, -{ "green1", 0, 255, 0 }, -{ "green2", 0, 238, 0 }, -{ "green3", 0, 205, 0 }, -{ "green4", 0, 139, 0 }, -{ "chartreuse1", 127, 255, 0 }, -{ "chartreuse2", 118, 238, 0 }, -{ "chartreuse3", 102, 205, 0 }, -{ "chartreuse4", 69, 139, 0 }, -{ "OliveDrab1", 192, 255, 62 }, -{ "OliveDrab2", 179, 238, 58 }, -{ "OliveDrab3", 154, 205, 50 }, -{ "OliveDrab4", 105, 139, 34 }, -{ "DarkOliveGreen1", 202, 255, 112 }, -{ "DarkOliveGreen2", 188, 238, 104 }, -{ "DarkOliveGreen3", 162, 205, 90 }, -{ "DarkOliveGreen4", 110, 139, 61 }, -{ "khaki1", 255, 246, 143 }, -{ "khaki2", 238, 230, 133 }, -{ "khaki3", 205, 198, 115 }, -{ "khaki4", 139, 134, 78 }, -{ "LightGoldenrod1", 255, 236, 139 }, -{ "LightGoldenrod2", 238, 220, 130 }, -{ "LightGoldenrod3", 205, 190, 112 }, -{ "LightGoldenrod4", 139, 129, 76 }, -{ "LightYellow1", 255, 255, 224 }, -{ "LightYellow2", 238, 238, 209 }, -{ "LightYellow3", 205, 205, 180 }, -{ "LightYellow4", 139, 139, 122 }, -{ "yellow1", 255, 255, 0 }, -{ "yellow2", 238, 238, 0 }, -{ "yellow3", 205, 205, 0 }, -{ "yellow4", 139, 139, 0 }, -{ "gold1", 255, 215, 0 }, -{ "gold2", 238, 201, 0 }, -{ "gold3", 205, 173, 0 }, -{ "gold4", 139, 117, 0 }, -{ "goldenrod1", 255, 193, 37 }, -{ "goldenrod2", 238, 180, 34 }, -{ "goldenrod3", 205, 155, 29 }, -{ "goldenrod4", 139, 105, 20 }, -{ "DarkGoldenrod1", 255, 185, 15 }, -{ "DarkGoldenrod2", 238, 173, 14 }, -{ "DarkGoldenrod3", 205, 149, 12 }, -{ "DarkGoldenrod4", 139, 101, 8 }, -{ "RosyBrown1", 255, 193, 193 }, -{ "RosyBrown2", 238, 180, 180 }, -{ "RosyBrown3", 205, 155, 155 }, -{ "RosyBrown4", 139, 105, 105 }, -{ "IndianRed1", 255, 106, 106 }, -{ "IndianRed2", 238, 99, 99 }, -{ "IndianRed3", 205, 85, 85 }, -{ "IndianRed4", 139, 58, 58 }, -{ "sienna1", 255, 130, 71 }, -{ "sienna2", 238, 121, 66 }, -{ "sienna3", 205, 104, 57 }, -{ "sienna4", 139, 71, 38 }, -{ "burlywood1", 255, 211, 155 }, -{ "burlywood2", 238, 197, 145 }, -{ "burlywood3", 205, 170, 125 }, -{ "burlywood4", 139, 115, 85 }, -{ "wheat1", 255, 231, 186 }, -{ "wheat2", 238, 216, 174 }, -{ "wheat3", 205, 186, 150 }, -{ "wheat4", 139, 126, 102 }, -{ "tan1", 255, 165, 79 }, -{ "tan2", 238, 154, 73 }, -{ "tan3", 205, 133, 63 }, -{ "tan4", 139 , 90, 43 }, -{ "chocolate1", 255, 127, 36 }, -{ "chocolate2", 238, 118, 33 }, -{ "chocolate3", 205, 102, 29 }, -{ "chocolate4", 139, 69, 19 }, -{ "firebrick1", 255, 48, 48 }, -{ "firebrick2", 238, 44, 44 }, -{ "firebrick3", 205, 38, 38 }, -{ "firebrick4", 139, 26, 26 }, -{ "brown1", 255, 64, 64 }, -{ "brown2", 238, 59, 59 }, -{ "brown3", 205, 51, 51 }, -{ "brown4", 139, 35, 35 }, -{ "salmon1", 255, 140, 105 }, -{ "salmon2", 238, 130, 98 }, -{ "salmon3", 205, 112, 84 }, -{ "salmon4", 139, 76, 57 }, -{ "LightSalmon1", 255, 160, 122 }, -{ "LightSalmon2", 238, 149, 114 }, -{ "LightSalmon3", 205, 129, 98 }, -{ "LightSalmon4", 139, 87, 66 }, -{ "orange1", 255, 165, 0 }, -{ "orange2", 238, 154, 0 }, -{ "orange3", 205, 133, 0 }, -{ "orange4", 139 , 90, 0 }, -{ "DarkOrange1", 255, 127, 0 }, -{ "DarkOrange2", 238, 118, 0 }, -{ "DarkOrange3", 205, 102, 0 }, -{ "DarkOrange4", 139 , 69, 0 }, -{ "coral1", 255, 114, 86 }, -{ "coral2", 238, 106, 80 }, -{ "coral3", 205, 91, 69 }, -{ "coral4", 139, 62, 47 }, -{ "tomato1", 255, 99, 71 }, -{ "tomato2", 238, 92, 66 }, -{ "tomato3", 205, 79, 57 }, -{ "tomato4", 139, 54, 38 }, -{ "OrangeRed1", 255, 69, 0 }, -{ "OrangeRed2", 238, 64, 0 }, -{ "OrangeRed3", 205, 55, 0 }, -{ "OrangeRed4", 139, 37, 0 }, -{ "red1", 255, 0, 0 }, -{ "red2", 238, 0, 0 }, -{ "red3", 205, 0, 0 }, -{ "red4", 139, 0, 0 }, -{ "DeepPink1", 255, 20, 147 }, -{ "DeepPink2", 238, 18, 137 }, -{ "DeepPink3", 205, 16, 118 }, -{ "DeepPink4", 139, 10, 80 }, -{ "HotPink1", 255, 110, 180 }, -{ "HotPink2", 238, 106, 167 }, -{ "HotPink3", 205, 96, 144 }, -{ "HotPink4", 139, 58, 98 }, -{ "pink1", 255, 181, 197 }, -{ "pink2", 238, 169, 184 }, -{ "pink3", 205, 145, 158 }, -{ "pink4", 139, 99, 108 }, -{ "LightPink1", 255, 174, 185 }, -{ "LightPink2", 238, 162, 173 }, -{ "LightPink3", 205, 140, 149 }, -{ "LightPink4", 139, 95, 101 }, -{ "PaleVioletRed1", 255, 130, 171 }, -{ "PaleVioletRed2", 238, 121, 159 }, -{ "PaleVioletRed3", 205, 104, 137 }, -{ "PaleVioletRed4", 139, 71, 93 }, -{ "maroon1", 255, 52, 179 }, -{ "maroon2", 238, 48, 167 }, -{ "maroon3", 205, 41, 144 }, -{ "maroon4", 139, 28, 98 }, -{ "VioletRed1", 255, 62, 150 }, -{ "VioletRed2", 238, 58, 140 }, -{ "VioletRed3", 205, 50, 120 }, -{ "VioletRed4", 139, 34, 82 }, -{ "magenta1", 255, 0, 255 }, -{ "magenta2", 238, 0, 238 }, -{ "magenta3", 205, 0, 205 }, -{ "magenta4", 139, 0, 139 }, -{ "orchid1", 255, 131, 250 }, -{ "orchid2", 238, 122, 233 }, -{ "orchid3", 205, 105, 201 }, -{ "orchid4", 139, 71, 137 }, -{ "plum1", 255, 187, 255 }, -{ "plum2", 238, 174, 238 }, -{ "plum3", 205, 150, 205 }, -{ "plum4", 139, 102, 139 }, -{ "MediumOrchid1", 224, 102, 255 }, -{ "MediumOrchid2", 209, 95, 238 }, -{ "MediumOrchid3", 180, 82, 205 }, -{ "MediumOrchid4", 122, 55, 139 }, -{ "DarkOrchid1", 191, 62, 255 }, -{ "DarkOrchid2", 178, 58, 238 }, -{ "DarkOrchid3", 154, 50, 205 }, -{ "DarkOrchid4", 104, 34, 139 }, -{ "purple1", 155, 48, 255 }, -{ "purple2", 145, 44, 238 }, -{ "purple3", 125, 38, 205 }, -{ "purple4", 85, 26, 139 }, -{ "MediumPurple1", 171, 130, 255 }, -{ "MediumPurple2", 159, 121, 238 }, -{ "MediumPurple3", 137, 104, 205 }, -{ "MediumPurple4", 93, 71, 139 }, -{ "thistle1", 255, 225, 255 }, -{ "thistle2", 238, 210, 238 }, -{ "thistle3", 205, 181, 205 }, -{ "thistle4", 139, 123, 139 }, -{ "gray0", 0, 0, 0 }, -{ "grey0", 0, 0, 0 }, -{ "gray1", 3, 3, 3 }, -{ "grey1", 3, 3, 3 }, -{ "gray2", 5, 5, 5 }, -{ "grey2", 5, 5, 5 }, -{ "gray3", 8, 8, 8 }, -{ "grey3", 8, 8, 8 }, -{ "gray4", 10, 10, 10 }, -{ "grey4", 10, 10, 10 }, -{ "gray5", 13, 13, 13 }, -{ "grey5", 13, 13, 13 }, -{ "gray6", 15, 15, 15 }, -{ "grey6", 15, 15, 15 }, -{ "gray7", 18, 18, 18 }, -{ "grey7", 18, 18, 18 }, -{ "gray8", 20, 20, 20 }, -{ "grey8", 20, 20, 20 }, -{ "gray9", 23, 23, 23 }, -{ "grey9", 23, 23, 23 }, -{ "gray10", 26, 26, 26 }, -{ "grey10", 26, 26, 26 }, -{ "gray11", 28, 28, 28 }, -{ "grey11", 28, 28, 28 }, -{ "gray12", 31, 31, 31 }, -{ "grey12", 31, 31, 31 }, -{ "gray13", 33, 33, 33 }, -{ "grey13", 33, 33, 33 }, -{ "gray14", 36, 36, 36 }, -{ "grey14", 36, 36, 36 }, -{ "gray15", 38, 38, 38 }, -{ "grey15", 38, 38, 38 }, -{ "gray16", 41, 41, 41 }, -{ "grey16", 41, 41, 41 }, -{ "gray17", 43, 43, 43 }, -{ "grey17", 43, 43, 43 }, -{ "gray18", 46, 46, 46 }, -{ "grey18", 46, 46, 46 }, -{ "gray19", 48, 48, 48 }, -{ "grey19", 48, 48, 48 }, -{ "gray20", 51, 51, 51 }, -{ "grey20", 51, 51, 51 }, -{ "gray21", 54, 54, 54 }, -{ "grey21", 54, 54, 54 }, -{ "gray22", 56, 56, 56 }, -{ "grey22", 56, 56, 56 }, -{ "gray23", 59, 59, 59 }, -{ "grey23", 59, 59, 59 }, -{ "gray24", 61, 61, 61 }, -{ "grey24", 61, 61, 61 }, -{ "gray25", 64, 64, 64 }, -{ "grey25", 64, 64, 64 }, -{ "gray26", 66, 66, 66 }, -{ "grey26", 66, 66, 66 }, -{ "gray27", 69, 69, 69 }, -{ "grey27", 69, 69, 69 }, -{ "gray28", 71, 71, 71 }, -{ "grey28", 71, 71, 71 }, -{ "gray29", 74, 74, 74 }, -{ "grey29", 74, 74, 74 }, -{ "gray30", 77, 77, 77 }, -{ "grey30", 77, 77, 77 }, -{ "gray31", 79, 79, 79 }, -{ "grey31", 79, 79, 79 }, -{ "gray32", 82, 82, 82 }, -{ "grey32", 82, 82, 82 }, -{ "gray33", 84, 84, 84 }, -{ "grey33", 84, 84, 84 }, -{ "gray34", 87, 87, 87 }, -{ "grey34", 87, 87, 87 }, -{ "gray35", 89, 89, 89 }, -{ "grey35", 89, 89, 89 }, -{ "gray36", 92, 92, 92 }, -{ "grey36", 92, 92, 92 }, -{ "gray37", 94, 94, 94 }, -{ "grey37", 94, 94, 94 }, -{ "gray38", 97, 97, 97 }, -{ "grey38", 97, 97, 97 }, -{ "gray39", 99, 99, 99 }, -{ "grey39", 99, 99, 99 }, -{ "gray40", 102, 102, 102 }, -{ "grey40", 102, 102, 102 }, -{ "gray41", 105, 105, 105 }, -{ "grey41", 105, 105, 105 }, -{ "gray42", 107, 107, 107 }, -{ "grey42", 107, 107, 107 }, -{ "gray43", 110, 110, 110 }, -{ "grey43", 110, 110, 110 }, -{ "gray44", 112, 112, 112 }, -{ "grey44", 112, 112, 112 }, -{ "gray45", 115, 115, 115 }, -{ "grey45", 115, 115, 115 }, -{ "gray46", 117, 117, 117 }, -{ "grey46", 117, 117, 117 }, -{ "gray47", 120, 120, 120 }, -{ "grey47", 120, 120, 120 }, -{ "gray48", 122, 122, 122 }, -{ "grey48", 122, 122, 122 }, -{ "gray49", 125, 125, 125 }, -{ "grey49", 125, 125, 125 }, -{ "gray50", 127, 127, 127 }, -{ "grey50", 127, 127, 127 }, -{ "gray51", 130, 130, 130 }, -{ "grey51", 130, 130, 130 }, -{ "gray52", 133, 133, 133 }, -{ "grey52", 133, 133, 133 }, -{ "gray53", 135, 135, 135 }, -{ "grey53", 135, 135, 135 }, -{ "gray54", 138, 138, 138 }, -{ "grey54", 138, 138, 138 }, -{ "gray55", 140, 140, 140 }, -{ "grey55", 140, 140, 140 }, -{ "gray56", 143, 143, 143 }, -{ "grey56", 143, 143, 143 }, -{ "gray57", 145, 145, 145 }, -{ "grey57", 145, 145, 145 }, -{ "gray58", 148, 148, 148 }, -{ "grey58", 148, 148, 148 }, -{ "gray59", 150, 150, 150 }, -{ "grey59", 150, 150, 150 }, -{ "gray60", 153, 153, 153 }, -{ "grey60", 153, 153, 153 }, -{ "gray61", 156, 156, 156 }, -{ "grey61", 156, 156, 156 }, -{ "gray62", 158, 158, 158 }, -{ "grey62", 158, 158, 158 }, -{ "gray63", 161, 161, 161 }, -{ "grey63", 161, 161, 161 }, -{ "gray64", 163, 163, 163 }, -{ "grey64", 163, 163, 163 }, -{ "gray65", 166, 166, 166 }, -{ "grey65", 166, 166, 166 }, -{ "gray66", 168, 168, 168 }, -{ "grey66", 168, 168, 168 }, -{ "gray67", 171, 171, 171 }, -{ "grey67", 171, 171, 171 }, -{ "gray68", 173, 173, 173 }, -{ "grey68", 173, 173, 173 }, -{ "gray69", 176, 176, 176 }, -{ "grey69", 176, 176, 176 }, -{ "gray70", 179, 179, 179 }, -{ "grey70", 179, 179, 179 }, -{ "gray71", 181, 181, 181 }, -{ "grey71", 181, 181, 181 }, -{ "gray72", 184, 184, 184 }, -{ "grey72", 184, 184, 184 }, -{ "gray73", 186, 186, 186 }, -{ "grey73", 186, 186, 186 }, -{ "gray74", 189, 189, 189 }, -{ "grey74", 189, 189, 189 }, -{ "gray75", 191, 191, 191 }, -{ "grey75", 191, 191, 191 }, -{ "gray76", 194, 194, 194 }, -{ "grey76", 194, 194, 194 }, -{ "gray77", 196, 196, 196 }, -{ "grey77", 196, 196, 196 }, -{ "gray78", 199, 199, 199 }, -{ "grey78", 199, 199, 199 }, -{ "gray79", 201, 201, 201 }, -{ "grey79", 201, 201, 201 }, -{ "gray80", 204, 204, 204 }, -{ "grey80", 204, 204, 204 }, -{ "gray81", 207, 207, 207 }, -{ "grey81", 207, 207, 207 }, -{ "gray82", 209, 209, 209 }, -{ "grey82", 209, 209, 209 }, -{ "gray83", 212, 212, 212 }, -{ "grey83", 212, 212, 212 }, -{ "gray84", 214, 214, 214 }, -{ "grey84", 214, 214, 214 }, -{ "gray85", 217, 217, 217 }, -{ "grey85", 217, 217, 217 }, -{ "gray86", 219, 219, 219 }, -{ "grey86", 219, 219, 219 }, -{ "gray87", 222, 222, 222 }, -{ "grey87", 222, 222, 222 }, -{ "gray88", 224, 224, 224 }, -{ "grey88", 224, 224, 224 }, -{ "gray89", 227, 227, 227 }, -{ "grey89", 227, 227, 227 }, -{ "gray90", 229, 229, 229 }, -{ "grey90", 229, 229, 229 }, -{ "gray91", 232, 232, 232 }, -{ "grey91", 232, 232, 232 }, -{ "gray92", 235, 235, 235 }, -{ "grey92", 235, 235, 235 }, -{ "gray93", 237, 237, 237 }, -{ "grey93", 237, 237, 237 }, -{ "gray94", 240, 240, 240 }, -{ "grey94", 240, 240, 240 }, -{ "gray95", 242, 242, 242 }, -{ "grey95", 242, 242, 242 }, -{ "gray96", 245, 245, 245 }, -{ "grey96", 245, 245, 245 }, -{ "gray97", 247, 247, 247 }, -{ "grey97", 247, 247, 247 }, -{ "gray98", 250, 250, 250 }, -{ "grey98", 250, 250, 250 }, -{ "gray99", 252, 252, 252 }, -{ "grey99", 252, 252, 252 }, -{ "gray100", 255, 255, 255 }, -{ "grey100", 255, 255, 255 }, -{ "DarkGrey", 169, 169, 169 }, -{ "DarkGray", 169, 169, 169 }, -{ "DarkBlue", 0, 0, 139 }, -{ "DarkCyan", 0, 139, 139 }, -{ "DarkMagenta", 139, 0, 139 }, -{ "DarkRed", 139, 0, 0 }, -{ "LightGreen", 144, 238, 144 }, -{ NULL, 0 , 0, 0} +{ "white", 255, 255, 255 }, +{ "black", 0, 0, 0 }, +{ "snow", 255, 250, 250 }, +{ "GhostWhite", 248, 248, 255 }, +{ "WhiteSmoke", 245, 245, 245 }, +{ "gainsboro", 220, 220, 220 }, +{ "FloralWhite", 255, 250, 240 }, +{ "OldLace", 253, 245, 230 }, +{ "linen", 250, 240, 230 }, +{ "AntiqueWhite", 250, 235, 215 }, +{ "PapayaWhip", 255, 239, 213 }, +{ "BlanchedAlmond", 255, 235, 205 }, +{ "bisque", 255, 228, 196 }, +{ "PeachPuff", 255, 218, 185 }, +{ "NavajoWhite", 255, 222, 173 }, +{ "moccasin", 255, 228, 181 }, +{ "cornsilk", 255, 248, 220 }, +{ "ivory", 255, 255, 240 }, +{ "LemonChiffon", 255, 250, 205 }, +{ "seashell", 255, 245, 238 }, +{ "honeydew", 240, 255, 240 }, +{ "MintCream", 245, 255, 250 }, +{ "azure", 240, 255, 255 }, +{ "AliceBlue", 240, 248, 255 }, +{ "lavender", 230, 230, 250 }, +{ "LavenderBlush", 255, 240, 245 }, +{ "MistyRose", 255, 228, 225 }, +{ "DarkSlateGray", 47, 79, 79 }, +{ "DarkSlateGrey", 47, 79, 79 }, +{ "DimGray", 105, 105, 105 }, +{ "DimGrey", 105, 105, 105 }, +{ "SlateGray", 112, 128, 144 }, +{ "SlateGrey", 112, 128, 144 }, +{ "LightSlateGray", 119, 136, 153 }, +{ "LightSlateGrey", 119, 136, 153 }, +{ "gray", 190, 190, 190 }, +{ "grey", 190, 190, 190 }, +{ "LightGrey", 211, 211, 211 }, +{ "LightGray", 211, 211, 211 }, +{ "MidnightBlue", 25, 25, 112 }, +{ "navy", 0, 0, 128 }, +{ "NavyBlue", 0, 0, 128 }, +{ "CornflowerBlue", 100, 149, 237 }, +{ "DarkSlateBlue", 72, 61, 139 }, +{ "SlateBlue", 106, 90, 205 }, +{ "MediumSlateBlue", 123, 104, 238 }, +{ "LightSlateBlue", 132, 112, 255 }, +{ "MediumBlue", 0, 0, 205 }, +{ "RoyalBlue", 65, 105, 225 }, +{ "blue", 0, 0, 255 }, +{ "DodgerBlue", 30, 144, 255 }, +{ "DeepSkyBlue", 0, 191, 255 }, +{ "SkyBlue", 135, 206, 235 }, +{ "LightSkyBlue", 135, 206, 250 }, +{ "SteelBlue", 70, 130, 180 }, +{ "LightSteelBlue", 176, 196, 222 }, +{ "LightBlue", 173, 216, 230 }, +{ "PowderBlue", 176, 224, 230 }, +{ "PaleTurquoise", 175, 238, 238 }, +{ "DarkTurquoise", 0, 206, 209 }, +{ "MediumTurquoise", 72, 209, 204 }, +{ "turquoise", 64, 224, 208 }, +{ "cyan", 0, 255, 255 }, +{ "LightCyan", 224, 255, 255 }, +{ "CadetBlue", 95, 158, 160 }, +{ "MediumAquamarine", 102, 205, 170 }, +{ "aquamarine", 127, 255, 212 }, +{ "DarkGreen", 0, 100, 0 }, +{ "DarkOliveGreen", 85, 107, 47 }, +{ "DarkSeaGreen", 143, 188, 143 }, +{ "SeaGreen", 46, 139, 87 }, +{ "MediumSeaGreen", 60, 179, 113 }, +{ "LightSeaGreen", 32, 178, 170 }, +{ "PaleGreen", 152, 251, 152 }, +{ "SpringGreen", 0, 255, 127 }, +{ "LawnGreen", 124, 252, 0 }, +{ "green", 0, 255, 0 }, +{ "chartreuse", 127, 255, 0 }, +{ "MediumSpringGreen", 0, 250, 154 }, +{ "GreenYellow", 173, 255 , 47 }, +{ "LimeGreen", 50, 205, 50 }, +{ "YellowGreen", 154, 205, 50 }, +{ "ForestGreen", 34, 139, 34 }, +{ "OliveDrab", 107, 142, 35 }, +{ "DarkKhaki", 189, 183, 107 }, +{ "khaki", 240, 230, 140 }, +{ "PaleGoldenrod", 238, 232, 170 }, +{ "LightGoldenrodYellow", 250, 250, 210 }, +{ "LightYellow", 255, 255, 224 }, +{ "yellow", 255, 255, 0 }, +{ "gold", 255, 215, 0 }, +{ "LightGoldenrod", 238, 221, 130 }, +{ "goldenrod", 218, 165, 32 }, +{ "DarkGoldenrod", 184, 134, 11 }, +{ "RosyBrown", 188, 143, 143 }, +{ "IndianRed", 205, 92, 92 }, +{ "SaddleBrown", 139, 69, 19 }, +{ "sienna", 160, 82, 45 }, +{ "peru", 205, 133, 63 }, +{ "burlywood", 222, 184, 135 }, +{ "beige", 245, 245, 220 }, +{ "wheat", 245, 222, 179 }, +{ "SandyBrown", 244, 164, 96 }, +{ "tan", 210, 180, 140 }, +{ "chocolate", 210, 105, 30 }, +{ "firebrick", 178, 34, 34 }, +{ "brown", 165, 42, 42 }, +{ "DarkSalmon", 233, 150, 122 }, +{ "salmon", 250, 128, 114 }, +{ "LightSalmon", 255, 160, 122 }, +{ "orange", 255, 165, 0 }, +{ "DarkOrange", 255, 140, 0 }, +{ "coral", 255, 127, 80 }, +{ "LightCoral", 240, 128, 128 }, +{ "tomato", 255, 99, 71 }, +{ "OrangeRed", 255, 69, 0 }, +{ "red", 255, 0, 0 }, +{ "HotPink", 255, 105, 180 }, +{ "DeepPink", 255, 20, 147 }, +{ "pink", 255, 192, 203 }, +{ "LightPink", 255, 182, 193 }, +{ "PaleVioletRed", 219, 112, 147 }, +{ "maroon", 176, 48, 96 }, +{ "MediumVioletRed", 199, 21, 133 }, +{ "VioletRed", 208, 32, 144 }, +{ "magenta", 255, 0, 255 }, +{ "violet", 238, 130, 238 }, +{ "plum", 221, 160, 221 }, +{ "orchid", 218, 112, 214 }, +{ "MediumOrchid", 186, 85, 211 }, +{ "DarkOrchid", 153, 50, 204 }, +{ "DarkViolet", 148, 0, 211 }, +{ "BlueViolet", 138, 43, 226 }, +{ "purple", 160, 32, 240 }, +{ "MediumPurple", 147, 112, 219 }, +{ "thistle", 216, 191, 216 }, +{ "snow1", 255, 250, 250 }, +{ "snow2", 238, 233, 233 }, +{ "snow3", 205, 201, 201 }, +{ "snow4", 139, 137, 137 }, +{ "seashell1", 255, 245, 238 }, +{ "seashell2", 238, 229, 222 }, +{ "seashell3", 205, 197, 191 }, +{ "seashell4", 139, 134, 130 }, +{ "AntiqueWhite1", 255, 239, 219 }, +{ "AntiqueWhite2", 238, 223, 204 }, +{ "AntiqueWhite3", 205, 192, 176 }, +{ "AntiqueWhite4", 139, 131, 120 }, +{ "bisque1", 255, 228, 196 }, +{ "bisque2", 238, 213, 183 }, +{ "bisque3", 205, 183, 158 }, +{ "bisque4", 139, 125, 107 }, +{ "PeachPuff1", 255, 218, 185 }, +{ "PeachPuff2", 238, 203, 173 }, +{ "PeachPuff3", 205, 175, 149 }, +{ "PeachPuff4", 139, 119, 101 }, +{ "NavajoWhite1", 255, 222, 173 }, +{ "NavajoWhite2", 238, 207, 161 }, +{ "NavajoWhite3", 205, 179, 139 }, +{ "NavajoWhite4", 139, 121, 94 }, +{ "LemonChiffon1", 255, 250, 205 }, +{ "LemonChiffon2", 238, 233, 191 }, +{ "LemonChiffon3", 205, 201, 165 }, +{ "LemonChiffon4", 139, 137, 112 }, +{ "cornsilk1", 255, 248, 220 }, +{ "cornsilk2", 238, 232, 205 }, +{ "cornsilk3", 205, 200, 177 }, +{ "cornsilk4", 139, 136, 120 }, +{ "ivory1", 255, 255, 240 }, +{ "ivory2", 238, 238, 224 }, +{ "ivory3", 205, 205, 193 }, +{ "ivory4", 139, 139, 131 }, +{ "honeydew1", 240, 255, 240 }, +{ "honeydew2", 224, 238, 224 }, +{ "honeydew3", 193, 205, 193 }, +{ "honeydew4", 131, 139, 131 }, +{ "LavenderBlush1", 255, 240, 245 }, +{ "LavenderBlush2", 238, 224, 229 }, +{ "LavenderBlush3", 205, 193, 197 }, +{ "LavenderBlush4", 139, 131, 134 }, +{ "MistyRose1", 255, 228, 225 }, +{ "MistyRose2", 238, 213, 210 }, +{ "MistyRose3", 205, 183, 181 }, +{ "MistyRose4", 139, 125, 123 }, +{ "azure1", 240, 255, 255 }, +{ "azure2", 224, 238, 238 }, +{ "azure3", 193, 205, 205 }, +{ "azure4", 131, 139, 139 }, +{ "SlateBlue1", 131, 111, 255 }, +{ "SlateBlue2", 122, 103, 238 }, +{ "SlateBlue3", 105, 89, 205 }, +{ "SlateBlue4", 71, 60, 139 }, +{ "RoyalBlue1", 72, 118, 255 }, +{ "RoyalBlue2", 67, 110, 238 }, +{ "RoyalBlue3", 58, 95, 205 }, +{ "RoyalBlue4", 39, 64, 139 }, +{ "blue1", 0, 0, 255 }, +{ "blue2", 0, 0, 238 }, +{ "blue3", 0, 0, 205 }, +{ "blue4", 0, 0, 139 }, +{ "DodgerBlue1", 30, 144, 255 }, +{ "DodgerBlue2", 28, 134, 238 }, +{ "DodgerBlue3", 24, 116, 205 }, +{ "DodgerBlue4", 16, 78, 139 }, +{ "SteelBlue1", 99, 184, 255 }, +{ "SteelBlue2", 92, 172, 238 }, +{ "SteelBlue3", 79, 148, 205 }, +{ "SteelBlue4", 54, 100, 139 }, +{ "DeepSkyBlue1", 0, 191, 255 }, +{ "DeepSkyBlue2", 0, 178, 238 }, +{ "DeepSkyBlue3", 0, 154, 205 }, +{ "DeepSkyBlue4", 0, 104, 139 }, +{ "SkyBlue1", 135, 206, 255 }, +{ "SkyBlue2", 126, 192, 238 }, +{ "SkyBlue3", 108, 166, 205 }, +{ "SkyBlue4", 74, 112, 139 }, +{ "LightSkyBlue1", 176, 226, 255 }, +{ "LightSkyBlue2", 164, 211, 238 }, +{ "LightSkyBlue3", 141, 182, 205 }, +{ "LightSkyBlue4", 96, 123, 139 }, +{ "SlateGray1", 198, 226, 255 }, +{ "SlateGray2", 185, 211, 238 }, +{ "SlateGray3", 159, 182, 205 }, +{ "SlateGray4", 108, 123, 139 }, +{ "LightSteelBlue1", 202, 225, 255 }, +{ "LightSteelBlue2", 188, 210, 238 }, +{ "LightSteelBlue3", 162, 181, 205 }, +{ "LightSteelBlue4", 110, 123, 139 }, +{ "LightBlue1", 191, 239, 255 }, +{ "LightBlue2", 178, 223, 238 }, +{ "LightBlue3", 154, 192, 205 }, +{ "LightBlue4", 104, 131, 139 }, +{ "LightCyan1", 224, 255, 255 }, +{ "LightCyan2", 209, 238, 238 }, +{ "LightCyan3", 180, 205, 205 }, +{ "LightCyan4", 122, 139, 139 }, +{ "PaleTurquoise1", 187, 255, 255 }, +{ "PaleTurquoise2", 174, 238, 238 }, +{ "PaleTurquoise3", 150, 205, 205 }, +{ "PaleTurquoise4", 102, 139, 139 }, +{ "CadetBlue1", 152, 245, 255 }, +{ "CadetBlue2", 142, 229, 238 }, +{ "CadetBlue3", 122, 197, 205 }, +{ "CadetBlue4", 83, 134, 139 }, +{ "turquoise1", 0, 245, 255 }, +{ "turquoise2", 0, 229, 238 }, +{ "turquoise3", 0, 197, 205 }, +{ "turquoise4", 0, 134, 139 }, +{ "cyan1", 0, 255, 255 }, +{ "cyan2", 0, 238, 238 }, +{ "cyan3", 0, 205, 205 }, +{ "cyan4", 0, 139, 139 }, +{ "DarkSlateGray1", 151, 255, 255 }, +{ "DarkSlateGray2", 141, 238, 238 }, +{ "DarkSlateGray3", 121, 205, 205 }, +{ "DarkSlateGray4", 82, 139, 139 }, +{ "aquamarine1", 127, 255, 212 }, +{ "aquamarine2", 118, 238, 198 }, +{ "aquamarine3", 102, 205, 170 }, +{ "aquamarine4", 69, 139, 116 }, +{ "DarkSeaGreen1", 193, 255, 193 }, +{ "DarkSeaGreen2", 180, 238, 180 }, +{ "DarkSeaGreen3", 155, 205, 155 }, +{ "DarkSeaGreen4", 105, 139, 105 }, +{ "SeaGreen1", 84, 255, 159 }, +{ "SeaGreen2", 78, 238, 148 }, +{ "SeaGreen3", 67, 205, 128 }, +{ "SeaGreen4", 46, 139, 87 }, +{ "PaleGreen1", 154, 255, 154 }, +{ "PaleGreen2", 144, 238, 144 }, +{ "PaleGreen3", 124, 205, 124 }, +{ "PaleGreen4", 84, 139, 84 }, +{ "SpringGreen1", 0, 255, 127 }, +{ "SpringGreen2", 0, 238, 118 }, +{ "SpringGreen3", 0, 205, 102 }, +{ "SpringGreen4", 0, 139, 69 }, +{ "green1", 0, 255, 0 }, +{ "green2", 0, 238, 0 }, +{ "green3", 0, 205, 0 }, +{ "green4", 0, 139, 0 }, +{ "chartreuse1", 127, 255, 0 }, +{ "chartreuse2", 118, 238, 0 }, +{ "chartreuse3", 102, 205, 0 }, +{ "chartreuse4", 69, 139, 0 }, +{ "OliveDrab1", 192, 255, 62 }, +{ "OliveDrab2", 179, 238, 58 }, +{ "OliveDrab3", 154, 205, 50 }, +{ "OliveDrab4", 105, 139, 34 }, +{ "DarkOliveGreen1", 202, 255, 112 }, +{ "DarkOliveGreen2", 188, 238, 104 }, +{ "DarkOliveGreen3", 162, 205, 90 }, +{ "DarkOliveGreen4", 110, 139, 61 }, +{ "khaki1", 255, 246, 143 }, +{ "khaki2", 238, 230, 133 }, +{ "khaki3", 205, 198, 115 }, +{ "khaki4", 139, 134, 78 }, +{ "LightGoldenrod1", 255, 236, 139 }, +{ "LightGoldenrod2", 238, 220, 130 }, +{ "LightGoldenrod3", 205, 190, 112 }, +{ "LightGoldenrod4", 139, 129, 76 }, +{ "LightYellow1", 255, 255, 224 }, +{ "LightYellow2", 238, 238, 209 }, +{ "LightYellow3", 205, 205, 180 }, +{ "LightYellow4", 139, 139, 122 }, +{ "yellow1", 255, 255, 0 }, +{ "yellow2", 238, 238, 0 }, +{ "yellow3", 205, 205, 0 }, +{ "yellow4", 139, 139, 0 }, +{ "gold1", 255, 215, 0 }, +{ "gold2", 238, 201, 0 }, +{ "gold3", 205, 173, 0 }, +{ "gold4", 139, 117, 0 }, +{ "goldenrod1", 255, 193, 37 }, +{ "goldenrod2", 238, 180, 34 }, +{ "goldenrod3", 205, 155, 29 }, +{ "goldenrod4", 139, 105, 20 }, +{ "DarkGoldenrod1", 255, 185, 15 }, +{ "DarkGoldenrod2", 238, 173, 14 }, +{ "DarkGoldenrod3", 205, 149, 12 }, +{ "DarkGoldenrod4", 139, 101, 8 }, +{ "RosyBrown1", 255, 193, 193 }, +{ "RosyBrown2", 238, 180, 180 }, +{ "RosyBrown3", 205, 155, 155 }, +{ "RosyBrown4", 139, 105, 105 }, +{ "IndianRed1", 255, 106, 106 }, +{ "IndianRed2", 238, 99, 99 }, +{ "IndianRed3", 205, 85, 85 }, +{ "IndianRed4", 139, 58, 58 }, +{ "sienna1", 255, 130, 71 }, +{ "sienna2", 238, 121, 66 }, +{ "sienna3", 205, 104, 57 }, +{ "sienna4", 139, 71, 38 }, +{ "burlywood1", 255, 211, 155 }, +{ "burlywood2", 238, 197, 145 }, +{ "burlywood3", 205, 170, 125 }, +{ "burlywood4", 139, 115, 85 }, +{ "wheat1", 255, 231, 186 }, +{ "wheat2", 238, 216, 174 }, +{ "wheat3", 205, 186, 150 }, +{ "wheat4", 139, 126, 102 }, +{ "tan1", 255, 165, 79 }, +{ "tan2", 238, 154, 73 }, +{ "tan3", 205, 133, 63 }, +{ "tan4", 139 , 90, 43 }, +{ "chocolate1", 255, 127, 36 }, +{ "chocolate2", 238, 118, 33 }, +{ "chocolate3", 205, 102, 29 }, +{ "chocolate4", 139, 69, 19 }, +{ "firebrick1", 255, 48, 48 }, +{ "firebrick2", 238, 44, 44 }, +{ "firebrick3", 205, 38, 38 }, +{ "firebrick4", 139, 26, 26 }, +{ "brown1", 255, 64, 64 }, +{ "brown2", 238, 59, 59 }, +{ "brown3", 205, 51, 51 }, +{ "brown4", 139, 35, 35 }, +{ "salmon1", 255, 140, 105 }, +{ "salmon2", 238, 130, 98 }, +{ "salmon3", 205, 112, 84 }, +{ "salmon4", 139, 76, 57 }, +{ "LightSalmon1", 255, 160, 122 }, +{ "LightSalmon2", 238, 149, 114 }, +{ "LightSalmon3", 205, 129, 98 }, +{ "LightSalmon4", 139, 87, 66 }, +{ "orange1", 255, 165, 0 }, +{ "orange2", 238, 154, 0 }, +{ "orange3", 205, 133, 0 }, +{ "orange4", 139 , 90, 0 }, +{ "DarkOrange1", 255, 127, 0 }, +{ "DarkOrange2", 238, 118, 0 }, +{ "DarkOrange3", 205, 102, 0 }, +{ "DarkOrange4", 139 , 69, 0 }, +{ "coral1", 255, 114, 86 }, +{ "coral2", 238, 106, 80 }, +{ "coral3", 205, 91, 69 }, +{ "coral4", 139, 62, 47 }, +{ "tomato1", 255, 99, 71 }, +{ "tomato2", 238, 92, 66 }, +{ "tomato3", 205, 79, 57 }, +{ "tomato4", 139, 54, 38 }, +{ "OrangeRed1", 255, 69, 0 }, +{ "OrangeRed2", 238, 64, 0 }, +{ "OrangeRed3", 205, 55, 0 }, +{ "OrangeRed4", 139, 37, 0 }, +{ "red1", 255, 0, 0 }, +{ "red2", 238, 0, 0 }, +{ "red3", 205, 0, 0 }, +{ "red4", 139, 0, 0 }, +{ "DeepPink1", 255, 20, 147 }, +{ "DeepPink2", 238, 18, 137 }, +{ "DeepPink3", 205, 16, 118 }, +{ "DeepPink4", 139, 10, 80 }, +{ "HotPink1", 255, 110, 180 }, +{ "HotPink2", 238, 106, 167 }, +{ "HotPink3", 205, 96, 144 }, +{ "HotPink4", 139, 58, 98 }, +{ "pink1", 255, 181, 197 }, +{ "pink2", 238, 169, 184 }, +{ "pink3", 205, 145, 158 }, +{ "pink4", 139, 99, 108 }, +{ "LightPink1", 255, 174, 185 }, +{ "LightPink2", 238, 162, 173 }, +{ "LightPink3", 205, 140, 149 }, +{ "LightPink4", 139, 95, 101 }, +{ "PaleVioletRed1", 255, 130, 171 }, +{ "PaleVioletRed2", 238, 121, 159 }, +{ "PaleVioletRed3", 205, 104, 137 }, +{ "PaleVioletRed4", 139, 71, 93 }, +{ "maroon1", 255, 52, 179 }, +{ "maroon2", 238, 48, 167 }, +{ "maroon3", 205, 41, 144 }, +{ "maroon4", 139, 28, 98 }, +{ "VioletRed1", 255, 62, 150 }, +{ "VioletRed2", 238, 58, 140 }, +{ "VioletRed3", 205, 50, 120 }, +{ "VioletRed4", 139, 34, 82 }, +{ "magenta1", 255, 0, 255 }, +{ "magenta2", 238, 0, 238 }, +{ "magenta3", 205, 0, 205 }, +{ "magenta4", 139, 0, 139 }, +{ "orchid1", 255, 131, 250 }, +{ "orchid2", 238, 122, 233 }, +{ "orchid3", 205, 105, 201 }, +{ "orchid4", 139, 71, 137 }, +{ "plum1", 255, 187, 255 }, +{ "plum2", 238, 174, 238 }, +{ "plum3", 205, 150, 205 }, +{ "plum4", 139, 102, 139 }, +{ "MediumOrchid1", 224, 102, 255 }, +{ "MediumOrchid2", 209, 95, 238 }, +{ "MediumOrchid3", 180, 82, 205 }, +{ "MediumOrchid4", 122, 55, 139 }, +{ "DarkOrchid1", 191, 62, 255 }, +{ "DarkOrchid2", 178, 58, 238 }, +{ "DarkOrchid3", 154, 50, 205 }, +{ "DarkOrchid4", 104, 34, 139 }, +{ "purple1", 155, 48, 255 }, +{ "purple2", 145, 44, 238 }, +{ "purple3", 125, 38, 205 }, +{ "purple4", 85, 26, 139 }, +{ "MediumPurple1", 171, 130, 255 }, +{ "MediumPurple2", 159, 121, 238 }, +{ "MediumPurple3", 137, 104, 205 }, +{ "MediumPurple4", 93, 71, 139 }, +{ "thistle1", 255, 225, 255 }, +{ "thistle2", 238, 210, 238 }, +{ "thistle3", 205, 181, 205 }, +{ "thistle4", 139, 123, 139 }, +{ "gray0", 0, 0, 0 }, +{ "grey0", 0, 0, 0 }, +{ "gray1", 3, 3, 3 }, +{ "grey1", 3, 3, 3 }, +{ "gray2", 5, 5, 5 }, +{ "grey2", 5, 5, 5 }, +{ "gray3", 8, 8, 8 }, +{ "grey3", 8, 8, 8 }, +{ "gray4", 10, 10, 10 }, +{ "grey4", 10, 10, 10 }, +{ "gray5", 13, 13, 13 }, +{ "grey5", 13, 13, 13 }, +{ "gray6", 15, 15, 15 }, +{ "grey6", 15, 15, 15 }, +{ "gray7", 18, 18, 18 }, +{ "grey7", 18, 18, 18 }, +{ "gray8", 20, 20, 20 }, +{ "grey8", 20, 20, 20 }, +{ "gray9", 23, 23, 23 }, +{ "grey9", 23, 23, 23 }, +{ "gray10", 26, 26, 26 }, +{ "grey10", 26, 26, 26 }, +{ "gray11", 28, 28, 28 }, +{ "grey11", 28, 28, 28 }, +{ "gray12", 31, 31, 31 }, +{ "grey12", 31, 31, 31 }, +{ "gray13", 33, 33, 33 }, +{ "grey13", 33, 33, 33 }, +{ "gray14", 36, 36, 36 }, +{ "grey14", 36, 36, 36 }, +{ "gray15", 38, 38, 38 }, +{ "grey15", 38, 38, 38 }, +{ "gray16", 41, 41, 41 }, +{ "grey16", 41, 41, 41 }, +{ "gray17", 43, 43, 43 }, +{ "grey17", 43, 43, 43 }, +{ "gray18", 46, 46, 46 }, +{ "grey18", 46, 46, 46 }, +{ "gray19", 48, 48, 48 }, +{ "grey19", 48, 48, 48 }, +{ "gray20", 51, 51, 51 }, +{ "grey20", 51, 51, 51 }, +{ "gray21", 54, 54, 54 }, +{ "grey21", 54, 54, 54 }, +{ "gray22", 56, 56, 56 }, +{ "grey22", 56, 56, 56 }, +{ "gray23", 59, 59, 59 }, +{ "grey23", 59, 59, 59 }, +{ "gray24", 61, 61, 61 }, +{ "grey24", 61, 61, 61 }, +{ "gray25", 64, 64, 64 }, +{ "grey25", 64, 64, 64 }, +{ "gray26", 66, 66, 66 }, +{ "grey26", 66, 66, 66 }, +{ "gray27", 69, 69, 69 }, +{ "grey27", 69, 69, 69 }, +{ "gray28", 71, 71, 71 }, +{ "grey28", 71, 71, 71 }, +{ "gray29", 74, 74, 74 }, +{ "grey29", 74, 74, 74 }, +{ "gray30", 77, 77, 77 }, +{ "grey30", 77, 77, 77 }, +{ "gray31", 79, 79, 79 }, +{ "grey31", 79, 79, 79 }, +{ "gray32", 82, 82, 82 }, +{ "grey32", 82, 82, 82 }, +{ "gray33", 84, 84, 84 }, +{ "grey33", 84, 84, 84 }, +{ "gray34", 87, 87, 87 }, +{ "grey34", 87, 87, 87 }, +{ "gray35", 89, 89, 89 }, +{ "grey35", 89, 89, 89 }, +{ "gray36", 92, 92, 92 }, +{ "grey36", 92, 92, 92 }, +{ "gray37", 94, 94, 94 }, +{ "grey37", 94, 94, 94 }, +{ "gray38", 97, 97, 97 }, +{ "grey38", 97, 97, 97 }, +{ "gray39", 99, 99, 99 }, +{ "grey39", 99, 99, 99 }, +{ "gray40", 102, 102, 102 }, +{ "grey40", 102, 102, 102 }, +{ "gray41", 105, 105, 105 }, +{ "grey41", 105, 105, 105 }, +{ "gray42", 107, 107, 107 }, +{ "grey42", 107, 107, 107 }, +{ "gray43", 110, 110, 110 }, +{ "grey43", 110, 110, 110 }, +{ "gray44", 112, 112, 112 }, +{ "grey44", 112, 112, 112 }, +{ "gray45", 115, 115, 115 }, +{ "grey45", 115, 115, 115 }, +{ "gray46", 117, 117, 117 }, +{ "grey46", 117, 117, 117 }, +{ "gray47", 120, 120, 120 }, +{ "grey47", 120, 120, 120 }, +{ "gray48", 122, 122, 122 }, +{ "grey48", 122, 122, 122 }, +{ "gray49", 125, 125, 125 }, +{ "grey49", 125, 125, 125 }, +{ "gray50", 127, 127, 127 }, +{ "grey50", 127, 127, 127 }, +{ "gray51", 130, 130, 130 }, +{ "grey51", 130, 130, 130 }, +{ "gray52", 133, 133, 133 }, +{ "grey52", 133, 133, 133 }, +{ "gray53", 135, 135, 135 }, +{ "grey53", 135, 135, 135 }, +{ "gray54", 138, 138, 138 }, +{ "grey54", 138, 138, 138 }, +{ "gray55", 140, 140, 140 }, +{ "grey55", 140, 140, 140 }, +{ "gray56", 143, 143, 143 }, +{ "grey56", 143, 143, 143 }, +{ "gray57", 145, 145, 145 }, +{ "grey57", 145, 145, 145 }, +{ "gray58", 148, 148, 148 }, +{ "grey58", 148, 148, 148 }, +{ "gray59", 150, 150, 150 }, +{ "grey59", 150, 150, 150 }, +{ "gray60", 153, 153, 153 }, +{ "grey60", 153, 153, 153 }, +{ "gray61", 156, 156, 156 }, +{ "grey61", 156, 156, 156 }, +{ "gray62", 158, 158, 158 }, +{ "grey62", 158, 158, 158 }, +{ "gray63", 161, 161, 161 }, +{ "grey63", 161, 161, 161 }, +{ "gray64", 163, 163, 163 }, +{ "grey64", 163, 163, 163 }, +{ "gray65", 166, 166, 166 }, +{ "grey65", 166, 166, 166 }, +{ "gray66", 168, 168, 168 }, +{ "grey66", 168, 168, 168 }, +{ "gray67", 171, 171, 171 }, +{ "grey67", 171, 171, 171 }, +{ "gray68", 173, 173, 173 }, +{ "grey68", 173, 173, 173 }, +{ "gray69", 176, 176, 176 }, +{ "grey69", 176, 176, 176 }, +{ "gray70", 179, 179, 179 }, +{ "grey70", 179, 179, 179 }, +{ "gray71", 181, 181, 181 }, +{ "grey71", 181, 181, 181 }, +{ "gray72", 184, 184, 184 }, +{ "grey72", 184, 184, 184 }, +{ "gray73", 186, 186, 186 }, +{ "grey73", 186, 186, 186 }, +{ "gray74", 189, 189, 189 }, +{ "grey74", 189, 189, 189 }, +{ "gray75", 191, 191, 191 }, +{ "grey75", 191, 191, 191 }, +{ "gray76", 194, 194, 194 }, +{ "grey76", 194, 194, 194 }, +{ "gray77", 196, 196, 196 }, +{ "grey77", 196, 196, 196 }, +{ "gray78", 199, 199, 199 }, +{ "grey78", 199, 199, 199 }, +{ "gray79", 201, 201, 201 }, +{ "grey79", 201, 201, 201 }, +{ "gray80", 204, 204, 204 }, +{ "grey80", 204, 204, 204 }, +{ "gray81", 207, 207, 207 }, +{ "grey81", 207, 207, 207 }, +{ "gray82", 209, 209, 209 }, +{ "grey82", 209, 209, 209 }, +{ "gray83", 212, 212, 212 }, +{ "grey83", 212, 212, 212 }, +{ "gray84", 214, 214, 214 }, +{ "grey84", 214, 214, 214 }, +{ "gray85", 217, 217, 217 }, +{ "grey85", 217, 217, 217 }, +{ "gray86", 219, 219, 219 }, +{ "grey86", 219, 219, 219 }, +{ "gray87", 222, 222, 222 }, +{ "grey87", 222, 222, 222 }, +{ "gray88", 224, 224, 224 }, +{ "grey88", 224, 224, 224 }, +{ "gray89", 227, 227, 227 }, +{ "grey89", 227, 227, 227 }, +{ "gray90", 229, 229, 229 }, +{ "grey90", 229, 229, 229 }, +{ "gray91", 232, 232, 232 }, +{ "grey91", 232, 232, 232 }, +{ "gray92", 235, 235, 235 }, +{ "grey92", 235, 235, 235 }, +{ "gray93", 237, 237, 237 }, +{ "grey93", 237, 237, 237 }, +{ "gray94", 240, 240, 240 }, +{ "grey94", 240, 240, 240 }, +{ "gray95", 242, 242, 242 }, +{ "grey95", 242, 242, 242 }, +{ "gray96", 245, 245, 245 }, +{ "grey96", 245, 245, 245 }, +{ "gray97", 247, 247, 247 }, +{ "grey97", 247, 247, 247 }, +{ "gray98", 250, 250, 250 }, +{ "grey98", 250, 250, 250 }, +{ "gray99", 252, 252, 252 }, +{ "grey99", 252, 252, 252 }, +{ "gray100", 255, 255, 255 }, +{ "grey100", 255, 255, 255 }, +{ "DarkGrey", 169, 169, 169 }, +{ "DarkGray", 169, 169, 169 }, +{ "DarkBlue", 0, 0, 139 }, +{ "DarkCyan", 0, 139, 139 }, +{ "DarkMagenta", 139, 0, 139 }, +{ "DarkRed", 139, 0, 0 }, +{ "LightGreen", 144, 238, 144 }, +{ NULL, 0 , 0, 0} }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/filter.vcl/ixpm/xpmread.cxx b/svtools/source/filter.vcl/ixpm/xpmread.cxx index e0bbad0f0ceb..e42fb3b014f9 100644 --- a/svtools/source/filter.vcl/ixpm/xpmread.cxx +++ b/svtools/source/filter.vcl/ixpm/xpmread.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -40,22 +40,22 @@ // ------------- XPMReader::XPMReader( SvStream& rStm ) : - mrIStm ( rStm ), - mpAcc ( NULL ), - mpMaskAcc ( NULL ), - mnLastPos ( rStm.Tell() ), - mnWidth ( 0 ), - mnHeight ( 0 ), - mnColors ( 0 ), - mnCpp ( 0 ), - mbTransparent ( FALSE ), - mbStatus ( TRUE ), - mnStatus ( 0 ), - mnIdentifier ( XPMIDENTIFIER ), - mcThisByte ( 0 ), - mnTempAvail ( 0 ), + mrIStm ( rStm ), + mpAcc ( NULL ), + mpMaskAcc ( NULL ), + mnLastPos ( rStm.Tell() ), + mnWidth ( 0 ), + mnHeight ( 0 ), + mnColors ( 0 ), + mnCpp ( 0 ), + mbTransparent ( FALSE ), + mbStatus ( TRUE ), + mnStatus ( 0 ), + mnIdentifier ( XPMIDENTIFIER ), + mcThisByte ( 0 ), + mnTempAvail ( 0 ), mpFastColorTable( NULL ), - mpColMap ( NULL ) + mpColMap ( NULL ) { } @@ -76,8 +76,8 @@ XPMReader::~XPMReader() ReadState XPMReader::ReadXPM( Graphic& rGraphic ) { - ReadState eReadState; - BYTE cDummy; + ReadState eReadState; + BYTE cDummy; // sehen, ob wir _alles_ lesen koennen mrIStm.Seek( STREAM_SEEK_TO_END ); @@ -97,7 +97,7 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic ) if ( ( mbStatus = ImplGetString() ) == TRUE ) { - mnIdentifier = XPMVALUES; // Bitmap informationen einholen + mnIdentifier = XPMVALUES; // Bitmap informationen einholen mnWidth = ImplGetULONG( 0 ); mnHeight = ImplGetULONG( 1 ); mnColors = ImplGetULONG( 2 ); @@ -112,9 +112,9 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic ) mnIdentifier = XPMCOLORS; // mpColMap beinhaltet fuer jede vorhandene - // Farbe: ( mnCpp )Byte(s)-> ASCII Eintrag der der Farbe zugeordnet ist - // 1 Byte -> 0xff wenn Farbe transparent ist - // 3 Bytes -> RGB Wert der Farbe + // Farbe: ( mnCpp )Byte(s)-> ASCII Eintrag der der Farbe zugeordnet ist + // 1 Byte -> 0xff wenn Farbe transparent ist + // 3 Bytes -> RGB Wert der Farbe mpColMap = new BYTE[ mnColors * ( 4 + mnCpp ) ]; if ( mpColMap ) { @@ -151,15 +151,15 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic ) { maMaskBmp = Bitmap( Size( mnWidth, mnHeight ), 1 ); if ( ( mpMaskAcc = maMaskBmp.AcquireWriteAccess() ) == NULL ) - mbStatus = FALSE; + mbStatus = FALSE; } if( mpAcc && mbStatus ) { - ULONG i; - if ( mnColors <=256 ) // palette is only needed by using less than 257 - { // colors + ULONG i; + if ( mnColors <=256 ) // palette is only needed by using less than 257 + { // colors - BYTE* pPtr = &mpColMap[mnCpp]; + BYTE* pPtr = &mpColMap[mnCpp]; for ( i = 0; i < mnColors; i++ ) { @@ -167,12 +167,12 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic ) pPtr += ( mnCpp + 4 ); } // using 2 charakters per pixel and less than 257 Colors we speed up - if ( mnCpp == 2 ) // by using a 64kb indexing table + if ( mnCpp == 2 ) // by using a 64kb indexing table { mpFastColorTable = new BYTE[ 256 * 256 ]; for ( pPtr = mpColMap, i = 0; i < mnColors; i++, pPtr += mnCpp + 4 ) { - ULONG j = pPtr[ 0 ] << 8; + ULONG j = pPtr[ 0 ] << 8; j += pPtr[ 1 ]; mpFastColorTable[ j ] = (BYTE)i; } @@ -239,9 +239,9 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic ) BOOL XPMReader::ImplGetColor( ULONG nNumb ) { - BYTE* pString = mpStringBuf; - BYTE* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) ); - BOOL bStatus = ImplGetString(); + BYTE* pString = mpStringBuf; + BYTE* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) ); + BOOL bStatus = ImplGetString(); if ( bStatus ) { @@ -258,11 +258,11 @@ BOOL XPMReader::ImplGetColor( ULONG nNumb ) BOOL XPMReader::ImplGetScanLine( ULONG nY ) { - BOOL bStatus = ImplGetString(); - BYTE* pString = mpStringBuf; - BYTE* pColor; - BitmapColor aWhite; - BitmapColor aBlack; + BOOL bStatus = ImplGetString(); + BYTE* pString = mpStringBuf; + BYTE* pColor; + BitmapColor aWhite; + BitmapColor aBlack; if ( bStatus ) { @@ -336,9 +336,9 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest ) { *pDest++ = 0; bColStatus = TRUE; - switch ( mnParaSize ) + switch ( mnParaSize ) { - case 25 : + case 25 : ImplGetRGBHex ( pDest, 6 ); break; case 13 : @@ -360,7 +360,7 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest ) mbTransparent = TRUE; } // last we will try to get the colorname - else if ( mnParaSize > 2 ) // name must enlarge the minimum size + else if ( mnParaSize > 2 ) // name must enlarge the minimum size { ULONG i = 0; while ( TRUE ) @@ -434,15 +434,15 @@ BOOL XPMReader::ImplGetColKey( BYTE nKey ) // ImplGetRGBHex uebersetzt den ASCII-Hexadezimalwert der sich bei mpPara befindet // in einen RGB wert und schreibt diesen nach pDest // folgende Formate muessen sich bei mpPara befinden: -// wenn nAdd = 0 : '#12ab12' -> RGB = 0x12, 0xab, 0x12 -// 2 : '#1234abcd1234' " " " " -// 6 : '#12345678abcdefab12345678' " " " " +// wenn nAdd = 0 : '#12ab12' -> RGB = 0x12, 0xab, 0x12 +// 2 : '#1234abcd1234' " " " " +// 6 : '#12345678abcdefab12345678' " " " " void XPMReader::ImplGetRGBHex( BYTE* pDest,ULONG nAdd ) { - BYTE* pPtr = mpPara+1; - BYTE nHex, nTemp; + BYTE* pPtr = mpPara+1; + BYTE nHex, nTemp; for ( ULONG i = 0; i < 3; i++ ) { @@ -474,7 +474,7 @@ ULONG XPMReader::ImplGetULONG( ULONG nPara ) for ( ULONG i = 0; i < mnParaSize; i++ ) { BYTE j = (*pPtr++) - 48; - if ( j > 9 ) return 0; // ascii is invalid + if ( j > 9 ) return 0; // ascii is invalid nRetValue*=10; nRetValue+=j; } @@ -522,10 +522,10 @@ BOOL XPMReader::ImplCompare( BYTE* pSource, BYTE* pDest, ULONG nSize, ULONG nMod BOOL XPMReader::ImplGetPara ( ULONG nNumb ) { - BYTE nByte; - ULONG pSize = 0; - BYTE* pPtr = mpStringBuf; - ULONG nCount = 0; + BYTE nByte; + ULONG pSize = 0; + BYTE* pPtr = mpStringBuf; + ULONG nCount = 0; if ( ( *pPtr != ' ' ) && ( *pPtr != 0x09 ) ) { @@ -577,8 +577,8 @@ BOOL XPMReader::ImplGetPara ( ULONG nNumb ) BOOL XPMReader::ImplGetString( void ) { - BYTE sID[] = "/* XPM */"; - BYTE* pString = mpStringBuf; + BYTE sID[] = "/* XPM */"; + BYTE* pString = mpStringBuf; mnStringSize = 0; mpStringBuf[0] = 0; @@ -597,10 +597,10 @@ BOOL XPMReader::ImplGetString( void ) { if ( mnTempAvail <= 50 ) { - mbStatus = FALSE; // file is too short to be a correct XPM format + mbStatus = FALSE; // file is too short to be a correct XPM format break; } - for ( int i = 0; i < 9; i++ ) // searching for "/* XPM */" + for ( int i = 0; i < 9; i++ ) // searching for "/* XPM */" if ( *mpTempPtr++ != sID[i] ) { mbStatus = FALSE; @@ -626,11 +626,11 @@ BOOL XPMReader::ImplGetString( void ) mnStatus &=~XPMREMARK; continue; } - if ( mnStatus & XPMSTRING ) // characters in string + if ( mnStatus & XPMSTRING ) // characters in string { if ( mcThisByte == '"' ) { - mnStatus &=~XPMSTRING; // end of parameter by eol + mnStatus &=~XPMSTRING; // end of parameter by eol break; } if ( mnStringSize >= ( XPMSTRINGBUF - 1 ) ) @@ -644,7 +644,7 @@ BOOL XPMReader::ImplGetString( void ) continue; } else - { // characters beside string + { // characters beside string switch ( mcThisByte ) { case '*' : @@ -675,9 +675,9 @@ BOOL XPMReader::ImplGetString( void ) BOOL ImportXPM( SvStream& rStm, Graphic& rGraphic ) { - XPMReader* pXPMReader = (XPMReader*) rGraphic.GetContext(); - ReadState eReadState; - BOOL bRet = TRUE; + XPMReader* pXPMReader = (XPMReader*) rGraphic.GetContext(); + ReadState eReadState; + BOOL bRet = TRUE; if( !pXPMReader ) pXPMReader = new XPMReader( rStm ); diff --git a/svtools/source/filter.vcl/jpeg/jpeg.cxx b/svtools/source/filter.vcl/jpeg/jpeg.cxx index 146beff287bc..439efb9e632d 100644 --- a/svtools/source/filter.vcl/jpeg/jpeg.cxx +++ b/svtools/source/filter.vcl/jpeg/jpeg.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -92,7 +92,7 @@ extern "C" long JPEGCallback( void* pCallbackData, long nPercent ) #define BUF_SIZE 4096 -typedef struct +typedef struct { struct jpeg_destination_mgr pub; /* public fields */ @@ -308,12 +308,12 @@ extern "C" void jpeg_svstream_src (j_decompress_ptr cinfo, void * in) // -------------- JPEGReader::JPEGReader( SvStream& rStm, void* /*pCallData*/, sal_Bool bSetLS ) : - rIStm ( rStm ), - pAcc ( NULL ), - pAcc1 ( NULL ), - pBuffer ( NULL ), - nLastPos ( rStm.Tell() ), - nLastLines ( 0 ), + rIStm ( rStm ), + pAcc ( NULL ), + pAcc1 ( NULL ), + pBuffer ( NULL ), + nLastPos ( rStm.Tell() ), + nLastLines ( 0 ), bSetLogSize ( bSetLS ) { maUpperName = String::CreateFromAscii( "SVIJPEG", 7 ); @@ -361,26 +361,26 @@ void* JPEGReader::CreateBitmap( void* pParam ) } else aBmp = Bitmap( aSize, 24 ); - + if ( bSetLogSize ) { unsigned long nUnit = ((JPEGCreateBitmapParam*)pParam)->density_unit; - - if( ( ( 1 == nUnit ) || ( 2 == nUnit ) ) && - ( (JPEGCreateBitmapParam*) pParam )->X_density && + + if( ( ( 1 == nUnit ) || ( 2 == nUnit ) ) && + ( (JPEGCreateBitmapParam*) pParam )->X_density && ( (JPEGCreateBitmapParam*) pParam )->Y_density ) { Point aEmptyPoint; - Fraction aFractX( 1, ((JPEGCreateBitmapParam*)pParam)->X_density ); - Fraction aFractY( 1, ((JPEGCreateBitmapParam*)pParam)->Y_density ); - MapMode aMapMode( nUnit == 1 ? MAP_INCH : MAP_CM, aEmptyPoint, aFractX, aFractY ); - Size aPrefSize = OutputDevice::LogicToLogic( aSize, aMapMode, MAP_100TH_MM ); + Fraction aFractX( 1, ((JPEGCreateBitmapParam*)pParam)->X_density ); + Fraction aFractY( 1, ((JPEGCreateBitmapParam*)pParam)->Y_density ); + MapMode aMapMode( nUnit == 1 ? MAP_INCH : MAP_CM, aEmptyPoint, aFractX, aFractY ); + Size aPrefSize = OutputDevice::LogicToLogic( aSize, aMapMode, MAP_100TH_MM ); aBmp.SetPrefSize( aPrefSize ); aBmp.SetPrefMapMode( MapMode( MAP_100TH_MM ) ); } } - + pAcc = aBmp.AcquireWriteAccess(); if( pAcc ) @@ -416,11 +416,11 @@ void JPEGReader::FillBitmap() { if( pBuffer && pAcc ) { - HPBYTE pTmp; - BitmapColor aColor; - long nAlignedWidth; - long nWidth = pAcc->Width(); - long nHeight = pAcc->Height(); + HPBYTE pTmp; + BitmapColor aColor; + long nAlignedWidth; + long nWidth = pAcc->Width(); + long nHeight = pAcc->Height(); if( pAcc->GetBitCount() == 8 ) { @@ -468,8 +468,8 @@ void JPEGReader::FillBitmap() Graphic JPEGReader::CreateIntermediateGraphic( const Bitmap& rBitmap, long nLines ) { - Graphic aGraphic; - const Size aSizePix( rBitmap.GetSizePixel() ); + Graphic aGraphic; + const Size aSizePix( rBitmap.GetSizePixel() ); if( !nLastLines ) { @@ -513,11 +513,11 @@ Graphic JPEGReader::CreateIntermediateGraphic( const Bitmap& rBitmap, long nLine ReadState JPEGReader::Read( Graphic& rGraphic ) { - long nEndPos; - long nLines; - ReadState eReadState; - BOOL bRet = FALSE; - BYTE cDummy; + long nEndPos; + long nLines; + ReadState eReadState; + BOOL bRet = FALSE; + BYTE cDummy; #if 1 // TODO: is it possible to get rid of this seek to the end? // check if the stream's end is already available @@ -592,9 +592,9 @@ ReadState JPEGReader::Read( Graphic& rGraphic ) // -------------- JPEGWriter::JPEGWriter( SvStream& rStm, const uno::Sequence< beans::PropertyValue >* pFilterData, bool* pExportWasGrey ) : - rOStm ( rStm ), - pAcc ( NULL ), - pBuffer ( NULL ), + rOStm ( rStm ), + pAcc ( NULL ), + pBuffer ( NULL ), pExpWasGrey ( pExportWasGrey ) { FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData ); @@ -629,8 +629,8 @@ void* JPEGWriter::GetScanline( long nY ) else if( pBuffer ) { BitmapColor aColor; - long nWidth = pAcc->Width(); - BYTE* pTmp = pBuffer; + long nWidth = pAcc->Width(); + BYTE* pTmp = pBuffer; if( pAcc->HasPalette() ) { @@ -686,8 +686,8 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic ) pAcc = aGraphicBmp.AcquireReadAccess(); - if ( !bGreys ) // bitmap was not explicitely converted into greyscale, - { // check if source is greyscale only + if ( !bGreys ) // bitmap was not explicitely converted into greyscale, + { // check if source is greyscale only sal_Bool bIsGrey = sal_True; @@ -705,7 +705,7 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic ) if ( bIsGrey ) bGreys = sal_True; } - + if( pExpWasGrey ) *pExpWasGrey = bGreys; @@ -738,9 +738,9 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic ) BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags ) { - JPEGReader* pJPEGReader = (JPEGReader*) rGraphic.GetContext(); - ReadState eReadState; - BOOL bRet = TRUE; + JPEGReader* pJPEGReader = (JPEGReader*) rGraphic.GetContext(); + ReadState eReadState; + BOOL bRet = TRUE; if( !pJPEGReader ) pJPEGReader = new JPEGReader( rStm, pCallerData, ( nImportFlags & GRFILTER_I_FLAGS_SET_LOGSIZE_FOR_JPEG ) != 0 ); diff --git a/svtools/source/filter.vcl/jpeg/jpeg.h b/svtools/source/filter.vcl/jpeg/jpeg.h index c5284e968a8d..038c0b90cd61 100644 --- a/svtools/source/filter.vcl/jpeg/jpeg.h +++ b/svtools/source/filter.vcl/jpeg/jpeg.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,29 +45,29 @@ struct JPEGCreateBitmapParam unsigned long X_density; unsigned long Y_density; long bGray; - + long nAlignedWidth; // these members will be filled by the long bTopDown; // CreateBitmap method in svtools }; -typedef struct my_error_mgr* my_error_ptr; -typedef unsigned char BYTE; +typedef struct my_error_mgr* my_error_ptr; +typedef unsigned char BYTE; #ifdef WIN -typedef unsigned char _huge* HPBYTE; +typedef unsigned char _huge* HPBYTE; #else -typedef unsigned char* HPBYTE; +typedef unsigned char* HPBYTE; #endif -void* JPEGMalloc( size_t size ); -void JPEGFree( void *ptr ); -long JPEGCallback( void* pCallbackData, long nPercent ); +void* JPEGMalloc( size_t size ); +void JPEGFree( void *ptr ); +long JPEGCallback( void* pCallbackData, long nPercent ); -long WriteJPEG( void* pJPEGWriter, void* pOStm, long nWidth, long nHeight, long bGreyScale, +long WriteJPEG( void* pJPEGWriter, void* pOStm, long nWidth, long nHeight, long bGreyScale, long nQualityPercent, void* pCallbackData ); -void* GetScanline( void* pJPEGWriter, long nY ); +void* GetScanline( void* pJPEGWriter, long nY ); -void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ); -void* CreateBitmap( void* pJPEGReader, void* pJPEGCreateBitmapParam ); +void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ); +void* CreateBitmap( void* pJPEGReader, void* pJPEGCreateBitmapParam ); /* TODO: when incompatible changes are possible again the preview size hint should be redone */ diff --git a/svtools/source/filter.vcl/jpeg/jpegc.c b/svtools/source/filter.vcl/jpeg/jpegc.c index f94d7039920f..3517e6cb08a9 100644 --- a/svtools/source/filter.vcl/jpeg/jpegc.c +++ b/svtools/source/filter.vcl/jpeg/jpegc.c @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -72,11 +72,11 @@ void SetJpegPreviewSizeHint( int nWidth, int nHeight ) void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ) { - struct jpeg_decompress_struct cinfo; - struct my_error_mgr jerr; + struct jpeg_decompress_struct cinfo; + struct my_error_mgr jerr; struct JPEGCreateBitmapParam aCreateBitmapParam; - HPBYTE pDIB; - HPBYTE pTmp; + HPBYTE pDIB; + HPBYTE pTmp; long nWidth; long nHeight; long nAlignedWidth; @@ -85,7 +85,7 @@ void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ) long nScanLineBufferComponents = 0; // declare bDecompCreated volatile because of gcc // warning: variable 'bDecompCreated' might be clobbered by `longjmp' or `vfork' - volatile long bDecompCreated = 0; + volatile long bDecompCreated = 0; /* Falls der Stream nicht ausreicht (IO_PENDING) wird ueber ein longjmp in der Schleife nach Exit @@ -198,7 +198,7 @@ void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines ) /* PENDING ??? */ if ( cinfo.err->msg_code == 113 ) break; - + pTmp += nAlignedWidth; } } @@ -219,14 +219,14 @@ long WriteJPEG( void* pJPEGWriter, void* pOStm, long nWidth, long nHeight, long bGreys, long nQualityPercent, void* pCallbackData ) { - struct jpeg_compress_struct cinfo; - struct my_error_mgr jerr; - void* pScanline; - long nY; + struct jpeg_compress_struct cinfo; + struct my_error_mgr jerr; + void* pScanline; + long nY; // declare bCompCreated, bRet volatile because of gcc // warning: variable 'bCompCreated' might be clobbered by `longjmp' or `vfork' - volatile long bCompCreated = 0; - volatile long bRet = 0; + volatile long bCompCreated = 0; + volatile long bRet = 0; if ( setjmp( jerr.setjmp_buffer ) ) goto Exit; diff --git a/svtools/source/filter.vcl/wmf/emfwr.cxx b/svtools/source/filter.vcl/wmf/emfwr.cxx index c87ad02ed63e..ab59f1bf332e 100644 --- a/svtools/source/filter.vcl/wmf/emfwr.cxx +++ b/svtools/source/filter.vcl/wmf/emfwr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -137,33 +137,33 @@ #define WIN_EMR_POLYTEXTOUTA 96 #define WIN_EMR_POLYTEXTOUTW 97 -#define WIN_SRCCOPY 0x00CC0020L -#define WIN_SRCPAINT 0x00EE0086L -#define WIN_SRCAND 0x008800C6L -#define WIN_SRCINVERT 0x00660046L +#define WIN_SRCCOPY 0x00CC0020L +#define WIN_SRCPAINT 0x00EE0086L +#define WIN_SRCAND 0x008800C6L +#define WIN_SRCINVERT 0x00660046L -#define HANDLE_INVALID 0xffffffff -#define MAXHANDLES 65000 +#define HANDLE_INVALID 0xffffffff +#define MAXHANDLES 65000 -#define LINE_SELECT 0x00000001 -#define FILL_SELECT 0x00000002 -#define TEXT_SELECT 0x00000004 +#define LINE_SELECT 0x00000001 +#define FILL_SELECT 0x00000002 +#define TEXT_SELECT 0x00000004 /* Text Alignment Options */ -#define TA_NOUPDATECP 0 -#define TA_UPDATECP 1 +#define TA_NOUPDATECP 0 +#define TA_UPDATECP 1 -#define TA_LEFT 0 -#define TA_RIGHT 2 -#define TA_CENTER 6 +#define TA_LEFT 0 +#define TA_RIGHT 2 +#define TA_CENTER 6 -#define TA_TOP 0 -#define TA_BOTTOM 8 -#define TA_BASELINE 24 -#define TA_RTLREADING 256 -#define TA_MASK (TA_BASELINE+TA_CENTER+TA_UPDATECP+TA_RTLREADING) +#define TA_TOP 0 +#define TA_BOTTOM 8 +#define TA_BASELINE 24 +#define TA_RTLREADING 256 +#define TA_MASK (TA_BASELINE+TA_CENTER+TA_UPDATECP+TA_RTLREADING) -#define MM_ANISOTROPIC 8 +#define MM_ANISOTROPIC 8 // ------------- // - EMFWriter - @@ -178,21 +178,21 @@ BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfig mnHorTextAlign = mnHandleCount = mnLastPercent = mnRecordPos = mnRecordCount = 0; mnLineHandle = mnFillHandle = mnTextHandle = HANDLE_INVALID; mbRecordOpen = FALSE; - + mpStm = &rOStm; maVDev.EnableOutput( FALSE ); maVDev.SetMapMode( rMtf.GetPrefMapMode() ); mpFilterConfigItem = pFilterConfigItem; // don't work with pixel as destination map mode -> higher resolution preferrable - maDestMapMode.SetMapUnit( MAP_100TH_MM ); + maDestMapMode.SetMapUnit( MAP_100TH_MM ); const Size aMtfSizePix( maVDev.LogicToPixel( rMtf.GetPrefSize(), rMtf.GetPrefMapMode() ) ); const Size aMtfSizeLog( maVDev.LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_100TH_MM ) ); - + // seek over header // use [MS-EMF 2.2.11] HeaderExtension2 Object, otherwise resulting EMF cannot be converted with GetWinMetaFileBits() - rOStm.SeekRel( 108 ); + rOStm.SeekRel( 108 ); // write initial values @@ -227,16 +227,16 @@ BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfig ImplWrite( rMtf ); ImplBeginRecord( WIN_EMR_EOF ); - (*mpStm)<< (sal_uInt32)0 // nPalEntries - << (sal_uInt32)0x10 // offPalEntries - << (sal_uInt32)0x14; // nSizeLast + (*mpStm)<< (sal_uInt32)0 // nPalEntries + << (sal_uInt32)0x10 // offPalEntries + << (sal_uInt32)0x14; // nSizeLast ImplEndRecord(); // write header const ULONG nEndPos = mpStm->Tell(); mpStm->Seek( nHeaderPos ); - - (*mpStm) << (UINT32) 0x00000001 << (UINT32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object + + (*mpStm) << (UINT32) 0x00000001 << (UINT32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object << (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizePix.Width() - 1 ) << (INT32) ( aMtfSizePix.Height() - 1 ) << (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizeLog.Width() - 1 ) << (INT32) ( aMtfSizeLog.Height() - 1 ) << (UINT32) 0x464d4520 << (UINT32) 0x10000 << (UINT32) ( nEndPos - nHeaderPos ) @@ -247,7 +247,7 @@ BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfig << (INT32) ( aMtfSizeLog.Width() * 10 ) << (INT32) ( aMtfSizeLog.Height() * 10 ); //use [MS-EMF 2.2.11] HeaderExtension2 Object mpStm->Seek( nEndPos ); - delete[] mpHandlesUsed; + delete[] mpHandlesUsed; return( mpStm->GetError() == ERRCODE_NONE ); } @@ -308,7 +308,7 @@ void EMFWriter::ImplEndRecord() sal_Int32 nFillBytes, nActPos = mpStm->Tell(); mpStm->Seek( mnRecordPos + 4 ); nFillBytes = nActPos - mnRecordPos; - nFillBytes += 3; // each record has to be dword aligned + nFillBytes += 3; // each record has to be dword aligned nFillBytes ^= 3; nFillBytes &= 3; *mpStm << (sal_uInt32)( ( nActPos - mnRecordPos ) + nFillBytes ); @@ -328,7 +328,7 @@ BOOL EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType { UINT32 nStockObject = 0x80000000; - if( LINE_SELECT == nSelectType ) + if( LINE_SELECT == nSelectType ) nStockObject |= 0x00000007; else if( FILL_SELECT == nSelectType ) nStockObject |= 0x00000001; @@ -339,13 +339,13 @@ BOOL EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType ImplBeginRecord( WIN_EMR_SELECTOBJECT ); ( *mpStm ) << nStockObject; ImplEndRecord(); - + // destroy handle of created object ImplBeginRecord( WIN_EMR_DELETEOBJECT ); ( *mpStm ) << rHandle; ImplEndRecord(); - // mark handle as free + // mark handle as free ImplReleaseHandle( rHandle ); } @@ -401,11 +401,11 @@ void EMFWriter::ImplCheckTextAttr() { if( mbTextChanged && ImplPrepareHandleSelect( mnTextHandle, TEXT_SELECT ) ) { - const Font& rFont = maVDev.GetFont(); - String aFontName( rFont.GetName() ); - sal_Int32 nWeight; - sal_uInt16 i; - sal_uInt8 nPitchAndFamily; + const Font& rFont = maVDev.GetFont(); + String aFontName( rFont.GetName() ); + sal_Int32 nWeight; + sal_uInt16 i; + sal_uInt8 nPitchAndFamily; ImplBeginRecord( WIN_EMR_EXTCREATEFONTINDIRECTW ); (*mpStm) << mnTextHandle; @@ -413,7 +413,7 @@ void EMFWriter::ImplCheckTextAttr() ImplWriteExtent( rFont.GetSize().Width() ); (*mpStm) << (INT32) rFont.GetOrientation() << (INT32) rFont.GetOrientation(); - switch( rFont.GetWeight() ) + switch( rFont.GetWeight() ) { case WEIGHT_THIN: nWeight = 100; break; case WEIGHT_ULTRALIGHT: nWeight = 200; break; @@ -425,9 +425,9 @@ void EMFWriter::ImplCheckTextAttr() case WEIGHT_BOLD: nWeight = 700; break; case WEIGHT_ULTRABOLD: nWeight = 800; break; case WEIGHT_BLACK: nWeight = 900; break; - default: nWeight = 0; break; + default: nWeight = 0; break; } - + (*mpStm) << nWeight; (*mpStm) << (BYTE) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 ); (*mpStm) << (BYTE) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 ); @@ -435,14 +435,14 @@ void EMFWriter::ImplCheckTextAttr() (*mpStm) << (BYTE) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 ); (*mpStm) << (BYTE) 0 << (BYTE) 0 << (BYTE) 0; - switch( rFont.GetPitch() ) + switch( rFont.GetPitch() ) { case PITCH_FIXED: nPitchAndFamily = 0x01; break; case PITCH_VARIABLE: nPitchAndFamily = 0x02; break; default: nPitchAndFamily = 0x00; break; } - switch( rFont.GetFamily() ) + switch( rFont.GetFamily() ) { case FAMILY_DECORATIVE: nPitchAndFamily |= 0x50; break; case FAMILY_MODERN: nPitchAndFamily |= 0x30; break; @@ -528,8 +528,8 @@ void EMFWriter::ImplWriteRasterOp( RasterOp eRop ) switch( eRop ) { - case ROP_INVERT: nROP2 = 6; break; - case ROP_XOR: nROP2 = 7; break; + case ROP_INVERT: nROP2 = 6; break; + case ROP_XOR: nROP2 = 7; break; default: nROP2 = 13;break; } @@ -609,8 +609,8 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ) ImplWritePolygonRecord( rPolyPoly[ 0 ], TRUE ); else { - sal_Bool bHasFlags = sal_False; - sal_uInt32 nTotalPoints = 0; + sal_Bool bHasFlags = sal_False; + sal_uInt32 nTotalPoints = 0; for( i = 0; i < nPolyCount; i++ ) { @@ -674,12 +674,12 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed ) n++; continue; } - + sal_uInt16 nBezPoints = 0; - + while ( ( ( nBezPoints + n + 2 ) < rPoly.GetSize() ) && ( rPoly.GetFlags( nBezPoints + n ) == POLY_CONTROL ) ) nBezPoints += 3; - + if ( nBezPoints ) { ImplBeginRecord( WIN_EMR_POLYBEZIERTO ); @@ -699,12 +699,12 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed ) sal_uInt16 nPoints = 1; while( ( nPoints + n ) < rPoly.GetSize() && ( rPoly.GetFlags( nPoints + n ) != POLY_CONTROL ) ) nPoints++; - + if ( nPoints > 1 ) { ImplBeginRecord( WIN_EMR_POLYLINETO ); Polygon aNewPoly( nPoints + 1 ); - aNewPoly[ 0 ] = rPoly[ n - 1]; + aNewPoly[ 0 ] = rPoly[ n - 1]; for ( o = 1; o <= nPoints; o++ ) aNewPoly[ o ] = rPoly[ n - 1 + o ]; ImplWriteRect( aNewPoly.GetBoundRect() ); @@ -737,19 +737,19 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed ) // ----------------------------------------------------------------------------- -void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, +void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, UINT32 nROP ) { if( !!rBmp ) { - SvMemoryStream aMemStm( 65535, 65535 ); - const Size aBmpSizePixel( rBmp.GetSizePixel() ); + SvMemoryStream aMemStm( 65535, 65535 ); + const Size aBmpSizePixel( rBmp.GetSizePixel() ); ImplBeginRecord( WIN_EMR_STRETCHDIBITS ); ImplWriteRect( Rectangle( rPt, rSz ) ); ImplWritePoint( rPt ); (*mpStm) << (INT32) 0 << (INT32) 0 << (INT32) aBmpSizePixel.Width() << (INT32) aBmpSizePixel.Height(); - + // write offset positions and sizes later const ULONG nOffPos = mpStm->Tell(); mpStm->SeekRel( 16 ); @@ -759,8 +759,8 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, rBmp.Write( aMemStm, TRUE, FALSE ); - UINT32 nDIBSize = aMemStm.Tell(), nHeaderSize, nCompression, nColsUsed, nPalCount, nImageSize; - UINT16 nBitCount; + UINT32 nDIBSize = aMemStm.Tell(), nHeaderSize, nCompression, nColsUsed, nPalCount, nImageSize; + UINT16 nBitCount; // get DIB parameters aMemStm.Seek( 0 ); @@ -770,7 +770,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, aMemStm.SeekRel( 8 ); aMemStm >> nColsUsed; - nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (UINT32) nBitCount ) ) : + nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (UINT32) nBitCount ) ) : ( ( 3 == nCompression ) ? 12 : 0 ); mpStm->Write( aMemStm.GetData(), nDIBSize ); @@ -793,9 +793,9 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, cons if( nLen ) { - sal_uInt32 nNormWidth; - sal_Int32* pOwnArray; - sal_Int32* pDX; + sal_uInt32 nNormWidth; + sal_Int32* pOwnArray; + sal_Int32* pDX; // get text sizes if( pDXArray ) @@ -805,7 +805,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, cons pDX = (sal_Int32*) pDXArray; } else - { + { pOwnArray = new sal_Int32[ nLen ]; nNormWidth = maVDev.GetTextArray( rText, pOwnArray ); pDX = pOwnArray; @@ -905,12 +905,12 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) { for( ULONG j = 0, nActionCount = rMtf.GetActionCount(); j < nActionCount; j++ ) { - const MetaAction* pAction = rMtf.GetAction( j ); - const USHORT nType = pAction->GetType(); + const MetaAction* pAction = rMtf.GetAction( j ); + const USHORT nType = pAction->GetType(); switch( nType ) { - case( META_PIXEL_ACTION ): + case( META_PIXEL_ACTION ): { const MetaPixelAction* pA = (const MetaPixelAction*) pAction; @@ -922,7 +922,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) } break; - case( META_POINT_ACTION ): + case( META_POINT_ACTION ): { if( maVDev.IsLineColor() ) { @@ -946,7 +946,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) if(pA->GetLineInfo().IsDefault()) { ImplCheckLineAttr(); - + ImplBeginRecord( WIN_EMR_MOVETOEX ); ImplWritePoint( pA->GetStartPoint() ); ImplEndRecord(); @@ -988,7 +988,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) } break; - case( META_ROUNDRECT_ACTION ): + case( META_ROUNDRECT_ACTION ): { if( maVDev.IsLineColor() || maVDev.IsFillColor() ) { @@ -1023,7 +1023,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( META_ARC_ACTION ): case( META_PIE_ACTION ): - case( META_CHORD_ACTION ): + case( META_CHORD_ACTION ): case( META_POLYGON_ACTION ): { if( maVDev.IsLineColor() || maVDev.IsFillColor() ) @@ -1046,13 +1046,13 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) } break; - case( META_CHORD_ACTION ): + case( META_CHORD_ACTION ): { const MetaChordAction* pA = (const MetaChordAction*) pAction; aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD ); } break; - + case( META_POLYGON_ACTION ): aPoly = ( (const MetaPolygonAction*) pAction )->GetPolygon(); break; @@ -1067,8 +1067,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) { if( maVDev.IsLineColor() ) { - const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction; - const Polygon& rPoly = pA->GetPolygon(); + const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction; + const Polygon& rPoly = pA->GetPolygon(); if( rPoly.GetSize() ) { @@ -1095,8 +1095,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( META_GRADIENT_ACTION ): { - const MetaGradientAction* pA = (const MetaGradientAction*) pAction; - GDIMetaFile aTmpMtf; + const MetaGradientAction* pA = (const MetaGradientAction*) pAction; + GDIMetaFile aTmpMtf; maVDev.AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf ); ImplWrite( aTmpMtf ); @@ -1105,8 +1105,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case META_HATCH_ACTION: { - const MetaHatchAction* pA = (const MetaHatchAction*) pAction; - GDIMetaFile aTmpMtf; + const MetaHatchAction* pA = (const MetaHatchAction*) pAction; + GDIMetaFile aTmpMtf; maVDev.AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf ); ImplWrite( aTmpMtf ); @@ -1124,15 +1124,15 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case META_FLOATTRANSPARENT_ACTION: { const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pAction; - - GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); - Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); - const Size aSrcSize( aTmpMtf.GetPrefSize() ); - const Point aDestPt( pA->GetPoint() ); - const Size aDestSize( pA->GetSize() ); - const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; - const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; - long nMoveX, nMoveY; + + GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); + Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); + const Size aSrcSize( aTmpMtf.GetPrefSize() ); + const Point aDestPt( pA->GetPoint() ); + const Size aDestSize( pA->GetSize() ); + const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; + const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; + long nMoveX, nMoveY; if( fScaleX != 1.0 || fScaleY != 1.0 ) { @@ -1154,8 +1154,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( META_EPS_ACTION ): { - const MetaEPSAction* pA = (const MetaEPSAction*) pAction; - const GDIMetaFile aSubstitute( pA->GetSubstitute() ); + const MetaEPSAction* pA = (const MetaEPSAction*) pAction; + const GDIMetaFile aSubstitute( pA->GetSubstitute() ); for( ULONG i = 0, nCount = aSubstitute.GetActionCount(); i < nCount; i++ ) { @@ -1166,7 +1166,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) ImplBeginRecord( WIN_EMR_SAVEDC ); ImplEndRecord(); - MapMode aMapMode( aSubstitute.GetPrefMapMode() ); + MapMode aMapMode( aSubstitute.GetPrefMapMode() ); Size aOutSize( maVDev.LogicToLogic( pA->GetSize(), maVDev.GetMapMode(), aMapMode ) ); aMapMode.SetScaleX( Fraction( aOutSize.Width(), aSubstitute.GetPrefSize().Width() ) ); aMapMode.SetScaleY( Fraction( aOutSize.Height(), aSubstitute.GetPrefSize().Height() ) ); @@ -1200,8 +1200,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case META_BMPSCALEPART_ACTION: { - const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pAction; - Bitmap aTmp( pA->GetBitmap() ); + const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pAction; + Bitmap aTmp( pA->GetBitmap() ); if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) ) ImplWriteBmpRecord( aTmp, pA->GetDestPoint(), pA->GetDestSize(), WIN_SRCCOPY ); @@ -1210,9 +1210,9 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case META_BMPEX_ACTION: { - const MetaBmpExAction* pA = (const MetaBmpExAction *) pAction; - Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); - Bitmap aMsk( pA->GetBitmapEx().GetMask() ); + const MetaBmpExAction* pA = (const MetaBmpExAction *) pAction; + Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); + Bitmap aMsk( pA->GetBitmapEx().GetMask() ); if( !!aMsk ) { @@ -1228,9 +1228,9 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case META_BMPEXSCALE_ACTION: { - const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction; - Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); - Bitmap aMsk( pA->GetBitmapEx().GetMask() ); + const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction; + Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); + Bitmap aMsk( pA->GetBitmapEx().GetMask() ); if( !!aMsk ) { @@ -1246,11 +1246,11 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case META_BMPEXSCALEPART_ACTION: { - const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pAction; - BitmapEx aBmpEx( pA->GetBitmapEx() ); + const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pAction; + BitmapEx aBmpEx( pA->GetBitmapEx() ); aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); - Bitmap aBmp( aBmpEx.GetBitmap() ); - Bitmap aMsk( aBmpEx.GetMask() ); + Bitmap aBmp( aBmpEx.GetBitmap() ); + Bitmap aMsk( aBmpEx.GetMask() ); if( !!aMsk ) { @@ -1266,8 +1266,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case META_TEXT_ACTION: { - const MetaTextAction* pA = (const MetaTextAction*) pAction; - const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + const MetaTextAction* pA = (const MetaTextAction*) pAction; + const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); ImplCheckTextAttr(); ImplWriteTextRecord( pA->GetPoint(), aText, NULL, 0 ); @@ -1276,8 +1276,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case META_TEXTRECT_ACTION: { - const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction; - const String aText( pA->GetText() ); + const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction; + const String aText( pA->GetText() ); ImplCheckTextAttr(); ImplWriteTextRecord( pA->GetRect().TopLeft(), aText, NULL, 0 ); @@ -1286,8 +1286,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case META_TEXTARRAY_ACTION: { - const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction; - const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction; + const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); ImplCheckTextAttr(); ImplWriteTextRecord( pA->GetPoint(), aText, pA->GetDXArray(), 0 ); @@ -1296,32 +1296,32 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case META_STRETCHTEXT_ACTION: { - const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction; - const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction; + const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() ); ImplCheckTextAttr(); ImplWriteTextRecord( pA->GetPoint(), aText, NULL, pA->GetWidth() ); } break; - - case( META_LINECOLOR_ACTION ): + + case( META_LINECOLOR_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); mbLineChanged = TRUE; } break; - - case( META_FILLCOLOR_ACTION ): + + case( META_FILLCOLOR_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); mbFillChanged = TRUE; } break; - case( META_TEXTCOLOR_ACTION ): + case( META_TEXTCOLOR_ACTION ): case( META_TEXTLINECOLOR_ACTION ): - case( META_TEXTFILLCOLOR_ACTION ): - case( META_TEXTALIGN_ACTION ): + case( META_TEXTFILLCOLOR_ACTION ): + case( META_TEXTALIGN_ACTION ): case( META_FONT_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); @@ -1332,7 +1332,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( META_ISECTRECTCLIPREGION_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); - + ImplBeginRecord( WIN_EMR_INTERSECTCLIPRECT ); ImplWriteRect( ( (MetaISectRectClipRegionAction*) pAction )->GetRect() ); ImplEndRecord(); @@ -1340,7 +1340,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) break; case( META_CLIPREGION_ACTION ): - case( META_ISECTREGIONCLIPREGION_ACTION ): + case( META_ISECTREGIONCLIPREGION_ACTION ): case( META_MOVECLIPREGION_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); @@ -1355,7 +1355,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( META_PUSH_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); - + ImplBeginRecord( WIN_EMR_SAVEDC ); ImplEndRecord(); } @@ -1364,11 +1364,11 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( META_POP_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); - + ImplBeginRecord( WIN_EMR_RESTOREDC ); (*mpStm) << (INT32) -1; ImplEndRecord(); - + ImplWriteRasterOp( maVDev.GetRasterOp() ); mbLineChanged = mbFillChanged = mbTextChanged = TRUE; } @@ -1397,9 +1397,9 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) } case( META_MASK_ACTION ): - case( META_MASKSCALE_ACTION ): - case( META_MASKSCALEPART_ACTION ): - case( META_WALLPAPER_ACTION ): + case( META_MASKSCALE_ACTION ): + case( META_MASKSCALEPART_ACTION ): + case( META_WALLPAPER_ACTION ): case( META_TEXTLINE_ACTION ): case( META_COMMENT_ACTION ): case( META_GRADIENTEX_ACTION ): diff --git a/svtools/source/filter.vcl/wmf/emfwr.hxx b/svtools/source/filter.vcl/wmf/emfwr.hxx index d95176aef406..1fc77da16d39 100644 --- a/svtools/source/filter.vcl/wmf/emfwr.hxx +++ b/svtools/source/filter.vcl/wmf/emfwr.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,55 +47,55 @@ class EMFWriter { private: - VirtualDevice maVDev; - MapMode maDestMapMode; - FilterConfigItem* mpFilterConfigItem; - SvStream* mpStm; - BOOL* mpHandlesUsed; - ULONG mnHandleCount; - ULONG mnLastPercent; - ULONG mnRecordCount; - ULONG mnRecordPos; - BOOL mbRecordOpen; - BOOL mbLineChanged; - sal_uInt32 mnLineHandle; - BOOL mbFillChanged; - sal_uInt32 mnFillHandle; - BOOL mbTextChanged; - sal_uInt32 mnTextHandle; - sal_uInt32 mnHorTextAlign; - - void ImplBeginRecord( sal_uInt32 nType ); - void ImplEndRecord(); - - ULONG ImplAcquireHandle(); - void ImplReleaseHandle( ULONG nHandle ); - - BOOL ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType ); - void ImplCheckLineAttr(); - void ImplCheckFillAttr(); - void ImplCheckTextAttr(); - - void ImplWriteColor( const Color& rColor ); - void ImplWriteRasterOp( RasterOp eRop ); - void ImplWriteExtent( long nExtent ); - void ImplWritePoint( const Point& rPoint ); - void ImplWriteSize( const Size& rSize); - void ImplWriteRect( const Rectangle& rRect ); - void ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClose ); - void ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose ); - void ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ); - void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, UINT32 nROP ); - void ImplWriteTextRecord( const Point& rPos, const String rText, const sal_Int32* pDXArray, sal_uInt32 nWidth ); + VirtualDevice maVDev; + MapMode maDestMapMode; + FilterConfigItem* mpFilterConfigItem; + SvStream* mpStm; + BOOL* mpHandlesUsed; + ULONG mnHandleCount; + ULONG mnLastPercent; + ULONG mnRecordCount; + ULONG mnRecordPos; + BOOL mbRecordOpen; + BOOL mbLineChanged; + sal_uInt32 mnLineHandle; + BOOL mbFillChanged; + sal_uInt32 mnFillHandle; + BOOL mbTextChanged; + sal_uInt32 mnTextHandle; + sal_uInt32 mnHorTextAlign; + + void ImplBeginRecord( sal_uInt32 nType ); + void ImplEndRecord(); + + ULONG ImplAcquireHandle(); + void ImplReleaseHandle( ULONG nHandle ); + + BOOL ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType ); + void ImplCheckLineAttr(); + void ImplCheckFillAttr(); + void ImplCheckTextAttr(); + + void ImplWriteColor( const Color& rColor ); + void ImplWriteRasterOp( RasterOp eRop ); + void ImplWriteExtent( long nExtent ); + void ImplWritePoint( const Point& rPoint ); + void ImplWriteSize( const Size& rSize); + void ImplWriteRect( const Rectangle& rRect ); + void ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClose ); + void ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose ); + void ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ); + void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, UINT32 nROP ); + void ImplWriteTextRecord( const Point& rPos, const String rText, const sal_Int32* pDXArray, sal_uInt32 nWidth ); void Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); - void ImplWrite( const GDIMetaFile& rMtf ); + void ImplWrite( const GDIMetaFile& rMtf ); public: EMFWriter() {} - BOOL WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pConfigItem = NULL ); + BOOL WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pConfigItem = NULL ); }; #endif // _EMFWR_HXX diff --git a/svtools/source/filter.vcl/wmf/enhwmf.cxx b/svtools/source/filter.vcl/wmf/enhwmf.cxx index 65fdb1b1c6df..cc50b1bee454 100644 --- a/svtools/source/filter.vcl/wmf/enhwmf.cxx +++ b/svtools/source/filter.vcl/wmf/enhwmf.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -138,8 +138,8 @@ #define EMR_SETCOLORSPACE 100 #define EMR_DELETECOLORSPACE 101 #define EMR_GLSRECORD 102 -#define EMR_GLSBOUNDEDRECORD 103 -#define EMR_PIXELFORMAT 104 +#define EMR_GLSBOUNDEDRECORD 103 +#define EMR_PIXELFORMAT 104 // WINDOWS VERSION >= 0x500 #define EMR_DRAWESCAPE 105 @@ -168,9 +168,9 @@ // currently unused static float GetSwapFloat( SvStream& rSt ) { - float fTmp; + float fTmp; sal_Int8* pPtr = (sal_Int8*)&fTmp; - rSt >> pPtr[3] >> pPtr[2] >> pPtr[1] >> pPtr[0]; // Little Endian <-> Big Endian switch + rSt >> pPtr[3] >> pPtr[2] >> pPtr[1] >> pPtr[0]; // Little Endian <-> Big Endian switch return fTmp; } #endif @@ -186,7 +186,7 @@ SvStream& operator>>( SvStream& rIn, XForm& rXForm ) { #ifdef OSL_BIGENDIAN rXForm.eM11 = GetSwapFloat( rIn ); - rXForm.eM12 = GetSwapFloat( rIn ); + rXForm.eM12 = GetSwapFloat( rIn ); rXForm.eM21 = GetSwapFloat( rIn ); rXForm.eM22 = GetSwapFloat( rIn ); rXForm.eDx = GetSwapFloat( rIn ); @@ -341,7 +341,7 @@ BOOL EnhWMFReader::ReadEnhWMF() sal_Int32 nX32, nY32, nx32, ny32; sal_Int16 nX16, nY16; - sal_Bool bFlag, bStatus = ReadHeader(); + sal_Bool bFlag, bStatus = ReadHeader(); sal_Bool bHaveDC = false; #ifdef UNX @@ -355,7 +355,7 @@ BOOL EnhWMFReader::ReadEnhWMF() { *pWMF >> nRecType >> nRecSize; - if ( ( nRecSize < 8 ) || ( nRecSize & 3 ) ) // Parameter sind immer durch 4 teilbar + if ( ( nRecSize < 8 ) || ( nRecSize & 3 ) ) // Parameter sind immer durch 4 teilbar { bStatus = FALSE; break; @@ -464,9 +464,9 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_POLYPOLYLINE : { - UINT16* pnPoints; + UINT16* pnPoints; - INT32 i, nPoly; + INT32 i, nPoly; pWMF->SeekRel( 0x10 ); // Anzahl der Polygone: @@ -505,10 +505,10 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_POLYPOLYGON : { - UINT16* pnPoints; - Point* pPtAry; + UINT16* pnPoints; + Point* pPtAry; - UINT32 i, nPoly, nGesPoints; + UINT32 i, nPoly, nGesPoints; pWMF->SeekRel( 0x10 ); // Anzahl der Polygone: @@ -519,7 +519,7 @@ BOOL EnhWMFReader::ReadEnhWMF() if ( ( nPoly * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) ) { pnPoints = new UINT16[ nPoly ]; - + for ( i = 0; i < nPoly; i++ ) { *pWMF >> nPoints; @@ -530,7 +530,7 @@ BOOL EnhWMFReader::ReadEnhWMF() { // Polygonpunkte holen: pPtAry = new Point[ nGesPoints ]; - + for ( i = 0; i < nGesPoints; i++ ) { *pWMF >> nX32 >> nY32; @@ -548,7 +548,7 @@ BOOL EnhWMFReader::ReadEnhWMF() break; case EMR_SETWINDOWEXTEX : - { // #75383# + { // #75383# *pWMF >> nW >> nH; pOut->SetWinExt( Size( nW, nH ) ); } @@ -590,7 +590,7 @@ BOOL EnhWMFReader::ReadEnhWMF() break; case EMR_EOF : - nRecordCount = 0; // #76846# + nRecordCount = 0; // #76846# break; case EMR_SETPIXELV : @@ -693,8 +693,8 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_MODIFYWORLDTRANSFORM : { - UINT32 nMode; - XForm aTempXForm; + UINT32 nMode; + XForm aTempXForm; *pWMF >> aTempXForm >> nMode; pOut->ModifyWorldTransform( aTempXForm, nMode ); } @@ -713,9 +713,9 @@ BOOL EnhWMFReader::ReadEnhWMF() if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) { - LineInfo aLineInfo; - UINT32 nStyle; - Size aSize; + LineInfo aLineInfo; + UINT32 nStyle; + Size aSize; *pWMF >> nStyle >> aSize.Width() >> aSize.Height(); @@ -762,7 +762,7 @@ BOOL EnhWMFReader::ReadEnhWMF() sal_Int32 elpHatch; sal_uInt32 offBmi, cbBmi, offBits, cbBits, nStyle, nWidth, nBrushStyle, elpNumEntries; Color aColorRef; - + *pWMF >> nIndex; if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) { @@ -770,7 +770,7 @@ BOOL EnhWMFReader::ReadEnhWMF() aColorRef = ReadColor(); *pWMF >> elpHatch >> elpNumEntries; - LineInfo aLineInfo; + LineInfo aLineInfo; if ( nWidth ) aLineInfo.SetWidth( nWidth ); @@ -813,7 +813,7 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_CREATEBRUSHINDIRECT : { - UINT32 nStyle; + UINT32 nStyle; *pWMF >> nIndex; if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) { @@ -949,14 +949,14 @@ BOOL EnhWMFReader::ReadEnhWMF() } break; - case EMR_BITBLT : // PASSTHROUGH INTENDED + case EMR_BITBLT : // PASSTHROUGH INTENDED case EMR_STRETCHBLT : { - INT32 xDest, yDest, cxDest, cyDest, xSrc, ySrc, cxSrc, cySrc; - UINT32 dwRop, iUsageSrc, offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc; - XForm xformSrc; + INT32 xDest, yDest, cxDest, cyDest, xSrc, ySrc, cxSrc, cySrc; + UINT32 dwRop, iUsageSrc, offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc; + XForm xformSrc; - UINT32 nStart = pWMF->Tell() - 8; + UINT32 nStart = pWMF->Tell() - 8; pWMF->SeekRel( 0x10 ); *pWMF >> xDest >> yDest >> cxDest >> cyDest >> dwRop >> xSrc >> ySrc @@ -968,11 +968,11 @@ BOOL EnhWMFReader::ReadEnhWMF() else cxSrc = cySrc = 0; - Bitmap aBitmap; - Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) ); + Bitmap aBitmap; + Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) ); - cxDest = abs( (int)cxDest ); // sj: i37894, size can be negative - cyDest = abs( (int)cyDest ); // and also 122889 + cxDest = abs( (int)cxDest ); // sj: i37894, size can be negative + cyDest = abs( (int)cyDest ); // and also 122889 if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) bStatus = FALSE; @@ -998,7 +998,7 @@ BOOL EnhWMFReader::ReadEnhWMF() aBitmap.Read( aTmp, TRUE ); // test if it is sensible to crop - if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && + if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && ( xSrc >= 0 ) && ( ySrc >= 0 ) && ( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) && ( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) ) @@ -1017,19 +1017,19 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_STRETCHDIBITS : { - INT32 xDest, yDest, xSrc, ySrc, cxSrc, cySrc, cxDest, cyDest; - UINT32 offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc, iUsageSrc, dwRop; - UINT32 nStart = pWMF->Tell() - 8; + INT32 xDest, yDest, xSrc, ySrc, cxSrc, cySrc, cxDest, cyDest; + UINT32 offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc, iUsageSrc, dwRop; + UINT32 nStart = pWMF->Tell() - 8; pWMF->SeekRel( 0x10 ); *pWMF >> xDest >> yDest >> xSrc >> ySrc >> cxSrc >> cySrc >> offBmiSrc >> cbBmiSrc >> offBitsSrc >> cbBitsSrc >> iUsageSrc >> dwRop >> cxDest >> cyDest; - Bitmap aBitmap; - Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) ); + Bitmap aBitmap; + Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) ); - cxDest = abs( (int)cxDest ); // sj: i37894, size can be negative - cyDest = abs( (int)cyDest ); // and also 122889 + cxDest = abs( (int)cxDest ); // sj: i37894, size can be negative + cyDest = abs( (int)cyDest ); // and also 122889 if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) bStatus = FALSE; @@ -1055,7 +1055,7 @@ BOOL EnhWMFReader::ReadEnhWMF() aBitmap.Read( aTmp, TRUE ); // test if it is sensible to crop - if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && + if ( ( cxSrc > 0 ) && ( cySrc > 0 ) && ( xSrc >= 0 ) && ( ySrc >= 0 ) && ( xSrc + cxSrc <= aBitmap.GetSizePixel().Width() ) && ( ySrc + cySrc <= aBitmap.GetSizePixel().Height() ) ) @@ -1077,7 +1077,7 @@ BOOL EnhWMFReader::ReadEnhWMF() { LOGFONTW aLogFont; *pWMF >> aLogFont.lfHeight >> aLogFont.lfWidth >> aLogFont.lfEscapement >> aLogFont.lfOrientation >> aLogFont.lfWeight >> aLogFont.lfItalic - >> aLogFont.lfUnderline >> aLogFont.lfStrikeOut >> aLogFont.lfCharSet >> aLogFont.lfOutPrecision >> aLogFont.lfClipPrecision + >> aLogFont.lfUnderline >> aLogFont.lfStrikeOut >> aLogFont.lfCharSet >> aLogFont.lfOutPrecision >> aLogFont.lfClipPrecision >> aLogFont.lfQuality >> aLogFont.lfPitchAndFamily; sal_Unicode lfFaceName[ LF_FACESIZE ]; @@ -1098,9 +1098,9 @@ BOOL EnhWMFReader::ReadEnhWMF() bFlag = sal_True; case EMR_EXTTEXTOUTW : { - sal_Int32 nLeft, nTop, nRight, nBottom, ptlReferenceX, ptlReferenceY, nGfxMode, nXScale, nYScale; - sal_uInt32 nCurPos, nLen, nOffString, nOptions, offDx; - sal_Int32* pDX = NULL; + sal_Int32 nLeft, nTop, nRight, nBottom, ptlReferenceX, ptlReferenceY, nGfxMode, nXScale, nYScale; + sal_uInt32 nCurPos, nLen, nOffString, nOptions, offDx; + sal_Int32* pDX = NULL; nCurPos = pWMF->Tell() - 8; @@ -1200,7 +1200,7 @@ BOOL EnhWMFReader::ReadEnhWMF() *pWMF >> nX16 >> nY16; aPoly[ i ] = Point( nX16, nY16 ); } - pOut->DrawPolyBezier( aPoly, bFlag, bRecordPath ); // Line( aPoly, bFlag ); + pOut->DrawPolyBezier( aPoly, bFlag, bRecordPath ); // Line( aPoly, bFlag ); } break; @@ -1243,9 +1243,9 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_POLYPOLYLINE16 : { - UINT16* pnPoints; + UINT16* pnPoints; - INT32 i, nPoly, nGesPoints; + INT32 i, nPoly, nGesPoints; pWMF->SeekRel( 0x10 ); // Anzahl der Polygone: *pWMF >> nPoly >> nGesPoints; @@ -1280,10 +1280,10 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_POLYPOLYGON16 : { - UINT16* pnPoints; - Point* pPtAry; + UINT16* pnPoints; + Point* pPtAry; - UINT32 i, nPoly, nGesPoints; + UINT32 i, nPoly, nGesPoints; pWMF->SeekRel( 0x10 ); // Anzahl der Polygone: *pWMF >> nPoly >> nGesPoints; @@ -1306,7 +1306,7 @@ BOOL EnhWMFReader::ReadEnhWMF() *pWMF >> nX16 >> nY16; pPtAry[ i ] = Point( nX16, nY16 ); } - + // PolyPolygon Actions erzeugen PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry ); pOut->DrawPolyPolygon( aPolyPoly, bRecordPath ); @@ -1337,7 +1337,7 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_CREATEDIBPATTERNBRUSHPT : { - UINT32 nStart = pWMF->Tell() - 8; + UINT32 nStart = pWMF->Tell() - 8; Bitmap aBitmap; *pWMF >> nIndex; @@ -1356,10 +1356,10 @@ BOOL EnhWMFReader::ReadEnhWMF() bStatus = FALSE; else if ( offBmi ) { - UINT32 nSize = cbBmi + cbBits + 14; + UINT32 nSize = cbBmi + cbBits + 14; if ( nSize <= ( nEndPos - nStartPos ) ) { - char* pBuf = new char[ nSize ]; + char* pBuf = new char[ nSize ]; SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE ); aTmp.ObjectOwnsMemory( TRUE ); @@ -1391,24 +1391,24 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_FRAMERGN : WinMtfAssertHandler( "FrameRgn" ); break; case EMR_INVERTRGN : WinMtfAssertHandler( "InvertRgn" ); break; case EMR_PAINTRGN : WinMtfAssertHandler( "PaintRgn" ); break; - case EMR_FLATTENPATH : WinMtfAssertHandler( "FlattenPath" ); break; + case EMR_FLATTENPATH : WinMtfAssertHandler( "FlattenPath" ); break; case EMR_WIDENPATH : WinMtfAssertHandler( "WidenPath" ); break; - case EMR_POLYDRAW : WinMtfAssertHandler( "Polydraw" ); break; - case EMR_SETARCDIRECTION : WinMtfAssertHandler( "SetArcDirection" ); break; + case EMR_POLYDRAW : WinMtfAssertHandler( "Polydraw" ); break; + case EMR_SETARCDIRECTION : WinMtfAssertHandler( "SetArcDirection" ); break; case EMR_SETPALETTEENTRIES : WinMtfAssertHandler( "SetPaletteEntries" ); break; - case EMR_RESIZEPALETTE : WinMtfAssertHandler( "ResizePalette" ); break; - case EMR_EXTFLOODFILL : WinMtfAssertHandler( "ExtFloodFill" ); break; - case EMR_ANGLEARC : WinMtfAssertHandler( "AngleArc" ); break; - case EMR_SETCOLORADJUSTMENT : WinMtfAssertHandler( "SetColorAdjustment" ); break; - case EMR_POLYDRAW16 : WinMtfAssertHandler( "PolyDraw16" ); break; - case EMR_POLYTEXTOUTA : WinMtfAssertHandler( "PolyTextOutA" ); break; - case EMR_POLYTEXTOUTW : WinMtfAssertHandler( "PolyTextOutW" ); break; - case EMR_CREATECOLORSPACE : WinMtfAssertHandler( "CreateColorSpace" ); break; - case EMR_SETCOLORSPACE : WinMtfAssertHandler( "SetColorSpace" ); break; - case EMR_DELETECOLORSPACE : WinMtfAssertHandler( "DeleteColorSpace" ); break; - case EMR_GLSRECORD : WinMtfAssertHandler( "GlsRecord" ); break; - case EMR_GLSBOUNDEDRECORD : WinMtfAssertHandler( "GlsBoundRecord" ); break; - case EMR_PIXELFORMAT : WinMtfAssertHandler( "PixelFormat" ); break; + case EMR_RESIZEPALETTE : WinMtfAssertHandler( "ResizePalette" ); break; + case EMR_EXTFLOODFILL : WinMtfAssertHandler( "ExtFloodFill" ); break; + case EMR_ANGLEARC : WinMtfAssertHandler( "AngleArc" ); break; + case EMR_SETCOLORADJUSTMENT : WinMtfAssertHandler( "SetColorAdjustment" ); break; + case EMR_POLYDRAW16 : WinMtfAssertHandler( "PolyDraw16" ); break; + case EMR_POLYTEXTOUTA : WinMtfAssertHandler( "PolyTextOutA" ); break; + case EMR_POLYTEXTOUTW : WinMtfAssertHandler( "PolyTextOutW" ); break; + case EMR_CREATECOLORSPACE : WinMtfAssertHandler( "CreateColorSpace" ); break; + case EMR_SETCOLORSPACE : WinMtfAssertHandler( "SetColorSpace" ); break; + case EMR_DELETECOLORSPACE : WinMtfAssertHandler( "DeleteColorSpace" ); break; + case EMR_GLSRECORD : WinMtfAssertHandler( "GlsRecord" ); break; + case EMR_GLSBOUNDEDRECORD : WinMtfAssertHandler( "GlsBoundRecord" ); break; + case EMR_PIXELFORMAT : WinMtfAssertHandler( "PixelFormat" ); break; case EMR_DRAWESCAPE : WinMtfAssertHandler( "DrawEscape" ); break; case EMR_EXTESCAPE : WinMtfAssertHandler( "ExtEscape" ); break; case EMR_STARTDOC : WinMtfAssertHandler( "StartDoc" ); break; @@ -1424,21 +1424,21 @@ BOOL EnhWMFReader::ReadEnhWMF() case EMR_GRADIENTFILL : WinMtfAssertHandler( "GradientFill" ); break; case EMR_SETLINKEDUFIS : WinMtfAssertHandler( "SetLinkedUFIS" ); break; - case EMR_SETMAPPERFLAGS : WinMtfAssertHandler( "SetMapperFlags", 0 ); break; - case EMR_SETICMMODE : WinMtfAssertHandler( "SetICMMode", 0 ); break; + case EMR_SETMAPPERFLAGS : WinMtfAssertHandler( "SetMapperFlags", 0 ); break; + case EMR_SETICMMODE : WinMtfAssertHandler( "SetICMMode", 0 ); break; case EMR_CREATEMONOBRUSH : WinMtfAssertHandler( "CreateMonoBrush", 0 ); break; - case EMR_SETBRUSHORGEX : WinMtfAssertHandler( "SetBrushOrgEx", 0 ); break; - case EMR_SETMETARGN : WinMtfAssertHandler( "SetMetArgn", 0 ); break; - case EMR_SETMITERLIMIT : WinMtfAssertHandler( "SetMiterLimit", 0 ); break; + case EMR_SETBRUSHORGEX : WinMtfAssertHandler( "SetBrushOrgEx", 0 ); break; + case EMR_SETMETARGN : WinMtfAssertHandler( "SetMetArgn", 0 ); break; + case EMR_SETMITERLIMIT : WinMtfAssertHandler( "SetMiterLimit", 0 ); break; case EMR_EXCLUDECLIPRECT : WinMtfAssertHandler( "ExcludeClipRect", 0 ); break; - case EMR_REALIZEPALETTE : WinMtfAssertHandler( "RealizePalette", 0 ); break; - case EMR_SELECTPALETTE : WinMtfAssertHandler( "SelectPalette", 0 ); break; - case EMR_CREATEPALETTE : WinMtfAssertHandler( "CreatePalette", 0 ); break; + case EMR_REALIZEPALETTE : WinMtfAssertHandler( "RealizePalette", 0 ); break; + case EMR_SELECTPALETTE : WinMtfAssertHandler( "SelectPalette", 0 ); break; + case EMR_CREATEPALETTE : WinMtfAssertHandler( "CreatePalette", 0 ); break; case EMR_ALPHADIBBLEND : WinMtfAssertHandler( "AlphaDibBlend", 0 ); break; case EMR_SETTEXTJUSTIFICATION : WinMtfAssertHandler( "SetTextJustification", 0 ); break; case EMR_GDICOMMENT : - case EMR_HEADER : // has already been read at ReadHeader() + case EMR_HEADER : // has already been read at ReadHeader() break; #endif } @@ -1457,17 +1457,17 @@ BOOL EnhWMFReader::ReadEnhWMF() BOOL EnhWMFReader::ReadHeader() { - UINT32 nUINT32, nHeaderSize, nPalEntries; - INT32 nLeft, nTop, nRight, nBottom; + UINT32 nUINT32, nHeaderSize, nPalEntries; + INT32 nLeft, nTop, nRight, nBottom; // METAFILEHEADER SPARE ICH MIR HIER // Einlesen des METAHEADER *pWMF >> nUINT32 >> nHeaderSize; - if ( nUINT32 != 1 ) // Typ + if ( nUINT32 != 1 ) // Typ return FALSE; // bound size - Rectangle rclBounds; // rectangle in logical units 1/100th mm + Rectangle rclBounds; // rectangle in logical units 1/100th mm *pWMF >> nLeft >> nTop >> nRight >> nBottom; rclBounds.Left() = nLeft; rclBounds.Top() = nTop; @@ -1475,23 +1475,23 @@ BOOL EnhWMFReader::ReadHeader() rclBounds.Bottom() = nBottom; // picture frame size - Rectangle rclFrame; // rectangle in device units + Rectangle rclFrame; // rectangle in device units *pWMF >> nLeft >> nTop >> nRight >> nBottom; rclFrame.Left() = nLeft; rclFrame.Top() = nTop; rclFrame.Right() = nRight; rclFrame.Bottom() = nBottom; - *pWMF >> nUINT32; // signature + *pWMF >> nUINT32; // signature if ( nUINT32 != 0x464d4520 ) return FALSE; - *pWMF >> nUINT32; // nVersion - *pWMF >> nEndPos; // size of metafile + *pWMF >> nUINT32; // nVersion + *pWMF >> nEndPos; // size of metafile nEndPos += nStartPos; - sal_uInt32 nStrmPos = pWMF->Tell(); // checking if nEndPos is valid + sal_uInt32 nStrmPos = pWMF->Tell(); // checking if nEndPos is valid pWMF->Seek( STREAM_SEEK_TO_END ); if ( pWMF->Tell() < nEndPos ) nEndPos = pWMF->Tell(); diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx index 4ff2c19c7141..007a56e452fb 100644 --- a/svtools/source/filter.vcl/wmf/winmtf.cxx +++ b/svtools/source/filter.vcl/wmf/winmtf.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -256,7 +256,7 @@ WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont ) } else if ( aFontSize.Height() < 0 ) aFontSize.Height() *= -1; - + if ( !rFont.lfWidth ) { VirtualDevice aVDev; @@ -284,7 +284,7 @@ void WinMtfAssertHandler( const sal_Char* pAction, sal_uInt32 nFlags ) if ( nFlags & WIN_MTF_ASSERT_MIFE ) { if ( ( nAssertCount == 0 ) || ( bOnlyOnce == sal_False ) ) - { + { ByteString aText( "WMF/EMF Import: " ); if ( pAction ) { @@ -302,17 +302,17 @@ void WinMtfAssertHandler( const sal_Char* pAction, sal_uInt32 nFlags ) // ------------------------------------------------------------------------ WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigItem* pConfigItem ) : - pOut ( pWinMtfOutput ), - pWMF ( &rStreamWMF ), - pFilterConfigItem ( pConfigItem ) + pOut ( pWinMtfOutput ), + pWMF ( &rStreamWMF ), + pFilterConfigItem ( pConfigItem ) { #ifdef WIN_MTF_ASSERT - // we want to assert not implemented features, but we do this + // we want to assert not implemented features, but we do this // only once, so that nobody is handicaped by getting too much assertions // I hope this will bring more testdocuments, without support of these // testdocuments the implementation of missing features won't be possible. (SJ) WinMtfAssertHandler( NULL, WIN_MTF_ASSERT_INIT | WIN_MTF_ASSERT_ONCE ); -#endif +#endif SvLockBytes *pLB = pWMF->GetLockBytes(); if ( pLB ) @@ -424,7 +424,7 @@ Point WinMtfOutput::ImplMap( const Point& rPt ) fX2 *= mnDevWidth; fY2 *= mnDevHeight; fX2 += mnDevOrgX; - fY2 += mnDevOrgY; // fX2, fY2 now in device units + fY2 += mnDevOrgY; // fX2, fY2 now in device units fX2 *= (double)mnMillX * 100.0 / (double)mnPixX; fY2 *= (double)mnMillY * 100.0 / (double)mnPixY; } @@ -549,7 +549,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex ) pGDIObj = new GDIObj(); else { - nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen + nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen if ( (UINT32)nIndex < vGDIObj.size() ) pGDIObj = vGDIObj[ nIndex ]; @@ -711,7 +711,7 @@ void WinMtfOutput::ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly ) mpGDIMetaFile->AddAction( new MetaRectAction( rPolyPoly.GetBoundRect() ) ); else { - Polygon aPoly( rPolyPoly[ 0 ] ); + Polygon aPoly( rPolyPoly[ 0 ] ); sal_uInt16 nCount = aPoly.GetSize(); if ( nCount ) { @@ -740,7 +740,7 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle ) { ImplMap( ((WinMtfFontStyle*)pStyle)->aFont ); if (!((WinMtfFontStyle*)pStyle)->aFont.GetHeight() ) - ((WinMtfFontStyle*)pStyle)->aFont.SetHeight( 423 ); // defaulting to 12pt + ((WinMtfFontStyle*)pStyle)->aFont.SetHeight( 423 ); // defaulting to 12pt } else if ( eType == GDI_PEN ) { @@ -774,7 +774,7 @@ void WinMtfOutput::CreateObject( INT32 nIndex, GDIObjectType eType, void* pStyle { if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 ) { - nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen + nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen if ( pStyle ) { if ( eType == GDI_FONT ) @@ -878,44 +878,44 @@ void WinMtfOutput::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClip WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) : mnLatestTextAlign ( 0 ), - mnTextAlign ( TA_LEFT | TA_TOP | TA_NOUPDATECP ), + mnTextAlign ( TA_LEFT | TA_TOP | TA_NOUPDATECP ), maLatestBkColor ( 0x12345678 ), - maBkColor ( COL_WHITE ), + maBkColor ( COL_WHITE ), mnLatestTextLayoutMode( TEXT_LAYOUT_DEFAULT ), - mnTextLayoutMode ( TEXT_LAYOUT_DEFAULT ), + mnTextLayoutMode ( TEXT_LAYOUT_DEFAULT ), mnLatestBkMode ( 0 ), - mnBkMode ( OPAQUE ), + mnBkMode ( OPAQUE ), meLatestRasterOp ( ROP_INVERT ), - meRasterOp ( ROP_OVERPAINT ), - maActPos ( Point() ), - mbNopMode ( sal_False ), - mbFillStyleSelected ( sal_False ), + meRasterOp ( ROP_OVERPAINT ), + maActPos ( Point() ), + mbNopMode ( sal_False ), + mbFillStyleSelected ( sal_False ), mbClipNeedsUpdate ( true ), mbComplexClip ( false ), - mnGfxMode ( GM_COMPATIBLE ), + mnGfxMode ( GM_COMPATIBLE ), mnMapMode ( MM_TEXT ), - mnDevOrgX ( 0 ), - mnDevOrgY ( 0 ), - mnDevWidth ( 1 ), - mnDevHeight ( 1 ), - mnWinOrgX ( 0 ), - mnWinOrgY ( 0 ), - mnWinExtX ( 1 ), - mnWinExtY ( 1 ), - mnPixX ( 100 ), - mnPixY ( 100 ), - mnMillX ( 1 ), - mnMillY ( 1 ), + mnDevOrgX ( 0 ), + mnDevOrgY ( 0 ), + mnDevWidth ( 1 ), + mnDevHeight ( 1 ), + mnWinOrgX ( 0 ), + mnWinOrgY ( 0 ), + mnWinExtX ( 1 ), + mnWinExtY ( 1 ), + mnPixX ( 100 ), + mnPixY ( 100 ), + mnMillX ( 1 ), + mnMillY ( 1 ), mpGDIMetaFile ( &rGDIMetaFile ) { - mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); // The original clipregion has to be on top + mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); // The original clipregion has to be on top // of the stack so it can always be restored // this is necessary to be able to support // SetClipRgn( NULL ) and similar ClipRgn actions (SJ) - maFont.SetName( String( RTL_CONSTASCII_USTRINGPARAM( "Arial" )) ); // sj: #i57205#, we do have some scaling problems if using - maFont.SetCharSet( gsl_getSystemTextEncoding() ); // the default font then most times a x11 font is used, we - maFont.SetHeight( 423 ); // will prevent this defining a font + maFont.SetName( String( RTL_CONSTASCII_USTRINGPARAM( "Arial" )) ); // sj: #i57205#, we do have some scaling problems if using + maFont.SetCharSet( gsl_getSystemTextEncoding() ); // the default font then most times a x11 font is used, we + maFont.SetHeight( 423 ); // will prevent this defining a font maLatestLineStyle.aLineColor = Color( 0x12, 0x34, 0x56 ); maLatestFillStyle.aFillColor = Color( 0x12, 0x34, 0x56 ); @@ -949,7 +949,7 @@ void WinMtfOutput::UpdateClipRegion() mbComplexClip = false; mpGDIMetaFile->AddAction( new MetaPopAction() ); // taking the orignal clipregion - mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); // + mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); // // skip for 'no clipping at all' case if( !aClipPath.isEmpty() ) @@ -994,7 +994,7 @@ void WinMtfOutput::UpdateLineStyle() void WinMtfOutput::UpdateFillStyle() { - if ( !mbFillStyleSelected ) // SJ: #i57205# taking care of bkcolor if no brush is selected + if ( !mbFillStyleSelected ) // SJ: #i57205# taking care of bkcolor if no brush is selected maFillStyle = WinMtfFillStyle( maBkColor, mnBkMode == TRANSPARENT ); if (!( maLatestFillStyle == maFillStyle ) ) { @@ -1016,7 +1016,7 @@ sal_uInt32 WinMtfOutput::SetRasterOp( UINT32 nRasterOp ) static WinMtfLineStyle aNopLineStyle; if ( mbNopMode && ( nRasterOp != R2_NOP ) ) - { // beim uebergang von R2_NOP auf anderen Modus + { // beim uebergang von R2_NOP auf anderen Modus // gesetzten Pen und Brush aktivieren maFillStyle = aNopFillStyle; maLineStyle = aNopLineStyle; @@ -1215,14 +1215,14 @@ void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const P UpdateLineStyle(); UpdateFillStyle(); - Rectangle aRect( ImplMap( rRect ) ); - Point aStart( ImplMap( rStart ) ); - Point aEnd( ImplMap( rEnd ) ); + Rectangle aRect( ImplMap( rRect ) ); + Point aStart( ImplMap( rStart ) ); + Point aEnd( ImplMap( rEnd ) ); if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) { if ( aStart == aEnd ) - { // SJ: #i53768# if start & end is identical, then we have to draw a full ellipse + { // SJ: #i53768# if start & end is identical, then we have to draw a full ellipse Point aCenter( aRect.Center() ); Size aRad( aRect.GetWidth() / 2, aRect.GetHeight() / 2 ); @@ -1245,9 +1245,9 @@ void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const P UpdateClipRegion(); UpdateFillStyle(); - Rectangle aRect( ImplMap( rRect ) ); - Point aStart( ImplMap( rStart ) ); - Point aEnd( ImplMap( rEnd ) ); + Rectangle aRect( ImplMap( rRect ) ); + Point aStart( ImplMap( rStart ) ); + Point aEnd( ImplMap( rEnd ) ); if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) { @@ -1270,9 +1270,9 @@ void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const UpdateClipRegion(); UpdateFillStyle(); - Rectangle aRect( ImplMap( rRect ) ); - Point aStart( ImplMap( rStart ) ); - Point aEnd( ImplMap( rEnd ) ); + Rectangle aRect( ImplMap( rRect ) ); + Point aStart( ImplMap( rStart ) ); + Point aEnd( ImplMap( rEnd ) ); if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) ) { @@ -1564,7 +1564,7 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry if( mnTextAlign & TA_UPDATECP ) rPosition = maActPos; - + if ( mnTextAlign & TA_RIGHT_CENTER ) { double fLenght = ( ( mnTextAlign & TA_RIGHT_CENTER ) == TA_RIGHT ) ? nTextWidth : nTextWidth >> 1; @@ -1574,7 +1574,7 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry if( mnTextAlign & TA_UPDATECP ) maActPos.X() = rPosition.X() + nTextWidth; - } + } if ( bChangeFont || ( maLatestFont != aTmp ) ) { maLatestFont = aTmp; @@ -1591,7 +1591,7 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry { /* because text without dx array is badly scaled, we will create such an array if necessary */ - sal_Int32* pDX = pDXArry; + sal_Int32* pDX = pDXArry; if ( !pDXArry ) { pDX = new sal_Int32[ rText.Len() ]; @@ -1602,8 +1602,8 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry pVDev->GetTextArray( rText, pDX, 0, STRING_LEN ); } mpGDIMetaFile->AddAction( new MetaTextArrayAction( rPosition, rText, pDX, 0, STRING_LEN ) ); - if ( !pDXArry ) // this means we have created our own array - delete[] pDX; // which must be deleted + if ( !pDXArry ) // this means we have created our own array + delete[] pDX; // which must be deleted } SetGfxMode( nOldGfxMode ); delete pVDev; @@ -1660,16 +1660,16 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) { UpdateClipRegion(); - sal_uInt32 nObjects = rSaveList.Count(); - sal_uInt32 nObjectsLeft = nObjects; + sal_uInt32 nObjects = rSaveList.Count(); + sal_uInt32 nObjectsLeft = nObjects; while ( nObjectsLeft ) { - sal_uInt32 i, nObjectsOfSameSize = 0; - sal_uInt32 nObjectStartIndex = nObjects - nObjectsLeft; + sal_uInt32 i, nObjectsOfSameSize = 0; + sal_uInt32 nObjectStartIndex = nObjects - nObjectsLeft; - BSaveStruct* pSave = (BSaveStruct*)rSaveList.GetObject( nObjectStartIndex ); - Rectangle aRect( pSave->aOutRect ); + BSaveStruct* pSave = (BSaveStruct*)rSaveList.GetObject( nObjectStartIndex ); + Rectangle aRect( pSave->aOutRect ); for ( i = nObjectStartIndex; i < nObjects; ) { @@ -1681,27 +1681,27 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) break; } } - Point aPos( ImplMap( aRect.TopLeft() ) ); - Size aSize( ImplMap( aRect.GetSize() ) ); + Point aPos( ImplMap( aRect.TopLeft() ) ); + Size aSize( ImplMap( aRect.GetSize() ) ); for ( i = nObjectStartIndex; i < ( nObjectStartIndex + nObjectsOfSameSize ); i++ ) { pSave = (BSaveStruct*)rSaveList.GetObject( i ); - sal_uInt32 nWinRop = pSave->nWinRop; - sal_uInt8 nRasterOperation = (sal_uInt8)( nWinRop >> 16 ); + sal_uInt32 nWinRop = pSave->nWinRop; + sal_uInt8 nRasterOperation = (sal_uInt8)( nWinRop >> 16 ); - sal_uInt32 nUsed = 0; + sal_uInt32 nUsed = 0; if ( ( nRasterOperation & 0xf ) != ( nRasterOperation >> 4 ) ) - nUsed |= 1; // pattern is used + nUsed |= 1; // pattern is used if ( ( nRasterOperation & 0x33 ) != ( ( nRasterOperation & 0xcc ) >> 2 ) ) - nUsed |= 2; // source is used + nUsed |= 2; // source is used if ( ( nRasterOperation & 0xaa ) != ( ( nRasterOperation & 0x55 ) << 1 ) ) - nUsed |= 4; // destination is used + nUsed |= 4; // destination is used if ( (nUsed & 1) && (( nUsed & 2 ) == 0) && nWinRop != PATINVERT ) - { // patterns aren't well supported yet - sal_uInt32 nOldRop = SetRasterOp( ROP_OVERPAINT ); // in this case nRasterOperation is either 0 or 0xff + { // patterns aren't well supported yet + sal_uInt32 nOldRop = SetRasterOp( ROP_OVERPAINT ); // in this case nRasterOperation is either 0 or 0xff UpdateFillStyle(); DrawRect( aRect, FALSE ); SetRasterOp( nOldRop ); @@ -1710,11 +1710,11 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) { sal_Bool bDrawn = sal_False; - if ( i == nObjectStartIndex ) // optimizing, sometimes it is possible to create just one transparent bitmap + if ( i == nObjectStartIndex ) // optimizing, sometimes it is possible to create just one transparent bitmap { if ( nObjectsOfSameSize == 2 ) { - BSaveStruct* pSave2 = (BSaveStruct*)rSaveList.GetObject( i + 1 ); + BSaveStruct* pSave2 = (BSaveStruct*)rSaveList.GetObject( i + 1 ); if ( ( pSave->aBmp.GetPrefSize() == pSave2->aBmp.GetPrefSize() ) && ( pSave->aBmp.GetPrefMapMode() == pSave2->aBmp.GetPrefMapMode() ) ) { @@ -1750,18 +1750,18 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) if ( !bDrawn ) { Push(); - sal_uInt32 nOldRop = SetRasterOp( R2_COPYPEN ); - Bitmap aBitmap( pSave->aBmp ); - sal_uInt32 nOperation = ( nRasterOperation & 0xf ); + sal_uInt32 nOldRop = SetRasterOp( R2_COPYPEN ); + Bitmap aBitmap( pSave->aBmp ); + sal_uInt32 nOperation = ( nRasterOperation & 0xf ); switch( nOperation ) { case 0x1 : case 0xe : - { + { SetRasterOp( R2_XORPEN ); ImplDrawBitmap( aPos, aSize, aBitmap ); SetRasterOp( R2_COPYPEN ); - Bitmap aMask( aBitmap ); + Bitmap aMask( aBitmap ); aMask.Invert(); BitmapEx aBmpEx( aBitmap, aMask ); ImplDrawBitmap( aPos, aSize, aBmpEx ); @@ -1775,8 +1775,8 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) case 0x7 : case 0x8 : { - Bitmap aMask( aBitmap ); - if ( ( nUsed & 1 ) && ( nRasterOperation & 0xb0 ) == 0xb0 ) // pattern used + Bitmap aMask( aBitmap ); + if ( ( nUsed & 1 ) && ( nRasterOperation & 0xb0 ) == 0xb0 ) // pattern used { aBitmap.Convert( BMP_CONVERSION_24BIT ); aBitmap.Erase( maFillStyle.aFillColor ); @@ -1797,7 +1797,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) SetRasterOp( R2_NOT ); DrawRect( aRect, FALSE ); SetRasterOp( R2_COPYPEN ); - Bitmap aMask( aBitmap ); + Bitmap aMask( aBitmap ); aBitmap.Invert(); BitmapEx aBmpEx( aBitmap, aMask ); ImplDrawBitmap( aPos, aSize, aBmpEx ); @@ -1814,7 +1814,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) case 0x2 : case 0xd : { - Bitmap aMask( aBitmap ); + Bitmap aMask( aBitmap ); aMask.Invert(); BitmapEx aBmpEx( aBitmap, aMask ); ImplDrawBitmap( aPos, aSize, aBmpEx ); @@ -1840,16 +1840,16 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) } break; - case 0x0 : // WHITENESS - case 0xf : // BLACKNESS - { // in this case nRasterOperation is either 0 or 0xff + case 0x0 : // WHITENESS + case 0xf : // BLACKNESS + { // in this case nRasterOperation is either 0 or 0xff maFillStyle = WinMtfFillStyle( Color( nRasterOperation, nRasterOperation, nRasterOperation ) ); UpdateFillStyle(); DrawRect( aRect, FALSE ); } break; - case 0x3 : // only source is used + case 0x3 : // only source is used case 0xc : { if ( nRasterOperation == 0x33 ) @@ -1858,12 +1858,12 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList ) } break; - case 0x5 : // only destination is used + case 0x5 : // only destination is used { SetRasterOp( R2_NOT ); DrawRect( aRect, FALSE ); } - case 0xa : // no operation + case 0xa : // no operation break; } SetRasterOp( nOldRop ); @@ -1905,7 +1905,7 @@ void WinMtfOutput::SetDevExt( const Size& rSize ) switch( mnMapMode ) { case MM_ISOTROPIC : - case MM_ANISOTROPIC : + case MM_ANISOTROPIC : { mnDevWidth = rSize.Width(); mnDevHeight = rSize.Height(); @@ -1948,7 +1948,7 @@ void WinMtfOutput::SetWinExt( const Size& rSize ) switch( mnMapMode ) { case MM_ISOTROPIC : - case MM_ANISOTROPIC : + case MM_ANISOTROPIC : { mnWinExtX = rSize.Width(); mnWinExtY = rSize.Height(); @@ -2039,7 +2039,7 @@ void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, UINT32 nMode ) case MWT_RIGHTMULTIPLY : case MWT_LEFTMULTIPLY : - { + { const XForm* pLeft; const XForm* pRight; @@ -2101,7 +2101,7 @@ void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, UINT32 nMode ) //----------------------------------------------------------------------------------- -void WinMtfOutput::Push() // !! to be able to access the original ClipRegion it +void WinMtfOutput::Push() // !! to be able to access the original ClipRegion it { // is not allowed to use the MetaPushAction() UpdateClipRegion(); // (the original clip region is on top of the stack) (SJ) SaveStructPtr pSave( new SaveStruct ); diff --git a/svtools/source/filter.vcl/wmf/winmtf.hxx b/svtools/source/filter.vcl/wmf/winmtf.hxx index db9d44aca0f5..9f2a1b344381 100644 --- a/svtools/source/filter.vcl/wmf/winmtf.hxx +++ b/svtools/source/filter.vcl/wmf/winmtf.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,140 +57,140 @@ #define SIMPLEREGION 2 #define COMPLEXREGION 3 -#define RGN_AND 1 -#define RGN_OR 2 -#define RGN_XOR 3 -#define RGN_DIFF 4 -#define RGN_COPY 5 +#define RGN_AND 1 +#define RGN_OR 2 +#define RGN_XOR 3 +#define RGN_DIFF 4 +#define RGN_COPY 5 -#define TRANSPARENT 1 -#define OPAQUE 2 -#define BKMODE_LAST 2 +#define TRANSPARENT 1 +#define OPAQUE 2 +#define BKMODE_LAST 2 /* xform stuff */ -#define MWT_IDENTITY 1 -#define MWT_LEFTMULTIPLY 2 -#define MWT_RIGHTMULTIPLY 3 +#define MWT_IDENTITY 1 +#define MWT_LEFTMULTIPLY 2 +#define MWT_RIGHTMULTIPLY 3 #define ENHMETA_STOCK_OBJECT 0x80000000 /* Stock Logical Objects */ -#define WHITE_BRUSH 0 -#define LTGRAY_BRUSH 1 -#define GRAY_BRUSH 2 -#define DKGRAY_BRUSH 3 -#define BLACK_BRUSH 4 -#define NULL_BRUSH 5 -#define HOLLOW_BRUSH NULL_BRUSH -#define WHITE_PEN 6 -#define BLACK_PEN 7 -#define NULL_PEN 8 -#define OEM_FIXED_FONT 10 -#define ANSI_FIXED_FONT 11 -#define ANSI_VAR_FONT 12 -#define SYSTEM_FONT 13 -#define DEVICE_DEFAULT_FONT 14 -#define DEFAULT_PALETTE 15 -#define SYSTEM_FIXED_FONT 16 - - -#define R2_BLACK 1 -#define R2_NOTMERGEPEN 2 -#define R2_MASKNOTPEN 3 -#define R2_NOTCOPYPEN 4 -#define R2_MASKPENNOT 5 -#define R2_NOT 6 -#define R2_XORPEN 7 -#define R2_NOTMASKPEN 8 -#define R2_MASKPEN 9 -#define R2_NOTXORPEN 10 -#define R2_NOP 11 -#define R2_MERGENOTPEN 12 -#define R2_COPYPEN 13 -#define R2_MERGEPENNOT 14 -#define R2_MERGEPEN 15 -#define R2_WHITE 16 +#define WHITE_BRUSH 0 +#define LTGRAY_BRUSH 1 +#define GRAY_BRUSH 2 +#define DKGRAY_BRUSH 3 +#define BLACK_BRUSH 4 +#define NULL_BRUSH 5 +#define HOLLOW_BRUSH NULL_BRUSH +#define WHITE_PEN 6 +#define BLACK_PEN 7 +#define NULL_PEN 8 +#define OEM_FIXED_FONT 10 +#define ANSI_FIXED_FONT 11 +#define ANSI_VAR_FONT 12 +#define SYSTEM_FONT 13 +#define DEVICE_DEFAULT_FONT 14 +#define DEFAULT_PALETTE 15 +#define SYSTEM_FIXED_FONT 16 + + +#define R2_BLACK 1 +#define R2_NOTMERGEPEN 2 +#define R2_MASKNOTPEN 3 +#define R2_NOTCOPYPEN 4 +#define R2_MASKPENNOT 5 +#define R2_NOT 6 +#define R2_XORPEN 7 +#define R2_NOTMASKPEN 8 +#define R2_MASKPEN 9 +#define R2_NOTXORPEN 10 +#define R2_NOP 11 +#define R2_MERGENOTPEN 12 +#define R2_COPYPEN 13 +#define R2_MERGEPENNOT 14 +#define R2_MERGEPEN 15 +#define R2_WHITE 16 /* Mapping Modes */ -#define MM_TEXT 1 -#define MM_LOMETRIC 2 -#define MM_HIMETRIC 3 -#define MM_LOENGLISH 4 -#define MM_HIENGLISH 5 -#define MM_TWIPS 6 -#define MM_ISOTROPIC 7 -#define MM_ANISOTROPIC 8 +#define MM_TEXT 1 +#define MM_LOMETRIC 2 +#define MM_HIMETRIC 3 +#define MM_LOENGLISH 4 +#define MM_HIENGLISH 5 +#define MM_TWIPS 6 +#define MM_ISOTROPIC 7 +#define MM_ANISOTROPIC 8 /* Graphics Modes */ -#define GM_COMPATIBLE 1 -#define GM_ADVANCED 2 -#define GM_LAST 2 +#define GM_COMPATIBLE 1 +#define GM_ADVANCED 2 +#define GM_LAST 2 /* StretchBlt() Modes */ -#define BLACKONWHITE 1 -#define WHITEONBLACK 2 -#define COLORONCOLOR 3 -#define HALFTONE 4 -#define MAXSTRETCHBLTMODE 4 -#define STRETCH_ANDSCANS BLACKONWHITE -#define STRETCH_ORSCANS WHITEONBLACK -#define STRETCH_DELETESCANS COLORONCOLOR -#define STRETCH_HALFTONE HALFTONE - -#define LF_FACESIZE 32 +#define BLACKONWHITE 1 +#define WHITEONBLACK 2 +#define COLORONCOLOR 3 +#define HALFTONE 4 +#define MAXSTRETCHBLTMODE 4 +#define STRETCH_ANDSCANS BLACKONWHITE +#define STRETCH_ORSCANS WHITEONBLACK +#define STRETCH_DELETESCANS COLORONCOLOR +#define STRETCH_HALFTONE HALFTONE + +#define LF_FACESIZE 32 struct LOGFONTW { - INT32 lfHeight; - INT32 lfWidth; - INT32 lfEscapement; - INT32 lfOrientation; - INT32 lfWeight; - BYTE lfItalic; - BYTE lfUnderline; - BYTE lfStrikeOut; - BYTE lfCharSet; - BYTE lfOutPrecision; - BYTE lfClipPrecision; - BYTE lfQuality; - BYTE lfPitchAndFamily; - String alfFaceName; + INT32 lfHeight; + INT32 lfWidth; + INT32 lfEscapement; + INT32 lfOrientation; + INT32 lfWeight; + BYTE lfItalic; + BYTE lfUnderline; + BYTE lfStrikeOut; + BYTE lfCharSet; + BYTE lfOutPrecision; + BYTE lfClipPrecision; + BYTE lfQuality; + BYTE lfPitchAndFamily; + String alfFaceName; }; -#define TA_NOUPDATECP 0x0000 -#define TA_UPDATECP 0x0001 -#define TA_LEFT 0x0000 -#define TA_RIGHT 0x0002 -#define TA_CENTER 0x0006 -#define TA_RIGHT_CENTER (TA_RIGHT | TA_CENTER) -#define TA_TOP 0x0000 -#define TA_BOTTOM 0x0008 -#define TA_BASELINE 0x0018 - -#define SRCCOPY 0x00CC0020L -#define SRCPAINT 0x00EE0086L -#define SRCAND 0x008800C6L -#define SRCINVERT 0x00660046L -#define SRCERASE 0x00440328L -#define NOTSRCCOPY 0x00330008L -#define NOTSRCERASE 0x001100A6L -#define MERGECOPY 0x00C000CAL -#define MERGEPAINT 0x00BB0226L -#define PATCOPY 0x00F00021L -#define PATPAINT 0x00FB0A09L -#define PATINVERT 0x005A0049L -#define DSTINVERT 0x00550009L -#define BLACKNESS 0x00000042L -#define WHITENESS 0x00FF0062L - -#define PS_SOLID 0 -#define PS_DASH 1 -#define PS_DOT 2 -#define PS_DASHDOT 3 -#define PS_DASHDOTDOT 4 -#define PS_NULL 5 -#define PS_INSIDEFRAME 6 +#define TA_NOUPDATECP 0x0000 +#define TA_UPDATECP 0x0001 +#define TA_LEFT 0x0000 +#define TA_RIGHT 0x0002 +#define TA_CENTER 0x0006 +#define TA_RIGHT_CENTER (TA_RIGHT | TA_CENTER) +#define TA_TOP 0x0000 +#define TA_BOTTOM 0x0008 +#define TA_BASELINE 0x0018 + +#define SRCCOPY 0x00CC0020L +#define SRCPAINT 0x00EE0086L +#define SRCAND 0x008800C6L +#define SRCINVERT 0x00660046L +#define SRCERASE 0x00440328L +#define NOTSRCCOPY 0x00330008L +#define NOTSRCERASE 0x001100A6L +#define MERGECOPY 0x00C000CAL +#define MERGEPAINT 0x00BB0226L +#define PATCOPY 0x00F00021L +#define PATPAINT 0x00FB0A09L +#define PATINVERT 0x005A0049L +#define DSTINVERT 0x00550009L +#define BLACKNESS 0x00000042L +#define WHITENESS 0x00FF0062L + +#define PS_SOLID 0 +#define PS_DASH 1 +#define PS_DOT 2 +#define PS_DASHDOT 3 +#define PS_DASHDOTDOT 4 +#define PS_NULL 5 +#define PS_INSIDEFRAME 6 #define PS_USERSTYLE 7 #define PS_ALTERNATE 8 #define PS_STYLE_MASK 15 @@ -209,14 +209,14 @@ struct LOGFONTW #define PS_GEOMETRIC 0x10000 #define PS_TYPE_MASK 0xF0000 -#define ANSI_CHARSET 0 -#define DEFAULT_CHARSET 1 -#define SYMBOL_CHARSET 2 -#define SHIFTJIS_CHARSET 128 -#define HANGEUL_CHARSET 129 -#define GB2312_CHARSET 134 -#define CHINESEBIG5_CHARSET 136 -#define OEM_CHARSET 255 +#define ANSI_CHARSET 0 +#define DEFAULT_CHARSET 1 +#define SYMBOL_CHARSET 2 +#define SHIFTJIS_CHARSET 128 +#define HANGEUL_CHARSET 129 +#define GB2312_CHARSET 134 +#define CHINESEBIG5_CHARSET 136 +#define OEM_CHARSET 255 /*WINVER >= 0x0400*/ #define JOHAB_CHARSET 130 #define HEBREW_CHARSET 177 @@ -230,70 +230,70 @@ struct LOGFONTW #define MAC_CHARSET 77 #define BALTIC_CHARSET 186 -#define ETO_OPAQUE 0x0002 -#define ETO_CLIPPED 0x0004 +#define ETO_OPAQUE 0x0002 +#define ETO_CLIPPED 0x0004 /*WINVER >= 0x0400*/ -#define ETO_GLYPH_INDEX 0x0010 -#define ETO_RTLREADING 0x0080 -#define ETO_NUMERICSLOCAL 0x0400 -#define ETO_NUMERICSLATIN 0x0800 -#define ETO_IGNORELANGUAGE 0x1000 +#define ETO_GLYPH_INDEX 0x0010 +#define ETO_RTLREADING 0x0080 +#define ETO_NUMERICSLOCAL 0x0400 +#define ETO_NUMERICSLATIN 0x0800 +#define ETO_IGNORELANGUAGE 0x1000 /*_WIN32_WINNT >= 0x0500*/ -#define ETO_PDY 0x2000 +#define ETO_PDY 0x2000 -#define DEFAULT_PITCH 0x00 -#define FIXED_PITCH 0x01 -#define VARIABLE_PITCH 0x02 +#define DEFAULT_PITCH 0x00 +#define FIXED_PITCH 0x01 +#define VARIABLE_PITCH 0x02 /* Font Families */ -#define FF_DONTCARE 0x00 -#define FF_ROMAN 0x10 -#define FF_SWISS 0x20 -#define FF_MODERN 0x30 -#define FF_SCRIPT 0x40 -#define FF_DECORATIVE 0x50 - -#define FW_DONTCARE 0 -#define FW_THIN 100 -#define FW_EXTRALIGHT 200 -#define FW_LIGHT 300 -#define FW_NORMAL 400 -#define FW_MEDIUM 500 -#define FW_SEMIBOLD 600 -#define FW_BOLD 700 -#define FW_EXTRABOLD 800 -#define FW_HEAVY 900 -#define FW_ULTRALIGHT 200 -#define FW_REGULAR 400 -#define FW_DEMIBOLD 600 -#define FW_ULTRABOLD 800 -#define FW_BLACK 900 - -#define BS_SOLID 0 -#define BS_NULL 1 -#define BS_HOLLOW 1 -#define BS_HATCHED 2 -#define BS_PATTERN 3 -#define BS_INDEXED 4 -#define BS_DIBPATTERN 5 -#define BS_DIBPATTERNPT 6 -#define BS_PATTERN8X8 7 -#define BS_DIBPATTERN8X8 8 -#define BS_MONOPATTERN 9 - -#define W_HS_HORIZONTAL 0 -#define W_HS_VERTICAL 1 -#define W_HS_FDIAGONAL 2 -#define W_HS_BDIAGONAL 3 -#define W_HS_CROSS 4 -#define W_HS_DIAGCROSS 5 +#define FF_DONTCARE 0x00 +#define FF_ROMAN 0x10 +#define FF_SWISS 0x20 +#define FF_MODERN 0x30 +#define FF_SCRIPT 0x40 +#define FF_DECORATIVE 0x50 + +#define FW_DONTCARE 0 +#define FW_THIN 100 +#define FW_EXTRALIGHT 200 +#define FW_LIGHT 300 +#define FW_NORMAL 400 +#define FW_MEDIUM 500 +#define FW_SEMIBOLD 600 +#define FW_BOLD 700 +#define FW_EXTRABOLD 800 +#define FW_HEAVY 900 +#define FW_ULTRALIGHT 200 +#define FW_REGULAR 400 +#define FW_DEMIBOLD 600 +#define FW_ULTRABOLD 800 +#define FW_BLACK 900 + +#define BS_SOLID 0 +#define BS_NULL 1 +#define BS_HOLLOW 1 +#define BS_HATCHED 2 +#define BS_PATTERN 3 +#define BS_INDEXED 4 +#define BS_DIBPATTERN 5 +#define BS_DIBPATTERNPT 6 +#define BS_PATTERN8X8 7 +#define BS_DIBPATTERN8X8 8 +#define BS_MONOPATTERN 9 + +#define W_HS_HORIZONTAL 0 +#define W_HS_VERTICAL 1 +#define W_HS_FDIAGONAL 2 +#define W_HS_BDIAGONAL 3 +#define W_HS_CROSS 4 +#define W_HS_DIAGCROSS 5 #define RDH_RECTANGLES 1 -#define W_MFCOMMENT 15 +#define W_MFCOMMENT 15 -#define PRIVATE_ESCAPE_UNICODE 2 +#define PRIVATE_ESCAPE_UNICODE 2 //============================ WMFReader ================================== @@ -304,7 +304,7 @@ struct LOGFONTW #define WIN_MTF_ASSERT_MIFE 0x20000000 void WinMtfAssertHandler( const sal_Char*, sal_uInt32 nFlags = WIN_MTF_ASSERT_MIFE ); -#endif +#endif class WinMtfClipPath { @@ -313,10 +313,10 @@ class WinMtfClipPath public : WinMtfClipPath(): maClip() {}; - void setClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode ); - void intersectClipRect( const Rectangle& rRect ); - void excludeClipRect( const Rectangle& rRect ); - void moveClipRegion( const Size& rSize ); + void setClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode ); + void intersectClipRect( const Rectangle& rRect ); + void excludeClipRect( const Rectangle& rRect ); + void moveClipRegion( const Size& rSize ); bool isEmpty() const { return maClip.isCleared(); } @@ -330,23 +330,23 @@ public : class WinMtfPathObj : public PolyPolygon { - sal_Bool bClosed; + sal_Bool bClosed; public : WinMtfPathObj() { bClosed = sal_True; } void Init() { Clear(); bClosed = sal_True; }; - void ClosePath(); + void ClosePath(); - void AddPoint( const Point& rPoint ); - void AddPolygon( const Polygon& rPoly ); - void AddPolyLine( const Polygon& rPoly ); - void AddPolyPolygon( const PolyPolygon& rPolyPolygon ); + void AddPoint( const Point& rPoint ); + void AddPolygon( const Polygon& rPoly ); + void AddPolyLine( const Polygon& rPoly ); + void AddPolyPolygon( const PolyPolygon& rPolyPolygon ); }; struct WinMtfFontStyle { - Font aFont; + Font aFont; WinMtfFontStyle( LOGFONTW& rLogFont ); }; @@ -360,19 +360,19 @@ typedef enum { struct WinMtfFillStyle { - Color aFillColor; - BOOL bTransparent; + Color aFillColor; + BOOL bTransparent; WinMtfFillStyleType aType; Bitmap aBmp; WinMtfFillStyle() : - aFillColor ( Color( COL_BLACK ) ), + aFillColor ( Color( COL_BLACK ) ), bTransparent( FALSE ) { }; WinMtfFillStyle( const Color& rColor, BOOL bTrans = FALSE ) : - aFillColor ( rColor ), + aFillColor ( rColor ), bTransparent( bTrans ), aType ( FillStyleSolid ) { @@ -396,21 +396,21 @@ struct WinMtfFillStyle struct WinMtfLineStyle { - Color aLineColor; - LineInfo aLineInfo; - BOOL bTransparent; + Color aLineColor; + LineInfo aLineInfo; + BOOL bTransparent; WinMtfLineStyle() : - aLineColor ( COL_BLACK ), + aLineColor ( COL_BLACK ), bTransparent( FALSE ) {}; WinMtfLineStyle( const Color& rColor, BOOL bTrans = FALSE ) : - aLineColor ( rColor ), + aLineColor ( rColor ), bTransparent( bTrans ) {}; WinMtfLineStyle( const Color& rColor, const LineInfo rStyle, BOOL bTrans = FALSE ) : - aLineColor ( rColor ), - aLineInfo ( rStyle ), + aLineColor ( rColor ), + aLineInfo ( rStyle ), bTransparent( bTrans ) {}; BOOL operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); }; @@ -434,12 +434,12 @@ struct WinMtfLineStyle struct XForm { - float eM11; - float eM12; - float eM21; - float eM22; - float eDx; - float eDy; + float eM11; + float eM12; + float eM21; + float eM22; + float eDx; + float eDy; XForm() { eM11 = eM22 = 1.0f; @@ -454,25 +454,25 @@ struct XForm struct SaveStruct { sal_uInt32 nBkMode, nMapMode, nGfxMode, nTextLayoutMode; - sal_Int32 nWinOrgX, nWinOrgY, nWinExtX, nWinExtY; - sal_Int32 nDevOrgX, nDevOrgY, nDevWidth, nDevHeight; + sal_Int32 nWinOrgX, nWinOrgY, nWinExtX, nWinExtY; + sal_Int32 nDevOrgX, nDevOrgY, nDevWidth, nDevHeight; - WinMtfLineStyle aLineStyle; - WinMtfFillStyle aFillStyle; + WinMtfLineStyle aLineStyle; + WinMtfFillStyle aFillStyle; - Font aFont; - Color aBkColor; - Color aTextColor; + Font aFont; + Color aBkColor; + Color aTextColor; sal_uInt32 nTextAlign; RasterOp eRasterOp; - Point aActPos; - WinMtfPathObj aPathObj; - WinMtfClipPath aClipPath; - XForm aXForm; + Point aActPos; + WinMtfPathObj aPathObj; + WinMtfClipPath aClipPath; + XForm aXForm; - sal_Bool bRecordPath; - sal_Bool bFillStyleSelected; + sal_Bool bRecordPath; + sal_Bool bFillStyleSelected; }; typedef ::boost::shared_ptr< SaveStruct > SaveStructPtr; @@ -481,9 +481,9 @@ typedef ::boost::shared_ptr< SaveStruct > SaveStructPtr; struct BSaveStruct { - Bitmap aBmp; - Rectangle aOutRect; - UINT32 nWinRop; + Bitmap aBmp; + Rectangle aOutRect; + UINT32 nWinRop; WinMtfFillStyle aStyle; BSaveStruct( const Bitmap& rBmp, const Rectangle& rOutRect, UINT32 nRop, WinMtfFillStyle& rStyle ) : @@ -496,12 +496,12 @@ enum GDIObjectType { GDI_DUMMY = 0, GDI_PEN = 1, GDI_BRUSH = 2, GDI_FONT = 3, GD struct GDIObj { - void* pStyle; - GDIObjectType eType; + void* pStyle; + GDIObjectType eType; GDIObj() : - pStyle ( NULL ), - eType ( GDI_DUMMY ) + pStyle ( NULL ), + eType ( GDI_DUMMY ) { }; @@ -542,148 +542,148 @@ struct GDIObj class WinMtfOutput { - WinMtfPathObj aPathObj; - WinMtfClipPath aClipPath; + WinMtfPathObj aPathObj; + WinMtfClipPath aClipPath; - WinMtfLineStyle maLatestLineStyle; - WinMtfLineStyle maLineStyle; - WinMtfFillStyle maLatestFillStyle; - WinMtfFillStyle maFillStyle; + WinMtfLineStyle maLatestLineStyle; + WinMtfLineStyle maLineStyle; + WinMtfFillStyle maLatestFillStyle; + WinMtfFillStyle maFillStyle; Font maLatestFont; - Font maFont; + Font maFont; sal_uInt32 mnLatestTextAlign; sal_uInt32 mnTextAlign; Color maLatestTextColor; - Color maTextColor; + Color maTextColor; Color maLatestBkColor; - Color maBkColor; - sal_uInt32 mnLatestTextLayoutMode; - sal_uInt32 mnTextLayoutMode; + Color maBkColor; + sal_uInt32 mnLatestTextLayoutMode; + sal_uInt32 mnTextLayoutMode; sal_uInt32 mnLatestBkMode; sal_uInt32 mnBkMode; RasterOp meLatestRasterOp; - RasterOp meRasterOp; + RasterOp meRasterOp; std::vector< GDIObj* > vGDIObj; - Point maActPos; + Point maActPos; sal_uInt32 mnRop; sal_Bool mbNopMode; - sal_Bool mbFillStyleSelected; + sal_Bool mbFillStyleSelected; sal_Bool mbClipNeedsUpdate; sal_Bool mbComplexClip; std::vector< SaveStructPtr > vSaveStack; - sal_uInt32 mnGfxMode; + sal_uInt32 mnGfxMode; sal_uInt32 mnMapMode; - XForm maXForm; - sal_Int32 mnDevOrgX, mnDevOrgY; - sal_Int32 mnDevWidth, mnDevHeight; - sal_Int32 mnWinOrgX, mnWinOrgY; // aktuelles Window-Origin - sal_Int32 mnWinExtX, mnWinExtY; // aktuelles Window-Extent - - sal_Int32 mnPixX, mnPixY; // Reference Device in pixel - sal_Int32 mnMillX, mnMillY; // Reference Device in Mill - Rectangle mrclFrame; // rectangle in logical units 1/100th mm - Rectangle mrclBounds; - - GDIMetaFile* mpGDIMetaFile; - - void UpdateLineStyle(); - void UpdateFillStyle(); - - Point ImplMap( const Point& rPt ); - Size ImplMap( const Size& rSz ); - Rectangle ImplMap( const Rectangle& rRectangle ); - void ImplMap( Font& rFont ); - Polygon& ImplMap( Polygon& rPolygon ); - PolyPolygon& ImplMap( PolyPolygon& rPolyPolygon ); - void ImplResizeObjectArry( UINT32 nNewEntry ); - void ImplSetNonPersistentLineColorTransparenz(); - void ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly ); - void ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap ); + XForm maXForm; + sal_Int32 mnDevOrgX, mnDevOrgY; + sal_Int32 mnDevWidth, mnDevHeight; + sal_Int32 mnWinOrgX, mnWinOrgY; // aktuelles Window-Origin + sal_Int32 mnWinExtX, mnWinExtY; // aktuelles Window-Extent + + sal_Int32 mnPixX, mnPixY; // Reference Device in pixel + sal_Int32 mnMillX, mnMillY; // Reference Device in Mill + Rectangle mrclFrame; // rectangle in logical units 1/100th mm + Rectangle mrclBounds; + + GDIMetaFile* mpGDIMetaFile; + + void UpdateLineStyle(); + void UpdateFillStyle(); + + Point ImplMap( const Point& rPt ); + Size ImplMap( const Size& rSz ); + Rectangle ImplMap( const Rectangle& rRectangle ); + void ImplMap( Font& rFont ); + Polygon& ImplMap( Polygon& rPolygon ); + PolyPolygon& ImplMap( PolyPolygon& rPolyPolygon ); + void ImplResizeObjectArry( UINT32 nNewEntry ); + void ImplSetNonPersistentLineColorTransparenz(); + void ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly ); + void ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap ); public: - void SetDevOrg( const Point& rPoint ); - void SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd ); - void SetDevExt( const Size& rSize ); - void ScaleDevExt( double fX, double fY ); + void SetDevOrg( const Point& rPoint ); + void SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd ); + void SetDevExt( const Size& rSize ); + void ScaleDevExt( double fX, double fY ); - void SetWinOrg( const Point& rPoint ); - void SetWinOrgOffset( INT32 nX, INT32 nY ); - void SetWinExt( const Size& rSize ); - void ScaleWinExt( double fX, double fY ); + void SetWinOrg( const Point& rPoint ); + void SetWinOrgOffset( INT32 nX, INT32 nY ); + void SetWinExt( const Size& rSize ); + void ScaleWinExt( double fX, double fY ); - void SetrclBounds( const Rectangle& rRect ); - void SetrclFrame( const Rectangle& rRect ); - void SetRefPix( const Size& rSize ); - void SetRefMill( const Size& rSize ); + void SetrclBounds( const Rectangle& rRect ); + void SetrclFrame( const Rectangle& rRect ); + void SetRefPix( const Size& rSize ); + void SetRefMill( const Size& rSize ); - sal_uInt32 GetMapMode() const { return mnMapMode; }; + sal_uInt32 GetMapMode() const { return mnMapMode; }; void SetMapMode( sal_uInt32 mnMapMode ); - void SetWorldTransform( const XForm& rXForm ); - void ModifyWorldTransform( const XForm& rXForm, UINT32 nMode ); - - void Push(); - void Pop(); - - UINT32 SetRasterOp( UINT32 nRasterOp ); - void StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ); - - void SetGfxMode( sal_Int32 nGfxMode ){ mnGfxMode = nGfxMode; }; - sal_Int32 GetGfxMode() const { return mnGfxMode; }; - void SetBkMode( UINT32 nMode ); - void SetBkColor( const Color& rColor ); - void SetTextColor( const Color& rColor ); - void SetTextAlign( UINT32 nAlign ); - void CreateObject( GDIObjectType, void* pStyle = NULL ); - void CreateObject( INT32 nIndex, GDIObjectType, void* pStyle = NULL ); - void DeleteObject( INT32 nIndex ); - void SelectObject( INT32 nIndex ); - CharSet GetCharSet(){ return maFont.GetCharSet(); }; + void SetWorldTransform( const XForm& rXForm ); + void ModifyWorldTransform( const XForm& rXForm, UINT32 nMode ); + + void Push(); + void Pop(); + + UINT32 SetRasterOp( UINT32 nRasterOp ); + void StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ); + + void SetGfxMode( sal_Int32 nGfxMode ){ mnGfxMode = nGfxMode; }; + sal_Int32 GetGfxMode() const { return mnGfxMode; }; + void SetBkMode( UINT32 nMode ); + void SetBkColor( const Color& rColor ); + void SetTextColor( const Color& rColor ); + void SetTextAlign( UINT32 nAlign ); + void CreateObject( GDIObjectType, void* pStyle = NULL ); + void CreateObject( INT32 nIndex, GDIObjectType, void* pStyle = NULL ); + void DeleteObject( INT32 nIndex ); + void SelectObject( INT32 nIndex ); + CharSet GetCharSet(){ return maFont.GetCharSet(); }; WinMtfFillStyle& GetFillStyle () { return maFillStyle; } - void SetFont( const Font& rFont ); - const Font& GetFont() const; - void SetTextLayoutMode( const sal_uInt32 nLayoutMode ); - sal_uInt32 GetTextLayoutMode() const; - - void ClearPath(){ aPathObj.Init(); }; - void ClosePath(){ aPathObj.ClosePath(); }; - const PolyPolygon& GetPathObj(){ return aPathObj; }; - - void MoveTo( const Point& rPoint, sal_Bool bRecordPath = sal_False ); - void LineTo( const Point& rPoint, sal_Bool bRecordPath = sal_False ); - void DrawPixel( const Point& rSource, const Color& rColor ); - void DrawLine( const Point& rSource, const Point& rDest ); - void DrawRect( const Rectangle& rRect, BOOL bEdge = TRUE ); - void DrawRoundRect( const Rectangle& rRect, const Size& rSize ); - void DrawEllipse( const Rectangle& rRect ); - void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, BOOL bDrawTo = FALSE ); - void DrawPie( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle ); - void DrawChord( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle ); - void DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath = sal_False ); - void DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath = sal_False ); - void DrawPolyLine( Polygon& rPolygon, sal_Bool bDrawTo = sal_False, sal_Bool bRecordPath = sal_False ); - void DrawPolyBezier( Polygon& rPolygin, sal_Bool bDrawTo = sal_False, sal_Bool bRecordPath = sal_False ); - void DrawText( Point& rPosition, String& rString, sal_Int32* pDXArry = NULL, sal_Bool bRecordPath = sal_False, + void SetFont( const Font& rFont ); + const Font& GetFont() const; + void SetTextLayoutMode( const sal_uInt32 nLayoutMode ); + sal_uInt32 GetTextLayoutMode() const; + + void ClearPath(){ aPathObj.Init(); }; + void ClosePath(){ aPathObj.ClosePath(); }; + const PolyPolygon& GetPathObj(){ return aPathObj; }; + + void MoveTo( const Point& rPoint, sal_Bool bRecordPath = sal_False ); + void LineTo( const Point& rPoint, sal_Bool bRecordPath = sal_False ); + void DrawPixel( const Point& rSource, const Color& rColor ); + void DrawLine( const Point& rSource, const Point& rDest ); + void DrawRect( const Rectangle& rRect, BOOL bEdge = TRUE ); + void DrawRoundRect( const Rectangle& rRect, const Size& rSize ); + void DrawEllipse( const Rectangle& rRect ); + void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, BOOL bDrawTo = FALSE ); + void DrawPie( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle ); + void DrawChord( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle ); + void DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath = sal_False ); + void DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath = sal_False ); + void DrawPolyLine( Polygon& rPolygon, sal_Bool bDrawTo = sal_False, sal_Bool bRecordPath = sal_False ); + void DrawPolyBezier( Polygon& rPolygin, sal_Bool bDrawTo = sal_False, sal_Bool bRecordPath = sal_False ); + void DrawText( Point& rPosition, String& rString, sal_Int32* pDXArry = NULL, sal_Bool bRecordPath = sal_False, sal_Int32 nGraphicsMode = GM_COMPATIBLE ); - void ResolveBitmapActions( List& rSaveList ); + void ResolveBitmapActions( List& rSaveList ); - void IntersectClipRect( const Rectangle& rRect ); - void ExcludeClipRect( const Rectangle& rRect ); - void MoveClipRegion( const Size& rSize ); - void SetClipPath( const PolyPolygon& rPolyPoly, sal_Int32 nClippingMode, sal_Bool bIsMapped ); - void UpdateClipRegion(); - void AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile ); + void IntersectClipRect( const Rectangle& rRect ); + void ExcludeClipRect( const Rectangle& rRect ); + void MoveClipRegion( const Size& rSize ); + void SetClipPath( const PolyPolygon& rPolyPoly, sal_Int32 nClippingMode, sal_Bool bIsMapped ); + void UpdateClipRegion(); + void AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile ); void PassEMFPlus( void* pBuffer, UINT32 nLength ); void PassEMFPlusHeaderInfo(); WinMtfOutput( GDIMetaFile& rGDIMetaFile ); - virtual ~WinMtfOutput(); + virtual ~WinMtfOutput(); }; // ----------------------------------------------------------------------------- @@ -692,20 +692,20 @@ class WinMtf { protected: - WinMtfOutput* pOut; // - SvStream* pWMF; // Die einzulesende WMF/EMF-Datei + WinMtfOutput* pOut; // + SvStream* pWMF; // Die einzulesende WMF/EMF-Datei - UINT32 nStartPos, nEndPos; - List aBmpSaveList; + UINT32 nStartPos, nEndPos; + List aBmpSaveList; - FilterConfigItem* pFilterConfigItem; + FilterConfigItem* pFilterConfigItem; com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; // Sorgt dafuer, das aSampledBrush der aktuelle Brush des GDIMetaFiles ist. - Color ReadColor(); - void Callback( USHORT nPercent ); + Color ReadColor(); + void Callback( USHORT nPercent ); WinMtf( WinMtfOutput* pOut, SvStream& rStreamWMF, FilterConfigItem* pConfigItem = NULL ); ~WinMtf(); @@ -718,21 +718,21 @@ class WinMtf class EnhWMFReader : public WinMtf { - sal_Bool bRecordPath; - sal_Int32 nRecordCount; + sal_Bool bRecordPath; + sal_Int32 nRecordCount; BOOL bEMFPlus; - BOOL ReadHeader(); - Rectangle ReadRectangle( INT32, INT32, INT32, INT32 ); // Liesst und konvertiert ein Rechteck - void ImplExtTextOut( BOOL bWideCharakter ); + BOOL ReadHeader(); + Rectangle ReadRectangle( INT32, INT32, INT32, INT32 ); // Liesst und konvertiert ein Rechteck + void ImplExtTextOut( BOOL bWideCharakter ); public: EnhWMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL ) : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ), bRecordPath( sal_False ), bEMFPlus (FALSE) {}; ~EnhWMFReader(); - BOOL ReadEnhWMF(); + BOOL ReadEnhWMF(); void ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC); void ReadGDIComment(); }; @@ -743,47 +743,47 @@ class WMFReader : public WinMtf { private: - VirtualDevice aVDev; // just for the purpose of "IsFontAvailable" - UINT16 nUnitsPerInch; - sal_uInt32 nRecSize; + VirtualDevice aVDev; // just for the purpose of "IsFontAvailable" + UINT16 nUnitsPerInch; + sal_uInt32 nRecSize; // embedded EMF data - SvMemoryStream* pEMFStream; + SvMemoryStream* pEMFStream; // total number of comment records containing EMF data sal_uInt32 nEMFRecCount; - + // number of EMF records read sal_uInt32 nEMFRec; // total size of embedded EMF data sal_uInt32 nEMFSize; - sal_uInt32 nSkipActions; - sal_uInt32 nCurrentAction; - sal_uInt32 nUnicodeEscapeAction; + sal_uInt32 nSkipActions; + sal_uInt32 nCurrentAction; + sal_uInt32 nUnicodeEscapeAction; // Liesst den Kopf der WMF-Datei - BOOL ReadHeader(); + BOOL ReadHeader(); // Liesst die Parameter des Rocords mit der Funktionsnummer nFunction. - void ReadRecordParams( USHORT nFunction ); + void ReadRecordParams( USHORT nFunction ); - Point ReadPoint(); // Liesst und konvertiert einen Punkt (erst X dann Y) - Point ReadYX(); // Liesst und konvertiert einen Punkt (erst Y dann X) - Rectangle ReadRectangle(); // Liesst und konvertiert ein Rechteck - Size ReadYXExt(); + Point ReadPoint(); // Liesst und konvertiert einen Punkt (erst X dann Y) + Point ReadYX(); // Liesst und konvertiert einen Punkt (erst Y dann X) + Rectangle ReadRectangle(); // Liesst und konvertiert ein Rechteck + Size ReadYXExt(); sal_Bool GetPlaceableBound( Rectangle& rSize, SvStream* pStrm ); public: WMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL ) : WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ) {}; - + ~WMFReader(); // Liesst aus dem Stream eine WMF-Datei und fuellt das GDIMetaFile - void ReadWMF(); + void ReadWMF(); }; #endif diff --git a/svtools/source/filter.vcl/wmf/winwmf.cxx b/svtools/source/filter.vcl/wmf/winwmf.cxx index 1a67a97f17c2..fdb8cf5b620c 100644 --- a/svtools/source/filter.vcl/wmf/winwmf.cxx +++ b/svtools/source/filter.vcl/wmf/winwmf.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -334,9 +334,9 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_POLYPOLYGON: { - USHORT i, nPoly, nPoints; - USHORT* pnPoints; - Point* pPtAry; + USHORT i, nPoly, nPoints; + USHORT* pnPoints; + Point* pPtAry; // Anzahl der Polygone: *pWMF >> nPoly; // Anzahl der Punkte eines jeden Polygons holen, Gesammtzahl der Punkte ermitteln: @@ -401,7 +401,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) *pWMF >> nLength; if ( nLength ) { - char* pChar = new char[ ( nLength + 1 ) &~ 1 ]; + char* pChar = new char[ ( nLength + 1 ) &~ 1 ]; pWMF->Read( pChar, ( nLength + 1 ) &~ 1 ); String aText( pChar, nLength, pOut->GetCharSet() ); delete[] pChar; @@ -413,12 +413,12 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_EXTTEXTOUT: { - sal_Int16 nDx, nDxTmp; - sal_uInt16 i, nLen, nOptions; - sal_Int32 nRecordPos, nRecordSize, nOriginalTextLen, nNewTextLen; - Point aPosition; - Rectangle aRect; - sal_Int32* pDXAry = NULL; + sal_Int16 nDx, nDxTmp; + sal_uInt16 i, nLen, nOptions; + sal_Int32 nRecordPos, nRecordSize, nOriginalTextLen, nNewTextLen; + Point aPosition; + Rectangle aRect; + sal_Int32* pDXAry = NULL; pWMF->SeekRel(-6); nRecordPos = pWMF->Tell(); @@ -446,15 +446,15 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) char* pChar = new char[ ( nOriginalTextLen + 1 ) &~ 1 ]; pWMF->Read( pChar, ( nOriginalTextLen + 1 ) &~ 1 ); String aText( pChar, (sal_uInt16)nOriginalTextLen, pOut->GetCharSet() );// after this conversion the text may contain - nNewTextLen = aText.Len(); // less character (japanese version), so the - delete[] pChar; // dxAry will not fit + nNewTextLen = aText.Len(); // less character (japanese version), so the + delete[] pChar; // dxAry will not fit if ( nNewTextLen ) { - sal_uInt32 nMaxStreamPos = nRecordPos + ( nRecordSize << 1 ); - sal_Int32 nDxArySize = nMaxStreamPos - pWMF->Tell(); - sal_Int32 nDxAryEntries = nDxArySize >> 1; - sal_Bool bUseDXAry = FALSE; + sal_uInt32 nMaxStreamPos = nRecordPos + ( nRecordSize << 1 ); + sal_Int32 nDxArySize = nMaxStreamPos - pWMF->Tell(); + sal_Int32 nDxAryEntries = nDxArySize >> 1; + sal_Bool bUseDXAry = FALSE; if ( ( ( nDxAryEntries % nOriginalTextLen ) == 0 ) && ( nNewTextLen <= nOriginalTextLen ) ) { @@ -477,7 +477,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) *pWMF >> nDxTmp; nDx = nDx + nDxTmp; } - } + } } pDXAry[ i ] = nDx; } @@ -497,7 +497,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_SELECTOBJECT: { - INT16 nObjIndex; + INT16 nObjIndex; *pWMF >> nObjIndex; pOut->SelectObject( nObjIndex ); } @@ -505,7 +505,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_SETTEXTALIGN: { - UINT16 nAlign; + UINT16 nAlign; *pWMF >> nAlign; pOut->SetTextAlign( nAlign ); } @@ -513,7 +513,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_BITBLT: { - // 0-3 : nWinROP #93454# + // 0-3 : nWinROP #93454# // 4-5 : y offset of source bitmap // 6-7 : x offset of source bitmap // 8-9 : used height of source bitmap @@ -525,11 +525,11 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) // 20-21 : Height Bitmap in Pixel // 22-23 : bytes per scanline // 24 : planes - // 25 : bitcount + // 25 : bitcount - sal_Int32 nWinROP; - sal_uInt16 nSx, nSy, nSxe, nSye, nDontKnow, nWidth, nHeight, nBytesPerScan; - sal_uInt8 nPlanes, nBitCount; + sal_Int32 nWinROP; + sal_uInt16 nSx, nSy, nSxe, nSye, nDontKnow, nWidth, nHeight, nBytesPerScan; + sal_uInt8 nPlanes, nBitCount; *pWMF >> nWinROP >> nSy >> nSx >> nSye >> nSxe; @@ -562,7 +562,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) } } aBmp.ReleaseAccess( pAcc ); - if ( nSye && nSxe && + if ( nSye && nSxe && ( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) && ( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) ) { @@ -573,7 +573,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) aBmpSaveList.Insert( new BSaveStruct( aBmp, aDestRect, nWinROP, pOut->GetFillStyle () ), LIST_APPEND ); } } - } + } break; case W_META_STRETCHBLT: @@ -583,13 +583,13 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) { sal_Int32 nWinROP; sal_uInt16 nSx, nSy, nSxe, nSye, nUsage; - Bitmap aBmp; + Bitmap aBmp; *pWMF >> nWinROP; if( nFunc == W_META_STRETCHDIB ) *pWMF >> nUsage; - + // nSye and nSxe is the number of pixels that has to been used if( nFunc == W_META_STRETCHDIB || nFunc == W_META_STRETCHBLT || nFunc == W_META_DIBSTRETCHBLT ) *pWMF >> nSye >> nSxe; @@ -602,18 +602,18 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) if( nFunc == W_META_STRETCHDIB || nFunc == W_META_DIBBITBLT || nFunc == W_META_DIBSTRETCHBLT ) { if ( nWinROP == PATCOPY ) - *pWMF >> nUsage; // i don't know anything of this parameter, so its called nUsage + *pWMF >> nUsage; // i don't know anything of this parameter, so its called nUsage // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), FALSE ); Size aDestSize( ReadYXExt() ); - if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps + if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps { Rectangle aDestRect( ReadYX(), aDestSize ); if ( nWinROP != PATCOPY ) aBmp.Read( *pWMF, FALSE ); // test if it is sensible to crop - if ( nSye && nSxe && + if ( nSye && nSxe && ( ( nSx + nSxe ) <= aBmp.GetSizePixel().Width() ) && ( ( nSy + nSye <= aBmp.GetSizePixel().Height() ) ) ) { @@ -628,10 +628,10 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_DIBCREATEPATTERNBRUSH: { - Bitmap aBmp; + Bitmap aBmp; BitmapReadAccess* pBmp; - UINT32 nRed = 0, nGreen = 0, nBlue = 0, nCount = 1; - UINT16 nFunction; + UINT32 nRed = 0, nGreen = 0, nBlue = 0, nCount = 1; + UINT16 nFunction; *pWMF >> nFunction >> nFunction; @@ -643,8 +643,8 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) { for ( INT32 x = 0; x < pBmp->Width(); x++ ) { - const BitmapColor aColor( pBmp->GetColor( y, x ) ); - + const BitmapColor aColor( pBmp->GetColor( y, x ) ); + nRed += aColor.GetRed(); nGreen += aColor.GetGreen(); nBlue += aColor.GetBlue(); @@ -688,8 +688,8 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_CREATEPENINDIRECT: { - LineInfo aLineInfo; - USHORT nStyle, nWidth, nHeight; + LineInfo aLineInfo; + USHORT nStyle, nWidth, nHeight; *pWMF >> nStyle >> nWidth >> nHeight; @@ -732,7 +732,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_CREATEBRUSHINDIRECT: { - USHORT nStyle; + USHORT nStyle; *pWMF >> nStyle; pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? TRUE : FALSE ) ); } @@ -740,9 +740,9 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) case W_META_CREATEFONTINDIRECT: { - Size aFontSize; - char lfFaceName[ LF_FACESIZE ]; - INT16 lfEscapement, lfOrientation, lfWeight; // ( ehemals USHORT ) + Size aFontSize; + char lfFaceName[ LF_FACESIZE ]; + INT16 lfEscapement, lfOrientation, lfWeight; // ( ehemals USHORT ) LOGFONTW aLogFont; aFontSize = ReadYXExt(); @@ -830,22 +830,22 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR ); break; } - if ( nRecSize >= 4 ) // minimal escape lenght + if ( nRecSize >= 4 ) // minimal escape lenght { - sal_uInt16 nMode, nLen; + sal_uInt16 nMode, nLen; *pWMF >> nMode >> nLen; if ( ( nMode == W_MFCOMMENT ) && ( nLen >= 4 ) ) { - sal_uInt32 nNewMagic; // we have to read int32 for + sal_uInt32 nNewMagic; // we have to read int32 for *pWMF >> nNewMagic; // META_ESCAPE_ENHANCED_METAFILE CommentIdentifier - + if( nNewMagic == 0x2c2a4f4f && nLen >= 14 ) { sal_uInt16 nMagic2; *pWMF >> nMagic2; if( nMagic2 == 0x0a ) // 2nd half of magic - { // continue with private escape + { // continue with private escape sal_uInt32 nCheck, nEsc; *pWMF >> nCheck >> nEsc; @@ -877,12 +877,12 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) switch( nEsc ) { case PRIVATE_ESCAPE_UNICODE : - { // we will use text instead of polygons only if we have the correct font + { // we will use text instead of polygons only if we have the correct font if ( aVDev.IsFontAvailable( pOut->GetFont().GetName() ) ) { Point aPt; String aString; - sal_uInt32 i, nStringLen, nDXCount; + sal_uInt32 i, nStringLen, nDXCount; sal_Int32* pDXAry = NULL; SvMemoryStream aMemoryStream( nEscLen ); aMemoryStream.Write( pData, nEscLen ); @@ -918,12 +918,12 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) } else if ( (nNewMagic == static_cast< sal_uInt32 >(0x43464D57)) && (nLen >= 34) && ( (sal_Int32)(nLen + 10) <= (sal_Int32)(nRecSize * 2) )) { - sal_uInt32 nComType, nVersion, nFlags, nComRecCount, + sal_uInt32 nComType, nVersion, nFlags, nComRecCount, nCurRecSize, nRemainingSize, nEMFTotalSize; sal_uInt16 nCheck; - + *pWMF >> nComType >> nVersion >> nCheck >> nFlags - >> nComRecCount >> nCurRecSize + >> nComRecCount >> nCurRecSize >> nRemainingSize >> nEMFTotalSize; // the nRemainingSize is not mentioned in MSDN documentation // but it seems to be required to read in data produced by OLE @@ -950,7 +950,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) delete pEMFStream; pEMFStream = NULL; } - + if( pEMFStream ) { sal_Int8* pBuf = new sal_Int8[ nCurRecSize ]; @@ -999,7 +999,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc ) BOOL WMFReader::ReadHeader() { - Rectangle aPlaceableBound; + Rectangle aPlaceableBound; sal_uInt32 nl, nStrmPos = pWMF->Tell(); // Einlesen des METAFILEHEADER, falls vorhanden @@ -1030,7 +1030,7 @@ BOOL WMFReader::ReadHeader() } else { - nUnitsPerInch = 96; + nUnitsPerInch = 96; pWMF->Seek( nStrmPos + 18 ); // set the streampos to the start of the the metaactions GetPlaceableBound( aPlaceableBound, pWMF ); pWMF->Seek( nStrmPos ); @@ -1043,9 +1043,9 @@ BOOL WMFReader::ReadHeader() Size aDevExt( 10000, 10000 ); if( ( labs( aWMFSize.Width() ) > 1 ) && ( labs( aWMFSize.Height() ) > 1 ) ) { - const Fraction aFrac( 1, nUnitsPerInch ); - MapMode aWMFMap( MAP_INCH, Point(), aFrac, aFrac ); - Size aSize100( OutputDevice::LogicToLogic( aWMFSize, aWMFMap, MAP_100TH_MM ) ); + const Fraction aFrac( 1, nUnitsPerInch ); + MapMode aWMFMap( MAP_INCH, Point(), aFrac, aFrac ); + Size aSize100( OutputDevice::LogicToLogic( aWMFSize, aWMFMap, MAP_100TH_MM ) ); aDevExt = Size( labs( aSize100.Width() ), labs( aSize100.Height() ) ); } pOut->SetDevExt( aDevExt ); @@ -1070,9 +1070,9 @@ BOOL WMFReader::ReadHeader() void WMFReader::ReadWMF() { - USHORT nFunction; - ULONG nPos, nPercent, nLastPercent; - + USHORT nFunction; + ULONG nPos, nPercent, nLastPercent; + nSkipActions = 0; nCurrentAction = 0; nUnicodeEscapeAction = 0; @@ -1081,7 +1081,7 @@ void WMFReader::ReadWMF() nEMFRecCount = 0; nEMFRec = 0; nEMFSize = 0; - + sal_Bool bEMFAvailable = sal_False; pOut->SetMapMode( MM_ANISOTROPIC ); @@ -1133,7 +1133,7 @@ void WMFReader::ReadWMF() ReadRecordParams( nFunction ); else nSkipActions--; - + if( pEMFStream && nEMFRecCount == nEMFRec ) { GDIMetaFile aMeta; @@ -1142,7 +1142,7 @@ void WMFReader::ReadWMF() bEMFAvailable = pEMFReader->ReadEnhWMF(); delete pEMFReader; // destroy first!!! - if( bEMFAvailable ) + if( bEMFAvailable ) { pOut->AddFromGDIMetaFile( aMeta ); pOut->SetrclFrame( Rectangle(0, 0, aMeta.GetPrefSize().Width(), aMeta.GetPrefSize().Height() )); @@ -1210,14 +1210,14 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt rPlaceableBound.Top() = (sal_Int32)0x7fffffff; rPlaceableBound.Right() = (sal_Int32)0x80000000; rPlaceableBound.Bottom() = (sal_Int32)0x80000000; - + sal_Int16 nMapMode = MM_ANISOTROPIC; sal_uInt16 nFunction; sal_uInt32 nRSize; sal_uInt32 nPos = pStm->Tell(); sal_uInt32 nEnd = pStm->Seek( STREAM_SEEK_TO_END ); - + pStm->Seek( nPos ); if( nEnd - nPos ) @@ -1252,7 +1252,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt *pStm >> nHeight >> nWidth; rPlaceableBound.SetSize( Size( nWidth, nHeight ) ); } - break; + break; case W_META_SETMAPMODE : *pStm >> nMapMode; @@ -1298,7 +1298,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt case W_META_POLYPOLYGON: { - USHORT i, nPoly, nPoints = 0; + USHORT i, nPoly, nPoints = 0; *pStm >> nPoly; for( i = 0; i < nPoly; i++ ) { @@ -1342,10 +1342,10 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt case W_META_EXTTEXTOUT: { - sal_uInt16 nLen, nOptions; - sal_Int32 nRecordPos, nRecordSize; - Point aPosition; - Rectangle aRect; + sal_uInt16 nLen, nOptions; + sal_Int32 nRecordPos, nRecordSize; + Point aPosition; + Rectangle aRect; pStm->SeekRel(-6); nRecordPos = pStm->Tell(); @@ -1370,7 +1370,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt if( nFunction == W_META_STRETCHDIB ) *pStm >> nUsage; - + // nSye and nSxe is the number of pixels that has to been used if( nFunction == W_META_STRETCHDIB || nFunction == W_META_STRETCHBLT || nFunction == W_META_DIBSTRETCHBLT ) *pStm >> nSye >> nSxe; @@ -1383,11 +1383,11 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt if( nFunction == W_META_STRETCHDIB || nFunction == W_META_DIBBITBLT || nFunction == W_META_DIBSTRETCHBLT ) { if ( nWinROP == PATCOPY ) - *pStm >> nUsage; // i don't know anything of this parameter, so its called nUsage + *pStm >> nUsage; // i don't know anything of this parameter, so its called nUsage // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), FALSE ); Size aDestSize( ReadYXExt() ); - if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps + if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps { Rectangle aDestRect( ReadYX(), aDestSize ); GetWinExtMax( aDestRect, rPlaceableBound, nMapMode ); diff --git a/svtools/source/filter.vcl/wmf/wmf.cxx b/svtools/source/filter.vcl/wmf/wmf.cxx index 035eaf9e5225..095cbfd8ec08 100644 --- a/svtools/source/filter.vcl/wmf/wmf.cxx +++ b/svtools/source/filter.vcl/wmf/wmf.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/svtools/source/filter.vcl/wmf/wmfwr.cxx b/svtools/source/filter.vcl/wmf/wmfwr.cxx index b1d08c091be8..fd8fefdda821 100644 --- a/svtools/source/filter.vcl/wmf/wmfwr.cxx +++ b/svtools/source/filter.vcl/wmf/wmfwr.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ #include <rtl/tencinfo.h> #include <tools/tenccvt.hxx> #include <osl/endian.h> -#include <i18nutil/unicode.hxx> //unicode::getUnicodeScriptType +#include <i18nutil/unicode.hxx> //unicode::getUnicodeScriptType #include <vcl/metric.hxx> #include <basegfx/polygon/b2dpolygon.hxx> @@ -189,17 +189,17 @@ #define W_CHINESEBIG5_CHARSET 136 #define W_OEM_CHARSET 255 /*WINVER >= 0x0400*/ -#define W_JOHAB_CHARSET 130 -#define W_HEBREW_CHARSET 177 -#define W_ARABIC_CHARSET 178 -#define W_GREEK_CHARSET 161 -#define W_TURKISH_CHARSET 162 +#define W_JOHAB_CHARSET 130 +#define W_HEBREW_CHARSET 177 +#define W_ARABIC_CHARSET 178 +#define W_GREEK_CHARSET 161 +#define W_TURKISH_CHARSET 162 #define W_VIETNAMESE_CHARSET 163 -#define W_THAI_CHARSET 222 +#define W_THAI_CHARSET 222 #define W_EASTEUROPE_CHARSET 238 #define W_RUSSIAN_CHARSET 204 #define W_MAC_CHARSET 77 -#define W_BALTIC_CHARSET 186 +#define W_BALTIC_CHARSET 186 #define W_DEFAULT_PITCH 0x00 #define W_FIXED_PITCH 0x01 @@ -242,9 +242,9 @@ #define W_HS_CROSS 4 #define W_HS_DIAGCROSS 5 -#define W_MFCOMMENT 15 +#define W_MFCOMMENT 15 -#define PRIVATE_ESCAPE_UNICODE 2 +#define PRIVATE_ESCAPE_UNICODE 2 /// copied from writerwordglue.cxx @@ -458,8 +458,8 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont) if (rFont.GetUnderline()==UNDERLINE_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1; if (rFont.GetStrikeout()==STRIKEOUT_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1; - CharSet eFontNameEncoding = rFont.GetCharSet(); - sal_uInt8 nCharSet = rtl_getBestWindowsCharsetFromTextEncoding( eFontNameEncoding ); + CharSet eFontNameEncoding = rFont.GetCharSet(); + sal_uInt8 nCharSet = rtl_getBestWindowsCharsetFromTextEncoding( eFontNameEncoding ); if ( eFontNameEncoding == RTL_TEXTENCODING_SYMBOL ) eFontNameEncoding = RTL_TEXTENCODING_MS_1252; if ( nCharSet == 1 ) @@ -560,14 +560,14 @@ void WMFWriter::WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_In WriteRecordHeader( 3 + 9 + ( ( nLen + 1 ) >> 1 ), W_META_ESCAPE ); *pWMF << (sal_uInt16)W_MFCOMMENT - << (sal_uInt16)( nLen + 14 ) // we will always have a fourteen byte escape header: - << (sal_uInt16)0x4f4f // OO - << (sal_uInt32)0xa2c2a // evil magic number - << (sal_uInt32)nCheckSum // crc32 checksum about nEsc & pData - << (sal_uInt32)nEsc; // escape number + << (sal_uInt16)( nLen + 14 ) // we will always have a fourteen byte escape header: + << (sal_uInt16)0x4f4f // OO + << (sal_uInt32)0xa2c2a // evil magic number + << (sal_uInt32)nCheckSum // crc32 checksum about nEsc & pData + << (sal_uInt32)nEsc; // escape number pWMF->Write( pData, nLen ); if ( nLen & 1 ) - *pWMF << (sal_uInt8)0; // pad byte + *pWMF << (sal_uInt8)0; // pad byte } /* if return value is true, then a complete unicode string and also a polygon replacement has been written, @@ -581,49 +581,49 @@ sal_Bool WMFWriter::WMFRecord_Escape_Unicode( const Point& rPoint, const String& if ( nStringLen ) { // first we will check if a comment is necessary - if ( aSrcFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL ) // symbol is always byte character, so there is no unicode loss + if ( aSrcFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL ) // symbol is always byte character, so there is no unicode loss { const sal_Unicode* pBuf = rUniStr.GetBuffer(); const rtl_TextEncoding aTextEncodingOrg = aSrcFont.GetCharSet(); ByteString aByteStr( rUniStr, aTextEncodingOrg ); - String aUniStr2( aByteStr, aTextEncodingOrg ); - const sal_Unicode* pConversion = aUniStr2.GetBuffer(); // this is the unicode array after bytestring <-> unistring conversion + String aUniStr2( aByteStr, aTextEncodingOrg ); + const sal_Unicode* pConversion = aUniStr2.GetBuffer(); // this is the unicode array after bytestring <-> unistring conversion for ( i = 0; i < nStringLen; i++ ) { if ( *pBuf++ != *pConversion++ ) break; } - if ( i != nStringLen ) // after conversion the characters are not original, - { // try again, with determining a better charset from unicode char + if ( i != nStringLen ) // after conversion the characters are not original, + { // try again, with determining a better charset from unicode char pBuf = rUniStr.GetBuffer(); const sal_Unicode* pCheckChar = pBuf; - rtl_TextEncoding aTextEncoding = getScriptClass (*pCheckChar); // try the first character + rtl_TextEncoding aTextEncoding = getScriptClass (*pCheckChar); // try the first character for ( i = 1; i < nStringLen; i++) { if (aTextEncoding != aTextEncodingOrg) // found something break; pCheckChar++; - aTextEncoding = getScriptClass (*pCheckChar); // try the next character + aTextEncoding = getScriptClass (*pCheckChar); // try the next character } aByteStr = ByteString ( rUniStr, aTextEncoding ); aUniStr2 = String ( aByteStr, aTextEncoding ); - pConversion = aUniStr2.GetBuffer(); // this is the unicode array after bytestring <-> unistring conversion + pConversion = aUniStr2.GetBuffer(); // this is the unicode array after bytestring <-> unistring conversion for ( i = 0; i < nStringLen; i++ ) { if ( *pBuf++ != *pConversion++ ) break; } - if (i == nStringLen) + if (i == nStringLen) { aSrcFont.SetCharSet (aTextEncoding); SetAllAttr(); } } - if ( ( i != nStringLen ) || IsStarSymbol( aSrcFont.GetName() ) ) // after conversion the characters are not original, so we - { // will store the unicode string and a polypoly replacement + if ( ( i != nStringLen ) || IsStarSymbol( aSrcFont.GetName() ) ) // after conversion the characters are not original, so we + { // will store the unicode string and a polypoly replacement Color aOldFillColor( aSrcFillColor ); Color aOldLineColor( aSrcLineColor ); aSrcLineInfo = LineInfo(); @@ -686,7 +686,7 @@ void WMFWriter::WMFRecord_ExtTextOut( const Point & rPoint, TrueExtTextOut(rPoint,rString,aByteString,pDXAry); } -void WMFWriter::TrueExtTextOut( const Point & rPoint, const String & rString, +void WMFWriter::TrueExtTextOut( const Point & rPoint, const String & rString, const ByteString & rByteString, const sal_Int32 * pDXAry ) { WriteRecordHeader( 0, W_META_EXTTEXTOUT ); @@ -1179,8 +1179,8 @@ void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx: void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) { - ULONG nA, nACount; - MetaAction* pMA; + ULONG nA, nACount; + MetaAction* pMA; if( bStatus ) { @@ -1205,8 +1205,8 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case META_POINT_ACTION: { - const MetaPointAction* pA = (const MetaPointAction*) pMA; - const Point& rPt = pA->GetPoint(); + const MetaPointAction* pA = (const MetaPointAction*) pMA; + const Point& rPt = pA->GetPoint(); aSrcLineInfo = LineInfo(); SetLineAndFillAttr(); WMFRecord_MoveTo( rPt); @@ -1293,7 +1293,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case META_POLYLINE_ACTION: { const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pMA; - const Polygon& rPoly = pA->GetPolygon(); + const Polygon& rPoly = pA->GetPolygon(); if( rPoly.GetSize() ) { @@ -1357,7 +1357,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case META_TEXTARRAY_ACTION: { const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pMA; - + String aTemp( pA->GetText(), pA->GetIndex(), pA->GetLen() ); aSrcLineInfo = LineInfo(); SetAllAttr(); @@ -1406,8 +1406,8 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case META_BMPSCALEPART_ACTION: { - const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pMA; - Bitmap aTmp( pA->GetBitmap() ); + const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pMA; + Bitmap aTmp( pA->GetBitmap() ); if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) ) WMFRecord_StretchDIB( pA->GetDestPoint(), pA->GetDestSize(), aTmp ); @@ -1416,9 +1416,9 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case META_BMPEX_ACTION: { - const MetaBmpExAction* pA = (const MetaBmpExAction *) pMA; - Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); - Bitmap aMsk( pA->GetBitmapEx().GetMask() ); + const MetaBmpExAction* pA = (const MetaBmpExAction *) pMA; + Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); + Bitmap aMsk( pA->GetBitmapEx().GetMask() ); if( !!aMsk ) { @@ -1434,9 +1434,9 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case META_BMPEXSCALE_ACTION: { - const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pMA; - Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); - Bitmap aMsk( pA->GetBitmapEx().GetMask() ); + const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pMA; + Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); + Bitmap aMsk( pA->GetBitmapEx().GetMask() ); if( !!aMsk ) { @@ -1452,11 +1452,11 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case META_BMPEXSCALEPART_ACTION: { - const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pMA; - BitmapEx aBmpEx( pA->GetBitmapEx() ); + const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pMA; + BitmapEx aBmpEx( pA->GetBitmapEx() ); aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); - Bitmap aBmp( aBmpEx.GetBitmap() ); - Bitmap aMsk( aBmpEx.GetMask() ); + Bitmap aBmp( aBmpEx.GetBitmap() ); + Bitmap aMsk( aBmpEx.GetMask() ); if( !!aMsk ) { @@ -1472,8 +1472,8 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case META_GRADIENT_ACTION: { - const MetaGradientAction* pA = (const MetaGradientAction*) pMA; - GDIMetaFile aTmpMtf; + const MetaGradientAction* pA = (const MetaGradientAction*) pMA; + GDIMetaFile aTmpMtf; pVirDev->AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf ); WriteRecords( aTmpMtf ); @@ -1482,8 +1482,8 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case META_HATCH_ACTION: { - const MetaHatchAction* pA = (const MetaHatchAction*) pMA; - GDIMetaFile aTmpMtf; + const MetaHatchAction* pA = (const MetaHatchAction*) pMA; + GDIMetaFile aTmpMtf; pVirDev->AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf ); WriteRecords( aTmpMtf ); @@ -1492,10 +1492,10 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case META_WALLPAPER_ACTION: { - const MetaWallpaperAction* pA = (const MetaWallpaperAction*) pMA; - const Color& rColor = pA->GetWallpaper().GetColor(); - const Color aOldLineColor( aSrcLineColor ); - const Color aOldFillColor( aSrcFillColor ); + const MetaWallpaperAction* pA = (const MetaWallpaperAction*) pMA; + const Color& rColor = pA->GetWallpaper().GetColor(); + const Color aOldLineColor( aSrcLineColor ); + const Color aOldFillColor( aSrcFillColor ); aSrcLineColor = rColor; aSrcFillColor = rColor; @@ -1729,15 +1729,15 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case META_FLOATTRANSPARENT_ACTION: { const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pMA; - - GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); - Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); - const Size aSrcSize( aTmpMtf.GetPrefSize() ); - const Point aDestPt( pA->GetPoint() ); - const Size aDestSize( pA->GetSize() ); - const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; - const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; - long nMoveX, nMoveY; + + GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); + Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); + const Size aSrcSize( aTmpMtf.GetPrefSize() ); + const Point aDestPt( pA->GetPoint() ); + const Size aDestSize( pA->GetSize() ); + const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; + const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; + long nMoveX, nMoveY; aSrcLineInfo = LineInfo(); SetAllAttr(); @@ -1815,9 +1815,9 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable ) { if( bPlaceable ) { - USHORT nCheckSum, nValue; - Size aSize( pVirDev->LogicToLogic(Size(1,1),MapMode(MAP_INCH), aTargetMapMode) ); - USHORT nUnitsPerInch = (USHORT) ( ( aSize.Width() + aSize.Height() ) >> 1 ); + USHORT nCheckSum, nValue; + Size aSize( pVirDev->LogicToLogic(Size(1,1),MapMode(MAP_INCH), aTargetMapMode) ); + USHORT nUnitsPerInch = (USHORT) ( ( aSize.Width() + aSize.Height() ) >> 1 ); nCheckSum=0; nValue=0xcdd7; nCheckSum^=nValue; *pWMF << nValue; @@ -1825,8 +1825,8 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable ) nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; - nValue=(USHORT) aTargetSize.Width(); nCheckSum^=nValue; *pWMF << nValue; - nValue=(USHORT) aTargetSize.Height(); nCheckSum^=nValue; *pWMF << nValue; + nValue=(USHORT) aTargetSize.Width(); nCheckSum^=nValue; *pWMF << nValue; + nValue=(USHORT) aTargetSize.Height(); nCheckSum^=nValue; *pWMF << nValue; nValue=nUnitsPerInch; nCheckSum^=nValue; *pWMF << nValue; nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue; @@ -1837,9 +1837,9 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable ) *pWMF << (sal_uInt16)0x0001 // Typ: Datei << (sal_uInt16)0x0009 // Headerlaenge in Worten << (sal_uInt16)0x0300 // Version als BCD-Zahl - << (sal_uInt32) 0x00000000 // Dateilaenge (ohne 1. Header), wird spaeter durch UpdateHeader() berichtigt + << (sal_uInt32) 0x00000000 // Dateilaenge (ohne 1. Header), wird spaeter durch UpdateHeader() berichtigt << (sal_uInt16)MAXOBJECTHANDLES // Maximalezahl der gleichzeitigen Objekte - << (sal_uInt32) 0x00000000 // Maximale Record-laenge, wird spaeter durch UpdateHeader() berichtigt + << (sal_uInt32) 0x00000000 // Maximale Record-laenge, wird spaeter durch UpdateHeader() berichtigt << (sal_uInt16)0x0000; // Reserved } @@ -1908,8 +1908,8 @@ BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, { aTargetMapMode = MapMode( MAP_INCH ); - const long nUnit = pVirDev->LogicToPixel( Size( 1, 1 ), aTargetMapMode ).Width(); - const Fraction aFrac( 1, nUnit ); + const long nUnit = pVirDev->LogicToPixel( Size( 1, 1 ), aTargetMapMode ).Width(); + const Fraction aFrac( 1, nUnit ); aTargetMapMode.SetScaleX( aFrac ); aTargetMapMode.SetScaleY( aFrac ); @@ -1987,7 +1987,7 @@ BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, if ( xStatusIndicator.is() ) xStatusIndicator->end(); - + return bStatus; } @@ -1996,8 +1996,8 @@ BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, USHORT WMFWriter::CalcSaveTargetMapMode(MapMode& rMapMode, const Size& rPrefSize) { - Fraction aDivFrac(2, 1); - USHORT nDivisor = 1; + Fraction aDivFrac(2, 1); + USHORT nDivisor = 1; Size aSize = pVirDev->LogicToLogic( rPrefSize, aSrcMapMode, rMapMode ); @@ -2023,7 +2023,7 @@ void WMFWriter::WriteEmbeddedEMF( const GDIMetaFile& rMTF ) { EMFWriter aEMFWriter; SvMemoryStream aStream; - + if( aEMFWriter.WriteEMF( rMTF, aStream ) ) { sal_Size nTotalSize = aStream.Tell(); @@ -2059,8 +2059,8 @@ void WMFWriter::WriteEmbeddedEMF( const GDIMetaFile& rMTF ) nCurSize = nRemainingSize; nRemainingSize = 0; } - WriteEMFRecord( aStream, - nCurSize, + WriteEMFRecord( aStream, + nCurSize, nRemainingSize, nTotalSize, nRecCounts, @@ -2069,18 +2069,18 @@ void WMFWriter::WriteEmbeddedEMF( const GDIMetaFile& rMTF ) } } } - + // ------------------------------------------------------------------------ void WMFWriter::WriteEMFRecord( SvMemoryStream& rStream, sal_uInt32 nCurSize, sal_uInt32 nRemainingSize, sal_uInt32 nTotalSize, sal_uInt32 nRecCounts, sal_uInt16 nCheckSum ) { // according to http://msdn.microsoft.com/en-us/library/dd366152%28PROT.13%29.aspx - WriteRecordHeader( 0, W_META_ESCAPE ); - *pWMF << (sal_uInt16)W_MFCOMMENT // same as META_ESCAPE_ENHANCED_METAFILE - << (sal_uInt16)( nCurSize + 34 ) // we will always have a 34 byte escape header: - << (sal_uInt32) 0x43464D57 // WMFC - << (sal_uInt32) 0x00000001 // Comment type + WriteRecordHeader( 0, W_META_ESCAPE ); + *pWMF << (sal_uInt16)W_MFCOMMENT // same as META_ESCAPE_ENHANCED_METAFILE + << (sal_uInt16)( nCurSize + 34 ) // we will always have a 34 byte escape header: + << (sal_uInt32) 0x43464D57 // WMFC + << (sal_uInt32) 0x00000001 // Comment type << (sal_uInt32) 0x00010000 // version << nCheckSum // check sum << (sal_uInt32) 0 // flags = 0 diff --git a/svtools/source/filter.vcl/wmf/wmfwr.hxx b/svtools/source/filter.vcl/wmf/wmfwr.hxx index 222550317784..9b001f687f70 100644 --- a/svtools/source/filter.vcl/wmf/wmfwr.hxx +++ b/svtools/source/filter.vcl/wmf/wmfwr.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,27 +70,27 @@ class WMFWriter { private: - BOOL bStatus; + BOOL bStatus; - ULONG nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde. - FilterConfigItem* pFilterConfigItem; + ULONG nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde. + FilterConfigItem* pFilterConfigItem; com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; - SvStream* pWMF; - VirtualDevice* pVirDev; + SvStream* pWMF; + VirtualDevice* pVirDev; StarSymbolToMSMultiFont *pConvert; - MapMode aTargetMapMode; - Size aTargetSize; - USHORT nTargetDivisor; + MapMode aTargetMapMode; + Size aTargetSize; + USHORT nTargetDivisor; ULONG nMetafileHeaderPos; sal_uInt32 nMaxRecordSize; // in Worten ULONG nActRecordPos; // Aktuelle Attribute im Quell-Metafile: - Color aSrcLineColor; - Color aSrcFillColor; + Color aSrcLineColor; + Color aSrcFillColor; Color aSrcTextColor; LineInfo aSrcLineInfo; RasterOp eSrcRasterOp; @@ -101,18 +101,18 @@ private: Region aSrcClipRegion; WMFWriterAttrStackMember * pAttrStack; - UINT32 eSrcHorTextAlign; + UINT32 eSrcHorTextAlign; // Aktuelle Attribute im Ziel-Metafile: - Color aDstLineColor; - Color aDstFillColor; + Color aDstLineColor; + Color aDstFillColor; Color aDstTextColor; LineInfo aDstLineInfo; RasterOp eDstROP2; FontAlign eDstTextAlign; Font aDstFont; - UINT32 eDstHorTextAlign; + UINT32 eDstHorTextAlign; BOOL bDstIsClipping; // ???: derzeit unberuecksichtigt Region aDstClipRegion; // ???: derzeit unberuecksichtigt @@ -168,7 +168,7 @@ private: sal_Bool WMFRecord_Escape_Unicode( const Point& rPoint, const String& rStr, const sal_Int32 * pDXAry ); void WMFRecord_ExtTextOut(const Point & rPoint, const String & rString, const sal_Int32 * pDXAry); - void TrueExtTextOut(const Point & rPoint, const String & rString, + void TrueExtTextOut(const Point & rPoint, const String & rString, const ByteString & rByteString, const sal_Int32 * pDXAry); void TrueTextOut(const Point & rPoint, const ByteString& rString); void WMFRecord_LineTo(const Point & rPoint); @@ -212,7 +212,7 @@ private: void UpdateHeader(); void WriteEmbeddedEMF( const GDIMetaFile& rMTF ); - void WriteEMFRecord( SvMemoryStream& rStream, sal_uInt32 nCurSize, + void WriteEMFRecord( SvMemoryStream& rStream, sal_uInt32 nCurSize, sal_uInt32 nRemainingSize, sal_uInt32 nTotalSize, sal_uInt32 nRecCounts, |