summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-08 16:11:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-09 12:26:56 +0100
commit7c19dff94e7ce99ce2fc702ea69032c21212a80f (patch)
tree8ffebe85622e6e01103d0cc60d7fc2300f540a7c /sc/source/ui
parent65d2d2647ead42e5bbb7800f14c047f383fe450b (diff)
loplugin:singlevalfields in sc
Change-Id: I7b87680b9d76bb390a0657f5f1783c3a7c9edbc4 Reviewed-on: https://gerrit.libreoffice.org/63127 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/drawfunc/fupoor.cxx11
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx4
-rw-r--r--sc/source/ui/inc/fupoor.hxx1
-rw-r--r--sc/source/ui/inc/inscodlg.hxx1
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx13
-rw-r--r--sc/source/ui/miscdlgs/inscodlg.cxx6
6 files changed, 2 insertions, 34 deletions
diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
index 37c4d5f48678..75b450240f1c 100644
--- a/sc/source/ui/drawfunc/fupoor.cxx
+++ b/sc/source/ui/drawfunc/fupoor.cxx
@@ -37,7 +37,6 @@ FuPoor::FuPoor(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
pWindow(pWin),
pDrDoc(pDoc),
aSfxRequest(rReq),
- pDialog(nullptr),
bIsInDragMode(false),
// remember MouseButton state
mnCode(0)
@@ -53,26 +52,16 @@ FuPoor::~FuPoor()
{
aDragTimer.Stop();
aScrollTimer.Stop();
- pDialog.disposeAndClear();
}
void FuPoor::Activate()
{
- if (pDialog)
- {
- pDialog->Show();
- }
}
void FuPoor::Deactivate()
{
aDragTimer.Stop();
aScrollTimer.Stop();
-
- if (pDialog)
- {
- pDialog->Hide();
- }
}
// Scroll when reached the window border; is called from MouseMove
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index c63867ac1d86..33fd056cc4ae 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -108,12 +108,8 @@ private:
m_aHelper;
SfxBindings* const m_pMyBindings;
- VclPtr<vcl::Window> m_pActiveWin;
- Idle m_aIdle;
OUString m_aDocName; // document on which the dialog was opened
- DECL_LINK( UpdateFocusHdl, Timer*, void );
-
protected:
void disposeRefHandler();
bool DoClose( sal_uInt16 nId );
diff --git a/sc/source/ui/inc/fupoor.hxx b/sc/source/ui/inc/fupoor.hxx
index 4fb21013596b..4d758497b506 100644
--- a/sc/source/ui/inc/fupoor.hxx
+++ b/sc/source/ui/inc/fupoor.hxx
@@ -47,7 +47,6 @@ protected:
SdrModel* pDrDoc;
SfxRequest const aSfxRequest;
- VclPtr<Dialog> pDialog;
Timer aScrollTimer; // for Autoscrolling
DECL_LINK( ScrollHdl, Timer *, void );
diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx
index 23d21812f459..6b056d55a779 100644
--- a/sc/source/ui/inc/inscodlg.hxx
+++ b/sc/source/ui/inc/inscodlg.hxx
@@ -54,7 +54,6 @@ private:
InsertDeleteFlags nShortCutInsContentsCmdBits;
bool bShortCutTranspose;
- InsCellCmd nShortCutMoveMode;
std::unique_ptr<weld::CheckButton> mxBtnInsAll;
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 56efb1cac9d7..54a0be8869b8 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -754,11 +754,9 @@ ScRefHandler::ScRefHandler( vcl::Window &rWindow, SfxBindings* pB, bool bBindRef
m_rWindow( &rWindow ),
m_bInRefMode( false ),
m_aHelper(this,pB),
- m_pMyBindings( pB ),
- m_pActiveWin(nullptr)
+ m_pMyBindings( pB )
{
m_aHelper.SetWindow(m_rWindow.get());
- m_aIdle.SetInvokeHandler(LINK( this, ScRefHandler, UpdateFocusHdl));
if( bBindRef ) EnterRefMode();
}
@@ -821,7 +819,6 @@ ScRefHandler::~ScRefHandler()
void ScRefHandler::disposeRefHandler()
{
m_rWindow.clear();
- m_pActiveWin.clear();
LeaveRefMode();
m_aHelper.dispose();
}
@@ -932,14 +929,6 @@ void ScRefHandler::ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton*
m_aHelper.ToggleCollapsed( pEdit, pButton );
}
-IMPL_LINK_NOARG(ScRefHandler, UpdateFocusHdl, Timer *, void)
-{
- if (m_pActiveWin)
- {
- m_pActiveWin->GrabFocus();
- }
-}
-
bool ScRefHandler::ParseWithNames( ScRangeList& rRanges, const OUString& rStr, const ScDocument* pDoc )
{
return m_aHelper.ParseWithNames( rRanges, rStr, pDoc );
diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx
index 400b4bccc9a6..5f3343c7e716 100644
--- a/sc/source/ui/miscdlgs/inscodlg.cxx
+++ b/sc/source/ui/miscdlgs/inscodlg.cxx
@@ -38,7 +38,6 @@ ScInsertContentsDlg::ScInsertContentsDlg(weld::Window* pParent,
, bUsedShortCut(false)
, nShortCutInsContentsCmdBits(InsertDeleteFlags::NONE )
, bShortCutTranspose(false)
- , nShortCutMoveMode(INS_NONE)
, mxBtnInsAll(m_xBuilder->weld_check_button("paste_all"))
, mxBtnInsStrings(m_xBuilder->weld_check_button("text"))
, mxBtnInsNumbers(m_xBuilder->weld_check_button("numbers"))
@@ -136,7 +135,7 @@ InsertDeleteFlags ScInsertContentsDlg::GetInsContentsCmdBits() const
InsCellCmd ScInsertContentsDlg::GetMoveMode()
{
if (bUsedShortCut)
- return nShortCutMoveMode;
+ return INS_NONE;
if ( mxRbMoveDown->get_active() )
return INS_CELLSDOWN;
if ( mxRbMoveRight->get_active() )
@@ -291,7 +290,6 @@ IMPL_LINK(ScInsertContentsDlg, ShortCutHdl, weld::Button&, rBtn, void)
bUsedShortCut = true;
nShortCutInsContentsCmdBits = InsertDeleteFlags::STRING | InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME;
bShortCutTranspose = false;
- nShortCutMoveMode = INS_NONE;
m_xDialog->response(RET_OK);
}
else if (&rBtn == mxBtnShortCutPasteValuesFormats.get())
@@ -299,7 +297,6 @@ IMPL_LINK(ScInsertContentsDlg, ShortCutHdl, weld::Button&, rBtn, void)
bUsedShortCut = true;
nShortCutInsContentsCmdBits = InsertDeleteFlags::STRING | InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::ATTRIB;
bShortCutTranspose = false;
- nShortCutMoveMode = INS_NONE;
m_xDialog->response(RET_OK);
}
else if (&rBtn == mxBtnShortCutPasteTranspose.get())
@@ -307,7 +304,6 @@ IMPL_LINK(ScInsertContentsDlg, ShortCutHdl, weld::Button&, rBtn, void)
bUsedShortCut = true;
nShortCutInsContentsCmdBits = InsertDeleteFlags::ALL;
bShortCutTranspose = true;
- nShortCutMoveMode = INS_NONE;
m_xDialog->response(RET_OK);
}
}