20 #include <config_features.h>
23 #include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
24 #include <com/sun/star/frame/XModel.hpp>
42 #include <UndoManager.hxx>
48 #include <rtl/ustring.hxx>
81 #include <strings.hrc>
93 #include <osl/diagnose.h>
94 #include <osl/interlck.h>
203 static bool bHack = (getenv(
"LIBO_ONEWAY_STABLE_ODF_EXPORT") !=
nullptr);
205 sal_uInt32 nIncrease = 0;
213 mnRsid = nVal + nIncrease;
474 sal_uInt16& rVirtPgNo, sal_uInt16& rLineNo );
484 sal_uInt16 PostItField_::GetPageNo(
487 sal_uInt16& rVirtPgNo, sal_uInt16& rLineNo )
496 for(
SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() )
499 &GetTextField()->GetTextNode(), GetContent());
500 if( pFrame->GetOffset() > nPos ||
501 (pFrame->HasFollow() && pFrame->GetFollow()->GetOffset() <= nPos) )
503 sal_uInt16 nPgNo = pFrame->GetPhyPageNum();
504 if( rRangeEnum.
hasValue( nPgNo, &rPossiblePages ))
506 rLineNo =
static_cast<sal_uInt16
>(pFrame->GetLineCount( nPos ) +
507 pFrame->GetAllLines() - pFrame->GetThisLines());
508 rVirtPgNo = pFrame->GetVirtPageNum();
520 std::vector<SwFormatField*> vFields;
523 for(
auto pField: vFields)
525 auto pTextField = pField->GetTextField();
527 std::unique_ptr<PostItField_> pNew(
new PostItField_(aIdx, pTextField));
528 pSrtLst->
insert(std::move(pNew));
531 return vFields.size()>0;
538 bool bNewPage,
bool bIsFirstPostIt,
539 sal_uInt16 nPageNo, sal_uInt16 nLineNo )
541 static char const sTmp[] =
" : ";
550 else if (!bIsFirstPostIt)
559 OUString::number( nPageNo ) +
565 OUString::number( nLineNo ) +
570 aStr += pField->
GetPar1() +
" ";
574 aStr +=
" " +
SwResId(STR_RESOLVED);
581 aStr = aStr.replaceAll(
"\r",
"");
596 if (eState > SfxItemState::DEFAULT && pPaperBinItem)
597 nRes = pPaperBinItem->GetValue();
607 OUString UIPages2PhyPages(
const OUString& rUIPageRange,
const std::map< sal_Int32, sal_Int32 >& rUIPages2PhyPagesMap)
609 if (rUIPages2PhyPagesMap.empty())
611 auto iMin = rUIPages2PhyPagesMap.begin();
612 const sal_Int32 nUIPageMin = iMin->first, nPhyPageMin = iMin->second;
613 auto iMax = rUIPages2PhyPagesMap.rbegin();
614 const sal_Int32 nUIPageMax = iMax->first, nPhyPageMax = iMax->second;
615 OUStringBuffer aOut(rUIPageRange.getLength());
616 OUStringBuffer aNumber(16);
620 while (*pInput >=
'0' && *pInput <=
'9')
621 aNumber.append(*pInput++);
622 if (!aNumber.isEmpty())
624 sal_Int32 nNumber = aNumber.makeStringAndClear().toInt32();
625 if (nNumber < nUIPageMin)
626 nNumber = nPhyPageMin-1;
627 else if (nNumber > nUIPageMax)
628 nNumber = nPhyPageMax+1;
630 nNumber = rUIPages2PhyPagesMap.at(nNumber);
631 aOut.append(nNumber);
634 while (*pInput && (*pInput < '0' || *pInput >
'9'))
635 aOut.append(*pInput++);
638 return aOut.makeStringAndClear();
645 sal_uInt16& nDocPageCount,
646 sal_uInt16& nActualPage)
648 sal_uInt16 nDocPageCountWithBlank = nDocPageCount;
649 sal_uInt16 nActualPageWithBlank = nActualPage;
650 sal_uInt16 nPageNum = 1;
652 while (pStPage && nPageNum <= nDocPageCountWithBlank)
657 if (nPageNum <= nActualPageWithBlank)
670 sal_Int32 nDocPageCount )
672 const sal_Int64 nContent = rOptions.
getIntValue(
"PrintContent", 0 );
673 const bool bPrintSelection = nContent == 2;
680 bool bPrintEmptyPages = !bPrintSelection && rOptions.
IsPrintEmptyPages( bIsPDFExport );
685 std::map< sal_Int32, sal_Int32 > aUIPages2PhyPagesMap;
688 sal_Int32 nPageNum = 1, nUIPageNum = 1;
690 while (pStPage && nPageNum <= nDocPageCount)
693 const bool bPrintThisPage =
696 ( bPrintEmptyPages || bNonEmptyPage );
700 rValidPages.
insert( nPageNum );
704 if ( bPrintEmptyPages || bNonEmptyPage )
706 aUIPages2PhyPagesMap[nUIPageNum++] = nPageNum;
740 if (aPageRange.isEmpty())
743 aPageRange = OUString::number( 1 ) +
"-" + OUString::number( nDocPageCount );
748 aPageRange = UIPages2PhyPages(aPageRange, aUIPages2PhyPagesMap);
762 sal_Int32 nDocPageCount )
767 &&
"print post-its without post-it data?");
777 SwPaM aPam(rPostItDoc.GetNodes().GetEndOfContent());
781 rPostItDoc.getIDocumentContentOperations().DeleteRange( aPam );
789 std::map< sal_Int32, sal_Int32 > aPostItLastStartPageNum;
795 sal_uInt16 nVirtPg = 0, nLineNo = 0, nLastPageNum = 0, nPhyPageNum = 0;
796 bool bIsFirstPostIt =
true;
799 PostItField_& rPostIt =
static_cast<PostItField_&
>(*(*rData.
m_pPostItFields)[
i ]);
800 nLastPageNum = nPhyPageNum;
801 nPhyPageNum = rPostIt.GetPageNo(
809 !bIsFirstPostIt && nPhyPageNum != nLastPageNum;
812 rPostIt.GetPostIt(), bNewPage, bIsFirstPostIt, nVirtPg, nLineNo );
813 bIsFirstPostIt =
false;
820 aPostItLastStartPageNum[ nPhyPageNum ] = nPages;
833 const sal_Int32 nPostItDocPageCount = rData.
m_pPostItShell->GetPageCount();
848 sal_Int32 nPageNum = 0;
850 while( pPageFrame && nPageNum < nPostItDocPageCount )
857 OSL_ENSURE( nPageNum == nPostItDocPageCount,
"unexpected number of pages" );
865 std::vector< sal_Int32 > aTmpPagesToPrint;
866 sal_Int32 nLastPostItPage(0);
868 for (
size_t i = 0 ;
i < nNum; ++
i)
872 aTmpPagesToPrint.push_back( nPhysPage );
876 std::map<sal_Int32, sal_Int32>::const_iterator
const iter(
877 aPostItLastStartPageNum.find(nPhysPage));
878 if (iter != aPostItLastStartPageNum.end())
880 for (sal_Int32 j = nLastPostItPage + 1;
881 j <= iter->second; ++j)
884 aTmpPagesToPrint.push_back(-j);
886 nLastPostItPage = iter->second;
902 sal_Int32 nDocPageCount )
907 std::map< sal_Int32, const SwPageFrame * > validStartFrames;
910 rValidPagesSet.
clear();
917 const sal_Int64 nContent = rOptions.
getIntValue(
"PrintContent", 0 );
920 if (aPageRange.isEmpty())
923 aPageRange = OUString::number( 1 ) +
"-" + OUString::number( nDocPageCount );
927 if ( aRange.
size() <= 0)
931 for ( sal_Int32
i = 1; pStPage &&
i < nDocPageCount; ++
i )
932 pStPage = static_cast<const SwPageFrame*>(pStPage->
GetNext());
938 sal_Int32 nPageNum = 0;
940 while( pPageFrame && nPageNum < nDocPageCount )
943 rValidPagesSet.
insert( nPageNum );
944 validStartFrames[ nPageNum ] = pPageFrame;
949 OSL_ENSURE( nPageNum == nDocPageCount,
"unexpected number of pages" );
956 bool bPrintProspectRTL = rOptions.
getIntValue(
"PrintProspectRTL", 0 ) != 0;
960 std::vector< sal_Int32 > aPagesToPrint;
962 aPageRange, aPagesToPrint, 1, nDocPageCount, 0 );
964 if (aPagesToPrint.empty())
969 std::vector< const SwPageFrame * > aVec;
970 for (sal_Int32 nPage : aPagesToPrint)
972 const SwPageFrame *pFrame = validStartFrames[ nPage ];
973 aVec.push_back( pFrame );
977 if ( 1 == aVec.size() )
978 aVec.insert( aVec.begin() + 1, nullptr );
984 while( aVec.size() & 3 )
985 aVec.push_back(
nullptr );
989 std::vector< const SwPageFrame * >::size_type nSPg = 0;
990 std::vector< const SwPageFrame * >::size_type nEPg = aVec.size();
992 if ( 0 == (nEPg & 1 ))
995 if ( !bPrintLeftPages )
997 else if ( !bPrintRightPages )
1005 sal_Int32 nCntPage = (( nEPg - nSPg ) / ( 2 * nStep )) + 1;
1007 for ( sal_Int32 nPrintCount = 0; nSPg < nEPg &&
1008 nPrintCount < nCntPage; ++nPrintCount )
1010 pStPage = aVec[ nSPg ];
1011 const SwPageFrame* pNxtPage = nEPg < aVec.size() ? aVec[ nEPg ] :
nullptr;
1013 short nRtlOfs = bPrintProspectRTL ? 1 : 0;
1014 if ( 0 == (( nSPg + nRtlOfs) & 1 ) )
1021 sal_Int32 nFirst = -1, nSecond = -1;
1022 for (
int nC = 0; nC < 2; ++nC )
1024 sal_Int32 nPage = -1;
1034 rPagePairs.emplace_back(nFirst, nSecond );
1036 nSPg = nSPg + nStep;
1037 nEPg = nEPg - nStep;
1039 OSL_ENSURE(
size_t(nCntPage) == rPagePairs.size(),
"size mismatch for number of page pairs" );
1054 const SwTextRefMark* pTextRef = pFormatRef->GetTextRefMark();
1056 rName == pFormatRef->GetRefName() )
1076 if(nCount == nIndex)
1103 OUString aTmp(pRefMark->GetRefName());
1104 pNames->insert(pNames->begin() + nCount, aTmp);
1116 bool bOnlyWrong = *
static_cast<sal_Bool*
>(pArgs);
1170 for (
auto aLayout : aAllLayouts )
1172 aLayout->AllInvalidateSmartTagsOrSpelling(bSmartTags);
1173 aLayout->SetNeedGrammarCheck(
true);
1180 for (
auto aLayout : aAllLayouts )
1181 aLayout->SetIdleFlags();
1191 for(
auto aLayout : aAllLayouts )
1192 aLayout->AllInvalidateAutoCompleteWords();
1199 for(
auto aLayout : aAllLayouts )
1200 aLayout->SetIdleFlags();
1208 if( !pFormatItem || pFormatItem->GetName() != rName )
1225 if (rOutNds.
empty())
1235 const int nLvl =
GetNodes()[ nIndex ]->GetTextNode()->GetAttrOutlineLevel()-1;
1243 while( ( nWish || bKeep ) && nIndex + nEndOfs < nNextOutNd &&
1244 GetNodes()[ nIndex + nEndOfs ]->IsTextNode() )
1247 if (pTextNode->
GetText().getLength() && nWish)
1253 SwNodeRange aRange( *rOutNds[
i ], 0, *rOutNds[ i ], nEndOfs );
1261 while( aIndx < aEndOfDoc )
1263 bool bDelete =
false;
1264 SwNode *pNode = &aIndx.GetNode();
1274 const sal_uInt16 nHeadLine =
static_cast<sal_uInt16
>(
1298 SwPaM aPam(*pTextNd, 0, *pTextNd, pTextNd->
GetText().getLength());
1326 && &pTextNd->
GetNodes() == &rNodes)
1328 RemoveOrDeleteContents(pTextNd, xOperations);
1374 class FieldTypeGuard :
public SwClient
1383 return static_cast<const SwFieldType*
>(GetRegisteredIn());
1389 std::vector<std::unique_ptr<FieldTypeGuard>> aHidingFieldTypes;
1393 aHidingFieldTypes.push_back(std::make_unique<FieldTypeGuard>(pType.get()));
1395 for (
const auto& pTypeGuard : aHidingFieldTypes)
1399 std::vector<SwFormatField*> vFields;
1401 for(
auto pFormatField: vFields)
1413 bool bRemoved =
false;
1422 if (
nullptr != pFormat)
1472 while(
nullptr != (pTmp = pParent->
GetParent() ))
1474 if( pTmp->IsHiddenFlag() )
1490 auto n = aSectFormats.
size();
1501 SwPaM aPam( *pSectNd );
1541 std::vector<SwFormatField*> vFields;
1558 if( !pSectFormat->IsInNodesArr())
1560 SwSection* pSect = pSectFormat->GetSection();
1587 const SwFieldTypes::size_type
nCount = pMyFieldTypes->size();
1596 std::vector<SwFormatField*> vFieldFormats;
1598 for(
const auto& rpFieldFormat : vFieldFormats)
1600 const SwTextField *pTextField = rpFieldFormat->GetTextField();
1604 bool bSkip = !pTextField ||
1615 if(!bInHeaderFooter ||
1624 OUString sText = pField->
ExpandField(
true, &rLayout);
1637 SwPosition &rEndPos = *aInsertPam.GetPoint();
1647 if (!sText.isEmpty())
1650 SwPaM aDelPam( *aInsertPam.GetMark(), *aInsertPam.GetPoint() );
1652 aInsertPam.DeleteMark();
1712 std::unique_ptr<SwUndoCpyTable> pUndo(
new SwUndoCpyTable(*
this));
1713 pUndo->SetTableSttIdx( pTableNd->
GetIndex() );
1719 std::unique_ptr<SwUndoCpyDoc> pUndo(
new SwUndoCpyDoc( rPam ));
1720 pUndo->SetInsertRange( rPam,
false );
1727 assert(dynamic_cast<const SwTOXBaseSection*>(&rTOX));
1733 std::make_unique<SwUndoTOXChange>(*
this, rTOXSect, rNew));
1747 if (
nullptr != pTextNode)
1752 return SwResId(STR_START_QUOTE)
1761 return SwResId(STR_PARAGRAPHS);
1781 std::shared_ptr<SwUnoCursor> pNew;
1783 pNew = std::make_shared<SwUnoTableCursor>(rPos);
1785 pNew = std::make_shared<SwUnoCursor>(rPos);
1801 uno::Reference< script::vba::XVBAEventProcessor >
const &
1804 #if HAVE_FEATURE_SCRIPTING
1810 uno::Sequence< uno::Any > aArgs(1);
1814 catch( uno::Exception& )
bool IsInsTableChangeNumFormat() const
void AppendUndoForInsertFromDB(const SwPaM &rPam, bool bIsTable)
Set up the InsertDB as Undo table.
Instances of SwFields and those derived from it occur 0 to n times.
const SwEndNode * EndOfSectionNode() const
const std::unique_ptr< ::sw::UndoManager > m_pUndoManager
static void UpdatePagesForPrintingWithPostItData(SwRenderData &rData, const SwPrintUIOptions &rOptions, sal_Int32 nDocPageCount)
Represents the visualization of a paragraph.
std::shared_ptr< SwUnoCursor > CreateUnoCursor(const SwPosition &rPos, bool bTableCursor=false)
virtual sal_Int32 Len() const
PagePairsVec_t & GetPagePairsForProspectPrinting()
used for prospect printing only
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
sal_uLong GetIndex() const
IDocumentStatistics const & getIDocumentStatistics() const
SwNode & GetNode(bool bPoint=true) const
Represents the style of a paragraph.
void ChgDBData(const SwDBData &rNewData)
Marks a position in the document model.
sal_Int32 acquire()
Acquire a reference to an instance.
const SwFormatRefMark * GetRefMark(std::u16string_view rName) const
sal_uLong StartOfSectionIndex() const
void SetHidden(bool const bFlag)
bool IsInsTableFormatNum() const
IDocumentExternalData const & getIDocumentExternalData() const
const std::unique_ptr< ::sw::DocumentOutlineNodesManager > m_pDocumentOutlineNodesManager
const OUString & GetText() const
const std::unique_ptr< ::sw::DocumentListItemsManager > m_pDocumentListItemsManager
virtual const SwRootFrame * GetCurrentLayout() const =0
static ShellResource * GetShellRes()
virtual bool get(DocumentSettingId id) const override
Return the specified document setting.
oslInterlockedCount mReferenceCount
SwDocShell * GetDocShell()
bool HasInvisibleContent() const
SwpHints * GetpSwpHints()
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
std::unique_ptr< SwViewShell > m_pPostItShell
this contains a SwDoc with the post-it content
sal_uInt32 getRsidRoot() const
const std::unique_ptr< ::sw::DocumentLayoutManager > m_pDocumentLayoutManager
bool IsInsTableAlignNum() const
const std::unique_ptr< ::sw::DocumentContentOperationsManager > m_pDocumentContentOperationsManager
SwDBManager * m_pDBManager
virtual sal_Int32 Len() const override
virtual void SetModified()=0
Must be called manually at changes of format.
Provides numbered items of a document.
Base class of all fields.
constexpr TypedWhichId< SvxPaperBinItem > RES_PAPER_BIN(90)
Handle the background jobs of a Writer document.
virtual SwUndoId EndUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Closes undo block.
::sw::DocumentLayoutManager const & GetDocumentLayoutManager() const
IDocumentLinksAdministration const & getIDocumentLinksAdministration() const
sal_Int32 getReferenceCount() const
Returns the current reference count.
virtual OUString GetPar1() const override
Author.
bool IsHiddenByParaField() const
is the paragraph visible?
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
virtual void DeleteRange(SwPaM &)=0
Delete a range SwFlyFrameFormat.
static SwContentNode * GoPrevious(SwNodeIndex *)
::sw::DocumentRedlineManager const & GetDocumentRedlineManager() const
bool ConvertFieldsToText(SwRootFrame const &rLayout)
SwTextNode * GetpTextNode() const
void EndProgress(SwDocShell const *pDocShell)
bool RestoreInvisibleContent()
SwSectionFormat * GetFormat()
SwSection * GetParent() const
IDocumentUndoRedo & GetIDocumentUndoRedo()
css::uno::Reference< css::frame::XModel > GetModel() const
virtual bool DeleteAndJoin(SwPaM &, const bool bForceJoinNext=false)=0
complete delete of a given PaM
IDocumentContentOperations const & getIDocumentContentOperations() const
void SetSmartTags(SwWrongList *pNew, bool bDelete=true)
void SetGrammarCheckDirty(bool bNew) const
The root element of a Writer document layout.
For old documents the Field-Which IDs must be preserved !!!
void Copy_(const SwNodeRange &rRg, const SwNodeIndex &rInsPos, bool bNewFrames=true) const
bool IsInHeaderFooter(const SwNodeIndex &rIdx) const
OUString const & GetCondition() const
unsigned int uniform_uint_distribution(unsigned int a, unsigned int b)
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
void GatherFields(std::vector< SwFormatField * > &rvFormatFields, bool bCollectOnlyInDocNodes=true) const
std::unique_ptr< SetGetExpFields > m_pPostItFields
an array of "SetGetExpField *" sorted by page and line numbers
sal_uInt16 GetPhyPageNum() const
void UpdateFields() const
virtual void LockExpFields()=0
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
void Delete(const SwNodeIndex &rPos, sal_uLong nNodes=1)
delete nodes
const SwTextNode & GetTextNode() const
const LocaleDataWrapper & GetLocaleData() const
bool IsAssignedToListLevelOfOutlineStyle() const
void StartProgress(const char *pMessResId, tools::Long nStartValue, tools::Long nEndValue, SwDocShell *pDocShell)
A class that stores temporary data that is needed for rendering the document.
const SwRect & getFrameArea() const
const std::unique_ptr< ::sw::DocumentRedlineManager > m_pDocumentRedlineManager
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
static void CalculatePagePairsForProspectPrinting(const SwRootFrame &rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, sal_Int32 nDocPageCount)
bool HasHiddenCharAttribute(bool bWholePara) const
Hidden Paragraph Field:
constexpr OUStringLiteral IsHidden(u"IsHidden")
virtual void DelLayoutFormat(SwFrameFormat *pFormat)=0
std::unique_ptr< ::sw::DocumentDeviceManager > m_pDeviceAccess
sal_Int32 GetStart() const
css::uno::Reference< css::uno::XInterface > createVBAUnoAPIServiceWithArgs(SfxObjectShell const *pShell, const char *_pAsciiName, const css::uno::Sequence< css::uno::Any > &aArgs)
sal_uInt32 getRsid() const
void CommitLastRegistrations()
Accept not committed registrations.
void SetPageRange(const OUString &rRange)
const SwFormatField & GetFormatField() const
o3tl::sorted_vector< SwRootFrame * > GetAllLayouts()
const std::unique_ptr< ::sw::DocumentListsManager > m_pDocumentListsManager
static void lcl_FormatPostIt(IDocumentContentOperations *pIDCO, SwPaM &aPam, const SwPostItField *pField, bool bNewPage, bool bIsFirstPostIt, sal_uInt16 nPageNo, sal_uInt16 nLineNo)
virtual bool Undo()=0
Execute Undo.
void SetWrongDirty(WrongState eNew) const
const std::unique_ptr< ::sw::DocumentStateManager > m_pDocumentStateManager
static sal_Int32 lcl_GetPaperBin(const SwPageFrame *pStartFrame)
provide the paper tray to use according to the page style in use, but do that only if the respective ...
const SvxFormatKeepItem & GetKeep(bool=true) const
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
static SwTextField * GetTextFieldAtPos(const SwPosition &rPos)
Returns the field at a certain position.
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
static OUString GetPaMDescr(const SwPaM &rPaM)
Returns a textual description of a PaM.
const std::unique_ptr< ::sw::DocumentChartDataProviderManager > m_pDocumentChartDataProviderManager
PaM is Point and Mark: a selection of the document model.
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
std::unique_ptr< SwTextFormatColls > mpTextFormatCollTable
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 void AppendUndo(std::unique_ptr< SwUndo > pUndo)=0
Add new Undo action.
virtual void ClearRedo()=0
Delete all Redo actions.
::sw::UndoManager & GetUndoManager()
virtual SwUndoId StartUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Opens undo block.
bool ContainsHiddenChars() const
Checks if any of the text node contains hidden characters.
css::uno::Reference< css::script::vba::XVBAEventProcessor > const & GetVbaEventProcessor()
MissingDictionary meDictionaryMissing
void SetSmartTagDirty(bool bNew) const
const SwStartNode * StartOfSectionNode() const
void ForEach(FnForEach_SwNodes fnForEach, void *pArgs=nullptr)
const SwPosition * GetPoint() const
std::vector< SwTextFormatColl * >::size_type size_type
sal_Int32 release()
Releases a reference to an instance.
Document statistics information.
SwIndex & Assign(SwIndexReg *, sal_Int32)
std::vector< std::weak_ptr< SwUnoCursor > > mvUnoCursorTable
const SwFormatINetFormat * FindINetAttr(std::u16string_view rName) const
Document fields related interfaces.
bool hasValue(sal_Int32 nValue, const o3tl::sorted_vector< sal_Int32 > *i_pPossibleValues=nullptr) const
::sw::DocumentContentOperationsManager const & GetDocumentContentOperationsManager() const
void SetSplitVerticalByDefault(bool value)
const SwFrame * Lower() const
SwPageDesc * GetPageDesc()
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
void SetAutoCompleteWordDirty(bool bNew) const
SwGrammarMarkUp * GetGrammarCheck()
virtual SwFormatColl * ChgFormatColl(SwFormatColl *) override
void setRsidRoot(sal_uInt32 nVal)
o3tl::sorted_vector< sal_Int32 > & GetValidPagesSet()
IDocumentState const & getIDocumentState() const
sal_uInt16 GetRefMarks(std::vector< OUString > *=nullptr) const
Provides access to settings of a document.
bool IsPrintLeftPages() const
void SetMissingDictionaries(bool bIsMissing)
Use to notify if the dictionary can be found for a single content portion (has to be called for all p...
SwWrongList * GetSmartTags()
Marks a node in the document model.
const SwOutlineNodes & GetOutLineNds() const
Array of all OutlineNodes.
SwNodes & GetNodes()
Node is in which nodes-array/doc?
virtual const SwFieldTypes * GetFieldTypes() const =0
void SetLanguage(const LanguageType eLang, const sal_uInt16 nId)
bool GoInDoc(SwPaM &rPam, SwMoveFnCollection const &fnMove)
bool HasSwAttrSet() const
OUString SwResId(const char *pId)
Document links administration interface.
const OUString & GetPageRange() const
Text operation/manipulation interface.
const SwTextNode * GetpTextNode() const
int FieldCanHideParaWeight(SwFieldIds eFieldId) const
static void CalculatePagesForPrinting(const SwRootFrame &rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport, sal_Int32 nDocPageCount)
get the set of printable pages for the XRenderable API by evaluating the respective settings (see imp...
void ChangeTOX(SwTOXBase &rTOX, const SwTOXBase &rNew)
IDocumentChartDataProviderAccess const & getIDocumentChartDataProviderAccess() const
A page of the document layout.
void SetCondition(OUString const &rNew)
SwPostItMode
this must match the definitions in css::text::NotePrintMode
void SpellItAgainSam(bool bInvalid, bool bOnlyWrong, bool bSmartTags)
Re-trigger spelling in the idle handler.
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
const std::unique_ptr< ::sw::DocumentDrawModelManager > m_pDocumentDrawModelManager
static sal_Int32 EndOfInputFieldAtPos(const SwPosition &rPos)
const SwPosition * Start() const
Provides access to the lists of a document.
SwFieldType * GetTyp() const
void setRsid(sal_uInt32 nVal)
bool CalcHiddenFlag() const
OUString getStringValue(const OUString &i_rPropertyName) const
Provides access to the formatting devices of a document.
OUString getDate(const Date &rDate) const
const std::unique_ptr< ::sw::DocumentTimerManager > m_pDocumentTimerManager
SwFrameFormat & GetMaster()
sal_uLong EndOfSectionIndex() const
std::map< sal_Int32, sal_Int32 > & GetPrinterPaperTrays()
a map for printer paper tray numbers to use for each document page a value of -1 for the tray means t...
SwTextNode is a paragraph in the document model.
OUString ExpandField(bool bCached, SwRootFrame const *pLayout) const
expand the field.
const std::unique_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
bool HasPostItData() const
static bool lcl_SpellAndGrammarAgain(const SwNodePtr &rpNd, void *pArgs)
const std::unique_ptr< ::sw::DocumentStatisticsManager > m_pDocumentStatisticsManager
void UpdateSection(size_t const nSect, SwSectionData &, SfxItemSet const *const =nullptr, bool const bPreventLinkUpdate=false)
static void CalculateNonBlankPages(const SwRootFrame &rLayout, sal_uInt16 &nDocPageCount, sal_uInt16 &nActualPage)
const SwTextFormatColls * GetTextFormatColls() const
static bool getRangesFromString(const OUString &i_rPageRange, std::vector< sal_Int32 > &o_rPageVector, sal_Int32 i_nMinNumber, sal_Int32 i_nMaxNumber, sal_Int32 i_nLogicalOffset=-1, o3tl::sorted_vector< sal_Int32 > const *i_pPossibleValues=nullptr)
OUString ShortenString(const OUString &rStr, sal_Int32 nLength, const OUString &rFillStr)
Shortens a string to a maximum length.
Provides outline nodes of a document.
virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr, bool bExpandCharToPara=false, SwTextAttr **ppNewTextAttr=nullptr)=0
Insert an attribute.
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
IDocumentOutlineNodes const & getIDocumentOutlineNodes() const
virtual bool DelFullPara(SwPaM &)=0
Delete full paragraphs.
sal_Int32 GetIndex() const
IDocumentListItems const & getIDocumentListItems() const
void SetProgressState(tools::Long nPosition, SwDocShell const *pDocShell)
IDocumentSettingAccess const & getIDocumentSettingAccess() const
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
const SwPosition * End() const
const std::unique_ptr< ::sw::DocumentExternalDataManager > m_pDocumentExternalDataManager
::sw::DocumentSettingManager & GetDocumentSettingManager()
bool FieldHidesPara(const SwField &rField) const
::sw::MetaFieldManager & GetMetaFieldManager()
Get information about the current document state.
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(158)
::sw::DocumentDrawModelManager const & GetDocumentDrawModelManager() const
bool RemoveInvisibleContent()
Remove the invisible content from the document e.g. hidden areas, hidden paragraphs.
const std::unique_ptr< ::sw::DocumentFieldsManager > m_pDocumentFieldsManager
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
virtual void CallSwClientNotify(const SfxHint &rHint) const override
SwMoveFnCollection const & fnMoveBackward
SwTableNode * FindTableNode()
Search table node, in which it is.
const std::unique_ptr< ::sw::DocumentStylePoolManager > m_pDocumentStylePoolManager
static void DeleteHiddenRanges(SwTextNode &rNode)
Hidden text attribute handling.
virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart)=0
Split a node at rPos (implemented only for TextNode).
bool isAlienWordDoc(SfxObjectShell const &rDocShell)
::sw::DocumentLinksAdministrationManager const & GetDocumentLinksAdministrationManager() const
virtual OUString GetPar2() const override
Text.
Provides access to the layout of a document.
Access to the style pool.
const SwTextField * GetTextField() const
std::vector< sal_Int32 > & GetPagesToPrint()
used for 'normal' printing A page value of 0 as entry indicates that this page is not from the docume...
Reference< XModel > xModel
bool IsDocNodes() const
Is the NodesArray the regular one of Doc? (and not the UndoNds, ...) Implementation in doc...
bool IsPrintRightPages() const
::sw::DocumentStatisticsManager const & GetDocumentStatisticsManager() const
static bool lcl_CheckSmartTagsAgain(const SwNodePtr &rpNd, void *)
Give access to the data-provider for chart.
virtual SwFieldType * GetSysFieldType(const SwFieldIds eWhich) const =0
void Summary(SwDoc &rExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, bool bImpress)
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
css::uno::Reference< css::script::vba::XVBAEventProcessor > mxVbaEvents
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
const std::unique_ptr< ::sw::DocumentSettingManager > m_pDocumentSettingManager
virtual void UnlockExpFields()=0
std::pair< const_iterator, bool > insert(Value &&x)
virtual bool ResetAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0) override
std::vector< std::unique_ptr< SetGetExpField > >::size_type size_type
const std::unique_ptr< ::sw::DocumentLinksAdministrationManager > m_pDocumentLinksAdministrationManager
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
::sw::DocumentFieldsManager & GetDocumentFieldsManager()
SwSectionFormats & GetSections()
IDocumentListsAccess const & getIDocumentListsAccess() const
void Height(tools::Long nNew)
SwFrameFormat * GetFlyFormat() const
If node is in a fly return the respective format.
bool IsSplitVerticalByDefault() const
SwContentNode * GoNext(SwNodeIndex *) const
const sal_Int32 COMPLETE_STRING
void SetInvalid(sal_Int32 nBegin, sal_Int32 nEnd)
const int nUndoStringLength
sal_Int64 getIntValue(const OUString &i_rPropertyName, sal_Int64 i_nDefault) const
void InvalidateAutoCompleteFlag()
const SwAttrPool & GetAttrPool() const
bool IsPrintEmptyPages(bool bIsPDFExport) const
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
bool sw_GetPostIts(const IDocumentFieldsAccess &rIDFA, SetGetExpFields *pSrtLst)
IDocumentTimerAccess const & getIDocumentTimerAccess() const
void SetPoolDefaultItem(const SfxPoolItem &)
Base class of the Writer document model elements.
SwTextFormatColl * GetTextColl() const