vcl/inc/impglyphitem.hxx           |   13 ++++++-------
 vcl/source/gdi/CommonSalLayout.cxx |    4 ++--
 2 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit 5dc3bc1e951a5e1c485db8034d691bac4d42344a
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Mon Oct 25 14:44:12 2021 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Mon Oct 25 16:55:02 2021 +0200

    replace friend access with functions
    
    Change-Id: I11cb916285c72f7cd85ea5d5c943f23d0a4f6bc9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124148
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/vcl/inc/impglyphitem.hxx b/vcl/inc/impglyphitem.hxx
index 1942b9d159d5..ca9f7cf5c052 100644
--- a/vcl/inc/impglyphitem.hxx
+++ b/vcl/inc/impglyphitem.hxx
@@ -114,21 +114,20 @@ void GlyphItem::dropGlyph()
 
 class SalLayoutGlyphsImpl : public std::vector<GlyphItem>
 {
-    friend class GenericSalLayout;
-
 public:
+    SalLayoutGlyphsImpl(LogicalFontInstance& rFontInstance)
+        : m_rFontInstance(&rFontInstance)
+    {
+    }
     SalLayoutGlyphsImpl* clone() const;
     const rtl::Reference<LogicalFontInstance>& GetFont() const { return 
m_rFontInstance; }
     bool IsValid() const;
+    void SetFlags(SalLayoutFlags flags) { mnFlags = flags; }
+    SalLayoutFlags GetFlags() const { return mnFlags; }
 
 private:
     rtl::Reference<LogicalFontInstance> m_rFontInstance;
     SalLayoutFlags mnFlags = SalLayoutFlags::NONE;
-
-    SalLayoutGlyphsImpl(LogicalFontInstance& rFontInstance)
-        : m_rFontInstance(&rFontInstance)
-    {
-    }
 };
 
 #endif // INCLUDED_VCL_IMPGLYPHITEM_HXX
diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index 2028a4587695..13bc53ebbdab 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -268,7 +268,7 @@ bool 
GenericSalLayout::LayoutText(vcl::text::ImplLayoutArgs& rArgs, const SalLay
             if(!item.glyphId())
                 SetNeedFallback(rArgs, item.charPos(), item.IsRTLGlyph());
         // Some flags are set as a side effect of text layout, restore them 
here.
-        rArgs.mnFlags |= pGlyphs->mnFlags;
+        rArgs.mnFlags |= pGlyphs->GetFlags();
         return true;
     }
 
@@ -598,7 +598,7 @@ bool 
GenericSalLayout::LayoutText(vcl::text::ImplLayoutArgs& rArgs, const SalLay
 
     // Some flags are set as a side effect of text layout, save them here.
     if (rArgs.mnFlags & SalLayoutFlags::GlyphItemsOnly)
-        m_GlyphItems.mnFlags = rArgs.mnFlags;
+        m_GlyphItems.SetFlags(rArgs.mnFlags);
 
     return true;
 }

Reply via email to