20#include <officecfg/Office/Common.hxx>
21#include <config_wasm_strip.h>
23#include <com/sun/star/accessibility/XAccessible.hpp>
55#include <bookmark.hxx>
63#include <bitmaps.hlst>
84#if !HAVE_FEATURE_DESKTOP
143 for (
const auto &rRect : aInvalidRects)
159 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwViewShell"));
160 (void)xmlTextWriterEndElement(pWriter);
218 mpOut->SetClipRegion(rRegion);
234 OSL_ENSURE(!
mPrePostPaintRegions.empty(),
"SwViewShell::DLPostPaint2: Pre/PostPaint encapsulation broken (!)");
269#if !ENABLE_WASM_STRIP_ACCESSIBILITY
284 if(&rShell !=
this && rShell.ActionPend())
297 if (
Imp()->HasPaintRegion() &&
Imp()->GetPaintRegion()->GetOrigin() !=
VisArea() )
312 if ( bIsShellForCheckViewLayout )
317 if (
Imp()->HasPaintRegion() ||
329 if ( bPaintsFromSystem )
333 bPaintsFromSystem =
true;
344 bool bShowCursor = oRegion &&
dynamic_cast<const SwCursorShell*
>(
this) !=
nullptr;
352 oRegion->LimitToOrigin();
355 while ( !oRegion->empty() )
357 SwRect aRect( oRegion->back() );
360 if (
GetWin()->SupportsDoubleBuffering())
375 if ( bPaintsFromSystem )
416#if !ENABLE_WASM_STRIP_ACCESSIBILITY
417 if(
Imp()->IsAccessible() )
444 pVout->SetMapMode(
mpOut->GetMapMode() );
448 if( pVout->SetOutputSize( aSize ) )
454 pVout->SetLineColor(
mpOut->GetLineColor() );
455 pVout->SetFillColor(
mpOut->GetFillColor() );
501 return "OuterResize";
507 return "OutlineFolding";
509 return "EndSdrCreate";
513 return "InvalidateLayout";
517 return "DataChanged";
519 return "InsertFrame";
523 return "InsertGraphic";
527 return "ExampleFram";
535 assert(!rReasons.empty() &&
"there must be a reason to InvalidateAll");
537 for (
const auto& reason : rReasons)
538 SAL_INFO(
"sw.core",
"InvalidateAll because of: " << to_string(reason));
547 if (!rReasons.empty())
559 if ( rSh.IsPreview() && rSh.GetWin() )
562 bRet |= rSh.Imp()->AddPaintRect( rRect );
570 if (
Imp()->IsCalcLayoutProgress() )
601 if ( rSh.IsPreview() )
606 rSh.GetWin()->Invalidate( rRect.
SVRect() );
617 std::vector<SwRect> tmpRects = rSh.Imp()->TakePendingLOKInvalidations();
618 rects.insert( rects.end(), tmpRects.begin(), tmpRects.end());
628 if ( rSh.IsPreview() )
630 for(
const SwRect& rect : rects )
635 for(
const SwRect& rect : rects )
636 rSh.GetWin()->Invalidate( rect.SVRect() );
665 ScrollMDI(
this, rRect, USHRT_MAX, USHRT_MAX );
669#if OSL_DEBUG_LEVEL > 0
673 OSL_ENSURE(
false,
"Is MakeVisible still needed for printers?" );
683#if HAVE_FEATURE_DESKTOP
684 const sal_uInt16
nId = SvxSearchDialogWrapper::GetChildWindowId();
735 pCursorShell->EndAction();
750 const SwNodeIndex* pNodeIndex = pFormat->GetContent().GetContentIdx();
783 StartOfSectionNode(), 1 );
813 if(
mpOpt->IsTest5() )
823 OSL_ENSURE(
Imp(),
"SwViewShell already deleted?");
839 pCursorShell->EndAction();
861 pCursorShell->EndAction();
1042 for (
auto const & pFieldType : *
GetDoc()->getIDocumentFieldsAccess().GetFieldTypes())
1045 pFieldType->UpdateFields();
1059 if(
GetLayout()->IsCallbackActionEnabled() )
1070 if ( pTmpDrawModel )
1092 nEndPage += nEndPage * 10 / 100;
1131 rSh.Imp()->SetFirstVisPageInvalid();
1143 if ( !
Imp()->IsCalcLayoutProgress() &&
dynamic_cast<const SwCursorShell*
>(
this ) !=
nullptr )
1167 OSL_ENSURE(
GetWin(),
"VisPortChgd without Window." );
1180 const bool bFull = aPrevArea.
IsEmpty();
1188 Imp()->HasPaintRegion() &&
Imp()->GetPaintRegion()->GetOrigin() !=
VisArea() )
1193 bool bScrolled =
false;
1213 pPage =
static_cast<const SwPageFrame*
>(pOldPage);
1215 aBoth.
Union( aPrevArea );
1240 nPageLeft = aPageRect.
Left();
1241 nPageRight = aPageRect.
Right();
1244 if( nPageLeft < nMinLeft )
1245 nMinLeft = nPageLeft;
1246 if( nPageRight > nMaxRight )
1247 nMaxRight = nPageRight;
1258 if (pObj->IsFormatPossible())
1264 if ( nL < nMinLeft )
1266 if( rBound.
Right() + nOfst > nMaxRight )
1267 nMaxRight = rBound.
Right() + nOfst;
1291 if(
VisArea().Overlaps( aPrevArea ) )
1329 if ( !bScrolled && pPostItMgr && pPostItMgr->
HasNotes() && pPostItMgr->
ShowNotes() )
1332#if !ENABLE_WASM_STRIP_ACCESSIBILITY
1333 if(
Imp()->IsAccessible() )
1340#if !defined(MACOSX) && !defined(ANDROID) && !defined(IOS)
1345 if ( nBitCnt == 16 )
1350 if ( nBitCnt == 24 )
1355 else if ( nBitCnt == 1 )
1362 const bool bOnlyYScroll(!lXDiff &&
std::abs(lYDiff) != 0 &&
std::abs(lYDiff) < lMax);
1363 const bool bAllowedWithChildWindows(
GetWin()->GetWindowClipRegionPixel().IsNull());
1366 if(bSmoothScrollAllowed)
1378 pVout->SetMapMode( aMapMode );
1382 if ( pVout->SetOutputSize( aSize ) )
1404 pVout->SetMapMode( aMapMode );
1458 lMaDelta = -lMaDelta;
1484 GetWin()->
Scroll( 0, lScroll, aTmp, ScrollFlags::Children);
1498 if ( !
Imp()->m_bStopSmooth )
1500 const bool bScrollDirectionIsUp(lScroll > 0);
1503 if(bScrollDirectionIsUp)
1516 if(!
Imp()->m_bStopSmooth)
1527 const Point aSourceTopLeft(pVout->LogicToPixel(aTargetLogic.
TopLeft()));
1531 const bool bMapModeWasEnabledSource(pVout->IsMapModeEnabled());
1533 pVout->EnableMapMode(
false);
1537 aSourceTopLeft, aTargetPixel.
GetSize(),
1542 pVout->EnableMapMode(bMapModeWasEnabledSource);
1553 if ( !
Imp()->m_bStopSmooth )
1565 GetWin()->
Scroll( lXDiff, lYDiff, *pRect, ScrollFlags::Children);
1567 GetWin()->
Scroll( lXDiff, lYDiff, ScrollFlags::Children);
1583 bool bBorderOnly =
false;
1588 while ( pPg && pPg->
GetNext() )
1607 SwRect aLeft( rRect ), aRight( rRect );
1611 if ( nTmp < aLeft.Right() )
1612 aLeft.Right( nTmp );
1614 if ( nTmp > aRight.
Left() )
1616 aRight.
Left( nTmp + nSidebarWidth );
1621 if ( aLeft.HasArea() )
1622 aRegion.push_back( aLeft );
1624 aRegion.push_back( aRight );
1630 while ( pPage && !aRegion.empty() &&
1640 const bool bSidebarRight =
1642 aPageRect.
Pos().AdjustX( -(bSidebarRight ? 0 : nSidebarWidth) );
1643 aPageRect.
AddWidth(nSidebarWidth );
1646 aRegion -= aPageRect;
1651 if ( !aRegion.empty() )
1662 for (
auto &rRgn : rRegion )
1716 while ( !bRet && pPage && ((pPage->
getFrameArea().
Top() <= nBottom) &&
1748 for (
size_t i = 0;
i < oRegion->size(); ++
i )
1750 const SwRect &rTmp = (*oRegion)[
i];
1761 oRegion->LimitToOrigin();
1764 if ( !oRegion->empty() )
1767 for (
size_t i = 0;
i < oRegion->size(); ++
i )
1768 {
const SwRect &rTmp = (*oRegion)[
i];
1780 for (
size_t i = 0;
i < aRegion.size(); ++
i )
1807class RenderContextGuard
1809 std::unique_ptr<SdrPaintWindow> m_TemporaryPaintWindow;
1815 : m_pPatchedPageWindow(nullptr)
1824 if (
nullptr == pDrawView)
1827 SdrPageView* pSdrPageView(pDrawView->GetSdrPageView());
1829 if (
nullptr != pSdrPageView)
1831 m_pPatchedPageWindow = pSdrPageView->FindPageWindow(*pShell->
GetWin()->
GetOutDev());
1833 if (
nullptr != m_pPatchedPageWindow)
1835 m_TemporaryPaintWindow.reset(
new SdrPaintWindow(*pDrawView, *pValue));
1836 m_pPreviousPaintWindow = m_pPatchedPageWindow->
patchPaintWindow(*m_TemporaryPaintWindow);
1841 ~RenderContextGuard()
1843 if(
nullptr != m_pPatchedPageWindow)
1853 RenderContextGuard aGuard(
mpOut, &rRenderContext,
this);
1856 if (
Imp()->m_bSmoothUpdate )
1859 if ( !
Imp()->m_aSmoothRect.Contains( aTmp ) )
1900 if( !
GetOut()->GetConnectMetaFile() &&
GetOut()->IsClipRegion())
1956 for(
const auto& rRectangle : aRectangles)
1978 rRenderContext.
Pop();
2012 sal_uInt16 nOldZoomValue = 0;
2013 if (
GetWin() &&
GetWin()->GetMapMode().GetScaleX() != scaleX)
2015 double fScale = double(scaleX);
2017 nOldZoomValue = aOption.
GetZoom();
2018 aOption.
SetZoom(fScale * 100);
2040 Paint(rDevice, aOutRect);
2056 if (nOldZoomValue !=0)
2059 aOption.
SetZoom(nOldZoomValue);
2114 OSL_ENSURE(
GetLayout(),
"Layout not ready" );
2183 return mxDoc->GetNodes();
2229 if ( !(aOpt == *rSh.GetViewOptions()) )
2230 rSh.ImplApplyViewOptions( aOpt );
2249 if (*rCursor.
GetPoint() <= (**iter).GetMarkStart())
2253 if (*rCursor.
GetPoint() < (**iter).GetMarkEnd())
2256 dynamic_cast<sw::mark::IFieldmark&
>(**iter)));
2260 && *rCursor.
GetPoint() != (**iter).GetMarkStart())
2285 OSL_ENSURE( pMyWin,
"SwViewShell::ApplyViewOptions: no window" );
2291 bool bReformat =
false;
2303 if( pFieldType && pFieldType->HasWriterListeners() )
2350 if (
mpOpt->getBrowseMode() ||
mpOpt->IsWhitespaceHidden())
2354 bool bBrowseModeChanged =
false;
2357 bBrowseModeChanged =
true;
2363 bool bHideWhitespaceModeChanged =
false;
2367 bHideWhitespaceModeChanged =
true;
2404 mpOpt->SetUIOptions(rOpt);
2408 if( bBrowseModeChanged || bHideWhitespaceModeChanged )
2412 mxDoc->CheckDefaultPageFormat();
2429 if (isToggleFieldNames)
2435 if ((
mpOpt->IsFieldName() && pSh->CursorInsideInputField())
2437 pSh->GetLayout()->GetFieldmarkMode()))
2444 mxDoc->GetDocumentLayoutManager().ClearSwLayouterEntries();
2447 if( !bOnlineSpellChgd )
2457 rSh.mpOpt->SetOnlineSpell( bOnlineSpl );
2467 mpOpt->SetUIOptions(rOpt);
2471 mpOpt->SetStarOneSetting(
true);
2482 if( bSet ==
mpOpt->IsReadonly() )
2486 mpOpt->SetReadonly(
false );
2488 bool bReformat =
mpOpt->IsFieldName();
2490 mpOpt->SetReadonly( bSet );
2502#if !ENABLE_WASM_STRIP_ACCESSIBILITY
2503 if(
Imp()->IsAccessible() )
2510 if( bSet !=
mpOpt->IsPDFExport() )
2512 if( bSet &&
mpOpt->getBrowseMode() )
2513 mpOpt->SetPrtFormat(
true );
2514 mpOpt->SetPDFExport(bSet);
2520 if( bSet !=
mpOpt->IsSelectionInReadonly() )
2522 mpOpt->SetSelectionInReadonly(bSet);
2528 mpOpt->SetPrtFormat( bSet );
2558#if !ENABLE_WASM_STRIP_ACCESSIBILITY
2561 uno::Reference< css::accessibility::XAccessible > xAcc;
2564 OSL_ENSURE(
mpLayout,
"no layout, no access" );
2565 OSL_ENSURE(
GetWin(),
"no window, no access" );
2567 if(
mxDoc->getIDocumentLayoutAccess().GetCurrentViewShell() &&
GetWin() )
2576 "Can't create accessible preview for non-preview SwViewShell" );
2579 OSL_ENSURE(
mpLayout,
"no layout, no access" );
2580 OSL_ENSURE(
GetWin(),
"no window, no access" );
2586 GetWin()->GetMapMode().GetScaleX(),
2595 if(
Imp() &&
Imp()->IsAccessible() )
2635 if (
Imp()->IsAccessible() )
2683 if( pTmpRoot && nPageNum )
2686 (pTmpRoot->
Lower());
2688 while( --nPageNum && pPage->
GetNext() )
2704 if(rShell.IsPreview())
2709 else if(rShell.VisArea().Overlaps(rRect) &&
OUTDEV_WINDOW == rShell.GetOut()->GetOutDevType())
2712 rShell.GetWin()->Invalidate(rRect.
SVRect());
2719 OSL_ENSURE(
GetLayout(),
"GetPageNumAndSetOffsetForPDF assumes presence of layout" );
2721 sal_Int32 nRet = -1;
2730 OSL_ENSURE( pPage,
"GetPageNumAndSetOffsetForPDF: No page found" );
2733 aOffset.
setX( -aOffset.
X() );
2734 aOffset.
setY( -aOffset.
Y() );
2790 if (rPageRect.
Top() > 0)
2834{
return mxDoc->GetIDocumentUndoRedo(); }
2836{
return mxDoc->GetIDocumentUndoRedo(); }
2841 return &
mxDoc->getIDocumentListItems();
2846 return &
mxDoc->getIDocumentOutlineNodes();
@ CONSIDER_WRAP_ON_OBJECT_POSITION
@ DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK
@ USE_FORMER_TEXT_WRAPPING
@ PARA_SPACE_MAX_AT_PAGES
@ ADD_PARA_SPACING_TO_TABLE_CELLS
@ EMPTY_DB_FIELD_HIDES_PARA
@ MS_WORD_COMP_TRAILING_BLANKS
@ ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
Fraction conversionFract(o3tl::Length from, o3tl::Length to)
Text operation/manipulation interface.
Provides access to the formatting devices of a document.
virtual OutputDevice * getReferenceDevice(bool bCreate) const =0
Returns the current reference device.
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
virtual void UpdatePageFields(const SwTwips)=0
virtual void LockExpFields()=0
virtual void UpdateFields(bool bCloseDB)=0
virtual void UpdateExpFields(SwTextField *pField, bool bUpdateRefFields)=0
virtual void UnlockExpFields()=0
Provides access to the layout of a document.
Provides numbered items of a document.
Provides access to the marks of a document.
virtual const_iterator_t getFieldmarksBegin() const =0
returns a STL-like random access iterator to the begin of the sequence of fieldmarks.
virtual const_iterator_t getFieldmarksEnd() const =0
returns a STL-like random access iterator to the end of the sequence of fieldmarks.
Provides outline nodes of a document.
Provides access to settings of a document.
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
virtual void SetModified()=0
Must be called manually at changes of format.
Document statistics information.
Access to the style pool.
void SetOrigin(const Point &rOrigin)
void SetScaleY(const Fraction &rScaleY)
void SetMapUnit(MapUnit eUnit)
void SetScaleX(const Fraction &rScaleX)
void EnableMapMode(bool bEnable=true)
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
void DrawRect(const tools::Rectangle &rRect)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
SAL_DLLPRIVATE void DrawOutDev(const Point &, const Size &, const Point &, const Size &, const Printer &)=delete
const MapMode & GetMapMode() const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
bool IsMapModeEnabled() const
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long X() const
void SetDragStripes(bool bOn)
bool IsDragStripes() const
void SetMarkHdlSizePixel(sal_uInt16 nSiz)
void SetAddExtLeading(bool bEnabled)
void ReformatAllTextObjects()
virtual void DeleteDeviceFromPaintView(OutputDevice &rOldWin) override
virtual void AddDeviceToPaintView(OutputDevice &rNewDev, vcl::Window *pWindow) override
void unpatchPaintWindow(SdrPaintWindow *pPreviousPaintWindow)
SdrPaintWindow * patchPaintWindow(SdrPaintWindow &rPaintWindow)
void VisAreaChanged(const OutputDevice *pOut)
void UpdateDrawLayersRegion(const OutputDevice *pOut, const vcl::Region &rReg)
void EndDrawLayers(SdrPaintWindow &rPaintWindow, bool bPaintFormLayer)
void SetGridFine(const Size &rSiz)
void SetGridCoarse(const Size &rSiz)
SdrPaintWindow * BeginDrawLayers(OutputDevice *pOut, const vcl::Region &rReg, bool bDisableIntersect=false)
void SetGridVisible(bool bOn)
bool IsGridVisible() const
OutputDevice & GetTargetOutputDevice()
SdrPreRenderDevice * GetPreRenderDevice() const
void SetSnapGridWidth(const Fraction &rX, const Fraction &rY)
void SetGridSnap(bool bOn)
void SetActualWin(const OutputDevice *pWin)
std::shared_ptr< SfxDialogController > & GetController()
static void notifyDocumentSizeChanged(SfxViewShell const *pThisView, const OString &rPayload, vcl::ITiledRenderable *pDoc, bool bInvalidateAll=true)
static void notifyViewRenderState(SfxViewShell const *pViewShell, vcl::ITiledRenderable *pDoc)
static SfxProgress * GetActiveProgress(SfxObjectShell const *pDocSh=nullptr)
SfxChildWindow * GetChildWindow(sal_uInt16)
SfxViewFrame & GetViewFrame() const
SfxInPlaceClient * GetIPClient() const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
constexpr tools::Long Width() const
static bool IsSelectionInReadonly()
static bool GetIsAutomaticFontColor()
static bool GetIsAllowAnimatedGraphics()
OUString GetNumStr(sal_Int32 nNo) const
css::uno::Reference< css::accessibility::XAccessible > GetDocumentPreview(const std::vector< std::unique_ptr< PreviewPage > > &_rPreviewPages, const Fraction &_rScale, const SwPageFrame *_pSelectedPageFrame, const Size &_rPreviewWinSize)
css::uno::Reference< css::accessibility::XAccessible > GetDocumentView()
wrapper class for the positioning of Writer fly frames and drawing objects
const SwView * GetView() const
IDocumentState const & getIDocumentState() const
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
bool ContainsHiddenChars() const
Checks if any of the text node contains hidden characters.
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
::sw::DocumentRedlineManager const & GetDocumentRedlineManager() const
IDocumentMarkAccess * getIDocumentMarkAccess()
const SwAttrPool & GetAttrPool() const
const sw::FrameFormats< sw::SpzFrameFormat * > * GetSpzFrameFormats() const
SwDocShell * GetDocShell()
const SwRect & getFrameArea() const
Base class of the Writer layout elements.
sal_uInt16 GetVirtPageNum() const
static void CheckPageDescs(SwPageFrame *pStart, bool bNotifyFields=true, SwPageFrame **ppPrev=nullptr)
Check all pages (starting from the given one) if they use the appropriate frame format.
tools::Long GetBottomMargin() const
tools::Long GetTopMargin() const
The usage of LayAction is always the same:
void Action(OutputDevice *pRenderContext)
void SetReschedule(bool bNew)
void SetInputType(VclInputFlags nNew)
void SetComplete(bool bNew)
void SetCalcLayout(bool bNew)
bool IsBrowseActionStop() const
void SetStatBar(bool bNew)
void InvaPercentLowers(SwTwips nDiff=0)
Invalidates the inner Frames, whose width and/or height are calculated using percentages.
const SwFrame * Lower() const
Marks a node in the document model.
const SwNodes & GetNodes() const
SwNodeOffset GetIndex() const
Base class of the Writer document model elements.
SwStartNode * GetStartNode()
SwOLENode * GetOLENode()
Inline methods from Node.hxx.
bool IsDocNodes() const
Is the NodesArray the regular one of Doc? (and not the UndoNds, ...) Implementation in doc....
const SwOLEObj & GetOLEObj() const
const OUString & GetChartTableName() const
svt::EmbeddedObjectRef & GetObject()
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetPoint() const
const SvxNumberType & GetNumType() const
A page of the document layout.
void PrepareFooter()
Creates or removes footer.
sal_uInt16 GetPhyPageNum() const
const SwPageFrame & GetFormatPage() const
const SwSortedObjs * GetSortedObjs() const
void AddSubsidiaryLinesBounds(const SwViewShell &rShell, RectangleVector &rRects) const
sw::sidebarwindows::SidebarPosition SidebarPosition() const
asks the page on which side a margin should be shown, e.g for notes returns true for left side,...
void PrepareHeader()
Make this public, so that the SwViewShell can access it when switching from browse mode Add/remove he...
SwRect GetBoundRect(OutputDevice const *pOutputDevice) const
SwPageDesc * GetPageDesc()
bool IsInvalidFly() const
static void Add(SwViewShell *pSh, const SwRect &rNew)
tools::ULong GetSidebarWidth(bool bPx=false) const
tools::ULong GetSidebarBorderWidth(bool bPx=false) const
void PaintTile(OutputDevice &rRenderContext)
Of course Writer needs its own rectangles.
void Height(tools::Long nNew)
SwRect & Union(const SwRect &rRect)
void Top(const tools::Long nTop)
void Right(const tools::Long nRight)
void Bottom(const tools::Long nBottom)
void Pos(const Point &rNew)
void SSize(const Size &rNew)
bool Contains(const Point &rPOINT) const
void AddBottom(const tools::Long nAdd)
bool Overlaps(const SwRect &rRect) const
void AddTop(const tools::Long nAdd)
void AddWidth(const tools::Long nAdd)
tools::Rectangle SVRect() const
void Left(const tools::Long nLeft)
void Width(tools::Long nNew)
void Compress(CompressType type)
The root element of a Writer document layout.
SwViewShell * GetCurrShell() const
const SwPageFrame * GetPageAtPos(const Point &rPt, const Size *pSize=nullptr, bool bExtend=false) const
Point rPt: The point that should be used to find the page Size pSize: If given, we return the (first)...
void CheckViewLayout(const SwViewOption *pViewOpt, const SwRect *pVisArea)
sal_uInt16 GetPageNum() const
bool IsDummyPage(sal_uInt16 nPageNum) const
void SetHideRedlines(bool)
Point GetPagePos(sal_uInt16 nPageNum) const
Returns the absolute document position of the desired page.
void InvalidateAllContent(SwInvalidateFlags nInvalidate)
Invalidate all Content, Size or PrtArea.
void InvalidateAllObjPos()
Invalidate/re-calculate the position of all floating screen objects (Writer fly frames and drawing ob...
static void SetNoVirDev(const bool bNew)
void SetFieldmarkMode(sw::FieldmarkMode, sw::ParagraphBreakMode)
virtual void PaintSwFrame(vcl::RenderContext &rRenderContext, SwRect const &, SwPrintData const *const pPrintData=nullptr) const override
Paint once for every visible page which is touched by Rect.
Try to prevent visible SwParaPortions from being deleted.
Represents the visualization of a paragraph.
bool IsShowChangesInMargin2() const
bool IsHideWhitespaceMode() const
bool IsParagraph(bool bHard=false) const
void SetHideWhitespaceMode(bool bMode)
const OUString & GetSymbolFont() const
bool IsViewLayoutBookMode() const
bool IsGridVisible() const
bool IsShowHiddenField() const
void SetShowHiddenChar(bool b)
bool IsShowHiddenPara() const
short GetDivisionY() const
sal_uInt16 GetZoom() const
void SetZoom(sal_uInt16 n)
sal_uInt16 GetViewLayoutColumns() const
void SetShowHiddenField(bool b)
const Size & GetSnapSize() const
bool getBrowseMode() const
bool IsShowHiddenChar(bool bHard=false) const
void SetViewLayoutColumns(sal_uInt16 nNew)
void SetShowHiddenPara(bool b)
bool IsOnlineSpell() const
short GetDivisionX() const
void SetFieldName(bool b)
bool IsWhitespaceHidden() const
bool IsUseHeaderFooterMenu() const
void SetViewLayoutBookMode(bool bNew)
bool IsShowChangesInMargin() const
bool IsStarOneSetting() const
void InvalidateAccessibleEditableState(bool bAllShells, const SwFrame *pFrame=nullptr)
Invalidate editable state for all accessible frames.
const std::optional< SwRegionRects > & GetPaintRegion()
void UpdateAccessible()
Update (this) accessible view.
const SwPageFrame * GetFirstVisPage(OutputDevice const *pRenderContext) const
Management of the first visible Page.
bool AddPaintRect(const SwRect &rRect)
void SetRestoreActions(sal_uInt16 nSet)
void InvalidateAccessibleParaFlowRelation_(const SwTextFrame *_pFromTextFrame, const SwTextFrame *_pToTextFrame)
invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
std::optional< SwRegionRects > TakePaintRegion()
SwAccessibleMap & GetAccessibleMap()
void InvalidateAccessibleParaTextSelection_()
invalidate text selection for paragraphs
sal_uInt16 GetRestoreActions() const
void AddPendingLOKInvalidation(const SwRect &rRect)
SwDrawView * GetDrawView()
const SwPageFrame * GetLastVisPage(const OutputDevice *pRenderContext) const
void InvalidateAccessibleParaAttrs_(const SwTextFrame &rTextFrame)
invalidate attributes for paragraphs and paragraph's characters
void FireAccessibleEvents()
Fire all accessible events that have been collected so far.
bool IsViewLocked() const
void PaintTile(VirtualDevice &rDevice, int contextWidth, int contextHeight, int tilePosX, int tilePosY, tools::Long tileWidth, tools::Long tileHeight)
Paint tile.
const IDocumentListItems * getIDocumentListItemsAccess() const
vcl::RenderContext * GetOut() const
VclPtr< vcl::Window > mpWin
= 0 during printing or pdf export
void DLPrePaint2(const vcl::Region &rRegion)
bool SmoothScroll(tools::Long lXDiff, tools::Long lYDiff, const tools::Rectangle *)
sal_Int32 GetPageNumAndSetOffsetForPDF(OutputDevice &rOut, const SwRect &rRect) const
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
const IDocumentStatistics & getIDocumentStatistics() const
Provides access to the document statistics interface.
virtual void DrawSelChanged()
SAL_DLLPRIVATE void PaintDesktop_(const SwRegionRects &rRegion)
SdrPaintWindow * mpTargetPaintWindow
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
const SwViewOption * GetViewOptions() const
void UnlockPaint(bool bVirDev=false)
static void SetCareDialog(const std::shared_ptr< weld::Window > &rNew)
void SetProtectForm(bool _bProtectForm)
void InvalidateAccessibleParaAttrs(const SwTextFrame &rTextFrame)
invalidate attributes for paragraphs and paragraph's characters
VclPtr< OutputDevice > mpOut
Window, Printer, VirtDev, ...
void SetReadonlySelectionOption(bool bSet)
bool isOutputToWindow() const
void SetParaSpaceMax(bool bNew)
void SetPDFExportOption(bool bSet)
SwPagePreviewLayout * PagePreviewLayout()
void SetUseFormerTextWrapping(bool _bUseFormerTextWrapping)
void setOutputToWindow(bool bOutputToWindow)
const IDocumentSettingAccess & getIDocumentSettingAccess() const
Provides access to the document setting interface.
const SwNodes & GetNodes() const
virtual void ApplyViewOptions(const SwViewOption &rOpt)
bool AddPaintRect(const SwRect &rRect)
void SetDoNotJustifyLinesWithManualBreak(bool _bDoNotJustifyLinesWithManualBreak)
IDocumentContentOperations & getIDocumentContentOperations()
Provides access to the content operations interface.
void DLPostPaint2(bool bPaintFormLayer)
rtl::Reference< SwDoc > mxDoc
The document; never 0.
void Reformat()
Invalidates complete Layout (ApplyViewOption).
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
VclPtr< OutputDevice > mpBufferedOut
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
VclPtr< OutputDevice > mpPrePostOutDev
void DeleteReplacementBitmaps()
void SetPrtFormatOption(bool bSet)
void ApplyAccessibilityOptions()
void ImplEndAction(const bool bIdleEnd)
void SetUseFormerLineSpacing(bool _bUseFormerLineSpacing)
Sets if former formatting of text lines with proportional line spacing should used.
void EndAction(const bool bIdleEnd=false)
std::unique_ptr< SwViewOption > mpOpt
std::stack< vcl::Region > mPrePostPaintRegions
SfxViewShell * mpSfxViewShell
static ShellResource * GetShellRes()
void SetRestoreActions(sal_uInt16 nSet)
void InvalidateLayout(bool bSizeChanged)
void InvalidateAccessibleFocus()
bool mbOutputToWindow
The virtual device we paint to will end up on the screen.
SAL_DLLPRIVATE void InvalidatePageAndHFSubsidiaryLines()
bool HasDrawViewDrag() const
SwRootFrame * GetLayout() const
void InvalidateAccessibleParaFlowRelation(const SwTextFrame *_pFromTextFrame, const SwTextFrame *_pToTextFrame)
invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
std::unique_ptr< SwAccessibilityOptions > mpAccOptions
void SetUseFormerObjectPositioning(bool _bUseFormerObjPos)
Sets IDocumentSettingAccess if former object positioning should be used.
sal_uInt16 GetNumPages() const
SwRect maVisArea
The modern version of VisArea.
vcl::Window * GetWin() const
const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() const
Provides access to the document draw model interface.
bool mbShowHeaderSeparator
Flag to say that we are showing the header control.
void UpdateAllCharts()
update all charts for which any table exists
const SwRect & VisArea() const
void OnGraphicArrived(const SwRect &)
void SetBrowseBorder(const Size &rNew)
SAL_DLLPRIVATE bool CheckInvalidForPaint(const SwRect &)
SAL_DLLPRIVATE void ImplApplyViewOptions(const SwViewOption &rOpt)
SAL_DLLPRIVATE void PaintDesktop(const vcl::RenderContext &rRenderContext, const SwRect &)
sal_uInt16 GetRestoreActions() const
css::uno::Reference< css::accessibility::XAccessible > CreateAccessible()
void ImplUnlockPaint(std::vector< LockPaintReason > &rReasons, bool bVirDev)
IDocumentUndoRedo const & GetIDocumentUndoRedo() const
Provides access to the document undo/redo interface.
std::unique_ptr< BitmapEx > m_xErrorBmp
error display of missed images
sal_Int32 GetBrowseWidth() const
void InvalidateWindows(const SwRect &rRect)
bool IsShowHeaderFooterSeparator(FrameControlType eControl)
sal_uInt16 mnStartAction
!= 0 if at least one Action is active.
virtual void SetReadonlyOption(bool bSet)
static ShellResource * spShellRes
Resources for the Shell.
static weld::Window * CareChildWin(SwViewShell const &rVSh)
static weld::Window * GetCareDialog(SwViewShell const &rVSh)
SwAccessibleMap * GetAccessibleMap()
const IDocumentLayoutAccess & getIDocumentLayoutAccess() const
Provides access to the document layout interface.
void SetParaSpaceMaxAtPages(bool bNew)
void SetAddExtLeading(bool bNew)
IDocumentStylePoolAccess & getIDocumentStylePoolAccess()
Provides access to the document style pool interface.
bool mbHeaderFooterEdit
Flag to say that we are editing header or footer (according to the bShow(Header|Footer)Separator abov...
SfxViewShell * GetSfxViewShell() const
Size GetPageSize(sal_uInt16 nPageNum, bool bSkipEmptyPages) const
void SetUIOptions(const SwViewOption &rOpt)
virtual void CalcLayout()
void FlushPendingLOKInvalidateTiles()
sal_uInt16 GetPageCount() const
sal_uInt16 mnLockPaint
!= 0 if Paint is locked.
bool mbShowFooterSeparator
Flag to say that we are showing the footer control.
void SetConsiderWrapOnObjPos(bool _bConsiderWrapOnObjPos)
void LockPaint(LockPaintReason eReason)
SAL_DLLPRIVATE void InvalidateAll(std::vector< LockPaintReason > &rReasons)
const Size & GetBrowseBorder() const
const IDocumentOutlineNodes * getIDocumentOutlineNodesAccess() const
vcl::RenderContext & GetRefDev() const
void SetFirstVisPageInvalid()
void SetTabCompat(bool bNew)
const SwPostItMgr * GetPostItMgr() const
const IDocumentRedlineAccess & getIDocumentRedlineAccess() const
Provides access to the document redline interface.
void SetMsWordCompTrailingBlanks(bool _bMsWordCompTrailingBlanks)
void SetSubtractFlysAnchoredAtFlys(bool bSubtractFlysAnchoredAtFlys)
virtual void VisPortChgd(const SwRect &)
void SetAddParaSpacingToTableCells(bool _bAddParaSpacingToTableCells)
Sets if paragraph and table spacing is added at bottom of table cells.
Point GetPagePos(sal_uInt16 nPageNum) const
void SetEmptyDbFieldHidesPara(bool bEmptyDbFieldHidesPara)
void GetFirstLastVisPageNumbers(SwVisiblePageNumbers &rVisiblePageNumbers)
std::unique_ptr< BitmapEx > m_xReplaceBmp
replaced display of still loaded images
const SfxItemPool & GetAttrPool() const
void ToggleHeaderFooterEdit()
Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags.
static vcl::DeleteOnDeinit< std::shared_ptr< weld::Window > > spCareDialog
Avoid this window.
void UpdateFields(bool bCloseDB=false)
Forces update of each field.
css::uno::Reference< css::accessibility::XAccessible > CreateAccessiblePreview()
void MakeVisible(const SwRect &)
void UpdateOleObjectPreviews()
Update the previews of all OLE objects.
bool IsDummyPage(sal_uInt16 nPageNum) const
virtual void SetShowHeaderFooterSeparator(FrameControlType eControl, bool bShow)
void InvalidateAccessibleParaTextSelection()
invalidate text selection for paragraphs
const BitmapEx & GetReplacementBitmap(bool bIsErrorState)
const tools::Rectangle & GetVisArea() const
SwPostItMgr * GetPostItMgr()
reference_type * get() const
bool SetOutputSizePixel(const Size &rNewSize, bool bErase=true, bool bAlphaMaskTransparent=false)
void UpdateReplacement(bool bUpdateOle=false)
void HideAll(bool bDeletion)
ring_container GetRingContainer()
void GetRegionRectangles(RectangleVector &rTarget) const
const MapMode & GetMapMode() const
::OutputDevice const * GetOutDev() const
virtual void Scroll(tools::Long nHorzScroll, tools::Long nVertScroll, ScrollFlags nFlags=ScrollFlags::NONE)
Point PixelToLogic(const Point &rDevicePt) const
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
void EnableMapMode(bool bEnable=true)
void EnablePaint(bool bEnable)
virtual Dialog * getDialog()=0
struct _xmlTextWriter * xmlTextWriterPtr
void SizeNotify(SwViewShell const *pVwSh, const Size &rSize)
void PageNumNotify(SwViewShell const *pVwSh)
bool IsScrollMDI(SwViewShell const *pVwSh, const SwRect &rRect)
void RepaintPagePreview(SwViewShell const *pVwSh, const SwRect &rRect)
void ScrollMDI(SwViewShell const *pVwSh, const SwRect &rRect, sal_uInt16 nRangeX, sal_uInt16 nRangeY)
@ Database
For old documents the Field-Which IDs must be preserved !!!
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(162)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_INFO(area, stream)
void StartProgress(TranslateId pMessResId, tools::Long nStartValue, tools::Long nEndValue, SwDocShell *pDocShell)
void EndProgress(SwDocShell const *pDocShell)
void setTiledPainting(bool bTiledPainting)
SwPosition FindFieldSep(IFieldmark const &rMark)
return position of the CH_TXT_ATR_FIELDSEP for rMark
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
Color GetFillColor(Color const &rColor, DrawModeFlags nDrawMode, StyleSettings const &rStyleSettings)
Color GetLineColor(Color const &rColor, DrawModeFlags nDrawMode, StyleSettings const &rStyleSettings)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
SwNodeOffset abs(const SwNodeOffset &a)
std::vector< tools::Rectangle > RectangleVector
void SVXCORE_DLLPUBLIC PaintTransparentChildren(vcl::Window const &rWindow, tools::Rectangle const &rPixelRect)
Marks a position in the document model.
OUString sFirstCustomVirt
constexpr SwTwips DOCUMENTBORDER
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
static bool bInSizeNotify
static bool IsCursorInFieldmarkHidden(SwPaM const &rCursor, sw::FieldmarkMode const eMode)
static void lcl_InvalidateAllObjPos(SwViewShell &_rSh)
local method to invalidate/re-calculate positions of floating screen objects (Writer fly frame and dr...
static void lcl_InvalidateAllContent(SwViewShell &rSh, SwInvalidateFlags nInv)
static void lcl_PaintTransparentFormControls(SwViewShell const &rShell, SwRect const &rRect)