[Libreoffice-commits] core.git: 4 commits - canvas/source officecfg/registry postprocess/Rdb_services.mk slideshow/source
Thorsten Behrens
tbehrens at suse.com
Tue Oct 8 03:35:46 PDT 2013
canvas/source/opengl/ogl_spritedevicehelper.cxx | 2
officecfg/registry/data/org/openoffice/Office/Canvas.xcu | 23 +---
postprocess/Rdb_services.mk | 3
slideshow/source/engine/pointersymbol.cxx | 73 +++++----------
slideshow/source/engine/pointersymbol.hxx | 20 ++--
slideshow/source/engine/slideshowimpl.cxx | 17 ---
slideshow/source/engine/waitsymbol.hxx | 1
7 files changed, 53 insertions(+), 86 deletions(-)
New commits:
commit f448d677bcaa9ad68876ea292d93978f729335a0
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Tue Oct 8 12:25:11 2013 +0200
oglcanvas: cleanup canvas services, demote oglcanvas a bit.
Remove long-dead service instances, demote oglcanvas to be below
cairocanvas (we're not quite mature yet).
Change-Id: Ie6051895fd93a1a518eaa4fb4f71b62bff330a83
diff --git a/officecfg/registry/data/org/openoffice/Office/Canvas.xcu b/officecfg/registry/data/org/openoffice/Office/Canvas.xcu
index 266e4d2..8851827 100644
--- a/officecfg/registry/data/org/openoffice/Office/Canvas.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Canvas.xcu
@@ -31,50 +31,37 @@
<value oor:separator=",">com.sun.star.comp.rendering.BitmapCanvas.GDI+,
com.sun.star.comp.rendering.Canvas.GDI+,
com.sun.star.comp.rendering.Canvas.Cairo,
- com.sun.star.comp.rendering.Canvas.GL,
- com.sun.star.comp.rendering.Canvas.Java,
com.sun.star.comp.rendering.Canvas.VCL
</value>
</prop>
<prop oor:name="AcceleratedImplementations" oor:type="oor:string-list">
- <value oor:separator=",">com.sun.star.comp.rendering.Canvas.GL,
- com.sun.star.comp.rendering.Canvas.Java
- </value>
+ <value oor:separator=","/>
</prop>
<prop oor:name="AntialiasingImplementations" oor:type="oor:string-list">
<value oor:separator=",">com.sun.star.comp.rendering.BitmapCanvas.GDI+,
com.sun.star.comp.rendering.Canvas.GDI+,
- com.sun.star.comp.rendering.Canvas.Cairo,
- com.sun.star.comp.rendering.Canvas.GL,
- com.sun.star.comp.rendering.Canvas.Java
+ com.sun.star.comp.rendering.Canvas.Cairo
</value>
</prop>
</node>
<node oor:name="com.sun.star.rendering.SpriteCanvas" oor:op="replace">
<prop oor:name="PreferredImplementations" oor:type="oor:string-list">
<value oor:separator=",">com.sun.star.comp.rendering.SpriteCanvas.DX9,
- com.sun.star.comp.rendering.SpriteCanvas.DX5,
- com.sun.star.comp.rendering.SpriteCanvas.OGL,
com.sun.star.comp.rendering.SpriteCanvas.Cairo,
- com.sun.star.comp.rendering.SpriteCanvas.GL,
- com.sun.star.comp.rendering.SpriteCanvas.Java,
+ com.sun.star.comp.rendering.SpriteCanvas.OGL,
com.sun.star.comp.rendering.SpriteCanvas.VCL
</value>
</prop>
<prop oor:name="AcceleratedImplementations" oor:type="oor:string-list">
<value oor:separator=",">com.sun.star.comp.rendering.SpriteCanvas.DX9,
- com.sun.star.comp.rendering.SpriteCanvas.DX5,
com.sun.star.comp.rendering.SpriteCanvas.Cairo,
- com.sun.star.comp.rendering.SpriteCanvas.GL,
- com.sun.star.comp.rendering.SpriteCanvas.Java
+ com.sun.star.comp.rendering.SpriteCanvas.OGL
</value>
</prop>
<prop oor:name="AntialiasingImplementations" oor:type="oor:string-list">
<value oor:separator=",">com.sun.star.comp.rendering.SpriteCanvas.DX9,
- com.sun.star.comp.rendering.SpriteCanvas.DX5,
com.sun.star.comp.rendering.SpriteCanvas.Cairo,
- com.sun.star.comp.rendering.SpriteCanvas.GL,
- com.sun.star.comp.rendering.SpriteCanvas.Java
+ com.sun.star.comp.rendering.SpriteCanvas.OGL
</value>
</prop>
</node>
commit d9b2328c5447a505f11fd0a47d375174abcbd2c1
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Tue Oct 8 12:23:59 2013 +0200
slideshow: remove cruft, align formatting.
Change-Id: I119cf2461f4a77057cdbc19349561cd24991e2dd
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index 43c5aaa..4c59b25 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1712,14 +1712,6 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
return false;
// TODO(F3): Forward to slides!
-// if( bOldValue != mbImageAnimationsAllowed )
-// {
-// if( mbImageAnimationsAllowed )
-// maEventMultiplexer.notifyIntrinsicAnimationsEnabled();
-// else
-// maEventMultiplexer.notifyIntrinsicAnimationsDisabled();
-// }
-
return true;
}
@@ -1800,10 +1792,10 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
{
bool visible;
if (!(rProperty.Value >>= visible))
- {
return false;
- }
+
mpPointerSymbol->setVisible(visible);
+ return true;
}
if ( rProperty.Name == "PointerPosition")
@@ -1812,12 +1804,11 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
if (! (rProperty.Value >>= pos))
return false;
- // std::cerr<<"Received pos at :(" << pos.X << ","<<pos.Y << ")" << std::endl;
mpPointerSymbol->viewsChanged(pos);
+ return true;
}
- if (rProperty.Name.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("NoSlideTransitions") ))
+ if (rProperty.Name == "NoSlideTransitions" )
{
return (rProperty.Value >>= mbNoSlideTransitions);
}
commit eff346b78c3a0bd9855dfa9b4dc92cfbf7a9ee27
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Tue Oct 8 12:22:23 2013 +0200
oglcanvas: XCanvas != XBitmap kill another instance
This crept in from gsoc, some whitespace / formatting alignment
with slideshow conventions, added doxygen class mission statement.
Change-Id: Ie9837fc437d9827dc8fa6b1c25a3f46a638bac51
diff --git a/slideshow/source/engine/pointersymbol.cxx b/slideshow/source/engine/pointersymbol.cxx
index 0516431..9ff5892 100644
--- a/slideshow/source/engine/pointersymbol.cxx
+++ b/slideshow/source/engine/pointersymbol.cxx
@@ -28,8 +28,7 @@
#include <basegfx/vector/b2dvector.hxx>
#include <com/sun/star/rendering/XCanvas.hpp>
-#include <com/sun/star/geometry/IntegerSize2D.hpp>
-#include "com/sun/star/uno/Reference.hxx"
+#include <com/sun/star/presentation/XSlideShowView.hpp>
#include "pointersymbol.hxx"
#include "eventmultiplexer.hxx"
@@ -47,9 +46,9 @@ const sal_Int32 LEFT_BORDER_SPACE = 10;
const sal_Int32 LOWER_BORDER_SPACE = 10;
PointerSymbolSharedPtr PointerSymbol::create( const uno::Reference<rendering::XBitmap>& xBitmap,
- ScreenUpdater& rScreenUpdater,
- EventMultiplexer& rEventMultiplexer,
- const UnoViewContainer& rViewContainer )
+ ScreenUpdater& rScreenUpdater,
+ EventMultiplexer& rEventMultiplexer,
+ const UnoViewContainer& rViewContainer )
{
PointerSymbolSharedPtr pRet(
new PointerSymbol( xBitmap,
@@ -62,11 +61,12 @@ PointerSymbolSharedPtr PointerSymbol::create( const uno::Reference<rendering::XB
}
PointerSymbol::PointerSymbol( uno::Reference<rendering::XBitmap> const & xBitmap,
- ScreenUpdater& rScreenUpdater,
- const UnoViewContainer& rViewContainer ) :
+ ScreenUpdater& rScreenUpdater,
+ const UnoViewContainer& rViewContainer ) :
mxBitmap(xBitmap),
maViews(),
mrScreenUpdater( rScreenUpdater ),
+ maPos(),
mbVisible(false)
{
std::for_each( rViewContainer.begin(),
@@ -102,35 +102,14 @@ void PointerSymbol::setVisible( const bool bVisible )
}
}
-basegfx::B2DPoint PointerSymbol::calcSpritePos( UnoViewSharedPtr const & rView ) const
+basegfx::B2DPoint PointerSymbol::calcSpritePos(UnoViewSharedPtr const & rView) const
{
- const uno::Reference<rendering::XBitmap> xBitmap( rView->getCanvas()->getUNOCanvas(),
- uno::UNO_QUERY_THROW );
- const geometry::IntegerSize2D realSize( xBitmap->getSize() );
-
- return basegfx::B2DPoint(
- // pos.X pos.Y are given in 0..1, beginning from the upper left corner of the currentSlide.
- std::min<sal_Int32>( 0, LEFT_BORDER_SPACE ),
- std::max<sal_Int32>( 0, realSize.Height * 1 - mxBitmap->getSize().Height
- - LOWER_BORDER_SPACE ) );
-}
-
-basegfx::B2DPoint PointerSymbol::calcSpritePos(
- UnoViewSharedPtr const & rView, const ::com::sun::star::geometry::RealPoint2D pos) const
-{
- const uno::Reference<rendering::XBitmap> xBitmap( rView->getCanvas()->getUNOCanvas(),
- uno::UNO_QUERY_THROW );
- const geometry::IntegerSize2D realSize( xBitmap->getSize() );
-
+ const awt::Rectangle aViewArea( rView->getUnoView()->getCanvasArea() );
const geometry::IntegerSize2D realTranslationOffset ( rView->getTranslationOffset() );
-
- basegfx::B2DPoint newPos(
- realTranslationOffset.Width + (realSize.Width - 2 * realTranslationOffset.Width) * pos.X,
- realTranslationOffset.Height + (realSize.Height - 2 * realTranslationOffset.Height) * pos.Y);
-
-
- return newPos;
+ return basegfx::B2DPoint(
+ realTranslationOffset.Width + ((aViewArea.Width - aViewArea.X) - 2 * realTranslationOffset.Width) * maPos.X,
+ realTranslationOffset.Height + ((aViewArea.Height - aViewArea.Y) - 2 * realTranslationOffset.Height) * maPos.Y);
}
void PointerSymbol::viewAdded( const UnoViewSharedPtr& rView )
@@ -215,20 +194,26 @@ void PointerSymbol::viewsChanged()
}
}
-void PointerSymbol::viewsChanged(const ::com::sun::star::geometry::RealPoint2D pos)
+void PointerSymbol::viewsChanged(const geometry::RealPoint2D pos)
{
- // reposition sprites on all views
- ViewsVecT::const_iterator aIter( maViews.begin() );
- ViewsVecT::const_iterator const aEnd ( maViews.end() );
- while( aIter != aEnd )
+ if( pos.X != maPos.X || pos.Y != maPos.Y )
{
- if( aIter->second ) {
- aIter->second->movePixel(
- calcSpritePos( aIter->first, pos ));
- mrScreenUpdater.notifyUpdate();
- mrScreenUpdater.commitUpdates();
+ maPos = pos;
+
+ // reposition sprites on all views
+ ViewsVecT::const_iterator aIter( maViews.begin() );
+ ViewsVecT::const_iterator const aEnd ( maViews.end() );
+ while( aIter != aEnd )
+ {
+ if( aIter->second )
+ {
+ aIter->second->movePixel(
+ calcSpritePos( aIter->first ));
+ mrScreenUpdater.notifyUpdate();
+ mrScreenUpdater.commitUpdates();
+ }
+ ++aIter;
}
- ++aIter;
}
}
diff --git a/slideshow/source/engine/pointersymbol.hxx b/slideshow/source/engine/pointersymbol.hxx
index 77309e7..706f312 100644
--- a/slideshow/source/engine/pointersymbol.hxx
+++ b/slideshow/source/engine/pointersymbol.hxx
@@ -34,15 +34,16 @@ namespace internal {
class EventMultiplexer;
typedef boost::shared_ptr<class PointerSymbol> PointerSymbolSharedPtr;
+/// On-screen 'laser pointer' from the Impress remote control
class PointerSymbol : public ViewEventHandler,
- private ::boost::noncopyable
+ private ::boost::noncopyable
{
public:
static PointerSymbolSharedPtr create( const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XBitmap>& xBitmap,
- ScreenUpdater& rScreenUpdater,
- EventMultiplexer& rEventMultiplexer,
- const UnoViewContainer& rViewContainer );
+ ::com::sun::star::rendering::XBitmap>& xBitmap,
+ ScreenUpdater& rScreenUpdater,
+ EventMultiplexer& rEventMultiplexer,
+ const UnoViewContainer& rViewContainer );
/** Shows the pointer symbol.
*/
@@ -58,9 +59,9 @@ public:
private:
PointerSymbol( const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XBitmap>& xBitmap,
- ScreenUpdater& rScreenUpdater,
- const UnoViewContainer& rViewContainer );
+ ::com::sun::star::rendering::XBitmap>& xBitmap,
+ ScreenUpdater& rScreenUpdater,
+ const UnoViewContainer& rViewContainer );
// ViewEventHandler
virtual void viewAdded( const UnoViewSharedPtr& rView );
@@ -68,8 +69,6 @@ private:
virtual void viewChanged( const UnoViewSharedPtr& rView );
virtual void viewsChanged();
-
- ::basegfx::B2DPoint calcSpritePos( UnoViewSharedPtr const & rView, const ::com::sun::star::geometry::RealPoint2D pos ) const;
::basegfx::B2DPoint calcSpritePos( UnoViewSharedPtr const & rView ) const;
template <typename func_type>
@@ -91,6 +90,7 @@ private:
ViewsVecT maViews;
ScreenUpdater& mrScreenUpdater;
+ ::com::sun::star::geometry::RealPoint2D maPos;
bool mbVisible;
};
diff --git a/slideshow/source/engine/waitsymbol.hxx b/slideshow/source/engine/waitsymbol.hxx
index d1d4778..655ceb1 100644
--- a/slideshow/source/engine/waitsymbol.hxx
+++ b/slideshow/source/engine/waitsymbol.hxx
@@ -39,6 +39,7 @@ namespace internal {
class EventMultiplexer;
typedef boost::shared_ptr<class WaitSymbol> WaitSymbolSharedPtr;
+/// On-screen 'hour glass' for when slideshow is unresponsive
class WaitSymbol : public ViewEventHandler,
private ::boost::noncopyable
{
commit 1aae965d44c813d35ca791b7e731d43fc81c58fe
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Tue Oct 8 10:59:38 2013 +0200
oglcanvas: ship comp registration, return device window.
Change-Id: I6c7e9416f908fd3b903eaef82492c1f4445b4e0c
diff --git a/canvas/source/opengl/ogl_spritedevicehelper.cxx b/canvas/source/opengl/ogl_spritedevicehelper.cxx
index f83f8a8..4f03bb7 100644
--- a/canvas/source/opengl/ogl_spritedevicehelper.cxx
+++ b/canvas/source/opengl/ogl_spritedevicehelper.cxx
@@ -956,7 +956,7 @@ namespace oglcanvas
uno::Any SpriteDeviceHelper::getDeviceHandle() const
{
- return uno::Any();
+ return uno::makeAny( reinterpret_cast< sal_Int64 >(mpChildWindow.get()) );
}
uno::Any SpriteDeviceHelper::getSurfaceHandle() const
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index 964f1fc..98bff53 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -183,6 +183,9 @@ $(eval $(call gb_Rdb_add_components,services,\
canvas/source/directx/directx9canvas \
canvas/source/directx/gdipluscanvas \
) \
+ $(if $(ENABLE_OPENGL_CANVAS), \
+ canvas/source/opengl/oglcanvas \
+ ) \
$(if $(ENABLE_GCONF), \
shell/source/backends/gconfbe/gconfbe1 \
) \
More information about the Libreoffice-commits
mailing list