[Libreoffice-commits] core.git: canvas/source chart2/qa chart2/source comphelper/source connectivity/source desktop/source include/comphelper sfx2/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Mar 8 09:35:18 UTC 2018


 canvas/source/vcl/canvashelper_texturefill.cxx         |  149 +++--------------
 chart2/qa/extras/chart2export.cxx                      |   44 ++---
 chart2/source/inc/DataSeriesHelper.hxx                 |    5 
 chart2/source/model/main/DataSeries.cxx                |    2 
 chart2/source/model/template/BubbleDataInterpreter.cxx |    2 
 chart2/source/model/template/XYDataInterpreter.cxx     |    2 
 chart2/source/tools/AxisHelper.cxx                     |    2 
 chart2/source/tools/DataSeriesHelper.cxx               |    4 
 comphelper/source/misc/synchronousdispatch.cxx         |    3 
 connectivity/source/commontools/dbtools.cxx            |   15 -
 connectivity/source/drivers/writer/WTable.cxx          |   12 -
 desktop/source/app/dispatchwatcher.cxx                 |    2 
 include/comphelper/synchronousdispatch.hxx             |    1 
 sfx2/source/appl/appopen.cxx                           |    2 
 14 files changed, 75 insertions(+), 170 deletions(-)

New commits:
commit 7960ccb41db49a7883afa036b820a7b7ffcb4a89
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Mar 8 10:03:36 2018 +0200

    loplugin:constantparam in canvas..comphelper
    
    Change-Id: Ia666cb46c409852a13789389c032f0ce4377c0d5
    Reviewed-on: https://gerrit.libreoffice.org/50927
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index d99bdb1ff77d..38de3a7fd3b8 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -266,7 +266,6 @@ namespace vclcanvas
                                     const ::basegfx::B2DHomMatrix&                 rTextureTransform,
                                     const ::tools::Rectangle&                             rBounds,
                                     unsigned int                                   nStepCount,
-                                    bool                                           bFillNonOverlapping,
                                     const ::canvas::ParametricPolyPolygon::Values& rValues,
                                     const std::vector< ::Color >&                  rColors )
         {
@@ -356,131 +355,48 @@ namespace vclcanvas
 
             basegfx::utils::KeyStopLerp aLerper(rValues.maStops);
 
-            if( !bFillNonOverlapping )
-            {
-                // fill background
-                rOutDev.SetFillColor( rColors.front() );
-                rOutDev.DrawRect( rBounds );
-
-                // render polygon
-                // ==============
-
-                for( unsigned int i=1,p; i<nStepCount; ++i )
-                {
-                    const double fT( i/double(nStepCount) );
-
-                    std::ptrdiff_t nIndex;
-                    double fAlpha;
-                    std::tie(nIndex,fAlpha)=aLerper.lerp(fT);
-
-                    // lerp color
-                    rOutDev.SetFillColor(
-                        Color( static_cast<sal_uInt8>(basegfx::utils::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
-                               static_cast<sal_uInt8>(basegfx::utils::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
-                               static_cast<sal_uInt8>(basegfx::utils::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
-
-                    // scale and render polygon, by interpolating between
-                    // outer and inner polygon.
-
-                    for( p=0; p<nNumPoints; ++p )
-                    {
-                        const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) );
-                        const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) );
+            // fill background
+            rOutDev.SetFillColor( rColors.front() );
+            rOutDev.DrawRect( rBounds );
 
-                        aTempPoly[static_cast<sal_uInt16>(p)] = ::Point(
-                            basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ),
-                            basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) );
-                    }
-
-                    // close polygon explicitly
-                    aTempPoly[static_cast<sal_uInt16>(p)] = aTempPoly[0];
+            // render polygon
+            // ==============
 
-                    // TODO(P1): compare with vcl/source/gdi/outdev4.cxx,
-                    // OutputDevice::ImplDrawComplexGradient(), there's a note
-                    // that on some VDev's, rendering disjunct poly-polygons
-                    // is faster!
-                    rOutDev.DrawPolygon( aTempPoly );
-                }
-            }
-            else
+            for( unsigned int i=1,p; i<nStepCount; ++i )
             {
-                // render polygon
-                // ==============
-
-                // For performance reasons, we create a temporary VCL polygon
-                // here, keep it all the way and only change the vertex values
-                // in the loop below (as ::Polygon is a pimpl class, creating
-                // one every loop turn would really stress the mem allocator)
-                ::tools::PolyPolygon aTempPolyPoly;
-                ::tools::Polygon aTempPoly2( static_cast<sal_uInt16>(nNumPoints+1) );
-
-                aTempPoly2[0] = rBounds.TopLeft();
-                aTempPoly2[1] = rBounds.TopRight();
-                aTempPoly2[2] = rBounds.BottomRight();
-                aTempPoly2[3] = rBounds.BottomLeft();
-                aTempPoly2[4] = rBounds.TopLeft();
-
-                aTempPolyPoly.Insert( aTempPoly );
-                aTempPolyPoly.Insert( aTempPoly2 );
-
-                for( unsigned int i=0,p; i<nStepCount; ++i )
-                {
-                    const double fT( (i+1)/double(nStepCount) );
-
-                    std::ptrdiff_t nIndex;
-                    double fAlpha;
-                    std::tie(nIndex,fAlpha)=aLerper.lerp(fT);
-
-                    // lerp color
-                    rOutDev.SetFillColor(
-                        Color( static_cast<sal_uInt8>(basegfx::utils::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
-                               static_cast<sal_uInt8>(basegfx::utils::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
-                               static_cast<sal_uInt8>(basegfx::utils::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
-
-#if OSL_DEBUG_LEVEL > 0
-                    if( i && !(i % 10) )
-                        rOutDev.SetFillColor( COL_RED );
-#endif
+                const double fT( i/double(nStepCount) );
 
-                    // scale and render polygon. Note that here, we
-                    // calculate the inner polygon, which is actually the
-                    // start of the _next_ color strip. Thus, i+1
+                std::ptrdiff_t nIndex;
+                double fAlpha;
+                std::tie(nIndex,fAlpha)=aLerper.lerp(fT);
 
-                    for( p=0; p<nNumPoints; ++p )
-                    {
-                        const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) );
-                        const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) );
+                // lerp color
+                rOutDev.SetFillColor(
+                    Color( static_cast<sal_uInt8>(basegfx::utils::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
+                           static_cast<sal_uInt8>(basegfx::utils::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
+                           static_cast<sal_uInt8>(basegfx::utils::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
 
-                        aTempPoly[static_cast<sal_uInt16>(p)] = ::Point(
-                            basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ),
-                            basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) );
-                    }
+                // scale and render polygon, by interpolating between
+                // outer and inner polygon.
 
-                    // close polygon explicitly
-                    aTempPoly[static_cast<sal_uInt16>(p)] = aTempPoly[0];
+                for( p=0; p<nNumPoints; ++p )
+                {
+                    const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) );
+                    const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) );
 
-                    // swap inner and outer polygon
-                    aTempPolyPoly.Replace( aTempPolyPoly.GetObject( 1 ), 0 );
+                    aTempPoly[static_cast<sal_uInt16>(p)] = ::Point(
+                        basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ),
+                        basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) );
+                }
 
-                    if( i+1<nStepCount )
-                    {
-                        // assign new inner polygon. Note that with this
-                        // formulation, the internal pimpl objects for both
-                        // temp polygons and the polypolygon remain identical,
-                        // minimizing heap accesses (only a Polygon wrapper
-                        // object is freed and deleted twice during this swap).
-                        aTempPolyPoly.Replace( aTempPoly, 1 );
-                    }
-                    else
-                    {
-                        // last, i.e. inner strip. Now, the inner polygon
-                        // has zero area anyway, and to not leave holes in
-                        // the gradient, finally render a simple polygon:
-                        aTempPolyPoly.Remove( 1 );
-                    }
+                // close polygon explicitly
+                aTempPoly[static_cast<sal_uInt16>(p)] = aTempPoly[0];
 
-                    rOutDev.DrawPolyPolygon( aTempPolyPoly );
-                }
+                // TODO(P1): compare with vcl/source/gdi/outdev4.cxx,
+                // OutputDevice::ImplDrawComplexGradient(), there's a note
+                // that on some VDev's, rendering disjunct poly-polygons
+                // is faster!
+                rOutDev.DrawPolygon( aTempPoly );
             }
         }
 
@@ -509,7 +425,6 @@ namespace vclcanvas
                                            rTextureTransform,
                                            rBounds,
                                            nStepCount,
-                                           false/*bFillNonOverlapping*/,
                                            rValues,
                                            rColors );
                     break;
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index d0ab36eb743f..b77aeda6755b 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -340,8 +340,7 @@ void checkNameAndType(Reference<XPropertySet> const & xProperties, const OUStrin
 void checkLinearTrendline(
         Reference<chart2::XRegressionCurve> const & xCurve, const OUString& aExpectedName,
         double aExpectedExtrapolateForward, double aExpectedExtrapolateBackward,
-        bool aExpectedForceIntercept, double aExpectedInterceptValue,
-        bool aExpectedShowEquation, bool aExpectedR2)
+        double aExpectedInterceptValue)
 {
     Reference<XPropertySet> xProperties( xCurve , uno::UNO_QUERY );
     CPPUNIT_ASSERT(xProperties.is());
@@ -351,16 +350,15 @@ void checkLinearTrendline(
     checkCommonTrendline(
         xCurve,
         aExpectedExtrapolateForward, aExpectedExtrapolateBackward,
-        aExpectedForceIntercept, aExpectedInterceptValue,
-        aExpectedShowEquation, aExpectedR2);
+        /*aExpectedForceIntercept*/false, aExpectedInterceptValue,
+        /*aExpectedShowEquation*/true, /*aExpectedR2*/false);
 }
 
 void checkPolynomialTrendline(
         Reference<chart2::XRegressionCurve> const & xCurve, const OUString& aExpectedName,
         sal_Int32 aExpectedDegree,
         double aExpectedExtrapolateForward, double aExpectedExtrapolateBackward,
-        bool aExpectedForceIntercept, double aExpectedInterceptValue,
-        bool aExpectedShowEquation, bool aExpectedR2)
+        double aExpectedInterceptValue)
 {
     Reference<XPropertySet> xProperties( xCurve , uno::UNO_QUERY );
     CPPUNIT_ASSERT(xProperties.is());
@@ -374,8 +372,8 @@ void checkPolynomialTrendline(
     checkCommonTrendline(
         xCurve,
         aExpectedExtrapolateForward, aExpectedExtrapolateBackward,
-        aExpectedForceIntercept, aExpectedInterceptValue,
-        aExpectedShowEquation, aExpectedR2);
+        /*aExpectedForceIntercept*/true, aExpectedInterceptValue,
+        /*aExpectedShowEquation*/true, /*aExpectedR2*/true);
 }
 
 void checkMovingAverageTrendline(
@@ -408,11 +406,11 @@ void checkTrendlinesInChart(uno::Reference< chart2::XChartDocument > const & xCh
 
     xCurve = xRegressionCurveSequence[0];
     CPPUNIT_ASSERT(xCurve.is());
-    checkPolynomialTrendline(xCurve, "col2_poly", 3, 0.1, -0.1, true, -1.0, true, true);
+    checkPolynomialTrendline(xCurve, "col2_poly", 3, 0.1, -0.1, -1.0);
 
     xCurve = xRegressionCurveSequence[1];
     CPPUNIT_ASSERT(xCurve.is());
-    checkLinearTrendline(xCurve, "col2_linear", -0.5, -0.5, false, 0.0, true, false);
+    checkLinearTrendline(xCurve, "col2_linear", -0.5, -0.5, 0.0);
 
     xCurve = xRegressionCurveSequence[2];
     CPPUNIT_ASSERT(xCurve.is());
@@ -798,23 +796,21 @@ void Chart2ExportTest::testAxisNumberFormatXLS()
             }
         }
 
-        void change( const Reference<chart2::XChartDocument>& xChartDoc, bool bSetNumFmtLinked, sal_Int16 nNumFmtTypeFlag )
+        void change( const Reference<chart2::XChartDocument>& xChartDoc, sal_Int16 nNumFmtTypeFlag )
         {
             Reference<chart2::XAxis> xAxisY = getAxisFromDoc( xChartDoc, 0, 1, 0 );
             Reference<beans::XPropertySet> xPS( xAxisY, uno::UNO_QUERY_THROW );
-            Any aAny( bSetNumFmtLinked );
+            Any aAny( false );
             xPS->setPropertyValue( "LinkNumberFormatToSource", aAny );
-            if ( !bSetNumFmtLinked )
-            {
-                Reference<util::XNumberFormatsSupplier> xNFS( xChartDoc, uno::UNO_QUERY_THROW );
-                Reference<util::XNumberFormats> xNumberFormats = xNFS->getNumberFormats();
-                CPPUNIT_ASSERT( xNumberFormats.is() );
-                lang::Locale aLocale{ "en", "US", "" };
-                Sequence<sal_Int32> aNumFmts = xNumberFormats->queryKeys( nNumFmtTypeFlag, aLocale, false );
-                CPPUNIT_ASSERT( aNumFmts.hasElements() );
-                aAny <<= aNumFmts[0];
-                xPS->setPropertyValue( CHART_UNONAME_NUMFMT, aAny );
-            }
+
+            Reference<util::XNumberFormatsSupplier> xNFS( xChartDoc, uno::UNO_QUERY_THROW );
+            Reference<util::XNumberFormats> xNumberFormats = xNFS->getNumberFormats();
+            CPPUNIT_ASSERT( xNumberFormats.is() );
+            lang::Locale aLocale{ "en", "US", "" };
+            Sequence<sal_Int32> aNumFmts = xNumberFormats->queryKeys( nNumFmtTypeFlag, aLocale, false );
+            CPPUNIT_ASSERT( aNumFmts.hasElements() );
+            aAny <<= aNumFmts[0];
+            xPS->setPropertyValue( CHART_UNONAME_NUMFMT, aAny );
         }
 
     } aTest;
@@ -824,7 +820,7 @@ void Chart2ExportTest::testAxisNumberFormatXLS()
     Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet( 0, mxComponent );
     aTest.check( xChartDoc, true, util::NumberFormat::PERCENT );
 
-    aTest.change( xChartDoc, false, util::NumberFormat::NUMBER );
+    aTest.change( xChartDoc, util::NumberFormat::NUMBER );
     // Write the document(xls) with changes made close it, load it and check if changes are intact
     reload( "MS Excel 97" );
     xChartDoc = getChartDocFromSheet( 0, mxComponent );
diff --git a/chart2/source/inc/DataSeriesHelper.hxx b/chart2/source/inc/DataSeriesHelper.hxx
index 3c6f369020ee..7f9276dbea3c 100644
--- a/chart2/source/inc/DataSeriesHelper.hxx
+++ b/chart2/source/inc/DataSeriesHelper.hxx
@@ -57,7 +57,7 @@ OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSeq
                            bool bMatchPrefix = false );
 
 /** Retrieves all data sequences in the given data source that match the given
-    role.
+    role prefix.
 
     @param aSource
         The data source containing all data sequences to be searched through.
@@ -68,8 +68,7 @@ OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSeq
 OOO_DLLPUBLIC_CHARTTOOLS std::vector<
   css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
     getAllDataSequencesByRole( const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & aDataSequences,
-                               const OUString& aRole,
-                               bool bMatchPrefix );
+                               const OUString& aRole );
 
 OOO_DLLPUBLIC_CHARTTOOLS
 std::vector<css::uno::Reference<css::chart2::data::XLabeledDataSequence> >
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index f9179ac9dc4a..4a429e4a8be5 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -306,7 +306,7 @@ Reference< beans::XPropertySet >
     }
 
     std::vector< Reference< chart2::data::XLabeledDataSequence > > aValuesSeries(
-        DataSeriesHelper::getAllDataSequencesByRole( aSequences , "values", true ) );
+        DataSeriesHelper::getAllDataSequencesByRole( aSequences , "values" ) );
 
     if (aValuesSeries.empty())
         throw lang::IndexOutOfBoundsException();
diff --git a/chart2/source/model/template/BubbleDataInterpreter.cxx b/chart2/source/model/template/BubbleDataInterpreter.cxx
index 364ed3459e38..b509f7fc5126 100644
--- a/chart2/source/model/template/BubbleDataInterpreter.cxx
+++ b/chart2/source/model/template/BubbleDataInterpreter.cxx
@@ -183,7 +183,7 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::reinterpretDataSeries(
             {
                 vector< Reference< data::XLabeledDataSequence > > aValueSeqVec(
                     DataSeriesHelper::getAllDataSequencesByRole(
-                        xSeriesSource->getDataSequences(), "values", true ));
+                        xSeriesSource->getDataSequences(), "values" ));
                 if( xValuesX.is())
                     aValueSeqVec.erase( find( aValueSeqVec.begin(), aValueSeqVec.end(), xValuesX ));
                 if( xValuesY.is())
diff --git a/chart2/source/model/template/XYDataInterpreter.cxx b/chart2/source/model/template/XYDataInterpreter.cxx
index 896b9898ebcb..0e9907138067 100644
--- a/chart2/source/model/template/XYDataInterpreter.cxx
+++ b/chart2/source/model/template/XYDataInterpreter.cxx
@@ -163,7 +163,7 @@ chart2::InterpretedData SAL_CALL XYDataInterpreter::reinterpretDataSeries(
             {
                 vector< Reference< data::XLabeledDataSequence > > aValueSeqVec(
                     DataSeriesHelper::getAllDataSequencesByRole(
-                        xSeriesSource->getDataSequences(), "values", true ));
+                        xSeriesSource->getDataSequences(), "values" ));
                 if( xValuesX.is())
                     aValueSeqVec.erase( find( aValueSeqVec.begin(), aValueSeqVec.end(), xValuesX ));
                 if( xValuesY.is())
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index 32c7ce3608bc..15d6ae59d9fc 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -197,7 +197,7 @@ sal_Int32 AxisHelper::getExplicitNumberFormatKeyForAxis(
                     if( xSource.is() )
                     {
                         std::vector< Reference< chart2::data::XLabeledDataSequence > > aXValues(
-                            DataSeriesHelper::getAllDataSequencesByRole( xSource->getDataSequences(), "values-x", true ) );
+                            DataSeriesHelper::getAllDataSequencesByRole( xSource->getDataSequences(), "values-x" ) );
                         if( aXValues.empty() )
                         {
                             Reference< data::XLabeledDataSequence > xCategories( DiagramHelper::getCategoriesFromDiagram( xDiagram ) );
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index e05c014cddce..7a4d4c46a246 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -226,12 +226,12 @@ Reference< chart2::data::XLabeledDataSequence >
 
 std::vector< Reference< chart2::data::XLabeledDataSequence > >
     getAllDataSequencesByRole( const Sequence< Reference< chart2::data::XLabeledDataSequence > > & aDataSequences,
-                               const OUString& aRole, bool bMatchPrefix /* = false */ )
+                               const OUString& aRole )
 {
     std::vector< Reference< chart2::data::XLabeledDataSequence > > aResultVec;
     std::copy_if( aDataSequences.begin(), aDataSequences.end(),
                            std::back_inserter( aResultVec ),
-                           lcl_MatchesRole(aRole, bMatchPrefix) );
+                           lcl_MatchesRole(aRole, /*bMatchPrefix*/true) );
     return aResultVec;
 }
 
diff --git a/comphelper/source/misc/synchronousdispatch.cxx b/comphelper/source/misc/synchronousdispatch.cxx
index 7e650b8aa3e0..bec5b021310d 100644
--- a/comphelper/source/misc/synchronousdispatch.cxx
+++ b/comphelper/source/misc/synchronousdispatch.cxx
@@ -38,7 +38,6 @@ uno::Reference< lang::XComponent > SynchronousDispatch::dispatch(
         const uno::Reference< uno::XInterface > &xStartPoint,
         const OUString &sURL,
         const OUString &sTarget,
-        const sal_Int32 nFlags,
         const uno::Sequence< beans::PropertyValue > &lArguments )
 {
     util::URL aURL;
@@ -50,7 +49,7 @@ uno::Reference< lang::XComponent > SynchronousDispatch::dispatch(
     uno::Reference < frame::XDispatchProvider > xProvider( xStartPoint, uno::UNO_QUERY );
 
     if ( xProvider.is() )
-        xDispatcher = xProvider->queryDispatch( aURL, sTarget, nFlags );
+        xDispatcher = xProvider->queryDispatch( aURL, sTarget, 0 );
 
     uno::Reference < lang::XComponent > aComponent;
 
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 834c7ba9aeda..c6737a7e07ad 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -337,7 +337,7 @@ Reference< XConnection> getConnection(const Reference< XRowSet>& _rxRowSet)
 // if connectRowset (which is deprecated) is removed, this function and one of its parameters are
 // not needed anymore, the whole implementation can be moved into ensureRowSetConnection then)
 SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const Reference< XComponentContext >& _rxContext,
-        bool _bSetAsActiveConnection, bool _bAttachAutoDisposer )
+        bool _bAttachAutoDisposer )
 {
     SharedConnection xConnection;
 
@@ -359,11 +359,8 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R
             ||  ( xExistingConn = findConnection( _rxRowSet ) ).is()
             )
         {
-            if ( _bSetAsActiveConnection )
-            {
-                xRowSetProps->setPropertyValue("ActiveConnection", makeAny( xExistingConn ) );
-                // no auto disposer needed, since we did not create the connection
-            }
+            xRowSetProps->setPropertyValue("ActiveConnection", makeAny( xExistingConn ) );
+            // no auto disposer needed, since we did not create the connection
 
             xConnection.reset( xExistingConn, SharedConnection::NoTakeOwnership );
             break;
@@ -424,7 +421,7 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R
         );
 
         // now if we created a connection, forward it to the row set
-        if ( xConnection.is() && _bSetAsActiveConnection )
+        if ( xConnection.is() )
         {
             try
             {
@@ -451,13 +448,13 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R
 
 Reference< XConnection> connectRowset(const Reference< XRowSet>& _rxRowSet, const Reference< XComponentContext >& _rxContext )
 {
-    SharedConnection xConnection = lcl_connectRowSet( _rxRowSet, _rxContext, true/*bSetAsActiveConnection*/, true );
+    SharedConnection xConnection = lcl_connectRowSet( _rxRowSet, _rxContext, true );
     return xConnection.getTyped();
 }
 
 SharedConnection ensureRowSetConnection(const Reference< XRowSet>& _rxRowSet, const Reference< XComponentContext>& _rxContext )
 {
-    return lcl_connectRowSet( _rxRowSet, _rxContext, true, false/*bUseAutoConnectionDisposer*/ );
+    return lcl_connectRowSet( _rxRowSet, _rxContext, false/*bUseAutoConnectionDisposer*/ );
 }
 
 Reference< XNameAccess> getTableFields(const Reference< XConnection>& _rxConn,const OUString& _rName)
diff --git a/connectivity/source/drivers/writer/WTable.cxx b/connectivity/source/drivers/writer/WTable.cxx
index 689abe5ac509..7c0018fa0948 100644
--- a/connectivity/source/drivers/writer/WTable.cxx
+++ b/connectivity/source/drivers/writer/WTable.cxx
@@ -45,14 +45,14 @@ static void lcl_GetDataArea(const uno::Reference<text::XTextTable>& xTable, sal_
 }
 
 static void lcl_GetColumnInfo(const uno::Reference<text::XTextTable>& xTable,
-                              sal_Int32 nDocColumn, sal_Int32 nStartRow, bool bHasHeaders,
+                              sal_Int32 nDocColumn, bool bHasHeaders,
                               OUString& rName, sal_Int32& rDataType, bool& rCurrency)
 {
     uno::Reference<table::XCellRange> xCellRange(xTable, uno::UNO_QUERY);
     // get column name from first row, if range contains headers
     if (bHasHeaders)
     {
-        uno::Reference<text::XText> xHeaderText(xCellRange->getCellByPosition(nDocColumn, nStartRow), uno::UNO_QUERY);
+        uno::Reference<text::XText> xHeaderText(xCellRange->getCellByPosition(nDocColumn, /*nStartRow*/0), uno::UNO_QUERY);
         if (xHeaderText.is())
             rName = xHeaderText->getString();
     }
@@ -63,11 +63,11 @@ static void lcl_GetColumnInfo(const uno::Reference<text::XTextTable>& xTable,
 
 
 static void lcl_SetValue(connectivity::ORowSetValue& rValue, const uno::Reference<text::XTextTable>& xTable,
-                         sal_Int32 nStartCol, sal_Int32 nStartRow, bool bHasHeaders,
+                         sal_Int32 nStartCol, bool bHasHeaders,
                          sal_Int32 nDBRow, sal_Int32 nDBColumn)
 {
     sal_Int32 nDocColumn = nStartCol + nDBColumn - 1;   // database counts from 1
-    sal_Int32 nDocRow = nStartRow + nDBRow - 1;
+    sal_Int32 nDocRow = nDBRow - 1;
     if (bHasHeaders)
         ++nDocRow;
 
@@ -111,7 +111,7 @@ void OWriterTable::fillColumns()
         sal_Int32 eType = sdbc::DataType::OTHER;
         bool bCurrency = false;
 
-        lcl_GetColumnInfo(m_xTable, m_nStartCol + i, 0, m_bHasHeaders,
+        lcl_GetColumnInfo(m_xTable, m_nStartCol + i, m_bHasHeaders,
                           aColumnName, eType, bCurrency);
 
         sal_Int32 nPrecision = 0;   //! ...
@@ -254,7 +254,7 @@ bool OWriterTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns& _rCols,
     {
         if ((_rRow->get())[i]->isBound())
         {
-            lcl_SetValue((_rRow->get())[i]->get(), m_xTable, m_nStartCol, 0, m_bHasHeaders,
+            lcl_SetValue((_rRow->get())[i]->get(), m_xTable, m_nStartCol, m_bHasHeaders,
                          m_nFilePos, i);
         }
     }
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index f4dff56bb700..6438bf7f3ef8 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -538,7 +538,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
             // This is a synchron loading of a component so we don't have to deal with our statusChanged listener mechanism.
             try
             {
-                xDoc.set( ::comphelper::SynchronousDispatch::dispatch( xDesktop, aName, aTarget, 0, aArgs ), UNO_QUERY );
+                xDoc.set( ::comphelper::SynchronousDispatch::dispatch( xDesktop, aName, aTarget, aArgs ), UNO_QUERY );
             }
             catch (const css::lang::IllegalArgumentException& iae)
             {
diff --git a/include/comphelper/synchronousdispatch.hxx b/include/comphelper/synchronousdispatch.hxx
index 2488e02ec925..a547703376e7 100644
--- a/include/comphelper/synchronousdispatch.hxx
+++ b/include/comphelper/synchronousdispatch.hxx
@@ -51,7 +51,6 @@ namespace comphelper
             const css::uno::Reference< css::uno::XInterface > &xStartPoint,
             const OUString &sURL,
             const OUString &sTarget,
-            const sal_Int32 nFlags,
             const css::uno::Sequence< css::beans::PropertyValue > &lArguments );
     };
 
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 2f3744e3fc04..ef14716ebe2e 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -1063,7 +1063,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
 
         try
         {
-            xComp = ::comphelper::SynchronousDispatch::dispatch( xTargetFrame, aFileName, aTarget, 0, aArgs );
+            xComp = ::comphelper::SynchronousDispatch::dispatch( xTargetFrame, aFileName, aTarget, aArgs );
         }
         catch(const RuntimeException&)
         {


More information about the Libreoffice-commits mailing list