diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2018-07-14 16:46:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-16 08:39:11 +0200 |
commit | 99876774fbcd5409ca6a6a15c44ecd39a117236f (patch) | |
tree | cfec7927d18397bd9f3ff2dd8c87fafa57eb0ee2 /include/editeng | |
parent | 9df9e5b0a92caeda305c53214632a3ba42f02b2d (diff) |
SvPersistBase no longer necessary
Change-Id: I928c0898d77d30bd6ca755d07acac6f78b20563b
Reviewed-on: https://gerrit.libreoffice.org/57436
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/CustomPropertyField.hxx | 2 | ||||
-rw-r--r-- | include/editeng/flditem.hxx | 45 | ||||
-rw-r--r-- | include/editeng/measfld.hxx | 2 |
3 files changed, 31 insertions, 18 deletions
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; |