ooo-build r11979 - in trunk: . patches/src680



Author: kyoshida
Date: Fri Mar 21 16:34:37 2008
New Revision: 11979
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11979&view=rev

Log:
2008-03-21  Kohei Yoshida  <kyoshida novell com>

	* patches/src680/sc-localized-arg-separator.diff: covered more dialogs
	for formula syntax support, & rewrote parts of the column row label
	dialog code to reduce range string parsing.


Modified:
   trunk/ChangeLog
   trunk/patches/src680/sc-localized-arg-separator.diff

Modified: trunk/patches/src680/sc-localized-arg-separator.diff
==============================================================================
--- trunk/patches/src680/sc-localized-arg-separator.diff	(original)
+++ trunk/patches/src680/sc-localized-arg-separator.diff	Fri Mar 21 16:34:37 2008
@@ -518,7 +518,7 @@
  			}
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/core/tool/address.cxx sc/source/core/tool/address.cxx
 --- sc.clean/source/core/tool/address.cxx	2008-03-03 11:24:50.000000000 -0500
-+++ sc/source/core/tool/address.cxx	2008-03-20 12:17:44.000000000 -0400
++++ sc/source/core/tool/address.cxx	2008-03-21 11:18:32.000000000 -0400
 @@ -1334,9 +1334,12 @@ void ScAddress::Format( String& r, USHOR
  
              case CONV_XL_A1:
@@ -535,6 +535,14 @@
                  r += aTabName;
                  r += '!';
                  break;
+@@ -1434,6 +1437,7 @@ lcl_ScRange_Format_XL_Header( String& r,
+ void ScRange::Format( String& r, USHORT nFlags, ScDocument* pDoc,
+                       const ScAddress::Details& rDetails ) const
+ {
++    r.Erase();
+     if( !( nFlags & SCA_VALID ) )
+     {
+         r = ScGlobal::GetRscString( STR_NOREF_STR );
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/core/tool/compiler.cxx sc/source/core/tool/compiler.cxx
 --- sc.clean/source/core/tool/compiler.cxx	2008-03-03 11:24:50.000000000 -0500
 +++ sc/source/core/tool/compiler.cxx	2008-03-20 10:18:34.000000000 -0400
@@ -987,6 +995,126 @@
  						 );
  			pDoc->SetDocOptions( rNewOpt );
  			pDocSh->SetDocumentModified();
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/dbgui/consdlg.cxx sc/source/ui/dbgui/consdlg.cxx
+--- sc.clean/source/ui/dbgui/consdlg.cxx	2008-03-03 11:24:49.000000000 -0500
++++ sc/source/ui/dbgui/consdlg.cxx	2008-03-21 01:18:40.000000000 -0400
+@@ -198,6 +198,8 @@ void ScConsolidateDlg::Init()
+ 
+ 	aLbFunc.SelectEntryPos( FuncToLbPos( theConsData.eFunction ) );
+ 
++    const ScAddress::Convention eConv = pDoc->GetAddressConvention();
++
+ 	// Einlesen der Konsolidierungsbereiche
+ 	aLbConsAreas.Clear();
+ 	for ( i=0; i<theConsData.nDataAreaCount; i++ )
+@@ -207,7 +209,7 @@ void ScConsolidateDlg::Init()
+ 		{
+             ScRange( rArea.nColStart, rArea.nRowStart, rArea.nTab,
+                     rArea.nColEnd, rArea.nRowEnd, rArea.nTab ).Format( aStr,
+-                        SCR_ABS_3D, pDoc );
++                        SCR_ABS_3D, pDoc, eConv );
+             aLbConsAreas.InsertEntry( aStr );
+         }
+     }
+@@ -215,7 +217,7 @@ void ScConsolidateDlg::Init()
+ 	if ( theConsData.nTab < pDoc->GetTableCount() )
+     {
+         ScAddress( theConsData.nCol, theConsData.nRow, theConsData.nTab
+-                ).Format( aStr, SCA_ABS_3D, pDoc );
++                ).Format( aStr, SCA_ABS_3D, pDoc, eConv );
+         aEdDestArea.SetText( aStr );
+     }
+ 	else
+@@ -248,7 +250,7 @@ void ScConsolidateDlg::Init()
+ 		ScAreaNameIterator aIter( pDoc );
+ 		while ( aIter.Next( aStrName, aRange ) )
+ 		{
+-			aRange.Format( aStrArea, SCA_ABS_3D, pDoc );
++			aRange.Format( aStrArea, SCA_ABS_3D, pDoc, eConv );
+ 			pAreaData[nAt++].Set( aStrName, aStrArea, aIter.WasDBName() );
+ 		}
+ 	}
+@@ -305,14 +307,15 @@ void ScConsolidateDlg::SetReference( con
+ 
+ 		String		aStr;
+ 		USHORT	 	nFmt = SCR_ABS_3D;		 //!!! nCurTab fehlt noch
++        const ScAddress::Convention eConv = pDocP->GetAddressConvention();
+ 
+ 		if ( rRef.aStart.Tab() != rRef.aEnd.Tab() )
+ 			nFmt |= SCA_TAB2_3D;
+ 
+ 		if ( pRefInputEdit == &aEdDataArea)
+-            rRef.Format( aStr, nFmt, pDocP );
++            rRef.Format( aStr, nFmt, pDocP, eConv );
+ 		else if ( pRefInputEdit == &aEdDestArea )
+-            rRef.aStart.Format( aStr, nFmt, pDocP );
++            rRef.aStart.Format( aStr, nFmt, pDocP, eConv );
+ 
+ 		pRefInputEdit->SetRefString( aStr );
+ 	}
+@@ -369,11 +372,12 @@ BOOL ScConsolidateDlg::VerifyEdit( ScRef
+ 	SCTAB	nTab	= pViewData->GetTabNo();
+ 	BOOL	bEditOk = FALSE;
+ 	String	theCompleteStr;
++    const ScAddress::Convention eConv = pDoc->GetAddressConvention();
+ 
+ 	if ( pEd == &aEdDataArea )
+ 	{
+ 		bEditOk = pRangeUtil->IsAbsArea( pEd->GetText(), pDoc,
+-										 nTab, &theCompleteStr );
++										 nTab, &theCompleteStr, NULL, NULL, eConv );
+ 	}
+ 	else if ( pEd == &aEdDestArea )
+ 	{
+@@ -381,7 +385,7 @@ BOOL ScConsolidateDlg::VerifyEdit( ScRef
+ 
+ 		pRangeUtil->CutPosString( pEd->GetText(), aPosStr );
+ 		bEditOk = pRangeUtil->IsAbsPos( aPosStr, pDoc,
+-										nTab, &theCompleteStr );
++										nTab, &theCompleteStr, NULL, eConv );
+ 	}
+ 
+ 	if ( bEditOk )
+@@ -425,8 +429,9 @@ IMPL_LINK( ScConsolidateDlg, OkHdl, void
+ 		ScRefAddress aDestAddress;
+ 		SCTAB		nTab = pViewData->GetTabNo();
+ 		String		aDestPosStr( aEdDestArea.GetText() );
++        const ScAddress::Convention eConv = pDoc->GetAddressConvention();
+ 
+-		if ( pRangeUtil->IsAbsPos( aDestPosStr, pDoc, nTab, NULL, &aDestAddress ) )
++		if ( pRangeUtil->IsAbsPos( aDestPosStr, pDoc, nTab, NULL, &aDestAddress, eConv ) )
+ 		{
+ 			ScConsolidateParam	theOutParam( theConsData );
+ 			ScArea**			ppDataAreas = new ScArea*[nDataAreaCount];
+@@ -437,7 +442,7 @@ IMPL_LINK( ScConsolidateDlg, OkHdl, void
+ 			{
+ 				pArea = new ScArea;
+ 				pRangeUtil->MakeArea( aLbConsAreas.GetEntry( i ),
+-									  *pArea, pDoc, nTab );
++									  *pArea, pDoc, nTab, eConv );
+ 				ppDataAreas[i] = pArea;
+ 			}
+ 
+@@ -488,8 +493,9 @@ IMPL_LINK( ScConsolidateDlg, ClickHdl, P
+ 			String		aNewEntry( aEdDataArea.GetText() );
+ 			ScArea**	ppAreas = NULL;
+ 			USHORT		nAreaCount = 0;
++            const ScAddress::Convention eConv = pDoc->GetAddressConvention();
+ 
+-			if ( pRangeUtil->IsAbsTabArea( aNewEntry, pDoc, &ppAreas, &nAreaCount, TRUE ) )
++			if ( pRangeUtil->IsAbsTabArea( aNewEntry, pDoc, &ppAreas, &nAreaCount, TRUE, eConv ) )
+ 			{
+ 				// IsAbsTabArea() legt ein Array von ScArea-Zeigern an,
+ 				// welche ebenfalls dynamisch erzeugt wurden.
+@@ -504,7 +510,7 @@ IMPL_LINK( ScConsolidateDlg, ClickHdl, P
+                         const ScArea& rArea = *(ppAreas[i]);
+                         ScRange( rArea.nColStart, rArea.nRowStart, rArea.nTab,
+                                 rArea.nColEnd, rArea.nRowEnd, rArea.nTab
+-                                ).Format( aNewArea, SCR_ABS_3D, pDoc );
++                                ).Format( aNewArea, SCR_ABS_3D, pDoc, eConv );
+ 
+ 						if ( aLbConsAreas.GetEntryPos( aNewArea )
+ 							 == LISTBOX_ENTRY_NOTFOUND )
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/dbgui/dbnamdlg.cxx sc/source/ui/dbgui/dbnamdlg.cxx
 --- sc.clean/source/ui/dbgui/dbnamdlg.cxx	2008-03-03 11:24:49.000000000 -0500
 +++ sc/source/ui/dbgui/dbnamdlg.cxx	2008-03-20 23:08:31.000000000 -0400
@@ -1451,6 +1579,35 @@
  			if(pDesc->pFuncName)
  				aFtHeadLine.SetText( *(pDesc->pFuncName) );
  			else
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/inc/crnrdlg.hxx sc/source/ui/inc/crnrdlg.hxx
+--- sc.clean/source/ui/inc/crnrdlg.hxx	2008-03-03 11:24:45.000000000 -0500
++++ sc/source/ui/inc/crnrdlg.hxx	2008-03-21 12:00:22.000000000 -0400
+@@ -52,6 +52,7 @@
+ #include <vcl/lstbox.hxx>
+ #endif
+ 
++#include <hash_map>
+ 
+ class ScViewData;
+ class ScDocument;
+@@ -96,6 +97,8 @@ private:
+ 	ScRangePairListRef	xColNameRanges;
+ 	ScRangePairListRef	xRowNameRanges;
+ 
++    typedef ::std::hash_map< String, ScRange, ScStringHashCode, ::std::equal_to<String> > NameRangeMap;
++    NameRangeMap    aRangeMap;
+ 	ScViewData*		pViewData;
+ 	ScDocument*		pDoc;
+ 	ScRefEdit*		pEdActive;
+@@ -105,7 +108,7 @@ private:
+ private:
+ 	void Init				();
+ 	void UpdateNames		();
+-	void UpdateRangeData	( const String& rStrName, BOOL bColName );
++	void UpdateRangeData	( const ScRange& rRange, BOOL bColName );
+ 	void SetColRowData( const ScRange& rLabelRange,BOOL bRef=FALSE);
+ 	void AdjustColRowData( const ScRange& rDataRange,BOOL bRef=FALSE);
+ 	DECL_LINK( CancelBtnHdl, void * );
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/inc/optdlg.hrc sc/source/ui/inc/optdlg.hrc
 --- sc.clean/source/ui/inc/optdlg.hrc	2008-03-03 11:24:45.000000000 -0500
 +++ sc/source/ui/inc/optdlg.hrc	2008-03-19 16:21:34.000000000 -0400
@@ -1484,6 +1641,343 @@
  
  	FixedText		aFtPrec;
  	NumericField	aEdPrec;
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/miscdlgs/crnrdlg.cxx sc/source/ui/miscdlgs/crnrdlg.cxx
+--- sc.clean/source/ui/miscdlgs/crnrdlg.cxx	2008-03-03 11:24:49.000000000 -0500
++++ sc/source/ui/miscdlgs/crnrdlg.cxx	2008-03-21 12:17:41.000000000 -0400
+@@ -289,8 +289,9 @@ void ScColRowNameRangesDlg::SetColRowDat
+ 	}
+ 	if ( bValid )
+ 	{
++        const ScAddress::Convention eConv = pDoc->GetAddressConvention();
+ 		String aStr;
+-		theCurArea.Format( aStr, SCR_ABS_3D, pDoc );
++		theCurArea.Format( aStr, SCR_ABS_3D, pDoc, eConv );
+ 
+ 		if(bRef)
+ 			aEdAssign.SetRefString( aStr );
+@@ -298,7 +299,7 @@ void ScColRowNameRangesDlg::SetColRowDat
+ 			aEdAssign.SetText( aStr );
+ 
+ 		aEdAssign.SetSelection( Selection( SELECTION_MAX, SELECTION_MAX ) );
+-		theCurData.Format( aStr, SCR_ABS_3D, pDoc );
++		theCurData.Format( aStr, SCR_ABS_3D, pDoc, eConv );
+ 
+ 		if(bRef)
+ 			aEdAssign2.SetRefString( aStr );
+@@ -393,7 +394,7 @@ void ScColRowNameRangesDlg::AdjustColRow
+ 		}
+ 	}
+ 	String aStr;
+-	theCurData.Format( aStr, SCR_ABS_3D, pDoc );
++	theCurData.Format( aStr, SCR_ABS_3D, pDoc, pDoc->GetAddressConvention() );
+ 
+ 	if(bRef)
+ 		aEdAssign2.SetRefString( aStr );
+@@ -514,6 +515,7 @@ void ScColRowNameRangesDlg::UpdateNames(
+ 	aLbRange.SetUpdateMode( FALSE );
+ 	//-----------------------------------------------------------
+ 	aLbRange.Clear();
++    aRangeMap.clear();
+ 	aEdAssign.SetText( EMPTY_STRING );
+ 
+ 	ULONG nCount, j;
+@@ -527,6 +529,7 @@ void ScColRowNameRangesDlg::UpdateNames(
+ 	SCTAB nTab2;
+ 	String rString;
+ 	String strShow;
++    const ScAddress::Details aDetails(pDoc->GetAddressConvention());
+ 
+ 	String aString;
+ 	String strDelim = String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM( " --- " ));
+@@ -541,7 +544,8 @@ void ScColRowNameRangesDlg::UpdateNames(
+ 			nCount, pDoc );
+ 		for ( j=0; j < nCount; j++ )
+ 		{
+-			ppSortArray[j]->GetRange(0).Format( aString, SCR_ABS_3D, pDoc );
++            const ScRange aRange(ppSortArray[j]->GetRange(0));
++			aRange.Format( aString, SCR_ABS_3D, pDoc, aDetails );
+ 
+ 			//@008 Hole Bereichsparameter aus Dok
+ 			ppSortArray[j]->GetRange(0).GetVars( nCol1, nRow1, nTab1,
+@@ -571,6 +575,7 @@ void ScColRowNameRangesDlg::UpdateNames(
+ 			String aInsStr = aString;
+ 			aInsStr += strShow;
+ 			nPos = aLbRange.InsertEntry( aInsStr );
++            aRangeMap.insert( NameRangeMap::value_type(aInsStr, aRange) );
+ 			aLbRange.SetEntryData( nPos, (void*)nEntryDataCol );
+ 		}
+ 		delete [] ppSortArray;
+@@ -586,7 +591,8 @@ void ScColRowNameRangesDlg::UpdateNames(
+ 			nCount, pDoc );
+ 		for ( j=0; j < nCount; j++ )
+ 		{
+-			ppSortArray[j]->GetRange(0).Format( aString, SCR_ABS_3D, pDoc );
++            const ScRange aRange(ppSortArray[j]->GetRange(0));
++			aRange.Format( aString, SCR_ABS_3D, pDoc, aDetails );
+ 
+ 			//@008 Ab hier baue String fuer Zeilen
+ 			ppSortArray[j]->GetRange(0).GetVars( nCol1, nRow1, nTab1,
+@@ -614,6 +620,7 @@ void ScColRowNameRangesDlg::UpdateNames(
+ 			String aInsStr = aString;
+ 			aInsStr += strShow;
+ 			nPos = aLbRange.InsertEntry( aInsStr );
++            aRangeMap.insert( NameRangeMap::value_type(aInsStr, aRange) );
+ 			aLbRange.SetEntryData( nPos, (void*)nEntryDataRow );
+ 		}
+ 		delete [] ppSortArray;
+@@ -639,40 +646,28 @@ void ScColRowNameRangesDlg::UpdateNames(
+ #*
+ #************************************************************************/
+ 
+-void ScColRowNameRangesDlg::UpdateRangeData( const String& rRangeStr, BOOL bColName )
++void ScColRowNameRangesDlg::UpdateRangeData( const ScRange& rRange, BOOL bColName )
+ {
+-	ScRange aRange;
+-	String aRefString=rRangeStr;
+-
+-	//@008 Suchen nach Erweiterung u. rausschmeissen
+-	xub_StrLen nPosExt=rRangeStr.Search( '[',0 );
+-
+-	if(nPosExt!=STRING_NOTFOUND)
+-	{
+-		nPosExt--;
+-		aRefString.Erase(nPosExt);
+-	}
+-	aRange.ParseAny( aRefString, pDoc );
+-
+     ScRangePair* pPair = NULL;
+ 	BOOL bFound = FALSE;
+-    if ( bColName && (pPair = xColNameRanges->Find( aRange )) != NULL )
++    if ( bColName && (pPair = xColNameRanges->Find( rRange )) != NULL )
+ 		bFound = TRUE;
+-    else if ( !bColName && (pPair = xRowNameRanges->Find( aRange )) != NULL )
++    else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != NULL )
+ 		bFound = TRUE;
+ 
+ 	if ( bFound )
+ 	{
++        const ScAddress::Convention eConv = pDoc->GetAddressConvention();
+ 		String aStr;
+-		theCurArea = aRange;
+-		theCurArea.Format( aStr, SCR_ABS_3D, pDoc );
++		theCurArea = rRange;
++		theCurArea.Format( aStr, SCR_ABS_3D, pDoc, eConv );
+ 		aEdAssign.SetText( aStr );
+ 		aBtnAdd.Disable();
+ 		aBtnRemove.Enable();
+ 		aBtnColHead.Check( bColName );
+ 		aBtnRowHead.Check( !bColName );
+ 		theCurData = pPair->GetRange(1);
+-		theCurData.Format( aStr, SCR_ABS_3D, pDoc );
++		theCurData.Format( aStr, SCR_ABS_3D, pDoc, eConv );
+ 		aEdAssign2.SetText( aStr );
+ 	}
+ 	else
+@@ -790,10 +785,11 @@ IMPL_LINK( ScColRowNameRangesDlg, AddBtn
+ 
+ 	if ( aNewArea.Len() > 0 && aNewData.Len() > 0 )
+ 	{
++        const ScAddress::Convention eConv = pDoc->GetAddressConvention();
+ 		ScRange aRange1, aRange2;
+ 		BOOL bOk1;
+-        if ( (bOk1 = ((aRange1.ParseAny( aNewArea, pDoc ) & SCA_VALID) == SCA_VALID)) != FALSE
+-		  && ((aRange2.ParseAny( aNewData, pDoc ) & SCA_VALID) == SCA_VALID) )
++        if ( (bOk1 = ((aRange1.ParseAny( aNewArea, pDoc, eConv ) & SCA_VALID) == SCA_VALID)) != FALSE
++		  && ((aRange2.ParseAny( aNewData, pDoc, eConv ) & SCA_VALID) == SCA_VALID) )
+ 		{
+ 			theCurArea = aRange1;
+ 			AdjustColRowData( aRange2 );
+@@ -860,26 +856,16 @@ IMPL_LINK( ScColRowNameRangesDlg, Remove
+ 	USHORT nSelectPos = aLbRange.GetSelectEntryPos();
+ 	BOOL bColName =
+ 		((ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol);
+-	ScRange aRange;
+-
+-	//@008 Suchen nach Erweiterung u. rausschmeissen
+-	String aRefString=aRangeStr;
+-
+-	xub_StrLen nPosExt=aRangeStr.Search( '[', 0 );
+-
+-	if(nPosExt!=STRING_NOTFOUND)
+-	{
+-		nPosExt--;
+-		aRefString.Erase(nPosExt);
+-	}
+-
+-	aRange.ParseAny( aRefString, pDoc );
++    NameRangeMap::const_iterator itr = aRangeMap.find(aRangeStr);
++    if (itr == aRangeMap.end())
++        return 0;
++    const ScRange& rRange = itr->second;
+ 
+     ScRangePair* pPair = NULL;
+ 	BOOL bFound = FALSE;
+-    if ( bColName && (pPair = xColNameRanges->Find( aRange )) != NULL )
++    if ( bColName && (pPair = xColNameRanges->Find( rRange )) != NULL )
+ 		bFound = TRUE;
+-    else if ( !bColName && (pPair = xRowNameRanges->Find( aRange )) != NULL )
++    else if ( !bColName && (pPair = xRowNameRanges->Find( rRange )) != NULL )
+ 		bFound = TRUE;
+ 	if ( bFound )
+ 	{
+@@ -971,11 +957,12 @@ IMPL_LINK( ScColRowNameRangesDlg, Range1
+ 			aRangeStr = aLbRange.GetSelectEntry();
+ 		}
+ 	}
+-	if ( aRangeStr.Len() && aRangeStr.GetChar(0) == '$' )
++    NameRangeMap::const_iterator itr = aRangeMap.find(aRangeStr);
++    if ( itr != aRangeMap.end() )
+ 	{
+ 		BOOL bColName =
+ 			((ULONG)aLbRange.GetEntryData( nSelectPos ) == nEntryDataCol);
+-		UpdateRangeData( aRangeStr, bColName );
++		UpdateRangeData( itr->second, bColName );
+ 		aBtnAdd.Disable();
+ 		aBtnRemove.Enable();
+ 	}
+@@ -1035,7 +1022,7 @@ IMPL_LINK( ScColRowNameRangesDlg, Range1
+ 	if ( aNewArea.Len() > 0 )
+ 	{
+ 		ScRange aRange;
+-		if ( (aRange.ParseAny( aNewArea, pDoc ) & SCA_VALID) == SCA_VALID )
++		if ( (aRange.ParseAny( aNewArea, pDoc, pDoc->GetAddressConvention() ) & SCA_VALID) == SCA_VALID )
+ 		{
+ 			SetColRowData( aRange );
+ 			bValid = TRUE;
+@@ -1083,7 +1070,7 @@ IMPL_LINK( ScColRowNameRangesDlg, Range2
+ 	if ( aNewData.Len() > 0 )
+ 	{
+ 		ScRange aRange;
+-		if ( (aRange.ParseAny( aNewData, pDoc ) & SCA_VALID) == SCA_VALID )
++		if ( (aRange.ParseAny( aNewData, pDoc, pDoc->GetAddressConvention() ) & SCA_VALID) == SCA_VALID )
+ 		{
+ 			AdjustColRowData( aRange );
+ 			aBtnAdd.Enable();
+@@ -1125,7 +1112,7 @@ IMPL_LINK( ScColRowNameRangesDlg, ColCli
+ 		{
+ 			theCurArea.aEnd.SetRow( MAXROW - 1 );
+ 			String aStr;
+-			theCurArea.Format( aStr, SCR_ABS_3D, pDoc );
++			theCurArea.Format( aStr, SCR_ABS_3D, pDoc, pDoc->GetAddressConvention() );
+ 			aEdAssign.SetText( aStr );
+ 		}
+ 		ScRange aRange( theCurData );
+@@ -1163,7 +1150,7 @@ IMPL_LINK( ScColRowNameRangesDlg, RowCli
+ 		{
+ 			theCurArea.aEnd.SetCol( MAXCOL - 1 );
+ 			String aStr;
+-			theCurArea.Format( aStr, SCR_ABS_3D, pDoc );
++			theCurArea.Format( aStr, SCR_ABS_3D, pDoc, pDoc->GetAddressConvention() );
+ 			aEdAssign.SetText( aStr );
+ 		}
+ 		ScRange aRange( theCurData );
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/miscdlgs/solvrdlg.cxx sc/source/ui/miscdlgs/solvrdlg.cxx
+--- sc.clean/source/ui/miscdlgs/solvrdlg.cxx	2008-03-03 11:24:49.000000000 -0500
++++ sc/source/ui/miscdlgs/solvrdlg.cxx	2008-03-21 01:29:10.000000000 -0400
+@@ -126,7 +126,7 @@ void __EXPORT ScSolverDlg::Init()
+     aEdVariableCell.SetLoseFocusHdl ( aLink );
+     aRBVariableCell.SetLoseFocusHdl ( aLink );
+ 
+-	theFormulaCell.Format( aStr, SCA_ABS );
++	theFormulaCell.Format( aStr, SCA_ABS, pDoc, pDoc->GetAddressConvention() );
+ 
+ 	aEdFormulaCell.SetText( aStr );
+ 	aEdFormulaCell.GrabFocus();
+@@ -172,7 +172,7 @@ void ScSolverDlg::SetReference( const Sc
+ 								? SCA_ABS
+ 								: SCA_ABS_3D;
+ 
+-        aAdr.Format( aStr, nFmt, pDocP );
++        aAdr.Format( aStr, nFmt, pDocP, pDocP->GetAddressConvention() );
+ 		pEdActive->SetRefString( aStr );
+ 
+ 		if ( pEdActive == &aEdFormulaCell )
+@@ -241,8 +241,9 @@ IMPL_LINK( ScSolverDlg, BtnHdl, PushButt
+ 		// 2. verweist die Formel-Koordinate wirklich auf eine Formelzelle?
+ 		// 3. wurde ein korrekter Zielwert eingegeben
+ 
+-		USHORT	nRes1 = theFormulaCell .Parse( aEdFormulaCell.GetText(), pDoc );
+-		USHORT	nRes2 = theVariableCell.Parse( aEdVariableCell.GetText(), pDoc );
++        const ScAddress::Convention eConv = pDoc->GetAddressConvention();
++		USHORT	nRes1 = theFormulaCell .Parse( aEdFormulaCell.GetText(), pDoc, eConv );
++		USHORT	nRes2 = theVariableCell.Parse( aEdVariableCell.GetText(), pDoc, eConv );
+ 
+ 		if ( SCA_VALID == ( nRes1 & SCA_VALID ) )
+ 		{
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/miscdlgs/tabopdlg.cxx sc/source/ui/miscdlgs/tabopdlg.cxx
+--- sc.clean/source/ui/miscdlgs/tabopdlg.cxx	2008-03-03 11:24:49.000000000 -0500
++++ sc/source/ui/miscdlgs/tabopdlg.cxx	2008-03-21 00:38:02.000000000 -0400
+@@ -170,21 +170,22 @@ void ScTabOpDlg::SetReference( const ScR
+ 								? SCR_ABS
+ 								: SCR_ABS_3D;
+ 
++        const ScAddress::Convention eConv = pDocP->GetAddressConvention();
+ 		if ( pEdActive == &aEdFormulaRange )
+ 		{
+ 			theFormulaCell.Set( rRef.aStart, false, false, false);
+ 			theFormulaEnd.Set( rRef.aEnd, false, false, false);
+-            rRef.Format( aStr, nFmt, pDocP );
++            rRef.Format( aStr, nFmt, pDocP, eConv );
+ 		}
+ 		else if ( pEdActive == &aEdRowCell )
+ 		{
+ 			theRowCell.Set( rRef.aStart, false, false, false);
+-            rRef.aStart.Format( aStr, nFmt, pDocP );
++            rRef.aStart.Format( aStr, nFmt, pDocP, eConv );
+ 		}
+ 		else if ( pEdActive == &aEdColCell )
+ 		{
+ 			theColCell.Set( rRef.aStart, false, false, false);
+-            rRef.aStart.Format( aStr, nFmt, pDocP );
++            rRef.aStart.Format( aStr, nFmt, pDocP, eConv );
+ 		}
+ 
+ 		pEdActive->SetRefString( aStr );
+@@ -246,11 +247,12 @@ BOOL lcl_Parse( const String& rString, S
+ 				ScRefAddress& rStart, ScRefAddress& rEnd )
+ {
+ 	BOOL bRet = FALSE;
++    const ScAddress::Convention eConv = pDoc->GetAddressConvention();
+ 	if ( rString.Search(':') != STRING_NOTFOUND )
+-		bRet = ConvertDoubleRef( pDoc, rString, nCurTab, rStart, rEnd );
++		bRet = ConvertDoubleRef( pDoc, rString, nCurTab, rStart, rEnd, eConv );
+ 	else
+ 	{
+-		bRet = ConvertSingleRef( pDoc, rString, nCurTab, rStart );
++		bRet = ConvertSingleRef( pDoc, rString, nCurTab, rStart, eConv );
+ 		rEnd = rStart;
+ 	}
+ 	return bRet;
+@@ -282,9 +284,10 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, PushButto
+ 			nError = TABOPERR_WRONGFORMULA;
+ 		else
+ 		{
++            const ScAddress::Convention eConv = pDoc->GetAddressConvention();
+ 			if (aEdRowCell.GetText().Len() > 0)
+ 			{
+-				if (!ConvertSingleRef( pDoc, aEdRowCell.GetText(), nCurTab, theRowCell ))
++				if (!ConvertSingleRef( pDoc, aEdRowCell.GetText(), nCurTab, theRowCell, eConv ))
+ 					nError = TABOPERR_WRONGROW;
+ 				else
+ 				{
+@@ -298,7 +301,7 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, PushButto
+ 			if (aEdColCell.GetText().Len() > 0)
+ 			{
+ 				if (!ConvertSingleRef( pDoc, aEdColCell.GetText(), nCurTab,
+-									   theColCell ))
++									   theColCell, eConv ))
+ 					nError = TABOPERR_WRONGCOL;
+ 				else
+ 				{
+@@ -306,7 +309,7 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, PushButto
+ 					{
+ 						nMode = 2;
+ 						ConvertSingleRef( pDoc, aEdFormulaRange.GetText(), nCurTab,
+-										  theFormulaCell );
++										  theFormulaCell, eConv );
+ 					}
+ 					else if (theFormulaCell.Row() != theFormulaEnd.Row())
+ 						nError = TABOPERR_NOROWFORMULA;
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/namedlg/namedlg.cxx sc/source/ui/namedlg/namedlg.cxx
 --- sc.clean/source/ui/namedlg/namedlg.cxx	2008-03-03 11:24:49.000000000 -0500
 +++ sc/source/ui/namedlg/namedlg.cxx	2008-03-20 19:59:06.000000000 -0400



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