unicode fix and header includes corrected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -55,9 +55,9 @@
|
|||||||
#include <Scrap.h>
|
#include <Scrap.h>
|
||||||
#endif
|
#endif
|
||||||
#include <MacTextEditor.h>
|
#include <MacTextEditor.h>
|
||||||
#include "ATSUnicode.h"
|
#include <ATSUnicode.h>
|
||||||
#include "TextCommon.h"
|
#include <TextCommon.h>
|
||||||
#include "TextEncodingConverter.h"
|
#include <TextEncodingConverter.h>
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
|
|
||||||
#define TE_UNLIMITED_LENGTH 0xFFFFFFFFUL
|
#define TE_UNLIMITED_LENGTH 0xFFFFFFFFUL
|
||||||
@@ -69,8 +69,6 @@ extern wxControl *wxFindControlFromMacControl(ControlHandle inControl ) ;
|
|||||||
// moment is to avoid setting the true focus on the control, the proper solution at the end would be to have
|
// moment is to avoid setting the true focus on the control, the proper solution at the end would be to have
|
||||||
// an alternate path for carbon key events that routes automatically into the same wx flow of events
|
// an alternate path for carbon key events that routes automatically into the same wx flow of events
|
||||||
|
|
||||||
#include "MacTextEditor.h"
|
|
||||||
|
|
||||||
/* part codes */
|
/* part codes */
|
||||||
|
|
||||||
/* kmUPTextPart is the part code we return to indicate the user has clicked
|
/* kmUPTextPart is the part code we return to indicate the user has clicked
|
||||||
@@ -852,7 +850,7 @@ wxString wxTextCtrl::GetValue() const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
actualSize = GetHandleSize( theText ) ;
|
actualSize = GetHandleSize( theText ) / sizeof( UniChar) ;
|
||||||
if ( actualSize > 0 )
|
if ( actualSize > 0 )
|
||||||
{
|
{
|
||||||
wxChar *ptr = result.GetWriteBuf(actualSize*sizeof(wxChar)) ;
|
wxChar *ptr = result.GetWriteBuf(actualSize*sizeof(wxChar)) ;
|
||||||
@@ -865,7 +863,7 @@ wxString wxTextCtrl::GetValue() const
|
|||||||
HUnlock( theText ) ;
|
HUnlock( theText ) ;
|
||||||
#endif
|
#endif
|
||||||
ptr[actualSize] = 0 ;
|
ptr[actualSize] = 0 ;
|
||||||
result.UngetWriteBuf( actualSize ) ;
|
result.UngetWriteBuf( actualSize *sizeof(wxChar) ) ;
|
||||||
}
|
}
|
||||||
DisposeHandle( theText ) ;
|
DisposeHandle( theText ) ;
|
||||||
}
|
}
|
||||||
|
@@ -55,9 +55,9 @@
|
|||||||
#include <Scrap.h>
|
#include <Scrap.h>
|
||||||
#endif
|
#endif
|
||||||
#include <MacTextEditor.h>
|
#include <MacTextEditor.h>
|
||||||
#include "ATSUnicode.h"
|
#include <ATSUnicode.h>
|
||||||
#include "TextCommon.h"
|
#include <TextCommon.h>
|
||||||
#include "TextEncodingConverter.h"
|
#include <TextEncodingConverter.h>
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
|
|
||||||
#define TE_UNLIMITED_LENGTH 0xFFFFFFFFUL
|
#define TE_UNLIMITED_LENGTH 0xFFFFFFFFUL
|
||||||
@@ -69,8 +69,6 @@ extern wxControl *wxFindControlFromMacControl(ControlHandle inControl ) ;
|
|||||||
// moment is to avoid setting the true focus on the control, the proper solution at the end would be to have
|
// moment is to avoid setting the true focus on the control, the proper solution at the end would be to have
|
||||||
// an alternate path for carbon key events that routes automatically into the same wx flow of events
|
// an alternate path for carbon key events that routes automatically into the same wx flow of events
|
||||||
|
|
||||||
#include "MacTextEditor.h"
|
|
||||||
|
|
||||||
/* part codes */
|
/* part codes */
|
||||||
|
|
||||||
/* kmUPTextPart is the part code we return to indicate the user has clicked
|
/* kmUPTextPart is the part code we return to indicate the user has clicked
|
||||||
@@ -852,7 +850,7 @@ wxString wxTextCtrl::GetValue() const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
actualSize = GetHandleSize( theText ) ;
|
actualSize = GetHandleSize( theText ) / sizeof( UniChar) ;
|
||||||
if ( actualSize > 0 )
|
if ( actualSize > 0 )
|
||||||
{
|
{
|
||||||
wxChar *ptr = result.GetWriteBuf(actualSize*sizeof(wxChar)) ;
|
wxChar *ptr = result.GetWriteBuf(actualSize*sizeof(wxChar)) ;
|
||||||
@@ -865,7 +863,7 @@ wxString wxTextCtrl::GetValue() const
|
|||||||
HUnlock( theText ) ;
|
HUnlock( theText ) ;
|
||||||
#endif
|
#endif
|
||||||
ptr[actualSize] = 0 ;
|
ptr[actualSize] = 0 ;
|
||||||
result.UngetWriteBuf( actualSize ) ;
|
result.UngetWriteBuf( actualSize *sizeof(wxChar) ) ;
|
||||||
}
|
}
|
||||||
DisposeHandle( theText ) ;
|
DisposeHandle( theText ) ;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user