[Libreoffice-commits] core.git: include/vcl vcl/inc

Chris Sherlock chris.sherlock79 at gmail.com
Wed Jan 13 14:27:01 PST 2016


 include/vcl/metric.hxx |    3 ---
 vcl/inc/impfont.hxx    |    2 --
 2 files changed, 5 deletions(-)

New commits:
commit 5cb1fe674f93a882f0be1d487c5e9bb46d26e8dc
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Thu Jan 14 09:23:02 2016 +1100

    vcl: ImpFontMetric and FontMetric no longer friends with OutputDevice
    
    Exposng your private members as public is bad, but its also
    unacceptable to allow friends to access your private members. It's
    not the done thing in civilized C++ society.
    
    Change-Id: Id8f811f0e775afde26c6119b274f37908731507c

diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx
index 9c2015b..0cd14b1 100644
--- a/include/vcl/metric.hxx
+++ b/include/vcl/metric.hxx
@@ -36,9 +36,6 @@ typedef boost::intrusive_ptr< FontCharMap > FontCharMapPtr;
 
 class VCL_DLLPUBLIC FontMetric : public vcl::Font
 {
-
-    friend class ::OutputDevice;
-
 public:
                         FontMetric();
                         FontMetric( const FontMetric& );
diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx
index 8ff0aab..09a78bc 100644
--- a/vcl/inc/impfont.hxx
+++ b/vcl/inc/impfont.hxx
@@ -91,8 +91,6 @@ private:
 
 class ImplFontMetric
 {
-    friend class ::OutputDevice;
-
 private:
     long                mnAscent;      // Ascent
     long                mnDescent;     // Descent


More information about the Libreoffice-commits mailing list