tdf#158624 - Improve warning dialogue for non-recommended formats during save
[LibreOffice.git] / svx / inc / sdr / properties / groupproperties.hxx
bloba2f83af65c7c40db3742d8f4f24d68c89d9a7a27
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 INCLUDED_SVX_INC_SDR_PROPERTIES_GROUPPROPERTIES_HXX
21 #define INCLUDED_SVX_INC_SDR_PROPERTIES_GROUPPROPERTIES_HXX
23 #include <svx/sdr/properties/properties.hxx>
24 #include <svl/itemset.hxx>
25 #include <optional>
27 namespace sdr::properties
29 class GroupProperties final : public BaseProperties
31 // the to be used ItemSet
32 mutable std::optional<SfxItemSet> moMergedItemSet;
33 public:
34 // basic constructor
35 explicit GroupProperties(SdrObject& rObj);
37 // destructor
38 virtual ~GroupProperties() override;
40 // create a new object specific itemset with object specific ranges.
41 virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) override;
43 // Clone() operator, normally just calls the local copy constructor
44 virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
46 // get itemset
47 virtual const SfxItemSet& GetObjectItemSet() const override;
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::INVALID which means there were several such items with different
53 // values.
54 virtual const SfxItemSet& GetMergedItemSet() const override;
56 // Set merged ItemSet. Normally, this maps to SetObjectItemSet().
57 virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false, bool bAdjustTextFrameWidthAndHeight = true) override;
59 // set single item
60 virtual void SetObjectItem(const SfxPoolItem& rItem) override;
62 // set single item direct, do not do any notifies or things like that
63 virtual void SetObjectItemDirect(const SfxPoolItem& rItem) override;
65 // clear single item
66 virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override;
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;
72 // Set a single item, iterate over hierarchies if necessary.
73 virtual void SetMergedItem(const SfxPoolItem& rItem) override;
75 // Clear a single item, iterate over hierarchies if necessary.
76 virtual void ClearMergedItem(const sal_uInt16 nWhich) override;
78 // set complete item set
79 virtual void SetObjectItemSet(const SfxItemSet& rSet, bool bAdjustTextFrameWidthAndHeight = true) override;
81 // set a new StyleSheet
82 virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
83 bool bBroadcast, bool bAdjustTextFrameWidthAndHeight = true) override;
85 // get the local StyleSheet
86 virtual SfxStyleSheet* GetStyleSheet() const override;
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;
92 } // end of namespace sdr::properties
95 #endif // INCLUDED_SVX_INC_SDR_PROPERTIES_GROUPPROPERTIES_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */