diff options
author | MÁTÉ Gergely <sportember@caesar.elte.hu> | 2013-08-07 18:10:08 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-08-08 09:06:07 +0000 |
commit | c58f859ee6899bd5066bb754159d06e114405c96 (patch) | |
tree | 72046ad5fdd4061b6bb3b38d2c70df2525dd8e6f /sd | |
parent | 52f79304a635ec3845c1d26b025a92b4c710f4e2 (diff) |
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>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/sdmod.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/app/sdmod.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/app/sdmod1.cxx | 6 |
3 files changed, 10 insertions, 9 deletions
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index 1eb11fe7f9e2..bad6c3d902c9 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -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. */ diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index 83291d189c74..cafa427b724c 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -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; diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 61cfa61ff08b..42802ea8cd38 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -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 ); |