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
18c786cb
Kaydet (Commit)
18c786cb
authored
Haz 12, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cast loses precision
Change-Id: Ic688f08cada4ae70ea1dfb1e29e249a166456452
üst
4348dfbd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
LibreOfficeKit.h
include/LibreOfficeKit/LibreOfficeKit.h
+4
-4
libtest.cxx
smoketest/libtest.cxx
+4
-3
No files found.
include/LibreOfficeKit/LibreOfficeKit.h
Dosyayı görüntüle @
18c786cb
...
@@ -20,14 +20,14 @@ typedef struct _LibreOfficeKitDocument LibreOfficeKitDocument;
...
@@ -20,14 +20,14 @@ typedef struct _LibreOfficeKitDocument LibreOfficeKitDocument;
// Do we have an extended member in this struct ?
// Do we have an extended member in this struct ?
#define LIBREOFFICEKIT_HAS_MEMBER(strct,member,nSize) \
#define LIBREOFFICEKIT_HAS_MEMBER(strct,member,nSize) \
((((
in
t)((unsigned char *)&((strct *) 0)->member) + \
((((
size_
t)((unsigned char *)&((strct *) 0)->member) + \
(int)
sizeof ((strct *) 0)->member)) <= (nSize))
sizeof ((strct *) 0)->member)) <= (nSize))
#define LIBREOFFICEKIT_HAS(pKit,member) LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKit,member,(pKit)->nSize)
#define LIBREOFFICEKIT_HAS(pKit,member) LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKit,member,(pKit)->nSize)
struct
_LibreOfficeKit
struct
_LibreOfficeKit
{
{
in
t
nSize
;
size_
t
nSize
;
void
(
*
destroy
)
(
LibreOfficeKit
*
pThis
);
void
(
*
destroy
)
(
LibreOfficeKit
*
pThis
);
int
(
*
initialize
)
(
LibreOfficeKit
*
pThis
,
const
char
*
pInstallPath
);
int
(
*
initialize
)
(
LibreOfficeKit
*
pThis
,
const
char
*
pInstallPath
);
...
@@ -39,7 +39,7 @@ struct _LibreOfficeKit
...
@@ -39,7 +39,7 @@ struct _LibreOfficeKit
struct
_LibreOfficeKitDocument
struct
_LibreOfficeKitDocument
{
{
in
t
nSize
;
size_
t
nSize
;
void
(
*
destroy
)
(
LibreOfficeKitDocument
*
pThis
);
void
(
*
destroy
)
(
LibreOfficeKitDocument
*
pThis
);
int
(
*
saveAs
)
(
LibreOfficeKitDocument
*
pThis
,
int
(
*
saveAs
)
(
LibreOfficeKitDocument
*
pThis
,
...
...
smoketest/libtest.cxx
Dosyayı görüntüle @
18c786cb
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include <assert.h>
#include <assert.h>
#include <math.h>
#include <math.h>
#include <sys/time.h>
#include <sys/time.h>
#include <sal/types.h>
#include <LibreOfficeKit/LibreOfficeKit.hxx>
#include <LibreOfficeKit/LibreOfficeKit.hxx>
using
namespace
::
lok
;
using
namespace
::
lok
;
...
@@ -77,9 +78,9 @@ int main (int argc, char **argv)
...
@@ -77,9 +78,9 @@ int main (int argc, char **argv)
if
(
!
LIBREOFFICEKIT_DOCUMENT_HAS
(
pDocument
->
get
(),
saveAsWithOptions
))
if
(
!
LIBREOFFICEKIT_DOCUMENT_HAS
(
pDocument
->
get
(),
saveAsWithOptions
))
{
{
fprintf
(
stderr
,
"using obsolete LibreOffice %
d + %d vs. %
d
\n
"
,
fprintf
(
stderr
,
"using obsolete LibreOffice %
"
SAL_PRI_SIZET
"d + %"
SAL_PRI_SIZET
"d vs. %"
SAL_PRI_SIZET
"
d
\n
"
,
(
in
t
)((
unsigned
char
*
)
&
((
LibreOfficeKitDocument
*
)
0
)
->
saveAsWithOptions
),
(
size_
t
)((
unsigned
char
*
)
&
((
LibreOfficeKitDocument
*
)
0
)
->
saveAsWithOptions
),
(
int
)
sizeof
((
LibreOfficeKitDocument
*
)
0
)
->
saveAsWithOptions
,
sizeof
((
LibreOfficeKitDocument
*
)
0
)
->
saveAsWithOptions
,
pDocument
->
get
()
->
nSize
);
pDocument
->
get
()
->
nSize
);
return
-
1
;
return
-
1
;
}
}
...
...
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