From 2cbf467ac8b576c41d3fcbecaf628da5d3b45253 Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 1 Sep 2016 14:57:10 +0000 Subject: [PATCH] RichText: Qtf: Fixed git-svn-id: svn://ultimatepp.org/upp/trunk@10198 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/String.h | 1 - uppsrc/RichText/ParseQtf.cpp | 20 +++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/uppsrc/Core/String.h b/uppsrc/Core/String.h index d243124ff..e6c0fe798 100644 --- a/uppsrc/Core/String.h +++ b/uppsrc/Core/String.h @@ -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; diff --git a/uppsrc/RichText/ParseQtf.cpp b/uppsrc/RichText/ParseQtf.cpp index 22361f8c1..8561365a5 100644 --- a/uppsrc/RichText/ParseQtf.cpp +++ b/uppsrc/RichText/ParseQtf.cpp @@ -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; }