diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-04-15 07:35:33 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-04-18 07:36:53 +0200 |
commit | 17196e613b61e4f5ae3b714006dd2f449c75188d (patch) | |
tree | 74915f1145cdddfacc00cc5a832fa1e58bac168a /sw | |
parent | eb011eea8b1c1553fe73d4ceb557446a5b54e685 (diff) |
OUString: constify and remove a temporary
Change-Id: Iac24bd0de87dd97e752760ee54f40433bda1db41
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 2c2f02cbd076..7e3ada0ab75f 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -121,7 +121,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent, SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) ); for ( size_t i = 0; i < aMetricArr.Count(); ++i ) { - OUString sMetric = aMetricArr.GetStringByPos( i ); + const OUString sMetric = aMetricArr.GetStringByPos( i ); FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i ); switch ( eFUnit ) @@ -404,7 +404,7 @@ bool SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet ) if (m_pInMarginsRB->IsChecked()) aAddPrinterAttr.nPrintPostIts = POSTITS_INMARGINS; - OUString sFax = m_pFaxLB->GetSelectEntry(); + const OUString sFax = m_pFaxLB->GetSelectEntry(); aAddPrinterAttr.sFaxName = sNone == sFax ? aEmptyOUStr : sFax; rCoreSet.Put(aAddPrinterAttr); } @@ -624,11 +624,11 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet& ) sal_Bool bNotDocOnly = !pDocOnlyCB->IsChecked(); SW_MOD()->GetModuleConfig()->SetDefaultFontInCurrDocOnly(!bNotDocOnly); - OUString sStandard = pStandardBox->GetText(); - OUString sTitle = pTitleBox->GetText(); - OUString sList = pListBox->GetText(); - OUString sLabel = pLabelBox->GetText(); - OUString sIdx = pIdxBox->GetText(); + const OUString sStandard = pStandardBox->GetText(); + const OUString sTitle = pTitleBox->GetText(); + const OUString sList = pListBox->GetText(); + const OUString sLabel = pLabelBox->GetText(); + const OUString sIdx = pIdxBox->GetText(); bool bStandardHeightChanged = pStandardHeightLB->GetSavedValue() != pStandardHeightLB->GetText(); bool bTitleHeightChanged = pTitleHeightLB->GetSavedValue() != pTitleHeightLB->GetText(); @@ -759,13 +759,12 @@ void SwStdFontTabPage::Reset( const SfxItemSet& rSet) if( SFX_ITEM_SET == rSet.GetItemState(nLangSlot, false, &pLang)) eLanguage = ((const SvxLanguageItem*)pLang)->GetValue(); - OUString sTmp = pLabelFT->GetText(); OUString sToReplace = sScriptWestern; if(FONT_GROUP_CJK == nFontGroup ) sToReplace = sScriptAsian; else if(FONT_GROUP_CTL == nFontGroup ) sToReplace = sScriptComplex; - pLabelFT->SetText(sTmp.replaceFirst("%1", sToReplace)); + pLabelFT->SetText(pLabelFT->GetText().replaceFirst("%1", sToReplace)); const SfxPoolItem* pItem; @@ -981,7 +980,7 @@ IMPL_LINK( SwStdFontTabPage, ModifyHdl, ComboBox*, pBox ) { if(pBox == pStandardBox) { - OUString sEntry = pBox->GetText(); + const OUString sEntry = pBox->GetText(); if(bSetListDefault && bListDefault) pListBox->SetText(sEntry); if(bSetLabelDefault && bLabelDefault) @@ -1034,7 +1033,7 @@ IMPL_LINK( SwStdFontTabPage, ModifyHeightHdl, FontSizeBox*, pBox ) IMPL_LINK( SwStdFontTabPage, LoseFocusHdl, ComboBox*, pBox ) { FontSizeBox* pHeightLB = 0; - OUString sEntry = pBox->GetText(); + const OUString sEntry = pBox->GetText(); if(pBox == pStandardBox) { pHeightLB = pStandardHeightLB; @@ -1701,7 +1700,7 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent, for (sal_Int32 i = 0; i < pInsertLB->GetEntryCount(); ++i) { - OUString sEntry(pInsertLB->GetEntry(i)); + const OUString sEntry(pInsertLB->GetEntry(i)); pDeletedLB->InsertEntry(sEntry); pChangedLB->InsertEntry(sEntry); }; @@ -1901,7 +1900,7 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) { XColorEntry* pEntry = pColorLst->GetColor( i ); Color aColor = pEntry->GetColor(); - OUString sName = pEntry->GetName(); + const OUString sName = pEntry->GetName(); pInsertColorLB->InsertEntry( aColor, sName ); pDeletedColorLB->InsertEntry( aColor, sName ); |