20 #include <com/sun/star/text/ReferenceFieldPart.hpp>
21 #include <com/sun/star/text/ReferenceFieldSource.hpp>
55 #include <strings.hrc>
64 #include <string_view>
75 sal_uInt32 nRefNumFormat);
85 rArr.push_back( pFrame );
92 pFrame = static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame();
100 const SwTextNode& rBehindNd, sal_Int32 nSttPos )
107 if( !pFrame || !pMyFrame)
112 while (pFrame && !pFrame->
IsInside(nSttPosIndex))
114 while (pMyFrame && !pMyFrame->
IsInside(nMySttPosIndex))
117 if( !pFrame || !pMyFrame || pFrame == pMyFrame )
120 std::vector<const SwFrame*> aRefArr,
aArr;
124 size_t nRefCnt = aRefArr.size() - 1, nCnt = aArr.size() - 1;
129 while( nRefCnt && nCnt && aRefArr[ nRefCnt ] == aArr[ nCnt ] )
131 const SwFrame* pTmpFrame = aArr[ nCnt ];
139 if( aRefArr[ nRefCnt ] == aArr[ nCnt ] )
147 const SwFrame* pRefFrame = aRefArr[ nRefCnt ];
148 const SwFrame* pFieldFrame = aArr[ nCnt ];
151 bool bRefIsLower =
false;
180 pFieldFrame = aArr[ nCnt - 1 ];
182 pRefFrame = aRefArr[ nRefCnt - 1 ];
217 std::u16string_view rReferenceLanguage)
219 if (eLang !=
LANGUAGE_HUNGARIAN || (rReferenceLanguage !=
u"hu" && rReferenceLanguage !=
u"Hu"))
241 sal_Int32 nLen = rRefText.getLength();
246 bool bArticleAz =
false;
251 for (i=0; i<nLen && (sNumbering.isEmpty() ||
252 ((bNum && aCharClass.
isDigit(rRefText, i)) ||
253 (!bNum && aCharClass.
isLetter(rRefText, i)))); ++i)
257 sNumbering = rRefText.copy(i);
258 bNum = aCharClass.
isDigit(rRefText, i);
263 nLen = i - (rRefText.getLength() - sNumbering.getLength());
269 if ((sNumbering.startsWith(
"1") && (nLen == 1 || nLen == 4 || nLen == 7 || nLen == 10)) ||
270 sNumbering.startsWith(
"5"))
273 else if (nLen == 1 && sNumbering[0] < 128)
278 static const std::u16string_view sLettersStartingWithVowels =
u"aefilmnorsuxyAEFILMNORSUXY";
279 if (sLettersStartingWithVowels.find(sNumbering[0]) != std::u16string_view::npos)
282 if (bClosingParenthesis ||
283 (sNumbering[0] !=
'x' && sNumbering[0] !=
'X'))
285 }
else if ((sNumbering[0] ==
'v' || sNumbering[0] ==
'V') && !bClosingParenthesis)
291 static const sal_Unicode sVowelsWithDiacritic[] = {
292 0x00E1, 0x00C1, 0x00E9, 0x00C9, 0x00ED, 0x00CD,
293 0x00F3, 0x00D3, 0x00F6, 0x00D6, 0x0151, 0x0150,
294 0x00FA, 0x00DA, 0x00FC, 0x00DC, 0x0171, 0x0170, 0 };
295 static OUString sVowels = OUStringLiteral(
u"aAeEiIoOuU") + sVowelsWithDiacritic;
300 bool bRomanNumber =
false;
301 if (nLen > 1 && (nLen + 1 >= sNumbering.getLength() || sNumbering[nLen] ==
'.'))
304 OUString sNumberingTrim;
305 if ((last >=
'A' && last <
'I') || (last >=
'a' && last <
'i'))
306 sNumberingTrim = sNumbering.copy(0, nLen - 1);
308 sNumberingTrim = sNumbering.copy(0, nLen);
310 sNumberingTrim.replaceAll(
"i",
"").replaceAll(
"v",
"").replaceAll(
"x",
"").replaceAll(
"l",
"").replaceAll(
"c",
"").isEmpty() ||
311 sNumberingTrim.replaceAll(
"I",
"").replaceAll(
"V",
"").replaceAll(
"X",
"").replaceAll(
"L",
"").replaceAll(
"C",
"").isEmpty();
317 (sNumbering[0] ==
'i' && sNumbering[1] !=
'i' && sNumbering[1] !=
'v' && sNumbering[1] !=
'x') ||
318 (sNumbering[0] ==
'I' && sNumbering[1] !=
'I' && sNumbering[1] !=
'V' && sNumbering[1] !=
'X') ||
319 (sNumbering[0] ==
'v' && sNumbering[1] !=
'i') ||
320 (sNumbering[0] ==
'V' && sNumbering[1] !=
'I') ||
321 (sNumbering[0] ==
'l' && sNumbering[1] !=
'x') ||
322 (sNumbering[0] ==
'L' && sNumbering[1] !=
'X')) ) ||
324 ( !bRomanNumber && sVowels.indexOf(sNumbering[0]) != -1))
330 if ( sNumbering.startsWith(
"A ") || sNumbering.startsWith(
"Az ") ||
331 sNumbering.startsWith(
"a ") || sNumbering.startsWith(
"az ") )
337 if ( rReferenceLanguage ==
u"hu" )
345 rRefText = sArticle +
" " + rRefText;
350 const OUString& rSetRef,
const OUString& rSetReferenceLanguage, sal_uInt16 nSubTyp,
351 sal_uInt16 nSequenceNo,
sal_uLong nFormat )
352 :
SwField( pFieldType, nFormat ),
353 m_sSetRefName( rSetRef ),
354 m_sSetReferenceLanguage( rSetReferenceLanguage ),
355 m_nSubType( nSubTyp ),
356 m_nSeqNo( nSequenceNo )
397 sal_Int32 nDummy = -1;
406 return pReferencedTextNode
434 std::u16string_view rSetReferenceLanguage)
440 rText = rText.replaceAll(
u"\u00ad",
"");
441 OUStringBuffer
aBuf(rText);
442 const sal_Int32 l = aBuf.getLength();
443 for (sal_Int32
i = 0;
i < l; ++
i)
449 else if (aBuf[
i] == 0x2011)
454 rText = aBuf.makeStringAndClear();
455 if (!rSetReferenceLanguage.empty())
469 sal_Int32 nNumStart = -1;
470 sal_Int32 nNumEnd = -1;
486 if (pLay->IsHideRedlines())
488 pLayoutRLHidden = pLay;
497 const OUString aText = pTextNd->
GetText();
499 const bool bHasCat = nCatStart>=0;
500 const sal_Int32 nCatEnd = bHasCat ? nCatStart +
m_sSetRefName.getLength() : -1;
503 const sal_Int32 nLen = aText.getLength();
526 nStart = std::min(nNumStart, nCatStart);
527 nEnd = std::max(nNumEnd, nCatEnd);
541 const sal_Int32 nFrom = bHasCat
542 ? std::max(nNumStart + 1, nCatEnd)
546 nStart = bHasCat ? std::max(nNumEnd, nCatEnd) : nNumEnd;
555 nEnd = std::min(nStart + 1, nLen);
572 nEnd = nNumEnd<0 ? nLen : nNumEnd;
616 pLayoutRLHidden, *pTextNd,
false,
false,
ExpandMode(0));
633 [
this, pTextNd, nNumStart](OUString & rText,
SwRootFrame const*
const pLay)
640 while (pFrame && !pFrame->
IsInside(nNumStartIndex))
644 if( pFrame ||
nullptr != ( pFrame = pSave ))
656 rText = OUString::number(nPageNo);
673 [
this, pTextNd](OUString & rText,
SwRootFrame const*
const pLay)
698 if( !pFieldTextAttr || !pFieldTextAttr->
GetpTextNode() )
715 *pTextNd, nNumStart )
736 bool bClosingParenthesis =
result.second;
744 bClosingParenthesis =
result.second;
754 OSL_FAIL(
"<SwGetRefField::UpdateField(..)> - unknown format type");
762 const SwTextNode& i_rTextNodeOfReferencedItem,
763 const sal_uInt32 nRefNumFormat)
767 : i_rTextNodeOfField);
768 SwTextNode const& rTextNodeOfReferencedItem(pLayout
770 : i_rTextNodeOfReferencedItem);
771 if ( rTextNodeOfReferencedItem.
HasNumber() &&
774 OSL_ENSURE( rTextNodeOfReferencedItem.
GetNum(pLayout),
775 "<SwGetRefField::MakeRefNumStr(..)> - referenced paragraph has number, but no <SwNodeNum> instance!" );
779 int nRestrictInclToThisLevel( 0 );
794 const SwNodeNum* pNodeNumForTextNodeOfField(
nullptr );
798 pNodeNumForTextNodeOfField = rTextNodeOfField.
GetNum(pLayout);
802 pNodeNumForTextNodeOfField =
805 if ( pNodeNumForTextNodeOfField )
811 std::size_t nLevel( 0 );
812 while ( nLevel < rFieldNumVec.size() && nLevel < rRefItemNumVec.size() )
814 if ( rRefItemNumVec[nLevel] == rFieldNumVec[nLevel] )
816 nRestrictInclToThisLevel = nLevel + 1;
828 const bool bInclSuperiorNumLabels(
832 OSL_ENSURE( rTextNodeOfReferencedItem.
GetNumRule(),
833 "<SwGetRefField::MakeRefNumStr(..)> - referenced numbered paragraph has no numbering rule set!" );
834 return std::make_pair(
836 *(rTextNodeOfReferencedItem.
GetNum(pLayout)),
837 bInclSuperiorNumLabels,
838 nRestrictInclToThisLevel ),
840 *(rTextNodeOfReferencedItem.
GetNum(pLayout)),
841 true).endsWith(
")") );
844 return std::make_pair(OUString(),
false);
849 std::unique_ptr<SwGetRefField> pField(
new SwGetRefField( static_cast<SwGetRefFieldType*>(
GetTyp()),
854 return std::unique_ptr<SwField>(pField.release());
883 case REF_PAGE : nPart = ReferenceFieldPart::PAGE ;
break;
884 case REF_CHAPTER : nPart = ReferenceFieldPart::CHAPTER ;
break;
885 case REF_CONTENT : nPart = ReferenceFieldPart::TEXT ;
break;
886 case REF_UPDOWN : nPart = ReferenceFieldPart::UP_DOWN ;
break;
888 case REF_ONLYNUMBER : nPart = ReferenceFieldPart::CATEGORY_AND_NUMBER ;
break;
889 case REF_ONLYCAPTION: nPart = ReferenceFieldPart::ONLY_CAPTION ;
break;
890 case REF_ONLYSEQNO : nPart = ReferenceFieldPart::ONLY_SEQUENCE_NUMBER;
break;
892 case REF_NUMBER: nPart = ReferenceFieldPart::NUMBER;
break;
901 sal_Int16 nSource = 0;
904 case REF_SETREFATTR : nSource = ReferenceFieldSource::REFERENCE_MARK;
break;
905 case REF_SEQUENCEFLD: nSource = ReferenceFieldSource::SEQUENCE_FIELD;
break;
906 case REF_BOOKMARK : nSource = ReferenceFieldSource::BOOKMARK;
break;
907 case REF_OUTLINE : OSL_FAIL(
"not implemented");
break;
908 case REF_FOOTNOTE : nSource = ReferenceFieldSource::FOOTNOTE;
break;
941 rAny <<= static_cast<sal_Int16>(
m_nSeqNo);
959 case ReferenceFieldPart::PAGE: nPart =
REF_PAGE;
break;
960 case ReferenceFieldPart::CHAPTER: nPart =
REF_CHAPTER;
break;
961 case ReferenceFieldPart::TEXT: nPart =
REF_CONTENT;
break;
962 case ReferenceFieldPart::UP_DOWN: nPart =
REF_UPDOWN;
break;
964 case ReferenceFieldPart::CATEGORY_AND_NUMBER: nPart =
REF_ONLYNUMBER;
break;
966 case ReferenceFieldPart::ONLY_SEQUENCE_NUMBER : nPart =
REF_ONLYSEQNO;
break;
968 case ReferenceFieldPart::NUMBER: nPart =
REF_NUMBER;
break;
971 default:
return false;
978 sal_Int16 nSource = 0;
983 case ReferenceFieldSource::SEQUENCE_FIELD :
1017 sal_Int16 nSetSeq = 0;
1035 const OUString rPar1 =
GetPar1();
1041 const char* pResId =
nullptr;
1045 pResId = STR_POOLCOLL_LABEL_ABB;
1048 pResId = STR_POOLCOLL_LABEL_TABLE;
1051 pResId = STR_POOLCOLL_LABEL_FRAME;
1054 pResId = STR_POOLCOLL_LABEL_DRAWING;
1057 pResId = STR_POOLCOLL_LABEL_FIGURE;
1070 return std::make_unique<SwGetRefFieldType>(
m_rDoc );
1075 std::vector<SwFormatField*> vFields;
1077 for(
auto pFormatField: vFields)
1084 nullptr != (pTField = pFormatField->GetTextField()) &&
1101 if(!pLegacy->m_pNew && !pLegacy->m_pOld)
1120 SwTextFrame const*
const pFrame(static_cast<SwTextFrame const*>(
1126 sal_Int32
const*
const pEnd(rHint.
GetEnd());
1143 sal_uInt16 nSubType, sal_uInt16 nSeqNo,
1144 sal_Int32* pStt, sal_Int32* pEnd,
1147 OSL_ENSURE( pStt,
"Why did no one check the StartPos?" );
1158 pRefMark->GetTextNode(), *pRefMark)))
1174 std::vector<SwFormatField*> vFields;
1176 for(
auto pFormatField: vFields)
1178 SwTextField *
const pTextField(pFormatField->GetTextField());
1179 if (pTextField && nSeqNo ==
1180 static_cast<SwSetExpField*>(pFormatField->GetField())->GetSeqNumber()
1185 *pStt = pTextField->GetStart();
1187 *pEnd = (*pStt) + 1;
1202 const ::sw::mark::IMark* pBkmk = *ppMark;
1203 const SwPosition* pPos = &pBkmk->GetMarkStart();
1209 if(!pBkmk->IsExpanded())
1213 if(dynamic_cast< ::sw::mark::CrossRefBookmark const *>(pBkmk))
1215 OSL_ENSURE( pTextNd,
1216 "<SwGetRefFieldType::FindAnchor(..)> - node marked by cross-reference bookmark isn't a text node --> crash" );
1217 *pEnd = pTextNd->Len();
1220 else if(pBkmk->GetOtherMarkPos().nNode == pBkmk->GetMarkPos().nNode)
1221 *pEnd = pBkmk->GetMarkEnd().nContent.GetIndex();
1236 if( nSeqNo == pFootnoteIdx->GetSeqRefNo() )
1250 if(
nullptr == pTextNd )
1271 std::set<sal_uInt16> aIds;
1272 std::set<sal_uInt16> aDstIds;
1273 std::map<sal_uInt16, sal_uInt16> sequencedIds;
1277 static void GetNoteIdsFromDoc(
SwDoc& rDoc, std::set<sal_uInt16> &rIds );
1278 void GetFieldIdsFromDoc(
SwDoc& rDoc, std::set<sal_uInt16> &rIds );
1279 void AddId( sal_uInt16
id, sal_uInt16 seqNum );
1280 static sal_uInt16 GetFirstUnusedId( std::set<sal_uInt16> &rIds );
1283 explicit RefIdsMap(
const OUString& rName ) : aName( rName ), bInit( false ) {}
1287 const OUString& GetName()
const {
return aName; }
1295 void RefIdsMap::GetFieldIdsFromDoc(
SwDoc& rDoc, std::set<sal_uInt16> &rIds)
1300 std::vector<SwFormatField*> vFields;
1302 for(
const auto pF: vFields)
1303 rIds.insert(static_cast<SwSetExpField const*>(pF->GetField())->GetSeqNumber());
1309 void RefIdsMap::GetNoteIdsFromDoc(
SwDoc& rDoc, std::set<sal_uInt16> &rIds)
1319 void RefIdsMap::Init(
SwDoc& rDoc,
SwDoc& rDestDoc,
bool bField )
1326 GetFieldIdsFromDoc( rDestDoc, aIds );
1327 GetFieldIdsFromDoc( rDoc, aDstIds );
1330 for (
const auto& rId : aDstIds)
1331 AddId( GetFirstUnusedId(aIds), rId );
1337 std::vector<SwFormatField*> vFields;
1339 for(
auto pF: vFields)
1341 if(!pF->GetTextField())
1343 SwSetExpField *
const pSetExp(static_cast<SwSetExpField *>(pF->GetField()));
1344 sal_uInt16
const n = pSetExp->GetSeqNumber();
1345 pSetExp->SetSeqNumber(sequencedIds[n]);
1351 GetNoteIdsFromDoc( rDestDoc, aIds );
1352 GetNoteIdsFromDoc( rDoc, aDstIds );
1354 for (
const auto& rId : aDstIds)
1355 AddId( GetFirstUnusedId(aIds), rId );
1360 sal_uInt16
const n = pFootnoteIdx->GetSeqRefNo();
1361 pFootnoteIdx->SetSeqNo(sequencedIds[n]);
1370 sal_uInt16 RefIdsMap::GetFirstUnusedId( std::set<sal_uInt16> &rIds )
1374 for(
const auto& rId : rIds )
1388 void RefIdsMap::AddId( sal_uInt16
id, sal_uInt16 seqNum )
1391 sequencedIds[ seqNum ] = id;
1397 Init( rDoc, rDestDoc, bField);
1399 sal_uInt16
const nSeqNo = rField.
GetSeqNo();
1406 if (sequencedIds.count(nSeqNo))
1408 rField.
SetSeqNo( sequencedIds[nSeqNo] );
1421 if (&rDestDoc == &
m_rDoc)
1434 RefIdsMap aFntMap { OUString() };
1435 std::vector<std::unique_ptr<RefIdsMap>> aFieldMap;
1437 std::vector<SwFormatField*> vFields;
1439 for(
auto pField: vFields)
1446 RefIdsMap* pMap =
nullptr;
1447 for(
auto n = aFieldMap.size();
n; )
1451 pMap = aFieldMap[
n ].get();
1458 aFieldMap.push_back(std::unique_ptr<RefIdsMap>(pMap));
1461 pMap->Check(
m_rDoc, rDestDoc, rRefField,
true);
1467 aFntMap.Check(
m_rDoc, rDestDoc, rRefField,
false);
OUString GetNumStr(sal_Int32 nNo) const
Instances of SwFields and those derived from it occur 0 to n times.
Base class of the Writer layout elements.
Represents the visualization of a paragraph.
bool IsMarkHintHidden(SwRootFrame const &rLayout, SwTextNode const &rNode, SwTextAttrEnd const &rHint)
static std::pair< OUString, bool > MakeRefNumStr(SwRootFrame const *pLayout, const SwTextNode &rTextNodeOfField, const SwTextNode &rTextNodeOfReferencedItem, sal_uInt32 nRefNumFormat)
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
Overlay in order to update all ref-fields.
OUString GetExpandedTextOfReferencedTextNode(SwRootFrame const &rLayout) const
OUString m_sTextRLHidden
result for layout with redlines hidden
void MergeWithOtherDoc(SwDoc &rDestDoc)
const SwStartNode * FindHeaderStartNode() const
Marks a position in the document model.
const SwNodeNum * GetNum(SwRootFrame const *pLayout=nullptr) const
bool isDigit(const OUString &rStr, sal_Int32 nPos) const
virtual OUString GetPar2() const override
const SwFormatRefMark * GetRefMark(std::u16string_view rName) const
LanguageType GetLanguage() const
Language at field position.
virtual ~SwGetRefField() override
OUString MakeRefNumString(const SwNodeNum &rNodeNum, const bool bInclSuperiorNumLabels, const int nRestrictInclToThisLevel) const
OUString MakeNumString(const SwNodeNum &, bool bInclStrings=true) const
const OUString & GetText() const
const SwStartNode * FindFooterStartNode() const
virtual const SwRootFrame * GetCurrentLayout() const =0
static ShellResource * GetShellRes()
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
virtual SwFieldType * GetFieldType(SwFieldIds nResId, const OUString &rName, bool bDbFieldMatching) const =0
void Left(const tools::Long nLeft)
sal_uInt16 m_nSeqNo
reference to either a SwTextFootnote::m_nSeqNo or a SwSetExpField::mnSeqNo
SwFrameType GetType() const
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
constexpr OUStringLiteral last
Base class of all fields.
virtual OUString GetDescription() const override
#define FIELD_PROP_USHORT1
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
static void FilterText(OUString &rText, LanguageType const eLang, std::u16string_view rSetReferenceLanguage)
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhichId) override
bool IsMarkHidden(SwRootFrame const &rLayout,::sw::mark::IMark const &rMark)
bool IsFootnoteDeleted(IDocumentRedlineAccess const &rIDRA, SwTextFootnote const &rTextFootnote)
bool HasDummyChar() const
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
SwTextNode * GetpTextNode() const
virtual OUString GetPar1() const override
get reference name
SwNumberTree::tNumberVector GetNumberVector() const
Returns level numbers of this node.
IDocumentMarkAccess * getIDocumentMarkAccess()
Dialog to specify the properties of date form field.
virtual const sal_Int32 * GetEnd() const override
end position
bool IsInside(TextFrameIndex nPos) const
Respect the Follows.
void UpdateGetReferences()
sal_Int32 GetAnyEnd() const
end (if available), else start
bool HasNumber() const
Returns if this text node has a number.
bool HasWriterListeners() const
The root element of a Writer document layout.
int GetActualListLevel() const
Returns the actual list level of this text node, when it is a list item.
static bool IsLegalName(const OUString &rName)
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhichId) const override
virtual void SetSubType(sal_uInt16 n) override
#define LANGUAGE_HUNGARIAN
void GatherFields(std::vector< SwFormatField * > &rvFormatFields, bool bCollectOnlyInDocNodes=true) const
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
bool isLetterNumeric(const OUString &rStr, sal_Int32 nPos) const
const SwTextNode & GetTextNode() const
static SwTextNode * FindAnchor(SwDoc *pDoc, const OUString &rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_Int32 *pStt, sal_Int32 *pEnd=nullptr, SwRootFrame const *pLayout=nullptr)
virtual const_iterator_t findMark(const OUString &rMark) const =0
Finds a mark by name.
void ConvertProgrammaticToUIName()
const SwRect & getFrameArea() const
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
static void lcl_GetLayTree(const SwFrame *pFrame, std::vector< const SwFrame * > &rArr)
sal_Int32 GetStart() const
const OUString & getAboveWord() const
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
o3tl::sorted_vector< SwRootFrame * > GetAllLayouts()
OUString m_sSetReferenceLanguage
virtual std::unique_ptr< SwFieldType > Copy() const override
SwTextFrame * GetFollow()
sal_uInt16 GetVirtPageNum() const
static sal_Int32 GetReferenceTextPos(const SwFormatField &rFormat, SwDoc &rDoc, sal_Int32 nHint=0)
Find the index of the reference text following the current field.
constexpr TypedWhichId< SwFormatField > RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN)
bool IsRefToNumItemCrossRefBookmark() const
OUString GetExpandTextMerged(SwRootFrame const *const pLayout, SwTextNode const &rNode, bool const bWithNumber, bool const bWithSpacesForLevel, ExpandMode const i_mode)
virtual const_iterator_t getAllMarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of marks.
SwPageFrame * FindPageFrame()
const OUString & getBelowWord() const
SwPageDesc * GetPageDesc()
#define FIELD_PROP_USHORT2
SwLayoutFrame * GetUpper()
new reference format types for referencing bookmarks and set references
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
void SetFormat(sal_uInt32 const nSet)
Marks a node in the document model.
OUString SwResId(const char *pId)
A page of the document layout.
const SwFormatFootnote & GetFootnote() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNodeIndex const &rNode)
SwFieldType * GetTyp() const
std::vector< tSwNumTreeNumber > tNumberVector
SwGetRefFieldType(SwDoc &rDoc)
SwTextNode is a paragraph in the document model.
ExpandMode
Some helpers for converting model strings to view strings.
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
const SwGetSetExpType GSE_SEQ
Sequence.
sal_uInt16 GetSeqNo() const
Get/set SequenceNo (of interest only for REF_SEQUENCEFLD).
OUString GetExpandText(SwRootFrame const *pLayout, const sal_Int32 nIdx=0, const sal_Int32 nLen=-1, const bool bWithNum=false, const bool bAddSpaceAfterListLabelStr=false, const bool bWithSpacesForLevel=false, const ExpandMode eAdditionalMode=ExpandMode::ExpandFootnote) const
add 4th optional parameter indicating, when that a spa...
virtual void SetLanguage(LanguageType nLng)
OUString aGetRefField_RefItemNotFound
virtual OUString GetName() const
Only in derived classes.
void ChangeExpansion(const SwFrame &, const SwContentNode *, bool bSrchNum=false)
bool IsFieldDeletedInModel(IDocumentRedlineAccess const &rIDRA, SwTextField const &rTextField)
virtual OUString GetFieldName() const override
get name or content
bool IsRefToHeadingCrossRefBookmark() const
TextFrameIndex MapModelToView(SwTextNode const *pNode, sal_Int32 nIndex) const
sal_Int32 GetIndex() const
bool IsCountedInList() const
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
bool IsRightToLeft() const
void Top(const tools::Long nTop)
LanguageType GetLang(const sal_Int32 nBegin, const sal_Int32 nLen=0, sal_uInt16 nScript=0) const
const OUString & GetSetRefName() const
void SetSeqNo(sal_uInt16 n)
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding)...
const OUString & GetNumber(SwRootFrame const *pLayout=nullptr) const
virtual void CallSwClientNotify(const SfxHint &rHint) const override
const SwNodeNum * GetPrecedingNodeNumOf(const SwTextNode &rTextNode) const
determines the instance, which is preceding the given text node
const SwStartNode * FindFlyStartNode() const
SwGetRefField(SwGetRefFieldType *, const OUString &rSetRef, const OUString &rReferenceLanguage, sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uLong nFormat)
get references
SwFootnoteIdxs & GetFootnoteIdxs()
bool IsFrameBehind(const SwTextNode &rMyNd, sal_Int32 nMySttPos, const SwTextNode &rBehindNd, sal_Int32 nSttPos)
bool HasMergedParas() const
virtual SwFieldType * GetSysFieldType(const SwFieldIds eWhich) const =0
void UpdateField(const SwTextField *pFieldTextAttr)
The instance, which represents the text attribute for the instance...
static bool IsLegalName(const OUString &rName)
SwTextNode & GetTextNode() const
virtual std::unique_ptr< SwField > Copy() const override
void SetExpand(const OUString &rStr)
static void lcl_formatReferenceLanguage(OUString &rRefText, bool bClosingParenthesis, LanguageType eLang, std::u16string_view rReferenceLanguage)
virtual sal_uInt16 GetSubType() const override
Get/set sub type.
bool isLetter(const OUString &rStr, sal_Int32 nPos) const
SwContentNode * GoNext(SwNodeIndex *) const
const SwStartNode * FindFootnoteStartNode() const
virtual void SetPar1(const OUString &rStr) override
set reference name
const SwTextNode * GetReferencedTextNode() const
static sal_uInt16 GetPoolIdFromProgName(const OUString &rName, SwGetPoolIdFromName)
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
#define FIELD_PROP_SHORT1
const SvxNumberType & GetNumType() const