summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorArmin Le Grand (Allotropia) <Armin.Le.Grand@me.com>2021-10-14 17:56:22 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2021-10-15 17:15:31 +0200
commite299f1f5e6097d9e5857dba65a65c33ac31974ae (patch)
tree028b093deb1a8dae1dd5e3b519f3e0a4c1c8a421 /sw/source
parent7dc2ac46be574b59cac7923ac55cf650c4fd1168 (diff)
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.grandin@collabora.co.uk> Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx2
-rw-r--r--sw/source/uibase/shells/basesh.cxx3
2 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index ef44f23ca57f..964b2cb610f2 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -1250,6 +1250,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 292b1f10c851..da474db91901 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2713,7 +2713,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 );