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>
45 #include <unofield.hxx>
60 #include <section.hxx>
73 #include <editeng/editids.hrc>
115 SwPaM *& o_rpPaM, std::pair<OUString, FlyCntType> & o_rFrame,
118 std::vector<SdrObject *> & o_rSdrObjects)
120 uno::Reference<drawing::XShapes>
const xShapes(xIfc, UNO_QUERY);
123 sal_Int32 nShapes(xShapes->getCount());
124 for (sal_Int32
i = 0;
i < nShapes; ++
i)
126 uno::Reference<lang::XUnoTunnel> xShape;
127 xShapes->getByIndex(
i) >>= xShape;
131 ::sw::UnoTunnelGetImplementation<SvxShape>(xShape));
137 o_rSdrObjects.push_back(pSdrObject);
145 uno::Reference<lang::XUnoTunnel>
const xTunnel(xIfc, UNO_QUERY);
151 SwXShape *
const pShape(::sw::UnoTunnelGetImplementation<SwXShape>(xTunnel));
154 uno::Reference<uno::XAggregation>
const xAgg(
159 ::sw::UnoTunnelGetImplementation<SvxShape>(xTunnel));
165 o_rSdrObjects.push_back(pSdrObject);
173 ::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xTunnel));
176 if (pCursor->
GetDoc() == &rTargetDoc)
184 ::sw::UnoTunnelGetImplementation<SwXTextRanges>(xTunnel));
188 if (pUnoCursor && &pUnoCursor->
GetDoc() == &rTargetDoc)
198 ::sw::UnoTunnelGetImplementation<SwXFrame>(xTunnel));
202 if (pFrameFormat && pFrameFormat->GetDoc() == &rTargetDoc)
204 o_rFrame = std::make_pair(pFrameFormat->GetName(), pFrame->
GetFlyCntType());
210 ::sw::UnoTunnelGetImplementation<SwXTextTable>(xTunnel));
214 if (pFrameFormat && pFrameFormat->GetDoc() == &rTargetDoc)
216 o_rTableName = pFrameFormat->
GetName();
222 ::sw::UnoTunnelGetImplementation<SwXCell>(xTunnel));
226 if (pFrameFormat && pFrameFormat->GetDoc() == &rTargetDoc)
231 pBox = pCell->
FindBox(pTable, pBox);
243 uno::Reference<text::XTextRange>
const xTextRange(xTunnel, UNO_QUERY);
255 ::sw::UnoTunnelGetImplementation<SwXCellRange>(xTunnel));
259 if (pUnoCursor && &pUnoCursor->GetDoc() == &rTargetDoc)
277 uno::Reference<text::XTextContent>
290 ? (pMetaFieldTextAttr
291 ? ((pMetaFieldTextAttr->
GetStart() >
293 ? pMetaFieldTextAttr : pMetaTextAttr)
295 : pMetaFieldTextAttr;
296 uno::Reference<XTextContent> xRet;
300 static_cast<SwFormatMeta &>(pTextAttr->
GetAttr()).GetMeta());
302 xRet.set(pMeta->MakeUnoObject(), uno::UNO_QUERY);
318 std::vector<beans::NamedValue>
props;
320 for (
auto const& rEntry : rMap.getPropertyEntries())
322 if (rPropSet.getPropertyState(rEntry, rSet) == PropertyState_DIRECT_VALUE)
325 rPropSet.getPropertyValue(rEntry, rSet, value);
326 props.emplace_back(rEntry.sName, value);
336 , PropertyState& eState
339 PropertyState eNewState = PropertyState_DIRECT_VALUE;
372 if ( pTmpNode && pTmpNode->
GetNum() )
417 eNewState = PropertyState_AMBIGUOUS_VALUE;
427 eNewState = PropertyState_AMBIGUOUS_VALUE;
450 if ( pTextNd && pTextNd->
IsInList() )
486 eNewState = PropertyState_DEFAULT_VALUE;
493 *pAny <<= static_cast<sal_Int16>( 0 );
504 *pAny <<= OUString();
529 eNewState = PropertyState_DEFAULT_VALUE;
534 std::vector<SwTextAttr *> marks;
545 static_cast<SwTOXMark &
>((*marks.begin())->GetAttr());
546 const uno::Reference< text::XDocumentIndexMark > xRef =
554 eNewState = PropertyState_DEFAULT_VALUE;
565 const uno::Reference< text::XDocumentIndex > xRef =
572 eNewState = PropertyState_DEFAULT_VALUE;
583 if ( pTextAttr !=
nullptr )
587 uno::Reference<text::XTextField>
const xField(
594 eNewState = PropertyState_DEFAULT_VALUE;
623 eNewState = PropertyState_DEFAULT_VALUE;
636 uno::Reference<XTextFrame>
const xFrame(
642 eNewState = PropertyState_DEFAULT_VALUE;
657 eNewState = PropertyState_DEFAULT_VALUE;
668 *pAny <<= xParagraph;
672 eNewState = PropertyState_DEFAULT_VALUE;
688 const uno::Reference< text::XFootnote > xFootnote =
695 eNewState = PropertyState_DEFAULT_VALUE;
698 eNewState = PropertyState_DEFAULT_VALUE;
703 std::vector<SwTextAttr *> marks;
714 uno::Reference<XTextContent>
const xRef =
721 eNewState = PropertyState_DEFAULT_VALUE;
739 eNewState = PropertyState_DEFAULT_VALUE;
752 if(nPaMStart > nPaMEnd)
754 std::swap(nPaMStart, nPaMEnd);
758 for(
size_t nAttr = 0; nAttr < pHints->
Count(); ++nAttr )
763 const sal_Int32 nAttrStart = pAttr->
GetStart();
764 const sal_Int32 nAttrEnd = *pAttr->
GetEnd();
766 if( ( nAttrEnd > nPaMStart && nAttrStart < nPaMEnd ) ||
767 ( !nAttrStart && !nAttrEnd && !nPaMStart && !nPaMEnd ) )
770 if(nAttrStart > nPaMStart ||
773 aCharStyles.realloc(0);
780 OSL_ENSURE(nAttrStart <= nPaMStart && nAttrEnd >=nPaMEnd,
781 "attribute overlaps or is outside");
783 aCharStyles.realloc(aCharStyles.getLength() + 1);
785 aCharStyles.getArray()[aCharStyles.getLength() - 1] =
793 aCharStyles.hasElements() ?
794 PropertyState_DIRECT_VALUE : PropertyState_DEFAULT_VALUE;
796 (*pAny) <<= aCharStyles;
799 eNewState = PropertyState_DEFAULT_VALUE;
804 default: bDone =
false;
819 eState = PropertyState_DIRECT_VALUE;
823 eState = PropertyState_DEFAULT_VALUE;
829 uno::Reference<XIndexReplace> xIndexReplace;
830 if(rValue >>= xIndexReplace)
832 auto pSwNum = comphelper::getUnoTunnelImplementation<SwXNumberingRules>(xIndexReplace);
836 if(pSwNum->GetNumRule())
839 const OUString* pNewCharStyles = pSwNum->GetNewCharStyleNames();
840 const OUString* pBulletFontNames = pSwNum->GetBulletFontNames();
844 if (!pNewCharStyles[
i].isEmpty() &&
846 (!aFormat.GetCharFormat() || pNewCharStyles[i] != aFormat.GetCharFormat()->GetName()))
848 if (pNewCharStyles[i].isEmpty())
861 for(
size_t nCharFormat = 0; nCharFormat < nChCount; ++nCharFormat)
864 if(rChFormat.
GetName() == pNewCharStyles[i])
866 pCharFormat = &rChFormat;
875 pBase = pPool->
Find(pNewCharStyles[i], SfxStyleFamily::Char);
878 pBase = &pPool->
Make(pNewCharStyles[i], SfxStyleFamily::Page);
882 aFormat.SetCharFormat(pCharFormat);
887 !pBulletFontNames[i].isEmpty() &&
889 (!aFormat.GetBulletFont() || aFormat.GetBulletFont()->GetFamilyName() != pBulletFontNames[i])
894 ->
GetItem( SID_ATTR_CHAR_FONTLIST ));
900 aFormat.SetBulletFont(&aFont);
902 aRule.Set( i, aFormat );
911 for (
size_t n = 0;
n < aRangeArr.
Count(); ++
n )
925 else if(!pSwNum->GetCreatedNumRuleName().isEmpty())
960 eState = PropertyState_DIRECT_VALUE;
963 eState = PropertyState_DEFAULT_VALUE;
1004 for(
size_t n = 0;
n < aRangeArr.
Count(); ++
n )
1026 const uno::Sequence< beans::PropertyValue >& rOptions)
1028 std::unique_ptr<SfxMedium> pMed;
1032 OUString sFileName = rURL;
1033 OUString sFilterName, sFilterOptions, sPassword, sBaseURL;
1034 uno::Reference < io::XStream >
xStream;
1035 uno::Reference < io::XInputStream > xInputStream;
1037 if( sFileName.isEmpty() )
1039 if( sFileName.isEmpty() )
1048 if ( !xInputStream.is() && xStream.is() )
1049 xInputStream = xStream->getInputStream();
1051 if(!pDocSh || (sFileName.isEmpty() && !xInputStream.is()))
1056 uno::Reference < embed::XStorage > xReadStorage;
1057 if( xInputStream.is() )
1059 uno::Sequence< uno::Any > aArgs( 2 );
1060 aArgs[0] <<= xInputStream;
1061 aArgs[1] <<= embed::ElementModes::READ;
1067 catch(
const io::IOException&) {}
1071 if( xInputStream.is() && !xReadStorage.is())
1074 pMed->setStreamToLoadFrom(xInputStream,
true );
1077 pMed.reset(xReadStorage.is() ?
1078 new SfxMedium(xReadStorage, sBaseURL ) :
1079 new SfxMedium(sFileName, StreamMode::READ ));
1080 if( !sBaseURL.isEmpty() )
1081 pMed->GetItemSet()->Put(
SfxStringItem( SID_DOC_BASEURL, sBaseURL ) );
1084 ErrCode nErr = aMatcher.GuessFilter(*pMed, pFilter, SfxFilterFlags::NONE);
1085 if ( nErr || !pFilter)
1087 pMed->SetFilter( pFilter );
1091 if( xInputStream.is() && !xReadStorage.is())
1094 pMed->setStreamToLoadFrom(xInputStream,
true );
1095 pMed->SetFilter( pFilter );
1099 if( xReadStorage.is() )
1101 pMed.reset(
new SfxMedium(xReadStorage, sBaseURL ));
1102 pMed->SetFilter( pFilter );
1105 pMed.reset(
new SfxMedium(sFileName, StreamMode::READ, pFilter,
nullptr));
1107 if(!sFilterOptions.isEmpty())
1108 pMed->GetItemSet()->Put(
SfxStringItem( SID_FILE_FILTEROPTIONS, sFilterOptions ) );
1109 if(!sBaseURL.isEmpty())
1110 pMed->GetItemSet()->Put(
SfxStringItem( SID_DOC_BASEURL, sBaseURL ) );
1117 if( !(aRef.
is() && 1 < aRef->GetRefCount()) )
1123 if(!sPassword.isEmpty())
1137 ErrCode nErrno = pRdr->Read( *pRead );
1156 const SwPaM &rNewCursor,
1157 const OUString &rText,
1158 const bool bForceExpandHints )
1162 for (sal_Int32
i = 0;
i < rText.getLength(); ++
i)
1166 && ch !=
'\r' && ch !=
'\n' && ch !=
'\t')
1168 SAL_WARN(
"sw.uno",
"DocInsertStringSplitCR: refusing to insert control character " <<
int(ch));
1184 SAL_INFO(
"sw.uno",
"DocInsertStringSplitCR: need a text node");
1188 sal_Int32 nStartIdx = 0;
1189 const sal_Int32 nMaxLength =
COMPLETE_STRING - pTextNd->GetText().getLength();
1191 sal_Int32 nIdx = rText.indexOf(
'\r', nStartIdx );
1192 if( ( nIdx == -1 && nMaxLength < rText.getLength() ) ||
1193 ( nIdx != -1 && nMaxLength < nIdx ) )
1199 OSL_ENSURE( nIdx - nStartIdx >= 0,
"index negative!" );
1200 aText = rText.copy( nStartIdx, nIdx - nStartIdx );
1201 if (!aText.isEmpty() &&
1204 OSL_FAIL(
"Doc->Insert(Str) failed." );
1209 OSL_FAIL(
"SplitNode failed" );
1212 nStartIdx = nIdx + 1;
1213 nIdx = rText.indexOf(
'\r', nStartIdx );
1215 aText = rText.copy( nStartIdx );
1216 if (!aText.isEmpty() &&
1219 OSL_FAIL(
"Doc->Insert(Str) failed." );
1227 std::u16string_view rRedlineType,
1228 const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
1233 if ( rRedlineType ==
u"Insert" )
1234 eType = RedlineType::Insert;
1235 else if ( rRedlineType ==
u"Delete" )
1236 eType = RedlineType::Delete;
1237 else if ( rRedlineType ==
u"Format" )
1238 eType = RedlineType::Format;
1239 else if ( rRedlineType ==
u"TextTable" )
1240 eType = RedlineType::Table;
1241 else if ( rRedlineType ==
u"ParagraphFormat" )
1242 eType = RedlineType::ParagraphFormat;
1244 throw lang::IllegalArgumentException();
1248 std::size_t nAuthor = 0;
1250 if( aPropMap.
getValue(
"RedlineAuthor") >>= sAuthor )
1255 if( aPropMap.
getValue(
"RedlineComment") >>= sComment )
1258 ::util::DateTime aStamp;
1259 if( aPropMap.
getValue(
"RedlineDateTime") >>= aStamp )
1264 std::unique_ptr<SwRedlineExtraData_FormatColl> xRedlineExtraData;
1267 uno::Sequence< beans::PropertyValue > aRevertProperties;
1269 if ( aPropMap.
getValue(
"RedlineRevertProperties") >>= aRevertProperties )
1273 if (eType == RedlineType::ParagraphFormat)
1276 if (!aRevertProperties.hasElements())
1287 if (aRevertProperties.hasElements())
1292 std::vector<sal_uInt16> aWhichPairs;
1293 std::vector<SfxItemPropertySimpleEntry const*>
aEntries;
1294 std::vector<uno::Any> aValues;
1295 aEntries.reserve(aRevertProperties.getLength());
1298 for (
const auto& rRevertProperty : std::as_const(aRevertProperties))
1300 const OUString &rPropertyName = rRevertProperty.Name;
1308 else if (pEntry->
nFlags & beans::PropertyAttribute::READONLY)
1312 else if (rPropertyName ==
"NumberingRules")
1316 nNumId = aEntries.size();
1321 aWhichPairs.push_back(pEntry->
nWID);
1322 aWhichPairs.push_back(pEntry->
nWID);
1323 if (rPropertyName ==
"ParaStyleName")
1324 nStyleId = aEntries.size();
1326 aEntries.push_back(pEntry);
1327 aValues.push_back(rRevertProperty.Value);
1330 if (!aWhichPairs.empty())
1333 OUString sParaStyleName;
1334 aWhichPairs.push_back(0);
1337 for (
size_t i = 0;
i < aEntries.size(); ++
i)
1343 uno::Reference<container::XNamed> xNumberingRules;
1344 rValue >>= xNumberingRules;
1345 if (xNumberingRules.is())
1350 xNumberingRules->getName());
1359 rValue >>= sParaStyleName;
1363 if (eType == RedlineType::ParagraphFormat && sParaStyleName.isEmpty())
1368 else if (eType == RedlineType::ParagraphFormat)
1382 throw lang::IllegalArgumentException();
1386 std::u16string_view rRedlineType,
1387 const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
1392 if ( rRedlineType ==
u"TableRowInsert" )
1394 eType = RedlineType::TableRowInsert;
1396 else if ( rRedlineType ==
u"TableRowDelete" )
1398 eType = RedlineType::TableRowDelete;
1402 throw lang::IllegalArgumentException();
1406 std::size_t nAuthor = 0;
1408 if( aPropMap.
getValue(
"RedlineAuthor") >>= sAuthor )
1413 if( aPropMap.
getValue(
"RedlineComment") >>= sComment )
1416 ::util::DateTime aStamp;
1417 if( aPropMap.
getValue(
"RedlineDateTime") >>= aStamp )
1420 DateTime(
Date( aStamp.Day, aStamp.Month, aStamp.Year ),
tools::Time( aStamp.Hours, aStamp.Minutes, aStamp.Seconds ) ) );
1431 throw lang::IllegalArgumentException();
1435 std::u16string_view rRedlineType,
1436 const uno::Sequence< beans::PropertyValue >& rRedlineProperties )
1441 if ( rRedlineType ==
u"TableCellInsert" )
1443 eType = RedlineType::TableCellInsert;
1445 else if ( rRedlineType ==
u"TableCellDelete" )
1447 eType = RedlineType::TableCellDelete;
1451 throw lang::IllegalArgumentException();
1455 std::size_t nAuthor = 0;
1457 if( aPropMap.
getValue(
"RedlineAuthor") >>= sAuthor )
1462 if( aPropMap.
getValue(
"RedlineComment") >>= sComment )
1465 ::util::DateTime aStamp;
1466 if( aPropMap.
getValue(
"RedlineDateTime") >>= aStamp )
1469 DateTime(
Date( aStamp.Day, aStamp.Month, aStamp.Year ),
tools::Time( aStamp.Hours, aStamp.Minutes, aStamp.Seconds ) ) );
1480 throw lang::IllegalArgumentException();
1485 sal_uInt32 nKey = (nWhichId << 16) + nMemberId;
1492 sal_uInt32 nKey = (nWhichId << 16) + nMemberId;
1493 auto aIt =
m_Map.find( nKey );
1494 if (aIt !=
m_Map.end())
1496 pAny = & aIt->second;
Starts a section of nodes in the document model.
const SfxItemPropertySimpleEntry * getByName(std::u16string_view rName) const
SwNode & GetNode(bool bPoint=true) const
virtual SfxObjectFactory & GetFactory() const =0
static uno::Any GetParaListAutoFormat(SwTextNode const &rNode)
virtual const SwDoc * GetDoc() const =0
Marks a position in the document model.
#define FN_UNO_DOCUMENT_INDEX_MARK
void SetExtraData(const SwRedlineExtraData *pData)
ExtraData gets copied, the pointer is therefore not taken over by the RedLineObject.
const SwNodeNum * GetNum(SwRootFrame const *pLayout=nullptr) const
SwTableBox * GetTableBox() const
If node is in a table return the respective table box.
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_METAFIELD(49)
virtual const SwRootFrame * GetCurrentLayout() const =0
SwDocShell * GetDocShell()
SwpHints * GetpSwpHints()
virtual AppendResult AppendRedline(SwRangeRedline *pNewRedl, bool bCallDelete)=0
Append a new redline.
void SetTimeStamp(const DateTime &rDT)
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_META(48)
virtual void SetRedlineFlags_intern(RedlineFlags eMode)=0
Set a new redline mode.
static SwTOXBase * GetCurTOX(const SwPosition &rPos)
Get current table of contents.
static SwPaM * lcl_createPamCopy(const SwPaM &rPam)
virtual const sal_Int32 * GetEnd() const
end position
const SwFrameFormat * GetFrameFormat() const
static css::uno::Reference< css::text::XTextContent > CreateXParagraph(SwDoc &rDoc, SwTextNode *pTextNode, css::uno::Reference< css::text::XText > const &xParentText=nullptr, const sal_Int32 nSelStart=-1, const sal_Int32 nSelEnd=-1)
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
Reference< XFrame > xFrame
const SwPosition * GetMark() const
#define FN_UNO_PARA_CONT_PREV_SUBTREE
void getNumberingProperty(SwPaM &rPam, PropertyState &eState, Any *pAny)
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
SwTableBox * GetTableBox() const
virtual SwUndoId EndUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Closes undo block.
OUString GetListId() const
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
void resetCursorPropertyValue(const SfxItemPropertySimpleEntry &rEntry, SwPaM &rPam)
bool getCursorPropertyValue(const SfxItemPropertySimpleEntry &rEntry, SwPaM &rPam, Any *pAny, PropertyState &eState, const SwTextNode *pNode)
SwTableLine is one table row in the document model.
#define FN_UNO_TEXT_PARAGRAPH
SwSectionFormat * GetFormat()
IDocumentUndoRedo & GetIDocumentUndoRedo()
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)
static css::uno::Reference< css::text::XTextField > CreateXTextField(SwDoc *pDoc, SwFormatField const *pFormat, SwServiceType nServiceId=SwServiceType::Invalid)
virtual bool DeleteAndJoin(SwPaM &, const bool bForceJoinNext=false)=0
complete delete of a given PaM
SwTextAttr * GetTextAttrAt(sal_Int32 const nIndex, sal_uInt16 const nWhich, enum GetTextAttrMode const eMode=DEFAULT) const
get the innermost text attribute covering position nIndex.
IDocumentContentOperations const & getIDocumentContentOperations() const
void makeTableCellRedline(SwTableBox &rTableBox, std::u16string_view rRedlineType, const uno::Sequence< beans::PropertyValue > &rRedlineProperties)
bool IsListRestart() const
The root element of a Writer document layout.
static SwSection * GetCurrSection(const SwPosition &rPos)
int GetActualListLevel() const
Returns the actual list level of this text node, when it is a list item.
SwTableFormat * GetFrameFormat()
int GetAttrOutlineLevel() const
Returns outline level of this text node.
static css::uno::Reference< css::lang::XSingleServiceFactory > GetStorageFactory(const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
const OUString & GetName() const
SwContentNode * GetContentNode(bool bPoint=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...
css::uno::Any const & rValue
#define PROPERTY_MAP_CHAR_AUTO_STYLE
#define FN_UNO_PARA_NUM_AUTO_FORMAT
#define FN_UNO_DOCUMENT_INDEX
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
static SwNumRule * GetNumRuleAtPos(SwPosition &rPos, SwRootFrame const *pLayout=nullptr)
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.
A wrapper around SfxPoolItem to store the start position of (usually) a text portion, with an optional end.
void SetComment(const OUString &rS)
constexpr TypedWhichId< SfxUInt16Item > RES_PARATR_OUTLINELEVEL(79)
sal_uLong GetIndex() const
sal_Int32 GetStart() const
FontMetric Get(const OUString &rName, const OUString &rStyleName) const
void SetValue(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const css::uno::Any &rAny)
const css::uno::Reference< css::uno::XAggregation > & GetAggregationInterface() const
const SwTable & GetTable() const
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
const SwFormatField & GetFormatField() const
#define FN_UNO_PARA_CONDITIONAL_STYLE_NAME
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(58)
void SetExtraData(const SwRedlineExtraData *pData)
ExtraData gets copied, the pointer is therefore not taken over by the RedLineObject.
Redline that holds information about a table-cell that had some change.
virtual bool AppendTableCellRedline(SwTableCellRedline *pPtr)=0
SwPaM & SetPam(size_t nArrPos, SwPaM &rPam)
static SwXCell * CreateXCell(SwFrameFormat *pTableFormat, SwTableBox *pBox, SwTable *pTable=nullptr)
SwFormatColl & GetAnyFormatColl() const
std::unique_ptr< SwReader, o3tl::default_delete< SwReader > > SwReaderPtr
void DelNumRules(const SwPaM &, SwRootFrame const *pLayout=nullptr)
void SetNodeNumStart(const SwPosition &rPos, sal_uInt16 nStt)
FlyCntType GetFlyCntType() const
#define FN_UNO_PAGE_STYLE
PaM is Point and Mark: a selection of the document model.
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
SwNumRule * FindNumRulePtr(const OUString &rName) const
static SwTable * FindTable(SwFrameFormat const *const pFormat)
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 SwUndoId StartUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Opens undo block.
SwTextAttr * Get(size_t nPos) const
bool GoInNode(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwTableBox * FindBox(SwTable *pTable, SwTableBox *pBox)
search if a box exists in a table
const SwStartNode * StartOfSectionNode() const
const SwPosition * GetPoint() const
SwIndex & Assign(SwIndexReg *, sal_Int32)
#define FN_UNO_NESTED_TEXT_CONTENT
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
SwPageFrame * FindPageFrame()
SwPageDesc * GetPageDesc()
SwContentNode * GetContentNode()
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
css::uno::Any getValue(const OUString &sKey) const
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
static css::uno::Reference< css::text::XDocumentIndexMark > CreateXDocumentIndexMark(SwDoc &rDoc, SwTOXMark *pMark, TOXTypes eType=TOX_INDEX)
const SfxItemPropertyMap & getPropertyMap() const
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
static css::uno::Reference< css::text::XDocumentIndex > CreateXDocumentIndex(SwDoc &rDoc, SwTOXBaseSection *pSection, TOXTypes eTypes=TOX_INDEX)
SwFrameFormat * GetFrameFormat()
void setPropertyValue(const SfxItemPropertySimpleEntry &rEntry, const css::uno::Any &aVal, SfxItemSet &rSet) const
Marks a node in the document model.
SwFrameFormat * GetFrameFormat()
css::uno::Type const & get()
static css::uno::Reference< css::text::XTextTable > GetObject(SwFrameFormat &rFormat)
SwTextField * GetFieldTextAttrAt(const sal_Int32 nIndex, const bool bIncludeInputFieldAtStart=false) const
Reader * StartConvertFrom(SfxMedium &rMedium, SwReaderPtr &rpRdr, SwCursorShell const *pCursorSh=nullptr, SwPaM *pPaM=nullptr)
For inserting document.
SwStartNodeType GetStartNodeType() const
virtual std::size_t InsertRedlineAuthor(const OUString &rAuthor)=0
#define FN_UNO_NUM_START_VALUE
void InsertFile(SwUnoCursor *pUnoCursor, const OUString &rURL, const uno::Sequence< beans::PropertyValue > &rOptions)
static css::uno::Reference< css::text::XTextContent > CreateXReferenceMark(SwDoc &rDoc, SwFormatRefMark *pMarkFormat)
A page of the document layout.
bool FillValue(sal_uInt16 nWhichId, sal_uInt16 nMemberId, const css::uno::Any *&pAny)
const SwFormatFootnote & GetFootnote() const
Redline that holds information about a table-row that had some change.
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
#define FN_UNO_TEXT_SECTION
SwTable is one table in the document model, containing rows (which contain cells).
const SwPosition * Start() const
bool XTextRangeToSwPaM(SwUnoInternalPaM &rToFill, const uno::Reference< text::XTextRange > &xTextRange,::sw::TextRangeMode const eMode)
EXPAND : (Start < nIndex <= End)
bool IsControlChar(sal_Unicode cChar)
DEFAULT: (Start <= nIndex < End)
virtual const SwPaM * GetPaM() const =0
#define FN_UNO_TEXT_FIELD
std::map< sal_uInt32, css::uno::Any > m_Map
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
uno::Reference< text::XTextContent > GetNestedTextContent(SwTextNode const &rTextNode, sal_Int32 const nIndex, bool const bParent)
SwTextNode is a paragraph in the document model.
virtual bool AppendTableRowRedline(SwTableRowRedline *pPtr)=0
void SetExtraData(const SwRedlineExtraData *pData)
ExtraData gets copied, the pointer is therefore not taken over by the RedLineObject.
#define PROPERTY_MAP_PARAGRAPH
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
const SwStartNode * GetSttNd() const
An SwTextAttr container, stores all directly formatted text portions for a text node.
const SwCharFormats * GetCharFormats() const
#define FN_NUMBER_NEWSTART
SwNumberTree::tSwNumTreeNumber GetAttrListRestartValue() const
#define FN_UNO_CHARFMT_SEQUENCE
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
std::shared_ptr< const SfxFilter > GetFilter4FilterName(const OUString &rName, SfxFilterFlags nMust=SfxFilterFlags::NONE, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
#define FN_UNO_REFERENCE_MARK
#define SAL_INFO(area, stream)
sal_Int32 GetIndex() const
bool IsCountedInList() const
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
SdrObject * GetSdrObject() const
static SW_DLLPUBLIC css::uno::Reference< css::text::XTextFrame > CreateXTextFrame(SwDoc &rDoc, SwFrameFormat *pFrameFormat)
SwTableBox is one table cell in the document model.
const SwUnoCursor * GetTableCursor() const
SwUnoPropertyMapProvider aSwMapProvider
#define FN_UNO_TEXT_FRAME
::sw::mark::IMark const * GetBookmarkInDoc(SwDoc const *const pDoc, const css::uno::Reference< css::lang::XUnoTunnel > &xUT)
constexpr TypedWhichId< SwTOXMark > RES_TXTATR_TOXMARK(47)
void makeRedline(SwPaM const &rPaM, std::u16string_view rRedlineType, const uno::Sequence< beans::PropertyValue > &rRedlineProperties)
bool IsContinueingPreviousSubTree() const
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
SwTableNode * FindTableNode()
Search table node, in which it is.
void makeTableRowRedline(SwTableLine &rTableLine, std::u16string_view rRedlineType, const uno::Sequence< beans::PropertyValue > &rRedlineProperties)
SwFormatColl * GetCurTextFormatColl(SwPaM &rPam, const bool bConditional)
virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart)=0
Split a node at rPos (implemented only for TextNode).
OUString GetNumString(const bool _bInclPrefixAndSuffixStrings=true, const unsigned int _nRestrictToThisLevel=MAXLEVEL, SwRootFrame const *pLayout=nullptr) const
Returns outline of numbering string.
const SfxPoolItem & GetAttr() const
void GetCurPageStyle(SwPaM const &rPaM, OUString &rString)
void setNumberingProperty(const Any &rValue, SwPaM &rPam)
std::vector< SwTextAttr * > GetTextAttrsAt(sal_Int32 const nIndex, sal_uInt16 const nWhich) const
get the innermost text attributes covering position nIndex.
ScXMLEditAttributeMap::Entry const aEntries[]
constexpr TypedWhichId< SwFormatAutoFormat > RES_PARATR_LIST_AUTOFMT(87)
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
#define SAL_WARN(area, stream)
SwFormatColl * GetFormatColl() const
bool DocInsertStringSplitCR(SwDoc &rDoc, const SwPaM &rNewCursor, const OUString &rText, const bool bForceExpandHints)
void SetUsedByRedline(bool bUsed)
#define FN_UNO_TEXT_TABLE
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
const FontList * GetFontList() const
static bool isInvalidStyle(std::u16string_view rName)
static css::uno::Reference< css::text::XTextSection > GetObject(SwSectionFormat &rFormat)
SfxFilterContainer * GetFilterContainer() const
const SwFormatCharFormat & GetCharFormat() 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.
bool HasAttrListRestartValue() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
void DeepCopyPaM(SwPaM const &rSource, SwPaM &rTarget)
OUString const & GetName() const
sal_Int16 IsNodeNumStart(SwPaM const &rPam, PropertyState &eState)
#define FN_UNO_PARA_NUM_STRING
SwFrameFormat * GetFlyFormat() const
If node is in a fly return the respective format.
#define PROPERTY_MAP_TEXTPORTION_EXTENSIONS
const sal_Int32 COMPLETE_STRING
#define FN_UNO_PARA_STYLE
const SwAttrPool & GetAttrPool() const
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwFrameFormat * GetFrameFormat() const
SwNumRule * GetOutlineNumRule() const
static const OUString & GetProgName(const OUString &rName, SwGetPoolIdFromName)
SW_DLLPUBLIC SwFrameFormat * GetFrameFormat()