summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorSzabolcs <szabolcs450@gmail.com>2020-04-01 09:17:17 +0200
committerLászló Németh <nemeth@numbertext.org>2020-04-02 14:47:28 +0200
commit63860b3652ade32bee1902b02f2da51a52e60bea (patch)
tree7890056eecdcf9a04d53034f5e7c3d3a7f8c4254 /oox
parent009db597027890ade07d31674c740ae0fc432f87 (diff)
tdf#123351 DOCX DrawingML shape import: fix missing underline
in shape texts. Handling of 18 underline types in DrawingML shape objects, i.e. in grouped shapes did not exist. Note: Underline type "words" imported as "single" temporarily. Also testing of dashLong is missing, because it is exported as dashLongHeavy in DOCX. Co-Authors: Balázs Regényi, Tibor Nagy Change-Id: I620d919da6b85eaed211e5cbdd5c1a55e60436d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91461 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/textcharacterpropertiescontext.cxx40
1 files changed, 40 insertions, 0 deletions
diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index a126c258cd11..b7bb876044cf 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -162,6 +162,46 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl
mrTextCharacterProperties.maAsianThemeFont.setAttributes(rAttribs.getString(W_TOKEN(eastAsiaTheme), OUString()));
}
break;
+ case W_TOKEN( u ):
+ {
+ // If you add here, check if it is in drawingmltypes.cxx 113.
+ auto attrib = rAttribs.getString(W_TOKEN( val ), OUString());
+ if (attrib == "single" || attrib == "words") // TODO: implement words properly. Now it is a single line.
+ mrTextCharacterProperties.moUnderline = XML_sng;
+ else if (attrib == "wavyHeavy")
+ mrTextCharacterProperties.moUnderline = XML_wavyHeavy;
+ else if (attrib == "wavyDouble")
+ mrTextCharacterProperties.moUnderline = XML_wavyDbl;
+ else if (attrib == "wave")
+ mrTextCharacterProperties.moUnderline = XML_wavy;
+ else if (attrib == "thick")
+ mrTextCharacterProperties.moUnderline = XML_heavy;
+ else if (attrib == "dottedHeavy")
+ mrTextCharacterProperties.moUnderline = XML_dottedHeavy;
+ else if (attrib == "dotted")
+ mrTextCharacterProperties.moUnderline = XML_dotted;
+ else if (attrib == "dashDotDotHeavy")
+ mrTextCharacterProperties.moUnderline = XML_dotDotDashHeavy;
+ else if (attrib == "dotDotDash")
+ mrTextCharacterProperties.moUnderline = XML_dotDotDash;
+ else if (attrib == "dashDotHeavy")
+ mrTextCharacterProperties.moUnderline = XML_dotDashHeavy;
+ else if (attrib == "dotDash")
+ mrTextCharacterProperties.moUnderline = XML_dotDash;
+ else if (attrib == "double")
+ mrTextCharacterProperties.moUnderline = XML_dbl;
+ else if (attrib == "dashLongHeavy")
+ mrTextCharacterProperties.moUnderline = XML_dashLongHeavy;
+ else if (attrib == "dashLong")
+ mrTextCharacterProperties.moUnderline = XML_dashLong;
+ else if (attrib == "dashedHeavy")
+ mrTextCharacterProperties.moUnderline = XML_dashHeavy;
+ else if (attrib == "dash")
+ mrTextCharacterProperties.moUnderline = XML_dash;
+ else if (attrib == "none")
+ mrTextCharacterProperties.moUnderline = XML_none;
+ break;
+ }
case W_TOKEN( b ):
mrTextCharacterProperties.moBold = rAttribs.getBool(W_TOKEN( val ), true);
break;