summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTibor Nagy <nagy.tibor2@nisz.hu>2021-03-12 11:35:53 +0100
committerAndras Timar <andras.timar@collabora.com>2021-03-31 10:45:42 +0200
commit3f358583f87be5b2d6b238ed30cca61c3601e0ef (patch)
tree48e70178e80c44dfee67ec77412768902227aab9 /oox
parent292c17071a10424646da8fc0a7de7eccba314a1d (diff)
tdf#137367 PPTX import: fix lost direct hyperlink colors
Regression from commit 92f74f6ccb5a55807724db85815f7ea0c49370e0 (bnc#887230: always use theme color for hyperlinks in Impress) Testing: direct color of the first text line is theme based (a:rPr/a:solidFill/a:schemeClr), the second line contains a direct color (a:rPr/a:solidFill/a:srgbClr), the third one contains a theme based direct color darkened by 25.000% (val=75000 of a:rPr/a:solidFill/a:schemeClr/a:lumMod). Note: overwriting default theme based hyperlink colors is also supported by Google Docs, Office 365 and MS Office 2019. Change-Id: I1e3e78fac729a97f42c8dddcffd877a16383adbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112377 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit f35e0b2cbfd6e7150aeb5699e1db1d7c13fdb935) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113290 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/hyperlinkcontext.cxx3
-rw-r--r--oox/source/drawingml/textrun.cxx4
2 files changed, 5 insertions, 2 deletions
diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx
index d0a09b140dcf..267216ff7500 100644
--- a/oox/source/drawingml/hyperlinkcontext.cxx
+++ b/oox/source/drawingml/hyperlinkcontext.cxx
@@ -150,7 +150,8 @@ ContextHandlerRef HyperLinkContext::onCreateContext(
switch( aElement )
{
case A_TOKEN( extLst ):
- return nullptr;
+ maProperties.setProperty(PROP_CharColor, XML_fillcolor);
+ break;
case A_TOKEN( snd ):
// TODO use getEmbeddedWAVAudioFile() here
break;
diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx
index 8b34fd99082e..ab87fb732141 100644
--- a/oox/source/drawingml/textrun.cxx
+++ b/oox/source/drawingml/textrun.cxx
@@ -148,7 +148,9 @@ sal_Int32 TextRun::insertAt(
xTextFieldCursor->gotoEnd( true );
- aTextCharacterProps.maFillProperties.maFillColor.setSchemeClr( XML_hlink );
+ if (!maTextCharacterProperties.maHyperlinkPropertyMap.hasProperty(PROP_CharColor))
+ aTextCharacterProps.maFillProperties.maFillColor.setSchemeClr(XML_hlink);
+
aTextCharacterProps.maFillProperties.moFillType.set(XML_solidFill);
if ( !maTextCharacterProperties.moUnderline.has() )
aTextCharacterProps.moUnderline.set( XML_sng );