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
a3ccf3ea
Kaydet (Commit)
a3ccf3ea
authored
10 years ago
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
lok JNI: no "handle" in funcs & don't wrap some native funcs
Change-Id: If783fecd80a0de05e94c76e23572b567d151bb06
üst
246cb7e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
40 deletions
+17
-40
Document.java
android/Bootstrap/src/org/libreoffice/kit/Document.java
+9
-29
Office.java
android/Bootstrap/src/org/libreoffice/kit/Office.java
+4
-4
lokandroid.cxx
desktop/source/lib/lokandroid.cxx
+4
-7
No files found.
android/Bootstrap/src/org/libreoffice/kit/Document.java
Dosyayı görüntüle @
a3ccf3ea
...
...
@@ -15,43 +15,23 @@ public class Document {
private
final
long
handle
;
private
native
void
setPartNative
(
long
handle
,
int
part
);
private
native
int
getNumberOfPartsNative
(
long
handle
);
private
native
int
getDocumentTypeNative
(
long
handle
);
private
native
void
paintTileNative
(
long
handle
,
ByteBuffer
buffer
,
int
canvasWidth
,
int
canvasHeight
,
int
tilePositionX
,
int
tilePositionY
,
int
tileWidth
,
int
tileHeight
);
private
native
long
getDocumentHeightNative
(
long
handle
);
private
native
long
getDocumentWidthNative
(
long
handle
);
public
native
void
setPart
(
int
part
);
public
native
int
getNumberOfParts
();
public
native
long
getDocumentHeight
();
public
native
long
getDocumentWidth
();
private
native
int
getDocumentTypeNative
();
private
native
void
paintTileNative
(
ByteBuffer
buffer
,
int
canvasWidth
,
int
canvasHeight
,
int
tilePositionX
,
int
tilePositionY
,
int
tileWidth
,
int
tileHeight
);
public
Document
(
long
handle
)
{
this
.
handle
=
handle
;
}
public
boolean
saveAs
(
String
url
)
{
return
false
;
}
public
int
getDocumentType
()
{
return
getDocumentTypeNative
(
handle
);
}
public
int
getNumberOfParts
()
{
return
getNumberOfPartsNative
(
handle
);
}
public
void
setPart
(
int
part
)
{
setPartNative
(
handle
,
part
);
return
getDocumentTypeNative
();
}
public
void
paintTile
(
ByteBuffer
buffer
,
int
canvasWidth
,
int
canvasHeight
,
int
tilePositionX
,
int
tilePositionY
,
int
tileWidth
,
int
tileHeight
)
{
paintTileNative
(
handle
,
buffer
,
canvasWidth
,
canvasHeight
,
tilePositionX
,
tilePositionY
,
tileWidth
,
tileHeight
);
}
public
long
getDocumentWidth
()
{
return
getDocumentWidthNative
(
handle
);
paintTileNative
(
buffer
,
canvasWidth
,
canvasHeight
,
tilePositionX
,
tilePositionY
,
tileWidth
,
tileHeight
);
}
public
long
getDocumentHeight
()
{
return
getDocumentHeightNative
(
handle
);
}
}
This diff is collapsed.
Click to expand it.
android/Bootstrap/src/org/libreoffice/kit/Office.java
Dosyayı görüntüle @
a3ccf3ea
...
...
@@ -19,15 +19,15 @@ public class Office {
this
.
handle
=
handle
;
}
public
native
String
getError
Native
();
public
native
String
getError
();
private
native
long
documentLoadNative
(
String
url
);
public
Document
documentLoad
(
String
url
)
{
long
h
andle
=
documentLoadNative
(
url
);
long
documentH
andle
=
documentLoadNative
(
url
);
Document
document
=
null
;
if
(
h
andle
>
0
)
{
document
=
new
Document
(
h
andle
);
if
(
documentH
andle
>
0
)
{
document
=
new
Document
(
documentH
andle
);
}
return
document
;
}
...
...
This diff is collapsed.
Click to expand it.
desktop/source/lib/lokandroid.cxx
Dosyayı görüntüle @
a3ccf3ea
...
...
@@ -19,8 +19,6 @@
#include <LibreOfficeKit/LibreOfficeKit.h>
// #define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "LibreOfficeKit", __VA_ARGS__))
/* LibreOfficeKit */
jfieldID
getHandleField
(
JNIEnv
*
pEnv
,
jobject
aObject
)
...
...
@@ -70,14 +68,14 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_org_libreoffice_kit_Office_document
}
/* Document */
extern
"C"
SAL_JNI_EXPORT
void
JNICALL
Java_org_libreoffice_kit_Document_setPart
Native
extern
"C"
SAL_JNI_EXPORT
void
JNICALL
Java_org_libreoffice_kit_Document_setPart
(
JNIEnv
*
pEnv
,
jobject
aObject
,
jint
aPart
)
{
LibreOfficeKitDocument
*
pDocument
=
getHandle
<
LibreOfficeKitDocument
>
(
pEnv
,
aObject
);
pDocument
->
pClass
->
setPart
(
pDocument
,
aPart
);
}
extern
"C"
SAL_JNI_EXPORT
jint
JNICALL
Java_org_libreoffice_kit_Document_getNumberOfParts
Native
extern
"C"
SAL_JNI_EXPORT
jint
JNICALL
Java_org_libreoffice_kit_Document_getNumberOfParts
(
JNIEnv
*
pEnv
,
jobject
aObject
)
{
LibreOfficeKitDocument
*
pDocument
=
getHandle
<
LibreOfficeKitDocument
>
(
pEnv
,
aObject
);
...
...
@@ -99,13 +97,12 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_paintTi
LibreOfficeKitDocument
*
pDocument
=
getHandle
<
LibreOfficeKitDocument
>
(
pEnv
,
aObject
);
unsigned
char
*
buffer
=
(
unsigned
char
*
)
pEnv
->
GetDirectBufferAddress
(
aByteBuffer
);
// jlong capacity = pEnv->GetDirectBufferCapacity(aByteBuffer);
int
nStride
=
0
;
pDocument
->
pClass
->
paintTile
(
pDocument
,
buffer
,
nCanvasWidth
,
nCanvasHeight
,
&
nStride
,
nTilePosX
,
nTilePosY
,
nTileWidth
,
nTileHeight
);
(
void
)
nStride
;
}
extern
"C"
SAL_JNI_EXPORT
jlong
JNICALL
Java_org_libreoffice_kit_Document_getDocumentHeight
Native
extern
"C"
SAL_JNI_EXPORT
jlong
JNICALL
Java_org_libreoffice_kit_Document_getDocumentHeight
(
JNIEnv
*
pEnv
,
jobject
aObject
)
{
LibreOfficeKitDocument
*
pDocument
=
getHandle
<
LibreOfficeKitDocument
>
(
pEnv
,
aObject
);
...
...
@@ -115,7 +112,7 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_org_libreoffice_kit_Document_getDoc
return
nHeight
;
}
extern
"C"
SAL_JNI_EXPORT
jlong
JNICALL
Java_org_libreoffice_kit_Document_getDocumentWidth
Native
extern
"C"
SAL_JNI_EXPORT
jlong
JNICALL
Java_org_libreoffice_kit_Document_getDocumentWidth
(
JNIEnv
*
pEnv
,
jobject
aObject
)
{
LibreOfficeKitDocument
*
pDocument
=
getHandle
<
LibreOfficeKitDocument
>
(
pEnv
,
aObject
);
...
...
This diff is collapsed.
Click to expand it.
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