ooo-build r14705 - in trunk: . patches/dev300



Author: kyoshida
Date: Wed Dec  3 04:29:01 2008
New Revision: 14705
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14705&view=rev

Log:
2008-12-02  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/calc-external-defined-names-sc.diff: fixed build 
	breakage.


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/calc-external-defined-names-sc.diff

Modified: trunk/patches/dev300/calc-external-defined-names-sc.diff
==============================================================================
--- trunk/patches/dev300/calc-external-defined-names-sc.diff	(original)
+++ trunk/patches/dev300/calc-external-defined-names-sc.diff	Wed Dec  3 04:29:01 2008
@@ -2294,7 +2294,7 @@
          aString.Append( '$' );
  
 diff --git sc/source/core/tool/compiler.cxx sc/source/core/tool/compiler.cxx
-index 13171af..9b24826 100644
+index 13171af..8ccb188 100644
 --- sc/source/core/tool/compiler.cxx
 +++ sc/source/core/tool/compiler.cxx
 @@ -73,9 +73,11 @@
@@ -2486,7 +2486,7 @@
                  }
                  ++nPos;
              }
-@@ -1198,9 +1224,203 @@ static bool lcl_isValidQuotedText( const String& rFormula, xub_StrLen nSrcPos, P
+@@ -1198,13 +1224,209 @@ static bool lcl_isValidQuotedText( const String& rFormula, xub_StrLen nSrcPos, P
          }
      }
  
@@ -2626,9 +2626,9 @@
 +
 +    rFile = aTmpFile;
 +    rName = aTmpName;
-+    return true;
-+}
-+
+     return true;
+ }
+ 
 +static String lcl_makeExternalNameStr( const String& rFile, const String& rName,
 +        const sal_Unicode cSep, bool bODF )
 +{
@@ -2674,9 +2674,9 @@
 +    else
 +        rTabName2 = rTabName1;
 +
-     return true;
- }
- 
++    return true;
++}
++
 +static void lcl_appendTabName(::rtl::OUStringBuffer& rBuffer, const String& rTabName)
 +{
 +    bool bQuote = (rTabName.Search(sal_Unicode(' '), 0) != STRING_NOTFOUND);
@@ -2690,7 +2690,13 @@
  struct Convention_A1 : public ScCompiler::Convention
  {
      Convention_A1( ScAddress::Convention eConv ) : ScCompiler::Convention( eConv ) { }
-@@ -1212,14 +1432,14 @@ struct Convention_A1 : public ScCompiler::Convention
++    static String MakeColStr( SCCOL nCol );
+     static void MakeColStr( rtl::OUStringBuffer& rBuffer, SCCOL nCol );
++    static String MakeRowStr( SCROW nRow );
+     static void MakeRowStr( rtl::OUStringBuffer& rBuffer, SCROW nRow );
+ 
+     ParseResult parseAnyToken( const String& rFormula,
+@@ -1212,19 +1434,27 @@ struct Convention_A1 : public ScCompiler::Convention
                                 const CharClass* pCharClass) const
      {
          ParseResult aRet;
@@ -2707,7 +2713,35 @@
          return pCharClass->parseAnyToken( rFormula,
                  nSrcPos, nStartFlags, aAddAllowed, nContFlags, aAddAllowed );
      }
-@@ -1386,6 +1606,121 @@ struct ConventionOOO_A1 : public Convention_A1
+ };
+ 
++String Convention_A1::MakeColStr( SCCOL nCol )
++{
++    if ( !ValidCol( nCol) )
++        return ScGlobal::GetRscString(STR_NO_REF_TABLE);
++    else
++        return ::ColToAlpha( nCol);
++}
++
+ void Convention_A1::MakeColStr( rtl::OUStringBuffer& rBuffer, SCCOL nCol )
+ {
+     if ( !ValidCol( nCol) )
+@@ -1233,6 +1463,14 @@ void Convention_A1::MakeColStr( rtl::OUStringBuffer& rBuffer, SCCOL nCol )
+         ::ColToAlpha( rBuffer, nCol);
+ }
+ 
++String Convention_A1::MakeRowStr( SCROW nRow )
++{
++    if ( !ValidRow(nRow) )
++        return ScGlobal::GetRscString(STR_NO_REF_TABLE);
++    else
++        return String::CreateFromInt32( nRow + 1 );
++}
++
+ void Convention_A1::MakeRowStr( rtl::OUStringBuffer& rBuffer, SCROW nRow )
+ {
+     if ( !ValidRow(nRow) )
+@@ -1386,6 +1624,121 @@ struct ConventionOOO_A1 : public Convention_A1
  
          return sal_Unicode(0);
      }
@@ -2829,7 +2863,7 @@
  };
  
  
-@@ -1404,6 +1739,25 @@ struct ConventionOOO_A1_ODF : public ConventionOOO_A1
+@@ -1404,6 +1757,25 @@ struct ConventionOOO_A1_ODF : public ConventionOOO_A1
      {
          MakeRefStrImpl( rBuffer, rComp, rRef, bSingleRef, true);
      }
@@ -2855,7 +2889,7 @@
  };
  
  static const ConventionOOO_A1_ODF ConvOOO_A1_ODF;
-@@ -1507,11 +1861,129 @@ struct ConventionXL
+@@ -1507,11 +1879,129 @@ struct ConventionXL
          }
          return sal_Unicode(0);
      }
@@ -2985,7 +3019,7 @@
      void MakeRefStr( rtl::OUStringBuffer&   rBuf,
                       const ScCompiler&      rComp,
                       const ComplRefData& rRef,
-@@ -1565,22 +2037,11 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
+@@ -1565,22 +2055,11 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
              }
          }
  
@@ -3010,7 +3044,7 @@
          }
      }
  
-@@ -1588,8 +2049,10 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
+@@ -1588,8 +2067,10 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
                                         xub_StrLen nSrcPos,
                                         const CharClass* pCharClass) const
      {
@@ -3022,7 +3056,7 @@
              return aRet;
  
          static const sal_Int32 nStartFlags = KParseTokens::ANY_LETTER_OR_NUMBER |
-@@ -1605,11 +2068,83 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
+@@ -1605,11 +2086,83 @@ struct ConventionXL_A1 : public Convention_A1, public ConventionXL
      {
          return ConventionXL::getSpecialSymbol(eSymType);
      }
@@ -3106,7 +3140,7 @@
  //-----------------------------------------------------------------------------
  
  static void
-@@ -1714,8 +2249,10 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
+@@ -1714,8 +2267,10 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
                                 xub_StrLen nSrcPos,
                                 const CharClass* pCharClass) const
      {
@@ -3118,7 +3152,7 @@
              return aRet;
  
          static const sal_Int32 nStartFlags = KParseTokens::ANY_LETTER_OR_NUMBER |
-@@ -1732,6 +2269,96 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
+@@ -1732,6 +2287,96 @@ struct ConventionXL_R1C1 : public ScCompiler::Convention, public ConventionXL
      {
          return ConventionXL::getSpecialSymbol(eSymType);
      }
@@ -3215,7 +3249,7 @@
  };
  
  static const ConventionXL_R1C1 ConvXL_R1C1;
-@@ -1798,13 +2425,15 @@ void ScCompiler::CheckTabQuotes( String& rString,
+@@ -1798,13 +2443,15 @@ void ScCompiler::CheckTabQuotes( String& rString,
          KParseType::IDENTNAME, rString, 0, nStartFlags, EMPTY_STRING, nContFlags, EMPTY_STRING);
      bool bNeedsQuote = !((aRes.TokenType & KParseType::IDENTNAME) && aRes.EndPos == rString.Len());
  
@@ -3232,7 +3266,7 @@
              if( bNeedsQuote )
              {
                  static const String one_quote = static_cast<sal_Unicode>( '\'' );
-@@ -1840,6 +2469,7 @@ void ScCompiler::SetRefConvention( ScAddress::Convention eConv )
+@@ -1840,6 +2487,7 @@ void ScCompiler::SetRefConvention( ScAddress::Convention eConv )
          case ScAddress::CONV_ODF :      SetRefConvention( pConvOOO_A1_ODF ); break;
          case ScAddress::CONV_XL_A1 :    SetRefConvention( pConvXL_A1 );  break;
          case ScAddress::CONV_XL_R1C1 :  SetRefConvention( pConvXL_R1C1 ); break;
@@ -3240,7 +3274,7 @@
      }
  }
  
-@@ -2172,71 +2802,88 @@ Label_MaskStateMachine:
+@@ -2172,71 +2820,88 @@ Label_MaskStateMachine:
                  }
                  // fall through and follow logic
              case ssSkipReference:
@@ -3376,7 +3410,7 @@
                      }
                      else if (':' == c)
                      {
-@@ -2251,7 +2898,7 @@ Label_MaskStateMachine:
+@@ -2251,7 +2916,7 @@ Label_MaskStateMachine:
                          eState = ssStop;
                      }
                      if (bAddToSymbol && eState != ssSkipReference)
@@ -3385,7 +3419,7 @@
                  }
                  break;
              case ssStop:
-@@ -2532,7 +3179,8 @@ BOOL ScCompiler::IsDoubleReference( const String& rName )
+@@ -2532,7 +3197,8 @@ BOOL ScCompiler::IsDoubleReference( const String& rName )
  {
      ScRange aRange( aPos, aPos );
      const ScAddress::Details aDetails( pConv->meConv, aPos );
@@ -3395,7 +3429,7 @@
      if( nFlags & SCA_VALID )
      {
          ScRawToken aToken;
-@@ -2551,7 +3199,17 @@ BOOL ScCompiler::IsDoubleReference( const String& rName )
+@@ -2551,7 +3217,17 @@ BOOL ScCompiler::IsDoubleReference( const String& rName )
              aRef.Ref2.SetTabDeleted( TRUE );        // #REF!
          aRef.Ref2.SetFlag3D( ( nFlags & SCA_TAB2_3D ) != 0 );
          aRef.CalcRelFromAbs( aPos );
@@ -3414,7 +3448,7 @@
          pRawToken = aToken.Clone();
      }
  
-@@ -2563,7 +3221,8 @@ BOOL ScCompiler::IsSingleReference( const String& rName )
+@@ -2563,7 +3239,8 @@ BOOL ScCompiler::IsSingleReference( const String& rName )
  {
      ScAddress aAddr( aPos );
      const ScAddress::Details aDetails( pConv->meConv, aPos );
@@ -3424,7 +3458,7 @@
      // Something must be valid in order to recognize Sheet1.blah or blah.a1
      // as a (wrong) reference.
      if( nFlags & ( SCA_VALID_COL|SCA_VALID_ROW|SCA_VALID_TAB ) )
-@@ -2587,7 +3246,16 @@ BOOL ScCompiler::IsSingleReference( const String& rName )
+@@ -2587,7 +3264,16 @@ BOOL ScCompiler::IsSingleReference( const String& rName )
              nFlags |= SCA_VALID;
          }
          aRef.CalcRelFromAbs( aPos );
@@ -3442,7 +3476,7 @@
          pRawToken = aToken.Clone();
      }
  
-@@ -2695,6 +3363,32 @@ BOOL ScCompiler::IsNamedRange( const String& rUpperName )
+@@ -2695,6 +3381,32 @@ BOOL ScCompiler::IsNamedRange( const String& rUpperName )
          return FALSE;
  }
  
@@ -3475,7 +3509,7 @@
  BOOL ScCompiler::IsDBRange( const String& rName )
  {
      USHORT n;
-@@ -3230,7 +3924,7 @@ BOOL ScCompiler::NextNewToken( bool bInArray )
+@@ -3230,7 +3942,7 @@ BOOL ScCompiler::NextNewToken( bool bInArray )
          if (mnPredetectedReference)
          {
              String aStr( cSymbol);
@@ -3484,7 +3518,7 @@
              {
                  /* TODO: it would be nice to generate a #REF! error here, which
                   * would need an ocBad token with additional error value.
-@@ -3293,6 +3987,7 @@ BOOL ScCompiler::NextNewToken( bool bInArray )
+@@ -3293,6 +4005,7 @@ BOOL ScCompiler::NextNewToken( bool bInArray )
                && !(bAllowBooleans && IsBoolean( aUpper ))
                && !IsValue( aUpper )
                && !IsNamedRange( aUpper )
@@ -3492,7 +3526,7 @@
                && !IsDBRange( aUpper )
                && !IsColRowName( aUpper )
                && !(bMayBeFuncName && IsMacro( aUpper ))
-@@ -3615,9 +4310,9 @@ BOOL ScCompiler::GetToken()
+@@ -3615,9 +4328,9 @@ BOOL ScCompiler::GetToken()
          else
          {
              if ( nWasColRowName >= 2 && pToken->GetOpCode() == ocColRowName )
@@ -3504,7 +3538,7 @@
              }
          }
      }
-@@ -3628,6 +4323,50 @@ BOOL ScCompiler::GetToken()
+@@ -3628,6 +4341,50 @@ BOOL ScCompiler::GetToken()
      }
      if( pToken->GetOpCode() == ocSubTotal )
          glSubTotal = TRUE;
@@ -3555,7 +3589,7 @@
      else if( pToken->GetOpCode() == ocName )
      {
          ScRangeData* pRangeData = pDoc->GetRangeName()->FindIndex( pToken->GetIndex() );
-@@ -3783,7 +4522,7 @@ BOOL ScCompiler::GetToken()
+@@ -3783,7 +4540,7 @@ BOOL ScCompiler::GetToken()
                      {   // next defined RowNameRange to the right limits column
                          const ScRange& rRange = pR->GetRange(1);
                          if ( rRange.aStart.Row() <= nRow && nRow <= rRange.aEnd.Row() )
@@ -3564,7 +3598,7 @@
                              SCCOL nTmp = rRange.aStart.Col();
                              if ( nStartCol < nTmp && nTmp <= nMaxCol )
                                  nMaxCol = nTmp - 1;
-@@ -4407,6 +5146,11 @@ void ScCompiler::Factor()
+@@ -4407,6 +5164,11 @@ void ScCompiler::Factor()
                  bCorrected = TRUE;
              }
          }
@@ -3576,7 +3610,7 @@
          else
          {
              SetError( errUnknownToken );
-@@ -4678,7 +5422,7 @@ void ScCompiler::MoveRelWrap()
+@@ -4678,7 +5440,7 @@ void ScCompiler::MoveRelWrap()
      for( ScToken* t = pArr->GetNextReference(); t;
                    t = pArr->GetNextReference() )
      {
@@ -3585,7 +3619,7 @@
              ScRefUpdate::MoveRelWrap( pDoc, aPos, SingleDoubleRefModifier( t->GetSingleRef() ).Ref() );
          else
              ScRefUpdate::MoveRelWrap( pDoc, aPos, t->GetDoubleRef() );
-@@ -4695,7 +5439,7 @@ void ScCompiler::MoveRelWrap( ScTokenArray& rArr, ScDocument* pDoc,
+@@ -4695,7 +5457,7 @@ void ScCompiler::MoveRelWrap( ScTokenArray& rArr, ScDocument* pDoc,
      for( ScToken* t = rArr.GetNextReference(); t;
                    t = rArr.GetNextReference() )
      {
@@ -3594,7 +3628,7 @@
              ScRefUpdate::MoveRelWrap( pDoc, rPos, SingleDoubleRefModifier( t->GetSingleRef() ).Ref() );
          else
              ScRefUpdate::MoveRelWrap( pDoc, rPos, t->GetDoubleRef() );
-@@ -4807,7 +5551,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
+@@ -4807,7 +5569,7 @@ ScRangeData* ScCompiler::UpdateReference(UpdateRefMode eUpdateRefMode,
              else if( t->GetType() != svIndex )  // it may be a DB area!!!
              {
                  t->CalcAbsIfRel( rOldPos );
@@ -3603,7 +3637,7 @@
                  {
                      if ( ScRefUpdate::Update( pDoc, eUpdateRefMode, aPos,
                              r, nDx, nDy, nDz,
-@@ -5612,111 +6356,144 @@ ScToken* ScCompiler::CreateStringFromToken( rtl::OUStringBuffer& rBuffer, ScToke
+@@ -5612,111 +6374,144 @@ ScToken* ScCompiler::CreateStringFromToken( rtl::OUStringBuffer& rBuffer, ScToke
          DBG_ERRORFILE("unknown OpCode");
          rBuffer.append(ScGlobal::GetRscString(STR_NO_NAME_REF));
      }
@@ -3632,15 +3666,15 @@
              {
 -                rRef.CalcAbsIfRel( aPos );
 -                if ( pDoc->HasStringData( rRef.nCol, rRef.nRow, rRef.nTab ) )
--                {
++                case svExternalName:
+                 {
 -                    String aStr;
 -                    pDoc->GetString( rRef.nCol, rRef.nRow, rRef.nTab, aStr );
 -                    EnQuote( aStr );
 -                    rBuffer.append(aStr);
 -                }
 -                else
-+                case svExternalName:
-                 {
+-                {
 -                    rBuffer.append(ScGlobal::GetRscString(STR_NO_NAME_REF));
 -                    pConv->MakeRefStr (rBuffer, *this, aRef, TRUE );
 +                    const String *pStr = pRefMgr->getExternalFileName(t->GetIndex());
@@ -3835,7 +3869,7 @@
          rBuffer.append(sal_Unicode(' '));
      if ( bAllowArrAdvance )
 diff --git sc/source/core/tool/interpr4.cxx sc/source/core/tool/interpr4.cxx
-index 202d9aa..a829a57 100644
+index 202d9aa..811b9da 100644
 --- sc/source/core/tool/interpr4.cxx
 +++ sc/source/core/tool/interpr4.cxx
 @@ -69,6 +69,7 @@
@@ -3864,7 +3898,7 @@
 +            SingleRefData aData(pCur->GetSingleRef());
 +            if (aData.IsTabRel())
 +            {
-+                DBG_ERROR("ScCompiler::GetToken: external single reference must have an absolute table reference!")
++                DBG_ERROR("ScCompiler::GetToken: external single reference must have an absolute table reference!");
 +                break;
 +            }
 +
@@ -3892,7 +3926,7 @@
 +            ComplRefData aData(pCur->GetDoubleRef());
 +            if (aData.Ref1.IsTabRel() || aData.Ref2.IsTabRel())
 +            {
-+                DBG_ERROR("ScCompiler::GetToken: external double reference must have an absolute table reference!")
++                DBG_ERROR("ScCompiler::GetToken: external double reference must have an absolute table reference!");
 +                break;
 +            }
 +



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