include/sfx2/basedlgs.hxx                     |    1 
 sc/source/ui/inc/duplicaterecordsdlg.hxx      |    1 
 sc/source/ui/miscdlgs/duplicaterecordsdlg.cxx |    1 
 sd/source/ui/inc/SlideTransitionPane.hxx      |    3 -
 sd/source/ui/tools/SlideshowLayerRenderer.cxx |    4 --
 sfx2/source/dialog/basedlgs.cxx               |    2 -
 slideshow/source/engine/slide/slideimpl.cxx   |    9 -----
 svx/source/form/fmexpl.cxx                    |   46 --------------------------
 svx/source/inc/fmexpl.hxx                     |    6 ---
 9 files changed, 1 insertion(+), 72 deletions(-)

New commits:
commit d1e8e430db41e1b3e90332e6826ba71ccb8c6971
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Nov 22 12:17:55 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Nov 22 20:03:37 2024 +0100

    loplugin:unusedfields
    
    Change-Id: I9ee946ceabf59e4126db938d6abda446fcf9ce36
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176994
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 4f7cd0f29c8f..b962ce611612 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -129,7 +129,6 @@ protected:
     std::unique_ptr<SfxTabPage> m_xSfxPage;
     std::unique_ptr<weld::Container> m_xContainer;
     std::unique_ptr<weld::Button> m_xOKBtn;
-    std::unique_ptr<weld::Button> m_xHelpBtn;
 
     void                CreateOutputItemSet(const SfxItemSet& rInput);
     void                SetInputSet(const SfxItemSet* pInSet) { m_pInputSet = 
pInSet; }
diff --git a/sc/source/ui/inc/duplicaterecordsdlg.hxx 
b/sc/source/ui/inc/duplicaterecordsdlg.hxx
index c0bee041465c..cee462cebdbb 100644
--- a/sc/source/ui/inc/duplicaterecordsdlg.hxx
+++ b/sc/source/ui/inc/duplicaterecordsdlg.hxx
@@ -63,7 +63,6 @@ private:
     std::unique_ptr<weld::Label> m_xRecordsLabel;
 
     std::unique_ptr<weld::Button> m_xOkBtn;
-    std::unique_ptr<weld::Button> m_xHelpBtn;
 
     uno::Sequence<uno::Sequence<uno::Any>>& mrCellData;
     ScRange& mrRange;
diff --git a/sc/source/ui/miscdlgs/duplicaterecordsdlg.cxx 
b/sc/source/ui/miscdlgs/duplicaterecordsdlg.cxx
index dbe3c050c370..b626236e0823 100644
--- a/sc/source/ui/miscdlgs/duplicaterecordsdlg.cxx
+++ b/sc/source/ui/miscdlgs/duplicaterecordsdlg.cxx
@@ -42,7 +42,6 @@ ScDuplicateRecordsDlg::ScDuplicateRecordsDlg(weld::Window* 
pParent,
     , m_xAllChkBtn(m_xBuilder->weld_check_button("allcheckbtn"))
     , m_xRecordsLabel(m_xBuilder->weld_label("records"))
     , m_xOkBtn(m_xBuilder->weld_button("okbtn"))
-    , m_xHelpBtn(m_xBuilder->weld_button("helpbutton"))
     , mrCellData(rData)
     , mrRange(rRange)
     , mrViewData(rViewData)
diff --git a/sd/source/ui/inc/SlideTransitionPane.hxx 
b/sd/source/ui/inc/SlideTransitionPane.hxx
index 0a7eeed88ef4..d7fc32a67686 100644
--- a/sd/source/ui/inc/SlideTransitionPane.hxx
+++ b/sd/source/ui/inc/SlideTransitionPane.hxx
@@ -138,9 +138,6 @@ private:
     std::vector<OUString>  maSoundList;
     mutable OUString maCurrentSoundFile;
 
-    // How many variants each transition set has
-    std::map< OUString, int > m_aNumVariants;
-
     Timer maLateInitTimer;
 };
 
diff --git a/sd/source/ui/tools/SlideshowLayerRenderer.cxx 
b/sd/source/ui/tools/SlideshowLayerRenderer.cxx
index 6d8b4c08dc22..dc219fe4d20a 100644
--- a/sd/source/ui/tools/SlideshowLayerRenderer.cxx
+++ b/sd/source/ui/tools/SlideshowLayerRenderer.cxx
@@ -39,14 +39,12 @@ namespace sd
 struct RenderContext
 {
     SdrModel& mrModel;
-    SdrPage& mrPage;
 
     EEControlBits mnSavedControlBits;
     ScopedVclPtrInstance<VirtualDevice> maVirtualDevice;
 
     RenderContext(unsigned char* pBuffer, SdrModel& rModel, SdrPage& rPage, 
Size const& rSlideSize)
         : mrModel(rModel)
-        , mrPage(rPage)
         , maVirtualDevice(DeviceFormat::WITHOUT_ALPHA)
     {
         // Turn off spelling
@@ -58,7 +56,7 @@ struct RenderContext
 
         maVirtualDevice->SetOutputSizePixelScaleOffsetAndLOKBuffer(rSlideSize, 
Fraction(1.0),
                                                                    Point(), 
pBuffer);
-        Size aPageSize(mrPage.GetSize());
+        Size aPageSize(rPage.GetSize());
 
         MapMode aMapMode(MapUnit::Map100thMM);
         const Fraction aFracX(rSlideSize.Width(),
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 0a1ab15b2a51..ab0a747bbb16 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -233,7 +233,6 @@ 
SfxSingleTabDialogController::SfxSingleTabDialogController(weld::Widget *pParent
     , m_pInputSet(pSet)
     , m_xContainer(m_xDialog->weld_content_area())
     , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr))
-    , m_xHelpBtn(m_xBuilder->weld_button(u"help"_ustr))
 {
     m_xOKBtn->connect_clicked(LINK(this, SfxSingleTabDialogController, 
OKHdl_Impl));
 }
@@ -244,7 +243,6 @@ 
SfxSingleTabDialogController::SfxSingleTabDialogController(weld::Widget *pParent
     , m_pInputSet(pSet)
     , m_xContainer(m_xBuilder->weld_container(rContainerId))
     , m_xOKBtn(m_xBuilder->weld_button(u"ok"_ustr))
-    , m_xHelpBtn(m_xBuilder->weld_button(u"help"_ustr))
 {
     m_xOKBtn->connect_clicked(LINK(this, SfxSingleTabDialogController, 
OKHdl_Impl));
 }
diff --git a/slideshow/source/engine/slide/slideimpl.cxx 
b/slideshow/source/engine/slide/slideimpl.cxx
index 6e758c995711..1f5f7dd43c6e 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -208,7 +208,6 @@ private:
     std::shared_ptr<ShapeImporter> mpMPShapesFunctor;
     std::shared_ptr<ShapeImporter> mpShapesFunctor;
     std::unordered_map< BitmapChecksum, BitmapEx > maBitmapMap;
-    std::vector<OString> maJsonMsgList;
     std::unordered_map<std::string, bool> maAnimatedShapeVisibilityMap;
 
     sal_uInt32 mnMPLayerIndex;
@@ -385,7 +384,6 @@ void LOKSlideRenderer::renderBackgroundImpl(VirtualDevice& 
rDevice)
     appendImageInfoPlaceholder(aJsonWriter);
 
     msLastJsonMessage = aJsonWriter.finishAndGetAsOString();
-    maJsonMsgList.push_back(msLastJsonMessage);
 
     // clean up
     rDevice.Erase();
@@ -411,7 +409,6 @@ void LOKSlideRenderer::renderMasterPageImpl(VirtualDevice& 
rDevice)
 
         msLastPlaceholder = "";
         msLastJsonMessage = aJsonWriter.finishAndGetAsOString();
-        maJsonMsgList.push_back(msLastJsonMessage);
         ++mnMPLayerIndex;
         return;
     }
@@ -461,7 +458,6 @@ void LOKSlideRenderer::renderMasterPageImpl(VirtualDevice& 
rDevice)
                 }
                 bDoRendering = false;
                 msLastJsonMessage = aJsonWriter.finishAndGetAsOString();
-                maJsonMsgList.push_back(msLastJsonMessage);
                 ++mnMPLayerIndex;
                 return;
             }
@@ -472,7 +468,6 @@ void LOKSlideRenderer::renderMasterPageImpl(VirtualDevice& 
rDevice)
         renderLayerImpl(rDevice, aJsonWriter);
     }
     msLastJsonMessage = aJsonWriter.finishAndGetAsOString();
-    maJsonMsgList.push_back(msLastJsonMessage);
 
     mbMasterPageRenderingDone = true;
 }
@@ -516,7 +511,6 @@ void LOKSlideRenderer::renderTextFieldsImpl(VirtualDevice& 
rDevice)
                     appendImageInfoPlaceholder(aJsonWriter);
                 }
                 msLastJsonMessage = aJsonWriter.finishAndGetAsOString();
-                maJsonMsgList.push_back(msLastJsonMessage);
 
                 // clean up
                 rDevice.Erase();
@@ -558,7 +552,6 @@ void LOKSlideRenderer::renderDrawPageImpl(VirtualDevice& 
rDevice)
         renderAnimatedShapeImpl(rDevice, mpDPLastAnimatedShape, aJsonWriter);
         mpDPLastAnimatedShape.reset();
         msLastJsonMessage = aJsonWriter.finishAndGetAsOString();
-        maJsonMsgList.push_back(msLastJsonMessage);
         ++mnDPLayerIndex;
         return;
     }
@@ -630,7 +623,6 @@ void LOKSlideRenderer::renderDrawPageImpl(VirtualDevice& 
rDevice)
                     renderAnimatedShapeImpl(rDevice, pShape, aJsonWriter);
                 }
                 msLastJsonMessage = aJsonWriter.finishAndGetAsOString();
-                maJsonMsgList.push_back(msLastJsonMessage);
                 ++mnDPLayerIndex;
                 return;
             }
@@ -641,7 +633,6 @@ void LOKSlideRenderer::renderDrawPageImpl(VirtualDevice& 
rDevice)
         renderLayerImpl(rDevice, aJsonWriter);
     }
     msLastJsonMessage = aJsonWriter.finishAndGetAsOString();
-    maJsonMsgList.push_back(msLastJsonMessage);
 
     mbDrawPageRenderingDone = true;
 }
commit 0c7c2716db83a0afeb1859b5fde3e44cf61b5fc5
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Nov 22 10:07:15 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Nov 22 20:03:28 2024 +0100

    loplugin:methodcycles
    
    found cycle
        FmEntryData::FmEntryData(const FmEntryData &)
        svx/source/inc/fmexpl.hxx:148
    
        FmFormData::FmFormData(const FmFormData &)
        svx/source/inc/fmexpl.hxx:230
    
        FmControlData::FmControlData(const FmControlData &)
        svx/source/inc/fmexpl.hxx:252
    
        std::unique_ptr<FmEntryData> FmEntryData::Clone()
        svx/source/inc/fmexpl.hxx:161
    
    Change-Id: I2bef463f62b4513c473bb99eb999a97e99f5e602
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176993
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx
index 59fa0f638188..4394201511d0 100644
--- a/svx/source/form/fmexpl.cxx
+++ b/svx/source/form/fmexpl.cxx
@@ -168,26 +168,6 @@ void FmEntryData::newObject( const css::uno::Reference< 
css::uno::XInterface >&
 }
 
 
-FmEntryData::FmEntryData( const FmEntryData& rEntryData )
-{
-    pChildList.reset( new FmEntryDataList() );
-    aText = rEntryData.GetText();
-    m_aNormalImage = rEntryData.GetNormalImage();
-    pParent = rEntryData.GetParent();
-
-    FmEntryData* pChildData;
-    size_t nEntryCount = rEntryData.GetChildList()->size();
-    for( size_t i = 0; i < nEntryCount; i++ )
-    {
-        pChildData = rEntryData.GetChildList()->at( i );
-        std::unique_ptr<FmEntryData> pNewChildData = pChildData->Clone();
-        pChildList->insert( std::move(pNewChildData), size_t(-1) );
-    }
-
-    m_xNormalizedIFace = rEntryData.m_xNormalizedIFace;
-    m_xProperties = rEntryData.m_xProperties;
-    m_xChild = rEntryData.m_xChild;
-}
 
 
 
@@ -242,19 +222,6 @@ FmFormData::~FmFormData()
 {
 }
 
-FmFormData::FmFormData( const FmFormData& rFormData )
-    :FmEntryData( rFormData )
-{
-    m_xForm = rFormData.GetFormIface();
-}
-
-
-std::unique_ptr<FmEntryData> FmFormData::Clone()
-{
-    return std::unique_ptr<FmEntryData>(new FmFormData( *this ));
-}
-
-
 bool FmFormData::IsEqualWithoutChildren( FmEntryData* pEntryData )
 {
     if(this == pEntryData)
@@ -291,19 +258,6 @@ FmControlData::~FmControlData()
 }
 
 
-FmControlData::FmControlData( const FmControlData& rControlData )
-    :FmEntryData( rControlData )
-{
-    m_xFormComponent = rControlData.GetFormComponent();
-}
-
-
-std::unique_ptr<FmEntryData> FmControlData::Clone()
-{
-    return std::unique_ptr<FmEntryData>(new FmControlData( *this ));
-}
-
-
 OUString FmControlData::GetImage() const
 {
     // Default-Image
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index ca69f4de3ff4..8028c7eb3aa9 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -145,7 +145,6 @@ protected:
 public:
 
     FmEntryData( FmEntryData* pParentData, const css::uno::Reference< 
css::uno::XInterface >& _rIFace );
-    FmEntryData( const FmEntryData& rEntryData );
     virtual ~FmEntryData();
 
     void    SetText( const OUString& rText ){ aText = rText; }
@@ -158,7 +157,6 @@ public:
     FmEntryDataList* GetChildList() const { return pChildList.get(); }
 
     virtual bool IsEqualWithoutChildren( FmEntryData* pEntryData );
-    virtual std::unique_ptr<FmEntryData> Clone() = 0;
 
     // note that the interface returned is normalized, i.e. querying the given 
XInterface of the object
     // for XInterface must return the interface itself.
@@ -227,13 +225,11 @@ class FmFormData final : public FmEntryData
 
 public:
     FmFormData(const css::uno::Reference< css::form::XForm >& _rxForm, 
FmFormData* _pParent);
-    FmFormData( const FmFormData& rFormData );
     virtual ~FmFormData() override;
 
     const css::uno::Reference< css::form::XForm >& GetFormIface() const { 
return m_xForm; }
 
     virtual bool IsEqualWithoutChildren( FmEntryData* pEntryData ) override;
-    virtual std::unique_ptr<FmEntryData> Clone() override;
 };
 
 
@@ -249,12 +245,10 @@ public:
         const css::uno::Reference< css::form::XFormComponent >& _rxComponent,
         FmFormData* _pParent
     );
-    FmControlData( const FmControlData& rControlData );
     virtual ~FmControlData() override;
 
     const css::uno::Reference< css::form::XFormComponent >& GetFormComponent() 
const { return m_xFormComponent; }
     virtual bool IsEqualWithoutChildren( FmEntryData* pEntryData ) override;
-    virtual std::unique_ptr<FmEntryData> Clone() override;
 
     void ModelReplaced(const css::uno::Reference< css::form::XFormComponent >& 
_rxNew);
 };

Reply via email to