From: Julian Smart Date: Wed, 13 Mar 2013 09:05:52 +0000 (+0000) Subject: Fixed some warnings X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/43f4e852a1b2ac37c3db6a2b87315192ac549191 Fixed some warnings git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/richtext/richtextfontpage.cpp b/src/richtext/richtextfontpage.cpp index d90e5024b6..aa24a1b212 100644 --- a/src/richtext/richtextfontpage.cpp +++ b/src/richtext/richtextfontpage.cpp @@ -547,7 +547,7 @@ bool wxRichTextFontPage::TransferDataToWindow() if (attr->HasFontWeight()) { - if (attr->GetFontWeight() == wxBOLD) + if (attr->GetFontWeight() == wxFONTWEIGHT_BOLD) m_weightCtrl->SetSelection(2); else m_weightCtrl->SetSelection(1); @@ -559,7 +559,7 @@ bool wxRichTextFontPage::TransferDataToWindow() if (attr->HasFontItalic()) { - if (attr->GetFontStyle() == wxITALIC) + if (attr->GetFontStyle() == wxFONTSTYLE_ITALIC) m_styleCtrl->SetSelection(2); else m_styleCtrl->SetSelection(1); diff --git a/src/richtext/richtexthtml.cpp b/src/richtext/richtexthtml.cpp index 204367f38b..84f33aadfc 100644 --- a/src/richtext/richtexthtml.cpp +++ b/src/richtext/richtexthtml.cpp @@ -226,9 +226,9 @@ void wxRichTextHTMLHandler::BeginCharacterFormatting(const wxRichTextAttr& curre m_font = true; } - if (thisStyle.GetFontWeight() == wxBOLD) + if (thisStyle.GetFontWeight() == wxFONTWEIGHT_BOLD) str << wxT(""); - if (thisStyle.GetFontStyle() == wxITALIC) + if (thisStyle.GetFontStyle() == wxFONTSTYLE_ITALIC) str << wxT(""); if (thisStyle.GetFontUnderlined()) str << wxT(""); @@ -254,9 +254,9 @@ void wxRichTextHTMLHandler::EndCharacterFormatting(const wxRichTextAttr& WXUNUSE if (thisStyle.GetFontUnderlined()) stream << wxT(""); - if (thisStyle.GetFontStyle() == wxITALIC) + if (thisStyle.GetFontStyle() == wxFONTSTYLE_ITALIC) stream << wxT(""); - if (thisStyle.GetFontWeight() == wxBOLD) + if (thisStyle.GetFontWeight() == wxFONTWEIGHT_BOLD) stream << wxT(""); if (thisStyle.HasTextEffects()) @@ -522,7 +522,7 @@ void wxRichTextHTMLHandler::WriteImage(wxRichTextImage* image, wxOutputStream& s if (img.IsOk()) { wxString ext(image->GetImageBlock().GetExtension()); - wxString tempFilename(wxString::Format(wxT("image%d.%s"), sm_fileCounter, ext)); + wxString tempFilename(wxString::Format(wxT("image%d.%s"), sm_fileCounter, ext.c_str())); wxMemoryFSHandler::AddFile(tempFilename, img, image->GetImageBlock().GetImageType()); m_imageLocations.Add(tempFilename); @@ -551,7 +551,7 @@ void wxRichTextHTMLHandler::WriteImage(wxRichTextImage* image, wxOutputStream& s tempDir = wxFileName::GetTempDir(); wxString ext(image->GetImageBlock().GetExtension()); - wxString tempFilename(wxString::Format(wxT("%s/image%d.%s"), tempDir, sm_fileCounter, ext)); + wxString tempFilename(wxString::Format(wxT("%s/image%d.%s"), tempDir.c_str(), sm_fileCounter, ext.c_str())); image->GetImageBlock().Write(tempFilename); m_imageLocations.Add(tempFilename); diff --git a/src/richtext/richtextstyles.cpp b/src/richtext/richtextstyles.cpp index 9e0a84a177..3cfec1ff07 100644 --- a/src/richtext/richtextstyles.cpp +++ b/src/richtext/richtextstyles.cpp @@ -843,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;