summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-06-22 15:47:21 +0200
committerKohei Yoshida <kyoshida@novell.com>2011-07-08 01:18:40 -0400
commit4619e6a8cc6fba268ce46a94fad927a20c44613c (patch)
tree1898a580171958bb67bb6b2d8027d65a4e88e2ce
parent4960acecc71a142ee25ee69cd842ac8cdaeb5b72 (diff)
fix for fdo#37880
we need to save the information if we have a local range name or a global range name in the uno api too Signed-off-by: Kohei Yoshida <kyoshida@novell.com>
-rw-r--r--sc/source/core/tool/token.cxx8
-rw-r--r--sc/source/ui/unoobj/tokenuno.cxx8
2 files changed, 15 insertions, 1 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 8e808197d..0153ca4cd 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -57,6 +57,7 @@ using ::std::vector;
#include <com/sun/star/sheet/ComplexReference.hpp>
#include <com/sun/star/sheet/ExternalReference.hpp>
#include <com/sun/star/sheet/ReferenceFlags.hpp>
+#include <com/sun/star/sheet/NameToken.hpp>
using namespace formula;
using namespace com::sun::star;
@@ -1175,6 +1176,13 @@ bool ScTokenArray::AddFormulaToken(const com::sun::star::sheet::FormulaToken& _a
else
bError = true;
}
+ else if ( aType.equals( cppu::UnoType<sheet::NameToken>::get() ) )
+ {
+ sheet::NameToken aTokenData;
+ _aToken.Data >>= aTokenData;
+ if ( eOpCode == ocName )
+ AddRangeName(aTokenData.Index, aTokenData.Global);
+ }
else if ( aType.equals( cppu::UnoType<sheet::ExternalReference>::get() ) )
{
sheet::ExternalReference aApiExtRef;
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx
index 95e350c18..5f89de8d9 100644
--- a/sc/source/ui/unoobj/tokenuno.cxx
+++ b/sc/source/ui/unoobj/tokenuno.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/sheet/ExternalReference.hpp>
#include <com/sun/star/sheet/ReferenceFlags.hpp>
#include <com/sun/star/sheet/AddressConvention.hpp>
+#include <com/sun/star/sheet/NameToken.hpp>
#include <com/sun/star/table/CellAddress.hpp>
#include <svl/itemprop.hxx>
@@ -395,7 +396,12 @@ bool ScTokenConversion::ConvertToTokenSequence( ScDocument& rDoc,
}
break;
case svIndex:
- rAPI.Data <<= static_cast<sal_Int32>( rToken.GetIndex() );
+ {
+ sheet::NameToken aNameToken;
+ aNameToken.Index = static_cast<sal_Int32>( rToken.GetIndex() );
+ aNameToken.Global = static_cast<sal_Bool>( rToken.GetByte() );
+ rAPI.Data <<= aNameToken;
+ }
break;
case svMatrix:
if (!ScRangeToSequence::FillMixedArray( rAPI.Data, static_cast<const ScToken&>(rToken).GetMatrix(), true))