summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-01-11 12:56:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-01-11 13:17:08 +0100
commit00c62e306f4fd866f04a496a28c15d317ba02222 (patch)
tree7721f038bda5655f40b53da34c01459f37c9c326 /sc
parent9ff5abf2e17e1f482a608c8c4a76b563fe8fe7e3 (diff)
loplugin:privatebase: Publicly derive from binary_/unary_function
Somewhat arbitrarily prefer public over private derivation; ultimately, derivation from those deprecated (C++11)/removed (C++17) classes should be removed, anyway. Change-Id: I5ed24427d37586e72f8c16509cf5002a54af73f1
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/typedstrdata.hxx2
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx2
-rw-r--r--sc/source/core/data/column.cxx4
-rw-r--r--sc/source/core/data/column3.cxx2
-rw-r--r--sc/source/core/data/documen7.cxx2
-rw-r--r--sc/source/core/data/document.cxx2
-rw-r--r--sc/source/core/data/document10.cxx2
-rw-r--r--sc/source/core/data/dpcache.cxx6
-rw-r--r--sc/source/core/data/dpdimsave.cxx2
-rw-r--r--sc/source/core/data/dpgroup.cxx2
-rw-r--r--sc/source/core/data/dpobject.cxx12
-rw-r--r--sc/source/core/data/dpsave.cxx2
-rw-r--r--sc/source/core/data/dptabsrc.cxx2
-rw-r--r--sc/source/core/data/formulacell.cxx4
-rw-r--r--sc/source/core/data/table3.cxx8
-rw-r--r--sc/source/core/tool/compiler.cxx2
-rw-r--r--sc/source/core/tool/grouparealistener.cxx2
-rw-r--r--sc/source/core/tool/interpr4.cxx2
-rw-r--r--sc/source/core/tool/interpr5.cxx2
-rw-r--r--sc/source/core/tool/scmatrix.cxx16
-rw-r--r--sc/source/filter/orcus/interface.cxx2
-rw-r--r--sc/source/filter/orcus/xmlcontext.cxx4
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx2
-rw-r--r--sc/source/ui/undo/undoblk.cxx2
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx2
-rw-r--r--sc/source/ui/view/drawvie4.cxx4
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx2
27 files changed, 48 insertions, 48 deletions
diff --git a/sc/inc/typedstrdata.hxx b/sc/inc/typedstrdata.hxx
index 42dcd609c079..523c8e7bc3d6 100644
--- a/sc/inc/typedstrdata.hxx
+++ b/sc/inc/typedstrdata.hxx
@@ -67,7 +67,7 @@ private:
bool mbIsDate;
};
-class FindTypedStrData : std::unary_function<ScTypedStrData, bool>
+class FindTypedStrData : public std::unary_function<ScTypedStrData, bool>
{
ScTypedStrData maVal;
bool mbCaseSens;
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index d47557944f28..cff11cddadd1 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -1733,7 +1733,7 @@ void ScFiltersTest::testCellAnchoredHiddenShapesXLSX()
namespace {
-class FindDimByName : std::unary_function<const ScDPSaveDimension*, bool>
+class FindDimByName : public std::unary_function<const ScDPSaveDimension*, bool>
{
OUString maName;
public:
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index c09f0968bd50..12ed9419f539 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1952,7 +1952,7 @@ void ScColumn::MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn& rCol)
namespace {
-class SharedTopFormulaCellPicker : std::unary_function<sc::CellStoreType::value_type, void>
+class SharedTopFormulaCellPicker : public std::unary_function<sc::CellStoreType::value_type, void>
{
public:
virtual ~SharedTopFormulaCellPicker() {}
@@ -2026,7 +2026,7 @@ public:
}
};
-class UpdateRefOnNonCopy : std::unary_function<sc::FormulaGroupEntry, void>
+class UpdateRefOnNonCopy : public std::unary_function<sc::FormulaGroupEntry, void>
{
SCCOL mnCol;
SCROW mnTab;
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index d66090b8b3f7..5a596576ca2e 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -731,7 +731,7 @@ bool ScColumn::InitBlockPosition( sc::ColumnBlockConstPosition& rBlockPos ) cons
namespace {
-class CopyAttrArrayByRange : std::unary_function<sc::RowSpan, void>
+class CopyAttrArrayByRange : public std::unary_function<sc::RowSpan, void>
{
ScAttrArray& mrDestAttrArray;
ScAttrArray& mrSrcAttrArray;
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index eedb0e1ae499..82afce2aeb27 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -169,7 +169,7 @@ void ScDocument::BroadcastCells( const ScRange& rRange, sal_uInt32 nHint, bool b
namespace {
-class RefMovedNotifier : std::unary_function<SvtListener*, void>
+class RefMovedNotifier : public std::unary_function<SvtListener*, void>
{
const sc::RefMovedHint& mrHint;
public:
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index c12ea31e6102..deaddf4fbd14 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3808,7 +3808,7 @@ void ScDocument::CompileAll()
namespace {
-class CompileXMLHandler : std::unary_function<ScTable*, void>
+class CompileXMLHandler : public std::unary_function<ScTable*, void>
{
sc::CompileFormulaContext* mpCxt;
ScProgress* mpProgress;
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index d3303edcd61c..dddd8b0d27b9 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -391,7 +391,7 @@ void ScDocument::SetNeedsListeningGroups( const std::vector<ScAddress>& rPosArra
namespace {
-class StartNeededListenersHandler : std::unary_function<ScTable*, void>
+class StartNeededListenersHandler : public std::unary_function<ScTable*, void>
{
std::shared_ptr<sc::StartListeningContext> mpCxt;
public:
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index da4d08f05948..0ba46d436c10 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -207,7 +207,7 @@ struct EqualByOrderIndex : std::binary_function<Bucket, Bucket, bool>
}
};
-class PushBackValue : std::unary_function<Bucket, void>
+class PushBackValue : public std::unary_function<Bucket, void>
{
ScDPCache::ScDPItemDataVec& mrItems;
public:
@@ -218,7 +218,7 @@ public:
}
};
-class PushBackOrderIndex : std::unary_function<Bucket, void>
+class PushBackOrderIndex : public std::unary_function<Bucket, void>
{
ScDPCache::IndexArrayType& mrData;
public:
@@ -229,7 +229,7 @@ public:
}
};
-class TagValueSortOrder : std::unary_function<Bucket, void>
+class TagValueSortOrder : public std::unary_function<Bucket, void>
{
SCROW mnCurIndex;
public:
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index bdd048b14d94..4d2487153f31 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -658,7 +658,7 @@ void ScDPDimensionSaveData::WriteToData( ScDPGroupTableData& rData ) const
namespace {
-class AddGroupDimToCache : std::unary_function<ScDPSaveGroupDimension, void>
+class AddGroupDimToCache : public std::unary_function<ScDPSaveGroupDimension, void>
{
ScDPCache& mrCache;
public:
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index 1ebb4d832ae7..f752d431cbbe 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -641,7 +641,7 @@ void ScDPGroupTableData::CreateCacheTable()
namespace {
-class FindCaseInsensitive : std::unary_function<ScDPItemData, bool>
+class FindCaseInsensitive : public std::unary_function<ScDPItemData, bool>
{
ScDPItemData maValue;
public:
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index e14f36868c21..4effa69d84ff 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -584,7 +584,7 @@ public:
}
};
-class FindIntersectingTable : std::unary_function<std::unique_ptr<ScDPObject>, bool>
+class FindIntersectingTable : public std::unary_function<std::unique_ptr<ScDPObject>, bool>
{
ScRange maRange;
public:
@@ -596,7 +596,7 @@ public:
}
};
-class FindIntersetingTableByColumns : std::unary_function<std::unique_ptr<ScDPObject>, bool>
+class FindIntersetingTableByColumns : public std::unary_function<std::unique_ptr<ScDPObject>, bool>
{
SCCOL mnCol1;
SCCOL mnCol2;
@@ -630,7 +630,7 @@ public:
}
};
-class FindIntersectingTableByRows : std::unary_function<std::unique_ptr<ScDPObject>, bool>
+class FindIntersectingTableByRows : public std::unary_function<std::unique_ptr<ScDPObject>, bool>
{
SCCOL mnCol;
SCROW mnRow1;
@@ -664,7 +664,7 @@ public:
}
};
-class AccumulateOutputRanges : std::unary_function<std::unique_ptr<ScDPObject>, void>
+class AccumulateOutputRanges : public std::unary_function<std::unique_ptr<ScDPObject>, void>
{
ScRangeList maRanges;
SCTAB mnTab;
@@ -1326,7 +1326,7 @@ void ScDPObject::GetHeaderPositionData(const ScAddress& rPos, DataPilotTableHead
namespace {
-class FindByName : std::unary_function<const ScDPSaveDimension*, bool>
+class FindByName : public std::unary_function<const ScDPSaveDimension*, bool>
{
OUString maName; // must be all uppercase.
public:
@@ -1349,7 +1349,7 @@ public:
}
};
-class LessByDimOrder : std::binary_function<sheet::DataPilotFieldFilter, sheet::DataPilotFieldFilter, bool>
+class LessByDimOrder : public std::binary_function<sheet::DataPilotFieldFilter, sheet::DataPilotFieldFilter, bool>
{
const ScDPSaveData::DimOrderType& mrDimOrder;
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 82d810c60056..77318b1ef699 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -895,7 +895,7 @@ const OUString* ScDPSaveData::GetGrandTotalName() const
namespace {
-class DimOrderInserter : std::unary_function<const ScDPSaveDimension*, void>
+class DimOrderInserter : public std::unary_function<const ScDPSaveDimension*, void>
{
ScDPSaveData::DimOrderType& mrNames;
public:
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 24e7fec60cf2..2895cb5e6f59 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -683,7 +683,7 @@ void ScDPSource::FillCalcInfo(bool bIsRow, ScDPTableData::CalcInfo& rInfo, bool
namespace {
-class CategoryDimInserter : std::unary_function<long, void>
+class CategoryDimInserter : public std::unary_function<long, void>
{
ScDPSource& mrSource;
std::unordered_set<sal_Int32>& mrCatDims;
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 722c5c092de8..450cf402b30f 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -304,7 +304,7 @@ lcl_checkRangeDimensions(
return false;
}
-class LessByReference : std::binary_function<const formula::FormulaToken*, const formula::FormulaToken*, bool>
+class LessByReference : public std::binary_function<const formula::FormulaToken*, const formula::FormulaToken*, bool>
{
ScAddress maPos;
DimensionSelector maFunc;
@@ -325,7 +325,7 @@ public:
* denoted by token p1. Dimension, in which the comparison takes place, is
* given by maFunc.
*/
-class AdjacentByReference : std::binary_function<const formula::FormulaToken*, const formula::FormulaToken*, bool>
+class AdjacentByReference : public std::binary_function<const formula::FormulaToken*, const formula::FormulaToken*, bool>
{
ScAddress maPos;
DimensionSelector maFunc;
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index b9ab8ca0b7e5..27139922c40b 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -651,7 +651,7 @@ void ScTable::DestroySortCollator()
namespace {
template<typename _Hint, typename _ReorderMap, typename _Index>
-class ReorderNotifier : std::unary_function<SvtListener*, void>
+class ReorderNotifier : public std::unary_function<SvtListener*, void>
{
_Hint maHint;
public:
@@ -664,7 +664,7 @@ public:
}
};
-class StartListeningNotifier : std::unary_function<SvtListener*, void>
+class StartListeningNotifier : public std::unary_function<SvtListener*, void>
{
sc::RefStartListeningHint maHint;
public:
@@ -676,7 +676,7 @@ public:
}
};
-class StopListeningNotifier : std::unary_function<SvtListener*, void>
+class StopListeningNotifier : public std::unary_function<SvtListener*, void>
{
sc::RefStopListeningHint maHint;
public:
@@ -688,7 +688,7 @@ public:
}
};
-class FormulaGroupPosCollector : std::unary_function<SvtListener*, void>
+class FormulaGroupPosCollector : public std::unary_function<SvtListener*, void>
{
sc::RefQueryFormulaGroup& mrQuery;
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 4c55d76d6170..243faa72905b 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4045,7 +4045,7 @@ void ScCompiler::CreateStringFromXMLTokenArray( OUString& rFormula, OUString& rF
namespace {
-class ExternalFileInserter : std::unary_function<sal_uInt16, void>
+class ExternalFileInserter : public std::unary_function<sal_uInt16, void>
{
ScAddress maPos;
ScExternalRefManager& mrRefMgr;
diff --git a/sc/source/core/tool/grouparealistener.cxx b/sc/source/core/tool/grouparealistener.cxx
index a41578717acb..ac8dd422982c 100644
--- a/sc/source/core/tool/grouparealistener.cxx
+++ b/sc/source/core/tool/grouparealistener.cxx
@@ -22,7 +22,7 @@ namespace sc {
namespace {
-class Notifier : std::unary_function<ScFormulaCell*, void>
+class Notifier : public std::unary_function<ScFormulaCell*, void>
{
const SfxHint& mrHint;
public:
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index ca54487515f6..dfa669363745 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3213,7 +3213,7 @@ bool ScInterpreter::SetSbxVariable( SbxVariable* pVar, const ScAddress& rPos )
namespace {
-class FindByPointer : ::std::unary_function<ScInterpreterTableOpParams, bool>
+class FindByPointer : public ::std::unary_function<ScInterpreterTableOpParams, bool>
{
const ScInterpreterTableOpParams* mpTableOp;
public:
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 2546b8b850db..12cc662703d7 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -1660,7 +1660,7 @@ void ScInterpreter::ScPow()
namespace {
-class SumValues : std::unary_function<double, void>
+class SumValues : public std::unary_function<double, void>
{
double mfSum;
bool mbError;
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index ec87836aa4a3..a3a86d44948c 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -135,7 +135,7 @@ struct ElemLessEqualZero : public unary_function<double, double>
};
template<typename _Comp>
-class CompareMatrixElemFunc : std::unary_function<MatrixImplType::element_block_node_type, void>
+class CompareMatrixElemFunc : public std::unary_function<MatrixImplType::element_block_node_type, void>
{
static _Comp maComp;
@@ -1155,7 +1155,7 @@ public:
}
};
-class CountElements : std::unary_function<MatrixImplType::element_block_node_type, void>
+class CountElements : public std::unary_function<MatrixImplType::element_block_node_type, void>
{
size_t mnCount;
bool mbCountString;
@@ -1186,7 +1186,7 @@ public:
const size_t ResultNotSet = std::numeric_limits<size_t>::max();
template<typename _Type>
-class WalkAndMatchElements : std::unary_function<MatrixImplType::element_block_node_type, void>
+class WalkAndMatchElements : public std::unary_function<MatrixImplType::element_block_node_type, void>
{
_Type maMatchValue;
MatrixImplType::size_pair_type maSize;
@@ -1336,7 +1336,7 @@ struct MinOp
};
template<typename _Op>
-class CalcMaxMinValue : std::unary_function<MatrixImplType::element_block_type, void>
+class CalcMaxMinValue : public std::unary_function<MatrixImplType::element_block_type, void>
{
double mfVal;
bool mbTextAsZero;
@@ -1425,7 +1425,7 @@ inline double evaluate( double fVal, ScQueryOp eOp )
return CreateDoubleError( errUnknownState);
}
-class CompareMatrixFunc : std::unary_function<MatrixImplType::element_block_type, void>
+class CompareMatrixFunc : public std::unary_function<MatrixImplType::element_block_type, void>
{
sc::Compare& mrComp;
size_t mnMatPos;
@@ -1519,7 +1519,7 @@ public:
/**
* Left-hand side is a matrix while the right-hand side is a numeric value.
*/
-class CompareMatrixToNumericFunc : std::unary_function<MatrixImplType::element_block_type, void>
+class CompareMatrixToNumericFunc : public std::unary_function<MatrixImplType::element_block_type, void>
{
sc::Compare& mrComp;
double mfRightValue;
@@ -1608,7 +1608,7 @@ public:
}
};
-class ToDoubleArray : std::unary_function<MatrixImplType::element_block_type, void>
+class ToDoubleArray : public std::unary_function<MatrixImplType::element_block_type, void>
{
std::vector<double> maArray;
std::vector<double>::iterator miPos;
@@ -1682,7 +1682,7 @@ struct ArrayMul : public std::binary_function<double, double, double>
};
template<typename _Op>
-class MergeDoubleArrayFunc : std::unary_function<MatrixImplType::element_block_type, void>
+class MergeDoubleArrayFunc : public std::unary_function<MatrixImplType::element_block_type, void>
{
std::vector<double>& mrArray;
std::vector<double>::iterator miPos;
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 5e98d29af4a3..12a1b7d36a05 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -79,7 +79,7 @@ orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::append_sheet(const char
return maSheets.back().get();
}
-class FindSheetByIndex : std::unary_function< std::unique_ptr<ScOrcusSheet>, bool>
+class FindSheetByIndex : public std::unary_function< std::unique_ptr<ScOrcusSheet>, bool>
{
SCTAB mnTab;
public:
diff --git a/sc/source/filter/orcus/xmlcontext.cxx b/sc/source/filter/orcus/xmlcontext.cxx
index 618b0ce2416d..63a10fb94b1b 100644
--- a/sc/source/filter/orcus/xmlcontext.cxx
+++ b/sc/source/filter/orcus/xmlcontext.cxx
@@ -132,7 +132,7 @@ public:
}
};
-class InsertFieldPath : std::unary_function<OString, void>
+class InsertFieldPath : public std::unary_function<OString, void>
{
orcus::orcus_xml& mrFilter;
public:
@@ -208,7 +208,7 @@ bool ScOrcusXMLContextImpl::loadXMLStructure(SvTreeListBox& rTreeCtrl, ScOrcusXM
namespace {
-class SetNamespaceAlias : std::unary_function<size_t, void>
+class SetNamespaceAlias : public std::unary_function<size_t, void>
{
orcus::orcus_xml& mrFilter;
orcus::xmlns_repository& mrNsRepo;
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 90b570327876..17fa01e642f2 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -215,7 +215,7 @@ bool hasRefsToSrcDoc(ScRangeData& rData, sal_uInt16 nFileId)
return false;
}
-class EraseRangeByIterator : unary_function<ScRangeName::iterator, void>
+class EraseRangeByIterator : public unary_function<ScRangeName::iterator, void>
{
ScRangeName& mrRanges;
public:
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index d70e518c8143..9d5b047c546e 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1245,7 +1245,7 @@ void ScUndoDragDrop::DoUndo( ScRange aRange )
namespace {
-class DataChangeNotifier : std::unary_function<SvtListener*, void>
+class DataChangeNotifier : public std::unary_function<SvtListener*, void>
{
ScHint maHint;
public:
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 8bd6ebc2b52c..fe84cf0a9dcb 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1357,7 +1357,7 @@ bool lcl_addUpperLeftCornerIfMissing(vector<ScTokenRef>& rRefTokens,
#define SHRINK_RANGE_THRESHOLD 10000
-class ShrinkRefTokenToDataRange : std::unary_function<ScTokenRef, void>
+class ShrinkRefTokenToDataRange : public std::unary_function<ScTokenRef, void>
{
ScDocument* mpDoc;
public:
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index b28a9a17b707..9264b857a4e9 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -287,7 +287,7 @@ void getChartSourceRanges(ScDocument* pDoc, const SdrMarkList& rObjs, std::vecto
}
}
-class InsertTabIndex : std::unary_function<ScRange, void>
+class InsertTabIndex : public std::unary_function<ScRange, void>
{
std::vector<SCTAB>& mrTabs;
public:
@@ -298,7 +298,7 @@ public:
}
};
-class CopyRangeData : std::unary_function<ScRange, void>
+class CopyRangeData : public std::unary_function<ScRange, void>
{
ScDocument* mpSrc;
ScDocument* mpDest;
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 57b34dd08f29..a1a84d901110 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -237,7 +237,7 @@ void ScXMLSourceDlg::HandleGetFocus(Control* pCtrl)
namespace {
-class UnhighlightEntry : std::unary_function<SvTreeListEntry*, void>
+class UnhighlightEntry : public std::unary_function<SvTreeListEntry*, void>
{
SvTreeListBox& mrTree;
public: