diff options
author | Noel Grandin <noel@peralex.com> | 2013-08-23 12:34:38 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-08-29 09:30:02 +0200 |
commit | 7c9188659d0882906ed917d5251d5faaf007a477 (patch) | |
tree | 74b7ab7be808657179820283fdbea0a973051fd1 | |
parent | 99af8b070c5bff885511b29faf3c9df937297f81 (diff) |
convert include/sfx2/objsh.hxx from String to OUString
Change-Id: I9587190cea24da93ec0496f2eccf0d32d98980ee
-rw-r--r-- | basctl/source/basicide/basides2.cxx | 2 | ||||
-rw-r--r-- | include/sfx2/objsh.hxx | 48 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/inc/docsh.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 30 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 10 | ||||
-rw-r--r-- | sw/inc/docsh.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/app/docsh.cxx | 4 |
11 files changed, 58 insertions, 58 deletions
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx index 1b096908ecdb..927b670abaff 100644 --- a/basctl/source/basicide/basides2.cxx +++ b/basctl/source/basicide/basides2.cxx @@ -127,7 +127,7 @@ void Shell::SetMDITitle() if ( pViewFrame ) { SfxObjectShell* pShell = pViewFrame->GetObjectShell(); - if ( pShell && !pShell->GetTitle( SFX_TITLE_CAPTION ).Equals(aTitle) ) + if ( pShell && pShell->GetTitle( SFX_TITLE_CAPTION ) != aTitle ) { pShell->SetTitle( aTitle ); pShell->SetModified(false); diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 3f29fcf0d404..4d530d98a047 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -261,7 +261,7 @@ public: void UpdateDocInfoForSave( ); void FlushDocInfo(); sal_Bool HasName() const { return bHasName; } - virtual String GetAPIName() const; + virtual OUString GetAPIName() const; void SetReadOnly(); sal_Bool IsReadOnly() const; sal_Bool IsReadOnlyMedium() const; @@ -361,11 +361,11 @@ public: virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog( Window *pParent, const SfxItemSet& ); - ErrCode CallBasic( const String& rMacro, const String& rBasicName, + ErrCode CallBasic( const OUString& rMacro, const OUString& rBasicName, SbxArray* pArgs = 0, SbxValue* pRet = 0 ); ErrCode CallXScript( - const String& rScriptURL, + const OUString& rScriptURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aParams, ::com::sun::star::uno::Any& aRet, ::com::sun::star::uno::Sequence< sal_Int16 >& aOutParamIndex, @@ -391,7 +391,7 @@ public: @return whether macros from this document should be executed */ - bool AdjustMacroMode( const String& rScriptType, bool _bSuppressUI = false ); + bool AdjustMacroMode( const OUString& rScriptType, bool _bSuppressUI = false ); SvKeyValueIterator* GetHeaderAttributes(); void ClearHeaderAttributesForSourceViewHack(); @@ -399,15 +399,15 @@ public: sal_Bool IsTemplate() const; - sal_Bool IsQueryLoadTemplate() const; - sal_Bool IsUseUserData() const; - sal_Bool IsLoadReadonly() const; - sal_Bool IsSaveVersionOnClose() const; - void SetQueryLoadTemplate( sal_Bool b ); - void SetUseUserData( sal_Bool bNew ); - void SetLoadReadonly( sal_Bool _bReadonly ); - void SetSaveVersionOnClose( sal_Bool bSet ); - void ResetFromTemplate( const String& rTemplateName, const String& rFileName ); + sal_Bool IsQueryLoadTemplate() const; + sal_Bool IsUseUserData() const; + sal_Bool IsLoadReadonly() const; + sal_Bool IsSaveVersionOnClose() const; + void SetQueryLoadTemplate( sal_Bool b ); + void SetUseUserData( sal_Bool bNew ); + void SetLoadReadonly( sal_Bool _bReadonly ); + void SetSaveVersionOnClose( sal_Bool bSet ); + void ResetFromTemplate( const OUString& rTemplateName, const OUString& rFileName ); // TODO/LATER: the following two methods should be replaced by Get/SetModifPasswordInfo in future sal_uInt32 GetModifyPasswordHash() const; @@ -466,8 +466,8 @@ public: void SetWaitCursor( sal_Bool bSet ) const; // Naming Interface - void SetTitle( const String& rTitle ); - String GetTitle( sal_uInt16 nMaxLen = 0 ) const; + void SetTitle( const OUString& rTitle ); + OUString GetTitle( sal_uInt16 nMaxLen = 0 ) const; void InvalidateName(); // Re-set to unnamed // DDE-Interface @@ -528,12 +528,12 @@ public: virtual ::com::sun::star::uno::Sequence< OUString > GetEventNames(); Window* GetDialogParent( SfxMedium* pMedium=0 ); - static SfxObjectShell* CreateObject( const String& rServiceName, SfxObjectCreateMode = SFX_CREATE_MODE_STANDARD ); - static SfxObjectShell* CreateObjectByFactoryName( const String& rURL, SfxObjectCreateMode = SFX_CREATE_MODE_STANDARD ); + static SfxObjectShell* CreateObject( const OUString& rServiceName, SfxObjectCreateMode = SFX_CREATE_MODE_STANDARD ); + static SfxObjectShell* CreateObjectByFactoryName( const OUString& rURL, SfxObjectCreateMode = SFX_CREATE_MODE_STANDARD ); static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > CreateAndLoadComponent( const SfxItemSet& rSet, SfxFrame* pFrame = NULL ); static SfxObjectShell* GetShellFromComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xComp ); - static String GetServiceNameFromFactory( const String& rFact ); + static OUString GetServiceNameFromFactory( const OUString& rFact ); sal_Bool IsInPlaceActive(); sal_Bool IsUIActive(); virtual void InPlaceActivate( sal_Bool ); @@ -613,7 +613,7 @@ public: virtual bool IsChangeRecording() const; virtual bool HasChangeRecordProtection() const; virtual void SetChangeRecording( bool bActivate ); - virtual bool SetProtectionPassword( const String &rPassword ); + virtual bool SetProtectionPassword( const OUString &rPassword ); virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash ); // ================================= @@ -682,9 +682,9 @@ public: SAL_DLLPRIVATE void SetNamedVisibility_Impl(); SAL_DLLPRIVATE sal_Bool DoSave_Impl( const SfxItemSet* pSet=0 ); SAL_DLLPRIVATE sal_Bool Save_Impl( const SfxItemSet* pSet=0 ); - SAL_DLLPRIVATE sal_Bool PreDoSaveAs_Impl(const String &rFileName, const String &rFiltName, SfxItemSet *); - SAL_DLLPRIVATE sal_Bool APISaveAs_Impl ( const String& aFileName, SfxItemSet* aParams ); - SAL_DLLPRIVATE sal_Bool CommonSaveAs_Impl ( const INetURLObject& aURL, const String& aFilterName, SfxItemSet* aParams ); + SAL_DLLPRIVATE sal_Bool PreDoSaveAs_Impl(const OUString &rFileName, const OUString &rFiltName, SfxItemSet *); + SAL_DLLPRIVATE sal_Bool APISaveAs_Impl ( const OUString& aFileName, SfxItemSet* aParams ); + SAL_DLLPRIVATE sal_Bool CommonSaveAs_Impl ( const INetURLObject& aURL, const OUString& aFilterName, SfxItemSet* aParams ); SAL_DLLPRIVATE sal_Bool GeneralInit_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, sal_Bool bTypeMustBeSetAlready ); @@ -750,11 +750,11 @@ SV_IMPL_REF(SfxObjectShell) //-------------------------------------------------------------------- class AutoReloadTimer_Impl : public Timer { - String aUrl; + OUString aUrl; SfxObjectShell* pObjSh; public: - AutoReloadTimer_Impl( const String& rURL, sal_uInt32 nTime, + AutoReloadTimer_Impl( const OUString& rURL, sal_uInt32 nTime, SfxObjectShell* pSh ); virtual void Timeout(); }; diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index de153d101f25..05b44a0608e3 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -3108,7 +3108,7 @@ void ScDocShell::SetChangeRecording( bool bActivate ) } -bool ScDocShell::SetProtectionPassword( const String &rNewPassword ) +bool ScDocShell::SetProtectionPassword( const OUString &rNewPassword ) { bool bRes = false; ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack(); @@ -3116,7 +3116,7 @@ bool ScDocShell::SetProtectionPassword( const String &rNewPassword ) { bool bProtected = pChangeTrack->IsProtected(); - if (rNewPassword.Len()) + if (!rNewPassword.isEmpty()) { // when password protection is applied change tracking must always be active SetChangeRecording( true ); diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index e83592149fd2..8e459aba6b43 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -426,7 +426,7 @@ public: virtual bool IsChangeRecording() const; virtual bool HasChangeRecordProtection() const; virtual void SetChangeRecording( bool bActivate ); - virtual bool SetProtectionPassword( const String &rPassword ); + virtual bool SetProtectionPassword( const OUString &rPassword ); virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash ); diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 49f9745f4f96..480ed8ae3e9c 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -511,7 +511,7 @@ sal_Bool SfxObjectShell::IsHelpDocument() const return (pFilter && pFilter->GetFilterName() == "writer_web_HTML_help"); } -void SfxObjectShell::ResetFromTemplate( const String& rTemplateName, const String& rFileName ) +void SfxObjectShell::ResetFromTemplate( const OUString& rTemplateName, const OUString& rFileName ) { // only care about reseting this data for openoffice formats otherwise if ( IsOwnStorageFormat_Impl( *GetMedium()) ) diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index bc4b8e04469b..933ea0555bce 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -702,7 +702,7 @@ IndexBitSet& SfxObjectShell::GetNoSet_Impl() void SfxObjectShell::SetTitle ( - const String& rTitle // the new Document Title + const OUString& rTitle // the new Document Title ) /* [Description] @@ -756,7 +756,7 @@ String X(const String &rRet) #endif //-------------------------------------------------------------------- -String SfxObjectShell::GetTitle +OUString SfxObjectShell::GetTitle ( sal_uInt16 nMaxLength /* 0 (default) the title itself, as it is @@ -1437,7 +1437,7 @@ void SfxObjectShell::CancelTransfers() //------------------------------------------------------------------------- AutoReloadTimer_Impl::AutoReloadTimer_Impl( - const String& rURL, sal_uInt32 nTime, SfxObjectShell* pSh ) + const OUString& rURL, sal_uInt32 nTime, SfxObjectShell* pSh ) : aUrl( rURL ), pObjSh( pSh ) { SetTimeout( nTime ); @@ -1461,7 +1461,7 @@ void AutoReloadTimer_Impl::Timeout() SfxAllItemSet aSet( SFX_APP()->GetPool() ); aSet.Put( SfxBoolItem( SID_AUTOLOAD, sal_True ) ); - if ( aUrl.Len() ) + if ( !aUrl.isEmpty() ) aSet.Put( SfxStringItem( SID_FILE_NAME, aUrl ) ); SfxRequest aReq( SID_RELOAD, 0, aSet ); pObjSh->Get_Impl()->pReloadTimer = 0; @@ -1479,8 +1479,8 @@ SfxModule* SfxObjectShell::GetModule() const return GetFactory().GetModule(); } -ErrCode SfxObjectShell::CallBasic( const String& rMacro, - const String& rBasic, SbxArray* pArgs, +ErrCode SfxObjectShell::CallBasic( const OUString& rMacro, + const OUString& rBasic, SbxArray* pArgs, SbxValue* pRet ) { SfxApplication* pApp = SFX_APP(); @@ -1591,13 +1591,13 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon // perhaps rename to CallScript once we get rid of the existing CallScript // and Call, CallBasic, CallStarBasic methods -ErrCode SfxObjectShell::CallXScript( const String& rScriptURL, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& - aParams, - ::com::sun::star::uno::Any& aRet, - ::com::sun::star::uno::Sequence< sal_Int16 >& aOutParamIndex, - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& - aOutParam, bool bRaiseError, const ::com::sun::star::uno::Any* pCaller ) +ErrCode SfxObjectShell::CallXScript( const OUString& rScriptURL, + const css::uno::Sequence< css::uno::Any >& aParams, + css::uno::Any& aRet, + css::uno::Sequence< sal_Int16 >& aOutParamIndex, + css::uno::Sequence< css::uno::Any >& aOutParam, + bool bRaiseError, + const css::uno::Any* pCaller ) { return CallXScript( GetModel(), rScriptURL, aParams, aRet, aOutParamIndex, aOutParam, bRaiseError, pCaller ); } @@ -1730,7 +1730,7 @@ void SfxObjectShell::SetWaitCursor( sal_Bool bSet ) const } } -String SfxObjectShell::GetAPIName() const +OUString SfxObjectShell::GetAPIName() const { INetURLObject aURL( IsDocShared() ? GetSharedFileURL() : OUString( GetMedium()->GetName() ) ); String aName( aURL.GetBase() ); @@ -1747,7 +1747,7 @@ void SfxObjectShell::Invalidate( sal_uInt16 nId ) Invalidate_Impl( pFrame->GetBindings(), nId ); } -bool SfxObjectShell::AdjustMacroMode( const String& /*rScriptType*/, bool bSuppressUI ) +bool SfxObjectShell::AdjustMacroMode( const OUString& /*rScriptType*/, bool bSuppressUI ) { uno::Reference< task::XInteractionHandler > xInteraction; if ( pMedium && !bSuppressUI ) diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index bff362c066cd..9e31980ba4f9 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -285,7 +285,7 @@ void SfxObjectShell::PrintState_Impl(SfxItemSet &rSet) sal_Bool SfxObjectShell::APISaveAs_Impl ( - const String& aFileName, + const OUString& aFileName, SfxItemSet* aParams ) { diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index e8c7eeff80f1..eaef29f73300 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2587,7 +2587,7 @@ sal_Bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet ) sal_Bool SfxObjectShell::CommonSaveAs_Impl ( const INetURLObject& aURL, - const String& aFilterName, + const OUString& aFilterName, SfxItemSet* aParams ) { @@ -2732,9 +2732,9 @@ sal_Bool SfxObjectShell::CommonSaveAs_Impl sal_Bool SfxObjectShell::PreDoSaveAs_Impl ( - const String& rFileName, - const String& aFilterName, - SfxItemSet* pParams + const OUString& rFileName, + const OUString& aFilterName, + SfxItemSet* pParams ) { // copy all items stored in the itemset of the current medium @@ -2779,7 +2779,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl SfxMedium *pNewFile = new SfxMedium( rFileName, STREAM_READWRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC, 0, pParams ); // set filter; if no filter is given, take the default filter of the factory - if ( aFilterName.Len() ) + if ( !aFilterName.isEmpty() ) pNewFile->SetFilter( GetFactory().GetFilterContainer()->GetFilter4FilterName( aFilterName ) ); else pNewFile->SetFilter( GetFactory().GetFilterContainer()->GetAnyFilter( SFX_FILTER_IMPORT | SFX_FILTER_EXPORT ) ); diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index dcb4f1bf42bd..526c499fd6b3 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -979,7 +979,7 @@ Reference< XInterface > SfxObjectShell::GetCurrentComponent() } -String SfxObjectShell::GetServiceNameFromFactory( const String& rFact ) +OUString SfxObjectShell::GetServiceNameFromFactory( const OUString& rFact ) { //! Remove everything behind name! String aFact( rFact ); @@ -1051,15 +1051,15 @@ String SfxObjectShell::GetServiceNameFromFactory( const String& rFact ) return aServiceName; } -SfxObjectShell* SfxObjectShell::CreateObjectByFactoryName( const String& rFact, SfxObjectCreateMode eMode ) +SfxObjectShell* SfxObjectShell::CreateObjectByFactoryName( const OUString& rFact, SfxObjectCreateMode eMode ) { return CreateObject( GetServiceNameFromFactory( rFact ), eMode ); } -SfxObjectShell* SfxObjectShell::CreateObject( const String& rServiceName, SfxObjectCreateMode eCreateMode ) +SfxObjectShell* SfxObjectShell::CreateObject( const OUString& rServiceName, SfxObjectCreateMode eCreateMode ) { - if ( rServiceName.Len() ) + if ( !rServiceName.isEmpty() ) { uno::Reference < frame::XModel > xDoc( ::comphelper::getProcessServiceFactory()->createInstance( rServiceName ), UNO_QUERY ); if ( xDoc.is() ) @@ -1169,7 +1169,7 @@ void SfxObjectShell::SetChangeRecording( bool /*bActivate*/ ) } -bool SfxObjectShell::SetProtectionPassword( const String & /*rPassword*/ ) +bool SfxObjectShell::SetProtectionPassword( const OUString & /*rPassword*/ ) { // currently this function needs to be overwritten by Writer and Calc only DBG_ASSERT( 0, "function not implemented" ); diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index efa659b47024..ccff4f09acf0 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -297,7 +297,7 @@ public: virtual bool IsChangeRecording() const; virtual bool HasChangeRecordProtection() const; virtual void SetChangeRecording( bool bActivate ); - virtual bool SetProtectionPassword( const String &rPassword ); + virtual bool SetProtectionPassword( const OUString &rPassword ); virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash ); }; diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 2a0c0af82921..1b6b9a455388 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -1235,7 +1235,7 @@ void SwDocShell::SetChangeRecording( bool bActivate ) } -bool SwDocShell::SetProtectionPassword( const String &rNewPassword ) +bool SwDocShell::SetProtectionPassword( const OUString &rNewPassword ) { const SfxAllItemSet aSet( GetPool() ); const SfxItemSet* pArgs = &aSet; @@ -1249,7 +1249,7 @@ bool SwDocShell::SetProtectionPassword( const String &rNewPassword ) bool bRes = false; - if (rNewPassword.Len()) + if (!rNewPassword.isEmpty()) { // when password protection is applied change tracking must always be active SetChangeRecording( true ); |