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

Chris Sherlock chris.sherlock79 at gmail.com
Thu Jan 28 18:35:32 PST 2016


 vcl/inc/fontattributes.hxx                 |    8 ++++++--
 vcl/inc/fontinstance.hxx                   |    2 +-
 vcl/source/font/PhysicalFontCollection.cxx |    1 +
 vcl/source/font/PhysicalFontFace.cxx       |    2 +-
 vcl/source/font/PhysicalFontFamily.cxx     |    1 +
 vcl/source/font/font.cxx                   |   15 +++++++--------
 6 files changed, 17 insertions(+), 12 deletions(-)

New commits:
commit 528f5ec2a3ae3fff29943ce4762230a3e99a6151
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Fri Jan 29 13:23:58 2016 +1100

    vcl: changes to included vcl headers
    
    Changes made to allow for harmonization of vcl/inc/impfont.hxx and
    vcl/inc/fontattributes:
    
    - comment added showing the similarities between impfont.hxx and
      fontattributes.hxx (made in fontattributes.hxx) - extra line
      space added for my own convinience as I tend to switch between
      tabs listing vcl/inc/impfont.hxx and vcl/inc/fontattributes.hxx
      in OpenGrok because that's how I roll
    
    - fontattributes.hxx doesn't need rtl/textenc.hxx, that's already
      included in rtl/ustring.hxx, so swapped to use this instead
    
    - fontattibutes.hxx now includes i18nlangtag/languagetag.hxx - this
      will be needed when I add the LanguageTag properties that exist in
      impfont.hxx
    
    - unotools/fontdefs.hxx added to:
      + vcl/source/font/PhysicalFontCollection.cxx
      + vcl/source/font/PhysicalFontFamily.cxx
      + vcl/source/font/PhysicalFontFace.cxx
      + vcl/source/font/font.cxx
    
      These are the only specific files that actually need this include.
      Thus this has been removed as an included header from
      fontattributes.hxx
    
    - vcl/inc/fontinstance.hxx doesn't need the reference counter to be
      a sal_uLong, a sal_uInt32 will suffice (if we need more references
      than that then I suggest there is a problem somewhere in the code!)
    
    - rearranged vcl/source/font/font.cxx's included headers
    
    Change-Id: I8d61a5c05989356c056b962adc5aa670940addd2

diff --git a/vcl/inc/fontattributes.hxx b/vcl/inc/fontattributes.hxx
index 5b8135f..63c2a94 100644
--- a/vcl/inc/fontattributes.hxx
+++ b/vcl/inc/fontattributes.hxx
@@ -20,10 +20,14 @@
 #ifndef INCLUDED_VCL_INC_FONTATTRIBUTES_HXX
 #define INCLUDED_VCL_INC_FONTATTRIBUTES_HXX
 
-#include <unotools/fontdefs.hxx>
-#include <rtl/textenc.h>
+#include <rtl/ustring.hxx>
+#include <i18nlangtag/languagetag.hxx>
 #include <vcl/vclenum.hxx>
 
+
+
+/* The following class is extraordinarily similar to ImplFont. */
+
 class FontAttributes
 {
 public:
diff --git a/vcl/inc/fontinstance.hxx b/vcl/inc/fontinstance.hxx
index 04bae10..db5c6c1 100644
--- a/vcl/inc/fontinstance.hxx
+++ b/vcl/inc/fontinstance.hxx
@@ -43,7 +43,7 @@ public: // TODO: make data members private
     const ConvertChar* mpConversion;        // used e.g. for StarBats->StarSymbol
 
     long            mnLineHeight;
-    sal_uLong       mnRefCount;
+    sal_uInt32      mnRefCount;
     sal_uInt16      mnSetFontFlags;         // Flags returned by SalGraphics::SetFont()
     short           mnOwnOrientation;       // text angle if lower layers don't rotate text themselves
     short           mnOrientation;          // text angle in 3600 system
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index ed67182..dabc766 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -23,6 +23,7 @@
 #endif
 #include <i18nlangtag/mslangid.hxx>
 #include <unotools/configmgr.hxx>
+#include <unotools/fontdefs.hxx>
 
 #include "outdev.h"
 #include "PhysicalFontCollection.hxx"
diff --git a/vcl/source/font/PhysicalFontFace.cxx b/vcl/source/font/PhysicalFontFace.cxx
index 1e50b0c..a0fb721 100644
--- a/vcl/source/font/PhysicalFontFace.cxx
+++ b/vcl/source/font/PhysicalFontFace.cxx
@@ -18,8 +18,8 @@
  */
 
 #include <sal/types.h>
-
 #include <tools/fontenum.hxx>
+#include <unotools/fontdefs.hxx>
 
 #include "fontinstance.hxx"
 #include "fontattributes.hxx"
diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx
index a7cfca3..762983b 100644
--- a/vcl/source/font/PhysicalFontFamily.cxx
+++ b/vcl/source/font/PhysicalFontFamily.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <rtl/ustring.hxx>
+#include <unotools/fontdefs.hxx>
 
 #include "outdev.h"
 #include "PhysicalFontCollection.hxx"
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index 9270d0b..fa1d6b6 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -17,22 +17,21 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "unotools/fontcfg.hxx"
-
-#include "tools/stream.hxx"
-#include "tools/vcompat.hxx"
-#include "tools/debug.hxx"
+#include <sal/macros.h>
+#include <tools/stream.hxx>
+#include <tools/vcompat.hxx>
+#include <tools/debug.hxx>
 #include <tools/gen.hxx>
+#include <unotools/fontcfg.hxx>
+#include <unotools/fontdefs.hxx>
 
-#include "vcl/font.hxx"
+#include <vcl/font.hxx>
 
 #include "impfont.hxx"
 #include "fontinstance.hxx"
 #include "fontattributes.hxx"
 #include "sft.hxx"
 
-#include <sal/macros.h>
-
 #include <algorithm>
 
 using namespace vcl;


More information about the Libreoffice-commits mailing list