diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-04 08:57:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-05 12:12:26 +0100 |
commit | 191f85df5851473af270be486f95f940e3091fef (patch) | |
tree | 753d9513ccda8ee2a132bdad74eedc47bd71b179 /sw | |
parent | 983566119c926d0e2478f74548f00a789de55c15 (diff) |
re-land "new loplugin typedefparam""
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad,
and adds a bunch more fixes.
Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a
Reviewed-on: https://gerrit.libreoffice.org/68680
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/crsrsh.hxx | 2 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 4 | ||||
-rw-r--r-- | sw/inc/swatrset.hxx | 6 | ||||
-rw-r--r-- | sw/inc/swtypes.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/SwNumberTree/SwNumberTree.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/frmtool.hxx | 10 | ||||
-rw-r--r-- | sw/source/core/inc/paintfrm.hxx | 5 | ||||
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.hxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.hxx | 16 |
12 files changed, 34 insertions, 25 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 98895e664963..a732b8b8b669 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -802,7 +802,7 @@ public: void SetAutoUpdateCells( bool bFlag ) { m_bAutoUpdateCells = bFlag; } bool GetShadowCursorPos( const Point& rPt, SwFillMode eFillMode, - SwRect& rRect, short& rOrient ); + SwRect& rRect, sal_Int16& rOrient ); bool SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode ); const SwRangeRedline* SelNextRedline(); diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index e9b3023ce5be..b32263289b2b 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1151,7 +1151,7 @@ public: */ const SwTable* InsertTable( const SwInsertTableOptions& rInsTableOpts, // HeadlineNoBorder const SwPosition& rPos, sal_uInt16 nRows, - sal_uInt16 nCols, short eAdjust, + sal_uInt16 nCols, sal_Int16 eAdjust, const SwTableAutoFormat* pTAFormat = nullptr, const std::vector<sal_uInt16> *pColArr = nullptr, bool bCalledFromShell = false, @@ -1164,7 +1164,7 @@ public: // Create a balanced table out of the selected range. const SwTable* TextToTable( const SwInsertTableOptions& rInsTableOpts, // HeadlineNoBorder, const SwPaM& rRange, sal_Unicode cCh, - short eAdjust, + sal_Int16 eAdjust, const SwTableAutoFormat* ); // text to table conversion - API support diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx index 397887d09429..d446dcddcc51 100644 --- a/sw/inc/swatrset.hxx +++ b/sw/inc/swatrset.hxx @@ -128,6 +128,10 @@ class SwTableBoxNumFormat; class SwTableBoxFormula; class SwTableBoxValue; +namespace vcl { + typedef OutputDevice RenderContext; +}; + class SwAttrPool : public SfxItemPool { private: @@ -318,7 +322,7 @@ public: //Helper for filters to find true lineheight of a font SW_DLLPUBLIC long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess, const SwAttrSet &rSet, - const OutputDevice &rOut, sal_Int16 nScript); + const vcl::RenderContext &rOut, sal_Int16 nScript); #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx index b37c36407a72..dee697c2eed8 100644 --- a/sw/inc/swtypes.hxx +++ b/sw/inc/swtypes.hxx @@ -26,6 +26,7 @@ #include "swdllapi.h" #include <o3tl/typed_flags_set.hxx> #include <i18nlangtag/lang.h> +#include <vcl/outdev.hxx> namespace com { namespace sun { namespace star { namespace linguistic2{ @@ -130,7 +131,7 @@ css::uno::Reference< css::linguistic2::XThesaurus > GetThesaurus(); css::uno::Reference< css::linguistic2::XLinguProperties > GetLinguPropertySet(); // Returns the twip size of this graphic. -SW_DLLPUBLIC Size GetGraphicSizeTwip( const Graphic&, OutputDevice* pOutDev ); +SW_DLLPUBLIC Size GetGraphicSizeTwip( const Graphic&, vcl::RenderContext* pOutDev ); // Separator for jumps to different content types in document. const sal_Unicode cMarkSeparator = '|'; diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx index 30adb4744335..e4f5c2efe713 100644 --- a/sw/source/core/SwNumberTree/SwNumberTree.cxx +++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx @@ -297,7 +297,7 @@ void SwNumberTreeNode::Validate(const SwNumberTreeNode * pNode) const } } -void SwNumberTreeNode::GetNumberVector_(vector<SwNumberTree::tSwNumTreeNumber> & rVector, +void SwNumberTreeNode::GetNumberVector_(SwNumberTree::tNumberVector & rVector, bool bValidate) const { if (mpParent) @@ -675,7 +675,7 @@ SwNumberTree::tSwNumTreeNumber SwNumberTreeNode::GetNumber(bool bValidate) } -vector<SwNumberTree::tSwNumTreeNumber> SwNumberTreeNode::GetNumberVector() const +SwNumberTree::tNumberVector SwNumberTreeNode::GetNumberVector() const { vector<SwNumberTree::tSwNumTreeNumber> aResult; diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 22ff781213dd..9367874f24c5 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -2074,7 +2074,7 @@ SwFrameFormats::~SwFrameFormats() DeleteAndDestroyAll(); } -SwFrameFormats::iterator SwFrameFormats::find( const value_type& x ) const +SwFrameFormats::const_iterator SwFrameFormats::find( const value_type& x ) const { ByTypeAndName::iterator it = m_TypeAndNameIndex.find( boost::make_tuple(x->Which(), x->GetName(), x) ); diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index 0790582777bf..7c76779cd658 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -75,7 +75,7 @@ void AppendAllObjs(const SwFrameFormats* pTable, const SwFrame* pSib); // transparency, saved in the color of the brush item. void DrawGraphic( const SvxBrushItem *, - OutputDevice *, + vcl::RenderContext *, const SwRect &rOrg, const SwRect &rOut, const sal_uInt8 nGrfNum = GRFNUM_NO, @@ -85,11 +85,11 @@ bool DrawFillAttributes( const SwRect& rOriginalLayoutRect, const SwRegionRects& rPaintRegion, const basegfx::utils::B2DClipState& rClipState, - OutputDevice& rOut); + vcl::RenderContext& rOut); // RotGrfFlyFrame: Adapted to rotation void paintGraphicUsingPrimitivesHelper( - OutputDevice & rOutputDevice, + vcl::RenderContext & rOutputDevice, GraphicObject const& rGraphicObj, GraphicAttr const& rGraphicAttr, const basegfx::B2DHomMatrix& rGraphicTransform, @@ -103,7 +103,7 @@ void SwAlignRect( SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContex // method to align graphic rectangle // Created declaration here to avoid <extern> declarations -void SwAlignGrfRect( SwRect *pGrfRect, const OutputDevice &rOut ); +void SwAlignGrfRect( SwRect *pGrfRect, const vcl::RenderContext &rOut ); /** * Paint border around a run of characters using frame painting code. @@ -144,7 +144,7 @@ extern bool bDontCreateObjects; extern bool bSetCompletePaintOnInvalidate; // for table settings via keyboard -long CalcRowRstHeight( SwLayoutFrame *pRow ); +SwTwips CalcRowRstHeight( SwLayoutFrame *pRow ); long CalcHeightWithFlys( const SwFrame *pFrame ); SwPageFrame *InsertNewPage( SwPageDesc &rDesc, SwFrame *pUpper, diff --git a/sw/source/core/inc/paintfrm.hxx b/sw/source/core/inc/paintfrm.hxx index 6f30539e6ffe..b3d4812d6aad 100644 --- a/sw/source/core/inc/paintfrm.hxx +++ b/sw/source/core/inc/paintfrm.hxx @@ -25,8 +25,11 @@ extern Color aGlobalRetoucheColor; class OutputDevice; +namespace vcl { + typedef OutputDevice RenderContext; +}; -void SwCalcPixStatics( OutputDevice const *pOut ); +void SwCalcPixStatics( vcl::RenderContext const *pOut ); #endif // INCLUDED_SW_SOURCE_CORE_INC_PAINTFRM_HXX diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 006b33927a41..3d106bb195c4 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -2076,7 +2076,7 @@ SwRootFrame *SwViewShell::GetLayout() const return mpLayout.get(); } -OutputDevice& SwViewShell::GetRefDev() const +vcl::RenderContext& SwViewShell::GetRefDev() const { OutputDevice* pTmpOut = nullptr; if ( GetWin() && diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 075849739ef3..c3cb2d50a1e2 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -2948,7 +2948,7 @@ void SwEscherEx::WriteOCXControl( const SwFrameFormat& rFormat, sal_uInt32 nShap } void SwEscherEx::MakeZOrderArrAndFollowIds( - std::vector<DrawObj>& rSrcArr, std::vector<DrawObj*>&rDstArr) + std::vector<DrawObj>& rSrcArr, DrawObjPointerVector&rDstArr) { ::lcl_makeZOrderArray(rWrt, rSrcArr, rDstArr); diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 3fdd698a51d6..6918bc0b90d0 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -134,6 +134,7 @@ namespace mark class IFieldmark; } } +typedef std::set< sal_Int32 > SwSoftPageBreakList; #define GRF_MAGIC_1 0x12 // 3 magic bytes for PicLocFc attribute #define GRF_MAGIC_2 0x34 @@ -883,7 +884,7 @@ protected: void BulletDefinitions(); bool NeedSectionBreak( const SwNode& rNd ) const; - bool NeedTextNodeSplit( const SwTextNode& rNd, std::set< sal_Int32 >& pList ) const; + bool NeedTextNodeSplit( const SwTextNode& rNd, SwSoftPageBreakList& pList ) const; std::vector<const Graphic*> m_vecBulletPic; ///< Vector to record all the graphics of bullets diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index a6fa398d9076..b0ba35346da4 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -452,7 +452,7 @@ public: virtual sal_uInt32 GetIdx() const override; virtual void SetIdx(sal_uInt32 nI) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual void GetSprms( WW8PLCFxDesc* p ) override; virtual void advance() override; @@ -477,7 +477,7 @@ public: virtual sal_uInt32 GetIdx() const override; virtual void SetIdx(sal_uInt32 nI) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, sal_Int32& rLen ) override; virtual void advance() override; WW8_CP CurrentPieceStartFc2Cp( WW8_FC nStartPos ); @@ -680,7 +680,7 @@ public: virtual sal_uInt32 GetIdx() const override; virtual void SetIdx(sal_uInt32 nIdx) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual void GetSprms( WW8PLCFxDesc* p ) override; virtual void advance() override; SprmResult HasSprm( sal_uInt16 nId ) const; @@ -708,7 +708,7 @@ public: virtual sal_uInt32 GetIdx() const override; virtual void SetIdx(sal_uInt32 nIdx) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; // returns reference descriptors const void* GetData() const @@ -736,7 +736,7 @@ public: virtual sal_uInt32 GetIdx() const override; virtual void SetIdx(sal_uInt32 nIdx) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual void GetSprms(WW8PLCFxDesc* p) override; virtual void advance() override; bool StartPosIsFieldStart(); @@ -769,7 +769,7 @@ public: virtual sal_uInt32 GetIdx2() const override; virtual void SetIdx2(sal_uInt32 nIdx) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual long GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen ) override; virtual void advance() override; const OUString* GetName() const; @@ -806,7 +806,7 @@ public: virtual sal_uInt32 GetIdx2() const override; virtual void SetIdx2(sal_uInt32 nIdx) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual long GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen ) override; virtual void advance() override; @@ -836,7 +836,7 @@ public: virtual sal_uInt32 GetIdx2() const override; virtual void SetIdx2(sal_uInt32 nIdx) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual long GetNoSprms(WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen) override; virtual void advance() override; |