exports.cpp
changeset 746 ee6b0f3a4c2f
parent 742 54d44ecd6097
child 749 9ff332964015
     1.1 --- a/exports.cpp	Mon Mar 23 09:06:51 2009 +0000
     1.2 +++ b/exports.cpp	Thu Mar 26 07:49:17 2009 +0000
     1.3 @@ -129,7 +129,7 @@
     1.4  	caption=vymName+ " -" +QObject::tr("Export as ASCII")+" "+QObject::tr("(still experimental)");
     1.5  }
     1.6  
     1.7 -void ExportASCII::doExport()
     1.8 +void ExportASCII::doExport()	//FIXME-1 segfaults...
     1.9  {
    1.10  	QFile file (outputFile);
    1.11  	if ( !file.open( QIODevice::WriteOnly ) )
    1.12 @@ -189,10 +189,10 @@
    1.13  				}
    1.14  
    1.15  				// If necessary, write note
    1.16 -				if (!bo->getNote().isEmpty())
    1.17 +				if (!cur->getNoteObj().isEmpty())
    1.18  				{
    1.19  					curIndent +="  | ";
    1.20 -					s=bo->getNoteASCII( curIndent, 80);
    1.21 +					s=cur->getNoteASCII( curIndent, 80);
    1.22  					ts << s;
    1.23  				}
    1.24  			}
    1.25 @@ -240,9 +240,9 @@
    1.26  		if (!bo->hasHiddenExportParent() )
    1.27  		{
    1.28  			// If necessary, write note
    1.29 -			if (!bo->getNote().isEmpty())
    1.30 +			if (!cur->getNoteObj().isEmpty())
    1.31  			{
    1.32 -				s =bo->getNoteASCII();
    1.33 +				s =cur->getNoteASCII();
    1.34  				s=s.replace ("\n","\n"+curIndent);
    1.35  				ts << ("\""+s+"\",");
    1.36  			} else
    1.37 @@ -419,8 +419,8 @@
    1.38  			
    1.39  		}
    1.40  		// If necessary, write note
    1.41 -		if (!bo->getNote().isEmpty()) {
    1.42 -		  ts << (bo->getNoteASCII());
    1.43 +		if (!cur->getNoteObj().isEmpty()) {
    1.44 +		  ts << (cur->getNoteASCII());
    1.45  		  ts << ("\n");
    1.46  		}
    1.47  	}
    1.48 @@ -446,6 +446,7 @@
    1.49  
    1.50      uint i=0;
    1.51      bo=current->getFirstBranch();
    1.52 +	TreeItem *ti=bo->getTreeItem();
    1.53      if (bo)
    1.54      {
    1.55  		if (!bo->hasHiddenExportParent() )
    1.56 @@ -457,8 +458,8 @@
    1.57  				r+="<text:list-item><text:p >";
    1.58  				r+=quotemeta(bo->getHeading());
    1.59  				// If necessary, write note
    1.60 -				if (!bo->getNote().isEmpty())
    1.61 -					r+=bo->getNoteOpenDoc();
    1.62 +				if (!ti->getNoteObj().isEmpty())
    1.63 +					r+=ti->getNoteOpenDoc();
    1.64  				r+="</text:p>";
    1.65  				r+=buildList (bo);	// recursivly add deeper branches
    1.66  				r+="</text:list-item>\n";
    1.67 @@ -476,7 +477,7 @@
    1.68  {
    1.69  	QString allPages;
    1.70  
    1.71 -/* FIXME not adapted to multiple mapCenters yet
    1.72 +/* FIXME-2 not adapted to multiple mapCenters yet, see patch already done in 1.12.2...
    1.73  	// Insert new content
    1.74  	content.replace ("<!-- INSERT TITLE -->",quotemeta(mapCenter->getHeading()));
    1.75  	content.replace ("<!-- INSERT AUTHOR -->",quotemeta(mapCenter->getAuthor()));