summaryrefslogtreecommitdiffstats
path: root/sw/source/ui/config
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-14 13:20:53 +0200
committerNoel Grandin <noel@peralex.com>2013-10-15 12:25:48 +0200
commit4c943e5b826ede37b40a53e0cd086a8b98d0f7a8 (patch)
tree3cd8f0a42ccb0aa6954c88530f2e6ea0a54a9fb4 /sw/source/ui/config
parentconvert sw/source/ui/dbui/*.cxx from String to OUString (diff)
downloadcore-4c943e5b826ede37b40a53e0cd086a8b98d0f7a8.tar.gz
core-4c943e5b826ede37b40a53e0cd086a8b98d0f7a8.zip
convert sw/source/ui/config/*.cxx from String to OUString
Change-Id: Ib985a8794c1d7b5991d2b768fd77d92804625ab9
Diffstat (limited to 'sw/source/ui/config')
-rw-r--r--sw/source/ui/config/fontcfg.cxx6
-rw-r--r--sw/source/ui/config/optload.cxx36
-rw-r--r--sw/source/ui/config/optpage.cxx42
-rw-r--r--sw/source/ui/config/uinums.cxx12
4 files changed, 48 insertions, 48 deletions
diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx
index e7f417207b98..8fc5e8c8dd64 100644
--- a/sw/source/ui/config/fontcfg.cxx
+++ b/sw/source/ui/config/fontcfg.cxx
@@ -178,9 +178,9 @@ bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const
eCJK = MsLangId::resolveSystemLanguageByScriptType(aLinguOpt.nDefaultLanguage_CJK, ::com::sun::star::i18n::ScriptType::ASIAN),
eCTL = MsLangId::resolveSystemLanguageByScriptType(aLinguOpt.nDefaultLanguage_CTL, ::com::sun::star::i18n::ScriptType::COMPLEX);
- String sDefFont(GetDefaultFor(FONT_STANDARD, eWestern));
- String sDefFontCJK(GetDefaultFor(FONT_STANDARD_CJK, eCJK));
- String sDefFontCTL(GetDefaultFor(FONT_STANDARD_CTL, eCTL));
+ OUString sDefFont(GetDefaultFor(FONT_STANDARD, eWestern));
+ OUString sDefFontCJK(GetDefaultFor(FONT_STANDARD_CJK, eCJK));
+ OUString sDefFontCTL(GetDefaultFor(FONT_STANDARD_CTL, eCTL));
LanguageType eLang = lcl_LanguageOfType(nFontType, eWestern, eCJK, eCTL);
switch( nFontType )
{
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index f5569c1d21c1..1b1bf46569c9 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -84,7 +84,7 @@ SwLoadOptPage::SwLoadOptPage(Window* pParent, const SfxItemSet& rSet)
SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) );
for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i )
{
- String sMetric = aMetricArr.GetStringByPos( i );
+ OUString sMetric = aMetricArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i );
switch ( eFUnit )
@@ -554,13 +554,13 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
for ( sal_uLong i = 0; i < aObjS.Count(); ++i )
{
const SvGlobalName &rOleId = aObjS[i].GetClassName();
- String sClass;
+ OUString sClass;
if (rOleId == SvGlobalName(SO3_OUT_CLASSID))
sClass = aObjS[i].GetHumanName();
else
sClass = m_sOLE;
// don't show product version
- sClass.SearchAndReplace( sComplete, sWithoutVersion );
+ sClass = sClass.replaceFirst( sComplete, sWithoutVersion );
m_pCheckLB->InsertEntry( sClass );
SetOptions( nPos++, OLE_CAP, &rOleId );
}
@@ -724,7 +724,7 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
InsCaptionOpt* pOpt = (InsCaptionOpt*)pEntry->GetUserData();
pOpt->UseCaption() = m_pCheckLB->IsChecked((sal_uInt16)m_pCheckLB->GetModel()->GetAbsPos(pEntry));
- String aName( m_pCategoryBox->GetText() );
+ OUString aName( m_pCategoryBox->GetText() );
if (aName == m_sNone)
pOpt->SetCategory(aEmptyStr);
else
@@ -747,12 +747,12 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
IMPL_LINK_NOARG(SwCaptionOptPage, ModifyHdl)
{
- String sFldTypeName = m_pCategoryBox->GetText();
+ OUString sFldTypeName = m_pCategoryBox->GetText();
SfxNoLayoutSingleTabDialog *pDlg = dynamic_cast<SfxNoLayoutSingleTabDialog*>(GetParentDialog());
PushButton *pBtn = pDlg ? pDlg->GetOKButton() : NULL;
if (pBtn)
- pBtn->Enable(sFldTypeName.Len() != 0);
+ pBtn->Enable(!sFldTypeName.isEmpty());
bool bEnable = m_pCategoryBox->IsEnabled() && sFldTypeName != m_sNone;
m_pFormatText->Enable(bEnable);
@@ -790,7 +790,7 @@ IMPL_LINK( SwCaptionOptPage, OrderHdl, ListBox*, pBox )
void SwCaptionOptPage::DrawSample()
{
- String aStr;
+ OUString aStr;
if( m_pCategoryBox->GetText() != m_sNone)
{
@@ -806,11 +806,11 @@ void SwCaptionOptPage::DrawSample()
{
// category
aStr += m_pCategoryBox->GetText();
- aStr += ' ';
+ aStr += " ";
}
SwWrtShell *pSh = ::GetActiveWrtShell();
- String sFldTypeName( m_pCategoryBox->GetText() );
+ OUString sFldTypeName( m_pCategoryBox->GetText() );
if (pSh)
{
SwSetExpFieldType* pFldType = (SwSetExpFieldType*)pMgr->GetFldType(
@@ -822,23 +822,23 @@ void SwCaptionOptPage::DrawSample()
for( sal_uInt8 i = 0; i <= nLvl; ++i )
aNumVector.push_back(1);
- String sNumber( pSh->GetOutlineNumRule()->MakeNumString(
+ OUString sNumber( pSh->GetOutlineNumRule()->MakeNumString(
aNumVector, sal_False ));
- if( sNumber.Len() )
+ if( !sNumber.isEmpty() )
(aStr += sNumber) += pFldType->GetDelimiter();
}
}
switch( nNumFmt )
{
- case SVX_NUM_CHARS_UPPER_LETTER: aStr += 'A'; break;
- case SVX_NUM_CHARS_UPPER_LETTER_N: aStr += 'A'; break;
- case SVX_NUM_CHARS_LOWER_LETTER: aStr += 'a'; break;
- case SVX_NUM_CHARS_LOWER_LETTER_N: aStr += 'a'; break;
- case SVX_NUM_ROMAN_UPPER: aStr += 'I'; break;
- case SVX_NUM_ROMAN_LOWER: aStr += 'i'; break;
+ case SVX_NUM_CHARS_UPPER_LETTER: aStr += "A"; break;
+ case SVX_NUM_CHARS_UPPER_LETTER_N: aStr += "A"; break;
+ case SVX_NUM_CHARS_LOWER_LETTER: aStr += "a"; break;
+ case SVX_NUM_CHARS_LOWER_LETTER_N: aStr += "a"; break;
+ case SVX_NUM_ROMAN_UPPER: aStr += "I"; break;
+ case SVX_NUM_ROMAN_LOWER: aStr += "i"; break;
//case ARABIC:
- default: aStr += '1'; break;
+ default: aStr += "1"; break;
}
}
//#i61007# order of captions
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 1e368ef8cdeb..784a9b533b3a 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -119,7 +119,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) );
for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i )
{
- String sMetric = aMetricArr.GetStringByPos( i );
+ OUString sMetric = aMetricArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i );
switch ( eFUnit )
@@ -399,8 +399,8 @@ sal_Bool SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
if (m_pEndPageRB->IsChecked()) aAddPrinterAttr.nPrintPostIts =
POSTITS_ENDPAGE;
- String sFax = m_pFaxLB->GetSelectEntry();
- aAddPrinterAttr.sFaxName = sNone == sFax ? aEmptyStr : sFax;
+ OUString sFax = m_pFaxLB->GetSelectEntry();
+ aAddPrinterAttr.sFaxName = sNone == sFax ? aEmptyOUStr : sFax;
rCoreSet.Put(aAddPrinterAttr);
}
return bAttrModified;
@@ -465,7 +465,7 @@ IMPL_LINK_NOARG_INLINE_START(SwAddPrinterTabPage, AutoClickHdl)
}
IMPL_LINK_NOARG_INLINE_END(SwAddPrinterTabPage, AutoClickHdl)
-void SwAddPrinterTabPage::SetFax( const std::vector<String>& rFaxLst )
+void SwAddPrinterTabPage::SetFax( const std::vector<OUString>& rFaxLst )
{
m_pFaxLB->InsertEntry(sNone);
for(size_t i = 0; i < rFaxLst.size(); ++i)
@@ -493,7 +493,7 @@ void SwAddPrinterTabPage::PageCreated (SfxAllItemSet aSet)
}
if (pListItem && pListItem->GetValue())
{
- std::vector<String> aFaxList;
+ std::vector<OUString> aFaxList;
const std::vector<OUString>& rPrinters = Printer::GetPrinterQueues();
for (unsigned int i = 0; i < rPrinters.size(); ++i)
aFaxList.insert(aFaxList.begin(), rPrinters[i]);
@@ -592,7 +592,7 @@ SfxTabPage* SwStdFontTabPage::Create( Window* pParent,
}
static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
- SfxPrinter* pPrt, const String& rStyle,
+ SfxPrinter* pPrt, const OUString& rStyle,
sal_uInt16 nFontWhich)
{
Font aFont( rStyle, Size( 0, 10 ) );
@@ -617,11 +617,11 @@ sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& )
sal_Bool bNotDocOnly = !pDocOnlyCB->IsChecked();
SW_MOD()->GetModuleConfig()->SetDefaultFontInCurrDocOnly(!bNotDocOnly);
- String sStandard = pStandardBox->GetText();
- String sTitle = pTitleBox->GetText();
- String sList = pListBox->GetText();
- String sLabel = pLabelBox->GetText();
- String sIdx = pIdxBox->GetText();
+ OUString sStandard = pStandardBox->GetText();
+ OUString sTitle = pTitleBox->GetText();
+ OUString sList = pListBox->GetText();
+ OUString sLabel = pLabelBox->GetText();
+ OUString sIdx = pIdxBox->GetText();
bool bStandardHeightChanged = pStandardHeightLB->GetSavedValue() != pStandardHeightLB->GetText();
bool bTitleHeightChanged = pTitleHeightLB->GetSavedValue() != pTitleHeightLB->GetText();
@@ -785,7 +785,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
if( !pStandardBox->GetEntryCount() )
{
// get the set of disctinct available family names
- std::set< String > aFontNames;
+ std::set< OUString > aFontNames;
int nFontNames = pPrt->GetDevFontCount();
for( int i = 0; i < nFontNames; i++ )
{
@@ -794,7 +794,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
}
// insert to listboxes
- for( std::set< String >::const_iterator it = aFontNames.begin();
+ for( std::set< OUString >::const_iterator it = aFontNames.begin();
it != aFontNames.end(); ++it )
{
pStandardBox->InsertEntry( *it );
@@ -813,11 +813,11 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
{
pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue();
}
- String sStdBackup;
- String sOutBackup;
- String sListBackup;
- String sCapBackup;
- String sIdxBackup;
+ OUString sStdBackup;
+ OUString sOutBackup;
+ OUString sListBackup;
+ OUString sCapBackup;
+ OUString sIdxBackup;
sal_Int32 nStandardHeight = -1;
sal_Int32 nTitleHeight = -1;
sal_Int32 nListHeight = -1;
@@ -975,7 +975,7 @@ IMPL_LINK( SwStdFontTabPage, ModifyHdl, ComboBox*, pBox )
{
if(pBox == pStandardBox)
{
- String sEntry = pBox->GetText();
+ OUString sEntry = pBox->GetText();
if(bSetListDefault && bListDefault)
pListBox->SetText(sEntry);
if(bSetLabelDefault && bLabelDefault)
@@ -1028,7 +1028,7 @@ IMPL_LINK( SwStdFontTabPage, ModifyHeightHdl, FontSizeBox*, pBox )
IMPL_LINK( SwStdFontTabPage, LoseFocusHdl, ComboBox*, pBox )
{
FontSizeBox* pHeightLB = 0;
- String sEntry = pBox->GetText();
+ OUString sEntry = pBox->GetText();
if(pBox == pStandardBox)
{
pHeightLB = pStandardHeightLB;
@@ -1902,7 +1902,7 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
{
XColorEntry* pEntry = pColorLst->GetColor( i );
Color aColor = pEntry->GetColor();
- String sName = pEntry->GetName();
+ OUString sName = pEntry->GetName();
pInsertColorLB->InsertEntry( aColor, sName );
pDeletedColorLB->InsertEntry( aColor, sName );
diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx
index b2c98d5a7005..12bf8130b494 100644
--- a/sw/source/ui/config/uinums.cxx
+++ b/sw/source/ui/config/uinums.cxx
@@ -72,8 +72,8 @@ SwBaseNumRules::~SwBaseNumRules()
if( bModified )
{
SvtPathOptions aPathOpt;
- String sNm( aPathOpt.GetUserConfigPath() );
- sNm += INET_PATH_TOKEN;
+ OUString sNm( aPathOpt.GetUserConfigPath() );
+ sNm += OUString(INET_PATH_TOKEN);
sNm += sFileName;
INetURLObject aTempObj(sNm);
sNm = aTempObj.GetFull();
@@ -323,7 +323,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
short nShort;
sal_Char cChar;
sal_Bool bFlag;
- String sStr;
+ OUString sStr;
rStream >> nUS; aFmt.SetNumberingType((sal_Int16)nUS );
if( VERSION_53A > nVersion )
@@ -370,12 +370,12 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
short nWidth;
short nHeight;
sal_uInt16 nPitch;
- String aName;
+ OUString aName;
aName = rStream.ReadUniOrByteString(eEncoding);
rStream >> nFamily >> nCharSet >> nWidth >> nHeight >> nPitch;
- if( aName.Len() )
+ if( !aName.isEmpty() )
{
Font aFont( static_cast<FontFamily>(nFamily), Size( nWidth, nHeight ) );
aFont.SetName( aName );
@@ -454,7 +454,7 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
{
CharSet eEncoding = osl_getThreadTextEncoding();
{
- String aName;
+ OUString aName;
sal_uInt16 nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0;
short nWidth = 0, nHeight = 0;