xml-freemind.cpp
changeset 753 25a77484ec72
parent 750 ff3b01ce0960
child 763 8c028a5d9083
     1.1 --- a/xml-freemind.cpp	Thu Apr 02 09:57:47 2009 +0000
     1.2 +++ b/xml-freemind.cpp	Tue Apr 07 16:15:53 2009 +0000
     1.3 @@ -78,14 +78,13 @@
     1.4  
     1.5  		//cout <<"model="<<model<<"   first="<<model->first()<<endl;
     1.6  
     1.7 -		lastBranch=bo->addBranch();
     1.8 +		lastBranchItem=model->createBranch();
     1.9  
    1.10 -		lastBranch->move2RelPos (200,0);
    1.11 -		lastBranch->setHeading ("  ");
    1.12 -		lastBranch=bo->addBranch();
    1.13 -		lastBranch->move2RelPos (-200,0);
    1.14 -		lastBranch->setHeading ("  ");
    1.15 -		lastBranch=bo;
    1.16 +		//FIXME-3 lastBranch->move2RelPos (200,0);
    1.17 +		lastBranchItem->setHeading ("  ");
    1.18 +		//FIXME-3 lastBranch->move2RelPos (-200,0);
    1.19 +		lastBranchItem->setHeading ("  ");
    1.20 +		lastBranchItem=(BranchItem*)lastBranchItem->parent();
    1.21  
    1.22  	} else if ( eName == "node" &&  (state == StateMap || state == StateNode )) 
    1.23  	{
    1.24 @@ -98,7 +97,6 @@
    1.25  				if (lastBranchItem)
    1.26  				{	
    1.27  					lastBranchItem=model->createBranch();
    1.28 -					lastBranch=lastBranchItem->getBranchObj();
    1.29  					readNodeAttr (atts);
    1.30  				}	
    1.31  			} else if (atts.value ("POSITION")=="right")
    1.32 @@ -108,7 +106,6 @@
    1.33  				if (lastBranchItem)
    1.34  				{	
    1.35  					lastBranchItem=model->createBranch();
    1.36 -					lastBranch=lastBranchItem->getBranchObj();
    1.37  					readNodeAttr (atts);
    1.38  				}	
    1.39  			}
    1.40 @@ -117,7 +114,6 @@
    1.41  			if (state!=StateMap)
    1.42  			{
    1.43  				lastBranchItem=model->createBranch();
    1.44 -				lastBranch=lastBranchItem->getBranchObj();
    1.45  			}
    1.46  			readNodeAttr (atts);
    1.47  		}
    1.48 @@ -193,7 +189,7 @@
    1.49  			else if (f=="licq")
    1.50  				v="freemind-licq"; 
    1.51  
    1.52 -			lastBranch->activateStandardFlag( v);
    1.53 +			//FIXME-3 lastBranch->activateStandardFlag( v);
    1.54  		}
    1.55  	} else if ( eName == "arrowlink" && state == StateNode) 
    1.56  	{
    1.57 @@ -221,7 +217,7 @@
    1.58      switch ( state ) 
    1.59  	{
    1.60          case StateNode: 
    1.61 -			lastBranch=(BranchObj*)(lastBranch->getParObj());
    1.62 +			lastBranchItem=(BranchItem*)lastBranchItem->parent();
    1.63              break;
    1.64  		default: 
    1.65  			break;
    1.66 @@ -250,7 +246,7 @@
    1.67          case StateFont: break; 
    1.68          case StateHook: break; 
    1.69          case StateText: 
    1.70 -			lastBranch->getTreeItem()->setNote (ch_simplified);
    1.71 +			lastBranchItem->setNote (ch_simplified);
    1.72  			break; 
    1.73          default: 
    1.74  			return false;
    1.75 @@ -263,8 +259,9 @@
    1.76      return "the document is not in the Freemind file format";
    1.77  }
    1.78  
    1.79 -bool parseFreemindHandler::readNodeAttr (const QXmlAttributes& a)
    1.80 +bool parseFreemindHandler::readNodeAttr (const QXmlAttributes& a)	//FIXME-3
    1.81  {
    1.82 +/*
    1.83  	lastOO=lastBranch;
    1.84  	lastBranchItem=(BranchItem*)(lastBranch->getTreeItem() );
    1.85  
    1.86 @@ -278,7 +275,7 @@
    1.87  
    1.88  	if (!a.value( "LINK").isEmpty() )
    1.89  		lastBranch->setURL (a.value ("LINK"));
    1.90 -
    1.91 +*/
    1.92  	return true;	
    1.93  }
    1.94