ooo-build r15474 - in trunk: . patches/dev300



Author: mloiseleur
Date: Thu Mar  5 14:09:44 2009
New Revision: 15474
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15474&view=rev

Log:
2009-03-05  Michel Loiseleur  <mloiseleur linagora com>

        * patches/dev300/sw-remove-csv-lock.diff: Update with a better
        fix, which does not forget style during mail merge



Modified:
   trunk/ChangeLog
   trunk/patches/dev300/sw-remove-csv-lock.diff

Modified: trunk/patches/dev300/sw-remove-csv-lock.diff
==============================================================================
--- trunk/patches/dev300/sw-remove-csv-lock.diff	(original)
+++ trunk/patches/dev300/sw-remove-csv-lock.diff	Thu Mar  5 14:09:44 2009
@@ -1,14 +1,31 @@
-diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
-index f403d1a..8bb23ec 100644
---- sw/source/core/fields/dbfld.cxx
-+++ sw/source/core/fields/dbfld.cxx
-@@ -351,9 +351,6 @@ void SwDBField::Evaluate()
- 
- 	SvNumberFormatter* pDocFormatter = GetDoc()->GetNumberFormatter();
- 	pMgr->GetMergeColumnCnt(aColNm, GetLanguage(), aContent, &nValue, &nFmt);
--	if( !( nSubType & nsSwExtendedSubType::SUB_OWN_FMT ) )
--		SetFormat( nFmt = pMgr->GetColumnFmt( aTmpData.sDataSource, aTmpData.sCommand,
--										aColNm, pDocFormatter, GetLanguage() ));
- 
- 	if( DBL_MAX != nValue )
- 	{
+diff --git a/source/ui/dbui/dbmgr.cxx b/source/ui/dbui/dbmgr.cxx
+index f0f6090..34f84d7 100644
+--- a/source/ui/dbui/dbmgr.cxx
++++ b/source/ui/dbui/dbmgr.cxx
+@@ -1753,6 +1753,7 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
+         uno::Reference< XConnection> xConnection;
+         sal_Bool bUseMergeData = sal_False;
+         uno::Reference< XColumnsSupplier> xColsSupp;
++        bool bDisposeConnection = false;
+         if(pImpl->pMergeData &&
+             pImpl->pMergeData->sDataSource.equals(rDBName) && pImpl->pMergeData->sCommand.equals(rTableName))
+ 		{
+@@ -1777,6 +1778,7 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
+             {
+                 rtl::OUString sDBName(rDBName);
+                 xConnection = RegisterConnection( sDBName );
++                bDisposeConnection = true;
+             }
+             if(bUseMergeData)
+                 pImpl->pMergeData->xConnection = xConnection;
+@@ -1807,6 +1809,10 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
+             {
+                 ::comphelper::disposeComponent( xColsSupp );
+             }
++            if(bDisposeConnection)
++            {
++                ::comphelper::disposeComponent( xConnection );
++            }
+         }
+         else
+ 			nRet = pNFmtr->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM );



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]