[ooo-build-commit] .: sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Wed Oct 6 15:01:52 PDT 2010


 sw/source/core/inc/frame.hxx                 |    3 
 sw/source/core/layout/paintfrm.cxx           |  107 +++++++++++++++++++--------
 sw/source/filter/html/css1atr.cxx            |   27 +++++-
 sw/source/filter/html/htmltabw.cxx           |   18 +---
 sw/source/filter/html/svxcss1.cxx            |   12 ++-
 sw/source/filter/html/wrthtml.hxx            |    1 
 sw/source/filter/rtf/rtfatr.cxx              |   27 +++++-
 sw/source/filter/rtf/swparrtf.cxx            |    4 +
 sw/source/filter/rtf/wrtrtf.cxx              |   15 +++
 sw/source/filter/ww1/w1sprm.cxx              |   10 ++
 sw/source/filter/ww8/docxattributeoutput.cxx |   14 +++
 sw/source/filter/ww8/wrtw8esh.cxx            |   15 +++
 sw/source/filter/ww8/ww8atr.cxx              |   20 +++++
 sw/source/filter/ww8/ww8graf.cxx             |   60 +++++++++------
 sw/source/filter/ww8/ww8graf2.cxx            |    4 -
 sw/source/filter/ww8/ww8par.cxx              |    4 -
 sw/source/filter/ww8/ww8par.hxx              |    4 -
 sw/source/filter/ww8/ww8par6.cxx             |   11 ++
 sw/source/filter/ww8/ww8scan.cxx             |    2 
 sw/source/filter/ww8/ww8struc.hxx            |    4 +
 sw/source/filter/xml/xmlexpit.cxx            |   14 +++
 sw/source/filter/xml/xmlithlp.cxx            |   25 +++++-
 22 files changed, 309 insertions(+), 92 deletions(-)

New commits:
commit feeb8f98d57071bae2b70849a56cec4a1623de8c
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Wed Oct 6 23:50:39 2010 +0200

    fate#307731, fate#307730: Dotted and dashed border types

diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index ca1deea..6006795 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -27,6 +27,7 @@
 #ifndef _FRAME_HXX
 #define _FRAME_HXX
 #include <svl/svarray.hxx>
+#include <editeng/borderline.hxx>
 #include "swtypes.hxx"	// fuer SwTwips
 #include "swrect.hxx"
 #include "calbck.hxx"	// fuer SwClient
@@ -522,7 +523,7 @@ public:
                           const BOOL bLowerMode = FALSE,
                           const BOOL bLowerBorder = FALSE ) const;
     void PaintBorderLine( const SwRect&, const SwRect&, const SwPageFrm*,
-                          const Color *pColor ) const;
+                          const Color *pColor, const SvxBorderStyle = SOLID ) const;
 
     //Retouche, nicht im Bereich des uebergebenen Rect!
     void Retouche( const SwPageFrm *pPage, const SwRect &rRect ) const;
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index ef0705f..85240f8 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -109,6 +109,9 @@
 #define COL_NOTES_SIDEPANE_SCROLLAREA		RGB_COLORDATA(230,230,220)
 #include <vcl/svapp.hxx>
 
+#include <svtools/borderhelper.hxx>
+
+
 using namespace ::com::sun::star;
 
 #define GETOBJSHELL()		((SfxObjectShell*)rSh.GetDoc()->GetDocShell())
@@ -150,15 +153,17 @@ using namespace ::com::sun::star;
 class SwLineRect : public SwRect
 {
     const Color	   *pColor;
+    SvxBorderStyle  nStyle;
     const SwTabFrm *pTab;
           BYTE		nSubColor;  //Hilfslinien einfaerben
           BOOL		bPainted;	//schon gepaintet?
           BYTE		nLock;		//Um die Linien zum Hell-Layer abzugrenzen.
 public:
-    SwLineRect( const SwRect &rRect, const Color *pCol,
+    SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle,
                 const SwTabFrm *pT , const BYTE nSCol );
 
     const Color			*GetColor() const { return pColor;}
+    SvxBorderStyle       GetStyle() const { return nStyle; }
     const SwTabFrm		*GetTab()	const { return pTab;  }
     void  SetPainted()					  { bPainted = TRUE; }
     void  Lock( BOOL bLock )			  { if ( bLock )
@@ -180,7 +185,7 @@ class SwLineRects : public SwLRects
     USHORT nLastCount;	//unuetze Durchlaeufe im PaintLines verhindern.
 public:
     SwLineRects() : nLastCount( 0 ) {}
-    void AddLineRect( const SwRect& rRect,	const Color *pColor,
+    void AddLineRect( const SwRect& rRect,	const Color *pColor, const SvxBorderStyle nStyle,
                       const SwTabFrm *pTab, const BYTE nSCol );
     void ConnectEdges( OutputDevice *pOut );
     void PaintLines  ( OutputDevice *pOut );
@@ -411,10 +416,11 @@ SwSavePaintStatics::~SwSavePaintStatics()
 SV_IMPL_VARARR( SwLRects, SwLineRect );
 
 
-SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol,
+SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyl,
                         const SwTabFrm *pT, const BYTE nSCol ) :
     SwRect( rRect ),
     pColor( pCol ),
+    nStyle( nStyl ),
     pTab( pT ),
     nSubColor( nSCol ),
     bPainted( FALSE ),
@@ -459,7 +465,7 @@ BOOL SwLineRect::MakeUnion( const SwRect &rRect )
     return FALSE;
 }
 
-void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol,
+void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle,
                                const SwTabFrm *pTab, const BYTE nSCol )
 {
     //Rueckwaerts durch, weil Linien die zusammengefasst werden koennen i.d.R.
@@ -478,7 +484,7 @@ void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol,
                 return;
         }
     }
-    Insert( SwLineRect( rRect, pCol, pTab, nSCol ), Count() );
+    Insert( SwLineRect( rRect, pCol, nStyle, pTab, nSCol ), Count() );
 }
 
 void SwLineRects::ConnectEdges( OutputDevice *pOut )
@@ -585,7 +591,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
                             if ( !rL1.IsInside( aIns ) )
                                 continue;
                             const USHORT nTmpFree = Free();
-                            Insert( SwLineRect( aIns, rL1.GetColor(),
+                            Insert( SwLineRect( aIns, rL1.GetColor(), SOLID,
                                         rL1.GetTab(), SUBCOL_TAB ), Count() );
                             if ( !nTmpFree )
                             {
@@ -626,7 +632,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
                             if ( !rL1.IsInside( aIns ) )
                                 continue;
                             const USHORT nTmpFree = Free();
-                            Insert( SwLineRect( aIns, rL1.GetColor(),
+                            Insert( SwLineRect( aIns, rL1.GetColor(), SOLID,
                                         rL1.GetTab(), SUBCOL_TAB ), Count() );
                             if ( !nTmpFree )
                             {
@@ -656,7 +662,7 @@ inline void SwSubsRects::Ins( const SwRect &rRect, const BYTE nSCol )
     //Linien die kuerzer als die breiteste Linienbreite sind werden
     //nicht aufgenommen.
     if ( rRect.Height() > DEF_LINE_WIDTH_4 || rRect.Width() > DEF_LINE_WIDTH_4 )
-        Insert( SwLineRect( rRect, 0, 0, nSCol ), Count());
+        Insert( SwLineRect( rRect, 0, SOLID, 0, nSCol ), Count());
 }
 
 void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
@@ -712,7 +718,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
                         {
                             SwRect aNewSubsRect( aSubsLineRect );
                             aNewSubsRect.Bottom( nTmp );
-                            Insert( SwLineRect( aNewSubsRect, 0, 0,
+                            Insert( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0,
                                                 aSubsLineRect.GetSubColor() ), Count());
                         }
                         nTmp = rLine.Bottom()+nPixelSzH+1;
@@ -720,7 +726,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
                         {
                             SwRect aNewSubsRect( aSubsLineRect );
                             aNewSubsRect.Top( nTmp );
-                            Insert( SwLineRect( aNewSubsRect, 0, 0,
+                            Insert( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0,
                                                 aSubsLineRect.GetSubColor() ), Count());
                         }
                         Remove( i, 1 );
@@ -738,7 +744,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
                         {
                             SwRect aNewSubsRect( aSubsLineRect );
                             aNewSubsRect.Right( nTmp );
-                            Insert( SwLineRect( aNewSubsRect, 0, 0,
+                            Insert( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0,
                                                 aSubsLineRect.GetSubColor() ), Count());
                         }
                         nTmp = rLine.Right()+nPixelSzW+1;
@@ -746,7 +752,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
                         {
                             SwRect aNewSubsRect( aSubsLineRect );
                             aNewSubsRect.Left( nTmp );
-                            Insert( SwLineRect( aNewSubsRect, 0, 0,
+                            Insert( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0,
                                                 aSubsLineRect.GetSubColor() ), Count());
                         }
                         Remove( i, 1 );
@@ -765,6 +771,44 @@ void SwLineRects::LockLines( BOOL bLock )
         operator[](i).Lock( bLock );
 }
 
+void lcl_DrawDashedRect( OutputDevice * pOut, SwLineRect & rLRect )
+{
+    double nHalfLWidth = rLRect.Height(  );
+    if ( nHalfLWidth > 1 )
+    {
+        nHalfLWidth = nHalfLWidth / 2;
+    }
+    else
+    {
+        nHalfLWidth = 1;
+    }
+
+    long startX = rLRect.Left(  );
+    long startY = rLRect.Top(  ) + nHalfLWidth;
+    long endX = rLRect.Left(  ) + rLRect.Width(  );
+    long endY = rLRect.Top(  ) + nHalfLWidth;
+
+    if ( rLRect.Height(  ) > rLRect.Width(  ) )
+    {
+        nHalfLWidth = rLRect.Width(  );
+        if ( nHalfLWidth > 1 )
+        {
+            nHalfLWidth = nHalfLWidth / 2;
+        }
+        else
+        {
+            nHalfLWidth = 1;
+        }
+        startX = rLRect.Left(  ) + nHalfLWidth;
+        startY = rLRect.Top(  );
+        endX = rLRect.Left(  ) + nHalfLWidth;
+        endY = rLRect.Top(  ) + rLRect.Height(  );
+    }
+
+    svtools::DrawLine( *pOut, Point( startX, startY ), Point( endX, endY ),
+            sal_uInt32( nHalfLWidth * 2 ), rLRect.GetStyle( ) );
+}
+
 void SwLineRects::PaintLines( OutputDevice *pOut )
 {
     //Painten der Umrandungen. Leider muessen wir zweimal durch.
@@ -778,6 +822,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
 
         // OD 2004-04-23 #116347#
         pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
+        pOut->SetFillColor();
         pOut->SetLineColor();
         ConnectEdges( pOut );
         const Color *pLast = 0;
@@ -836,11 +881,12 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
                         Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
                         pOut->SetDrawMode( 0 );
 
-                    pOut->SetFillColor( *pLast );
+                    pOut->SetLineColor( *pLast );
                     pOut->SetDrawMode( nOldDrawMode );
                 }
+
                 if( !rLRect.IsEmpty() )
-                    pOut->DrawRect( rLRect.SVRect() );
+                    lcl_DrawDashedRect( pOut, rLRect );
                 rLRect.SetPainted();
             }
             else
@@ -874,7 +920,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
                     pOut->SetDrawMode( nOldDrawMode );
                 }
                 if( !rLRect.IsEmpty() )
-                    pOut->DrawRect( rLRect.SVRect() );
+                    lcl_DrawDashedRect( pOut, rLRect );
                 rLRect.SetPainted();
             }
         nLastCount = nMinCount;
@@ -3982,7 +4028,8 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
 void SwFrm::PaintBorderLine( const SwRect& rRect,
                              const SwRect& rOutRect,
                              const SwPageFrm *pPage,
-                             const Color *pColor ) const
+                             const Color *pColor,
+                             const SvxBorderStyle nStyle ) const
 {
     if ( !rOutRect.IsOver( rRect ) )
         return;
@@ -4005,10 +4052,10 @@ void SwFrm::PaintBorderLine( const SwRect& rRect,
         SwRegionRects aRegion( aOut, 4, 1 );
         ::lcl_SubtractFlys( this, pPage, aOut, aRegion );
         for ( USHORT i = 0; i < aRegion.Count(); ++i )
-            pLines->AddLineRect( aRegion[i], pColor, pTab, nSubCol );
+            pLines->AddLineRect( aRegion[i], pColor, nStyle, pTab, nSubCol );
     }
     else
-        pLines->AddLineRect( aOut, pColor, pTab, nSubCol );
+        pLines->AddLineRect( aOut, pColor, nStyle, pTab, nSubCol );
 }
 
 /*************************************************************************
@@ -4299,7 +4346,8 @@ void lcl_PaintLeftRightLine( const sal_Bool         _bLeft,
                 (aPaintRect.*_rRectFn->fnAddRight)( 1 );
             }
         }
-        _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pLeftRightBorder->GetColor() );
+        _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pLeftRightBorder->GetColor(),
+                pLeftRightBorder->GetStyle( ) );
     }
 
     if ( pLeftRightBorder->GetInWidth() )
@@ -4339,7 +4387,8 @@ void lcl_PaintLeftRightLine( const sal_Bool         _bLeft,
                     (aPaintRect.*_rRectFn->fnAddRight)( 1 );
                 }
             }
-            _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pLeftRightBorder->GetColor() );
+            _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pLeftRightBorder->GetColor(),
+                   SOLID );
         }
     }
 }
@@ -4403,7 +4452,8 @@ void lcl_PaintTopBottomLine( const sal_Bool         _bTop,
                 (aPaintRect.*_rRectFn->fnAddBottom)( 1 );
             }
         }
-        _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pTopBottomBorder->GetColor() );
+        _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pTopBottomBorder->GetColor(),
+               pTopBottomBorder->GetStyle( ) );
     }
 
     if ( pTopBottomBorder->GetInWidth() )
@@ -4442,7 +4492,8 @@ void lcl_PaintTopBottomLine( const sal_Bool         _bTop,
                     (aPaintRect.*_rRectFn->fnAddBottom)( 1 );
                 }
             }
-            _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pTopBottomBorder->GetColor() );
+            _rFrm.PaintBorderLine( _rRect, aPaintRect, &_rPage, &pTopBottomBorder->GetColor(),
+                   SOLID );
         }
     }
 }
@@ -4922,7 +4973,7 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFmtCol &rFmtCol,
         (aLineRect.*fnRect->fnSetPosX)
             ( (pCol->Frm().*fnGetX)() - nPenHalf );
         if ( aRect.IsOver( aLineRect ) )
-            PaintBorderLine( aRect, aLineRect , pPage, &rFmtCol.GetLineColor());
+            PaintBorderLine( aRect, aLineRect , pPage, &rFmtCol.GetLineColor() );
         pCol = pCol->GetNext();
     }
 }
@@ -6070,7 +6121,7 @@ void MA_FASTCALL lcl_RefreshLine( const SwLayoutFrm *pLay,
             SwRect aRect( aP1, aP2 );
             // OD 18.11.2002 #99672# - use parameter <_pSubsLines> instead of
             // global variable <pSubsLines>.
-            _pSubsLines->AddLineRect( aRect, 0, 0, nSubColor );
+            _pSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor );
         }
         aP1 = aP2;
         aP1.*pDirPt += 1;
@@ -6209,13 +6260,13 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
             if ( aOriginal.Left() == aOut.Left() )
             {
                 const SwRect aRect( aOut.Pos(), aLB );
-                pUsedSubsLines->AddLineRect( aRect, 0, 0, nSubColor );
+                pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor );
             }
             // OD 14.11.2002 #104821# - in vertical layout set page/column break at right
             if ( aOriginal.Right() == nRight )
             {
                 const SwRect aRect( aRT, aRB );
-                pUsedSubsLines->AddLineRect( aRect, 0, 0,
+                pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0,
                         (bBreak && bVert) ? SUBCOL_BREAK : nSubColor );
             }
         }
@@ -6226,13 +6277,13 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
             {
                 // OD 14.11.2002 #104821# - in horizontal layout set page/column break at top
                 const SwRect aRect( aOut.Pos(), aRT );
-                pUsedSubsLines->AddLineRect( aRect, 0, 0,
+                pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0,
                         (bBreak && !bVert) ? SUBCOL_BREAK : nSubColor );
             }
             if ( aOriginal.Bottom() == nBottom )
             {
                 const SwRect aRect( aLB, aRB );
-                pUsedSubsLines->AddLineRect( aRect, 0, 0, nSubColor );
+                pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor );
             }
         }
     }
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index f221eb4..b7e6eda 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -176,7 +176,6 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
 static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
                                  USHORT nMode, const String *pGrfName );
 static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt );
-static Writer& OutCSS1_SvxBox( Writer& rWrt, const SfxPoolItem& rHt );
 static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
                                      USHORT nMode );
 static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt,
@@ -3600,8 +3599,24 @@ static void OutCSS1_SvxBorderLine( SwHTMLWriter& rHTMLWrt,
     }
 
     // Linien-Stil: solid oder double
-    ((sOut += ' ')
-        += (bDouble ? sCSS1_PV_double : sCSS1_PV_solid)) += ' ';
+    sOut += ' ';
+    if ( bDouble )
+        sOut += sCSS1_PV_double;
+    else
+    {
+        switch ( pLine->GetStyle( ) )
+        {
+            case DOTTED:
+                sOut += sCSS1_PV_dotted;
+                break;
+            case DASHED:
+                sOut += sCSS1_PV_dashed;
+                break;
+            default:
+                sOut += sCSS1_PV_solid;
+        }
+    }
+    sOut += ' ';
 
     // und noch die Farbe
     GetCSS1Color( pLine->GetColor(), sOut );
@@ -3609,14 +3624,14 @@ static void OutCSS1_SvxBorderLine( SwHTMLWriter& rHTMLWrt,
     rHTMLWrt.OutCSS1_PropertyAscii( pProperty, sOut );
 }
 
-static Writer& OutCSS1_SvxBox( Writer& rWrt, const SfxPoolItem& rHt )
+Writer& OutCSS1_SvxBox( Writer& rWrt, const SfxPoolItem& rHt )
 {
     SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
 
     // Das Zeichen-Attribut wird nicht ausgegeben, wenn gerade
     // Optionen ausgegeben werden
-    if( !rHTMLWrt.IsHTMLMode(HTMLMODE_PARA_BORDER))
-        return rWrt;
+//    if( !rHTMLWrt.IsHTMLMode(HTMLMODE_PARA_BORDER))
+//        return rWrt;
 
     const SvxBoxItem& rBoxItem = (const SvxBoxItem&)rHt;
     const SvxBorderLine *pTop = rBoxItem.GetTop();
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 5d170c0..103727f 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -433,6 +433,11 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
             OutCSS1_TableBGStyleOpt( rWrt, *pBrushItem );
     }
 
+    ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_style ) += "=\"";
+    rWrt.Strm() << sOut.GetBuffer( );
+    OutCSS1_SvxBox( rWrt, pBox->GetFrmFmt()->GetBox() );
+    sOut = '"';
+
     sal_uInt32 nNumFmt = 0;
     double nValue = 0.0;
     sal_Bool bNumFmt = sal_False, bValue = sal_False;
@@ -701,19 +706,6 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
     // Anderenfalls enthaelt nBorder naemlich nur die Breite der Umrandung,
     // die genutzt wird, wenn gar kein sheet::Border angegeben ist.
     sal_Bool bHasAnyBorders = nFrameMask || bColsHaveBorder || bRowsHaveBorder;
-    if( bCollectBorderWidth || nBorder==0 || bHasAnyBorders )
-        (((sOut += ' ' ) += OOO_STRING_SVTOOLS_HTML_O_border ) += '=')
-            += ByteString::CreateFromInt32( rWrt.ToPixel( nBorder ) );
-
-    // BORDERCOLOR ausgeben
-
-    if( (sal_uInt32)-1 != nBorderColor && rWrt.bCfgOutStyles && bHasAnyBorders )
-    {
-        ((sOut += ' ' ) += OOO_STRING_SVTOOLS_HTML_O_bordercolor ) += '=';
-        rWrt.Strm() << sOut.GetBuffer();
-        HTMLOutFuncs::Out_Color( rWrt.Strm(), nBorderColor, rWrt.eDestEnc );
-        sOut.Erase();
-    }
 
     // CELLPADDING ausgeben: Stammt aus Layout oder ist berechnet
     (((sOut += ' ' ) += OOO_STRING_SVTOOLS_HTML_O_cellpadding ) += '=')
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index b3efe87..125fd38 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -183,13 +183,13 @@ static CSS1PropertyEnum __READONLY_DATA aBorderWidthTable[] =
     { 0,					0	}
 };
 
-enum CSS1BorderStyle { CSS1_BS_NONE, CSS1_BS_SINGLE, CSS1_BS_DOUBLE };
+enum CSS1BorderStyle { CSS1_BS_NONE, CSS1_BS_SINGLE, CSS1_BS_DOUBLE, CSS1_BS_DOTTED, CSS1_BS_DASHED };
 
 static CSS1PropertyEnum __READONLY_DATA aBorderStyleTable[] =
 {
     { sCSS1_PV_none,		CSS1_BS_NONE		},
-    { sCSS1_PV_dotted, 		CSS1_BS_SINGLE		},
-    { sCSS1_PV_dashed, 		CSS1_BS_SINGLE		},
+    { sCSS1_PV_dotted, 		CSS1_BS_DOTTED		},
+    { sCSS1_PV_dashed, 		CSS1_BS_DASHED		},
     { sCSS1_PV_solid, 		CSS1_BS_SINGLE		},
     { sCSS1_PV_double, 		CSS1_BS_DOUBLE		},
     { sCSS1_PV_groove, 		CSS1_BS_SINGLE		},
@@ -367,6 +367,12 @@ void SvxCSS1BorderInfo::SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) cons
 
     // Linien-Stil doppelt oder einfach?
     BOOL bDouble = eStyle == CSS1_BS_DOUBLE;
+    if ( eStyle == CSS1_BS_DOTTED )
+        aBorderLine.SetStyle( DOTTED );
+    else if ( eStyle == CSS1_BS_DASHED )
+        aBorderLine.SetStyle( DASHED );
+    else
+        aBorderLine.SetStyle( SOLID );
 
     // benannte Breite umrechnenen, wenn keine absolute gegeben ist
     if( nAbsWidth==USHRT_MAX )
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index c422bab..a9b5e13 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -598,6 +598,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
 Writer& OutHTML_NumBulListEnd( SwHTMLWriter& rWrt,
                                const SwHTMLNumRuleInfo& rNextInfo );
 
+Writer& OutCSS1_SvxBox( Writer& rWrt, const SfxPoolItem& rHt );
 
 #endif	//  _WRTHTML_HXX
 
diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx
index ad21e39..a53d581 100644
--- a/sw/source/filter/rtf/rtfatr.cxx
+++ b/sw/source/filter/rtf/rtfatr.cxx
@@ -1720,12 +1720,31 @@ static void OutTBLBorderLine(SwRTFWriter& rWrt, const SvxBorderLine* pLine,
     }
     else
     {
-        // einfache Linie
-        if( DEF_LINE_WIDTH_1 >= pLine->GetOutWidth() )
-            (( sLineStr = OOO_STRING_SVTOOLS_RTF_BRDRS ) += OOO_STRING_SVTOOLS_RTF_BRDRW ) +=
+        if ( DEF_LINE_WIDTH_0 == pLine->GetOutWidth( ) )
+            // Hairline
+            sLineStr = OOO_STRING_SVTOOLS_RTF_BRDRHAIR;
+        else if( 255 >= pLine->GetOutWidth() )
+        {
+            // Simple width simple
+            sLineStr = OOO_STRING_SVTOOLS_RTF_BRDRS;
+            switch ( pLine->GetStyle( ) )
+            {
+                case DOTTED:
+                    sLineStr = OOO_STRING_SVTOOLS_RTF_BRDRDOT;
+                    break;
+                case DASHED:
+                    sLineStr = OOO_STRING_SVTOOLS_RTF_BRDRDASH;
+                    break;
+                case SOLID:
+                default:
+                    break;
+            }
+            ( sLineStr += OOO_STRING_SVTOOLS_RTF_BRDRW ) +=
                         ByteString::CreateFromInt32( pLine->GetOutWidth() );
+        }
         else
-            (( sLineStr = OOO_STRING_SVTOOLS_RTF_BRDRTH ) += OOO_STRING_SVTOOLS_RTF_BRDRW ) +=
+            // Shouldn't happen with the OOo default width values
+            (( sLineStr = OOO_STRING_SVTOOLS_RTF_BRDRTH ) += sLineStr += OOO_STRING_SVTOOLS_RTF_BRDRW ) +=
                         ByteString::CreateFromInt32( pLine->GetOutWidth() / 2 );
     }
 
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 196ac04..39ce5ab 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -2454,7 +2454,11 @@ void SwRTFParser::SetBorderLine(SvxBoxItem& rBox, sal_uInt16 nLine)
             break;
 
         case RTF_BRDRDOT:           // SO does not have dashed or dotted lines
+            nIdx = 6;
+            break;
         case RTF_BRDRDASH:
+            nIdx = 7;
+            break;
         case RTF_BRDRDASHSM:
         case RTF_BRDRDASHD:
         case RTF_BRDRDASHDD:
diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx
index 31c77c5..9d9be87 100644
--- a/sw/source/filter/rtf/wrtrtf.cxx
+++ b/sw/source/filter/rtf/wrtrtf.cxx
@@ -1461,7 +1461,20 @@ void SwRTFWriter::OutRTFBorder(const SvxBorderLine* aLine, const USHORT nSpace )
     int nWidth = aLine->GetOutWidth();
 
     if(nDistance == 0)	// Single Line
-        Strm() << OOO_STRING_SVTOOLS_RTF_BRDRS;
+    {
+        switch ( aLine->GetStyle( ) )
+        {
+            case DOTTED:
+                Strm() << OOO_STRING_SVTOOLS_RTF_BRDRDOT;
+                break;
+            case DASHED:
+                Strm() << OOO_STRING_SVTOOLS_RTF_BRDRDASH;
+                break;
+            case SOLID:
+            default:
+                Strm() << OOO_STRING_SVTOOLS_RTF_BRDRS;
+        }
+    }
     else				// Double Line
     {
         if(nOutWidth == nInWidth)
diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx
index a26fc29..488ca0b 100644
--- a/sw/source/filter/ww1/w1sprm.cxx
+++ b/sw/source/filter/ww1/w1sprm.cxx
@@ -208,6 +208,7 @@ STOP1(Ww1SingleSprmPPageBreakBefore, RES_BREAK)
 SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc)
 {
     USHORT nCode;
+    SvxBorderStyle eStyle = SOLID;
     if(pBrc->dxpLine2WidthGet() == 0)
     {
         switch(pBrc->dxpLine1WidthGet())
@@ -219,9 +220,18 @@ SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc
         case 3: nCode = DEF_LINE_WIDTH_2; break;
         case 4: nCode = DEF_LINE_WIDTH_3; break;
         case 5: nCode = DEF_LINE_WIDTH_4; break;
+        case 6:
+                nCode = DEF_LINE_WIDTH_5;
+                eStyle = DOTTED;
+                break;
+        case 7:
+                nCode = DEF_LINE_WIDTH_5;
+                eStyle = DASHED;
+                break;
         }
         pLine->SetOutWidth(nCode);
         pLine->SetInWidth(0);
+        pLine->SetStyle( eStyle );
     }
     else
     {
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index b5d79f2..cb75893 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1131,6 +1131,20 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
             pVal = ( sal_Char* )"thickThinMediumGap";
         }
     }
+    else
+    {
+        switch ( pBorderLine->GetStyle( ) )
+        {
+            case DOTTED:
+                pVal = ( sal_Char* )"dotted";
+                break;
+            case DASHED:
+                pVal = ( sal_Char* )"dashed";
+                break;
+            default:
+                break;
+        }
+    }
 
     pAttr->add( FSNS( XML_w, XML_val ), OString( pVal ) );
 
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 71889e2..45ba206 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1696,6 +1696,21 @@ INT32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
                     rPropOpt.AddOpt( ESCHER_Prop_lineStyle, eStyle );
                     rPropOpt.AddOpt( ESCHER_Prop_lineWidth,
                         DrawModelToEmu( nLineWidth ));
+
+                    MSO_LineDashing eDashing = mso_lineSolid;
+                    switch ( pLine->GetStyle( ) )
+                    {
+                        case  DASHED:
+                            eDashing = mso_lineDashGEL;
+                            break;
+                        case DOTTED:
+                            eDashing = mso_lineDotGEL;
+                            break;
+                        case SOLID:
+                        default:
+                            break;
+                    }
+                    rPropOpt.AddOpt( ESCHER_Prop_lineDashing, eDashing );
                     rPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x8000E );
 
                     //Use import logic to determine how much of border will go
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 316cccf..ffdbbfe 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4142,7 +4142,23 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
         else if( bThick )
             brcType = 2;
         else
+        {
+
             brcType = 1;
+            if ( bWrtWW8 )
+            {
+                switch ( rLine.GetStyle( ) )
+                {
+                    case DOTTED:
+                        brcType = 6;
+                        break;
+                    case DASHED:
+                        brcType = 7;
+                    default:
+                        break;
+                }
+            }
+        }
 
         // BRC.dxpLineWidth
         if( bThick )
@@ -4161,6 +4177,10 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
             nWidth = ( nWidth + 7 ) / 15;
             if( nWidth > 5 )
                 nWidth = 5;
+            if ( DOTTED == rLine.GetStyle( ) )
+                nWidth = 6;
+            else if ( DASHED == rLine.GetStyle( ) )
+                nWidth = 7;
         }
 
         if( 0 == nWidth )                       // ganz duenne Linie
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index d521150..282c0e2 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1132,6 +1132,7 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
                         MatchSdrItemsIntoFlySet( pTextObj,
                                                  aFlySet,
                                                  pRecord->eLineStyle,
+                                                 pRecord->eLineDashing,
                                                  pRecord->eShapeType,
                                                  aInnerDist );
 
@@ -1477,23 +1478,25 @@ const WW8_BordersSO &WW8_BordersSO::Get0x01LineMatch(eBorderCode eCode)
     // Deklarationen gemaess BOXITEM.HXX
     static const WW8_BordersSO aLineTabVer8[] =
     {
-/* 0*/  { DEF_LINE_WIDTH_0, 0, 0 },
-/* 1*/  { DEF_LINE_WIDTH_1, 0, 0 },
-/* 2*/  { DEF_LINE_WIDTH_2, 0, 0 },
-/* 3*/  { DEF_LINE_WIDTH_3, 0, 0 },
-/* 4*/  { DEF_LINE_WIDTH_4, 0, 0 },
-/* 5*/  { DEF_LINE_WIDTH_5, 0, 0 },
-/* 6*/  { DEF_DOUBLE_LINE0_OUT, DEF_DOUBLE_LINE0_IN, DEF_DOUBLE_LINE0_DIST },
-/* 7*/  { DEF_DOUBLE_LINE1_OUT, DEF_DOUBLE_LINE1_IN, DEF_DOUBLE_LINE1_DIST },
-/* 8*/  { DEF_DOUBLE_LINE2_OUT, DEF_DOUBLE_LINE2_IN, DEF_DOUBLE_LINE2_DIST },
-/* 9*/  { DEF_DOUBLE_LINE3_OUT, DEF_DOUBLE_LINE3_IN, DEF_DOUBLE_LINE3_DIST },
-/*10*/  { DEF_DOUBLE_LINE4_OUT, DEF_DOUBLE_LINE4_IN, DEF_DOUBLE_LINE4_DIST },
-/*11*/  { DEF_DOUBLE_LINE5_OUT, DEF_DOUBLE_LINE5_IN, DEF_DOUBLE_LINE5_DIST },
-/*12*/  { DEF_DOUBLE_LINE6_OUT, DEF_DOUBLE_LINE6_IN, DEF_DOUBLE_LINE6_DIST },
-/*13*/  { DEF_DOUBLE_LINE7_OUT, DEF_DOUBLE_LINE7_IN, DEF_DOUBLE_LINE7_DIST },
-/*14*/  { DEF_DOUBLE_LINE8_OUT, DEF_DOUBLE_LINE8_IN, DEF_DOUBLE_LINE8_DIST },
-/*15*/  { DEF_DOUBLE_LINE9_OUT, DEF_DOUBLE_LINE9_IN, DEF_DOUBLE_LINE9_DIST },
-/*16*/  { DEF_DOUBLE_LINE10_OUT,DEF_DOUBLE_LINE10_IN,DEF_DOUBLE_LINE10_DIST}
+/* 0*/  { DEF_LINE_WIDTH_0, 0, 0, SOLID },
+/* 1*/  { DEF_LINE_WIDTH_1, 0, 0, SOLID },
+/* 2*/  { DEF_LINE_WIDTH_2, 0, 0, SOLID },
+/* 3*/  { DEF_LINE_WIDTH_3, 0, 0, SOLID },
+/* 4*/  { DEF_LINE_WIDTH_4, 0, 0, SOLID },
+/* 5*/  { DEF_LINE_WIDTH_5, 0, 0, SOLID },
+/* 6*/  { DEF_DOUBLE_LINE0_OUT, DEF_DOUBLE_LINE0_IN, DEF_DOUBLE_LINE0_DIST, SOLID },
+/* 7*/  { DEF_DOUBLE_LINE1_OUT, DEF_DOUBLE_LINE1_IN, DEF_DOUBLE_LINE1_DIST, SOLID },
+/* 8*/  { DEF_DOUBLE_LINE2_OUT, DEF_DOUBLE_LINE2_IN, DEF_DOUBLE_LINE2_DIST, SOLID },
+/* 9*/  { DEF_DOUBLE_LINE3_OUT, DEF_DOUBLE_LINE3_IN, DEF_DOUBLE_LINE3_DIST, SOLID },
+/*10*/  { DEF_DOUBLE_LINE4_OUT, DEF_DOUBLE_LINE4_IN, DEF_DOUBLE_LINE4_DIST, SOLID },
+/*11*/  { DEF_DOUBLE_LINE5_OUT, DEF_DOUBLE_LINE5_IN, DEF_DOUBLE_LINE5_DIST, SOLID },
+/*12*/  { DEF_DOUBLE_LINE6_OUT, DEF_DOUBLE_LINE6_IN, DEF_DOUBLE_LINE6_DIST, SOLID },
+/*13*/  { DEF_DOUBLE_LINE7_OUT, DEF_DOUBLE_LINE7_IN, DEF_DOUBLE_LINE7_DIST, SOLID },
+/*14*/  { DEF_DOUBLE_LINE8_OUT, DEF_DOUBLE_LINE8_IN, DEF_DOUBLE_LINE8_DIST, SOLID },
+/*15*/  { DEF_DOUBLE_LINE9_OUT, DEF_DOUBLE_LINE9_IN, DEF_DOUBLE_LINE9_DIST, SOLID },
+/*16*/  { DEF_DOUBLE_LINE10_OUT,DEF_DOUBLE_LINE10_IN,DEF_DOUBLE_LINE10_DIST, SOLID},
+/*17*/  { DEF_LINE_WIDTH_5, 0, 0, DASHED },
+/*18*/  { DEF_LINE_WIDTH_5, 0, 0, DOTTED }
     };
     size_t nPos = static_cast<size_t>(eCode);
     ASSERT(nPos < sizeof(aLineTabVer8), "Impossible");
@@ -1562,7 +1565,7 @@ INT32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
 //words positioning of borders around floating objects is that of a
 //disturbed mind.
 INT32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
-    MSO_LineStyle eLineStyle, MSO_SPT eShapeType, INT32 &rLineThick,
+    MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, INT32 &rLineThick,
     SvxBoxItem& rBox )
 {
     INT32 nOutsideThick = 0;
@@ -1657,6 +1660,18 @@ INT32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
         break;
     }
 
+    switch( eDashing )
+    {
+        case mso_lineDashGEL:
+            nIdx = WW8_BordersSO::dashed;
+            break;
+        case mso_lineDotGEL:
+            nIdx = WW8_BordersSO::dotted;
+            break;
+        default:
+            break;
+    }
+
     if (WW8_BordersSO::none != nIdx)
     {
         SvxBorderLine aLine;
@@ -1667,6 +1682,7 @@ INT32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
         aLine.SetOutWidth(rBorders.mnOut);
         aLine.SetInWidth (rBorders.mnIn);
         aLine.SetDistance(rBorders.mnDist);
+        aLine.SetStyle( rBorders.mnType );
 
         for(USHORT nLine = 0; nLine < 4; ++nLine)
             rBox.SetLine(new SvxBorderLine( aLine ), nLine);
@@ -1678,7 +1694,7 @@ INT32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
 #define WW8ITEMVALUE(ItemSet,Id,Cast)  ((const Cast&)(ItemSet).Get(Id)).GetValue()
 
 void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
-    SfxItemSet& rFlySet, MSO_LineStyle eLineStyle, MSO_SPT eShapeType,
+    SfxItemSet& rFlySet, MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType,
     Rectangle& rInnerDist )
 {
 /*
@@ -1740,7 +1756,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
             nLineThick = 15; // WW-default: 0.75 pt
 
         nOutside = MatchSdrBoxIntoFlyBoxItem(aLineColor, eLineStyle,
-            eShapeType, nLineThick, aBox);
+            eDashing, eShapeType, nLineThick, aBox);
     }
 
     rInnerDist.Left()+=nLineThick;
@@ -3008,7 +3024,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
         rFlySet.Put(aFrmSize);
 
         MatchSdrItemsIntoFlySet( rpObject, rFlySet, pRecord->eLineStyle,
-            pRecord->eShapeType, aInnerDist );
+            pRecord->eLineDashing, pRecord->eShapeType, aInnerDist );
 
 
         SdrTextObj *pSdrTextObj = PTR_CAST(SdrTextObj, rpObject);
@@ -3133,7 +3149,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObject,
         Rectangle aInnerDist(0, 0, 0, 0);
 
         MatchSdrItemsIntoFlySet(rpObject, rFlySet, pRecord->eLineStyle,
-            pRecord->eShapeType, aInnerDist);
+            pRecord->eLineDashing, pRecord->eShapeType, aInnerDist);
 
         MatchEscherMirrorIntoFlySet(*pRecord, aGrSet);
     }
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 0c7f6a9..098a840 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -633,8 +633,8 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
                         pRecord->nDyTextBottom  );
 
                     MatchSdrItemsIntoFlySet( pObject, aAttrSet,
-                        pRecord->eLineStyle, pRecord->eShapeType,
-                        aInnerDist );
+                        pRecord->eLineStyle, pRecord->eLineDashing,
+                        pRecord->eShapeType, aInnerDist );
 
                     //Groesse aus der WinWord PIC-Struktur als
                     //Grafik-Groesse nehmen
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 1aa44d5..6bf1b0b 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -733,6 +733,8 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
                                                     DFF_Prop_lineStyle,
                                                     mso_lineSimple )
                               : (MSO_LineStyle)USHRT_MAX;
+        pImpRec->eLineDashing = (MSO_LineDashing)GetPropertyValue(
+                                        DFF_Prop_lineDashing, mso_lineSolid );
 
         pImpRec->nFlags = rObjData.nSpFlags;
 
@@ -3385,7 +3387,7 @@ void wwSectionManager::SetSegmentToPageDesc(const wwSection &rSection,
             {
                 SfxItemSet aSet(rFmt.GetAttrSet());
                 mrReader.MatchSdrItemsIntoFlySet(pObject, aSet, mso_lineSimple,
-                                                 mso_sptRectangle, aRect);
+                                                 mso_lineSolid, mso_sptRectangle, aRect);
                 rFmt.SetFmtAttr(aSet.Get(RES_BACKGROUND));
             }
         }
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 94ac4dd..7123e69 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1196,10 +1196,10 @@ private:
     void SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) const;
 
     INT32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor,
-        MSO_LineStyle eLineStyle, MSO_SPT eShapeType, INT32 &rLineWidth,
+        MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, INT32 &rLineWidth,
         SvxBoxItem& rBox );
     void MatchSdrItemsIntoFlySet( SdrObject*    pSdrObj, SfxItemSet &aFlySet,
-        MSO_LineStyle eLineStyle, MSO_SPT eShapeType, Rectangle &rInnerDist );
+        MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, Rectangle &rInnerDist );
     void AdjustLRWrapForWordMargins(const SvxMSDffImportRec &rRecord,
         SvxLRSpaceItem &rLR);
     void AdjustULWrapForWordMargins(const SvxMSDffImportRec &rRecord,
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 9d0f9b0..90ff9ce 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1325,13 +1325,17 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCo
     // object size
     switch (nIdx)
     {
+        case  6:
+            eCodeIdx = WW8_BordersSO::dotted;
+            break;
+        case  7:
+            eCodeIdx = WW8_BordersSO::dashed;
+            break;
         // First the single lines
         case  1:
         case  2:
         case  5:
         // and the unsupported special cases which we map to a single line
-        case  6:
-        case  7:
         case  8:
         case  9:
         case 22:
@@ -1456,6 +1460,7 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCo
     aLine.SetOutWidth(rBorders.mnOut);
     aLine.SetInWidth(rBorders.mnIn);
     aLine.SetDistance(rBorders.mnDist);
+    aLine.SetStyle( rBorders.mnType );
 
     //No AUTO for borders as yet, so if AUTO, use BLACK
     if (nCol == 0)
@@ -1574,7 +1579,7 @@ bool SwWW8ImplReader::SetShadow(SvxShadowItem& rShadow, const short *pSizeArray,
     const WW8_BRC *pbrc) const
 {
     bool bRet = (
-                ( bVer67 ? (pbrc[WW8_RIGHT].aBits1[ 1 ] & 0x20 )
+                ( bVer67 ? (pbrc[WW8_RIGHT].aBits1[ 0 ] & 0x20 )
                          : (pbrc[WW8_RIGHT].aBits2[ 1 ] & 0x20 ) )
                 && (pSizeArray && pSizeArray[WW8_RIGHT])
                 );
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 66db95e..26d4004 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -1286,8 +1286,8 @@ short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
         //Dashed/Dotted unsets double/thick
         if (nMSTotalWidth > 5)
         {
+            nIdx = nMSTotalWidth;
             nMSTotalWidth=1;
-            nIdx = 1;
         }
         nMSTotalWidth = nMSTotalWidth * nIdx * 15;
     }
diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx
index 4073322..99a416f 100644
--- a/sw/source/filter/ww8/ww8struc.hxx
+++ b/sw/source/filter/ww8/ww8struc.hxx
@@ -34,6 +34,8 @@
 #include <tools/string.hxx>
 #include <sal/config.h>
 
+#include <editeng/borderline.hxx>
+
 #if defined  OSL_BIGENDIAN || SAL_TYPES_ALIGNMENT4 > 2 || defined UNX
 #   define __WW8_NEEDS_COPY
 #endif
@@ -289,12 +291,14 @@ public:
     USHORT mnOut;
     USHORT mnIn;
     USHORT mnDist;
+    SvxBorderStyle mnType;
 public:
     enum eBorderCode
     {
         single0, single1, single2, single3, single4, single5,
         double0, double1, double2, double3, double4, double5, double6,
         double7, double8, double9, double10,
+        dashed, dotted,
         none
     };
     static const WW8_BordersSO &Get0x01LineMatch(eBorderCode nIdx);
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index a3aa39d..7f4f29f 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -693,8 +693,18 @@ sal_Bool SvXMLExportItemMapper::QueryXMLValue(
                             nWidth += pLine->GetInWidth();
                         }
 
-                        enum XMLTokenEnum eStyle =
-                            (0 == nDistance) ? XML_SOLID : XML_DOUBLE;
+                        enum XMLTokenEnum eStyle = XML_SOLID;
+                        switch ( pLine->GetStyle( ) )
+                        {
+                            case DOTTED:
+                               eStyle = XML_DOTTED;
+                               break;
+                            case DASHED:
+                               eStyle = XML_DASHED;
+                               break;
+                            default:
+                            eStyle = (0 == nDistance) ? XML_SOLID : XML_DOUBLE;
+                        }
 
                         rUnitConverter.convertMeasure( aOut, nWidth );
                         aOut.append( sal_Unicode( ' ' ) );
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index 7b9f616..bd4d6b6 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -53,6 +53,8 @@ using namespace ::com::sun::star;
 #define SVX_XML_BORDER_STYLE_NONE 0
 #define SVX_XML_BORDER_STYLE_SOLID 1
 #define SVX_XML_BORDER_STYLE_DOUBLE 2
+#define SVX_XML_BORDER_STYLE_DOTTED 3
+#define SVX_XML_BORDER_STYLE_DASHED 4
 
 #define SVX_XML_BORDER_WIDTH_THIN 0
 #define SVX_XML_BORDER_WIDTH_MIDDLE 1
@@ -65,8 +67,8 @@ const struct SvXMLEnumMapEntry psXML_BorderStyles[] =
     { XML_HIDDEN,     SVX_XML_BORDER_STYLE_NONE },
     { XML_SOLID,      SVX_XML_BORDER_STYLE_SOLID },
     { XML_DOUBLE,     SVX_XML_BORDER_STYLE_DOUBLE },
-    { XML_DOTTED,     SVX_XML_BORDER_STYLE_SOLID },
-    { XML_DASHED,     SVX_XML_BORDER_STYLE_SOLID },
+    { XML_DOTTED,     SVX_XML_BORDER_STYLE_DOTTED },
+    { XML_DASHED,     SVX_XML_BORDER_STYLE_DASHED },
     { XML_GROOVE,     SVX_XML_BORDER_STYLE_SOLID },
     { XML_RIDGE,      SVX_XML_BORDER_STYLE_SOLID },
     { XML_INSET,      SVX_XML_BORDER_STYLE_SOLID },
@@ -177,6 +179,23 @@ sal_Bool lcl_frmitems_parseXMLBorder( const OUString& rValue,
     return rHasStyle || rHasWidth || rHasColor;
 }
 
+void lcl_frmitems_setXMLBorderStyle( SvxBorderLine& rLine, sal_uInt16 nStyle )
+{
+    SvxBorderStyle eStyle = SOLID;
+    switch ( nStyle )
+    {
+        case SVX_XML_BORDER_STYLE_DOTTED:
+            eStyle = DOTTED;
+            break;
+        case SVX_XML_BORDER_STYLE_DASHED:
+            eStyle = DASHED;
+            break;
+        default:
+            eStyle = SOLID;
+    }
+    rLine.SetStyle( eStyle );
+}
+
 void lcl_frmitems_setXMLBorderWidth( SvxBorderLine& rLine,
                                      sal_uInt16 nOutWidth, sal_uInt16 nInWidth,
                                      sal_uInt16 nDistance )
@@ -264,7 +283,6 @@ sal_Bool lcl_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
            rpLine->SetOutWidth( aWidths[nNWidth+1] );
            rpLine->SetInWidth( aWidths[nNWidth+2] );
            rpLine->SetDistance( aWidths[nNWidth+3] );
-
        }
        else
        {
@@ -274,6 +292,7 @@ sal_Bool lcl_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
 
            lcl_frmitems_setXMLBorderWidth( *rpLine, nWidth, bDouble );
        }
+       lcl_frmitems_setXMLBorderStyle( *rpLine, nStyle );
    }
 
     // set color


More information about the ooo-build-commit mailing list