[Libreoffice-commits] .: Branch 'libreoffice-4-0' - 3 commits - basic/source sfx2/inc sfx2/source toolkit/inc

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Dec 20 11:27:28 PST 2012


 basic/source/runtime/step0.cxx                             |    2 +-
 sfx2/inc/sfx2/sfx.hrc                                      |    1 +
 sfx2/source/view/viewprn.cxx                               |    1 +
 toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx |    9 +++++++--
 4 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 67b3af79bb17d8d8c8b9d2328051a340c107f956
Author: Noel Power <noel.power at suse.com>
Date:   Thu Dec 20 17:28:53 2012 +0000

    fix dialog language support mess fdo#42978
    
    during some rework ( not sure if it was me or not ) we try to register
    ControlContainerBase on construction as a XModifyListener ( but it's not ). Patch
    make ControlContainerBase implement XModifyListener now. iirc the code in question
    was moved from UnoDialogControl at some stage and it appears some balls were
    dropped :-)
    
    Change-Id: Ifc7084bd7260ceb06334117582facb95bafb6fed

diff --git a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
index 72da858..3a7e598 100644
--- a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
+++ b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
@@ -29,7 +29,7 @@
 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
 #include <com/sun/star/resource/XStringResourceResolver.hpp>
 #include <cppuhelper/implbase8.hxx>
-#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase3.hxx>
 #include <toolkit/helper/listenermultiplexer.hxx>
 #include <toolkit/controls/unocontrolmodel.hxx>
 #include <toolkit/controls/unocontrolcontainer.hxx>
@@ -208,9 +208,10 @@ class ResourceListener  :public ::com::sun::star::util::XModifyListener,
         bool                                                                                    m_bListening;
 };
 
-typedef ::cppu::AggImplInheritanceHelper2   < UnoControlContainer
+typedef ::cppu::AggImplInheritanceHelper3   < UnoControlContainer
                             ,   ::com::sun::star::container::XContainerListener
                             ,   ::com::sun::star::util::XChangesListener
+                            ,   ::com::sun::star::util::XModifyListener
                             >   ContainerControl_IBase;
 
 class ControlContainerBase : public ContainerControl_IBase
@@ -252,6 +253,10 @@ public:
     // ::com::sun::star::awt::XControl
     sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model ) throw(::com::sun::star::uno::RuntimeException);
     void SAL_CALL setDesignMode( sal_Bool bOn ) throw(::com::sun::star::uno::RuntimeException);
+    // XModifyListener
+    // Using a dummy/no-op implementation here, not sure if every container control needs
+    // to implement this, certainly Dialog does, lets see about others
+    virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& ) throw (::com::sun::star::uno::RuntimeException) {}
 protected:
     virtual void ImplModelPropertiesChanged( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& rEvents ) throw(::com::sun::star::uno::RuntimeException);
     virtual void removingControl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& _rxControl );
commit d9695409d8ef0b328963c68da79c3039d5ec307b
Author: Noel Power <noel.power at suse.com>
Date:   Wed Dec 19 15:15:12 2012 +0000

    fix crash for fdo#58306 by avoiding literal assign
    
    OUStringBuffer doesn't handler append ( if it had been previously assigned to "" literal )
    
    Change-Id: Ief4379490a4873fbee4117db5833111943b86334

diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx
index 4128473..5e41425 100644
--- a/basic/source/runtime/step0.cxx
+++ b/basic/source/runtime/step0.cxx
@@ -1171,7 +1171,7 @@ void SbiRuntime::StepARGV()
 // is removed afterwards.
 void SbiRuntime::StepINPUT()
 {
-    OUStringBuffer sin = "";
+    OUStringBuffer sin;
     OUString s;
     char ch = 0;
     SbError err;
commit 86a6acaa60b514a07948ecc8063f5e674dda8f34
Author: Noel Power <noel.power at suse.com>
Date:   Wed Dec 19 13:28:48 2012 +0000

    post OnPrint event ( application & document ) when printing starts fdo#58269
    
    this event used to get posted, somehow it seems it got dropped somewhere along
    the line ( looks like the printer and printer monitor code got reworked )
    
    Change-Id: Ib75ee9e7ecd41614275033d2be2a351785326e24

diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc
index cd1ecdc..7173366 100644
--- a/sfx2/inc/sfx2/sfx.hrc
+++ b/sfx2/inc/sfx2/sfx.hrc
@@ -50,6 +50,7 @@
 #define SFX_EVENT_SAVEASDOC         (EVENT_SFX_START + 6)
 #define SFX_EVENT_ACTIVATEDOC       (EVENT_SFX_START + 7)
 #define SFX_EVENT_DEACTIVATEDOC     (EVENT_SFX_START + 8)
+#define SFX_EVENT_PRINTDOC          (EVENT_SFX_START + 9)
 
 #define SFX_EVENT_LOADFINISHED      (EVENT_SFX_START + 11)
 
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 2139008..e65aefc 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -320,6 +320,7 @@ void SfxPrinterController::jobStarted()
             now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(),
             now.GetDay(), now.GetMonth(), now.GetYear() ) );
 
+        SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_PRINTDOC, GlobalEventConfig::GetEventName( STR_EVENT_PRINTDOC ), mpObjectShell ) );
         // FIXME: how to get all print options incl. AdditionalOptions easily?
         uno::Sequence < beans::PropertyValue > aOpts;
         mpObjectShell->Broadcast( SfxPrintingHint( view::PrintableState_JOB_STARTED, aOpts ) );


More information about the Libreoffice-commits mailing list