LibreOffice Module svx (master) 1
groupproperties.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_INC_SDR_PROPERTIES_GROUPPROPERTIES_HXX
21#define INCLUDED_SVX_INC_SDR_PROPERTIES_GROUPPROPERTIES_HXX
22
24#include <svl/itemset.hxx>
25#include <optional>
26
27namespace sdr::properties
28 {
29 class GroupProperties final : public BaseProperties
30 {
31 // the to be used ItemSet
32 mutable std::optional<SfxItemSet> moMergedItemSet;
33 public:
34 // basic constructor
35 explicit GroupProperties(SdrObject& rObj);
36
37 // destructor
38 virtual ~GroupProperties() override;
39
40 // create a new object specific itemset with object specific ranges.
41 virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) override;
42
43 // Clone() operator, normally just calls the local copy constructor
44 virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
45
46 // get itemset
47 virtual const SfxItemSet& GetObjectItemSet() const override;
48
49 // get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may
50 // be overridden e.g for group objects to return a merged ItemSet of the object.
51 // When using this method the returned ItemSet may contain items in the state
52 // SfxItemState::DONTCARE which means there were several such items with different
53 // values.
54 virtual const SfxItemSet& GetMergedItemSet() const override;
55
56 // Set merged ItemSet. Normally, this maps to SetObjectItemSet().
57 virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false) override;
58
59 // set single item
60 virtual void SetObjectItem(const SfxPoolItem& rItem) override;
61
62 // set single item direct, do not do any notifies or things like that
63 virtual void SetObjectItemDirect(const SfxPoolItem& rItem) override;
64
65 // clear single item
66 virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override;
67
68 // clear single item direct, do not do any notifies or things like that.
69 // Also supports complete deletion of items when default parameter 0 is used.
70 virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) override;
71
72 // Set a single item, iterate over hierarchies if necessary.
73 virtual void SetMergedItem(const SfxPoolItem& rItem) override;
74
75 // Clear a single item, iterate over hierarchies if necessary.
76 virtual void ClearMergedItem(const sal_uInt16 nWhich) override;
77
78 // set complete item set
79 virtual void SetObjectItemSet(const SfxItemSet& rSet) override;
80
81 // set a new StyleSheet
82 virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
83 bool bBroadcast) override;
84
85 // get the local StyleSheet
86 virtual SfxStyleSheet* GetStyleSheet() const override;
87
88 // force all attributes which come from styles to hard attributes
89 // to be able to live without the style.
90 virtual void ForceStyleToHardAttributes() override;
91 };
92} // end of namespace sdr::properties
93
94
95#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_GROUPPROPERTIES_HXX
96
97/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Abstract DrawObject.
Definition: svdobj.hxx:260
virtual const SfxItemSet & GetObjectItemSet() const override
virtual SfxStyleSheet * GetStyleSheet() const override
virtual void SetObjectItem(const SfxPoolItem &rItem) override
virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool &pPool) override
virtual void SetObjectItemDirect(const SfxPoolItem &rItem) override
virtual void SetMergedItemSet(const SfxItemSet &rSet, bool bClearAllItems=false) override
virtual void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr, bool bBroadcast) override
virtual void SetMergedItem(const SfxPoolItem &rItem) override
virtual const SfxItemSet & GetMergedItemSet() const override
virtual void ClearMergedItem(const sal_uInt16 nWhich) override
virtual void SetObjectItemSet(const SfxItemSet &rSet) override
virtual void ClearObjectItem(const sal_uInt16 nWhich=0) override
virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) override
virtual std::unique_ptr< BaseProperties > Clone(SdrObject &rObj) const override
std::optional< SfxItemSet > moMergedItemSet
virtual void ForceStyleToHardAttributes() override