13#include <bitmaps.hlst>
16 std::unique_ptr<weld::Button> xAdd,
17 std::unique_ptr<weld::Button> xDel,
20 , mxImpl(
std::move(xControl))
21 , mxAddBtn(
std::move(xAdd))
22 , mxDelBtn(
std::move(xDel))
26 Size aSize(
mxImpl->get_approximate_digit_width() * 18,
27 mxImpl->get_height_rows(9));
42 mxImpl->append_text(pPlace->GetName());
45 if(pPlace->IsEditable()) {
93 OUString theImage = BMP_FILEDLG_PLACE_LOCAL;
94 if ( !pPlace->IsLocal( ) )
95 theImage = BMP_FILEDLG_PLACE_REMOTE;
101 sal_uInt32 nSelected = mxImpl->get_cursor_index();
102 PlacePtr pPlace = maPlaces[nSelected];
104 if (pPlace->IsEditable())
105 mpDlg->RemovablePlaceSelected();
107 mpDlg->RemovablePlaceSelected(
false);
114 sal_uInt16 nSelected = mxImpl->get_cursor_index();
115 PlacePtr pPlace = maPlaces[nSelected];
116 if ( !pPlace->IsEditable() || pPlace->IsLocal( ) )
118 PlaceEditDialog aDlg(mpDlg->getDialog(), pPlace);
119 short aRetCode = aDlg.run();
124 pPlace->SetName ( aDlg.GetServerName() );
125 pPlace->SetUrl( aDlg.GetServerUrl() );
131 RemovePlace(nSelected);
142 const OUString sText = mxImpl->get_text(rIter);
143 for (
const auto& pPlace : maPlaces)
145 if (pPlace->GetName() == sText)
153 sal_uInt32 nSelected =
mxImpl->get_cursor_index();
IMPL_LINK(PlacesListBox, QueryTooltipHdl, const weld::TreeIter &, rIter, OUString)
IMPL_LINK_NOARG(PlacesListBox, Selection, weld::TreeView &, void)
std::shared_ptr< Place > PlacePtr
ListBox to handle Places.
std::unique_ptr< weld::Button > mxAddBtn
void AppendPlace(const PlacePtr &pPlace)
void RemoveSelectedPlace()
std::unique_ptr< weld::Button > mxDelBtn
void RemovePlace(sal_uInt16 nPos)
void SetAddHdl(const Link< weld::Button &, void > &rHdl)
PlacesListBox(std::unique_ptr< weld::TreeView > xTreeView, std::unique_ptr< weld::Button > xAddBtn, std::unique_ptr< weld::Button > xDelBtn, SvtFileDialog *pFileDlg)
void SetDelHdl(const Link< weld::Button &, void > &rHdl)
std::unique_ptr< weld::TreeView > mxImpl
std::vector< PlacePtr > maPlaces
void SetDelEnabled(bool enabled)
static OUString getEntryIcon(const PlacePtr &pPlace)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
void OpenURL_Impl(const OUString &rURL)
#define LINK(Instance, Class, Member)