diff options
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf133370_columnBreak.odt | bin | 0 -> 18388 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport15.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexport.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexport.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.hxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 3 |
6 files changed, 8 insertions, 10 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf133370_columnBreak.odt b/sw/qa/extras/ooxmlexport/data/tdf133370_columnBreak.odt Binary files differnew file mode 100644 index 000000000000..1848638aba66 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf133370_columnBreak.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx index dedad4d00eab..08bbc76883d5 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx @@ -33,6 +33,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf133334_followPgStyle, "tdf133334_followPgStyle.o CPPUNIT_ASSERT_EQUAL(2, getPages()); } +DECLARE_OOXMLEXPORT_TEST(testTdf133370_columnBreak, "tdf133370_columnBreak.odt") +{ + // Since non-DOCX formats ignores column breaks in non-column situtations, don't export to docx. + CPPUNIT_ASSERT_EQUAL(1, getPages()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index 04d29c2f65b9..74336b72d454 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -131,8 +131,6 @@ public: /// Access to the sections/headers/footres. virtual MSWordSections& Sections() const override; - virtual bool SupportsOneColumnBreak() const override { return true; } - virtual bool FieldsQuoted() const override { return true; } virtual bool AddSectionBreaksForTOX() const override { return true; } diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index 77f4244f35f7..0c0d35d1a97f 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -58,8 +58,6 @@ public: /// Access to the Rtf Sdr exporter. RtfSdrExport& SdrExporter() const; - bool SupportsOneColumnBreak() const override { return false; } - bool FieldsQuoted() const override { return true; } bool AddSectionBreaksForTOX() const override { return false; } diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 8c66df7a630a..8753314664ca 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -677,9 +677,6 @@ public: /// Access to the sections/headers/footres. virtual MSWordSections& Sections() const = 0; - /// Determines if column break with one column should be exported or not. - virtual bool SupportsOneColumnBreak() const = 0; - /// Determines if the import filter already quoted fields or not. virtual bool FieldsQuoted() const = 0; @@ -1020,8 +1017,6 @@ public: virtual bool AllowPostponedTextInTable() const override { return false; } - virtual bool SupportsOneColumnBreak() const override { return false; } - virtual bool FieldsQuoted() const override { return false; } virtual bool AddSectionBreaksForTOX() const override { return false; } diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index a9a9151b31bd..4b913d9fa576 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -3867,7 +3867,8 @@ void AttributeOutputBase::FormatBreak( const SvxFormatBreakItem& rBreak ) [[fallthrough]]; case SvxBreak::ColumnAfter: case SvxBreak::ColumnBoth: - if ( GetExport().Sections().CurrentNumberOfColumns( *GetExport().m_pDoc ) > 1 || GetExport().SupportsOneColumnBreak() ) + if ( GetExport().m_pDoc->getIDocumentSettingAccess().get( DocumentSettingId::TREAT_SINGLE_COLUMN_BREAK_AS_PAGE_BREAK ) + || GetExport().Sections().CurrentNumberOfColumns( *GetExport().m_pDoc ) > 1 ) { nC = msword::ColumnBreak; } |