summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-04-26 16:43:15 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2022-04-27 05:51:32 +0200
commit5453f75a1e682992f3a725781bb563b8cc76cf1b (patch)
tree8f2d435fc9e70cc57120c41f4f59a1ddd34ea296 /android
parente996ad71582ecd4425a1ab0d0347cccf7c7724c2 (diff)
android: Slightly clean up style of LOKitTileProvider#resetParts
* Reduce scope of the `parts` variable to the if block * add an emptly line before the next method Change-Id: I22389cb4c9307f6888c4ed836056caf23ce84da6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133450 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'android')
-rw-r--r--android/source/src/java/org/libreoffice/LOKitTileProvider.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/android/source/src/java/org/libreoffice/LOKitTileProvider.java b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
index fa22bc803c9a..0c7931763571 100644
--- a/android/source/src/java/org/libreoffice/LOKitTileProvider.java
+++ b/android/source/src/java/org/libreoffice/LOKitTileProvider.java
@@ -176,9 +176,9 @@ class LOKitTileProvider implements TileProvider {
}
public void resetParts(){
- int parts = mDocument.getParts();
mContext.getDocumentPartView().clear();
if (mDocument.getDocumentType() != Document.DOCTYPE_TEXT) {
+ int parts = mDocument.getParts();
for (int i = 0; i < parts; i++) {
String partName = mDocument.getPartName(i);
@@ -192,7 +192,9 @@ class LOKitTileProvider implements TileProvider {
mContext.getDocumentPartView().add(partView);
}
}
- } public void renamePart(String partName) {
+ }
+
+ public void renamePart(String partName) {
try{
for(int i=0; i<mDocument.getParts(); i++){
if(mContext.getDocumentPartView().get(i).partName.equals(partName)){