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/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/inc')
36 files changed, 197 insertions, 192 deletions
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx index e55cda17c41c..d384d200d867 100644 --- a/sw/inc/AnnotationWin.hxx +++ b/sw/inc/AnnotationWin.hxx @@ -83,14 +83,14 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window bool IsProtected() const; void SetSize( const Size& rNewSize ); - void SetPosSizePixelRect( long nX, - long nY, - long nWidth, - long nHeight, + void SetPosSizePixelRect( tools::Long nX, + tools::Long nY, + tools::Long nWidth, + tools::Long nHeight, const SwRect& aAnchorRect, - const long PageBorder); + const tools::Long PageBorder); void SetPosAndSize(); - void TranslateTopPosition(const long aAmount); + void TranslateTopPosition(const tools::Long aAmount); void CheckMetaText(); Point const & GetAnchorPos() { return mAnchorRect.Pos(); } @@ -110,7 +110,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window ::sw::sidebarwindows::ShadowOverlayObject* Shadow() { return mpShadow.get();} ::sw::overlay::OverlayRanges* TextRange() { return mpTextRangeOverlay.get();} - long GetPostItTextHeight(); + tools::Long GetPostItTextHeight(); void SwitchToPostIt(sal_uInt16 aDirection); void SwitchToFieldPos(); @@ -118,7 +118,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window void ExecuteCommand(sal_uInt16 nSlot); void InitControls(); void DoResize(); - void ResizeIfNecessary(long aOldHeight, long aNewHeight); + void ResizeIfNecessary(tools::Long aOldHeight, tools::Long aNewHeight); void SetScrollbar(); void SetVirtualPosSize( const Point& aPoint, const Size& aSize); @@ -254,7 +254,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window tools::Rectangle mPosSize; SwRect mAnchorRect; - long mPageBorder; + tools::Long mPageBorder; bool mbAnchorRectChanged; bool mbResolvedStateUpdated; diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx index 6aa5867377eb..f5a6d5806a13 100644 --- a/sw/inc/EnhancedPDFExportHelper.hxx +++ b/sw/inc/EnhancedPDFExportHelper.hxx @@ -117,7 +117,7 @@ struct Por_Info struct lt_TableColumn { - bool operator()( long nVal1, long nVal2 ) const + bool operator()( tools::Long nVal1, tools::Long nVal2 ) const { return nVal1 + ( MINLAY - 1 ) < nVal2; } diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 6b3d1161cda3..bbcb862b0190 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -63,7 +63,7 @@ struct SwPostItPageItem { bool bScrollbar; sw::sidebarwindows::SidebarPosition eSidebarPosition; - long lOffset; + tools::Long lOffset; SwRect mPageRect; std::vector<SwSidebarItem*> mvSidebarItems; SwPostItPageItem(): bScrollbar(false), eSidebarPosition( sw::sidebarwindows::SidebarPosition::LEFT ), lOffset(0) @@ -132,7 +132,7 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr final : public SfxListener bool mbWaitingForCalcRects; VclPtr<sw::annotation::SwAnnotationWin> mpActivePostIt; bool mbLayout; - long mbLayoutHeight; + tools::Long mbLayoutHeight; bool mbLayouting; bool mbReadOnly; bool mbDeleteNote; @@ -147,12 +147,12 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr final : public SfxListener void AddPostIts(bool bCheckExistence = true,bool bFocus = true); void RemoveSidebarWin(); void PreparePageContainer(); - void Scroll(const long lScroll,const unsigned long aPage ); + void Scroll(const tools::Long lScroll,const unsigned long aPage ); void AutoScroll(const sw::annotation::SwAnnotationWin* pPostIt,const unsigned long aPage ); bool ScrollbarHit(const unsigned long aPage,const Point &aPoint); bool LayoutByPage( std::vector<sw::annotation::SwAnnotationWin*> &aVisiblePostItList, const tools::Rectangle& rBorder, - long lNeededHeight); + tools::Long lNeededHeight); void CheckForRemovedPostIts(); bool ArrowEnabled(sal_uInt16 aDirection,unsigned long aPage) const; bool BorderOverPageBorder(unsigned long aPage) const; @@ -228,7 +228,7 @@ class SAL_DLLPUBLIC_RTTI SwPostItMgr final : public SfxListener sw::annotation::SwAnnotationWin* GetNextPostIt( sal_uInt16 aDirection, sw::annotation::SwAnnotationWin* aPostIt); - long GetNextBorder(); + tools::Long GetNextBorder(); sw::annotation::SwAnnotationWin* GetActiveSidebarWin() { return mpActivePostIt; } void SetActiveSidebarWin( sw::annotation::SwAnnotationWin* p); diff --git a/sw/inc/ToxTabStopTokenHandler.hxx b/sw/inc/ToxTabStopTokenHandler.hxx index 5282f6897aaf..158c2129b0ef 100644 --- a/sw/inc/ToxTabStopTokenHandler.hxx +++ b/sw/inc/ToxTabStopTokenHandler.hxx @@ -97,7 +97,7 @@ private: * * This is the fallback method to determine the position of a tab stop. */ - long + tools::Long CalculatePageMarginFromPageDescription(const SwTextNode& targetNode) const; sal_uInt32 mIndexOfSectionNode; diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index 29e5fbfd3303..58f758706cbf 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -264,7 +264,7 @@ public: virtual bool ReplaceChild ( ::accessibility::AccessibleShape* pCurrentChild, const css::uno::Reference< css::drawing::XShape >& _rxShape, - const long _nIndex, + const tools::Long _nIndex, const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo ) override; virtual ::accessibility::AccessibleControlShape* GetAccControlShapeFromModel diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx index bb65029c97f2..5309602f9ef0 100644 --- a/sw/inc/anchoredobject.hxx +++ b/sw/inc/anchoredobject.hxx @@ -268,7 +268,7 @@ class SW_DLLPUBLIC SwAnchoredObject const SwRect& GetLastCharRect() const { return maLastCharRect;} SwTwips GetRelCharX( const SwFrame* pFrame ) const; SwTwips GetRelCharY( const SwFrame* pFrame ) const; - void AddLastCharY( long nDiff ); + void AddLastCharY( tools::Long nDiff ); void ResetLastCharRectHeight(); // accessor to member <nmLastTopOfLine> diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx index b7bb83af26a8..dee45a3cbc1d 100644 --- a/sw/inc/calc.hxx +++ b/sw/inc/calc.hxx @@ -26,6 +26,7 @@ #include <unotools/syslocale.hxx> #include <rtl/ustrbuf.hxx> #include <tools/solar.h> +#include <tools/long.hxx> #include "swdllapi.h" class CharClass; @@ -112,7 +113,7 @@ class SwSbxValue final : public SbxValue bool m_bDBvalue; public: // always default to a number. otherwise it will become a SbxEMPTY - SwSbxValue( long n = 0 ) : m_bVoid(false), m_bDBvalue(false) { PutLong( n ); } + SwSbxValue( tools::Long n = 0 ) : m_bVoid(false), m_bDBvalue(false) { PutLong( n ); } SwSbxValue( const double& rD ) : m_bVoid(false), m_bDBvalue(false) { PutDouble( rD ); } bool GetBool() const; diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index d6888bcac2cb..e4d47805a1bf 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -184,9 +184,9 @@ private: SwNodeIndex* m_pBoxIdx; ///< for recognizing of the changed SwTableBox* m_pBoxPtr; ///< table row - long m_nUpDownX; /**< try to move the cursor on up/down always + tools::Long m_nUpDownX; /**< try to move the cursor on up/down always in the same column */ - long m_nLeftFramePos; + tools::Long m_nLeftFramePos; sal_uLong m_nCurrentNode; // save CursorPos at Start-Action sal_Int32 m_nCurrentContent; SwNodeType m_nCurrentNdTyp; @@ -344,7 +344,7 @@ public: void EndAction( const bool bIdleEnd = false, const bool DoSetPosX = false ); // basic cursor travelling - long GetUpDownX() const { return m_nUpDownX; } + tools::Long GetUpDownX() const { return m_nUpDownX; } bool Left( sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual = false ) { return LeftRight( true, nCnt, nMode, bAllowVisual ); } @@ -680,7 +680,7 @@ public: sal_uInt16 nSeqNo ); // get the nth character from the start or end of the current selection - sal_Unicode GetChar( bool bEnd = true, long nOffset = 0 ); + sal_Unicode GetChar( bool bEnd = true, tools::Long nOffset = 0 ); bool ExtendSelection( bool bEnd = true, sal_Int32 nCount = 1 ); // Place only the visible cursor at the given position in the document. diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx index 5d95036246a3..4fabaff6c253 100644 --- a/sw/inc/dbfld.hxx +++ b/sw/inc/dbfld.hxx @@ -31,7 +31,7 @@ class SW_DLLPUBLIC SwDBFieldType final : public SwValueFieldType SwDBData m_aDBData; OUString m_sName; ///< only used in ::GetName() ! OUString m_sColumn; - long m_nRefCnt; + tools::Long m_nRefCnt; public: @@ -265,7 +265,7 @@ public: // Database field. class SW_DLLPUBLIC SwDBSetNumberField final : public SwDBNameInfField { - long m_nNumber; + tools::Long m_nNumber; public: SwDBSetNumberField(SwDBSetNumberFieldType*, const SwDBData& rDBData, sal_uInt32 nFormat = 0); @@ -273,16 +273,16 @@ public: virtual std::unique_ptr<SwField> Copy() const override; void Evaluate(const SwDoc&); - inline long GetSetNumber() const; - inline void SetSetNumber(long nNum); + inline tools::Long GetSetNumber() const; + inline void SetSetNumber(tools::Long nNum); virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; }; -inline long SwDBSetNumberField::GetSetNumber() const +inline tools::Long SwDBSetNumberField::GetSetNumber() const { return m_nNumber; } -inline void SwDBSetNumberField::SetSetNumber(long nNum) +inline void SwDBSetNumberField::SetSetNumber(tools::Long nNum) { m_nNumber = nNum; } #endif // INCLUDED_SW_INC_DBFLD_HXX diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index 26c7fee7432c..94fd5ba3861f 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -21,6 +21,7 @@ #include <rtl/ustring.hxx> #include <tools/solar.h> +#include <tools/long.hxx> #include <i18nlangtag/lang.h> #include <com/sun/star/util/Date.hpp> #include "swdllapi.h" @@ -108,7 +109,7 @@ struct SwDSParam : public SwDBData css::uno::Sequence< css::uno::Any > aSelection; bool bScrollable; bool bEndOfDB; - long nSelectionIndex; + tools::Long nSelectionIndex; SwDSParam(const SwDBData& rData) : SwDBData(rData), diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index 09fb15b6a8fd..1082ebc70d94 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -264,14 +264,14 @@ class SwDrawVirtObj final : public SdrVirtObj virtual void AddToHdlList(SdrHdlList& rHdlList) const override; virtual void NbcMove(const Size& rSiz) override; virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override; - virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override; + virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override; virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override; - virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override; + virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override; virtual void Move(const Size& rSiz) override; virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative = true) 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; virtual void Mirror(const Point& rRef1, const Point& rRef2) override; - virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override; + virtual void Shear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override; virtual void RecalcSnapRect() override; virtual const tools::Rectangle& GetSnapRect() const override; virtual void SetSnapRect(const tools::Rectangle& rRect) override; diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 115a08a4b17b..fdcc5e4091f0 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1141,8 +1141,8 @@ public: /** Move selected paragraphs (not only numberings) according to offsets. (if negative: go to doc start). */ - bool MoveParagraph(SwPaM&, long nOffset, bool bIsOutlMv = false); - bool MoveParagraphImpl(SwPaM&, long nOffset, bool bIsOutlMv, SwRootFrame const*); + bool MoveParagraph(SwPaM&, tools::Long nOffset, bool bIsOutlMv = false); + bool MoveParagraphImpl(SwPaM&, tools::Long nOffset, bool bIsOutlMv, SwRootFrame const*); bool NumOrNoNum( const SwNodeIndex& rIdx, bool bDel = false); @@ -1434,10 +1434,10 @@ public: bool GenerateHTMLDoc( const OUString& rPath, int nOutlineLevel ); // Compare two documents. - long CompareDoc( const SwDoc& rDoc ); + tools::Long CompareDoc( const SwDoc& rDoc ); // Merge two documents. - long MergeDoc( const SwDoc& rDoc ); + tools::Long MergeDoc( const SwDoc& rDoc ); bool IsAutoFormatRedline() const { return mbIsAutoFormatRedline; } void SetAutoFormatRedline( bool bFlag ) { mbIsAutoFormatRedline = bFlag; } diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index b2ba48315230..f47edfafa5a1 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -525,7 +525,7 @@ public: void NumUpDown( bool bDown = true ); - bool MoveParagraph( long nOffset = 1); + bool MoveParagraph( tools::Long nOffset = 1); bool MoveNumParas( bool bUpperLower, bool bUpperLeft ); /// Switch on/off of numbering via Delete/Backspace. @@ -946,10 +946,10 @@ public: void UpdateRedlineAttr(); /// Compare two documents. - long CompareDoc( const SwDoc& rDoc ); + tools::Long CompareDoc( const SwDoc& rDoc ); /// Merge two documents. - long MergeDoc( const SwDoc& rDoc ); + tools::Long MergeDoc( const SwDoc& rDoc ); /// Footnote attributes global to document. const SwFootnoteInfo& GetFootnoteInfo() const; diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 0639833d0b1e..a363c241d2b1 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -623,7 +623,7 @@ public: /// Page number of the page containing Point, O if no page. sal_uInt16 GetPageNumber( const Point &rPoint ) const; - bool GetPageNumber( long nYPos, bool bAtCursorPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay ) const; + bool GetPageNumber( tools::Long nYPos, bool bAtCursorPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay ) const; SwFlyFrameFormat* InsertObject( const svt::EmbeddedObjectRef&, SfxItemSet* pFlyAttrSet ); @@ -770,7 +770,7 @@ public: bool IsLastCellInRow() const; /// Width of current range for column-dialog. - long GetSectionWidth( SwFormat const & rFormat ) const; + tools::Long GetSectionWidth( SwFormat const & rFormat ) const; void GetConnectableFrameFormats (SwFrameFormat & rFormat, const OUString & rReference, bool bSuccessors, diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx index 38c16c9039a3..39c00f68a235 100644 --- a/sw/inc/flddat.hxx +++ b/sw/inc/flddat.hxx @@ -45,7 +45,7 @@ public: class SW_DLLPUBLIC SwDateTimeField final : public SwValueField { sal_uInt16 m_nSubType; - long m_nOffset; // Offset in minutes. + tools::Long m_nOffset; // Offset in minutes. virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override; virtual std::unique_ptr<SwField> Copy() const override; @@ -62,8 +62,8 @@ public: virtual void SetPar2(const OUString& rStr) override; virtual OUString GetPar2() const override; - void SetOffset(long nMinutes) { m_nOffset = nMinutes; } - long GetOffset() const { return m_nOffset; } + void SetOffset(tools::Long nMinutes) { m_nOffset = nMinutes; } + tools::Long GetOffset() const { return m_nOffset; } Date GetDate() const; tools::Time GetTime() const; diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx index 2eb3dbf13678..cf890371a2f1 100644 --- a/sw/inc/fmtfsize.hxx +++ b/sw/inc/fmtfsize.hxx @@ -60,7 +60,7 @@ class SW_DLLPUBLIC SwFormatFrameSize: public SvxSizeItem // the object is placed (PrtArea) and to the screen width // minus borders in BrowseView if the environment is the page. - void ScaleMetrics(long lMult, long lDiv) override; + void ScaleMetrics(tools::Long lMult, tools::Long lDiv) override; bool HasMetrics() const override; public: diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx index 7fad4b0fd087..5b59f2a8d71d 100644 --- a/sw/inc/htmltbl.hxx +++ b/sw/inc/htmltbl.hxx @@ -280,7 +280,7 @@ public: sal_uLong GetMin() const { return m_nMin; } sal_uLong GetMax() const { return m_nMax; } - inline long GetBrowseWidthMin() const; + inline tools::Long GetBrowseWidthMin() const; bool HasColsOption() const { return m_bColsOption; } bool HasColTags() const { return m_bColTags; } @@ -423,9 +423,9 @@ inline void SwHTMLTableLayout::SetCell( std::unique_ptr<SwHTMLTableLayoutCell> p m_aCells[static_cast<size_t>(nRow)*m_nCols+nCol] = std::move(pCell); } -inline long SwHTMLTableLayout::GetBrowseWidthMin() const +inline tools::Long SwHTMLTableLayout::GetBrowseWidthMin() const { - return static_cast<long>( (!m_nWidthOption || m_bPercentWidthOption) ? m_nMin : m_nRelTabWidth ); + return static_cast<tools::Long>( (!m_nWidthOption || m_bPercentWidthOption) ? m_nMin : m_nRelTabWidth ); } void SwHTMLTableLayout::SetInhBorderWidths( sal_uInt16 nLeft, sal_uInt16 nRight ) diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx index 3715c6702f78..eee934b66ddf 100644 --- a/sw/inc/mdiexp.hxx +++ b/sw/inc/mdiexp.hxx @@ -20,6 +20,7 @@ #define INCLUDED_SW_INC_MDIEXP_HXX #include <rtl/ustring.hxx> +#include <tools/long.hxx> #include "tblenum.hxx" #include "swdllapi.h" @@ -41,9 +42,9 @@ extern void PageNumNotify( SwViewShell const * pVwSh, enum FlyMode { FLY_DRAG_START, FLY_DRAG, FLY_DRAG_END }; extern void FrameNotify( SwViewShell* pVwSh, FlyMode eMode = FLY_DRAG ); -SW_DLLPUBLIC void StartProgress(const char* pMessId, long nStartVal, long nEndVal, SwDocShell *pDocSh = nullptr); +SW_DLLPUBLIC void StartProgress(const char* pMessId, tools::Long nStartVal, tools::Long nEndVal, SwDocShell *pDocSh = nullptr); SW_DLLPUBLIC void EndProgress ( SwDocShell const *pDocSh ); -SW_DLLPUBLIC void SetProgressState ( long nPosition, SwDocShell const *pDocShell ); +SW_DLLPUBLIC void SetProgressState ( tools::Long nPosition, SwDocShell const *pDocShell ); void RescheduleProgress( SwDocShell const *pDocShell ); void RepaintPagePreview( SwViewShell const * pVwSh, const SwRect& rRect ); diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx index ee53db6a7c3c..afaf8936558c 100644 --- a/sw/inc/ndgrf.hxx +++ b/sw/inc/ndgrf.hxx @@ -82,9 +82,9 @@ public: void SetGraphic(const Graphic& rGraphic); /// wrappers for non-const calls at GraphicObject - void StartGraphicAnimation(OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData, OutputDevice* pFirstFrameOutDev) + void StartGraphicAnimation(OutputDevice* pOut, const Point& rPt, const Size& rSz, tools::Long nExtraData, OutputDevice* pFirstFrameOutDev) { maGrfObj.StartAnimation(pOut, rPt, rSz, nExtraData, pFirstFrameOutDev); } - void StopGraphicAnimation(const OutputDevice* pOut, long nExtraData) { maGrfObj.StopAnimation(pOut, nExtraData); } + void StopGraphicAnimation(const OutputDevice* pOut, tools::Long nExtraData) { maGrfObj.StopAnimation(pOut, nExtraData); } virtual Size GetTwipSize() const override; void SetTwipSize( const Size& rSz ); diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx index 274bc4b2014c..303a7801ca6f 100644 --- a/sw/inc/ndindex.hxx +++ b/sw/inc/ndindex.hxx @@ -56,7 +56,7 @@ public: { RegisterIndex( rNds ); }; - SwNodeIndex( const SwNodeIndex& rIdx, long nDiff = 0 ) + SwNodeIndex( const SwNodeIndex& rIdx, tools::Long nDiff = 0 ) : sw::Ring<SwNodeIndex>() { if( nDiff ) @@ -66,7 +66,7 @@ public: RegisterIndex( m_pNode->GetNodes() ); } - SwNodeIndex( const SwNode& rNd, long nDiff = 0 ) + SwNodeIndex( const SwNode& rNd, tools::Long nDiff = 0 ) { if( nDiff ) m_pNode = rNd.GetNodes()[ rNd.GetIndex() + nDiff ]; @@ -109,7 +109,7 @@ public: // Enables assignments without creation of a temporary object. inline SwNodeIndex& Assign( SwNodes const & rNds, sal_uLong ); - inline SwNodeIndex& Assign( const SwNode& rNd, long nOffset = 0 ); + inline SwNodeIndex& Assign( const SwNode& rNd, tools::Long nOffset = 0 ); // Gets pointer on NodesArray. inline const SwNodes& GetNodes() const; @@ -140,9 +140,9 @@ public: SwNodeRange( SwNodes& rNds, sal_uLong nSttIdx, sal_uLong nEndIdx = 0 ) : aStart( rNds, nSttIdx ), aEnd( rNds, nEndIdx ) {}; - SwNodeRange( const SwNodeIndex& rS, long nSttDiff, const SwNodeIndex& rE, long nEndDiff = 0 ) + SwNodeRange( const SwNodeIndex& rS, tools::Long nSttDiff, const SwNodeIndex& rE, tools::Long nEndDiff = 0 ) : aStart( rS, nSttDiff ), aEnd( rE, nEndDiff ) {}; - SwNodeRange( const SwNode& rS, long nSttDiff, const SwNode& rE, long nEndDiff = 0 ) + SwNodeRange( const SwNode& rS, tools::Long nSttDiff, const SwNode& rE, tools::Long nEndDiff = 0 ) : aStart( rS, nSttDiff ), aEnd( rE, nEndDiff ) {}; }; @@ -275,7 +275,7 @@ SwNodeIndex& SwNodeIndex::Assign( SwNodes const & rNds, sal_uLong nIdx ) return *this; } -SwNodeIndex& SwNodeIndex::Assign( const SwNode& rNd, long nOffset ) +SwNodeIndex& SwNodeIndex::Assign( const SwNode& rNd, tools::Long nOffset ) { *this = rNd; diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index e2d3dde7f887..539db67906cf 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -471,7 +471,7 @@ public: @return additional indents */ - long GetLeftMarginWithNum( bool bTextLeft = false ) const; + tools::Long GetLeftMarginWithNum( bool bTextLeft = false ) const; /** Returns the combined first line indent of this text node and @@ -494,7 +494,7 @@ public: Needed for text formatting Method considers new list level attributes, which also can provide a left margin value */ - long GetLeftMarginForTabCalculation() const; + tools::Long GetLeftMarginForTabCalculation() const; /** Returns if this text node has a number. @@ -654,7 +654,7 @@ public: @return boolean - indicating, if a list tab stop position is provided */ - bool GetListTabStopPosition( long& nListTabStopPosition ) const; + bool GetListTabStopPosition( tools::Long& nListTabStopPosition ) const; /** Retrieves the character following the list label, if the paragraph's list level defines one. diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index 7c052e037d7d..e1ed5c9a03ac 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -99,8 +99,8 @@ private: Merge m_eMerge; #ifdef DBG_UTIL - static long s_nSerial; - long m_nSerial; + static tools::Long s_nSerial; + tools::Long m_nSerial; #endif /// all SwFrameFormat that are anchored at the node @@ -122,7 +122,7 @@ public: virtual ~SwNode() override = 0; #ifdef DBG_UTIL - long GetSerial() const { return m_nSerial; } + tools::Long GetSerial() const { return m_nSerial; } #endif sal_uInt16 GetSectionLevel() const; diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 8c0a8abe6de9..7e64a4665a9f 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -147,9 +147,9 @@ public: explicit SwPaM( const SwPosition& rPos, SwPaM* pRing = nullptr ); SwPaM( const SwPosition& rMk, const SwPosition& rPt, SwPaM* pRing = nullptr ); SwPaM( const SwNodeIndex& rMk, const SwNodeIndex& rPt, - long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = nullptr ); + tools::Long nMkOffset = 0, tools::Long nPtOffset = 0, SwPaM* pRing = nullptr ); SwPaM( const SwNode& rMk, const SwNode& rPt, - long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = nullptr ); + tools::Long nMkOffset = 0, tools::Long nPtOffset = 0, SwPaM* pRing = nullptr ); SwPaM( const SwNodeIndex& rMk, sal_Int32 nMkContent, const SwNodeIndex& rPt, sal_Int32 nPtContent, SwPaM* pRing = nullptr ); SwPaM( const SwNode& rMk, sal_Int32 nMkContent, diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index 935549ac786d..fb946b969c87 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -86,7 +86,7 @@ namespace SwPostItHelper const SwPosition& rAnchorPos, const sw::mark::IMark* pAnnotationMark = nullptr ); - long getLayoutHeight( const SwRootFrame* pRoot ); + tools::Long getLayoutHeight( const SwRootFrame* pRoot ); void setSidebarChanged( SwRootFrame* pRoot, bool bBrowseMode ); unsigned long getPageInfo( SwRect& rPageFrame, const SwRootFrame* , const Point& ); } diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx index 95cab2924272..8fbded6e61f1 100644 --- a/sw/inc/redline.hxx +++ b/sw/inc/redline.hxx @@ -261,7 +261,7 @@ public: bool operator<( const SwRangeRedline& ) const; void dumpAsXml(xmlTextWriterPtr pWriter) const; - void MaybeNotifyRedlinePositionModification(long nTop); + void MaybeNotifyRedlinePositionModification(tools::Long nTop); }; void MaybeNotifyRedlineModification(SwRangeRedline& rRedline, SwDoc& rDoc); diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 46529ceb7394..d05293c45365 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -458,7 +458,7 @@ public: // Stream-specific routines. Do not use in storage-writer! // Optimizing output on stream. - static SvStream& OutLong( SvStream& rStrm, long nVal ); + static SvStream& OutLong( SvStream& rStrm, tools::Long nVal ); static SvStream& OutULong( SvStream& rStrm, sal_uLong nVal ); void SetStream(SvStream *const pStream); diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx index fc9f034bcc69..02b16c80b75d 100644 --- a/sw/inc/swatrset.hxx +++ b/sw/inc/swatrset.hxx @@ -319,7 +319,7 @@ public: }; //Helper for filters to find true lineheight of a font -SW_DLLPUBLIC long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess, +SW_DLLPUBLIC tools::Long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess, const SwAttrSet &rSet, const vcl::RenderContext &rOut, sal_Int16 nScript); #endif diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 4ed649e85681..9aa390386221 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -72,7 +72,7 @@ class SW_DLLPUBLIC SwCursor : public SwPaM friend class SwCursorSaveState; std::vector<SwCursor_SavePos> m_vSavePos; // the current entry is the last element - long m_nRowSpanOffset; // required for travelling in tabs with rowspans + tools::Long m_nRowSpanOffset; // required for travelling in tabs with rowspans sal_uInt8 m_nCursorBidiLevel; // bidi level of the cursor bool m_bColumnSelection; // true: cursor is aprt of a column selection @@ -163,7 +163,7 @@ public: virtual bool LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual, bool bSkipHidden, bool bInsertCursor, SwRootFrame const* pLayout, bool isFieldNames); - bool UpDown(bool bUp, sal_uInt16 nCnt, Point const * pPt, long nUpDownX, SwRootFrame & rLayout); + bool UpDown(bool bUp, sal_uInt16 nCnt, Point const * pPt, tools::Long nUpDownX, SwRootFrame & rLayout); bool LeftRightMargin(SwRootFrame const& rLayout, bool bLeftMargin, bool bAPI); bool IsAtLeftRightMargin(SwRootFrame const& rLayout, bool bLeftMargin, bool bAPI) const; bool SttEndDoc( bool bSttDoc ); @@ -214,7 +214,7 @@ public: bool IsColumnSelection() const { return m_bColumnSelection; } void SetColumnSelection( bool bNew ) { m_bColumnSelection = bNew; } - long GetCursorRowSpanOffset() const { return m_nRowSpanOffset; } + tools::Long GetCursorRowSpanOffset() const { return m_nRowSpanOffset; } SwCursor* GetNext() { return dynamic_cast<SwCursor *>(GetNextInRing()); } const SwCursor* GetNext() const { return dynamic_cast<SwCursor const *>(GetNextInRing()); } diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx index 79a5be6649a9..a9c5a79c023f 100644 --- a/sw/inc/swrect.hxx +++ b/sw/inc/swrect.hxx @@ -42,7 +42,7 @@ public: inline SwRect( const SwRect &rRect ); inline SwRect( const Point& rLT, const Size& rSize ); inline SwRect( const Point& rLT, const Point& rRB ); - inline SwRect( long X, long Y, long Width, long Height ); + inline SwRect( tools::Long X, tools::Long Y, tools::Long Width, tools::Long Height ); //SV-SS e.g. SwRect( pWin->GetClipRect() ); SwRect( const tools::Rectangle &rRect ); @@ -50,25 +50,25 @@ public: //Set-Methods inline void Chg( const Point& rNP, const Size &rNS ); inline void Pos( const Point& rNew ); - inline void Pos( const long nNewX, const long nNewY ); + inline void Pos( const tools::Long nNewX, const tools::Long nNewY ); inline void SSize( const Size& rNew ); - inline void SSize( const long nHeight, const long nWidth ); - inline void Width( long nNew ); - inline void Height( long nNew ); - inline void Left( const long nLeft ); - inline void Right( const long nRight ); - inline void Top( const long nTop ); - inline void Bottom( const long nBottom ); + inline void SSize( const tools::Long nHeight, const tools::Long nWidth ); + inline void Width( tools::Long nNew ); + inline void Height( tools::Long nNew ); + inline void Left( const tools::Long nLeft ); + inline void Right( const tools::Long nRight ); + inline void Top( const tools::Long nTop ); + inline void Bottom( const tools::Long nBottom ); //Get-Methods inline const Point &Pos() const; inline const Size &SSize() const; - inline long Width() const; - inline long Height() const; - inline long Left() const; - inline long Right() const; - inline long Top() const; - inline long Bottom() const; + inline tools::Long Width() const; + inline tools::Long Height() const; + inline tools::Long Left() const; + inline tools::Long Right() const; + inline tools::Long Top() const; + inline tools::Long Bottom() const; // In order to be able to access the members of Pos and SSize from the layout side. inline Point &Pos(); @@ -84,7 +84,7 @@ public: SwRect &Intersection_( const SwRect &rRect ); bool IsInside( const Point& rPOINT ) const; - bool IsNear(const Point& rPoint, long nTolerance ) const; + bool IsNear(const Point& rPoint, tools::Long nTolerance ) const; bool IsInside( const SwRect& rRect ) const; bool IsOver( const SwRect& rRect ) const; inline bool HasArea() const; @@ -106,32 +106,32 @@ public: friend SvStream& WriteSwRect( SvStream &rStream, const SwRect &rRect ); void dumpAsXmlAttributes(xmlTextWriterPtr writer) const; - void Top_( const long nTop ); - void Bottom_( const long nBottom ); - void Left_( const long nLeft ); - void Right_( const long nRight ); - void Width_( const long nNew ); - void Height_( const long nNew ); - long Top_() const; - long Bottom_() const; - long Left_() const; - long Right_() const; - long Width_() const; - long Height_() const; - void SubTop( const long nSub ); - void AddTop( const long nAdd ); - void AddBottom( const long nAdd ); - void AddLeft( const long nAdd ); - void SubLeft( const long nSub ); - void AddRight( const long nAdd ); - void AddWidth( const long nAdd ); - void AddHeight( const long nAdd ); - void SetPosX( const long nNew ); - void SetPosY( const long nNew ); - void SetLeftAndWidth( long nLeft, long nNew ); - void SetTopAndHeight( long nTop, long nNew ); - void SetRightAndWidth( long nRight, long nNew ); - void SetBottomAndHeight( long nBottom, long nNew ); + void Top_( const tools::Long nTop ); + void Bottom_( const tools::Long nBottom ); + void Left_( const tools::Long nLeft ); + void Right_( const tools::Long nRight ); + void Width_( const tools::Long nNew ); + void Height_( const tools::Long nNew ); + tools::Long Top_() const; + tools::Long Bottom_() const; + tools::Long Left_() const; + tools::Long Right_() const; + tools::Long Width_() const; + tools::Long Height_() const; + void SubTop( const tools::Long nSub ); + void AddTop( const tools::Long nAdd ); + void AddBottom( const tools::Long nAdd ); + void AddLeft( const tools::Long nAdd ); + void SubLeft( const tools::Long nSub ); + void AddRight( const tools::Long nAdd ); + void AddWidth( const tools::Long nAdd ); + void AddHeight( const tools::Long nAdd ); + void SetPosX( const tools::Long nNew ); + void SetPosY( const tools::Long nNew ); + void SetLeftAndWidth( tools::Long nLeft, tools::Long nNew ); + void SetTopAndHeight( tools::Long nTop, tools::Long nNew ); + void SetRightAndWidth( tools::Long nRight, tools::Long nNew ); + void SetBottomAndHeight( tools::Long nBottom, tools::Long nNew ); void SetUpperLeftCorner( const Point& rNew ); void SetUpperRightCorner( const Point& rNew ); void SetLowerLeftCorner( const Point& rNew ); @@ -141,23 +141,23 @@ public: Point BottomLeft() const; Point BottomRight() const; Size SwappedSize() const; - long GetLeftDistance( long ) const; - long GetBottomDistance( long ) const; - long GetRightDistance( long ) const; - long GetTopDistance( long ) const; - bool OverStepLeft( long ) const; - bool OverStepBottom( long ) const; - bool OverStepTop( long ) const; - bool OverStepRight( long ) const; + tools::Long GetLeftDistance( tools::Long ) const; + tools::Long GetBottomDistance( tools::Long ) const; + tools::Long GetRightDistance( tools::Long ) const; + tools::Long GetTopDistance( tools::Long ) const; + bool OverStepLeft( tools::Long ) const; + bool OverStepBottom( tools::Long ) const; + bool OverStepTop( tools::Long ) const; + bool OverStepRight( tools::Long ) const; }; -typedef void (SwRect::*SwRectSet)( const long nNew ); +typedef void (SwRect::*SwRectSet)( const tools::Long nNew ); typedef long (SwRect::*SwRectGet)() const; typedef Point (SwRect::*SwRectPoint)() const; typedef Size (SwRect::*SwRectSize)() const; -typedef bool (SwRect::*SwRectMax)( long ) const; -typedef long (SwRect::*SwRectDist)( long ) const; -typedef void (SwRect::*SwRectSetTwice)( long, long ); +typedef bool (SwRect::*SwRectMax)( tools::Long ) const; +typedef long (SwRect::*SwRectDist)( tools::Long ) const; +typedef void (SwRect::*SwRectSetTwice)( tools::Long, tools::Long ); typedef void (SwRect::*SwRectSetPos)( const Point& ); // Set-Methods @@ -170,7 +170,7 @@ inline void SwRect::Pos( const Point& rNew ) { m_Point = rNew; } -inline void SwRect::Pos( const long nNewX, const long nNewY ) +inline void SwRect::Pos( const tools::Long nNewX, const tools::Long nNewY ) { m_Point.setX(nNewX); m_Point.setY(nNewY); @@ -179,34 +179,34 @@ inline void SwRect::SSize( const Size& rNew ) { m_Size = rNew; } -inline void SwRect::SSize( const long nNewHeight, const long nNewWidth ) +inline void SwRect::SSize( const tools::Long nNewHeight, const tools::Long nNewWidth ) { m_Size.setWidth(nNewWidth); m_Size.setHeight(nNewHeight); } -inline void SwRect::Width( long nNew ) +inline void SwRect::Width( tools::Long nNew ) { m_Size.setWidth(nNew); } -inline void SwRect::Height( long nNew ) +inline void SwRect::Height( tools::Long nNew ) { m_Size.setHeight(nNew); } -inline void SwRect::Left( const long nLeft ) +inline void SwRect::Left( const tools::Long nLeft ) { m_Size.AdjustWidth( m_Point.getX() - nLeft ); m_Point.setX(nLeft); } -inline void SwRect::Right( const long nRight ) +inline void SwRect::Right( const tools::Long nRight ) { m_Size.setWidth(nRight - m_Point.getX() + 1); } -inline void SwRect::Top( const long nTop ) +inline void SwRect::Top( const tools::Long nTop ) { m_Size.AdjustHeight( m_Point.getY() - nTop ); m_Point.setY(nTop); } -inline void SwRect::Bottom( const long nBottom ) +inline void SwRect::Bottom( const tools::Long nBottom ) { m_Size.setHeight(nBottom - m_Point.getY() + 1); } @@ -224,27 +224,27 @@ inline const Size &SwRect::SSize() const { return m_Size; } -inline long SwRect::Width() const +inline tools::Long SwRect::Width() const { return m_Size.Width(); } -inline long SwRect::Height() const +inline tools::Long SwRect::Height() const { return m_Size.Height(); } -inline long SwRect::Left() const +inline tools::Long SwRect::Left() const { return m_Point.X(); } -inline long SwRect::Right() const +inline tools::Long SwRect::Right() const { return m_Size.getWidth() ? m_Point.getX() + m_Size.getWidth() - 1 : m_Point.getX(); } -inline long SwRect::Top() const +inline tools::Long SwRect::Top() const { return m_Point.Y(); } -inline long SwRect::Bottom() const +inline tools::Long SwRect::Bottom() const { return m_Size.getHeight() ? m_Point.getY() + m_Size.getHeight() - 1 : m_Point.getY(); } @@ -322,7 +322,7 @@ inline SwRect::SwRect( const Point& rLT, const Point& rRB ) : m_Size( rRB.X() - rLT.X() + 1, rRB.Y() - rLT.Y() + 1 ) { } -inline SwRect::SwRect( long X, long Y, long W, long H ) : +inline SwRect::SwRect( tools::Long X, tools::Long Y, tools::Long W, tools::Long H ) : m_Point( X, Y ), m_Size( W, H ) { diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index 9694db0113ef..a101cfeeb85e 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -165,7 +165,7 @@ private: bool InsertRow_( SwDoc*, const SwSelBoxes&, sal_uInt16 nCnt, bool bBehind ); bool NewInsertCol( SwDoc&, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool ); void FindSuperfluousRows_( SwSelBoxes& rBoxes, SwTableLine*, SwTableLine* ); - void AdjustWidths( const long nOld, const long nNew ); + void AdjustWidths( const tools::Long nOld, const tools::Long nNew ); void NewSetTabCols( Parm &rP, const SwTabCols &rNew, const SwTabCols &rOld, const SwTableBox *pStart, bool bCurRowOnly ); void ConvertSubtableBox(sal_uInt16 const nRow, sal_uInt16 const nBox); @@ -241,8 +241,8 @@ public: } bool PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes, SwSelBoxes& rMerged, SwTableBox** ppMergeBox, SwUndoTableMerge* pUndo ); - void ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax ) const; - void PrepareDeleteCol( long nMin, long nMax ); + void ExpandColumnSelection( SwSelBoxes& rBoxes, tools::Long &rMin, tools::Long &rMax ) const; + void PrepareDeleteCol( tools::Long nMin, tools::Long nMax ); bool InsertCol( SwDoc&, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, bool bBehind ); @@ -404,7 +404,7 @@ class SW_DLLPUBLIC SwTableBox: public SwClient //Client of FrameFormat. std::unique_ptr<Color> mpUserColor; std::unique_ptr<Color> mpNumFormatColor; - long mnRowSpan; + tools::Long mnRowSpan; bool mbDummyFlag; /// Do we contain any direct formatting? @@ -483,8 +483,8 @@ public: inline void SetSaveUserColor(const Color* p ); inline void SetSaveNumFormatColor( const Color* p ); - long getRowSpan() const; - void setRowSpan( long nNewRowSpan ); + tools::Long getRowSpan() const; + void setRowSpan( tools::Long nNewRowSpan ); bool getDummyFlag() const; void setDummyFlag( bool bDummy ); diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx index 0a4a990c378c..ec9c9b101859 100644 --- a/sw/inc/tabcol.hxx +++ b/sw/inc/tabcol.hxx @@ -23,12 +23,13 @@ #include <memory> #include "swdllapi.h" +#include <tools/long.hxx> struct SwTabColsEntry { - long nPos; - long nMin; - long nMax; + tools::Long nPos; + tools::Long nMin; + tools::Long nMax; bool bHidden; // For each entry a flag, hidden or not. // If the flag bHidden is true column separator // is not in current line. It must maintained @@ -39,12 +40,12 @@ typedef std::vector< SwTabColsEntry > SwTabColsEntries; class SW_DLLPUBLIC SwTabCols { - long m_nLeftMin; // Leftmost border (reference point) for + tools::Long m_nLeftMin; // Leftmost border (reference point) for // document coordinates. // All other values are relative to this point! - long m_nLeft; // Left border of table. - long m_nRight; // Right border of table. - long m_nRightMax; // Maximum right border of table. + tools::Long m_nLeft; // Left border of table. + tools::Long m_nRight; // Right border of table. + tools::Long m_nRightMax; // Maximum right border of table. bool m_bLastRowAllowedToChange; // If the last row of the table frame // is split across pages, it may not @@ -59,29 +60,29 @@ public: SwTabCols( sal_uInt16 nSize = 0 ); SwTabCols( const SwTabCols& ); SwTabCols &operator=( const SwTabCols& ); - long& operator[]( size_t nPos ) { return m_aData[nPos].nPos; } - long operator[]( size_t nPos ) const { return m_aData[nPos].nPos; } + tools::Long& operator[]( size_t nPos ) { return m_aData[nPos].nPos; } + tools::Long operator[]( size_t nPos ) const { return m_aData[nPos].nPos; } size_t Count() const { return m_aData.size(); } bool IsHidden( size_t nPos ) const { return m_aData[nPos].bHidden; } void SetHidden( size_t nPos, bool bValue ) { m_aData[nPos].bHidden = bValue; } - void Insert( long nValue, bool bValue, size_t nPos ); - void Insert( long nValue, long nMin, long nMax, bool bValue, size_t nPos ); + void Insert( tools::Long nValue, bool bValue, size_t nPos ); + void Insert( tools::Long nValue, tools::Long nMin, tools::Long nMax, bool bValue, size_t nPos ); void Remove( size_t nPos, size_t nCount = 1 ); const SwTabColsEntry& GetEntry( size_t nPos ) const { return m_aData[nPos]; } SwTabColsEntry& GetEntry( size_t nPos ) { return m_aData[nPos]; } - long GetLeftMin() const { return m_nLeftMin; } - long GetLeft() const { return m_nLeft; } - long GetRight() const { return m_nRight; } - long GetRightMax()const { return m_nRightMax;} + tools::Long GetLeftMin() const { return m_nLeftMin; } + tools::Long GetLeft() const { return m_nLeft; } + tools::Long GetRight() const { return m_nRight; } + tools::Long GetRightMax()const { return m_nRightMax;} - void SetLeftMin ( long nNew ) { m_nLeftMin = nNew; } - void SetLeft ( long nNew ) { m_nLeft = nNew; } - void SetRight ( long nNew ) { m_nRight = nNew; } - void SetRightMax( long nNew ) { m_nRightMax = nNew;} + void SetLeftMin ( tools::Long nNew ) { m_nLeftMin = nNew; } + void SetLeft ( tools::Long nNew ) { m_nLeft = nNew; } + void SetRight ( tools::Long nNew ) { m_nRight = nNew; } + void SetRightMax( tools::Long nNew ) { m_nRightMax = nNew;} bool IsLastRowAllowedToChange() const { return m_bLastRowAllowedToChange; } void SetLastRowAllowedToChange( bool bNew ) { m_bLastRowAllowedToChange = bNew; } diff --git a/sw/inc/toxwrap.hxx b/sw/inc/toxwrap.hxx index 71feadb6fcf5..63a09b323ff0 100644 --- a/sw/inc/toxwrap.hxx +++ b/sw/inc/toxwrap.hxx @@ -22,6 +22,7 @@ #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp> +#include <tools/long.hxx> #include "swdllapi.h" namespace com::sun::star::i18n { class XExtendedIndexEntrySupplier; } @@ -47,7 +48,7 @@ public: GetAlgorithmList( const css::lang::Locale& rLcl ) const; bool LoadAlgorithm( const css::lang::Locale& rLcl, - const OUString& sSortAlgorithm, long nOptions ) const; + const OUString& sSortAlgorithm, tools::Long nOptions ) const; sal_Int16 CompareIndexEntry( const OUString& rText1, const OUString& rTextReading1, const css::lang::Locale& rLcl1, diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index c44174cbe99b..1f814a915b05 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -393,8 +393,8 @@ public: int nOutputHeight, int nTilePosX, int nTilePosY, - long nTileWidth, - long nTileHeight ) override; + tools::Long nTileWidth, + tools::Long nTileHeight ) override; /// @see vcl::ITiledRenderable::getDocumentSize(). virtual Size getDocumentSize() override; /// @see vcl::ITiledRenderable::setPart(). diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 85ab3f1c930f..8513b6c7e171 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -73,9 +73,9 @@ namespace com::sun::star::view { class XSelectionSupplier; } namespace sfx2 { class FileDialogHelper; } namespace sw::mark { class IFieldmark; } -const long nLeftOfst = -370; -const long nScrollX = 30; -const long nScrollY = 30; +const tools::Long nLeftOfst = -370; +const tools::Long nScrollX = 30; +const tools::Long nScrollY = 30; #define MINZOOM 20 #define MAXZOOM 600 @@ -264,8 +264,8 @@ class SW_DLLPUBLIC SwView: public SfxViewShell DECL_DLLPRIVATE_LINK( TimeoutHdl, Timer*, void ); - inline long GetXScroll() const; - inline long GetYScroll() const; + inline tools::Long GetXScroll() const; + inline tools::Long GetYScroll() const; SAL_DLLPRIVATE Point AlignToPixel(const Point& rPt) const; SAL_DLLPRIVATE void CalcPt( Point* pPt,const tools::Rectangle& rRect, sal_uInt16 nRangeX, @@ -371,7 +371,7 @@ public: virtual SdrView* GetDrawView() const override; virtual bool HasUIFeature(SfxShellFeature nFeature) const override; virtual void ShowCursor( bool bOn = true ) override; - virtual ErrCode DoVerb( long nVerb ) override; + virtual ErrCode DoVerb( tools::Long nVerb ) override; virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, SfxPrinterChangeFlags nDiff = SFX_PRINTER_ALL) override; @@ -415,8 +415,8 @@ public: sal_uInt16 nRangeX = USHRT_MAX, sal_uInt16 nRangeY = USHRT_MAX); - long SetVScrollMax(long lMax); - long SetHScrollMax(long lMax); + tools::Long SetVScrollMax(tools::Long lMax); + tools::Long SetHScrollMax(tools::Long lMax); void SpellError(LanguageType eLang); bool ExecSpellPopup( const Point& rPt ); @@ -576,11 +576,11 @@ public: bool JumpToSwMark( const OUString& rMark ); - long InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, + tools::Long InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUString& rFilterName, sal_Int16 nVersion = 0 ); void ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem ); - long InsertMedium( sal_uInt16 nSlotId, std::unique_ptr<SfxMedium> pMedium, sal_Int16 nVersion ); + tools::Long InsertMedium( sal_uInt16 nSlotId, std::unique_ptr<SfxMedium> pMedium, sal_Int16 nVersion ); DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper *, void ); // status methods for clipboard. @@ -674,12 +674,12 @@ public: void SetOldDrwCat(const OUString& sStr); }; -inline long SwView::GetXScroll() const +inline tools::Long SwView::GetXScroll() const { return (m_aVisArea.GetWidth() * nScrollX) / 100; } -inline long SwView::GetYScroll() const +inline tools::Long SwView::GetYScroll() const { return (m_aVisArea.GetHeight() * nScrollY) / 100; } diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 57fae99e99ba..e5a6ae810a49 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -73,8 +73,8 @@ namespace vcl // Define for flags needed in ctor or layers below. // Currently the Preview flag is needed for DrawPage. -#define VSHELLFLAG_ISPREVIEW (long(0x1)) -#define VSHELLFLAG_SHARELAYOUT (long(0x2)) +#define VSHELLFLAG_ISPREVIEW (tools::Long(0x1)) +#define VSHELLFLAG_SHARELAYOUT (tools::Long(0x2)) typedef std::shared_ptr<SwRootFrame> SwRootFramePtr; typedef struct _xmlTextWriter* xmlTextWriterPtr; @@ -233,7 +233,7 @@ public: Sets the pOut so that the rRect is always painted over the entire pOut, ie. starts in 0,0 and ends in width/height. */ - void PaintTile(VirtualDevice &rDevice, int contextWidth, int contextHeight, int tilePosX, int tilePosY, long tileWidth, long tileHeight); + void PaintTile(VirtualDevice &rDevice, int contextWidth, int contextHeight, int tilePosX, int tilePosY, tools::Long tileWidth, tools::Long tileHeight); bool IsPaintInProgress() const { return mbPaintInProgress; } bool IsDrawingLayerPaintInProgress() const { return !mPrePostPaintRegions.empty(); } @@ -243,7 +243,7 @@ public: // The passed rect is situated on pixel borders // in order to avoid pixel errors when scrolling. virtual void VisPortChgd( const SwRect & ); - bool SmoothScroll( long lXDiff, long lYDiff, const tools::Rectangle* );//Browser + bool SmoothScroll( tools::Long lXDiff, tools::Long lYDiff, const tools::Rectangle* );//Browser void EnableSmooth( bool b ) { mbEnableSmooth = b; } const SwRect& VisArea() const; @@ -540,10 +540,10 @@ public: SwAccessibleMap* GetAccessibleMap(); SwViewShell( SwViewShell&, vcl::Window *pWin, OutputDevice *pOut = nullptr, - long nFlags = 0 ); + tools::Long nFlags = 0 ); SwViewShell( SwDoc& rDoc, vcl::Window *pWin, const SwViewOption *pOpt, OutputDevice *pOut = nullptr, - long nFlags = 0 ); + tools::Long nFlags = 0 ); virtual ~SwViewShell() override; sal_Int32 GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const; diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx index 36cf0ceb8eef..95c013b233ca 100644 --- a/sw/inc/viscrs.hxx +++ b/sw/inc/viscrs.hxx @@ -71,7 +71,7 @@ class SwSelPaintRects : public SwRects friend void InitCore(); friend void FinitCore(); - static long s_nPixPtX, s_nPixPtY; + static tools::Long s_nPixPtX, s_nPixPtY; static MapMode *s_pMapMode; const SwCursorShell* m_pCursorShell; @@ -110,7 +110,7 @@ public: // check current MapMode of the shell and set possibly the static members. // Optional set the parameters pX, pY static void Get1PixelInLogic( const SwViewShell& rSh, - long* pX = nullptr, long* pY = nullptr ); + tools::Long* pX = nullptr, tools::Long* pY = nullptr ); }; class SW_DLLPUBLIC SwShellCursor : public virtual SwCursor, public SwSelPaintRects |