diff options
-rw-r--r-- | sw/qa/extras/odfexport/data/tdf128504.docx | bin | 0 -> 3969 bytes | |||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 7 |
4 files changed, 18 insertions, 3 deletions
diff --git a/sw/qa/extras/odfexport/data/tdf128504.docx b/sw/qa/extras/odfexport/data/tdf128504.docx Binary files differnew file mode 100644 index 000000000000..2e6e5225b88c --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf128504.docx diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index a59c5dc3298f..0334a73debca 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -2297,5 +2297,15 @@ DECLARE_ODFEXPORT_TEST(tdf99631, "tdf99631.docx") assertXPathContent(pXmlDoc2, "//config:config-item[@config:name='VisibleAreaHeight']", "1354"); } +DECLARE_ODFEXPORT_TEST(tdf128504, "tdf128504.docx") +{ + uno::Reference<text::XTextRange> xPara = getParagraph(6); + uno::Reference<beans::XPropertySet> xRun(getRun(xPara,1), uno::UNO_QUERY); + OUString unVisitedStyleName = getProperty<OUString>(xRun, "UnvisitedCharStyleName"); + CPPUNIT_ASSERT(!unVisitedStyleName.equalsIgnoreAsciiCase("Internet Link")); + OUString visitedStyleName = getProperty<OUString>(xRun, "VisitedCharStyleName"); + CPPUNIT_ASSERT(!visitedStyleName.equalsIgnoreAsciiCase("Visited Internet Link")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 60b5c7cc6f24..3c2c614bf096 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7220,8 +7220,8 @@ void DocxAttributeOutput::CharHighlight( const SvxBrushItem& rHighlight ) void DocxAttributeOutput::TextINetFormat( const SwFormatINetFormat& rLink ) { OString aStyleId = MSWordStyles::CreateStyleId(rLink.GetINetFormat()); - - m_pSerializer->singleElementNS(XML_w, XML_rStyle, FSNS(XML_w, XML_val), aStyleId); + if (!aStyleId.isEmpty() && !aStyleId.equalsIgnoreAsciiCase("DefaultStyle")) + m_pSerializer->singleElementNS(XML_w, XML_rStyle, FSNS(XML_w, XML_val), aStyleId); } void DocxAttributeOutput::TextCharFormat( const SwFormatCharFormat& rCharFormat ) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index dd573bd25e42..732099649ae4 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -5635,7 +5635,12 @@ void DomainMapper_Impl::PopFieldContext() OUString charStyle; if (css::uno::fromAny(aAny, &charStyle)) { - if(!charStyle.isEmpty() && charStyle.equalsIgnoreAsciiCase("Internet Link")) + if (charStyle.isEmpty()) + { + xCrsrProperties->setPropertyValue("VisitedCharStyleName", uno::makeAny(OUString("Default Style"))); + xCrsrProperties->setPropertyValue("UnvisitedCharStyleName", uno::makeAny(OUString("Default Style"))); + } + else if (charStyle.equalsIgnoreAsciiCase("Internet Link")) { xCrsrProperties->setPropertyValue("CharStyleName", uno::makeAny(OUString("Default Style"))); } |