Files
libreoffice/sw/inc/viewsh.hxx

623 lines
22 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 16:15:01 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 16:15:01 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 16:15:01 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:15:01 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 16:15:01 +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
*
* 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
*
* 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 SW_VIEWSH_HXX
#define SW_VIEWSH_HXX
#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 <svl/svarray.hxx>
#include "swdllapi.h"
#include <swtypes.hxx>
#include <ring.hxx>
#include <swrect.hxx>
2011-04-25 22:51:51 +02:00
#include <boost/shared_ptr.hpp> // swmod 080115
#include <stack>
#include <vcl/mapmod.hxx>
2009-06-04 08:23:53 +00:00
#include <vcl/print.hxx>
2000-09-18 16:15:01 +00:00
namespace com { namespace sun { namespace star { namespace accessibility {
class XAccessible; } } } }
2000-09-18 16:15:01 +00:00
class SfxObjectShellRef;
2000-09-18 16:15:01 +00:00
class SwDoc;
class IDocumentSettingAccess;
class IDocumentDeviceAccess;
CWS-TOOLING: integrate CWS swrefactormarks2 2009-04-09 12:51:41 +0200 b_michaelsen r270689 : #i94949# cleaned up assertions after rebasing 2009-04-08 17:37:08 +0200 b_michaelsen r270658 : fixing sw/source/ui/utlui/makefile.mk 2009-04-07 17:56:54 +0200 b_michaelsen r270606 : added bookctrl.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-07 17:05:20 +0200 b_michaelsen r270603 : added crbm.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-02 23:44:38 +0200 b_michaelsen r270436 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@270033 (milestone: DEV300:m45) 2009-02-27 16:25:31 +0100 b_michaelsen r268606 : #i94949# fixed Windows buildbreaker 2009-02-25 18:01:13 +0100 b_michaelsen r268464 : #i94949# Bookmarktest document filter roundtrips 2009-02-24 18:23:55 +0100 b_michaelsen r268404 : #i94949# Bookmark unittests 2009-02-23 19:47:44 +0100 b_michaelsen r268370 : #i94949# added unittest for bookmarks 2009-02-23 12:22:07 +0100 b_michaelsen r268348 : #i94949# fixing CheckCrossReferences testcase 2009-02-20 18:12:50 +0100 b_michaelsen r268335 : #i94949# fixing SwXTextRange 2009-02-18 18:32:57 +0100 b_michaelsen r268252 : #i94949# deregistering DdeBookmarks on delete 2009-02-18 18:29:08 +0100 b_michaelsen r268251 : fixing dbgoutsw.cxx for debug builds 2009-02-16 18:42:43 +0100 b_michaelsen r267834 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@267171 (milestone: DEV300:m41) 2009-02-12 15:32:02 +0100 b_michaelsen r267667 : #i94949 fixed crossrefbookmark naming 2009-02-11 18:30:08 +0100 b_michaelsen r267624 : #94949# fixing bookmark navigation 2009-02-11 13:55:26 +0100 b_michaelsen r267599 : #i94949# fixed bookmark naming 2009-02-10 17:53:05 +0100 b_michaelsen r267571 : #i94949# renamed HasOtherMarkPos to IsExpanded 2009-02-10 17:23:01 +0100 b_michaelsen r267564 : #i94949# renamed ::sw::bookmark namespace to more fitting ::sw::mark 2009-02-10 16:16:32 +0100 b_michaelsen r267553 : #i94949# creating only CrossRefBookmark per Txtnode 2009-02-10 12:14:05 +0100 b_michaelsen r267547 : #i94949# fixed bookmark count in navigator 2009-02-09 19:12:18 +0100 b_michaelsen r267532 : #i94949# lcl_CopyBookmarks(..) - handle marks on boundaries correctly 2009-02-09 17:32:45 +0100 b_michaelsen r267524 : #i94949# setting the refobject of the DdeBookmark in Sin SwServerObject::SetDdeBookmark(..) 2009-02-09 17:22:15 +0100 b_michaelsen r267523 : #i94949# trying to harden SwServerObject 2009-02-09 16:47:32 +0100 b_michaelsen r267521 : #i94949# lcl_CopyBookmarks(..): try to get the source mark name, if possible 2009-02-09 16:05:42 +0100 b_michaelsen r267519 : #i94949# clearing the OtherMarkPos if PaM has no mark in repositionMark(..), swapping inverted bookmarks without hissing an assertion 2009-02-09 15:55:38 +0100 b_michaelsen r267518 : #i94949# checking for out-of-bounds in SwView::ExecuteStatusLine(..) 2009-02-09 15:23:47 +0100 b_michaelsen r267517 : #i94949# using an UNO_BOOKMARK in ui/dbui/dbinsdlg.cxx 2009-02-09 14:14:47 +0100 b_michaelsen r267514 : #i94949# IDocumentMarkAccess::GetType(..) asserts on unknown type 2009-02-09 14:04:25 +0100 b_michaelsen r267513 : #i94949# using rtl strings instead of tools-strings in CrossRefBookmarks 2009-02-09 13:55:01 +0100 b_michaelsen r267510 : #i94949# using empty string for UnoMark construction 2009-02-09 13:46:46 +0100 b_michaelsen r267509 : #i94949# removed superfluous #includes, removed superfluous member DdeBookmark::bGenerateName, initialized DdeBookmark::m_aRefObj removed superfluous local _FindItem::ClearObj 2009-02-06 14:38:37 +0100 b_michaelsen r267462 : #i94949# fixing FN_STAT_BOOKMARK dispatches 2009-02-05 18:05:07 +0100 b_michaelsen r267436 : #i94949# removing superfluous #includes 2009-02-04 15:51:31 +0100 b_michaelsen r267391 : fixing resync merge error 2009-02-02 19:39:55 +0100 b_michaelsen r267294 : #i94949# bookmark performance 2009-01-30 19:30:51 +0100 b_michaelsen r267229 : #i94949# throwing IllegalArgumentException, if appropriate 2009-01-30 19:29:56 +0100 b_michaelsen r267228 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:23:49 +0100 b_michaelsen r267227 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:16:06 +0100 b_michaelsen r267226 : #i94949# refactored lcl_FillBookmarkArray 2009-01-30 17:59:27 +0100 b_michaelsen r267222 : #i94949# removed superficial #include 2009-01-30 17:50:02 +0100 b_michaelsen r267220 : #i94949# SwXTextRange remembers its UNO bookmark 2009-01-29 20:19:58 +0100 b_michaelsen r267168 : #i94949# implemented IDocumentMarkAccess::findBookmark 2009-01-29 17:22:17 +0100 b_michaelsen r267162 : #i94949# implemented renameMark in Markmanager 2009-01-29 14:17:10 +0100 b_michaelsen r267134 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:21:54 +0100 b_michaelsen r267125 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:06:10 +0100 b_michaelsen r267120 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:00:09 +0100 b_michaelsen r267118 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 10:35:10 +0100 b_michaelsen r267101 : #i94949# renamed SetCrsrToBkmk to SetCrsrToMark, moving to start/end of doc if no more bookmarks can be found 2009-01-28 17:05:36 +0100 b_michaelsen r267070 : #i94949# fixed order in aProvNamesId in unocoll.cxx 2009-01-28 15:46:13 +0100 b_michaelsen r267063 : #i94949# documentation 2009-01-28 15:36:59 +0100 b_michaelsen r267062 : #i94949# removing superficial #include 2009-01-28 15:30:36 +0100 b_michaelsen r267061 : #i94949# basic code conventions 2009-01-28 11:14:30 +0100 b_michaelsen r267039 : #i94949# comparing to the actual name of the new mark 2009-01-26 15:22:25 +0100 b_michaelsen r266927 : #i94949# performance fixes 2009-01-14 21:16:56 +0100 b_michaelsen r266332 : #i94949# fixing linux x86-64 compiler warnings 2009-01-14 19:52:06 +0100 b_michaelsen r266331 : #i94949# fixing some compiler warnings 2008-12-15 13:04:49 +0100 b_michaelsen r265474 : #i94949# fixed microsoft compiler warnings 2008-12-12 18:26:02 +0100 b_michaelsen r265434 : #i94949# fixed pro platform buildbreakers 2008-12-11 17:51:24 +0100 b_michaelsen r265342 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@264807 (milestone: DEV300:m37) 2008-12-09 18:30:59 +0100 b_michaelsen r265134 : #i94949# fixed IDocumentMarkAccess::GetType for new mark inheritance tree 2008-12-09 16:56:26 +0100 b_michaelsen r265118 : #i94949# fixed deleteMark optimization 2008-12-09 14:55:58 +0100 b_michaelsen r265092 : #i94949# DdeLink and DdeBookmark 2008-12-05 18:28:05 +0100 b_michaelsen r264914 : #i94949# fixed InitDoc in bookmarks 2008-12-02 02:23:51 +0100 b_michaelsen r264649 : #i94949# removed obsolete naming proposal code in SwXTextRange, fixed navigator reminders to forget the oldest reminder when the pool is empty 2008-12-02 02:05:19 +0100 b_michaelsen r264648 : #i94949# using bisect search for delete 2008-12-02 01:58:16 +0100 b_michaelsen r264647 : #i94949# using bisect search for delete 2008-12-02 01:37:33 +0100 b_michaelsen r264646 : #i94949# using bisect search for delete 2008-12-02 01:03:29 +0100 b_michaelsen r264645 : #i94949# fixed deleteMark crash 2008-12-01 20:55:00 +0100 b_michaelsen r264638 : #i94949# removed crossrefs from ui enumerations 2008-12-01 15:48:12 +0100 b_michaelsen r264613 : #i94949# removed superfluous local functions 2008-12-01 15:01:19 +0100 b_michaelsen r264608 : #i94949# optimized insertion of new marks 2008-12-01 14:33:21 +0100 b_michaelsen r264603 : #i94949# simplified code finding Fieldmark for a position 2008-12-01 14:05:55 +0100 b_michaelsen r264598 : #i94949# fixed reverse travelling through marks, removed obsolete getUniqueMarkName() 2008-11-27 18:48:15 +0100 b_michaelsen r264515 : #i94949# fixed _SaveCntntIdx and friends 2008-11-27 15:59:49 +0100 b_michaelsen r264500 : #i94949# fix Mark position only in ctor 2008-11-27 15:52:28 +0100 b_michaelsen r264497 : #i94949# fixed Bug in SwXBookmark, was using pDoc too early 2008-11-26 14:54:22 +0100 b_michaelsen r264396 : #i94949# fixed documentation, simplified navigator reminder code 2008-11-24 20:45:51 +0100 b_michaelsen r264266 : #i94949# removed last obsolete getUniqueMarkName calls 2008-11-24 20:21:35 +0100 b_michaelsen r264265 : #i94949# fixed typo in IDocumentMarkAccess, removed obsolete getUniqueMarkName calls 2008-11-24 18:34:32 +0100 b_michaelsen r264264 : #i94949# repositioning of Marks, removed possibility to delete marks by name in the core, refactoring of navigator reminder generation 2008-11-21 14:08:49 +0100 b_michaelsen r264137 : #i94949# simplified makeMark 2008-11-21 12:07:09 +0100 b_michaelsen r264120 : #i94949# moved ShortName and KeyCode from IMark to IBookmark 2008-11-19 12:50:49 +0100 b_michaelsen r263981 : #i94949# starting refactoring of bookmark naming 2008-11-19 11:31:08 +0100 b_michaelsen r263972 : #i94949# getting rid of obsolete dynamic casts 2008-11-18 19:06:09 +0100 b_michaelsen r263795 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 17:50:18 +0100 b_michaelsen r263792 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 16:48:20 +0100 b_michaelsen r263783 : #i94949# removed methods from crsrsh which are already available directly via IDocumentMarkAccess 2008-11-18 11:31:35 +0100 b_michaelsen r263753 : #i94949# cleaning up mark code in crsrsh 2008-11-17 10:15:25 +0100 b_michaelsen r263705 : #i94949# removed possible integer overflow 2008-11-14 18:48:45 +0100 b_michaelsen r263695 : #i94949# management of mark names in MarkManager 2008-11-14 18:23:40 +0100 b_michaelsen r263693 : #i94949# using polymorphism to do mark-specific setup in SwDoc 2008-11-14 16:27:09 +0100 b_michaelsen r263684 : #i94949# got rid of makeCrossRefBookmark 2008-11-14 13:03:32 +0100 b_michaelsen r263674 : #i94949# refactored Correction methods 2008-11-13 12:27:55 +0100 b_michaelsen r263631 : #i94949# got rid of old-style tools assertions in new code 2008-11-12 16:58:16 +0100 b_michaelsen r263608 : #i94949# added assertion for unique names 2008-11-12 16:55:18 +0100 b_michaelsen r263607 : #i94949# maked XFormField deprecated 2008-11-12 13:04:29 +0100 b_michaelsen r263587 : #i94949# replaced IDocumentMarkAccess::GetType with simple dynamic_cast where possible 2008-11-11 18:45:53 +0100 b_michaelsen r263572 : #i94949# cleaned up SwHstryBookmark 2008-11-11 13:48:18 +0100 b_michaelsen r263557 : #i94949# removed dynamic_casts to SwModify by inheriting IMark from it 2008-11-11 11:26:28 +0100 b_michaelsen r263548 : #i94949# fixed SwXBookmark 2008-11-10 17:01:19 +0100 b_michaelsen r263529 : #i94949# fixed DdeBookmarks in clipboard 2008-11-10 16:44:52 +0100 b_michaelsen r263527 : #i94949# formatting 2008-11-10 16:29:16 +0100 b_michaelsen r263526 : #i94949# fixing unoobj.cxx 2008-11-10 16:23:50 +0100 b_michaelsen r263525 : #i94949# cleaning up crossrefbookmark.cxx/.hxx 2008-11-10 16:02:08 +0100 b_michaelsen r263524 : #i94949# Pdf Export should only generate 'real' bookmarks 2008-11-10 15:33:58 +0100 b_michaelsen r263521 : #i94949# removed const_casts 2008-11-10 15:12:06 +0100 b_michaelsen r263520 : #i94949# moved _DelBookmarks into MarksManager 2008-11-07 18:48:38 +0100 b_michaelsen r263480 : #i94949# using iterator interface 2008-11-07 18:41:46 +0100 b_michaelsen r263478 : #i94949# using iterator interface 2008-11-07 18:07:41 +0100 b_michaelsen r263477 : #i94949# using iterator interface 2008-11-07 17:54:41 +0100 b_michaelsen r263476 : #i94949# using iterator interface 2008-11-07 17:44:41 +0100 b_michaelsen r263475 : #i94949# moved correction methods into MarkManager 2008-11-06 18:47:28 +0100 b_michaelsen r263404 : #i94949# getting rid of superfluous const_casts 2008-11-06 17:58:01 +0100 b_michaelsen r263403 : #i94949# no more setting of mark positions outside of the core 2008-11-06 17:08:37 +0100 b_michaelsen r263401 : #i94949# removed setters from IMark 2008-11-06 13:55:25 +0100 b_michaelsen r263383 : #i94949 SwDoc does not implement IDocumentMarkAccess anymore 2008-11-04 18:17:03 +0100 b_michaelsen r263333 : #i94949# began removing IDocumentMarkAccess from SwDoc 2008-11-04 16:48:34 +0100 b_michaelsen r263330 : removing dead code (SwBitArray) found by mst 2008-11-04 16:29:32 +0100 b_michaelsen r263329 : removing dead code (SwBitArray) found by mst 2008-11-04 14:57:48 +0100 b_michaelsen r263326 : removing dead code (SwBitArray) found by mst 2008-11-04 14:50:18 +0100 b_michaelsen r263325 : #i94949# stricter typing in IDocumentMarkAccess 2008-10-24 15:16:27 +0200 b_michaelsen r262647 : #i94949# renamed ::sw::bookmark::SimpleMark to NavigatorReminder to fit the IDocumentMarkAccess enum 2008-10-24 15:10:10 +0200 b_michaelsen r262646 : #i94949# only 'real' bookmark implement IBookmark, Marks also get removed from m_vFieldmarks on delete/clear 2008-10-24 13:06:23 +0200 b_michaelsen r262636 : #i94949# Fieldmark tabnavigation 2008-10-23 12:16:36 +0200 b_michaelsen r262619 : #i94949# Fieldmark classes and filters 2008-10-22 13:17:18 +0200 b_michaelsen r262597 : #i94949# writer import fixes 2008-10-21 11:30:38 +0200 b_michaelsen r262565 : #i94949# renamed methods containing Bookmark in the generic IMark interface 2008-10-20 14:09:02 +0200 b_michaelsen r262318 : #i94949# fixed SwDoc::CorrRel 2008-10-16 22:45:13 +0200 b_michaelsen r262273 : #i94949 simplified Before/After methods 2008-10-16 21:40:57 +0200 b_michaelsen r262271 : #i94949 renamed SimpleMark to NavigatorReminder 2008-10-16 21:15:23 +0200 b_michaelsen r262270 : #i94949 using shared_ptr only in MarkManager 2008-10-16 17:46:37 +0200 b_michaelsen r262269 : #i94949# getFieldmarkBefore and getFieldmarkAfter 2008-10-16 17:12:13 +0200 b_michaelsen r262265 : #i94949# cleanup in crbm.cxx 2008-10-16 12:49:01 +0200 b_michaelsen r262257 : #i94949# fixed usage of invalid iterator, fixed invalid cast 2008-10-15 15:34:20 +0200 b_michaelsen r262239 : #i94949# added moved files 2008-10-15 15:26:45 +0200 b_michaelsen r262237 : #i94949# initial reimplementation of Bookmarks
2009-04-21 15:40:02 +00:00
class IDocumentMarkAccess;
class IDocumentDrawModelAccess;
class IDocumentRedlineAccess;
class IDocumentLayoutAccess;
class IDocumentFieldsAccess;
class IDocumentContentOperations;
class IDocumentStylePoolAccess;
class IDocumentStatistics;
class IDocumentUndoRedo;
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;
2009-08-14 13:56:56 +00:00
class SwPrintData;
2000-09-18 16:15:01 +00:00
class SwPagePreViewPrtData;
class Window;
class OutputDevice;
class SwLayIdle;
struct ShellResource;
class SwRegionRects;
class SwFrm;
class SvtAccessibilityOptions;
class SwPagePreviewLayout;
class SwTxtFrm;
class BitmapEx;
struct SwAccessibilityOptions;
class Region;
class SwPostItMgr;
class SdrPaintWindow;
class SwAccessibleMap;
2009-08-14 13:56:56 +00:00
namespace vcl
{
2009-08-19 07:32:06 +00:00
class OldStylePrintAdaptor;
2009-08-14 14:00:36 +00:00
}
2009-08-14 13:56:56 +00:00
2011-04-25 22:51:51 +02:00
// Define for flags needed in ctor or layers below.
// Currently the PreView flag is needed for DrawPage.
2000-09-18 16:15:01 +00:00
#define VSHELLFLAG_ISPREVIEW ((long)0x1)
#define VSHELLFLAG_SHARELAYOUT ((long)0x2)//swmod 080125 flag
typedef boost::shared_ptr<SwRootFrm> SwRootFrmPtr;
2009-08-14 13:56:56 +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;
2011-04-25 22:51:51 +02:00
// For setting visible area for page preview paint.
friend class SwPagePreviewLayout;
2011-04-25 22:51:51 +02:00
// Set SwVisArea in order to enable clean formatting before printing.
friend void SetSwVisArea( ViewShell *pSh, const SwRect &, sal_Bool bPDFExport = sal_False );
2000-09-18 16:15:01 +00:00
static BitmapEx* pReplaceBmp; // replaced display of still loaded images
static BitmapEx* pErrorBmp; // error display of missed images
2011-04-25 22:51:51 +02:00
static sal_Bool bLstAct; // sal_True if EndAction of last Shell
// i.e. if the EndActions of the other
// Shells on the document are through.
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
Point aPrtOffst; // Ofst for Printer,
// non-printable margin.
Size aBrowseBorder; // Border for frame documents.
SwRect aInvalidRect;
2000-09-18 16:15:01 +00:00
SfxViewShell *pSfxViewShell;
2011-04-25 22:51:51 +02:00
SwViewImp *pImp; // Core-internals of ViewShell.
// The pointer is never 0.
2000-09-18 16:15:01 +00:00
Window *pWin; // = 0 during printing or pdf export
OutputDevice *pOut; // Window, Printer, VirtDev, ...
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
SwViewOption *pOpt;
SwAccessibilityOptions* pAccOptions;
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
sal_Bool bDocSizeChgd :1; // For DocChgNotify(): Announce new DocSize
// at EndAction to DocMDI.
sal_Bool bPaintWorks :1; // Normal Painting if sal_True,
// remember Paint if sal_False.
sal_Bool bPaintInProgress :1; // Block any double paint.
sal_Bool bViewLocked :1; // Lock visible range;
// in this case MakeVisible is ineffectual.
sal_Bool bInEndAction :1; // Avoid problems, cf. viewsh.cxx.
sal_Bool bPreView :1; // If sal_True it is a PreView-ViewShell.
sal_Bool bFrameView :1; // If sal_True it is a (HTML-)Frame.
sal_Bool bEnableSmooth :1; // Disable SmoothScroll, e.g. for drag
// of scrollbars.
sal_Bool bEndActionByVirDev:1; // Paints from EndAction always via virtual device
sal_Bool bShowHeaderFooterSeparator;
sal_Bool bHeaderFooterEdit;
2011-04-25 22:51:51 +02:00
// (e.g. when browsing).
// boolean, indicating that class in in constructor.
bool mbInConstructor:1;
SdrPaintWindow* mpTargetPaintWindow;
OutputDevice* mpBufferedOut;
SwRootFrmPtr pLayout; //swmod 080116
2011-04-25 22:51:51 +02:00
// Initialization; called by the diverse constructors.
SW_DLLPRIVATE void Init( const SwViewOption *pNewOpt );
2000-09-18 16:15:01 +00:00
inline void ResetInvalidRect();
2011-04-25 22:51:51 +02:00
SW_DLLPRIVATE void Reformat(); // Invalidates complete Layout (ApplyViewOption).
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
SW_DLLPRIVATE void PaintDesktop( const SwRect & ); // Collect values for painting of desktop
// and calling.
// PaintDesktop split. This pars is also used by PreViewPage.
SW_DLLPRIVATE void _PaintDesktop( const SwRegionRects &rRegion );
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
SW_DLLPRIVATE sal_Bool CheckInvalidForPaint( const SwRect & ); // Direct Paint or rather
// trigger an action.
2000-09-18 16:15:01 +00:00
2009-08-14 13:56:56 +00:00
SW_DLLPRIVATE void PrepareForPrint( const SwPrintData &rOptions );
2000-09-18 16:15:01 +00:00
SW_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt );
2000-09-18 16:15:01 +00:00
protected:
2011-04-25 22:51:51 +02:00
static ShellResource* pShellRes; // Resources for the Shell.
static Window* pCareWindow; // Avoid this window.
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
SwRect aVisArea; // The modern version of VisArea.
SwDoc *pDoc; // The document; never 0.
2011-04-25 22:51:51 +02:00
sal_uInt16 nStartAction; // != 0 if at least one ::com::sun::star::chaos::Action is active.
sal_uInt16 nLockPaint; // != 0 if Paint is locked.
2000-09-18 16:15:01 +00:00
public:
TYPEINFO();
SwViewImp *Imp() { return pImp; }
const SwViewImp *Imp() const { return pImp; }
const SwNodes& GetNodes() const;
2011-04-25 22:51:51 +02:00
// After change of printer; by Doc.
void InitPrt( OutputDevice *pOutDev );
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
// Bracketing of actions belonging together.
2000-09-18 16:15:01 +00:00
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; }
2011-04-25 22:51:51 +02:00
// The ActionCount for all Shells is temporarily set to zero and then
// restored at the RootFrame via UNO.
2000-09-18 16:15:01 +00:00
void SetRestoreActions(sal_uInt16 nSet);
sal_uInt16 GetRestoreActions() const;
inline sal_Bool HasInvalidRect() const { return aInvalidRect.HasArea(); }
void ChgHyphenation() { Reformat(); }
void ChgNumberDigits();
2000-09-18 16:15:01 +00:00
sal_Bool AddPaintRect( const SwRect &rRect );
void InvalidateWindows( const SwRect &rRect );
//////////////////////////////////////////////////////////////////////////////
// #i72754# set of Pre/PostPaints with lock counter and initial target OutDev
protected:
std::stack<Region> mPrePostPaintRegions; // acts also as a lock counter (empty == not locked)
OutputDevice* mpPrePostOutDev;
MapMode maPrePostMapMode;
public:
void PrePaint();
void DLPrePaint2(const Region& rRegion);
CWS-TOOLING: integrate CWS aw061 2009-01-13 19:18:08 +0100 aw r266250 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-13 19:15:37 +0100 aw r266249 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-12 11:53:37 +0100 aw r266141 : #i97874# corrected include for TinderBox build 2009-01-08 17:48:23 +0100 aw r266029 : #i97874# extended SdrTextObj::ImpConvertAddText to copy needed attributes from original object 2009-01-08 14:59:08 +0100 aw r266015 : #i96350# added fallback to solid fill in shadow TabPage when no fill is defined to get a reasonable shadow preview 2009-01-08 12:40:49 +0100 aw r265995 : #i94832# remuved not needed E3DModifySceneSnapRectUpdater usages 2009-01-08 01:53:46 +0100 thb r265982 : #i94860# Blacklisting another ATI card/driver that causes blank screens 2009-01-08 01:46:38 +0100 thb r265981 : #i97853# Changed all gradient texture methods to use basegfx gradienttools. consolidated quite some code 2009-01-08 01:45:09 +0100 thb r265980 : #i97853# Added lerp methods, slight changes to have everything necessary contained in the ODFGradientInfo struct 2009-01-08 00:01:54 +0100 thb r265979 : #i97853# First part of the move - duplicated the stuff to basegfx 2009-01-06 16:23:09 +0100 aw r265930 : #i97197# Changed SwDrawVirtObj to work well with changed aOutRect and bBoundRectValid functionality 2009-01-06 12:41:24 +0100 aw r265909 : #i97784# corrected regression with connectors 2009-01-05 17:30:31 +0100 aw r265881 : #i97772# added missing usage of reduce factor for BitmapPrimitive creation 2009-01-05 12:24:01 +0100 aw r265863 : #i97321# added direct handling of HatchTexturePrimitive3D to not use it's decomposition for HitTest 2008-12-23 13:57:27 +0100 aw r265782 : #i96669# changed SW's FlyFrame paint fallback with primitives to use createLocalDecomposition since get2Decomposition does not have to stay virtual on the long run 2008-12-23 13:47:59 +0100 aw r265781 : #i96669# optimized impCreateTextPortionPrimitive to only create TextDecoratedPortionPrimitive2D when needed 2008-12-23 13:44:45 +0100 aw r265780 : #i96669# added B2DRange buffering to some primitive implementations where it is most necessary 2008-12-19 15:45:45 +0100 aw r265729 : #i96669# prepared TextPrimitives to work without DXarray, too. Had to rework impSplitSingleWords which gets active when a text portion has some word-wise decorations. Tested before committing 2008-12-19 15:44:16 +0100 aw r265728 : #i96669# corrected error in createPolygonFromUnitEllipseSegment which popped up when investigating 2008-12-18 17:45:58 +0100 aw r265708 : #i97149# added ActionChanged() call when visualisation object is modified 2008-12-18 15:34:42 +0100 aw r265695 : #i96598# corrected SdrPageObj's usage of aOutRect 2008-12-17 16:59:37 +0100 aw r265647 : #i96537# exchanged the marker for point number in string with correct one 2008-12-16 17:50:33 +0100 aw r265566 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:17 +0100 aw r265565 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:00 +0100 aw r265564 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:48 +0100 aw r265563 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:35 +0100 aw r265562 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer
2009-01-20 09:49:16 +00:00
void DLPostPaint2(bool bPaintFormLayer);
const MapMode& getPrePostMapMode() const { return maPrePostMapMode; }
//////////////////////////////////////////////////////////////////////////////
2000-09-18 16:15:01 +00:00
virtual void Paint(const Rectangle &rRect);
sal_Bool IsPaintInProgress() const { return bPaintInProgress; }
bool IsDrawingLayerPaintInProgress() const { return !mPrePostPaintRegions.empty(); }
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
// 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.
2000-09-18 16:15:01 +00:00
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; }
2011-04-25 22:51:51 +02:00
// If necessary scroll until passed Rect is situated in visible sector.
2000-09-18 16:15:01 +00:00
void MakeVisible( const SwRect & );
2011-04-25 22:51:51 +02:00
// At nearest occasion pass new document size to UI.
void SizeChgNotify();
2011-04-25 22:51:51 +02:00
void UISizeNotify(); // Passing of current size.
2000-09-18 16:15:01 +00:00
Point GetPagePos( sal_uInt16 nPageNum ) const;
2011-04-25 22:51:51 +02:00
sal_uInt16 GetNumPages(); // Ask count of current pages from layout.
sal_Bool IsDummyPage( sal_uInt16 nPageNum ) const; // An empty page?
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
// Invalidate first visible page for all Shells in ring.
2000-09-18 16:15:01 +00:00
void SetFirstVisPageInvalid();
2011-04-25 22:51:51 +02:00
SwRootFrm *GetLayout() const;// swmod 080116
sal_Bool IsNewLayout() const; // Has Layout been loaded or created?
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
Size GetDocSize() const; // Get document size.
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
void CalcLayout(); // Force complete formatting of layout.
2000-09-18 16:15:01 +00:00
sal_uInt16 GetPageCount() const;
const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
2011-04-25 22:51:51 +02:00
inline SwDoc *GetDoc() const { return pDoc; } //Never 0.
2000-09-18 16:15:01 +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
*/
CWS-TOOLING: integrate CWS swrefactormarks2 2009-04-09 12:51:41 +0200 b_michaelsen r270689 : #i94949# cleaned up assertions after rebasing 2009-04-08 17:37:08 +0200 b_michaelsen r270658 : fixing sw/source/ui/utlui/makefile.mk 2009-04-07 17:56:54 +0200 b_michaelsen r270606 : added bookctrl.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-07 17:05:20 +0200 b_michaelsen r270603 : added crbm.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4 2009-04-02 23:44:38 +0200 b_michaelsen r270436 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@270033 (milestone: DEV300:m45) 2009-02-27 16:25:31 +0100 b_michaelsen r268606 : #i94949# fixed Windows buildbreaker 2009-02-25 18:01:13 +0100 b_michaelsen r268464 : #i94949# Bookmarktest document filter roundtrips 2009-02-24 18:23:55 +0100 b_michaelsen r268404 : #i94949# Bookmark unittests 2009-02-23 19:47:44 +0100 b_michaelsen r268370 : #i94949# added unittest for bookmarks 2009-02-23 12:22:07 +0100 b_michaelsen r268348 : #i94949# fixing CheckCrossReferences testcase 2009-02-20 18:12:50 +0100 b_michaelsen r268335 : #i94949# fixing SwXTextRange 2009-02-18 18:32:57 +0100 b_michaelsen r268252 : #i94949# deregistering DdeBookmarks on delete 2009-02-18 18:29:08 +0100 b_michaelsen r268251 : fixing dbgoutsw.cxx for debug builds 2009-02-16 18:42:43 +0100 b_michaelsen r267834 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@267171 (milestone: DEV300:m41) 2009-02-12 15:32:02 +0100 b_michaelsen r267667 : #i94949 fixed crossrefbookmark naming 2009-02-11 18:30:08 +0100 b_michaelsen r267624 : #94949# fixing bookmark navigation 2009-02-11 13:55:26 +0100 b_michaelsen r267599 : #i94949# fixed bookmark naming 2009-02-10 17:53:05 +0100 b_michaelsen r267571 : #i94949# renamed HasOtherMarkPos to IsExpanded 2009-02-10 17:23:01 +0100 b_michaelsen r267564 : #i94949# renamed ::sw::bookmark namespace to more fitting ::sw::mark 2009-02-10 16:16:32 +0100 b_michaelsen r267553 : #i94949# creating only CrossRefBookmark per Txtnode 2009-02-10 12:14:05 +0100 b_michaelsen r267547 : #i94949# fixed bookmark count in navigator 2009-02-09 19:12:18 +0100 b_michaelsen r267532 : #i94949# lcl_CopyBookmarks(..) - handle marks on boundaries correctly 2009-02-09 17:32:45 +0100 b_michaelsen r267524 : #i94949# setting the refobject of the DdeBookmark in Sin SwServerObject::SetDdeBookmark(..) 2009-02-09 17:22:15 +0100 b_michaelsen r267523 : #i94949# trying to harden SwServerObject 2009-02-09 16:47:32 +0100 b_michaelsen r267521 : #i94949# lcl_CopyBookmarks(..): try to get the source mark name, if possible 2009-02-09 16:05:42 +0100 b_michaelsen r267519 : #i94949# clearing the OtherMarkPos if PaM has no mark in repositionMark(..), swapping inverted bookmarks without hissing an assertion 2009-02-09 15:55:38 +0100 b_michaelsen r267518 : #i94949# checking for out-of-bounds in SwView::ExecuteStatusLine(..) 2009-02-09 15:23:47 +0100 b_michaelsen r267517 : #i94949# using an UNO_BOOKMARK in ui/dbui/dbinsdlg.cxx 2009-02-09 14:14:47 +0100 b_michaelsen r267514 : #i94949# IDocumentMarkAccess::GetType(..) asserts on unknown type 2009-02-09 14:04:25 +0100 b_michaelsen r267513 : #i94949# using rtl strings instead of tools-strings in CrossRefBookmarks 2009-02-09 13:55:01 +0100 b_michaelsen r267510 : #i94949# using empty string for UnoMark construction 2009-02-09 13:46:46 +0100 b_michaelsen r267509 : #i94949# removed superfluous #includes, removed superfluous member DdeBookmark::bGenerateName, initialized DdeBookmark::m_aRefObj removed superfluous local _FindItem::ClearObj 2009-02-06 14:38:37 +0100 b_michaelsen r267462 : #i94949# fixing FN_STAT_BOOKMARK dispatches 2009-02-05 18:05:07 +0100 b_michaelsen r267436 : #i94949# removing superfluous #includes 2009-02-04 15:51:31 +0100 b_michaelsen r267391 : fixing resync merge error 2009-02-02 19:39:55 +0100 b_michaelsen r267294 : #i94949# bookmark performance 2009-01-30 19:30:51 +0100 b_michaelsen r267229 : #i94949# throwing IllegalArgumentException, if appropriate 2009-01-30 19:29:56 +0100 b_michaelsen r267228 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:23:49 +0100 b_michaelsen r267227 : #i94949# refactored lcl_FillBookmarkArray, comments, constness 2009-01-30 19:16:06 +0100 b_michaelsen r267226 : #i94949# refactored lcl_FillBookmarkArray 2009-01-30 17:59:27 +0100 b_michaelsen r267222 : #i94949# removed superficial #include 2009-01-30 17:50:02 +0100 b_michaelsen r267220 : #i94949# SwXTextRange remembers its UNO bookmark 2009-01-29 20:19:58 +0100 b_michaelsen r267168 : #i94949# implemented IDocumentMarkAccess::findBookmark 2009-01-29 17:22:17 +0100 b_michaelsen r267162 : #i94949# implemented renameMark in Markmanager 2009-01-29 14:17:10 +0100 b_michaelsen r267134 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:21:54 +0100 b_michaelsen r267125 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:06:10 +0100 b_michaelsen r267120 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 13:00:09 +0100 b_michaelsen r267118 : #i94949# cleanup in SwXBookmark, whitespace 2009-01-29 10:35:10 +0100 b_michaelsen r267101 : #i94949# renamed SetCrsrToBkmk to SetCrsrToMark, moving to start/end of doc if no more bookmarks can be found 2009-01-28 17:05:36 +0100 b_michaelsen r267070 : #i94949# fixed order in aProvNamesId in unocoll.cxx 2009-01-28 15:46:13 +0100 b_michaelsen r267063 : #i94949# documentation 2009-01-28 15:36:59 +0100 b_michaelsen r267062 : #i94949# removing superficial #include 2009-01-28 15:30:36 +0100 b_michaelsen r267061 : #i94949# basic code conventions 2009-01-28 11:14:30 +0100 b_michaelsen r267039 : #i94949# comparing to the actual name of the new mark 2009-01-26 15:22:25 +0100 b_michaelsen r266927 : #i94949# performance fixes 2009-01-14 21:16:56 +0100 b_michaelsen r266332 : #i94949# fixing linux x86-64 compiler warnings 2009-01-14 19:52:06 +0100 b_michaelsen r266331 : #i94949# fixing some compiler warnings 2008-12-15 13:04:49 +0100 b_michaelsen r265474 : #i94949# fixed microsoft compiler warnings 2008-12-12 18:26:02 +0100 b_michaelsen r265434 : #i94949# fixed pro platform buildbreakers 2008-12-11 17:51:24 +0100 b_michaelsen r265342 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@264807 (milestone: DEV300:m37) 2008-12-09 18:30:59 +0100 b_michaelsen r265134 : #i94949# fixed IDocumentMarkAccess::GetType for new mark inheritance tree 2008-12-09 16:56:26 +0100 b_michaelsen r265118 : #i94949# fixed deleteMark optimization 2008-12-09 14:55:58 +0100 b_michaelsen r265092 : #i94949# DdeLink and DdeBookmark 2008-12-05 18:28:05 +0100 b_michaelsen r264914 : #i94949# fixed InitDoc in bookmarks 2008-12-02 02:23:51 +0100 b_michaelsen r264649 : #i94949# removed obsolete naming proposal code in SwXTextRange, fixed navigator reminders to forget the oldest reminder when the pool is empty 2008-12-02 02:05:19 +0100 b_michaelsen r264648 : #i94949# using bisect search for delete 2008-12-02 01:58:16 +0100 b_michaelsen r264647 : #i94949# using bisect search for delete 2008-12-02 01:37:33 +0100 b_michaelsen r264646 : #i94949# using bisect search for delete 2008-12-02 01:03:29 +0100 b_michaelsen r264645 : #i94949# fixed deleteMark crash 2008-12-01 20:55:00 +0100 b_michaelsen r264638 : #i94949# removed crossrefs from ui enumerations 2008-12-01 15:48:12 +0100 b_michaelsen r264613 : #i94949# removed superfluous local functions 2008-12-01 15:01:19 +0100 b_michaelsen r264608 : #i94949# optimized insertion of new marks 2008-12-01 14:33:21 +0100 b_michaelsen r264603 : #i94949# simplified code finding Fieldmark for a position 2008-12-01 14:05:55 +0100 b_michaelsen r264598 : #i94949# fixed reverse travelling through marks, removed obsolete getUniqueMarkName() 2008-11-27 18:48:15 +0100 b_michaelsen r264515 : #i94949# fixed _SaveCntntIdx and friends 2008-11-27 15:59:49 +0100 b_michaelsen r264500 : #i94949# fix Mark position only in ctor 2008-11-27 15:52:28 +0100 b_michaelsen r264497 : #i94949# fixed Bug in SwXBookmark, was using pDoc too early 2008-11-26 14:54:22 +0100 b_michaelsen r264396 : #i94949# fixed documentation, simplified navigator reminder code 2008-11-24 20:45:51 +0100 b_michaelsen r264266 : #i94949# removed last obsolete getUniqueMarkName calls 2008-11-24 20:21:35 +0100 b_michaelsen r264265 : #i94949# fixed typo in IDocumentMarkAccess, removed obsolete getUniqueMarkName calls 2008-11-24 18:34:32 +0100 b_michaelsen r264264 : #i94949# repositioning of Marks, removed possibility to delete marks by name in the core, refactoring of navigator reminder generation 2008-11-21 14:08:49 +0100 b_michaelsen r264137 : #i94949# simplified makeMark 2008-11-21 12:07:09 +0100 b_michaelsen r264120 : #i94949# moved ShortName and KeyCode from IMark to IBookmark 2008-11-19 12:50:49 +0100 b_michaelsen r263981 : #i94949# starting refactoring of bookmark naming 2008-11-19 11:31:08 +0100 b_michaelsen r263972 : #i94949# getting rid of obsolete dynamic casts 2008-11-18 19:06:09 +0100 b_michaelsen r263795 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 17:50:18 +0100 b_michaelsen r263792 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators 2008-11-18 16:48:20 +0100 b_michaelsen r263783 : #i94949# removed methods from crsrsh which are already available directly via IDocumentMarkAccess 2008-11-18 11:31:35 +0100 b_michaelsen r263753 : #i94949# cleaning up mark code in crsrsh 2008-11-17 10:15:25 +0100 b_michaelsen r263705 : #i94949# removed possible integer overflow 2008-11-14 18:48:45 +0100 b_michaelsen r263695 : #i94949# management of mark names in MarkManager 2008-11-14 18:23:40 +0100 b_michaelsen r263693 : #i94949# using polymorphism to do mark-specific setup in SwDoc 2008-11-14 16:27:09 +0100 b_michaelsen r263684 : #i94949# got rid of makeCrossRefBookmark 2008-11-14 13:03:32 +0100 b_michaelsen r263674 : #i94949# refactored Correction methods 2008-11-13 12:27:55 +0100 b_michaelsen r263631 : #i94949# got rid of old-style tools assertions in new code 2008-11-12 16:58:16 +0100 b_michaelsen r263608 : #i94949# added assertion for unique names 2008-11-12 16:55:18 +0100 b_michaelsen r263607 : #i94949# maked XFormField deprecated 2008-11-12 13:04:29 +0100 b_michaelsen r263587 : #i94949# replaced IDocumentMarkAccess::GetType with simple dynamic_cast where possible 2008-11-11 18:45:53 +0100 b_michaelsen r263572 : #i94949# cleaned up SwHstryBookmark 2008-11-11 13:48:18 +0100 b_michaelsen r263557 : #i94949# removed dynamic_casts to SwModify by inheriting IMark from it 2008-11-11 11:26:28 +0100 b_michaelsen r263548 : #i94949# fixed SwXBookmark 2008-11-10 17:01:19 +0100 b_michaelsen r263529 : #i94949# fixed DdeBookmarks in clipboard 2008-11-10 16:44:52 +0100 b_michaelsen r263527 : #i94949# formatting 2008-11-10 16:29:16 +0100 b_michaelsen r263526 : #i94949# fixing unoobj.cxx 2008-11-10 16:23:50 +0100 b_michaelsen r263525 : #i94949# cleaning up crossrefbookmark.cxx/.hxx 2008-11-10 16:02:08 +0100 b_michaelsen r263524 : #i94949# Pdf Export should only generate 'real' bookmarks 2008-11-10 15:33:58 +0100 b_michaelsen r263521 : #i94949# removed const_casts 2008-11-10 15:12:06 +0100 b_michaelsen r263520 : #i94949# moved _DelBookmarks into MarksManager 2008-11-07 18:48:38 +0100 b_michaelsen r263480 : #i94949# using iterator interface 2008-11-07 18:41:46 +0100 b_michaelsen r263478 : #i94949# using iterator interface 2008-11-07 18:07:41 +0100 b_michaelsen r263477 : #i94949# using iterator interface 2008-11-07 17:54:41 +0100 b_michaelsen r263476 : #i94949# using iterator interface 2008-11-07 17:44:41 +0100 b_michaelsen r263475 : #i94949# moved correction methods into MarkManager 2008-11-06 18:47:28 +0100 b_michaelsen r263404 : #i94949# getting rid of superfluous const_casts 2008-11-06 17:58:01 +0100 b_michaelsen r263403 : #i94949# no more setting of mark positions outside of the core 2008-11-06 17:08:37 +0100 b_michaelsen r263401 : #i94949# removed setters from IMark 2008-11-06 13:55:25 +0100 b_michaelsen r263383 : #i94949 SwDoc does not implement IDocumentMarkAccess anymore 2008-11-04 18:17:03 +0100 b_michaelsen r263333 : #i94949# began removing IDocumentMarkAccess from SwDoc 2008-11-04 16:48:34 +0100 b_michaelsen r263330 : removing dead code (SwBitArray) found by mst 2008-11-04 16:29:32 +0100 b_michaelsen r263329 : removing dead code (SwBitArray) found by mst 2008-11-04 14:57:48 +0100 b_michaelsen r263326 : removing dead code (SwBitArray) found by mst 2008-11-04 14:50:18 +0100 b_michaelsen r263325 : #i94949# stricter typing in IDocumentMarkAccess 2008-10-24 15:16:27 +0200 b_michaelsen r262647 : #i94949# renamed ::sw::bookmark::SimpleMark to NavigatorReminder to fit the IDocumentMarkAccess enum 2008-10-24 15:10:10 +0200 b_michaelsen r262646 : #i94949# only 'real' bookmark implement IBookmark, Marks also get removed from m_vFieldmarks on delete/clear 2008-10-24 13:06:23 +0200 b_michaelsen r262636 : #i94949# Fieldmark tabnavigation 2008-10-23 12:16:36 +0200 b_michaelsen r262619 : #i94949# Fieldmark classes and filters 2008-10-22 13:17:18 +0200 b_michaelsen r262597 : #i94949# writer import fixes 2008-10-21 11:30:38 +0200 b_michaelsen r262565 : #i94949# renamed methods containing Bookmark in the generic IMark interface 2008-10-20 14:09:02 +0200 b_michaelsen r262318 : #i94949# fixed SwDoc::CorrRel 2008-10-16 22:45:13 +0200 b_michaelsen r262273 : #i94949 simplified Before/After methods 2008-10-16 21:40:57 +0200 b_michaelsen r262271 : #i94949 renamed SimpleMark to NavigatorReminder 2008-10-16 21:15:23 +0200 b_michaelsen r262270 : #i94949 using shared_ptr only in MarkManager 2008-10-16 17:46:37 +0200 b_michaelsen r262269 : #i94949# getFieldmarkBefore and getFieldmarkAfter 2008-10-16 17:12:13 +0200 b_michaelsen r262265 : #i94949# cleanup in crbm.cxx 2008-10-16 12:49:01 +0200 b_michaelsen r262257 : #i94949# fixed usage of invalid iterator, fixed invalid cast 2008-10-15 15:34:20 +0200 b_michaelsen r262239 : #i94949# added moved files 2008-10-15 15:26:45 +0200 b_michaelsen r262237 : #i94949# initial reimplementation of Bookmarks
2009-04-21 15:40:02 +00:00
const IDocumentMarkAccess* getIDocumentMarkAccess() const;
IDocumentMarkAccess* getIDocumentMarkAccess();
/** 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;
/** Provides access to the document undo/redo interface
*/
IDocumentUndoRedo const& GetIDocumentUndoRedo() const;
IDocumentUndoRedo & GetIDocumentUndoRedo();
const IDocumentListItems* getIDocumentListItemsAccess() const;
const IDocumentOutlineNodes* getIDocumentOutlineNodesAccess() const;
// 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
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; }
2011-04-25 22:51:51 +02:00
// Change of all page descriptors.
2000-09-18 16:15:01 +00:00
void ChgAllPageOrientation( sal_uInt16 eOri );
void ChgAllPageSize( Size &rSz );
2011-04-25 22:51:51 +02:00
// Printing of one page.
2009-06-04 08:23:53 +00:00
// bIsPDFExport == true is: do PDF Export (no printing!)
sal_Bool PrintOrPDFExport( OutputDevice *pOutDev,
SwPrintData const& rPrintData,
2009-09-04 14:41:56 +00:00
sal_Int32 nRenderer /* offset in vector of pages to print */ );
2011-04-25 22:51:51 +02:00
// Printing of one brochure page.
2009-08-14 13:56:56 +00:00
void PrintProspect( OutputDevice *pOutDev, const SwPrintData &rPrintData,
sal_Int32 nRenderer /* offset in vector of page pairs for prospect printing */ );
2011-04-25 22:51:51 +02:00
// Printing for OLE 2.0.
2009-08-14 13:56:56 +00:00
static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
2000-09-18 16:15:01 +00:00
OutputDevice* pOleOut, const Rectangle& rRect );
2011-04-25 22:51:51 +02:00
// Fill temporary doc with selected text for Print or PDF export.
SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
2011-04-25 22:51:51 +02:00
// Called internally for Shell. Formats pages.
void CalcPagesForPrint( sal_uInt16 nMax );
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
// All about fields.
2000-09-18 16:15:01 +00:00
void UpdateFlds(sal_Bool bCloseDB = sal_False);
sal_Bool IsAnyFieldInDoc() const;
2011-04-25 22:51:51 +02:00
// Update all charts, for that exists any table.
2000-09-18 16:15:01 +00:00
void UpdateAllCharts();
sal_Bool HasCharts() const;
// DOCUMENT COMPATIBILITY FLAGS START
2011-04-25 22:51:51 +02:00
// Add or maximize paragraph spacing?
void SetParaSpaceMax( bool bNew );
2011-04-25 22:51:51 +02:00
// Add or maximize paragraph spacing?
void SetParaSpaceMaxAtPages( bool bNew );
2001-05-03 09:14:42 +00:00
2011-04-25 22:51:51 +02:00
// Compatible behaviour of tabs.
void SetTabCompat( bool bNew );
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
// Font metric attribute "External Leading" should be considered.
void SetAddExtLeading( bool bNew );
2011-04-25 22:51:51 +02:00
// Formatting by virtual device or printer.
void SetUseVirDev( bool nNew );
2011-04-25 22:51:51 +02:00
// Adding paragraph and table spacing at bottom
// of table cells.
void SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells );
2011-04-25 22:51:51 +02:00
// Former formatting of text lines with
// proportional line spacing or not.
void SetUseFormerLineSpacing( bool _bUseFormerLineSpacing );
2011-04-25 22:51:51 +02:00
// Former object positioning.
void SetUseFormerObjectPositioning( bool _bUseFormerObjPos );
void SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos );
void SetUseFormerTextWrapping( bool _bUseFormerTextWrapping );
void SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak );
// DOCUMENT COMPATIBILITY FLAGS END
2011-04-25 22:51:51 +02:00
// Calls Idle-formatter of Layout.
2000-09-18 16:15:01 +00:00
void LayoutIdle();
inline const SwViewOption *GetViewOptions() const { return pOpt; }
virtual void ApplyViewOptions( const SwViewOption &rOpt );
2000-09-18 16:15:01 +00:00
void SetUIOptions( const SwViewOption &rOpt );
virtual void SetReadonlyOption(sal_Bool bSet); // Set readonly-bit of ViewOptions.
2011-04-25 22:51:51 +02:00
void SetPDFExportOption(sal_Bool bSet); // Set/reset PDF export mode.
void SetPrtFormatOption(sal_Bool bSet); // Set PrtFormat-Bit of ViewOptions.
void SetReadonlySelectionOption(sal_Bool bSet); // Change the selection mode in readonly docs.
2000-09-18 16:15:01 +00:00
const SwAccessibilityOptions* GetAccessibilityOptions() const { return pAccOptions;}
2000-09-18 16:15:01 +00:00
static void SetShellRes( ShellResource* pRes ) { pShellRes = pRes; }
static ShellResource* GetShellRes();
2000-09-18 16:15:01 +00:00
static void SetCareWin( Window* pNew );
static Window* GetCareWin(ViewShell& rVSh)
{ return pCareWindow ? pCareWindow : CareChildWin(rVSh); }
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; }
2011-04-25 22:51:51 +02:00
// Selection of Draw ::com::sun::star::script::Engine has been changed.
virtual void DrawSelChanged();
2000-09-18 16:15:01 +00:00
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 );
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; }
2011-04-25 22:51:51 +02:00
// Get/set DrawView and PageView.
2008-10-10 13:02:43 +00:00
sal_Bool HasDrawView() const;
2000-09-18 16:15:01 +00:00
void MakeDrawView();
2011-04-25 22:51:51 +02:00
// DrawView may be used at UI.
2000-09-18 16:15:01 +00:00
SdrView *GetDrawView();
const SdrView *GetDrawView() const { return ((ViewShell*)this)->GetDrawView(); }
2011-04-25 22:51:51 +02:00
// Take care that MarkList is up-to-date in any case (Bug 57153).
2000-09-18 16:15:01 +00:00
SdrView *GetDrawViewWithValidMarkList();
2011-04-25 22:51:51 +02:00
// Query attribute pool.
2000-09-18 16:15:01 +00:00
inline const SfxItemPool& GetAttrPool() const;
SfxItemPool& GetAttrPool();
sal_Bool IsPreView() const { return bPreView; }
sal_Bool IsFrameView() const { return bFrameView; }
void SetFrameView( const Size& rBrowseBorder )
{ bFrameView = sal_True; aBrowseBorder = rBrowseBorder; }
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
// Makes the necessary invalidations:
// If BrowseMode has changed bBrowseChgd == sal_True
// or bBrowseChgd == sal_False in BrowseMode
// if proportions have changed.
void CheckBrowseView( sal_Bool bBrowseChgd );
2000-09-18 16:15:01 +00:00
const Size& GetBrowseBorder() const;
sal_Int32 GetBrowseWidth() const;
2000-09-18 16:15:01 +00:00
void SetBrowseBorder( const Size& rNew );
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
2002-05-22 10:48:43 +00:00
::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible >
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();
2011-04-25 22:51:51 +02:00
// Apply Accessiblity options.
void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
/** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
@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
@author OD
*/
void InvalidateAccessibleParaTextSelection();
/** invalidate attributes for paragraphs and paragraph's characters
usage also for changes of the attributes of
paragraph's characters.
@author OD
@param rTxtFrm
input parameter - paragraph frame, whose attributes have changed
*/
void InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm );
SwAccessibleMap* GetAccessibleMap();
ViewShell( ViewShell&, Window *pWin = 0, OutputDevice *pOut = 0,
2000-09-18 16:15:01 +00:00
long nFlags = 0 );
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();
sal_Int32 GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const;
inline bool IsInConstructor() const { return mbInConstructor; }
static const BitmapEx& GetReplacementBitmap( bool bIsErrorState );
static void DeleteReplacementBitmaps();
const SwPostItMgr* GetPostItMgr() const { return (const_cast<ViewShell*>(this))->GetPostItMgr(); }
SwPostItMgr* GetPostItMgr();
void ToggleHeaderFooterEdit( );
sal_Bool IsHeaderFooterEdit( ) const { return bHeaderFooterEdit; }
sal_Bool IsShowHeaderFooterSeparator( ) { return bShowHeaderFooterSeparator; }
virtual void SetShowHeaderFooterSeparator( sal_Bool bShow ) { bShowHeaderFooterSeparator = bShow; }
2000-09-18 16:15:01 +00:00
};
2011-04-25 22:51:51 +02:00
//---- class CurrShell manages global ShellPointer -------------------
2000-09-18 16:15:01 +00:00
class CurrShell
{
public:
ViewShell *pPrev;
SwRootFrm *pRoot;
CurrShell( ViewShell *pNew );
~CurrShell();
};
inline void ViewShell::ResetInvalidRect()
{
aInvalidRect.Clear();
2000-09-18 16:15:01 +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 // SW_VIEWSH_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */