[Libreoffice-commits] core.git: 2 commits - sc/inc sc/source starmath/inc starmath/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 9 11:30:47 UTC 2018
sc/inc/funcdesc.hxx | 1
sc/source/core/data/funcdesc.cxx | 29 +-------
sc/source/filter/excel/xepivotxml.cxx | 24 +++----
sc/source/filter/inc/xepivotxml.hxx | 3
sc/source/ui/drawfunc/fupoor.cxx | 11 ---
sc/source/ui/inc/anyrefdg.hxx | 4 -
sc/source/ui/inc/fupoor.hxx | 1
sc/source/ui/inc/inscodlg.hxx | 1
sc/source/ui/miscdlgs/anyrefdg.cxx | 13 ----
sc/source/ui/miscdlgs/inscodlg.cxx | 6 -
starmath/inc/dialog.hxx | 2
starmath/source/dialog.cxx | 110 ++++++++++++++++------------------
12 files changed, 72 insertions(+), 133 deletions(-)
New commits:
commit d5acb9a30fcb3b9c799bb68d9ca400c89a655724
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Oct 31 09:36:49 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Nov 9 12:27:48 2018 +0100
loplugin:useuniqueptr in SmDistanceDialog
Change-Id: Ib5bda0c8cdd0e86ce27a56bfb1b86bc78d93a56f
Reviewed-on: https://gerrit.libreoffice.org/63129
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 4bcd3d99b395..2e2300a9aa64 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -201,7 +201,7 @@ class SmDistanceDialog : public weld::GenericDialogController
weld::Widget* m_pCurrentImage;
- SmCategoryDesc *Categories[NOCATEGORIES];
+ std::unique_ptr<SmCategoryDesc> m_xCategories[NOCATEGORIES];
sal_uInt16 nActiveCategory;
bool bScaleAllBrackets;
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 5519ef39b1ac..61f3edeaf885 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -594,7 +594,7 @@ SmCategoryDesc::~SmCategoryDesc()
IMPL_LINK( SmDistanceDialog, GetFocusHdl, weld::Widget&, rControl, void )
{
- if (Categories[nActiveCategory])
+ if (m_xCategories[nActiveCategory])
{
sal_uInt16 i;
@@ -610,7 +610,7 @@ IMPL_LINK( SmDistanceDialog, GetFocusHdl, weld::Widget&, rControl, void )
return;
if (m_pCurrentImage)
m_pCurrentImage->hide();
- m_pCurrentImage = Categories[nActiveCategory]->GetGraphic(i);
+ m_pCurrentImage = m_xCategories[nActiveCategory]->GetGraphic(i);
m_pCurrentImage->show();
}
}
@@ -679,7 +679,7 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
// before switching to the new one
if (nActiveCategory != CATEGORY_NONE)
{
- pCat = Categories[nActiveCategory];
+ pCat = m_xCategories[nActiveCategory].get();
pCat->SetValue(0, sal::static_int_cast<sal_uInt16>(m_xMetricField1->get_value(FieldUnit::NONE)));
pCat->SetValue(1, sal::static_int_cast<sal_uInt16>(m_xMetricField2->get_value(FieldUnit::NONE)));
pCat->SetValue(2, sal::static_int_cast<sal_uInt16>(m_xMetricField3->get_value(FieldUnit::NONE)));
@@ -725,7 +725,7 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
if (bActive)
{
- pCat = Categories[nCategory];
+ pCat = m_xCategories[nCategory].get();
pFT->set_label(pCat->GetString(i));
pMF->set_range(pCat->GetMinimum(i), pCat->GetMaximum(i), FieldUnit::NONE);
@@ -748,7 +748,7 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
}
m_xMenuButton->set_item_active("menuitem" + OString::number(nCategory + 1), true);
- m_xFrame->set_label(Categories[nCategory]->GetName());
+ m_xFrame->set_label(m_xCategories[nCategory]->GetName());
nActiveCategory = nCategory;
@@ -773,7 +773,7 @@ SmDistanceDialog::SmDistanceDialog(weld::Window *pParent)
, m_pCurrentImage(m_xBitmap.get())
{
for (sal_uInt16 i = 0; i < NOCATEGORIES; ++i)
- Categories[i] = new SmCategoryDesc(*m_xBuilder, i);
+ m_xCategories[i].reset( new SmCategoryDesc(*m_xBuilder, i) );
nActiveCategory = CATEGORY_NONE;
bScaleAllBrackets = false;
@@ -791,36 +791,34 @@ SmDistanceDialog::SmDistanceDialog(weld::Window *pParent)
SmDistanceDialog::~SmDistanceDialog()
{
- for (SmCategoryDesc* & rpDesc : Categories)
- DELETEZ(rpDesc);
}
void SmDistanceDialog::ReadFrom(const SmFormat &rFormat)
{
- Categories[0]->SetValue(0, rFormat.GetDistance(DIS_HORIZONTAL));
- Categories[0]->SetValue(1, rFormat.GetDistance(DIS_VERTICAL));
- Categories[0]->SetValue(2, rFormat.GetDistance(DIS_ROOT));
- Categories[1]->SetValue(0, rFormat.GetDistance(DIS_SUPERSCRIPT));
- Categories[1]->SetValue(1, rFormat.GetDistance(DIS_SUBSCRIPT));
- Categories[2]->SetValue(0, rFormat.GetDistance(DIS_NUMERATOR));
- Categories[2]->SetValue(1, rFormat.GetDistance(DIS_DENOMINATOR));
- Categories[3]->SetValue(0, rFormat.GetDistance(DIS_FRACTION));
- Categories[3]->SetValue(1, rFormat.GetDistance(DIS_STROKEWIDTH));
- Categories[4]->SetValue(0, rFormat.GetDistance(DIS_UPPERLIMIT));
- Categories[4]->SetValue(1, rFormat.GetDistance(DIS_LOWERLIMIT));
- Categories[5]->SetValue(0, rFormat.GetDistance(DIS_BRACKETSIZE));
- Categories[5]->SetValue(1, rFormat.GetDistance(DIS_BRACKETSPACE));
- Categories[5]->SetValue(3, rFormat.GetDistance(DIS_NORMALBRACKETSIZE));
- Categories[6]->SetValue(0, rFormat.GetDistance(DIS_MATRIXROW));
- Categories[6]->SetValue(1, rFormat.GetDistance(DIS_MATRIXCOL));
- Categories[7]->SetValue(0, rFormat.GetDistance(DIS_ORNAMENTSIZE));
- Categories[7]->SetValue(1, rFormat.GetDistance(DIS_ORNAMENTSPACE));
- Categories[8]->SetValue(0, rFormat.GetDistance(DIS_OPERATORSIZE));
- Categories[8]->SetValue(1, rFormat.GetDistance(DIS_OPERATORSPACE));
- Categories[9]->SetValue(0, rFormat.GetDistance(DIS_LEFTSPACE));
- Categories[9]->SetValue(1, rFormat.GetDistance(DIS_RIGHTSPACE));
- Categories[9]->SetValue(2, rFormat.GetDistance(DIS_TOPSPACE));
- Categories[9]->SetValue(3, rFormat.GetDistance(DIS_BOTTOMSPACE));
+ m_xCategories[0]->SetValue(0, rFormat.GetDistance(DIS_HORIZONTAL));
+ m_xCategories[0]->SetValue(1, rFormat.GetDistance(DIS_VERTICAL));
+ m_xCategories[0]->SetValue(2, rFormat.GetDistance(DIS_ROOT));
+ m_xCategories[1]->SetValue(0, rFormat.GetDistance(DIS_SUPERSCRIPT));
+ m_xCategories[1]->SetValue(1, rFormat.GetDistance(DIS_SUBSCRIPT));
+ m_xCategories[2]->SetValue(0, rFormat.GetDistance(DIS_NUMERATOR));
+ m_xCategories[2]->SetValue(1, rFormat.GetDistance(DIS_DENOMINATOR));
+ m_xCategories[3]->SetValue(0, rFormat.GetDistance(DIS_FRACTION));
+ m_xCategories[3]->SetValue(1, rFormat.GetDistance(DIS_STROKEWIDTH));
+ m_xCategories[4]->SetValue(0, rFormat.GetDistance(DIS_UPPERLIMIT));
+ m_xCategories[4]->SetValue(1, rFormat.GetDistance(DIS_LOWERLIMIT));
+ m_xCategories[5]->SetValue(0, rFormat.GetDistance(DIS_BRACKETSIZE));
+ m_xCategories[5]->SetValue(1, rFormat.GetDistance(DIS_BRACKETSPACE));
+ m_xCategories[5]->SetValue(3, rFormat.GetDistance(DIS_NORMALBRACKETSIZE));
+ m_xCategories[6]->SetValue(0, rFormat.GetDistance(DIS_MATRIXROW));
+ m_xCategories[6]->SetValue(1, rFormat.GetDistance(DIS_MATRIXCOL));
+ m_xCategories[7]->SetValue(0, rFormat.GetDistance(DIS_ORNAMENTSIZE));
+ m_xCategories[7]->SetValue(1, rFormat.GetDistance(DIS_ORNAMENTSPACE));
+ m_xCategories[8]->SetValue(0, rFormat.GetDistance(DIS_OPERATORSIZE));
+ m_xCategories[8]->SetValue(1, rFormat.GetDistance(DIS_OPERATORSPACE));
+ m_xCategories[9]->SetValue(0, rFormat.GetDistance(DIS_LEFTSPACE));
+ m_xCategories[9]->SetValue(1, rFormat.GetDistance(DIS_RIGHTSPACE));
+ m_xCategories[9]->SetValue(2, rFormat.GetDistance(DIS_TOPSPACE));
+ m_xCategories[9]->SetValue(3, rFormat.GetDistance(DIS_BOTTOMSPACE));
bScaleAllBrackets = rFormat.IsScaleNormalBrackets();
@@ -837,30 +835,30 @@ void SmDistanceDialog::WriteTo(SmFormat &rFormat) /*const*/
// if that's not the case 'const' could be used above!
SetCategory(nActiveCategory);
- rFormat.SetDistance( DIS_HORIZONTAL, Categories[0]->GetValue(0) );
- rFormat.SetDistance( DIS_VERTICAL, Categories[0]->GetValue(1) );
- rFormat.SetDistance( DIS_ROOT, Categories[0]->GetValue(2) );
- rFormat.SetDistance( DIS_SUPERSCRIPT, Categories[1]->GetValue(0) );
- rFormat.SetDistance( DIS_SUBSCRIPT, Categories[1]->GetValue(1) );
- rFormat.SetDistance( DIS_NUMERATOR, Categories[2]->GetValue(0) );
- rFormat.SetDistance( DIS_DENOMINATOR, Categories[2]->GetValue(1) );
- rFormat.SetDistance( DIS_FRACTION, Categories[3]->GetValue(0) );
- rFormat.SetDistance( DIS_STROKEWIDTH, Categories[3]->GetValue(1) );
- rFormat.SetDistance( DIS_UPPERLIMIT, Categories[4]->GetValue(0) );
- rFormat.SetDistance( DIS_LOWERLIMIT, Categories[4]->GetValue(1) );
- rFormat.SetDistance( DIS_BRACKETSIZE, Categories[5]->GetValue(0) );
- rFormat.SetDistance( DIS_BRACKETSPACE, Categories[5]->GetValue(1) );
- rFormat.SetDistance( DIS_MATRIXROW, Categories[6]->GetValue(0) );
- rFormat.SetDistance( DIS_MATRIXCOL, Categories[6]->GetValue(1) );
- rFormat.SetDistance( DIS_ORNAMENTSIZE, Categories[7]->GetValue(0) );
- rFormat.SetDistance( DIS_ORNAMENTSPACE, Categories[7]->GetValue(1) );
- rFormat.SetDistance( DIS_OPERATORSIZE, Categories[8]->GetValue(0) );
- rFormat.SetDistance( DIS_OPERATORSPACE, Categories[8]->GetValue(1) );
- rFormat.SetDistance( DIS_LEFTSPACE, Categories[9]->GetValue(0) );
- rFormat.SetDistance( DIS_RIGHTSPACE, Categories[9]->GetValue(1) );
- rFormat.SetDistance( DIS_TOPSPACE, Categories[9]->GetValue(2) );
- rFormat.SetDistance( DIS_BOTTOMSPACE, Categories[9]->GetValue(3) );
- rFormat.SetDistance( DIS_NORMALBRACKETSIZE, Categories[5]->GetValue(3) );
+ rFormat.SetDistance( DIS_HORIZONTAL, m_xCategories[0]->GetValue(0) );
+ rFormat.SetDistance( DIS_VERTICAL, m_xCategories[0]->GetValue(1) );
+ rFormat.SetDistance( DIS_ROOT, m_xCategories[0]->GetValue(2) );
+ rFormat.SetDistance( DIS_SUPERSCRIPT, m_xCategories[1]->GetValue(0) );
+ rFormat.SetDistance( DIS_SUBSCRIPT, m_xCategories[1]->GetValue(1) );
+ rFormat.SetDistance( DIS_NUMERATOR, m_xCategories[2]->GetValue(0) );
+ rFormat.SetDistance( DIS_DENOMINATOR, m_xCategories[2]->GetValue(1) );
+ rFormat.SetDistance( DIS_FRACTION, m_xCategories[3]->GetValue(0) );
+ rFormat.SetDistance( DIS_STROKEWIDTH, m_xCategories[3]->GetValue(1) );
+ rFormat.SetDistance( DIS_UPPERLIMIT, m_xCategories[4]->GetValue(0) );
+ rFormat.SetDistance( DIS_LOWERLIMIT, m_xCategories[4]->GetValue(1) );
+ rFormat.SetDistance( DIS_BRACKETSIZE, m_xCategories[5]->GetValue(0) );
+ rFormat.SetDistance( DIS_BRACKETSPACE, m_xCategories[5]->GetValue(1) );
+ rFormat.SetDistance( DIS_MATRIXROW, m_xCategories[6]->GetValue(0) );
+ rFormat.SetDistance( DIS_MATRIXCOL, m_xCategories[6]->GetValue(1) );
+ rFormat.SetDistance( DIS_ORNAMENTSIZE, m_xCategories[7]->GetValue(0) );
+ rFormat.SetDistance( DIS_ORNAMENTSPACE, m_xCategories[7]->GetValue(1) );
+ rFormat.SetDistance( DIS_OPERATORSIZE, m_xCategories[8]->GetValue(0) );
+ rFormat.SetDistance( DIS_OPERATORSPACE, m_xCategories[8]->GetValue(1) );
+ rFormat.SetDistance( DIS_LEFTSPACE, m_xCategories[9]->GetValue(0) );
+ rFormat.SetDistance( DIS_RIGHTSPACE, m_xCategories[9]->GetValue(1) );
+ rFormat.SetDistance( DIS_TOPSPACE, m_xCategories[9]->GetValue(2) );
+ rFormat.SetDistance( DIS_BOTTOMSPACE, m_xCategories[9]->GetValue(3) );
+ rFormat.SetDistance( DIS_NORMALBRACKETSIZE, m_xCategories[5]->GetValue(3) );
rFormat.SetScaleNormalBrackets( bScaleAllBrackets );
commit 7c19dff94e7ce99ce2fc702ea69032c21212a80f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Nov 8 16:11:37 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Nov 9 12:26:56 2018 +0100
loplugin:singlevalfields in sc
Change-Id: I7b87680b9d76bb390a0657f5f1783c3a7c9edbc4
Reviewed-on: https://gerrit.libreoffice.org/63127
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sc/inc/funcdesc.hxx b/sc/inc/funcdesc.hxx
index c03917d76d0d..b98321a80303 100644
--- a/sc/inc/funcdesc.hxx
+++ b/sc/inc/funcdesc.hxx
@@ -218,7 +218,6 @@ public:
sal_uInt16 nVarArgsStart; /**< Start of variable arguments, for numbering */
OString sHelpId; /**< HelpId of function */
bool bIncomplete :1; /**< Incomplete argument info (set for add-in info from configuration) */
- bool bHasSuppressedArgs :1; /**< Whether there is any suppressed parameter. */
bool mbHidden :1; /**< Whether function is hidden */
};
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 6edd7fe23576..2ca4d572bdf0 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -101,7 +101,6 @@ ScFuncDesc::ScFuncDesc() :
nArgCount (0),
nVarArgsStart (0),
bIncomplete (false),
- bHasSuppressedArgs(false),
mbHidden (false)
{}
@@ -134,7 +133,6 @@ void ScFuncDesc::Clear()
nCategory = 0;
sHelpId.clear();
bIncomplete = false;
- bHasSuppressedArgs = false;
mbHidden = false;
}
@@ -272,20 +270,7 @@ OUString ScFuncDesc::getFormula( const ::std::vector< OUString >& _aArguments )
sal_uInt16 ScFuncDesc::GetSuppressedArgCount() const
{
- if (!bHasSuppressedArgs || !pDefArgFlags)
- return nArgCount;
-
- sal_uInt16 nArgs = nArgCount;
- if (nArgs >= PAIRED_VAR_ARGS)
- nArgs -= PAIRED_VAR_ARGS - 2;
- else if (nArgs >= VAR_ARGS)
- nArgs -= VAR_ARGS - 1;
- sal_uInt16 nCount = nArgs;
- if (nArgCount >= PAIRED_VAR_ARGS)
- nCount += PAIRED_VAR_ARGS - 2;
- else if (nArgCount >= VAR_ARGS)
- nCount += VAR_ARGS - 1;
- return nCount;
+ return nArgCount;
}
OUString ScFuncDesc::getFunctionName() const
@@ -316,15 +301,11 @@ sal_Int32 ScFuncDesc::getSuppressedArgumentCount() const
void ScFuncDesc::fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _rArguments) const
{
- if (!bHasSuppressedArgs || !pDefArgFlags)
- {
- _rArguments.resize( nArgCount);
- sal_uInt16 value = 0;
- for (auto & argument : _rArguments)
- argument = value++;
- }
+ _rArguments.resize( nArgCount);
+ sal_uInt16 value = 0;
+ for (auto & argument : _rArguments)
+ argument = value++;
- _rArguments.reserve( nArgCount);
sal_uInt16 nArgs = nArgCount;
if (nArgs >= PAIRED_VAR_ARGS)
nArgs -= PAIRED_VAR_ARGS - 2;
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index 753746bb8f74..9a3953ae0ab3 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -228,21 +228,18 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr
XML_createdVersion, "3", // MS Excel 2007, tdf#112936: setting version number makes MSO to handle the pivot table differently
FSEND);
- if (rEntry.meType == Worksheet)
- {
- pDefStrm->startElement(XML_cacheSource,
- XML_type, "worksheet",
- FSEND);
+ pDefStrm->startElement(XML_cacheSource,
+ XML_type, "worksheet",
+ FSEND);
- OUString aSheetName;
- GetDoc().GetName(rEntry.maSrcRange.aStart.Tab(), aSheetName);
- pDefStrm->singleElement(XML_worksheetSource,
- XML_ref, XclXmlUtils::ToOString(rEntry.maSrcRange).getStr(),
- XML_sheet, XclXmlUtils::ToOString(aSheetName).getStr(),
- FSEND);
+ OUString aSheetName;
+ GetDoc().GetName(rEntry.maSrcRange.aStart.Tab(), aSheetName);
+ pDefStrm->singleElement(XML_worksheetSource,
+ XML_ref, XclXmlUtils::ToOString(rEntry.maSrcRange).getStr(),
+ XML_sheet, XclXmlUtils::ToOString(aSheetName).getStr(),
+ FSEND);
- pDefStrm->endElement(XML_cacheSource);
- }
+ pDefStrm->endElement(XML_cacheSource);
size_t nCount = rCache.GetFieldCount();
pDefStrm->startElement(XML_cacheFields,
@@ -449,7 +446,6 @@ void XclExpXmlPivotTableManager::Initialize()
maCacheIdMap.emplace(*it, aCaches.size()+1);
XclExpXmlPivotCaches::Entry aEntry;
- aEntry.meType = XclExpXmlPivotCaches::Worksheet;
aEntry.mpCache = pCache;
aEntry.maSrcRange = rRange;
aCaches.push_back(aEntry); // Cache ID equals position + 1.
diff --git a/sc/source/filter/inc/xepivotxml.hxx b/sc/source/filter/inc/xepivotxml.hxx
index c1eede23e886..e068a7773866 100644
--- a/sc/source/filter/inc/xepivotxml.hxx
+++ b/sc/source/filter/inc/xepivotxml.hxx
@@ -23,12 +23,9 @@ class ScDPObject;
class XclExpXmlPivotCaches : public XclExpRecordBase, protected XclExpRoot
{
public:
- enum EntryType { Worksheet, Name, Database };
-
struct Entry
{
const ScDPCache* mpCache;
- EntryType meType;
ScRange maSrcRange;
};
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);
}
}
More information about the Libreoffice-commits
mailing list