Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
2d0e58e1
Kaydet (Commit)
2d0e58e1
authored
Nis 14, 2012
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
unusedcode: PresenterAnimation and PresenterAnimator
üst
3a603d37
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
0 additions
and
403 deletions
+0
-403
Library_presenter.mk
sdext/Library_presenter.mk
+0
-2
PresenterAnimation.cxx
sdext/source/presenter/PresenterAnimation.cxx
+0
-75
PresenterAnimation.hxx
sdext/source/presenter/PresenterAnimation.hxx
+0
-110
PresenterAnimator.cxx
sdext/source/presenter/PresenterAnimator.cxx
+0
-139
PresenterAnimator.hxx
sdext/source/presenter/PresenterAnimator.hxx
+0
-69
PresenterController.cxx
sdext/source/presenter/PresenterController.cxx
+0
-3
PresenterController.hxx
sdext/source/presenter/PresenterController.hxx
+0
-2
PresenterWindowManager.cxx
sdext/source/presenter/PresenterWindowManager.cxx
+0
-2
unusedcode.easy
unusedcode.easy
+0
-1
No files found.
sdext/Library_presenter.mk
Dosyayı görüntüle @
2d0e58e1
...
@@ -44,8 +44,6 @@ $(eval $(call gb_Library_use_libraries,PresenterScreen,\
...
@@ -44,8 +44,6 @@ $(eval $(call gb_Library_use_libraries,PresenterScreen,\
$(eval $(call gb_Library_add_exception_objects,PresenterScreen,\
$(eval $(call gb_Library_add_exception_objects,PresenterScreen,\
sdext/source/presenter/PresenterAccessibility \
sdext/source/presenter/PresenterAccessibility \
sdext/source/presenter/PresenterAnimation \
sdext/source/presenter/PresenterAnimator \
sdext/source/presenter/PresenterBitmapContainer \
sdext/source/presenter/PresenterBitmapContainer \
sdext/source/presenter/PresenterButton \
sdext/source/presenter/PresenterButton \
sdext/source/presenter/PresenterCanvasHelper \
sdext/source/presenter/PresenterCanvasHelper \
...
...
sdext/source/presenter/PresenterAnimation.cxx
deleted
100644 → 0
Dosyayı görüntüle @
3a603d37
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "PresenterAnimation.hxx"
#include <osl/time.h>
namespace
sdext
{
namespace
presenter
{
sal_uInt64
GetCurrentTime
(
void
)
{
TimeValue
aTimeValue
;
if
(
osl_getSystemTime
(
&
aTimeValue
))
return
sal_uInt64
(
aTimeValue
.
Seconds
*
1000.0
+
aTimeValue
.
Nanosec
/
1000000.0
);
else
return
0
;
}
PresenterAnimation
::
PresenterAnimation
(
const
sal_uInt64
nStartDelay
,
const
sal_uInt64
nTotalDuration
,
const
sal_uInt64
nStepDuration
)
:
mnStartTime
(
GetCurrentTime
()
+
nStartDelay
),
mnTotalDuration
(
nTotalDuration
),
mnStepDuration
(
nStepDuration
)
{
}
PresenterAnimation
::~
PresenterAnimation
(
void
)
{
}
sal_uInt64
PresenterAnimation
::
GetStartTime
(
void
)
{
return
mnStartTime
;
}
sal_uInt64
PresenterAnimation
::
GetEndTime
(
void
)
{
return
mnStartTime
+
mnTotalDuration
;
}
sal_uInt64
PresenterAnimation
::
GetStepDuration
(
void
)
{
return
mnStepDuration
;
}
}
}
// end of namespace ::sdext::presenter
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sdext/source/presenter/PresenterAnimation.hxx
deleted
100644 → 0
Dosyayı görüntüle @
3a603d37
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef SDEXT_PRESENTER_ANIMATION_HXX
#define SDEXT_PRESENTER_ANIMATION_HXX
#include <sal/types.h>
#include <boost/function.hpp>
#include <boost/noncopyable.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <vector>
namespace
sdext
{
namespace
presenter
{
/** Base class for animations handled by a PresenterAnimator object.
A PresenterAnimation objects basically states when it wants to be
started, how long it runs, and in what steps it wants to be called back
while running.
When a PresenterAnimation object is active/running its Run() method is
called back with increasing values between 0 and 1.
*/
class
PresenterAnimation
:
private
::
boost
::
noncopyable
{
public
:
/** Create a new PresenterAnimation object.
@param nStartDelay
The delay in ms (milliseconds) from this call until the new
object is to be activated.
@param nTotalDuration
The duration in ms the Run() method is to be called with
increasing values between 0 and 1.
@param nStepDuration
The duration between calls to Run(). This leads to approximately
nTotalDuration/nStepDuration calls to Run(). The exact duration
of each step may vary depending on system load an other influences.
*/
PresenterAnimation
(
const
sal_uInt64
nStartDelay
,
const
sal_uInt64
nTotalDuration
,
const
sal_uInt64
nStepDuration
);
virtual
~
PresenterAnimation
(
void
);
/** Return the absolute start time in a system dependent format.
At about this time the Run() method will be called with a value of 0.
*/
sal_uInt64
GetStartTime
(
void
);
/** Return the absolute end time in a system dependent format.
At about this time the Run() method will be called with a value of 1.
*/
sal_uInt64
GetEndTime
(
void
);
/** Return the duration of each step in ms.
*/
sal_uInt64
GetStepDuration
(
void
);
typedef
::
boost
::
function
<
void
(
void
)
>
Callback
;
/** Called with nProgress taking on values between 0 and 1.
@param nProgress
A value between 0 and 1.
@param nCurrentTime
Current time in a system dependent format.
*/
virtual
void
Run
(
const
double
nProgress
,
const
sal_uInt64
nCurrentTime
)
=
0
;
private
:
const
sal_uInt64
mnStartTime
;
const
sal_uInt64
mnTotalDuration
;
const
sal_uInt64
mnStepDuration
;
};
sal_uInt64
GetCurrentTime
(
void
);
inline
sal_uInt32
GetSeconds
(
const
sal_uInt64
nTime
)
{
return
sal_uInt32
(
nTime
/
1000
);
}
inline
sal_uInt32
GetNanoSeconds
(
const
sal_uInt64
nTime
)
{
return
sal_uInt32
((
nTime
%
1000
)
*
1000000
);
}
typedef
::
boost
::
shared_ptr
<
PresenterAnimation
>
SharedPresenterAnimation
;
}
}
// end of namespace ::sdext::presenter
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sdext/source/presenter/PresenterAnimator.cxx
deleted
100644 → 0
Dosyayı görüntüle @
3a603d37
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "PresenterAnimator.hxx"
#include "PresenterTimer.hxx"
#include <osl/diagnose.h>
#include <osl/time.h>
#include <salhelper/timer.hxx>
#include <boost/bind.hpp>
#include <boost/function.hpp>
namespace
sdext
{
namespace
presenter
{
//===== PresenterAnimator =====================================================
PresenterAnimator
::
PresenterAnimator
(
void
)
:
maFutureAnimations
(),
maActiveAnimations
(),
mnCurrentTaskId
(
0
),
mnNextTime
(
0
)
{
}
PresenterAnimator
::~
PresenterAnimator
(
void
)
{
PresenterTimer
::
CancelTask
(
mnCurrentTaskId
);
}
void
PresenterAnimator
::
Process
(
void
)
{
::
osl
::
MutexGuard
aGuard
(
m_aMutex
);
mnNextTime
=
0
;
const
sal_uInt64
nCurrentTime
(
GetCurrentTime
());
ActivateAnimations
(
nCurrentTime
);
while
(
!
maActiveAnimations
.
empty
())
{
sal_uInt64
nRequestedTime
(
maActiveAnimations
.
begin
()
->
first
);
SharedPresenterAnimation
pAnimation
(
maActiveAnimations
.
begin
()
->
second
);
if
(
nRequestedTime
>
nCurrentTime
)
break
;
maActiveAnimations
.
erase
(
maActiveAnimations
.
begin
());
const
double
nTotalDuration
(
double
(
pAnimation
->
GetEndTime
()
-
pAnimation
->
GetStartTime
()));
double
nProgress
(
nTotalDuration
>
0
?
(
nCurrentTime
-
pAnimation
->
GetStartTime
())
/
nTotalDuration
:
1
);
if
(
nProgress
<=
0
)
nProgress
=
0
;
else
if
(
nProgress
>=
1
)
nProgress
=
1
;
OSL_TRACE
(
"running animation step at %f (requested was %f) %f
\n
"
,
nCurrentTime
/
1e6
,
nRequestedTime
/
1e6
,
nProgress
);
pAnimation
->
Run
(
nProgress
,
nCurrentTime
);
if
(
nCurrentTime
<
pAnimation
->
GetEndTime
())
maActiveAnimations
.
insert
(
AnimationList
::
value_type
(
nCurrentTime
+
pAnimation
->
GetStepDuration
(),
pAnimation
));
}
ScheduleNextRun
();
}
void
PresenterAnimator
::
ActivateAnimations
(
const
sal_uInt64
nCurrentTime
)
{
while
(
!
maFutureAnimations
.
empty
()
&&
maFutureAnimations
.
begin
()
->
first
<=
nCurrentTime
)
{
SharedPresenterAnimation
pAnimation
(
maFutureAnimations
.
begin
()
->
second
);
maActiveAnimations
.
insert
(
*
maFutureAnimations
.
begin
());
maFutureAnimations
.
erase
(
maFutureAnimations
.
begin
());
}
}
void
PresenterAnimator
::
ScheduleNextRun
(
void
)
{
sal_uInt64
nStartTime
(
0
);
if
(
!
maActiveAnimations
.
empty
())
{
nStartTime
=
maActiveAnimations
.
begin
()
->
first
;
if
(
!
maFutureAnimations
.
empty
())
if
(
maFutureAnimations
.
begin
()
->
first
<
nStartTime
)
nStartTime
=
maFutureAnimations
.
begin
()
->
first
;
}
else
if
(
!
maFutureAnimations
.
empty
())
nStartTime
=
maFutureAnimations
.
begin
()
->
first
;
if
(
nStartTime
>
0
)
ScheduleNextRun
(
nStartTime
);
}
void
PresenterAnimator
::
ScheduleNextRun
(
const
sal_uInt64
nStartTime
)
{
if
(
mnNextTime
==
0
||
nStartTime
<
mnNextTime
)
{
mnNextTime
=
nStartTime
;
::
salhelper
::
TTimeValue
aTimeValue
(
GetSeconds
(
mnNextTime
),
GetNanoSeconds
(
mnNextTime
));
PresenterTimer
::
ScheduleSingleTaskAbsolute
(
::
boost
::
bind
(
&
PresenterAnimator
::
Process
,
this
),
aTimeValue
);
}
}
}
}
// end of namespace ::sdext::presenter
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sdext/source/presenter/PresenterAnimator.hxx
deleted
100644 → 0
Dosyayı görüntüle @
3a603d37
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef SDEXT_PRESENTER_ANIMATOR_HXX
#define SDEXT_PRESENTER_ANIMATOR_HXX
#include "PresenterAnimation.hxx"
#include <cppuhelper/basemutex.hxx>
#include <map>
#include <boost/noncopyable.hpp>
#include <boost/scoped_ptr.hpp>
namespace
sdext
{
namespace
presenter
{
/** Simple animation management. See PresenterAnimation for details of
how to specify animations.
*/
class
PresenterAnimator
:
private
::
boost
::
noncopyable
,
private
::
cppu
::
BaseMutex
{
public
:
PresenterAnimator
(
void
);
virtual
~
PresenterAnimator
(
void
);
private
:
typedef
::
std
::
multimap
<
sal_uInt64
,
SharedPresenterAnimation
>
AnimationList
;
AnimationList
maFutureAnimations
;
AnimationList
maActiveAnimations
;
sal_Int32
mnCurrentTaskId
;
sal_uInt64
mnNextTime
;
void
Process
(
void
);
void
ActivateAnimations
(
const
sal_uInt64
nCurrentTime
);
void
ScheduleNextRun
(
void
);
void
ScheduleNextRun
(
const
sal_uInt64
nStartTime
);
};
}
}
// end of namespace ::sdext::presenter
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sdext/source/presenter/PresenterController.cxx
Dosyayı görüntüle @
2d0e58e1
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
#include "PresenterController.hxx"
#include "PresenterController.hxx"
#include "PresenterAccessibility.hxx"
#include "PresenterAccessibility.hxx"
#include "PresenterAnimator.hxx"
#include "PresenterCanvasHelper.hxx"
#include "PresenterCanvasHelper.hxx"
#include "PresenterCurrentSlideObserver.hxx"
#include "PresenterCurrentSlideObserver.hxx"
#include "PresenterFrameworkObserver.hxx"
#include "PresenterFrameworkObserver.hxx"
...
@@ -118,7 +117,6 @@ PresenterController::PresenterController (
...
@@ -118,7 +117,6 @@ PresenterController::PresenterController (
mpTheme
(),
mpTheme
(),
mxMainWindow
(),
mxMainWindow
(),
mpPaneBorderPainter
(),
mpPaneBorderPainter
(),
mpAnimator
(
new
PresenterAnimator
()),
mpCanvasHelper
(
new
PresenterCanvasHelper
()),
mpCanvasHelper
(
new
PresenterCanvasHelper
()),
mxPresenterHelper
(),
mxPresenterHelper
(),
mpPaintManager
(),
mpPaintManager
(),
...
@@ -254,7 +252,6 @@ void PresenterController::disposing (void)
...
@@ -254,7 +252,6 @@ void PresenterController::disposing (void)
if
(
xComponent
.
is
())
if
(
xComponent
.
is
())
xComponent
->
dispose
();
xComponent
->
dispose
();
}
}
mpAnimator
.
reset
();
mpCanvasHelper
.
reset
();
mpCanvasHelper
.
reset
();
{
{
Reference
<
lang
::
XComponent
>
xComponent
(
mxPresenterHelper
,
UNO_QUERY
);
Reference
<
lang
::
XComponent
>
xComponent
(
mxPresenterHelper
,
UNO_QUERY
);
...
...
sdext/source/presenter/PresenterController.hxx
Dosyayı görüntüle @
2d0e58e1
...
@@ -63,7 +63,6 @@ namespace css = ::com::sun::star;
...
@@ -63,7 +63,6 @@ namespace css = ::com::sun::star;
namespace
sdext
{
namespace
presenter
{
namespace
sdext
{
namespace
presenter
{
class
PresenterAnimator
;
class
PresenterCanvasHelper
;
class
PresenterCanvasHelper
;
class
PresenterPaintManager
;
class
PresenterPaintManager
;
class
PresenterPaneAnimator
;
class
PresenterPaneAnimator
;
...
@@ -224,7 +223,6 @@ private:
...
@@ -224,7 +223,6 @@ private:
::
boost
::
shared_ptr
<
PresenterTheme
>
mpTheme
;
::
boost
::
shared_ptr
<
PresenterTheme
>
mpTheme
;
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>
mxMainWindow
;
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>
mxMainWindow
;
::
rtl
::
Reference
<
PresenterPaneBorderPainter
>
mpPaneBorderPainter
;
::
rtl
::
Reference
<
PresenterPaneBorderPainter
>
mpPaneBorderPainter
;
::
boost
::
shared_ptr
<
PresenterAnimator
>
mpAnimator
;
::
boost
::
shared_ptr
<
PresenterCanvasHelper
>
mpCanvasHelper
;
::
boost
::
shared_ptr
<
PresenterCanvasHelper
>
mpCanvasHelper
;
css
::
uno
::
Reference
<
css
::
drawing
::
XPresenterHelper
>
mxPresenterHelper
;
css
::
uno
::
Reference
<
css
::
drawing
::
XPresenterHelper
>
mxPresenterHelper
;
::
boost
::
shared_ptr
<
PresenterPaintManager
>
mpPaintManager
;
::
boost
::
shared_ptr
<
PresenterPaintManager
>
mpPaintManager
;
...
...
sdext/source/presenter/PresenterWindowManager.cxx
Dosyayı görüntüle @
2d0e58e1
...
@@ -30,8 +30,6 @@
...
@@ -30,8 +30,6 @@
//#define ENABLE_PANE_RESIZING
//#define ENABLE_PANE_RESIZING
#include "PresenterWindowManager.hxx"
#include "PresenterWindowManager.hxx"
#include "PresenterAnimation.hxx"
#include "PresenterAnimator.hxx"
#include "PresenterController.hxx"
#include "PresenterController.hxx"
#include "PresenterGeometryHelper.hxx"
#include "PresenterGeometryHelper.hxx"
#include "PresenterHelper.hxx"
#include "PresenterHelper.hxx"
...
...
unusedcode.easy
Dosyayı görüntüle @
2d0e58e1
...
@@ -774,7 +774,6 @@ sd::ViewShellBase::RegisterFactory(unsigned short)
...
@@ -774,7 +774,6 @@ sd::ViewShellBase::RegisterFactory(unsigned short)
sd::slidesorter::controller::SelectionFunction::EventDescriptor::EventDescriptor(KeyEvent const&, sd::slidesorter::SlideSorter&)
sd::slidesorter::controller::SelectionFunction::EventDescriptor::EventDescriptor(KeyEvent const&, sd::slidesorter::SlideSorter&)
sd::slidesorter::view::Button::IsDown() const
sd::slidesorter::view::Button::IsDown() const
sd::slidesorter::view::FontProvider::GetFont(OutputDevice const&)
sd::slidesorter::view::FontProvider::GetFont(OutputDevice const&)
sdext::presenter::PresenterAnimation::PresenterAnimation(unsigned long, unsigned long, unsigned long)
sdr::animation::Scheduler::Reset(unsigned int)
sdr::animation::Scheduler::Reset(unsigned int)
sdr::contact::ViewContactOfPageObj::GetReferencedPage() const
sdr::contact::ViewContactOfPageObj::GetReferencedPage() const
sdr::contact::ViewContactOfSdrMediaObj::hasPreferredSize() const
sdr::contact::ViewContactOfSdrMediaObj::hasPreferredSize() const
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment