summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorGert Faller <gertfaller@aliceadsl.fr>2010-11-28 18:35:13 +0100
committerGert Faller <gertfaller@aliceadsl.fr>2010-11-28 18:35:13 +0100
commit3f8861ce64ba6b43b7871c0a365a145bfa1bbf08 (patch)
tree7cd9317f69df2efea85b03cf0f1d2d7af6c4a6b1 /oox
parentb7aae00f598c1d9b23f95198362d3482e5b53b0c (diff)
RTL_CONSTASCII_USTRINGPARAM in filters 12
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/xmlfilterbase.cxx2
-rw-r--r--oox/source/drawingml/shape.cxx12
-rw-r--r--oox/source/export/SchXMLSeriesHelper.cxx6
-rw-r--r--oox/source/export/chartexport.cxx32
-rw-r--r--oox/source/ppt/pptshape.cxx4
-rw-r--r--oox/source/vml/vmlshape.cxx20
-rw-r--r--oox/source/vml/vmlshapecontext.cxx4
-rw-r--r--oox/source/xls/commentsbuffer.cxx2
8 files changed, 41 insertions, 41 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 37e26f415ca4..c07e3dbf6725 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -142,7 +142,7 @@ static Reference< XComponentContext > lcl_getComponentContext(Reference< XMultiS
{
Reference< XPropertySet > xFactProp( aFactory, UNO_QUERY );
if( xFactProp.is() )
- xFactProp->getPropertyValue( OUString::createFromAscii("DefaultContext") ) >>= xContext;
+ xFactProp->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext;
}
catch( Exception& )
{}
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index d7b2bc7b1bb2..86726ea1efae 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -246,7 +246,7 @@ Reference< XShape > Shape::createAndInsert(
OUString aServiceName = rServiceName;
if( mxCreateCallback.get() )
aServiceName = mxCreateCallback->onCreateXShape( aServiceName, awt::Rectangle( aPosition.X / 360, aPosition.Y / 360, aSize.Width / 360, aSize.Height / 360 ) );
- sal_Bool bIsCustomShape = aServiceName == OUString::createFromAscii( "com.sun.star.drawing.CustomShape" );
+ sal_Bool bIsCustomShape = aServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape"));
basegfx::B2DHomMatrix aTransformation;
if( aSize.Width != 1 || aSize.Height != 1)
@@ -289,7 +289,7 @@ Reference< XShape > Shape::createAndInsert(
}
// special for lineshape
- if ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.LineShape" ) )
+ if ( aServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.LineShape")) )
{
::basegfx::B2DPolygon aPoly;
aPoly.insert( 0, ::basegfx::B2DPoint( 0, 0 ) );
@@ -310,7 +310,7 @@ Reference< XShape > Shape::createAndInsert(
maShapeProperties[ PROP_PolyPolygon ] <<= aPolyPolySequence;
}
- else if ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.ConnectorShape" ) )
+ else if ( aServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ConnectorShape")) )
{
::basegfx::B2DPolygon aPoly;
aPoly.insert( 0, ::basegfx::B2DPoint( 0, 0 ) );
@@ -438,9 +438,9 @@ Reference< XShape > Shape::createAndInsert(
// applying properties
PropertySet aPropSet( xSet );
- if ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.GraphicObjectShape" ) )
+ if ( aServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicObjectShape")) )
mpGraphicPropertiesPtr->pushToPropSet( aPropSet, rGraphicHelper );
- if ( mpTablePropertiesPtr.get() && ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.TableShape" ) ) )
+ if ( mpTablePropertiesPtr.get() && ( aServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.TableShape")) ) )
mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, mpMasterTextListStyle );
aFillProperties.pushToPropSet( aPropSet, rModelObjectHelper, rGraphicHelper, FillProperties::DEFAULT_IDS, mnRotation, nFillPhClr );
aLineProperties.pushToPropSet( aPropSet, rModelObjectHelper, rGraphicHelper, LineProperties::DEFAULT_IDS, nLinePhClr );
@@ -455,7 +455,7 @@ Reference< XShape > Shape::createAndInsert(
xSet->setPropertyValue( rPropName, Any( false ) );
// do not set properties at a group shape (this causes assertions from svx)
- if( aServiceName != OUString::createFromAscii( "com.sun.star.drawing.GroupShape" ) )
+ if( aServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GroupShape")) )
aPropSet.setProperties( aShapeProperties );
if( bIsCustomShape )
diff --git a/oox/source/export/SchXMLSeriesHelper.cxx b/oox/source/export/SchXMLSeriesHelper.cxx
index c755a5338892..83111ec6b0fc 100644
--- a/oox/source/export/SchXMLSeriesHelper.cxx
+++ b/oox/source/export/SchXMLSeriesHelper.cxx
@@ -207,7 +207,7 @@ Reference< chart2::XDataSeries > SchXMLSeriesHelper::getFirstCandleStickSeries(
for( sal_Int32 nCTIdx=0; !xResult.is() && nCTIdx<aCTSeq.getLength(); ++nCTIdx )
{
if( aCTSeq[nCTIdx]->getChartType().equals(
- ::rtl::OUString::createFromAscii("com.sun.star.chart2.CandleStickChartType")))
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.CandleStickChartType"))))
{
Reference< chart2::XDataSeriesContainer > xSeriesCnt( aCTSeq[nCTIdx], uno::UNO_QUERY_THROW );
Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesCnt->getDataSeries() );
@@ -240,7 +240,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPISeriesProp
if( xFactory.is() )
{
xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance(
- OUString::createFromAscii( "com.sun.star.comp.chart2.DataSeriesWrapper" ) ), uno::UNO_QUERY );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.chart2.DataSeriesWrapper")) ), uno::UNO_QUERY );
Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
if(xInit.is())
{
@@ -277,7 +277,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointP
if( xFactory.is() )
{
xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance(
- OUString::createFromAscii( "com.sun.star.comp.chart2.DataSeriesWrapper" ) ), uno::UNO_QUERY );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.chart2.DataSeriesWrapper")) ), uno::UNO_QUERY );
Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
if(xInit.is())
{
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 524b728bc106..fb91d8093ffa 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -142,7 +142,7 @@ Reference< uno::XComponentContext > lcl_getComponentContext()
{
Reference< beans::XPropertySet > xFactProp( comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
if( xFactProp.is())
- xFactProp->getPropertyValue(OUString::createFromAscii("DefaultContext")) >>= xContext;
+ xFactProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext"))) >>= xContext;
}
catch( uno::Exception& )
{}
@@ -231,7 +231,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen
{
Sequence< Reference< chart2::data::XLabeledDataSequence > > aUnusedSequences( xDiagram->getUnusedData() );
- lcl_MatchesRole aHasCategories( OUString::createFromAscii("categories" ) );
+ lcl_MatchesRole aHasCategories( OUString(RTL_CONSTASCII_USTRINGPARAM("categories")) );
for( sal_Int32 nN=0; nN<aUnusedSequences.getLength(); nN++ )
{
if( aHasCategories( aUnusedSequences[nN] ) )
@@ -254,7 +254,7 @@ Reference< chart2::data::XDataSource > lcl_createDataSource(
if( xContext.is() )
xSink.set(
xContext->getServiceManager()->createInstanceWithContext(
- OUString::createFromAscii("com.sun.star.chart2.data.DataSource"),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.data.DataSource")),
xContext ), uno::UNO_QUERY_THROW );
if( xSink.is())
xSink->setData( aData );
@@ -320,12 +320,12 @@ Reference< chart2::data::XDataSource > lcl_pressUsedDataIntoRectangularFormat( c
//the first x-values is always the next sequence //todo ... other x-values get lost for old format
Reference< chart2::data::XLabeledDataSequence > xXValues(
- lcl_getDataSequenceByRole( aSeriesSeqVector, OUString::createFromAscii("values-x" ) ) );
+ lcl_getDataSequenceByRole( aSeriesSeqVector, OUString(RTL_CONSTASCII_USTRINGPARAM("values-x")) ) );
if( xXValues.is() )
aLabeledSeqVector.push_back( xXValues );
//add all other sequences now without x-values
- lcl_MatchesRole aHasXValues( OUString::createFromAscii("values-x" ) );
+ lcl_MatchesRole aHasXValues( OUString(RTL_CONSTASCII_USTRINGPARAM("values-x")) );
for( sal_Int32 nN=0; nN<aSeriesSeqVector.getLength(); nN++ )
{
if( !aHasXValues( aSeriesSeqVector[nN] ) )
@@ -641,7 +641,7 @@ OUString ChartExport::parseFormula( const OUString& rRange )
{
try
{
- xParser.set( xSF->createInstance( OUString::createFromAscii( "com.sun.star.sheet.FormulaParser" ) ), UNO_QUERY );
+ xParser.set( xSF->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.FormulaParser")) ), UNO_QUERY );
}
catch( Exception& )
{
@@ -653,12 +653,12 @@ OUString ChartExport::parseFormula( const OUString& rRange )
Reference< XPropertySet > xParserProps( xParser, uno::UNO_QUERY );
if( xParserProps.is() )
{
- xParserProps->setPropertyValue( OUString::createFromAscii("FormulaConvention"), uno::makeAny(::com::sun::star::sheet::AddressConvention::OOO) );
+ xParserProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FormulaConvention")), uno::makeAny(::com::sun::star::sheet::AddressConvention::OOO) );
}
uno::Sequence<sheet::FormulaToken> aTokens = xParser->parseFormula( rRange, CellAddress( 0, 0, 0 ) );
if( xParserProps.is() )
{
- xParserProps->setPropertyValue( OUString::createFromAscii("FormulaConvention"), uno::makeAny(::com::sun::star::sheet::AddressConvention::XL_OOX) );
+ xParserProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FormulaConvention")), uno::makeAny(::com::sun::star::sheet::AddressConvention::XL_OOX) );
}
aResult = xParser->printFormula( aTokens, CellAddress( 0, 0, 0 ) );
}
@@ -878,7 +878,7 @@ void ChartExport::_ExportContent()
if( xServ.is())
{
if( xServ->supportsService(
- OUString::createFromAscii( "com.sun.star.chart.ChartTableAddressSupplier" )))
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.ChartTableAddressSupplier"))))
{
Reference< beans::XPropertySet > xProp( xServ, uno::UNO_QUERY );
if( xProp.is())
@@ -888,13 +888,13 @@ void ChartExport::_ExportContent()
{
OUString sChartAddress;
aAny = xProp->getPropertyValue(
- OUString::createFromAscii( "ChartRangeAddress" ));
+ OUString(RTL_CONSTASCII_USTRINGPARAM("ChartRangeAddress")));
aAny >>= msChartAddress;
//maExportHelper.SetChartRangeAddress( sChartAddress );
OUString sTableNumberList;
aAny = xProp->getPropertyValue(
- OUString::createFromAscii( "TableNumberList" ));
+ OUString(RTL_CONSTASCII_USTRINGPARAM("TableNumberList")));
aAny >>= msTableNumberList;
//maExportHelper.SetTableNumberList( sTableNumberList );
@@ -1604,7 +1604,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
sal_Bool bJapaneseCandleSticks = sal_False;
Reference< beans::XPropertySet > xCTProp( xChartType, uno::UNO_QUERY );
if( xCTProp.is())
- xCTProp->getPropertyValue( OUString::createFromAscii("Japanese")) >>= bJapaneseCandleSticks;
+ xCTProp->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Japanese"))) >>= bJapaneseCandleSticks;
exportCandleStickSeries(
xDSCnt->getDataSeries(), bJapaneseCandleSticks, nAttachedAxis );
return;
@@ -1636,7 +1636,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
{
Reference< beans::XPropertySet > xSeqProp( xTempValueSeq, uno::UNO_QUERY );
if( xSeqProp.is())
- xSeqProp->getPropertyValue(OUString::createFromAscii("Role")) >>= aRole;
+ xSeqProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Role"))) >>= aRole;
// "main" sequence
if( aRole.equals( aLabelRole ))
{
@@ -1731,7 +1731,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
|| (eChartType == chart::TYPEID_BUBBLE) )
{
// export xVal
- Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString::createFromAscii("values-x" ) ) );
+ Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM("values-x")) ) );
if( xSequence.is() )
{
Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() );
@@ -1744,7 +1744,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
if( eChartType == chart::TYPEID_BUBBLE )
{
// export yVal
- Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString::createFromAscii("values-y" ) ) );
+ Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM("values-y")) ) );
if( xSequence.is() )
{
Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() );
@@ -1791,7 +1791,7 @@ void ChartExport::exportCandleStickSeries(
xSource->getDataSequences());
//sal_Int32 nSeriesLength =
- // lcl_getSequenceLengthByRole( aSeqCnt, OUString::createFromAscii("values-last"));
+ // lcl_getSequenceLengthByRole( aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM("values-last")));
Reference< chart2::XChartDocument > xNewDoc( getModel(), uno::UNO_QUERY );
const char* sSeries[] = {"values-first","values-max","values-min","values-last",0};
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 2542a372ce61..2c6b383a2489 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -84,8 +84,8 @@ void PPTShape::addShape(
Reference< lang::XMultiServiceFactory > xServiceFact( rFilterBase.getModel(), UNO_QUERY_THROW );
sal_Bool bClearText = sal_False;
- if ( sServiceName != OUString::createFromAscii( "com.sun.star.drawing.GraphicObjectShape" ) &&
- sServiceName != OUString::createFromAscii( "com.sun.star.drawing.OLE2Shape" ) )
+ if ( sServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicObjectShape")) &&
+ sServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape")) )
{
switch( mnSubType )
{
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 3f5bc4d00f41..adbf9db205fa 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -171,22 +171,22 @@ void lclSetXShapeRect( const Reference< XShape >& rxShape, const Rectangle& rSha
try
{
// The size
- xProps->setPropertyValue( OUString::createFromAscii( "SizeType" ), Any( SizeType::FIX ) );
- xProps->setPropertyValue( OUString::createFromAscii( "FrameIsAutomaticHeight" ), Any( sal_False ) );
- xProps->setPropertyValue( OUString::createFromAscii( "Height" ), Any( rShapeRect.Height ) );
- xProps->setPropertyValue( OUString::createFromAscii( "Width" ), Any( rShapeRect.Width ) );
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("SizeType")), Any( SizeType::FIX ) );
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutomaticHeight")), Any( sal_False ) );
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Height")), Any( rShapeRect.Height ) );
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Width")), Any( rShapeRect.Width ) );
// The position
- xProps->setPropertyValue( OUString::createFromAscii( "HoriOrientPosition" ), Any( rShapeRect.X ) );
- xProps->setPropertyValue( OUString::createFromAscii( "HoriOrientRelation" ),
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition")), Any( rShapeRect.X ) );
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientRelation")),
Any( RelOrientation::FRAME ) );
- xProps->setPropertyValue( OUString::createFromAscii( "HoriOrient" ),
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrient")),
Any( HoriOrientation::NONE ) );
- xProps->setPropertyValue( OUString::createFromAscii( "VertOrientPosition" ), Any( rShapeRect.Y ) );
- xProps->setPropertyValue( OUString::createFromAscii( "VertOrientRelation" ),
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")), Any( rShapeRect.Y ) );
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientRelation")),
Any( RelOrientation::FRAME ) );
- xProps->setPropertyValue( OUString::createFromAscii( "VertOrient" ),
+ xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrient")),
Any( VertOrientation::NONE ) );
}
catch ( Exception& )
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index bdca6526ab6a..9a20ab40151c 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -294,7 +294,7 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 nElement, const Attri
// Custom shape in Writer with a textbox are transformed into a frame
if ( nElement == ( NMSP_VML + XML_textbox ) )
dynamic_cast<SimpleShape&>( mrShape ).setService(
- OUString::createFromAscii( "com.sun.star.text.TextFrame" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame")) );
// Excel specific shape client data
if( isRootElement() && (nElement == VMLX_TOKEN( ClientData )) )
@@ -342,7 +342,7 @@ ContextHandlerRef RectangleShapeContext::onCreateContext( sal_Int32 nElement, co
{
if ( nElement == ( NMSP_VML + XML_textbox ) )
dynamic_cast< SimpleShape &>( mrShape ).setService(
- OUString::createFromAscii( "com.sun.star.text.TextFrame" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame")) );
// The parent class's context is fine
return ShapeContext::onCreateContext( nElement, rAttribs );
diff --git a/oox/source/xls/commentsbuffer.cxx b/oox/source/xls/commentsbuffer.cxx
index 159bde83b22c..035c14a606ec 100644
--- a/oox/source/xls/commentsbuffer.cxx
+++ b/oox/source/xls/commentsbuffer.cxx
@@ -211,7 +211,7 @@ void Comment::finalizeImport()
Reference< XShape > xAnnoShape( xAnnoShapeSupp->getAnnotationShape(), UNO_SET_THROW );
Reference <XText> xText( xAnnoShape, UNO_QUERY_THROW );
Reference <XTextRange> xTextRange( xText, UNO_QUERY_THROW );
- xTextRange->setString( OUString::createFromAscii("") ); // Clear contents
+ xTextRange->setString( OUString() ); // Clear contents
maModel.mxText->convert( xText, -1 );
// Add shape formatting properties (autoFill, colHidden and rowHidden are dropped)