ooo-build r14591 - in trunk: . patches/dev300
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14591 - in trunk: . patches/dev300
- Date: Tue, 25 Nov 2008 01:38:03 +0000 (UTC)
Author: kyoshida
Date: Tue Nov 25 01:38:03 2008
New Revision: 14591
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14591&view=rev
Log:
2008-11-24 Kohei Yoshida <kyoshida novell com>
* patches/dev300/calc-external-defined-names-sc-fixes.diff: additional
fix for the external defined name implementation, as Eike found two
additional issues (i#3740, i#4385).
* patches/dev300/apply: apply this new patch.
Added:
trunk/patches/dev300/calc-external-defined-names-sc-fixes.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Tue Nov 25 01:38:03 2008
@@ -1902,6 +1902,9 @@
calc-external-defined-names-officecfg.diff, i#3740, i#4385, n#355685, kohei
calc-external-defined-names-svtools.diff, i#3740, i#4385, n#355685, kohei
+# Additional fix for the external range name implementation.
+calc-external-defined-names-sc-fixes.diff, i#3740, i#4385, n#355685, kohei
+
[ CalcSolver ]
SectionOwner => kohei
Added: trunk/patches/dev300/calc-external-defined-names-sc-fixes.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/calc-external-defined-names-sc-fixes.diff Tue Nov 25 01:38:03 2008
@@ -0,0 +1,87 @@
+diff --git sc/source/filter/excel/excform8.cxx sc/source/filter/excel/excform8.cxx
+index b80a165..04521bd 100644
+--- sc/source/filter/excel/excform8.cxx
++++ sc/source/filter/excel/excform8.cxx
+@@ -639,7 +639,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
+ case xlExtName:
+ {
+ sal_uInt16 nFileId;
+- if (!GetExternalFileIdFromXti(nXtiIndex, nFileId))
++ if (!GetExternalFileIdFromXti(nXtiIndex, nFileId) || !pExtName->HasFormulaTokens())
+ {
+ aStack << aPool.Store(ocNoName, pExtName->GetName());
+ break;
+@@ -1298,6 +1298,28 @@ ConvErr ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStrea
+ }
+ }
+ break;
++ case 0x3B:
++ {
++ // area reference
++ sal_uInt16 nExtTab1, nExtTab2, nRow1, nRow2, nGrbitCol1, nGrbitCol2;
++ rStrm >> nExtTab1 >> nExtTab2 >> nRow1 >> nRow2 >> nGrbitCol1 >> nGrbitCol2;
++ SingleRefData& rR1 = aCRD.Ref1;
++ SingleRefData& rR2 = aCRD.Ref2;
++
++ rR1.nTab = nExtTab1;
++ rR1.SetFlag3D(true);
++ rR1.SetTabRel(false);
++ ExcRelToScRel8(nRow1, nGrbitCol1, rR1, true);
++
++ rR2.nTab = nExtTab2;
++ rR2.SetFlag3D(true);
++ rR2.SetTabRel(false);
++ ExcRelToScRel8(nRow2, nGrbitCol2, rR2, true);
++
++ String aTabName = rTabNames[nExtTab1];
++ aStack << aPool.StoreExtRef(nFileId, aTabName, aCRD);
++ }
++ break;
+ default:
+ bError = true;
+ }
+diff --git sc/source/filter/excel/xilink.cxx sc/source/filter/excel/xilink.cxx
+index 414f298..502316c 100644
+--- sc/source/filter/excel/xilink.cxx
++++ sc/source/filter/excel/xilink.cxx
+@@ -319,6 +319,8 @@ XclImpExtName::XclImpExtName( const XclImpSupbook& rSupbook, XclImpStream& rStrm
+
+ if (meType == xlExtName)
+ {
++ // TODO: For now, only global external names are supported. In future
++ // we should extend this to supporting per-sheet external names.
+ if (mnStorageId == 0)
+ {
+ if (pFormulaConv)
+@@ -354,10 +356,18 @@ void XclImpExtName::CreateDdeData( ScDocument& rDoc, const String& rApplic, cons
+
+ void XclImpExtName::CreateExtNameData( ScDocument& rDoc, sal_uInt16 nFileId ) const
+ {
++ if (!mxArray.get())
++ return;
++
+ ScExternalRefManager* pRefMgr = rDoc.GetExternalRefManager();
+ pRefMgr->storeRangeNameTokens(nFileId, maName, *mxArray);
+ }
+
++bool XclImpExtName::HasFormulaTokens() const
++{
++ return (mxArray.get() != NULL);
++}
++
+ // Cached external cells ======================================================
+
+ XclImpCrn::XclImpCrn( XclImpStream& rStrm, const XclAddress& rXclPos ) :
+diff --git sc/source/filter/inc/xilink.hxx sc/source/filter/inc/xilink.hxx
+index a1755aa..9c6e929 100644
+--- sc/source/filter/inc/xilink.hxx
++++ sc/source/filter/inc/xilink.hxx
+@@ -126,6 +126,8 @@ public:
+
+ void CreateExtNameData( ScDocument& rDoc, sal_uInt16 nFileId ) const;
+
++ bool HasFormulaTokens() const;
++
+ inline XclImpExtNameType GetType() const { return meType; }
+ inline const String& GetName() const { return maName; }
+ inline sal_uInt32 GetStorageId() const { return mnStorageId; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]