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
30a6622c
Kaydet (Commit)
30a6622c
authored
Nis 20, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
CID#1295034 uncaught exception
Change-Id: I853e520dd60c3e19cbf7a7b620115df50fc25b30
üst
5e16ece1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
18 deletions
+25
-18
unofilter.cxx
starmath/source/unofilter.cxx
+25
-18
No files found.
starmath/source/unofilter.cxx
Dosyayı görüntüle @
30a6622c
...
...
@@ -64,34 +64,41 @@ MathTypeFilter::~MathTypeFilter()
sal_Bool
MathTypeFilter
::
filter
(
const
uno
::
Sequence
<
beans
::
PropertyValue
>&
rDescriptor
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
bool
bSuccess
=
false
;
utl
::
MediaDescriptor
aMediaDesc
(
rDescriptor
);
aMediaDesc
.
addInputStream
();
uno
::
Reference
<
io
::
XInputStream
>
xInputStream
;
aMediaDesc
[
utl
::
MediaDescriptor
::
PROP_INPUTSTREAM
()]
>>=
xInputStream
;
std
::
unique_ptr
<
SvStream
>
pStream
(
utl
::
UcbStreamHelper
::
CreateStream
(
xInputStream
));
if
(
pStream
)
try
{
if
(
SotStorage
::
IsStorageFile
(
pStream
.
get
()))
utl
::
MediaDescriptor
aMediaDesc
(
rDescriptor
);
aMediaDesc
.
addInputStream
();
uno
::
Reference
<
io
::
XInputStream
>
xInputStream
;
aMediaDesc
[
utl
::
MediaDescriptor
::
PROP_INPUTSTREAM
()]
>>=
xInputStream
;
std
::
unique_ptr
<
SvStream
>
pStream
(
utl
::
UcbStreamHelper
::
CreateStream
(
xInputStream
));
if
(
pStream
)
{
SvStorageRef
aStorage
(
new
SotStorage
(
pStream
.
get
(),
false
));
// Is this a MathType Storage?
if
(
aStorage
->
IsStream
(
OUString
(
"Equation Native"
)))
if
(
SotStorage
::
IsStorageFile
(
pStream
.
get
()))
{
if
(
SmModel
*
pModel
=
dynamic_cast
<
SmModel
*>
(
m_xDstDoc
.
get
()))
SvStorageRef
aStorage
(
new
SotStorage
(
pStream
.
get
(),
false
));
// Is this a MathType Storage?
if
(
aStorage
->
IsStream
(
OUString
(
"Equation Native"
)))
{
SmDocShell
*
pDocShell
=
static_cast
<
SmDocShell
*>
(
pModel
->
GetObjectShell
());
OUString
aText
=
pDocShell
->
GetText
();
MathType
aEquation
(
aText
);
bSuccess
=
aEquation
.
Parse
(
aStorage
)
==
1
;
if
(
bSuccess
)
if
(
SmModel
*
pModel
=
dynamic_cast
<
SmModel
*>
(
m_xDstDoc
.
get
()))
{
pDocShell
->
SetText
(
aText
);
pDocShell
->
Parse
();
SmDocShell
*
pDocShell
=
static_cast
<
SmDocShell
*>
(
pModel
->
GetObjectShell
());
OUString
aText
=
pDocShell
->
GetText
();
MathType
aEquation
(
aText
);
bSuccess
=
aEquation
.
Parse
(
aStorage
)
==
1
;
if
(
bSuccess
)
{
pDocShell
->
SetText
(
aText
);
pDocShell
->
Parse
();
}
}
}
}
}
}
catch
(
const
uno
::
Exception
&
rException
)
{
SAL_WARN
(
"starmath"
,
"Exception caught: "
<<
rException
.
Message
);
}
return
bSuccess
;
}
...
...
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