diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-10-28 12:03:34 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-10-28 12:58:49 -0400 |
commit | 8c5f640308b618ec330e83527019a4baa982f902 (patch) | |
tree | ea434232c22b52db2a037907de6a842e2027fee6 /svx/inc | |
parent | 2b4ffd8e333dee31ee7df58f693d8eff9ec5a93e (diff) |
Move these headers from include to svx; they are not used outside svx.
Change-Id: I8685b451a39e890250a3309ddb70346bac4084b2
Diffstat (limited to 'svx/inc')
18 files changed, 490 insertions, 16 deletions
diff --git a/svx/inc/sdr/properties/attributeproperties.hxx b/svx/inc/sdr/properties/attributeproperties.hxx new file mode 100644 index 000000000000..4dbb8004a487 --- /dev/null +++ b/svx/inc/sdr/properties/attributeproperties.hxx @@ -0,0 +1,95 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX +#define INCLUDED_SVX_SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX + +#include <svl/lstner.hxx> +#include <svl/stylesheetuser.hxx> +#include <svx/sdr/properties/defaultproperties.hxx> + + + +namespace sdr +{ + namespace properties + { + class AttributeProperties : public DefaultProperties, public SfxListener, public svl::StyleSheetUser + { + // add style sheet, do all the necessary handling + void ImpAddStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr); + + // remove StyleSheet, do all the necessary handling + void ImpRemoveStyleSheet(); + + protected: + // the SytleSheet of this object + SfxStyleSheet* mpStyleSheet; + + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& pPool) SAL_OVERRIDE; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) SAL_OVERRIDE; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) SAL_OVERRIDE; + + public: + // basic constructor + explicit AttributeProperties(SdrObject& rObj); + + // constructor for copying, but using new object + AttributeProperties(const AttributeProperties& rProps, SdrObject& rObj); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const SAL_OVERRIDE; + + // destructor + virtual ~AttributeProperties(); + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) SAL_OVERRIDE; + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const SAL_OVERRIDE; + + // Move properties to a new ItemPool. + virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel = 0L) SAL_OVERRIDE; + + // Set new model. + virtual void SetModel(SdrModel* pOldModel, SdrModel* pNewModel) SAL_OVERRIDE; + + // force all attributes which come from styles to hard attributes + // to be able to live without the style. + virtual void ForceStyleToHardAttributes() SAL_OVERRIDE; + + // This is the Notify(...) from 2nd base class SfxListener + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) SAL_OVERRIDE; + + virtual bool isUsedByModel() const SAL_OVERRIDE; + }; + } // end of namespace properties +} // end of namespace sdr + + + +#endif // INCLUDED_SVX_SDR_PROPERTIES_ATTRIBUTEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/captionproperties.hxx b/svx/inc/sdr/properties/captionproperties.hxx index e4c88d24f42e..9ac7f2ae499d 100644 --- a/svx/inc/sdr/properties/captionproperties.hxx +++ b/svx/inc/sdr/properties/captionproperties.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_CAPTIONPROPERTIES_HXX #define INCLUDED_SVX_INC_SDR_PROPERTIES_CAPTIONPROPERTIES_HXX -#include <svx/sdr/properties/rectangleproperties.hxx> +#include <sdr/properties/rectangleproperties.hxx> diff --git a/svx/inc/sdr/properties/circleproperties.hxx b/svx/inc/sdr/properties/circleproperties.hxx index 980ad870aa13..14e44da50a0e 100644 --- a/svx/inc/sdr/properties/circleproperties.hxx +++ b/svx/inc/sdr/properties/circleproperties.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_CIRCLEPROPERTIES_HXX #define INCLUDED_SVX_INC_SDR_PROPERTIES_CIRCLEPROPERTIES_HXX -#include <svx/sdr/properties/rectangleproperties.hxx> +#include <sdr/properties/rectangleproperties.hxx> diff --git a/svx/inc/sdr/properties/connectorproperties.hxx b/svx/inc/sdr/properties/connectorproperties.hxx index 2553fb577fde..b5441d92ca1d 100644 --- a/svx/inc/sdr/properties/connectorproperties.hxx +++ b/svx/inc/sdr/properties/connectorproperties.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_CONNECTORPROPERTIES_HXX #define INCLUDED_SVX_INC_SDR_PROPERTIES_CONNECTORPROPERTIES_HXX -#include <svx/sdr/properties/textproperties.hxx> +#include <sdr/properties/textproperties.hxx> diff --git a/svx/inc/sdr/properties/customshapeproperties.hxx b/svx/inc/sdr/properties/customshapeproperties.hxx index ac58b4e1524e..904abe5c961f 100644 --- a/svx/inc/sdr/properties/customshapeproperties.hxx +++ b/svx/inc/sdr/properties/customshapeproperties.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_CUSTOMSHAPEPROPERTIES_HXX #define INCLUDED_SVX_INC_SDR_PROPERTIES_CUSTOMSHAPEPROPERTIES_HXX -#include <svx/sdr/properties/textproperties.hxx> +#include <sdr/properties/textproperties.hxx> diff --git a/svx/inc/sdr/properties/e3dcompoundproperties.hxx b/svx/inc/sdr/properties/e3dcompoundproperties.hxx new file mode 100644 index 000000000000..fa62dd687344 --- /dev/null +++ b/svx/inc/sdr/properties/e3dcompoundproperties.hxx @@ -0,0 +1,71 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SDR_PROPERTIES_E3DCOMPOUNDPROPERTIES_HXX +#define INCLUDED_SVX_SDR_PROPERTIES_E3DCOMPOUNDPROPERTIES_HXX + +#include <sdr/properties/e3dproperties.hxx> +#include <svx/svxdllapi.h> + + + +namespace sdr +{ + namespace properties + { + class E3dCompoundProperties : public E3dProperties + { + protected: + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) SAL_OVERRIDE; + + public: + // basic constructor + explicit E3dCompoundProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dCompoundProperties(const E3dCompoundProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dCompoundProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const SAL_OVERRIDE; + + // get itemset + virtual const SfxItemSet& GetObjectItemSet() const SAL_OVERRIDE; + + // Get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may + // be overloaded e.g for group objects to return a merged ItemSet of the object. + // When using this method the returned ItemSet may contain items in the state + // SfxItemState::DONTCARE which means there were several such items with different + // values. + virtual const SfxItemSet& GetMergedItemSet() const SAL_OVERRIDE; + + // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). + virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false) SAL_OVERRIDE; + }; + } // end of namespace properties +} // end of namespace sdr + + + +#endif // INCLUDED_SVX_SDR_PROPERTIES_E3DCOMPOUNDPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/e3dextrudeproperties.hxx b/svx/inc/sdr/properties/e3dextrudeproperties.hxx index ba1f7ea105d9..5b2f76bab22c 100644 --- a/svx/inc/sdr/properties/e3dextrudeproperties.hxx +++ b/svx/inc/sdr/properties/e3dextrudeproperties.hxx @@ -20,8 +20,7 @@ #ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_E3DEXTRUDEPROPERTIES_HXX #define INCLUDED_SVX_INC_SDR_PROPERTIES_E3DEXTRUDEPROPERTIES_HXX -#include <svx/sdr/properties/e3dcompoundproperties.hxx> -#include <svx/svxdllapi.h> +#include <sdr/properties/e3dcompoundproperties.hxx> @@ -29,7 +28,7 @@ namespace sdr { namespace properties { - class SVX_DLLPUBLIC E3dExtrudeProperties : public E3dCompoundProperties + class E3dExtrudeProperties : public E3dCompoundProperties { protected: // Called after ItemChange() is done for all items. diff --git a/svx/inc/sdr/properties/e3dlatheproperties.hxx b/svx/inc/sdr/properties/e3dlatheproperties.hxx index f1e965efbc6a..381246477b40 100644 --- a/svx/inc/sdr/properties/e3dlatheproperties.hxx +++ b/svx/inc/sdr/properties/e3dlatheproperties.hxx @@ -20,8 +20,7 @@ #ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_E3DLATHEPROPERTIES_HXX #define INCLUDED_SVX_INC_SDR_PROPERTIES_E3DLATHEPROPERTIES_HXX -#include <svx/sdr/properties/e3dcompoundproperties.hxx> -#include <svx/svxdllapi.h> +#include <sdr/properties/e3dcompoundproperties.hxx> @@ -29,7 +28,7 @@ namespace sdr { namespace properties { - class SVX_DLLPUBLIC E3dLatheProperties : public E3dCompoundProperties + class E3dLatheProperties : public E3dCompoundProperties { protected: // Called after ItemChange() is done for all items. diff --git a/svx/inc/sdr/properties/e3dproperties.hxx b/svx/inc/sdr/properties/e3dproperties.hxx new file mode 100644 index 000000000000..241ca60ea850 --- /dev/null +++ b/svx/inc/sdr/properties/e3dproperties.hxx @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SDR_PROPERTIES_E3DPROPERTIES_HXX +#define INCLUDED_SVX_SDR_PROPERTIES_E3DPROPERTIES_HXX + +#include <sdr/properties/attributeproperties.hxx> + + + +namespace sdr +{ + namespace properties + { + class E3dProperties : public AttributeProperties + { + protected: + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool) SAL_OVERRIDE; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) SAL_OVERRIDE; + + public: + // basic constructor + explicit E3dProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dProperties(const E3dProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const SAL_OVERRIDE; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) SAL_OVERRIDE; + }; + } // end of namespace properties +} // end of namespace sdr + + + +#endif // INCLUDED_SVX_SDR_PROPERTIES_E3DPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/e3dsceneproperties.hxx b/svx/inc/sdr/properties/e3dsceneproperties.hxx index d1ba00a6e504..9e26c37ba9dc 100644 --- a/svx/inc/sdr/properties/e3dsceneproperties.hxx +++ b/svx/inc/sdr/properties/e3dsceneproperties.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSCENEPROPERTIES_HXX #define INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSCENEPROPERTIES_HXX -#include <svx/sdr/properties/e3dproperties.hxx> +#include <sdr/properties/e3dproperties.hxx> diff --git a/svx/inc/sdr/properties/e3dsphereproperties.hxx b/svx/inc/sdr/properties/e3dsphereproperties.hxx index cd381eb50728..29eba7922a55 100644 --- a/svx/inc/sdr/properties/e3dsphereproperties.hxx +++ b/svx/inc/sdr/properties/e3dsphereproperties.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSPHEREPROPERTIES_HXX #define INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSPHEREPROPERTIES_HXX -#include <svx/sdr/properties/e3dcompoundproperties.hxx> +#include <sdr/properties/e3dcompoundproperties.hxx> diff --git a/svx/inc/sdr/properties/emptyproperties.hxx b/svx/inc/sdr/properties/emptyproperties.hxx new file mode 100644 index 000000000000..8728a0748644 --- /dev/null +++ b/svx/inc/sdr/properties/emptyproperties.hxx @@ -0,0 +1,95 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SDR_PROPERTIES_EMPTYPROPERTIES_HXX +#define INCLUDED_SVX_SDR_PROPERTIES_EMPTYPROPERTIES_HXX + +#include <svx/sdr/properties/properties.hxx> + + + +namespace sdr +{ + namespace properties + { + class EmptyProperties : public BaseProperties + { + protected: + // the to be used ItemSet + SfxItemSet* mpEmptyItemSet; + + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool) SAL_OVERRIDE; + + // test changeability for a single item + virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) const SAL_OVERRIDE; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) SAL_OVERRIDE; + + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) SAL_OVERRIDE; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) SAL_OVERRIDE; + + public: + // basic constructor + explicit EmptyProperties(SdrObject& rObj); + + // constructor for copying, but using new object + EmptyProperties(const EmptyProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~EmptyProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const SAL_OVERRIDE; + + // get itemset + virtual const SfxItemSet& GetObjectItemSet() const SAL_OVERRIDE; + + // set single item + virtual void SetObjectItem(const SfxPoolItem& rItem) SAL_OVERRIDE; + + // set single item direct, do not do any notifies or things like that + virtual void SetObjectItemDirect(const SfxPoolItem& rItem) SAL_OVERRIDE; + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) SAL_OVERRIDE; + + // clear single item direct, do not do any notifies or things like that. + // Also supports complete deleteion of items when default parameter 0 is used. + virtual void ClearObjectItemDirect(const sal_uInt16 nWhich = 0) SAL_OVERRIDE; + + // set complete item set + virtual void SetObjectItemSet(const SfxItemSet& rSet) SAL_OVERRIDE; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) SAL_OVERRIDE; + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const SAL_OVERRIDE; + }; + } // end of namespace properties +} // end of namespace sdr + +#endif // INCLUDED_SVX_SDR_PROPERTIES_EMPTYPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/graphicproperties.hxx b/svx/inc/sdr/properties/graphicproperties.hxx index 8a55e28aff75..1501c1eea4a4 100644 --- a/svx/inc/sdr/properties/graphicproperties.hxx +++ b/svx/inc/sdr/properties/graphicproperties.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_GRAPHICPROPERTIES_HXX #define INCLUDED_SVX_INC_SDR_PROPERTIES_GRAPHICPROPERTIES_HXX -#include <svx/sdr/properties/rectangleproperties.hxx> +#include <sdr/properties/rectangleproperties.hxx> diff --git a/svx/inc/sdr/properties/measureproperties.hxx b/svx/inc/sdr/properties/measureproperties.hxx index 3eeca28a32f9..953d7a4d97e2 100644 --- a/svx/inc/sdr/properties/measureproperties.hxx +++ b/svx/inc/sdr/properties/measureproperties.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_MEASUREPROPERTIES_HXX #define INCLUDED_SVX_INC_SDR_PROPERTIES_MEASUREPROPERTIES_HXX -#include <svx/sdr/properties/textproperties.hxx> +#include <sdr/properties/textproperties.hxx> diff --git a/svx/inc/sdr/properties/oleproperties.hxx b/svx/inc/sdr/properties/oleproperties.hxx index 8d3e9c24afb4..8f608bc3e50f 100644 --- a/svx/inc/sdr/properties/oleproperties.hxx +++ b/svx/inc/sdr/properties/oleproperties.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_OLEPROPERTIES_HXX #define INCLUDED_SVX_INC_SDR_PROPERTIES_OLEPROPERTIES_HXX -#include <svx/sdr/properties/rectangleproperties.hxx> +#include <sdr/properties/rectangleproperties.hxx> diff --git a/svx/inc/sdr/properties/pageproperties.hxx b/svx/inc/sdr/properties/pageproperties.hxx index e221c0c478fd..b024f1015924 100644 --- a/svx/inc/sdr/properties/pageproperties.hxx +++ b/svx/inc/sdr/properties/pageproperties.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SVX_INC_SDR_PROPERTIES_PAGEPROPERTIES_HXX #define INCLUDED_SVX_INC_SDR_PROPERTIES_PAGEPROPERTIES_HXX -#include <svx/sdr/properties/emptyproperties.hxx> +#include <sdr/properties/emptyproperties.hxx> diff --git a/svx/inc/sdr/properties/rectangleproperties.hxx b/svx/inc/sdr/properties/rectangleproperties.hxx new file mode 100644 index 000000000000..caf56beac2ff --- /dev/null +++ b/svx/inc/sdr/properties/rectangleproperties.hxx @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SDR_PROPERTIES_RECTANGLEPROPERTIES_HXX +#define INCLUDED_SVX_SDR_PROPERTIES_RECTANGLEPROPERTIES_HXX + +#include <sdr/properties/textproperties.hxx> + + + +namespace sdr +{ + namespace properties + { + class RectangleProperties : public TextProperties + { + protected: + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) SAL_OVERRIDE; + + public: + // basic constructor + explicit RectangleProperties(SdrObject& rObj); + + // constructor for copying, but using new object + RectangleProperties(const RectangleProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~RectangleProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const SAL_OVERRIDE; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) SAL_OVERRIDE; + }; + } // end of namespace properties +} // end of namespace sdr + + + +#endif // INCLUDED_SVX_SDR_PROPERTIES_RECTANGLEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/textproperties.hxx b/svx/inc/sdr/properties/textproperties.hxx new file mode 100644 index 000000000000..b23ebac48702 --- /dev/null +++ b/svx/inc/sdr/properties/textproperties.hxx @@ -0,0 +1,92 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_SDR_PROPERTIES_TEXTPROPERTIES_HXX +#define INCLUDED_SVX_SDR_PROPERTIES_TEXTPROPERTIES_HXX + +#include <svx/itextprovider.hxx> +#include <sdr/properties/attributeproperties.hxx> + + + +namespace sdr +{ + namespace properties + { + class TextProperties : public AttributeProperties + { + private: + // #i101556# versioning support + sal_uInt32 maVersion; + + protected: + // create a new itemset + virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool) SAL_OVERRIDE; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) SAL_OVERRIDE; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) SAL_OVERRIDE; + + /// Get the TextProvider related to our SdrObject + virtual const svx::ITextProvider& getTextProvider() const; + + public: + // basic constructor + explicit TextProperties(SdrObject& rObj); + + // constructor for copying, but using new object + TextProperties(const TextProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~TextProperties(); + + // Clone() operator, normally just calls the local copy constructor + virtual BaseProperties& Clone(SdrObject& rObj) const SAL_OVERRIDE; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) SAL_OVERRIDE; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() SAL_OVERRIDE; + + // force all attributes which come from styles to hard attributes + // to be able to live without the style. + virtual void ForceStyleToHardAttributes() SAL_OVERRIDE; + + // This is the notifyer from SfxListener + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) SAL_OVERRIDE; + + // Set single item at the local ItemSet. *Does not use* AllowItemChange(), + // ItemChange(), PostItemChange() and ItemSetChanged() calls. + void SetObjectItemNoBroadcast(const SfxPoolItem& rItem); + + // #i101556# versioning support + virtual sal_uInt32 getVersion() const SAL_OVERRIDE; + }; + } // end of namespace properties +} // end of namespace sdr + + + +#endif // INCLUDED_SVX_SDR_PROPERTIES_TEXTPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |