summaryrefslogtreecommitdiff
path: root/xmloff/source/chart/SchXMLChartContext.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/chart/SchXMLChartContext.cxx')
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx55
1 files changed, 29 insertions, 26 deletions
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 6cf1b5c7e2..f0d498823b 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -131,7 +132,7 @@ void lcl_setRoleAtLabeledSequence(
{
uno::Reference< beans::XPropertySet > xProp( xValues, uno::UNO_QUERY );
if( xProp.is())
- xProp->setPropertyValue(OUString::createFromAscii("Role"), uno::makeAny( rRole ));
+ xProp->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM( "Role" )), uno::makeAny( rRole ));
}
}
@@ -277,7 +278,7 @@ uno::Sequence< sal_Int32 > lcl_getNumberSequenceFromString( const ::rtl::OUStrin
} // anonymous namespace
-static __FAR_DATA SvXMLEnumMapEntry aXMLLegendAlignmentMap[] =
+static SvXMLEnumMapEntry aXMLLegendAlignmentMap[] =
{
// { XML_LEFT, chart::ChartLegendPosition_LEFT },
// #i35421#
@@ -422,9 +423,9 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut
{
try
{
- xDocProp->getPropertyValue( ::rtl::OUString::createFromAscii("BaseDiagram")) >>= aOldChartTypeName;
+ xDocProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "BaseDiagram" ))) >>= aOldChartTypeName;
maChartTypeServiceName = SchXMLTools::GetNewChartTypeName( aOldChartTypeName );
- xDocProp->setPropertyValue( rtl::OUString::createFromAscii( "RefreshAddInAllowed" ) , uno::makeAny( sal_False) );
+ xDocProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RefreshAddInAllowed" )) , uno::makeAny( sal_False) );
}
catch( uno::Exception & )
{
@@ -702,15 +703,15 @@ void lcl_ApplyDataFromRectangularRangeToDiagram(
uno::Sequence< beans::PropertyValue > aArgs( 3 );
aArgs[0] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("CellRangeRepresentation"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CellRangeRepresentation" )),
-1, uno::makeAny( rRectangularRange ),
beans::PropertyState_DIRECT_VALUE );
aArgs[1] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("DataRowSource"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DataRowSource" )),
-1, uno::makeAny( eDataRowSource ),
beans::PropertyState_DIRECT_VALUE );
aArgs[2] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("FirstCellAsLabel"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FirstCellAsLabel" )),
-1, uno::makeAny( bFirstCellAsLabel ),
beans::PropertyState_DIRECT_VALUE );
@@ -718,7 +719,7 @@ void lcl_ApplyDataFromRectangularRangeToDiagram(
{
aArgs.realloc( aArgs.getLength() + 1 );
aArgs[ aArgs.getLength() - 1 ] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("SequenceMapping"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SequenceMapping" )),
-1, uno::makeAny( sColTrans.getLength()
? lcl_getNumberSequenceFromString( sColTrans, bHasCateories && !xNewDoc->hasInternalDataProvider() )
: lcl_getNumberSequenceFromString( sRowTrans, bHasCateories && !xNewDoc->hasInternalDataProvider() ) ),
@@ -744,7 +745,7 @@ void lcl_ApplyDataFromRectangularRangeToDiagram(
{
aArgs.realloc( aArgs.getLength() + 1 );
aArgs[ aArgs.getLength() - 1 ] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("ChartOleObjectName"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ChartOleObjectName" )),
-1, uno::makeAny( aChartOleObjectName ),
beans::PropertyState_DIRECT_VALUE );
}
@@ -756,7 +757,7 @@ void lcl_ApplyDataFromRectangularRangeToDiagram(
aArgs.realloc( aArgs.getLength() + 1 );
aArgs[ aArgs.getLength() - 1 ] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("HasCategories"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasCategories" )),
-1, uno::makeAny( bHasCateories ),
beans::PropertyState_DIRECT_VALUE );
@@ -835,9 +836,9 @@ void SchXMLChartContext::EndElement()
return;
bool bHasOwnData = false;
- if( m_aXLinkHRefAttributeToIndicateDataProvider.equalsAscii( "." ) ) //data comes from the chart itself
+ if( m_aXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "." ) ) ) //data comes from the chart itself
bHasOwnData = true;
- else if( m_aXLinkHRefAttributeToIndicateDataProvider.equalsAscii( ".." ) ) //data comes from the parent application
+ else if( m_aXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".." ) ) ) //data comes from the parent application
bHasOwnData = false;
else if( m_aXLinkHRefAttributeToIndicateDataProvider.getLength() ) //not supported so far to get the data by sibling objects -> fall back to chart itself if data are available
bHasOwnData = m_bHasTableElement;
@@ -846,7 +847,7 @@ void SchXMLChartContext::EndElement()
if( xNewDoc->hasInternalDataProvider())
{
- if( !m_bHasTableElement && !m_aXLinkHRefAttributeToIndicateDataProvider.equalsAscii( "." ) )
+ if( !m_bHasTableElement && !m_aXLinkHRefAttributeToIndicateDataProvider.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "." ) ) )
{
//#i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area
bool bSwitchSuccessful = SchXMLTools::switchBackToDataProviderFromParent( xNewDoc, maLSequencesPerIndex );
@@ -860,7 +861,7 @@ void SchXMLChartContext::EndElement()
xNewDoc->createInternalDataProvider( sal_False /* bCloneExistingData */ );
}
if( bHasOwnData )
- msChartAddress = ::rtl::OUString::createFromAscii("all");
+ msChartAddress = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "all" ));
bool bSwitchRangesFromOuterToInternalIfNecessary = false;
if( !bHasOwnData && mbAllRangeAddressesAvailable )
@@ -908,7 +909,7 @@ void SchXMLChartContext::EndElement()
if(!bHasOwnData)
{
bHasOwnData = true;
- msChartAddress = ::rtl::OUString::createFromAscii("all");
+ msChartAddress = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "all" ));
if( !xNewDoc->hasInternalDataProvider() )
{
xNewDoc->createInternalDataProvider( sal_False /* bCloneExistingData */ );
@@ -993,7 +994,7 @@ void SchXMLChartContext::EndElement()
}
if( xProp.is())
- xProp->setPropertyValue( rtl::OUString::createFromAscii( "RefreshAddInAllowed" ) , uno::makeAny( sal_True) );
+ xProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "RefreshAddInAllowed" )) , uno::makeAny( sal_True) );
}
void SchXMLChartContext::MergeSeriesForStockChart()
@@ -1022,7 +1023,7 @@ void SchXMLChartContext::MergeSeriesForStockChart()
{
xDSContainer.set( aChartTypes[nCTIdx], uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xCTProp( aChartTypes[nCTIdx], uno::UNO_QUERY_THROW );
- xCTProp->getPropertyValue( ::rtl::OUString::createFromAscii("Japanese")) >>= bHasJapaneseCandlestick;
+ xCTProp->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Japanese" ))) >>= bHasJapaneseCandlestick;
break;
}
}
@@ -1044,27 +1045,27 @@ void SchXMLChartContext::MergeSeriesForStockChart()
if( bHasJapaneseCandlestick )
{
// open values
- lcl_setRoleAtFirstSequence( aSeriesSeq[ nSeriesIndex ], OUString::createFromAscii("values-first"));
+ lcl_setRoleAtFirstSequence( aSeriesSeq[ nSeriesIndex ], OUString(RTL_CONSTASCII_USTRINGPARAM( "values-first" )));
aNewSeries[i] = aSeriesSeq[ nSeriesIndex ];
// low values
lcl_MoveDataToCandleStickSeries(
uno::Reference< chart2::data::XDataSource >( aSeriesSeq[ ++nSeriesIndex ], uno::UNO_QUERY_THROW ),
- aNewSeries[i], OUString::createFromAscii("values-min"));
+ aNewSeries[i], OUString(RTL_CONSTASCII_USTRINGPARAM( "values-min" )));
}
else
{
// low values
- lcl_setRoleAtFirstSequence( aSeriesSeq[ nSeriesIndex ], OUString::createFromAscii("values-min"));
+ lcl_setRoleAtFirstSequence( aSeriesSeq[ nSeriesIndex ], OUString(RTL_CONSTASCII_USTRINGPARAM( "values-min" )));
aNewSeries[i] = aSeriesSeq[ nSeriesIndex ];
}
// high values
lcl_MoveDataToCandleStickSeries(
uno::Reference< chart2::data::XDataSource >( aSeriesSeq[ ++nSeriesIndex ], uno::UNO_QUERY_THROW ),
- aNewSeries[i], OUString::createFromAscii("values-max"));
+ aNewSeries[i], OUString(RTL_CONSTASCII_USTRINGPARAM( "values-max" )));
// close values
lcl_MoveDataToCandleStickSeries(
uno::Reference< chart2::data::XDataSource >( aSeriesSeq[ ++nSeriesIndex ], uno::UNO_QUERY_THROW ),
- aNewSeries[i], OUString::createFromAscii("values-last"));
+ aNewSeries[i], OUString(RTL_CONSTASCII_USTRINGPARAM( "values-last" )));
}
xDSContainer->setDataSeries( aNewSeries );
}
@@ -1107,7 +1108,7 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext(
{
if( xProp.is())
{
- xProp->setPropertyValue( rtl::OUString::createFromAscii( "HasMainTitle" ), aTrueBool );
+ xProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasMainTitle" )), aTrueBool );
}
uno::Reference< drawing::XShape > xTitleShape( xDoc->getTitle(), uno::UNO_QUERY );
pContext = new SchXMLTitleContext( mrImportHelper, GetImport(),
@@ -1120,7 +1121,7 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext(
{
if( xProp.is())
{
- xProp->setPropertyValue( rtl::OUString::createFromAscii( "HasSubTitle" ), aTrueBool );
+ xProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasSubTitle" )), aTrueBool );
}
uno::Reference< drawing::XShape > xTitleShape( xDoc->getSubTitle(), uno::UNO_QUERY );
pContext = new SchXMLTitleContext( mrImportHelper, GetImport(),
@@ -1340,7 +1341,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu
aTrueBool <<= (sal_Bool)(sal_True);
try
{
- xDocProp->setPropertyValue( rtl::OUString::createFromAscii( "HasLegend" ), aTrueBool );
+ xDocProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HasLegend" )), aTrueBool );
}
catch( beans::UnknownPropertyException )
{
@@ -1380,7 +1381,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu
{
uno::Any aAny;
aAny <<= (chart::ChartLegendPosition)(nEnumVal);
- xProp->setPropertyValue( rtl::OUString::createFromAscii( "Alignment" ), aAny );
+ xProp->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Alignment" )), aAny );
}
}
catch( beans::UnknownPropertyException )
@@ -1430,3 +1431,5 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu
SchXMLLegendContext::~SchXMLLegendContext()
{
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */