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

Chris Sherlock chris.sherlock79 at gmail.com
Sun Apr 27 04:10:22 PDT 2014


 include/vcl/outdev.hxx               | 1129 +++++++++++++++++++----------------
 vcl/source/gdi/print.cxx             |    2 
 vcl/source/outdev/curvedshapes.cxx   |   10 
 vcl/source/outdev/font.cxx           | 1005 ++++++++++++-------------------
 vcl/source/outdev/line.cxx           |    2 
 vcl/source/outdev/nativecontrols.cxx |    2 
 vcl/source/outdev/outdev.cxx         |   82 ++
 vcl/source/outdev/outdevstate.cxx    |  111 +++
 vcl/source/outdev/polygon.cxx        |    8 
 vcl/source/outdev/polyline.cxx       |    4 
 vcl/source/outdev/rect.cxx           |    4 
 vcl/source/outdev/textline.cxx       |   14 
 vcl/source/outdev/transparent.cxx    |    6 
 vcl/source/window/menu.cxx           |    4 
 14 files changed, 1247 insertions(+), 1136 deletions(-)

New commits:
commit 6244dcf7edbcb32aa6c1a49fabc7a1f39dcc3d25
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sun Apr 27 20:28:44 2014 +1000

    VCL: Rearrange most of the rest of the functions in outdev.hxx
    
    Also: added SAL_DELETED_FUNCTION to DrawOutDev function that should
    never be called upon.
    
    Change-Id: Ib274fb67931a24164fe3592811c1489670f7c19b

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 335b8f7..5f261dc 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -365,8 +365,50 @@ public:
 
      @returns SalGraphics instance.
      */
-    SAL_DLLPRIVATE SalGraphics const *GetGraphics() const;
-    SAL_DLLPRIVATE SalGraphics*       GetGraphics();
+    SalGraphics const           *GetGraphics() const;
+    SalGraphics*                GetGraphics();
+
+    void                        SetConnectMetaFile( GDIMetaFile* pMtf );
+    GDIMetaFile*                GetConnectMetaFile() const { return mpMetaFile; }
+
+    virtual void                SetSettings( const AllSettings& rSettings );
+    const AllSettings&          GetSettings() const { return *mxSettings; }
+
+    SystemGraphicsData          GetSystemGfxData() const;
+    css::uno::Any               GetSystemGfxDataAny() const;
+
+    void                        SetRefPoint();
+    void                        SetRefPoint( const Point& rRefPoint );
+    const Point&                GetRefPoint() const { return maRefPoint; }
+    bool                        IsRefPoint() const { return mbRefPoint; }
+
+    virtual sal_uInt16          GetBitCount() const;
+
+    Size                        GetOutputSizePixel() const
+                                    { return Size( mnOutWidth, mnOutHeight ); }
+    long                        GetOutputWidthPixel() const { return mnOutWidth; }
+    long                        GetOutputHeightPixel() const { return mnOutHeight; }
+    long                        GetOutOffXPixel() const { return mnOutOffX; }
+    long                        GetOutOffYPixel() const { return mnOutOffY; }
+
+    Size                        GetOutputSize() const
+                                    { return PixelToLogic( GetOutputSizePixel() ); }
+
+    sal_uLong                   GetColorCount() const;
+
+
+    /// request XCanvas render interface for this OutputDevice
+    css::uno::Reference< css::rendering::XCanvas >
+                                GetCanvas() const;
+
+    css::uno::Reference< css::awt::XGraphics >
+                                CreateUnoGraphics();
+    VCLXGraphicsList_impl*      GetUnoGraphicsList() const  { return mpUnoGraphicsList; }
+    VCLXGraphicsList_impl*      CreateUnoGraphicsList()
+                                    {
+                                        mpUnoGraphicsList = new VCLXGraphicsList_impl();
+                                        return mpUnoGraphicsList;
+                                    }
 
 protected:
     /** Acquire a graphics device that the output device uses to draw on.
@@ -402,9 +444,10 @@ protected:
 
     /** @name Helper functions
      */
-public:
     ///@{
 
+public:
+
     /** Get the output device's DPI x-axis value.
 
      @returns x-axis DPI value
@@ -437,10 +480,55 @@ private:
                                                short nOrientation ) const;
     ///@}
 
+
+    /** @name Frame functions
+     */
+    ///@{
+private:
+    SAL_DLLPRIVATE void         ImplGetFrameDev     ( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
+                                                      OutputDevice& rOutDev );
+    SAL_DLLPRIVATE void         ImplDrawFrameDev    ( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
+                                                      const OutputDevice& rOutDev, const Region& rRegion );
+    ///@}
+
+
+    /** @Name Direct OutputDevice drawing functions
+     */
+    ///@{
+public:
+    virtual void                DrawOutDev( const Point& rDestPt, const Size& rDestSize,
+                                            const Point& rSrcPt,  const Size& rSrcSize );
+    virtual void                DrawOutDev( const Point& rDestPt, const Size& rDestSize,
+                                            const Point& rSrcPt,  const Size& rSrcSize,
+                                            const OutputDevice& rOutDev );
+    virtual void                CopyArea( const Point& rDestPt,
+                                          const Point& rSrcPt,  const Size& rSrcSize,
+                                          sal_uInt16 nFlags = 0 );
+
+protected:
+    virtual void                CopyAreaFinal( SalTwoRect& aPosAry, sal_uInt32 nFlags);
+
+private:
+    SAL_DLLPRIVATE void         ImplDrawOutDevDirect ( const OutputDevice* pSrcDev, SalTwoRect& rPosAry );
+
+    // not implemented; to detect misuses of DrawOutDev(...OutputDevice&);
+    SAL_DLLPRIVATE void         DrawOutDev( const Point&, const Size&, const Point&,  const Size&, const Printer&) SAL_DELETED_FUNCTION;
+    ///@}
+
+
     /** @name OutputDevice state functions
      */
     ///@{
 public:
+
+    void                        Push( sal_uInt16 nFlags = PUSH_ALL );
+    void                        Pop();
+
+    // returns the current stack depth; that is the number of Push() calls minus the number of Pop() calls
+    // this should not normally be used since Push and Pop must always be used symmetrically
+    // however this may be e.g. a help when debugging code in which this somehow is not the case
+    sal_uInt32                  GetGCStackDepth() const;
+
     void                        EnableOutput( bool bEnable = true );
     bool                        IsOutputEnabled() const { return mbOutput; }
     bool                        IsDeviceOutput() const { return mbDevOutput; }
@@ -453,72 +541,334 @@ public:
     void                        SetDrawMode( sal_uLong nDrawMode );
     sal_uLong                   GetDrawMode() const { return mnDrawMode; }
 
-    void                        SetLayoutMode( sal_uLong nTextLayoutMode );
-    sal_uLong                   GetLayoutMode() const { return mnTextLayoutMode; }
+    void                        SetLayoutMode( sal_uLong nTextLayoutMode );
+    sal_uLong                   GetLayoutMode() const { return mnTextLayoutMode; }
+
+    void                        SetDigitLanguage( LanguageType );
+    LanguageType                GetDigitLanguage() const { return meTextLanguage; }
+
+    void                        SetRasterOp( RasterOp eRasterOp );
+    RasterOp                    GetRasterOp() const { return meRasterOp; }
+
+    /**
+    If this OutputDevice is used for displaying a Print Preview
+    the OutDevViewType should be set to 'OUTDEV_VIEWTYPE_PRINTPREVIEW'.
+
+    A View can then make painting decisions dependent on this OutDevViewType.
+    E.g. text colors need to be handled differently, dependent on whether it's a PrintPreview or not. (see #106611# for more)
+    */
+    void                        SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
+    OutDevViewType              GetOutDevViewType() const { return meOutDevViewType; }
+
+    void                        SetFillColor();
+    void                        SetFillColor( const Color& rColor );
+    const Color&                GetFillColor() const { return maFillColor; }
+    bool                        IsFillColor() const { return mbFillColor; }
+
+    void                        SetBackground();
+    void                        SetBackground( const Wallpaper& rBackground );
+
+    const Wallpaper&            GetBackground() const { return maBackground; }
+    bool                        IsBackground() const { return mbBackground; }
+
+    void                        SetFont( const Font& rNewFont );
+    const Font&                 GetFont() const { return maFont; }
+
+private:
+    void                        InitFillColor();
+    ///@}
+
+
+    /** @name Clipping functions
+     */
+    ///@{
+public:
+    Region                      GetClipRegion() const;
+    void                        SetClipRegion();
+    void                        SetClipRegion( const Region& rRegion );
+    bool                        SelectClipRegion( const Region&, SalGraphics* pGraphics = NULL );
+
+    bool                        IsClipRegion() const { return mbClipRegion; }
+
+    void                        MoveClipRegion( long nHorzMove, long nVertMove );
+    void                        IntersectClipRegion( const Rectangle& rRect );
+    void                        IntersectClipRegion( const Region& rRegion );
+
+    virtual Region              GetActiveClipRegion() const;
+
+protected:
+    virtual void                InitClipRegion();
+    virtual void                ClipToPaintRegion    ( Rectangle& rDstRect );
+
+private:
+    SAL_DLLPRIVATE void         SetDeviceClipRegion( const Region* pRegion );
+    ///@}
+
+
+    /** @name Pixel functions
+     */
+    ///@{
+public:
+    void                        DrawPixel( const Point& rPt );
+    void                        DrawPixel( const Point& rPt, const Color& rColor );
+    void                        DrawPixel( const Polygon& rPts, const Color* pColors = NULL );
+    void                        DrawPixel( const Polygon& rPts, const Color& rColor );
+
+    Color                       GetPixel( const Point& rPt ) const;
+    ///@}
+
+
+    /** @name Rectangle functions
+     */
+    ///@{
+
+public:
+
+    void                        DrawRect( const Rectangle& rRect );
+    void                        DrawRect( const Rectangle& rRect,
+                                          sal_uLong nHorzRount, sal_uLong nVertRound );
+
+    /// Fill the given rectangle with checkered rectangles of size nLen x nLen using the colors aStart and aEnd
+    void                        DrawCheckered(
+                                    const Point& rPos,
+                                    const Size& rSize,
+                                    sal_uInt32 nLen = 8,
+                                    Color aStart = Color(COL_WHITE),
+                                    Color aEnd = Color(COL_BLACK));
+
+    void                        DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLong nFlags );
+
+    ///@}
+
+
+    /** @name Line functions
+     */
+    ///@{
+public:
+    void                        DrawLine( const Point& rStartPt, const Point& rEndPt );
+
+    void                        DrawLine( const Point& rStartPt, const Point& rEndPt,
+                                          const LineInfo& rLineInfo );
+
+    void                        SetLineColor();
+    void                        SetLineColor( const Color& rColor );
+    const Color&                GetLineColor() const { return maLineColor; }
+    bool                        IsLineColor() const { return mbLineColor; }
+
+private:
+    SAL_DLLPRIVATE void         InitLineColor();
+
+    /** Helper for line geometry paint with support for graphic expansion (pattern and fat_to_area)
+     */
+    SAL_DLLPRIVATE void         PaintLineGeometryWithEvtlExpand( const LineInfo& rInfo, basegfx::B2DPolyPolygon aLinePolyPolygon );
+    ///@}
+
+
+    /** @name Polyline functions
+     */
+    ///@{
+public:
+
+    /** Render the given polygon as a line stroke
+
+        The given polygon is stroked with the current LineColor, start
+        and end point are not automatically connected
+
+        @see DrawPolygon
+        @see DrawPolyPolygon
+     */
+    void                        DrawPolyLine( const Polygon& rPoly );
+
+    void                        DrawPolyLine(
+                                    const basegfx::B2DPolygon&,
+                                    double fLineWidth = 0.0,
+                                    basegfx::B2DLineJoin = basegfx::B2DLINEJOIN_ROUND,
+                                    css::drawing::LineCap = css::drawing::LineCap_BUTT);
+
+    /** Render the given polygon as a line stroke
+
+        The given polygon is stroked with the current LineColor, start
+        and end point are not automatically connected. The line is
+        rendered according to the specified LineInfo, e.g. supplying a
+        dash pattern, or a line thickness.
+
+        @see DrawPolygon
+        @see DrawPolyPolygon
+     */
+    void                        DrawPolyLine( const Polygon& rPoly,
+                                              const LineInfo& rLineInfo );
+
+    bool                        TryDrawPolyLineDirect(
+                                    const basegfx::B2DPolygon& rB2DPolygon,
+                                    double fLineWidth = 0.0,
+                                    double fTransparency = 0.0,
+                                    basegfx::B2DLineJoin eLineJoin = basegfx::B2DLINEJOIN_NONE,
+                                    css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT);
+private:
+
+    // #i101491#
+    // Helper which holds the old line geometry creation and is extended to use AA when
+    // switched on. Advantage is that line geometry is only temporarily used for paint
+    SAL_DLLPRIVATE void         DrawPolyLineWithLineInfo(const Polygon& rPoly, const LineInfo& rLineInfo);
+
+
+    // #i101491#
+    // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool. Contains no AA check.
+    SAL_DLLPRIVATE bool         TryDrawPolyLineDirectNoAA(
+                                    const basegfx::B2DPolygon& rB2DPolygon,
+                                    double fLineWidth = 0.0,
+                                    double fTransparency = 0.0,
+                                    basegfx::B2DLineJoin eLineJoin = basegfx::B2DLINEJOIN_NONE,
+                                    css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT);
+    ///@}
+
+
+    /** @name Polygon functions
+     */
+    ///@{
+
+public:
+
+    /** Render the given polygon
+
+        The given polygon is stroked with the current LineColor, and
+        filled with the current FillColor. If one of these colors are
+        transparent, the corresponding stroke or fill stays
+        invisible. Start and end point of the polygon are
+        automatically connected.
+
+        @see DrawPolyLine
+     */
+    void                        DrawPolygon( const Polygon& rPoly );
+    void                        DrawPolygon( const basegfx::B2DPolygon& );
+
+    /** Render the given poly-polygon
+
+        The given poly-polygon is stroked with the current LineColor,
+        and filled with the current FillColor. If one of these colors
+        are transparent, the corresponding stroke or fill stays
+        invisible. Start and end points of the contained polygons are
+        automatically connected.
+
+        @see DrawPolyLine
+     */
+    void                        DrawPolyPolygon( const PolyPolygon& rPolyPoly );
+    void                        DrawPolyPolygon( const basegfx::B2DPolyPolygon& );
+
+private:
+
+    SAL_DLLPRIVATE void         ImplDrawPolygon( const Polygon& rPoly, const PolyPolygon* pClipPolyPoly = NULL );
+    SAL_DLLPRIVATE void         ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const PolyPolygon* pClipPolyPoly = NULL );
+    SAL_DLLPRIVATE void         ImplDrawPolyPolygon( sal_uInt16 nPoly, const PolyPolygon& rPolyPoly );
+    // #i101491#
+    // Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
+    // without MetaFile processing
+    SAL_DLLPRIVATE void         ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon& rB2DPolyPoly);
+    ///@}
+
+
+    /** @name Curved shape functions
+     */
+    ///@{
+
+public:
+
+    void                        DrawEllipse( const Rectangle& rRect );
+
+    void                        DrawArc( const Rectangle& rRect,
+                                         const Point& rStartPt, const Point& rEndPt );
+
+    void                        DrawPie( const Rectangle& rRect,
+                                         const Point& rStartPt, const Point& rEndPt );
+
+    void                        DrawChord( const Rectangle& rRect,
+                                           const Point& rStartPt, const Point& rEndPt );
+
+    ///@}
+
+
+    /** @name Gradient functions
+     */
+    ///@{
+
+public:
+    void                        DrawGradient( const Rectangle& rRect, const Gradient& rGradient );
+    void                        DrawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient );
+
+    void                        AddGradientActions(
+                                    const Rectangle& rRect,
+                                    const Gradient& rGradient,
+                                    GDIMetaFile& rMtf );
+
+protected:
+
+    virtual bool                UsePolyPolygonForComplexGradient() = 0;
+
+    virtual long                GetGradientStepCount( long nMinRect );
 
-    void                        SetDigitLanguage( LanguageType );
-    LanguageType                GetDigitLanguage() const { return meTextLanguage; }
+private:
 
-    void                        SetRasterOp( RasterOp eRasterOp );
-    RasterOp                    GetRasterOp() const { return meRasterOp; }
+    SAL_DLLPRIVATE void         DrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, bool bMtf, const PolyPolygon* pClipPolyPoly );
+    SAL_DLLPRIVATE void         DrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, bool bMtf, const PolyPolygon* pClipPolyPoly );
 
-    /**
-    If this OutputDevice is used for displaying a Print Preview
-    the OutDevViewType should be set to 'OUTDEV_VIEWTYPE_PRINTPREVIEW'.
+    SAL_DLLPRIVATE long         GetGradientSteps( const Gradient& rGradient, const Rectangle& rRect, bool bMtf, bool bComplex=false );
 
-    A View can then make painting decisions dependent on this OutDevViewType.
-    E.g. text colors need to be handled differently, dependent on whether it's a PrintPreview or not. (see #106611# for more)
-    */
-    void                        SetOutDevViewType( OutDevViewType eOutDevViewType ) { meOutDevViewType=eOutDevViewType; }
-    OutDevViewType              GetOutDevViewType() const { return meOutDevViewType; }
+    SAL_DLLPRIVATE Color        GetSingleColorGradientFill();
+    SAL_DLLPRIVATE void         SetGrayscaleColors( Gradient &rGradient );
+    ///@}
 
-    void                        SetFillColor();
-    void                        SetFillColor( const Color& rColor );
-    const Color&                GetFillColor() const { return maFillColor; }
-    bool                        IsFillColor() const { return mbFillColor; }
 
-    void                        SetBackground();
-    void                        SetBackground( const Wallpaper& rBackground );
+    /** @name Hatch functions
+     */
+    ///@{
 
-    const Wallpaper&            GetBackground() const { return maBackground; }
-    bool                        IsBackground() const { return mbBackground; }
+public:
 
-    void                        SetFont( const Font& rNewFont );
-    const Font&                 GetFont() const { return maFont; }
+#ifdef _MSC_VER
+    void                        DrawHatch( const PolyPolygon& rPolyPoly, const ::Hatch& rHatch );
+    void                        AddHatchActions( const PolyPolygon& rPolyPoly,
+                                                 const ::Hatch& rHatch,
+                                                 GDIMetaFile& rMtf );
+#else
+    void                        DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch );
+    void                        AddHatchActions( const PolyPolygon& rPolyPoly,
+                                                 const Hatch& rHatch,
+                                                 GDIMetaFile& rMtf );
+#endif
+
+    void                        DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf );
 
 private:
-    void                        InitFillColor();
 
+    SAL_DLLPRIVATE void         CalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
+    SAL_DLLPRIVATE void         DrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly, Point* pPtBuffer, bool bMtf );
     ///@}
 
-    /** @name Clipping functions
+
+    /** @name Wallpaper functions
      */
     ///@{
-public:
-    Region                      GetClipRegion() const;
-    void                        SetClipRegion();
-    void                        SetClipRegion( const Region& rRegion );
-    bool                        SelectClipRegion( const Region&, SalGraphics* pGraphics = NULL );
 
-    bool                        IsClipRegion() const { return mbClipRegion; }
-
-    void                        MoveClipRegion( long nHorzMove, long nVertMove );
-    void                        IntersectClipRegion( const Rectangle& rRect );
-    void                        IntersectClipRegion( const Region& rRegion );
+public:
+    void                        DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper );
 
-    virtual Region              GetActiveClipRegion() const;
+    virtual void                Erase();
+    virtual void                Erase( const Rectangle& rRect ) { DrawWallpaper( rRect, GetBackground() ); }
 
 protected:
-    virtual void                InitClipRegion();
-    virtual void                ClipToPaintRegion    ( Rectangle& rDstRect );
+    virtual void                DrawGradientWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
 
 private:
-    SAL_DLLPRIVATE void         SetDeviceClipRegion( const Region* pRegion );
+    SAL_DLLPRIVATE void         DrawWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
+    SAL_DLLPRIVATE void         DrawColorWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
+    SAL_DLLPRIVATE void         DrawBitmapWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
     ///@}
 
+
     /** @name Text functions
      */
     ///@{
+
 public:
     SystemTextLayoutData        GetSysTextLayoutData( const Point& rStartPt, const OUString& rStr,
                                                       sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
@@ -660,11 +1010,15 @@ public:
                                                  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
                                                  sal_Int32 nLen = -1, bool bOptimize = true,
                                                  sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
+
+    void                        DrawWaveLine( const Point& rStartPos, const Point& rEndPos );
     ///@}
 
+
     /** @name Font functions
      */
     ///@{
+
 public:
     FontInfo                    GetDevFont( int nDevFontIndex ) const;
     int                         GetDevFontCount() const;
@@ -682,12 +1036,12 @@ public:
     bool                        GetFontCharMap( FontCharMap& rFontCharMap ) const;
     bool                        GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const;
 
-/** Retrieve detailed font information in platform independent structure
+    /** Retrieve detailed font information in platform independent structure
 
-    @param  nFallbacklevel      Fallback font level (0 = best matching font)
+        @param  nFallbacklevel      Fallback font level (0 = best matching font)
 
-    @return SystemFontData
- */
+        @return SystemFontData
+     */
     SystemFontData              GetSysFontData( int nFallbacklevel ) const;
 
     SAL_DLLPRIVATE void         ImplGetEmphasisMark( PolyPolygon& rPolyPoly, bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2,
@@ -747,82 +1101,11 @@ private:
     SAL_DLLPRIVATE void         ImplDrawEmphasisMarks( SalLayout& );
     ///@}
 
-    /** @name Polygon functions
-     */
-    ///@{
-public:
-    /** Render the given polygon
-
-        The given polygon is stroked with the current LineColor, and
-        filled with the current FillColor. If one of these colors are
-        transparent, the corresponding stroke or fill stays
-        invisible. Start and end point of the polygon are
-        automatically connected.
-
-        @see DrawPolyLine
-     */
-    void                        DrawPolygon( const Polygon& rPoly );
-    void                        DrawPolygon( const basegfx::B2DPolygon& );
-
-    /** Render the given poly-polygon
-
-        The given poly-polygon is stroked with the current LineColor,
-        and filled with the current FillColor. If one of these colors
-        are transparent, the corresponding stroke or fill stays
-        invisible. Start and end points of the contained polygons are
-        automatically connected.
-
-        @see DrawPolyLine
-     */
-    void                        DrawPolyPolygon( const PolyPolygon& rPolyPoly );
-    void                        DrawPolyPolygon( const basegfx::B2DPolyPolygon& );
-
-private:
-    SAL_DLLPRIVATE void         ImplDrawPolygon( const Polygon& rPoly, const PolyPolygon* pClipPolyPoly = NULL );
-    SAL_DLLPRIVATE void         ImplDrawPolyPolygon( const PolyPolygon& rPolyPoly, const PolyPolygon* pClipPolyPoly = NULL );
-    SAL_DLLPRIVATE void         ImplDrawPolyPolygon( sal_uInt16 nPoly, const PolyPolygon& rPolyPoly );
-    // #i101491#
-    // Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
-    // without MetaFile processing
-    SAL_DLLPRIVATE void         ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon& rB2DPolyPoly);
-    ///@}
-
-    /** @name Wallpaper functions
-     */
-    ///@{
-public:
-    void                        DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper );
-
-protected:
-    virtual void                DrawGradientWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
-
-private:
-    SAL_DLLPRIVATE void         DrawWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
-    SAL_DLLPRIVATE void         DrawColorWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
-    SAL_DLLPRIVATE void         DrawBitmapWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper );
-    ///@}
-
-private:
-    SAL_DLLPRIVATE void         ImplDrawOutDevDirect ( const OutputDevice* pSrcDev, SalTwoRect& rPosAry );
-
-    SAL_DLLPRIVATE void         ImplPrintTransparent ( const Bitmap& rBmp, const Bitmap& rMask,
-                                                       const Point& rDestPt, const Size& rDestSize,
-                                                       const Point& rSrcPtPixel, const Size& rSrcSizePixel );
-    SAL_DLLPRIVATE Color        ImplDrawModeToColor  ( const Color& rColor ) const;
-
-    /** @name Frame functions
-     */
-    ///@{
-private:
-    SAL_DLLPRIVATE void         ImplGetFrameDev     ( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
-                                                      OutputDevice& rOutDev );
-    SAL_DLLPRIVATE void         ImplDrawFrameDev    ( const Point& rPt, const Point& rDevPt, const Size& rDevSize,
-                                                      const OutputDevice& rOutDev, const Region& rRegion );
-    ///@}
 
     /** @name Layout functions
      */
     ///@{
+
 public:
     SAL_DLLPRIVATE bool         ImplIsAntiparallel() const ;
     SAL_DLLPRIVATE void         ReMirror( Point &rPoint ) const;
@@ -841,55 +1124,22 @@ public:
                                     FontSelectPattern &rFontSelData, int nFallbackLevel,
                                     ImplLayoutArgs& rLayoutArgs) const;
 
-    ///@}
-
-    /** @name Transparency functions
-     */
-    ///@{
-protected:
-    virtual void                EmulateDrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
-    void                        DrawInvisiblePolygon( const PolyPolygon& rPolyPoly );
 
-private:
-    bool                        DrawTransparentNatively( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
-    ///@}
+    // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout
+    virtual void                EnableRTL( bool bEnable = true);
+    bool                        IsRTLEnabled() const { return mbEnableRTL; }
 
-private:
-    // not implemented; to detect misuses of DrawOutDev(...OutputDevice&);
-    void                        DrawOutDev( const Point&, const Size&, const Point&,  const Size&, const Printer&);
+    bool                        GetTextIsRTL( const OUString&, sal_Int32 nIndex, sal_Int32 nLen ) const;
 
-    /** @name Pixel functions
-     */
-    ///@{
-public:
-    void                        DrawPixel( const Point& rPt );
-    void                        DrawPixel( const Point& rPt, const Color& rColor );
-    void                        DrawPixel( const Polygon& rPts, const Color* pColors = NULL );
-    void                        DrawPixel( const Polygon& rPts, const Color& rColor );
     ///@}
 
-public:
-    void                        DrawRect( const Rectangle& rRect );
-    void                        DrawRect( const Rectangle& rRect,
-                                          sal_uLong nHorzRount, sal_uLong nVertRound );
-
-    virtual void                DrawOutDev( const Point& rDestPt, const Size& rDestSize,
-                                            const Point& rSrcPt,  const Size& rSrcSize );
-    virtual void                DrawOutDev( const Point& rDestPt, const Size& rDestSize,
-                                            const Point& rSrcPt,  const Size& rSrcSize,
-                                            const OutputDevice& rOutDev );
-    virtual void                CopyArea( const Point& rDestPt,
-                                          const Point& rSrcPt,  const Size& rSrcSize,
-                                          sal_uInt16 nFlags = 0 );
-protected:
-    virtual void                CopyAreaFinal( SalTwoRect& aPosAry, sal_uInt32 nFlags);
-
 
     /** @name Bitmap functions
      */
     ///@{
 
 public:
+
     /** @overload
         void DrawBitmap(
                 const Point& rDestPt,
@@ -1073,178 +1323,90 @@ private:
                                     const sal_Int32     nOffX,
                                     const sal_Int32     nDstWidth,
                                     const long*         pMapX,
-                                    const long*         pMapY );
-
-    /** Retrieve downsampled and cropped bitmap
-
-        @attention This method ignores negative rDstSz values, thus
-        mirroring must happen outside this method (e.g. in DrawBitmap)
-     */
-    Bitmap                      GetDownsampledBitmap(
-                                    const Size& rDstSz,
-                                    const Point& rSrcPt,
-                                    const Size& rSrcSz,
-                                    const Bitmap& rBmp,
-                                    long nMaxBmpDPIX,
-                                    long nMaxBmpDPIY );
-
-    ///@}
-
-    /** @name Curved shape functions
-     */
-    ///@{
-public:
-
-    void                        DrawEllipse( const Rectangle& rRect );
-
-    void                        DrawArc( const Rectangle& rRect,
-                                         const Point& rStartPt, const Point& rEndPt );
-
-    void                        DrawPie( const Rectangle& rRect,
-                                         const Point& rStartPt, const Point& rEndPt );
-
-    void                        DrawChord( const Rectangle& rRect,
-                                           const Point& rStartPt, const Point& rEndPt );
-
-    ///@}
-
-
-public:
-    /** @name Gradient functions
-     */
-    ///@{
-    void                        DrawGradient( const Rectangle& rRect, const Gradient& rGradient );
-    void                        DrawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient );
-
-    void                        AddGradientActions(
-                                    const Rectangle& rRect,
-                                    const Gradient& rGradient,
-                                    GDIMetaFile& rMtf );
-
-protected:
-    virtual bool                UsePolyPolygonForComplexGradient() = 0;
-
-    virtual long                GetGradientStepCount( long nMinRect );
-
-private:
-    SAL_DLLPRIVATE void         DrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, bool bMtf, const PolyPolygon* pClipPolyPoly );
-    SAL_DLLPRIVATE void         DrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, bool bMtf, const PolyPolygon* pClipPolyPoly );
+                                    const long*         pMapY );
 
-    SAL_DLLPRIVATE long         GetGradientSteps( const Gradient& rGradient, const Rectangle& rRect, bool bMtf, bool bComplex=false );
+    /** Retrieve downsampled and cropped bitmap
+
+        @attention This method ignores negative rDstSz values, thus
+        mirroring must happen outside this method (e.g. in DrawBitmap)
+     */
+    Bitmap                      GetDownsampledBitmap(
+                                    const Size& rDstSz,
+                                    const Point& rSrcPt,
+                                    const Size& rSrcSz,
+                                    const Bitmap& rBmp,
+                                    long nMaxBmpDPIX,
+                                    long nMaxBmpDPIY );
 
-    SAL_DLLPRIVATE Color        GetSingleColorGradientFill();
-    SAL_DLLPRIVATE void         SetGrayscaleColors( Gradient &rGradient );
     ///@}
 
-public:
-    /** @name Hatch functions
+
+    /** @name Transparency functions
      */
     ///@{
-#ifdef _MSC_VER
-    void                        DrawHatch( const PolyPolygon& rPolyPoly, const ::Hatch& rHatch );
-    void                        AddHatchActions( const PolyPolygon& rPolyPoly,
-                                                 const ::Hatch& rHatch,
-                                                 GDIMetaFile& rMtf );
-#else
-    void                        DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch );
-    void                        AddHatchActions( const PolyPolygon& rPolyPoly,
-                                                 const Hatch& rHatch,
-                                                 GDIMetaFile& rMtf );
-#endif
 
-    void                        DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf );
+public:
 
-private:
-    SAL_DLLPRIVATE void         CalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 );
-    SAL_DLLPRIVATE void         DrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly, Point* pPtBuffer, bool bMtf );
-    ///@}
+    /** Query availability of alpha channel
 
-public:
-    /** @name Line functions
+        @return sal_True, if this device has an alpha channel.
      */
-    ///@{
-
-    void                        DrawLine( const Point& rStartPt, const Point& rEndPt );
+    bool                        HasAlpha();
 
-    void                        DrawLine( const Point& rStartPt, const Point& rEndPt,
-                                          const LineInfo& rLineInfo );
 
-    void                        SetLineColor();
-    void                        SetLineColor( const Color& rColor );
-    const Color&                GetLineColor() const { return maLineColor; }
-    bool                        IsLineColor() const { return mbLineColor; }
+    /** helper method removing transparencies from a metafile (e.g. for printing)
 
-private:
-    SAL_DLLPRIVATE void         InitLineColor();
+        @returns
+        true: transparencies were removed
+        false: output metafile is unchanged input metafile
 
-    /** Helper for line geometry paint with support for graphic expansion (pattern and fat_to_area)
-     */
-    SAL_DLLPRIVATE void         PaintLineGeometryWithEvtlExpand( const LineInfo& rInfo, basegfx::B2DPolyPolygon aLinePolyPolygon );
-    ///@}
+        @attention this is a member method, so current state can influence the result !
+        @attention the output metafile is prepared in pixel mode for the currentOutputDevice
+                   state. It can not be moved or rotated reliably anymore.
+    */
+    bool                        RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
+                                                                  long nMaxBmpDPIX, long nMaxBmpDPIY,
+                                                                  bool bReduceTransparency,
+                                                                  bool bTransparencyAutoMode,
+                                                                  bool bDownsampleBitmaps,
+                                                                  const Color& rBackground = Color( COL_TRANSPARENT )
+                                                                );
 
-public:
-    /** @name Polyline functions
-     */
-    ///@{
+    SAL_DLLPRIVATE void         ImplPrintTransparent ( const Bitmap& rBmp, const Bitmap& rMask,
+                                                       const Point& rDestPt, const Size& rDestSize,
+                                                       const Point& rSrcPtPixel, const Size& rSrcSizePixel );
+    SAL_DLLPRIVATE Color        ImplDrawModeToColor  ( const Color& rColor ) const;
 
-    /** Render the given polygon as a line stroke
 
-        The given polygon is stroked with the current LineColor, start
-        and end point are not automatically connected
+    /** Query the existence and depth of the alpha channel
 
-        @see DrawPolygon
-        @see DrawPolyPolygon
+        @return 0, if no alpha channel available, and the bit depth of
+        the alpha channel otherwise.
      */
-    void                        DrawPolyLine( const Polygon& rPoly );
-
-    void                        DrawPolyLine(
-                                    const basegfx::B2DPolygon&,
-                                    double fLineWidth = 0.0,
-                                    basegfx::B2DLineJoin = basegfx::B2DLINEJOIN_ROUND,
-                                    css::drawing::LineCap = css::drawing::LineCap_BUTT);
+    virtual sal_uInt16          GetAlphaBitCount() const;
 
-    /** Render the given polygon as a line stroke
 
-        The given polygon is stroked with the current LineColor, start
-        and end point are not automatically connected. The line is
-        rendered according to the specified LineInfo, e.g. supplying a
-        dash pattern, or a line thickness.
+    void                        DrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
+    void                        DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, double fTransparency);
+    void                        DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize,
+                                         const Gradient& rTransparenceGradient );
 
-        @see DrawPolygon
-        @see DrawPolyPolygon
-     */
-    void                        DrawPolyLine( const Polygon& rPoly,
-                                              const LineInfo& rLineInfo );
+protected:
+    virtual void                EmulateDrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
+    void                        DrawInvisiblePolygon( const PolyPolygon& rPolyPoly );
 
-    bool                        TryDrawPolyLineDirect(
-                                    const basegfx::B2DPolygon& rB2DPolygon,
-                                    double fLineWidth = 0.0,
-                                    double fTransparency = 0.0,
-                                    basegfx::B2DLineJoin eLineJoin = basegfx::B2DLINEJOIN_NONE,
-                                    css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT);
 private:
-    // #i101491#
-    // Helper which holds the old line geometry creation and is extended to use AA when
-    // switched on. Advantage is that line geometry is only temporarily used for paint
-    SAL_DLLPRIVATE void         DrawPolyLineWithLineInfo(const Polygon& rPoly, const LineInfo& rLineInfo);
-
 
-    // #i101491#
-    // Helper who tries to use SalGDI's DrawPolyLine direct and returns it's bool. Contains no AA check.
-    SAL_DLLPRIVATE bool         TryDrawPolyLineDirectNoAA(
-                                    const basegfx::B2DPolygon& rB2DPolygon,
-                                    double fLineWidth = 0.0,
-                                    double fTransparency = 0.0,
-                                    basegfx::B2DLineJoin eLineJoin = basegfx::B2DLINEJOIN_NONE,
-                                    css::drawing::LineCap eLineCap = css::drawing::LineCap_BUTT);
+    bool                        DrawTransparentNatively( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
     ///@}
 
 
-public:
     /** @name Mask functions
      */
     ///@{
 
+public:
+
     void                        DrawMask( const Point& rDestPt,
                                           const Bitmap& rBitmap, const Color& rMaskColor );
 
@@ -1257,15 +1419,19 @@ public:
                                           sal_uLong nAction );
 
 protected:
+
     virtual void                ApplyMask ( const Bitmap& rMask, const Color& rMaskColor,
                                             const Point& rDestPt, const Size& rDestSize,
                                             const Point& rSrcPtPixel, const Size& rSrcSizePixel );
     ///@}
 
-public:
+
     /** @name Map functions
      */
     ///@{
+
+public:
+
     void                        EnableMapMode( bool bEnable = true );
     bool                        IsMapModeEnabled() const { return mbMap; }
 
@@ -1426,6 +1592,7 @@ public:
     SAL_DLLPRIVATE long         ImplLogicWidthToDevicePixel( long nWidth ) const;
 
 private:
+
     /** Convert a logical X coordinate to a device pixel's X coordinate.
 
      To get the device's X coordinate, it must calculate the mapping offset
@@ -1574,13 +1741,15 @@ private:
     SAL_DLLPRIVATE basegfx::B2DHomMatrix ImplGetDeviceTransformation() const;
     ///@}
 
-public:
+
     /** @name Native Widget Rendering functions
 
         These all just call through to the private mpGraphics functions of the same name.
      */
     ///@{
 
+public:
+
     /** Query the platform layer for control support
      */
     bool                        IsNativeControlSupported( ControlType nType, ControlPart nPart ) const;
@@ -1614,14 +1783,11 @@ public:
                                                         Rectangle &rNativeContentRegion ) const;
     ///@}
 
-public:
-    void                        DrawWaveLine( const Point& rStartPos, const Point& rEndPos );
-    void                        DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLong nFlags );
+    /** @name EPS functions
+     */
+    ///@{
 
-    void                        DrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
-    void                        DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, double fTransparency);
-    void                        DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize,
-                                         const Gradient& rTransparenceGradient );
+public:
 
     /** Added return value to see if EPS could be painted directly.
         Theoreticaly, handing over a matrix would be needed to handle
@@ -1630,105 +1796,8 @@ public:
         that's too much for now, wrote \#i107046# for this */
     bool                        DrawEPS( const Point& rPt, const Size& rSz,
                                          const GfxLink& rGfxLink, GDIMetaFile* pSubst = NULL );
+    ///@}
 
-    /// Fill the given rectangle with checkered rectangles of size nLen x nLen using the colors aStart and aEnd
-    void                        DrawCheckered(
-                                    const Point& rPos,
-                                    const Size& rSize,
-                                    sal_uInt32 nLen = 8,
-                                    Color aStart = Color(COL_WHITE),
-                                    Color aEnd = Color(COL_BLACK));
-
-    Color                       GetPixel( const Point& rPt ) const;
-
-    // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout
-    virtual void                EnableRTL( bool bEnable = true);
-    bool                        IsRTLEnabled() const { return mbEnableRTL; }
-
-    void                        SetConnectMetaFile( GDIMetaFile* pMtf );
-    GDIMetaFile*                GetConnectMetaFile() const { return mpMetaFile; }
-
-
-    virtual void                SetSettings( const AllSettings& rSettings );
-    const AllSettings&          GetSettings() const { return *mxSettings; }
-
-    SystemGraphicsData          GetSystemGfxData() const;
-    css::uno::Any               GetSystemGfxDataAny() const;
-
-    void                        SetRefPoint();
-    void                        SetRefPoint( const Point& rRefPoint );
-    const Point&                GetRefPoint() const { return maRefPoint; }
-    bool                        IsRefPoint() const { return mbRefPoint; }
-
-    Size                        GetOutputSizePixel() const
-                                    { return Size( mnOutWidth, mnOutHeight ); }
-    long                        GetOutputWidthPixel() const { return mnOutWidth; }
-    long                        GetOutputHeightPixel() const { return mnOutHeight; }
-    long                        GetOutOffXPixel() const { return mnOutOffX; }
-    long                        GetOutOffYPixel() const { return mnOutOffY; }
-
-    Size                        GetOutputSize() const
-                                    { return PixelToLogic( GetOutputSizePixel() ); }
-
-    virtual void                Erase();
-    virtual void                Erase( const Rectangle& rRect ) { DrawWallpaper( rRect, GetBackground() ); }
-
-    virtual sal_uInt16          GetBitCount() const;
-
-    bool                        GetTextIsRTL( const OUString&, sal_Int32 nIndex, sal_Int32 nLen ) const;
-
-    /** Query the existence and depth of the alpha channel
-
-        @return 0, if no alpha channel available, and the bit depth of
-        the alpha channel otherwise.
-     */
-    virtual sal_uInt16          GetAlphaBitCount() const;
-    sal_uLong                   GetColorCount() const;
-
-    void                        Push( sal_uInt16 nFlags = PUSH_ALL );
-    void                        Pop();
-    // returns the current stack depth; that is the number of Push() calls minus the number of Pop() calls
-    // this should not normally be used since Push and Pop must always be used symmetrically
-    // however this may be e.g. a help when debugging code in which this somehow is not the case
-    sal_uInt32                  GetGCStackDepth() const;
-
-    /** Query availability of alpha channel
-
-        @return sal_True, if this device has an alpha channel.
-     */
-    bool                        HasAlpha();
-
-    /// request XCanvas render interface for this OutputDevice
-    css::uno::Reference< css::rendering::XCanvas >
-                                GetCanvas() const;
-
-    css::uno::Reference< css::awt::XGraphics >
-                                CreateUnoGraphics();
-    VCLXGraphicsList_impl*      GetUnoGraphicsList() const  { return mpUnoGraphicsList; }
-    VCLXGraphicsList_impl*      CreateUnoGraphicsList()
-                                    {
-                                        mpUnoGraphicsList = new VCLXGraphicsList_impl();
-                                        return mpUnoGraphicsList;
-                                    }
-
-
-    /** helper method removing transparencies from a metafile (e.g. for printing)
-
-        @returns
-        true: transparencies were removed
-        false: output metafile is unchanged input metafile
-
-        @attention this is a member method, so current state can influence the result !
-        @attention the output metafile is prepared in pixel mode for the currentOutputDevice
-                   state. It can not be moved or rotated reliably anymore.
-    */
-    bool                        RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, GDIMetaFile& rOutMtf,
-                                                                  long nMaxBmpDPIX, long nMaxBmpDPIY,
-                                                                  bool bReduceTransparency,
-                                                                  bool bTransparencyAutoMode,
-                                                                  bool bDownsampleBitmaps,
-                                                                  const Color& rBackground = Color( COL_TRANSPARENT )
-                                                                );
 };
 
 #endif // INCLUDED_VCL_OUTDEV_HXX
commit bb5d1006bd97dca3311d2960aec11595feae3b09
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sun Apr 27 19:38:55 2014 +1000

    VCL: rename OutputDevice::ImplInitFillColor and make it private
    
    Change-Id: I01c0974d3a2f79cf3c6b9730ea306dcd49927a3c

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index fb17963..335b8f7 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -441,8 +441,6 @@ private:
      */
     ///@{
 public:
-    SAL_DLLPRIVATE void         ImplInitFillColor();
-
     void                        EnableOutput( bool bEnable = true );
     bool                        IsOutputEnabled() const { return mbOutput; }
     bool                        IsDeviceOutput() const { return mbDevOutput; }
@@ -488,6 +486,9 @@ public:
     void                        SetFont( const Font& rNewFont );
     const Font&                 GetFont() const { return maFont; }
 
+private:
+    void                        InitFillColor();
+
     ///@}
 
     /** @name Clipping functions
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index cc8b345..bf2066d 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -858,7 +858,7 @@ void Printer::ApplyMask( const Bitmap& rMask, const Color& rMaskColor,
         SetLineColor( rMaskColor );
         SetFillColor( rMaskColor );
         InitLineColor();
-        ImplInitFillColor();
+        InitFillColor();
 
         // create forward mapping tables
         for( nX = 0L; nX <= nSrcWidth; nX++ )
diff --git a/vcl/source/outdev/curvedshapes.cxx b/vcl/source/outdev/curvedshapes.cxx
index b5b4140..bca6c74 100644
--- a/vcl/source/outdev/curvedshapes.cxx
+++ b/vcl/source/outdev/curvedshapes.cxx
@@ -58,7 +58,7 @@ void OutputDevice::DrawEllipse( const Rectangle& rRect )
         else
         {
             if ( mbInitFillColor )
-                ImplInitFillColor();
+                InitFillColor();
             mpGraphics->DrawPolygon( aRectPoly.GetSize(), pPtAry, this );
         }
     }
@@ -149,7 +149,7 @@ void OutputDevice::DrawPie( const Rectangle& rRect,
         else
         {
             if ( mbInitFillColor )
-                ImplInitFillColor();
+                InitFillColor();
             mpGraphics->DrawPolygon( aPiePoly.GetSize(), pPtAry, this );
         }
     }
@@ -198,7 +198,7 @@ void OutputDevice::DrawChord( const Rectangle& rRect,
         else
         {
             if ( mbInitFillColor )
-                ImplInitFillColor();
+                InitFillColor();
             mpGraphics->DrawPolygon( aChordPoly.GetSize(), pPtAry, this );
         }
     }
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx
index 0d5784b..ea987fa 100644
--- a/vcl/source/outdev/line.cxx
+++ b/vcl/source/outdev/line.cxx
@@ -322,7 +322,7 @@ void OutputDevice::PaintLineGeometryWithEvtlExpand(
         SetLineColor();
         InitLineColor();
         SetFillColor( aOldLineColor );
-        ImplInitFillColor();
+        InitFillColor();
 
         bool bDone(false);
 
diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx
index dc454c3..28e2d35 100644
--- a/vcl/source/outdev/nativecontrols.cxx
+++ b/vcl/source/outdev/nativecontrols.cxx
@@ -275,7 +275,7 @@ bool OutputDevice::DrawNativeControl( ControlType nType,
     if ( mbInitLineColor )
         InitLineColor();
     if ( mbInitFillColor )
-        ImplInitFillColor();
+        InitFillColor();
 
     // Convert the coordinates from relative to Window-absolute, so we draw
     // in the correct place in platform code
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 5100c63..b727796 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -938,7 +938,7 @@ void OutputDevice::ImplGetFrameDev( const Point& rPt, const Point& rDevPt, const
 }
 
 
-void OutputDevice::ImplInitFillColor()
+void OutputDevice::InitFillColor()
 {
     DBG_TESTSOLARMUTEX();
 
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index 5dc154e..b3c6001 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -56,7 +56,7 @@ void OutputDevice::DrawPolyPolygon( const PolyPolygon& rPolyPoly )
         InitLineColor();
 
     if ( mbInitFillColor )
-        ImplInitFillColor();
+        InitFillColor();
 
     // use b2dpolygon drawing if possible
     if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) &&
@@ -163,7 +163,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
         InitLineColor();
 
     if ( mbInitFillColor )
-        ImplInitFillColor();
+        InitFillColor();
 
     // use b2dpolygon drawing if possible
     if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) &&
@@ -263,7 +263,7 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP
         InitLineColor();
 
     if( mbInitFillColor )
-        ImplInitFillColor();
+        InitFillColor();
 
     if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) &&
        mpGraphics->supportsOperation(OutDevSupport_B2DDraw) &&
@@ -537,7 +537,7 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLon
         InitLineColor();
 
     if( mbInitFillColor )
-        ImplInitFillColor();
+        InitFillColor();
 
     const bool bOldMap = mbMap;
     EnableMapMode( false );
diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx
index 2ddb191..d261cce 100644
--- a/vcl/source/outdev/polyline.cxx
+++ b/vcl/source/outdev/polyline.cxx
@@ -194,7 +194,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
         SetLineColor();
         InitLineColor();
         SetFillColor(aOldLineColor);
-        ImplInitFillColor();
+        InitFillColor();
 
         // draw usig a loop; else the topology will paint a PolyPolygon
         for(sal_uInt32 a(0); a < aAreaPolyPolygon.count(); a++)
@@ -206,7 +206,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
         SetLineColor(aOldLineColor);
         InitLineColor();
         SetFillColor(aOldFillColor);
-        ImplInitFillColor();
+        InitFillColor();
 
         if(bTryAA)
         {
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 8a5d884..8a847fc 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -55,7 +55,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect )
         InitLineColor();
 
     if ( mbInitFillColor )
-        ImplInitFillColor();
+        InitFillColor();
 
     mpGraphics->DrawRect( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), this );
 
@@ -98,7 +98,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect,
         InitLineColor();
 
     if ( mbInitFillColor )
-        ImplInitFillColor();
+        InitFillColor();
 
     if ( !nHorzRound && !nVertRound )
     {
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index ec4351f..21d7bb4 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -183,7 +183,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly,
         InitLineColor();
 
     if( mbInitFillColor )
-        ImplInitFillColor();
+        InitFillColor();
 
     if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) &&
        mpGraphics->supportsOperation(OutDevSupport_B2DDraw) &&
@@ -268,7 +268,7 @@ bool OutputDevice::DrawTransparentNatively ( const PolyPolygon& rPolyPoly,
             InitLineColor();
 
         if( mbInitFillColor )
-            ImplInitFillColor();
+            InitFillColor();
 
         // get the polygon in device coordinates
         basegfx::B2DPolyPolygon aB2DPolyPolygon( rPolyPoly.getB2DPolyPolygon() );
@@ -355,7 +355,7 @@ void OutputDevice::EmulateDrawTransparent ( const PolyPolygon& rPolyPoly,
                 InitLineColor();
 
             if ( mbInitFillColor )
-                ImplInitFillColor();
+                InitFillColor();
 
             Rectangle aLogicPolyRect( rPolyPoly.GetBoundRect() );
             Rectangle aPixelRect( ImplLogicToDevicePixel( aLogicPolyRect ) );
commit ffd55ff0b919a982f54db558b2341309bbabf0b9
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sun Apr 27 19:01:16 2014 +1000

    VCL: OutputDevice::ImplRotatePosi, nOrientation param. should be short
    
    Change-Id: Ie49b5b2c489619700f9cc34d9efb38454bcaff2c

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 0647de6..fb17963 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -434,7 +434,7 @@ public:
 
 private:
     void                        ImplRotatePos( long nOriginX, long nOriginY, long& rX, long &rY,
-                                               int nOrientation );
+                                               short nOrientation ) const;
     ///@}
 
     /** @name OutputDevice state functions
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 9fab8b4..5100c63 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -438,7 +438,7 @@ bool OutputDevice::supportsOperation( OutDevSupportType eType ) const
 }
 
 void OutputDevice::ImplRotatePos( long nOriginX, long nOriginY, long& rX, long& rY,
-                                  int nOrientation )
+                                  short nOrientation ) const
 {
     if ( (nOrientation >= 0) && !(nOrientation % 900) )
     {
commit 248abe0afa92e295aa5b19579dff3fb2fb3cfbe5
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sun Apr 27 15:02:00 2014 +1000

    VCL: rearrange functions in outdev/font.cxx
    
    Change-Id: I98977212547929ff59641f0b73273d68740420fd

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index e9b40fb..0647de6 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -681,11 +681,18 @@ public:
     bool                        GetFontCharMap( FontCharMap& rFontCharMap ) const;
     bool                        GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const;
 
+/** Retrieve detailed font information in platform independent structure
+
+    @param  nFallbacklevel      Fallback font level (0 = best matching font)
+
+    @return SystemFontData
+ */
     SystemFontData              GetSysFontData( int nFallbacklevel ) const;
 
+    SAL_DLLPRIVATE void         ImplGetEmphasisMark( PolyPolygon& rPolyPoly, bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2,
+                                                     long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient );
     SAL_DLLPRIVATE static FontEmphasisMark
                                 ImplGetEmphasisMarkStyle( const Font& rFont );
-    SAL_DLLPRIVATE void         ImplGetEmphasisMark( PolyPolygon& rPolyPoly, bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient );
 
     bool                        GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
                                                     int nLen, int nBase, MetricVector& rVector );
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 0abe025..bba7c61 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -61,6 +61,430 @@ using namespace ::rtl;
 using namespace ::vcl;
 using namespace ::utl;
 
+FontInfo OutputDevice::GetDevFont( int nDevFontIndex ) const
+{
+    FontInfo aFontInfo;
+
+    ImplInitFontList();
+
+    int nCount = GetDevFontCount();
+    if( nDevFontIndex < nCount )
+    {
+        const PhysicalFontFace& rData = *mpGetDevFontList->Get( nDevFontIndex );
+        aFontInfo.SetName( rData.GetFamilyName() );
+        aFontInfo.SetStyleName( rData.GetStyleName() );
+        aFontInfo.SetCharSet( rData.IsSymbolFont() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
+        aFontInfo.SetFamily( rData.GetFamilyType() );
+        aFontInfo.SetPitch( rData.GetPitch() );
+        aFontInfo.SetWeight( rData.GetWeight() );
+        aFontInfo.SetItalic( rData.GetSlant() );
+        aFontInfo.SetWidthType( rData.GetWidthType() );
+        if( rData.IsScalable() )
+            aFontInfo.mpImplMetric->mnMiscFlags |= ImplFontMetric::SCALABLE_FLAG;
+        if( rData.mbDevice )
+            aFontInfo.mpImplMetric->mnMiscFlags |= ImplFontMetric::DEVICE_FLAG;
+    }
+
+    return aFontInfo;
+}
+
+int OutputDevice::GetDevFontCount() const
+{
+    if( !mpGetDevFontList )
+        mpGetDevFontList = mpFontCollection->GetDevFontList();
+    return mpGetDevFontList->Count();
+}
+
+bool OutputDevice::IsFontAvailable( const OUString& rFontName ) const
+{
+    PhysicalFontFamily* pFound = mpFontCollection->FindFontFamily( rFontName );
+    return (pFound != NULL);
+}
+
+int OutputDevice::GetDevFontSizeCount( const Font& rFont ) const
+{
+    delete mpGetDevSizeList;
+
+    ImplInitFontList();
+    mpGetDevSizeList = mpFontCollection->GetDevSizeList( rFont.GetName() );
+    return mpGetDevSizeList->Count();
+}
+
+Size OutputDevice::GetDevFontSize( const Font& rFont, int nSizeIndex ) const
+{
+    // check range
+    int nCount = GetDevFontSizeCount( rFont );
+    if ( nSizeIndex >= nCount )
+        return Size();
+
+    // when mapping is enabled round to .5 points
+    Size aSize( 0, mpGetDevSizeList->Get( nSizeIndex ) );
+    if ( mbMap )
+    {
+        aSize.Height() *= 10;
+        MapMode aMap( MAP_10TH_INCH, Point(), Fraction( 1, 72 ), Fraction( 1, 72 ) );
+        aSize = PixelToLogic( aSize, aMap );
+        aSize.Height() += 5;
+        aSize.Height() /= 10;
+        long nRound = aSize.Height() % 5;
+        if ( nRound >= 3 )
+            aSize.Height() += (5-nRound);
+        else
+            aSize.Height() -= nRound;
+        aSize.Height() *= 10;
+        aSize = LogicToPixel( aSize, aMap );
+        aSize = PixelToLogic( aSize );
+        aSize.Height() += 5;
+        aSize.Height() /= 10;
+    }
+    return aSize;
+}
+
+bool OutputDevice::AddTempDevFont( const OUString& rFileURL, const OUString& rFontName )
+{
+    ImplInitFontList();
+
+    if( !mpGraphics && !AcquireGraphics() )
+        return false;
+
+    bool bRC = mpGraphics->AddTempDevFont( mpFontCollection, rFileURL, rFontName );
+    if( !bRC )
+        return false;
+
+    if( mpAlphaVDev )
+        mpAlphaVDev->AddTempDevFont( rFileURL, rFontName );
+
+    mpFontCache->Invalidate();
+    return true;
+}
+
+FontMetric OutputDevice::GetFontMetric() const
+{
+    FontMetric aMetric;
+    if( mbNewFont && !ImplNewFont() )
+        return aMetric;
+
+    ImplFontEntry*      pEntry = mpFontEntry;
+    ImplFontMetricData* pMetric = &(pEntry->maMetric);
+
+    // prepare metric
+    aMetric.Font::operator=( maFont );
+
+    // set aMetric with info from font
+    aMetric.SetName( maFont.GetName() );
+    aMetric.SetStyleName( pMetric->GetStyleName() );
+    aMetric.SetSize( PixelToLogic( Size( pMetric->mnWidth, pMetric->mnAscent+pMetric->mnDescent-pMetric->mnIntLeading ) ) );
+    aMetric.SetCharSet( pMetric->IsSymbolFont() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
+    aMetric.SetFamily( pMetric->GetFamilyType() );
+    aMetric.SetPitch( pMetric->GetPitch() );
+    aMetric.SetWeight( pMetric->GetWeight() );
+    aMetric.SetItalic( pMetric->GetSlant() );
+    aMetric.SetWidthType( pMetric->GetWidthType() );
+    if ( pEntry->mnOwnOrientation )
+        aMetric.SetOrientation( pEntry->mnOwnOrientation );
+    else
+        aMetric.SetOrientation( pMetric->mnOrientation );
+    if( !pEntry->maMetric.mbKernableFont )
+         aMetric.SetKerning( maFont.GetKerning() & ~KERNING_FONTSPECIFIC );
+
+    // set remaining metric fields
+    aMetric.mpImplMetric->mnMiscFlags   = 0;
+    if( pMetric->mbDevice )
+            aMetric.mpImplMetric->mnMiscFlags |= ImplFontMetric::DEVICE_FLAG;
+    if( pMetric->mbScalableFont )
+            aMetric.mpImplMetric->mnMiscFlags |= ImplFontMetric::SCALABLE_FLAG;
+    aMetric.mpImplMetric->mnAscent      = ImplDevicePixelToLogicHeight( pMetric->mnAscent+mnEmphasisAscent );
+    aMetric.mpImplMetric->mnDescent     = ImplDevicePixelToLogicHeight( pMetric->mnDescent+mnEmphasisDescent );
+    aMetric.mpImplMetric->mnIntLeading  = ImplDevicePixelToLogicHeight( pMetric->mnIntLeading+mnEmphasisAscent );
+    aMetric.mpImplMetric->mnExtLeading  = ImplDevicePixelToLogicHeight( GetFontExtLeading() );
+    aMetric.mpImplMetric->mnExtLeading  = ImplDevicePixelToLogicHeight( pMetric->mnExtLeading );
+    aMetric.mpImplMetric->mnLineHeight  = ImplDevicePixelToLogicHeight( pMetric->mnAscent+pMetric->mnDescent+mnEmphasisAscent+mnEmphasisDescent );
+    aMetric.mpImplMetric->mnSlant       = ImplDevicePixelToLogicHeight( pMetric->mnSlant );
+
+    return aMetric;
+}
+
+FontMetric OutputDevice::GetFontMetric( const Font& rFont ) const
+{
+    // select font, query metrics, select original font again
+    Font aOldFont = GetFont();
+    const_cast<OutputDevice*>(this)->SetFont( rFont );
+    FontMetric aMetric( GetFontMetric() );
+    const_cast<OutputDevice*>(this)->SetFont( aOldFont );
+    return aMetric;
+}
+
+bool OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
+{
+    rFontCharMap.Reset();
+
+    // we need a graphics
+    if( !mpGraphics && !AcquireGraphics() )
+        return false;
+
+    if( mbNewFont )
+        ImplNewFont();
+    if( mbInitFont )
+        InitFont();
+    if( !mpFontEntry )
+        return false;
+
+#ifdef ENABLE_IFC_CACHE // a little font charmap cache helps considerably
+    static const int NMAXITEMS = 16;
+    static int nUsedItems = 0, nCurItem = 0;
+
+    struct CharMapCacheItem { const PhysicalFontFace* mpFontData; FontCharMap maCharMap; };
+    static CharMapCacheItem aCache[ NMAXITEMS ];
+
+    const PhysicalFontFace* pFontData = mpFontEntry->maFontSelData.mpFontData;
+
+    int i;
+    for( i = nUsedItems; --i >= 0; )
+        if( pFontData == aCache[i].mpFontData )
+            break;
+    if( i >= 0 ) // found in cache
+    {
+        rFontCharMap.Reset( aCache[i].maCharMap.mpImpl );
+    }
+    else // need to cache
+#endif // ENABLE_IFC_CACHE
+    {
+        const ImplFontCharMap* pNewMap = mpGraphics->GetImplFontCharMap();
+        rFontCharMap.Reset( pNewMap );
+
+#ifdef ENABLE_IFC_CACHE
+        // manage cache round-robin and insert data
+        CharMapCacheItem& rItem = aCache[ nCurItem ];
+        rItem.mpFontData = pFontData;
+        rItem.maCharMap.Reset( pNewMap );
+
+        if( ++nCurItem >= NMAXITEMS )
+            nCurItem = 0;
+
+        if( ++nUsedItems >= NMAXITEMS )
+            nUsedItems = NMAXITEMS;
+#endif // ENABLE_IFC_CACHE
+    }
+
+    if( rFontCharMap.IsDefaultMap() )
+        return false;
+    return true;
+}
+
+bool OutputDevice::GetFontCapabilities( FontCapabilities& rFontCapabilities ) const
+{
+    // we need a graphics
+    if( !mpGraphics && !AcquireGraphics() )
+        return false;
+
+    if( mbNewFont )
+        ImplNewFont();
+    if( mbInitFont )
+        InitFont();
+    if( !mpFontEntry )
+        return false;
+
+    return mpGraphics->GetImplFontCapabilities(rFontCapabilities);
+}
+
+SystemFontData OutputDevice::GetSysFontData(int nFallbacklevel) const
+{
+    SystemFontData aSysFontData;
+    aSysFontData.nSize = sizeof(aSysFontData);
+
+    if (!mpGraphics) AcquireGraphics();
+    if (mpGraphics) aSysFontData = mpGraphics->GetSysFontData(nFallbacklevel);
+
+    return aSysFontData;
+}
+
+void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, bool& rPolyLine,
+                                        Rectangle& rRect1, Rectangle& rRect2,
+                                        long& rYOff, long& rWidth,
+                                        FontEmphasisMark eEmphasis,
+                                        long nHeight, short /*nOrient*/ )
+{
+    static const sal_uInt8 aAccentPolyFlags[24] =
+    {
+        0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 0, 2, 0, 2, 2
+    };
+
+    static const long aAccentPos[48] =
+    {
+         78,      0,
+        348,     79,
+        599,    235,
+        843,    469,
+        938,    574,
+        990,    669,
+        990,    773,
+        990,    843,
+        964,    895,
+        921,    947,
+        886,    982,
+        860,    999,
+        825,    999,
+        764,    999,
+        721,    964,
+        686,    895,
+        625,    791,
+        556,    660,
+        469,    504,
+        400,    400,
+        261,    252,
+         61,     61,
+          0,     27,
+          9,      0
+    };
+
+    rWidth      = 0;
+    rYOff       = 0;
+    rPolyLine   = false;
+
+    if ( !nHeight )
+        return;
+
+    FontEmphasisMark    nEmphasisStyle = eEmphasis & EMPHASISMARK_STYLE;
+    long                nDotSize = 0;
+    switch ( nEmphasisStyle )
+    {
+        case EMPHASISMARK_DOT:
+            // Dot has 55% of the height
+            nDotSize = (nHeight*550)/1000;
+            if ( !nDotSize )
+                nDotSize = 1;
+            if ( nDotSize <= 2 )
+                rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) );
+            else
+            {
+                long nRad = nDotSize/2;
+                Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
+                rPolyPoly.Insert( aPoly );
+            }
+            rYOff = ((nHeight*250)/1000)/2; // Center to the another EmphasisMarks
+            rWidth = nDotSize;
+            break;
+
+        case EMPHASISMARK_CIRCLE:
+            // Dot has 80% of the height
+            nDotSize = (nHeight*800)/1000;
+            if ( !nDotSize )
+                nDotSize = 1;
+            if ( nDotSize <= 2 )
+                rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) );
+            else
+            {
+                long nRad = nDotSize/2;
+                Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
+                rPolyPoly.Insert( aPoly );
+                // BorderWidth is 15%
+                long nBorder = (nDotSize*150)/1000;
+                if ( nBorder <= 1 )
+                    rPolyLine = true;
+                else
+                {
+                    Polygon aPoly2( Point( nRad, nRad ),
+                                    nRad-nBorder, nRad-nBorder );
+                    rPolyPoly.Insert( aPoly2 );
+                }
+            }
+            rWidth = nDotSize;
+            break;
+
+        case EMPHASISMARK_DISC:
+            // Dot has 80% of the height
+            nDotSize = (nHeight*800)/1000;
+            if ( !nDotSize )
+                nDotSize = 1;
+            if ( nDotSize <= 2 )
+                rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) );
+            else
+            {
+                long nRad = nDotSize/2;
+                Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
+                rPolyPoly.Insert( aPoly );
+            }
+            rWidth = nDotSize;
+            break;
+
+        case EMPHASISMARK_ACCENT:
+            // Dot has 80% of the height
+            nDotSize = (nHeight*800)/1000;
+            if ( !nDotSize )
+                nDotSize = 1;
+            if ( nDotSize <= 2 )
+            {
+                if ( nDotSize == 1 )
+                {
+                    rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) );
+                    rWidth = nDotSize;
+                }
+                else
+                {
+                    rRect1 = Rectangle( Point(), Size( 1, 1 ) );
+                    rRect2 = Rectangle( Point( 1, 1 ), Size( 1, 1 ) );
+                }
+            }
+            else
+            {
+                Polygon aPoly( sizeof( aAccentPos ) / sizeof( long ) / 2,
+                               (const Point*)aAccentPos,
+                               aAccentPolyFlags );
+                double dScale = ((double)nDotSize)/1000.0;
+                aPoly.Scale( dScale, dScale );
+                Polygon aTemp;
+                aPoly.AdaptiveSubdivide( aTemp );
+                Rectangle aBoundRect = aTemp.GetBoundRect();
+                rWidth = aBoundRect.GetWidth();
+                nDotSize = aBoundRect.GetHeight();
+                rPolyPoly.Insert( aTemp );
+            }
+            break;
+    }
+
+    // calculate position
+    long nOffY = 1+(mnDPIY/300); // one visible pixel space
+    long nSpaceY = nHeight-nDotSize;
+    if ( nSpaceY >= nOffY*2 )
+        rYOff += nOffY;
+    if ( !(eEmphasis & EMPHASISMARK_POS_BELOW) )
+        rYOff += nDotSize;
+}
+
+FontEmphasisMark OutputDevice::ImplGetEmphasisMarkStyle( const Font& rFont )
+{
+    FontEmphasisMark nEmphasisMark = rFont.GetEmphasisMark();
+
+    // If no Position is set, then calculate the default position, which
+    // depends on the language
+    if ( !(nEmphasisMark & (EMPHASISMARK_POS_ABOVE | EMPHASISMARK_POS_BELOW)) )
+    {
+        LanguageType eLang = rFont.GetLanguage();
+        // In Chinese Simplified the EmphasisMarks are below/left
+        if (MsLangId::isSimplifiedChinese(eLang))
+            nEmphasisMark |= EMPHASISMARK_POS_BELOW;
+        else
+        {
+            eLang = rFont.GetCJKContextLanguage();
+            // In Chinese Simplified the EmphasisMarks are below/left
+            if (MsLangId::isSimplifiedChinese(eLang))
+                nEmphasisMark |= EMPHASISMARK_POS_BELOW;
+            else
+                nEmphasisMark |= EMPHASISMARK_POS_ABOVE;
+        }
+    }
+
+    return nEmphasisMark;
+}
+
+long OutputDevice::GetFontExtLeading() const
+{
+    ImplFontEntry*      pEntry = mpFontEntry;
+    ImplFontMetricData* pMetric = &(pEntry->maMetric);
+
+    return pMetric->mnExtLeading;
+}
+
 void OutputDevice::ImplClearFontData( const bool bNewFontLists )
 {
     // the currently selected logical font is no longer needed
@@ -1016,32 +1440,6 @@ void ImplFontCache::Invalidate()
     DBG_ASSERT( (mnRef0Count==0), "ImplFontCache::Invalidate() - mnRef0Count non-zero" );
 }
 
-FontEmphasisMark OutputDevice::ImplGetEmphasisMarkStyle( const Font& rFont )
-{
-    FontEmphasisMark nEmphasisMark = rFont.GetEmphasisMark();
-
-    // If no Position is set, then calculate the default position, which
-    // depends on the language
-    if ( !(nEmphasisMark & (EMPHASISMARK_POS_ABOVE | EMPHASISMARK_POS_BELOW)) )
-    {
-        LanguageType eLang = rFont.GetLanguage();
-        // In Chinese Simplified the EmphasisMarks are below/left
-        if (MsLangId::isSimplifiedChinese(eLang))
-            nEmphasisMark |= EMPHASISMARK_POS_BELOW;
-        else
-        {
-            eLang = rFont.GetCJKContextLanguage();
-            // In Chinese Simplified the EmphasisMarks are below/left
-            if (MsLangId::isSimplifiedChinese(eLang))
-                nEmphasisMark |= EMPHASISMARK_POS_BELOW;
-            else
-                nEmphasisMark |= EMPHASISMARK_POS_ABOVE;
-        }
-    }
-
-    return nEmphasisMark;
-}
-
 void OutputDevice::ImplInitFontList() const
 {
     if( !mpFontCollection->Count() )
@@ -1472,162 +1870,9 @@ void ImplFontMetricData::ImplInitAboveTextLineSize()
             mnAboveWUnderlineSize = 3;
     }
     else
-        mnAboveWUnderlineSize = ((nWCalcSize*50)+50) / 100;
-
-    mnAboveWUnderlineOffset = nCeiling + (nIntLeading + 1) / 2;
-}
-
-void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, bool& rPolyLine,
-                                        Rectangle& rRect1, Rectangle& rRect2,
-                                        long& rYOff, long& rWidth,
-                                        FontEmphasisMark eEmphasis,
-                                        long nHeight, short /*nOrient*/ )
-{
-    static const sal_uInt8 aAccentPolyFlags[24] =
-    {
-        0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 0, 0, 2, 0, 2, 2
-    };
-
-    static const long aAccentPos[48] =
-    {
-         78,      0,
-        348,     79,
-        599,    235,
-        843,    469,
-        938,    574,
-        990,    669,
-        990,    773,
-        990,    843,
-        964,    895,
-        921,    947,
-        886,    982,
-        860,    999,
-        825,    999,
-        764,    999,
-        721,    964,
-        686,    895,
-        625,    791,
-        556,    660,
-        469,    504,
-        400,    400,
-        261,    252,
-         61,     61,
-          0,     27,
-          9,      0
-    };
-
-    rWidth      = 0;
-    rYOff       = 0;
-    rPolyLine   = false;
-
-    if ( !nHeight )
-        return;
-
-    FontEmphasisMark    nEmphasisStyle = eEmphasis & EMPHASISMARK_STYLE;
-    long                nDotSize = 0;
-    switch ( nEmphasisStyle )
-    {
-        case EMPHASISMARK_DOT:
-            // Dot has 55% of the height
-            nDotSize = (nHeight*550)/1000;
-            if ( !nDotSize )
-                nDotSize = 1;
-            if ( nDotSize <= 2 )
-                rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) );
-            else
-            {
-                long nRad = nDotSize/2;
-                Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
-                rPolyPoly.Insert( aPoly );
-            }
-            rYOff = ((nHeight*250)/1000)/2; // Center to the another EmphasisMarks
-            rWidth = nDotSize;
-            break;
-
-        case EMPHASISMARK_CIRCLE:
-            // Dot has 80% of the height
-            nDotSize = (nHeight*800)/1000;
-            if ( !nDotSize )
-                nDotSize = 1;
-            if ( nDotSize <= 2 )
-                rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) );
-            else
-            {
-                long nRad = nDotSize/2;
-                Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
-                rPolyPoly.Insert( aPoly );
-                // BorderWidth is 15%
-                long nBorder = (nDotSize*150)/1000;
-                if ( nBorder <= 1 )
-                    rPolyLine = true;
-                else
-                {
-                    Polygon aPoly2( Point( nRad, nRad ),
-                                    nRad-nBorder, nRad-nBorder );
-                    rPolyPoly.Insert( aPoly2 );
-                }
-            }
-            rWidth = nDotSize;
-            break;
-
-        case EMPHASISMARK_DISC:
-            // Dot has 80% of the height
-            nDotSize = (nHeight*800)/1000;
-            if ( !nDotSize )
-                nDotSize = 1;
-            if ( nDotSize <= 2 )
-                rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) );
-            else
-            {
-                long nRad = nDotSize/2;
-                Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
-                rPolyPoly.Insert( aPoly );
-            }
-            rWidth = nDotSize;
-            break;
-
-        case EMPHASISMARK_ACCENT:
-            // Dot has 80% of the height
-            nDotSize = (nHeight*800)/1000;
-            if ( !nDotSize )
-                nDotSize = 1;
-            if ( nDotSize <= 2 )
-            {
-                if ( nDotSize == 1 )
-                {
-                    rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) );
-                    rWidth = nDotSize;
-                }
-                else
-                {
-                    rRect1 = Rectangle( Point(), Size( 1, 1 ) );
-                    rRect2 = Rectangle( Point( 1, 1 ), Size( 1, 1 ) );
-                }
-            }
-            else
-            {
-                Polygon aPoly( sizeof( aAccentPos ) / sizeof( long ) / 2,
-                               (const Point*)aAccentPos,
-                               aAccentPolyFlags );
-                double dScale = ((double)nDotSize)/1000.0;
-                aPoly.Scale( dScale, dScale );
-                Polygon aTemp;
-                aPoly.AdaptiveSubdivide( aTemp );
-                Rectangle aBoundRect = aTemp.GetBoundRect();
-                rWidth = aBoundRect.GetWidth();
-                nDotSize = aBoundRect.GetHeight();
-                rPolyPoly.Insert( aTemp );
-            }
-            break;
-    }
-
-    // calculate position
-    long nOffY = 1+(mnDPIY/300); // one visible pixel space
-    long nSpaceY = nHeight-nDotSize;
-    if ( nSpaceY >= nOffY*2 )
-        rYOff += nOffY;
-    if ( !(eEmphasis & EMPHASISMARK_POS_BELOW) )
-        rYOff += nDotSize;
+        mnAboveWUnderlineSize = ((nWCalcSize*50)+50) / 100;
+
+    mnAboveWUnderlineOffset = nCeiling + (nIntLeading + 1) / 2;
 }
 
 void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY,
@@ -1854,191 +2099,6 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay
     return pSalLayout;
 }
 
-int OutputDevice::GetDevFontCount() const
-{
-
-    if( !mpGetDevFontList )
-        mpGetDevFontList = mpFontCollection->GetDevFontList();
-    return mpGetDevFontList->Count();
-}
-
-FontInfo OutputDevice::GetDevFont( int nDevFontIndex ) const
-{
-
-    FontInfo aFontInfo;
-
-    ImplInitFontList();
-
-    int nCount = GetDevFontCount();
-    if( nDevFontIndex < nCount )
-    {
-        const PhysicalFontFace& rData = *mpGetDevFontList->Get( nDevFontIndex );
-        aFontInfo.SetName( rData.GetFamilyName() );
-        aFontInfo.SetStyleName( rData.GetStyleName() );
-        aFontInfo.SetCharSet( rData.IsSymbolFont() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
-        aFontInfo.SetFamily( rData.GetFamilyType() );
-        aFontInfo.SetPitch( rData.GetPitch() );
-        aFontInfo.SetWeight( rData.GetWeight() );
-        aFontInfo.SetItalic( rData.GetSlant() );
-        aFontInfo.SetWidthType( rData.GetWidthType() );
-        if( rData.IsScalable() )
-            aFontInfo.mpImplMetric->mnMiscFlags |= ImplFontMetric::SCALABLE_FLAG;
-        if( rData.mbDevice )
-            aFontInfo.mpImplMetric->mnMiscFlags |= ImplFontMetric::DEVICE_FLAG;
-    }
-
-    return aFontInfo;
-}
-
-bool OutputDevice::AddTempDevFont( const OUString& rFileURL, const OUString& rFontName )
-{
-
-    ImplInitFontList();
-
-    if( !mpGraphics && !AcquireGraphics() )
-        return false;
-
-    bool bRC = mpGraphics->AddTempDevFont( mpFontCollection, rFileURL, rFontName );
-    if( !bRC )
-        return false;
-
-    if( mpAlphaVDev )
-        mpAlphaVDev->AddTempDevFont( rFileURL, rFontName );
-
-    mpFontCache->Invalidate();
-    return true;
-}
-
-int OutputDevice::GetDevFontSizeCount( const Font& rFont ) const
-{
-
-    delete mpGetDevSizeList;
-
-    ImplInitFontList();
-    mpGetDevSizeList = mpFontCollection->GetDevSizeList( rFont.GetName() );
-    return mpGetDevSizeList->Count();
-}
-
-Size OutputDevice::GetDevFontSize( const Font& rFont, int nSizeIndex ) const
-{
-
-    // check range
-    int nCount = GetDevFontSizeCount( rFont );
-    if ( nSizeIndex >= nCount )
-        return Size();
-
-    // when mapping is enabled round to .5 points
-    Size aSize( 0, mpGetDevSizeList->Get( nSizeIndex ) );
-    if ( mbMap )
-    {
-        aSize.Height() *= 10;
-        MapMode aMap( MAP_10TH_INCH, Point(), Fraction( 1, 72 ), Fraction( 1, 72 ) );
-        aSize = PixelToLogic( aSize, aMap );
-        aSize.Height() += 5;
-        aSize.Height() /= 10;
-        long nRound = aSize.Height() % 5;
-        if ( nRound >= 3 )
-            aSize.Height() += (5-nRound);
-        else
-            aSize.Height() -= nRound;
-        aSize.Height() *= 10;
-        aSize = LogicToPixel( aSize, aMap );
-        aSize = PixelToLogic( aSize );
-        aSize.Height() += 5;
-        aSize.Height() /= 10;
-    }
-    return aSize;
-}
-
-bool OutputDevice::IsFontAvailable( const OUString& rFontName ) const
-{
-    PhysicalFontFamily* pFound = mpFontCollection->FindFontFamily( rFontName );
-    return (pFound != NULL);
-}
-
-FontMetric OutputDevice::GetFontMetric() const
-{
-    FontMetric aMetric;
-    if( mbNewFont && !ImplNewFont() )
-        return aMetric;
-
-    ImplFontEntry*      pEntry = mpFontEntry;
-    ImplFontMetricData* pMetric = &(pEntry->maMetric);
-
-    // prepare metric
-    aMetric.Font::operator=( maFont );
-
-    // set aMetric with info from font
-    aMetric.SetName( maFont.GetName() );
-    aMetric.SetStyleName( pMetric->GetStyleName() );
-    aMetric.SetSize( PixelToLogic( Size( pMetric->mnWidth, pMetric->mnAscent+pMetric->mnDescent-pMetric->mnIntLeading ) ) );
-    aMetric.SetCharSet( pMetric->IsSymbolFont() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
-    aMetric.SetFamily( pMetric->GetFamilyType() );
-    aMetric.SetPitch( pMetric->GetPitch() );
-    aMetric.SetWeight( pMetric->GetWeight() );
-    aMetric.SetItalic( pMetric->GetSlant() );
-    aMetric.SetWidthType( pMetric->GetWidthType() );
-    if ( pEntry->mnOwnOrientation )
-        aMetric.SetOrientation( pEntry->mnOwnOrientation );
-    else
-        aMetric.SetOrientation( pMetric->mnOrientation );
-    if( !pEntry->maMetric.mbKernableFont )
-         aMetric.SetKerning( maFont.GetKerning() & ~KERNING_FONTSPECIFIC );
-
-    // set remaining metric fields
-    aMetric.mpImplMetric->mnMiscFlags   = 0;
-    if( pMetric->mbDevice )
-            aMetric.mpImplMetric->mnMiscFlags |= ImplFontMetric::DEVICE_FLAG;
-    if( pMetric->mbScalableFont )
-            aMetric.mpImplMetric->mnMiscFlags |= ImplFontMetric::SCALABLE_FLAG;
-    aMetric.mpImplMetric->mnAscent      = ImplDevicePixelToLogicHeight( pMetric->mnAscent+mnEmphasisAscent );
-    aMetric.mpImplMetric->mnDescent     = ImplDevicePixelToLogicHeight( pMetric->mnDescent+mnEmphasisDescent );
-    aMetric.mpImplMetric->mnIntLeading  = ImplDevicePixelToLogicHeight( pMetric->mnIntLeading+mnEmphasisAscent );
-    aMetric.mpImplMetric->mnExtLeading  = ImplDevicePixelToLogicHeight( GetFontExtLeading() );
-    aMetric.mpImplMetric->mnExtLeading  = ImplDevicePixelToLogicHeight( pMetric->mnExtLeading );
-    aMetric.mpImplMetric->mnLineHeight  = ImplDevicePixelToLogicHeight( pMetric->mnAscent+pMetric->mnDescent+mnEmphasisAscent+mnEmphasisDescent );
-    aMetric.mpImplMetric->mnSlant       = ImplDevicePixelToLogicHeight( pMetric->mnSlant );
-
-    return aMetric;
-}
-
-long OutputDevice::GetFontExtLeading() const
-{
-    ImplFontEntry*      pEntry = mpFontEntry;
-    ImplFontMetricData* pMetric = &(pEntry->maMetric);
-
-    return pMetric->mnExtLeading;
-}
-
-FontMetric OutputDevice::GetFontMetric( const Font& rFont ) const
-{
-    // select font, query metrics, select original font again
-    Font aOldFont = GetFont();
-    const_cast<OutputDevice*>(this)->SetFont( rFont );
-    FontMetric aMetric( GetFontMetric() );
-    const_cast<OutputDevice*>(this)->SetFont( aOldFont );
-    return aMetric;
-}
-
-/** OutputDevice::GetSysFontData
- *
- * @param nFallbacklevel Fallback font level (0 = best matching font)
- *
- * Retrieve detailed font information in platform independent structure
- *
- * @return SystemFontData
- **/
-SystemFontData OutputDevice::GetSysFontData(int nFallbacklevel) const
-{
-    SystemFontData aSysFontData;
-    aSysFontData.nSize = sizeof(aSysFontData);
-
-    if (!mpGraphics) AcquireGraphics();
-    if (mpGraphics) aSysFontData = mpGraphics->GetSysFontData(nFallbacklevel);
-
-    return aSysFontData;
-}
-
 long OutputDevice::GetMinKashida() const
 {
     if( mbNewFont && !ImplNewFont() )
@@ -2104,79 +2164,6 @@ bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& rSt
     return (nLen == (int)rVector.size());
 }
 
-bool OutputDevice::GetFontCapabilities( FontCapabilities& rFontCapabilities ) const
-{
-    // we need a graphics
-    if( !mpGraphics && !AcquireGraphics() )
-        return false;
-
-    if( mbNewFont )
-        ImplNewFont();
-    if( mbInitFont )
-        InitFont();
-    if( !mpFontEntry )
-        return false;
-
-    return mpGraphics->GetImplFontCapabilities(rFontCapabilities);
-}
-
-bool OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
-{
-    rFontCharMap.Reset();
-
-    // we need a graphics
-    if( !mpGraphics && !AcquireGraphics() )
-        return false;
-
-    if( mbNewFont )
-        ImplNewFont();
-    if( mbInitFont )
-        InitFont();
-    if( !mpFontEntry )
-        return false;
-
-#ifdef ENABLE_IFC_CACHE // a little font charmap cache helps considerably
-    static const int NMAXITEMS = 16;
-    static int nUsedItems = 0, nCurItem = 0;
-
-    struct CharMapCacheItem { const PhysicalFontFace* mpFontData; FontCharMap maCharMap; };
-    static CharMapCacheItem aCache[ NMAXITEMS ];
-
-    const PhysicalFontFace* pFontData = mpFontEntry->maFontSelData.mpFontData;
-
-    int i;
-    for( i = nUsedItems; --i >= 0; )
-        if( pFontData == aCache[i].mpFontData )
-            break;
-    if( i >= 0 ) // found in cache
-    {
-        rFontCharMap.Reset( aCache[i].maCharMap.mpImpl );
-    }
-    else // need to cache
-#endif // ENABLE_IFC_CACHE
-    {
-        const ImplFontCharMap* pNewMap = mpGraphics->GetImplFontCharMap();
-        rFontCharMap.Reset( pNewMap );
-
-#ifdef ENABLE_IFC_CACHE
-        // manage cache round-robin and insert data
-        CharMapCacheItem& rItem = aCache[ nCurItem ];
-        rItem.mpFontData = pFontData;
-        rItem.maCharMap.Reset( pNewMap );
-
-        if( ++nCurItem >= NMAXITEMS )
-            nCurItem = 0;
-
-        if( ++nUsedItems >= NMAXITEMS )
-            nUsedItems = NMAXITEMS;
-#endif // ENABLE_IFC_CACHE
-    }
-
-    if( rFontCharMap.IsDefaultMap() )
-        return false;
-    return true;
-}
-
 sal_Int32 OutputDevice::HasGlyphs( const Font& rTempFont, const OUString& rStr,
     sal_Int32 nIndex, sal_Int32 nLen ) const
 {
commit c08856c17375fd7edcc35c13823ce92bf829c373
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sun Apr 27 14:37:48 2014 +1000

    VCL: rearrange font functions, move functions into OutputDevice
    
    I have rearrange the various functions of OutputDevice to better group
    them in outdev.hxx. Also moved ImplRotatePos and ImplDrawWavePixel into
    the OutputDevice class.
    
    Change-Id: I0b384a4d094dffcfb3ee19c29562630cfb3a2167

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 62464f8..e9b40fb 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -237,9 +237,6 @@ typedef ::std::vector< VCLXGraphics* > VCLXGraphicsList_impl;
 sal_uLong AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix );
 void AdjustTwoRect( SalTwoRect& rTwoRect, const Rectangle& rValidSrcRect );
 
-void ImplRotatePos( long nOriginX, long nOriginY, long& rX, long& rY,
-                    int nOrientation );
-
 extern const sal_uLong nVCLRLut[ 6 ];
 extern const sal_uLong nVCLGLut[ 6 ];
 extern const sal_uLong nVCLBLut[ 6 ];
@@ -435,6 +432,9 @@ public:
     void                        SetExtOutDevData( vcl::ExtOutDevData* pExtOutDevData ) { mpExtOutDevData = pExtOutDevData; }
     vcl::ExtOutDevData*         GetExtOutDevData() const { return mpExtOutDevData; }
 
+private:
+    void                        ImplRotatePos( long nOriginX, long nOriginY, long& rX, long &rY,
+                                               int nOrientation );
     ///@}
 
     /** @name OutputDevice state functions
@@ -484,6 +484,10 @@ public:
 
     const Wallpaper&            GetBackground() const { return maBackground; }
     bool                        IsBackground() const { return mbBackground; }
+
+    void                        SetFont( const Font& rNewFont );
+    const Font&                 GetFont() const { return maFont; }
+
     ///@}
 
     /** @name Clipping functions
@@ -511,10 +515,14 @@ private:
     SAL_DLLPRIVATE void         SetDeviceClipRegion( const Region* pRegion );
     ///@}
 
-    /** @name Text and font functions
+    /** @name Text functions
      */
     ///@{
 public:
+    SystemTextLayoutData        GetSysTextLayoutData( const Point& rStartPt, const OUString& rStr,
+                                                      sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
+                                                      const sal_Int32* pDXAry = NULL ) const;
+
     SAL_DLLPRIVATE bool         ImplNewFont() const;
     SAL_DLLPRIVATE void         ImplInitTextColor();
     static
@@ -528,15 +536,13 @@ public:
     SAL_DLLPRIVATE void         ImplDrawSpecialText( SalLayout& );
     SAL_DLLPRIVATE void         ImplDrawText( SalLayout& );
     SAL_DLLPRIVATE Rectangle    ImplGetTextBoundRect( const SalLayout& );
-    SAL_DLLPRIVATE void         ImplDrawEmphasisMarks( SalLayout& );
-    static
-    SAL_DLLPRIVATE OUString     ImplGetEllipsisString( const OutputDevice& rTargetDevice, const OUString& rStr,
-                                                       long nMaxWidth, sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout );
-
     SAL_DLLPRIVATE void         ImplDrawTextRect( long nBaseX, long nBaseY, long nX, long nY, long nWidth, long nHeight );
 
     SAL_DLLPRIVATE void         ImplInitTextLineSize();
     SAL_DLLPRIVATE void         ImplInitAboveTextLineSize();
+
+    SAL_DLLPRIVATE void         ImplDrawWavePixel( long nOriginX, long nOriginY, long nCurX, long nCurY, short nOrientation, SalGraphics* pGraphics, OutputDevice* pOutDev,
+                                                   bool bDrawPixAsRect, long nPixWidth, long nPixHeight );
     SAL_DLLPRIVATE void         ImplDrawWaveLine( long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color& rColor );
     SAL_DLLPRIVATE void         ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove );
     SAL_DLLPRIVATE void         ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove );
@@ -546,23 +552,12 @@ public:
     SAL_DLLPRIVATE void         ImplDrawMnemonicLine( long nX, long nY, long nWidth );
     SAL_DLLPRIVATE static bool  ImplIsUnderlineAbove( const Font& );
 
-    SAL_DLLPRIVATE static       FontEmphasisMark ImplGetEmphasisMarkStyle( const Font& rFont );
-    SAL_DLLPRIVATE void         ImplGetEmphasisMark( PolyPolygon& rPolyPoly, bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient );
-    SAL_DLLPRIVATE void         ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 );
     static
     SAL_DLLPRIVATE long         ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const OUString& rStr, sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout );
     SAL_DLLPRIVATE void         ImplInitFontList() const;
     SAL_DLLPRIVATE void         ImplUpdateFontData( bool bNewFontLists );
     SAL_DLLPRIVATE static void  ImplUpdateAllFontData( bool bNewFontLists );
 
-    void                        SetFont( const Font& rNewFont );
-    const Font&                 GetFont() const { return maFont; }
-
-    SystemFontData              GetSysFontData( int nFallbacklevel ) const;
-    SystemTextLayoutData        GetSysTextLayoutData( const Point& rStartPt, const OUString& rStr,
-                                                      sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
-                                                      const sal_Int32* pDXAry = NULL ) const;
-
     void                        SetTextColor( const Color& rColor );
     const Color&                GetTextColor() const { return maTextColor; }
     void                        SetTextFillColor();
@@ -664,23 +659,37 @@ public:
                                                  const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
                                                  sal_Int32 nLen = -1, bool bOptimize = true,
                                                  sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const;
+    ///@}
 
-    bool                        GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
-                                                    int nLen, int nBase, MetricVector& rVector );
+    /** @name Font functions
+     */
+    ///@{
+public:
+    FontInfo                    GetDevFont( int nDevFontIndex ) const;
+    int                         GetDevFontCount() const;
 
-    bool                        AddTempDevFont( const OUString& rFileURL, const OUString& rFontName );
+    bool                        IsFontAvailable( const OUString& rFontName ) const;
 
-    int                         GetDevFontCount() const;
-    FontInfo                    GetDevFont( int nDevFontIndex ) const;
-    int                         GetDevFontSizeCount( const Font& ) const;
     Size                        GetDevFontSize( const Font& rFont, int nSizeIndex ) const;
-    bool                        IsFontAvailable( const OUString& rFontName ) const;
+    int                         GetDevFontSizeCount( const Font& ) const;
+
+    bool                        AddTempDevFont( const OUString& rFileURL, const OUString& rFontName );
 
     FontMetric                  GetFontMetric() const;
     FontMetric                  GetFontMetric( const Font& rFont ) const;
+
     bool                        GetFontCharMap( FontCharMap& rFontCharMap ) const;
     bool                        GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const;
 
+    SystemFontData              GetSysFontData( int nFallbacklevel ) const;
+
+    SAL_DLLPRIVATE static FontEmphasisMark
+                                ImplGetEmphasisMarkStyle( const Font& rFont );
+    SAL_DLLPRIVATE void         ImplGetEmphasisMark( PolyPolygon& rPolyPoly, bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient );
+
+    bool                        GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex,
+                                                    int nLen, int nBase, MetricVector& rVector );
+
     sal_Int32                   HasGlyphs( const Font& rFont, const OUString& rStr,
                                            sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const;
 
@@ -721,6 +730,13 @@ private:
     SAL_DLLPRIVATE void         ImplClearFontData( bool bNewFontLists );
     SAL_DLLPRIVATE void         ImplRefreshFontData( bool bNewFontLists );
     SAL_DLLPRIVATE static void  ImplUpdateFontDataForAllFrames( FontUpdateHandler_t pHdl, bool bNewFontLists );
+
+    static

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list