diff options
Diffstat (limited to '')
20 files changed, 1417 insertions, 0 deletions
diff --git a/svx/inc/sdr/properties/attributeproperties.hxx b/svx/inc/sdr/properties/attributeproperties.hxx new file mode 100644 index 000000000..aa02c9484 --- /dev/null +++ b/svx/inc/sdr/properties/attributeproperties.hxx @@ -0,0 +1,94 @@ +/* -*- 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 + { + // core to set parent at SfxItemSet and to execute the hard attribute computations + void ImpSetParentAtSfxItemSet(bool bDontRemoveHardAttr); + + // 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 StyleSheet of this object + SfxStyleSheet* mpStyleSheet; + + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& pPool) override; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) 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 std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // Get the local ItemSet. This directly returns the local ItemSet of the object. No + // merging of ItemSets is done for e.g. Group objects. + virtual const SfxItemSet& GetObjectItemSet() const override; + + // destructor + virtual ~AttributeProperties() override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const override; + + // force all attributes which come from styles to hard attributes + // to be able to live without the style. + virtual void ForceStyleToHardAttributes() override; + + // This is the Notify(...) from 2nd base class SfxListener + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; + + virtual bool isUsedByModel() const 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 new file mode 100644 index 000000000..6e313daa3 --- /dev/null +++ b/svx/inc/sdr/properties/captionproperties.hxx @@ -0,0 +1,64 @@ +/* -*- 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_INC_SDR_PROPERTIES_CAPTIONPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_CAPTIONPROPERTIES_HXX + +#include <sdr/properties/rectangleproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class CaptionProperties final : public RectangleProperties + { + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit CaptionProperties(SdrObject& rObj); + + // constructor for copying, but using new object + CaptionProperties(const CaptionProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~CaptionProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_CAPTIONPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/circleproperties.hxx b/svx/inc/sdr/properties/circleproperties.hxx new file mode 100644 index 000000000..eb5c1980d --- /dev/null +++ b/svx/inc/sdr/properties/circleproperties.hxx @@ -0,0 +1,64 @@ +/* -*- 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_INC_SDR_PROPERTIES_CIRCLEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_CIRCLEPROPERTIES_HXX + +#include <sdr/properties/rectangleproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class CircleProperties final : public RectangleProperties + { + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit CircleProperties(SdrObject& rObj); + + // constructor for copying, but using new object + CircleProperties(const CircleProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~CircleProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_CIRCLEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/connectorproperties.hxx b/svx/inc/sdr/properties/connectorproperties.hxx new file mode 100644 index 000000000..f5d5c3892 --- /dev/null +++ b/svx/inc/sdr/properties/connectorproperties.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_INC_SDR_PROPERTIES_CONNECTORPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_CONNECTORPROPERTIES_HXX + +#include <sdr/properties/textproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class ConnectorProperties final : public TextProperties + { + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit ConnectorProperties(SdrObject& rObj); + + // constructor for copying, but using new object + ConnectorProperties(const ConnectorProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~ConnectorProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_CONNECTORPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/customshapeproperties.hxx b/svx/inc/sdr/properties/customshapeproperties.hxx new file mode 100644 index 000000000..696243bb3 --- /dev/null +++ b/svx/inc/sdr/properties/customshapeproperties.hxx @@ -0,0 +1,88 @@ +/* -*- 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_INC_SDR_PROPERTIES_CUSTOMSHAPEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_CUSTOMSHAPEPROPERTIES_HXX + +#include <sdr/properties/textproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class CustomShapeProperties final : public TextProperties + { + private: + void UpdateTextFrameStatus(bool bInvalidateRenderGeometry); + + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // test changeability for a single item + virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + // react on Item change + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; + + // Called after ItemChange() is done for all items. Allows local reactions on + // specific item changes + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override; + + // clear single item direct, do not do any notifies or things like that. + // Also supports complete deletion of items when default parameter 0 is used. + virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) override; + + public: + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + + // basic constructor + explicit CustomShapeProperties(SdrObject& rObj); + + // constructor for copying, but using new object + CustomShapeProperties(const CustomShapeProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~CustomShapeProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // This is the notifier from SfxListener + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_CUSTOMSHAPEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/e3dcompoundproperties.hxx b/svx/inc/sdr/properties/e3dcompoundproperties.hxx new file mode 100644 index 000000000..22da0bfca --- /dev/null +++ b/svx/inc/sdr/properties/e3dcompoundproperties.hxx @@ -0,0 +1,65 @@ +/* -*- 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> + + +namespace sdr +{ + namespace properties + { + class E3dCompoundProperties : public E3dProperties + { + protected: + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + public: + // basic constructor + explicit E3dCompoundProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dCompoundProperties(const E3dCompoundProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dCompoundProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // Get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may + // be overridden 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 override; + + // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). + virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false) 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 new file mode 100644 index 000000000..b614a9082 --- /dev/null +++ b/svx/inc/sdr/properties/e3dextrudeproperties.hxx @@ -0,0 +1,54 @@ +/* -*- 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_INC_SDR_PROPERTIES_E3DEXTRUDEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_E3DEXTRUDEPROPERTIES_HXX + +#include <sdr/properties/e3dcompoundproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class E3dExtrudeProperties final : public E3dCompoundProperties + { + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + public: + // basic constructor + explicit E3dExtrudeProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dExtrudeProperties(const E3dExtrudeProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dExtrudeProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_E3DEXTRUDEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/e3dlatheproperties.hxx b/svx/inc/sdr/properties/e3dlatheproperties.hxx new file mode 100644 index 000000000..8b8030052 --- /dev/null +++ b/svx/inc/sdr/properties/e3dlatheproperties.hxx @@ -0,0 +1,54 @@ +/* -*- 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_INC_SDR_PROPERTIES_E3DLATHEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_E3DLATHEPROPERTIES_HXX + +#include <sdr/properties/e3dcompoundproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class E3dLatheProperties final : public E3dCompoundProperties + { + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + public: + // basic constructor + explicit E3dLatheProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dLatheProperties(const E3dLatheProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dLatheProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_E3DLATHEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/e3dproperties.hxx b/svx/inc/sdr/properties/e3dproperties.hxx new file mode 100644 index 000000000..2a6eb0e9e --- /dev/null +++ b/svx/inc/sdr/properties/e3dproperties.hxx @@ -0,0 +1,58 @@ +/* -*- 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 std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit E3dProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dProperties(const E3dProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const 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 new file mode 100644 index 000000000..269ecf83d --- /dev/null +++ b/svx/inc/sdr/properties/e3dsceneproperties.hxx @@ -0,0 +1,79 @@ +/* -*- 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_INC_SDR_PROPERTIES_E3DSCENEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSCENEPROPERTIES_HXX + +#include <sdr/properties/e3dproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class E3dSceneProperties final : public E3dProperties + { + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + public: + // basic constructor + explicit E3dSceneProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dSceneProperties(const E3dSceneProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dSceneProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may + // be overridden 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 override; + + // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). + virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false) override; + + // Set a single item, iterate over hierarchies if necessary. + virtual void SetMergedItem(const SfxPoolItem& rItem) override; + + // Clear a single item, iterate over hierarchies if necessary. + virtual void ClearMergedItem(const sal_uInt16 nWhich) override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const override; + + // Special for scene: + void SetSceneItemsFromCamera(); + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSCENEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/e3dsphereproperties.hxx b/svx/inc/sdr/properties/e3dsphereproperties.hxx new file mode 100644 index 000000000..b1ef923cb --- /dev/null +++ b/svx/inc/sdr/properties/e3dsphereproperties.hxx @@ -0,0 +1,54 @@ +/* -*- 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_INC_SDR_PROPERTIES_E3DSPHEREPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSPHEREPROPERTIES_HXX + +#include <sdr/properties/e3dcompoundproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class E3dSphereProperties final : public E3dCompoundProperties + { + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + public: + // basic constructor + explicit E3dSphereProperties(SdrObject& rObj); + + // constructor for copying, but using new object + E3dSphereProperties(const E3dSphereProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~E3dSphereProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_E3DSPHEREPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/emptyproperties.hxx b/svx/inc/sdr/properties/emptyproperties.hxx new file mode 100644 index 000000000..734f7be37 --- /dev/null +++ b/svx/inc/sdr/properties/emptyproperties.hxx @@ -0,0 +1,93 @@ +/* -*- 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 <sal/config.h> + +#include <memory> + +#include <svx/sdr/properties/properties.hxx> +#include <svl/itemset.hxx> + + +namespace sdr +{ + namespace properties + { + class EmptyProperties : public BaseProperties + { + protected: + // the to be used ItemSet + std::unique_ptr<SfxItemSet> mpEmptyItemSet; + + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // test changeability for a single item + virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; + + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit EmptyProperties(SdrObject& rObj); + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // get itemset + virtual const SfxItemSet& GetObjectItemSet() const override; + + // set single item + virtual void SetObjectItem(const SfxPoolItem& rItem) override; + + // set single item direct, do not do any notifies or things like that + virtual void SetObjectItemDirect(const SfxPoolItem& rItem) override; + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override; + + // clear single item direct, do not do any notifies or things like that. + // Also supports complete deletion of items when default parameter 0 is used. + virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) override; + + // set complete item set + virtual void SetObjectItemSet(const SfxItemSet& rSet) override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const 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 new file mode 100644 index 000000000..018c76435 --- /dev/null +++ b/svx/inc/sdr/properties/graphicproperties.hxx @@ -0,0 +1,67 @@ +/* -*- 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_INC_SDR_PROPERTIES_GRAPHICPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_GRAPHICPROPERTIES_HXX + +#include <sdr/properties/rectangleproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class GraphicProperties final : public RectangleProperties + { + // apply the correct SfyStyleSheet from SdrObject's SdrModel + virtual void applyDefaultStyleSheetFromSdrModel() override; + + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit GraphicProperties(SdrObject& rObj); + + // constructor for copying, but using new object + GraphicProperties(const GraphicProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~GraphicProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_GRAPHICPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/groupproperties.hxx b/svx/inc/sdr/properties/groupproperties.hxx new file mode 100644 index 000000000..412881708 --- /dev/null +++ b/svx/inc/sdr/properties/groupproperties.hxx @@ -0,0 +1,115 @@ +/* -*- 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_INC_SDR_PROPERTIES_GROUPPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_GROUPPROPERTIES_HXX + +#include <svx/sdr/properties/defaultproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class GroupProperties final : public DefaultProperties + { + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // test changeability for a single item + virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; + + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit GroupProperties(SdrObject& rObj); + + // copy constructor + GroupProperties(const GroupProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~GroupProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // get itemset + virtual const SfxItemSet& GetObjectItemSet() const override; + + // get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may + // be overridden 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 override; + + // Set merged ItemSet. Normally, this maps to SetObjectItemSet(). + virtual void SetMergedItemSet(const SfxItemSet& rSet, bool bClearAllItems = false) override; + + // set single item + virtual void SetObjectItem(const SfxPoolItem& rItem) override; + + // set single item direct, do not do any notifies or things like that + virtual void SetObjectItemDirect(const SfxPoolItem& rItem) override; + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override; + + // clear single item direct, do not do any notifies or things like that. + // Also supports complete deletion of items when default parameter 0 is used. + virtual void ClearObjectItemDirect(const sal_uInt16 nWhich) override; + + // Set a single item, iterate over hierarchies if necessary. + virtual void SetMergedItem(const SfxPoolItem& rItem) override; + + // Clear a single item, iterate over hierarchies if necessary. + virtual void ClearMergedItem(const sal_uInt16 nWhich) override; + + // set complete item set + virtual void SetObjectItemSet(const SfxItemSet& rSet) override; + + // set a new StyleSheet + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // get the local StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + + // force all attributes which come from styles to hard attributes + // to be able to live without the style. + virtual void ForceStyleToHardAttributes() override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_GROUPPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/itemsettools.hxx b/svx/inc/sdr/properties/itemsettools.hxx new file mode 100644 index 000000000..4559f8f2e --- /dev/null +++ b/svx/inc/sdr/properties/itemsettools.hxx @@ -0,0 +1,65 @@ +/* -*- 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_INC_SDR_PROPERTIES_ITEMSETTOOLS_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_ITEMSETTOOLS_HXX + +#include <sal/types.h> +#include <tools/gen.hxx> +#include <vector> + +class SdrObject; +class SfxItemSet; +class Fraction; + +// class to remember broadcast start positions +namespace sdr +{ + namespace properties + { + class ItemChangeBroadcaster + { + std::vector< tools::Rectangle > maRectangles; + + public: + explicit ItemChangeBroadcaster(const SdrObject& rObj); + + sal_uInt32 GetRectangleCount() const + { + return maRectangles.size(); + } + const tools::Rectangle& GetRectangle(sal_uInt32 nIndex) const + { + return maRectangles[nIndex]; + } + }; + } // end of namespace properties +} // end of namespace sdr + +namespace sdr +{ + namespace properties + { + void ScaleItemSet(SfxItemSet& rSet, const Fraction& rScale); + } // end of namespace properties +} // end of namespace sdr + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_ITEMSETTOOLS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/measureproperties.hxx b/svx/inc/sdr/properties/measureproperties.hxx new file mode 100644 index 000000000..70f3812e3 --- /dev/null +++ b/svx/inc/sdr/properties/measureproperties.hxx @@ -0,0 +1,64 @@ +/* -*- 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_INC_SDR_PROPERTIES_MEASUREPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_MEASUREPROPERTIES_HXX + +#include <sdr/properties/textproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class MeasureProperties final : public TextProperties + { + // create a new itemset + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) override; + + public: + // basic constructor + explicit MeasureProperties(SdrObject& rObj); + + // constructor for copying, but using new object + MeasureProperties(const MeasureProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~MeasureProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_MEASUREPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/oleproperties.hxx b/svx/inc/sdr/properties/oleproperties.hxx new file mode 100644 index 000000000..49629be3d --- /dev/null +++ b/svx/inc/sdr/properties/oleproperties.hxx @@ -0,0 +1,58 @@ +/* -*- 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_INC_SDR_PROPERTIES_OLEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_OLEPROPERTIES_HXX + +#include <sdr/properties/rectangleproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class OleProperties final : public RectangleProperties + { + // apply the correct SfyStyleSheet from SdrObject's SdrModel + virtual void applyDefaultStyleSheetFromSdrModel() override; + + public: + // basic constructor + explicit OleProperties(SdrObject& rObj); + + // constructor for copying, but using new object + OleProperties(const OleProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~OleProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_OLEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/pageproperties.hxx b/svx/inc/sdr/properties/pageproperties.hxx new file mode 100644 index 000000000..1aab9c2f6 --- /dev/null +++ b/svx/inc/sdr/properties/pageproperties.hxx @@ -0,0 +1,73 @@ +/* -*- 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_INC_SDR_PROPERTIES_PAGEPROPERTIES_HXX +#define INCLUDED_SVX_INC_SDR_PROPERTIES_PAGEPROPERTIES_HXX + +#include <sdr/properties/emptyproperties.hxx> + + +namespace sdr +{ + namespace properties + { + class PageProperties final : public EmptyProperties + { + // create a new object specific itemset with object specific ranges. + virtual std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& pPool) override; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; + + // Called after ItemChange() is done for all items. + virtual void PostItemChange(const sal_uInt16 nWhich) override; + + public: + // basic constructor + explicit PageProperties(SdrObject& rObj); + + // constructor for copying, but using new object + PageProperties(const PageProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~PageProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // get itemset. Override here to allow creating the empty itemset + // without asserting + virtual const SfxItemSet& GetObjectItemSet() const override; + + // get the installed StyleSheet + virtual SfxStyleSheet* GetStyleSheet() const override; + + // set the installed StyleSheet + virtual void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr) override; + + // clear single item + virtual void ClearObjectItem(const sal_uInt16 nWhich = 0) override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_INC_SDR_PROPERTIES_PAGEPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/properties/rectangleproperties.hxx b/svx/inc/sdr/properties/rectangleproperties.hxx new file mode 100644 index 000000000..5512ffb5b --- /dev/null +++ b/svx/inc/sdr/properties/rectangleproperties.hxx @@ -0,0 +1,58 @@ +/* -*- 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) override; + + public: + // basic constructor + explicit RectangleProperties(SdrObject& rObj); + + // constructor for copying, but using new object + RectangleProperties(const RectangleProperties& rProps, SdrObject& rObj); + + // destructor + virtual ~RectangleProperties() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) 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 000000000..5e6482a4f --- /dev/null +++ b/svx/inc/sdr/properties/textproperties.hxx @@ -0,0 +1,90 @@ +/* -*- 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 std::unique_ptr<SfxItemSet> CreateObjectSpecificItemSet(SfxItemPool& rPool) override; + + // Do the ItemChange, may do special handling + virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; + + // react on ItemSet changes + virtual void ItemSetChanged(const SfxItemSet& rSet) 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() override; + + // Clone() operator, normally just calls the local copy constructor + virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override; + + // set a new StyleSheet and broadcast + virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override; + + // force default attributes for a specific object type, called from + // DefaultProperties::GetObjectItemSet() if a new ItemSet is created + virtual void ForceDefaultAttributes() override; + + // force all attributes which come from styles to hard attributes + // to be able to live without the style. + virtual void ForceStyleToHardAttributes() override; + + // This is the notifier from SfxListener + virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) 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 override; + }; + } // end of namespace properties +} // end of namespace sdr + + +#endif // INCLUDED_SVX_SDR_PROPERTIES_TEXTPROPERTIES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |