ooo-build r13652 - in trunk: . patches/dev300
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13652 - in trunk: . patches/dev300
- Date: Thu, 21 Aug 2008 19:52:26 +0000 (UTC)
Author: kyoshida
Date: Thu Aug 21 19:52:26 2008
New Revision: 13652
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13652&view=rev
Log:
2008-08-21 Kohei Yoshida <kyoshida novell com>
* patches/dev300/calc-external-names-odf-grammar.diff: additional fix
for ods export of external range names.
* patches/dev300/apply: apply this patch.
* patches/dev300/calc-external-defined-names.diff: additional minor
fix.
Added:
trunk/patches/dev300/calc-external-names-odf-grammar.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
trunk/patches/dev300/calc-external-defined-names.diff
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Thu Aug 21 19:52:26 2008
@@ -1684,6 +1684,7 @@
# Implement external range names.
calc-external-defined-names.diff, i#3740, i#4385, n#355685, kohei
+calc-external-names-odf-grammar.diff, kohei
[ CalcSolver ]
SectionOwner => kohei
Modified: trunk/patches/dev300/calc-external-defined-names.diff
==============================================================================
--- trunk/patches/dev300/calc-external-defined-names.diff (original)
+++ trunk/patches/dev300/calc-external-defined-names.diff Thu Aug 21 19:52:26 2008
@@ -6054,7 +6054,7 @@
//------------------------------------------------------------------
diff --git sc/source/filter/xml/xmlexprt.cxx sc/source/filter/xml/xmlexprt.cxx
-index 52f5145..92dea13 100644
+index 52f5145..c8c629e 100644
--- sc/source/filter/xml/xmlexprt.cxx
+++ sc/source/filter/xml/xmlexprt.cxx
@@ -68,6 +68,7 @@
@@ -6508,7 +6508,7 @@
+ else
+ aRelUrl = GetRelativeReference(pExtFileData->maRelativeName);
+ AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, aRelUrl);
-+ AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, *itr);
++ AddAttribute(XML_NAMESPACE_TABLE, XML_TABLE_NAME, *itr);
+ if (pExtFileData->maFilterName.Len())
+ AddAttribute(XML_NAMESPACE_TABLE, XML_FILTER_NAME, pExtFileData->maFilterName);
+ if (pExtFileData->maFilterOptions.Len())
@@ -6627,7 +6627,7 @@
+ }
+ }
+ SvXMLElementExport aElemCell(*this, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True);
-+ SvXMLElementExport aElemText(*this, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_True);
++ SvXMLElementExport aElemText(*this, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False);
+ Characters(aStrVal);
+
+ nLastCol = nCol;
Added: trunk/patches/dev300/calc-external-names-odf-grammar.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/calc-external-names-odf-grammar.diff Thu Aug 21 19:52:26 2008
@@ -0,0 +1,164 @@
+diff --git sc/source/core/tool/compiler.cxx sc/source/core/tool/compiler.cxx
+index f675389..6aff7ad 100644
+--- sc/source/core/tool/compiler.cxx
++++ sc/source/core/tool/compiler.cxx
+@@ -1298,16 +1298,22 @@ static bool lcl_parseExternalName( const String& rSymbol, String& rFile, String&
+ return true;
+ }
+
+-static String lcl_makeExternalNameStr( const String& rFile, const String& rName, const sal_Unicode cSep )
++static String lcl_makeExternalNameStr( const String& rFile, const String& rName,
++ const sal_Unicode cSep, bool bODF )
+ {
+- String aStr, aFile = rFile;
++ String aFile( rFile);
+ aFile.SearchAndReplaceAllAscii("'", String::CreateFromAscii("''"));
+- aStr.Append(sal_Unicode('\''));
+- aStr.Append(aFile);
+- aStr.Append(sal_Unicode('\''));
+- aStr.Append(cSep);
+- aStr.Append(rName);
+- return aStr;
++ rtl::OUStringBuffer aBuf( aFile.Len() + rName.Len() + 5);
++ if (bODF)
++ aBuf.append( sal_Unicode( '['));
++ aBuf.append( sal_Unicode( '\''));
++ aBuf.append( aFile);
++ aBuf.append( sal_Unicode( '\''));
++ aBuf.append( cSep);
++ aBuf.append( rName);
++ if (bODF)
++ aBuf.append( sal_Unicode(']'));
++ return String( aBuf.makeStringAndClear());
+ }
+
+ static bool lcl_getLastTabName( String& rTabName2, const String& rTabName1,
+@@ -1561,7 +1567,7 @@ struct ConventionOOO_A1 : public Convention_A1
+
+ virtual String makeExternalNameStr( const String& rFile, const String& rName ) const
+ {
+- return lcl_makeExternalNameStr(rFile, rName, sal_Unicode('#'));
++ return lcl_makeExternalNameStr( rFile, rName, sal_Unicode('#'), false);
+ }
+
+ bool makeExternalSingleRefStr( ::rtl::OUStringBuffer& rBuffer, sal_uInt16 nFileId,
+@@ -1598,40 +1604,67 @@ struct ConventionOOO_A1 : public Convention_A1
+ return true;
+ }
+
+- virtual void makeExternalRefStr( ::rtl::OUStringBuffer& rBuffer, const ScCompiler& rCompiler,
++ void makeExternalRefStrImpl( ::rtl::OUStringBuffer& rBuffer, const ScCompiler& rCompiler,
+ sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef,
+- ScExternalRefManager* pRefMgr ) const
++ ScExternalRefManager* pRefMgr, bool bODF ) const
+ {
+ SingleRefData aRef(rRef);
+ aRef.CalcAbsIfRel(rCompiler.GetPos());
+
++ if (bODF)
++ rBuffer.append( sal_Unicode('['));
+ makeExternalSingleRefStr(rBuffer, nFileId, rTabName, aRef, pRefMgr, true);
++ if (bODF)
++ rBuffer.append( sal_Unicode(']'));
+ }
+
+ virtual void makeExternalRefStr( ::rtl::OUStringBuffer& rBuffer, const ScCompiler& rCompiler,
+- sal_uInt16 nFileId, const String& rTabName, const ComplRefData& rRef,
++ sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef,
+ ScExternalRefManager* pRefMgr ) const
+ {
++ makeExternalRefStrImpl( rBuffer, rCompiler, nFileId, rTabName, rRef, pRefMgr, false);
++ }
++
++ void makeExternalRefStrImpl( ::rtl::OUStringBuffer& rBuffer, const ScCompiler& rCompiler,
++ sal_uInt16 nFileId, const String& rTabName, const ComplRefData& rRef,
++ ScExternalRefManager* pRefMgr, bool bODF ) const
++ {
+ ComplRefData aRef(rRef);
+ aRef.CalcAbsIfRel(rCompiler.GetPos());
+
+- if (!makeExternalSingleRefStr(rBuffer, nFileId, rTabName, aRef.Ref1, pRefMgr, true))
+- return;
++ if (bODF)
++ rBuffer.append( sal_Unicode('['));
++ // Ensure that there's always a closing bracket, no premature returns.
++ do
++ {
++ if (!makeExternalSingleRefStr(rBuffer, nFileId, rTabName, aRef.Ref1, pRefMgr, true))
++ break;
+
+- rBuffer.append(sal_Unicode(':'));
++ rBuffer.append(sal_Unicode(':'));
+
+- // Get the name of the last table.
+- const vector<String>* pTabNames = pRefMgr->getAllCachedTableNames(nFileId);
+- if (!pTabNames)
+- return;
++ // Get the name of the last table.
++ const vector<String>* pTabNames = pRefMgr->getAllCachedTableNames(nFileId);
++ if (!pTabNames)
++ break;
+
+- String aLastTabName;
+- if (!lcl_getLastTabName(aLastTabName, rTabName, *pTabNames, aRef))
+- {
+- rBuffer.append(aLastTabName);
+- return;
+- }
+- makeExternalSingleRefStr(rBuffer, nFileId, aLastTabName, aRef.Ref2, pRefMgr, (aRef.Ref1.nTab != aRef.Ref2.nTab));
++ String aLastTabName;
++ if (!lcl_getLastTabName(aLastTabName, rTabName, *pTabNames, aRef))
++ {
++ rBuffer.append(aLastTabName);
++ break;
++ }
++ makeExternalSingleRefStr( rBuffer, nFileId, aLastTabName,
++ aRef.Ref2, pRefMgr, (aRef.Ref1.nTab != aRef.Ref2.nTab));
++ } while (0);
++ if (bODF)
++ rBuffer.append( sal_Unicode(']'));
++ }
++
++ virtual void makeExternalRefStr( ::rtl::OUStringBuffer& rBuffer, const ScCompiler& rCompiler,
++ sal_uInt16 nFileId, const String& rTabName, const ComplRefData& rRef,
++ ScExternalRefManager* pRefMgr ) const
++ {
++ makeExternalRefStrImpl( rBuffer, rCompiler, nFileId, rTabName, rRef, pRefMgr, false);
+ }
+ };
+
+@@ -1651,6 +1684,25 @@ struct ConventionOOO_A1_ODF : public ConventionOOO_A1
+ {
+ MakeRefStrImpl( rBuffer, rComp, rRef, bSingleRef, true);
+ }
++
++ virtual String makeExternalNameStr( const String& rFile, const String& rName ) const
++ {
++ return lcl_makeExternalNameStr( rFile, rName, sal_Unicode('#'), true);
++ }
++
++ virtual void makeExternalRefStr( ::rtl::OUStringBuffer& rBuffer, const ScCompiler& rCompiler,
++ sal_uInt16 nFileId, const String& rTabName, const SingleRefData& rRef,
++ ScExternalRefManager* pRefMgr ) const
++ {
++ makeExternalRefStrImpl( rBuffer, rCompiler, nFileId, rTabName, rRef, pRefMgr, true);
++ }
++
++ virtual void makeExternalRefStr( ::rtl::OUStringBuffer& rBuffer, const ScCompiler& rCompiler,
++ sal_uInt16 nFileId, const String& rTabName, const ComplRefData& rRef,
++ ScExternalRefManager* pRefMgr ) const
++ {
++ makeExternalRefStrImpl( rBuffer, rCompiler, nFileId, rTabName, rRef, pRefMgr, true);
++ }
+ };
+
+ static const ConventionOOO_A1_ODF ConvOOO_A1_ODF;
+@@ -1762,7 +1814,7 @@ struct ConventionXL
+
+ static String makeExternalNameStr( const String& rFile, const String& rName )
+ {
+- return lcl_makeExternalNameStr(rFile, rName, sal_Unicode('!'));
++ return lcl_makeExternalNameStr( rFile, rName, sal_Unicode('!'), false);
+ }
+
+ static void makeExternalDocStr( ::rtl::OUStringBuffer& rBuffer, const String& rFullName )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]