This is an automated email from the ASF dual-hosted git repository.
jimjag pushed a commit to branch AOO50X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO50X by this push:
new 89bd3878b6 Finish first-party C++11 callable and register cleanup
89bd3878b6 is described below
commit 89bd3878b6a6d37db2632b76027da0a66f51e5f4
Author: Jim Jagielski <[email protected]>
AuthorDate: Sat Nov 7 17:43:37 2026 -0500
Finish first-party C++11 callable and register cleanup
Correct four callable traits. Replace residual legacy function adapters and
function-object bases in first-party source, remove ordinary C++ register uses,
and refresh stale ownership comments. Native platform builds remain required
for platform-specific changes.
The desktop unordered_map include changes are left out; AOO50X still uses
hash_map there.
(cherry picked from commit e32ec1a966a7222d04c4ed2904dd376185cdeba0)
---
main/autodoc/inc/cosv/tpl/dyn.hxx | 4 ++--
main/autodoc/source/cosv/strings/streamstr.cxx | 4 ++--
main/basegfx/source/workbench/convexhull.cxx | 5 ++++-
main/canvas/source/directx/dx_spritecanvashelper.cxx | 8 ++++----
.../controller/accessibility/AccessibleChartElement.cxx | 2 +-
main/chart2/source/inc/CloneHelper.hxx | 6 +++---
main/chart2/source/inc/CommonFunctors.hxx | 12 +++++++++---
main/chart2/source/inc/DisposeHelper.hxx | 8 ++++++--
main/chart2/source/inc/EventListenerHelper.hxx | 8 ++++++--
main/codemaker/source/bonobowrappermaker/corbatype.hxx | 4 +++-
main/configmgr/source/setnode.cxx | 3 +--
main/connectivity/source/drivers/ado/AColumn.cxx | 15 ++++++---------
main/connectivity/source/drivers/ado/AColumns.cxx | 14 +++++---------
main/connectivity/source/drivers/ado/AConnection.cxx | 13 +++++--------
main/dbaccess/source/ui/app/AppController.hxx | 2 +-
main/editeng/inc/editeng/AccessibleStaticTextBase.hxx | 2 +-
main/extensions/source/propctrlr/stlops.hxx | 14 ++++++--------
main/forms/source/inc/componenttools.hxx | 5 ++++-
main/forms/source/inc/property.hxx | 6 ++++--
main/fpicker/source/unx/gnome/SalGtkFilePicker.cxx | 4 +++-
main/reportdesign/inc/UndoActions.hxx | 4 ++--
main/sal/osl/w32/procimpl.cxx | 6 ++++--
main/sal/qa/osl/file/osl_File.cxx | 6 +++---
main/sal/qa/osl/process/osl_process.cxx | 4 +++-
main/sal/rtl/source/alloc_impl.h | 4 ++--
main/sc/source/core/tool/chartlis.cxx | 1 -
main/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx | 4 ++--
main/sc/source/ui/Accessibility/AccessibleText.cxx | 4 ++--
main/sc/source/ui/docshell/externalrefmgr.cxx | 5 ++---
main/sc/source/ui/unoobj/chart2uno.cxx | 1 -
main/sd/source/ui/inc/tools/AsynchronousCall.hxx | 2 +-
main/sdext/source/pdfimport/wrapper/hash.cxx | 8 ++++----
main/shell/source/all/zipfile/zipfile.cxx | 4 +++-
.../source/unix/sysshell/recently_used_file_handler.cxx | 10 +++++++---
main/svl/inc/svl/urlfilter.hxx | 4 ++--
main/svx/inc/svx/AccessibleTextHelper.hxx | 2 +-
main/sw/source/core/unocore/unochart.cxx | 2 +-
main/sw/source/filter/ww8/dump/ww8scan.cxx | 5 +++--
main/sw/source/filter/ww8/styles.cxx | 1 -
main/sw/source/filter/ww8/writerhelper.cxx | 1 -
main/sw/source/filter/ww8/writerwordglue.cxx | 1 -
main/ucb/source/ucp/odma/odma_contentprops.hxx | 14 +++++++-------
main/ucb/source/ucp/odma/odma_provider.cxx | 15 +++++++--------
main/vcl/unx/generic/printer/cupsmgr.cxx | 5 ++++-
main/vcl/unx/generic/printergfx/printerjob.cxx | 5 ++++-
main/xmloff/source/chart/SchXMLExport.cxx | 2 +-
main/xmloff/source/core/RDFaImportHelper.cxx | 13 +++----------
47 files changed, 144 insertions(+), 128 deletions(-)
diff --git a/main/autodoc/inc/cosv/tpl/dyn.hxx
b/main/autodoc/inc/cosv/tpl/dyn.hxx
index ca5b7c695d..ab81d3b9c9 100644
--- a/main/autodoc/inc/cosv/tpl/dyn.hxx
+++ b/main/autodoc/inc/cosv/tpl/dyn.hxx
@@ -47,8 +47,8 @@ namespace csv
You only need to write
class DX;
but needn't include #include <DX>.hxx.
- This is a difference to std::auto_ptr, where it is not absolutely clear
- if it is allowed to use it with incomplete types.
+ Unlike some historical standard-library ownership types, Dyn's support for
+ incomplete types is explicit.
You can also use Dyn within function bodies, to make them exception safe.
diff --git a/main/autodoc/source/cosv/strings/streamstr.cxx
b/main/autodoc/source/cosv/strings/streamstr.cxx
index a5797d2a10..4a6eefdf90 100644
--- a/main/autodoc/source/cosv/strings/streamstr.cxx
+++ b/main/autodoc/source/cosv/strings/streamstr.cxx
@@ -911,8 +911,8 @@ StreamStr::MoveData( char * i_pStart,
{
if (i_nDiff > 0)
{
- register const char * pSrc = i_pEnd;
- register char * pDest = i_pEnd + i_nDiff;
+ const char * pSrc = i_pEnd;
+ char * pDest = i_pEnd + i_nDiff;
for ( ; pSrc != i_pStart; --pSrc, --pDest )
{
*pDest = *pSrc;
diff --git a/main/basegfx/source/workbench/convexhull.cxx
b/main/basegfx/source/workbench/convexhull.cxx
index 21c8d7b0e6..a6971a8fa8 100644
--- a/main/basegfx/source/workbench/convexhull.cxx
+++ b/main/basegfx/source/workbench/convexhull.cxx
@@ -52,9 +52,12 @@ template <class PointType> double theta( const PointType&
p1, const PointType& p
/* Model of LessThanComparable for theta sort.
* Uses the theta function from Sedgewick: Algorithms in XXX, chapter 24
*/
-template <class PointType> class ThetaCompare : public ::std::binary_function<
const PointType&, const PointType&, bool >
+template <class PointType> class ThetaCompare
{
public:
+ typedef const PointType& first_argument_type;
+ typedef const PointType& second_argument_type;
+ typedef bool result_type;
ThetaCompare( const PointType& rRefPoint ) : maRefPoint( rRefPoint ) {}
bool operator() ( const PointType& p1, const PointType& p2 )
diff --git a/main/canvas/source/directx/dx_spritecanvashelper.cxx
b/main/canvas/source/directx/dx_spritecanvashelper.cxx
index 86652909e2..8fe4c95fa9 100644
--- a/main/canvas/source/directx/dx_spritecanvashelper.cxx
+++ b/main/canvas/source/directx/dx_spritecanvashelper.cxx
@@ -241,7 +241,7 @@ namespace dxcanvas
mpBackBuffer->draw(aUpdateArea);
// redraw sprites
- mpRedrawManager->forEachSprite(::std::ptr_fun(
&spriteRedraw ) );
+ mpRedrawManager->forEachSprite( &spriteRedraw );
// flip primary surface to screen
// ==============================
@@ -296,7 +296,7 @@ namespace dxcanvas
// are avoided.
::std::for_each( rUpdateArea.maComponentList.begin(),
rUpdateArea.maComponentList.end(),
- ::std::ptr_fun( &spriteRedrawStub2 ) );
+ &spriteRedrawStub2 );
// repaint uncovered areas from backbuffer - take the
// _rounded_ rectangles from above, to have the update
@@ -334,7 +334,7 @@ namespace dxcanvas
// buffer.
::std::for_each( rSortedUpdateSprites.begin(),
rSortedUpdateSprites.end(),
- ::std::ptr_fun( &spriteRedrawStub ) );
+ &spriteRedrawStub );
// TODO(E1): Use numeric_cast to catch overflow here
::basegfx::B2IRange aActualArea( 0, 0,
@@ -370,7 +370,7 @@ namespace dxcanvas
::std::for_each( rSortedUpdateSprites.begin(),
rSortedUpdateSprites.end(),
- ::std::ptr_fun( &spriteRedrawStub ) );
+ &spriteRedrawStub );
// add given update area to the 'blit to foreground' rect
maUpdateRect.expand( aActualArea );
diff --git
a/main/chart2/source/controller/accessibility/AccessibleChartElement.cxx
b/main/chart2/source/controller/accessibility/AccessibleChartElement.cxx
index 7c7ff2f8d4..aa524455f5 100644
--- a/main/chart2/source/controller/accessibility/AccessibleChartElement.cxx
+++ b/main/chart2/source/controller/accessibility/AccessibleChartElement.cxx
@@ -158,7 +158,7 @@ void AccessibleChartElement::InitTextEdit()
// {
// SvxEditSource * pEditSource = new SvxEditSource( pTextObj,
pView, pWindow );
// m_pTextHelper = new ::accessibility::AccessibleTextHelper(
-// ::std::auto_ptr< SvxEditSource >( pEditSource ));
+// ::std::unique_ptr< SvxEditSource >( pEditSource ));
// if( m_pTextHelper )
// m_pTextHelper->SetEventSource( this );
// }
diff --git a/main/chart2/source/inc/CloneHelper.hxx
b/main/chart2/source/inc/CloneHelper.hxx
index 58449ab6da..69247ef2e5 100644
--- a/main/chart2/source/inc/CloneHelper.hxx
+++ b/main/chart2/source/inc/CloneHelper.hxx
@@ -58,10 +58,10 @@ template< class Interface >
/// functor that clones a map element with a UNO-Reference as value
template< typename Key, class Interface >
- struct CreateRefWithKeyClone : public ::std::unary_function<
- ::std::pair< Key, Interface >,
- ::std::pair< Key, Interface > >
+ struct CreateRefWithKeyClone
{
+ typedef ::std::pair< Key, Interface > argument_type;
+ typedef ::std::pair< Key, Interface > result_type;
::std::pair< Key, Interface > operator() (
const ::std::pair< Key, Interface > & rOther )
{
diff --git a/main/chart2/source/inc/CommonFunctors.hxx
b/main/chart2/source/inc/CommonFunctors.hxx
index c0e9935bbd..b00aebc1f0 100644
--- a/main/chart2/source/inc/CommonFunctors.hxx
+++ b/main/chart2/source/inc/CommonFunctors.hxx
@@ -154,9 +154,11 @@ struct OOO_DLLPUBLIC_CHARTTOOLS DoubleToOUString
vector of pairs (for searching keys in maps you will of course use
map::find)
*/
template< typename First, typename Second >
- class FirstOfPairEquals : public ::std::unary_function< ::std::pair<
First, Second >, bool >
+ class FirstOfPairEquals
{
public:
+ typedef ::std::pair< First, Second > argument_type;
+ typedef bool result_type;
FirstOfPairEquals( const First & aVal )
: m_aValueToCompareWith( aVal )
{}
@@ -175,9 +177,11 @@ private:
SecondOfPairEquals< string, int >( 42 ));
*/
template< typename Key, typename Value >
- class SecondOfPairEquals : public ::std::unary_function< ::std::pair< Key,
Value >, bool >
+ class SecondOfPairEquals
{
public:
+ typedef ::std::pair< Key, Value > argument_type;
+ typedef bool result_type;
SecondOfPairEquals( const Value & aVal )
: m_aValueToCompareWith( aVal )
{}
@@ -210,8 +214,10 @@ template< class MapType >
delete operator
*/
template< typename T >
- struct DeletePtr : public ::std::unary_function< T *, void >
+ struct DeletePtr
{
+ typedef T * argument_type;
+ typedef void result_type;
void operator() ( T * pObj )
{ delete pObj; }
};
diff --git a/main/chart2/source/inc/DisposeHelper.hxx
b/main/chart2/source/inc/DisposeHelper.hxx
index 884865859e..9aea1d5f4b 100644
--- a/main/chart2/source/inc/DisposeHelper.hxx
+++ b/main/chart2/source/inc/DisposeHelper.hxx
@@ -63,8 +63,10 @@ template< class T >
};
template< typename T >
- struct DisposeFirstOfPairFunctor : public ::std::unary_function< T, void >
+ struct DisposeFirstOfPairFunctor
{
+ typedef T argument_type;
+ typedef void result_type;
void operator() ( const T & rElem )
{
Dispose< typename T::first_type >( rElem.first );
@@ -72,8 +74,10 @@ template< typename T >
};
template< typename T >
- struct DisposeSecondOfPairFunctor : public ::std::unary_function< T, void >
+ struct DisposeSecondOfPairFunctor
{
+ typedef T argument_type;
+ typedef void result_type;
void operator() ( const T & rElem )
{
Dispose< typename T::second_type >( rElem.second );
diff --git a/main/chart2/source/inc/EventListenerHelper.hxx
b/main/chart2/source/inc/EventListenerHelper.hxx
index b92926d3dc..312110c11b 100644
--- a/main/chart2/source/inc/EventListenerHelper.hxx
+++ b/main/chart2/source/inc/EventListenerHelper.hxx
@@ -82,8 +82,10 @@ private:
};
template< class Pair >
-struct addListenerToMappedElementFunctor : public ::std::unary_function< Pair,
void >
+struct addListenerToMappedElementFunctor
{
+ typedef Pair argument_type;
+ typedef void result_type;
explicit addListenerToMappedElementFunctor( const
::com::sun::star::uno::Reference<
::com::sun::star::lang::XEventListener > & xListener ) :
m_xListener( xListener )
@@ -101,8 +103,10 @@ private:
};
template< class Pair >
-struct removeListenerFromMappedElementFunctor : public ::std::unary_function<
Pair, void >
+struct removeListenerFromMappedElementFunctor
{
+ typedef Pair argument_type;
+ typedef void result_type;
explicit removeListenerFromMappedElementFunctor( const
::com::sun::star::uno::Reference<
::com::sun::star::lang::XEventListener > & xListener ) :
m_xListener( xListener )
diff --git a/main/codemaker/source/bonobowrappermaker/corbatype.hxx
b/main/codemaker/source/bonobowrappermaker/corbatype.hxx
index c788a73388..2e010d77bc 100644
--- a/main/codemaker/source/bonobowrappermaker/corbatype.hxx
+++ b/main/codemaker/source/bonobowrappermaker/corbatype.hxx
@@ -60,8 +60,10 @@ struct OStringEqual
{ return lhs.equals( rhs );}
};
-struct OStringHash : public std::unary_function< const ::rtl::OString &,
size_t >
+struct OStringHash
{
+ typedef const ::rtl::OString & argument_type;
+ typedef size_t result_type;
size_t operator()( const ::rtl::OString & rStr ) const
{ return rStr.hashCode(); }
};
diff --git a/main/configmgr/source/setnode.cxx
b/main/configmgr/source/setnode.cxx
index 93a868f78e..2068fdc191 100644
--- a/main/configmgr/source/setnode.cxx
+++ b/main/configmgr/source/setnode.cxx
@@ -40,8 +40,7 @@ namespace configmgr {
namespace {
-// Work around some compilers' failure to accept
-// std::binder1st(std::ptr_fun(&Data::equalTemplateNames), ...):
+// Predicate that binds the short name for Data::equalTemplateNames.
class EqualTemplateNames
{
public:
diff --git a/main/connectivity/source/drivers/ado/AColumn.cxx
b/main/connectivity/source/drivers/ado/AColumn.cxx
index ae08b1b2e7..ae1786577e 100644
--- a/main/connectivity/source/drivers/ado/AColumn.cxx
+++ b/main/connectivity/source/drivers/ado/AColumn.cxx
@@ -222,15 +222,12 @@ void OAdoColumn::fillPropertyValues()
{
::comphelper::TStringMixEqualFunctor aCase(sal_False);
OTypeInfoMap::const_iterator aFind =
::std::find_if(pTypeInfoMap->begin(),
-
pTypeInfoMap->end(),
-
::std::compose1(
-
::std::bind2nd(aCase,
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VarBinary"))),
-
::std::compose1(
-
::std::mem_fun(&OExtendedTypeInfo::getDBName),
-
::std::select2nd<OTypeInfoMap::value_type>())
-
)
-
-
);
+
pTypeInfoMap->end(),
+
[&aCase](const OTypeInfoMap::value_type& rTypeInfo) {
+
return aCase(rTypeInfo.second->getDBName(),
+
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VarBinary")));
+
}
+
);
if ( aFind != pTypeInfoMap->end() ) // change column
type if necessary
{
diff --git a/main/connectivity/source/drivers/ado/AColumns.cxx
b/main/connectivity/source/drivers/ado/AColumns.cxx
index a47bd062ae..f740215f86 100644
--- a/main/connectivity/source/drivers/ado/AColumns.cxx
+++ b/main/connectivity/source/drivers/ado/AColumns.cxx
@@ -93,15 +93,11 @@ sdbcx::ObjectType OColumns::appendObject( const
::rtl::OUString&, const Referenc
::comphelper::TStringMixEqualFunctor aCase(sal_False);
// search for typeinfo where the typename is equal sTypeName
OTypeInfoMap::const_iterator aFind =
::std::find_if(pTypeInfoMap->begin(),
-
pTypeInfoMap->end(),
-
::std::compose1(
-
::std::bind2nd(aCase, sTypeName),
-
::std::compose1(
-
::std::mem_fun(&OExtendedTypeInfo::getDBName),
-
::std::select2nd<OTypeInfoMap::value_type>())
-
)
-
-
);
+
pTypeInfoMap->end(),
+
[&aCase, &sTypeName](const OTypeInfoMap::value_type& rTypeInfo)
{
+
return aCase(rTypeInfo.second->getDBName(), sTypeName);
+
}
+
);
if ( aFind != pTypeInfoMap->end() ) // change column type if necessary
aColumn.put_Type(aFind->first);
diff --git a/main/connectivity/source/drivers/ado/AConnection.cxx
b/main/connectivity/source/drivers/ado/AConnection.cxx
index a326456dbe..407941492e 100644
--- a/main/connectivity/source/drivers/ado/AConnection.cxx
+++ b/main/connectivity/source/drivers/ado/AConnection.cxx
@@ -604,14 +604,11 @@ const OExtendedTypeInfo*
OConnection::getTypeInfoFromType(const OTypeInfoMap& _r
::comphelper::TStringMixEqualFunctor aCase(sal_False);
// search for typeinfo where the typename is equal _sTypeName
OTypeInfoMap::const_iterator aFind =
::std::find_if(_rTypeInfo.begin(),
-
_rTypeInfo.end(),
-
::std::compose1(
-
::std::bind2nd(aCase,
_sTypeName),
-
::std::compose1(
-
::std::mem_fun(&OExtendedTypeInfo::getDBName),
-
::std::select2nd<OTypeInfoMap::value_type>())
-
)
-
);
+
_rTypeInfo.end(),
+
[&aCase, &_sTypeName](const OTypeInfoMap::value_type&
rTypeInfo) {
+
return aCase(rTypeInfo.second->getDBName(),
_sTypeName);
+
}
+
);
if(aFind != _rTypeInfo.end())
pTypeInfo = aFind->second;
}
diff --git a/main/dbaccess/source/ui/app/AppController.hxx
b/main/dbaccess/source/ui/app/AppController.hxx
index ecc872683a..f4f3ea4f33 100644
--- a/main/dbaccess/source/ui/app/AppController.hxx
+++ b/main/dbaccess/source/ui/app/AppController.hxx
@@ -257,7 +257,7 @@ namespace dbaui
/** returns the document access for the specific type
@param _eType
the type
- @return ::std::auto_ptr<OLinkedDocumentsAccess>
+ @return ::std::unique_ptr<OLinkedDocumentsAccess>
*/
::std::unique_ptr<OLinkedDocumentsAccess>
getDocumentsAccess(ElementType _eType);
diff --git a/main/editeng/inc/editeng/AccessibleStaticTextBase.hxx
b/main/editeng/inc/editeng/AccessibleStaticTextBase.hxx
index 98722075a7..44aea4679e 100644
--- a/main/editeng/inc/editeng/AccessibleStaticTextBase.hxx
+++ b/main/editeng/inc/editeng/AccessibleStaticTextBase.hxx
@@ -146,7 +146,7 @@ namespace accessibility
This class does not have a dispose method, since it is not
a UNO component. Nevertheless, it holds C++ references to
several core objects, so you should issue a
- SetEditSource(::std::auto_ptr<SvxEditSource>(NULL)) in
+ SetEditSource(::std::unique_ptr<SvxEditSource>()) in
your dispose() method.
@param pEditSource
diff --git a/main/extensions/source/propctrlr/stlops.hxx
b/main/extensions/source/propctrlr/stlops.hxx
index 5f39b603d6..78fee98594 100644
--- a/main/extensions/source/propctrlr/stlops.hxx
+++ b/main/extensions/source/propctrlr/stlops.hxx
@@ -34,11 +34,10 @@ namespace pcr
//========================================================================
struct PropertyLessByName
- :public ::std::binary_function <
::com::sun::star::beans::Property,
-
::com::sun::star::beans::Property,
-
bool
-
>
{
+ typedef ::com::sun::star::beans::Property first_argument_type;
+ typedef ::com::sun::star::beans::Property second_argument_type;
+ typedef bool result_type;
bool operator() (::com::sun::star::beans::Property _rLhs,
::com::sun::star::beans::Property _rRhs) const
{
return _rLhs.Name < _rRhs.Name ? true : false;
@@ -47,11 +46,10 @@ namespace pcr
//========================================================================
struct TypeLessByName
- :public ::std::binary_function <
::com::sun::star::uno::Type,
-
::com::sun::star::uno::Type,
-
bool
-
>
{
+ typedef ::com::sun::star::uno::Type first_argument_type;
+ typedef ::com::sun::star::uno::Type second_argument_type;
+ typedef bool result_type;
bool operator() (::com::sun::star::uno::Type _rLhs,
::com::sun::star::uno::Type _rRhs) const
{
return _rLhs.getTypeName() < _rRhs.getTypeName() ? true
: false;
diff --git a/main/forms/source/inc/componenttools.hxx
b/main/forms/source/inc/componenttools.hxx
index 825ac175b7..3d9b3b08a9 100644
--- a/main/forms/source/inc/componenttools.hxx
+++ b/main/forms/source/inc/componenttools.hxx
@@ -38,12 +38,15 @@ namespace frm
{
//........................................................................
- struct TypeCompareLess : public ::std::binary_function<
::com::sun::star::uno::Type, ::com::sun::star::uno::Type, bool >
+ struct TypeCompareLess
{
private:
typedef ::com::sun::star::uno::Type Type;
public:
+ typedef Type first_argument_type;
+ typedef Type second_argument_type;
+ typedef bool result_type;
bool operator()( const Type& _rLHS, const Type& _rRHS ) const
{
return _rLHS.getTypeName() < _rRHS.getTypeName();
diff --git a/main/forms/source/inc/property.hxx
b/main/forms/source/inc/property.hxx
index aec137486f..265b271845 100644
--- a/main/forms/source/inc/property.hxx
+++ b/main/forms/source/inc/property.hxx
@@ -76,9 +76,11 @@ public:
// public typedef
private:
friend struct PropertyAssignmentNameCompareLess;
- typedef ::std::binary_function< PUBLIC_SOLARIS_COMPILER_HACK,
PUBLIC_SOLARIS_COMPILER_HACK, sal_Bool > PropertyAssignmentNameCompareLess_Base;
- struct PropertyAssignmentNameCompareLess : public
PropertyAssignmentNameCompareLess_Base
+ struct PropertyAssignmentNameCompareLess
{
+ typedef PUBLIC_SOLARIS_COMPILER_HACK first_argument_type;
+ typedef PUBLIC_SOLARIS_COMPILER_HACK second_argument_type;
+ typedef sal_Bool result_type;
inline sal_Bool operator() (const PUBLIC_SOLARIS_COMPILER_HACK&
_rL, const PUBLIC_SOLARIS_COMPILER_HACK& _rR) const
{
return (_rL.sName.compareTo(_rR.sName) < 0);
diff --git a/main/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
b/main/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
index c29e6f030f..2219334758 100644
--- a/main/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
+++ b/main/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
@@ -572,12 +572,14 @@ dialog_remove_buttons( GtkDialog *pDialog )
//------------------------------------------------------------------------------------
namespace {
//................................................................................
- struct FilterTitleMatch : public ::std::unary_function< FilterEntry,
bool >
+ struct FilterTitleMatch
{
protected:
const ::rtl::OUString& rTitle;
public:
+ typedef FilterEntry argument_type;
+ typedef bool result_type;
FilterTitleMatch( const ::rtl::OUString& _rTitle ) : rTitle(
_rTitle ) { }
//............................................................................
diff --git a/main/reportdesign/inc/UndoActions.hxx
b/main/reportdesign/inc/UndoActions.hxx
index 7984abbd05..d34a09330e 100644
--- a/main/reportdesign/inc/UndoActions.hxx
+++ b/main/reportdesign/inc/UndoActions.hxx
@@ -71,7 +71,7 @@ namespace rptui
Removed = 2
};
- /** Helper class to allow std::mem_fun for SAL_CALL
+ /** Helper class to adapt SAL_CALL member functions
*/
class REPORTDESIGN_DLLPUBLIC OGroupHelper
{
@@ -95,7 +95,7 @@ namespace rptui
};
typedef com::sun::star::uno::Reference<
::com::sun::star::report::XSection > TSection;
- /** Helper class to allow std::mem_fun for SAL_CALL
+ /** Helper class to adapt SAL_CALL member functions
*/
class REPORTDESIGN_DLLPUBLIC OReportHelper
{
diff --git a/main/sal/osl/w32/procimpl.cxx b/main/sal/osl/w32/procimpl.cxx
index f2252d4c3e..1222652cd5 100644
--- a/main/sal/osl/w32/procimpl.cxx
+++ b/main/sal/osl/w32/procimpl.cxx
@@ -75,9 +75,11 @@ namespace /* private */
The comparison is in upper case and returns true
if the first of both strings is less than the
second one. */
- struct less_environment_variable :
- public std::binary_function<rtl::OUString, rtl::OUString, bool>
+ struct less_environment_variable
{
+ typedef rtl::OUString first_argument_type;
+ typedef rtl::OUString second_argument_type;
+ typedef bool result_type;
bool operator() (const rtl::OUString& lhs, const rtl::OUString& rhs)
const
{
OSL_ENSURE((lhs.indexOf(NAME_VALUE_SEPARATOR) > -1) && \
diff --git a/main/sal/qa/osl/file/osl_File.cxx
b/main/sal/qa/osl/file/osl_File.cxx
index 34660cf92b..6a2a42fe23 100644
--- a/main/sal/qa/osl/file/osl_File.cxx
+++ b/main/sal/qa/osl/file/osl_File.cxx
@@ -377,7 +377,7 @@ inline void createTestFile( const ::rtl::OUString filename )
if ( !isURL( filename ) )
::osl::FileBase::getFileURLFromSystemPath( filename, aPathURL
); //convert if not full qualified URL
- //::std::auto_ptr<File> pFile( new File( aPathURL ) );
+ //::std::unique_ptr<File> pFile( new File( aPathURL ) );
File aFile(aPathURL);
//nError = pFile->open( OpenFlag_Read | OpenFlag_Write |
OpenFlag_Create );
nError = aFile.open( OpenFlag_Read | OpenFlag_Write | OpenFlag_Create );
@@ -617,7 +617,7 @@ inline sal_Bool checkDirectory( const ::rtl::OUString &
str, oslCheckMode nCheck
FileBase::RC rc;
sal_Bool bCheckResult= sal_False;
- //::std::auto_ptr<Directory> pDir( new Directory( str ) );
+ //::std::unique_ptr<Directory> pDir( new Directory( str ) );
Directory aDir( str );
rc = aDir.open( );
@@ -2555,7 +2555,7 @@ namespace osl_FileStatus
createTestFile( aTmpName4 );
pDir = new Directory( aTmpName3 );
- //::std::auto_ptr<Directory> pDir( new Directory(
aTmpName3 ) );
+ //::std::unique_ptr<Directory> pDir( new Directory(
aTmpName3 ) );
::osl::FileBase::RC nError1 = pDir->open( );
ASSERT_TRUE( ::osl::FileBase::E_None == nError1 );
nError1 = pDir->getNextItem( rItem_file, 1 );
diff --git a/main/sal/qa/osl/process/osl_process.cxx
b/main/sal/qa/osl/process/osl_process.cxx
index bbd43e5ca8..94ab0daf6f 100644
--- a/main/sal/qa/osl/process/osl_process.cxx
+++ b/main/sal/qa/osl/process/osl_process.cxx
@@ -255,9 +255,11 @@ typedef string_container_t::const_iterator
string_container_const_iter_t;
typedef string_container_t::iterator string_container_iter_t;
//#########################################################
-class exclude : public std::unary_function<std::string, bool>
+class exclude
{
public:
+ typedef std::string argument_type;
+ typedef bool result_type;
//------------------------------------------------
exclude(const string_container_t& exclude_list)
{
diff --git a/main/sal/rtl/source/alloc_impl.h b/main/sal/rtl/source/alloc_impl.h
index 16df48ebf8..e511676ea6 100644
--- a/main/sal/rtl/source/alloc_impl.h
+++ b/main/sal/rtl/source/alloc_impl.h
@@ -99,7 +99,7 @@ extern "C" {
static RTL_MEMORY_INLINE int
highbit(sal_Size n)
{
- register int k = 1;
+ int k = 1;
if (n == 0)
return (0);
@@ -132,7 +132,7 @@ highbit(sal_Size n)
static RTL_MEMORY_INLINE int
lowbit(sal_Size n)
{
- register int k = 1;
+ int k = 1;
if (n == 0)
return (0);
diff --git a/main/sc/source/core/tool/chartlis.cxx
b/main/sc/source/core/tool/chartlis.cxx
index 5091609bd2..71b257bbb1 100644
--- a/main/sc/source/core/tool/chartlis.cxx
+++ b/main/sc/source/core/tool/chartlis.cxx
@@ -38,7 +38,6 @@ using ::std::vector;
using ::std::list;
using ::std::hash_set;
using ::std::unique_ptr;
-using ::std::unary_function;
using ::std::for_each;
//TODO: DocOption TimeOut?
diff --git a/main/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx
b/main/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx
index 12a75be69c..d9b10a6760 100644
--- a/main/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx
+++ b/main/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx
@@ -67,8 +67,8 @@ namespace {
class AddRemoveEventListener
{
public:
- typedef void argument_type;
- typedef Reference<XAccessible> result_type;
+ typedef Reference<XAccessible> argument_type;
+ typedef void result_type;
explicit AddRemoveEventListener(const Reference<XAccessibleEventListener>&
rListener, bool bAdd) :
mxListener(rListener), mbAdd(bAdd) {}
diff --git a/main/sc/source/ui/Accessibility/AccessibleText.cxx
b/main/sc/source/ui/Accessibility/AccessibleText.cxx
index 1279261bb1..4f713de514 100644
--- a/main/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/main/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -1412,7 +1412,7 @@ SvxViewForwarder*
ScAccessiblePreviewCellTextData::GetViewForwarder()
//UNUSED2008-05 {
//UNUSED2008-05 if( aNotify )
//UNUSED2008-05 {
-//UNUSED2008-05 ::std::auto_ptr< SfxHint > aHint =
SvxEditSourceHelper::EENotification2Hint( aNotify);
+//UNUSED2008-05 ::std::unique_ptr< SfxHint > aHint =
SvxEditSourceHelper::EENotification2Hint( aNotify);
//UNUSED2008-05
//UNUSED2008-05 if( aHint.get() )
//UNUSED2008-05 GetBroadcaster().Broadcast( *aHint.get() );
@@ -1540,7 +1540,7 @@ SvxViewForwarder*
ScAccessiblePreviewHeaderCellTextData::GetViewForwarder()
//UNUSED2008-05 {
//UNUSED2008-05 if( aNotify )
//UNUSED2008-05 {
-//UNUSED2008-05 ::std::auto_ptr< SfxHint > aHint =
SvxEditSourceHelper::EENotification2Hint( aNotify);
+//UNUSED2008-05 ::std::unique_ptr< SfxHint > aHint =
SvxEditSourceHelper::EENotification2Hint( aNotify);
//UNUSED2008-05
//UNUSED2008-05 if( aHint.get() )
//UNUSED2008-05 GetBroadcaster().Broadcast( *aHint.get() );
diff --git a/main/sc/source/ui/docshell/externalrefmgr.cxx
b/main/sc/source/ui/docshell/externalrefmgr.cxx
index 3919169f00..27a818a959 100644
--- a/main/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/main/sc/source/ui/docshell/externalrefmgr.cxx
@@ -74,7 +74,6 @@ using ::std::for_each;
using ::std::distance;
using ::std::pair;
using ::std::list;
-using ::std::unary_function;
using namespace formula;
#define SRCDOC_LIFE_SPAN 6000 // 1 minute (in 100th of a sec)
@@ -85,8 +84,8 @@ namespace {
class TabNameSearchPredicate
{
public:
- typedef bool argument_type;
- typedef ScExternalRefCache::TableName result_type;
+ typedef ScExternalRefCache::TableName argument_type;
+ typedef bool result_type;
explicit TabNameSearchPredicate(const String& rSearchName) :
maSearchName(ScGlobal::pCharClass->upper(rSearchName))
{
diff --git a/main/sc/source/ui/unoobj/chart2uno.cxx
b/main/sc/source/ui/unoobj/chart2uno.cxx
index 0056d2264c..2f0c9aa433 100644
--- a/main/sc/source/ui/unoobj/chart2uno.cxx
+++ b/main/sc/source/ui/unoobj/chart2uno.cxx
@@ -75,7 +75,6 @@ using ::std::unique_ptr;
using ::std::vector;
using ::std::list;
using ::std::distance;
-using ::std::unary_function;
using ::std::hash_set;
using ::boost::shared_ptr;
diff --git a/main/sd/source/ui/inc/tools/AsynchronousCall.hxx
b/main/sd/source/ui/inc/tools/AsynchronousCall.hxx
index 0944310028..e23cc2062e 100644
--- a/main/sd/source/ui/inc/tools/AsynchronousCall.hxx
+++ b/main/sd/source/ui/inc/tools/AsynchronousCall.hxx
@@ -43,7 +43,7 @@ namespace sd { namespace tools {
Use this class like this:
aInstanceOfAsynchronousCall.Post(
::boost::bind(
- ::std::mem_fun(&DrawViewShell::SwitchPage),
+ &DrawViewShell::SwitchPage,
pDrawViewShell,
11));
*/
diff --git a/main/sdext/source/pdfimport/wrapper/hash.cxx
b/main/sdext/source/pdfimport/wrapper/hash.cxx
index 633da17b12..4ef48eb240 100644
--- a/main/sdext/source/pdfimport/wrapper/hash.cxx
+++ b/main/sdext/source/pdfimport/wrapper/hash.cxx
@@ -73,7 +73,7 @@ public:
};
inline unsigned int
-PdfKeywordHash::hash (register const char *str, register unsigned int len)
+PdfKeywordHash::hash (const char *str, unsigned int len)
{
static const unsigned char asso_values[] =
{
@@ -108,7 +108,7 @@ PdfKeywordHash::hash (register const char *str, register
unsigned int len)
}
const struct hash_entry *
-PdfKeywordHash::in_word_set (register const char *str, register unsigned int
len)
+PdfKeywordHash::in_word_set (const char *str, unsigned int len)
{
static const unsigned char lengthtable[] =
{
@@ -220,12 +220,12 @@ PdfKeywordHash::in_word_set (register const char *str,
register unsigned int len
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
- register int key = hash (str, len);
+ int key = hash (str, len);
if (key <= MAX_HASH_VALUE && key >= 0)
if (len == lengthtable[key])
{
- register const char *s = wordlist[key].name;
+ const char *s = wordlist[key].name;
if (*str == *s && !memcmp (str + 1, s + 1, len - 1))
return &wordlist[key];
diff --git a/main/shell/source/all/zipfile/zipfile.cxx
b/main/shell/source/all/zipfile/zipfile.cxx
index 41d190bcd3..75192ae651 100644
--- a/main/shell/source/all/zipfile/zipfile.cxx
+++ b/main/shell/source/all/zipfile/zipfile.cxx
@@ -42,8 +42,10 @@
namespace internal
{
/* for case in-sensitive string comparison */
- struct stricmp : public std::unary_function<std::string, bool>
+ struct stricmp
{
+ typedef std::string argument_type;
+ typedef bool result_type;
stricmp(const std::string& str) : str_(str)
{}
diff --git a/main/shell/source/unix/sysshell/recently_used_file_handler.cxx
b/main/shell/source/unix/sysshell/recently_used_file_handler.cxx
index a9b6b012cf..98300c1bf5 100644
--- a/main/shell/source/unix/sysshell/recently_used_file_handler.cxx
+++ b/main/shell/source/unix/sysshell/recently_used_file_handler.cxx
@@ -59,9 +59,11 @@ namespace /* private */ {
// compare two string_t's case insensitive, may also be done
// by specifying special traits for the string type but in this
// case it's easier to do it this way
- struct str_icase_cmp :
- public std::binary_function<string_t, string_t, bool>
+ struct str_icase_cmp
{
+ typedef string_t first_argument_type;
+ typedef string_t second_argument_type;
+ typedef bool result_type;
bool operator() (const string_t& s1, const string_t& s2) const
{ return (0 == strcasecmp(s1.c_str(), s2.c_str())); }
};
@@ -121,7 +123,9 @@ namespace /* private */ {
return (has_groups() &&
iter_end != std::find_if(
groups_.begin(), iter_end,
- std::bind2nd(str_icase_cmp(), name)));
+ [&name](const string_t& group) {
+ return str_icase_cmp()(group, name);
+ }));
}
void write_xml(const recently_used_file& file) const
diff --git a/main/svl/inc/svl/urlfilter.hxx b/main/svl/inc/svl/urlfilter.hxx
index 5291b19a5e..85eb5e0101 100644
--- a/main/svl/inc/svl/urlfilter.hxx
+++ b/main/svl/inc/svl/urlfilter.hxx
@@ -43,8 +43,8 @@ inline IUrlFilter::~IUrlFilter() {}
struct FilterMatch
{
- typedef bool argument_type;
- typedef WildCard result_type;
+ typedef WildCard argument_type;
+ typedef bool result_type;
private:
const String& m_rCompareString;
public:
diff --git a/main/svx/inc/svx/AccessibleTextHelper.hxx
b/main/svx/inc/svx/AccessibleTextHelper.hxx
index 819bc14b68..29a636a5ce 100644
--- a/main/svx/inc/svx/AccessibleTextHelper.hxx
+++ b/main/svx/inc/svx/AccessibleTextHelper.hxx
@@ -182,7 +182,7 @@ namespace accessibility
This class does not have a dispose method, since it is not
a UNO component. Nevertheless, it holds C++ references to
several core objects, so you should issue a
- SetEditSource(::std::auto_ptr<SvxEditSource>(NULL)) in
+ SetEditSource(::std::unique_ptr<SvxEditSource>()) in
your dispose() method.
@param pEditSource
diff --git a/main/sw/source/core/unocore/unochart.cxx
b/main/sw/source/core/unocore/unochart.cxx
index 4cacf67d15..c5589c6400 100644
--- a/main/sw/source/core/unocore/unochart.cxx
+++ b/main/sw/source/core/unocore/unochart.cxx
@@ -1848,7 +1848,7 @@ rtl::OUString SAL_CALL
SwChartDataProvider::convertRangeToXML( const rtl::OUStri
SwFrmFmt *pTblFmt = 0; // pointer to table format
// BM: For what should the check be necessary? for #i79009# it is
required that NO check is done
// SwUnoCrsr *pUnoCrsr = 0; // here required to check if the
cells in the range do actually exist
-// std::auto_ptr< SwUnoCrsr > pAuto( pUnoCrsr ); // to end lifetime
of object pointed to by pUnoCrsr
+// std::unique_ptr< SwUnoCrsr > pAuto( pUnoCrsr ); // to end lifetime
of object pointed to by pUnoCrsr
GetFormatAndCreateCursorFromRangeRep( pDoc, aRange, &pTblFmt, NULL );
if (!pTblFmt)
throw lang::IllegalArgumentException();
diff --git a/main/sw/source/filter/ww8/dump/ww8scan.cxx
b/main/sw/source/filter/ww8/dump/ww8scan.cxx
index ddd18d2ff9..cf40ed9536 100644
--- a/main/sw/source/filter/ww8/dump/ww8scan.cxx
+++ b/main/sw/source/filter/ww8/dump/ww8scan.cxx
@@ -2636,12 +2636,13 @@ void WW8PLCFx::SetIdx2(sal_uLong )
{
}
-class SamePos :
- public std::unary_function<const WW8PLCFx_Fc_FKP::WW8Fkp *, bool>
+class SamePos
{
private:
long mnPo;
public:
+ typedef const WW8PLCFx_Fc_FKP::WW8Fkp * argument_type;
+ typedef bool result_type;
SamePos(long nPo) : mnPo(nPo) {};
bool operator()(const WW8PLCFx_Fc_FKP::WW8Fkp *pFkp)
{return mnPo == pFkp->GetFilePos();}
diff --git a/main/sw/source/filter/ww8/styles.cxx
b/main/sw/source/filter/ww8/styles.cxx
index 14f483b517..1c442793e9 100644
--- a/main/sw/source/filter/ww8/styles.cxx
+++ b/main/sw/source/filter/ww8/styles.cxx
@@ -26,7 +26,6 @@
#include "../inc/wwstyles.hxx"
-#include <functional> //std::unary_function
#include <algorithm> //std::find_if
#include <tools/string.hxx> //do we have to...
diff --git a/main/sw/source/filter/ww8/writerhelper.cxx
b/main/sw/source/filter/ww8/writerhelper.cxx
index 381b4e9157..0514b7c199 100644
--- a/main/sw/source/filter/ww8/writerhelper.cxx
+++ b/main/sw/source/filter/ww8/writerhelper.cxx
@@ -34,7 +34,6 @@
#include <com/sun/star/embed/EmbedStates.hpp>
#include <algorithm> //std::swap
-#include <functional> //std::binary_function
# include <svl/itemiter.hxx> //SfxItemIter
# include <svx/svdobj.hxx> //SdrObject
# include <svx/svdoole2.hxx> //SdrOle2Obj
diff --git a/main/sw/source/filter/ww8/writerwordglue.cxx
b/main/sw/source/filter/ww8/writerwordglue.cxx
index 99d40b34cd..976e218d27 100644
--- a/main/sw/source/filter/ww8/writerwordglue.cxx
+++ b/main/sw/source/filter/ww8/writerwordglue.cxx
@@ -30,7 +30,6 @@
# include "writerhelper.hxx"
#include <algorithm> //std::find_if
-#include <functional> //std::unary_function
#include <unicode/ubidi.h> //ubidi_getLogicalRun
# include <tools/tenccvt.hxx> //GetExtendedTextEncoding
diff --git a/main/ucb/source/ucp/odma/odma_contentprops.hxx
b/main/ucb/source/ucp/odma/odma_contentprops.hxx
index 7536bd1577..a8d5d1dcb3 100644
--- a/main/ucb/source/ucp/odma/odma_contentprops.hxx
+++ b/main/ucb/source/ucp/odma/odma_contentprops.hxx
@@ -62,18 +62,18 @@ namespace odma
inline ::rtl::OUString getTitle() const { return
m_sTitle; }
inline ::rtl::OUString getSavedAsName() const { return
m_sSavedAsName; }
};
- typedef ::std::binary_function< ::rtl::Reference<ContentProperties>,
::rtl::OUString,bool> TContentPropertiesFunctorBase;
- /// binary_function Functor object for class ContentProperties return
type is bool
- class ContentPropertiesMemberFunctor : public
TContentPropertiesFunctorBase
+ /// Functor object for comparing a ContentProperties string member
result.
+ class ContentPropertiesMemberFunctor
{
- ::std::const_mem_fun_t< ::rtl::OUString,ContentProperties>
m_aFunction;
+ typedef ::rtl::OUString (ContentProperties::*MemberFunction)()
const;
+ MemberFunction m_aFunction;
public:
- ContentPropertiesMemberFunctor(const ::std::const_mem_fun_t<
::rtl::OUString,ContentProperties>& _rFunc)
- : m_aFunction(_rFunc){}
+ ContentPropertiesMemberFunctor(MemberFunction _aFunction)
+ : m_aFunction(_aFunction){}
inline bool operator()(const
::rtl::Reference<ContentProperties>& lhs,const ::rtl::OUString& rhs) const
{
- return !!(m_aFunction(lhs.get()) == rhs);
+ return !!((lhs.get()->*m_aFunction)() == rhs);
}
};
}
diff --git a/main/ucb/source/ucp/odma/odma_provider.cxx
b/main/ucb/source/ucp/odma/odma_provider.cxx
index 9eefc7ff3d..58fac41f65 100644
--- a/main/ucb/source/ucp/odma/odma_provider.cxx
+++ b/main/ucb/source/ucp/odma/odma_provider.cxx
@@ -494,12 +494,11 @@ void ContentProvider::append(const
::rtl::Reference<ContentProperties>& _rProp)
{
::rtl::Reference<ContentProperties> aReturn;
ContentsMap::const_iterator aFind = ::std::find_if(
m_aContents.begin(),
-
m_aContents.end(),
-
::std::compose1(
-
::std::bind2nd(_aFunctor,_sName),
-
::std::select2nd<ContentsMap::value_type>()
-
)
-
);
+
m_aContents.end(),
+
[&_aFunctor, &_sName](const ContentsMap::value_type& rContent) {
+
return _aFunctor(rContent.second, _sName);
+
}
+
);
if(aFind != m_aContents.end())
aReturn = aFind->second;
return aReturn;
@@ -507,13 +506,13 @@ void ContentProvider::append(const
::rtl::Reference<ContentProperties>& _rProp)
//
-----------------------------------------------------------------------------
::rtl::Reference<ContentProperties>
ContentProvider::getContentPropertyWithSavedAsName(const ::rtl::OUString&
_sSaveAsName) const
{
- ContentPropertiesMemberFunctor
aFunc(::std::mem_fun(&ContentProperties::getSavedAsName));
+ ContentPropertiesMemberFunctor
aFunc(&ContentProperties::getSavedAsName);
return getContentProperty(_sSaveAsName,aFunc);
}
//
-----------------------------------------------------------------------------
::rtl::Reference<ContentProperties>
ContentProvider::getContentPropertyWithTitle(const ::rtl::OUString& _sTitle)
const
{
- ContentPropertiesMemberFunctor
aFunc(::std::mem_fun(&ContentProperties::getTitle));
+ ContentPropertiesMemberFunctor aFunc(&ContentProperties::getTitle);
return getContentProperty(_sTitle,aFunc);
}
//
-----------------------------------------------------------------------------
diff --git a/main/vcl/unx/generic/printer/cupsmgr.cxx
b/main/vcl/unx/generic/printer/cupsmgr.cxx
index ada023d02b..c528f5af10 100644
--- a/main/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/main/vcl/unx/generic/printer/cupsmgr.cxx
@@ -848,8 +848,11 @@ FILE* CUPSManager::startSpool( const OUString&
rPrintername, bool bQuickCommand
#endif
}
-struct less_ppd_key : public ::std::binary_function<double, double, bool>
+struct less_ppd_key
{
+ typedef const PPDKey* first_argument_type;
+ typedef const PPDKey* second_argument_type;
+ typedef bool result_type;
bool operator()(const PPDKey* left, const PPDKey* right)
{ return left->getOrderDependency() < right->getOrderDependency(); }
};
diff --git a/main/vcl/unx/generic/printergfx/printerjob.cxx
b/main/vcl/unx/generic/printergfx/printerjob.cxx
index b5aa3dafd4..35dd9a23db 100644
--- a/main/vcl/unx/generic/printergfx/printerjob.cxx
+++ b/main/vcl/unx/generic/printergfx/printerjob.cxx
@@ -770,8 +770,11 @@ PrinterJob::GetErrorCode ()
return 0;
}
-struct less_ppd_key : public ::std::binary_function<double, double, bool>
+struct less_ppd_key
{
+ typedef const PPDKey* first_argument_type;
+ typedef const PPDKey* second_argument_type;
+ typedef bool result_type;
bool operator()(const PPDKey* left, const PPDKey* right)
{ return left->getOrderDependency() < right->getOrderDependency(); }
};
diff --git a/main/xmloff/source/chart/SchXMLExport.cxx
b/main/xmloff/source/chart/SchXMLExport.cxx
index 56afd09b2b..9e8a0db5ae 100644
--- a/main/xmloff/source/chart/SchXMLExport.cxx
+++ b/main/xmloff/source/chart/SchXMLExport.cxx
@@ -774,7 +774,7 @@ struct lcl_TableData
::std::vector< sal_Int32 > aHiddenColumns;
};
-// ::std::bind2nd( ::std::mem_fun_ref( &T::resize ), nSize ) does not work
+// Function object that binds the size and default value for T::resize.
template< class T >
struct lcl_resize
{
diff --git a/main/xmloff/source/core/RDFaImportHelper.cxx
b/main/xmloff/source/core/RDFaImportHelper.cxx
index 9dd818fd0a..a6c898226e 100644
--- a/main/xmloff/source/core/RDFaImportHelper.cxx
+++ b/main/xmloff/source/core/RDFaImportHelper.cxx
@@ -331,13 +331,12 @@ RDFaInserter::MakeResource( ::rtl::OUString const &
i_rResource)
}
}
-/** i wrote this because c++ implementations cannot agree on which variant
- of boost::bind and std::mem_fun_ref applied to Reference::is compiles */
+/** Predicate used to discard invalid URI references. */
class ref_is_null
{
public:
- typedef sal_Bool argument_type;
- typedef const uno::Reference<rdf::XURI> & result_type;
+ typedef const uno::Reference<rdf::XURI> & argument_type;
+ typedef sal_Bool result_type;
sal_Bool operator() (const uno::Reference<rdf::XURI> & i_rRef)
{
return !i_rRef.is();
@@ -372,12 +371,6 @@ void RDFaInserter::InsertRDFaEntry(
::boost::bind(&RDFaInserter::MakeURI, this, _1)),
::std::back_inserter(predicates),
ref_is_null() );
- // compiles only on wntmsci12
-// ::boost::bind( ::std::logical_not<sal_Bool>(),
::boost::bind<sal_Bool>(&uno::Reference<rdf::XURI>::is, _1)));
- // compiles on unxsoli4, wntsci12, but not unxlngi6
-// ::boost::bind( ::std::logical_not<sal_Bool>(),
::boost::bind<sal_Bool, com::sun::star::uno::Reference<rdf::XURI>
>(&uno::Reference<rdf::XURI>::is, _1)));
- // compiles on unxsoli4, unxlngi6, but not wntsci12
-// ::std::not1( ::std::mem_fun_ref(&uno::Reference<rdf::XURI>::is)) );
if (!predicates.size())
{