Code cleanup ahead of 1.1.0.3
This commit is contained in:
parent
50da3b134b
commit
9a5e1b16ec
|
@ -220,7 +220,7 @@ xmlcopyeditor_SOURCES = xmlcopyeditor.cpp associatedialog.cpp casehandler.cpp \
|
|||
xmlassociatexsl.cpp xmlctrl.cpp xmldoc.cpp xmlencodinghandler.cpp xmlfilterreader.cpp \
|
||||
xmlpromptgenerator.cpp xmlrulereader.cpp xmlschemalocator.cpp xmlutf8reader.cpp xsllocator.cpp \
|
||||
wrapexpat.cpp mypropertysheet.cpp rule.cpp housestylewriter.cpp myipc.cpp aboutdialog.cpp pathresolver.cpp mynotebook.cpp \
|
||||
insertpanel.cpp mytoolbar.cpp mymenubar.cpp xmlwordcount.cpp getword.cpp locationpanel.cpp catalogresolver.cpp getlinuxappdir.cpp \
|
||||
insertpanel.cpp xmlwordcount.cpp getword.cpp locationpanel.cpp catalogresolver.cpp getlinuxappdir.cpp \
|
||||
xmlparseschemans.cpp xmlshallowvalidator.cpp wrapxerces.cpp \
|
||||
findreplacepanel.cpp xmlschemaparser.cpp commandpanel.cpp \
|
||||
binaryfile.cpp xmlencodingspy.cpp \
|
||||
|
@ -350,10 +350,8 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/locationpanel.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/myhtmlpane.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/myipc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mymenubar.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mynotebook.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mypropertysheet.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mytoolbar.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nocasecompare.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pathresolver.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readfile.Po@am__quote@
|
||||
|
|
|
@ -4760,7 +4760,10 @@ bool MyFrame::saveFile ( XmlDoc *doc, wxString& fileName, bool checkLastModified
|
|||
doc->SetSavePoint();
|
||||
|
||||
if ( properties.validateAsYouType && isXml )
|
||||
{
|
||||
doc->clearErrorIndicators();
|
||||
doc->shallowValidate ( utf8Buffer.c_str(), utf8Buffer.size() );
|
||||
}
|
||||
|
||||
if ( !unlimitedUndo )
|
||||
doc->EmptyUndoBuffer();
|
||||
|
@ -4895,8 +4898,6 @@ wxMenuBar *MyFrame::getMenuBar()
|
|||
new wxMenuItem ( NULL, ID_GOTO, _ ( "G&o To...\tCtrl+G" ), _ ( "Go To..." ) );
|
||||
gotoItem->SetBitmap ( wxNullBitmap );
|
||||
|
||||
|
||||
|
||||
editMenu->Append ( undoItem );
|
||||
editMenu->Append ( redoItem );
|
||||
editMenu->AppendSeparator();
|
||||
|
@ -5169,9 +5170,9 @@ wxMenuBar *MyFrame::getMenuBar()
|
|||
toolsMenu->Append ( wordCountItem );
|
||||
toolsMenu->AppendSeparator();
|
||||
toolsMenu->Append ( commandItem );
|
||||
toolsMenu->AppendSeparator();
|
||||
|
||||
#ifdef __WXMSW__
|
||||
toolsMenu->AppendSeparator();
|
||||
wxMenuItem *optionsItem =
|
||||
new wxMenuItem (
|
||||
NULL,
|
||||
|
|
|
@ -59,8 +59,8 @@ XmlCtrl::XmlCtrl (
|
|||
basePath ( basePathParameter ),
|
||||
auxPath ( auxPathParameter )
|
||||
{
|
||||
SetEOLMode ( wxSTC_EOL_LF );
|
||||
SetPasteConvertEndings ( true ); // essential to avoid double-spaced paste
|
||||
//SetEOLMode ( wxSTC_EOL_LF );
|
||||
//SetPasteConvertEndings ( true );
|
||||
|
||||
currentMaxLine = 1;
|
||||
validationRequired = dtdFound = false;
|
||||
|
@ -1969,7 +1969,7 @@ bool XmlCtrl::shallowValidate ( int maxLine, bool segmentOnly )
|
|||
parentStartAngleBracket,
|
||||
memory;
|
||||
current = GetCurrentPos();
|
||||
line = LineFromPosition ( current );//PositionFromLine(current);
|
||||
line = LineFromPosition ( current );
|
||||
|
||||
// try to include next line
|
||||
lineEnd = GetLineEndPosition ( line + 1 );
|
||||
|
@ -2022,29 +2022,6 @@ bool XmlCtrl::shallowValidate ( int maxLine, bool segmentOnly )
|
|||
|
||||
return shallowValidate ( bufferUtf8.c_str(), bufferUtf8.size(), startLine,
|
||||
maxLine, columnOffset, segmentOnly );
|
||||
/*
|
||||
bool res = validator->parse(bufferUtf8, (segmentOnly) ? false : true);
|
||||
if (!validator->getOverrideFailure() && (!res || !validator->isValid()))
|
||||
{
|
||||
std::vector<std::pair<int, int> > positionVector = validator->getPositionVector();
|
||||
|
||||
if (res == XML_STATUS_ERROR)
|
||||
{
|
||||
positionVector.push_back(validator->getErrorPosition());
|
||||
}
|
||||
|
||||
std::vector<std::pair<int, int> >::iterator it;
|
||||
for (it = positionVector.begin(); it != positionVector.end(); it++)
|
||||
{
|
||||
int line, column;
|
||||
line = (it->first - 1) + startLine;
|
||||
column = it->second + columnOffset;
|
||||
setErrorIndicator(line, column);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
}
|
||||
|
||||
bool XmlCtrl::shallowValidate ( const char *buffer,
|
||||
|
|
Loading…
Reference in New Issue