summaryrefslogtreecommitdiff
path: root/cui/source/options/optsave.cxx
diff options
context:
space:
mode:
authorJean-Noël Rouvignac <jn.rouvignac@gmail.com>2013-01-20 10:51:58 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-01-22 14:25:15 +0000
commite13a3d566ecc34a46e037aca1b2d70e58501e422 (patch)
treeea7c6a3633a7a9ac33375a8e157ece0befe2e4a4 /cui/source/options/optsave.cxx
parentdf70e3fee18835303cff17294b1fd21b6dd9146e (diff)
fdo#38838 Some removal/replacement of the String/UniString with OUString
Also used the new OUString::number(...) methods. Change-Id: I3174c43d56d1ae359901bb8a13fe0096f2c74808 Reviewed-on: https://gerrit.libreoffice.org/1766 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'cui/source/options/optsave.cxx')
-rw-r--r--cui/source/options/optsave.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 394ece1bd0eb..14d3a193dbcd 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -423,12 +423,12 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
{
long nData = (long) aDocTypeLB.GetEntryData(n);
OUString sCommand;
- sCommand = "matchByDocumentService=%1:iflags=";
- sCommand += String::CreateFromInt32(SFX_FILTER_IMPORT|SFX_FILTER_EXPORT);
- sCommand += ":eflags=";
- sCommand += String::CreateFromInt32(SFX_FILTER_NOTINFILEDLG);
- sCommand += ":default_first";
- String sReplace;
+ sCommand = "matchByDocumentService=%1:iflags=" +
+ OUString::number(SFX_FILTER_IMPORT|SFX_FILTER_EXPORT) +
+ ":eflags=" +
+ OUString::number(SFX_FILTER_NOTINFILEDLG) +
+ ":default_first";
+ OUString sReplace;
switch(nData)
{
case APP_WRITER : sReplace = "com.sun.star.text.TextDocument"; break;
@@ -440,8 +440,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
case APP_MATH : sReplace = "com.sun.star.formula.FormulaProperties";break;
default: OSL_FAIL("illegal user data");
}
- String sTmp(sCommand);
- sTmp.SearchAndReplaceAscii("%1", sReplace);
+ OUString sTmp = sCommand.replaceFirst("%1", sReplace);
sCommand = sTmp;
Reference< XEnumeration > xList = xQuery->createSubSetEnumerationByQuery(sCommand);
SequenceAsVector< OUString > lList;