2000-09-18 16:15:01 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 11:06:15 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 11:06:15 +00:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 11:06:15 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 11:06:15 +00:00
|
|
|
* $RCSfile: viewsh.hxx,v $
|
2008-08-19 23:26:16 +00:00
|
|
|
* $Revision: 1.65 $
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 11:06:15 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 11:06:15 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 11:06:15 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 11:06:15 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef _VIEWSH_HXX
|
|
|
|
#define _VIEWSH_HXX
|
2004-10-04 18:01:08 +00:00
|
|
|
#include <com/sun/star/embed/XClassifiedObject.hpp>
|
|
|
|
#include <com/sun/star/embed/XEmbeddedObject.hpp>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <tools/rtti.hxx>
|
|
|
|
#include <svtools/svarray.hxx>
|
2004-08-23 09:54:11 +00:00
|
|
|
#include "swdllapi.h"
|
2000-10-25 10:53:58 +00:00
|
|
|
#include <swtypes.hxx>
|
|
|
|
#include <ring.hxx>
|
|
|
|
#include <swrect.hxx>
|
|
|
|
#include <errhdl.hxx>
|
2008-08-19 23:26:16 +00:00
|
|
|
#include <vcl/mapmod.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2003-04-24 15:09:38 +00:00
|
|
|
namespace com { namespace sun { namespace star { namespace accessibility {
|
|
|
|
class XAccessible; } } } }
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2004-10-04 18:01:08 +00:00
|
|
|
class SfxObjectShellRef;
|
2000-09-18 16:15:01 +00:00
|
|
|
class SwDoc;
|
2006-08-14 14:38:24 +00:00
|
|
|
class IDocumentSettingAccess;
|
|
|
|
class IDocumentDeviceAccess;
|
|
|
|
class IDocumentBookmarkAccess;
|
|
|
|
class IDocumentDrawModelAccess;
|
|
|
|
class IDocumentRedlineAccess;
|
|
|
|
class IDocumentLayoutAccess;
|
|
|
|
class IDocumentFieldsAccess;
|
|
|
|
class IDocumentContentOperations;
|
|
|
|
class IDocumentStylePoolAccess;
|
|
|
|
class IDocumentStatistics;
|
2007-05-22 15:22:29 +00:00
|
|
|
class IDocumentUndoRedo;
|
2008-02-26 09:32:18 +00:00
|
|
|
// --> OD 2007-11-14 #i83479#
|
|
|
|
class IDocumentListItems;
|
|
|
|
class IDocumentOutlineNodes;
|
|
|
|
// <--
|
2000-09-18 16:15:01 +00:00
|
|
|
class SfxPrinter;
|
|
|
|
class SfxProgress;
|
|
|
|
class SwRootFrm;
|
|
|
|
class SwNodes;
|
|
|
|
class SdrView;
|
|
|
|
class SfxItemPool;
|
|
|
|
class SfxViewShell;
|
|
|
|
class SwViewOption;
|
|
|
|
class SwViewImp;
|
|
|
|
class SwPrtOptions;
|
|
|
|
class SwPagePreViewPrtData;
|
|
|
|
class Window;
|
|
|
|
class OutputDevice;
|
|
|
|
class SwLayIdle;
|
|
|
|
struct ShellResource;
|
|
|
|
class SwRegionRects;
|
|
|
|
class SwFrm;
|
2002-05-06 11:11:40 +00:00
|
|
|
class SvtAccessibilityOptions;
|
2003-03-27 14:45:43 +00:00
|
|
|
// OD 12.12.2002 #103492#
|
|
|
|
class SwPagePreviewLayout;
|
2006-02-01 13:19:33 +00:00
|
|
|
// --> OD 2005-12-01 #i27138#
|
|
|
|
class SwTxtFrm;
|
|
|
|
// <--
|
2007-08-03 12:39:19 +00:00
|
|
|
class BitmapEx;
|
2002-11-11 12:45:25 +00:00
|
|
|
|
2002-11-01 12:23:37 +00:00
|
|
|
struct SwAccessibilityOptions;
|
2006-11-14 14:07:32 +00:00
|
|
|
class Region;
|
2008-03-07 13:49:53 +00:00
|
|
|
class SwPostItMgr;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-06-26 10:55:41 +00:00
|
|
|
// #i74769#
|
|
|
|
class SdrPaintWindow;
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
//JP 19.07.98: - Bug 52312
|
|
|
|
// define fuer Flags, die im CTOR oder den darunter liegenden Schichten
|
|
|
|
// benoetigt werden.
|
|
|
|
// Zur Zeit wird fuer die DrawPage das PreView Flag benoetigt
|
|
|
|
#define VSHELLFLAG_ISPREVIEW ((long)0x1)
|
|
|
|
|
2004-08-23 09:54:11 +00:00
|
|
|
class SW_DLLPUBLIC ViewShell : public Ring
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
friend void SetOutDev( ViewShell *pSh, OutputDevice *pOut );
|
|
|
|
friend void SetOutDevAndWin( ViewShell *pSh, OutputDevice *pOut,
|
|
|
|
Window *pWin, sal_uInt16 nZoom );
|
|
|
|
|
|
|
|
friend class SwViewImp;
|
|
|
|
friend class SwLayIdle;
|
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
// OD 12.12.2002 #103492# - for setting visible area for page preview paint
|
|
|
|
friend class SwPagePreviewLayout;
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
//Umsetzen der SwVisArea, damit vor dem Drucken sauber formatiert
|
|
|
|
//werden kann.
|
2002-09-06 04:56:09 +00:00
|
|
|
friend void SetSwVisArea( ViewShell *pSh, const SwRect &, BOOL bPDFExport = FALSE );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-08-03 12:39:19 +00:00
|
|
|
// --> PB 2007-05-30 #146850#
|
|
|
|
static BitmapEx* pReplaceBmp; // replaced display of still loaded images
|
|
|
|
static BitmapEx* pErrorBmp; // error display of missed images
|
|
|
|
// <--
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
static sal_Bool bLstAct; // sal_True wenn Das EndAction der letzten Shell
|
|
|
|
// laeuft; also die EndActions der
|
|
|
|
// anderen Shells auf das Dokument
|
|
|
|
// abgearbeitet sind.
|
|
|
|
|
2000-10-25 10:53:58 +00:00
|
|
|
Point aPrtOffst; //Ofst fuer den Printer,
|
|
|
|
//nicht bedruckbarer Rand.
|
|
|
|
Size aBrowseBorder; //Rand fuer Framedokumente
|
|
|
|
SwRect aInvalidRect;
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
SfxViewShell *pSfxViewShell;
|
|
|
|
SwViewImp *pImp; //Core-Interna der ViewShell.
|
|
|
|
//Der Pointer ist niemals 0.
|
|
|
|
|
2003-04-01 08:52:21 +00:00
|
|
|
Window *pWin; // = 0 during printing or pdf export
|
|
|
|
OutputDevice *pOut; // Window, Printer, VirtDev, ...
|
2003-06-12 06:37:58 +00:00
|
|
|
OutputDevice* mpTmpRef; // Temporariy reference device. Is used
|
|
|
|
// during (printer depending) prospect
|
|
|
|
// and page preview printing
|
|
|
|
// (because a scaling has to be set at
|
|
|
|
// the original printer)
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2000-10-25 10:53:58 +00:00
|
|
|
SwViewOption *pOpt;
|
2002-11-01 12:23:37 +00:00
|
|
|
SwAccessibilityOptions* pAccOptions;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
sal_Bool bDocSizeChgd :1; //Fuer DocChgNotify(): Neue DocGroesse bei
|
|
|
|
//EndAction an das DocMDI melden.
|
|
|
|
sal_Bool bPaintWorks :1; //Normal Painten wenn sal_True,
|
|
|
|
//Paint merken wenn sal_False
|
|
|
|
sal_Bool bPaintInProgress :1; //Kein zweifaches Paint durchlassen.
|
|
|
|
sal_Bool bViewLocked :1; //Lockt den sichtbaren Bereich,
|
|
|
|
//MakeVisible laeuft dann in's leere.
|
|
|
|
sal_Bool bInEndAction :1; //Fiese unstaende vermeiden, siehe viewsh.cxx
|
|
|
|
sal_Bool bPreView :1; //Ist sal_True wenns eine PreView-ViewShell ist.
|
|
|
|
sal_Bool bFrameView :1; //sal_True wenn es ein (HTML-)Frame ist.
|
|
|
|
sal_Bool bEnableSmooth :1; //Disable des SmoothScroll z.B. fuer
|
|
|
|
//Drag der Scrollbars.
|
|
|
|
sal_Bool bEndActionByVirDev:1; //Paints aus der EndAction immer ueber virtuelles
|
2002-02-20 17:33:01 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
//Device (etwa beim Browsen)
|
|
|
|
|
2004-06-28 12:30:55 +00:00
|
|
|
// OD 2004-06-01 #i26791# - boolean, indicating that class in in constructor
|
|
|
|
bool mbInConstructor:1;
|
|
|
|
|
2007-06-26 10:55:41 +00:00
|
|
|
// #i74769#
|
|
|
|
SdrPaintWindow* mpTargetPaintWindow;
|
|
|
|
OutputDevice* mpBufferedOut;
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
//Initialisierung, wird von den verschiedenen Konstruktoren gerufen.
|
2004-08-23 09:54:11 +00:00
|
|
|
SW_DLLPRIVATE void Init( const SwViewOption *pNewOpt );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
inline void ResetInvalidRect();
|
|
|
|
|
2004-08-23 09:54:11 +00:00
|
|
|
SW_DLLPRIVATE void Reformat(); //Invalidert das ges. Layout (ApplyViewOption)
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2004-08-23 09:54:11 +00:00
|
|
|
SW_DLLPRIVATE void PaintDesktop( const SwRect & ); // sammeln der Werte fuers
|
2000-09-18 16:15:01 +00:00
|
|
|
// Malen der Wiese und rufen
|
|
|
|
// PaintDesktop gesplittet, dieser Teil wird auch von PreViewPage benutzt
|
2004-08-23 09:54:11 +00:00
|
|
|
SW_DLLPRIVATE void _PaintDesktop( const SwRegionRects &rRegion );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2004-08-23 09:54:11 +00:00
|
|
|
SW_DLLPRIVATE sal_Bool CheckInvalidForPaint( const SwRect & );//Direkt Paint oder lieber
|
2000-09-18 16:15:01 +00:00
|
|
|
//eine Aktion ausloesen.
|
|
|
|
|
2004-08-23 09:54:11 +00:00
|
|
|
SW_DLLPRIVATE void Scroll(); //Scrollen wenn sich aus der LayAction Scrollmoeglichkeiten
|
2000-09-18 16:15:01 +00:00
|
|
|
//ergaben.
|
|
|
|
|
2004-08-23 09:54:11 +00:00
|
|
|
SW_DLLPRIVATE void PrepareForPrint( const SwPrtOptions &rOptions );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2004-08-23 09:54:11 +00:00
|
|
|
SW_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
static ShellResource* pShellRes; // Resourcen fuer die Shell
|
|
|
|
static Window* pCareWindow; // diesem Fenster ausweichen
|
|
|
|
|
2000-10-25 10:53:58 +00:00
|
|
|
SwRect aVisArea; //Die moderne Ausfuerung der VisArea
|
|
|
|
SwDoc *pDoc; //Das Dokument, niemals 0
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
sal_uInt16 nStartAction; //ist != 0 wenn mindestens eine ::com::sun::star::chaos::Action laeuft
|
|
|
|
sal_uInt16 nLockPaint; //ist != 0 wenn das Paint gelocked ist.
|
|
|
|
|
|
|
|
public:
|
|
|
|
TYPEINFO();
|
|
|
|
|
|
|
|
SwViewImp *Imp() { return pImp; }
|
|
|
|
const SwViewImp *Imp() const { return pImp; }
|
|
|
|
|
|
|
|
const SwNodes& GetNodes() const;
|
|
|
|
|
2002-09-06 04:56:09 +00:00
|
|
|
//Nach Druckerwechsel, vom Doc
|
|
|
|
//pPDFOut != NULL is used for PDF export.
|
|
|
|
void InitPrt( SfxPrinter * , OutputDevice *pPDFOut = NULL );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
//Klammerung von zusammengehoerenden Aktionen.
|
|
|
|
inline void StartAction();
|
|
|
|
void ImplStartAction();
|
|
|
|
inline void EndAction( const sal_Bool bIdleEnd = sal_False );
|
|
|
|
void ImplEndAction( const sal_Bool bIdleEnd = sal_False );
|
|
|
|
sal_uInt16 ActionCount() const { return nStartAction; }
|
|
|
|
sal_Bool ActionPend() const { return nStartAction != 0; }
|
|
|
|
sal_Bool IsInEndAction() const { return bInEndAction; }
|
|
|
|
|
|
|
|
void SetEndActionByVirDev( sal_Bool b ) { bEndActionByVirDev = b; }
|
|
|
|
sal_Bool IsEndActionByVirDev() { return bEndActionByVirDev; }
|
|
|
|
|
|
|
|
// Per UNO wird am RootFrame fuer alle shells der ActionCount kurzfristig
|
|
|
|
// auf Null gesetzt und wieder restauriert
|
|
|
|
void SetRestoreActions(sal_uInt16 nSet);
|
|
|
|
sal_uInt16 GetRestoreActions() const;
|
|
|
|
|
|
|
|
inline sal_Bool HasInvalidRect() const { return aInvalidRect.HasArea(); }
|
|
|
|
void ChgHyphenation() { Reformat(); }
|
2003-06-10 12:17:09 +00:00
|
|
|
void ChgNumberDigits() { Reformat(); }
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
//Methoden fuer Paint- und Scrollrects, die auf allen Shells im
|
|
|
|
//Ring arbeiten.
|
|
|
|
sal_Bool AddPaintRect( const SwRect &rRect );
|
|
|
|
void AddScrollRect( const SwFrm *pFrm, const SwRect &rRect, long nOffs );
|
|
|
|
void SetNoNextScroll();
|
|
|
|
|
|
|
|
void InvalidateWindows( const SwRect &rRect );
|
2006-11-14 14:07:32 +00:00
|
|
|
|
2007-01-22 14:10:09 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// #i72754# set of Pre/PostPaints with lock counter and initial target OutDev
|
|
|
|
protected:
|
|
|
|
sal_uInt32 mnPrePostPaintCount;
|
|
|
|
OutputDevice* mpPrePostOutDev;
|
2008-08-19 23:26:16 +00:00
|
|
|
MapMode maPrePostMapMode;
|
2007-01-22 14:10:09 +00:00
|
|
|
public:
|
2008-08-19 23:26:16 +00:00
|
|
|
void PrePaint();
|
2007-01-22 14:10:09 +00:00
|
|
|
void DLPrePaint2(const Region& rRegion);
|
|
|
|
void DLPostPaint2();
|
2008-08-19 23:26:16 +00:00
|
|
|
const MapMode& getPrePostMapMode() const { return maPrePostMapMode; }
|
2007-01-22 14:10:09 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2006-11-14 14:07:32 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
virtual void Paint(const Rectangle &rRect);
|
|
|
|
sal_Bool IsPaintInProgress() const { return bPaintInProgress; }
|
2008-08-19 23:26:16 +00:00
|
|
|
bool IsDrawingLayerPaintInProgress() const { return 0 != mnPrePostPaintCount; }
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
//Benachrichtung, dass sich der sichtbare Bereich geaendert hat.
|
|
|
|
//VisArea wird neu gesetzt, anschliessend wird gescrollt.
|
|
|
|
//Das uebergebene Rect liegt auf Pixelgrenzen,
|
|
|
|
//um Pixelfehler beim Scrollen zu vermeiden.
|
|
|
|
virtual void VisPortChgd( const SwRect & );
|
|
|
|
sal_Bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser
|
|
|
|
void EnableSmooth( sal_Bool b ) { bEnableSmooth = b; }
|
|
|
|
|
|
|
|
const SwRect &VisArea() const { return aVisArea; }
|
|
|
|
//Es wird, wenn notwendig, soweit gescrollt, dass das
|
|
|
|
//uebergebene Rect im sichtbaren Ausschnitt liegt.
|
|
|
|
void MakeVisible( const SwRect & );
|
|
|
|
|
|
|
|
//Bei naechster Gelegenheit die neue Dokuemntgroesse an das UI weiterreichen.
|
2007-09-27 07:17:31 +00:00
|
|
|
void SizeChgNotify();
|
2000-09-18 16:15:01 +00:00
|
|
|
void UISizeNotify(); //Das weiterreichen der aktuellen groesse.
|
|
|
|
|
|
|
|
Point GetPagePos( sal_uInt16 nPageNum ) const;
|
|
|
|
|
|
|
|
sal_uInt16 GetNumPages(); //Anzahl der aktuellen Seiten Layout erfragen.
|
2002-03-15 10:47:59 +00:00
|
|
|
sal_Bool IsDummyPage( USHORT nPageNum ) const; // An empty page?
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
//Invalidierung der ersten Sichtbaren Seite fuer alle Shells im Ring.
|
|
|
|
void SetFirstVisPageInvalid();
|
|
|
|
|
|
|
|
SwRootFrm *GetLayout() const;
|
|
|
|
sal_Bool IsNewLayout() const; //Wurde das Layout geladen oder neu
|
|
|
|
//erzeugt?
|
|
|
|
|
2000-10-25 10:53:58 +00:00
|
|
|
Size GetDocSize() const;// erfrage die Groesse des Dokuments
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
void CalcLayout(); //Durchformatierung des Layouts erzwingen.
|
|
|
|
|
2000-10-25 10:53:58 +00:00
|
|
|
inline SwDoc *GetDoc() const { return pDoc; } //niemals 0.
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2006-08-14 14:38:24 +00:00
|
|
|
/** Provides access to the document setting interface
|
|
|
|
*/
|
|
|
|
const IDocumentSettingAccess* getIDocumentSettingAccess() const;
|
|
|
|
IDocumentSettingAccess* getIDocumentSettingAccess();
|
|
|
|
|
|
|
|
/** Provides access to the document device interface
|
|
|
|
*/
|
|
|
|
const IDocumentDeviceAccess* getIDocumentDeviceAccess() const;
|
|
|
|
IDocumentDeviceAccess* getIDocumentDeviceAccess();
|
|
|
|
|
|
|
|
/** Provides access to the document bookmark interface
|
|
|
|
*/
|
|
|
|
const IDocumentBookmarkAccess* getIDocumentBookmarkAccess() const;
|
|
|
|
IDocumentBookmarkAccess* getIDocumentBookmarkAccess();
|
|
|
|
|
|
|
|
/** Provides access to the document draw model interface
|
|
|
|
*/
|
|
|
|
const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const;
|
|
|
|
IDocumentDrawModelAccess* getIDocumentDrawModelAccess();
|
|
|
|
|
|
|
|
/** Provides access to the document redline interface
|
|
|
|
*/
|
|
|
|
const IDocumentRedlineAccess* getIDocumentRedlineAccess() const;
|
|
|
|
IDocumentRedlineAccess* getIDocumentRedlineAccess();
|
|
|
|
|
|
|
|
/** Provides access to the document layout interface
|
|
|
|
*/
|
|
|
|
const IDocumentLayoutAccess* getIDocumentLayoutAccess() const;
|
|
|
|
IDocumentLayoutAccess* getIDocumentLayoutAccess();
|
|
|
|
|
|
|
|
/** Provides access to the document fields administration interface
|
|
|
|
*/
|
|
|
|
const IDocumentFieldsAccess* getIDocumentFieldsAccess() const;
|
|
|
|
|
|
|
|
/** Provides access to the content operations interface
|
|
|
|
*/
|
|
|
|
IDocumentContentOperations* getIDocumentContentOperations();
|
|
|
|
|
|
|
|
/** Provides access to the document style pool interface
|
|
|
|
*/
|
|
|
|
IDocumentStylePoolAccess* getIDocumentStylePoolAccess();
|
|
|
|
|
|
|
|
/** Provides access to the document statistics interface
|
|
|
|
*/
|
|
|
|
const IDocumentStatistics* getIDocumentStatistics() const;
|
|
|
|
|
2007-05-22 15:22:29 +00:00
|
|
|
/** Provides access to the document undo/redo interface
|
|
|
|
*/
|
|
|
|
IDocumentUndoRedo* getIDocumentUndoRedoAccess();
|
|
|
|
|
2008-02-26 09:32:18 +00:00
|
|
|
// --> OD 2007-11-14 #i83479#
|
|
|
|
const IDocumentListItems* getIDocumentListItemsAccess() const;
|
|
|
|
const IDocumentOutlineNodes* getIDocumentOutlineNodesAccess() const;
|
|
|
|
// <--
|
|
|
|
|
2006-08-14 14:38:24 +00:00
|
|
|
// 1. GetRefDev: Either the printer or the virtual device from the doc
|
2003-04-01 08:52:21 +00:00
|
|
|
// 2. GetWin: Available if we not printing
|
2006-08-14 14:38:24 +00:00
|
|
|
// 3. GetOut: Printer, Window or Virtual device
|
2003-04-01 08:52:21 +00:00
|
|
|
OutputDevice& GetRefDev() const;
|
|
|
|
inline Window* GetWin() const { return pWin; }
|
|
|
|
inline OutputDevice* GetOut() const { return pOut; }
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
static inline sal_Bool IsLstEndAction() { return ViewShell::bLstAct; }
|
|
|
|
|
|
|
|
//Andern alle PageDescriptoren
|
|
|
|
void ChgAllPageOrientation( sal_uInt16 eOri );
|
|
|
|
void ChgAllPageSize( Size &rSz );
|
|
|
|
|
|
|
|
//Druckauftrag abwickeln.
|
2002-09-06 04:56:09 +00:00
|
|
|
// pPDFOut != Null is: do PDF Export (no printing!)
|
2005-03-23 10:51:14 +00:00
|
|
|
sal_Bool Prt( SwPrtOptions& rOptions, SfxProgress* pProgress,
|
|
|
|
OutputDevice* pPDFOut = NULL );
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
//"Drucken" fuer OLE 2.0
|
2003-03-27 14:45:43 +00:00
|
|
|
static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, SwPrtOptions& rOptions,
|
2000-09-18 16:15:01 +00:00
|
|
|
OutputDevice* pOleOut, const Rectangle& rRect );
|
|
|
|
|
2002-11-11 12:45:25 +00:00
|
|
|
// creates temporary doc with selected text for PDF export
|
2004-10-04 18:01:08 +00:00
|
|
|
SwDoc * CreatePrtDoc( SfxPrinter* pPrt, SfxObjectShellRef& );
|
2002-11-14 09:34:44 +00:00
|
|
|
SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
|
2002-11-11 12:45:25 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
//Wird intern fuer die Shell gerufen die Druckt. Formatiert die Seiten.
|
|
|
|
void CalcPagesForPrint( sal_uInt16 nMax, SfxProgress* pProgress = 0,
|
2006-03-16 11:25:50 +00:00
|
|
|
const String* pStr = NULL, ULONG nMergeAct = 0, ULONG nMergeCnt = 0 );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
//All about fields.
|
|
|
|
void UpdateFlds(sal_Bool bCloseDB = sal_False);
|
|
|
|
sal_Bool IsAnyFieldInDoc() const;
|
|
|
|
// update all charts, for that exists any table
|
|
|
|
void UpdateAllCharts();
|
|
|
|
sal_Bool HasCharts() const;
|
|
|
|
|
2003-10-15 08:53:56 +00:00
|
|
|
//
|
|
|
|
// DOCUMENT COMPATIBILITY FLAGS START
|
|
|
|
//
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
// Sollen Absatzabstaende addiert oder maximiert werden?
|
2006-08-14 14:38:24 +00:00
|
|
|
void SetParaSpaceMax( bool bNew );
|
|
|
|
|
|
|
|
// Sollen Absatzabstaende addiert oder maximiert werden?
|
|
|
|
void SetParaSpaceMaxAtPages( bool bNew );
|
2001-05-03 09:14:42 +00:00
|
|
|
|
|
|
|
// compatible behaviour of tabs
|
2006-08-14 14:38:24 +00:00
|
|
|
void SetTabCompat( bool bNew );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2008-01-10 11:29:12 +00:00
|
|
|
//#i24363# tab stops relative to indent
|
|
|
|
void SetTabsRelativeToIndent( bool bNew );
|
|
|
|
|
2003-10-15 08:53:56 +00:00
|
|
|
// font metric attribute "External Leading" should be considered
|
2006-08-14 14:38:24 +00:00
|
|
|
void SetAddExtLeading( bool bNew );
|
2003-10-15 08:53:56 +00:00
|
|
|
|
|
|
|
// formatting by virtual device or printer
|
2006-08-14 14:38:24 +00:00
|
|
|
void SetUseVirDev( bool nNew );
|
2003-10-15 08:53:56 +00:00
|
|
|
|
2004-03-23 10:24:11 +00:00
|
|
|
// OD 2004-02-16 #106629# - adding paragraph and table spacing at bottom
|
|
|
|
// of table cells
|
2006-08-14 14:38:24 +00:00
|
|
|
void SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells );
|
2004-03-23 10:24:11 +00:00
|
|
|
|
2004-02-26 15:58:59 +00:00
|
|
|
// OD 06.01.2004 #i11859# - former formatting of text lines with
|
|
|
|
// proportional line spacing or not
|
2006-08-14 14:38:24 +00:00
|
|
|
void SetUseFormerLineSpacing( bool _bUseFormerLineSpacing );
|
2004-02-26 15:58:59 +00:00
|
|
|
|
2004-03-31 14:06:34 +00:00
|
|
|
// OD 2004-03-12 #i11860# - former object positioning
|
2006-08-14 14:38:24 +00:00
|
|
|
void SetUseFormerObjectPositioning( bool _bUseFormerObjPos );
|
2004-03-31 14:06:34 +00:00
|
|
|
|
2004-08-02 12:59:09 +00:00
|
|
|
// OD 2004-05-05 #i28701#
|
2006-08-14 14:38:24 +00:00
|
|
|
void SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos );
|
2004-08-02 12:59:09 +00:00
|
|
|
|
2004-05-11 10:27:44 +00:00
|
|
|
// --> FME #108724#
|
2006-08-14 14:38:24 +00:00
|
|
|
void SetUseFormerTextWrapping( bool _bUseFormerTextWrapping );
|
2004-05-11 10:27:44 +00:00
|
|
|
|
2007-07-10 13:58:56 +00:00
|
|
|
// -> PB 2007-06-11 #i45491#
|
|
|
|
void SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak );
|
|
|
|
// <--
|
|
|
|
|
2003-10-15 08:53:56 +00:00
|
|
|
//
|
|
|
|
// DOCUMENT COMPATIBILITY FLAGS END
|
|
|
|
//
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
//Ruft den Idle-Formatierer des Layouts
|
|
|
|
void LayoutIdle();
|
|
|
|
|
|
|
|
inline const SwViewOption *GetViewOptions() const { return pOpt; }
|
|
|
|
void ApplyViewOptions( const SwViewOption &rOpt );
|
|
|
|
void SetUIOptions( const SwViewOption &rOpt );
|
|
|
|
void SetReadonlyOption(sal_Bool bSet); // Readonly-Bit d. ViewOptions setzen
|
2003-09-11 08:39:16 +00:00
|
|
|
void SetPDFExportOption(sal_Bool bSet); // set/reset PDF export mode
|
2000-09-18 16:15:01 +00:00
|
|
|
void SetPrtFormatOption(sal_Bool bSet); // PrtFormat-Bit d. ViewOptions setzen
|
2002-08-01 10:45:42 +00:00
|
|
|
void SetReadonlySelectionOption(sal_Bool bSet);//change the selection mode in readonly docs
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2002-11-01 12:23:37 +00:00
|
|
|
const SwAccessibilityOptions* GetAccessibilityOptions() const { return pAccOptions;}
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
static void SetShellRes( ShellResource* pRes ) { pShellRes = pRes; }
|
2007-09-27 07:17:31 +00:00
|
|
|
static ShellResource* GetShellRes();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-09-27 07:17:31 +00:00
|
|
|
static void SetCareWin( Window* pNew );
|
2000-10-17 08:25:31 +00:00
|
|
|
static Window* GetCareWin(ViewShell& rVSh)
|
2006-08-14 14:38:24 +00:00
|
|
|
{ return pCareWindow ? pCareWindow : CareChildWin(rVSh); }
|
2000-10-17 08:25:31 +00:00
|
|
|
static Window* CareChildWin(ViewShell& rVSh);
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
inline SfxViewShell *GetSfxViewShell() { return pSfxViewShell; }
|
|
|
|
inline void SetSfxViewShell(SfxViewShell *pNew) { pSfxViewShell = pNew; }
|
|
|
|
|
|
|
|
// Selektion der Draw ::com::sun::star::script::Engine geaendert
|
2007-09-27 07:17:31 +00:00
|
|
|
virtual void DrawSelChanged();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
// OD 12.12.2002 #103492#
|
|
|
|
SwPagePreviewLayout* PagePreviewLayout();
|
2002-12-02 06:50:35 +00:00
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
/** adjust view options for page preview
|
2002-12-02 06:50:35 +00:00
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
OD 09.01.2003 #i6467#
|
|
|
|
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.
|
2002-12-03 14:37:10 +00:00
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
@param _rPrintOptions
|
|
|
|
input parameter - constant reference to print options, to which the
|
|
|
|
view option will be adjusted.
|
2002-12-03 14:37:10 +00:00
|
|
|
*/
|
2003-03-27 14:45:43 +00:00
|
|
|
void AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions );
|
2002-12-06 15:12:04 +00:00
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
// print page/print preview
|
|
|
|
void PrintPreViewPage( SwPrtOptions& rOptions, sal_uInt16 nRowCol,
|
|
|
|
SfxProgress& rProgress,
|
|
|
|
const SwPagePreViewPrtData* = 0 );
|
2002-12-06 15:12:04 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
// Prospekt-Format drucken
|
2007-04-03 12:46:18 +00:00
|
|
|
void PrintProspect( SwPrtOptions&, SfxProgress& , BOOL bRTL);
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
sal_Bool IsViewLocked() const { return bViewLocked; }
|
|
|
|
void LockView( sal_Bool b ) { bViewLocked = b; }
|
|
|
|
|
|
|
|
inline void LockPaint();
|
|
|
|
void ImplLockPaint();
|
|
|
|
inline void UnlockPaint( sal_Bool bVirDev = sal_False );
|
|
|
|
void ImplUnlockPaint( sal_Bool bVirDev );
|
|
|
|
sal_Bool IsPaintLocked() const { return nLockPaint != 0; }
|
|
|
|
|
|
|
|
// Abfragen/Erzeugen DrawView + PageView
|
|
|
|
const sal_Bool HasDrawView() const;
|
|
|
|
void MakeDrawView();
|
|
|
|
|
|
|
|
//DrawView darf u.U. am UI benutzt werden.
|
|
|
|
SdrView *GetDrawView();
|
|
|
|
const SdrView *GetDrawView() const { return ((ViewShell*)this)->GetDrawView(); }
|
|
|
|
|
|
|
|
//sorge dafuer, das auf jedenfall die MarkListe aktuell ist (Bug 57153)
|
|
|
|
SdrView *GetDrawViewWithValidMarkList();
|
|
|
|
|
|
|
|
// erfrage den Attribut Pool
|
|
|
|
inline const SfxItemPool& GetAttrPool() const;
|
|
|
|
SfxItemPool& GetAttrPool();
|
|
|
|
|
|
|
|
sal_Bool IsPreView() const { return bPreView; }
|
|
|
|
|
|
|
|
sal_Bool IsFrameView() const { return bFrameView; }
|
|
|
|
void SetFrameView( const Size& rBrowseBorder )
|
2006-08-14 14:38:24 +00:00
|
|
|
{ bFrameView = sal_True; aBrowseBorder = rBrowseBorder; }
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
//Nimmt die notwendigen Invalidierungen vor,
|
|
|
|
//wenn sich der BrowdseModus aendert, bBrowseChgd == sal_True
|
|
|
|
//oder, im BrowseModus, wenn sich die Groessenverhaeltnisse
|
|
|
|
//aendern (bBrowseChgd == sal_False)
|
2007-09-27 07:17:31 +00:00
|
|
|
void CheckBrowseView( BOOL bBrowseChgd );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2008-02-19 12:35:47 +00:00
|
|
|
const Size& GetBrowseBorder() const;
|
|
|
|
sal_Int32 GetBrowseWidth() const;
|
2000-09-18 16:15:01 +00:00
|
|
|
void SetBrowseBorder( const Size& rNew );
|
|
|
|
|
2003-04-24 15:09:38 +00:00
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
|
2002-05-22 10:48:43 +00:00
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
// OD 15.01.2003 #103492# - change method signature due to new page preview
|
|
|
|
// functionality.
|
2002-05-22 10:48:43 +00:00
|
|
|
::com::sun::star::uno::Reference<
|
2003-04-24 15:09:38 +00:00
|
|
|
::com::sun::star::accessibility::XAccessible >
|
2003-03-27 14:45:43 +00:00
|
|
|
CreateAccessiblePreview();
|
2002-05-22 10:48:43 +00:00
|
|
|
|
2002-05-29 14:06:25 +00:00
|
|
|
void ShowPreViewSelection( sal_uInt16 nSelPage );
|
2002-05-16 06:56:53 +00:00
|
|
|
void InvalidateAccessibleFocus();
|
2002-02-20 17:33:01 +00:00
|
|
|
|
2002-05-06 11:11:40 +00:00
|
|
|
//apply Accessiblity options
|
|
|
|
void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
|
|
|
|
|
2006-02-01 13:19:33 +00:00
|
|
|
/** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
|
|
|
|
|
|
|
|
OD 2005-12-01 #i27138#
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
|
|
|
|
@param _pFromTxtFrm
|
|
|
|
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 _pToTxtFrm
|
|
|
|
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 SwTxtFrm* _pFromTxtFrm,
|
|
|
|
const SwTxtFrm* _pToTxtFrm );
|
|
|
|
|
|
|
|
/** invalidate text selection for paragraphs
|
|
|
|
|
|
|
|
OD 2005-12-12 #i27301#
|
|
|
|
|
|
|
|
@author OD
|
|
|
|
*/
|
|
|
|
void InvalidateAccessibleParaTextSelection();
|
|
|
|
|
2000-10-25 10:53:58 +00:00
|
|
|
ViewShell( ViewShell&, Window *pWin = 0, OutputDevice *pOut = 0,
|
2000-09-18 16:15:01 +00:00
|
|
|
long nFlags = 0 );
|
2000-10-25 10:53:58 +00:00
|
|
|
ViewShell( SwDoc& rDoc, Window *pWin,
|
2000-09-18 16:15:01 +00:00
|
|
|
const SwViewOption *pOpt = 0, OutputDevice *pOut = 0,
|
|
|
|
long nFlags = 0 );
|
|
|
|
virtual ~ViewShell();
|
|
|
|
|
2004-09-08 15:08:51 +00:00
|
|
|
// --> FME 2004-06-15 #i12836# enhanced pdf export
|
|
|
|
sal_Int32 GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const;
|
|
|
|
// <--
|
2006-08-14 14:38:24 +00:00
|
|
|
|
|
|
|
inline bool IsInConstructor() const { return mbInConstructor; }
|
2007-08-03 12:39:19 +00:00
|
|
|
|
|
|
|
// --> PB 2007-05-30 #146850#
|
|
|
|
static const BitmapEx& GetReplacementBitmap( bool bIsErrorState );
|
|
|
|
static void DeleteReplacementBitmaps();
|
|
|
|
// <--
|
2008-03-07 13:49:53 +00:00
|
|
|
|
|
|
|
const SwPostItMgr* GetPostItMgr() const { return (const_cast<ViewShell*>(this))->GetPostItMgr(); }
|
|
|
|
SwPostItMgr* GetPostItMgr();
|
2000-09-18 16:15:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//---- class CurrShell verwaltet den globalen ShellPointer -------------------
|
|
|
|
|
|
|
|
class CurrShell
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ViewShell *pPrev;
|
|
|
|
SwRootFrm *pRoot;
|
|
|
|
|
|
|
|
CurrShell( ViewShell *pNew );
|
|
|
|
~CurrShell();
|
|
|
|
};
|
|
|
|
|
|
|
|
inline void ViewShell::ResetInvalidRect()
|
|
|
|
{
|
2006-08-14 14:38:24 +00:00
|
|
|
aInvalidRect.Clear();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
2006-08-14 14:38:24 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
inline void ViewShell::StartAction()
|
|
|
|
{
|
|
|
|
if ( !nStartAction++ )
|
|
|
|
ImplStartAction();
|
|
|
|
}
|
|
|
|
inline void ViewShell::EndAction( const sal_Bool bIdleEnd )
|
|
|
|
{
|
|
|
|
if( 0 == (nStartAction - 1) )
|
|
|
|
ImplEndAction( bIdleEnd );
|
|
|
|
--nStartAction;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void ViewShell::LockPaint()
|
|
|
|
{
|
|
|
|
if ( !nLockPaint++ )
|
|
|
|
ImplLockPaint();
|
|
|
|
}
|
|
|
|
inline void ViewShell::UnlockPaint( sal_Bool bVirDev )
|
|
|
|
{
|
|
|
|
if ( 0 == --nLockPaint )
|
|
|
|
ImplUnlockPaint( bVirDev );
|
|
|
|
}
|
|
|
|
inline const SfxItemPool& ViewShell::GetAttrPool() const
|
|
|
|
{
|
|
|
|
return ((ViewShell*)this)->GetAttrPool();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //_VIEWSH_HXX
|