0a6b54b4d3
* docx-brightness-contrast-1.diff * docx-brightness-contrast-2.diff - bnc#875712 - LO-L3: DOC import: picture brigtness/contrast not imported * doc-brightness-contrast.diff - bnc#870240 - LO-L3: pptx import file has text rotated on slide * fix-text-rotation.diff - bnc#870234 - LO-L3: pptx file has text imported as black instead of white * import-gradfill-for-text-colors.diff - bnc#870228 - LO-L3: Text inside the circle is not centered * text-alignment-in-shape.diff - bnc#863021 - LO-L3: Allow setting language for slide or presentation entirely * set-language-in-impress.diff - fix build on openSUSE 12.3: * disable-firebird-unit-test.diff OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=154
76 lines
3.5 KiB
Diff
76 lines
3.5 KiB
Diff
From ce609f477e488e9c701b2bfa893bcf01722d2a01 Mon Sep 17 00:00:00 2001
|
|
From: Muthu Subramanian <sumuthu@collabora.com>
|
|
Date: Fri, 28 Mar 2014 11:54:45 +0000
|
|
Subject: n#870234: Import gradfill for text colors.
|
|
|
|
Uses the first color from the gradfill list.
|
|
(Which is better than plain black!)
|
|
|
|
(cherry picked from commit cfc76de83e3c0a56abd30a8f3bd7c69d3500d223)
|
|
Signed-off-by: Andras Timar <andras.timar@collabora.com>
|
|
|
|
Conflicts:
|
|
oox/source/drawingml/textcharacterproperties.cxx
|
|
oox/source/drawingml/textcharacterpropertiescontext.cxx
|
|
|
|
Change-Id: I4c1c0c4b031f3681c95b75b3c0683eb4de95bffb
|
|
---
|
|
diff --git a/include/oox/drawingml/textcharacterproperties.hxx b/include/oox/drawingml/textcharacterproperties.hxx
|
|
index c079015..d2335e1 100644
|
|
--- a/include/oox/drawingml/textcharacterproperties.hxx
|
|
+++ b/include/oox/drawingml/textcharacterproperties.hxx
|
|
@@ -24,6 +24,7 @@
|
|
#include <oox/helper/propertymap.hxx>
|
|
#include <oox/drawingml/color.hxx>
|
|
#include <oox/drawingml/textfont.hxx>
|
|
+#include <oox/drawingml/fillproperties.hxx>
|
|
|
|
namespace oox { class PropertySet; }
|
|
|
|
@@ -53,6 +54,7 @@ struct TextCharacterProperties
|
|
OptValue< bool > moItalic;
|
|
OptValue< bool > moUnderlineLineFollowText;
|
|
OptValue< bool > moUnderlineFillFollowText;
|
|
+ GradientFillProperties maGradientProps; /// Properties for gradient text colors
|
|
|
|
/** Overwrites all members that are explicitly set in rSourceProps. */
|
|
void assignUsed( const TextCharacterProperties& rSourceProps );
|
|
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx
|
|
index febb28c..a7be42b 100644
|
|
--- a/oox/source/drawingml/textcharacterproperties.cxx
|
|
+++ b/oox/source/drawingml/textcharacterproperties.cxx
|
|
@@ -60,6 +60,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties& rSource
|
|
moItalic.assignIfUsed( rSourceProps.moItalic );
|
|
moUnderlineLineFollowText.assignIfUsed( rSourceProps.moUnderlineLineFollowText );
|
|
moUnderlineFillFollowText.assignIfUsed( rSourceProps.moUnderlineFillFollowText );
|
|
+ maGradientProps.assignUsed( rSourceProps.maGradientProps );
|
|
}
|
|
|
|
void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFilterBase& rFilter, bool bUseOptional ) const
|
|
@@ -93,6 +94,8 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil
|
|
|
|
if( maCharColor.isUsed() )
|
|
rPropMap[ PROP_CharColor ] <<= maCharColor.getColor( rFilter.getGraphicHelper() );
|
|
+ if( maGradientProps.maGradientStops.size() > 0 )
|
|
+ rPropMap[ PROP_CharColor ] <<= maGradientProps.maGradientStops.begin()->second.getColor( rFilter.getGraphicHelper() );
|
|
|
|
if( moLang.has() && !moLang.get().isEmpty() )
|
|
{
|
|
diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx
|
|
index e166e6d..6887cda 100644
|
|
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
|
|
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
|
|
@@ -132,6 +132,10 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl
|
|
case A_TOKEN( hlinkClick ): // CT_Hyperlink
|
|
case A_TOKEN( hlinkMouseOver ): // CT_Hyperlink
|
|
return new HyperLinkContext( *this, rAttribs, mrTextCharacterProperties.maHyperlinkPropertyMap );
|
|
+
|
|
+ case A_TOKEN( gradFill ):
|
|
+ return new GradientFillContext( *this, rAttribs, mrTextCharacterProperties.maGradientProps );
|
|
+
|
|
}
|
|
|
|
return this;
|
|
--
|
|
cgit v0.9.0.2-2-gbebe
|