LibreOffice Module sw (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
SwMacroField Class Referencefinal

#include <docufld.hxx>

Inheritance diagram for SwMacroField:
[legend]
Collaboration diagram for SwMacroField:
[legend]

Public Member Functions

 SwMacroField (SwMacroFieldType *, OUString aLibAndName, OUString aText)
 Direct input, delete old value. More...
 
const OUString & GetMacro () const
 
OUString GetLibName () const
 
OUString GetMacroName () const
 
SvxMacro GetSvxMacro () const
 
virtual OUString GetFieldName () const override
 get name or content More...
 
virtual OUString GetPar1 () const override
 Library and FileName. More...
 
virtual void SetPar1 (const OUString &rStr) override
 LibName and MacroName. More...
 
virtual OUString GetPar2 () const override
 Macrotext. More...
 
virtual void SetPar2 (const OUString &rStr) override
 set macro text More...
 
virtual bool QueryValue (css::uno::Any &rVal, sal_uInt16 nWhich) const override
 
virtual bool PutValue (const css::uno::Any &rVal, sal_uInt16 nWhich) override
 
- Public Member Functions inherited from SwField
virtual ~SwField ()
 
 SwField (SwField const &)=default
 
 SwField (SwField &&)=default
 
SwFieldoperator= (SwField const &)=default
 
SwFieldoperator= (SwField &&)=default
 
SwFieldTypeGetTyp () const
 
virtual SwFieldTypeChgTyp (SwFieldType *)
 Set new type (used for copying among documents). More...
 
OUString ExpandField (bool bCached, SwRootFrame const *pLayout) const
 expand the field. More...
 
virtual OUString GetFieldName () const
 get name or content More...
 
std::unique_ptr< SwFieldCopyField () const
 
SwFieldIds Which () const
 ResId. More...
 
SwFieldTypesEnum GetTypeId () const
 
virtual sal_uInt16 GetSubType () const
 
virtual void SetSubType (sal_uInt16)
 
LanguageType GetLanguage () const
 Language at field position. More...
 
virtual void SetLanguage (LanguageType nLng)
 
sal_uInt32 GetFormat () const
 Query parameters for dialog and for BASIC. More...
 
virtual OUString GetPar1 () const
 
virtual OUString GetPar2 () const
 
virtual OUString GetFormula () const
 
void ChangeFormat (sal_uInt32 n)
 
virtual void SetPar1 (const OUString &rStr)
 
virtual void SetPar2 (const OUString &rStr)
 
virtual bool QueryValue (css::uno::Any &rVal, sal_uInt16 nWhichId) const
 
virtual bool PutValue (const css::uno::Any &rVal, sal_uInt16 nWhichId)
 
bool HasClickHdl () const
 Does the field possess an action on its ClickHandler? (e.g. INetFields, ...). More...
 
bool IsFixed () const
 
bool IsAutomaticLanguage () const
 
void SetAutomaticLanguage (bool const bSet)
 
virtual OUString GetDescription () const
 
bool IsClickable () const
 Is this field clickable? More...
 
virtual void dumpAsXml (xmlTextWriterPtr pWriter) const
 
const OUString & GetTitle () const
 
void SetTitle (const OUString &rTitle)
 

Static Public Member Functions

static void CreateMacroString (OUString &rMacro, std::u16string_view rMacroName, const OUString &rLibraryName)
 create an internally used macro name from the library and macro name parts More...
 
static bool isScriptURL (const OUString &str)
 

Private Member Functions

virtual OUString ExpandImpl (SwRootFrame const *pLayout) const override
 
virtual std::unique_ptr< SwFieldCopy () const override
 

Private Attributes

OUString m_aMacro
 
OUString m_aText
 
bool m_bIsScriptURL
 

Additional Inherited Members

- Protected Member Functions inherited from SwField
void SetFormat (sal_uInt32 const nSet)
 
 SwField (SwFieldType *pTyp, sal_uInt32 nFormat=0, LanguageType nLang=LANGUAGE_SYSTEM, bool m_bUseFieldValueCache=true)
 

Detailed Description

Definition at line 395 of file docufld.hxx.

Constructor & Destructor Documentation

◆ SwMacroField()

SwMacroField::SwMacroField ( SwMacroFieldType pInitType,
OUString  aLibAndName,
OUString  aText 
)

Direct input, delete old value.

Definition at line 42 of file macrofld.cxx.

References isScriptURL(), m_aMacro, and m_bIsScriptURL.

Member Function Documentation

◆ Copy()

std::unique_ptr< SwField > SwMacroField::Copy ( ) const
overrideprivatevirtual

Implements SwField.

Definition at line 54 of file macrofld.cxx.

References SwField::GetTyp(), m_aMacro, and m_aText.

◆ CreateMacroString()

void SwMacroField::CreateMacroString ( OUString &  rMacro,
std::u16string_view  rMacroName,
const OUString &  rLibraryName 
)
static

create an internally used macro name from the library and macro name parts

Definition at line 196 of file macrofld.cxx.

Referenced by SwXTextField::attach(), and PutValue().

◆ ExpandImpl()

OUString SwMacroField::ExpandImpl ( SwRootFrame const *  pLayout) const
overrideprivatevirtual

Implements SwField.

Definition at line 49 of file macrofld.cxx.

References m_aText.

◆ GetFieldName()

OUString SwMacroField::GetFieldName ( ) const
overridevirtual

get name or content

Returns
name or content.

Reimplemented from SwField.

Definition at line 59 of file macrofld.cxx.

References SwFieldType::GetName(), SwField::GetTyp(), and m_aMacro.

◆ GetLibName()

OUString SwMacroField::GetLibName ( ) const

Definition at line 64 of file macrofld.cxx.

References i, m_aMacro, m_bIsScriptURL, and nPos.

Referenced by GetSvxMacro(), PutValue(), and QueryValue().

◆ GetMacro()

const OUString & SwMacroField::GetMacro ( ) const
inline

Definition at line 409 of file docufld.hxx.

◆ GetMacroName()

OUString SwMacroField::GetMacroName ( ) const

Definition at line 86 of file macrofld.cxx.

References i, m_aMacro, m_bIsScriptURL, and nPos.

Referenced by GetSvxMacro(), PutValue(), and QueryValue().

◆ GetPar1()

OUString SwMacroField::GetPar1 ( ) const
overridevirtual

Library and FileName.

Get macro.

Reimplemented from SwField.

Definition at line 129 of file macrofld.cxx.

References m_aMacro.

◆ GetPar2()

OUString SwMacroField::GetPar2 ( ) const
overridevirtual

Macrotext.

get macro text

Reimplemented from SwField.

Definition at line 141 of file macrofld.cxx.

References m_aText.

◆ GetSvxMacro()

SvxMacro SwMacroField::GetSvxMacro ( ) const

◆ isScriptURL()

bool SwMacroField::isScriptURL ( const OUString &  str)
static

Definition at line 208 of file macrofld.cxx.

References xFactory.

Referenced by PutValue(), SetPar1(), and SwMacroField().

◆ PutValue()

bool SwMacroField::PutValue ( const css::uno::Any &  rVal,
sal_uInt16  nWhich 
)
overridevirtual

◆ QueryValue()

bool SwMacroField::QueryValue ( css::uno::Any &  rVal,
sal_uInt16  nWhich 
) const
overridevirtual

◆ SetPar1()

void SwMacroField::SetPar1 ( const OUString &  rStr)
overridevirtual

LibName and MacroName.

Reimplemented from SwField.

Definition at line 122 of file macrofld.cxx.

References isScriptURL(), m_aMacro, and m_bIsScriptURL.

◆ SetPar2()

void SwMacroField::SetPar2 ( const OUString &  rStr)
overridevirtual

set macro text

Reimplemented from SwField.

Definition at line 135 of file macrofld.cxx.

References m_aText.

Member Data Documentation

◆ m_aMacro

OUString SwMacroField::m_aMacro
private

◆ m_aText

OUString SwMacroField::m_aText
private

Definition at line 398 of file docufld.hxx.

Referenced by Copy(), ExpandImpl(), GetPar2(), PutValue(), QueryValue(), and SetPar2().

◆ m_bIsScriptURL

bool SwMacroField::m_bIsScriptURL
private

The documentation for this class was generated from the following files: