git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2066 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
  * $Id$
  *******************************************************************/
 
  * $Id$
  *******************************************************************/
 
 #ifdef __GNUG__
 #pragma implementation "wxllist.h"
 #endif
 #ifdef __GNUG__
 #pragma implementation "wxllist.h"
 #endif
 //#include "Mpch.h"
 #ifdef M_PREFIX
 #   include "gui/wxllist.h"
 #else
 #   include "wxllist.h"
 #endif
 //#include "Mpch.h"
 #ifdef M_PREFIX
 #   include "gui/wxllist.h"
 #else
 #   include "wxllist.h"
 #endif
 #ifndef USE_PCH
 #   include   "iostream.h"
 #   include   <wx/dc.h>
 #ifndef USE_PCH
 #   include   "iostream.h"
 #   include   <wx/dc.h>
 wxLayoutLine::wxLayoutLine(wxLayoutLine *prev)
 {
    m_LineNumber = 0;
 wxLayoutLine::wxLayoutLine(wxLayoutLine *prev)
 {
    m_LineNumber = 0;
+   m_Width = m_Height = 0;
    m_Length = 0;
    m_Dirty = true;
    m_Previous = prev;
    m_Length = 0;
    m_Dirty = true;
    m_Previous = prev;
          str = str.substr(offset,str.Length()-offset);
          // Find out how many positions we need to delete:
          // 1. eat leading space
          str = str.substr(offset,str.Length()-offset);
          // Find out how many positions we need to delete:
          // 1. eat leading space
-         while(isspace(str[count])) count++;
+         while(isspace(str.c_str()[count])) count++;
          // 2. eat the word itself:
          // 2. eat the word itself:
-         while(isalnum(str[count])) count++;
+         while(isalnum(str.c_str()[count])) count++;
          // now delete it:
          wxASSERT(count+offset <= (size_t) (**i).GetLength());
          ((wxLayoutObjectText *)*i)->GetText().erase(offset,count);
          // now delete it:
          wxASSERT(count+offset <= (size_t) (**i).GetLength());
          ((wxLayoutObjectText *)*i)->GetText().erase(offset,count);
-            if( isspace(((wxLayoutObjectText*)*i)->GetText()[(size_t)offset]))
+            if( isspace(((wxLayoutObjectText*)*i)->GetText().c_str()[(size_t)offset]))
 wxLayoutList::~wxLayoutList()
 {
    InternalClear();
 wxLayoutList::~wxLayoutList()
 {
    InternalClear();
+   m_FirstLine->DeleteLine(false);
    float scale = ScaleDC(&psdc);
 
    psdc.GetSize(&m_PageWidth, &m_PageHeight);
    float scale = ScaleDC(&psdc);
 
    psdc.GetSize(&m_PageWidth, &m_PageHeight);
-   // This sets a left/top origin of 10% and 5%:
-   m_Offset = wxPoint(m_PageWidth/10, m_PageHeight/20);
+   // This sets a left/top origin of 15% and 20%:
+   m_Offset = wxPoint((15*m_PageWidth)/100, m_PageHeight/20);
 
    // This is the length of the printable area.
    m_PrintoutHeight = m_PageHeight - (int) (m_PageHeight * 0.15);
 
    // This is the length of the printable area.
    m_PrintoutHeight = m_PageHeight - (int) (m_PageHeight * 0.15);