diff options
author | Justin Luth <justin.luth@collabora.com> | 2021-04-12 08:13:53 +0200 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2021-04-19 10:25:37 +0200 |
commit | 531993161d6fe8065436191666cc88d7c4c20749 (patch) | |
tree | f271a16a8aeb3e6a6517882537d5a0068e01ddb2 /sw/source/filter/ww8/ww8par.hxx | |
parent | 4df2b8274af74058683c5a9cef8620fb083998fa (diff) |
cid#1476017 Read_GrafLayer's subfunction params are never null
A more comprehensive backtrack of pRecord shows that it
was never null in this context
(and might as well do the same for any other
never-null-variables in these sub-functions).
I also took pains to (most of the time)
clang-format the lines that I modified.
I'm not sure how some subfunctions
(like SetAttributesAtGrfNode)
get away with no errors when they are passed a pointer,
but never check if it exists. Perhaps if you use it
without ever checking it accepts that?
Change-Id: Iaaacd142310340d1f54af4eb61d856d61df0dd50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113990
Tested-by: Jenkins
Tested-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/source/filter/ww8/ww8par.hxx')
-rw-r--r-- | sw/source/filter/ww8/ww8par.hxx | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index ec3702a68a39..ce027e87fb6d 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1492,10 +1492,10 @@ private: SvxLRSpaceItem &rLR); static void AdjustULWrapForWordMargins(const SvxMSDffImportRec &rRecord, SvxULSpaceItem &rUL); - static void MapWrapIntoFlyFormat(SvxMSDffImportRec const * pRecord, SwFrameFormat* pFlyFormat); + static void MapWrapIntoFlyFormat(const SvxMSDffImportRec& rRecord, SwFrameFormat& rFlyFormat); - void SetAttributesAtGrfNode(SvxMSDffImportRec const* pRecord, - SwFrameFormat const *pFlyFormat, WW8_FSPA const *pF); + void SetAttributesAtGrfNode(const SvxMSDffImportRec& rRecord, const SwFrameFormat& rFlyFormat, + WW8_FSPA const* pF); bool IsDropCap() const; bool IsListOrDropcap() const { return (!m_xCurrentItemSet || m_bDropCap); }; @@ -1611,21 +1611,20 @@ private: SdrObject *ReadCaptionBox(WW8_DPHEAD const * pHd, SfxAllItemSet &rSet); SdrObject *ReadGroup(WW8_DPHEAD const * pHd, SfxAllItemSet &rSet); SdrObject *ReadGrafPrimitive(short& rLeft, SfxAllItemSet &rSet); - void ReadGrafLayer1( WW8PLCFspecial* pPF, tools::Long nGrafAnchorCp ); + void ReadGrafLayer1(WW8PLCFspecial& rPF, tools::Long nGrafAnchorCp); SdrObject* CreateContactObject(SwFrameFormat* pFlyFormat); - RndStdIds ProcessEscherAlign(SvxMSDffImportRec* pRecord, WW8_FSPA *pFSPA, - SfxItemSet &rFlySet); + RndStdIds ProcessEscherAlign(SvxMSDffImportRec& rRecord, WW8_FSPA& rFSPA, SfxItemSet& rFlySet); bool MiserableRTLGraphicsHack(SwTwips &rLeft, SwTwips nWidth, sal_Int16 eHoriOri, sal_Int16 eHoriRel); SwFrameFormat* Read_GrafLayer( tools::Long nGrafAnchorCp ); - SwFlyFrameFormat* ImportReplaceableDrawables( SdrObject* &rpObject, - SdrObject* &rpOurNewObject, SvxMSDffImportRec* pRecord, WW8_FSPA *pF, - SfxItemSet &rFlySet ); - SwFlyFrameFormat *ConvertDrawTextToFly( SdrObject* &rpObject, - SdrObject* &rpOurNewObject, SvxMSDffImportRec const * pRecord, - RndStdIds eAnchor, WW8_FSPA const *pF, SfxItemSet &rFlySet ); - SwFrameFormat* MungeTextIntoDrawBox(SvxMSDffImportRec *pRecord, - tools::Long nGrafAnchorCp, SwFrameFormat *pRetFrameFormat); + SwFlyFrameFormat* ImportReplaceableDrawables(SdrObject*& rpObject, SdrObject*& rpOurNewObject, + SvxMSDffImportRec& rRecord, WW8_FSPA& rF, + SfxItemSet& rFlySet); + SwFlyFrameFormat* ConvertDrawTextToFly(SdrObject*& rpObject, SdrObject*& rpOurNewObject, + const SvxMSDffImportRec& rRecord, RndStdIds eAnchor, + const WW8_FSPA& rF, SfxItemSet& rFlySet); + SwFrameFormat* MungeTextIntoDrawBox(SvxMSDffImportRec& rRecord, tools::Long nGrafAnchorCp, + SwFrameFormat* pRetFrameFormat); void GraphicCtor(); void GraphicDtor(); |