summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-04-11 15:41:14 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-04-11 17:41:28 +0200
commitbc3c05f816fbe21c251e4749097914e40d373ddd (patch)
treefa1c2e3462f0085ba06c40a44b528f41e12f0b80 /writerfilter
parent78285ba3e03911ec6481b909b1da18cbb2b5dd58 (diff)
RTF import of new-style frames: implement line color/width
Change-Id: Ice40f1a9532e661ab6f4e3f476e638f2f8f82b72
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 90b8b9e28509..17cb1d8dcb7d 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp>
+#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
#include <com/sun/star/text/SizeType.hpp>
@@ -405,8 +406,23 @@ void RTFSdrImport::resolve(RTFShape& rShape)
if (xPropertySet.is())
{
if (!bTextFrame)
+ {
xPropertySet->setPropertyValue("LineColor", aLineColor);
- xPropertySet->setPropertyValue("LineWidth", aLineWidth);
+ xPropertySet->setPropertyValue("LineWidth", aLineWidth);
+ }
+ else
+ {
+ static OUString aBorders[] = {
+ OUString("TopBorder"), OUString("LeftBorder"), OUString("BottomBorder"), OUString("RightBorder")
+ };
+ for (unsigned int i = 0; i < SAL_N_ELEMENTS(aBorders); ++i)
+ {
+ table::BorderLine2 aBorderLine = xPropertySet->getPropertyValue(aBorders[i]).get<table::BorderLine2>();
+ aBorderLine.Color = aLineColor.get<sal_Int32>();
+ aBorderLine.LineWidth = aLineWidth.get<sal_Int32>();
+ xPropertySet->setPropertyValue(aBorders[i], uno::makeAny(aBorderLine));
+ }
+ }
if (rShape.oZ)
resolveDhgt(xPropertySet, *rShape.oZ);
if (bTextFrame)