RichText: Qtf: Fixed

git-svn-id: svn://ultimatepp.org/upp/trunk@10198 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-09-01 14:57:10 +00:00
parent 4f9c9794ad
commit 2cbf467ac8
2 changed files with 13 additions and 8 deletions

View file

@ -367,7 +367,6 @@ public:
String& operator=(const String& s) { String0::Assign(s); return *this; }
String& operator=(String&& s) { if(this != &s) { Free(); Pick0(pick(s)); } return *this; }
String& operator=(StringBuffer& b) { *this = String(b); return *this; }
// String& operator<<=(const String& s) { if(this != &s) { String0::Free(); String0::Set0(s, s.GetCount()); } return *this; }
void Shrink() { *this = String(Begin(), GetLength()); }
int GetCharCount() const;

View file

@ -1,4 +1,5 @@
#include "RichText.h"
#include "RichText.h"
namespace Upp {
@ -252,15 +253,20 @@ void RichQtfParser::EndPart()
}
else {
Flush();
bool b = paragraph.format.newpage;
if(breakpage)
paragraph.format.newpage = true;
if(table.GetCount())
if(table.GetCount()) {
RichTable& tab = Table();
RichTable::Format tabformat = tab.GetFormat();
if(breakpage)
tabformat.newpage = true;
tab.SetFormat(tabformat);
table.Top().text.Cat(paragraph, target.GetStyles());
else
}
else {
if(breakpage)
paragraph.format.newpage = true;
target.Cat(paragraph);
paragraph.part.Clear();;
paragraph.format.newpage = b;
}
paragraph.part.Clear();
SetFormat();
breakpage = false;
}