From 65302eb1bed16db8f06cbb048d03ba6d644b3fb6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 27 Aug 2011 22:15:08 +0100 Subject: ByteString->rtl::OString and destupid-api a bit --- sfx2/source/bastyp/fltfnc.cxx | 2 +- sfx2/source/dialog/filtergrouping.cxx | 10 ++++++---- sfx2/source/doc/docfilt.cxx | 7 ++++--- 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index ced3dd807717..3ab7ea6ca7b3 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -712,7 +712,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4Extension( const String& rExt, SfxF SfxFilterFlags nFlags = pFilter->GetFilterFlags(); if ( (nFlags & nMust) == nMust && !(nFlags & nDont ) ) { - String sWildCard = ToUpper_Impl( pFilter->GetWildcard().GetWildCard() ); + String sWildCard = ToUpper_Impl( pFilter->GetWildcard().getGlob() ); String sExt = ToUpper_Impl( rExt ); if (!sExt.Len()) diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index 4f8ca6c43af2..bc2672f4ce94 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -631,7 +632,7 @@ namespace sfx2 for ( const SfxFilter* pFilter = _rFilterMatcher.First(); pFilter; pFilter = _rFilterMatcher.Next() ) { sFilterName = pFilter->GetFilterName(); - sFilterWildcard = pFilter->GetWildcard().GetWildCard(); + sFilterWildcard = pFilter->GetWildcard().getGlob(); AppendWildcardToDescriptor aExtendWildcard( sFilterWildcard ); DBG_ASSERT( sFilterWildcard.Len(), "sfx2::lcl_GroupAndClassify: invalid wildcard of this filter!" ); @@ -964,7 +965,8 @@ namespace sfx2 const SfxFilter* pDefaultFilter = SfxFilterContainer::GetDefaultFilter_Impl(_rFactory); // Only use one extension (#i32434#) // (and always the first if there are more than one) - sExtension = pDefaultFilter->GetWildcard().GetWildCard().GetToken( 0, ';' ); + using comphelper::string::getToken; + sExtension = getToken(pDefaultFilter->GetWildcard().getGlob(), 0, ';'); sUIName = addExtension( pDefaultFilter->GetUIName(), sExtension, sal_False, _rFileDlgImpl ); try { @@ -988,7 +990,7 @@ namespace sfx2 // Only use one extension (#i32434#) // (and always the first if there are more than one) - sExtension = pFilter->GetWildcard().GetWildCard().GetToken( 0, ';' ); + sExtension = getToken(pFilter->GetWildcard().getGlob(), 0, ';'); sUIName = addExtension( pFilter->GetUIName(), sExtension, sal_False, _rFileDlgImpl ); try { @@ -1045,7 +1047,7 @@ namespace sfx2 { sTypeName = pFilter->GetTypeName(); sUIName = pFilter->GetUIName(); - sExtensions = pFilter->GetWildcard().GetWildCard(); + sExtensions = pFilter->GetWildcard().getGlob(); ExportFilter aExportFilter( sUIName, sExtensions ); String aExt = sExtensions; diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx index 3b82bb5bec59..b8a8274740c6 100644 --- a/sfx2/source/doc/docfilt.cxx +++ b/sfx2/source/doc/docfilt.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -72,7 +73,7 @@ SfxFilter::SfxFilter( const String &rName, aMimeType( rMimeType ), aFilterName( rName ) { - String aExts = GetWildcard()(); + String aExts = GetWildcard().getGlob(); String aShort, aLong; String aRet; sal_uInt16 nMaxLength = USHRT_MAX; @@ -110,12 +111,12 @@ SfxFilter::~SfxFilter() String SfxFilter::GetDefaultExtension() const { - return GetWildcard()().GetToken( 0, ';' ); + return comphelper::string::getToken(GetWildcard().getGlob(), 0, ';'); } String SfxFilter::GetSuffixes() const { - String aRet = GetWildcard()(); + String aRet = GetWildcard().getGlob(); while( aRet.SearchAndReplaceAscii( "*.", String() ) != STRING_NOTFOUND ) ; while( aRet.SearchAndReplace( ';', ',' ) != STRING_NOTFOUND ) ; return aRet; -- cgit