fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / svx / sdr / properties / attributeproperties.hxx
blob9f3e4d9f9ad3f6e5faaf26e7ba28f2856ed9986a
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 _SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX
21 #define _SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX
23 #include <svl/lstner.hxx>
24 #include <svl/stylesheetuser.hxx>
25 #include <svx/sdr/properties/defaultproperties.hxx>
26 #include "svx/svxdllapi.h"
28 //////////////////////////////////////////////////////////////////////////////
30 namespace sdr
32 namespace properties
34 class SVX_DLLPUBLIC AttributeProperties : public DefaultProperties, public SfxListener, public svl::StyleSheetUser
36 // add style sheet, do all the necessary handling
37 void ImpAddStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr);
39 // remove StyleSheet, do all the necessary handling
40 void ImpRemoveStyleSheet();
42 protected:
43 // the SytleSheet of this object
44 SfxStyleSheet* mpStyleSheet;
46 // create a new itemset
47 virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& pPool);
49 // Do the ItemChange, may do special handling
50 virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0);
52 // react on ItemSet changes
53 virtual void ItemSetChanged(const SfxItemSet& rSet);
55 public:
56 // basic constructor
57 explicit AttributeProperties(SdrObject& rObj);
59 // constructor for copying, but using new object
60 AttributeProperties(const AttributeProperties& rProps, SdrObject& rObj);
62 // Clone() operator, normally just calls the local copy constructor
63 virtual BaseProperties& Clone(SdrObject& rObj) const;
65 // destructor
66 virtual ~AttributeProperties();
68 // set a new StyleSheet and broadcast
69 virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr);
71 // get the installed StyleSheet
72 virtual SfxStyleSheet* GetStyleSheet() const;
74 // Move properties to a new ItemPool.
75 virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel = 0L);
77 // Set new model.
78 virtual void SetModel(SdrModel* pOldModel, SdrModel* pNewModel);
80 // force all attributes which come from styles to hard attributes
81 // to be able to live without the style.
82 virtual void ForceStyleToHardAttributes();
84 // This is the Notify(...) from 2nd base class SfxListener
85 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
87 virtual bool isUsedByModel() const;
89 } // end of namespace properties
90 } // end of namespace sdr
92 //////////////////////////////////////////////////////////////////////////////
94 #endif //_SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */