Revision: 7358
          http://mahogany.svn.sourceforge.net/mahogany/?rev=7358&view=rev
Author:   vadz
Date:     2007-09-07 09:01:06 -0700 (Fri, 07 Sep 2007)

Log Message:
-----------
don't use GetUnicodeText() hack in Unicode build (fixes compilation in Unicode 
build under MSW)

Modified Paths:
--------------
    trunk/M/src/modules/BareBonesEditor.cpp

Modified: trunk/M/src/modules/BareBonesEditor.cpp
===================================================================
--- trunk/M/src/modules/BareBonesEditor.cpp     2007-09-05 19:56:24 UTC (rev 
7357)
+++ trunk/M/src/modules/BareBonesEditor.cpp     2007-09-07 16:01:06 UTC (rev 
7358)
@@ -52,6 +52,12 @@
    #include <wx/fontmap.h>
 #endif // wxUSE_WCHAR_T
 
+// this hack allows us to get Unicode text from a richtext Windows control even
+// in ANSI build
+#if !wxUSE_UNICODE && wxUSE_WCHAR_T && defined(OS_WIN) && !defined(__WINE__)
+   #define USE_UNICODE_TEXT_HACK
+#endif
+
 // ----------------------------------------------------------------------------
 // options we use here
 // ----------------------------------------------------------------------------
@@ -244,10 +250,10 @@
 public:
    wxBareBonesTextControl(BareBonesEditor *editor,wxWindow *parent);
 
-#if wxUSE_WCHAR_T && defined(OS_WIN)
+#ifdef USE_UNICODE_TEXT_HACK
    // get the text as a Unicode string
    wxWCharBuffer GetUnicodeText() const;
-#endif // wxUSE_WCHAR_T
+#endif
 
 protected:
    // event handlers
@@ -840,7 +846,8 @@
 }
 
 
-#if wxUSE_WCHAR_T && defined(OS_WIN) && !defined(__WINE__)
+#ifdef USE_UNICODE_TEXT_HACK
+
 wxWCharBuffer
 wxBareBonesTextControl::GetUnicodeText() const
 {
@@ -848,7 +855,7 @@
    return s.wc_str(wxConvUTF8);
 }
 
-#endif // wxUSE_WCHAR_T
+#endif // USE_UNICODE_TEXT_HACK
 
 // ----------------------------------------------------------------------------
 // BareBonesEditor ctor/dtor
@@ -1175,7 +1182,7 @@
 {
    m_getNextAttachement = 0;
 
-#if wxUSE_WCHAR_T && defined(OS_WIN) && !defined(__WINE__)
+#ifdef USE_UNICODE_TEXT_HACK
    wxFontEncoding encPart = wxFONTENCODING_SYSTEM;
    wxWCharBuffer wbuf = m_textControl->GetUnicodeText();
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to