summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-10-26 13:15:00 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-10-26 14:52:32 +0100
commitdbd0e001d83e3198c3ad4ec202a00577b608b3a4 (patch)
tree86a1befe74fd3a828092444ebec82651d0257721 /filter
parent266bc4d87f63564776d11448bfc1dd48415f59a0 (diff)
XubString->OUString
Change-Id: Ie54528ccf641b380eda1d1bb12b39d0536c4d17b
Diffstat (limited to 'filter')
-rw-r--r--filter/source/xsltdialog/xmlfiltercommon.hxx3
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx44
2 files changed, 24 insertions, 23 deletions
diff --git a/filter/source/xsltdialog/xmlfiltercommon.hxx b/filter/source/xsltdialog/xmlfiltercommon.hxx
index f00cbcf38ebc..40d0bf7d16ba 100644
--- a/filter/source/xsltdialog/xmlfiltercommon.hxx
+++ b/filter/source/xsltdialog/xmlfiltercommon.hxx
@@ -97,7 +97,8 @@ extern const application_info_impl* getApplicationInfo( const rtl::OUString& rSe
extern ResMgr* getXSLTDialogResMgr();
-#define RESID(x) ResId(x, *getXSLTDialogResMgr() )
+#define RESID(x) ResId(x, *getXSLTDialogResMgr())
+#define RESIDSTR(x) RESID(x).toString()
#endif
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 5337a2a89124..e066786ce44a 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -81,8 +81,8 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog( Window* pParent, ResMgr& rResM
mpFilterListBox->SetSelectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) );
mpFilterListBox->SetDeselectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) );
mpFilterListBox->SetDoubleClickHdl( LINK( this, XMLFilterSettingsDialog, DoubleClickHdl_Impl ) );
- mpFilterListBox->SetAccessibleName(String( RESID( STR_XML_FILTER_LISTBOX )));
- maCtrlFilterList.SetAccessibleName(String( RESID( STR_XML_FILTER_LISTBOX )));
+ mpFilterListBox->SetAccessibleName(RESIDSTR(STR_XML_FILTER_LISTBOX));
+ maCtrlFilterList.SetAccessibleName(RESIDSTR(STR_XML_FILTER_LISTBOX));
mpFilterListBox->SetHelpId( HID_XML_FILTER_LIST );
maPBNew.SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
@@ -234,14 +234,14 @@ void XMLFilterSettingsDialog::onNew()
filter_info_impl aTempInfo;
// create a unique filter name
- aTempInfo.maFilterName = createUniqueFilterName( String( RESID( STR_DEFAULT_FILTER_NAME ) ) );
+ aTempInfo.maFilterName = createUniqueFilterName(RESIDSTR(STR_DEFAULT_FILTER_NAME));
// init default extension
- String aDefaultExtension( RESID( STR_DEFAULT_EXTENSION ) );
+ String aDefaultExtension(RESIDSTR(STR_DEFAULT_EXTENSION));
aTempInfo.maExtension = aDefaultExtension;
// set default ui name
- aTempInfo.maInterfaceName = createUniqueInterfaceName( String( RESID( STR_DEFAULT_UI_NAME ) ) );
+ aTempInfo.maInterfaceName = createUniqueInterfaceName(RESIDSTR(STR_DEFAULT_UI_NAME));
// set default application
aTempInfo.maDocumentService = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ));
@@ -811,7 +811,7 @@ void XMLFilterSettingsDialog::onDelete()
filter_info_impl* pInfo = (filter_info_impl*)pEntry->GetUserData();
String aPlaceHolder( RTL_CONSTASCII_USTRINGPARAM("%s") );
- String aMessage(RESID(STR_WARN_DELETE));
+ String aMessage(RESIDSTR(STR_WARN_DELETE));
aMessage.SearchAndReplace( aPlaceHolder, pInfo->maFilterName );
WarningBox aWarnBox(this, (WinBits)(WB_YES_NO | WB_DEF_YES), aMessage );
@@ -916,7 +916,7 @@ void XMLFilterSettingsDialog::onSave()
0 );
String aExtensions( RTL_CONSTASCII_USTRINGPARAM("*.jar") );
- String aFilterName( RESID( STR_FILTER_PACKAGE ) );
+ String aFilterName(RESIDSTR(STR_FILTER_PACKAGE));
aFilterName += String( RTL_CONSTASCII_USTRINGPARAM(" (") );
aFilterName += aExtensions;
aFilterName += sal_Unicode(')');
@@ -935,13 +935,13 @@ void XMLFilterSettingsDialog::onSave()
String aMsg;
if( nFilters > 0 )
{
- aMsg = String( RESID( STR_FILTERS_HAVE_BEEN_SAVED ) );
+ aMsg = RESIDSTR(STR_FILTERS_HAVE_BEEN_SAVED);
aMsg.SearchAndReplace( sPlaceholder, String::CreateFromInt32(nFilters) );
aMsg.SearchAndReplace( sPlaceholder, aURL.GetName() );
}
else
{
- aMsg = String( RESID( STR_FILTER_HAS_BEEN_SAVED ) );
+ aMsg = RESIDSTR(STR_FILTER_HAS_BEEN_SAVED);
aMsg.SearchAndReplace( sPlaceholder, (*aFilters.begin())->maFilterName );
aMsg.SearchAndReplace( sPlaceholder, aURL.GetName() );
}
@@ -962,7 +962,7 @@ void XMLFilterSettingsDialog::onOpen()
com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
String aExtensions( RTL_CONSTASCII_USTRINGPARAM("*.jar") );
- String aFilterName( RESID( STR_FILTER_PACKAGE ) );
+ String aFilterName(RESIDSTR(STR_FILTER_PACKAGE));
aFilterName += String( RTL_CONSTASCII_USTRINGPARAM(" (") );
aFilterName += aExtensions;
aFilterName += sal_Unicode(')');
@@ -999,18 +999,18 @@ void XMLFilterSettingsDialog::onOpen()
if( nFilters == 0 )
{
INetURLObject aURLObj( aURL );
- aMsg = String( RESID( STR_NO_FILTERS_FOUND ) );
+ aMsg = RESIDSTR(STR_NO_FILTERS_FOUND);
aMsg.SearchAndReplace( sPlaceholder, aURLObj.GetName() );
}
else if( nFilters == 1 )
{
- aMsg = String( RESID( STR_FILTER_INSTALLED ) );
+ aMsg = RESIDSTR(STR_FILTER_INSTALLED);
aMsg.SearchAndReplace( sPlaceholder, aFilterName );
}
else
{
- aMsg = String( RESID( STR_FILTERS_INSTALLED ) );
+ aMsg = RESIDSTR(STR_FILTERS_INSTALLED);
aMsg.SearchAndReplace( sPlaceholder, String::CreateFromInt32(nFilters) );
}
@@ -1359,7 +1359,7 @@ OUString getApplicationUIName( const OUString& rServiceName )
}
else
{
- OUString aRet = String( RESID( STR_UNKNOWN_APPLICATION ) );
+ OUString aRet = RESIDSTR(STR_UNKNOWN_APPLICATION);
if( !rServiceName.isEmpty() )
{
aRet += OUString( RTL_CONSTASCII_USTRINGPARAM( " (" ));
@@ -1403,8 +1403,8 @@ XMLFilterListBox::XMLFilterListBox( SvxPathControl_Impl * pParent )
mpHeaderBar->SetPosSizePixel( Point( 0, 0 ), Size( aBoxSize.Width(), 16 ) );
mpHeaderBar->SetEndDragHdl( LINK( this, XMLFilterListBox, HeaderEndDrag_Impl ) );
- String aStr1( RESID( STR_COLUMN_HEADER_NAME ) );
- String aStr2( RESID( STR_COLUMN_HEADER_TYPE ) );
+ OUString aStr1(RESIDSTR(STR_COLUMN_HEADER_NAME));
+ OUString aStr2(RESIDSTR(STR_COLUMN_HEADER_TYPE));
long nTabSize = aBoxSize.Width() / 2;
@@ -1504,7 +1504,7 @@ IMPL_LINK( XMLFilterListBox, HeaderEndDrag_Impl, HeaderBar*, pBar )
/** adds a new filter info entry to the ui filter list */
void XMLFilterListBox::addFilterEntry( const filter_info_impl* pInfo )
{
- const XubString aEntryStr( getEntryString( pInfo ) );
+ const OUString aEntryStr( getEntryString( pInfo ) );
InsertEntryToColumn( aEntryStr, LIST_APPEND, 0xffff, (void*)pInfo );
}
@@ -1519,7 +1519,7 @@ void XMLFilterListBox::changeEntry( const filter_info_impl* pInfo )
SvTreeListEntry* pEntry = GetEntry( nPos );
if( (filter_info_impl*)pEntry->GetUserData() == pInfo )
{
- XubString aEntryText( getEntryString( pInfo ) );
+ OUString aEntryText( getEntryString( pInfo ) );
SetEntryText( aEntryText, pEntry );
break;
}
@@ -1545,20 +1545,20 @@ String XMLFilterListBox::getEntryString( const filter_info_impl* pInfo ) const
{
if( pInfo->maFlags & 2 )
{
- aEntryStr += String( RESID( STR_IMPORT_EXPORT ) );
+ aEntryStr += RESIDSTR(STR_IMPORT_EXPORT);
}
else
{
- aEntryStr += String( RESID( STR_IMPORT_ONLY ) );
+ aEntryStr += RESIDSTR(STR_IMPORT_ONLY);
}
}
else if( pInfo->maFlags & 2 )
{
- aEntryStr += String( RESID( STR_EXPORT_ONLY ) );
+ aEntryStr += RESIDSTR(STR_EXPORT_ONLY);
}
else
{
- aEntryStr += String( RESID( STR_UNDEFINED_FILTER ) );
+ aEntryStr += RESIDSTR(STR_UNDEFINED_FILTER);
}
return aEntryStr;