diff options
author | Ricardo Montania <ricardo@linuxafundo.com.br> | 2012-12-21 17:19:31 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-12-21 21:59:48 +0000 |
commit | 8efbd993d52289a4cf1193d2513df9e83bd583a8 (patch) | |
tree | 7a497be2bd9bf602baa9232ece16861178bfa0b9 /filter | |
parent | 60c01fe42f90876f9a636780aa3b23ccf6a1398b (diff) |
More String cleanup in filter
Change-Id: Idf628ad51ebe9c841090a5e04c7986c15c726480
Reviewed-on: https://gerrit.libreoffice.org/1463
Reviewed-by: Olivier Hallot <olivier.hallot@alta.org.br>
Tested-by: Olivier Hallot <olivier.hallot@alta.org.br>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertabpagebasic.cxx | 15 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertabpagexslt.cxx | 32 |
2 files changed, 23 insertions, 24 deletions
diff --git a/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx b/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx index 5eb09d6fe675..f8b868cc7c35 100644 --- a/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx +++ b/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx @@ -25,7 +25,6 @@ #include "xmlfiltersettingsdialog.hxx" #include "xmlfilterhelpids.hrc" -using ::rtl::OUString; XMLFilterTabPageBasic::XMLFilterTabPageBasic( Window* pParent, ResMgr& rResMgr ) : TabPage( pParent, ResId( RID_XML_FILTER_TABPAGE_BASIC, rResMgr ) ), maFTFilterName( this, ResId( FT_XML_FILTER_NAME, rResMgr ) ), @@ -48,7 +47,7 @@ XMLFilterTabPageBasic::XMLFilterTabPageBasic( Window* pParent, ResMgr& rResMgr ) std::vector< application_info_impl* >::iterator aIter( rInfos.begin() ); while( aIter != rInfos.end() ) { - XubString aEntry( (*aIter++)->maDocumentUIName ); + OUString aEntry( (*aIter++)->maDocumentUIName ); maCBApplication.InsertEntry( aEntry ); } } @@ -57,24 +56,24 @@ XMLFilterTabPageBasic::~XMLFilterTabPageBasic() { } -static OUString checkExtensions( const String& rExtensions ) +static OUString checkExtensions( const OUString& rExtensions ) { - const sal_Unicode* pSource = rExtensions.GetBuffer(); - sal_Int32 nCount = rExtensions.Len(); + const sal_Unicode* pSource = rExtensions.getStr(); + sal_Int32 nCount = rExtensions.getLength(); - String aRet; + OUString aRet; while( nCount-- ) { switch(*pSource) { case sal_Unicode(','): - aRet += sal_Unicode(';'); + aRet += ";"; break; case sal_Unicode('.'): case sal_Unicode('*'): break; default: - aRet += *pSource; + aRet += OUString( *pSource ); } pSource++; diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx index f1ccc52dc09b..25d19be080e3 100644 --- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx +++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx @@ -56,17 +56,17 @@ XMLFilterTabPageXSLT::XMLFilterTabPageXSLT( Window* pParent, ResMgr& rResMgr, co maFTNeedsXSLT2( this, ResId (FT_XML_NEEDS_XSLT2, rResMgr ) ), maCBNeedsXSLT2( this, ResId (CB_XML_NEEDS_XSLT2, rResMgr ) ), - sHTTPSchema( RTL_CONSTASCII_USTRINGPARAM( "http://" ) ), - sSHTTPSchema( RTL_CONSTASCII_USTRINGPARAM( "shttp://" ) ), - sFILESchema( RTL_CONSTASCII_USTRINGPARAM( "file://" ) ), - sFTPSchema( RTL_CONSTASCII_USTRINGPARAM( "ftp://" ) ), - sInstPath( RTL_CONSTASCII_USTRINGPARAM( "$(prog)/" ) ) + sHTTPSchema( "http://" ), + sSHTTPSchema( "shttp://" ), + sFILESchema( "file://" ), + sFTPSchema( "ftp://" ), + sInstPath( "$(prog)/" ) { FreeResource(); try { - css::uno::Reference< XConfigManager > xCfgMgr( rxMSF->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.config.SpecialConfigManager" ))), UNO_QUERY ); + css::uno::Reference< XConfigManager > xCfgMgr( rxMSF->createInstance( "com.sun.star.config.SpecialConfigManager" ), UNO_QUERY ); if( xCfgMgr.is() ) sInstPath = xCfgMgr->substituteVariables( sInstPath ); } @@ -120,23 +120,23 @@ void XMLFilterTabPageXSLT::SetURL( SvtURLBox& rURLBox, const OUString& rURL ) { OUString aPath; - if( rURL.matchIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM( "file://" ) ) ) ) + if( rURL.matchIgnoreAsciiCase( "file://" ) ) { osl::FileBase::getSystemPathFromFileURL( rURL, aPath ); rURLBox.SetBaseURL( rURL ); rURLBox.SetText( aPath ); } - else if( rURL.matchIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM( "http://" ) ) ) || - rURL.matchIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM( "shttp://" ) ) ) || - rURL.matchIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM( "ftp://" ) ) ) ) + else if( rURL.matchIgnoreAsciiCase( "http://" ) || + rURL.matchIgnoreAsciiCase( "shttp://" ) || + rURL.matchIgnoreAsciiCase( "ftp://" ) ) { rURLBox.SetBaseURL( rURL ); rURLBox.SetText( rURL ); } else if( !rURL.isEmpty() ) { - rtl::OUString aURL( rURL ); + OUString aURL( rURL ); aURL = URIHelper::SmartRel2Abs( sInstPath, aURL, Link(), false ); osl::FileBase::getSystemPathFromFileURL( aURL, aPath ); @@ -146,7 +146,7 @@ void XMLFilterTabPageXSLT::SetURL( SvtURLBox& rURLBox, const OUString& rURL ) else { rURLBox.SetBaseURL( sInstPath ); - String aEmpty; + OUString aEmpty; rURLBox.SetText( aEmpty ); } } @@ -155,15 +155,15 @@ OUString XMLFilterTabPageXSLT::GetURL( SvtURLBox& rURLBox ) { OUString aURL; OUString aStrPath ( rURLBox.GetText() ); - if( aStrPath.matchIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM( "http://" ) ) ) || - aStrPath.matchIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM( "shttp://" ) ) ) || - aStrPath.matchIgnoreAsciiCase( OUString( RTL_CONSTASCII_USTRINGPARAM( "ftp://" ) ) ) ) + if( aStrPath.matchIgnoreAsciiCase( "http://" ) || + aStrPath.matchIgnoreAsciiCase( "shttp://" ) || + aStrPath.matchIgnoreAsciiCase( "ftp://" ) ) { return aStrPath; } else { - const String aBaseURL ( rURLBox.GetBaseURL() ); + const OUString aBaseURL ( rURLBox.GetBaseURL() ); osl::FileBase::getFileURLFromSystemPath( aStrPath, aURL ); } |