include/editeng/svxrtf.hxx | 2 +- sc/source/filter/oox/autofilterbuffer.cxx | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-)
New commits: commit fc1eb075a5bbddebd3359dae79713af3094bfd38 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sat May 27 16:16:24 2023 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sat May 27 20:57:05 2023 +0200 cid#1531780 Dereference null return value Change-Id: I4aa66284b0a9948cd947cc99a119ce4ea2bbf26e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152342 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/filter/oox/autofilterbuffer.cxx b/sc/source/filter/oox/autofilterbuffer.cxx index 8c8050509f38..9fa6de21d46b 100644 --- a/sc/source/filter/oox/autofilterbuffer.cxx +++ b/sc/source/filter/oox/autofilterbuffer.cxx @@ -440,10 +440,12 @@ ApiFilterSettings ColorFilter::finalizeImport() const SfxItemSet& rItemSet = pStyleSheet->GetItemSet(); // Color (whether text or background color) is always stored in ATTR_BACKGROUND - const SvxBrushItem* pItem = rItemSet.GetItem<SvxBrushItem>(ATTR_BACKGROUND); - ::Color aColor = pItem->GetFiltColor(); - util::Color nColor(aColor); - aSettings.appendField(true, nColor, mbIsBackgroundColor); + if (const SvxBrushItem* pItem = rItemSet.GetItem<SvxBrushItem>(ATTR_BACKGROUND)) + { + ::Color aColor = pItem->GetFiltColor(); + util::Color nColor(aColor); + aSettings.appendField(true, nColor, mbIsBackgroundColor); + } return aSettings; } commit 2743839c4ac3aaaf6bafc31bebfb67254173f7ee Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sat May 27 16:12:18 2023 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sat May 27 20:56:57 2023 +0200 ofz#59362 aPardMap returns 0 'Which' for SID_ATTR_BORDER_OUTER since: commit 839c5010241842835a1c066be0838df4a8a53dc7 Date: Wed May 24 16:40:59 2023 +0200 use more TypedWhichId in editeng cause operato[] is just a getter now Change-Id: I2c5cc21131dffd0e9840b65185c2491ed6183bd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152341 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/include/editeng/svxrtf.hxx b/include/editeng/svxrtf.hxx index a70264381d51..33e6eaf32b11 100644 --- a/include/editeng/svxrtf.hxx +++ b/include/editeng/svxrtf.hxx @@ -212,7 +212,7 @@ public: void SetAttrPool( SfxItemPool* pNewPool ) { pAttrPool = pNewPool; } // to set different WhichIds for a different pool. template<class T> - void SetPardMap(TypedWhichId<T> wid, TypedWhichId<T> widTrue) { aPardMap[wid] = widTrue; } + void SetPardMap(TypedWhichId<T> wid, TypedWhichId<T> widTrue) { aPardMap.set(wid, widTrue); } // to be able to assign them from the outside as for example table cells void ReadBorderAttr( int nToken, SfxItemSet& rSet, bool bTableDef=false ); void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, bool bTableDef=false );