LibreOffice Module sw (master)  1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
RefIdsMap Struct Reference
Collaboration diagram for RefIdsMap:
[legend]

Public Member Functions

 RefIdsMap (const OUString &rName)
 
void Check (SwDoc &rDoc, SwDoc &rDestDoc, SwGetRefField &rField, bool bField)
 
const OUString & GetName () const
 

Private Member Functions

void Init (SwDoc &rDoc, SwDoc &rDestDoc, bool bField)
 Initialise the aIds and aDestIds collections from the source documents. More...
 
void GetFieldIdsFromDoc (SwDoc &rDoc, std::set< sal_uInt16 > &rIds)
 Get a sorted list of the field IDs from a document. More...
 
void AddId (sal_uInt16 id, sal_uInt16 seqNum)
 Add a new ID and sequence number to the "occupied" collection. More...
 

Static Private Member Functions

static void GetNoteIdsFromDoc (SwDoc &rDoc, std::set< sal_uInt16 > &rIds)
 Get a sorted list of the footnote/endnote IDs from a document. More...
 
static sal_uInt16 GetFirstUnusedId (std::set< sal_uInt16 > &rIds)
 Get the lowest number unused in the passed set. More...
 

Private Attributes

OUString const aName
 
std::set< sal_uInt16 > aIds
 
std::set< sal_uInt16 > aDstIds
 
std::map< sal_uInt16, sal_uInt16 > sequencedIds
 
bool bInit
 ID numbers sorted by sequence number. More...
 

Detailed Description

Definition at line 1252 of file reffld.cxx.

Constructor & Destructor Documentation

RefIdsMap::RefIdsMap ( const OUString &  rName)
inlineexplicit

Definition at line 1268 of file reffld.cxx.

Member Function Documentation

void RefIdsMap::AddId ( sal_uInt16  id,
sal_uInt16  seqNum 
)
private

Add a new ID and sequence number to the "occupied" collection.

Parameters
[in]idThe ID number.
[in]seqNumThe sequence number.

Definition at line 1381 of file reffld.cxx.

References aIds, and sequencedIds.

Referenced by Init().

void RefIdsMap::Check ( SwDoc rDoc,
SwDoc rDestDoc,
SwGetRefField rField,
bool  bField 
)
void RefIdsMap::GetFieldIdsFromDoc ( SwDoc rDoc,
std::set< sal_uInt16 > &  rIds 
)
private

Get a sorted list of the field IDs from a document.

Parameters
[in]rDocThe document to search.
[in,out]rIdsThe list of IDs found in the document.

Definition at line 1278 of file reffld.cxx.

References aName, SwIterator< TElementType, TSource, eMode >::First(), IDocumentFieldsAccess::GetFieldType(), SwDoc::getIDocumentFieldsAccess(), SwNode::GetNodes(), SwNodes::IsDocNodes(), SwIterator< TElementType, TSource, eMode >::Next(), and SetExp.

Referenced by Init().

sal_uInt16 RefIdsMap::GetFirstUnusedId ( std::set< sal_uInt16 > &  rIds)
staticprivate

Get the lowest number unused in the passed set.

Parameters
[in]rIdsThe set of used ID numbers.
Returns
The lowest number unused by the passed set

Definition at line 1363 of file reffld.cxx.

Referenced by Init().

const OUString& RefIdsMap::GetName ( ) const
inline

Definition at line 1272 of file reffld.cxx.

References aName.

void RefIdsMap::GetNoteIdsFromDoc ( SwDoc rDoc,
std::set< sal_uInt16 > &  rIds 
)
staticprivate

Get a sorted list of the footnote/endnote IDs from a document.

Parameters
[in]rDocThe document to search.
[in,out]rIdsThe list of IDs found in the document.

Definition at line 1303 of file reffld.cxx.

References SwDoc::GetFootnoteIdxs(), and o3tl::sorted_vector< Value, Compare, Find, class >::size().

Referenced by Init().

void RefIdsMap::Init ( SwDoc rDoc,
SwDoc rDestDoc,
bool  bField 
)
private

Initialise the aIds and aDestIds collections from the source documents.

Parameters
[in]rDocThe source document.
[in]rDestDocThe destination document.
[in]bFieldTrue if we're interested in all fields, false for footnotes.

Definition at line 1313 of file reffld.cxx.

References AddId(), aDstIds, aIds, aName, bInit, SwIterator< TElementType, TSource, eMode >::First(), GetFieldIdsFromDoc(), IDocumentFieldsAccess::GetFieldType(), GetFirstUnusedId(), SwDoc::GetFootnoteIdxs(), SwDoc::getIDocumentFieldsAccess(), GetNoteIdsFromDoc(), SwSetExpField::GetSeqNumber(), SwIterator< TElementType, TSource, eMode >::Next(), sequencedIds, SetExp, and SwSetExpField::SetSeqNumber().

Referenced by Check().

Member Data Documentation

std::set<sal_uInt16> RefIdsMap::aDstIds
private

Definition at line 1257 of file reffld.cxx.

Referenced by Init().

std::set<sal_uInt16> RefIdsMap::aIds
private

Definition at line 1256 of file reffld.cxx.

Referenced by AddId(), and Init().

OUString const RefIdsMap::aName
private

Definition at line 1255 of file reffld.cxx.

Referenced by GetFieldIdsFromDoc(), GetName(), and Init().

bool RefIdsMap::bInit
private

ID numbers sorted by sequence number.

Definition at line 1259 of file reffld.cxx.

Referenced by Init().

std::map<sal_uInt16, sal_uInt16> RefIdsMap::sequencedIds
private

Definition at line 1258 of file reffld.cxx.

Referenced by AddId(), Check(), and Init().


The documentation for this struct was generated from the following file: