summaryrefslogtreecommitdiff
path: root/wizards/source/sfdocuments/SF_Writer.xba
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2022-03-07 13:26:36 +0100
committerJean-Pierre Ledure <jp@ledure.be>2022-03-07 16:13:46 +0100
commit2598c35dbac8dc4492ad1fc79925c5347e683af0 (patch)
tree4b308308864d9aef030f51b7ca87381f70b389c1 /wizards/source/sfdocuments/SF_Writer.xba
parenta7e5c48b3d6d98ea35916cae9bd85a87f8ddf8e9 (diff)
ScriptForge - (SF_Document) new Import/ExportFilters properties
The ImportFilters and ExportFilters properties of the Document, Calc and Writer services return a zero-based array (Basic) or a list (Python) of all filters available for the current document instance. These properties are NOT applicable to Base documents. ImportFilter contains the filters flagged for import or for Import/Export. Idem for ExportFilters. Both lists overlap each other partially. The filter selection is done thanks to the - filter type, to be compared with the Identifier of the document's component - filter flags, last 2 bits determine the import or export orientation The filter names are potential arguments of the OpenDocument() and SaveAs() methods (and alike). Both properties are callable from Basic and Python user scripts. Change-Id: I8ce5312a58a013bc7e1e68101ff9f50f3233155d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131106 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards/source/sfdocuments/SF_Writer.xba')
-rw-r--r--wizards/source/sfdocuments/SF_Writer.xba12
1 files changed, 12 insertions, 0 deletions
diff --git a/wizards/source/sfdocuments/SF_Writer.xba b/wizards/source/sfdocuments/SF_Writer.xba
index 12d3136df65f..eded35de9a96 100644
--- a/wizards/source/sfdocuments/SF_Writer.xba
+++ b/wizards/source/sfdocuments/SF_Writer.xba
@@ -307,6 +307,8 @@ Public Function Properties() As Variant
, &quot;Description&quot; _
, &quot;DocumentProperties&quot; _
, &quot;DocumentType&quot; _
+ , &quot;ExportFilters&quot; _
+ , &quot;ImportFilters&quot; _
, &quot;IsBase&quot; _
, &quot;IsCalc&quot; _
, &quot;IsDraw&quot; _
@@ -403,6 +405,16 @@ Property Get DocumentType() As String
End Property &apos; SFDocuments.SF_Writer.DocumentType
REM -----------------------------------------------------------------------------
+Property Get ExportFilters() As Variant
+ ExportFilters = [_Super].GetProperty(&quot;ExportFilters&quot;)
+End Property &apos; SFDocuments.SF_Writer.ExportFilters
+
+REM -----------------------------------------------------------------------------
+Property Get ImportFilters() As Variant
+ ImportFilters = [_Super].GetProperty(&quot;ImportFilters&quot;)
+End Property &apos; SFDocuments.SF_Writer.ImportFilters
+
+REM -----------------------------------------------------------------------------
Property Get IsBase() As Boolean
IsBase = [_Super].GetProperty(&quot;IsBase&quot;)
End Property &apos; SFDocuments.SF_Writer.IsBase