summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-12-12 16:57:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-12-13 08:12:45 +0100
commitd59987b164bc32efe8f99ad49c139b4fc7ca3c2f (patch)
tree765652d6e940a5bdf43322ed54aa2f4c14116418 /vcl
parentb4641df5de7842d6a8fc2c4f839214bf01160c8c (diff)
loplugin:expandablemethods
Change-Id: I333d91ea5ce78c82e9bb107f934614efc7bfb8f7 Reviewed-on: https://gerrit.libreoffice.org/85078 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/wizdlg.hxx17
-rw-r--r--vcl/source/app/salvtables.cxx7
-rw-r--r--vcl/source/control/imivctl.hxx1
-rw-r--r--vcl/source/control/imivctl1.cxx7
-rw-r--r--vcl/source/control/roadmapwizard.cxx6
-rw-r--r--vcl/source/control/wizardmachine.cxx16
-rw-r--r--vcl/source/filter/png/pngread.cxx10
-rw-r--r--vcl/source/fontsubset/cff.cxx12
-rw-r--r--vcl/unx/generic/gdi/cairo_xlib_cairo.cxx2
-rw-r--r--vcl/unx/generic/gdi/cairo_xlib_cairo.hxx1
10 files changed, 15 insertions, 64 deletions
diff --git a/vcl/inc/wizdlg.hxx b/vcl/inc/wizdlg.hxx
index 5b25eab29671..eeb17934d617 100644
--- a/vcl/inc/wizdlg.hxx
+++ b/vcl/inc/wizdlg.hxx
@@ -92,12 +92,6 @@ namespace vcl
only to be used during construction, before any layouting happened
*/
void SetLeftAlignedButtonCount( sal_Int16 _nCount );
- /** declares the view area to have an empty margin
-
- Normally, the view area has a certain margin to the top/left/bottom/right of the
- dialog. By calling this method, you can reduce this margin to 0.
- */
- void SetEmptyViewMargin();
void CalcAndSetSize();
@@ -138,12 +132,6 @@ namespace vcl
void AddButton( Button* pButton, long nOffset = 0 );
void RemoveButton( Button* pButton );
- void SetPrevButton( PushButton* pButton ) { mpPrevBtn = pButton; }
- void SetNextButton( PushButton* pButton ) { mpNextBtn = pButton; }
-
- void SetViewWindow( vcl::Window* pWindow ) { mpViewWindow = pWindow; }
- void SetViewAlign( WindowAlign eAlign ) { meViewAlign = eAlign; }
-
void SetPageSizePixel( const Size& rSize ) { maPageSize = rSize; }
const Size& GetPageSizePixel() const { return maPageSize; }
@@ -192,11 +180,6 @@ namespace vcl
*/
WizardTypes::WizardState determineNextState(WizardTypes::WizardState nCurrentState) const;
- /** called when the finish button is pressed
- <p>By default, only the base class' Finish method (which is not virtual) is called</p>
- */
- bool onFinish();
-
/// travel to the next state
bool travelNext();
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 8237dbae57e3..920e8e7765e9 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6264,11 +6264,6 @@ public:
{
}
- VclBuilder& get_builder() const
- {
- return *m_xBuilder;
- }
-
virtual std::unique_ptr<weld::MessageDialog> weld_message_dialog(const OString &id, bool bTakeOwnership) override
{
MessageDialog* pMessageDialog = m_xBuilder->get<MessageDialog>(id);
@@ -6585,7 +6580,7 @@ public:
OString get_current_page_help_id() const
{
- TabControl *pCtrl = get_builder().get<TabControl>("tabcontrol");
+ TabControl *pCtrl = m_xBuilder->get<TabControl>("tabcontrol");
TabPage* pTabPage = pCtrl ? pCtrl->GetTabPage(pCtrl->GetCurPageId()) : nullptr;
vcl::Window *pTabChild = pTabPage ? pTabPage->GetWindow(GetWindowType::FirstChild) : nullptr;
pTabChild = pTabChild ? pTabChild->GetWindow(GetWindowType::FirstChild) : nullptr;
diff --git a/vcl/source/control/imivctl.hxx b/vcl/source/control/imivctl.hxx
index ce53dcc6a2f1..be3a6ea287c2 100644
--- a/vcl/source/control/imivctl.hxx
+++ b/vcl/source/control/imivctl.hxx
@@ -206,7 +206,6 @@ class SvxIconChoiceCtrl_Impl
);
void ClearSelectedRectList();
- void ClearColumnList();
tools::Rectangle CalcMaxTextRect( const SvxIconChoiceCtrlEntry* pEntry ) const;
void ClipAtVirtOutRect( tools::Rectangle& rRect ) const;
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index 353a92902aba..e268d15cf633 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -112,7 +112,7 @@ SvxIconChoiceCtrl_Impl::~SvxIconChoiceCtrl_Impl()
pGridMap.reset();
pDDBufDev.disposeAndClear();
ClearSelectedRectList();
- ClearColumnList();
+ m_pColumns.reset();
aVerSBar.disposeAndClear();
aHorSBar.disposeAndClear();
aScrBarBox.disposeAndClear();
@@ -2867,11 +2867,6 @@ bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
return true;
}
-void SvxIconChoiceCtrl_Impl::ClearColumnList()
-{
- m_pColumns.reset();
-}
-
void SvxIconChoiceCtrl_Impl::SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& rInfo)
{
if (!m_pColumns)
diff --git a/vcl/source/control/roadmapwizard.cxx b/vcl/source/control/roadmapwizard.cxx
index 160724c78ab3..a6c718039b22 100644
--- a/vcl/source/control/roadmapwizard.cxx
+++ b/vcl/source/control/roadmapwizard.cxx
@@ -147,7 +147,7 @@ namespace vcl
void RoadmapWizard::impl_construct()
{
SetLeftAlignedButtonCount( 1 );
- SetEmptyViewMargin();
+ mbEmptyViewMargin = true;
m_xRoadmapImpl->pRoadmap.disposeAndReset( VclPtr<ORoadmap>::Create( this, WB_TABSTOP ) );
m_xRoadmapImpl->pRoadmap->SetText( VclResId( STR_WIZDLG_ROADMAP_TITLE ) );
@@ -158,8 +158,8 @@ namespace vcl
aRoadmapSize.setHeight( GetSizePixel().Height() );
m_xRoadmapImpl->pRoadmap->SetSizePixel( aRoadmapSize );
- SetViewWindow( m_xRoadmapImpl->pRoadmap );
- SetViewAlign( WindowAlign::Left );
+ mpViewWindow = m_xRoadmapImpl->pRoadmap;
+ meViewAlign = WindowAlign::Left;
m_xRoadmapImpl->pRoadmap->Show();
}
diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx
index 2fced940867e..a92c4c4b68cb 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -97,11 +97,6 @@ namespace vcl
mnLeftAlignCount = _nCount;
}
- void RoadmapWizard::SetEmptyViewMargin()
- {
- mbEmptyViewMargin = true;
- }
-
void RoadmapWizard::ImplCalcSize( Size& rSize )
{
// calculate ButtonBar height and width
@@ -391,7 +386,7 @@ namespace vcl
AddButton( m_pPrevPage, ( WIZARDDIALOG_BUTTON_SMALLSTDOFFSET_X) ); // half x-offset to the next button
else
AddButton( m_pPrevPage, WIZARDDIALOG_BUTTON_STDOFFSET_X );
- SetPrevButton( m_pPrevPage );
+ mpPrevBtn = m_pPrevPage;
m_pPrevPage->SetClickHdl( LINK( this, RoadmapWizard, OnPrevPage ) );
}
@@ -406,7 +401,7 @@ namespace vcl
m_pNextPage->set_id("next");
AddButton( m_pNextPage, WIZARDDIALOG_BUTTON_STDOFFSET_X );
- SetNextButton( m_pNextPage );
+ mpNextBtn = m_pNextPage;
m_pNextPage->SetClickHdl( LINK( this, RoadmapWizard, OnNextPage ) );
}
@@ -730,11 +725,6 @@ namespace vcl
m_pCancel->Enable(_bEnable);
}
- bool RoadmapWizard::onFinish()
- {
- return Finish( RET_OK );
- }
-
IMPL_LINK_NOARG(RoadmapWizard, OnFinish, Button*, void)
{
if ( isTravelingSuspended() )
@@ -744,7 +734,7 @@ namespace vcl
{
return;
}
- onFinish();
+ Finish( RET_OK );
}
bool RoadmapWizard::prepareLeaveCurrentState( WizardTypes::CommitPageReason _eReason )
diff --git a/vcl/source/filter/png/pngread.cxx b/vcl/source/filter/png/pngread.cxx
index aa452bf51a01..1e89657cb807 100644
--- a/vcl/source/filter/png/pngread.cxx
+++ b/vcl/source/filter/png/pngread.cxx
@@ -147,7 +147,6 @@ private:
mpScanlineAlpha;
bool ReadNextChunk();
- void ReadRemainingChunks();
void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, const BitmapColor & );
void ImplSetPixel( sal_uInt32 y, sal_uInt32 x, sal_uInt8 nPalIndex );
@@ -318,15 +317,10 @@ bool PNGReaderImpl::ReadNextChunk()
return mnChunkType != PNGCHUNK_IEND;
}
-// read the remaining chunks from mrPNGStream
-void PNGReaderImpl::ReadRemainingChunks()
-{
- while( ReadNextChunk() ) ;
-}
-
const std::vector< vcl::PNGReader::ChunkData >& PNGReaderImpl::GetAllChunks()
{
- ReadRemainingChunks();
+ // read the remaining chunks from mrPNGStream
+ while( ReadNextChunk() ) ;
return maChunkSeq;
}
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 2db45ab57701..2698b22b54bc 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -328,10 +328,6 @@ public: // TODO: is public really needed?
void addHints( bool bVerticalHints);
// accessing other charstring specifics
- bool hasCharWidth() const { return (maCharWidth > 0);}
- ValType getCharWidth() const { return maCharWidth;}
- void setNominalWidth( ValType aWidth) { mpCffLocal->maNominalWidth = aWidth;}
- void setDefaultWidth( ValType aWidth) { mpCffLocal->maDefaultWidth = aWidth;}
void updateWidth( bool bUseFirstVal);
private:
@@ -382,7 +378,7 @@ inline int CffSubsetterContext::popInt()
inline void CffSubsetterContext::updateWidth( bool bUseFirstVal)
{
// the first value is not a hint but the charwidth
- if( hasCharWidth())
+ if( maCharWidth>0 )
return;
if( bUseFirstVal) {
@@ -463,8 +459,8 @@ void CffSubsetterContext::readDictOp()
case 16: break; // "nEncoding"
case 17: mnCharStrBase = nInt; break; // "nCharStrings"
case 19: mpCffLocal->mnLocalSubrOffs = nInt; break;// "nSubrs"
- case 20: setDefaultWidth( nVal ); break; // "defaultWidthX"
- case 21: setNominalWidth( nVal ); break; // "nominalWidthX"
+ case 20: mpCffLocal->maDefaultWidth = nVal; break; // "defaultWidthX"
+ case 21: mpCffLocal->maNominalWidth = nVal; break; // "nominalWidthX"
case 909: mpCffLocal->mfBlueScale = nVal; break; // "BlueScale"
case 910: mpCffLocal->mfBlueShift = nVal; break; // "BlueShift"
case 911: mpCffLocal->mfBlueFuzz = nVal; break; // "BlueFuzz"
@@ -1986,7 +1982,7 @@ void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
rEmitter.emitAllCrypted();
// provide individual glyphwidths if requested
if( pGlyphWidths ) {
- ValType aCharWidth = getCharWidth();
+ ValType aCharWidth = maCharWidth;
if( maFontMatrix.size() >= 4)
aCharWidth *= 1000.0F * maFontMatrix[0];
pGlyphWidths[i] = static_cast<sal_Int32>(aCharWidth);
diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
index 760a8d595903..3a825052189a 100644
--- a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
+++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
@@ -250,7 +250,7 @@ namespace cairo
aSystemGraphicsData.nSize = sizeof(SystemGraphicsData);
aSystemGraphicsData.hDrawable = mpPixmap ? mpPixmap->mhDrawable : maSysData.hDrawable;
- aSystemGraphicsData.pXRenderFormat = getRenderFormat();
+ aSystemGraphicsData.pXRenderFormat = maSysData.pRenderFormat;
int width = cairo_xlib_surface_get_width(mpSurface.get());
int height = cairo_xlib_surface_get_height(mpSurface.get());
diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx
index 60300ba634ce..0f280e6b764e 100644
--- a/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx
+++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.hxx
@@ -90,7 +90,6 @@ namespace cairo {
int getDepth() const;
DeviceFormat getFormat() const;
const X11PixmapSharedPtr& getPixmap() const { return mpPixmap; }
- void* getRenderFormat() const { return maSysData.pRenderFormat; }
};
}