filter/source/xsltdialog/xmlfiltertabdialog.cxx | 26 +++++++++++------------- uui/source/logindlg.cxx | 8 +++---- 2 files changed, 16 insertions(+), 18 deletions(-)
New commits: commit a0c0b8cad98c8da86ba4d44c1c0a3bd84ffc465a Author: Ricardo Montania <rica...@linuxafundo.com.br> Date: Tue Dec 11 01:10:39 2012 -0200 String -> OUString in filter Change-Id: I9041129289c24c4ee8a7a6d50e34b785969e8204 diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx index 9182fad..9e9f462 100644 --- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx @@ -38,8 +38,6 @@ using namespace com::sun::star::container; using namespace com::sun::star::beans; using namespace com::sun::star::lang; -using ::rtl::OUString; - XMLFilterTabDialog::XMLFilterTabDialog( Window *pParent, ResMgr& rResMgr, const Reference< XMultiServiceFactory >& rxMSF, const filter_info_impl* pInfo ) : TabDialog( pParent, ResId( DLG_XML_FILTER_TABDIALOG, rResMgr ) ), mxMSF( rxMSF ), @@ -56,8 +54,8 @@ XMLFilterTabDialog::XMLFilterTabDialog( Window *pParent, ResMgr& rResMgr, const mpOldInfo = pInfo; mpNewInfo = new filter_info_impl( *mpOldInfo ); - String aTitle( GetText() ); - aTitle.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM("%s") ), mpNewInfo->maFilterName ); + OUString aTitle( GetText() ); + aTitle.replaceAll("%s", mpNewInfo->maFilterName); SetText( aTitle ); maTabCtrl.Show(); @@ -120,8 +118,8 @@ bool XMLFilterTabDialog::onOk() sal_uInt16 nErrorPage = 0; sal_uInt16 nErrorId = 0; Window* pFocusWindow = NULL; - String aReplace1; - String aReplace2; + OUString aReplace1; + OUString aReplace2; // 1. see if the filter name is ok if( (mpNewInfo->maFilterName.isEmpty()) || (mpNewInfo->maFilterName != mpOldInfo->maFilterName) ) @@ -135,7 +133,7 @@ bool XMLFilterTabDialog::onOk() { try { - Reference< XNameAccess > xFilterContainer( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" )) ), UNO_QUERY ); + Reference< XNameAccess > xFilterContainer( mxMSF->createInstance( "com.sun.star.document.FilterFactory" ), UNO_QUERY ); if( xFilterContainer.is() ) { if( xFilterContainer->hasByName( mpNewInfo->maFilterName ) ) @@ -167,7 +165,7 @@ bool XMLFilterTabDialog::onOk() { try { - Reference< XNameAccess > xFilterContainer( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" )) ), UNO_QUERY ); + Reference< XNameAccess > xFilterContainer( mxMSF->createInstance( "com.sun.star.document.FilterFactory" ), UNO_QUERY ); if( xFilterContainer.is() ) { Sequence< OUString > aFilterNames( xFilterContainer->getElementNames() ); @@ -275,16 +273,16 @@ bool XMLFilterTabDialog::onOk() ActivatePageHdl( &maTabCtrl ); ResId aResId( nErrorId, mrResMgr ); - String aMessage( aResId ); + OUString aMessage( aResId ); - if( aReplace2.Len() ) + if( aReplace2.getLength() ) { - aMessage.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM("%s1") ), aReplace1 ); - aMessage.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM("%s2") ), aReplace2 ); + aMessage.replaceAll( "%s1", aReplace1 ); + aMessage.replaceAll( "%s2", aReplace2 ); } - else if( aReplace1.Len() ) + else if( aReplace1.getLength() ) { - aMessage.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM("%s") ), aReplace1 ); + aMessage.replaceAll( "%s", aReplace1 ); } ErrorBox aBox(this, (WinBits)(WB_OK), aMessage ); commit e299004c7ab6b37cfe6c68aaf2fecb2a2e9c41bf Author: Marcos Paulo de Souza <marcos.souza....@gmail.com> Date: Mon Dec 10 20:29:03 2012 -0200 Remove UniString from uui module Change-Id: I6eb52f42c3364970553015492b9c488c04febed6 Signed-off-by: Marcos Paulo de Souza <marcos.souza....@gmail.com> diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx index d8bf1f5..e9620db 100644 --- a/uui/source/logindlg.cxx +++ b/uui/source/logindlg.cxx @@ -269,11 +269,11 @@ LoginDialog::LoginDialog aHelpBtn ( this, ResId( BTN_LOGIN_HELP, *pResMgr ) ) { - UniString aRequest; + OUString aRequest; if ((nFlags & LF_NO_ACCOUNT) != 0 && !rRealm.isEmpty()) { - aRequest = ResId(STR_LOGIN_REALM, *pResMgr).toString(); - aRequest.SearchAndReplaceAscii("%2", rRealm); + aRequest = OUString(ResId(STR_LOGIN_REALM, *pResMgr)); + aRequest.replaceAll("%2", rRealm); } else aRequest = aRequestInfo.GetText(); @@ -281,7 +281,7 @@ LoginDialog::LoginDialog if ( !( ( nFlags & LF_NO_USESYSCREDS ) == LF_NO_USESYSCREDS ) ) EnableUseSysCredsControls_Impl( aUseSysCredsCB.IsChecked() ); - aRequest.SearchAndReplaceAscii("%1", rServer); + aRequest.replaceAll("%1", rServer); aRequestInfo.SetText(aRequest); FreeResource(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits