summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2023-11-06 13:05:47 +0300
committerMiklos Vajna <vmiklos@collabora.com>2023-11-07 14:59:46 +0100
commitb6a7d8201bdb6c28e18472326b2328507a6b1e4e (patch)
tree8dbf6e3b5faf7a9b16a0aff06c03fa3cf5bbe090
parent518df6a3bd6aa251dc4ad30ab3d04545513ae5c6 (diff)
tdf#158083: RTF: drop export for \pgdsctbl
This table is not standard extension to RTF format. It is not described in RTF specification and even is not used by Writer on import these days. Change-Id: I52f27dfd30877d461ad535b7847f40dd4c6f4ea5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158986 Tested-by: Jenkins Tested-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--editeng/source/editeng/eertfpar.cxx1
-rw-r--r--include/svtools/rtfkeywd.hxx1
-rw-r--r--include/svtools/rtftoken.h1
-rw-r--r--svtools/source/svrtf/rtfkeywd.cxx1
-rw-r--r--sw/source/core/doc/docfmt.cxx6
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx48
-rw-r--r--sw/source/filter/ww8/rtfexport.hxx2
7 files changed, 2 insertions, 58 deletions
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index a5737b4c923a..948216f33dbe 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -203,7 +203,6 @@ void EditRTFParser::NextToken( int nToken )
SkipGroup();
}
break;
- case RTF_PGDSCTBL: // #i29453# ignore \*\pgdsctbl destination
case RTF_LISTTEXT:
{
SkipGroup();
diff --git a/include/svtools/rtfkeywd.hxx b/include/svtools/rtfkeywd.hxx
index fa6346922437..44bbd12a4454 100644
--- a/include/svtools/rtfkeywd.hxx
+++ b/include/svtools/rtfkeywd.hxx
@@ -1110,7 +1110,6 @@
#define OOO_STRING_SVTOOLS_RTF_SHDWSTYLE "\\shdwstyle"
#define OOO_STRING_SVTOOLS_RTF_SHDWCOL "\\shdwcol"
#define OOO_STRING_SVTOOLS_RTF_SHDWFCOL "\\shdwfcol"
-#define OOO_STRING_SVTOOLS_RTF_PGDSCTBL "\\pgdsctbl"
#define OOO_STRING_SVTOOLS_RTF_PGDSC "\\pgdsc"
#define OOO_STRING_SVTOOLS_RTF_PGDSCUSE "\\pgdscuse"
#define OOO_STRING_SVTOOLS_RTF_PGDSCNXT "\\pgdscnxt"
diff --git a/include/svtools/rtftoken.h b/include/svtools/rtftoken.h
index f530c8e5ba33..ab637a4e1fb8 100644
--- a/include/svtools/rtftoken.h
+++ b/include/svtools/rtftoken.h
@@ -1234,7 +1234,6 @@ enum RTF_TOKEN_IDS {
RTF_SHDW_STYLE,
RTF_SHDW_COL,
RTF_SHDW_FCOL,
- RTF_PGDSCTBL,
RTF_PGDSC,
RTF_PGDSCUSE,
RTF_PGDSCNXT,
diff --git a/svtools/source/svrtf/rtfkeywd.cxx b/svtools/source/svrtf/rtfkeywd.cxx
index e805b3cd9359..91f2669ea98d 100644
--- a/svtools/source/svrtf/rtfkeywd.cxx
+++ b/svtools/source/svrtf/rtfkeywd.cxx
@@ -1120,7 +1120,6 @@ static RTF_TokenEntry aRTFTokenTab[] = {
{std::u16string_view(u"" OOO_STRING_SVTOOLS_RTF_FLYINPARA), RTF_FLY_INPARA},
- {std::u16string_view(u"" OOO_STRING_SVTOOLS_RTF_PGDSCTBL), RTF_PGDSCTBL},
{std::u16string_view(u"" OOO_STRING_SVTOOLS_RTF_PGDSC), RTF_PGDSC},
{std::u16string_view(u"" OOO_STRING_SVTOOLS_RTF_PGDSCUSE), RTF_PGDSCUSE},
{std::u16string_view(u"" OOO_STRING_SVTOOLS_RTF_PGDSCNXT), RTF_PGDSCNXT},
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index edacd4455b70..c7deb91478b9 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1562,12 +1562,10 @@ void SwDoc::ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles )
&SwDoc::MakeTextFormatColl_, *mpDfltTextFormatColl );
//To-Do:
- // a) in rtf export don't export our hideous pgdsctbl
- // extension to rtf anymore
- // b) in sd rtf import (View::InsertData) don't use
+ // a) in sd rtf import (View::InsertData) don't use
// a super-fragile test for mere presence of \trowd to
// indicate import of rtf into a table
- // c) then drop use of bIncludePageStyles
+ // b) then drop use of bIncludePageStyles
if (bIncludePageStyles)
{
// and now the page templates
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 278e9c271e0e..616533b4dd5a 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -729,51 +729,6 @@ void RtfExport::WriteDocVars()
}
}
-void RtfExport::WritePageDescTable()
-{
- // Write page descriptions (page styles)
- std::size_t nSize = m_rDoc.GetPageDescCnt();
- if (!nSize)
- return;
-
- Strm().WriteOString(SAL_NEWLINE_STRING);
- m_bOutPageDescs = true;
- Strm()
- .WriteChar('{')
- .WriteOString(OOO_STRING_SVTOOLS_RTF_IGNORE)
- .WriteOString(OOO_STRING_SVTOOLS_RTF_PGDSCTBL);
- for (std::size_t n = 0; n < nSize; ++n)
- {
- const SwPageDesc& rPageDesc = m_rDoc.GetPageDesc(n);
-
- Strm()
- .WriteOString(SAL_NEWLINE_STRING)
- .WriteChar('{')
- .WriteOString(OOO_STRING_SVTOOLS_RTF_PGDSC);
- Strm().WriteNumberAsString(n).WriteOString(OOO_STRING_SVTOOLS_RTF_PGDSCUSE);
- Strm().WriteNumberAsString(static_cast<sal_uLong>(rPageDesc.ReadUseOn()));
-
- OutPageDescription(rPageDesc, false);
-
- // search for the next page description
- std::size_t i = nSize;
- while (i)
- if (rPageDesc.GetFollow() == &m_rDoc.GetPageDesc(--i))
- break;
- Strm().WriteOString(OOO_STRING_SVTOOLS_RTF_PGDSCNXT);
- Strm().WriteNumberAsString(i).WriteChar(' ');
- Strm()
- .WriteOString(msfilter::rtfutil::OutString(rPageDesc.GetName(), m_eDefaultEncoding))
- .WriteOString(";}");
- }
- Strm().WriteChar('}').WriteOString(SAL_NEWLINE_STRING);
- m_bOutPageDescs = false;
-
- // reset table infos, otherwise the depth of the cells will be incorrect,
- // in case the page style (header or footer) had tables
- m_pTableInfo = std::make_shared<ww8::WW8TableInfo>();
-}
-
ErrCode RtfExport::ExportDocument_Impl()
{
// Make the header
@@ -838,9 +793,6 @@ ErrCode RtfExport::ExportDocument_Impl()
// Init sections
m_pSections = std::make_unique<MSWordSections>(*this);
- // Page description
- WritePageDescTable();
-
// Enable form protection by default if needed, as there is no switch to
// enable it on a per-section basis. OTOH don't always enable it as it
// breaks moving of drawings - so write it only in case there is really a
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index 6098ad912e66..11f3f0471f23 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -216,8 +216,6 @@ private:
void WriteUserProps();
/// Writes document variables
void WriteDocVars();
- /// Writes the writer-specific \pgdsctbl group.
- void WritePageDescTable();
/// This is necessary to have the numbering table ready before the main text is being processed.
void BuildNumbering();
void WriteHeaderFooter(const SfxPoolItem& rItem, bool bHeader);