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 *, const OUString &rLibAndName, const OUString &rText)
 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...
 
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 GetFormula () const
 
void ChangeFormat (sal_uInt32 n)
 
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
 

Static Public Member Functions

static void CreateMacroString (OUString &rMacro, const OUString &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 388 of file docufld.hxx.

Constructor & Destructor Documentation

SwMacroField::SwMacroField ( SwMacroFieldType pInitType,
const OUString &  rLibAndName,
const OUString &  rText 
)

Direct input, delete old value.

Definition at line 42 of file macrofld.cxx.

References isScriptURL(), m_aMacro, and m_bIsScriptURL.

Member Function Documentation

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.

void SwMacroField::CreateMacroString ( OUString &  rMacro,
const OUString &  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().

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

Implements SwField.

Definition at line 49 of file macrofld.cxx.

References m_aText.

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.

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().

const OUString& SwMacroField::GetMacro ( ) const
inline

Definition at line 402 of file docufld.hxx.

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().

OUString SwMacroField::GetPar1 ( ) const
overridevirtual

Library and FileName.

Get macro.

Reimplemented from SwField.

Definition at line 129 of file macrofld.cxx.

References m_aMacro.

OUString SwMacroField::GetPar2 ( ) const
overridevirtual

Macrotext.

get macro text

Reimplemented from SwField.

Definition at line 141 of file macrofld.cxx.

References m_aText.

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

Definition at line 208 of file macrofld.cxx.

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

bool SwMacroField::PutValue ( const css::uno::Any &  rVal,
sal_uInt16  nWhich 
)
overridevirtual
bool SwMacroField::QueryValue ( css::uno::Any &  rVal,
sal_uInt16  nWhich 
) const
overridevirtual
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.

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

OUString SwMacroField::m_aMacro
private
OUString SwMacroField::m_aText
private

Definition at line 391 of file docufld.hxx.

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

bool SwMacroField::m_bIsScriptURL
private

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