diff options
-rw-r--r-- | editeng/source/items/CustomPropertyField.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/flditem.cxx | 33 | ||||
-rw-r--r-- | editeng/source/items/svdfield.cxx | 2 | ||||
-rw-r--r-- | idl/inc/basobj.hxx | 1 | ||||
-rw-r--r-- | idl/inc/database.hxx | 1 | ||||
-rw-r--r-- | idl/inc/types.hxx | 1 | ||||
-rw-r--r-- | include/editeng/CustomPropertyField.hxx | 2 | ||||
-rw-r--r-- | include/editeng/flditem.hxx | 45 | ||||
-rw-r--r-- | include/editeng/measfld.hxx | 2 | ||||
-rw-r--r-- | include/tools/pstm.hxx | 44 | ||||
-rw-r--r-- | solenv/clang-format/blacklist | 1 | ||||
-rw-r--r-- | svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx | 12 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 17 |
13 files changed, 42 insertions, 121 deletions
diff --git a/editeng/source/items/CustomPropertyField.cxx b/editeng/source/items/CustomPropertyField.cxx index 3fbe5a89fe89..d46b47af52ae 100644 --- a/editeng/source/items/CustomPropertyField.cxx +++ b/editeng/source/items/CustomPropertyField.cxx @@ -28,8 +28,6 @@ CustomPropertyField::CustomPropertyField(OUString const & rName, OUString const CustomPropertyField::~CustomPropertyField() {} -SV_IMPL_PERSIST1(CustomPropertyField); - std::unique_ptr<SvxFieldData> CustomPropertyField::Clone() const { return o3tl::make_unique<CustomPropertyField>(msName, msCurrentPresentation); diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 722d54a710db..3365761cd1d6 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -322,9 +322,6 @@ bool SvxFieldItem::operator==( const SfxPoolItem& rItem ) const // The following are the derivatives of SvxFieldData ... -SV_IMPL_PERSIST1( SvxDateField ); - - SvxDateField::SvxDateField() { nFixDate = Date( Date::SYSTEM ).GetDate(); @@ -436,9 +433,6 @@ MetaAction* SvxDateField::createBeginComment() const return new MetaCommentAction( "FIELD_SEQ_BEGIN" ); } -SV_IMPL_PERSIST1( SvxURLField ); - - SvxURLField::SvxURLField() { eFormat = SvxURLFormat::Url; @@ -484,8 +478,6 @@ MetaAction* SvxURLField::createBeginComment() const // SvxPageTitleField methods // -SV_IMPL_PERSIST1( SvxPageTitleField ); - SvxPageTitleField::SvxPageTitleField() {} std::unique_ptr<SvxFieldData> SvxPageTitleField::Clone() const @@ -509,8 +501,6 @@ MetaAction* SvxPageTitleField::createBeginComment() const // The fields that were removed from Calc: -SV_IMPL_PERSIST1( SvxPageField ); - SvxPageField::SvxPageField() {} std::unique_ptr<SvxFieldData> SvxPageField::Clone() const @@ -529,8 +519,6 @@ MetaAction* SvxPageField::createBeginComment() const } -SV_IMPL_PERSIST1( SvxPagesField ); - SvxPagesField::SvxPagesField() {} std::unique_ptr<SvxFieldData> SvxPagesField::Clone() const @@ -543,8 +531,6 @@ bool SvxPagesField::operator==( const SvxFieldData& rCmp ) const return ( dynamic_cast< const SvxPagesField *>(&rCmp) != nullptr); } -SV_IMPL_PERSIST1( SvxTimeField ); - SvxTimeField::SvxTimeField() {} std::unique_ptr<SvxFieldData> SvxTimeField::Clone() const @@ -562,8 +548,6 @@ MetaAction* SvxTimeField::createBeginComment() const return new MetaCommentAction( "FIELD_SEQ_BEGIN" ); } -SV_IMPL_PERSIST1( SvxFileField ); - SvxFileField::SvxFileField() {} std::unique_ptr<SvxFieldData> SvxFileField::Clone() const @@ -576,8 +560,6 @@ bool SvxFileField::operator==( const SvxFieldData& rCmp ) const return ( dynamic_cast< const SvxFileField *>(&rCmp) != nullptr ); } -SV_IMPL_PERSIST1( SvxTableField ); - SvxTableField::SvxTableField() : mnTab(0) {} SvxTableField::SvxTableField(int nTab) : mnTab(nTab) {} @@ -604,9 +586,6 @@ bool SvxTableField::operator==( const SvxFieldData& rCmp ) const // SvxExtTimeField -SV_IMPL_PERSIST1( SvxExtTimeField ); - - SvxExtTimeField::SvxExtTimeField() : m_nFixTime( tools::Time(tools::Time::SYSTEM).GetTime() ) { @@ -721,9 +700,6 @@ MetaAction* SvxExtTimeField::createBeginComment() const // SvxExtFileField -SV_IMPL_PERSIST1( SvxExtFileField ); - - SvxExtFileField::SvxExtFileField() { eType = SvxFileType::Var; @@ -836,9 +812,6 @@ OUString SvxExtFileField::GetFormatted() const // SvxAuthorField -SV_IMPL_PERSIST1( SvxAuthorField ); - - SvxAuthorField::SvxAuthorField( const OUString& rFirstName, const OUString& rLastName, const OUString& rShortName, @@ -897,8 +870,6 @@ OUString SvxAuthorField::GetFormatted() const return aString; } -SV_IMPL_PERSIST1( SvxHeaderField ); - SvxHeaderField::SvxHeaderField() {} std::unique_ptr<SvxFieldData> SvxHeaderField::Clone() const @@ -911,8 +882,6 @@ bool SvxHeaderField::operator==( const SvxFieldData& rCmp ) const return ( dynamic_cast< const SvxHeaderField *>(&rCmp) != nullptr ); } -SV_IMPL_PERSIST1( SvxFooterField ); - SvxFooterField::SvxFooterField() {} std::unique_ptr<SvxFieldData> SvxFooterField::Clone() const @@ -925,8 +894,6 @@ bool SvxFooterField::operator==( const SvxFieldData& rCmp ) const return ( dynamic_cast< const SvxFooterField *>(&rCmp) != nullptr ); } -SV_IMPL_PERSIST1( SvxDateTimeField ); - std::unique_ptr<SvxFieldData> SvxDateTimeField::Clone() const { return o3tl::make_unique<SvxDateTimeField>(); // empty diff --git a/editeng/source/items/svdfield.cxx b/editeng/source/items/svdfield.cxx index ac3c0900de37..4050871d515f 100644 --- a/editeng/source/items/svdfield.cxx +++ b/editeng/source/items/svdfield.cxx @@ -21,8 +21,6 @@ #include <editeng/measfld.hxx> #include <o3tl/make_unique.hxx> -SV_IMPL_PERSIST1(SdrMeasureField); - SdrMeasureField::~SdrMeasureField() { } diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx index f74b9230fb8a..d3ea84fdc7a9 100644 --- a/idl/inc/basobj.hxx +++ b/idl/inc/basobj.hxx @@ -22,7 +22,6 @@ #include <tools/ref.hxx> #include "bastype.hxx" -#include <tools/pstm.hxx> #include <functional> #include <vector> diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx index 6b3904b55c1a..86e45c0dc844 100644 --- a/idl/inc/database.hxx +++ b/idl/inc/database.hxx @@ -24,7 +24,6 @@ #include "hash.hxx" #include "lex.hxx" #include <rtl/string.hxx> -#include <tools/pstm.hxx> #include <rtl/ustring.hxx> #include <set> diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index e946ed35436b..a0f796fc66f9 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -21,6 +21,7 @@ #define INCLUDED_IDL_INC_TYPES_HXX #include <rtl/strbuf.hxx> +#include <tools/solar.h> #include <tools/ref.hxx> #include "basobj.hxx" diff --git a/include/editeng/CustomPropertyField.hxx b/include/editeng/CustomPropertyField.hxx index 43580ac4b178..fbfc0410f727 100644 --- a/include/editeng/CustomPropertyField.hxx +++ b/include/editeng/CustomPropertyField.hxx @@ -34,7 +34,7 @@ public: virtual ~CustomPropertyField() override; - SV_DECL_PERSIST1(CustomPropertyField, css::text::textfield::Type::DOCINFO_CUSTOM) + virtual sal_Int32 GetClassId() const override { return css::text::textfield::Type::DOCINFO_CUSTOM; } virtual std::unique_ptr<SvxFieldData> Clone() const override; virtual bool operator==(const SvxFieldData&) const override; diff --git a/include/editeng/flditem.hxx b/include/editeng/flditem.hxx index 065dc60969f2..9ed775c01c1c 100644 --- a/include/editeng/flditem.hxx +++ b/include/editeng/flditem.hxx @@ -23,7 +23,6 @@ #include <tools/time.hxx> #include <tools/date.hxx> #include <svl/poolitem.hxx> -#include <tools/pstm.hxx> #include <editeng/editengdllapi.h> #include <com/sun/star/text/textfield/Type.hpp> @@ -47,7 +46,8 @@ public: static SvxFieldData* Create(const css::uno::Reference<css::text::XTextContent>& xContent); - virtual sal_Int32 GetClassId() const { return css::text::textfield::Type::UNSPECIFIED; } + static constexpr auto CLASS_ID = css::text::textfield::Type::UNSPECIFIED; + virtual sal_Int32 GetClassId() const { return CLASS_ID; } SvxFieldData(); virtual ~SvxFieldData(); @@ -104,7 +104,8 @@ class EDITENG_DLLPUBLIC SvxDateField : public SvxFieldData SvxDateFormat eFormat; public: - SV_DECL_PERSIST1( SvxDateField, css::text::textfield::Type::DATE ) + static constexpr auto CLASS_ID = css::text::textfield::Type::DATE; + virtual sal_Int32 GetClassId() const override { return CLASS_ID; } SvxDateField(); explicit SvxDateField( const Date& rDate, @@ -147,7 +148,8 @@ private: OUString aTargetFrame; // In what Frame public: - SV_DECL_PERSIST1( SvxURLField, css::text::textfield::Type::URL ) + static constexpr auto CLASS_ID = css::text::textfield::Type::URL; + virtual sal_Int32 GetClassId() const override { return CLASS_ID; } SvxURLField(); SvxURLField( const OUString& rURL, const OUString& rRepres, SvxURLFormat eFmt = SvxURLFormat::Url ); @@ -173,7 +175,7 @@ public: class EDITENG_DLLPUBLIC SvxPageField final: public SvxFieldData { public: - SV_DECL_PERSIST1( SvxPageField, css::text::textfield::Type::PAGE ) + virtual sal_Int32 GetClassId() const override { return css::text::textfield::Type::PAGE; } SvxPageField(); virtual std::unique_ptr<SvxFieldData> Clone() const override; @@ -185,7 +187,8 @@ public: class EDITENG_DLLPUBLIC SvxPageTitleField final: public SvxFieldData { public: - SV_DECL_PERSIST1( SvxPageTitleField, css::text::textfield::Type::PAGE_NAME ) + static constexpr auto CLASS_ID = css::text::textfield::Type::PAGE_NAME; + virtual sal_Int32 GetClassId() const override { return CLASS_ID; } SvxPageTitleField(); virtual std::unique_ptr<SvxFieldData> Clone() const override; @@ -197,7 +200,8 @@ public: class EDITENG_DLLPUBLIC SvxPagesField final: public SvxFieldData { public: - SV_DECL_PERSIST1( SvxPagesField, css::text::textfield::Type::PAGES ) + static constexpr auto CLASS_ID = css::text::textfield::Type::PAGES; + virtual sal_Int32 GetClassId() const override { return CLASS_ID; } SvxPagesField(); virtual std::unique_ptr<SvxFieldData> Clone() const override; @@ -207,7 +211,8 @@ public: class EDITENG_DLLPUBLIC SvxTimeField final: public SvxFieldData { public: - SV_DECL_PERSIST1( SvxTimeField, css::text::textfield::Type::TIME ) + static constexpr auto CLASS_ID = css::text::textfield::Type::TIME; + virtual sal_Int32 GetClassId() const override { return CLASS_ID; } SvxTimeField(); virtual std::unique_ptr<SvxFieldData> Clone() const override; @@ -219,7 +224,8 @@ public: class EDITENG_DLLPUBLIC SvxFileField final: public SvxFieldData { public: - SV_DECL_PERSIST1( SvxFileField, css::text::textfield::Type::DOCINFO_TITLE ) + static constexpr auto CLASS_ID = css::text::textfield::Type::DOCINFO_TITLE; + virtual sal_Int32 GetClassId() const override { return CLASS_ID; } SvxFileField(); virtual std::unique_ptr<SvxFieldData> Clone() const override; @@ -230,7 +236,8 @@ class EDITENG_DLLPUBLIC SvxTableField final: public SvxFieldData { int mnTab; public: - SV_DECL_PERSIST1( SvxTableField, css::text::textfield::Type::TABLE ) + static constexpr auto CLASS_ID = css::text::textfield::Type::TABLE; + virtual sal_Int32 GetClassId() const override { return CLASS_ID; } SvxTableField(); explicit SvxTableField(int nTab); @@ -269,7 +276,8 @@ private: SvxTimeFormat eFormat; public: - SV_DECL_PERSIST1( SvxExtTimeField, css::text::textfield::Type::EXTENDED_TIME ) + static constexpr auto CLASS_ID = css::text::textfield::Type::EXTENDED_TIME; + virtual sal_Int32 GetClassId() const override { return CLASS_ID; } SvxExtTimeField(); explicit SvxExtTimeField( const tools::Time& rTime, SvxTimeType eType, @@ -316,7 +324,8 @@ private: SvxFileFormat eFormat; public: - SV_DECL_PERSIST1( SvxExtFileField, css::text::textfield::Type::EXTENDED_FILE ) + static constexpr auto CLASS_ID = css::text::textfield::Type::EXTENDED_FILE; + virtual sal_Int32 GetClassId() const override { return CLASS_ID; } SvxExtFileField(); explicit SvxExtFileField( const OUString& rString, SvxFileType eType = SvxFileType::Var, @@ -358,7 +367,8 @@ private: SvxAuthorFormat eFormat; public: - SV_DECL_PERSIST1( SvxAuthorField, css::text::textfield::Type::AUTHOR ) + static constexpr auto CLASS_ID = css::text::textfield::Type::AUTHOR; + virtual sal_Int32 GetClassId() const override { return CLASS_ID; } SvxAuthorField( const OUString& rFirstName, const OUString& rLastName, @@ -383,7 +393,8 @@ public: class EDITENG_DLLPUBLIC SvxHeaderField final: public SvxFieldData { public: - SV_DECL_PERSIST1( SvxHeaderField, css::text::textfield::Type::PRESENTATION_HEADER ) + static constexpr auto CLASS_ID = css::text::textfield::Type::PRESENTATION_HEADER; + virtual sal_Int32 GetClassId() const override { return CLASS_ID; } SvxHeaderField(); virtual std::unique_ptr<SvxFieldData> Clone() const override; @@ -395,7 +406,8 @@ public: class EDITENG_DLLPUBLIC SvxFooterField final: public SvxFieldData { public: - SV_DECL_PERSIST1( SvxFooterField, css::text::textfield::Type::PRESENTATION_FOOTER ) + static constexpr auto CLASS_ID = css::text::textfield::Type::PRESENTATION_FOOTER; + virtual sal_Int32 GetClassId() const override { return CLASS_ID; } SvxFooterField(); virtual std::unique_ptr<SvxFieldData> Clone() const override; virtual bool operator==( const SvxFieldData& ) const override; @@ -406,7 +418,8 @@ public: class EDITENG_DLLPUBLIC SvxDateTimeField final: public SvxFieldData { public: - SV_DECL_PERSIST1( SvxDateTimeField, css::text::textfield::Type::PRESENTATION_DATE_TIME ) + static constexpr auto CLASS_ID = css::text::textfield::Type::PRESENTATION_DATE_TIME; + virtual sal_Int32 GetClassId() const override { return CLASS_ID; } SvxDateTimeField(); static OUString GetFormatted( Date const & rDate, tools::Time const & rTime, diff --git a/include/editeng/measfld.hxx b/include/editeng/measfld.hxx index 50bf3cc3e8df..2422ed9a8462 100644 --- a/include/editeng/measfld.hxx +++ b/include/editeng/measfld.hxx @@ -32,7 +32,7 @@ enum class SdrMeasureFieldKind { Value, Unit, Rotate90Blanks }; class EDITENG_DLLPUBLIC SdrMeasureField: public SvxFieldData { SdrMeasureFieldKind eMeasureFieldKind; public: - SV_DECL_PERSIST1(SdrMeasureField, css::text::textfield::Type::MEASURE) + virtual sal_Int32 GetClassId() const override { return css::text::textfield::Type::MEASURE; } SdrMeasureField(SdrMeasureFieldKind eNewKind): eMeasureFieldKind(eNewKind) {} virtual ~SdrMeasureField() override; virtual std::unique_ptr<SvxFieldData> Clone() const override; diff --git a/include/tools/pstm.hxx b/include/tools/pstm.hxx deleted file mode 100644 index 062025891826..000000000000 --- a/include/tools/pstm.hxx +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- 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_TOOLS_PSTM_HXX -#define INCLUDED_TOOLS_PSTM_HXX - -#include <tools/toolsdllapi.h> -#include <tools/ref.hxx> -#include <tools/stream.hxx> -#include <map> -#include <unordered_map> - -#define SV_DECL_PERSIST1( Class, CLASS_ID ) \ - static sal_Int32 StaticClassId() { return CLASS_ID; } \ - virtual sal_Int32 GetClassId() const override; \ - -#define SV_IMPL_PERSIST1( Class ) \ - sal_Int32 Class::GetClassId() const \ - { return StaticClassId(); } \ - -class SvPersistBase : public SvRefBase -{ -public: - virtual sal_Int32 GetClassId() const = 0; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist index 05ef966593b9..6f7e23976278 100644 --- a/solenv/clang-format/blacklist +++ b/solenv/clang-format/blacklist @@ -7776,7 +7776,6 @@ include/tools/mempool.hxx include/tools/multisel.hxx include/tools/pathutils.hxx include/tools/poly.hxx -include/tools/pstm.hxx include/tools/ref.hxx include/tools/resary.hxx include/tools/solar.h diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index e3d7aba47366..334f390756d7 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -111,12 +111,12 @@ namespace drawinglayer { const EditTextObject& rETO = maOutlinerParaObject.GetTextObject(); - mbContainsPageField = rETO.HasField(SvxPageField::StaticClassId()); - mbContainsPageCountField = rETO.HasField(SvxPagesField::StaticClassId()); - mbContainsOtherFields = rETO.HasField(SvxHeaderField::StaticClassId()) - || rETO.HasField(SvxFooterField::StaticClassId()) - || rETO.HasField(SvxDateTimeField::StaticClassId()) - || rETO.HasField(SvxAuthorField::StaticClassId()); + mbContainsPageField = rETO.HasField(SvxPageField::CLASS_ID); + mbContainsPageCountField = rETO.HasField(SvxPagesField::CLASS_ID); + mbContainsOtherFields = rETO.HasField(SvxHeaderField::CLASS_ID) + || rETO.HasField(SvxFooterField::CLASS_ID) + || rETO.HasField(SvxDateTimeField::CLASS_ID) + || rETO.HasField(SvxAuthorField::CLASS_ID); } const SdrText* SdrTextPrimitive2D::getSdrText() const { return mrSdrText.get(); } diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 167b8e50825e..d40dadb35131 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1140,19 +1140,10 @@ void SdrTextObj::ImpCheckMasterCachable() if(!bNotVisibleAsMaster && pOutlinerParaObject && pOutlinerParaObject->IsEditDoc() ) { const EditTextObject& rText= pOutlinerParaObject->GetTextObject(); - bNotMasterCachable=rText.HasField(SvxPageField::StaticClassId()); - if( !bNotMasterCachable ) - { - bNotMasterCachable=rText.HasField(SvxHeaderField::StaticClassId()); - if( !bNotMasterCachable ) - { - bNotMasterCachable=rText.HasField(SvxFooterField::StaticClassId()); - if( !bNotMasterCachable ) - { - bNotMasterCachable=rText.HasField(SvxDateTimeField::StaticClassId()); - } - } - } + bNotMasterCachable = rText.HasField(SvxPageField::CLASS_ID) + || rText.HasField(SvxHeaderField::CLASS_ID) + || rText.HasField(SvxFooterField::CLASS_ID) + || rText.HasField(SvxDateTimeField::CLASS_ID); } } |