summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-12-05 11:37:59 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-12-05 18:11:15 +0100
commit306ddfb1b87d94a343e8e2b6b9270ca682f92ac3 (patch)
treeef46ec8bc63d3db71ebe17a571ec8f9787d6c814 /reportdesign
parent36c9eddf44b302bf1e9a9b88af8f89d3e2012df2 (diff)
Replace deprecated std::mem_fun et al in reportdesign
(as std::mem_fun is gone by default at least from recent libc++ in C++17 mode) Change-Id: Ib66134bd4072dfe0ce3bc36aa684cee710921235 Reviewed-on: https://gerrit.libreoffice.org/45868 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/inc/UndoActions.hxx28
-rw-r--r--reportdesign/source/core/sdr/UndoActions.cxx30
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx8
-rw-r--r--reportdesign/source/ui/inc/ReportController.hxx2
-rw-r--r--reportdesign/source/ui/inc/RptUndo.hxx12
-rw-r--r--reportdesign/source/ui/inc/SectionWindow.hxx4
-rw-r--r--reportdesign/source/ui/misc/RptUndo.cxx6
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx28
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx16
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx16
10 files changed, 66 insertions, 84 deletions
diff --git a/reportdesign/inc/UndoActions.hxx b/reportdesign/inc/UndoActions.hxx
index 7df624f28418..82dd992f5686 100644
--- a/reportdesign/inc/UndoActions.hxx
+++ b/reportdesign/inc/UndoActions.hxx
@@ -71,7 +71,7 @@ namespace rptui
bool getHeaderOn() { return m_xGroup->getHeaderOn(); }
bool getFooterOn() { return m_xGroup->getFooterOn(); }
- static ::std::mem_fun_t< css::uno::Reference< css::report::XSection> , OGroupHelper> getMemberFunction(const css::uno::Reference< css::report::XSection >& _xSection);
+ static ::std::function<css::uno::Reference< css::report::XSection>(OGroupHelper *)> getMemberFunction(const css::uno::Reference< css::report::XSection >& _xSection);
};
@@ -96,7 +96,7 @@ namespace rptui
bool getPageHeaderOn() { return m_xReport->getPageHeaderOn(); }
bool getPageFooterOn() { return m_xReport->getPageFooterOn(); }
- static ::std::mem_fun_t< css::uno::Reference< css::report::XSection> , OReportHelper> getMemberFunction(const css::uno::Reference< css::report::XSection >& _xSection);
+ static ::std::function<css::uno::Reference< css::report::XSection>(OReportHelper *)> getMemberFunction(const css::uno::Reference< css::report::XSection >& _xSection);
};
@@ -196,13 +196,11 @@ namespace rptui
class REPORTDESIGN_DLLPUBLIC OUndoReportSectionAction : public OUndoContainerAction
{
OReportHelper m_aReportHelper;
- ::std::mem_fun_t< css::uno::Reference< css::report::XSection >
- ,OReportHelper> m_pMemberFunction;
+ ::std::function<css::uno::Reference< css::report::XSection >(OReportHelper *)> m_pMemberFunction;
public:
OUndoReportSectionAction(SdrModel& rMod
,Action _eAction
- ,::std::mem_fun_t< css::uno::Reference< css::report::XSection >
- ,OReportHelper> _pMemberFunction
+ ,::std::function<css::uno::Reference< css::report::XSection >(OReportHelper *)> _pMemberFunction
,const css::uno::Reference< css::report::XReportDefinition >& _xReport
,const css::uno::Reference< css::uno::XInterface>& xElem
,const char* pCommentId);
@@ -217,13 +215,11 @@ namespace rptui
class REPORTDESIGN_DLLPUBLIC OUndoGroupSectionAction : public OUndoContainerAction
{
OGroupHelper m_aGroupHelper;
- ::std::mem_fun_t< css::uno::Reference< css::report::XSection >
- ,OGroupHelper> m_pMemberFunction;
+ ::std::function<css::uno::Reference< css::report::XSection >(OGroupHelper *)> m_pMemberFunction;
public:
OUndoGroupSectionAction(SdrModel& rMod
,Action _eAction
- ,::std::mem_fun_t< css::uno::Reference< css::report::XSection >
- ,OGroupHelper> _pMemberFunction
+ ,::std::function<css::uno::Reference< css::report::XSection >(OGroupHelper *)> _pMemberFunction
,const css::uno::Reference< css::report::XGroup >& _xGroup
,const css::uno::Reference< css::uno::XInterface>& xElem
,const char* pCommentId);
@@ -264,15 +260,13 @@ namespace rptui
class REPORTDESIGN_DLLPUBLIC OUndoPropertyReportSectionAction : public ORptUndoPropertyAction
{
OReportHelper m_aReportHelper;
- ::std::mem_fun_t< css::uno::Reference< css::report::XSection >
- ,OReportHelper> m_pMemberFunction;
+ ::std::function<css::uno::Reference< css::report::XSection >(OReportHelper *)> m_pMemberFunction;
protected:
virtual css::uno::Reference< css::beans::XPropertySet> getObject() override;
public:
OUndoPropertyReportSectionAction(SdrModel& rMod
,const css::beans::PropertyChangeEvent& evt
- ,::std::mem_fun_t< css::uno::Reference< css::report::XSection >
- ,OReportHelper> _pMemberFunction
+ ,::std::function<css::uno::Reference< css::report::XSection >(OReportHelper *)> _pMemberFunction
,const css::uno::Reference< css::report::XReportDefinition >& _xReport
);
};
@@ -283,15 +277,13 @@ namespace rptui
class REPORTDESIGN_DLLPUBLIC OUndoPropertyGroupSectionAction : public ORptUndoPropertyAction
{
OGroupHelper m_aGroupHelper;
- ::std::mem_fun_t< css::uno::Reference< css::report::XSection >
- ,OGroupHelper> m_pMemberFunction;
+ ::std::function<css::uno::Reference< css::report::XSection >(OGroupHelper *)> m_pMemberFunction;
protected:
virtual css::uno::Reference< css::beans::XPropertySet> getObject() override;
public:
OUndoPropertyGroupSectionAction(SdrModel& rMod
,const css::beans::PropertyChangeEvent& evt
- ,::std::mem_fun_t< css::uno::Reference< css::report::XSection >
- ,OGroupHelper> _pMemberFunction
+ ,::std::function<css::uno::Reference< css::report::XSection >(OGroupHelper *)> _pMemberFunction
,const css::uno::Reference< css::report::XGroup >& _xGroup
);
};
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx
index df9bd7fafc77..825fd7b8f574 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -54,27 +54,27 @@ namespace rptui
using namespace container;
using namespace report;
-::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> OGroupHelper::getMemberFunction(const Reference< XSection >& _xSection)
+::std::function<uno::Reference<report::XSection>(OGroupHelper *)> OGroupHelper::getMemberFunction(const Reference< XSection >& _xSection)
{
- ::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> pMemFunSection = ::std::mem_fun(&OGroupHelper::getFooter);
+ ::std::function<uno::Reference<report::XSection>(OGroupHelper *)> pMemFunSection = ::std::mem_fn(&OGroupHelper::getFooter);
uno::Reference< report::XGroup> xGroup = _xSection->getGroup();
if ( xGroup->getHeaderOn() && xGroup->getHeader() == _xSection )
- pMemFunSection = ::std::mem_fun(&OGroupHelper::getHeader);
+ pMemFunSection = ::std::mem_fn(&OGroupHelper::getHeader);
return pMemFunSection;
}
-::std::mem_fun_t<uno::Reference<report::XSection> , OReportHelper> OReportHelper::getMemberFunction(const Reference< XSection >& _xSection)
+::std::function<uno::Reference<report::XSection>(OReportHelper *)> OReportHelper::getMemberFunction(const Reference< XSection >& _xSection)
{
uno::Reference< report::XReportDefinition> xReportDefinition(_xSection->getReportDefinition());
- ::std::mem_fun_t<uno::Reference<report::XSection> , OReportHelper> pMemFunSection = ::std::mem_fun(&OReportHelper::getReportFooter);
+ ::std::function<uno::Reference<report::XSection>(OReportHelper *)> pMemFunSection = ::std::mem_fn(&OReportHelper::getReportFooter);
if ( xReportDefinition->getReportHeaderOn() && xReportDefinition->getReportHeader() == _xSection )
- pMemFunSection = ::std::mem_fun(&OReportHelper::getReportHeader);
+ pMemFunSection = ::std::mem_fn(&OReportHelper::getReportHeader);
else if ( xReportDefinition->getPageHeaderOn() && xReportDefinition->getPageHeader() == _xSection )
- pMemFunSection = ::std::mem_fun(&OReportHelper::getPageHeader);
+ pMemFunSection = ::std::mem_fn(&OReportHelper::getPageHeader);
else if ( xReportDefinition->getPageFooterOn() && xReportDefinition->getPageFooter() == _xSection )
- pMemFunSection = ::std::mem_fun(&OReportHelper::getPageFooter);
+ pMemFunSection = ::std::mem_fn(&OReportHelper::getPageFooter);
else if ( xReportDefinition->getDetail() == _xSection )
- pMemFunSection = ::std::mem_fun(&OReportHelper::getDetail);
+ pMemFunSection = ::std::mem_fn(&OReportHelper::getDetail);
return pMemFunSection;
}
@@ -242,8 +242,7 @@ void OUndoContainerAction::Redo()
OUndoGroupSectionAction::OUndoGroupSectionAction(SdrModel& _rMod
,Action _eAction
- ,::std::mem_fun_t< uno::Reference< report::XSection >
- ,OGroupHelper> _pMemberFunction
+ ,::std::function<uno::Reference< report::XSection >(OGroupHelper *)> _pMemberFunction
,const uno::Reference< report::XGroup >& _xGroup
,const Reference< XInterface > & xElem
,const char* pCommentId)
@@ -288,8 +287,7 @@ void OUndoGroupSectionAction::implReRemove( )
OUndoReportSectionAction::OUndoReportSectionAction(SdrModel& _rMod
,Action _eAction
- ,::std::mem_fun_t< uno::Reference< report::XSection >
- ,OReportHelper> _pMemberFunction
+ ,::std::function<uno::Reference< report::XSection >(OReportHelper *)> _pMemberFunction
,const uno::Reference< report::XReportDefinition >& _xReport
,const Reference< XInterface > & xElem
,const char* pCommentId)
@@ -388,8 +386,7 @@ OUString ORptUndoPropertyAction::GetComment() const
OUndoPropertyGroupSectionAction::OUndoPropertyGroupSectionAction(SdrModel& _rMod
,const PropertyChangeEvent& evt
- ,::std::mem_fun_t< uno::Reference< report::XSection >
- ,OGroupHelper> _pMemberFunction
+ ,::std::function<uno::Reference< report::XSection >(OGroupHelper *)> _pMemberFunction
,const uno::Reference< report::XGroup >& _xGroup
)
:ORptUndoPropertyAction(_rMod,evt)
@@ -405,8 +402,7 @@ Reference< XPropertySet> OUndoPropertyGroupSectionAction::getObject()
OUndoPropertyReportSectionAction::OUndoPropertyReportSectionAction(SdrModel& _rMod
,const PropertyChangeEvent& evt
- ,::std::mem_fun_t< uno::Reference< report::XSection >
- ,OReportHelper> _pMemberFunction
+ ,::std::function<uno::Reference< report::XSection >(OReportHelper *)> _pMemberFunction
,const uno::Reference< report::XReportDefinition >& _xReport
)
:ORptUndoPropertyAction(_rMod,evt)
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 4afc637bb944..9fd07a97704f 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -823,12 +823,12 @@ void NavigatorTree::UserData::_propertyChanged(const beans::PropertyChangeEvent&
{
sal_Int32 nPos = 1;
uno::Reference< report::XGroup> xGroup(_rEvent.Source,uno::UNO_QUERY);
- ::std::mem_fun_t< bool,OGroupHelper> pIsOn = ::std::mem_fun(&OGroupHelper::getHeaderOn);
- ::std::mem_fun_t< uno::Reference<report::XSection> ,OGroupHelper> pMemFunSection = ::std::mem_fun(&OGroupHelper::getHeader);
+ ::std::function<bool(OGroupHelper *)> pIsOn = ::std::mem_fn(&OGroupHelper::getHeaderOn);
+ ::std::function<uno::Reference<report::XSection>(OGroupHelper *)> pMemFunSection = ::std::mem_fn(&OGroupHelper::getHeader);
if ( bFooterOn )
{
- pIsOn = ::std::mem_fun(&OGroupHelper::getFooterOn);
- pMemFunSection = ::std::mem_fun(&OGroupHelper::getFooter);
+ pIsOn = ::std::mem_fn(&OGroupHelper::getFooterOn);
+ pMemFunSection = ::std::mem_fn(&OGroupHelper::getFooter);
nPos = m_pTree->GetChildCount(pEntry) - 1;
}
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index fe45320beeaa..483ef5379c5e 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -199,7 +199,7 @@ namespace rptui
,sal_Int32 _nGroupPos
,bool _bShow);
- void executeMethodWithUndo(const char* pUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun);
+ void executeMethodWithUndo(const char* pUndoStrId,const ::std::function<void(ODesignView *)>& _pMemfun);
void alignControlsWithUndo(const char* pUndoStrId, ControlModification _nControlModification, bool _bAlignAtSection = false);
css::uno::Reference< css::frame::XFrame > getXFrame();
diff --git a/reportdesign/source/ui/inc/RptUndo.hxx b/reportdesign/source/ui/inc/RptUndo.hxx
index 201d2ef320d9..9c125121b9e1 100644
--- a/reportdesign/source/ui/inc/RptUndo.hxx
+++ b/reportdesign/source/ui/inc/RptUndo.hxx
@@ -66,8 +66,7 @@ namespace rptui
class OReportSectionUndo : public OSectionUndo
{
OReportHelper m_aReportHelper;
- ::std::mem_fun_t< css::uno::Reference< css::report::XSection >
- ,OReportHelper> m_pMemberFunction;
+ ::std::function<css::uno::Reference< css::report::XSection >(OReportHelper *)> m_pMemberFunction;
void implReInsert( ) override;
void implReRemove( ) override;
@@ -77,8 +76,7 @@ namespace rptui
//OReportSectionUndo( const css::uno::Reference< css::report::XSection >& _xSection
OReportSectionUndo( OReportModel& rMod
,sal_uInt16 _nSlot
- ,::std::mem_fun_t< css::uno::Reference< css::report::XSection >
- ,OReportHelper> _pMemberFunction
+ ,::std::function<css::uno::Reference< css::report::XSection >(OReportHelper *)> _pMemberFunction
,const css::uno::Reference< css::report::XReportDefinition >& _xReport
,Action _eAction);
virtual ~OReportSectionUndo() override;
@@ -89,8 +87,7 @@ namespace rptui
class OGroupSectionUndo : public OSectionUndo
{
OGroupHelper m_aGroupHelper;
- ::std::mem_fun_t< css::uno::Reference< css::report::XSection >
- ,OGroupHelper> m_pMemberFunction;
+ ::std::function<css::uno::Reference< css::report::XSection >(OGroupHelper *)> m_pMemberFunction;
mutable OUString m_sName;
@@ -102,8 +99,7 @@ namespace rptui
//OGroupSectionUndo( const css::uno::Reference< css::report::XSection >& _xSection
OGroupSectionUndo( OReportModel& rMod
,sal_uInt16 _nSlot
- ,::std::mem_fun_t< css::uno::Reference< css::report::XSection >
- ,OGroupHelper> _pMemberFunction
+ ,::std::function<css::uno::Reference< css::report::XSection >(OGroupHelper *)> _pMemberFunction
,const css::uno::Reference< css::report::XGroup >& _xGroup
,Action _eAction
,const char* pCommentID);
diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx
index 42f01962bc59..a08bf82a27a5 100644
--- a/reportdesign/source/ui/inc/SectionWindow.hxx
+++ b/reportdesign/source/ui/inc/SectionWindow.hxx
@@ -66,7 +66,7 @@ namespace rptui
* \param _pIsSectionOn
* @return sal_True when title was set otherwise FALSE
*/
- bool setGroupSectionTitle(const css::uno::Reference< css::report::XGroup>& _xGroup,const char* pResId,::std::mem_fun_t< css::uno::Reference< css::report::XSection> , OGroupHelper> _pGetSection, const ::std::mem_fun_t<bool, OGroupHelper>& _pIsSectionOn);
+ bool setGroupSectionTitle(const css::uno::Reference< css::report::XGroup>& _xGroup,const char* pResId,::std::function<css::uno::Reference< css::report::XSection>(OGroupHelper *)> _pGetSection, const ::std::function<bool(OGroupHelper *)>& _pIsSectionOn);
/** set the title of the (report/page) header or footer
*
@@ -76,7 +76,7 @@ namespace rptui
* \param _pIsSectionOn
* @return sal_True when title was set otherwise FALSE
*/
- bool setReportSectionTitle(const css::uno::Reference< css::report::XReportDefinition>& _xReport,const char* pResId,::std::mem_fun_t< css::uno::Reference< css::report::XSection> , OReportHelper> _pGetSection, const ::std::mem_fun_t<bool, OReportHelper>& _pIsSectionOn);
+ bool setReportSectionTitle(const css::uno::Reference< css::report::XReportDefinition>& _xReport,const char* pResId,::std::function<css::uno::Reference< css::report::XSection>(OReportHelper *)> _pGetSection, const ::std::function<bool(OReportHelper *)>& _pIsSectionOn);
void ImplInitSettings();
DECL_LINK(Collapsed, OColorListener&, void);
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx
index 95b11ef1498f..9ef880f34e3e 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -216,8 +216,7 @@ void OSectionUndo::Redo()
OReportSectionUndo::OReportSectionUndo(OReportModel& _rMod,sal_uInt16 _nSlot
- ,::std::mem_fun_t< uno::Reference< report::XSection >
- ,OReportHelper> _pMemberFunction
+ ,::std::function<uno::Reference< report::XSection >(OReportHelper *)> _pMemberFunction
,const uno::Reference< report::XReportDefinition >& _xReport
,Action _eAction)
: OSectionUndo(_rMod,_nSlot,_eAction,nullptr)
@@ -253,8 +252,7 @@ void OReportSectionUndo::implReRemove( )
OGroupSectionUndo::OGroupSectionUndo(OReportModel& _rMod,sal_uInt16 _nSlot
- ,::std::mem_fun_t< uno::Reference< report::XSection >
- ,OGroupHelper> _pMemberFunction
+ ,::std::function<uno::Reference< report::XSection >(OGroupHelper *)> _pMemberFunction
,const uno::Reference< report::XGroup >& _xGroup
,Action _eAction
,const char* pCommentID)
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 9b47422943b7..63ee8bf3e020 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -1022,13 +1022,13 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
}
break;
case SID_CUT:
- executeMethodWithUndo(RID_STR_UNDO_REMOVE_SELECTION,::std::mem_fun(&ODesignView::Cut));
+ executeMethodWithUndo(RID_STR_UNDO_REMOVE_SELECTION,::std::mem_fn(&ODesignView::Cut));
break;
case SID_COPY:
getDesignView()->Copy();
break;
case SID_PASTE:
- executeMethodWithUndo(RID_STR_UNDO_PASTE,::std::mem_fun(&ODesignView::Paste));
+ executeMethodWithUndo(RID_STR_UNDO_PASTE,::std::mem_fn(&ODesignView::Paste));
break;
case SID_FRAME_TO_TOP:
@@ -1161,7 +1161,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
}
}
else
- executeMethodWithUndo(RID_STR_UNDO_REMOVE_SELECTION,::std::mem_fun(&ODesignView::Delete));
+ executeMethodWithUndo(RID_STR_UNDO_REMOVE_SELECTION,::std::mem_fn(&ODesignView::Delete));
break;
case SID_GRID_USE:
getDesignView()->setGridSnap(m_bGridUse = !m_bGridUse);
@@ -2235,7 +2235,7 @@ void SAL_CALL OReportController::disposing( const lang::EventObject& Source )
static sal_uInt16 lcl_getNonVisbleGroupsBefore( const uno::Reference< report::XGroups>& _xGroups
,sal_Int32 _nGroupPos
- ,::std::mem_fun_t<bool,OGroupHelper> const & _pGroupMemberFunction)
+ ,::std::function<bool(OGroupHelper *)> const & _pGroupMemberFunction)
{
uno::Reference< report::XGroup> xGroup;
sal_uInt16 nNonVisibleGroups = 0;
@@ -2253,8 +2253,8 @@ static sal_uInt16 lcl_getNonVisbleGroupsBefore( const uno::Reference< report::XG
void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGroup,const OUString& _sPropName,sal_Int32 _nGroupPos,bool _bShow)
{
- ::std::mem_fun_t<bool,OGroupHelper> pMemFun = ::std::mem_fun(&OGroupHelper::getHeaderOn);
- ::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> pMemFunSection = ::std::mem_fun(&OGroupHelper::getHeader);
+ ::std::function<bool(OGroupHelper *)> pMemFun = ::std::mem_fn(&OGroupHelper::getHeaderOn);
+ ::std::function<uno::Reference<report::XSection>(OGroupHelper *)> pMemFunSection = ::std::mem_fn(&OGroupHelper::getHeader);
OUString sColor(DBGROUPHEADER);
sal_uInt16 nPosition = 0;
bool bHandle = false;
@@ -2266,8 +2266,8 @@ void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGr
}
else if ( _sPropName == PROPERTY_FOOTERON )
{
- pMemFun = ::std::mem_fun(&OGroupHelper::getFooterOn);
- pMemFunSection = ::std::mem_fun(&OGroupHelper::getFooter);
+ pMemFun = ::std::mem_fn(&OGroupHelper::getFooterOn);
+ pMemFunSection = ::std::mem_fn(&OGroupHelper::getFooter);
nPosition = getDesignView()->getSectionCount();
if ( m_xReportDefinition->getPageFooterOn() )
@@ -2574,7 +2574,7 @@ void OReportController::Notify(SfxBroadcaster & /* _rBc */, SfxHint const & _rHi
}
}
-void OReportController::executeMethodWithUndo(const char* pUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun)
+void OReportController::executeMethodWithUndo(const char* pUndoStrId,const ::std::function<void(ODesignView *)>& _pMemfun)
{
const OUString sUndoAction = RptResId(pUndoStrId);
UndoContext aUndoContext( getUndoManager(), sUndoAction );
@@ -3745,13 +3745,13 @@ void OReportController::switchReportSection(const sal_Int16 _nId)
pUndoContext.reset( new UndoContext( getUndoManager(), sUndoAction ) );
addUndoAction(new OReportSectionUndo(*(m_aReportModel),SID_REPORTHEADER_WITHOUT_UNDO
- ,::std::mem_fun(&OReportHelper::getReportHeader)
+ ,::std::mem_fn(&OReportHelper::getReportHeader)
,m_xReportDefinition
,bSwitchOn ? Inserted : Removed
));
addUndoAction(new OReportSectionUndo(*(m_aReportModel),SID_REPORTFOOTER_WITHOUT_UNDO
- ,::std::mem_fun(&OReportHelper::getReportFooter)
+ ,::std::mem_fn(&OReportHelper::getReportFooter)
,m_xReportDefinition
,bSwitchOn ? Inserted : Removed
));
@@ -3793,14 +3793,14 @@ void OReportController::switchPageSection(const sal_Int16 _nId)
addUndoAction(new OReportSectionUndo(*m_aReportModel
,SID_PAGEHEADER_WITHOUT_UNDO
- ,::std::mem_fun(&OReportHelper::getPageHeader)
+ ,::std::mem_fn(&OReportHelper::getPageHeader)
,m_xReportDefinition
,bSwitchOn ? Inserted : Removed
));
addUndoAction(new OReportSectionUndo(*m_aReportModel
,SID_PAGEFOOTER_WITHOUT_UNDO
- ,::std::mem_fun(&OReportHelper::getPageFooter)
+ ,::std::mem_fn(&OReportHelper::getPageFooter)
,m_xReportDefinition
,bSwitchOn ? Inserted : Removed
));
@@ -3881,7 +3881,7 @@ void OReportController::createGroupSection(const bool _bUndo,const bool _bHeader
if ( _bUndo )
addUndoAction(new OGroupSectionUndo(*m_aReportModel
,_bHeader ? SID_GROUPHEADER_WITHOUT_UNDO : SID_GROUPFOOTER_WITHOUT_UNDO
- ,_bHeader ? ::std::mem_fun(&OGroupHelper::getHeader) : ::std::mem_fun(&OGroupHelper::getFooter)
+ ,_bHeader ? ::std::mem_fn(&OGroupHelper::getHeader) : ::std::mem_fn(&OGroupHelper::getFooter)
,xGroup
,bSwitchOn ? Inserted : Removed
, ( _bHeader ?
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index 60aed187e069..e1aaf1ad048f 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -141,10 +141,10 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
else if ( _rEvent.PropertyName == PROPERTY_NAME && !xSection->getGroup().is() )
{
uno::Reference< report::XReportDefinition > xReport = xSection->getReportDefinition();
- if ( setReportSectionTitle(xReport,RID_STR_REPORT_HEADER,::std::mem_fun(&OReportHelper::getReportHeader),::std::mem_fun(&OReportHelper::getReportHeaderOn))
- || setReportSectionTitle(xReport,RID_STR_REPORT_FOOTER,::std::mem_fun(&OReportHelper::getReportFooter),::std::mem_fun(&OReportHelper::getReportFooterOn))
- || setReportSectionTitle(xReport,RID_STR_PAGE_HEADER,::std::mem_fun(&OReportHelper::getPageHeader),::std::mem_fun(&OReportHelper::getPageHeaderOn))
- || setReportSectionTitle(xReport,RID_STR_PAGE_FOOTER,::std::mem_fun(&OReportHelper::getPageFooter),::std::mem_fun(&OReportHelper::getPageFooterOn)) )
+ if ( setReportSectionTitle(xReport,RID_STR_REPORT_HEADER,::std::mem_fn(&OReportHelper::getReportHeader),::std::mem_fn(&OReportHelper::getReportHeaderOn))
+ || setReportSectionTitle(xReport,RID_STR_REPORT_FOOTER,::std::mem_fn(&OReportHelper::getReportFooter),::std::mem_fn(&OReportHelper::getReportFooterOn))
+ || setReportSectionTitle(xReport,RID_STR_PAGE_HEADER,::std::mem_fn(&OReportHelper::getPageHeader),::std::mem_fn(&OReportHelper::getPageHeaderOn))
+ || setReportSectionTitle(xReport,RID_STR_PAGE_FOOTER,::std::mem_fn(&OReportHelper::getPageFooter),::std::mem_fn(&OReportHelper::getPageFooterOn)) )
{
m_aStartMarker->Invalidate(InvalidateFlags::NoErase);
}
@@ -159,14 +159,14 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
else if ( _rEvent.PropertyName == PROPERTY_EXPRESSION )
{
uno::Reference< report::XGroup > xGroup(_rEvent.Source,uno::UNO_QUERY);
- if ( xGroup.is() && !setGroupSectionTitle(xGroup,RID_STR_HEADER,::std::mem_fun(&OGroupHelper::getHeader),::std::mem_fun(&OGroupHelper::getHeaderOn)))
+ if ( xGroup.is() && !setGroupSectionTitle(xGroup,RID_STR_HEADER,::std::mem_fn(&OGroupHelper::getHeader),::std::mem_fn(&OGroupHelper::getHeaderOn)))
{
- setGroupSectionTitle(xGroup,RID_STR_FOOTER,::std::mem_fun(&OGroupHelper::getFooter),::std::mem_fun(&OGroupHelper::getFooterOn));
+ setGroupSectionTitle(xGroup,RID_STR_FOOTER,::std::mem_fn(&OGroupHelper::getFooter),::std::mem_fn(&OGroupHelper::getFooterOn));
}
}
}
-bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReportDefinition>& _xReport,const char* pResId,::std::mem_fun_t<uno::Reference<report::XSection> , OReportHelper> _pGetSection, const ::std::mem_fun_t<bool,OReportHelper>& _pIsSectionOn)
+bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReportDefinition>& _xReport,const char* pResId,::std::function<uno::Reference<report::XSection>(OReportHelper *)> _pGetSection, const ::std::function<bool(OReportHelper *)>& _pIsSectionOn)
{
OReportHelper aReportHelper(_xReport);
const bool bRet = _pIsSectionOn(&aReportHelper) && _pGetSection(&aReportHelper) == m_aReportSection->getSection();
@@ -179,7 +179,7 @@ bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReport
return bRet;
}
-bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& _xGroup,const char* pResId,::std::mem_fun_t<uno::Reference<report::XSection> , OGroupHelper> _pGetSection, const ::std::mem_fun_t<bool,OGroupHelper>& _pIsSectionOn)
+bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& _xGroup,const char* pResId,::std::function<uno::Reference<report::XSection>(OGroupHelper *)> _pGetSection, const ::std::function<bool(OGroupHelper *)>& _pIsSectionOn)
{
OGroupHelper aGroupHelper(_xGroup);
const bool bRet = _pIsSectionOn(&aGroupHelper) && _pGetSection(&aGroupHelper) == m_aReportSection->getSection() ;
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 3479f3bfdfc7..40faf078ee5c 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -771,8 +771,8 @@ void OViewsWindow::alignMarkedObjects(ControlModification _nControlModification,
bool bMove = true;
- ::std::mem_fun_t<long&,tools::Rectangle> aGetFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Bottom);
- ::std::mem_fun_t<long&,tools::Rectangle> aRefFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Top);
+ ::std::function<long&(tools::Rectangle *)> aGetFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Bottom));
+ ::std::function<long&(tools::Rectangle *)> aRefFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Top));
TRectangleMap::const_iterator aRectIter = aSortRectangles.begin();
TRectangleMap::const_iterator aRectEnd = aSortRectangles.end();
for (;aRectIter != aRectEnd ; ++aRectIter)
@@ -791,8 +791,8 @@ void OViewsWindow::alignMarkedObjects(ControlModification _nControlModification,
switch(_nControlModification)
{
case ControlModification::TOP :
- aGetFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Top);
- aRefFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Bottom);
+ aGetFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Top));
+ aRefFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Bottom));
pValue = &nYMov;
break;
case ControlModification::BOTTOM:
@@ -805,16 +805,16 @@ void OViewsWindow::alignMarkedObjects(ControlModification _nControlModification,
bMove = false;
break;
case ControlModification::RIGHT :
- aGetFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Right);
- aRefFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Left);
+ aGetFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Right));
+ aRefFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Left));
break;
case ControlModification::CENTER_HORIZONTAL:
nXMov = aCenter.X() - aObjRect.Center().X();
bMove = false;
break;
case ControlModification::LEFT :
- aGetFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Left);
- aRefFun = ::std::mem_fun<long&,tools::Rectangle>(&tools::Rectangle::Right);
+ aGetFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Left));
+ aRefFun = ::std::mem_fn(static_cast<long&(tools::Rectangle:: *)()>(&tools::Rectangle::Right));
break;
default:
bMove = false;