summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJacobo Aragunde Pérez <jaragunde@igalia.com>2014-01-27 19:46:37 +0100
committerJacobo Aragunde Pérez <jaragunde@igalia.com>2014-01-28 11:00:37 +0100
commit5391d4872e71d1edba7acc4ad2d2e3b5b97e1723 (patch)
tree494d32ae4520eafa5137bd5b03a0b45afe5332c3 /include
parentooxml: Preserve color transformations in shape style definitions (diff)
downloadcore-5391d4872e71d1edba7acc4ad2d2e3b5b97e1723.tar.gz
core-5391d4872e71d1edba7acc4ad2d2e3b5b97e1723.zip
ooxml: Preserve shape style and theme attributes for line
Line style and color can be defined by the shape style attributes or can be directly assigned by the user (and even using a theme color in the case of color attribute). This patch aims to preserve the relevant attributes of this feature after a roundtrip. For style attributes (wps:style/a:lnRef), they are kept and preserved in the "StyleLnRef" property of the shape InteropGrabBag. To be able to access to some of them, the methods getLineStyle, getLineJoint and getLineWidth were added to LineProperties object. For the line theme color (a:ln/a:solidFill/a:schemeClr), the original line color and the theme color name are preserved in the properties "OriginalLnSolidFillClr" and "SpPrLnSolidFillSchemeClr"of the Shape InteropGrabBag. On export time, we must check if the user has changed any properties of the shape line, this is done comparing the new shape attributes with the original values coming from the style and theme definitions. In case some of the attributes is different, the new attribute must be saved overwriting the old one. The data files for some /sd/qa/ unit tests were updated to reflect the new properties inside the Shape InteropGrabBag. Besides, an existing unit test in ooxmlexport was modified to include checks for the preservation of line style, line theme color and custom line style that override the style attributes. Change-Id: Iabb0cef9e3cc433676c201bc296fb7b373839a3f
Diffstat (limited to 'include')
-rw-r--r--include/oox/drawingml/lineproperties.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/oox/drawingml/lineproperties.hxx b/include/oox/drawingml/lineproperties.hxx
index 7cc31a35a77f..2b6494e13cfe 100644
--- a/include/oox/drawingml/lineproperties.hxx
+++ b/include/oox/drawingml/lineproperties.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_OOX_DRAWINGML_LINEPROPERTIES_HXX
#define INCLUDED_OOX_DRAWINGML_LINEPROPERTIES_HXX
+#include <com/sun/star/drawing/LineJoint.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
#include <oox/drawingml/fillproperties.hxx>
namespace oox {
@@ -62,6 +64,13 @@ struct OOX_DLLPUBLIC LineProperties
ShapePropertyMap& rPropMap,
const GraphicHelper& rGraphicHelper,
sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const;
+
+ /** Calculates the line style attribute from the internal state of the object */
+ ::com::sun::star::drawing::LineStyle getLineStyle() const;
+ /** Calculates the line joint attribute from the internal state of the object */
+ ::com::sun::star::drawing::LineJoint getLineJoint() const;
+ /** Calculates the line width attribute from the internal state of the object */
+ sal_Int32 getLineWidth() const;
};
// ============================================================================