summaryrefslogtreecommitdiff
path: root/support/dktools/Dk4FcsApp.cpp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-09-20 03:03:26 +0000
committerNorbert Preining <norbert@preining.info>2020-09-20 03:03:26 +0000
commit1f457376b478257b88d4a857f5ec1b6155442dd7 (patch)
tree2a06a60551dea362cf8cb0cb0ba66c78608717c4 /support/dktools/Dk4FcsApp.cpp
parentac690ca29ad5bf8a5203a65fd6252f7b564f4727 (diff)
CTAN sync 202009200303
Diffstat (limited to 'support/dktools/Dk4FcsApp.cpp')
-rw-r--r--support/dktools/Dk4FcsApp.cpp105
1 files changed, 60 insertions, 45 deletions
diff --git a/support/dktools/Dk4FcsApp.cpp b/support/dktools/Dk4FcsApp.cpp
index b92af6f0a3..5d34bb31ca 100644
--- a/support/dktools/Dk4FcsApp.cpp
+++ b/support/dktools/Dk4FcsApp.cpp
@@ -1,51 +1,30 @@
/*
- WARNING: This file was generated by dkct.
- Changes you make here will be lost if dkct is run again!
- You should modify the original source and run dkct on it.
- Original source: Dk4FcsApp.cpt
+Copyright (C) 2015-2020, Dirk Krause
+SPDX-License-Identifier: BSD-3-Clause
*/
/*
-Copyright (C) 2015-2017, Dirk Krause
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above opyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-* Neither the name of the author nor the names of contributors may be used
- to endorse or promote products derived from this software without specific
- prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ WARNING: This file was generated by the dkct program (see
+ http://dktools.sourceforge.net/ for details).
+ Changes you make here will be lost if dkct is run again!
+ You should modify the original source and run dkct on it.
+ Original source: Dk4FcsApp.cpt
*/
/** @file Dk4FcsApp.cpp The Dk4FcsApp module.
*/
-#line 63 "Dk4FcsApp.cpt"
+#line 68 "Dk4FcsApp.cpt"
+#include "dk4conf.h"
#include "wxdkfcs.h"
-#line 69 "Dk4FcsApp.cpt"
+#line 75 "Dk4FcsApp.cpt"
@@ -130,7 +109,7 @@ wxT("Open a file"),
NULL
-#line 156 "Dk4FcsApp.cpt"
+#line 162 "Dk4FcsApp.cpt"
};
@@ -169,7 +148,7 @@ wxT("\n"),
wxT("DK tools, wxWidgets, OpenSSL, libpng, libjpeg, libtiff, zlib."),
/* 10 */
-wxT("http://dktools.sourceforge.net"),
+wxT("http://sourceforge.net/p/dktools/wiki/Home/"),
/* 11 */
wxT("http://www.wxwidgets.org"),
@@ -216,7 +195,7 @@ wxT("Not enough memory (RAM)!"),
NULL
-#line 229 "Dk4FcsApp.cpt"
+#line 235 "Dk4FcsApp.cpt"
};
@@ -239,14 +218,19 @@ dkT("wxdkfcs.htb"),
NULL
-#line 254 "Dk4FcsApp.cpt"
+#line 260 "Dk4FcsApp.cpt"
};
/** Implementation of the wxApp functionality.
*/
+
+#if wxCHECK_VERSION(3,0,0)
+wxIMPLEMENT_APP(Dk4FcsApp);
+#else
IMPLEMENT_APP(Dk4FcsApp)
+#endif
bool
@@ -262,7 +246,7 @@ Dk4FcsApp::OnInit()
-#line 275 "Dk4FcsApp.cpt"
+#line 286 "Dk4FcsApp.cpt"
/* Initialize members. */
pAh = NULL;
pHc = NULL;
@@ -282,7 +266,7 @@ Dk4FcsApp::OnInit()
}
-#line 293 "Dk4FcsApp.cpt"
+#line 304 "Dk4FcsApp.cpt"
/* Add image and file system handlers for online help. */
phPng = new wxPNGHandler();
@@ -292,6 +276,14 @@ Dk4FcsApp::OnInit()
ShowMemoryErrorMessage();
goto finished;
}
+
+ /* CLANG STATIC ANALYSIS COMPLAINS ABOUT A POTENTIAL MEMORY LEAK,
+ because phPng is set using the new operator but there is no
+ matching delete.
+ The handler object is deleted from within wxImage destructor,
+ there is no memory leak.
+ */
+
phXpm = new wxXPMHandler();
if (NULL != phXpm) {
wxImage::AddHandler(phXpm);
@@ -299,6 +291,14 @@ Dk4FcsApp::OnInit()
ShowMemoryErrorMessage();
goto finished;
}
+
+ /* CLANG STATIC ANALYSIS COMPLAINS ABOUT A POTENTIAL MEMORY LEAK,
+ because phXpm is set using the new operator but there is no
+ matching delete.
+ The handler object is deleted from within wxImage destructor,
+ there is no memory leak.
+ */
+
phIco = new wxICOHandler();
if (NULL != phIco) {
wxImage::AddHandler(phIco);
@@ -306,9 +306,17 @@ Dk4FcsApp::OnInit()
ShowMemoryErrorMessage();
goto finished;
}
+
+ /* CLANG STATIC ANALYSIS COMPLAINS ABOUT A POTENTIAL MEMORY LEAK,
+ because phIco is set using the new operator but there is no
+ matching delete.
+ The handler object is deleted from within wxImage destructor,
+ there is no memory leak.
+ */
+
-#line 317 "Dk4FcsApp.cpt"
+#line 352 "Dk4FcsApp.cpt"
phArchiveFs = new wxArchiveFSHandler();
if (NULL != phArchiveFs) {
wxFileSystem::AddHandler(phArchiveFs);
@@ -317,6 +325,13 @@ Dk4FcsApp::OnInit()
goto finished;
}
+ /* CLANG STATIC ANALYSIS COMPLAINS ABOUT A POTENTIAL MEMORY LEAK,
+ because phArchiveFs is set using the new operator but there is no
+ matching delete.
+ The handler object is deleted from within wxFileSystem destructor,
+ there is no memory leak.
+ */
+
pHc = new Dk4WxHelpController();
if (NULL == pHc) {
ShowMemoryErrorMessage();
@@ -328,14 +343,14 @@ Dk4FcsApp::OnInit()
}
-#line 335 "Dk4FcsApp.cpt"
+#line 377 "Dk4FcsApp.cpt"
localizedTexts = pAh->GetStringTable(wxdkfcs_nl_dk[1], wxdkfcs_texts);
if(!(localizedTexts)) { localizedTexts = wxdkfcs_texts; }
-#line 340 "Dk4FcsApp.cpt"
+#line 382 "Dk4FcsApp.cpt"
/* Create and show frame. */
frame = new Dk4FcsFrame(
Dk4FcsFrame_MainWindow,
@@ -354,19 +369,19 @@ Dk4FcsApp::OnInit()
-#line 357 "Dk4FcsApp.cpt"
- frame->Show();
+#line 399 "Dk4FcsApp.cpt"
frame->RestorePosition();
+ frame->Show();
-#line 360 "Dk4FcsApp.cpt"
+#line 402 "Dk4FcsApp.cpt"
back = true;
/* Release resources if initialization failed. */
finished:
if(!(back)) {
-#line 365 "Dk4FcsApp.cpt"
+#line 407 "Dk4FcsApp.cpt"
if (NULL != pHc) {
pHc->Cleanup(); delete(pHc); pHc = NULL;
}
@@ -376,7 +391,7 @@ Dk4FcsApp::OnInit()
}
-#line 373 "Dk4FcsApp.cpt"
+#line 415 "Dk4FcsApp.cpt"
return back;
}