summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-26 14:26:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-27 07:35:44 +0100
commit7f2e5c9ad2ca1d4a57163d0375b1c03772ef5b0a (patch)
tree4f9835ef6adade164173377a9106103363a1c405 /sd/source/ui
parent4d502ef3559f53d75e4ee3c85b90ea36816049e8 (diff)
m_bShowAllShapes in SdPageObjsTLV is dead
since commit c4a91f1409fc21d92f207718f29377c2862e381f Date: Mon Feb 11 17:32:44 2019 +0000 weld SdInsertPagesObjsDlg Change-Id: I9644c492d02e930592fd568c15f2f87d12f4f038 Reviewed-on: https://gerrit.libreoffice.org/68386 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx28
-rw-r--r--sd/source/ui/inc/sdtreelb.hxx9
2 files changed, 9 insertions, 28 deletions
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 50f571174508..2fa3dc9c4e42 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -1413,7 +1413,6 @@ SdPageObjsTLV::SdPageObjsTLV(std::unique_ptr<weld::TreeView> xTreeView)
, m_pMedium(nullptr)
, m_pOwnMedium(nullptr)
, m_bLinkableSelected(false)
- , m_bShowAllShapes(false)
{
m_xTreeView->connect_expanding(LINK(this, SdPageObjsTLV, RequestingChildrenHdl));
m_xTreeView->connect_changed(LINK(this, SdPageObjsTLV, SelectHdl));
@@ -1431,28 +1430,17 @@ IMPL_LINK_NOARG(SdPageObjsTLV, SelectHdl, weld::TreeView&, void)
m_aChangeHdl.Call(*m_xTreeView);
}
-OUString SdPageObjsTLV::GetObjectName(
- const SdrObject* pObject,
- const bool bCreate) const
+OUString SdPageObjsTLV::GetObjectName(const SdrObject* pObject)
{
- OUString aRet;
+ if ( !pObject )
+ return OUString();
- if ( pObject )
- {
- aRet = pObject->GetName();
+ OUString aRet = pObject->GetName();
+ if (!aRet.isEmpty())
+ return aRet;
- if (aRet.isEmpty() && dynamic_cast<const SdrOle2Obj* >(pObject) != nullptr)
- aRet = static_cast< const SdrOle2Obj* >( pObject )->GetPersistName();
- }
-
- if (bCreate
- && m_bShowAllShapes
- && aRet.isEmpty()
- && pObject!=nullptr)
- {
- aRet = SdResId(STR_NAVIGATOR_SHAPE_BASE_NAME);
- aRet = aRet.replaceFirst("%1", OUString::number(pObject->GetOrdNum() + 1));
- }
+ if (auto pOle = dynamic_cast<const SdrOle2Obj* >(pObject))
+ aRet = pOle->GetPersistName();
return aRet;
}
diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx
index 41f45b1f0729..b954175c5d18 100644
--- a/sd/source/ui/inc/sdtreelb.hxx
+++ b/sd/source/ui/inc/sdtreelb.hxx
@@ -301,7 +301,6 @@ private:
SfxMedium* m_pMedium;
SfxMedium* m_pOwnMedium;
bool m_bLinkableSelected;
- bool m_bShowAllShapes;
OUString m_aDocName;
::sd::DrawDocShellRef m_xBookmarkDocShRef; ///< for the loading of bookmarks
Link<weld::TreeView&, void> m_aChangeHdl;
@@ -314,14 +313,8 @@ private:
@param pObject
When this is NULL then an empty string is returned, regardless
of the value of bCreate.
- @param bCreate
- This flag controls for objects without user supplied name
- whether a name is created. When a name is created then this
- name is not stored in the object.
*/
- OUString GetObjectName (
- const SdrObject* pObject,
- const bool bCreate = true) const;
+ static OUString GetObjectName (const SdrObject* pObject);
void CloseBookmarkDoc();