[Libreoffice-commits] core.git: oox/source sw/qa
Miklos Vajna
vmiklos at collabora.co.uk
Wed Dec 4 05:52:47 PST 2013
oox/source/drawingml/textcharacterproperties.cxx | 2 +-
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 798a563db133ebed3876c245459d90ef54ee7c9a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Dec 4 14:30:43 2013 +0100
drawingml import: don't set CharEscapementHeight unconditionally
Commit 840a8573c8cebe67ddd3c9fe106c7dbd789bb334 (Fix fdo#70220
Superscript not imported from pptx., 2013-10-07) made it possible to set
CharEscapementHeight even if moBaseline is not set, but this causes
problems in the docx importer + not necessary, according to the bugdoc;
so just don't do that.
Change-Id: Ib95ac449bd8fdf6376261ddc86108f0d23f2200e
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx
index a8a8806..febb28c 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -116,7 +116,7 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil
rPropMap[ PROP_CharStrikeout ] <<= GetFontStrikeout( moStrikeout.get( XML_noStrike ) );
rPropMap[ PROP_CharCaseMap ] <<= GetCaseMap( moCaseMap.get( XML_none ) );
- if( !bUseOptional || moBaseline.has() ) {
+ if( moBaseline.has() ) {
rPropMap[ PROP_CharEscapement ] <<= sal_Int16(moBaseline.get( 0 ) / 1000);
rPropMap[ PROP_CharEscapementHeight ] <<= sal_Int8(DFLT_ESC_PROP);
}
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 9951ef1..7fc51c6 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1565,6 +1565,11 @@ DECLARE_OOXMLIMPORT_TEST(textboxWpgOnly, "textbox-wpg-only.docx")
// The 3 paragraphs on the rectangles inside the groupshape ended up in the
// body text, make sure we don't have multiple paragraphs there anymore.
CPPUNIT_ASSERT_EQUAL(1, getParagraphs()); // was 4
+
+ // Character escapement was enabled by default, this was 58.
+ uno::Reference<container::XIndexAccess> xGroup(xShape, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(0), uno::UNO_QUERY)->getText();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100), getProperty<sal_Int32>(getRun(getParagraphOfText(1, xText), 1), "CharEscapementHeight"));
}
DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx")
More information about the Libreoffice-commits
mailing list