You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by st...@apache.org on 2013/02/01 09:46:35 UTC

svn commit: r1441343 [30/35] - in /openoffice/branches/ia2: ./ ext_libraries/apr-util/ ext_libraries/apr/ ext_sources/ extras/l10n/source/ast/ extras/l10n/source/da/ extras/l10n/source/eu/ extras/l10n/source/gd/ extras/l10n/source/ko/ extras/l10n/sourc...

Modified: openoffice/branches/ia2/main/toolkit/source/awt/vclxmenu.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/source/awt/vclxmenu.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/source/awt/vclxmenu.cxx (original)
+++ openoffice/branches/ia2/main/toolkit/source/awt/vclxmenu.cxx Fri Feb  1 08:46:00 2013
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -24,67 +24,40 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_toolkit.hxx"
 
-
 #include <toolkit/awt/vclxmenu.hxx>
+#include <toolkit/helper/convert.hxx>
 #include <toolkit/helper/macros.hxx>
 #include <toolkit/helper/servicenames.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
-#include <toolkit/helper/convert.hxx>
+
 #include <cppuhelper/typeprovider.hxx>
 #include <rtl/memory.h>
+#include <rtl/ustrbuf.hxx>
 #include <rtl/uuid.h>
-#include <vos/mutex.hxx>
-
-#include <vcl/menu.hxx>
-#include <vcl/keycod.hxx>
 #include <vcl/image.hxx>
+#include <vcl/keycod.hxx>
+#include <vcl/menu.hxx>
 #include <vcl/mnemonic.hxx>
 #include <vcl/svapp.hxx>
+#include <vos/mutex.hxx>
 
 #include <com/sun/star/awt/KeyModifier.hpp>
 
+using rtl::OUString;
+using rtl::OUStringBuffer;
 
-#ifdef DBG_UTIL
-    #define THROW_MENUITEM_NOT_FOUND( Func, nItemId ) \
-        if ( MENU_ITEM_NOTFOUND == mpMenu->GetItemPos( nItemId ) ) \
-            throw  ::com::sun::star::container::NoSuchElementException( \
-                ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( Func ) ) \
-                += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": There is no menu item with " ) ) \
-                += ::rtl::OUString::valueOf( sal_Int32( nItemId ) ) \
-                += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " as identifier" ) ), \
-                *this \
-            );
-    #define THROW_MENUPOS_NOT_FOUND( Func, nPos ) \
-        if ( MENU_ITEM_NOTFOUND == sal_uInt16( nPos ) ) \
-            throw  ::com::sun::star::container::NoSuchElementException( \
-                ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( Func ) ) \
-                += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": There is no menu item at position " ) ) \
-                += ::rtl::OUString::valueOf( sal_Int32( nPos ) ), \
-                *this \
-            );
-#else
-    #define THROW_MENUITEM_NOT_FOUND( Func, nItemId ) \
-        if ( MENU_ITEM_NOTFOUND == mpMenu->GetItemPos( nItemId ) ) \
-            throw  ::com::sun::star::container::NoSuchElementException();
-    #define THROW_MENUPOS_NOT_FOUND( Func, nPos ) \
-        if ( MENU_ITEM_NOTFOUND == sal_uInt16( nPos ) ) \
-            throw  ::com::sun::star::container::NoSuchElementException();
-#endif
-
-
-//	----------------------------------------------------
-//	class VCLXMenu
-//	----------------------------------------------------
 
 DBG_NAME(VCLXMenu)
 
-VCLXMenu::VCLXMenu() : maMenuListeners( *this )
+VCLXMenu::VCLXMenu()
+    : maMenuListeners( *this )
 {
     DBG_CTOR( VCLXMenu, 0 );
-	mpMenu = NULL;
+    mpMenu = NULL;
 }
 
-VCLXMenu::VCLXMenu( Menu* pMenu ) : maMenuListeners( *this )
+VCLXMenu::VCLXMenu( Menu* pMenu )
+    : maMenuListeners( *this )
 {
     DBG_CTOR( VCLXMenu, 0 );
     mpMenu = pMenu;
@@ -93,15 +66,15 @@ VCLXMenu::VCLXMenu( Menu* pMenu ) : maMe
 VCLXMenu::~VCLXMenu()
 {
     DBG_DTOR( VCLXMenu, 0 );
-	for ( sal_uInt32 n = maPopupMenueRefs.Count(); n; )
-	{
-		::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > * pRef = maPopupMenueRefs.GetObject( --n );
-		delete pRef;
-	}
+    for ( sal_uInt32 n = maPopupMenueRefs.Count(); n; )
+    {
+        css::uno::Reference< css::awt::XPopupMenu > * pRef = maPopupMenueRefs.GetObject( --n );
+        delete pRef;
+    }
     if ( mpMenu )
     {
         mpMenu->RemoveEventListener( LINK( this, VCLXMenu, MenuEventListener ) );
-	    delete mpMenu;
+        delete mpMenu;
     }
 }
 
@@ -112,12 +85,12 @@ sal_Bool VCLXMenu::IsPopupMenu() const
 
 void VCLXMenu::ImplCreateMenu( sal_Bool bPopup )
 {
-	DBG_ASSERT( !mpMenu, "CreateMenu: Menu exists!" );
+    DBG_ASSERT( !mpMenu, "CreateMenu: Menu exists!" );
 
-	if ( bPopup )
-		mpMenu = new PopupMenu;
-	else
-		mpMenu = new MenuBar;
+    if ( bPopup )
+        mpMenu = new PopupMenu;
+    else
+        mpMenu = new MenuBar;
 
     mpMenu->AddEventListener( LINK( this, VCLXMenu, MenuEventListener ) );
 }
@@ -136,51 +109,51 @@ IMPL_LINK( VCLXMenu, MenuEventListener, 
             {
                 case VCLEVENT_MENU_SELECT:
                 {
-	                if ( maMenuListeners.getLength() )
-	                {
-		                ::com::sun::star::awt::MenuEvent aEvent;
-		                aEvent.Source = (::cppu::OWeakObject*)this;
-		                aEvent.MenuId = mpMenu->GetCurItemId();
-		                maMenuListeners.select( aEvent );
-	                }
+                    if ( maMenuListeners.getLength() )
+                    {
+                        css::awt::MenuEvent aEvent;
+                        aEvent.Source = (::cppu::OWeakObject*)this;
+                        aEvent.MenuId = mpMenu->GetCurItemId();
+                        maMenuListeners.itemSelected( aEvent );
+                    }
                 }
                 break;
                 case VCLEVENT_OBJECT_DYING:
                 {
-	                mpMenu = NULL;
+                    mpMenu = NULL;
                 }
                 break;
                 case VCLEVENT_MENU_HIGHLIGHT:
                 {
-	                if ( maMenuListeners.getLength() )
-	                {
-		                ::com::sun::star::awt::MenuEvent aEvent;
-		                aEvent.Source = (::cppu::OWeakObject*)this;
-		                aEvent.MenuId = mpMenu->GetCurItemId();
-		                maMenuListeners.highlight( aEvent );
-	                }
+                    if ( maMenuListeners.getLength() )
+                    {
+                        css::awt::MenuEvent aEvent;
+                        aEvent.Source = (::cppu::OWeakObject*)this;
+                        aEvent.MenuId = mpMenu->GetCurItemId();
+                        maMenuListeners.itemHighlighted( aEvent );
+                    }
                 }
                 break;
                 case VCLEVENT_MENU_ACTIVATE:
                 {
-	                if ( maMenuListeners.getLength() )
-	                {
-		                ::com::sun::star::awt::MenuEvent aEvent;
-		                aEvent.Source = (::cppu::OWeakObject*)this;
-		                aEvent.MenuId = mpMenu->GetCurItemId();
-		                maMenuListeners.activate( aEvent );
-	                }
+                    if ( maMenuListeners.getLength() )
+                    {
+                        css::awt::MenuEvent aEvent;
+                        aEvent.Source = (::cppu::OWeakObject*)this;
+                        aEvent.MenuId = mpMenu->GetCurItemId();
+                        maMenuListeners.itemActivated( aEvent );
+                    }
                 }
                 break;
                 case VCLEVENT_MENU_DEACTIVATE:
                 {
-	                if ( maMenuListeners.getLength() )
-	                {
-		                ::com::sun::star::awt::MenuEvent aEvent;
-		                aEvent.Source = (::cppu::OWeakObject*)this;
-		                aEvent.MenuId = mpMenu->GetCurItemId();
-		                maMenuListeners.deactivate( aEvent );
-	                }
+                    if ( maMenuListeners.getLength() )
+                    {
+                        css::awt::MenuEvent aEvent;
+                        aEvent.Source = (::cppu::OWeakObject*)this;
+                        aEvent.MenuId = mpMenu->GetCurItemId();
+                        maMenuListeners.itemDeactivated( aEvent );
+                    }
                 }
                 break;
 
@@ -208,50 +181,46 @@ IMPL_LINK( VCLXMenu, MenuEventListener, 
 }
 
 
-//=============================================================================
-//=============================================================================
-//=============================================================================
-
-
-// ::com::sun::star::lang::XServiceInfo
-::rtl::OUString SAL_CALL VCLXMenu::getImplementationName(  )
-throw (::com::sun::star::uno::RuntimeException)
+OUString SAL_CALL VCLXMenu::getImplementationName(  )
+throw (css::uno::RuntimeException)
 {
     ::osl::ResettableGuard < ::osl::Mutex > aGuard( GetMutex() );
     const sal_Bool bIsPopupMenu = IsPopupMenu();
     aGuard.clear();
 
-    ::rtl::OUString implName( RTL_CONSTASCII_USTRINGPARAM( "stardiv.Toolkit." ) );
+    OUStringBuffer implName;
+    implName.appendAscii( RTL_CONSTASCII_STRINGPARAM( "stardiv.Toolkit." ) );
     if ( bIsPopupMenu )
-        implName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VCLXPopupMenu" ) );
+        implName.appendAscii( RTL_CONSTASCII_STRINGPARAM( "VCLXPopupMenu" ) );
     else
-        implName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VCLXMenuBar" ) );
+        implName.appendAscii( RTL_CONSTASCII_STRINGPARAM( "VCLXMenuBar" ) );
 
-    return implName;
+    return implName.makeStringAndClear();
 }
 
 
-::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL VCLXMenu::getSupportedServiceNames(  )
-throw (::com::sun::star::uno::RuntimeException)
+css::uno::Sequence< OUString > SAL_CALL VCLXMenu::getSupportedServiceNames(  )
+throw (css::uno::RuntimeException)
 {
     ::osl::ResettableGuard < ::osl::Mutex > aGuard( GetMutex() );
     const sal_Bool bIsPopupMenu = IsPopupMenu();
     aGuard.clear();
 
-    ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames( 1 );
+    css::uno::Sequence< OUString > aNames( 1 );
     if ( bIsPopupMenu )
-        aNames[ 0 ] = ::rtl::OUString::createFromAscii( szServiceName2_PopupMenu );
+        aNames[ 0 ] = OUString::createFromAscii( szServiceName2_PopupMenu );
     else
-        aNames[ 0 ] = ::rtl::OUString::createFromAscii( szServiceName2_MenuBar );
+        aNames[ 0 ] = OUString::createFromAscii( szServiceName2_MenuBar );
 
     return aNames;
 }
 
 
-::sal_Bool SAL_CALL VCLXMenu::supportsService( const ::rtl::OUString& rServiceName )
-throw (::com::sun::star::uno::RuntimeException)
+::sal_Bool SAL_CALL VCLXMenu::supportsService(
+    const OUString& rServiceName )
+throw (css::uno::RuntimeException)
 {
-    ::com::sun::star::uno::Sequence< ::rtl::OUString > aServiceNames( getSupportedServiceNames() );
+    css::uno::Sequence< OUString > aServiceNames( getSupportedServiceNames() );
 
     if ( aServiceNames[ 0 ] == rServiceName )
         return sal_True;
@@ -260,46 +229,40 @@ throw (::com::sun::star::uno::RuntimeExc
 }
 
 
-// ::com::sun::star::uno::XInterface
-::com::sun::star::uno::Any VCLXMenu::queryInterface( const ::com::sun::star::uno::Type & rType )
-throw(::com::sun::star::uno::RuntimeException)
+css::uno::Any VCLXMenu::queryInterface(
+    const css::uno::Type & rType )
+throw(css::uno::RuntimeException)
 {
     ::osl::ResettableGuard < ::osl::Mutex > aGuard( GetMutex() );
     const sal_Bool bIsPopupMenu = IsPopupMenu();
     aGuard.clear();
 
-    ::com::sun::star::uno::Any aRet;
+    css::uno::Any aRet;
 
     if ( bIsPopupMenu )
         aRet = ::cppu::queryInterface(  rType,
-                                        SAL_STATIC_CAST( ::com::sun::star::awt::XMenu*, (::com::sun::star::awt::XMenuBar*) this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::awt::XPopupMenu*, this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::awt::XPopupMenuExtended*, this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::awt::XMenuExtended*, (::com::sun::star::awt::XPopupMenuExtended*) this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::awt::XMenuExtended2*, (::com::sun::star::awt::XPopupMenuExtended*) this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::lang::XTypeProvider*, this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::lang::XServiceInfo*, this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::lang::XUnoTunnel*, this ) );
+                                        SAL_STATIC_CAST( css::awt::XMenu*, (css::awt::XPopupMenu*) this ),
+                                        SAL_STATIC_CAST( css::awt::XPopupMenu*, this ),
+                                        SAL_STATIC_CAST( css::lang::XTypeProvider*, this ),
+                                        SAL_STATIC_CAST( css::lang::XServiceInfo*, this ),
+                                        SAL_STATIC_CAST( css::lang::XUnoTunnel*, this ) );
     else
         aRet = ::cppu::queryInterface(  rType,
-                                        SAL_STATIC_CAST( ::com::sun::star::awt::XMenu*, (::com::sun::star::awt::XMenuBar*) this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::awt::XMenuBar*, this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::awt::XMenuBarExtended*, this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::awt::XMenuExtended*, (::com::sun::star::awt::XMenuBarExtended*) this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::awt::XMenuExtended2*, (::com::sun::star::awt::XMenuBarExtended*) this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::lang::XTypeProvider*, this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::lang::XServiceInfo*, this ),
-                                        SAL_STATIC_CAST( ::com::sun::star::lang::XUnoTunnel*, this ) );
+                                        SAL_STATIC_CAST( css::awt::XMenu*, (css::awt::XMenuBar*) this ),
+                                        SAL_STATIC_CAST( css::awt::XMenuBar*, this ),
+                                        SAL_STATIC_CAST( css::lang::XTypeProvider*, this ),
+                                        SAL_STATIC_CAST( css::lang::XServiceInfo*, this ),
+                                        SAL_STATIC_CAST( css::lang::XUnoTunnel*, this ) );
 
     return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
 }
 
-// ::com::sun::star::lang::XUnoTunnel
+
 IMPL_XUNOTUNNEL( VCLXMenu )
 
-// ::com::sun::star::lang::XTypeProvider
-::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > VCLXMenu::getTypes()
-throw(::com::sun::star::uno::RuntimeException)
+
+css::uno::Sequence< css::uno::Type > VCLXMenu::getTypes()
+throw(css::uno::RuntimeException)
 {
     ::osl::ResettableGuard < ::osl::Mutex > aGuard( GetMutex() );
     const sal_Bool bIsPopupMenu = IsPopupMenu();
@@ -316,13 +279,10 @@ throw(::com::sun::star::uno::RuntimeExce
             if( !pCollectionPopupMenu )
             {
                 static ::cppu::OTypeCollection collectionPopupMenu(
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider>* ) NULL ),
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenu>* ) NULL ),
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu>* ) NULL ),
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenuExtended>* ) NULL ),
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuExtended>* ) NULL ),
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuExtended2>* ) NULL ),
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo>* ) NULL ) );
+                getCppuType( ( css::uno::Reference< css::lang::XTypeProvider>* ) NULL ),
+                getCppuType( ( css::uno::Reference< css::awt::XMenu>* ) NULL ),
+                getCppuType( ( css::uno::Reference< css::awt::XPopupMenu>* ) NULL ),
+                getCppuType( ( css::uno::Reference< css::lang::XServiceInfo>* ) NULL ) );
                 pCollectionPopupMenu = &collectionPopupMenu;
             }
         }
@@ -337,13 +297,10 @@ throw(::com::sun::star::uno::RuntimeExce
             if( !pCollectionMenuBar )
             {
                 static ::cppu::OTypeCollection collectionMenuBar(
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider>* ) NULL ),
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenu>* ) NULL ),
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar>* ) NULL ),
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBarExtended>* ) NULL ),
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuExtended>* ) NULL ),
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuExtended2>* ) NULL ),
-                getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo>* ) NULL ) );
+                getCppuType( ( css::uno::Reference< css::lang::XTypeProvider>* ) NULL ),
+                getCppuType( ( css::uno::Reference< css::awt::XMenu>* ) NULL ),
+                getCppuType( ( css::uno::Reference< css::awt::XMenuBar>* ) NULL ),
+                getCppuType( ( css::uno::Reference< css::lang::XServiceInfo>* ) NULL ) );
                 pCollectionMenuBar = &collectionMenuBar;
             }
         }
@@ -352,8 +309,8 @@ throw(::com::sun::star::uno::RuntimeExce
 }
 
 
-::com::sun::star::uno::Sequence< sal_Int8 > VCLXMenu::getImplementationId()
-throw(::com::sun::star::uno::RuntimeException)
+css::uno::Sequence< sal_Int8 > VCLXMenu::getImplementationId()
+throw(css::uno::RuntimeException)
 {
     ::osl::ResettableGuard < ::osl::Mutex > aGuard( GetMutex() );
     const sal_Bool bIsPopupMenu = IsPopupMenu();
@@ -392,263 +349,310 @@ throw(::com::sun::star::uno::RuntimeExce
     }
 }
 
-
-//=============================================================================
-//=============================================================================
-//=============================================================================
-
-
-void VCLXMenu::addMenuListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException)
+void VCLXMenu::addMenuListener(
+    const css::uno::Reference< css::awt::XMenuListener >& rxListener )
+throw(css::uno::RuntimeException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-	maMenuListeners.addInterface( rxListener );
+    maMenuListeners.addInterface( rxListener );
 }
 
-void VCLXMenu::removeMenuListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException)
+void VCLXMenu::removeMenuListener(
+    const css::uno::Reference< css::awt::XMenuListener >& rxListener )
+throw(css::uno::RuntimeException)
 {
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-	maMenuListeners.removeInterface( rxListener );
+    maMenuListeners.removeInterface( rxListener );
 }
 
-void VCLXMenu::insertItem( sal_Int16 nItemId, const ::rtl::OUString& aText, sal_Int16 nItemStyle, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException)
+void VCLXMenu::insertItem(
+    sal_Int16 nItemId,
+    const OUString& aText,
+    sal_Int16 nItemStyle,
+    sal_Int16 nPos )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     if ( mpMenu )
-	    mpMenu->InsertItem( nItemId, aText, (MenuItemBits)nItemStyle, nPos );
+        mpMenu->InsertItem( nItemId, aText, (MenuItemBits)nItemStyle, nPos );
 }
 
-void VCLXMenu::removeItem( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::star::uno::RuntimeException)
+void VCLXMenu::removeItem(
+    sal_Int16 nPos,
+    sal_Int16 nCount )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     sal_Int32 nItemCount = (sal_Int32)mpMenu->GetItemCount();
     if ( mpMenu && ( nCount > 0 ) && ( nPos >= 0 ) && ( nPos < nItemCount ) && ( nItemCount > 0 ))
-	{
-		sal_Int16 nP = sal::static_int_cast< sal_Int16 >(
+    {
+        sal_Int16 nP = sal::static_int_cast< sal_Int16 >(
             Min( (int)(nPos+nCount), (int)nItemCount ));
         while( nP-nPos > 0 )
             mpMenu->RemoveItem( --nP );
-	}
+    }
 }
 
-sal_Int16 VCLXMenu::getItemCount(  ) throw(::com::sun::star::uno::RuntimeException)
+sal_Int16 VCLXMenu::getItemCount(  )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     return mpMenu ? mpMenu->GetItemCount() : 0;
 }
 
-sal_Int16 VCLXMenu::getItemId( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException)
+sal_Int16 VCLXMenu::getItemId(
+    sal_Int16 nPos )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     return mpMenu ? mpMenu->GetItemId( nPos ) : 0;
 }
 
-sal_Int16 VCLXMenu::getItemPos( sal_Int16 nId ) throw(::com::sun::star::uno::RuntimeException)
+sal_Int16 VCLXMenu::getItemPos(
+    sal_Int16 nId )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     return mpMenu ? mpMenu->GetItemPos( nId ) : 0;
 }
 
-void VCLXMenu::enableItem( sal_Int16 nItemId, sal_Bool bEnable ) throw(::com::sun::star::uno::RuntimeException)
+void VCLXMenu::enableItem(
+    sal_Int16 nItemId,
+    sal_Bool bEnable )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     if ( mpMenu )
-	    mpMenu->EnableItem( nItemId, bEnable );
+        mpMenu->EnableItem( nItemId, bEnable );
 }
 
-sal_Bool VCLXMenu::isItemEnabled( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException)
+sal_Bool VCLXMenu::isItemEnabled(
+    sal_Int16 nItemId )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     return mpMenu ? mpMenu->IsItemEnabled( nItemId ) : sal_False;
 }
 
-void VCLXMenu::setItemText( sal_Int16 nItemId, const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException)
+void VCLXMenu::setItemText(
+    sal_Int16 nItemId,
+    const OUString& aText )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     if ( mpMenu )
-	    mpMenu->SetItemText( nItemId, aText );
+        mpMenu->SetItemText( nItemId, aText );
 }
 
-::rtl::OUString VCLXMenu::getItemText( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException)
+OUString VCLXMenu::getItemText(
+    sal_Int16 nItemId )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-    ::rtl::OUString aItemText;
+    OUString aItemText;
     if ( mpMenu )
         aItemText = mpMenu->GetItemText( nItemId );
     return aItemText;
 }
 
-void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& rxPopupMenu ) throw(::com::sun::star::uno::RuntimeException)
+void VCLXMenu::setPopupMenu(
+    sal_Int16 nItemId,
+    const css::uno::Reference< css::awt::XPopupMenu >& rxPopupMenu )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-	VCLXMenu* pVCLMenu = VCLXMenu::GetImplementation( rxPopupMenu );
-	DBG_ASSERT( pVCLMenu && pVCLMenu->GetMenu() && pVCLMenu->IsPopupMenu(), "setPopupMenu: Invalid Menu!" );
+    VCLXMenu* pVCLMenu = VCLXMenu::GetImplementation( rxPopupMenu );
+    DBG_ASSERT( pVCLMenu && pVCLMenu->GetMenu() && pVCLMenu->IsPopupMenu(), "setPopupMenu: Invalid Menu!" );
 
-	if ( mpMenu && pVCLMenu && pVCLMenu->GetMenu() && pVCLMenu->IsPopupMenu() )
-	{
-		// Selbst eine Ref halten!
-		::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > * pNewRef = new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > ;
-		*pNewRef = rxPopupMenu;
-		maPopupMenueRefs.Insert( pNewRef, LIST_APPEND );
+    if ( mpMenu && pVCLMenu && pVCLMenu->GetMenu() && pVCLMenu->IsPopupMenu() )
+    {
+        // Selbst eine Ref halten!
+        css::uno::Reference< css::awt::XPopupMenu > * pNewRef = new css::uno::Reference< css::awt::XPopupMenu > ;
+        *pNewRef = rxPopupMenu;
+        maPopupMenueRefs.Insert( pNewRef, LIST_APPEND );
 
-		mpMenu->SetPopupMenu( nItemId, (PopupMenu*) pVCLMenu->GetMenu() );
-	}
+        mpMenu->SetPopupMenu( nItemId, (PopupMenu*) pVCLMenu->GetMenu() );
+    }
 }
 
-::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > VCLXMenu::getPopupMenu( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException)
+css::uno::Reference< css::awt::XPopupMenu > VCLXMenu::getPopupMenu(
+    sal_Int16 nItemId )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-	::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >  aRef;
+    css::uno::Reference< css::awt::XPopupMenu >  aRef;
     Menu* pMenu = mpMenu ? mpMenu->GetPopupMenu( nItemId ) : NULL;
-	if ( pMenu )
-	{
-		for ( sal_uInt32 n = maPopupMenueRefs.Count(); n; )
-		{
-			::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > * pRef = maPopupMenueRefs.GetObject( --n );
-			Menu* pM = ((VCLXMenu*)pRef->get())->GetMenu();
-			if ( pM == pMenu )
-			{
-				aRef = *pRef;
-				break;
-			}
-		}
-	}
-	return aRef;
+    if ( pMenu )
+    {
+        for ( sal_uInt32 n = maPopupMenueRefs.Count(); n; )
+        {
+            css::uno::Reference< css::awt::XPopupMenu > * pRef = maPopupMenueRefs.GetObject( --n );
+            Menu* pM = ((VCLXMenu*)pRef->get())->GetMenu();
+            if ( pM == pMenu )
+            {
+                aRef = *pRef;
+                break;
+            }
+        }
+    }
+    return aRef;
 }
 
-// ::com::sun::star::awt::XPopupMenu
-void VCLXMenu::insertSeparator( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException)
+// css::awt::XPopupMenu
+void VCLXMenu::insertSeparator(
+    sal_Int16 nPos )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     if ( mpMenu )
-	    mpMenu->InsertSeparator( nPos );
+        mpMenu->InsertSeparator( nPos );
 }
 
-void VCLXMenu::setDefaultItem( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException)
+void VCLXMenu::setDefaultItem(
+    sal_Int16 nItemId )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-	if ( mpMenu )
+    if ( mpMenu )
         mpMenu->SetDefaultItem( nItemId );
 }
 
-sal_Int16 VCLXMenu::getDefaultItem(  ) throw(::com::sun::star::uno::RuntimeException)
+sal_Int16 VCLXMenu::getDefaultItem(  )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     return mpMenu ? mpMenu->GetDefaultItem() : 0;
 }
 
-void VCLXMenu::checkItem( sal_Int16 nItemId, sal_Bool bCheck ) throw(::com::sun::star::uno::RuntimeException)
+void VCLXMenu::checkItem(
+    sal_Int16 nItemId,
+    sal_Bool bCheck )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     if ( mpMenu )
         mpMenu->CheckItem( nItemId, bCheck );
 }
 
-sal_Bool VCLXMenu::isItemChecked( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException)
+sal_Bool VCLXMenu::isItemChecked(
+    sal_Int16 nItemId )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     return mpMenu ? mpMenu->IsItemChecked( nItemId ) : sal_False;
 }
 
-sal_Int16 VCLXMenu::execute( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rxWindowPeer, const ::com::sun::star::awt::Rectangle& rArea, sal_Int16 nFlags ) throw(::com::sun::star::uno::RuntimeException)
+sal_Int16 VCLXMenu::execute(
+    const css::uno::Reference< css::awt::XWindowPeer >& rxWindowPeer,
+    const css::awt::Point& rPos,
+    sal_Int16 nFlags )
+throw(css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-	sal_Int16 nRet = 0;
-	if ( mpMenu && IsPopupMenu() )
-		nRet = ((PopupMenu*)mpMenu)->Execute( VCLUnoHelper::GetWindow( rxWindowPeer ), VCLRectangle(rArea), nFlags | POPUPMENU_NOMOUSEUPCLOSE );
-	return nRet;
+    sal_Int16 nRet = 0;
+    if ( mpMenu && IsPopupMenu() )
+    {
+        const ::Point aPoint = VCLPoint( rPos );
+        nRet = ((PopupMenu*)mpMenu)->Execute( VCLUnoHelper::GetWindow( rxWindowPeer ),
+                                              ::Rectangle(aPoint,aPoint),
+                                              nFlags | POPUPMENU_NOMOUSEUPCLOSE );
+    }
+    return nRet;
 }
 
 
-void SAL_CALL VCLXMenu::setCommand( sal_Int16 nItemId, const ::rtl::OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL VCLXMenu::setCommand(
+    sal_Int16 nItemId,
+    const OUString& aCommand )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     if ( mpMenu )
         mpMenu->SetItemCommand( nItemId, aCommand );
 }
 
-::rtl::OUString SAL_CALL VCLXMenu::getCommand( sal_Int16 nItemId ) throw (::com::sun::star::uno::RuntimeException)
+OUString SAL_CALL VCLXMenu::getCommand(
+    sal_Int16 nItemId )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-    ::rtl::OUString aItemCommand;
+    OUString aItemCommand;
     if ( mpMenu )
         aItemCommand = mpMenu->GetItemCommand( nItemId );
     return aItemCommand;
 }
 
-void SAL_CALL VCLXMenu::setHelpCommand( sal_Int16 nItemId, const ::rtl::OUString& aHelp ) throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL VCLXMenu::setHelpCommand(
+    sal_Int16 nItemId,
+    const OUString& aHelp )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     if ( mpMenu )
         mpMenu->SetHelpCommand( nItemId, aHelp );
 }
 
-::rtl::OUString SAL_CALL VCLXMenu::getHelpCommand( sal_Int16 nItemId ) throw (::com::sun::star::uno::RuntimeException)
+OUString SAL_CALL VCLXMenu::getHelpCommand(
+    sal_Int16 nItemId )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-    ::rtl::OUString aHelpCommand;
+    OUString aHelpCommand;
     if ( mpMenu )
         aHelpCommand = mpMenu->GetHelpCommand( nItemId );
     return aHelpCommand;
 }
 
 
-// ============================================================================
-// ============================================================================
-// ============================================================================
-
-
-// BEGIN ANONYMOUS NAMESPACE
 namespace
 {
-    namespace css = ::com::sun::star;
-
-    Image lcl_XGraphic2VCLImage(
-                                const css::uno::Reference< css::graphic::XGraphic >& xGraphic,
-                                sal_Bool bResize )
+    static Image lcl_XGraphic2VCLImage(
+        const css::uno::Reference< css::graphic::XGraphic >& xGraphic,
+        sal_Bool bResize )
     {
         Image aImage;
         if ( !xGraphic.is() )
@@ -680,13 +684,9 @@ namespace
         return aImage;
     }
 
-    /**
-        As svtools builds after toolkit, we can not include/use
-        svtools/inc/acceleratorexecute.hxx
-        So I just copy here svt::AcceleratorExecute::st_AWTKey2VCLKey
-        and svt::AcceleratorExecute::st_VCLKey2AWTKey
-    */
-    css::awt::KeyEvent lcl_VCLKey2AWTKey(const KeyCode& aVCLKey)
+    /** Copied from svtools/inc/acceleratorexecute.hxx */
+    static css::awt::KeyEvent lcl_VCLKey2AWTKey(
+        const KeyCode& aVCLKey)
     {
         css::awt::KeyEvent aAWTKey;
         aAWTKey.Modifiers = 0;
@@ -715,24 +715,19 @@ namespace
         return KeyCode(nKey, bShift, bMod1, bMod2, bMod3);
     }
 
-} // END ANONYMOUS NAMESPACE
-
-
-// ============================================================================
-// ============================================================================
-// ============================================================================
-
+}
 
-// XMenuExtended2 Methods
 
-::sal_Bool SAL_CALL VCLXMenu::isPopupMenu(  ) throw (::com::sun::star::uno::RuntimeException)
+::sal_Bool SAL_CALL VCLXMenu::isPopupMenu(  )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
     return IsPopupMenu();
 }
 
-void SAL_CALL VCLXMenu::clear(  ) throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL VCLXMenu::clear(  )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
@@ -741,26 +736,26 @@ void SAL_CALL VCLXMenu::clear(  ) throw 
 }
 
 
-::com::sun::star::awt::MenuItemType SAL_CALL VCLXMenu::getItemType( ::sal_Int16 nItemPos )
-throw ( ::com::sun::star::container::NoSuchElementException,
-        ::com::sun::star::uno::RuntimeException)
+css::awt::MenuItemType SAL_CALL VCLXMenu::getItemType(
+    ::sal_Int16 nItemPos )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-    ::com::sun::star::awt::MenuItemType aMenuItemType =
-        ::com::sun::star::awt::MenuItemType_DONTKNOW;
+    css::awt::MenuItemType aMenuItemType =
+        css::awt::MenuItemType_DONTKNOW;
     if ( mpMenu )
     {
-        THROW_MENUPOS_NOT_FOUND( "VCLXMenu::getItemType()", nItemPos )
-        aMenuItemType = ( (::com::sun::star::awt::MenuItemType) mpMenu->GetItemType( nItemPos ) );
+        aMenuItemType = ( (css::awt::MenuItemType) mpMenu->GetItemType( nItemPos ) );
     }
 
     return aMenuItemType;
 }
 
-void SAL_CALL VCLXMenu::hideDisabledEntries( ::sal_Bool bHide )
-throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL VCLXMenu::hideDisabledEntries(
+    ::sal_Bool bHide )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
@@ -774,15 +769,8 @@ throw (::com::sun::star::uno::RuntimeExc
 }
 
 
-// ============================================================================
-// ============================================================================
-// ============================================================================
-
-
-// XPopupMenuExtended Methods
-
 ::sal_Bool SAL_CALL VCLXMenu::isInExecute(  )
-throw (::com::sun::star::uno::RuntimeException)
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
@@ -795,7 +783,7 @@ throw (::com::sun::star::uno::RuntimeExc
 
 
 void SAL_CALL VCLXMenu::endExecute()
-throw (::com::sun::star::uno::RuntimeException)
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
@@ -805,54 +793,9 @@ throw (::com::sun::star::uno::RuntimeExc
 }
 
 
-void SAL_CALL VCLXMenu::setLogo( const ::com::sun::star::awt::MenuLogo& aMenuLogo )
-throw (::com::sun::star::uno::RuntimeException)
-{
-    ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
-
-    if ( mpMenu )
-    {
-        if ( aMenuLogo.Graphic.is() )
-        {
-            Image aImage = lcl_XGraphic2VCLImage( aMenuLogo.Graphic, sal_False );
-            MenuLogo aVCLMenuLogo;
-
-            aVCLMenuLogo.aBitmap        = aImage.GetBitmapEx();
-            aVCLMenuLogo.aStartColor    = Color( (sal_uInt32)(aMenuLogo.StartColor) );
-            aVCLMenuLogo.aEndColor      = Color( (sal_uInt32)(aMenuLogo.EndColor) );
-
-            mpMenu->SetLogo( aVCLMenuLogo );
-        }
-        else
-            mpMenu->SetLogo();
-    }
-}
-
-
-::com::sun::star::awt::MenuLogo SAL_CALL VCLXMenu::getLogo(  )
-throw (::com::sun::star::uno::RuntimeException)
-{
-    ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
-
-    ::com::sun::star::awt::MenuLogo aAWTMenuLogo;
-    if ( mpMenu )
-    {
-        if ( mpMenu->HasLogo() )
-        {
-            MenuLogo aVCLMenuLogo      = mpMenu->GetLogo();
-            aAWTMenuLogo.Graphic       = Image(aVCLMenuLogo.aBitmap).GetXGraphic();
-            aAWTMenuLogo.StartColor    = aVCLMenuLogo.aStartColor.GetColor();
-            aAWTMenuLogo.EndColor      = aVCLMenuLogo.aEndColor.GetColor();
-        }
-    }
-    return aAWTMenuLogo;
-}
-
-
-void SAL_CALL VCLXMenu::enableAutoMnemonics( ::sal_Bool bEnable )
-throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL VCLXMenu::enableAutoMnemonics(
+    ::sal_Bool bEnable )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
@@ -866,34 +809,32 @@ throw (::com::sun::star::uno::RuntimeExc
 }
 
 
-void SAL_CALL VCLXMenu::setAcceleratorKeyEvent( ::sal_Int16 nItemId,
-                                                const ::com::sun::star::awt::KeyEvent& aKeyEvent )
-throw ( ::com::sun::star::container::NoSuchElementException,
-        ::com::sun::star::uno::RuntimeException)
+void SAL_CALL VCLXMenu::setAcceleratorKeyEvent(
+    ::sal_Int16 nItemId,
+    const css::awt::KeyEvent& aKeyEvent )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-    if ( mpMenu && IsPopupMenu() )
+    if ( mpMenu && IsPopupMenu() && MENU_ITEM_NOTFOUND != mpMenu->GetItemPos( nItemId ) )
     {
-        THROW_MENUITEM_NOT_FOUND( "VCLXMenu::setAcceleratorKeyEvent()", nItemId )
         KeyCode aVCLKeyCode = lcl_AWTKey2VCLKey( aKeyEvent );
         mpMenu->SetAccelKey( nItemId, aVCLKeyCode );
     }
 }
 
 
-::com::sun::star::awt::KeyEvent SAL_CALL VCLXMenu::getAcceleratorKeyEvent( ::sal_Int16 nItemId )
-throw ( ::com::sun::star::container::NoSuchElementException,
-        ::com::sun::star::uno::RuntimeException)
+css::awt::KeyEvent SAL_CALL VCLXMenu::getAcceleratorKeyEvent(
+    ::sal_Int16 nItemId )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-    ::com::sun::star::awt::KeyEvent aKeyEvent;
-    if ( mpMenu && IsPopupMenu() )
+    css::awt::KeyEvent aKeyEvent;
+    if ( mpMenu && IsPopupMenu() && MENU_ITEM_NOTFOUND != mpMenu->GetItemPos( nItemId ) )
     {
-        THROW_MENUITEM_NOT_FOUND( "VCLXMenu::getAcceleratorKeyEvent()", nItemId )
         KeyCode nKeyCode = mpMenu->GetAccelKey( nItemId );
         aKeyEvent = lcl_VCLKey2AWTKey( nKeyCode );
     }
@@ -902,32 +843,31 @@ throw ( ::com::sun::star::container::NoS
 }
 
 
-void SAL_CALL VCLXMenu::setHelpText( ::sal_Int16 nItemId, const ::rtl::OUString& sHelpText )
-throw ( ::com::sun::star::container::NoSuchElementException,
-        ::com::sun::star::uno::RuntimeException)
+void SAL_CALL VCLXMenu::setHelpText(
+    ::sal_Int16 nItemId,
+    const OUString& sHelpText )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-    if ( mpMenu && IsPopupMenu() )
+    if ( mpMenu && MENU_ITEM_NOTFOUND != mpMenu->GetItemPos( nItemId ) )
     {
-        THROW_MENUITEM_NOT_FOUND( "VCLXMenu::setHelpText()", nItemId )
         mpMenu->SetHelpText( nItemId, sHelpText );
     }
 }
 
 
-::rtl::OUString SAL_CALL VCLXMenu::getHelpText( ::sal_Int16 nItemId )
-throw ( ::com::sun::star::container::NoSuchElementException,
-        ::com::sun::star::uno::RuntimeException)
+OUString SAL_CALL VCLXMenu::getHelpText(
+    ::sal_Int16 nItemId )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     rtl::OUString sHelpText;
-    if ( mpMenu && IsPopupMenu() )
+    if ( mpMenu && MENU_ITEM_NOTFOUND != mpMenu->GetItemPos( nItemId ) )
     {
-        THROW_MENUITEM_NOT_FOUND( "VCLXMenu::getHelpText()", nItemId )
         sHelpText = mpMenu->GetHelpText( nItemId );
     }
 
@@ -935,32 +875,31 @@ throw ( ::com::sun::star::container::NoS
 }
 
 
-void SAL_CALL VCLXMenu::setTipHelpText( ::sal_Int16 nItemId, const ::rtl::OUString& sTipHelpText )
-throw ( ::com::sun::star::container::NoSuchElementException,
-        ::com::sun::star::uno::RuntimeException)
+void SAL_CALL VCLXMenu::setTipHelpText(
+    ::sal_Int16 nItemId,
+    const OUString& sTipHelpText )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-    if ( mpMenu && IsPopupMenu() )
+    if ( mpMenu && MENU_ITEM_NOTFOUND != mpMenu->GetItemPos( nItemId ) )
     {
-        THROW_MENUITEM_NOT_FOUND( "VCLXMenu::setTipHelpText()", nItemId )
         mpMenu->SetTipHelpText( nItemId, sTipHelpText );
     }
 }
 
 
-::rtl::OUString SAL_CALL VCLXMenu::getTipHelpText( ::sal_Int16 nItemId )
-throw ( ::com::sun::star::container::NoSuchElementException,
-        ::com::sun::star::uno::RuntimeException)
+OUString SAL_CALL VCLXMenu::getTipHelpText(
+    ::sal_Int16 nItemId )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
     rtl::OUString sTipHelpText;
-    if ( mpMenu && IsPopupMenu() )
+    if ( mpMenu && MENU_ITEM_NOTFOUND != mpMenu->GetItemPos( nItemId ) )
     {
-        THROW_MENUITEM_NOT_FOUND( "VCLXMenu::getTipHelpText()", nItemId )
         sTipHelpText = mpMenu->GetTipHelpText( nItemId );
     }
     return sTipHelpText;
@@ -968,35 +907,34 @@ throw ( ::com::sun::star::container::NoS
 
 
 void SAL_CALL VCLXMenu::setItemImage(
-                                            ::sal_Int16 nItemId,
-                                            const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& xGraphic, ::sal_Bool bScale )
-throw ( ::com::sun::star::container::NoSuchElementException,
-        ::com::sun::star::uno::RuntimeException)
+    ::sal_Int16 nItemId,
+    const css::uno::Reference< css::graphic::XGraphic >& xGraphic,
+    ::sal_Bool bScale )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-    if ( mpMenu && IsPopupMenu() )
+    if ( mpMenu && IsPopupMenu() && MENU_ITEM_NOTFOUND != mpMenu->GetItemPos( nItemId ) )
     {
-        THROW_MENUITEM_NOT_FOUND( "VCLXMenu::setItemImage()", nItemId )
         Image aImage = lcl_XGraphic2VCLImage( xGraphic, bScale );
         mpMenu->SetItemImage( nItemId, aImage );
     }
 }
 
 
-::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL VCLXMenu::getItemImage( ::sal_Int16 nItemId )
-throw ( ::com::sun::star::container::NoSuchElementException,
-        ::com::sun::star::uno::RuntimeException)
+css::uno::Reference< css::graphic::XGraphic > SAL_CALL
+VCLXMenu::getItemImage(
+    ::sal_Int16 nItemId )
+throw (css::uno::RuntimeException)
 {
     ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
     ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
-    ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > rxGraphic;
+    css::uno::Reference< css::graphic::XGraphic > rxGraphic;
 
-    if ( mpMenu && IsPopupMenu() )
+    if ( mpMenu && IsPopupMenu() && MENU_ITEM_NOTFOUND != mpMenu->GetItemPos( nItemId ) )
     {
-        THROW_MENUITEM_NOT_FOUND( "VCLXMenu::getItemImage()", nItemId )
         Image aImage = mpMenu->GetItemImage( nItemId );
         if ( !!aImage )
             rxGraphic = aImage.GetXGraphic();
@@ -1005,73 +943,6 @@ throw ( ::com::sun::star::container::NoS
 }
 
 
-void SAL_CALL VCLXMenu::setItemImageAngle( ::sal_Int16 nItemId, ::sal_Int32 nAngle )
-throw ( ::com::sun::star::container::NoSuchElementException,
-        ::com::sun::star::uno::RuntimeException)
-{
-    ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
-
-    if ( mpMenu && IsPopupMenu() )
-    {
-        THROW_MENUITEM_NOT_FOUND( "VCLXMenu::setItemImageAngle()", nItemId )
-        mpMenu->SetItemImageAngle( nItemId, nAngle );
-    }
-}
-
-
-::sal_Int32 SAL_CALL VCLXMenu::getItemImageAngle( ::sal_Int16 nItemId )
-throw ( ::com::sun::star::container::NoSuchElementException,
-        ::com::sun::star::uno::RuntimeException)
-{
-    ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
-
-    ::sal_Int32 nItemImageAngle( 0 );
-    if ( mpMenu && IsPopupMenu() )
-    {
-        THROW_MENUITEM_NOT_FOUND( "VCLXMenu::getItemImageAngle()", nItemId )
-        nItemImageAngle = mpMenu->GetItemImageAngle( nItemId );
-    }
-    return nItemImageAngle;
-}
-
-
-void SAL_CALL VCLXMenu::setItemImageMirrorMode( ::sal_Int16 nItemId, ::sal_Bool bMirror )
-throw ( ::com::sun::star::container::NoSuchElementException,
-        ::com::sun::star::uno::RuntimeException)
-{
-    ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
-
-    if ( mpMenu && IsPopupMenu() )
-    {
-        THROW_MENUITEM_NOT_FOUND( "VCLXMenu::setItemImageMirrorMode()", nItemId )
-        mpMenu->SetItemImageMirrorMode( nItemId, bMirror );
-    }
-}
-
-
-::sal_Bool SAL_CALL VCLXMenu::isItemImageInMirrorMode( ::sal_Int16 nItemId )
-throw ( ::com::sun::star::container::NoSuchElementException,
-        ::com::sun::star::uno::RuntimeException)
-{
-    ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
-    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
-
-    sal_Bool bMirrorMode( sal_False );
-    if ( mpMenu && IsPopupMenu() )
-    {
-        THROW_MENUITEM_NOT_FOUND( "VCLXMenu::isItemImageInMirrorMode()", nItemId )
-        bMirrorMode = mpMenu->GetItemImageMirrorMode( nItemId );
-    }
-    return bMirrorMode;
-}
-
-
-//	----------------------------------------------------
-//	class VCLXMenuBar
-//	----------------------------------------------------
 
 DBG_NAME(VCLXMenuBar);
 
@@ -1086,9 +957,6 @@ VCLXMenuBar::VCLXMenuBar( MenuBar* pMenu
     DBG_CTOR( VCLXMenuBar, 0 );
 }
 
-//	----------------------------------------------------
-//	class VCLXPopupMenu
-//	----------------------------------------------------
 
 DBG_NAME(VCLXPopupMenu);
 

Modified: openoffice/branches/ia2/main/toolkit/source/awt/vclxtoolkit.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/source/awt/vclxtoolkit.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/source/awt/vclxtoolkit.cxx (original)
+++ openoffice/branches/ia2/main/toolkit/source/awt/vclxtoolkit.cxx Fri Feb  1 08:46:00 2013
@@ -70,8 +70,6 @@
 #include <toolkit/awt/vclxtabpagecontainer.hxx>
 #include <toolkit/awt/vclxtabpagemodel.hxx>
 
-#include <toolkit/awt/xsimpleanimation.hxx>
-#include <toolkit/awt/xthrobber.hxx>
 #include <toolkit/awt/animatedimagespeer.hxx>
 #include <toolkit/awt/vclxtopwindow.hxx>
 #include <toolkit/awt/vclxwindow.hxx>
@@ -315,11 +313,9 @@ static ComponentInfo __FAR_DATA aCompone
 	{ "radiobutton",		WINDOW_RADIOBUTTON },
 	{ "scrollbar",			WINDOW_SCROLLBAR },
 	{ "scrollbarbox",		WINDOW_SCROLLBARBOX },
-    { "simpleanimation",	WINDOW_CONTROL },
     { "animatedimages",     WINDOW_CONTROL },
 	{ "spinbutton",			WINDOW_SPINBUTTON },
 	{ "spinfield",			WINDOW_SPINFIELD },
-    { "throbber",        	WINDOW_CONTROL },
 	{ "splitter",			WINDOW_SPLITTER },
 	{ "splitwindow",		WINDOW_SPLITWINDOW },
 	{ "statusbar",			WINDOW_STATUSBAR },
@@ -385,6 +381,47 @@ sal_uInt16 ImplGetComponentType( const S
 }
 
 
+namespace
+{
+    struct MessageBoxTypeInfo
+    {
+        css::awt::MessageBoxType eType;
+        const sal_Char          *pName;
+        sal_Int32                nLen;
+    };
+
+    static MessageBoxTypeInfo aMessageBoxTypeInfo[] =
+    {
+        { css::awt::MessageBoxType_MESSAGEBOX,      RTL_CONSTASCII_STRINGPARAM("messbox") },
+        { css::awt::MessageBoxType_INFOBOX,         RTL_CONSTASCII_STRINGPARAM("infobox") },
+        { css::awt::MessageBoxType_WARNINGBOX,      RTL_CONSTASCII_STRINGPARAM("warningbox") },
+        { css::awt::MessageBoxType_ERRORBOX,        RTL_CONSTASCII_STRINGPARAM("errorbox") },
+        { css::awt::MessageBoxType_QUERYBOX,        RTL_CONSTASCII_STRINGPARAM("querybox") },
+        { css::awt::MessageBoxType_MAKE_FIXED_SIZE, 0, 0 }
+    };
+
+    static bool lcl_convertMessageBoxType(
+        rtl::OUString &sType,
+        css::awt::MessageBoxType eType )
+    {
+        const MessageBoxTypeInfo *pMap = aMessageBoxTypeInfo;
+        css::awt::MessageBoxType eVal = css::awt::MessageBoxType_MAKE_FIXED_SIZE;
+
+        while ( pMap->pName )
+        {
+            if ( pMap->eType == eType )
+            {
+                eVal = eType;
+                sType = rtl::OUString( pMap->pName, pMap->nLen, RTL_TEXTENCODING_ASCII_US );
+                break;
+            }
+            pMap++;
+        }
+
+        return ( eVal != css::awt::MessageBoxType_MAKE_FIXED_SIZE );
+    }
+}
+
 //	----------------------------------------------------
 //	class VCLXToolkit
 //	----------------------------------------------------
@@ -1014,21 +1051,7 @@ Window*	VCLXToolkit::ImplCreateWindow( V
 				}
 			break;
 			case WINDOW_CONTROL:
-                if  ( aServiceName.EqualsAscii( "simpleanimation" ) )
-                {
-                    pNewWindow = new Throbber( pParent, nWinBits, Throbber::IMAGES_NONE );
-                    ((Throbber*)pNewWindow)->SetScaleMode( css::awt::ImageScaleMode::Anisotropic );
-                        // (compatibility)
-                    *ppNewComp = new ::toolkit::XSimpleAnimation;
-                }
-                else if ( aServiceName.EqualsAscii( "throbber" ) )
-                {
-                    pNewWindow = new Throbber( pParent, nWinBits, Throbber::IMAGES_NONE );
-                    ((Throbber*)pNewWindow)->SetScaleMode( css::awt::ImageScaleMode::Anisotropic );
-                        // (compatibility)
-                    *ppNewComp = new ::toolkit::XThrobber;
-                }
-				else if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase(
+                if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase(
                         ::rtl::OUString::createFromAscii("tabpagecontainer") ) )
                 {
                     pNewWindow = new TabControl( pParent, nWinBits );
@@ -1247,9 +1270,8 @@ css::uno::Reference< css::awt::XWindowPe
 
 // ::com::sun::star::awt::XMessageBoxFactory
 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMessageBox > SAL_CALL VCLXToolkit::createMessageBox( 
-    const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& aParent, 
-    const ::com::sun::star::awt::Rectangle& aPosSize, 
-    const ::rtl::OUString& aType, 
+    const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& aParent,
+    ::com::sun::star::awt::MessageBoxType eType,
     ::sal_Int32 aButtons, 
     const ::rtl::OUString& aTitle, 
     const ::rtl::OUString& aMessage ) throw (::com::sun::star::uno::RuntimeException)
@@ -1289,12 +1311,14 @@ css::uno::Reference< css::awt::XWindowPe
         nAddWinBits |= WB_ABORT_RETRY_IGNORE;
     if ( sal_Int32( aButtons & 0xffff0000L ) == css::awt::MessageBoxButtons::DEFAULT_BUTTON_IGNORE )
         nAddWinBits |= WB_DEF_IGNORE;
-    
+
+    rtl::OUString aType;
+    lcl_convertMessageBoxType( aType, eType );
+
     aDescriptor.Type              = css::awt::WindowClass_MODALTOP;
     aDescriptor.WindowServiceName = aType;
     aDescriptor.ParentIndex       = -1;
     aDescriptor.Parent            = aParent;
-    aDescriptor.Bounds            = aPosSize;
     aDescriptor.WindowAttributes  = nWindowAttributes;
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMessageBox > xMsgBox(
         ImplCreateWindow( aDescriptor, nAddWinBits ), css::uno::UNO_QUERY );

Modified: openoffice/branches/ia2/main/toolkit/source/awt/vclxwindows.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/source/awt/vclxwindows.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/source/awt/vclxwindows.cxx (original)
+++ openoffice/branches/ia2/main/toolkit/source/awt/vclxwindows.cxx Fri Feb  1 08:46:00 2013
@@ -37,7 +37,7 @@
 #include <cppuhelper/typeprovider.hxx>
 #include <com/sun/star/awt/VisualEffect.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecute.hpp>
 #include <com/sun/star/system/SystemShellExecuteFlags.hpp>
 #include <com/sun/star/resource/XStringResourceResolver.hpp>
 #include <com/sun/star/awt/ImageScaleMode.hpp>
@@ -700,7 +700,7 @@ void VCLXImageControl::setProperty( cons
 	{
         case BASEPROPERTY_IMAGE_SCALE_MODE:
         {
-            sal_Int16 nScaleMode( ImageScaleMode::Anisotropic );
+            sal_Int16 nScaleMode( ImageScaleMode::ANISOTROPIC );
             if ( pImageControl && ( Value >>= nScaleMode ) )
             {
                 pImageControl->SetScaleMode( nScaleMode );
@@ -714,7 +714,7 @@ void VCLXImageControl::setProperty( cons
 			sal_Bool bScaleImage = sal_False;
             if ( pImageControl && ( Value >>= bScaleImage ) )
             {
-                pImageControl->SetScaleMode( bScaleImage ? ImageScaleMode::Anisotropic : ImageScaleMode::None );
+                pImageControl->SetScaleMode( bScaleImage ? ImageScaleMode::ANISOTROPIC : ImageScaleMode::NONE );
             }
 		}
 		break;
@@ -736,11 +736,11 @@ void VCLXImageControl::setProperty( cons
     switch ( nPropType )
 	{
         case BASEPROPERTY_IMAGE_SCALE_MODE:
-            aProp <<= ( pImageControl ? pImageControl->GetScaleMode() : ImageScaleMode::Anisotropic );
+            aProp <<= ( pImageControl ? pImageControl->GetScaleMode() : ImageScaleMode::ANISOTROPIC );
             break;
 
 		case BASEPROPERTY_SCALEIMAGE:
-            aProp <<= ( pImageControl && pImageControl->GetScaleMode() != ImageScaleMode::None ) ? sal_True : sal_False;
+            aProp <<= ( pImageControl && pImageControl->GetScaleMode() != ImageScaleMode::NONE ) ? sal_True : sal_False;
 		    break;
 
 		default:
@@ -2626,8 +2626,8 @@ void VCLXFixedHyperlink::ProcessWindowEv
                 if ( pBase )
                     sURL = pBase->GetURL();
                 Reference< ::com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
-                    ::comphelper::getProcessServiceFactory()->createInstance(
-                        ::rtl::OUString::createFromAscii( "com.sun.star.system.SystemShellExecute" )), uno::UNO_QUERY );
+                    ::com::sun::star::system::SystemShellExecute::create(
+                        ::comphelper::getProcessComponentContext() ) );
                 if ( sURL.getLength() > 0 && xSystemShellExecute.is() )
                 {
                     try

Modified: openoffice/branches/ia2/main/toolkit/source/controls/animatedimages.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/source/controls/animatedimages.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/source/controls/animatedimages.cxx (original)
+++ openoffice/branches/ia2/main/toolkit/source/controls/animatedimages.cxx Fri Feb  1 08:46:00 2013
@@ -305,11 +305,11 @@ namespace toolkit
         {
         case BASEPROPERTY_IMAGE_SCALE_MODE:
         {
-            sal_Int16 nImageScaleMode( ImageScaleMode::Anisotropic );
+            sal_Int16 nImageScaleMode( ImageScaleMode::ANISOTROPIC );
             OSL_VERIFY( i_value >>= nImageScaleMode );  // convertFastPropertyValue ensures that this has the proper type
-            if  (   ( nImageScaleMode != ImageScaleMode::None )
-                &&  ( nImageScaleMode != ImageScaleMode::Isotropic )
-                &&  ( nImageScaleMode != ImageScaleMode::Anisotropic )
+            if  (   ( nImageScaleMode != ImageScaleMode::NONE )
+                &&  ( nImageScaleMode != ImageScaleMode::ISOTROPIC )
+                &&  ( nImageScaleMode != ImageScaleMode::ANISOTROPIC )
                 )
                 throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
         }
@@ -337,7 +337,7 @@ namespace toolkit
             return makeAny( (sal_Bool)sal_True );
 
         case BASEPROPERTY_IMAGE_SCALE_MODE:
-            return makeAny( ImageScaleMode::None );
+            return makeAny( ImageScaleMode::NONE );
 
         default:
             return UnoControlModel::ImplGetDefaultValue( i_propertyId );
@@ -387,7 +387,7 @@ namespace toolkit
     //------------------------------------------------------------------------------------------------------------------
     ::sal_Int16 SAL_CALL AnimatedImagesControlModel::getScaleMode() throw (RuntimeException)
     {
-        sal_Int16 nImageScaleMode( ImageScaleMode::Anisotropic );
+        sal_Int16 nImageScaleMode( ImageScaleMode::ANISOTROPIC );
         OSL_VERIFY( getPropertyValue( GetPropertyName( BASEPROPERTY_IMAGE_SCALE_MODE ) ) >>= nImageScaleMode );
         return nImageScaleMode;
     }

Modified: openoffice/branches/ia2/main/toolkit/source/controls/unocontrols.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/source/controls/unocontrols.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/source/controls/unocontrols.cxx (original)
+++ openoffice/branches/ia2/main/toolkit/source/controls/unocontrols.cxx Fri Feb  1 08:46:00 2013
@@ -850,7 +850,7 @@ uno::Any UnoControlImageControlModel::Im
         return uno::makeAny( ::rtl::OUString::createFromAscii( szServiceName_UnoControlImageControl ) );
 
     if ( nPropId == BASEPROPERTY_IMAGE_SCALE_MODE )
-        return makeAny( awt::ImageScaleMode::Anisotropic );
+        return makeAny( awt::ImageScaleMode::ANISOTROPIC );
 
 	return GraphicControlModel::ImplGetDefaultValue( nPropId );
 }
@@ -886,9 +886,9 @@ void SAL_CALL UnoControlImageControlMode
             if ( !mbAdjustingImageScaleMode && ImplHasProperty( BASEPROPERTY_SCALEIMAGE ) )
             {
                 mbAdjustingImageScaleMode = true;
-                sal_Int16 nScaleMode( awt::ImageScaleMode::Anisotropic );
+                sal_Int16 nScaleMode( awt::ImageScaleMode::ANISOTROPIC );
                 OSL_VERIFY( _rValue >>= nScaleMode );
-                setDependentFastPropertyValue( BASEPROPERTY_SCALEIMAGE, uno::makeAny( sal_Bool( nScaleMode != awt::ImageScaleMode::None ) ) );
+                setDependentFastPropertyValue( BASEPROPERTY_SCALEIMAGE, uno::makeAny( sal_Bool( nScaleMode != awt::ImageScaleMode::NONE ) ) );
                 mbAdjustingImageScaleMode = false;
             }
             break;
@@ -898,7 +898,7 @@ void SAL_CALL UnoControlImageControlMode
                 mbAdjustingImageScaleMode = true;
                 sal_Bool bScale = sal_True;
                 OSL_VERIFY( _rValue >>= bScale );
-                setDependentFastPropertyValue( BASEPROPERTY_IMAGE_SCALE_MODE, uno::makeAny( bScale ? awt::ImageScaleMode::Anisotropic : awt::ImageScaleMode::None ) );
+                setDependentFastPropertyValue( BASEPROPERTY_IMAGE_SCALE_MODE, uno::makeAny( bScale ? awt::ImageScaleMode::ANISOTROPIC : awt::ImageScaleMode::NONE ) );
                 mbAdjustingImageScaleMode = false;
             }
             break;

Modified: openoffice/branches/ia2/main/toolkit/source/helper/listenermultiplexer.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/source/helper/listenermultiplexer.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/source/helper/listenermultiplexer.cxx (original)
+++ openoffice/branches/ia2/main/toolkit/source/helper/listenermultiplexer.cxx Fri Feb  1 08:46:00 2013
@@ -176,10 +176,10 @@ IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD(
 //	class MenuListenerMultiplexer
 //	----------------------------------------------------
 IMPL_LISTENERMULTIPLEXER_BASEMETHODS( MenuListenerMultiplexer, ::com::sun::star::awt::XMenuListener )
-IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( MenuListenerMultiplexer, ::com::sun::star::awt::XMenuListener, highlight, ::com::sun::star::awt::MenuEvent )
-IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( MenuListenerMultiplexer, ::com::sun::star::awt::XMenuListener, select, ::com::sun::star::awt::MenuEvent )
-IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( MenuListenerMultiplexer, ::com::sun::star::awt::XMenuListener, activate, ::com::sun::star::awt::MenuEvent )
-IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( MenuListenerMultiplexer, ::com::sun::star::awt::XMenuListener, deactivate, ::com::sun::star::awt::MenuEvent )
+IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( MenuListenerMultiplexer, ::com::sun::star::awt::XMenuListener, itemHighlighted, ::com::sun::star::awt::MenuEvent )
+IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( MenuListenerMultiplexer, ::com::sun::star::awt::XMenuListener, itemSelected, ::com::sun::star::awt::MenuEvent )
+IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( MenuListenerMultiplexer, ::com::sun::star::awt::XMenuListener, itemActivated, ::com::sun::star::awt::MenuEvent )
+IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD( MenuListenerMultiplexer, ::com::sun::star::awt::XMenuListener, itemDeactivated, ::com::sun::star::awt::MenuEvent )
 
 //	----------------------------------------------------
 //	class TreeSelectionListenerMultiplexer

Modified: openoffice/branches/ia2/main/toolkit/source/helper/registerservices.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/source/helper/registerservices.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/source/helper/registerservices.cxx (original)
+++ openoffice/branches/ia2/main/toolkit/source/helper/registerservices.cxx Fri Feb  1 08:46:00 2013
@@ -45,8 +45,6 @@
 #include <toolkit/controls/roadmapcontrol.hxx>
 #include <toolkit/controls/tkscrollbar.hxx>
 #include "toolkit/controls/tkspinbutton.hxx"
-#include <toolkit/controls/tksimpleanimation.hxx>
-#include <toolkit/controls/tkthrobber.hxx>
 #include <toolkit/controls/animatedimages.hxx>
 #include <toolkit/controls/spinningprogress.hxx>
 #include <toolkit/controls/dialogcontrol.hxx>
@@ -197,10 +195,6 @@ IMPL_CREATEINSTANCE( VCLXPopupMenu )
 IMPL_CREATEINSTANCE( VCLXPrinterServer )
 IMPL_CREATEINSTANCE2( UnoRoadmapControl )
 IMPL_CREATEINSTANCE2( UnoControlRoadmapModel )
-IMPL_CREATEINSTANCE2( UnoSimpleAnimationControl )
-IMPL_CREATEINSTANCE2( UnoSimpleAnimationControlModel )
-IMPL_CREATEINSTANCE2( UnoThrobberControl )
-IMPL_CREATEINSTANCE2( UnoThrobberControlModel )
 IMPL_CREATEINSTANCE2( UnoControlTabPage )
 IMPL_CREATEINSTANCE2( UnoControlTabPageModel )
 IMPL_CREATEINSTANCE2( UnoControlTabPageContainer )
@@ -301,10 +295,6 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL compone
 		GET_FACTORY( TreeControl, szServiceName_TreeControl, NULL )
 		GET_FACTORY( TreeControlModel, szServiceName_TreeControlModel, NULL )
 		GET_FACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL )
-        GET_FACTORY( UnoSimpleAnimationControlModel, szServiceName_UnoSimpleAnimationControlModel, szServiceName2_UnoSimpleAnimationControlModel )
-        GET_FACTORY( UnoSimpleAnimationControl, szServiceName_UnoSimpleAnimationControl, szServiceName2_UnoSimpleAnimationControl )
-        GET_FACTORY( UnoThrobberControlModel, szServiceName_UnoThrobberControlModel, szServiceName2_UnoThrobberControlModel )
-        GET_FACTORY( UnoThrobberControl, szServiceName_UnoThrobberControl, szServiceName2_UnoThrobberControl )
         GET_FACTORY( UnoFixedHyperlinkControl, szServiceName_UnoControlFixedHyperlink, NULL )
         GET_FACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL )
 		GET_FACTORY( GridControl, szServiceName_GridControl, NULL );

Modified: openoffice/branches/ia2/main/toolkit/source/helper/servicenames.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/source/helper/servicenames.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/source/helper/servicenames.cxx (original)
+++ openoffice/branches/ia2/main/toolkit/source/helper/servicenames.cxx Fri Feb  1 08:46:00 2013
@@ -87,13 +87,9 @@ const sal_Char __FAR_DATA szServiceName_
 const sal_Char __FAR_DATA szServiceName_TreeControl[] = "com.sun.star.awt.tree.TreeControl";
 const sal_Char __FAR_DATA szServiceName_TreeControlModel[] = "com.sun.star.awt.tree.TreeControlModel";
 const sal_Char __FAR_DATA szServiceName_MutableTreeDataModel[] = "com.sun.star.awt.tree.MutableTreeDataModel";
-const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoSimpleAnimationControlModel", szServiceName2_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoControlSimpleAnimationModel";
 const sal_Char __FAR_DATA szServiceName_AnimatedImagesControl[] = "com.sun.star.awt.AnimatedImagesControl";
 const sal_Char __FAR_DATA szServiceName_AnimatedImagesControlModel[] = "com.sun.star.awt.AnimatedImagesControlModel";
 const sal_Char __FAR_DATA szServiceName_SpinningProgressControlModel[] = "com.sun.star.awt.SpinningProgressControlModel";
-const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoSimpleAnimationControl", szServiceName2_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoControlSimpleAnimation";
-const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[] = "com.sun.star.awt.UnoThrobberControlModel", szServiceName2_UnoThrobberControlModel[] = "com.sun.star.awt.UnoControlThrobberModel";
-const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[] = "com.sun.star.awt.UnoThrobberControl", szServiceName2_UnoThrobberControl[] = "com.sun.star.awt.UnoControlThrobber";
 const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[] = "com.sun.star.awt.UnoControlFixedHyperlink";
 const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlinkModel[] = "com.sun.star.awt.UnoControlFixedHyperlinkModel";
 const sal_Char __FAR_DATA szServiceName_GridControl[] = "com.sun.star.awt.grid.UnoControlGrid";

Modified: openoffice/branches/ia2/main/toolkit/source/helper/vclunohelper.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/source/helper/vclunohelper.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/source/helper/vclunohelper.cxx (original)
+++ openoffice/branches/ia2/main/toolkit/source/helper/vclunohelper.cxx Fri Feb  1 08:46:00 2013
@@ -19,8 +19,6 @@
  * 
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_toolkit.hxx"
 
@@ -42,9 +40,7 @@
 #include <com/sun/star/awt/MouseButton.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/embed/EmbedMapUnits.hpp>
-
 #include <com/sun/star/graphic/XGraphic.hpp>
-
 #include <toolkit/helper/vclunohelper.hxx>
 #include <toolkit/helper/convert.hxx>
 #include <toolkit/awt/vclxbitmap.hxx>
@@ -55,12 +51,11 @@
 #include <toolkit/awt/vclxfont.hxx>
 #include <toolkit/controls/unocontrolcontainer.hxx>
 #include <toolkit/controls/unocontrolcontainermodel.hxx>
-
 #include <vcl/graph.hxx>
 #include <comphelper/processfactory.hxx>
-
 #include <com/sun/star/awt/Size.hpp>
 #include <com/sun/star/awt/Point.hpp>
+#include <vcl/dibtools.hxx>
 
 using namespace ::com::sun::star;
 
@@ -101,12 +96,12 @@ BitmapEx VCLUnoHelper::GetBitmap( const 
 			{
 				::com::sun::star::uno::Sequence<sal_Int8> aBytes = rxBitmap->getDIB();
 				SvMemoryStream aMem( (char*) aBytes.getArray(), aBytes.getLength(), STREAM_READ );
-				aMem >> aDIB;
+                ReadDIB(aDIB, aMem, true);
 			}
 			{
 				::com::sun::star::uno::Sequence<sal_Int8> aBytes = rxBitmap->getMaskDIB();
 				SvMemoryStream aMem( (char*) aBytes.getArray(), aBytes.getLength(), STREAM_READ );
-				aMem >> aMask;
+                ReadDIB(aMask, aMem, true);
 			}
 			aBmp = BitmapEx( aDIB, aMask );
 		}

Modified: openoffice/branches/ia2/main/toolkit/source/layout/core/root.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/source/layout/core/root.cxx?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/source/layout/core/root.cxx (original)
+++ openoffice/branches/ia2/main/toolkit/source/layout/core/root.cxx Fri Feb  1 08:46:00 2013
@@ -82,10 +82,9 @@ void ShowMessageBox( uno::Reference< lan
     uno::Reference< awt::XWindowPeer > xWindowPeer( xContainerWindow, uno::UNO_QUERY_THROW );
     uno::Reference< awt::XMessageBoxFactory > xMessageBoxFactory( xToolkit, uno::UNO_QUERY );
 
-    awt::Rectangle aRectangle;
     uno::Reference< awt::XMessageBox > xMessageBox
         = xMessageBoxFactory->createMessageBox
-        ( xWindowPeer, aRectangle, OUString::createFromAscii( "errorbox" ),
+        ( xWindowPeer, awt::MessageBoxType_ERRORBOX,
           awt::MessageBoxButtons::BUTTONS_OK, aTitle, aMessage );
 
     if ( xMessageBox.is() )

Modified: openoffice/branches/ia2/main/toolkit/src2xml/source/boxer.py
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/src2xml/source/boxer.py?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/src2xml/source/boxer.py (original)
+++ openoffice/branches/ia2/main/toolkit/src2xml/source/boxer.py Fri Feb  1 08:46:00 2013
@@ -31,7 +31,7 @@ class DlgLayoutBuilder(object):
     def addWidget (self, elem):
         x, y = int(elem.getAttr('x')), int(elem.getAttr('y'))
         self.rows[y] = self.rows.get (y, {})
-        while self.rows[y].has_key(x):
+        while x in self.rows[y]:
             y += 1
             self.rows[y] = self.rows.get (y, {})
         self.rows[y][x] = elem

Modified: openoffice/branches/ia2/main/toolkit/src2xml/source/expression.py
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/src2xml/source/expression.py?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/src2xml/source/expression.py (original)
+++ openoffice/branches/ia2/main/toolkit/src2xml/source/expression.py Fri Feb  1 08:46:00 2013
@@ -125,4 +125,4 @@ class ExpParser(object):
 
     def dumpTree (self):
         self.jumpToRoot()
-        print toString(self.ptr)
+        print(toString(self.ptr))

Modified: openoffice/branches/ia2/main/toolkit/src2xml/source/globals.py
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/src2xml/source/globals.py?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/src2xml/source/globals.py (original)
+++ openoffice/branches/ia2/main/toolkit/src2xml/source/globals.py Fri Feb  1 08:46:00 2013
@@ -108,7 +108,7 @@ class Element(Node):
         return chars
 
     def hasAttr (self, name):
-        return self.attrs.has_key(name)
+        return name in self.attrs
 
     def getAttr (self, name):
         return self.attrs[name]
@@ -121,7 +121,7 @@ class Element(Node):
         return
 
     def clone (self, elem):
-        keys = elem.attrs.keys()
+        keys = list(elem.attrs.keys())
         for key in keys:
             self.attrs[key] = elem.attrs[key]
         self.rid = elem.rid

Modified: openoffice/branches/ia2/main/toolkit/src2xml/source/macroexpander_test.py
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/src2xml/source/macroexpander_test.py?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/src2xml/source/macroexpander_test.py (original)
+++ openoffice/branches/ia2/main/toolkit/src2xml/source/macroexpander_test.py Fri Feb  1 08:46:00 2013
@@ -31,7 +31,7 @@ class TestCase:
         mcExpander.debug = True
         mcExpander.expand()
         tokens = mcExpander.getTokens()
-        print tokens
+        print(tokens)
 
     @staticmethod
     def simpleNoArgs ():
@@ -79,13 +79,13 @@ class TestCase:
         TestCase.run(tokens, defines)
 
 def main ():
-    print "simple expansion with no arguments"
+    print("simple expansion with no arguments")
     TestCase.simpleNoArgs()
-    print "simple argument expansion"
+    print("simple argument expansion")
     TestCase.simpleArgs()
-    print "multi-token argument expansion"
+    print("multi-token argument expansion")
     TestCase.multiTokenArgs()
-    print "nested argument expansion"
+    print("nested argument expansion")
     TestCase.nestedTokenArgs()
 
 if __name__ ==  '__main__':

Modified: openoffice/branches/ia2/main/toolkit/src2xml/source/macroparser.py
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/src2xml/source/macroparser.py?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/src2xml/source/macroparser.py (original)
+++ openoffice/branches/ia2/main/toolkit/src2xml/source/macroparser.py Fri Feb  1 08:46:00 2013
@@ -37,8 +37,8 @@ A macro with arguments must have its ope
 its name without any whitespace.
 """
         if self.debug:
-            print "-"*68
-            print "parsing '%s'"%self.buffer
+            print("-"*68)
+            print("parsing '%s'"%self.buffer)
 
         i = 0
         bufSize = len(self.buffer)
@@ -105,17 +105,17 @@ character is the open paren.
 
     def setMacro (self, name, vars, content):
         if self.debug:
-            print "-"*68
-            print "name: %s"%name
+            print("-"*68)
+            print("name: %s"%name)
             for var in vars:
-                print "var: %s"%var
+                print("var: %s"%var)
             if len(vars) == 0:
-                print "no vars"
-            print "content: '%s'"%content
+                print("no vars")
+            print("content: '%s'"%content)
 
         if len(content) > 0:
             self.macro = Macro(name)
-            for i in xrange(0, len(vars)):
+            for i in range(0, len(vars)):
                 self.macro.vars[vars[i]] = i
 
             # tokinize it using lexer.
@@ -125,16 +125,16 @@ character is the open paren.
             mclexer.tokenize()
             self.macro.tokens = mclexer.getTokens()
             if self.debug:
-                print self.macro.tokens
+                print(self.macro.tokens)
 
             if not self.isValidMacro(self.macro):
                 self.macro = None
 
         if self.debug:
             if self.macro != None:
-                print "macro registered!"
+                print("macro registered!")
             else:
-                print "macro not registered"
+                print("macro not registered")
 
     def isValidMacro (self, macro):
 

Modified: openoffice/branches/ia2/main/toolkit/src2xml/source/src2xml.py
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/src2xml/source/src2xml.py?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/src2xml/source/src2xml.py (original)
+++ openoffice/branches/ia2/main/toolkit/src2xml/source/src2xml.py Fri Feb  1 08:46:00 2013
@@ -182,12 +182,12 @@ def dry_one_file (file_name, options):
     try:
         str = convert(file_name, options)
         progress ("  SUCCESS\n")
-    except Exception, e:
+    except Exception as e:
         if options.keep_going:
             progress ("  FAILED\n")
         else:
             import traceback
-            print traceback.format_exc (None)
+            print(traceback.format_exc (None))
             raise e
 
 def post_process (s):

Modified: openoffice/branches/ia2/main/toolkit/src2xml/source/srclexer.py
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/src2xml/source/srclexer.py?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/src2xml/source/srclexer.py (original)
+++ openoffice/branches/ia2/main/toolkit/src2xml/source/srclexer.py Fri Feb  1 08:46:00 2013
@@ -303,14 +303,14 @@ build the syntax tree.
             self.handleMacroInclude(buf)
         elif command == 'ifdef':
             defineName = buf.strip()
-            if self.defines.has_key(defineName):
+            if defineName in self.defines:
                 self.visibilityStack.append(SrcLexer.VISIBLE)
             else:
                 self.visibilityStack.append(SrcLexer.INVISIBLE_PRE)
 
         elif command == 'ifndef':
             defineName = buf.strip()
-            if self.defines.has_key(defineName):
+            if defineName in self.defines:
                 self.visibilityStack.append(SrcLexer.INVISIBLE_PRE)
             else:
                 self.visibilityStack.append(SrcLexer.VISIBLE)
@@ -351,8 +351,8 @@ build the syntax tree.
         elif command in ['error', 'pragma']:
             pass
         else:
-            print "'%s' '%s'"%(command, buf)
-            print self.filepath
+            print("'%s' '%s'"%(command, buf))
+            print(self.filepath)
             sys.exit(0)
 
         return i
@@ -407,10 +407,10 @@ build the syntax tree.
                 progress ("%s already included\n"%headerPath)
             return
 
-        if SrcLexer.headerCache.has_key(headerPath):
+        if headerPath in SrcLexer.headerCache:
             if self.debug:
                 progress ("%s in cache\n"%headerPath)
-            for key in SrcLexer.headerCache[headerPath].defines.keys():
+            for key in list(SrcLexer.headerCache[headerPath].defines.keys()):
                 self.defines[key] = SrcLexer.headerCache[headerPath].defines[key]
             return
 
@@ -422,7 +422,7 @@ build the syntax tree.
         hdrData = HeaderData()
         hdrData.tokens = mclexer.getTokens()
         headerDefines = mclexer.getDefines()
-        for key in headerDefines.keys():
+        for key in list(headerDefines.keys()):
             defines[key] = headerDefines[key]
             hdrData.defines[key] = headerDefines[key]
 
@@ -430,15 +430,15 @@ build the syntax tree.
         SrcLexer.headerCache[headerPath] = hdrData
 
         # Update the list of headers that have already been expaneded.
-        for key in mclexer.headerDict.keys():
+        for key in list(mclexer.headerDict.keys()):
             self.headerDict[key] = True
 
         if self.debug:
             progress ("defines found in header %s:\n"%headerSub)
-            for key in defines.keys():
+            for key in list(defines.keys()):
                 progress ("  '%s'\n"%key)
 
-        for key in defines.keys():
+        for key in list(defines.keys()):
             self.defines[key] = defines[key]
 
 

Modified: openoffice/branches/ia2/main/toolkit/src2xml/source/srcparser.py
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/src2xml/source/srcparser.py?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/src2xml/source/srcparser.py (original)
+++ openoffice/branches/ia2/main/toolkit/src2xml/source/srcparser.py Fri Feb  1 08:46:00 2013
@@ -108,12 +108,12 @@ class MacroExpander(object):
 
     def expandToken (self):
         token = self.tokens[self.pos]
-        if not self.defines.has_key(token):
+        if token not in self.defines:
             self.pos += 1
             return
 
         macro = self.defines[token]
-        nvars = len(macro.vars.keys())
+        nvars = len(list(macro.vars.keys()))
         if nvars == 0:
             # Simple expansion
             self.tokens[self.pos:self.pos+1] = macro.tokens
@@ -123,7 +123,7 @@ class MacroExpander(object):
             values, lastPos = self.parseValues()
             newtokens = []
             for mtoken in macro.tokens:
-                if macro.vars.has_key(mtoken):
+                if mtoken in macro.vars:
                     # variable
                     pos = macro.vars[mtoken]
                     valtokens = values[pos]
@@ -155,15 +155,15 @@ words, whitespace does not end a token.
                 tk = self.tokens[self.pos+i]
             except IndexError:
                 progress ("error parsing values (%d)\n"%i)
-                for j in xrange(0, i):
-                    print self.tokens[self.pos+j],
-                print ''
+                for j in range(0, i):
+                    print(self.tokens[self.pos+j], end=' ')
+                print('')
                 srclexer.dumpTokens(self.tokens)
                 srclexer.dumpTokens(self.newtokens)
-                print "tokens expanded so far:"
+                print("tokens expanded so far:")
                 for tk in self.expandedTokens:
-                    print "-"*20
-                    print tk
+                    print("-"*20)
+                    print(tk)
                     srclexer.dumpTokens(self.defines[tk].tokens)
                 sys.exit(1)
             if tk == '(':
@@ -207,7 +207,7 @@ class SrcParser(object):
         # Expand defined macros.
         if self.debug:
             progress ("-"*68+"\n")
-            for key in self.defines.keys():
+            for key in list(self.defines.keys()):
                 progress ("define: %s\n"%key)
 
         self.expandMacro()
@@ -314,7 +314,7 @@ handler.
     def closeBrace (self, i):
         if len(self.tokenBuf) > 0:
             if self.debug:
-                print self.tokenBuf
+                print(self.tokenBuf)
             raise ParseError ('')
         self.elementStack.pop()
         return i

Modified: openoffice/branches/ia2/main/toolkit/src2xml/src.lst
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/src2xml/src.lst?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/src2xml/src.lst (original)
+++ openoffice/branches/ia2/main/toolkit/src2xml/src.lst Fri Feb  1 08:46:00 2013
@@ -617,8 +617,6 @@
 ../../filter/source/xsltdialog/xmlfiltertabpagexslt.src
 ../../filter/source/xsltdialog/xmlfiltertestdialog.src
 ../../filter/source/xsltdialog/xmlfiltertabpagebasic.src
-../../toolkit/source/awt/accessiblestrings.src
-../../toolkit/source/awt/xthrobber.src
 ../../xmlsecurity/source/dialogs/warnings.src
 ../../xmlsecurity/source/dialogs/macrosecurity.src
 ../../xmlsecurity/source/dialogs/certificatechooser.src

Modified: openoffice/branches/ia2/main/toolkit/util/tk.component
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/util/tk.component?rev=1441343&r1=1441342&r2=1441343&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/util/tk.component (original)
+++ openoffice/branches/ia2/main/toolkit/util/tk.component Fri Feb  1 08:46:00 2013
@@ -260,14 +260,6 @@
     <service name="com.sun.star.awt.UnoControlScrollBar"/>
     <service name="stardiv.vcl.control.ScrollBar"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoSimpleAnimationControl">
-    <service name="com.sun.star.awt.UnoControlSimpleAnimation"/>
-    <service name="com.sun.star.awt.UnoSimpleAnimationControl"/>
-  </implementation>
-  <implementation name="stardiv.Toolkit.UnoSimpleAnimationControlModel">
-    <service name="com.sun.star.awt.UnoControlSimpleAnimationModel"/>
-    <service name="com.sun.star.awt.UnoSimpleAnimationControlModel"/>
-  </implementation>
   <implementation name="org.openoffice.comp.toolkit.SpinningProgressControlModel">
     <service name="com.sun.star.awt.SpinningProgressControlModel"/>
   </implementation>
@@ -283,14 +275,6 @@
   <implementation name="stardiv.Toolkit.UnoSpinButtonModel">
     <service name="com.sun.star.awt.UnoControlSpinButtonModel"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoThrobberControl">
-    <service name="com.sun.star.awt.UnoControlThrobber"/>
-    <service name="com.sun.star.awt.UnoThrobberControl"/>
-  </implementation>
-  <implementation name="stardiv.Toolkit.UnoThrobberControlModel">
-    <service name="com.sun.star.awt.UnoControlThrobberModel"/>
-    <service name="com.sun.star.awt.UnoThrobberControlModel"/>
-  </implementation>
   <implementation name="stardiv.Toolkit.UnoTimeFieldControl">
     <service name="com.sun.star.awt.UnoControlTimeField"/>
     <service name="stardiv.vcl.control.TimeField"/>