summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx6
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx16
-rw-r--r--sd/source/ui/inc/sdtreelb.hxx9
3 files changed, 21 insertions, 10 deletions
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 8eceb1c0c5a6..0e2762ce762e 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -753,7 +753,7 @@ void CustomAnimationList::update()
mxEntries.emplace_back(std::make_unique<CustomAnimationListEntryItem>(aDescription, nullptr));
OUString sId(OUString::number(reinterpret_cast<sal_Int64>(mxEntries.back().get())));
- mxTreeView->insert(nullptr, -1, &aDescription, &sId, nullptr, nullptr, nullptr, false, nullptr);
+ mxTreeView->insert(nullptr, -1, &aDescription, &sId, nullptr, nullptr, false, nullptr);
std::for_each( pIS->getBegin(), pIS->getEnd(), stl_append_effect_func( *this ) );
mxLastParentEntry.reset();
}
@@ -894,12 +894,12 @@ void CustomAnimationList::append( CustomAnimationEffectPtr pEffect )
if (xParentEntry)
{
// add a subentry
- mxTreeView->insert(xParentEntry.get(), -1, &aDescription, &sId, nullptr, nullptr, nullptr, false, xEntry.get());
+ mxTreeView->insert(xParentEntry.get(), -1, &aDescription, &sId, nullptr, nullptr, false, xEntry.get());
}
else
{
// add a root entry
- mxTreeView->insert(nullptr, -1, &aDescription, &sId, nullptr, nullptr, nullptr, false, xEntry.get());
+ mxTreeView->insert(nullptr, -1, &aDescription, &sId, nullptr, nullptr, false, xEntry.get());
// and the new root entry becomes the possible next group header
mxLastTargetShape = xTargetShape;
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 485c0f48fa30..38772de43da2 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -639,6 +639,7 @@ void SdPageObjsTLV::AddShapeToTransferable (
SdPageObjsTLV::SdPageObjsTLV(std::unique_ptr<weld::TreeView> xTreeView)
: m_xTreeView(std::move(xTreeView))
+ , m_xScratchIter(m_xTreeView->make_iterator())
, m_xDropTargetHelper(new SdPageObjsTLVDropTarget(*m_xTreeView))
, m_xAccel(::svt::AcceleratorExecute::createAcceleratorHelper())
, m_pDoc(nullptr)
@@ -866,7 +867,8 @@ IMPL_LINK(SdPageObjsTLV, RequestingChildrenHdl, const weld::TreeIter&, rFileEntr
{
OUString sId(OUString::number(1));
m_xTreeView->insert(&rFileEntry, -1, &pPage->GetName(), &sId,
- nullptr, nullptr, &sImgPage, false, nullptr);
+ nullptr, nullptr, false, m_xScratchIter.get());
+ m_xTreeView->set_image(*m_xScratchIter, sImgPage);
if (!xPageEntry)
{
@@ -887,17 +889,20 @@ IMPL_LINK(SdPageObjsTLV, RequestingChildrenHdl, const weld::TreeIter&, rFileEntr
if( pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_OLE2 )
{
m_xTreeView->insert(xPageEntry.get(), -1, &aStr, nullptr,
- nullptr, nullptr, &sImgOle, false, nullptr);
+ nullptr, nullptr, false, m_xScratchIter.get());
+ m_xTreeView->set_image(*m_xScratchIter, sImgOle);
}
else if( pObj->GetObjInventor() == SdrInventor::Default && pObj->GetObjIdentifier() == OBJ_GRAF )
{
m_xTreeView->insert(xPageEntry.get(), -1, &aStr, nullptr,
- nullptr, nullptr, &sImgGraphic, false, nullptr);
+ nullptr, nullptr, false, m_xScratchIter.get());
+ m_xTreeView->set_image(*m_xScratchIter, sImgGraphic);
}
else
{
m_xTreeView->insert(xPageEntry.get(), -1, &aStr, nullptr,
- nullptr, nullptr, &sImgObjects, false, nullptr);
+ nullptr, nullptr, false, m_xScratchIter.get());
+ m_xTreeView->set_image(*m_xScratchIter, sImgObjects);
}
}
}
@@ -1125,7 +1130,8 @@ void SdPageObjsTLV::Fill( const SdDrawDocument* pInDoc, SfxMedium* pInMedium,
OUString sId(OUString::number(1));
// insert document name
- m_xTreeView->insert(nullptr, -1, &m_aDocName, &sId, nullptr, nullptr, &sImgDoc, true, nullptr);
+ m_xTreeView->insert(nullptr, -1, &m_aDocName, &sId, nullptr, nullptr, true, m_xScratchIter.get());
+ m_xTreeView->set_image(*m_xScratchIter, sImgDoc);
}
/**
diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx
index 43bdbffded40..4119ace36a47 100644
--- a/sd/source/ui/inc/sdtreelb.hxx
+++ b/sd/source/ui/inc/sdtreelb.hxx
@@ -70,6 +70,7 @@ private:
static bool SAL_DLLPRIVATE bIsInDrag; ///< static, in the case the navigator is deleted in ExecuteDrag
std::unique_ptr<weld::TreeView> m_xTreeView;
+ std::unique_ptr<weld::TreeIter> m_xScratchIter;
std::unique_ptr<SdPageObjsTLVDropTarget> m_xDropTargetHelper;
std::unique_ptr<::svt::AcceleratorExecute> m_xAccel;
VclPtr<SdNavigatorWin> m_xNavigator;
@@ -319,12 +320,16 @@ public:
void InsertEntry(const OUString &rName, const OUString &rExpander)
{
- m_xTreeView->insert(nullptr, -1, &rName, nullptr, nullptr, nullptr, &rExpander, false, nullptr);
+ m_xTreeView->insert(nullptr, -1, &rName, nullptr, nullptr, nullptr, false, m_xScratchIter.get());
+ m_xTreeView->set_image(*m_xScratchIter, rExpander);
}
void InsertEntry(const weld::TreeIter* pParent, const OUString& rId, const OUString &rName, const OUString &rExpander, weld::TreeIter* pEntry = nullptr)
{
- m_xTreeView->insert(pParent, -1, &rName, &rId, nullptr, nullptr, &rExpander, false, pEntry);
+ m_xTreeView->insert(pParent, -1, &rName, &rId, nullptr, nullptr, false, m_xScratchIter.get());
+ m_xTreeView->set_image(*m_xScratchIter, rExpander);
+ if (pEntry)
+ m_xTreeView->copy_iterator(*m_xScratchIter, *pEntry);
}
//Mark Current Entry