20#include <com/sun/star/text/ReferenceFieldPart.hpp>
21#include <com/sun/star/text/ReferenceFieldSource.hpp>
76 sal_uInt32 nRefNumFormat);
86 rArr.push_back( pFrame );
93 pFrame =
static_cast<const SwFlyFrame*
>(pFrame)->GetAnchorFrame();
101 const SwTextNode& rBehindNd, sal_Int32 nSttPos )
108 if( !pFrame || !pMyFrame)
113 while (pFrame && !pFrame->
IsInside(nSttPosIndex))
115 while (pMyFrame && !pMyFrame->
IsInside(nMySttPosIndex))
118 if( !pFrame || !pMyFrame || pFrame == pMyFrame )
121 std::vector<const SwFrame*> aRefArr,
aArr;
125 size_t nRefCnt = aRefArr.size() - 1, nCnt =
aArr.size() - 1;
130 while( nRefCnt && nCnt && aRefArr[ nRefCnt ] ==
aArr[ nCnt ] )
140 if( aRefArr[ nRefCnt ] ==
aArr[ nCnt ] )
148 const SwFrame* pRefFrame = aRefArr[ nRefCnt ];
152 bool bRefIsLower =
false;
181 pFieldFrame =
aArr[ nCnt - 1 ];
183 pRefFrame = aRefArr[ nRefCnt - 1 ];
218 std::u16string_view rReferenceLanguage)
220 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 const OUString sVowels = OUString::Concat(
u"aAeEiIoOuU") + sVowelsWithDiacritic;
300 bool bRomanNumber =
false;
301 if (nLen > 1 && (nLen + 1 >= sNumbering.getLength() || sNumbering[nLen] ==
'.'))
304 OUString sNumberingTrim;
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 OUString aSetRef, OUString aSetReferenceLanguage, sal_uInt16 nSubTyp,
351 sal_uInt16 nSequenceNo,
sal_uLong nFormat )
352 :
SwField( pFieldType, nFormat ),
353 m_sSetRefName(
std::move(aSetRef) ),
354 m_sSetReferenceLanguage(
std::move(aSetReferenceLanguage) ),
355 m_nSubType( nSubTyp ),
356 m_nSeqNo( nSequenceNo )
397 sal_Int32 nDummy = -1;
404 OUStringBuffer sRet(sText.size() * 2);
405 for (
size_t i = 0;
i < sText.size(); ++
i)
407 sRet.append(OUStringChar(sText[
i]) + OUStringChar(cChar));
409 return sRet.makeStringAndClear();
417 if ( !pReferencedTextNode )
424 if ( sRet.isEmpty() )
456 std::u16string_view rSetReferenceLanguage)
462 rText = rText.replaceAll(
u"\u00ad",
"");
463 OUStringBuffer
aBuf(rText);
464 const sal_Int32 l =
aBuf.getLength();
465 for (sal_Int32
i = 0;
i < l; ++
i)
471 else if (
aBuf[
i] == 0x2011)
476 rText =
aBuf.makeStringAndClear();
477 if (!rSetReferenceLanguage.empty())
491 sal_Int32 nNumStart = -1;
492 sal_Int32 nNumEnd = -1;
508 if (pLay->IsHideRedlines())
510 pLayoutRLHidden = pLay;
519 const OUString aText = pTextNd->
GetText();
521 const bool bHasCat = nCatStart>=0;
522 const sal_Int32 nCatEnd = bHasCat ? nCatStart +
m_sSetRefName.getLength() : -1;
525 const sal_Int32 nLen = aText.getLength();
548 nStart =
std::min(nNumStart, nCatStart);
549 nEnd = std::max(nNumEnd, nCatEnd);
563 const sal_Int32 nFrom = bHasCat
564 ? std::max(nNumStart + 1, nCatEnd)
568 nStart = bHasCat ? std::max(nNumEnd, nCatEnd) : nNumEnd;
594 nEnd = nNumEnd<0 ? nLen : nNumEnd;
644 pLayoutRLHidden, *pTextNd,
false,
false,
ExpandMode(0));
661 [
this, pTextNd, nNumStart](OUString & rText,
SwRootFrame const*
const pLay)
668 while (pFrame && !pFrame->
IsInside(nNumStartIndex))
672 if( pFrame ||
nullptr != ( pFrame = pSave ))
684 rText = OUString::number(nPageNo);
701 [
this, pTextNd](OUString & rText,
SwRootFrame const*
const pLay)
726 if( !pFieldTextAttr || !pFieldTextAttr->
GetpTextNode() )
742 *pTextNd, nNumStart )
763 bool bClosingParenthesis =
result.second;
771 bClosingParenthesis =
result.second;
781 OSL_FAIL(
"<SwGetRefField::UpdateField(..)> - unknown format type");
789 const SwTextNode& i_rTextNodeOfReferencedItem,
790 const sal_uInt32 nRefNumFormat)
794 : i_rTextNodeOfField);
795 SwTextNode const& rTextNodeOfReferencedItem(pLayout
797 : i_rTextNodeOfReferencedItem);
798 if ( rTextNodeOfReferencedItem.
HasNumber(pLayout) &&
801 OSL_ENSURE( rTextNodeOfReferencedItem.
GetNum(pLayout),
802 "<SwGetRefField::MakeRefNumStr(..)> - referenced paragraph has number, but no <SwNodeNum> instance!" );
806 int nRestrictInclToThisLevel( 0 );
821 const SwNodeNum* pNodeNumForTextNodeOfField(
nullptr );
822 if ( rTextNodeOfField.
HasNumber(pLayout) &&
825 pNodeNumForTextNodeOfField = rTextNodeOfField.
GetNum(pLayout);
829 pNodeNumForTextNodeOfField =
832 if ( pNodeNumForTextNodeOfField )
838 std::size_t nLevel( 0 );
839 while ( nLevel < rFieldNumVec.size() && nLevel < rRefItemNumVec.size() )
841 if ( rRefItemNumVec[nLevel] == rFieldNumVec[nLevel] )
843 nRestrictInclToThisLevel = nLevel + 1;
855 const bool bInclSuperiorNumLabels(
859 OSL_ENSURE( rTextNodeOfReferencedItem.
GetNumRule(),
860 "<SwGetRefField::MakeRefNumStr(..)> - referenced numbered paragraph has no numbering rule set!" );
861 return std::make_pair(
863 *(rTextNodeOfReferencedItem.
GetNum(pLayout)),
864 bInclSuperiorNumLabels,
865 nRestrictInclToThisLevel ),
867 *(rTextNodeOfReferencedItem.
GetNum(pLayout)),
868 true).endsWith(
")") );
871 return std::make_pair(OUString(),
false);
881 return std::unique_ptr<SwField>(pField.release());
910 case REF_PAGE : nPart = ReferenceFieldPart::PAGE ;
break;
911 case REF_CHAPTER : nPart = ReferenceFieldPart::CHAPTER ;
break;
912 case REF_CONTENT : nPart = ReferenceFieldPart::TEXT ;
break;
913 case REF_UPDOWN : nPart = ReferenceFieldPart::UP_DOWN ;
break;
915 case REF_ONLYNUMBER : nPart = ReferenceFieldPart::CATEGORY_AND_NUMBER ;
break;
916 case REF_ONLYCAPTION: nPart = ReferenceFieldPart::ONLY_CAPTION ;
break;
917 case REF_ONLYSEQNO : nPart = ReferenceFieldPart::ONLY_SEQUENCE_NUMBER;
break;
919 case REF_NUMBER: nPart = ReferenceFieldPart::NUMBER;
break;
928 sal_Int16 nSource = 0;
931 case REF_SETREFATTR : nSource = ReferenceFieldSource::REFERENCE_MARK;
break;
932 case REF_SEQUENCEFLD: nSource = ReferenceFieldSource::SEQUENCE_FIELD;
break;
933 case REF_BOOKMARK : nSource = ReferenceFieldSource::BOOKMARK;
break;
934 case REF_OUTLINE : OSL_FAIL(
"not implemented");
break;
935 case REF_FOOTNOTE : nSource = ReferenceFieldSource::FOOTNOTE;
break;
968 rAny <<= static_cast<sal_Int16>(
m_nSeqNo);
986 case ReferenceFieldPart::PAGE: nPart =
REF_PAGE;
break;
987 case ReferenceFieldPart::CHAPTER: nPart =
REF_CHAPTER;
break;
988 case ReferenceFieldPart::TEXT: nPart =
REF_CONTENT;
break;
989 case ReferenceFieldPart::UP_DOWN: nPart =
REF_UPDOWN;
break;
991 case ReferenceFieldPart::CATEGORY_AND_NUMBER: nPart =
REF_ONLYNUMBER;
break;
993 case ReferenceFieldPart::ONLY_SEQUENCE_NUMBER : nPart =
REF_ONLYSEQNO;
break;
995 case ReferenceFieldPart::NUMBER: nPart =
REF_NUMBER;
break;
998 default:
return false;
1005 sal_Int16 nSource = 0;
1010 case ReferenceFieldSource::SEQUENCE_FIELD :
1044 sal_Int16 nSetSeq = 0;
1062 const OUString rPar1 =
GetPar1();
1072 pResId = STR_POOLCOLL_LABEL_ABB;
1075 pResId = STR_POOLCOLL_LABEL_TABLE;
1078 pResId = STR_POOLCOLL_LABEL_FRAME;
1081 pResId = STR_POOLCOLL_LABEL_DRAWING;
1084 pResId = STR_POOLCOLL_LABEL_FIGURE;
1097 return std::make_unique<SwGetRefFieldType>(
m_rDoc );
1102 std::vector<SwFormatField*> vFields;
1104 for(
auto pFormatField: vFields)
1111 nullptr != (pTField = pFormatField->GetTextField()) &&
1125 if (rHint.
GetId() != SfxHintId::SwLegacyModify)
1128 if(!pLegacy->m_pNew && !pLegacy->m_pOld)
1135 CallSwClientNotify(rHint);
1153 sal_Int32
const*
const pEnd(rHint.
GetEnd());
1170 sal_uInt16 nSubType, sal_uInt16 nSeqNo,
1171 sal_Int32* pStt, sal_Int32* pEnd,
1174 OSL_ENSURE( pStt,
"Why did no one check the StartPos?" );
1198 if( pFieldType && pFieldType->HasWriterListeners() &&
1201 std::vector<SwFormatField*> vFields;
1203 for(
auto pFormatField: vFields)
1205 SwTextField *
const pTextField(pFormatField->GetTextField());
1206 if (pTextField && nSeqNo ==
1214 *pEnd = (*pStt) + 1;
1229 const ::sw::mark::IMark* pBkmk = *ppMark;
1230 const SwPosition* pPos = &pBkmk->GetMarkStart();
1236 if(!pBkmk->IsExpanded())
1242 OSL_ENSURE( pTextNd,
1243 "<SwGetRefFieldType::FindAnchor(..)> - node marked by cross-reference bookmark isn't a text node --> crash" );
1244 *pEnd = pTextNd->
Len();
1247 else if(pBkmk->GetOtherMarkPos().GetNode() == pBkmk->GetMarkPos().GetNode())
1248 *pEnd = pBkmk->GetMarkEnd().GetContentIndex();
1263 if( nSeqNo == pFootnoteIdx->GetSeqRefNo() )
1272 const SwNodeIndex* pIdx = pFootnoteIdx->GetStartNode();
1277 if(
nullptr == pTextNd )
1298 std::set<sal_uInt16> aIds;
1299 std::set<sal_uInt16> aDstIds;
1300 std::map<sal_uInt16, sal_uInt16> sequencedIds;
1304 static void GetNoteIdsFromDoc(
SwDoc& rDoc, std::set<sal_uInt16> &rIds );
1305 void GetFieldIdsFromDoc(
SwDoc& rDoc, std::set<sal_uInt16> &rIds );
1306 void AddId( sal_uInt16
id, sal_uInt16 seqNum );
1307 static sal_uInt16 GetFirstUnusedId( std::set<sal_uInt16> &rIds );
1310 explicit RefIdsMap( OUString _aName ) :
aName(
std::move( _aName )), bInit( false ) {}
1322void RefIdsMap::GetFieldIdsFromDoc(
SwDoc& rDoc, std::set<sal_uInt16> &rIds)
1327 std::vector<SwFormatField*> vFields;
1329 for(
const auto pF: vFields)
1336void RefIdsMap::GetNoteIdsFromDoc(
SwDoc& rDoc, std::set<sal_uInt16> &rIds)
1346void RefIdsMap::Init(
SwDoc& rDoc,
SwDoc& rDestDoc,
bool bField )
1353 GetFieldIdsFromDoc( rDestDoc, aIds );
1354 GetFieldIdsFromDoc( rDoc, aDstIds );
1357 for (
const auto& rId : aDstIds)
1358 AddId( GetFirstUnusedId(aIds), rId );
1364 std::vector<SwFormatField*> vFields;
1366 for(
auto pF: vFields)
1368 if(!pF->GetTextField())
1371 sal_uInt16
const n = pSetExp->GetSeqNumber();
1372 pSetExp->SetSeqNumber(sequencedIds[n]);
1378 GetNoteIdsFromDoc( rDestDoc, aIds );
1379 GetNoteIdsFromDoc( rDoc, aDstIds );
1381 for (
const auto& rId : aDstIds)
1382 AddId( GetFirstUnusedId(aIds), rId );
1387 sal_uInt16
const n = pFootnoteIdx->GetSeqRefNo();
1388 pFootnoteIdx->SetSeqNo(sequencedIds[n]);
1397sal_uInt16 RefIdsMap::GetFirstUnusedId( std::set<sal_uInt16> &rIds )
1401 for(
const auto& rId : rIds )
1415void RefIdsMap::AddId( sal_uInt16
id, sal_uInt16 seqNum )
1418 sequencedIds[ seqNum ] = id;
1424 Init( rDoc, rDestDoc, bField);
1426 sal_uInt16
const nSeqNo = rField.
GetSeqNo();
1433 if (sequencedIds.count(nSeqNo))
1435 rField.
SetSeqNo( sequencedIds[nSeqNo] );
1448 if (&rDestDoc == &
m_rDoc)
1461 RefIdsMap aFntMap { OUString() };
1462 std::vector<std::unique_ptr<RefIdsMap>> aFieldMap;
1464 std::vector<SwFormatField*> vFields;
1466 for(
auto pField: vFields)
1473 RefIdsMap* pMap =
nullptr;
1474 for(
auto n = aFieldMap.size();
n; )
1478 pMap = aFieldMap[
n ].get();
1485 aFieldMap.push_back(std::unique_ptr<RefIdsMap>(pMap));
1488 pMap->Check(
m_rDoc, rDestDoc, rRefField,
true);
1494 aFntMap.Check(
m_rDoc, rDestDoc, rRefField,
false);
bool isLetter(const OUString &rStr, sal_Int32 nPos) const
bool isLetterNumeric(const OUString &rStr, sal_Int32 nPos) const
bool isDigit(const OUString &rStr, sal_Int32 nPos) const
virtual SwFieldType * GetSysFieldType(const SwFieldIds eWhich) const =0
virtual SwFieldType * GetFieldType(SwFieldIds nResId, const OUString &rName, bool bDbFieldMatching) const =0
virtual const SwRootFrame * GetCurrentLayout() const =0
wrapper iterator: wraps iterator of implementation while hiding MarkBase class; only IMark instances ...
virtual const_iterator_t getAllMarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of marks.
virtual const_iterator_t findMark(const OUString &rMark) const =0
Finds a mark by name.
const OUString & getBelowWord() const
const OUString & getAboveWord() const
OUString GetNumStr(sal_Int32 nNo) const
void ChangeExpansion(const SwFrame &, const SwContentNode *, bool bSrchNum=false)
const OUString & GetNumber(SwRootFrame const *pLayout=nullptr) const
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
o3tl::sorted_vector< SwRootFrame * > GetAllLayouts()
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
SwFootnoteIdxs & GetFootnoteIdxs()
IDocumentMarkAccess * getIDocumentMarkAccess()
const SwFormatRefMark * GetRefMark(std::u16string_view rName) const
Instances of SwFields and those derived from it occur 0 to n times.
virtual OUString GetName() const
Only in derived classes.
void GatherFields(std::vector< SwFormatField * > &rvFormatFields, bool bCollectOnlyInDocNodes=true) const
Base class of all fields.
virtual void SetLanguage(LanguageType nLng)
void SetFormat(sal_uInt32 const nSet)
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
SwFieldType * GetTyp() const
LanguageType GetLanguage() const
Language at field position.
general base class for all free-flowing frames
const SwRect & getFrameArea() const
Base class of the Writer layout elements.
sal_uInt16 GetVirtPageNum() const
SwFrameType GetType() const
bool IsRightToLeft() const
SwLayoutFrame * GetUpper()
SwPageFrame * FindPageFrame()
static sal_Int32 GetReferenceTextPos(const SwFormatField &rFormat, SwDoc &rDoc, sal_Int32 nHint=0)
Find the index of the reference text following the current field.
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)
SwGetRefFieldType(SwDoc &rDoc)
virtual std::unique_ptr< SwFieldType > Copy() const override
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
Overlay in order to update all ref-fields.
void MergeWithOtherDoc(SwDoc &rDestDoc)
void UpdateGetReferences()
virtual OUString GetPar1() const override
get reference name
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhichId) const override
virtual OUString GetPar2() const override
void SetExpand(const OUString &rStr)
virtual void SetPar1(const OUString &rStr) override
set reference name
bool IsRefToNumItemCrossRefBookmark() const
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
virtual void SetSubType(sal_uInt16 n) override
OUString m_sTextRLHidden
result for layout with redlines hidden
virtual OUString GetFieldName() const override
get name or content
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhichId) override
virtual sal_uInt16 GetSubType() const override
Get/set sub type.
bool IsRefToHeadingCrossRefBookmark() const
const SwTextNode * GetReferencedTextNode() const
void ConvertProgrammaticToUIName()
sal_uInt16 m_nSeqNo
reference to either a SwTextFootnote::m_nSeqNo or a SwSetExpField::mnSeqNo
OUString GetExpandedTextOfReferencedTextNode(SwRootFrame const &rLayout) const
OUString m_sSetReferenceLanguage
const OUString & GetSetRefName() const
virtual std::unique_ptr< SwField > Copy() const override
virtual OUString GetDescription() const override
SwGetRefField(SwGetRefFieldType *, OUString aSetRef, OUString aReferenceLanguage, sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uLong nFormat)
get references
void SetSeqNo(sal_uInt16 n)
virtual ~SwGetRefField() override
sal_uInt16 GetSeqNo() const
Get/set SequenceNo (of interest only for REF_SEQUENCEFLD).
void UpdateField(const SwTextField *pFieldTextAttr)
The <SwTextField> instance, which represents the text attribute for the <SwGetRefField> instance,...
Marks a node in the document model.
const SwNodeNum * GetPrecedingNodeNumOf(const SwTextNode &rTextNode) const
determines the <SwNodeNum> instance, which is preceding the given text node
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
const SwStartNode * FindFooterStartNode() const
const SwStartNode * FindHeaderStartNode() const
const SwStartNode * FindFlyStartNode() const
const SwStartNode * FindFootnoteStartNode() const
SwContentNode * GoNext(SwNodeIndex *) const
OUString MakeRefNumString(const SwNodeNum &rNodeNum, const bool bInclSuperiorNumLabels, const int nRestrictInclToThisLevel) const
OUString MakeNumString(const SwNodeNum &, bool bInclStrings=true) const
SwNumberTree::tNumberVector GetNumberVector() const
Returns level numbers of this node.
const SvxNumberType & GetNumType() const
A page of the document layout.
SwPageDesc * GetPageDesc()
void Top(const tools::Long nTop)
void Left(const tools::Long nLeft)
The root element of a Writer document layout.
bool HasMergedParas() const
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding).
sal_uInt16 GetSeqNumber() const
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
static sal_uInt16 GetPoolIdFromProgName(const OUString &rName, SwGetPoolIdFromName)
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
virtual const sal_Int32 * GetEnd() const override
end position
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
sal_Int32 GetAnyEnd() const
end (if available), else start
const SwFormatFootnote & GetFootnote() const
sal_Int32 GetStart() const
bool HasDummyChar() const
SwTextNode & GetTextNode() const
SwTextNode * GetpTextNode() const
Represents the visualization of a paragraph.
SwTextFrame * GetFollow()
TextFrameIndex MapModelToView(SwTextNode const *pNode, sal_Int32 nIndex) const
bool IsInside(TextFrameIndex nPos) const
Respect the Follows.
SwTextNode is a paragraph in the document model.
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|ExpandMode::HideFieldmarkCommands) const
add 4th optional parameter <bAddSpaceAfterListLabelStr> indicating, when <bWithNum = true> that a spa...
virtual sal_Int32 Len() const override
const SwNodeNum * GetNum(SwRootFrame const *pLayout=nullptr, SwListRedlineType eRedline=SwListRedlineType::SHOW) const
bool IsCountedInList() const
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
bool HasNumber(SwRootFrame const *pLayout=nullptr) const
Returns if this text node has a number.
int GetActualListLevel(SwListRedlineType eRedline=SwListRedlineType::SHOW) const
Returns the actual list level of this text node, when it is a list item.
const OUString & GetText() const
LanguageType GetLang(const sal_Int32 nBegin, const sal_Int32 nLen=0, sal_uInt16 nScript=0) 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...
const SwTextNode & GetTextNode() const
static ShellResource * GetShellRes()
static bool IsLegalName(std::u16string_view rName)
static bool IsLegalName(std::u16string_view rName)
virtual OUString GetName() const override
constexpr TypedWhichId< SwFormatField > RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN)
#define LANGUAGE_HUNGARIAN
ExpandMode
Some helpers for converting model strings to view strings.
std::vector< tSwNumTreeNumber > tNumberVector
constexpr OUStringLiteral last
const SwGetSetExpType GSE_SEQ
Sequence.
Dialog to specify the properties of date form field.
bool IsFieldDeletedInModel(IDocumentRedlineAccess const &rIDRA, SwTextField const &rTextField)
bool IsFootnoteDeleted(IDocumentRedlineAccess const &rIDRA, SwTextFootnote const &rTextFootnote)
bool IsMarkHidden(SwRootFrame const &rLayout, ::sw::mark::IMark const &rMark)
OUString GetExpandTextMerged(SwRootFrame const *const pLayout, SwTextNode const &rNode, bool const bWithNumber, bool const bWithSpacesForLevel, ExpandMode const i_mode)
bool IsMarkHintHidden(SwRootFrame const &rLayout, SwTextNode const &rNode, SwTextAttrEnd const &rHint)
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNode const &rNode)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
@ RES_POOLCOLL_LABEL_DRAWING
Label drawing objects.
@ RES_POOLCOLL_LABEL_FRAME
Label frame.
@ RES_POOLCOLL_LABEL_FIGURE
Label figure.
@ RES_POOLCOLL_LABEL_TABLE
Label table.
@ RES_POOLCOLL_LABEL_ABB
Label illustration.
static void lcl_GetLayTree(const SwFrame *pFrame, std::vector< const SwFrame * > &rArr)
static std::pair< OUString, bool > MakeRefNumStr(SwRootFrame const *pLayout, const SwTextNode &rTextNodeOfField, const SwTextNode &rTextNodeOfReferencedItem, sal_uInt32 nRefNumFormat)
bool IsFrameBehind(const SwTextNode &rMyNd, sal_Int32 nMySttPos, const SwTextNode &rBehindNd, sal_Int32 nSttPos)
static OUString lcl_formatStringByCombiningCharacter(std::u16string_view sText, const sal_Unicode cChar)
static void FilterText(OUString &rText, LanguageType const eLang, std::u16string_view rSetReferenceLanguage)
static void lcl_formatReferenceLanguage(OUString &rRefText, bool bClosingParenthesis, LanguageType eLang, std::u16string_view rReferenceLanguage)
@ REF_PAGE_PGDESC
"As Page Style"
@ REF_UPDOWN
"Above/Below"
@ REF_NUMBER
new reference format types for referencing bookmarks and set references
@ REF_ONLYSEQNO
"Numbering"
@ REF_ONLYNUMBER
"Category and Number"
@ REF_ONLYCAPTION
"Caption Text"
@ REF_NUMBER_NO_CONTEXT
"Number (no context)"
@ REF_NUMBER_FULL_CONTEXT
"Number (full context)"
OUString aGetRefField_RefItemNotFound
Marks a position in the document model.
sal_Int32 GetContentIndex() const
OUString SwResId(TranslateId aId)
constexpr sal_uInt8 MAXLEVEL
#define FIELD_PROP_USHORT1
#define FIELD_PROP_USHORT2
#define FIELD_PROP_SHORT1