OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 156 | Rev 182 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 156 Rev 174
Line 177... Line 177...
177
            return;
177
            return;
178
        }
178
        }
179
 
179
 
180
        try {
180
        try {
181
            if (!useODSViewer) {
181
            if (!useODSViewer) {
-
 
182
                if (exportToPDF || printDocument) {
182
                final Component doc = ComptaPropsConfiguration.getOOConnexion().loadDocument(generatedFile, !showDocument);
183
                    final Component doc = ComptaPropsConfiguration.getOOConnexion().loadDocument(generatedFile, !showDocument);
183
 
184
 
184
                if (printDocument) {
185
                    if (printDocument) {
185
                    Map<String, Object> map = new HashMap<String, Object>();
186
                        Map<String, Object> map = new HashMap<String, Object>();
186
                    map.put("Name", this.printer);
187
                        map.put("Name", this.printer);
Line 191... Line 192...
191
                }
192
                    }
192
                if (!showDocument) {
193
                    if (!showDocument) {
193
                    doc.close();
194
                        doc.close();
194
                }
195
                    }
195
            } else {
196
                } else {
-
 
197
                    openDocument(false);
-
 
198
                }
-
 
199
            } else {
196
                final OpenDocument doc = new OpenDocument(generatedFile);
200
                final OpenDocument doc = new OpenDocument(generatedFile);
197
 
201
 
198
                if (showDocument) {
202
                if (showDocument) {
199
                    showPreviewDocument();
203
                    showPreviewDocument();
200
                }
204
                }
Line 541... Line 545...
541
        }
545
        }
542
 
546
 
543
    }
547
    }
544
 
548
 
545
    public void showPreviewDocument() throws Exception {
549
    public void showPreviewDocument() throws Exception {
-
 
550
        showPreviewDocument(null, null);
-
 
551
    }
-
 
552
 
-
 
553
    public void showPreviewDocument(String actionName, Runnable r) throws Exception {
546
        File f = null;
554
        File f = null;
547
        f = getOrCreateDocumentFile();
555
        f = getOrCreateDocumentFile();
548
        PreviewFrame.show(f);
556
        PreviewFrame.show(f, actionName, r);
549
    }
557
    }
550
 
558
 
551
    public void printDocument() {
559
    public void printDocument() {
552
        printDocument(null);
560
        printDocument(null);
553
    }
561
    }