diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:56:16 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:56:16 +0200 |
commit | a233dac0653f3f3054f7ad2da114ed989747e89a (patch) | |
tree | bf1e11438321c06125a94308649c496648061ccb /toolkit | |
parent | acb6133d89abe071108577f821d7eaa381378879 (diff) | |
parent | e5647de7dd26775e45af24f11ac4f82a5518bd9e (diff) |
resyncing to master
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/Library_tk.mk | 11 | ||||
-rw-r--r-- | toolkit/inc/toolkit/helper/macros.hxx | 12 | ||||
-rw-r--r-- | toolkit/source/awt/vclxgraphics.cxx | 16 | ||||
-rw-r--r-- | toolkit/source/awt/vclxsystemdependentwindow.cxx | 11 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 13 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtopwindow.cxx | 11 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindow1.cxx | 6 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindows.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/helper/registerservices.cxx | 7 | ||||
-rw-r--r-- | toolkit/source/helper/unowrapper.cxx | 6 | ||||
-rw-r--r-- | toolkit/source/layout/core/root.cxx | 6 | ||||
-rw-r--r-- | toolkit/source/layout/vcl/wbutton.cxx | 4 | ||||
-rw-r--r-- | toolkit/util/tk.component | 2 |
13 files changed, 77 insertions, 30 deletions
diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk index 6cae73035236..c663330c83db 100644 --- a/toolkit/Library_tk.mk +++ b/toolkit/Library_tk.mk @@ -38,13 +38,17 @@ $(eval $(call gb_Library_set_include,tk,\ -I$(realpath $(SRCDIR)/toolkit/inc) \ -I$(realpath $(SRCDIR)/toolkit/inc/pch) \ -I$(realpath $(SRCDIR)/toolkit/source) \ - -I$(OUTDIR)/inc/offuh \ )) $(eval $(call gb_Library_add_defs,tk,\ -DTOOLKIT_DLLIMPLEMENTATION \ )) +$(eval $(call gb_Library_add_api,tk,\ + udkapi \ + offapi \ +)) + $(eval $(call gb_Library_add_linked_libs,tk,\ comphelper \ cppu \ @@ -163,6 +167,11 @@ $(eval $(call gb_Library_add_cxxflags,tk,\ )) endif +ifeq ($(GUIBASE),cocoatouch) +$(eval $(call gb_Library_set_cxxflags,tk,\ + $$(CXXFLAGS) $(gb_OBJCXXFLAGS))) +endif + ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS))) $(eval $(call gb_Library_add_linked_libs,tk,\ X11 \ diff --git a/toolkit/inc/toolkit/helper/macros.hxx b/toolkit/inc/toolkit/helper/macros.hxx index 255530a32628..7275b8a7ffd3 100644 --- a/toolkit/inc/toolkit/helper/macros.hxx +++ b/toolkit/inc/toolkit/helper/macros.hxx @@ -189,13 +189,13 @@ void ClassName::disposing( const ::com::sun::star::lang::EventObject& ) throw(:: { \ xListener->MethodName( aMulti, aMulti2 ); \ } \ - catch( ::com::sun::star::lang::DisposedException e ) \ + catch(const ::com::sun::star::lang::DisposedException& e) \ { \ OSL_ENSURE( e.Context.is(), "caught DisposedException with empty Context field" ); \ if ( e.Context == xListener || !e.Context.is() ) \ aIt.remove(); \ } \ - catch( ::com::sun::star::uno::RuntimeException e ) \ + catch(const ::com::sun::star::uno::RuntimeException& e) \ { \ DISPLAY_EXCEPTION( ClassName, MethodName, e ) \ } \ @@ -214,13 +214,13 @@ void ClassName::disposing( const ::com::sun::star::lang::EventObject& ) throw(:: { \ xListener->MethodName( aMulti ); \ } \ - catch( ::com::sun::star::lang::DisposedException e ) \ + catch(const ::com::sun::star::lang::DisposedException& e) \ { \ OSL_ENSURE( e.Context.is(), "caught DisposedException with empty Context field" ); \ if ( e.Context == xListener || !e.Context.is() ) \ aIt.remove(); \ } \ - catch( ::com::sun::star::uno::RuntimeException e ) \ + catch(const ::com::sun::star::uno::RuntimeException& e) \ { \ DISPLAY_EXCEPTION( ClassName, MethodName, e ) \ } \ @@ -240,13 +240,13 @@ void ClassName::disposing( const ::com::sun::star::lang::EventObject& ) throw(:: { \ xListener->MethodName( aMulti ); \ } \ - catch( ::com::sun::star::lang::DisposedException e ) \ + catch(const ::com::sun::star::lang::DisposedException& e) \ { \ OSL_ENSURE( e.Context.is(), "caught DisposedException with empty Context field" ); \ if ( e.Context == xListener || !e.Context.is() ) \ aIt.remove(); \ } \ - catch( ::com::sun::star::uno::RuntimeException e ) \ + catch(const ::com::sun::star::uno::RuntimeException& e) \ { \ DISPLAY_EXCEPTION( ClassName, MethodName, e ) \ } \ diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx index dc2c84702664..8f29a5e5e86f 100644 --- a/toolkit/source/awt/vclxgraphics.cxx +++ b/toolkit/source/awt/vclxgraphics.cxx @@ -73,9 +73,17 @@ VCLXGraphics::VCLXGraphics() VCLXGraphics::~VCLXGraphics() { - List* pLst = mpOutputDevice ? mpOutputDevice->GetUnoGraphicsList() : NULL; + VCLXGraphicsList_impl* pLst = mpOutputDevice ? mpOutputDevice->GetUnoGraphicsList() : NULL; if ( pLst ) - pLst->Remove( this ); + { + for( VCLXGraphicsList_impl::iterator it = pLst->begin(); it < pLst->end(); ++it ) + { + if( *it == this ) { + pLst->erase( it ); + break; + } + } + } delete mpClipRegion; } @@ -100,10 +108,10 @@ void VCLXGraphics::Init( OutputDevice* pOutDev ) mpClipRegion = NULL; // Register at OutputDevice - List* pLst = mpOutputDevice->GetUnoGraphicsList(); + VCLXGraphicsList_impl* pLst = mpOutputDevice->GetUnoGraphicsList(); if ( !pLst ) pLst = mpOutputDevice->CreateUnoGraphicsList(); - pLst->Insert( this, LIST_APPEND ); + pLst->push_back( this ); } void VCLXGraphics::InitOutputDevice( sal_uInt16 nFlags ) diff --git a/toolkit/source/awt/vclxsystemdependentwindow.cxx b/toolkit/source/awt/vclxsystemdependentwindow.cxx index 7cb667b18528..646462521af6 100644 --- a/toolkit/source/awt/vclxsystemdependentwindow.cxx +++ b/toolkit/source/awt/vclxsystemdependentwindow.cxx @@ -46,6 +46,12 @@ #include "postmac.h" #endif +#ifdef IOS +#include "premac.h" +#include <UIKit/UIKit.h> +#include "postmac.h" +#endif + #include <vcl/svapp.hxx> #include <vcl/syschild.hxx> #include <vcl/sysdata.hxx> @@ -97,6 +103,11 @@ IMPL_XTYPEPROVIDER_END { aRet <<= (sal_IntPtr)pSysData->pView; } +#elif (defined IOS) + if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_IOS ) + { + aRet <<= (sal_IntPtr)pSysData->pView; + } #elif (defined UNX) if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_XWINDOW ) { diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index f255777f5cb6..19a76c9052c8 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -64,6 +64,13 @@ #include <Cocoa/Cocoa.h> #include "postmac.h" #endif + +#ifdef IOS +#include "premac.h" +#include <UIKit/UIKit.h> +#include "postmac.h" +#endif + #include <vcl/sysdata.hxx> #include <toolkit/awt/vclxwindows.hxx> @@ -982,6 +989,8 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, aParentData.nSize = sizeof( aParentData ); #if defined QUARTZ aParentData.pView = reinterpret_cast<NSView*>(nWindowHandle); + #elif defined IOS + aParentData.pView = reinterpret_cast<UIView*>(nWindowHandle); #elif defined UNX aParentData.aWindow = nWindowHandle; aParentData.bXEmbedSupport = bXEmbed; @@ -1069,7 +1078,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( { VCLXWindow* pParentComponent = VCLXWindow::GetImplementation( rDescriptor.Parent ); - // #103939# Don't through assertion, may be it's a system dependend window, used in ImplCreateWindow. + // #103939# Don't throw assertion, may be it's a system dependend window, used in ImplCreateWindow. // DBG_ASSERT( pParentComponent, "ParentComponent not valid" ); if ( pParentComponent ) @@ -1206,6 +1215,8 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( aParentData.nSize = sizeof( aParentData ); #if defined QUARTZ aParentData.pView = reinterpret_cast<NSView*>(nWindowHandle); + #elif defined IOS + aParentData.pView = reinterpret_cast<UIView*>(nWindowHandle); #elif defined UNX aParentData.aWindow = nWindowHandle; aParentData.bXEmbedSupport = bXEmbed; diff --git a/toolkit/source/awt/vclxtopwindow.cxx b/toolkit/source/awt/vclxtopwindow.cxx index 8bf3c861c01d..44f8f94cb50c 100644 --- a/toolkit/source/awt/vclxtopwindow.cxx +++ b/toolkit/source/awt/vclxtopwindow.cxx @@ -37,6 +37,12 @@ #include "postmac.h" #endif +#if defined ( IOS ) +#include "premac.h" +#include <UIKit/UIKit.h> +#include "postmac.h" +#endif + #include <vcl/syschild.hxx> #include <vcl/sysdata.hxx> #include <cppuhelper/typeprovider.hxx> @@ -109,6 +115,11 @@ Sequence< Type > VCLXTopWindow_Base::getTypes() throw(RuntimeException) { aRet <<= (sal_IntPtr)pSysData->pView; } +#elif (defined IOS) + if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_IOS ) + { + aRet <<= (sal_IntPtr)pSysData->pView; + } #elif (defined UNX) if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_XWINDOW ) { diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx index 6a9c64ba3c95..28d97fcb826d 100644 --- a/toolkit/source/awt/vclxwindow1.cxx +++ b/toolkit/source/awt/vclxwindow1.cxx @@ -43,6 +43,10 @@ #include "premac.h" #include <Cocoa/Cocoa.h> #include "postmac.h" +#elif defined ( IOS ) +#include "premac.h" +#include <UIKit/UIKit.h> +#include "postmac.h" #endif #include <vcl/sysdata.hxx> @@ -96,6 +100,8 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle ) aSysParentData.hWnd = (HWND) nHandle; #elif defined( QUARTZ ) aSysParentData.pView = reinterpret_cast<NSView*>(nHandle); +#elif defined( IOS ) + aSysParentData.pView = reinterpret_cast<UIView*>(nHandle); #elif defined( UNX ) aSysParentData.aWindow = (long)nHandle; aSysParentData.bXEmbedSupport = bXEmbed; diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 1c6d5418dd38..f95ceb65f3ac 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -6470,7 +6470,7 @@ void VCLXPatternField::getMasks( ::rtl::OUString& EditMask, ::rtl::OUString& Lit PatternField* pPatternField = (PatternField*) GetWindow(); if ( pPatternField ) { - EditMask = String( pPatternField->GetEditMask(), RTL_TEXTENCODING_ASCII_US ); + EditMask = rtl::OStringToOUString(pPatternField->GetEditMask(), RTL_TEXTENCODING_ASCII_US); LiteralMask = pPatternField->GetLiteralMask(); } } diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index cadd228d1c4b..3a532b83de14 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -236,12 +236,7 @@ extern void * SAL_CALL comp_Layout_component_getFactory( const char * implName, extern "C" { -TOOLKIT_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvTypeName, uno_Environment** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplementationName, void* _pServiceManager, void* _pRegistryKey ) +TOOLKIT_DLLPUBLIC void* SAL_CALL tk_component_getFactory( const sal_Char* sImplementationName, void* _pServiceManager, void* _pRegistryKey ) { void* pRet = NULL; diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx index b5abb11d632e..cc4992d250e0 100644 --- a/toolkit/source/helper/unowrapper.cxx +++ b/toolkit/source/helper/unowrapper.cxx @@ -206,12 +206,12 @@ void UnoWrapper::SetWindowInterface( Window* pWindow, ::com::sun::star::uno::Ref void UnoWrapper::ReleaseAllGraphics( OutputDevice* pOutDev ) { - List* pLst = pOutDev->GetUnoGraphicsList(); + VCLXGraphicsList_impl* pLst = pOutDev->GetUnoGraphicsList(); if ( pLst ) { - for ( sal_uInt32 n = 0; n < pLst->Count(); n++ ) + for ( size_t n = 0; n < pLst->size(); n++ ) { - VCLXGraphics* pGrf = (VCLXGraphics*)pLst->GetObject( n ); + VCLXGraphics* pGrf = (*pLst)[ n ]; pGrf->SetOutputDevice( NULL ); } } diff --git a/toolkit/source/layout/core/root.cxx b/toolkit/source/layout/core/root.cxx index 6a3ebe85e836..f83f42a94cec 100644 --- a/toolkit/source/layout/core/root.cxx +++ b/toolkit/source/layout/core/root.cxx @@ -71,7 +71,7 @@ LayoutRoot::~LayoutRoot() m_refCount++; // inhibit multiple destruction dispose(); } - catch( uno::Exception& ) + catch (const uno::Exception&) { } } @@ -186,7 +186,7 @@ void SAL_CALL LayoutRoot::initialize( const uno::Sequence< uno::Any >& aArgument { xParser->parseStream( source ); } - catch ( xml::sax::SAXParseException& e ) + catch (const xml::sax::SAXParseException& e) { OUString c(RTL_CONSTASCII_USTRINGPARAM(":")); error( aXMLName @@ -361,7 +361,7 @@ bool LayoutWidget::addChild( LayoutWidget *pChild ) { mxContainer->addChild( pChild->mxWidget ); } - catch( awt::MaxChildrenException ex ) + catch (const awt::MaxChildrenException&) { return false; } diff --git a/toolkit/source/layout/vcl/wbutton.cxx b/toolkit/source/layout/vcl/wbutton.cxx index 5e303ada03ba..96e6aeb5d251 100644 --- a/toolkit/source/layout/vcl/wbutton.cxx +++ b/toolkit/source/layout/vcl/wbutton.cxx @@ -276,7 +276,6 @@ public: if ( !mxRadioButton.is() ) return; -#if 1 // Have setState fire item event for // RadioGroups::RadioGroup::itemStateChanged () ::RadioButton *r = static_cast<RadioButton*>(mpWindow)->GetRadioButton (); @@ -284,9 +283,6 @@ public: r->EnableRadioCheck(); mxRadioButton->setState( !!bCheck ); r->EnableRadioCheck (state); -#else - mxRadioButton->setState( !!bCheck ); -#endif fireToggle(); } diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component index 4d4713e87c45..f6638794de12 100644 --- a/toolkit/util/tk.component +++ b/toolkit/util/tk.component @@ -26,7 +26,7 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="tk" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.awt.comp.AsyncCallback"> <service name="com.sun.star.awt.AsyncCallback"/> |