[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - framework/inc framework/source offapi/com svx/source svx/util

Ariel Constenla-Haile arielch at apache.org
Tue May 28 17:07:25 PDT 2013


 framework/inc/uielement/popuptoolbarcontroller.hxx    |    1 
 framework/source/uielement/popuptoolbarcontroller.cxx |   29 +++++++++---------
 offapi/com/sun/star/awt/MessageBoxResults.idl         |    4 +-
 offapi/com/sun/star/awt/MessageBoxType.idl            |    4 +-
 svx/source/tbxctrls/extrusioncontrols.cxx             |    2 -
 svx/util/svxcore.component                            |    2 -
 6 files changed, 22 insertions(+), 20 deletions(-)

New commits:
commit 82194a19ff4f29c8451c8e6ab6fe4f1b9d08df27
Author: Ariel Constenla-Haile <arielch at apache.org>
Date:   Tue May 28 22:09:37 2013 +0000

    i121544 - Fix header guards
    
    Found by: Tsutomu Uchino

diff --git a/offapi/com/sun/star/awt/MessageBoxResults.idl b/offapi/com/sun/star/awt/MessageBoxResults.idl
index baa72cf..ba551fc 100644
--- a/offapi/com/sun/star/awt/MessageBoxResults.idl
+++ b/offapi/com/sun/star/awt/MessageBoxResults.idl
@@ -19,8 +19,8 @@
  *
  *************************************************************/
 
-#ifndef __com_sun_star_awt_MessageBoxCommand_idl__
-#define __com_sun_star_awt_MessageBoxCommand_idl__
+#ifndef __com_sun_star_awt_MessageBoxResults_idl__
+#define __com_sun_star_awt_MessageBoxResults_idl__
 
 module com {  module sun {  module star {  module awt {
 
diff --git a/offapi/com/sun/star/awt/MessageBoxType.idl b/offapi/com/sun/star/awt/MessageBoxType.idl
index c18274e..b3bfd2d 100644
--- a/offapi/com/sun/star/awt/MessageBoxType.idl
+++ b/offapi/com/sun/star/awt/MessageBoxType.idl
@@ -19,8 +19,8 @@
  *
  *************************************************************/
 
-#ifndef __com_sun_star_awt_MessageBoxCommand_idl__
-#define __com_sun_star_awt_MessageBoxCommand_idl__
+#ifndef __com_sun_star_awt_MessageBoxType_idl__
+#define __com_sun_star_awt_MessageBoxType_idl__
 
 module com {  module sun {  module star {  module awt {
 
commit 5149ad822bb66cca9561b7c181c6c2279affc29a
Author: Ariel Constenla-Haile <arielch at apache.org>
Date:   Tue May 28 22:09:27 2013 +0000

    i122401 - framework::NewToolbarController needs early initialization of its PopupMenu

diff --git a/framework/inc/uielement/popuptoolbarcontroller.hxx b/framework/inc/uielement/popuptoolbarcontroller.hxx
index f6b1ae0..99e4d90 100644
--- a/framework/inc/uielement/popuptoolbarcontroller.hxx
+++ b/framework/inc/uielement/popuptoolbarcontroller.hxx
@@ -81,6 +81,7 @@ namespace framework
         DECLARE_XSERVICEINFO
     private:
         void functionExecuted( const rtl::OUString &rCommand );
+        void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
         void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& rEvent ) throw ( ::com::sun::star::uno::RuntimeException );
         void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException);
         void setItemImage( const rtl::OUString &rCommand );
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index 87bf920..cb19d84 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -265,6 +265,17 @@ NewToolbarController::NewToolbarController(
 }
 
 void SAL_CALL
+NewToolbarController::initialize(
+    const css::uno::Sequence< css::uno::Any >& aArguments )
+throw ( css::uno::Exception, css::uno::RuntimeException )
+{
+    PopupMenuToolbarController::initialize( aArguments );
+
+    osl::MutexGuard aGuard( m_aMutex );
+    createPopupMenuController();
+}
+
+void SAL_CALL
 NewToolbarController::statusChanged(
     const css::frame::FeatureStateEvent& rEvent )
     throw ( css::uno::RuntimeException )
@@ -409,10 +420,7 @@ void NewToolbarController::setItemImage( const OUString &rCommand )
     Image aMenuImage;
 
     sal_Bool bValid( Impl_ExistURLInMenu( m_xPopupMenu, aURL, sFallback, aMenuImage ) );
-    // do not change aURL if Impl_ExistURLInMenu returned sal_False
-    // this allows later initialization of the PopupMenuController on createPopupWindow()
-    // and works even if SvFileInformationManager does not know the module
-    if ( !aURL.getLength() )
+    if ( !bValid )
         aURL = sFallback;
 
     sal_Bool bBig = SvtMiscOptions().AreCurrentSymbolsLarge();
@@ -421,16 +429,9 @@ void NewToolbarController::setItemImage( const OUString &rCommand )
     INetURLObject aURLObj( aURL );
     Image aImage = SvFileInformationManager::GetImageNoDefault( aURLObj, bBig, bHC );
     if ( !aImage )
-    {
-        if ( !!aMenuImage )
-            aImage =  aMenuImage;
-        else if ( !bValid )
-            // If SvFileInformationManager didn't know the module, try with the default
-            aImage = SvFileInformationManager::GetImageNoDefault( INetURLObject( sFallback ), bBig, bHC );
-
-        if ( !aImage )
-            aImage = SvFileInformationManager::GetImage( aURLObj, bBig, bHC );
-    }
+        aImage = !!aMenuImage ?
+            aMenuImage :
+            SvFileInformationManager::GetImage( aURLObj, bBig, bHC );
 
     // if everything failed, just use the image associated with the toolbar item command
     if ( !aImage )
commit e0f9eb4cc5d2ea676a899c4cbecb97264a31fef3
Author: Ariel Constenla-Haile <arielch at apache.org>
Date:   Tue May 28 22:09:19 2013 +0000

    svx::ExtrusionDepthController is a ToolbarController
    
    This class is dereived from svt::PopupWindowController, derived in turn
    from svt::ToolboxController, the base class of all
    css.frame.ToolbarController's. Adapt getSupportedServiceNames() and the
    passive component registration to reflect that fact.

diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index c434bfb..7f2d251 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -539,7 +539,7 @@ OUString SAL_CALL ExtrusionDepthController_getImplementationName()
 Sequence< OUString > SAL_CALL ExtrusionDepthController_getSupportedServiceNames() throw( RuntimeException )
 {
     Sequence< OUString > aSNS( 1 );
-    aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.PopupMenuController" ));
+    aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
     return aSNS;
 }
 
diff --git a/svx/util/svxcore.component b/svx/util/svxcore.component
index 5de36dc..d7cb24a 100644
--- a/svx/util/svxcore.component
+++ b/svx/util/svxcore.component
@@ -25,7 +25,7 @@
 <component loader="com.sun.star.loader.SharedLibrary"
     xmlns="http://openoffice.org/2010/uno-components">
   <implementation name="com.sun.star.comp.svx.ExtrusionDepthController">
-    <service name="com.sun.star.frame.PopupMenuController"/>
+    <service name="com.sun.star.frame.ToolbarController"/>
   </implementation>
   <implementation name="com.sun.star.comp.svx.ExtrusionDirectionController">
     <service name="com.sun.star.frame.ToolbarController"/>


More information about the Libreoffice-commits mailing list