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
157 BOOL
IsDefaultTabBgColor() const {return aTabBgColor
== Color( COL_AUTO
) ? TRUE
: FALSE
;};
162 void WriteUserDataSequence(
163 com::sun::star::uno::Sequence
<com::sun::star::beans::PropertyValue
>& rSettings
,
164 const ScViewData
& rViewData
, SCTAB nTab
);
166 void ReadUserDataSequence(
167 const com::sun::star::uno::Sequence
<com::sun::star::beans::PropertyValue
>& rSettings
,
168 ScViewData
& rViewData
, SCTAB nTab
, bool& rHasZoom
);
171 // ---------------------------------------------------------------------------
173 class SC_DLLPUBLIC ScViewData
176 double nPPTX
, nPPTY
; // Scaling-Faktoren
178 ScViewDataTable
* pTabData
[MAXTABCOUNT
];
179 ScViewDataTable
* pThisTab
; // Daten der angezeigten Tabelle
180 ScDocShell
* pDocShell
;
183 ScTabViewShell
* pViewShell
;
184 EditView
* pEditView
[4]; // gehoert dem Fenster
185 ScViewOptions
* pOptions
;
186 EditView
* pSpellingView
;
188 ScMarkData aMarkData
;
192 Size aScenButSize
; // Groesse eines Szenario-Buttons
195 MapMode aLogicMode
; // skalierter 1/100mm-MapMode
197 SvxZoomType eDefZoomType
; // default zoom and type for missing TabData
200 Fraction aDefPageZoomX
; // zoom in page break preview mode
201 Fraction aDefPageZoomY
;
205 SCTAB nTabNo
; // angezeigte Tabelle
206 SCTAB nRefTabNo
; // Tabelle auf die sich RefInput bezieht
213 SCCOL nFillStartX
; // Fill-Cursor
217 SCCOL nEditCol
; // Position dazu
220 SCCOL nEditEndCol
; // Ende der Edit-View
222 SCCOL nTabStartCol
; // fuer Enter nach Tab
223 ScRange aDelRange
; // fuer AutoFill-Loeschen
225 ScPasteFlags nPasteFlags
;
227 ScSplitPos eEditActivePart
; // the part that was active when edit mode was started
228 BOOL bEditActive
[4]; // aktiv?
229 BOOL bActive
; // aktives Fenster ?
230 BOOL bIsRefMode
; // Referenzeingabe
231 BOOL bDelMarkValid
; // nur gueltig bei SC_REFTYPE_FILL
232 BYTE nFillMode
; // Modus
233 BOOL bPagebreak
; // Seitenumbruch-Vorschaumodus
235 BOOL bSelCtrlMouseClick
; // special selection handling for ctrl-mouse-click
237 SC_DLLPRIVATE
DECL_LINK (EmptyEditHdl
, EditStatus
*);
238 SC_DLLPRIVATE
DECL_LINK (EditEngineHdl
, EditStatus
*);
240 SC_DLLPRIVATE
void CalcPPT();
241 SC_DLLPRIVATE
void CreateTabData( SCTAB nNewTab
);
242 SC_DLLPRIVATE
void CreateTabData( std::vector
< SCTAB
>& rvTabs
);
243 SC_DLLPRIVATE
void CreateSelectedTabData();
246 ScViewData( ScDocShell
* pDocSh
, ScTabViewShell
* pViewSh
);
247 ScViewData( const ScViewData
& rViewData
);
250 void InitData( ScDocument
* pDocument
);
251 //UNUSED2008-05 void InitFrom( const ScViewData* pRef );
252 //UNUSED2008-05 void SetDocShell( ScDocShell* pShell );
255 ScDocShell
* GetDocShell() const { return pDocShell
; }
256 ScDBFunc
* GetView() const { return pView
; }
257 ScTabViewShell
* GetViewShell() const { return pViewShell
; }
259 SfxObjectShell
* GetSfxDocShell() const;
260 SfxBindings
& GetBindings(); // from ViewShell's ViewFrame
261 SfxDispatcher
& GetDispatcher(); // from ViewShell's ViewFrame
263 ScMarkData
& GetMarkData() { return aMarkData
; }
264 const ScMarkData
& GetMarkData() const { return aMarkData
; }
266 Window
* GetDialogParent(); // von tabvwsh weitergeleitet
267 Window
* GetActiveWin(); // von View
268 ScDrawView
* GetScDrawView(); // von View
269 BOOL
IsMinimized(); // von View
271 void UpdateInputHandler( BOOL bForce
= FALSE
, BOOL bStopEditing
= TRUE
);
273 void WriteUserData(String
& rData
);
274 void ReadUserData(const String
& rData
);
275 void WriteExtOptions( ScExtDocOptions
& rOpt
) const;
276 void ReadExtOptions( const ScExtDocOptions
& rOpt
);
277 void WriteUserDataSequence(com::sun::star::uno::Sequence
<com::sun::star::beans::PropertyValue
>& rSettings
);
278 void ReadUserDataSequence(const com::sun::star::uno::Sequence
<com::sun::star::beans::PropertyValue
>& rSettings
);
280 ScDocument
* GetDocument() const;
282 void SetViewShell( ScTabViewShell
* pViewSh
);
284 BOOL
IsActive() const { return bActive
; }
285 void Activate(BOOL bActivate
) { bActive
= bActivate
; }
289 void InsertTab( SCTAB nTab
);
290 void DeleteTab( SCTAB nTab
);
291 void CopyTab( SCTAB nSrcTab
, SCTAB nDestTab
);
292 void MoveTab( SCTAB nSrcTab
, SCTAB nDestTab
);
294 void SetTabBgColor( Color rTabBgColor
, SCTAB nTab
);
295 BOOL
IsDefaultTabBgColor( SCTAB nTab
) const;
296 Color
GetTabBgColor( SCTAB nTab
) const;
298 SCTAB
GetRefTabNo() const { return nRefTabNo
; }
299 void SetRefTabNo( SCTAB nNewTab
) { nRefTabNo
= nNewTab
; }
301 SCTAB
GetTabNo() const { return nTabNo
; }
302 ScSplitPos
GetActivePart() const { return pThisTab
->eWhichActive
; }
303 SCCOL
GetPosX( ScHSplitPos eWhich
) const { return pThisTab
->nPosX
[eWhich
]; }
304 SCROW
GetPosY( ScVSplitPos eWhich
) const { return pThisTab
->nPosY
[eWhich
]; }
305 SCCOL
GetCurX() const { return pThisTab
->nCurX
; }
306 SCROW
GetCurY() const { return pThisTab
->nCurY
; }
307 BOOL
HasOldCursor() const { return pThisTab
->bOldCurValid
; }
308 SCCOL
GetOldCurX() const;
309 SCROW
GetOldCurY() const;
310 ScSplitMode
GetHSplitMode() const { return pThisTab
->eHSplitMode
; }
311 ScSplitMode
GetVSplitMode() const { return pThisTab
->eVSplitMode
; }
312 long GetHSplitPos() const { return pThisTab
->nHSplitPos
; }
313 long GetVSplitPos() const { return pThisTab
->nVSplitPos
; }
314 SCCOL
GetFixPosX() const { return pThisTab
->nFixPosX
; }
315 SCROW
GetFixPosY() const { return pThisTab
->nFixPosY
; }
316 BOOL
IsPagebreakMode() const { return bPagebreak
; }
317 BOOL
IsPasteMode() const { return nPasteFlags
& SC_PASTE_MODE
; }
318 BOOL
ShowPasteSource() const { return nPasteFlags
& SC_PASTE_BORDER
; }
320 void SetPosX( ScHSplitPos eWhich
, SCCOL nNewPosX
);
321 void SetPosY( ScVSplitPos eWhich
, SCROW nNewPosY
);
322 void SetCurX( SCCOL nNewCurX
) { pThisTab
->nCurX
= nNewCurX
; }
323 void SetCurY( SCROW nNewCurY
) { pThisTab
->nCurY
= nNewCurY
; }
324 void SetOldCursor( SCCOL nNewX
, SCROW nNewY
);
325 void ResetOldCursor();
326 void SetHSplitMode( ScSplitMode eMode
) { pThisTab
->eHSplitMode
= eMode
; }
327 void SetVSplitMode( ScSplitMode eMode
) { pThisTab
->eVSplitMode
= eMode
; }
328 void SetHSplitPos( long nPos
) { pThisTab
->nHSplitPos
= nPos
; }
329 void SetVSplitPos( long nPos
) { pThisTab
->nVSplitPos
= nPos
; }
330 void SetFixPosX( SCCOL nPos
) { pThisTab
->nFixPosX
= nPos
; }
331 void SetFixPosY( SCROW nPos
) { pThisTab
->nFixPosY
= nPos
; }
332 void SetPagebreakMode( BOOL bSet
);
333 void SetPasteMode ( ScPasteFlags nFlags
) { nPasteFlags
= nFlags
; }
335 void SetZoomType( SvxZoomType eNew
, BOOL bAll
);
336 void SetZoomType( SvxZoomType eNew
, std::vector
< SCTAB
>& tabs
);
337 void SetZoom( const Fraction
& rNewX
, const Fraction
& rNewY
, std::vector
< SCTAB
>& tabs
);
338 void SetZoom( const Fraction
& rNewX
, const Fraction
& rNewY
, BOOL bAll
);
341 void SetSelCtrlMouseClick( BOOL bTmp
) { bSelCtrlMouseClick
= bTmp
; }
343 SvxZoomType
GetZoomType() const { return pThisTab
->eZoomType
; }
344 const Fraction
& GetZoomX() const { return bPagebreak
? pThisTab
->aPageZoomX
: pThisTab
->aZoomX
; }
345 const Fraction
& GetZoomY() const { return bPagebreak
? pThisTab
->aPageZoomY
: pThisTab
->aZoomY
; }
347 void SetShowGrid( bool bShow
);
348 bool GetShowGrid() const { return pThisTab
->bShowGrid
; }
350 const MapMode
& GetLogicMode( ScSplitPos eWhich
);
351 const MapMode
& GetLogicMode(); // Offset 0
353 long GetTPosX( ScHSplitPos eWhich
) const { return pThisTab
->nTPosX
[eWhich
]; }
354 long GetTPosY( ScVSplitPos eWhich
) const { return pThisTab
->nTPosY
[eWhich
]; }
356 double GetPPTX() const { return nPPTX
; }
357 double GetPPTY() const { return nPPTY
; }
359 ScMarkType
GetSimpleArea( SCCOL
& rStartCol
, SCROW
& rStartRow
, SCTAB
& rStartTab
,
360 SCCOL
& rEndCol
, SCROW
& rEndRow
, SCTAB
& rEndTab
) const;
361 ScMarkType
GetSimpleArea( ScRange
& rRange
) const;
366 /// May modify rNewMark using MarkToSimple().
367 ScMarkType
GetSimpleArea( ScRange
& rRange
, ScMarkData
& rNewMark
) const;
368 void GetMultiArea( ScRangeListRef
& rRange
) const;
370 BOOL
SimpleColMarked();
371 BOOL
SimpleRowMarked();
373 BOOL
IsMultiMarked();
375 void SetFillMode( SCCOL nStartCol
, SCROW nStartRow
, SCCOL nEndCol
, SCROW nEndRow
);
376 void SetDragMode( SCCOL nStartCol
, SCROW nStartRow
, SCCOL nEndCol
, SCROW nEndRow
,
378 void GetFillData( SCCOL
& rStartCol
, SCROW
& rStartRow
,
379 SCCOL
& rEndCol
, SCROW
& rEndRow
);
380 void ResetFillMode();
381 BOOL
IsAnyFillMode() { return nFillMode
!= SC_FILL_NONE
; }
382 BOOL
IsFillMode() { return nFillMode
== SC_FILL_FILL
; }
383 BYTE
GetFillMode() { return nFillMode
; }
385 // TRUE: Zelle ist zusammengefasst
386 BOOL
GetMergeSizePixel( SCCOL nX
, SCROW nY
, long& rSizeXPix
, long& rSizeYPix
);
387 BOOL
GetPosFromPixel( long nClickX
, long nClickY
, ScSplitPos eWhich
,
388 SCsCOL
& rPosX
, SCsROW
& rPosY
,
389 BOOL bTestMerge
= TRUE
, BOOL bRepair
= FALSE
,
390 BOOL bNextIfLarge
= TRUE
);
391 void GetMouseQuadrant( const Point
& rClickPos
, ScSplitPos eWhich
,
392 SCsCOL nPosX
, SCsROW nPosY
, BOOL
& rLeft
, BOOL
& rTop
);
394 BOOL
IsRefMode() const { return bIsRefMode
; }
395 ScRefType
GetRefType() const { return eRefType
; }
396 SCCOL
GetRefStartX() const { return nRefStartX
; }
397 SCROW
GetRefStartY() const { return nRefStartY
; }
398 SCTAB
GetRefStartZ() const { return nRefStartZ
; }
399 SCCOL
GetRefEndX() const { return nRefEndX
; }
400 SCROW
GetRefEndY() const { return nRefEndY
; }
401 SCTAB
GetRefEndZ() const { return nRefEndZ
; }
403 void SetRefMode( BOOL bNewMode
, ScRefType eNewType
)
404 { bIsRefMode
= bNewMode
; eRefType
= eNewType
; }
406 void SetRefStart( SCCOL nNewX
, SCROW nNewY
, SCTAB nNewZ
)
407 { nRefStartX
= nNewX
; nRefStartY
= nNewY
; nRefStartZ
= nNewZ
; }
408 void SetRefEnd( SCCOL nNewX
, SCROW nNewY
, SCTAB nNewZ
)
409 { nRefEndX
= nNewX
; nRefEndY
= nNewY
; nRefEndZ
= nNewZ
; }
411 void ResetDelMark() { bDelMarkValid
= FALSE
; }
412 void SetDelMark( const ScRange
& rRange
)
413 { aDelRange
= rRange
; bDelMarkValid
= TRUE
; }
415 BOOL
GetDelMark( ScRange
& rRange
) const
416 { rRange
= aDelRange
; return bDelMarkValid
; }
418 inline void GetMoveCursor( SCCOL
& rCurX
, SCROW
& rCurY
);
420 const ScViewOptions
& GetOptions() const { return *pOptions
; }
421 void SetOptions( const ScViewOptions
& rOpt
);
423 BOOL
IsGridMode () const { return pOptions
->GetOption( VOPT_GRID
); }
424 void SetGridMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_GRID
, bNewMode
); }
425 BOOL
IsSyntaxMode () const { return pOptions
->GetOption( VOPT_SYNTAX
); }
426 void SetSyntaxMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_SYNTAX
, bNewMode
); }
427 BOOL
IsHeaderMode () const { return pOptions
->GetOption( VOPT_HEADER
); }
428 void SetHeaderMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_HEADER
, bNewMode
); }
429 BOOL
IsTabMode () const { return pOptions
->GetOption( VOPT_TABCONTROLS
); }
430 void SetTabMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_TABCONTROLS
, bNewMode
); }
431 BOOL
IsVScrollMode () const { return pOptions
->GetOption( VOPT_VSCROLL
); }
432 void SetVScrollMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_VSCROLL
, bNewMode
); }
433 BOOL
IsHScrollMode () const { return pOptions
->GetOption( VOPT_HSCROLL
); }
434 void SetHScrollMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_HSCROLL
, bNewMode
); }
435 BOOL
IsOutlineMode () const { return pOptions
->GetOption( VOPT_OUTLINER
); }
436 void SetOutlineMode ( BOOL bNewMode
) { pOptions
->SetOption( VOPT_OUTLINER
, bNewMode
); }
439 void ResetEditView();
440 void SetEditEngine( ScSplitPos eWhich
,
441 ScEditEngineDefaulter
* pNewEngine
,
442 Window
* pWin
, SCCOL nNewX
, SCROW nNewY
);
443 void GetEditView( ScSplitPos eWhich
, EditView
*& rViewPtr
, SCCOL
& rCol
, SCROW
& rRow
);
444 BOOL
HasEditView( ScSplitPos eWhich
) const
445 { return pEditView
[eWhich
] && bEditActive
[eWhich
]; }
446 EditView
* GetEditView( ScSplitPos eWhich
) const
447 { return pEditView
[eWhich
]; }
450 void EditGrowY( BOOL bInitial
= FALSE
);
452 ScSplitPos
GetEditActivePart() const { return eEditActivePart
; }
453 SCCOL
GetEditViewCol() const { return nEditCol
; }
454 SCROW
GetEditViewRow() const { return nEditRow
; }
455 SCCOL
GetEditStartCol() const { return nEditStartCol
; }
456 SCROW
GetEditStartRow() const { return nEditRow
; } // never editing above the cell
457 SCCOL
GetEditEndCol() const { return nEditEndCol
; }
458 SCROW
GetEditEndRow() const { return nEditEndRow
; }
460 Rectangle
GetEditArea( ScSplitPos eWhich
, SCCOL nPosX
, SCROW nPosY
, Window
* pWin
,
461 const ScPatternAttr
* pPattern
, BOOL bForceToTop
);
463 void SetTabNo( SCTAB nNewTab
);
464 void SetActivePart( ScSplitPos eNewActive
);
466 Point
GetScrPos( SCCOL nWhereX
, SCROW nWhereY
, ScSplitPos eWhich
,
467 BOOL bAllowNeg
= FALSE
) const;
468 Point
GetScrPos( SCCOL nWhereX
, SCROW nWhereY
, ScHSplitPos eWhich
) const;
469 Point
GetScrPos( SCCOL nWhereX
, SCROW nWhereY
, ScVSplitPos eWhich
) const;
471 SCCOL
CellsAtX( SCsCOL nPosX
, SCsCOL nDir
, ScHSplitPos eWhichX
, USHORT nScrSizeY
= SC_SIZE_NONE
) const;
472 SCROW
CellsAtY( SCsROW nPosY
, SCsROW nDir
, ScVSplitPos eWhichY
, USHORT nScrSizeX
= SC_SIZE_NONE
) const;
474 SCCOL
VisibleCellsX( ScHSplitPos eWhichX
) const; // angezeigte komplette Zellen
475 SCROW
VisibleCellsY( ScVSplitPos eWhichY
) const;
476 SCCOL
PrevCellsX( ScHSplitPos eWhichX
) const; // Zellen auf der vorgehenden Seite
477 SCROW
PrevCellsY( ScVSplitPos eWhichY
) const;
478 //UNUSED2008-05 SCCOL LastCellsX( ScHSplitPos eWhichX ) const; // Zellen auf der letzten Seite
479 //UNUSED2008-05 SCROW LastCellsY( ScVSplitPos eWhichY ) const;
482 //UNUSED2008-05 void UpdateOle( ScSplitPos eWhich );
483 void SetScreen( SCCOL nCol1
, SCROW nRow1
, SCCOL nCol2
, SCROW nRow2
);
484 void SetScreen( const Rectangle
& rVisArea
);
485 void SetScreenPos( const Point
& rVisAreaStart
);
487 void UpdateScreenZoom( const Fraction
& rNewX
, const Fraction
& rNewY
);
489 Size
GetScrSize() const { return aScrSize
; }
492 Point
GetPixPos( ScSplitPos eWhich
) const
493 { return Point( pThisTab
->nPixPosX
[WhichH(eWhich
)],
494 pThisTab
->nPixPosY
[WhichV(eWhich
)] ); }
495 void SetSpellingView( EditView
* pSpView
) { pSpellingView
= pSpView
; }
496 EditView
* GetSpellingView() const { return pSpellingView
; }
498 void UpdateOutlinerFlags( Outliner
& rOutl
) const;
500 Point
GetMousePosPixel();
502 BOOL
UpdateFixX(SCTAB nTab
= MAXTAB
+1);
503 BOOL
UpdateFixY(SCTAB nTab
= MAXTAB
+1);
505 SCCOL
GetTabStartCol() const { return nTabStartCol
; }
506 void SetTabStartCol(SCCOL nNew
) { nTabStartCol
= nNew
; }
508 ScAddress
GetCurPos() const;
510 const Size
& GetScenButSize() const { return aScenButSize
; }
511 void SetScenButSize(const Size
& rNew
) { aScenButSize
= rNew
; }
513 BOOL
IsSelCtrlMouseClick() { return bSelCtrlMouseClick
; }
515 static inline long ToPixel( USHORT nTwips
, double nFactor
);
519 // ---------------------------------------------------------------------------
521 inline long ScViewData::ToPixel( USHORT nTwips
, double nFactor
)
523 long nRet
= (long)( nTwips
* nFactor
);
524 if ( !nRet
&& nTwips
)
529 inline void ScViewData::GetMoveCursor( SCCOL
& rCurX
, SCROW
& rCurY
)
543 inline ScHSplitPos
WhichH( ScSplitPos ePos
)
545 return (ePos
==SC_SPLIT_TOPLEFT
|| ePos
==SC_SPLIT_BOTTOMLEFT
) ?
546 SC_SPLIT_LEFT
: SC_SPLIT_RIGHT
;
549 inline ScVSplitPos
WhichV( ScSplitPos ePos
)
551 return (ePos
==SC_SPLIT_TOPLEFT
|| ePos
==SC_SPLIT_TOPRIGHT
) ?
552 SC_SPLIT_TOP
: SC_SPLIT_BOTTOM
;
555 inline ScSplitPos
Which( ScHSplitPos eHPos
)
557 return (eHPos
==SC_SPLIT_LEFT
) ?
558 SC_SPLIT_BOTTOMLEFT
: SC_SPLIT_BOTTOMRIGHT
;
561 inline ScSplitPos
Which( ScVSplitPos eVPos
)
563 return (eVPos
==SC_SPLIT_TOP
) ?
564 SC_SPLIT_TOPLEFT
: SC_SPLIT_BOTTOMLEFT
;