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>
108#include <com/sun/star/text/XTextRange.hpp>
217 static bool bHack = (getenv(
"LIBO_ONEWAY_STABLE_ODF_EXPORT") !=
nullptr);
219 sal_uInt32 nIncrease = 0;
227 mnRsid = nVal + nIncrease;
488 sal_uInt16& rVirtPgNo, sal_Int32& rLineNo );
498sal_uInt16 PostItField_::GetPageNo(
501 sal_uInt16& rVirtPgNo, sal_Int32& rLineNo )
510 for(
SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() )
513 &GetTextField()->GetTextNode(), GetContent());
514 if( pFrame->GetOffset() > nPos ||
515 (pFrame->HasFollow() && pFrame->GetFollow()->GetOffset() <= nPos) )
517 sal_uInt16 nPgNo = pFrame->GetPhyPageNum();
518 if( rRangeEnum.
hasValue( nPgNo, &rPossiblePages ))
520 rLineNo = o3tl::narrowing<sal_Int32>(pFrame->GetLineCount( nPos ) +
521 pFrame->GetAllLines() - pFrame->GetThisLines());
522 rVirtPgNo = pFrame->GetVirtPageNum();
534 std::vector<SwFormatField*> vFields;
537 for(
auto pField: vFields)
539 auto pTextField = pField->GetTextField();
540 std::unique_ptr<PostItField_> pNew(
new PostItField_(pTextField->GetTextNode(), pTextField));
541 pSrtLst->
insert(std::move(pNew));
544 return vFields.size()>0;
551 bool bNewPage,
bool bIsFirstPostIt,
552 sal_uInt16 nPageNo, sal_Int32 nLineNo )
554 static char const sTmp[] =
" : ";
563 else if (!bIsFirstPostIt)
572 OUString::number( nPageNo ) +
578 OUString::number( nLineNo ) +
583 sTmp + pField->
GetPar1() +
" " +
608 if (eState > SfxItemState::DEFAULT && pPaperBinItem)
609 nRes = pPaperBinItem->GetValue();
619OUString UIPages2PhyPages(
const OUString& rUIPageRange,
const std::map< sal_Int32, sal_Int32 >& rUIPages2PhyPagesMap)
621 if (rUIPages2PhyPagesMap.empty())
623 auto iMin = rUIPages2PhyPagesMap.begin();
624 const sal_Int32 nUIPageMin = iMin->first, nPhyPageMin = iMin->second;
625 auto iMax = rUIPages2PhyPagesMap.rbegin();
626 const sal_Int32 nUIPageMax = iMax->first, nPhyPageMax = iMax->second;
627 OUStringBuffer aOut(rUIPageRange.getLength());
628 OUStringBuffer aNumber(16);
632 while (*pInput >=
'0' && *pInput <=
'9')
633 aNumber.append(*pInput++);
634 if (!aNumber.isEmpty())
637 aNumber.setLength(0);
638 if (nNumber < nUIPageMin)
639 nNumber = nPhyPageMin-1;
640 else if (nNumber > nUIPageMax)
641 nNumber = nPhyPageMax+1;
643 nNumber = rUIPages2PhyPagesMap.at(nNumber);
644 aOut.append(nNumber);
647 while (*pInput && (*pInput < '0' || *pInput >
'9'))
648 aOut.append(*pInput++);
651 return aOut.makeStringAndClear();
658 sal_uInt16& nDocPageCount,
659 sal_uInt16& nActualPage)
661 sal_uInt16 nDocPageCountWithBlank = nDocPageCount;
662 sal_uInt16 nActualPageWithBlank = nActualPage;
663 sal_uInt16 nPageNum = 1;
665 while (pStPage && nPageNum <= nDocPageCountWithBlank)
670 if (nPageNum <= nActualPageWithBlank)
683 sal_Int32 nDocPageCount )
685 const sal_Int64 nContent = rOptions.
getIntValue(
"PrintContent", 0 );
686 const bool bPrintSelection = nContent == 2;
693 bool bPrintEmptyPages = !bPrintSelection && rOptions.
IsPrintEmptyPages( bIsPDFExport );
698 std::map< sal_Int32, sal_Int32 > aUIPages2PhyPagesMap;
701 sal_Int32 nPageNum = 1, nUIPageNum = 1;
703 while (pStPage && nPageNum <= nDocPageCount)
706 const bool bPrintThisPage =
709 ( bPrintEmptyPages || bNonEmptyPage );
713 rValidPages.
insert( nPageNum );
717 if ( bPrintEmptyPages || bNonEmptyPage )
719 aUIPages2PhyPagesMap[nUIPageNum++] = nPageNum;
753 if (aPageRange.isEmpty())
756 aPageRange = OUString::number( 1 ) +
"-" + OUString::number( nDocPageCount );
761 aPageRange = UIPages2PhyPages(aPageRange, aUIPages2PhyPagesMap);
775 sal_Int32 nDocPageCount )
780 &&
"print post-its without post-it data?");
802 std::map< sal_Int32, sal_Int32 > aPostItLastStartPageNum;
808 sal_uInt16 nVirtPg = 0, nLastPageNum = 0, nPhyPageNum = 0;
809 sal_Int32 nLineNo = 0;
810 bool bIsFirstPostIt =
true;
813 PostItField_& rPostIt =
static_cast<PostItField_&
>(*(*rData.
m_pPostItFields)[
i ]);
814 nLastPageNum = nPhyPageNum;
815 nPhyPageNum = rPostIt.GetPageNo(
823 !bIsFirstPostIt && nPhyPageNum != nLastPageNum;
826 rPostIt.GetPostIt(), bNewPage, bIsFirstPostIt, nVirtPg, nLineNo );
827 bIsFirstPostIt =
false;
834 aPostItLastStartPageNum[ nPhyPageNum ] = nPages;
847 const sal_Int32 nPostItDocPageCount = rData.
m_pPostItShell->GetPageCount();
862 sal_Int32 nPageNum = 0;
864 while( pPageFrame && nPageNum < nPostItDocPageCount )
871 OSL_ENSURE( nPageNum == nPostItDocPageCount,
"unexpected number of pages" );
879 std::vector< sal_Int32 > aTmpPagesToPrint;
880 sal_Int32 nLastPostItPage(0);
882 for (
size_t i = 0 ;
i < nNum; ++
i)
886 aTmpPagesToPrint.push_back( nPhysPage );
890 std::map<sal_Int32, sal_Int32>::const_iterator
const iter(
891 aPostItLastStartPageNum.find(nPhysPage));
892 if (iter != aPostItLastStartPageNum.end())
894 for (sal_Int32 j = nLastPostItPage + 1;
895 j <= iter->second; ++j)
898 aTmpPagesToPrint.push_back(-j);
900 nLastPostItPage = iter->second;
916 sal_Int32 nDocPageCount )
921 std::map< sal_Int32, const SwPageFrame * > validStartFrames;
924 rValidPagesSet.
clear();
931 const sal_Int64 nContent = rOptions.
getIntValue(
"PrintContent", 0 );
934 if (aPageRange.isEmpty())
937 aPageRange = OUString::number( 1 ) +
"-" + OUString::number( nDocPageCount );
941 if ( aRange.
size() <= 0)
945 for ( sal_Int32
i = 1; pStPage &&
i < nDocPageCount; ++
i )
952 sal_Int32 nPageNum = 0;
954 while( pPageFrame && nPageNum < nDocPageCount )
957 rValidPagesSet.
insert( nPageNum );
958 validStartFrames[ nPageNum ] = pPageFrame;
963 OSL_ENSURE( nPageNum == nDocPageCount,
"unexpected number of pages" );
970 bool bPrintProspectRTL = rOptions.
getIntValue(
"PrintProspectRTL", 0 ) != 0;
974 std::vector< sal_Int32 > aPagesToPrint;
976 aPageRange, aPagesToPrint, 1, nDocPageCount, 0 );
978 if (aPagesToPrint.empty())
983 std::vector< const SwPageFrame * > aVec;
984 for (sal_Int32 nPage : aPagesToPrint)
986 const SwPageFrame *pFrame = validStartFrames[ nPage ];
987 aVec.push_back( pFrame );
991 if ( 1 == aVec.size() )
992 aVec.insert( aVec.begin() + 1,
nullptr );
998 while( aVec.size() & 3 )
999 aVec.push_back(
nullptr );
1003 std::vector< const SwPageFrame * >::size_type nSPg = 0;
1004 std::vector< const SwPageFrame * >::size_type nEPg = aVec.size();
1005 sal_Int32 nStep = 1;
1006 if ( 0 == (nEPg & 1 ))
1009 if ( !bPrintLeftPages )
1011 else if ( !bPrintRightPages )
1019 sal_Int32 nCntPage = (( nEPg - nSPg ) / ( 2 * nStep )) + 1;
1021 for ( sal_Int32 nPrintCount = 0; nSPg < nEPg &&
1022 nPrintCount < nCntPage; ++nPrintCount )
1024 pStPage = aVec[ nSPg ];
1025 const SwPageFrame* pNxtPage = nEPg < aVec.size() ? aVec[ nEPg ] :
nullptr;
1027 short nRtlOfs = bPrintProspectRTL ? 1 : 0;
1028 if ( 0 == (( nSPg + nRtlOfs) & 1 ) )
1035 sal_Int32 nFirst = -1, nSecond = -1;
1036 for (
int nC = 0; nC < 2; ++nC )
1038 sal_Int32 nPage = -1;
1048 rPagePairs.emplace_back(nFirst, nSecond );
1050 nSPg = nSPg + nStep;
1051 nEPg = nEPg - nStep;
1053 OSL_ENSURE(
size_t(nCntPage) == rPagePairs.size(),
"size mismatch for number of page pairs" );
1068 const SwTextRefMark* pTextRef = pFormatRef->GetTextRefMark();
1070 rName == pFormatRef->GetRefName() )
1117 OUString aTmp(pRefMark->GetRefName());
1118 pNames->insert(pNames->begin() +
nCount, aTmp);
1131 std::unique_ptr<SwRegHistory> aRegHistory;
1152 bool bOnlyWrong = *
static_cast<sal_Bool*
>(pArgs);
1203 for (
auto aLayout : aAllLayouts )
1205 aLayout->AllInvalidateSmartTagsOrSpelling(bSmartTags);
1206 aLayout->SetNeedGrammarCheck(
true);
1213 for (
auto aLayout : aAllLayouts )
1214 aLayout->SetIdleFlags();
1224 for(
auto aLayout : aAllLayouts )
1225 aLayout->AllInvalidateAutoCompleteWords();
1232 for(
auto aLayout : aAllLayouts )
1233 aLayout->SetIdleFlags();
1241 if( !pFormatItem || pFormatItem->GetName() != rName )
1258 if (rOutNds.
empty())
1268 const int nLvl =
GetNodes()[
nIndex ]->GetTextNode()->GetAttrOutlineLevel()-1;
1276 while( ( nWish || bKeep ) &&
nIndex + nEndOfs < nNextOutNd &&
1280 if (pTextNode->
GetText().getLength() && nWish)
1294 while( aIndx < aEndOfDoc )
1296 bool bDelete =
false;
1307 const sal_uInt16 nHeadLine = o3tl::narrowing<sal_uInt16>(
1331 SwPaM aPam(*pTextNd, 0, *pTextNd, pTextNd->
GetText().getLength());
1359 && &pTextNd->
GetNodes() == &rNodes)
1361 RemoveOrDeleteContents(pTextNd, xOperations);
1407 class FieldTypeGuard :
public SwClient
1416 return static_cast<const SwFieldType*
>(GetRegisteredIn());
1422 std::vector<std::unique_ptr<FieldTypeGuard>> aHidingFieldTypes;
1426 aHidingFieldTypes.push_back(std::make_unique<FieldTypeGuard>(pType.get()));
1428 for (
const auto& pTypeGuard : aHidingFieldTypes)
1432 std::vector<SwFormatField*> vFields;
1434 for(
auto pFormatField: vFields)
1446 bool bRemoved =
false;
1455 if (
nullptr != pFormat)
1505 while(
nullptr != (pTmp = pParent->
GetParent() ))
1507 if( pTmp->IsHiddenFlag() )
1523 auto n = aSectFormats.
size();
1534 SwPaM aPam( *pSectNd );
1572 std::vector<SwFormatField*> vFields;
1589 if( !pSectFormat->IsInNodesArr())
1591 SwSection* pSect = pSectFormat->GetSection();
1618 const SwFieldTypes::size_type
nCount = pMyFieldTypes->size();
1627 std::vector<SwFormatField*> vFieldFormats;
1629 for(
const auto& rpFieldFormat : vFieldFormats)
1631 const SwTextField *pTextField = rpFieldFormat->GetTextField();
1635 bool bSkip = !pTextField ||
1646 if(!bInHeaderFooter ||
1655 OUString sText = pField->
ExpandField(
true, &rLayout);
1678 if (!sText.isEmpty())
1743 std::unique_ptr<SwUndoCpyTable> pUndo(
new SwUndoCpyTable(*
this));
1744 pUndo->SetTableSttIdx( pTableNd->
GetIndex() );
1750 std::unique_ptr<SwUndoCpyDoc> pUndo(
new SwUndoCpyDoc( rPam ));
1751 pUndo->SetInsertRange( rPam,
false );
1764 std::make_unique<SwUndoTOXChange>(*
this, rTOXSect, rNew));
1778 if (
nullptr != pTextNode)
1783 return SwResId(STR_START_QUOTE)
1792 return SwResId(STR_PARAGRAPHS);
1812 std::shared_ptr<SwUnoCursor> pNew;
1814 pNew = std::make_shared<SwUnoTableCursor>(rPos);
1816 pNew = std::make_shared<SwUnoCursor>(rPos);
1832uno::Reference< script::vba::XVBAEventProcessor >
const &
1840#if HAVE_FEATURE_SCRIPTING
1849 catch( uno::Exception& )
1873 uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xRange, uno::UNO_QUERY_THROW);
1874 uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
1875 uno::Reference<text::XTextRange> xThisParagraphRange(xParaEnum->nextElement(), uno::UNO_QUERY);
1876 if (xThisParagraphRange.is())
1878 const std::vector<OUString> aHiddenProperties{
UNO_NAME_RSID,
1897 uno::Reference<beans::XPropertySet> xPropertySet(xThisParagraphRange,
1898 uno::UNO_QUERY_THROW);
1899 uno::Reference<beans::XPropertyState> xPropertyState(xThisParagraphRange,
1900 uno::UNO_QUERY_THROW);
1902 = xPropertySet->getPropertySetInfo()->getProperties();
1903 for (
const beans::Property& rProperty :
aProperties)
1905 const OUString& rPropName = rProperty.Name;
1908 if (std::find(aHiddenProperties.begin(), aHiddenProperties.end(), rPropName)
1909 != aHiddenProperties.end())
1911 if (xPropertyState->getPropertyState(rPropName) == beans::PropertyState_DIRECT_VALUE)
@ 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
PropertiesInfo aProperties
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
bool hasPropertyByName(std::u16string_view rName) const
const SfxItemPropertyMap & getPropertyMap() 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()
static bool HasParagraphDirectFormatting(const SwPosition &rPos)
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.
SwTextAttr subclass that tracks the location of the wrapped SwFormatURL.
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
const SfxItemPropertySet * GetPropertySet(sal_uInt16 PropertyId)
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 void lcl_FormatPostIt(IDocumentContentOperations *pIDCO, SwPaM &aPam, const SwPostItField *pField, bool bNewPage, bool bIsFirstPostIt, sal_uInt16 nPageNo, sal_Int32 nLineNo)
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 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< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(166)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(100)
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
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
SwDoc & GetDoc() const
Returns the document this position is in.
Reference< XModel > xModel
OUString SwResId(TranslateId aId)
constexpr sal_Int32 COMPLETE_STRING
@ UI_DELETE_INVISIBLECNTNT
SwUnoPropertyMapProvider aSwMapProvider
#define PROPERTY_MAP_PARA_AUTO_STYLE
constexpr OUStringLiteral UNO_NAME_SORTED_TEXT_ID
constexpr OUStringLiteral UNO_NAME_PARA_IS_NUMBERING_RESTART
constexpr OUStringLiteral UNO_NAME_CHAR_COLOR_THEME
constexpr OUStringLiteral UNO_NAME_NUMBERING_IS_NUMBER
constexpr OUStringLiteral UNO_NAME_PARA_CONDITIONAL_STYLE_NAME
constexpr OUStringLiteral UNO_NAME_PARA_STYLE_NAME
constexpr OUStringLiteral UNO_NAME_CHAR_COLOR_TINT_OR_SHADE
constexpr OUStringLiteral UNO_NAME_RSID
constexpr OUStringLiteral UNO_NAME_NUMBERING_LEVEL
constexpr OUStringLiteral UNO_NAME_PAGE_STYLE_NAME
constexpr OUStringLiteral UNO_NAME_NUMBERING_START_VALUE
constexpr OUStringLiteral UNO_NAME_PARA_CONTINUEING_PREVIOUS_SUB_TREE
constexpr OUStringLiteral UNO_NAME_PARRSID
constexpr OUStringLiteral UNO_NAME_CHAR_STYLE_NAME