[Libreoffice-commits] core.git: chart2/source editeng/source filter/source helpcontent2 oox/source reportdesign/source sd/source svx/source xmloff/source

Noel Grandin noel at peralex.com
Fri Nov 22 01:23:31 PST 2013


 chart2/source/view/main/ChartView.cxx             |   12 ++---
 editeng/source/xml/xmltxtexp.cxx                  |    6 +-
 filter/source/flash/swfexporter.cxx               |   12 ++---
 helpcontent2                                      |    2 
 oox/source/export/chartexport.cxx                 |   40 ++++++++---------
 reportdesign/source/core/api/ReportDefinition.cxx |   34 +++++++-------
 sd/source/ui/unoidl/unomodel.cxx                  |   50 +++++++++++-----------
 svx/source/unodraw/unomod.cxx                     |   16 +++----
 xmloff/source/chart/SchXMLAxisContext.cxx         |    2 
 xmloff/source/chart/SchXMLChartContext.cxx        |    2 
 xmloff/source/chart/SchXMLExport.cxx              |    2 
 xmloff/source/chart/SchXMLPlotAreaContext.cxx     |    2 
 xmloff/source/chart/SchXMLSeries2Context.cxx      |    2 
 xmloff/source/text/txtflde.cxx                    |    6 +-
 14 files changed, 94 insertions(+), 94 deletions(-)

New commits:
commit fc87d57f04132658e1c3481e92fe36e1183423ed
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Nov 22 11:13:17 2013 +0200

    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

diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 16da8f8..3dac9dd 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -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() )
             {
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index eed1c2c..6d3523c 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -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 );
diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx
index 85c18b4..5382f84 100644
--- a/filter/source/flash/swfexporter.cxx
+++ b/filter/source/flash/swfexporter.cxx
@@ -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;
             }
         }
diff --git a/helpcontent2 b/helpcontent2
index 35006f4..39abc00 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 35006f482c02c41bd4eb8fdc9a29f804d6a3b672
+Subproject commit 39abc00ac7423fdf1d0b60229a1a0cd3fe300801
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 36412be..fb8f2a9 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -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;
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 023b0a9..1afdeb6 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -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();
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 9d2a011..aaf70b7 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -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 )
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 7eb9107..150e2cc 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -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);
     }
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index 128ff2b..780eec7 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -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) );
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 18cd1bc..9014d55 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -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 );
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index add66b1..fb60d44 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -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())
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index c72f1af..e9e3c59 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -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
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 29a08b6..0ac5159 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -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;
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 47b5a67..af4e9d2 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -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;
             }


More information about the Libreoffice-commits mailing list