LibreOffice Module svx (master)  1
textproperties.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_TEXTPROPERTIES_HXX
21 #define INCLUDED_SVX_SDR_PROPERTIES_TEXTPROPERTIES_HXX
22 
23 #include <svx/itextprovider.hxx>
25 
26 
27 namespace sdr
28 {
29  namespace properties
30  {
32  {
33  private:
34  // #i101556# versioning support
35  sal_uInt32 maVersion;
36 
37  protected:
38  // create a new itemset
39  virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override;
40 
41  // Do the ItemChange, may do special handling
42  virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override;
43 
44  // react on ItemSet changes
45  virtual void ItemSetChanged(const SfxItemSet& rSet) override;
46 
48  virtual const svx::ITextProvider& getTextProvider() const;
49 
50  public:
51  // basic constructor
52  explicit TextProperties(SdrObject& rObj);
53 
54  // constructor for copying, but using new object
55  TextProperties(const TextProperties& rProps, SdrObject& rObj);
56 
57  // destructor
58  virtual ~TextProperties() override;
59 
60  // Clone() operator, normally just calls the local copy constructor
61  virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
62 
63  // set a new StyleSheet and broadcast
64  virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
65 
66  // force default attributes for a specific object type, called from
67  // DefaultProperties::GetObjectItemSet() if a new ItemSet is created
68  virtual void ForceDefaultAttributes() override;
69 
70  // force all attributes which come from styles to hard attributes
71  // to be able to live without the style.
72  virtual void ForceStyleToHardAttributes() override;
73 
74  // This is the notifier from SfxListener
75  virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
76 
77  // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
78  // ItemChange(), PostItemChange() and ItemSetChanged() calls.
79  void SetObjectItemNoBroadcast(const SfxPoolItem& rItem);
80 
81  // #i101556# versioning support
82  virtual sal_uInt32 getVersion() const override;
83  };
84  } // end of namespace properties
85 } // end of namespace sdr
86 
87 
88 #endif // INCLUDED_SVX_SDR_PROPERTIES_TEXTPROPERTIES_HXX
89 
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This interface provides access to text object(s) in an SdrObject.
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual std::unique_ptr< BaseProperties > Clone(SdrObject &rObj) const override
virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem *pNewItem=nullptr) override
virtual sal_uInt32 getVersion() const override
Abstract DrawObject.
Definition: svdobj.hxx:312
virtual void SetStyleSheet(SfxStyleSheet *pNewStyleSheet, bool bDontRemoveHardAttr) override
void SetObjectItemNoBroadcast(const SfxPoolItem &rItem)
virtual ~TextProperties() override
virtual std::unique_ptr< SfxItemSet > CreateObjectSpecificItemSet(SfxItemPool &rPool) override
virtual void ForceDefaultAttributes() override
virtual const svx::ITextProvider & getTextProvider() const
Get the TextProvider related to our SdrObject.
virtual void ForceStyleToHardAttributes() override
virtual void ItemSetChanged(const SfxItemSet &rSet) override