From 9e69b2abaa855c44dbadb454b0f7e0189dbbcda2 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 7 Sep 2010 11:22:28 +0000 Subject: [PATCH] *RichEdit: fixed user dictionary when fixedlang is active git-svn-id: svn://ultimatepp.org/upp/trunk@2662 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/RichEdit/Cursor.cpp | 2 +- uppsrc/Sql/Sqls.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/uppsrc/RichEdit/Cursor.cpp b/uppsrc/RichEdit/Cursor.cpp index ae61f6070..2b22502b3 100644 --- a/uppsrc/RichEdit/Cursor.cpp +++ b/uppsrc/RichEdit/Cursor.cpp @@ -362,7 +362,7 @@ void RichEdit::AddUserDict() if(IsSelection()) return; WString w = GetWordAtCursor(); if(w.IsEmpty()) return; - SpellerAdd(w, formatinfo.language); + SpellerAdd(w, fixedlang ? fixedlang : formatinfo.language); text.ClearSpelling(); Refresh(); } diff --git a/uppsrc/Sql/Sqls.h b/uppsrc/Sql/Sqls.h index 29c38e8e3..afc74f965 100644 --- a/uppsrc/Sql/Sqls.h +++ b/uppsrc/Sql/Sqls.h @@ -23,7 +23,9 @@ class SqlRaw : public String, AssignValueTypeNo { public: operator Value() const { return RawValue(*this); } SqlRaw(const Value& q) - : String(IsString(q) ? String(q) : String(RawValue::Extract(q))) {} + : String(IsNull(q) ? NULL : + IsString(q) ? String(q) : + String(RawValue::Extract(q))) {} SqlRaw(const String& s) : String(s) {} SqlRaw() {} };