diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-07 15:58:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-10 08:27:34 +0200 |
commit | 19b34f615c04555f27978e2823ba735a9c9f882e (patch) | |
tree | faa096bdff1167537a4537cf0d931af8f023290f /include | |
parent | ccb6513baf6eae9af40eecd05a2991bdd3ce3bbf (diff) |
loplugin:useuniqueptr in filter
Change-Id: Ie64ba38d607733b457d66ed1b9af84303c676e13
Reviewed-on: https://gerrit.libreoffice.org/39695
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/filter/msfilter/escherex.hxx | 15 | ||||
-rw-r--r-- | include/filter/msfilter/msdffimp.hxx | 10 | ||||
-rw-r--r-- | include/filter/msfilter/svdfppt.hxx | 6 |
3 files changed, 17 insertions, 14 deletions
diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx index 47845d2391e5..53ca59a7661d 100644 --- a/include/filter/msfilter/escherex.hxx +++ b/include/filter/msfilter/escherex.hxx @@ -559,10 +559,8 @@ class MSFILTER_DLLPUBLIC EscherGraphicProvider { EscherGraphicProviderFlags mnFlags; - EscherBlibEntry** mpBlibEntrys; - sal_uInt32 mnBlibBufSize; - sal_uInt32 mnBlibEntrys; - + std::vector<std::unique_ptr<EscherBlibEntry>> + mvBlibEntrys; OUString maBaseURI; protected: @@ -581,7 +579,7 @@ public: const GraphicAttr* pGrafikAttr = nullptr, const bool ooxmlExport = false ); - bool HasGraphics() const { return mnBlibEntrys != 0; }; + bool HasGraphics() const { return !mvBlibEntrys.empty(); }; void SetNewBlipStreamOffset( sal_Int32 nOffset ); @@ -592,6 +590,8 @@ public: EscherGraphicProvider( EscherGraphicProviderFlags nFlags = EscherGraphicProviderFlags::NONE ); virtual ~EscherGraphicProvider(); + EscherGraphicProvider& operator=( EscherGraphicProvider const & ) = delete; // MSVC2015 workaround + EscherGraphicProvider( EscherGraphicProvider const & ) = delete; // MSVC2015 workaround }; struct EscherShapeListEntry; @@ -649,12 +649,11 @@ class MSFILTER_DLLPUBLIC EscherPropertyContainer SvStream* pPicOutStrm; tools::Rectangle* pShapeBoundRect; - sal_uInt32 nSortCount; - sal_uInt32 nSortBufSize; sal_uInt32 nCountCount; sal_uInt32 nCountSize; - EscherPropSortStruct* pSortStruct; + std::vector<EscherPropSortStruct> + pSortStruct; bool bHasComplexData; diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index d87dec093fe8..3dff33e6269c 100644 --- a/include/filter/msfilter/msdffimp.hxx +++ b/include/filter/msfilter/msdffimp.hxx @@ -211,9 +211,11 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec SdrObject* pObj; tools::Polygon* pWrapPolygon; - char* pClientAnchorBuffer; + std::unique_ptr<char[]> + pClientAnchorBuffer; sal_uInt32 nClientAnchorLen; - char* pClientDataBuffer; + std::unique_ptr<char[]> + pClientDataBuffer; sal_uInt32 nClientDataLen; sal_uInt32 nXAlign; sal_uInt32 *pXRelTo; @@ -483,14 +485,14 @@ protected: // the following methods need to be overridden for Excel imports static bool ProcessClientAnchor( SvStream& rStData, sal_uInt32 nDatLen, - char*& rpBuff, + std::unique_ptr<char[]>& rpBuff, sal_uInt32& rBuffLen ); virtual void ProcessClientAnchor2( SvStream& rStData, DffRecordHeader& rHd, void* pData, DffObjData& ); static bool ProcessClientData( SvStream& rStData, sal_uInt32 nDatLen, - char*& rpBuff, + std::unique_ptr<char[]>& rpBuff, sal_uInt32& rBuffLen ); virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx index b319f3fa9e90..8643be9d6481 100644 --- a/include/filter/msfilter/svdfppt.hxx +++ b/include/filter/msfilter/svdfppt.hxx @@ -342,7 +342,8 @@ struct PptSlidePersistEntry sal_uInt32 nSlidePersistEndOffset; sal_uInt32 nBackgroundOffset; // fileoffset sal_uInt32 nDrawingDgId; // valid, if not -1 - sal_uInt32* pPresentationObjects; // if valid, this is a pointer to an array that includes the offsets to the presentation objects + std::unique_ptr<sal_uInt32[]> + pPresentationObjects; // if valid, this is a pointer to an array that includes the offsets to the presentation objects // on this masterpage for each instance (0 - 8); SdrObject* pBObj; bool bBObjIsTemporary; @@ -538,7 +539,8 @@ protected: PptUserEditAtom aUserEditAtom; PptColorSchemeAtom aPageColors; ::std::vector< SdHyperlinkEntry* > aHyperList; - sal_uInt32* pPersistPtr; + std::unique_ptr<sal_uInt32[]> + pPersistPtr; sal_uInt32 nPersistPtrAnz; const PPTStyleSheet* pPPTStyleSheet; // this is the current stylesheet; |