[Libreoffice-commits] core.git: 2 commits - include/vcl solenv/sanitizers sw/source sw/uiconfig sw/UIConfig_swriter.mk
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Feb 15 12:45:14 UTC 2020
include/vcl/toolkit/field.hxx | 2 -
include/vcl/toolkit/fixedhyper.hxx | 2 -
include/vcl/toolkit/group.hxx | 2 -
include/vcl/toolkit/imgctrl.hxx | 2 -
include/vcl/toolkit/morebtn.hxx | 2 -
include/vcl/toolkit/prgsbar.hxx | 2 -
include/vcl/toolkit/roadmap.hxx | 2 -
include/vcl/toolkit/spin.hxx | 2 -
include/vcl/toolkit/tabdlg.hxx | 2 -
include/vcl/toolkit/throbber.hxx | 2 -
include/vcl/toolkit/unowrap.hxx | 2 -
solenv/sanitizers/ui/modules/swriter.suppr | 1
sw/UIConfig_swriter.mk | 1
sw/source/uibase/cctrl/actctrl.cxx | 49 ++++++++++++-----------------
sw/source/uibase/inc/actctrl.hxx | 47 +++++++++++++++++++++++----
sw/source/uibase/inc/navipi.hxx | 4 +-
sw/source/uibase/ribbar/workctrl.cxx | 3 +
sw/source/uibase/utlui/navipi.cxx | 39 +++++++++--------------
sw/uiconfig/swriter/ui/spinbox.ui | 32 ++++++++++++++++++
19 files changed, 125 insertions(+), 73 deletions(-)
New commits:
commit c9f4fd18a48282a2ccb87313f365792d9bc65914
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Feb 14 21:43:24 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Feb 15 13:44:48 2020 +0100
allow workben tests to use these
Change-Id: I01c69617c828dd50d00af35f38da465d9d4dd261
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88748
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/toolkit/field.hxx b/include/vcl/toolkit/field.hxx
index d5f466199653..9c237710f0cd 100644
--- a/include/vcl/toolkit/field.hxx
+++ b/include/vcl/toolkit/field.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_VCL_TOOLKIT_FIELD_HXX
#define INCLUDED_VCL_TOOLKIT_FIELD_HXX
-#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION)
+#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_WORKBEN)
#error "don't use this in new code"
#endif
diff --git a/include/vcl/toolkit/fixedhyper.hxx b/include/vcl/toolkit/fixedhyper.hxx
index 15434485b06a..58872639fd14 100644
--- a/include/vcl/toolkit/fixedhyper.hxx
+++ b/include/vcl/toolkit/fixedhyper.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_VCL_FIXEDHYPER_HXX
#define INCLUDED_VCL_FIXEDHYPER_HXX
-#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION)
+#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_WORKBEN)
#error "don't use this in new code"
#endif
diff --git a/include/vcl/toolkit/group.hxx b/include/vcl/toolkit/group.hxx
index 0ab20b2d2b36..c7cd83d8d46c 100644
--- a/include/vcl/toolkit/group.hxx
+++ b/include/vcl/toolkit/group.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_VCL_GROUP_HXX
#define INCLUDED_VCL_GROUP_HXX
-#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION)
+#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_WORKBEN)
#error "don't use this in new code"
#endif
diff --git a/include/vcl/toolkit/imgctrl.hxx b/include/vcl/toolkit/imgctrl.hxx
index e2f8ae972ce2..31fb55fef93d 100644
--- a/include/vcl/toolkit/imgctrl.hxx
+++ b/include/vcl/toolkit/imgctrl.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_VCL_IMGCTRL_HXX
#define INCLUDED_VCL_IMGCTRL_HXX
-#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION)
+#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_WORKBEN)
#error "don't use this in new code"
#endif
diff --git a/include/vcl/toolkit/morebtn.hxx b/include/vcl/toolkit/morebtn.hxx
index 5ed592690359..52ac74e97c65 100644
--- a/include/vcl/toolkit/morebtn.hxx
+++ b/include/vcl/toolkit/morebtn.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_VCL_MOREBTN_HXX
#define INCLUDED_VCL_MOREBTN_HXX
-#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION)
+#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_WORKBEN)
#error "don't use this in new code"
#endif
diff --git a/include/vcl/toolkit/prgsbar.hxx b/include/vcl/toolkit/prgsbar.hxx
index 9b9f251c81d2..19fc72c46e72 100644
--- a/include/vcl/toolkit/prgsbar.hxx
+++ b/include/vcl/toolkit/prgsbar.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_VCL_PRGSBAR_HXX
#define INCLUDED_VCL_PRGSBAR_HXX
-#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION)
+#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_WORKBEN)
#error "don't use this in new code"
#endif
diff --git a/include/vcl/toolkit/roadmap.hxx b/include/vcl/toolkit/roadmap.hxx
index 98ed542f0f51..1c7e7de94153 100644
--- a/include/vcl/toolkit/roadmap.hxx
+++ b/include/vcl/toolkit/roadmap.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_VCL_INC_ROADMAP_HXX
#define INCLUDED_VCL_INC_ROADMAP_HXX
-#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION)
+#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_WORKBEN)
#error "don't use this in new code"
#endif
diff --git a/include/vcl/toolkit/spin.hxx b/include/vcl/toolkit/spin.hxx
index 60f548e3b2b5..689e3fc1b871 100644
--- a/include/vcl/toolkit/spin.hxx
+++ b/include/vcl/toolkit/spin.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_VCL_SPIN_HXX
#define INCLUDED_VCL_SPIN_HXX
-#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION)
+#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_WORKBEN)
#error "don't use this in new code"
#endif
diff --git a/include/vcl/toolkit/tabdlg.hxx b/include/vcl/toolkit/tabdlg.hxx
index fb6e5b9b418f..71f127a5eb1b 100644
--- a/include/vcl/toolkit/tabdlg.hxx
+++ b/include/vcl/toolkit/tabdlg.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_VCL_TABDLG_HXX
#define INCLUDED_VCL_TABDLG_HXX
-#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION)
+#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_WORKBEN)
#error "don't use this in new code"
#endif
diff --git a/include/vcl/toolkit/throbber.hxx b/include/vcl/toolkit/throbber.hxx
index 740e7e19a029..eedef7a13fca 100644
--- a/include/vcl/toolkit/throbber.hxx
+++ b/include/vcl/toolkit/throbber.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_VCL_THROBBER_HXX
#define INCLUDED_VCL_THROBBER_HXX
-#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION)
+#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_WORKBEN)
#error "don't use this in new code"
#endif
diff --git a/include/vcl/toolkit/unowrap.hxx b/include/vcl/toolkit/unowrap.hxx
index d23155b88d64..b3c937768786 100644
--- a/include/vcl/toolkit/unowrap.hxx
+++ b/include/vcl/toolkit/unowrap.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_VCL_UNOWRAP_HXX
#define INCLUDED_VCL_UNOWRAP_HXX
-#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION)
+#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && !defined(VCL_WORKBEN)
#error "don't use this in new code"
#endif
commit 027ccdb03b1d6f7bfb7bc89fdd30a6ca2a6b21e0
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Feb 14 13:00:29 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Feb 15 13:44:29 2020 +0100
weld NumEditAction Item Window
Change-Id: Idd528666aa2daad336d8cbaab51d073bb982c474
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88722
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/solenv/sanitizers/ui/modules/swriter.suppr b/solenv/sanitizers/ui/modules/swriter.suppr
index 1034cb94c770..d60e64493575 100644
--- a/solenv/sanitizers/ui/modules/swriter.suppr
+++ b/solenv/sanitizers/ui/modules/swriter.suppr
@@ -193,6 +193,7 @@ sw/uiconfig/swriter/ui/selectaddressdialog.ui://GtkLabel[@id='connecting'] orpha
sw/uiconfig/swriter/ui/selecttabledialog.ui://GtkLabel[@id='select'] orphan-label
sw/uiconfig/swriter/ui/spellmenu.ui://GtkMenuItem[@id='spelldialog'] button-no-label
sw/uiconfig/swriter/ui/spellmenu.ui://GtkMenuItem[@id='correctdialog'] button-no-label
+sw/uiconfig/swriter/ui/spinbox.ui://GtkSpinButton[@id='spin'] no-labelled-by
sw/uiconfig/swriter/ui/statisticsinfopage.ui://GtkLabel[@id='nopages'] orphan-label
sw/uiconfig/swriter/ui/statisticsinfopage.ui://GtkLabel[@id='notables'] orphan-label
sw/uiconfig/swriter/ui/statisticsinfopage.ui://GtkLabel[@id='nogrfs'] orphan-label
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index d94a854e1efd..11fc70e9048b 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -262,6 +262,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/sidebartableedit \
sw/uiconfig/swriter/ui/sidebartheme \
sw/uiconfig/swriter/ui/sortdialog \
+ sw/uiconfig/swriter/ui/spinbox \
sw/uiconfig/swriter/ui/spellmenu \
sw/uiconfig/swriter/ui/splittable \
sw/uiconfig/swriter/ui/statisticsinfopage \
diff --git a/sw/source/uibase/cctrl/actctrl.cxx b/sw/source/uibase/cctrl/actctrl.cxx
index 8046da053a1f..62bfe65e7d66 100644
--- a/sw/source/uibase/cctrl/actctrl.cxx
+++ b/sw/source/uibase/cctrl/actctrl.cxx
@@ -21,36 +21,29 @@
#include <vcl/event.hxx>
#include <vcl/toolbox.hxx>
-bool NumEditAction::EventNotify( NotifyEvent& rNEvt )
+NumEditAction::NumEditAction(vcl::Window* pParent)
+ : InterimItemWindow(pParent, "modules/swriter/ui/spinbox.ui", "SpinBox")
+ , m_xWidget(m_xBuilder->weld_spin_button("spin"))
{
- bool bHandled = false;
+ m_xWidget->connect_key_press(LINK(this, NumEditAction, KeyInputHdl));
+ limitWidth();
+ SetSizePixel(m_xContainer->get_preferred_size());
+}
+
+void NumEditAction::limitWidth()
+{
+ m_xWidget->set_width_chars(3);
+}
- if ( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
- {
- const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
- const vcl::KeyCode aKeyCode = pKEvt->GetKeyCode();
- const sal_uInt16 aCode = aKeyCode.GetCode();
- const sal_uInt16 nModifier = aKeyCode.GetModifier();
- if( aCode == KEY_RETURN &&
- !nModifier)
- {
- aActionLink.Call( *this );
- bHandled = true;
- }
- else
- {
- vcl::Window* pParent = GetParent();
- if ( pParent != nullptr && aCode == KEY_TAB &&
- pParent->GetType() == WindowType::TOOLBOX )
- {
- static_cast<ToolBox*>(pParent)->ChangeHighlightUpDn( aKeyCode.IsShift() );
- bHandled = true;
- }
- }
- }
- if(!bHandled)
- bHandled = NumericField::EventNotify(rNEvt);
- return bHandled;
+void NumEditAction::set_max(int nMax)
+{
+ m_xWidget->set_max(nMax);
+ limitWidth();
+}
+
+IMPL_LINK(NumEditAction, KeyInputHdl, const KeyEvent&, rKEvt, bool)
+{
+ return ChildKeyInput(rKEvt);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/actctrl.hxx b/sw/source/uibase/inc/actctrl.hxx
index cd5fb964205c..76fe1ca0fe6d 100644
--- a/sw/source/uibase/inc/actctrl.hxx
+++ b/sw/source/uibase/inc/actctrl.hxx
@@ -19,24 +19,55 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_ACTCTRL_HXX
#define INCLUDED_SW_SOURCE_UIBASE_INC_ACTCTRL_HXX
-#include <vcl/field.hxx>
+#include <sfx2/InterimItemWindow.hxx>
+#include <vcl/weld.hxx>
#include <swdllapi.h>
// numerical input
-class NumEditAction: public NumericField
+class NumEditAction final : public InterimItemWindow
{
- Link<NumEditAction&,void> aActionLink;
+private:
+ std::unique_ptr<weld::SpinButton> m_xWidget;
-protected:
- virtual bool EventNotify( NotifyEvent& rNEvt ) override;
+ DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
public:
- NumEditAction(vcl::Window* pParent, WinBits nBits)
- : NumericField(pParent, nBits)
+ NumEditAction(vcl::Window* pParent);
+
+ virtual void dispose() override
{
+ m_xWidget.reset();
+ InterimItemWindow::dispose();
}
- void SetActionHdl( const Link<NumEditAction&,void>& rLink ) { aActionLink = rLink;}
+ virtual ~NumEditAction() override
+ {
+ disposeOnce();
+ }
+
+ 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
diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index 2b49a0ce6c88..2213365847ca 100644
--- a/sw/source/uibase/inc/navipi.hxx
+++ b/sw/source/uibase/inc/navipi.hxx
@@ -97,11 +97,11 @@ class SwNavigationPI : public PanelLayout
DECL_LINK( ToolBoxSelectHdl, ToolBox *, void );
DECL_LINK( ToolBoxClickHdl, ToolBox *, void );
DECL_LINK( ToolBoxDropdownClickHdl, ToolBox*, void );
- DECL_LINK( EditAction, NumEditAction&, void );
DECL_LINK( DoneLink, SfxPoolItem const *, void );
DECL_LINK( MenuSelectHdl, Menu *, bool );
DECL_LINK( ChangePageHdl, Timer*, void );
- DECL_LINK( PageEditModifyHdl, SpinField&, void );
+ DECL_LINK( PageEditModifyHdl, weld::SpinButton&, void );
+ void EditAction();
void UsePage();
protected:
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index 08df1397b935..8de6f7dcb202 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -716,7 +716,8 @@ IMPL_LINK(NavElementBox_Impl, KeyInputHdl, const KeyEvent&, rKEvt, bool)
{
bool bHandled = false;
- sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
+ vcl::KeyCode aKeyCode = rKEvt.GetKeyCode();
+ sal_uInt16 nCode = aKeyCode.GetCode();
switch ( nCode )
{
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 466c65b39d9d..5817e0a5ef05 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -185,16 +185,15 @@ void SwNavigationPI::UsePage()
{
SwView *pView = GetCreateView();
SwWrtShell *pSh = pView ? &pView->GetWrtShell() : nullptr;
- GetPageEdit().SetValue(1);
+ GetPageEdit().set_value(1);
if (pSh)
{
const sal_uInt16 nPageCnt = pSh->GetPageCnt();
sal_uInt16 nPhyPage, nVirPage;
pSh->GetPageNum(nPhyPage, nVirPage);
- GetPageEdit().SetMax(nPageCnt);
- GetPageEdit().SetLast(nPageCnt);
- GetPageEdit().SetValue(nPhyPage);
+ GetPageEdit().set_max(nPageCnt);
+ GetPageEdit().set_value(nPhyPage);
}
}
@@ -389,15 +388,14 @@ FactoryFunction SwNavigationPI::GetUITestFactory() const
// Action-Handler Edit:
// Switches to the page if the structure view is not turned on.
-
-IMPL_LINK( SwNavigationPI, EditAction, NumEditAction&, rEdit, void )
+void SwNavigationPI::EditAction()
{
SwView *pView = GetCreateView();
if (pView)
{
if(m_aPageChgIdle.IsActive())
m_aPageChgIdle.Stop();
- m_pCreateView->GetWrtShell().GotoPage(static_cast<sal_uInt16>(rEdit.GetValue()), true);
+ m_pCreateView->GetWrtShell().GotoPage(GetPageEdit().get_value(), true);
m_pCreateView->GetEditWin().GrabFocus();
m_pCreateView->GetViewFrame()->GetBindings().Invalidate(FN_STAT_PAGE);
}
@@ -529,14 +527,9 @@ SwNavigationPI::SwNavigationPI(vcl::Window* pParent,
m_aDocListBox->setMaxWidthChars(20);
// Insert the numeric field in the toolbox.
- m_xEdit = VclPtr<NumEditAction>::Create(
- m_aContentToolBox.get(), WB_BORDER|WB_TABSTOP|WB_LEFT|WB_REPEAT|WB_SPIN);
- m_xEdit->SetMin(1);
- m_xEdit->SetFirst(1);
- m_xEdit->SetActionHdl(LINK(this, SwNavigationPI, EditAction));
- m_xEdit->SetAccessibleName(m_xEdit->GetQuickHelpText());
- m_xEdit->SetUpHdl(LINK(this, SwNavigationPI, PageEditModifyHdl));
- m_xEdit->SetDownHdl(LINK(this, SwNavigationPI, PageEditModifyHdl));
+ m_xEdit = VclPtr<NumEditAction>::Create(m_aContentToolBox.get());
+ m_xEdit->set_accessible_name(m_xEdit->GetQuickHelpText());
+ m_xEdit->connect_value_changed(LINK(this, SwNavigationPI, PageEditModifyHdl));
// Double separators are not allowed, so you have to
// determine the suitable size differently.
@@ -544,8 +537,9 @@ SwNavigationPI::SwNavigationPI(vcl::Window* pParent,
tools::Rectangle aSecondRect = m_aContentToolBox->GetItemRect(m_aContentToolBox->GetItemId("header"));
Size aItemWinSize( aFirstRect.Left() - aSecondRect.Left(),
aFirstRect.Bottom() - aFirstRect.Top() );
- Size aOptimalSize(m_xEdit->CalcMinimumSizeForText(m_xEdit->CreateFieldText(9999)));
+ Size aOptimalSize(m_xEdit->GetSizePixel());
aItemWinSize.setWidth( std::max(aItemWinSize.Width(), aOptimalSize.Width()) );
+ aItemWinSize.setHeight( std::max(aItemWinSize.Height(), aOptimalSize.Height()) );
m_xEdit->SetSizePixel(aItemWinSize);
m_aContentToolBox->InsertSeparator(4);
m_aContentToolBox->InsertWindow( FN_PAGENUMBER, m_xEdit, ToolBoxItemBits::NONE, 4);
@@ -727,12 +721,10 @@ void SwNavigationPI::NotifyItemUpdate(sal_uInt16 nSID, SfxItemState /*eState*/,
if(pActView)
{
SwWrtShell &rSh = pActView->GetWrtShell();
- NumEditAction& rEdit = GetPageEdit();
- const sal_uInt16 nPageCnt = rSh.GetPageCnt();
- rEdit.SetMax(nPageCnt);
- rEdit.SetLast(nPageCnt);
+ GetPageEdit().set_max(rSh.GetPageCnt());
}
}
+
}
void SwNavigationPI::StateChanged(StateChangedType nStateChange)
@@ -781,7 +773,8 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint )
{
if (const SfxEventHint* pHint = dynamic_cast<const SfxEventHint*>(&rHint))
{
- if (pHint->GetEventId() == SfxEventHintId::OpenDoc)
+ SfxEventHintId eEventId = pHint->GetEventId();
+ if (eEventId == SfxEventHintId::OpenDoc)
{
SwView *pActView = GetCreateView();
if(pActView)
@@ -1068,12 +1061,12 @@ IMPL_LINK_NOARG(SwNavigationPI, ChangePageHdl, Timer *, void)
{
if (!IsDisposed())
{
- EditAction(GetPageEdit());
+ EditAction();
GetPageEdit().GrabFocus();
}
}
-IMPL_LINK_NOARG(SwNavigationPI, PageEditModifyHdl, SpinField&, void)
+IMPL_LINK_NOARG(SwNavigationPI, PageEditModifyHdl, weld::SpinButton&, void)
{
if (m_aPageChgIdle.IsActive())
m_aPageChgIdle.Stop();
diff --git a/sw/uiconfig/swriter/ui/spinbox.ui b/sw/uiconfig/swriter/ui/spinbox.ui
new file mode 100644
index 000000000000..73a9af9f0e7b
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/spinbox.ui
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<interface domain="sc">
+ <requires lib="gtk+" version="3.18"/>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">1</property>
+ <property name="upper">100000</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkBox" id="SpinBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkSpinButton" id="spin">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="adjustment">adjustment1</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+</interface>
More information about the Libreoffice-commits
mailing list