diff --git a/canvas/source/vcl/canvasfont.hxx b/canvas/source/vcl/canvasfont.hxx index 3bbbe5f21bd9..63f599b28c9e 100644 --- a/canvas/source/vcl/canvasfont.hxx +++ b/canvas/source/vcl/canvasfont.hxx @@ -2,9 +2,9 @@ * * $RCSfile: canvasfont.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: thb $ $Date: 2004-03-18 10:38:40 $ + * last change: $Author: rt $ $Date: 2004-11-26 17:11:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,9 +62,17 @@ #ifndef _CANVASFONT_HXX #define _CANVASFONT_HXX -#ifndef _CPPUHELPER_IMPLBASE2_HXX_ -#include +#ifndef _COMPHELPER_IMPLEMENTATIONREFERENCE_HXX +#include #endif + +#ifndef _CPPUHELPER_COMPBASE2_HXX_ +#include +#endif +#ifndef _COMPHELPER_BROADCASTHELPER_HXX_ +#include +#endif + #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include #endif @@ -79,8 +87,7 @@ #include -#include "canvasbase.hxx" -#include "outdevprovider.hxx" +#include "canvashelper.hxx" #include "impltools.hxx" @@ -90,24 +97,30 @@ namespace vclcanvas { - class SpriteCanvas; + typedef ::cppu::WeakComponentImplHelper2< ::drafts::com::sun::star::rendering::XCanvasFont, + ::com::sun::star::lang::XServiceInfo > CanvasFont_Base; - class CanvasFont : public ::cppu::WeakImplHelper2< ::drafts::com::sun::star::rendering::XCanvasFont, - ::com::sun::star::lang::XServiceInfo > + class CanvasFont : public ::comphelper::OBaseMutex, public CanvasFont_Base { public: - CanvasFont( const ::drafts::com::sun::star::rendering::FontRequest& fontRequest, - const OutDevProvider::ImplRef& rCanvas ); + typedef ::comphelper::ImplementationReference< + CanvasFont, + ::drafts::com::sun::star::rendering::XCanvasFont > ImplRef; + + CanvasFont( const ::drafts::com::sun::star::rendering::FontRequest& fontRequest, + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& extraFontProperties, + const ::drafts::com::sun::star::geometry::Matrix2D& rFontMatrix, + const OutDevProviderSharedPtr& rDevice ); + + /// Dispose all internal references + virtual void SAL_CALL disposing(); // XCanvasFont - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::drafts::com::sun::star::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes( const ::drafts::com::sun::star::rendering::StringContext& text, const ::drafts::com::sun::star::rendering::ViewState& viewState, const ::drafts::com::sun::star::rendering::RenderState& renderState, sal_Int8 direction ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::drafts::com::sun::star::geometry::RealRectangle2D > SAL_CALL queryTightMeasures( const ::drafts::com::sun::star::rendering::StringContext& text, const ::drafts::com::sun::star::rendering::ViewState& viewState, const ::drafts::com::sun::star::rendering::RenderState& renderState, sal_Int8 direction ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::drafts::com::sun::star::geometry::RealRectangle2D > SAL_CALL queryTextMeasures( const ::drafts::com::sun::star::rendering::StringContext& text, const ::drafts::com::sun::star::rendering::ViewState& viewState, const ::drafts::com::sun::star::rendering::RenderState& renderState, sal_Int8 direction ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< double > SAL_CALL queryTextOffsets( const ::drafts::com::sun::star::rendering::StringContext& text, const ::drafts::com::sun::star::rendering::ViewState& viewState, const ::drafts::com::sun::star::rendering::RenderState& renderState, sal_Int8 direction ) throw (::com::sun::star::uno::RuntimeException); - virtual ::drafts::com::sun::star::geometry::RealRectangle2D SAL_CALL queryTextBounds( const ::drafts::com::sun::star::rendering::StringContext& text, const ::drafts::com::sun::star::rendering::ViewState& viewState, const ::drafts::com::sun::star::rendering::RenderState& renderState, sal_Int8 direction ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::rendering::XTextLayout > SAL_CALL createTextLayout( const ::drafts::com::sun::star::rendering::StringContext& aText, sal_Int8 nDirection, sal_Int64 nRandomSeed ) throw (::com::sun::star::uno::RuntimeException); virtual ::drafts::com::sun::star::rendering::FontRequest SAL_CALL getFontRequest( ) throw (::com::sun::star::uno::RuntimeException); virtual ::drafts::com::sun::star::rendering::FontMetrics SAL_CALL getFontMetrics( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::rendering::XCanvas > SAL_CALL getAssociatedCanvas( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< double > SAL_CALL getAvailableSizes( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getExtraFontProperties( ) throw (::com::sun::star::uno::RuntimeException); // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); @@ -126,7 +139,7 @@ namespace vclcanvas ::canvas::vcltools::VCLObject maFont; ::drafts::com::sun::star::rendering::FontRequest maFontRequest; - OutDevProvider::ImplRef mpCanvas; + OutDevProviderSharedPtr mpRefDevice; }; }