From d9aa870e5d509cc7309ab82dd102a937ab58613a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Thu, 9 Feb 2017 04:36:04 -0500 Subject: Imported Upstream version 3.1.1+dfsg1 --- Plugins/PdfExport/PdfExport.pro | 6 ++++-- Plugins/PdfExport/PdfExport_de.ts | 2 +- Plugins/PdfExport/PdfExport_es.ts | 2 +- Plugins/PdfExport/PdfExport_fr.qm | Bin 4045 -> 4075 bytes Plugins/PdfExport/PdfExport_fr.ts | 36 +++++++++++++++++------------------ Plugins/PdfExport/PdfExport_it.ts | 2 +- Plugins/PdfExport/PdfExport_pl.ts | 2 +- Plugins/PdfExport/PdfExport_pt_BR.ts | 2 +- Plugins/PdfExport/PdfExport_ru.ts | 2 +- Plugins/PdfExport/PdfExport_sk.ts | 2 +- Plugins/PdfExport/PdfExport_zh_CN.ts | 2 +- Plugins/PdfExport/pdfexport.cpp | 13 +++++++++---- Plugins/PdfExport/pdfexport.h | 3 ++- Plugins/PdfExport/pdfexport.json | 2 +- Plugins/PdfExport/pdfexport.qrc | 6 ++++++ 15 files changed, 48 insertions(+), 34 deletions(-) (limited to 'Plugins/PdfExport') diff --git a/Plugins/PdfExport/PdfExport.pro b/Plugins/PdfExport/PdfExport.pro index 95848c1..d0818b3 100644 --- a/Plugins/PdfExport/PdfExport.pro +++ b/Plugins/PdfExport/PdfExport.pro @@ -26,10 +26,10 @@ RESOURCES += \ pdfexport.qrc -TRANSLATIONS += PdfExport_it.ts \ +TRANSLATIONS += PdfExport_de.ts \ + PdfExport_it.ts \ PdfExport_zh_CN.ts \ PdfExport_sk.ts \ - PdfExport_de.ts \ PdfExport_ru.ts \ PdfExport_pt_BR.ts \ PdfExport_fr.ts \ @@ -48,3 +48,5 @@ TRANSLATIONS += PdfExport_it.ts \ + + diff --git a/Plugins/PdfExport/PdfExport_de.ts b/Plugins/PdfExport/PdfExport_de.ts index 9f95b41..7498c43 100644 --- a/Plugins/PdfExport/PdfExport_de.ts +++ b/Plugins/PdfExport/PdfExport_de.ts @@ -1,6 +1,6 @@ - + PdfExport diff --git a/Plugins/PdfExport/PdfExport_es.ts b/Plugins/PdfExport/PdfExport_es.ts index 924d991..745a227 100644 --- a/Plugins/PdfExport/PdfExport_es.ts +++ b/Plugins/PdfExport/PdfExport_es.ts @@ -1,6 +1,6 @@ - + PdfExport diff --git a/Plugins/PdfExport/PdfExport_fr.qm b/Plugins/PdfExport/PdfExport_fr.qm index 8e38561..4d1bbc6 100644 Binary files a/Plugins/PdfExport/PdfExport_fr.qm and b/Plugins/PdfExport/PdfExport_fr.qm differ diff --git a/Plugins/PdfExport/PdfExport_fr.ts b/Plugins/PdfExport/PdfExport_fr.ts index 064c5a1..e9c628f 100644 --- a/Plugins/PdfExport/PdfExport_fr.ts +++ b/Plugins/PdfExport/PdfExport_fr.ts @@ -17,13 +17,13 @@ Exported table: %1 - Table exportée: %1 + Table exportée : %1 Table: %1 - Table: %1 + Table : %1 @@ -49,12 +49,12 @@ Exported database: %1 - Base de données exportée: %1 + Base de données exportée : %1 Index: %1 - Index: %1 + Index : %1 @@ -71,7 +71,7 @@ Indexed table - Table indexées + Table indexée @@ -101,12 +101,12 @@ Partial index condition - Condition de l’index partiel + Condition de l’index partiel Trigger: %1 - Déchencheur: %1 + Déchencheur : %1 @@ -153,12 +153,12 @@ View: %1 - Vue: %1 + Vue : %1 Query: - Requête: + Requête : @@ -176,27 +176,27 @@ Page size: - Dimension page: + Dimension page : Right margin: - Marge droite: + Marge droite : Left margin: - Marge gauche: + Marge gauche : Cell padding: - Remplissage cellule: + Remplissage cellule : Limit characters in single cell: - Limite de caractères dans une cellule unique: + Limite de caractères dans une cellule unique : @@ -210,12 +210,12 @@ Bottom margin: - Marge inférieure: + Marge inférieure : Top margin: - Marge supérieure: + Marge supérieure : @@ -230,12 +230,12 @@ Headers background: - Arrière plan des en-têtes: + Arrière plan des en-têtes : NULL value color: - Couleur pour valeur NULL: + Couleur pour valeur NULL : diff --git a/Plugins/PdfExport/PdfExport_it.ts b/Plugins/PdfExport/PdfExport_it.ts index 8288875..913432b 100644 --- a/Plugins/PdfExport/PdfExport_it.ts +++ b/Plugins/PdfExport/PdfExport_it.ts @@ -1,6 +1,6 @@ - + PdfExport diff --git a/Plugins/PdfExport/PdfExport_pl.ts b/Plugins/PdfExport/PdfExport_pl.ts index 5ac637d..e806995 100644 --- a/Plugins/PdfExport/PdfExport_pl.ts +++ b/Plugins/PdfExport/PdfExport_pl.ts @@ -1,6 +1,6 @@ - + PdfExport diff --git a/Plugins/PdfExport/PdfExport_pt_BR.ts b/Plugins/PdfExport/PdfExport_pt_BR.ts index 76e9fff..59df275 100644 --- a/Plugins/PdfExport/PdfExport_pt_BR.ts +++ b/Plugins/PdfExport/PdfExport_pt_BR.ts @@ -1,6 +1,6 @@ - + PdfExport diff --git a/Plugins/PdfExport/PdfExport_ru.ts b/Plugins/PdfExport/PdfExport_ru.ts index 9f14f09..715a6ff 100644 --- a/Plugins/PdfExport/PdfExport_ru.ts +++ b/Plugins/PdfExport/PdfExport_ru.ts @@ -1,6 +1,6 @@ - + PdfExport diff --git a/Plugins/PdfExport/PdfExport_sk.ts b/Plugins/PdfExport/PdfExport_sk.ts index 9a8f3e2..6684b8b 100644 --- a/Plugins/PdfExport/PdfExport_sk.ts +++ b/Plugins/PdfExport/PdfExport_sk.ts @@ -1,6 +1,6 @@ - + PdfExport diff --git a/Plugins/PdfExport/PdfExport_zh_CN.ts b/Plugins/PdfExport/PdfExport_zh_CN.ts index ec250b9..b570ede 100644 --- a/Plugins/PdfExport/PdfExport_zh_CN.ts +++ b/Plugins/PdfExport/PdfExport_zh_CN.ts @@ -1,6 +1,6 @@ - + PdfExport diff --git a/Plugins/PdfExport/pdfexport.cpp b/Plugins/PdfExport/pdfexport.cpp index 38389a1..f47f5a6 100644 --- a/Plugins/PdfExport/pdfexport.cpp +++ b/Plugins/PdfExport/pdfexport.cpp @@ -21,11 +21,12 @@ void PdfExport::deinit() safe_delete(textOption); } -QPagedPaintDevice* PdfExport::createPaintDevice(const QString& documentTitle) +QPagedPaintDevice* PdfExport::createPaintDevice(const QString& documentTitle, bool &takeOwnership) { QPdfWriter* pdfWriter = new QPdfWriter(output); pdfWriter->setTitle(documentTitle); pdfWriter->setCreator(tr("SQLiteStudio v%1").arg(SQLITESTUDIO->getVersionString())); + takeOwnership = true; return pdfWriter; } @@ -309,8 +310,11 @@ bool PdfExport::isBinaryData() const bool PdfExport::beginDoc(const QString& title) { safe_delete(painter); - safe_delete(pagedWriter); - pagedWriter = createPaintDevice(title); + + if (takeDeviceOwnership) + safe_delete(pagedWriter); + + pagedWriter = createPaintDevice(title, takeDeviceOwnership); if (!pagedWriter) return false; @@ -330,7 +334,8 @@ void PdfExport::endDoc() void PdfExport::cleanupAfterExport() { safe_delete(painter); - safe_delete(pagedWriter); + if (takeDeviceOwnership) + safe_delete(pagedWriter); } void PdfExport::setupConfig() diff --git a/Plugins/PdfExport/pdfexport.h b/Plugins/PdfExport/pdfexport.h index 9c7cc62..54239ff 100644 --- a/Plugins/PdfExport/pdfexport.h +++ b/Plugins/PdfExport/pdfexport.h @@ -72,7 +72,7 @@ class PDFEXPORTSHARED_EXPORT PdfExport : public GenericExportPlugin void deinit(); protected: - virtual QPagedPaintDevice* createPaintDevice(const QString& documentTitle); + virtual QPagedPaintDevice* createPaintDevice(const QString& documentTitle, bool& takeOwnership); int lineWidth = 15; @@ -182,6 +182,7 @@ class PDFEXPORTSHARED_EXPORT PdfExport : public GenericExportPlugin CFG_LOCAL(PdfExportConfig, cfg) QPagedPaintDevice* pagedWriter = nullptr; + bool takeDeviceOwnership = true; QPainter* painter = nullptr; QTextOption* textOption = nullptr; QFont stdFont; diff --git a/Plugins/PdfExport/pdfexport.json b/Plugins/PdfExport/pdfexport.json index 9f64d2f..a2ad9c7 100644 --- a/Plugins/PdfExport/pdfexport.json +++ b/Plugins/PdfExport/pdfexport.json @@ -2,7 +2,7 @@ "type": "ExportPlugin", "title": "PDF export", "description": "Provides PDF format for exporting.", - "version": 10001, + "version": 10002, "author": "SalSoft", "gui": true } diff --git a/Plugins/PdfExport/pdfexport.qrc b/Plugins/PdfExport/pdfexport.qrc index 1e079fd..e425878 100644 --- a/Plugins/PdfExport/pdfexport.qrc +++ b/Plugins/PdfExport/pdfexport.qrc @@ -3,6 +3,9 @@ pdfexport.ui + PdfExport_de.qm + + PdfExport_pl.qm PdfExport_ru.qm PdfExport_fr.qm @@ -10,3 +13,6 @@ PdfExport_zh_CN.qm + + + -- cgit v1.2.3