summaryrefslogtreecommitdiff
path: root/svtools/source/control/headbar.cxx
diff options
context:
space:
mode:
authorSteve Yin <steve_y@apache.org>2013-11-25 16:15:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-25 16:52:36 +0000
commitb755fb8c0f6b1282f62c12f378c0a5ecac64d490 (patch)
tree4e6df42c862fe4eafef3f52267797e811bac59e0 /svtools/source/control/headbar.cxx
parent74bf915fb48c660bd1e3a04bec6c3a20c754b6af (diff)
Integrate branch of IAccessible2
Change-Id: I3b5936bb92bb258f9e9e76402dd2b55f29aa686a
Diffstat (limited to 'svtools/source/control/headbar.cxx')
-rw-r--r--svtools/source/control/headbar.cxx23
1 files changed, 20 insertions, 3 deletions
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 2ebec04d7645..cb44b4dd7f24 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -18,20 +18,20 @@
*/
#include <svtools/headbar.hxx>
+#include <svtools/vclxaccessibleheaderbar.hxx>
#include <tools/debug.hxx>
#include <vcl/svapp.hxx>
#include <vcl/help.hxx>
#include <vcl/image.hxx>
#include <vcl/salnativewidgets.hxx>
+#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
-// =======================================================================
-
class ImplHeadItem
{
public:
- sal_uInt16 mnId;
+ sal_uInt16 mnId;
HeaderBarItemBits mnBits;
long mnSize;
OString maHelpId;
@@ -76,6 +76,7 @@ void HeaderBar::ImplInit( WinBits nWinStyle )
mbOutDrag = sal_False;
mbItemMode = sal_False;
+ m_pVCLXHeaderBar = NULL;
// StyleBits auswerten
if ( nWinStyle & WB_DRAG )
mbDragable = sal_True;
@@ -1553,4 +1554,20 @@ void HeaderBar::SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::sta
mxAccessible = _xAccessible;
}
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > HeaderBar::GetComponentInterface( sal_Bool bCreate )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer
+ (Window::GetComponentInterface(false));
+ if ( !xPeer.is() && bCreate )
+ {
+ ::com::sun::star::awt::XWindowPeer* mxPeer = new VCLXHeaderBar(this);
+ m_pVCLXHeaderBar = (VCLXHeaderBar*)(mxPeer);
+ SetComponentInterface(mxPeer);
+ return mxPeer;
+ }
+ else
+ return xPeer;
+}
+
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */