Kaydet (Commit) 7473e8a4 authored tarafından Noel Grandin's avatar Noel Grandin

convert vcl/graphicfilter.hxx from String to OUString

Change-Id: I41997c49e6332fc378a3173616112a3a26e336ae
üst 80ef151d
...@@ -168,7 +168,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, ...@@ -168,7 +168,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL,
::std::find( rFormats.begin(), ::std::find( rFormats.begin(),
rFormats.end(), rFormats.end(),
aDesc.GetImportFormatShortName( aDesc.GetImportFormatShortName(
aDesc.GetFileFormat() ).ToLowerAscii() ) aDesc.GetFileFormat() ).toAsciiLowerCase() )
!= rFormats.end() ) || != rFormats.end() ) ||
::std::find( rFormats.begin(), ::std::find( rFormats.begin(),
rFormats.end(), rFormats.end(),
......
...@@ -123,14 +123,14 @@ class VCL_DLLPUBLIC GraphicDescriptor ...@@ -123,14 +123,14 @@ class VCL_DLLPUBLIC GraphicDescriptor
{ {
SvStream* pFileStm; SvStream* pFileStm;
String aPathExt; OUString aPathExt;
Size aPixSize; Size aPixSize;
Size aLogSize; Size aLogSize;
sal_uInt16 nBitsPerPixel; sal_uInt16 nBitsPerPixel;
sal_uInt16 nPlanes; sal_uInt16 nPlanes;
sal_uInt16 nFormat; sal_uInt16 nFormat;
sal_Bool bCompressed; sal_Bool bCompressed;
sal_Bool bOwnStream; sal_Bool bOwnStream;
void ImpConstruct(); void ImpConstruct();
...@@ -177,7 +177,7 @@ public: ...@@ -177,7 +177,7 @@ public:
As some formats (Mtf's) do not have a unique header, it makes sense As some formats (Mtf's) do not have a unique header, it makes sense
to supply the file name (incl. ext.), so that the format can be to supply the file name (incl. ext.), so that the format can be
derived from the extension */ derived from the extension */
GraphicDescriptor( SvStream& rInStream, const String* pPath = NULL ); GraphicDescriptor( SvStream& rInStream, const OUString* pPath = NULL );
virtual ~GraphicDescriptor(); virtual ~GraphicDescriptor();
...@@ -206,7 +206,7 @@ public: ...@@ -206,7 +206,7 @@ public:
sal_Bool IsCompressed() const { return bCompressed; } sal_Bool IsCompressed() const { return bCompressed; }
/** @return filter number that is needed by the GraphFilter to read this format */ /** @return filter number that is needed by the GraphFilter to read this format */
static String GetImportFormatShortName( sal_uInt16 nFormat ); static OUString GetImportFormatShortName( sal_uInt16 nFormat );
}; };
/** Information about errors during the GraphicFilter operation. */ /** Information about errors during the GraphicFilter operation. */
...@@ -227,7 +227,7 @@ private: ...@@ -227,7 +227,7 @@ private:
void ImplInit(); void ImplInit();
sal_uLong ImplSetError( sal_uLong nError, const SvStream* pStm = NULL ); sal_uLong ImplSetError( sal_uLong nError, const SvStream* pStm = NULL );
sal_uInt16 ImpTestOrFindFormat( const String& rPath, SvStream& rStream, sal_uInt16& rFormat ); sal_uInt16 ImpTestOrFindFormat( const OUString& rPath, SvStream& rStream, sal_uInt16& rFormat );
DECL_LINK( FilterCallback, ConvertData* pData ); DECL_LINK( FilterCallback, ConvertData* pData );
...@@ -248,36 +248,36 @@ public: ...@@ -248,36 +248,36 @@ public:
void SetFilterPath( const OUString& rFilterPath ) { aFilterPath = rFilterPath; }; void SetFilterPath( const OUString& rFilterPath ) { aFilterPath = rFilterPath; };
sal_uInt16 GetImportFormatCount(); sal_uInt16 GetImportFormatCount();
sal_uInt16 GetImportFormatNumber( const String& rFormatName ); sal_uInt16 GetImportFormatNumber( const OUString& rFormatName );
sal_uInt16 GetImportFormatNumberForMediaType( const String& rMediaType ); sal_uInt16 GetImportFormatNumberForMediaType( const OUString& rMediaType );
sal_uInt16 GetImportFormatNumberForShortName( const String& rShortName ); sal_uInt16 GetImportFormatNumberForShortName( const OUString& rShortName );
sal_uInt16 GetImportFormatNumberForTypeName( const String& rType ); sal_uInt16 GetImportFormatNumberForTypeName( const OUString& rType );
String GetImportFormatName( sal_uInt16 nFormat ); OUString GetImportFormatName( sal_uInt16 nFormat );
String GetImportFormatTypeName( sal_uInt16 nFormat ); OUString GetImportFormatTypeName( sal_uInt16 nFormat );
String GetImportFormatMediaType( sal_uInt16 nFormat ); OUString GetImportFormatMediaType( sal_uInt16 nFormat );
String GetImportFormatShortName( sal_uInt16 nFormat ); OUString GetImportFormatShortName( sal_uInt16 nFormat );
String GetImportOSFileType( sal_uInt16 nFormat ); OUString GetImportOSFileType( sal_uInt16 nFormat );
String GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry = 0 ); OUString GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
sal_Bool IsImportPixelFormat( sal_uInt16 nFormat ); sal_Bool IsImportPixelFormat( sal_uInt16 nFormat );
sal_uInt16 GetExportFormatCount(); sal_uInt16 GetExportFormatCount();
sal_uInt16 GetExportFormatNumber( const String& rFormatName ); sal_uInt16 GetExportFormatNumber( const OUString& rFormatName );
sal_uInt16 GetExportFormatNumberForMediaType( const String& rShortName ); sal_uInt16 GetExportFormatNumberForMediaType( const OUString& rShortName );
sal_uInt16 GetExportFormatNumberForShortName( const String& rShortName ); sal_uInt16 GetExportFormatNumberForShortName( const OUString& rShortName );
String GetExportInternalFilterName( sal_uInt16 nFormat ); OUString GetExportInternalFilterName( sal_uInt16 nFormat );
sal_uInt16 GetExportFormatNumberForTypeName( const String& rType ); sal_uInt16 GetExportFormatNumberForTypeName( const OUString& rType );
String GetExportFormatName( sal_uInt16 nFormat ); OUString GetExportFormatName( sal_uInt16 nFormat );
String GetExportFormatTypeName( sal_uInt16 nFormat ); OUString GetExportFormatTypeName( sal_uInt16 nFormat );
String GetExportFormatMediaType( sal_uInt16 nFormat ); OUString GetExportFormatMediaType( sal_uInt16 nFormat );
String GetExportFormatShortName( sal_uInt16 nFormat ); OUString GetExportFormatShortName( sal_uInt16 nFormat );
String GetExportOSFileType( sal_uInt16 nFormat ); OUString GetExportOSFileType( sal_uInt16 nFormat );
String GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry = 0 ); OUString GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
sal_Bool IsExportPixelFormat( sal_uInt16 nFormat ); sal_Bool IsExportPixelFormat( sal_uInt16 nFormat );
sal_uInt16 ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath, sal_uInt16 ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath,
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW, sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL ); const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL );
sal_uInt16 ExportGraphic( const Graphic& rGraphic, const String& rPath, sal_uInt16 ExportGraphic( const Graphic& rGraphic, const OUString& rPath,
SvStream& rOStm, sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW, SvStream& rOStm, sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL ); const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL );
long GetExportGraphicHint() const { return nExpGraphHint; } long GetExportGraphicHint() const { return nExpGraphHint; }
...@@ -290,17 +290,17 @@ public: ...@@ -290,17 +290,17 @@ public:
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW, sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
sal_uInt16 * pDeterminedFormat = NULL, sal_uInt32 nImportFlags = 0 ); sal_uInt16 * pDeterminedFormat = NULL, sal_uInt32 nImportFlags = 0 );
sal_uInt16 CanImportGraphic( const String& rPath, SvStream& rStream, sal_uInt16 CanImportGraphic( const OUString& rPath, SvStream& rStream,
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW, sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
sal_uInt16 * pDeterminedFormat = NULL); sal_uInt16 * pDeterminedFormat = NULL);
sal_uInt16 ImportGraphic( Graphic& rGraphic, const String& rPath, sal_uInt16 ImportGraphic( Graphic& rGraphic, const OUString& rPath,
SvStream& rStream, SvStream& rStream,
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW, sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
sal_uInt16 * pDeterminedFormat = NULL, sal_uInt32 nImportFlags = 0, sal_uInt16 * pDeterminedFormat = NULL, sal_uInt32 nImportFlags = 0,
WMF_EXTERNALHEADER *pExtHeader = NULL ); WMF_EXTERNALHEADER *pExtHeader = NULL );
sal_uInt16 ImportGraphic( Graphic& rGraphic, const String& rPath, sal_uInt16 ImportGraphic( Graphic& rGraphic, const OUString& rPath,
SvStream& rStream, SvStream& rStream,
sal_uInt16 nFormat, sal_uInt16 nFormat,
sal_uInt16 * pDeterminedFormat, sal_uInt32 nImportFlags, sal_uInt16 * pDeterminedFormat, sal_uInt32 nImportFlags,
...@@ -314,7 +314,7 @@ public: ...@@ -314,7 +314,7 @@ public:
const Link GetFilterCallback() const; const Link GetFilterCallback() const;
static GraphicFilter& GetGraphicFilter(); static GraphicFilter& GetGraphicFilter();
static int LoadGraphic( const String& rPath, const String& rFilter, static int LoadGraphic( const OUString& rPath, const OUString& rFilter,
Graphic& rGraphic, Graphic& rGraphic,
GraphicFilter* pFilter = NULL, GraphicFilter* pFilter = NULL,
sal_uInt16* pDeterminedFormat = NULL ); sal_uInt16* pDeterminedFormat = NULL );
......
...@@ -377,7 +377,7 @@ OUString SAL_CALL SdFilterDetect::detect( Sequence< beans::PropertyValue >& lDes ...@@ -377,7 +377,7 @@ OUString SAL_CALL SdFilterDetect::detect( Sequence< beans::PropertyValue >& lDes
// vector graphic? // vector graphic?
pStm->Seek( STREAM_SEEK_TO_BEGIN ); pStm->Seek( STREAM_SEEK_TO_BEGIN );
const String aFileName( aMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ); const OUString aFileName( aMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
GraphicDescriptor aDesc( *pStm, &aFileName ); GraphicDescriptor aDesc( *pStm, &aFileName );
if( !aDesc.Detect( sal_False ) ) if( !aDesc.Detect( sal_False ) )
{ {
......
...@@ -108,7 +108,7 @@ void GraphicDescriptor::init( const uno::Reference< io::XInputStream >& rxIStm, ...@@ -108,7 +108,7 @@ void GraphicDescriptor::init( const uno::Reference< io::XInputStream >& rxIStm,
void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL ) void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL )
{ {
String aURL; OUString aURL;
if( pURL ) if( pURL )
aURL = *pURL; aURL = *pURL;
::GraphicDescriptor aDescriptor( rIStm, &aURL ); ::GraphicDescriptor aDescriptor( rIStm, &aURL );
......
...@@ -136,7 +136,7 @@ OUString GraphicHelper::ExportGraphic( const Graphic& rGraphic, const OUString& ...@@ -136,7 +136,7 @@ OUString GraphicHelper::ExportGraphic( const Graphic& rGraphic, const OUString&
// "wrong" extension? // "wrong" extension?
GetPreferedExtension( aExtension, rGraphic ); GetPreferedExtension( aExtension, rGraphic );
for ( sal_uInt16 i = 0; i < nCount; ++i ) for ( sal_uInt16 i = 0; i < nCount; ++i )
if ( aExtension == rGraphicFilter.GetExportFormatShortName( i ).ToLowerAscii() ) if ( aExtension == rGraphicFilter.GetExportFormatShortName( i ).toAsciiLowerCase() )
{ {
nDefaultFilter = i; nDefaultFilter = i;
break; break;
......
...@@ -236,7 +236,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, String& rFileName, ...@@ -236,7 +236,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, String& rFileName,
if( GRFILTER_FORMAT_NOTFOUND != nFilter ) if( GRFILTER_FORMAT_NOTFOUND != nFilter )
{ {
aExt = rFilter.GetExportFormatShortName( nFilter ).ToLowerAscii(); aExt = rFilter.GetExportFormatShortName( nFilter ).toAsciiLowerCase();
if( bWriteTransGrf ) if( bWriteTransGrf )
{ {
......
...@@ -37,7 +37,7 @@ GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) : ...@@ -37,7 +37,7 @@ GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) :
ImpConstruct(); ImpConstruct();
} }
GraphicDescriptor::GraphicDescriptor( SvStream& rInStream, const String* pPath) : GraphicDescriptor::GraphicDescriptor( SvStream& rInStream, const OUString* pPath) :
pFileStm ( &rInStream ), pFileStm ( &rInStream ),
bOwnStream ( sal_False ) bOwnStream ( sal_False )
{ {
...@@ -739,7 +739,7 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo ...@@ -739,7 +739,7 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo
sal_Bool GraphicDescriptor::ImpDetectXBM( SvStream&, sal_Bool ) sal_Bool GraphicDescriptor::ImpDetectXBM( SvStream&, sal_Bool )
{ {
sal_Bool bRet = aPathExt.CompareToAscii( "xbm", 3 ) == COMPARE_EQUAL; sal_Bool bRet = aPathExt.startsWith( "xbm" );
if (bRet) if (bRet)
nFormat = GFF_XBM; nFormat = GFF_XBM;
...@@ -748,7 +748,7 @@ sal_Bool GraphicDescriptor::ImpDetectXBM( SvStream&, sal_Bool ) ...@@ -748,7 +748,7 @@ sal_Bool GraphicDescriptor::ImpDetectXBM( SvStream&, sal_Bool )
sal_Bool GraphicDescriptor::ImpDetectXPM( SvStream&, sal_Bool ) sal_Bool GraphicDescriptor::ImpDetectXPM( SvStream&, sal_Bool )
{ {
sal_Bool bRet = aPathExt.CompareToAscii( "xpm", 3 ) == COMPARE_EQUAL; sal_Bool bRet = aPathExt.startsWith( "xpm" );
if (bRet) if (bRet)
nFormat = GFF_XPM; nFormat = GFF_XPM;
...@@ -760,7 +760,7 @@ sal_Bool GraphicDescriptor::ImpDetectPBM( SvStream& rStm, sal_Bool ) ...@@ -760,7 +760,7 @@ sal_Bool GraphicDescriptor::ImpDetectPBM( SvStream& rStm, sal_Bool )
sal_Bool bRet = sal_False; sal_Bool bRet = sal_False;
// check file extension first, as this trumps the 2 ID bytes // check file extension first, as this trumps the 2 ID bytes
if ( aPathExt.CompareToAscii( "pbm", 3 ) == COMPARE_EQUAL ) if ( aPathExt.startsWith( "pbm" ) )
bRet = sal_True; bRet = sal_True;
else else
{ {
...@@ -782,7 +782,7 @@ sal_Bool GraphicDescriptor::ImpDetectPGM( SvStream& rStm, sal_Bool ) ...@@ -782,7 +782,7 @@ sal_Bool GraphicDescriptor::ImpDetectPGM( SvStream& rStm, sal_Bool )
{ {
sal_Bool bRet = sal_False; sal_Bool bRet = sal_False;
if ( aPathExt.CompareToAscii( "pgm", 3 ) == COMPARE_EQUAL ) if ( aPathExt.startsWith( "pgm" ) )
bRet = sal_True; bRet = sal_True;
else else
{ {
...@@ -804,7 +804,7 @@ sal_Bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, sal_Bool ) ...@@ -804,7 +804,7 @@ sal_Bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, sal_Bool )
{ {
sal_Bool bRet = sal_False; sal_Bool bRet = sal_False;
if ( aPathExt.CompareToAscii( "ppm", 3 ) == COMPARE_EQUAL ) if ( aPathExt.startsWith( "ppm" ) )
bRet = sal_True; bRet = sal_True;
else else
{ {
...@@ -840,7 +840,7 @@ sal_Bool GraphicDescriptor::ImpDetectRAS( SvStream& rStm, sal_Bool ) ...@@ -840,7 +840,7 @@ sal_Bool GraphicDescriptor::ImpDetectRAS( SvStream& rStm, sal_Bool )
sal_Bool GraphicDescriptor::ImpDetectTGA( SvStream&, sal_Bool ) sal_Bool GraphicDescriptor::ImpDetectTGA( SvStream&, sal_Bool )
{ {
sal_Bool bRet = aPathExt.CompareToAscii( "tga", 3 ) == COMPARE_EQUAL; sal_Bool bRet = aPathExt.startsWith( "tga" );
if (bRet) if (bRet)
nFormat = GFF_TGA; nFormat = GFF_TGA;
...@@ -914,7 +914,7 @@ sal_Bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, sal_Bool ) ...@@ -914,7 +914,7 @@ sal_Bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, sal_Bool )
rStm.SeekRel( -4 ); rStm.SeekRel( -4 );
rStm.Read( &nFirstBytes, 20 ); rStm.Read( &nFirstBytes, 20 );
if ( ( nFirstLong == 0xC5D0D3C6 ) || ( aPathExt.CompareToAscii( "eps", 3 ) == COMPARE_EQUAL ) || if ( ( nFirstLong == 0xC5D0D3C6 ) || aPathExt.startsWith( "eps" ) ||
( ImplSearchEntry( nFirstBytes, (sal_uInt8*)"%!PS-Adobe", 10, 10 ) ( ImplSearchEntry( nFirstBytes, (sal_uInt8*)"%!PS-Adobe", 10, 10 )
&& ImplSearchEntry( &nFirstBytes[15], (sal_uInt8*)"EPS", 3, 3 ) ) ) && ImplSearchEntry( &nFirstBytes[15], (sal_uInt8*)"EPS", 3, 3 ) ) )
{ {
...@@ -927,7 +927,7 @@ sal_Bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, sal_Bool ) ...@@ -927,7 +927,7 @@ sal_Bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, sal_Bool )
sal_Bool GraphicDescriptor::ImpDetectDXF( SvStream&, sal_Bool ) sal_Bool GraphicDescriptor::ImpDetectDXF( SvStream&, sal_Bool )
{ {
sal_Bool bRet = aPathExt.CompareToAscii( "dxf", 3 ) == COMPARE_EQUAL; sal_Bool bRet = aPathExt.startsWith( "dxf" );
if (bRet) if (bRet)
nFormat = GFF_DXF; nFormat = GFF_DXF;
...@@ -936,7 +936,7 @@ sal_Bool GraphicDescriptor::ImpDetectDXF( SvStream&, sal_Bool ) ...@@ -936,7 +936,7 @@ sal_Bool GraphicDescriptor::ImpDetectDXF( SvStream&, sal_Bool )
sal_Bool GraphicDescriptor::ImpDetectMET( SvStream&, sal_Bool ) sal_Bool GraphicDescriptor::ImpDetectMET( SvStream&, sal_Bool )
{ {
sal_Bool bRet = aPathExt.CompareToAscii( "met", 3 ) == COMPARE_EQUAL; sal_Bool bRet = aPathExt.startsWith( "met" );
if (bRet) if (bRet)
nFormat = GFF_MET; nFormat = GFF_MET;
...@@ -947,7 +947,7 @@ extern bool isPCT(SvStream& rStream, sal_uLong nStreamPos, sal_uLong nStreamLen) ...@@ -947,7 +947,7 @@ extern bool isPCT(SvStream& rStream, sal_uLong nStreamPos, sal_uLong nStreamLen)
sal_Bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, sal_Bool ) sal_Bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, sal_Bool )
{ {
sal_Bool bRet = aPathExt.CompareToAscii( "pct", 3 ) == COMPARE_EQUAL; sal_Bool bRet = aPathExt.startsWith( "pct" );
if (bRet) if (bRet)
nFormat = GFF_PCT; nFormat = GFF_PCT;
else else
...@@ -968,7 +968,7 @@ sal_Bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, sal_Bool ) ...@@ -968,7 +968,7 @@ sal_Bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, sal_Bool )
sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool ) sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool )
{ {
sal_Bool bRet = sal_False; sal_Bool bRet = sal_False;
if( aPathExt.CompareToAscii( "sgf", 3 ) == COMPARE_EQUAL ) if( aPathExt.startsWith( "sgf" ) )
bRet = sal_True; bRet = sal_True;
else else
{ {
...@@ -992,7 +992,7 @@ sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool ) ...@@ -992,7 +992,7 @@ sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool )
sal_Bool GraphicDescriptor::ImpDetectSGV( SvStream&, sal_Bool ) sal_Bool GraphicDescriptor::ImpDetectSGV( SvStream&, sal_Bool )
{ {
sal_Bool bRet = aPathExt.CompareToAscii( "sgv", 3 ) == COMPARE_EQUAL; sal_Bool bRet = aPathExt.startsWith( "sgv" );
if (bRet) if (bRet)
nFormat = GFF_SGV; nFormat = GFF_SGV;
...@@ -1078,7 +1078,7 @@ sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo ...@@ -1078,7 +1078,7 @@ sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo
sal_Bool GraphicDescriptor::ImpDetectWMF( SvStream&, sal_Bool ) sal_Bool GraphicDescriptor::ImpDetectWMF( SvStream&, sal_Bool )
{ {
sal_Bool bRet = aPathExt.CompareToAscii( "wmf",3 ) == COMPARE_EQUAL; sal_Bool bRet = aPathExt.startsWith( "wmf" );
if (bRet) if (bRet)
nFormat = GFF_WMF; nFormat = GFF_WMF;
...@@ -1087,7 +1087,7 @@ sal_Bool GraphicDescriptor::ImpDetectWMF( SvStream&, sal_Bool ) ...@@ -1087,7 +1087,7 @@ sal_Bool GraphicDescriptor::ImpDetectWMF( SvStream&, sal_Bool )
sal_Bool GraphicDescriptor::ImpDetectEMF( SvStream&, sal_Bool ) sal_Bool GraphicDescriptor::ImpDetectEMF( SvStream&, sal_Bool )
{ {
sal_Bool bRet = aPathExt.CompareToAscii( "emf", 3 ) == COMPARE_EQUAL; sal_Bool bRet = aPathExt.startsWith( "emf" );
if (bRet) if (bRet)
nFormat = GFF_EMF; nFormat = GFF_EMF;
...@@ -1096,14 +1096,14 @@ sal_Bool GraphicDescriptor::ImpDetectEMF( SvStream&, sal_Bool ) ...@@ -1096,14 +1096,14 @@ sal_Bool GraphicDescriptor::ImpDetectEMF( SvStream&, sal_Bool )
sal_Bool GraphicDescriptor::ImpDetectSVG( SvStream& /*rStm*/, sal_Bool /*bExtendedInfo*/ ) sal_Bool GraphicDescriptor::ImpDetectSVG( SvStream& /*rStm*/, sal_Bool /*bExtendedInfo*/ )
{ {
sal_Bool bRet = aPathExt.CompareToAscii( "svg", 3 ) == COMPARE_EQUAL; sal_Bool bRet = aPathExt.startsWith( "svg" );
if (bRet) if (bRet)
nFormat = GFF_SVG; nFormat = GFF_SVG;
return bRet; return bRet;
} }
String GraphicDescriptor::GetImportFormatShortName( sal_uInt16 nFormat ) OUString GraphicDescriptor::GetImportFormatShortName( sal_uInt16 nFormat )
{ {
const char *pKeyName = 0; const char *pKeyName = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment