summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-08-02 08:44:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-08-02 08:55:53 +0100
commitd4b172b8196de05bb4efa39e19a2b324cf0b2778 (patch)
treefa7c51dab729a66f3d71c11769ae8325a380bda4 /vcl/win
parent1d90e4f5f3e046b946445dec38811fec8114364c (diff)
strip down UniString some more
Change-Id: Ibd749a70a7bbe8c1023edf7bd144aa6547147a12
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx10
-rw-r--r--vcl/win/source/gdi/salprn.cxx8
-rw-r--r--vcl/win/source/window/salframe.cxx8
3 files changed, 13 insertions, 13 deletions
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 81ad69bb3f13..ebb1edc69b6d 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1010,8 +1010,8 @@ static ImplWinFontData* ImplLogMetricToDevFontDataW( const ENUMLOGFONTEXW* pLogF
void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont )
{
- XubString aFontName( reinterpret_cast<const xub_Unicode*>(rLogFont.lfFaceName) );
- if ( aFontName.Len() )
+ rtl::OUString aFontName( reinterpret_cast<const xub_Unicode*>(rLogFont.lfFaceName) );
+ if (!aFontName.isEmpty())
{
rFont.SetName( aFontName );
rFont.SetCharSet( ImplCharSetToSal( rLogFont.lfCharSet ) );
@@ -1890,7 +1890,7 @@ int CALLBACK SalEnumFontsProcExW( const ENUMLOGFONTEXW* pLogFont,
pInfo->mbCourier = ImplSalWICompareAscii( pLogFont->elfLogFont.lfFaceName, "Courier" ) == 0;
else
pInfo->mbCourier = FALSE;
- String aName( reinterpret_cast<const sal_Unicode*>(pLogFont->elfLogFont.lfFaceName) );
+ String aName = rtl::OUString(reinterpret_cast<const sal_Unicode*>(pLogFont->elfLogFont.lfFaceName));
pInfo->mpName = &aName;
memcpy( pInfo->mpLogFontW->lfFaceName, pLogFont->elfLogFont.lfFaceName, (aName.Len()+1)*sizeof( wchar_t ) );
pInfo->mpLogFontW->lfCharSet = pLogFont->elfLogFont.lfCharSet;
@@ -2745,13 +2745,13 @@ const void* WinSalGraphics::GetEmbedFontData( const PhysicalFontFace* pFont,
const bool bPFA = (*aRawFontData.get() < 0x80);
rInfo.m_nFontType = bPFA ? FontSubsetInfo::TYPE1_PFA : FontSubsetInfo::TYPE1_PFB;
WCHAR aFaceName[64];
- int nFNLen = ::GetTextFaceW( mhDC, 64, aFaceName );
+ sal_Int32 nFNLen = ::GetTextFaceW( mhDC, 64, aFaceName );
// #i59854# strip eventual null byte
while( nFNLen > 0 && aFaceName[nFNLen-1] == 0 )
nFNLen--;
if( nFNLen == 0 )
*pDataLen = 0;
- rInfo.m_aPSName = String( reinterpret_cast<const sal_Unicode*>(aFaceName), sal::static_int_cast<sal_uInt16>(nFNLen) );
+ rInfo.m_aPSName = rtl::OUString(reinterpret_cast<const sal_Unicode*>(aFaceName), nFNLen);
rInfo.m_nAscent = +aTm.tmAscent;
rInfo.m_nDescent = -aTm.tmDescent;
rInfo.m_aFontBBox = Rectangle( Point( -aTm.tmOverhang, -aTm.tmDescent ),
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index 10bb796cdfdd..70be7f405a9c 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -218,18 +218,18 @@ void WinSalInstance::GetPrinterQueueState( SalPrinterQueueInfo* pInfo )
if( GetPrinterW( hPrinter, 2, (LPBYTE)pWinInfo2, nBytes, &nBytes ) )
{
if( pWinInfo2->pDriverName )
- pInfo->maDriver = String( reinterpret_cast< const sal_Unicode* >(pWinInfo2->pDriverName) );
+ pInfo->maDriver = rtl::OUString( reinterpret_cast< const sal_Unicode* >(pWinInfo2->pDriverName) );
XubString aPortName;
if ( pWinInfo2->pPortName )
- aPortName = String( reinterpret_cast< const sal_Unicode* >(pWinInfo2->pPortName) );
+ aPortName = rtl::OUString( reinterpret_cast< const sal_Unicode* >(pWinInfo2->pPortName) );
// pLocation can be 0 (the Windows docu doesn't describe this)
if ( pWinInfo2->pLocation && *pWinInfo2->pLocation )
- pInfo->maLocation = String( reinterpret_cast< const sal_Unicode* >(pWinInfo2->pLocation) );
+ pInfo->maLocation = rtl::OUString( reinterpret_cast< const sal_Unicode* >(pWinInfo2->pLocation) );
else
pInfo->maLocation = aPortName;
// pComment can be 0 (the Windows docu doesn't describe this)
if ( pWinInfo2->pComment )
- pInfo->maComment = String( reinterpret_cast< const sal_Unicode* >(pWinInfo2->pComment) );
+ pInfo->maComment = rtl::OUString( reinterpret_cast< const sal_Unicode* >(pWinInfo2->pComment) );
pInfo->mnStatus = ImplWinQueueStatusToSal( pWinInfo2->Status );
pInfo->mnJobs = pWinInfo2->cJobs;
if( ! pInfo->mpSysData )
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 938a710f6017..25bb9a21a734 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -4632,7 +4632,7 @@ static int ImplMeasureItem( HWND hWnd, WPARAM wParam, LPARAM lParam )
HFONT hfntOld = (HFONT) SelectObject(hdc, (HFONT) CreateFontIndirect( &ncm.lfMenuFont ));
// menu text and accelerator
- String aStr(pSalMenuItem->mText.GetBuffer() );
+ String aStr(pSalMenuItem->mText);
if( pSalMenuItem->mAccelText.Len() )
{
aStr.AppendAscii(" ");
@@ -4775,7 +4775,7 @@ static int ImplDrawItem(HWND, WPARAM wParam, LPARAM lParam )
hfntOld = (HFONT) SelectObject(pDI->hDC, (HFONT) CreateFontIndirect( &ncm.lfMenuFont ));
SIZE strSize;
- String aStr( pSalMenuItem->mText.GetBuffer() );
+ String aStr( pSalMenuItem->mText );
GetTextExtentPoint32W( pDI->hDC, (LPWSTR) aStr.GetBuffer(),
aStr.Len(), &strSize );
@@ -5167,7 +5167,7 @@ static sal_Bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
{
WCHAR* pTextBuf = new WCHAR[nTextLen];
ImmGetCompositionStringW( hIMC, GCS_RESULTSTR, pTextBuf, nTextLen*sizeof( WCHAR ) );
- aEvt.maText = XubString( reinterpret_cast<const xub_Unicode*>(pTextBuf), (xub_StrLen)nTextLen );
+ aEvt.maText = rtl::OUString( reinterpret_cast<const xub_Unicode*>(pTextBuf), (sal_Int32)nTextLen );
delete [] pTextBuf;
}
@@ -5193,7 +5193,7 @@ static sal_Bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
{
WCHAR* pTextBuf = new WCHAR[nTextLen];
ImmGetCompositionStringW( hIMC, GCS_COMPSTR, pTextBuf, nTextLen*sizeof( WCHAR ) );
- aEvt.maText = XubString( reinterpret_cast<const xub_Unicode*>(pTextBuf), (xub_StrLen)nTextLen );
+ aEvt.maText = rtl::OUString( reinterpret_cast<const xub_Unicode*>(pTextBuf), (sal_Int32)nTextLen );
delete [] pTextBuf;
BYTE* pAttrBuf = NULL;