]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
Do not realize the top level shell that acts as a parent
[wxWidgets.git] / src / msw / textctrl.cpp
index 2b9d0b32ed29d67037481fd59104c1a833f7d0b6..e285303d8dca2e57c0c6f5d7f55370662b4f399a 100644 (file)
@@ -2364,12 +2364,11 @@ bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style)
 
     if (style.HasLeftIndent())
     {
-        pf.dwMask |= PFM_STARTINDENT;
+        pf.dwMask |= PFM_STARTINDENT | PFM_OFFSET;
 
         // Convert from 1/10 mm to TWIPS
         pf.dxStartIndent = (int) (((double) style.GetLeftIndent()) * mm2twips / 10.0) ;
-
-        // TODO: do we need to specify dxOffset?
+        pf.dxOffset = (int) (((double) style.GetLeftSubIndent()) * mm2twips / 10.0) ;
     }
 
     if (style.HasRightIndent())
@@ -2531,7 +2530,7 @@ bool wxTextCtrl::GetStyle(long position, wxTextAttr& style)
     // do format the selection
     (void) ::SendMessage(GetHwnd(), EM_GETPARAFORMAT, 0, (LPARAM) &pf) ;
 
-    style.SetLeftIndent( (int) ((double) pf.dxStartIndent * twips2mm * 10.0) );
+    style.SetLeftIndent( (int) ((double) pf.dxStartIndent * twips2mm * 10.0), (int) ((double) pf.dxOffset * twips2mm * 10.0) );
     style.SetRightIndent( (int) ((double) pf.dxRightIndent * twips2mm * 10.0) );
 
     if (pf.wAlignment == PFA_CENTER)
@@ -2547,7 +2546,7 @@ bool wxTextCtrl::GetStyle(long position, wxTextAttr& style)
     size_t i;
     for (i = 0; i < (size_t) pf.cTabCount; i++)
     {
-        tabStops[i] = (int) ((double) (pf.rgxTabs[i] & 0xFFFF) * twips2mm * 10.0) ;
+        tabStops.Add( (int) ((double) (pf.rgxTabs[i] & 0xFFFF) * twips2mm * 10.0) );
     }
 
     if ( changeSel )