[Libreoffice-commits] .: 2 commits - sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Thu Oct 7 09:27:00 PDT 2010
sw/source/core/unocore/unoframe.cxx | 1 -
sw/source/core/unocore/unotbl.cxx | 2 +-
sw/source/filter/ww8/rtfattributeoutput.cxx | 22 +++++++++++++++++++---
3 files changed, 20 insertions(+), 5 deletions(-)
New commits:
commit 07f2b6c76f2e4aa2b938570f65c5e12da2047000
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Thu Oct 7 18:25:37 2010 +0200
RTF export: fixed a bug in table export
Paragraph properties need to be reset after the end of a table or the
table may continue on the next paragraphs.
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 50bf4f3..07ea880 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -174,8 +174,24 @@ static OString OutTBLBorderLine(RtfExport &rExport, const SvxBorderLine* pLine,
else
{
// single line
- if( DEF_LINE_WIDTH_1 >= pLine->GetOutWidth() )
- aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRS OOO_STRING_SVTOOLS_RTF_BRDRW).append((sal_Int32)pLine->GetOutWidth());
+ if( DEF_LINE_WIDTH_0 == pLine->GetOutWidth() )
+ aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRHAIR);
+ else if ( 255 >= pLine->GetOutWidth() ) // That value comes from RTF specs
+ {
+ switch ( pLine->GetStyle( ) )
+ {
+ case DOTTED:
+ aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDOT);
+ break;
+ case DASHED:
+ aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDASH);
+ break;
+ case SOLID:
+ default:
+ aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRS);
+ }
+ aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW).append((sal_Int32)pLine->GetOutWidth());
+ }
else
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTH OOO_STRING_SVTOOLS_RTF_BRDRW).append((sal_Int32)pLine->GetOutWidth() / 2);
}
@@ -942,7 +958,7 @@ void RtfAttributeOutput::EndTableRow( )
m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_NESTROW "}" "{" OOO_STRING_SVTOOLS_RTF_NONESTTABLES OOO_STRING_SVTOOLS_RTF_PAR "}");
}
else
- m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_ROW);
+ m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_ROW).append(OOO_STRING_SVTOOLS_RTF_PARD);
}
void RtfAttributeOutput::EndTable()
commit 4937ffd09630d5796609f9d7614c6febef03a703
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Thu Oct 7 18:24:54 2010 +0200
dotted/dashed borders: some other BorderLine creation removal
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index b392b91..9e47d23 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -66,7 +66,6 @@
#include <unomap.hxx>
#include <unoprnms.hxx>
#include <unoevent.hxx>
-#include <com/sun/star/table/BorderLine.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
#include <com/sun/star/style/GraphicLocation.hpp>
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 7f7d398..e84a660 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -117,7 +117,7 @@ extern void lcl_GetTblBoxColStr( sal_uInt16 nCol, String& rNm );
* --------------------------------------------------*/
table::BorderLine lcl_SvxLineToLine(const SvxBorderLine* pLine)
{
- table::BorderLine aLine;
+ table::BorderLine2 aLine;
if(pLine)
{
aLine.Color = pLine->GetColor().GetColor() ;
More information about the Libreoffice-commits
mailing list