summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-02-03 11:49:02 +0000
committerKurt Zenker <kz@openoffice.org>2009-02-03 11:49:02 +0000
commitba3b4a3024b047c906da954301c1cdd7ad7730d0 (patch)
treee83d2f33c9d60a6d43344a47350cb91ac5736dca
parent2606b0819b938d192072d82c4e9ed4238e9e4a4a (diff)
CWS-TOOLING: integrate CWS jl115_OOO310
2009-01-29 13:13:16 +0100 jsk r267121 : #i98596# 2009-01-23 14:50:24 +0100 jl r266821 : #98273# climaker.exe.config prevents using publisher policy 2009-01-23 14:10:51 +0100 jl r266817 : #i98392# wrong use of iterator when removing a factory, which may lead to a crash 2009-01-19 11:36:29 +0100 jl r266484 : #i96690# test extension 2009-01-19 11:32:46 +0100 jl r266483 : #i96690# 2009-01-16 17:09:19 +0100 jl r266439 : #i96690# ignore duplicate path URLs in manifest.xml. These may be introduces by copy/paste and lead to nasty errors 2009-01-16 14:04:00 +0100 jl r266416 : #i92032# increasing minimum version of Java 2009-01-16 10:57:02 +0100 jl r266407 : #i96816# compiler warning breaks build 2009-01-15 16:58:54 +0100 jl r266384 : #i94938# patch from cmc. 2009-01-15 16:35:18 +0100 jl r266383 : #i95838# applying patch 2009-01-15 16:15:58 +0100 jl r266381 : #i70855# #i96102# WaitForMultipleObjects wrong implemented 2009-01-14 12:46:21 +0100 jl r266287 : #i98038# increased assembly versions 2009-01-14 12:44:55 +0100 jl r266285 : #i98038# increased assembly versions 2009-01-13 17:11:20 +0100 jl r266239 : #i98038# new test library for assemblies from 3.0.1
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx6
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx31
-rw-r--r--desktop/test/deployment/options/leaf1mod.oxtbin0 -> 8310 bytes
-rw-r--r--desktop/test/deployment/options/readme.txt5
-rw-r--r--desktop/win32/source/guistdio/guistdio.inc28
5 files changed, 49 insertions, 21 deletions
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index ed5e11a98b..5ad310a33f 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -1009,6 +1009,12 @@ PackageManagerImpl::getDeployedPackages_(
OSL_ENSURE( 0, ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
+ catch (deployment::DeploymentException& exc) {
+ // ignore
+ (void) exc; // avoid warnings
+ OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
}
return comphelper::containerToSequence(packages);
}
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index a1452ee782..8ed0d59f27 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -75,6 +75,7 @@
#include "com/sun/star/deployment/XPackageManager.hpp"
#include <vector>
+#include <stdio.h>
using namespace ::dp_misc;
@@ -251,6 +252,18 @@ public:
using ImplBaseT::disposing;
};
+//Used to find a XPackage with a particular URL
+class XPackage_eq : public std::unary_function<Reference<deployment::XPackage>, bool>
+{
+ OUString m_URL;
+public:
+ explicit XPackage_eq(const OUString & s) : m_URL(s) {}
+ bool operator() (const Reference<deployment::XPackage> & p) const
+ {
+ return m_URL.equals(p->getURL());
+ }
+};
+
//______________________________________________________________________________
BackendImpl::BackendImpl(
Sequence<Any> const & args,
@@ -1362,10 +1375,20 @@ void BackendImpl::PackageImpl::scanBundle(
checkAborted( abortChannel );
- const Reference<deployment::XPackage> xPackage(
- bindBundleItem( url, mediaType, xCmdEnv ) );
- if (xPackage.is())
- bundle.push_back( xPackage );
+ //We make sure that we only create one XPackage for a particular URL.
+ //Sometime programmers insert the same URL several times in the manifest
+ //which may lead to DisposedExceptions.
+ if (bundle.end() == std::find_if(bundle.begin(), bundle.end(), XPackage_eq(url)))
+ {
+ const Reference<deployment::XPackage> xPackage(
+ bindBundleItem( url, mediaType, xCmdEnv ) );
+ if (xPackage.is())
+ bundle.push_back( xPackage );
+ }
+ else
+ {
+ fprintf(stderr, "manifest.xml contains a duplicate entry!\n");
+ }
}
if (descrFile.getLength() > 0)
diff --git a/desktop/test/deployment/options/leaf1mod.oxt b/desktop/test/deployment/options/leaf1mod.oxt
new file mode 100644
index 0000000000..d5d9fe6896
--- /dev/null
+++ b/desktop/test/deployment/options/leaf1mod.oxt
Binary files differ
diff --git a/desktop/test/deployment/options/readme.txt b/desktop/test/deployment/options/readme.txt
index da57620397..9879a72cef 100644
--- a/desktop/test/deployment/options/readme.txt
+++ b/desktop/test/deployment/options/readme.txt
@@ -8,6 +8,11 @@ extensionoptions.jar into the extension.
leaf1.oxt: Defines a leaf under the node WriterNode
================================================================================
+leaf1mod.oxt: Defines a leaf under the node WriterNode
+
+It has a douplicate entry in the manifest.xml (OptionsDialog.xcu). This would cause a DisposedException when uninstalling on OOo 3.0 and prevent the extension from being uninstalled. This is actually a bug of the extensions. However, the error is difficult to investigate. Therefore this was fixed to make OOo more robust (i96690).
+================================================================================
+
leaf2.oxt: Defines a leaf under a node that has a name which requires special
"xml encoding". The name is "My Writer's & Settings". The node is not assigned
to a Module and the Node/AllModules property is not true. This is a typical
diff --git a/desktop/win32/source/guistdio/guistdio.inc b/desktop/win32/source/guistdio/guistdio.inc
index 3cd650ad7c..c8170e6948 100644
--- a/desktop/win32/source/guistdio/guistdio.inc
+++ b/desktop/win32/source/guistdio/guistdio.inc
@@ -45,6 +45,8 @@
#include <stdlib.h>
#include <systools/win32/uwinapi.h>
+#include <stdio.h>
+
//---------------------------------------------------------------------------
// Thread that reads from child process standard output pipe
//---------------------------------------------------------------------------
@@ -214,9 +216,7 @@ DWORD WINAPI WaitForUIThread( LPVOID pParam )
#ifndef UNOPKG
if ( !_tgetenv( TEXT("UNOPKG") ) )
WaitForInputIdle( hProcess, INFINITE );
- else
#endif
- WaitForSingleObject( hProcess, INFINITE );
return 0;
}
@@ -353,17 +353,19 @@ int _tmain( int, _TCHAR ** )
HANDLE hWaitForUIThread = CreateThread( NULL, 0, WaitForUIThread, (LPVOID)aProcessInfo.hProcess, 0, &dwWaitForUIThreadId );
DWORD dwWaitResult;
- bool bDetach = false;
- int nOpenPipes = 3;
HANDLE hObjects[] =
{
hTargetProcess,
hWaitForUIThread,
- hInputThread,
hOutputThread,
hErrorThread
};
+ #ifdef GUISTDIO_KEEPRUNNING
+ dwWaitResult = WaitForMultipleObjects( elementsof(hObjects), hObjects, TRUE, INFINITE );
+ #else
+ bool bDetach = false;
+ int nOpenPipes = 2;
do
{
dwWaitResult = WaitForMultipleObjects( elementsof(hObjects), hObjects, FALSE, INFINITE );
@@ -374,9 +376,8 @@ int _tmain( int, _TCHAR ** )
case WAIT_OBJECT_0 + 1: // The child process entered input idle
bDetach = true;
break;
- case WAIT_OBJECT_0 + 2: // The remote end of stdin pipe was closed
- case WAIT_OBJECT_0 + 3: // The remote end of stdout pipe was closed
- case WAIT_OBJECT_0 + 4: // The remote end of stderr pipe was closed
+ case WAIT_OBJECT_0 + 2: // The remote end of stdout pipe was closed
+ case WAIT_OBJECT_0 + 3: // The remote end of stderr pipe was closed
bDetach = --nOpenPipes <= 0;
break;
default: // Something went wrong
@@ -385,15 +386,8 @@ int _tmain( int, _TCHAR ** )
}
} while( !bDetach );
- //Even if the child process terminates it is not garanteed that all three pipe threads terminate
- //as tests have proven. The loop above will be typically terminate because the process has
- //terminated. Then the pipe threads may not have read all data from the pipes yet. When we close
- //the threads then data may be lost. For example running unopkg without arguments shall print out
- //the help text. Without this workaround some text would be missing.
- //ifdef only for unopkg
-#ifdef UNOPKG
- Sleep(1000);
-#endif
+#endif
+
CloseHandle( hOutputThread );
CloseHandle( hErrorThread );
CloseHandle( hInputThread );