1.1 --- a/exports.cpp Tue Mar 14 14:27:04 2006 +0000
1.2 +++ b/exports.cpp Thu Mar 23 12:38:54 2006 +0000
1.3 @@ -131,30 +131,27 @@
1.4 bo=mapCenter->first();
1.5 while (bo)
1.6 {
1.7 - if (!bo->hideInExport())
1.8 + // Make indentstring
1.9 + for (i=0;i<bo->getDepth();i++) actIndent+= indentPerDepth;
1.10 +
1.11 + if (bo->getDepth()==0)
1.12 {
1.13 - // Make indentstring
1.14 - for (i=0;i<bo->getDepth();i++) actIndent+= indentPerDepth;
1.15 -
1.16 - if (bo->getDepth()==0)
1.17 - {
1.18 - ts << (bo->getHeading()+ "\n");
1.19 - for (j=0;j<bo->getHeading().length();j++) ts<<"=";
1.20 - ts << "\n";
1.21 - } else if (bo->getDepth()==1)
1.22 - ts << ("\n"+getSectionString(bo) + bo->getHeading()+ "\n");
1.23 - else if (bo->getDepth()==2)
1.24 - ts << (actIndent + " o " + bo->getHeading()+ "\n");
1.25 - else
1.26 - ts << (actIndent + " - " + bo->getHeading()+ "\n");
1.27 -
1.28 - // If necessary, write note
1.29 - if (!bo->getNote().isEmpty())
1.30 - {
1.31 - s =bo->getNoteASCII();
1.32 - s=s.replace ("\n","\n"+actIndent);
1.33 - ts << (s+"\n\n");
1.34 - }
1.35 + ts << (bo->getHeading()+ "\n");
1.36 + for (j=0;j<bo->getHeading().length();j++) ts<<"=";
1.37 + ts << "\n";
1.38 + } else if (bo->getDepth()==1)
1.39 + ts << ("\n"+getSectionString(bo) + bo->getHeading()+ "\n");
1.40 + else if (bo->getDepth()==2)
1.41 + ts << (actIndent + " o " + bo->getHeading()+ "\n");
1.42 + else
1.43 + ts << (actIndent + " - " + bo->getHeading()+ "\n");
1.44 +
1.45 + // If necessary, write note
1.46 + if (!bo->getNote().isEmpty())
1.47 + {
1.48 + s =bo->getNoteASCII();
1.49 + s=s.replace ("\n","\n"+actIndent);
1.50 + ts << (s+"\n\n");
1.51 }
1.52 bo=bo->next();
1.53 actIndent="";
1.54 @@ -226,31 +223,28 @@
1.55 BranchObj *bo;
1.56 bo=mapCenter->first();
1.57 while (bo) {
1.58 - if (!bo->hideInExport())
1.59 - {
1.60 - if (bo->getDepth()==0);
1.61 - else if (bo->getDepth()==1) {
1.62 - ts << ("\\chapter{" + bo->getHeading()+ "}\n");
1.63 - }
1.64 - else if (bo->getDepth()==2) {
1.65 - ts << ("\\section{" + bo->getHeading()+ "}\n");
1.66 - }
1.67 - else if (bo->getDepth()==3) {
1.68 - ts << ("\\subsection{" + bo->getHeading()+ "}\n");
1.69 - }
1.70 - else if (bo->getDepth()==4) {
1.71 - ts << ("\\subsubsection{" + bo->getHeading()+ "}\n");
1.72 - }
1.73 - else {
1.74 - ts << ("\\paragraph*{" + bo->getHeading()+ "}\n");
1.75 - }
1.76 -
1.77 - // If necessary, write note
1.78 - if (!bo->getNote().isEmpty()) {
1.79 - ts << (bo->getNoteASCII());
1.80 - ts << ("\n");
1.81 - }
1.82 - }
1.83 + if (bo->getDepth()==0);
1.84 + else if (bo->getDepth()==1) {
1.85 + ts << ("\\chapter{" + bo->getHeading()+ "}\n");
1.86 + }
1.87 + else if (bo->getDepth()==2) {
1.88 + ts << ("\\section{" + bo->getHeading()+ "}\n");
1.89 + }
1.90 + else if (bo->getDepth()==3) {
1.91 + ts << ("\\subsection{" + bo->getHeading()+ "}\n");
1.92 + }
1.93 + else if (bo->getDepth()==4) {
1.94 + ts << ("\\subsubsection{" + bo->getHeading()+ "}\n");
1.95 + }
1.96 + else {
1.97 + ts << ("\\paragraph*{" + bo->getHeading()+ "}\n");
1.98 + }
1.99 +
1.100 + // If necessary, write note
1.101 + if (!bo->getNote().isEmpty()) {
1.102 + ts << (bo->getNoteASCII());
1.103 + ts << ("\n");
1.104 + }
1.105 bo=bo->next();
1.106 }
1.107 file.close();
1.108 @@ -279,17 +273,14 @@
1.109 r+="<text:list text:style-name=\"vym-list\">\n";
1.110 while (bo)
1.111 {
1.112 - if (!bo->hideInExport())
1.113 - {
1.114 - r+="<text:list-item><text:p >";
1.115 - r+=quotemeta(bo->getHeading());
1.116 - // If necessary, write note
1.117 - if (!bo->getNote().isEmpty())
1.118 - r+=bo->getNoteOpenDoc();
1.119 - r+="</text:p>";
1.120 - r+=buildList (bo); // recursivly add deeper branches
1.121 - r+="</text:list-item>\n";
1.122 - }
1.123 + r+="<text:list-item><text:p >";
1.124 + r+=quotemeta(bo->getHeading());
1.125 + // If necessary, write note
1.126 + if (!bo->getNote().isEmpty())
1.127 + r+=bo->getNoteOpenDoc();
1.128 + r+="</text:p>";
1.129 + r+=buildList (bo); // recursivly add deeper branches
1.130 + r+="</text:list-item>\n";
1.131 i++;
1.132 bo=current->getBranchNum(i);
1.133 }
1.134 @@ -337,14 +328,11 @@
1.135 while (pagesBO)
1.136 {
1.137 // Add page with list of items
1.138 - if (!pagesBO->hideInExport())
1.139 - {
1.140 - onePage=pageTemplate;
1.141 - onePage.replace ("<!-- INSERT PAGE HEADING -->", quotemeta (pagesBO->getHeading() ) );
1.142 - list=buildList (pagesBO);
1.143 - onePage.replace ("<!-- INSERT LIST -->", list);
1.144 - allPages+=onePage;
1.145 - }
1.146 + onePage=pageTemplate;
1.147 + onePage.replace ("<!-- INSERT PAGE HEADING -->", quotemeta (pagesBO->getHeading() ) );
1.148 + list=buildList (pagesBO);
1.149 + onePage.replace ("<!-- INSERT LIST -->", list);
1.150 + allPages+=onePage;
1.151 j++;
1.152 pagesBO=sectionBO->getBranchNum(j);
1.153 }