26#include <com/sun/star/beans/NamedValue.hpp>
27#include <com/sun/star/beans/PropertyAttribute.hpp>
28#include <com/sun/star/beans/PropertyState.hpp>
29#include <com/sun/star/embed/ElementModes.hpp>
30#include <com/sun/star/embed/XStorage.hpp>
31#include <com/sun/star/io/IOException.hpp>
32#include <com/sun/star/text/XTextSection.hpp>
33#include <com/sun/star/lang/XSingleServiceFactory.hpp>
46#include <unofield.hxx>
73#include <editeng/editids.hrc>
116 SwPaM *& o_rpPaM, std::pair<OUString, FlyCntType> & o_rFrame,
119 std::vector<SdrObject *> & o_rSdrObjects)
121 uno::Reference<drawing::XShapes>
const xShapes(xIfc, UNO_QUERY);
124 sal_Int32 nShapes(xShapes->getCount());
125 for (sal_Int32
i = 0;
i < nShapes; ++
i)
127 uno::Reference<lang::XUnoTunnel> xShape;
128 xShapes->getByIndex(
i) >>= xShape;
132 comphelper::getFromUnoTunnel<SvxShape>(xShape));
138 o_rSdrObjects.push_back(pSdrObject);
146 uno::Reference<lang::XUnoTunnel>
const xTunnel(xIfc, UNO_QUERY);
148 SwXShape *
const pShape(comphelper::getFromUnoTunnel<SwXShape>(xTunnel));
151 uno::Reference<uno::XAggregation>
const xAgg(
156 comphelper::getFromUnoTunnel<SvxShape>(xTunnel));
162 o_rSdrObjects.push_back(pSdrObject);
169 OTextCursorHelper *
const pCursor(
170 dynamic_cast<OTextCursorHelper*
>(xIfc.get()));
173 if (pCursor->GetDoc() == &rTargetDoc)
184 if (pUnoCursor && &pUnoCursor->
GetDoc() == &rTargetDoc)
193 SwXFrame *
const pFrame =
dynamic_cast<SwXFrame*
>(xIfc.get());
196 const SwFrameFormat *
const pFrameFormat(pFrame->GetFrameFormat());
197 if (pFrameFormat && pFrameFormat->
GetDoc() == &rTargetDoc)
199 o_rFrame = std::make_pair(pFrameFormat->
GetName(), pFrame->GetFlyCntType());
208 if (pFrameFormat && pFrameFormat->
GetDoc() == &rTargetDoc)
210 o_rTableName = pFrameFormat->
GetName();
219 if (pFrameFormat && pFrameFormat->
GetDoc() == &rTargetDoc)
224 pBox = pCell->
FindBox(pTable, pBox);
235 uno::Reference<text::XTextRange>
const xTextRange(xTunnel, UNO_QUERY);
250 if (pUnoCursor && &pUnoCursor->
GetDoc() == &rTargetDoc)
268uno::Reference<text::XTextContent>
273 auto const eMode( bParent
281 ? (pMetaFieldTextAttr
282 ? ((pMetaFieldTextAttr->
GetStart() >
284 ? pMetaFieldTextAttr : pMetaTextAttr)
286 : pMetaFieldTextAttr;
287 uno::Reference<XTextContent> xRet;
311 std::vector<beans::NamedValue>
props;
315 if (rPropSet.
getPropertyState(*pEntry, *pSet) == PropertyState_DIRECT_VALUE)
329 , PropertyState& eState
332 PropertyState eNewState = PropertyState_DIRECT_VALUE;
365 if ( pTmpNode && pTmpNode->
GetNum() )
410 eNewState = PropertyState_AMBIGUOUS_VALUE;
420 eNewState = PropertyState_AMBIGUOUS_VALUE;
443 if ( pTextNd && pTextNd->
IsInList() )
479 eNewState = PropertyState_DEFAULT_VALUE;
486 *pAny <<= static_cast<sal_Int16>( 0 );
497 *pAny <<= OUString();
522 eNewState = PropertyState_DEFAULT_VALUE;
527 std::vector<SwTextAttr *> marks;
538 static_cast<SwTOXMark &
>((*marks.begin())->GetAttr());
539 const uno::Reference< text::XDocumentIndexMark > xRef =
547 eNewState = PropertyState_DEFAULT_VALUE;
558 const uno::Reference< text::XDocumentIndex > xRef =
565 eNewState = PropertyState_DEFAULT_VALUE;
576 if ( pTextAttr !=
nullptr )
580 uno::Reference<text::XTextField>
const xField(
587 eNewState = PropertyState_DEFAULT_VALUE;
616 eNewState = PropertyState_DEFAULT_VALUE;
630 uno::Reference<XTextFrame>
const xFrame(
636 eNewState = PropertyState_DEFAULT_VALUE;
651 eNewState = PropertyState_DEFAULT_VALUE;
662 *pAny <<= xParagraph;
666 eNewState = PropertyState_DEFAULT_VALUE;
694 const uno::Reference< text::XFootnote > xFootnote =
701 eNewState = PropertyState_DEFAULT_VALUE;
704 eNewState = PropertyState_DEFAULT_VALUE;
709 std::vector<SwTextAttr *> marks;
720 uno::Reference<XTextContent>
const xRef =
727 eNewState = PropertyState_DEFAULT_VALUE;
745 eNewState = PropertyState_DEFAULT_VALUE;
758 Sequence< OUString> aCharStyles;
760 for(
size_t nAttr = 0; nAttr < pHints->
Count(); ++nAttr )
765 const sal_Int32 nAttrStart = pAttr->
GetStart();
766 const sal_Int32 nAttrEnd = *pAttr->
GetEnd();
768 if( ( nAttrEnd > nPaMStart && nAttrStart < nPaMEnd ) ||
769 ( !nAttrStart && !nAttrEnd && !nPaMStart && !nPaMEnd ) )
772 if(nAttrStart > nPaMStart ||
775 aCharStyles.realloc(0);
782 OSL_ENSURE(nAttrStart <= nPaMStart && nAttrEnd >=nPaMEnd,
783 "attribute overlaps or is outside");
785 aCharStyles.realloc(aCharStyles.getLength() + 1);
787 aCharStyles.getArray()[aCharStyles.getLength() - 1] =
795 aCharStyles.hasElements() ?
796 PropertyState_DIRECT_VALUE : PropertyState_DEFAULT_VALUE;
798 (*pAny) <<= aCharStyles;
801 eNewState = PropertyState_DEFAULT_VALUE;
806 default: bDone =
false;
821 eState = PropertyState_DIRECT_VALUE;
825 eState = PropertyState_DEFAULT_VALUE;
831 uno::Reference<XIndexReplace> xIndexReplace;
832 if(rValue >>= xIndexReplace)
838 if(pSwNum->GetNumRule())
841 const OUString* pNewCharStyles = pSwNum->GetNewCharStyleNames();
842 const OUString* pBulletFontNames = pSwNum->GetBulletFontNames();
846 if (!pNewCharStyles[
i].isEmpty() &&
850 if (pNewCharStyles[
i].isEmpty())
863 for(
size_t nCharFormat = 0; nCharFormat < nChCount; ++nCharFormat)
866 if(rChFormat.
GetName() == pNewCharStyles[
i])
868 pCharFormat = &rChFormat;
877 pBase = pPool->
Find(pNewCharStyles[
i], SfxStyleFamily::Char);
880 pBase = &pPool->
Make(pNewCharStyles[
i], SfxStyleFamily::Page);
889 !pBulletFontNames[
i].isEmpty() &&
896 ->
GetItem( SID_ATTR_CHAR_FONTLIST ));
904 aRule.
Set(
i, aFormat );
913 for (
size_t n = 0;
n < aRangeArr.
Count(); ++
n )
927 else if(!pSwNum->GetCreatedNumRuleName().isEmpty())
962 eState = PropertyState_DIRECT_VALUE;
965 eState = PropertyState_DEFAULT_VALUE;
1006 for(
size_t n = 0;
n < aRangeArr.
Count(); ++
n )
1028 const uno::Sequence< beans::PropertyValue >& rOptions)
1036 throw uno::RuntimeException(
"cannot insert file inside input field");
1042 throw uno::RuntimeException(
"cannot insert file inside content controls");
1046 std::unique_ptr<SfxMedium> pMed;
1050 OUString sFileName = rURL;
1051 OUString sFilterName, sFilterOptions, sPassword, sBaseURL;
1052 uno::Reference < io::XStream >
xStream;
1053 uno::Reference < io::XInputStream > xInputStream;
1055 if( sFileName.isEmpty() )
1057 if( sFileName.isEmpty() )
1066 if ( !xInputStream.is() &&
xStream.is() )
1067 xInputStream =
xStream->getInputStream();
1069 if(!pDocSh || (sFileName.isEmpty() && !xInputStream.is()))
1074 uno::Reference < embed::XStorage > xReadStorage;
1075 if( xInputStream.is() )
1077 uno::Sequence< uno::Any > aArgs{
uno::Any(xInputStream),
1078 uno::Any(embed::ElementModes::READ) };
1084 catch(
const io::IOException&) {}
1088 if( xInputStream.is() && !xReadStorage.is())
1091 pMed->setStreamToLoadFrom(xInputStream,
true );
1094 pMed.reset(xReadStorage.is() ?
1095 new SfxMedium(xReadStorage, sBaseURL ) :
1096 new SfxMedium(sFileName, StreamMode::READ ));
1097 if( !sBaseURL.isEmpty() )
1098 pMed->GetItemSet().Put(
SfxStringItem( SID_DOC_BASEURL, sBaseURL ) );
1102 if ( nErr || !pFilter)
1104 pMed->SetFilter( pFilter );
1108 if( xInputStream.is() && !xReadStorage.is())
1111 pMed->setStreamToLoadFrom(xInputStream,
true );
1112 pMed->SetFilter( pFilter );
1116 if( xReadStorage.is() )
1118 pMed.reset(
new SfxMedium(xReadStorage, sBaseURL ));
1119 pMed->SetFilter( pFilter );
1122 pMed.reset(
new SfxMedium(sFileName, StreamMode::READ, pFilter,
nullptr));
1124 if(!sFilterOptions.isEmpty())
1125 pMed->GetItemSet().Put(
SfxStringItem( SID_FILE_FILTEROPTIONS, sFilterOptions ) );
1126 if(!sBaseURL.isEmpty())
1127 pMed->GetItemSet().Put(
SfxStringItem( SID_DOC_BASEURL, sBaseURL ) );
1134 if( !(aRef.
is() && 1 < aRef->GetRefCount()) )
1140 if(!sPassword.isEmpty())
1154 ErrCode nErrno = pRdr->Read( *pRead );
1173 const SwPaM &rNewCursor,
1174 std::u16string_view rText,
1175 const bool bForceExpandHints )
1179 for (
size_t i = 0;
i < rText.size(); ++
i)
1183 &&
ch !=
'\r' &&
ch !=
'\n' &&
ch !=
'\t')
1185 SAL_WARN(
"sw.uno",
"DocInsertStringSplitCR: refusing to insert control character " <<
int(
ch));
1201 SAL_INFO(
"sw.uno",
"DocInsertStringSplitCR: need a text node");
1205 sal_Int32 nStartIdx = 0;
1208 size_t nIdx = rText.find(
'\r', nStartIdx );
1209 if( ( nIdx == std::u16string_view::npos && nMaxLength < sal_Int32(rText.size()) ) ||
1210 ( nIdx != std::u16string_view::npos && nMaxLength < sal_Int32(nIdx) ) )
1214 while (nIdx != std::u16string_view::npos )
1216 OSL_ENSURE( sal_Int32(nIdx) - nStartIdx >= 0,
"index negative!" );
1217 aText = rText.substr( nStartIdx, nIdx - nStartIdx );
1218 if (!aText.isEmpty() &&
1221 OSL_FAIL(
"Doc->Insert(Str) failed." );
1226 OSL_FAIL(
"SplitNode failed" );
1229 nStartIdx = nIdx + 1;
1230 nIdx = rText.find(
'\r', nStartIdx );
1232 aText = rText.substr( nStartIdx );
1233 if (!aText.isEmpty() &&
1236 OSL_FAIL(
"Doc->Insert(Str) failed." );
1244 std::u16string_view rRedlineType,
1245 const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
1250 if ( rRedlineType ==
u"Insert" )
1251 eType = RedlineType::Insert;
1252 else if ( rRedlineType ==
u"Delete" )
1253 eType = RedlineType::Delete;
1254 else if ( rRedlineType ==
u"Format" )
1255 eType = RedlineType::Format;
1256 else if ( rRedlineType ==
u"TextTable" )
1257 eType = RedlineType::Table;
1258 else if ( rRedlineType ==
u"ParagraphFormat" )
1259 eType = RedlineType::ParagraphFormat;
1261 throw lang::IllegalArgumentException();
1264 std::size_t nAuthor = 0;
1267 ::util::DateTime aStamp;
1268 uno::Sequence< beans::PropertyValue > aRevertProperties;
1269 bool bIsMoved =
false;
1270 bool bFoundComment =
false;
1271 bool bFoundStamp =
false;
1272 bool bFoundRevertProperties =
false;
1273 for (
const css::beans::PropertyValue & rProp : rRedlineProperties )
1275 if (rProp.Name ==
"RedlineAuthor")
1277 if( rProp.Value >>= sAuthor )
1280 else if (rProp.Name ==
"RedlineComment")
1281 bFoundComment = rProp.Value >>= sComment;
1282 else if (rProp.Name ==
"RedlineDateTime")
1283 bFoundStamp = rProp.Value >>= aStamp;
1284 else if (rProp.Name ==
"RedlineRevertProperties")
1285 bFoundRevertProperties = rProp.Value >>= aRevertProperties;
1286 else if (rProp.Name ==
"RedlineMoved")
1287 rProp.Value >>= bIsMoved;
1296 std::unique_ptr<SwRedlineExtraData_FormatColl> xRedlineExtraData;
1300 if ( bFoundRevertProperties )
1304 if (
eType == RedlineType::ParagraphFormat)
1307 if (!aRevertProperties.hasElements())
1318 if (aRevertProperties.hasElements())
1324 std::vector<SfxItemPropertyMapEntry const*>
aEntries;
1325 std::vector<uno::Any> aValues;
1326 aEntries.reserve(aRevertProperties.getLength());
1327 sal_uInt16 nStyleId = USHRT_MAX;
1328 sal_uInt16 nNumId = USHRT_MAX;
1329 for (
const auto& rRevertProperty : std::as_const(aRevertProperties))
1331 const OUString &rPropertyName = rRevertProperty.Name;
1339 else if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1343 else if (rPropertyName ==
"NumberingRules")
1351 if (rPropertyName ==
"ParaStyleName")
1355 aValues.push_back(rRevertProperty.Value);
1358 if (!aWhichPairs.
empty())
1360 sal_uInt16 nStylePoolId = USHRT_MAX;
1361 OUString sParaStyleName, sUIStyle;
1369 uno::Reference<container::XNamed> xNumberingRules;
1370 rValue >>= xNumberingRules;
1371 if (xNumberingRules.is())
1376 xNumberingRules->getName());
1386 rValue >>= sParaStyleName;
1390 if (
eType == RedlineType::ParagraphFormat && sParaStyleName.isEmpty())
1397 sUIStyle.isEmpty() ? sParaStyleName : sUIStyle, nStylePoolId, &aItemSet));
1399 else if (
eType == RedlineType::ParagraphFormat)
1418 throw lang::IllegalArgumentException();
1422 std::u16string_view rRedlineType,
1423 const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
1429 if ( rRedlineType ==
u"TableRowInsert" )
1431 eType = RedlineType::TableRowInsert;
1433 else if ( rRedlineType ==
u"TableRowDelete" )
1435 eType = RedlineType::TableRowDelete;
1439 throw lang::IllegalArgumentException();
1446 if ( !pHasTextChangesOnlyProp || pHasTextChangesOnlyProp->GetValue() )
1454 SwPaM aPaM(aInsPos);
1461 :
u"Delete", rRedlineProperties);
1468 std::size_t nAuthor = 0;
1470 if( aPropMap.
getValue(
"RedlineAuthor") >>= sAuthor )
1475 if( aPropMap.
getValue(
"RedlineComment") >>= sComment )
1478 ::util::DateTime aStamp;
1479 if( aPropMap.
getValue(
"RedlineDateTime") >>= aStamp )
1482 DateTime(
Date( aStamp.Day, aStamp.Month, aStamp.Year ),
tools::Time( aStamp.Hours, aStamp.Minutes, aStamp.Seconds ) ) );
1493 throw lang::IllegalArgumentException();
1497 std::u16string_view rRedlineType,
1498 const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
1504 if ( rRedlineType ==
u"TableCellInsert" )
1506 eType = RedlineType::TableCellInsert;
1508 else if ( rRedlineType ==
u"TableCellDelete" )
1510 eType = RedlineType::TableCellDelete;
1514 throw lang::IllegalArgumentException();
1521 if ( !pHasTextChangesOnlyProp || pHasTextChangesOnlyProp->GetValue() )
1529 SwPaM aPaM(aInsPos);
1536 :
u"Delete", rRedlineProperties);
1543 std::size_t nAuthor = 0;
1545 if( aPropMap.
getValue(
"RedlineAuthor") >>= sAuthor )
1550 if( aPropMap.
getValue(
"RedlineComment") >>= sComment )
1553 ::util::DateTime aStamp;
1554 if( aPropMap.
getValue(
"RedlineDateTime") >>= aStamp )
1557 DateTime(
Date( aStamp.Day, aStamp.Month, aStamp.Year ),
tools::Time( aStamp.Hours, aStamp.Minutes, aStamp.Seconds ) ) );
1568 throw lang::IllegalArgumentException();
1573 sal_uInt32 nKey = (nWhichId << 16) + nMemberId;
1580 sal_uInt32 nKey = (nWhichId << 16) + nMemberId;
1581 auto aIt =
m_Map.find( nKey );
1582 if (aIt !=
m_Map.end())
1584 pAny = & aIt->second;
FontMetric Get(const OUString &rName, const OUString &rStyleName) const
virtual bool DeleteAndJoin(SwPaM &, SwDeleteFlags flags=SwDeleteFlags::Default)=0
complete delete of a given PaM
virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart)=0
Split a node at rPos (implemented only for TextNode).
virtual bool InsertString(const SwPaM &rRg, const OUString &, const SwInsertFlags nInsertMode=SwInsertFlags::EMPTYEXPAND)=0
Insert string into existing text node at position rRg.Point().
virtual const SwRootFrame * GetCurrentLayout() const =0
virtual void SetRedlineFlags_intern(RedlineFlags eMode)=0
Set a new redline mode.
virtual std::size_t InsertRedlineAuthor(const OUString &rAuthor)=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 bool AppendTableRowRedline(SwTableRowRedline *pPtr)=0
virtual bool AppendTableCellRedline(SwTableCellRedline *pPtr)=0
std::shared_ptr< const SfxFilter > GetFilter4FilterName(const OUString &rName, SfxFilterFlags nMust=SfxFilterFlags::NONE, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
OUString const & GetName() const
ErrCode GuessFilter(SfxMedium &rMedium, std::shared_ptr< const SfxFilter > &, SfxFilterFlags nMust=SfxFilterFlags::IMPORT, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
const o3tl::sorted_vector< const SfxItemPropertyMapEntry *, SfxItemPropertyMapCompare > & getPropertyEntries() const
css::beans::PropertyState getPropertyState(const OUString &rName, const SfxItemSet &rSet) const
void setPropertyValue(const SfxItemPropertyMapEntry &rEntry, const css::uno::Any &aVal, SfxItemSet &rSet) const
const SfxItemPropertyMap & getPropertyMap() const
void getPropertyValue(const SfxItemPropertyMapEntry &rEntry, const SfxItemSet &rSet, css::uno::Any &rAny) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SfxFilterContainer * GetFilterContainer() const
virtual SfxObjectFactory & GetFactory() const=0
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
const FontList * GetFontList() const
SdrObject * GetSdrObject() const
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
SwFormatColl * GetFormatColl() const
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
SwFormatColl & GetAnyFormatColl() const
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
Reader * StartConvertFrom(SfxMedium &rMedium, SwReaderPtr &rpRdr, SwCursorShell const *pCursorSh=nullptr, SwPaM *pPaM=nullptr)
For inserting document.
static SwSection * GetCurrSection(const SwPosition &rPos)
void SetNodeNumStart(const SwPosition &rPos, sal_uInt16 nStt)
SwNumRule * FindNumRulePtr(const OUString &rName) const
SwNumRule * GetOutlineNumRule() const
const SwCharFormats * GetCharFormats() const
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
void SetRowNotTracked(const SwCursor &rCursor, const SvxPrintItem &rNotTracked, bool bAll=false, bool bIns=false)
rNotTracked = false means that the row was deleted or inserted with its tracked cell content bAll: de...
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
static SwTOXBase * GetCurTOX(const SwPosition &rPos)
Get current table of contents.
void DelNumRules(const SwPaM &, SwRootFrame const *pLayout=nullptr)
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
OUString SetNumRule(const SwPaM &, const SwNumRule &, bool bCreateNewList, SwRootFrame const *pLayout=nullptr, const OUString &sContinuedListId=OUString(), bool bSetItem=true, const bool bResetIndentAttrs=false)
Accept changes of outline styles for OutlineRule.
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 SwAttrPool & GetAttrPool() const
void SetBoxAttr(const SwCursor &rCursor, const SfxPoolItem &rNew)
SwDocShell * GetDocShell()
static SwNumRule * GetNumRuleAtPos(SwPosition &rPos, SwRootFrame const *pLayout=nullptr)
SwPageFrame * FindPageFrame()
Marks a node in the document model.
SwFrameFormat * GetFlyFormat() const
If node is in a fly return the respective format.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
bool IsNoTextNode() const
SwTableBox * GetTableBox() const
If node is in a table return the respective table box.
SwTableNode * FindTableNode()
Search table node, in which it is.
const SwStartNode * StartOfSectionNode() const
SwContentNode * GetContentNode()
void SetUsedByRedline(bool bUsed)
const SwNumFormat & Get(sal_uInt16 i) const
void Set(sal_uInt16 i, const SwNumFormat *)
bool IsContinueingPreviousSubTree() const
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetMark() const
SwNode & GetPointNode() const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
SwContentNode * GetPointContentNode() const
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
const SwPosition * End() const
SwNode & GetMarkNode() const
const SwPosition * GetPoint() const
const SwPosition * Start() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
const OUString & GetName() const
A page of the document layout.
SwPageDesc * GetPageDesc()
SwPaM & SetPam(size_t nArrPos, SwPaM &rPam)
void SetExtraData(const SwRedlineExtraData *pData)
ExtraData gets copied, the pointer is therefore not taken over by the RedLineObject.
void SetTimeStamp(const DateTime &rDT)
void SetComment(const OUString &rS)
The root element of a Writer document layout.
SwSectionFormat * GetFormat()
Starts a section of nodes in the document model.
SwStartNodeType GetStartNodeType() const
static const OUString & GetProgName(const OUString &rName, SwGetPoolIdFromName)
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
SwTableBox is one table cell in the document model.
bool IsEmpty(bool bWithRemainingNestedTable=true) const
SwFrameFormat * GetFrameFormat()
const SwStartNode * GetSttNd() const
Redline that holds information about a table-cell that had some change.
void SetExtraData(const SwRedlineExtraData *pData)
ExtraData gets copied, the pointer is therefore not taken over by the RedLineObject.
SwTableLine is one table row in the document model.
SwFrameFormat * GetFrameFormat()
SwTableBoxes & GetTabBoxes()
const SwTable & GetTable() const
Redline that holds information about a table-row that had some change.
void SetExtraData(const SwRedlineExtraData *pData)
ExtraData gets copied, the pointer is therefore not taken over by the RedLineObject.
SwTable is one table in the document model, containing rows (which contain cells).
SwTableFormat * GetFrameFormat()
static SwTable * FindTable(SwFrameFormat const *const pFormat)
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
const SfxPoolItem & GetAttr() const
virtual const sal_Int32 * GetEnd() const
end position
const SwFormatFootnote & GetFootnote() const
sal_Int32 GetStart() const
const SwFormatCharFormat & GetCharFormat() const
const SwFormatField & GetFormatField() const
SwTextNode is a paragraph in the document model.
SwNumberTree::tSwNumTreeNumber GetAttrListRestartValue() const
OUString GetListId() const
SwTextField * GetFieldTextAttrAt(const sal_Int32 nIndex, ::sw::GetTextAttrMode const eMode=::sw::GetTextAttrMode::Expand) const
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.
int GetActualListLevel(SwListRedlineType eRedline=SwListRedlineType::SHOW) const
Returns the actual list level of this text node, when it is a list item.
bool HasAttrListRestartValue() const
bool IsListRestart() const
int GetAttrOutlineLevel() const
Returns outline level of this text node.
OUString GetNumString(const bool _bInclPrefixAndSuffixStrings=true, const unsigned int _nRestrictToThisLevel=MAXLEVEL, SwRootFrame const *pLayout=nullptr, SwListRedlineType eRedline=SwListRedlineType::SHOW) const
Returns outline of numbering string.
std::vector< SwTextAttr * > GetTextAttrsAt(sal_Int32 const nIndex, sal_uInt16 const nWhich) const
get the innermost text attributes covering position nIndex.
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.
SwpHints * GetpSwpHints()
const OUString & GetText() 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...
bool FillValue(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const css::uno::Any *&pAny)
std::map< sal_uInt32, css::uno::Any > m_Map
void SetValue(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const css::uno::Any &rAny)
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
::sw::mark::IMark const * GetBookmarkInDoc(SwDoc const *const pDoc, const css::uno::Reference< css::uno::XInterface > &xUT)
const SwUnoCursor * GetTableCursor() const
SwTableBox * FindBox(SwTable *pTable, SwTableBox *pBox)
search if a box exists in a table
SwTableBox * GetTableBox() const
SwFrameFormat * GetFrameFormat() const
static rtl::Reference< SwXCell > CreateXCell(SwFrameFormat *pTableFormat, SwTableBox *pBox, SwTable *pTable=nullptr)
static rtl::Reference< SwXDocumentIndexMark > CreateXDocumentIndexMark(SwDoc &rDoc, SwTOXMark *pMark, TOXTypes eType=TOX_INDEX)
static rtl::Reference< SwXDocumentIndex > CreateXDocumentIndex(SwDoc &rDoc, SwTOXBaseSection *pSection, TOXTypes eTypes=TOX_INDEX)
static bool isInvalidStyle(std::u16string_view rName)
static rtl::Reference< SwXParagraph > CreateXParagraph(SwDoc &rDoc, SwTextNode *pTextNode, css::uno::Reference< css::text::XText > const &xParentText=nullptr, const sal_Int32 nSelStart=-1, const sal_Int32 nSelEnd=- 1)
static rtl::Reference< SwXReferenceMark > CreateXReferenceMark(SwDoc &rDoc, SwFormatRefMark *pMarkFormat)
const css::uno::Reference< css::uno::XAggregation > & GetAggregationInterface() const
static rtl::Reference< SwXTextField > CreateXTextField(SwDoc *pDoc, SwFormatField const *pFormat, SwServiceType nServiceId=SwServiceType::Invalid)
static SW_DLLPUBLIC rtl::Reference< SwXTextFrame > CreateXTextFrame(SwDoc &rDoc, SwFrameFormat *pFrameFormat)
static css::uno::Reference< css::text::XTextSection > GetObject(SwSectionFormat &rFormat)
SwFrameFormat * GetFrameFormat()
static css::uno::Reference< css::text::XTextTable > GetObject(SwFrameFormat &rFormat)
An SwTextAttr container, stores all directly formatted text portions for a text node.
SwTextAttr * Get(size_t nPos) const
static css::uno::Reference< css::lang::XSingleServiceFactory > GetStorageFactory(const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
css::uno::Any getValue(const OUString &sKey) const
Blocks grouping undo actions together into an SfxListUndoAction.
#define FN_UNO_NUM_START_VALUE
#define FN_UNO_PARA_NUM_AUTO_FORMAT
#define FN_UNO_PARA_NUM_STRING
#define FN_UNO_PARA_CONT_PREV_SUBTREE
#define FN_UNO_TEXT_TABLE
#define FN_UNO_PARA_CONDITIONAL_STYLE_NAME
#define FN_UNO_NESTED_TEXT_CONTENT
#define FN_UNO_TEXT_SECTION
#define FN_UNO_PAGE_STYLE
#define FN_UNO_REFERENCE_MARK
#define FN_UNO_TEXT_FRAME
#define FN_UNO_CHARFMT_SEQUENCE
#define FN_NUMBER_NEWSTART
#define FN_UNO_DOCUMENT_INDEX
#define FN_UNO_DOCUMENT_INDEX_MARK
#define FN_UNO_TEXT_FIELD
#define FN_UNO_SORTED_TEXT_ID
#define FN_UNO_PARA_STYLE
#define FN_UNO_TEXT_PARAGRAPH
std::unique_ptr< SwReader, o3tl::default_delete< SwReader > > SwReaderPtr
ScXMLEditAttributeMap::Entry const aEntries[]
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(59)
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
constexpr TypedWhichId< SwFormatContentControl > RES_TXTATR_CONTENTCONTROL(56)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
constexpr TypedWhichId< SwFormatAutoFormat > RES_PARATR_LIST_AUTOFMT(87)
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_METAFIELD(49)
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_META(48)
constexpr TypedWhichId< SfxUInt16Item > RES_PARATR_OUTLINELEVEL(79)
constexpr TypedWhichId< SwTOXMark > RES_TXTATR_TOXMARK(47)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
#define CH_TXT_TRACKED_DUMMY_CHAR
constexpr TypedWhichId< SvxPrintItem > RES_PRINT(104)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
void makeTableCellRedline(SwTableBox &rTableBox, std::u16string_view rRedlineType, const uno::Sequence< beans::PropertyValue > &rRedlineProperties)
static SwPaM * lcl_createPamCopy(const SwPaM &rPam)
void GetCurPageStyle(SwPaM const &rPaM, OUString &rString)
static uno::Any GetParaListAutoFormat(SwTextNode const &rNode)
sal_Int16 IsNodeNumStart(SwPaM const &rPam, PropertyState &eState)
SwFormatColl * GetCurTextFormatColl(SwPaM &rPam, const bool bConditional)
void setNumberingProperty(const Any &rValue, SwPaM &rPam)
void getNumberingProperty(SwPaM &rPam, PropertyState &eState, Any *pAny)
uno::Reference< text::XTextContent > GetNestedTextContent(SwTextNode const &rTextNode, sal_Int32 const nIndex, bool const bParent)
void makeRedline(SwPaM const &rPaM, std::u16string_view rRedlineType, const uno::Sequence< beans::PropertyValue > &rRedlineProperties)
bool DocInsertStringSplitCR(SwDoc &rDoc, const SwPaM &rNewCursor, std::u16string_view rText, const bool bForceExpandHints)
void makeTableRowRedline(SwTableLine &rTableLine, std::u16string_view rRedlineType, const uno::Sequence< beans::PropertyValue > &rRedlineProperties)
bool getCursorPropertyValue(const SfxItemPropertyMapEntry &rEntry, SwPaM &rPam, Any *pAny, PropertyState &eState, const SwTextNode *pNode)
void resetCursorPropertyValue(const SfxItemPropertyMapEntry &rEntry, SwPaM &rPam)
void InsertFile(SwUnoCursor *pUnoCursor, const OUString &rURL, const uno::Sequence< beans::PropertyValue > &rOptions)
void GetSelectableFromAny(uno::Reference< uno::XInterface > const &xIfc, SwDoc &rTargetDoc, SwPaM *&o_rpPaM, std::pair< OUString, FlyCntType > &o_rFrame, OUString &o_rTableName, SwUnoTableCursor const *&o_rpTableCursor, ::sw::mark::IMark const *&o_rpMark, std::vector< SdrObject * > &o_rSdrObjects)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
bool IsControlChar(sal_Unicode cChar)
bool XTextRangeToSwPaM(SwUnoInternalPaM &rToFill, const uno::Reference< text::XTextRange > &xTextRange, ::sw::TextRangeMode const eMode)
void DeepCopyPaM(SwPaM const &rSource, SwPaM &rTarget)
@ Parent
EXPAND : (Start < nIndex <= End)
@ Expand
DEFAULT: (Start <= nIndex < End)
bool GoInNode(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
@ RES_POOLCOLL_STANDARD
Standard.
Marks a position in the document model.
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
void SetContent(sal_Int32 nContentIndex)
Set content index, only valid to call this if the position points to a SwContentNode subclass.
SwNodeOffset GetNodeIndex() const
sal_Int32 GetContentIndex() const
bool empty() const noexcept
SAL_WARN_UNUSED_RESULT WhichRangesContainer MergeRange(sal_uInt16 nFrom, sal_uInt16 nTo) const
UNDERLYING_TYPE get() const
Reference< XFrame > xFrame
constexpr sal_Int32 COMPLETE_STRING
constexpr sal_uInt8 MAXLEVEL
SwUnoPropertyMapProvider aSwMapProvider
#define PROPERTY_MAP_PARAGRAPH
#define PROPERTY_MAP_CHAR_AUTO_STYLE
#define PROPERTY_MAP_TEXTPORTION_EXTENSIONS