LibreOffice Module wizards (master) 1
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
scriptforge.SFScriptForge.SF_Basic Class Reference
Inheritance diagram for scriptforge.SFScriptForge.SF_Basic:
[legend]
Collaboration diagram for scriptforge.SFScriptForge.SF_Basic:
[legend]

Classes

class  GlobalScope
 

Public Member Functions

def CDate (cls, datevalue)
 
def ConvertFromUrl (cls, url)
 
def ConvertToUrl (cls, systempath)
 
def CreateUnoService (cls, servicename)
 
def CreateUnoStruct (cls, unostructure)
 
def DateAdd (cls, interval, number, date)
 
def DateDiff (cls, interval, date1, date2, firstdayofweek=1, firstweekofyear=1)
 
def DatePart (cls, interval, date, firstdayofweek=1, firstweekofyear=1)
 
def DateValue (cls, string)
 
def Format (cls, expression, format='')
 
def GetDefaultContext (cls)
 
def GetGuiType (cls)
 
def GetPathSeparator (cls)
 
def GetSystemTicks (cls)
 
def InputBox (cls, prompt, title='', default='', xpostwips=-1, ypostwips=-1)
 
def MsgBox (cls, prompt, buttons=0, title='')
 
def Now (cls)
 
def RGB (cls, red, green, blue)
 
def StarDesktop (self)
 
def ThisComponent (self)
 
def ThisDatabaseDocument (self)
 
def Xray (cls, unoobject=None)
 
- Public Member Functions inherited from scriptforge.SFServices
def __init__ (self, reference=-1, objtype=None, classmodule=0, name='')
 
def __getattr__ (self, name)
 
def __setattr__ (self, name, value)
 
def __repr__ (self)
 
def Dispose (self)
 
def ExecMethod (self, flags=0, methodname='', *args)
 
def GetProperty (self, propertyname, arg=None)
 
def Properties (self)
 
def basicmethods (self)
 
def basicproperties (self)
 
def SetProperty (self, propertyname, value)
 
- Public Member Functions inherited from scriptforge._Singleton
def __call__ (cls, *args, **kwargs)
 

Static Public Member Functions

def CDateFromUnoDateTime (unodate)
 
def CDateToUnoDateTime (date)
 

Static Public Attributes

string serviceimplementation = 'python'
 
string servicename = 'ScriptForge.Basic'
 
tuple servicesynonyms = ('basic', 'scriptforge.basic')
 
string module = 'SF_PythonHelper'
 
 MB_ABORTRETRYIGNORE
 
 MB_DEFBUTTON1
 
 MB_DEFBUTTON2
 
 MB_DEFBUTTON3
 
 MB_ICONEXCLAMATION
 
 MB_ICONINFORMATION
 
 MB_ICONQUESTION
 
 MB_ICONSTOP
 
 MB_OK
 
 MB_OKCANCEL
 
 MB_RETRYCANCEL
 
 MB_YESNO
 
 MB_YESNOCANCEL
 
 IDABORT
 
 IDCANCEL
 
 IDIGNORE
 
 IDNO
 
 IDOK
 
 IDRETRY
 
 IDYES
 
 starDesktop
 
 stardesktop
 
 thisComponent
 
 thiscomponent
 
 thisDatabaseDocument
 
 thisdatabasedocument
 
- Static Public Attributes inherited from scriptforge.SFServices
 vbGet
 
 vbLet
 
 vbMethod
 
 vbSet
 
int flgPost = 32
 
int flgDateArg = 64
 
int flgDateRet = 128
 
int flgArrayArg = 512
 
int flgArrayRet = 1024
 
int flgUno = 256
 
int flgObject = 2048
 
int flgHardCode = 4096
 
 moduleClass
 
 moduleStandard
 
bool forceGetProperty = False
 
dictionary propertysynonyms = {}
 
tuple internal_attributes
 
 SIMPLEEXEC = ScriptForge.InvokeSimpleScript
 
 EXEC = ScriptForge.InvokeBasicService
 
- Static Public Attributes inherited from scriptforge._Singleton
dictionary instances = {}
 

Additional Inherited Members

- Public Attributes inherited from scriptforge.SFServices
 objectreference
 
 objecttype
 
 classmodule
 
 name
 
 internal
 
 localProperties
 
 serviceimplementation
 

Detailed Description

    This service proposes a collection of Basic methods to be executed in a Python context
    simulating the exact syntax and behaviour of the identical Basic builtin method.
    Typical example:
        SF_Basic.MsgBox('This has to be displayed in a message box')

    The signatures of Basic builtin functions are derived from
        core/basic/source/runtime/stdobj.cxx

    Detailed user documentation:
        https://help.libreoffice.org/latest/en-US/text/sbasic/shared/03/sf_basic.html?DbPAR=BASIC

Definition at line 634 of file scriptforge.py.

Member Function Documentation

◆ CDate()

def scriptforge.SFScriptForge.SF_Basic.CDate (   cls,
  datevalue 
)

◆ CDateFromUnoDateTime()

def scriptforge.SFScriptForge.SF_Basic.CDateFromUnoDateTime (   unodate)
static
    Converts a UNO date/time representation to a datetime.datetime Python native object
    :param unodate: com.sun.star.util.DateTime, com.sun.star.util.Date or com.sun.star.util.Time
    :return: the equivalent datetime.datetime

Definition at line 665 of file scriptforge.py.

Referenced by scriptforge.SFScriptForge.SF_Basic.CDate(), scriptforge.SFScriptForge.SF_Basic.DateAdd(), and scriptforge.SFScriptForge.SF_Basic.DateValue().

◆ CDateToUnoDateTime()

def scriptforge.SFScriptForge.SF_Basic.CDateToUnoDateTime (   date)
static
    Converts a date representation into the ccom.sun.star.util.DateTime date format
    Acceptable boundaries: year >= 1900 and <= 32767
    :param date: datetime.datetime, datetime.date, datetime.time, float (time.time) or time.struct_time
    :return: a com.sun.star.util.DateTime

Definition at line 688 of file scriptforge.py.

References uno.createUnoStruct().

Referenced by scriptforge.SFScriptForge.SF_Basic.DateAdd(), scriptforge.SFScriptForge.SF_Basic.DateDiff(), scriptforge.SFScriptForge.SF_Basic.DatePart(), and scriptforge.SFScriptForge.SF_Basic.Format().

◆ ConvertFromUrl()

def scriptforge.SFScriptForge.SF_Basic.ConvertFromUrl (   cls,
  url 
)

◆ ConvertToUrl()

def scriptforge.SFScriptForge.SF_Basic.ConvertToUrl (   cls,
  systempath 
)

◆ CreateUnoService()

def scriptforge.SFScriptForge.SF_Basic.CreateUnoService (   cls,
  servicename 
)

◆ CreateUnoStruct()

def scriptforge.SFScriptForge.SF_Basic.CreateUnoStruct (   cls,
  unostructure 
)

Definition at line 732 of file scriptforge.py.

References uno.createUnoStruct().

◆ DateAdd()

def scriptforge.SFScriptForge.SF_Basic.DateAdd (   cls,
  interval,
  number,
  date 
)

◆ DateDiff()

def scriptforge.SFScriptForge.SF_Basic.DateDiff (   cls,
  interval,
  date1,
  date2,
  firstdayofweek = 1,
  firstweekofyear = 1 
)

◆ DatePart()

def scriptforge.SFScriptForge.SF_Basic.DatePart (   cls,
  interval,
  date,
  firstdayofweek = 1,
  firstweekofyear = 1 
)

◆ DateValue()

def scriptforge.SFScriptForge.SF_Basic.DateValue (   cls,
  string 
)

◆ Format()

def scriptforge.SFScriptForge.SF_Basic.Format (   cls,
  expression,
  format = '' 
)

◆ GetDefaultContext()

def scriptforge.SFScriptForge.SF_Basic.GetDefaultContext (   cls)

Definition at line 770 of file scriptforge.py.

◆ GetGuiType()

def scriptforge.SFScriptForge.SF_Basic.GetGuiType (   cls)

◆ GetPathSeparator()

def scriptforge.SFScriptForge.SF_Basic.GetPathSeparator (   cls)

Definition at line 778 of file scriptforge.py.

◆ GetSystemTicks()

def scriptforge.SFScriptForge.SF_Basic.GetSystemTicks (   cls)

◆ InputBox()

def scriptforge.SFScriptForge.SF_Basic.InputBox (   cls,
  prompt,
  title = '',
  default = '',
  xpostwips = -1,
  ypostwips = -1 
)

◆ MsgBox()

def scriptforge.SFScriptForge.SF_Basic.MsgBox (   cls,
  prompt,
  buttons = 0,
  title = '' 
)

◆ Now()

def scriptforge.SFScriptForge.SF_Basic.Now (   cls)

Definition at line 805 of file scriptforge.py.

◆ RGB()

def scriptforge.SFScriptForge.SF_Basic.RGB (   cls,
  red,
  green,
  blue 
)

Definition at line 809 of file scriptforge.py.

◆ StarDesktop()

def scriptforge.SFScriptForge.SF_Basic.StarDesktop (   self)

Definition at line 813 of file scriptforge.py.

Referenced by scriptforge.SFScriptForge.SF_Basic.ThisComponent().

◆ ThisComponent()

def scriptforge.SFScriptForge.SF_Basic.ThisComponent (   self)
    When the current component is the Basic IDE, the ThisComponent object returns
    in Basic the component owning the currently run user script.
    Above behaviour cannot be reproduced in Python.
    :return: the current component or None when not a document

Definition at line 825 of file scriptforge.py.

References scriptforge.SFScriptForge.SF_Basic.StarDesktop().

Referenced by scriptforge.SFScriptForge.SF_Basic.ThisDatabaseDocument().

◆ ThisDatabaseDocument()

def scriptforge.SFScriptForge.SF_Basic.ThisDatabaseDocument (   self)
    When the current component is the Basic IDE, the ThisDatabaseDocument object returns
    in Basic the database owning the currently run user script.
    Above behaviour cannot be reproduced in Python.
    :return: the current Base (main) component or None when not a Base document or one of its subcomponents

Definition at line 843 of file scriptforge.py.

References scriptforge.CreateScriptService(), and scriptforge.SFScriptForge.SF_Basic.ThisComponent().

◆ Xray()

def scriptforge.SFScriptForge.SF_Basic.Xray (   cls,
  unoobject = None 
)

Definition at line 879 of file scriptforge.py.

References scriptforge.SFServices.SIMPLEEXEC.

Member Data Documentation

◆ IDABORT

scriptforge.SFScriptForge.SF_Basic.IDABORT
static

Definition at line 657 of file scriptforge.py.

◆ IDCANCEL

scriptforge.SFScriptForge.SF_Basic.IDCANCEL
static

Definition at line 657 of file scriptforge.py.

◆ IDIGNORE

scriptforge.SFScriptForge.SF_Basic.IDIGNORE
static

Definition at line 657 of file scriptforge.py.

◆ IDNO

scriptforge.SFScriptForge.SF_Basic.IDNO
static

Definition at line 657 of file scriptforge.py.

◆ IDOK

scriptforge.SFScriptForge.SF_Basic.IDOK
static

Definition at line 657 of file scriptforge.py.

◆ IDRETRY

scriptforge.SFScriptForge.SF_Basic.IDRETRY
static

Definition at line 657 of file scriptforge.py.

◆ IDYES

scriptforge.SFScriptForge.SF_Basic.IDYES
static

Definition at line 657 of file scriptforge.py.

◆ MB_ABORTRETRYIGNORE

scriptforge.SFScriptForge.SF_Basic.MB_ABORTRETRYIGNORE
static

Definition at line 654 of file scriptforge.py.

◆ MB_DEFBUTTON1

scriptforge.SFScriptForge.SF_Basic.MB_DEFBUTTON1
static

Definition at line 654 of file scriptforge.py.

◆ MB_DEFBUTTON2

scriptforge.SFScriptForge.SF_Basic.MB_DEFBUTTON2
static

Definition at line 654 of file scriptforge.py.

◆ MB_DEFBUTTON3

scriptforge.SFScriptForge.SF_Basic.MB_DEFBUTTON3
static

Definition at line 654 of file scriptforge.py.

◆ MB_ICONEXCLAMATION

scriptforge.SFScriptForge.SF_Basic.MB_ICONEXCLAMATION
static

Definition at line 655 of file scriptforge.py.

◆ MB_ICONINFORMATION

scriptforge.SFScriptForge.SF_Basic.MB_ICONINFORMATION
static

Definition at line 655 of file scriptforge.py.

◆ MB_ICONQUESTION

scriptforge.SFScriptForge.SF_Basic.MB_ICONQUESTION
static

Definition at line 655 of file scriptforge.py.

◆ MB_ICONSTOP

scriptforge.SFScriptForge.SF_Basic.MB_ICONSTOP
static

Definition at line 655 of file scriptforge.py.

◆ MB_OK

scriptforge.SFScriptForge.SF_Basic.MB_OK
static

Definition at line 656 of file scriptforge.py.

◆ MB_OKCANCEL

scriptforge.SFScriptForge.SF_Basic.MB_OKCANCEL
static

Definition at line 656 of file scriptforge.py.

◆ MB_RETRYCANCEL

scriptforge.SFScriptForge.SF_Basic.MB_RETRYCANCEL
static

Definition at line 656 of file scriptforge.py.

◆ MB_YESNO

scriptforge.SFScriptForge.SF_Basic.MB_YESNO
static

Definition at line 656 of file scriptforge.py.

◆ MB_YESNOCANCEL

scriptforge.SFScriptForge.SF_Basic.MB_YESNOCANCEL
static

Definition at line 656 of file scriptforge.py.

◆ module

string scriptforge.SFScriptForge.SF_Basic.module = 'SF_PythonHelper'
static

◆ serviceimplementation

string scriptforge.SFScriptForge.SF_Basic.serviceimplementation = 'python'
static

◆ servicename

string scriptforge.SFScriptForge.SF_Basic.servicename = 'ScriptForge.Basic'
static

◆ servicesynonyms

tuple scriptforge.SFScriptForge.SF_Basic.servicesynonyms = ('basic', 'scriptforge.basic')
static

Definition at line 650 of file scriptforge.py.

◆ starDesktop

scriptforge.SFScriptForge.SF_Basic.starDesktop
static

Definition at line 822 of file scriptforge.py.

◆ stardesktop

scriptforge.SFScriptForge.SF_Basic.stardesktop
static

Definition at line 822 of file scriptforge.py.

◆ thisComponent

scriptforge.SFScriptForge.SF_Basic.thisComponent
static

Definition at line 840 of file scriptforge.py.

◆ thiscomponent

scriptforge.SFScriptForge.SF_Basic.thiscomponent
static

Definition at line 840 of file scriptforge.py.

◆ thisDatabaseDocument

scriptforge.SFScriptForge.SF_Basic.thisDatabaseDocument
static

Definition at line 876 of file scriptforge.py.

◆ thisdatabasedocument

scriptforge.SFScriptForge.SF_Basic.thisdatabasedocument
static

Definition at line 876 of file scriptforge.py.


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