summaryrefslogtreecommitdiff
path: root/filter/source/xsltdialog
diff options
context:
space:
mode:
authorRicardo Montania <ricardo@linuxafundo.com.br>2012-12-11 01:10:39 -0200
committerDavid Tardon <dtardon@redhat.com>2012-12-11 06:20:21 +0100
commita0c0b8cad98c8da86ba4d44c1c0a3bd84ffc465a (patch)
tree13884a1749fddebba100d5bc59229e169e55e495 /filter/source/xsltdialog
parente299004c7ab6b37cfe6c68aaf2fecb2a2e9c41bf (diff)
String -> OUString in filter
Change-Id: I9041129289c24c4ee8a7a6d50e34b785969e8204
Diffstat (limited to 'filter/source/xsltdialog')
-rw-r--r--filter/source/xsltdialog/xmlfiltertabdialog.cxx26
1 files changed, 12 insertions, 14 deletions
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index 9182fad1a92f..9e9f4620800c 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 );