1.1 --- a/exports.cpp Wed Apr 01 15:06:57 2009 +0000
1.2 +++ b/exports.cpp Thu Apr 02 09:46:29 2009 +0000
1.3 @@ -1,4 +1,6 @@
1.4 #include "exports.h"
1.5 +
1.6 +#include "branchitem.h"
1.7 #include "file.h"
1.8 #include "linkablemapobj.h"
1.9 #include "misc.h"
1.10 @@ -143,8 +145,8 @@
1.11 QString s;
1.12 QString curIndent;
1.13 int i;
1.14 - TreeItem *cur=NULL;
1.15 - TreeItem *prev=NULL;
1.16 + BranchItem *cur=NULL;
1.17 + BranchItem *prev=NULL;
1.18 int d;
1.19
1.20 BranchObj *bo;
1.21 @@ -229,8 +231,8 @@
1.22 QString curIndent("");
1.23 int i;
1.24 BranchObj *bo;
1.25 - TreeItem *cur=NULL;
1.26 - TreeItem *prev=NULL;
1.27 + BranchItem *cur=NULL;
1.28 + BranchItem *prev=NULL;
1.29 int d;
1.30 cur=model->next (cur,prev,d);
1.31 while (cur)
1.32 @@ -389,8 +391,8 @@
1.33 // QString curIndent("");
1.34 // int i;
1.35 BranchObj *bo;
1.36 - TreeItem *cur=NULL;
1.37 - TreeItem *prev=NULL;
1.38 + BranchItem *cur=NULL;
1.39 + BranchItem *prev=NULL;
1.40 int d;
1.41 model->next(cur,prev,d);
1.42 while (cur)
1.43 @@ -439,32 +441,30 @@
1.44 {
1.45 }
1.46
1.47 -QString ExportOO::buildList (BranchObj *current)
1.48 +QString ExportOO::buildList (TreeItem *current)
1.49 {
1.50 QString r;
1.51 - BranchObj *bo;
1.52
1.53 uint i=0;
1.54 - bo=current->getFirstBranch();
1.55 - TreeItem *ti=bo->getTreeItem();
1.56 - if (bo)
1.57 + BranchItem *bi=current->getFirstBranch();
1.58 + if (bi)
1.59 {
1.60 - if (!bo->hasHiddenExportParent() )
1.61 + if (true) //if (!bo->hasHiddenExportParent() ) // FIXME-2 use BranchItem...
1.62 {
1.63 // Start list
1.64 r+="<text:list text:style-name=\"vym-list\">\n";
1.65 - while (bo)
1.66 + while (bi)
1.67 {
1.68 r+="<text:list-item><text:p >";
1.69 - r+=quotemeta(bo->getHeading());
1.70 + r+=quotemeta(bi->getHeading());
1.71 // If necessary, write note
1.72 - if (!ti->getNoteObj().isEmpty())
1.73 - r+=ti->getNoteOpenDoc();
1.74 + if (!bi->getNoteObj().isEmpty())
1.75 + r+=bi->getNoteOpenDoc();
1.76 r+="</text:p>";
1.77 - r+=buildList (bo); // recursivly add deeper branches
1.78 + r+=buildList (bi); // recursivly add deeper branches
1.79 r+="</text:list-item>\n";
1.80 i++;
1.81 - bo=current->getBranchNum(i);
1.82 + bi=current->getBranchNum(i);
1.83 }
1.84 r+="</text:list>\n";
1.85 }
1.86 @@ -514,7 +514,7 @@
1.87 // Add page with list of items
1.88 onePage=pageTemplate;
1.89 onePage.replace ("<!-- INSERT PAGE HEADING -->", quotemeta (pagesBO->getHeading() ) );
1.90 - list=buildList (pagesBO);
1.91 + list=buildList (pagesBO->getTreeItem() );
1.92 onePage.replace ("<!-- INSERT LIST -->", list);
1.93 allPages+=onePage;
1.94 j++;