From 1e822e401ea8fe950c7fb62172ac61d8396c98e9 Mon Sep 17 00:00:00 2001 From: Noel Date: Mon, 19 Oct 2020 15:18:15 +0200 Subject: use tools::Long in sw Change-Id: I44be72b3a9b14823ec37a3c799cffb4fb4d6e1de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104527 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/filter/inc/fltshell.hxx | 16 ++++++++-------- sw/source/filter/inc/wrtswtbl.hxx | 28 ++++++++++++++-------------- 2 files changed, 22 insertions(+), 22 deletions(-) (limited to 'sw/source/filter/inc') diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx index 338de25fcddd..2dbf2d6fae1e 100644 --- a/sw/source/filter/inc/fltshell.hxx +++ b/sw/source/filter/inc/fltshell.hxx @@ -165,7 +165,7 @@ public: void NewAttr(const SwPosition& rPos, const SfxPoolItem & rAttr ); - virtual SwFltStackEntry* SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId, bool bTstEnd=true, long nHand = LONG_MAX, bool consumedByField=false); + virtual SwFltStackEntry* SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId, bool bTstEnd=true, tools::Long nHand = LONG_MAX, bool consumedByField=false); void StealAttr(const SwNodeIndex& rNode); void MarkAllAttrsOld(); @@ -234,7 +234,7 @@ class SW_DLLPUBLIC SwFltBookmark : public SfxPoolItem { private: - long mnHandle; + tools::Long mnHandle; OUString maName; OUString maVal; bool mbIsTOCBookmark; @@ -242,14 +242,14 @@ private: public: SwFltBookmark( const OUString& rNa, const OUString& rVa, - long nHand, + tools::Long nHand, const bool bIsTOCBookmark = false ); // "purely virtual methods" of SfxPoolItem virtual bool operator==(const SfxPoolItem&) const override; virtual SwFltBookmark* Clone(SfxItemPool* = nullptr) const override; - long GetHandle() const { return mnHandle; } + tools::Long GetHandle() const { return mnHandle; } const OUString& GetName() const { return maName; } const OUString& GetValSys() const { return maVal; } bool IsTOCBookmark() const @@ -261,7 +261,7 @@ public: /// Stores RDF statements on a paragraph (key-value pairs where the subject is the paragraph). class SW_DLLPUBLIC SwFltRDFMark : public SfxPoolItem { - long m_nHandle; + tools::Long m_nHandle; std::vector< std::pair > m_aAttributes; public: @@ -270,8 +270,8 @@ public: virtual bool operator==(const SfxPoolItem&) const override; virtual SwFltRDFMark* Clone(SfxItemPool* = nullptr) const override; - void SetHandle(long nHandle); - long GetHandle() const; + void SetHandle(tools::Long nHandle); + tools::Long GetHandle() const; void SetAttributes(const std::vector< std::pair >& rAttributes); const std::vector< std::pair >& GetAttributes() const; }; @@ -313,7 +313,7 @@ class ImportProgress private: SwDocShell *m_pDocShell; public: - ImportProgress(SwDocShell *pDocShell, long nStartVal, long nEndVal) + ImportProgress(SwDocShell *pDocShell, tools::Long nStartVal, tools::Long nEndVal) : m_pDocShell(pDocShell) { ::StartProgress(STR_STATSTR_W4WREAD, nStartVal, nEndVal, m_pDocShell); diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx index 27710a11b842..33cfe6782fba 100644 --- a/sw/source/filter/inc/wrtswtbl.hxx +++ b/sw/source/filter/inc/wrtswtbl.hxx @@ -48,7 +48,7 @@ class SW_DLLPUBLIC SwWriteTableCell const SwTableBox *pBox; // SwTableBox of the cell const SvxBrushItem *pBackground; // inherited background of a row - long nHeight; // fix/minimum height of a row + tools::Long nHeight; // fix/minimum height of a row sal_uInt32 nWidthOpt; // width from option; @@ -63,7 +63,7 @@ class SW_DLLPUBLIC SwWriteTableCell public: SwWriteTableCell(const SwTableBox *pB, sal_uInt16 nR, sal_uInt16 nC, sal_uInt16 nRSpan, - sal_uInt16 nCSpan, long nHght, const SvxBrushItem *pBGround) + sal_uInt16 nCSpan, tools::Long nHght, const SvxBrushItem *pBGround) : pBox( pB ), pBackground( pBGround ), nHeight( nHght ), nWidthOpt( 0 ), nRow( nR ), nCol( nC ), nRowSpan( nRSpan ), nColSpan( nCSpan ), bPercentWidthOpt( false ) @@ -77,7 +77,7 @@ public: sal_uInt16 GetRowSpan() const { return nRowSpan; } sal_uInt16 GetColSpan() const { return nColSpan; } - long GetHeight() const { return nHeight; } + tools::Long GetHeight() const { return nHeight; } sal_Int16 GetVertOri() const; const SvxBrushItem *GetBackground() const { return pBackground; } @@ -98,7 +98,7 @@ class SwWriteTableRow final SwWriteTableCells m_Cells; ///< all cells of the rows const SvxBrushItem *pBackground; // background - long nPos; // end position (twips) of the row + tools::Long nPos; // end position (twips) of the row bool mbUseLayoutHeights; SwWriteTableRow & operator= (const SwWriteTableRow &) = delete; @@ -114,12 +114,12 @@ public: bool bTopBorder : 1; // which borders are there? bool bBottomBorder : 1; - SwWriteTableRow( long nPos, bool bUseLayoutHeights ); + SwWriteTableRow( tools::Long nPos, bool bUseLayoutHeights ); SwWriteTableCell *AddCell( const SwTableBox *pBox, sal_uInt16 nRow, sal_uInt16 nCol, sal_uInt16 nRowSpan, sal_uInt16 nColSpan, - long nHeight, + tools::Long nHeight, const SvxBrushItem *pBackground ); void SetBackground( const SvxBrushItem *pBGround ) @@ -247,15 +247,15 @@ protected: virtual bool ShouldExpandSub( const SwTableBox *pBox, bool bExpandedBefore, sal_uInt16 nDepth ) const; - void CollectTableRowsCols( long nStartRPos, sal_uInt32 nStartCPos, - long nParentLineHeight, + void CollectTableRowsCols( tools::Long nStartRPos, sal_uInt32 nStartCPos, + tools::Long nParentLineHeight, sal_uInt32 nParentLineWidth, const SwTableLines& rLines, sal_uInt16 nDepth ); - void FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow, + void FillTableRowsCols( tools::Long nStartRPos, sal_uInt16 nStartRow, sal_uInt32 nStartCPos, sal_uInt16 nStartCol, - long nParentLineHeight, + tools::Long nParentLineHeight, sal_uInt32 nParentLineWidth, const SwTableLines& rLines, const SvxBrushItem* pLineBrush, @@ -280,12 +280,12 @@ public: sal_uInt16 GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const; sal_uInt16 GetPercentWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const; - long GetAbsHeight(long nRawWidth, size_t nRow, sal_uInt16 nRowSpan) const; + tools::Long GetAbsHeight(tools::Long nRawWidth, size_t nRow, sal_uInt16 nRowSpan) const; double GetAbsWidthRatio() const { return m_nTabWidth == m_nBaseWidth ? 1.0 : double(m_nTabWidth) / m_nBaseWidth; } protected: - long GetLineHeight( const SwTableLine *pLine ); - static long GetLineHeight( const SwTableBox *pBox ); + tools::Long GetLineHeight( const SwTableLine *pLine ); + static tools::Long GetLineHeight( const SwTableBox *pBox ); static const SvxBrushItem *GetLineBrush( const SwTableBox *pBox, SwWriteTableRow *pRow ); @@ -293,7 +293,7 @@ protected: sal_uInt16 GetRightSpace(size_t nCol, sal_uInt16 nColSpan) const; public: - SwWriteTable(const SwTable* pTable, const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth, + SwWriteTable(const SwTable* pTable, const SwTableLines& rLines, tools::Long nWidth, sal_uInt32 nBWidth, bool bRel, sal_uInt16 nMaxDepth = USHRT_MAX, sal_uInt16 nLeftSub=0, sal_uInt16 nRightSub=0, sal_uInt32 nNumOfRowsToRepeat=0); SwWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayoutInfo); -- cgit