/* -*- 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_EDITENG_FLDITEM_HXX #define INCLUDED_EDITENG_FLDITEM_HXX
/** * This item stores a field (SvxFieldData). The field is controlled by or * belongs to the item. The field itself is determined by a derivation from * SvxFieldData (RTTI)
*/ class EDITENG_DLLPUBLIC SvxFieldItem final : public SfxPoolItem
{
std::unique_ptr<SvxFieldData> mpField; public:
DECLARE_ITEM_TYPE_FUNCTION(SvxFieldItem)
SvxFieldItem( std::unique_ptr<SvxFieldData> pField, const sal_uInt16 nId );
SvxFieldItem( const SvxFieldData& rField, const sal_uInt16 nId );
SvxFieldItem( const SvxFieldItem& rItem ); virtual ~SvxFieldItem() override;
// The following are the derivatives of SvxFieldData ...
enumclass SvxDateType { Fix, Var }; enumclass SvxDateFormat {
AppDefault = 0, // Set as in App
System, // Set as in System
StdSmall,
StdBig,
A, // 13.02.96
B, // 13.02.1996
C, // 13.Feb 1996
D, // 13.February 1996
E, // Tue, 13.February 1996
F // Tuesday, 13.February 1996
};
class EDITENG_DLLPUBLIC SvxDateField final : public SvxFieldData
{
sal_Int32 nFixDate;
SvxDateType eType;
SvxDateFormat eFormat;
// If eLanguage==LANGUAGE_DONTKNOW the language/country // used in number formatter initialization is taken.
OUString GetFormatted( SvNumberFormatter& rFormatter, LanguageType eLanguage ) const; static OUString GetFormatted( Date const & rDate, SvxDateFormat eFormat, SvNumberFormatter& rFormatter, LanguageType eLanguage );
enumclass SvxURLFormat {
AppDefault = 0, // App setting
Url, // Show URL
Repr // Show representation
};
class EDITENG_DLLPUBLIC SvxURLField final : public SvxFieldData
{ private:
SvxURLFormat eFormat;
OUString aURL; // URL-Address
OUString aRepresentation; // Text shown in document
OUString aTargetFrame; // Frame to open in
OUString m_Name; // Alt-text
enumclass SvxFileType {
Fix,
Var
}; enumclass SvxFileFormat {
NameAndExt = 0, // File name with Extension
PathFull, // full path
PathOnly, // only path
NameOnly // only file name
};
class EDITENG_DLLPUBLIC SvxExtFileField final : public SvxFieldData
{ private:
OUString aFile;
SvxFileType eType;
SvxFileFormat eFormat;
enumclass SvxAuthorType {
Fix, Var
}; enumclass SvxAuthorFormat {
FullName, // full name
LastName, // Only Last name
FirstName, // Only first name
ShortName // Initials
};
class EDITENG_DLLPUBLIC SvxAuthorField final : public SvxFieldData
{ private:
OUString aName;
OUString aFirstName;
OUString aShortName;
SvxAuthorType eType;
SvxAuthorFormat eFormat;
/** this field is used as a placeholder for a header&footer in impress. The actual
value is stored at the page */ class EDITENG_DLLPUBLIC SvxHeaderField final: public SvxFieldData
{ public: static constexpr auto CLASS_ID = css::text::textfield::Type::PRESENTATION_HEADER; virtual sal_Int32 GetClassId() const override { return CLASS_ID; }
SvxHeaderField();
/** this field is used as a placeholder for a header&footer in impress. The actual
value is stored at the page */ class EDITENG_DLLPUBLIC SvxFooterField final: public SvxFieldData
{ public: 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; virtualbooloperator==( const SvxFieldData& ) const override;
};
/** this field is used as a placeholder for a header&footer in impress. The actual
value is stored at the page */ class EDITENG_DLLPUBLIC SvxDateTimeField final: public SvxFieldData
{ public: static constexpr auto CLASS_ID = css::text::textfield::Type::PRESENTATION_DATE_TIME; virtual sal_Int32 GetClassId() const override { return CLASS_ID; }
SvxDateTimeField();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.