[Libreoffice-commits] core.git: sd/qa sd/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 6 16:03:37 UTC 2020


 sd/qa/unit/import-tests.cxx                  |    3 +--
 sd/source/core/EffectMigration.cxx           |    4 +---
 sd/source/filter/eppt/pptx-text.cxx          |    1 -
 sd/source/ui/app/sdpopup.cxx                 |    2 --
 sd/source/ui/dlg/dlgfield.cxx                |    8 --------
 sd/source/ui/sidebar/MasterPageContainer.cxx |    4 ----
 6 files changed, 2 insertions(+), 20 deletions(-)

New commits:
commit 971db8196fee933fffb4cd4613383026a747b92f
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Apr 6 15:47:24 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Apr 6 18:03:04 2020 +0200

    loplugin:unusedvariableplus in sd
    
    Change-Id: I86ac16689360e79ab109cd548b55848522a0553f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91754
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index e47c8e3cbe10..d3670d167ff5 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -879,7 +879,7 @@ void SdImportTest::testStrictOOXML()
 
     SdDrawDocument *pDoc = xDocShRef->GetDoc();
     CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
-    uno::Reference< beans::XPropertySet > xShape( getShapeFromPage( 0, 0, xDocShRef ) );
+    getShapeFromPage( 0, 0, xDocShRef );
 
     xDocShRef->DoClose();
 }
@@ -2592,7 +2592,6 @@ void SdImportTest::testTdf114488()
     uno::Reference<graphic::XGraphic> xGraphic;
     xShape->getPropertyValue("Graphic") >>= xGraphic;
     CPPUNIT_ASSERT(xGraphic.is());
-    Graphic aGraphic(xGraphic);
     OUString sMimeType(comphelper::GraphicMimeTypeHelper::GetMimeTypeForXGraphic(xGraphic));
     CPPUNIT_ASSERT_EQUAL(OUString("image/x-wmf"), sMimeType);
 
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index 7ca5fcee2c92..1aa52dfe0c68 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -656,8 +656,6 @@ void EffectMigration::SetTextAnimationEffect( SvxShape* pShape, AnimationEffect
             }
             else
             {
-                CustomAnimationPresetPtr pShapePreset( rPresets.getEffectDescriptor( "ooo-entrance-appear" ) );
-
                 Reference< XAnimationNode > xNode( pPreset->create( "" ) );
                 DBG_ASSERT( xNode.is(), "EffectMigration::SetTextAnimationEffect(), could not create preset!" );
                 if( xNode.is() )
@@ -1281,7 +1279,7 @@ void EffectMigration::SetAnimationPath( SvxShape* pShape, SdrPathObj const * pPa
         {
             std::shared_ptr< sd::MainSequence > pMainSequence( pPage->getMainSequence() );
             if( pMainSequence.get() )
-                CustomAnimationEffectPtr pCreated( pMainSequence->append( *pPathObj, makeAny( xShape ), -1.0, "" ) );
+                pMainSequence->append( *pPathObj, makeAny( xShape ), -1.0, "" );
         }
     }
 }
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 5180051ecc2c..46311702b3e4 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -877,7 +877,6 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider* pBuProv, sal_Int1
                 {
                     if ( aBuGraSize.Width() && aBuGraSize.Height() )
                     {
-                        Graphic aGraphic(xGraphic);
                         nBulletId = pBuProv->GetId(xGraphic, aBuGraSize );
                         if ( nBulletId != 0xffff )
                             bExtendedBulletsUsed = true;
diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx
index 89cf3ea5a4b8..eeadaef35bf9 100644
--- a/sd/source/ui/app/sdpopup.cxx
+++ b/sd/source/ui/app/sdpopup.cxx
@@ -254,8 +254,6 @@ SvxFieldData* SdFieldPopup::GetField()
 
             if( pDocSh )
             {
-                SvxExtFileField aFileField( *pFileField );
-
                 OUString aName;
                 if( pDocSh->HasName() )
                     aName = pDocSh->GetMedium()->GetName();
diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx
index 164fbac3b753..9a7bc1d0b2b0 100644
--- a/sd/source/ui/dlg/dlgfield.cxx
+++ b/sd/source/ui/dlg/dlgfield.cxx
@@ -101,7 +101,6 @@ SvxFieldData* SdModifyFieldDlg::GetField()
         }
         else if( dynamic_cast< const SvxExtFileField *>( m_pField ) !=  nullptr )
         {
-            const SvxExtFileField* pFileField = static_cast<const SvxExtFileField*>( m_pField );
             SvxFileType   eType;
             SvxFileFormat eFormat;
 
@@ -116,8 +115,6 @@ SvxFieldData* SdModifyFieldDlg::GetField()
 
             if( pDocSh )
             {
-                SvxExtFileField aFileField( *pFileField );
-
                 OUString aName;
                 if( pDocSh->HasName() )
                     aName = pDocSh->GetMedium()->GetName();
@@ -214,7 +211,6 @@ void SdModifyFieldDlg::FillFormatList()
     else if( dynamic_cast< const SvxExtFileField *>( m_pField ) !=  nullptr )
     {
         const SvxExtFileField* pFileField = static_cast<const SvxExtFileField*>( m_pField );
-        SvxExtFileField aFileField( *pFileField );
 
         m_xLbFormat->append_text( SdResId( STR_FILEFORMAT_NAME_EXT ) );
         m_xLbFormat->append_text( SdResId( STR_FILEFORMAT_FULLPATH ) );
@@ -247,7 +243,6 @@ void SdModifyFieldDlg::FillControls()
     if( dynamic_cast< const SvxDateField *>( m_pField ) !=  nullptr )
     {
         const SvxDateField* pDateField = static_cast<const SvxDateField*>(m_pField);
-        SvxDateField aDateField( *pDateField );
 
         if( pDateField->GetType() == SvxDateType::Fix )
             m_xRbtFix->set_active(true);
@@ -257,7 +252,6 @@ void SdModifyFieldDlg::FillControls()
     else if( dynamic_cast< const SvxExtTimeField *>( m_pField ) !=  nullptr )
     {
         const SvxExtTimeField* pTimeField = static_cast<const SvxExtTimeField*>(m_pField);
-        SvxExtTimeField aTimeField( *pTimeField );
 
         if( pTimeField->GetType() == SvxTimeType::Fix )
             m_xRbtFix->set_active(true);
@@ -267,7 +261,6 @@ void SdModifyFieldDlg::FillControls()
     else if( dynamic_cast< const SvxExtFileField *>( m_pField ) !=  nullptr )
     {
         const SvxExtFileField* pFileField = static_cast<const SvxExtFileField*>(m_pField);
-        SvxExtFileField aFileField( *pFileField );
 
         if( pFileField->GetType() == SvxFileType::Fix )
             m_xRbtFix->set_active(true);
@@ -277,7 +270,6 @@ void SdModifyFieldDlg::FillControls()
     else if( dynamic_cast< const SvxAuthorField *>( m_pField ) !=  nullptr )
     {
         const SvxAuthorField* pAuthorField = static_cast<const SvxAuthorField*>(m_pField);
-        SvxAuthorField aAuthorField( *pAuthorField );
 
         if( pAuthorField->GetType() == SvxAuthorType::Fix )
             m_xRbtFix->set_active(true);
diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx
index d63bc2664cbb..67b6dbe9f37b 100644
--- a/sd/source/ui/sidebar/MasterPageContainer.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainer.cxx
@@ -795,10 +795,6 @@ Reference<frame::XModel> MasterPageContainer::Implementation::GetModel()
 
     if ( ! mxModel.is())
     {
-        // Get the desktop a s service factory.
-        uno::Reference<frame::XDesktop2> xDesktop  = frame::Desktop::create(
-            ::comphelper::getProcessComponentContext() );
-
         // Create a new model.
         mxModel.set(
             ::comphelper::getProcessServiceFactory()->createInstance(


More information about the Libreoffice-commits mailing list