summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/items/textitem.cxx3
-rw-r--r--sw/qa/extras/ooxmlexport/data/test_tdf120412.docxbin0 -> 11820 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport10.cxx11
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx2
4 files changed, 15 insertions, 1 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 13c5c04ffbbe..e4ce386c68c9 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1782,7 +1782,8 @@ bool SvxEscapementItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
case MID_ESC:
{
sal_Int16 nVal = sal_Int16();
- if( (rVal >>= nVal) && (std::abs(nVal) <= 101))
+ // tdf#120412 up to 14400% (eg. 1584 pt with 11 pt letters)
+ if( (rVal >>= nVal) && (std::abs(nVal) <= 14400))
nEsc = nVal;
else
return false;
diff --git a/sw/qa/extras/ooxmlexport/data/test_tdf120412.docx b/sw/qa/extras/ooxmlexport/data/test_tdf120412.docx
new file mode 100644
index 000000000000..6ce527842c9b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test_tdf120412.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 3b1250f11fd9..9cb85a8d11f0 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -203,6 +203,17 @@ DECLARE_OOXMLEXPORT_TEST(textboxWpgOnly, "textbox-wpg-only.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(100), getProperty<sal_Int32>(getRun(getParagraphOfText(1, xText), 1), "CharEscapementHeight"));
}
+DECLARE_OOXMLEXPORT_TEST(testFontEsc, "test_tdf120412.docx")
+{
+ xmlDocPtr pXmlDoc =parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ // don't lose the run with superscript formatting
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r", 2);
+ // raising is greater, than 100%
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:rPr/w:position","val", "24");
+}
+
DECLARE_OOXMLEXPORT_TEST(testMceWpg, "mce-wpg.docx")
{
// Make sure that we read the primary branch, if wpg is requested as a feature.
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index cc7b7c720e05..6276d56a1b01 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2839,6 +2839,8 @@ void DomainMapper::processDeferredCharacterProperties( const std::map< sal_Int32
nEscapement = ( nIntValue > 0 ) ? 58: -58;
}
}
+ // tdf#120412 up to 14400% (eg. 1584 pt with 11 pt letters)
+ if( nEscapement > 14400 ) nEscapement = 14400;
rContext->Insert(PROP_CHAR_ESCAPEMENT, uno::makeAny( nEscapement ) );
rContext->Insert(PROP_CHAR_ESCAPEMENT_HEIGHT, uno::makeAny( nProp ) );
}