Kaydet (Commit) cd033b12 authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Markus Mohrhard

we only support simple labels in the InternalDataProvider, bnc#864396

Change-Id: Ie31c5c73bb5185125fd4493c4e476997e2e9bc63
üst 9f2acf24
......@@ -50,6 +50,34 @@ Reference< XDataSequence > DataSequenceConverter::createDataSequence( const OUSt
Reference< XDataSequence > xDataSeq;
if( getChartConverter() )
{
// the internal data table does not support complex labels
// this is only supported in Calc!!!
// merge the labels into a single one
if(rRole == "label")
{
mrModel.mnPointCount = std::min<sal_Int32>(mrModel.mnPointCount, 1);
OUStringBuffer aTitle;
bool bFirst = true;
for(DataSequenceModel::AnyMap::const_iterator itr = mrModel.maData.begin(),
itrEnd = mrModel.maData.end(); itr != itrEnd; ++itr)
{
Any aAny = itr->second;
if(aAny.has<OUString>())
{
if(!bFirst)
aTitle.append(" ");
aTitle.append(aAny.get<OUString>());
bFirst = false;
}
}
if(!bFirst)
{
mrModel.maData.clear();
mrModel.maData.insert(std::make_pair<sal_Int32, Any>(1, Any(aTitle.makeStringAndClear())));
}
}
xDataSeq = getChartConverter()->createDataSequence( getChartDocument()->getDataProvider(), mrModel );
// set sequen ce role
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment