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,
93 sal_uInt16 nRet = USHRT_MAX;
118 if( !sBuf.isEmpty() )
119 nRet = rBlock.
PutText( rShortName, rName, sBuf );
129 if( !pNd ) pNd = pContentNd;
130 SwPaM aCpyPam( *pNd );
158 SwPosition aPos( aIdx, pContentNode, pContentNode ? pContentNode->
Len() : 0);
174 if( !aBoxes.
empty() &&
nullptr != (pTableNd =
const_cast<SwTableNode*
>(aBoxes[0]
175 ->GetSttNd()->FindTableNode()) ))
183 for(
auto n = rTableFormats.
size();
n; )
184 if( rTableFormats[ --
n ]->
GetName() == rTableName )
202 : ::std::optional<::std::pair<
SwNode const*, ::std::vector<SwTableNode*>>>{});
206 if( !rPaM.HasMark() )
209 if (
nullptr != pNd &&
225 SwPaM aPaM(*rPaM.GetMark(), *rPaM.GetPoint());
257 rBuf = rBuf.replaceAll(
"\x0a",
" ");
269 aStream.
SetEndian( SvStreamEndian::BIG );
271 aStream.
SetEndian( SvStreamEndian::LITTLE );
279 xWrt->SetShowProgress(
false);
281 switch( nHndlParaBrk )
284 xWrt->m_bASCII_ParaAsBlank =
true;
285 xWrt->m_bASCII_NoLastLineEnd =
true;
289 xWrt->m_bASCII_ParaAsCR =
true;
290 xWrt->m_bASCII_NoLastLineEnd =
true;
296 aAsciiOpt.
SetCharSet( RTL_TEXTENCODING_UCS2 );
297 xWrt->SetAsciiOptions( aAsciiOpt );
298 xWrt->m_bUCS2_WithStartChar =
false;
310 const sal_uInt64 nLen = aStream.
GetSize();
312 rtl_uString *pStr = rtl_uString_alloc(
static_cast<sal_Int32
>(nLen /
sizeof(
sal_Unicode )));
317 rBuf = OUString(pStr, SAL_NO_ACQUIRE);
@ CheckPosInFly
check if target position is in fly anchored at source range
virtual bool CopyRange(SwPaM &rPam, SwPosition &rPos, SwCopyFlags flags) const =0
Copy a selected content range to a position.
virtual void LockExpFields()=0
virtual bool IsExpFieldsLocked() const =0
virtual void UpdateExpFields(SwTextField *pField, bool bUpdateRefFields)=0
virtual void UnlockExpFields()=0
virtual void SetRedlineFlags_intern(RedlineFlags eMode)=0
Set a new redline mode.
virtual void ResetError() override
void SetEndian(SvStreamEndian SvStreamEndian)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
sal_uInt64 Seek(sal_uInt64 nPos)
std::size_t ReadBytes(void *pData, std::size_t nSize)
void SetCharSet(rtl_TextEncoding nVal)
virtual sal_Int32 Len() const
bool IsSelOnePara() const
SwShellCursor * GetCursor_()
StartsWith StartsWith_()
If document body starts with a table or starts/ends with hidden paragraph.
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
OUString GetSelText() const
get selected text of a node at current cursor
bool IsSelFullPara() const
::std::optional<::std::pair< SwNode const *, ::std::vector< SwTableNode * > > > ExtendedSelectedAll() const
If ExtendedSelectAll() was called and selection didn't change since then.
bool IsColumnSelection() const
const sw::TableFrameFormats * GetTableFrameFormats() const
bool InsertGlossary(SwTextBlocks &rBlock, const OUString &rEntry, SwPaM &rPaM, SwCursorShell *pShell=nullptr)
inserts an AutoText block
bool InsCopyOfTable(SwPosition &rInsPos, const SwSelBoxes &rBoxes, const SwTable *pCpyTable, bool bCpyName=false, bool bCorrPos=false, const OUString &rStyleName="")
Copies a Table from the same or another Doc into itself We create a new Table or an existing one is f...
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
void SetColumnSelection(bool bNew)
void StartAllAction()
For all views of this document.
bool CopySelToDoc(SwDoc &rInsDoc)
For copying via ClipBoard: If table is copied into table, move all cursors away from it.
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.
sal_uInt16 SaveGlossaryDoc(SwTextBlocks &rGlossary, const OUString &rName, const OUString &rShortName, bool bSaveRelFile, bool bOnlyText)
Save complete content of doc as glossary.
void GetSelectedText(OUString &rBuf, ParaBreakType nHndlParaBreak=ParaBreakType::ToBlank)
Query text within selection.
void InsertGlossary(SwTextBlocks &rGlossary, const OUString &)
Glossary from glossary document in current document.
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
SwTableNode * FindTableNode()
Search table node, in which it is.
SwContentNode * GetContentNode()
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
SwContentNode * GoNext(SwNodeIndex *) const
PaM is Point and Mark: a selection of the document model.
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
SwContentNode * GetPointContentNode() const
const SwPosition * GetPoint() const
const SwPosition * Start() const
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding).
const SwTable & GetTable() const
const OUString & GetTableStyleName() const
Return the table style name of this table.
SwTableFormat * GetFrameFormat()
SwTableSortBoxes & GetTabSortBoxes()
bool BeginPutDoc(const OUString &, const OUString &)
OUString const & GetFileName() const
sal_uInt16 PutText(const OUString &, const OUString &, const OUString &)
void SetBaseURL(const OUString &rURL)
SwRootFrame * GetLayout() const
ErrCode Write(WriterRef const &rxWriter, const OUString *=nullptr)
ring_container GetRingContainer()
#define SAL_NEWLINE_STRING
virtual OUString GetName() const override
constexpr OUStringLiteral FILTER_TEXT
text filter with default codeset
void GetWriter(std::u16string_view rFltName, const OUString &rBaseURL, WriterRef &xRet)
Return writer based on the name.
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
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.
void GetTableSel(const SwCursorShell &rShell, SwSelBoxes &rBoxes, const SwTableSearchType eSearchType)