From 4680ce8790e1a3bd7da6800f4feb4e3a70aaa088 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Thu, 10 May 2018 13:34:13 +0200 Subject: Drop trivial, used only once, functions Change-Id: I387dd91464b211eb892dd4a3adc0b8dae6f84fa2 Reviewed-on: https://gerrit.libreoffice.org/54097 Tested-by: Jenkins Reviewed-by: Khaled Hosny --- vcl/inc/sallayout.hxx | 2 -- vcl/source/gdi/CommonSalLayout.cxx | 4 ++-- vcl/source/gdi/sallayout.cxx | 5 ----- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index e94dcefeea50..b3f02e969fff 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -342,8 +342,6 @@ private: GenericSalLayout( const GenericSalLayout& ) = delete; GenericSalLayout& operator=( const GenericSalLayout& ) = delete; - void AppendGlyph( const GlyphItem& ); - void Reserve(int size) { m_GlyphItems.reserve(size + 1); } void ApplyDXArray(ImplLayoutArgs&); void Justify(DeviceCoordinate nNewWidth); void ApplyAsianKerning(const OUString& rStr); diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index aac35c3b3f7b..546bd2f25ca2 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -274,7 +274,7 @@ bool GenericSalLayout::LayoutText(ImplLayoutArgs& rArgs) hb_face_t* pHbFace = hb_font_get_face(pHbFont); int nGlyphCapacity = 2 * (rArgs.mnEndCharPos - rArgs.mnMinCharPos); - Reserve(nGlyphCapacity); + m_GlyphItems.reserve(nGlyphCapacity); const int nLength = rArgs.mrStr.getLength(); const sal_Unicode *pStr = rArgs.mrStr.getStr(); @@ -571,7 +571,7 @@ bool GenericSalLayout::LayoutText(ImplLayoutArgs& rArgs) Point aNewPos(aCurrPos.X() + nXOffset, aCurrPos.Y() + nYOffset); const GlyphItem aGI(nCharPos, nCharCount, nGlyphIndex, aNewPos, nGlyphFlags, nAdvance, nXOffset); - AppendGlyph(aGI); + m_GlyphItems.push_back(aGI); aCurrPos.AdjustX(nAdvance ); } diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 2ec7ee80ed66..30a3240b628c 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -691,11 +691,6 @@ bool SalLayout::GetBoundRect( SalGraphics& rSalGraphics, tools::Rectangle& rRect return bRet; } -void GenericSalLayout::AppendGlyph( const GlyphItem& rGlyphItem ) -{ - m_GlyphItems.push_back(rGlyphItem); -} - DeviceCoordinate GenericSalLayout::FillDXArray( DeviceCoordinate* pCharWidths ) const { if( pCharWidths ) -- cgit