Bugzilla – Attachment 160379 Details for
Bug 98396
table properties > disabling table split: emulation not working in .doc and .docx format
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
tdf98396_proof_of_concept.patch: export table-nosplit to rows for DOC/DOCX/RTF
tdf98396_proof_of_concept.patch (text/plain), 4.41 KB, created by
Justin L
on 2020-05-05 13:33:27 UTC
(
hide
)
Description:
tdf98396_proof_of_concept.patch: export table-nosplit to rows for DOC/DOCX/RTF
Filename:
MIME Type:
Creator:
Justin L
Created:
2020-05-05 13:33:27 UTC
Size:
4.41 KB
patch
obsolete
>diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx >index 7c54e7e6010c..1c9ab58340d0 100644 >--- a/sw/source/filter/ww8/docxattributeoutput.cxx >+++ b/sw/source/filter/ww8/docxattributeoutput.cxx >@@ -102,6 +102,7 @@ > #include <docufld.hxx> > #include <authfld.hxx> > #include <flddropdown.hxx> >+#include <fmtlsplt.hxx> > #include <fmtclds.hxx> > #include <fmtinfmt.hxx> > #include <fmtrowsplt.hxx> >@@ -4364,6 +4365,10 @@ void DocxAttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTa > > void DocxAttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) > { >+ const SwTable * pTable = pTableTextNodeInfoInner->getTable(); >+ const SwFrameFormat * pFrameFormat = pTable->GetFrameFormat(); >+ const SwFormatLayoutSplit& rTableSplittable = pFrameFormat->GetLayoutSplit(); >+ > const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); > const SwTableLine * pTabLine = pTabBox->GetUpper(); > const SwFrameFormat * pLineFormat = pTabLine->GetFrameFormat(); >@@ -4371,7 +4376,7 @@ void DocxAttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t p > const SwFormatRowSplit& rSplittable = pLineFormat->GetRowSplit( ); > // if rSplittable is true then no need to write <w:cantSplit w:val="false"/> > // as default row prop is allow row to break across page. >- if( !rSplittable.GetValue( ) ) >+ if( !rSplittable.GetValue( ) || !rTableSplittable.GetValue() ) > m_pSerializer->singleElementNS(XML_w, XML_cantSplit, FSNS(XML_w, XML_val), "true"); > } > >diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx >index bfbb71a23f84..e75f4bd40711 100644 >--- a/sw/source/filter/ww8/rtfattributeoutput.cxx >+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx >@@ -70,6 +70,7 @@ > #include <svx/xflgrit.hxx> > #include <docufld.hxx> > #include <fmtclds.hxx> >+#include <fmtlsplt.hxx> > #include <fmtrowsplt.hxx> > #include <fmtline.hxx> > #include <fmtanchr.hxx> >@@ -844,13 +845,17 @@ void RtfAttributeOutput::TableHeight(ww8::WW8TableNodeInfoInner::Pointer_t pTabl > void RtfAttributeOutput::TableCanSplit( > ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) > { >+ const SwTable * pTable = pTableTextNodeInfoInner->getTable(); >+ const SwFrameFormat * pFrameFormat = pTable->GetFrameFormat(); >+ const SwFormatLayoutSplit& rTableSplittable = pFrameFormat->GetLayoutSplit(); >+ > const SwTableBox* pTabBox = pTableTextNodeInfoInner->getTableBox(); > const SwTableLine* pTabLine = pTabBox->GetUpper(); > const SwFrameFormat* pLineFormat = pTabLine->GetFrameFormat(); > const SwFormatRowSplit& rSplittable = pLineFormat->GetRowSplit(); > > // The rtf default is to allow a row to break >- if (!rSplittable.GetValue()) >+ if (!rSplittable.GetValue() || !rTableSplittable.GetValue()) > m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_TRKEEP); > } > >diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx >index 42859e7a481e..2d6d13d1d7fa 100644 >--- a/sw/source/filter/ww8/wrtww8.cxx >+++ b/sw/source/filter/ww8/wrtww8.cxx >@@ -50,6 +50,7 @@ > #include <swrect.hxx> > #include <swtblfmt.hxx> > #include <fmtcntnt.hxx> >+#include <fmtlsplt.hxx> > #include <fmtpdsc.hxx> > #include <fmtrowsplt.hxx> > #include <frmatr.hxx> >@@ -2152,6 +2153,10 @@ void WW8AttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_ > > void WW8AttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) > { >+ const SwTable * pTable = pTableTextNodeInfoInner->getTable(); >+ const SwFrameFormat * pFrameFormat = pTable->GetFrameFormat(); >+ const SwFormatLayoutSplit& rTableSplittable = pFrameFormat->GetLayoutSplit(); >+ > const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); > const SwTableLine * pTabLine = pTabBox->GetUpper(); > const SwFrameFormat * pLineFormat = pTabLine->GetFrameFormat(); >@@ -2163,7 +2168,7 @@ void WW8AttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pT > */ > > const SwFormatRowSplit& rSplittable = pLineFormat->GetRowSplit(); >- sal_uInt8 nCantSplit = (!rSplittable.GetValue()) ? 1 : 0; >+ const sal_uInt8 nCantSplit = (!rSplittable.GetValue() || !rTableSplittable.GetValue()) ? 1 : 0; > m_rWW8Export.InsUInt16( NS_sprm::sprmTFCantSplit ); > m_rWW8Export.pO->push_back( nCantSplit ); > m_rWW8Export.InsUInt16( NS_sprm::sprmTFCantSplit90 ); // also write fCantSplit90
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 98396
:
123333
|
123350
|
125107
|
126570
|
126571
|
126572
|
160377
| 160379