summaryrefslogtreecommitdiff
path: root/cui/source/options
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/options')
-rw-r--r--cui/source/options/cfgchart.cxx35
-rw-r--r--cui/source/options/cfgchart.hxx4
-rw-r--r--cui/source/options/connpooloptions.cxx4
-rw-r--r--cui/source/options/dbregister.cxx5
-rw-r--r--cui/source/options/fontsubs.cxx12
-rw-r--r--cui/source/options/optcolor.cxx2
-rw-r--r--cui/source/options/optgdlg.cxx54
-rw-r--r--cui/source/options/optinet2.cxx18
-rw-r--r--cui/source/options/optpath.cxx3
-rw-r--r--cui/source/options/optsave.cxx15
-rw-r--r--cui/source/options/treeopt.cxx4
11 files changed, 74 insertions, 82 deletions
diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx
index 4f0139974f35..0f79ebfbdd40 100644
--- a/cui/source/options/cfgchart.cxx
+++ b/cui/source/options/cfgchart.cxx
@@ -124,16 +124,16 @@ void SvxChartColorTable::useDefault()
String SvxChartColorTable::getDefaultName( size_t _nIndex )
{
- String aName;
+ OUString aName;
- if (sDefaultNamePrefix.Len() == 0)
+ if (sDefaultNamePrefix.getLength() == 0)
{
- String aResName( CUI_RES( RID_SVXSTR_DIAGRAM_ROW ) );
- xub_StrLen nPos = aResName.SearchAscii( "$(ROW)" );
- if( nPos != STRING_NOTFOUND )
+ OUString aResName( CUI_RES( RID_SVXSTR_DIAGRAM_ROW ) );
+ sal_Int32 nPos = aResName.indexOf( "$(ROW)" );
+ if( nPos != -1 )
{
- sDefaultNamePrefix = String( aResName, 0, nPos );
- sDefaultNamePostfix = String( aResName, nPos + sizeof( "$(ROW)" ) - 1, STRING_LEN );
+ sDefaultNamePrefix = aResName.copy( 0, nPos );
+ sDefaultNamePostfix = aResName.copy( nPos + sizeof( "$(ROW)" ) - 1 );
}
else
{
@@ -141,9 +141,7 @@ String SvxChartColorTable::getDefaultName( size_t _nIndex )
}
}
- aName = sDefaultNamePrefix;
- aName.Append( String::CreateFromInt32 ( _nIndex + 1 ) );
- aName.Append( sDefaultNamePostfix );
+ aName = sDefaultNamePrefix + OUString::number(_nIndex + 1) + sDefaultNamePostfix;
nNextElementNumber++;
return aName;
@@ -218,13 +216,14 @@ sal_Bool SvxChartOptions::RetrieveOptions()
Color aCol;
// create strings for entry names
- String aResName( CUI_RES( RID_SVXSTR_DIAGRAM_ROW ) );
- String aPrefix, aPostfix, aName;
- xub_StrLen nPos = aResName.SearchAscii( "$(ROW)" );
- if( nPos != STRING_NOTFOUND )
+ OUString aResName( CUI_RES( RID_SVXSTR_DIAGRAM_ROW ) );
+ OUString aPrefix, aPostfix, aName;
+ sal_Int32 nPos = aResName.indexOf( "$(ROW)" );
+ if( nPos != -1 )
{
- aPrefix = String( aResName, 0, nPos );
- aPostfix = String( aResName, nPos + sizeof( "$(ROW)" ) - 1, STRING_LEN );
+ aPrefix = aResName.copy( 0, nPos );
+ sal_Int32 idx = nPos + sizeof( "$(ROW)" ) - 1;
+ aPostfix = aResName.copy( idx, aResName.getLength()-idx );
}
else
aPrefix = aResName;
@@ -234,9 +233,7 @@ sal_Bool SvxChartOptions::RetrieveOptions()
{
aCol.SetColor( (static_cast< ColorData >(aColorSeq[ i ] )));
- aName = aPrefix;
- aName.Append( String::CreateFromInt32( i + 1 ));
- aName.Append( aPostfix );
+ aName = aPrefix + OUString::number(i + 1) + aPostfix;
maDefColors.append( XColorEntry( aCol, aName ));
}
diff --git a/cui/source/options/cfgchart.hxx b/cui/source/options/cfgchart.hxx
index d3f995ef9b01..1319702a5d46 100644
--- a/cui/source/options/cfgchart.hxx
+++ b/cui/source/options/cfgchart.hxx
@@ -36,8 +36,8 @@ class SvxChartColorTable
private:
::std::vector< XColorEntry > m_aColorEntries;
int nNextElementNumber;
- String sDefaultNamePrefix;
- String sDefaultNamePostfix;
+ OUString sDefaultNamePrefix;
+ OUString sDefaultNamePostfix;
public:
SvxChartColorTable();
diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx
index 56b094ccde7e..381a8f4fda9b 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -225,7 +225,7 @@ namespace offapp
break;
case 3:
if (_rPos->bEnabled)
- sReturn = String::CreateFromInt32(_rPos->nTimeoutSeconds);
+ sReturn = OUString::number(_rPos->nTimeoutSeconds);
break;
default:
OSL_FAIL("DriverListControl::implGetCellText: invalid column id!");
@@ -440,7 +440,7 @@ namespace offapp
m_aDriver.SetText(pDriverPos->sName);
m_aDriverPoolingEnabled.Check(pDriverPos->bEnabled);
- m_aTimeout.SetText(String::CreateFromInt32(pDriverPos->nTimeoutSeconds));
+ m_aTimeout.SetText(OUString::number(pDriverPos->nTimeoutSeconds));
OnEnabledDisabled(&m_aDriverPoolingEnabled);
}
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index aa500b45a96c..d6ccf4f36e04 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -266,11 +266,10 @@ void DbRegistrationOptionsPage::Reset( const SfxItemSet& rSet )
void DbRegistrationOptionsPage::FillUserData()
{
- String aUserData = String::CreateFromInt32( pHeaderBar->GetItemSize( ITEMID_TYPE ) );
- aUserData += ';';
+ OUString aUserData = OUString::number( pHeaderBar->GetItemSize( ITEMID_TYPE ) ) + ";";
HeaderBarItemBits nBits = pHeaderBar->GetItemBits( ITEMID_TYPE );
sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
- aUserData += (bUp ? '1' : '0');
+ aUserData += (bUp ? OUString("1") : OUString("0"));
SetUserData( aUserData );
}
// -----------------------------------------------------------------------
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 1ce2e89c4281..c15f1578af75 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -135,15 +135,15 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent,
sal_uInt16 nHeight;
for(nHeight = 6; nHeight <= 16; nHeight++)
- aFontHeightLB.InsertEntry(String::CreateFromInt32(nHeight));
+ aFontHeightLB.InsertEntry(OUString::number(nHeight));
for(nHeight = 18; nHeight <= 28; nHeight+= 2)
- aFontHeightLB.InsertEntry(String::CreateFromInt32(nHeight));
+ aFontHeightLB.InsertEntry(OUString::number(nHeight));
for(nHeight = 32; nHeight <= 48; nHeight+= 4)
- aFontHeightLB.InsertEntry(String::CreateFromInt32(nHeight));
+ aFontHeightLB.InsertEntry(OUString::number(nHeight));
for(nHeight = 54; nHeight <= 72; nHeight+= 6)
- aFontHeightLB.InsertEntry(String::CreateFromInt32(nHeight));
+ aFontHeightLB.InsertEntry(OUString::number(nHeight));
for(nHeight = 80; nHeight <= 96; nHeight+= 8)
- aFontHeightLB.InsertEntry(String::CreateFromInt32(nHeight));
+ aFontHeightLB.InsertEntry(OUString::number(nHeight));
}
SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(String& rFont1, String& rFont2)
@@ -262,7 +262,7 @@ void SvxFontSubstTabPage::Reset( const SfxItemSet& )
else
aFontNameLB.SelectEntryPos(0);
aFontHeightLB.SelectEntry(
- String::CreateFromInt32(
+ OUString::number(
officecfg::Office::Common::Font::SourceViewFont::FontHeight::
get()));
aNonPropFontsOnlyCB.SaveValue();
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index cc217e40b0d1..632ac9eb9b82 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -1402,7 +1402,7 @@ IMPL_LINK(SvxColorOptionsTabPage, CheckNameHdl_Impl, AbstractSvxNameDialog*, pDi
void SvxColorOptionsTabPage::FillUserData()
{
- SetUserData(String::CreateFromInt32(pColorConfigCT->GetScrollPosition()));
+ SetUserData(OUString::number(pColorConfigCT->GetScrollPosition()));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 9bbfab856e90..cca9402c5ded 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -407,19 +407,19 @@ IMPL_LINK( OfaMiscTabPage, TwoFigureHdl, NumericField*, pEd )
{
(void)pEd;
- String aOutput( aStrDateInfo );
- String aStr( aYearValueField.GetText() );
- String sSep( SvtSysLocale().GetLocaleData().getNumThousandSep() );
- xub_StrLen nIndex = 0;
- while ((nIndex = aStr.Search( sSep, nIndex)) != STRING_NOTFOUND)
- aStr.Erase( nIndex, sSep.Len());
- long nNum = aStr.ToInt32();
- if ( aStr.Len() != 4 || nNum < aYearValueField.GetMin() || nNum > aYearValueField.GetMax() )
- aOutput.AppendAscii("????");
+ OUString aOutput( aStrDateInfo );
+ OUString aStr( aYearValueField.GetText() );
+ OUString sSep( SvtSysLocale().GetLocaleData().getNumThousandSep() );
+ sal_Int32 nIndex = 0;
+ while ((nIndex = aStr.indexOf( sSep, nIndex)) != -1)
+ aStr = aStr.replaceAt( nIndex, sSep.getLength(), "");
+ sal_Int32 nNum = aStr.toInt32();
+ if ( aStr.getLength() != 4 || nNum < aYearValueField.GetMin() || nNum > aYearValueField.GetMax() )
+ aOutput += "????";
else
{
nNum += 99;
- aOutput += String::CreateFromInt32( nNum );
+ aOutput += OUString::number( nNum );
}
aToYearFT.SetText( aOutput );
return 0;
@@ -430,7 +430,7 @@ IMPL_LINK( OfaMiscTabPage, TwoFigureHdl, NumericField*, pEd )
IMPL_LINK( OfaMiscTabPage, TwoFigureConfigHdl, NumericField*, pEd )
{
sal_Int64 nNum = aYearValueField.GetValue();
- rtl::OUString aOutput(rtl::OUString::valueOf(nNum));
+ rtl::OUString aOutput(rtl::OUString::number(nNum));
aYearValueField.SetText(aOutput);
aYearValueField.SetSelection( Selection( 0, aOutput.getLength() ) );
TwoFigureHdl( pEd );
@@ -1185,11 +1185,11 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
// initialize user interface language selection
SvtLanguageTable* pLanguageTable = new SvtLanguageTable;
- const String aStr( pLanguageTable->GetString( LANGUAGE_SYSTEM ) );
+ const OUString aStr( pLanguageTable->GetString( LANGUAGE_SYSTEM ) );
- String aUILang(aStr);
- aUILang += rtl::OUString(" - ");
- aUILang += pLanguageTable->GetString( Application::GetSettings().GetUILanguageTag().getLanguageType(), true );
+ OUString aUILang = aStr +
+ " - " +
+ pLanguageTable->GetString( Application::GetSettings().GetUILanguageTag().getLanguageType(), true );
aUserInterfaceLB.InsertEntry(aUILang);
aUserInterfaceLB.SetEntryData(0, 0);
@@ -1214,7 +1214,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
if (aLang != LANGUAGE_DONTKNOW)
{
//sal_uInt16 p = aUserInterfaceLB.InsertLanguage(aLang);
- String aLangStr( pLanguageTable->GetString( aLang, true ) );
+ OUString aLangStr( pLanguageTable->GetString( aLang, true ) );
sal_uInt16 p = aUserInterfaceLB.InsertEntry(aLangStr);
aUserInterfaceLB.SetEntryData(p, (void*)(i+1));
}
@@ -1261,23 +1261,21 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
const NfCurrencyTable& rCurrTab = SvNumberFormatter::GetTheCurrencyTable();
const NfCurrencyEntry& rCurr = SvNumberFormatter::GetCurrencyEntry( LANGUAGE_SYSTEM );
// insert SYSTEM entry
- String aDefaultCurr(aStr);
- aDefaultCurr += rtl::OUString(" - ");
- aDefaultCurr += rCurr.GetBankSymbol();
+ OUString aDefaultCurr = aStr + " - " + rCurr.GetBankSymbol();
aCurrencyLB.InsertEntry( aDefaultCurr );
// all currencies
- String aTwoSpace( RTL_CONSTASCII_USTRINGPARAM( " " ) );
+ OUString aTwoSpace( " " );
sal_uInt16 nCurrCount = rCurrTab.size();
// first entry is SYSTEM, skip it
for ( sal_uInt16 j=1; j < nCurrCount; ++j )
{
const NfCurrencyEntry* pCurr = &rCurrTab[j];
- String aStr_( pCurr->GetBankSymbol() );
- aStr_ += aTwoSpace;
- aStr_ += pCurr->GetSymbol();
- aStr_ = ApplyLreOrRleEmbedding( aStr_ );
- aStr_ += aTwoSpace;
- aStr_ += ApplyLreOrRleEmbedding( pLanguageTable->GetString( pCurr->GetLanguage() ) );
+ OUString aStr_ = pCurr->GetBankSymbol() +
+ aTwoSpace +
+ pCurr->GetSymbol();
+ aStr_ = ApplyLreOrRleEmbedding( aStr_ ) +
+ aTwoSpace +
+ ApplyLreOrRleEmbedding( pLanguageTable->GetString( pCurr->GetLanguage() ) );
sal_uInt16 nPos = aCurrencyLB.InsertEntry( aStr_ );
aCurrencyLB.SetEntryData( nPos, (void*) pCurr );
}
@@ -1840,8 +1838,8 @@ IMPL_LINK( OfaLanguagesTabPage, LocaleSettingHdl, SvxLanguageBox*, pBox )
LocaleDataWrapper aLocaleWrapper( aLanguageTag );
// update the decimal separator key of the related CheckBox
- String sTempLabel(sDecimalSeparatorLabel);
- sTempLabel.SearchAndReplaceAscii("%1", aLocaleWrapper.getNumDecimalSep() );
+ OUString sTempLabel(sDecimalSeparatorLabel);
+ sTempLabel = sTempLabel.replaceFirst("%1", aLocaleWrapper.getNumDecimalSep() );
aDecimalSeparatorCB.SetText(sTempLabel);
// update the date acceptance patterns
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 37a4c63d0e7f..9bccdd0ddd55 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -241,7 +241,7 @@ void SvxProxyTabPage::ReadConfigData_Impl()
if( xNameAccess->getByName(aHttpPortPN) >>= nIntValue )
{
- aHttpPortED.SetText( String::CreateFromInt32( nIntValue ));
+ aHttpPortED.SetText( OUString::number( nIntValue ));
}
if( xNameAccess->getByName(aHttpsProxyPN) >>= aStringValue )
@@ -251,7 +251,7 @@ void SvxProxyTabPage::ReadConfigData_Impl()
if( xNameAccess->getByName(aHttpsPortPN) >>= nIntValue )
{
- aHttpsPortED.SetText( String::CreateFromInt32( nIntValue ));
+ aHttpsPortED.SetText( OUString::number( nIntValue ));
}
if( xNameAccess->getByName(aFtpProxyPN) >>= aStringValue )
@@ -261,7 +261,7 @@ void SvxProxyTabPage::ReadConfigData_Impl()
if( xNameAccess->getByName(aFtpPortPN) >>= nIntValue )
{
- aFtpPortED.SetText( String::CreateFromInt32( nIntValue ));
+ aFtpPortED.SetText( OUString::number( nIntValue ));
}
if( xNameAccess->getByName(aNoProxyDescPN) >>= aStringValue )
@@ -300,7 +300,7 @@ void SvxProxyTabPage::ReadConfigDefaults_Impl()
if( xPropertyState->getPropertyDefault(aHttpPortPN) >>= nIntValue )
{
- aHttpPortED.SetText( String::CreateFromInt32( nIntValue ));
+ aHttpPortED.SetText( OUString::number( nIntValue ));
}
if( xPropertyState->getPropertyDefault(aHttpsProxyPN) >>= aStringValue )
@@ -310,7 +310,7 @@ void SvxProxyTabPage::ReadConfigDefaults_Impl()
if( xPropertyState->getPropertyDefault(aHttpsPortPN) >>= nIntValue )
{
- aHttpsPortED.SetText( String::CreateFromInt32( nIntValue ));
+ aHttpsPortED.SetText( OUString::number( nIntValue ));
}
if( xPropertyState->getPropertyDefault(aFtpProxyPN) >>= aStringValue )
@@ -320,7 +320,7 @@ void SvxProxyTabPage::ReadConfigDefaults_Impl()
if( xPropertyState->getPropertyDefault(aFtpPortPN) >>= nIntValue )
{
- aFtpPortED.SetText( String::CreateFromInt32( nIntValue ));
+ aFtpPortED.SetText( OUString::number( nIntValue ));
}
if( xPropertyState->getPropertyDefault(aNoProxyDescPN) >>= aStringValue )
@@ -609,11 +609,11 @@ void SvxScriptExecListBox::RequestHelp( const HelpEvent& rHEvt )
}
else // if not, nothing happens.
return;
- String aHelpText;
+ OUString aHelpText;
if( nPos <= nTop+nCount-1 ) // if find the matching entry, get its content.
aHelpText = GetEntry(nPos);
- if( aHelpText.Len() && GetTextWidth(aHelpText)<GetOutputSizePixel().Width() )
- aHelpText.Erase(); // if the entry is quite short, clear the helping tip content.
+ if( aHelpText.getLength() && GetTextWidth(aHelpText)<GetOutputSizePixel().Width() )
+ aHelpText = OUString(); // if the entry is quite short, clear the helping tip content.
aItemRect = Rectangle(Point(0,0),GetSizePixel());
aPt = Point(OutputToScreenPixel( aItemRect.TopLeft() ));
aItemRect.Left() = aPt.X();
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 09632725f8e9..577eb297967b 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -380,8 +380,7 @@ void SvxPathTabPage::Reset( const SfxItemSet& )
void SvxPathTabPage::FillUserData()
{
- String aUserData = String::CreateFromInt32( pHeaderBar->GetItemSize( ITEMID_TYPE ) );
- aUserData += ';';
+ String aUserData = OUString::number( pHeaderBar->GetItemSize( ITEMID_TYPE ) ) + ";";
HeaderBarItemBits nBits = pHeaderBar->GetItemBits( ITEMID_TYPE );
sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
aUserData += bUp ? '1' : '0';
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;
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 30cffee230f2..78646f103902 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -553,7 +553,7 @@ OfaTreeOptionsDialog::~OfaTreeOptionsDialog()
String aPageData(pPageInfo->m_pPage->GetUserData());
if ( aPageData.Len() )
{
- SvtViewOptions aTabPageOpt( E_TABPAGE, String::CreateFromInt32( pPageInfo->m_nPageId ) );
+ SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number( pPageInfo->m_nPageId) );
SetViewOptUserItem( aTabPageOpt, aPageData );
}
delete pPageInfo->m_pPage;
@@ -1071,7 +1071,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
DBG_ASSERT( pPageInfo->m_pPage, "tabpage could not created");
if ( pPageInfo->m_pPage )
{
- SvtViewOptions aTabPageOpt( E_TABPAGE, String::CreateFromInt32( pPageInfo->m_nPageId ) );
+ SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number( pPageInfo->m_nPageId) );
pPageInfo->m_pPage->SetUserData( GetViewOptUserItem( aTabPageOpt ) );
Point aPagePos( aSeparatorFL.GetPosPixel().X(), aTreeLB.GetPosPixel().Y());