23 #include <osl/diagnose.h>
24 #include <osl/endian.h>
48 bool bSaveRelFile,
const OUString* pOnlyText )
61 return rBlks.
PutText( rShortName, rName, *pOnlyText );
76 const OUString& rName,
77 const OUString& rShortName,
108 if( pNd == pContentNd )
120 if( !sBuf.isEmpty() )
121 nRet = rBlock.
PutText( rShortName, rName, sBuf );
131 if( !pNd ) pNd = pContentNd;
132 SwPaM aCpyPam( *pNd );
139 pContentNd, pContentNd ? pContentNd->Len() : 0);
161 SwIndex(pContentNode, pContentNode ? pContentNode->Len() : 0));
177 if( !aBoxes.
empty() &&
nullptr != (pTableNd =
const_cast<SwTableNode*
>(aBoxes[0]
178 ->GetSttNd()->FindTableNode()) ))
186 for(
auto n = rTableFormats.
size();
n; )
187 if( rTableFormats[ --
n ]->GetName() == rTableName )
193 bRet = rInsDoc.
InsCopyOfTable( aPos, aBoxes,
nullptr, bCpyTableNm );
207 if( !rPaM.HasMark() )
210 if (
nullptr != pNd &&
226 SwPaM aPaM(*rPaM.GetMark(), *rPaM.GetPoint());
241 aPaM.Start()->nNode = *pSectionNode;
243 aPaM.Start()->nContent.
Assign(
nullptr, 0);
269 rBuf = rBuf.replaceAll(
"\x0a",
" ");
285 aStream.
SetEndian( SvStreamEndian::BIG );
287 aStream.
SetEndian( SvStreamEndian::LITTLE );
295 xWrt->SetShowProgress(
false);
297 switch( nHndlParaBrk )
300 xWrt->m_bASCII_ParaAsBlank =
true;
301 xWrt->m_bASCII_NoLastLineEnd =
true;
305 xWrt->m_bASCII_ParaAsCR =
true;
306 xWrt->m_bASCII_NoLastLineEnd =
true;
312 aAsciiOpt.
SetCharSet( RTL_TEXTENCODING_UCS2 );
313 xWrt->SetAsciiOptions( aAsciiOpt );
314 xWrt->m_bUCS2_WithStartChar =
false;
326 const sal_uInt64 nLen = aStream.
GetSize();
328 rtl_uString *pStr = rtl_uString_alloc(static_cast<sal_Int32>(nLen /
sizeof(
sal_Unicode )));
333 rBuf = OUString(pStr, SAL_NO_ACQUIRE);
SwSectionNode * FindSectionNode()
Search section node, in which it is.
void InsertGlossary(SwTextBlocks &rGlossary, const OUString &)
Glossary from glossary document in current document.
bool IsColumnSelection() const
sal_uLong GetIndex() const
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
Marks a position in the document model.
SwPaM * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
SvStream & WriteUInt16(sal_uInt16 nUInt16)
virtual void ResetError() override
sal_uInt16 MakeGlossary(SwTextBlocks &rToFill, const OUString &rName, const OUString &rShortName, bool bSaveRelFile, const OUString *pOnlyText)
Make current selection glossary and insert into glossary document including styles.
const SwFrameFormats * GetTableFrameFormats() const
virtual void SetRedlineFlags_intern(RedlineFlags eMode)=0
Set a new redline mode.
void GetSelectedText(OUString &rBuf, ParaBreakType nHndlParaBreak=ParaBreakType::ToBlank)
Query text within selection.
sal_uInt64 Seek(sal_uInt64 nPos)
bool IsSelFullPara() const
ErrCode Write(WriterRef const &rxWriter, const OUString *=nullptr)
IDocumentContentOperations const & getIDocumentContentOperations() const
SwTableFormat * GetFrameFormat()
virtual void LockExpFields()=0
SwContentNode * GetContentNode(bool bPoint=true) const
virtual void UpdateExpFields(SwTextField *pField, bool bUpdateRefFields)=0
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
check if target position is in fly anchored at source range
virtual bool IsExpFieldsLocked() const =0
bool InsertGlossary(SwTextBlocks &rBlock, const OUString &rEntry, SwPaM &rPaM, SwCursorShell *pShell=nullptr)
inserts an AutoText block
const SwTable & GetTable() const
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
SwShellCursor * GetCursor_()
SwTableSortBoxes & GetTabSortBoxes()
void SetCharSet(rtl_TextEncoding nVal)
PaM is Point and Mark: a selection of the document model.
bool ExtendedSelectedAll()
If ExtendedSelectAll() was called and selection didn't change since then.
void SetBaseURL(const OUString &rURL)
void GetTableSel(const SwCursorShell &rShell, SwSelBoxes &rBoxes, const SwTableSearchType eSearchType)
sal_uInt16 PutText(const OUString &, const OUString &, const OUString &)
const SwStartNode * StartOfSectionNode() const
const SwPosition * GetPoint() const
virtual bool CopyRange(SwPaM &rPam, SwPosition &rPos, SwCopyFlags flags) const =0
Copy a selected content range to a position.
SwIndex & Assign(SwIndexReg *, sal_Int32)
bool CopySelToDoc(SwDoc &rInsDoc)
For copying via ClipBoard: If table is copied into table, move all cursors away from it...
SwContentNode * GetContentNode()
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
Marks a character position inside a document model node.
Marks a node in the document model.
ring_container GetRingContainer()
const SwPosition * Start() const
std::size_t ReadBytes(void *pData, std::size_t nSize)
bool BeginPutDoc(const OUString &, const OUString &)
sal_uInt16 SaveGlossaryDoc(SwTextBlocks &rGlossary, const OUString &rName, const OUString &rShortName, bool bSaveRelFile, bool bOnlyText)
Save complete content of doc as glossary.
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
OUString GetSelText() const
get selected text of a node at current cursor
void SetEndian(SvStreamEndian SvStreamEndian)
void SetColumnSelection(bool bNew)
bool StartsWithTable()
If document body starts with a table.
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding)...
SwTableNode * FindTableNode()
Search table node, in which it is.
bool InsCopyOfTable(SwPosition &rInsPos, const SwSelBoxes &rBoxes, const SwTable *pCpyTable, bool bCpyName=false, bool bCorrPos=false)
Copies a Table from the same or another Doc into itself We create a new Table or an existing one is f...
void GetWriter(const OUString &rFltName, const OUString &rBaseURL, WriterRef &xRet)
Return writer based on the name.
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
virtual void UnlockExpFields()=0
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
void StartAllAction()
For all views of this document.
bool IsSelOnePara() const
SwRootFrame * GetLayout() const
#define FILTER_TEXT
text filter with default codeset
SwContentNode * GoNext(SwNodeIndex *) const
OUString const & GetFileName() const
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeIndex & Assign(SwNodes const &rNds, sal_uLong)
Base class of the Writer document model elements.