summaryrefslogtreecommitdiff
path: root/sw/source/uibase/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-14 12:55:54 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-14 21:21:47 +0100
commit1b2fcca411d410c6cd1fd46fa8f26fa0191f4b05 (patch)
tree0f34949efc6170070e303a907a6603631f69291d /sw/source/uibase/inc
parente30caebf76ccd088840b870ecb8929ce132baed0 (diff)
rework SwNavigationPI to listen to two properties
SID_DOCFULLNAME as before, and FN_STAT_PAGE to keep track of the current number of pages to always keep the page spinbutton up to date instead of waiting until its focusin signal to change it. a true gtk spinbutton will have its + disabled unless it can be increased so it will need to have the current max uptodate before focusing in Change-Id: I29a5d93ae38c6a3d0e74994a466102af234bfd48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88707 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/navipi.hxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index 103dd6ac6255..2b49a0ce6c88 100644
--- a/sw/source/uibase/inc/navipi.hxx
+++ b/sw/source/uibase/inc/navipi.hxx
@@ -28,6 +28,7 @@
#include <sfx2/childwin.hxx>
#include <sfx2/ctrlitem.hxx>
#include <sfx2/tbxctrl.hxx>
+#include <sfx2/sidebar/ControllerItem.hxx>
#include <sfx2/sidebar/SidebarToolBox.hxx>
#include <svx/sidebar/PanelLayout.hxx>
#include "conttree.hxx"
@@ -46,14 +47,18 @@ class SfxChildWindowContext;
enum class RegionMode;
class SpinField;
-class SwNavigationPI : public PanelLayout,
- public SfxControllerItem, public SfxListener
+class SwNavigationPI : public PanelLayout
+ , public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+ , public SfxListener
{
friend class SwNavigationChild;
friend class SwContentTree;
friend class SwGlobalTree;
friend class SwNavigationPIUIObject;
+ ::sfx2::sidebar::ControllerItem m_aDocFullName;
+ ::sfx2::sidebar::ControllerItem m_aPageStats;
+
VclPtr<sfx2::sidebar::SidebarToolBox> m_aContentToolBox;
VclPtr<ToolBox> m_aGlobalToolBox;
VclPtr<NumEditAction> m_xEdit;
@@ -93,7 +98,6 @@ class SwNavigationPI : public PanelLayout,
DECL_LINK( ToolBoxClickHdl, ToolBox *, void );
DECL_LINK( ToolBoxDropdownClickHdl, ToolBox*, void );
DECL_LINK( EditAction, NumEditAction&, void );
- DECL_LINK( EditGetFocus, Control&, void );
DECL_LINK( DoneLink, SfxPoolItem const *, void );
DECL_LINK( MenuSelectHdl, Menu *, bool );
DECL_LINK( ChangePageHdl, Timer*, void );
@@ -123,8 +127,9 @@ public:
void UpdateListBox();
void MoveOutline(SwOutlineNodes::size_type nSource, SwOutlineNodes::size_type nTarget, bool bWithCilds);
- virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
- const SfxPoolItem* pState ) override;
+ virtual void NotifyItemUpdate(const sal_uInt16 nSId,
+ const SfxItemState eState,
+ const SfxPoolItem* pState) override;
virtual void StateChanged(StateChangedType nStateChange) override;