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

Noel Grandin noel at peralex.com
Tue Oct 20 07:17:23 PDT 2015


 dbaccess/source/ui/dlg/admincontrols.cxx              |    2 
 dbaccess/source/ui/dlg/admincontrols.hxx              |    6 
 dbaccess/source/ui/dlg/adminpages.cxx                 |    3 
 dbaccess/source/ui/dlg/adminpages.hxx                 |    2 
 dbaccess/source/ui/dlg/indexdialog.cxx                |    6 
 dbaccess/source/ui/dlg/indexfieldscontrol.cxx         |   19 -
 dbaccess/source/ui/dlg/tablespage.cxx                 |    4 
 dbaccess/source/ui/dlg/tablespage.hxx                 |    2 
 dbaccess/source/ui/inc/indexdialog.hxx                |    2 
 dbaccess/source/ui/inc/indexfieldscontrol.hxx         |   10 
 dbaccess/source/ui/inc/marktree.hxx                   |    4 
 sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx |  184 ----------------
 sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx        |  198 ------------------
 sd/source/ui/inc/taskpane/TitleBar.hxx                |    1 
 sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx    |   10 
 sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx    |    1 
 sd/source/ui/slidesorter/model/SlideSorterModel.cxx   |    1 
 sd/source/ui/slidesorter/view/SlideSorterView.cxx     |    3 
 18 files changed, 29 insertions(+), 429 deletions(-)

New commits:
commit ecb79b93717340b67c44e587416222f6d570aac3
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Oct 20 16:03:40 2015 +0200

    remove SlideSorterCache debug facility, and with it, the last Link<>
    
    nobody has used it, or enabled it, in a very long time
    
    Change-Id: Ic36ff45086f7f7c9098c618d21cb6fc7cd7a46df

diff --git a/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx b/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx
deleted file mode 100644
index d31764d..0000000
--- a/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx
+++ /dev/null
@@ -1,184 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SD_SOURCE_UI_INC_TASKPANE_SLIDESORTERCACHEDISPLAY_HXX
-#define INCLUDED_SD_SOURCE_UI_INC_TASKPANE_SLIDESORTERCACHEDISPLAY_HXX
-
-// Uncomment the define below to activate the slide sorter cache display in
-// the task pane.  Visible slide previews are displayed as large rectangles,
-// off-screen previews as smaller rectangles.  The color shows the state:
-// green for no action, different shades of yellow for a request being in
-// the queue, pink for currently being rendered.  A diagonal line indicates
-// that the preview is not up-to-date.
-#ifdef DEBUG
-//#define USE_SLIDE_SORTER_CACHE_DISPLAY
-#endif
-
-#ifdef USE_SLIDE_SORTER_CACHE_DISPLAY
-#include <taskpane/TaskPaneTreeNode.hxx>
-
-#include <map>
-#include <vector>
-
-namespace vcl { class Window; }
-
-#include "svx/svdpage.hxx"
-#include "drawdoc.hxx"
-
-namespace sd { namespace toolpanel {
-
-class TreeNode;
-
-/** This panel demonstrates how to create a panel for the task pane.
-*/
-class SlideSorterCacheDisplay
-    : public TreeNode
-{
-public:
-    SlideSorterCacheDisplay (const SdDrawDocument* pDocument);
-    virtual ~SlideSorterCacheDisplay();
-
-    void SetParentWindow (vcl::Window* pParentWindow);
-
-    virtual void Paint (const Rectangle& rBoundingBox);
-    virtual void Resize();
-
-    static SlideSorterCacheDisplay* Instance (const SdDrawDocument* pDocument);
-
-    void SetPageCount (sal_Int32 nPageCount);
-    enum PageStatus {
-        NONE,
-        IN_QUEUE_PRIORITY_0,
-        IN_QUEUE_PRIORITY_1,
-        IN_QUEUE_PRIORITY_2,
-        RENDERING
-    };
-    void SetPageStatus (sal_Int32 nPageIndex, PageStatus eStatus);
-    void SetPageVisibility (sal_Int32 nPageIndex, bool bVisible);
-    void SetUpToDate (sal_Int32 nPageIndex, bool bUpToDate);
-
-    virtual Size GetPreferredSize();
-    virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeigh);
-    virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
-    virtual vcl::Window* GetWindow();
-    virtual bool IsResizable();
-    virtual bool IsExpandable() const;
-    virtual bool IsExpanded() const;
-
-private:
-    static ::std::map<const SdDrawDocument*, SlideSorterCacheDisplay*> maDisplays;
-    static void AddInstance (const SdDrawDocument* pDocument, SlideSorterCacheDisplay* pControl);
-    static void RemoveInstance (SlideSorterCacheDisplay* pControl);
-
-    VclPtr<vcl::Window> mpWindow;
-    sal_Int32 mnPageCount;
-    sal_Int32 mnColumnCount;
-    sal_Int32 mnRowCount;
-    Size maCellSize;
-    sal_Int32 mnHorizontalBorder;
-    sal_Int32 mnVerticalBorder;
-    sal_Int32 mnHorizontalGap;
-    sal_Int32 mnVerticalGap;
-
-    class PageDescriptor
-    {
-    public:
-        PageStatus meStatus;
-        bool mbVisible;
-        bool mbUpToDate;
-    };
-    typedef ::std::vector<PageDescriptor> PageDescriptorList;
-    PageDescriptorList maPageDescriptors;
-
-    Rectangle GetPageBox (sal_Int32 nPageIndex);
-
-    void ProvideSize (sal_Int32 nPageIndex);
-
-    void PaintPage (sal_Int32 nPageIndex);
-};
-
-} } // end of namespace ::sd::toolpanel
-
-namespace {
-
-void SscdSetStatus (const SdrPage* pPage,
-    ::sd::toolpanel::SlideSorterCacheDisplay::PageStatus eStatus)
-{
-    ::sd::toolpanel::SlideSorterCacheDisplay* pDisplay
-        = ::sd::toolpanel::SlideSorterCacheDisplay::Instance(
-        dynamic_cast<SdDrawDocument*>(pPage->GetModel()));
-    if (pDisplay != NULL)
-        pDisplay->SetPageStatus((pPage->GetPageNum()-1)/2, eStatus);
-}
-
-void SscdSetRequestClass (const SdrPage* pPage, sal_Int32 nClass)
-{
-    sd::toolpanel::SlideSorterCacheDisplay::PageStatus eStatus;
-    switch (nClass)
-    {
-        case 0:
-            eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::IN_QUEUE_PRIORITY_0; break;
-        case 1:
-            eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::IN_QUEUE_PRIORITY_1; break;
-        case 2:
-            eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::IN_QUEUE_PRIORITY_2; break;
-        default:
-            eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::NONE; break;
-    }
-    SscdSetStatus(pPage,eStatus);
-}
-
-void SscdSetVisibility (const SdrModel* pModel, sal_Int32 nIndex, bool bVisible)
-{
-    ::sd::toolpanel::SlideSorterCacheDisplay* pDisplay
-        = ::sd::toolpanel::SlideSorterCacheDisplay::Instance(
-        dynamic_cast<const SdDrawDocument*>(pModel));
-    if (pDisplay != NULL)
-        pDisplay->SetPageVisibility(nIndex, bVisible);
-}
-
-void SscdSetUpToDate (const SdrPage* pPage, bool bUpToDate)
-{
-    ::sd::toolpanel::SlideSorterCacheDisplay* pDisplay
-        = ::sd::toolpanel::SlideSorterCacheDisplay::Instance(
-            dynamic_cast<const SdDrawDocument*>(pPage->GetModel()));
-    if (pDisplay != NULL)
-        pDisplay->SetUpToDate((pPage->GetPageNum()-1)/2, bUpToDate);
-}
-
-#define SSCD_SET_REQUEST_CLASS(Page,RequestClass)    \
-    SscdSetRequestClass(Page,RequestClass)
-#define SSCD_SET_STATUS(RequestData,Status)     \
-    SscdSetStatus(RequestData,::sd::toolpanel::SlideSorterCacheDisplay::Status)
-#define SSCD_SET_VISIBILITY(Model,Index,Visible) \
-    SscdSetVisibility(Model,Index,Visible)
-
-}
-
-#else
-
-#define SSCD_SET_REQUEST_CLASS(Page,RequestClass)
-#define SSCD_SET_STATUS(RequestData,Status)
-#define SSCD_SET_VISIBILITY(Model,Index,Visible)
-
-#endif
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx b/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx
deleted file mode 100644
index 2a1bde9..0000000
--- a/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx
+++ /dev/null
@@ -1,198 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SD_SOURCE_UI_INC_TASKPANE_TASKPANETREENODE_HXX
-#define INCLUDED_SD_SOURCE_UI_INC_TASKPANE_TASKPANETREENODE_HXX
-
-#include "ILayoutableWindow.hxx"
-#include <memory>
-#include <vector>
-#include <com/sun/star/accessibility/XAccessible.hpp>
-#include <tools/link.hxx>
-
-namespace sd { namespace toolpanel {
-
-class ControlContainer;
-class TaskPaneShellManager;
-
-enum TreeNodeStateChangeEventId {
-    EID_CHILD_ADDED,
-    EID_ALL_CHILDREN_REMOVED,
-    EID_EXPANSION_STATE_CHANGED,
-    EID_FOCUSED_STATE_CHANGED,
-    EID_SHOWING_STATE_CHANGED
-};
-
-/** Base class for all members of the object hierarchy that makes up the
-    tool panel. In the task pane, there are multiple hierarchies of such nodes,
-    with every panel having an own tree. The pane node is the root of the tree, below
-    that there are SubToolPanels and Window/Control objects. At the
-    lowest level there are only Window or Control objects.
-
-    This class provides the means of communication between objects on
-    different levels.
-*/
-class TreeNode
-    : public ILayoutableWindow,
-      public ILayouter
-{
-public:
-    TreeNode (TreeNode* pParent);
-    virtual ~TreeNode();
-
-    void SetParentNode (TreeNode* pNewParent);
-    TreeNode* GetParentNode();
-
-    /** Return the Window pointer of a tree node.
-    */
-    virtual vcl::Window* GetWindow();
-
-    /** Return a const pointer to the window of a tree node.
-    */
-    virtual const vcl::Window* GetConstWindow() const;
-
-    /** Return the joined minimum width of all children, i.e. the largest of
-        the minimum widths.
-    */
-    virtual sal_Int32 GetMinimumWidth();
-
-    /** The default implementation always returns <FALSE/>
-    */
-    virtual bool IsResizable();
-
-    /** Call this method whenever the size of one of the children of the
-        called node has to be changed, e.g. when the layout menu shows more
-        or less items than before.  As a typical result the node will layout
-        and resize its children according to their size requirements.
-
-        Please remember that the size of the children can be changed in the
-        first place because scroll bars can give a node the space it needs.
-
-        The default implementation passes this call to its parent.
-    */
-    virtual void RequestResize();
-
-    /** The default implementation shows the window (when it exists) when
-        bExpansionState is <TRUE/>.  It hides the window otherwise.
-        @return
-            Returns <TRUE/> when the expansion state changes.  When an
-            expansion state is requested that is already in place then
-            <FALSE/> is returned.
-    */
-    virtual bool Expand (bool bExpansionState);
-
-    /** The default implementation returns whether the window is showing.
-        When there is no window then it returns <FALSE/>.
-    */
-    virtual bool IsExpanded() const;
-
-    /** Return whether the node can be expanded or collapsed.  The default
-        implementation always returns <TRUE/> when there is window and
-        <FALSE/> otherwise.  If <FALSE/> is returned
-        then Expand() may be called but it will not change the expansion
-        state.
-    */
-    virtual bool IsExpandable() const;
-
-    /** The default implementation calls GetWindow()->Show().
-    */
-    virtual void Show (bool bVisibilityState);
-
-    /** The default implementation returns GetWindow()->IsVisible().
-    */
-    virtual bool IsShowing() const;
-
-    ControlContainer& GetControlContainer();
-
-    /** Give each node access to a shell manage.  This usually is the shell
-        manager of the ToolPanelViewShell.
-
-        At least the root node has to overwrite this method since the
-        default implementation simply returns the shell manager of its
-        parent.
-    */
-    virtual TaskPaneShellManager* GetShellManager();
-
-    /** You will rarely need to override this method.  To supply your own
-        accessible object you should override CreateAccessible() instead.
-    */
-    virtual ::com::sun::star::uno::Reference<
-        ::com::sun::star::accessibility::XAccessible> GetAccessibleObject();
-
-    /** Override this method in order to supply a class specific accessible
-        object.
-        The default implementation will return a new instance of
-        AccessibleTreeNode.
-        @param rxParent
-            The accessible parent of the accessible object to create.  It is
-            not necessaryly the accessible object of the parent window of
-            GetWindow().
-
-    */
-    virtual ::com::sun::star::uno::Reference<
-        ::com::sun::star::accessibility::XAccessible> CreateAccessibleObject (
-            const ::com::sun::star::uno::Reference<
-            ::com::sun::star::accessibility::XAccessible>&rxParent);
-
-    /** Add a listener that will be informatted in the future about state
-        changes of the tree node.  This includes adding and removing
-        children as well as focus, visibility, and expansion state.
-        Multiple calls are ignored.  Each listener is added only once.
-    */
-    void AddStateChangeListener (const Link<>& rListener);
-
-    /** Call the state change listeners and pass a state change event with
-        the specified event id.  The source field is set to this.
-        @param pChild
-            This optional parameter makes sense only with the
-            EID_CHILD_ADDED event.
-    */
-    void FireStateChangeEvent (
-        TreeNodeStateChangeEventId eEventId,
-        TreeNode* pChild = NULL) const;
-
-protected:
-    ::std::unique_ptr<ControlContainer> mpControlContainer;
-
-private:
-    TreeNode* mpParent;
-};
-
-/** Objects of this class are sent to listeners to notify them about state
-    changes of a tree node.
-*/
-class TreeNodeStateChangeEvent
-{
-public:
-
-    TreeNodeStateChangeEvent (
-        const TreeNode& rNode,
-        TreeNodeStateChangeEventId eEventId,
-        TreeNode* pChild = NULL);
-
-    const TreeNode& mrSource;
-    TreeNodeStateChangeEventId meEventId;
-    TreeNode* mpChild;
-};
-
-} } // end of namespace ::sd::toolpanel
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/taskpane/TitleBar.hxx b/sd/source/ui/inc/taskpane/TitleBar.hxx
index bb4088f..8f5c1c6 100644
--- a/sd/source/ui/inc/taskpane/TitleBar.hxx
+++ b/sd/source/ui/inc/taskpane/TitleBar.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_SD_SOURCE_UI_INC_TASKPANE_TITLEBAR_HXX
 #define INCLUDED_SD_SOURCE_UI_INC_TASKPANE_TITLEBAR_HXX
 
-#include "taskpane/TaskPaneTreeNode.hxx"
 #include <vcl/image.hxx>
 #include <vcl/window.hxx>
 #include <memory>
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
index 19fbc99..b46a593 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
@@ -127,8 +127,6 @@ void RequestQueue::AddRequest (
         pPage->AddPageUser(*this);
     }
 
-    SSCD_SET_REQUEST_CLASS(aKey,eRequestClass);
-
 #if OSL_DEBUG_LEVEL >=2
     SAL_INFO("sd.sls", OSL_THIS_FUNC << ": " << (bRemoved?"replaced":"added")
         << " request for page " << ((aKey->GetPageNum()-1)/2)
@@ -166,11 +164,6 @@ bool RequestQueue::RemoveRequest (
             mpRequestQueue->erase(aRequestIterator);
 
             bRequestWasRemoved = true;
-
-            if (bRequestWasRemoved)
-            {
-                SSCD_SET_STATUS(aKey,NONE);
-            }
         }
         else
             break;
@@ -195,7 +188,6 @@ void RequestQueue::ChangeClass (
     if (iRequest!=mpRequestQueue->end() && iRequest->meClass!=eNewRequestClass)
     {
         AddRequest(aKey, eNewRequestClass, true);
-        SSCD_SET_REQUEST_CLASS(aKey,eNewRequestClass);
     }
 }
 
@@ -227,8 +219,6 @@ void RequestQueue::PopFront()
 
     if ( ! mpRequestQueue->empty())
     {
-        SSCD_SET_STATUS(maRequestQueue.begin()->mpData->GetPage(),NONE);
-
         Container::const_iterator aIter(mpRequestQueue->begin());
         SdrPage *pPage = const_cast<SdrPage*>(aIter->maKey);
         pPage->RemovePageUser(*this);
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
index ac0d5f0..01e278d 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
@@ -22,7 +22,6 @@
 
 #include "SlsRequestPriorityClass.hxx"
 #include "cache/SlsCacheContext.hxx"
-#include "taskpane/SlideSorterCacheDisplay.hxx"
 #include <drawdoc.hxx>
 #include <osl/mutex.hxx>
 #include <svx/sdrpageuser.hxx>
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index 9003166..94b1aa8 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -28,7 +28,6 @@
 #include "controller/SlsCurrentSlideManager.hxx"
 #include "controller/SlsSlotManager.hxx"
 #include "view/SlideSorterView.hxx"
-#include "taskpane/SlideSorterCacheDisplay.hxx"
 #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
 #include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index f6f96e0..70b625d 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -39,7 +39,6 @@
 #include "cache/SlsPageCache.hxx"
 #include "cache/SlsPageCacheManager.hxx"
 #include "cache/SlsCacheContext.hxx"
-#include "taskpane/SlideSorterCacheDisplay.hxx"
 #include "DrawDocShell.hxx"
 #include "PaneDockingWindow.hxx"
 
@@ -520,8 +519,6 @@ void SlideSorterView::UpdatePreciousFlags()
                 pCache->SetPreciousFlag(
                     pDescriptor->GetPage(),
                     maVisiblePageRange.IsInside(nIndex));
-                SSCD_SET_VISIBILITY(mrModel.GetDocument(), nIndex,
-                    maVisiblePageRange.IsInside(nIndex));
             }
             else
             {
commit da88c8b78428b30e6a4f9bc3e1e734b37e45cb2d
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Oct 20 15:55:27 2015 +0200

    convert Link<> to typed
    
    Change-Id: I9453beedfa059d4f260ca136c02a6104fc4d4829

diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 6506bd9..76cba67 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -733,17 +733,15 @@ namespace dbaui
 
     IMPL_LINK_NOARG_TYPED( DbaIndexDialog, OnModifiedClick, Button*, void )
     {
-        OnModified(NULL);
+        OnModified(*m_pFields);
     }
-    IMPL_LINK_NOARG( DbaIndexDialog, OnModified )
+    IMPL_LINK_NOARG_TYPED( DbaIndexDialog, OnModified, IndexFieldsControl&, void )
     {
         OSL_ENSURE(m_pPreviousSelection, "DbaIndexDialog, OnModified: invalid call!");
         Indexes::iterator aPosition = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(m_pPreviousSelection->GetUserData());
 
         aPosition->setModified(true);
         updateToolbox();
-
-        return 1L;
     }
 
     void DbaIndexDialog::updateControls(const SvTreeListEntry* _pEntry)
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index 3837feb..695ea3f 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -387,7 +387,7 @@ namespace dbaui
     {
         ListBoxControl& rListBox = rController.GetListBox();
         if (!rListBox.IsTravelSelect())
-            m_aModifyHdl.Call(this);
+            m_aModifyHdl.Call(*this);
 
         if (&rListBox == m_pFieldNameCell.get())
         {   // a field has been selected
diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx
index 9e8cfe1..a9bc492 100644
--- a/dbaccess/source/ui/inc/indexdialog.hxx
+++ b/dbaccess/source/ui/inc/indexdialog.hxx
@@ -132,7 +132,7 @@ namespace dbaui
         DECL_LINK_TYPED( OnIndexAction, ToolBox*, void );
         DECL_LINK_TYPED( OnEntryEdited, SvTreeListEntry*, bool );
         DECL_LINK_TYPED( OnModifiedClick, Button*, void );
-        DECL_LINK( OnModified, void* );
+        DECL_LINK_TYPED( OnModified, IndexFieldsControl&, void );
         DECL_LINK_TYPED( OnCloseDialog, Button*, void );
 
         DECL_LINK_TYPED( OnEditIndexAgain, void*, void );
diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
index 96ca024..892a32c 100644
--- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx
+++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
@@ -40,7 +40,7 @@ namespace dbaui
         IndexFields                 m_aFields;          // !! order matters !!
         IndexFields::const_iterator m_aSeekRow;         // !!
 
-        Link<>                      m_aModifyHdl;
+        Link<IndexFieldsControl&,void>      m_aModifyHdl;
 
         VclPtr< ::svt::ListBoxControl>      m_pSortingCell;
         VclPtr< ::svt::ListBoxControl>      m_pFieldNameCell;
@@ -67,7 +67,7 @@ namespace dbaui
         const IndexFields&  GetSavedValue() const { return m_aSavedValue; }
         void                SaveValue() { m_aSavedValue = m_aFields; }
 
-        void SetModifyHdl(const Link<>& _rHdl) { m_aModifyHdl = _rHdl; }
+        void SetModifyHdl(const Link<IndexFieldsControl&,void>& _rHdl) { m_aModifyHdl = _rHdl; }
         virtual OUString GetCellText(long _nRow,sal_uInt16 nColId) const override;
 
     protected:
commit 516b5115df7597216f887f39add9944630cf3438
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Oct 20 15:53:36 2015 +0200

    convert Link<> to typed
    
    Change-Id: I822561725683231709343b80d7065c905226ebc1

diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index 3d84072..3837feb 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -40,7 +40,7 @@ namespace dbaui
     class DbaMouseDownListBoxController : public ListBoxCellController
     {
     protected:
-        Link<>  m_aAdditionalModifyHdl;
+        Link<DbaMouseDownListBoxController&,void>  m_aAdditionalModifyHdl;
 
     public:
         explicit DbaMouseDownListBoxController(ListBoxControl* _pParent)
@@ -48,21 +48,21 @@ namespace dbaui
         {
         }
 
-        void SetAdditionalModifyHdl(const Link<>& _rHdl);
+        void SetAdditionalModifyHdl(const Link<DbaMouseDownListBoxController&,void>& _rHdl);
 
     protected:
         virtual bool WantMouseEvent() const override { return true; }
         virtual void callModifyHdl() override;
     };
 
-    void DbaMouseDownListBoxController::SetAdditionalModifyHdl(const Link<>& _rHdl)
+    void DbaMouseDownListBoxController::SetAdditionalModifyHdl(const Link<DbaMouseDownListBoxController&,void>& _rHdl)
     {
         m_aAdditionalModifyHdl = _rHdl;
     }
 
     void DbaMouseDownListBoxController::callModifyHdl()
     {
-        m_aAdditionalModifyHdl.Call(nullptr);
+        m_aAdditionalModifyHdl.Call(*this);
         ListBoxCellController::callModifyHdl();
     }
 
@@ -383,13 +383,13 @@ namespace dbaui
         }
     }
 
-    IMPL_LINK( IndexFieldsControl, OnListEntrySelected, void*, p )
+    IMPL_LINK_TYPED( IndexFieldsControl, OnListEntrySelected, DbaMouseDownListBoxController&, rController, void )
     {
-        ListBox* _pBox = static_cast<ListBox*>(p);
-        if (!_pBox->IsTravelSelect())
+        ListBoxControl& rListBox = rController.GetListBox();
+        if (!rListBox.IsTravelSelect())
             m_aModifyHdl.Call(this);
 
-        if (_pBox == m_pFieldNameCell)
+        if (&rListBox == m_pFieldNameCell.get())
         {   // a field has been selected
             if (GetCurRow() >= GetRowCount() - 2)
             {   // and we're in one of the last two rows
@@ -417,7 +417,6 @@ namespace dbaui
 
             SaveModified();
         }
-        return 0L;
     }
     OUString IndexFieldsControl::GetCellText(long _nRow,sal_uInt16 nColId) const
     {
diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
index adbec31..96ca024 100644
--- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx
+++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
@@ -28,10 +28,12 @@
 namespace dbaui
 {
 
+    class DbaMouseDownListBoxController;
+
     // IndexFieldsControl
     class IndexFieldsControl : public ::svt::EditBrowseBox
     {
-        OModuleClient        m_aModuleClient;
+        OModuleClient               m_aModuleClient;
     protected:
         IndexFields                 m_aSavedValue;
 
@@ -84,7 +86,7 @@ namespace dbaui
 
         bool isNewField() const { return GetCurRow() >= (sal_Int32)m_aFields.size(); }
 
-        DECL_LINK( OnListEntrySelected, void* );
+        DECL_LINK_TYPED( OnListEntrySelected, DbaMouseDownListBoxController&, void );
 
     private:
         using ::svt::EditBrowseBox::Init;
commit 798d7bc09e81af112ce672a8166e29039108aef7
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Oct 19 15:57:58 2015 +0200

    convert Link<> to typed
    
    Change-Id: Id3ed50dc7fd4f783034797b2401ae05c96d002de

diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx
index 0c871d7..9d96543 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -125,7 +125,7 @@ namespace dbaui
     };
 
     // MySQLNativeSettings
-    MySQLNativeSettings::MySQLNativeSettings( vcl::Window& _rParent, const Link<>& _rControlModificationLink )
+    MySQLNativeSettings::MySQLNativeSettings( vcl::Window& _rParent, const Link<void*,void>& _rControlModificationLink )
         :TabPage( &_rParent, "MysqlNativeSettings", "dbaccess/ui/mysqlnativesettings.ui" ),
         m_aControlModificationLink(_rControlModificationLink)
     {
diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx b/dbaccess/source/ui/dlg/admincontrols.hxx
index 807ac51..ea7728b 100644
--- a/dbaccess/source/ui/dlg/admincontrols.hxx
+++ b/dbaccess/source/ui/dlg/admincontrols.hxx
@@ -47,14 +47,14 @@ namespace dbaui
         VclPtr<FixedText>           m_pDefaultPort;
         VclPtr<Edit>                m_pSocket;
         VclPtr<Edit>                m_pNamedPipe;
-        Link<>                      m_aControlModificationLink;
+        Link<void*,void>            m_aControlModificationLink;
         ::svt::ControlDependencyManager
-                            m_aControlDependencies;
+                                    m_aControlDependencies;
         DECL_LINK_TYPED(RadioToggleHdl, RadioButton&, void);
         DECL_LINK_TYPED(EditModifyHdl, Edit&, void);
 
     public:
-        MySQLNativeSettings( vcl::Window& _rParent, const Link<>& _rControlModificationLink );
+        MySQLNativeSettings( vcl::Window& _rParent, const Link<void*,void>& _rControlModificationLink );
         virtual ~MySQLNativeSettings();
         virtual void dispose() override;
         void fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList );
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index a9a6949..f5c23bd 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -102,10 +102,9 @@ namespace dbaui
         _rReadonly = !_rValid || (pReadonly && pReadonly->GetValue());
     }
 
-    IMPL_LINK(OGenericAdministrationPage, OnControlModified, void*, pCtrl)
+    IMPL_LINK_TYPED(OGenericAdministrationPage, OnControlModified, void*, pCtrl, void)
     {
         callModifiedHdl(pCtrl);
-        return 0;
     }
     IMPL_LINK_TYPED(OGenericAdministrationPage, OnControlModifiedClick, Button*, pCtrl, void)
     {
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx
index 7b2585f..5f32265 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -206,7 +206,7 @@ namespace dbaui
         /** This link be used for controls where the tabpage does not need to take any special action when the control
             is modified. The implementation just calls callModifiedHdl.
         */
-        DECL_LINK(OnControlModified, void*);
+        DECL_LINK_TYPED(OnControlModified, void*, void);
         DECL_LINK_TYPED(OnControlEditModifyHdl, Edit&, void);
         DECL_LINK_TYPED(OnControlModifiedClick, Button*, void);
         DECL_LINK_TYPED(ControlModifiedCheckBoxHdl, CheckBox&, void);
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 1c2ab8c..69a6d77 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -402,9 +402,9 @@ namespace dbaui
     {
         callModifiedHdl();
     }
-    IMPL_LINK( OTableSubscriptionPage, OnTreeEntryChecked, Control*, _pControl )
+    IMPL_LINK_TYPED( OTableSubscriptionPage, OnTreeEntryChecked, void*, _pControl, void )
     {
-        return OnControlModified(static_cast<Button*>(_pControl));
+        OnControlModified(_pControl);
     }
     IMPL_LINK_TYPED( OTableSubscriptionPage, OnTreeEntryCompare, const SvSortData&, _rSortData, sal_Int32 )
     {
diff --git a/dbaccess/source/ui/dlg/tablespage.hxx b/dbaccess/source/ui/dlg/tablespage.hxx
index 609967b..6e1acc9 100644
--- a/dbaccess/source/ui/dlg/tablespage.hxx
+++ b/dbaccess/source/ui/dlg/tablespage.hxx
@@ -65,7 +65,7 @@ namespace dbaui
         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) override;
 
         DECL_LINK_TYPED( OnTreeEntryCompare, const SvSortData&, sal_Int32 );
-        DECL_LINK( OnTreeEntryChecked, Control* );
+        DECL_LINK_TYPED( OnTreeEntryChecked, void*, void );
         DECL_LINK_TYPED( OnTreeEntryButtonChecked, SvTreeListBox*, void );
 
     private:
diff --git a/dbaccess/source/ui/inc/marktree.hxx b/dbaccess/source/ui/inc/marktree.hxx
index 08b1886..17ef28b 100644
--- a/dbaccess/source/ui/inc/marktree.hxx
+++ b/dbaccess/source/ui/inc/marktree.hxx
@@ -35,7 +35,7 @@ namespace dbaui
 class OMarkableTreeListBox : public DBTreeListBox
 {
     SvLBoxButtonData*   m_pCheckButton;
-    Link<>              m_aCheckButtonHandler;
+    Link<void*,void>    m_aCheckButtonHandler;
 
 public:
     OMarkableTreeListBox( vcl::Window* pParent, WinBits nWinStyle=0 );
@@ -47,7 +47,7 @@ public:
     void            CheckButtons();     // make the button states consistent (bottom-up)
 
     /// the handler given is called whenever the check state of one or more items changed
-    void SetCheckHandler(const Link<>& _rHdl) { m_aCheckButtonHandler = _rHdl; }
+    void SetCheckHandler(const Link<void*,void>& _rHdl) { m_aCheckButtonHandler = _rHdl; }
 
 protected:
     virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect) override;


More information about the Libreoffice-commits mailing list