sw/sdi/_frmsh.sdi | 7 +++++++ sw/source/uibase/shells/frmsh.cxx | 25 ++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-)
New commits: commit c3c08a16f8317266bcb86041d812d8a9821c237f Author: Gulsah Kose <[email protected]> Date: Thu Nov 10 17:32:11 2016 +0300 tdf#103268 Activate editing object name function for writer images. Change-Id: Idfe88a3f5b7492dc6ac71fa3791839a000a7483b Signed-off-by: Gulsah Kose <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/30759 Tested-by: Jenkins <[email protected]> Reviewed-by: Maxim Monastirsky <[email protected]> diff --git a/sw/sdi/_frmsh.sdi b/sw/sdi/_frmsh.sdi index e496cecf..2ccb88f 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 764d004..3b962a7 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; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
