26#include <osl/diagnose.h>
27#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
28#include <com/sun/star/sdbc/SQLException.hpp>
40 , nEntry(pBox->get_widget().get_selected_index())
46 , m_xTreeView(m_xBuilder->weld_tree_view(
"treeview"))
49 , m_nDropEvent(nullptr)
64 if (rCEvt.GetCommand() != CommandEventId::ContextMenu)
66 m_pTabWin->Command(rCEvt);
73 m_pTabWin->getDesignView()->getController().showError(
74 m_pTabWin->getDesignView()->getController().clearOccurredError());
106 if (xConnection.is())
110 bCase = xMeta->supportsMixedCaseQuotedIdentifiers();
114 if (bCase ? rEntryText ==
m_xTreeView->get_text(nEntry)
119 catch (SQLException&)
129 m_pTabWin->getTableView()->Invalidate(InvalidateFlags::NoChildren);
134 rUnsetDragIcon =
false;
135 if (m_xTreeView->get_selected_index() == -1)
146 bool bFirstNotAllowed = m_xTreeView->is_selected(0) && m_pTabWin->GetData()->IsShowAll();
150 m_xHelper->setDescriptors(jxdSource, bFirstNotAllowed);
161 std::unique_ptr<weld::TreeIter> xEntry(
m_xTreeView->make_iterator());
168 SotClipboardFormatId::SBA_TABID)
186 && (
m_xTreeView->get_iter_index_in_parent(*xEntry) == 0)))
195 m_nUiEvent =
nullptr;
196 m_pTabWin->getTableView()->lookForUiActivities();
202 m_nDropEvent =
nullptr;
203 OSL_ENSURE(m_pTabWin,
"No TableWindow!");
207 OSL_ENSURE(pCont,
"No QueryTableView!");
208 pCont->
AddConnection(m_aDropInfo.aSource, m_aDropInfo.aDest);
210 catch (
const SQLException& e)
213 m_pTabWin->getDesignView()->getController().setErrorOccurred(
252 std::unique_ptr<weld::TreeIter> xCurrent =
m_xTreeView->make_iterator();
267 OSL_ENSURE(pParent !=
nullptr,
"OTableWindowListBox::OnDoubleClick : have no Parent !");
269 std::unique_ptr<weld::TreeIter> xCurrent = m_xTreeView->make_iterator();
270 if (!m_xTreeView->get_cursor(xCurrent.get()))
273 static_cast<OTableWindow*
>(pParent)->OnEntryDoubleClicked(*xCurrent);
282 case CommandEventId::ContextMenu:
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
CommandEventId GetCommand() const
virtual void dispose() override
virtual void GetFocus() override
const DataFlavorExVector & GetDataFlavorExVector() const
OJoinController & getController() const
static bool isFormatAvailable(const DataFlavorExVector &_rFormats, SotClipboardFormatId _nSlotID=SotClipboardFormatId::SBA_JOIN)
static OJoinExchangeData GetSourceDescription(const css::uno::Reference< css::datatransfer::XTransferable > &_rxObject)
OJoinDesignView * getDesignView() const
virtual void AddConnection(const OJoinExchangeData &jxdSource, const OJoinExchangeData &jxdDest)=0
VclPtr< OTableWindow > m_pTabWin
virtual void dragFinished() override
called when a drag operation done with a Transferable has been finished
int GetEntryFromText(std::u16string_view rEntryText)
OTableWindowListBox(OTableWindow *pParent)
sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt)
virtual void LoseFocus() override
virtual void dispose() override
std::unique_ptr< TableWindowListBoxHelper > m_xDragDropTargetHelper
sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt)
virtual void GetFocus() override
virtual void Command(const CommandEvent &rEvt) override
std::unique_ptr< weld::TreeView > m_xTreeView
virtual ~OTableWindowListBox() override
ImplSVEvent * m_nDropEvent
OJoinDropData m_aDropInfo
rtl::Reference< OJoinExchObj > m_xHelper
vcl::Window * GetParent() const
virtual void Command(const CommandEvent &rCEvt)
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(OApplicationController, OnClipboardChanged, TransferableDataHelper *, void)
IMPL_LINK(OApplicationController, OnSelectContainer, void *, _pType, void)
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
const css::datatransfer::dnd::DropTargetDropEvent maDropEvent
OJoinExchangeData aSource