[Libreoffice-commits] core.git: 3 commits - chart2/source include/svx shell/source svx/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 19 20:27:37 UTC 2018


 chart2/source/tools/DiagramHelper.cxx  |   33 +++++++++++++++------------------
 include/svx/galtheme.hxx               |    1 +
 shell/source/win32/zipfile/zipfile.cxx |    2 +-
 svx/source/gallery2/gallery1.cxx       |    2 +-
 svx/source/gallery2/galtheme.cxx       |    1 +
 5 files changed, 19 insertions(+), 20 deletions(-)

New commits:
commit 919fb9c999b369f4b3f50336188204716e01190f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 09:52:32 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Oct 19 22:25:46 2018 +0200

    copy and paste error
    
    Change-Id: I54a1453b561306dd98cd2193f1a21b80b8b7e1d4
    Reviewed-on: https://gerrit.libreoffice.org/61973
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index 231ad1656efc..be0ef9ec2be9 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -136,6 +136,7 @@ public:
     SAL_DLLPRIVATE const INetURLObject& GetThmURL() const;
     const INetURLObject&        GetSdgURL() const;
     SAL_DLLPRIVATE const INetURLObject& GetSdvURL() const;
+    SAL_DLLPRIVATE const INetURLObject& GetStrURL() const;
 
     sal_uInt32                  GetId() const;
     SAL_DLLPRIVATE void         SetId( sal_uInt32 nNewId, bool bResetThemeName );
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index 293b30342a36..c417c94eab56 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -656,7 +656,7 @@ bool Gallery::RemoveTheme( const OUString& rThemeName )
             INetURLObject   aThmURL( pThm->GetThmURL() );
             INetURLObject   aSdgURL( pThm->GetSdgURL() );
             INetURLObject   aSdvURL( pThm->GetSdvURL() );
-            INetURLObject   aStrURL( pThm->GetSdvURL() );
+            INetURLObject   aStrURL( pThm->GetStrURL() );
 
             ReleaseTheme( pThm, aListener );
 
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 651fb49cfcc9..5ac71a218e39 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -1470,6 +1470,7 @@ void GalleryTheme::ImplSetModified( bool bModified )
 const INetURLObject& GalleryTheme::GetThmURL() const { return pThm->GetThmURL(); }
 const INetURLObject& GalleryTheme::GetSdgURL() const { return pThm->GetSdgURL(); }
 const INetURLObject& GalleryTheme::GetSdvURL() const { return pThm->GetSdvURL(); }
+const INetURLObject& GalleryTheme::GetStrURL() const { return pThm->GetStrURL(); }
 sal_uInt32 GalleryTheme::GetId() const { return pThm->GetId(); }
 void GalleryTheme::SetId( sal_uInt32 nNewId, bool bResetThemeName ) { pThm->SetId( nNewId, bResetThemeName ); }
 bool GalleryTheme::IsThemeNameFromResource() const { return pThm->IsNameFromResource(); }
commit 39bbc2230d7cb9609954d90a9a471c2f9574185c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 12:57:53 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Oct 19 22:25:11 2018 +0200

    new throws on failure
    
    Change-Id: Ida6250fc01e0bf156a81030c2f393838ced423fe
    Reviewed-on: https://gerrit.libreoffice.org/61998
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx
index f7f8ccd23806..6ab62d5f94ce 100644
--- a/shell/source/win32/zipfile/zipfile.cxx
+++ b/shell/source/win32/zipfile/zipfile.cxx
@@ -405,7 +405,7 @@ ZipFile::ZipFile(const std::wstring &FileName) :
     m_bShouldFree(true)
 {
     m_pStream = new FileStream(FileName.c_str());
-    if (m_pStream && !isZipStream(m_pStream))
+    if (!isZipStream(m_pStream))
     {
         delete m_pStream;
         m_pStream = nullptr;
commit 2bb1a0bf95570b205e181235bb906eaadc949318
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 12:30:42 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Oct 19 22:24:44 2018 +0200

    loop run a maximum of once
    
    revealed since...
    
    commit f69585c35411ca74e17bb6cd1cf535489472a4c2
    Date:   Tue Mar 1 20:38:22 2016 +0200
    
        loplugin:unuseddefaultparams in chart2
    
    Change-Id: I805680f7087313b1bb678ab6f6756d7a2ccc3720
    Reviewed-on: https://gerrit.libreoffice.org/61991
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index c3d9104e8e98..f7be64b86c3b 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -280,26 +280,23 @@ void DiagramHelper::setStackMode(
             if( !xChartTypeContainer.is() )
                 continue;
             uno::Sequence< uno::Reference< XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() );
-            sal_Int32 nMax = aChartTypeList.getLength();
-            if( nMax >= 1 )
-                nMax = 1;
-            for( sal_Int32 nT = 0; nT < nMax; ++nT )
-            {
-                uno::Reference< XChartType > xChartType( aChartTypeList[nT] );
+            if (!aChartTypeList.getLength())
+                continue;
 
-                //iterate through all series in this chart type
-                uno::Reference< XDataSeriesContainer > xDataSeriesContainer( xChartType, uno::UNO_QUERY );
-                OSL_ASSERT( xDataSeriesContainer.is());
-                if( !xDataSeriesContainer.is() )
-                    continue;
+            uno::Reference< XChartType > xChartType( aChartTypeList[0] );
 
-                uno::Sequence< uno::Reference< XDataSeries > > aSeriesList( xDataSeriesContainer->getDataSeries() );
-                for( sal_Int32 nS = 0; nS < aSeriesList.getLength(); ++nS )
-                {
-                    Reference< beans::XPropertySet > xProp( aSeriesList[nS], uno::UNO_QUERY );
-                    if(xProp.is())
-                        xProp->setPropertyValue( "StackingDirection", aNewDirection );
-                }
+            //iterate through all series in this chart type
+            uno::Reference< XDataSeriesContainer > xDataSeriesContainer( xChartType, uno::UNO_QUERY );
+            OSL_ASSERT( xDataSeriesContainer.is());
+            if( !xDataSeriesContainer.is() )
+                continue;
+
+            uno::Sequence< uno::Reference< XDataSeries > > aSeriesList( xDataSeriesContainer->getDataSeries() );
+            for( sal_Int32 nS = 0; nS < aSeriesList.getLength(); ++nS )
+            {
+                Reference< beans::XPropertySet > xProp( aSeriesList[nS], uno::UNO_QUERY );
+                if(xProp.is())
+                    xProp->setPropertyValue( "StackingDirection", aNewDirection );
             }
         }
     }


More information about the Libreoffice-commits mailing list