20#include <libxml/xmlwriter.h>
29#include <officecfg/Office/Common.hxx>
30#include <osl/diagnose.h>
35#include <com/sun/star/i18n/WordType.hpp>
36#include <com/sun/star/i18n/XBreakIterator.hpp>
74#include <UndoManager.hxx>
109 const bool bLocked = pNode->IsModifyLocked();
123 std::vector<sal_uInt16> aClearWhichIds;
127 aListAttrSet.Set(*pAttrSetOfNode);
128 if ( aListAttrSet.Count() )
130 aSavedAttrsSet.Put(aListAttrSet);
135 aClearWhichIds.push_back( pItem->
Which() );
142 pItem && !pItem->GetValue().isEmpty())
144 aSavedAttrsSet.Put(*pItem);
148 pItem && pItem->GetPageDesc())
150 aSavedAttrsSet.Put(*pItem);
154 pItem && pItem->GetBreak() != SvxBreak::NONE)
156 aSavedAttrsSet.Put(*pItem);
160 pItem && !pItem->GetValue().isEmpty())
162 aSavedAttrsSet.Put(*pItem);
166 pItem && !pItem->GetValue().isEmpty())
168 aSavedAttrsSet.Put(*pItem);
174 const bool bKeepAttributes =
176 if ( bKeepAttributes )
182 pNode->UnlockModify();
190 OSL_ENSURE( !bKeepAttributes,
191 "<lcl_RstAttr(..)> - certain attributes are kept, but not needed." );
200 ( aSavedAttrsSet.GetItemState( pItem->Which(),
false ) != SfxItemState::SET ) )
215 if (bKeepAttributes && aSavedAttrsSet.Count())
219 pNode->
SetAttr(aSavedAttrsSet);
222 pNode->UnlockModify();
236 pHst = &pUndo->GetHistory();
241 pStt, pEnd, pHst,
nullptr, pLayout );
252 const bool bSendDataChangedEvents,
256 std::optional<SwPaM> oExtraPaM;
266 oExtraPaM.emplace( *rRg.
GetPoint() );
278 nPtPos = *pURLAttr->
End();
289 if( aBndry.startPos < nPtPos && nPtPos < aBndry.endPos )
291 nMkPos = aBndry.startPos;
292 nPtPos = aBndry.endPos;
308 std::optional< SwDataChanged > oDataChanged;
309 if ( bSendDataChangedEvents )
311 oDataChanged.emplace( *pPam );
318 if( !rAttrs.
empty() )
322 pHst = &pUndo->GetHistory();
326 auto [pStt, pEnd] = pPam->
StartEnd();
328 pStt, pEnd, pHst,
nullptr, pLayout);
336 for(
auto it = rAttrs.
rbegin(); it != rAttrs.
rend(); ++it )
341 if( aDelSet.Count() )
347 if( pStt->GetContentIndex() )
366 if( pEnd->GetContentIndex() == pEnd->GetNode().GetContentNode()->Len() )
372 else if( pStt->GetNode() != pEnd->GetNode() || !pStt->GetContentIndex() )
389 if( aTmpStt < aTmpEnd )
407 oDataChanged.reset();
413 if (!
SW_MOD()->GetModuleConfig()->IsStoreRsid())
426 bool const bRet(pTextNode->
SetAttr(aSet, nStart,
444 if (!
SW_MOD()->GetModuleConfig()->IsStoreRsid())
453 return pTextNode->
SetAttr( aRsid );
491 if (
auto pObj = pShapeFormat->FindRealSdrObject())
504 std::unique_ptr<SwUndo> pUndo;
508 bool bAttrReset =
false;
509 for (
const auto& nWhichId : rIds)
531 sal_uInt16 nOldCnt = rChgTabStop.
Count();
532 if( !nOldCnt || nOldWidth == nNewWidth )
537 for(
n = nOldCnt;
n ; --
n )
538 if( SvxTabAdjust::Default != rChgTabStop[
n - 1].GetAdjustment() )
542 rChgTabStop.
Remove(
n, nOldCnt -
n );
560 sw::BroadcastingModify aCallMod;
568 bool bCheckSdrDflt =
false;
569 const sal_uInt16 nWhich = pItem->
Which();
570 aOld.Put(
GetAttrPool().GetDefaultItem( nWhich ) );
578 bCheckSdrDflt =
nullptr != pSdrPool;
584 bCheckSdrDflt =
nullptr != pSdrPool;
605 if( 0 != nSlotId && nSlotId != nWhich )
607 sal_uInt16 nEdtWhich = pSdrPool->
GetWhich( nSlotId );
608 if( 0 != nEdtWhich && nSlotId != nEdtWhich )
610 std::unique_ptr<SfxPoolItem> pCpy(pItem->
Clone());
611 pCpy->SetWhich( nEdtWhich );
620 if( aNew.
Count() && aCallMod.HasWriterListeners() )
628 if( pTmpItem && pTmpItem->
Count() )
634 SwTwips nNewWidth = (*pTmpItem)[ 0 ].GetTabPos(),
656 if( aNew.
Count() && aCallMod.HasWriterListeners() )
665 for(
SwClient* pClient = aClientIter.
First(); pClient; pClient = aClientIter.
Next())
666 aCallMod.Remove( pClient );
684 SfxHintId::StyleSheetErased);
689 std::make_unique<SwUndoCharFormatDelete>(pDel, *
this));
692 delete (*mpCharFormatTable)[nFormat];
701 OSL_ENSURE( SIZE_MAX != nFormat,
"Format not found," );
709 OSL_ENSURE(
false,
"Format is not in the DocArray any more, "
710 "so it can be deleted with delete" );
720 SfxStyleFamily::Frame,
721 SfxHintId::StyleSheetErased);
726 std::make_unique<SwUndoFrameFormatDelete>(pFormat, *
this));
741 SAL_WARN(
"sw",
"FrameFormat not found.");
789 if (!pFormat->GetInfo(aGetHt))
799 return *
const_cast<SwTableFormat*
>((*mpTableFrameFormatTable)[nFormat]);
808 if (!pFormat->GetInfo(aGetHt))
810 if (
index == nFormat)
816 throw std::out_of_range(
"Format index out of range.");
831 bool bBroadcast,
bool bAuto)
842 std::make_unique<SwUndoFrameFormatCreate>(pFormat, pDerivedFrom, *
this));
848 SfxHintId::StyleSheetCreated);
856 bool bBroadcast,
bool bAuto)
859 pFrameFormat =
MakeFrameFormat( rFormatName, pFrameFormat, bBroadcast, bAuto );
875 std::make_unique<SwUndoCharFormatCreate>(pFormat, pDerivedFrom, *
this));
881 SfxHintId::StyleSheetCreated);
889 bool bBroadcast,
bool )
892 pCharFormat =
MakeCharFormat( rFormatName, pCharFormat, bBroadcast );
910 std::make_unique<SwUndoTextFormatCollCreate>(pFormatColl, pDerivedFrom,
916 SfxHintId::StyleSheetCreated);
923 bool bBroadcast,
bool )
927 return pTextFormatColl;
935 rFormatName, pDerivedFrom );
943 std::make_unique<SwUndoCondTextFormatCollCreate>(pFormatColl, pDerivedFrom,
949 SfxHintId::StyleSheetCreated);
968 OSL_ENSURE( nFormatColl,
"Remove of Coll 0." );
977 SfxHintId::StyleSheetErased);
981 std::unique_ptr<SwUndoTextFormatCollDelete> pUndo;
1006 OSL_ENSURE( SIZE_MAX != nFormat,
"Collection not found," );
1014 if( pCNd ==
nullptr)
1042 bool bChangeOfListStyleAtParagraph(
true );
1046 if ( pNumRuleAtParagraph )
1050 if ( rNumRuleItemAtParagraphStyle.
GetValue() ==
1051 pNumRuleAtParagraph->
GetName() )
1053 bChangeOfListStyleAtParagraph =
false;
1058 if ( bChangeOfListStyleAtParagraph )
1060 std::unique_ptr< SwRegHistory > pRegH;
1103 const bool bResetListAttrs,
1107 auto [pStt, pEnd] = rRg.
StartEnd();
1113 std::unique_ptr<SwUndoFormatColl> pUndo(
new SwUndoFormatColl( rRg, pFormat,
1116 pHst = pUndo->GetHistory();
1121 pStt, pEnd, pHst,
nullptr, pLayout);
1143 FNCopyFormat fnCopyFormat,
const SwFormat& rDfltFormat )
1147 if( !rFormat.
IsAuto() || !rFormat.GetRegisteredIn() )
1159 fnCopyFormat, rDfltFormat );
1163 SwFormat* pNewFormat = (this->*fnCopyFormat)( rFormat.
GetName(), pParent,
false, true );
1233 if(
this != rColl.
GetDoc() )
1239 const OUString& rName = pItem->
GetValue();
1240 if( !rName.isEmpty() )
1286 FNCopyFormat fnCopyFormat,
1304 (this->*fnCopyFormat)( pSrc->
GetName(), &rDfltFormat,
false, true );
1334 aTmpAttrSet.
Put( aPageDesc );
1391 std::unique_ptr<SfxPoolItem> pNewItem(pItem->
Clone());
1395 pOldFormat = pNewItem->StaticWhichCast(
RES_HEADER).GetHeaderFormat();
1397 pOldFormat = pNewItem->StaticWhichCast(
RES_FOOTER).GetFooterFormat();
1409 if( pContent->GetContentIdx() )
1416 const SwNode& rCSttNd = pContent->GetContentIdx()->GetNode();
1430 pNewItem->StaticWhichCast(
RES_HEADER).RegisterToFormat(*pNewFormat);
1432 pNewItem->StaticWhichCast(
RES_FOOTER).RegisterToFormat(*pNewFormat);
1439 bool bNotifyLayout =
false;
1447 bNotifyLayout =
true;
1469 bNotifyLayout =
true;
1539 if( bNotifyLayout && pTmpRoot )
1542 aLayout->AllCheckPageDescs();
1550 rDstDesc.
GetMaster().CallSwClientNotify(aHint);
1551 rDstDesc.
GetLeft().CallSwClientNotify(aHint);
1557 for (
bool bFirst : {
true,
false })
1558 for (
bool bLeft : {
true,
false })
1559 for (
bool bHeader : {
true,
false })
1561 if (!bLeft && !bFirst)
1586 if (bIncludePageStyles)
1634 SAL_WARN(
"sw.core",
"Found unknown auto SwNumRule during reset!" );
1657 pHistory = &pUndo->GetHistory();
1662 const sal_Int32 nDefDist = rTabItem.
Count() ? rTabItem[0].GetTabPos() : 1134;
1665 while( aIdx <= rEnd.
GetNode() )
1682 if ( nListLevel >= 0 )
1684 const SwNumFormat& rFormat = pRule->
Get(o3tl::narrowing<sal_uInt16>(nListLevel));
1691 if (indents & ::sw::ListLevelIndents::FirstLine)
1702 nNext = ( nNext / nDefDist ) * nDefDist;
1740 pFormat->
SetFormatName(
"TableBox" + OUString::number(
reinterpret_cast<sal_IntPtr
>(pFormat)));
1748 pFormat->
SetFormatName(
"TableLine" + OUString::number(
reinterpret_cast<sal_IntPtr
>(pFormat)));
1767 : pNFormat( nullptr )
1770 if( &rSrc != &rDest )
1780 if( &rSrc != &rDest )
1782 MergeWithOtherDoc( rDest );
1828 if (pSet && pSet->
Count())
1866 std::vector<WhichPair> whichIds;
1870 whichIds.push_back({pItem->Which(), pItem->Which()});
1876 currentSet.
Put(currentSet.
Get(rPair.first));
1883 SwPaM endPam(*pTNd, nEnd);
1916 std::make_unique<SwUndoFormatAttr>(std::move(aOldSet), rFormat,
true));
1929 std::unique_ptr<SwUndo> pUndo;
1931 switch (rFormat.
Which())
1935 eFamily = SfxStyleFamily::Char;
1939 eFamily = SfxStyleFamily::Para;
1943 eFamily = SfxStyleFamily::Frame;
1971 pWriter = xmlNewTextWriterFilename(
"nodes.xml", 0);
1972 xmlTextWriterSetIndent(pWriter,1);
1973 (void)xmlTextWriterSetIndentString(pWriter, BAD_CAST(
" "));
1974 (void)xmlTextWriterStartDocument(pWriter,
nullptr,
nullptr,
nullptr);
1977 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwDoc"));
1978 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
1998 pModel->dumpAsXml(pWriter);
2000 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"mbModified"));
2001 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"), BAD_CAST(OString::boolean(
getIDocumentState().IsModified()).getStr()));
2002 (void)xmlTextWriterEndElement(pWriter);
2004 (void)xmlTextWriterEndElement(pWriter);
2007 (void)xmlTextWriterEndDocument(pWriter);
2008 xmlFreeTextWriter(pWriter);
2014 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwDBData"));
2016 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"sDataSource"), BAD_CAST(
sDataSource.toUtf8().getStr()));
2017 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"sCommand"), BAD_CAST(
sCommand.toUtf8().getStr()));
2018 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"nCommandType"), BAD_CAST(OString::number(
nCommandType).getStr()));
2020 (void)xmlTextWriterEndElement(pWriter);
2025 std::set<Color> aDocColors;
2028 for (sal_uInt16 nAttrib : pAttribs)
2032 auto pColorItem =
static_cast<const SvxColorItem*
>(pItem);
2033 Color aColor( pColorItem->GetValue() );
2035 aDocColors.insert(aColor);
2054 if ( pTextFormatColls )
2056 for (
auto pTextFormatColl : *pTextFormatColls )
2058 if ( pTextFormatColl->IsDefault() ||
2059 ! pTextFormatColl->IsAssignedToListLevelOfOutlineStyle() )
2066 if ( !pParentTextFormatColl )
const OUString & GetValue() const
virtual void InsertItemSet(const SwPaM &rRg, const SfxItemSet &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr)=0
virtual SwFieldType * GetSysFieldType(const SwFieldIds eWhich) const =0
virtual const SwFieldTypes * GetFieldTypes() const =0
virtual const SwRootFrame * GetCurrentLayout() const =0
virtual const SwExtraRedlineTable & GetExtraRedlineTable() const =0
virtual void SetRedlineFlags_intern(RedlineFlags eMode)=0
Set a new redline mode.
virtual const SwRedlineTable & GetRedlineTable() const =0
virtual AppendResult AppendRedline(SwRangeRedline *pNewRedl, bool bCallDelete)=0
Append a new redline.
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
virtual void SetModified()=0
Must be called manually at changes of format.
const SfxPoolItem * GetCurItem() const
const SfxPoolItem * NextItem()
Item2Range GetItemSurrogates(sal_uInt16 nWhich) const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
SfxItemPool * GetSecondaryPool() const
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
sal_uInt16 GetSlotId(sal_uInt16 nWhich) const
void SetPoolDefaultItem(const SfxPoolItem &)
const WhichRangesContainer & GetRanges() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void Differentiate(const SfxItemSet &rSet)
void InvalidateItem(sal_uInt16 nWhich)
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
void Remove(const sal_uInt16 nPos, const sal_uInt16 nLen=1)
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
tools::Long GetTextLeft() const
SwAttrPool * GetPool() const
css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIter() const
const css::lang::Locale & GetLocale(const LanguageType aLang)
const SwFormatCollConditions & GetCondColls() const
SwFormatColl * GetFormatColl() const
bool HasSwAttrSet() const
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
virtual bool SetAttr(const SfxPoolItem &)
made virtual
const SwAttrSet * GetpSwAttrSet() const
virtual SwFormatColl * ChgFormatColl(SwFormatColl *)
virtual bool ResetAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0)
virtual sal_uInt16 ResetAllAttr()
void CopyPageDesc(const SwPageDesc &rSrcDesc, SwPageDesc &rDstDesc, bool bCopyPoolIds=true)
Copy the complete PageDesc - beyond document and "deep"! Optionally copying of PoolFormatId,...
void CopyPageDescHeaderFooterImpl(bool bCpyHeader, const SwFrameFormat &rSrcFormat, SwFrameFormat &rDestFormat)
void RstTextAttrs(const SwPaM &rRg, bool bInclRefToxMark=false, bool bExactRange=false, SwRootFrame const *pLayout=nullptr)
SwTextFormatColl * CopyTextColl(const SwTextFormatColl &rColl)
copy TextNodes
bool mbIsAutoFormatRedline
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
SwFormat * MakeFrameFormat_(const OUString &, SwFormat *, bool, bool)
void CopyFormatArr(const SwFormatsBase &rSourceArr, SwFormatsBase const &rDestArr, FNCopyFormat fnCopyFormat, SwFormat &rDfltFormat)
SwTableBoxFormat * MakeTableBoxFormat()
SwConditionTextFormatColl * MakeCondTextFormatColl(const OUString &rFormatName, SwTextFormatColl *pDerivedFrom, bool bBroadcast=false)
void EnsureNumberFormatter()
size_t GetTableFrameFormatCount(bool bUsed) const
const std::unique_ptr< ::SwContentControlManager > m_pContentControlManager
void DelCharFormat(size_t nFormat, bool bBroadcast=false)
Delete the formats.
std::unique_ptr< SwGrfFormatColl > mpDfltGrfFormatColl
SwFlyFrameFormat * MakeFlyFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom)
Create the formats.
SwFrameFormat * MakeFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom, bool bBroadcast=false, bool bAuto=true)
void BroadcastStyleOperation(const OUString &rName, SfxStyleFamily eFamily, SfxHintId nOp)
IDocumentState const & getIDocumentState() const
SwFormat * MakeTextFormatColl_(const OUString &, SwFormat *, bool, bool)
SwFormat * CopyFormat(const SwFormat &rFormat, const SwFormatsBase &rFormatArr, FNCopyFormat fnCopyFormat, const SwFormat &rDfltFormat)
Copy the formats to itself.
void SetTextFormatCollByAutoFormat(const SwPosition &rPos, sal_uInt16 nPoolId, const SfxItemSet *pSet)
const SwCharFormat * GetDfltCharFormat() const
void ChgFormat(SwFormat &rFormat, const SfxItemSet &rSet)
std::unique_ptr< SwTextFormatColls > mpTextFormatCollTable
const std::unique_ptr< ::sw::UndoManager > m_pUndoManager
o3tl::sorted_vector< SwRootFrame * > GetAllLayouts()
void UpdateRsid(const SwPaM &rRg, sal_Int32 nLen)
Set the rsid of the next nLen symbols of rRg to the current session number.
void dumpAsXml(xmlTextWriterPtr=nullptr) const
Dumps the entire nodes structure to the given destination (file nodes.xml in the current directory by...
SwTableLineFormat * MakeTableLineFormat()
SvNumberFormatter * mpNumberFormatter
SwNumRule * FindNumRulePtr(const OUString &rName) const
SwTableFormat * MakeTableFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom)
SwGrfFormatColl * CopyGrfColl(const SwGrfFormatColl &rColl)
copy the graphic nodes
std::unique_ptr< SwNodes > m_pNodes
void SetAttr(const SfxPoolItem &, SwFormat &)
Set attribute in given format.1y If Undo is enabled, the old values is added to the Undo history.
void SetDefault(const SfxPoolItem &)
Set attribute as new default attribute in current document.
const SwNumRuleTable & GetNumRuleTable() const
void RenameFormat(SwFormat &rFormat, const OUString &sNewName, bool bBroadcast=false)
const sw::FrameFormats< SwFrameFormat * > * GetFrameFormats() const
std::unique_ptr< SwCharFormats > mpCharFormatTable
SwNumRule * GetOutlineNumRule() const
const SwCharFormats * GetCharFormats() const
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
SwPageDesc * MakePageDesc(const OUString &rName, const SwPageDesc *pCpy=nullptr, bool bRegardLanguage=true, bool bBroadcast=false)
void ResetAttrAtFormat(const std::vector< sal_uInt16 > &rIds, SwFormat &rChangedFormat)
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
std::unique_ptr< SwTextFormatColl > mpDfltTextFormatColl
SwCharFormat * CopyCharFormat(const SwCharFormat &)
copy the char format
SwFrameFormat * CopyFrameFormat(const SwFrameFormat &)
copy the frame format
const SfxPoolItem & GetDefault(sal_uInt16 nFormatHint) const
Get the default attribute in this document.
const SwTextFormatColls * GetTextFormatColls() const
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
std::unique_ptr< sw::TableFrameFormats > mpTableFrameFormatTable
std::unique_ptr< sw::FrameFormats< SwFrameFormat * > > mpFrameFormatTable
::sw::DocumentContentOperationsManager const & GetDocumentContentOperationsManager() const
void ResetAttrs(const SwPaM &rRg, bool bTextAttr=true, const o3tl::sorted_vector< sal_uInt16 > &rAttrs=o3tl::sorted_vector< sal_uInt16 >(), const bool bSendDataChangedEvents=true, SwRootFrame const *pLayout=nullptr)
Reset attributes.
const std::unique_ptr< ::sw::mark::MarkManager > mpMarkManager
std::unique_ptr< SwNumRuleTable > mpNumRuleTable
bool DontExpandFormat(const SwPosition &rPos, bool bFlag=true)
SwTextFormatColl * FindTextFormatCollByName(const OUString &rName) const
SwGrfFormatColl * MakeGrfFormatColl(const OUString &rFormatName, SwGrfFormatColl *pDerivedFrom)
std::unique_ptr< SwSectionFormats > mpSectionFormatTable
SwTableFormat & GetTableFrameFormat(size_t nFormat, bool bUsed) const
void DelTextFormatColl(size_t nFormat, bool bBroadcast=false)
void DelFrameFormat(SwFrameFormat *pFormat, bool bBroadcast=false)
bool UpdateParRsid(SwTextNode *pTextNode, sal_uInt32 nVal=0)
SwTextFormatColl * MakeTextFormatColl(const OUString &rFormatName, SwTextFormatColl *pDerivedFrom, bool bBroadcast=false)
Create the FormatCollections.
const SwAttrPool & GetAttrPool() const
void DelTableFrameFormat(SwTableFormat *pFormat)
std::unique_ptr< SwCharFormat > mpDfltCharFormat
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
std::unique_ptr< SwFrameFormat > mpDfltFrameFormat
SwCharFormat * MakeCharFormat(const OUString &rFormatName, SwCharFormat *pDerivedFrom, bool bBroadcast=false)
const SwFrameFormat * GetDfltFrameFormat() const
std::set< Color > GetDocColors()
SwFormat * MakeCharFormat_(const OUString &, SwFormat *, bool, bool)
SwDrawFrameFormat * MakeDrawFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom)
const std::unique_ptr< ::sw::DocumentSettingManager > m_pDocumentSettingManager
void ReplaceStyles(const SwDoc &rSource, bool bIncludePageStyles=true)
const sw::FrameFormats< sw::SpzFrameFormat * > * GetSpzFrameFormats() const
std::unique_ptr< sw::FrameFormats< sw::SpzFrameFormat * > > mpSpzFrameFormatTable
bool SetTextFormatColl(const SwPaM &rRg, SwTextFormatColl *pFormat, const bool bReset=true, const bool bResetListAttrs=false, SwRootFrame const *pLayout=nullptr)
Add 4th optional parameter <bResetListAttrs>.
void CopyFooter(const SwFrameFormat &rSrcFormat, SwFrameFormat &rDestFormat)
Copy footer (with contents) from SrcFormat to DestFormat.
SvNumberFormatter * GetNumberFormatter(bool bCreate=true)
::sw::UndoManager & GetUndoManager()
void CopyHeader(const SwFrameFormat &rSrcFormat, SwFrameFormat &rDestFormat)
Copy header (with contents) from SrcFormat to DestFormat (can also be copied into other document).
void SetFormatItemByAutoFormat(const SwPaM &rPam, const SfxItemSet &)
sal_uInt16 MakeNumRule(const OUString &rName, const SwNumRule *pCpy=nullptr, bool bBroadcast=false, const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode=SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
SwFrameFormat * FindFrameFormatByName(const OUString &rName) const
std::unique_ptr< SwGrfFormatColls > mpGrfFormatCollTable
void MoveLeftMargin(const SwPaM &rPam, bool bRight, bool bModulus, SwRootFrame const *pLayout=nullptr)
Adjust left margin via object bar (similar to adjustment of numerations).
void dumpAsXml(xmlTextWriterPtr pWriter) const
Content, content of frame (header, footer, fly).
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
void RegisterToPageDesc(SwPageDesc &)
SwPageDesc * GetPageDesc()
void Add(const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue, SwNodeOffset nNodeIdx)
Marks a node in the document model.
Base class of the Writer document model elements.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
Merge GetRedlineMergeFlag() const
SwContentNode * GetContentNode()
const SwEndNode * EndOfSectionNode() const
void ForEach(FnForEach_SwNodes fnForEach, void *pArgs=nullptr)
static SwStartNode * MakeEmptySection(SwNode &rWhere, SwStartNodeType=SwNormalStartNode)
Create an empty section of Start- and EndNote.
void Copy_(const SwNodeRange &rRg, SwNode &rInsPos, bool bNewFrames=true) const
const SwNumFormat & Get(sal_uInt16 i) const
void SetInvalidRule(bool bFlag)
const OUString & GetName() const
SwNumRule & CopyNumRule(SwDoc &, const SwNumRule &)
A kind of copy-constructor to make sure the num formats are attached to the correctCharFormats of a d...
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
std::pair< const SwPosition *, const SwPosition * > StartEnd() const
Because sometimes the cost of the operator<= can add up.
const SwPosition * End() const
const SwPosition * GetPoint() const
const SwPosition * Start() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
sal_uInt16 GetPoolFormatId() const
Query and set PoolFormat-Id.
sal_uInt16 GetPoolHelpId() const
void StashFrameFormat(const SwFrameFormat &rFormat, bool bHeader, bool bLeft, bool bFirst)
Remember original header/footer formats even when they are hidden by "sharing".
const OUString & GetName() const
void SetPoolHlpFileId(sal_uInt8 const nId)
void SetFollow(const SwPageDesc *pNew)
SwFrameFormat & GetMaster()
bool IsHeaderShared() const
const SvxNumberType & GetNumType() const
bool IsFirstShared() const
bool IsFooterShared() const
SwFrameFormat & GetFirstLeft()
SwFrameFormat & GetFirstMaster()
void SetPoolFormatId(sal_uInt16 const nId)
void SetPoolHelpId(sal_uInt16 const nId)
bool GetLandscape() const
void SetNumType(const SvxNumberType &rNew)
void SetFootnoteInfo(const SwPageFootnoteInfo &rNew)
SwFrameFormat & GetLeft()
const SwPageDesc * GetFollow() const
void WriteUseOn(UseOnPage const eNew)
const SwPageFootnoteInfo & GetFootnoteInfo() const
UseOnPage ReadUseOn() const
void SetLandscape(bool bNew)
const SwFrameFormat * GetStashedFrameFormat(bool bHeader, bool bLeft, bool bFirst) const
Used to restore hidden header/footer formats.
SwPageDescsBase::size_type size_type
void dumpAsXml(xmlTextWriterPtr pWriter) const
void SetExtraData(const SwRedlineExtraData *pData)
ExtraData gets copied, the pointer is therefore not taken over by the RedLineObject.
void dumpAsXml(xmlTextWriterPtr pWriter) const
The root element of a Writer document layout.
bool HasMergedParas() const
Starts a section of nodes in the document model.
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
const sal_Int32 * End() const
sal_Int32 GetStart() const
const SwFormatINetFormat & GetINetFormat() const
static bool changeAnchor(SwFrameFormat *pShape, SdrObject *pObj)
Sets the anchor of the associated textframe of the given shape, and returns true on success.
static void syncFlyFrameAttr(SwFrameFormat &rShape, SfxItemSet const &rSet, SdrObject *pObj)
Similar to syncProperty(), but used by the internal API (e.g. for UI purposes).
static bool isTextBox(const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr)
Is the frame format a text box?
Represents the style of a paragraph.
bool IsAssignedToListLevelOfOutlineStyle() const
SwTextFormatColl & GetNextTextFormatColl() const
void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
void SetNextTextFormatColl(SwTextFormatColl &rNext)
Inline implementations.
int GetAssignedOutlineStyleLevel() const
Represents the visualization of a paragraph.
SwTextNode const * GetTextNodeForParaProps() const
SwTextNode is a paragraph in the document model.
bool GetParaAttr(SfxItemSet &rSet, sal_Int32 nStt, sal_Int32 nEnd, const bool bOnlyTextAttr=false, const bool bGetFromChrFormat=true, const bool bMergeIndentValuesOfNumRule=false, SwRootFrame const *pLayout=nullptr) const
Query the attributes of textnode over the range.
void FormatToTextAttr(SwTextNode *pNd)
Convey attributes of an AttrSet (AutoFormat) to SwpHintsArray.
::sw::ListLevelIndents AreListLevelIndentsApplicable() const
Determines, if the list level indent attributes can be applied to the paragraph.
virtual bool SetAttr(const SfxPoolItem &) override
overriding to handle change of certain paragraph attributes
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
int GetActualListLevel(SwListRedlineType eRedline=SwListRedlineType::SHOW) const
Returns the actual list level of this text node, when it is a list item.
SwTextAttr * GetTextAttrAt(sal_Int32 const nIndex, sal_uInt16 const nWhich, ::sw::GetTextAttrMode const eMode=::sw::GetTextAttrMode::Default) const
get the innermost text attribute covering position nIndex.
const OUString & GetText() const
LanguageType GetLang(const sal_Int32 nBegin, const sal_Int32 nLen=0, sal_uInt16 nScript=0) const
bool DontExpandFormat(sal_Int32 nContentIdx, bool bFlag=true, bool bFormatToTextAttributes=true)
When appropriate set DontExpand-flag at INet or character styles respectively.
SwTextFormatColl * GetTextColl() const
Typing one or more characters to a single paragraph.
std::vector< SwTextFormatColl * >::const_iterator const_iterator
std::vector< SwNumRule * >::size_type size_type
const_reverse_iterator rend() const
const_iterator begin() const
const_reverse_iterator rbegin() const
static bool lcl_RstTextAttr(SwNode *pNd, void *pArgs)
@params pArgs contains the document's ChrFormatTable Is need for selections at the beginning/end and ...
void CopyFlyInFlyImpl(const SwNodeRange &rRg, SwPaM const *const pCopiedPaM, SwNode &rStartIdx, const bool bCopyFlyAtFly=false, SwCopyFlags flags=SwCopyFlags::Default) const
bool UndoWasEnabled() const
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
struct _xmlTextWriter * xmlTextWriterPtr
static void SetTextFormatCollNext(SwTextFormatColl *pTextColl, const SwTextFormatColl *pDel)
static bool lcl_RstAttr(SwNode *pNd, void *pArgs)
static bool lcl_SetTextFormatColl(SwNode *pNode, void *pArgs)
static bool lcl_SetNewDefTabStops(SwTwips nOldWidth, SwTwips nNewWidth, SvxTabStopItem &rChgTabStop)
constexpr TypedWhichId< SfxStringItem > RES_FRMATR_STYLE_NAME(134)
constexpr TypedWhichId< SfxStringItem > RES_PARATR_LIST_ID(RES_PARATR_LIST_BEGIN)
bool isTXTATR(const sal_uInt16 nWhich)
bool isCHRATR(const sal_uInt16 nWhich)
constexpr sal_uInt16 RES_CHRATR_END(46)
bool isPARATR_LIST(const sal_uInt16 nWhich)
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
constexpr TypedWhichId< SvxFirstLineIndentItem > RES_MARGIN_FIRSTLINE(91)
constexpr sal_uInt16 RES_UNKNOWNATR_END(160)
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(166)
constexpr TypedWhichId< SwFormatHeader > RES_HEADER(102)
bool isDrawingLayerAttribute(const sal_uInt16 nWhich)
constexpr TypedWhichId< SfxInt16Item > RES_PARATR_LIST_LEVEL(83)
constexpr sal_uInt16 RES_FRMATR_END(141)
constexpr TypedWhichId< SfxStringItem > RES_FRMATR_CONDITIONAL_STYLE_NAME(135)
constexpr TypedWhichId< SfxInt16Item > RES_PARATR_LIST_RESTARTVALUE(85)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_HIGHLIGHT(42)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SvxAdjustItem > RES_PARATR_ADJUST(64)
constexpr TypedWhichId< SvxTabStopItem > RES_PARATR_TABSTOP(68)
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
constexpr sal_uInt16 RES_PARATR_LIST_BEGIN(RES_PARATR_END)
constexpr TypedWhichId< SwCharFormat > RES_CHRFMT(RES_FMT_BEGIN)
constexpr TypedWhichId< SwFormatFooter > RES_FOOTER(103)
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
constexpr sal_uInt16 RES_UNKNOWNATR_BEGIN(RES_BOXATR_END)
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(165)
constexpr TypedWhichId< SvxRsidItem > RES_CHRATR_RSID(39)
constexpr TypedWhichId< SwFormatAutoFormat > RES_PARATR_LIST_AUTOFMT(87)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(100)
bool isFRMATR(const sal_uInt16 nWhich)
bool isBOXATR(const sal_uInt16 nWhich)
constexpr TypedWhichId< SvxTextLeftMarginItem > RES_MARGIN_TEXTLEFT(92)
constexpr TypedWhichId< SwTextFormatColl > RES_TXTFMTCOLL(163)
constexpr TypedWhichId< SvXMLAttrContainerItem > RES_TXTATR_UNKNOWN_CONTAINER(54)
constexpr TypedWhichId< SfxBoolItem > RES_PARATR_LIST_ISCOUNTED(86)
constexpr TypedWhichId< SfxBoolItem > RES_PARATR_LIST_ISRESTART(84)
constexpr TypedWhichId< SvxRsidItem > RES_PARATR_RSID(80)
bool isPARATR(const sal_uInt16 nWhich)
constexpr TypedWhichId< SwFormatContent > RES_CNTNT(101)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
constexpr sal_uInt16 RES_TXTATR_END(RES_TXTATR_NOEND_END)
constexpr sal_uInt16 POOLATTR_END(RES_UNKNOWNATR_END)
constexpr TypedWhichId< SwFrameFormat > RES_FRMFMT(161)
bool isGRFATR(const sal_uInt16 nWhich)
const SfxPoolItem * GetDfltAttr(sal_uInt16 nWhich)
Get the default attribute from corresponding default attribute table.
#define SAL_WARN(area, stream)
Reference< XComponentContext > getProcessComponentContext()
bool HasOutlineStyleToBeWrittenAsNormalListStyle(SwDoc &rDoc)
method to check, if the outline style has to written as a normal list style
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
std::pair< SwTextNode *, SwTextNode * > GetFirstAndLastNode(SwRootFrame const &rLayout, SwNode const &rPos)
void CopyBookmarks(const SwPaM &rPam, const SwPosition &rCpyPam, SwCopyFlags flags)
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNode const &rNode)
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
void dumpAsXml(xmlTextWriterPtr pWriter) const
Marks a position in the document model.
void SetContent(sal_Int32 nContentIndex)
Set content index, only valid to call this if the position points to a SwContentNode subclass.
sal_Int32 GetContentIndex() const
Parameters for _Rst and lcl_SetTextFormatColl.
SwRootFrame const *const pLayout
SwFormatColl * pFormatColl
bool bExactRange
From the attributes included in the range, delete only the ones which have exactly same range....
const SfxItemSet * pDelSet
std::pair< sal_uInt16, sal_uInt16 > WhichPair
NF_EVALDATEFORMAT_FORMAT_INTL