summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/taskpane.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-05-05 22:26:58 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-05-05 22:26:58 +0200
commit5ac537f937a7d8bfbe6c12203e8f10d0d92441df (patch)
tree8c74eb4ebfc96e74156180d9199850d1b3adaad7 /sfx2/source/dialog/taskpane.cxx
parente034a0aa6d74301da7647019cea0a35d82964b7f (diff)
slidecopy: set the WB_DIALOGCONTROL and WB_CHILDLDGCTRL bits both at the generic panel anchor window, and the panel window provided by the XToolPanel
Diffstat (limited to 'sfx2/source/dialog/taskpane.cxx')
-rw-r--r--sfx2/source/dialog/taskpane.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index ba1295b4126c..6a966ab68313 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -45,6 +45,7 @@
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/graphic/XGraphicProvider.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/awt/XControl.hpp>
/** === end UNO includes === **/
#include <comphelper/componentcontext.hxx>
@@ -58,6 +59,7 @@
#include <unotools/confignode.hxx>
#include <vcl/menu.hxx>
#include <vcl/svapp.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
#include <boost/noncopyable.hpp>
@@ -90,6 +92,7 @@ namespace sfx2
using ::com::sun::star::graphic::XGraphicProvider;
using ::com::sun::star::graphic::XGraphic;
using ::com::sun::star::accessibility::XAccessible;
+ using ::com::sun::star::awt::XControl;
/** === end UNO using === **/
namespace PosSize = ::com::sun::star::awt::PosSize;
@@ -351,6 +354,18 @@ namespace sfx2
UNO_SET_THROW );
m_aCustomPanel = CustomPanelUIElement( xElement );
+
+ // ensure tabbing through the panel window works - need access to the VCL Window for this
+ Reference< XWindow > xPanelWindow( m_aCustomPanel.getPanelWindow() );
+ const Reference< XControl > xPanelControl( xPanelWindow, UNO_QUERY );
+ if ( xPanelControl.is() )
+ // windows created by the XContainerWindowProvider might, in real, be an XControl
+ // In this case, obtain the VCL Window from the peer
+ xPanelWindow.set( xPanelControl->getPeer(), UNO_QUERY_THROW );
+ Window* pPanelWindow = VCLUnoHelper::GetWindow( xPanelWindow );
+ OSL_ENSURE( pPanelWindow != NULL, "CustomToolPanel::impl_ensureToolPanelWindow: invalid (unknown) XWindow implementation of the panel window!" );
+ if ( pPanelWindow != NULL )
+ pPanelWindow->SetStyle( pPanelWindow->GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL );
}
catch( const Exception& )
{