Kaydet (Commit) fc87d57f authored tarafından Noel Grandin's avatar Noel Grandin

replace OUString::reverseCompareTo("xxx") with operator==

operator== with OUString and literal internally does a reverse-compare
(via OUString::equalsAsciiL) anyway, so no need to keep explicit calls
to OUString::reverseCompareTo with literal argument

Change-Id: I799d9bcd0d5c308a9547ce7cacb2db6042fdb643
üst cdb1981b
......@@ -2862,7 +2862,7 @@ Reference< uno::XInterface > ChartView::createInstance( const OUString& aService
SdrModel* pModel = ( m_pDrawModelWrapper ? &m_pDrawModelWrapper->getSdrModel() : NULL );
if ( pModel )
{
if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.DashTable" ) == 0 )
if ( aServiceSpecifier == "com.sun.star.drawing.DashTable" )
{
if ( !m_xDashTable.is() )
{
......@@ -2870,7 +2870,7 @@ Reference< uno::XInterface > ChartView::createInstance( const OUString& aService
}
return m_xDashTable;
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.GradientTable" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.drawing.GradientTable" )
{
if ( !m_xGradientTable.is() )
{
......@@ -2878,7 +2878,7 @@ Reference< uno::XInterface > ChartView::createInstance( const OUString& aService
}
return m_xGradientTable;
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.HatchTable" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.drawing.HatchTable" )
{
if ( !m_xHatchTable.is() )
{
......@@ -2886,7 +2886,7 @@ Reference< uno::XInterface > ChartView::createInstance( const OUString& aService
}
return m_xHatchTable;
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.BitmapTable" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.drawing.BitmapTable" )
{
if ( !m_xBitmapTable.is() )
{
......@@ -2894,7 +2894,7 @@ Reference< uno::XInterface > ChartView::createInstance( const OUString& aService
}
return m_xBitmapTable;
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.TransparencyGradientTable" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.drawing.TransparencyGradientTable" )
{
if ( !m_xTransGradientTable.is() )
{
......@@ -2902,7 +2902,7 @@ Reference< uno::XInterface > ChartView::createInstance( const OUString& aService
}
return m_xTransGradientTable;
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.MarkerTable" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.drawing.MarkerTable" )
{
if ( !m_xMarkerTable.is() )
{
......
......@@ -226,13 +226,13 @@ SvxSimpleUnoModel::~SvxSimpleUnoModel()
uno::Reference< uno::XInterface > SAL_CALL SvxSimpleUnoModel::createInstance( const OUString& aServiceSpecifier )
throw(uno::Exception, uno::RuntimeException)
{
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.text.NumberingRules" ) )
if( aServiceSpecifier == "com.sun.star.text.NumberingRules" )
{
return uno::Reference< uno::XInterface >(
SvxCreateNumRule(), uno::UNO_QUERY );
}
if ( (0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.text.textfield.DateTime" ))
|| (0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.text.TextField.DateTime" ))
if ( aServiceSpecifier == "com.sun.star.text.textfield.DateTime"
|| aServiceSpecifier == "com.sun.star.text.TextField.DateTime"
)
{
return (::cppu::OWeakObject * )new SvxUnoTextField( text::textfield::Type::DATE );
......
......@@ -545,12 +545,12 @@ void FlashExporter::exportShape( Reference< XShape >& xShape, bool bMaster )
if( bMaster )
{
OUString aShapeType( xShape->getShapeType() );
if( (0 == aShapeType.reverseCompareTo( "com.sun.star.presentation.TitleTextShape" )) ||
(0 == aShapeType.reverseCompareTo( "com.sun.star.presentation.OutlinerShape" )) ||
(0 == aShapeType.reverseCompareTo( "com.sun.star.presentation.HeaderShape" )) ||
(0 == aShapeType.reverseCompareTo( "com.sun.star.presentation.FooterShape" )) ||
(0 == aShapeType.reverseCompareTo( "com.sun.star.presentation.SlideNumberShape" )) ||
(0 == aShapeType.reverseCompareTo( "com.sun.star.presentation.DateTimeShape" )))
if( aShapeType == "com.sun.star.presentation.TitleTextShape" ||
aShapeType == "com.sun.star.presentation.OutlinerShape" ||
aShapeType == "com.sun.star.presentation.HeaderShape" ||
aShapeType == "com.sun.star.presentation.FooterShape" ||
aShapeType == "com.sun.star.presentation.SlideNumberShape" ||
aShapeType == "com.sun.star.presentation.DateTimeShape" )
return;
}
}
......
helpcontent2 @ 39abc00a
Subproject commit 35006f482c02c41bd4eb8fdc9a29f804d6a3b672
Subproject commit 39abc00ac7423fdf1d0b60229a1a0cd3fe300801
......@@ -393,35 +393,35 @@ void lcl_fillCategoriesIntoStringVector(
sal_Int32 lcl_getChartType( const OUString& sChartType )
{
chart::TypeId eChartTypeId = chart::TYPEID_UNKNOWN;
if(( 0 == sChartType.reverseCompareTo( "com.sun.star.chart.BarDiagram" ))
|| ( 0 == sChartType.reverseCompareTo( "com.sun.star.chart2.ColumnChartType" )))
if( sChartType == "com.sun.star.chart.BarDiagram"
|| sChartType == "com.sun.star.chart2.ColumnChartType" )
eChartTypeId = chart::TYPEID_BAR;
else if(( 0 == sChartType.reverseCompareTo( "com.sun.star.chart.AreaDiagram" ))
|| ( 0 == sChartType.reverseCompareTo( "com.sun.star.chart2.AreaChartType" ) ) )
else if( sChartType == "com.sun.star.chart.AreaDiagram"
|| sChartType == "com.sun.star.chart2.AreaChartType" )
eChartTypeId = chart::TYPEID_AREA;
else if(( 0 == sChartType.reverseCompareTo( "com.sun.star.chart.LineDiagram" ))
|| ( 0 == sChartType.reverseCompareTo( "com.sun.star.chart2.LineChartType" ) ) )
else if( sChartType == "com.sun.star.chart.LineDiagram"
|| sChartType == "com.sun.star.chart2.LineChartType" )
eChartTypeId = chart::TYPEID_LINE;
else if(( 0 == sChartType.reverseCompareTo( "com.sun.star.chart.PieDiagram" ))
|| ( 0 == sChartType.reverseCompareTo( "com.sun.star.chart2.PieChartType") ) )
else if( sChartType == "com.sun.star.chart.PieDiagram"
|| sChartType == "com.sun.star.chart2.PieChartType" )
eChartTypeId = chart::TYPEID_PIE;
else if(( 0 == sChartType.reverseCompareTo( "com.sun.star.chart.DonutDiagram"))
|| ( 0 == sChartType.reverseCompareTo( "com.sun.star.chart2.DonutChartType") ) )
else if( sChartType == "com.sun.star.chart.DonutDiagram"
|| sChartType == "com.sun.star.chart2.DonutChartType" )
eChartTypeId = chart::TYPEID_DOUGHNUT;
else if(( 0 == sChartType.reverseCompareTo( "com.sun.star.chart.XYDiagram"))
|| ( 0 == sChartType.reverseCompareTo( "com.sun.star.chart2.ScatterChartType") ) )
else if( sChartType == "com.sun.star.chart.XYDiagram"
|| sChartType == "com.sun.star.chart2.ScatterChartType" )
eChartTypeId = chart::TYPEID_SCATTER;
else if(( 0 == sChartType.reverseCompareTo( "com.sun.star.chart.NetDiagram"))
|| ( 0 == sChartType.reverseCompareTo( "com.sun.star.chart2.NetChartType") ) )
else if( sChartType == "com.sun.star.chart.NetDiagram"
|| sChartType == "com.sun.star.chart2.NetChartType" )
eChartTypeId = chart::TYPEID_RADARLINE;
else if(( 0 == sChartType.reverseCompareTo( "com.sun.star.chart.FilledNetDiagram"))
|| ( 0 == sChartType.reverseCompareTo( "com.sun.star.chart2.FilledNetChartType") ) )
else if( sChartType == "com.sun.star.chart.FilledNetDiagram"
|| sChartType == "com.sun.star.chart2.FilledNetChartType" )
eChartTypeId = chart::TYPEID_RADARAREA;
else if(( 0 == sChartType.reverseCompareTo( "com.sun.star.chart.StockDiagram"))
|| ( 0 == sChartType.reverseCompareTo( "com.sun.star.chart2.CandleStickChartType") ) )
else if( sChartType == "com.sun.star.chart.StockDiagram"
|| sChartType == "com.sun.star.chart2.CandleStickChartType" )
eChartTypeId = chart::TYPEID_STOCK;
else if(( 0 == sChartType.reverseCompareTo( "com.sun.star.chart.BubbleDiagram"))
|| ( 0 == sChartType.reverseCompareTo( "com.sun.star.chart2.BubbleChartType") ) )
else if( sChartType == "com.sun.star.chart.BubbleDiagram"
|| sChartType == "com.sun.star.chart2.BubbleChartType" )
eChartTypeId = chart::TYPEID_BUBBLE;
return eChartTypeId;
......
......@@ -2236,9 +2236,9 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co
{
xShape.set(m_aProps->m_xContext->getServiceManager()->createInstanceWithContext(aServiceSpecifier,m_aProps->m_xContext),uno::UNO_QUERY);
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.style.PageStyle" ) == 0 ||
aServiceSpecifier.reverseCompareTo( "com.sun.star.style.FrameStyle" ) == 0 ||
aServiceSpecifier.reverseCompareTo( "com.sun.star.style.GraphicStyle" ) == 0
else if ( aServiceSpecifier == "com.sun.star.style.PageStyle" ||
aServiceSpecifier == "com.sun.star.style.FrameStyle" ||
aServiceSpecifier == "com.sun.star.style.GraphicStyle"
)
{
uno::Reference< style::XStyle> xStyle = new OStyle();
......@@ -2249,72 +2249,72 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co
return xStyle.get();
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.document.Settings" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.document.Settings" )
{
uno::Reference<beans::XPropertySet> xProp = new OStyle();
return xProp.get();
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.Defaults" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.drawing.Defaults" )
{
uno::Reference<beans::XPropertySet> xProp = new OStyle();
return xProp.get();
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.GradientTable" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.drawing.GradientTable" )
{
if ( !m_pImpl->m_xGradientTable.is() )
m_pImpl->m_xGradientTable.set(SvxUnoGradientTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
return m_pImpl->m_xGradientTable;
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.HatchTable" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.drawing.HatchTable" )
{
if ( !m_pImpl->m_xHatchTable.is() )
m_pImpl->m_xHatchTable.set(SvxUnoHatchTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
return m_pImpl->m_xHatchTable;
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.BitmapTable" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.drawing.BitmapTable" )
{
if ( !m_pImpl->m_xBitmapTable.is() )
m_pImpl->m_xBitmapTable.set(SvxUnoBitmapTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
return m_pImpl->m_xBitmapTable;
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.TransparencyGradientTable" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.drawing.TransparencyGradientTable" )
{
if ( !m_pImpl->m_xTransparencyGradientTable.is() )
m_pImpl->m_xTransparencyGradientTable.set(SvxUnoTransGradientTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
return m_pImpl->m_xTransparencyGradientTable;
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.DashTable" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.drawing.DashTable" )
{
if ( !m_pImpl->m_xDashTable.is() )
m_pImpl->m_xDashTable.set(SvxUnoDashTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
return m_pImpl->m_xDashTable;
}
else if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.MarkerTable" ) )
else if( aServiceSpecifier == "com.sun.star.drawing.MarkerTable" )
{
if( !m_pImpl->m_xMarkerTable.is() )
m_pImpl->m_xMarkerTable.set(SvxUnoMarkerTable_createInstance( m_pImpl->m_pReportModel.get() ),uno::UNO_QUERY);
return m_pImpl->m_xMarkerTable;
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.document.ImportEmbeddedObjectResolver" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.document.ImportEmbeddedObjectResolver" )
return static_cast< ::cppu::OWeakObject* >(SvXMLEmbeddedObjectHelper::Create( m_pImpl->m_xStorage,*this, EMBEDDEDOBJECTHELPER_MODE_READ ));
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.document.ExportEmbeddedObjectResolver" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.document.ExportEmbeddedObjectResolver" )
return static_cast< ::cppu::OWeakObject* >(SvXMLEmbeddedObjectHelper::Create( m_pImpl->m_xStorage,*this, EMBEDDEDOBJECTHELPER_MODE_WRITE ));
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.document.ImportGraphicObjectResolver" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.document.ImportGraphicObjectResolver" )
{
SvXMLGraphicHelper* pGraphicHelper = SvXMLGraphicHelper::Create(m_pImpl->m_xStorage,GRAPHICHELPER_MODE_WRITE);
uno::Reference< uno::XInterface> xRet(static_cast< ::cppu::OWeakObject* >(pGraphicHelper));
pGraphicHelper->release();
return xRet;
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.document.ExportGraphicObjectResolver" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.document.ExportGraphicObjectResolver" )
{
SvXMLGraphicHelper* pGraphicHelper = SvXMLGraphicHelper::Create(m_pImpl->m_xStorage,GRAPHICHELPER_MODE_WRITE);
uno::Reference< uno::XInterface> xRet(static_cast< ::cppu::OWeakObject* >(pGraphicHelper));
pGraphicHelper->release();
return xRet;
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.chart2.data.DataProvider" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.chart2.data.DataProvider" )
{
uno::Reference<chart2::data::XDatabaseDataProvider> xDataProvider(chart2::data::DatabaseDataProvider::createWithConnection( m_aProps->m_xContext, m_pImpl->m_xActiveConnection ));
xDataProvider->setRowLimit(10);
......@@ -2323,7 +2323,7 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstance( co
xChild->setParent(*this);
return uno::Reference< uno::XInterface >(xDataProvider,uno::UNO_QUERY);
}
else if ( aServiceSpecifier.reverseCompareTo( "com.sun.star.xml.NamespaceMap" ) == 0 )
else if ( aServiceSpecifier == "com.sun.star.xml.NamespaceMap" )
{
if ( !m_pImpl->m_xXMLNamespaceMap.is() )
m_pImpl->m_xXMLNamespaceMap = comphelper::NameContainer_createInstance( ::getCppuType( (const OUString*) 0 ) ).get();
......
......@@ -824,59 +824,59 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create(
if( NULL == mpDoc )
throw lang::DisposedException();
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.DashTable" ) )
if( aServiceSpecifier == "com.sun.star.drawing.DashTable" )
{
if( !mxDashTable.is() )
mxDashTable = SvxUnoDashTable_createInstance( mpDoc );
return mxDashTable;
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.GradientTable" ) )
if( aServiceSpecifier == "com.sun.star.drawing.GradientTable" )
{
if( !mxGradientTable.is() )
mxGradientTable = SvxUnoGradientTable_createInstance( mpDoc );
return mxGradientTable;
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.HatchTable" ) )
if( aServiceSpecifier == "com.sun.star.drawing.HatchTable" )
{
if( !mxHatchTable.is() )
mxHatchTable = SvxUnoHatchTable_createInstance( mpDoc );
return mxHatchTable;
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.BitmapTable" ) )
if( aServiceSpecifier == "com.sun.star.drawing.BitmapTable" )
{
if( !mxBitmapTable.is() )
mxBitmapTable = SvxUnoBitmapTable_createInstance( mpDoc );
return mxBitmapTable;
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.TransparencyGradientTable" ) )
if( aServiceSpecifier == "com.sun.star.drawing.TransparencyGradientTable" )
{
if( !mxTransGradientTable.is() )
mxTransGradientTable = SvxUnoTransGradientTable_createInstance( mpDoc );
return mxTransGradientTable;
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.MarkerTable" ) )
if( aServiceSpecifier == "com.sun.star.drawing.MarkerTable" )
{
if( !mxMarkerTable.is() )
mxMarkerTable = SvxUnoMarkerTable_createInstance( mpDoc );
return mxMarkerTable;
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.text.NumberingRules" ) )
if( aServiceSpecifier == "com.sun.star.text.NumberingRules" )
{
return uno::Reference< uno::XInterface >( SvxCreateNumRule( mpDoc ), uno::UNO_QUERY );
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.Background" ) )
if( aServiceSpecifier == "com.sun.star.drawing.Background" )
{
return uno::Reference< uno::XInterface >(
static_cast<uno::XWeak*>(new SdUnoPageBackground( mpDoc )));
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.Defaults" ) )
if( aServiceSpecifier == "com.sun.star.drawing.Defaults" )
{
if( !mxDrawingPool.is() )
mxDrawingPool = SdUnoCreatePool( mpDoc );
......@@ -900,38 +900,38 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create(
return SvUnoImageMapPolygonObject_createInstance( ImplGetSupportedMacroItems() );
}
if( ( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.document.Settings" ) ) ||
( !mbImpressDoc && ( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.DocumentSettings" ) ) ) ||
( mbImpressDoc && ( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.presentation.DocumentSettings" ) ) ) )
if( aServiceSpecifier == "com.sun.star.document.Settings" ||
( !mbImpressDoc && ( aServiceSpecifier == "com.sun.star.drawing.DocumentSettings" ) ) ||
( mbImpressDoc && ( aServiceSpecifier == "com.sun.star.presentation.DocumentSettings" ) ) )
{
return sd::DocumentSettings_createInstance( this );
}
if( ( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.text.TextField.DateTime" ) ) ||
( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.text.textfield.DateTime" ) ) )
if( aServiceSpecifier == "com.sun.star.text.TextField.DateTime" ||
aServiceSpecifier == "com.sun.star.text.textfield.DateTime" )
{
return (::cppu::OWeakObject * )new SvxUnoTextField( text::textfield::Type::DATE );
}
if( (0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.presentation.TextField.Header")) ||
(0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.presentation.textfield.Header")) )
if( aServiceSpecifier == "com.sun.star.presentation.TextField.Header" ||
aServiceSpecifier == "com.sun.star.presentation.textfield.Header" )
{
return (::cppu::OWeakObject * )new SvxUnoTextField( text::textfield::Type::PRESENTATION_HEADER );
}
if( (0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.presentation.TextField.Footer")) ||
(0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.presentation.textfield.Footer")) )
if( aServiceSpecifier == "com.sun.star.presentation.TextField.Footer" ||
aServiceSpecifier == "com.sun.star.presentation.textfield.Footer" )
{
return (::cppu::OWeakObject * )new SvxUnoTextField( text::textfield::Type::PRESENTATION_FOOTER );
}
if( (0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.presentation.TextField.DateTime")) ||
(0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.presentation.textfield.DateTime")) )
if( aServiceSpecifier == "com.sun.star.presentation.TextField.DateTime" ||
aServiceSpecifier == "com.sun.star.presentation.textfield.DateTime" )
{
return (::cppu::OWeakObject * )new SvxUnoTextField( text::textfield::Type::PRESENTATION_DATE_TIME );
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.xml.NamespaceMap" ) )
if( aServiceSpecifier == "com.sun.star.xml.NamespaceMap" )
{
static sal_uInt16 aWhichIds[] = { SDRATTR_XMLATTRIBUTES, EE_CHAR_XMLATTRIBS, EE_PARA_XMLATTRIBS, 0 };
......@@ -939,17 +939,17 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create(
}
// Support creation of GraphicObjectResolver and EmbeddedObjectResolver
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.document.ExportGraphicObjectResolver" ) )
if( aServiceSpecifier == "com.sun.star.document.ExportGraphicObjectResolver" )
{
return (::cppu::OWeakObject * )new SvXMLGraphicHelper( GRAPHICHELPER_MODE_WRITE );
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.document.ImportGraphicObjectResolver" ) )
if( aServiceSpecifier == "com.sun.star.document.ImportGraphicObjectResolver" )
{
return (::cppu::OWeakObject * )new SvXMLGraphicHelper( GRAPHICHELPER_MODE_READ );
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.document.ExportEmbeddedObjectResolver" ) )
if( aServiceSpecifier == "com.sun.star.document.ExportEmbeddedObjectResolver" )
{
::comphelper::IEmbeddedHelper *pPersist = mpDoc ? mpDoc->GetPersist() : NULL;
if( NULL == pPersist )
......@@ -958,7 +958,7 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create(
return (::cppu::OWeakObject * )new SvXMLEmbeddedObjectHelper( *pPersist, EMBEDDEDOBJECTHELPER_MODE_WRITE );
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.document.ImportEmbeddedObjectResolver" ) )
if( aServiceSpecifier == "com.sun.star.document.ImportEmbeddedObjectResolver" )
{
::comphelper::IEmbeddedHelper *pPersist = mpDoc ? mpDoc->GetPersist() : NULL;
if( NULL == pPersist )
......
......@@ -367,43 +367,43 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( c
{
::SolarMutexGuard aGuard;
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.DashTable" ) )
if( aServiceSpecifier == "com.sun.star.drawing.DashTable" )
{
if( !mxDashTable.is() )
mxDashTable = SvxUnoDashTable_createInstance( mpDoc );
return mxDashTable;
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.GradientTable" ) )
if( aServiceSpecifier == "com.sun.star.drawing.GradientTable" )
{
if( !mxGradientTable.is() )
mxGradientTable = SvxUnoGradientTable_createInstance( mpDoc );
return mxGradientTable;
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.HatchTable" ) )
if( aServiceSpecifier == "com.sun.star.drawing.HatchTable" )
{
if( !mxHatchTable.is() )
mxHatchTable = SvxUnoHatchTable_createInstance( mpDoc );
return mxHatchTable;
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.BitmapTable" ) )
if( aServiceSpecifier == "com.sun.star.drawing.BitmapTable" )
{
if( !mxBitmapTable.is() )
mxBitmapTable = SvxUnoBitmapTable_createInstance( mpDoc );
return mxBitmapTable;
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.TransparencyGradientTable" ) )
if( aServiceSpecifier == "com.sun.star.drawing.TransparencyGradientTable" )
{
if( !mxTransGradientTable.is() )
mxTransGradientTable = SvxUnoTransGradientTable_createInstance( mpDoc );
return mxTransGradientTable;
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.drawing.MarkerTable" ) )
if( aServiceSpecifier == "com.sun.star.drawing.MarkerTable" )
{
if( !mxMarkerTable.is() )
mxMarkerTable = SvxUnoMarkerTable_createInstance( mpDoc );
return mxMarkerTable;
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.text.NumberingRules" ) )
if( aServiceSpecifier == "com.sun.star.text.NumberingRules" )
{
return uno::Reference< uno::XInterface >( SvxCreateNumRule( mpDoc ), uno::UNO_QUERY );
}
......@@ -423,7 +423,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( c
return SvUnoImageMapPolygonObject_createInstance( ImplGetSupportedMacroItems() );
}
if( 0 == aServiceSpecifier.reverseCompareTo( "com.sun.star.text.TextField.DateTime" ) )
if( aServiceSpecifier == "com.sun.star.text.TextField.DateTime" )
{
return (::cppu::OWeakObject * )new SvxUnoTextField(text::textfield::Type::DATE);
}
......
......@@ -760,7 +760,7 @@ void SchXMLAxisContext::CorrectAxisPositions( const Reference< chart2::XChartDoc
if( xMainXAxisProp.is() && xMainYAxisProp.is() )
{
chart2::ScaleData aMainXScale = xMainXAxis->getScaleData();
if( 0 == rChartTypeServiceName.reverseCompareTo( "com.sun.star.chart2.ScatterChartType" ) )
if( rChartTypeServiceName == "com.sun.star.chart2.ScatterChartType" )
{
xMainYAxisProp->setPropertyValue("CrossoverPosition"
, uno::makeAny( ::com::sun::star::chart::ChartAxisPosition_VALUE) );
......
......@@ -855,7 +855,7 @@ void SchXMLChartContext::EndElement()
bool bLinesOn = true;
if( (maSeriesDefaultsAndStyles.maLinesOnProperty >>= bLinesOn) && !bLinesOn )
{
if( 0 == maChartTypeServiceName.reverseCompareTo( "com.sun.star.chart2.ScatterChartType" ) )
if( maChartTypeServiceName == "com.sun.star.chart2.ScatterChartType" )
{
bSwitchOffLinesForScatter = true;
SchXMLSeries2Context::switchSeriesLinesOff( maSeriesDefaultsAndStyles.maSeriesStyleList );
......
......@@ -2006,7 +2006,7 @@ void SchXMLExportHelper_Impl::exportPlotArea(
// stock-chart elements
OUString sChartType ( xDiagram->getDiagramType());
if( 0 == sChartType.reverseCompareTo( "com.sun.star.chart.StockDiagram" ))
if( sChartType == "com.sun.star.chart.StockDiagram" )
{
Reference< chart::XStatisticDisplay > xStockPropProvider( xDiagram, uno::UNO_QUERY );
if( xStockPropProvider.is())
......
......@@ -585,7 +585,7 @@ void SchXMLPlotAreaContext::EndElement()
}
// #i32366# stock has volume
if( ( 0 == mxDiagram->getDiagramType().reverseCompareTo("com.sun.star.chart.StockDiagram" )) &&
if( mxDiagram->getDiagramType() == "com.sun.star.chart.StockDiagram" &&
mbStockHasVolume )
{
try
......
......@@ -286,7 +286,7 @@ SchXMLSeries2Context::SchXMLSeries2Context(
mbSymbolSizeIsMissingInFile(false),
maChartSize( rChartSize )
{
if( 0 == aGlobalChartTypeName.reverseCompareTo( "com.sun.star.chart2.DonutChartType" ) )
if( aGlobalChartTypeName == "com.sun.star.chart2.DonutChartType" )
{
maSeriesChartTypeName = "com.sun.star.chart2.PieChartType";
maGlobalChartTypeName = maSeriesChartTypeName;
......
......@@ -407,15 +407,15 @@ enum FieldIdEnum XMLTextFieldExport::GetFieldID(
if( !sFieldName.isEmpty() )
{
if( sFieldName.reverseCompareTo( "Header" ) == 0 )
if( sFieldName == "Header" )
{
return FIELD_ID_DRAW_HEADER;
}
else if( sFieldName.reverseCompareTo( "Footer" ) == 0 )
else if( sFieldName == "Footer" )
{
return FIELD_ID_DRAW_FOOTER;
}
else if( sFieldName.reverseCompareTo( "DateTime" ) == 0 )
else if( sFieldName == "DateTime" )
{
return FIELD_ID_DRAW_DATE_TIME;
}
......
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