[Libreoffice-commits] core.git: sdext/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 18 16:18:19 UTC 2020


 sdext/source/minimizer/optimizerdialogcontrols.cxx |   45 ++++-----------------
 1 file changed, 10 insertions(+), 35 deletions(-)

New commits:
commit 73f9d308337ce54d724f46e96e6505c45f445f26
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Aug 18 16:01:19 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Aug 18 18:17:35 2020 +0200

    remove dead code
    
    since
        commit e22c431e24b4a83ddc928f7703b13a9a109c1b8e
        Date:   Fri May 11 13:01:25 2007 +0000
        initial version
    found by loplugin:unusedvarsglobal
    
    Change-Id: I7ae07c25fadc4cac4c176c763fe886c0df02a235
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100926
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx
index 5c6ad0dd4cb4..a7e139c33f24 100644
--- a/sdext/source/minimizer/optimizerdialogcontrols.cxx
+++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx
@@ -638,7 +638,6 @@ void OptimizerDialog::UpdateControlStatesPage4()
 
     // taking care of deleted slides
     sal_Int32 nDeletedSlides = 0;
-    OUString aCustomShowName;
     if ( getControlProperty( "CheckBox3Pg3", "State" ) >>= nInt16 )
     {
         if ( nInt16 )
@@ -661,44 +660,20 @@ void OptimizerDialog::UpdateControlStatesPage4()
             }
         }
     }
-    if ( !aCustomShowName.isEmpty() )
-    {
-        std::vector< Reference< XDrawPage > > vNonUsedPageList;
-        PageCollector::CollectNonCustomShowPages( mxController->getModel(), aCustomShowName, vNonUsedPageList );
-        nDeletedSlides += vNonUsedPageList.size();
-    }
     if ( GetConfigProperty( TK_DeleteHiddenSlides, false ) )
     {
-        if ( !aCustomShowName.isEmpty() )
-        {
-            std::vector< Reference< XDrawPage > > vUsedPageList;
-            PageCollector::CollectCustomShowPages( mxController->getModel(), aCustomShowName, vUsedPageList );
-            for( const auto& rxPage : vUsedPageList )
-            {
-                Reference< XPropertySet > xPropSet( rxPage, UNO_QUERY_THROW );
-                bool bVisible = true;
-                if ( xPropSet->getPropertyValue( "Visible" ) >>= bVisible )
-                {
-                    if (!bVisible )
-                        nDeletedSlides++;
-                }
-            }
-        }
-        else
+        Reference< XDrawPagesSupplier > xDrawPagesSupplier( mxController->getModel(), UNO_QUERY_THROW );
+        Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_SET_THROW );
+        for( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ )
         {
-            Reference< XDrawPagesSupplier > xDrawPagesSupplier( mxController->getModel(), UNO_QUERY_THROW );
-            Reference< XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), UNO_SET_THROW );
-            for( sal_Int32 i = 0; i < xDrawPages->getCount(); i++ )
-            {
-                Reference< XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), UNO_QUERY_THROW );
-                Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY_THROW );
+            Reference< XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), UNO_QUERY_THROW );
+            Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY_THROW );
 
-                bool bVisible = true;
-                if ( xPropSet->getPropertyValue( "Visible" ) >>= bVisible )
-                {
-                    if (!bVisible )
-                        nDeletedSlides++;
-                }
+            bool bVisible = true;
+            if ( xPropSet->getPropertyValue( "Visible" ) >>= bVisible )
+            {
+                if (!bVisible )
+                    nDeletedSlides++;
             }
         }
     }


More information about the Libreoffice-commits mailing list