--- ucb/prj/build.lst	18 Oct 2005 08:45:24 -0000	1.20
+++ ucb/prj/build.lst	13 Mar 2006 10:55:34 -0000
@@ -14,2 +14,3 @@ uc	ucb\source\ucp\package		nmake	-	all	u
 uc	ucb\source\ucp\tdoc			nmake	-	all	uc_tdoc NULL
 uc	ucb\source\ucp\expand		nmake	-	all	uc_expand NULL
+uc	ucb\source\ucp\odma			nmake	-	w	uc_odma NULL
--- ucb/source/ucp/odma/odma.h	25 Aug 2003 13:00:04 -0000	1.4
+++ ucb/source/ucp/odma/odma.h	13 Mar 2006 10:55:34 -0000
@@ -1 +1,315 @@
-#error	"odma.h: This file is not included in OpenOffice.org (yet). Please download the latest version at http://www.infonuovo.com/odma/downloads"
+/* odma.h - Definitions, prototypes, etc. for Open Document Managment API
+	(ODMA) version 2.0.
+
+	COPYRIGHT (C) 1994, 1995
+	AIIM International
+	All Right Reserved
+*/
+
+#ifndef ODMA_H
+#define ODMA_H
+
+/* Type definitions */
+typedef LPVOID ODMHANDLE;
+typedef LPSTR (*ODMSAVEASCALLBACK)(DWORD dwEnvData, LPSTR lpszFormat, LPVOID pInstanceData);
+typedef int ODMSTATUS;
+
+/* Constants */
+#define ODM_API_VERSION			200		/* Version of the API */
+
+#ifdef WIN32
+	#define ODM_DOCID_MAX		255		/* Win32 */
+
+#elif defined( _WINDOWS_ ) || defined( _MSDOS )
+	#define ODM_DOCID_MAX		80		/* Windows 3.x */
+
+#else
+	#define ODM_DOCID_MAX		255		/* Other platforms */
+#endif
+
+#define ODM_DMSID_MAX			9		/* Max length of a DMS ID including the 
+										/* terminating NULL character.  */
+
+#define ODM_APPID_MAX			16		/* Max length of a application ID including
+										/* the terminating NULL character.  */
+
+// ODMA 2.0
+#define ODM_QUERYID_MAX			255		// Max length of a query ID including
+													// the terminating NULL character.
+
+#define ODM_FORMAT_MAX			81 // Max length of a format including
+													// the terminating NULL character.
+
+// Maximum length of a filename returned by ODMA including the terminating
+//	NULL character.  Platform dependent.
+
+#ifdef WIN32
+	#define ODM_FILENAME_MAX	255		/* Win32 */
+
+#elif defined( _WINDOWS_ ) || defined( _MSDOS )
+	#define ODM_FILENAME_MAX	128		/* Windows 3.x */
+
+#elif defined( unix ) || defined( _UNIX )
+	#define ODM_FILENAME_MAX	1024	/* Unix */
+
+#else
+	#define ODM_FILENAME_MAX	255		/* Other platforms */
+#endif
+
+
+/* Common format type names */
+#define ODM_FORMAT_TEXT	"Text"
+#define ODM_FORMAT_RTF	"Rich text format"
+#define ODM_FORMAT_DCA	"DCA RFT"		/* IBM DCA Rich Format Text */
+#define ODM_FORMAT_TIFF	"Tiff"
+#define ODM_FORMAT_GIF	"Gif"				/* Compuserve Graphics Interchange Format */
+#define ODM_FORMAT_BMP	"Windows bitmap"
+#define ODM_FORMAT_PCX	"PCX"
+#define ODM_FORMAT_CGM	"CGM"				/* Computer Graphics Metafile */
+#define ODM_FORMAT_EXE	"Executable file"
+#define ODM_FORMAT_PCL	"PCL"				/* HP Printer Control Language */
+#define ODM_FORMAT_PS	"PostScript"
+
+
+/* Error returns */
+#define ODM_SUCCESS			0		// Success!
+#define ODM_E_FAIL			1		/* Unspecified failure */
+#define ODM_E_CANCEL		2		/* Action was cancelled at user's request */
+#define ODM_E_NODMS			3		/* DMS not registered */
+#define ODM_E_CANTINIT		4		/* DMS failed to initalize */
+#define ODM_E_VERSION		5		/* DMS doesn't support the requested 
+									           version of ODMA */
+#define ODM_E_APPSELECT		6        /* User has indicated that he wants to use 
+                                       the application's file selection 
+                                       capabilities rather than those of the 
+                                       DMS. */
+#define ODM_E_USERINT		7        /* Requested action cannot be performed 
+                                       without user interaction, but silent 
+                                       mode was specified. */
+#define ODM_E_HANDLE		8        /* The DMHANDLE argument was invalid. */
+#define ODM_E_ACCESS		9        /* User does not have requested access 
+                                       rights to specified document. */
+#define ODM_E_INUSE			10        /* Document is currently in use and cannot 
+                                       be accessed in specified mode. */
+#define ODM_E_DOCID			11        /* Invalid document ID */
+#define ODM_E_OPENMODE		12        /* The specified action is incompatible 
+                                       with the mode in which the document was
+                                       opened. */
+#define ODM_E_NOOPEN		13        /* The specified document is not open. */
+#define ODM_E_ITEM			14        /* Invalid item specifier. */
+#define ODM_E_OTHERAPP		15        /* Selected document was for another app. */
+#define ODM_E_NOMOREDATA	16		/* No more data is available */
+#define ODM_E_PARTIALSUCCESS 17		/* */
+// Additional Error code from ODMA 2.0
+#define ODM_E_REQARG		18		/* */
+#define ODM_E_NOSUPPORT		19		/* */
+#define ODM_E_TRUNCATED		20		/* */
+#define ODM_E_INVARG  21
+#define ODM_E_OFFLINE  22		/* */
+
+
+// ODMOpenDoc modes
+#define ODM_MODIFYMODE		1        /* Open document in a modifiable mode. */
+#define ODM_VIEWMODE		2        /* Open document in non-modifiable mode. */
+// ODMA 2.0
+#define ODM_REFCOPY			3
+
+
+// Actions for ODMActivate
+#define ODM_NONE			0        /* No specific action is requested.  */
+#define ODM_DELETE			1        /* Delete the specified document.  */
+#define ODM_SHOWATTRIBUTES	2        /* Display the specified document's profile 
+                                       or attributes. */
+#define ODM_EDITATTRIBUTES	3        /* Edit the specified document's profile or
+                                       attributes. */
+#define ODM_VIEWDOC			4        /* Display the specified document in a 
+                                       viewer window. */
+#define ODM_OPENDOC			5        /* Open the specified document in its 
+                                       native application.  */
+// ODMA 2.0
+#define ODM_NEWDOC			6
+#define ODM_CHECKOUT		7
+#define ODM_CANCELCHECKOUT	8
+#define ODM_CHECKIN			9
+#define ODM_SHOWHISTORY		10
+
+
+// Item selectors for ODMGetDocInfo and ODMSetDocInfo
+#define ODM_AUTHOR			1        /* Author of the document. */
+#define ODM_NAME			2        /* Descriptive name of the document.  */
+#define ODM_TYPE			3        /* Type of the document.  */
+#define ODM_TITLETEXT		4        /* Suggested text to display in the 
+                                       document window's title bar. */
+#define ODM_DMS_DEFINED		5        /* DMS defined data. */
+#define ODM_CONTENTFORMAT	6        /* String describing document's format */
+// ODMA 2.0
+#define ODM_ALTERNATE_RENDERINGS	7
+#define ODM_CHECKEDOUTBY	8
+#define ODM_CHECKOUTCOMMENT	9
+#define ODM_CHECKOUTDATE	10
+#define ODM_CREATEDBY		11
+#define ODM_CREATEDDATE		12
+#define ODM_DOCID_LATEST	13
+#define ODM_DOCID_RELEASED	14
+#define ODM_DOCVERSION		15
+#define ODM_DOCVERSION_LATEST	16
+#define ODM_DOCVERSION_RELEASED	17
+#define ODM_LOCATION		18
+#define ODM_KEYWORDS		19
+#define ODM_LASTCHECKINBY	20
+#define ODM_LASTCHECKINDATE	21
+#define ODM_MODIFYDATE		22
+#define ODM_MODIFYDATE_LATEST	23
+#define ODM_MODIFYDATE_RELEASED	24
+#define ODM_OWNER			25
+#define ODM_SUBJECT			26
+#define ODM_TITLETEXT_RO	27
+#define ODM_URL				28
+
+
+// Item selectors for ODMQueryCapability ODMA 2.0
+#define ODM_QC_ACTIVATE				1
+#define ODM_QC_CLOSEDOC				2
+#define ODM_QC_CLOSEDOCEX			3
+#define ODM_QC_GETALTERNATECONTENT	4
+#define ODM_QC_GETDMSINFO			5
+#define ODM_QC_GETDOCINFO			6
+#define ODM_QC_GETDOCRELATION		7
+#define ODM_QC_GETLEADMONIKER		8
+#define ODM_QC_NEWDOC				9
+#define ODM_QC_OPENDOC				10
+#define ODM_QC_QUERYCLOSE			11
+#define ODM_QC_QUERYEXECUTE			12
+#define ODM_QC_QUERYGETRESULTS		13
+#define ODM_QC_SAVEAS				14
+#define ODM_QC_SAVEASEX				15
+#define ODM_QC_SAVEDOC				16
+#define ODM_QC_SAVEDOCEX			17
+#define ODM_QC_SELECTDOC			18
+#define ODM_QC_SELECTDOCEX			19
+#define ODM_QC_SETALTERNATECONTENT	20
+#define ODM_QC_SETDOCEVENT			21
+#define ODM_QC_SETDOCRELATION		22
+#define ODM_QC_SETDOCINFO			23
+
+
+// Misc. modes, flags
+#define ODM_SILENT			16        /* Don't interact with the user while
+                                       fulfilling this request. */
+//ODMA 2.0
+#define ODM_VERSION_SAME	1 
+#define ODM_VERSION_MAJOR	2
+#define ODM_VERSION_MINOR	4
+#define ODM_VERSION_CHANGED	8 
+#define ODM_ALT_DELETE		32
+
+//ODMA 2.0 DMS Info Flags 
+#define ODM_EXT_QUERY		1	
+#define ODM_EXT_WORKFLOW 	2	
+
+// Flags for Query Interface
+#define ODM_ALL				1		// All DMS's should be searched
+#define ODM_SPECIFIC		2		// Only specific DMS's should be searched
+
+
+// Function prototypes
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ODMSTATUS WINAPI ODMRegisterApp(ODMHANDLE FAR *pOdmHandle, WORD version,
+	LPSTR lpszAppId, DWORD dwEnvData, LPVOID pReserved);
+
+void WINAPI ODMUnRegisterApp(ODMHANDLE odmHandle);
+
+ODMSTATUS WINAPI ODMSelectDoc(ODMHANDLE odmHandle, LPSTR lpszDocId,
+	LPDWORD pdwFlags);
+
+ODMSTATUS WINAPI ODMOpenDoc(ODMHANDLE odmHandle, DWORD flags,
+	LPSTR lpszDocId, LPSTR lpszDocLocation);
+
+ODMSTATUS WINAPI ODMSaveDoc(ODMHANDLE odmHandle, LPSTR lpszDocId,
+	LPSTR lpszNewDocId);
+
+ODMSTATUS WINAPI ODMCloseDoc(ODMHANDLE odmHandle, LPSTR lpszDocId,
+	DWORD activeTime, DWORD pagesPrinted, LPVOID sessionData, WORD dataLen);
+
+ODMSTATUS WINAPI ODMNewDoc(ODMHANDLE odmHandle, LPSTR lpszDocId,
+	DWORD dwFlags, LPSTR lpszFormat, LPSTR lpszDocLocation);
+
+ODMSTATUS WINAPI ODMSaveAs(ODMHANDLE odmHandle, LPSTR lpszDocId,
+	LPSTR lpszNewDocId, LPSTR lpszFormat, ODMSAVEASCALLBACK pcbCallBack,
+	LPVOID pInstanceData);
+
+ODMSTATUS WINAPI ODMActivate(ODMHANDLE odmHandle, WORD action,
+	LPSTR lpszDocId);
+
+ODMSTATUS WINAPI ODMGetDocInfo(ODMHANDLE odmHandle, LPSTR lpszDocId,
+	WORD item, LPSTR lpszData, WORD dataLen);
+
+ODMSTATUS WINAPI ODMSetDocInfo(ODMHANDLE odmHandle, LPSTR lpszDocId,
+	WORD item, LPSTR lpszData);
+
+ODMSTATUS WINAPI ODMGetDMSInfo(ODMHANDLE odmHandle, LPSTR lpszDmsId,
+	LPWORD pwVerNo, LPDWORD pdwExtensions);
+
+/* Query Enhancements */
+WORD WINAPI ODMGetDMSCount();
+
+WORD WINAPI ODMGetDMSList( LPSTR buffer, WORD buffer_size );
+
+ODMSTATUS WINAPI ODMGetDMS( LPCSTR lpszAppId, LPSTR lpszDMSId );
+
+ODMSTATUS WINAPI ODMSetDMS( LPCSTR lpszAppId, LPCSTR lpszDMSId );
+
+ODMSTATUS WINAPI ODMQueryExecute(ODMHANDLE odmHandle, LPCSTR lpszQuery,
+								 DWORD flags, LPCSTR lpszDMSList, LPSTR queryId );
+
+ODMSTATUS WINAPI ODMQueryGetResults(ODMHANDLE odmHandle, LPCSTR queryId,
+									LPSTR lpszDocId, LPSTR lpszDocName, WORD docNameLen,
+									WORD *docCount );
+
+ODMSTATUS WINAPI ODMQueryClose(ODMHANDLE odmHandle, LPCSTR queryId );
+
+/* ODMA 2.0 Enhancements */
+ODMSTATUS WINAPI ODMCloseDocEx(ODMHANDLE odmHandle, LPSTR lpszDocId,
+							LPDWORD pdwFlags, DWORD activeTime, DWORD pagesPrinted,
+							LPVOID sessionData, WORD dataLen);
+
+ODMSTATUS WINAPI ODMSaveAsEx(ODMHANDLE odmHandle, LPSTR lpszDocId,
+							LPSTR lpszNewDocId, LPSTR lpszFormat, ODMSAVEASCALLBACK pcbCallBack,
+							LPVOID pInstanceData, LPDWORD pdwFlags);
+
+ODMSTATUS WINAPI ODMSaveDocEx(ODMHANDLE odmHandle, LPSTR lpszDocId,
+							LPSTR lpszNewDocId,	LPDWORD pdwFlags);
+
+ODMSTATUS WINAPI ODMSelectDocEx(ODMHANDLE odmHandle, LPSTR lpszDocIds,
+							LPWORD pwDocIdsLen, LPWORD pwDocCount, LPDWORD pdwFlags,
+							LPSTR lpszFormatFilter);
+
+ODMSTATUS WINAPI ODMQueryCapability(ODMHANDLE odmHandle, LPCSTR lpszDmsId,
+							DWORD function, DWORD item, DWORD flags);
+
+ODMSTATUS WINAPI ODMSetDocEvent(ODMHANDLE odmHandle, LPSTR lpszDocId,
+							DWORD flags, DWORD event, LPVOID lpData, DWORD dwDataLen,
+							LPSTR lpszComment);
+
+ODMSTATUS WINAPI ODMGetAlternateContent(ODMHANDLE odmHandle, LPSTR lpszDocId,
+							LPDWORD pdwFlags, LPSTR lpszFormat, LPSTR lpszDocLocation);
+
+ODMSTATUS WINAPI ODMSetAlternateContent(ODMHANDLE odmHandle, LPSTR lpszDocId,
+							LPDWORD pdwFlags, LPSTR lpszFormat, LPSTR lpszDocLocation);
+
+ODMSTATUS WINAPI ODMGetDocRelation(ODMHANDLE odmHandle, LPSTR lpszDocId,
+							LPDWORD pdwFlags, LPSTR lpszLinkedId, LPSTR lpszFormat,
+							LPSTR lpszPreviousId);
+
+ODMSTATUS WINAPI ODMSetDocRelation(ODMHANDLE odmHandle, LPSTR lpszDocId,
+							LPDWORD pdwFlags, LPSTR lpszLinkedId, LPSTR lpszFormat,
+							LPSTR lpszPreviousId);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- ucb/source/ucp/odma/odma_content.cxx	9 Sep 2005 15:50:15 -0000	1.4
+++ ucb/source/ucp/odma/odma_content.cxx	13 Mar 2006 10:55:34 -0000
@@ -297,6 +297,8 @@ uno::Any SAL_CALL Content::execute(
	    star::ucb::CommandAbortedException,
	    uno::RuntimeException )
 {
+    // Avoid unreferenced parameter warning
+    CommandId = CommandId;
     uno::Any aRet;

     if ( aCommand.Name.equalsAsciiL(
@@ -583,8 +583,9 @@ uno::Any SAL_CALL Content::execute(
 
 				sal_Char* lpszNewDocId = new sal_Char[ODM_DOCID_MAX];
+				::rtl::OString sDocId = ::rtl::OUStringToOString(aTransferInfo.NewTitle,RTL_TEXTENCODING_ASCII_US);
 				void *pData = NULL;
 				DWORD dwFlags = ODM_SILENT;
 				ODMSTATUS odm = NODMSaveAsEx(ContentProvider::getHandle(),
-											 NULL, // means it is saved the first time
+											 const_cast<sal_Char*>(sDocId.getStr()),
 											 lpszNewDocId,
 											 pExtension,
@@ -598,5 +599,5 @@ uno::Any SAL_CALL Content::execute(
 					dwFlags = 0;
 					odm = NODMSaveAsEx(ContentProvider::getHandle(),
-											 NULL, // means it is saved the first time
+											 const_cast<sal_Char*>(sDocId.getStr()),
 											 lpszNewDocId,
 											 pExtension,
@@ -629,9 +631,9 @@ uno::Any SAL_CALL Content::execute(
 
 				}
 				else if ( odm == ODM_E_CANCEL)
-					ODMSTATUS odm = NODMActivate(ContentProvider::getHandle(),
-												 ODM_DELETE,
-												 lpszNewDocId);
+					odm = NODMActivate(ContentProvider::getHandle(),
+							   ODM_DELETE,
+							   lpszNewDocId);
 
 				delete lpszNewDocId;
 			}
@@ -676,6 +678,8 @@
 void SAL_CALL Content::abort( sal_Int32 CommandId )
     throw( uno::RuntimeException )
 {
+	// Avoid unreferenced formal parameter warning
+	CommandId = CommandId;
 	// @@@ Implement logic to abort running commands, if this makes
 	//     sense for your content.
 }
@@ -911,7 +915,8 @@
 //=========================================================================
 uno::Reference< sdbc::XRow > Content::getPropertyValues(
             const uno::Sequence< beans::Property >& rProperties,
-            const uno::Reference< star::ucb::XCommandEnvironment >& xEnv )
+            // Avoid unreferenced formal parameter warning
+            const uno::Reference< star::ucb::XCommandEnvironment >& /* xEnv */ )
 {
 	osl::Guard< osl::Mutex > aGuard( m_aMutex );
 	return getPropertyValues( m_xSMgr,
@@ -926,7 +930,8 @@
 //=========================================================================
 uno::Sequence< uno::Any > Content::setPropertyValues(
             const uno::Sequence< beans::PropertyValue >& rValues,
-            const uno::Reference< star::ucb::XCommandEnvironment >& xEnv )
+            // Avoid unreferenced formal parameter warning
+            const uno::Reference< star::ucb::XCommandEnvironment >& /* xEnv */ )
 {
 	osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex );
 
@@ -1231,6 +1238,6 @@
 			osl::Guard< osl::Mutex > aGuard( m_aMutex );
 			// first we have to check if we could change the property inside the DMS
 			::rtl::OString sDocInfoValue = ::rtl::OUStringToOString(sNewValue,RTL_TEXTENCODING_ASCII_US);
-			WORD nDocInfo;
+			WORD nDocInfo = 0;
 			if(&_rsMemberValue == &m_aProps->m_sTitle)
 				nDocInfo = ODM_TITLETEXT;
 			else if(&_rsMemberValue == &m_aProps->m_sAuthor)
--- ucb/source/ucp/odma/odma_content.hxx	9 Sep 2005 15:50:31 -0000	1.4
+++ ucb/source/ucp/odma/odma_content.hxx	13 Mar 2006 10:55:34 -0000
@@ -72,5 +72,5 @@ namespace odma
 // UNO service name for the content.
 #define ODMA_CONTENT_SERVICE_NAME \
-							"com.sun.star.ucb.OdmaContent"
+							"com.sun.star.ucb.ODMAContent"
 
 //=========================================================================
--- ucb/source/ucp/odma/odma_contentcaps.cxx
+++ ucb/source/ucp/odma/odma_contentcaps.cxx
@@ -89,7 +89,8 @@
 
 // virtual
 uno::Sequence< beans::Property > Content::getProperties(
-             const uno::Reference< star::ucb::XCommandEnvironment > & xEnv )
+             // Avoid unreferenced formal parameter warning
+             const uno::Reference< star::ucb::XCommandEnvironment > & /* xEnv */ )
 {
 	// @@@ Add additional properties...
 
@@ -190,7 +190,8 @@
 //=========================================================================
 // virtual
 uno::Sequence< star::ucb::CommandInfo > Content::getCommands(
-            const uno::Reference< star::ucb::XCommandEnvironment > & xEnv )
+            // Avoid unreferenced formal parameter warning
+            const uno::Reference< star::ucb::XCommandEnvironment > & /* xEnv */ )
 {
 	// @@@ Add additional commands...
 
--- ucb/source/ucp/odma/odma_datasupplier.hxx	2005-09-09 15:51:37.000000000 +0000
+++ ../build/src680-m178/ucb/source/ucp/odma/odma_datasupplier.hxx	2006-07-31 13:56:07.927625400 +0000
@@ -56,22 +56,22 @@
 				  sal_Int32 nOpenMode );
 	virtual ~DataSupplier();
 
-	virtual rtl::OUString queryContentIdentifierString( sal_uInt32 nIndex );
+	virtual rtl::OUString queryContentIdentifierString( sal_Int32 nIndex );
 	virtual com::sun::star::uno::Reference<
 				com::sun::star::ucb::XContentIdentifier >
-	queryContentIdentifier( sal_uInt32 nIndex );
+	queryContentIdentifier( sal_Int32 nIndex );
 	virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContent >
-	queryContent( sal_uInt32 nIndex );
+	queryContent( sal_Int32 nIndex );
 
-	virtual sal_Bool getResult( sal_uInt32 nIndex );
+	virtual sal_Bool getResult( sal_Int32 nIndex );
 
-	virtual sal_uInt32 totalCount();
-	virtual sal_uInt32 currentCount();
+	virtual sal_Int32 totalCount();
+	virtual sal_Int32 currentCount();
 	virtual sal_Bool isCountFinal();
 
 	virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRow >
-	queryPropertyValues( sal_uInt32 nIndex  );
-	virtual void releasePropertyValues( sal_uInt32 nIndex );
+	queryPropertyValues( sal_Int32 nIndex  );
+	virtual void releasePropertyValues( sal_Int32 nIndex );
 
 	virtual void close();
 
--- ucb/source/ucp/odma/odma_datasupplier.cxx	2005-09-09 15:51:22.000000000 +0000
+++ ../build/src680-m178/ucb/source/ucp/odma/odma_datasupplier.cxx	2006-07-31 13:59:16.599500400 +0000
@@ -167,11 +167,11 @@
 
 //=========================================================================
 // virtual
-::rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
+::rtl::OUString DataSupplier::queryContentIdentifierString( sal_Int32 nIndex )
 {
 	osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
 
-	if ( nIndex < m_pImpl->m_aResults.size() )
+	if ( nIndex < (sal_Int32) m_pImpl->m_aResults.size() )
 	{
 		::rtl::OUString aId = m_pImpl->m_aResults[ nIndex ]->aId;
 		if ( aId.getLength() )
@@ -197,11 +197,11 @@
 //=========================================================================
 // virtual
 Reference< XContentIdentifier > DataSupplier::queryContentIdentifier(
-														sal_uInt32 nIndex )
+														sal_Int32 nIndex )
 {
 	osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
 
-	if ( nIndex < m_pImpl->m_aResults.size() )
+	if ( nIndex < (sal_Int32) m_pImpl->m_aResults.size() )
 	{
 		Reference< XContentIdentifier > xId
 								= m_pImpl->m_aResults[ nIndex ]->xId;
@@ -224,11 +224,11 @@
 
 //=========================================================================
 // virtual
-Reference< XContent > DataSupplier::queryContent( sal_uInt32 nIndex )
+Reference< XContent > DataSupplier::queryContent( sal_Int32 nIndex )
 {
 	osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
 
-	if ( nIndex < m_pImpl->m_aResults.size() )
+	if ( nIndex < (sal_Int32) m_pImpl->m_aResults.size() )
 	{
 		Reference< XContent > xContent
 								= m_pImpl->m_aResults[ nIndex ]->xContent;
@@ -259,11 +259,11 @@
 
 //=========================================================================
 // virtual
-sal_Bool DataSupplier::getResult( sal_uInt32 nIndex )
+sal_Bool DataSupplier::getResult( sal_Int32 nIndex )
 {
 	osl::ClearableGuard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
 
-	if ( m_pImpl->m_aResults.size() > nIndex )
+	if ( (sal_Int32) m_pImpl->m_aResults.size() > nIndex )
 	{
 		// Result already present.
 		return sal_True;
@@ -278,10 +278,11 @@
 
 	sal_uInt32 nOldCount = m_pImpl->m_aResults.size();
 	sal_Bool bFound = sal_False;
-	sal_uInt32 nPos = nOldCount;
 
 	// @@@ Obtain data and put it into result list...
 /*
+	sal_uInt32 nPos = nOldCount;
+
 	while ( m_pImpl->m_aFolder.next( m_pImpl->m_aIterator ) )
 	{
 		m_pImpl->m_aResults.push_back(
@@ -319,7 +320,7 @@
 
 	
 	::rtl::OUString sContentType(RTL_CONSTASCII_USTRINGPARAM(ODMA_CONTENT_TYPE));
-	sal_uInt32 nCurrentCount = 0;
+	sal_Int32 nCurrentCount = 0;
 	do
 	{
 		if(nCount >= nMaxCount)
@@ -374,7 +375,7 @@
 
 //=========================================================================
 // virtual
-sal_uInt32 DataSupplier::totalCount()
+sal_Int32 DataSupplier::totalCount()
 {
 	osl::ClearableGuard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
 
@@ -409,7 +410,7 @@
 
 //=========================================================================
 // virtual
-sal_uInt32 DataSupplier::currentCount()
+sal_Int32 DataSupplier::currentCount()
 {
 	return m_pImpl->m_aResults.size();
 }
@@ -423,11 +424,11 @@
 
 //=========================================================================
 // virtual
-Reference< XRow > DataSupplier::queryPropertyValues( sal_uInt32 nIndex  )
+Reference< XRow > DataSupplier::queryPropertyValues( sal_Int32 nIndex  )
 {
 	osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
 
-	if ( nIndex < m_pImpl->m_aResults.size() )
+	if ( nIndex < (sal_Int32) m_pImpl->m_aResults.size() )
 	{
 		Reference< XRow > xRow = m_pImpl->m_aResults[ nIndex ]->xRow;
 		if ( xRow.is() )
@@ -454,11 +455,11 @@
 
 //=========================================================================
 // virtual
-void DataSupplier::releasePropertyValues( sal_uInt32 nIndex )
+void DataSupplier::releasePropertyValues( sal_Int32 nIndex )
 {
 	osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
 
-	if ( nIndex < m_pImpl->m_aResults.size() )
+	if ( nIndex < (sal_Int32) m_pImpl->m_aResults.size() )
 		m_pImpl->m_aResults[ nIndex ]->xRow = Reference< XRow >();
 }
 
--- ucb/source/ucp/odma/odma_provider.cxx	9 Sep 2005 15:53:21 -0000	1.4
+++ ucb/source/ucp/odma/odma_provider.cxx	13 Mar 2006 10:55:34 -0000
@@ -94,5 +94,5 @@ ContentProvider::~ContentProvider()
 {
 	ContentsMap::iterator aIter = m_aContents.begin();
-	for (;aIter != m_aContents.begin() ;++aIter )
+	for (;aIter != m_aContents.end() ;++aIter )
 	{
 		if(aIter->second->m_bIsOpen)
--- ucb/source/ucp/odma/odma_provider.hxx	9 Sep 2005 15:53:43 -0000	1.4
+++ ucb/source/ucp/odma/odma_provider.hxx	13 Mar 2006 10:55:34 -0000
@@ -61,5 +61,5 @@ namespace odma {
 // create instances of the provider.
 #define ODMA_CONTENT_PROVIDER_SERVICE_NAME \
-				"com.sun.star.ucb.OdmaContentProvider"
+				"com.sun.star.ucb.ODMAContentProvider"
 //	#define ODMA_CONTENT_PROVIDER_SERVICE_NAME_LENGTH	34
 
--- ucb/source/ucp/odma/odma_services.cxx
+++ ucb/source/ucp/odma/odma_services.cxx
@@ -99,14 +99,16 @@
 
 //=========================================================================
 extern "C" void SAL_CALL component_getImplementationEnvironment(
-	const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
+       // Avoid unreferenced formal parameter warning
+	const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
 {
 	*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
 }
 
 //=========================================================================
 extern "C" sal_Bool SAL_CALL component_writeInfo(
-	void * pServiceManager, void * pRegistryKey )
+	// Avoid unreferenced formal parameter warning
+	void * /* pServiceManager */, void * pRegistryKey )
 {
 	return pRegistryKey &&
 
@@ -122,7 +122,8 @@
 
 //=========================================================================
 extern "C" void * SAL_CALL component_getFactory(
-	const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
+	// Avoid unreferenced formal parameter warning
+	const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
 {
 	void * pRet = 0;
 
--- ucb/source/ucp/odma/ucpodma.xml	25 Aug 2003 13:02:22 -0000	1.3
+++ ucb/source/ucp/odma/ucpodma.xml	13 Mar 2006 10:55:34 -0000
@@ -12,5 +12,5 @@
         </author>
         <name>
-            com.sun.star.comp.ucb.OdmaContentProvider
+            com.sun.star.comp.ucb.ODMAContentProvider
         </name>
         <description>
--- officecfg/registry/data/org/openoffice/ucb/Configuration.xcu	8 Sep 2005 15:07:17 -0000	1.9
+++ officecfg/registry/data/org/openoffice/ucb/Configuration.xcu	13 Mar 2006 11:05:44 -0000
@@ -151,4 +151,15 @@
               </prop>
             </node>
+            <node oor:name="Provider12" oor:op="replace">
+              <prop oor:name="ServiceName">
+                <value>com.sun.star.ucb.ODMAContentProvider</value>
+              </prop>
+              <prop oor:name="URLTemplate">
+                <value>vnd.sun.star.odma</value>
+              </prop>
+              <prop oor:name="Arguments">
+                <value/>
+              </prop>
+            </node>
           </node>
         </node>
--- scp2/source/ooo/file_library_ooo.scp	17 Feb 2006 16:52:02 -0000	1.184.2.2
+++ scp2/source/ooo/file_library_ooo.scp	13 Mar 2006 11:07:23 -0000
@@ -2069,4 +2071,6 @@
 SPECIAL_UNO_COMPONENT_LIB_FILE(gid_File_Ucpexpand1, ucpexpand1.uno)
 
+SPECIAL_UNO_COMPONENT_LIB_FILE(gid_File_Ucpodma1, ucpodma1)
+
 #ifndef SYSTEM_HUNSPELL
 
--- desktop/source/app/cmdlineargs.cxx	8 Sep 2005 17:05:40 -0000	1.28
+++ desktop/source/app/cmdlineargs.cxx	13 Mar 2006 12:00:25 -0000
@@ -275,4 +282,13 @@
 					else
 					{
+						if( bOpenEvent || bViewEvent || bForceNewEvent || bForceOpenEvent )
+						{
+							if( ::rtl::OUString(aArgStr).matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("::ODMA")) )
+							{
+								::rtl::OUString sArg = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.odma:/"));
+								sArg += aArgStr;
+								aArgStr = sArg;
+							}	
+						}
 						// handle this argument as a filename
 						if ( bOpenEvent )
