summaryrefslogtreecommitdiffstats
path: root/sw/source/ui/shells
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-11-14 17:25:30 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-11-14 17:25:47 +0100
commitc1f416feda0ef4ef215ca587b9bac03659b48c7a (patch)
tree034acd437ef021c2580682b38bd5a8361618ce93 /sw/source/ui/shells
parentfix build (diff)
downloadcore-c1f416feda0ef4ef215ca587b9bac03659b48c7a.tar.gz
core-c1f416feda0ef4ef215ca587b9bac03659b48c7a.zip
SvxBrushItem: Improve Referer from member to GetGraphic[Object] parameter
Change-Id: I034132c315b74d0ea5e03b7d5f7cc225a6c8164e
Diffstat (limited to 'sw/source/ui/shells')
-rw-r--r--sw/source/ui/shells/grfsh.cxx16
1 files changed, 9 insertions, 7 deletions
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",