Doc for Calc
This commit is contained in:
parent
8b20921c1c
commit
969294c2af
|
@ -257,7 +257,7 @@ Reset all editions.
|
||||||
|
|
||||||
|
|
||||||
For applications
|
For applications
|
||||||
----------------
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Get shortcuts for application. For Calc.
|
Get shortcuts for application. For Calc.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
Calc
|
||||||
|
====
|
||||||
|
|
||||||
|
Remember, always import library.
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
import easymacro as app
|
||||||
|
|
||||||
|
|
||||||
|
Active document
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
doc = app.active
|
||||||
|
app.debug(doc.type)
|
||||||
|
|
||||||
|
|
||||||
|
.. _support filters: https://help.libreoffice.org/latest/en-US/text/shared/guide/convertfilters.html
|
|
@ -28,6 +28,7 @@ You can used **easymacro** with any extension or directly in your macros.
|
||||||
email
|
email
|
||||||
application
|
application
|
||||||
documents
|
documents
|
||||||
|
calc
|
||||||
|
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
|
|
|
@ -2947,10 +2947,44 @@ class LODocMain():
|
||||||
|
|
||||||
|
|
||||||
class LODocCalc(LODocument):
|
class LODocCalc(LODocument):
|
||||||
|
"""Classe for Calc module"""
|
||||||
_type = 'calc'
|
_type = 'calc'
|
||||||
|
|
||||||
def __init__(self, obj):
|
def __init__(self, obj):
|
||||||
super().__init__(obj)
|
super().__init__(obj)
|
||||||
|
self._sheets = obj.Sheets
|
||||||
|
|
||||||
|
def __getitem__(self, index):
|
||||||
|
return LOCalcSheet(self._sheets[index])
|
||||||
|
|
||||||
|
def __len__(self):
|
||||||
|
return self._sheets.Count
|
||||||
|
|
||||||
|
def __contains__(self, item):
|
||||||
|
return item in self._sheets
|
||||||
|
|
||||||
|
@property
|
||||||
|
def headers(self):
|
||||||
|
return self._cc.ColumnRowHeaders
|
||||||
|
@headers.setter
|
||||||
|
def headers(self, value):
|
||||||
|
self._cc.ColumnRowHeaders = value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def tabs(self):
|
||||||
|
return self._cc.SheetTabs
|
||||||
|
@tabs.setter
|
||||||
|
def tabs(self, value):
|
||||||
|
self._cc.SheetTabs = value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def names(self):
|
||||||
|
names = self.obj.Sheets.ElementNames
|
||||||
|
return names
|
||||||
|
|
||||||
|
@property
|
||||||
|
def active(self):
|
||||||
|
return LOCalcSheet(self._cc.ActiveSheet)
|
||||||
|
|
||||||
|
|
||||||
class LOCalcSheet(object):
|
class LOCalcSheet(object):
|
||||||
|
@ -2970,6 +3004,35 @@ class LOCalcSheet(object):
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f'easymacro.LOCalcSheet: {self.name}'
|
return f'easymacro.LOCalcSheet: {self.name}'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def obj(self):
|
||||||
|
return self._obj
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self):
|
||||||
|
return self._obj.Name
|
||||||
|
@name.setter
|
||||||
|
def name(self, value):
|
||||||
|
self._obj.Name = value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def code_name(self):
|
||||||
|
return self._obj.CodeName
|
||||||
|
@code_name.setter
|
||||||
|
def code_name(self, value):
|
||||||
|
self._obj.CodeName = value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def visible(self):
|
||||||
|
return self._obj.IsVisible
|
||||||
|
@visible.setter
|
||||||
|
def visible(self, value):
|
||||||
|
self._obj.IsVisible = value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_protected(self):
|
||||||
|
return self._obj.isProtected()
|
||||||
|
|
||||||
|
|
||||||
class LOCalcRange(object):
|
class LOCalcRange(object):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue