Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
90e3d0fe
Kaydet (Commit)
90e3d0fe
authored
Tem 18, 2013
tarafından
László Németh
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
librelogo: fix LibO SVG export for W3C Validator/Wikipedia
Change-Id: I19b01b08ab08540cc8e9f7255d13663ba7ce1d02
üst
4f4bed9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
LibreLogo.py
librelogo/source/LibreLogo/LibreLogo.py
+11
-1
No files found.
librelogo/source/LibreLogo/LibreLogo.py
Dosyayı görüntüle @
90e3d0fe
...
@@ -1208,6 +1208,15 @@ def __groupstart__(name = ""):
...
@@ -1208,6 +1208,15 @@ def __groupstart__(name = ""):
__group__
=
uno
.
getComponentContext
()
.
ServiceManager
.
createInstance
(
'com.sun.star.drawing.ShapeCollection'
)
__group__
=
uno
.
getComponentContext
()
.
ServiceManager
.
createInstance
(
'com.sun.star.drawing.ShapeCollection'
)
__grouplefthang__
=
0
__grouplefthang__
=
0
def
create_valid_svg_file
(
filename
):
with
open
(
filename
,
"r"
)
as
f
:
s
=
f
.
read
()
s
=
re
.
sub
(
'(?s)(<g
\\
sid="[^"]*)
\
(([^"]*)
\
)'
,
'
\\
1
\\
2'
,
s
)
# bad "(", ")" in xml:id
s
=
re
.
sub
(
'(?s)<g
\\
sooo:[^>]*>'
,
''
,
s
)
# remove non standard attributes
s
=
re
.
sub
(
'(?s)<svg
\\
s+version="1.2"'
,
'<svg version="1.1"'
,
s
)
# for W3C Validator
with
open
(
filename
,
'w'
)
as
f
:
f
.
write
(
s
)
def
__groupend__
(
name
=
""
):
def
__groupend__
(
name
=
""
):
global
__group__
,
__grouplefthang__
,
__groupstack__
global
__group__
,
__grouplefthang__
,
__groupstack__
g
=
0
g
=
0
...
@@ -1246,7 +1255,8 @@ def __groupend__(name = ""):
...
@@ -1246,7 +1255,8 @@ def __groupend__(name = ""):
name
=
os
.
path
.
expanduser
(
'~'
)
+
os
.
path
.
sep
+
name
name
=
os
.
path
.
expanduser
(
'~'
)
+
os
.
path
.
sep
+
name
__dispatcher__
(
".uno:ExportTo"
,
(
__getprop__
(
"URL"
,
unohelper
.
systemPathToFileUrl
(
name
)),
__getprop__
(
"FilterName"
,
"draw_svg_Export"
)),
draw
)
__dispatcher__
(
".uno:ExportTo"
,
(
__getprop__
(
"URL"
,
unohelper
.
systemPathToFileUrl
(
name
)),
__getprop__
(
"FilterName"
,
"draw_svg_Export"
)),
draw
)
__time__
.
sleep
(
1
)
__time__
.
sleep
(
1
)
draw
.
dispose
()
create_valid_svg_file
(
name
)
draw
.
close
(
True
)
__group__
=
__groupstack__
.
pop
()
__group__
=
__groupstack__
.
pop
()
if
__group__
and
g
:
if
__group__
and
g
:
...
...
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