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



Author: kyoshida
Date: Thu Mar 20 20:38:44 2008
New Revision: 11966
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11966&view=rev

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

	* patches/src680/sc-datapilot-dynamic-range.diff: re-enabled 
	configurable formula/address syntax.
	
	* patches/src680/sc-localized-arg-separator.diff: fixed a single cell
	reference string generation for XL_A1 and XL_R1C1 address conventions,
	fixed hard-coded cell reference styles in the formula wizard dialog, 
	which prevented it from generating valid formula strings for XL_A1 and
	XL_R1C1.


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

Modified: trunk/patches/src680/sc-datapilot-dynamic-range.diff
==============================================================================
--- trunk/patches/src680/sc-datapilot-dynamic-range.diff	(original)
+++ trunk/patches/src680/sc-datapilot-dynamic-range.diff	Thu Mar 20 20:38:44 2008
@@ -1,6 +1,6 @@
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/dbgui/fieldwnd.cxx sc/source/ui/dbgui/fieldwnd.cxx
---- sc.clean/source/ui/dbgui/fieldwnd.cxx	2008-03-03 11:24:49.000000000 -0500
-+++ sc/source/ui/dbgui/fieldwnd.cxx	2008-03-15 00:34:49.000000000 -0400
+--- sc.clean/source/ui/dbgui/fieldwnd.cxx	2008-03-11 09:39:36.000000000 -0400
++++ sc/source/ui/dbgui/fieldwnd.cxx	2008-03-20 12:38:26.000000000 -0400
 @@ -644,7 +644,7 @@ void ScDPFieldWindow::DelField( size_t n
  
  void ScDPFieldWindow::ClearFields()
@@ -11,8 +11,8 @@
          com::sun::star::uno::Reference < com::sun::star::accessibility::XAccessible > xTempAcc = xAccessible;
          if (!xTempAcc.is() && pAccessible)
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/dbgui/pivot.hrc sc/source/ui/dbgui/pivot.hrc
---- sc.clean/source/ui/dbgui/pivot.hrc	2008-03-03 11:24:49.000000000 -0500
-+++ sc/source/ui/dbgui/pivot.hrc	2008-03-15 00:34:49.000000000 -0400
+--- sc.clean/source/ui/dbgui/pivot.hrc	2008-03-11 09:39:36.000000000 -0400
++++ sc/source/ui/dbgui/pivot.hrc	2008-03-20 12:38:26.000000000 -0400
 @@ -71,6 +71,10 @@
  #define BTN_FILTER              29
  #define BTN_DRILLDOWN           30
@@ -25,8 +25,8 @@
  #define PIVOTSTR_COUNT			2
  #define PIVOTSTR_AVG			3
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/dbgui/pivot.src sc/source/ui/dbgui/pivot.src
---- sc.clean/source/ui/dbgui/pivot.src	2008-03-03 11:24:49.000000000 -0500
-+++ sc/source/ui/dbgui/pivot.src	2008-03-15 00:34:49.000000000 -0400
+--- sc.clean/source/ui/dbgui/pivot.src	2008-03-11 09:39:36.000000000 -0400
++++ sc/source/ui/dbgui/pivot.src	2008-03-20 12:38:26.000000000 -0400
 @@ -163,7 +163,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
          Size = MAP_APPFONT ( 50 , 14 ) ;
  		TabStop = TRUE ;
@@ -153,8 +153,8 @@
          TabStop = TRUE ;
          Hide = TRUE ;
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/dbgui/pvlaydlg.cxx sc/source/ui/dbgui/pvlaydlg.cxx
---- sc.clean/source/ui/dbgui/pvlaydlg.cxx	2008-03-03 11:24:49.000000000 -0500
-+++ sc/source/ui/dbgui/pvlaydlg.cxx	2008-03-15 00:35:30.000000000 -0400
+--- sc.clean/source/ui/dbgui/pvlaydlg.cxx	2008-03-11 09:39:36.000000000 -0400
++++ sc/source/ui/dbgui/pvlaydlg.cxx	2008-03-20 12:53:18.000000000 -0400
 @@ -41,6 +41,7 @@
  //----------------------------------------------------------------------------
  
@@ -237,7 +237,7 @@
 +        aEdInPos.Enable();
 +        aRbInPos.Enable();
 +        aOldRange = xDlgDPObject->GetSheetDesc()->aSourceRange;
-+        aOldRange.Format( inString, SCR_ABS_3D, pDoc);
++        aOldRange.Format( inString, SCR_ABS_3D, pDoc, pDoc->GetAddressConvention() );
 +        aEdInPos.SetText(inString);
  	}
  	else
@@ -264,6 +264,24 @@
  
  	if ( pViewData && pDoc )
  	{
+@@ -285,7 +301,7 @@ void __EXPORT ScDPLayoutDlg::Init()
+ 			{
+ 				USHORT nInsert = aLbOutPos.InsertEntry( aName );
+ 
+-				aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc );
++				aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc, pDoc->GetAddressConvention() );
+ 				aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) );
+ 			}
+ 		}
+@@ -296,7 +312,7 @@ void __EXPORT ScDPLayoutDlg::Init()
+ 		String aStr;
+ 		ScAddress( thePivotData.nCol,
+ 				   thePivotData.nRow,
+-				   thePivotData.nTab ).Format( aStr, STD_FORMAT, pDoc );
++				   thePivotData.nTab ).Format( aStr, STD_FORMAT, pDoc, pDoc->GetAddressConvention() );
+ 		aEdOutPos.SetText( aStr );
+ 		EdModifyHdl(0);
+ 	}
 @@ -480,6 +496,27 @@ void ScDPLayoutDlg::InitFocus()
          aWndSelect.GrabFocus();
  }
@@ -299,14 +317,14 @@
 +void ScDPLayoutDlg::UpdateSrcRange()
 +{
 +    String  theCurPosStr = aEdInPos.GetText();
-+    USHORT  nResult = ScRange().Parse(theCurPosStr, pDoc);
++    USHORT  nResult = ScRange().Parse(theCurPosStr, pDoc, pDoc->GetAddressConvention());
 +
 +    if ( SCA_VALID != (nResult & SCA_VALID) )
 +        // invalid source range.
 +        return;
 +
 +    ScRefAddress start, end;
-+    ConvertDoubleRef(pDoc, theCurPosStr, 1,  start, end);
++    ConvertDoubleRef(pDoc, theCurPosStr, 1,  start, end, pDoc->GetAddressConvention());
 +    ScRange aNewRange(start.GetAddress(), end.GetAddress());
 +    ScSheetSourceDesc inSheet = *xDlgDPObject->GetSheetDesc();
 +
@@ -369,13 +387,13 @@
  		String aRefStr;
 -        rRef.aStart.Format( aRefStr, STD_FORMAT, pDocP );
 -		aEdOutPos.SetRefString( aRefStr );
-+        rRef.Format( aRefStr, SCR_ABS_3D, pDocP, ScAddress::CONV_OOO );
++        rRef.Format( aRefStr, SCR_ABS_3D, pDocP, pDocP->GetAddressConvention() );
 +        pEditActive->SetRefString( aRefStr );
 +    }
 +    else if ( pEditActive == &aEdOutPos )
 +    {
 +        String aRefStr;
-+        rRef.aStart.Format( aRefStr, STD_FORMAT, pDocP, ScAddress::CONV_OOO );
++        rRef.aStart.Format( aRefStr, STD_FORMAT, pDocP, pDocP->GetAddressConvention() );
 +        pEditActive->SetRefString( aRefStr );
  	}
  }
@@ -394,6 +412,15 @@
  		EdModifyHdl( NULL );
  	}
  	else
+@@ -1379,7 +1477,7 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButto
+ 	String		aOutPosStr( aEdOutPos.GetText() );
+ 	ScAddress	aAdrDest;
+ 	BOOL		bToNewTable = (aLbOutPos.GetSelectEntryPos() == 1);
+-	USHORT		nResult		= !bToNewTable ? aAdrDest.Parse( aOutPosStr, pDoc ) : 0;
++	USHORT		nResult		= !bToNewTable ? aAdrDest.Parse( aOutPosStr, pDoc, pDoc->GetAddressConvention() ) : 0;
+ 
+ 	if (   bToNewTable
+ 		|| ( (aOutPosStr.Len() > 0) && (SCA_VALID == (nResult & SCA_VALID)) ) )
 @@ -1497,12 +1595,11 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButto
  
  //----------------------------------------------------------------------------
@@ -428,6 +455,15 @@
  	}
  	else
  	{
+@@ -1533,7 +1639,7 @@ IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, 
+ IMPL_LINK( ScDPLayoutDlg, EdModifyHdl, Edit *, EMPTYARG )
+ {
+ 	String	theCurPosStr = aEdOutPos.GetText();
+-	USHORT	nResult = ScAddress().Parse( theCurPosStr, pDoc );
++	USHORT	nResult = ScAddress().Parse( theCurPosStr, pDoc, pDoc->GetAddressConvention() );
+ 
+ 	if ( SCA_VALID == (nResult & SCA_VALID) )
+ 	{
 @@ -1557,6 +1663,13 @@ IMPL_LINK( ScDPLayoutDlg, EdModifyHdl, E
  }
  
@@ -460,8 +496,8 @@
 +}
  
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/inc/pvlaydlg.hxx sc/source/ui/inc/pvlaydlg.hxx
---- sc.clean/source/ui/inc/pvlaydlg.hxx	2008-03-03 11:24:45.000000000 -0500
-+++ sc/source/ui/inc/pvlaydlg.hxx	2008-03-15 00:34:49.000000000 -0400
+--- sc.clean/source/ui/inc/pvlaydlg.hxx	2008-03-11 09:39:34.000000000 -0400
++++ sc/source/ui/inc/pvlaydlg.hxx	2008-03-20 12:38:26.000000000 -0400
 @@ -143,10 +143,18 @@ private:
      FixedInfo               aFtInfo;
  

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	Thu Mar 20 20:38:44 2008
@@ -503,9 +503,28 @@
  					}
  				}
  			}
+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
+@@ -1334,9 +1334,12 @@ void ScAddress::Format( String& r, USHOR
+ 
+             case CONV_XL_A1:
+             case CONV_XL_R1C1:
+-                r += '[';
+-                r += aDocName;
+-                r += ']';
++                if (aDocName.Len() > 0)
++                {
++                    r += '[';
++                    r += aDocName;
++                    r += ']';
++                }
+                 r += aTabName;
+                 r += '!';
+                 break;
 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-19 20:54:49.000000000 -0400
++++ sc/source/core/tool/compiler.cxx	2008-03-20 10:18:34.000000000 -0400
 @@ -439,6 +439,7 @@ void ScCompiler::SetCompileEnglish( BOOL
          if (!pCharClassEnglish)
              InitCharClassEnglish();
@@ -606,14 +625,21 @@
  struct ConventionXL_A1 : public Convention_A1, public ConventionXL
  {
      ConventionXL_A1() : Convention_A1( ScAddress::CONV_XL_A1 ) { }
-@@ -1325,6 +1386,7 @@ struct ConventionXL_A1 : public Conventi
-                      BOOL bSingleRef ) const
+@@ -1326,11 +1387,12 @@ struct ConventionXL_A1 : public Conventi
      {
          ComplRefData aRef( rRef );
-+        aRef.Ref1.CalcAbsIfRel( rComp.GetPos() );
- 
-         MakeDocStr( rBuf, rComp, aRef, bSingleRef );
  
+-        MakeDocStr( rBuf, rComp, aRef, bSingleRef );
+-
+         // Play fast and loose with invalid refs.  There is not much point in producing
+         // Foo!A1:#REF! versus #REF! at this point
+         aRef.Ref1.CalcAbsIfRel( rComp.GetPos() );
++
++        MakeDocStr( rBuf, rComp, aRef, bSingleRef );
++
+         if( aRef.Ref1.IsColDeleted() || aRef.Ref1.IsRowDeleted() )
+         {
+             rBuf.append(ScGlobal::GetRscString(STR_NO_REF_TABLE));
 @@ -1389,6 +1451,25 @@ struct ConventionXL_A1 : public Conventi
              MakeRowStr( rBuf, aRef.Ref2.nRow );
          }
@@ -886,7 +912,7 @@
  			pDocSh->SetDocumentModified();
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=sc.vpj sc.clean/source/ui/formdlg/formula.cxx sc/source/ui/formdlg/formula.cxx
 --- sc.clean/source/ui/formdlg/formula.cxx	2008-03-03 11:24:49.000000000 -0500
-+++ sc/source/ui/formdlg/formula.cxx	2008-03-04 00:32:04.000000000 -0500
++++ sc/source/ui/formdlg/formula.cxx	2008-03-20 16:17:02.000000000 -0400
 @@ -306,7 +306,7 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings*
  
  			xub_StrLen nFStart = 0;
@@ -1057,7 +1083,34 @@
  
  	USHORT nPos=aScParaWin.GetActiveLine();
  
-@@ -1648,6 +1645,8 @@ void ScFormulaDlg::UpdateTokenArray( con
+@@ -1500,6 +1497,8 @@ void ScFormulaDlg::SetReference( const S
+ 			RefInputStart(aScParaWin.GetActiveEdit());
+ 		}
+ 
++        ScAddress::Convention eConv = pRefDoc->GetAddressConvention();
++
+ 		BOOL bOtherDoc = ( pRefDoc != pDoc && pRefDoc->GetDocumentShell()->HasName() );
+ 		if ( bOtherDoc )
+ 		{
+@@ -1508,7 +1507,7 @@ void ScFormulaDlg::SetReference( const S
+ 			DBG_ASSERT(rRef.aStart.Tab()==rRef.aEnd.Tab(), "nStartTab!=nEndTab");
+ 
+ 			String aTmp;
+-			rRef.Format( aTmp, SCA_VALID|SCA_TAB_3D, pRefDoc );		// immer 3d
++			rRef.Format( aTmp, SCA_VALID|SCA_TAB_3D, pRefDoc, eConv );		// immer 3d
+ 
+ 			SfxObjectShell* pObjSh = pRefDoc->GetDocumentShell();
+ 
+@@ -1526,7 +1525,7 @@ void ScFormulaDlg::SetReference( const S
+ 			USHORT nFmt = ( rRef.aStart.Tab() == aCursorPos.Tab() )
+ 								? SCA_VALID
+ 								: SCA_VALID | SCA_TAB_3D;
+-			rRef.Format( aRefStr, nFmt, pRefDoc );
++			rRef.Format( aRefStr, nFmt, pRefDoc, eConv );
+ 		}
+ 
+ 		aEdRef.ReplaceSelected( aRefStr );
+@@ -1648,6 +1647,8 @@ void ScFormulaDlg::UpdateTokenArray( con
  
  xub_StrLen ScFormulaDlg::GetFunctionPos(xub_StrLen nPos)
  {
@@ -1066,7 +1119,7 @@
  	xub_StrLen nTokPos=1;
  	xub_StrLen nOldTokPos=1;
  	xub_StrLen nFuncPos=STRING_NOTFOUND;    //@ Testweise
-@@ -1673,7 +1672,7 @@ xub_StrLen ScFormulaDlg::GetFunctionPos(
+@@ -1673,7 +1674,7 @@ xub_StrLen ScFormulaDlg::GetFunctionPos(
  
  			if(eOp==ocPush || eOp==ocSpaces)
  			{
@@ -1075,7 +1128,7 @@
  				xub_StrLen n2=aFormString.Search(')',nTokPos);
  				xub_StrLen nXXX=nTokPos;
  				if(n1<n2)
-@@ -1903,7 +1902,7 @@ IMPL_LINK( ScFormulaDlg, FuncSelHdl, ScF
+@@ -1903,7 +1904,7 @@ IMPL_LINK( ScFormulaDlg, FuncSelHdl, ScF
  		{
              pDesc->InitArgumentInfo();      // full argument info is needed
  



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