ooo-build r15398 - in branches/ooo-build-3-0-1: . patches/dev300 patches/vba



Author: noelpwer
Date: Mon Feb 23 15:11:41 2009
New Revision: 15398
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15398&view=rev

Log:
2009-02-23  Noel Power  <noel power novell com>

        * patches/dev300/apply: fix for n#478187 crasher
        * patches/vba/vba-fix-copysheet-toend.diff:



Added:
   branches/ooo-build-3-0-1/patches/vba/vba-fix-copysheet-toend.diff
Modified:
   branches/ooo-build-3-0-1/ChangeLog
   branches/ooo-build-3-0-1/patches/dev300/apply

Modified: branches/ooo-build-3-0-1/patches/dev300/apply
==============================================================================
--- branches/ooo-build-3-0-1/patches/dev300/apply	(original)
+++ branches/ooo-build-3-0-1/patches/dev300/apply	Mon Feb 23 15:11:41 2009
@@ -1714,6 +1714,7 @@
 vba-xl-import-crash.diff, n#458985
 vba-interior-object-fix.diff, n#459479, Fong
 vba-excel-iserror-fix.diff, n#469762
+vba-fix-copysheet-toend.diff,n#478187
 [ VBAUntested ]
 SectionOwner => noelpwer
 vba-basic-null.diff i#85349, jjiao

Added: branches/ooo-build-3-0-1/patches/vba/vba-fix-copysheet-toend.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-3-0-1/patches/vba/vba-fix-copysheet-toend.diff	Mon Feb 23 15:11:41 2009
@@ -0,0 +1,55 @@
+diff --git sc/source/core/data/documen2.cxx sc/source/core/data/documen2.cxx
+index b75279e..5c7a375 100644
+--- sc/source/core/data/documen2.cxx
++++ sc/source/core/data/documen2.cxx
+@@ -1463,6 +1462,7 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
+ 		if (nNewPos == nMaxTableNumber)
+ 		{
+ 			pTab[nMaxTableNumber] = new ScTable(this, nMaxTableNumber, aName);
++                        pTab[nMaxTableNumber]->SetCodeName( aName );
+ 			++nMaxTableNumber;
+ 		}
+ 		else
+@@ -1497,8 +1497,9 @@ BOOL ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
+ 					pTab[i] = pTab[i - 1];
+ 				if (nNewPos <= nOldPos)
+ 					nOldPos++;
+-				pTab[nNewPos] = new ScTable(this, nNewPos, aName);
+-				++nMaxTableNumber;
++					pTab[nNewPos] = new ScTable(this, nNewPos, aName);
++                                        pTab[nNewPos]->SetCodeName( aName );
++					++nMaxTableNumber;
+ 				bValid = TRUE;
+ 				for (i = 0; i <= MAXTAB; i++)
+ 					if (pTab[i] && i != nOldPos && i != nNewPos)
+diff --git sc/source/ui/docshell/docsh5.cxx sc/source/ui/docshell/docsh5.cxx
+index 8e38e2a..9a26cd2 100644
+--- sc/source/ui/docshell/docsh5.cxx
++++ sc/source/ui/docshell/docsh5.cxx
+@@ -843,11 +843,16 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
+ 			
+ 			StarBASIC* pStarBASIC = GetBasic();
+ 			BOOL bVbaEnabled = pStarBASIC ? pStarBASIC->isVBAEnabled() : FALSE;
++			SCTAB nTabToUse = nDestTab; 
++
++			if ( nDestTab == SC_TAB_APPEND )
++				nTabToUse = aDocument.GetMaxTableNumber() - 1;
++
+ 			if ( bVbaEnabled )
+ 			{
+ 				String sCodeName;
+ 				String sSource;
+-				aDocument.GetCodeName( nDestTab, sCodeName );
++				aDocument.GetCodeName( nTabToUse, sCodeName );
+ 				com::sun::star::uno::Reference< com::sun::star::script::XLibraryContainer > xLibContainer = GetBasicContainer();
+ 				com::sun::star::uno::Reference< com::sun::star::container::XNameContainer > xLib;
+     				if( xLibContainer.is() )
+@@ -865,7 +870,7 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec
+ 					xLib->getByName( sModName ) >>= sModuleInfo;
+ 					sSource = sModuleInfo.ModuleSource;
+ 				} 
+-				lcl_InsertModule( *this, nDestTab, sCodeName, sSource );
++				lcl_InsertModule( *this, nTabToUse, sCodeName, sSource );
+ 			}
+ 		}
+ 



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