summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;