Kaydet (Commit) a60cc5d6 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

com::sun::star->css in canvas

Change-Id: I23c3f774834bb7e84e2f02fe05fa9d844adadc9d
Reviewed-on: https://gerrit.libreoffice.org/17259Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst ed9d6ef1
......@@ -14,7 +14,7 @@ not exclusively by the canvas, Armin's drawinglayer module also make
use of it), which resides in basegfx.
The UNO API used by the canvas is primarily under
com::sun::star::rendering, with com::sun::star::rendering::XCanvas
css::rendering, with css::rendering::XCanvas
being the central interface.
== The slideshow engine ==
......
......@@ -35,24 +35,23 @@ namespace cairocanvas
/** Create an XCachedPrimitive for given GraphicObject
*/
CachedBitmap( const ::cairo::SurfaceSharedPtr& pSurface,
const ::com::sun::star::rendering::ViewState& rUsedViewState,
const ::com::sun::star::rendering::RenderState& rUsedRenderState,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvas >& rTarget );
const css::rendering::ViewState& rUsedViewState,
const css::rendering::RenderState& rUsedRenderState,
const css::uno::Reference< css::rendering::XCanvas >& rTarget );
/// Dispose all internal references
virtual void SAL_CALL disposing() SAL_OVERRIDE;
private:
virtual ::sal_Int8 doRedraw( const ::com::sun::star::rendering::ViewState& rNewState,
const ::com::sun::star::rendering::ViewState& rOldState,
const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvas >& rTargetCanvas,
virtual ::sal_Int8 doRedraw( const css::rendering::ViewState& rNewState,
const css::rendering::ViewState& rOldState,
const css::uno::Reference<
css::rendering::XCanvas >& rTargetCanvas,
bool bSameViewTransform ) SAL_OVERRIDE;
::cairo::SurfaceSharedPtr mpSurface;
const ::com::sun::star::rendering::RenderState maRenderState;
const css::rendering::RenderState maRenderState;
};
}
......
......@@ -53,13 +53,13 @@
namespace cairocanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::rendering::XGraphicDevice,
::com::sun::star::lang::XMultiServiceFactory,
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
::com::sun::star::lang::XServiceName > GraphicDeviceBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::rendering::XGraphicDevice,
css::lang::XMultiServiceFactory,
css::util::XUpdatable,
css::beans::XPropertySet,
css::lang::XServiceName > GraphicDeviceBase_Base;
typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase_Base >,
DeviceHelper,
::osl::MutexGuard,
......@@ -105,10 +105,8 @@ namespace cairocanvas
public RepaintTarget
{
public:
Canvas( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any >& aArguments,
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
Canvas( const css::uno::Sequence< css::uno::Any >& aArguments,
const css::uno::Reference< css::uno::XComponentContext >& rxContext );
void initialize();
......@@ -126,12 +124,12 @@ namespace cairocanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( Canvas, GraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase )
// XServiceName
virtual OUString SAL_CALL getServiceName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual OUString SAL_CALL getServiceName( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// RepaintTarget
virtual bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) SAL_OVERRIDE;
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) SAL_OVERRIDE;
// SurfaceProvider
virtual ::cairo::SurfaceSharedPtr getSurface() SAL_OVERRIDE;
......@@ -141,8 +139,8 @@ namespace cairocanvas
virtual OutputDevice* getOutputDevice() SAL_OVERRIDE;
private:
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > maArguments;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxComponentContext;
css::uno::Sequence< css::uno::Any > maArguments;
css::uno::Reference< css::uno::XComponentContext > mxComponentContext;
};
typedef ::rtl::Reference< Canvas > CanvasRef;
......
......@@ -44,10 +44,10 @@
namespace cairocanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::beans::XFastPropertySet > CanvasBitmapBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::lang::XServiceInfo,
css::beans::XFastPropertySet > CanvasBitmapBase_Base;
class CanvasBitmapSpriteSurface_Base :
public ::canvas::BaseMutexHelper<CanvasBitmapBase_Base>,
public SurfaceProvider
......@@ -75,7 +75,7 @@ namespace cairocanvas
*/
CanvasBitmap( const ::basegfx::B2ISize& rSize,
const SurfaceProviderRef& rDevice,
::com::sun::star::rendering::XGraphicDevice* pDevice,
css::rendering::XGraphicDevice* pDevice,
bool bHasAlpha );
/// Dispose all internal references
......@@ -89,9 +89,9 @@ namespace cairocanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( CanvasBitmap, CanvasBitmapBase_Base, ::cppu::WeakComponentImplHelperBase )
// XServiceInfo
virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual OUString SAL_CALL getImplementationName( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// SurfaceProvider
virtual ::cairo::SurfaceSharedPtr getSurface() SAL_OVERRIDE;
......@@ -102,8 +102,8 @@ namespace cairocanvas
// RepaintTarget
virtual bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) SAL_OVERRIDE;
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) SAL_OVERRIDE;
// XFastPropertySet
// used to retrieve BitmapEx pointer or X Pixmap handles for this bitmap
......@@ -115,8 +115,8 @@ namespace cairocanvas
// 1st a bool value: true - free the pixmap after used by XFreePixmap, false do nothing, the pixmap is used internally in the canvas
// 2nd the pixmap handle
// 3rd the pixmap depth
virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setFastPropertyValue(sal_Int32, const ::com::sun::star::uno::Any&) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE {}
virtual css::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL setFastPropertyValue(sal_Int32, const css::uno::Any&) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE {}
private:
SurfaceProviderRef mpSurfaceProvider;
......
......@@ -38,7 +38,7 @@ using namespace ::com::sun::star;
namespace cairocanvas
{
CanvasCustomSprite::CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
CanvasCustomSprite::CanvasCustomSprite( const css::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice ) :
mpSpriteCanvas( rRefDevice ),
maSize( ::canvas::tools::roundUp( rSpriteSize.Width ),
......
......@@ -47,10 +47,10 @@
namespace cairocanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XCustomSprite,
::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo > CanvasCustomSpriteBase_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCustomSprite,
css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::lang::XServiceInfo > CanvasCustomSpriteBase_Base;
/** Mixin Sprite
Have to mixin the Sprite interface before deriving from
......@@ -100,7 +100,7 @@ namespace cairocanvas
@param rDevice
Target DX device
*/
CanvasCustomSprite( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
CanvasCustomSprite( const css::geometry::RealSize2D& rSpriteSize,
const SpriteCanvasRef& rRefDevice );
virtual void disposeThis() SAL_OVERRIDE;
......@@ -113,9 +113,9 @@ namespace cairocanvas
DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( CanvasCustomSprite, CanvasCustomSpriteBase_Base, ::cppu::WeakComponentImplHelperBase )
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
// Sprite
virtual void redraw( const ::cairo::CairoSharedPtr& pCairo,
......@@ -126,8 +126,8 @@ namespace cairocanvas
// RepaintTarget
virtual bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) SAL_OVERRIDE;
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) SAL_OVERRIDE;
// SurfaceProvider
virtual ::cairo::SurfaceSharedPtr getSurface() SAL_OVERRIDE;
......
......@@ -48,8 +48,8 @@ namespace cairocanvas
mpRefDevice( rDevice )
{
maFont->SetAlign( ALIGN_BASELINE );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==com::sun::star::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
maFont->SetVertical( rFontRequest.FontDescription.IsVertical==com::sun::star::util::TriState_YES );
maFont->SetCharSet( (rFontRequest.FontDescription.IsSymbolFont==css::util::TriState_YES) ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
maFont->SetVertical( rFontRequest.FontDescription.IsVertical==css::util::TriState_YES );
// TODO(F2): improve panose->vclenum conversion
maFont->SetWeight( static_cast<FontWeight>(rFontRequest.FontDescription.FontDescription.Weight) );
......
......@@ -41,8 +41,8 @@
namespace cairocanvas
{
typedef ::cppu::WeakComponentImplHelper< ::com::sun::star::rendering::XCanvasFont,
::com::sun::star::lang::XServiceInfo > CanvasFont_Base;
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCanvasFont,
css::lang::XServiceInfo > CanvasFont_Base;
class CanvasFont : public ::comphelper::OBaseMutex,
public CanvasFont_Base,
......@@ -51,31 +51,31 @@ namespace cairocanvas
public:
typedef rtl::Reference<CanvasFont> Reference;
CanvasFont( const ::com::sun::star::rendering::FontRequest& fontRequest,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& extraFontProperties,
const ::com::sun::star::geometry::Matrix2D& rFontMatrix,
CanvasFont( const css::rendering::FontRequest& fontRequest,
const css::uno::Sequence< css::beans::PropertyValue >& extraFontProperties,
const css::geometry::Matrix2D& rFontMatrix,
const SurfaceProviderRef& rDevice );
/// Dispose all internal references
virtual void SAL_CALL disposing() SAL_OVERRIDE;
// XCanvasFont
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XTextLayout > SAL_CALL createTextLayout( const ::com::sun::star::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::FontRequest SAL_CALL getFontRequest( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::rendering::FontMetrics SAL_CALL getFontMetrics( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< double > SAL_CALL getAvailableSizes( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getExtraFontProperties( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference< css::rendering::XTextLayout > SAL_CALL createTextLayout( const css::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::FontRequest SAL_CALL getFontRequest( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::rendering::FontMetrics SAL_CALL getFontMetrics( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence< double > SAL_CALL getAvailableSizes( ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Sequence<