{
// We'll be using a copy of the paragraph to make style changes,
// not updating the buffer directly.
- wxRichTextParagraph* newPara = NULL;
+ wxRichTextParagraph* newPara wxDUMMY_INITIALIZE(NULL);
if (haveControl && withUndo)
{
// we can start applying a different style.
// TODO: check that the style actually changes or is different
// from style outside of range
- wxRichTextObject* firstObject = NULL;
- wxRichTextObject* lastObject = NULL;
+ wxRichTextObject* firstObject wxDUMMY_INITIALIZE(NULL);
+ wxRichTextObject* lastObject wxDUMMY_INITIALIZE(NULL);
if (childRange.GetStart() == newPara->GetRange().GetStart())
firstObject = newPara->GetChildren().GetFirst()->GetData();
/// Get the text attributes for this position.
bool wxRichTextParagraphLayoutBox::GetStyle(long position, wxTextAttrEx& style) const
{
- wxRichTextObject* obj = NULL;
+ wxRichTextObject* obj wxDUMMY_INITIALIZE(NULL);
+
if (style.IsParagraphStyle())
obj = GetParagraphAtPosition(position);
else
obj = GetLeafObjectAtPosition(position);
+
if (obj)
{
style = obj->GetAttributes();
/// Get the text attributes for this position.
bool wxRichTextParagraphLayoutBox::GetStyle(long position, wxRichTextAttr& style) const
{
- wxRichTextObject* obj = NULL;
+ wxRichTextObject* obj wxDUMMY_INITIALIZE(NULL);
+
if (style.IsParagraphStyle())
obj = GetParagraphAtPosition(position);
else
obj = GetLeafObjectAtPosition(position);
+
if (obj)
{
style = obj->GetAttributes();
wxRichTextLine* line = m_cachedLines.GetFirst() ? (wxRichTextLine* ) m_cachedLines.GetFirst()->GetData() : (wxRichTextLine*) NULL;
wxPoint linePos;
- int lineHeight = 0;
+ int lineHeight wxDUMMY_INITIALIZE(0);
if (line)
{
lineHeight = line->GetSize().y;
return false;
wxString str;
- int ch = 0;
int lastCh = 0;
while (!stream.Eof())
{
- ch = stream.GetC();
+ int ch = stream.GetC();
if (ch == 10 && lastCh != 13)
str += wxT('\n');