Kaydet (Commit) 8adec08d authored tarafından Olivier Hallot's avatar Olivier Hallot

More RTL_CONSTASCII conversions

üst 640d0064
......@@ -30,24 +30,24 @@
#define _SD_STRMNAME_H
// Alter Name des Dokument-Streams
static const String pStarDrawDoc( RTL_CONSTASCII_USTRINGPARAM( "StarDrawDocument" ));
static const rtl::OUString pStarDrawDoc("StarDrawDocument");
// Name des Dokument-Streams
static const String pStarDrawDoc3( RTL_CONSTASCII_USTRINGPARAM( "StarDrawDocument3" ));
static const rtl::OUString pStarDrawDoc3( "StarDrawDocument3" );
// Sonstige
static const String pSfxStyleSheets( RTL_CONSTASCII_USTRINGPARAM( "SfxStyleSheets" ));
static const String pVCItemPoolName( RTL_CONSTASCII_USTRINGPARAM( "VCPool" ));
static const String pPreviewName( RTL_CONSTASCII_USTRINGPARAM( "StarDrawTemplatePreview" ));
static const rtl::OUString pSfxStyleSheets( "SfxStyleSheets" );
static const rtl::OUString pVCItemPoolName( "VCPool" );
static const rtl::OUString pPreviewName( "StarDrawTemplatePreview" );
// PowerPoint-Filter
static const String pFilterPowerPoint97( RTL_CONSTASCII_USTRINGPARAM( "MS PowerPoint 97" ));
static const String pFilterPowerPoint97Template( RTL_CONSTASCII_USTRINGPARAM( "MS PowerPoint 97 Vorlage" ));
static const String pFilterPowerPoint97AutoPlay( RTL_CONSTASCII_USTRINGPARAM( "MS PowerPoint 97 AutoPlay" ));
static const rtl::OUString pFilterPowerPoint97( "MS PowerPoint 97" );
static const rtl::OUString pFilterPowerPoint97Template( "MS PowerPoint 97 Vorlage" );
static const rtl::OUString pFilterPowerPoint97AutoPlay( "MS PowerPoint 97 AutoPlay" );
// XML content stream
static const String pStarDrawXMLContent( RTL_CONSTASCII_USTRINGPARAM( "content.xml" ));
static const String pStarDrawOldXMLContent( RTL_CONSTASCII_USTRINGPARAM( "Content.xml" ));
static const rtl::OUString pStarDrawXMLContent( "content.xml" );
static const rtl::OUString pStarDrawOldXMLContent( "Content.xml" );
#endif // _SD_STRMNAME_H
......
......@@ -440,7 +440,7 @@ sal_Bool DrawDocShell::ConvertFrom( SfxMedium& rMedium )
{
mbNewDocument = sal_False;
const String aFilterName( rMedium.GetFilter()->GetFilterName() );
const rtl::OUString aFilterName( rMedium.GetFilter()->GetFilterName() );
sal_Bool bRet = sal_False;
bool bStartPresentation = false;
......@@ -469,8 +469,7 @@ sal_Bool DrawDocShell::ConvertFrom( SfxMedium& rMedium )
mpDoc->StopWorkStartupDelay();
bRet = SdPPTFilter( rMedium, *this, sal_True ).Import();
}
else if (aFilterName.SearchAscii("impress8" ) != STRING_NOTFOUND ||
aFilterName.SearchAscii("draw8") != STRING_NOTFOUND )
else if (aFilterName.match("impress8" ) || aFilterName.match("draw8"))
{
// TODO/LATER: nobody is interested in the error code?!
mpDoc->CreateFirstPages();
......@@ -479,7 +478,7 @@ sal_Bool DrawDocShell::ConvertFrom( SfxMedium& rMedium )
bRet = SdXMLFilter( rMedium, *this, sal_True ).Import( nError );
}
else if (aFilterName.SearchAscii("StarOffice XML (Draw)" ) != STRING_NOTFOUND || aFilterName.SearchAscii("StarOffice XML (Impress)") != STRING_NOTFOUND )
else if (aFilterName.match("StarOffice XML (Draw)") || aFilterName.match("StarOffice XML (Impress)"))
{
// TODO/LATER: nobody is interested in the error code?!
mpDoc->CreateFirstPages();
......@@ -487,7 +486,7 @@ sal_Bool DrawDocShell::ConvertFrom( SfxMedium& rMedium )
ErrCode nError = ERRCODE_NONE;
bRet = SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60 ).Import( nError );
}
else if( aFilterName.EqualsAscii( "CGM - Computer Graphics Metafile" ) )
else if( aFilterName.equals( "CGM - Computer Graphics Metafile" ) )
{
mpDoc->CreateFirstPages();
mpDoc->StopWorkStartupDelay();
......@@ -593,30 +592,28 @@ sal_Bool DrawDocShell::ConvertTo( SfxMedium& rMedium )
if( mpDoc->GetPageCount() )
{
const SfxFilter* pMediumFilter = rMedium.GetFilter();
const String aTypeName( pMediumFilter->GetTypeName() );
const rtl::OUString aTypeName( pMediumFilter->GetTypeName() );
SdFilter* pFilter = NULL;
if( aTypeName.SearchAscii( "graphic_HTML" ) != STRING_NOTFOUND )
if( aTypeName.match( "graphic_HTML" ) )
{
pFilter = new SdHTMLFilter( rMedium, *this, sal_True );
}
else if( aTypeName.SearchAscii( "MS_PowerPoint_97" ) != STRING_NOTFOUND )
else if( aTypeName.match( "MS_PowerPoint_97" ) )
{
pFilter = new SdPPTFilter( rMedium, *this, sal_True );
((SdPPTFilter*)pFilter)->PreSaveBasic();
}
else if ( aTypeName.SearchAscii( "CGM_Computer_Graphics_Metafile" ) != STRING_NOTFOUND )
else if ( aTypeName.match( "CGM_Computer_Graphics_Metafile" ) )
{
pFilter = new SdCGMFilter( rMedium, *this, sal_True );
}
else if( ( aTypeName.SearchAscii( "draw8" ) != STRING_NOTFOUND ) ||
( aTypeName.SearchAscii( "impress8" ) != STRING_NOTFOUND ) )
else if( aTypeName.match( "draw8" ) || aTypeName.match( "impress8" ) )
{
pFilter = new SdXMLFilter( rMedium, *this, sal_True );
UpdateDocInfoForSave();
}
else if( ( aTypeName.SearchAscii( "StarOffice_XML_Impress" ) != STRING_NOTFOUND ) ||
( aTypeName.SearchAscii( "StarOffice_XML_Draw" ) != STRING_NOTFOUND ) )
else if( aTypeName.match( "StarOffice_XML_Impress" ) || aTypeName.match( "StarOffice_XML_Draw" ) )
{
pFilter = new SdXMLFilter( rMedium, *this, sal_True, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60 );
UpdateDocInfoForSave();
......
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