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

Michael Stahl mstahl at redhat.com
Tue Dec 3 11:34:00 PST 2013


 vcl/inc/sallayout.hxx            |    6 +++---
 vcl/win/source/gdi/winlayout.cxx |   11 ++++++-----
 2 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit af43ae6f85f9ca840889d568f15b6123c98037a4
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Dec 3 20:26:36 2013 +0100

    vcl: try to fix some sal_Int32 GetTextBreak()s
    
    Change-Id: If4aee2b42f0d2e15ca228863754959b7486437ee

diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index 1f933a4..561c8f9 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -205,7 +205,7 @@ public:
     int             GetOrientation() const                  { return mnOrientation; }
 
     // methods using string indexing
-    virtual int     GetTextBreak( long nMaxWidth, long nCharExtra=0, int nFactor=1 ) const = 0;
+    virtual sal_Int32 GetTextBreak(long nMaxWidth, long nCharExtra=0, int nFactor=1) const = 0;
     virtual long    FillDXArray( sal_Int32* pDXArray ) const = 0;
     virtual long    GetTextWidth() const { return FillDXArray( NULL ); }
     virtual void    GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const = 0;
@@ -263,7 +263,7 @@ class VCL_PLUGIN_PUBLIC MultiSalLayout : public SalLayout
 {
 public:
     virtual void    DrawText( SalGraphics& ) const;
-    virtual int     GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const;
+    virtual sal_Int32 GetTextBreak(long nMaxWidth, long nCharExtra, int nFactor) const;
     virtual long    FillDXArray( sal_Int32* pDXArray ) const;
     virtual void    GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const;
     virtual int     GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdxAry, Point& rPos,
@@ -359,7 +359,7 @@ public:
     // used by upper layers
     virtual long    GetTextWidth() const;
     virtual long    FillDXArray( sal_Int32* pDXArray ) const;
-    virtual int     GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const;
+    virtual sal_Int32 GetTextBreak(long nMaxWidth, long nCharExtra, int nFactor) const;
     virtual void    GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const;
 
     // used by display layers
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index a0f1ec4..dc6e469 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -158,7 +158,7 @@ public:
                         const PhysicalFontFace** pFallbackFonts = NULL ) const;
 
     virtual long    FillDXArray( long* pDXArray ) const;
-    virtual int     GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const;
+    virtual salInt32 GetTextBreak(long nMaxWidth, long nCharExtra, int nFactor) const;
     virtual void    GetCaretPositions( int nArraySize, long* pCaretXArray ) const;
 
     // for glyph+font+script fallback
@@ -1010,7 +1010,7 @@ public:
                         const PhysicalFontFace** pFallbackFonts = NULL ) const;
 
     virtual long    FillDXArray( long* pDXArray ) const;
-    virtual int     GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const;
+    virtual sal_Int32 GetTextBreak(long nMaxWidth, long nCharExtra, int nFactor) const;
     virtual void    GetCaretPositions( int nArraySize, long* pCaretXArray ) const;
     virtual bool    IsKashidaPosValid ( int nCharPos ) const;
 
@@ -2719,7 +2719,7 @@ public:
     virtual void  DrawText( SalGraphics& ) const;
 
     // methods using string indexing
-    virtual int   GetTextBreak( long nMaxWidth, long nCharExtra=0, int nFactor=1 ) const;
+    virtual sal_Int32 GetTextBreak( long nMaxWidth, long nCharExtra=0, int nFactor=1 ) const;
     virtual long  FillDXArray( long* pDXArray ) const;
 
     virtual void  GetCaretPositions( int nArraySize, long* pCaretXArray ) const;
@@ -2855,9 +2855,10 @@ void GraphiteWinLayout::DrawText(SalGraphics &sal_graphics) const
           DeleteFont( SelectFont( aHDC, hOrigFont ) );
 }
 
-int GraphiteWinLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const
+sal_Int32 GraphiteWinLayout::GetTextBreak(
+        long nMaxWidth, long nCharExtra, int nFactor) const
 {
-    int nBreak = maImpl.GetTextBreak(nMaxWidth, nCharExtra, nFactor);
+    sal_Int32 nBreak = maImpl.GetTextBreak(nMaxWidth, nCharExtra, nFactor);
     return nBreak;
 }
 


More information about the Libreoffice-commits mailing list