From: Julian Smart Date: Sun, 29 Oct 2006 21:55:18 +0000 (+0000) Subject: Digital Mars fixes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1f71a77057d49f4fbf727ad3a5ad2269d124ed0d?hp=9eb11d19b13870292f3ccd340c67d7e148761db5 Digital Mars fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index e59021ae52..39129eb982 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -4812,7 +4812,7 @@ wxRichTextAttr wxRichTextBuffer::GetStyleForNewParagraph(long pos, bool caretPos { wxRichTextAttr numberingAttr; if (FindNextParagraphNumber(para, numberingAttr)) - wxRichTextApplyStyle(attr, numberingAttr); + wxRichTextApplyStyle(attr, (const wxRichTextAttr&) numberingAttr); } return attr; @@ -6527,6 +6527,14 @@ bool wxRichTextApplyStyle(wxRichTextAttr& destStyle, const wxTextAttrEx& style) 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) { // Whole font. Avoiding setting individual attributes if possible, since diff --git a/src/richtext/richtextformatdlg.cpp b/src/richtext/richtextformatdlg.cpp index bfe3c2565c..7c21d4c062 100644 --- a/src/richtext/richtextformatdlg.cpp +++ b/src/richtext/richtextformatdlg.cpp @@ -57,8 +57,11 @@ #include "richtextindentspage.cpp" #include "richtexttabspage.cpp" #include "richtextbulletspage.cpp" +// Digital Mars can't cope with this much code +#ifndef __DMC__ + #include "richtextliststylepage.cpp" +#endif #include "richtextstylepage.cpp" -#include "richtextliststylepage.cpp" #endif #if 0 // def __WXMAC__ @@ -290,12 +293,14 @@ wxPanel* wxRichTextFormattingDialogFactory::CreatePage(int page, wxString& title title = _("Bullets"); return page; } +#ifndef __DMC__ else if (page == wxRICHTEXT_FORMAT_LIST_STYLE) { wxRichTextListStylePage* page = new wxRichTextListStylePage(dialog->GetBookCtrl(), wxID_ANY); title = _("List Style"); return page; } +#endif else return NULL; } @@ -320,7 +325,11 @@ int wxRichTextFormattingDialogFactory::GetPageId(int i) const /// Get the number of available page identifiers int wxRichTextFormattingDialogFactory::GetPageIdCount() const { +#ifdef __DMC__ + return 5; +#else return 6; +#endif } /// Set the sheet style, called at the start of wxRichTextFormattingDialog::Create