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
01d64f95
Kaydet (Commit)
01d64f95
authored
Kas 30, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add mml support to fftester
Change-Id: Ie0c3dd5eddb274cf04b335af6fdcb32b3445d02c
üst
83d51a0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletion
+43
-1
mathmlimport.cxx
starmath/source/mathmlimport.cxx
+29
-1
fftester.cxx
vcl/workben/fftester.cxx
+14
-0
No files found.
starmath/source/mathmlimport.cxx
Dosyayı görüntüle @
01d64f95
...
...
@@ -62,8 +62,9 @@ one go*/
#include "mathmlattr.hxx"
#include "mathmlimport.hxx"
#include "register.hxx"
#include <unomodel.hxx>
#include <document.hxx>
#include <smdll.hxx>
#include <unomodel.hxx>
#include <utility.hxx>
using
namespace
::
com
::
sun
::
star
::
beans
;
...
...
@@ -3103,5 +3104,32 @@ void SmXMLImport::SetConfigurationSettings(const Sequence<PropertyValue>& aConfP
}
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
bool
SAL_CALL
TestImportMML
(
SvStream
&
rStream
)
{
SmGlobals
::
ensure
();
SfxObjectShellLock
xDocSh
(
new
SmDocShell
(
SfxModelFlags
::
EMBEDDED_OBJECT
));
xDocSh
->
DoInitNew
();
uno
::
Reference
<
frame
::
XModel
>
xModel
(
xDocSh
->
GetModel
());
uno
::
Reference
<
beans
::
XPropertySet
>
xInfoSet
;
uno
::
Reference
<
uno
::
XComponentContext
>
xContext
(
comphelper
::
getProcessComponentContext
());
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xMultiServiceFactory
(
comphelper
::
getProcessServiceFactory
());
uno
::
Reference
<
io
::
XInputStream
>
xStream
(
new
utl
::
OSeekableInputStreamWrapper
(
rStream
));
//SetLoading hack because the document properties will be re-initted
//by the xml filter and during the init, while its considered uninitialized,
//setting a property will inform the document its modified, which attempts
//to update the properties, which throws cause the properties are uninitialized
xDocSh
->
SetLoading
(
SfxLoadedFlags
::
NONE
);
auto
nRet
=
SmXMLImportWrapper
::
ReadThroughComponent
(
xStream
,
xModel
,
xContext
,
xInfoSet
,
"com.sun.star.comp.Math.XMLImporter"
,
false
);
xDocSh
->
SetLoading
(
SfxLoadedFlags
::
ALL
);
xDocSh
->
DoClose
();
return
nRet
!=
ERRCODE_NONE
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/workben/fftester.cxx
Dosyayı görüntüle @
01d64f95
...
...
@@ -627,6 +627,20 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
SvFileStream
aFileStream
(
out
,
StreamMode
::
READ
);
ret
=
(
int
)
(
*
pfnImport
)(
aFileStream
);
}
else
if
(
strcmp
(
argv
[
2
],
"mml"
)
==
0
)
{
static
FFilterCall
pfnImport
(
nullptr
);
if
(
!
pfnImport
)
{
osl
::
Module
aLibrary
;
aLibrary
.
loadRelative
(
&
thisModule
,
"libsmlo.so"
,
SAL_LOADMODULE_LAZY
);
pfnImport
=
reinterpret_cast
<
FFilterCall
>
(
aLibrary
.
getFunctionSymbol
(
"TestImportMML"
));
aLibrary
.
release
();
}
SvFileStream
aFileStream
(
out
,
StreamMode
::
READ
);
ret
=
(
int
)
(
*
pfnImport
)(
aFileStream
);
}
#endif
}
catch
(...)
...
...
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