diff options
-rw-r--r-- | sd/source/ui/func/fuinsfil.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/inc/fuinsfil.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview4.cxx | 2 | ||||
-rw-r--r-- | sfx2/inc/sfx2/docfilt.hxx | 4 | ||||
-rw-r--r-- | sfx2/inc/sfx2/fcontnr.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/sfxpicklist.cxx | 36 | ||||
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/inc/sfxpicklist.hxx | 13 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmoutputpage.cxx | 2 | ||||
-rw-r--r-- | vbahelper/inc/vbahelper/vbaaccesshelper.hxx | 2 |
11 files changed, 37 insertions, 38 deletions
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index 5a976b8b2a73..b98f14fe73c8 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -111,7 +111,7 @@ FunctionReference FuInsertFile::Create( ViewShell* pViewSh, ::sd::Window* pWin, void FuInsertFile::DoExecute( SfxRequest& rReq ) { SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher(); - ::std::vector< String > aFilterVector; + ::std::vector< OUString > aFilterVector; const SfxItemSet* pArgs = rReq.GetArgs (); FuInsertFile::GetSupportedFilterVector( aFilterVector ); @@ -229,7 +229,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); // add additional supported filters - ::std::vector< String >::const_iterator aIter( aFilterVector.begin() ); + ::std::vector< OUString >::const_iterator aIter( aFilterVector.begin() ); while( aIter != aFilterVector.end() ) { @@ -796,7 +796,7 @@ sal_Bool FuInsertFile::InsSDDinOlMode(SfxMedium* pMedium) // ----------------------------------------------------------------------------- -void FuInsertFile::GetSupportedFilterVector( ::std::vector< String >& rFilterVector ) +void FuInsertFile::GetSupportedFilterVector( ::std::vector< OUString >& rFilterVector ) { SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher(); const SfxFilter* pSearchFilter = NULL; diff --git a/sd/source/ui/inc/fuinsfil.hxx b/sd/source/ui/inc/fuinsfil.hxx index bad7d3a24f03..fba3dc831d90 100644 --- a/sd/source/ui/inc/fuinsfil.hxx +++ b/sd/source/ui/inc/fuinsfil.hxx @@ -46,7 +46,7 @@ public: static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ); virtual void DoExecute( SfxRequest& rReq ); - static void GetSupportedFilterVector( ::std::vector< String >& rFilterVector ); + static void GetSupportedFilterVector( ::std::vector< ::rtl::OUString >& rFilterVector ); private: FuInsertFile ( diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 0874071b9c85..92d0b709df94 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -412,7 +412,7 @@ IMPL_LINK( View, DropInsertFileHdl, Timer*, EMPTYARG ) if( pFoundFilter && !nErr ) { - ::std::vector< String > aFilterVector; + ::std::vector< ::rtl::OUString > aFilterVector; const String aFilterName( pFoundFilter->GetFilterName() ); String aLowerAsciiFileName( aCurrentDropFile ); aLowerAsciiFileName.ToLowerAscii(); diff --git a/sfx2/inc/sfx2/docfilt.hxx b/sfx2/inc/sfx2/docfilt.hxx index a951239d4a25..1da1dea2d3dc 100644 --- a/sfx2/inc/sfx2/docfilt.hxx +++ b/sfx2/inc/sfx2/docfilt.hxx @@ -57,7 +57,7 @@ friend class SfxFilterContainer; SfxFilterFlags nFormatType; sal_uInt16 nDocIcon; String aServiceName; - String aMimeType; + ::rtl::OUString aMimeType; String aFilterName; String aPattern; sal_uIntPtr nVersion; @@ -85,7 +85,7 @@ public: bool IsInternal() const { return nFormatType & SFX_FILTER_INTERNAL; } SfxFilterFlags GetFilterFlags() const { return nFormatType; } const String& GetFilterName() const { return aFilterName; } - const String& GetMimeType() const { return aMimeType; } + const ::rtl::OUString& GetMimeType() const { return aMimeType; } const String& GetName() const { return aFilterName; } const WildCard& GetWildcard() const { return aWildCard; } const String& GetRealTypeName() const { return aTypeName; } diff --git a/sfx2/inc/sfx2/fcontnr.hxx b/sfx2/inc/sfx2/fcontnr.hxx index a6187a677741..f6c1d01cb1a1 100644 --- a/sfx2/inc/sfx2/fcontnr.hxx +++ b/sfx2/inc/sfx2/fcontnr.hxx @@ -140,7 +140,7 @@ public: sal_uInt32 GuessFilterControlDefaultUI( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED, sal_Bool bDefUI = sal_True ) const; sal_uInt32 DetectFilter( SfxMedium& rMedium, const SfxFilter **, sal_Bool bPlugIn, sal_Bool bAPI = sal_False ) const; - const SfxFilter* GetFilter4Mime( const String& rMime, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED) const; + const SfxFilter* GetFilter4Mime( const ::rtl::OUString& rMime, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED) const; const SfxFilter* GetFilter4ClipBoardId( sal_uInt32 nId, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; const SfxFilter* GetFilter4EA( const String& rEA, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; const SfxFilter* GetFilter4Extension( const String& rExt, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx index c3332d99be77..d80a80cc6ec9 100644 --- a/sfx2/source/appl/sfxpicklist.cxx +++ b/sfx2/source/appl/sfxpicklist.cxx @@ -84,30 +84,30 @@ class StringLength : public ::cppu::WeakImplHelper1< XStringWidth > } }; -void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, sal_uInt16 nItemId, const String& aURLString, sal_uInt32 nNo ) +void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, sal_uInt16 nItemId, const ::rtl::OUString& aURLString, sal_uInt32 nNo ) { - String aPickEntry; + ::rtl::OUStringBuffer aPickEntry; if ( nNo < 9 ) { - aPickEntry += '~'; - aPickEntry += String::CreateFromInt32( nNo + 1 ); + aPickEntry.append('~'); + aPickEntry.append(::rtl::OUString::valueOf(static_cast<sal_Int32>(nNo + 1))); } else if ( nNo == 9 ) - aPickEntry += DEFINE_CONST_UNICODE("1~0"); + aPickEntry.appendAscii("1~0"); else - aPickEntry += String::CreateFromInt32( nNo + 1 ); - aPickEntry += DEFINE_CONST_UNICODE(": "); + aPickEntry.append(::rtl::OUString::valueOf(static_cast<sal_Int32>(nNo + 1))); + aPickEntry.appendAscii(": "); INetURLObject aURL( aURLString ); rtl::OUString aTipHelpText; - rtl::OUString aAccessibleName( aPickEntry ); + rtl::OUString aAccessibleName = aPickEntry.toString(); if ( aURL.GetProtocol() == INET_PROT_FILE ) { // Do handle file URL differently => convert it to a system // path and abbreviate it with a special function: - String aFileSystemPath( aURL.getFSysPath( INetURLObject::FSYS_DETECT ) ); + ::rtl::OUString aFileSystemPath( aURL.getFSysPath( INetURLObject::FSYS_DETECT ) ); ::rtl::OUString aSystemPath( aFileSystemPath ); ::rtl::OUString aCompactedSystemPath; @@ -116,28 +116,28 @@ void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, sal_uInt16 nItemId, cons aAccessibleName += aSystemPath; oslFileError nError = osl_abbreviateSystemPath( aSystemPath.pData, &aCompactedSystemPath.pData, 46, NULL ); if ( !nError ) - aPickEntry += String( aCompactedSystemPath ); + aPickEntry.append( aCompactedSystemPath ); else - aPickEntry += aFileSystemPath; + aPickEntry.append( aFileSystemPath ); - if ( aPickEntry.Len() > 50 ) + if ( aPickEntry.getLength() > 50 ) { - aPickEntry.Erase( 47 ); - aPickEntry += DEFINE_CONST_UNICODE("..."); + aPickEntry.setLength( 47 ); + aPickEntry.appendAscii("..."); } } else { // Use INetURLObject to abbreviate all other URLs - String aShortURL; + ::rtl::OUString aShortURL; aShortURL = aURL.getAbbreviated( m_xStringLength, 46, INetURLObject::DECODE_UNAMBIGUOUS ); - aPickEntry += aShortURL; + aPickEntry.append(aShortURL); aTipHelpText = aURLString; aAccessibleName += aURLString; } // Set menu item text, tip help and accessible name - pMenu->SetItemText( nItemId, aPickEntry ); + pMenu->SetItemText( nItemId, aPickEntry.toString() ); pMenu->SetTipHelpText( nItemId, aTipHelpText ); pMenu->SetAccessibleName( nItemId, aAccessibleName ); } @@ -425,7 +425,7 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint ) pDocSh->Get_Impl()->bWaitingForPicklist = sal_False; if ( aURL.GetProtocol() == INET_PROT_FILE ) - Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::NO_DECODE ), (pFilter) ? pFilter->GetMimeType() : String() ); + Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::NO_DECODE ), (pFilter) ? pFilter->GetMimeType() : ::rtl::OUString() ); } break; } diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 2d347781f585..36c4b133a5a2 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -649,7 +649,7 @@ const SfxFilter* SfxFilterMatcher::GetFilterForProps( const com::sun::star::uno: return 0; } -const SfxFilter* SfxFilterMatcher::GetFilter4Mime( const String& rMediaType,SfxFilterFlags nMust, SfxFilterFlags nDont ) const +const SfxFilter* SfxFilterMatcher::GetFilter4Mime( const ::rtl::OUString& rMediaType, SfxFilterFlags nMust, SfxFilterFlags nDont ) const { if ( m_rImpl.pList ) { @@ -666,7 +666,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4Mime( const String& rMediaType,SfxF com::sun::star::uno::Sequence < com::sun::star::beans::NamedValue > aSeq(1); aSeq[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")); - aSeq[0].Value <<= ::rtl::OUString( rMediaType ); + aSeq[0].Value <<= rMediaType; return GetFilterForProps( aSeq, nMust, nDont ); } diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 49f4b211010d..abbb3431753e 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2091,7 +2091,7 @@ void SfxObjectShell::AddToRecentlyUsedList() { const SfxFilter* pOrgFilter = pMedium->GetOrigFilter(); Application::AddToRecentDocumentList( aUrl.GetURLNoPass( INetURLObject::NO_DECODE ), - (pOrgFilter) ? pOrgFilter->GetMimeType() : String() ); + (pOrgFilter) ? pOrgFilter->GetMimeType() : ::rtl::OUString() ); } } diff --git a/sfx2/source/inc/sfxpicklist.hxx b/sfx2/source/inc/sfxpicklist.hxx index 80a7f879db84..987e78acd31b 100644 --- a/sfx2/source/inc/sfxpicklist.hxx +++ b/sfx2/source/inc/sfxpicklist.hxx @@ -30,7 +30,6 @@ #define _SFX_PICKLIST_HXX_ #include <osl/mutex.hxx> -#include <tools/string.hxx> #include <vcl/menu.hxx> #include <svl/lstner.hxx> #include <com/sun/star/util/XStringWidth.hpp> @@ -43,13 +42,13 @@ class SfxPickList : public SfxListener { struct PickListEntry { - PickListEntry( const String& _aName, const String& _aFilter, const String& _aTitle ) : + PickListEntry( const ::rtl::OUString& _aName, const ::rtl::OUString& _aFilter, const ::rtl::OUString& _aTitle ) : aName( _aName ), aFilter( _aFilter ), aTitle( _aTitle ) {} - String aName; - String aFilter; - String aTitle; - String aOptions; + ::rtl::OUString aName; + ::rtl::OUString aFilter; + ::rtl::OUString aTitle; + ::rtl::OUString aOptions; }; std::vector< PickListEntry* > m_aPicklistVector; @@ -59,7 +58,7 @@ class SfxPickList : public SfxListener SfxPickList( sal_uInt32 nMenuSize ); ~SfxPickList(); - void CreatePicklistMenuTitle( Menu* pMenu, sal_uInt16 nItemId, const String& aURL, sal_uInt32 nNo ); + void CreatePicklistMenuTitle( Menu* pMenu, sal_uInt16 nItemId, const ::rtl::OUString& aURL, sal_uInt32 nNo ); PickListEntry* GetPickListEntry( sal_uInt32 nIndex ); void CreatePickListEntries(); void RemovePickListEntries(); diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 6e2e5099c1b3..c7d7fd4223e4 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -1103,7 +1103,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) if(!pSfxFlt) return 0; - String sMimeType = pSfxFlt->GetMimeType(); + ::rtl::OUString sMimeType = pSfxFlt->GetMimeType(); if(!m_aSubjectED.GetText().Len()) { diff --git a/vbahelper/inc/vbahelper/vbaaccesshelper.hxx b/vbahelper/inc/vbahelper/vbaaccesshelper.hxx index 85a109b5f0ac..01a520c33f83 100644 --- a/vbahelper/inc/vbahelper/vbaaccesshelper.hxx +++ b/vbahelper/inc/vbahelper/vbaaccesshelper.hxx @@ -65,7 +65,7 @@ namespace ooo bool bRes( false ); const SfxFilter *pFilt = rDocShell.GetMedium()->GetFilter(); if ( pFilt && pFilt->IsAlienFormat() ) - bRes = ( pFilt->GetMimeType().CompareToAscii( pMimeType ) == 0 ); + bRes = ( pFilt->GetMimeType().compareToAscii( pMimeType ) == 0 ); return bRes; } VBAHELPER_DLLPRIVATE inline bool isAlienExcelDoc( SfxObjectShell& rDocShell ) { return isAlienDoc( rDocShell, "application/vnd.ms-excel" ); } |