diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-22 00:27:00 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-22 00:28:30 -0400 |
commit | 9d87d1be6bec99a194cfbb68663c6de7144d65b0 (patch) | |
tree | 7de9fb695635b00ca050a7199e8c3280b91dc05e /sc | |
parent | 21661ebfbec9ea162582bbc7ab46607eb9095f1a (diff) |
Don't forget to export underline attributes.
Change-Id: I72ce0c0cb1c8d461559ad997ad2c88a25d9e8a20
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 7fc109e6e80b..3656f54c64c9 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -1199,6 +1199,37 @@ void ScXMLExport::ExportCellTextAutoStyles(sal_Int32 nTable) aPropStates.push_back(XMLPropertyState(nIndex, aAny)); } break; + case EE_CHAR_UNDERLINE: + { + // Underline attribute needs to export multiple entries. + sal_Int32 nIndexStyle = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, "text-underline-style", 0); + if (nIndexStyle == -1 || nIndexStyle > nEntryCount) + break; + + sal_Int32 nIndexWidth = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, "text-underline-width", 0); + if (nIndexWidth == -1 || nIndexWidth > nEntryCount) + break; + + sal_Int32 nIndexColor = xMapper->FindEntryIndex("CharUnderlineColor", XML_NAMESPACE_STYLE, "text-underline-color"); + if (nIndexColor == -1 || nIndexColor > nEntryCount) + break; + + sal_Int32 nIndexHasColor = xMapper->FindEntryIndex("CharUnderlineHasColor", XML_NAMESPACE_STYLE, "text-underline-color"); + if (nIndexHasColor == -1 || nIndexHasColor > nEntryCount) + break; + + const SvxUnderlineItem* pUL = static_cast<const SvxUnderlineItem*>(p); + pUL->QueryValue(aAny, MID_TL_STYLE); + aPropStates.push_back(XMLPropertyState(nIndexStyle, aAny)); + aPropStates.push_back(XMLPropertyState(nIndexWidth, aAny)); + + pUL->QueryValue(aAny, MID_TL_COLOR); + aPropStates.push_back(XMLPropertyState(nIndexColor, aAny)); + + pUL->QueryValue(aAny, MID_TL_HASCOLOR); + aPropStates.push_back(XMLPropertyState(nIndexHasColor, aAny)); + } + break; case EE_CHAR_OVERLINE: { if (!static_cast<const SvxOverlineItem*>(p)->QueryValue(aAny, pEntry->mnFlag)) |