summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-06 06:50:22 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-06 07:56:55 +0100
commit47ec29ae934c82a58436bca0511117503568e907 (patch)
tree4b55c73bd2f6ac08ddb4052c5fbe9ea52f234d13 /sc/source/ui
parenta26217815d4e69ec2485c370dfef0fbb41d6c8ab (diff)
prevent non-3D refs from being accepted in chart2, related fdo#61781
Change-Id: I4c7f79393721bff3d5e6fda98b8d4bf16a5ee398
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index fd2961fa4b14..ccb152484ff5 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -34,6 +34,7 @@
#include "chartlis.hxx"
#include "stlalgorithm.hxx"
#include "tokenuno.hxx"
+#include "docsh.hxx"
#include "formula/opcode.hxx"
@@ -1052,7 +1053,7 @@ void ScChart2DataProvider::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
vector<ScTokenRef> aTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
ScRefTokenHelper::compileRangeRepresentation(
- aTokens, aRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar());
+ aTokens, aRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar(), true);
return !aTokens.empty();
}
@@ -1481,7 +1482,7 @@ ScChart2DataProvider::createDataSource(
vector<ScTokenRef> aRefTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
ScRefTokenHelper::compileRangeRepresentation(
- aRefTokens, aRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar());
+ aRefTokens, aRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar(), true);
if (aRefTokens.empty())
// Invalid range representation. Bail out.
throw lang::IllegalArgumentException();
@@ -1815,7 +1816,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
vector<ScTokenRef> aTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
ScRefTokenHelper::compileRangeRepresentation(
- aTokens, xLabel->getSourceRangeRepresentation(), m_pDocument, cSep, m_pDocument->GetGrammar());
+ aTokens, xLabel->getSourceRangeRepresentation(), m_pDocument, cSep, m_pDocument->GetGrammar(), true);
aLabel.initRangeAnalyzer(aTokens);
vector<ScTokenRef>::const_iterator itr = aTokens.begin(), itrEnd = aTokens.end();
for (; itr != itrEnd; ++itr)
@@ -1834,7 +1835,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
vector<ScTokenRef> aTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
ScRefTokenHelper::compileRangeRepresentation(
- aTokens, xValues->getSourceRangeRepresentation(), m_pDocument, cSep, m_pDocument->GetGrammar());
+ aTokens, xValues->getSourceRangeRepresentation(), m_pDocument, cSep, m_pDocument->GetGrammar(), true);
aValues.initRangeAnalyzer(aTokens);
vector<ScTokenRef>::const_iterator itr = aTokens.begin(), itrEnd = aTokens.end();
for (; itr != itrEnd; ++itr)
@@ -2043,7 +2044,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
vector<ScTokenRef> aTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
ScRefTokenHelper::compileRangeRepresentation(
- aTokens, aRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar());
+ aTokens, aRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar(), true);
return !aTokens.empty();
}
@@ -2063,7 +2064,7 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL
vector<ScTokenRef> aRefTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
ScRefTokenHelper::compileRangeRepresentation(
- aRefTokens, aRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar());
+ aRefTokens, aRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar(), true);
if (aRefTokens.empty())
return xResult;
@@ -2234,7 +2235,7 @@ rtl::OUString SAL_CALL ScChart2DataProvider::convertRangeToXML( const rtl::OUStr
vector<ScTokenRef> aRefTokens;
const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
ScRefTokenHelper::compileRangeRepresentation(
- aRefTokens, sRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar());
+ aRefTokens, sRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar(), true);
if (aRefTokens.empty())
throw lang::IllegalArgumentException();