From eaf4729051a9633de1017fcad5d59489c9d9860a Mon Sep 17 00:00:00 2001 From: Gerald Schmidt Date: Sat, 5 Jul 2008 12:42:15 +0000 Subject: [PATCH] Updated for 1.1.0.7-3 --- src/Makefile.am | 3 +-- src/Makefile.in | 3 +-- src/xmlcopyeditor.cpp | 45 ++----------------------------------------- 3 files changed, 4 insertions(+), 47 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 83a6f35..1847a83 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,7 +25,7 @@ xmlcopyeditor_SOURCES = xmlcopyeditor.cpp associatedialog.cpp casehandler.cpp \ xmlparseschemans.cpp xmlshallowvalidator.cpp wrapxerces.cpp \ findreplacepanel.cpp commandpanel.cpp \ binaryfile.cpp xmlencodingspy.cpp wrapaspell.cpp \ - rulesets filters png rng xpm templates copying help po \ + rulesets png rng xpm templates copying help po \ xmlcopyeditor.spec xmlcopyeditor.png custom.xpm \ xmlcopyeditor.desktop xmlcopyeditor_LDFLAGS = $(WX_LIBS) \ @@ -33,7 +33,6 @@ xmlcopyeditor_LDFLAGS = $(WX_LIBS) \ nobase_xmlcopyeditor_DATA = png/*.png \ rulesets/*.* \ - filters/*.* \ rng/*.rng \ rng/*.rnc \ rng/exclude/*.rng \ diff --git a/src/Makefile.in b/src/Makefile.in index fb118a1..063f1bd 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -210,7 +210,7 @@ xmlcopyeditor_SOURCES = xmlcopyeditor.cpp associatedialog.cpp casehandler.cpp \ xmlparseschemans.cpp xmlshallowvalidator.cpp wrapxerces.cpp \ findreplacepanel.cpp commandpanel.cpp \ binaryfile.cpp xmlencodingspy.cpp wrapaspell.cpp \ - rulesets filters png rng xpm templates copying help po \ + rulesets png rng xpm templates copying help po \ xmlcopyeditor.spec xmlcopyeditor.png custom.xpm \ xmlcopyeditor.desktop @@ -219,7 +219,6 @@ xmlcopyeditor_LDFLAGS = $(WX_LIBS) \ nobase_xmlcopyeditor_DATA = png/*.png \ rulesets/*.* \ - filters/*.* \ rng/*.rng \ rng/*.rnc \ rng/exclude/*.rng \ diff --git a/src/xmlcopyeditor.cpp b/src/xmlcopyeditor.cpp index 23e18d0..a55fe61 100755 --- a/src/xmlcopyeditor.cpp +++ b/src/xmlcopyeditor.cpp @@ -3250,53 +3250,12 @@ void MyFrame::OnSpelling ( wxCommandEvent& event ) std::string rawBufferUtf8; getRawText ( doc, rawBufferUtf8 ); - - // handle unusual encodings - if ( !XmlEncodingHandler::setUtf8 ( rawBufferUtf8 ) ) - { - encodingMessage(); - return; - } - - WrapTempFileName tempFileName ( doc->getFullFileName() ); - - ofstream rawBufferStream ( tempFileName.name().c_str() ); - if ( !rawBufferStream ) - return; - - rawBufferStream << rawBufferUtf8; - rawBufferStream.close(); - - auto_ptr wl ( new WrapLibxml ( libxmlNetAccess, catalogPath ) ); - - bool success = wl->parse ( tempFileName.name(), true ); - - std::string bufferParameterUtf8; - - if ( !success ) - { - statusProgress ( wxEmptyString ); - std::string error = wl->getLastError(); - wxString wideError = wxString ( error.c_str(), wxConvUTF8, error.size() ); - wideError.Prepend ( _ ( "Checking document in read-only mode: " ) ); - messagePane ( wideError, CONST_WARNING ); - - if ( !ReadFile::run ( tempFileName.name(), bufferParameterUtf8 ) ) - return; - std::auto_ptr we ( new WrapExpat() ); - bufferParameterUtf8 = we->xmliseTextNode ( bufferParameterUtf8 ); - bufferParameterUtf8.insert ( 0, "" ); - bufferParameterUtf8 += ""; - } - else - { - bufferParameterUtf8 = wl->getOutput(); - } + bool success = true; // always true for now: well-formedness not req'd auto_ptr sd ( new StyleDialog ( this, wxICON ( appicon ), - bufferParameterUtf8, + rawBufferUtf8, doc->getShortFileName(), ruleSetDir, filterDir,