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
eb37322f
Kaydet (Commit)
eb37322f
authored
Şub 25, 2013
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Temporary (one hopes) hack to get the actual view size down to SvpSalFrame
Change-Id: I0c2a2301de1b0de71fc6724ff2af73fbf6b406ef
üst
320571bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
Desktop.java
...org/libreoffice/android/experimental/desktop/Desktop.java
+5
-3
androidinst.cxx
vcl/android/androidinst.cxx
+16
-0
No files found.
android/experimental/desktop/src/org/libreoffice/android/experimental/desktop/Desktop.java
Dosyayı görüntüle @
eb37322f
...
@@ -132,6 +132,7 @@ public class Desktop
...
@@ -132,6 +132,7 @@ public class Desktop
/* implementend by vcl */
/* implementend by vcl */
public
static
native
void
renderVCL
(
Bitmap
bitmap
);
public
static
native
void
renderVCL
(
Bitmap
bitmap
);
public
static
native
void
setViewSize
(
int
width
,
int
height
);
/**
/**
* This class contains the state that is initialized once and never changes
* This class contains the state that is initialized once and never changes
...
@@ -278,15 +279,15 @@ public class Desktop
...
@@ -278,15 +279,15 @@ public class Desktop
if
(
bootstrapContext
==
null
)
if
(
bootstrapContext
==
null
)
initBootstrapContext
();
initBootstrapContext
();
Log
.
i
(
TAG
,
"onCreate - set content view\n"
);
setContentView
(
new
BitmapView
());
spawnMain
();
spawnMain
();
}
}
catch
(
Exception
e
)
{
catch
(
Exception
e
)
{
e
.
printStackTrace
(
System
.
err
);
e
.
printStackTrace
(
System
.
err
);
finish
();
finish
();
}
}
Log
.
i
(
TAG
,
"onCreate - set content view\n"
);
setContentView
(
new
BitmapView
());
}
}
class
BitmapView
extends
android
.
view
.
View
class
BitmapView
extends
android
.
view
.
View
...
@@ -305,6 +306,7 @@ public class Desktop
...
@@ -305,6 +306,7 @@ public class Desktop
if
(
mBitmap
==
null
)
{
if
(
mBitmap
==
null
)
{
Log
.
i
(
TAG
,
"calling Bitmap.createBitmap("
+
getWidth
()
+
", "
+
getHeight
()
+
", Bitmap.Config.ARGB_8888)"
);
Log
.
i
(
TAG
,
"calling Bitmap.createBitmap("
+
getWidth
()
+
", "
+
getHeight
()
+
", Bitmap.Config.ARGB_8888)"
);
mBitmap
=
Bitmap
.
createBitmap
(
getWidth
(),
getHeight
(),
Bitmap
.
Config
.
ARGB_8888
);
mBitmap
=
Bitmap
.
createBitmap
(
getWidth
(),
getHeight
(),
Bitmap
.
Config
.
ARGB_8888
);
setViewSize
(
getWidth
(),
getHeight
());
}
}
renderVCL
(
mBitmap
);
renderVCL
(
mBitmap
);
canvas
.
drawBitmap
(
mBitmap
,
0
,
0
,
null
);
canvas
.
drawBitmap
(
mBitmap
,
0
,
0
,
null
);
...
...
vcl/android/androidinst.cxx
Dosyayı görüntüle @
eb37322f
...
@@ -43,6 +43,9 @@
...
@@ -43,6 +43,9 @@
static
bool
bHitIdle
=
false
;
static
bool
bHitIdle
=
false
;
// Horrible hack
static
int
viewWidth
=
1
,
viewHeight
=
1
;
class
AndroidSalData
:
public
SalGenericData
class
AndroidSalData
:
public
SalGenericData
{
{
public
:
public
:
...
@@ -735,6 +738,8 @@ public:
...
@@ -735,6 +738,8 @@ public:
pSysParent
)
pSysParent
)
{
{
enableDamageTracker
();
enableDamageTracker
();
if
(
pParent
==
NULL
&&
viewWidth
>
1
&&
viewHeight
>
1
)
SetPosSize
(
0
,
0
,
viewWidth
,
viewHeight
,
SAL_FRAME_POSSIZE_WIDTH
|
SAL_FRAME_POSSIZE_HEIGHT
);
}
}
virtual
void
GetWorkArea
(
Rectangle
&
rRect
)
virtual
void
GetWorkArea
(
Rectangle
&
rRect
)
...
@@ -962,4 +967,15 @@ typedef struct ANativeWindow_Buffer {
...
@@ -962,4 +967,15 @@ typedef struct ANativeWindow_Buffer {
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
}
}
extern
"C"
SAL_JNI_EXPORT
void
JNICALL
Java_org_libreoffice_experimental_desktop_Desktop_setViewSize
(
JNIEnv
*
/* env */
,
jobject
/* object */
,
jint
width
,
jint
height
)
{
// Horrible
viewWidth
=
width
;
viewHeight
=
height
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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