[Libreoffice-commits] core.git: vcl/inc vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Mar 11 08:27:29 UTC 2019
vcl/inc/impglyphitem.hxx | 28 +++++++++-------------------
vcl/inc/sallayout.hxx | 2 +-
vcl/source/gdi/CommonSalLayout.cxx | 2 +-
vcl/source/gdi/impglyphitem.cxx | 8 ++++----
4 files changed, 15 insertions(+), 25 deletions(-)
New commits:
commit bea1fe240010d4870d2fd3877ee07ba31d1dcda0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Mar 11 08:15:13 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Mar 11 09:27:07 2019 +0100
merge SalLayoutGlyphsImpl and SalGenericLayoutGlyphsImpl
Change-Id: I5697d2b7961ce714835316879610f23aeabbd8ec
Reviewed-on: https://gerrit.libreoffice.org/69030
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/inc/impglyphitem.hxx b/vcl/inc/impglyphitem.hxx
index 009be6cc2506..24690216db63 100644
--- a/vcl/inc/impglyphitem.hxx
+++ b/vcl/inc/impglyphitem.hxx
@@ -92,33 +92,23 @@ VCL_DLLPUBLIC bool GlyphItem::GetGlyphOutline(basegfx::B2DPolyPolygon& rPoly) co
class SalLayoutGlyphsImpl : public std::vector<GlyphItem>
{
-protected:
- void SetPImpl(SalLayoutGlyphs* pFacade) { pFacade->m_pImpl = this; }
+ friend class GenericSalLayout;
public:
- virtual ~SalLayoutGlyphsImpl();
- virtual SalLayoutGlyphsImpl* clone(SalLayoutGlyphs&) const = 0;
- virtual bool IsValid() const = 0;
- virtual void Invalidate() = 0;
-};
-
-class SalGenericLayoutGlyphsImpl : public SalLayoutGlyphsImpl
-{
- friend class GenericSalLayout;
+ ~SalLayoutGlyphsImpl();
+ SalLayoutGlyphsImpl* clone(SalLayoutGlyphs& rGlyphs) const;
+ LogicalFontInstance& GetFont() const { return *m_rFontInstance; }
+ bool IsValid() const;
+ void Invalidate();
+private:
mutable rtl::Reference<LogicalFontInstance> m_rFontInstance;
- SalGenericLayoutGlyphsImpl(SalLayoutGlyphs& rGlyphs, LogicalFontInstance& rFontInstance)
+ SalLayoutGlyphsImpl(SalLayoutGlyphs& rGlyphs, LogicalFontInstance& rFontInstance)
: m_rFontInstance(&rFontInstance)
{
- SetPImpl(&rGlyphs);
+ rGlyphs.m_pImpl = this;
}
-
-public:
- SalLayoutGlyphsImpl* clone(SalLayoutGlyphs& rGlyphs) const override;
- LogicalFontInstance& GetFont() const { return *m_rFontInstance; }
- bool IsValid() const override;
- void Invalidate() override;
};
#endif // INCLUDED_VCL_IMPGLYPHITEM_HXX
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index 373b8e93695f..e71359e48165 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -182,7 +182,7 @@ public:
// used by display layers
LogicalFontInstance& GetFont() const
- { return static_cast<SalGenericLayoutGlyphsImpl*>(m_GlyphItems.Impl())->GetFont(); }
+ { return m_GlyphItems.Impl()->GetFont(); }
bool GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart,
const PhysicalFontFace** pFallbackFont = nullptr,
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index fad1000d880f..94dfa3b427a4 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -60,7 +60,7 @@ GenericSalLayout::GenericSalLayout(LogicalFontInstance &rFont)
: mpVertGlyphs(nullptr)
, mbFuzzing(utl::ConfigManager::IsFuzzing())
{
- new SalGenericLayoutGlyphsImpl(m_GlyphItems, rFont);
+ new SalLayoutGlyphsImpl(m_GlyphItems, rFont);
}
GenericSalLayout::~GenericSalLayout()
diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx
index 809b70bc91bc..64096020f172 100644
--- a/vcl/source/gdi/impglyphitem.cxx
+++ b/vcl/source/gdi/impglyphitem.cxx
@@ -55,14 +55,14 @@ void SalLayoutGlyphs::Invalidate()
SalLayoutGlyphsImpl::~SalLayoutGlyphsImpl() {}
-SalLayoutGlyphsImpl* SalGenericLayoutGlyphsImpl::clone(SalLayoutGlyphs& rGlyphs) const
+SalLayoutGlyphsImpl* SalLayoutGlyphsImpl::clone(SalLayoutGlyphs& rGlyphs) const
{
- SalLayoutGlyphsImpl* pNew = new SalGenericLayoutGlyphsImpl(rGlyphs, *m_rFontInstance);
+ SalLayoutGlyphsImpl* pNew = new SalLayoutGlyphsImpl(rGlyphs, *m_rFontInstance);
*pNew = *this;
return pNew;
}
-bool SalGenericLayoutGlyphsImpl::IsValid() const
+bool SalLayoutGlyphsImpl::IsValid() const
{
if (!m_rFontInstance.is())
return false;
@@ -79,7 +79,7 @@ bool SalGenericLayoutGlyphsImpl::IsValid() const
return true;
}
-void SalGenericLayoutGlyphsImpl::Invalidate()
+void SalLayoutGlyphsImpl::Invalidate()
{
m_rFontInstance.clear();
clear();
More information about the Libreoffice-commits
mailing list