1.1 --- a/xml.cpp Wed Mar 08 12:59:08 2006 +0000
1.2 +++ b/xml.cpp Tue Mar 14 14:27:04 2006 +0000
1.3 @@ -160,7 +160,7 @@
1.4 if (!atts.value( "textColor").isEmpty() )
1.5 {
1.6 col.setNamedColor(atts.value("textColor"));
1.7 - lastBranch->setColor(col ,false );
1.8 + lastBranch->setColor(col );
1.9 }
1.10 } else if ( eName == "note" && state == StateMapCenter)
1.11 { // only for backward compatibility (<1.4.6). Use htmlnote now.
1.12 @@ -229,7 +229,7 @@
1.13 if (!atts.value( "textColor").isEmpty() )
1.14 {
1.15 col.setNamedColor(atts.value("textColor"));
1.16 - lastBranch->setColor(col ,false );
1.17 + lastBranch->setColor(col );
1.18 }
1.19 } else if ( eName == "note" && state == StateBranch)
1.20 {
1.21 @@ -383,22 +383,26 @@
1.22
1.23 bool mapBuilderHandler::fatalError( const QXmlParseException& exception )
1.24 {
1.25 - errorProt += QString( "fatal parsing error: %1 in line %2, column %3\n")
1.26 + errorProt += QString( "Fatal parsing error: %1 in line %2, column %3\n")
1.27 .arg( exception.message() )
1.28 .arg( exception.lineNumber() )
1.29 .arg( exception.columnNumber() );
1.30 - /* FIXME Testing only
1.31 - errorProt += exception.publicId ()+"\n";
1.32 - errorProt += exception.systemId()+"\n";
1.33 -
1.34 // Try to read the bogus line
1.35 - int i=0;
1.36 QString s;
1.37 - if (loadStringFromDisk (,s))
1.38 + if (loadStringFromDisk (inputFile,s))
1.39 {
1.40 - errorProt +=
1.41 - }
1.42 -*/
1.43 + QStringList sl=QStringList::split ("\n",s);
1.44 + int i=1;
1.45 + QStringList::Iterator it = sl.begin();
1.46 + while (i<exception.lineNumber())
1.47 + {
1.48 + it++;
1.49 + i++;
1.50 + }
1.51 + s=*it;
1.52 + s.insert (exception.columnNumber()-1,"<ERROR>");
1.53 + errorProt+=s;
1.54 + }
1.55 return QXmlDefaultHandler::fatalError( exception );
1.56 }
1.57
1.58 @@ -413,6 +417,11 @@
1.59 tmpDir=tp;
1.60 }
1.61
1.62 +void mapBuilderHandler::setInputFile (QString f)
1.63 +{
1.64 + inputFile=f;
1.65 +}
1.66 +
1.67 void mapBuilderHandler::setLoadMode (const LoadMode &lm)
1.68 {
1.69 loadMode=lm;
1.70 @@ -450,12 +459,16 @@
1.71 return false; // Couldn't read relPos
1.72 }
1.73 }
1.74 - if (!a.value( "scrolled").isEmpty() )
1.75 - lastBranch->toggleScroll();
1.76 if (!a.value( "url").isEmpty() )
1.77 lastBranch->setURL (a.value ("url"));
1.78 if (!a.value( "vymLink").isEmpty() )
1.79 lastBranch->setVymLink (a.value ("vymLink"));
1.80 + if (!a.value( "hideInExport").isEmpty() )
1.81 + if (a.value("hideInExport")=="true")
1.82 + lastBranch->setHideInExport(true);
1.83 +
1.84 + if (!a.value( "scrolled").isEmpty() )
1.85 + lastBranch->toggleScroll();
1.86 if (!a.value( "frameType").isEmpty() )
1.87 lastBranch->setFrameType (a.value("frameType"));
1.88