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
5684fbce
Kaydet (Commit)
5684fbce
authored
Agu 21, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add hwp to fftester
Change-Id: Ibf819307905295580cb6a813f6d003a7dabc86b5
üst
619d8ba5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
0 deletions
+36
-0
Library_hwp.mk
hwpfilter/Library_hwp.mk
+1
-0
hwpreader.cxx
hwpfilter/source/hwpreader.cxx
+21
-0
fftester.cxx
vcl/workben/fftester.cxx
+14
-0
No files found.
hwpfilter/Library_hwp.mk
Dosyayı görüntüle @
5684fbce
...
@@ -17,6 +17,7 @@ $(eval $(call gb_Library_use_libraries,hwp,\
...
@@ -17,6 +17,7 @@ $(eval $(call gb_Library_use_libraries,hwp,\
cppuhelper \
cppuhelper \
sal \
sal \
utl \
utl \
tl \
$(gb_UWINAPI) \
$(gb_UWINAPI) \
))
))
...
...
hwpfilter/source/hwpreader.cxx
Dosyayı görüntüle @
5684fbce
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include <math.h>
#include <math.h>
#include <osl/diagnose.h>
#include <osl/diagnose.h>
#include <tools/stream.hxx>
#include <comphelper/newarray.hxx>
#include <comphelper/newarray.hxx>
#include "fontmap.hxx"
#include "fontmap.hxx"
...
@@ -123,6 +124,26 @@ HwpReader::~HwpReader()
...
@@ -123,6 +124,26 @@ HwpReader::~HwpReader()
delete
d
;
delete
d
;
}
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
bool
SAL_CALL
TestImportHWP
(
const
OUString
&
rURL
)
{
SvFileStream
aFileStream
(
rURL
,
StreamMode
::
READ
);
std
::
unique_ptr
<
HStream
>
stream
(
new
HStream
);
byte
aData
[
32768
];
sal_Size
nRead
,
nBlock
=
32768
;
while
(
true
)
{
nRead
=
aFileStream
.
Read
(
aData
,
nBlock
);
if
(
nRead
==
0
)
break
;
stream
->
addData
(
aData
,
(
int
)
nRead
);
}
HWPFile
hwpfile
;
if
(
hwpfile
.
ReadHwpFile
(
stream
.
release
()))
return
false
;
return
true
;
}
sal_Bool
HwpReader
::
filter
(
const
Sequence
<
PropertyValue
>&
rDescriptor
)
throw
(
RuntimeException
,
std
::
exception
)
sal_Bool
HwpReader
::
filter
(
const
Sequence
<
PropertyValue
>&
rDescriptor
)
throw
(
RuntimeException
,
std
::
exception
)
{
{
...
...
vcl/workben/fftester.cxx
Dosyayı görüntüle @
5684fbce
...
@@ -64,6 +64,7 @@ using namespace cppu;
...
@@ -64,6 +64,7 @@ using namespace cppu;
extern
"C"
{
static
void
SAL_CALL
thisModule
()
{}
}
extern
"C"
{
static
void
SAL_CALL
thisModule
()
{}
}
typedef
bool
(
*
WFilterCall
)(
const
OUString
&
rUrl
,
const
OUString
&
rFlt
);
typedef
bool
(
*
WFilterCall
)(
const
OUString
&
rUrl
,
const
OUString
&
rFlt
);
typedef
bool
(
*
HFilterCall
)(
const
OUString
&
rUrl
);
/* This constant specifies the number of inputs to process before restarting.
/* This constant specifies the number of inputs to process before restarting.
* This is optional, but helps limit the impact of memory leaks and similar
* This is optional, but helps limit the impact of memory leaks and similar
...
@@ -333,6 +334,19 @@ try_again:
...
@@ -333,6 +334,19 @@ try_again:
else
else
ret
=
(
int
)
(
*
pfnImport
)(
out
,
OUString
(
"CWW8"
));
ret
=
(
int
)
(
*
pfnImport
)(
out
,
OUString
(
"CWW8"
));
}
}
else
if
(
strcmp
(
argv
[
2
],
"hwp"
)
==
0
)
{
static
HFilterCall
pfnImport
(
0
);
if
(
!
pfnImport
)
{
osl
::
Module
aLibrary
;
aLibrary
.
loadRelative
(
&
thisModule
,
"libhwplo.so"
,
SAL_LOADMODULE_LAZY
);
pfnImport
=
reinterpret_cast
<
HFilterCall
>
(
aLibrary
.
getFunctionSymbol
(
"TestImportHWP"
));
aLibrary
.
release
();
}
ret
=
(
int
)
(
*
pfnImport
)(
out
);
}
}
}
/* To signal successful completion of a run, we need to deliver
/* To signal successful completion of a run, we need to deliver
...
...
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