2006-07-26 14:50:43 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 19:42:24 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2006-07-26 14:50:43 +00:00
|
|
|
*
|
2008-04-10 19:42:24 +00:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2006-07-26 14:50:43 +00:00
|
|
|
*
|
2008-04-10 19:42:24 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2006-07-26 14:50:43 +00:00
|
|
|
*
|
2008-04-10 19:42:24 +00:00
|
|
|
* $RCSfile: view.hxx,v $
|
|
|
|
* $Revision: 1.59 $
|
2006-07-26 14:50:43 +00:00
|
|
|
*
|
2008-04-10 19:42:24 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2006-07-26 14:50:43 +00:00
|
|
|
*
|
2008-04-10 19:42:24 +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.
|
2006-07-26 14:50:43 +00:00
|
|
|
*
|
2008-04-10 19:42:24 +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).
|
2006-07-26 14:50:43 +00:00
|
|
|
*
|
2008-04-10 19:42:24 +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.
|
2006-07-26 14:50:43 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef _SWVIEW_HXX
|
|
|
|
#define _SWVIEW_HXX
|
|
|
|
|
|
|
|
#include <vcl/timer.hxx>
|
|
|
|
#include <vcl/field.hxx>
|
|
|
|
#include <sfx2/viewfac.hxx>
|
|
|
|
#include <sfx2/viewsh.hxx>
|
|
|
|
#include <sfx2/objsh.hxx> // SfxObjectShellRef <-> SV_DECL_REF(SfxObjectShell)
|
|
|
|
#include <svx/svxenum.hxx>
|
|
|
|
#include <svx/zoomitem.hxx>
|
|
|
|
#include "swdllapi.h"
|
|
|
|
#include <swtypes.hxx>
|
|
|
|
#include <shellid.hxx>
|
|
|
|
|
|
|
|
class SwBaseShell;
|
|
|
|
class Button;
|
|
|
|
class ImageButton;
|
|
|
|
class SwTxtFmtColl;
|
|
|
|
class SwPageDesc;
|
|
|
|
class SwFrmFmt;
|
|
|
|
class SwCharFmt;
|
|
|
|
class SwNumRule;
|
|
|
|
class SwViewOption;
|
|
|
|
class SwGlossaryHdl;
|
|
|
|
class SwDrawBase;
|
|
|
|
class SvxRuler;
|
|
|
|
class SvxLRSpaceItem;
|
|
|
|
class SwDocShell;
|
|
|
|
class SwScrollbar;
|
|
|
|
class PrintDialog;
|
|
|
|
class SvxVCBrowser;
|
|
|
|
class SvBorder;
|
|
|
|
class Ruler;
|
|
|
|
class OutlinerView;
|
|
|
|
class SvxSearchItem;
|
|
|
|
class SearchAttrItemList;
|
|
|
|
class SvxSearchDialog;
|
|
|
|
class SdrView;
|
|
|
|
class Dialog;
|
|
|
|
class SdrObject;
|
|
|
|
class SdrPageView;
|
|
|
|
class SwNaviImageButton;
|
|
|
|
class SwHlpImageButton;
|
|
|
|
class Outliner;
|
|
|
|
class SwView;
|
|
|
|
class SwEditWin;
|
|
|
|
class SwWrtShell;
|
|
|
|
class SwView_Impl;
|
|
|
|
class XSelectionObject;
|
|
|
|
struct SwSearchOptions;
|
|
|
|
class FmFormShell;
|
|
|
|
class CommandEvent;
|
|
|
|
class InsCaptionOpt;
|
|
|
|
class SvGlobalName;
|
|
|
|
class SvtAccessibilityOptions;
|
|
|
|
class SwPrtOptions;
|
|
|
|
class SwTransferable;
|
|
|
|
class SwMailMergeConfigItem;
|
|
|
|
class SwTxtNode; // #i23726#
|
|
|
|
struct SwPrintData;
|
|
|
|
class SwFormatClipboard;
|
|
|
|
struct SwConversionArgs;
|
|
|
|
class Graphic;
|
|
|
|
class GraphicFilter;
|
2008-02-19 12:57:20 +00:00
|
|
|
class SwPostItMgr;
|
2006-07-26 14:50:43 +00:00
|
|
|
|
|
|
|
namespace com{ namespace sun { namespace star {
|
|
|
|
namespace view{ class XSelectionSupplier; }
|
|
|
|
}}}
|
2006-11-22 09:27:41 +00:00
|
|
|
namespace sfx2 { class FileDialogHelper; }
|
2006-07-26 14:50:43 +00:00
|
|
|
|
|
|
|
const long nLeftOfst = -370;
|
|
|
|
const long nScrollX = 30;
|
|
|
|
const long nScrollY = 30;
|
|
|
|
|
|
|
|
#define MINZOOM 20
|
|
|
|
#define MAXZOOM 600
|
|
|
|
|
|
|
|
#define MAX_MARKS 5
|
|
|
|
|
|
|
|
#define CHILDWIN_LABEL 1
|
|
|
|
#define CHILDWIN_MAILMERGE 2
|
|
|
|
|
|
|
|
enum ShellModes
|
|
|
|
{
|
2007-09-27 11:14:01 +00:00
|
|
|
SHELL_MODE_TEXT,
|
|
|
|
SHELL_MODE_FRAME,
|
|
|
|
SHELL_MODE_GRAPHIC,
|
|
|
|
SHELL_MODE_OBJECT,
|
|
|
|
SHELL_MODE_DRAW,
|
|
|
|
SHELL_MODE_DRAW_CTRL,
|
|
|
|
SHELL_MODE_DRAW_FORM,
|
|
|
|
SHELL_MODE_DRAWTEXT,
|
|
|
|
SHELL_MODE_BEZIER,
|
|
|
|
SHELL_MODE_LIST_TEXT,
|
|
|
|
SHELL_MODE_TABLE_TEXT,
|
|
|
|
SHELL_MODE_TABLE_LIST_TEXT,
|
|
|
|
SHELL_MODE_MEDIA,
|
|
|
|
SHELL_MODE_EXTRUDED_CUSTOMSHAPE,
|
2008-02-19 12:57:20 +00:00
|
|
|
SHELL_MODE_FONTWORK,
|
|
|
|
SHELL_MODE_POSTIT
|
2006-07-26 14:50:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung: Anwendung einer Vorlage
|
|
|
|
--------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
struct SwApplyTemplate
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
SwTxtFmtColl* pTxtColl;
|
|
|
|
SwPageDesc* pPageDesc;
|
|
|
|
SwFrmFmt* pFrmFmt;
|
|
|
|
SwCharFmt* pCharFmt;
|
|
|
|
SwNumRule* pNumRule;
|
|
|
|
} aColl;
|
|
|
|
|
|
|
|
int eType;
|
|
|
|
USHORT nColor;
|
|
|
|
SwFormatClipboard* pFormatClipboard;
|
|
|
|
BOOL bUndo;
|
|
|
|
|
|
|
|
SwApplyTemplate() :
|
|
|
|
eType(0),
|
|
|
|
nColor(0),
|
|
|
|
pFormatClipboard(0),
|
|
|
|
bUndo(FALSE)
|
|
|
|
{
|
|
|
|
aColl.pTxtColl = 0;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
Beschreibung: Sicht auf ein Dokument
|
|
|
|
--------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
class SW_DLLPUBLIC SwView: public SfxViewShell
|
|
|
|
{
|
|
|
|
//Messehack (MA,MBA)
|
|
|
|
friend void lcl_SelectShellForDrop( SwView &rView );
|
|
|
|
|
|
|
|
friend class TestTemplateItem;
|
|
|
|
friend class SwHHCWrapper;
|
|
|
|
friend class SwHyphWrapper;
|
|
|
|
friend class SwView_Impl;
|
|
|
|
friend class SwClipboardChangeListener;
|
|
|
|
|
|
|
|
//suchen & ersetzen
|
|
|
|
static SvxSearchDialog *pSrchDlg;
|
|
|
|
static SvxSearchItem *pSrchItem;
|
|
|
|
|
|
|
|
static USHORT nInsertCtrlState;
|
|
|
|
static USHORT nWebInsertCtrlState;
|
|
|
|
static USHORT nInsertObjectCtrlState;
|
|
|
|
static USHORT nInsertFieldCtrlState;
|
|
|
|
static USHORT nMoveType; // fuer Buttons unter dem Scrollbar (viewmdi)
|
2007-09-27 11:14:01 +00:00
|
|
|
static USHORT nActMark; // aktuelle Sprungmarke fuer unbenannte Merker
|
2006-07-26 14:50:43 +00:00
|
|
|
|
|
|
|
static BOOL bExtra;
|
|
|
|
static BOOL bFound;
|
|
|
|
static BOOL bJustOpened;
|
|
|
|
|
|
|
|
static SearchAttrItemList* pSrchList;
|
|
|
|
static SearchAttrItemList* pReplList;
|
|
|
|
|
|
|
|
|
|
|
|
Timer aTimer; //Fuer verzoegerte ChgLnks waehrend
|
|
|
|
//einer Aktion
|
|
|
|
String aPageStr; //Statusanzeige, aktuelle Seite
|
|
|
|
String sSwViewData,
|
|
|
|
//and the new cursor position if the user double click in the PagePreView
|
|
|
|
sNewCrsrPos;
|
|
|
|
// to support keyboard the number of the page to go to can be set too
|
|
|
|
USHORT nNewPage;
|
|
|
|
|
|
|
|
Point aTabColFromDocPos; //Verschieben von Tabellenspalten aus
|
|
|
|
//aus dem Dokument heraus.
|
|
|
|
SwTxtNode * pNumRuleNodeFromDoc; // Moving indent of numrule #i23726#
|
|
|
|
|
|
|
|
Size aDocSz; // aktuelle Dokumentgroesse
|
|
|
|
Rectangle aVisArea; // sichtbarer Bereich
|
|
|
|
|
|
|
|
SwEditWin *pEditWin;
|
|
|
|
SwWrtShell *pWrtShell;
|
|
|
|
|
|
|
|
SfxShell *pShell; //aktuelle SubShell auf dem Dispatcher
|
|
|
|
FmFormShell *pFormShell; // DB-FormShell
|
|
|
|
|
|
|
|
SwView_Impl *pViewImpl; // Impl-Daten fuer UNO + Basic
|
|
|
|
|
|
|
|
|
|
|
|
SwScrollbar *pHScrollbar, // MDI Bedienelemente
|
|
|
|
*pVScrollbar;
|
|
|
|
|
2007-06-27 12:25:39 +00:00
|
|
|
Window *pScrollFill; // Dummy-Window zum Fuellen der rechten
|
2006-07-26 14:50:43 +00:00
|
|
|
// unteren Ecke, wenn beide Scrollbars
|
|
|
|
// aktiv sind
|
|
|
|
|
|
|
|
SvxRuler *pHRuler,
|
|
|
|
*pVRuler;
|
|
|
|
ImageButton *pTogglePageBtn;
|
|
|
|
|
|
|
|
SwHlpImageButton *pPageUpBtn,
|
|
|
|
*pPageDownBtn;
|
|
|
|
|
|
|
|
SwNaviImageButton *pNaviBtn;
|
|
|
|
SwGlossaryHdl *pGlosHdl; // Henkel Textbausteine
|
|
|
|
SwDrawBase *pDrawActual;
|
|
|
|
|
|
|
|
const SwFrmFmt *pLastTableFormat;
|
|
|
|
|
|
|
|
SwFormatClipboard *pFormatClipboard; //holds data for format paintbrush
|
|
|
|
|
2008-02-19 12:57:20 +00:00
|
|
|
SwPostItMgr *mpPostItMgr;
|
|
|
|
|
2006-07-26 14:50:43 +00:00
|
|
|
int nSelectionType;
|
|
|
|
|
|
|
|
static const int MASTERENUMCOMMANDS = 6;
|
|
|
|
|
|
|
|
String aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ];
|
|
|
|
|
|
|
|
// Aktueller Drawmode
|
|
|
|
USHORT nDrawSfxId;
|
|
|
|
String sDrawCustom; //some drawing types are marked with strings!
|
|
|
|
USHORT nFormSfxId;
|
|
|
|
USHORT nLastPasteDestination;
|
|
|
|
|
|
|
|
// save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin()
|
|
|
|
USHORT nLeftBorderDistance;
|
|
|
|
USHORT nRightBorderDistance;
|
|
|
|
|
|
|
|
BOOL bCenterCrsr : 1,
|
|
|
|
bTopCrsr : 1,
|
|
|
|
bAllwaysShowSel : 1,
|
|
|
|
bTabColFromDoc : 1,
|
|
|
|
bNumIndentFromDoc : 1, // #i23726#
|
|
|
|
bTabRowFromDoc : 1,
|
|
|
|
bSetTabColFromDoc : 1 ,
|
|
|
|
bSetTabRowFromDoc : 1,
|
|
|
|
bAttrChgNotified : 1,
|
|
|
|
bAttrChgNotifiedWithRegistrations : 1,
|
|
|
|
bVerbsActive : 1,
|
|
|
|
bDrawRotate : 1,
|
|
|
|
bDrawSelMode : 1,
|
|
|
|
bShowAtResize : 1,
|
|
|
|
bInOuterResizePixel : 1,
|
|
|
|
bInInnerResizePixel : 1,
|
|
|
|
bPasteState : 1,
|
|
|
|
bPasteSpecialState : 1,
|
|
|
|
bInMailMerge : 1,
|
|
|
|
bInDtor : 1, //detect destructor to prevent creating of sub shells while closing
|
|
|
|
bOldShellWasPagePreView : 1,
|
|
|
|
bMakeSelectionVisible : 1 // #b6330459# transport the bookmark selection
|
|
|
|
;
|
|
|
|
|
|
|
|
// Methoden fuers Suchen
|
|
|
|
// Suchkontext setzen
|
|
|
|
SW_DLLPRIVATE BOOL SearchAndWrap(BOOL bApi = FALSE);
|
|
|
|
SW_DLLPRIVATE BOOL SearchAll(USHORT* pFound = 0);
|
|
|
|
SW_DLLPRIVATE ULONG FUNC_Search( const SwSearchOptions& rOptions );
|
|
|
|
SW_DLLPRIVATE void Replace();
|
|
|
|
|
2007-08-30 15:04:15 +00:00
|
|
|
BOOL IsDocumentBorder();
|
2006-07-26 14:50:43 +00:00
|
|
|
|
|
|
|
SW_DLLPRIVATE BOOL IsTextTool() const;
|
|
|
|
|
|
|
|
// Bedienelemente verwalten anlegen
|
|
|
|
SW_DLLPRIVATE void CreateBtns();
|
|
|
|
SW_DLLPRIVATE DECL_LINK( BtnPage, Button * );
|
|
|
|
|
|
|
|
SW_DLLPRIVATE DECL_LINK( TimeoutHdl, Timer * );
|
|
|
|
SW_DLLPRIVATE DECL_LINK( UpdatePercentHdl, GraphicFilter* );
|
|
|
|
|
|
|
|
|
|
|
|
inline long GetXScroll() const;
|
|
|
|
inline long GetYScroll() const;
|
|
|
|
SW_DLLPRIVATE Point AlignToPixel(const Point& rPt) const;
|
|
|
|
SW_DLLPRIVATE void CalcPt( Point* pPt,const Rectangle& rRect,
|
|
|
|
USHORT nRangeX = USHRT_MAX,
|
|
|
|
USHORT nRangeY = USHRT_MAX);
|
|
|
|
|
|
|
|
SW_DLLPRIVATE BOOL GetPageScrollUpOffset(SwTwips& rOff) const;
|
|
|
|
SW_DLLPRIVATE BOOL GetPageScrollDownOffset(SwTwips& rOff) const;
|
|
|
|
|
|
|
|
// Scrollbar Movements
|
|
|
|
SW_DLLPRIVATE long PageUp();
|
|
|
|
SW_DLLPRIVATE long PageDown();
|
|
|
|
SW_DLLPRIVATE long PageUpCrsr(BOOL bSelect);
|
|
|
|
SW_DLLPRIVATE long PageDownCrsr(BOOL bSelect);
|
|
|
|
SW_DLLPRIVATE long PhyPageUp();
|
|
|
|
SW_DLLPRIVATE long PhyPageDown();
|
|
|
|
|
2007-09-27 11:14:01 +00:00
|
|
|
SW_DLLPRIVATE int _CreateScrollbar( BOOL bHori );
|
2006-07-26 14:50:43 +00:00
|
|
|
SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
|
|
|
|
SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
|
|
|
|
SW_DLLPRIVATE BOOL UpdateScrollbars();
|
|
|
|
SW_DLLPRIVATE void CalcVisArea( const Size &rPixelSz );
|
|
|
|
|
|
|
|
SW_DLLPRIVATE void CreatePageButtons(BOOL bShow);
|
|
|
|
|
|
|
|
// Linguistik-Funktionen
|
|
|
|
SW_DLLPRIVATE void HyphenateDocument();
|
|
|
|
SW_DLLPRIVATE BOOL IsDrawTextHyphenate();
|
|
|
|
SW_DLLPRIVATE void HyphenateDrawText();
|
|
|
|
SW_DLLPRIVATE void StartThesaurus();
|
|
|
|
|
|
|
|
// text conversion
|
|
|
|
SW_DLLPRIVATE void StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive );
|
|
|
|
|
|
|
|
// used for spell checking and text conversion
|
|
|
|
SW_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, BOOL bStartDone,
|
|
|
|
BOOL bEndDone, SwConversionArgs *pConvArgs = 0 );
|
|
|
|
SW_DLLPRIVATE void SpellEnd( SwConversionArgs *pConvArgs = 0 );
|
|
|
|
|
|
|
|
SW_DLLPRIVATE void HyphStart( SvxSpellArea eSpell );
|
|
|
|
SW_DLLPRIVATE BOOL CheckSpecialCntnt();
|
|
|
|
SW_DLLPRIVATE void SpellKontext(BOOL bOn = TRUE)
|
|
|
|
{ bCenterCrsr = bOn; bAllwaysShowSel = bOn; }
|
|
|
|
|
|
|
|
// Methoden fuers Printing
|
|
|
|
SW_DLLPRIVATE virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
|
|
|
|
SW_DLLPRIVATE virtual PrintDialog* CreatePrintDialog( Window* pParent );
|
|
|
|
SfxTabPage* CreatePrintOptionsPage( Window* pParent,
|
|
|
|
const SfxItemSet& rSet);
|
|
|
|
// fuer Readonly-Umschaltung
|
|
|
|
SW_DLLPRIVATE virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
|
|
|
|
SW_DLLPRIVATE void _CheckReadonlyState();
|
|
|
|
SW_DLLPRIVATE void _CheckReadonlySelection();
|
|
|
|
|
|
|
|
// Methode fuer PageDesc drehen
|
|
|
|
SW_DLLPRIVATE void SwapPageMargin(const SwPageDesc&, SvxLRSpaceItem& rLR);
|
|
|
|
|
|
|
|
SW_DLLPRIVATE void _SetZoom( const Size &rEditSz,
|
|
|
|
SvxZoomType eZoomType,
|
|
|
|
short nFactor = 100,
|
|
|
|
BOOL bViewOnly = FALSE);
|
2007-09-27 11:14:01 +00:00
|
|
|
SW_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, BOOL bInner );
|
2006-07-26 14:50:43 +00:00
|
|
|
|
|
|
|
SW_DLLPRIVATE void ShowAtResize();
|
|
|
|
|
|
|
|
SW_DLLPRIVATE virtual void Move();
|
|
|
|
|
|
|
|
SW_DLLPRIVATE BOOL InsertGraphicDlg( SfxRequest& );
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
SwView_Impl* GetViewImpl() {return pViewImpl;}
|
|
|
|
|
|
|
|
void ImpSetVerb( int nSelType );
|
|
|
|
|
|
|
|
int GetSelectionType() const { return nSelectionType; }
|
|
|
|
void SetSelectionType(int nSet) { nSelectionType = nSet;}
|
|
|
|
|
|
|
|
// fuer die SwWebView
|
|
|
|
void SetShell( SfxShell* pS ) { pShell = pS; }
|
|
|
|
void SetFormShell( FmFormShell* pSh ) { pFormShell = pSh; }
|
|
|
|
|
|
|
|
virtual void SelectShell();
|
|
|
|
|
|
|
|
virtual void Activate(BOOL);
|
|
|
|
virtual void Deactivate(BOOL);
|
|
|
|
virtual void InnerResizePixel( const Point &rOfs, const Size &rSize );
|
|
|
|
virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
|
|
|
|
virtual Size GetOptimalSizePixel() const;
|
|
|
|
|
|
|
|
void SetImageButtonColor(Color& rColor);
|
|
|
|
|
|
|
|
const SwFrmFmt* GetLastTblFrmFmt() const {return pLastTableFormat;}
|
|
|
|
void SetLastTblFrmFmt(const SwFrmFmt* pSet) {pLastTableFormat = pSet;}
|
|
|
|
|
|
|
|
// form letter execution
|
|
|
|
void GenerateFormLetter(BOOL bUseCurrentDocument);
|
|
|
|
|
2007-10-22 14:24:56 +00:00
|
|
|
using SfxShell::GetDispatcher;
|
|
|
|
|
2006-07-26 14:50:43 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
SFX_DECL_VIEWFACTORY(SwView);
|
2007-09-27 11:14:01 +00:00
|
|
|
SFX_DECL_INTERFACE(SW_VIEWSHELL)
|
2006-07-26 14:50:43 +00:00
|
|
|
TYPEINFO();
|
|
|
|
|
|
|
|
SfxDispatcher &GetDispatcher();
|
|
|
|
|
|
|
|
void GotFocus() const;
|
|
|
|
virtual SdrView* GetDrawView() const;
|
2007-04-25 13:48:32 +00:00
|
|
|
virtual sal_Bool HasUIFeature( sal_uInt32 nFeature );
|
2006-07-26 14:50:43 +00:00
|
|
|
virtual void ShowCursor( FASTBOOL bOn = TRUE );
|
|
|
|
virtual ErrCode DoVerb( long nVerb );
|
|
|
|
|
|
|
|
virtual USHORT SetPrinter( SfxPrinter* pNew,
|
2007-07-17 12:11:32 +00:00
|
|
|
USHORT nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
|
2006-07-26 14:50:43 +00:00
|
|
|
virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog,
|
2007-01-25 10:45:36 +00:00
|
|
|
BOOL bSilent, BOOL bIsAPI );
|
2006-07-26 14:50:43 +00:00
|
|
|
ShellModes GetShellMode();
|
|
|
|
|
|
|
|
com::sun::star::view::XSelectionSupplier* GetUNOObject();
|
|
|
|
|
|
|
|
String GetSelectionTextParam( BOOL bCompleteWords,
|
|
|
|
BOOL bEraseTrail );
|
|
|
|
virtual BOOL HasSelection( BOOL bText ) const;
|
|
|
|
virtual String GetSelectionText( BOOL bCompleteWords = FALSE );
|
|
|
|
virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
|
|
|
|
virtual void MarginChanged();
|
|
|
|
|
|
|
|
// Shell sofort wechseln -> fuer GetSelectionObject
|
|
|
|
void StopShellTimer();
|
|
|
|
|
|
|
|
inline SwWrtShell& GetWrtShell () const { return *pWrtShell; }
|
|
|
|
inline SwWrtShell* GetWrtShellPtr() const { return pWrtShell; }
|
|
|
|
|
|
|
|
inline SwEditWin &GetEditWin() { return *pEditWin; }
|
|
|
|
inline const SwEditWin &GetEditWin () const { return *pEditWin; }
|
|
|
|
|
|
|
|
#if defined WIN || defined WNT || defined UNX
|
|
|
|
void ScannerEventHdl( const ::com::sun::star::lang::EventObject& rEventObject );
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//Handler fuer Textbausteine an die Textshell rausreichen, gfs. anlegen
|
|
|
|
SwGlossaryHdl* GetGlosHdl();
|
|
|
|
|
|
|
|
inline const Rectangle& GetVisArea() const { return aVisArea; }
|
|
|
|
|
|
|
|
BOOL IsScroll(const Rectangle& rRect) const;
|
|
|
|
void Scroll( const Rectangle& rRect,
|
|
|
|
USHORT nRangeX = USHRT_MAX,
|
|
|
|
USHORT nRangeY = USHRT_MAX);
|
|
|
|
|
|
|
|
long SetVScrollMax(long lMax);
|
|
|
|
long SetHScrollMax(long lMax);
|
|
|
|
|
2007-09-27 11:14:01 +00:00
|
|
|
DECL_LINK( SpellError, LanguageType * );
|
2006-07-26 14:50:43 +00:00
|
|
|
BOOL ExecSpellPopup( const Point& rPt );
|
2007-01-02 15:53:33 +00:00
|
|
|
|
|
|
|
// SMARTTAGS
|
|
|
|
BOOL ExecSmartTagPopup( const Point& rPt );
|
|
|
|
|
2006-07-26 14:50:43 +00:00
|
|
|
BOOL ExecDrwTxtSpellPopup(const Point& rPt);
|
|
|
|
|
|
|
|
void SetTabColFromDocPos( const Point &rPt ) { aTabColFromDocPos = rPt; }
|
|
|
|
void SetTabColFromDoc( BOOL b ) { bTabColFromDoc = b; }
|
|
|
|
BOOL IsTabColFromDoc() const { return bTabColFromDoc; }
|
|
|
|
void SetTabRowFromDoc( BOOL b ) { bTabRowFromDoc = b; }
|
|
|
|
BOOL IsTabRowFromDoc() const { return bTabRowFromDoc; }
|
|
|
|
|
|
|
|
// -> #i23726#
|
|
|
|
void SetNumRuleNodeFromDoc( SwTxtNode * pNumRuleNode )
|
|
|
|
{ pNumRuleNodeFromDoc = pNumRuleNode; }
|
|
|
|
void SetNumIndentFromDoc(BOOL b) { bNumIndentFromDoc = b; }
|
|
|
|
BOOL IsNumIndentFromDoc() const { return NULL != pNumRuleNodeFromDoc; }
|
|
|
|
// <- #i23726#
|
|
|
|
|
|
|
|
void DocSzChgd( const Size& rNewSize );
|
|
|
|
const Size& GetDocSz() const { return aDocSz; }
|
|
|
|
virtual void SetVisArea( const Rectangle&, BOOL bUpdateScrollbar = TRUE);
|
|
|
|
void SetVisArea( const Point&, BOOL bUpdateScrollbar = TRUE);
|
|
|
|
void CheckVisArea();
|
|
|
|
|
|
|
|
static Dialog* GetSearchDialog();
|
|
|
|
|
|
|
|
static USHORT GetMoveType();
|
|
|
|
static void SetMoveType(USHORT nSet);
|
2007-07-12 09:50:55 +00:00
|
|
|
DECL_STATIC_LINK( SwView, MoveNavigationHdl, bool* ); // #i75416#
|
2006-07-26 14:50:43 +00:00
|
|
|
static void SetActMark(BYTE nSet);
|
|
|
|
|
|
|
|
BOOL HandleWheelCommands( const CommandEvent& );
|
|
|
|
|
|
|
|
// Rahmen einfuegen
|
|
|
|
void InsFrmMode(USHORT nCols);
|
|
|
|
|
|
|
|
void SetZoom( SvxZoomType eZoomType, short nFactor = 100, BOOL bViewOnly = FALSE);
|
|
|
|
virtual void SetZoomFactor( const Fraction &rX, const Fraction & );
|
|
|
|
|
2008-03-07 14:05:15 +00:00
|
|
|
void SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly = FALSE );
|
|
|
|
|
2006-07-26 14:50:43 +00:00
|
|
|
void ShowHScrollbar(sal_Bool bShow);
|
|
|
|
sal_Bool IsHScrollbarVisible()const;
|
|
|
|
|
|
|
|
void ShowVScrollbar(sal_Bool bShow);
|
|
|
|
sal_Bool IsVScrollbarVisible()const;
|
|
|
|
|
|
|
|
int CreateVLineal();
|
|
|
|
int KillVLineal();
|
|
|
|
int CreateTab();
|
|
|
|
int KillTab();
|
|
|
|
|
|
|
|
int StatVLineal() const { return ((Window*)pVRuler)->IsVisible(); }
|
|
|
|
void ChangeVLinealMetric(FieldUnit eUnit);
|
|
|
|
BOOL GetVLinealMetric(FieldUnit& rToFill) const;
|
|
|
|
|
|
|
|
int StatTab() const { return ((Window*)pHRuler)->IsVisible(); }
|
|
|
|
SvxRuler& GetHLineal() { return *pHRuler; }
|
|
|
|
SvxRuler& GetVLineal() { return *pVRuler; }
|
|
|
|
void InvalidateRulerPos();
|
|
|
|
void ChangeTabMetric(FieldUnit eUnit);
|
|
|
|
BOOL GetHLinealMetric(FieldUnit& rToFill) const;
|
|
|
|
|
|
|
|
// Handler
|
|
|
|
void Execute(SfxRequest&);
|
|
|
|
void ExecPageMove(SfxRequest&);
|
|
|
|
void ExecStyle(SfxRequest&);
|
|
|
|
void ExecLingu(SfxRequest&);
|
|
|
|
void ExecDataBase(SfxRequest&);
|
|
|
|
void ExecDlg(SfxRequest&);
|
|
|
|
void ExecDlgExt(SfxRequest&);
|
|
|
|
void ExecDBDlg(SfxRequest &);
|
|
|
|
void ExecColl(SfxRequest&);
|
|
|
|
void ExecutePrint(SfxRequest&);
|
|
|
|
void ExecDraw(SfxRequest&);
|
|
|
|
void ExecTabWin(SfxRequest&);
|
|
|
|
void ExecuteStatusLine(SfxRequest&);
|
|
|
|
DECL_LINK( ExecRulerClick, Ruler * );
|
|
|
|
void ExecSearch(SfxRequest&, BOOL bNoMessage = FALSE);
|
|
|
|
void ExecViewOptions(SfxRequest &);
|
|
|
|
|
|
|
|
void StateViewOptions(SfxItemSet &);
|
|
|
|
void StateSearch(SfxItemSet &);
|
|
|
|
void GetState(SfxItemSet&);
|
|
|
|
void StateStatusLine(SfxItemSet&);
|
|
|
|
|
|
|
|
|
|
|
|
// Funktionen fuer Drawing
|
|
|
|
void SetDrawFuncPtr(SwDrawBase* pFuncPtr);
|
2007-09-27 11:14:01 +00:00
|
|
|
inline SwDrawBase* GetDrawFuncPtr(/*BOOL bBuf = FALSE*/) const { return pDrawActual; }
|
2006-07-26 14:50:43 +00:00
|
|
|
void GetDrawState(SfxItemSet &rSet);
|
|
|
|
void ExitDraw();
|
|
|
|
inline BOOL IsDrawRotate() { return bDrawRotate; }
|
|
|
|
inline void FlipDrawRotate() { bDrawRotate = !bDrawRotate; }
|
|
|
|
inline BOOL IsDrawSelMode() { return bDrawSelMode; }
|
|
|
|
void SetSelDrawSlot();
|
|
|
|
inline void FlipDrawSelMode() { bDrawSelMode = !bDrawSelMode; }
|
|
|
|
void NoRotate(); // Rotate-Mode abschalten
|
|
|
|
BOOL EnterDrawTextMode(const Point& aDocPos);
|
|
|
|
void LeaveDrawCreate() { nDrawSfxId = nFormSfxId = USHRT_MAX; sDrawCustom.Erase();}
|
|
|
|
BOOL IsDrawMode() { return (nDrawSfxId != USHRT_MAX || nFormSfxId != USHRT_MAX); }
|
|
|
|
BOOL IsFormMode() const;
|
|
|
|
BOOL IsBezierEditMode();
|
|
|
|
BOOL AreOnlyFormsSelected() const;
|
|
|
|
BOOL HasDrwObj(SdrObject *pSdrObj) const;
|
|
|
|
BOOL HasOnlyObj(SdrObject *pSdrObj, UINT32 eObjInventor) const;
|
|
|
|
BOOL BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL,
|
|
|
|
Window* pWin=NULL, BOOL bIsNewObj=FALSE);
|
|
|
|
|
|
|
|
void StateTabWin(SfxItemSet&);
|
|
|
|
|
|
|
|
// Attribute haben sich geaendert
|
|
|
|
DECL_LINK( AttrChangedNotify, SwWrtShell * );
|
|
|
|
|
|
|
|
// form control has been activated
|
|
|
|
DECL_LINK( FormControlActivated, FmFormShell* );
|
|
|
|
|
|
|
|
// Links bearbeiten
|
|
|
|
void EditLinkDlg();
|
|
|
|
void AutoCaption(const USHORT nType, const SvGlobalName *pOleId = 0);
|
|
|
|
void InsertCaption(const InsCaptionOpt *pOpt);
|
|
|
|
|
|
|
|
// Async Aufruf durch Core
|
|
|
|
void UpdatePageNums(USHORT nPhyNum, USHORT nVirtNum, const String& rPgStr);
|
|
|
|
|
|
|
|
String GetPageStr(USHORT nPhyNum, USHORT nVirtNum, const String& rPgStr);
|
|
|
|
|
|
|
|
// Shell rausreichen
|
|
|
|
SfxShell *GetCurShell() { return pShell; }
|
|
|
|
SwDocShell *GetDocShell();
|
|
|
|
inline const SwDocShell *GetDocShell() const;
|
|
|
|
inline FmFormShell *GetFormShell() { return pFormShell; }
|
|
|
|
|
|
|
|
//damit in DToren der SubShells ggf. pShell zurueckgesetzt werden kann
|
|
|
|
void ResetSubShell() { pShell = 0; }
|
|
|
|
|
|
|
|
virtual void WriteUserData(String &, BOOL bBrowse = FALSE );
|
|
|
|
virtual void ReadUserData(const String &, BOOL bBrowse = FALSE );
|
|
|
|
virtual void ReadUserDataSequence ( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
|
|
|
|
virtual void WriteUserDataSequence ( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
|
|
|
|
|
|
|
|
void SetCrsrAtTop( BOOL bFlag, BOOL bCenter = FALSE )
|
|
|
|
{ bTopCrsr = bFlag, bCenterCrsr = bCenter; }
|
|
|
|
BOOL IsCrsrAtTop() const { return bTopCrsr; }
|
|
|
|
BOOL IsCrsrAtCenter() const { return bCenterCrsr; }
|
|
|
|
|
|
|
|
BOOL JumpToSwMark( const String& rMark );
|
|
|
|
|
|
|
|
long InsertDoc( USHORT nSlotId, const String& rFileName,
|
|
|
|
const String& rFilterName, INT16 nVersion = 0 );
|
|
|
|
|
2006-11-22 09:27:41 +00:00
|
|
|
void ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem );
|
|
|
|
long InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion );
|
|
|
|
DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper * );
|
|
|
|
|
2006-07-26 14:50:43 +00:00
|
|
|
// status methods for clipboard.
|
|
|
|
// Status changes now notified from the clipboard.
|
|
|
|
BOOL IsPasteAllowed();
|
|
|
|
BOOL IsPasteSpecialAllowed();
|
|
|
|
|
|
|
|
// Enable mail merge - mail merge field dialog enabled
|
|
|
|
void EnableMailMerge(BOOL bEnable = TRUE);
|
|
|
|
//apply Accessiblity options
|
|
|
|
void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
|
|
|
|
|
|
|
|
// get print options (SwPrtOptions)
|
|
|
|
static void MakeOptions( PrintDialog* pDlg, SwPrtOptions& rOpts,
|
2007-04-03 12:48:50 +00:00
|
|
|
BOOL* pPrtProspect, BOOL* pPrtProspect_RTL, BOOL bWeb, SfxPrinter* pPrt, SwPrintData* pData );
|
2006-07-26 14:50:43 +00:00
|
|
|
|
|
|
|
SwView(SfxViewFrame* pFrame, SfxViewShell*);
|
|
|
|
~SwView();
|
|
|
|
|
|
|
|
void NotifyDBChanged();
|
|
|
|
|
|
|
|
SfxObjectShellRef & GetTmpSelectionDoc();
|
|
|
|
SfxObjectShellRef & GetOrCreateTmpSelectionDoc();
|
|
|
|
|
|
|
|
void AddTransferable(SwTransferable& rTransferable);
|
|
|
|
|
|
|
|
// store MailMerge data while "Back to Mail Merge Wizard" FloatingWindow is active
|
|
|
|
// or to support printing
|
|
|
|
void SetMailMergeConfigItem(SwMailMergeConfigItem* pConfigItem, sal_uInt16 nRestart, sal_Bool bIsSource);
|
|
|
|
SwMailMergeConfigItem* GetMailMergeConfigItem();
|
|
|
|
sal_uInt16 GetMailMergeRestartPage() const;
|
|
|
|
sal_Bool IsMailMergeSourceView() const;
|
|
|
|
|
|
|
|
void ExecFormatPaintbrush(SfxRequest &);
|
|
|
|
void StateFormatPaintbrush(SfxItemSet &);
|
|
|
|
|
|
|
|
//public fuer D&D
|
|
|
|
int InsertGraphic( const String &rPath, const String &rFilter,
|
|
|
|
BOOL bLink = TRUE, GraphicFilter *pFlt = 0,
|
|
|
|
Graphic* pPreviewGrf = 0,
|
|
|
|
BOOL bRule = FALSE );
|
2008-02-19 12:57:20 +00:00
|
|
|
|
|
|
|
SwPostItMgr* GetPostItMgr() { return mpPostItMgr;}
|
2008-03-07 14:05:15 +00:00
|
|
|
const SwPostItMgr* GetPostItMgr() const { return mpPostItMgr;}
|
2006-07-26 14:50:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------- inline Methoden ----------------------
|
|
|
|
|
|
|
|
inline long SwView::GetXScroll() const
|
|
|
|
{
|
|
|
|
return aVisArea.GetWidth() * nScrollX / 100L;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline long SwView::GetYScroll() const
|
|
|
|
{
|
|
|
|
return aVisArea.GetHeight() * nScrollY / 100L;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline const SwDocShell *SwView::GetDocShell() const
|
|
|
|
{
|
|
|
|
return ((SwView*)this)->GetDocShell();
|
|
|
|
}
|
|
|
|
|
|
|
|
//***********************************************************
|
|
|
|
|
|
|
|
SfxTabPage* CreatePrintOptionsPage( Window *pParent,
|
|
|
|
const SfxItemSet &rOptions,
|
|
|
|
BOOL bPreview);
|
|
|
|
|
|
|
|
#endif
|