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
6ca57cb2
Kaydet (Commit)
6ca57cb2
authored
Eyl 18, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
android: fix thumbnail() to produce a valid bitmap
Change-Id: I578ac9482f334765c71a66421a3fa2dfb85e22b3
üst
58f5e531
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
LOKitTileProvider.java
...OAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
+6
-3
MockTileProvider.java
...LOAndroid3/src/java/org/libreoffice/MockTileProvider.java
+1
-1
No files found.
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
Dosyayı görüntüle @
6ca57cb2
...
@@ -122,9 +122,6 @@ public class LOKitTileProvider implements TileProvider {
...
@@ -122,9 +122,6 @@ public class LOKitTileProvider implements TileProvider {
@Override
@Override
public
Bitmap
thumbnail
()
{
public
Bitmap
thumbnail
()
{
ByteBuffer
buffer
=
ByteBuffer
.
allocateDirect
(
TILE_SIZE
*
TILE_SIZE
*
4
);
Bitmap
bitmap
=
Bitmap
.
createBitmap
(
TILE_SIZE
,
TILE_SIZE
,
Bitmap
.
Config
.
ARGB_8888
);
int
widthPixel
=
getPageWidth
();
int
widthPixel
=
getPageWidth
();
int
heightPixel
=
getPageHeight
();
int
heightPixel
=
getPageHeight
();
...
@@ -138,8 +135,14 @@ public class LOKitTileProvider implements TileProvider {
...
@@ -138,8 +135,14 @@ public class LOKitTileProvider implements TileProvider {
widthPixel
=
(
int
)
(
heightPixel
*
ratio
);
widthPixel
=
(
int
)
(
heightPixel
*
ratio
);
}
}
ByteBuffer
buffer
=
ByteBuffer
.
allocateDirect
(
widthPixel
*
heightPixel
*
4
);
mDocument
.
paintTile
(
buffer
,
widthPixel
,
heightPixel
,
0
,
0
,
(
int
)
mWidthTwip
,
(
int
)
mHeightTwip
);
mDocument
.
paintTile
(
buffer
,
widthPixel
,
heightPixel
,
0
,
0
,
(
int
)
mWidthTwip
,
(
int
)
mHeightTwip
);
Bitmap
bitmap
=
Bitmap
.
createBitmap
(
widthPixel
,
heightPixel
,
Bitmap
.
Config
.
ARGB_8888
);
bitmap
.
copyPixelsFromBuffer
(
buffer
);
if
(
bitmap
==
null
)
{
Log
.
w
(
LOGTAG
,
"Thumbnail not created!"
);
}
return
bitmap
;
return
bitmap
;
}
}
...
...
android/experimental/LOAndroid3/src/java/org/libreoffice/MockTileProvider.java
Dosyayı görüntüle @
6ca57cb2
...
@@ -63,7 +63,7 @@ public class MockTileProvider implements TileProvider {
...
@@ -63,7 +63,7 @@ public class MockTileProvider implements TileProvider {
@Override
@Override
public
Bitmap
thumbnail
()
{
public
Bitmap
thumbnail
()
{
return
null
;
return
layerController
.
getDrawable
(
"dummy_page"
)
;
}
}
@Override
@Override
...
...
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