Digital Mars fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2006-10-29 21:55:18 +00:00
parent 9eb11d19b1
commit 1f71a77057
2 changed files with 19 additions and 2 deletions

View File

@@ -4812,7 +4812,7 @@ wxRichTextAttr wxRichTextBuffer::GetStyleForNewParagraph(long pos, bool caretPos
{ {
wxRichTextAttr numberingAttr; wxRichTextAttr numberingAttr;
if (FindNextParagraphNumber(para, numberingAttr)) if (FindNextParagraphNumber(para, numberingAttr))
wxRichTextApplyStyle(attr, numberingAttr); wxRichTextApplyStyle(attr, (const wxRichTextAttr&) numberingAttr);
} }
return attr; return attr;
@@ -6527,6 +6527,14 @@ bool wxRichTextApplyStyle(wxRichTextAttr& destStyle, const wxTextAttrEx& style)
return true; return true;
} }
bool wxRichTextApplyStyle(wxRichTextAttr& destStyle, const wxRichTextAttr& style, wxRichTextAttr* compareWith)
{
wxTextAttrEx attr(destStyle);
wxRichTextApplyStyle(attr, style, compareWith);
destStyle = attr;
return true;
}
bool wxRichTextApplyStyle(wxTextAttrEx& destStyle, const wxRichTextAttr& style, wxRichTextAttr* compareWith) bool wxRichTextApplyStyle(wxTextAttrEx& destStyle, const wxRichTextAttr& style, wxRichTextAttr* compareWith)
{ {
// Whole font. Avoiding setting individual attributes if possible, since // Whole font. Avoiding setting individual attributes if possible, since

View File

@@ -57,8 +57,11 @@
#include "richtextindentspage.cpp" #include "richtextindentspage.cpp"
#include "richtexttabspage.cpp" #include "richtexttabspage.cpp"
#include "richtextbulletspage.cpp" #include "richtextbulletspage.cpp"
// Digital Mars can't cope with this much code
#ifndef __DMC__
#include "richtextliststylepage.cpp"
#endif
#include "richtextstylepage.cpp" #include "richtextstylepage.cpp"
#include "richtextliststylepage.cpp"
#endif #endif
#if 0 // def __WXMAC__ #if 0 // def __WXMAC__
@@ -290,12 +293,14 @@ wxPanel* wxRichTextFormattingDialogFactory::CreatePage(int page, wxString& title
title = _("Bullets"); title = _("Bullets");
return page; return page;
} }
#ifndef __DMC__
else if (page == wxRICHTEXT_FORMAT_LIST_STYLE) else if (page == wxRICHTEXT_FORMAT_LIST_STYLE)
{ {
wxRichTextListStylePage* page = new wxRichTextListStylePage(dialog->GetBookCtrl(), wxID_ANY); wxRichTextListStylePage* page = new wxRichTextListStylePage(dialog->GetBookCtrl(), wxID_ANY);
title = _("List Style"); title = _("List Style");
return page; return page;
} }
#endif
else else
return NULL; return NULL;
} }
@@ -320,7 +325,11 @@ int wxRichTextFormattingDialogFactory::GetPageId(int i) const
/// Get the number of available page identifiers /// Get the number of available page identifiers
int wxRichTextFormattingDialogFactory::GetPageIdCount() const int wxRichTextFormattingDialogFactory::GetPageIdCount() const
{ {
#ifdef __DMC__
return 5;
#else
return 6; return 6;
#endif
} }
/// Set the sheet style, called at the start of wxRichTextFormattingDialog::Create /// Set the sheet style, called at the start of wxRichTextFormattingDialog::Create