Bugzilla – Attachment 164001 Details for
Bug 134951
FILESAVE DOCX: Additional (spurious) footnote is added on export
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
tdf134951_patch.diff: working patch with debugging
tdf134951_patch.diff (text/plain), 3.97 KB, created by
Justin L
on 2020-08-06 12:00:17 UTC
(
hide
)
Description:
tdf134951_patch.diff: working patch with debugging
Filename:
MIME Type:
Creator:
Justin L
Created:
2020-08-06 12:00:17 UTC
Size:
3.97 KB
patch
obsolete
>diff --git a/sw/source/filter/ww8/docxfootnotes.hxx b/sw/source/filter/ww8/docxfootnotes.hxx >index 614069f0dd5d..bc74b817abfb 100644 >--- a/sw/source/filter/ww8/docxfootnotes.hxx >+++ b/sw/source/filter/ww8/docxfootnotes.hxx >@@ -49,6 +49,7 @@ public: > { > m_aFootnotes.push_back( &rFootnote ); > m_nCurrent = m_aFootnotes.size() - 1; >+SAL_WARN("JCL","::add footnote - now size["<<m_aFootnotes.size()<<"]"); > } > > /// Return the current footnote/endnote and clear the 'current' state. >diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx >index 2e19f4e5bae6..0b35b2b25b27 100644 >--- a/sw/source/filter/ww8/wrtw8nds.cxx >+++ b/sw/source/filter/ww8/wrtw8nds.cxx >@@ -388,10 +388,9 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos ) > return nMinPos; > } > >-void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bWriteCombChars) >+void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bWriteCombChars, bool bExcludeSingleUse ) > { > m_rExport.AttrOutput().RTLAndCJKState( mbCharIsRTL, GetScript() ); >- > /* > Depending on whether text is in CTL/CJK or Western, get the id of that > script, the idea is that the font that is actually in use to render this >@@ -453,6 +452,10 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bWriteCombChars) > nWhichId = aIter.NextWhich(); > } > } >+ else if (nWhich == RES_TXTATR_FTN && bExcludeSingleUse) >+ { >+ //skip this time. It will be attempted again later. >+ } > else > aRangeItems[nWhich] = (&(pHt->GetAttr())); > } >@@ -2350,7 +2353,9 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) > && aAttrIter.IsAnchorLinkedToThisNode(rNode.GetIndex()) ) > { > bPostponeWritingText = true ; > } >+SAL_WARN("DEBUG","bPostponeWritingText?["<<bPostponeWritingText<<"] aStr["<<aStr<<"]"); > > nStateOfFlyFrame = aAttrIter.OutFlys( nCurrentPos ); > AttrOutput().SetStateOfFlyFrame( nStateOfFlyFrame ); >@@ -2546,13 +2551,14 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) > > if ( bPostponeWritingText && ( FLY_POSTPONED != nStateOfFlyFrame ) ) > { >- bPostponeWritingText = true ; > aSavedSnippet = aSnippet ; >+SAL_WARN("DEBUG","---aSavedSnippet["<<aSavedSnippet<<"], so postpone writing text."); > } > else > { > bPostponeWritingText = false ; > AttrOutput().RunText( aSnippet, eChrSet ); >+SAL_WARN("DEBUG","---aSnippet["<<aSnippet<<"] written out with runText and not postponed"); > } > } > >@@ -2565,7 +2571,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) > // Output the character attributes > // #i51277# do this before writing flys at end of paragraph > AttrOutput().StartRunProperties(); >- aAttrIter.OutAttr( nCurrentPos, false ); >+ aAttrIter.OutAttr( nCurrentPos, false, /*bExcludeSingleUse=*/bPostponeWritingText ); > AttrOutput().EndRunProperties( pRedlineData ); > } > >diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx >index d93ce60c007a..cb6aa1d4ebc9 100644 >--- a/sw/source/filter/ww8/wrtww8.hxx >+++ b/sw/source/filter/ww8/wrtww8.hxx >@@ -1540,7 +1540,7 @@ public: > > void NextPos() { if ( nCurrentSwPos < SAL_MAX_INT32 ) nCurrentSwPos = SearchNext( nCurrentSwPos + 1 ); } > >- void OutAttr( sal_Int32 nSwPos, bool bWriteCombinedChars ); >+ void OutAttr( sal_Int32 nSwPos, bool bWriteCombinedChars, bool bExcludeSingleUse = false ); > virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const override; > virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const override; > int OutAttrWithRange(const SwTextNode& rNode, sal_Int32 nPos);
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 134951
:
163266
| 164001