diff --git a/.cproject b/.cproject
new file mode 100644
index 0000000..a7451b7
--- /dev/null
+++ b/.cproject
@@ -0,0 +1,235 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..383ef88
--- /dev/null
+++ b/.project
@@ -0,0 +1,71 @@
+
+
+ XmlCopyEditor
+
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+ ?name?
+
+
+
+ org.eclipse.cdt.make.core.append_environment
+ true
+
+
+ org.eclipse.cdt.make.core.buildArguments
+
+
+
+ org.eclipse.cdt.make.core.buildCommand
+ make
+
+
+ org.eclipse.cdt.make.core.buildLocation
+ ${workspace_loc:/XmlCopyEditor/Debug}
+
+
+ org.eclipse.cdt.make.core.contents
+ org.eclipse.cdt.make.core.activeConfigSettings
+
+
+ org.eclipse.cdt.make.core.enableAutoBuild
+ false
+
+
+ org.eclipse.cdt.make.core.enableCleanBuild
+ true
+
+
+ org.eclipse.cdt.make.core.enableFullBuild
+ true
+
+
+ org.eclipse.cdt.make.core.stopOnError
+ true
+
+
+ org.eclipse.cdt.make.core.useDefaultBuildCmd
+ true
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.core.ccnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+
+
diff --git a/src/associatedialog.cpp b/src/associatedialog.cpp
index 213e87e..2338a84 100755
--- a/src/associatedialog.cpp
+++ b/src/associatedialog.cpp
@@ -171,8 +171,12 @@ void AssociateDialog::OnBrowse ( wxCommandEvent& e )
_T ( "" ),
_T ( "" ),
extensionArgument,
+#if wxCHECK_VERSION(2,9,2)
+ wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR
+#else
wxOPEN | wxFILE_MUST_EXIST | wxCHANGE_DIR
- ) );
+#endif
+ ) );
if ( fd->ShowModal() == wxID_OK )
{
diff --git a/src/findreplacepanel.cpp b/src/findreplacepanel.cpp
index 4decba3..718168f 100755
--- a/src/findreplacepanel.cpp
+++ b/src/findreplacepanel.cpp
@@ -158,7 +158,11 @@ void FindReplacePanel::OnReplace ( wxCommandEvent& event )
replaceEvent.SetFlags ( wxFR_DOWN );
replaceEvent.SetFindString ( findEdit->GetValue() );
replaceEvent.SetReplaceString ( replaceEdit->GetValue() );
+#if wxCHECK_VERSION(2,9,2)
+ parent->ProcessWindowEvent( replaceEvent );
+#else
parent->ProcessEvent ( replaceEvent );
+#endif
}
void FindReplacePanel::OnReplaceAll ( wxCommandEvent& event )
@@ -167,7 +171,11 @@ void FindReplacePanel::OnReplaceAll ( wxCommandEvent& event )
replaceAllEvent.SetFlags ( wxFR_DOWN );
replaceAllEvent.SetFindString ( findEdit->GetValue() );
replaceAllEvent.SetReplaceString ( replaceEdit->GetValue() );
+#if wxCHECK_VERSION(2,9,2)
+ parent->ProcessWindowEvent( replaceAllEvent );
+#else
parent->ProcessEvent ( replaceAllEvent );
+#endif
}
void FindReplacePanel::focusOnFind()
@@ -214,7 +222,11 @@ void FindReplacePanel::sendFindEvent ( size_t flags )
MyFrame *frame = ( MyFrame * ) parent;
frame->setStrictScrolling ( true );
+#if wxCHECK_VERSION(2,9,2)
+ frame->ProcessWindowEvent(findEvent);
+#else
frame->ProcessEvent ( findEvent ); // was parent->
+#endif
frame->setStrictScrolling ( false );
findData->SetFindString ( findEdit->GetValue() );
diff --git a/src/housestyle.cpp b/src/housestyle.cpp
index 6dce7b6..aa25904 100755
--- a/src/housestyle.cpp
+++ b/src/housestyle.cpp
@@ -17,6 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include
#include
#include "housestyle.h"
#include "readfile.h"
diff --git a/src/res/appicon.ico b/src/res/appicon.ico
new file mode 100644
index 0000000..be1d011
Binary files /dev/null and b/src/res/appicon.ico differ
diff --git a/src/res/appicondoc.ico b/src/res/appicondoc.ico
new file mode 100644
index 0000000..966e8be
Binary files /dev/null and b/src/res/appicondoc.ico differ
diff --git a/src/wrapaspell.cpp b/src/wrapaspell.cpp
index 0c808ff..39cdef6 100755
--- a/src/wrapaspell.cpp
+++ b/src/wrapaspell.cpp
@@ -17,6 +17,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include
#include
#include
#include
diff --git a/src/wrapdaisy.cpp b/src/wrapdaisy.cpp
index c8c1147..262ee1e 100755
--- a/src/wrapdaisy.cpp
+++ b/src/wrapdaisy.cpp
@@ -110,7 +110,11 @@ bool WrapDaisy::run (
if ( !stdStylesheet.empty() ) // stylesheet found
{
// #1: convert to canonical XHTML
- pd->ProcessPendingEvents();
+#if wxCHECK_VERSION(2,9,2)
+ pd->GetEventHandler()->ProcessPendingEvents();
+#else
+ pd->ProcessPendingEvents();
+#endif
while (wxTheApp->Pending())
wxTheApp->Dispatch();
@@ -152,7 +156,11 @@ bool WrapDaisy::run (
if ( suppressOptional )
{
- pd->ProcessPendingEvents();
+#if wxCHECK_VERSION(2,9,2)
+ pd->GetEventHandler()->ProcessPendingEvents();
+#else
+ pd->ProcessPendingEvents();
+#endif
while (wxTheApp->Pending())
wxTheApp->Dispatch();
if ( !pd->Update ( 15, _("Suppressing optional production notes...") ) )
@@ -175,7 +183,11 @@ bool WrapDaisy::run (
if ( quiet )
{
// #1.5: apply quiet setting if req'd
- pd->ProcessPendingEvents();
+#if wxCHECK_VERSION(2,9,2)
+ pd->GetEventHandler()->ProcessPendingEvents();
+#else
+ pd->ProcessPendingEvents();
+#endif
while (wxTheApp->Pending())
wxTheApp->Dispatch();
if ( !pd->Update ( 20, _("De-emphasizing production notes...") ) )
@@ -257,7 +269,11 @@ bool WrapDaisy::run (
}
// copy images
- pd->ProcessPendingEvents();
+#if wxCHECK_VERSION(2,9,2)
+ pd->GetEventHandler()->ProcessPendingEvents();
+#else
+ pd->ProcessPendingEvents();
+#endif
while (wxTheApp->Pending())
wxTheApp->Dispatch();
@@ -292,7 +308,11 @@ bool WrapDaisy::run (
canonicalStream.close();
// #2: convert to DTBook
- pd->ProcessPendingEvents();
+#if wxCHECK_VERSION(2,9,2)
+ pd->GetEventHandler()->ProcessPendingEvents();
+#else
+ pd->ProcessPendingEvents();
+#endif
while (wxTheApp->Pending())
wxTheApp->Dispatch();
@@ -345,7 +365,11 @@ bool WrapDaisy::run (
return false;
// #2.5: create ePub version
- pd->ProcessPendingEvents();
+#if wxCHECK_VERSION(2,9,2)
+ pd->GetEventHandler()->ProcessPendingEvents();
+#else
+ pd->ProcessPendingEvents();
+#endif
while (wxTheApp->Pending())
wxTheApp->Dispatch();
@@ -404,7 +428,11 @@ bool WrapDaisy::run (
// #2.9: convert to RTF
if ( rtf || doc )
{
- pd->ProcessPendingEvents();
+#if wxCHECK_VERSION(2,9,2)
+ pd->GetEventHandler()->ProcessPendingEvents();
+#else
+ pd->ProcessPendingEvents();
+#endif
while (wxTheApp->Pending())
wxTheApp->Dispatch();
@@ -470,7 +498,11 @@ bool WrapDaisy::run (
// #2.9.5: convert to binary Word
// (Win only; otherwise create copy with *.doc extension)
- pd->ProcessPendingEvents();
+#if wxCHECK_VERSION(2,9,2)
+ pd->GetEventHandler()->ProcessPendingEvents();
+#else
+ pd->ProcessPendingEvents();
+#endif
while (wxTheApp->Pending())
wxTheApp->Dispatch();
@@ -521,7 +553,11 @@ bool WrapDaisy::run (
}
// #3: convert to full DAISY book
- pd->ProcessPendingEvents();
+#if wxCHECK_VERSION(2,9,2)
+ pd->GetEventHandler()->ProcessPendingEvents();
+#else
+ pd->ProcessPendingEvents();
+#endif
while (wxTheApp->Pending())
wxTheApp->Dispatch();
@@ -583,7 +619,11 @@ bool WrapDaisy::run (
return true;
// #4: create MP3 album
- pd->ProcessPendingEvents();
+#if wxCHECK_VERSION(2,9,2)
+ pd->GetEventHandler()->ProcessPendingEvents();
+#else
+ pd->ProcessPendingEvents();
+#endif
while (wxTheApp->Pending())
wxTheApp->Dispatch();
@@ -660,7 +700,11 @@ bool WrapDaisy::run (
return false;
- pd->ProcessPendingEvents();
+#if wxCHECK_VERSION(2,9,2)
+ pd->GetEventHandler()->ProcessPendingEvents();
+#else
+ pd->ProcessPendingEvents();
+#endif
while (wxTheApp->Pending())
wxTheApp->Dispatch();
diff --git a/src/xmlcopyeditor.cpp b/src/xmlcopyeditor.cpp
index 2c9274c..3b37e99 100755
--- a/src/xmlcopyeditor.cpp
+++ b/src/xmlcopyeditor.cpp
@@ -197,7 +197,7 @@ MyApp::MyApp() : checker ( NULL ), server ( NULL ), connection ( NULL ),
int fdnull = open ( "/dev/null", O_WRONLY, 0 );
dup2 ( fdnull, STDERR_FILENO );
#endif
- myLocale.Init();
+ //myLocale.Init();
int systemLocale = myLocale.GetSystemLanguage();
switch ( systemLocale )
{
@@ -338,7 +338,11 @@ bool MyApp::OnInit()
wxString argument, what;
wxChar *whatBuffer;
what = _T ( "Data" );
+#if wxCHECK_VERSION(2,9,2)
+ whatBuffer = (wxChar *)what.wchar_str();
+#else
whatBuffer = (wxChar *)what.c_str();
+#endif
if ( this->argc > 1 )
{
for ( int i = 1; i < this->argc; i++ )
@@ -2055,8 +2059,12 @@ void MyFrame::OnImportMSWord ( wxCommandEvent& event )
_T ( "" ),
_T ( "" ),
_T ( "Microsoft Word (*.doc)|*.doc" ),
+#if wxCHECK_VERSION(2,9,2)
+ wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR
+#else
wxOPEN | wxFILE_MUST_EXIST | wxCHANGE_DIR
- ) );
+#endif
+ ) );
if ( fd->ShowModal() == wxID_CANCEL )
return;
@@ -2280,7 +2288,11 @@ void MyFrame::OnExportMSWord ( wxCommandEvent& event )
_T ( "" ),
_T ( "" ),
_T ( "Microsoft Word (*.doc)|*.doc" ),
+#if wxCHECK_VERSION(2,9,2)
+ wxFD_SAVE | wxFD_OVERWRITE_PROMPT));
+#else
wxSAVE | wxOVERWRITE_PROMPT ) );
+#endif
fd->ShowModal();
wxString path = fd->GetPath();
@@ -2891,8 +2903,12 @@ void MyFrame::OnOpen ( wxCommandEvent& event )
defaultDir,
wxEmptyString,
FILE_FILTER,
+#if wxCHECK_VERSION(2,9,2)
+ wxFD_OPEN | wxFD_MULTIPLE | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR
+#else
wxOPEN | wxMULTIPLE | wxFILE_MUST_EXIST | wxCHANGE_DIR
- );
+#endif
+ );
if ( fd->ShowModal() == wxID_CANCEL )
@@ -3122,7 +3138,7 @@ bool MyFrame::openFile ( wxString& fileName, bool largeFile )
nconv = iconv (
cd,
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !wxCHECK_VERSION(2,9,2)
( const char ** )
#endif
&docBuffer,
@@ -3517,7 +3533,11 @@ void MyFrame::saveAs()
defaultDir,
defaultFile,
FILE_FILTER,
+#if wxCHECK_VERSION(2,9,2)
+ wxFD_SAVE | wxFD_OVERWRITE_PROMPT ) );
+#else
wxSAVE | wxOVERWRITE_PROMPT ) );
+#endif
if ( fd->ShowModal() == wxID_CANCEL )
return;
@@ -4737,7 +4757,7 @@ bool MyFrame::saveFile ( XmlDoc *doc, wxString& fileName, bool checkLastModified
finalBuffer = iconvBuffer; // iconvBuffer will be incremented by iconv
size_t nconv;
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !wxCHECK_VERSION(2,9,2)
const char *
#else
char *
@@ -4748,7 +4768,7 @@ bool MyFrame::saveFile ( XmlDoc *doc, wxString& fileName, bool checkLastModified
nconv = iconv (
cd,
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !wxCHECK_VERSION(2,9,2)
( const char ** )
#endif
&utf8BufferPtr,
@@ -6141,7 +6161,11 @@ void MyFrame::OnActivateApp ( wxActivateEvent& event )
void MyFrame::OnIconize ( wxIconizeEvent& event )
{
event.Skip();
+#if wxCHECK_VERSION(2,9,2)
+ if (event.IsIconized())
+#else
if ( event.Iconized() )
+#endif
return;
restoreFocusToNotebook = true;
}
diff --git a/src/xmlcopyeditor.rc b/src/xmlcopyeditor.rc
new file mode 100644
index 0000000..7faa55b
--- /dev/null
+++ b/src/xmlcopyeditor.rc
@@ -0,0 +1,134 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 1 resource.
+//
+
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+
+#define APSTUDIO_READONLY_SYMBOLS
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include
+#undef APSTUDIO_HIDDEN_SYMBOLS
+
+#undef APSTUDIO_READONLY_SYMBOLS
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Additional include files
+//
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// English (United States) resources
+//
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// BITMAP : Bitmap
+//
+
+stock_calc-accept BITMAP "png/stock_calc-accept.bmp"
+stock_calc-accept-green BITMAP "png/stock_calc-accept-green.bmp"
+stock_copy_16 BITMAP "png/stock_copy-16.bmp"
+stock_cut_16 BITMAP "png/stock_cut-16.bmp"
+stock_filters BITMAP "png/stock_filters.bmp"
+stock_help_16 BITMAP "png/stock_help-16.bmp"
+stock_hyperlink BITMAP "png/stock_hyperlink.bmp"
+stock_internet BITMAP "png/stock_internet.bmp"
+stock_internet_16 BITMAP "png/stock_internet-16.bmp"
+stock_new BITMAP "png/stock_new.bmp"
+stock_new_16 BITMAP "png/stock_new-16.bmp"
+stock_open BITMAP "png/stock_open.bmp"
+stock_open_16 BITMAP "png/stock_open-16.bmp"
+stock_paste_16 BITMAP "png/stock_paste-16.bmp"
+stock_print BITMAP "png/stock_print.bmp"
+stock_print_16 BITMAP "png/stock_print-16.bmp"
+stock_print_preview_16 BITMAP "png/stock_print-preview-16.bmp"
+stock_redo_16 BITMAP "png/stock_redo-16.bmp"
+stock_save BITMAP "png/stock_save.bmp"
+stock_save_16 BITMAP "png/stock_save-16.bmp"
+stock_search_16 BITMAP "png/stock_search-16.bmp"
+stock_spellcheck BITMAP "png/stock_spellcheck.bmp"
+stock_spellcheck_16 BITMAP "png/stock_spellcheck-16.bmp"
+stock_undo_16 BITMAP "png/stock_undo-16.bmp"
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// MENUEX : Menu
+//
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// CURSOR : Cursor
+//
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// ICON : Icon
+//
+
+appicon ICON "res/appicon.ico"
+appicondoc ICON "res/appicondoc.ico"
+
+#endif // English (United States) resources
+//////////////////////////////////////////////////////////////////////////////
+//
+// RT_MANIFEST : Manifest
+//
+// Already taken care of by wxWidgets
+
+#ifdef APSTUDIO_INVOKED
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#define APSTUDIO_HIDDEN_SYMBOLS\r\n",
+ "#include \r\n",
+ "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+#ifndef APSTUDIO_INVOKED
+
+#endif // not APSTUDIO_INVOKED
+//
+//////////////////////////////////////////////////////////////////////////////
+
diff --git a/src/xmlschemaparser.cpp b/src/xmlschemaparser.cpp
index 5a63661..909133c 100755
--- a/src/xmlschemaparser.cpp
+++ b/src/xmlschemaparser.cpp
@@ -18,6 +18,7 @@
*/
#include
+#include
#include
#include
#include