1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 _SDR_PROPERTIES_TEXTPROPERTIES_HXX
21 #define _SDR_PROPERTIES_TEXTPROPERTIES_HXX
23 #include <svx/itextprovider.hxx>
24 #include <svx/sdr/properties/attributeproperties.hxx>
25 #include "svx/svxdllapi.h"
27 //////////////////////////////////////////////////////////////////////////////
33 class SVX_DLLPUBLIC TextProperties
: public AttributeProperties
36 // #i101556# versioning support
40 // create a new itemset
41 virtual SfxItemSet
& CreateObjectSpecificItemSet(SfxItemPool
& rPool
);
43 // Do the ItemChange, may do special handling
44 virtual void ItemChange(const sal_uInt16 nWhich
, const SfxPoolItem
* pNewItem
= 0);
46 // react on ItemSet changes
47 virtual void ItemSetChanged(const SfxItemSet
& rSet
);
49 /// Get the TextProvider related to our SdrObject
50 virtual const svx::ITextProvider
& getTextProvider() const;
54 explicit TextProperties(SdrObject
& rObj
);
56 // constructor for copying, but using new object
57 TextProperties(const TextProperties
& rProps
, SdrObject
& rObj
);
60 virtual ~TextProperties();
62 // Clone() operator, normally just calls the local copy constructor
63 virtual BaseProperties
& Clone(SdrObject
& rObj
) const;
65 // set a new StyleSheet and broadcast
66 virtual void SetStyleSheet(SfxStyleSheet
* pNewStyleSheet
, sal_Bool bDontRemoveHardAttr
);
68 // force default attributes for a specific object type, called from
69 // DefaultProperties::GetObjectItemSet() if a new ItemSet is created
70 virtual void ForceDefaultAttributes();
72 // force all attributes which come from styles to hard attributes
73 // to be able to live without the style.
74 virtual void ForceStyleToHardAttributes();
76 // This is the notifyer from SfxListener
77 virtual void Notify(SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
79 // Set single item at the local ItemSet. *Does not use* AllowItemChange(),
80 // ItemChange(), PostItemChange() and ItemSetChanged() calls.
81 void SetObjectItemNoBroadcast(const SfxPoolItem
& rItem
);
83 // #i101556# versioning support
84 virtual sal_uInt32
getVersion() const;
86 } // end of namespace properties
87 } // end of namespace sdr
89 //////////////////////////////////////////////////////////////////////////////
91 #endif //_SDR_PROPERTIES_TEXTPROPERTIES_HXX
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */