Kaydet (Commit) af5b0086 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

uitest: store the id of each vcl::Window

We will use the ID in the UI testing to identify the widget.

Change-Id: I4dd79a02355e1de40f3c2ddc6a61a805b4e30778
üst 909d87cc
...@@ -1544,6 +1544,16 @@ public: ...@@ -1544,6 +1544,16 @@ public:
*/ */
void reorderWithinParent(sal_uInt16 nNewPosition); void reorderWithinParent(sal_uInt16 nNewPosition);
/**
* Sets an ID.
*/
void set_id(const OUString& rID);
/**
* Get the ID of the window.
*/
const OUString& get_id() const;
// Native Widget Rendering functions // Native Widget Rendering functions
......
...@@ -234,6 +234,7 @@ public: ...@@ -234,6 +234,7 @@ public:
OString maHelpId; OString maHelpId;
OUString maHelpText; OUString maHelpText;
OUString maQuickHelpText; OUString maQuickHelpText;
OUString maID;
InputContext maInputContext; InputContext maInputContext;
css::uno::Reference< css::awt::XWindowPeer > mxWindowPeer; css::uno::Reference< css::awt::XWindowPeer > mxWindowPeer;
css::uno::Reference< css::accessibility::XAccessible > mxAccessible; css::uno::Reference< css::accessibility::XAccessible > mxAccessible;
......
...@@ -1851,6 +1851,7 @@ VclPtr<vcl::Window> VclBuilder::insertObject(vcl::Window *pParent, const OString ...@@ -1851,6 +1851,7 @@ VclPtr<vcl::Window> VclBuilder::insertObject(vcl::Window *pParent, const OString
if (pCurrentChild) if (pCurrentChild)
{ {
pCurrentChild->set_id(OStringToOUString(rID, RTL_TEXTENCODING_UTF8));
if (pCurrentChild == m_pParent.get() && m_bToplevelHasDeferredProperties) if (pCurrentChild == m_pParent.get() && m_bToplevelHasDeferredProperties)
m_aDeferredProperties = rProps; m_aDeferredProperties = rProps;
else else
......
...@@ -3769,6 +3769,16 @@ bool Window::CompatNotify( NotifyEvent& rNEvt ) ...@@ -3769,6 +3769,16 @@ bool Window::CompatNotify( NotifyEvent& rNEvt )
return Notify( rNEvt ); return Notify( rNEvt );
} }
void Window::set_id(const OUString& rID)
{
mpWindowImpl->maID = rID;
}
const OUString& Window::get_id() const
{
return mpWindowImpl->maID;
}
} /* namespace vcl */ } /* namespace vcl */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment