This commit is contained in:
r-ca 2024-01-09 17:05:25 +09:00
parent 513a91b41e
commit 1805cd7d73
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -119,7 +119,17 @@ public class DocumentProcessorImpl implements DocumentProcessor{
} }
@Override @Override
public void addNewPageAfterIndex(Bitmap bitmap, int index) { public void addNewPageAfterIndex(Bitmap bitmap, int index) throws Exception {
logger.debug("addNewPageAfterIndex", "called");
String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする
this.fileManager.getNewInstance().createDirectoryIfNotExist(DEFAULT_SAVE_DIR).resolve(DEFAULT_SAVE_DIR).saveBitmap(bitmap, filename);
XmlMetaPageModel xmlMetaPageModel = new XmlMetaPageModel();
xmlMetaPageModel.setFilename(filename);
xmlMetaPageModel.setIndex(index + 1);
xmlMetaModel.getPages().add(index, xmlMetaPageModel);
} }