summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-11-25 11:55:57 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-11-25 12:28:37 +0100
commita6fe1a5b2806b40edf0d06c8543d35abe5249412 (patch)
treeb1063c205eaff23daa72f2df754ef66b59a39a97 /sw
parentf336d8f8e9e9fdc1cf04c43ab2dbdc74706a3bf5 (diff)
DOCX import: handle NS_sprm::LN_CFSmallCaps == 0 after NS_sprm::LN_CFCaps
"caps and no smallcaps" means style::CaseMap::UPPERCASE, not style::CaseMap::NONE. Different XML elements in DOCX, single UNO property. Change-Id: I8cbc719f2c307d5d2cbd4af93ea61e35b640ad1d
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 06bedcc53690..78b1256823be 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/text/XTextSection.hpp>
+#include <com/sun/star/style/CaseMap.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/style/LineSpacing.hpp>
#include <com/sun/star/style/LineSpacingMode.hpp>
@@ -1389,6 +1390,11 @@ DECLARE_OOXMLEXPORT_TEST(testCalendar1, "calendar1.docx")
DECLARE_OOXMLEXPORT_TEST(testCalendar2, "calendar2.docx")
{
+ // Problem was that CharCaseMap was style::CaseMap::NONE.
+ uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(style::CaseMap::UPPERCASE, getProperty<sal_Int16>(getRun(getParagraphOfText(1, xCell->getText()), 1), "CharCaseMap"));
+
// This paragraph property was missing in table style.
xmlDocPtr pXmlStyles = parseExport("word/styles.xml");
if (!pXmlStyles)