From 5ce6e535bb9ea6a2e19731a6d7f58acd6a78b39b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 20 Oct 2013 19:58:07 +0100 Subject: String::GetBuffer()->OUString::getStr() Change-Id: I427bb7b8e32d8a0040dbca1d0d0c765f526ba62f --- vcl/win/source/window/salframe.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 963bce2b44f6..273d28e696f2 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -4818,12 +4818,12 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam ) hfntOld = (HFONT) SelectObject(pDI->hDC, (HFONT) CreateFontIndirect( &ncm.lfMenuFont )); SIZE strSize; - String aStr( pSalMenuItem->mText ); - GetTextExtentPoint32W( pDI->hDC, (LPWSTR) aStr.GetBuffer(), - aStr.Len(), &strSize ); + OUString aStr( pSalMenuItem->mText ); + GetTextExtentPoint32W( pDI->hDC, (LPWSTR) aStr.getStr(), + aStr.getLength(), &strSize ); 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, DST_PREFIXTEXT | (fDisabled && !fSelected ? DSS_DISABLED : DSS_NORMAL) ) ) ImplWriteLastError(GetLastError(), "ImplDrawItem"); @@ -4832,15 +4832,15 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam ) { SIZE strSizeA; aStr = pSalMenuItem->mAccelText; - GetTextExtentPoint32W( pDI->hDC, (LPWSTR) aStr.GetBuffer(), - aStr.Len(), &strSizeA ); + GetTextExtentPoint32W( pDI->hDC, (LPWSTR) aStr.getStr(), + aStr.getLength(), &strSizeA ); TEXTMETRIC tm; GetTextMetrics( pDI->hDC, &tm ); // position the accelerator string to the right but leave space for the // (potential) submenu arrow (tm.tmMaxCharWidth) 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, DST_TEXT | (fDisabled && !fSelected ? DSS_DISABLED : DSS_NORMAL) ) ) ImplWriteLastError(GetLastError(), "ImplDrawItem"); -- cgit