diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-05-20 08:53:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-05-20 09:47:55 +0100 |
commit | a5c5c71ba600296171591378dc78f24204eda631 (patch) | |
tree | 13fcb1e9c3ce02c632495550b00e5e67acb2df12 | |
parent | 483887183b1b3015c468719d77b9fb38c05e52fb (diff) |
adjust for return by ref instead of pointer
-rw-r--r-- | cui/source/options/opthtml.cxx | 74 | ||||
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 58 |
2 files changed, 66 insertions, 66 deletions
diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx index 8dcdb124e088..a3016e6f55e0 100644 --- a/cui/source/options/opthtml.cxx +++ b/cui/source/options/opthtml.cxx @@ -124,66 +124,66 @@ SfxTabPage* OfaHtmlTabPage::Create( Window* pParent, sal_Bool OfaHtmlTabPage::FillItemSet( SfxItemSet& ) { - SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get(); + SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get(); if(aSize1NF.GetSavedValue() != aSize1NF.GetText()) - pHtmlOpt->SetFontSize(0, (sal_uInt16)aSize1NF.GetValue()); + rHtmlOpt.SetFontSize(0, (sal_uInt16)aSize1NF.GetValue()); if(aSize2NF.GetSavedValue() != aSize2NF.GetText()) - pHtmlOpt->SetFontSize(1, (sal_uInt16)aSize2NF.GetValue()); + rHtmlOpt.SetFontSize(1, (sal_uInt16)aSize2NF.GetValue()); if(aSize3NF.GetSavedValue() != aSize3NF.GetText()) - pHtmlOpt->SetFontSize(2, (sal_uInt16)aSize3NF.GetValue()); + rHtmlOpt.SetFontSize(2, (sal_uInt16)aSize3NF.GetValue()); if(aSize4NF.GetSavedValue() != aSize4NF.GetText()) - pHtmlOpt->SetFontSize(3, (sal_uInt16)aSize4NF.GetValue()); + rHtmlOpt.SetFontSize(3, (sal_uInt16)aSize4NF.GetValue()); if(aSize5NF.GetSavedValue() != aSize5NF.GetText()) - pHtmlOpt->SetFontSize(4, (sal_uInt16)aSize5NF.GetValue()); + rHtmlOpt.SetFontSize(4, (sal_uInt16)aSize5NF.GetValue()); if(aSize6NF.GetSavedValue() != aSize6NF.GetText()) - pHtmlOpt->SetFontSize(5, (sal_uInt16)aSize6NF.GetValue()); + rHtmlOpt.SetFontSize(5, (sal_uInt16)aSize6NF.GetValue()); if(aSize7NF.GetSavedValue() != aSize7NF.GetText()) - pHtmlOpt->SetFontSize(6, (sal_uInt16)aSize7NF.GetValue()); + rHtmlOpt.SetFontSize(6, (sal_uInt16)aSize7NF.GetValue()); if(aNumbersEnglishUSCB.IsChecked() != aNumbersEnglishUSCB.GetSavedValue()) - pHtmlOpt->SetNumbersEnglishUS(aNumbersEnglishUSCB.IsChecked()); + rHtmlOpt.SetNumbersEnglishUS(aNumbersEnglishUSCB.IsChecked()); if(aUnknownTagCB.IsChecked() != aUnknownTagCB.GetSavedValue()) - pHtmlOpt->SetImportUnknown(aUnknownTagCB.IsChecked()); + rHtmlOpt.SetImportUnknown(aUnknownTagCB.IsChecked()); if(aIgnoreFontNamesCB.IsChecked() != aIgnoreFontNamesCB.GetSavedValue()) - pHtmlOpt->SetIgnoreFontFamily(aIgnoreFontNamesCB.IsChecked()); + rHtmlOpt.SetIgnoreFontFamily(aIgnoreFontNamesCB.IsChecked()); if(aExportLB.GetSelectEntryPos() != aExportLB.GetSavedValue()) - pHtmlOpt->SetExportMode(aPosToExportArr[aExportLB.GetSelectEntryPos()]); + rHtmlOpt.SetExportMode(aPosToExportArr[aExportLB.GetSelectEntryPos()]); if(aStarBasicCB.IsChecked() != aStarBasicCB.GetSavedValue()) - pHtmlOpt->SetStarBasic(aStarBasicCB.IsChecked()); + rHtmlOpt.SetStarBasic(aStarBasicCB.IsChecked()); if(aStarBasicWarningCB.IsChecked() != aStarBasicWarningCB.GetSavedValue()) - pHtmlOpt->SetStarBasicWarning(aStarBasicWarningCB.IsChecked()); + rHtmlOpt.SetStarBasicWarning(aStarBasicWarningCB.IsChecked()); if(aSaveGrfLocalCB.IsChecked() != aSaveGrfLocalCB.GetSavedValue()) - pHtmlOpt->SetSaveGraphicsLocal(aSaveGrfLocalCB.IsChecked()); + rHtmlOpt.SetSaveGraphicsLocal(aSaveGrfLocalCB.IsChecked()); if(aPrintExtensionCB.IsChecked() != aPrintExtensionCB.GetSavedValue()) - pHtmlOpt->SetPrintLayoutExtension(aPrintExtensionCB.IsChecked()); + rHtmlOpt.SetPrintLayoutExtension(aPrintExtensionCB.IsChecked()); - if( aCharSetLB.GetSelectTextEncoding() != pHtmlOpt->GetTextEncoding() ) - pHtmlOpt->SetTextEncoding( aCharSetLB.GetSelectTextEncoding() ); + if( aCharSetLB.GetSelectTextEncoding() != rHtmlOpt.GetTextEncoding() ) + rHtmlOpt.SetTextEncoding( aCharSetLB.GetSelectTextEncoding() ); return sal_False; } void OfaHtmlTabPage::Reset( const SfxItemSet& ) { - SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get(); - aSize1NF.SetValue(pHtmlOpt->GetFontSize(0)); - aSize2NF.SetValue(pHtmlOpt->GetFontSize(1)); - aSize3NF.SetValue(pHtmlOpt->GetFontSize(2)); - aSize4NF.SetValue(pHtmlOpt->GetFontSize(3)); - aSize5NF.SetValue(pHtmlOpt->GetFontSize(4)); - aSize6NF.SetValue(pHtmlOpt->GetFontSize(5)); - aSize7NF.SetValue(pHtmlOpt->GetFontSize(6)); - aNumbersEnglishUSCB.Check(pHtmlOpt->IsNumbersEnglishUS()); - aUnknownTagCB.Check(pHtmlOpt->IsImportUnknown()); - aIgnoreFontNamesCB.Check(pHtmlOpt->IsIgnoreFontFamily()); - sal_uInt16 nExport = pHtmlOpt->GetExportMode(); + SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get(); + aSize1NF.SetValue(rHtmlOpt.GetFontSize(0)); + aSize2NF.SetValue(rHtmlOpt.GetFontSize(1)); + aSize3NF.SetValue(rHtmlOpt.GetFontSize(2)); + aSize4NF.SetValue(rHtmlOpt.GetFontSize(3)); + aSize5NF.SetValue(rHtmlOpt.GetFontSize(4)); + aSize6NF.SetValue(rHtmlOpt.GetFontSize(5)); + aSize7NF.SetValue(rHtmlOpt.GetFontSize(6)); + aNumbersEnglishUSCB.Check(rHtmlOpt.IsNumbersEnglishUS()); + aUnknownTagCB.Check(rHtmlOpt.IsImportUnknown()); + aIgnoreFontNamesCB.Check(rHtmlOpt.IsIgnoreFontFamily()); + sal_uInt16 nExport = rHtmlOpt.GetExportMode(); if( nExport >= SAL_N_ELEMENTS( aExportToPosArr ) ) nExport = 4; // default for bad config entry is NS 4.0 sal_uInt16 nPosArr = aExportToPosArr[ nExport ]; @@ -194,11 +194,11 @@ void OfaHtmlTabPage::Reset( const SfxItemSet& ) ExportHdl_Impl(&aExportLB); - aStarBasicCB .Check(pHtmlOpt->IsStarBasic()); - aStarBasicWarningCB .Check(pHtmlOpt->IsStarBasicWarning()); + aStarBasicCB .Check(rHtmlOpt.IsStarBasic()); + aStarBasicWarningCB .Check(rHtmlOpt.IsStarBasicWarning()); aStarBasicWarningCB.Enable(!aStarBasicCB.IsChecked()); - aSaveGrfLocalCB.Check(pHtmlOpt->IsSaveGraphicsLocal()); - aPrintExtensionCB.Check(pHtmlOpt->IsPrintLayoutExtension()); + aSaveGrfLocalCB.Check(rHtmlOpt.IsSaveGraphicsLocal()); + aPrintExtensionCB.Check(rHtmlOpt.IsPrintLayoutExtension()); aPrintExtensionCB.SaveValue(); aStarBasicCB .SaveValue(); @@ -215,9 +215,9 @@ void OfaHtmlTabPage::Reset( const SfxItemSet& ) aUnknownTagCB.SaveValue(); aIgnoreFontNamesCB.SaveValue(); - if( !pHtmlOpt->IsDefaultTextEncoding() && - aCharSetLB.GetSelectTextEncoding() != pHtmlOpt->GetTextEncoding() ) - aCharSetLB.SelectTextEncoding( pHtmlOpt->GetTextEncoding() ); + if( !rHtmlOpt.IsDefaultTextEncoding() && + aCharSetLB.GetSelectTextEncoding() != rHtmlOpt.GetTextEncoding() ) + aCharSetLB.SelectTextEncoding( rHtmlOpt.GetTextEncoding() ); } IMPL_LINK(OfaHtmlTabPage, ExportHdl_Impl, ListBox*, pBox) diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 4eb25d799bc1..a41467a5035b 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -117,7 +117,7 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) : else { // remove smart tag tab page if no extensions are installed - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); if ( !pOpt || !pOpt->pSmartTagMgr || 0 == pOpt->pSmartTagMgr->NumberOfRecognizers() ) RemoveTabPage(RID_OFAPAGE_SMARTTAG_OPTIONS); @@ -230,7 +230,7 @@ SfxTabPage* OfaAutocorrOptionsPage::Create( Window* pParent, sal_Bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) { - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); long nFlags = pAutoCorrect->GetFlags(); sal_uInt16 nPos = 0; @@ -246,9 +246,9 @@ sal_Bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet& ) sal_Bool bReturn = nFlags != pAutoCorrect->GetFlags(); if(bReturn ) { - SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get(); - pCfg->SetModified(); - pCfg->Commit(); + SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get(); + rCfg.SetModified(); + rCfg.Commit(); } return bReturn; } @@ -260,7 +260,7 @@ void OfaAutocorrOptionsPage::ActivatePage( const SfxItemSet& ) void OfaAutocorrOptionsPage::Reset( const SfxItemSet& ) { - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); const long nFlags = pAutoCorrect->GetFlags(); aCheckLB.SetUpdateMode(sal_False); @@ -545,7 +545,7 @@ SfxTabPage* OfaSwAutoFmtOptionsPage::Create( Window* pParent, sal_Bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) { sal_Bool bModified = sal_False; - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); long nFlags = pAutoCorrect->GetFlags(); @@ -650,9 +650,9 @@ sal_Bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& ) if(bModified || nFlags != pAutoCorrect->GetFlags()) { - SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get(); - pCfg->SetModified(); - pCfg->Commit(); + SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get(); + rCfg.SetModified(); + rCfg.Commit(); } return sal_True; @@ -670,7 +670,7 @@ void OfaSwAutoFmtOptionsPage::ActivatePage( const SfxItemSet& ) void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet& ) { - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); const long nFlags = pAutoCorrect->GetFlags(); @@ -1022,7 +1022,7 @@ int OfaAutocorrReplacePage::DeactivatePage( SfxItemSet* ) sal_Bool OfaAutocorrReplacePage::FillItemSet( SfxItemSet& ) { - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); DoubleStringArrayPtr pDoubleStringArray = aDoubleStringTable.Last(); while(pDoubleStringArray) { @@ -1221,7 +1221,7 @@ void OfaAutocorrReplacePage::RefillReplaceBox(sal_Bool bFromReset, } else { - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); SvxAutocorrWordList* pWordList = pAutoCorrect->LoadAutocorrWordList(eLang); for(sal_uInt16 i = 0; i < pWordList->Count(); i++) @@ -1571,7 +1571,7 @@ int OfaAutocorrExceptPage::DeactivatePage( SfxItemSet* ) sal_Bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet& ) { - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); StringsArraysPtr pArrays = aStringsTable.Last(); while(pArrays) { @@ -1752,7 +1752,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(sal_Bool bFromReset, } else { - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); const SvStringsISortDtor* pCplList = pAutoCorrect->GetCplSttExceptList(eLang); const SvStringsISortDtor* pWrdList = pAutoCorrect->GetWrdSttExceptList(eLang); sal_uInt16 i; @@ -1769,7 +1769,7 @@ void OfaAutocorrExceptPage::RefillReplaceBoxes(sal_Bool bFromReset, void OfaAutocorrExceptPage::Reset( const SfxItemSet& ) { - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); RefillReplaceBoxes(sal_True, eLang, eLang); aAutoAbbrevCB. Check( pAutoCorrect->IsAutoCorrFlag( SaveWordCplSttLst )); aAutoCapsCB. Check( pAutoCorrect->IsAutoCorrFlag( SaveWordWrdSttLst )); @@ -2002,7 +2002,7 @@ SfxTabPage* OfaQuoteTabPage::Create( Window* pParent, sal_Bool OfaQuoteTabPage::FillItemSet( SfxItemSet& ) { - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); long nFlags = pAutoCorrect->GetFlags(); @@ -2061,9 +2061,9 @@ sal_Bool OfaQuoteTabPage::FillItemSet( SfxItemSet& ) if( bModified || bReturn ) { - SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get(); - pCfg->SetModified(); - pCfg->Commit(); + SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get(); + rCfg.SetModified(); + rCfg.Commit(); } return bReturn; } @@ -2075,7 +2075,7 @@ void OfaQuoteTabPage::ActivatePage( const SfxItemSet& ) void OfaQuoteTabPage::Reset( const SfxItemSet& ) { - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); const long nFlags = pAutoCorrect->GetFlags(); // Initialize the Sw options @@ -2151,7 +2151,7 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn ) LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE, 0 )); pMap->SetText(nMode < SGL_END ? sStartQuoteDlg : sEndQuoteDlg ); sal_UCS4 cDlg; - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); LanguageType eLang = Application::GetSettings().GetLanguage(); switch( nMode ) { @@ -2317,7 +2317,7 @@ SfxTabPage* OfaAutoCompleteTabPage::Create( Window* pParent, sal_Bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) { sal_Bool bModified = sal_False, bCheck; - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); sal_uInt16 nVal; @@ -2360,16 +2360,16 @@ sal_Bool OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) } if( bModified ) { - SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get(); - pCfg->SetModified(); - pCfg->Commit(); + SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get(); + rCfg.SetModified(); + rCfg.Commit(); } return sal_True; } void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) { - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); aCBActiv.Check( 0 != pOpt->bAutoCompleteWords ); @@ -2674,7 +2674,7 @@ IMPL_LINK(OfaSmartTagOptionsTabPage, SelectHdl, SvxCheckListBox*, EMPTYARG) */ sal_Bool OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) { - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); SmartTagMgr* pSmartTagMgr = pOpt->pSmartTagMgr; @@ -2717,7 +2717,7 @@ sal_Bool OfaSmartTagOptionsTabPage::FillItemSet( SfxItemSet& ) */ void OfaSmartTagOptionsTabPage::Reset( const SfxItemSet& ) { - SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect(); + SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); SvxSwAutoFmtFlags *pOpt = &pAutoCorrect->GetSwFlags(); const SmartTagMgr* pSmartTagMgr = pOpt->pSmartTagMgr; |