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



Author: kyoshida
Date: Sat Mar 22 06:55:13 2008
New Revision: 11986
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11986&view=rev

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

	* patches/src680/sc-localized-arg-separator.diff: re-worked the print
	area dialog to support variable formula syntax.


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	Sat Mar 22 06:55:13 2008
@@ -1,3 +1,4 @@
+Only in sc: Debug
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/inc/compiler.hxx sc/inc/compiler.hxx
 --- sc.clean/inc/compiler.hxx	2008-03-03 11:24:43.000000000 -0500
 +++ sc/inc/compiler.hxx	2008-03-03 16:16:53.000000000 -0500
@@ -518,7 +519,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-21 11:18:32.000000000 -0400
++++ sc/source/core/tool/address.cxx	2008-03-22 02:23:37.000000000 -0400
 @@ -1334,9 +1334,12 @@ void ScAddress::Format( String& r, USHOR
  
              case CONV_XL_A1:
@@ -2039,6 +2040,465 @@
  
  	if ( *pLocalOptions != *pOldOptions )
  	{
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/pagedlg/areasdlg.cxx sc/source/ui/pagedlg/areasdlg.cxx
+--- sc.clean/source/ui/pagedlg/areasdlg.cxx	2008-03-03 11:24:50.000000000 -0500
++++ sc/source/ui/pagedlg/areasdlg.cxx	2008-03-22 02:27:34.000000000 -0400
+@@ -61,6 +61,7 @@
+ #include "docsh.hxx"
+ #include "globstr.hrc"
+ #include "pagedlg.hrc"
++#include "compiler.hxx"
+ 
+ // STATIC DATA ---------------------------------------------------------------
+ 
+@@ -85,10 +86,8 @@ const USHORT SC_AREASDLG_RR_OFFSET  = 2;
+ 
+ // globale Funktionen (->am Ende der Datei):
+ 
+-BOOL	lcl_CheckRepeatString( const String& rStr, BOOL bIsRow, ScRange* pRange );
+-void	lcl_GetRepeatRangeString( const ScRange* pRange, BOOL bIsRow, String& rStr );
+-void	lcl_CheckEqual( String& rStr );
+-
++bool    lcl_CheckRepeatString( const String& rStr, ScDocument* pDoc, bool bIsRow, ScRange* pRange );
++void	lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIsRow, String& rStr );
+ 
+ //============================================================================
+ //	class ScPrintAreasDlg
+@@ -190,11 +189,11 @@ void ScPrintAreasDlg::SetReference( cons
+ 			RefInputStart( pRefInputEdit );
+ 
+ 		String	aStr;
++        const ScAddress::Convention eConv = pDoc->GetAddressConvention();
+ 
+ 		if ( &aEdPrintArea == pRefInputEdit )
+ 		{
+-			rRef.Format( aStr, SCR_ABS );
+-			lcl_CheckEqual( aStr );
++			rRef.Format( aStr, SCR_ABS, pDoc, eConv );
+ 
+ //			aEdPrintArea.ReplaceSelected( aStr );
+ 
+@@ -210,7 +209,7 @@ void ScPrintAreasDlg::SetReference( cons
+ 		else
+ 		{
+ 			BOOL bRow = ( &aEdRepeatRow == pRefInputEdit );
+-			lcl_GetRepeatRangeString( &rRef, bRow, aStr );
++            lcl_GetRepeatRangeString(&rRef, pDoc, bRow, aStr);
+ 			pRefInputEdit->SetRefString( aStr );
+ 		}
+ 	}
+@@ -225,8 +224,9 @@ void ScPrintAreasDlg::AddRefEntry()
+ {
+ 	if ( pRefInputEdit == &aEdPrintArea )
+ 	{
++        const sal_Unicode sep = ScCompiler::GetStringFromOpCode(ocSep, false, pDoc->GetAddressConvention()).GetChar(0);
+ 		String aVal = aEdPrintArea.GetText();
+-		aVal += ';';
++		aVal += sep;
+ 		aEdPrintArea.SetText(aVal);
+ 
+ 		xub_StrLen nLen = aVal.Len();
+@@ -296,6 +296,8 @@ void ScPrintAreasDlg::Impl_Reset()
+ 	//-------------------------
+ 	aStrRange.Erase();
+     String aOne;
++    const ScAddress::Convention eConv = pDoc->GetAddressConvention();
++    const sal_Unicode sep = ScCompiler::GetStringFromOpCode(ocSep, false, eConv).GetChar(0);
+     USHORT nRangeCount = pDoc->GetPrintRangeCount( nCurTab );
+     for (USHORT i=0; i<nRangeCount; i++)
+     {
+@@ -303,9 +305,8 @@ void ScPrintAreasDlg::Impl_Reset()
+         if (pPrintRange)
+         {
+             if ( aStrRange.Len() )
+-                aStrRange += ';';
+-            pPrintRange->Format( aOne, SCR_ABS );
+-            lcl_CheckEqual( aOne );
++                aStrRange += sep;
++            pPrintRange->Format( aOne, SCR_ABS, pDoc, eConv );
+             aStrRange += aOne;
+         }
+     }
+@@ -314,13 +315,13 @@ void ScPrintAreasDlg::Impl_Reset()
+ 	//-------------------------------
+ 	// Wiederholungszeile
+ 	//-------------------------------
+-	lcl_GetRepeatRangeString( pRepeatRowRange, TRUE, aStrRange );
++    lcl_GetRepeatRangeString(pRepeatRowRange, pDoc, true, aStrRange);
+ 	aEdRepeatRow.SetText( aStrRange );
+ 
+ 	//--------------------------------
+ 	// Wiederholungsspalte
+ 	//--------------------------------
+-	lcl_GetRepeatRangeString( pRepeatColRange, FALSE, aStrRange );
++    lcl_GetRepeatRangeString(pRepeatColRange, pDoc, false, aStrRange);
+ 	aEdRepeatCol.SetText( aStrRange );
+ 
+ 	Impl_ModifyHdl( &aEdPrintArea );
+@@ -345,9 +346,9 @@ BOOL ScPrintAreasDlg::Impl_GetItem( Edit
+ 	if ( (aRangeStr.Len() > 0) && &aEdPrintArea != pEd )
+ 	{
+ 		ScRange aRange;
+-		lcl_CheckRepeatString( aRangeStr, &aEdRepeatRow == pEd, &aRange );
+-		aRange.Format( aRangeStr, SCR_ABS );
+-		lcl_CheckEqual( aRangeStr );
++        const ScAddress::Convention eConv = pDoc->GetAddressConvention();
++        lcl_CheckRepeatString(aRangeStr, pDoc, &aEdRepeatRow == pEd, &aRange);
++		aRange.Format(aRangeStr, SCR_ABS, pDoc, eConv);
+ 	}
+ 
+ 	rItem.SetValue( aRangeStr );
+@@ -369,24 +370,26 @@ BOOL ScPrintAreasDlg::Impl_CheckRefStrin
+ 	if ( aStrPrintArea.Len() )
+ 	{
+ 		ScRange aRange;
+-		xub_StrLen nTCount = aStrPrintArea.GetTokenCount();
++        const USHORT nValid = SCA_VALID | SCA_VALID_ROW | SCA_VALID_COL | SCA_VALID_ROW2 | SCA_VALID_COL2;
++        const ScAddress::Convention eConv = pDoc->GetAddressConvention();
++        const sal_Unicode sep = ScCompiler::GetStringFromOpCode(ocSep, false, eConv).GetChar(0);
++		xub_StrLen nTCount = aStrPrintArea.GetTokenCount(sep);
+ 		for ( xub_StrLen i=0; i<nTCount && bPrintAreaOk; i++ )
+ 		{
+-			String aOne = aStrPrintArea.GetToken(i);
+-			lcl_CheckEqual( aOne );
+-			USHORT nResult = aRange.ParseAny( aOne, pDoc );
+-			if (!(nResult & SCA_VALID))
++			String aOne = aStrPrintArea.GetToken(i, sep);
++			USHORT nResult = aRange.ParseAny( aOne, pDoc, eConv );
++			if ((nResult & nValid) != nValid)
+ 				bPrintAreaOk = FALSE;
+ 		}
+ 	}
+ 
+ 	BOOL bRepeatRowOk = (aStrRepeatRow.Len() == 0);
+ 	if ( !bRepeatRowOk )
+-		bRepeatRowOk = lcl_CheckRepeatString( aStrRepeatRow, TRUE, NULL );
++        bRepeatRowOk = lcl_CheckRepeatString(aStrRepeatRow, pDoc, true, NULL);
+ 
+ 	BOOL bRepeatColOk = (aStrRepeatCol.Len() == 0);
+ 	if ( !bRepeatColOk )
+-		bRepeatColOk = lcl_CheckRepeatString( aStrRepeatCol, FALSE, NULL );
++        bRepeatColOk = lcl_CheckRepeatString(aStrRepeatCol, pDoc, false, NULL);
+ 
+ 	// Fehlermeldungen
+ 
+@@ -418,17 +421,18 @@ void ScPrintAreasDlg::Impl_FillLists()
+ 	ScRange	aRange;
+ 	String	aStrRange;
+ 	BOOL bSimple = TRUE;
++    const ScAddress::Convention eConv = pDoc->GetAddressConvention();
+ 
+ 	if ( pViewData )
+ 		bSimple = pViewData->GetSimpleArea( aRange );
+ 
+ 	if ( bSimple )
+-		aRange.Format( aStrRange, SCR_ABS, pDoc );
++		aRange.Format( aStrRange, SCR_ABS, pDoc, eConv );
+ 	else
+ 	{
+ 		ScRangeListRef aList( new ScRangeList );
+ 		pViewData->GetMarkData().FillRangeListWithMarks( aList, FALSE );
+-		aList->Format( aStrRange, SCR_ABS, pDoc );
++		aList->Format( aStrRange, SCR_ABS, pDoc, eConv );
+ 	}
+ 
+     aLbPrintArea.SetEntryData( SC_AREASDLG_PR_SELECT, new String( aStrRange ) );
+@@ -457,11 +461,11 @@ void ScPrintAreasDlg::Impl_FillLists()
+ 				{
+ 					pData->GetName( aName );
+ 					pData->GetSymbol( aSymbol );
+-					if ( aRange.ParseAny( aSymbol, pDoc ) & SCA_VALID )
++					if ( aRange.ParseAny( aSymbol, pDoc, eConv ) & SCA_VALID )
+ 					{
+ 						if ( pData->HasType( RT_PRINTAREA ) )
+ 						{
+-							aRange.Format( aSymbol, SCR_ABS, pDoc );
++							aRange.Format( aSymbol, SCR_ABS, pDoc, eConv );
+ 							aLbPrintArea.SetEntryData(
+ 								aLbPrintArea.InsertEntry( aName ),
+ 								new String( aSymbol ) );
+@@ -469,7 +473,7 @@ void ScPrintAreasDlg::Impl_FillLists()
+ 
+ 						if ( pData->HasType( RT_ROWHEADER ) )
+ 						{
+-							lcl_GetRepeatRangeString( &aRange, TRUE, aSymbol );
++                            lcl_GetRepeatRangeString(&aRange, pDoc, true, aSymbol);
+ 							aLbRepeatRow.SetEntryData(
+ 								aLbRepeatRow.InsertEntry( aName ),
+ 								new String( aSymbol ) );
+@@ -477,7 +481,7 @@ void ScPrintAreasDlg::Impl_FillLists()
+ 
+ 						if ( pData->HasType( RT_COLHEADER ) )
+ 						{
+-							lcl_GetRepeatRangeString( &aRange, FALSE, aSymbol );
++                            lcl_GetRepeatRangeString(&aRange, pDoc, false, aSymbol);
+ 							aLbRepeatCol.SetEntryData(
+ 								aLbRepeatCol.InsertEntry( aName ),
+ 								new String( aSymbol ) );
+@@ -669,9 +673,11 @@ IMPL_LINK( ScPrintAreasDlg, Impl_ModifyH
+ //============================================================================
+ // globale Funktionen:
+ 
+-//----------------------------------------------------------------------------
++// ----------------------------------------------------------------------------
++
++// TODO: It might make sense to move these functions to address.?xx. -kohei
+ 
+-BOOL lcl_CheckRepeatOne( const String& rStr, BOOL bIsRow, SCCOLROW& rVal )
++bool lcl_CheckOne_OOO( const String& rStr, bool bIsRow, SCCOLROW& rVal )
+ {
+ 	// Zulaessige Syntax fuer rStr:
+ 	// Row: [$]1-MAXTAB
+@@ -713,115 +719,160 @@ BOOL lcl_CheckRepeatOne( const String& r
+ 	return bStrOk;
+ }
+ 
++bool lcl_CheckOne_XL_A1( const String& rStr, bool bIsRow, SCCOLROW& rVal )
++{
++    // XL A1 style is identical to OOO one for print range formats.
++    return lcl_CheckOne_OOO(rStr, bIsRow, rVal);
++}
+ 
+-//----------------------------------------------------------------------------
+-//	doppelte Referenz testen
+-
+-
+-BOOL lcl_CheckRepeatString( const String& rStr, BOOL bIsRow, ScRange* pRange )
++bool lcl_CheckOne_XL_R1C1( const String& rStr, bool bIsRow, SCCOLROW& rVal )
+ {
+-	// Zulaessige Syntax fuer rStr:
+-	// Row: $1, $1:$2
+-	// Col: $A, $A:$B
+-	// und alles auch ohne $
++    xub_StrLen nLen = rStr.Len();
++    if (nLen <= 1)
++        // There must be at least two characters.
++        return false;
+ 
+-	BOOL bOk = FALSE;
+-	SCCOLROW nStart = 0;
+-	SCCOLROW nEnd = 0;
+-	xub_StrLen nCount = rStr.GetTokenCount(':');
+-	if (nCount == 1)
+-	{
+-		bOk = lcl_CheckRepeatOne( rStr, bIsRow, nStart );
+-		nEnd = nStart;
+-	}
+-	else if (nCount == 2)
+-	{
+-		String aFirst  = rStr.GetToken( 0, ':' );
+-		String aSecond = rStr.GetToken( 1, ':' );
+-		bOk = lcl_CheckRepeatOne( aFirst, bIsRow, nStart );
+-		if (bOk)
+-			bOk = lcl_CheckRepeatOne( aSecond, bIsRow, nEnd );
+-	}
++    const sal_Unicode preUpper = bIsRow ? 'R' : 'C';
++    const sal_Unicode preLower = bIsRow ? 'r' : 'c';
++    if (rStr.GetChar(0) != preUpper && rStr.GetChar(0) != preLower)
++        return false;
+ 
++    String aNumStr = rStr.Copy(1);
++    if (!CharClass::isAsciiNumeric(aNumStr))
++        return false;
+ 
+-	if ( bOk && pRange )
+-	{
+-		ScAddress& rStart = pRange->aStart;
+-		ScAddress& rEnd	  = pRange->aEnd;
++    sal_Int32 nNum = aNumStr.ToInt32();
+ 
+-		if ( bIsRow )
+-		{
+-			rStart.SetCol( 0 );
+-			rEnd  .SetCol( 0 );
+-			rStart.SetRow( nStart );
+-			rEnd  .SetRow( nEnd );
+-		}
+-		else
+-		{
+-			rStart.SetCol( static_cast<SCCOL>(nStart) );
+-			rEnd  .SetCol( static_cast<SCCOL>(nEnd) );
+-			rStart.SetRow( 0 );
+-			rEnd  .SetRow( 0 );
+-		}
+-	}
++    if (nNum <= 0)
++        return false;
+ 
+-	return bOk;
+-}
++    if ((bIsRow && nNum > MAXROWCOUNT) || (!bIsRow && nNum > MAXCOLCOUNT))
++        return false;
+ 
++    rVal = static_cast<SCCOLROW>(nNum-1);
++    return true;
++}
+ 
+-//----------------------------------------------------------------------------
++bool lcl_CheckRepeatOne( const String& rStr, ScAddress::Convention eConv, bool bIsRow, SCCOLROW& rVal )
++{
++    switch (eConv)
++    {
++        case ScAddress::CONV_OOO:
++            return lcl_CheckOne_OOO(rStr, bIsRow, rVal);
++        case ScAddress::CONV_XL_A1:
++            return lcl_CheckOne_XL_A1(rStr, bIsRow, rVal);
++        case ScAddress::CONV_XL_R1C1:
++            return lcl_CheckOne_XL_R1C1(rStr, bIsRow, rVal);
++    }
++    return false;
++}
+ 
+-void lcl_GetRepeatRangeString( const ScRange* pRange, BOOL bIsRow, String& rStr )
++bool lcl_CheckRepeatString( const String& rStr, ScDocument* pDoc, bool bIsRow, ScRange* pRange )
+ {
+-	if ( pRange )
+-	{
+-		// In rStr wird die pRange im folgenden Format ausgegeben
+-		// Row: $1, $1:$2
+-		// Col: $A, $A:$B
++    // Row: [valid row] rsep [valid row]
++    // Col: [valid col] rsep [valid col]
+ 
+-		const ScAddress& rStart = pRange->aStart;
+-		const ScAddress& rEnd = pRange->aEnd;
++    const ScAddress::Convention eConv = pDoc->GetAddressConvention();
++    const sal_Unicode rsep = ScCompiler::GetStringFromOpCode(ocRange, false, eConv).GetChar(0);
+ 
+-		rStr  = '$';
+-		if ( bIsRow )
+-		{
+-			rStr += String::CreateFromInt32( rStart.Row()+1 );
+-			if ( rStart.Row() != rEnd.Row() )
+-			{
+-				rStr.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ":$" ));
+-				rStr += String::CreateFromInt32( rEnd.Row()+1 );
+-			}
+-		}
+-		else
+-		{
+-            rStr += ::ColToAlpha( rStart.Col() );
+-			if ( rStart.Col() != rEnd.Col() )
+-			{
+-				rStr.AppendAscii(RTL_CONSTASCII_STRINGPARAM( ":$" ));
+-                rStr += ::ColToAlpha( rEnd.Col() );
+-			}
+-		}
+-	}
+-	else
+-		rStr.Erase();
+-}
++    if (pRange)
++    {
++        // initialize the range value.
++        pRange->aStart.SetCol(0);
++        pRange->aStart.SetRow(0);
++        pRange->aEnd.SetCol(0);
++        pRange->aEnd.SetRow(0);
++    }
+ 
++    String aBuf;
++    SCCOLROW nVal = 0;
++    xub_StrLen nLen = rStr.Len();
++    bool bEndPos = false;
++    for (xub_StrLen i = 0; i < nLen; ++i)
++    {
++        const sal_Unicode c = rStr.GetChar(i);
++        if (c == rsep)
++        {
++            if (bEndPos)
++                // We aren't supposed to have more than one range separator.
++                return false;
++
++            // range separator
++            if (aBuf.Len() == 0)
++                return false;
++
++            bool bRes = lcl_CheckRepeatOne(aBuf, eConv, bIsRow, nVal);
++            if (!bRes)
++                return false;
+ 
+-//----------------------------------------------------------------------------
++            if (pRange)
++            {
++                if (bIsRow)
++                {
++                    pRange->aStart.SetRow(static_cast<SCROW>(nVal));
++                    pRange->aEnd.SetRow(static_cast<SCROW>(nVal));
++                }
++                else
++                {
++                    pRange->aStart.SetCol(static_cast<SCCOL>(nVal));
++                    pRange->aEnd.SetCol(static_cast<SCCOL>(nVal));
++                }
++            }
+ 
+-void lcl_CheckEqual( String& rStr )
+-{
+-	if ( STRING_NOTFOUND == rStr.Search( ':' ) )
+-	{
+-		String aStrTmp = rStr;
+-		rStr += ':';
+-		rStr += aStrTmp;
+-	}
+-}
++            aBuf.Erase();
++            bEndPos = true;
++        }
++        else
++            aBuf.Append(c);
++    }
+ 
++    if (aBuf.Len() > 0)
++    {
++        bool bRes = lcl_CheckRepeatOne(aBuf, eConv, bIsRow, nVal);
++        if (!bRes)
++            return false;
+ 
++        if (pRange)
++        {
++            if (bIsRow)
++            {
++                if (!bEndPos)
++                    pRange->aStart.SetRow(static_cast<SCROW>(nVal));
++                pRange->aEnd.SetRow(static_cast<SCROW>(nVal));
++            }
++            else
++            {
++                if (!bEndPos)
++                    pRange->aStart.SetCol(static_cast<SCCOL>(nVal));
++                pRange->aEnd.SetCol(static_cast<SCCOL>(nVal));
++            }
++        }
++    }
++
++    return true;
++}
+ 
++// ----------------------------------------------------------------------------
+ 
++void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIsRow, String& rStr )
++{
++    rStr.Erase();
++    if (!pRange)
++        return;
+ 
++    const ScAddress::Convention eConv = pDoc->GetAddressConvention();
++    const ScAddress& rStart = pRange->aStart;
++    const ScAddress& rEnd   = pRange->aEnd;
+ 
++    const USHORT nFmt = bIsRow ? (SCA_VALID_ROW | SCA_ROW_ABSOLUTE) : (SCA_VALID_COL | SCA_COL_ABSOLUTE);
++    String aTmpStr;
++    rStart.Format(aTmpStr, nFmt, pDoc, eConv);
++    rStr += aTmpStr;
++    if ((bIsRow && rStart.Row() != rEnd.Row()) || (!bIsRow && rStart.Col() != rEnd.Col()))
++    {
++        rStr += ScCompiler::GetStringFromOpCode(ocRange, false, eConv);
++        rEnd.Format(aTmpStr, nFmt, pDoc, eConv);
++        rStr += aTmpStr;
++    }
++}
+ 
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/src/optdlg.src sc/source/ui/src/optdlg.src
 --- sc.clean/source/ui/src/optdlg.src	2008-03-03 11:24:45.000000000 -0500
 +++ sc/source/ui/src/optdlg.src	2008-03-19 16:40:53.000000000 -0400
@@ -2086,6 +2546,53 @@
  						nResult |= SCA_VALID;
  						if( aScRange.aStart.Tab() != nTab )
 Only in sc/source/ui/view: tabvwshf.cxx.~1.13.~
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/view/viewfun2.cxx sc/source/ui/view/viewfun2.cxx
+--- sc.clean/source/ui/view/viewfun2.cxx	2008-03-03 11:24:49.000000000 -0500
++++ sc/source/ui/view/viewfun2.cxx	2008-03-22 02:33:28.000000000 -0400
+@@ -962,6 +962,7 @@ void ScViewFunc::SetPrintRanges( BOOL bE
+ 	ScMarkData& rMark	= GetViewData()->GetMarkData();
+ 	SCTAB nTab;
+ 	BOOL bUndo (pDoc->IsUndoEnabled());
++    const ScAddress::Convention eConv = pDoc->GetAddressConvention();
+ 
+ 	ScPrintRangeSaver* pOldRanges = pDoc->CreatePrintRangeSaver();
+ 
+@@ -983,11 +984,14 @@ void ScViewFunc::SetPrintRanges( BOOL bE
+ 			{
+                 if ( pPrint->Len() )
+ 				{
+-					USHORT nTCount = pPrint->GetTokenCount();
++                    const sal_Unicode sep = ScCompiler::GetStringFromOpCode(
++                        ocSep, false, eConv).GetChar(0);
++
++					USHORT nTCount = pPrint->GetTokenCount(sep);
+ 					for (USHORT i=0; i<nTCount; i++)
+ 					{
+-						String aToken = pPrint->GetToken(i);
+-						if ( aRange.ParseAny( aToken, pDoc ) & SCA_VALID )
++						String aToken = pPrint->GetToken(i, sep);
++						if ( aRange.ParseAny( aToken, pDoc, eConv ) & SCA_VALID )
+                             pDoc->AddPrintRange( nTab, aRange );
+ 					}
+ 				}
+@@ -1024,7 +1028,7 @@ void ScViewFunc::SetPrintRanges( BOOL bE
+ 				if ( !pRepCol->Len() )
+ 					pDoc->SetRepeatColRange( nTab, NULL );
+ 				else
+-					if ( aRange.ParseAny( *pRepCol, pDoc ) & SCA_VALID )
++					if ( aRange.ParseAny( *pRepCol, pDoc, eConv ) & SCA_VALID )
+ 						pDoc->SetRepeatColRange( nTab, &aRange );
+ 			}
+ 
+@@ -1035,7 +1039,7 @@ void ScViewFunc::SetPrintRanges( BOOL bE
+ 				if ( !pRepRow->Len() )
+ 					pDoc->SetRepeatRowRange( nTab, NULL );
+ 				else
+-					if ( aRange.ParseAny( *pRepRow, pDoc ) & SCA_VALID )
++					if ( aRange.ParseAny( *pRepRow, pDoc, eConv ) & SCA_VALID )
+ 						pDoc->SetRepeatRowRange( nTab, &aRange );
+ 			}
+ 		}
 Only in sc/util: makefile.mk.~1.45.~
 Only in officecfg: officecfg.argsep
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=officecfg.vpj officecfg.clean/registry/schema/org/openoffice/Office/Calc.xcs officecfg/registry/schema/org/openoffice/Office/Calc.xcs



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