diff options
author | Korrawit Pruegsanusak <detective.conan.1412@gmail.com> | 2012-07-08 17:16:27 +0700 |
---|---|---|
committer | Korrawit Pruegsanusak <detective.conan.1412@gmail.com> | 2012-07-10 21:05:50 +0700 |
commit | 7119c94f78f8160ee502fc4277bdaaf0b5ddf138 (patch) | |
tree | 0b284d08c23979aca171ace77446135678ba1d82 | |
parent | 1d1a6411d69f300a864012e6b07ccf27551ff561 (diff) |
fdo#51179: SearchAscii() is equal to indexOf(), not match()
regression from 8adec08d56a9ad46d3550e43b115e916c4cf783f
Change-Id: Ic1c3160be1c61162f6a62a7e14c4efb7bedccdcc
-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(); |