[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - cui/source drawinglayer/source editeng/source include/svtools include/xmloff offapi/com sc/source svtools/source sw/source xmloff/source

Kohei Yoshida kohei.yoshida at collabora.com
Wed Mar 5 07:30:47 PST 2014


 cui/source/inc/border.hxx                                 |    2 
 cui/source/tabpages/border.cxx                            |   73 +-
 drawinglayer/source/primitive2d/borderlineprimitive2d.cxx |  120 ++--
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx   |    4 
 editeng/source/items/borderline.cxx                       |    5 
 editeng/source/items/frmitems.cxx                         |    2 
 include/svtools/ctrlbox.hxx                               |    9 
 include/xmloff/xmltoken.hxx                               |    1 
 offapi/com/sun/star/table/BorderLineStyle.idl             |   10 
 sc/source/filter/excel/xistyle.cxx                        |    2 
 sc/source/filter/html/htmlexp.cxx                         |    1 
 sc/source/filter/lotus/lotattr.cxx                        |    2 
 sc/source/filter/oox/stylesbuffer.cxx                     |    4 
 svtools/source/control/ctrlbox.cxx                        |    9 
 sw/source/core/layout/paintfrm.cxx                        |  369 ++++++++------
 xmloff/source/core/xmltoken.cxx                           |    1 
 xmloff/source/style/bordrhdl.cxx                          |   46 -
 17 files changed, 407 insertions(+), 253 deletions(-)

New commits:
commit 743d331357af5204108186f0428e949f68d966c7
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Mon Mar 3 17:58:11 2014 -0500

    fdo#75260: Correctly draw double lines for both Writer and Calc.
    
    Fix all sorts of incorrect double line handling in drawinglayer in order to
    draw thick-thin double line types correctly.  Also change handling of border
    lines in writer tables. There are still some outstanding issues but it's
    much better than how it was before.
    
    Also realized that Word and Excel handle simple thin double lines differently;
    Word varies widths of all of the lines and the gap whereas Excel only has one
    fixed size for its double line.  For this reason I decided to add a separate
    double line type (DOUBLE_THIN) to handle Excel's double line.
    
    (cherry picked from commit 2c62596cf264ef10749d8bfdb2bb2ebef2d98fbc)
    
    Conflicts:
    	cui/source/tabpages/border.cxx
    	sc/qa/unit/subsequent_export-test.cxx
    	sc/source/ui/view/tabvwsha.cxx
    	sw/source/core/layout/paintfrm.cxx
    	xmloff/source/style/bordrhdl.cxx
    
    Change-Id: Iaaa353b6e4f998b524262bea59260b4333e0cdb4
    Reviewed-on: https://gerrit.libreoffice.org/8464
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 793d584..8f66e5d 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -130,6 +130,8 @@ private:
     void                ResetFrameLine_Impl( svx::FrameBorderType eBorder,
                                              const editeng::SvxBorderLine* pCurLine,
                                              bool bValid );
+
+    bool IsBorderLineStyleAllowed( sal_Int16 nStyle ) const;
 };
 
 
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 6713ee8..d2d12ac 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -42,6 +42,7 @@
 #include <sfx2/itemconnect.hxx>
 #include <sal/macros.h>
 #include "borderconn.hxx"
+#include <svtools/ctrlbox.hxx>
 
 using namespace ::editeng;
 
@@ -332,6 +333,11 @@ void SvxBorderTabPage::ResetFrameLine_Impl( svx::FrameBorderType eBorder, const
     }
 }
 
+bool SvxBorderTabPage::IsBorderLineStyleAllowed( sal_Int16 /*nStyle*/ ) const
+{
+    return true;
+}
+
 // -----------------------------------------------------------------------
 
 void SvxBorderTabPage::Reset( const SfxItemSet& rSet )
@@ -985,38 +991,49 @@ void SvxBorderTabPage::FillLineListBox_Impl()
 {
     using namespace ::com::sun::star::table::BorderLineStyle;
 
+    struct {
+        sal_Int16 mnStyle;
+        long mnMinWidth;
+        LineListBox::ColorFunc mpColor1Fn;
+        LineListBox::ColorFunc mpColor2Fn;
+        LineListBox::ColorDistFunc mpColorDistFn;
+    } aLines[] = {
+        // Simple lines
+        { SOLID,       0, &sameColor, &sameColor, &sameDistColor },
+        { DOTTED,      0, &sameColor, &sameColor, &sameDistColor },
+        { DASHED,      0, &sameColor, &sameColor, &sameDistColor },
+        { FINE_DASHED, 0, &sameColor, &sameColor, &sameDistColor },
+
+        // Double lines
+        { DOUBLE,              10, &sameColor, &sameColor, &sameDistColor },
+        { DOUBLE_THIN,         10, &sameColor, &sameColor, &sameDistColor },
+        { THINTHICK_SMALLGAP,  20, &sameColor, &sameColor, &sameDistColor },
+        { THINTHICK_MEDIUMGAP,  0, &sameColor, &sameColor, &sameDistColor },
+        { THINTHICK_LARGEGAP,   0, &sameColor, &sameColor, &sameDistColor },
+        { THICKTHIN_SMALLGAP,  20, &sameColor, &sameColor, &sameDistColor },
+        { THICKTHIN_MEDIUMGAP,  0, &sameColor, &sameColor, &sameDistColor },
+        { THICKTHIN_LARGEGAP,   0, &sameColor, &sameColor, &sameDistColor },
+
+        { EMBOSSED, 15, &SvxBorderLine::threeDLightColor, &SvxBorderLine::threeDDarkColor, &lcl_mediumColor },
+        { ENGRAVED, 15, &SvxBorderLine::threeDDarkColor, &SvxBorderLine::threeDLightColor, &lcl_mediumColor },
+
+        { OUTSET, 10, &SvxBorderLine::lightColor, &SvxBorderLine::darkColor, &sameDistColor },
+        { INSET,  10, &SvxBorderLine::darkColor, &SvxBorderLine::lightColor, &sameDistColor }
+    };
+
     m_pLbLineStyle->SetSourceUnit( FUNIT_TWIP );
 
     m_pLbLineStyle->SetNone( SVX_RESSTR( RID_SVXSTR_NONE ) );
 
-    // Simple lines
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( SOLID ), SOLID );
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( DOTTED ), DOTTED );
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( DASHED ), DASHED );
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( FINE_DASHED ), FINE_DASHED );
-
-    // Double lines
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( DOUBLE ), DOUBLE );
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_SMALLGAP ), THINTHICK_SMALLGAP, 20 );
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_MEDIUMGAP ), THINTHICK_MEDIUMGAP );
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_LARGEGAP ), THINTHICK_LARGEGAP );
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_SMALLGAP ), THICKTHIN_SMALLGAP, 20 );
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_MEDIUMGAP ), THICKTHIN_MEDIUMGAP );
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_LARGEGAP ), THICKTHIN_LARGEGAP );
-
-    // Engraved / Embossed
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( EMBOSSED ), EMBOSSED, 15,
-            &SvxBorderLine::threeDLightColor, &SvxBorderLine::threeDDarkColor,
-            &lcl_mediumColor );
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( ENGRAVED ), ENGRAVED, 15,
-            &SvxBorderLine::threeDDarkColor, &SvxBorderLine::threeDLightColor,
-            &lcl_mediumColor );
-
-    // Inset / Outset
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( OUTSET ), OUTSET, 10,
-           &SvxBorderLine::lightColor, &SvxBorderLine::darkColor );
-    m_pLbLineStyle->InsertEntry( SvxBorderLine::getWidthImpl( INSET ), INSET, 10,
-           &SvxBorderLine::darkColor, &SvxBorderLine::lightColor );
+    for (size_t i = 0, n = SAL_N_ELEMENTS(aLines); i < n; ++i)
+    {
+        if (!IsBorderLineStyleAllowed(aLines[i].mnStyle))
+            continue;
+
+        m_pLbLineStyle->InsertEntry(
+            SvxBorderLine::getWidthImpl(aLines[i].mnStyle), aLines[i].mnStyle,
+            aLines[i].mnMinWidth, aLines[i].mpColor1Fn, aLines[i].mpColor2Fn, aLines[i].mpColorDistFn);
+    }
 
     sal_Int64 nVal = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
                 m_pLineWidthMF->GetValue( ),
diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
index 290c87a..67efa09 100644
--- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
@@ -28,6 +28,8 @@
 #include <numeric>
 #include <algorithm>
 
+namespace drawinglayer {
+
 namespace {
 
 void moveLine(basegfx::B2DPolygon& rPoly, double fGap, const basegfx::B2DVector& rVector)
@@ -44,10 +46,46 @@ void moveLine(basegfx::B2DPolygon& rPoly, double fGap, const basegfx::B2DVector&
     }
 }
 
+primitive2d::Primitive2DReference makeHairLinePrimitive(
+    const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd, const basegfx::B2DVector& rVector,
+    const basegfx::BColor& rColor, double fGap)
+{
+    basegfx::B2DPolygon aPolygon;
+    aPolygon.append(rStart);
+    aPolygon.append(rEnd);
+    moveLine(aPolygon, fGap, rVector);
+
+    return primitive2d::Primitive2DReference(new primitive2d::PolygonHairlinePrimitive2D(aPolygon, rColor));
 }
 
-namespace drawinglayer
+primitive2d::Primitive2DReference makeSolidLinePrimitive(
+    const basegfx::B2DPolyPolygon& rClipRegion, const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd,
+    const basegfx::B2DVector& rVector, const basegfx::BColor& rColor, double fLineWidth, double fGap)
 {
+    const basegfx::B2DVector aPerpendicular = basegfx::getPerpendicular(rVector);
+    const basegfx::B2DVector aLineWidthOffset = ((fLineWidth + 1.0) * 0.5) * aPerpendicular;
+
+    basegfx::B2DPolygon aPolygon;
+    aPolygon.append(rStart + aLineWidthOffset);
+    aPolygon.append(rEnd + aLineWidthOffset);
+    aPolygon.append(rEnd - aLineWidthOffset);
+    aPolygon.append(rStart - aLineWidthOffset);
+    aPolygon.setClosed(true);
+
+    moveLine(aPolygon, fGap, rVector);
+
+    basegfx::B2DPolyPolygon aClipped =
+        basegfx::tools::clipPolygonOnPolyPolygon(aPolygon, rClipRegion, true, false);
+
+    if (aClipped.count())
+        aPolygon = aClipped.getB2DPolygon(0);
+
+    return primitive2d::Primitive2DReference(
+        new primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPolygon), rColor));
+}
+
+}
+
     // fdo#49438: heuristic pseudo hack
     static bool lcl_UseHairline(double const fW,
             basegfx::B2DPoint const& rStart, basegfx::B2DPoint const& rEnd,
@@ -139,66 +177,42 @@ namespace drawinglayer
 
                 if(isOutsideUsed() && isInsideUsed())
                 {
-                    basegfx::B2DPolygon aPolygon;
                     const double fExt = getWidth(rViewInformation);  // Extend a lot: it'll be clipped later.
                     const basegfx::B2DPoint aTmpStart(getStart() - (fExt * aVector));
                     const basegfx::B2DPoint aTmpEnd(getEnd() + (fExt * aVector));
 
-                    // Get which is the line to show
-                    double nWidth = getLeftWidth();
-                    basegfx::BColor aColor = getRGBColorLeft();
-
-                    bool const bIsHairline = lcl_UseHairline(
-                            nWidth, getStart(), getEnd(), rViewInformation);
-                    nWidth = lcl_GetCorrectedWidth(nWidth,
-                                getStart(), getEnd(), rViewInformation);
+                    xRetval.realloc(2);
 
-                    // distance is already scaled.
-                    double fGap = mfDistance*8.0;
-
-                    if (bIsHairline)
                     {
-                        // create hairline primitive
-                        aPolygon.append( getStart() );
-                        aPolygon.append( getEnd() );
-
-                        basegfx::B2DPolygon aPolygon2 = aPolygon;
-                        moveLine(aPolygon2, fGap, aVector);
-
-                        xRetval.realloc(2);
-                        xRetval[0] = Primitive2DReference(new PolygonHairlinePrimitive2D(
-                            aPolygon,
-                            aColor));
-
-                        xRetval[1] = Primitive2DReference(new PolygonHairlinePrimitive2D(
-                            aPolygon2,
-                            aColor));
+                        // "inside" line
+                        double fWidth = getLeftWidth();
+                        basegfx::BColor aColor = getRGBColorLeft();
+                        bool bIsHairline = lcl_UseHairline(
+                                fWidth, getStart(), getEnd(), rViewInformation);
+                        fWidth = lcl_GetCorrectedWidth(fWidth,
+                                    getStart(), getEnd(), rViewInformation);
+
+                        if (bIsHairline)
+                            xRetval[0] = makeHairLinePrimitive(getStart(), getEnd(), aVector, aColor, 0.0);
+                        else
+                            xRetval[0] = makeSolidLinePrimitive(
+                                aClipRegion, aTmpStart, aTmpEnd, aVector, aColor, fWidth, 0.0);
                     }
-                    else
-                    {
-                        // create filled polygon primitive
-                        const basegfx::B2DVector aLineWidthOffset(((nWidth + 1) * 0.5) * aPerpendicular);
 
-                        aPolygon.append( aTmpStart + aLineWidthOffset );
-                        aPolygon.append( aTmpEnd + aLineWidthOffset );
-                        aPolygon.append( aTmpEnd - aLineWidthOffset );
-                        aPolygon.append( aTmpStart - aLineWidthOffset );
-                        aPolygon.setClosed( true );
-
-                        basegfx::B2DPolyPolygon aClipped = basegfx::tools::clipPolygonOnPolyPolygon(
-                            aPolygon, aClipRegion, true, false );
-
-                        if ( aClipped.count() )
-                            aPolygon = aClipped.getB2DPolygon(0);
-
-                        basegfx::B2DPolygon aPolygon2 = aPolygon;
-                        moveLine(aPolygon2, fGap, aVector);
-
-                        xRetval.realloc(2);
-                        xRetval[0] = Primitive2DReference(
-                            new PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPolygon), aColor));
-                        xRetval[1] = Primitive2DReference(
-                            new PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aPolygon2), aColor));
+                    {
+                        // "outside" line
+                        double fWidth = getRightWidth();
+                        basegfx::BColor aColor = getRGBColorRight();
+                        bool bIsHairline = lcl_UseHairline(
+                                fWidth, getStart(), getEnd(), rViewInformation);
+                        fWidth = lcl_GetCorrectedWidth(fWidth,
+                                    getStart(), getEnd(), rViewInformation);
+
+                        if (bIsHairline)
+                            xRetval[1] = makeHairLinePrimitive(getStart(), getEnd(), aVector, aColor, mfDistance);
+                        else
+                            xRetval[1] = makeSolidLinePrimitive(
+                                aClipRegion, aTmpStart, aTmpEnd, aVector, aColor, fWidth, mfDistance);
                     }
                 }
                 else
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 9552be3..203ce5f 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -297,13 +297,13 @@ namespace drawinglayer
             switch (rSource.getStyle())
             {
                 case table::BorderLineStyle::SOLID:
-                case table::BorderLineStyle::DOUBLE:
+                case table::BorderLineStyle::DOUBLE_THIN:
                 {
                     const basegfx::BColor aLineColor =
                         maBColorModifierStack.getModifiedColor(rSource.getRGBColorLeft());
                     double nThick = rtl::math::round(rSource.getLeftWidth());
 
-                    bool bDouble = rSource.getStyle() == table::BorderLineStyle::DOUBLE;
+                    bool bDouble = rSource.getStyle() == table::BorderLineStyle::DOUBLE_THIN;
 
                     basegfx::B2DPolygon aTarget;
 
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
index e80685e..b393420 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -316,6 +316,10 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
                     1.0/3.0, 1.0/3.0, 1.0/3.0 );
             break;
 
+        case DOUBLE_THIN:
+            aImpl = BorderWidthImpl(CHANGE_DIST, 10.0, 10.0, 1.0);
+            break;
+
         case THINTHICK_SMALLGAP:
             aImpl = BorderWidthImpl( CHANGE_LINE1, 1.0,
                     THINTHICK_SMALLGAP_line2, THINTHICK_SMALLGAP_gap );
@@ -429,6 +433,7 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa
         static const SvxBorderStyle aDoubleStyles[] =
         {
             DOUBLE,
+            DOUBLE_THIN,
             THINTHICK_SMALLGAP,
             THINTHICK_MEDIUMGAP,
             THINTHICK_LARGEGAP,
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 020488c..dff98c6 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1802,7 +1802,7 @@ SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, Svx
         rSvxLine.SetWidth( bConvert? MM100_TO_TWIP_UNSIGNED( rLine.LineWidth ) : rLine.LineWidth );
         // fdo#46112: double does not necessarily mean symmetric
         // for backwards compatibility
-        bGuessWidth = (DOUBLE == nStyle) &&
+        bGuessWidth = ((DOUBLE == nStyle || DOUBLE_THIN == nStyle)) &&
             (rLine.InnerLineWidth > 0) && (rLine.OuterLineWidth > 0);
     }
 
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 19eea12..6599091 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -317,6 +317,9 @@ class SVT_DLLPUBLIC LineListBox : public ListBox
     sal_uInt16           GetStylePos( sal_uInt16 nListPos, long nWidth );
 
 public:
+    typedef Color (*ColorFunc)(Color);
+    typedef Color (*ColorDistFunc)(Color, Color);
+
                     LineListBox( Window* pParent, WinBits nWinStyle = WB_BORDER );
     virtual         ~LineListBox();
 
@@ -330,9 +333,9 @@ public:
     /** Insert a listbox entry with all widths in Twips. */
     void            InsertEntry( BorderWidthImpl aWidthImpl,
                         sal_uInt16 nStyle, long nMinWidth = 0,
-                        Color (*pColor1Fn)(Color) = &sameColor,
-                        Color (*pColor2Fn)( Color ) = &sameColor,
-                        Color (*pColorDistFn)( Color, Color ) = &sameDistColor );
+                        ColorFunc pColor1Fn = &sameColor,
+                        ColorFunc pColor2Fn = &sameColor,
+                        ColorDistFunc pColorDistFn = &sameDistColor );
 
     using ListBox::RemoveEntry;
     virtual void    RemoveEntry( sal_uInt16 nPos );
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index d288c8848..09bc908 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -647,6 +647,7 @@ namespace xmloff { namespace token {
         XML_DOTTED,
         XML_DOUBLE,
         XML_DOUBLE_SIDED,
+        XML_DOUBLE_THIN,
         XML_DOWN,
         XML_DRAFT,
         XML_DRAW,
diff --git a/offapi/com/sun/star/table/BorderLineStyle.idl b/offapi/com/sun/star/table/BorderLineStyle.idl
index 7613272..0c37c67 100644
--- a/offapi/com/sun/star/table/BorderLineStyle.idl
+++ b/offapi/com/sun/star/table/BorderLineStyle.idl
@@ -41,7 +41,8 @@ constants BorderLineStyle
      */
     const short DASHED = 2;
 
-    /** Double border line.
+    /** Double border line. Widths of the lines and the gap are all equal,
+        and vary equally with the total width.
      */
     const short DOUBLE = 3;
 
@@ -95,9 +96,14 @@ constants BorderLineStyle
      */
     const short FINE_DASHED = 14;
 
+    /** Double border line consisting of two fixed thin lines separated by a
+        variable gap.
+     */
+    const short DOUBLE_THIN = 15;
+
     /** Maximum valid border line style value.
      */
-    const short BORDER_LINE_STYLE_MAX = 14;
+    const short BORDER_LINE_STYLE_MAX = 15;
 };
 
 
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index c569ce8..203eda6 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -903,7 +903,7 @@ bool lclConvertBorderLine( ::editeng::SvxBorderLine& rLine, const XclImpPalette&
         {   EXC_BORDER_THIN,    table::BorderLineStyle::FINE_DASHED }, // 3 = dashed
         {   EXC_BORDER_THIN,    table::BorderLineStyle::DOTTED }, // 4 = dotted
         {   EXC_BORDER_THICK,   table::BorderLineStyle::SOLID },  // 5 = thick
-        {   EXC_BORDER_THIN,    table::BorderLineStyle::DOUBLE }, // 6 = double
+        {   EXC_BORDER_THICK,   table::BorderLineStyle::DOUBLE_THIN }, // 6 = double
         {   EXC_BORDER_HAIR,    table::BorderLineStyle::SOLID },  // 7 = hair
         {   EXC_BORDER_MEDIUM,  table::BorderLineStyle::DASHED }, // 8 = med dash
         {   EXC_BORDER_THIN,    table::BorderLineStyle::SOLID },  // 9 = thin dashdot
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index a6450cd..83b91e3 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -515,6 +515,7 @@ OString ScHTMLExport::BorderToStyle(const char* pBorderName,
                 aOut.append("dashed");
                 break;
             case table::BorderLineStyle::DOUBLE:
+            case table::BorderLineStyle::DOUBLE_THIN:
             case table::BorderLineStyle::THINTHICK_SMALLGAP:
             case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
             case table::BorderLineStyle::THINTHICK_LARGEGAP:
diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx
index bc17dff..cdc804a 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -169,7 +169,7 @@ void LotAttrCache::LotusToScBorderLine( sal_uInt8 nLine, ::editeng::SvxBorderLin
         case 2: aBL.SetWidth( DEF_LINE_WIDTH_2 ); break;
         case 3:
         {
-            aBL.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
+            aBL.SetBorderLineStyle(table::BorderLineStyle::DOUBLE_THIN);
             aBL.SetWidth( DEF_LINE_WIDTH_1 );
         }
         break;
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index d14b353..3990c0b 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1736,8 +1736,8 @@ bool Border::convertBorderLine( BorderLine2& rBorderLine, const BorderLineModel&
             rBorderLine.LineStyle = table::BorderLineStyle::DOTTED;
         break;
         case XML_double:
-            lclSetBorderLineWidth( rBorderLine, 5 ,5, 5 );
-            rBorderLine.LineStyle = table::BorderLineStyle::DOUBLE;
+            lclSetBorderLineWidth( rBorderLine, 10, 30, 10 );
+            rBorderLine.LineStyle = table::BorderLineStyle::DOUBLE_THIN;
         break;
         case XML_hair:              lclSetBorderLineWidth( rBorderLine, API_LINE_HAIR );    break;
         case XML_medium:            lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM );  break;
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 06a4a9c..fe48970 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -835,14 +835,11 @@ sal_uInt16 LineListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
 // -----------------------------------------------------------------------
 
 void LineListBox::InsertEntry(
-        BorderWidthImpl aWidthImpl,
-        sal_uInt16 nStyle, long nMinWidth,
-        Color ( *pColor1Fn )( Color ), Color ( *pColor2Fn )( Color ),
-        Color ( *pColorDistFn )( Color, Color ) )
+    BorderWidthImpl aWidthImpl, sal_uInt16 nStyle, long nMinWidth,
+    ColorFunc pColor1Fn, ColorFunc pColor2Fn, ColorDistFunc pColorDistFn )
 {
     ImpLineListData* pData = new ImpLineListData(
-            aWidthImpl, nStyle, nMinWidth,
-           pColor1Fn, pColor2Fn, pColorDistFn );
+        aWidthImpl, nStyle, nMinWidth, pColor1Fn, pColor2Fn, pColorDistFn);
     pLineList->push_back( pData );
 }
 
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 54de397..f10d7b4 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2275,6 +2275,11 @@ struct SwLineEntry
     SwTwips mnKey;
     SwTwips mnStartPos;
     SwTwips mnEndPos;
+    SwTwips mnOffset;
+
+    bool mbOffsetPerp;
+    bool mbOffsetStart;
+    bool mbOffsetEnd;
 
     svx::frame::Style maAttribute;
 
@@ -2296,6 +2301,10 @@ SwLineEntry::SwLineEntry( SwTwips nKey,
     :   mnKey( nKey ),
         mnStartPos( nStartPos ),
         mnEndPos( nEndPos ),
+        mnOffset( 0 ),
+        mbOffsetPerp(false),
+        mbOffsetStart(false),
+        mbOffsetEnd(false),
         maAttribute( rAttribute )
 {
 }
@@ -2378,6 +2387,8 @@ class SwTabFrmPainter
                             svx::frame::Style*,
                             bool bHori ) const;
 
+    void AdjustTopLeftFrames();
+
 public:
     SwTabFrmPainter( const SwTabFrm& rTabFrm );
 
@@ -2388,6 +2399,7 @@ SwTabFrmPainter::SwTabFrmPainter( const SwTabFrm& rTabFrm )
     : mrTabFrm( rTabFrm )
 {
     HandleFrame( rTabFrm );
+    AdjustTopLeftFrames();
 }
 
 void SwTabFrmPainter::HandleFrame( const SwLayoutFrm& rLayoutFrm )
@@ -2420,7 +2432,7 @@ void SwTabFrmPainter::HandleFrame( const SwLayoutFrm& rLayoutFrm )
     }
 }
 
-void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) const
+void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
 {
     // #i16816# tagged pdf support
     SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, rDev );
@@ -2452,7 +2464,7 @@ void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) cons
     aSize.Width() += nPixelSzW; aSize.Height() += nPixelSzH;
     rDev.SetClipRegion(Region(Rectangle(rRect.Pos(), aSize)));
 
-    // The following stuff if necessary to have the new table borders fit
+    // The following stuff is necessary to have the new table borders fit
     // into a ::SwAlignRect adjusted world.
     const SwTwips nTwipXCorr =  bVert ? 0 : std::max( 0L, nHalfPixelSzW - 2 );    // 1 < 2 < 3 ;-)
     const SwTwips nTwipYCorr = !bVert ? 0 : std::max( 0L, nHalfPixelSzW - 2 );    // 1 < 2 < 3 ;-)
@@ -2496,6 +2508,45 @@ void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) cons
                 aEnd.Y() = rEntry.mnEndPos;
             }
 
+            svx::frame::Style aStyles[ 7 ];
+            aStyles[ 0 ] = rEntryStyle;
+            FindStylesForLine( aStart, aEnd, aStyles, bHori );
+
+            // Account for double line thicknesses for the top- and left-most borders.
+            if (rEntry.mnOffset)
+            {
+                if (bHori)
+                {
+                    if (rEntry.mbOffsetPerp)
+                    {
+                        // Apply offset in perpendicular direction.
+                        aStart.Y() -= rEntry.mnOffset;
+                        aEnd.Y() -= rEntry.mnOffset;
+                    }
+                    if (rEntry.mbOffsetStart)
+                        // Apply offset at the start of a border.
+                        aStart.X() -= rEntry.mnOffset;
+                    if (rEntry.mbOffsetEnd)
+                        // Apply offset at the end of a border.
+                        aEnd.X() += rEntry.mnOffset;
+                }
+                else
+                {
+                    if (rEntry.mbOffsetPerp)
+                    {
+                        // Apply offset in perpendicular direction.
+                        aStart.X() -= rEntry.mnOffset;
+                        aEnd.X() -= rEntry.mnOffset;
+                    }
+                    if (rEntry.mbOffsetStart)
+                        // Apply offset at the start of a border.
+                        aStart.Y() -= rEntry.mnOffset;
+                    if (rEntry.mbOffsetEnd)
+                        // Apply offset at the end of a border.
+                        aEnd.Y() += rEntry.mnOffset;
+                }
+            }
+
             SwRect aRepaintRect( aStart, aEnd );
 
             // the repaint rectangle has to be moved a bit for the centered lines:
@@ -2511,142 +2562,138 @@ void SwTabFrmPainter::PaintLines( OutputDevice& rDev, const SwRect& rRect ) cons
                 aRepaintRect.Pos().X() -= nRepaintRectSize;
             }
 
-            if ( rRect.IsOver( aRepaintRect ) )
+            if (!rRect.IsOver(aRepaintRect))
             {
-                svx::frame::Style aStyles[ 7 ];
-                aStyles[ 0 ] = rEntryStyle;
-                FindStylesForLine( aStart, aEnd, aStyles, bHori );
+                continue;
+            }
 
-                // subsidiary lines
-                const Color* pTmpColor = 0;
-                if ( 0 == aStyles[ 0 ].GetWidth() )
-                {
-                    if ( IS_SUBS_TABLE && pGlobalShell->GetWin() )
-                        aStyles[ 0 ].Set( rCol, rCol, rCol, false, 1, 0, 0 );
-                }
-                else
-                    pTmpColor = pHCColor;
+            // subsidiary lines
+            const Color* pTmpColor = 0;
+            if (0 == aStyles[ 0 ].GetWidth())
+            {
+                if (IS_SUBS_TABLE && pGlobalShell->GetWin())
+                    aStyles[ 0 ].Set( rCol, rCol, rCol, false, 1, 0, 0 );
+            }
+            else
+                pTmpColor = pHCColor;
 
-                // The line sizes stored in the line style have to be adjusted as well.
-                // This will guarantee that lines with the same twip size will have the
-                // same pixel size.
-                for ( int i = 0; i < 7; ++i )
-                {
-                    sal_uInt16 nPrim = aStyles[ i ].Prim();
-                    sal_uInt16 nDist = aStyles[ i ].Dist();
-                    sal_uInt16 nSecn = aStyles[ i ].Secn();
-
-                    if ( nPrim > 0 )
-                        nPrim = (sal_uInt16)( std::max( 1L, nPixelSzH * ( nPrim / nPixelSzH ) ) );
-                    if ( nDist > 0 )
-                        nDist = (sal_uInt16)( std::max( 1L, nPixelSzH * ( nDist / nPixelSzH ) ) );
-                    if ( nSecn > 0 )
-                        nSecn = (sal_uInt16)( std::max( 1L, nPixelSzH * ( nSecn / nPixelSzH ) ) );
-
-                    aStyles[ i ].Set( nPrim, nDist, nSecn );
-                }
+            // The line sizes stored in the line style have to be adjusted as
+            // well.  This will guarantee that lines with the same twip size
+            // will have the same pixel size.
+            for ( int i = 0; i < 7; ++i )
+            {
+                sal_uInt16 nPrim = aStyles[ i ].Prim();
+                sal_uInt16 nDist = aStyles[ i ].Dist();
+                sal_uInt16 nSecn = aStyles[ i ].Secn();
+
+                if (nPrim > 0)
+                    nPrim = (sal_uInt16)( std::max( 1L, nPixelSzH * ( nPrim / nPixelSzH ) ) );
+                if (nDist > 0)
+                    nDist = (sal_uInt16)( std::max( 1L, nPixelSzH * ( nDist / nPixelSzH ) ) );
+                if (nSecn > 0)
+                    nSecn = (sal_uInt16)( std::max( 1L, nPixelSzH * ( nSecn / nPixelSzH ) ) );
+
+                aStyles[ i ].Set( nPrim, nDist, nSecn );
+            }
 
-                // The (twip) positions will be adjusted to meet these requirements:
-                // 1. The y coordinates are located in the middle of the pixel grid
-                // 2. The x coordinated are located at the beginning of the pixel grid
-                // This is done, because the horizontal lines are painted "at beginning",
-                // whereas the vertical lines are painted "centered". By making the line
-                // sizes a multiple of one pixel size, we can assure, that all lines having
-                // the same twip size have the same pixel size, independent of their position
-                // on the screen.
-                Point aPaintStart = rDev.PixelToLogic( rDev.LogicToPixel( aStart ) );
-                Point aPaintEnd = rDev.PixelToLogic( rDev.LogicToPixel( aEnd ) );
-
-                if( pGlobalShell->GetWin() )
-                {
-                    // The table borders do not use SwAlignRect, but all the other frames do.
-                    // Therefore we tweak the outer borders a bit to achieve that the outer
-                    // borders match the subsidiary lines of the upper:
-                    if ( aStart.X() == aUpper.Left() )
-                        aPaintStart.X() = aUpperAligned.Left();
-                    else if ( aStart.X() == aUpper._Right() )
-                        aPaintStart.X() = aUpperAligned._Right();
-                    if ( aStart.Y() == aUpper.Top() )
-                        aPaintStart.Y() = aUpperAligned.Top();
-                    else if ( aStart.Y() == aUpper._Bottom() )
-                        aPaintStart.Y() = aUpperAligned._Bottom();
-
-                    if ( aEnd.X() == aUpper.Left() )
-                        aPaintEnd.X() = aUpperAligned.Left();
-                    else if ( aEnd.X() == aUpper._Right() )
-                        aPaintEnd.X() = aUpperAligned._Right();
-                    if ( aEnd.Y() == aUpper.Top() )
-                        aPaintEnd.Y() = aUpperAligned.Top();
-                    else if ( aEnd.Y() == aUpper._Bottom() )
-                        aPaintEnd.Y() = aUpperAligned._Bottom();
-                }
+            // The (twip) positions will be adjusted to meet these requirements:
+            // 1. The y coordinates are located in the middle of the pixel grid
+            // 2. The x coordinated are located at the beginning of the pixel grid
+            // This is done, because the horizontal lines are painted "at
+            // beginning", whereas the vertical lines are painted "centered".
+            // By making the line sizes a multiple of one pixel size, we can
+            // assure that all lines having the same twip size have the same
+            // pixel size, independent of their position on the screen.
+            Point aPaintStart = rDev.PixelToLogic( rDev.LogicToPixel(aStart) );
+            Point aPaintEnd = rDev.PixelToLogic( rDev.LogicToPixel(aEnd) );
+
+            if (pGlobalShell->GetWin())
+            {
+                // The table borders do not use SwAlignRect, but all the other frames do.
+                // Therefore we tweak the outer borders a bit to achieve that the outer
+                // borders match the subsidiary lines of the upper:
+                if (aStart.X() == aUpper.Left())
+                    aPaintStart.X() = aUpperAligned.Left();
+                else if (aStart.X() == aUpper._Right())
+                    aPaintStart.X() = aUpperAligned._Right();
+                if (aStart.Y() == aUpper.Top())
+                    aPaintStart.Y() = aUpperAligned.Top();
+                else if (aStart.Y() == aUpper._Bottom())
+                    aPaintStart.Y() = aUpperAligned._Bottom();
+
+                if (aEnd.X() == aUpper.Left())
+                    aPaintEnd.X() = aUpperAligned.Left();
+                else if (aEnd.X() == aUpper._Right())
+                    aPaintEnd.X() = aUpperAligned._Right();
+                if (aEnd.Y() == aUpper.Top())
+                    aPaintEnd.Y() = aUpperAligned.Top();
+                else if (aEnd.Y() == aUpper._Bottom())
+                    aPaintEnd.Y() = aUpperAligned._Bottom();
+            }
 
-                // logically vertical lines are painted centered on the line,
-                // logically horizontal lines are painted "below" the line
-                bool const isBelow((mrTabFrm.IsVertical()) ? !bHori : bHori);
-                double const offsetStart = (isBelow)
-                    ?   aStyles[0].GetWidth() / 2.0
-                    :   std::max<double>(aStyles[1].GetWidth(),
-                            aStyles[3].GetWidth()) / 2.0;
-                double const offsetEnd = (isBelow)
-                    ?   aStyles[0].GetWidth() / 2.0
-                    :   std::max<double>(aStyles[4].GetWidth(),
-                            aStyles[6].GetWidth()) / 2.0;
-                if (mrTabFrm.IsVertical())
-                {
-                    aPaintStart.X() -= static_cast<long>(offsetStart + 0.5);
-                    aPaintEnd.X()   -= static_cast<long>(offsetEnd   + 0.5);
-                }
-                else
-                {
-                    aPaintStart.Y() += static_cast<long>(offsetStart + 0.5);
-                    aPaintEnd.Y()   += static_cast<long>(offsetEnd   + 0.5);
-                }
+            // logically vertical lines are painted centered on the line,
+            // logically horizontal lines are painted "below" the line
+            bool const isBelow((mrTabFrm.IsVertical()) ? !bHori : bHori);
+            double const offsetStart = (isBelow)
+                ?   aStyles[0].GetWidth() / 2.0
+                :   std::max<double>(aStyles[1].GetWidth(),
+                        aStyles[3].GetWidth()) / 2.0;
+            double const offsetEnd = (isBelow)
+                ?   aStyles[0].GetWidth() / 2.0
+                :   std::max<double>(aStyles[4].GetWidth(),
+                        aStyles[6].GetWidth()) / 2.0;
+            if (mrTabFrm.IsVertical())
+            {
+                aPaintStart.X() -= static_cast<long>(offsetStart + 0.5);
+                aPaintEnd.X()   -= static_cast<long>(offsetEnd   + 0.5);
+            }
+            else
+            {
+                aPaintStart.Y() += static_cast<long>(offsetStart + 0.5);
+                aPaintEnd.Y()   += static_cast<long>(offsetEnd   + 0.5);
+            }
 
-                aPaintStart.X() -= nTwipXCorr; // nHalfPixelSzW - 2 to assure that we do not leave the pixel
-                aPaintEnd.X()   -= nTwipXCorr;
-                aPaintStart.Y() -= nTwipYCorr;
-                aPaintEnd.Y()   -= nTwipYCorr;
+            aPaintStart.X() -= nTwipXCorr; // nHalfPixelSzW - 2 to assure that we do not leave the pixel
+            aPaintEnd.X()   -= nTwipXCorr;
+            aPaintStart.Y() -= nTwipYCorr;
+            aPaintEnd.Y()   -= nTwipYCorr;
 
-                if (::rtl::math::approxEqual(aStyles[0].Prim(), 0.0) &&
-                    ::rtl::math::approxEqual(aStyles[0].Secn(), 0.0))
-                {
-                    continue; // fdo#75118 do not paint zero-width lines
-                }
+            if (::rtl::math::approxEqual(aStyles[0].Prim(), 0.0) &&
+                ::rtl::math::approxEqual(aStyles[0].Secn(), 0.0))
+            {
+                continue; // fdo#75118 do not paint zero-width lines
+            }
 
-                // Here comes the painting stuff: Thank you, DR, great job!!!
-                if ( bHori )
-                {
-                    mrTabFrm.ProcessPrimitives( svx::frame::CreateBorderPrimitives(
-                        aPaintStart,
-                        aPaintEnd,
-                        aStyles[ 0 ],   // current style
-                        aStyles[ 1 ],   // aLFromT
-                        aStyles[ 2 ],   // aLFromL
-                        aStyles[ 3 ],   // aLFromB
-                        aStyles[ 4 ],   // aRFromT
-                        aStyles[ 5 ],   // aRFromR
-                        aStyles[ 6 ],   // aRFromB
-                        pTmpColor
-                        )
-                    );
-                }
-                else
-                {
-                    mrTabFrm.ProcessPrimitives( svx::frame::CreateBorderPrimitives(
-                        aPaintEnd,
-                        aPaintStart,
-                        aStyles[ 0 ],   // current style
-                        aStyles[ 4 ],   // aBFromL
-                        aStyles[ 5 ],   // aBFromB
-                        aStyles[ 6 ],   // aBFromR
-                        aStyles[ 1 ],   // aTFromL
-                        aStyles[ 2 ],   // aTFromT
-                        aStyles[ 3 ],   // aTFromR
-                        pTmpColor
-                        )
-                    );
-                }
+            // Here comes the painting stuff: Thank you, DR, great job!!!
+            if (bHori)
+            {
+                mrTabFrm.ProcessPrimitives( svx::frame::CreateBorderPrimitives(
+                    aPaintStart,
+                    aPaintEnd,
+                    aStyles[ 0 ],   // current style
+                    aStyles[ 1 ],   // aLFromT
+                    aStyles[ 2 ],   // aLFromL
+                    aStyles[ 3 ],   // aLFromB
+                    aStyles[ 4 ],   // aRFromT
+                    aStyles[ 5 ],   // aRFromR
+                    aStyles[ 6 ],   // aRFromB
+                    pTmpColor)
+                );
+            }
+            else
+            {
+                mrTabFrm.ProcessPrimitives( svx::frame::CreateBorderPrimitives(
+                    aPaintEnd,
+                    aPaintStart,
+                    aStyles[ 0 ],   // current style
+                    aStyles[ 4 ],   // aBFromL
+                    aStyles[ 5 ],   // aBFromB
+                    aStyles[ 6 ],   // aBFromR
+                    aStyles[ 1 ],   // aTFromL
+                    aStyles[ 2 ],   // aTFromT
+                    aStyles[ 3 ],   // aTFromR
+                    pTmpColor)
+                );
             }
         }
 
@@ -2759,6 +2806,54 @@ void SwTabFrmPainter::FindStylesForLine( const Point& rStartPoint,
     }
 }
 
+namespace {
+
+void calcOffsetForDoubleLine( SwLineEntryMap& rLines )
+{
+    SwLineEntryMap aNewLines;
+    SwLineEntryMap::iterator it = rLines.begin(), itEnd = rLines.end();
+    bool bFirst = true;
+    for (; it != itEnd; ++it)
+    {
+        if (bFirst)
+        {
+            // First line needs to be offset to account for double line thickness.
+            SwLineEntrySet aNewSet;
+            const SwLineEntrySet& rSet = it->second;
+            SwLineEntrySet::iterator itSet = rSet.begin(), itSetEnd = rSet.end();
+            size_t nEntryCount = rSet.size();
+            for (size_t i = 0; itSet != itSetEnd; ++itSet, ++i)
+            {
+                SwLineEntry aLine = *itSet;
+                aLine.mnOffset = static_cast<SwTwips>(aLine.maAttribute.Dist());
+                aLine.mbOffsetPerp = true;
+
+                if (i == 0)
+                    aLine.mbOffsetStart = true;
+                if (i == nEntryCount - 1)
+                    aLine.mbOffsetEnd = true;
+
+                aNewSet.insert(aLine);
+            }
+
+            aNewLines.insert(SwLineEntryMap::value_type(it->first, aNewSet));
+        }
+        else
+            aNewLines.insert(SwLineEntryMap::value_type(it->first, it->second));
+
+        bFirst = false;
+    }
+    rLines.swap(aNewLines);
+}
+
+}
+
+void SwTabFrmPainter::AdjustTopLeftFrames()
+{
+    calcOffsetForDoubleLine(maHoriLines);
+    calcOffsetForDoubleLine(maVertLines);
+}
+
 // special case: #i9860#
 // first line in follow table without repeated headlines
 static bool lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines(
@@ -2792,10 +2887,16 @@ void SwTabFrmPainter::Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem )
     bool const bVert = mrTabFrm.IsVertical();
     bool const bR2L  = mrTabFrm.IsRightToLeft();
 
-    svx::frame::Style aL( rBoxItem.GetLeft() );
-    svx::frame::Style aR( rBoxItem.GetRight() );
-    svx::frame::Style aT( rBoxItem.GetTop() );
-    svx::frame::Style aB( rBoxItem.GetBottom() );
+    SwViewShell* pViewShell = mrTabFrm.getRootFrm()->GetCurrShell();
+    OutputDevice* pOutDev = pViewShell->GetOut();
+    const MapMode& rMapMode = pOutDev->GetMapMode();
+    const Fraction& rFracX = rMapMode.GetScaleX();
+    const Fraction& rFracY = rMapMode.GetScaleY();
+
+    svx::frame::Style aL(rBoxItem.GetLeft(), rFracX);
+    svx::frame::Style aR(rBoxItem.GetRight(), rFracY);
+    svx::frame::Style aT(rBoxItem.GetTop(), rFracX);
+    svx::frame::Style aB(rBoxItem.GetBottom(), rFracY);
 
     aR.MirrorSelf();
     aB.MirrorSelf();
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 5840f95..d9d646e 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -651,6 +651,7 @@ namespace xmloff { namespace token {
         TOKEN( "dotted",                          XML_DOTTED ),
         TOKEN( "double",                          XML_DOUBLE ),
         TOKEN( "double-sided",                    XML_DOUBLE_SIDED ),
+        TOKEN( "double-thin",                     XML_DOUBLE_THIN ),
         TOKEN( "down",                            XML_DOWN ),
         TOKEN( "draft",                           XML_DRAFT ),
         TOKEN( "draw",                            XML_DRAW ),
diff --git a/xmloff/source/style/bordrhdl.cxx b/xmloff/source/style/bordrhdl.cxx
index 36c4dea..e0c7be5 100644
--- a/xmloff/source/style/bordrhdl.cxx
+++ b/xmloff/source/style/bordrhdl.cxx
@@ -24,6 +24,7 @@
 #include <rtl/ustrbuf.hxx>
 #include <com/sun/star/uno/Any.hxx>
 #include <com/sun/star/table/BorderLine2.hpp>
+#include <com/sun/star/table/BorderLineStyle.hpp>
 
 using namespace ::com::sun::star;
 using namespace ::xmloff::token;
@@ -55,18 +56,19 @@ const sal_uInt16 API_LINE_NONE = USHRT_MAX;
 
 SvXMLEnumMapEntry pXML_BorderStyles[] =
 {
-    { XML_NONE,                 API_LINE_NONE   },
-    { XML_HIDDEN,               API_LINE_NONE   },
-    { XML_SOLID,                API_LINE_SOLID  },
-    { XML_DOUBLE,               API_LINE_DOUBLE },
-    { XML_DOTTED,               API_LINE_DOTTED },
-    { XML_DASHED,               API_LINE_DASHED },
-    { XML_GROOVE,               API_LINE_ENGRAVED },
-    { XML_RIDGE,                API_LINE_EMBOSSED },
-    { XML_INSET,                API_LINE_INSET  },
-    { XML_OUTSET,               API_LINE_OUTSET },
-    { XML_FINE_DASHED,          API_LINE_FINE_DASHED },
-    { XML_TOKEN_INVALID,        0 }
+    { XML_NONE,          table::BorderLineStyle::NONE   },
+    { XML_HIDDEN,        table::BorderLineStyle::NONE   },
+    { XML_SOLID,         table::BorderLineStyle::SOLID  },
+    { XML_DOUBLE,        table::BorderLineStyle::DOUBLE },
+    { XML_DOUBLE_THIN,   table::BorderLineStyle::DOUBLE_THIN },
+    { XML_DOTTED,        table::BorderLineStyle::DOTTED },
+    { XML_DASHED,        table::BorderLineStyle::DASHED },
+    { XML_GROOVE,        table::BorderLineStyle::ENGRAVED },
+    { XML_RIDGE,         table::BorderLineStyle::EMBOSSED },
+    { XML_INSET,         table::BorderLineStyle::INSET  },
+    { XML_OUTSET,        table::BorderLineStyle::OUTSET },
+    { XML_FINE_DASHED,   table::BorderLineStyle::FINE_DASHED },
+    { XML_TOKEN_INVALID, 0 }
 };
 
 SvXMLEnumMapEntry pXML_NamedBorderWidths[] =
@@ -151,13 +153,14 @@ bool XMLBorderWidthHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValu
     bool bDouble = false;
     switch ( aBorderLine.LineStyle )
     {
-        case API_LINE_DOUBLE:
-        case API_LINE_THINTHICK_SMALLGAP:
-        case API_LINE_THINTHICK_MEDIUMGAP:
-        case API_LINE_THINTHICK_LARGEGAP:
-        case API_LINE_THICKTHIN_SMALLGAP:
-        case API_LINE_THICKTHIN_MEDIUMGAP:
-        case API_LINE_THICKTHIN_LARGEGAP:
+        case table::BorderLineStyle::DOUBLE:
+        case table::BorderLineStyle::DOUBLE_THIN:
+        case table::BorderLineStyle::THINTHICK_SMALLGAP:
+        case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
+        case table::BorderLineStyle::THINTHICK_LARGEGAP:
+        case table::BorderLineStyle::THICKTHIN_SMALLGAP:
+        case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
+        case table::BorderLineStyle::THICKTHIN_LARGEGAP:
             bDouble = true;
             break;
         default:
@@ -339,7 +342,10 @@ bool XMLBorderHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, co
             case API_LINE_FINE_DASHED:
                 eStyleToken = XML_FINE_DASHED;
                 break;
-            case API_LINE_SOLID:
+            case table::BorderLineStyle::DOUBLE_THIN:
+                eStyleToken = XML_DOUBLE_THIN;
+                break;
+            case table::BorderLineStyle::SOLID:
             default:
                 break;
         }


More information about the Libreoffice-commits mailing list