[Libreoffice-commits] core.git: 2 commits - cui/source dbaccess/source include/vcl sd/inc sd/source starmath/inc starmath/source vcl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sun Jun 9 11:50:27 UTC 2019


 cui/source/customize/SvxToolbarConfigPage.cxx   |    4 +-
 cui/source/inc/SvxToolbarConfigPage.hxx         |    2 -
 dbaccess/source/ui/control/tabletree.cxx        |   36 +++++++++---------------
 dbaccess/source/ui/inc/tabletree.hxx            |    3 --
 include/vcl/bitmapex.hxx                        |    6 ----
 sd/inc/sdabstdlg.hxx                            |    1 
 sd/source/ui/dlg/sddlgfact.cxx                  |    5 +++
 sd/source/ui/dlg/sddlgfact.hxx                  |    1 
 sd/source/ui/dlg/sdtreelb.cxx                   |    4 +-
 sd/source/ui/dlg/tpaction.cxx                   |    4 +-
 sd/source/ui/inc/sdtreelb.hxx                   |    2 -
 starmath/inc/AccessibleSmElementsControl.hxx    |    2 -
 starmath/source/AccessibleSmElementsControl.cxx |    4 --
 starmath/source/ElementsDockingWindow.cxx       |    2 -
 vcl/source/gdi/bitmapex.cxx                     |    9 ++----
 15 files changed, 38 insertions(+), 47 deletions(-)

New commits:
commit 13e5d52fc37f9283edd8a055d6b86108701182f1
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sun Jun 9 08:50:02 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Jun 9 13:49:39 2019 +0200

    loplugin:constantparam
    
    Change-Id: I7bbc4e1546acf58f1ca24bfec5e465bad5ca90de
    Reviewed-on: https://gerrit.libreoffice.org/73732
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx
index 178a9c851ac3..fde5b58dd58b 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -856,7 +856,7 @@ void SvxToolbarConfigPage::SelectElement()
     UpdateButtonStates();
 }
 
-void SvxToolbarConfigPage::AddFunction(int nTarget, bool bFront)
+void SvxToolbarConfigPage::AddFunction(int nTarget)
 {
     SvxConfigEntry* pToolbar = GetTopLevelSelection();
 
@@ -865,7 +865,7 @@ void SvxToolbarConfigPage::AddFunction(int nTarget, bool bFront)
 
     // Add the command to the contents listbox of the selected toolbar
     int nNewLBEntry =
-        SvxConfigPage::AddFunction(nTarget, bFront, true/*bAllowDuplicates*/);
+        SvxConfigPage::AddFunction(nTarget, /*bFront*/false, true/*bAllowDuplicates*/);
 
     if (nNewLBEntry == -1)
         return;
diff --git a/cui/source/inc/SvxToolbarConfigPage.hxx b/cui/source/inc/SvxToolbarConfigPage.hxx
index 7c82bd8a61ea..bd0d32f3b3ea 100644
--- a/cui/source/inc/SvxToolbarConfigPage.hxx
+++ b/cui/source/inc/SvxToolbarConfigPage.hxx
@@ -70,7 +70,7 @@ public:
     virtual ~SvxToolbarConfigPage() override;
     virtual void dispose() override;
 
-    void            AddFunction(int nTarget = -1, bool bFront = false);
+    void            AddFunction(int nTarget = -1);
 
     void            MoveEntry( bool bMoveUp ) override;
 
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index 4cc0885d8112..a0e126254062 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -410,11 +410,7 @@ void TableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConne
         for (auto const& table : _rTables)
         {
             // add the entry
-            implAddEntry(
-                xMeta,
-                table.first,
-                false
-            );
+            implAddEntry(xMeta, table.first);
         }
 
         if ( !m_bNoEmptyFolders && lcl_shouldDisplayEmptySchemasAndCatalogs( _rxConnection ) )
@@ -684,8 +680,7 @@ SvTreeListEntry* OTableTreeListBox::implAddEntry(
 
 void TableTreeListBox::implAddEntry(
         const Reference< XDatabaseMetaData >& _rxMeta,
-        const OUString& _rTableName,
-        bool _bCheckName
+        const OUString& _rTableName
     )
 {
     OSL_PRECOND( _rxMeta.is(), "OTableTreeListBox::implAddEntry: invalid meta data!" );
@@ -746,23 +741,20 @@ void TableTreeListBox::implAddEntry(
         xParentEntry = std::move(xFolder);
     }
 
-    if (!_bCheckName || !GetEntryPosByName(sName, xParentEntry.get()))
-    {
-        std::unique_ptr<weld::TreeIter> xEntry = m_xTreeView->make_iterator();
-        m_xTreeView->insert(xParentEntry.get(), -1, nullptr, nullptr, nullptr, nullptr, nullptr, false, xEntry.get());
+    std::unique_ptr<weld::TreeIter> xEntry = m_xTreeView->make_iterator();
+    m_xTreeView->insert(xParentEntry.get(), -1, nullptr, nullptr, nullptr, nullptr, nullptr, false, xEntry.get());
 
-        auto xGraphic = m_xImageProvider->getXGraphic(_rTableName, DatabaseObject::TABLE);
-        if (xGraphic.is())
-            m_xTreeView->set_image(*xEntry, xGraphic, -1);
-        else
-        {
-            OUString sImageId(m_xImageProvider->getImageId(_rTableName, DatabaseObject::TABLE));
-            m_xTreeView->set_image(*xEntry, sImageId, -1);
-        }
-        if (m_bShowToggles)
-            m_xTreeView->set_toggle(*xEntry, TRISTATE_FALSE, 0);
-        m_xTreeView->set_text(*xEntry, sName, m_nTextColumn);
+    auto xGraphic = m_xImageProvider->getXGraphic(_rTableName, DatabaseObject::TABLE);
+    if (xGraphic.is())
+        m_xTreeView->set_image(*xEntry, xGraphic, -1);
+    else
+    {
+        OUString sImageId(m_xImageProvider->getImageId(_rTableName, DatabaseObject::TABLE));
+        m_xTreeView->set_image(*xEntry, sImageId, -1);
     }
+    if (m_bShowToggles)
+        m_xTreeView->set_toggle(*xEntry, TRISTATE_FALSE, 0);
+    m_xTreeView->set_text(*xEntry, sName, m_nTextColumn);
 }
 
 NamedDatabaseObject OTableTreeListBox::describeObject( SvTreeListEntry* _pEntry )
diff --git a/dbaccess/source/ui/inc/tabletree.hxx b/dbaccess/source/ui/inc/tabletree.hxx
index 2cbb4b3c1951..46487fc78b8d 100644
--- a/dbaccess/source/ui/inc/tabletree.hxx
+++ b/dbaccess/source/ui/inc/tabletree.hxx
@@ -216,8 +216,7 @@ private:
     */
     void implAddEntry(
             const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rxMeta,
-            const OUString& _rTableName,
-            bool _bCheckName = true
+            const OUString& _rTableName
         );
 
     void    implOnNewConnection( const css::uno::Reference< css::sdbc::XConnection >& _rxConnection );
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index c77607dbc61f..c6eb9cfca85a 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -371,16 +371,12 @@ public:
         @param rTransformation
         The back transformation for each pixel in (0 .. fWidth),(0 .. fHeight) to
         local pixel coordinates
-
-        @param bSmooth
-        Defines if pixel interpolation is to be used to create the result
     */
     [[nodiscard]]
     BitmapEx            TransformBitmapEx(
                             double fWidth,
                             double fHeight,
-                            const basegfx::B2DHomMatrix& rTransformation,
-                            bool bSmooth) const;
+                            const basegfx::B2DHomMatrix& rTransformation) const;
 
     /** Create transformed Bitmap
 
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index cfac921eeda0..6bce07db2b24 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -1696,14 +1696,14 @@ void SdPageObjsTLV::AddShapeList (
 /**
  * Fill TreeLB with pages and objects
  */
-void SdPageObjsTLV::Fill(const SdDrawDocument* pInDoc, bool bAllPages, const OUString& rDocName)
+void SdPageObjsTLV::Fill(const SdDrawDocument* pInDoc, const OUString& rDocName)
 {
     OUString aSelection = m_xTreeView->get_selected_text();
     clear();
 
     m_pDoc = pInDoc;
     m_aDocName = rDocName;
-    m_bShowAllPages = bAllPages;
+    m_bShowAllPages = true;
     m_pMedium = nullptr;
 
     // first insert all pages including objects
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 5edca44aa8a3..8eda52babf31 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -355,7 +355,7 @@ void SdTPAction::UpdateTree()
 {
     if( !bTreeUpdated && mpDoc && mpDoc->GetDocSh() && mpDoc->GetDocSh()->GetMedium() )
     {
-        m_xLbTree->Fill( mpDoc, true, mpDoc->GetDocSh()->GetMedium()->GetName() );
+        m_xLbTree->Fill( mpDoc, mpDoc->GetDocSh()->GetMedium()->GetName() );
         bTreeUpdated = true;
     }
 }
@@ -649,7 +649,7 @@ IMPL_LINK_NOARG(SdTPAction, CheckFileHdl, weld::Widget&, void)
                         aLastFile = aFile;
 
                         m_xLbTreeDocument->clear();
-                        m_xLbTreeDocument->Fill(pBookmarkDoc, true, aFile);
+                        m_xLbTreeDocument->Fill(pBookmarkDoc, aFile);
                         mpDoc->CloseBookmarkDoc();
                         m_xLbTreeDocument->show();
                         bHideTreeDocument = false;
diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx
index 8d404ebf5b7c..12d7a7eededc 100644
--- a/sd/source/ui/inc/sdtreelb.hxx
+++ b/sd/source/ui/inc/sdtreelb.hxx
@@ -413,7 +413,7 @@ public:
 
     void SetViewFrame(const SfxViewFrame* pViewFrame);
 
-    void Fill(const SdDrawDocument*, bool bAllPages, const OUString& rDocName);
+    void Fill(const SdDrawDocument*, const OUString& rDocName);
     void Fill(const SdDrawDocument*, SfxMedium* pSfxMedium, const OUString& rDocName);
 
     /** Add one list box entry for the parent of the given shapes and one child entry for
diff --git a/starmath/inc/AccessibleSmElementsControl.hxx b/starmath/inc/AccessibleSmElementsControl.hxx
index 8afea99bf18a..ac0b68afa892 100644
--- a/starmath/inc/AccessibleSmElementsControl.hxx
+++ b/starmath/inc/AccessibleSmElementsControl.hxx
@@ -50,7 +50,7 @@ class AccessibleSmElementsControl final : public comphelper::OAccessibleComponen
 public:
     AccessibleSmElementsControl(SmElementsControl& rControl);
 
-    void ReleaseAllItems(bool bNotify);
+    void ReleaseAllItems();
     void AddAllItems();
     inline void AcquireFocus();
     inline void ReleaseFocus(sal_uInt16);
diff --git a/starmath/source/AccessibleSmElementsControl.cxx b/starmath/source/AccessibleSmElementsControl.cxx
index d0f95a0ecef7..5421c03799eb 100644
--- a/starmath/source/AccessibleSmElementsControl.cxx
+++ b/starmath/source/AccessibleSmElementsControl.cxx
@@ -70,14 +70,12 @@ void AccessibleSmElementsControl::UpdateFocus(sal_uInt16 nPos)
     }
 }
 
-void AccessibleSmElementsControl::ReleaseAllItems(bool bNotifyRemoval)
+void AccessibleSmElementsControl::ReleaseAllItems()
 {
     if (m_aAccessibleChildren.empty())
         return;
 
     m_aAccessibleChildren.clear();
-    if (!bNotifyRemoval)
-        return;
 
     // The original toolbox accessibility code uses individual NAME_CHANGED
     // events in a loop. We can't do this, because on each remove event the
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 22229483c650..12d362208a88 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -1003,7 +1003,7 @@ void SmElementsControl::build()
     mxScroll->SetThumbPos(0);
     mxScroll->Hide();
     if (m_xAccessible.is())
-        m_xAccessible->ReleaseAllItems(true);
+        m_xAccessible->ReleaseAllItems();
     setCurrentElement(SAL_MAX_UINT16);
 
     // The first element is the scrollbar. We can't change its indexInParent
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index de9f2fb97762..e0c8596abe83 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -872,22 +872,21 @@ namespace
 BitmapEx BitmapEx::TransformBitmapEx(
     double fWidth,
     double fHeight,
-    const basegfx::B2DHomMatrix& rTransformation,
-    bool bSmooth) const
+    const basegfx::B2DHomMatrix& rTransformation) const
 {
     if(fWidth <= 1 || fHeight <= 1)
         return BitmapEx();
 
     // force destination to 24 bit, we want to smooth output
     const Size aDestinationSize(basegfx::fround(fWidth), basegfx::fround(fHeight));
-    const Bitmap aDestination(impTransformBitmap(GetBitmapRef(), aDestinationSize, rTransformation, bSmooth));
+    const Bitmap aDestination(impTransformBitmap(GetBitmapRef(), aDestinationSize, rTransformation, /*bSmooth*/true));
 
     // create mask
     if(IsTransparent())
     {
         if(IsAlpha())
         {
-            const Bitmap aAlpha(impTransformBitmap(GetAlpha().GetBitmap(), aDestinationSize, rTransformation, bSmooth));
+            const Bitmap aAlpha(impTransformBitmap(GetAlpha().GetBitmap(), aDestinationSize, rTransformation, /*bSmooth*/true));
             return BitmapEx(aDestination, AlphaMask(aAlpha));
         }
         else
@@ -976,7 +975,7 @@ BitmapEx BitmapEx::getTransformed(
     aTransform.invert();
 
     // create bitmap using source, destination and linear back-transformation
-    aRetval = TransformBitmapEx(fWidth, fHeight, aTransform, /*bSmooth*/true);
+    aRetval = TransformBitmapEx(fWidth, fHeight, aTransform);
 
     return aRetval;
 }
commit 317a90fd9d090aa2fe879549553d6491eb5028bf
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sun Jun 9 12:13:09 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Jun 9 13:49:27 2019 +0200

    revert part of "loplugin:unusedmethods"
    
    i.e. commit 53312ca4ee722a6d5ba22d1f578c6de5fbc37207
    
    to fix screenshot build
    
    Change-Id: I87df7b5e1b1afaeb314420484f2c924e64031764
    Reviewed-on: https://gerrit.libreoffice.org/73731
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index 99d042898df8..44e69fbb29be 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -182,6 +182,7 @@ public:
     virtual VclPtr<AbstractSdInsertLayerDlg>   CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& rStr) = 0;
     virtual VclPtr<AbstractSdInsertPagesObjsDlg> CreateSdInsertPagesObjsDlg(weld::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName) = 0;
     virtual VclPtr<AbstractMorphDlg>           CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0;
+    virtual VclPtr<SfxAbstractTabDialog>       CreateSdOutlineBulletTabDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) = 0;
     virtual VclPtr<SfxAbstractTabDialog>       CreateSdParagraphTabDlg(weld::Window* pWindow, const SfxItemSet* pAttr) = 0;
     virtual VclPtr<AbstractSdStartPresDlg>     CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs,
                                                                      const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) = 0;
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 956386e1b83b..6c80853da1dd 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -453,6 +453,11 @@ VclPtr<AbstractMorphDlg> SdAbstractDialogFactory_Impl::CreateMorphDlg(weld::Wind
     return VclPtr<AbstractMorphDlg_Impl>::Create(std::make_unique<::sd::MorphDlg>(pParent, pObj1, pObj2));
 }
 
+VclPtr<SfxAbstractTabDialog>  SdAbstractDialogFactory_Impl::CreateSdOutlineBulletTabDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView)
+{
+    return VclPtr<AbstractBulletDialog_Impl>::Create(std::make_unique<::sd::OutlineBulletDlg>(pParent, pAttr, pView));
+}
+
 VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdParagraphTabDlg(weld::Window* pParent, const SfxItemSet* pAttr )
 {
     return VclPtr<SdAbstractTabController_Impl>::Create(std::make_unique<SdParagraphDlg>(pParent, pAttr));
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 782c20e56adf..ea5f5587df87 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -382,6 +382,7 @@ public:
     virtual VclPtr<AbstractSdInsertLayerDlg>   CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr) override;
     virtual VclPtr<AbstractSdInsertPagesObjsDlg> CreateSdInsertPagesObjsDlg(weld::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName ) override;
     virtual VclPtr<AbstractMorphDlg>           CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) override;
+    virtual VclPtr<SfxAbstractTabDialog>       CreateSdOutlineBulletTabDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView) override;
     virtual VclPtr<SfxAbstractTabDialog>       CreateSdParagraphTabDlg(weld::Window* pParent, const SfxItemSet* pAttr) override;
     virtual VclPtr<AbstractSdStartPresDlg>     CreateSdStartPresentationDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs,
                                                                      const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) override;


More information about the Libreoffice-commits mailing list