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
d5effb40
Kaydet (Commit)
d5effb40
authored
Kas 30, 2011
tarafından
Luboš Luňák
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
create placeholders properly in docx mathml import
üst
baaf0aa0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
ooxmlimport.cxx
starmath/source/ooxmlimport.cxx
+14
-7
No files found.
starmath/source/ooxmlimport.cxx
Dosyayı görüntüle @
d5effb40
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include "ooxmlimport.hxx"
#include "ooxmlimport.hxx"
#include <comphelper/string.hxx>
#include <oox/token/tokens.hxx>
#include <oox/token/tokens.hxx>
#include <oox/token/namespaces.hxx>
#include <oox/token/namespaces.hxx>
...
@@ -81,6 +82,12 @@ OUString SmOoxmlImport::handleStream()
...
@@ -81,6 +82,12 @@ OUString SmOoxmlImport::handleStream()
ret
+=
item
;
ret
+=
item
;
}
}
stream
.
ensureClosingTag
(
M_TOKEN
(
oMath
));
stream
.
ensureClosingTag
(
M_TOKEN
(
oMath
));
// Placeholders are written out as nothing (i.e. nothing inside e.g. the <e> element),
// which will result in "{}" in the formula text. Fix this up.
ret
=
comphelper
::
string
::
searchAndReplaceAllAsciiWithAscii
(
ret
,
"{}"
,
"<?>"
);
// And as a result, empty parts of the formula that are not placeholders are written out
// as a single space, so fix that up too.
ret
=
comphelper
::
string
::
searchAndReplaceAllAsciiWithAscii
(
ret
,
"{ }"
,
"{}"
);
fprintf
(
stderr
,
"FORMULA: %s
\n
"
,
rtl
::
OUStringToOString
(
ret
,
RTL_TEXTENCODING_UTF8
).
getStr
());
fprintf
(
stderr
,
"FORMULA: %s
\n
"
,
rtl
::
OUStringToOString
(
ret
,
RTL_TEXTENCODING_UTF8
).
getStr
());
return
ret
;
return
ret
;
}
}
...
@@ -404,11 +411,11 @@ OUString SmOoxmlImport::handleLimLowUpp( LimLowUpp_t limlowupp )
...
@@ -404,11 +411,11 @@ OUString SmOoxmlImport::handleLimLowUpp( LimLowUpp_t limlowupp )
OUString
e
=
readOMathArgInElement
(
M_TOKEN
(
e
));
OUString
e
=
readOMathArgInElement
(
M_TOKEN
(
e
));
OUString
lim
=
readOMathArgInElement
(
M_TOKEN
(
lim
));
OUString
lim
=
readOMathArgInElement
(
M_TOKEN
(
lim
));
stream
.
ensureClosingTag
(
token
);
stream
.
ensureClosingTag
(
token
);
// fix up overbrace/underbrace
// fix up overbrace/underbrace
(use { }, as {} will be converted to a placeholder)
if
(
limlowupp
==
LimUpp
&&
e
.
endsWithAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
" overbrace {}"
)))
if
(
limlowupp
==
LimUpp
&&
e
.
endsWithAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
" overbrace {
}"
)))
return
e
.
copy
(
0
,
e
.
getLength
()
-
1
)
+
lim
+
STR
(
"}"
);
return
e
.
copy
(
0
,
e
.
getLength
()
-
2
)
+
lim
+
STR
(
"}"
);
if
(
limlowupp
==
LimLow
&&
e
.
endsWithAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
" underbrace {}"
)))
if
(
limlowupp
==
LimLow
&&
e
.
endsWithAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
" underbrace {
}"
)))
return
e
.
copy
(
0
,
e
.
getLength
()
-
1
)
+
lim
+
STR
(
"}"
);
return
e
.
copy
(
0
,
e
.
getLength
()
-
2
)
+
lim
+
STR
(
"}"
);
return
e
+
(
limlowupp
==
LimLow
?
STR
(
" csub {"
)
:
STR
(
" csup {"
))
+
lim
+
STR
(
"}"
);
return
e
+
(
limlowupp
==
LimLow
?
STR
(
" csub {"
)
:
STR
(
" csup {"
))
+
lim
+
STR
(
"}"
);
}
}
...
@@ -435,9 +442,9 @@ OUString SmOoxmlImport::handleGroupChr()
...
@@ -435,9 +442,9 @@ OUString SmOoxmlImport::handleGroupChr()
OUString
e
=
readOMathArgInElement
(
M_TOKEN
(
e
));
OUString
e
=
readOMathArgInElement
(
M_TOKEN
(
e
));
stream
.
ensureClosingTag
(
M_TOKEN
(
groupChr
));
stream
.
ensureClosingTag
(
M_TOKEN
(
groupChr
));
if
(
pos
==
top
&&
chr
==
sal_Unicode
(
0x23de
))
if
(
pos
==
top
&&
chr
==
sal_Unicode
(
0x23de
))
return
STR
(
"{"
)
+
e
+
STR
(
"} overbrace {}"
);
return
STR
(
"{"
)
+
e
+
STR
(
"} overbrace {
}"
);
if
(
pos
==
bot
&&
chr
==
sal_Unicode
(
0x23df
))
if
(
pos
==
bot
&&
chr
==
sal_Unicode
(
0x23df
))
return
STR
(
"{"
)
+
e
+
STR
(
"} underbrace {}"
);
return
STR
(
"{"
)
+
e
+
STR
(
"} underbrace {
}"
);
if
(
pos
==
top
)
if
(
pos
==
top
)
return
STR
(
"{"
)
+
e
+
STR
(
"} csup {"
)
+
OUString
(
chr
)
+
STR
(
"}"
);
return
STR
(
"{"
)
+
e
+
STR
(
"} csup {"
)
+
OUString
(
chr
)
+
STR
(
"}"
);
else
else
...
...
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