summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-10-16 13:51:54 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-11-15 15:10:00 +0100
commitfe1d3328997741b55202aca7b3dc566ca833a5f4 (patch)
tree7c574b532e3f70e08b843fc2ebc01fcf4984e1ea /sw/inc
parent80ffd0d8cf638808ad73c8de69b8a0fa19b16604 (diff)
sw_redlinehide_3: add second footnote number
Add a separate footnote number to SwFormatFootnote for the case when the layout hides redlines. If the footnote is in a delete redline, the value will be an arbitrary number, let's use the same number as the last visible footnote for simplicity. Change-Id: Ic7fff9d1bb2c90f5ad811b859c6501a193b7ae70
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/fmtftn.hxx3
-rw-r--r--sw/inc/ftnidx.hxx10
-rw-r--r--sw/inc/txtftn.hxx2
3 files changed, 11 insertions, 4 deletions
diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx
index 1aa2e6f315d9..b6560544b12f 100644
--- a/sw/inc/fmtftn.hxx
+++ b/sw/inc/fmtftn.hxx
@@ -44,6 +44,7 @@ class SW_DLLPUBLIC SwFormatFootnote
SwTextFootnote* m_pTextAttr; ///< My TextAttribute.
OUString m_aNumber; ///< User-defined 'Number'.
sal_uInt16 m_nNumber; ///< automatic sequence number
+ sal_uInt16 m_nNumberRLHidden; ///< automatic sequence number (hidden redlines)
bool m_bEndNote; ///< Is it an End note?
css::uno::WeakReference<css::text::XFootnote> m_wXFootnote;
@@ -67,6 +68,7 @@ public:
const OUString& GetNumStr() const { return m_aNumber; }
sal_uInt16 GetNumber() const { return m_nNumber; }
+ sal_uInt16 GetNumberRLHidden() const { return m_nNumberRLHidden; }
bool IsEndNote() const { return m_bEndNote;}
void SetNumStr( const OUString& rStr ) { m_aNumber = rStr; }
@@ -75,6 +77,7 @@ public:
void SetNumber( const SwFormatFootnote& rFootnote )
{
m_nNumber = rFootnote.m_nNumber;
+ m_nNumberRLHidden = rFootnote.m_nNumberRLHidden;
m_aNumber = rFootnote.m_aNumber;
}
diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx
index 41205a34b540..3dfb118a1f6b 100644
--- a/sw/inc/ftnidx.hxx
+++ b/sw/inc/ftnidx.hxx
@@ -23,6 +23,7 @@
#include <sal/types.h>
#include <o3tl/sorted_vector.hxx>
+class IDocumentRedlineAccess;
class SwTextFootnote;
class SwNodeIndex;
class SwSectionNode;
@@ -51,7 +52,7 @@ public:
class SwUpdFootnoteEndNtAtEnd
{
std::vector<const SwSectionNode*> aFootnoteSects, aEndSects;
- std::vector<sal_uInt16> aFootnoteNums, aEndNums;
+ std::vector<std::pair<sal_uInt16, sal_uInt16>> aFootnoteNums, aEndNums;
public:
SwUpdFootnoteEndNtAtEnd() : aFootnoteSects(), aEndSects() {}
@@ -59,8 +60,11 @@ public:
static const SwSectionNode* FindSectNdWithEndAttr(
const SwTextFootnote& rTextFootnote );
- sal_uInt16 GetNumber( const SwTextFootnote& rTextFootnote, const SwSectionNode& rNd );
- sal_uInt16 ChkNumber( const SwTextFootnote& rTextFootnote );
+ std::pair<sal_uInt16, sal_uInt16> GetNumber(
+ IDocumentRedlineAccess const&, const SwTextFootnote& rTextFootnote,
+ const SwSectionNode& rNd);
+ std::pair<sal_uInt16, sal_uInt16> ChkNumber(
+ IDocumentRedlineAccess const&, const SwTextFootnote& rTextFootnote);
};
#endif // INCLUDED_SW_INC_FTNIDX_HXX
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
index 9349750e70ec..b18011444c90 100644
--- a/sw/inc/txtftn.hxx
+++ b/sw/inc/txtftn.hxx
@@ -40,7 +40,7 @@ public:
SwNodeIndex *GetStartNode() const { return m_pStartNode.get(); }
void SetStartNode( const SwNodeIndex *pNode, bool bDelNodes = true );
- void SetNumber( const sal_uInt16 nNumber, const OUString &sNumStr );
+ void SetNumber(sal_uInt16 nNumber, sal_uInt16 nNumberRLHidden, const OUString &sNumStr);
void CopyFootnote(SwTextFootnote & rDest, SwTextNode & rDestNode) const;
// Get and set TextNode pointer.