Kaydet (Commit) 2a62966d authored tarafından Michael Stahl's avatar Michael Stahl

sfx2: replace boost::function with std::function

Change-Id: I72acc5f396553eb464338a395ef40f95ed57a07e
üst 18419468
...@@ -19,10 +19,11 @@ ...@@ -19,10 +19,11 @@
#ifndef INCLUDED_SFX2_SOURCE_SIDEBAR_ASYNCHRONOUSCALL_HXX #ifndef INCLUDED_SFX2_SOURCE_SIDEBAR_ASYNCHRONOUSCALL_HXX
#define INCLUDED_SFX2_SOURCE_SIDEBAR_ASYNCHRONOUSCALL_HXX #define INCLUDED_SFX2_SOURCE_SIDEBAR_ASYNCHRONOUSCALL_HXX
#include <boost/function.hpp>
#include <tools/solar.h> #include <tools/solar.h>
#include <tools/link.hxx> #include <tools/link.hxx>
#include <functional>
struct ImplSVEvent; struct ImplSVEvent;
namespace sfx2 { namespace sidebar { namespace sfx2 { namespace sidebar {
...@@ -32,7 +33,7 @@ namespace sfx2 { namespace sidebar { ...@@ -32,7 +33,7 @@ namespace sfx2 { namespace sidebar {
class AsynchronousCall class AsynchronousCall
{ {
public: public:
typedef ::boost::function<void()> Action; typedef ::std::function<void()> Action;
AsynchronousCall(); AsynchronousCall();
AsynchronousCall (const Action& rAction); AsynchronousCall (const Action& rAction);
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
#include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XFrame.hpp>
#include <boost/function.hpp>
class SfxViewFrame; class SfxViewFrame;
class ToolBox; class ToolBox;
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <sfx2/sidebar/TitleBar.hxx> #include <sfx2/sidebar/TitleBar.hxx>
#include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XFrame.hpp>
#include <boost/function.hpp>
namespace sfx2 { namespace sidebar { namespace sfx2 { namespace sidebar {
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <com/sun/star/ui/XUpdateModel.hpp> #include <com/sun/star/ui/XUpdateModel.hpp>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <boost/function.hpp>
#include <vcl/vclptr.hxx> #include <vcl/vclptr.hxx>
......
...@@ -27,10 +27,12 @@ ...@@ -27,10 +27,12 @@
#include <vcl/window.hxx> #include <vcl/window.hxx>
#include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XFrame.hpp>
#include <boost/function.hpp>
#include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple.hpp>
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
#include <functional>
class Button; class Button;
class CheckBox; class CheckBox;
class RadioButton; class RadioButton;
...@@ -61,13 +63,13 @@ public: ...@@ -61,13 +63,13 @@ public:
bool mbIsActive; bool mbIsActive;
bool mbIsEnabled; bool mbIsEnabled;
}; };
typedef ::boost::function<void( typedef ::std::function<void (
const Rectangle&, const Rectangle&,
const ::std::vector<DeckMenuData>& rMenuData)> PopupMenuProvider; const ::std::vector<DeckMenuData>& rMenuData)> PopupMenuProvider;
TabBar ( TabBar (
vcl::Window* pParentWindow, vcl::Window* pParentWindow,
const css::uno::Reference<css::frame::XFrame>& rxFrame, const css::uno::Reference<css::frame::XFrame>& rxFrame,
const ::boost::function<void(const ::rtl::OUString&rsDeckId)>& rDeckActivationFunctor, const ::std::function<void (const ::rtl::OUString&rsDeckId)>& rDeckActivationFunctor,
const PopupMenuProvider& rPopupMenuProvider, const PopupMenuProvider& rPopupMenuProvider,
SidebarController* rParentSidebarController); SidebarController* rParentSidebarController);
...@@ -99,13 +101,13 @@ private: ...@@ -99,13 +101,13 @@ private:
DECL_LINK(HandleClick, Button*); DECL_LINK(HandleClick, Button*);
VclPtr<RadioButton> mpButton; VclPtr<RadioButton> mpButton;
::rtl::OUString msDeckId; ::rtl::OUString msDeckId;
::boost::function<void(const ::rtl::OUString&rsDeckId)> maDeckActivationFunctor; ::std::function<void (const ::rtl::OUString&rsDeckId)> maDeckActivationFunctor;
bool mbIsHidden; bool mbIsHidden;
bool mbIsHiddenByDefault; bool mbIsHiddenByDefault;
}; };
typedef ::std::vector<Item> ItemContainer; typedef ::std::vector<Item> ItemContainer;
ItemContainer maItems; ItemContainer maItems;
const ::boost::function<void(const ::rtl::OUString&rsDeckId)> maDeckActivationFunctor; const ::std::function<void (const ::rtl::OUString&rsDeckId)> maDeckActivationFunctor;
sal_Int32 mnMenuSeparatorY; sal_Int32 mnMenuSeparatorY;
PopupMenuProvider maPopupMenuProvider; PopupMenuProvider maPopupMenuProvider;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#define INCLUDED_SFX2_TEMPLATELOCALVIEW_HXX #define INCLUDED_SFX2_TEMPLATELOCALVIEW_HXX
#include <set> #include <set>
#include <functional>
#include <sfx2/templateabstractview.hxx> #include <sfx2/templateabstractview.hxx>
...@@ -56,7 +57,7 @@ public: ...@@ -56,7 +57,7 @@ public:
std::vector<OUString> getFolderNames (); std::vector<OUString> getFolderNames ();
std::vector<TemplateItemProperties> std::vector<TemplateItemProperties>
getFilteredItems (const boost::function<bool (const TemplateItemProperties&) > &rFunc) const; getFilteredItems (const std::function<bool (const TemplateItemProperties&) > &rFunc) const;
virtual sal_uInt16 createRegion (const OUString &rName) SAL_OVERRIDE; virtual sal_uInt16 createRegion (const OUString &rName) SAL_OVERRIDE;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <sfx2/dllapi.h> #include <sfx2/dllapi.h>
#include <vector> #include <vector>
#include <boost/function.hpp> #include <functional>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <unotools/ucbstreamhelper.hxx> #include <unotools/ucbstreamhelper.hxx>
...@@ -226,9 +226,9 @@ public: ...@@ -226,9 +226,9 @@ public:
void ShowTooltips( bool bShowTooltips ); void ShowTooltips( bool bShowTooltips );
void filterItems (const boost::function<bool (const ThumbnailViewItem*) > &func); void filterItems (const std::function<bool (const ThumbnailViewItem*) > &func);
void sortItems (const boost::function<bool (const ThumbnailViewItem*, void sortItems (const std::function<bool (const ThumbnailViewItem*,
const ThumbnailViewItem*) > &func); const ThumbnailViewItem*) > &func);
void setItemStateHdl (const Link<> &aLink) { maItemStateHdl = aLink; } void setItemStateHdl (const Link<> &aLink) { maItemStateHdl = aLink; }
...@@ -326,7 +326,7 @@ protected: ...@@ -326,7 +326,7 @@ protected:
Link<> maItemStateHdl; Link<> maItemStateHdl;
ThumbnailItemAttributes* mpItemAttrs; ThumbnailItemAttributes* mpItemAttrs;
boost::function<bool (const ThumbnailViewItem*)> maFilterFunc; std::function<bool (const ThumbnailViewItem*)> maFilterFunc;
}; };
#endif // INCLUDED_SFX2_THUMBNAILVIEW_HXX #endif // INCLUDED_SFX2_THUMBNAILVIEW_HXX
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include <basic/sbxobj.hxx> #include <basic/sbxobj.hxx>
#include <basic/sbxvar.hxx> #include <basic/sbxvar.hxx>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/logic/tribool.hpp> #include <boost/logic/tribool.hpp>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
......
...@@ -225,7 +225,7 @@ std::vector<OUString> TemplateLocalView::getFolderNames() ...@@ -225,7 +225,7 @@ std::vector<OUString> TemplateLocalView::getFolderNames()
} }
std::vector<TemplateItemProperties> std::vector<TemplateItemProperties>
TemplateLocalView::getFilteredItems(const boost::function<bool (const TemplateItemProperties&) > &rFunc) const TemplateLocalView::getFilteredItems(const std::function<bool (const TemplateItemProperties&)> &rFunc) const
{ {
std::vector<TemplateItemProperties> aItems; std::vector<TemplateItemProperties> aItems;
......
...@@ -1170,7 +1170,7 @@ void ThumbnailView::ShowTooltips( bool bShowTooltips ) ...@@ -1170,7 +1170,7 @@ void ThumbnailView::ShowTooltips( bool bShowTooltips )
mbShowTooltips = bShowTooltips; mbShowTooltips = bShowTooltips;
} }
void ThumbnailView::filterItems (const boost::function<bool (const ThumbnailViewItem*) > &func) void ThumbnailView::filterItems(const std::function<bool (const ThumbnailViewItem*)> &func)
{ {
mnFirstLine = 0; // start at the top of the list instead of the current position mnFirstLine = 0; // start at the top of the list instead of the current position
maFilterFunc = func; maFilterFunc = func;
...@@ -1221,7 +1221,7 @@ void ThumbnailView::filterItems (const boost::function<bool (const ThumbnailView ...@@ -1221,7 +1221,7 @@ void ThumbnailView::filterItems (const boost::function<bool (const ThumbnailView
Invalidate(); Invalidate();
} }
void ThumbnailView::sortItems (const boost::function<bool (const ThumbnailViewItem*, const ThumbnailViewItem*) > &func) void ThumbnailView::sortItems(const std::function<bool (const ThumbnailViewItem*, const ThumbnailViewItem*)> &func)
{ {
std::sort(mItemList.begin(),mItemList.end(),func); std::sort(mItemList.begin(),mItemList.end(),func);
......
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
#include <com/sun/star/rendering/XSpriteCanvas.hpp> #include <com/sun/star/rendering/XSpriteCanvas.hpp>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/function.hpp>
using namespace css; using namespace css;
using namespace css::uno; using namespace css::uno;
......
...@@ -43,7 +43,7 @@ namespace sfx2 { namespace sidebar { ...@@ -43,7 +43,7 @@ namespace sfx2 { namespace sidebar {
TabBar::TabBar(vcl::Window* pParentWindow, TabBar::TabBar(vcl::Window* pParentWindow,
const Reference<frame::XFrame>& rxFrame, const Reference<frame::XFrame>& rxFrame,
const boost::function<void(const OUString&)>& rDeckActivationFunctor, const std::function<void (const OUString&)>& rDeckActivationFunctor,
const PopupMenuProvider& rPopupMenuProvider, const PopupMenuProvider& rPopupMenuProvider,
SidebarController* rParentSidebarController SidebarController* rParentSidebarController
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment