Kaydet (Commit) 902d61bc authored tarafından Michael Stahl's avatar Michael Stahl

sdext: replace boost::function with std::function

This one is a bit odd, wonder if that was a bug:

-        aAction(aPredicate);
+        aAction(aPredicate());

Change-Id: I0ddd565b65fe4778a297486805fa7f7a12702224
üst 34d2a07a
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <algorithm> #include <algorithm>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/enable_shared_from_this.hpp> #include <boost/enable_shared_from_this.hpp>
#include <boost/function.hpp>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp> #include <boost/weak_ptr.hpp>
......
...@@ -1874,9 +1874,9 @@ void AccessibleNotes::SetTextView ( ...@@ -1874,9 +1874,9 @@ void AccessibleNotes::SetTextView (
if (mpTextView) if (mpTextView)
{ {
mpTextView->GetCaret()->SetCaretMotionBroadcaster( mpTextView->GetCaret()->SetCaretMotionBroadcaster(
::boost::function<void(sal_Int32,sal_Int32,sal_Int32,sal_Int32)>()); ::std::function<void (sal_Int32,sal_Int32,sal_Int32,sal_Int32)>());
mpTextView->SetTextChangeBroadcaster( mpTextView->SetTextChangeBroadcaster(
::boost::function<void()>()); ::std::function<void ()>());
} }
mpTextView = rpTextView; mpTextView = rpTextView;
......
...@@ -25,8 +25,9 @@ ...@@ -25,8 +25,9 @@
#include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp> #include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/uno/XComponentContext.hpp>
#include <vector> #include <vector>
#include <boost/function.hpp> #include <functional>
namespace sdext { namespace presenter { namespace sdext { namespace presenter {
...@@ -48,7 +49,7 @@ class PresenterConfigurationAccess ...@@ -48,7 +49,7 @@ class PresenterConfigurationAccess
{ {
public: public:
enum WriteMode { READ_WRITE, READ_ONLY }; enum WriteMode { READ_WRITE, READ_ONLY };
typedef ::boost::function<bool( typedef ::std::function<bool (
const OUString&, const OUString&,
const css::uno::Reference<css::beans::XPropertySet>&)> Predicate; const css::uno::Reference<css::beans::XPropertySet>&)> Predicate;
static const OUString msPresenterScreenRootName; static const OUString msPresenterScreenRootName;
...@@ -121,10 +122,10 @@ public: ...@@ -121,10 +122,10 @@ public:
*/ */
void CommitChanges(); void CommitChanges();
typedef ::boost::function<void( typedef ::std::function<void (
const OUString&, const OUString&,
const ::std::vector<css::uno::Any>&) > ItemProcessor; const ::std::vector<css::uno::Any>&) > ItemProcessor;
typedef ::boost::function<void( typedef ::std::function<void (
const OUString&, const OUString&,
const css::uno::Reference<css::beans::XPropertySet>&) > PropertySetProcessor; const css::uno::Reference<css::beans::XPropertySet>&) > PropertySetProcessor;
......
...@@ -82,7 +82,7 @@ bool PresenterFrameworkObserver::True() ...@@ -82,7 +82,7 @@ bool PresenterFrameworkObserver::True()
void SAL_CALL PresenterFrameworkObserver::disposing() void SAL_CALL PresenterFrameworkObserver::disposing()
{ {
if ( ! maAction.empty()) if (maAction)
maAction(false); maAction(false);
Shutdown(); Shutdown();
} }
...@@ -108,7 +108,7 @@ void SAL_CALL PresenterFrameworkObserver::disposing (const lang::EventObject& rE ...@@ -108,7 +108,7 @@ void SAL_CALL PresenterFrameworkObserver::disposing (const lang::EventObject& rE
if (rEvent.Source == mxConfigurationController) if (rEvent.Source == mxConfigurationController)
{ {
mxConfigurationController = NULL; mxConfigurationController = NULL;
if ( ! maAction.empty()) if (maAction)
maAction(false); maAction(false);
} }
} }
...@@ -124,7 +124,7 @@ void SAL_CALL PresenterFrameworkObserver::notifyConfigurationChange ( ...@@ -124,7 +124,7 @@ void SAL_CALL PresenterFrameworkObserver::notifyConfigurationChange (
if (rEvent.Type == "ConfigurationUpdateEnd") if (rEvent.Type == "ConfigurationUpdateEnd")
{ {
Shutdown(); Shutdown();
aAction(aPredicate); aAction(aPredicate());
bDispose = true; bDispose = true;
} }
else if (aPredicate()) else if (aPredicate())
...@@ -136,7 +136,7 @@ void SAL_CALL PresenterFrameworkObserver::notifyConfigurationChange ( ...@@ -136,7 +136,7 @@ void SAL_CALL PresenterFrameworkObserver::notifyConfigurationChange (
if (bDispose) if (bDispose)
{ {
maAction.clear(); maAction = nullptr;
dispose(); dispose();
} }
} }
......
...@@ -24,9 +24,11 @@ ...@@ -24,9 +24,11 @@
#include <com/sun/star/drawing/framework/XConfigurationController.hpp> #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
#include <cppuhelper/basemutex.hxx> #include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase1.hxx> #include <cppuhelper/compbase1.hxx>
#include <boost/function.hpp>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <functional>
namespace sdext { namespace presenter { namespace sdext { namespace presenter {
typedef ::cppu::WeakComponentImplHelper1 < typedef ::cppu::WeakComponentImplHelper1 <
...@@ -42,8 +44,8 @@ class PresenterFrameworkObserver ...@@ -42,8 +44,8 @@ class PresenterFrameworkObserver
public PresenterFrameworkObserverInterfaceBase public PresenterFrameworkObserverInterfaceBase
{ {
public: public:
typedef ::boost::function<bool()> Predicate; typedef ::std::function<bool ()> Predicate;
typedef ::boost::function<void(bool)> Action; typedef ::std::function<void (bool)> Action;
static void RunOnUpdateEnd ( static void RunOnUpdateEnd (
const css::uno::Reference<css::drawing::framework::XConfigurationController>&rxController, const css::uno::Reference<css::drawing::framework::XConfigurationController>&rxController,
......
...@@ -40,7 +40,7 @@ PresenterPaintManager::PresenterPaintManager ( ...@@ -40,7 +40,7 @@ PresenterPaintManager::PresenterPaintManager (
{ {
} }
::boost::function<void(const css::awt::Rectangle& rRepaintBox)> ::std::function<void (const css::awt::Rectangle& rRepaintBox)>
PresenterPaintManager::GetInvalidator ( PresenterPaintManager::GetInvalidator (
const css::uno::Reference<css::awt::XWindow>& rxWindow, const css::uno::Reference<css::awt::XWindow>& rxWindow,
const bool bSynchronous) const bool bSynchronous)
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
#include <com/sun/star/awt/XWindowPeer.hpp> #include <com/sun/star/awt/XWindowPeer.hpp>
#include <com/sun/star/drawing/XPresenterHelper.hpp> #include <com/sun/star/drawing/XPresenterHelper.hpp>
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
#include <boost/function.hpp>
#include <functional>
namespace sdext { namespace presenter { namespace sdext { namespace presenter {
...@@ -45,7 +46,7 @@ public: ...@@ -45,7 +46,7 @@ public:
const css::uno::Reference<css::drawing::XPresenterHelper>& rxPresenterHelper, const css::uno::Reference<css::drawing::XPresenterHelper>& rxPresenterHelper,
const rtl::Reference<PresenterPaneContainer>& rpPaneContainer); const rtl::Reference<PresenterPaneContainer>& rpPaneContainer);
::boost::function<void(const css::awt::Rectangle& rRepaintBox)> ::std::function<void (const css::awt::Rectangle& rRepaintBox)>
GetInvalidator ( GetInvalidator (
const css::uno::Reference<css::awt::XWindow>& rxWindow, const css::uno::Reference<css::awt::XWindow>& rxWindow,
const bool bSynchronous = false); const bool bSynchronous = false);
......
...@@ -196,11 +196,11 @@ PresenterPaneContainer::SharedPaneDescriptor ...@@ -196,11 +196,11 @@ PresenterPaneContainer::SharedPaneDescriptor
pDescriptor->mxPane->SetBackground(rpViewBackground); pDescriptor->mxPane->SetBackground(rpViewBackground);
try try
{ {
if ( ! pDescriptor->maViewInitialization.empty()) if (pDescriptor->maViewInitialization)
pDescriptor->maViewInitialization(rxView); pDescriptor->maViewInitialization(rxView);
// Activate or deactivate the pane/view. // Activate or deactivate the pane/view.
if ( ! pDescriptor->maActivator.empty()) if (pDescriptor->maActivator)
pDescriptor->maActivator(pDescriptor->mbIsActive); pDescriptor->maActivator(pDescriptor->mbIsActive);
} }
catch (RuntimeException&) catch (RuntimeException&)
...@@ -376,7 +376,7 @@ void SAL_CALL PresenterPaneContainer::disposing ( ...@@ -376,7 +376,7 @@ void SAL_CALL PresenterPaneContainer::disposing (
void PresenterPaneContainer::PaneDescriptor::SetActivationState (const bool bIsActive) void PresenterPaneContainer::PaneDescriptor::SetActivationState (const bool bIsActive)
{ {
mbIsActive = bIsActive; mbIsActive = bIsActive;
if ( ! maActivator.empty()) if (maActivator)
maActivator(mbIsActive); maActivator(mbIsActive);
} }
......
...@@ -33,11 +33,13 @@ ...@@ -33,11 +33,13 @@
#include <cppuhelper/basemutex.hxx> #include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase1.hxx> #include <cppuhelper/compbase1.hxx>
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
#include <vector>
#include <boost/function.hpp>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <vector>
#include <functional>
namespace sdext { namespace presenter { namespace sdext { namespace presenter {
class PresenterPaneBase; class PresenterPaneBase;
...@@ -65,7 +67,7 @@ public: ...@@ -65,7 +67,7 @@ public:
virtual void SAL_CALL disposing() SAL_OVERRIDE; virtual void SAL_CALL disposing() SAL_OVERRIDE;
typedef ::boost::function1<void, const css::uno::Reference<css::drawing::framework::XView>&> typedef ::std::function<void (const css::uno::Reference<css::drawing::framework::XView>&)>
ViewInitializationFunction; ViewInitializationFunction;
/** Each pane descriptor holds references to one pane and the view /** Each pane descriptor holds references to one pane and the view
...@@ -79,8 +81,8 @@ public: ...@@ -79,8 +81,8 @@ public:
class PaneDescriptor class PaneDescriptor
{ {
public: public:
typedef ::boost::function<void(bool)> Activator; typedef ::std::function<void (bool)> Activator;
typedef ::boost::function<boost::shared_ptr<PresenterSprite>()> SpriteProvider; typedef ::std::function<boost::shared_ptr<PresenterSprite> ()> SpriteProvider;
css::uno::Reference<css::drawing::framework::XResourceId> mxPaneId; css::uno::Reference<css::drawing::framework::XResourceId> mxPaneId;
OUString msViewURL; OUString msViewURL;
::rtl::Reference<PresenterPaneBase> mxPane; ::rtl::Reference<PresenterPaneBase> mxPane;
......
...@@ -72,7 +72,7 @@ PresenterScrollBar::PresenterScrollBar ( ...@@ -72,7 +72,7 @@ PresenterScrollBar::PresenterScrollBar (
const Reference<XComponentContext>& rxComponentContext, const Reference<XComponentContext>& rxComponentContext,
const Reference<awt::XWindow>& rxParentWindow, const Reference<awt::XWindow>& rxParentWindow,
const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager, const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager,
const ::boost::function<void(double)>& rThumbMotionListener) const ::std::function<void (double)>& rThumbMotionListener)
: PresenterScrollBarInterfaceBase(m_aMutex), : PresenterScrollBarInterfaceBase(m_aMutex),
mxComponentContext(rxComponentContext), mxComponentContext(rxComponentContext),
mxParentWindow(rxParentWindow), mxParentWindow(rxParentWindow),
...@@ -630,7 +630,7 @@ PresenterVerticalScrollBar::PresenterVerticalScrollBar ( ...@@ -630,7 +630,7 @@ PresenterVerticalScrollBar::PresenterVerticalScrollBar (
const Reference<XComponentContext>& rxComponentContext, const Reference<XComponentContext>& rxComponentContext,
const Reference<awt::XWindow>& rxParentWindow, const Reference<awt::XWindow>& rxParentWindow,
const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager, const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager,
const ::boost::function<void(double)>& rThumbMotionListener) const ::std::function<void (double)>& rThumbMotionListener)
: PresenterScrollBar(rxComponentContext, rxParentWindow, rpPaintManager, rThumbMotionListener), : PresenterScrollBar(rxComponentContext, rxParentWindow, rpPaintManager, rThumbMotionListener),
mnScrollBarWidth(0) mnScrollBarWidth(0)
{ {
......
...@@ -28,11 +28,13 @@ ...@@ -28,11 +28,13 @@
#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/basemutex.hxx> #include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase4.hxx> #include <cppuhelper/compbase4.hxx>
#include <boost/function.hpp>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <functional>
namespace sdext { namespace presenter { namespace sdext { namespace presenter {
class PresenterCanvasHelper; class PresenterCanvasHelper;
...@@ -55,7 +57,7 @@ class PresenterScrollBar ...@@ -55,7 +57,7 @@ class PresenterScrollBar
public PresenterScrollBarInterfaceBase public PresenterScrollBarInterfaceBase
{ {
public: public:
typedef ::boost::function<void(double)> ThumbMotionListener; typedef ::std::function<void (double)> ThumbMotionListener;
virtual ~PresenterScrollBar(); virtual ~PresenterScrollBar();
virtual void SAL_CALL disposing() SAL_OVERRIDE; virtual void SAL_CALL disposing() SAL_OVERRIDE;
...@@ -171,7 +173,7 @@ protected: ...@@ -171,7 +173,7 @@ protected:
double mnThumbSize; double mnThumbSize;
double mnLineHeight; double mnLineHeight;
css::geometry::RealPoint2D maDragAnchor; css::geometry::RealPoint2D maDragAnchor;
::boost::function<void(double)> maThumbMotionListener; ::std::function<void (double)> maThumbMotionListener;
Area meButtonDownArea; Area meButtonDownArea;
Area meMouseMoveArea; Area meMouseMoveArea;
css::geometry::RealRectangle2D maBox[__AreaCount__]; css::geometry::RealRectangle2D maBox[__AreaCount__];
...@@ -205,7 +207,7 @@ protected: ...@@ -205,7 +207,7 @@ protected:
const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext, const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext,
const css::uno::Reference<css::awt::XWindow>& rxParentWindow, const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager, const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager,
const ::boost::function<void(double)>& rThumbMotionListener); const ::std::function<void (double)>& rThumbMotionListener);
void Repaint ( void Repaint (
const css::geometry::RealRectangle2D& rBox, const css::geometry::RealRectangle2D& rBox,
...@@ -250,7 +252,7 @@ public: ...@@ -250,7 +252,7 @@ public:
const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext, const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext,
const css::uno::Reference<css::awt::XWindow>& rxParentWindow, const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager, const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager,
const ::boost::function<void(double)>& rThumbMotionListener); const ::std::function<void (double)>& rThumbMotionListener);
virtual ~PresenterVerticalScrollBar(); virtual ~PresenterVerticalScrollBar();
virtual sal_Int32 GetSize() const SAL_OVERRIDE; virtual sal_Int32 GetSize() const SAL_OVERRIDE;
......
...@@ -101,7 +101,7 @@ public: ...@@ -101,7 +101,7 @@ public:
const sal_Int32 nRelativeHorizontalPosition, const sal_Int32 nRelativeHorizontalPosition,
const sal_Int32 nRelativeVerticalPosition) const; const sal_Int32 nRelativeVerticalPosition) const;
css::awt::Rectangle GetBoundingBox (const sal_Int32 nSlideIndex) const; css::awt::Rectangle GetBoundingBox (const sal_Int32 nSlideIndex) const;
void ForAllVisibleSlides (const ::boost::function<void(sal_Int32)>& rAction); void ForAllVisibleSlides (const ::std::function<void (sal_Int32)>& rAction);
sal_Int32 GetFirstVisibleSlideIndex() const; sal_Int32 GetFirstVisibleSlideIndex() const;
sal_Int32 GetLastVisibleSlideIndex() const; sal_Int32 GetLastVisibleSlideIndex() const;
bool SetHorizontalOffset (const double nOffset); bool SetHorizontalOffset (const double nOffset);
...@@ -1394,7 +1394,8 @@ awt::Rectangle PresenterSlideSorter::Layout::GetBoundingBox (const sal_Int32 nSl ...@@ -1394,7 +1394,8 @@ awt::Rectangle PresenterSlideSorter::Layout::GetBoundingBox (const sal_Int32 nSl
aWindowPosition.Y + maPreviewSize.Height)); aWindowPosition.Y + maPreviewSize.Height));
} }
void PresenterSlideSorter::Layout::ForAllVisibleSlides (const ::boost::function<void(sal_Int32)>& rAction) void PresenterSlideSorter::Layout::ForAllVisibleSlides(
const ::std::function<void (sal_Int32)>& rAction)
{ {
for (sal_Int32 nRow=mnFirstVisibleRow; nRow<=mnLastVisibleRow; ++nRow) for (sal_Int32 nRow=mnFirstVisibleRow; nRow<=mnLastVisibleRow; ++nRow)
{ {
......
...@@ -64,7 +64,7 @@ namespace sdext { namespace presenter { ...@@ -64,7 +64,7 @@ namespace sdext { namespace presenter {
PresenterTextView::PresenterTextView ( PresenterTextView::PresenterTextView (
const Reference<XComponentContext>& rxContext, const Reference<XComponentContext>& rxContext,
const Reference<rendering::XCanvas>& rxCanvas, const Reference<rendering::XCanvas>& rxCanvas,
const ::boost::function<void(const css::awt::Rectangle&)>& rInvalidator) const ::std::function<void (const css::awt::Rectangle&)>& rInvalidator)
: mxCanvas(rxCanvas), : mxCanvas(rxCanvas),
mbDoOuput(true), mbDoOuput(true),
mxBreakIterator(), mxBreakIterator(),
...@@ -139,7 +139,7 @@ void PresenterTextView::SetText (const Reference<text::XText>& rxText) ...@@ -139,7 +139,7 @@ void PresenterTextView::SetText (const Reference<text::XText>& rxText)
} }
void PresenterTextView::SetTextChangeBroadcaster ( void PresenterTextView::SetTextChangeBroadcaster (
const ::boost::function<void()>& rBroadcaster) const ::std::function<void ()>& rBroadcaster)
{ {
maTextChangeBroadcaster = rBroadcaster; maTextChangeBroadcaster = rBroadcaster;
} }
...@@ -1084,8 +1084,8 @@ void PresenterTextParagraph::SetupCellArray ( ...@@ -1084,8 +1084,8 @@ void PresenterTextParagraph::SetupCellArray (
//===== PresenterTextCaret ================================================---- //===== PresenterTextCaret ================================================----
PresenterTextCaret::PresenterTextCaret ( PresenterTextCaret::PresenterTextCaret (
const ::boost::function<css::awt::Rectangle(const sal_Int32,const sal_Int32)>& rCharacterBoundsAccess, const ::std::function<css::awt::Rectangle (const sal_Int32,const sal_Int32)>& rCharacterBoundsAccess,
const ::boost::function<void(const css::awt::Rectangle&)>& rInvalidator) const ::std::function<void (const css::awt::Rectangle&)>& rInvalidator)
: mnParagraphIndex(-1), : mnParagraphIndex(-1),
mnCharacterIndex(-1), mnCharacterIndex(-1),
mnCaretBlinkTaskId(0), mnCaretBlinkTaskId(0),
...@@ -1164,7 +1164,7 @@ void PresenterTextCaret::SetPosition ( ...@@ -1164,7 +1164,7 @@ void PresenterTextCaret::SetPosition (
void PresenterTextCaret::SetCaretMotionBroadcaster ( void PresenterTextCaret::SetCaretMotionBroadcaster (
const ::boost::function<void(sal_Int32,sal_Int32,sal_Int32,sal_Int32)>& rBroadcaster) const ::std::function<void (sal_Int32,sal_Int32,sal_Int32,sal_Int32)>& rBroadcaster)
{ {
maBroadcaster = rBroadcaster; maBroadcaster = rBroadcaster;
} }
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <cppuhelper/compbase1.hxx> #include <cppuhelper/compbase1.hxx>
#include <cppuhelper/basemutex.hxx> #include <cppuhelper/basemutex.hxx>
#include <functional>
namespace sdext { namespace presenter { namespace sdext { namespace presenter {
...@@ -41,9 +42,9 @@ class PresenterTextCaret ...@@ -41,9 +42,9 @@ class PresenterTextCaret
{ {
public: public:
PresenterTextCaret ( PresenterTextCaret (
const ::boost::function<css::awt::Rectangle(const sal_Int32,const sal_Int32)>& const ::std::function<css::awt::Rectangle (const sal_Int32,const sal_Int32)>&
rCharacterBoundsAccess, rCharacterBoundsAccess,
const ::boost::function<void(const css::awt::Rectangle&)>& const ::std::function<void (const css::awt::Rectangle&)>&
rInvalidator); rInvalidator);
~PresenterTextCaret(); ~PresenterTextCaret();
...@@ -64,7 +65,7 @@ public: ...@@ -64,7 +65,7 @@ public:
when the caret changes position. when the caret changes position.
*/ */
void SetCaretMotionBroadcaster ( void SetCaretMotionBroadcaster (
const ::boost::function<void(sal_Int32,sal_Int32,sal_Int32,sal_Int32)>& rBroadcaster); const ::std::function<void (sal_Int32,sal_Int32,sal_Int32,sal_Int32)>& rBroadcaster);
css::awt::Rectangle GetBounds() const; css::awt::Rectangle GetBounds() const;
...@@ -73,9 +74,9 @@ private: ...@@ -73,9 +74,9 @@ private:
sal_Int32 mnCharacterIndex; sal_Int32 mnCharacterIndex;
sal_Int32 mnCaretBlinkTaskId; sal_Int32 mnCaretBlinkTaskId;
bool mbIsCaretVisible; bool mbIsCaretVisible;
const ::boost::function<css::awt::Rectangle(const sal_Int32,const sal_Int32)> maCharacterBoundsAccess; const ::std::function<css::awt::Rectangle (const sal_Int32,const sal_Int32)> maCharacterBoundsAccess;
const ::boost::function<void(const css::awt::Rectangle&)> maInvalidator; const ::std::function<void (const css::awt::Rectangle&)> maInvalidator;
::boost::function<void(sal_Int32,sal_Int32,sal_Int32,sal_Int32)> maBroadcaster; ::std::function<void (sal_Int32,sal_Int32,sal_Int32,sal_Int32)> maBroadcaster;
css::awt::Rectangle maCaretBounds; css::awt::Rectangle maCaretBounds;
void InvertCaret(); void InvertCaret();
...@@ -219,9 +220,9 @@ public: ...@@ -219,9 +220,9 @@ public:
PresenterTextView ( PresenterTextView (
const css::uno::Reference<css::uno::XComponentContext>& rxContext, const css::uno::Reference<css::uno::XComponentContext>& rxContext,
const css::uno::Reference<css::rendering::XCanvas>& rxCanvas, const css::uno::Reference<css::rendering::XCanvas>& rxCanvas,
const ::boost::function<void(const css::awt::Rectangle&)>& rInvalidator); const ::std::function<void (const css::awt::Rectangle&)>& rInvalidator);
void SetText (const css::uno::Reference<css::text::XText>& rxText); void SetText (const css::uno::Reference<css::text::XText>& rxText);
void SetTextChangeBroadcaster (const ::boost::function<void()>& rBroadcaster); void SetTextChangeBroadcaster(const ::std::function<void ()>& rBroadcaster);
void SetLocation (const css::geometry::RealPoint2D& rLocation); void SetLocation (const css::geometry::RealPoint2D& rLocation);
void SetSize (const css::geometry::RealSize2D& rSize); void SetSize (const css::geometry::RealSize2D& rSize);
...@@ -264,10 +265,10 @@ private: ...@@ -264,10 +265,10 @@ private:
SharedPresenterTextCaret mpCaret; SharedPresenterTextCaret mpCaret;
double mnLeftOffset; double mnLeftOffset;
double mnTopOffset; double mnTopOffset;
const ::boost::function<void(const css::awt::Rectangle&)> maInvalidator; const ::std::function<void (const css::awt::Rectangle&)> maInvalidator;
bool mbIsFormatPending; bool mbIsFormatPending;
sal_Int32 mnCharacterCount; sal_Int32 mnCharacterCount;
::boost::function<void()> maTextChangeBroadcaster; ::std::function<void ()> maTextChangeBroadcaster;
void RequestFormat(); void RequestFormat();
void Format(); void Format();
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <osl/doublecheckedlocking.h> #include <osl/doublecheckedlocking.h>
#include <osl/thread.hxx> #include <osl/thread.hxx>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/enable_shared_from_this.hpp> #include <boost/enable_shared_from_this.hpp>
#include <set> #include <set>
#include <iterator> #include <iterator>
...@@ -274,8 +273,7 @@ void SAL_CALL TimerScheduler::run() ...@@ -274,8 +273,7 @@ void SAL_CALL TimerScheduler::run()
else else
{ {
// Execute task. // Execute task.
if ( ! pTask->maTask.empty() if (pTask->maTask && !pTask->mbIsCanceled)
&& ! pTask->mbIsCanceled)
{ {
pTask->maTask(aCurrentTime); pTask->maTask(aCurrentTime);
......
...@@ -28,7 +28,10 @@ ...@@ -28,7 +28,10 @@
#include <osl/time.h> #include <osl/time.h>
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
#include <sal/types.h> #include <sal/types.h>
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <functional>
#include <vector> #include <vector>
namespace com { namespace sun { namespace star { namespace uno { namespace com { namespace sun { namespace star { namespace uno {
...@@ -45,7 +48,7 @@ class PresenterTimer ...@@ -45,7 +48,7 @@ class PresenterTimer
public: public:
/** A task is called with the current time. /** A task is called with the current time.
*/ */
typedef ::boost::function<void(const TimeValue&)> Task; typedef ::std::function<void (const TimeValue&)> Task;
static const sal_Int32 NotAValidTaskId = 0; static const sal_Int32 NotAValidTaskId = 0;
......
...@@ -43,9 +43,11 @@ ...@@ -43,9 +43,11 @@
#include <com/sun/star/drawing/framework/XView.hpp> #include <com/sun/star/drawing/framework/XView.hpp>
#include <com/sun/star/drawing/framework/XResourceId.hpp> #include <com/sun/star/drawing/framework/XResourceId.hpp>
#include <com/sun/star/frame/XController.hpp> #include <com/sun/star/frame/XController.hpp>
#include <boost/function.hpp>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <functional>
namespace { namespace {
typedef cppu::WeakComponentImplHelper5< typedef cppu::WeakComponentImplHelper5<
css::awt::XWindowListener, css::awt::XWindowListener,
...@@ -76,7 +78,7 @@ class PresenterToolBar ...@@ -76,7 +78,7 @@ class PresenterToolBar
public CachablePresenterView public CachablePresenterView
{ {
public: public:
typedef ::boost::function<void()> Action; typedef ::std::function<void ()> Action;
enum Anchor { Left, Center, Right }; enum Anchor { Left, Center, Right };
......
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