summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/select.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/select.cxx')
-rw-r--r--sc/source/ui/view/select.cxx122
1 files changed, 61 insertions, 61 deletions
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index 52139ccb8f04..cae66699b717 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,19 +46,19 @@
#include "docsh.hxx"
#include "tabprotection.hxx"
-extern USHORT nScFillModeMouseModifier; // global.cxx
+extern USHORT nScFillModeMouseModifier; // global.cxx
using namespace com::sun::star;
// STATIC DATA -----------------------------------------------------------
-static Point aSwitchPos; //! Member
+static Point aSwitchPos; //! Member
static BOOL bDidSwitch = FALSE;
// -----------------------------------------------------------------------
//
-// View (Gridwin / Tastatur)
+// View (Gridwin / Tastatur)
//
ScViewFunctionSet::ScViewFunctionSet( ScViewData* pNewViewData ) :
@@ -83,7 +83,7 @@ void ScViewFunctionSet::SetSelectionEngine( ScViewSelectionEngine* pSelEngine )
pEngine = pSelEngine;
}
-// Drag & Drop
+// Drag & Drop
void __EXPORT ScViewFunctionSet::BeginDrag()
{
@@ -106,7 +106,7 @@ void __EXPORT ScViewFunctionSet::BeginDrag()
BOOL bRefMode = pScMod->IsFormulaMode();
if (!bRefMode)
{
- pViewData->GetView()->FakeButtonUp( GetWhich() ); // ButtonUp is swallowed
+ pViewData->GetView()->FakeButtonUp( GetWhich() ); // ButtonUp is swallowed
ScMarkData& rMark = pViewData->GetMarkData();
rMark.MarkToSimple();
@@ -143,22 +143,22 @@ void __EXPORT ScViewFunctionSet::BeginDrag()
Window* pWindow = pViewData->GetActiveWin();
if ( pWindow->IsTracking() )
- pWindow->EndTracking( ENDTRACK_CANCEL ); // abort selecting
+ pWindow->EndTracking( ENDTRACK_CANCEL ); // abort selecting
- SC_MOD()->SetDragObject( pTransferObj, NULL ); // for internal D&D
+ SC_MOD()->SetDragObject( pTransferObj, NULL ); // for internal D&D
pTransferObj->StartDrag( pWindow, nDragActions );
- return; // dragging started
+ return; // dragging started
}
else
delete pClipDoc;
}
}
- Sound::Beep(); // can't drag
+ Sound::Beep(); // can't drag
}
-// Selection
+// Selection
void __EXPORT ScViewFunctionSet::CreateAnchor()
{
@@ -236,15 +236,15 @@ BOOL __EXPORT ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOO
if ( bDidSwitch )
{
if ( rPointPixel == aSwitchPos )
- return FALSE; // nicht auf falschem Fenster scrollen
+ return FALSE; // nicht auf falschem Fenster scrollen
else
bDidSwitch = FALSE;
}
- aSwitchPos = rPointPixel; // nur wichtig, wenn bDidSwitch
+ aSwitchPos = rPointPixel; // nur wichtig, wenn bDidSwitch
- // treat position 0 as -1, so scrolling is always possible
- // (with full screen and hidden headers, the top left border may be at 0)
- // (moved from ScViewData::GetPosFromPixel)
+ // treat position 0 as -1, so scrolling is always possible
+ // (with full screen and hidden headers, the top left border may be at 0)
+ // (moved from ScViewData::GetPosFromPixel)
Point aEffPos = rPointPixel;
if ( aEffPos.X() == 0 )
@@ -252,7 +252,7 @@ BOOL __EXPORT ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOO
if ( aEffPos.Y() == 0 )
aEffPos.Y() = -1;
- // Scrolling
+ // Scrolling
Size aWinSize = pEngine->GetWindow()->GetOutputSizePixel();
BOOL bRightScroll = ( aEffPos.X() >= aWinSize.Width() );
@@ -260,13 +260,13 @@ BOOL __EXPORT ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOO
BOOL bNegScroll = ( aEffPos.X() < 0 || aEffPos.Y() < 0 );
BOOL bScroll = bRightScroll || bBottomScroll || bNegScroll;
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCsCOL nPosX;
+ SCsROW nPosY;
pViewData->GetPosFromPixel( aEffPos.X(), aEffPos.Y(), GetWhich(),
- nPosX, nPosY, TRUE, TRUE ); // mit Repair
+ nPosX, nPosY, TRUE, TRUE ); // mit Repair
- // fuer AutoFill in der Mitte der Zelle umschalten
- // dabei aber nicht das Scrolling nach rechts/unten verhindern
+ // fuer AutoFill in der Mitte der Zelle umschalten
+ // dabei aber nicht das Scrolling nach rechts/unten verhindern
if ( pViewData->IsFillMode() || pViewData->GetFillMode() == SC_FILL_MATRIX )
{
BOOL bLeft, bTop;
@@ -284,10 +284,10 @@ BOOL __EXPORT ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOO
nPosY = -1;
}
}
- // negativ ist erlaubt
+ // negativ ist erlaubt
}
- // ueber Fixier-Grenze bewegt?
+ // ueber Fixier-Grenze bewegt?
ScSplitPos eWhich = GetWhich();
if ( eWhich == pViewData->GetActivePart() )
@@ -377,7 +377,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
else if (pViewData->IsFillMode() ||
(pViewData->GetFillMode() == SC_FILL_MATRIX && (nScFillModeMouseModifier & KEY_MOD1) ))
{
- // Wenn eine Matrix angefasst wurde, kann mit Ctrl auf AutoFill zurueckgeschaltet werden
+ // Wenn eine Matrix angefasst wurde, kann mit Ctrl auf AutoFill zurueckgeschaltet werden
SCCOL nStartX, nEndX;
SCROW nStartY, nEndY; // Block
@@ -395,9 +395,9 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
if ( nPosX+1 >= (SCsCOL) nStartX && nPosX <= (SCsCOL) nEndX &&
nPosY+1 >= (SCsROW) nStartY && nPosY <= (SCsROW) nEndY &&
- ( nPosX != nEndX || nPosY != nEndY ) ) // verkleinern ?
+ ( nPosX != nEndX || nPosY != nEndY ) ) // verkleinern ?
{
- // Richtung (links oder oben)
+ // Richtung (links oder oben)
long nSizeX = 0;
for (SCCOL i=nPosX+1; i<=nEndX; i++)
@@ -417,7 +417,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
if ( nDelStartY < nStartY )
nDelStartY = nStartY;
- // Bereich setzen
+ // Bereich setzen
pViewData->SetDelMark( ScRange( nDelStartX,nDelStartY,nTab,
nEndX,nEndY,nTab ) );
@@ -426,10 +426,10 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
pViewData->GetView()->
PaintArea( nStartX,nDelStartY, nEndX,nEndY, SC_UPDATE_MARKS );
- nPosX = nEndX; // roten Rahmen um ganzen Bereich lassen
+ nPosX = nEndX; // roten Rahmen um ganzen Bereich lassen
nPosY = nEndY;
- // Referenz wieder richtigherum, falls unten umgedreht
+ // Referenz wieder richtigherum, falls unten umgedreht
if ( nStartX != pViewData->GetRefStartX() || nStartY != pViewData->GetRefStartY() )
{
pViewData->GetView()->DoneRefMode();
@@ -450,8 +450,8 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
long nSizeX = 0;
if ( bNegX )
{
- // #94321# in SetCursorAtPoint hidden columns are skipped.
- // They must be skipped here too, or the result will always be the first hidden column.
+ // #94321# in SetCursorAtPoint hidden columns are skipped.
+ // They must be skipped here too, or the result will always be the first hidden column.
do ++nPosX; while ( nPosX<nStartX && pDoc->ColHidden(nPosX, nTab) );
for (SCCOL i=nPosX; i<nStartX; i++)
nSizeX += pDoc->GetColWidth( i, nTab );
@@ -463,8 +463,8 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
long nSizeY = 0;
if ( bNegY )
{
- // #94321# in SetCursorAtPoint hidden rows are skipped.
- // They must be skipped here too, or the result will always be the first hidden row.
+ // #94321# in SetCursorAtPoint hidden rows are skipped.
+ // They must be skipped here too, or the result will always be the first hidden row.
if (++nPosY < nStartY)
{
nPosY = pDoc->FirstVisibleRow(nPosY, nStartY-1, nTab);
@@ -476,7 +476,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
else
nSizeY += pDoc->GetRowHeight( nEndY+1, nPosY, nTab );
- if ( nSizeX > nSizeY ) // Fill immer nur in einer Richtung
+ if ( nSizeX > nSizeY ) // Fill immer nur in einer Richtung
{
nPosY = nEndY;
bNegY = FALSE;
@@ -538,12 +538,12 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
}
// else neue Modi
}
- else // normales Markieren
+ else // normales Markieren
{
BOOL bHideCur = bAnchor && ( (SCCOL)nPosX != pViewData->GetCurX() ||
(SCROW)nPosY != pViewData->GetCurY() );
if (bHideCur)
- pView->HideAllCursors(); // sonst zweimal: Block und SetCursor
+ pView->HideAllCursors(); // sonst zweimal: Block und SetCursor
if (bAnchor)
{
@@ -576,18 +576,18 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
aAnchorPos.Set( nPosX, nPosY, nTab );
bStarted = TRUE;
}
- // #i3875# *Hack* When a new cell is Ctrl-clicked with no pre-selected cells,
- // it highlights that new cell as well as the old cell where the cursor is
- // positioned prior to the click. A selection mode via Shift-F8 should also
+ // #i3875# *Hack* When a new cell is Ctrl-clicked with no pre-selected cells,
+ // it highlights that new cell as well as the old cell where the cursor is
+ // positioned prior to the click. A selection mode via Shift-F8 should also
// follow the same behavior.
else if ( pViewData->IsSelCtrlMouseClick() )
{
SCCOL nOldX = pViewData->GetCurX();
SCROW nOldY = pViewData->GetCurY();
-
+
pView->InitBlockMode( nOldX, nOldY, nTab, TRUE );
pView->MarkCursor( (SCCOL) nOldX, (SCROW) nOldY, nTab );
-
+
if ( nOldX != nPosX || nOldY != nPosY )
{
pView->DoneBlockMode( TRUE );
@@ -595,7 +595,7 @@ BOOL ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScrol
pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab );
aAnchorPos.Set( nPosX, nPosY, nTab );
}
-
+
bStarted = TRUE;
}
pView->SetCursor( (SCCOL) nPosX, (SCROW) nPosY );
@@ -624,8 +624,8 @@ BOOL __EXPORT ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
ScMarkData& rMark = pViewData->GetMarkData();
if (bAnchor || !rMark.IsMultiMarked())
{
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCsCOL nPosX;
+ SCsROW nPosY;
pViewData->GetPosFromPixel( rPointPixel.X(), rPointPixel.Y(), GetWhich(), nPosX, nPosY );
return pViewData->GetMarkData().IsCellMarked( (SCCOL) nPosX, (SCROW) nPosY );
}
@@ -635,7 +635,7 @@ BOOL __EXPORT ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
void __EXPORT ScViewFunctionSet::DeselectAtPoint( const Point& /* rPointPixel */ )
{
- // gibt's nicht
+ // gibt's nicht
}
void __EXPORT ScViewFunctionSet::DeselectAll()
@@ -664,7 +664,7 @@ ScViewSelectionEngine::ScViewSelectionEngine( Window* pWindow, ScTabView* pView,
SelectionEngine( pWindow, pView->GetFunctionSet() ),
eWhich( eSplitPos )
{
- // Parameter einstellen
+ // Parameter einstellen
SetSelectionMode( MULTIPLE_SELECTION );
EnableDrag( TRUE );
}
@@ -673,7 +673,7 @@ ScViewSelectionEngine::ScViewSelectionEngine( Window* pWindow, ScTabView* pView,
//------------------------------------------------------------------------
//
-// Spalten- / Zeilenheader
+// Spalten- / Zeilenheader
//
ScHeaderFunctionSet::ScHeaderFunctionSet( ScViewData* pNewViewData ) :
@@ -731,14 +731,14 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B
{
if ( bDidSwitch )
{
- // die naechste gueltige Position muss vom anderen Fenster kommen
+ // die naechste gueltige Position muss vom anderen Fenster kommen
if ( rPointPixel == aSwitchPos )
- return FALSE; // nicht auf falschem Fenster scrollen
+ return FALSE; // nicht auf falschem Fenster scrollen
else
bDidSwitch = FALSE;
}
- // Scrolling
+ // Scrolling
Size aWinSize = pViewData->GetActiveWin()->GetOutputSizePixel();
BOOL bScroll;
@@ -747,7 +747,7 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B
else
bScroll = ( rPointPixel.Y() < 0 || rPointPixel.Y() >= aWinSize.Height() );
- // ueber Fixier-Grenze bewegt?
+ // ueber Fixier-Grenze bewegt?
BOOL bSwitched = FALSE;
if ( bColumn )
@@ -763,7 +763,7 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B
}
}
}
- else // Zeilenkoepfe
+ else // Zeilenkoepfe
{
if ( pViewData->GetVSplitMode() == SC_SPLIT_FIX )
{
@@ -780,13 +780,13 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B
{
aSwitchPos = rPointPixel;
bDidSwitch = TRUE;
- return FALSE; // nicht mit falschen Positionen rechnen
+ return FALSE; // nicht mit falschen Positionen rechnen
}
//
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCsCOL nPosX;
+ SCsROW nPosY;
pViewData->GetPosFromPixel( rPointPixel.X(), rPointPixel.Y(), pViewData->GetActivePart(),
nPosX, nPosY, FALSE );
if (bColumn)
@@ -813,7 +813,7 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B
if ( !bAnchor || !pView->IsBlockMode() )
{
pView->DoneBlockMode( TRUE );
- pViewData->GetMarkData().MarkToMulti(); //! wer verstellt das ???
+ pViewData->GetMarkData().MarkToMulti(); //! wer verstellt das ???
pView->InitBlockMode( nPosX, nPosY, pViewData->GetTabNo(), TRUE, bColumn, !bColumn );
bAnchor = TRUE;
@@ -821,7 +821,7 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B
pView->MarkCursor( nPosX, nPosY, pViewData->GetTabNo(), bColumn, !bColumn );
- // SelectionChanged innerhalb von HideCursor wegen UpdateAutoFillMark
+ // SelectionChanged innerhalb von HideCursor wegen UpdateAutoFillMark
pView->SelectionChanged();
if (bHide)
@@ -832,8 +832,8 @@ BOOL __EXPORT ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, B
BOOL __EXPORT ScHeaderFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
{
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCsCOL nPosX;
+ SCsROW nPosY;
pViewData->GetPosFromPixel( rPointPixel.X(), rPointPixel.Y(), pViewData->GetActivePart(),
nPosX, nPosY, FALSE );
@@ -859,7 +859,7 @@ void __EXPORT ScHeaderFunctionSet::DeselectAll()
ScHeaderSelectionEngine::ScHeaderSelectionEngine( Window* pWindow, ScHeaderFunctionSet* pFuncSet ) :
SelectionEngine( pWindow, pFuncSet )
{
- // Parameter einstellen
+ // Parameter einstellen
SetSelectionMode( MULTIPLE_SELECTION );
EnableDrag( FALSE );
}