LibreOffice Module svx (master) 1
attributeproperties.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_SVX_SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX
21#define INCLUDED_SVX_SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX
22
23#include <svl/lstner.hxx>
26
27
28namespace sdr::properties
29 {
31 {
32 // core to set parent at SfxItemSet and to execute the hard attribute computations
33 void ImpSetParentAtSfxItemSet(bool bDontRemoveHardAttr);
34
35 // add style sheet, do all the necessary handling
36 void ImpAddStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr);
37
38 // remove StyleSheet, do all the necessary handling
40
41 protected:
42 // the StyleSheet of this object
44
45 // create a new itemset
46 virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) override;
47
48 // Do the ItemChange, may do special handling
49 virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override;
50
51 // react on ItemSet changes
52 virtual void ItemSetChanged(o3tl::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) override;
53
54 // apply the correct SfyStyleSheet from SdrObject's SdrModel
56
57 public:
58 // basic constructor
59 explicit AttributeProperties(SdrObject& rObj);
60
61 // constructor for copying, but using new object
63
64 // Clone() operator, normally just calls the local copy constructor
65 virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
66
67 // Get the local ItemSet. This directly returns the local ItemSet of the object. No
68 // merging of ItemSets is done for e.g. Group objects.
69 virtual const SfxItemSet& GetObjectItemSet() const override;
70
71 // destructor
72 virtual ~AttributeProperties() override;
73
74 // set a new StyleSheet and broadcast
75 virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
76 bool bBroadcast) override;
77
78 // get the installed StyleSheet
79 virtual SfxStyleSheet* GetStyleSheet() const override;
80
81 // force all attributes which come from styles to hard attributes
82 // to be able to live without the style.
83 virtual void ForceStyleToHardAttributes() override;
84
85 // This is the Notify(...) from 2nd base class SfxListener
86 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
87
88 virtual bool isUsedByModel() const override;
89 };
90
91} // end of namespace sdr::properties
92
93
94#endif // INCLUDED_SVX_SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX
95
96/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Abstract DrawObject.
Definition: svdobj.hxx:261
void ImpSetParentAtSfxItemSet(bool bDontRemoveHardAttr)
virtual void ItemSetChanged(o3tl::span< const SfxPoolItem *const > aChangedItems, sal_uInt16 nDeletedWhich) override
virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool &pPool) override
void ImpAddStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr)
virtual std::unique_ptr< BaseProperties > Clone(SdrObject &rObj) const override
virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
virtual void ForceStyleToHardAttributes() override
virtual const SfxItemSet & GetObjectItemSet() const override
virtual void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast) override
virtual SfxStyleSheet * GetStyleSheet() const override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual bool isUsedByModel() const override