From 61ff1d919e317947c769e61eeda7f1bb8132f273 Mon Sep 17 00:00:00 2001 From: Gulsah Kose Date: Fri, 26 May 2017 15:14:45 +0300 Subject: tdf#107589 Make description editable from Options tab. That commit makes possible to edit descriptions of images frames and objects from "Options" tab of Object/Properties dialogs Change-Id: I62d06b32da6919df62ff77b50c4c77d6a265bd64 Signed-off-by: Gulsah Kose Reviewed-on: https://gerrit.libreoffice.org/38176 Tested-by: Jenkins --- sw/source/uibase/shells/grfsh.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sw/source/uibase/shells/grfsh.cxx') diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index a334edc3edf7..2fb6a19713a4 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -244,6 +244,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) FN_SET_FRM_NAME,FN_KEEP_ASPECT_RATIO, // [21306 FN_SET_FRM_ALT_NAME,FN_SET_FRM_ALT_NAME, // [21318 SID_REFERER, SID_REFERER, + FN_UNO_DESCRIPTION, FN_UNO_DESCRIPTION, // [21320 0); // create needed items for XPropertyList entries from the DrawModel so that @@ -267,6 +268,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) aSet.Put( aFrameSize ); aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName())); + aSet.Put(SfxStringItem(FN_UNO_DESCRIPTION, rSh.GetObjDescription())); if ( nSlot == FN_FORMAT_GRAFIC_DLG ) { // #i73249# @@ -455,6 +457,10 @@ void SwGrfShell::Execute(SfxRequest &rReq) rSh.SetObjTitle( static_cast(pItem)->GetValue() ); } + if ( SfxItemState::SET == pSet->GetItemState( + FN_UNO_DESCRIPTION, true, &pItem )) + rSh.SetObjDescription( static_cast(pItem)->GetValue() ); + SfxItemSet aGrfSet( rSh.GetAttrPool(), RES_GRFATR_BEGIN, RES_GRFATR_END-1 ); aGrfSet.Put( *pSet ); -- cgit