Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
cloudooo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
cloudooo
Commits
6b149d10
Commit
6b149d10
authored
Feb 20, 2024
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ooo: explicitly disable macro.
parent
c7897044
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
cloudooo/handler/ooo/helper/unoconverter.py
cloudooo/handler/ooo/helper/unoconverter.py
+10
-4
No files found.
cloudooo/handler/ooo/helper/unoconverter.py
View file @
6b149d10
...
...
@@ -143,9 +143,13 @@ class UnoDocument:
def
_getPropertyToImport
(
self
,
infilter
,
_ods
=
"com.sun.star.sheet.SpreadsheetDocument"
):
"""Create the property for import filter, according to the extension of the file."""
from
com.sun.star.document.MacroExecMode
import
NEVER_EXECUTE
args
=
[
self
.
_createProperty
(
'MacroExecMode'
,
NEVER_EXECUTE
),
]
if
infilter
:
infilter
=
infilter
.
split
(
':'
,
1
)
args
=
[
self
.
_createProperty
(
"FilterName"
,
infilter
.
pop
(
0
))]
args
.
append
(
self
.
_createProperty
(
"FilterName"
,
infilter
.
pop
(
0
)))
if
infilter
:
args
.
append
(
self
.
_createProperty
(
"FilterOptions"
,
*
infilter
))
return
args
...
...
@@ -162,17 +166,19 @@ class UnoDocument:
except
csv
.
Error
:
delimiter
=
ord
(
','
)
return
(
args
.
extend
(
(
self
.
_createProperty
(
"FilterName"
,
"Text - txt - csv (StarCalc)"
),
self
.
_createProperty
(
"FilterOptions"
,
"%s,34,UTF-8"
%
delimiter
))
)
elif
self
.
source_format
==
'html'
:
if
next
(
candidates
,
None
)
==
_ods
:
return
(
args
.
extend
(
(
self
.
_createProperty
(
"FilterName"
,
"calc_HTML_WebQuery"
),
)
)
return
()
return
args
def
_load
(
self
,
infilter
,
refresh
):
"""Create one document with basic properties
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment