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

Jochen Nitschke j.nitschke+logerrit at ok.de
Sun Apr 24 21:22:03 UTC 2016


 sd/source/ui/dlg/PaneChildWindows.cxx            |    1 
 sd/source/ui/inc/taskpane/ControlContainer.hxx   |  189 -----------------------
 sd/source/ui/inc/taskpane/ILayoutableWindow.hxx  |   94 -----------
 sd/source/ui/inc/taskpane/PanelId.hxx            |   45 -----
 sd/source/ui/inc/taskpane/TitleBar.hxx           |  157 -------------------
 sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx |   89 ----------
 6 files changed, 575 deletions(-)

New commits:
commit b42842c42cae974008098a1658f13cf549a9aaef
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Sun Apr 24 18:10:03 2016 +0200

    delete unused headers
    
    leftover after 7f2bd815816cf70719b5de8af78f1c86545fcc60
    and follow-ups
    
    Change-Id: I2e6e200cb085e8ecad1ee1aafc64bbd15558c68b
    Reviewed-on: https://gerrit.libreoffice.org/24332
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx
index 80d496b..21fe5a5 100644
--- a/sd/source/ui/dlg/PaneChildWindows.cxx
+++ b/sd/source/ui/dlg/PaneChildWindows.cxx
@@ -21,7 +21,6 @@
 #include "PaneDockingWindow.hxx"
 #include "ViewShellBase.hxx"
 #include "framework/FrameworkHelper.hxx"
-#include "taskpane/ToolPanelViewShell.hxx"
 #include "app.hrc"
 #include "strings.hrc"
 #include "sdresid.hxx"
diff --git a/sd/source/ui/inc/taskpane/ControlContainer.hxx b/sd/source/ui/inc/taskpane/ControlContainer.hxx
deleted file mode 100644
index fbec419..0000000
--- a/sd/source/ui/inc/taskpane/ControlContainer.hxx
+++ /dev/null
@@ -1,189 +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_CONTROLCONTAINER_HXX
-#define INCLUDED_SD_SOURCE_UI_INC_TASKPANE_CONTROLCONTAINER_HXX
-
-#include <osl/mutex.hxx>
-
-#include <vector>
-#include <memory>
-
-namespace sd { namespace toolpanel {
-
-class TreeNode;
-
-/** This container manages the children of a TreeNode.  It handles the
-    expansion and visibility state of its child controls.  The container
-    does not do the layouting or painting of the controls.  Instead it asks
-    its owner to do that.
-
-    The difference between expansion state and visibility is that when a
-    control is collapsed at least a title bar is shown for it.  When it is
-    not visible then even this title bar is not shown.  In that case the
-    user can not expand the control.  A control has to be visible in order
-    to be expanded or collapsed.
-
-    Whenever you expand or collapse, show or hide a child control then use
-    this container class.  Do not call the respective methods of the child
-    directly.
-*/
-class ControlContainer
-{
-public:
-    enum VisibilityState { VS_SHOW, VS_HIDE, VS_TOGGLE };
-    enum ExpansionState { ES_EXPAND, ES_COLLAPSE, ES_TOGGLE };
-
-    /** Create a new control container.
-        @param pParent
-            This node is asked to re-calculate the size of its children when
-            a child of this container is expanded or collapsed.
-    */
-    ControlContainer (TreeNode* pNode);
-
-    virtual ~ControlContainer();
-
-    /** This is function makes sure that all children are deleted.  Call
-        this function from the destructor of a sub class to have all child
-        windows deleted before the destructor of another base class of that
-        sub class is called.  When that other base class is some kind of a
-        window it would otherwise complain that there are living children.
-    */
-    void DeleteChildren();
-
-    /** Add the given control to the set of controls managed by the
-        container.  This control is then expanded.
-        @return
-            Return the index under which the control has been inserted in
-            the container.  It is the same index that is returned by
-            GetControlIndex().
-    */
-    sal_uInt32 AddControl (::std::unique_ptr<TreeNode> && pControl);
-
-    /** Expand (default) or collapse the specified control.  When
-        expanding a control in a single expansion environment then all
-        other controls are collapsed.  The specified control is being
-        made the active control as returned by GetActiveControl().
-    */
-    virtual void SetExpansionState (
-        sal_uInt32 nIndex,
-        ExpansionState aState);
-    virtual void SetExpansionState (
-        TreeNode* pControl,
-        ExpansionState aState);
-    virtual void SetVisibilityState (
-        sal_uInt32 nIndex,
-        VisibilityState aState);
-
-    /** Return the index of the given control.
-    */
-    sal_uInt32 GetControlIndex (TreeNode* pControl) const;
-
-    /** Return the number of controls in the container.
-    */
-    sal_uInt32 GetControlCount() const;
-
-    /** Return the number of visible controls in the container.
-    */
-    sal_uInt32 GetVisibleControlCount() const;
-
-    /** Return the control with the specified index regardless of whether
-        that control is hidden or visible.
-    */
-    TreeNode* GetControl (sal_uInt32 nIndex) const;
-
-    /** Return the index of the control previous to that is specified
-        by the given index.
-        @param nIndex
-            Index of the control for which to return the index of the
-            previous control.  This index is guaranteed not to be returned.
-        @param bIncludeHidden
-            This flag tells the method whether to include the controls that
-            are not visible in the search for the previous control.  When it
-            is <FALSE/> the hidden controls are skipped.
-        @param bCycle
-            When this flag is <TRUE/> then the search for the previous
-            control wraps around when reaching the first control.
-        @return
-            Returns the index to the previous control or (sal_uInt32)-1 when
-            there is no previous control.  This would be the case when there
-            is only one (visible) child.
-    */
-    sal_uInt32 GetPreviousIndex (
-        sal_uInt32 nIndex,
-        bool bIncludeHidden=false,
-        bool bCycle=false) const;
-
-    /** Return the index of the control next to that is specified by
-        the given index.
-        @param nIndex
-            Index of the control for which to return the index of the next
-            control.  This index is guaranteed not to be returned.
-        @param bIncludeHidden
-            This flag tells the method whether to include the controls that
-            are not visible in the search for the next control.  When it is
-            <FALSE/> the hidden controls are skipped.
-        @param bCycle
-            When this flag is <TRUE/> then the search for the next control
-            wraps around when reaching the last control.
-        @return
-            Returns the index to the next control or (sal_uInt32)-1 when
-            there is no next control.  This would be the case when there is
-            only one (visible) child.
-    */
-    sal_uInt32 GetNextIndex (
-        sal_uInt32 nIndex,
-        bool bIncludeHidden=false,
-        bool bCycle=false) const;
-
-    void SetMultiSelection (bool bFlag);
-
-    /** This is method is called when the list of controls has changed,
-        i.e. a new control has been added.  The default implementation is
-        empty.  Overwrite this method in derived classes in order to react to
-        such changes.
-    */
-    virtual void ListHasChanged();
-
-private:
-    osl::Mutex maMutex;
-
-    /// List of controls managed by a container.
-    typedef ::std::vector<TreeNode*> ControlList;
-    ControlList maControlList;
-
-    /** This parent is used for resize requests when children are expanded
-        or collapsed.
-    */
-    TreeNode* mpNode;
-
-    /** The index of the currently expanded control.  A value of
-        (sal_uInt32)-1 indicates that no control is active.  This may be the
-        case after adding controls to the container.
-    */
-    sal_uInt32 mnActiveControlIndex;
-
-    bool mbMultiSelection;
-};
-
-} } // end of namespace ::sd::toolpanel
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/taskpane/ILayoutableWindow.hxx b/sd/source/ui/inc/taskpane/ILayoutableWindow.hxx
deleted file mode 100644
index 9a53442..0000000
--- a/sd/source/ui/inc/taskpane/ILayoutableWindow.hxx
+++ /dev/null
@@ -1,94 +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_ILAYOUTABLEWINDOW_HXX
-#define INCLUDED_SD_SOURCE_UI_INC_TASKPANE_ILAYOUTABLEWINDOW_HXX
-
-#include <tools/gen.hxx>
-#include <sal/types.h>
-
-namespace vcl { class Window; }
-
-namespace sd { namespace toolpanel {
-
-class ILayouter
-{
-public:
-    /** This method is called by layoutable controls when they have to be
-        resized.
-    */
-    virtual void RequestResize() = 0;
-
-protected:
-    ~ILayouter() {}
-};
-
-/** This interface has to be implemented by windows that want to be
-    layouted by a SubToolPanel or ScrollablePanel object.
-*/
-class ILayoutableWindow
-{
-public:
-    virtual ~ILayoutableWindow() {};
-
-    /** Return the preferred size without constraints on either the
-        height or the width.
-        The size the window will later be set to may but does not have
-        to be equal to this size.
-    */
-    virtual Size GetPreferredSize() = 0;
-
-    /** Return the preferred width with the constraint, that the
-        window will be set to the given height.
-        The width the window will later be set to may but does not have
-        to be equal to this width.
-    */
-    virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight) = 0;
-
-    /** Return the preferred height with the constraint, that the
-        window will be set to the given width.
-        The height the window will later be set to may but does not have
-        to be equal to this height.
-    */
-    virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth) = 0;
-
-    /** Return whether the window is generally resizable.  When used by
-        a VerticalLayouter then the width will always be resized and
-        the return value of this method determines whether the height
-        may be modified as well.
-    */
-    virtual bool IsResizable() = 0;
-
-    /** Return the window so that its size and position can be set.
-        @return
-            Returns the window which is layouted or NULL to indicate
-            that the object is in an invalid state.
-    */
-    virtual vcl::Window* GetWindow() = 0;
-
-    /** Return the minimal width of the window.
-    */
-    virtual sal_Int32 GetMinimumWidth() = 0;
-};
-
-} } // end of namespace ::sd::toolpanel
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/taskpane/PanelId.hxx b/sd/source/ui/inc/taskpane/PanelId.hxx
deleted file mode 100644
index 77dc340..0000000
--- a/sd/source/ui/inc/taskpane/PanelId.hxx
+++ /dev/null
@@ -1,45 +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_PANELID_HXX
-#define INCLUDED_SD_SOURCE_UI_INC_TASKPANE_PANELID_HXX
-
-namespace sd { namespace toolpanel
-{
-
-    /** PanelId
-        List of top level panels that can be shown in the task pane.
-    */
-    enum PanelId
-    {
-        PID_MASTER_PAGES        = 0,
-        PID_LAYOUT              = 1,
-        PID_TABLE_DESIGN        = 2,
-        PID_CUSTOM_ANIMATION    = 3,
-        PID_SLIDE_TRANSITION    = 4,
-
-        PID_UNKNOWN             = 5
-    };
-
-
-} } // namespace sd::toolpanel
-
-#endif // INCLUDED_SD_SOURCE_UI_INC_TASKPANE_PANELID_HXX
-
-/* 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
deleted file mode 100644
index 686cda2..0000000
--- a/sd/source/ui/inc/taskpane/TitleBar.hxx
+++ /dev/null
@@ -1,157 +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_TITLEBAR_HXX
-#define INCLUDED_SD_SOURCE_UI_INC_TASKPANE_TITLEBAR_HXX
-
-#include <vcl/image.hxx>
-#include <vcl/window.hxx>
-#include <memory>
-
-class Rectangle;
-class VirtualDevice;
-
-namespace sd { namespace toolpanel {
-
-/** The title bar above a control in a sub tool panel.
-
-    <p>The title bar shows two kinds of indicators: 1) Expansion is
-    displayed by two sets of two bitmaps, a triangle pointing to the right
-    resp. a minus in a square indicates that the control is collapsed, a
-    triangle pointing down resp. a plus in a square stands for an expanded
-    control. 2) Keyboard focus is indicated by a dotted rectangle.
-*/
-class TitleBar
-    : public vcl::Window,
-      public TreeNode
-{
-public:
-    enum TitleBarType {
-        TBT_SUB_CONTROL_HEADLINE
-    };
-
-    /** Create a new title bar whose content, the given title string,
-        will be formatted according to the given type.
-    */
-    TitleBar (
-        vcl::Window* pParent,
-        const OUString& rsTitle,
-        TitleBarType eType,
-        bool bIsExpandable);
-    virtual ~TitleBar();
-
-    virtual Size GetPreferredSize();
-    virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight);
-    virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
-    virtual bool IsResizable();
-    virtual vcl::Window* GetWindow();
-    virtual sal_Int32 GetMinimumWidth();
-
-    virtual void Paint (const Rectangle& rBoundingBox);
-    virtual bool Expand (bool bFlag = true);
-    virtual bool IsExpanded() const;
-    virtual void SetEnabledState(bool bFlag);
-    virtual void GetFocus();
-    virtual void LoseFocus();
-
-    virtual void MouseMove(const MouseEvent& rEvent);
-    /** Empty implementation prevents forwarding to docking window.
-    */
-    virtual void MouseButtonDown (const MouseEvent& rEvent);
-    /** Empty implementation prevents forwarding to docking window.
-    */
-    virtual void MouseButtonUp (const MouseEvent& rEvent);
-
-    virtual void DataChanged (const DataChangedEvent& rEvent);
-
-    OUString GetTitle() const { return msTitle; }
-
-    css::uno::Reference<css::accessibility::XAccessible > CreateAccessibleObject (
-            const css::uno::Reference<css::accessibility::XAccessible>& rxParent);
-
-private:
-    TitleBarType meType;
-    OUString msTitle;
-    bool mbExpanded;
-    bool mbFocused;
-    // Size of the bounding box that encloses the title string.
-    ::std::unique_ptr<VirtualDevice> mpDevice;
-    bool mbIsExpandable;
-
-    /** Return whether this TitleBar object has an expansion indicator
-        bitmap.  It is safe to call GetExpansionIndicator() when this method
-        returns <FALSE/> but unnecessary.
-    */
-    bool HasExpansionIndicator() const;
-
-    /** Return the image of the expansion indicator.
-        @return
-            When there is no expansion indicator for this TitleBar object,
-            then an empty Image is returned.  You better call
-            HasExpansionIndicator() to prevent this.
-    */
-    Image GetExpansionIndicator() const;
-
-    /** Calculate the bounding box of the title text.  This takes into
-        account indentation due to an expansion indicator and the given
-        available width.  When the text can not be displayed on one line, it
-        is broken into multiple lines.
-        @param nAvailableWidth
-            When 0 is given then the natural text width is used, i.e. the
-            text is not broken into multiple lines.
-    */
-    Rectangle CalculateTextBoundingBox (
-        int nAvailableWidth,
-        bool bEmphasizeExpanded);
-
-    /** Add some space to the given text box and return the bounding box of
-        the title bar.
-    */
-    Rectangle CalculateTitleBarBox (
-        const Rectangle& rTextBox,
-        int nTitleBarWidth);
-
-    void PaintSubPanelHeadLineBar();
-
-    void PaintBackground (const Rectangle& rTextBox);
-
-    /// Paint a focus indicator that encloses the given rectangle.
-    void PaintFocusIndicator (const Rectangle& rIndicatorBox);
-
-    Rectangle PaintExpansionIndicator (const Rectangle& rTextBox);
-
-    void PaintText (const Rectangle& rTextBox);
-
-    sal_uInt16 GetTextStyle();
-
-    const static int snIndentationWidth;
-
-    // Default constructor, copy constructor, and assignment are not supported.
-    TitleBar();
-    TitleBar (const TitleBar&);
-    TitleBar& operator= (const TitleBar&);
-
-    using Window::GetWindow;
-};
-
-} } // end of namespace ::sd::toolpanel
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx b/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx
deleted file mode 100644
index de847b3..0000000
--- a/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx
+++ /dev/null
@@ -1,89 +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_TOOLPANELVIEWSHELL_HXX
-#define INCLUDED_SD_SOURCE_UI_INC_TASKPANE_TOOLPANELVIEWSHELL_HXX
-
-#include "ViewShell.hxx"
-#include "glob.hxx"
-#include "taskpane/PanelId.hxx"
-#include "framework/FrameworkHelper.hxx"
-#include <vcl/button.hxx>
-#include <sfx2/shell.hxx>
-#include <sfx2/viewfac.hxx>
-#include <sfx2/dockwin.hxx>
-
-#include <memory>
-
-class PopupMenu;
-
-namespace com { namespace sun { namespace star { namespace ui {
-    class XUIElement;
-} } } }
-
-namespace sd {
-namespace toolpanel {
-class TaskPaneShellManager;
-class ToolPanelViewShell_Impl;
-/** The tool panel is a view shell for some very specific reasons:
-    - It fits better into the concept of panes being docking windows whose
-    content, a view shell, can be exchanged on runtime.
-    - A control in the tool panel that wants to show a context menu has to
-    do that over the dispatcher of a shell.  These shells, usually
-    implemented by the controls themselves, have to be managed by someone.
-    If interpreted as object bars this can be handled by the
-    ObjectBarManager of the ViewShell.
-*/
-class ToolPanelViewShell
-    : public ViewShell
-{
-public:
-    SFX_DECL_INTERFACE(SD_IF_SDTOOLPANELSHELL)
-
-public:
-    ToolPanelViewShell (
-        SfxViewFrame* pFrame,
-        ViewShellBase& rViewShellBase,
-        vcl::Window* pParentWindow,
-        FrameView* pFrameView);
-    virtual ~ToolPanelViewShell();
-
-    using sd::ViewShell::KeyInput;
-
-    virtual SdPage* GetActualPage() override;
-    virtual SdPage* getCurrentPage() const override;
-
-    virtual void ArrangeGUIElements() override;
-
-    virtual css::uno::Reference<css::accessibility::XAccessible>
-        CreateAccessibleDocumentView (::sd::Window* pWindow) override;
-
-    virtual css::uno::Reference<css::drawing::XDrawSubController> CreateSubController() override;
-
-    /** Relocate all toplevel controls to the given parent window.
-    */
-    virtual bool RelocateToParentWindow (vcl::Window* pParentWindow) override;
-
-};
-
-} } // end of namespace ::sd::toolpanel
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list