1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: viewdata.hxx,v $
10 * $Revision: 1.24.24.2 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef SC_VIEWDATA_HXX
31 #define SC_VIEWDATA_HXX
33 #include <svx/zoomitem.hxx>
35 #include "viewopti.hxx"
36 #include "markdata.hxx"
39 // ---------------------------------------------------------------------------
41 #define SC_SLIDER_SIZE 2
42 #define SC_SMALL3DSHADOW COL_BLACK
43 #define SC_SIZE_NONE 65535
44 const SCCOL SC_TABSTART_NONE
= SCCOL_MAX
;
46 #define SC_FILL_NONE 0
47 #define SC_FILL_FILL 1
48 #define SC_FILL_EMBED_LT 2
49 #define SC_FILL_EMBED_RB 3
50 #define SC_FILL_MATRIX 4
52 enum ScSplitMode
{ SC_SPLIT_NONE
= 0, SC_SPLIT_NORMAL
, SC_SPLIT_FIX
};
54 enum ScSplitPos
{ SC_SPLIT_TOPLEFT
, SC_SPLIT_TOPRIGHT
, SC_SPLIT_BOTTOMLEFT
, SC_SPLIT_BOTTOMRIGHT
};
55 enum ScHSplitPos
{ SC_SPLIT_LEFT
, SC_SPLIT_RIGHT
};
56 enum ScVSplitPos
{ SC_SPLIT_TOP
, SC_SPLIT_BOTTOM
};
58 inline ScHSplitPos
WhichH( ScSplitPos ePos
);
59 inline ScVSplitPos
WhichV( ScSplitPos ePos
);
60 inline ScSplitPos
Which( ScHSplitPos eHPos
);
61 inline ScSplitPos
Which( ScVSplitPos eVPos
);
63 // Bildschirmverhalten bei Cursorbewegungen:
64 enum ScFollowMode
{ SC_FOLLOW_NONE
, SC_FOLLOW_LINE
, SC_FOLLOW_FIX
, SC_FOLLOW_JUMP
};
66 // Mausmodi um Bereiche zu selektieren
67 enum ScRefType
{ SC_REFTYPE_NONE
, SC_REFTYPE_REF
, SC_REFTYPE_FILL
,
68 SC_REFTYPE_EMBED_LT
, SC_REFTYPE_EMBED_RB
};
70 /** States GetSimpleArea() returns for the underlying selection marks, so the
71 caller can react if the result is not of type SC_MARK_SIMPLE. */
74 SC_MARK_NONE
= 0, // Not returned by GetSimpleArea(), used internally.
75 // Nothing marked always results in the
76 // current cursor position being selected and a simple mark.
77 SC_MARK_SIMPLE
= 1, // Simple rectangular area marked, no filtered rows.
78 SC_MARK_FILTERED
= 2, // At least one mark contains filtered rows.
79 SC_MARK_SIMPLE_FILTERED
= // Simple rectangular area marked containing filtered rows.
81 SC_MARK_FILTERED
, // 3
82 SC_MARK_MULTI
= 4 // Multiple selection marks.
83 /* TODO: if filtered multi-selection was implemented, this would be the value to use. */
86 SC_MARK_MULTI_FILTERED
= // Multiple selection marks containing filtered rows.
94 SC_PASTE_NONE
= 0, // No flags specified
95 SC_PASTE_MODE
= 1, // Enable paste-mode
96 SC_PASTE_BORDER
= 2, // Show a border around the source cells
102 class ScTabViewShell
;
104 class ScEditEngineDefaulter
;
109 class SfxObjectShell
;
113 class ScRangeListRef
;
114 class ScExtDocOptions
;
117 //--------------------------------------------------------------------------
119 class ScViewDataTable
// Daten pro Tabelle
121 friend class ScViewData
;
123 SvxZoomType eZoomType
; // selected zoom type (normal view)
124 Fraction aZoomX
; // selected zoom X
125 Fraction aZoomY
; // selected zoom Y (displayed)
126 Fraction aPageZoomX
; // zoom in page break preview mode
129 long nTPosX
[2]; // MapMode - Offset (Twips)
131 long nMPosX
[2]; // MapMode - Offset (1/100 mm)
133 long nPixPosX
[2]; // Offset in Pixeln
138 ScSplitMode eHSplitMode
;
139 ScSplitMode eVSplitMode
;
140 ScSplitPos eWhichActive
;
142 SCCOL nFixPosX
; // Zellposition des Splitters beim Fixieren
152 bool bShowGrid
; // per-sheet show grid-lines option.
154 BOOL bOldCurValid
; // "virtuelle" Cursorpos. bei zusammengefassten
159 void WriteUserDataSequence(
160 com::sun::star::uno::Sequence
<com::sun::star::beans::PropertyValue
>& rSettings
,
161 const ScViewData
& rViewData
, SCTAB nTab
);
163 void ReadUserDataSequence(
164 const com::sun::star::uno::Sequence
<com::sun::star::beans::PropertyValue
>& rSettings
,
165 ScViewData
& rViewData
, SCTAB nTab
, bool& rHasZoom
);
168 // ---------------------------------------------------------------------------
170 class SC_DLLPUBLIC ScViewData
173 double nPPTX
, nPPTY
; // Scaling-Faktoren
175 ScViewDataTable
* pTabData
[MAXTABCOUNT
];
176 ScViewDataTable
* pThisTab
; // Daten der angezeigten Tabelle
177 ScDocShell
* pDocShell
;
180 ScTabViewShell
* pViewShell
;
181 EditView
* pEditView
[4]; // gehoert dem Fenster
182 ScViewOptions
* pOptions
;
183 EditView
* pSpellingView
;
185 ScMarkData aMarkData
;
189 Size aScenButSize
; // Groesse eines Szenario-Buttons
192 MapMode aLogicMode
; // skalierter 1/100mm-MapMode
194 SvxZoomType eDefZoomType
; // default zoom and type for missing TabData
197 Fraction aDefPageZoomX
; // zoom in page break preview mode
198 Fraction aDefPageZoomY
;
202 SCTAB nTabNo
; // angezeigte Tabelle
203 SCTAB nRefTabNo
; // Tabelle auf die sich RefInput bezieht
210 SCCOL nFillStartX
; // Fill-Cursor
214 SCCOL nEditCol
; // Position dazu
217 SCCOL nEditEndCol
; // Ende der Edit-View
219 SCCOL nTabStartCol
; // fuer Enter nach Tab
220 ScRange aDelRange
; // fuer AutoFill-Loeschen
222 ScPasteFlags nPasteFlags
;
224 ScSplitPos eEditActivePart
; // the part that was active when edit mode was started
225 BOOL bEditActive
[4]; // aktiv?
226 BOOL bActive
; // aktives Fenster ?
227 BOOL bIsRefMode
; // Referenzeingabe
228 BOOL bDelMarkValid
; // nur gueltig bei SC_REFTYPE_FILL
229 BYTE nFillMode
; // Modus
230 BOOL bPagebreak
; // Seitenumbruch-Vorschaumodus
232 BOOL bSelCtrlMouseClick
; // special selection handling for ctrl-mouse-click
234 SC_DLLPRIVATE
DECL_LINK (EmptyEditHdl
, EditStatus
*);
235 SC_DLLPRIVATE
DECL_LINK (EditEngineHdl
, EditStatus
*);
237 SC_DLLPRIVATE
void CalcPPT();
238 SC_DLLPRIVATE
void CreateTabData( SCTAB nNewTab
);
239 SC_DLLPRIVATE
void CreateTabData( std::vector
< SCTAB
>& rvTabs
);
240 SC_DLLPRIVATE
void CreateSelectedTabData();
243 ScViewData( ScDocShell
* pDocSh
, ScTabViewShell
* pViewSh
);
244 ScViewData( const ScViewData
& rViewData
);
247 void InitData( ScDocument
* pDocument
);
248 //UNUSED2008-05 void InitFrom( const ScViewData* pRef );
249 //UNUSED2008-05 void SetDocShell( ScDocShell* pShell );
252 ScDocShell
* GetDocShell() const { return pDocShell
; }
253 ScDBFunc
* GetView() const { return pView
; }
254 ScTabViewShell
* GetViewShell() const { return pViewShell
; }
256 SfxObjectShell
* GetSfxDocShell() const;
257 SfxBindings
& GetBindings(); // from ViewShell's ViewFrame
258 SfxDispatcher
& GetDispatcher(); // from ViewShell's ViewFrame
260 ScMarkData
& GetMarkData() { return aMarkData
; }
261 const ScMarkData
& GetMarkData() const { return aMarkData
; }
263 Window
* GetDialogParent(); // von tabvwsh weitergeleitet
264 Window
* GetActiveWin(); // von View
265 ScDrawView
* GetScDrawView(); // von View
266 BOOL
IsMinimized(); // von View
268 void UpdateInputHandler( BOOL bForce
= FALSE
, BOOL bStopEditing
= TRUE
);
270 void WriteUserData(String
& rData
);
271 void ReadUserData(const String
& rData
);
272 void WriteExtOptions( ScExtDocOptions
& rOpt
) const;
273 void ReadExtOptions( const ScExtDocOptions
& rOpt
);
274 void WriteUserDataSequence(com::sun::star::uno::Sequence
<com::sun::star::beans::PropertyValue
>& rSettings
);
275 void ReadUserDataSequence(const com::sun::star::uno::Sequence
<com::sun::star::beans::PropertyValue
>& rSettings
);
277 ScDocument
* GetDocument() const;
279 void SetViewShell( ScTabViewShell
* pViewSh
);
281 BOOL
IsActive() const { return bActive
; }
282 void Activate(BOOL bActivate
) { bActive
= bActivate
; }
286 void InsertTab( SCTAB nTab
);
287 void DeleteTab( SCTAB nTab
);
288 void CopyTab( SCTAB nSrcTab
, SCTAB nDestTab
);
289 void MoveTab( SCTAB nSrcTab
, SCTAB nDestTab
);
291 SCTAB
GetRefTabNo() const { return nRefTabNo
; }
292 void SetRefTabNo( SCTAB nNewTab
) { nRefTabNo
= nNewTab
; }
294 SCTAB
GetTabNo() const { return nTabNo
; }
295 ScSplitPos
GetActivePart() const { return pThisTab
->eWhichActive
; }
296 SCCOL
GetPosX( ScHSplitPos eWhich
) const { return pThisTab
->nPosX
[eWhich
]; }
297 SCROW
GetPosY( ScVSplitPos eWhich
) const { return pThisTab
->nPosY
[eWhich
]; }
298 SCCOL
GetCurX() const { return pThisTab
->nCurX
; }
299 SCROW
GetCurY() const { return pThisTab
->nCurY
; }
300 BOOL
HasOldCursor() const { return pThisTab
->bOldCurValid
; }
301 SCCOL
GetOldCurX() const;
302 SCROW
GetOldCurY() const;
303 ScSplitMode
GetHSplitMode() const { return pThisTab
->eHSplitMode
; }
304 ScSplitMode
GetVSplitMode() const { return pThisTab
->eVSplitMode
; }
305 long GetHSplitPos() const { return pThisTab
->nHSplitPos
; }
306 long GetVSplitPos() const { return pThisTab
->nVSplitPos
; }
307 SCCOL
GetFixPosX() const { return pThisTab
->nFixPosX
; }
308 SCROW
GetFixPosY() const { return pThisTab
->nFixPosY
; }
309 BOOL
IsPagebreakMode() const { return bPagebreak
; }
310 BOOL
IsPasteMode() const { return nPasteFlags
& SC_PASTE_MODE
; }
311 BOOL
ShowPasteSource() const { return nPasteFlags
& SC_PASTE_BORDER
; }
313 void SetPosX( ScHSplitPos eWhich
, SCCOL nNewPosX
);
314 void SetPosY( ScVSplitPos eWhich
, SCROW nNewPosY
);
315 void SetCurX( SCCOL nNewCurX
) { pThisTab
->nCurX
= nNewCurX
; }
316 void SetCurY( SCROW nNewCurY
) { pThisTab
->nCurY
= nNewCurY
; }
317 void SetOldCursor( SCCOL nNewX
, SCROW nNewY
);
318 void ResetOldCursor();
319 void SetHSplitMode( ScSplitMode eMode
) { pThisTab
->eHSplitMode
= eMode
; }
320 void SetVSplitMode( ScSplitMode eMode
) { pThisTab
->eVSplitMode
= eMode
; }
321 void SetHSplitPos( long nPos
) { pThisTab
->nHSplitPos
= nPos
; }
322 void SetVSplitPos( long nPos
) { pThisTab
->nVSplitPos
= nPos
; }
323 void SetFixPosX( SCCOL nPos
) { pThisTab
->nFixPosX
= nPos
; }
324 void SetFixPosY( SCROW nPos
) { pThisTab
->nFixPosY
= nPos
; }
325 void SetPagebreakMode( BOOL bSet
);
326 void SetPasteMode ( ScPasteFlags nFlags
) { nPasteFlags
= nFlags
; }
328 void SetZoomType( SvxZoomType eNew
, BOOL bAll
);
329 void SetZoomType( SvxZoomType eNew
, std::vector
< SCTAB
>& tabs
);
330 void SetZoom( const Fraction
& rNewX
, const Fraction
& rNewY
, std::vector
< SCTAB
>& tabs
);
331 void SetZoom( const Fraction
& rNewX
, const Fraction
& rNewY
, BOOL bAll
);
334 void SetSelCtrlMouseClick( BOOL bTmp
) { bSelCtrlMouseClick
= bTmp
; }
336 SvxZoomType
GetZoomType() const { return pThisTab
->eZoomType
; }
337 const Fraction
& GetZoomX() const { return bPagebreak
? pThisTab
->aPageZoomX
: pThisTab
->aZoomX
; }
338 const Fraction
& GetZoomY() const { return bPagebreak
? pThisTab
->aPageZoomY
: pThisTab
->aZoomY
; }
340 void SetShowGrid( bool bShow
);
341 bool GetShowGrid() const { return pThisTab
->bShowGrid
; }
343 const MapMode
& GetLogicMode( ScSplitPos eWhich
);
344 const MapMode
& GetLogicMode(); // Offset 0
346 long GetTPosX( ScHSplitPos eWhich
) const { return pThisTab
->nTPosX
[eWhich
]; }
347 long GetTPosY( ScVSplitPos eWhich
) const { return pThisTab
->nTPosY
[eWhich
]; }
349 double GetPPTX() const { return nPPTX
; }
350 double GetPPTY() const { return nPPTY
; }
352 ScMarkType
GetSimpleArea( SCCOL
& rStartCol
, SCROW
& rStartRow
, SCTAB
& rStartTab
,
353 SCCOL
& rEndCol
, SCROW
& rEndRow
, SCTAB
& rEndTab
) const;
358 ScMarkType
GetSimpleArea( ScRange
& rRange
) const;
359 /// May modify rNewMark using MarkToSimple().
360 ScMarkType
GetSimpleArea( ScRange
& rRange
, ScMarkData
& rNewMark
) const;
361 void GetMultiArea( ScRangeListRef
& rRange
) const;
363 BOOL
SimpleColMarked();
364 BOOL
SimpleRowMarked();
366 BOOL
IsMultiMarked();
368 void SetFillMode( SCCOL nStartCol
, SCROW nStartRow
, SCCOL nEndCol
, SCROW nEndRow
);
369 void SetDragMode( SCCOL nStartCol
, SCROW nStartRow
, SCCOL nEndCol
, SCROW nEndRow
,
371 void GetFillData( SCCOL
& rStartCol
, SCROW
& rStartRow
,
372 SCCOL
& rEndCol
, SCROW
& rEndRow
);
373 void ResetFillMode();
374 BOOL
IsAnyFillMode() { return nFillMode
!= SC_FILL_NONE
; }
375 BOOL
IsFillMode() { return nFillMode
== SC_FILL_FILL
; }
376 BYTE
GetFillMode() { return nFillMode
; }
378 // TRUE: Zelle ist zusammengefasst
379 BOOL
GetMergeSizePixel( SCCOL nX
, SCROW nY
, long& rSizeXPix
, long& rSizeYPix
);
380 BOOL
GetPosFromPixel( long nClickX
, long nClickY
, ScSplitPos eWhich
,
381 SCsCOL
& rPosX
, SCsROW
& rPosY
,
382 BOOL bTestMerge
= TRUE
, BOOL bRepair
= FALSE
,
383 BOOL bNextIfLarge
= TRUE
);
384 void GetMouseQuadrant( const Point
& rClickPos
, ScSplitPos eWhich
,
385 SCsCOL nPosX
, SCsROW nPosY
, BOOL
& rLeft
, BOOL
& rTop
);
387 BOOL
IsRefMode() const { return bIsRefMode
; }
388 ScRefType
GetRefType() const { return eRefType
; }
389 SCCOL
GetRefStartX() const { return nRefStartX
; }
390 SCROW
GetRefStartY() const { return nRefStartY
; }
391 SCTAB
GetRefStartZ() const { return nRefStartZ
; }
392 SCCOL
GetRefEndX() const { return nRefEndX
; }
393 SCROW
GetRefEndY() const { return nRefEndY
; }
394 SCTAB
GetRefEndZ() const { return nRefEndZ
; }
396 void SetRefMode( BOOL bNewMode
, ScRefType eNewType
)
397 { bIsRefMode
= bNewMode
; eRefType
= eNewType
; }
399 void SetRefStart( SCCOL nNewX
, SCROW nNewY
, SCTAB nNewZ
)
400 { nRefStartX
= nNewX
; nRefStartY
= nNewY
; nRefStartZ
= nNewZ
; }
401 void SetRefEnd( SCCOL nNewX
, SCROW nNewY
, SCTAB nNewZ
)
402 { nRefEndX
= nNewX
; nRefEndY
= nNewY
; nRefEndZ
= nNewZ
; }
404 void ResetDelMark() { bDelMarkValid
= FALSE
; }
405 void SetDelMark( const ScRange
& rRange
)
406 { aDelRange
= rRange
; bDelMarkValid
= TRUE
; }
408 BOOL
GetDelMark( ScRange
& rRange
) const
409 { rRange
= aDelRange
; return bDelMarkValid
; }
411 inline void GetMoveCursor( SCCOL
& rCurX
, SCROW
& rCurY
);
413 const ScViewOptions
& GetOptions() const { return *pOptions
; }
414 void SetOptions( const ScViewOptions
& rOpt
);
416 BOOL
IsGridMode () const { return pOptions
->GetOption( VOPT_GRID
); }
417 void SetGridMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_GRID
, bNewMode
); }
418 BOOL
IsSyntaxMode () const { return pOptions
->GetOption( VOPT_SYNTAX
); }
419 void SetSyntaxMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_SYNTAX
, bNewMode
); }
420 BOOL
IsHeaderMode () const { return pOptions
->GetOption( VOPT_HEADER
); }
421 void SetHeaderMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_HEADER
, bNewMode
); }
422 BOOL
IsTabMode () const { return pOptions
->GetOption( VOPT_TABCONTROLS
); }
423 void SetTabMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_TABCONTROLS
, bNewMode
); }
424 BOOL
IsVScrollMode () const { return pOptions
->GetOption( VOPT_VSCROLL
); }
425 void SetVScrollMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_VSCROLL
, bNewMode
); }
426 BOOL
IsHScrollMode () const { return pOptions
->GetOption( VOPT_HSCROLL
); }
427 void SetHScrollMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_HSCROLL
, bNewMode
); }
428 BOOL
IsOutlineMode () const { return pOptions
->GetOption( VOPT_OUTLINER
); }
429 void SetOutlineMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_OUTLINER
, bNewMode
); }
432 void ResetEditView();
433 void SetEditEngine( ScSplitPos eWhich
,
434 ScEditEngineDefaulter
* pNewEngine
,
435 Window
* pWin
, SCCOL nNewX
, SCROW nNewY
);
436 void GetEditView( ScSplitPos eWhich
, EditView
*& rViewPtr
, SCCOL
& rCol
, SCROW
& rRow
);
437 BOOL
HasEditView( ScSplitPos eWhich
) const
438 { return pEditView
[eWhich
] && bEditActive
[eWhich
]; }
439 EditView
* GetEditView( ScSplitPos eWhich
) const
440 { return pEditView
[eWhich
]; }
443 void EditGrowY( BOOL bInitial
= FALSE
);
445 ScSplitPos
GetEditActivePart() const { return eEditActivePart
; }
446 SCCOL
GetEditViewCol() const { return nEditCol
; }
447 SCROW
GetEditViewRow() const { return nEditRow
; }
448 SCCOL
GetEditStartCol() const { return nEditStartCol
; }
449 SCROW
GetEditStartRow() const { return nEditRow
; } // never editing above the cell
450 SCCOL
GetEditEndCol() const { return nEditEndCol
; }
451 SCROW
GetEditEndRow() const { return nEditEndRow
; }
453 Rectangle
GetEditArea( ScSplitPos eWhich
, SCCOL nPosX
, SCROW nPosY
, Window
* pWin
,
454 const ScPatternAttr
* pPattern
, BOOL bForceToTop
);
456 void SetTabNo( SCTAB nNewTab
);
457 void SetActivePart( ScSplitPos eNewActive
);
459 Point
GetScrPos( SCCOL nWhereX
, SCROW nWhereY
, ScSplitPos eWhich
,
460 BOOL bAllowNeg
= FALSE
) const;
461 Point
GetScrPos( SCCOL nWhereX
, SCROW nWhereY
, ScHSplitPos eWhich
) const;
462 Point
GetScrPos( SCCOL nWhereX
, SCROW nWhereY
, ScVSplitPos eWhich
) const;
464 SCCOL
CellsAtX( SCsCOL nPosX
, SCsCOL nDir
, ScHSplitPos eWhichX
, USHORT nScrSizeY
= SC_SIZE_NONE
) const;
465 SCROW
CellsAtY( SCsROW nPosY
, SCsROW nDir
, ScVSplitPos eWhichY
, USHORT nScrSizeX
= SC_SIZE_NONE
) const;
467 SCCOL
VisibleCellsX( ScHSplitPos eWhichX
) const; // angezeigte komplette Zellen
468 SCROW
VisibleCellsY( ScVSplitPos eWhichY
) const;
469 SCCOL
PrevCellsX( ScHSplitPos eWhichX
) const; // Zellen auf der vorgehenden Seite
470 SCROW
PrevCellsY( ScVSplitPos eWhichY
) const;
471 //UNUSED2008-05 SCCOL LastCellsX( ScHSplitPos eWhichX ) const; // Zellen auf der letzten Seite
472 //UNUSED2008-05 SCROW LastCellsY( ScVSplitPos eWhichY ) const;
475 //UNUSED2008-05 void UpdateOle( ScSplitPos eWhich );
476 void SetScreen( SCCOL nCol1
, SCROW nRow1
, SCCOL nCol2
, SCROW nRow2
);
477 void SetScreen( const Rectangle
& rVisArea
);
478 void SetScreenPos( const Point
& rVisAreaStart
);
480 void UpdateScreenZoom( const Fraction
& rNewX
, const Fraction
& rNewY
);
482 Size
GetScrSize() const { return aScrSize
; }
485 Point
GetPixPos( ScSplitPos eWhich
) const
486 { return Point( pThisTab
->nPixPosX
[WhichH(eWhich
)],
487 pThisTab
->nPixPosY
[WhichV(eWhich
)] ); }
488 void SetSpellingView( EditView
* pSpView
) { pSpellingView
= pSpView
; }
489 EditView
* GetSpellingView() const { return pSpellingView
; }
491 void UpdateOutlinerFlags( Outliner
& rOutl
) const;
493 Point
GetMousePosPixel();
495 BOOL
UpdateFixX(SCTAB nTab
= MAXTAB
+1);
496 BOOL
UpdateFixY(SCTAB nTab
= MAXTAB
+1);
498 SCCOL
GetTabStartCol() const { return nTabStartCol
; }
499 void SetTabStartCol(SCCOL nNew
) { nTabStartCol
= nNew
; }
501 ScAddress
GetCurPos() const;
503 const Size
& GetScenButSize() const { return aScenButSize
; }
504 void SetScenButSize(const Size
& rNew
) { aScenButSize
= rNew
; }
506 BOOL
IsSelCtrlMouseClick() { return bSelCtrlMouseClick
; }
508 static inline long ToPixel( USHORT nTwips
, double nFactor
);
512 // ---------------------------------------------------------------------------
514 inline long ScViewData::ToPixel( USHORT nTwips
, double nFactor
)
516 long nRet
= (long)( nTwips
* nFactor
);
517 if ( !nRet
&& nTwips
)
522 inline void ScViewData::GetMoveCursor( SCCOL
& rCurX
, SCROW
& rCurY
)
536 inline ScHSplitPos
WhichH( ScSplitPos ePos
)
538 return (ePos
==SC_SPLIT_TOPLEFT
|| ePos
==SC_SPLIT_BOTTOMLEFT
) ?
539 SC_SPLIT_LEFT
: SC_SPLIT_RIGHT
;
542 inline ScVSplitPos
WhichV( ScSplitPos ePos
)
544 return (ePos
==SC_SPLIT_TOPLEFT
|| ePos
==SC_SPLIT_TOPRIGHT
) ?
545 SC_SPLIT_TOP
: SC_SPLIT_BOTTOM
;
548 inline ScSplitPos
Which( ScHSplitPos eHPos
)
550 return (eHPos
==SC_SPLIT_LEFT
) ?
551 SC_SPLIT_BOTTOMLEFT
: SC_SPLIT_BOTTOMRIGHT
;
554 inline ScSplitPos
Which( ScVSplitPos eVPos
)
556 return (eVPos
==SC_SPLIT_TOP
) ?
557 SC_SPLIT_TOPLEFT
: SC_SPLIT_BOTTOMLEFT
;