diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2022-04-26 16:43:15 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-04-27 05:51:32 +0200 |
commit | 5453f75a1e682992f3a725781bb563b8cc76cf1b (patch) | |
tree | 8f2d435fc9e70cc57120c41f4f59a1ddd34ea296 | |
parent | e996ad71582ecd4425a1ab0d0347cccf7c7724c2 (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>
-rw-r--r-- | android/source/src/java/org/libreoffice/LOKitTileProvider.java | 6 |
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)){ |