summaryrefslogtreecommitdiff
path: root/sw/source/uibase/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-28 11:13:12 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-03-24 11:00:50 +0100
commit5a2c0ab29719ac914d30d8789c0e386541702cbf (patch)
treea114088ae5b6d537de78db1745f9524e40baa714 /sw/source/uibase/inc
parent70b9775af71b0e1a4b4d0760d2884631184db5ae (diff)
weld writer navigator
GtkToggleToolButton are much wider than vcl equivalents. Split the bottom toolbar into two toolbars. Rearrange their contents so the layout of each level visually match. Notes: Master documents have two modes, master content tree and the normal content tree. You can drag entries from the content tree into the document, drag mode drop down controls whether its a link or a copy etc that's dropped in. Documents can be dropped into the content and global trees. If outline tracking isn't active, then when content changes the tree is cleared and refilled, typically an effort is made to reselect the same entry that was previously selected. Additionally, if the amount of content didn't change an effort is made to scroll back to the location the scrollbar was at before the clear. Change-Id: I00c015145eac5b1acc3398d3c40861d830e4264a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89725 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase/inc')
-rw-r--r--sw/source/uibase/inc/actctrl.hxx82
-rw-r--r--sw/source/uibase/inc/conttree.hxx289
-rw-r--r--sw/source/uibase/inc/navipi.hxx43
3 files changed, 173 insertions, 241 deletions
diff --git a/sw/source/uibase/inc/actctrl.hxx b/sw/source/uibase/inc/actctrl.hxx
deleted file mode 100644
index fdb2feb7109b..000000000000
--- a/sw/source/uibase/inc/actctrl.hxx
+++ /dev/null
@@ -1,82 +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_SW_SOURCE_UIBASE_INC_ACTCTRL_HXX
-#define INCLUDED_SW_SOURCE_UIBASE_INC_ACTCTRL_HXX
-
-#include <sfx2/InterimItemWindow.hxx>
-#include <vcl/weld.hxx>
-#include <swdllapi.h>
-
-// numerical input
-class NumEditAction final : public InterimItemWindow
-{
-private:
- std::unique_ptr<weld::SpinButton> m_xWidget;
-
- DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
-
-public:
- NumEditAction(vcl::Window* pParent);
-
- virtual void dispose() override
- {
- m_xWidget.reset();
- InterimItemWindow::dispose();
- }
-
- virtual ~NumEditAction() override
- {
- disposeOnce();
- }
-
- virtual void GetFocus() override
- {
- if (m_xWidget)
- m_xWidget->grab_focus();
- InterimItemWindow::GetFocus();
- }
-
- void connect_value_changed(const Link<weld::SpinButton&, void>& rLink)
- {
- m_xWidget->connect_value_changed(rLink);
- }
-
- int get_value() const
- {
- return m_xWidget->get_value();
- }
-
- void set_value(int nValue)
- {
- m_xWidget->set_value(nValue);
- }
-
- void set_accessible_name(const OUString& rName)
- {
- m_xWidget->set_accessible_name(rName);
- }
-
- void set_max(int nMax);
-
- void limitWidth();
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx
index 3cb48bc804d2..8df62857115f 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -20,8 +20,7 @@
#define INCLUDED_SW_SOURCE_UIBASE_INC_CONTTREE_HXX
#include <svl/lstner.hxx>
-#include <vcl/treelistbox.hxx>
-#include <vcl/svlbitm.hxx>
+#include <ndarr.hxx>
#include "swcont.hxx"
#include <map>
@@ -67,11 +66,25 @@ namespace o3tl {
template<> struct typed_flags<MenuEnableFlags> : is_typed_flags<MenuEnableFlags, 0x00ff> {};
}
+class SwContentTree;
+
+class SwContentTreeDropTarget : public DropTargetHelper
+{
+private:
+ SwContentTree& m_rTreeView;
+
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
+
+public:
+ SwContentTreeDropTarget(SwContentTree& rTreeView);
+};
+
/** TreeListBox for content indicator */
-class SwContentTree final
- : public SvTreeListBox
- , public SfxListener
+class SwContentTree final : public SfxListener
{
+ std::unique_ptr<weld::TreeView> m_xTreeView;
+ SwContentTreeDropTarget m_aDropTargetHelper;
VclPtr<SwNavigationPI> m_xDialog;
OUString m_sSpace;
AutoTimer m_aUpdTimer;
@@ -79,16 +92,7 @@ class SwContentTree final
o3tl::enumarray<ContentTypeId,std::unique_ptr<SwContentType>> m_aActiveContentArr;
o3tl::enumarray<ContentTypeId,std::unique_ptr<SwContentType>> m_aHiddenContentArr;
OUString m_aContextStrings[CONTEXT_COUNT + 1];
- OUString m_sRemoveIdx;
- OUString m_sUpdateIdx;
- OUString m_sUnprotTable;
- OUString m_sRename;
- OUString m_sReadonlyIdx;
OUString m_sInvisible;
- OUString m_sPostItShow;
- OUString m_sPostItHide;
- OUString m_sPostItDelete;
- OUString m_sProtected;
SwWrtShell* m_pHiddenShell; // dropped Doc
SwWrtShell* m_pActiveShell; // the active or a const. open view
@@ -98,6 +102,7 @@ class SwContentTree final
sal_Int32 m_nActiveBlock;
sal_Int32 m_nHiddenBlock;
+ size_t m_nEntryCount;
ContentTypeId m_nRootType;
ContentTypeId m_nLastSelType;
sal_uInt8 m_nOutlineLevel;
@@ -107,20 +112,14 @@ class SwContentTree final
enum class State { ACTIVE, CONSTANT, HIDDEN } m_eState;
bool m_bDocChgdInDragging :1;
- bool m_bIsInternalDrag :1;
bool m_bIsRoot :1;
bool m_bIsIdleClear :1;
bool m_bIsLastReadOnly :1;
bool m_bIsOutlineMoveable :1;
bool m_bViewHasChanged :1;
- static bool bIsInDrag;
-
- bool m_bIsKeySpace;
- tools::Rectangle m_aOldRectangle;
-
// outline root mode drag & drop
- std::vector< SvTreeListEntry* > m_aDndOutlinesSelected;
+ std::vector<std::unique_ptr<weld::TreeIter>> m_aDndOutlinesSelected;
bool m_bIsInPromoteDemote = false;
@@ -130,60 +129,57 @@ class SwContentTree final
*/
void FindActiveTypeAndRemoveUserData();
- using SvTreeListBox::ExecuteDrop;
- using SvTreeListBox::EditEntry;
+ void insert(const weld::TreeIter* pParent, const OUString& rStr, const OUString& rId,
+ const OUString* pExpanderName, bool bChildrenOnDemand, weld::TreeIter* pRet);
- virtual void RequestHelp( const HelpEvent& rHEvt ) override;
- virtual void InitEntry(SvTreeListEntry*, const OUString&, const Image&, const Image&) override;
- virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
+ void remove(const weld::TreeIter& rIter);
SwNavigationPI* GetParentWindow();
- virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
- virtual void DragFinished( sal_Int8 ) override;
- virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
-
- virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
-
bool FillTransferData( TransferDataContainer& rTransfer,
sal_Int8& rDragMode );
/** Check if the displayed content is valid. */
bool HasContentChanged();
- virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData,
- SvTreeListEntry* ) override;
- virtual bool NotifyAcceptDrop( SvTreeListEntry* ) override;
-
- virtual TriState NotifyMoving( SvTreeListEntry* pTarget,
- SvTreeListEntry* pEntry,
- SvTreeListEntry*& rpNewParent,
- sal_uLong& rNewChildPos
- ) override;
- virtual TriState NotifyCopying( SvTreeListEntry* pTarget,
- SvTreeListEntry* pEntry,
- SvTreeListEntry*& rpNewParent,
- sal_uLong& rNewChildPos
- ) override;
- virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
- virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
-
- void EditEntry( SvTreeListEntry const * pEntry, EditEntryMode nMode );
+ size_t GetAbsPos(const weld::TreeIter& rIter);
+
+ void EditEntry(const weld::TreeIter& rEntry, EditEntryMode nMode);
void GotoContent(const SwContent* pCnt);
- static void SetInDrag(bool bSet) {bIsInDrag = bSet;}
- virtual VclPtr<PopupMenu> CreateContextMenu() override;
- virtual void ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) override;
+ void ExecuteContextMenuAction(const OString& rSelectedPopupEntry);
void DeleteOutlineSelections();
+ size_t GetEntryCount() const;
+
+ size_t GetChildCount(const weld::TreeIter& rParent) const;
+
+ std::unique_ptr<weld::TreeIter> GetEntryAtAbsPos(size_t nAbsPos) const;
+
+ void Expand(const weld::TreeIter& rParent, std::vector<std::unique_ptr<weld::TreeIter>>* pNodesToExpand);
+
+ void MoveOutline(SwOutlineNodes::size_type nTargetPos);
+
+ void UpdateLastSelType();
+
+ /** Expand - Remember the state for content types */
+ DECL_LINK(ExpandHdl, const weld::TreeIter&, bool);
+ /** Collapse - Remember the state for content types. */
+ DECL_LINK(CollapseHdl, const weld::TreeIter&, bool);
+ DECL_LINK(ContentDoubleClickHdl, weld::TreeView&, bool);
+ DECL_LINK(SelectHdl, weld::TreeView&, void);
+ DECL_LINK(FocusHdl, weld::Widget&, void);
+ DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
+ DECL_LINK(CommandHdl, const CommandEvent&, bool);
+ DECL_LINK(QueryTooltipHdl, const weld::TreeIter&, OUString);
+ DECL_LINK(DragBeginHdl, bool&, bool);
+ DECL_LINK(TimerUpdate, Timer *, void);
+
public:
- SwContentTree(vcl::Window* pParent, SwNavigationPI* pDialog);
- virtual ~SwContentTree() override;
- virtual void dispose() override;
- OUString GetEntryAltText( SvTreeListEntry* pEntry ) const override;
- OUString GetEntryLongDescription( SvTreeListEntry* pEntry ) const override;
+ SwContentTree(std::unique_ptr<weld::TreeView> xTreeView, SwNavigationPI* pDialog);
+ ~SwContentTree();
SdrObject* GetDrawingObjectsByContent(const SwContent *pCnt);
/** Switch the display to Root */
@@ -192,8 +188,8 @@ public:
/** Show the file */
void Display( bool bActiveView );
- /** In the Clear the content types have to be deleted, also. */
- void Clear();
+ /** In the clear the content types have to be deleted, also. */
+ void clear();
/** After a file is dropped on the Navigator, the new shell will be set */
void SetHiddenShell(SwWrtShell* pSh);
@@ -209,18 +205,13 @@ public:
SwWrtShell* GetWrtShell()
{ return State::HIDDEN == m_eState ? m_pHiddenShell : m_pActiveShell; }
- static bool IsInDrag() {return bIsInDrag;}
+ bool IsInDrag() const;
sal_uInt8 GetOutlineLevel()const {return m_nOutlineLevel;}
void SetOutlineLevel(sal_uInt8 nSet);
- /** Expand - Remember the state for content types */
- virtual bool Expand( SvTreeListEntry* pParent ) override;
- /** Collapse - Remember the state for content types. */
- virtual bool Collapse( SvTreeListEntry* pParent ) override;
-
/** Execute commands of the Navigator */
- void ExecCommand(const OUString& rCmd, bool bModifier);
+ void ExecCommand(const OString& rCmd, bool bModifier);
void ShowTree();
void HideTree();
@@ -232,56 +223,79 @@ public:
const SwWrtShell* GetActiveWrtShell() const {return m_pActiveShell;}
SwWrtShell* GetHiddenWrtShell() {return m_pHiddenShell;}
- DECL_LINK( ContentDoubleClickHdl, SvTreeListBox*, bool );
- DECL_LINK( TimerUpdate, Timer *, void );
+ void Select();
- virtual sal_IntPtr GetTabPos( SvTreeListEntry*, SvLBoxTab* ) override;
- virtual void RequestingChildren( SvTreeListEntry* pParent ) override;
- virtual void GetFocus() override;
- virtual void KeyInput(const KeyEvent& rKEvt) override;
-
- virtual bool Select( SvTreeListEntry* pEntry, bool bSelect=true ) override;
- virtual Size GetOptimalSize() const override;
+ // return true if it has any children
+ bool RequestingChildren(const weld::TreeIter& rParent);
virtual void Notify(SfxBroadcaster& rBC, SfxHint const& rHint) override;
-};
+ sal_Int8 AcceptDrop(const AcceptDropEvent& rEvt);
+ sal_Int8 ExecuteDrop(const ExecuteDropEvent& rEvt);
-// TreeListBox for global documents
+ bool IsDropFormatSupported(SotClipboardFormatId nFormat)
+ {
+ return m_aDropTargetHelper.IsDropFormatSupported(nFormat);
+ }
-class SwLBoxString : public SvLBoxString
-{
-public:
+ void set_accessible_name(const OUString& rName)
+ {
+ m_xTreeView->set_accessible_name(rName);
+ }
- SwLBoxString( const OUString& rStr ) : SvLBoxString(rStr)
+ void grab_focus()
{
+ m_xTreeView->grab_focus();
}
- virtual void Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
- const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override;
+ int count_selected_rows() const
+ {
+ return m_xTreeView->count_selected_rows();
+ }
+
+ void set_selection_mode(SelectionMode eMode)
+ {
+ m_xTreeView->set_selection_mode(eMode);
+ }
+
+ weld::TreeView& get_widget()
+ {
+ return *m_xTreeView;
+ }
};
namespace sfx2 { class DocumentInserter; }
namespace sfx2 { class FileDialogHelper; }
-class SwGlobalTree final : public SvTreeListBox
+class SwGlobalTree;
+
+class SwGlobalTreeDropTarget : public DropTargetHelper
+{
+private:
+ SwGlobalTree& m_rTreeView;
+
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
+
+public:
+ SwGlobalTreeDropTarget(SwGlobalTree& rTreeView);
+};
+
+class SwGlobalTree final
{
private:
+ std::unique_ptr<weld::TreeView> m_xTreeView;
+ SwGlobalTreeDropTarget m_aDropTargetHelper;
VclPtr<SwNavigationPI> m_xDialog;
AutoTimer m_aUpdateTimer;
OUString m_aContextStrings[GLOBAL_CONTEXT_COUNT];
SwWrtShell* m_pActiveShell;
- SvTreeListEntry* m_pEmphasisEntry; // Drag'n Drop emphasis
- SvTreeListEntry* m_pDDSource; // source for Drag'n Drop
std::unique_ptr<SwGlblDocContents> m_pSwGlblDocContents; // array with sorted content
std::unique_ptr<SwGlblDocContent> m_pDocContent;
std::unique_ptr<sfx2::DocumentInserter> m_pDocInserter;
- bool m_bIsInternalDrag :1;
- bool m_bLastEntryEmphasis :1; // Drag'n Drop
-
static const SfxObjectShell* pShowShell;
void InsertRegion( const SwGlblDocContent* _pContent,
@@ -289,48 +303,15 @@ private:
DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper*, void );
- using SvTreeListBox::DoubleClickHdl;
- using SvTreeListBox::ExecuteDrop;
- using Window::Update;
+ void Select();
- virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
-
- virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
-
- virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
-
- virtual void RequestHelp( const HelpEvent& rHEvt ) override;
-
- virtual sal_IntPtr GetTabPos( SvTreeListEntry*, SvLBoxTab* ) override;
- virtual TriState NotifyMoving( SvTreeListEntry* pTarget,
- SvTreeListEntry* pEntry,
- SvTreeListEntry*& rpNewParent,
- sal_uLong& rNewChildPos
- ) override;
- virtual TriState NotifyCopying( SvTreeListEntry* pTarget,
- SvTreeListEntry* pEntry,
- SvTreeListEntry*& rpNewParent,
- sal_uLong& rNewChildPos
- ) override;
-
- virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
- virtual void DragFinished( sal_Int8 ) override;
- virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData,
- SvTreeListEntry* ) override;
- virtual bool NotifyAcceptDrop( SvTreeListEntry* ) override;
-
- virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
- virtual void KeyInput(const KeyEvent& rKEvt) override;
- virtual void GetFocus() override;
- virtual void SelectHdl() override;
- virtual void DeselectHdl() override;
- virtual void InitEntry(SvTreeListEntry*, const OUString&, const Image&, const Image&) override;
-
- void Clear();
-
- DECL_LINK( PopupHdl, Menu*, bool );
- DECL_LINK( Timeout, Timer*, void );
- DECL_LINK( DoubleClickHdl, SvTreeListBox*, bool );
+ DECL_LINK(Timeout, Timer*, void);
+ DECL_LINK(DoubleClickHdl, weld::TreeView&, bool);
+ DECL_LINK(SelectHdl, weld::TreeView&, void);
+ DECL_LINK(FocusInHdl, weld::Widget&, void);
+ DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
+ DECL_LINK(CommandHdl, const CommandEvent&, bool);
+ DECL_LINK(QueryTooltipHdl, const weld::TreeIter&, OUString);
SwNavigationPI* GetParentWindow();
@@ -341,16 +322,40 @@ private:
static void SetShowShell(const SfxObjectShell*pSet) {pShowShell = pSet;}
DECL_STATIC_LINK(SwGlobalTree, ShowFrameHdl, void*, void);
- virtual VclPtr<PopupMenu> CreateContextMenu() override;
- virtual void ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) override;
-
public:
- SwGlobalTree(vcl::Window* pParent, SwNavigationPI* pDialog);
- virtual ~SwGlobalTree() override;
- virtual void dispose() override;
- virtual Size GetOptimalSize() const override;
+ SwGlobalTree(std::unique_ptr<weld::TreeView> xTreeView, SwNavigationPI* pDialog);
+ ~SwGlobalTree();
- void TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox);
+ bool get_visible() const { return m_xTreeView->get_visible(); }
+
+ void set_accessible_name(const OUString& rName)
+ {
+ m_xTreeView->set_accessible_name(rName);
+ }
+
+ void grab_focus()
+ {
+ m_xTreeView->grab_focus();
+ }
+
+ int count_selected_rows() const
+ {
+ return m_xTreeView->count_selected_rows();
+ }
+
+ void set_selection_mode(SelectionMode eMode)
+ {
+ m_xTreeView->set_selection_mode(eMode);
+ }
+
+ weld::TreeView& get_widget()
+ {
+ return *m_xTreeView;
+ }
+
+ void MoveSelectionTo(weld::TreeIter* pDropTarget);
+
+ void TbxMenuHdl(const OString& rCommand, weld::Menu& rMenu);
void InsertRegion( const SwGlblDocContent* pCont,
const OUString* pFileName = nullptr );
void EditContent(const SwGlblDocContent* pCont );
@@ -358,11 +363,15 @@ public:
void ShowTree();
void HideTree();
- void ExecCommand(const OUString& rCmd);
+ void ExecCommand(const OString& rCmd);
void Display(bool bOnlyUpdateUserData = false);
bool Update(bool bHard);
+
+ void ExecuteContextMenuAction(const OString& rSelectedPopupEntry);
+
+ const SwWrtShell* GetActiveWrtShell() const {return m_pActiveShell;}
};
#endif
diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index 1404d826da83..1ae6542fb51b 100644
--- a/sw/source/uibase/inc/navipi.hxx
+++ b/sw/source/uibase/inc/navipi.hxx
@@ -19,9 +19,6 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_NAVIPI_HXX
#define INCLUDED_SW_SOURCE_UIBASE_INC_NAVIPI_HXX
-#include <vcl/lstbox.hxx>
-#include <vcl/layout.hxx>
-#include <vcl/toolbox.hxx>
#include <vcl/idle.hxx>
#include <svl/lstner.hxx>
#include <vcl/transfer.hxx>
@@ -30,6 +27,7 @@
#include <sfx2/tbxctrl.hxx>
#include <sfx2/sidebar/ControllerItem.hxx>
#include <sfx2/sidebar/SidebarToolBox.hxx>
+#include <sfx2/weldutils.hxx>
#include <svx/sidebar/PanelLayout.hxx>
#include "conttree.hxx"
#include <ndarr.hxx>
@@ -39,7 +37,6 @@ class SwWrtShell;
class SwNavigationPI;
class SwNavigationChild;
class SfxBindings;
-class NumEditAction;
class SwNavigationConfig;
class SwView;
class SfxObjectShellLock;
@@ -59,17 +56,23 @@ class SwNavigationPI : public PanelLayout
::sfx2::sidebar::ControllerItem m_aDocFullName;
::sfx2::sidebar::ControllerItem m_aPageStats;
- VclPtr<sfx2::sidebar::SidebarToolBox> m_aContentToolBox;
- VclPtr<ToolBox> m_aGlobalToolBox;
- VclPtr<NumEditAction> m_xEdit;
- VclPtr<VclContainer> m_aContentBox;
- VclPtr<SwContentTree> m_aContentTree;
- VclPtr<VclContainer> m_aGlobalBox;
- VclPtr<SwGlobalTree> m_aGlobalTree;
- VclPtr<ListBox> m_aDocListBox;
+ std::unique_ptr<weld::Toolbar> m_xContent1ToolBox;
+ std::unique_ptr<weld::Toolbar> m_xContent2ToolBox;
+ std::unique_ptr<weld::Toolbar> m_xContent3ToolBox;
+ std::unique_ptr<ToolbarUnoDispatcher> m_xContent1Dispatch;
+ std::unique_ptr<weld::Menu> m_xHeadingsMenu;
+ std::unique_ptr<weld::Menu> m_xDragModeMenu;
+ std::unique_ptr<weld::Menu> m_xUpdateMenu;
+ std::unique_ptr<weld::Menu> m_xInsertMenu;
+ std::unique_ptr<weld::Toolbar> m_xGlobalToolBox;
+ std::unique_ptr<weld::SpinButton> m_xEdit;
+ std::unique_ptr<weld::Widget> m_xContentBox;
+ std::unique_ptr<SwContentTree> m_xContentTree;
+ std::unique_ptr<weld::Widget> m_xGlobalBox;
+ std::unique_ptr<SwGlobalTree> m_xGlobalTree;
+ std::unique_ptr<weld::ComboBox> m_xDocListBox;
Idle m_aPageChgIdle;
OUString m_sContentFileName;
- OUString m_aContextArr[3];
OUString m_aStatusArr[4];
std::unique_ptr<SfxObjectShellLock> m_pxObjectShell;
@@ -93,12 +96,15 @@ class SwNavigationPI : public PanelLayout
void FillBox();
- DECL_LINK( DocListBoxSelectHdl, ListBox&, void );
- DECL_LINK( ToolBoxSelectHdl, ToolBox *, void );
- DECL_LINK( ToolBoxClickHdl, ToolBox *, void );
- DECL_LINK( ToolBoxDropdownClickHdl, ToolBox*, void );
+ DECL_LINK( DocListBoxSelectHdl, weld::ComboBox&, void );
+ DECL_LINK( ToolBoxSelectHdl, const OString&, void );
+ DECL_LINK( ToolBoxClickHdl, const OString&, void );
+ DECL_LINK( ToolBox2DropdownClickHdl, const OString&, void );
+ DECL_LINK( ToolBox3DropdownClickHdl, const OString&, void );
DECL_LINK( DoneLink, SfxPoolItem const *, void );
- DECL_LINK( MenuSelectHdl, Menu *, bool );
+ DECL_LINK( DropModeMenuSelectHdl, const OString&, void );
+ DECL_LINK( HeadingsMenuSelectHdl, const OString&, void );
+ DECL_LINK( GlobalMenuSelectHdl, const OString&, void );
DECL_LINK( ChangePageHdl, Timer*, void );
DECL_LINK( PageEditModifyHdl, weld::SpinButton&, void );
bool EditAction();
@@ -109,7 +115,6 @@ protected:
// release ObjectShellLock early enough for app end
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
- NumEditAction& GetPageEdit();
void ToggleTree();
void SetGlobalMode(bool bSet) {m_bGlobalMode = bSet;}