Fixed compiling errors for wxWidgets 2.8

This commit is contained in:
Zane U. Ji 2013-12-17 19:21:13 +08:00
parent d58cbef4d7
commit bdd030850e
4 changed files with 11 additions and 10 deletions

View File

@ -449,7 +449,7 @@ bool WrapLibxml::xslt (
CONV ( styleFileName ) );
if ( !cur )
{
nonParserError = "Cannot parse stylesheet";
nonParserError = _("Cannot parse stylesheet");
return false;
}
@ -470,7 +470,7 @@ bool WrapLibxml::xslt (
doc = xmlCtxtReadFile ( ctxt, CONV ( docUrl ), NULL, flags );
if ( !doc )
{
nonParserError = "Cannot parse file";
nonParserError = _("Cannot parse file");
break;
}
@ -481,7 +481,7 @@ bool WrapLibxml::xslt (
res = xsltApplyStylesheet ( cur, doc, NULL );
if ( !res )
{
nonParserError = "Cannot apply stylesheet";
nonParserError = _("Cannot apply stylesheet");
break;
}
@ -565,7 +565,7 @@ int WrapLibxml::saveEncoding (
docPtr = xmlCtxtReadMemory ( ctxt, utf8Buffer, utf8BufferSize,
CONV ( fileNameSource ), "UTF-8", flags );
else
docPtr = xmlCtxtReadFile ( ctxt, fileNameSource.c_str(), NULL, flags );
docPtr = xmlCtxtReadFile ( ctxt, CONV ( fileNameSource ), NULL, flags );
if ( !docPtr )
{
xmlFreeParserCtxt ( ctxt );

View File

@ -206,7 +206,7 @@ wxMemoryBuffer WrapXerces::toString ( const wxString &str )
return buffer;
}
void MySAX2Handler::logError ( const wxString &type, wxLogLevelValues level,
void MySAX2Handler::logError ( const wxString &type, wxLogLevel level,
const SAXParseException& e )
{
mErrors << wxString::Format (

View File

@ -43,7 +43,7 @@ class MySAX2Handler : public DefaultHandler
public:
MySAX2Handler()
{
mEOL = "\n";
mEOL = _T("\n");
resetErrors();
}
void error ( const SAXParseException& e )
@ -77,7 +77,7 @@ class MySAX2Handler : public DefaultHandler
{
return mErrorPosition;
}
void logError ( const wxString &type, wxLogLevelValues level,
void logError ( const wxString &type, wxLogLevel level,
const SAXParseException& e );
void setEOL ( const wxChar *eol )
{
@ -86,7 +86,7 @@ class MySAX2Handler : public DefaultHandler
protected:
wxString mErrors;
std::pair<int, int> mErrorPosition;
wxLogLevelValues mLevel;
wxLogLevel mLevel;
wxString mEOL;
};

View File

@ -3926,7 +3926,7 @@ void MyFrame::OnValidateSchema ( wxCommandEvent& event )
doc->clearErrorIndicators();
wxString fileName = doc->getFullFileName();
wxString utf8Buffer = doc->myGetTextRaw();
std::string utf8Buffer = doc->myGetTextRaw();
std::auto_ptr<WrapXerces> validator ( new WrapXerces() );
if ( !validator->validateMemory ( utf8Buffer.c_str(), utf8Buffer.size(),
fileName ) )
@ -4763,7 +4763,8 @@ bool MyFrame::saveFile ( XmlDoc *doc, wxString& fileName, bool checkLastModified
{
auto_ptr<WrapLibxml> wl ( new WrapLibxml ( libxmlNetAccess ) );
int result = wl->saveEncoding ( utf8Buffer,
doc->getFullFileName(), fileName, NULL, encoding );
doc->getFullFileName(), fileName, NULL,
wxString ( encoding.c_str(), wxConvUTF8 ) );
if ( result == -1 )
{
success = saveRawUtf8 ( fileNameLocal, utf8Buffer, false, isXml );