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>
96#include <osl/diagnose.h>
97#include <osl/interlck.h>
211 static bool bHack = (getenv(
"LIBO_ONEWAY_STABLE_ODF_EXPORT") !=
nullptr);
213 sal_uInt32 nIncrease = 0;
221 mnRsid = nVal + nIncrease;
482 sal_uInt16& rVirtPgNo, sal_uInt16& rLineNo );
492sal_uInt16 PostItField_::GetPageNo(
495 sal_uInt16& rVirtPgNo, sal_uInt16& rLineNo )
504 for(
SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() )
507 &GetTextField()->GetTextNode(), GetContent());
508 if( pFrame->GetOffset() > nPos ||
509 (pFrame->HasFollow() && pFrame->GetFollow()->GetOffset() <= nPos) )
511 sal_uInt16 nPgNo = pFrame->GetPhyPageNum();
512 if( rRangeEnum.
hasValue( nPgNo, &rPossiblePages ))
514 rLineNo = o3tl::narrowing<sal_uInt16>(pFrame->GetLineCount( nPos ) +
515 pFrame->GetAllLines() - pFrame->GetThisLines());
516 rVirtPgNo = pFrame->GetVirtPageNum();
528 std::vector<SwFormatField*> vFields;
531 for(
auto pField: vFields)
533 auto pTextField = pField->GetTextField();
534 std::unique_ptr<PostItField_> pNew(
new PostItField_(pTextField->GetTextNode(), pTextField));
535 pSrtLst->
insert(std::move(pNew));
538 return vFields.size()>0;
545 bool bNewPage,
bool bIsFirstPostIt,
546 sal_uInt16 nPageNo, sal_uInt16 nLineNo )
548 static char const sTmp[] =
" : ";
557 else if (!bIsFirstPostIt)
566 OUString::number( nPageNo ) +
572 OUString::number( nLineNo ) +
602 if (eState > SfxItemState::DEFAULT && pPaperBinItem)
603 nRes = pPaperBinItem->GetValue();
613OUString UIPages2PhyPages(
const OUString& rUIPageRange,
const std::map< sal_Int32, sal_Int32 >& rUIPages2PhyPagesMap)
615 if (rUIPages2PhyPagesMap.empty())
617 auto iMin = rUIPages2PhyPagesMap.begin();
618 const sal_Int32 nUIPageMin = iMin->first, nPhyPageMin = iMin->second;
619 auto iMax = rUIPages2PhyPagesMap.rbegin();
620 const sal_Int32 nUIPageMax = iMax->first, nPhyPageMax = iMax->second;
621 OUStringBuffer aOut(rUIPageRange.getLength());
622 OUStringBuffer aNumber(16);
626 while (*pInput >=
'0' && *pInput <=
'9')
627 aNumber.append(*pInput++);
628 if (!aNumber.isEmpty())
631 aNumber.setLength(0);
632 if (nNumber < nUIPageMin)
633 nNumber = nPhyPageMin-1;
634 else if (nNumber > nUIPageMax)
635 nNumber = nPhyPageMax+1;
637 nNumber = rUIPages2PhyPagesMap.at(nNumber);
638 aOut.append(nNumber);
641 while (*pInput && (*pInput < '0' || *pInput >
'9'))
642 aOut.append(*pInput++);
645 return aOut.makeStringAndClear();
652 sal_uInt16& nDocPageCount,
653 sal_uInt16& nActualPage)
655 sal_uInt16 nDocPageCountWithBlank = nDocPageCount;
656 sal_uInt16 nActualPageWithBlank = nActualPage;
657 sal_uInt16 nPageNum = 1;
659 while (pStPage && nPageNum <= nDocPageCountWithBlank)
664 if (nPageNum <= nActualPageWithBlank)
677 sal_Int32 nDocPageCount )
679 const sal_Int64 nContent = rOptions.
getIntValue(
"PrintContent", 0 );
680 const bool bPrintSelection = nContent == 2;
687 bool bPrintEmptyPages = !bPrintSelection && rOptions.
IsPrintEmptyPages( bIsPDFExport );
692 std::map< sal_Int32, sal_Int32 > aUIPages2PhyPagesMap;
695 sal_Int32 nPageNum = 1, nUIPageNum = 1;
697 while (pStPage && nPageNum <= nDocPageCount)
700 const bool bPrintThisPage =
703 ( bPrintEmptyPages || bNonEmptyPage );
707 rValidPages.
insert( nPageNum );
711 if ( bPrintEmptyPages || bNonEmptyPage )
713 aUIPages2PhyPagesMap[nUIPageNum++] = nPageNum;
747 if (aPageRange.isEmpty())
750 aPageRange = OUString::number( 1 ) +
"-" + OUString::number( nDocPageCount );
755 aPageRange = UIPages2PhyPages(aPageRange, aUIPages2PhyPagesMap);
769 sal_Int32 nDocPageCount )
774 &&
"print post-its without post-it data?");
796 std::map< sal_Int32, sal_Int32 > aPostItLastStartPageNum;
802 sal_uInt16 nVirtPg = 0, nLineNo = 0, nLastPageNum = 0, nPhyPageNum = 0;
803 bool bIsFirstPostIt =
true;
806 PostItField_& rPostIt =
static_cast<PostItField_&
>(*(*rData.
m_pPostItFields)[
i ]);
807 nLastPageNum = nPhyPageNum;
808 nPhyPageNum = rPostIt.GetPageNo(
816 !bIsFirstPostIt && nPhyPageNum != nLastPageNum;
819 rPostIt.GetPostIt(), bNewPage, bIsFirstPostIt, nVirtPg, nLineNo );
820 bIsFirstPostIt =
false;
827 aPostItLastStartPageNum[ nPhyPageNum ] = nPages;
840 const sal_Int32 nPostItDocPageCount = rData.
m_pPostItShell->GetPageCount();
855 sal_Int32 nPageNum = 0;
857 while( pPageFrame && nPageNum < nPostItDocPageCount )
864 OSL_ENSURE( nPageNum == nPostItDocPageCount,
"unexpected number of pages" );
872 std::vector< sal_Int32 > aTmpPagesToPrint;
873 sal_Int32 nLastPostItPage(0);
875 for (
size_t i = 0 ;
i < nNum; ++
i)
879 aTmpPagesToPrint.push_back( nPhysPage );
883 std::map<sal_Int32, sal_Int32>::const_iterator
const iter(
884 aPostItLastStartPageNum.find(nPhysPage));
885 if (iter != aPostItLastStartPageNum.end())
887 for (sal_Int32 j = nLastPostItPage + 1;
888 j <= iter->second; ++j)
891 aTmpPagesToPrint.push_back(-j);
893 nLastPostItPage = iter->second;
909 sal_Int32 nDocPageCount )
914 std::map< sal_Int32, const SwPageFrame * > validStartFrames;
917 rValidPagesSet.
clear();
924 const sal_Int64 nContent = rOptions.
getIntValue(
"PrintContent", 0 );
927 if (aPageRange.isEmpty())
930 aPageRange = OUString::number( 1 ) +
"-" + OUString::number( nDocPageCount );
934 if ( aRange.
size() <= 0)
938 for ( sal_Int32
i = 1; pStPage &&
i < nDocPageCount; ++
i )
945 sal_Int32 nPageNum = 0;
947 while( pPageFrame && nPageNum < nDocPageCount )
950 rValidPagesSet.
insert( nPageNum );
951 validStartFrames[ nPageNum ] = pPageFrame;
956 OSL_ENSURE( nPageNum == nDocPageCount,
"unexpected number of pages" );
963 bool bPrintProspectRTL = rOptions.
getIntValue(
"PrintProspectRTL", 0 ) != 0;
967 std::vector< sal_Int32 > aPagesToPrint;
969 aPageRange, aPagesToPrint, 1, nDocPageCount, 0 );
971 if (aPagesToPrint.empty())
976 std::vector< const SwPageFrame * > aVec;
977 for (sal_Int32 nPage : aPagesToPrint)
979 const SwPageFrame *pFrame = validStartFrames[ nPage ];
980 aVec.push_back( pFrame );
984 if ( 1 == aVec.size() )
985 aVec.insert( aVec.begin() + 1,
nullptr );
991 while( aVec.size() & 3 )
992 aVec.push_back(
nullptr );
996 std::vector< const SwPageFrame * >::size_type nSPg = 0;
997 std::vector< const SwPageFrame * >::size_type nEPg = aVec.size();
999 if ( 0 == (nEPg & 1 ))
1002 if ( !bPrintLeftPages )
1004 else if ( !bPrintRightPages )
1012 sal_Int32 nCntPage = (( nEPg - nSPg ) / ( 2 * nStep )) + 1;
1014 for ( sal_Int32 nPrintCount = 0; nSPg < nEPg &&
1015 nPrintCount < nCntPage; ++nPrintCount )
1017 pStPage = aVec[ nSPg ];
1018 const SwPageFrame* pNxtPage = nEPg < aVec.size() ? aVec[ nEPg ] :
nullptr;
1020 short nRtlOfs = bPrintProspectRTL ? 1 : 0;
1021 if ( 0 == (( nSPg + nRtlOfs) & 1 ) )
1028 sal_Int32 nFirst = -1, nSecond = -1;
1029 for (
int nC = 0; nC < 2; ++nC )
1031 sal_Int32 nPage = -1;
1041 rPagePairs.emplace_back(nFirst, nSecond );
1043 nSPg = nSPg + nStep;
1044 nEPg = nEPg - nStep;
1046 OSL_ENSURE(
size_t(nCntPage) == rPagePairs.size(),
"size mismatch for number of page pairs" );
1061 const SwTextRefMark* pTextRef = pFormatRef->GetTextRefMark();
1063 rName == pFormatRef->GetRefName() )
1110 OUString aTmp(pRefMark->GetRefName());
1111 pNames->insert(pNames->begin() +
nCount, aTmp);
1124 std::unique_ptr<SwRegHistory> aRegHistory;
1145 bool bOnlyWrong = *
static_cast<sal_Bool*
>(pArgs);
1196 for (
auto aLayout : aAllLayouts )
1198 aLayout->AllInvalidateSmartTagsOrSpelling(bSmartTags);
1199 aLayout->SetNeedGrammarCheck(
true);
1206 for (
auto aLayout : aAllLayouts )
1207 aLayout->SetIdleFlags();
1217 for(
auto aLayout : aAllLayouts )
1218 aLayout->AllInvalidateAutoCompleteWords();
1225 for(
auto aLayout : aAllLayouts )
1226 aLayout->SetIdleFlags();
1234 if( !pFormatItem || pFormatItem->GetName() != rName )
1251 if (rOutNds.
empty())
1261 const int nLvl =
GetNodes()[
nIndex ]->GetTextNode()->GetAttrOutlineLevel()-1;
1269 while( ( nWish || bKeep ) &&
nIndex + nEndOfs < nNextOutNd &&
1273 if (pTextNode->
GetText().getLength() && nWish)
1287 while( aIndx < aEndOfDoc )
1289 bool bDelete =
false;
1300 const sal_uInt16 nHeadLine = o3tl::narrowing<sal_uInt16>(
1324 SwPaM aPam(*pTextNd, 0, *pTextNd, pTextNd->
GetText().getLength());
1352 && &pTextNd->
GetNodes() == &rNodes)
1354 RemoveOrDeleteContents(pTextNd, xOperations);
1400 class FieldTypeGuard :
public SwClient
1409 return static_cast<const SwFieldType*
>(GetRegisteredIn());
1415 std::vector<std::unique_ptr<FieldTypeGuard>> aHidingFieldTypes;
1419 aHidingFieldTypes.push_back(std::make_unique<FieldTypeGuard>(pType.get()));
1421 for (
const auto& pTypeGuard : aHidingFieldTypes)
1425 std::vector<SwFormatField*> vFields;
1427 for(
auto pFormatField: vFields)
1439 bool bRemoved =
false;
1448 if (
nullptr != pFormat)
1498 while(
nullptr != (pTmp = pParent->
GetParent() ))
1500 if( pTmp->IsHiddenFlag() )
1516 auto n = aSectFormats.
size();
1527 SwPaM aPam( *pSectNd );
1565 std::vector<SwFormatField*> vFields;
1582 if( !pSectFormat->IsInNodesArr())
1584 SwSection* pSect = pSectFormat->GetSection();
1611 const SwFieldTypes::size_type
nCount = pMyFieldTypes->size();
1620 std::vector<SwFormatField*> vFieldFormats;
1622 for(
const auto& rpFieldFormat : vFieldFormats)
1624 const SwTextField *pTextField = rpFieldFormat->GetTextField();
1628 bool bSkip = !pTextField ||
1639 if(!bInHeaderFooter ||
1648 OUString sText = pField->
ExpandField(
true, &rLayout);
1671 if (!sText.isEmpty())
1736 std::unique_ptr<SwUndoCpyTable> pUndo(
new SwUndoCpyTable(*
this));
1737 pUndo->SetTableSttIdx( pTableNd->
GetIndex() );
1743 std::unique_ptr<SwUndoCpyDoc> pUndo(
new SwUndoCpyDoc( rPam ));
1744 pUndo->SetInsertRange( rPam,
false );
1757 std::make_unique<SwUndoTOXChange>(*
this, rTOXSect, rNew));
1771 if (
nullptr != pTextNode)
1776 return SwResId(STR_START_QUOTE)
1785 return SwResId(STR_PARAGRAPHS);
1805 std::shared_ptr<SwUnoCursor> pNew;
1807 pNew = std::make_shared<SwUnoTableCursor>(rPos);
1809 pNew = std::make_shared<SwUnoCursor>(rPos);
1825uno::Reference< script::vba::XVBAEventProcessor >
const &
1833#if HAVE_FEATURE_SCRIPTING
1842 catch( uno::Exception& )
@ EMPTY_DB_FIELD_HIDES_PARA
OUString ShortenString(const OUString &rStr, sal_Int32 nLength, std::u16string_view aFillStr)
Shortens a string to a maximum length.
const int nUndoStringLength
Give access to the data-provider for chart.
Text operation/manipulation interface.
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 void DeleteRange(SwPaM &)=0
Delete a range SwFlyFrameFormat.
virtual bool DelFullPara(SwPaM &)=0
Delete full paragraphs.
virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem &, const SetAttrMode nFlags=SetAttrMode::DEFAULT, SwRootFrame const *pLayout=nullptr, SwTextAttr **ppNewTextAttr=nullptr)=0
Insert an attribute.
virtual bool InsertString(const SwPaM &rRg, const OUString &, const SwInsertFlags nInsertMode=SwInsertFlags::EMPTYEXPAND)=0
Insert string into existing text node at position rRg.Point().
Provides access to the formatting devices of a document.
Document fields related interfaces.
virtual SwFieldType * GetSysFieldType(const SwFieldIds eWhich) const =0
virtual const SwFieldTypes * GetFieldTypes() const =0
virtual void LockExpFields()=0
virtual void UnlockExpFields()=0
Provides access to the layout of a document.
virtual const SwRootFrame * GetCurrentLayout() const =0
virtual void DelLayoutFormat(SwFrameFormat *pFormat)=0
Document links administration interface.
Provides numbered items of a document.
Provides access to the lists of a document.
Provides outline nodes of a document.
Provides access to settings of a document.
Get information about the current document state.
virtual void SetModified()=0
Must be called manually at changes of format.
Document statistics information.
Access to the style pool.
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
Handle the background jobs of a Writer document.
OUString getDate(const Date &rDate) const
const SwTextField * GetTextField() const
css::uno::Reference< css::frame::XModel3 > GetModel() const
bool hasValue(sal_Int32 nValue, const o3tl::sorted_vector< sal_Int32 > *i_pPossibleValues=nullptr) const
static bool getRangesFromString(std::u16string_view 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)
const LocaleDataWrapper & GetLocaleData() const
const SvxFormatKeepItem & GetKeep(bool=true) const
Knows all the text content controls in the document.
bool HasSwAttrSet() const
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
virtual sal_Int32 Len() const
static sal_Int32 EndOfInputFieldAtPos(const SwPosition &rPos)
bool IsInitialized() const
void CommitLastRegistrations()
Accept not committed registrations.
const std::unique_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager
oslInterlockedCount mReferenceCount
::sw::DocumentLinksAdministrationManager const & GetDocumentLinksAdministrationManager() const
SwSectionFormats & GetSections()
const std::unique_ptr< ::sw::DocumentFieldsManager > m_pDocumentFieldsManager
const std::unique_ptr< ::sw::DocumentStateManager > m_pDocumentStateManager
const std::unique_ptr< ::SwContentControlManager > m_pContentControlManager
MissingDictionary meDictionaryMissing
::sw::DocumentDrawModelManager const & GetDocumentDrawModelManager() const
const SwFormatINetFormat * FindINetAttr(std::u16string_view rName) const
bool FieldHidesPara(const SwField &rField) const
std::vector< std::weak_ptr< SwUnoCursor > > mvUnoCursorTable
IDocumentState const & getIDocumentState() const
IDocumentChartDataProviderAccess const & getIDocumentChartDataProviderAccess() 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...
void SetSplitVerticalByDefault(bool value)
std::unique_ptr< SwTextFormatColls > mpTextFormatCollTable
const std::unique_ptr< ::sw::UndoManager > m_pUndoManager
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
void SetLanguage(const LanguageType eLang, const sal_uInt16 nId)
o3tl::sorted_vector< SwRootFrame * > GetAllLayouts()
void DeleteFormatRefMark(const SwFormatRefMark *pFormatRefMark)
const std::unique_ptr< ::sw::DocumentListItemsManager > m_pDocumentListItemsManager
IDocumentExternalData const & getIDocumentExternalData() const
const std::unique_ptr< ::sw::DocumentLayoutManager > m_pDocumentLayoutManager
rtl::Reference< SwAttrPool > mpAttrPool
bool ContainsHiddenChars() const
Checks if any of the text node contains hidden characters.
void AppendUndoForInsertFromDB(const SwPaM &rPam, bool bIsTable)
Set up the InsertDB as Undo table.
sal_Int32 getReferenceCount() const
Returns the current reference count.
::sw::DocumentFieldsManager & GetDocumentFieldsManager()
std::unique_ptr< ::sw::DocumentDeviceManager > m_pDeviceAccess
void SpellItAgainSam(bool bInvalid, bool bOnlyWrong, bool bSmartTags)
Re-trigger spelling in the idle handler.
sal_uInt32 getRsid() const
sal_uInt16 GetRefMarks(std::vector< OUString > *=nullptr) const
sal_uInt32 getRsidRoot() const
IDocumentLinksAdministration const & getIDocumentLinksAdministration() const
IDocumentListItems const & getIDocumentListItems() const
IDocumentContentOperations const & getIDocumentContentOperations() const
static OUString GetPaMDescr(const SwPaM &rPaM)
Returns a textual description of a PaM.
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
css::uno::Reference< css::script::vba::XVBAEventProcessor > const & GetVbaEventProcessor()
const std::unique_ptr< ::sw::DocumentDrawModelManager > m_pDocumentDrawModelManager
IDocumentOutlineNodes const & getIDocumentOutlineNodes() const
const std::unique_ptr< ::sw::DocumentListsManager > m_pDocumentListsManager
void setRsidRoot(sal_uInt32 nVal)
void InvalidateAutoCompleteFlag()
static void UpdatePagesForPrintingWithPostItData(SwRenderData &rData, const SwPrintUIOptions &rOptions, sal_Int32 nDocPageCount)
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
bool RestoreInvisibleContent()
void ChangeTOX(SwTOXBase &rTOX, const SwTOXBase &rNew)
static void CalculateNonBlankPages(const SwRootFrame &rLayout, sal_uInt16 &nDocPageCount, sal_uInt16 &nActualPage)
::sw::DocumentRedlineManager const & GetDocumentRedlineManager() const
IDocumentSettingAccess const & getIDocumentSettingAccess() const
const std::unique_ptr< ::sw::DocumentLinksAdministrationManager > m_pDocumentLinksAdministrationManager
const std::unique_ptr< ::sw::DocumentStatisticsManager > m_pDocumentStatisticsManager
const SwTextFormatColls * GetTextFormatColls() const
void SetVbaEventProcessor()
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
::sw::DocumentContentOperationsManager const & GetDocumentContentOperationsManager() const
void UpdateSection(size_t const nSect, SwSectionData &, SfxItemSet const *const =nullptr, bool const bPreventLinkUpdate=false)
css::uno::Reference< css::script::vba::XVBAEventProcessor > mxVbaEvents
bool IsSplitVerticalByDefault() const
int FieldCanHideParaWeight(SwFieldIds eFieldId) const
bool ConvertFieldsToText(SwRootFrame const &rLayout)
const SwFormatRefMark * GetRefMark(std::u16string_view rName) const
std::shared_ptr< SwUnoCursor > CreateUnoCursor(const SwPosition &rPos, bool bTableCursor=false)
bool RemoveInvisibleContent()
Remove the invisible content from the document e.g. hidden areas, hidden paragraphs.
const std::unique_ptr< ::sw::DocumentChartDataProviderManager > m_pDocumentChartDataProviderManager
bool IsInsTableFormatNum() const
const std::unique_ptr< ::sw::DocumentExternalDataManager > m_pDocumentExternalDataManager
sal_Int32 acquire()
Acquire a reference to an instance.
void setRsid(sal_uInt32 nVal)
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...
const SwAttrPool & GetAttrPool() const
const std::unique_ptr< ::sw::DocumentRedlineManager > m_pDocumentRedlineManager
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
sal_Int32 release()
Releases a reference to an instance.
void ChgDBData(const SwDBData &rNewData)
::sw::DocumentLayoutManager const & GetDocumentLayoutManager() const
void Summary(SwDoc &rExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, bool bImpress)
const std::unique_ptr< ::sw::DocumentStylePoolManager > m_pDocumentStylePoolManager
const std::unique_ptr< ::sw::DocumentSettingManager > m_pDocumentSettingManager
::sw::DocumentStatisticsManager const & GetDocumentStatisticsManager() const
::sw::DocumentSettingManager & GetDocumentSettingManager()
::sw::MetaFieldManager & GetMetaFieldManager()
IDocumentTimerAccess const & getIDocumentTimerAccess() const
SwDocShell * GetDocShell()
const std::unique_ptr< ::sw::DocumentOutlineNodesManager > m_pDocumentOutlineNodesManager
::sw::UndoManager & GetUndoManager()
const std::unique_ptr< ::sw::DocumentContentOperationsManager > m_pDocumentContentOperationsManager
bool IsInsTableAlignNum() const
const std::unique_ptr< ::sw::DocumentTimerManager > m_pDocumentTimerManager
SwDBManager * m_pDBManager
IDocumentStatistics const & getIDocumentStatistics() const
::SwContentControlManager & GetContentControlManager()
static void CalculatePagePairsForProspectPrinting(const SwRootFrame &rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, sal_Int32 nDocPageCount)
bool IsInsTableChangeNumFormat() const
IDocumentListsAccess const & getIDocumentListsAccess() const
bool IsInHeaderFooter(const SwNode &) const
bool HasInvisibleContent() const
Instances of SwFields and those derived from it occur 0 to n times.
virtual void UpdateFields()
void GatherFields(std::vector< SwFormatField * > &rvFormatFields, bool bCollectOnlyInDocNodes=true) const
Base class of all fields.
OUString ExpandField(bool bCached, SwRootFrame const *pLayout) const
expand the field.
SwFieldType * GetTyp() const
const SwRect & getFrameArea() const
const SwFrame * Lower() const
Marks a node in the document model.
Base class of the Writer document model elements.
SwFrameFormat * GetFlyFormat() const
If node is in a fly return the respective format.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
SwNodes & GetNodes()
Node is in which nodes-array/doc?
SwNodeOffset StartOfSectionIndex() const
SwTableNode * FindTableNode()
Search table node, in which it is.
const SwStartNode * StartOfSectionNode() const
SwNodeOffset EndOfSectionIndex() const
const SwEndNode * EndOfSectionNode() const
void ForEach(FnForEach_SwNodes fnForEach, void *pArgs=nullptr)
const SwOutlineNodes & GetOutLineNds() const
Array of all OutlineNodes.
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
bool IsDocNodes() const
Is the NodesArray the regular one of Doc? (and not the UndoNds, ...) Implementation in doc....
void Delete(const SwNodeIndex &rPos, SwNodeOffset nNodes=SwNodeOffset(1))
static SwContentNode * GoPrevious(SwNodeIndex *)
SwContentNode * GoNext(SwNodeIndex *) const
void Copy_(const SwNodeRange &rRg, SwNode &rInsPos, bool bNewFrames=true) const
SwNodeOffset Count() 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.
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.
SwFrameFormat & GetMaster()
A page of the document layout.
sal_uInt16 GetPhyPageNum() const
SwPageDesc * GetPageDesc()
virtual OUString GetPar1() const override
Author.
virtual OUString GetPar2() const override
Text.
bool IsPrintLeftPages() const
bool IsPrintRightPages() const
bool IsPrintEmptyPages(bool bIsPDFExport) const
void Height(tools::Long nNew)
A class that stores temporary data that is needed for rendering the document.
PagePairsVec_t & GetPagePairsForProspectPrinting()
used for prospect printing only
bool HasPostItData() const
std::unique_ptr< SetGetExpFields > m_pPostItFields
an array of "SetGetExpField *" sorted by page and line numbers
void SetPageRange(const OUString &rRange)
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...
std::unique_ptr< SwViewShell > m_pPostItShell
this contains a SwDoc with the post-it content
o3tl::sorted_vector< sal_Int32 > & GetValidPagesSet()
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...
const OUString & GetPageRange() const
The root element of a Writer document layout.
static void DeleteHiddenRanges(SwTextNode &rNode)
Hidden text attribute handling.
void SetHidden(bool const bFlag)
void SetCondition(OUString const &rNew)
A section node represents the start of a section on the UI, i.e.
OUString const & GetCondition() const
SwSection * GetParent() const
SwSectionFormat * GetFormat()
bool CalcHiddenFlag() const
sal_Int32 GetStart() const
const SwFormatField & GetFormatField() const
SwTextNode * GetpTextNode() const
Represents the style of a paragraph.
bool IsAssignedToListLevelOfOutlineStyle() const
Represents the visualization of a paragraph.
const SwTextNode * GetpTextNode() const
SwTextNode is a paragraph in the document model.
void SetWrongDirty(sw::WrongState eNew) const
virtual sal_Int32 Len() const override
void DeleteAttribute(SwTextAttr *const pTextAttr)
delete the attribute pTextAttr
bool IsHiddenByParaField() const
is the paragraph visible?
void SetGrammarCheckDirty(bool bNew) const
void SetSmartTagDirty(bool bNew) const
virtual SwFormatColl * ChgFormatColl(SwFormatColl *) override
void SetAutoCompleteWordDirty(bool bNew) const
SwGrammarMarkUp * GetGrammarCheck()
SwpHints * GetpSwpHints()
const OUString & GetText() const
bool HasHiddenCharAttribute(bool bWholePara) const
Hidden Paragraph Field:
SwTextFormatColl * GetTextColl() const
virtual bool ResetAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0) override
const SwTextNode & GetTextNode() const
std::vector< SwTextFormatColl * >::size_type size_type
static ShellResource * GetShellRes()
void SetInvalid(sal_Int32 nBegin, sal_Int32 nEnd)
void DeRegister()
deregister the currently registered History
void Register(SwRegHistory *pHist)
register a History, which receives all attribute changes (for Undo)
std::vector< Value >::size_type size_type
std::pair< const_iterator, bool > insert(Value &&x)
static SwTextField * GetTextFieldAtPos(const SwPosition &rPos)
Returns the field at a certain position.
virtual bool get(DocumentSettingId id) const override
Return the specified document setting.
Stores the undo/redo information, implementing the IDocumentUndoRedo interface.
OUString getStringValue(const OUString &i_rPropertyName) const
sal_Int64 getIntValue(const OUString &i_rPropertyName, sal_Int64 i_nDefault) const
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 ...
bool sw_GetPostIts(const IDocumentFieldsAccess &rIDFA, SetGetExpFields *pSrtLst)
static bool lcl_CheckSmartTagsAgain(SwNode *pNd, void *)
static void lcl_FormatPostIt(IDocumentContentOperations *pIDCO, SwPaM &aPam, const SwPostItField *pField, bool bNewPage, bool bIsFirstPostIt, sal_uInt16 nPageNo, sal_uInt16 nLineNo)
static bool lcl_SpellAndGrammarAgain(SwNode *pNd, void *pArgs)
constexpr OUStringLiteral IsHidden(u"IsHidden")
@ Database
For old documents the Field-Which IDs must be preserved !!!
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(160)
constexpr TypedWhichId< SvxPaperBinItem > RES_PAPER_BIN(90)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
void StartProgress(TranslateId pMessResId, tools::Long nStartValue, tools::Long nEndValue, SwDocShell *pDocShell)
void EndProgress(SwDocShell const *pDocShell)
void SetProgressState(tools::Long nPosition, SwDocShell const *pDocShell)
unsigned int uniform_uint_distribution(unsigned int a, unsigned int b)
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
bool isAlienWordDoc(SfxObjectShell const &rDocShell)
css::uno::Reference< css::uno::XInterface > createVBAUnoAPIServiceWithArgs(SfxObjectShell const *pShell, const char *_pAsciiName, const css::uno::Sequence< css::uno::Any > &aArgs)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
bool GoInDoc(SwPaM &rPam, SwMoveFnCollection const &fnMove)
SwMoveFnCollection const & fnMoveBackward
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
@ RES_POOLCOLL_HEADLINE2
Heading 2.
@ RES_POOLCOLL_HEADLINE1
Heading 1.
SwPostItMode
this must match the definitions in css::text::NotePrintMode
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.
sal_Int32 GetContentIndex() const
Reference< XModel > xModel
OUString SwResId(TranslateId aId)
constexpr sal_Int32 COMPLETE_STRING
@ UI_DELETE_INVISIBLECNTNT