ooo-build r13783 - in trunk: . patches/dev300 patches/vba
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13783 - in trunk: . patches/dev300 patches/vba
- Date: Thu, 4 Sep 2008 05:05:39 +0000 (UTC)
Author: kyoshida
Date: Thu Sep 4 05:05:39 2008
New Revision: 13783
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13783&view=rev
Log:
2008-09-04 Kohei Yoshida <kyoshida novell com>
* patches/dev300/calc-external-defined-names-offapi.diff:
* patches/dev300/calc-external-defined-names-sc.diff: updated the API.
* patches/dev300/apply:
* patches/vba/parse-xla1-bad-3dflag.diff: removed as it is combined
with the calc-external-defined-names-sc.diff patch.
Removed:
trunk/patches/vba/parse-xla1-bad-3dflag.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
trunk/patches/dev300/calc-external-defined-names-offapi.diff
trunk/patches/dev300/calc-external-defined-names-sc.diff
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Thu Sep 4 05:05:39 2008
@@ -1744,9 +1744,6 @@
calc-external-defined-names-offapi.diff, i#3740, i#4385, n#355685, kohei
calc-external-defined-names-officecfg.diff, i#3740, i#4385, n#355685, kohei
-# fix bug generating a specific Sheet reference
-parse-xla1-bad-3dflag.diff, n#422569, noelpwer
-
[ CalcSolver ]
SectionOwner => kohei
Modified: trunk/patches/dev300/calc-external-defined-names-offapi.diff
==============================================================================
--- trunk/patches/dev300/calc-external-defined-names-offapi.diff (original)
+++ trunk/patches/dev300/calc-external-defined-names-offapi.diff Thu Sep 4 05:05:39 2008
@@ -284,10 +284,10 @@
+
diff --git offapi/com/sun/star/sheet/ExternalReference.idl offapi/com/sun/star/sheet/ExternalReference.idl
new file mode 100644
-index 0000000..a2bc3c7
+index 0000000..d1a5d00
--- /dev/null
+++ offapi/com/sun/star/sheet/ExternalReference.idl
-@@ -0,0 +1,90 @@
+@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -347,6 +347,7 @@
+ */
+ long Index;
+
++#if 0
+ //-------------------------------------------------------------------------
+
+ /** Name of the sheet that the external reference points to.
@@ -359,6 +360,7 @@
+ sheet-specific range name.</i></p>
+ */
+ string SheetName;
++#endif
+
+ //-------------------------------------------------------------------------
+
@@ -616,7 +618,7 @@
+#endif
diff --git offapi/com/sun/star/sheet/XExternalSheetCache.idl offapi/com/sun/star/sheet/XExternalSheetCache.idl
new file mode 100644
-index 0000000..0c35f7f
+index 0000000..15655f8
--- /dev/null
+++ offapi/com/sun/star/sheet/XExternalSheetCache.idl
@@ -0,0 +1,84 @@
@@ -673,7 +675,7 @@
+ @param nColumn column position (0-based)
+ @param aValue cell value to be cached
+ */
-+ void setCellValue( [in] long nRow, [in] long nColumn, [in] any aValue )
++ void setCellValue( [in] long nColumn, [in] long nRow, [in] any aValue )
+ raises (com::sun::star::lang::IllegalArgumentException);
+
+ /** It retrieves a cached value from a specified cell position. The cached
@@ -681,7 +683,7 @@
+
+ @return any cached cell value
+ */
-+ any getCellValue( [in] long nRow, [in] long nColumn )
++ any getCellValue( [in] long nColumn, [in] long nRow )
+ raises (com::sun::star::lang::IllegalArgumentException);
+
+ /** It returns a list of all row numbers where a cached cell or cells exist.
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 Thu Sep 4 05:05:39 2008
@@ -699,7 +699,7 @@
+
+#endif
diff --git sc/inc/linkuno.hxx sc/inc/linkuno.hxx
-index b6fc524..586986e 100644
+index b6fc524..f5af67d 100644
--- sc/inc/linkuno.hxx
+++ sc/inc/linkuno.hxx
@@ -36,6 +36,9 @@
@@ -742,10 +742,10 @@
+
+ // XExternalSheetCache
+ virtual void SAL_CALL setCellValue(
-+ sal_Int32 nRow, sal_Int32 nCol, const ::com::sun::star::uno::Any& rAny)
++ sal_Int32 nCol, sal_Int32 nRow, const ::com::sun::star::uno::Any& rAny)
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
-+ virtual ::com::sun::star::uno::Any SAL_CALL getCellValue(sal_Int32 nRow, sal_Int32 nCol)
++ virtual ::com::sun::star::uno::Any SAL_CALL getCellValue(sal_Int32 nCol, sal_Int32 nRow)
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getAllRows()
@@ -1142,7 +1142,7 @@
{
if (pLinkManager)
diff --git sc/source/core/tool/address.cxx sc/source/core/tool/address.cxx
-index 2cb5dce..4572ccd 100644
+index 2cb5dce..44c84c0 100644
--- sc/source/core/tool/address.cxx
+++ sc/source/core/tool/address.cxx
@@ -35,12 +35,15 @@
@@ -1283,7 +1283,8 @@
+ const uno::Sequence< const sheet::ExternalLinkInfo > * pExternalLinks )
{
const sal_Unicode* startTabs, *start = p;
-
+-
++ USHORT nSaveFlags = nFlags;
// Is this an external reference ?
rStartTabName.Erase();
rEndTabName.Erase();
@@ -1366,16 +1367,35 @@
if( NULL == p )
return start; // invalid tab
if( p != startTabs )
-@@ -267,7 +306,7 @@ lcl_ScRange_Parse_XL_Header( ScRange& r,
+@@ -267,9 +306,12 @@ lcl_ScRange_Parse_XL_Header( ScRange& r,
nFlags |= SCA_VALID_TAB | SCA_TAB_3D | SCA_TAB_ABSOLUTE;
if( *p == ':' ) // 3d ref
{
- p = lcl_XL_ParseSheetRef( p+1, &r.aEnd, pDoc, rExternDocName, rEndTabName, FALSE );
+ p = lcl_XL_ParseSheetRef( p+1, rEndTabName, FALSE );
if( p == NULL )
++ {
++ nFlags = nSaveFlags;
return start; // invalid tab
++ }
nFlags |= SCA_VALID_TAB2 | SCA_TAB2_3D | SCA_TAB2_ABSOLUTE;
-@@ -289,45 +328,36 @@ lcl_ScRange_Parse_XL_Header( ScRange& r,
+ }
+ else
+@@ -281,7 +323,13 @@ lcl_ScRange_Parse_XL_Header( ScRange& r,
+ }
+
+ if( *p++ != '!' )
++ {
++ // bit of a hack ( in fact for a1:d11 ) passed in above
++ // the first tabname will be assigned a1 ??
++ // In anycase if we get here we need to reset the flags (
++ nFlags = nSaveFlags;
+ return start; // syntax error
++ }
+ }
+ else
+ {
+@@ -289,45 +337,39 @@ lcl_ScRange_Parse_XL_Header( ScRange& r,
// Use the current tab, it needs to be passed in. : r.aEnd.SetTab( .. );
}
@@ -1399,7 +1419,10 @@
- pDoc->GetDocumentShell() );
+ // Internal reference.
+ if (!rStartTabName.Len())
++ {
++ nFlags = nSaveFlags;
+ return start;
++ }
- String aDocTab;
-
@@ -1444,7 +1467,7 @@
}
-@@ -427,7 +457,8 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
+@@ -427,7 +469,8 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
const sal_Unicode* p,
ScDocument* pDoc,
const ScAddress::Details& rDetails,
@@ -1454,7 +1477,7 @@
{
const sal_Unicode* pTmp = NULL;
String aExternDocName, aStartTabName, aEndTabName;
-@@ -441,7 +472,19 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
+@@ -441,7 +484,19 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
}
#endif
p = lcl_ScRange_Parse_XL_Header( r, p, pDoc,
@@ -1475,7 +1498,7 @@
if( NULL == p )
return 0;
-@@ -480,8 +523,7 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
+@@ -480,8 +535,7 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
r.aStart.SetCol( 0 );
r.aEnd.SetCol( MAXCOL );
@@ -1485,7 +1508,7 @@
}
else if( NULL == (p = lcl_r1c1_get_col( p, rDetails, &r.aStart, &nFlags )))
goto failed;
-@@ -501,8 +543,7 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
+@@ -501,8 +555,7 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
return nFlags;
}
@@ -1495,7 +1518,7 @@
}
p = pTmp;
-@@ -517,8 +558,7 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
+@@ -517,8 +570,7 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
}
nFlags |= (nFlags2 << 4);
@@ -1505,7 +1528,7 @@
}
else if( *p == 'C' || *p == 'c' ) // full col C#
{
-@@ -550,8 +590,7 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
+@@ -550,8 +602,7 @@ lcl_ScRange_Parse_XL_R1C1( ScRange& r,
r.aStart.SetRow( 0 );
r.aEnd.SetRow( MAXROW );
@@ -1515,7 +1538,7 @@
}
failed :
-@@ -604,7 +643,9 @@ static USHORT
+@@ -604,11 +655,18 @@ static USHORT
lcl_ScRange_Parse_XL_A1( ScRange& r,
const sal_Unicode* p,
ScDocument* pDoc,
@@ -1526,7 +1549,17 @@
{
const sal_Unicode* tmp1, *tmp2;
String aExternDocName, aStartTabName, aEndTabName; // for external link table
-@@ -618,7 +659,19 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
+- USHORT nFlags = SCA_VALID | SCA_VALID_TAB, nFlags2 = SCA_VALID_TAB2;
++
++ // nFlags 2 is always shifted << 4 which would imply
++ // SCA_VALID_TAB2 should be SCA_VALID_TAB ( which would ensure
++ // Range references have the correct flags set when ScRange::ParseAny
++ // is called
++ USHORT nFlags = SCA_VALID | SCA_VALID_TAB, nFlags2 = SCA_VALID_TAB;
+
+ #if 0
+ {
+@@ -618,7 +676,19 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
}
#endif
p = lcl_ScRange_Parse_XL_Header( r, p, pDoc,
@@ -1547,7 +1580,7 @@
if( NULL == p )
return 0;
-@@ -640,8 +693,7 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
+@@ -640,8 +710,7 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
SCA_VALID_COL | SCA_VALID_COL2 |
SCA_COL_ABSOLUTE | SCA_COL2_ABSOLUTE;
nFlags |= (nFlags2 << 4);
@@ -1557,7 +1590,7 @@
}
tmp2 = lcl_a1_get_row( tmp1, &r.aStart, &nFlags );
-@@ -661,8 +713,7 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
+@@ -661,8 +730,7 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
SCA_VALID_ROW | SCA_VALID_ROW2 |
SCA_ROW_ABSOLUTE | SCA_ROW2_ABSOLUTE;
nFlags |= (nFlags2 << 4);
@@ -1567,7 +1600,7 @@
}
// prepare as if it's a singleton, in case we want to fall back */
-@@ -672,8 +723,7 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
+@@ -672,8 +740,7 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
if ( bOnlyAcceptSingle )
{
if ( *tmp2 == 0 )
@@ -1577,7 +1610,7 @@
else
{
// any trailing invalid character must invalidate the address.
-@@ -692,12 +742,11 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
+@@ -692,12 +759,11 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
p = tmp2;
tmp1 = lcl_a1_get_col( p+1, &r.aEnd, &nFlags2 );
if( !tmp1 ) // strange, but valid singleton
@@ -1593,7 +1626,7 @@
if ( *tmp2 != 0 )
{
-@@ -708,45 +757,31 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
+@@ -708,45 +774,31 @@ lcl_ScRange_Parse_XL_A1( ScRange& r,
}
nFlags |= (nFlags2 << 4);
@@ -1652,7 +1685,7 @@
}
SCCOL nCol = 0;
-@@ -762,25 +797,11 @@ lcl_ScAddress_Parse_OOo( BOOL& bExternal, const sal_Unicode* p,
+@@ -762,25 +814,11 @@ lcl_ScAddress_Parse_OOo( BOOL& bExternal, const sal_Unicode* p,
if (*p == '$')
nRes |= SCA_TAB_ABSOLUTE, p++;
@@ -1683,7 +1716,7 @@
while (*p)
{
-@@ -795,35 +816,11 @@ lcl_ScAddress_Parse_OOo( BOOL& bExternal, const sal_Unicode* p,
+@@ -795,35 +833,11 @@ lcl_ScAddress_Parse_OOo( BOOL& bExternal, const sal_Unicode* p,
}
if( *p++ != '.' )
nBits = 0;
@@ -1723,7 +1756,7 @@
}
else
nBits = 0;
-@@ -884,16 +881,31 @@ lcl_ScAddress_Parse_OOo( BOOL& bExternal, const sal_Unicode* p,
+@@ -884,16 +898,31 @@ lcl_ScAddress_Parse_OOo( BOOL& bExternal, const sal_Unicode* p,
if( !nBits )
p = q;
}
@@ -1761,7 +1794,7 @@
if ( !(nRes & SCA_VALID_ROW) && (nRes & SCA_VALID_COL)
&& !( (nRes & SCA_TAB_3D) && (nRes & SCA_VALID_TAB)) )
{ // keine Row, keine Tab, aber Col => DM (...), B (...) o.ae.
-@@ -912,9 +924,10 @@ lcl_ScAddress_Parse_OOo( BOOL& bExternal, const sal_Unicode* p,
+@@ -912,9 +941,10 @@ lcl_ScAddress_Parse_OOo( BOOL& bExternal, const sal_Unicode* p,
}
static USHORT
@@ -1775,7 +1808,7 @@
{
if( !*p )
return 0;
-@@ -924,20 +937,22 @@ lcl_ScAddress_Parse ( BOOL& bExternal, const sal_Unicode* p,
+@@ -924,20 +954,22 @@ lcl_ScAddress_Parse ( BOOL& bExternal, const sal_Unicode* p,
default :
case ScAddress::CONV_OOO:
{
@@ -1801,7 +1834,7 @@
rAddr = r.aStart;
return nFlags;
}
-@@ -949,9 +964,8 @@ bool ConvertSingleRef( ScDocument* pDoc, const String& rRefString,
+@@ -949,9 +981,8 @@ bool ConvertSingleRef( ScDocument* pDoc, const String& rRefString,
SCTAB nDefTab, ScRefAddress& rRefAddress,
const ScAddress::Details& rDetails )
{
@@ -1812,7 +1845,7 @@
if( nRes & SCA_VALID )
{
rRefAddress.Set( aAddr,
-@@ -988,10 +1002,11 @@ bool ConvertDoubleRef( ScDocument* pDoc, const String& rRefString, SCTAB nDefTab
+@@ -988,10 +1019,11 @@ bool ConvertDoubleRef( ScDocument* pDoc, const String& rRefString, SCTAB nDefTab
USHORT ScAddress::Parse( const String& r, ScDocument* pDoc,
@@ -1827,7 +1860,7 @@
}
-@@ -1060,7 +1075,7 @@ void ScRange::ExtendTo( const ScRange& rRange )
+@@ -1060,7 +1092,7 @@ void ScRange::ExtendTo( const ScRange& rRange )
}
static USHORT
@@ -1836,7 +1869,7 @@
{
USHORT nRes1 = 0, nRes2 = 0;
xub_StrLen nTmp = 0;
-@@ -1073,13 +1088,12 @@ lcl_ScRange_Parse_OOo( ScRange &aRange, const String& r, ScDocument* pDoc )
+@@ -1073,13 +1105,12 @@ lcl_ScRange_Parse_OOo( ScRange &aRange, const String& r, ScDocument* pDoc )
String aTmp( r );
sal_Unicode* p = aTmp.GetBufferAccess();
p[ nPos ] = 0;
@@ -1853,7 +1886,7 @@
nRes2 &= ~SCA_VALID_TAB; // #REF!
else
{
-@@ -1132,7 +1146,9 @@ lcl_ScRange_Parse_OOo( ScRange &aRange, const String& r, ScDocument* pDoc )
+@@ -1132,7 +1163,9 @@ lcl_ScRange_Parse_OOo( ScRange &aRange, const String& r, ScDocument* pDoc )
}
USHORT ScRange::Parse( const String& r, ScDocument* pDoc,
@@ -1864,7 +1897,7 @@
{
if ( r.Len() <= 0 )
return 0;
-@@ -1141,13 +1157,15 @@ USHORT ScRange::Parse( const String& r, ScDocument* pDoc,
+@@ -1141,13 +1174,15 @@ USHORT ScRange::Parse( const String& r, ScDocument* pDoc,
{
default :
case ScAddress::CONV_OOO:
@@ -1883,7 +1916,7 @@
}
}
-@@ -1187,6 +1205,7 @@ USHORT ScRange::ParseCols( const String& rStr, ScDocument* pDoc,
+@@ -1187,6 +1222,7 @@ USHORT ScRange::ParseCols( const String& rStr, ScDocument* pDoc,
default :
case ScAddress::CONV_OOO: // No full col refs in OOO yet, assume XL notation
case ScAddress::CONV_XL_A1:
@@ -1891,7 +1924,7 @@
if (NULL != (p = lcl_a1_get_col( p, &aStart, &ignored ) ) )
{
if( p[0] == ':')
-@@ -1245,6 +1264,7 @@ USHORT ScRange::ParseRows( const String& rStr, ScDocument* pDoc,
+@@ -1245,6 +1281,7 @@ USHORT ScRange::ParseRows( const String& rStr, ScDocument* pDoc,
default :
case ScAddress::CONV_OOO: // No full row refs in OOO yet, assume XL notation
case ScAddress::CONV_XL_A1:
@@ -1899,7 +1932,7 @@
if (NULL != (p = lcl_a1_get_row( p, &aStart, &ignored ) ) )
{
if( p[0] == ':')
-@@ -1429,6 +1449,7 @@ void ScAddress::Format( String& r, USHORT nFlags, ScDocument* pDoc,
+@@ -1429,6 +1466,7 @@ void ScAddress::Format( String& r, USHORT nFlags, ScDocument* pDoc,
case CONV_XL_A1:
case CONV_XL_R1C1:
@@ -1907,7 +1940,7 @@
if (aDocName.Len() > 0)
{
r += '[';
-@@ -1446,6 +1467,7 @@ void ScAddress::Format( String& r, USHORT nFlags, ScDocument* pDoc,
+@@ -1446,6 +1484,7 @@ void ScAddress::Format( String& r, USHORT nFlags, ScDocument* pDoc,
default :
case CONV_OOO:
case CONV_XL_A1:
@@ -1915,7 +1948,7 @@
if( nFlags & SCA_VALID_COL )
lcl_a1_append_c ( r, nCol, nFlags & SCA_COL_ABSOLUTE );
if( nFlags & SCA_VALID_ROW )
-@@ -1565,6 +1587,7 @@ void ScRange::Format( String& r, USHORT nFlags, ScDocument* pDoc,
+@@ -1565,6 +1604,7 @@ void ScRange::Format( String& r, USHORT nFlags, ScDocument* pDoc,
break;
case ScAddress::CONV_XL_A1:
@@ -1923,7 +1956,7 @@
lcl_ScRange_Format_XL_Header( r, *this, nFlags, pDoc, rDetails );
if( aStart.Col() == 0 && aEnd.Col() >= MAXCOL )
{
-@@ -1688,6 +1711,7 @@ String ScAddress::GetColRowString( bool bAbsolute,
+@@ -1688,6 +1728,7 @@ String ScAddress::GetColRowString( bool bAbsolute,
default :
case ScAddress::CONV_OOO:
case ScAddress::CONV_XL_A1:
@@ -9937,7 +9970,7 @@
{
aRet <<= uno::Reference<container::XNameAccess>(new ScSheetLinksObj( pDocShell ));
diff --git sc/source/ui/unoobj/linkuno.cxx sc/source/ui/unoobj/linkuno.cxx
-index 52a5a62..7fb3e01 100644
+index 52a5a62..a3c99a5 100644
--- sc/source/ui/unoobj/linkuno.cxx
+++ sc/source/ui/unoobj/linkuno.cxx
@@ -48,8 +48,20 @@
@@ -9977,7 +10010,7 @@
+{
+}
+
-+void SAL_CALL ScExternalSheetCacheObj::setCellValue(sal_Int32 nRow, sal_Int32 nCol, const Any& rValue)
++void SAL_CALL ScExternalSheetCacheObj::setCellValue(sal_Int32 nCol, sal_Int32 nRow, const Any& rValue)
+ throw (IllegalArgumentException, RuntimeException)
+{
+ ScUnoGuard aGuard;
@@ -9998,7 +10031,7 @@
+ mpTable->setCell(static_cast<SCROW>(nRow), static_cast<SCCOL>(nCol), pToken);
+}
+
-+Any SAL_CALL ScExternalSheetCacheObj::getCellValue(sal_Int32 nRow, sal_Int32 nCol)
++Any SAL_CALL ScExternalSheetCacheObj::getCellValue(sal_Int32 nCol, sal_Int32 nRow)
+ throw (IllegalArgumentException, RuntimeException)
+{
+ ScUnoGuard aGuard;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]