OSDN Git Service

add filechooseroutput
authorankys <ankys@users.sourceforge.jp>
Sat, 16 Jul 2011 07:34:44 +0000 (16:34 +0900)
committerankys <ankys@users.sourceforge.jp>
Sat, 16 Jul 2011 07:34:44 +0000 (16:34 +0900)
src/jp/sourceforge/posterdivider/Lib.java
src/jp/sourceforge/posterdivider/MainFrame.java
src/jp/sourceforge/posterdivider/Message.properties
src/jp/sourceforge/posterdivider/Message_ja.properties

index 54fd0e2..26d3e16 100644 (file)
@@ -153,6 +153,14 @@ class Lib {
        }
     }
 
+    public static String fileGetCanonicalPath(File file) {
+       try {
+           return file.getCanonicalPath();
+       } catch (Exception ex) {
+           return file.getAbsolutePath();
+       }
+    }
+
        public static byte[] FileReadAllBytes(File file) throws Exception {
                // TODO:
                FileInputStream is;
index a231c12..f1a75f5 100644 (file)
@@ -32,6 +32,7 @@ import javax.swing.JLabel;
 import javax.swing.JMenu;
 import javax.swing.JMenuBar;
 import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JTextField;
 import javax.swing.KeyStroke;
@@ -40,8 +41,9 @@ import javax.swing.filechooser.FileFilter;
 public class MainFrame extends JFrame {
        private static final long serialVersionUID = 1L;
 
-       // Components
+    // Components
     private JFileChooser fileChooserSrcFile;
+    private JFileChooser fileChooserOutputFile;
        private JLabel labelSrcFile;
        private JTextField textFieldSrcFileName;
        private JLabel labelSrcFileType;
@@ -81,7 +83,7 @@ public class MainFrame extends JFrame {
        private CanvasPreview canvasPreview;
        private JLabel labelOutputFileName;
        private JTextField textFieldOutputFileName;
-       private JLabel labelMessage;
+    //private JLabel labelMessage;
        private JButton buttonOutput;
 
        // Variables
@@ -111,204 +113,188 @@ public class MainFrame extends JFrame {
        private float paperMargin;
        private ArrayList<Double> listPaperMarginUnit = new ArrayList<Double>();
 
-       private String generateFileName(String str) {
-               str = str.replace("{pwd}", System.getProperty("user.dir"));
-               if (this.srcFile != null) {
-                       str = str.replace("{input}", this.srcFile.getName());
-               }
-               str = str.replace("{date}", new SimpleDateFormat("yyyyMMddHHmmss")
-                               .format(new Date()));
-               return str;
+    private String generateFileName(String str) {
+       str = str.replace("{pwd}", System.getProperty("user.dir"));
+       if (this.srcFile != null) {
+           str = str.replace("{input}", this.srcFile.getName());
        }
-
+       str = str.replace("{date}", new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()));
+       return str;
+    }
+    
     public File getSrcFile() {
        return this.srcFile;
     }
-       public boolean checkFileLoaded() {
-               return this.ic != null;
+    public boolean checkFileLoaded() {
+       return this.ic != null;
+    }
+    
+    private void simulateOutput() {
+       // 設定値が変更されたときに canvasPreview 等を更新する
+       
+       //labelMessage.setText("");
+       
+       PdfGenerator.CreatePosterArgs args = new PdfGenerator.CreatePosterArgs();
+       args.setSrcRect(srcLeft, srcBottom, srcRight, srcTop);
+       args.setPosterSize(posterWidth, posterHeight);
+       args.setPaperSize(paperWidth, paperHeight);
+       args.setMargin(paperMargin, paperMargin, paperMargin, paperMargin);
+       
+       int outputPaperCount = PdfGenerator.simulateOutputPaperCount(args);
+       numberFieldOutputPaperCount.setValue(outputPaperCount);
+       
+       canvasPreview.setArgs(args);
+       canvasPreview.repaint();
+    }
+    
+    private void optimizePaperRotated() {
+       // 出力枚数が少なくなるように印刷用紙の向きを更新する
+       
+       PdfGenerator.CreatePosterArgs args1 = new PdfGenerator.CreatePosterArgs();
+       args1.setSrcRect(srcLeft, srcBottom, srcRight, srcTop);
+       args1.setPosterSize(posterWidth, posterHeight);
+       args1.setPaperSize(paperWidth, paperHeight);
+       args1.setMargin(paperMargin, paperMargin, paperMargin, paperMargin);
+       int outputPaperCount1 = PdfGenerator.simulateOutputPaperCount(args1);
+       if (outputPaperCount1 < 0) {
+           // 不正なとき
+           outputPaperCount1 = Integer.MAX_VALUE;
        }
-
-       private void simulateOutput() {
-               // 設定値が変更されたときに canvasPreview 等を更新する
-
-               labelMessage.setText("");
-
-               PdfGenerator.CreatePosterArgs args = new PdfGenerator.CreatePosterArgs();
-               args.setSrcRect(srcLeft, srcBottom, srcRight, srcTop);
-               args.setPosterSize(posterWidth, posterHeight);
-               args.setPaperSize(paperWidth, paperHeight);
-               args.setMargin(paperMargin, paperMargin, paperMargin, paperMargin);
-
-               int outputPaperCount = PdfGenerator.simulateOutputPaperCount(args);
-               numberFieldOutputPaperCount.setValue(outputPaperCount);
-
-               canvasPreview.setArgs(args);
-               canvasPreview.repaint();
+       
+       PdfGenerator.CreatePosterArgs args2 = new PdfGenerator.CreatePosterArgs();
+       args2.setSrcRect(srcLeft, srcBottom, srcRight, srcTop);
+       args2.setPosterSize(posterWidth, posterHeight);
+       args2.setPaperSize(paperHeight, paperWidth); // 印刷用紙を回転する
+       args2.setMargin(paperMargin, paperMargin, paperMargin, paperMargin);
+       int outputPaperCount2 = PdfGenerator.simulateOutputPaperCount(args2);
+       if (outputPaperCount2 < 0) {
+           outputPaperCount2 = Integer.MAX_VALUE;
        }
-
-       private void optimizePaperRotated() {
-               // 出力枚数が少なくなるように印刷用紙の向きを更新する
-
-               PdfGenerator.CreatePosterArgs args1 = new PdfGenerator.CreatePosterArgs();
-               args1.setSrcRect(srcLeft, srcBottom, srcRight, srcTop);
-               args1.setPosterSize(posterWidth, posterHeight);
-               args1.setPaperSize(paperWidth, paperHeight);
-               args1.setMargin(paperMargin, paperMargin, paperMargin, paperMargin);
-               int outputPaperCount1 = PdfGenerator.simulateOutputPaperCount(args1);
-               if (outputPaperCount1 < 0) {
-                       // 不正なとき
-                       outputPaperCount1 = Integer.MAX_VALUE;
-               }
-
-               PdfGenerator.CreatePosterArgs args2 = new PdfGenerator.CreatePosterArgs();
-               args2.setSrcRect(srcLeft, srcBottom, srcRight, srcTop);
-               args2.setPosterSize(posterWidth, posterHeight);
-               args2.setPaperSize(paperHeight, paperWidth); // 印刷用紙を回転する
-               args2.setMargin(paperMargin, paperMargin, paperMargin, paperMargin);
-               int outputPaperCount2 = PdfGenerator.simulateOutputPaperCount(args2);
-               if (outputPaperCount2 < 0) {
-                       outputPaperCount2 = Integer.MAX_VALUE;
-               }
-
-               if (outputPaperCount1 > outputPaperCount2
-                               || (outputPaperCount1 == outputPaperCount2 && paperRotated)) {
-                       // 最適化
-                       checkBoxPaperRotate.setSelected(!paperRotated);
-                       checkBoxPaperRotate_itemStateChanged();
-               }
+       
+       if ((outputPaperCount1 > outputPaperCount2)
+           || (outputPaperCount1 == outputPaperCount2 && paperRotated)) {
+           // 最適化
+           checkBoxPaperRotate.setSelected(!paperRotated);
+           checkBoxPaperRotate_itemStateChanged();
        }
-
-       public void outputPdf() {
-               if (!checkFileLoaded()) {
-                       labelMessage.setText(Lib.getMessage("Text.NoInputFiles"));
-                       this.validateTree();
-                       return;
-               }
-
-               PdfGenerator.CreatePosterArgs args = new PdfGenerator.CreatePosterArgs();
-               args.setSrcRect(srcLeft, srcBottom, srcRight, srcTop);
-               args.setPosterSize(posterWidth, posterHeight);
-               args.setPaperSize(paperWidth, paperHeight);
-               args.setMargin(paperMargin, paperMargin, paperMargin, paperMargin);
-               String outputFileName = generateFileName(textFieldOutputFileName
-                               .getText());
-               try {
-                       ByteArrayOutputStream baos = new ByteArrayOutputStream();
-                       PdfGenerator.createPoster(ic, args, baos);
-                       try {
-                               FileOutputStream fos = new FileOutputStream(outputFileName);
-                               baos.writeTo(fos);
-                               fos.close();
-
-                               labelMessage.setText(String.format(
-                                               Lib.getMessage("Text.Saved"), outputFileName));
-                       } catch (IOException ex) {
-                               labelMessage.setText(String.format(Lib
-                                               .getMessage("Text.FailedWrite"), outputFileName));
-                       }
-               } catch (Exception ex) {
-                       labelMessage.setText(Lib.getMessage("Text.FailedGenerate"));
-               }
-               this.validateTree();
+    }
+    
+    public void outputPdf(File file) {
+       if (!checkFileLoaded()) {
+           return;
        }
-
-       private void changePageSuccess(ImageContainer ic) {
-               this.ic = ic;
-
-               comboBoxSrcPageNum.setSelectedIndex(ic.getPageNum() - 1);
-
-               srcImageWidth = ic.getImageWidth();
-               srcImageHeight = ic.getImageHeight();
-               numberFieldSrcImageSize_setValue();
-
-               comboBoxSrcImageSizeUnit.setEnabled(true);
-               checkBoxSrcRectWholeOfPage.setEnabled(true);
-               comboBoxSrcRectUnit.setEnabled(true);
-               buttonPaperOptimize.setEnabled(true);
-
-               canvasPreview.setImageContainer(ic);
-               simulateOutput();
+       
+       PdfGenerator.CreatePosterArgs args = new PdfGenerator.CreatePosterArgs();
+       args.setSrcRect(srcLeft, srcBottom, srcRight, srcTop);
+       args.setPosterSize(posterWidth, posterHeight);
+       args.setPaperSize(paperWidth, paperHeight);
+       args.setMargin(paperMargin, paperMargin, paperMargin, paperMargin);
+       try {
+           ByteArrayOutputStream baos = new ByteArrayOutputStream();
+           PdfGenerator.createPoster(ic, args, baos);
+           try {
+               FileOutputStream fos = new FileOutputStream(file);
+               baos.writeTo(fos);
+               fos.close();
+               
+               //labelMessage.setText(String.format(Lib.getMessage("Text.Saved"), outputFileName));
+           } catch (IOException ex) {
+               showErrorMessage(String.format(Lib.getMessage("Text.FailedWrite"), Lib.fileGetCanonicalPath(file)));
+               //labelMessage.setText(String.format(Lib.getMessage("Text.FailedWrite"), outputFileName));
+           }
+       } catch (Exception ex) {
+           showErrorMessage(Lib.getMessage("Text.FailedGenerate"));
+           //labelMessage.setText(Lib.getMessage("Text.FailedGenerate"));
        }
+       //this.validateTree();
+    }
 
-       public void changePage(int pageNum) {
-               if (fc == null) {
-                       return;
-               }
-               try {
-                       ImageContainer ic = new ImageContainer(fc, pageNum);
-                       changePageSuccess(ic);
-               } catch (Exception ex) {
-
-               }
-               this.validateTree();
+    private void changePageSuccess(ImageContainer ic) {
+       this.ic = ic;
+       
+       comboBoxSrcPageNum.setSelectedIndex(ic.getPageNum() - 1);
+       
+       srcImageWidth = ic.getImageWidth();
+       srcImageHeight = ic.getImageHeight();
+       numberFieldSrcImageSize_setValue();
+       
+       comboBoxSrcImageSizeUnit.setEnabled(true);
+       checkBoxSrcRectWholeOfPage.setEnabled(true);
+       comboBoxSrcRectUnit.setEnabled(true);
+       buttonPaperOptimize.setEnabled(true);
+       buttonOutput.setEnabled(true);
+       
+       canvasPreview.setImageContainer(ic);
+       simulateOutput();
+    }
+    
+    public void changePage(int pageNum) {
+       if (fc == null) {
+           return;
        }
-
-       private void changeFileSuccess(File file, FileContainer fc) {
-               this.srcFile = file;
-               this.fc = fc;
-
-               try {
-                   textFieldSrcFileName.setText(file.getCanonicalPath());
-               } catch (Exception ex) {
-                   textFieldSrcFileName.setText(file.getAbsolutePath());
-               }
-
-               labelSrcFileType.setText(Lib.getFileTypeName(fc.getFileType()));
-
-               comboBoxSrcPageNum_initialize(fc.getPageCount());
-               comboBoxSrcPageNum.setSelectedIndex(0);
-               comboBoxSrcPageNum.setEnabled(fc.getFileType() == Lib.FT_PDF);
-
-               comboBoxSrcImageSizeUnit_initialize(fc.getFileType());
-               comboBoxSrcImageSizeUnit.setSelectedIndex(0);
-
-               comboBoxSrcRectUnit_initialize(fc.getFileType());
-               comboBoxSrcRectUnit.setSelectedIndex(0);
-
-               changePage(comboBoxSrcPageNum.getSelectedIndex() + 1);
-
-               checkBoxSrcRectWholeOfPage.setSelected(true);
-               checkBoxSrcRectWholeOfPage_itemStateChanged();
+       try {
+           ImageContainer ic = new ImageContainer(fc, pageNum);
+           changePageSuccess(ic);
+       } catch (Exception ex) {
+           
        }
-
+       //this.validateTree();
+    }
+    
+    private void changeFileSuccess(File file, FileContainer fc) {
+       this.srcFile = file;
+       this.fc = fc;
+       
+       textFieldSrcFileName.setText(Lib.fileGetCanonicalPath(file));
+       
+       labelSrcFileType.setText(Lib.getFileTypeName(fc.getFileType()));
+       
+       comboBoxSrcPageNum_initialize(fc.getPageCount());
+       comboBoxSrcPageNum.setSelectedIndex(0);
+       comboBoxSrcPageNum.setEnabled(fc.getFileType() == Lib.FT_PDF);
+       
+       comboBoxSrcImageSizeUnit_initialize(fc.getFileType());
+       comboBoxSrcImageSizeUnit.setSelectedIndex(0);
+       
+       comboBoxSrcRectUnit_initialize(fc.getFileType());
+       comboBoxSrcRectUnit.setSelectedIndex(0);
+       
+       changePage(comboBoxSrcPageNum.getSelectedIndex() + 1);
+       
+       checkBoxSrcRectWholeOfPage.setSelected(true);
+       checkBoxSrcRectWholeOfPage_itemStateChanged();
+    }
+    
     public void changeFile(File file) {
        try {
            FileContainer fc = new FileContainer(file);
            changeFileSuccess(file, fc);
        } catch (Exception ex) {
-           String filePath;
-           try {
-               filePath = file.getCanonicalPath();
-           } catch (Exception ex2) {
-               filePath = file.getAbsolutePath();
-           }
-           labelMessage.setText(String.format(Lib.getMessage("Text.FailedOpen"), filePath));
+           showErrorMessage(String.format(Lib.getMessage("Text.FailedOpen"), Lib.fileGetCanonicalPath(file)));
+           //labelMessage.setText(String.format(Lib.getMessage("Text.FailedOpen"), Lib.fileGetCanonicalPath(file)));
        }
-       this.validateTree();
+       //this.validateTree();
     }
-
-       private void updatePosterSize() {
-               // preferredPosterSize から posterSize を更新する
-               // KeepAspectRatio なら srcRect を拡大して preferredPosterSize に入る最大の Size を
-               // posterSize とする
-               posterWidth = preferredPosterWidth;
-               posterHeight = preferredPosterHeight;
-               if (checkBoxPosterSizeKeepAspectRatio.isSelected()) {
-                       if ((srcRight - srcLeft) * preferredPosterHeight > (srcTop - srcBottom)
-                                       * preferredPosterWidth) {
-                               // Src が横長
-                               if (srcRight != srcLeft) {
-                                       posterHeight = posterWidth * (srcTop - srcBottom)
-                                                       / (srcRight - srcLeft);
-                               }
-                       } else {
-                               if (srcTop != srcBottom) {
-                                       posterWidth = posterHeight * (srcRight - srcLeft)
-                                                       / (srcTop - srcBottom);
-                               }
-                       }
+    
+    private void updatePosterSize() {
+       // preferredPosterSize から posterSize を更新する
+       // KeepAspectRatio なら srcRect を拡大して preferredPosterSize に入る最大の Size を
+       // posterSize とする
+       posterWidth = preferredPosterWidth;
+       posterHeight = preferredPosterHeight;
+       if (checkBoxPosterSizeKeepAspectRatio.isSelected()) {
+           if ((srcRight - srcLeft) * preferredPosterHeight > (srcTop - srcBottom) * preferredPosterWidth) {
+               // Src が横長
+               if (srcRight != srcLeft) {
+                   posterHeight = posterWidth * (srcTop - srcBottom) / (srcRight - srcLeft);
+               }
+           } else {
+               if (srcTop != srcBottom) {
+                   posterWidth = posterHeight * (srcRight - srcLeft) / (srcTop - srcBottom);
                }
+           }
        }
+    }
 
        /*
         * private void revisePosterSize(int direction) { // direction は固定する方向
@@ -321,8 +307,11 @@ public class MainFrame extends JFrame {
         * (changed) { numberFieldPosterSize_setValue(); simulateOutput(); } }
         */
 
-    private File fileChooserSrcFile_show()
-    {
+    private void showErrorMessage(String msg) {
+       JOptionPane.showMessageDialog(this, msg, Lib.getMessage("App.LowerTitle"), JOptionPane.ERROR_MESSAGE);
+    }
+
+    private File fileChooserSrcFile_show() {
        if (fileChooserSrcFile.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
            return fileChooserSrcFile.getSelectedFile();
        } else {
@@ -359,9 +348,20 @@ public class MainFrame extends JFrame {
                this.dispose();
        }
 
-       private void menuItemOutput_actionPerformed() {
-               outputPdf();
+    private void menuItemOutput_actionPerformed() {
+       if (!checkFileLoaded()) {
+           //labelMessage.setText(Lib.getMessage("Text.NoInputFiles"));
+           //this.validateTree();
+           return;
+       }
+       
+       String outputFileName = generateFileName(textFieldOutputFileName.getText());
+       fileChooserOutputFile.setSelectedFile(new File(outputFileName));
+       if (fileChooserOutputFile.showSaveDialog(this) != JFileChooser.APPROVE_OPTION) {
+           return;
        }
+       outputPdf(fileChooserOutputFile.getSelectedFile());
+    }
 
        private void menuItemExit_actionPerformed() {
                System.exit(0);
@@ -767,9 +767,20 @@ public class MainFrame extends JFrame {
                optimizePaperRotated();
        }
 
-       private void buttonOutput_actionPerformed() {
-               outputPdf();
+    private void buttonOutput_actionPerformed() {
+       if (!checkFileLoaded()) {
+           //labelMessage.setText(Lib.getMessage("Text.NoInputFiles"));
+           //this.validateTree();
+           return;
+       }
+       
+       String outputFileName = generateFileName(textFieldOutputFileName.getText());
+       fileChooserOutputFile.setSelectedFile(new File(outputFileName));
+       if (fileChooserOutputFile.showSaveDialog(this) != JFileChooser.APPROVE_OPTION) {
+           return;
        }
+       outputPdf(fileChooserOutputFile.getSelectedFile());
+    }
 
        private void numberField_initialize(NumberField numberField) {
                numberField.setColumns(7);
@@ -805,7 +816,6 @@ public class MainFrame extends JFrame {
                        }
                });
 
-               fileChooserSrcFile = new JFileChooser();
                FileFilter fileFilterPdfAndImage = new FileFilter() {
                        public boolean accept(File f) {
                            if(f.isDirectory()) {
@@ -821,9 +831,12 @@ public class MainFrame extends JFrame {
                            return Lib.getMessage("fileFilterPdfAndImage.Description");
                        }
                    };
+               fileChooserSrcFile = new JFileChooser();
                fileChooserSrcFile.addChoosableFileFilter(fileFilterPdfAndImage);
                fileChooserSrcFile.setFileFilter(fileFilterPdfAndImage);
 
+               fileChooserOutputFile = new JFileChooser();
+
                String menuOSName;
                int menuMask;
                switch(Lib.getOS()) {
@@ -852,7 +865,7 @@ public class MainFrame extends JFrame {
                        }
                });
                JMenuItem menuItemOpenFile = new JMenuItem();
-               menuItemOpenFile.setText(Lib.getMessage("menuItemOpenFile.Text" + menuOSName));
+               menuItemOpenFile.setText(Lib.getMessage("menuItemOpenFile.Text" + menuOSName) + "...");
                menuItemOpenFile.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, menuMask));
                menuItemOpenFile.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
@@ -868,7 +881,7 @@ public class MainFrame extends JFrame {
                        }
                });
                JMenuItem menuItemOutput = new JMenuItem();
-               menuItemOutput.setText(Lib.getMessage("menuItemOutput.Text" + menuOSName));
+               menuItemOutput.setText(Lib.getMessage("menuItemOutput.Text" + menuOSName) + "...");
                menuItemOutput.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                                menuItemOutput_actionPerformed();
@@ -1123,10 +1136,11 @@ public class MainFrame extends JFrame {
                textFieldOutputFileName = new JTextField();
                textFieldOutputFileName.setColumns(40);
 
-               labelMessage = new JLabel();
+               //labelMessage = new JLabel();
 
                buttonOutput = new JButton();
-               buttonOutput.setText(Lib.getMessage("buttonOutput.Text"));
+               buttonOutput.setText(Lib.getMessage("buttonOutput.Text") + "...");
+               buttonOutput.setEnabled(false);
                buttonOutput.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                                buttonOutput_actionPerformed();
@@ -1213,14 +1227,14 @@ public class MainFrame extends JFrame {
                JPanel panelOutput = new JPanel();
                switch(Lib.getOS()) {
                case Lib.OS_MAC:
-                   panelOutput.setLayout(new FlowLayout(FlowLayout.RIGHT));
-                   panelOutput.add(labelMessage);
+                   panelOutput.setLayout(new FlowLayout(FlowLayout.RIGHT, 15, 15));
+                   //panelOutput.add(labelMessage);
                    panelOutput.add(buttonOutput);
                    break;
                default:
                    panelOutput.setLayout(new FlowLayout(FlowLayout.LEFT));
                    panelOutput.add(buttonOutput);
-                   panelOutput.add(labelMessage);
+                   //panelOutput.add(labelMessage);
                    break;
                }
 
@@ -1235,7 +1249,7 @@ public class MainFrame extends JFrame {
 
                JPanel panelSouth = new JPanel();
                panelSouth.setLayout(new BoxLayout(panelSouth, BoxLayout.Y_AXIS));
-               panelSouth.add(panelOutputFileName);
+               //panelSouth.add(panelOutputFileName);
                panelSouth.add(panelOutput);
 
                this.setJMenuBar(menuBar);
index 757efab..105af31 100644 (file)
@@ -66,8 +66,8 @@ Str.B5=B5
 Str.B6=B6
 Str.Custom=Custom
 
-Text.NoInputFiles=No Input Files
-Text.Saved=Saved '%s'
-Text.FailedWrite=Failed Write '%s'
+#Text.NoInputFiles=No Input Files
+#Text.Saved=Saved '%s'
+Text.FailedWrite=Failed Write\n%s
 Text.FailedGenerate=Failed Generate
-Text.FailedOpen=Failed Open '%s'
+Text.FailedOpen=Failed Open\n%s
index a7cb4fb..79374bb 100644 (file)
@@ -41,8 +41,8 @@ buttonOutput.Text=出力
 
 Str.Custom=カスタム
 
-Text.NoInputFiles=ファイルが指定されていません
-Text.Saved='%s' に保存しました
-Text.FailedWrite='%s' に書き込めませんでした
+#Text.NoInputFiles=ファイルが指定されていません
+#Text.Saved='%s' に保存しました
+Text.FailedWrite=ファイルに書き込めませんでした\n%s
 Text.FailedGenerate=pdfファイルの生成に失敗しました
-Text.FailedOpen='%s' の読み込みに失敗しました
+Text.FailedOpen=ファイルの読み込みに失敗しました\n%s