diff options
author | Korrawit Pruegsanusak <detective.conan.1412@gmail.com> | 2012-07-08 17:16:27 +0700 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2012-07-10 14:42:16 +0200 |
commit | 8089502118d3fe53007e95ff2ca87077c1fb3eab (patch) | |
tree | 2e02fc938ccc467c6032fe1a379f971287cf8393 /sd | |
parent | 87577cac4b7f54552296c090651787afac65669b (diff) |
fdo#51179: SearchAscii() is equal to indexOf(), not match()
regression from 8adec08d56a9ad46d3550e43b115e916c4cf783f
Change-Id: Ic1c3160be1c61162f6a62a7e14c4efb7bedccdcc
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 5b0d4c5893ac..df97c37d550e 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -469,7 +469,8 @@ sal_Bool DrawDocShell::ConvertFrom( SfxMedium& rMedium ) mpDoc->StopWorkStartupDelay(); bRet = SdPPTFilter( rMedium, *this, sal_True ).Import(); } - else if (aFilterName.match("impress8" ) || aFilterName.match("draw8")) + else if (aFilterName.indexOf("impress8") >= 0 || + aFilterName.indexOf("draw8") >= 0) { // TODO/LATER: nobody is interested in the error code?! mpDoc->CreateFirstPages(); @@ -478,7 +479,8 @@ sal_Bool DrawDocShell::ConvertFrom( SfxMedium& rMedium ) bRet = SdXMLFilter( rMedium, *this, sal_True ).Import( nError ); } - else if (aFilterName.match("StarOffice XML (Draw)") || aFilterName.match("StarOffice XML (Impress)")) + else if (aFilterName.indexOf("StarOffice XML (Draw)") >= 0 || + aFilterName.indexOf("StarOffice XML (Impress)") >= 0) { // TODO/LATER: nobody is interested in the error code?! mpDoc->CreateFirstPages(); @@ -595,25 +597,27 @@ sal_Bool DrawDocShell::ConvertTo( SfxMedium& rMedium ) const rtl::OUString aTypeName( pMediumFilter->GetTypeName() ); SdFilter* pFilter = NULL; - if( aTypeName.match( "graphic_HTML" ) ) + if( aTypeName.indexOf( "graphic_HTML" ) >= 0 ) { pFilter = new SdHTMLFilter( rMedium, *this, sal_True ); } - else if( aTypeName.match( "MS_PowerPoint_97" ) ) + else if( aTypeName.indexOf( "MS_PowerPoint_97" ) >= 0 ) { pFilter = new SdPPTFilter( rMedium, *this, sal_True ); ((SdPPTFilter*)pFilter)->PreSaveBasic(); } - else if ( aTypeName.match( "CGM_Computer_Graphics_Metafile" ) ) + else if ( aTypeName.indexOf( "CGM_Computer_Graphics_Metafile" ) >= 0 ) { pFilter = new SdCGMFilter( rMedium, *this, sal_True ); } - else if( aTypeName.match( "draw8" ) || aTypeName.match( "impress8" ) ) + else if( aTypeName.indexOf( "draw8" ) >= 0 || + aTypeName.indexOf( "impress8" ) >= 0 ) { pFilter = new SdXMLFilter( rMedium, *this, sal_True ); UpdateDocInfoForSave(); } - else if( aTypeName.match( "StarOffice_XML_Impress" ) || aTypeName.match( "StarOffice_XML_Draw" ) ) + else if( aTypeName.indexOf( "StarOffice_XML_Impress" ) >= 0 || + aTypeName.indexOf( "StarOffice_XML_Draw" ) >= 0 ) { pFilter = new SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60 ); UpdateDocInfoForSave(); |