26#include <com/sun/star/form/XLoadable.hpp>
27#include <com/sun/star/awt/XControlContainer.hpp>
28#include <com/sun/star/awt/PosSize.hpp>
29#include <com/sun/star/beans/XPropertySet.hpp>
30#include <com/sun/star/container/XChild.hpp>
31#include <osl/diagnose.h>
45 bool bGrabFocus =
false;
48 if (pVclControl && xGrid.is())
51 if(!pVclControl->HasChildPathFocus())
56 xLoad.set(xChild->getParent(),UNO_QUERY);
57 bGrabFocus = xLoad.is() && xLoad->isLoaded();
69 :
ODataView(pParent,_rController,_rxContext)
72 ,m_pVclControl(nullptr)
88 OSL_ENSURE(
m_xGrid.is(),
"UnoDataBrowserView::Construct : could not create a grid control !");
93 xGridWindow->setVisible(
true);
94 xGridWindow->setEnable(
true);
106 OSL_ENSURE(
m_pVclControl !=
nullptr,
"UnoDataBrowserView::Construct : no real grid control !");
110 ::comphelper::disposeComponent(
m_xGrid);
127 ::comphelper::disposeComponent(
m_xGrid);
128 ::comphelper::disposeComponent(
m_xMe);
139 tools::Long nYPos = m_pSplitter->GetPosPixel().Y();
140 m_pSplitter->SetPosPixel(
Point( m_pSplitter->GetSplitPosPixel(), nYPos ) );
162 if (_rStatus.isEmpty())
202 aSplitPos.
setY( aPlaygroundPos.
Y() );
206 if( ( aSplitPos.
X() + aSplitSize.
Width() ) > ( aPlaygroundSize.
Width() ))
209 if( aSplitPos.
X() <= aPlaygroundPos.
X() )
210 aSplitPos.
setX( aPlaygroundPos.
X() + sal_Int32(aPlaygroundSize.
Width() * 0.2) );
213 Point aTreeViewPos( aPlaygroundPos );
214 Size aTreeViewSize( aSplitPos.
X(), aPlaygroundSize.
Height() );
217 m_pTreeView->SetPosSizePixel( aTreeViewPos, aTreeViewSize );
230 if (xGridAsWindow.is())
231 xGridAsWindow->setPosSize( aSplitPos.
X() + aSplitSize.
Width(), aPlaygroundPos.
Y(),
232 aPlaygroundSize.
Width() - aSplitSize.
Width() - aSplitPos.
X(), aPlaygroundSize.
Height(), css::awt::PosSize::POSSIZE);
248 OSL_ENSURE(
m_xGrid.is(),
"Grid not set!");
274 bool bGrabFocus =
false;
277 bGrabFocus = isGrabVclControlFocusAllowed(
this);
295 if(rNEvt.
GetType() == NotifyEventType::KEYINPUT)
297 bool bGrabAllowed = isGrabVclControlFocusAllowed(
this);
329 m_pView->showStatus(OUString());
const vcl::KeyCode & GetKeyCode() const
const KeyEvent * GetKeyEvent() const
NotifyEventType GetType() const
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long X() const
constexpr tools::Long Height() const
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static css::uno::Reference< css::awt::XWindow > GetInterface(vcl::Window *pWindow)
static css::uno::Reference< css::awt::XControlContainer > CreateControlContainer(vcl::Window *pWindow)
~BrowserViewStatusDisplay()
BrowserViewStatusDisplay(UnoDataBrowserView *_pView, const OUString &_rStatus)
VclPtr< UnoDataBrowserView > m_pView
const css::uno::Reference< css::uno::XComponentContext > & getORB() const
virtual void Construct()
late construction
virtual void dispose() override
virtual void Resize() override
virtual bool PreNotify(NotifyEvent &rNEvt) override
css::uno::Reference< css::awt::XControlContainer > m_xMe
void showStatus(const OUString &_rStatus)
css::uno::Reference< css::awt::XControl > m_xGrid
SbaGridControl * getVclControl() const
virtual void dispose() override
VclPtr< InterimDBTreeListBox > m_pTreeView
virtual void Construct()
late construction
const css::uno::Reference< css::awt::XControl > & getGridControl() const
virtual void resizeDocumentView(tools::Rectangle &rRect) override
virtual ~UnoDataBrowserView() override
VclPtr< Splitter > m_pSplitter
virtual void _disposing(const css::lang::EventObject &_rSource) override
void setSplitter(Splitter *pSplitter)
for the same reason the view column count isn't the same as the model column count
const css::uno::Reference< css::awt::XControlContainer > & getContainer() const
sal_uInt16 View2ModelPos(sal_uInt16 nPos) const
as columns may be hidden there is a difference between a columns model pos and its view pos so we you...
virtual void GetFocus() override
virtual bool PreNotify(NotifyEvent &rNEvt) override
void setTreeView(InterimDBTreeListBox *pTreeView)
VclPtr< SbaGridControl > m_pVclControl
void startComponentListening(const css::uno::Reference< css::lang::XComponent > &_rxComp)
void stopComponentListening(const css::uno::Reference< css::lang::XComponent > &_rxComp)
virtual void set_label(const OUString &rText)=0
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_E
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(OApplicationController, OnClipboardChanged, TransferableDataHelper *, void)
constexpr OUStringLiteral PROPERTY_NAME(u"Name")
Reference< XModel > xModel
the model of the sub component. Might be <NULL>