diff options
author | Tibor Nagy <nagy.tibor2@nisz.hu> | 2021-03-12 11:35:53 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-03-29 16:55:57 +0200 |
commit | f35e0b2cbfd6e7150aeb5699e1db1d7c13fdb935 (patch) | |
tree | eee0dec7c9c0495f2d7b1f64e5eb17f4878f2dcf /oox/source | |
parent | 503d9209df268cf3e964eede49b247021a9e17ce (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>
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/drawingml/hyperlinkcontext.cxx | 3 | ||||
-rw-r--r-- | oox/source/drawingml/textrun.cxx | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/oox/source/drawingml/hyperlinkcontext.cxx b/oox/source/drawingml/hyperlinkcontext.cxx index be2336be5ba7..7ea5d5d10b53 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 ); |