[ooo-build-commit] .: patches/dev300

Muthu Subramanian sumuthu at kemper.freedesktop.org
Thu Jul 1 01:35:53 PDT 2010


 patches/dev300/desktop-cmd-bulk-conversion.diff |   33 ++++++++++++++++--------
 1 file changed, 22 insertions(+), 11 deletions(-)

New commits:
commit d14868784e3b0c9665dda13244d408485da53b3f
Author: Muthu Subramanian K <sumuthu at novell.com>
Date:   Thu Jul 1 14:04:15 2010 +0530

    Updated with fridrich's patch for replacing sleep (win builds)
    
    * patches/dev300/desktop-cmd-bulk-conversion.diff

diff --git a/patches/dev300/desktop-cmd-bulk-conversion.diff b/patches/dev300/desktop-cmd-bulk-conversion.diff
index c572fe1..293b3c0 100644
--- a/patches/dev300/desktop-cmd-bulk-conversion.diff
+++ b/patches/dev300/desktop-cmd-bulk-conversion.diff
@@ -233,7 +233,7 @@ diff -upr desktop/source/app/officeipcthread.hxx desktop/source/app/officeipcthr
  #include "dispatchwatcher.hxx"
  #include <rtl/ustring.hxx>
  #include <tools/string.hxx>
-@@ -48,13 +54,14 @@
+@@ -48,13 +54,15 @@
  #include <com/sun/star/util/XURLTransformer.hpp>
  #include <com/sun/star/document/MacroExecMode.hpp>
  #include <com/sun/star/document/UpdateDocMode.hpp>
@@ -243,16 +243,27 @@ diff -upr desktop/source/app/officeipcthread.hxx desktop/source/app/officeipcthr
  #include <comphelper/mediadescriptor.hxx>
  
  #include <vector>
++#include <osl/thread.hxx>
  
 -using namespace ::rtl;
 +using ::rtl::OUString;
  using namespace ::osl;
  using namespace ::com::sun::star::uno;
  using namespace ::com::sun::star::util;
-@@ -80,6 +87,32 @@ struct DispatchHolder
+@@ -80,6 +88,42 @@ struct DispatchHolder
      Reference< XDispatch > xDispatch;
  };
  
++// Temporary code
++static void impl_sleep( sal_uInt32 nSec )
++{
++    TimeValue aTime;
++    aTime.Seconds = nSec;
++    aTime.Nanosec = 0;
++
++    osl::Thread::wait( aTime );
++}
++
 +static String impl_GetFilterFromExt( OUString aUrl, SfxFilterFlags nFlags, 
 +                                        String aAppl )
 +{
@@ -282,7 +293,7 @@ diff -upr desktop/source/app/officeipcthread.hxx desktop/source/app/officeipcthr
  Mutex* DispatchWatcher::pWatcherMutex = NULL;
  
  Mutex& DispatchWatcher::GetMutex()
-@@ -151,7 +188,8 @@ sal_Bool DispatchWatcher::executeDispatc
+@@ -151,7 +195,8 @@ sal_Bool DispatchWatcher::executeDispatc
  
          // we need more properties for a print/print to request
          if ( aDispatchRequest.aRequestType == REQUEST_PRINT ||
@@ -292,7 +303,7 @@ diff -upr desktop/source/app/officeipcthread.hxx desktop/source/app/officeipcthr
              nCount++;
  
          Sequence < PropertyValue > aArgs( nCount );
-@@ -161,7 +199,8 @@ sal_Bool DispatchWatcher::executeDispatc
+@@ -161,7 +206,8 @@ sal_Bool DispatchWatcher::executeDispatc
          aArgs[0].Value <<= ::rtl::OUString::createFromAscii("private:OpenEvent");
  
          if ( aDispatchRequest.aRequestType == REQUEST_PRINT ||
@@ -302,7 +313,7 @@ diff -upr desktop/source/app/officeipcthread.hxx desktop/source/app/officeipcthr
          {
              aArgs[1].Name = ::rtl::OUString::createFromAscii("ReadOnly");
              aArgs[2].Name = ::rtl::OUString::createFromAscii("OpenNewView");
-@@ -196,7 +235,8 @@ sal_Bool DispatchWatcher::executeDispatc
+@@ -196,7 +242,8 @@ sal_Bool DispatchWatcher::executeDispatc
          ::rtl::OUString aTarget( RTL_CONSTASCII_USTRINGPARAM("_default") );
  
          if ( aDispatchRequest.aRequestType == REQUEST_PRINT ||
@@ -312,7 +323,7 @@ diff -upr desktop/source/app/officeipcthread.hxx desktop/source/app/officeipcthr
          {
              // documents opened for printing are opened readonly because they must be opened as a new document and this
              // document could be open already
-@@ -214,7 +254,6 @@ sal_Bool DispatchWatcher::executeDispatc
+@@ -214,7 +261,6 @@ sal_Bool DispatchWatcher::executeDispatc
              // hidden documents should never be put into open tasks
              aTarget = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") );
          }
@@ -320,7 +331,7 @@ diff -upr desktop/source/app/officeipcthread.hxx desktop/source/app/officeipcthr
          // load the document ... if they are loadable!
          // Otherwise try to dispatch it ...
          Reference < XPrintable > xDoc;
-@@ -361,24 +400,87 @@ sal_Bool DispatchWatcher::executeDispatc
+@@ -361,24 +407,87 @@ sal_Bool DispatchWatcher::executeDispatc
                  OfficeIPCThread::RequestsCompleted( 1 );
              }
              else if ( aDispatchRequest.aRequestType == REQUEST_PRINT ||
@@ -421,23 +432,23 @@ diff -upr desktop/source/app/officeipcthread.hxx desktop/source/app/officeipcthr
                  }
                  else
                  {
-@@ -442,9 +544,15 @@ sal_Bool DispatchWatcher::executeDispatc
+@@ -442,9 +551,15 @@ sal_Bool DispatchWatcher::executeDispatc
      // implementation via statusChanged!!
      if ( bEmpty && !bNoTerminate /*m_aRequestContainer.empty()*/ )
      {
 +        // Delay give a chance for threads to complete work
-+        sleep(2);
++        impl_sleep(2);
 +
          // We have to check if we have an open task otherwise we have to shutdown the office.
          Reference< XFramesSupplier > xTasksSupplier( xDesktop, UNO_QUERY );
          aGuard.clear();
 +        
 +        // Delay give a chance for threads to complete work
-+        sleep(1);
++        impl_sleep(1);
  
          Reference< XElementAccess > xList( xTasksSupplier->getFrames(), UNO_QUERY );
  
-@@ -470,7 +578,7 @@ throw(::com::sun::star::uno::RuntimeExce
+@@ -470,7 +585,7 @@ throw(::com::sun::star::uno::RuntimeExce
  void SAL_CALL DispatchWatcher::dispatchFinished( const DispatchResultEvent& ) throw( RuntimeException )
  {
      osl::ClearableMutexGuard aGuard( GetMutex() );


More information about the ooo-build-commit mailing list