summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlimport/data/frame-wrap-auto.docxbin0 -> 10348 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx7
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx14
3 files changed, 16 insertions, 5 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/frame-wrap-auto.docx b/sw/qa/extras/ooxmlimport/data/frame-wrap-auto.docx
new file mode 100644
index 000000000000..6ad7fe059449
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/frame-wrap-auto.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 1492cd9aaa62..e47a20820dfb 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1976,6 +1976,13 @@ DECLARE_OOXMLIMPORT_TEST(testSmartartStrict, "strict-smartart.docx")
CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xGroup->getCount()); // 3 ellipses + 3 arrows
}
+DECLARE_OOXMLIMPORT_TEST(testLibreOfficeHang, "frame-wrap-auto.docx")
+{
+ // fdo#72775
+ // This was text::WrapTextMode_NONE.
+ CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_DYNAMIC, getProperty<text::WrapTextMode>(getShape(1), "Surround"));
+}
+
DECLARE_OOXMLIMPORT_TEST(testI124106, "i124106.docx")
{
// This was 2.
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 435919ec3a62..4c182386f47e 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -733,12 +733,16 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
break;
case NS_ooxml::LN_CT_FramePr_wrap:
{
- //should be either LN_Value_wordprocessingml_ST_Wrap_notBeside or LN_Value_wordprocessingml_ST_Wrap_around
+ //should be either LN_Value_wordprocessingml_ST_Wrap_notBeside or LN_Value_wordprocessingml_ST_Wrap_around or LN_Value_wordprocessingml_ST_Wrap_auto
OSL_ENSURE( sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_Wrap_around ||
- sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_Wrap_notBeside,
- "wrap not around or not_Beside?");
- pParaProperties->SetWrap(sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_Wrap_around ?
- text::WrapTextMode_DYNAMIC : text::WrapTextMode_NONE );
+ sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_Wrap_notBeside ||
+ sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_Wrap_auto,
+ "wrap not around, not_Beside or auto?");
+ if( sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_Wrap_around ||
+ sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_Wrap_auto )
+ pParaProperties->SetWrap ( text::WrapTextMode_DYNAMIC ) ;
+ else
+ pParaProperties->SetWrap ( text::WrapTextMode_NONE ) ;
}
break;
case NS_ooxml::LN_CT_FramePr_w: