summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-11-16 17:25:15 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-11-16 17:25:15 +0000
commit5c50a949dfc9d61c4f2c29b2353539dcd6ae91a1 (patch)
tree9568e3d9c866836f0e66113af516b23f30af44d5 /toolkit
parent27f85382fe716fb860f68bbfdb622e3525e0252f (diff)
parent9b9d44ee50a38180c2451ca527bf7b9f6f46f0fe (diff)
controltextrendering: merge changes from DEV300_m61
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/inc/toolkit/helper/vclunohelper.hxx16
-rw-r--r--toolkit/source/awt/makefile.mk1
-rw-r--r--toolkit/source/awt/vclxwindow.cxx76
-rw-r--r--toolkit/source/controls/roadmapcontrol.cxx1
-rw-r--r--toolkit/source/helper/vclunohelper.cxx55
-rw-r--r--toolkit/util/makefile.mk16
6 files changed, 83 insertions, 82 deletions
diff --git a/toolkit/inc/toolkit/helper/vclunohelper.hxx b/toolkit/inc/toolkit/helper/vclunohelper.hxx
index 1c5d89a3cc64..e29b7237abb8 100644
--- a/toolkit/inc/toolkit/helper/vclunohelper.hxx
+++ b/toolkit/inc/toolkit/helper/vclunohelper.hxx
@@ -36,6 +36,7 @@
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/awt/MouseEvent.hpp>
namespace com { namespace sun { namespace star { namespace uno {
@@ -59,6 +60,7 @@ namespace com { namespace sun { namespace star { namespace awt {
struct SimpleFontMetric;
struct FontDescriptor;
struct Rectangle;
+ struct KeyEvent;
}}}}
@@ -71,6 +73,8 @@ namespace com { namespace sun { namespace star { namespace awt {
class Window;
class OutputDevice;
+class MouseEvent;
+class KeyEvent;
// ----------------------------------------------------
// class VclUnoHelper
@@ -144,6 +148,18 @@ public:
static ::Rectangle ConvertToVCLRect( ::com::sun::star::awt::Rectangle const & _rRect );
static ::com::sun::star::awt::Rectangle ConvertToAWTRect( ::Rectangle const & _rRect );
+
+ static ::com::sun::star::awt::MouseEvent
+ createMouseEvent(
+ const ::MouseEvent& _rVclEvent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContext
+ );
+
+ static ::com::sun::star::awt::KeyEvent
+ createKeyEvent(
+ const ::KeyEvent& _rVclEvent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContext
+ );
};
diff --git a/toolkit/source/awt/makefile.mk b/toolkit/source/awt/makefile.mk
index 86953691ad27..406386c5723e 100644
--- a/toolkit/source/awt/makefile.mk
+++ b/toolkit/source/awt/makefile.mk
@@ -44,7 +44,6 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
.IF "$(GUIBASE)"=="aqua"
-OBJCXXFLAGS=-x objective-c++ -fobjc-exceptions
CFLAGSCXX+=$(OBJCXXFLAGS)
.ENDIF # "$(GUIBASE)"=="aqua"
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 40413091aaf2..3d2069ab8385 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -556,48 +556,6 @@ void ImplInitWindowEvent( ::com::sun::star::awt::WindowEvent& rEvent, Window* pW
pWindow->GetBorder( rEvent.LeftInset, rEvent.TopInset, rEvent.RightInset, rEvent.BottomInset );
}
-void ImplInitKeyEvent( ::com::sun::star::awt::KeyEvent& rEvent, const KeyEvent& rEvt )
-{
- rEvent.Modifiers = 0;
- if ( rEvt.GetKeyCode().IsShift() )
- rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::SHIFT;
- if ( rEvt.GetKeyCode().IsMod1() )
- rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD1;
- if ( rEvt.GetKeyCode().IsMod2() )
- rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD2;
- if ( rEvt.GetKeyCode().IsMod3() )
- rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD3;
-
- rEvent.KeyCode = rEvt.GetKeyCode().GetCode();
- rEvent.KeyChar = rEvt.GetCharCode();
- rEvent.KeyFunc = sal::static_int_cast< sal_Int16 >(
- rEvt.GetKeyCode().GetFunction());
-}
-
-void ImplInitMouseEvent( awt::MouseEvent& rEvent, const MouseEvent& rEvt )
-{
- rEvent.Modifiers = 0;
- if ( rEvt.IsShift() )
- rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::SHIFT;
- if ( rEvt.IsMod1() )
- rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD1;
- if ( rEvt.IsMod2() )
- rEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD2;
-
- rEvent.Buttons = 0;
- if ( rEvt.IsLeft() )
- rEvent.Buttons |= ::com::sun::star::awt::MouseButton::LEFT;
- if ( rEvt.IsRight() )
- rEvent.Buttons |= ::com::sun::star::awt::MouseButton::RIGHT;
- if ( rEvt.IsMiddle() )
- rEvent.Buttons |= ::com::sun::star::awt::MouseButton::MIDDLE;
-
- rEvent.X = rEvt.GetPosPixel().X();
- rEvent.Y = rEvt.GetPosPixel().Y();
- rEvent.ClickCount = rEvt.GetClicks();
- rEvent.PopupTrigger = sal_False;
-}
-
// ----------------------------------------------------
// class VCLXWindow
// ----------------------------------------------------
@@ -892,9 +850,9 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
if ( mpImpl->getKeyListeners().getLength() )
{
- ::com::sun::star::awt::KeyEvent aEvent;
- aEvent.Source = (::cppu::OWeakObject*)this;
- ImplInitKeyEvent( aEvent, *(KeyEvent*)rVclWindowEvent.GetData() );
+ ::com::sun::star::awt::KeyEvent aEvent( VCLUnoHelper::createKeyEvent(
+ *(KeyEvent*)rVclWindowEvent.GetData(), *this
+ ) );
mpImpl->getKeyListeners().keyPressed( aEvent );
}
}
@@ -903,9 +861,9 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
if ( mpImpl->getKeyListeners().getLength() )
{
- ::com::sun::star::awt::KeyEvent aEvent;
- aEvent.Source = (::cppu::OWeakObject*)this;
- ImplInitKeyEvent( aEvent, *(KeyEvent*)rVclWindowEvent.GetData() );
+ ::com::sun::star::awt::KeyEvent aEvent( VCLUnoHelper::createKeyEvent(
+ *(KeyEvent*)rVclWindowEvent.GetData(), *this
+ ) );
mpImpl->getKeyListeners().keyReleased( aEvent );
}
}
@@ -927,9 +885,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
}
MouseEvent aMEvt( aWhere, 1, MOUSE_SIMPLECLICK, MOUSE_LEFT, 0 );
- awt::MouseEvent aEvent;
- aEvent.Source = (::cppu::OWeakObject*)this;
- ImplInitMouseEvent( aEvent, aMEvt );
+ awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( aMEvt, *this ) );
aEvent.PopupTrigger = sal_True;
mpImpl->notifyMouseEvent( aEvent, EVENT_MOUSE_PRESSED );
}
@@ -940,10 +896,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
MouseEvent* pMouseEvt = (MouseEvent*)rVclWindowEvent.GetData();
if ( mpImpl->getMouseListeners().getLength() && ( pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow() ) )
{
- awt::MouseEvent aEvent;
- aEvent.Source = (::cppu::OWeakObject*)this;
- ImplInitMouseEvent( aEvent, *pMouseEvt );
-
+ awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *pMouseEvt, *this ) );
mpImpl->notifyMouseEvent(
aEvent,
pMouseEvt->IsEnterWindow() ? EVENT_MOUSE_ENTERED : EVENT_MOUSE_EXITED
@@ -952,11 +905,8 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
if ( mpImpl->getMouseMotionListeners().getLength() && !pMouseEvt->IsEnterWindow() && !pMouseEvt->IsLeaveWindow() )
{
- awt::MouseEvent aEvent;
- aEvent.Source = (::cppu::OWeakObject*)this;
- ImplInitMouseEvent( aEvent, *pMouseEvt );
+ awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *pMouseEvt, *this ) );
aEvent.ClickCount = 0; // #92138#
-
if ( pMouseEvt->GetMode() & MOUSE_SIMPLEMOVE )
mpImpl->getMouseMotionListeners().mouseMoved( aEvent );
else
@@ -968,9 +918,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
if ( mpImpl->getMouseListeners().getLength() )
{
- awt::MouseEvent aEvent;
- aEvent.Source = (::cppu::OWeakObject*)this;
- ImplInitMouseEvent( aEvent, *(MouseEvent*)rVclWindowEvent.GetData() );
+ awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *(MouseEvent*)rVclWindowEvent.GetData(), *this ) );
mpImpl->notifyMouseEvent( aEvent, EVENT_MOUSE_PRESSED );
}
}
@@ -979,9 +927,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
if ( mpImpl->getMouseListeners().getLength() )
{
- awt::MouseEvent aEvent;
- aEvent.Source = (::cppu::OWeakObject*)this;
- ImplInitMouseEvent( aEvent, *(MouseEvent*)rVclWindowEvent.GetData() );
+ awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *(MouseEvent*)rVclWindowEvent.GetData(), *this ) );
mpImpl->notifyMouseEvent( aEvent, EVENT_MOUSE_RELEASED );
}
}
diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx
index 724421da5f3c..da3a265130b8 100644
--- a/toolkit/source/controls/roadmapcontrol.cxx
+++ b/toolkit/source/controls/roadmapcontrol.cxx
@@ -104,6 +104,7 @@ static void lcl_throwIndexOutOfBoundsException( )
ImplRegisterProperty( BASEPROPERTY_COMPLETE );
ImplRegisterProperty( BASEPROPERTY_ACTIVATED );
ImplRegisterProperty( BASEPROPERTY_CURRENTITEMID );
+ ImplRegisterProperty( BASEPROPERTY_TABSTOP );
ImplRegisterProperty( BASEPROPERTY_TEXT );
}
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx
index 029e520baca6..89bde88d018e 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -45,6 +45,8 @@
#include <com/sun/star/awt/XControlContainer.hpp>
#include <com/sun/star/awt/FontWeight.hpp>
#include <com/sun/star/awt/FontWidth.hpp>
+#include <com/sun/star/awt/KeyModifier.hpp>
+#include <com/sun/star/awt/MouseButton.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/embed/EmbedMapUnits.hpp>
@@ -67,6 +69,8 @@
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/awt/Point.hpp>
+using namespace ::com::sun::star;
+
// ----------------------------------------------------
// class VCLUnoHelper
// ----------------------------------------------------
@@ -745,3 +749,54 @@ com::sun::star::awt::Point VCLUnoHelper::ConvertToAWTPoint(::Point /* VCLPoint *
{
return ::com::sun::star::awt::Rectangle( _rRect.Left(), _rRect.Top(), _rRect.GetWidth(), _rRect.GetHeight() );
}
+
+awt::MouseEvent VCLUnoHelper::createMouseEvent( const ::MouseEvent& _rVclEvent, const uno::Reference< uno::XInterface >& _rxContext )
+{
+ awt::MouseEvent aMouseEvent;
+ aMouseEvent.Source = _rxContext;
+
+ aMouseEvent.Modifiers = 0;
+ if ( _rVclEvent.IsShift() )
+ aMouseEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::SHIFT;
+ if ( _rVclEvent.IsMod1() )
+ aMouseEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD1;
+ if ( _rVclEvent.IsMod2() )
+ aMouseEvent.Modifiers |= ::com::sun::star::awt::KeyModifier::MOD2;
+
+ aMouseEvent.Buttons = 0;
+ if ( _rVclEvent.IsLeft() )
+ aMouseEvent.Buttons |= ::com::sun::star::awt::MouseButton::LEFT;
+ if ( _rVclEvent.IsRight() )
+ aMouseEvent.Buttons |= ::com::sun::star::awt::MouseButton::RIGHT;
+ if ( _rVclEvent.IsMiddle() )
+ aMouseEvent.Buttons |= ::com::sun::star::awt::MouseButton::MIDDLE;
+
+ aMouseEvent.X = _rVclEvent.GetPosPixel().X();
+ aMouseEvent.Y = _rVclEvent.GetPosPixel().Y();
+ aMouseEvent.ClickCount = _rVclEvent.GetClicks();
+ aMouseEvent.PopupTrigger = sal_False;
+
+ return aMouseEvent;
+}
+
+awt::KeyEvent VCLUnoHelper::createKeyEvent( const ::KeyEvent& _rVclEvent, const uno::Reference< uno::XInterface >& _rxContext )
+{
+ awt::KeyEvent aKeyEvent;
+ aKeyEvent.Source = _rxContext;
+
+ aKeyEvent.Modifiers = 0;
+ if ( _rVclEvent.GetKeyCode().IsShift() )
+ aKeyEvent.Modifiers |= awt::KeyModifier::SHIFT;
+ if ( _rVclEvent.GetKeyCode().IsMod1() )
+ aKeyEvent.Modifiers |= awt::KeyModifier::MOD1;
+ if ( _rVclEvent.GetKeyCode().IsMod2() )
+ aKeyEvent.Modifiers |= awt::KeyModifier::MOD2;
+ if ( _rVclEvent.GetKeyCode().IsMod3() )
+ aKeyEvent.Modifiers |= awt::KeyModifier::MOD3;
+
+ aKeyEvent.KeyCode = _rVclEvent.GetKeyCode().GetCode();
+ aKeyEvent.KeyChar = _rVclEvent.GetCharCode();
+ aKeyEvent.KeyFunc = ::sal::static_int_cast< sal_Int16 >( _rVclEvent.GetKeyCode().GetFunction());
+
+ return aKeyEvent;
+}
diff --git a/toolkit/util/makefile.mk b/toolkit/util/makefile.mk
index a04bdcbdf801..3c5da82d0dd9 100644
--- a/toolkit/util/makefile.mk
+++ b/toolkit/util/makefile.mk
@@ -80,22 +80,6 @@ DEF1DEPN =$(LIB1TARGET)
DEF1DES =TK
DEFLIB1NAME =tk
-.IF "$(OS)"=="MACOSX"
-
-# [ed] 6/16/02 Add in X libraries if we're building X
-
-.IF "$(GUIBASE)"=="unx"
-SHL1STDLIBS +=\
- -lX11 -lXt -lXmu
-.ENDIF
-
-.ELSE
-.IF "$(GUI)"=="UNX"
-SHL1STDLIBS +=\
- -lX11
-.ENDIF
-.ENDIF
-
RESLIB1IMAGES=$(PRJ)$/source$/awt
RES1FILELIST=$(SRS)$/awt.srs
RESLIB1NAME=$(TARGET)