diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-02 06:21:38 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-02 08:16:27 +0100 |
commit | 5d4dcc5228ce0f1c5eee34101be10ff2fcd5f49c (patch) | |
tree | 46af93df4c431a54d04f931feaf052a5c7d042ad /sw | |
parent | 48dffbd86ea2893c589e816bce2e974edb2cf344 (diff) |
Revert "WW8PLCFx_PCDAttrs::m_aShortSprm can be local"
This reverts commit 2779984709d24ad263547407069a5da0fda36ceb.
Reason for revert: we are storing a pointer to this field
Change-Id: Idce917f676f2f1f845f4f4a3ea6dd911818c3eea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158707
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 17 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.hxx | 2 |
2 files changed, 9 insertions, 10 deletions
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 6f801b929d57..c7b175f56e61 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -1023,13 +1023,12 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p) if (IsSevenMinus(GetFIBVersion())) { - SVBT32 aShortSprm; // mini storage: can contain ONE sprm with 1 byte param - aShortSprm[0] = static_cast<sal_uInt8>( ( nPrm & 0xfe) >> 1 ); - aShortSprm[1] = static_cast<sal_uInt8>( nPrm >> 8 ); + m_aShortSprm[0] = static_cast<sal_uInt8>( ( nPrm & 0xfe) >> 1 ); + m_aShortSprm[1] = static_cast<sal_uInt8>( nPrm >> 8 ); p->nSprmsLen = nPrm ? 2 : 0; // length // store Position of internal mini storage in Data Pointer - p->pMemPos = aShortSprm; + p->pMemPos = m_aShortSprm; } else { @@ -1120,18 +1119,16 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p) if( nSprmId ) { - SVBT32 aShortSprm; // mini storage: can contain ONE sprm with 1 byte param - // move Sprm Id and Sprm Param to internal mini storage: - aShortSprm[0] = static_cast<sal_uInt8>( nSprmId & 0x00ff) ; - aShortSprm[1] = static_cast<sal_uInt8>( ( nSprmId & 0xff00) >> 8 ); - aShortSprm[2] = static_cast<sal_uInt8>( nPrm >> 8 ); + m_aShortSprm[0] = static_cast<sal_uInt8>( nSprmId & 0x00ff) ; + m_aShortSprm[1] = static_cast<sal_uInt8>( ( nSprmId & 0xff00) >> 8 ); + m_aShortSprm[2] = static_cast<sal_uInt8>( nPrm >> 8 ); // store Sprm Length in member: p->nSprmsLen = nPrm ? 3 : 0; // store Position of internal mini storage in Data Pointer - p->pMemPos = aShortSprm; + p->pMemPos = m_aShortSprm; } } } diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index d8fc08334bd6..d69a822554f5 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -437,6 +437,8 @@ private: WW8PLCFpcd_Iter* m_pPcdI; WW8PLCFx_PCD* m_pPcd; std::vector<std::unique_ptr<sal_uInt8[]>> const & mrGrpprls; // attribute of Piece-table + SVBT32 m_aShortSprm; // mini storage: can contain ONE sprm with + // 1 byte param WW8PLCFx_PCDAttrs(const WW8PLCFx_PCDAttrs&) = delete; WW8PLCFx_PCDAttrs& operator=(const WW8PLCFx_PCDAttrs&) = delete; |