]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextbuffer.cpp
support framelayout for choice
[wxWidgets.git] / src / richtext / richtextbuffer.cpp
index 9fb42664c448ceca7fb2c7842891e6f237ff7d9f..cac09f4e06f16dd314056d406c8fde858297135d 100644 (file)
@@ -4366,7 +4366,7 @@ bool wxRichTextParagraph::Layout(wxDC& dc, const wxRect& rect, int style)
     int paraDescent = 0;
 
     // This calculates the partial text extents
-    GetRangeSize(GetRange(), paraSize, paraDescent, dc, wxRICHTEXT_UNFORMATTED|wxRICHTEXT_CACHE_SIZE, wxPoint(0,0), & partialExtents);
+    GetRangeSize(GetRange(), paraSize, paraDescent, dc, wxRICHTEXT_UNFORMATTED|wxRICHTEXT_CACHE_SIZE, rect.GetPosition(), & partialExtents);
 #else
     node = m_children.GetFirst();
     while (node)
@@ -6668,13 +6668,13 @@ bool wxRichTextParagraphLayoutBox::InsertTextWithUndo(long pos, const wxString&
 
     int length = action->GetNewParagraphs().GetOwnRange().GetLength();
 
-    if (text.length() > 0 && text.Last() != wxT('\n'))
+    if (!text.empty() && text.Last() != wxT('\n'))
     {
         // Don't count the newline when undoing
         length --;
         action->GetNewParagraphs().SetPartialParagraph(true);
     }
-    else if (text.length() > 0 && text.Last() == wxT('\n'))
+    else if (!text.empty() && text.Last() == wxT('\n'))
         length --;
 
     action->SetPosition(pos);
@@ -8914,7 +8914,7 @@ wxRichTextCell* wxRichTextTable::GetCell(int row, int col) const
         return wxDynamicCast(obj, wxRichTextCell);
     }
     else
-        return false;
+        return NULL;
 }
 
 // Returns a selection object specifying the selections between start and end character positions.