diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-19 15:18:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-20 08:04:53 +0200 |
commit | 1e822e401ea8fe950c7fb62172ac61d8396c98e9 (patch) | |
tree | 3a29227adfe1c5ec9209d7e7deb2035633104986 /sw/source/core/inc | |
parent | b225980d2d65694278c9ed89512fbe21b08febd6 (diff) |
use tools::Long in sw
Change-Id: I44be72b3a9b14823ec37a3c799cffb4fb4d6e1de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104527
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/inc')
-rw-r--r-- | sw/source/core/inc/DocumentStatisticsManager.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/inc/UndoNumbering.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/UndoRedline.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/inc/UndoTable.hxx | 5 | ||||
-rw-r--r-- | sw/source/core/inc/cellfrm.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/cntfrm.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/dflyobj.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/drawfont.hxx | 22 | ||||
-rw-r--r-- | sw/source/core/inc/flyfrms.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/fntcache.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/frame.hxx | 124 | ||||
-rw-r--r-- | sw/source/core/inc/frmtool.hxx | 6 | ||||
-rw-r--r-- | sw/source/core/inc/layact.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/layfrm.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/pagefrm.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/rootfrm.hxx | 8 | ||||
-rw-r--r-- | sw/source/core/inc/scriptinfo.hxx | 19 | ||||
-rw-r--r-- | sw/source/core/inc/swcache.hxx | 27 | ||||
-rw-r--r-- | sw/source/core/inc/swfont.hxx | 8 | ||||
-rw-r--r-- | sw/source/core/inc/tabfrm.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/tblrwcl.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/txtfly.hxx | 18 | ||||
-rw-r--r-- | sw/source/core/inc/txtfrm.hxx | 14 |
23 files changed, 146 insertions, 141 deletions
diff --git a/sw/source/core/inc/DocumentStatisticsManager.hxx b/sw/source/core/inc/DocumentStatisticsManager.hxx index ab82a767ae41..7986610e9bfc 100644 --- a/sw/source/core/inc/DocumentStatisticsManager.hxx +++ b/sw/source/core/inc/DocumentStatisticsManager.hxx @@ -21,6 +21,7 @@ #include <IDocumentStatistics.hxx> #include <SwDocIdle.hxx> +#include <tools/long.hxx> #include <memory> class SwDoc; @@ -56,7 +57,7 @@ private: * * returns false when there is no more to calculate */ - bool IncrementalDocStatCalculate(long nChars, bool bFields = true); + bool IncrementalDocStatCalculate(tools::Long nChars, bool bFields = true); // Our own 'StatsUpdateTimer' calls the following method DECL_LINK( DoIdleStatsUpdate, Timer *, void ); diff --git a/sw/source/core/inc/UndoNumbering.hxx b/sw/source/core/inc/UndoNumbering.hxx index 57a833b86760..5414b70257a2 100644 --- a/sw/source/core/inc/UndoNumbering.hxx +++ b/sw/source/core/inc/UndoNumbering.hxx @@ -83,10 +83,10 @@ public: class SwUndoMoveNum : public SwUndo, private SwUndRng { sal_uLong m_nNewStart; - long m_nOffset; + tools::Long m_nOffset; public: - SwUndoMoveNum( const SwPaM& rPam, long nOffset, bool bIsOutlMv ); + SwUndoMoveNum( const SwPaM& rPam, tools::Long nOffset, bool bIsOutlMv ); virtual void UndoImpl( ::sw::UndoRedoContext & ) override; virtual void RedoImpl( ::sw::UndoRedoContext & ) override; diff --git a/sw/source/core/inc/UndoRedline.hxx b/sw/source/core/inc/UndoRedline.hxx index 1688e2872578..7eaf23a62a22 100644 --- a/sw/source/core/inc/UndoRedline.hxx +++ b/sw/source/core/inc/UndoRedline.hxx @@ -22,6 +22,7 @@ #include <memory> #include <undobj.hxx> +#include <tools/long.hxx> struct SwSortOptions; class SwRangeRedline; @@ -68,7 +69,7 @@ public: bool CanGrouping( const SwUndoRedlineDelete& rPrev ); // SwUndoTableCpyTable needs this information: - long NodeDiff() const { return m_nSttNode - m_nEndNode; } + tools::Long NodeDiff() const { return m_nSttNode - m_nEndNode; } sal_Int32 ContentStart() const { return m_nSttContent; } void SetRedlineText(const OUString & rText); diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx index b5e925e48fbf..15bb1dc85bea 100644 --- a/sw/source/core/inc/UndoTable.hxx +++ b/sw/source/core/inc/UndoTable.hxx @@ -21,6 +21,7 @@ #define INCLUDED_SW_SOURCE_CORE_INC_UNDOTABLE_HXX #include <o3tl/deleter.hxx> +#include <tools/long.hxx> #include <ndarr.hxx> #include <undobj.hxx> #include <set> @@ -176,7 +177,7 @@ class SwUndoTableNdsChg : public SwUndo }; std::unique_ptr< std::set<BoxMove> > m_pNewSttNds; std::unique_ptr<SwUndoSaveSections> m_pDelSects; - long m_nMin, m_nMax; // for redo of delete column + tools::Long m_nMin, m_nMax; // for redo of delete column sal_uLong m_nSttNode; sal_uInt16 m_nCount; bool m_bFlag; @@ -189,7 +190,7 @@ public: SwUndoTableNdsChg( SwUndoId UndoId, const SwSelBoxes& rBoxes, const SwTableNode& rTableNd, - long nMn, long nMx, + tools::Long nMn, tools::Long nMx, sal_uInt16 nCnt, bool bFlg, bool bSameHeight ); virtual ~SwUndoTableNdsChg() override; diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx index e98654ae4765..4e4aa9b016c3 100644 --- a/sw/source/core/inc/cellfrm.hxx +++ b/sw/source/core/inc/cellfrm.hxx @@ -60,7 +60,7 @@ public: // used for rowspan stuff: const SwCellFrame& FindStartEndOfRowSpanCell( bool bStart ) const; - long GetLayoutRowSpan() const; + tools::Long GetLayoutRowSpan() const; void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override; }; diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx index 2daec8fdd81a..3b85365d3668 100644 --- a/sw/source/core/inc/cntfrm.hxx +++ b/sw/source/core/inc/cntfrm.hxx @@ -92,7 +92,7 @@ public: inline SwContentFrame* GetNextContentFrame() const; inline SwContentFrame* GetPrevContentFrame() const; static bool CalcLowers(SwLayoutFrame & rLay, SwLayoutFrame const& rDontLeave, - long nBottom, bool bSkipRowSpanCells); + tools::Long nBottom, bool bSkipRowSpanCells); }; inline SwContentFrame* SwContentFrame::GetNextContentFrame() const diff --git a/sw/source/core/inc/dflyobj.hxx b/sw/source/core/inc/dflyobj.hxx index 8da47dafda1d..e0ace3274bf5 100644 --- a/sw/source/core/inc/dflyobj.hxx +++ b/sw/source/core/inc/dflyobj.hxx @@ -99,7 +99,7 @@ public: // we treat the size calculation completely on ourself here virtual const tools::Rectangle& GetCurrentBoundRect() const override; virtual const tools::Rectangle& GetLastBoundRect() const override; - virtual long GetRotateAngle() const override; + virtual tools::Long GetRotateAngle() const override; virtual void RecalcBoundRect() override; virtual void RecalcSnapRect() override; virtual const tools::Rectangle& GetSnapRect() const override; @@ -118,7 +118,7 @@ public: const Fraction& yFact, bool bUnsetRelative = true) override; virtual void Crop(const basegfx::B2DPoint& rRef, double fxFact, double fyFact) override; virtual void addCropHandles(SdrHdlList& rTarget) const override; - virtual void Rotate(const Point& rRef, long nAngle, double sn, double cs) override; + virtual void Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override; // FullDrag support virtual SdrObjectUniquePtr getFullDragClone() const override; diff --git a/sw/source/core/inc/drawfont.hxx b/sw/source/core/inc/drawfont.hxx index 410943c984d1..08152e3c7181 100644 --- a/sw/source/core/inc/drawfont.hxx +++ b/sw/source/core/inc/drawfont.hxx @@ -55,7 +55,7 @@ class SW_DLLPUBLIC SwDrawTextInfo SwFont *m_pFnt; SwUnderlineFont* m_pUnderFnt; TextFrameIndex* m_pHyphPos; - long m_nKanaDiff; + tools::Long m_nKanaDiff; TextFrameIndex m_nIdx; TextFrameIndex m_nLen; /// this is not a string index @@ -63,9 +63,9 @@ class SW_DLLPUBLIC SwDrawTextInfo sal_uInt16 m_nWidth; sal_uInt16 m_nAscent; sal_uInt16 m_nCompress; - long m_nSperren; - long m_nSpace; - long m_nKern; + tools::Long m_nSperren; + tools::Long m_nSpace; + tools::Long m_nKern; TextFrameIndex m_nNumberOfBlanks; sal_uInt8 m_nCursorBidiLevel; bool m_bBullet : 1; @@ -283,7 +283,7 @@ public: return m_nIdx + m_nLen; } - long GetKanaDiff() const + tools::Long GetKanaDiff() const { #ifdef DBG_UTIL OSL_ENSURE( m_bKana, "DrawTextInfo: Undefined kana difference" ); @@ -309,7 +309,7 @@ public: return m_nCompress; } - long GetSperren() const + tools::Long GetSperren() const { #ifdef DBG_UTIL OSL_ENSURE( m_bSperr, "DrawTextInfo: Undefined >Sperren<" ); @@ -317,12 +317,12 @@ public: return m_nSperren; } - long GetKern() const + tools::Long GetKern() const { return m_nKern; } - long GetSpace() const + tools::Long GetSpace() const { #ifdef DBG_UTIL OSL_ENSURE( m_bSpace, "DrawTextInfo: Undefined Spacing" ); @@ -471,7 +471,7 @@ public: #endif } - void SetKanaDiff( long nNew ) + void SetKanaDiff( tools::Long nNew ) { m_nKanaDiff = nNew; #ifdef DBG_UTIL @@ -492,12 +492,12 @@ public: #endif } - void SetKern( long nNew ) + void SetKern( tools::Long nNew ) { m_nKern = nNew; } - void SetSpace( long nNew ) + void SetSpace( tools::Long nNew ) { if( nNew < 0 ) { diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx index 5a6e4643bda2..82a67b9b5342 100644 --- a/sw/source/core/inc/flyfrms.hxx +++ b/sw/source/core/inc/flyfrms.hxx @@ -226,7 +226,7 @@ public: void RegistFlys(); //see layact.cxx - void AddRefOfst( long nOfst ) { m_aRef.AdjustY( nOfst ); } + void AddRefOfst( tools::Long nOfst ) { m_aRef.AdjustY( nOfst ); } // #i26791# virtual void MakeObjPos() override; diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx index f908ed62ec0d..61564de93e72 100644 --- a/sw/source/core/inc/fntcache.hxx +++ b/sw/source/core/inc/fntcache.hxx @@ -98,7 +98,7 @@ class SwFntObj : public SwCacheObj /// Cache of already calculated layout glyphs. std::map<SwTextGlyphsKey, SalLayoutGlyphs> m_aTextGlyphs; - static long nPixWidth; + static tools::Long nPixWidth; static MapMode *pPixMap; public: diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index ac5bc9570569..27622be75dbb 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -870,20 +870,20 @@ public: bool IsInDtor() const { return mbInDtor; } // No inline cause we need the function pointers - long GetTopMargin() const; - long GetBottomMargin() const; - long GetLeftMargin() const; - long GetRightMargin() const; - void SetTopBottomMargins( long, long ); - void SetLeftRightMargins( long, long ); - void SetRightLeftMargins( long, long ); - long GetPrtLeft() const; - long GetPrtBottom() const; - long GetPrtRight() const; - long GetPrtTop() const; - bool SetMinLeft( long ); - bool SetMaxBottom( long ); - bool SetMaxRight( long ); + tools::Long GetTopMargin() const; + tools::Long GetBottomMargin() const; + tools::Long GetLeftMargin() const; + tools::Long GetRightMargin() const; + void SetTopBottomMargins( tools::Long, tools::Long ); + void SetLeftRightMargins( tools::Long, tools::Long ); + void SetRightLeftMargins( tools::Long, tools::Long ); + tools::Long GetPrtLeft() const; + tools::Long GetPrtBottom() const; + tools::Long GetPrtRight() const; + tools::Long GetPrtTop() const; + bool SetMinLeft( tools::Long ); + bool SetMaxBottom( tools::Long ); + bool SetMaxRight( tools::Long ); void MakeBelowPos( const SwFrame*, const SwFrame*, bool ); void MakeLeftPos( const SwFrame*, const SwFrame*, bool ); void MakeRightPos( const SwFrame*, const SwFrame*, bool ); @@ -1259,10 +1259,10 @@ public: }; typedef long (SwFrame::*SwFrameGet)() const; -typedef bool (SwFrame::*SwFrameMax)( long ); +typedef bool (SwFrame::*SwFrameMax)( tools::Long ); typedef void (SwFrame::*SwFrameMakePos)( const SwFrame*, const SwFrame*, bool ); -typedef long (*SwOperator)( long, long ); -typedef void (SwFrame::*SwFrameSet)( long, long ); +typedef long (*SwOperator)( tools::Long, tools::Long ); +typedef void (SwFrame::*SwFrameSet)( tools::Long, tools::Long ); struct SwRectFnCollection { @@ -1352,58 +1352,58 @@ public: || (rRect1.*m_fnRect->fnGetLeft)() != (rRect2.*m_fnRect->fnGetLeft)()); } - long GetTop (const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetTop) (); } - long GetBottom(const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetBottom)(); } - long GetLeft (const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetLeft) (); } - long GetRight (const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetRight) (); } - long GetWidth (const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetWidth) (); } - long GetHeight(const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetHeight)(); } + tools::Long GetTop (const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetTop) (); } + tools::Long GetBottom(const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetBottom)(); } + tools::Long GetLeft (const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetLeft) (); } + tools::Long GetRight (const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetRight) (); } + tools::Long GetWidth (const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetWidth) (); } + tools::Long GetHeight(const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetHeight)(); } Point GetPos (const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetPos) (); } Size GetSize (const SwRect& rRect) const { return (rRect.*m_fnRect->fnGetSize) (); } - void SetTop (SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnSetTop) (nNew); } - void SetBottom(SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnSetBottom)(nNew); } - void SetLeft (SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnSetLeft) (nNew); } - void SetRight (SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnSetRight) (nNew); } - void SetWidth (SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnSetWidth) (nNew); } - void SetHeight(SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnSetHeight)(nNew); } - - void SubTop (SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnSubTop) (nNew); } - void AddBottom(SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnAddBottom)(nNew); } - void SubLeft (SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnSubLeft) (nNew); } - void AddRight (SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnAddRight) (nNew); } - void AddWidth (SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnAddWidth) (nNew); } - void AddHeight(SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnAddHeight)(nNew); } - - void SetPosX(SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnSetPosX)(nNew); } - void SetPosY(SwRect& rRect, long nNew) const { (rRect.*m_fnRect->fnSetPosY)(nNew); } - - long GetTopMargin (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetTopMargin) (); } - long GetBottomMargin(const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetBottomMargin)(); } - long GetLeftMargin (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetLeftMargin) (); } - long GetRightMargin (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetRightMargin) (); } - void SetXMargins(SwFrame& rFrame, long nLeft, long nRight) const { (rFrame.*m_fnRect->fnSetXMargins)(nLeft, nRight); } - void SetYMargins(SwFrame& rFrame, long nTop, long nBottom) const { (rFrame.*m_fnRect->fnSetYMargins)(nTop, nBottom); } - long GetPrtTop (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetPrtTop) (); } - long GetPrtBottom (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetPrtBottom) (); } - long GetPrtLeft (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetPrtLeft) (); } - long GetPrtRight (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetPrtRight) (); } - long TopDist (const SwRect& rRect, long nPos) const { return (rRect.*m_fnRect->fnTopDist) (nPos); } - long BottomDist(const SwRect& rRect, long nPos) const { return (rRect.*m_fnRect->fnBottomDist) (nPos); } - long LeftDist (const SwRect& rRect, long nPos) const { return (rRect.*m_fnRect->fnLeftDist) (nPos); } - long RightDist (const SwRect& rRect, long nPos) const { return (rRect.*m_fnRect->fnRightDist) (nPos); } - void SetLimit (SwFrame& rFrame, long nNew) const { (rFrame.*m_fnRect->fnSetLimit) (nNew); } - bool OverStep (const SwRect& rRect, long nPos) const { return (rRect.*m_fnRect->fnOverStep) (nPos); } + void SetTop (SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnSetTop) (nNew); } + void SetBottom(SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnSetBottom)(nNew); } + void SetLeft (SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnSetLeft) (nNew); } + void SetRight (SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnSetRight) (nNew); } + void SetWidth (SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnSetWidth) (nNew); } + void SetHeight(SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnSetHeight)(nNew); } + + void SubTop (SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnSubTop) (nNew); } + void AddBottom(SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnAddBottom)(nNew); } + void SubLeft (SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnSubLeft) (nNew); } + void AddRight (SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnAddRight) (nNew); } + void AddWidth (SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnAddWidth) (nNew); } + void AddHeight(SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnAddHeight)(nNew); } + + void SetPosX(SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnSetPosX)(nNew); } + void SetPosY(SwRect& rRect, tools::Long nNew) const { (rRect.*m_fnRect->fnSetPosY)(nNew); } + + tools::Long GetTopMargin (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetTopMargin) (); } + tools::Long GetBottomMargin(const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetBottomMargin)(); } + tools::Long GetLeftMargin (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetLeftMargin) (); } + tools::Long GetRightMargin (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetRightMargin) (); } + void SetXMargins(SwFrame& rFrame, tools::Long nLeft, tools::Long nRight) const { (rFrame.*m_fnRect->fnSetXMargins)(nLeft, nRight); } + void SetYMargins(SwFrame& rFrame, tools::Long nTop, tools::Long nBottom) const { (rFrame.*m_fnRect->fnSetYMargins)(nTop, nBottom); } + tools::Long GetPrtTop (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetPrtTop) (); } + tools::Long GetPrtBottom (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetPrtBottom) (); } + tools::Long GetPrtLeft (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetPrtLeft) (); } + tools::Long GetPrtRight (const SwFrame& rFrame) const { return (rFrame.*m_fnRect->fnGetPrtRight) (); } + tools::Long TopDist (const SwRect& rRect, tools::Long nPos) const { return (rRect.*m_fnRect->fnTopDist) (nPos); } + tools::Long BottomDist(const SwRect& rRect, tools::Long nPos) const { return (rRect.*m_fnRect->fnBottomDist) (nPos); } + tools::Long LeftDist (const SwRect& rRect, tools::Long nPos) const { return (rRect.*m_fnRect->fnLeftDist) (nPos); } + tools::Long RightDist (const SwRect& rRect, tools::Long nPos) const { return (rRect.*m_fnRect->fnRightDist) (nPos); } + void SetLimit (SwFrame& rFrame, tools::Long nNew) const { (rFrame.*m_fnRect->fnSetLimit) (nNew); } + bool OverStep (const SwRect& rRect, tools::Long nPos) const { return (rRect.*m_fnRect->fnOverStep) (nPos); } void SetPos(SwRect& rRect, const Point& rNew) const { (rRect.*m_fnRect->fnSetPos)(rNew); } void MakePos(SwFrame& rFrame, const SwFrame* pUp, const SwFrame* pPrv, bool bNotify) const { (rFrame.*m_fnRect->fnMakePos)(pUp, pPrv, bNotify); } - long XDiff(long n1, long n2) const { return (m_fnRect->fnXDiff) (n1, n2); } - long YDiff(long n1, long n2) const { return (m_fnRect->fnYDiff) (n1, n2); } - long XInc (long n1, long n2) const { return (m_fnRect->fnXInc) (n1, n2); } - long YInc (long n1, long n2) const { return (m_fnRect->fnYInc) (n1, n2); } + tools::Long XDiff(tools::Long n1, tools::Long n2) const { return (m_fnRect->fnXDiff) (n1, n2); } + tools::Long YDiff(tools::Long n1, tools::Long n2) const { return (m_fnRect->fnYDiff) (n1, n2); } + tools::Long XInc (tools::Long n1, tools::Long n2) const { return (m_fnRect->fnXInc) (n1, n2); } + tools::Long YInc (tools::Long n1, tools::Long n2) const { return (m_fnRect->fnYInc) (n1, n2); } - void SetLeftAndWidth(SwRect& rRect, long nLeft, long nWidth) const { (rRect.*m_fnRect->fnSetLeftAndWidth)(nLeft, nWidth); } - void SetTopAndHeight(SwRect& rRect, long nTop, long nHeight) const { (rRect.*m_fnRect->fnSetTopAndHeight)(nTop, nHeight); } + void SetLeftAndWidth(SwRect& rRect, tools::Long nLeft, tools::Long nWidth) const { (rRect.*m_fnRect->fnSetLeftAndWidth)(nLeft, nWidth); } + void SetTopAndHeight(SwRect& rRect, tools::Long nTop, tools::Long nHeight) const { (rRect.*m_fnRect->fnSetTopAndHeight)(nTop, nHeight); } private: bool m_bVert; diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index 027fd6b6461d..9e4565f508cf 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -157,7 +157,7 @@ extern bool bSetCompletePaintOnInvalidate; // for table settings via keyboard SwTwips CalcRowRstHeight( SwLayoutFrame *pRow ); -long CalcHeightWithFlys( const SwFrame *pFrame ); +tools::Long CalcHeightWithFlys( const SwFrame *pFrame ); namespace sw { @@ -392,8 +392,8 @@ public: inline sal_uInt16 CalcTop() const; inline sal_uInt16 CalcBottom() const; inline sal_uInt16 CalcLineSpacing() const; - long CalcLeft( const SwFrame *pCaller ) const; - long CalcRight( const SwFrame *pCaller ) const; + tools::Long CalcLeft( const SwFrame *pCaller ) const; + tools::Long CalcRight( const SwFrame *pCaller ) const; inline bool IsLine() const; diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx index 990c0e4b88f0..44dfa7feb4d8 100644 --- a/sw/source/core/inc/layact.hxx +++ b/sw/source/core/inc/layact.hxx @@ -103,7 +103,7 @@ class SwLayAction sal_uInt32 m_nCallCount; // calling FormatLayoutTab on the same page void PaintContent( const SwContentFrame *, const SwPageFrame *, - const SwRect &rOldRect, long nOldBottom ); + const SwRect &rOldRect, tools::Long nOldBottom ); bool PaintWithoutFlys( const SwRect &, const SwContentFrame *, const SwPageFrame * ); inline bool PaintContent_( const SwContentFrame *, const SwPageFrame *, diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx index 1a725dc3477e..3f73602e6bfa 100644 --- a/sw/source/core/inc/layfrm.hxx +++ b/sw/source/core/inc/layfrm.hxx @@ -56,7 +56,7 @@ protected: virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) override; virtual SwTwips GrowFrame ( SwTwips, bool bTst = false, bool bInfo = false ) override; - long CalcRel( const SwFormatFrameSize &rSz ) const; + tools::Long CalcRel( const SwFormatFrameSize &rSz ) const; public: // --> #i28701# diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx index a9f642c1f03e..4a337b168230 100644 --- a/sw/source/core/inc/pagefrm.hxx +++ b/sw/source/core/inc/pagefrm.hxx @@ -106,7 +106,7 @@ protected: virtual void SwClientNotify(const SwModify&, const SfxHint&) override; /// Calculate the content height of a page (without columns). - size_t GetContentHeight(const long nTop, const long nBottom) const; + size_t GetContentHeight(const tools::Long nTop, const tools::Long nBottom) const; public: SwPageFrame( SwFrameFormat*, SwFrame*, SwPageDesc* ); diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index a1d2622f3c11..74a015c90d53 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -93,7 +93,7 @@ class SAL_DLLPUBLIC_RTTI SwRootFrame: public SwLayoutFrame // the rectangle is extended to the top/bottom/left/right // for pages located at the outer margins SwRect maPagesArea; // the area covered by the pages - long mnViewWidth; // the current page layout bases on this view width + tools::Long mnViewWidth; // the current page layout bases on this view width sal_uInt16 mnColumns; // the current page layout bases on this number of columns bool mbBookMode; // the current page layout is in book view bool mbSidebarChanged; // the notes sidebar state has changed @@ -124,7 +124,7 @@ class SAL_DLLPUBLIC_RTTI SwRootFrame: public SwLayoutFrame * mnBrowseWidth is the outer margin of the object most to the right. * The page's right edge should not be smaller than this value. */ - long mnBrowseWidth; + tools::Long mnBrowseWidth; /// If we only have to format one ContentFrame, its in mpTurbo const SwContentFrame *mpTurbo; @@ -362,7 +362,7 @@ public: static void SetNoVirDev(const bool bNew) { s_isNoVirDev = bNew; } - inline long GetBrowseWidth() const; + inline tools::Long GetBrowseWidth() const; inline void InvalidateBrowseWidth(); bool IsNewLayout() const { return mbIsNewLayout; } @@ -418,7 +418,7 @@ public: void SetHideRedlines(bool); }; -inline long SwRootFrame::GetBrowseWidth() const +inline tools::Long SwRootFrame::GetBrowseWidth() const { if ( !mbBrowseWidthValid ) const_cast<SwRootFrame*>(this)->ImplCalcBrowseWidth(); diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx index ead531c5c0c3..7e660309aa54 100644 --- a/sw/source/core/inc/scriptinfo.hxx +++ b/sw/source/core/inc/scriptinfo.hxx @@ -26,6 +26,7 @@ #include <rtl/ustrbuf.hxx> #include <o3tl/typed_flags_set.hxx> #include <i18nlangtag/lang.h> +#include <tools/long.hxx> #include "TextFrameIndex.hxx" class SwTextNode; @@ -269,7 +270,7 @@ public: // HIDDEN TEXT STUFF END // modifies the kerning array according to a given compress value - long Compress( long* pKernArray, TextFrameIndex nIdx, TextFrameIndex nLen, + tools::Long Compress( tools::Long* pKernArray, TextFrameIndex nIdx, TextFrameIndex nLen, const sal_uInt16 nCompress, const sal_uInt16 nFontHeight, const bool bCentered, Point* pPoint = nullptr ) const; @@ -290,8 +291,8 @@ public: The value which has to be added to a kashida opportunity. @return The number of kashida opportunities in the given range */ - sal_Int32 KashidaJustify( long* pKernArray, long* pScrArray, - TextFrameIndex nStt, TextFrameIndex nLen, long nSpaceAdd = 0) const; + sal_Int32 KashidaJustify( tools::Long* pKernArray, tools::Long* pScrArray, + TextFrameIndex nStt, TextFrameIndex nLen, tools::Long nSpaceAdd = 0) const; /** Clears array of kashidas marked as invalid */ @@ -363,19 +364,19 @@ public: The value which has to be added to the cells. @return The number of extra spaces in the given range */ - static TextFrameIndex ThaiJustify( const OUString& rText, long* pKernArray, - long* pScrArray, TextFrameIndex nIdx, + static TextFrameIndex ThaiJustify( const OUString& rText, tools::Long* pKernArray, + tools::Long* pScrArray, TextFrameIndex nIdx, TextFrameIndex nLen, TextFrameIndex nNumberOfBlanks = TextFrameIndex(0), - long nSpaceAdd = 0 ); + tools::Long nSpaceAdd = 0 ); static TextFrameIndex CountCJKCharacters(const OUString &rText, TextFrameIndex nPos, TextFrameIndex nEnd, LanguageType aLang); - static void CJKJustify( const OUString& rText, long* pKernArray, - long* pScrArray, TextFrameIndex nStt, + static void CJKJustify( const OUString& rText, tools::Long* pKernArray, + tools::Long* pScrArray, TextFrameIndex nStt, TextFrameIndex nLen, LanguageType aLang, - long nSpaceAdd, bool bIsSpaceStop ); + tools::Long nSpaceAdd, bool bIsSpaceStop ); /// return a frame for the node, ScriptInfo is its member... /// (many clients need both frame and SI, and both have to match) diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx index 92b678c07e52..fba72413c829 100644 --- a/sw/source/core/inc/swcache.hxx +++ b/sw/source/core/inc/swcache.hxx @@ -47,6 +47,7 @@ #include <vector> #include <rtl/string.hxx> +#include <tools/long.hxx> class SwCacheObj; @@ -65,19 +66,19 @@ class SwCache #ifdef DBG_UTIL OString m_aName; - long m_nAppend; /// number of entries appended - long m_nInsertFree; /// number of entries inserted on freed position - long m_nReplace; /// number of LRU replacements - long m_nGetSuccess; - long m_nGetFail; - long m_nToTop; /// number of reordering (LRU) - long m_nDelete; /// number of explicit deletes - long m_nGetSeek; /// number of gets without index - long m_nAverageSeekCnt; /// number of seeks for all gets without index - long m_nFlushCnt; /// number of flush calls - long m_nFlushedObjects; - long m_nIncreaseMax; /// number of cache size increases - long m_nDecreaseMax; /// number of cache size decreases + tools::Long m_nAppend; /// number of entries appended + tools::Long m_nInsertFree; /// number of entries inserted on freed position + tools::Long m_nReplace; /// number of LRU replacements + tools::Long m_nGetSuccess; + tools::Long m_nGetFail; + tools::Long m_nToTop; /// number of reordering (LRU) + tools::Long m_nDelete; /// number of explicit deletes + tools::Long m_nGetSeek; /// number of gets without index + tools::Long m_nAverageSeekCnt; /// number of seeks for all gets without index + tools::Long m_nFlushCnt; /// number of flush calls + tools::Long m_nFlushedObjects; + tools::Long m_nIncreaseMax; /// number of cache size increases + tools::Long m_nDecreaseMax; /// number of cache size decreases void Check(); #endif diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index 7753f0373a9b..96d1fbe187b5 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -277,7 +277,7 @@ public: sal_uInt8 GetPropr() const { return m_aSub[m_nActual].GetPropr(); } FontItalic GetItalic() const { return m_aSub[m_nActual].GetItalic(); } LanguageType GetLanguage() const { return m_aSub[m_nActual].GetLanguage(); } - long GetHeight() const { return m_aSub[m_nActual].GetFontSize().Height(); } + tools::Long GetHeight() const { return m_aSub[m_nActual].GetFontSize().Height(); } FontWeight GetWeight() const { return m_aSub[m_nActual].GetWeight(); } FontEmphasisMark GetEmphasisMark() const { return m_aSub[m_nActual].GetEmphasisMark(); } @@ -290,7 +290,7 @@ public: { return m_aSub[nWhich].GetLanguage(); } rtl_TextEncoding GetCharSet( const SwFontScript nWhich ) const { return m_aSub[nWhich].GetCharSet(); } - long GetHeight( const SwFontScript nWhich ) const + tools::Long GetHeight( const SwFontScript nWhich ) const { return m_aSub[nWhich].GetFontSize().Height(); } // makes the logical font be effective in the OutputDevice @@ -298,7 +298,7 @@ public: TextFrameIndex GetCapitalBreak( SwViewShell const* pSh, const OutputDevice* pOut, const SwScriptInfo* pScript, const OUString& rText, - long nTextWidth, TextFrameIndex nIdx, TextFrameIndex nLen); + tools::Long nTextWidth, TextFrameIndex nIdx, TextFrameIndex nLen); void DoOnCapitals( SwDoCapitals &rDo ) { m_aSub[m_nActual].DoOnCapitals( rDo ); } @@ -306,7 +306,7 @@ public: Size GetTextSize_( SwDrawTextInfo& rInf ) { rInf.SetFont( this ); return m_aSub[m_nActual].GetTextSize_( rInf ); } - TextFrameIndex GetTextBreak( SwDrawTextInfo const & rInf, long nTextWidth ); + TextFrameIndex GetTextBreak( SwDrawTextInfo const & rInf, tools::Long nTextWidth ); TextFrameIndex GetModelPositionForViewPoint_( SwDrawTextInfo& rInf ) { return m_aSub[m_nActual].GetModelPositionForViewPoint_( rInf ); } diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index 325515755fe8..d0eb807297a1 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -212,8 +212,8 @@ public: bool CalcFlyOffsets( SwTwips& rUpper, - long& rLeftOffset, - long& rRightOffset ) const; + tools::Long& rLeftOffset, + tools::Long& rRightOffset ) const; SwTwips CalcHeightOfFirstContentLine() const; diff --git a/sw/source/core/inc/tblrwcl.hxx b/sw/source/core/inc/tblrwcl.hxx index 9b059eea61c8..095c5a3c458c 100644 --- a/sw/source/core/inc/tblrwcl.hxx +++ b/sw/source/core/inc/tblrwcl.hxx @@ -162,7 +162,7 @@ public: const SwFrameFormat& GetOldFormat() const { return *m_pOldFormat; } - SwFrameFormat* GetFormat( long nWidth ) const; + SwFrameFormat* GetFormat( tools::Long nWidth ) const; SwFrameFormat* GetFormat( const SfxPoolItem& rItem ) const; void AddFormat( SwFrameFormat& rFormat ); /// @returns true, if we can delete @@ -181,7 +181,7 @@ public: SwShareBoxFormats() {} ~SwShareBoxFormats(); - SwFrameFormat* GetFormat( const SwFrameFormat& rFormat, long nWidth ) const; + SwFrameFormat* GetFormat( const SwFrameFormat& rFormat, tools::Long nWidth ) const; SwFrameFormat* GetFormat( const SwFrameFormat& rFormat, const SfxPoolItem& ) const; void AddFormat( const SwFrameFormat& rOld, SwFrameFormat& rNew ); diff --git a/sw/source/core/inc/txtfly.hxx b/sw/source/core/inc/txtfly.hxx index c8c645e543e1..f6d5f8f50dd2 100644 --- a/sw/source/core/inc/txtfly.hxx +++ b/sw/source/core/inc/txtfly.hxx @@ -58,9 +58,9 @@ class SwContourCache std::unique_ptr<TextRanger> mxTextRanger; }; std::vector<CacheItem> mvItems; - long mnPointCount; + tools::Long mnPointCount; SwRect ContourRect( const SwFormat* pFormat, const SdrObject* pObj, - const SwTextFrame* pFrame, const SwRect &rLine, const long nXPos, + const SwTextFrame* pFrame, const SwRect &rLine, const tools::Long nXPos, const bool bRight ); public: @@ -80,7 +80,7 @@ public: static SwRect CalcBoundRect( const SwAnchoredObject* pAnchoredObj, const SwRect &rLine, const SwTextFrame* pFrame, - const long nXPos, + const tools::Long nXPos, const bool bRight ); }; @@ -124,8 +124,8 @@ class SwTextFly const SwTextFrame * m_pMaster; std::unique_ptr<SwAnchoredObjList> mpAnchoredObjList; - long m_nMinBottom; - long m_nNextTop; /// Stores the upper edge of the "next" frame + tools::Long m_nMinBottom; + tools::Long m_nNextTop; /// Stores the upper edge of the "next" frame sal_uLong m_nCurrFrameNodeIndex; bool m_bOn : 1; @@ -230,8 +230,8 @@ public: const SwTextFrame* GetMaster() const; // This temporary variable needs to be manipulated in const methods - long GetNextTop() const; - void SetNextTop( long nNew ) const; + tools::Long GetNextTop() const; + void SetNextTop( tools::Long nNew ) const; /** Determines the demanded rectangle for an anchored object, @@ -343,12 +343,12 @@ inline const SwTextFrame* SwTextFly::GetMaster() const return m_pMaster ? m_pMaster : const_cast<SwTextFly*>(this)->GetMaster_(); } -inline long SwTextFly::GetNextTop() const +inline tools::Long SwTextFly::GetNextTop() const { return m_nNextTop; } -inline void SwTextFly::SetNextTop( long nNew ) const +inline void SwTextFly::SetNextTop( tools::Long nNew ) const { const_cast<SwTextFly*>(this)->m_nNextTop = nNew; } diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index 577fa8deea26..389adb8c92ad 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -162,7 +162,7 @@ class SW_DLLPUBLIC SwTextFrame: public SwContentFrame /// will still be set; GetFormatted() is the function that forces /// recreation of the SwLineLayout by Format() if necessary. static SwCache *s_pTextCache; - static constexpr long nMinPrtLine = 0; // This Line must not be underrun when printing + static constexpr tools::Long nMinPrtLine = 0; // This Line must not be underrun when printing // Hack for table cells stretching multiple pages sal_uLong mnAllLines :24; // Line count for the Paint (including nThisLines) @@ -205,8 +205,8 @@ class SW_DLLPUBLIC SwTextFrame: public SwContentFrame // Evaluates the Preps in Format() bool CalcPreps(); void PrepWidows( const sal_uInt16 nNeed, bool bNotify ); - void InvalidateRange_( const SwCharRange &, const long = 0); - inline void InvalidateRange( const SwCharRange &, const long = 0); + void InvalidateRange_( const SwCharRange &, const tools::Long = 0); + inline void InvalidateRange( const SwCharRange &, const tools::Long = 0); // WidowsAndOrphans, AdjustFrame, AdjustFollow void FormatAdjust( SwTextFormatter &rLine, WidowsAndOrphans &rFrameBreak, @@ -599,7 +599,7 @@ public: static SwCache *GetTextCache() { return s_pTextCache; } static void SetTextCache( SwCache *pNew ) { s_pTextCache = pNew; } - static long GetMinPrtLine() { return nMinPrtLine; } + static tools::Long GetMinPrtLine() { return nMinPrtLine; } sal_uInt16 GetCacheIdx() const { return mnCacheIndex; } void SetCacheIdx( const sal_uInt16 nNew ) { mnCacheIndex = nNew; } @@ -637,7 +637,7 @@ public: * @param _bNoPropLineSpacing: control, whether the value of a * proportional line spacing is returned or not */ - long GetLineSpace( const bool _bNoPropLineSpacing = false ) const; + tools::Long GetLineSpace( const bool _bNoPropLineSpacing = false ) const; /// Returns the first line height sal_uInt16 FirstLineHeight() const; @@ -687,7 +687,7 @@ public: * Calculates the limit value when switching from * horizontal to vertical layout */ - long SwitchHorizontalToVertical( long nLimit ) const; + tools::Long SwitchHorizontalToVertical( tools::Long nLimit ) const; /** * Calculates the coordinates of a rectangle when switching from @@ -705,7 +705,7 @@ public: * Calculates the a limit value when switching from * vertical to horizontal layout */ - long SwitchVerticalToHorizontal( long nLimit ) const; + tools::Long SwitchVerticalToHorizontal( tools::Long nLimit ) const; /** * Calculates the coordinates of a rectangle when switching from |