OUString conversion in sd in sdmod.hxx

Change-Id: I113289d6dc80669843fbbc49896760d6c47d7ef1
Reviewed-on: https://gerrit.libreoffice.org/5307
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
This commit is contained in:
MÁTÉ Gergely
2013-08-07 18:10:08 +02:00
committed by Miklos Vajna
parent 52f79304a6
commit c58f859ee6
3 changed files with 10 additions and 9 deletions

View File

@@ -94,7 +94,7 @@ public:
void GetState(SfxItemSet&);
SdOptions* GetSdOptions(DocumentType eDocType);
SD_DLLPUBLIC SvStorageStreamRef GetOptionStream( const String& rOptionName, SdOptionStreamMode eMode );
SD_DLLPUBLIC SvStorageStreamRef GetOptionStream( const OUString& rOptionName, SdOptionStreamMode eMode );
sal_Bool GetWaterCan() const { return bWaterCan; }
void SetWaterCan( sal_Bool bWC ) { bWaterCan = bWC; }
@@ -146,7 +146,7 @@ private:
static void ChangeMedium( ::sd::DrawDocShell* pDocShell, SfxViewFrame* pViewFrame, const sal_Int32 eMedium );
static SfxFrame* CreateEmptyDocument( DocumentType eDocType, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame );
static SfxFrame* CreateFromTemplate( const String& rTemplatePath, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame );
static SfxFrame* CreateFromTemplate( const OUString& rTemplatePath, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame );
/** The resource container controls the lifetime of some singletons.
*/

View File

@@ -179,7 +179,7 @@ SdOptions* SdModule::GetSdOptions(DocumentType eDocType)
* if the stream is opened for reading but does not exist, an 'empty'
* RefObject is returned
*/
SvStorageStreamRef SdModule::GetOptionStream( const String& rOptionName,
SvStorageStreamRef SdModule::GetOptionStream( const OUString& rOptionName,
SdOptionStreamMode eMode )
{
::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() );
@@ -188,7 +188,6 @@ SvStorageStreamRef SdModule::GetOptionStream( const String& rOptionName,
if( pDocSh )
{
DocumentType eType = pDocSh->GetDoc()->GetDocumentType();
String aStmName;
if( !xOptionStorage.Is() )
{
@@ -202,10 +201,12 @@ SvStorageStreamRef SdModule::GetOptionStream( const String& rOptionName,
xOptionStorage = new SvStorage( pStm, sal_True );
}
OUString aStmName;
if( DOCUMENT_TYPE_DRAW == eType )
aStmName.AssignAscii( "Draw_" );
aStmName = "Draw_";
else
aStmName.AssignAscii( "Impress_" );
aStmName = "Impress_";
aStmName += rOptionName;

View File

@@ -500,7 +500,7 @@ void SdModule::AddSummaryPage (SfxViewFrame* pViewFrame, SdDrawDocument* pDocume
}
}
SfxFrame* SdModule::CreateFromTemplate( const String& rTemplatePath, const Reference< XFrame >& i_rFrame )
SfxFrame* SdModule::CreateFromTemplate( const OUString& rTemplatePath, const Reference< XFrame >& i_rFrame )
{
SfxFrame* pFrame = 0;
@@ -551,9 +551,9 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
//check whether we should load a template document
const OUString aServiceName( "com.sun.star.presentation.PresentationDocument" );
String aStandardTemplate( SfxObjectFactory::GetStandardTemplate( aServiceName ) );
OUString aStandardTemplate( SfxObjectFactory::GetStandardTemplate( aServiceName ) );
if( aStandardTemplate.Len() > 0 )
if( !aStandardTemplate.isEmpty() )
{
//load a template document
pFrame = CreateFromTemplate( aStandardTemplate, xTargetFrame );