]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextstyles.cpp
Document wxDateTime arithmetic operators.
[wxWidgets.git] / src / richtext / richtextstyles.cpp
index 47939315e4c190acfda0973b9d14455550c348fc..3cfec1ff071926d95524d0d85766aec5b4f27026 100644 (file)
@@ -61,10 +61,10 @@ wxRichTextAttr wxRichTextStyleDefinition::GetStyleMergedWithBase(const wxRichTex
     if (m_baseStyle.IsEmpty())
         return m_style;
 
-    bool isParaStyle = IsKindOf(CLASSINFO(wxRichTextParagraphStyleDefinition));
-    bool isCharStyle = IsKindOf(CLASSINFO(wxRichTextCharacterStyleDefinition));
-    bool isListStyle = IsKindOf(CLASSINFO(wxRichTextListStyleDefinition));
-    bool isBoxStyle = IsKindOf(CLASSINFO(wxRichTextBoxStyleDefinition));
+    bool isParaStyle = IsKindOf(wxCLASSINFO(wxRichTextParagraphStyleDefinition));
+    bool isCharStyle = IsKindOf(wxCLASSINFO(wxRichTextCharacterStyleDefinition));
+    bool isListStyle = IsKindOf(wxCLASSINFO(wxRichTextListStyleDefinition));
+    bool isBoxStyle  = IsKindOf(wxCLASSINFO(wxRichTextBoxStyleDefinition));
 
     // Collect the styles, detecting loops
     wxArrayString styleNames;
@@ -706,7 +706,11 @@ int wxRichTextStyleListBox::SetStyleSelection(const wxString& name)
 {
     int i = GetIndexForStyle(name);
     if (i > -1)
+    {
         SetSelection(i);
+        if (!IsVisible(i))
+            ScrollToRow(i);
+    }
     return i;
 }
 
@@ -839,9 +843,9 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons
     bool hasItalic = false;
     bool hasUnderline = false;
 
-    if (attr.GetFontWeight() == wxBOLD)
+    if (attr.GetFontWeight() == wxFONTWEIGHT_BOLD)
         hasBold = true;
-    if (attr.GetFontStyle() == wxITALIC)
+    if (attr.GetFontStyle() == wxFONTSTYLE_ITALIC)
         hasItalic = true;
     if (attr.GetFontUnderlined())
         hasUnderline = true;