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
dbd72b9e
Kaydet (Commit)
dbd72b9e
authored
Kas 27, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
android: reset document dimensions when changing document part
Change-Id: I2f7967ee20ad71b58e2b0dc7f182769499910373
üst
240c6d90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
LOKitTileProvider.java
...OAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
+17
-7
No files found.
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
Dosyayı görüntüle @
dbd72b9e
...
...
@@ -80,6 +80,7 @@ public class LOKitTileProvider implements TileProvider {
Log
.
i
(
LOGTAG
,
"Document part "
+
i
+
" name:'"
+
partName
+
"'"
);
mDocument
.
setPart
(
i
);
resetDocumentSize
();
final
DocumentPartView
partView
=
new
DocumentPartView
(
i
,
partName
,
thumbnail
(
128
));
LibreOfficeMainActivity
.
mAppContext
.
getDocumentPartView
().
add
(
partView
);
}
...
...
@@ -127,20 +128,28 @@ public class LOKitTileProvider implements TileProvider {
return
false
;
}
mWidthTwip
=
mDocument
.
getDocumentWidth
();
mHeightTwip
=
mDocument
.
getDocumentHeight
();
if
(
mWidthTwip
==
0
||
mHeightTwip
==
0
)
{
Log
.
e
(
LOGTAG
,
"Document size zero - last error: "
+
mOffice
.
getError
());
boolean
result
=
resetDocumentSize
();
if
(!
result
)
{
LOKitShell
.
getMainHandler
().
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
LibreOfficeMainActivity
.
mAppContext
.
showAlertDialog
(
"Document
has no size
!"
);
LibreOfficeMainActivity
.
mAppContext
.
showAlertDialog
(
"Document
returned an invalid size or the document is empty
!"
);
}
});
}
return
result
;
}
private
boolean
resetDocumentSize
()
{
mWidthTwip
=
mDocument
.
getDocumentWidth
();
mHeightTwip
=
mDocument
.
getDocumentHeight
();
if
(
mWidthTwip
==
0
||
mHeightTwip
==
0
)
{
Log
.
e
(
LOGTAG
,
"Document size zero - last error: "
+
mOffice
.
getError
());
return
false
;
}
else
{
Log
.
i
(
LOGTAG
,
"
D
ocument size: "
+
mDocument
.
getDocumentWidth
()
+
" x "
+
mDocument
.
getDocumentHeight
());
Log
.
i
(
LOGTAG
,
"
Reset d
ocument size: "
+
mDocument
.
getDocumentWidth
()
+
" x "
+
mDocument
.
getDocumentHeight
());
}
return
true
;
...
...
@@ -235,5 +244,6 @@ public class LOKitTileProvider implements TileProvider {
@Override
public
void
changePart
(
int
partIndex
)
{
mDocument
.
setPart
(
partIndex
);
resetDocumentSize
();
}
}
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