Files
libreoffice/sw/inc/viewsh.hxx

622 lines
23 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patches contributed by Oliver-Rainer Wittmann sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115 sw34bf06: #o12311627# use <rtl_random> methods to create unique ids for list styles and list ids http://svn.apache.org/viewvc?view=revision&revision=1172112 sw34bf06 #i114725#,#i115828# - method <SwDoc::ClearDoc()> - clear list structures completely http://svn.apache.org/viewvc?view=revision&revision=1172122 i#118572 - remove ui string and help content regarding usage of Java Mail in Writer's Mail Merge as Java Mail is not used. http://svn.apache.org/viewvc?view=revision&revision=1197035 Patches contributed by Mathias Bauer cws mba34issues01: #i117718#: provide filter name in case storage of medium does not allow to detect one http://svn.apache.org/viewvc?view=revision&revision=1172350 cws mba34issues01: #i117721#: directly provide parameters retrieved from SfxMedium http://svn.apache.org/viewvc?view=revision&revision=1172353 gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 cws mba34issues01: #i117723#: convert assertion into trace http://svn.apache.org/viewvc?view=revision&revision=1172355 cws mba34issues01: #i117699#: keep layout alive until swdoc dies http://svn.apache.org/viewvc?view=revision&revision=1172362 cws mba34issues01: #i117943#: missing color attributes in RTF clipboard http://svn.apache.org/viewvc?view=revision&revision=1172363 Patch contributed by Henning Brinkmann imported patch i#103878 http://svn.apache.org/viewvc?view=revision&revision=1172109 Patches contributed by Michael Stahl sw34bf06: #i117955#: WW8 export: disable storing of section breaks in endnotes http://svn.apache.org/viewvc?view=revision&revision=1172119 Patch contributed by imacat Fixed the Asian language work count. http://svn.apache.org/viewvc?view=revision&revision=1241345 Patch contributed by Pedro Giffuni i#20878 - Add comment with BZ issue for reference. http://svn.apache.org/viewvc?view=revision&revision=1244517 Patch contributed by Andre Fischer Do not add targets for junit tests when junit is disabled. http://svn.apache.org/viewvc?view=revision&revision=1241508 add writerperfect dependency.
2011-03-31 10:05:04 +02:00
/*
* 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 .
*/
#ifndef INCLUDED_SW_INC_VIEWSH_HXX
#define INCLUDED_SW_INC_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 "swdllapi.h"
#include <swtypes.hxx>
#include <ring.hxx>
#include <swrect.hxx>
#include <boost/shared_ptr.hpp>
#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 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;
class SwPagePreviewPrtData;
2000-09-18 16:15:01 +00:00
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
enum FrameControlType
{
PageBreak,
Header,
Footer
};
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)
typedef boost::shared_ptr<SwRootFrm> SwRootFrmPtr;
2009-08-14 13:56:56 +00:00
class SW_DLLPUBLIC SwViewShell : public Ring
2000-09-18 16:15:01 +00:00
{
friend void SetOutDev( SwViewShell *pSh, OutputDevice *pOut );
friend void SetOutDevAndWin( SwViewShell *pSh, OutputDevice *pOut,
2000-09-18 16:15:01 +00:00
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( SwViewShell *pSh, const SwRect & );
2000-09-18 16:15:01 +00:00
static BitmapEx* mpReplaceBmp; ///< replaced display of still loaded images
static BitmapEx* mpErrorBmp; ///< error display of missed images
static bool mbLstAct; // sal_True if EndAction of last Shell
2011-04-25 22:51:51 +02:00
// i.e. if the EndActions of the other
// Shells on the document are through.
2000-09-18 16:15:01 +00:00
Point maPrtOffst; // Ofst for Printer,
2011-04-25 22:51:51 +02:00
// non-printable margin.
Size maBrowseBorder; // Border for frame documents.
SwRect maInvalidRect;
SfxViewShell *mpSfxViewShell;
SwViewImp *mpImp; // Core-internals of SwViewShell.
2011-04-25 22:51:51 +02:00
// The pointer is never 0.
2000-09-18 16:15:01 +00:00
Window *mpWin; ///< = 0 during printing or pdf export
OutputDevice *mpOut; ///< 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 *mpOpt;
SwAccessibilityOptions* mpAccOptions;
2000-09-18 16:15:01 +00:00
bool mbDocSizeChgd :1; // For DocChgNotify(): Announce new DocSize
2011-04-25 22:51:51 +02:00
// at EndAction to DocMDI.
bool mbPaintWorks :1; // Normal Painting if sal_True,
2011-04-25 22:51:51 +02:00
// remember Paint if sal_False.
bool mbPaintInProgress :1; // Block any double paint.
bool mbViewLocked :1; // Lock visible range;
2011-04-25 22:51:51 +02:00
// in this case MakeVisible is ineffectual.
bool mbInEndAction :1; // Avoid problems, cf. viewsh.cxx.
bool mbPreview :1; // If sal_True it is a Preview-SwViewShell.
bool mbFrameView :1; // If sal_True it is a (HTML-)Frame.
bool mbEnableSmooth :1; // Disable SmoothScroll, e.g. for drag
2011-04-25 22:51:51 +02:00
// of scrollbars.
bool mbEndActionByVirDev:1; // Paints from EndAction always via virtual device
2011-04-25 22:51:51 +02:00
// (e.g. when browsing).
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)
2011-04-25 22:51:51 +02:00
// boolean, indicating that class in in constructor.
bool mbInConstructor:1;
bool mbTiledRendering:1; ///< Set if we are doing the tiled rendering (using PaintTile()).
SdrPaintWindow* mpTargetPaintWindow;
OutputDevice* mpBufferedOut;
SwRootFrmPtr mpLayout;
2011-04-25 22:51:51 +02:00
// Initialization; called by the diverse constructors.
SAL_DLLPRIVATE void Init( const SwViewOption *pNewOpt );
2000-09-18 16:15:01 +00:00
inline void ResetInvalidRect();
SAL_DLLPRIVATE void Reformat(); // Invalidates complete Layout (ApplyViewOption).
2000-09-18 16:15:01 +00:00
SAL_DLLPRIVATE void PaintDesktop( const SwRect & ); // Collect values for painting of desktop
2011-04-25 22:51:51 +02:00
// and calling.
// PaintDesktop split. This pars is also used by PreviewPage.
SAL_DLLPRIVATE void _PaintDesktop( const SwRegionRects &rRegion );
2000-09-18 16:15:01 +00:00
SAL_DLLPRIVATE bool CheckInvalidForPaint( const SwRect & ); // Direct Paint or rather
2011-04-25 22:51:51 +02:00
// trigger an action.
2000-09-18 16:15:01 +00:00
SAL_DLLPRIVATE void PrepareForPrint( const SwPrintData &rOptions );
2000-09-18 16:15:01 +00:00
SAL_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt );
2000-09-18 16:15:01 +00:00
protected:
static ShellResource* mpShellRes; ///< Resources for the Shell.
static Window* mpCareWindow; ///< Avoid this window.
2000-09-18 16:15:01 +00:00
SwRect maVisArea; ///< The modern version of VisArea.
SwDoc *mpDoc; ///< The document; never 0.
sal_uInt16 mnStartAction; ///< != 0 if at least one Action is active.
sal_uInt16 mnLockPaint; ///< != 0 if Paint is locked.
bool mbSelectAll; ///< Special select all mode: whole document selected, even if doc starts with table.
2000-09-18 16:15:01 +00:00
public:
TYPEINFO();
SwViewImp *Imp() { return mpImp; }
const SwViewImp *Imp() const { return mpImp; }
2000-09-18 16:15:01 +00:00
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 bool bIdleEnd = false );
void ImplEndAction( const bool bIdleEnd = false );
sal_uInt16 ActionCount() const { return mnStartAction; }
bool ActionPend() const { return mnStartAction != 0; }
bool IsInEndAction() const { return mbInEndAction; }
2000-09-18 16:15:01 +00:00
void SetEndActionByVirDev( bool b ) { mbEndActionByVirDev = b; }
bool IsEndActionByVirDev() { return mbEndActionByVirDev; }
2000-09-18 16:15:01 +00:00
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 bool HasInvalidRect() const { return maInvalidRect.HasArea(); }
2000-09-18 16:15:01 +00:00
void ChgHyphenation() { Reformat(); }
void ChgNumberDigits();
2000-09-18 16:15:01 +00:00
bool AddPaintRect( const SwRect &rRect );
2000-09-18 16:15:01 +00:00
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);
/** Paint tile.
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, int tilePosY, long tileWidth, long tileHeight);
bool IsPaintInProgress() const { return mbPaintInProgress; }
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 & );
bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser
void EnableSmooth( bool b ) { mbEnableSmooth = b; }
2000-09-18 16:15:01 +00:00
const SwRect& VisArea() const { return maVisArea; }
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.
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();
SwRootFrm *GetLayout() const;
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
virtual 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;
inline SwDoc *GetDoc() const { return mpDoc; } //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 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 mpWin; }
inline OutputDevice* GetOut() const { return mpOut; }
void SetWin(Window* win) { mpWin = win; }
static inline bool IsLstEndAction() { return SwViewShell::mbLstAct; }
2000-09-18 16:15:01 +00:00
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!)
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.
void UpdateFlds(bool bCloseDB = false);
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();
bool HasCharts() const;
2000-09-18 16:15:01 +00:00
// 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 mpOpt; }
virtual void ApplyViewOptions( const SwViewOption &rOpt );
2000-09-18 16:15:01 +00:00
void SetUIOptions( const SwViewOption &rOpt );
virtual void SetReadonlyOption(bool bSet); // Set readonly-bit of ViewOptions.
void SetPDFExportOption(bool bSet); // Set/reset PDF export mode.
void SetPrtFormatOption(bool bSet); // Set PrtFormat-Bit of ViewOptions.
void SetReadonlySelectionOption(bool bSet); // Change the selection mode in readonly docs.
2000-09-18 16:15:01 +00:00
const SwAccessibilityOptions* GetAccessibilityOptions() const { return mpAccOptions;}
static void SetShellRes( ShellResource* pRes ) { mpShellRes = pRes; }
static ShellResource* GetShellRes();
2000-09-18 16:15:01 +00:00
static void SetCareWin( Window* pNew );
static Window* GetCareWin(SwViewShell& rVSh)
{ return mpCareWindow ? mpCareWindow : CareChildWin(rVSh); }
static Window* CareChildWin(SwViewShell& rVSh);
2000-09-18 16:15:01 +00:00
inline SfxViewShell *GetSfxViewShell() { return mpSfxViewShell; }
inline void SetSfxViewShell(SfxViewShell *pNew) { mpSfxViewShell = pNew; }
2000-09-18 16:15:01 +00:00
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 );
bool IsViewLocked() const { return mbViewLocked; }
void LockView( bool b ) { mbViewLocked = b; }
2000-09-18 16:15:01 +00:00
inline void LockPaint();
void ImplLockPaint();
inline void UnlockPaint( bool bVirDev = false );
void ImplUnlockPaint( bool bVirDev );
bool IsPaintLocked() const { return mnLockPaint != 0; }
2000-09-18 16:15:01 +00:00
2011-04-25 22:51:51 +02:00
// Get/set DrawView and PageView.
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 ((SwViewShell*)this)->GetDrawView(); }
2000-09-18 16:15:01 +00:00
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();
bool IsPreview() const { return mbPreview; }
2000-09-18 16:15:01 +00:00
bool IsFrameView() const { return mbFrameView; }
2000-09-18 16:15:01 +00:00
void SetFrameView( const Size& rBrowseBorder )
{ mbFrameView = true; maBrowseBorder = 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( 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
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();
SwViewShell( SwViewShell&, Window *pWin = 0, OutputDevice *pOut = 0,
2000-09-18 16:15:01 +00:00
long nFlags = 0 );
SwViewShell( SwDoc& rDoc, Window *pWin,
2000-09-18 16:15:01 +00:00
const SwViewOption *pOpt = 0, OutputDevice *pOut = 0,
long nFlags = 0 );
virtual ~SwViewShell();
2000-09-18 16:15:01 +00:00
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<SwViewShell*>(this))->GetPostItMgr(); }
SwPostItMgr* GetPostItMgr();
/// Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags
void ToggleHeaderFooterEdit();
/// Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags
bool IsHeaderFooterEdit() const { return mbHeaderFooterEdit; }
bool IsShowHeaderFooterSeparator( FrameControlType eControl ) { return (eControl == Header)? mbShowHeaderSeparator: mbShowFooterSeparator; }
virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow ) { if ( eControl == Header ) mbShowHeaderSeparator = bShow; else mbShowFooterSeparator = bShow; }
bool IsSelectAll() { return mbSelectAll; }
2000-09-18 16:15:01 +00:00
};
// manages global ShellPointer
2000-09-18 16:15:01 +00:00
class CurrShell
{
public:
SwViewShell *pPrev;
2000-09-18 16:15:01 +00:00
SwRootFrm *pRoot;
CurrShell( SwViewShell *pNew );
2000-09-18 16:15:01 +00:00
~CurrShell();
};
inline void SwViewShell::ResetInvalidRect()
2000-09-18 16:15:01 +00:00
{
maInvalidRect.Clear();
2000-09-18 16:15:01 +00:00
}
inline void SwViewShell::StartAction()
2000-09-18 16:15:01 +00:00
{
if ( !mnStartAction++ )
2000-09-18 16:15:01 +00:00
ImplStartAction();
}
inline void SwViewShell::EndAction( const bool bIdleEnd )
2000-09-18 16:15:01 +00:00
{
if( 0 == (mnStartAction - 1) )
2000-09-18 16:15:01 +00:00
ImplEndAction( bIdleEnd );
--mnStartAction;
2000-09-18 16:15:01 +00:00
}
inline void SwViewShell::LockPaint()
2000-09-18 16:15:01 +00:00
{
if ( !mnLockPaint++ )
2000-09-18 16:15:01 +00:00
ImplLockPaint();
}
inline void SwViewShell::UnlockPaint( bool bVirDev )
2000-09-18 16:15:01 +00:00
{
if ( 0 == --mnLockPaint )
2000-09-18 16:15:01 +00:00
ImplUnlockPaint( bVirDev );
}
inline const SfxItemPool& SwViewShell::GetAttrPool() const
2000-09-18 16:15:01 +00:00
{
return ((SwViewShell*)this)->GetAttrPool();
2000-09-18 16:15:01 +00:00
}
#endif // INCLUDED_SW_INC_VIEWSH_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */