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
2cea241c
Kaydet (Commit)
2cea241c
authored
Eki 01, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add 602 format to fftester
Change-Id: I52055dc66ab2119dce6e3df3a34c25a822dea166
üst
d80f53b3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
13 deletions
+68
-13
Library_t602filter.mk
filter/Library_t602filter.mk
+1
-0
t602filter.cxx
filter/source/t602/t602filter.cxx
+51
-12
t602filter.hxx
filter/source/t602/t602filter.hxx
+3
-0
fftester.cxx
vcl/workben/fftester.cxx
+13
-1
No files found.
filter/Library_t602filter.mk
Dosyayı görüntüle @
2cea241c
...
...
@@ -28,6 +28,7 @@ $(eval $(call gb_Library_use_sdk_api,t602filter))
$(eval $(call gb_Library_use_libraries,t602filter,\
xo \
tl \
comphelper \
cppuhelper \
cppu \
sal \
...
...
filter/source/t602/t602filter.cxx
Dosyayı görüntüle @
2cea241c
...
...
@@ -36,6 +36,7 @@
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/XDialog.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <comphelper/oslfile2streamwrap.hxx>
using
namespace
::
cppu
;
using
namespace
::
osl
;
...
...
@@ -115,11 +116,17 @@ namespace T602ImportFilter {
"
\x00\xb4\x00\xb0\x00\xc0\x02\xc6\x01\x58\x01\x59\x00\x20\x00\x20
"
;
#define _Start(_nam) \
mxHandler->startElement(_nam, mAttrList);\
mpAttrList->Clear();
if (mxHandler.is()) \
{ \
mxHandler->startElement(_nam, mAttrList); \
mpAttrList->Clear(); \
}
#define _End(_nam) \
mxHandler->endElement(_nam);
if (mxHandler.is()) \
{ \
mxHandler->endElement(_nam); \
}
inistruct
ini
;
...
...
@@ -130,6 +137,14 @@ T602ImportFilter::T602ImportFilter(const css::uno::Reference<css::lang::XMultiSe
{
}
T602ImportFilter
::
T602ImportFilter
(
css
::
uno
::
Reference
<
css
::
io
::
XInputStream
>
xInputStream
)
:
mxInputStream
(
xInputStream
)
,
mpAttrList
(
NULL
)
,
node
(
START
)
{
}
T602ImportFilter
::~
T602ImportFilter
()
{
}
...
...
@@ -219,7 +234,8 @@ void T602ImportFilter::inschr(unsigned char ch)
}
else
{
char
s
[
20
];
sprintf
(
s
,
"%i"
,
pst
.
wasspace
);
mpAttrList
->
AddAttribute
(
"text:c"
,
OUString
::
createFromAscii
(
s
));
if
(
mpAttrList
)
mpAttrList
->
AddAttribute
(
"text:c"
,
OUString
::
createFromAscii
(
s
));
_Start
(
"text:s"
);
_End
(
"text:s"
);
}
...
...
@@ -440,6 +456,13 @@ bool SAL_CALL T602ImportFilter::importImpl( const Sequence< css::beans::Property
return
true
;
}
bool
SAL_CALL
T602ImportFilter
::
test
()
{
Reset602
();
Read602
();
return
true
;
}
void
T602ImportFilter
::
Reset602
()
{
node
=
START
;
...
...
@@ -496,7 +519,8 @@ void T602ImportFilter::inschrdef(unsigned char ch)
xch
[
0
]
=
ch
;
pst
.
waspar
=
false
;
mxHandler
->
characters
(
OUString
(
xch
));
if
(
mxHandler
.
is
())
mxHandler
->
characters
(
OUString
(
xch
));
}
void
T602ImportFilter
::
wrtfnt
()
...
...
@@ -517,8 +541,9 @@ void T602ImportFilter::wrtfnt()
}
_End
(
"text:span"
);
mpAttrList
->
AddAttribute
(
"text:style-name"
,
OUString
::
createFromAscii
(
style
));
if
(
mpAttrList
)
mpAttrList
->
AddAttribute
(
"text:style-name"
,
OUString
::
createFromAscii
(
style
));
_Start
(
"text:span"
);
}
...
...
@@ -555,7 +580,8 @@ void T602ImportFilter::par602(bool endofpage)
if
(
pst
.
waspar
||
ini
.
reformatpars
)
{
_End
(
"text:span"
);
_End
(
"text:p"
);
mpAttrList
->
AddAttribute
(
"text:style-name"
,
"P1"
);
if
(
mpAttrList
)
mpAttrList
->
AddAttribute
(
"text:style-name"
,
"P1"
);
_Start
(
"text:p"
);
_Start
(
"text:span"
);
wrtfnt
();
...
...
@@ -581,7 +607,8 @@ void T602ImportFilter::par602(bool endofpage)
if
(
!
ini
.
reformatpars
)
{
_End
(
"text:span"
);
_End
(
"text:p"
);
mpAttrList
->
AddAttribute
(
"text:style-name"
,
"P2"
);
if
(
mpAttrList
)
mpAttrList
->
AddAttribute
(
"text:style-name"
,
"P2"
);
_Start
(
"text:p"
);
_Start
(
"text:span"
);
wrtfnt
();
...
...
@@ -688,9 +715,11 @@ void T602ImportFilter::Read602()
if
(
node
==
QUIT
)
return
;
mpAttrList
->
AddAttribute
(
"text:style-name"
,
"P1"
);
if
(
mpAttrList
)
mpAttrList
->
AddAttribute
(
"text:style-name"
,
"P1"
);
_Start
(
"text:p"
);
mpAttrList
->
AddAttribute
(
"text:style-name"
,
"T1"
);
if
(
mpAttrList
)
mpAttrList
->
AddAttribute
(
"text:style-name"
,
"T1"
);
_Start
(
"text:span"
);
if
(
node
==
START
)
{
node
=
EOL
;
}
...
...
@@ -739,7 +768,8 @@ void T602ImportFilter::Read602()
node
=
SETCMD
;
//nedodelano
else
{
inschr
(
'@'
);
mxHandler
->
characters
(
OUString
::
createFromAscii
(
cmd602
));
if
(
mxHandler
.
is
())
mxHandler
->
characters
(
OUString
::
createFromAscii
(
cmd602
));
node
=
READCH
;
}
}
else
{
...
...
@@ -1170,4 +1200,13 @@ Reference< XInterface > SAL_CALL T602ImportFilterDialog_createInstance( const Re
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
bool
SAL_CALL
TestImport602
(
const
OUString
&
rURL
)
{
osl
::
File
aInputFile
(
rURL
);
aInputFile
.
open
(
osl_File_OpenFlag_Read
);
css
::
uno
::
Reference
<
io
::
XInputStream
>
xStream
(
new
comphelper
::
OSLInputStreamWrapper
(
aInputFile
));
T602ImportFilter
::
T602ImportFilter
aImport
(
xStream
);
return
aImport
.
test
();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
filter/source/t602/t602filter.hxx
Dosyayı görüntüle @
2cea241c
...
...
@@ -255,6 +255,7 @@ private:
public
:
T602ImportFilter
(
const
css
::
uno
::
Reference
<
css
::
lang
::
XMultiServiceFactory
>
&
r
);
T602ImportFilter
(
css
::
uno
::
Reference
<
css
::
io
::
XInputStream
>
xInputStream
);
virtual
~
T602ImportFilter
();
// XFilter
...
...
@@ -283,6 +284,8 @@ private:
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
css
::
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
(
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
bool
SAL_CALL
test
();
};
OUString
T602ImportFilter_getImplementationName
()
...
...
vcl/workben/fftester.cxx
Dosyayı görüntüle @
2cea241c
...
...
@@ -348,7 +348,6 @@ try_again:
}
ret
=
(
int
)
(
*
pfnImport
)(
out
);
}
else
if
(
strcmp
(
argv
[
2
],
"hwp"
)
==
0
)
{
static
HFilterCall
pfnImport
(
0
);
...
...
@@ -362,6 +361,19 @@ try_again:
}
ret
=
(
int
)
(
*
pfnImport
)(
out
);
}
else
if
(
strcmp
(
argv
[
2
],
"602"
)
==
0
)
{
static
HFilterCall
pfnImport
(
0
);
if
(
!
pfnImport
)
{
osl
::
Module
aLibrary
;
aLibrary
.
loadRelative
(
&
thisModule
,
"libt602filterlo.so"
,
SAL_LOADMODULE_LAZY
);
pfnImport
=
reinterpret_cast
<
HFilterCall
>
(
aLibrary
.
getFunctionSymbol
(
"TestImport602"
));
aLibrary
.
release
();
}
ret
=
(
int
)
(
*
pfnImport
)(
out
);
}
else
if
(
strcmp
(
argv
[
2
],
"lwp"
)
==
0
)
{
static
HFilterCall
pfnImport
(
0
);
...
...
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