[Libreoffice-commits] .: 2 commits - framework/source sfx2/source

Stephan Bergmann sbergmann at kemper.freedesktop.org
Tue May 15 06:33:56 PDT 2012


 framework/source/fwe/helper/titlehelper.cxx |   11 +++++++----
 sfx2/source/doc/sfxbasemodel.cxx            |   14 ++------------
 2 files changed, 9 insertions(+), 16 deletions(-)

New commits:
commit 1d7d99e9aa74cb5ee11649b76e35c5a03263c889
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue May 15 15:29:10 2012 +0200

    Mode (r/o vs r/w) changes can affect title, too
    
    Change-Id: I69ecb9fa157c706c90132e7801def2253529158d

diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index 574a21e..0ab3582 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -198,6 +198,7 @@ void SAL_CALL TitleHelper::notifyEvent(const css::document::EventObject& aEvent)
     throw (css::uno::RuntimeException)
 {
     if ( ! aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("OnSaveAsDone"))
+      && ! aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("OnModeChanged"))
       && ! aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("OnTitleChanged")))
         return;
 
@@ -209,10 +210,12 @@ void SAL_CALL TitleHelper::notifyEvent(const css::document::EventObject& aEvent)
     aLock.clear ();
     // <- SYNCHRONIZED
 
-    if (
-         aEvent.Source != xOwner ||
-         (aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("OnTitleChanged")) && !xOwner.is())
-       )
+    if (aEvent.Source != xOwner
+        || ((aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(
+                 RTL_CONSTASCII_STRINGPARAM("OnModeChanged"))
+             || aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(
+                 RTL_CONSTASCII_STRINGPARAM("OnTitleChanged")))
+            && !xOwner.is()))
     {
         return;
     }
commit a0cd92dbafeec1d2f1400e7841c48cc8c02295ad
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue May 15 15:22:24 2012 +0200

    Cleaned up some OSL_TRACE -> SAL_INFO uses
    
    Change-Id: Ie70be4d3e4f086eaa301295df0bc7d25792d2cd2

diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index b3792d9..fa2e64b 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2988,12 +2988,7 @@ void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Refe
         m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const uno::Reference< document::XDocumentEventListener >*)0 ) );
     if ( pIC )
     {
-#ifdef DBG_UTIL
-        rtl::OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM(
-            "SfxDocumentEvent: "));
-        aTmp.append(rtl::OUStringToOString(aName, RTL_TEXTENCODING_UTF8));
-        OSL_TRACE(aTmp.getStr());
-#endif
+        SAL_INFO("sfx2", "SfxDocumentEvent: " + aName);
 
         document::DocumentEvent aDocumentEvent( (frame::XModel*)this, aName, xController, uno::Any() );
 
@@ -3006,12 +3001,7 @@ void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Refe
     pIC = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const uno::Reference< document::XEventListener >*)0 ) );
     if ( pIC )
     {
-#ifdef DBG_UTIL
-        rtl::OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM(
-            "SfxEvent: "));
-        aTmp.append(rtl::OUStringToOString(aName, RTL_TEXTENCODING_UTF8));
-        OSL_TRACE(aTmp.getStr());
-#endif
+        SAL_INFO("sfx2", "SfxEvent: " + aName);
 
         document::EventObject aEvent( (frame::XModel*)this, aName );
 


More information about the Libreoffice-commits mailing list