From c1f416feda0ef4ef215ca587b9bac03659b48c7a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 14 Nov 2013 17:25:30 +0100 Subject: SvxBrushItem: Improve Referer from member to GetGraphic[Object] parameter Change-Id: I034132c315b74d0ea5e03b7d5f7cc225a6c8164e --- sw/source/ui/shells/grfsh.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'sw/source/ui/shells/grfsh.cxx') diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index c6dadbfbbe35..949c7e639701 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -209,6 +209,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) SID_DOCFRAME, SID_DOCFRAME, SID_HTML_MODE, SID_HTML_MODE, FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME, + SID_REFERER, SID_REFERER, 0); sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell()); @@ -262,17 +263,11 @@ void SwGrfShell::Execute(SfxRequest &rReq) rSh.GetGrfNms( &sGrfNm, &sFilterNm ); if( !sGrfNm.isEmpty() ) { - OUString sReferer; - SfxObjectShell * sh = rSh.GetDoc()->GetPersist(); - if (sh != 0 && sh->HasName()) - { - sReferer = sh->GetMedium()->GetName(); - } aSet.Put( SvxBrushItem( INetURLObject::decode( sGrfNm, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 ), - sReferer, sFilterNm, GPOS_LT, + sFilterNm, GPOS_LT, SID_ATTR_GRAF_GRAPHIC )); } else @@ -301,6 +296,13 @@ void SwGrfShell::Execute(SfxRequest &rReq) aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame())); + SfxObjectShell * sh = rSh.GetDoc()->GetPersist(); + if (sh != 0 && sh->HasName()) + { + aSet.Put( + SfxStringItem(SID_REFERER, sh->GetMedium()->GetName())); + } + SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "no dialog factory!"); SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog("PictureDialog", -- cgit