mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
更新実装 WIP
This commit is contained in:
parent
afb40170ca
commit
1e046e7b9e
|
@ -130,7 +130,26 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DocumentProcessor updatePageAtIndex(Bitmap bitmap, int index) {
|
public DocumentProcessor updatePageAtIndex(Bitmap bitmap, int index) {
|
||||||
return null;
|
logger.debug("updatePageAtIndex", "called");
|
||||||
|
String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.fileManager.getNewInstance().createDirectoryIfNotExist(DEFAULT_SAVE_DIR).resolve(DEFAULT_SAVE_DIR).saveBitmap(bitmap, filename);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("updatePageAtIndex", "failed: Unknown error");
|
||||||
|
logger.e_code("d9191286-6092-40b3-80ed-9239106a8c65");
|
||||||
|
// Recover (Undo latest action)
|
||||||
|
lacertaVcs.undo();
|
||||||
|
}
|
||||||
|
|
||||||
|
Page page = new Page();
|
||||||
|
page.setFileName(filename);
|
||||||
|
page.setBitmap(bitmap);
|
||||||
|
this.documentDetail.getPages().set(index, page);
|
||||||
|
|
||||||
|
lacertaVcs.updatePage(index, filename);
|
||||||
|
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue
Block a user