diff --git a/uppsrc/CtrlLib/ArrayCtrl.cpp b/uppsrc/CtrlLib/ArrayCtrl.cpp index bc03fe28c..80b65ab78 100644 --- a/uppsrc/CtrlLib/ArrayCtrl.cpp +++ b/uppsrc/CtrlLib/ArrayCtrl.cpp @@ -1801,11 +1801,12 @@ bool ArrayCtrl::Key(dword key, int) { if(IsCursor()) { int d = GetEditColumn(); int i = FindEnabled(cursor - 1, -1); - if(i >= 0 && SetCursor0(i)) + if(i >= 0 && SetCursor0(i)) { if(d >= 0) StartEdit(d); else KeyMultiSelect(aanchor, key); + } } else if((IsInserting() || IsAppending()) && IsAppendLine()) diff --git a/uppsrc/CtrlLib/Bar.cpp b/uppsrc/CtrlLib/Bar.cpp index 0cdfd099b..2c303a257 100644 --- a/uppsrc/CtrlLib/Bar.cpp +++ b/uppsrc/CtrlLib/Bar.cpp @@ -96,11 +96,12 @@ Size BarPane::Repos(bool _horz, int maxsize) break; } VeHo(psz) = max(VeHo(psz), VeHo(sz)); - if(q->ctrl) + if(q->ctrl) { if(horz) q->ctrl->LeftPos(psz.cx + hmargin, sz.cx); else q->ctrl->TopPos(psz.cy + vmargin, sz.cy); + } HoVe(psz) += HoVe(sz); q++; } @@ -110,11 +111,12 @@ Size BarPane::Repos(bool _horz, int maxsize) bp += 2 + 2 * bmargin; } while(f != q) { - if(f->ctrl) + if(f->ctrl) { if(horz) f->ctrl->TopPos(bp, psz.cy); else f->ctrl->LeftPos(bp, psz.cx); + } f++; } bp += VeHo(psz); @@ -479,16 +481,18 @@ void BarCtrl::AddCtrl(Ctrl *ctrl, Size sz) { SizeCtrl& m = sizer.DoIndex(zii++); LogPos p = ctrl->GetPos(); - if(p.x.IsEmpty()) + if(p.x.IsEmpty()) { if(sz.cx == INT_MAX) ctrl->HSizePos(); else ctrl->HCenterPos(sz.cx ? sz.cx : MINSIZE); - if(p.y.IsEmpty()) + } + if(p.y.IsEmpty()) { if(sz.cy == INT_MAX) ctrl->VSizePos(); else ctrl->VCenterPos(sz.cy ? sz.cy : MINSIZE); + } LLOG("AddCtrl Ctrl::GetSize: " << ctrl->GetSize()); m.SetSize(sz); m.AddChild(ctrl); diff --git a/uppsrc/CtrlLib/DocEdit.cpp b/uppsrc/CtrlLib/DocEdit.cpp index d70eeb631..e5344eb5c 100644 --- a/uppsrc/CtrlLib/DocEdit.cpp +++ b/uppsrc/CtrlLib/DocEdit.cpp @@ -52,7 +52,7 @@ DocEdit::Fmt DocEdit::Format(const WString& text) const *s = ' '; } x += cw; - if(x > cx) + if(x > cx) { if(space && space <= s) { space++; fmt.line.Add(int(space - fmt.text)); @@ -63,6 +63,7 @@ DocEdit::Fmt DocEdit::Format(const WString& text) const fmt.line.Add(int(s - fmt.text)); x = cw; } + } } fmt.fi = fi; return fmt; @@ -223,11 +224,12 @@ int DocEdit::GetCursorPos(Point p) { void DocEdit::PlaceCaret(bool scroll) { Point cr = GetCaret(cursor); int fy = font.Info().GetLineHeight(); - if(scroll) + if(scroll) { if(cursor == total) sb.End(); else sb.ScrollInto(cr.y, fy + 2); + } SetCaret(cr.x + 1, cr.y - sb, 1, fy); WhenSel(); } diff --git a/uppsrc/CtrlLib/DropList.cpp b/uppsrc/CtrlLib/DropList.cpp index 04c2ab8c5..2dfcb1215 100644 --- a/uppsrc/CtrlLib/DropList.cpp +++ b/uppsrc/CtrlLib/DropList.cpp @@ -225,11 +225,12 @@ DropList& DropList::ValueDisplay(const Display& d) void DropList::Adjust() { int i = FindKey(value); - if(i < 0) + if(i < 0) { if(GetCount()) SetIndex(0); else SetData(Null); + } } void DropList::Adjust(const Value& k) diff --git a/uppsrc/CtrlLib/LabelBase.cpp b/uppsrc/CtrlLib/LabelBase.cpp index 30673d464..705d166af 100644 --- a/uppsrc/CtrlLib/LabelBase.cpp +++ b/uppsrc/CtrlLib/LabelBase.cpp @@ -237,19 +237,20 @@ Size DrawLabel::Paint(Ctrl *ctrl, Draw& w, const Rect& r, bool visibleaccesskey) } int iy = push + (r.top + r.bottom - sz1.cy) / 2; - if(sz1.cx) + if(sz1.cx) { if(IsNull(lcolor)) w.DrawImage(ix, iy, DisabledImage(limg, disabled)); else w.DrawImage(ix, iy, limg, lcolor); - + } iy = push + (r.top + r.bottom - sz2.cy) / 2; ix = (IsNull(rspc) ? r.right - sz2.cx : p.x + txtsz.cx + rspc) + push; - if(sz2.cx) + if(sz2.cx) { if(IsNull(rcolor)) w.DrawImage(ix, iy, DisabledImage(rimg, disabled)); else w.DrawImage(ix, iy, rimg, rcolor); + } paintrect.Paint(w, p.x + push, p.y + push, txtsz.cx, isz.cy, color, Null); if(*text) { if(disabled) diff --git a/uppsrc/CtrlLib/LineEdit.cpp b/uppsrc/CtrlLib/LineEdit.cpp index 2c66ef452..04fdb0100 100644 --- a/uppsrc/CtrlLib/LineEdit.cpp +++ b/uppsrc/CtrlLib/LineEdit.cpp @@ -180,7 +180,7 @@ void LineEdit::Paint0(Draw& w) { LLOG("Highlight -> paper[" << q << "] = " << h.paper); int x = gp * fsz.cx - scx; int xx = x + (gp + ll) * fsz.cx; - if(max(x, 0) < min(xx, sz.cx)) + if(max(x, 0) < min(xx, sz.cx)) { if(pass == 0) { w.DrawRect(x, y, fsz.cx * ll, fsz.cy, h.paper); if(bordercolumn > 0 && bordercolumn >= gp && bordercolumn < gp + ll) @@ -195,6 +195,7 @@ void LineEdit::Paint0(Draw& w) { y + fascent - h.font.GetAscent(), ~txt + q, h.font, h.ink, l, cjk ? dx2 : dx); } + } q = p; gp += ll; if(x > sz.cx) diff --git a/uppsrc/CtrlLib/MultiButton.cpp b/uppsrc/CtrlLib/MultiButton.cpp index 368f5c60f..e0d8c15ba 100644 --- a/uppsrc/CtrlLib/MultiButton.cpp +++ b/uppsrc/CtrlLib/MultiButton.cpp @@ -511,11 +511,12 @@ void MultiButton::LeftUp(Point p, dword flags) push = false; Refresh(); Sync(); - if(!IsNull(hl)) + if(!IsNull(hl)) { if(hl >= 0) button[hl].WhenClick(); else WhenClick(); + } } void MultiButton::MouseLeave() diff --git a/uppsrc/CtrlLib/init b/uppsrc/CtrlLib/init index 824dec6ba..3c90182ca 100644 --- a/uppsrc/CtrlLib/init +++ b/uppsrc/CtrlLib/init @@ -2,7 +2,7 @@ #define _CtrlLib_icpp_init_stub #include "CtrlCore/init" #include "PdfDraw/init" -#define BLITZ_INDEX__ F2a95805f3896075b0a556396aabaf515 +#define BLITZ_INDEX__ Fa588a2a7bb40a3ed36760f6c2bef5026 #include "CtrlLib.icpp" #undef BLITZ_INDEX__ #endif diff --git a/uppsrc/Sql/Sql.cpp b/uppsrc/Sql/Sql.cpp index d032012d5..bf9616c93 100644 --- a/uppsrc/Sql/Sql.cpp +++ b/uppsrc/Sql/Sql.cpp @@ -218,12 +218,13 @@ bool Sql::Fetch() { session.SetStatus(SqlSession::END_FETCHING_MANY); } Stream *s = session.GetTrace(); - if(s) + if(s) { if((int)total > session.traceslow) *s << "SLOW SQL: " << total << " ms: " << cn->statement << UPP::EOL; else if((int)fetch > session.traceslow) *s << "SLOW SQL: " << fetch << " ms further fetch: " << cn->statement << UPP::EOL; + } cn->starttime = INT_MAX; return b; } diff --git a/uppsrc/Sql/SqlCase.cpp b/uppsrc/Sql/SqlCase.cpp index 3baf201a3..203f37304 100644 --- a/uppsrc/Sql/SqlCase.cpp +++ b/uppsrc/Sql/SqlCase.cpp @@ -45,11 +45,12 @@ void SqlCompile(const char *&s, StringBuffer *r, byte dialect) *r << '.'; break; case SQLC_AS: - if(r) + if(r) { if(dialect & (MSSQL | PGSQL)) *r << " as "; else *r << ' '; + } break; case SQLC_COMMA: if(r)