--- /data4/scratch/src680-m180/sc/source/ui/unoobj/cellsuno.cxx	2006-08-09 20:20:08.000000000 +0100
+++ sc/source/ui/unoobj/cellsuno.cxx	2006-08-15 10:44:22.000000000 +0100
@@ -1375,6 +1375,7 @@ ScCellRangesBase::ScCellRangesBase() :
 	pCurrentFlat( NULL ),
 	pCurrentDeep( NULL ),
 	pCurrentDataSet( NULL ),
+	pNoDfltCurrentDataSet( NULL ),
 	pValueListener( NULL ),
 	bGotDataChangedHint( FALSE ),
 	pMarkData( NULL ),
@@ -1391,6 +1392,7 @@ ScCellRangesBase::ScCellRangesBase(ScDoc
 	pCurrentFlat( NULL ),
 	pCurrentDeep( NULL ),
 	pCurrentDataSet( NULL ),
+	pNoDfltCurrentDataSet( NULL ),
 	pValueListener( NULL ),
 	bGotDataChangedHint( FALSE ),
 	pMarkData( NULL ),
@@ -1414,6 +1416,7 @@ ScCellRangesBase::ScCellRangesBase(ScDoc
 	pCurrentFlat( NULL ),
 	pCurrentDeep( NULL ),
 	pCurrentDataSet( NULL ),
+	pNoDfltCurrentDataSet( NULL ),
 	pValueListener( NULL ),
 	bGotDataChangedHint( FALSE ),
 	pMarkData( NULL ),
@@ -1445,9 +1448,11 @@ void ScCellRangesBase::ForgetCurrentAttr
 	delete pCurrentFlat;
 	delete pCurrentDeep;
 	delete pCurrentDataSet;
+	delete pNoDfltCurrentDataSet;
 	pCurrentFlat = NULL;
 	pCurrentDeep = NULL;
 	pCurrentDataSet = NULL;
+	pNoDfltCurrentDataSet = NULL;
 
     // #i62483# pMarkData can remain unchanged, is deleted only if the range changes (RefChanged)
 }
@@ -1482,7 +1487,7 @@ const ScPatternAttr* ScCellRangesBase::G
 	return pCurrentDeep;
 }
 
-SfxItemSet* ScCellRangesBase::GetCurrentDataSet()
+SfxItemSet* ScCellRangesBase::GetCurrentDataSet(bool bNoDflt)
 {
 	if(!pCurrentDataSet)
 	{
@@ -1491,10 +1496,11 @@ SfxItemSet* ScCellRangesBase::GetCurrent
 		{
 			//	Dontcare durch Default ersetzen, damit man immer eine Reflection hat
 			pCurrentDataSet = new SfxItemSet( pPattern->GetItemSet() );
+			pNoDfltCurrentDataSet = new SfxItemSet( pPattern->GetItemSet() );
 			pCurrentDataSet->ClearInvalidItems();
 		}
 	}
-	return pCurrentDataSet;
+	return bNoDflt ? pNoDfltCurrentDataSet : pCurrentDataSet;
 }
 
 const ScMarkData* ScCellRangesBase::GetMarkData()
@@ -2365,6 +2371,7 @@ void ScCellRangesBase::GetOnePropertyVal
 					case ATTR_VALUE_FORMAT:
 						{
 							ScDocument* pDoc = pDocShell->GetDocument();
+							
 							ULONG nOldFormat = ((const SfxUInt32Item&)
 									pDataSet->Get( ATTR_VALUE_FORMAT )).GetValue();
 							LanguageType eOldLang = ((const SvxLanguageItem&)
--- /data4/scratch/src680-m180/sc/inc/cellsuno.hxx	2006-08-09 20:20:08.000000000 +0100
+++ sc/inc/cellsuno.hxx	2006-08-15 10:10:11.000000000 +0100
@@ -279,6 +279,8 @@ class ScCellRangesBase : public com::sun
 {
 	friend class ScTabViewObj;		// fuer select()
 	friend class ScTableSheetObj;	// fuer createCursorByRange()
+	friend class NumFormatHelper;	// VBA helper Class that helps manipulate format data
+	friend class ScVbaRange;	//Main VBA helper class for Range
 
 private:
 	SfxItemPropertySet		aPropSet;
@@ -287,6 +288,7 @@ private:
 	ScPatternAttr*			pCurrentFlat;
 	ScPatternAttr*			pCurrentDeep;
 	SfxItemSet*				pCurrentDataSet;
+	SfxItemSet*				pNoDfltCurrentDataSet;
 	ScMarkData*				pMarkData;
 	ScRangeList				aRanges;
 	BOOL					bChartColAsHdr;
@@ -305,7 +307,7 @@ private:
 
 	const ScPatternAttr*	GetCurrentAttrsFlat();
 	const ScPatternAttr*	GetCurrentAttrsDeep();
-	SfxItemSet*				GetCurrentDataSet();
+	SfxItemSet*				GetCurrentDataSet(bool bNoDflt = false);
 	const ScMarkData*		GetMarkData();
     void                    ForgetMarkData();
 	void					ForgetCurrentAttrs();
