String::GetBuffer()->OUString::getStr()
Change-Id: I427bb7b8e32d8a0040dbca1d0d0c765f526ba62f
This commit is contained in:
@@ -4818,12 +4818,12 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam )
|
|||||||
hfntOld = (HFONT) SelectObject(pDI->hDC, (HFONT) CreateFontIndirect( &ncm.lfMenuFont ));
|
hfntOld = (HFONT) SelectObject(pDI->hDC, (HFONT) CreateFontIndirect( &ncm.lfMenuFont ));
|
||||||
|
|
||||||
SIZE strSize;
|
SIZE strSize;
|
||||||
String aStr( pSalMenuItem->mText );
|
OUString aStr( pSalMenuItem->mText );
|
||||||
GetTextExtentPoint32W( pDI->hDC, (LPWSTR) aStr.GetBuffer(),
|
GetTextExtentPoint32W( pDI->hDC, (LPWSTR) aStr.getStr(),
|
||||||
aStr.Len(), &strSize );
|
aStr.getLength(), &strSize );
|
||||||
|
|
||||||
if(!DrawStateW( pDI->hDC, (HBRUSH)NULL, (DRAWSTATEPROC)NULL,
|
if(!DrawStateW( pDI->hDC, (HBRUSH)NULL, (DRAWSTATEPROC)NULL,
|
||||||
(LPARAM)(LPWSTR) aStr.GetBuffer(),
|
(LPARAM)(LPWSTR) aStr.getStr(),
|
||||||
(WPARAM)0, aRect.left, aRect.top + (lineHeight - strSize.cy)/2, 0, 0,
|
(WPARAM)0, aRect.left, aRect.top + (lineHeight - strSize.cy)/2, 0, 0,
|
||||||
DST_PREFIXTEXT | (fDisabled && !fSelected ? DSS_DISABLED : DSS_NORMAL) ) )
|
DST_PREFIXTEXT | (fDisabled && !fSelected ? DSS_DISABLED : DSS_NORMAL) ) )
|
||||||
ImplWriteLastError(GetLastError(), "ImplDrawItem");
|
ImplWriteLastError(GetLastError(), "ImplDrawItem");
|
||||||
@@ -4832,15 +4832,15 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam )
|
|||||||
{
|
{
|
||||||
SIZE strSizeA;
|
SIZE strSizeA;
|
||||||
aStr = pSalMenuItem->mAccelText;
|
aStr = pSalMenuItem->mAccelText;
|
||||||
GetTextExtentPoint32W( pDI->hDC, (LPWSTR) aStr.GetBuffer(),
|
GetTextExtentPoint32W( pDI->hDC, (LPWSTR) aStr.getStr(),
|
||||||
aStr.Len(), &strSizeA );
|
aStr.getLength(), &strSizeA );
|
||||||
TEXTMETRIC tm;
|
TEXTMETRIC tm;
|
||||||
GetTextMetrics( pDI->hDC, &tm );
|
GetTextMetrics( pDI->hDC, &tm );
|
||||||
|
|
||||||
// position the accelerator string to the right but leave space for the
|
// position the accelerator string to the right but leave space for the
|
||||||
// (potential) submenu arrow (tm.tmMaxCharWidth)
|
// (potential) submenu arrow (tm.tmMaxCharWidth)
|
||||||
if(!DrawStateW( pDI->hDC, (HBRUSH)NULL, (DRAWSTATEPROC)NULL,
|
if(!DrawStateW( pDI->hDC, (HBRUSH)NULL, (DRAWSTATEPROC)NULL,
|
||||||
(LPARAM)(LPWSTR) aStr.GetBuffer(),
|
(LPARAM)(LPWSTR) aStr.getStr(),
|
||||||
(WPARAM)0, aRect.right-strSizeA.cx-tm.tmMaxCharWidth, aRect.top + (lineHeight - strSizeA.cy)/2, 0, 0,
|
(WPARAM)0, aRect.right-strSizeA.cx-tm.tmMaxCharWidth, aRect.top + (lineHeight - strSizeA.cy)/2, 0, 0,
|
||||||
DST_TEXT | (fDisabled && !fSelected ? DSS_DISABLED : DSS_NORMAL) ) )
|
DST_TEXT | (fDisabled && !fSelected ? DSS_DISABLED : DSS_NORMAL) ) )
|
||||||
ImplWriteLastError(GetLastError(), "ImplDrawItem");
|
ImplWriteLastError(GetLastError(), "ImplDrawItem");
|
||||||
|
Reference in New Issue
Block a user