openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@apache.org
Subject svn commit: r1418198 [2/4] - in /openoffice/branches/ia2: ./ main/ main/framework/ main/framework/inc/ main/framework/inc/classes/ main/framework/inc/framework/ main/framework/inc/uielement/ main/framework/source/classes/ main/framework/source/fwe/clas...
Date Fri, 07 Dec 2012 06:37:13 GMT
Modified: openoffice/branches/ia2/main/framework/source/uielement/statusbarmanager.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/framework/source/uielement/statusbarmanager.cxx?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/framework/source/uielement/statusbarmanager.cxx (original)
+++ openoffice/branches/ia2/main/framework/source/uielement/statusbarmanager.cxx Fri Dec  7 06:37:02 2012
@@ -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.
- * 
+ *
  *************************************************************/
 
 
@@ -25,13 +25,14 @@
 #include "precompiled_framework.hxx"
 
 #include <uielement/statusbarmanager.hxx>
+#include <uielement/genericstatusbarcontroller.hxx>
 
-//_________________________________________________________________________________________________________________
-//	my own includes
-//_________________________________________________________________________________________________________________
 #include <threadhelp/threadhelpbase.hxx>
 #include <threadhelp/resetableguard.hxx>
 #include <framework/sfxhelperfunctions.hxx>
+#include <framework/addonsoptions.hxx>
+#include <uielement/statusbarmerger.hxx>
+#include <uielement/statusbaritem.hxx>
 #include <macros/generic.hxx>
 #include <macros/xinterface.hxx>
 #include <macros/xtypeprovider.hxx>
@@ -41,9 +42,6 @@
 #include "properties.h"
 #include <helper/mischelper.hxx>
 
-//_________________________________________________________________________________________________________________
-//	interface includes
-//_________________________________________________________________________________________________________________
 #include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/frame/XStatusListener.hpp>
 #include <com/sun/star/util/XUpdatable.hpp>
@@ -52,21 +50,19 @@
 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/awt/Command.hpp>
+#include <com/sun/star/ui/XStatusbarItem.hdl>
 #include <com/sun/star/lang/DisposedException.hpp>
 
-//_________________________________________________________________________________________________________________
-//	other includes
-//_________________________________________________________________________________________________________________
+#include <toolkit/helper/vclunohelper.hxx>
 
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
-#include <toolkit/unohlp.hxx>
-#endif
 #include <svtools/statusbarcontroller.hxx>
 
 #include <vcl/status.hxx>
 #include <vcl/svapp.hxx>
 #include <rtl/logfile.hxx>
 
+#include <functional>
+
 using namespace ::com::sun::star;
 #ifndef css
 #define css ::com::sun::star
@@ -89,6 +85,43 @@ static const char ITEM_DESCRIPTOR_TYPE[]
 namespace framework
 {
 
+namespace
+{
+
+template< class MAP >
+struct lcl_UpdateController : public std::unary_function< typename MAP::value_type, void >
+{
+    void operator()( typename MAP::value_type &rElement ) const
+    {
+        try
+        {
+            uno::Reference< util::XUpdatable > xUpdatable( rElement.second, uno::UNO_QUERY );
+            if ( xUpdatable.is() )
+                xUpdatable->update();
+        }
+        catch ( uno::Exception& )
+        {
+        }
+    }
+};
+
+template< class MAP >
+struct lcl_RemoveController : public std::unary_function< typename MAP::value_type, void >
+{
+    void operator()( typename MAP::value_type &rElement ) const
+    {
+        try
+        {
+            uno::Reference< lang::XComponent > xComponent( rElement.second, uno::UNO_QUERY );
+            if ( xComponent.is() )
+                xComponent->dispose();
+        }
+        catch ( uno::Exception& )
+        {
+        }
+    }
+};
+
 static sal_uInt16 impl_convertItemStyleToItemBits( sal_Int16 nStyle )
 {
     sal_uInt16 nItemBits( 0 );
@@ -114,7 +147,8 @@ static sal_uInt16 impl_convertItemStyleT
     
     return nItemBits;
 }
-    
+
+}
 //*****************************************************************************************************************
 //	XInterface, XTypeProvider, XServiceInfo
 //*****************************************************************************************************************
@@ -212,13 +246,22 @@ void SAL_CALL StatusBarManager::dispose(
 
     lang::EventObject aEvent( xThis );
     m_aListenerContainer.disposeAndClear( aEvent );
-    
+
     {
 	    ResetableGuard aGuard( m_aLock );
         if ( !m_bDisposed )
         {
             RemoveControllers();
-            
+
+            // destroy the item data
+            for ( sal_uInt16 n = 0; n < m_pStatusBar->GetItemCount(); n++ )
+            {
+                AddonStatusbarItemData *pUserData = static_cast< AddonStatusbarItemData *>(
+                    m_pStatusBar->GetItemData( m_pStatusBar->GetItemId( n ) ) );
+                if ( pUserData )
+                    delete pUserData;
+            }
+
             delete m_pStatusBar;
             m_pStatusBar = 0;
 
@@ -268,8 +311,7 @@ void SAL_CALL StatusBarManager::elementI
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "StatusBarManager::elementInserted" );
     ResetableGuard aGuard( m_aLock );
-    
-	/* SAFE AREA ----------------------------------------------------------------------------------------------- */
+
     if ( m_bDisposed )
         return;
 }
@@ -278,18 +320,16 @@ void SAL_CALL StatusBarManager::elementR
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "StatusBarManager::elementRemoved" );
     ResetableGuard aGuard( m_aLock );
-    
-	/* SAFE AREA ----------------------------------------------------------------------------------------------- */
+
     if ( m_bDisposed )
         return;
 }
-    
+
 void SAL_CALL StatusBarManager::elementReplaced( const css::ui::ConfigurationEvent& ) throw ( uno::RuntimeException )
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "StatusBarManager::elementReplaced" );
     ResetableGuard aGuard( m_aLock );
-    
-	/* SAFE AREA ----------------------------------------------------------------------------------------------- */
+
     if ( m_bDisposed )
         return;
 }
@@ -300,19 +340,9 @@ void StatusBarManager::UpdateControllers
     if ( !m_bUpdateControllers )
     {
         m_bUpdateControllers = sal_True;
-        const sal_uInt32 nCount = m_aControllerVector.size();
-        for ( sal_uInt32 n = 0; n < nCount; n++ )
-        {
-            try
-            {
-                uno::Reference< util::XUpdatable > xUpdatable( m_aControllerVector[n], uno::UNO_QUERY );
-                if ( xUpdatable.is() )
-                    xUpdatable->update();
-            }
-            catch ( uno::Exception& )
-            {
-            }
-        }
+        std::for_each( m_aControllerMap.begin(),
+                       m_aControllerMap.end(),
+                       lcl_UpdateController< StatusBarControllerMap >() );
     }
     m_bUpdateControllers = sal_False;
 }
@@ -325,22 +355,10 @@ void StatusBarManager::RemoveControllers
     if ( m_bDisposed )
         return;
 
-    const sal_uInt32 nCount = m_aControllerVector.size();
-    for ( sal_uInt32 n = 0; n < nCount; n++ )
-    {
-        try
-        {
-            uno::Reference< lang::XComponent > xComponent( 
-                m_aControllerVector[n], uno::UNO_QUERY );
-            if ( xComponent.is() )
-                xComponent->dispose();
-        }
-        catch ( uno::Exception& )
-        {
-        }
-        
-        m_aControllerVector[n].clear();
-    }
+    std::for_each( m_aControllerMap.begin(),
+                   m_aControllerMap.end(),
+                   lcl_RemoveController< StatusBarControllerMap >() );
+    m_aControllerMap.clear();
 }
 
 rtl::OUString StatusBarManager::RetrieveLabelFromCommand( const rtl::OUString& aCmdURL )
@@ -355,49 +373,65 @@ void StatusBarManager::CreateControllers
     uno::Reference< uno::XComponentContext > xComponentContext;
     uno::Reference< beans::XPropertySet > xProps( m_xServiceManager, uno::UNO_QUERY );
     uno::Reference< awt::XWindow > xStatusbarWindow = VCLUnoHelper::GetInterface( m_pStatusBar );
-    
+
     if ( xProps.is() )
         xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))) >>= xComponentContext;
-    
+
     for ( sal_uInt16 i = 0; i < m_pStatusBar->GetItemCount(); i++ )
     {
         sal_uInt16 nId = m_pStatusBar->GetItemId( i );
         if ( nId == 0 )
             continue;
-        
+
         rtl::OUString                            aCommandURL( m_pStatusBar->GetItemCommand( nId ));
         sal_Bool                                 bInit( sal_True );
         uno::Reference< frame::XStatusListener > xController;
-        
+        AddonStatusbarItemData *pItemData = static_cast< AddonStatusbarItemData *>( m_pStatusBar->GetItemData( nId ) );
+        uno::Reference< ui::XStatusbarItem > xStatusbarItem(
+            static_cast< cppu::OWeakObject *>( new StatusbarItem( m_pStatusBar, pItemData, nId, aCommandURL ) ),
+            uno::UNO_QUERY );
+
         svt::StatusbarController* pController( 0 );
-   
+
+        // 1º) UNO Statusbar controllers, registered in Controllers.xcu
         if ( m_xStatusbarControllerRegistration.is() && 
              m_xStatusbarControllerRegistration->hasController( aCommandURL, m_aModuleIdentifier ))
         {
             if ( xStatusbarControllerFactory.is() )
             {
-                uno::Sequence< uno::Any > aSeq( 5 );    
                 beans::PropertyValue aPropValue;
-                    
+                std::vector< uno::Any > aPropVector;
+
                 aPropValue.Name     = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleName" ));
                 aPropValue.Value    = uno::makeAny( m_aModuleIdentifier );
-                aSeq[0] = uno::makeAny( aPropValue );
+                aPropVector.push_back( uno::makeAny( aPropValue ) );
+
                 aPropValue.Name     = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
                 aPropValue.Value    = uno::makeAny( m_xFrame );
-                aSeq[1] = uno::makeAny( aPropValue );
+                aPropVector.push_back( uno::makeAny( aPropValue ) );
+
+                // TODO remove this
                 aPropValue.Name     = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ServiceManager" ));
                 aPropValue.Value    = uno::makeAny( m_xServiceManager );
-                aSeq[2] = uno::makeAny( aPropValue );
+                aPropVector.push_back( uno::makeAny( aPropValue ) );
+
                 aPropValue.Name     = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ));
                 aPropValue.Value    = uno::makeAny( xStatusbarWindow );
-                aSeq[3] = uno::makeAny( aPropValue );
+                aPropVector.push_back( uno::makeAny( aPropValue ) );
+
+                // TODO still needing with the css::ui::XStatusbarItem?
                 aPropValue.Name     = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Identifier" ));
                 aPropValue.Value    = uno::makeAny( nId );
-                aSeq[4] = uno::makeAny( aPropValue );
+                aPropVector.push_back( uno::makeAny( aPropValue ) );
 
+                aPropValue.Name     = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StatusbarItem" ));
+                aPropValue.Value    <<= xStatusbarItem;
+                aPropVector.push_back( uno::makeAny( aPropValue ) );
+
+                uno::Sequence< uno::Any > aArgs( comphelper::containerToSequence( aPropVector ) );
                 xController = uno::Reference< frame::XStatusListener >( 
                                 xStatusbarControllerFactory->createInstanceWithArgumentsAndContext(	
-                                    aCommandURL, aSeq, xComponentContext ), 
+                                    aCommandURL, aArgs, xComponentContext ),
                                 uno::UNO_QUERY );
                 bInit = sal_False; // Initialization is done through the factory service
             }
@@ -405,25 +439,40 @@ void StatusBarManager::CreateControllers
   
         if ( !xController.is() )
         {
+            // 2º) Old SFX2 Statusbar controllers
             pController = CreateStatusBarController( m_xFrame, m_pStatusBar, nId, aCommandURL );
             if ( !pController )
-                pController = new svt::StatusbarController( m_xServiceManager, m_xFrame, aCommandURL, nId );
-        
+            {
+                // 3º) Is Add-on? Generic statusbar controller
+                if ( pItemData )
+                {
+                    pController = new GenericStatusbarController( m_xServiceManager,
+                                                                  m_xFrame,
+                                                                  xStatusbarItem,
+                                                                  pItemData );
+                }
+                else
+                {
+                    // 4º) Default Statusbar controller
+                    pController = new svt::StatusbarController( m_xServiceManager, m_xFrame, aCommandURL, nId );
+                }
+            }
+
             if ( pController )
                 xController = uno::Reference< frame::XStatusListener >( 
                                 static_cast< ::cppu::OWeakObject *>( pController ), 
                                 uno::UNO_QUERY );
         }
-    
-        m_aControllerVector.push_back( xController );
+
+        m_aControllerMap[nId] = xController;
         uno::Reference< lang::XInitialization > xInit( xController, uno::UNO_QUERY );
-    
+
         if ( xInit.is() )
         {
             if ( bInit )
             {
                 beans::PropertyValue aPropValue;
-                uno::Sequence< uno::Any > aArgs( 5 );
+                uno::Sequence< uno::Any > aArgs( 6 );
                 aPropValue.Name     = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Frame" ));
                 aPropValue.Value    = uno::makeAny( m_xFrame );
                 aArgs[0] = uno::makeAny( aPropValue );
@@ -439,6 +488,9 @@ void StatusBarManager::CreateControllers
                 aPropValue.Name     = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Identifier" ));
                 aPropValue.Value    = uno::makeAny( nId );
                 aArgs[4] = uno::makeAny( aPropValue );
+                aPropValue.Name     = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StatusbarItem" ));
+                aPropValue.Value    <<= xStatusbarItem;
+                aArgs[5] = uno::makeAny( aPropValue );
                 xInit->initialize( aArgs );
             }
         }
@@ -474,7 +526,7 @@ void StatusBarManager::FillStatusBar( co
 
     // reset and fill command map 
     m_pStatusBar->Clear();
-    m_aControllerVector.clear();
+    m_aControllerMap.clear();// TODO already done in RemoveControllers
 
     for ( sal_Int32 n = 0; n < rItemContainer->getCount(); n++ )
     {
@@ -523,7 +575,7 @@ void StatusBarManager::FillStatusBar( co
                 {
                     rtl::OUString aString( RetrieveLabelFromCommand( aCommandURL ));
                     sal_uInt16        nItemBits( impl_convertItemStyleToItemBits( nStyle ));
-                    
+
                     m_pStatusBar->InsertItem( nId, nWidth, nItemBits, nOffset );
                     m_pStatusBar->SetItemCommand( nId, aCommandURL );
                     m_pStatusBar->SetAccessibleName( nId, aString );
@@ -537,6 +589,47 @@ void StatusBarManager::FillStatusBar( co
         }
     }
 
+    // Statusbar Merging
+    const sal_uInt16 STATUSBAR_ITEM_STARTID = 1000;
+    MergeStatusbarInstructionContainer aMergeInstructions = AddonsOptions().GetMergeStatusbarInstructions();
+    if ( !aMergeInstructions.empty() )
+    {
+        const sal_uInt32 nCount = aMergeInstructions.size();
+        sal_uInt16 nItemId( STATUSBAR_ITEM_STARTID );
+
+        for ( sal_uInt32 i = 0; i < nCount; i++ )
+        {
+            MergeStatusbarInstruction &rInstruction = aMergeInstructions[i];
+            if ( !StatusbarMerger::IsCorrectContext( rInstruction.aMergeContext, m_aModuleIdentifier ) )
+                continue;
+
+            AddonStatusbarItemContainer aItems;
+            StatusbarMerger::ConvertSeqSeqToVector( rInstruction.aMergeStatusbarItems, aItems );
+
+            sal_uInt16 nRefPos = StatusbarMerger::FindReferencePos( m_pStatusBar, rInstruction.aMergePoint );
+            if ( nRefPos != STATUSBAR_ITEM_NOTFOUND )
+            {
+                StatusbarMerger::ProcessMergeOperation( m_pStatusBar,
+                                                        nRefPos,
+                                                        nItemId,
+                                                        m_aModuleIdentifier,
+                                                        rInstruction.aMergeCommand,
+                                                        rInstruction.aMergeCommandParameter,
+                                                        aItems );
+            }
+            else
+            {
+                StatusbarMerger::ProcessMergeFallback( m_pStatusBar,
+                                                       nRefPos,
+                                                       nItemId,
+                                                       m_aModuleIdentifier,
+                                                       rInstruction.aMergeCommand,
+                                                       rInstruction.aMergeCommandParameter,
+                                                       aItems );
+            }
+        }
+    }
+
     // Create controllers
     CreateControllers();
 
@@ -576,26 +669,26 @@ void StatusBarManager::UserDraw( const U
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "StatusBarManager::UserDraw" );
     ResetableGuard aGuard( m_aLock );
-    
+
     if ( m_bDisposed )
         return;
-    
+
     sal_uInt16 nId( rUDEvt.GetItemId() );
-    if (( nId > 0 ) && ( nId <= m_aControllerVector.size() ))
+    StatusBarControllerMap::const_iterator it = m_aControllerMap.find( nId );
+    if (( nId > 0 ) && ( it != m_aControllerMap.end() ))
     {
-        uno::Reference< frame::XStatusbarController > xController( 
-            m_aControllerVector[nId-1], uno::UNO_QUERY );
+        uno::Reference< frame::XStatusbarController > xController( it->second, uno::UNO_QUERY );
         if ( xController.is() && rUDEvt.GetDevice() )
         {
-            uno::Reference< awt::XGraphics > xGraphics = 
+            uno::Reference< awt::XGraphics > xGraphics =
                 rUDEvt.GetDevice()->CreateUnoGraphics();
 
-            awt::Rectangle aRect( rUDEvt.GetRect().Left(), 
+            awt::Rectangle aRect( rUDEvt.GetRect().Left(),
                                   rUDEvt.GetRect().Top(),
-                                  rUDEvt.GetRect().GetWidth(), 
+                                  rUDEvt.GetRect().GetWidth(),
                                   rUDEvt.GetRect().GetHeight() );
             aGuard.unlock();
-            xController->paint( xGraphics, aRect, rUDEvt.GetItemId(), rUDEvt.GetStyle() );
+            xController->paint( xGraphics, aRect, rUDEvt.GetStyle() );
         }
     }
 }
@@ -604,17 +697,17 @@ void StatusBarManager::Command( const Co
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "StatusBarManager::Command" );
     ResetableGuard aGuard( m_aLock );
-    
+
     if ( m_bDisposed )
         return;
-    
+
     if ( rEvt.GetCommand() == COMMAND_CONTEXTMENU )
     {
         sal_uInt16 nId = m_pStatusBar->GetItemId( rEvt.GetMousePosPixel() );
-        if (( nId > 0 ) && ( nId <= m_aControllerVector.size() ))
+        StatusBarControllerMap::const_iterator it = m_aControllerMap.find( nId );
+        if (( nId > 0 ) && ( it != m_aControllerMap.end() ))
         {
-            uno::Reference< frame::XStatusbarController > xController(
-                m_aControllerVector[nId-1], uno::UNO_QUERY );
+            uno::Reference< frame::XStatusbarController > xController( it->second, uno::UNO_QUERY );
             if ( xController.is() )
             {
                 awt::Point aPos;
@@ -631,18 +724,19 @@ void StatusBarManager::MouseMove( const 
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "StatusBarManager::MouseMove" );
     MouseButton(rMEvt,&frame::XStatusbarController::mouseMove);
 }
+
 void StatusBarManager::MouseButton( const MouseEvent& rMEvt ,sal_Bool ( SAL_CALL frame::XStatusbarController::*_pMethod )(const ::com::sun::star::awt::MouseEvent&))
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "StatusBarManager::MouseButton" );
     ResetableGuard aGuard( m_aLock );
-    
+
     if ( !m_bDisposed )
     {
         sal_uInt16 nId = m_pStatusBar->GetItemId( rMEvt.GetPosPixel() );
-        if (( nId > 0 ) && ( nId <= m_aControllerVector.size() ))
+        StatusBarControllerMap::const_iterator it = m_aControllerMap.find( nId );
+        if (( nId > 0 ) && ( it != m_aControllerMap.end() ))
         {
-            uno::Reference< frame::XStatusbarController > xController( 
-                m_aControllerVector[nId-1], uno::UNO_QUERY );
+            uno::Reference< frame::XStatusbarController > xController( it->second, uno::UNO_QUERY );
             if ( xController.is() )
             {
                 ::com::sun::star::awt::MouseEvent aMouseEvent;
@@ -652,9 +746,10 @@ void StatusBarManager::MouseButton( cons
                 aMouseEvent.ClickCount = rMEvt.GetClicks();
                 (xController.get()->*_pMethod)( aMouseEvent);
             }
-        } // if (( nId > 0 ) && ( nId <= m_aControllerVector.size() ))
+        }
     }
 }
+
 void StatusBarManager::MouseButtonDown( const MouseEvent& rMEvt )
 {
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "StatusBarManager::MouseButtonDown" );
@@ -670,38 +765,46 @@ void StatusBarManager::MouseButtonUp( co
 IMPL_LINK( StatusBarManager, Click, StatusBar*, EMPTYARG )
 {
     ResetableGuard aGuard( m_aLock );
-    
+
     if ( m_bDisposed )
         return 1;
-    
+
     sal_uInt16 nId = m_pStatusBar->GetCurItemId();
-    if (( nId > 0 ) && ( nId <= m_aControllerVector.size() ))
+    StatusBarControllerMap::const_iterator it = m_aControllerMap.find( nId );
+    if (( nId > 0 ) && ( it != m_aControllerMap.end() ))
     {
-        uno::Reference< frame::XStatusbarController > xController( 
-            m_aControllerVector[nId-1], uno::UNO_QUERY );
+        uno::Reference< frame::XStatusbarController > xController( it->second, uno::UNO_QUERY );
         if ( xController.is() )
-            xController->click();
+        {
+            const Point aVCLPos = m_pStatusBar->GetPointerPosPixel();
+            const awt::Point aAWTPoint( aVCLPos.X(), aVCLPos.Y() );
+            xController->click( aAWTPoint );
+        }
     }
-    
+
     return 1;
 }
 
 IMPL_LINK( StatusBarManager, DoubleClick, StatusBar*, EMPTYARG )
 {
     ResetableGuard aGuard( m_aLock );
-    
+
     if ( m_bDisposed )
         return 1;
-    
+
     sal_uInt16 nId = m_pStatusBar->GetCurItemId();
-    if (( nId > 0 ) && ( nId <= m_aControllerVector.size() ))
+    StatusBarControllerMap::const_iterator it = m_aControllerMap.find( nId );
+    if (( nId > 0 ) && ( it != m_aControllerMap.end() ))
     {
-        uno::Reference< frame::XStatusbarController > xController(
-            m_aControllerVector[nId-1], uno::UNO_QUERY );
+        uno::Reference< frame::XStatusbarController > xController( it->second, uno::UNO_QUERY );
         if ( xController.is() )
-            xController->doubleClick();
+        {
+            const Point aVCLPos = m_pStatusBar->GetPointerPosPixel();
+            const awt::Point aAWTPoint( aVCLPos.X(), aVCLPos.Y() );
+            xController->doubleClick( aAWTPoint );
+        }
     }
-    
+
     return 1;
 }
 

Modified: openoffice/branches/ia2/main/framework/source/uielement/toolbarmerger.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/framework/source/uielement/toolbarmerger.cxx?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/framework/source/uielement/toolbarmerger.cxx (original)
+++ openoffice/branches/ia2/main/framework/source/uielement/toolbarmerger.cxx Fri Dec  7 06:37:02 2012
@@ -33,56 +33,33 @@
 namespace framework
 {
 
-static const char MERGE_TOOLBAR_URL[]              = "URL";
-static const sal_uInt32 MERGE_TOOLBAR_URL_LEN      = 3;
-static const char MERGE_TOOLBAR_TITLE[]            = "Title";
-static const sal_uInt32 MERGE_TOOLBAR_TITLE_LEN    = 5;
-static const char MERGE_TOOLBAR_IMAGEID[]          = "ImageIdentifier";
-static const sal_uInt32 MERGE_TOOLBAR_IMAGEID_LEN  = 15;
-static const char MERGE_TOOLBAR_CONTEXT[]          = "Context";
-static const sal_uInt32 MERGE_TOOLBAR_CONTEXT_LEN  = 7;
-static const char MERGE_TOOLBAR_TARGET[]           = "Target";
-static const sal_uInt32 MERGE_TOOLBAR_TARGET_LEN   = 6;
-static const char MERGE_TOOLBAR_CONTROLTYPE[]      = "ControlType";
-static const char MERGE_TOOLBAR_CONTROLTYPE_LEN    = 11;
-static const char MERGE_TOOLBAR_WIDTH[]            = "Width";
-static const char MERGE_TOOLBAR_WIDTH_LEN          = 5;
-
-static const char MERGECOMMAND_ADDAFTER[]          = "AddAfter";
-static const sal_uInt32 MERGECOMMAND_ADDAFTER_LEN  = 8;
-static const char MERGECOMMAND_ADDBEFORE[]         = "AddBefore";
-static const sal_uInt32 MERGECOMMAND_ADDBEFORE_LEN = 9;
-static const char MERGECOMMAND_REPLACE[]           = "Replace";
-static const sal_uInt32 MERGECOMMAND_REPLACE_LEN   = 7;
-static const char MERGECOMMAND_REMOVE[]            = "Remove";
-static const sal_uInt32 MERGECOMMAND_REMOVE_LEN    = 6;
-
-static const char MERGEFALLBACK_ADDLAST[]          = "AddLast";
-static const char MERGEFALLBACK_ADDLAST_LEN        = 7;
-static const char MERGEFALLBACK_ADDFIRST[]         = "AddFirst";
-static const char MERGEFALLBACK_ADDFIRST_LEN       = 8;
-static const char MERGEFALLBACK_IGNORE[]           = "Ignore";
-static const char MERGEFALLBACK_IGNORE_LEN         = 6;
-
-static const char TOOLBARCONTROLLER_BUTTON[]              = "Button";
-static const sal_uInt32 TOOLBARCONTROLLER_BUTTON_LEN      = 6;
-static const char TOOLBARCONTROLLER_COMBOBOX[]            = "Combobox";
-static const sal_uInt32 TOOLBARCONTROLLER_COMBOBOX_LEN    = 8;
-static const char TOOLBARCONTROLLER_EDIT[]                = "Editfield";
-static const sal_uInt32 TOOLBARCONTROLLER_EDIT_LEN        = 9;
-static const char TOOLBARCONTROLLER_SPINFIELD[]           = "Spinfield";
-static const sal_uInt32 TOOLBARCONTROLLER_SPINFIELD_LEN   = 9;
-static const char TOOLBARCONTROLLER_IMGBUTTON[]           = "ImageButton";
-static const sal_uInt32 TOOLBARCONTROLLER_IMGBUTTON_LEN   = 11;
-static const char TOOLBARCONTROLLER_DROPDOWNBOX[]         = "Dropdownbox";
-static const sal_uInt32 TOOLBARCONTROLLER_DROPDOWNBOX_LEN = 11;
-static const char TOOLBARCONTROLLER_DROPDOWNBTN[]         = "DropdownButton";
-static const sal_uInt32 TOOLBARCONTROLLER_DROPDOWNBTN_LEN = 14;
-static const char TOOLBARCONTROLLER_TOGGLEDDBTN[]         = "ToggleDropdownButton";
-static const sal_uInt32 TOOLBARCONTROLLER_TOGGLEDDBTN_LEN = 20;
+static const char MERGE_TOOLBAR_URL[]             = "URL";
+static const char MERGE_TOOLBAR_TITLE[]           = "Title";
+static const char MERGE_TOOLBAR_IMAGEID[]         = "ImageIdentifier";
+static const char MERGE_TOOLBAR_CONTEXT[]         = "Context";
+static const char MERGE_TOOLBAR_TARGET[]          = "Target";
+static const char MERGE_TOOLBAR_CONTROLTYPE[]     = "ControlType";
+static const char MERGE_TOOLBAR_WIDTH[]           = "Width";
+
+static const char MERGECOMMAND_ADDAFTER[]         = "AddAfter";
+static const char MERGECOMMAND_ADDBEFORE[]        = "AddBefore";
+static const char MERGECOMMAND_REPLACE[]          = "Replace";
+static const char MERGECOMMAND_REMOVE[]           = "Remove";
+
+static const char MERGEFALLBACK_ADDLAST[]         = "AddLast";
+static const char MERGEFALLBACK_ADDFIRST[]        = "AddFirst";
+static const char MERGEFALLBACK_IGNORE[]          = "Ignore";
+
+static const char TOOLBARCONTROLLER_BUTTON[]      = "Button";
+static const char TOOLBARCONTROLLER_COMBOBOX[]    = "Combobox";
+static const char TOOLBARCONTROLLER_EDIT[]        = "Editfield";
+static const char TOOLBARCONTROLLER_SPINFIELD[]   = "Spinfield";
+static const char TOOLBARCONTROLLER_IMGBUTTON[]   = "ImageButton";
+static const char TOOLBARCONTROLLER_DROPDOWNBOX[] = "Dropdownbox";
+static const char TOOLBARCONTROLLER_DROPDOWNBTN[] = "DropdownButton";
+static const char TOOLBARCONTROLLER_TOGGLEDDBTN[] = "ToggleDropdownButton";
 
 static const char   TOOLBOXITEM_SEPARATOR_STR[]   = "private:separator";
-static const sal_uInt16 TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1;
 
 using namespace ::com::sun::star;
 
@@ -220,19 +197,19 @@ void ToolBarMerger::ConvertSequenceToVal
 {
     for ( sal_Int32 i = 0; i < rSequence.getLength(); i++ )
     {
-        if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_URL, MERGE_TOOLBAR_URL_LEN ))
+        if ( rSequence[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_TOOLBAR_URL ) ) )
             rSequence[i].Value >>= rCommandURL;
-        else if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_TITLE, MERGE_TOOLBAR_TITLE_LEN ))
+        else if ( rSequence[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_TOOLBAR_TITLE ) ) )
             rSequence[i].Value >>= rLabel;
-        else if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_IMAGEID, MERGE_TOOLBAR_IMAGEID_LEN ))
+        else if ( rSequence[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_TOOLBAR_IMAGEID ) ) )
             rSequence[i].Value >>= rImageIdentifier;
-        else if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_CONTEXT, MERGE_TOOLBAR_CONTEXT_LEN ))
+        else if ( rSequence[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_TOOLBAR_CONTEXT ) ) )
             rSequence[i].Value >>= rContext;
-        else if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_TARGET, MERGE_TOOLBAR_TARGET_LEN ))
+        else if ( rSequence[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_TOOLBAR_TARGET ) ) )
             rSequence[i].Value >>= rTarget;
-        else if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_CONTROLTYPE, MERGE_TOOLBAR_CONTROLTYPE_LEN ))
+        else if ( rSequence[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_TOOLBAR_CONTROLTYPE ) ) )
             rSequence[i].Value >>= rControlType;
-        else if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_WIDTH, MERGE_TOOLBAR_WIDTH_LEN ))
+        else if ( rSequence[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_TOOLBAR_WIDTH ) ) )
         {
             sal_Int32 aValue = 0;
             rSequence[i].Value >>= aValue;
@@ -352,13 +329,13 @@ bool ToolBarMerger::ProcessMergeOperatio
     const ::rtl::OUString&                 rMergeCommandParameter,
     const AddonToolbarItemContainer&       rItems )
 {
-    if ( rMergeCommand.equalsAsciiL( MERGECOMMAND_ADDAFTER, MERGECOMMAND_ADDAFTER_LEN ))
+    if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDAFTER ) ) )
         return MergeItems( xFrame, pToolbar, nPos, 1, rItemId, rCommandMap, rModuleIdentifier, rItems );
-    else if ( rMergeCommand.equalsAsciiL( MERGECOMMAND_ADDBEFORE, MERGECOMMAND_ADDBEFORE_LEN ))
+    else if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDBEFORE ) ) )
         return MergeItems( xFrame, pToolbar, nPos, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
-    else if ( rMergeCommand.equalsAsciiL( MERGECOMMAND_REPLACE, MERGECOMMAND_REPLACE_LEN ))
+    else if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REPLACE ) ) )
         return ReplaceItem( xFrame, pToolbar, nPos, rItemId, rCommandMap, rModuleIdentifier, rItems );
-    else if ( rMergeCommand.equalsAsciiL( MERGECOMMAND_REMOVE, MERGECOMMAND_REMOVE_LEN ))
+    else if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REMOVE ) ) )
         return RemoveItems( pToolbar, nPos, rMergeCommandParameter );
 
     return false;
@@ -421,18 +398,18 @@ bool ToolBarMerger::ProcessMergeFallback
     const ::rtl::OUString&           rMergeFallback,
     const AddonToolbarItemContainer& rItems )
 {
-    if (( rMergeFallback.equalsAsciiL( MERGEFALLBACK_IGNORE, MERGEFALLBACK_IGNORE_LEN )) ||
-        ( rMergeCommand.equalsAsciiL(  MERGECOMMAND_REPLACE, MERGECOMMAND_REPLACE_LEN )) ||
-        ( rMergeCommand.equalsAsciiL(  MERGECOMMAND_REMOVE, MERGECOMMAND_REMOVE_LEN   )) )
+    if (( rMergeFallback.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGEFALLBACK_IGNORE ))) ||
+        ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(  MERGECOMMAND_REPLACE ))) ||
+        ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(  MERGECOMMAND_REMOVE  ))) )
     {
         return true;
     }
-    else if (( rMergeCommand.equalsAsciiL( MERGECOMMAND_ADDBEFORE, MERGECOMMAND_ADDBEFORE_LEN )) ||
-             ( rMergeCommand.equalsAsciiL( MERGECOMMAND_ADDAFTER, MERGECOMMAND_ADDAFTER_LEN   )) )
+    else if (( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDBEFORE ))) ||
+             ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDAFTER ))) )
     {
-        if ( rMergeFallback.equalsAsciiL( MERGEFALLBACK_ADDFIRST, MERGEFALLBACK_ADDFIRST_LEN ))
+        if ( rMergeFallback.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGEFALLBACK_ADDFIRST )))
             return MergeItems( xFrame, pToolbar, 0, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
-        else if ( rMergeFallback.equalsAsciiL( MERGEFALLBACK_ADDLAST, MERGEFALLBACK_ADDLAST_LEN ))
+        else if ( rMergeFallback.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGEFALLBACK_ADDLAST )))
             return MergeItems( xFrame, pToolbar, TOOLBOX_APPEND, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
     }
 
@@ -504,7 +481,7 @@ bool ToolBarMerger::MergeItems(
             if ( nInsPos > sal_Int32( pToolbar->GetItemCount() ))
                 nInsPos = TOOLBOX_APPEND;
 
-            if ( rItem.aCommandURL.equalsAsciiL( TOOLBOXITEM_SEPARATOR_STR, TOOLBOXITEM_SEPARATOR_STR_LEN ))
+            if ( rItem.aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( TOOLBOXITEM_SEPARATOR_STR )))
                 pToolbar->InsertSeparator( sal_uInt16( nInsPos ));
             else
             {
@@ -664,22 +641,22 @@ bool ToolBarMerger::RemoveItems(
 {
     ::cppu::OWeakObject* pResult( 0 );
 
-    if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_BUTTON, TOOLBARCONTROLLER_BUTTON_LEN ))
+    if ( rControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( TOOLBARCONTROLLER_BUTTON )))
         pResult = new ButtonToolbarController( xSMGR, pToolbar, rCommandURL );
-    else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_COMBOBOX, TOOLBARCONTROLLER_COMBOBOX_LEN ))
+    else if ( rControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( TOOLBARCONTROLLER_COMBOBOX )))
         pResult = new ComboboxToolbarController( xSMGR, xFrame, pToolbar, nId, nWidth, rCommandURL );
-    else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_EDIT, TOOLBARCONTROLLER_EDIT_LEN ))
+    else if ( rControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( TOOLBARCONTROLLER_EDIT )))
         pResult = new EditToolbarController( xSMGR, xFrame, pToolbar, nId, nWidth, rCommandURL );
-    else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_SPINFIELD, TOOLBARCONTROLLER_SPINFIELD_LEN ))
+    else if ( rControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( TOOLBARCONTROLLER_SPINFIELD )))
         pResult = new SpinfieldToolbarController( xSMGR, xFrame, pToolbar, nId, nWidth, rCommandURL );
-    else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_IMGBUTTON, TOOLBARCONTROLLER_IMGBUTTON_LEN ))
+    else if ( rControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( TOOLBARCONTROLLER_IMGBUTTON )))
         pResult = new ImageButtonToolbarController( xSMGR, xFrame, pToolbar, nId, rCommandURL );
-    else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_DROPDOWNBOX, TOOLBARCONTROLLER_DROPDOWNBOX_LEN ))
+    else if ( rControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( TOOLBARCONTROLLER_DROPDOWNBOX )))
         pResult = new DropdownToolbarController( xSMGR, xFrame, pToolbar, nId, nWidth, rCommandURL );
-    else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_DROPDOWNBTN, TOOLBARCONTROLLER_DROPDOWNBTN_LEN ))
+    else if ( rControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( TOOLBARCONTROLLER_DROPDOWNBTN )))
         pResult = new ToggleButtonToolbarController( xSMGR, xFrame, pToolbar, nId,
                                                      ToggleButtonToolbarController::STYLE_DROPDOWNBUTTON, rCommandURL );
-    else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_TOGGLEDDBTN, TOOLBARCONTROLLER_TOGGLEDDBTN_LEN ))
+    else if ( rControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( TOOLBARCONTROLLER_TOGGLEDDBTN )))
         pResult = new ToggleButtonToolbarController( xSMGR, xFrame, pToolbar, nId,
                                                      ToggleButtonToolbarController::STYLE_TOGGLE_DROPDOWNBUTTON, rCommandURL );
     else

Modified: openoffice/branches/ia2/main/framework/util/fwl.component
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/framework/util/fwl.component?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/framework/util/fwl.component (original)
+++ openoffice/branches/ia2/main/framework/util/fwl.component Fri Dec  7 06:37:02 2012
@@ -48,12 +48,6 @@
   <implementation name="com.sun.star.comp.framework.License">
     <service name="com.sun.star.task.Job"/>
   </implementation>
-  <implementation name="com.sun.star.comp.framework.LogoImageStatusbarController">
-    <service name="com.sun.star.frame.StatusbarController"/>
-  </implementation>
-  <implementation name="com.sun.star.comp.framework.LogoTextStatusbarController">
-    <service name="com.sun.star.frame.StatusbarController"/>
-  </implementation>
   <implementation name="com.sun.star.comp.framework.MacrosMenuController">
     <service name="com.sun.star.frame.PopupMenuController"/>
   </implementation>
@@ -78,9 +72,6 @@
   <implementation name="com.sun.star.comp.framework.ServiceHandler">
     <service name="com.sun.star.frame.ProtocolHandler"/>
   </implementation>
-  <implementation name="com.sun.star.comp.framework.SimpleTextStatusbarController">
-    <service name="com.sun.star.frame.StatusbarController"/>
-  </implementation>
   <implementation name="com.sun.star.comp.framework.ToolBarsMenuController">
     <service name="com.sun.star.frame.PopupMenuController"/>
   </implementation>

Modified: openoffice/branches/ia2/main/odk/cfgWin.js
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/odk/cfgWin.js?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/odk/cfgWin.js (original)
+++ openoffice/branches/ia2/main/odk/cfgWin.js Fri Dec  7 06:37:02 2012
@@ -62,6 +62,8 @@ var oo_sdk_ure_home=getUreHome();
 
 var oo_sdk_make_home=getMakeHome();
 var oo_sdk_zip_home=getZipHome();
+var oo_sdk_cat_home=getCatHome();
+var oo_sdk_sed_home=getSedHome();
 var oo_sdk_manifest_used="";
 var oo_sdk_windowssdk="";
 var oo_sdk_cpp_home=getCppHome();
@@ -393,6 +395,110 @@ function getZipHome()
     }   
 }
 
+function getCatHome()
+{
+    var sSuggestedHome = WshSysEnv("OO_SDK_CAT_HOME");
+
+    while(true)
+    {
+        stdout.Write("\n Enter a cat (2.0 or higher) tools directory [" +
+                     sSuggestedHome + "]:");
+        var sHome = stdin.ReadLine();
+        if (sHome.length == 0)
+        {
+            //No user input, use default.
+            if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
+            {
+                stdout.WriteLine("\n Error: Could not find directory \"" +
+                                 sSuggestedHome + "\". cat is required, please " +
+                                 "specify a cat tools directory." +
+                                 "\nYou can get cat from " +
+                                 "http://sourceforge.net/projects/unxutils/files/latest/download");
+                sSuggestedHome = "";
+                continue;
+            }
+            sHome = sSuggestedHome;
+        }
+        else
+        {
+            //validate the user input
+            if ( ! aFileSystemObject.FolderExists(sHome))
+            {
+                stdout.WriteLine("\n Error: The directory \"" + sHome +
+                                 "\" does not exist. cat is required, please " +
+                                 "specify a cat tools directory." +
+                                 "\nYou can get cat from " +
+                                 "http://sourceforge.net/projects/unxutils/files/latest/download");
+                continue;
+            }
+        }
+        //Check for the make executable
+        var sCatPath = sHome + "\\cat.exe";
+        if (! aFileSystemObject.FileExists(sCatPath))
+        {
+            stdout.WriteLine("\n Error: Could not find \"" + sCatPath +
+                             "\". cat is required, please specify a cat tools " +
+                             "directory." +
+                             "\nYou can get cat from " +
+                             "http://sourceforge.net/projects/unxutils/files/latest/download");
+            continue;
+        }
+        return sHome;
+    }
+}
+
+function getSedHome()
+{
+    var sSuggestedHome = WshSysEnv("OO_SDK_SED_HOME");
+
+    while(true)
+    {
+        stdout.Write("\n Enter a sed (3.02 or higher) tools directory [" +
+                     sSuggestedHome + "]:");
+        var sHome = stdin.ReadLine();
+        if (sHome.length == 0)
+        {
+            //No user input, use default.
+            if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
+            {
+                stdout.WriteLine("\n Error: Could not find directory \"" +
+                                 sSuggestedHome + "\". sed is required, please " +
+                                 "specify a sed tools directory." +
+                                 "\nYou can get sed from " +
+                                 "http://sourceforge.net/projects/unxutils/files/latest/download");
+                sSuggestedHome = "";
+                continue;
+            }
+            sHome = sSuggestedHome;
+        }
+        else
+        {
+            //validate the user input
+            if ( ! aFileSystemObject.FolderExists(sHome))
+            {
+                stdout.WriteLine("\n Error: The directory \"" + sHome +
+                                 "\" does not exist. sed is required, please " +
+                                 "specify a sed tools directory." +
+                                 "\nYou can get sed from " +
+                                 "http://sourceforge.net/projects/unxutils/files/latest/download");
+                continue;
+            }
+        }
+        //Check for the make executable
+        var sSedPath = sHome + "\\sed.exe";
+        if (! aFileSystemObject.FileExists(sSedPath))
+        {
+            stdout.WriteLine("\n Error: Could not find \"" + sSedPath +
+                             "\". sed is required, please specify a sed tools " +
+                             "directory." +
+                             "\nYou can get sed from " +
+                             "http://sourceforge.net/projects/unxutils/files/latest/download");
+            continue;
+        }
+        return sHome;
+    }
+}
+
 function getCppHome()
 {
     var sSuggestedHome = WshSysEnv("OO_SDK_CPP_HOME");
@@ -839,6 +945,14 @@ function writeBatFile(fdir, file)
 		"REM Example: set OO_SDK_ZIP_HOME=D:\\infozip\\bin\n" +
 		"set OO_SDK_ZIP_HOME=" + oo_sdk_zip_home + 
         "\n\n" +
+        "REM Directory of the cat tool.\n" +
+        "REM Example: set OO_SDK_CAT_HOME=C:\\UnxUtils\\usr\\local\\wbin\n" +
+        "set OO_SDK_CAT_HOME=" + oo_sdk_cat_home +
+        "\n\n" +
+        "REM Directory of the sed tool.\n" +
+        "REM Example: set OO_SDK_SED_HOME=C:\\UnxUtils\\usr\\local\\wbin\n" +
+        "set OO_SDK_SED_HOME=" + oo_sdk_sed_home +
+        "\n\n" +
         "REM Directory of the C++ compiler.\n" + 
         "REM Example:set OO_SDK_CPP_HOME=C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin\n" + 
         "set OO_SDK_CPP_HOME=" + oo_sdk_cpp_home + 
@@ -893,6 +1007,18 @@ function writeBatFile(fdir, file)
         "   goto :error\n" +
         " )\n" +
         "\n" +
+        "REM Check installation path for the cat tool.\n" +
+        "if not defined OO_SDK_CAT_HOME (\n" +
+        "   echo Error: the variable OO_SDK_CAT_HOME is missing!\n" +
+        "   goto :error\n" +
+        " )\n" +
+        "\n" +
+        "REM Check installation path for the sed tool.\n" +
+        "if not defined OO_SDK_SED_HOME (\n" +
+        "   echo Error: the variable OO_SDK_SED_HOME is missing!\n" +
+        "   goto :error\n" +
+        " )\n" +
+        "\n" +
         "REM Set library path. \n" + 
         "set LIB=%OO_SDK_HOME%\\lib;%LIB%\n" +
         "if defined CPP_WINDOWS_SDK (\n" +
@@ -944,10 +1070,16 @@ function writeBatFile(fdir, file)
         "\n" +
         "REM Add directory of the command make to the path, if necessary.\n" +
         "if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%\n" + 
-        "\n" + 
-	"REM Add directory of the zip tool to the path, if necessary.\n" +
-	"if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%\n" +
-        "\n" + 
+        "\n" +
+        "REM Add directory of the zip tool to the path, if necessary.\n" +
+        "if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%\n" +
+        "\n" +
+        "REM Add directory of the cat tool to the path, if necessary.\n" +
+        "if defined OO_SDK_CAT_HOME set PATH=%OO_SDK_CAT_HOME%;%PATH%\n" +
+        "\n" +
+        "REM Add directory of the sed tool to the path, if necessary.\n" +
+        "if defined OO_SDK_SED_HOME set PATH=%OO_SDK_SED_HOME%;%PATH%\n" +
+        "\n" +
         "REM Add directory of the C++ compiler to the path, if necessary.\n" +
         "if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%\n" + 
         "\n" +
@@ -979,6 +1111,8 @@ function writeBatFile(fdir, file)
         "echo  * URE = %OO_SDK_URE_HOME%\n" +
         "echo  * Make = %OO_SDK_MAKE_HOME%\n" +
         "echo  * Zip = %OO_SDK_ZIP_HOME%\n" +
+        "echo  * cat = %OO_SDK_CAT_HOME%\n" +
+        "echo  * sed = %OO_SDK_SED_HOME%\n" +
         "echo  * C++ Compiler = %OO_SDK_CPP_HOME%\n" +
         "echo  * C# and VB.NET compilers = %OO_SDK_CLI_HOME%\n" +
         "echo  * Java = %OO_SDK_JAVA_HOME%\n" +
@@ -996,6 +1130,3 @@ function writeBatFile(fdir, file)
         );
         newFile.Close();        
 }
-
-
-

Modified: openoffice/branches/ia2/main/odk/configure.pl
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/odk/configure.pl?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/odk/configure.pl (original)
+++ openoffice/branches/ia2/main/odk/configure.pl Fri Dec  7 06:37:02 2012
@@ -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.
-#  
+#
 #**************************************************************
 
 #
@@ -76,6 +76,16 @@ $main::OO_SDK_ZIP_HOME = "";
 $main::OO_SDK_ZIP_HOME_SUGGESTION = searchprog("zip");
 $main::zipVersion = "2.3";
 
+$main::OO_SDK_CAT_HOME = "";
+$main::OO_SDK_CAT_HOME_SUGGESTION = searchprog("cat");
+# TODO cat version
+# $main::catVersion = "";
+
+$main::OO_SDK_SED_HOME = "";
+$main::OO_SDK_SED_HOME_SUGGESTION = searchprog("sed");
+# TODO sed version
+# $main::sedVersion = "";
+
 $main::OO_SDK_CPP_HOME = "";
 $main::cppName = "gcc";
 $main::cppVersion = "4.0.1";
@@ -326,6 +336,54 @@ while ( (!$main::correctVersion) &&
 	}
 }
 
+# prepare cat path
+$main::correctVersion = 0;
+while ( (!$main::correctVersion) &&
+        ((! -d "$main::OO_SDK_CAT_HOME" ) ||
+         ((-d "$main::OO_SDK_CAT_HOME") && (! -e "$main::OO_SDK_CAT_HOME/cat"))) )
+{
+    print " Enter cat tool directory [$main::OO_SDK_CAT_HOME_SUGGESTION]: ";
+    $main::OO_SDK_CAT_HOME = readStdIn();
+    chop($main::OO_SDK_CAT_HOME);
+    if ( $main::OO_SDK_CAT_HOME eq "" )
+    {
+        $main::OO_SDK_CAT_HOME = $main::OO_SDK_CAT_HOME_SUGGESTION;
+    }
+    if ( (! -d "$main::OO_SDK_CAT_HOME") ||
+         ((-d "$main::OO_SDK_CAT_HOME") && (! -e "$main::OO_SDK_CAT_HOME/cat")) )
+    {
+        $main::OO_SDK_CAT_HOME = "";
+        print " Error: cat tool is required, please specify a cat tool directory.\n";
+    }
+    # else ...
+    # TODO check version
+    # NOTE: only Linux cat understands --version
+}
+
+# prepare sed path
+$main::correctVersion = 0;
+while ( (!$main::correctVersion) &&
+        ((! -d "$main::OO_SDK_SED_HOME" ) ||
+         ((-d "$main::OO_SDK_SED_HOME") && (! -e "$main::OO_SDK_SED_HOME/sed"))) )
+{
+    print " Enter sed tool directory [$main::OO_SDK_SED_HOME_SUGGESTION]: ";
+    $main::OO_SDK_SED_HOME = readStdIn();
+    chop($main::OO_SDK_SED_HOME);
+    if ( $main::OO_SDK_SED_HOME eq "" )
+    {
+        $main::OO_SDK_SED_HOME = $main::OO_SDK_SED_HOME_SUGGESTION;
+    }
+    if ( (! -d "$main::OO_SDK_SED_HOME") ||
+         ((-d "$main::OO_SDK_SED_HOME") && (! -e "$main::OO_SDK_SED_HOME/sed")) )
+    {
+        $main::OO_SDK_SED_HOME = "";
+        print " Error: sed tool is required, please specify a sed tool directory.\n";
+    }
+    # else ...
+    # TODO check version
+    # NOTE: only Linux sed understands --version
+}
+
 # prepare C++ compiler path
 $main::correctVersion = 0;
 while ( (!$main::correctVersion) &&
@@ -535,12 +593,9 @@ else
     $main::SDK_AUTO_DEPLOYMENT = "NO";
 }
 
-prepareScriptFile("setsdkenv_unix.sh.in", "setsdkenv_unix.sh", 1);
+prepareScriptFile("setsdkenv_unix.sh.in", "setsdkenv_unix.sh");
 chmod 0644, "$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.sh";
 
-prepareScriptFile("setsdkenv_unix.csh.in", "setsdkenv_unix.csh", 2);
-chmod 0644, "$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.csh";
-
 print "\n";
 print " ************************************************************************\n";
 print " * ... your SDK environment has been prepared.\n";
@@ -548,7 +603,6 @@ print " * For each time you want to use 
 print " * have to run the \"setsdkenv_unix\" script file!\n";
 print " * Alternatively can you source one of the scripts\n";
 print " *   \"$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.sh\"\n";
-print " *   \"$main::OO_SDK_CONFIG_HOME/$main::hostname/setsdkenv_unix.csh\"\n";
 print " * to get an environment without starting a new shell.\n";
 print " ************************************************************************\n\n";
 
@@ -761,12 +815,12 @@ sub testVersion
 
 	for ($i=0; $i <= $length; $i++ )
 	{
-		if ( @testVersion->[$i] > @mustBeVersion->[$i] )
+		if ( @testVersion[$i] > @mustBeVersion[$i] )
 		{
 			return 1; # 1 indicates a correct version
 		}
 
-		if ( @testVersion->[$i] < @mustBeVersion->[$i] )
+		if ( @testVersion[$i] < @mustBeVersion[$i] )
 		{
 			if ( $#checkOnly == 1 ) {
 				print " The command '$toolName' has the version $tmpTestVersion.\n";
@@ -794,9 +848,6 @@ sub prepareScriptFile() 
 {
 	my $inputFile = shift;
 	my $outputFile = shift;
-	# shell mode 1 = sh
-	#            2 = csh
-	my $shellMode = shift;
 
 	if ( ! -d "$main::OO_SDK_CONFIG_HOME/$main::hostname" )
 	{
@@ -815,6 +866,8 @@ sub prepareScriptFile() 
 		$_ =~ s#\@OO_SDK_URE_HOME\@#$main::OO_SDK_URE_HOME#go;
 		$_ =~ s#\@OO_SDK_MAKE_HOME\@#$main::OO_SDK_MAKE_HOME#go;
 		$_ =~ s#\@OO_SDK_ZIP_HOME\@#$main::OO_SDK_ZIP_HOME#go;
+        $_ =~ s#\@OO_SDK_CAT_HOME\@#$main::OO_SDK_CAT_HOME#go;
+        $_ =~ s#\@OO_SDK_SED_HOME\@#$main::OO_SDK_SED_HOME#go;
 		$_ =~ s#\@OO_SDK_CPP_HOME\@#$main::OO_SDK_CPP_HOME#go;
 		$_ =~ s#\@OO_SDK_CC_55_OR_HIGHER\@#$main::OO_SDK_CC_55_OR_HIGHER#go;
 		$_ =~ s#\@OO_SDK_JAVA_HOME\@#$main::OO_SDK_JAVA_HOME#go;

Modified: openoffice/branches/ia2/main/odk/docs/install.html
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/odk/docs/install.html?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/odk/docs/install.html (original)
+++ openoffice/branches/ia2/main/odk/docs/install.html Fri Dec  7 06:37:02 2012
@@ -137,6 +137,16 @@
 		  If you do not have these already, you can download them from <a target="_blank" href="http://www.info-zip.org" title="link to www.ubfi-zip.org (online)">http://www.info-zip.org</a>. Note: The cygwin zip.exe does not work for the build under 
 		  the 4NT shell. You have to use the native w32 version.</td>
           </tr>
+          <tr valign="middle">
+            <td colspan="2"><img class="line" src="images/sdk_line-1.gif"></td>
+          </tr>
+          <tr valign="top">
+          <td><b>cat and sed tools<b></td>
+          <td class="content80">The cat and set tools are used to create some extensions.
+          <p><b>Note for Windows users</b>: If you do not have these already, you can download them from
+          <a target="_blank" href="http://sourceforge.net/projects/unxutils/files/latest/downloadg" title="link to UnxUtils (online)">http://sourceforge.net/projects/unxutils/files/latest/download</a>.</p>
+          </td>
+          </tr>
 		  <tr valign="middle"> 
             <td colspan="2"><img class="line" src="images/sdk_line-1.gif"></td>
           </tr>
@@ -150,11 +160,11 @@
           <td colspan="2">
 		  <p>The SDK provides an implicit configuration mechanism, which
 		  configures the SDK build environment to your personal needs the first 
-		  time you use the SDK environment. This configuration step creates one or 
-		  two new setsdkenv_XXX scripts in the user's home directory:</P>
+		  time you use the SDK environment. This configuration step creates a
+		  new setsdkenv_XXX script in the user's home directory:</P>
 		  <ul>
-		    <li><b>$HOME/$OO_SDK_NAME/setsdkenv_unix.sh</b> and <b>$HOME/$OO_SDK_NAME/setsdkenv_unix.csh</b>&nbsp;&nbsp;-> for Unix
-            <li><b>C:\Documents and Settings\&lt;username&gt;\Application Data\%OO_SDK_NAME%\setsdkenv_windows.bat</b></a>&nbsp;&nbsp;-> for Windows2000/XP or later
+		    <li><b>$HOME/$OO_SDK_NAME/setsdkenv_unix.sh</b>&nbsp;&nbsp;-> for Unix
+            <li><b>C:\Documents and Settings\&lt;username&gt;\Application Data\%OO_SDK_NAME%\setsdkenv_windows.bat</b>&nbsp;&nbsp;-> for Windows2000/XP or later
           </ul>
 		  <p>The automatically started configure script (Unix and Windows2000/XP) 
 		  requests relevant information and directories (SDK, the Office, GNU make, 
@@ -234,6 +244,14 @@
 		  <td class="cell20"><b>OO_SDK_ZIP_HOME</b></td>
 		  <td class="cell80">Path to the 'zip' tool.</td>
 		  </tr>
+          <tr>
+          <td class="cell20"><b>OO_SDK_CAT_HOME</b></td>
+          <td class="cell80">Path to the 'cat' tool.</td>
+          </tr>
+          <tr>
+          <td class="cell20"><b>OO_SDK_SED_HOME</b></td>
+          <td class="cell80">Path to the 'sed' tool.</td>
+          </tr>
 		  <tr>
 		  <td class="cell20"><b>OO_SDK_OUTPUT_DIR</b></td>
 		  <td class="cell80">Path to an existing directory where the example output 

Modified: openoffice/branches/ia2/main/odk/examples/cpp/custompanel/Makefile
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/odk/examples/cpp/custompanel/Makefile?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/odk/examples/cpp/custompanel/Makefile (original)
+++ openoffice/branches/ia2/main/odk/examples/cpp/custompanel/Makefile Fri Dec  7 06:37:02 2012
@@ -43,9 +43,6 @@ COMP_TYPEFLAG = $(OUT_MISC)/cpp_$(COMP_N
 
 # Allow deploying the extension when running it
 
-#this should be in odk/settings/std.mk
-OUT_DEPLOY=$(OUT)/deploy
-
 OUT_COMP_DEPLOY=$(OUT_DEPLOY)/$(COMP_NAME)
 OUT_DEPLOY_DIR=$(subst /,$(PS),$(OUT_COMP_DEPLOY))
 OUT_DEPLOY_URL=$(URLPREFIX)$(OUT_COMP_DEPLOY)
@@ -60,10 +57,6 @@ CXXFILES = \
 
 SLOFILES = $(patsubst %.cxx,$(OUT_COMP_SLO)/%.$(OBJ_EXT),$(CXXFILES))
 
-# Add OSL_DEBUG_LEVEL to compiler the flags (for OSL_TRACE et. al.)
-ifeq "$(DEBUG)" "yes"
-CC_FLAGS += -DOSL_DEBUG_LEVEL=2
-endif
 
 # Targets
 .PHONY: ALL

Modified: openoffice/branches/ia2/main/odk/examples/examples.html
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/odk/examples/examples.html?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/odk/examples/examples.html (original)
+++ openoffice/branches/ia2/main/odk/examples/examples.html Fri Dec  7 06:37:02 2012
@@ -442,12 +442,16 @@
 		  com.sun.star.lang.XMain</a> interface. In the run method, it connects to 
 		  the servers process and retrieves an instance and does some calls on the 
 		  instance.</td>
-		  </tr>		  
+		  </tr>
 		  <tr>
 		  <td class="cell20"><a href="cpp/complextoolbarcontrols/" title="link to the source directory of the C++ complextoolbarcontrols example">complextoolbarcontrols</a></td>
 		  <td class="cell80">This example shows how to create a toolbar add-on with complex toolbar controls. 
 		  It shows how to use an Image Button, a Combo Box, a Spin Field, an Edit Field, a Dropdown Box, a Toggle Dropdown Button and a normal Dropdown Button</td>
-		  </tr>		  
+		  </tr>
+          <tr>
+          <td class="cell20"><a href="cpp/StatusbarController/" title="link to the source directory of the C++ StatusbarController example">StatusbarController</a></td>
+          <td class="cell80">These examples show how to implement a StatusbarController to add functionality in the status bar.</td>
+          </tr>
 		  <tbody>
 		  </table>
 		  </td>

Modified: openoffice/branches/ia2/main/odk/pack/copying/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/odk/pack/copying/makefile.mk?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/odk/pack/copying/makefile.mk (original)
+++ openoffice/branches/ia2/main/odk/pack/copying/makefile.mk Fri Dec  7 06:37:02 2012
@@ -106,6 +106,7 @@ DESTCLASSESLIST= \
 
 SETTINGSLIST= \
 	$(DESTDIRSETTINGS)/settings.mk \
+	$(DESTDIRSETTINGS)/platform.mk \
 	$(DESTDIRSETTINGS)/std.mk \
 	$(DESTDIRSETTINGS)/stdtarget.mk \
 	$(DESTDIRSETTINGS)/dk.mk
@@ -158,8 +159,7 @@ INSTALLSCRIPT= \
 	$(DESTDIR)/config.sub \
 	$(DESTDIR)/configure.pl \
 	$(DESTDIR)/setsdkenv_unix \
-	$(DESTDIR)/setsdkenv_unix.sh.in \
-	$(DESTDIR)/setsdkenv_unix.csh.in
+	$(DESTDIR)/setsdkenv_unix.sh.in
 .ELSE
 INSTALLSCRIPT= \
 	$(DESTDIR)/setsdkenv_windows.bat \

Modified: openoffice/branches/ia2/main/odk/setsdkenv_unix
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/odk/setsdkenv_unix?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/odk/setsdkenv_unix (original)
+++ openoffice/branches/ia2/main/odk/setsdkenv_unix Fri Dec  7 06:37:02 2012
@@ -25,7 +25,7 @@ HOSTNAME=`hostname`
 CURRENTDIR=`/bin/pwd`
 SDKTMPDIR=`dirname $0`
 OO_SDK_HOME=`(cd $SDKTMPDIR && pwd && cd $CURRENTDIR) | head -n 1`
-OOVERSION=`cat $OO_SDK_HOME/settings/dk.mk | tail -2 | head -n 1 | cut -d"=" -f2 | cut -d"." -f1,2`
+OOVERSION=`cat $OO_SDK_HOME/settings/dk.mk | tail -3 | head -n 1 | cut -d"=" -f2 | cut -d"." -f1,2`
 if [ "$OSTYPE" = "Darwin" ] 
 then
     OO_SDK_NAME=`basename $OO_SDK_HOME`
@@ -53,9 +53,8 @@ then
     echo ""
     echo " options:"
     echo "   --force-configure : force a new configuration of your SDK environment."
-    echo "                       Alternatively can you edit your SDK environment scripts directly:"
+    echo "                       Alternatively can you edit your SDK environment script directly:"
     echo "                        $HOME/$OO_SDK_NAME/setsdkenv_unix.sh"
-    echo "                        $HOME/$OO_SDK_NAME/setsdkenv_unix.csh"
     echo "   -h, --help        : print this help and exit"
     echo
     exit 1

Modified: openoffice/branches/ia2/main/odk/setsdkenv_unix.sh.in
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/odk/setsdkenv_unix.sh.in?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/odk/setsdkenv_unix.sh.in (original)
+++ openoffice/branches/ia2/main/odk/setsdkenv_unix.sh.in Fri Dec  7 06:37:02 2012
@@ -50,6 +50,14 @@ OO_SDK_MAKE_HOME=@OO_SDK_MAKE_HOME@
 # Example: OO_SDK_ZIP_HOME=/usr/bin
 OO_SDK_ZIP_HOME=@OO_SDK_ZIP_HOME@
 
+# Directory of the cat command.
+# Example: OO_SDK_CAT_HOME=/usr/bin
+OO_SDK_CAT_HOME=@OO_SDK_CAT_HOME@
+
+# Directory of the sed command.
+# Example: OO_SDK_SED_HOME=/usr/bin
+OO_SDK_SED_HOME=@OO_SDK_SED_HOME@
+
 # Directory of the C++ compiler.
 # Example: OO_SDK_CPP_HOME=/usr/bin
 OO_SDK_CPP_HOME=@OO_SDK_CPP_HOME@
@@ -267,6 +275,20 @@ then
     export OO_SDK_ZIP_HOME
 fi
 
+# Add directory of the sed tool to the path, if necessary.
+if [ -n "${OO_SDK_SED_HOME}" ]
+then
+    PATH=${OO_SDK_SED_HOME}:${PATH}
+    export OO_SDK_SED_HOME
+fi
+
+# Add directory of the cat tool to the path, if necessary.
+if [ -n "${OO_SDK_CAT_HOME}" ]
+then
+    PATH=${OO_SDK_CAT_HOME}:${PATH}
+    export OO_SDK_CAT_HOME
+fi
+
 # Add directory of the C++ tools to the path, if necessary.
 if [ -n "${OO_SDK_CPP_HOME}" ]
 then
@@ -343,15 +365,17 @@ fi 
 # Prepare shell with all necessary environment variables.
 echo 
 echo " ************************************************************************"
-echo " *"                                                  
-echo " * SDK environment is prepared for ${platform}"      
-echo " *"                                                  
+echo " *"
+echo " * SDK environment is prepared for ${platform}"
+echo " *"
 echo " * SDK = $OO_SDK_HOME"
 echo " * Office = $OFFICE_HOME"
 echo " * Office Base = $OFFICE_BASE_HOME"
 echo " * URE = $OO_SDK_URE_HOME"
 echo " * Make = $OO_SDK_MAKE_HOME"
 echo " * Zip = $OO_SDK_ZIP_HOME"
+echo " * cat = $OO_SDK_CAT_HOME"
+echo " * sed = $OO_SDK_SED_HOME"
 echo " * C++ Compiler = $OO_SDK_CPP_HOME"
 echo " * Java = $OO_SDK_JAVA_HOME"
 echo " * SDK Output directory = $OO_SDK_OUT"

Modified: openoffice/branches/ia2/main/odk/setsdkenv_windows.template
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/odk/setsdkenv_windows.template?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/odk/setsdkenv_windows.template (original)
+++ openoffice/branches/ia2/main/odk/setsdkenv_windows.template Fri Dec  7 06:37:02 2012
@@ -49,6 +49,14 @@ REM Directory of the zip tool.
 REM Example: set OO_SDK_ZIP_HOME=D:\infozip\bin
 set OO_SDK_ZIP_HOME=
 
+REM Directory of the cat tool.
+REM Example: set OO_SDK_CAT_HOME=C:\UnxUtils\usr\local\wbin\
+set OO_SDK_CAT_HOME=
+
+REM Directory of the sed tool.
+REM Example: set OO_SDK_SED_HOME=C:\UnxUtils\usr\local\wbin\
+set OO_SDK_SED_HOME=
+
 REM Directory of the C++ compiler.
 REM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
 REM Example:set CPP_WINDOWS_SDK=C:\Program Files\\Microsoft SDKs\Windows\v6.0A\
@@ -105,6 +113,18 @@ if not defined OO_SDK_ZIP_HOME (
    goto :error
  )
 
+REM Check installation path for the cat tool.
+if not defined OO_SDK_CAT_HOME (
+   echo Error: the variable OO_SDK_CAT_HOME is missing!
+   goto :error
+ )
+
+REM Check installation path for the sed tool.
+if not defined OO_SDK_SED_HOME (
+   echo Error: the variable OO_SDK_SED_HOME is missing!
+   goto :error
+ )
+
 REM Set library path. 
 set LIB=%OO_SDK_HOME%\lib;%LIB%
 if defined CPP_WINDOWS_SDK (
@@ -160,6 +180,12 @@ if defined OO_SDK_MAKE_HOME set PATH=%OO
 REM Add directory of the zip tool to the path, if necessary.
 if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%
 
+REM Add directory of the cat tool to the path, if necessary.
+if defined OO_SDK_CAT_HOME set PATH=%OO_SDK_CAT_HOME%;%PATH%
+
+REM Add directory of the sed tool to the path, if necessary.
+if defined OO_SDK_SED_HOME set PATH=%OO_SDK_SED_HOME%;%PATH%
+
 REM Add directory of the C++ compiler to the path, if necessary.
 if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%
 
@@ -187,6 +213,8 @@ echo  * Office Base = %OFFICE_BASE_HOME%
 echo  * URE = %OO_SDK_URE_HOME%
 echo  * Make = %OO_SDK_MAKE_HOME%
 echo  * Zip = %OO_SDK_ZIP_HOME%
+echo  * cat = %OO_SDK_CAT_HOME%
+echo  * sed = %OO_SDK_SED_HOME%
 echo  * C++ Compiler = %OO_SDK_CPP_HOME%
 echo  * C# and VB.NET compilers = %OO_SDK_CLI_HOME%
 echo  * Java = %OO_SDK_JAVA_HOME%

Modified: openoffice/branches/ia2/main/odk/settings/settings.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/odk/settings/settings.mk?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/odk/settings/settings.mk (original)
+++ openoffice/branches/ia2/main/odk/settings/settings.mk Fri Dec  7 06:37:02 2012
@@ -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.
-#  
+#
 #**************************************************************
 
 # Global settings file for the minimal build environment of the SDK
@@ -657,3 +657,9 @@ URE_MISC=$(OO_SDK_URE_HOME)/share/misc
 endif
 
 endif
+
+
+# Add OSL_DEBUG_LEVEL to compiler the flags (for OSL_TRACE et. al.)
+ifeq "$(DEBUG)" "yes"
+CC_FLAGS += -DOSL_DEBUG_LEVEL=2
+endif

Modified: openoffice/branches/ia2/main/odk/settings/std.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/odk/settings/std.mk?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/odk/settings/std.mk (original)
+++ openoffice/branches/ia2/main/odk/settings/std.mk Fri Dec  7 06:37:02 2012
@@ -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,17 +7,18 @@
 #  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.
-#  
+#
 #**************************************************************
+
 ifneq "$(OO_SDK_OUT)" ""
 OUT=$(subst \,/,$(OO_SDK_OUT))/$(OS)example.out
 else
@@ -35,6 +36,7 @@ OUT_SLB=$(OUT)/slb
 OUT_MISC=$(OUT)/misc
 OUT_OBJ=$(OUT)/obj
 OUT_CLASS=$(OUT)/class
+OUT_DEPLOY=$(OUT)/deploy
 IDL_DIR=$(PRJ)/idl
 BIN_DIR=$(PRJ)/bin
 CLASSES_DIR=$(PRJ)/classes
@@ -67,6 +69,8 @@ SDK_JAVA="$(OO_SDK_JAVA_HOME)/$(JAVABIN)
 SDK_JAVAC="$(OO_SDK_JAVA_HOME)/$(JAVABIN)/javac"
 SDK_JAR="$(OO_SDK_JAVA_HOME)/$(JAVABIN)/jar"
 SDK_ZIP="$(OO_SDK_ZIP_HOME)/zip"
+SDK_CAT="$(OO_SDK_CAT_HOME)/cat"
+SDK_SED="$(OO_SDK_SED_HOME)/sed"
 IDLC="$(OO_SDK_HOME)/bin/idlc"
 CPPUMAKER="$(OO_SDK_HOME)/bin/cppumaker"
 JAVAMAKER="$(OO_SDK_HOME)/bin/javamaker"

Modified: openoffice/branches/ia2/main/odk/util/check.pl
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/odk/util/check.pl?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/odk/util/check.pl (original)
+++ openoffice/branches/ia2/main/odk/util/check.pl Fri Dec  7 06:37:02 2012
@@ -141,10 +141,6 @@ if (-d "$StartDir") {
 	    print "\nERROR: \"$StartDir/setsdkenv_unix.sh.in\" is missing\n";
 	    $return++;
 	}
-	if (! -e "$StartDir/setsdkenv_unix.csh.in") {
-	    print "\nERROR: \"$StartDir/setsdkenv_unix.csh.in\" is missing\n";
-	    $return++;
-	}
     }
     print "\n";
 

Modified: openoffice/branches/ia2/main/odk/util/makefile.pmk
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/odk/util/makefile.pmk?rev=1418198&r1=1418197&r2=1418198&view=diff
==============================================================================
--- openoffice/branches/ia2/main/odk/util/makefile.pmk (original)
+++ openoffice/branches/ia2/main/odk/util/makefile.pmk Fri Dec  7 06:37:02 2012
@@ -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,22 +7,22 @@
 #  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.
-#  
+#
 #**************************************************************
 
 
 
 # used for sdk common files
-PRODUCT_RELEASE=3.4
+PRODUCT_RELEASE=3.5
 OFFICENAME=OpenOffice.org
 SDKDIRNAME=openoffice.org$(PRODUCT_RELEASE)_sdk
 OFFICEPRODUCTNAME=$(OFFICENAME) $(PRODUCT_RELEASE)



Mime
View raw message