summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-22 16:51:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-23 11:20:43 +0200
commited5abacda979d05fa4328953662ea98e6afa3c51 (patch)
tree9fa0b4f9b20a90bb1aa4730ac3d6c1b62fcbcdcc /sc/source/ui
parent6a6aa56b45f19c250e9c4111b478203ddb75478b (diff)
drop the SCsROW/SCsCOL/SCsTAB typedefs
which are exactly the same as the regular SCROW/etc typedefs, and have been this way since commit 43a21999a92c99867bc3417291719996776b0647 Author: Oliver Bolte <obo@openoffice.org> Date: Fri Jun 4 09:00:39 2004 +0000 INTEGRATION: CWS rowlimit (1.1.2); FILE ADDED Change-Id: Ia7f75d71227ca3167b5fd56019bb9bdf0697d1b0 Reviewed-on: https://gerrit.libreoffice.org/37911 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx12
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx8
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx6
-rw-r--r--sc/source/ui/drawfunc/fupoor.cxx4
-rw-r--r--sc/source/ui/drawfunc/fusel2.cxx16
-rw-r--r--sc/source/ui/inc/gridwin.hxx12
-rw-r--r--sc/source/ui/inc/select.hxx2
-rw-r--r--sc/source/ui/inc/tabview.hxx30
-rw-r--r--sc/source/ui/inc/viewdata.hxx8
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx12
-rw-r--r--sc/source/ui/view/auditsh.cxx4
-rw-r--r--sc/source/ui/view/cellsh3.cxx4
-rw-r--r--sc/source/ui/view/cellsh4.cxx50
-rw-r--r--sc/source/ui/view/gridwin.cxx126
-rw-r--r--sc/source/ui/view/gridwin2.cxx20
-rw-r--r--sc/source/ui/view/gridwin4.cxx4
-rw-r--r--sc/source/ui/view/gridwin5.cxx10
-rw-r--r--sc/source/ui/view/select.cxx56
-rw-r--r--sc/source/ui/view/tabview.cxx48
-rw-r--r--sc/source/ui/view/tabview2.cxx70
-rw-r--r--sc/source/ui/view/tabview3.cxx121
-rw-r--r--sc/source/ui/view/viewdata.cxx20
-rw-r--r--sc/source/ui/view/viewfun2.cxx4
25 files changed, 325 insertions, 326 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index cfcf74a6b74f..772b8b5a3088 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -431,8 +431,8 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
mbDelIns = true;
sal_Int16 nId(0);
- SCsCOL nX(rRef.GetDx());
- SCsROW nY(rRef.GetDy());
+ SCCOL nX(rRef.GetDx());
+ SCROW nY(rRef.GetDy());
ScRange aRange(rRef.GetRange());
if ((nX < 0) || (nY < 0))
{
@@ -973,8 +973,8 @@ uno::Reference< XAccessible > SAL_CALL ScAccessibleSpreadsheet::getAccessibleAtP
IsObjectValid();
if (mpViewShell)
{
- SCsCOL nX;
- SCsROW nY;
+ SCCOL nX;
+ SCROW nY;
mpViewShell->GetViewData().GetPosFromPixel( rPoint.X, rPoint.Y, meSplitPos, nX, nY);
try {
xAccessible = getAccessibleCellAt(nY, nX);
@@ -1412,8 +1412,8 @@ tools::Rectangle ScAccessibleSpreadsheet::GetVisCells(const tools::Rectangle& rV
{
if (mpViewShell)
{
- SCsCOL nStartX, nEndX;
- SCsROW nStartY, nEndY;
+ SCCOL nStartX, nEndX;
+ SCROW nStartY, nEndY;
mpViewShell->GetViewData().GetPosFromPixel( 1, 1, meSplitPos, nStartX, nStartY);
mpViewShell->GetViewData().GetPosFromPixel( rVisArea.GetWidth(), rVisArea.GetHeight(), meSplitPos, nEndX, nEndY);
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index cce0b5f4e6ad..71426d86ea70 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1180,7 +1180,7 @@ bool checkNewOutputRange(ScDPObject& rDPObj, ScDocShell& rDocShell, ScRange& rNe
// New output range intersteps with the source data. Move it up to
// where the old range is and see if that works.
ScRange aOldRange = rDPObj.GetOutRange();
- SCsROW nDiff = aOldRange.aStart.Row() - rNewOut.aStart.Row();
+ SCROW nDiff = aOldRange.aStart.Row() - rNewOut.aStart.Row();
rNewOut.aStart.SetRow(aOldRange.aStart.Row());
rNewOut.aEnd.IncRow(nDiff);
if (!ValidRow(rNewOut.aStart.Row()) || !ValidRow(rNewOut.aEnd.Row()))
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 20f61d069a02..26d2bfd7e3f5 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2046,12 +2046,12 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
case INS_CELLSDOWN:
case INS_INSROWS_BEFORE:
case INS_INSROWS_AFTER:
- aRange.aEnd.IncRow(static_cast<SCsCOL>(nEndRow-nStartRow+1));
+ aRange.aEnd.IncRow(static_cast<SCCOL>(nEndRow-nStartRow+1));
break;
case INS_CELLSRIGHT:
case INS_INSCOLS_BEFORE:
case INS_INSCOLS_AFTER:
- aRange.aEnd.IncCol(static_cast<SCsCOL>(nEndCol-nStartCol+1));
+ aRange.aEnd.IncCol(static_cast<SCCOL>(nEndCol-nStartCol+1));
break;
default:
break;
@@ -2581,11 +2581,11 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
{
case DEL_CELLSUP:
case DEL_DELROWS:
- aRange.aEnd.SetRow(static_cast<SCsCOL>( aRange.aEnd.Row()-nDecreaseRowCount));
+ aRange.aEnd.SetRow(static_cast<SCCOL>( aRange.aEnd.Row()-nDecreaseRowCount));
break;
case DEL_CELLSLEFT:
case DEL_DELCOLS:
- aRange.aEnd.SetCol(static_cast<SCsCOL>( aRange.aEnd.Col()-nDecreaseColCount));
+ aRange.aEnd.SetCol(static_cast<SCCOL>( aRange.aEnd.Col()-nDecreaseColCount));
break;
default:
break;
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 3ea22d26643c..c8680615b789 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1069,7 +1069,7 @@ void ScExternalRefCache::getAllTableNames(sal_uInt16 nFileId, vector<OUString>&
rTabNames.push_back(itr->maRealName);
}
-SCsTAB ScExternalRefCache::getTabSpan( sal_uInt16 nFileId, const OUString& rStartTabName, const OUString& rEndTabName ) const
+SCTAB ScExternalRefCache::getTabSpan( sal_uInt16 nFileId, const OUString& rStartTabName, const OUString& rEndTabName ) const
{
DocItem* pDoc = getDocItem(nFileId);
if (!pDoc)
@@ -1090,7 +1090,7 @@ SCsTAB ScExternalRefCache::getTabSpan( sal_uInt16 nFileId, const OUString& rStar
size_t nStartDist = ::std::distance( itrBeg, itrStartTab);
size_t nEndDist = ::std::distance( itrBeg, itrEndTab);
- return nStartDist <= nEndDist ? static_cast<SCsTAB>(nEndDist - nStartDist + 1) : -static_cast<SCsTAB>(nStartDist - nEndDist + 1);
+ return nStartDist <= nEndDist ? static_cast<SCTAB>(nEndDist - nStartDist + 1) : -static_cast<SCTAB>(nStartDist - nEndDist + 1);
}
void ScExternalRefCache::getAllNumberFormats(vector<sal_uInt32>& rNumFmts) const
@@ -1721,7 +1721,7 @@ void ScExternalRefManager::getAllCachedTableNames(sal_uInt16 nFileId, vector<OUS
maRefCache.getAllTableNames(nFileId, rTabNames);
}
-SCsTAB ScExternalRefManager::getCachedTabSpan( sal_uInt16 nFileId, const OUString& rStartTabName, const OUString& rEndTabName ) const
+SCTAB ScExternalRefManager::getCachedTabSpan( sal_uInt16 nFileId, const OUString& rStartTabName, const OUString& rEndTabName ) const
{
return maRefCache.getTabSpan( nFileId, rStartTabName, rEndTabName);
}
diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
index 393e6f4a16dc..be4f229c5beb 100644
--- a/sc/source/ui/drawfunc/fupoor.cxx
+++ b/sc/source/ui/drawfunc/fupoor.cxx
@@ -81,8 +81,8 @@ void FuPoor::ForceScroll(const Point& aPixPos)
aScrollTimer.Stop();
Size aSize = pWindow->GetSizePixel();
- SCsCOL dx = 0;
- SCsROW dy = 0;
+ SCCOL dx = 0;
+ SCROW dy = 0;
if ( aPixPos.X() <= 0 ) dx = -1;
if ( aPixPos.X() >= aSize.Width() ) dx = 1;
diff --git a/sc/source/ui/drawfunc/fusel2.cxx b/sc/source/ui/drawfunc/fusel2.cxx
index 61ba449bb906..360dac6e1a67 100644
--- a/sc/source/ui/drawfunc/fusel2.cxx
+++ b/sc/source/ui/drawfunc/fusel2.cxx
@@ -67,23 +67,23 @@ bool FuSelection::TestDetective( SdrPageView* pPV, const Point& rPos )
Point aLineStart = pObject->GetPoint(0);
Point aLineEnd = pObject->GetPoint(1);
Point aPixel = pWindow->LogicToPixel( aLineStart );
- SCsCOL nStartCol;
- SCsROW nStartRow;
+ SCCOL nStartCol;
+ SCROW nStartRow;
rViewData.GetPosFromPixel( aPixel.X(), aPixel.Y(), ePos, nStartCol, nStartRow );
aPixel = pWindow->LogicToPixel( aLineEnd );
- SCsCOL nEndCol;
- SCsROW nEndRow;
+ SCCOL nEndCol;
+ SCROW nEndRow;
rViewData.GetPosFromPixel( aPixel.X(), aPixel.Y(), ePos, nEndCol, nEndRow );
- SCsCOL nCurX = (SCsCOL) rViewData.GetCurX();
- SCsROW nCurY = (SCsROW) rViewData.GetCurY();
+ SCCOL nCurX = rViewData.GetCurX();
+ SCROW nCurY = rViewData.GetCurY();
bool bStart = ( Diff( rPos,aLineStart ) > Diff( rPos,aLineEnd ) );
if ( nCurX == nStartCol && nCurY == nStartRow )
bStart = false;
else if ( nCurX == nEndCol && nCurY == nEndRow )
bStart = true;
- SCsCOL nDifX;
- SCsROW nDifY;
+ SCCOL nDifX;
+ SCROW nDifY;
if ( bStart )
{
nDifX = nStartCol - nCurX;
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index ac90b1a14287..beb9b83c393f 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -156,8 +156,8 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou
ScDPObject* pDragDPObj; //! name?
sal_uInt16 nRFIndex;
- SCsCOL nRFAddX;
- SCsROW nRFAddY;
+ SCCOL nRFAddX;
+ SCROW nRFAddY;
sal_uInt16 nPagebreakMouse; // Page break mode, Drag
SCCOLROW nPagebreakBreak;
@@ -268,7 +268,7 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou
bool IsSpellErrorAtPos( const Point& rPos, SCCOL nCol1, SCROW nRow );
bool HitRangeFinder( const Point& rMouse, RfCorner& rCorner, sal_uInt16* pIndex,
- SCsCOL* pAddX, SCsROW* pAddY );
+ SCCOL* pAddX, SCROW* pAddY );
sal_uInt16 HitPageBreak( const Point& rMouse, ScRange* pSource,
SCCOLROW* pBreak, SCCOLROW* pPrev );
@@ -279,11 +279,11 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou
rTextStartPosX returns the column where the text that overflows
starts.
*/
- bool IsCellCoveredByText(SCsCOL nPosX, SCsROW nPosY, SCTAB nTab, SCsCOL &rTextStartPosX);
+ bool IsCellCoveredByText(SCCOL nPosX, SCROW nPosY, SCTAB nTab, SCCOL &rTextStartPosX);
void PasteSelection( const Point& rPosPixel );
- void SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, SCsROW nCellY );
+ void SelectForContextMenu( const Point& rPosPixel, SCCOL nCellX, SCROW nCellY );
void GetSelectionRects( ::std::vector< tools::Rectangle >& rPixelRects );
@@ -386,7 +386,7 @@ public:
void UpdateListValPos( bool bVisible, const ScAddress& rPos );
- bool ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, bool bKeyboard );
+ bool ShowNoteMarker( SCCOL nPosX, SCROW nPosY, bool bKeyboard );
void HideNoteMarker();
/// MapMode for the drawinglayer objects.
diff --git a/sc/source/ui/inc/select.hxx b/sc/source/ui/inc/select.hxx
index 15a2b3d3d782..b78538ca4592 100644
--- a/sc/source/ui/inc/select.hxx
+++ b/sc/source/ui/inc/select.hxx
@@ -70,7 +70,7 @@ public:
virtual void DeselectAtPoint( const Point& rPointPixel ) override;
virtual void DeselectAll() override;
- bool SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScroll );
+ bool SetCursorAtCell( SCCOL nPosX, SCROW nPosY, bool bScroll );
};
class ScHeaderFunctionSet : public FunctionSet // Column / row headers
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 61596968e793..9f60f9b6eeb0 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -228,11 +228,11 @@ private:
static void SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, bool bLayoutRTL );
static long GetScrollBarPos( ScrollBar& rScroll );
- void GetAreaMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
- SCsCOL& rAreaX, SCsROW& rAreaY, ScFollowMode& rMode);
+ void GetAreaMoveEndPosition(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode,
+ SCCOL& rAreaX, SCROW& rAreaY, ScFollowMode& rMode);
- void SkipCursorHorizontal(SCsCOL& rCurX, SCsROW& rCurY, SCsCOL nOldX, SCsROW nMovX);
- void SkipCursorVertical(SCsCOL& rCurX, SCsROW& rCurY, SCsROW nOldY, SCsROW nMovY);
+ void SkipCursorHorizontal(SCCOL& rCurX, SCROW& rCurY, SCCOL nOldX, SCROW nMovX);
+ void SkipCursorVertical(SCCOL& rCurX, SCROW& rCurY, SCROW nOldY, SCROW nMovY);
/**
*
@@ -397,7 +397,7 @@ public:
void HideAllCursors();
void ShowAllCursors();
- void AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
+ void AlignToCursor( SCCOL nCurX, SCROW nCurY, ScFollowMode eMode,
const ScSplitPos* pWhich = nullptr );
SvxZoomType GetZoomType() const;
@@ -413,18 +413,18 @@ public:
// MoveCursorArea - Data block
// MoveCursorEnd - top left / user range
- SC_DLLPUBLIC void MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
+ SC_DLLPUBLIC void MoveCursorAbs( SCCOL nCurX, SCROW nCurY, ScFollowMode eMode,
bool bShift, bool bControl,
bool bKeepOld = false, bool bKeepSel = false );
- void MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
+ void MoveCursorRel( SCCOL nMovX, SCROW nMovY, ScFollowMode eMode,
bool bShift, bool bKeepSel = false );
- void MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
+ void MoveCursorPage( SCCOL nMovX, SCROW nMovY, ScFollowMode eMode,
bool bShift, bool bKeepSel = false );
- void MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
+ void MoveCursorArea( SCCOL nMovX, SCROW nMovY, ScFollowMode eMode,
bool bShift, bool bKeepSel = false );
- void MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
+ void MoveCursorEnd( SCCOL nMovX, SCROW nMovY, ScFollowMode eMode,
bool bShift, bool bKeepSel = false );
- void MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, bool bShift );
+ void MoveCursorScreen( SCCOL nMovX, SCROW nMovY, ScFollowMode eMode, bool bShift );
void MoveCursorEnter( bool bShift ); // Shift for direction (select nothing)
@@ -432,7 +432,7 @@ public:
void FindNextUnprot( bool bShift, bool bInSelection );
- void GetPageMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, SCsCOL& rPageX, SCsROW& rPageY);
+ void GetPageMoveEndPosition(SCCOL nMovX, SCROW nMovY, SCCOL& rPageX, SCROW& rPageY);
SC_DLLPUBLIC void SetTabNo( SCTAB nTab, bool bNew = false, bool bExtendSelection = false, bool bSameTabButMoved = false );
void SelectNextTab( short nDir, bool bExtendSelection );
@@ -521,9 +521,9 @@ public:
bool IsBlockMode() const;
- void ExpandBlock(SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode);
- void ExpandBlockPage(SCsCOL nMovX, SCsROW nMovY);
- void ExpandBlockArea(SCsCOL nMovX, SCsROW nMovY);
+ void ExpandBlock(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode);
+ void ExpandBlockPage(SCCOL nMovX, SCROW nMovY);
+ void ExpandBlockArea(SCCOL nMovX, SCROW nMovY);
void MarkColumns();
void MarkRows();
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 21cae7f0e66a..0c0613526d8f 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -388,10 +388,10 @@ public:
// TRUE: Cell is merged
bool GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix ) const;
void GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
- SCsCOL& rPosX, SCsROW& rPosY,
+ SCCOL& rPosX, SCROW& rPosY,
bool bTestMerge = true, bool bRepair = false );
void GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich,
- SCsCOL nPosX, SCsROW nPosY, bool& rLeft, bool& rTop );
+ SCCOL nPosX, SCROW nPosY, bool& rLeft, bool& rTop );
bool IsRefMode() const { return bIsRefMode; }
ScRefType GetRefType() const { return eRefType; }
@@ -484,8 +484,8 @@ public:
Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScHSplitPos eWhich ) const;
Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScVSplitPos eWhich ) const;
- SCCOL CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeY = SC_SIZE_NONE ) const;
- SCROW CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeX = SC_SIZE_NONE ) const;
+ SCCOL CellsAtX( SCCOL nPosX, SCCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeY = SC_SIZE_NONE ) const;
+ SCROW CellsAtY( SCROW nPosY, SCROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeX = SC_SIZE_NONE ) const;
SCCOL VisibleCellsX( ScHSplitPos eWhichX ) const; // Completely visible cell
SCROW VisibleCellsY( ScVSplitPos eWhichY ) const;
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 768696981ee9..32f615aef1b2 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -5377,7 +5377,7 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection,
if ( pDocSh && nSourceCount )
{
ScRange aSourceRange(aRange);
- SCsCOLROW nCount = 0; // "Dest-Count"
+ SCCOLROW nCount = 0; // "Dest-Count"
FillDir eDir = FILL_TO_BOTTOM;
bool bError = false;
switch (nFillDirection)
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 170cc581d7ae..612ab210d246 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -1095,8 +1095,8 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP
uno::Reference< uno::XInterface > xTarget;
if (GetViewShell())
{
- SCsCOL nX;
- SCsROW nY;
+ SCCOL nX;
+ SCROW nY;
ScViewData& rData = GetViewShell()->GetViewData();
ScSplitPos eSplitMode = rData.GetActivePart();
SCTAB nTab(rData.GetTabNo());
@@ -1590,8 +1590,8 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitColumn()
if ( rViewData.GetVSplitMode() != SC_SPLIT_NONE )
ePos = SC_SPLIT_TOPLEFT;
- SCsCOL nCol;
- SCsROW nRow;
+ SCCOL nCol;
+ SCROW nRow;
rViewData.GetPosFromPixel( nSplit, 0, ePos, nCol, nRow, false );
if ( nCol > 0 )
return nCol;
@@ -1612,8 +1612,8 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitRow()
long nSplit = rViewData.GetVSplitPos();
ScSplitPos ePos = SC_SPLIT_TOPLEFT; // split vertically
- SCsCOL nCol;
- SCsROW nRow;
+ SCCOL nCol;
+ SCROW nRow;
rViewData.GetPosFromPixel( 0, nSplit, ePos, nCol, nRow, false );
if ( nRow > 0 )
return nRow;
diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx
index 3bfa57b28b37..833d736e256d 100644
--- a/sc/source/ui/view/auditsh.cxx
+++ b/sc/source/ui/view/auditsh.cxx
@@ -95,8 +95,8 @@ void ScAuditingShell::Execute( SfxRequest& rReq )
{
OSL_ENSURE( dynamic_cast<const SfxInt16Item*>( pXItem) != nullptr && dynamic_cast<const SfxInt32Item*>( pYItem) != nullptr,
"wrong items" );
- SCsCOL nCol = static_cast<SCsCOL>(static_cast<const SfxInt16Item*>(pXItem)->GetValue());
- SCsROW nRow = static_cast<SCsROW>(static_cast<const SfxInt32Item*>(pYItem)->GetValue());
+ SCCOL nCol = static_cast<SCCOL>(static_cast<const SfxInt16Item*>(pXItem)->GetValue());
+ SCROW nRow = static_cast<SCROW>(static_cast<const SfxInt32Item*>(pYItem)->GetValue());
ScViewFunc* pView = pViewData->GetView();
pView->MoveCursorAbs( nCol, nRow, SC_FOLLOW_LINE, false, false );
switch ( nFunction )
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index fdcfe1cad437..1b3105b87aab 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -837,8 +837,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
GetViewData()->GetSimpleArea( nStartCol,nStartRow,nStartTab,
nEndCol,nEndRow,nEndTab );
- if ( ( std::abs((SCsCOL)nEndCol-(SCsCOL)nStartCol) > 1 )
- && ( std::abs((SCsROW)nEndRow-(SCsROW)nStartRow) > 1 ) )
+ if ( ( std::abs(nEndCol-nStartCol) > 1 )
+ && ( std::abs(nEndRow-nStartRow) > 1 ) )
{
if ( pReqArgs )
{
diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx
index d466751f3e37..dc682c5f8850 100644
--- a/sc/source/ui/view/cellsh4.cxx
+++ b/sc/source/ui/view/cellsh4.cxx
@@ -42,7 +42,7 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
ScTabViewShell* pTabViewShell = pData->GetViewShell();
const SfxItemSet* pReqArgs = rReq.GetArgs();
sal_uInt16 nSlotId = rReq.GetSlot();
- SCsCOLROW nRepeat = 1;
+ SCCOLROW nRepeat = 1;
bool bSel = false;
bool bKeep = false;
@@ -50,7 +50,7 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
{
const SfxPoolItem* pItem;
if (pReqArgs->HasItem(FN_PARAM_1, &pItem))
- nRepeat = static_cast<SCsCOLROW>(static_cast<const SfxInt16Item*>(pItem)->GetValue());
+ nRepeat = static_cast<SCCOLROW>(static_cast<const SfxInt16Item*>(pItem)->GetValue());
if (pReqArgs->HasItem(FN_PARAM_2, &pItem))
bSel = static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
@@ -109,7 +109,7 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
return;
}
- SCsCOLROW nRTLSign = 1;
+ SCCOLROW nRTLSign = 1;
if ( pData->GetDocument()->IsLayoutRTL( pData->GetTabNo() ) )
{
//! evaluate cursor movement option?
@@ -160,31 +160,31 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
case SID_CURSORLEFT:
if (bScrollLock)
- pTabViewShell->ScrollX( static_cast<SCsCOL>(-nRepeat * nRTLSign), SC_SPLIT_LEFT);
+ pTabViewShell->ScrollX( static_cast<SCCOL>(-nRepeat * nRTLSign), SC_SPLIT_LEFT);
else
- pTabViewShell->MoveCursorRel( static_cast<SCsCOL>(-nRepeat * nRTLSign), 0, SC_FOLLOW_LINE, bSel, bKeep );
+ pTabViewShell->MoveCursorRel( static_cast<SCCOL>(-nRepeat * nRTLSign), 0, SC_FOLLOW_LINE, bSel, bKeep );
break;
case SID_CURSORBLKLEFT:
- pTabViewShell->MoveCursorArea( static_cast<SCsCOL>(-nRepeat * nRTLSign), 0, SC_FOLLOW_JUMP, bSel, bKeep );
+ pTabViewShell->MoveCursorArea( static_cast<SCCOL>(-nRepeat * nRTLSign), 0, SC_FOLLOW_JUMP, bSel, bKeep );
break;
case SID_CURSORRIGHT:
if (bScrollLock)
- pTabViewShell->ScrollX( static_cast<SCsCOL>(nRepeat * nRTLSign), SC_SPLIT_LEFT);
+ pTabViewShell->ScrollX( static_cast<SCCOL>(nRepeat * nRTLSign), SC_SPLIT_LEFT);
else
- pTabViewShell->MoveCursorRel( static_cast<SCsCOL>(nRepeat * nRTLSign), 0, SC_FOLLOW_LINE, bSel, bKeep );
+ pTabViewShell->MoveCursorRel( static_cast<SCCOL>(nRepeat * nRTLSign), 0, SC_FOLLOW_LINE, bSel, bKeep );
break;
case SID_CURSORBLKRIGHT:
- pTabViewShell->MoveCursorArea( static_cast<SCsCOL>(nRepeat * nRTLSign), 0, SC_FOLLOW_JUMP, bSel, bKeep );
+ pTabViewShell->MoveCursorArea( static_cast<SCCOL>(nRepeat * nRTLSign), 0, SC_FOLLOW_JUMP, bSel, bKeep );
break;
case SID_CURSORPAGEDOWN:
if (bScrollLock)
{
- SCsCOL nPageX;
- SCsROW nPageY;
+ SCCOL nPageX;
+ SCROW nPageY;
pTabViewShell->GetPageMoveEndPosition( 0, nRepeat, nPageX, nPageY);
pTabViewShell->ScrollY( nPageY, SC_SPLIT_BOTTOM);
}
@@ -195,8 +195,8 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
case SID_CURSORPAGEUP:
if (bScrollLock)
{
- SCsCOL nPageX;
- SCsROW nPageY;
+ SCCOL nPageX;
+ SCROW nPageY;
pTabViewShell->GetPageMoveEndPosition( 0, nRepeat, nPageX, nPageY);
pTabViewShell->ScrollY( -nPageY, SC_SPLIT_BOTTOM);
}
@@ -207,25 +207,25 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
case SID_CURSORPAGERIGHT_: //XXX !!!
if (bScrollLock)
{
- SCsCOL nPageX;
- SCsROW nPageY;
- pTabViewShell->GetPageMoveEndPosition( static_cast<SCsCOL>(nRepeat), 0, nPageX, nPageY);
+ SCCOL nPageX;
+ SCROW nPageY;
+ pTabViewShell->GetPageMoveEndPosition( static_cast<SCCOL>(nRepeat), 0, nPageX, nPageY);
pTabViewShell->ScrollX( nPageX, SC_SPLIT_LEFT);
}
else
- pTabViewShell->MoveCursorPage( static_cast<SCsCOL>(nRepeat), 0, SC_FOLLOW_FIX, bSel, bKeep );
+ pTabViewShell->MoveCursorPage( static_cast<SCCOL>(nRepeat), 0, SC_FOLLOW_FIX, bSel, bKeep );
break;
case SID_CURSORPAGELEFT_: //XXX !!!
if (bScrollLock)
{
- SCsCOL nPageX;
- SCsROW nPageY;
- pTabViewShell->GetPageMoveEndPosition( static_cast<SCsCOL>(nRepeat), 0, nPageX, nPageY);
+ SCCOL nPageX;
+ SCROW nPageY;
+ pTabViewShell->GetPageMoveEndPosition( static_cast<SCCOL>(nRepeat), 0, nPageX, nPageY);
pTabViewShell->ScrollX( -nPageX, SC_SPLIT_LEFT);
}
else
- pTabViewShell->MoveCursorPage( static_cast<SCsCOL>(-nRepeat), 0, SC_FOLLOW_FIX, bSel, bKeep );
+ pTabViewShell->MoveCursorPage( static_cast<SCCOL>(-nRepeat), 0, SC_FOLLOW_FIX, bSel, bKeep );
break;
default:
@@ -256,19 +256,19 @@ void ScCellShell::ExecuteCursorSel( SfxRequest& rReq )
pViewShell->ExecuteInputDirect();
}
- SCsCOLROW nRepeat = 1;
+ SCCOLROW nRepeat = 1;
const SfxItemSet* pReqArgs = rReq.GetArgs();
// get repetition
if ( pReqArgs != nullptr )
{
const SfxPoolItem* pItem;
if (pReqArgs->HasItem(FN_PARAM_1, &pItem))
- nRepeat = static_cast<SCsCOLROW>(static_cast<const SfxInt16Item*>(pItem)->GetValue());
+ nRepeat = static_cast<SCCOLROW>(static_cast<const SfxInt16Item*>(pItem)->GetValue());
}
- SCsROW nMovY = nRepeat;
+ SCROW nMovY = nRepeat;
// Horizontal direction depends on whether or not the UI language is RTL.
- SCsCOL nMovX = nRepeat;
+ SCCOL nMovX = nRepeat;
if (GetViewData()->GetDocument()->IsLayoutRTL(GetViewData()->GetTabNo()))
{
// mirror horizontal movement for right-to-left mode.
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index a464447c20fd..22a80c561b7a 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1351,12 +1351,12 @@ void ScGridWindow::MouseButtonDown( const MouseEvent& rMEvt )
nNestedButtonState = ScNestedButtonState::NONE;
}
-bool ScGridWindow::IsCellCoveredByText(SCsCOL nPosX, SCsROW nPosY, SCTAB nTab, SCsCOL &rTextStartPosX)
+bool ScGridWindow::IsCellCoveredByText(SCCOL nPosX, SCROW nPosY, SCTAB nTab, SCCOL &rTextStartPosX)
{
ScDocument* pDoc = pViewData->GetDocument();
// find the first non-empty cell (this, or to the left)
- SCsCOL nNonEmptyX = nPosX;
+ SCCOL nNonEmptyX = nPosX;
for (; nNonEmptyX >= 0; --nNonEmptyX)
{
ScRefCellValue aCell(*pDoc, ScAddress(nNonEmptyX, nPosY, nTab));
@@ -1401,8 +1401,8 @@ bool ScGridWindow::IsCellCoveredByText(SCsCOL nPosX, SCsROW nPosY, SCTAB nTab, S
if (aRect.IsEmpty())
return false;
- SCsCOL nTextEndX;
- SCsROW nTextEndY;
+ SCCOL nTextEndX;
+ SCROW nTextEndY;
// test the rightmost position of the text bounding box
long nMiddle = (aRect.Top() + aRect.Bottom()) / 2;
@@ -1468,8 +1468,8 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
if (bIsTiledRendering)
{
Point aPos(rMEvt.GetPosPixel());
- SCsCOL nPosX, nNonEmptyX(0);
- SCsROW nPosY;
+ SCCOL nPosX, nNonEmptyX(0);
+ SCROW nPosY;
SCTAB nTab = pViewData->GetTabNo();
pViewData->GetPosFromPixel(aPos.X(), aPos.Y(), eWhich, nPosX, nPosY);
@@ -1524,8 +1524,8 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
if ( rMEvt.IsLeft() && !rMEvt.GetModifier() )
{
Point aPos = rMEvt.GetPosPixel();
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
SfxInt16Item aPosXItem( SID_RANGE_COL, nPosX );
@@ -1556,8 +1556,8 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
if (bEditMode && (pViewData->GetRefTabNo() == pViewData->GetTabNo()))
{
Point aPos = rMEvt.GetPosPixel();
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
EditView* pEditView;
@@ -1567,8 +1567,8 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
SCCOL nEndCol = pViewData->GetEditEndCol();
SCROW nEndRow = pViewData->GetEditEndRow();
- if ( nPosX >= (SCsCOL) nEditCol && nPosX <= (SCsCOL) nEndCol &&
- nPosY >= (SCsROW) nEditRow && nPosY <= (SCsROW) nEndRow )
+ if ( nPosX >= nEditCol && nPosX <= nEndCol &&
+ nPosY >= nEditRow && nPosY <= nEndRow )
{
// when clicking in the table EditView, always reset the focus
if (bFormulaMode) // otherwise this has already happen above
@@ -1645,8 +1645,8 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
}
Point aPos = rMEvt.GetPosPixel();
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
SCTAB nTab = pViewData->GetTabNo();
@@ -1664,8 +1664,8 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
if ( !bDouble && !bFormulaMode && rMEvt.IsLeft() )
{
- SCsCOL nRealPosX;
- SCsROW nRealPosY;
+ SCCOL nRealPosX;
+ SCROW nRealPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nRealPosX, nRealPosY, false );//the real row/col
const ScMergeFlagAttr* pRealPosAttr = static_cast<const ScMergeFlagAttr*>(
pDoc->GetAttr( nRealPosX, nRealPosY, nTab, ATTR_MERGE_FLAG ));
@@ -2015,8 +2015,8 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
{
// data pilot table
Point aPos = rMEvt.GetPosPixel();
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
SCTAB nTab = pViewData->GetTabNo();
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
ScDPObject* pDPObj = pDoc->GetDPAtCursor( nPosX, nPosY, nTab );
@@ -2169,8 +2169,8 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if( xVbaEvents.is() ) try
{
Point aPos = rMEvt.GetPosPixel();
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
SCTAB nTab = pViewData->GetTabNo();
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
OUString sURL;
@@ -2341,8 +2341,8 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
if ( bEditMode && (pViewData->GetRefTabNo() == pViewData->GetTabNo()) )
{
Point aPos = rMEvt.GetPosPixel();
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
EditView* pEditView;
@@ -2352,8 +2352,8 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
SCCOL nEndCol = pViewData->GetEditEndCol();
SCROW nEndRow = pViewData->GetEditEndRow();
- if ( nPosX >= (SCsCOL) nEditCol && nPosX <= (SCsCOL) nEndCol &&
- nPosY >= (SCsROW) nEditRow && nPosY <= (SCsROW) nEndRow )
+ if ( nPosX >= nEditCol && nPosX <= nEndCol &&
+ nPosY >= nEditRow && nPosY <= nEndRow )
{
// Field can only be URL field
bool bAlt = rMEvt.IsMod2();
@@ -2754,8 +2754,8 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
Point aPosPixel = rCEvt.GetMousePosPixel();
Point aMenuPos = aPosPixel;
- SCsCOL nCellX = -1;
- SCsROW nCellY = -1;
+ SCCOL nCellX = -1;
+ SCROW nCellY = -1;
pViewData->GetPosFromPixel(aPosPixel.X(), aPosPixel.Y(), eWhich, nCellX, nCellY);
bool bSpellError = false;
@@ -2908,7 +2908,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
}
}
-void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, SCsROW nCellY )
+void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCCOL nCellX, SCROW nCellY )
{
// #i18735# if the click was outside of the current selection,
// the cursor is moved or an object at the click position selected.
@@ -2927,8 +2927,8 @@ void ScGridWindow::SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX,
SCCOL nEditEndCol = pViewData->GetEditEndCol();
SCROW nEditEndRow = pViewData->GetEditEndRow();
- if ( nCellX >= (SCsCOL) nEditStartCol && nCellX <= (SCsCOL) nEditEndCol &&
- nCellY >= (SCsROW) nEditStartRow && nCellY <= (SCsROW) nEditEndRow )
+ if ( nCellX >= nEditStartCol && nCellX <= nEditEndCol &&
+ nCellY >= nEditStartRow && nCellY <= nEditEndRow )
{
// handle selection within the EditView
@@ -3238,8 +3238,8 @@ void ScGridWindow::UpdateInputContext()
bool ScGridWindow::DropScroll( const Point& rMousePos )
{
- SCsCOL nDx = 0;
- SCsROW nDy = 0;
+ SCCOL nDx = 0;
+ SCROW nDy = 0;
Size aSize = GetOutputSizePixel();
if (aSize.Width() > SCROLL_SENSITIVE * 3)
@@ -3369,8 +3369,8 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
return bOk ? rEvt.mnAction : 0; // don't draw selection frame
}
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
ScRange aSourceRange = rData.pCellTransfer->GetRange();
@@ -3384,11 +3384,11 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
if ( rEvt.mnAction != DND_ACTION_MOVE )
nSizeY = rData.pCellTransfer->GetNonFilteredRows(); // copy/link: no filtered rows
- SCsCOL nNewDragX = nPosX - rData.pCellTransfer->GetDragHandleX();
+ SCCOL nNewDragX = nPosX - rData.pCellTransfer->GetDragHandleX();
if (nNewDragX<0) nNewDragX=0;
if (nNewDragX+(nSizeX-1) > MAXCOL)
nNewDragX = MAXCOL-(nSizeX-1);
- SCsROW nNewDragY = nPosY - rData.pCellTransfer->GetDragHandleY();
+ SCROW nNewDragY = nPosY - rData.pCellTransfer->GetDragHandleY();
if (nNewDragY<0) nNewDragY=0;
if (nNewDragY+(nSizeY-1) > MAXROW)
nNewDragY = MAXROW-(nSizeY-1);
@@ -3515,7 +3515,7 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
}
}
- if ( nNewDragX != (SCsCOL) nDragStartX || nNewDragY != (SCsROW) nDragStartY ||
+ if ( nNewDragX != nDragStartX || nNewDragY != nDragStartY ||
nDragStartX+nSizeX-1 != nDragEndX || nDragStartY+nSizeY-1 != nDragEndY ||
!bDragRect || eDragInsertMode != meDragInsertMode )
{
@@ -3679,8 +3679,8 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
// can already be rejected here.
Point aPos = rEvt.maPosPixel;
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
SCTAB nTab = pViewData->GetTabNo();
ScDocument* pDoc = pViewData->GetDocument();
@@ -3937,8 +3937,8 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
OUString aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY );
pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo, 0, pViewData->GetViewShell()->GetViewShellId() );
- SCsCOL nCorrectCursorPosCol = 0;
- SCsROW nCorrectCursorPosRow = 0;
+ SCCOL nCorrectCursorPosCol = 0;
+ SCROW nCorrectCursorPosRow = 0;
bDone = true;
if ( meDragInsertMode != INS_NONE )
@@ -4217,8 +4217,8 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
rData.aLinkTable );
else if ( !rData.aLinkArea.isEmpty() )
{
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
pView->MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, false, false );
@@ -4257,8 +4257,8 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
return rEvt.mnAction;
}
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
if (!rData.aJumpTarget.isEmpty())
@@ -4307,8 +4307,8 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
{
Point aLogicPos = PixelToLogic( rPosPixel );
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( rPosPixel.X(), rPosPixel.Y(), eWhich, nPosX, nPosY );
// If the mouse down was inside a visible note window, ignore it and
@@ -4586,7 +4586,7 @@ void ScGridWindow::LoseFocus()
}
bool ScGridWindow::HitRangeFinder( const Point& rMouse, RfCorner& rCorner,
- sal_uInt16* pIndex, SCsCOL* pAddX, SCsROW* pAddY)
+ sal_uInt16* pIndex, SCCOL* pAddX, SCROW* pAddY)
{
bool bFound = false;
ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pViewData->GetViewShell() );
@@ -4601,8 +4601,8 @@ bool ScGridWindow::HitRangeFinder( const Point& rMouse, RfCorner& rCorner,
bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( rMouse.X(), rMouse.Y(), eWhich, nPosX, nPosY );
// merged (single/Range) ???
ScAddress aAddr( nPosX, nPosY, nTab );
@@ -4842,8 +4842,8 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, bool bUp )
bool bTimer = false;
Point aPos = rMEvt.GetPosPixel();
- SCsCOL nDx = 0;
- SCsROW nDy = 0;
+ SCCOL nDx = 0;
+ SCROW nDy = 0;
if ( aPos.X() < 0 ) nDx = -1;
if ( aPos.Y() < 0 ) nDy = -1;
Size aSize = GetOutputSizePixel();
@@ -4883,8 +4883,8 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, bool bUp )
// Move
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
ScRange aOld = rData.aRef;
@@ -4894,20 +4894,20 @@ void ScGridWindow::RFMouseMove( const MouseEvent& rMEvt, bool bUp )
switch (aRFSelectedCorned)
{
case LEFT_UP:
- aNew.aStart.SetCol((SCCOL)nPosX);
- aNew.aStart.SetRow((SCROW)nPosY);
+ aNew.aStart.SetCol(nPosX);
+ aNew.aStart.SetRow(nPosY);
break;
case LEFT_DOWN:
- aNew.aStart.SetCol((SCCOL)nPosX);
- aNew.aEnd.SetRow((SCROW)nPosY);
+ aNew.aStart.SetCol(nPosX);
+ aNew.aEnd.SetRow(nPosY);
break;
case RIGHT_UP:
- aNew.aEnd.SetCol((SCCOL)nPosX);
- aNew.aStart.SetRow((SCROW)nPosY);
+ aNew.aEnd.SetCol(nPosX);
+ aNew.aStart.SetRow(nPosY);
break;
case RIGHT_DOWN:
- aNew.aEnd.SetCol((SCCOL)nPosX);
- aNew.aEnd.SetRow((SCROW)nPosY);
+ aNew.aEnd.SetCol(nPosX);
+ aNew.aEnd.SetRow(nPosY);
break;
default:
break;
@@ -5044,8 +5044,8 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
return extractURLInfo(pView->GetFieldUnderMousePointer(), pName, pUrl, pTarget);
//! Pass on nPosX/Y?
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( rPos.X(), rPos.Y(), eWhich, nPosX, nPosY );
SCTAB nTab = pViewData->GetTabNo();
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index ebd9a63f2a2d..46f6ed82e251 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -244,8 +244,8 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove )
bool bTimer = false;
Point aPixel = rMEvt.GetPosPixel();
- SCsCOL nDx = 0;
- SCsROW nDy = 0;
+ SCCOL nDx = 0;
+ SCROW nDy = 0;
if ( aPixel.X() < 0 )
nDx = -1;
if ( aPixel.Y() < 0 )
@@ -267,8 +267,8 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, bool bMove )
bTimer = true;
}
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( aPixel.X(), aPixel.Y(), eWhich, nPosX, nPosY );
bool bMouseLeft;
bool bMouseTop;
@@ -704,8 +704,8 @@ sal_uInt16 ScGridWindow::HitPageBreak( const Point& rMouse, ScRange* pSource,
long nMouseX = rMouse.X();
long nMouseY = rMouse.Y();
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( nMouseX, nMouseY, eWhich, nPosX, nPosY );
Point aTL = pViewData->GetScrPos( nPosX, nPosY, eWhich );
Point aBR = pViewData->GetScrPos( nPosX+1, nPosY+1, eWhich );
@@ -827,8 +827,8 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp )
bool bTimer = false;
Point aPos = rMEvt.GetPosPixel();
- SCsCOL nDx = 0;
- SCsROW nDy = 0;
+ SCCOL nDx = 0;
+ SCROW nDy = 0;
if ( aPos.X() < 0 ) nDx = -1;
if ( aPos.Y() < 0 ) nDy = -1;
Size aSize = GetOutputSizePixel();
@@ -875,8 +875,8 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp )
// from here new
// Searching for a position between the cells (before nPosX / nPosY)
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
bool bLeft, bTop;
pViewData->GetMouseQuadrant( aPos, eWhich, nPosX, nPosY, bLeft, bTop );
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index fa565a4ab8c3..8f5159b19742 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1266,8 +1266,8 @@ void ScGridWindow::SetCellSelectionPixel(int nType, int nPixelX, int nPixelY)
aRangeList.Combine().GetVars(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
// convert the coordinates to column/row
- SCsCOL nNewPosX;
- SCsROW nNewPosY;
+ SCCOL nNewPosX;
+ SCROW nNewPosY;
SCTAB nTab = pViewData->GetTabNo();
pViewData->GetPosFromPixel(nPixelX, nPixelY, eWhich, nNewPosX, nNewPosY);
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index efddb38dc68a..b1ed9e83f4f4 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -54,7 +54,7 @@
#include "global.hxx"
#include "globstr.hrc"
-bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, bool bKeyboard )
+bool ScGridWindow::ShowNoteMarker( SCCOL nPosX, SCROW nPosY, bool bKeyboard )
{
bool bDone = false;
@@ -264,8 +264,8 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
if ( bHelpEnabled && !bDrawTextEdit )
{
Point aPosPixel = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( aPosPixel.X(), aPosPixel.Y(), eWhich, nPosX, nPosY );
if ( ShowNoteMarker( nPosX, nPosY, false ) )
@@ -393,8 +393,8 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
}
ScDocument* pDoc = pViewData->GetDocument();
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
SCTAB nTab = pViewData->GetTabNo();
pViewData->GetPosFromPixel( aPosPixel.X(), aPosPixel.Y(), eWhich, nPosX, nPosY );
const ScPatternAttr* pPattern = pDoc->GetPattern( nPosX, nPosY, nTab );
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index 1579bcc82e6d..bb5eaa351951 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -146,8 +146,8 @@ void ScViewFunctionSet::BeginDrag()
{
SCTAB nTab = pViewData->GetTabNo();
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
if (pEngine)
{
Point aMPos = pEngine->GetMousePosPixel();
@@ -190,8 +190,8 @@ void ScViewFunctionSet::BeginDrag()
ScRange aMarkRange = pTransferObj->GetRange();
SCCOL nStartX = aMarkRange.aStart.Col();
SCROW nStartY = aMarkRange.aStart.Row();
- SCCOL nHandleX = (nPosX >= (SCsCOL) nStartX) ? nPosX - nStartX : 0;
- SCROW nHandleY = (nPosY >= (SCsROW) nStartY) ? nPosY - nStartY : 0;
+ SCCOL nHandleX = (nPosX >= nStartX) ? nPosX - nStartX : 0;
+ SCROW nHandleY = (nPosY >= nStartY) ? nPosY - nStartY : 0;
pTransferObj->SetDragHandlePos( nHandleX, nHandleY );
pTransferObj->SetSourceCursorPos( pViewData->GetCurX(), pViewData->GetCurY() );
pTransferObj->SetVisibleTab( nTab );
@@ -312,8 +312,8 @@ bool ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bDon
bool bLeftScroll = ( aEffPos.X() < 0 );
bool bTopScroll = ( aEffPos.Y() < 0 );
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( aEffPos.X(), aEffPos.Y(), GetWhich(),
nPosX, nPosY, true, true ); // with Repair
@@ -403,7 +403,7 @@ bool ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bDon
return SetCursorAtCell( nPosX, nPosY, bScroll );
}
-bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScroll )
+bool ScViewFunctionSet::SetCursorAtCell( SCCOL nPosX, SCROW nPosY, bool bScroll )
{
ScTabView* pView = pViewData->GetView();
SCTAB nTab = pViewData->GetTabNo();
@@ -435,7 +435,7 @@ bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScrol
bool bRefMode = pViewShell && pViewShell->IsRefInputMode();
bool bHide = !bRefMode && !pViewData->IsAnyFillMode() &&
- ( nPosX != (SCsCOL) pViewData->GetCurX() || nPosY != (SCsROW) pViewData->GetCurY() );
+ ( nPosX != pViewData->GetCurX() || nPosY != pViewData->GetCurY() );
if (bHide)
pView->HideAllCursors();
@@ -485,8 +485,8 @@ bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScrol
ScRange aDelRange;
bool bOldDelMark = pViewData->GetDelMark( aDelRange );
- if ( nPosX+1 >= (SCsCOL) nStartX && nPosX <= (SCsCOL) nEndX &&
- nPosY+1 >= (SCsROW) nStartY && nPosY <= (SCsROW) nEndY &&
+ if ( nPosX+1 >= nStartX && nPosX <= nEndX &&
+ nPosY+1 >= nStartY && nPosY <= nEndY &&
( nPosX != nEndX || nPosY != nEndY ) ) // minimize?
{
// direction (left or top)
@@ -536,8 +536,8 @@ bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScrol
pViewData->GetView()->UpdateShrinkOverlay();
}
- bool bNegX = ( nPosX < (SCsCOL) nStartX );
- bool bNegY = ( nPosY < (SCsROW) nStartY );
+ bool bNegX = ( nPosX < nStartX );
+ bool bNegY = ( nPosY < nStartY );
long nSizeX = 0;
if ( bNegX )
@@ -632,8 +632,8 @@ bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScrol
}
else // regular selection
{
- bool bHideCur = bAnchor && ( (SCCOL)nPosX != pViewData->GetCurX() ||
- (SCROW)nPosY != pViewData->GetCurY() );
+ bool bHideCur = bAnchor && ( nPosX != pViewData->GetCurX() ||
+ nPosY != pViewData->GetCurY() );
if (bHideCur)
pView->HideAllCursors(); // otherwise twice: Block and SetCursor
@@ -641,8 +641,8 @@ bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScrol
{
if (!bStarted)
{
- bool bMove = ( nPosX != (SCsCOL) aAnchorPos.Col() ||
- nPosY != (SCsROW) aAnchorPos.Row() );
+ bool bMove = ( nPosX != aAnchorPos.Col() ||
+ nPosY != aAnchorPos.Row() );
if ( bMove || ( pEngine && pEngine->GetMouseEvent().IsShift() ) )
{
pView->InitBlockMode( aAnchorPos.Col(), aAnchorPos.Row(),
@@ -652,9 +652,9 @@ bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScrol
}
if (bStarted)
// If the selection is already started, don't set the cursor.
- pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab, false, false, true );
+ pView->MarkCursor( nPosX, nPosY, nTab, false, false, true );
else
- pView->SetCursor( (SCCOL) nPosX, (SCROW) nPosY );
+ pView->SetCursor( nPosX, nPosY );
}
else
{
@@ -663,7 +663,7 @@ bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScrol
{
pView->DoneBlockMode(true);
pView->InitBlockMode( nPosX, nPosY, nTab, true );
- pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab );
+ pView->MarkCursor( nPosX, nPosY, nTab );
aAnchorPos.Set( nPosX, nPosY, nTab );
bStarted = true;
@@ -684,13 +684,13 @@ bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScrol
{
pView->DoneBlockMode( true );
pView->InitBlockMode( nPosX, nPosY, nTab, true );
- pView->MarkCursor( (SCCOL) nPosX, (SCROW) nPosY, nTab );
+ pView->MarkCursor( nPosX, nPosY, nTab );
aAnchorPos.Set( nPosX, nPosY, nTab );
}
bStarted = true;
}
- pView->SetCursor( (SCCOL) nPosX, (SCROW) nPosY );
+ pView->SetCursor( nPosX, nPosY );
}
pViewData->SetRefStart( nPosX, nPosY, nTab );
@@ -716,10 +716,10 @@ bool ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
ScMarkData& rMark = pViewData->GetMarkData();
if (bAnchor || !rMark.IsMultiMarked())
{
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( rPointPixel.X(), rPointPixel.Y(), GetWhich(), nPosX, nPosY );
- return pViewData->GetMarkData().IsCellMarked( (SCCOL) nPosX, (SCROW) nPosY );
+ return pViewData->GetMarkData().IsCellMarked( nPosX, nPosY );
}
return false;
@@ -876,8 +876,8 @@ bool ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bD
return false; // do not crunch with wrong positions
}
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( rPointPixel.X(), rPointPixel.Y(), pViewData->GetActivePart(),
nPosX, nPosY, false );
if (bColumn)
@@ -923,8 +923,8 @@ bool ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, bool /* bD
bool ScHeaderFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
{
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
pViewData->GetPosFromPixel( rPointPixel.X(), rPointPixel.Y(), pViewData->GetActivePart(),
nPosX, nPosY, false );
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 2510be1f891a..b5d889b306b2 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1167,7 +1167,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll, void )
void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, bool bUpdBars )
{
SCCOL nOldX = aViewData.GetPosX(eWhich);
- SCsCOL nNewX = static_cast<SCsCOL>(nOldX) + static_cast<SCsCOL>(nDeltaX);
+ SCCOL nNewX = nOldX + static_cast<SCCOL>(nDeltaX);
if ( nNewX < 0 )
{
nDeltaX -= nNewX;
@@ -1179,34 +1179,34 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, bool bUpdBars )
nNewX = MAXCOL;
}
- SCsCOL nDir = ( nDeltaX > 0 ) ? 1 : -1;
+ SCCOL nDir = ( nDeltaX > 0 ) ? 1 : -1;
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
while ( pDoc->ColHidden(nNewX, nTab) &&
nNewX+nDir >= 0 && nNewX+nDir <= MAXCOL )
- nNewX = sal::static_int_cast<SCsCOL>( nNewX + nDir );
+ nNewX = sal::static_int_cast<SCCOL>( nNewX + nDir );
// freeze
if (aViewData.GetHSplitMode() == SC_SPLIT_FIX)
{
if (eWhich == SC_SPLIT_LEFT)
- nNewX = static_cast<SCsCOL>(nOldX); // always keep the left part
+ nNewX = nOldX; // always keep the left part
else
{
- SCsCOL nFixX = static_cast<SCsCOL>(aViewData.GetFixPosX());
+ SCCOL nFixX = aViewData.GetFixPosX();
if (nNewX < nFixX)
nNewX = nFixX;
}
}
- if (nNewX == static_cast<SCsCOL>(nOldX))
+ if (nNewX == nOldX)
return;
HideAllCursors();
if ( nNewX >= 0 && nNewX <= MAXCOL && nDeltaX )
{
- SCCOL nTrackX = std::max( nOldX, static_cast<SCCOL>(nNewX) );
+ SCCOL nTrackX = std::max( nOldX, nNewX );
// with VCL Update() affects all windows at the moment, that is why
// calling Update after scrolling of the GridWindow would possibly
@@ -1216,7 +1216,7 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, bool bUpdBars )
pColBar[eWhich]->Update();
long nOldPos = aViewData.GetScrPos( nTrackX, 0, eWhich ).X();
- aViewData.SetPosX( eWhich, static_cast<SCCOL>(nNewX) );
+ aViewData.SetPosX( eWhich, nNewX );
long nDiff = aViewData.GetScrPos( nTrackX, 0, eWhich ).X() - nOldPos;
if ( eWhich==SC_SPLIT_LEFT )
@@ -1250,7 +1250,7 @@ void ScTabView::ScrollX( long nDeltaX, ScHSplitPos eWhich, bool bUpdBars )
void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, bool bUpdBars )
{
SCROW nOldY = aViewData.GetPosY(eWhich);
- SCsROW nNewY = static_cast<SCsROW>(nOldY) + static_cast<SCsROW>(nDeltaY);
+ SCROW nNewY = nOldY + static_cast<SCROW>(nDeltaY);
if ( nNewY < 0 )
{
nDeltaY -= nNewY;
@@ -1262,7 +1262,7 @@ void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, bool bUpdBars )
nNewY = MAXROW;
}
- SCsROW nDir = ( nDeltaY > 0 ) ? 1 : -1;
+ SCROW nDir = ( nDeltaY > 0 ) ? 1 : -1;
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
while ( pDoc->RowHidden(nNewY, nTab) &&
@@ -1274,33 +1274,33 @@ void ScTabView::ScrollY( long nDeltaY, ScVSplitPos eWhich, bool bUpdBars )
if (aViewData.GetVSplitMode() == SC_SPLIT_FIX)
{
if (eWhich == SC_SPLIT_TOP)
- nNewY = static_cast<SCsROW>(nOldY); // always keep the upper part
+ nNewY = nOldY; // always keep the upper part
else
{
- SCsROW nFixY = static_cast<SCsROW>(aViewData.GetFixPosY());
+ SCROW nFixY = aViewData.GetFixPosY();
if (nNewY < nFixY)
nNewY = nFixY;
}
}
- if (nNewY == static_cast<SCsROW>(nOldY))
+ if (nNewY == nOldY)
return;
HideAllCursors();
if ( nNewY >= 0 && nNewY <= MAXROW && nDeltaY )
{
- SCROW nTrackY = std::max( nOldY, static_cast<SCROW>(nNewY) );
+ SCROW nTrackY = std::max( nOldY, nNewY );
// adjust row headers before the actual scrolling, so it does not get painted twice
// PosY may then also not be set yet, pass on new value
- SCROW nUNew = static_cast<SCROW>(nNewY);
+ SCROW nUNew = nNewY;
UpdateHeaderWidth( &eWhich, &nUNew ); // adjust row headers
if (pRowBar[eWhich])
pRowBar[eWhich]->Update();
long nOldPos = aViewData.GetScrPos( 0, nTrackY, eWhich ).Y();
- aViewData.SetPosY( eWhich, static_cast<SCROW>(nNewY) );
+ aViewData.SetPosY( eWhich, nNewY );
long nDiff = aViewData.GetScrPos( 0, nTrackY, eWhich ).Y() - nOldPos;
if ( eWhich==SC_SPLIT_TOP )
@@ -1942,8 +1942,8 @@ void ScTabView::FreezeSplitters( bool bFreeze, SplitMethod eSplitMetod)
aViewData.GetDocShell()->SetDocumentModified();
Point aSplit;
- SCsCOL nPosX = 1;
- SCsROW nPosY = 1;
+ SCCOL nPosX = 1;
+ SCROW nPosY = 1;
if (eOldV != SC_SPLIT_NONE || eOldH != SC_SPLIT_NONE)
{
if ( eOldV != SC_SPLIT_NONE && (eSplitMetod == SC_SPLIT_METHOD_FIRST_ROW || eSplitMetod == SC_SPLIT_METHOD_CURSOR))
@@ -1984,17 +1984,17 @@ void ScTabView::FreezeSplitters( bool bFreeze, SplitMethod eSplitMetod)
break;
case SC_SPLIT_METHOD_CURSOR:
{
- nPosX = static_cast<SCsCOL>( aViewData.GetCurX());
- nPosY = static_cast<SCsROW>( aViewData.GetCurY());
+ nPosX = aViewData.GetCurX();
+ nPosY = aViewData.GetCurY();
}
break;
}
}
SCROW nTopPos = aViewData.GetPosY(SC_SPLIT_BOTTOM);
- SCROW nBottomPos = static_cast<SCROW>(nPosY);
+ SCROW nBottomPos = nPosY;
SCCOL nLeftPos = aViewData.GetPosX(SC_SPLIT_LEFT);
- SCCOL nRightPos = static_cast<SCCOL>(nPosX);
+ SCCOL nRightPos = nPosX;
if (eSplitMetod == SC_SPLIT_METHOD_FIRST_ROW || eSplitMetod == SC_SPLIT_METHOD_CURSOR)
{
@@ -2004,7 +2004,7 @@ void ScTabView::FreezeSplitters( bool bFreeze, SplitMethod eSplitMetod)
if (aViewData.GetPosY(SC_SPLIT_BOTTOM) > nBottomPos)
nBottomPos = aViewData.GetPosY(SC_SPLIT_BOTTOM);
}
- aSplit = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, true );
+ aSplit = aViewData.GetScrPos( nPosX, nPosY, ePos, true );
if (aSplit.Y() > 0)
{
aViewData.SetVSplitMode( SC_SPLIT_FIX );
@@ -2025,7 +2025,7 @@ void ScTabView::FreezeSplitters( bool bFreeze, SplitMethod eSplitMetod)
if (aViewData.GetPosX(SC_SPLIT_RIGHT) > nRightPos)
nRightPos = aViewData.GetPosX(SC_SPLIT_RIGHT);
}
- aSplit = aViewData.GetScrPos( static_cast<SCCOL>(nPosX), static_cast<SCROW>(nPosY), ePos, true );
+ aSplit = aViewData.GetScrPos( nPosX, nPosY, ePos, true );
if (nPosX > aViewData.GetPosX(SC_SPLIT_LEFT)) // (aSplit.X() > 0) doesn't work for RTL
{
long nSplitPos = aSplit.X() + aWinStart.X();
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 6cc704df99f6..84f6babcb0d3 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -64,7 +64,7 @@ bool isCellQualified(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, bool
}
void moveCursorByProtRule(
- SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, SCTAB nTab, ScDocument* pDoc)
+ SCCOL& rCol, SCROW& rRow, SCCOL nMovX, SCROW nMovY, SCTAB nTab, ScDocument* pDoc)
{
bool bSelectLocked = true;
bool bSelectUnlocked = true;
@@ -186,7 +186,7 @@ bool checkBoundary(SCCOL& rCol, SCROW& rRow)
}
void moveCursorByMergedCell(
- SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, SCTAB nTab,
+ SCCOL& rCol, SCROW& rRow, SCCOL nMovX, SCROW nMovY, SCTAB nTab,
ScDocument* pDoc, const ScViewData& rViewData)
{
SCCOL nOrigX = rViewData.GetCurX();
@@ -205,8 +205,8 @@ void moveCursorByMergedCell(
pDoc->GetAttr(nOrigX, nOrigY, nTab, ATTR_MERGE));
bool bOriginMerged = false;
- SCsCOL nColSpan = 1;
- SCsROW nRowSpan = 1;
+ SCCOL nColSpan = 1;
+ SCROW nRowSpan = 1;
if (pMergeAttr && pMergeAttr->IsMerged())
{
nColSpan = pMergeAttr->GetColMerge();
@@ -497,10 +497,10 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
{
// Expand selection area accordingly when the current selection ends
// with a merged cell.
- SCsCOL nCurXOffset = 0;
- SCsCOL nBlockStartXOffset = 0;
- SCsROW nCurYOffset = 0;
- SCsROW nBlockStartYOffset = 0;
+ SCCOL nCurXOffset = 0;
+ SCCOL nBlockStartXOffset = 0;
+ SCROW nCurYOffset = 0;
+ SCROW nBlockStartYOffset = 0;
bool bBlockStartMerged = false;
const ScMergeAttr* pMergeAttr = nullptr;
ScDocument* pDocument = aViewData.GetDocument();
@@ -516,8 +516,8 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
pDocument->GetAttr( nBlockStartXOrig, nBlockStartYOrig, nTab, ATTR_MERGE ) );
if ( pMergeAttr->IsMerged() )
{
- SCsCOL nColSpan = pMergeAttr->GetColMerge();
- SCsROW nRowSpan = pMergeAttr->GetRowMerge();
+ SCCOL nColSpan = pMergeAttr->GetColMerge();
+ SCROW nRowSpan = pMergeAttr->GetRowMerge();
if ( !( nCurX >= nBlockStartXOrig + nColSpan - 1 && nCurY >= nBlockStartYOrig + nRowSpan - 1 ) )
{
@@ -542,19 +542,19 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
pDocument->GetAttr( nCurX, nCurY, nTab, ATTR_MERGE ) );
if ( pMergeAttr->IsMerged() )
{
- SCsCOL nColSpan = pMergeAttr->GetColMerge();
- SCsROW nRowSpan = pMergeAttr->GetRowMerge();
+ SCCOL nColSpan = pMergeAttr->GetColMerge();
+ SCROW nRowSpan = pMergeAttr->GetRowMerge();
if ( !( nBlockStartX >= nCurX + nColSpan - 1 && nBlockStartY >= nCurY + nRowSpan - 1 ) )
{
if ( nBlockStartX <= nCurX + nColSpan - 1 )
{
- SCsCOL nCurXOffsetTemp = (nCurX < nCurX + nColSpan - 1) ? nColSpan - 1 : 0;
+ SCCOL nCurXOffsetTemp = (nCurX < nCurX + nColSpan - 1) ? nColSpan - 1 : 0;
nCurXOffset = nCurXOffset > nCurXOffsetTemp ? nCurXOffset : nCurXOffsetTemp;
}
if ( nBlockStartY <= nCurY + nRowSpan - 1 )
{
- SCsROW nCurYOffsetTemp = (nCurY < nCurY + nRowSpan - 1) ? nRowSpan - 1 : 0;
+ SCROW nCurYOffsetTemp = (nCurY < nCurY + nRowSpan - 1) ? nRowSpan - 1 : 0;
nCurYOffset = nCurYOffset > nCurYOffsetTemp ? nCurYOffset : nCurYOffsetTemp;
}
if ( !( nBlockStartX <= nCurX && nBlockStartY <= nCurY ) &&
@@ -603,7 +603,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
aHdrFunc.SetAnchorFlag( false );
}
-void ScTabView::GetPageMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, SCsCOL& rPageX, SCsROW& rPageY)
+void ScTabView::GetPageMoveEndPosition(SCCOL nMovX, SCROW nMovY, SCCOL& rPageX, SCROW& rPageY)
{
SCCOL nCurX;
SCROW nCurY;
@@ -634,17 +634,17 @@ void ScTabView::GetPageMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, SCsCOL& rPage
nScrSizeY = ScViewData::ToPixel( aViewData.GetPageUpDownOffset(), aViewData.GetPPTX() );
}
- SCsCOL nPageX;
- SCsROW nPageY;
+ SCCOL nPageX;
+ SCROW nPageY;
if (nMovX >= 0)
- nPageX = ((SCsCOL) aViewData.CellsAtX( nCurX, 1, eWhichX )) * nMovX;
+ nPageX = aViewData.CellsAtX( nCurX, 1, eWhichX ) * nMovX;
else
- nPageX = ((SCsCOL) aViewData.CellsAtX( nCurX, -1, eWhichX )) * nMovX;
+ nPageX = aViewData.CellsAtX( nCurX, -1, eWhichX ) * nMovX;
if (nMovY >= 0)
- nPageY = ((SCsROW) aViewData.CellsAtY( nCurY, 1, eWhichY, nScrSizeY )) * nMovY;
+ nPageY = aViewData.CellsAtY( nCurY, 1, eWhichY, nScrSizeY ) * nMovY;
else
- nPageY = ((SCsROW) aViewData.CellsAtY( nCurY, -1, eWhichY, nScrSizeY )) * nMovY;
+ nPageY = aViewData.CellsAtY( nCurY, -1, eWhichY, nScrSizeY ) * nMovY;
if (nMovX != 0 && nPageX == 0) nPageX = (nMovX>0) ? 1 : -1;
if (nMovY != 0 && nPageY == 0) nPageY = (nMovY>0) ? 1 : -1;
@@ -653,8 +653,8 @@ void ScTabView::GetPageMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, SCsCOL& rPage
rPageY = nPageY;
}
-void ScTabView::GetAreaMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
- SCsCOL& rAreaX, SCsROW& rAreaY, ScFollowMode& rMode)
+void ScTabView::GetAreaMoveEndPosition(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode,
+ SCCOL& rAreaX, SCROW& rAreaY, ScFollowMode& rMode)
{
SCCOL nNewX = -1;
SCROW nNewY = -1;
@@ -691,7 +691,7 @@ void ScTabView::GetAreaMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, ScFollowMode
SCCOL nVirtualX = bLegacyCellSelection ? nNewX : nCurX;
SCROW nVirtualY = bLegacyCellSelection ? nNewY : nCurY;
- SCsCOLROW i;
+ SCCOLROW i;
if ( nMovX > 0 )
for ( i=0; i<nMovX; i++ )
pDoc->FindAreaPos( nNewX, nVirtualY, nTab, SC_MOVE_RIGHT );
@@ -731,7 +731,7 @@ void ScTabView::GetAreaMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, ScFollowMode
rMode = eMode;
}
-void ScTabView::SkipCursorHorizontal(SCsCOL& rCurX, SCsROW& rCurY, SCsCOL nOldX, SCsROW nMovX)
+void ScTabView::SkipCursorHorizontal(SCCOL& rCurX, SCROW& rCurY, SCCOL nOldX, SCROW nMovX)
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
@@ -790,7 +790,7 @@ void ScTabView::SkipCursorHorizontal(SCsCOL& rCurX, SCsROW& rCurY, SCsCOL nOldX,
}
}
-void ScTabView::SkipCursorVertical(SCsCOL& rCurX, SCsROW& rCurY, SCsROW nOldY, SCsROW nMovY)
+void ScTabView::SkipCursorVertical(SCCOL& rCurX, SCROW& rCurY, SCROW nOldY, SCROW nMovY)
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
@@ -850,7 +850,7 @@ void ScTabView::SkipCursorVertical(SCsCOL& rCurX, SCsROW& rCurY, SCsROW nOldY, S
}
}
-void ScTabView::ExpandBlock(SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode)
+void ScTabView::ExpandBlock(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode)
{
if (!nMovX && !nMovY)
// Nothing to do. Bail out.
@@ -956,26 +956,26 @@ void ScTabView::ExpandBlock(SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode)
ScSplitPos eActive = aViewData.GetActivePart();
bool bRowSelected = (nBlockStartX == 0 && nBlockEndX == MAXCOL);
bool bColSelected = (nBlockStartY == 0 && nBlockEndY == MAXROW);
- SCsCOL nAlignX = bRowSelected ? aViewData.GetPosX(WhichH(eActive)) : nBlockEndX;
- SCsROW nAlignY = bColSelected ? aViewData.GetPosY(WhichV(eActive)) : nBlockEndY;
+ SCCOL nAlignX = bRowSelected ? aViewData.GetPosX(WhichH(eActive)) : nBlockEndX;
+ SCROW nAlignY = bColSelected ? aViewData.GetPosY(WhichV(eActive)) : nBlockEndY;
AlignToCursor(nAlignX, nAlignY, eMode);
SelectionChanged();
}
}
-void ScTabView::ExpandBlockPage(SCsCOL nMovX, SCsROW nMovY)
+void ScTabView::ExpandBlockPage(SCCOL nMovX, SCROW nMovY)
{
- SCsCOL nPageX;
- SCsROW nPageY;
+ SCCOL nPageX;
+ SCROW nPageY;
GetPageMoveEndPosition(nMovX, nMovY, nPageX, nPageY);
ExpandBlock(nPageX, nPageY, SC_FOLLOW_FIX);
}
-void ScTabView::ExpandBlockArea(SCsCOL nMovX, SCsROW nMovY)
+void ScTabView::ExpandBlockArea(SCCOL nMovX, SCROW nMovY)
{
- SCsCOL nAreaX;
- SCsROW nAreaY;
+ SCCOL nAreaX;
+ SCROW nAreaY;
ScFollowMode eMode;
GetAreaMoveEndPosition(nMovX, nMovY, SC_FOLLOW_JUMP, nAreaX, nAreaY, eMode);
ExpandBlock(nAreaX, nAreaY, eMode);
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 8d529e3b355b..429f34e1017e 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -83,9 +83,9 @@ ScRange lcl_getSubRangeByIndex( const ScRange& rRange, sal_Int32 nIndex )
{
// row by row from first to last sheet
sal_Int32 nArea = nWidth * nHeight;
- aResult.IncCol( static_cast< SCsCOL >( nIndex % nWidth ) );
- aResult.IncRow( static_cast< SCsROW >( (nIndex % nArea) / nWidth ) );
- aResult.IncTab( static_cast< SCsTAB >( nIndex / nArea ) );
+ aResult.IncCol( static_cast< SCCOL >( nIndex % nWidth ) );
+ aResult.IncRow( static_cast< SCROW >( (nIndex % nArea) / nWidth ) );
+ aResult.IncTab( static_cast< SCTAB >( nIndex / nArea ) );
if( !rRange.In( aResult ) )
aResult = rRange.aStart;
}
@@ -842,7 +842,7 @@ static vcl::Window* lcl_GetCareWin(SfxViewFrame* pViewFrm)
// adjust screen with respect to cursor position
-void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
+void ScTabView::AlignToCursor( SCCOL nCurX, SCROW nCurY, ScFollowMode eMode,
const ScSplitPos* pWhich )
{
// now switch active part here
@@ -852,12 +852,12 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
ScVSplitPos eActiveY = WhichV(eActive);
bool bHFix = (aViewData.GetHSplitMode() == SC_SPLIT_FIX);
bool bVFix = (aViewData.GetVSplitMode() == SC_SPLIT_FIX);
- if (bHFix && eActiveX == SC_SPLIT_LEFT && nCurX >= (SCsCOL)aViewData.GetFixPosX())
+ if (bHFix && eActiveX == SC_SPLIT_LEFT && nCurX >= aViewData.GetFixPosX())
{
ActivatePart( (eActiveY==SC_SPLIT_TOP) ? SC_SPLIT_TOPRIGHT : SC_SPLIT_BOTTOMRIGHT );
eActiveX = SC_SPLIT_RIGHT;
}
- if (bVFix && eActiveY == SC_SPLIT_TOP && nCurY >= (SCsROW)aViewData.GetFixPosY())
+ if (bVFix && eActiveY == SC_SPLIT_TOP && nCurY >= aViewData.GetFixPosY())
{
ActivatePart( (eActiveX==SC_SPLIT_LEFT) ? SC_SPLIT_BOTTOMLEFT : SC_SPLIT_BOTTOMRIGHT );
eActiveY = SC_SPLIT_BOTTOM;
@@ -875,15 +875,15 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
ScHSplitPos eAlignX = WhichH(eAlign);
ScVSplitPos eAlignY = WhichV(eAlign);
- SCsCOL nDeltaX = (SCsCOL) aViewData.GetPosX(eAlignX);
- SCsROW nDeltaY = (SCsROW) aViewData.GetPosY(eAlignY);
- SCsCOL nSizeX = (SCsCOL) aViewData.VisibleCellsX(eAlignX);
- SCsROW nSizeY = (SCsROW) aViewData.VisibleCellsY(eAlignY);
+ SCCOL nDeltaX = aViewData.GetPosX(eAlignX);
+ SCROW nDeltaY = aViewData.GetPosY(eAlignY);
+ SCCOL nSizeX = aViewData.VisibleCellsX(eAlignX);
+ SCROW nSizeY = aViewData.VisibleCellsY(eAlignY);
long nCellSizeX;
long nCellSizeY;
if ( nCurX >= 0 && nCurY >= 0 )
- aViewData.GetMergeSizePixel( (SCCOL)nCurX, (SCROW)nCurY, nCellSizeX, nCellSizeY );
+ aViewData.GetMergeSizePixel( nCurX, nCurY, nCellSizeX, nCellSizeY );
else
nCellSizeX = nCellSizeY = 0;
Size aScrSize = aViewData.GetScrSize();
@@ -939,12 +939,12 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
if ( nBotSpace > 0 && nBotSpace > nTopSpace )
{
long nDlgBot = aDlgPixel.Bottom();
- SCsCOL nWPosX;
- SCsROW nWPosY;
+ SCCOL nWPosX;
+ SCROW nWPosY;
aViewData.GetPosFromPixel( 0,nDlgBot, eAlign, nWPosX, nWPosY );
++nWPosY; // below the last affected cell
- SCsROW nDiff = nWPosY - nDeltaY;
+ SCROW nDiff = nWPosY - nDeltaY;
if ( nCurY >= nDiff ) // position can not be negative
{
nSpaceY = nDlgBot + ( nBotSpace - nCellSizeY ) / 2;
@@ -961,8 +961,8 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
}
}
- SCsCOL nNewDeltaX = nDeltaX;
- SCsROW nNewDeltaY = nDeltaY;
+ SCCOL nNewDeltaX = nDeltaX;
+ SCROW nNewDeltaY = nDeltaY;
bool bDoLine = false;
switch (eMode)
@@ -970,17 +970,17 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
case SC_FOLLOW_JUMP:
if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX )
{
- nNewDeltaX = nCurX - static_cast<SCsCOL>(aViewData.CellsAtX( nCurX, -1, eAlignX, static_cast<sal_uInt16>(nSpaceX) ));
+ nNewDeltaX = nCurX - aViewData.CellsAtX( nCurX, -1, eAlignX, static_cast<sal_uInt16>(nSpaceX) );
if (nNewDeltaX < 0)
nNewDeltaX = 0;
- nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
+ nSizeX = aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
if ( nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY || bForceNew )
{
- nNewDeltaY = nCurY - static_cast<SCsROW>(aViewData.CellsAtY( nCurY, -1, eAlignY, static_cast<sal_uInt16>(nSpaceY) ));
+ nNewDeltaY = nCurY - aViewData.CellsAtY( nCurY, -1, eAlignY, static_cast<sal_uInt16>(nSpaceY) );
if (nNewDeltaY < 0)
nNewDeltaY = 0;
- nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
+ nSizeY = aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
}
bDoLine = true;
break;
@@ -995,14 +995,14 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
nNewDeltaX = nDeltaX + nCurX - aViewData.GetCurX();
if (nNewDeltaX < 0)
nNewDeltaX = 0;
- nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
+ nSizeX = aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
if ( nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY )
{
nNewDeltaY = nDeltaY + nCurY - aViewData.GetCurY();
if (nNewDeltaY < 0)
nNewDeltaY = 0;
- nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
+ nSizeY = aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
}
// like old version of SC_FOLLOW_JUMP:
@@ -1012,14 +1012,14 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
nNewDeltaX = nCurX - (nSizeX / 2);
if (nNewDeltaX < 0)
nNewDeltaX = 0;
- nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
+ nSizeX = aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
if ( nCurY < nNewDeltaY || nCurY >= nNewDeltaY+nSizeY )
{
nNewDeltaY = nCurY - (nSizeY / 2);
if (nNewDeltaY < 0)
nNewDeltaY = 0;
- nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
+ nSizeY = aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
}
bDoLine = true;
@@ -1041,7 +1041,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
SCTAB nTab = aViewData.GetTabNo();
while ( nNewDeltaX < MAXCOL && !pDoc->GetColWidth( nNewDeltaX, nTab ) )
++nNewDeltaX;
- nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
+ nSizeX = aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
}
while ( nCurY >= nNewDeltaY+nSizeY )
{
@@ -1050,7 +1050,7 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
SCTAB nTab = aViewData.GetTabNo();
while ( nNewDeltaY < MAXROW && !pDoc->GetRowHeight( nNewDeltaY, nTab ) )
++nNewDeltaY;
- nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
+ nSizeY = aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
}
if ( nCurX < nNewDeltaX )
nNewDeltaX = nCurX;
@@ -1059,14 +1059,14 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
}
if ( nNewDeltaX != nDeltaX )
- nSizeX = (SCsCOL) aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
+ nSizeX = aViewData.CellsAtX( nNewDeltaX, 1, eAlignX );
if (nNewDeltaX+nSizeX-1 > MAXCOL)
nNewDeltaX = MAXCOL-nSizeX+1;
if (nNewDeltaX < 0)
nNewDeltaX = 0;
if ( nNewDeltaY != nDeltaY )
- nSizeY = (SCsROW) aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
+ nSizeY = aViewData.CellsAtY( nNewDeltaY, 1, eAlignY );
if (nNewDeltaY+nSizeY-1 > MAXROW)
nNewDeltaY = MAXROW-nSizeY+1;
if (nNewDeltaY < 0)
@@ -1081,13 +1081,13 @@ void ScTabView::AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
// switch active part again
if (bHFix)
- if (eActiveX == SC_SPLIT_RIGHT && nCurX < (SCsCOL)aViewData.GetFixPosX())
+ if (eActiveX == SC_SPLIT_RIGHT && nCurX < aViewData.GetFixPosX())
{
ActivatePart( (eActiveY==SC_SPLIT_TOP) ? SC_SPLIT_TOPLEFT : SC_SPLIT_BOTTOMLEFT );
eActiveX = SC_SPLIT_LEFT;
}
if (bVFix)
- if (eActiveY == SC_SPLIT_BOTTOM && nCurY < (SCsROW)aViewData.GetFixPosY())
+ if (eActiveY == SC_SPLIT_BOTTOM && nCurY < aViewData.GetFixPosY())
{
ActivatePart( (eActiveX==SC_SPLIT_LEFT) ? SC_SPLIT_TOPLEFT : SC_SPLIT_TOPRIGHT );
}
@@ -1115,7 +1115,7 @@ bool ScTabView::SelMouseButtonDown( const MouseEvent& rMEvt )
// MoveCursor - with adjustment of the view section
-void ScTabView::MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
+void ScTabView::MoveCursorAbs( SCCOL nCurX, SCROW nCurY, ScFollowMode eMode,
bool bShift, bool bControl, bool bKeepOld, bool bKeepSel )
{
if (!bKeepOld)
@@ -1189,7 +1189,7 @@ void ScTabView::MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
TestHintWindow();
}
-void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
+void ScTabView::MoveCursorRel( SCCOL nMovX, SCROW nMovY, ScFollowMode eMode,
bool bShift, bool bKeepSel )
{
ScDocument* pDoc = aViewData.GetDocument();
@@ -1206,23 +1206,23 @@ void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
if ( bSkipProtected && bSkipUnprotected )
return;
- SCsCOL nOldX;
- SCsROW nOldY;
- SCsCOL nCurX;
- SCsROW nCurY;
+ SCCOL nOldX;
+ SCROW nOldY;
+ SCCOL nCurX;
+ SCROW nCurY;
if ( aViewData.IsRefMode() )
{
- nOldX = (SCsCOL) aViewData.GetRefEndX();
- nOldY = (SCsROW) aViewData.GetRefEndY();
+ nOldX = aViewData.GetRefEndX();
+ nOldY = aViewData.GetRefEndY();
nCurX = nOldX + nMovX;
nCurY = nOldY + nMovY;
}
else
{
- nOldX = (SCsCOL) aViewData.GetCurX();
- nOldY = (SCsROW) aViewData.GetCurY();
- nCurX = (nMovX != 0) ? nOldX+nMovX : (SCsCOL) aViewData.GetOldCurX();
- nCurY = (nMovY != 0) ? nOldY+nMovY : (SCsROW) aViewData.GetOldCurY();
+ nOldX = aViewData.GetCurX();
+ nOldY = aViewData.GetCurY();
+ nCurX = (nMovX != 0) ? nOldX+nMovX : aViewData.GetOldCurX();
+ nCurY = (nMovY != 0) ? nOldY+nMovY : aViewData.GetOldCurY();
}
if (nMovX < 0 && nOldX == 0)
@@ -1247,23 +1247,23 @@ void ScTabView::MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
MoveCursorAbs( nCurX, nCurY, eMode, bShift, false, true, bKeepSel );
}
-void ScTabView::MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, bool bShift, bool bKeepSel )
+void ScTabView::MoveCursorPage( SCCOL nMovX, SCROW nMovY, ScFollowMode eMode, bool bShift, bool bKeepSel )
{
- SCsCOL nPageX;
- SCsROW nPageY;
+ SCCOL nPageX;
+ SCROW nPageY;
GetPageMoveEndPosition(nMovX, nMovY, nPageX, nPageY);
MoveCursorRel( nPageX, nPageY, eMode, bShift, bKeepSel );
}
-void ScTabView::MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, bool bShift, bool bKeepSel )
+void ScTabView::MoveCursorArea( SCCOL nMovX, SCROW nMovY, ScFollowMode eMode, bool bShift, bool bKeepSel )
{
- SCsCOL nNewX;
- SCsROW nNewY;
+ SCCOL nNewX;
+ SCROW nNewY;
GetAreaMoveEndPosition(nMovX, nMovY, eMode, nNewX, nNewY, eMode);
MoveCursorRel(nNewX, nNewY, eMode, bShift, bKeepSel);
}
-void ScTabView::MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, bool bShift, bool bKeepSel )
+void ScTabView::MoveCursorEnd( SCCOL nMovX, SCROW nMovY, ScFollowMode eMode, bool bShift, bool bKeepSel )
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
@@ -1290,10 +1290,10 @@ void ScTabView::MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, b
nNewY=nUsedY;
aViewData.ResetOldCursor();
- MoveCursorRel( ((SCsCOL)nNewX)-(SCsCOL)nCurX, ((SCsROW)nNewY)-(SCsROW)nCurY, eMode, bShift, bKeepSel );
+ MoveCursorRel( nNewX-nCurX, nNewY-nCurY, eMode, bShift, bKeepSel );
}
-void ScTabView::MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, bool bShift )
+void ScTabView::MoveCursorScreen( SCCOL nMovX, SCROW nMovY, ScFollowMode eMode, bool bShift )
{
ScDocument* pDoc = aViewData.GetDocument();
SCTAB nTab = aViewData.GetTabNo();
@@ -1339,8 +1339,8 @@ void ScTabView::MoveCursorEnter( bool bShift ) // bShift -> up/down
return;
}
- SCsCOL nMoveX = 0;
- SCsROW nMoveY = 0;
+ SCCOL nMoveX = 0;
+ SCROW nMoveY = 0;
switch ((ScDirection)rOpt.GetMoveDir())
{
case DIR_BOTTOM:
@@ -1370,7 +1370,7 @@ void ScTabView::MoveCursorEnter( bool bShift ) // bShift -> up/down
ScDocument* pDoc = aViewData.GetDocument();
pDoc->GetNextPos( nNewX,nNewY, nTab, nMoveX,nMoveY, true, false, rMark );
- MoveCursorRel( ((SCsCOL)nNewX)-(SCsCOL)nCurX, ((SCsROW)nNewY)-(SCsROW)nCurY,
+ MoveCursorRel( nNewX-nCurX, nNewY-nCurY,
SC_FOLLOW_LINE, false, true );
// update input line even if cursor was not moved
@@ -1388,7 +1388,7 @@ void ScTabView::MoveCursorEnter( bool bShift ) // bShift -> up/down
SCCOL nCurX;
SCROW nCurY;
aViewData.GetMoveCursor( nCurX,nCurY );
- nMoveX = ((SCsCOL)nTabCol)-(SCsCOL)nCurX;
+ nMoveX = nTabCol-nCurX;
}
}
@@ -1409,8 +1409,8 @@ bool ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
sal_uInt16 nCode = rKCode.GetCode();
// CURSOR keys
- SCsCOL nDX = 0;
- SCsROW nDY = 0;
+ SCCOL nDX = 0;
+ SCROW nDY = 0;
switch( nCode )
{
case KEY_LEFT: nDX = -1; break;
@@ -1439,7 +1439,7 @@ bool ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
nDX = (nCode == KEY_PAGEUP) ? -1 : 1;
switch( eModifier )
{
- case MOD_NONE: MoveCursorPage( 0, static_cast<SCsCOLROW>(nDX), SC_FOLLOW_FIX, bSel ); break;
+ case MOD_NONE: MoveCursorPage( 0, static_cast<SCCOLROW>(nDX), SC_FOLLOW_FIX, bSel ); break;
case MOD_ALT: MoveCursorPage( nDX, 0, SC_FOLLOW_FIX, bSel ); break;
case MOD_CTRL: SelectNextTab( nDX, false ); break;
default:
@@ -1458,7 +1458,7 @@ bool ScTabView::MoveCursorKeyInput( const KeyEvent& rKeyEvent )
switch( eModifier )
{
case MOD_NONE: MoveCursorEnd( nDX, 0, eMode, bSel ); break;
- case MOD_CTRL: MoveCursorEnd( nDX, static_cast<SCsCOLROW>(nDX), eMode, bSel ); break;
+ case MOD_CTRL: MoveCursorEnd( nDX, static_cast<SCCOLROW>(nDX), eMode, bSel ); break;
default:
{
// added to avoid warnings
@@ -1492,8 +1492,7 @@ void ScTabView::FindNextUnprot( bool bShift, bool bInSelection )
if ( nTabCol == SC_TABSTART_NONE )
nTabCol = nCurX; // back to this column after Enter
- MoveCursorRel( ((SCsCOL)nNewX)-(SCsCOL)nCurX, ((SCsROW)nNewY)-(SCsROW)nCurY,
- SC_FOLLOW_LINE, false, true );
+ MoveCursorRel( nNewX-nCurX, nNewY-nCurY, SC_FOLLOW_LINE, false, true );
// TabCol is reset in MoveCursorRel...
aViewData.SetTabStartCol( nTabCol );
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index cc48581aaaaa..f4daf380d684 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1711,14 +1711,14 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
}
// Number of cells on a screen
-SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeX ) const
+SCCOL ScViewData::CellsAtX( SCCOL nPosX, SCCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeX ) const
{
OSL_ENSURE( nDir==1 || nDir==-1, "wrong CellsAt call" );
if (pView)
const_cast<ScViewData*>(this)->aScrSize.Width() = pView->GetGridWidth(eWhichX);
- SCsCOL nX;
+ SCCOL nX;
sal_uInt16 nScrPosX = 0;
if (nScrSizeX == SC_SIZE_NONE) nScrSizeX = (sal_uInt16) aScrSize.Width();
@@ -1728,9 +1728,9 @@ SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, sal_
nX = nPosX-1; // backwards
bool bOut = false;
- for ( ; nScrPosX<=nScrSizeX && !bOut; nX = sal::static_int_cast<SCsCOL>(nX + nDir) )
+ for ( ; nScrPosX<=nScrSizeX && !bOut; nX = sal::static_int_cast<SCCOL>(nX + nDir) )
{
- SCsCOL nColNo = nX;
+ SCCOL nColNo = nX;
if ( nColNo < 0 || nColNo > MAXCOL )
bOut = true;
else
@@ -1745,7 +1745,7 @@ SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, sal_
}
if (nDir==1)
- nX = sal::static_int_cast<SCsCOL>( nX - nPosX );
+ nX = sal::static_int_cast<SCCOL>( nX - nPosX );
else
nX = (nPosX-1)-nX;
@@ -1753,7 +1753,7 @@ SCCOL ScViewData::CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, sal_
return nX;
}
-SCROW ScViewData::CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeY ) const
+SCROW ScViewData::CellsAtY( SCROW nPosY, SCROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeY ) const
{
OSL_ENSURE( nDir==1 || nDir==-1, "wrong CellsAt call" );
@@ -1849,7 +1849,7 @@ bool ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& r
}
void ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
- SCsCOL& rPosX, SCsROW& rPosY,
+ SCCOL& rPosX, SCROW& rPosY,
bool bTestMerge, bool bRepair )
{
// special handling of 0 is now in ScViewFunctionSet::SetCursorAtPoint
@@ -1865,8 +1865,8 @@ void ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
nClickX = aScrSize.Width() - 1 - nClickX;
}
- SCsCOL nStartPosX = GetPosX(eHWhich);
- SCsROW nStartPosY = GetPosY(eVWhich);
+ SCCOL nStartPosX = GetPosX(eHWhich);
+ SCROW nStartPosY = GetPosY(eVWhich);
rPosX = nStartPosX;
rPosY = nStartPosY;
long nScrX = 0;
@@ -1953,7 +1953,7 @@ void ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
}
void ScViewData::GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich,
- SCsCOL nPosX, SCsROW nPosY, bool& rLeft, bool& rTop )
+ SCCOL nPosX, SCROW nPosY, bool& rLeft, bool& rTop )
{
bool bLayoutRTL = pDoc->IsLayoutRTL( nTabNo );
long nLayoutSign = bLayoutRTL ? -1 : 1;
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index b1b89f1d563d..fca59b3e8425 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1687,8 +1687,8 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
// No selection -> but we have a start point (top left corner of the
// current view), start searching from there, not from the current
// cursor position.
- SCsCOL nPosX;
- SCsROW nPosY;
+ SCCOL nPosX;
+ SCROW nPosY;
int nPixelX = pSearchItem->GetStartPointX() * GetViewData().GetPPTX();
int nPixelY = pSearchItem->GetStartPointY() * GetViewData().GetPPTY();