From 5d14bc0bec8d0eaa1c166d264438ed0f1520ad9e Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 24 Jul 2002 12:01:28 +0000 Subject: [PATCH] #101689# Accessibility for EditorWindow. --- basctl/source/basicide/baside2.hxx | 8 ++++++-- basctl/source/basicide/baside2b.cxx | 23 +++++++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index c1408d866fec..993abdb2cac8 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -2,9 +2,9 @@ * * $RCSfile: baside2.hxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: sb $ $Date: 2002-07-05 10:22:47 $ + * last change: $Author: sb $ $Date: 2002-07-24 13:01:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -178,6 +178,10 @@ private: BOOL bDoSyntaxHighlight; BOOL bDelayHighlight; + virtual + ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > + GetComponentInterface(BOOL bCreate = TRUE); + protected: virtual void Paint( const Rectangle& ); virtual void Resize(); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 4a8a72158c1a..3d72ef9670c1 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -2,9 +2,9 @@ * * $RCSfile: baside2b.cxx,v $ * - * $Revision: 1.26 $ + * $Revision: 1.27 $ * - * last change: $Author: sb $ $Date: 2002-07-15 09:01:03 $ + * last change: $Author: sb $ $Date: 2002-07-24 13:01:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,6 +73,7 @@ #include #include #include +#include #include #include @@ -1715,6 +1716,24 @@ void ComplexEditorWindow::DataChanged(DataChangedEvent const & rDCEvt) } } +// virtual +uno::Reference< awt::XWindowPeer > +EditorWindow::GetComponentInterface(BOOL bCreate) +{ + uno::Reference< awt::XWindowPeer > xPeer( + Window::GetComponentInterface(false)); + if (!xPeer.is() && bCreate) + { + // Make sure edit engine and view are available: + if (!pEditEngine) + CreateEditEngine(); + + xPeer = new svtools::TextWindowAccessibility(*GetEditView()); + SetComponentInterface(xPeer); + } + return xPeer; +} + WatchTreeListBox::WatchTreeListBox( Window* pParent, WinBits nWinBits ) : SvTreeListBox( pParent, nWinBits ) {