sw/source/core/docnode/ndtbl1.cxx | 2 ++ sw/source/uibase/shells/basesh.cxx | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)
New commits: commit 42b7c8c105602668f119d70f7c0aaf6e82aa9785 Author: Armin Le Grand (Allotropia) <armin.le.gr...@me.com> AuthorDate: Thu Oct 14 17:56:22 2021 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Oct 18 12:35:12 2021 +0200 tdf#144843 call to GetBoxBackground requires incarnated item Change-Id: Id47f26a762804cd8c1b5742966ec54b71a26ab09 Added assert/warning to SwDoc::GetBoxAttr - that is the method used by GetBoxBackground && GetBoxDirection Change-Id: I59e8dfb790e3872810885a8f888cea57be27e80c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123619 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Armin Le Grand <armin.le.gr...@me.com> (cherry picked from commit e299f1f5e6097d9e5857dba65a65c33ac31974ae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123640 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index b0fb85487a1e..3e864f2145c0 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -1223,6 +1223,8 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew ) bool SwDoc::GetBoxAttr( const SwCursor& rCursor, std::unique_ptr<SfxPoolItem>& rToFill ) { + // tdf#144843 calling GetBoxAttr *requires* object + assert(rToFill && "requires object here"); bool bRet = false; SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); SwSelBoxes aBoxes; diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 6812cc3d9b3d..dc831d1b142b 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -2714,7 +2714,8 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) if ( rSh.IsTableMode() ) { // Get background attributes of the table and put it in the set - std::unique_ptr<SvxBrushItem> aBrush; + // tdf#144843 calling GetBoxBackground *requires* an incarnation to be handed over + std::unique_ptr<SvxBrushItem> aBrush(std::make_unique<SvxBrushItem>(RES_BACKGROUND)); rSh.GetBoxBackground( aBrush ); pDlg.disposeAndReset(pFact->CreateSwBackgroundDialog(pMDI, aSet)); aSet.Put( *aBrush );