Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / svx / inc / sdr / properties / textproperties.hxx
blob8a5065442ed09af389bc4228a3f5b14a45dcee08
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_SDR_PROPERTIES_TEXTPROPERTIES_HXX
21 #define INCLUDED_SVX_SDR_PROPERTIES_TEXTPROPERTIES_HXX
23 #include <svx/itextprovider.hxx>
24 #include <sdr/properties/attributeproperties.hxx>
27 namespace sdr::properties
29 class TextProperties : public AttributeProperties
31 private:
32 // #i101556# versioning support
33 sal_uInt32 maVersion;
35 protected:
36 // create a new itemset
37 virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override;
39 // Do the ItemChange, may do special handling
40 virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override;
42 // react on ItemSet changes
43 virtual void ItemSetChanged(o3tl::span< const SfxPoolItem* const > aChangedItems, sal_uInt16 nDeletedWhich) override;
45 /// Get the TextProvider related to our SdrObject
46 virtual const svx::ITextProvider& getTextProvider() const;
48 public:
49 // basic constructor
50 explicit TextProperties(SdrObject& rObj);
52 // constructor for copying, but using new object
53 TextProperties(const TextProperties& rProps, SdrObject& rObj);
55 // destructor
56 virtual ~TextProperties() override;
58 // Clone() operator, normally just calls the local copy constructor
59 virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
61 // set a new StyleSheet and broadcast
62 virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr,
63 bool bBroadcast) override;
65 // force default attributes for a specific object type, called from
66 // DefaultProperties::GetObjectItemSet() if a new ItemSet is created
67 virtual void ForceDefaultAttributes() override;
69 // force all attributes which come from styles to hard attributes
70 // to be able to live without the style.
71 virtual void ForceStyleToHardAttributes() override;
73 // This is the notifier from SfxListener
74 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
76 // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
77 // ItemChange(), PostItemChange() and ItemSetChanged() calls.
78 void SetObjectItemNoBroadcast(const SfxPoolItem& rItem);
80 // #i101556# versioning support
81 virtual sal_uInt32 getVersion() const override;
82 void increaseVersion() { maVersion++; }
84 } // end of namespace sdr::properties
87 #endif // INCLUDED_SVX_SDR_PROPERTIES_TEXTPROPERTIES_HXX
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */