sw/source/ui/envelp/envfmt.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit ad2310fec997c73e7546c27aa2aaf2dfd6dbbdf6 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Oct 26 10:14:33 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Oct 26 12:13:42 2022 +0200 crashreporting: crash in area tab page with insert, envelope insert, envelope, format, addressee: format: edit: paragraph, area, click on gradient, bitmap, etc. Change-Id: I121674776662b31dc4e3cf96fbeb2c1d234ae00e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141864 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx index fd0ad0915249..818b913611cb 100644 --- a/sw/source/ui/envelp/envfmt.cxx +++ b/sw/source/ui/envelp/envfmt.cxx @@ -23,10 +23,13 @@ #include <editeng/tstpitem.hxx> #include <editeng/lrspitem.hxx> #include <svtools/unitconv.hxx> +#include <svx/drawitem.hxx> #include <o3tl/string_view.hxx> #include <osl/diagnose.h> #include <cmdid.h> +#include <IDocumentDrawModelAccess.hxx> +#include <drawdoc.hxx> #include <wrtsh.hxx> #include <view.hxx> #include "envfmt.hxx" @@ -221,6 +224,13 @@ void SwEnvFormatPage::Edit(std::string_view rIdent, bool bSender) // set BoxInfo ::PrepareBoxInfo( aTmpSet, *pSh ); + SwDrawModel* pDrawModel = pSh->GetView().GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel(); + aTmpSet.Put(SvxColorListItem(pDrawModel->GetColorList(), SID_COLOR_TABLE)); + aTmpSet.Put(SvxGradientListItem(pDrawModel->GetGradientList(), SID_GRADIENT_LIST)); + aTmpSet.Put(SvxHatchListItem(pDrawModel->GetHatchList(), SID_HATCH_LIST)); + aTmpSet.Put(SvxBitmapListItem(pDrawModel->GetBitmapList(), SID_BITMAP_LIST)); + aTmpSet.Put(SvxPatternListItem(pDrawModel->GetPatternList(), SID_PATTERN_LIST)); + const OUString sFormatStr = pColl->GetName(); SwParaDlg aDlg(GetFrameWeld(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFormatStr);