summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorGulsah Kose <gulsah.1004@gmail.com>2016-11-10 17:32:11 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2016-11-13 16:15:06 +0000
commitc3c08a16f8317266bcb86041d812d8a9821c237f (patch)
treedd76d3884d34c8090486a044eb1de535ddf7e7eb /sw
parent33ae095d92246cd2c74c30c9e070a8e0241926db (diff)
tdf#103268 Activate editing object name function for writer images.
Change-Id: Idfe88a3f5b7492dc6ac71fa3791839a000a7483b Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/30759 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/sdi/_frmsh.sdi7
-rw-r--r--sw/source/uibase/shells/frmsh.cxx25
2 files changed, 31 insertions, 1 deletions
diff --git a/sw/sdi/_frmsh.sdi b/sw/sdi/_frmsh.sdi
index e496cecf9de1..2ccb88f2534b 100644
--- a/sw/sdi/_frmsh.sdi
+++ b/sw/sdi/_frmsh.sdi
@@ -369,6 +369,13 @@ interface BaseTextFrame
StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ // tdf#103268
+ FN_NAME_SHAPE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+ ]
// Abfragefunktionen fuer ImageMaps
// Slots ohne Export
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 764d0049e35e..3b962a75466f 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -614,6 +614,29 @@ void SwFrameShell::Execute(SfxRequest &rReq)
rReq.SetReturnValue(SfxBoolItem(nSlot, bMirror));
}
break;
+ case FN_NAME_SHAPE:
+ {
+ bUpdateMgr = false;
+ SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
+ if ( pSdrView &&
+ pSdrView->GetMarkedObjectCount() == 1 )
+ {
+ OUString aName(rSh.GetFlyName());
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ assert(pFact);
+ ScopedVclPtr<AbstractSvxObjectNameDialog> pDlg(
+ pFact->CreateSvxObjectNameDialog( aName ));
+
+ assert(pDlg);
+
+ if ( pDlg->Execute() == RET_OK )
+ {
+ pDlg->GetName(aName);
+ rSh.SetFlyName(aName);
+ }
+ }
+ }
+ break;
// #i73249#
case FN_TITLE_DESCRIPTION_SHAPE:
{
@@ -917,6 +940,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
break;
// #i73249#
case FN_TITLE_DESCRIPTION_SHAPE:
+ case FN_NAME_SHAPE:
{
SwWrtShell &rWrtSh = GetShell();
SdrView* pSdrView = rWrtSh.GetDrawViewWithValidMarkList();
@@ -925,7 +949,6 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
{
rSet.DisableItem( nWhich );
}
-
}
break;