diff --git a/uppsrc/Report/Report.cpp b/uppsrc/Report/Report.cpp index 02e29a2fd..1471cc192 100644 --- a/uppsrc/Report/Report.cpp +++ b/uppsrc/Report/Report.cpp @@ -2,7 +2,7 @@ NAMESPACE_UPP -#define LLOG(x) DLOG(x) +#define LLOG(x) // DLOG(x) Report::Report() { @@ -66,10 +66,12 @@ void Report::StartPage(int i) { DrawingDraw dw(GetSize()); page.At(i) = dw; - LLOG("Creating page " << i); + LLOG("Start page " << i); Create(GetSize()); WhenPage(); + LLOG("Paint header"); PaintHF(*this, 0, header, i); + LLOG("Paint footer"); PaintHF(*this, GetSize().cy - footercy, footer, i); y = GetPageRect().top; } @@ -154,6 +156,7 @@ Report& Report::Landscape() void Report::Put(const RichText& txt, void *context) { PageY py(pagei, y); + LLOG("Put RichText, py: " << py << ", pagerect: " << GetPageRect()); PaintInfo paintinfo; paintinfo.top = PageY(0, 0); paintinfo.bottom = PageY(INT_MAX, INT_MAX); @@ -162,6 +165,7 @@ void Report::Put(const RichText& txt, void *context) paintinfo.context = context; txt.Paint(*this, py, GetPageRect(), paintinfo); py = txt.GetHeight(py, GetPageRect()); + LLOG("Final pos: " << py); Page(py.page); y = py.y; } diff --git a/uppsrc/RichEdit/Cursor.cpp b/uppsrc/RichEdit/Cursor.cpp index 664ec855a..381d9ee66 100644 --- a/uppsrc/RichEdit/Cursor.cpp +++ b/uppsrc/RichEdit/Cursor.cpp @@ -16,7 +16,7 @@ void RichEdit::FinishNF() } else if(p.table != anchorp.table) { - if(text.GetRichPos(anchor, 1).table == 1 && anchor < cursor) { + if(anchor == 0 && anchorp.level == 1 && text.GetRichPos(anchor, 1).table == 1 && anchor < cursor) { begtabsel = true; anchor = 0; } diff --git a/uppsrc/RichEdit/Mouse.cpp b/uppsrc/RichEdit/Mouse.cpp index 43eaf0c9e..dfae3cf8b 100644 --- a/uppsrc/RichEdit/Mouse.cpp +++ b/uppsrc/RichEdit/Mouse.cpp @@ -150,8 +150,8 @@ void RichEdit::MouseMove(Point p, dword flags) for(int i = 0; i < tabmove.column; i++) nl += fmt.column[i]; int xn = fmt.column[tabmove.column] + fmt.column[tabmove.column + 1]; - int xl = tabmove.left + tabmove.cx * nl / sum + 120; - int xh = tabmove.left + tabmove.cx * (nl + xn) / sum - 120; + int xl = tabmove.left + tabmove.cx * nl / sum + 12; + int xh = tabmove.left + tabmove.cx * (nl + xn) / sum - 12; if(xl >= xh) return; int xx = minmax(GetSnapX(p.x) - tabmove.delta, xl, xh) - tabmove.left; diff --git a/uppsrc/RichEdit/RichEdit.t b/uppsrc/RichEdit/RichEdit.t index fc3c5ed96..71a06590f 100644 --- a/uppsrc/RichEdit/RichEdit.t +++ b/uppsrc/RichEdit/RichEdit.t @@ -1224,6 +1224,26 @@ trTR("H\303\274cre \303\266zellikleri") zhCN("\345\215\225\345\205\203\346\240\274\345\261\236\346\200\247") zhTW("\345\226\256\346\240\274\345\261\254\346\200\247") +T_("(no change)") +caES("") +csCZ("(ponechat)") +deDE("") +esES("") +fiFI("") +frFR("") +huHU("") +itIT("") +nlNL("") +plPL("") +ptBR("") +roRO("") +ruRU("") +skSK("") +srSP("") +trTR("") +zhCN("") +zhTW("") + // Find.cpp @@ -1979,6 +1999,69 @@ trTR("") zhCN("\346\240\267\345\274\217\351\224\256\346\240\207...") zhTW("\346\250\243\345\274\217\351\215\265..") +T_("Header/Footer..") +caES("") +csCZ("") +deDE("") +esES("") +fiFI("") +frFR("") +huHU("") +itIT("") +nlNL("") +plPL("") +ptBR("") +roRO("") +ruRU("") +skSK("") +srSP("") +trTR("") +zhCN("") +zhTW("") + + +// HeaderFooter.cpp + +T_("Insert page number") +caES("") +csCZ("") +deDE("") +esES("") +fiFI("") +frFR("") +huHU("") +itIT("") +nlNL("") +plPL("") +ptBR("") +roRO("") +ruRU("") +skSK("") +srSP("") +trTR("") +zhCN("") +zhTW("") + +T_("Insert page count") +caES("") +csCZ("") +deDE("") +esES("") +fiFI("") +frFR("") +huHU("") +itIT("") +nlNL("") +plPL("") +ptBR("") +roRO("") +ruRU("") +skSK("") +srSP("") +trTR("") +zhCN("") +zhTW("") + // RichEdit.lay @@ -3382,6 +3465,46 @@ trTR("Sonraki ile birlikte") zhCN("\344\270\216\344\270\213\344\270\200\350\241\214\344\277\235\346\214\201\344\270\200\350\207\264") zhTW("\350\210\207\344\270\213\344\270\200\350\241\214\344\277\235\346\214\201\344\270\200\350\207\264") +T_("Use header") +caES("") +csCZ("") +deDE("") +esES("") +fiFI("") +frFR("") +huHU("") +itIT("") +nlNL("") +plPL("") +ptBR("") +roRO("") +ruRU("") +skSK("") +srSP("") +trTR("") +zhCN("") +zhTW("") + +T_("Use footer") +caES("") +csCZ("") +deDE("") +esES("") +fiFI("") +frFR("") +huHU("") +itIT("") +nlNL("") +plPL("") +ptBR("") +roRO("") +ruRU("") +skSK("") +srSP("") +trTR("") +zhCN("") +zhTW("") + // Obsolete diff --git a/uppsrc/RichEdit/Table.cpp b/uppsrc/RichEdit/Table.cpp index dd3b2e081..eb6796067 100644 --- a/uppsrc/RichEdit/Table.cpp +++ b/uppsrc/RichEdit/Table.cpp @@ -316,8 +316,8 @@ void RichEdit::CellProperties() dlg.align.Set(0, ALIGN_TOP); dlg.align.Set(1, ALIGN_CENTER); dlg.align.Set(2, ALIGN_BOTTOM); - dlg.color.WithVoid().VoidText("(no change)"); - dlg.border.WithVoid().VoidText("(no change)"); + dlg.color.WithVoid().VoidText(t_("(no change)")); + dlg.border.WithVoid().VoidText(t_("(no change)")); if(dlg.Run() != IDOK) return; r.Retrieve(); diff --git a/uppsrc/RichText/HeaderFooter.cpp b/uppsrc/RichText/HeaderFooter.cpp index 0b16050f1..b260c72fa 100644 --- a/uppsrc/RichText/HeaderFooter.cpp +++ b/uppsrc/RichText/HeaderFooter.cpp @@ -38,7 +38,7 @@ Rect RichText::GetPageMinusHeaderFooter(const Rect& page) const } void RichText::PaintHeaderFooter(PageDraw& pw, const Rect& page, const PaintInfo& pi_, - int from_page, int to_page, int page_count) const + int from_page, int to_page) const { Rect rpage = GetPageMinusHeaderFooter(page); if(rpage == page) @@ -46,7 +46,7 @@ void RichText::PaintHeaderFooter(PageDraw& pw, const Rect& page, const PaintInfo PaintInfo pi = pi_; pi.sell = pi.selh = 0; VectorMap vars; - vars.Add("PAGECOUNT", GetHeight(rpage).page); + vars.Add("PAGECOUNT", GetHeight(page).page + 1); for(int i = from_page; i <= to_page; i++) { vars.GetAdd("PAGENUMBER") = i + 1; if(header) { diff --git a/uppsrc/RichText/Text.h b/uppsrc/RichText/Text.h index c64c2bd05..20579e2e8 100644 --- a/uppsrc/RichText/Text.h +++ b/uppsrc/RichText/Text.h @@ -10,7 +10,7 @@ class RichText : public RichTxt, public DeepCopyOption { Rect GetPageMinusHeaderFooter(const Rect& page) const; void PaintHeaderFooter(PageDraw& pw, const Rect& page, const PaintInfo& pi, - int from_page, int to_page, int page_count) const; + int from_page, int to_page) const; struct StyleChangeOp; struct SetStylesOp; diff --git a/uppsrc/RichText/TextPaint.cpp b/uppsrc/RichText/TextPaint.cpp index b950bfc8b..3cbfd0886 100644 --- a/uppsrc/RichText/TextPaint.cpp +++ b/uppsrc/RichText/TextPaint.cpp @@ -35,7 +35,7 @@ void RichText::Paint(PageDraw& w, PageY py, const Rect& page, const PaintInfo& p py.y = ctx.page.top; ctx.py = py; RichTxt::Paint(w, ctx, pi); - PaintHeaderFooter(w, page, pi, from_page, ctx.py.page, 9999); + PaintHeaderFooter(w, page, pi, from_page, ctx.py.page); } void RichText::Paint(PageDraw& w, const Rect& page, const PaintInfo& pi) const @@ -43,7 +43,7 @@ void RichText::Paint(PageDraw& w, const Rect& page, const PaintInfo& pi) const RichContext ctx = Context(page); int from_page = ctx.py.page; RichTxt::Paint(w, ctx, pi); - PaintHeaderFooter(w, page, pi, from_page, ctx.py.page, 9999); + PaintHeaderFooter(w, page, pi, from_page, ctx.py.page); } RichCaret RichText::GetCaret(int pos, const Rect& page) const