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 .
21 #include <com/sun/star/beans/PropertyState.hpp>
22 #include <com/sun/star/document/XEventsSupplier.hpp>
23 #include <svx/unomaster.hxx>
25 namespace com::sun::star::beans
{ class XPropertySetInfo
; }
27 class SdXImpressDocument
;
28 class SdAnimationInfo
;
29 class SvxItemPropertySet
;
31 struct SfxItemPropertyMapEntry
;
33 class SdXShape
: public SvxShapeMaster
,
34 public css::document::XEventsSupplier
36 friend class SdUnoEventsAccess
;
40 const SvxItemPropertySet
* mpPropSet
;
41 std::span
<const SfxItemPropertyMapEntry
> mpMap
;
42 SdXImpressDocument
* mpModel
;
44 /// @throws css::lang::IllegalArgumentException
45 /// @throws css::beans::UnknownPropertyException
46 /// @throws css::uno::RuntimeException
47 void SetStyleSheet( const css::uno::Any
& rAny
);
48 /// @throws css::beans::UnknownPropertyException
49 css::uno::Any
GetStyleSheet() const;
52 /// @throws std::exception
53 SdAnimationInfo
* GetAnimationInfo( bool bCreate
= false ) const;
54 /// @throws std::exception
55 bool IsPresObj() const;
57 bool IsEmptyPresObj() const;
58 void SetEmptyPresObj(bool bEmpty
);
60 bool IsMasterDepend() const noexcept
;
61 void SetMasterDepend( bool bDepend
) noexcept
;
63 OUString
GetPlaceholderText() const;
66 SdXShape(SvxShape
* pShape
, SdXImpressDocument
* pModel
);
67 virtual ~SdXShape() noexcept
;
69 virtual bool queryAggregation( const css::uno::Type
& rType
, css::uno::Any
& aAny
) override
;
70 virtual void dispose() override
;
73 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
) override
;
74 virtual void SAL_CALL
acquire() noexcept override
;
75 virtual void SAL_CALL
release() noexcept override
;
78 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
81 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
82 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
83 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) override
;
86 virtual css::beans::PropertyState SAL_CALL
getPropertyState( const OUString
& PropertyName
) override
;
87 virtual void SAL_CALL
setPropertyToDefault( const OUString
& PropertyName
) override
;
88 virtual css::uno::Any SAL_CALL
getPropertyDefault( const OUString
& aPropertyName
) override
;
91 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( ) override
;
94 virtual css::uno::Reference
< css::container::XNameReplace
> SAL_CALL
getEvents( ) override
;
97 struct SvEventDescription
;
98 const SvEventDescription
* ImplGetSupportedMacroItems();
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */