summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-18 13:00:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-19 06:26:00 +0000
commitdcb1fbef204ebe7b0a6ccdf70630aa217a8d0e94 (patch)
treec00d8972fd57a628b8d1376ef605dc5107502ff6 /cui
parent98b77ad1e6acbbdda4843a4b57c1185d53884581 (diff)
loplugin:expandablemethodds in cui
Change-Id: I7b2321d45171f9b73965efea32832a3789f0dee7 Reviewed-on: https://gerrit.libreoffice.org/30011 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/insdlg.cxx13
-rw-r--r--cui/source/dialogs/linkdlg.cxx14
-rw-r--r--cui/source/dialogs/pastedlg.cxx2
-rw-r--r--cui/source/inc/chardlg.hxx1
-rw-r--r--cui/source/inc/cuitabline.hxx1
-rw-r--r--cui/source/inc/insdlg.hxx6
-rw-r--r--cui/source/inc/linkdlg.hxx8
-rw-r--r--cui/source/inc/numfmt.hxx3
-rw-r--r--cui/source/inc/numpages.hxx2
-rw-r--r--cui/source/inc/page.hxx1
-rw-r--r--cui/source/inc/paragrph.hxx2
-rw-r--r--cui/source/inc/pastedlg.hxx1
-rw-r--r--cui/source/options/optcolor.cxx9
-rw-r--r--cui/source/options/optjsearch.cxx2
-rw-r--r--cui/source/options/optjsearch.hxx1
-rw-r--r--cui/source/options/optlingu.cxx9
-rw-r--r--cui/source/tabpages/chardlg.cxx8
-rw-r--r--cui/source/tabpages/numfmt.cxx19
-rw-r--r--cui/source/tabpages/numpages.cxx8
-rw-r--r--cui/source/tabpages/page.cxx2
-rw-r--r--cui/source/tabpages/paragrph.cxx7
-rw-r--r--cui/source/tabpages/tplneend.cxx8
22 files changed, 25 insertions, 102 deletions
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 2d72164caa68..eb6f18a1a089 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -209,11 +209,10 @@ short SvInsertOleDlg::Execute()
}
// fill listbox and select default
- ListBox& rBox = GetObjectTypes();
- rBox.SetUpdateMode( false );
+ m_pLbObjecttype->SetUpdateMode( false );
for ( sal_uLong i = 0; i < m_pServers->Count(); i++ )
- rBox.InsertEntry( (*m_pServers)[i].GetHumanName() );
- rBox.SetUpdateMode( true );
+ m_pLbObjecttype->InsertEntry( (*m_pServers)[i].GetHumanName() );
+ m_pLbObjecttype->SetUpdateMode( true );
SelectDefault();
OUString aName;
@@ -225,7 +224,7 @@ short SvInsertOleDlg::Execute()
if ( bCreateNew )
{
// create and insert new embedded object
- OUString aServerName = rBox.GetSelectEntry();
+ OUString aServerName = m_pLbObjecttype->GetSelectEntry();
const SvObjectServer* pS = m_pServers->Get( aServerName );
if ( pS )
{
@@ -299,12 +298,12 @@ short SvInsertOleDlg::Execute()
}
else
{
- aFileName = GetFilePath();
+ aFileName = m_pEdFilepath->GetText();
INetURLObject aURL;
aURL.SetSmartProtocol( INetProtocol::File );
aURL.SetSmartURL( aFileName );
aFileName = aURL.GetMainURL( INetURLObject::NO_DECODE );
- bool bLink = IsLinked();
+ bool bLink = m_pCbFilelink->IsChecked();
if ( !aFileName.isEmpty() )
{
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index bfd3d5bbaee2..d8201ba0e89a 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -424,7 +424,7 @@ IMPL_LINK_NOARG( SvBaseLinksDlg, BreakLinkClickHdl, Button*, void )
if( !xLink.Is() )
return;
- ScopedVclPtrInstance< QueryBox > aBox( this, WB_YES_NO | WB_DEF_YES, Closelinkmsg() );
+ ScopedVclPtrInstance< QueryBox > aBox( this, WB_YES_NO | WB_DEF_YES, aStrCloselinkmsg );
if( RET_YES == aBox->Execute() )
{
@@ -455,7 +455,7 @@ IMPL_LINK_NOARG( SvBaseLinksDlg, BreakLinkClickHdl, Button*, void )
}
else
{
- ScopedVclPtrInstance< QueryBox > aBox( this, WB_YES_NO | WB_DEF_YES, CloselinkmsgMulti() );
+ ScopedVclPtrInstance< QueryBox > aBox( this, WB_YES_NO | WB_DEF_YES, aStrCloselinkmsgMulti );
if( RET_YES == aBox->Execute() )
{
@@ -563,16 +563,16 @@ OUString SvBaseLinksDlg::ImplGetStateStr( const SvBaseLink& rLnk )
{
OUString sRet;
if( !rLnk.GetObj() )
- sRet = Brokenlink();
+ sRet = aStrBrokenlink;
else if( rLnk.GetObj()->IsPending() )
{
- sRet = Waitinglink();
- StartUpdateTimer();
+ sRet = aStrWaitinglink;
+ aUpdateIdle.Start();
}
else if( SfxLinkUpdateMode::ALWAYS == rLnk.GetUpdateMode() )
- sRet = Autolink();
+ sRet = aStrAutolink;
else
- sRet = Manuallink();
+ sRet = aStrManuallink;
return sRet;
}
diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx
index d6750ca7fad0..c0d5da6d506d 100644
--- a/cui/source/dialogs/pastedlg.cxx
+++ b/cui/source/dialogs/pastedlg.cxx
@@ -194,7 +194,7 @@ SotClipboardFormatId SvPasteObjectDialog::GetFormat( const TransferableDataHelpe
aTypeName = convertLineEnd(aTypeName, GetSystemLineEnd());
}
- ObjectSource().SetText( aTypeName );
+ m_pFtObjectSource->SetText( aTypeName );
if( Dialog::Execute() == RET_OK )
{
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 876e6f136da0..bea73e4f253e 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -243,7 +243,6 @@ public:
virtual void ChangesApplied() override;
void DisableControls( sal_uInt16 nDisable );
- void EnableFlash();
/// the writer uses SID_ATTR_BRUSH as font background
void SetPreviewBackgroundToCharacter();
virtual void PageCreated(const SfxAllItemSet& aSet) override;
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index 07f101f2c993..957b421ecd2f 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -367,7 +367,6 @@ private:
DECL_LINK( ClickLoadHdl_Impl, Button*, void );
DECL_LINK( ClickSaveHdl_Impl, Button*, void );
DECL_LINK( SelectLineEndHdl_Impl, ListBox&, void );
- void ChangePreviewHdl_Impl();
void CheckChanges_Impl();
diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx
index 40dffa18087c..14ddc4091977 100644
--- a/cui/source/inc/insdlg.hxx
+++ b/cui/source/inc/insdlg.hxx
@@ -73,12 +73,6 @@ class SvInsertOleDlg : public InsertObjectDialog_Impl
DECL_LINK(BrowseHdl, Button*, void);
DECL_LINK(RadioHdl, Button*, void);
void SelectDefault();
- ListBox& GetObjectTypes()
- { return *m_pLbObjecttype; }
- OUString GetFilePath() const
- { return m_pEdFilepath->GetText(); }
- bool IsLinked() const
- { return m_pCbFilelink->IsChecked(); }
bool IsCreateNew() const override
{ return m_pRbNewObject->IsChecked(); }
diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx
index 313b2cfa7646..fe52850394d7 100644
--- a/cui/source/inc/linkdlg.hxx
+++ b/cui/source/inc/linkdlg.hxx
@@ -78,14 +78,6 @@ class SvBaseLinksDlg : public ModalDialog
void SetType( sfx2::SvBaseLink& rLink, sal_uLong nPos, SfxLinkUpdateMode nType );
void InsertEntry( const sfx2::SvBaseLink& rLink, sal_uLong nPos = TREELIST_APPEND, bool bSelect = false);
- void StartUpdateTimer() { aUpdateIdle.Start(); }
-
- OUString& Autolink() { return aStrAutolink; }
- OUString& Manuallink() { return aStrManuallink; }
- OUString& Brokenlink() { return aStrBrokenlink; }
- OUString& Closelinkmsg() { return aStrCloselinkmsg; }
- OUString& CloselinkmsgMulti() { return aStrCloselinkmsgMulti; }
- OUString& Waitinglink() { return aStrWaitinglink; }
void SetManager( sfx2::LinkManager* );
public:
diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index 0446cbf047e7..eeed5e518492 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -79,10 +79,7 @@ public:
virtual DeactivateRC DeactivatePage ( SfxItemSet* pSet ) override;
void SetInfoItem( const SvxNumberInfoItem& rItem );
- void SetNumberFormatList( const SvxNumberInfoItem& rItem )
- { SetInfoItem( rItem ); }
- void SetOkHdl( const Link<SfxPoolItem*,void>& rOkHandler );
void HideLanguage(bool bFlag=true);
virtual bool PreNotify( NotifyEvent& rNEvt ) override;
virtual void PageCreated(const SfxAllItemSet& aSet) override;
diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx
index 101f62f28c0d..7f65cbf65511 100644
--- a/cui/source/inc/numpages.hxx
+++ b/cui/source/inc/numpages.hxx
@@ -145,7 +145,6 @@ public:
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
- void SetCharFormatName(const OUString& rName){sBulletCharFormatName = rName;}
virtual void PageCreated(const SfxAllItemSet& aSet) override;
};
@@ -354,7 +353,6 @@ public:
}
void SetMetric(FieldUnit eSet);
- ListBox& GetCharFmtListBox() {return *m_pCharFmtLB;}
void SetModified(bool bRepaint = true);
virtual void PageCreated(const SfxAllItemSet& aSet) override;
};
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index e4b739c730fe..4dd6e8078f26 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -200,7 +200,6 @@ public:
virtual ~SvxPageDescPage() override;
virtual void dispose() override;
- void SetMode( SvxModeType eMType ) { eMode = eMType; }
void SetPaperFormatRanges( Paper eStart, Paper eEnd )
{ ePaperStart = eStart; ePaperEnd = eEnd; }
diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 8b621f217bfe..c38f65a88b1f 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -111,8 +111,6 @@ public:
virtual void Reset( const SfxItemSet* rSet ) override;
virtual void ChangesApplied() override;
-
- void SetPageWidth( sal_uInt16 nPageWidth );
void EnableRelativeMode();
void EnableRegisterMode();
void EnableContextualMode();
diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx
index b43f4731d50a..2e0dec3a3c34 100644
--- a/cui/source/inc/pastedlg.hxx
+++ b/cui/source/inc/pastedlg.hxx
@@ -47,7 +47,6 @@ class SvPasteObjectDialog : public ModalDialog
OUString aObjName;
ListBox& ObjectLB() { return *m_pLbInsertList; }
- FixedText& ObjectSource() { return *m_pFtObjectSource; }
void SelectObject();
DECL_LINK( SelectHdl, ListBox&, void );
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index e41c82a09e07..cda0df95648f 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -198,10 +198,8 @@ private:
Chapter(vcl::Window *pGrid, unsigned nYPos, const OUString& sDisplayName);
~Chapter();
void dispose() { m_pText.disposeAndClear(); }
- public:
void SetBackground(const Wallpaper& W) { m_pText->SetBackground(W); }
void Show(const Wallpaper& rBackWall);
- void Hide();
};
// Entry -- a color config entry:
@@ -290,7 +288,7 @@ ColorConfigWindow_Impl::Chapter::Chapter(FixedText* pText, bool bShow)
: m_pText(pText)
{
if (!bShow)
- Hide();
+ m_pText->Hide();
}
// ctor for extended groups
@@ -318,11 +316,6 @@ void ColorConfigWindow_Impl::Chapter::Show(Wallpaper const& rBackWall)
m_pText->Show();
}
-void ColorConfigWindow_Impl::Chapter::Hide ()
-{
- m_pText->Hide();
-}
-
// ColorConfigWindow_Impl::Entry
diff --git a/cui/source/options/optjsearch.cxx b/cui/source/options/optjsearch.cxx
index 60fd15bbdea8..ce5f61aecd2a 100644
--- a/cui/source/options/optjsearch.cxx
+++ b/cui/source/options/optjsearch.cxx
@@ -238,7 +238,7 @@ bool SvxJSearchOptionsPage::FillItemSet( SfxItemSet* )
nTransliterationFlags = GetTransliterationFlags_Impl();
bool bModified = nOldVal != nTransliterationFlags;
- if (!IsSaveOptions())
+ if (!bSaveOptions)
return bModified;
bModified = false;
diff --git a/cui/source/options/optjsearch.hxx b/cui/source/options/optjsearch.hxx
index 2695c140e2b7..542e1c1a9b9f 100644
--- a/cui/source/options/optjsearch.hxx
+++ b/cui/source/options/optjsearch.hxx
@@ -66,7 +66,6 @@ public:
virtual void Reset( const SfxItemSet* rSet ) override;
virtual bool FillItemSet( SfxItemSet* rSet ) override;
- bool IsSaveOptions() const { return bSaveOptions; }
void EnableSaveOptions( bool bVal ) { bSaveOptions = bVal; }
sal_Int32 GetTransliterationFlags() const { return nTransliterationFlags; }
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 6e3c09993cff..1901cc60bdb5 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -384,8 +384,6 @@ class OptionsUserData
{
sal_uLong nVal;
- void SetModified();
-
public:
explicit OptionsUserData( sal_uLong nUserData ) : nVal( nUserData ) {}
OptionsUserData( sal_uInt16 nEID,
@@ -421,15 +419,10 @@ void OptionsUserData::SetNumericValue( sal_uInt8 nNumVal )
{
nVal &= 0xffffff00;
nVal |= (nNumVal);
- SetModified();
+ nVal |= (sal_uLong)1 << 11; // mark as modified
}
}
-void OptionsUserData::SetModified()
-{
- nVal |= (sal_uLong)1 << 11;
-}
-
// class BrwString_Impl -------------------------------------------------
class BrwString_Impl : public SvLBoxString
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 1d270844ce60..d1b7b8b50c28 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2580,12 +2580,6 @@ void SvxCharEffectsPage::DisableControls( sal_uInt16 nDisable )
}
}
-void SvxCharEffectsPage::EnableFlash()
-{
- m_pBlinkingBtn->Show();
-}
-
-
void SvxCharEffectsPage::SetPreviewBackgroundToCharacter()
{
m_bPreviewBackgroundToCharacter = true;
@@ -2603,7 +2597,7 @@ void SvxCharEffectsPage::PageCreated(const SfxAllItemSet& aSet)
{
sal_uInt32 nFlags=pFlagItem->GetValue();
if ( ( nFlags & SVX_ENABLE_FLASH ) == SVX_ENABLE_FLASH )
- EnableFlash();
+ m_pBlinkingBtn->Show();
if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER )
SetPreviewBackgroundToCharacter();
}
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index cd726724aad8..5ba83a25ffad 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1784,21 +1784,6 @@ bool SvxNumberFormatTabPage::PreNotify( NotifyEvent& rNEvt )
return SfxTabPage::PreNotify( rNEvt );
}
-/*************************************************************************
-#* Method: SetOkHdl
-#*------------------------------------------------------------------------
-#*
-#* Class: SvxNumberFormatTabPage
-#* Function: Resets the OkHandler.
-#* Input: new OkHandler
-#* Output: ---
-#*
-#************************************************************************/
-
-void SvxNumberFormatTabPage::SetOkHdl( const Link<SfxPoolItem*,void>& rOkHandler )
-{
- fnOkHdl = rOkHandler;
-}
void SvxNumberFormatTabPage::FillCurrencyBox()
{
@@ -1860,9 +1845,9 @@ void SvxNumberFormatTabPage::PageCreated(const SfxAllItemSet& aSet)
const SvxNumberInfoItem* pNumberInfoItem = aSet.GetItem<SvxNumberInfoItem>(SID_ATTR_NUMBERFORMAT_INFO, false);
const SfxLinkItem* pLinkItem = aSet.GetItem<SfxLinkItem>(SID_LINK_TYPE, false);
if (pNumberInfoItem)
- SetNumberFormatList(*pNumberInfoItem);
+ SetInfoItem(*pNumberInfoItem);
if (pLinkItem)
- SetOkHdl(pLinkItem->GetValue());
+ fnOkHdl = pLinkItem->GetValue();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 1d7ab68557e5..fc2719c15c77 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -525,13 +525,10 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, DoubleClickHdl_Impl, ValueSet*, void)
void SvxBulletPickTabPage::PageCreated(const SfxAllItemSet& aSet)
{
-
const SfxStringItem* pBulletCharFmt = aSet.GetItem<SfxStringItem>(SID_BULLET_CHAR_FMT, false);
if (pBulletCharFmt)
- SetCharFormatName( pBulletCharFmt->GetValue());
-
-
+ sBulletCharFormatName = pBulletCharFmt->GetValue();
}
@@ -3610,11 +3607,10 @@ void SvxNumOptionsTabPage::PageCreated(const SfxAllItemSet& aSet)
if (pListItem)
{
- ListBox& myCharFmtLB = GetCharFmtListBox();
const std::vector<OUString> &aList = pListItem->GetList();
sal_uInt32 nCount = aList.size();
for(sal_uInt32 i = 0; i < nCount; i++)
- myCharFmtLB.InsertEntry(aList[i]);
+ m_pCharFmtLB->InsertEntry(aList[i]);
}
if (pMetricItem)
SetMetric(static_cast<FieldUnit>(pMetricItem->GetValue()));
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index b15879f5af5e..0c9d42a68e07 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1705,7 +1705,7 @@ void SvxPageDescPage::PageCreated(const SfxAllItemSet& aSet)
if (pModeItem)
{
- SetMode((SvxModeType)pModeItem->GetEnumValue());
+ eMode = (SvxModeType)pModeItem->GetEnumValue();
}
if(pPaperStartItem && pPaperEndItem)
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 55a080c66d2d..e8ffffa958b1 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -932,11 +932,6 @@ IMPL_LINK( SvxStdParagraphTabPage, AutoHdl_Impl, Button*, pBox, void )
m_pFLineIndent->Enable(bEnable);
}
-void SvxStdParagraphTabPage::SetPageWidth( sal_uInt16 nPageWidth )
-{
- nWidth = nPageWidth;
-}
-
void SvxStdParagraphTabPage::EnableAutoFirstLine()
{
m_pAutoCB->Show();
@@ -963,7 +958,7 @@ void SvxStdParagraphTabPage::PageCreated(const SfxAllItemSet& aSet)
const SfxUInt32Item* pLineDistItem = aSet.GetItem<SfxUInt32Item>(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST, false);
if (pPageWidthItem)
- SetPageWidth(pPageWidthItem->GetValue());
+ nWidth = pPageWidthItem->GetValue();
if (pFlagSetItem )
if (( 0x0001 & pFlagSetItem->GetValue())== 0x0001 )
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index aa0067b63020..15a1ed469f17 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -305,12 +305,6 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, SelectLineEndHdl_Impl, ListBox&, void)
}
-void SvxLineEndDefTabPage::ChangePreviewHdl_Impl()
-{
- m_pCtlPreview->Invalidate();
-}
-
-
IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl, Button*, void)
{
sal_Int32 nPos = m_pLbLineEnds->GetSelectEntryPos();
@@ -518,7 +512,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickDeleteHdl_Impl, Button*, void)
*pnLineEndListState |= ChangeType::MODIFIED;
- ChangePreviewHdl_Impl();
+ m_pCtlPreview->Invalidate();
}
}
// determine button state