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>
83#if !HAVE_FEATURE_DESKTOP
144 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwViewShell"));
145 (void)xmlTextWriterEndElement(pWriter);
203 mpOut->SetClipRegion(rRegion);
219 OSL_ENSURE(!
mPrePostPaintRegions.empty(),
"SwViewShell::DLPostPaint2: Pre/PostPaint encapsulation broken (!)");
254#if !ENABLE_WASM_STRIP_ACCESSIBILITY
269 if(&rShell !=
this && rShell.ActionPend())
282 if (
Imp()->HasPaintRegion() &&
Imp()->GetPaintRegion()->GetOrigin() !=
VisArea() )
297 if ( bIsShellForCheckViewLayout )
302 if (
Imp()->HasPaintRegion() ||
314 if ( bPaintsFromSystem )
318 bPaintsFromSystem =
true;
329 bool bShowCursor = oRegion &&
dynamic_cast<const SwCursorShell*
>(
this) !=
nullptr;
337 oRegion->LimitToOrigin();
341 while ( !oRegion->empty() )
343 SwRect aRect( oRegion->back() );
353 pVout->SetMapMode( aMapMode );
362 if ( aTmp2.
Top() > aRect.
Top() )
363 aTmp1.
SetTop( std::max<tools::Long>( 0, aTmp1.
Top() - 1 ) );
369 const Size aTmp( pVout->GetOutputSize() );
373 bSizeOK = pVout->SetOutputSize( aRect.
SSize() );
389 aOrigin.setX( -aOrigin.X() ); aOrigin.setY( -aOrigin.Y() );
391 pVout->SetMapMode( aMapMode );
394 if ( bPaintsFromSystem )
398 aRect.
Pos(), aRect.
SSize(), *pVout );
407 if (
GetWin()->SupportsDoubleBuffering())
422 if ( bPaintsFromSystem )
464#if !ENABLE_WASM_STRIP_ACCESSIBILITY
465 if(
Imp()->IsAccessible() )
492 pVout->SetMapMode(
mpOut->GetMapMode() );
496 if( pVout->SetOutputSize( aSize ) )
502 pVout->SetLineColor(
mpOut->GetLineColor() );
503 pVout->SetFillColor(
mpOut->GetFillColor() );
547 if ( rSh.IsPreview() && rSh.GetWin() )
550 bRet |= rSh.Imp()->AddPaintRect( rRect );
558 if (
Imp()->IsCalcLayoutProgress() )
589 if ( rSh.IsPreview() )
594 rSh.GetWin()->Invalidate( rRect.
SVRect() );
605 std::vector<SwRect> tmpRects = rSh.Imp()->TakePendingLOKInvalidations();
606 rects.insert( rects.end(), tmpRects.begin(), tmpRects.end());
616 if ( rSh.IsPreview() )
618 for(
const SwRect& rect : rects )
623 for(
const SwRect& rect : rects )
624 rSh.GetWin()->Invalidate( rect.SVRect() );
653 ScrollMDI(
this, rRect, USHRT_MAX, USHRT_MAX );
657#if OSL_DEBUG_LEVEL > 0
661 OSL_ENSURE(
false,
"Is MakeVisible still needed for printers?" );
671#if HAVE_FEATURE_DESKTOP
672 const sal_uInt16
nId = SvxSearchDialogWrapper::GetChildWindowId();
723 pCursorShell->EndAction();
732 if (pFormats->
empty())
737 for (
size_t i = 0;
i < pFormats->
size(); ++
i)
778 StartOfSectionNode(), 1 );
808 if(
mpOpt->IsTest5() )
818 OSL_ENSURE(
Imp(),
"SwViewShell already deleted?");
834 pCursorShell->EndAction();
856 pCursorShell->EndAction();
1037 for (
auto const & pFieldType : *
GetDoc()->getIDocumentFieldsAccess().GetFieldTypes())
1040 pFieldType->UpdateFields();
1054 if(
GetLayout()->IsCallbackActionEnabled() )
1065 if ( pTmpDrawModel )
1087 nEndPage += nEndPage * 10 / 100;
1126 rSh.Imp()->SetFirstVisPageInvalid();
1138 if ( !
Imp()->IsCalcLayoutProgress() &&
dynamic_cast<const SwCursorShell*
>(
this ) !=
nullptr )
1145 std::stringstream ss;
1147 OString sSize = ss.str().c_str();
1163 OSL_ENSURE(
GetWin(),
"VisPortChgd without Window." );
1176 const bool bFull = aPrevArea.
IsEmpty();
1184 Imp()->HasPaintRegion() &&
Imp()->GetPaintRegion()->GetOrigin() !=
VisArea() )
1189 bool bScrolled =
false;
1209 pPage =
static_cast<const SwPageFrame*
>(pOldPage);
1211 aBoth.
Union( aPrevArea );
1236 nPageLeft = aPageRect.
Left();
1237 nPageRight = aPageRect.
Right();
1240 if( nPageLeft < nMinLeft )
1241 nMinLeft = nPageLeft;
1242 if( nPageRight > nMaxRight )
1243 nMaxRight = nPageRight;
1254 if (pObj->IsFormatPossible())
1260 if ( nL < nMinLeft )
1262 if( rBound.
Right() + nOfst > nMaxRight )
1263 nMaxRight = rBound.
Right() + nOfst;
1287 if(
VisArea().Overlaps( aPrevArea ) )
1305 aPt.setX( -aPt.X() ); aPt.setY( -aPt.Y() );
1325 if ( !bScrolled && pPostItMgr && pPostItMgr->
HasNotes() && pPostItMgr->
ShowNotes() )
1328#if !ENABLE_WASM_STRIP_ACCESSIBILITY
1329 if(
Imp()->IsAccessible() )
1336#if !defined(MACOSX) && !defined(ANDROID) && !defined(IOS)
1341 if ( nBitCnt == 16 )
1346 if ( nBitCnt == 24 )
1351 else if ( nBitCnt == 1 )
1358 const bool bOnlyYScroll(!lXDiff &&
std::abs(lYDiff) != 0 &&
std::abs(lYDiff) < lMax);
1359 const bool bAllowedWithChildWindows(
GetWin()->GetWindowClipRegionPixel().IsNull());
1362 if(bSmoothScrollAllowed)
1374 pVout->SetMapMode( aMapMode );
1378 if ( pVout->SetOutputSize( aSize ) )
1400 pVout->SetMapMode( aMapMode );
1454 lMaDelta = -lMaDelta;
1480 GetWin()->
Scroll( 0, lScroll, aTmp, ScrollFlags::Children);
1494 if ( !
Imp()->m_bStopSmooth )
1496 const bool bScrollDirectionIsUp(lScroll > 0);
1499 if(bScrollDirectionIsUp)
1512 if(!
Imp()->m_bStopSmooth)
1523 const Point aSourceTopLeft(pVout->LogicToPixel(aTargetLogic.
TopLeft()));
1527 const bool bMapModeWasEnabledSource(pVout->IsMapModeEnabled());
1529 pVout->EnableMapMode(
false);
1533 aSourceTopLeft, aTargetPixel.
GetSize(),
1538 pVout->EnableMapMode(bMapModeWasEnabledSource);
1549 if ( !
Imp()->m_bStopSmooth )
1561 GetWin()->
Scroll( lXDiff, lYDiff, *pRect, ScrollFlags::Children);
1563 GetWin()->
Scroll( lXDiff, lYDiff, ScrollFlags::Children);
1579 bool bBorderOnly =
false;
1584 while ( pPg && pPg->
GetNext() )
1603 SwRect aLeft( rRect ), aRight( rRect );
1607 if ( nTmp < aLeft.Right() )
1608 aLeft.Right( nTmp );
1610 if ( nTmp > aRight.
Left() )
1612 aRight.
Left( nTmp + nSidebarWidth );
1617 if ( aLeft.HasArea() )
1618 aRegion.push_back( aLeft );
1620 aRegion.push_back( aRight );
1626 while ( pPage && !aRegion.empty() &&
1636 const bool bSidebarRight =
1638 aPageRect.
Pos().AdjustX( -(bSidebarRight ? 0 : nSidebarWidth) );
1639 aPageRect.
AddWidth(nSidebarWidth );
1642 aRegion -= aPageRect;
1647 if ( !aRegion.empty() )
1658 for (
auto &rRgn : rRegion )
1712 while ( !bRet && pPage && ((pPage->
getFrameArea().
Top() <= nBottom) &&
1744 for (
size_t i = 0;
i < oRegion->size(); ++
i )
1746 const SwRect &rTmp = (*oRegion)[
i];
1757 oRegion->LimitToOrigin();
1760 if ( !oRegion->empty() )
1763 for (
size_t i = 0;
i < oRegion->size(); ++
i )
1764 {
const SwRect &rTmp = (*oRegion)[
i];
1776 for (
size_t i = 0;
i < aRegion.size(); ++
i )
1803class RenderContextGuard
1805 std::unique_ptr<SdrPaintWindow> m_TemporaryPaintWindow;
1811 : m_pPatchedPageWindow(nullptr)
1820 if (
nullptr == pDrawView)
1823 SdrPageView* pSdrPageView(pDrawView->GetSdrPageView());
1825 if (
nullptr != pSdrPageView)
1827 m_pPatchedPageWindow = pSdrPageView->FindPageWindow(*pShell->
GetWin()->
GetOutDev());
1829 if (
nullptr != m_pPatchedPageWindow)
1831 m_TemporaryPaintWindow.reset(
new SdrPaintWindow(*pDrawView, *pValue));
1832 m_pPreviousPaintWindow = m_pPatchedPageWindow->
patchPaintWindow(*m_TemporaryPaintWindow);
1837 ~RenderContextGuard()
1839 if(
nullptr != m_pPatchedPageWindow)
1849 RenderContextGuard aGuard(
mpOut, &rRenderContext,
this);
1852 if (
Imp()->m_bSmoothUpdate )
1855 if ( !
Imp()->m_aSmoothRect.Contains( aTmp ) )
1896 if( !
GetOut()->GetConnectMetaFile() &&
GetOut()->IsClipRegion())
1952 for(
const auto& rRectangle : aRectangles)
1974 rRenderContext.
Pop();
2008 sal_uInt16 nOldZoomValue = 0;
2009 if (
GetWin() &&
GetWin()->GetMapMode().GetScaleX() != scaleX)
2011 double fScale = double(scaleX);
2013 nOldZoomValue = aOption.
GetZoom();
2014 aOption.
SetZoom(fScale * 100);
2036 Paint(rDevice, aOutRect);
2052 if (nOldZoomValue !=0)
2055 aOption.
SetZoom(nOldZoomValue);
2110 OSL_ENSURE(
GetLayout(),
"Layout not ready" );
2179 return mxDoc->GetNodes();
2225 if ( !(aOpt == *rSh.GetViewOptions()) )
2226 rSh.ImplApplyViewOptions( aOpt );
2245 if (*rCursor.
GetPoint() <= (**iter).GetMarkStart())
2249 if (*rCursor.
GetPoint() < (**iter).GetMarkEnd())
2252 dynamic_cast<sw::mark::IFieldmark&
>(**iter)));
2256 && *rCursor.
GetPoint() != (**iter).GetMarkStart())
2281 OSL_ENSURE( pMyWin,
"SwViewShell::ApplyViewOptions: no window" );
2287 bool bReformat =
false;
2299 if( pFieldType && pFieldType->HasWriterListeners() )
2346 if (
mpOpt->getBrowseMode() ||
mpOpt->IsWhitespaceHidden())
2350 bool bBrowseModeChanged =
false;
2353 bBrowseModeChanged =
true;
2359 bool bHideWhitespaceModeChanged =
false;
2363 bHideWhitespaceModeChanged =
true;
2400 mpOpt->SetUIOptions(rOpt);
2404 if( bBrowseModeChanged || bHideWhitespaceModeChanged )
2408 mxDoc->CheckDefaultPageFormat();
2425 if (isToggleFieldNames)
2431 if ((
mpOpt->IsFieldName() && pSh->CursorInsideInputField())
2433 pSh->GetLayout()->GetFieldmarkMode()))
2441 if( !bOnlineSpellChgd )
2449 rSh.mpOpt->SetOnlineSpell( bOnlineSpl );
2459 mpOpt->SetUIOptions(rOpt);
2463 mpOpt->SetStarOneSetting(
true);
2474 if( bSet ==
mpOpt->IsReadonly() )
2478 mpOpt->SetReadonly(
false );
2480 bool bReformat =
mpOpt->IsFieldName();
2482 mpOpt->SetReadonly( bSet );
2494#if !ENABLE_WASM_STRIP_ACCESSIBILITY
2495 if(
Imp()->IsAccessible() )
2502 if( bSet !=
mpOpt->IsPDFExport() )
2504 if( bSet &&
mpOpt->getBrowseMode() )
2505 mpOpt->SetPrtFormat(
true );
2506 mpOpt->SetPDFExport(bSet);
2512 if( bSet !=
mpOpt->IsSelectionInReadonly() )
2514 mpOpt->SetSelectionInReadonly(bSet);
2520 mpOpt->SetPrtFormat( bSet );
2550#if !ENABLE_WASM_STRIP_ACCESSIBILITY
2553 uno::Reference< css::accessibility::XAccessible > xAcc;
2556 OSL_ENSURE(
mpLayout,
"no layout, no access" );
2557 OSL_ENSURE(
GetWin(),
"no window, no access" );
2559 if(
mxDoc->getIDocumentLayoutAccess().GetCurrentViewShell() &&
GetWin() )
2568 "Can't create accessible preview for non-preview SwViewShell" );
2571 OSL_ENSURE(
mpLayout,
"no layout, no access" );
2572 OSL_ENSURE(
GetWin(),
"no window, no access" );
2578 GetWin()->GetMapMode().GetScaleX(),
2587 if(
Imp() &&
Imp()->IsAccessible() )
2627 if (
Imp()->IsAccessible() )
2675 if( pTmpRoot && nPageNum )
2678 (pTmpRoot->
Lower());
2680 while( --nPageNum && pPage->
GetNext() )
2696 if(rShell.IsPreview())
2701 else if(rShell.VisArea().Overlaps(rRect) &&
OUTDEV_WINDOW == rShell.GetOut()->GetOutDevType())
2704 rShell.GetWin()->Invalidate(rRect.
SVRect());
2711 OSL_ENSURE(
GetLayout(),
"GetPageNumAndSetOffsetForPDF assumes presence of layout" );
2713 sal_Int32 nRet = -1;
2722 OSL_ENSURE( pPage,
"GetPageNumAndSetOffsetForPDF: No page found" );
2725 aOffset.setX( -aOffset.X() );
2726 aOffset.setY( -aOffset.Y() );
2782 if (rPageRect.
Top() > 0)
2826{
return mxDoc->GetIDocumentUndoRedo(); }
2828{
return mxDoc->GetIDocumentUndoRedo(); }
2833 return &
mxDoc->getIDocumentListItems();
2838 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
const Color & GetLineColor() 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
const Color & GetFillColor() 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
bool GetIsAllowAnimatedGraphics() const
bool IsSelectionInReadonly() const
bool GetIsAutomaticFontColor() const
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 SwFrameFormats * GetSpzFrameFormats() const
SwDocShell * GetDocShell()
const SwNodeIndex * GetContentIdx() const
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
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 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
void ApplyAccessibilityOptions(SvtAccessibilityOptions const &rAccessibilityOptions)
std::stack< vcl::Region > mPrePostPaintRegions
SfxViewShell * mpSfxViewShell
bool IsEndActionByVirDev() const
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.
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 &)
void ImplUnlockPaint(bool bVirDev)
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()
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)
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
static VclPtr< reference_type > Create(Arg &&... arg)
bool SetOutputSizePixel(const Size &rNewSize, bool bErase=true)
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
virtual 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)
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)