[Libreoffice-commits] .: editeng/inc editeng/qa editeng/source svx/inc svx/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Mon Mar 28 02:28:43 PDT 2011


 editeng/inc/editeng/bolnitem.hxx           |   12 -
 editeng/inc/editeng/borderline.hxx         |  250 ++++++++++++++---------------
 editeng/inc/editeng/boxitem.hxx            |   36 ++--
 editeng/qa/items/borderline_test.cxx       |    2 
 editeng/source/items/borderline.cxx        |   46 +++--
 editeng/source/items/frmitems.cxx          |    1 
 editeng/source/rtf/rtfitem.cxx             |    1 
 svx/inc/svx/framelink.hxx                  |   20 +-
 svx/inc/svx/frmsel.hxx                     |   12 -
 svx/source/dialog/framelink.cxx            |    2 
 svx/source/dialog/frmsel.cxx               |    2 
 svx/source/inc/frmselimpl.hxx              |   10 -
 svx/source/table/cell.cxx                  |    1 
 svx/source/table/tablecontroller.cxx       |    1 
 svx/source/table/tablelayouter.cxx         |    1 
 svx/source/table/tablelayouter.hxx         |   12 -
 svx/source/table/viewcontactoftableobj.cxx |    1 
 svx/source/tbxctrls/tbcontrl.cxx           |    1 
 18 files changed, 221 insertions(+), 190 deletions(-)

New commits:
commit 56dd271c5930c2c7e3d280266c27607e67ccfa16
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Fri Mar 25 15:51:50 2011 +0100

    Moved SvxBorder* into editeng namespace to avoid duplicate DOUBLE on windows

diff --git a/editeng/inc/editeng/bolnitem.hxx b/editeng/inc/editeng/bolnitem.hxx
index 8222c5d..ee15661 100755
--- a/editeng/inc/editeng/bolnitem.hxx
+++ b/editeng/inc/editeng/bolnitem.hxx
@@ -42,10 +42,12 @@
 
 /*
 [Description]
-This Item transports a SvxBorderLine.
+This Item transports a editeng::SvxBorderLine.
 */
 
-class SvxBorderLine;
+namespace editeng {
+    class SvxBorderLine;
+}
 
 class EDITENG_DLLPUBLIC SvxLineItem : public SfxPoolItem
 {
@@ -71,11 +73,11 @@ public:
     virtual bool             ScaleMetrics( long nMult, long nDiv );
     virtual bool             HasMetrics() const;
 
-    const   SvxBorderLine*  GetLine     () const { return pLine; }
-    void                    SetLine     ( const SvxBorderLine *pNew );
+    const   editeng::SvxBorderLine*  GetLine     () const { return pLine; }
+    void                    SetLine     ( const editeng::SvxBorderLine *pNew );
 
 private:
-    SvxBorderLine*  pLine;
+    editeng::SvxBorderLine*  pLine;
 };
 
 
diff --git a/editeng/inc/editeng/borderline.hxx b/editeng/inc/editeng/borderline.hxx
index 485aa5f..17e137a 100755
--- a/editeng/inc/editeng/borderline.hxx
+++ b/editeng/inc/editeng/borderline.hxx
@@ -45,132 +45,136 @@
 
 // ============================================================================
 
-enum SvxBorderStyle
-{
-    SOLID,
-    DOTTED,
-    DASHED,
-    DOUBLE,
-    THINTHICK_SMALLGAP,
-    THINTHICK_MEDIUMGAP,
-    THINTHICK_LARGEGAP,
-    THICKTHIN_SMALLGAP,
-    THICKTHIN_MEDIUMGAP,
-    THICKTHIN_LARGEGAP,
-    EMBOSSED,
-    ENGRAVED,
-    OUTSET,
-    INSET,
-    NO_STYLE = -1
-};
-
-class EDITENG_DLLPUBLIC SvxBorderLine
-{
-protected:
-    Color  aColor;
-
-    long m_nWidth;
-    bool m_bMirrorWidths;
-    BorderWidthImpl m_aWidthImpl;
-    long m_nMult;
-    long m_nDiv;
-
-    SvxBorderStyle   m_nStyle;
-    sal_uInt16 nOutWidth;
-    sal_uInt16 nInWidth;
-    sal_uInt16 nDistance;
-
-    bool             m_bUseLeftTop;
-    Color            (*m_pColorOutFn)( Color );
-    Color            (*m_pColorInFn)( Color );
-    Color            (*m_pColorGapFn)( Color );
-
-public:
-    SvxBorderLine( const Color *pCol = 0,
-            long nWidth = 0, SvxBorderStyle nStyle = SOLID,
-            bool bUseLeftTop = false,
-            Color (*pColorOutFn)( Color ) = &darkColor,
-            Color (*pColorInFn)( Color ) = &darkColor,
-            Color (*pColorGapFn)( Color ) = NULL );
-    SvxBorderLine( const SvxBorderLine& r );
-
-    SvxBorderLine& operator=( const SvxBorderLine& r );
-
-    const Color&    GetColor() const { return aColor; }
-    Color           GetColorOut( bool bLeftOrTop = true ) const;
-    Color           GetColorIn( bool bLeftOrTop = true ) const;
-    bool            HasGapColor() const { return m_pColorGapFn != NULL; }
-    Color           GetColorGap() const;
-
-    void            SetWidth( long nWidth = 0 ) { m_nWidth = nWidth; }
-    /** Guess the style and width from the three lines widths values.
-
-        When the value of nStyle is SvxBorderLine::DOUBLE, the style set will be guessed
-        using the three values to match the best possible style among the following:
-            - SvxBorderLine::DOUBLE
-            - SvxBorderLine::THINTHICK_SMALLGAP
-            - SvxBorderLine::THINTHICK_MEDIUMGAP
-            - SvxBorderLine::THINTHICK_LARGEGAP
-            - SvxBorderLine::THICKTHIN_SMALLGAP
-            - SvxBorderLine::THICKTHIN_MEDIUMGAP
-            - SvxBorderLine::THICKTHIN_LARGEGAP
-
-        If no styles matches the width, then the width is set to 0.
-
-        There is one known case that could fit several styles: \a nIn = \a nDist = 0.75 pt,
-        \a nOut = 1.5 pt. This case fits SvxBorderLine::THINTHICK_SMALLGAP and
-        SvxBorderLine::THINTHICK_MEDIUMGAP with a 1.5 pt width and
-        SvxBorderLine::THINTHICK_LARGEGAP with a 0.75 pt width. The same case happens
-        also for thick-thin styles.
-
-        \param nStyle the border style used to guess the width.
-        \param nIn the width of the inner line in 1th pt
-        \param nOut the width of the outer line in 1th pt
-        \param nDist the width of the gap between the lines in 1th pt
-     */
-    void            GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn = 0, sal_uInt16 nDist = 0 );
-
-    // TODO Hacky method to mirror lines in only a few cases
-    void            SetMirrorWidths( bool bMirror = true ) { m_bMirrorWidths = bMirror; }
-    long            GetWidth( ) const { return m_nWidth; }
-    sal_uInt16 	    GetOutWidth() const;
-    sal_uInt16 		GetInWidth() const;
-    sal_uInt16 		GetDistance() const;
-
-    SvxBorderStyle  GetStyle() const { return m_nStyle; }
-
-    void 			SetColor( const Color &rColor ) { aColor = rColor; }
-    void            SetColorOutFn( Color (*pColorOutFn)( Color ) ) { m_pColorOutFn = pColorOutFn; }
-    void            SetColorInFn( Color (*pColorInFn)( Color ) ) { m_pColorInFn = pColorInFn; }
-    void            SetColorGapFn( Color (*pColorGapFn)( Color ) ) { m_pColorGapFn = pColorGapFn; }
-    void            SetUseLeftTop( bool bUseLeftTop ) { m_bUseLeftTop = bUseLeftTop; }
-    void            SetStyle( SvxBorderStyle nNew );
-    void			ScaleMetrics( long nMult, long nDiv );
-
-    sal_Bool			operator==( const SvxBorderLine &rCmp ) const;
-
-    String          GetValueString( SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit,
-                                    const IntlWrapper* pIntl,
-                                    sal_Bool bMetricStr = sal_False ) const;
-
-    bool			HasPriority( const SvxBorderLine& rOtherLine ) const;
-
-    bool isEmpty() const { return m_aWidthImpl.IsEmpty( ) || m_nStyle == NO_STYLE || m_nWidth == 0; }
-    bool isDouble() const { return m_aWidthImpl.IsDouble(); }
-    sal_uInt16 GetScaledWidth() const { return GetOutWidth() + GetInWidth() + GetDistance(); }
-
-    static Color darkColor( Color aMain );
-    static Color lightColor( Color aMain );
-
-    static Color threeDLightColor( Color aMain );
-    static Color threeDMediumColor( Color aMain );
-    static Color threeDDarkColor( Color aMain );
-
-    static BorderWidthImpl getWidthImpl( SvxBorderStyle nStyle );
-};
+namespace editeng {
+
+    enum SvxBorderStyle
+    {
+        SOLID,
+        DOTTED,
+        DASHED,
+        DOUBLE,
+        THINTHICK_SMALLGAP,
+        THINTHICK_MEDIUMGAP,
+        THINTHICK_LARGEGAP,
+        THICKTHIN_SMALLGAP,
+        THICKTHIN_MEDIUMGAP,
+        THICKTHIN_LARGEGAP,
+        EMBOSSED,
+        ENGRAVED,
+        OUTSET,
+        INSET,
+        NO_STYLE = -1
+    };
+
+    class EDITENG_DLLPUBLIC SvxBorderLine
+    {
+    protected:
+        Color  aColor;
+
+        long m_nWidth;
+        bool m_bMirrorWidths;
+        BorderWidthImpl m_aWidthImpl;
+        long m_nMult;
+        long m_nDiv;
+
+        SvxBorderStyle   m_nStyle;
+        sal_uInt16 nOutWidth;
+        sal_uInt16 nInWidth;
+        sal_uInt16 nDistance;
+
+        bool             m_bUseLeftTop;
+        Color            (*m_pColorOutFn)( Color );
+        Color            (*m_pColorInFn)( Color );
+        Color            (*m_pColorGapFn)( Color );
+
+    public:
+        SvxBorderLine( const Color *pCol = 0,
+                long nWidth = 0, SvxBorderStyle nStyle = SOLID,
+                bool bUseLeftTop = false,
+                Color (*pColorOutFn)( Color ) = &darkColor,
+                Color (*pColorInFn)( Color ) = &darkColor,
+                Color (*pColorGapFn)( Color ) = NULL );
+        SvxBorderLine( const SvxBorderLine& r );
+
+        SvxBorderLine& operator=( const SvxBorderLine& r );
+
+        const Color&    GetColor() const { return aColor; }
+        Color           GetColorOut( bool bLeftOrTop = true ) const;
+        Color           GetColorIn( bool bLeftOrTop = true ) const;
+        bool            HasGapColor() const { return m_pColorGapFn != NULL; }
+        Color           GetColorGap() const;
+
+        void            SetWidth( long nWidth = 0 ) { m_nWidth = nWidth; }
+        /** Guess the style and width from the three lines widths values.
+
+            When the value of nStyle is SvxBorderLine::DOUBLE, the style set will be guessed
+            using the three values to match the best possible style among the following:
+                - SvxBorderLine::DOUBLE
+                - SvxBorderLine::THINTHICK_SMALLGAP
+                - SvxBorderLine::THINTHICK_MEDIUMGAP
+                - SvxBorderLine::THINTHICK_LARGEGAP
+                - SvxBorderLine::THICKTHIN_SMALLGAP
+                - SvxBorderLine::THICKTHIN_MEDIUMGAP
+                - SvxBorderLine::THICKTHIN_LARGEGAP
+
+            If no styles matches the width, then the width is set to 0.
+
+            There is one known case that could fit several styles: \a nIn = \a nDist = 0.75 pt,
+            \a nOut = 1.5 pt. This case fits SvxBorderLine::THINTHICK_SMALLGAP and
+            SvxBorderLine::THINTHICK_MEDIUMGAP with a 1.5 pt width and
+            SvxBorderLine::THINTHICK_LARGEGAP with a 0.75 pt width. The same case happens
+            also for thick-thin styles.
+
+            \param nStyle the border style used to guess the width.
+            \param nIn the width of the inner line in 1th pt
+            \param nOut the width of the outer line in 1th pt
+            \param nDist the width of the gap between the lines in 1th pt
+         */
+        void            GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn = 0, sal_uInt16 nDist = 0 );
+
+        // TODO Hacky method to mirror lines in only a few cases
+        void            SetMirrorWidths( bool bMirror = true ) { m_bMirrorWidths = bMirror; }
+        long            GetWidth( ) const { return m_nWidth; }
+        sal_uInt16 	    GetOutWidth() const;
+        sal_uInt16 		GetInWidth() const;
+        sal_uInt16 		GetDistance() const;
+
+        SvxBorderStyle  GetStyle() const { return m_nStyle; }
+
+        void 			SetColor( const Color &rColor ) { aColor = rColor; }
+        void            SetColorOutFn( Color (*pColorOutFn)( Color ) ) { m_pColorOutFn = pColorOutFn; }
+        void            SetColorInFn( Color (*pColorInFn)( Color ) ) { m_pColorInFn = pColorInFn; }
+        void            SetColorGapFn( Color (*pColorGapFn)( Color ) ) { m_pColorGapFn = pColorGapFn; }
+        void            SetUseLeftTop( bool bUseLeftTop ) { m_bUseLeftTop = bUseLeftTop; }
+        void            SetStyle( SvxBorderStyle nNew );
+        void			ScaleMetrics( long nMult, long nDiv );
+
+        sal_Bool			operator==( const SvxBorderLine &rCmp ) const;
+
+        String          GetValueString( SfxMapUnit eSrcUnit, SfxMapUnit eDestUnit,
+                                        const IntlWrapper* pIntl,
+                                        sal_Bool bMetricStr = sal_False ) const;
+
+        bool			HasPriority( const SvxBorderLine& rOtherLine ) const;
+
+        bool isEmpty() const { return m_aWidthImpl.IsEmpty( ) || m_nStyle == NO_STYLE || m_nWidth == 0; }
+        bool isDouble() const { return m_aWidthImpl.IsDouble(); }
+        sal_uInt16 GetScaledWidth() const { return GetOutWidth() + GetInWidth() + GetDistance(); }
+
+        static Color darkColor( Color aMain );
+        static Color lightColor( Color aMain );
+
+        static Color threeDLightColor( Color aMain );
+        static Color threeDMediumColor( Color aMain );
+        static Color threeDDarkColor( Color aMain );
+
+        static BorderWidthImpl getWidthImpl( SvxBorderStyle nStyle );
+    };
 
 // ============================================================================
 
+} // namespace editeng
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/inc/editeng/boxitem.hxx b/editeng/inc/editeng/boxitem.hxx
index 8f17d14..4fc8421 100755
--- a/editeng/inc/editeng/boxitem.hxx
+++ b/editeng/inc/editeng/boxitem.hxx
@@ -52,10 +52,10 @@ namespace rtl { class OUString; }
 
 class EDITENG_DLLPUBLIC SvxBoxItem : public SfxPoolItem
 {
-    SvxBorderLine  *pTop,
-                   *pBottom,
-                   *pLeft,
-                   *pRight;
+    editeng::SvxBorderLine  *pTop,
+                            *pBottom,
+                            *pLeft,
+                            *pRight;
     sal_uInt16			nTopDist,
                     nBottomDist,
                     nLeftDist,
@@ -87,15 +87,15 @@ public:
     virtual bool             ScaleMetrics( long nMult, long nDiv );
     virtual	bool             HasMetrics() const;
 
-    const	SvxBorderLine* GetTop()    const { return pTop; }
-    const	SvxBorderLine* GetBottom() const { return pBottom; }
-    const	SvxBorderLine* GetLeft()   const { return pLeft; }
-    const	SvxBorderLine* GetRight()  const { return pRight; }
+    const	editeng::SvxBorderLine* GetTop()    const { return pTop; }
+    const	editeng::SvxBorderLine* GetBottom() const { return pBottom; }
+    const	editeng::SvxBorderLine* GetLeft()   const { return pLeft; }
+    const	editeng::SvxBorderLine* GetRight()  const { return pRight; }
 
-    const	SvxBorderLine* GetLine( sal_uInt16 nLine ) const;
+    const	editeng::SvxBorderLine* GetLine( sal_uInt16 nLine ) const;
 
         //The Pointers are being copied!
-    void	SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine );
+    void	SetLine( const editeng::SvxBorderLine* pNew, sal_uInt16 nLine );
 
     sal_uInt16	GetDistance( sal_uInt16 nLine ) const;
     sal_uInt16	GetDistance() const;
@@ -106,9 +106,9 @@ public:
         // Line width plus Space plus inward distance
         //bIgnoreLine = TRUE -> Also return distance, when no Line is set
     sal_uInt16 	CalcLineSpace( sal_uInt16 nLine, sal_Bool bIgnoreLine = sal_False ) const;
-    static com::sun::star::table::BorderLine2 SvxLineToLine( const SvxBorderLine* pLine, sal_Bool bConvert );
-    static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert);
-    static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert);
+    static com::sun::star::table::BorderLine2 SvxLineToLine( const editeng::SvxBorderLine* pLine, sal_Bool bConvert );
+    static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine& rLine, editeng::SvxBorderLine& rSvxLine, sal_Bool bConvert);
+    static sal_Bool LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, editeng::SvxBorderLine& rSvxLine, sal_Bool bConvert);
 };
 
 inline void SvxBoxItem::SetDistance( sal_uInt16 nNew )
@@ -140,8 +140,8 @@ inline void SvxBoxItem::SetDistance( sal_uInt16 nNew )
 
 class EDITENG_DLLPUBLIC SvxBoxInfoItem : public SfxPoolItem
 {
-    SvxBorderLine* pHori;   //inner horizontal Line
-    SvxBorderLine* pVert;   //inner vertical Line
+    editeng::SvxBorderLine* pHori;   //inner horizontal Line
+    editeng::SvxBorderLine* pVert;   //inner vertical Line
 
     bool                mbEnableHor;   /// true = Enable inner horizontal line.
     bool                mbEnableVer;   /// true = Enable inner vertical line.
@@ -194,11 +194,11 @@ public:
     virtual bool			 ScaleMetrics( long nMult, long nDiv );
     virtual	bool			 HasMetrics() const;
 
-    const SvxBorderLine*	GetHori() const { return pHori; }
-    const SvxBorderLine*	GetVert() const { return pVert; }
+    const editeng::SvxBorderLine*	GetHori() const { return pHori; }
+    const editeng::SvxBorderLine*	GetVert() const { return pVert; }
 
         //The Pointers are being copied!
-    void					SetLine( const SvxBorderLine* pNew, sal_uInt16 nLine );
+    void					SetLine( const editeng::SvxBorderLine* pNew, sal_uInt16 nLine );
 
     sal_Bool    IsTable() const             { return mbEnableHor && mbEnableVer; }
     void    SetTable( sal_Bool bNew )       { mbEnableHor = mbEnableVer = bNew; }
diff --git a/editeng/qa/items/borderline_test.cxx b/editeng/qa/items/borderline_test.cxx
index 995ccef..5d67b62 100644
--- a/editeng/qa/items/borderline_test.cxx
+++ b/editeng/qa/items/borderline_test.cxx
@@ -44,6 +44,8 @@
 #define THINTHICKLG_OUT_WIDTH long( 30 )
 #define THINTHICKLG_DIST_WIDTH long( 40 )
 
+using namespace editeng;
+
 namespace {
 
 class BorderLineTest : public CppUnit::TestFixture
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
index da0ece1..de24284 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -39,6 +39,31 @@
 
 // class SvxBorderLine  --------------------------------------------------
 
+namespace {
+
+    Color lcl_compute3DColor( Color aMain, int nLight, int nMedium, int nDark )
+    {
+        basegfx::BColor color = aMain.getBColor( );
+        basegfx::BColor hsl = basegfx::tools::rgb2hsl( color );
+
+        int nCoef = 0;
+        if ( hsl.getZ( ) >= 0.5 )
+            nCoef = nLight;
+        else if ( 0.5 > hsl.getZ() && hsl.getZ() >= 0.25 )
+            nCoef = nMedium;
+        else
+            nCoef = nDark;
+
+        double L = hsl.getZ() * 255.0 + nCoef;
+        hsl.setZ( L / 255.0 );
+        color = basegfx::tools::hsl2rgb( hsl );
+
+        return Color( color );
+    }
+} // Anonymous namespace
+
+namespace editeng {
+
 Color SvxBorderLine::darkColor( Color aMain )
 {
     return aMain;
@@ -56,25 +81,6 @@ Color SvxBorderLine::lightColor( Color aMain )
     return Color( color );
 }
 
-Color lcl_compute3DColor( Color aMain, int nLight, int nMedium, int nDark )
-{
-    basegfx::BColor color = aMain.getBColor( );
-    basegfx::BColor hsl = basegfx::tools::rgb2hsl( color );
-
-    int nCoef = 0;
-    if ( hsl.getZ( ) >= 0.5 )
-        nCoef = nLight;
-    else if ( 0.5 > hsl.getZ() && hsl.getZ() >= 0.25 )
-        nCoef = nMedium;
-    else
-        nCoef = nDark;
-
-    double L = hsl.getZ() * 255.0 + nCoef;
-    hsl.setZ( L / 255.0 );
-    color = basegfx::tools::hsl2rgb( hsl );
-
-    return Color( color );
-}
 
 Color SvxBorderLine::threeDLightColor( Color aMain )
 {
@@ -484,4 +490,6 @@ bool SvxBorderLine::HasPriority( const SvxBorderLine& rOtherLine ) const
     }
 }
 
+} // namespace editeng
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index b21f881..bda2be7 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -94,6 +94,7 @@
 #include <editeng/memberids.hrc>
 #include <editeng/editerr.hxx>
 
+using namespace ::editeng;
 using namespace ::rtl;
 using namespace ::com::sun::star;
 
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 5fcfd09..f482e56 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -95,6 +95,7 @@
 #define BRACELEFT	'{'
 #define BRACERIGHT	'}'
 
+using namespace editeng;
 
 // Some helper functions
 // char
diff --git a/svx/inc/svx/framelink.hxx b/svx/inc/svx/framelink.hxx
index a2cd8e5..b7e08fa 100755
--- a/svx/inc/svx/framelink.hxx
+++ b/svx/inc/svx/framelink.hxx
@@ -116,21 +116,21 @@ class SVX_DLLPUBLIC Style
 {
 public:
     /** Constructs an invisible frame style. */
-    inline explicit     Style() : meRefMode( REFMODE_CENTERED ), mnPrim( 0 ), mnDist( 0 ), mnSecn( 0 ), mnType( SOLID ) {}
+    inline explicit     Style() : meRefMode( REFMODE_CENTERED ), mnPrim( 0 ), mnDist( 0 ), mnSecn( 0 ), mnType( editeng::SOLID ) {}
     /** Constructs a frame style with passed line widths. */
-    inline explicit     Style( sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 nS, SvxBorderStyle nType ) :
+    inline explicit     Style( sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 nS, editeng::SvxBorderStyle nType ) :
                             meRefMode( REFMODE_CENTERED ), mnType( nType )
                             { Set( nP, nD, nS ); }
     /** Constructs a frame style with passed color and line widths. */
     inline explicit     Style( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor,
-                            sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 nS, SvxBorderStyle nType ) :
+                            sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 nS, editeng::SvxBorderStyle nType ) :
                             meRefMode( REFMODE_CENTERED ), mnType( nType )
                             { Set( rColorPrim, rColorSecn, rColorGap, bUseGapColor, nP, nD, nS ); }
     /** Constructs a frame style from the passed SvxBorderLine struct. */
-    inline explicit     Style( const SvxBorderLine& rBorder, double fScale = 1.0, sal_uInt16 nMaxWidth = SAL_MAX_UINT16 ) :
+    inline explicit     Style( const editeng::SvxBorderLine& rBorder, double fScale = 1.0, sal_uInt16 nMaxWidth = SAL_MAX_UINT16 ) :
                             meRefMode( REFMODE_CENTERED ) { Set( rBorder, fScale, nMaxWidth ); }
     /** Constructs a frame style from the passed SvxBorderLine struct. Clears the style, if pBorder is 0. */
-    inline explicit     Style( const SvxBorderLine* pBorder, double fScale = 1.0, sal_uInt16 nMaxWidth = SAL_MAX_UINT16 ) :
+    inline explicit     Style( const editeng::SvxBorderLine* pBorder, double fScale = 1.0, sal_uInt16 nMaxWidth = SAL_MAX_UINT16 ) :
                             meRefMode( REFMODE_CENTERED ) { Set( pBorder, fScale, nMaxWidth ); }
 
     inline RefMode      GetRefMode() const { return meRefMode; }
@@ -141,7 +141,7 @@ public:
     inline sal_uInt16   Prim() const { return mnPrim; }
     inline sal_uInt16   Dist() const { return mnDist; }
     inline sal_uInt16   Secn() const { return mnSecn; }
-    inline SvxBorderStyle Type() const { return mnType; }
+    inline editeng::SvxBorderStyle Type() const { return mnType; }
 
     /** Returns the total width of this frame style. */
     inline sal_uInt16   GetWidth() const { return mnPrim + mnDist + mnSecn; }
@@ -154,9 +154,9 @@ public:
     void                Set( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor,
                             sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 nS );
     /** Sets the frame style to the passed SvxBorderLine struct. */
-    void                Set( const SvxBorderLine& rBorder, double fScale = 1.0, sal_uInt16 nMaxWidth = SAL_MAX_UINT16 );
+    void                Set( const editeng::SvxBorderLine& rBorder, double fScale = 1.0, sal_uInt16 nMaxWidth = SAL_MAX_UINT16 );
     /** Sets the frame style to the passed SvxBorderLine struct. Clears the style, if pBorder is 0. */
-    void                Set( const SvxBorderLine* pBorder, double fScale = 1.0, sal_uInt16 nMaxWidth = SAL_MAX_UINT16 );
+    void                Set( const editeng::SvxBorderLine* pBorder, double fScale = 1.0, sal_uInt16 nMaxWidth = SAL_MAX_UINT16 );
 
     /** Sets a new reference point handling mode, does not modify other settings. */
     inline void         SetRefMode( RefMode eRefMode ) { meRefMode = eRefMode; }
@@ -165,7 +165,7 @@ public:
     inline void         SetColorSecn( const Color& rColor ) { maColorSecn = rColor; }
     inline void         SetColorGap( bool bUseIt, const Color& rColor ) { maColorGap = rColor; mbUseGapColor = bUseIt; }
     /** Sets whether to use dotted style for single hair lines. */
-    inline void         SetType( SvxBorderStyle nType ) { mnType = nType; }
+    inline void         SetType( editeng::SvxBorderStyle nType ) { mnType = nType; }
 
     /** Scales the style by the specified scaling factor. Ensures that visible lines keep visible. */
     Style&              ScaleSelf( double fScale, sal_uInt16 nMaxWidth = SAL_MAX_UINT16 );
@@ -186,7 +186,7 @@ private:
     sal_uInt16          mnPrim;     /// Width of primary (single, left, or top) line.
     sal_uInt16          mnDist;     /// Distance between primary and secondary line.
     sal_uInt16          mnSecn;     /// Width of secondary (right or bottom) line.
-    SvxBorderStyle      mnType;
+    editeng::SvxBorderStyle      mnType;
 };
 
 bool operator==( const Style& rL, const Style& rR );
diff --git a/svx/inc/svx/frmsel.hxx b/svx/inc/svx/frmsel.hxx
index 81d2946..9a5ab67 100755
--- a/svx/inc/svx/frmsel.hxx
+++ b/svx/inc/svx/frmsel.hxx
@@ -37,7 +37,9 @@
 #include <svx/framebordertype.hxx>
 #include "svx/svxdllapi.h"
 
-class SvxBorderLine;
+namespace editeng {
+    class SvxBorderLine;
+}
 
 namespace svx {
 
@@ -115,10 +117,10 @@ public:
     /** Returns the state (visible/hidden/don't care) of the specified frame border. */
     FrameBorderState    GetFrameBorderState( FrameBorderType eBorder ) const;
     /** Returns the style of the specified frame border, if it is visible. */
-    const SvxBorderLine* GetFrameBorderStyle( FrameBorderType eBorder ) const;
+    const editeng::SvxBorderLine* GetFrameBorderStyle( FrameBorderType eBorder ) const;
 
     /** Shows the specified frame border using the passed style, or hides it, if pStyle is 0. */
-    void                ShowBorder( FrameBorderType eBorder, const SvxBorderLine* pStyle );
+    void                ShowBorder( FrameBorderType eBorder, const editeng::SvxBorderLine* pStyle );
     /** Sets the specified frame border to "don't care" state. */
     void                SetBorderDontCare( FrameBorderType eBorder );
 
@@ -130,7 +132,7 @@ public:
     /** Returns true, if all visible frame borders have equal widths.
         @descr  Ignores hidden and "don't care" frame borders. On success,
         returns the width in the passed parameter. */
-    bool                GetVisibleWidth( long& rnWidth, SvxBorderStyle& rnStyle ) const;
+    bool                GetVisibleWidth( long& rnWidth, editeng::SvxBorderStyle& rnStyle ) const;
     /** Returns true, if all visible frame borders have equal color.
         @descr  Ignores hidden and "don't care" frame borders. On success,
         returns the color in the passed parameter. */
@@ -161,7 +163,7 @@ public:
     void                SelectAllVisibleBorders( bool bSelect = true );
 
     /** Sets the passed line widths to all selected frame borders (in twips). */
-    void                SetStyleToSelection( long nWidth, SvxBorderStyle nStyle );
+    void                SetStyleToSelection( long nWidth, editeng::SvxBorderStyle nStyle );
     /** Sets the passed color to all selected frame borders. */
     void                SetColorToSelection( const Color& rColor );
 
diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx
index 9dfa353..5d2a900 100755
--- a/svx/source/dialog/framelink.cxx
+++ b/svx/source/dialog/framelink.cxx
@@ -58,6 +58,8 @@
 #include <drawinglayer/primitive2d/borderlineprimitive2d.hxx>
 #include <drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx>
 
+using namespace editeng;
+
 namespace svx {
 namespace frame {
 
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index c0badf2..14d2cce 100755
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -41,6 +41,8 @@
 
 #include <tools/rcid.h>
 
+using namespace ::editeng;
+
 namespace svx {
 
 using ::com::sun::star::uno::Reference;
diff --git a/svx/source/inc/frmselimpl.hxx b/svx/source/inc/frmselimpl.hxx
index ab1c5d0..fd36b53 100755
--- a/svx/source/inc/frmselimpl.hxx
+++ b/svx/source/inc/frmselimpl.hxx
@@ -57,8 +57,8 @@ public:
     inline bool         IsSelected() const { return mbSelected; }
     inline void         Select( bool bSelect ) { mbSelected = bSelect; }
 
-    const SvxBorderLine& GetCoreStyle() const { return maCoreStyle; }
-    void                SetCoreStyle( const SvxBorderLine* pStyle );
+    const editeng::SvxBorderLine& GetCoreStyle() const { return maCoreStyle; }
+    void                SetCoreStyle( const editeng::SvxBorderLine* pStyle );
 
     inline void         SetUIColorPrim( const Color& rColor ) {maUIStyle.SetColorPrim( rColor ); }
     inline void         SetUIColorSecn( const Color& rColor ) {maUIStyle.SetColorSecn( rColor ); }
@@ -83,7 +83,7 @@ public:
 private:
     const FrameBorderType meType;       /// Frame border type (position in control).
     FrameBorderState    meState;        /// Frame border state (on/off/don't care).
-    SvxBorderLine       maCoreStyle;    /// Core style from application.
+    editeng::SvxBorderLine       maCoreStyle;    /// Core style from application.
     frame::Style        maUIStyle;      /// Internal style to draw lines.
     FrameBorderType     meKeyLeft;      /// Left neighbor for keyboard control.
     FrameBorderType     meKeyRight;     /// Right neighbor for keyboard control.
@@ -124,7 +124,7 @@ struct FrameSelectorImpl : public Resource
     FrameBorder         maVer;          /// All data of inner vertical frame border.
     FrameBorder         maTLBR;         /// All data of top-left to bottom-right frame border.
     FrameBorder         maBLTR;         /// All data of bottom-left to top-right frame border.
-    SvxBorderLine       maCurrStyle;    /// Current style and color for new borders.
+    editeng::SvxBorderLine       maCurrStyle;    /// Current style and color for new borders.
     frame::Array        maArray;        /// Frame link array to draw an array of frame borders.
 
     FrameSelFlags       mnFlags;        /// Flags for enabled frame borders.
@@ -216,7 +216,7 @@ struct FrameSelectorImpl : public Resource
     /** Sets the state of the specified frame border. */
     void                SetBorderState( FrameBorder& rBorder, FrameBorderState eState );
     /** Sets the core style of the specified frame border, or hides the frame border, if pStyle is 0. */
-    void                SetBorderCoreStyle( FrameBorder& rBorder, const SvxBorderLine* pStyle );
+    void                SetBorderCoreStyle( FrameBorder& rBorder, const editeng::SvxBorderLine* pStyle );
     /** Sets the color of the specified frame border. */
     void                SetBorderColor( FrameBorder& rBorder, const Color& rColor );
 
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 9eb36e7..61755b4 100755
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -65,6 +65,7 @@
 
 // -----------------------------------------------------------------------------
 
+using ::editeng::SvxBorderLine;
 using ::rtl::OUString;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 355072b..58835d4 100755
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -73,6 +73,7 @@
 #include "tableundo.hxx"
 #include "tablelayouter.hxx"
 
+using ::editeng::SvxBorderLine;
 using ::rtl::OUString;
 using namespace ::sdr::table;
 using namespace ::com::sun::star;
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 8334a46..519a77e 100755
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -48,6 +48,7 @@
 #include "svx/svdstr.hrc"
 #include "svx/svdglob.hxx"
 
+using ::editeng::SvxBorderLine;
 using ::rtl::OUString;
 using ::com::sun::star::awt::XLayoutConstrains;
 using namespace ::com::sun::star::uno;
diff --git a/svx/source/table/tablelayouter.hxx b/svx/source/table/tablelayouter.hxx
index 1bbe0c4..2405287 100755
--- a/svx/source/table/tablelayouter.hxx
+++ b/svx/source/table/tablelayouter.hxx
@@ -43,7 +43,9 @@
 
 // -----------------------------------------------------------------------------
 
-class SvxBorderLine;
+namespace editeng {
+    class SvxBorderLine;
+}
 
 namespace sdr { namespace table {
 
@@ -52,7 +54,7 @@ namespace sdr { namespace table {
 */
 bool findMergeOrigin( const TableModelRef& xTable, sal_Int32 nMergedCol, sal_Int32 nMergedRow, sal_Int32& rOriginCol, sal_Int32& rOriginRow );
 
-typedef std::vector< SvxBorderLine* > BorderLineVector;
+typedef std::vector< editeng::SvxBorderLine* > BorderLineVector;
 typedef std::vector< BorderLineVector > BorderLineMap;
 
 // -----------------------------------------------------------------------------
@@ -116,7 +118,7 @@ public:
     bool isEdgeVisible( sal_Int32 nEdgeX, sal_Int32 nEdgeY, bool bHorizontal ) const;
 
     /** returns the requested borderline in rpBorderLine or a null pointer if there is no border at this edge */
-    SvxBorderLine* getBorderLine( sal_Int32 nEdgeX, sal_Int32 nEdgeY, bool bHorizontal )const;
+    editeng::SvxBorderLine* getBorderLine( sal_Int32 nEdgeX, sal_Int32 nEdgeY, bool bHorizontal )const;
 
     void updateCells( ::Rectangle& rRectangle );
 
@@ -144,9 +146,9 @@ private:
     void ResizeBorderLayout();
     void ResizeBorderLayout( BorderLineMap& rMap );
 
-    void SetBorder( sal_Int32 nCol, sal_Int32 nRow, bool bHorizontal, const SvxBorderLine* pLine );
+    void SetBorder( sal_Int32 nCol, sal_Int32 nRow, bool bHorizontal, const editeng::SvxBorderLine* pLine );
 
-    static bool HasPriority( const SvxBorderLine* pThis, const SvxBorderLine* pOther );
+    static bool HasPriority( const editeng::SvxBorderLine* pThis, const editeng::SvxBorderLine* pOther );
 
     struct Layout
     {
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index e0baafa..ac99184 100755
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -55,6 +55,7 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
+using editeng::SvxBorderLine;
 using namespace com::sun::star;
 
 //////////////////////////////////////////////////////////////////////////////
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 180f3cb..488ef01 100755
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -115,6 +115,7 @@ sal_Bool lcl_FontChangedHint( const SfxHint &rHint );
 
 // namespaces
 using ::rtl::OUString;
+using namespace ::editeng;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::frame;


More information about the Libreoffice-commits mailing list