1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _ENHANCED_CUSTOMSHAPE_ENGINE_HXX
21 #define _ENHANCED_CUSTOMSHAPE_ENGINE_HXX
23 #include <com/sun/star/uno/Reference.h>
24 #include <com/sun/star/uno/RuntimeException.hpp>
25 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
26 #include <com/sun/star/lang/XComponent.hpp>
27 #include <com/sun/star/registry/XRegistryKey.hpp>
28 #include <cppuhelper/implbase3.hxx>
29 #include <com/sun/star/awt/Rectangle.hpp>
30 #include <com/sun/star/beans/PropertyValue.hpp>
31 #include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
32 #include <com/sun/star/lang/XInitialization.hpp>
33 #include <com/sun/star/lang/XServiceInfo.hpp>
34 #include <com/sun/star/drawing/XCustomShapeEngine.hpp>
36 // ---------------------------
37 // - EnhancedCustomShapeEngine -
38 // ---------------------------
42 class SdrObjCustomShape
;
43 class EnhancedCustomShapeEngine
: public cppu::WeakImplHelper3
45 css::lang::XInitialization
,
46 css::lang::XServiceInfo
,
47 css::drawing::XCustomShapeEngine
50 css::uno::Reference
< css::lang::XMultiServiceFactory
> mxFact
;
51 css::uno::Reference
< css::drawing::XShape
> mxShape
;
52 sal_Bool mbForceGroupWithText
;
54 SdrObject
* ImplForceGroupWithText( const SdrObjCustomShape
* pCustoObj
, SdrObject
* pRenderedShape
);
57 EnhancedCustomShapeEngine( const css::uno::Reference
< css::lang::XMultiServiceFactory
>& rxMgr
);
58 virtual ~EnhancedCustomShapeEngine();
61 virtual void SAL_CALL
acquire() throw();
62 virtual void SAL_CALL
release() throw();
65 virtual void SAL_CALL
initialize( const css::uno::Sequence
< css::uno::Any
>& aArguments
)
66 throw ( css::uno::Exception
, css::uno::RuntimeException
);
69 virtual OUString SAL_CALL
getImplementationName()
70 throw ( css::uno::RuntimeException
);
71 virtual sal_Bool SAL_CALL
supportsService( const OUString
& rServiceName
)
72 throw ( css::uno::RuntimeException
);
73 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
74 throw ( css::uno::RuntimeException
);
77 virtual css::uno::Reference
< css::drawing::XShape
> SAL_CALL
render()
78 throw ( css::uno::RuntimeException
);
79 virtual css::awt::Rectangle SAL_CALL
getTextBounds()
80 throw ( css::uno::RuntimeException
);
81 virtual css::drawing::PolyPolygonBezierCoords SAL_CALL
getLineGeometry()
82 throw ( css::uno::RuntimeException
);
83 virtual css::uno::Sequence
< css::uno::Reference
< css::drawing::XCustomShapeHandle
> > SAL_CALL
getInteraction()
84 throw ( css::uno::RuntimeException
);
87 OUString
EnhancedCustomShapeEngine_getImplementationName()
88 throw ( css::uno::RuntimeException
);
89 sal_Bool SAL_CALL
EnhancedCustomShapeEngine_supportsService( const OUString
& rServiceName
)
90 throw( css::uno::RuntimeException
);
91 css::uno::Sequence
< OUString
> SAL_CALL
EnhancedCustomShapeEngine_getSupportedServiceNames()
92 throw( css::uno::RuntimeException
);
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */