diff options
author | Jennifer Liebel <jliebel94@gmail.com> | 2014-09-23 09:14:21 +0000 |
---|---|---|
committer | Samuel Mehrbrodt <s.mehrbrodt@gmail.com> | 2014-09-24 19:30:05 +0000 |
commit | e16c8534f446a7cc311d6d5026aae5457e4f8e6c (patch) | |
tree | 1f88836de838d56db0898d60bc732a751a19011e /editeng | |
parent | 16ea2665cdfa0b3d7b0d7abcdaae8d60f7654d24 (diff) |
fdo#47302: Added insert->fields->page title button
Change-Id: Iebc8298a7e6a7d423d2667eec8a46a936cc4d2cd
Reviewed-on: https://gerrit.libreoffice.org/11599
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/flditem.cxx | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index 69a1b2ce0ccf..73074e8e0c60 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -117,6 +117,8 @@ SvxFieldData* SvxFieldData::Create(const uno::Reference<text::XTextContent>& xTe return new SvxPageField(); case text::textfield::Type::PAGES: return new SvxPagesField(); + case text::textfield::Type::PAGE_TITLE: + return new SvxPageTitleField(); case text::textfield::Type::DOCINFO_TITLE: return new SvxFileField(); case text::textfield::Type::TABLE: @@ -607,7 +609,40 @@ MetaAction* SvxURLField::createBeginComment() const 2*aURL.getLength() ); } +// +// SvxPageTitleField methods +// +SV_IMPL_PERSIST1( SvxPageTitleField, SvxFieldData ); + +SvxPageTitleField::SvxPageTitleField() {} + +SvxFieldData* SvxPageTitleField::Clone() const +{ + return new SvxPageTitleField(); +} + +bool SvxPageTitleField::operator==( const SvxFieldData& rCmp ) const +{ + return ( rCmp.Type() == TYPE(SvxPageTitleField) ); +} + +void SvxPageTitleField::Load( SvPersistStream & /*rStm*/ ) +{ +} + +void SvxPageTitleField::Save( SvPersistStream & /*rStm*/ ) +{ +} + +MetaAction* SvxPageTitleField::createBeginComment() const +{ + return new MetaCommentAction( "FIELD_SEQ_BEGIN;PageTitleField" ); +} + +// +// SvxPagesField +// // The fields that were removed from Calc: @@ -1152,6 +1187,7 @@ SvClassManager& SvxFieldItem::GetClassManager() pClassMgr->Register(SvxURLField::StaticClassId(), SvxURLField::CreateInstance); pClassMgr->Register(SvxDateField::StaticClassId(), SvxDateField::CreateInstance); pClassMgr->Register(SvxPageField::StaticClassId(), SvxPageField::CreateInstance); + pClassMgr->Register(SvxPageTitleField::StaticClassId(), SvxPageTitleField::CreateInstance); pClassMgr->Register(SvxTimeField::StaticClassId(), SvxTimeField::CreateInstance); pClassMgr->Register(SvxExtTimeField::StaticClassId(), SvxExtTimeField::CreateInstance); pClassMgr->Register(SvxExtFileField::StaticClassId(), SvxExtFileField::CreateInstance); |