/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
namespace com::sun::star::accessibility { class XAccessible; } class SwDoc; class IDocumentSettingAccess; class IDocumentDeviceAccess; class IDocumentMarkAccess; class IDocumentDrawModelAccess; class IDocumentRedlineAccess; class IDocumentLayoutAccess; class IDocumentContentOperations; class IDocumentStylePoolAccess; class IDocumentStatistics; class IDocumentUndoRedo; class IDocumentListItems; class IDocumentOutlineNodes; class SfxPrinter; class SwRootFrame; class SwNodes; class SdrView; class SfxItemPool; class SfxViewShell; class SwViewOption; class SwViewShellImp; class SwPrintData; struct ShellResource; class SwRegionRects; class SwPagePreviewLayout; class SwTextFrame;
class SwAccessibilityOptions; namespace vcl { class Region; } class SwPostItMgr; class SdrPaintWindow; class SwAccessibleMap; enumclass Orientation;
enumclass ScrollSizeMode
{
ScrollSizeDefault, //usually 30% of the visible area
ScrollSizeMouseSelection, //make target rectangle visible
ScrollSizeTimer, // increase of timer based scrolling
ScrollSizeTimer2 // more increase of timer based scrolling
}; namespace vcl
{ typedef OutputDevice RenderContext;
}
// Define for flags needed in ctor or layers below. // Currently the Preview flag is needed for DrawPage. #define VSHELLFLAG_ISPREVIEW (tools::Long(0x1)) #define VSHELLFLAG_SHARELAYOUT (tools::Long(0x2)) typedef std::shared_ptr<SwRootFrame> SwRootFramePtr;
bool mbDocSizeChgd :1; // For DocChgNotify(): Announce new DocSize // at EndAction to DocMDI. bool mbPaintWorks :1; // Normal Painting if true, // remember Paint if false. bool mbPaintInProgress :1; // Block any double paint. bool mbViewLocked :1; // Lock visible range; // in this case MakeVisible is ineffectual. bool mbInEndAction :1; // Avoid problems, cf. viewsh.cxx. bool mbPreview :1; // If true it is a Preview-SwViewShell. bool mbEnableSmooth :1; // Disable SmoothScroll, e.g. for drag // of scrollbars. bool mbShowHeaderSeparator:1; ///< Flag to say that we are showing the header control bool mbShowFooterSeparator:1; ///< Flag to say that we are showing the footer control bool mbHeaderFooterEdit:1; ///< Flag to say that we are editing header or footer (according to the bShow(Header|Footer)Separator above)
// boolean, indicating that class in constructor. bool mbInConstructor:1;
// Initialization; called by the diverse constructors. void Init( const SwViewOption *pNewOpt );
inlinevoid ResetInvalidRect();
void PaintDesktop(const vcl::RenderContext& rRenderContext, const SwRect&); // Collect values for painting of desktop // and calling. // PaintDesktop split. This pars is also used by PreviewPage. void PaintDesktop_(const SwRegionRects &rRegion);
protected: static ShellResource* spShellRes; ///< Resources for the Shell.
SwRect maVisArea; ///< The modern version of VisArea.
tools::Rectangle maLOKVisibleArea;///< The visible area in the LibreOfficeKit client.
rtl::Reference<SwDoc> mxDoc; ///< The document; never 0.
sal_uInt16 mnStartAction; ///< != 0 if at least one Action is active.
sal_uInt16 mnLockPaint; ///< != 0 if Paint is locked.
std::vector<LockPaintReason> maLockPaintReasons; bool mbSelectAll; ///< Special select all mode: whole document selected, even if doc starts with table.
/// The virtual device we paint to will end up on the screen. bool mbOutputToWindow;
/// For all views of this document.
SW_DLLPUBLIC void StartAllAction();
SW_DLLPUBLIC void EndAllAction();
// The ActionCount for all Shells is temporarily set to zero and then // restored at the RootFrame via UNO. void SetRestoreActions(sal_uInt16 nSet);
sal_uInt16 GetRestoreActions() const;
Sets the pOut so that the rRect is always painted over the entire pOut, ie. starts in 0,0 and ends in width/height.
*/ void PaintTile(VirtualDevice &rDevice, int contextWidth, int contextHeight, int tilePosX, inttilePosY, tools::Long tileWidth, tools::Long tileHeight);
// Notification that visible area has been changed. // VisArea is reset, after that scrolling takes place. // The passed rect is situated on pixel borders // in order to avoid pixel errors when scrolling. virtualvoid VisPortChgd( const SwRect & ); bool SmoothScroll( tools::Long lXDiff, tools::Long lYDiff, const tools::Rectangle* );//Browser void EnableSmooth( bool b ) { mbEnableSmooth = b; }
const SwRect& VisArea() const;
/// The visible area in the client (set by setClientVisibleArea). const tools::Rectangle & getLOKVisibleArea() const { return maLOKVisibleArea; } void setLOKVisibleArea(const tools::Rectangle& rArea) { maLOKVisibleArea = rArea; }
// If necessary scroll until passed Rect is situated in visible sector. void MakeVisible( const SwRect &, ScrollSizeMode eScrollSizeMode = ScrollSizeMode::ScrollSizeDefault );
// At nearest occasion pass new document size to UI. void SizeChgNotify(); void UISizeNotify(); // Passing of current size.
Point GetPagePos( sal_uInt16 nPageNum ) const;
sal_uInt16 GetNumPages() const; // Ask count of current pages from layout. bool IsDummyPage( sal_uInt16 nPageNum ) const; // An empty page?
// Invalidate first visible page for all Shells in ring. void SetFirstVisPageInvalid();
SW_DLLPUBLIC SwRootFrame* GetLayout() const; bool IsNewLayout() const; // Has Layout been loaded or created?
Size GetDocSize() const; // Get document size.
virtualvoid CalcLayout(); // Force complete formatting of layout.
// 1. GetRefDev: Either the printer or the virtual device from the doc // 2. GetWin: Available if we not printing // 3. GetOut: Printer, Window or Virtual device
vcl::RenderContext& GetRefDev() const;
vcl::Window* GetWin() const { return mpWin; }
vcl::RenderContext* GetOut() const { return mpOut; }
// Change of all page descriptors. void ChgAllPageOrientation( Orientation eOri ); void ChgAllPageSize( Size const &rSz );
// Printing of one page. // bIsPDFExport == true is: do PDF Export (no printing!) bool PrintOrPDFExport( OutputDevice *pOutDev,
SwPrintData const& rPrintData,
sal_Int32 nRenderer, /* offset in vector of pages to print */ bool bIsPDFExport );
// Printing of one brochure page. void PrintProspect( OutputDevice *pOutDev, const SwPrintData &rPrintData,
sal_Int32 nRenderer /* offset in vector of page pairs for prospect printing */ );
// Selection of Draw Engine has been changed. virtualvoid DrawSelChanged();
SwPagePreviewLayout* PagePreviewLayout();
/** adjust view options for page preview
Because page preview should show the document as it is printed - page preview is print preview -, the view options are adjusted to the same as for printing.
@param _rPrintOptions input parameter - constant reference to print options, to which the view option will be adjusted.
*/ void AdjustOptionsForPagePreview( SwPrintData const& rPrintOptions );
// Get/set DrawView and PageView. bool HasDrawView() const; void MakeDrawView();
// Are we dragging draw shapes around. bool HasDrawViewDrag() const;
// DrawView may be used at UI.
SW_DLLPUBLIC SdrView *GetDrawView(); const SdrView *GetDrawView() const { returnconst_cast<SwViewShell*>(this)->GetDrawView(); }
// Take care that MarkList is up-to-date in any case (Bug 57153).
SdrView *GetDrawViewWithValidMarkList();
// Invalidates pages and contents. // When bSizeChanged==true, adds/removes // headers and footers as necessary. void InvalidateLayout(bool bSizeChanged);
/** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
@param _pFromTextFrame input parameter - paragraph frame, for which the relation CONTENT_FLOWS_FROM has to be invalidated. If NULL, no CONTENT_FLOWS_FROM relation has to be invalidated
@param _pToTextFrame input parameter - paragraph frame, for which the relation CONTENT_FLOWS_TO has to be invalidated. If NULL, no CONTENT_FLOWS_TO relation has to be invalidated
*/ void InvalidateAccessibleParaFlowRelation( const SwTextFrame* _pFromTextFrame, const SwTextFrame* _pToTextFrame );
/** invalidate text selection for paragraphs
*/ void InvalidateAccessibleParaTextSelection();
/** invalidate attributes for paragraphs and paragraph's characters
usage also for changes of the attributes of paragraph's characters.
// SwTextFrame::AutoSpell_ calls this, to notify the shell, that a word has a spelling error, // but that couldn't be drawn, because the cursor was in that word (so that the user is not // annoyed while typing). The shell's task is to re-run the spell check (i.e., call LayoutIdle, // which internally does the spell check), when the cursor leaves that word (implemented in // SwCursorShell). virtualvoid OnSpellWrongStatePending() {}
};
// manages global ShellPointer class CurrShell
{ public:
SwViewShell *pPrev;
SwRootFrame *pRoot;
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.3Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.