xref: /aoo41x/main/sc/source/ui/inc/tabview.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef SC_TABVIEW_HXX
28*cdf0e10cSrcweir #define SC_TABVIEW_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #include <vcl/scrbar.hxx>
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir //REMOVE	#ifndef SO2_DECL_SVINPLACECLIENT_DEFINED
33*cdf0e10cSrcweir //REMOVE	#define SO2_DECL_SVINPLACECLIENT_DEFINED
34*cdf0e10cSrcweir //REMOVE	SO2_DECL_REF(SvInPlaceClient)
35*cdf0e10cSrcweir //REMOVE	#endif
36*cdf0e10cSrcweir 
37*cdf0e10cSrcweir #include <sfx2/ipclient.hxx>
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir #include "viewutil.hxx"
40*cdf0e10cSrcweir #include "select.hxx"
41*cdf0e10cSrcweir 
42*cdf0e10cSrcweir class ScEditEngineDefaulter;
43*cdf0e10cSrcweir class ScGridWindow;
44*cdf0e10cSrcweir class ScOutlineWindow;
45*cdf0e10cSrcweir class ScRowBar;
46*cdf0e10cSrcweir class ScColBar;
47*cdf0e10cSrcweir class ScTabControl;
48*cdf0e10cSrcweir class ScTabViewShell;
49*cdf0e10cSrcweir class SfxPrinter;
50*cdf0e10cSrcweir class ScDrawView;
51*cdf0e10cSrcweir class SvBorder;
52*cdf0e10cSrcweir class FuPoor;
53*cdf0e10cSrcweir class Splitter;
54*cdf0e10cSrcweir class ScTabSplitter;
55*cdf0e10cSrcweir class SdrView;
56*cdf0e10cSrcweir class SdrObject;
57*cdf0e10cSrcweir class ScHintWindow;
58*cdf0e10cSrcweir class ScPageBreakData;
59*cdf0e10cSrcweir class ScHighlightRanges;
60*cdf0e10cSrcweir struct ChartSelectionInfo;
61*cdf0e10cSrcweir class SdrHdlList;
62*cdf0e10cSrcweir 
63*cdf0e10cSrcweir namespace com { namespace sun { namespace star {
64*cdf0e10cSrcweir namespace chart2 { namespace data {
65*cdf0e10cSrcweir     struct HighlightedRange;
66*cdf0e10cSrcweir }}}}}
67*cdf0e10cSrcweir 
68*cdf0e10cSrcweir #define	SPLIT_HANDLE_SIZE	3
69*cdf0e10cSrcweir #define SC_FORCEMODE_NONE	0xff
70*cdf0e10cSrcweir 
71*cdf0e10cSrcweir // ---------------------------------------------------------------------------
72*cdf0e10cSrcweir //		Hilfs - Fenster
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir class ScCornerButton : public Window
75*cdf0e10cSrcweir {
76*cdf0e10cSrcweir private:
77*cdf0e10cSrcweir 	ScViewData*		pViewData;
78*cdf0e10cSrcweir 	sal_Bool			bAdd;
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir protected:
81*cdf0e10cSrcweir 	virtual void	Paint( const Rectangle& rRect );
82*cdf0e10cSrcweir 	virtual void	Resize();
83*cdf0e10cSrcweir 	virtual void	MouseButtonDown( const MouseEvent& rMEvt );
84*cdf0e10cSrcweir public:
85*cdf0e10cSrcweir 					ScCornerButton( Window* pParent, ScViewData* pData, sal_Bool bAdditional );
86*cdf0e10cSrcweir 					~ScCornerButton();
87*cdf0e10cSrcweir 
88*cdf0e10cSrcweir 	virtual	void	StateChanged( StateChangedType nType );
89*cdf0e10cSrcweir 	virtual	void	DataChanged( const DataChangedEvent& rDCEvt );
90*cdf0e10cSrcweir };
91*cdf0e10cSrcweir 
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir // ---------------------------------------------------------------------------
94*cdf0e10cSrcweir 
95*cdf0e10cSrcweir class ScTabView
96*cdf0e10cSrcweir {
97*cdf0e10cSrcweir private:
98*cdf0e10cSrcweir 	Window*				pFrameWin;				// als erstes !!!
99*cdf0e10cSrcweir 	ScViewData			aViewData;				// muss ganz vorne stehen !
100*cdf0e10cSrcweir 
101*cdf0e10cSrcweir 	ScViewSelectionEngine*	pSelEngine;
102*cdf0e10cSrcweir 	ScViewFunctionSet		aFunctionSet;
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir 	ScHeaderSelectionEngine* pHdrSelEng;
105*cdf0e10cSrcweir 	ScHeaderFunctionSet		 aHdrFunc;
106*cdf0e10cSrcweir 
107*cdf0e10cSrcweir     SfxInPlaceClient*   pIPClient;
108*cdf0e10cSrcweir 
109*cdf0e10cSrcweir 	ScDrawView*			pDrawView;
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir 	Size				aFrameSize;				// wie bei DoResize uebergeben
112*cdf0e10cSrcweir 	Point				aBorderPos;
113*cdf0e10cSrcweir 
114*cdf0e10cSrcweir 	sal_Bool				bDrawSelMode;			// nur Zeichenobjekte selektieren ?
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir 	FuPoor* 			pDrawActual;
117*cdf0e10cSrcweir 	FuPoor*				pDrawOld;
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir 	ScGridWindow*		pGridWin[4];
120*cdf0e10cSrcweir 	ScColBar*			pColBar[2];
121*cdf0e10cSrcweir 	ScRowBar*			pRowBar[2];
122*cdf0e10cSrcweir 	ScOutlineWindow*	pColOutline[2];
123*cdf0e10cSrcweir 	ScOutlineWindow*	pRowOutline[2];
124*cdf0e10cSrcweir 	ScTabSplitter*		pHSplitter;
125*cdf0e10cSrcweir 	ScTabSplitter*		pVSplitter;
126*cdf0e10cSrcweir 	ScTabControl*		pTabControl;
127*cdf0e10cSrcweir 	ScrollBar			aVScrollTop;
128*cdf0e10cSrcweir 	ScrollBar			aVScrollBottom;			// anfangs sichtbar
129*cdf0e10cSrcweir 	ScrollBar			aHScrollLeft;			// anfangs sichtbar
130*cdf0e10cSrcweir 	ScrollBar			aHScrollRight;
131*cdf0e10cSrcweir 	ScCornerButton		aCornerButton;
132*cdf0e10cSrcweir 	ScCornerButton		aTopButton;
133*cdf0e10cSrcweir 	ScrollBarBox		aScrollBarBox;
134*cdf0e10cSrcweir 
135*cdf0e10cSrcweir 	ScHintWindow*		pInputHintWindow;		// Eingabemeldung bei Gueltigkeit
136*cdf0e10cSrcweir 
137*cdf0e10cSrcweir 	ScPageBreakData*	pPageBreakData;			// fuer Seitenumbruch-Modus
138*cdf0e10cSrcweir 	ScHighlightRanges*	pHighlightRanges;
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir     ScDocument*         pBrushDocument;         // cell formats for format paint brush
141*cdf0e10cSrcweir     SfxItemSet*         pDrawBrushSet;          // drawing object attributes for paint brush
142*cdf0e10cSrcweir     sal_Bool                bLockPaintBrush;        // keep for more than one use?
143*cdf0e10cSrcweir 
144*cdf0e10cSrcweir 	Timer				aScrollTimer;
145*cdf0e10cSrcweir 	ScGridWindow*		pTimerWindow;
146*cdf0e10cSrcweir 	MouseEvent			aTimerMEvt;
147*cdf0e10cSrcweir 
148*cdf0e10cSrcweir 	sal_uLong				nTipVisible;
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir 	sal_Bool				bDragging;				// fuer Scrollbars
151*cdf0e10cSrcweir 	long				nPrevDragPos;
152*cdf0e10cSrcweir 
153*cdf0e10cSrcweir 	sal_Bool				bIsBlockMode;           // Block markieren
154*cdf0e10cSrcweir 	sal_Bool				bBlockNeg;				// wird Markierung aufgehoben?
155*cdf0e10cSrcweir 	sal_Bool				bBlockCols;				// werden ganze Spalten markiert?
156*cdf0e10cSrcweir 	sal_Bool				bBlockRows;				// werden ganze Zeilen markiert?
157*cdf0e10cSrcweir 
158*cdf0e10cSrcweir 	SCCOL				nBlockStartX;
159*cdf0e10cSrcweir     SCCOL               nBlockStartXOrig;
160*cdf0e10cSrcweir 	SCCOL				nBlockEndX;
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir 	SCROW				nBlockStartY;
163*cdf0e10cSrcweir     SCROW               nBlockStartYOrig;
164*cdf0e10cSrcweir 	SCROW				nBlockEndY;
165*cdf0e10cSrcweir 
166*cdf0e10cSrcweir 	SCTAB				nBlockStartZ;
167*cdf0e10cSrcweir 	SCTAB				nBlockEndZ;
168*cdf0e10cSrcweir 
169*cdf0e10cSrcweir     SCCOL               nOldCurX;
170*cdf0e10cSrcweir     SCROW               nOldCurY;
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir     double              mfPendingTabBarWidth;       // Tab bar width relative to frame window width.
173*cdf0e10cSrcweir 
174*cdf0e10cSrcweir 	sal_Bool				bMinimized;
175*cdf0e10cSrcweir 	sal_Bool				bInUpdateHeader;
176*cdf0e10cSrcweir 	sal_Bool				bInActivatePart;
177*cdf0e10cSrcweir 	sal_Bool				bInZoomUpdate;
178*cdf0e10cSrcweir 	sal_Bool				bMoveIsShift;
179*cdf0e10cSrcweir 	sal_Bool				bNewStartIfMarking;
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir 	void			Init();
182*cdf0e10cSrcweir 
183*cdf0e10cSrcweir 	void			DoAddWin( ScGridWindow* pWin );
184*cdf0e10cSrcweir 
185*cdf0e10cSrcweir 	void			InitScrollBar( ScrollBar& rScrollBar, long nMaxVal );
186*cdf0e10cSrcweir 	DECL_LINK(		ScrollHdl, ScrollBar* );
187*cdf0e10cSrcweir 	DECL_LINK(		EndScrollHdl, ScrollBar* );
188*cdf0e10cSrcweir 
189*cdf0e10cSrcweir 	DECL_LINK(		SplitHdl, Splitter* );
190*cdf0e10cSrcweir 	void			DoHSplit(long nSplitPos);
191*cdf0e10cSrcweir 	void			DoVSplit(long nSplitPos);
192*cdf0e10cSrcweir 
193*cdf0e10cSrcweir 	DECL_LINK(		TimerHdl, Timer* );
194*cdf0e10cSrcweir 
195*cdf0e10cSrcweir 	void			UpdateVarZoom();
196*cdf0e10cSrcweir 
197*cdf0e10cSrcweir     void            UpdateVisibleRange();
198*cdf0e10cSrcweir 
199*cdf0e10cSrcweir 	static void		SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, sal_Bool bLayoutRTL );
200*cdf0e10cSrcweir 	static long		GetScrollBarPos( ScrollBar& rScroll, sal_Bool bLayoutRTL );
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir protected:
203*cdf0e10cSrcweir 	void			UpdateHeaderWidth( const ScVSplitPos* pWhich = NULL,
204*cdf0e10cSrcweir 										const SCROW* pPosY = NULL );
205*cdf0e10cSrcweir 
206*cdf0e10cSrcweir 	void			HideTip();
207*cdf0e10cSrcweir 	void			ShowRefTip();
208*cdf0e10cSrcweir 
209*cdf0e10cSrcweir 	void			ZoomChanged();
210*cdf0e10cSrcweir 	void			UpdateShow();
211*cdf0e10cSrcweir 	void			GetBorderSize( SvBorder& rBorder, const Size& rSize );
212*cdf0e10cSrcweir 
213*cdf0e10cSrcweir 	void			ResetDrawDragMode();
214*cdf0e10cSrcweir 	sal_Bool			IsDrawTextEdit() const;
215*cdf0e10cSrcweir 	void			DrawEnableAnim(sal_Bool bSet);
216*cdf0e10cSrcweir 	//HMHvoid			DrawShowMarkHdl(sal_Bool bShow);
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir 	void			MakeDrawView( sal_uInt8 nForceDesignMode = SC_FORCEMODE_NONE );
219*cdf0e10cSrcweir 
220*cdf0e10cSrcweir 	void			HideNoteMarker();
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir 	void			UpdateIMap( SdrObject* pObj );
223*cdf0e10cSrcweir 
224*cdf0e10cSrcweir public:
225*cdf0e10cSrcweir 					ScTabView( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell );
226*cdf0e10cSrcweir //UNUSED2009-05 	ScTabView( Window* pParent, const ScTabView& rScTabView, ScTabViewShell* pViewShell );
227*cdf0e10cSrcweir 					~ScTabView();
228*cdf0e10cSrcweir 
229*cdf0e10cSrcweir 	void			MakeDrawLayer();
230*cdf0e10cSrcweir 
231*cdf0e10cSrcweir 	void			HideListBox();
232*cdf0e10cSrcweir 
233*cdf0e10cSrcweir 	sal_Bool			HasHintWindow() const	{ return pInputHintWindow != NULL; }
234*cdf0e10cSrcweir 	void			RemoveHintWindow();
235*cdf0e10cSrcweir 	void			TestHintWindow();
236*cdf0e10cSrcweir 
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir 	DECL_LINK(		TabBarResize, void* );
239*cdf0e10cSrcweir     /** Sets an absolute tab bar width (in pixels). */
240*cdf0e10cSrcweir 	void			SetTabBarWidth( long nNewWidth );
241*cdf0e10cSrcweir     /** Sets a relative tab bar width.
242*cdf0e10cSrcweir         @param fRelTabBarWidth  Tab bar width relative to frame window width (0.0 ... 1.0). */
243*cdf0e10cSrcweir     void            SetRelTabBarWidth( double fRelTabBarWidth );
244*cdf0e10cSrcweir     /** Sets a relative tab bar width. Tab bar is resized again in next DoResize().
245*cdf0e10cSrcweir         @param fRelTabBarWidth  Tab bar width relative to frame window width (0.0 ... 1.0). */
246*cdf0e10cSrcweir     void            SetPendingRelTabBarWidth( double fRelTabBarWidth );
247*cdf0e10cSrcweir     /** Returns the current tab bar width in pixels. */
248*cdf0e10cSrcweir     long            GetTabBarWidth() const;
249*cdf0e10cSrcweir     /** Returns the current tab bar width relative to the frame window width (0.0 ... 1.0). */
250*cdf0e10cSrcweir     double          GetRelTabBarWidth() const;
251*cdf0e10cSrcweir     /** Returns the pending tab bar width relative to the frame window width (0.0 ... 1.0). */
252*cdf0e10cSrcweir     double          GetPendingRelTabBarWidth() const;
253*cdf0e10cSrcweir 
254*cdf0e10cSrcweir 	void			DoResize( const Point& rOffset, const Size& rSize, sal_Bool bInner = sal_False );
255*cdf0e10cSrcweir 	void			RepeatResize( sal_Bool bUpdateFix = sal_True );
256*cdf0e10cSrcweir 	void			UpdateFixPos();
257*cdf0e10cSrcweir 	Point			GetGridOffset() const;
258*cdf0e10cSrcweir 
259*cdf0e10cSrcweir 	sal_Bool			IsDrawSelMode() const 		{ return bDrawSelMode; }
260*cdf0e10cSrcweir 	void			SetDrawSelMode(sal_Bool bNew)	{ bDrawSelMode = bNew; }
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir 	void			SetDrawFuncPtr(FuPoor* pFuncPtr)	{ pDrawActual = pFuncPtr; }
263*cdf0e10cSrcweir 	void			SetDrawFuncOldPtr(FuPoor* pFuncPtr)	{ pDrawOld = pFuncPtr; }
264*cdf0e10cSrcweir 	FuPoor*			GetDrawFuncPtr()					{ return pDrawActual; }
265*cdf0e10cSrcweir 	FuPoor*			GetDrawFuncOldPtr()					{ return pDrawOld; }
266*cdf0e10cSrcweir 
267*cdf0e10cSrcweir 	void			DrawDeselectAll();
268*cdf0e10cSrcweir 	void			DrawMarkListHasChanged();
269*cdf0e10cSrcweir 	void			UpdateAnchorHandles();
270*cdf0e10cSrcweir //UNUSED2008-05  String          GetSelectedChartName() const;
271*cdf0e10cSrcweir 
272*cdf0e10cSrcweir 	ScPageBreakData* GetPageBreakData()		{ return pPageBreakData; }
273*cdf0e10cSrcweir 	ScHighlightRanges* GetHighlightRanges()	{ return pHighlightRanges; }
274*cdf0e10cSrcweir 
275*cdf0e10cSrcweir 	void			UpdatePageBreakData( sal_Bool bForcePaint = sal_False );
276*cdf0e10cSrcweir 
277*cdf0e10cSrcweir 	void			DrawMarkRect( const Rectangle& rRect );
278*cdf0e10cSrcweir 
279*cdf0e10cSrcweir 	ScViewData*			GetViewData() 		{ return &aViewData; }
280*cdf0e10cSrcweir 	const ScViewData*	GetViewData() const	{ return &aViewData; }
281*cdf0e10cSrcweir 
282*cdf0e10cSrcweir 	ScViewFunctionSet*		GetFunctionSet()	{ return &aFunctionSet; }
283*cdf0e10cSrcweir 	ScViewSelectionEngine*	GetSelEngine()		{ return pSelEngine; }
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir 	sal_Bool			SelMouseButtonDown( const MouseEvent& rMEvt );
286*cdf0e10cSrcweir 
287*cdf0e10cSrcweir 	ScDrawView*		GetScDrawView()			{ return pDrawView; }
288*cdf0e10cSrcweir 	SdrView*		GetSdrView();			// gegen CLOKs
289*cdf0e10cSrcweir 
290*cdf0e10cSrcweir 	sal_Bool			IsMinimized() const		{ return bMinimized; }
291*cdf0e10cSrcweir 
292*cdf0e10cSrcweir     // bSameTabButMoved = true if the same sheet as before is activated, used after moving/copying/inserting/deleting a sheet
293*cdf0e10cSrcweir 	void			TabChanged( bool bSameTabButMoved = false );
294*cdf0e10cSrcweir 	void			SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool bAll );
295*cdf0e10cSrcweir 	SC_DLLPUBLIC void            RefreshZoom();
296*cdf0e10cSrcweir 	void			SetPagebreakMode( sal_Bool bSet );
297*cdf0e10cSrcweir 
298*cdf0e10cSrcweir 	void			UpdateLayerLocks();
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir 	void			UpdateDrawTextOutliner();
301*cdf0e10cSrcweir 	void			DigitLanguageChanged();
302*cdf0e10cSrcweir 
303*cdf0e10cSrcweir 	void			UpdateInputLine();
304*cdf0e10cSrcweir 
305*cdf0e10cSrcweir 	void			InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType,
306*cdf0e10cSrcweir 									sal_Bool bPaint = sal_True );
307*cdf0e10cSrcweir 	void			DoneRefMode( sal_Bool bContinue = sal_False );
308*cdf0e10cSrcweir 	void			UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ );
309*cdf0e10cSrcweir 	void			StopRefMode();
310*cdf0e10cSrcweir 
311*cdf0e10cSrcweir //UNUSED2008-05  void            EndSelection();
312*cdf0e10cSrcweir 	void			StopMarking();
313*cdf0e10cSrcweir 	void			FakeButtonUp( ScSplitPos eWhich );
314*cdf0e10cSrcweir 
315*cdf0e10cSrcweir 	Window*			GetActiveWin();
316*cdf0e10cSrcweir 	Window*			GetWindowByPos( ScSplitPos ePos );
317*cdf0e10cSrcweir 
318*cdf0e10cSrcweir 	ScSplitPos		FindWindow( Window* pWindow ) const;
319*cdf0e10cSrcweir 
320*cdf0e10cSrcweir 	void			SetActivePointer( const Pointer& rPointer );
321*cdf0e10cSrcweir //UNUSED2008-05  void            SetActivePointer( const ResId& rId );
322*cdf0e10cSrcweir 
323*cdf0e10cSrcweir 	void			ActiveGrabFocus();
324*cdf0e10cSrcweir //UNUSED2008-05  void            ActiveCaptureMouse();
325*cdf0e10cSrcweir //UNUSED2008-05  void			ActiveReleaseMouse();
326*cdf0e10cSrcweir //UNUSED2008-05  Point           ActivePixelToLogic( const Point& rDevicePoint );
327*cdf0e10cSrcweir 
328*cdf0e10cSrcweir 	void			ClickCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bControl );
329*cdf0e10cSrcweir 
330*cdf0e10cSrcweir 	SC_DLLPUBLIC void			SetCursor( SCCOL nPosX, SCROW nPosY, sal_Bool bNew = sal_False );
331*cdf0e10cSrcweir 
332*cdf0e10cSrcweir 	SC_DLLPUBLIC void			CellContentChanged();
333*cdf0e10cSrcweir 	void			SelectionChanged();
334*cdf0e10cSrcweir 	void			CursorPosChanged();
335*cdf0e10cSrcweir 	void			UpdateInputContext();
336*cdf0e10cSrcweir 
337*cdf0e10cSrcweir 	void			CheckSelectionTransfer();
338*cdf0e10cSrcweir 
339*cdf0e10cSrcweir 	void			InvertHorizontal( ScVSplitPos eWhich, long nDragPos );
340*cdf0e10cSrcweir 	void			InvertVertical( ScHSplitPos eWhich, long nDragPos );
341*cdf0e10cSrcweir 
342*cdf0e10cSrcweir 	Point			GetInsertPos();
343*cdf0e10cSrcweir 
344*cdf0e10cSrcweir     Point           GetChartInsertPos( const Size& rSize, const ScRange& rCellRange );
345*cdf0e10cSrcweir     Point           GetChartDialogPos( const Size& rDialogSize, const Rectangle& rLogicChart );
346*cdf0e10cSrcweir 
347*cdf0e10cSrcweir 	void			UpdateAutoFillMark();
348*cdf0e10cSrcweir 
349*cdf0e10cSrcweir 	void			HideCursor();				// nur aktiver Teil
350*cdf0e10cSrcweir 	void			ShowCursor();
351*cdf0e10cSrcweir 	void			HideAllCursors();
352*cdf0e10cSrcweir 	void			ShowAllCursors();
353*cdf0e10cSrcweir 
354*cdf0e10cSrcweir 	void			AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
355*cdf0e10cSrcweir 									const ScSplitPos* pWhich = NULL );
356*cdf0e10cSrcweir 
357*cdf0e10cSrcweir     SvxZoomType     GetZoomType() const;
358*cdf0e10cSrcweir     void            SetZoomType( SvxZoomType eNew, sal_Bool bAll );
359*cdf0e10cSrcweir 	sal_uInt16			CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom );
360*cdf0e10cSrcweir 
361*cdf0e10cSrcweir //	void			CalcZoom( SvxZoomType eType, sal_uInt16& rZoom, SCCOL& rCol, SCROW& rRow );
362*cdf0e10cSrcweir 
363*cdf0e10cSrcweir     sal_Bool        HasPageFieldDataAtCursor() const;
364*cdf0e10cSrcweir 	void			StartDataSelect();
365*cdf0e10cSrcweir 
366*cdf0e10cSrcweir 					//	MoveCursorAbs		- absolut
367*cdf0e10cSrcweir 					//	MoveCursorRel		- einzelne Zellen
368*cdf0e10cSrcweir 					//	MoveCursorPage		- Bildschirmseite
369*cdf0e10cSrcweir 					//	MoveCursorArea		- Datenblock
370*cdf0e10cSrcweir 					//	MoveCursorEnd		- links oben / benutzter Bereich
371*cdf0e10cSrcweir 
372*cdf0e10cSrcweir 	SC_DLLPUBLIC void			MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
373*cdf0e10cSrcweir 									sal_Bool bShift, sal_Bool bControl,
374*cdf0e10cSrcweir 									sal_Bool bKeepOld = sal_False, sal_Bool bKeepSel = sal_False );
375*cdf0e10cSrcweir 	void			MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
376*cdf0e10cSrcweir 									sal_Bool bShift, sal_Bool bKeepSel = sal_False );
377*cdf0e10cSrcweir 	void			MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
378*cdf0e10cSrcweir 									sal_Bool bShift, sal_Bool bKeepSel = sal_False );
379*cdf0e10cSrcweir 	void			MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
380*cdf0e10cSrcweir 									sal_Bool bShift, sal_Bool bKeepSel = sal_False );
381*cdf0e10cSrcweir 	void			MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
382*cdf0e10cSrcweir 									sal_Bool bShift, sal_Bool bKeepSel = sal_False );
383*cdf0e10cSrcweir 	void			MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, sal_Bool bShift );
384*cdf0e10cSrcweir 
385*cdf0e10cSrcweir 	void			MoveCursorEnter( sal_Bool bShift );		// Shift fuer Richtung (kein Markieren)
386*cdf0e10cSrcweir 
387*cdf0e10cSrcweir     sal_Bool            MoveCursorKeyInput( const KeyEvent& rKeyEvent );
388*cdf0e10cSrcweir 
389*cdf0e10cSrcweir 	void			FindNextUnprot( sal_Bool bShift, sal_Bool bInSelection = sal_True );
390*cdf0e10cSrcweir 
391*cdf0e10cSrcweir 	void			SetNewStartIfMarking();
392*cdf0e10cSrcweir 
393*cdf0e10cSrcweir     // bSameTabButMoved = true if the same sheet as before is activated, used after moving/copying/inserting/deleting a sheet
394*cdf0e10cSrcweir     SC_DLLPUBLIC void SetTabNo( SCTAB nTab, sal_Bool bNew = sal_False, sal_Bool bExtendSelection = sal_False, bool bSameTabButMoved = false );
395*cdf0e10cSrcweir     void            SelectNextTab( short nDir, sal_Bool bExtendSelection = sal_False );
396*cdf0e10cSrcweir 
397*cdf0e10cSrcweir 	void			ActivateView( sal_Bool bActivate, sal_Bool bFirst );
398*cdf0e10cSrcweir 	void			ActivatePart( ScSplitPos eWhich );
399*cdf0e10cSrcweir 	sal_Bool			IsInActivatePart() const	{ return bInActivatePart; }
400*cdf0e10cSrcweir 
401*cdf0e10cSrcweir 	void			SetTimer( ScGridWindow* pWin, const MouseEvent& rMEvt );
402*cdf0e10cSrcweir 	void			ResetTimer();
403*cdf0e10cSrcweir 
404*cdf0e10cSrcweir 	void 			ScrollX( long nDeltaX, ScHSplitPos eWhich, sal_Bool bUpdBars = sal_True );
405*cdf0e10cSrcweir 	void 			ScrollY( long nDeltaY, ScVSplitPos eWhich, sal_Bool bUpdBars = sal_True );
406*cdf0e10cSrcweir 	SC_DLLPUBLIC void			ScrollLines( long nDeltaX, long nDeltaY );				// aktives
407*cdf0e10cSrcweir 
408*cdf0e10cSrcweir 	sal_Bool			ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos );
409*cdf0e10cSrcweir 
410*cdf0e10cSrcweir 	void			ScrollToObject( SdrObject* pDrawObj );
411*cdf0e10cSrcweir 	void			MakeVisible( const Rectangle& rHMMRect );
412*cdf0e10cSrcweir 
413*cdf0e10cSrcweir 									// Zeichnen
414*cdf0e10cSrcweir 
415*cdf0e10cSrcweir 	void			InvertBlockMark(SCCOL nBlockStartX, SCROW nBlockStartY,
416*cdf0e10cSrcweir 								SCCOL nBlockEndX, SCROW nBlockEndY);
417*cdf0e10cSrcweir 
418*cdf0e10cSrcweir //UNUSED2008-05  void            DrawDragRect( SCCOL nStartX, SCROW nStartY, SCCOL nEndX, SCROW nEndY,
419*cdf0e10cSrcweir //UNUSED2008-05                                ScSplitPos ePos );
420*cdf0e10cSrcweir //UNUSED2008-05  void			PaintCell( SCCOL nCol, SCROW nRow, SCTAB nTab );
421*cdf0e10cSrcweir //UNUSED2008-05  void			PaintLeftRow( SCROW nRow );
422*cdf0e10cSrcweir //UNUSED2008-05  void			PaintTopCol( SCCOL nCol );
423*cdf0e10cSrcweir 
424*cdf0e10cSrcweir 	void			PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
425*cdf0e10cSrcweir 										ScUpdateMode eMode = SC_UPDATE_ALL );
426*cdf0e10cSrcweir 
427*cdf0e10cSrcweir 	void			PaintGrid();
428*cdf0e10cSrcweir 
429*cdf0e10cSrcweir 	void			PaintTopArea( SCCOL nStartCol, SCCOL nEndCol );
430*cdf0e10cSrcweir 	void			PaintTop();
431*cdf0e10cSrcweir 
432*cdf0e10cSrcweir 	void			PaintLeftArea( SCROW nStartRow, SCROW nEndRow );
433*cdf0e10cSrcweir 	void			PaintLeft();
434*cdf0e10cSrcweir 
435*cdf0e10cSrcweir 	sal_Bool			PaintExtras();
436*cdf0e10cSrcweir 
437*cdf0e10cSrcweir 	void			RecalcPPT();
438*cdf0e10cSrcweir 
439*cdf0e10cSrcweir 	void			CreateAnchorHandles(SdrHdlList& rHdl, const ScAddress& rAddress);
440*cdf0e10cSrcweir 
441*cdf0e10cSrcweir     void            UpdateSelectionOverlay();
442*cdf0e10cSrcweir     void            UpdateShrinkOverlay();
443*cdf0e10cSrcweir     void            UpdateAllOverlays();
444*cdf0e10cSrcweir 
445*cdf0e10cSrcweir 	void			UpdateFormulas();
446*cdf0e10cSrcweir 	void			InterpretVisible();
447*cdf0e10cSrcweir 	void			CheckNeedsRepaint();
448*cdf0e10cSrcweir 
449*cdf0e10cSrcweir 	void			PaintRangeFinder( long nNumber = -1 );
450*cdf0e10cSrcweir 	void			AddHighlightRange( const ScRange& rRange, const Color& rColor );
451*cdf0e10cSrcweir 	void			ClearHighlightRanges();
452*cdf0e10cSrcweir 
453*cdf0e10cSrcweir 	void			DoChartSelection( const ::com::sun::star::uno::Sequence<
454*cdf0e10cSrcweir                                       ::com::sun::star::chart2::data::HighlightedRange > & rHilightRanges );
455*cdf0e10cSrcweir 
456*cdf0e10cSrcweir 	long			GetGridWidth( ScHSplitPos eWhich );
457*cdf0e10cSrcweir 	long			GetGridHeight( ScVSplitPos eWhich );
458*cdf0e10cSrcweir 
459*cdf0e10cSrcweir 	void			UpdateScrollBars();
460*cdf0e10cSrcweir 	void			SetNewVisArea();
461*cdf0e10cSrcweir 
462*cdf0e10cSrcweir 	void			InvalidateAttribs();
463*cdf0e10cSrcweir 
464*cdf0e10cSrcweir 	void			MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW nRow );
465*cdf0e10cSrcweir 	void			KillEditView( sal_Bool bNoPaint );
466*cdf0e10cSrcweir 	void			UpdateEditView();
467*cdf0e10cSrcweir 
468*cdf0e10cSrcweir 
469*cdf0e10cSrcweir 									//	Bloecke
470*cdf0e10cSrcweir 
471*cdf0e10cSrcweir 	void			SelectAll( sal_Bool bContinue = sal_False );
472*cdf0e10cSrcweir 	void			SelectAllTables();
473*cdf0e10cSrcweir     void            DeselectAllTables();
474*cdf0e10cSrcweir 
475*cdf0e10cSrcweir 	void			MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
476*cdf0e10cSrcweir                                 sal_Bool bCols = sal_False, sal_Bool bRows = sal_False, sal_Bool bCellSelection = sal_False );
477*cdf0e10cSrcweir 	void			InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
478*cdf0e10cSrcweir 									sal_Bool bTestNeg = sal_False,
479*cdf0e10cSrcweir 									sal_Bool bCols = sal_False, sal_Bool bRows = sal_False );
480*cdf0e10cSrcweir 	void			InitOwnBlockMode();
481*cdf0e10cSrcweir 	void			DoneBlockMode( sal_Bool bContinue = sal_False );
482*cdf0e10cSrcweir 
483*cdf0e10cSrcweir 	sal_Bool			IsBlockMode() const		{ return bIsBlockMode; }
484*cdf0e10cSrcweir 
485*cdf0e10cSrcweir 	void			MarkColumns();
486*cdf0e10cSrcweir 	void			MarkRows();
487*cdf0e10cSrcweir 	void			MarkDataArea( sal_Bool bIncludeCursor = sal_True );
488*cdf0e10cSrcweir 	void			MarkMatrixFormula();
489*cdf0e10cSrcweir 	void			Unmark();
490*cdf0e10cSrcweir 
491*cdf0e10cSrcweir     void            MarkRange( const ScRange& rRange, sal_Bool bSetCursor = sal_True, sal_Bool bContinue = sal_False );
492*cdf0e10cSrcweir 
493*cdf0e10cSrcweir 	sal_Bool			IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
494*cdf0e10cSrcweir 
495*cdf0e10cSrcweir 	void			PaintMarks( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
496*cdf0e10cSrcweir 	void			PaintBlock( sal_Bool bReset = sal_False );
497*cdf0e10cSrcweir 
498*cdf0e10cSrcweir     void            SetMarkData( const ScMarkData& rNew );
499*cdf0e10cSrcweir     void            MarkDataChanged();
500*cdf0e10cSrcweir 
501*cdf0e10cSrcweir 	void			LockModifiers( sal_uInt16 nModifiers );
502*cdf0e10cSrcweir 	sal_uInt16			GetLockedModifiers() const;
503*cdf0e10cSrcweir 	void			ViewOptionsHasChanged( sal_Bool bHScrollChanged,
504*cdf0e10cSrcweir 											sal_Bool bGraphicsChanged = sal_False);
505*cdf0e10cSrcweir 
506*cdf0e10cSrcweir 	Point			GetMousePosPixel();
507*cdf0e10cSrcweir 
508*cdf0e10cSrcweir 	void			SnapSplitPos( Point& rScreenPosPixel );
509*cdf0e10cSrcweir 	void			FreezeSplitters( sal_Bool bFreeze );
510*cdf0e10cSrcweir 	void			RemoveSplit();
511*cdf0e10cSrcweir 	void			SplitAtCursor();
512*cdf0e10cSrcweir 	void			SplitAtPixel( const Point& rPixel, sal_Bool bHor, sal_Bool bVer );
513*cdf0e10cSrcweir 	void			InvalidateSplit();
514*cdf0e10cSrcweir 
515*cdf0e10cSrcweir 	void			ErrorMessage( sal_uInt16 nGlobStrId );
516*cdf0e10cSrcweir 	Window*			GetParentOrChild( sal_uInt16 nChildId );
517*cdf0e10cSrcweir 
518*cdf0e10cSrcweir 	void			EnableRefInput(sal_Bool bFlag=sal_True);
519*cdf0e10cSrcweir 
520*cdf0e10cSrcweir 	Window*			GetFrameWin() const	{ return pFrameWin; }
521*cdf0e10cSrcweir 
522*cdf0e10cSrcweir     sal_Bool            HasPaintBrush() const           { return pBrushDocument || pDrawBrushSet; }
523*cdf0e10cSrcweir     ScDocument*     GetBrushDocument() const        { return pBrushDocument; }
524*cdf0e10cSrcweir     SfxItemSet*     GetDrawBrushSet() const         { return pDrawBrushSet; }
525*cdf0e10cSrcweir     sal_Bool            IsPaintBrushLocked() const      { return bLockPaintBrush; }
526*cdf0e10cSrcweir     void            SetBrushDocument( ScDocument* pNew, sal_Bool bLock );
527*cdf0e10cSrcweir     void            SetDrawBrushSet( SfxItemSet* pNew, sal_Bool bLock );
528*cdf0e10cSrcweir     void            ResetBrushDocument();
529*cdf0e10cSrcweir };
530*cdf0e10cSrcweir 
531*cdf0e10cSrcweir 
532*cdf0e10cSrcweir 
533*cdf0e10cSrcweir #endif
534*cdf0e10cSrcweir 
535