20#include <config_wasm_strip.h>
32#include <officecfg/Office/Common.hxx>
44 OSL_ENSURE(
m_pDrawView,
"SwViewShellImp::Init without DrawView" );
71 m_pDrawView->SetSnapGridWidth( aSnGrWdtX, aSnGrWdtY );
79 m_pDrawView->SetUseIncompatiblePathCreateInterface(
false );
88 m_pSdrPageView( nullptr ),
89 m_pFirstVisiblePage( nullptr ),
90 m_pLayAction( nullptr ),
91 m_pIdleAct( nullptr ),
92 m_bFirstPageInvalid( true ),
93 m_bResetHdlHiddenPaint( false ),
94 m_bSmoothUpdate( false ),
95 m_bStopSmooth( false ),
96 m_nRestoreActions( 0 )
102#if !ENABLE_WASM_STRIP_ACCESSIBILITY
116 OSL_ENSURE( !
m_pLayAction,
"Have action for the rest of your life." );
117 OSL_ENSURE( !
m_pIdleAct,
"Be idle for the rest of your life." );
160 (*m_oPaintRegion) += rRect;
172 if( std::find( l.begin(), l.end(), rRect ) == l.end())
173 l.push_back( rRect );
178 std::vector<SwRect> ret;
261 OutputDevice* pOutDevForDrawView = pWin ? pWin->GetOutDev() :
nullptr;
263 if(!pOutDevForDrawView)
271 pOutDevForDrawView) );
331 pLastVisPage = pPage;
349 OSL_ENSURE(
m_pShell->
GetLayout(),
"no layout - page preview layout can not be created.");
354#if !ENABLE_WASM_STRIP_ACCESSIBILITY
360 OSL_ENSURE(
GetShell()->GetLayout(),
"no layout, no access" );
361 OSL_ENSURE( pWin,
"no window, no access" );
369 catch (uno::Exception
const&)
372 assert(!
"SwViewShellImp::UpdateAccessible: unhandled exception");
380 bool bCanSkipInvisible)
385 if( rTmp.Imp()->IsAccessible() )
386 rTmp.Imp()->GetAccessibleMap().A11yDispose( pFrame, pObj,
nullptr, bRecursive, bCanSkipInvisible );
396 if( rTmp.Imp()->IsAccessible() )
397 rTmp.Imp()->GetAccessibleMap().InvalidatePosOrSize( pFrame, pObj,
nullptr,
407 if( rTmp.Imp()->IsAccessible() )
408 rTmp.Imp()->GetAccessibleMap().InvalidateContent( pFrame );
425 if( rTmp.Imp()->IsAccessible() )
426 rTmp.Imp()->GetAccessibleMap().InvalidateEditableStates( pFrame );
440 if( rTmp.Imp()->IsAccessible() )
441 rTmp.Imp()->GetAccessibleMap().InvalidateRelationSet( pMaster,
450 if ( !_pFromTextFrame && !_pToTextFrame )
458 if ( rTmp.Imp()->IsAccessible() )
460 if ( _pFromTextFrame )
462 rTmp.Imp()->GetAccessibleMap().
463 InvalidateParaFlowRelation( *_pFromTextFrame,
true );
467 rTmp.Imp()->GetAccessibleMap().
468 InvalidateParaFlowRelation( *_pToTextFrame,
false );
479 if ( rTmp.Imp()->IsAccessible() )
481 rTmp.Imp()->GetAccessibleMap().InvalidateTextSelectionOfAllParas();
491 if ( rTmp.Imp()->IsAccessible() )
493 rTmp.Imp()->GetAccessibleMap().InvalidateAttr( rTextFrame );
501 const Size& _rPreviewWinSize )
505 _pSelectedPageFrame, _rPreviewWinSize );
virtual void NotifyInvisibleLayers(SdrPageView &_rSdrPageView)=0
method to notify drawing page view about the invisible layers
virtual SwDrawModel * GetOrCreateDrawModel()=0
virtual SwDrawModel * MakeDrawModel_()=0
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
Provides access to the layout of a document.
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
const SdrPage * GetPage(sal_uInt16 nPgNum) const
virtual void SetSize(const Size &aSiz)
void SetActiveLayer(const OUString &rName)
virtual void libreOfficeKitViewAddPendingInvalidateTiles() override
constexpr tools::Long Height() const
constexpr tools::Long Width() const
void UpdatePreview(const std::vector< std::unique_ptr< PreviewPage > > &_rPreviewPages, const Fraction &_rScale, const SwPageFrame *_pSelectedPageFrame, const Size &_rPreviewWinSize)
void InvalidateCursorPosition(const css::uno::Reference< css::accessibility::XAccessible > &rAcc)
void InvalidatePreviewSelection(sal_uInt16 nSelPage)
void InvalidateEditableStates(const SwFrame *_pFrame)
css::uno::Reference< css::accessibility::XAccessible > GetDocumentView()
general base class for all free-flowing frames
const SwRect & getFrameArea() const
Base class of the Writer layout elements.
bool IsAccessibleFrame() const
void SetUpdateExpFields()
bool IsCalcLayout() const
const SwFrame * Lower() const
A page of the document layout.
const SwPageFrame & GetFormatPage() const
SwRect GetBoundRect(OutputDevice const *pOutputDevice) const
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 SSize(const Size &rNew)
bool Overlaps(const SwRect &rRect) const
tools::Rectangle SVRect() const
void Left(const tools::Long nLeft)
void Width(tools::Long nNew)
The root element of a Writer document layout.
const SdrPage * GetDrawPage() const
void SetDrawPage(SdrPage *pNew)
Represents the visualization of a paragraph.
bool IsPagePreview() const
bool IsViewLayoutBookMode() const
bool IsGridVisible() const
short GetDivisionY() const
const Color & GetRetoucheColor() const
const Color & GetDocColor() const
const Size & GetSnapSize() const
bool getBrowseMode() const
short GetDivisionX() const
void InvalidateAccessibleEditableState(bool bAllShells, const SwFrame *pFrame=nullptr)
Invalidate editable state for all accessible frames.
void UpdateAccessible()
Update (this) accessible view.
void CheckWaitCursor()
If an Action is running we ask it to check whether it's time to enable the WaitCursor.
SwPageFrame * m_pFirstVisiblePage
Color GetRetoucheColor() const
SwLayAction * m_pLayAction
void UpdateAccessiblePreview(const std::vector< std::unique_ptr< PreviewPage > > &_rPreviewPages, const Fraction &_rScale, const SwPageFrame *_pSelectedPageFrame, const Size &_rPreviewWinSize)
update data for accessible preview change method signature due to new page preview functionality
const SwPageFrame * GetFirstVisPage(OutputDevice const *pRenderContext) const
Management of the first visible Page.
bool AddPaintRect(const SwRect &rRect)
void InvalidateAccessibleCursorPosition(const SwFrame *pFrame)
Invalidate accessible frame's cursor position.
void InvalidateAccessiblePreviewSelection(sal_uInt16 nSelPage)
void InvalidateAccessibleParaFlowRelation_(const SwTextFrame *_pFromTextFrame, const SwTextFrame *_pToTextFrame)
invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
friend class SwPagePreviewLayout
SwAccessibleMap & GetAccessibleMap()
std::unique_ptr< SwDrawView > m_pDrawView
void InitPagePreviewLayout()
void InvalidateAccessibleFrameContent(const SwFrame *pFrame)
Invalidate accessible frame's content.
void DisposeAccessible(const SwFrame *pFrame, const SdrObject *pObj, bool bRecursive, bool bCanSkipInvisible)
Remove a frame from the accessible view.
void InvalidateAccessibleRelationSet(const SwFlyFrame *pMaster, const SwFlyFrame *pFollow)
Invalidate frame's relation set (for chained frames)
std::shared_ptr< SwAccessibleMap > m_pAccessibleMap
note: the map is uniquely owned here - the shared_ptr is only used so that SwAccessibleContext can ch...
std::unique_ptr< SwPagePreviewLayout > m_pPagePreviewLayout
void InvalidateAccessibleParaTextSelection_()
invalidate text selection for paragraphs
SdrPageView * m_pSdrPageView
void SetFirstVisPage(OutputDevice const *pRenderContext)
std::optional< SwRegionRects > m_oPaintRegion
void AddPendingLOKInvalidation(const SwRect &rRect)
std::vector< SwRect > TakePendingLOKInvalidations()
SwDrawView * GetDrawView()
void Init(const SwViewOption *)
const SwPageFrame * GetLastVisPage(const OutputDevice *pRenderContext) const
SwViewShellImp(SwViewShell *)
CTor for the core internals.
const SwViewShell * GetShell() const
Only for SwViewShell::Init()
bool IsCalcLayoutProgress() const
Asks the LayAction if present.
std::vector< SwRect > m_pendingLOKInvalidations
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.
SwAccessibleMap * CreateAccessibleMap()
bool IsAccessible() const
Is this view accessible?
void MoveAccessible(const SwFrame *pFrame, const SdrObject *pObj, const SwRect &rOldFrame)
Move a frame's position in the accessible view.
vcl::RenderContext * GetOut() const
const SwViewOption * GetViewOptions() const
bool isOutputToWindow() const
SwRootFrame * GetLayout() const
vcl::Window * GetWin() const
const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() const
Provides access to the document draw model interface.
const SwRect & VisArea() const
const IDocumentLayoutAccess & getIDocumentLayoutAccess() const
Provides access to the document layout interface.
SfxViewShell * GetSfxViewShell() const
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define TOOLS_WARN_EXCEPTION(area, stream)
constexpr OUStringLiteral last
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)