diff options
99 files changed, 668 insertions, 675 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index 9203eec2928e..93ea9c1720be 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -283,15 +283,15 @@ public: inline void PutInOrder( ScAddress& rAddress ); - void IncRow( SCsROW nDelta = 1 ) + void IncRow( SCROW nDelta = 1 ) { nRow = sal::static_int_cast<SCROW>(nRow + nDelta); } - void IncCol( SCsCOL nDelta = 1 ) + void IncCol( SCCOL nDelta = 1 ) { nCol = sal::static_int_cast<SCCOL>(nCol + nDelta); } - void IncTab( SCsTAB nDelta = 1 ) + void IncTab( SCTAB nDelta = 1 ) { nTab = sal::static_int_cast<SCTAB>(nTab + nDelta); } @@ -332,7 +332,7 @@ public: @param pDocument The document for the maximum defined sheet number. */ - SC_DLLPUBLIC SAL_WARN_UNUSED_RESULT bool Move( SCsCOL nDeltaX, SCsROW nDeltaY, SCsTAB nDeltaZ, + SC_DLLPUBLIC SAL_WARN_UNUSED_RESULT bool Move( SCCOL nDeltaX, SCROW nDeltaY, SCTAB nDeltaZ, ScAddress& rErrorPos, ScDocument* pDocument = nullptr ); inline bool operator==( const ScAddress& rAddress ) const; @@ -595,11 +595,11 @@ public: @param pDocument The document for the maximum defined sheet number. */ - SC_DLLPUBLIC SAL_WARN_UNUSED_RESULT bool Move( SCsCOL aDeltaX, SCsROW aDeltaY, SCsTAB aDeltaZ, + SC_DLLPUBLIC SAL_WARN_UNUSED_RESULT bool Move( SCCOL aDeltaX, SCROW aDeltaY, SCTAB aDeltaZ, ScRange& rErrorRange, ScDocument* pDocument = nullptr ); /** Same as Move() but with sticky end col/row anchors. */ - SC_DLLPUBLIC SAL_WARN_UNUSED_RESULT bool MoveSticky( SCsCOL aDeltaX, SCsROW aDeltaY, SCsTAB aDeltaZ, + SC_DLLPUBLIC SAL_WARN_UNUSED_RESULT bool MoveSticky( SCCOL aDeltaX, SCROW aDeltaY, SCTAB aDeltaZ, ScRange& rErrorRange ); SC_DLLPUBLIC void ExtendTo( const ScRange& rRange ); @@ -615,12 +615,12 @@ public: /** Increment or decrement end column unless sticky or until it becomes sticky. Checks if the range encompasses at least two columns so should be called before adjusting the start column. */ - void IncEndColSticky( SCsCOL nDelta ); + void IncEndColSticky( SCCOL nDelta ); /** Increment or decrement end row unless sticky or until it becomes sticky. Checks if the range encompasses at least two rows so should be called before adjusting the start row. */ - void IncEndRowSticky( SCsROW nDelta ); + void IncEndRowSticky( SCROW nDelta ); inline bool operator==( const ScRange& rRange ) const; inline bool operator!=( const ScRange& rRange ) const; diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx index e43ff9268866..b7ac603f47ba 100644 --- a/sc/inc/attarray.hxx +++ b/sc/inc/attarray.hxx @@ -145,15 +145,15 @@ public: void ChangeIndent( SCROW nStartRow, SCROW nEndRow, bool bIncrement ); /// Including current, may return -1 - SCsROW GetNextUnprotected( SCsROW nRow, bool bUp ) const; + SCROW GetNextUnprotected( SCROW nRow, bool bUp ) const; /// May return -1 if not found - SCsROW SearchStyle( - SCsROW nRow, const ScStyleSheet* pSearchStyle, bool bUp, + SCROW SearchStyle( + SCROW nRow, const ScStyleSheet* pSearchStyle, bool bUp, const ScMarkArray* pMarkArray = nullptr) const; bool SearchStyleRange( - SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp, + SCROW& rRow, SCROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp, const ScMarkArray* pMarkArray = nullptr) const; bool ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags ); diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx index f7a5e4a0616d..b2f82d2046d2 100644 --- a/sc/inc/attrib.hxx +++ b/sc/inc/attrib.hxx @@ -54,11 +54,11 @@ bool SC_DLLPUBLIC ScHasPriority( const ::editeng::SvxBorderLine* pThis, const :: class SC_DLLPUBLIC ScMergeAttr: public SfxPoolItem { - SCsCOL nColMerge; - SCsROW nRowMerge; + SCCOL nColMerge; + SCROW nRowMerge; public: ScMergeAttr(); - ScMergeAttr( SCsCOL nCol, SCsROW nRow ); + ScMergeAttr( SCCOL nCol, SCROW nRow ); ScMergeAttr( const ScMergeAttr& ); virtual ~ScMergeAttr() override; @@ -66,8 +66,8 @@ public: virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVer ) const override; - SCsCOL GetColMerge() const {return nColMerge; } - SCsROW GetRowMerge() const {return nRowMerge; } + SCCOL GetColMerge() const {return nColMerge; } + SCROW GetRowMerge() const {return nRowMerge; } bool IsMerged() const { return nColMerge>1 || nRowMerge>1; } diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx index c2eb57f3ff52..9484db26e94d 100644 --- a/sc/inc/chgtrack.hxx +++ b/sc/inc/chgtrack.hxx @@ -298,7 +298,7 @@ protected: void Accept(); virtual bool Reject(ScDocument* pDoc) = 0; - void RejectRestoreContents( ScChangeTrack*, SCsCOL nDx, SCsROW nDy ); + void RejectRestoreContents( ScChangeTrack*, SCCOL nDx, SCROW nDy ); // used in Reject() instead of IsRejectable() bool IsInternalRejectable() const; @@ -464,10 +464,10 @@ class ScChangeActionDel : public ScChangeAction ScChangeActionIns* pCutOff; // cut insert short nCutOff; // +: start -: end ScChangeActionDelMoveEntry* pLinkMove; - SCsCOL nDx; - SCsROW nDy; + SCCOL nDx; + SCROW nDy; - ScChangeActionDel( const ScRange& rRange, SCsCOL nDx, SCsROW nDy, ScChangeTrack* ); + ScChangeActionDel( const ScRange& rRange, SCCOL nDx, SCROW nDy, ScChangeTrack* ); virtual ~ScChangeActionDel() override; virtual void AddContent( ScChangeActionContent* ) override; @@ -490,7 +490,7 @@ public: const sal_uLong nRejectingNumber, const ScBigRange& aBigRange, const OUString& aUser, const DateTime& aDateTime, const OUString &sComment, const ScChangeActionType eType, - const SCsCOLROW nD, ScChangeTrack* pTrack); // only to use in the XML import + const SCCOLROW nD, ScChangeTrack* pTrack); // only to use in the XML import // which of nDx and nDy is set is dependent on the type // is the last in a row (or single) @@ -505,8 +505,8 @@ public: // is col, belonging to a TabDelete bool IsTabDeleteCol() const; - SCsCOL GetDx() const { return nDx; } - SCsROW GetDy() const { return nDy; } + SCCOL GetDx() const { return nDx; } + SCROW GetDy() const { return nDy; } ScBigRange GetOverAllRange() const; // BigRange + (nDx, nDy) const ScChangeActionDelMoveEntry* GetFirstMoveEntry() const @@ -706,7 +706,7 @@ class ScChangeActionContent : public ScChangeAction bool bOldest, ::std::stack<ScChangeActionContent*>* pRejectActions ); void PutValueToDoc( - const ScCellValue& rCell, const OUString& rValue, ScDocument* pDoc, SCsCOL nDx, SCsROW nDy ) const; + const ScCellValue& rCell, const OUString& rValue, ScDocument* pDoc, SCCOL nDx, SCROW nDy ) const; protected: using ScChangeAction::GetRefString; @@ -740,9 +740,9 @@ public: virtual ScChangeActionLinkEntry** GetDeletedInAddress() override; void PutOldValueToDoc( ScDocument*, - SCsCOL nDx, SCsROW nDy ) const; + SCCOL nDx, SCROW nDy ) const; void PutNewValueToDoc( ScDocument*, - SCsCOL nDx, SCsROW nDy ) const; + SCCOL nDx, SCROW nDy ) const; void SetOldValue( const ScCellValue& rCell, const ScDocument* pFromDoc, ScDocument* pToDoc, sal_uLong nFormat ); @@ -852,7 +852,7 @@ enum ScChangeTrackMergeState class ScChangeTrack : public utl::ConfigurationListener { - friend void ScChangeAction::RejectRestoreContents( ScChangeTrack*, SCsCOL, SCsROW ); + friend void ScChangeAction::RejectRestoreContents( ScChangeTrack*, SCCOL, SCROW ); friend bool ScChangeActionDel::Reject( ScDocument* pDoc ); friend void ScChangeActionDel::DeleteCellEntries(); friend void ScChangeActionMove::DeleteCellEntries(); @@ -941,15 +941,15 @@ class ScChangeTrack : public utl::ConfigurationListener void UpdateReference( ScChangeAction** ppFirstAction, ScChangeAction* pAct, bool bUndo ); void Append( ScChangeAction* pAppend, sal_uLong nAction ); SC_DLLPUBLIC void AppendDeleteRange( const ScRange&, - ScDocument* pRefDoc, SCsTAB nDz, + ScDocument* pRefDoc, SCTAB nDz, sal_uLong nRejectingInsert ); void AppendOneDeleteRange( const ScRange& rOrgRange, ScDocument* pRefDoc, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz, + SCCOL nDx, SCROW nDy, SCTAB nDz, sal_uLong nRejectingInsert ); void LookUpContents( const ScRange& rOrgRange, ScDocument* pRefDoc, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); + SCCOL nDx, SCROW nDy, SCTAB nDz ); void Remove( ScChangeAction* ); void MasterLinks( ScChangeAction* ); @@ -1037,7 +1037,7 @@ public: SC_DLLPUBLIC void AppendDeleteRange( const ScRange&, ScDocument* pRefDoc, sal_uLong& nStartAction, sal_uLong& nEndAction, - SCsTAB nDz = 0 ); + SCTAB nDz = 0 ); // nDz: multi TabDel, LookUpContent must be searched // with an offset of -nDz diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 0c195eb316d0..d406a21ac784 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -482,12 +482,12 @@ public: bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const; /// May return -1 if not found - SCsROW SearchStyle( - SCsROW nRow, const ScStyleSheet* pSearchStyle, bool bUp, bool bInSelection, + SCROW SearchStyle( + SCROW nRow, const ScStyleSheet* pSearchStyle, bool bUp, bool bInSelection, const ScMarkData& rMark) const; bool SearchStyleRange( - SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp, + SCROW& rRow, SCROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp, bool bInSelection, const ScMarkData& rMark) const; bool ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags ); @@ -496,7 +496,7 @@ public: void RemoveProtected( SCROW nStartRow, SCROW nEndRow ); - SCsROW ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray ); + SCROW ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray ); void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast ); void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark ); @@ -516,7 +516,7 @@ public: sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow, sal_uInt16 nMinHeight, SCROW nMinStart ); /// Including current, may return -1 - SCsROW GetNextUnprotected( SCROW nRow, bool bUp ) const; + SCROW GetNextUnprotected( SCROW nRow, bool bUp ) const; void GetFilterEntries( sc::ColumnBlockConstPosition& rBlockPos, SCROW nStartRow, SCROW nEndRow, diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index 9e73783f1f28..9c35ff4b1b82 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -281,7 +281,7 @@ private: const CharClass* pCharClass; // which character classification is used for parseAnyToken sal_uInt16 mnPredetectedReference; // reference when reading ODF, 0 (none), 1 (single) or 2 (double) - SCsTAB nMaxTab; // last sheet in document + SCTAB nMaxTab; // last sheet in document sal_Int32 mnRangeOpPosInSymbol; // if and where a range operator is in symbol const Convention *pConv; ExtendedErrorDetection meExtendedErrorDetection; diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx index a5b761e15d5d..9412f23b7c65 100644 --- a/sc/inc/dbdata.hxx +++ b/sc/inc/dbdata.hxx @@ -211,7 +211,7 @@ public: void UpdateReference(ScDocument* pDoc, UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz); + SCCOL nDx, SCROW nDy, SCTAB nDz); void ExtendDataArea(ScDocument* pDoc); void CalcSaveFilteredCount(SCSIZE nNonFilteredRowCount); @@ -324,7 +324,7 @@ public: void UpdateReference(UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz); + SCCOL nDx, SCROW nDy, SCTAB nDz); void UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ); void SetRefreshHandler( const Link<Timer *, void>& rLink ) diff --git a/sc/inc/detdata.hxx b/sc/inc/detdata.hxx index 61b29801a156..eb6eb4ea159d 100644 --- a/sc/inc/detdata.hxx +++ b/sc/inc/detdata.hxx @@ -68,7 +68,7 @@ public: void DeleteOnTab( SCTAB nTab ); void UpdateReference( ScDocument* pDoc, UpdateRefMode eUpdateRefMode, - const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); + const ScRange& rRange, SCCOL nDx, SCROW nDy, SCTAB nDz ); bool operator==( const ScDetOpList& r ) const; // for ref-undo diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 87c89958acf2..da3f6feb2d66 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -945,7 +945,7 @@ public: void UpdateChartRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); + SCCOL nDx, SCROW nDy, SCTAB nDz ); //! only assigns the new RangeList, no ChartListener or the like void SetChartRangeList( const OUString& rChartName, const ScRangeListRef& rNewRangeListRef ); @@ -1328,7 +1328,7 @@ public: ScDirection eDir ); void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ) const; - SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY, + SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCCOL nMovX, SCROW nMovY, bool bMarked, bool bUnprotected, const ScMarkData& rMark ) const; bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab, @@ -1442,10 +1442,10 @@ public: SCCOL nCol2, SCROW nRow2 ); void CopyBlockFromClip( sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark, - SCsCOL nDx, SCsROW nDy ); + SCCOL nDx, SCROW nDy ); void CopyNonFilteredFromClip( sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - const ScMarkData& rMark, SCsCOL nDx, SCROW & rClipStartRow ); + const ScMarkData& rMark, SCCOL nDx, SCROW & rClipStartRow ); void StartListeningFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, @@ -2058,7 +2058,7 @@ public: void DelBroadcastAreasInRange( const ScRange& rRange ); void UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode, const ScRange& rRange, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); + SCCOL nDx, SCROW nDy, SCTAB nDz ); void StartListeningCell( const ScAddress& rAddress, SvtListener* pListener ); @@ -2337,7 +2337,7 @@ private: void DeleteAreaLinksOnTab( SCTAB nTab ); void UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode, - const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); + const ScRange& r, SCCOL nDx, SCROW nDy, SCTAB nDz ); void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks); diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index 9e02cfd8f0df..aaed76a7e141 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -209,7 +209,7 @@ public: bool GetMembers( sal_Int32 nDim, sal_Int32 nHier, ::std::vector<ScDPLabelData::Member>& rMembers ); void UpdateReference( UpdateRefMode eUpdateRefMode, - const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); + const ScRange& r, SCCOL nDx, SCROW nDy, SCTAB nDz ); bool RefsEqual( const ScDPObject& r ) const; void WriteRefsTo( ScDPObject& r ) const; @@ -279,7 +279,7 @@ public: SC_DLLPUBLIC size_t size() const; void updateReference( - UpdateRefMode eMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz); + UpdateRefMode eMode, const ScRange& r, SCCOL nDx, SCROW nDy, SCTAB nDz); SC_DLLPUBLIC ScDPCache* getExistingCache(const ScRange& rRange); SC_DLLPUBLIC const ScDPCache* getExistingCache(const ScRange& rRange) const; @@ -375,7 +375,7 @@ public: void DeleteOnTab( SCTAB nTab ); void UpdateReference( UpdateRefMode eUpdateRefMode, - const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); + const ScRange& r, SCCOL nDx, SCROW nDy, SCTAB nDz ); void CopyToTab( SCTAB nOld, SCTAB nNew ); bool RefsEqual( const ScDPCollection& r ) const; void WriteRefsTo( ScDPCollection& r ) const; diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx index 46b117256957..aab7d34424e9 100644 --- a/sc/inc/drwlayer.hxx +++ b/sc/inc/drwlayer.hxx @@ -102,7 +102,7 @@ private: private: void MoveCells( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2, - SCsCOL nDx,SCsROW nDy, bool bUpdateNoteCaptionPos ); + SCCOL nDx,SCROW nDy, bool bUpdateNoteCaptionPos ); void RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegativePage, bool bUpdateNoteCaptionPos ); void ResizeLastRectFromAnchor( SdrObject* pObj, ScDrawObjData& rData, bool bUseLogicRect, bool bNegativePage, bool bCanResize, bool bHiddenAsZero = true ); @@ -140,7 +140,7 @@ public: void AddCalcUndo( SdrUndoAction* pUndo ); void MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2, - SCsCOL nDx,SCsROW nDy, bool bInsDel, bool bUpdateNoteCaptionPos ); + SCCOL nDx,SCROW nDy, bool bInsDel, bool bUpdateNoteCaptionPos ); bool HasObjectsInRows( SCTAB nTab, SCROW nStartRow, SCROW nEndRow ); diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index 417ef65c3bc1..27002763d88e 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -242,7 +242,7 @@ public: void initializeDoc(sal_uInt16 nFileId, const ::std::vector<OUString>& rTabNames, const OUString& rBaseName); OUString getTableName(sal_uInt16 nFileId, size_t nCacheId) const; void getAllTableNames(sal_uInt16 nFileId, ::std::vector<OUString>& rTabNames) const; - SCsTAB getTabSpan( sal_uInt16 nFileId, const OUString& rStartTabName, const OUString& rEndTabName ) const; + SCTAB getTabSpan( sal_uInt16 nFileId, const OUString& rStartTabName, const OUString& rEndTabName ) const; void getAllNumberFormats(::std::vector<sal_uInt32>& rNumFmts) const; /** @@ -504,7 +504,7 @@ public: * -1 if nFileId or rStartTabName not found * 0 if rEndTabName not found */ - SCsTAB getCachedTabSpan( + SCTAB getCachedTabSpan( sal_uInt16 nFileId, const OUString& rStartTabName, const OUString& rEndTabName) const; /** diff --git a/sc/inc/hints.hxx b/sc/inc/hints.hxx index 2ad9f1e4707e..2ffb689bb67b 100644 --- a/sc/inc/hints.hxx +++ b/sc/inc/hints.hxx @@ -50,20 +50,20 @@ class ScUpdateRefHint : public SfxHint { UpdateRefMode eUpdateRefMode; ScRange aRange; - SCsCOL nDx; - SCsROW nDy; - SCsTAB nDz; + SCCOL nDx; + SCROW nDy; + SCTAB nDz; public: ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR, - SCsCOL nX, SCsROW nY, SCsTAB nZ ); + SCCOL nX, SCROW nY, SCTAB nZ ); virtual ~ScUpdateRefHint() override; UpdateRefMode GetMode() const { return eUpdateRefMode; } const ScRange& GetRange() const { return aRange; } - SCsCOL GetDx() const { return nDx; } - SCsROW GetDy() const { return nDy; } - SCsTAB GetDz() const { return nDz; } + SCCOL GetDx() const { return nDx; } + SCROW GetDy() const { return nDy; } + SCTAB GetDz() const { return nDz; } }; //! move ScLinkRefreshedHint to a different file? diff --git a/sc/inc/markarr.hxx b/sc/inc/markarr.hxx index a88dd7683e1b..33a7b9031128 100644 --- a/sc/inc/markarr.hxx +++ b/sc/inc/markarr.hxx @@ -58,7 +58,7 @@ public: bool Search( SCROW nRow, SCSIZE& nIndex ) const; /// Including current row, may return -1 if bUp and not found - SCsROW GetNextMarked( SCsROW nRow, bool bUp ) const; + SCROW GetNextMarked( SCROW nRow, bool bUp ) const; SCROW GetMarkEnd( SCROW nRow, bool bUp ) const; }; diff --git a/sc/inc/markdata.hxx b/sc/inc/markdata.hxx index 2f182eeb9426..51f63a477d67 100644 --- a/sc/inc/markdata.hxx +++ b/sc/inc/markdata.hxx @@ -134,7 +134,7 @@ public: bool IsAllMarked( const ScRange& rRange ) const; // Multi /// May return -1 - SCsROW GetNextMarked( SCCOL nCol, SCsROW nRow, bool bUp ) const; + SCROW GetNextMarked( SCCOL nCol, SCROW nRow, bool bUp ) const; bool HasMultiMarks( SCCOL nCol ) const; bool HasAnyMultiMarks() const; diff --git a/sc/inc/markmulti.hxx b/sc/inc/markmulti.hxx index 22f0ee5d1dad..4999df5c5708 100644 --- a/sc/inc/markmulti.hxx +++ b/sc/inc/markmulti.hxx @@ -54,7 +54,7 @@ public: bool GetMark( SCCOL nCol, SCROW nRow ) const; bool IsAllMarked( SCCOL nCol, SCROW nStartRow, SCROW nEndRow ) const; bool HasEqualRowsMarked( SCCOL nCol1, SCCOL nCol2 ) const; - SCsROW GetNextMarked( SCCOL nCol, SCsROW nRow, bool bUp ) const; + SCROW GetNextMarked( SCCOL nCol, SCROW nRow, bool bUp ) const; void SetMarkArea( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow, bool bMark ); bool IsRowMarked( SCROW nRow ) const; bool IsRowRangeMarked( SCROW nStartRow, SCROW nEndRow ) const; diff --git a/sc/inc/olinetab.hxx b/sc/inc/olinetab.hxx index e78b651c7613..8f4d73d98c61 100644 --- a/sc/inc/olinetab.hxx +++ b/sc/inc/olinetab.hxx @@ -54,7 +54,7 @@ public: */ SC_DLLPUBLIC bool IsVisible() const { return bVisible;} - void Move( SCsCOLROW nDelta ); + void Move( SCCOLROW nDelta ); void SetSize( SCSIZE nNewSize ); void SetPosSize( SCCOLROW nNewPos, SCSIZE nNewSize ); void SetHidden( bool bNewHidden ); diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx index 3fe510c1d361..5443f373a4af 100644 --- a/sc/inc/rangelst.hxx +++ b/sc/inc/rangelst.hxx @@ -50,9 +50,9 @@ public: bool UpdateReference( UpdateRefMode, ScDocument*, const ScRange& rWhere, - SCsCOL nDx, - SCsROW nDy, - SCsTAB nDz + SCCOL nDx, + SCROW nDy, + SCTAB nDz ); void InsertRow( SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW nRowPos, SCSIZE nSize ); @@ -116,7 +116,7 @@ public: void Join( const ScRangePair&, bool bIsInList = false ); void UpdateReference( UpdateRefMode, ScDocument*, const ScRange& rWhere, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); + SCCOL nDx, SCROW nDy, SCTAB nDz ); void DeleteOnTab( SCTAB nTab ); ScRangePair* Find( const ScAddress& ) const; ScRangePair* Find( const ScRange& ) const; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index c5941b0a085f..ef94249026b4 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -473,7 +473,7 @@ public: void CopyFromClip( sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - SCsCOL nDx, SCsROW nDy, ScTable* pTable ); + SCCOL nDx, SCROW nDy, ScTable* pTable ); void StartListeningFormulaCells( sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt, @@ -495,7 +495,7 @@ public: InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab ); void CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - SCsCOL nDx, SCsROW nDy, ScTable* pTable); + SCCOL nDx, SCROW nDy, ScTable* pTable); void TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable* pTransClip, InsertDeleteFlags nFlags, bool bAsLink ); @@ -550,7 +550,7 @@ public: SCCOL nEndCol, SCROW nEndRow, ScDirection eDir ) const; void FindAreaPos( SCCOL& rCol, SCROW& rRow, ScMoveDirection eDirection ) const; - void GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, + void GetNextPos( SCCOL& rCol, SCROW& rRow, SCCOL nMovX, SCROW nMovY, bool bMarked, bool bUnprotected, const ScMarkData& rMark ) const; void LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const; @@ -598,7 +598,7 @@ public: void UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz, bool bUpdateNoteCaptionPos = true ); + SCCOL nDx, SCROW nDy, SCTAB nDz, bool bUpdateNoteCaptionPos = true ); void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest, ScDocument* pUndoDoc ); @@ -1098,7 +1098,7 @@ private: ScSortInfoArray* CreateSortInfoArray( const ScSortParam& rSortParam, SCCOLROW nInd1, SCCOLROW nInd2, bool bKeepQuery, bool bUpdateRefs ); - void QuickSort( ScSortInfoArray*, SCsCOLROW nLo, SCsCOLROW nHi); + void QuickSort( ScSortInfoArray*, SCCOLROW nLo, SCCOLROW nHi); void SortReorderByColumn( ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2, bool bPattern, ScProgress* pProgress ); void SortReorderByRow( ScSortInfoArray* pArray, SCCOL nCol1, SCCOL nCol2, ScProgress* pProgress ); diff --git a/sc/inc/tabprotection.hxx b/sc/inc/tabprotection.hxx index f8226c302ae9..2c999749c5bd 100644 --- a/sc/inc/tabprotection.hxx +++ b/sc/inc/tabprotection.hxx @@ -188,7 +188,7 @@ public: void setEnhancedProtection( const ::std::vector< ScEnhancedProtection > & rProt ); const ::std::vector< ScEnhancedProtection > & getEnhancedProtection() const; - bool updateReference( UpdateRefMode, ScDocument*, const ScRange& rWhere, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); + bool updateReference( UpdateRefMode, ScDocument*, const ScRange& rWhere, SCCOL nDx, SCROW nDy, SCTAB nDz ); bool isBlockEditable( const ScRange& rRange ) const; bool isSelectionEditable( const ScRangeList& rRangeList ) const; diff --git a/sc/inc/types.hxx b/sc/inc/types.hxx index 53bb2616b040..4cfa434c21cb 100644 --- a/sc/inc/types.hxx +++ b/sc/inc/types.hxx @@ -23,12 +23,6 @@ typedef sal_Int16 SCCOL; typedef sal_Int16 SCTAB; typedef sal_Int32 SCCOLROW; ///< a type capable of holding either SCCOL or SCROW -// temporarily signed typedefs -typedef sal_Int32 SCsROW; -typedef sal_Int16 SCsCOL; -typedef sal_Int16 SCsTAB; -typedef sal_Int32 SCsCOLROW; - typedef ::boost::intrusive_ptr<ScMatrix> ScMatrixRef; typedef ::boost::intrusive_ptr<const ScMatrix> ScConstMatrixRef; diff --git a/sc/qa/unit/mark_test.cxx b/sc/qa/unit/mark_test.cxx index 6c983291fd58..abf3a9c56d3b 100644 --- a/sc/qa/unit/mark_test.cxx +++ b/sc/qa/unit/mark_test.cxx @@ -299,9 +299,9 @@ void Test::testMultiMark( const MultiMarkTestData& rMarksData ) for ( const auto& rRange : rAreaTestData.aNextMarked ) { - SCsROW nNextRow1 = aMark.GetNextMarked( rRange.aStart.Col(), rRange.aStart.Row(), !static_cast<bool>(rRange.aEnd.Col()) ); + SCROW nNextRow1 = aMark.GetNextMarked( rRange.aStart.Col(), rRange.aStart.Row(), !static_cast<bool>(rRange.aEnd.Col()) ); CPPUNIT_ASSERT_EQUAL( rRange.aEnd.Row(), nNextRow1 ); - SCsROW nNextRow2 = aMultiSel.GetNextMarked( rRange.aStart.Col(), rRange.aStart.Row(), !static_cast<bool>(rRange.aEnd.Col()) ); + SCROW nNextRow2 = aMultiSel.GetNextMarked( rRange.aStart.Col(), rRange.aStart.Row(), !static_cast<bool>(rRange.aEnd.Col()) ); CPPUNIT_ASSERT_EQUAL( rRange.aEnd.Row(), nNextRow2 ); } diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 3f6a38820abc..fe8d35aeeb09 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -1136,7 +1136,7 @@ formula::FormulaToken* getSingleRefToken(ScDocument& rDoc, const ScAddress& rPos return pToken; } -bool checkRelativeRefToken(ScDocument& rDoc, const ScAddress& rPos, SCsCOL nRelCol, SCsROW nRelRow) +bool checkRelativeRefToken(ScDocument& rDoc, const ScAddress& rPos, SCCOL nRelCol, SCROW nRelRow) { formula::FormulaToken* pToken = getSingleRefToken(rDoc, rPos); if (!pToken) diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index f27d24905071..94c2fce5d620 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -1482,8 +1482,8 @@ bool ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, { pPattern = pData[i].pPattern; pItem = static_cast<const ScMergeAttr*>( &pPattern->GetItem( ATTR_MERGE ) ); - SCsCOL nCountX = pItem->GetColMerge(); - SCsROW nCountY = pItem->GetRowMerge(); + SCCOL nCountX = pItem->GetColMerge(); + SCROW nCountY = pItem->GetRowMerge(); if (nCountX>1 || nCountY>1) { SCROW nThisRow = (i>0) ? pData[i-1].nRow+1 : 0; @@ -1538,8 +1538,8 @@ void ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow) pPattern = pData[nIndex].pPattern; pItem = static_cast<const ScMergeAttr*>( &pPattern->GetItem( ATTR_MERGE ) ); - SCsCOL nCountX = pItem->GetColMerge(); - SCsROW nCountY = pItem->GetRowMerge(); + SCCOL nCountX = pItem->GetColMerge(); + SCROW nCountY = pItem->GetRowMerge(); if (nCountX>1 || nCountY>1) { const ScMergeAttr* pAttr = static_cast<const ScMergeAttr*>( @@ -1797,7 +1797,7 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, bool bIncrement } } -SCsROW ScAttrArray::GetNextUnprotected( SCsROW nRow, bool bUp ) const +SCROW ScAttrArray::GetNextUnprotected( SCROW nRow, bool bUp ) const { long nRet = nRow; if (ValidRow(nRow)) @@ -2554,8 +2554,8 @@ void ScAttrArray::CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttr } } -SCsROW ScAttrArray::SearchStyle( - SCsROW nRow, const ScStyleSheet* pSearchStyle, bool bUp, +SCROW ScAttrArray::SearchStyle( + SCROW nRow, const ScStyleSheet* pSearchStyle, bool bUp, const ScMarkArray* pMarkArray) const { bool bFound = false; @@ -2627,10 +2627,10 @@ SCsROW ScAttrArray::SearchStyle( } bool ScAttrArray::SearchStyleRange( - SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp, + SCROW& rRow, SCROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp, const ScMarkArray* pMarkArray) const { - SCsROW nStartRow = SearchStyle( rRow, pSearchStyle, bUp, pMarkArray ); + SCROW nStartRow = SearchStyle( rRow, pSearchStyle, bUp, pMarkArray ); if (ValidRow(nStartRow)) { if ( !pData ) diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx index dbd9c2706ed2..5cde3aba4b4d 100644 --- a/sc/source/core/data/attrib.cxx +++ b/sc/source/core/data/attrib.cxx @@ -98,7 +98,7 @@ ScMergeAttr::ScMergeAttr(): nRowMerge(0) {} -ScMergeAttr::ScMergeAttr( SCsCOL nCol, SCsROW nRow): +ScMergeAttr::ScMergeAttr( SCCOL nCol, SCROW nRow): SfxPoolItem(ATTR_MERGE), nColMerge(nCol), nRowMerge(nRow) diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx index e4cf53641c40..389d26217963 100644 --- a/sc/source/core/data/bcaslot.cxx +++ b/sc/source/core/data/bcaslot.cxx @@ -412,7 +412,7 @@ void ScBroadcastAreaSlot::DelBroadcastAreasInRange( const ScRange& rRange ) } void ScBroadcastAreaSlot::UpdateRemove( UpdateRefMode eUpdateRefMode, - const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) + const ScRange& rRange, SCCOL nDx, SCROW nDy, SCTAB nDz ) { if (aBroadcastAreaTbl.empty()) return; @@ -917,7 +917,7 @@ void ScBroadcastAreaSlotMachine::DelBroadcastAreasInRange( // for all affected: remove, chain, update range, insert, and maybe delete void ScBroadcastAreaSlotMachine::UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode, - const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) + const ScRange& rRange, SCCOL nDx, SCROW nDy, SCTAB nDz ) { // remove affected and put in chain SCTAB nEndTab = rRange.aEnd.Tab(); diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 6895b49aff23..45f211cbedd1 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -114,7 +114,7 @@ void ScColumn::Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc, bool bEmptyA pAttrArray = new ScAttrArray( nCol, nTab, pDocument, &pDocument->maTabs[nTab]->aDefaultColAttrArray ); } -SCsROW ScColumn::GetNextUnprotected( SCROW nRow, bool bUp ) const +SCROW ScColumn::GetNextUnprotected( SCROW nRow, bool bUp ) const { return pAttrArray->GetNextUnprotected(nRow, bUp); } @@ -424,7 +424,7 @@ sal_uInt32 ScColumn::GetNumberFormat( SCROW nRow ) const return pAttrArray->GetPattern( nRow )->GetNumberFormat( pDocument->GetFormatTable() ); } -SCsROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray ) +SCROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray ) { SCROW nTop = 0; SCROW nBottom = 0; @@ -3488,8 +3488,8 @@ bool ScColumn::HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst) return true; } -SCsROW ScColumn::SearchStyle( - SCsROW nRow, const ScStyleSheet* pSearchStyle, bool bUp, bool bInSelection, +SCROW ScColumn::SearchStyle( + SCROW nRow, const ScStyleSheet* pSearchStyle, bool bUp, bool bInSelection, const ScMarkData& rMark) const { if (bInSelection) @@ -3507,7 +3507,7 @@ SCsROW ScColumn::SearchStyle( } bool ScColumn::SearchStyleRange( - SCsROW& rRow, SCsROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp, + SCROW& rRow, SCROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp, bool bInSelection, const ScMarkData& rMark) const { if (bInSelection) diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 5cd5bdbb6aa7..7d089f2a3d79 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -771,7 +771,7 @@ bool ScDocument::MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress ) sc::RefUpdateMoveTabContext aCxt( *this, nOldPos, nNewPos); - SCsTAB nDz = ((SCsTAB)nNewPos) - (SCsTAB)nOldPos; + SCTAB nDz = nNewPos - nOldPos; ScRange aSourceRange( 0,0,nOldPos, MAXCOL,MAXROW,nOldPos ); if (pRangeName) pRangeName->UpdateMoveTab(aCxt); diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index 49da87c08706..14dc9c1ab0fa 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -1295,7 +1295,7 @@ bool ScDocument::SearchAndReplace( nRow = rRow; if (rSearchItem.GetBackward()) { - for (nTab = rTab; ((SCsTAB)nTab >= 0) && !bFound; nTab--) + for (nTab = rTab; (nTab >= 0) && !bFound; nTab--) if (maTabs[nTab]) { if (rMark.GetTableSelect(nTab)) diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx index 3c72a050ab66..c15f9fc2de9b 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -479,7 +479,7 @@ void ScDocument::RestoreChartListener( const OUString& rName ) void ScDocument::UpdateChartRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) + SCCOL nDx, SCROW nDy, SCTAB nDz ) { if (!pDrawLayer) return; diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx index 282e1a53514f..1dc49fd5b2e7 100644 --- a/sc/source/core/data/documen7.cxx +++ b/sc/source/core/data/documen7.cxx @@ -614,7 +614,7 @@ void ScDocument::StartAllListeners() } void ScDocument::UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode, - const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz + const ScRange& rRange, SCCOL nDx, SCROW nDy, SCTAB nDz ) { bool bExpandRefsOld = IsExpandRefs(); diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 9ad00a487c7a..16e4909ab5ff 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -1081,7 +1081,7 @@ void ScDocument::DeleteAreaLinksOnTab( SCTAB nTab ) } void ScDocument::UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode, - const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) + const ScRange& rRange, SCCOL nDx, SCROW nDy, SCTAB nDz ) { sfx2::LinkManager* pMgr = GetDocLinkManager().getLinkManager(false); if (!pMgr) diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 79ee0a96fb63..9d68bb5a5564 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -1305,7 +1305,7 @@ bool ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab, // of the bottommost group. EndListeningIntersectedGroups(aEndListenCxt, aShiftedRange, &aGroupPos); - UpdateBroadcastAreas(URM_INSDEL, aShiftedRange, 0, static_cast<SCsROW>(nSize), 0); + UpdateBroadcastAreas(URM_INSDEL, aShiftedRange, 0, static_cast<SCROW>(nSize), 0); } while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark, static_cast<SCTAB>(maTabs.size()) ) ); @@ -1338,7 +1338,7 @@ bool ScDocument::InsertRow( SCCOL nStartCol, SCTAB nStartTab, if (maTabs[i] && (!pTabMark || pTabMark->GetTableSelect(i))) maTabs[i]->UpdateDrawRef( URM_INSDEL, nStartCol, nStartRow, nStartTab, nEndCol, MAXROW, nEndTab, - 0, static_cast<SCsROW>(nSize), 0 ); + 0, static_cast<SCROW>(nSize), 0 ); if ( pChangeTrack && pChangeTrack->IsInDeleteUndo() ) { // A new Listening is needed when references to deleted ranges are restored, @@ -1405,7 +1405,7 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab, ScAddress( nEndCol, nStartRow+nSize-1, nTabRangeEnd ) ) ); UpdateBroadcastAreas( URM_INSDEL, ScRange( ScAddress( nStartCol, nStartRow+nSize, nTabRangeStart ), - ScAddress( nEndCol, MAXROW, nTabRangeEnd )), 0, -(static_cast<SCsROW>(nSize)), 0 ); + ScAddress( nEndCol, MAXROW, nTabRangeEnd )), 0, -(static_cast<SCROW>(nSize)), 0 ); } else DelBroadcastAreasInRange( ScRange( @@ -1524,7 +1524,7 @@ bool ScDocument::InsertCol( SCROW nStartRow, SCTAB nStartTab, { UpdateBroadcastAreas( URM_INSDEL, ScRange( ScAddress( nStartCol, nStartRow, nTabRangeStart ), - ScAddress( MAXCOL, nEndRow, nTabRangeEnd )), static_cast<SCsCOL>(nSize), 0, 0 ); + ScAddress( MAXCOL, nEndRow, nTabRangeEnd )), static_cast<SCCOL>(nSize), 0, 0 ); } while ( lcl_GetNextTabRange( nTabRangeStart, nTabRangeEnd, pTabMark, static_cast<SCTAB>(maTabs.size()) ) ); @@ -1605,7 +1605,7 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA ScAddress( sal::static_int_cast<SCCOL>(nStartCol+nSize-1), nEndRow, nTabRangeEnd ) ) ); UpdateBroadcastAreas( URM_INSDEL, ScRange( ScAddress( sal::static_int_cast<SCCOL>(nStartCol+nSize), nStartRow, nTabRangeStart ), - ScAddress( MAXCOL, nEndRow, nTabRangeEnd )), -static_cast<SCsCOL>(nSize), 0, 0 ); + ScAddress( MAXCOL, nEndRow, nTabRangeEnd )), -static_cast<SCCOL>(nSize), 0, 0 ); } else DelBroadcastAreasInRange( ScRange( @@ -2571,7 +2571,7 @@ bool ScDocument::InitColumnBlockPosition( sc::ColumnBlockPosition& rBlockPos, SC void ScDocument::CopyBlockFromClip( sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - const ScMarkData& rMark, SCsCOL nDx, SCsROW nDy ) + const ScMarkData& rMark, SCCOL nDx, SCROW nDy ) { TableContainer& rClipTabs = rCxt.getClipDoc()->maTabs; SCTAB nTabEnd = rCxt.getTabEnd(); @@ -2617,7 +2617,7 @@ void ScDocument::CopyBlockFromClip( if (maTabs[i] && rMark.GetTableSelect(i) ) { while (!rClipTabs[nClipTab]) nClipTab = (nClipTab+1) % (static_cast<SCTAB>(rClipTabs.size())); - SCsTAB nDz = ((SCsTAB)i) - nClipTab; + SCTAB nDz = i - nClipTab; // ranges of consecutive selected tables (in clipboard and dest. doc) // must be handled in one UpdateReference call @@ -2673,7 +2673,7 @@ void ScDocument::CopyBlockFromClip( void ScDocument::CopyNonFilteredFromClip( sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - const ScMarkData& rMark, SCsCOL nDx, SCROW & rClipStartRow ) + const ScMarkData& rMark, SCCOL nDx, SCROW & rClipStartRow ) { // call CopyBlockFromClip for ranges of consecutive non-filtered rows // nCol1/nRow1 etc. is in target doc @@ -2707,7 +2707,7 @@ void ScDocument::CopyNonFilteredFromClip( if (nFollow > nRow2 - nDestRow) nFollow = nRow2 - nDestRow; - SCsROW nNewDy = ((SCsROW)nDestRow) - nSourceRow; + SCROW nNewDy = nDestRow - nSourceRow; CopyBlockFromClip( rCxt, nCol1, nDestRow, nCol2, nDestRow + nFollow, rMark, nDx, nNewDy); @@ -2886,8 +2886,8 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar do { nClipStartRow = nSaveClipStartRow; - SCsCOL nDx = ((SCsCOL)nC1) - nClipStartCol; - SCsROW nDy = ((SCsROW)nR1) - nClipStartRow; + SCCOL nDx = nC1 - nClipStartCol; + SCROW nDy = nR1 - nClipStartRow; if ( bIncludeFiltered ) { CopyBlockFromClip( @@ -3010,8 +3010,8 @@ void ScDocument::CopyMultiRangeFromClip( ScRange* p = rClipParam.maRanges[i]; SCROW nRowCount = p->aEnd.Row() - p->aStart.Row() + 1; - SCsCOL nDx = static_cast<SCsCOL>(nCol1 - p->aStart.Col()); - SCsROW nDy = static_cast<SCsROW>(nRow1 - p->aStart.Row()); + SCCOL nDx = static_cast<SCCOL>(nCol1 - p->aStart.Col()); + SCROW nDy = static_cast<SCROW>(nRow1 - p->aStart.Row()); SCCOL nCol2 = nCol1 + p->aEnd.Col() - p->aStart.Col(); SCROW nEndRow = nRow1 + nRowCount - 1; @@ -5970,7 +5970,7 @@ void ScDocument::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirect maTabs[nTab]->FindAreaPos( rCol, rRow, eDirection ); } -void ScDocument::GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY, +void ScDocument::GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCCOL nMovX, SCROW nMovY, bool bMarked, bool bUnprotected, const ScMarkData& rMark ) const { OSL_ENSURE( !nMovX || !nMovY, "GetNextPos: only X or Y" ); diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index b6e62a8c04d4..28779f3238a3 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -1060,7 +1060,7 @@ bool ScDPObject::GetMembers( sal_Int32 nDim, sal_Int32 nHier, vector<ScDPLabelDa } void ScDPObject::UpdateReference( UpdateRefMode eUpdateRefMode, - const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) + const ScRange& rRange, SCCOL nDx, SCROW nDy, SCTAB nDz ) { // Output area @@ -1102,8 +1102,8 @@ void ScDPObject::UpdateReference( UpdateRefMode eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 ); if ( eRes != UR_NOTHING ) { - SCsCOL nDiffX = nCol1 - pSheetDesc->GetSourceRange().aStart.Col(); - SCsROW nDiffY = nRow1 - pSheetDesc->GetSourceRange().aStart.Row(); + SCCOL nDiffX = nCol1 - pSheetDesc->GetSourceRange().aStart.Col(); + SCROW nDiffY = nRow1 - pSheetDesc->GetSourceRange().aStart.Row(); ScQueryParam aParam = pSheetDesc->GetQueryParam(); aParam.nCol1 = sal::static_int_cast<SCCOL>( aParam.nCol1 + nDiffX ); @@ -2146,10 +2146,10 @@ namespace { class FindByColumn : public std::unary_function<ScPivotField, bool> { - SCsCOL mnCol; + SCCOL mnCol; PivotFunc mnMask; public: - FindByColumn(SCsCOL nCol, PivotFunc nMask) : mnCol(nCol), mnMask(nMask) {} + FindByColumn(SCCOL nCol, PivotFunc nMask) : mnCol(nCol), mnMask(nMask) {} bool operator() (const ScPivotField& r) const { return r.nCol == mnCol && r.nFuncMask == mnMask; @@ -2231,11 +2231,11 @@ void lcl_FillOldFields( ScPivotFieldVector& rFields, { // this dimension is cloned. - SCsCOL nCompCol; // ID of the original dimension. + SCCOL nCompCol; // ID of the original dimension. if ( bDataLayout ) nCompCol = PIVOT_DATA_FIELD; else - nCompCol = static_cast<SCsCOL>(nDupSource); //TODO: seek source column from name + nCompCol = static_cast<SCCOL>(nDupSource); //TODO: seek source column from name ScPivotFieldVector::iterator it = std::find_if(aFields.begin(), aFields.end(), FindByColumn(nCompCol, nMask)); if (it != aFields.end()) @@ -3039,7 +3039,7 @@ size_t ScDPCollection::SheetCaches::size() const } void ScDPCollection::SheetCaches::updateReference( - UpdateRefMode eMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz) + UpdateRefMode eMode, const ScRange& r, SCCOL nDx, SCROW nDy, SCTAB nDz) { if (maRanges.empty()) // No caches. @@ -3627,7 +3627,7 @@ void ScDPCollection::DeleteOnTab( SCTAB nTab ) } void ScDPCollection::UpdateReference( UpdateRefMode eUpdateRefMode, - const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) + const ScRange& r, SCCOL nDx, SCROW nDy, SCTAB nDz ) { TablesType::iterator itr = maTables.begin(), itrEnd = maTables.end(); for (; itr != itrEnd; ++itr) diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 47d397c0d2b0..97604b507141 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -519,7 +519,7 @@ inline bool IsInBlock( const ScAddress& rPos, SCCOL nCol1,SCROW nRow1, SCCOL nCo } void ScDrawLayer::MoveCells( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2, - SCsCOL nDx,SCsROW nDy, bool bUpdateNoteCaptionPos ) + SCCOL nDx,SCROW nDy, bool bUpdateNoteCaptionPos ) { SdrPage* pPage = GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page not found"); @@ -1138,7 +1138,7 @@ SdrUndoGroup* ScDrawLayer::GetCalcUndo() } void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCROW nRow2, - SCsCOL nDx,SCsROW nDy, bool bInsDel, bool bUpdateNoteCaptionPos ) + SCCOL nDx,SCROW nDy, bool bInsDel, bool bUpdateNoteCaptionPos ) { OSL_ENSURE( pDoc, "ScDrawLayer::MoveArea without document" ); if ( !pDoc ) @@ -1156,11 +1156,11 @@ void ScDrawLayer::MoveArea( SCTAB nTab, SCCOL nCol1,SCROW nRow1, SCCOL nCol2,SCR Point aMove; if (nDx > 0) - for (SCsCOL s=0; s<nDx; s++) - aMove.X() += pDoc->GetColWidth(s+(SCsCOL)nCol1,nTab); + for (SCCOL s=0; s<nDx; s++) + aMove.X() += pDoc->GetColWidth(s+nCol1,nTab); else - for (SCsCOL s=-1; s>=nDx; s--) - aMove.X() -= pDoc->GetColWidth(s+(SCsCOL)nCol1,nTab); + for (SCCOL s=-1; s>=nDx; s--) + aMove.X() -= pDoc->GetColWidth(s+nCol1,nTab); if (nDy > 0) aMove.Y() += pDoc->GetRowHeight( nRow1, nRow1+nDy-1, nTab); else @@ -1442,9 +1442,9 @@ static bool lcl_MoveRanges( ::std::vector< ScRangeList >& rRangesVector, const S ScRange* pRange = rRanges[ i ]; if ( rSourceRange.In( *pRange ) ) { - SCsCOL nDiffX = rDestPos.Col() - (SCsCOL)rSourceRange.aStart.Col(); - SCsROW nDiffY = rDestPos.Row() - (SCsROW)rSourceRange.aStart.Row(); - SCsTAB nDiffZ = rDestPos.Tab() - (SCsTAB)rSourceRange.aStart.Tab(); + SCCOL nDiffX = rDestPos.Col() - rSourceRange.aStart.Col(); + SCROW nDiffY = rDestPos.Row() - rSourceRange.aStart.Row(); + SCTAB nDiffZ = rDestPos.Tab() - rSourceRange.aStart.Tab(); if (!pRange->Move( nDiffX, nDiffY, nDiffZ, aErrorRange)) { assert(!"can't move range"); diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index ad9e56b36113..e8c83e5d280d 100644 --- a/sc/source/core/data/fillinfo.cxx +++ b/sc/source/core/data/fillinfo.cxx @@ -48,10 +48,10 @@ // Similar as in output.cxx -static void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY, +static void lcl_GetMergeRange( SCCOL nX, SCROW nY, SCSIZE nArrY, ScDocument* pDoc, RowInfo* pRowInfo, SCCOL nX1, SCROW nY1, SCCOL /* nX2 */, SCROW /* nY2 */, SCTAB nTab, - SCsCOL& rStartX, SCsROW& rStartY, SCsCOL& rEndX, SCsROW& rEndY ) + SCCOL& rStartX, SCROW& rStartY, SCCOL& rEndX, SCROW& rEndY ) { CellInfo* pInfo = &pRowInfo[nArrY].pCellInfo[nX+1]; @@ -65,7 +65,7 @@ static void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY, while (bHOver) // nY constant { --rStartX; - if (rStartX >= (SCsCOL) nX1 && !pDoc->ColHidden(rStartX, nTab, nullptr, &nLastCol)) + if (rStartX >= nX1 && !pDoc->ColHidden(rStartX, nTab, nullptr, &nLastCol)) { bHOver = pRowInfo[nArrY].pCellInfo[rStartX+1].bHOverlapped; bVOver = pRowInfo[nArrY].pCellInfo[rStartX+1].bVOverlapped; @@ -86,10 +86,10 @@ static void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY, if (nArrY>0) --nArrY; // local copy ! - if (rStartX >= (SCsCOL) nX1 && rStartY >= (SCsROW) nY1 && + if (rStartX >= nX1 && rStartY >= nY1 && !pDoc->ColHidden(rStartX, nTab, nullptr, &nLastCol) && !pDoc->RowHidden(rStartY, nTab, nullptr, &nLastRow) && - (SCsROW) pRowInfo[nArrY].nRowNo == rStartY) + pRowInfo[nArrY].nRowNo == rStartY) { bVOver = pRowInfo[nArrY].pCellInfo[rStartX+1].bVOverlapped; } @@ -102,10 +102,10 @@ static void lcl_GetMergeRange( SCsCOL nX, SCsROW nY, SCSIZE nArrY, } const ScMergeAttr* pMerge; - if (rStartX >= (SCsCOL) nX1 && rStartY >= (SCsROW) nY1 && + if (rStartX >= nX1 && rStartY >= nY1 && !pDoc->ColHidden(rStartX, nTab, nullptr, &nLastCol) && !pDoc->RowHidden(rStartY, nTab, nullptr, &nLastRow) && - (SCsROW) pRowInfo[nArrY].nRowNo == rStartY) + pRowInfo[nArrY].nRowNo == rStartY) { pMerge = static_cast<const ScMergeAttr*>( &pRowInfo[nArrY].pCellInfo[rStartX+1].pPatternAttr-> GetItem(ATTR_MERGE)); @@ -204,11 +204,11 @@ void initRowInfo(ScDocument* pDoc, RowInfo* pRowInfo, const SCSIZE nMaxRow, { sal_uInt16 nDocHeight = ScGlobal::nStdRowHeight; SCROW nDocHeightEndRow = -1; - for (SCsROW nSignedY=((SCsROW)nRow1)-1; nSignedY<=(SCsROW)rYExtra; nSignedY++) + for (SCROW nSignedY=nRow1-1; nSignedY<=rYExtra; nSignedY++) { SCROW nY; if (nSignedY >= 0) - nY = (SCROW) nSignedY; + nY = nSignedY; else nY = MAXROW+1; // invalid @@ -247,7 +247,7 @@ void initRowInfo(ScDocument* pDoc, RowInfo* pRowInfo, const SCSIZE nMaxRow, } } else - if (nSignedY==(SCsROW) rYExtra) // hidden additional line? + if (nSignedY == rYExtra) // hidden additional line? ++rYExtra; } } @@ -759,19 +759,19 @@ void ScDocument::FillInfo( for (nArrRow=0; nArrRow<nArrCount; nArrRow++) { RowInfo* pThisRowInfo = &pRowInfo[nArrRow]; - SCsROW nSignedY = nArrRow ? pThisRowInfo->nRowNo : ((SCsROW)nRow1)-1; + SCROW nSignedY = nArrRow ? pThisRowInfo->nRowNo : nRow1-1; for (SCCOL nArrCol=nCol1; nArrCol<=nCol2+2; nArrCol++) // 1 more left and right { - SCsCOL nSignedX = ((SCsCOL) nArrCol) - 1; + SCCOL nSignedX = nArrCol - 1; CellInfo* pInfo = &pThisRowInfo->pCellInfo[nArrCol]; if (pInfo->bMerged || pInfo->bHOverlapped || pInfo->bVOverlapped) { - SCsCOL nStartX; - SCsROW nStartY; - SCsCOL nEndX; - SCsROW nEndY; + SCCOL nStartX; + SCROW nStartY; + SCCOL nEndX; + SCROW nEndY; lcl_GetMergeRange( nSignedX,nSignedY, nArrRow, this,pRowInfo, nCol1,nRow1,nCol2,nRow2,nTab, nStartX,nStartY, nEndX,nEndY ); const ScPatternAttr* pStartPattern = GetPattern( nStartX,nStartY,nTab ); @@ -799,10 +799,10 @@ void ScDocument::FillInfo( bool bCellMarked = false; if (bPaintMarks) - bCellMarked = ( nStartX >= (SCsCOL) nBlockStartX - && nStartX <= (SCsCOL) nBlockEndX - && nStartY >= (SCsROW) nBlockStartY - && nStartY <= (SCsROW) nBlockEndY ); + bCellMarked = ( nStartX >= nBlockStartX + && nStartX <= nBlockEndX + && nStartY >= nBlockStartY + && nStartY <= nBlockEndY ); if (pMarkData && pMarkData->IsMultiMarked() && !bCellMarked) { ScMarkArray aThisMarkArr(pMarkData->GetMarkArray( nStartX )); @@ -836,8 +836,8 @@ void ScDocument::FillInfo( { // or test on != eLoc - SCsCOL nDxPos = 1; - SCsCOL nDxNeg = -1; + SCCOL nDxPos = 1; + SCCOL nDxNeg = -1; while ( nArrCol+nDxPos < nCol2+2 && pRowInfo[0].pCellInfo[nArrCol+nDxPos].nWidth == 0 ) ++nDxPos; @@ -1009,17 +1009,17 @@ void ScDocument::FillInfo( SCROW nCurrDocRow = static_cast< SCROW >( (nCellInfoY > 0) ? rThisRowInfo.nRowNo : (nRow1 - 1) ); // find entire merged range in document, returns signed document coordinates - SCsCOL nFirstRealDocColS, nLastRealDocColS; - SCsROW nFirstRealDocRowS, nLastRealDocRowS; - lcl_GetMergeRange( static_cast< SCsCOL >( nCurrDocCol ), static_cast< SCsROW >( nCurrDocRow ), + SCCOL nFirstRealDocColS, nLastRealDocColS; + SCROW nFirstRealDocRowS, nLastRealDocRowS; + lcl_GetMergeRange( nCurrDocCol, nCurrDocRow, nCellInfoY, this, pRowInfo, nCol1,nRow1,nCol2,nRow2,nTab, nFirstRealDocColS, nFirstRealDocRowS, nLastRealDocColS, nLastRealDocRowS ); // *complete* merged range in document coordinates - SCCOL nFirstRealDocCol = static_cast< SCCOL >( nFirstRealDocColS ); - SCROW nFirstRealDocRow = static_cast< SCROW >( nFirstRealDocRowS ); - SCCOL nLastRealDocCol = static_cast< SCCOL >( nLastRealDocColS ); - SCROW nLastRealDocRow = static_cast< SCROW >( nLastRealDocRowS ); + SCCOL nFirstRealDocCol = nFirstRealDocColS; + SCROW nFirstRealDocRow = nFirstRealDocRowS; + SCCOL nLastRealDocCol = nLastRealDocColS; + SCROW nLastRealDocRow = nLastRealDocRowS; // first visible column (nX1-1 is first processed document column) SCCOL nFirstDocCol = (nCol1 > 0) ? ::std::max< SCCOL >( nFirstRealDocCol, nCol1 - 1 ) : nFirstRealDocCol; diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 89b8d4618f35..b23814f77047 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -2733,8 +2733,8 @@ sc::MatrixEdge ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos ) const } } // here we are, healthy and clean, somewhere in between - SCsCOL dC = aPos.Col() - aOrg.Col(); - SCsROW dR = aPos.Row() - aOrg.Row(); + SCCOL dC = aPos.Col() - aOrg.Col(); + SCROW dR = aPos.Row() - aOrg.Row(); sc::MatrixEdge nEdges = sc::MatrixEdge::Nothing; if ( dC >= 0 && dR >= 0 && dC < nC && dR < nR ) { @@ -3615,9 +3615,9 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD if ( aDestRange.In( aOldPos ) ) { // Count back Positions - SCsCOL nRelPosX = aOldPos.Col(); - SCsROW nRelPosY = aOldPos.Row(); - SCsTAB nRelPosZ = aOldPos.Tab(); + SCCOL nRelPosX = aOldPos.Col(); + SCROW nRelPosY = aOldPos.Row(); + SCTAB nRelPosZ = aOldPos.Tab(); ScRefUpdate::DoTranspose( nRelPosX, nRelPosY, nRelPosZ, pDocument, aDestRange, rSource.aStart ); aOldPos.Set( nRelPosX, nRelPosY, nRelPosZ ); bPosChanged = true; diff --git a/sc/source/core/data/markarr.cxx b/sc/source/core/data/markarr.cxx index fb4cef0e9b7e..b95cf07c9e6d 100644 --- a/sc/source/core/data/markarr.cxx +++ b/sc/source/core/data/markarr.cxx @@ -312,12 +312,12 @@ void ScMarkArray::CopyMarksTo( ScMarkArray& rDestMarkArray ) const rDestMarkArray.nCount = rDestMarkArray.nLimit = nCount; } -SCsROW ScMarkArray::GetNextMarked( SCsROW nRow, bool bUp ) const +SCROW ScMarkArray::GetNextMarked( SCROW nRow, bool bUp ) const { if (!pData) const_cast<ScMarkArray*>(this)->Reset(); // create pData for further processing - SCsROW nRet = nRow; + SCROW nRet = nRow; if (ValidRow(nRow)) { SCSIZE nIndex; diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx index a4db65159016..e2e89e829d09 100644 --- a/sc/source/core/data/markdata.cxx +++ b/sc/source/core/data/markdata.cxx @@ -504,7 +504,7 @@ bool ScMarkData::IsAllMarked( const ScRange& rRange ) const return bOk; } -SCsROW ScMarkData::GetNextMarked( SCCOL nCol, SCsROW nRow, bool bUp ) const +SCROW ScMarkData::GetNextMarked( SCCOL nCol, SCROW nRow, bool bUp ) const { if ( !bMultiMarked ) return nRow; diff --git a/sc/source/core/data/markmulti.cxx b/sc/source/core/data/markmulti.cxx index 04619862b689..217753b1d5b6 100644 --- a/sc/source/core/data/markmulti.cxx +++ b/sc/source/core/data/markmulti.cxx @@ -173,13 +173,13 @@ bool ScMultiSel::HasEqualRowsMarked( SCCOL nCol1, SCCOL nCol2 ) const return true; } -SCsROW ScMultiSel::GetNextMarked( SCCOL nCol, SCsROW nRow, bool bUp ) const +SCROW ScMultiSel::GetNextMarked( SCCOL nCol, SCROW nRow, bool bUp ) const { MapType::const_iterator aIter = aMultiSelContainer.find( nCol ); if ( aIter == aMultiSelContainer.end() ) return aRowSel.GetNextMarked( nRow, bUp ); - SCsROW nRow1, nRow2; + SCROW nRow1, nRow2; nRow1 = aRowSel.GetNextMarked( nRow, bUp ); nRow2 = aIter->second.GetNextMarked( nRow, bUp ); if ( nRow1 == nRow2 ) diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx index 3a4cdc852a67..d7be0d322640 100644 --- a/sc/source/core/data/olinetab.cxx +++ b/sc/source/core/data/olinetab.cxx @@ -50,7 +50,7 @@ SCCOLROW ScOutlineEntry::GetEnd() const return nStart+nSize-1; } -void ScOutlineEntry::Move( SCsCOLROW nDelta ) +void ScOutlineEntry::Move( SCCOLROW nDelta ) { SCCOLROW nNewPos = nStart + nDelta; if (nNewPos<0) @@ -669,7 +669,7 @@ void ScOutlineArray::InsertSpace(SCCOLROW nStartPos, SCSIZE nSize) while ((pEntry = aIter.GetNext()) != nullptr) { if ( pEntry->GetStart() >= nStartPos ) - pEntry->Move(static_cast<SCsCOLROW>(nSize)); + pEntry->Move(static_cast<SCCOLROW>(nSize)); else { SCCOLROW nEnd = pEntry->GetEnd(); @@ -702,7 +702,7 @@ bool ScOutlineArray::DeleteSpace(SCCOLROW nStartPos, SCSIZE nSize) if ( nEntryEnd >= nStartPos ) { if ( nEntryStart > nEndPos ) // Right - pEntry->Move(-(static_cast<SCsCOLROW>(nSize))); + pEntry->Move(-(static_cast<SCCOLROW>(nSize))); else if ( nEntryStart < nStartPos && nEntryEnd >= nEndPos ) // Outside pEntry->SetSize( nEntrySize-nSize ); else diff --git a/sc/source/core/data/sortparam.cxx b/sc/source/core/data/sortparam.cxx index 38439e5ef062..3eb29a305641 100644 --- a/sc/source/core/data/sortparam.cxx +++ b/sc/source/core/data/sortparam.cxx @@ -221,8 +221,8 @@ void ScSortParam::MoveToDest() { if (!bInplace) { - SCsCOL nDifX = ((SCsCOL) nDestCol) - ((SCsCOL) nCol1); - SCsROW nDifY = ((SCsROW) nDestRow) - ((SCsROW) nRow1); + SCCOL nDifX = nDestCol - nCol1; + SCROW nDifY = nDestRow - nRow1; nCol1 = sal::static_int_cast<SCCOL>( nCol1 + nDifX ); nRow1 = sal::static_int_cast<SCROW>( nRow1 + nDifY ); diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 96737e18a512..e527bb82ec5e 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -1079,7 +1079,7 @@ SCSIZE ScTable::GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, else if (eDir == DIR_RIGHT) { nCol = nEndCol; - while (((SCsCOL)nCol >= (SCsCOL)nStartCol) && + while ((nCol >= nStartCol) && aCol[nCol].IsEmptyBlock(nStartRow, nEndRow)) { nCount++; @@ -1298,18 +1298,18 @@ bool ScTable::ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark, return true; } -void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, +void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCCOL nMovX, SCROW nMovY, bool bMarked, bool bUnprotected, const ScMarkData& rMark ) const { if (bUnprotected && !IsProtected()) // Is sheet really protected? bUnprotected = false; sal_uInt16 nWrap = 0; - SCsCOL nCol = rCol; - SCsROW nRow = rRow; + SCCOL nCol = rCol; + SCROW nRow = rRow; - nCol = sal::static_int_cast<SCsCOL>( nCol + nMovX ); - nRow = sal::static_int_cast<SCsROW>( nRow + nMovY ); + nCol = sal::static_int_cast<SCCOL>( nCol + nMovX ); + nRow = sal::static_int_cast<SCROW>( nRow + nMovY ); OSL_ENSURE( !nMovY || !bUnprotected, "GetNextPos with bUnprotected horizontal not implemented" ); @@ -1328,9 +1328,9 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, while ( nRow < 0 || nRow > MAXROW ) { - nCol = sal::static_int_cast<SCsCOL>( nCol + static_cast<SCsCOL>(nMovY) ); + nCol = sal::static_int_cast<SCCOL>( nCol + static_cast<SCCOL>(nMovY) ); while ( ValidCol(nCol) && ColHidden(nCol) ) - nCol = sal::static_int_cast<SCsCOL>( nCol + static_cast<SCsCOL>(nMovY) ); // skip hidden rows (see above) + nCol = sal::static_int_cast<SCCOL>( nCol + static_cast<SCCOL>(nMovY) ); // skip hidden rows (see above) if (nCol < 0) { nCol = MAXCOL; @@ -1378,7 +1378,7 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, if ( !ValidNextPos(nCol, nRow, rMark, bMarked, bUnprotected) ) { - std::unique_ptr<SCsROW[]> pNextRows(new SCsROW[MAXCOL+1]); + std::unique_ptr<SCROW[]> pNextRows(new SCROW[MAXCOL+1]); SCCOL i; if ( nMovX > 0 ) // forward @@ -1387,14 +1387,14 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, pNextRows[i] = (i<nCol) ? (nRow+1) : nRow; do { - SCsROW nNextRow = pNextRows[nCol] + 1; + SCROW nNextRow = pNextRows[nCol] + 1; if ( bMarked ) nNextRow = rMark.GetNextMarked( nCol, nNextRow, false ); if ( bUnprotected ) nNextRow = aCol[nCol].GetNextUnprotected( nNextRow, false ); pNextRows[nCol] = nNextRow; - SCsROW nMinRow = MAXROW+1; + SCROW nMinRow = MAXROW+1; for (i=0; i<=MAXCOL; i++) if (pNextRows[i] < nMinRow) // when two equal on the left { @@ -1420,14 +1420,14 @@ void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY, pNextRows[i] = (i>nCol) ? (nRow-1) : nRow; do { - SCsROW nNextRow = pNextRows[nCol] - 1; + SCROW nNextRow = pNextRows[nCol] - 1; if ( bMarked ) nNextRow = rMark.GetNextMarked( nCol, nNextRow, true ); if ( bUnprotected ) nNextRow = aCol[nCol].GetNextUnprotected( nNextRow, true ); pNextRows[nCol] = nNextRow; - SCsROW nMaxRow = -1; + SCROW nMaxRow = -1; for (i=0; i<=MAXCOL; i++) if (pNextRows[i] >= nMaxRow) // when two equal on the right { @@ -1469,7 +1469,7 @@ bool ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMa ScMarkArray aArray( rMark.GetMarkArray( rCol ) ); while ( rRow <= MAXROW ) { - SCROW nStart = (SCROW) aArray.GetNextMarked( (SCsROW) rRow, false ); + SCROW nStart = aArray.GetNextMarked( rRow, false ); if ( nStart <= MAXROW ) { SCROW nEnd = aArray.GetMarkEnd( nStart, false ); @@ -1512,7 +1512,7 @@ bool ScTable::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMa void ScTable::UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz, bool bUpdateNoteCaptionPos ) + SCCOL nDx, SCROW nDy, SCTAB nDz, bool bUpdateNoteCaptionPos ) { if ( nTab >= nTab1 && nTab <= nTab2 && nDz == 0 ) // only within the table { diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 6c770797f44c..963e150ade9a 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -575,7 +575,7 @@ void ScTable::CopyCellToDocument(SCCOL nSrcCol, SCROW nSrcRow, SCCOL nDestCol, S } void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - SCsCOL nDx, SCsROW nDy, ScTable* pTable) + SCCOL nDx, SCROW nDy, ScTable* pTable) { ScRange aOldRange( nCol1 - nDx, nRow1 - nDy, pTable->nTab, nCol2 - nDx, nRow2 - nDy, pTable->nTab); ScRange aNewRange( nCol1, nRow1, nTab, nCol2, nRow2, nTab ); @@ -647,7 +647,7 @@ bool ScTable::InitColumnBlockPosition( sc::ColumnBlockPosition& rBlockPos, SCCOL void ScTable::CopyFromClip( sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - SCsCOL nDx, SCsROW nDy, ScTable* pTable ) + SCCOL nDx, SCROW nDy, ScTable* pTable ) { if (nCol2 > aCol.size() - 1) nCol2 = aCol.size() - 1; @@ -901,11 +901,11 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMergeAttr& rOldMerge = static_cast<const ScMergeAttr&>(rSet.Get(ATTR_MERGE)); if (rOldMerge.IsMerged()) rNewSet.Put( ScMergeAttr( std::min( - static_cast<SCsCOL>(rOldMerge.GetRowMerge()), - static_cast<SCsCOL>(MAXCOL+1 - (nAttrRow2-nRow1))), + static_cast<SCCOL>(rOldMerge.GetRowMerge()), + static_cast<SCCOL>(MAXCOL+1 - (nAttrRow2-nRow1))), std::min( - static_cast<SCsROW>(rOldMerge.GetColMerge()), - static_cast<SCsROW>(MAXROW+1 - (nCol-nCol1))))); + static_cast<SCROW>(rOldMerge.GetColMerge()), + static_cast<SCROW>(MAXROW+1 - (nCol-nCol1))))); const ScMergeFlagAttr& rOldFlag = static_cast<const ScMergeFlagAttr&>(rSet.Get(ATTR_MERGE_FLAG)); if (rOldFlag.IsOverlapped()) { diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 2044a33b7708..9f63f8f2ff10 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -1637,7 +1637,7 @@ short ScTable::Compare( ScSortInfoArray* pArray, SCCOLROW nIndex1, SCCOLROW nInd return nRes; } -void ScTable::QuickSort( ScSortInfoArray* pArray, SCsCOLROW nLo, SCsCOLROW nHi ) +void ScTable::QuickSort( ScSortInfoArray* pArray, SCCOLROW nLo, SCCOLROW nHi ) { if ((nHi - nLo) == 1) { @@ -1646,8 +1646,8 @@ void ScTable::QuickSort( ScSortInfoArray* pArray, SCsCOLROW nLo, SCsCOLROW nHi ) } else { - SCsCOLROW ni = nLo; - SCsCOLROW nj = nHi; + SCCOLROW ni = nLo; + SCCOLROW nj = nHi; do { while ((ni <= nHi) && (Compare(pArray, ni, nLo)) < 0) diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx index b442d5025b43..da5ba5f8e4e2 100644 --- a/sc/source/core/data/table6.cxx +++ b/sc/source/core/data/table6.cxx @@ -334,12 +334,12 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, if (rSearchItem.GetRowDirection()) { nCol--; - while (!bFound && ((SCsROW)nRow >= 0)) + while (!bFound && (nRow >= 0)) { if (bSkipFiltered) SkipFilteredRows(nRow, nLastNonFilteredRow, false); - while (!bFound && ((SCsCOL)nCol >= 0)) + while (!bFound && (nCol >= 0)) { bFound = SearchCell(rSearchItem, nCol, nRow, rMark, rUndoStr, pUndoDoc); if (!bFound) @@ -348,7 +348,7 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, do { nCol--; - if ((SCsCOL)nCol >= 0) + if (nCol >= 0) { if (bSearchNotes) bIsEmpty = !aCol[nCol].HasCellNotes(); @@ -358,7 +358,7 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, else bIsEmpty = true; } - while (((SCsCOL)nCol >= 0) && bIsEmpty); + while ((nCol >= 0) && bIsEmpty); } } if (!bFound) @@ -371,9 +371,9 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, else { nRow--; - while (!bFound && ((SCsCOL)nCol >= 0)) + while (!bFound && (nCol >= 0)) { - while (!bFound && ((SCsROW)nRow >= 0)) + while (!bFound && (nRow >= 0)) { if (bSkipFiltered) SkipFilteredRows(nRow, nLastNonFilteredRow, false); @@ -402,7 +402,7 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, do { nCol--; - if ((SCsCOL)nCol >= 0) + if (nCol >= 0) { if (bSearchNotes) bIsEmpty = !aCol[nCol].HasCellNotes(); @@ -412,7 +412,7 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, else bIsEmpty = true; } - while (((SCsCOL)nCol >= 0) && bIsEmpty); + while ((nCol >= 0) && bIsEmpty); } } } @@ -596,8 +596,8 @@ bool ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& pDocument->GetStyleSheetPool()->Find( rSearchItem.GetSearchString(), SfxStyleFamily::Para )); - SCsCOL nCol = rCol; - SCsROW nRow = rRow; + SCCOL nCol = rCol; + SCROW nRow = rRow; bool bFound = false; bool bSelect = rSearchItem.GetSelection(); @@ -615,11 +615,11 @@ bool ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& nRow += nAdd; do { - SCsROW nNextRow = aCol[nCol].SearchStyle( nRow, pSearchStyle, bBack, bSelect, rMark ); + SCROW nNextRow = aCol[nCol].SearchStyle( nRow, pSearchStyle, bBack, bSelect, rMark ); if (!ValidRow(nNextRow)) { nRow = bBack ? MAXROW : 0; - nCol = sal::static_int_cast<SCsCOL>( nCol + nAdd ); + nCol = sal::static_int_cast<SCCOL>( nCol + nAdd ); } else { @@ -631,12 +631,12 @@ bool ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& } else // by column { - SCsCOL aColSize = aCol.size(); - std::vector< SCsROW > nNextRows ( aColSize ); - SCsCOL i; + SCCOL aColSize = aCol.size(); + std::vector< SCROW > nNextRows ( aColSize ); + SCCOL i; for (i=0; i < aColSize; ++i) { - SCsROW nSRow = nRow; + SCROW nSRow = nRow; if (bBack) { if (i>=nCol) --nSRow; @@ -673,8 +673,8 @@ bool ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& if (bFound) { - rCol = (SCCOL) nCol; - rRow = (SCROW) nRow; + rCol = nCol; + rRow = nRow; } return bFound; } @@ -719,8 +719,8 @@ bool ScTable::SearchAllStyle( for (SCCOL i=0; i < aCol.size(); ++i) { bool bFound = true; - SCsROW nRow = 0; - SCsROW nEndRow; + SCROW nRow = 0; + SCROW nEndRow; while (bFound && nRow <= MAXROW) { bFound = aCol[i].SearchStyleRange( nRow, nEndRow, pSearchStyle, bBack, bSelect, rMark ); @@ -728,7 +728,7 @@ bool ScTable::SearchAllStyle( { if (nEndRow<nRow) { - SCsROW nTemp = nRow; + SCROW nTemp = nRow; nRow = nEndRow; nEndRow = nTemp; } diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx index c55024be774a..a6f100b4421b 100644 --- a/sc/source/core/data/tabprotection.cxx +++ b/sc/source/core/data/tabprotection.cxx @@ -114,7 +114,7 @@ public: void setEnhancedProtection( const ::std::vector< ScEnhancedProtection > & rProt ); const ::std::vector< ScEnhancedProtection > & getEnhancedProtection() const { return maEnhancedProtection;} - bool updateReference( UpdateRefMode, ScDocument*, const ScRange& rWhere, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); + bool updateReference( UpdateRefMode, ScDocument*, const ScRange& rWhere, SCCOL nDx, SCROW nDy, SCTAB nDz ); bool isBlockEditable( const ScRange& rRange ) const; bool isSelectionEditable( const ScRangeList& rRangeList ) const; @@ -351,7 +351,7 @@ void ScTableProtectionImpl::setEnhancedProtection( const ::std::vector< ScEnhanc } bool ScTableProtectionImpl::updateReference( UpdateRefMode eMode, ScDocument* pDoc, - const ScRange& rWhere, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) + const ScRange& rWhere, SCCOL nDx, SCROW nDy, SCTAB nDz ) { bool bChanged = false; for (::std::vector<ScEnhancedProtection>::iterator it(maEnhancedProtection.begin()); @@ -615,7 +615,7 @@ const ::std::vector< ScEnhancedProtection > & ScTableProtection::getEnhancedProt } bool ScTableProtection::updateReference( UpdateRefMode eMode, ScDocument* pDoc, const ScRange& rWhere, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) + SCCOL nDx, SCROW nDy, SCTAB nDz ) { return mpImpl->updateReference( eMode, pDoc, rWhere, nDx, nDy, nDz); } diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx index b55c478656e7..abffcb51a042 100644 --- a/sc/source/core/inc/bcaslot.hxx +++ b/sc/source/core/inc/bcaslot.hxx @@ -216,7 +216,7 @@ public: void DelBroadcastAreasInRange( const ScRange& rRange ); void UpdateRemove( UpdateRefMode eUpdateRefMode, const ScRange& rRange, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); + SCCOL nDx, SCROW nDy, SCTAB nDz ); void UpdateRemoveArea( ScBroadcastArea* pArea ); void UpdateInsert( ScBroadcastArea* pArea ); @@ -316,7 +316,7 @@ public: void DelBroadcastAreasInRange( const ScRange& rRange ); void UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode, const ScRange& rRange, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); + SCCOL nDx, SCROW nDy, SCTAB nDz ); void EnterBulkBroadcast(); void LeaveBulkBroadcast( SfxHintId nHintId ); bool InsertBulkArea( const ScBroadcastArea* p ); diff --git a/sc/source/core/inc/refupdat.hxx b/sc/source/core/inc/refupdat.hxx index 8bc1ab6d7253..f58bef7b0ae3 100644 --- a/sc/source/core/inc/refupdat.hxx +++ b/sc/source/core/inc/refupdat.hxx @@ -47,7 +47,7 @@ public: ( ScDocument* pDoc, UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz, + SCCOL nDx, SCROW nDy, SCTAB nDz, SCCOL& theCol1, SCROW& theRow1, SCTAB& theTab1, SCCOL& theCol2, SCROW& theRow2, SCTAB& theTab2 ); @@ -62,7 +62,7 @@ public: static ScRefUpdateRes UpdateTranspose( ScDocument* pDoc, const ScRange& rSource, const ScAddress& rDest, ScRange& rRef ); - static void DoTranspose( SCsCOL& rCol, SCsROW& rRow, SCsTAB& rTab, ScDocument* pDoc, + static void DoTranspose( SCCOL& rCol, SCROW& rRow, SCTAB& rTab, ScDocument* pDoc, const ScRange& rSource, const ScAddress& rDest ); static ScRefUpdateRes UpdateGrow( diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index 72b1862f221d..c8e617dede94 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -263,7 +263,7 @@ static bool lcl_ScRange_External_TabSpan( return true; } - SCsTAB nSpan = pRefMgr->getCachedTabSpan( nFileId, rStartTabName, rEndTabName); + SCTAB nSpan = pRefMgr->getCachedTabSpan( nFileId, rStartTabName, rEndTabName); if (nSpan == -1) rFlags &= ~ScRefFlags(ScRefFlags::TAB_VALID | ScRefFlags::TAB2_VALID); else if (nSpan == 0) @@ -2299,9 +2299,9 @@ OUString ScRange::Format( ScRefFlags nFlags, const ScDocument* pDoc, return r.makeStringAndClear(); } -bool ScAddress::Move( SCsCOL dx, SCsROW dy, SCsTAB dz, ScAddress& rErrorPos, ScDocument* pDoc ) +bool ScAddress::Move( SCCOL dx, SCROW dy, SCTAB dz, ScAddress& rErrorPos, ScDocument* pDoc ) { - SCsTAB nMaxTab = pDoc ? pDoc->GetTableCount() : MAXTAB; + SCTAB nMaxTab = pDoc ? pDoc->GetTableCount() : MAXTAB; dx = Col() + dx; dy = Row() + dy; dz = Tab() + dz; @@ -2345,7 +2345,7 @@ bool ScAddress::Move( SCsCOL dx, SCsROW dy, SCsTAB dz, ScAddress& rErrorPos, ScD return bValid; } -bool ScRange::Move( SCsCOL dx, SCsROW dy, SCsTAB dz, ScRange& rErrorRange, ScDocument* pDoc ) +bool ScRange::Move( SCCOL dx, SCROW dy, SCTAB dz, ScRange& rErrorRange, ScDocument* pDoc ) { if (dy && aStart.Row() == 0 && aEnd.Row() == MAXROW) dy = 0; // Entire column not to be moved. @@ -2356,7 +2356,7 @@ bool ScRange::Move( SCsCOL dx, SCsROW dy, SCsTAB dz, ScRange& rErrorRange, ScDoc return b; } -bool ScRange::MoveSticky( SCsCOL dx, SCsROW dy, SCsTAB dz, ScRange& rErrorRange ) +bool ScRange::MoveSticky( SCCOL dx, SCROW dy, SCTAB dz, ScRange& rErrorRange ) { bool bColRange = (aStart.Col() < aEnd.Col()); bool bRowRange = (aStart.Row() < aEnd.Row()); @@ -2385,7 +2385,7 @@ bool ScRange::MoveSticky( SCsCOL dx, SCsROW dy, SCsTAB dz, ScRange& rErrorRange return b1 && b2; } -void ScRange::IncEndColSticky( SCsCOL nDelta ) +void ScRange::IncEndColSticky( SCCOL nDelta ) { SCCOL nCol = aEnd.Col(); if (aStart.Col() >= nCol) @@ -2405,7 +2405,7 @@ void ScRange::IncEndColSticky( SCsCOL nDelta ) aEnd.IncCol( nDelta); // was greater than MAXCOL, caller should know.. } -void ScRange::IncEndRowSticky( SCsROW nDelta ) +void ScRange::IncEndRowSticky( SCROW nDelta ) { SCROW nRow = aEnd.Row(); if (aStart.Row() >= nRow) diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index 28557677c2a5..0b620024dddd 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -589,7 +589,7 @@ void ScChangeAction::SetRejected() } void ScChangeAction::RejectRestoreContents( ScChangeTrack* pTrack, - SCsCOL nDx, SCsROW nDy ) + SCCOL nDx, SCROW nDy ) { // Construct list of Contents ScChangeActionCellListEntry* pListContents = nullptr; @@ -768,7 +768,7 @@ bool ScChangeActionIns::Reject( ScDocument* pDoc ) // ScChangeActionDel ScChangeActionDel::ScChangeActionDel( const ScRange& rRange, - SCsCOL nDxP, SCsROW nDyP, ScChangeTrack* pTrackP ) + SCCOL nDxP, SCROW nDyP, ScChangeTrack* pTrackP ) : ScChangeAction( SC_CAT_NONE, rRange ), pTrack( pTrackP ), @@ -808,7 +808,7 @@ ScChangeActionDel::ScChangeActionDel( const sal_uLong nActionNumber, const ScChangeActionState eStateP, const sal_uLong nRejectingNumber, const ScBigRange& aBigRangeP, const OUString& aUserP, const DateTime& aDateTimeP, const OUString &sComment, - const ScChangeActionType eTypeP, const SCsCOLROW nD, ScChangeTrack* pTrackP) : // which of nDx and nDy is set depends on the type + const ScChangeActionType eTypeP, const SCCOLROW nD, ScChangeTrack* pTrackP) : // which of nDx and nDy is set depends on the type ScChangeAction(eTypeP, aBigRangeP, nActionNumber, nRejectingNumber, eStateP, aDateTimeP, aUserP, sComment), pTrack( pTrackP ), pFirstCell( nullptr ), @@ -819,9 +819,9 @@ ScChangeActionDel::ScChangeActionDel( nDy( 0 ) { if (eType == SC_CAT_DELETE_COLS) - nDx = static_cast<SCsCOL>(nD); + nDx = static_cast<SCCOL>(nD); else if (eType == SC_CAT_DELETE_ROWS) - nDy = static_cast<SCsROW>(nD); + nDy = static_cast<SCROW>(nD); } ScChangeActionDel::~ScChangeActionDel() @@ -1802,20 +1802,20 @@ void ScChangeActionContent::GetFormulaString( } void ScChangeActionContent::PutOldValueToDoc( ScDocument* pDoc, - SCsCOL nDx, SCsROW nDy ) const + SCCOL nDx, SCROW nDy ) const { PutValueToDoc(maOldCell, maOldValue, pDoc, nDx, nDy); } void ScChangeActionContent::PutNewValueToDoc( ScDocument* pDoc, - SCsCOL nDx, SCsROW nDy ) const + SCCOL nDx, SCROW nDy ) const { PutValueToDoc(maNewCell, maNewValue, pDoc, nDx, nDy); } void ScChangeActionContent::PutValueToDoc( const ScCellValue& rCell, const OUString& rValue, ScDocument* pDoc, - SCsCOL nDx, SCsROW nDy ) const + SCCOL nDx, SCROW nDy ) const { ScAddress aPos( aBigRange.aStart.MakeAddress() ); if ( nDx ) @@ -2468,7 +2468,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend ) } void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, - ScDocument* pRefDoc, sal_uLong& nStartAction, sal_uLong& nEndAction, SCsTAB nDz ) + ScDocument* pRefDoc, sal_uLong& nStartAction, sal_uLong& nEndAction, SCTAB nDz ) { nStartAction = GetActionMax() + 1; AppendDeleteRange( rRange, pRefDoc, nDz, 0 ); @@ -2476,7 +2476,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, } void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, - ScDocument* pRefDoc, SCsTAB nDz, sal_uLong nRejectingInsert ) + ScDocument* pRefDoc, SCTAB nDz, sal_uLong nRejectingInsert ) { SetInDeleteRange( rRange ); StartBlockModify( SC_CTM_APPEND, GetActionMax() + 1 ); @@ -2548,7 +2548,7 @@ void ScChangeTrack::AppendDeleteRange( const ScRange& rRange, } void ScChangeTrack::AppendOneDeleteRange( const ScRange& rOrgRange, - ScDocument* pRefDoc, SCsCOL nDx, SCsROW nDy, SCsTAB nDz, + ScDocument* pRefDoc, SCCOL nDx, SCROW nDy, SCTAB nDz, sal_uLong nRejectingInsert ) { ScRange aTrackRange( rOrgRange ); @@ -2582,7 +2582,7 @@ void ScChangeTrack::AppendOneDeleteRange( const ScRange& rOrgRange, } void ScChangeTrack::LookUpContents( const ScRange& rOrgRange, - ScDocument* pRefDoc, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) + ScDocument* pRefDoc, SCCOL nDx, SCROW nDy, SCTAB nDz ) { if (!pRefDoc) return; @@ -4496,15 +4496,15 @@ ScChangeTrack* ScChangeTrack::Clone( ScDocument* pDocument ) const { const ScChangeActionDel& rDelete = dynamic_cast<const ScChangeActionDel&>(*pAction); - SCsCOLROW nD = 0; + SCCOLROW nD = 0; ScChangeActionType eType = pAction->GetType(); if ( eType == SC_CAT_DELETE_COLS ) { - nD = static_cast< SCsCOLROW >( rDelete.GetDx() ); + nD = static_cast< SCCOLROW >( rDelete.GetDx() ); } else if ( eType == SC_CAT_DELETE_ROWS ) { - nD = static_cast< SCsCOLROW >( rDelete.GetDy() ); + nD = static_cast< SCCOLROW >( rDelete.GetDy() ); } pClonedAction = new ScChangeActionDel( diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index e8af73691b29..78d4f37afa35 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -668,7 +668,7 @@ static OUString lcl_makeExternalNameStr(const OUString& rFile, const OUString& r static bool lcl_getLastTabName( OUString& rTabName2, const OUString& rTabName1, const vector<OUString>& rTabNames, const ScRange& rRef ) { - SCsTAB nTabSpan = rRef.aEnd.Tab() - rRef.aStart.Tab(); + SCTAB nTabSpan = rRef.aEnd.Tab() - rRef.aStart.Tab(); if (nTabSpan > 0) { size_t nCount = rTabNames.size(); diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index 29dfd5472803..1f2e7703f271 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -571,7 +571,7 @@ void ScDBData::UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos) void ScDBData::UpdateReference(ScDocument* pDoc, UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz) + SCCOL nDx, SCROW nDy, SCTAB nDz) { SCCOL theCol1; SCROW theRow1; @@ -957,15 +957,15 @@ class UpdateRefFunc : public unary_function<std::unique_ptr<ScDBData>, void> SCCOL mnCol2; SCROW mnRow2; SCTAB mnTab2; - SCsCOL mnDx; - SCsROW mnDy; - SCsTAB mnDz; + SCCOL mnDx; + SCROW mnDy; + SCTAB mnDz; public: UpdateRefFunc(ScDocument* pDoc, UpdateRefMode eMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz) : + SCCOL nDx, SCROW nDy, SCTAB nDz) : mpDoc(pDoc), meMode(eMode), mnCol1(nCol1), mnRow1(nRow1), mnTab1(nTab1), mnCol2(nCol2), mnRow2(nRow2), mnTab2(nTab2), @@ -1430,7 +1430,7 @@ void ScDBCollection::DeleteOnTab( SCTAB nTab ) void ScDBCollection::UpdateReference(UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) + SCCOL nDx, SCROW nDy, SCTAB nDz ) { ScDBData* pData = pDoc->GetAnonymousDBData(nTab1); if (pData) diff --git a/sc/source/core/tool/detdata.cxx b/sc/source/core/tool/detdata.cxx index 3b8bad0a59bd..1927539878c9 100644 --- a/sc/source/core/tool/detdata.cxx +++ b/sc/source/core/tool/detdata.cxx @@ -44,7 +44,7 @@ void ScDetOpList::DeleteOnTab( SCTAB nTab ) } void ScDetOpList::UpdateReference( ScDocument* pDoc, UpdateRefMode eUpdateRefMode, - const ScRange& rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) + const ScRange& rRange, SCCOL nDx, SCROW nDy, SCTAB nDz ) { for (ScDetOpDataVector::iterator it = aDetOpDataVector.begin(); it != aDetOpDataVector.end(); ++it ) { diff --git a/sc/source/core/tool/hints.cxx b/sc/source/core/tool/hints.cxx index b69fd76ffc07..581a68771a02 100644 --- a/sc/source/core/tool/hints.cxx +++ b/sc/source/core/tool/hints.cxx @@ -35,7 +35,7 @@ ScPaintHint::~ScPaintHint() // ScUpdateRefHint - update references ScUpdateRefHint::ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR, - SCsCOL nX, SCsROW nY, SCsTAB nZ ) : + SCCOL nX, SCROW nY, SCTAB nZ ) : eUpdateRefMode( eMode ), aRange( rR ), nDx( nX ), diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index e5ba5ede6b0c..9cc318b26a26 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -5253,8 +5253,8 @@ void ScInterpreter::IterateParametersIf( ScIterFuncIf eFunc ) rParam.nCol1 = nCol1; rParam.nCol2 = nCol2; rEntry.nField = nCol1; - SCsCOL nColDiff = nCol3 - nCol1; - SCsROW nRowDiff = nRow3 - nRow1; + SCCOL nColDiff = nCol3 - nCol1; + SCROW nRowDiff = nRow3 - nRow1; if (pQueryMatrix) { // Never case-sensitive. @@ -5810,8 +5810,8 @@ void ScInterpreter::IterateParametersIfs( sc::ParamIfsResult& rRes ) rParam.nCol1 = nCol1; rParam.nCol2 = nCol2; rEntry.nField = nCol1; - SCsCOL nColDiff = -nCol1; - SCsROW nRowDiff = -nRow1; + SCCOL nColDiff = -nCol1; + SCROW nRowDiff = -nRow1; if (pQueryMatrix) { // Never case-sensitive. diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 322a69e515a4..13ff13bf29f1 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -3636,12 +3636,12 @@ void ScInterpreter::ScColRowNameAuto() return; } - SCsCOL nStartCol; - SCsROW nStartRow; + SCCOL nStartCol; + SCROW nStartRow; // maybe remember limit by using defined ColRowNameRange - SCsCOL nCol2 = aAbs.aEnd.Col(); - SCsROW nRow2 = aAbs.aEnd.Row(); + SCCOL nCol2 = aAbs.aEnd.Col(); + SCROW nRow2 = aAbs.aEnd.Row(); // DataArea of the first cell nStartCol = aAbs.aStart.Col(); nStartRow = aAbs.aStart.Row(); diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx index fe6aa1bea950..43276e3e6a27 100644 --- a/sc/source/core/tool/queryparam.cxx +++ b/sc/source/core/tool/queryparam.cxx @@ -392,9 +392,9 @@ void ScQueryParam::MoveToDest() { if (!bInplace) { - SCsCOL nDifX = ((SCsCOL) nDestCol) - ((SCsCOL) nCol1); - SCsROW nDifY = ((SCsROW) nDestRow) - ((SCsROW) nRow1); - SCsTAB nDifZ = ((SCsTAB) nDestTab) - ((SCsTAB) nTab); + SCCOL nDifX = nDestCol - nCol1; + SCROW nDifY = nDestRow - nRow1; + SCTAB nDifZ = nDestTab - nTab; nCol1 = sal::static_int_cast<SCCOL>( nCol1 + nDifX ); nRow1 = sal::static_int_cast<SCROW>( nRow1 + nDifY ); diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index df273054390d..5ae74f9c0f3d 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -371,9 +371,9 @@ bool ScRangeList::UpdateReference( UpdateRefMode eUpdateRefMode, ScDocument* pDoc, const ScRange& rWhere, - SCsCOL nDx, - SCsROW nDy, - SCsTAB nDz + SCCOL nDx, + SCROW nDy, + SCTAB nDz ) { if (maRanges.empty()) @@ -1269,7 +1269,7 @@ size_t ScRangePairList::size() const void ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode, ScDocument* pDoc, const ScRange& rWhere, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) + SCCOL nDx, SCROW nDy, SCTAB nDz ) { if ( !maPairs.empty() ) { diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index 7b6e4ad96075..f2aff8454dce 100644 --- a/sc/source/core/tool/rangenam.cxx +++ b/sc/source/core/tool/rangenam.cxx @@ -217,9 +217,9 @@ void ScRangeData::GuessPosition() OSL_ENSURE(aPos == ScAddress(), "position will go lost now"); - SCsCOL nMinCol = 0; - SCsROW nMinRow = 0; - SCsTAB nMinTab = 0; + SCCOL nMinCol = 0; + SCROW nMinRow = 0; + SCTAB nMinTab = 0; formula::FormulaToken* t; pCode->Reset(); diff --git a/sc/source/core/tool/refupdat.cxx b/sc/source/core/tool/refupdat.cxx index 09935a16a552..6a25667717ed 100644 --- a/sc/source/core/tool/refupdat.cxx +++ b/sc/source/core/tool/refupdat.cxx @@ -189,7 +189,7 @@ static bool lcl_MoveItCutBig( sal_Int32& rRef, sal_Int32 nDelta ) ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, - SCsCOL nDx, SCsROW nDy, SCsTAB nDz, + SCCOL nDx, SCROW nDy, SCTAB nDz, SCCOL& theCol1, SCROW& theRow1, SCTAB& theTab1, SCCOL& theCol2, SCROW& theRow2, SCTAB& theTab2 ) { @@ -278,11 +278,11 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMo if ( nDz && (theCol1 >= nCol1) && (theCol2 <= nCol2) && (theRow1 >= nRow1) && (theRow2 <= nRow2) ) { - SCsTAB nMaxTab = pDoc->GetTableCount() - 1; - nMaxTab = sal::static_int_cast<SCsTAB>(nMaxTab + nDz); // adjust to new count + SCTAB nMaxTab = pDoc->GetTableCount() - 1; + nMaxTab = sal::static_int_cast<SCTAB>(nMaxTab + nDz); // adjust to new count bool bExp = (bExpand && IsExpand( theTab1, theTab2, nTab1, nDz )); - bCut1 = lcl_MoveStart( theTab1, nTab1, nDz, static_cast<SCTAB>(nMaxTab) ); - bCut2 = lcl_MoveEnd( theTab2, nTab1, nDz, static_cast<SCTAB>(nMaxTab) ); + bCut1 = lcl_MoveStart( theTab1, nTab1, nDz, nMaxTab ); + bCut2 = lcl_MoveEnd( theTab2, nTab1, nDz, nMaxTab ); if ( theTab2 < theTab1 ) { eRet = UR_INVALID; @@ -330,9 +330,9 @@ ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMo } if ( nDz ) { - SCsTAB nMaxTab = (SCsTAB) pDoc->GetTableCount() - 1; - bCut1 = lcl_MoveItCut( theTab1, nDz, static_cast<SCTAB>(nMaxTab) ); - bCut2 = lcl_MoveItCut( theTab2, nDz, static_cast<SCTAB>(nMaxTab) ); + SCTAB nMaxTab = pDoc->GetTableCount() - 1; + bCut1 = lcl_MoveItCut( theTab1, nDz, nMaxTab ); + bCut2 = lcl_MoveItCut( theTab2, nDz, nMaxTab ); if ( bCut1 || bCut2 ) eRet = UR_UPDATED; } @@ -467,38 +467,38 @@ void ScRefUpdate::MoveRelWrap( ScDocument* pDoc, const ScAddress& rPos, if( rRef.Ref1.IsColRel() ) { SCCOL nCol = aAbsRange.aStart.Col(); - lcl_MoveItWrap(nCol, static_cast<SCsCOL>(0), nMaxCol); + lcl_MoveItWrap(nCol, static_cast<SCCOL>(0), nMaxCol); aAbsRange.aStart.SetCol(nCol); } if( rRef.Ref2.IsColRel() ) { SCCOL nCol = aAbsRange.aEnd.Col(); - lcl_MoveItWrap(nCol, static_cast<SCsCOL>(0), nMaxCol); + lcl_MoveItWrap(nCol, static_cast<SCCOL>(0), nMaxCol); aAbsRange.aEnd.SetCol(nCol); } if( rRef.Ref1.IsRowRel() ) { SCROW nRow = aAbsRange.aStart.Row(); - lcl_MoveItWrap(nRow, static_cast<SCsROW>(0), nMaxRow); + lcl_MoveItWrap(nRow, static_cast<SCROW>(0), nMaxRow); aAbsRange.aStart.SetRow(nRow); } if( rRef.Ref2.IsRowRel() ) { SCROW nRow = aAbsRange.aEnd.Row(); - lcl_MoveItWrap(nRow, static_cast<SCsROW>(0), nMaxRow); + lcl_MoveItWrap(nRow, static_cast<SCROW>(0), nMaxRow); aAbsRange.aEnd.SetRow(nRow); } - SCsTAB nMaxTab = (SCsTAB) pDoc->GetTableCount() - 1; + SCTAB nMaxTab = pDoc->GetTableCount() - 1; if( rRef.Ref1.IsTabRel() ) { SCTAB nTab = aAbsRange.aStart.Tab(); - lcl_MoveItWrap(nTab, static_cast<SCsTAB>(0), static_cast<SCTAB>(nMaxTab)); + lcl_MoveItWrap(nTab, static_cast<SCTAB>(0), nMaxTab); aAbsRange.aStart.SetTab(nTab); } if( rRef.Ref2.IsTabRel() ) { SCTAB nTab = aAbsRange.aEnd.Tab(); - lcl_MoveItWrap(nTab, static_cast<SCsTAB>(0), static_cast<SCTAB>(nMaxTab)); + lcl_MoveItWrap(nTab, static_cast<SCTAB>(0), nMaxTab); aAbsRange.aEnd.SetTab(nTab); } @@ -506,28 +506,28 @@ void ScRefUpdate::MoveRelWrap( ScDocument* pDoc, const ScAddress& rPos, rRef.SetRange(aAbsRange, rPos); } -void ScRefUpdate::DoTranspose( SCsCOL& rCol, SCsROW& rRow, SCsTAB& rTab, +void ScRefUpdate::DoTranspose( SCCOL& rCol, SCROW& rRow, SCTAB& rTab, ScDocument* pDoc, const ScRange& rSource, const ScAddress& rDest ) { - SCsTAB nDz = ((SCsTAB)rDest.Tab())-(SCsTAB)rSource.aStart.Tab(); + SCTAB nDz = rDest.Tab() - rSource.aStart.Tab(); if (nDz) { - SCsTAB nNewTab = rTab+nDz; - SCsTAB nCount = pDoc->GetTableCount(); - while (nNewTab<0) nNewTab = sal::static_int_cast<SCsTAB>( nNewTab + nCount ); - while (nNewTab>=nCount) nNewTab = sal::static_int_cast<SCsTAB>( nNewTab - nCount ); + SCTAB nNewTab = rTab+nDz; + SCTAB nCount = pDoc->GetTableCount(); + while (nNewTab<0) nNewTab = sal::static_int_cast<SCTAB>( nNewTab + nCount ); + while (nNewTab>=nCount) nNewTab = sal::static_int_cast<SCTAB>( nNewTab - nCount ); rTab = nNewTab; } OSL_ENSURE( rCol>=rSource.aStart.Col() && rRow>=rSource.aStart.Row(), "UpdateTranspose: pos. wrong" ); - SCsCOL nRelX = rCol - (SCsCOL)rSource.aStart.Col(); - SCsROW nRelY = rRow - (SCsROW)rSource.aStart.Row(); + SCCOL nRelX = rCol - rSource.aStart.Col(); + SCROW nRelY = rRow - rSource.aStart.Row(); - rCol = static_cast<SCsCOL>(static_cast<SCsCOLROW>(rDest.Col()) + - static_cast<SCsCOLROW>(nRelY)); - rRow = static_cast<SCsROW>(static_cast<SCsCOLROW>(rDest.Row()) + - static_cast<SCsCOLROW>(nRelX)); + rCol = static_cast<SCCOL>(static_cast<SCCOLROW>(rDest.Col()) + + static_cast<SCCOLROW>(nRelY)); + rRow = static_cast<SCROW>(static_cast<SCCOLROW>(rDest.Row()) + + static_cast<SCCOLROW>(nRelX)); } ScRefUpdateRes ScRefUpdate::UpdateTranspose( @@ -574,12 +574,12 @@ ScRefUpdateRes ScRefUpdate::UpdateGrow( if ( bUpdateX ) { - rRef.aEnd.SetCol(sal::static_int_cast<SCsCOL>(rRef.aEnd.Col() + nGrowX)); + rRef.aEnd.SetCol(sal::static_int_cast<SCCOL>(rRef.aEnd.Col() + nGrowX)); eRet = UR_UPDATED; } if ( bUpdateY ) { - rRef.aEnd.SetRow(sal::static_int_cast<SCsROW>(rRef.aEnd.Row() + nGrowY)); + rRef.aEnd.SetRow(sal::static_int_cast<SCROW>(rRef.aEnd.Row() + nGrowY)); eRet = UR_UPDATED; } diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index ea2060d8c7a2..1bc6c217077a 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -89,9 +89,9 @@ namespace rRef.SetAbsRow(static_cast<SCROW>(rAPI.Row)); if (rRef.IsTabRel()) - rRef.SetRelTab(static_cast<SCsTAB>(rAPI.RelativeSheet)); + rRef.SetRelTab(static_cast<SCTAB>(rAPI.RelativeSheet)); else - rRef.SetAbsTab(static_cast<SCsTAB>(rAPI.Sheet)); + rRef.SetAbsTab(static_cast<SCTAB>(rAPI.Sheet)); } void lcl_ExternalRefToCalc( ScSingleRefData& rRef, const sheet::SingleReference& rAPI ) @@ -2339,9 +2339,9 @@ bool SkipReference(formula::FormulaToken* pToken, const ScAddress& rPos, const S void AdjustSingleRefData( ScSingleRefData& rRef, const ScAddress& rOldPos, const ScAddress& rNewPos) { - SCsCOL nCols = rNewPos.Col() - rOldPos.Col(); - SCsROW nRows = rNewPos.Row() - rOldPos.Row(); - SCsTAB nTabs = rNewPos.Tab() - rOldPos.Tab(); + SCCOL nCols = rNewPos.Col() - rOldPos.Col(); + SCROW nRows = rNewPos.Row() - rOldPos.Row(); + SCTAB nTabs = rNewPos.Tab() - rOldPos.Tab(); if (!rRef.IsColRel()) rRef.IncCol(nCols); diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx index 42bbe151f4b0..8ed97f50c82e 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -553,7 +553,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s { sal_uInt16 nUINT16 = aIn.ReaduInt16(); sal_uInt8 nByte = aIn.ReaduInt8(); - aSRD.SetAbsCol(static_cast<SCsCOL>(nByte)); + aSRD.SetAbsCol(static_cast<SCCOL>(nByte)); aSRD.SetAbsRow(nUINT16 & 0x3FFF); aSRD.SetRelTab(0); aSRD.SetFlag3D( bRangeName ); @@ -898,7 +898,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s // stream seeks to first byte after <nFormulaLen> ConvErr ExcelToSc::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, std::size_t nFormulaLen, - SCsTAB nTab, const FORMULA_TYPE eFT ) + SCTAB nTab, const FORMULA_TYPE eFT ) { RootData& rR = GetOldRoot(); sal_uInt8 nOp, nLen; @@ -1058,7 +1058,7 @@ ConvErr ExcelToSc::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, std: { sal_uInt16 nUINT16 = aIn.ReaduInt16(); sal_uInt8 nByte = aIn.ReaduInt8(); - aSRD.SetAbsCol(static_cast<SCsCOL>(nByte)); + aSRD.SetAbsCol(static_cast<SCCOL>(nByte)); aSRD.SetAbsRow(nUINT16 & 0x3FFF); aSRD.SetRelTab(0); aSRD.SetFlag3D( bRangeName ); diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx index f8fbf68ce02f..089b6da9bcdb 100644 --- a/sc/source/filter/excel/excform8.cxx +++ b/sc/source/filter/excel/excform8.cxx @@ -954,7 +954,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, // stream seeks to first byte after <nFormulaLen> ConvErr ExcelToSc8::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, std::size_t nFormulaLen, - SCsTAB nTab, const FORMULA_TYPE eFT ) + SCTAB nTab, const FORMULA_TYPE eFT ) { sal_uInt8 nOp, nLen; bool bError = false; diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index 5554d8dde094..e7d19e5227c4 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -857,8 +857,8 @@ namespace { void lclAddDoubleRefData( ScTokenArray& orArray, const FormulaToken& rToken, - SCsTAB nScTab1, SCsCOL nScCol1, SCsROW nScRow1, - SCsTAB nScTab2, SCsCOL nScCol2, SCsROW nScRow2 ) + SCTAB nScTab1, SCCOL nScCol1, SCROW nScRow1, + SCTAB nScTab2, SCCOL nScCol2, SCROW nScRow2 ) { ScComplexRefData aComplexRef; aComplexRef.InitRange(ScRange(nScCol1,nScRow1,nScTab1,nScCol2,nScRow2,nScTab2)); @@ -925,7 +925,7 @@ sal_uInt16 XclExpChSourceLink::ConvertDataSequence( Reference< XDataSequence > c const ScComplexRefData& rComplexRef = *pToken->GetDoubleRef(); ScAddress aAbs1 = rComplexRef.Ref1.toAbs(ScAddress()); ScAddress aAbs2 = rComplexRef.Ref2.toAbs(ScAddress()); - for (SCsTAB nScTab = aAbs1.Tab(); nScTab <= aAbs2.Tab(); ++nScTab) + for (SCTAB nScTab = aAbs1.Tab(); nScTab <= aAbs2.Tab(); ++nScTab) { // split 2-dimensional ranges into single columns if (bSplitToColumns && (aAbs1.Col() < aAbs2.Col()) && (aAbs1.Row() < aAbs2.Row())) diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx index 1fa791647a30..7c0134f332be 100644 --- a/sc/source/filter/excel/xeformula.cxx +++ b/sc/source/filter/excel/xeformula.cxx @@ -458,10 +458,10 @@ private: XclExpCompDataRef mxData; /// Working data for current formula. XclExpCompDataVector maDataStack; /// Stack for working data, when compiler is called recursively. const XclBiff meBiff; /// Cached BIFF version to save GetBiff() calls. - const SCsCOL mnMaxAbsCol; /// Maximum column index. - const SCsROW mnMaxAbsRow; /// Maximum row index. - const SCsCOL mnMaxScCol; /// Maximum column index in Calc itself. - const SCsROW mnMaxScRow; /// Maximum row index in Calc itself. + const SCCOL mnMaxAbsCol; /// Maximum column index. + const SCROW mnMaxAbsRow; /// Maximum row index. + const SCCOL mnMaxScCol; /// Maximum column index in Calc itself. + const SCROW mnMaxScRow; /// Maximum row index in Calc itself. const sal_uInt16 mnMaxColMask; /// Mask to delete invalid bits in column fields. const sal_uInt32 mnMaxRowMask; /// Mask to delete invalid bits in row fields. }; @@ -470,10 +470,10 @@ XclExpFmlaCompImpl::XclExpFmlaCompImpl( const XclExpRoot& rRoot ) : XclExpRoot( rRoot ), maFuncProv( rRoot ), meBiff( rRoot.GetBiff() ), - mnMaxAbsCol( static_cast< SCsCOL >( rRoot.GetXclMaxPos().Col() ) ), - mnMaxAbsRow( static_cast< SCsROW >( rRoot.GetXclMaxPos().Row() ) ), - mnMaxScCol( static_cast< SCsCOL >( rRoot.GetScMaxPos().Col() ) ), - mnMaxScRow( static_cast< SCsROW >( rRoot.GetScMaxPos().Row() ) ), + mnMaxAbsCol( rRoot.GetXclMaxPos().Col() ), + mnMaxAbsRow( rRoot.GetXclMaxPos().Row() ), + mnMaxScCol( rRoot.GetScMaxPos().Col() ), + mnMaxScRow( rRoot.GetScMaxPos().Row() ), mnMaxColMask( static_cast< sal_uInt16 >( rRoot.GetXclMaxPos().Col() ) ), mnMaxRowMask( static_cast< sal_uInt32 >( rRoot.GetXclMaxPos().Row() ) ) { diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index 37a4d7a380e4..d09dd2e62eca 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -890,8 +890,8 @@ XclExpFormulaCell::XclExpFormulaCell( OSL_ENSURE( nMatWidth && nMatHeight, "XclExpFormulaCell::XclExpFormulaCell - empty matrix" ); ScRange aMatScRange( aScPos ); ScAddress& rMatEnd = aMatScRange.aEnd; - rMatEnd.IncCol( static_cast< SCsCOL >( nMatWidth - 1 ) ); - rMatEnd.IncRow( static_cast< SCsROW >( nMatHeight - 1 ) ); + rMatEnd.IncCol( static_cast< SCCOL >( nMatWidth - 1 ) ); + rMatEnd.IncRow( static_cast< SCROW >( nMatHeight - 1 ) ); // reduce to valid range (range keeps valid, because start position IS valid) rRoot.GetAddressConverter().ValidateRange( aMatScRange, true ); // create the ARRAY record @@ -974,8 +974,8 @@ void XclExpFormulaCell::SaveXml( XclExpXmlStream& rStrm ) OSL_ENSURE( nMatWidth && nMatHeight, "XclExpFormulaCell::XclExpFormulaCell - empty matrix" ); ScRange aMatScRange( aScPos ); ScAddress& rMatEnd = aMatScRange.aEnd; - rMatEnd.IncCol( static_cast< SCsCOL >( nMatWidth - 1 ) ); - rMatEnd.IncRow( static_cast< SCsROW >( nMatHeight - 1 ) ); + rMatEnd.IncCol( static_cast< SCCOL >( nMatWidth - 1 ) ); + rMatEnd.IncRow( static_cast< SCROW >( nMatHeight - 1 ) ); // reduce to valid range (range keeps valid, because start position IS valid rStrm.GetRoot().GetAddressConverter().ValidateRange( aMatScRange, true ); diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx index 8b599b1aaf91..50c55ca7ae84 100644 --- a/sc/source/filter/excel/xiname.cxx +++ b/sc/source/filter/excel/xiname.cxx @@ -153,7 +153,7 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) : } else if( bBuiltIn ) { - SCsTAB const nLocalTab = (mnXclTab == EXC_NAME_GLOBAL) ? SCTAB_MAX : (mnXclTab - 1); + SCTAB const nLocalTab = (mnXclTab == EXC_NAME_GLOBAL) ? SCTAB_MAX : (mnXclTab - 1); // --- print ranges or title ranges --- rStrm.PushPosition(); diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx index c19a03f832ae..3926429a7b1f 100644 --- a/sc/source/filter/excel/xipivot.cxx +++ b/sc/source/filter/excel/xipivot.cxx @@ -1402,7 +1402,7 @@ void XclImpPivotTable::Convert() ScRange aOutRange( maOutScRange ); if( !maPageFields.empty() ) { - SCsROW nDecRows = ::std::min< SCsROW >( aOutRange.aStart.Row(), maPageFields.size() + 1 ); + SCROW nDecRows = ::std::min< SCROW >( aOutRange.aStart.Row(), maPageFields.size() + 1 ); aOutRange.aStart.IncRow( -nDecRows ); } diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx index 4c2b9c70a392..1bef8dbbad78 100644 --- a/sc/source/filter/html/htmlimp.cxx +++ b/sc/source/filter/html/htmlimp.cxx @@ -157,7 +157,7 @@ void ScHTMLImport::WriteToDocument( // create ranges for HTML tables // 1 - entire document ScRange aNewRange( maRange.aStart ); - aNewRange.aEnd.IncCol( static_cast<SCsCOL>(pGlobTable->GetDocSize( tdCol )) - 1 ); + aNewRange.aEnd.IncCol( static_cast<SCCOL>(pGlobTable->GetDocSize( tdCol )) - 1 ); aNewRange.aEnd.IncRow( pGlobTable->GetDocSize( tdRow ) - 1 ); InsertRangeName( mpDoc, ScfTools::GetHTMLDocName(), aNewRange ); @@ -165,9 +165,9 @@ void ScHTMLImport::WriteToDocument( InsertRangeName( mpDoc, ScfTools::GetHTMLTablesName(), ScRange( maRange.aStart ) ); // 3 - single tables - SCsCOL nColDiff = (SCsCOL)maRange.aStart.Col(); - SCsROW nRowDiff = (SCsROW)maRange.aStart.Row(); - SCsTAB nTabDiff = (SCsTAB)maRange.aStart.Tab(); + SCCOL nColDiff = maRange.aStart.Col(); + SCROW nRowDiff = maRange.aStart.Row(); + SCTAB nTabDiff = maRange.aStart.Tab(); ScHTMLTable* pTable = nullptr; ScHTMLTableId nTableId = SC_HTML_GLOBAL_TABLE; diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 9d768d53cee3..2ff1e9305c7a 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -2272,8 +2272,8 @@ void ScHTMLTable::GetDocRange( ScRange& rRange ) const { rRange.aStart = rRange.aEnd = maDocBasePos.MakeAddr(); ScAddress aErrorPos( ScAddress::UNINITIALIZED ); - if (!rRange.aEnd.Move( static_cast< SCsCOL >( GetDocSize( tdCol ) ) - 1, - static_cast< SCsROW >( GetDocSize( tdRow ) ) - 1, 0, aErrorPos)) + if (!rRange.aEnd.Move( static_cast< SCCOL >( GetDocSize( tdCol ) ) - 1, + static_cast< SCROW >( GetDocSize( tdRow ) ) - 1, 0, aErrorPos)) { assert(!"can't move"); } @@ -2595,7 +2595,7 @@ void ScHTMLTable::SetDocSize( ScHTMLOrient eOrient, SCCOLROW nCellPos, SCCOLROW rSizes.push_back( rSizes.empty() ? 1 : (rSizes.back() + 1) ); // update size of passed position and all following // #i109987# only grow, don't shrink - use the largest needed size - SCsCOLROW nDiff = nSize - ((nIndex == 0) ? rSizes.front() : (rSizes[ nIndex ] - rSizes[ nIndex - 1 ])); + SCCOLROW nDiff = nSize - ((nIndex == 0) ? rSizes.front() : (rSizes[ nIndex ] - rSizes[ nIndex - 1 ])); if( nDiff > 0 ) for( ScSizeVec::iterator aIt = rSizes.begin() + nIndex, aEnd = rSizes.end(); aIt != aEnd; ++aIt ) *aIt += nDiff; diff --git a/sc/source/filter/inc/excform.hxx b/sc/source/filter/inc/excform.hxx index 9a64b40afec0..122e1c42c305 100644 --- a/sc/source/filter/inc/excform.hxx +++ b/sc/source/filter/inc/excform.hxx @@ -50,7 +50,7 @@ public: virtual ConvErr Convert( const ScTokenArray*&, XclImpStream& rStrm, std::size_t nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT = FT_CellFormula ) override; - virtual ConvErr Convert( ScRangeListTabs&, XclImpStream& rStrm, std::size_t nFormulaLen, SCsTAB nTab, const FORMULA_TYPE eFT = FT_CellFormula ) override; + virtual ConvErr Convert( ScRangeListTabs&, XclImpStream& rStrm, std::size_t nFormulaLen, SCTAB nTab, const FORMULA_TYPE eFT = FT_CellFormula ) override; virtual void ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, std::size_t nFormulaLen, const OUString& rUrl, const ::std::vector<OUString>& rTabNames ); @@ -123,7 +123,7 @@ public: virtual ConvErr Convert( const ScTokenArray*& rpTokArray, XclImpStream& rStrm, std::size_t nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT = FT_CellFormula ) override; - virtual ConvErr Convert( ScRangeListTabs&, XclImpStream& rStrm, std::size_t nFormulaLen, SCsTAB nTab, const FORMULA_TYPE eFT = FT_CellFormula ) override; + virtual ConvErr Convert( ScRangeListTabs&, XclImpStream& rStrm, std::size_t nFormulaLen, SCTAB nTab, const FORMULA_TYPE eFT = FT_CellFormula ) override; virtual void ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, std::size_t nFormulaLen, const OUString& rUrl, const ::std::vector<OUString>& rTabNames ) override; diff --git a/sc/source/filter/inc/formel.hxx b/sc/source/filter/inc/formel.hxx index 0d496f78eb37..433ba0809a94 100644 --- a/sc/source/filter/inc/formel.hxx +++ b/sc/source/filter/inc/formel.hxx @@ -105,7 +105,7 @@ public: virtual ConvErr Convert( const ScTokenArray*& rpErg, XclImpStream& rStrm, std::size_t nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT = FT_CellFormula ) = 0; - virtual ConvErr Convert( ScRangeListTabs&, XclImpStream& rStrm, std::size_t nFormulaLen, SCsTAB nTab, + virtual ConvErr Convert( ScRangeListTabs&, XclImpStream& rStrm, std::size_t nFormulaLen, SCTAB nTab, const FORMULA_TYPE eFT = FT_CellFormula ) = 0; }; diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index ee51bf140481..a2ba6a178531 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -2335,7 +2335,7 @@ void Sc10Import::LoadObjects() nStartX += (long) ( GraphHeader.x / nPPTX * HMM_PER_TWIPS ); long nSizeX = (long) ( GraphHeader.w / nPPTX * HMM_PER_TWIPS ); long nStartY = pDoc->GetRowHeight( 0, - SanitizeRow(static_cast<SCsROW>(GraphHeader.CarretY) - 1), + SanitizeRow(static_cast<SCROW>(GraphHeader.CarretY) - 1), SanitizeTab(static_cast<SCTAB>(GraphHeader.CarretZ))); nStartY = (long) ( nStartY * HMM_PER_TWIPS ); nStartY += (long) ( GraphHeader.y / nPPTY * HMM_PER_TWIPS ); 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(); |