summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2012-02-18 14:40:11 +0100
committerThomas Arnhold <thomas@arnhold.org>2012-02-18 14:40:11 +0100
commitf2601ba087d9d21af09134703b12de2a1d1763f8 (patch)
tree73d1da35bf2e7c8e4b5e33449013e8440fa4ee8c /vcl
parent04af52609aef5b4ccbbf82553ac190ef43700652 (diff)
remove some unused windows code
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx116
-rw-r--r--vcl/win/source/gdi/salprn.cxx1
-rw-r--r--vcl/win/source/window/salframe.cxx19
3 files changed, 0 insertions, 136 deletions
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 692005d14836..e3e94b4a3f3a 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1228,8 +1228,6 @@ sal_IntPtr ImplWinFontData::GetFontId() const
// -----------------------------------------------------------------------
static unsigned GetUInt( const unsigned char* p ) { return((p[0]<<24)+(p[1]<<16)+(p[2]<<8)+p[3]);}
-static unsigned GetUShort( const unsigned char* p ){ return((p[0]<<8)+p[1]);}
-//static signed GetSShort( const unsigned char* p ){ return((short)((p[0]<<8)+p[1]));}
static inline DWORD CalcTag( const char p[4]) { return (p[0]+(p[1]<<8)+(p[2]<<16)+(p[3]<<24)); }
// -----------------------------------------------------------------------
@@ -1807,120 +1805,6 @@ int CALLBACK SalEnumCharSetsProcExA( const ENUMLOGFONTEXA* pLogFont,
// -----------------------------------------------------------------------
-static void ImplGetAllFontCharSets( WinSalGraphics* pData )
-{
- if ( !pData->mpFontCharSets )
- pData->mpFontCharSets = new BYTE[256];
-
- LOGFONTA aLogFont;
- memset( &aLogFont, 0, sizeof( aLogFont ) );
- aLogFont.lfCharSet = DEFAULT_CHARSET;
- GetTextFaceA( pData->mhDC, sizeof( aLogFont.lfFaceName ), aLogFont.lfFaceName );
- EnumFontFamiliesExA( pData->mhDC, &aLogFont, (FONTENUMPROCA)SalEnumCharSetsProcExA,
- (LPARAM)(void*)pData, 0 );
-}
-
-// -----------------------------------------------------------------------
-
-static void ImplAddKerningPairs( WinSalGraphics* pData )
-{
- sal_uLong nPairs = ::GetKerningPairsA( pData->mhDC, 0, NULL );
- if ( !nPairs )
- return;
-
- CHARSETINFO aInfo;
- if ( !TranslateCharsetInfo( (DWORD*)(sal_uLong)GetTextCharset( pData->mhDC ), &aInfo, TCI_SRCCHARSET ) )
- return;
-
- if ( !pData->mpFontKernPairs )
- pData->mpFontKernPairs = new KERNINGPAIR[nPairs];
- else
- {
- KERNINGPAIR* pOldPairs = pData->mpFontKernPairs;
- pData->mpFontKernPairs = new KERNINGPAIR[nPairs+pData->mnFontKernPairCount];
- memcpy( pData->mpFontKernPairs, pOldPairs,
- pData->mnFontKernPairCount*sizeof( KERNINGPAIR ) );
- delete[] pOldPairs;
- }
-
- UINT nCP = aInfo.ciACP;
- sal_uLong nOldPairs = pData->mnFontKernPairCount;
- KERNINGPAIR* pTempPair = pData->mpFontKernPairs+pData->mnFontKernPairCount;
- nPairs = ::GetKerningPairsA( pData->mhDC, nPairs, pTempPair );
- for ( sal_uLong i = 0; i < nPairs; i++ )
- {
- unsigned char aBuf[2];
- wchar_t nChar;
- int nLen;
- sal_Bool bAdd = TRUE;
-
- // None-ASCII?, then we must convert the char
- if ( (pTempPair->wFirst > 125) || (pTempPair->wFirst == 92) )
- {
- if ( pTempPair->wFirst < 256 )
- {
- aBuf[0] = (unsigned char)pTempPair->wFirst;
- nLen = 1;
- }
- else
- {
- aBuf[0] = (unsigned char)(pTempPair->wFirst >> 8);
- aBuf[1] = (unsigned char)(pTempPair->wFirst & 0xFF);
- nLen = 2;
- }
- if ( MultiByteToWideChar( nCP, MB_PRECOMPOSED | MB_USEGLYPHCHARS,
- (const char*)aBuf, nLen, &nChar, 1 ) )
- pTempPair->wFirst = nChar;
- else
- bAdd = FALSE;
- }
- if ( (pTempPair->wSecond > 125) || (pTempPair->wSecond == 92) )
- {
- if ( pTempPair->wSecond < 256 )
- {
- aBuf[0] = (unsigned char)pTempPair->wSecond;
- nLen = 1;
- }
- else
- {
- aBuf[0] = (unsigned char)(pTempPair->wSecond >> 8);
- aBuf[1] = (unsigned char)(pTempPair->wSecond & 0xFF);
- nLen = 2;
- }
- if ( MultiByteToWideChar( nCP, MB_PRECOMPOSED | MB_USEGLYPHCHARS,
- (const char*)aBuf, nLen, &nChar, 1 ) )
- pTempPair->wSecond = nChar;
- else
- bAdd = FALSE;
- }
-
- // TODO: get rid of linear search!
- KERNINGPAIR* pTempPair2 = pData->mpFontKernPairs;
- for ( sal_uLong j = 0; j < nOldPairs; j++ )
- {
- if ( (pTempPair2->wFirst == pTempPair->wFirst) &&
- (pTempPair2->wSecond == pTempPair->wSecond) )
- {
- bAdd = FALSE;
- break;
- }
- pTempPair2++;
- }
-
- if ( bAdd )
- {
- KERNINGPAIR* pDestPair = pData->mpFontKernPairs+pData->mnFontKernPairCount;
- if ( pDestPair != pTempPair )
- memcpy( pDestPair, pTempPair, sizeof( KERNINGPAIR ) );
- pData->mnFontKernPairCount++;
- }
-
- pTempPair++;
- }
-}
-
-// -----------------------------------------------------------------------
-
sal_uLong WinSalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs )
{
DBG_ASSERT( sizeof( KERNINGPAIR ) == sizeof( ImplKernPairData ),
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index 53b54ed21c5b..99133ec3816c 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -105,7 +105,6 @@ using ::rtl::OUString;
// =======================================================================
static char aImplWindows[] = "windows";
-static char aImplDevices[] = "devices";
static char aImplDevice[] = "device";
static LPDEVMODEW SAL_DEVMODE_W( const ImplJobSetup* pSetupData )
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 6a2a16ff7a8f..2243e219a83b 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -3472,32 +3472,13 @@ static sal_uInt16 ImplSalGetKeyCode( WPARAM wParam )
// -----------------------------------------------------------------------
-static UINT ImplStrToNum( const sal_Char* pStr )
-{
- sal_uInt16 n = 0;
-
- // Solange es sich um eine Ziffer handelt, String umwandeln
- while( (*pStr >= 48) && (*pStr <= 57) )
- {
- n *= 10;
- n += ((*pStr) - 48);
- pStr++;
- }
-
- return n;
-}
-
-// -----------------------------------------------------------------------
-
static void ImplUpdateInputLang( WinSalFrame* pFrame )
{
- sal_Bool bLanguageChange = FALSE;
UINT nLang = LOWORD( GetKeyboardLayout( 0 ) );
if ( nLang && nLang != pFrame->mnInputLang )
{
// keep input lang up-to-date
pFrame->mnInputLang = nLang;
- bLanguageChange = TRUE;
}
// We are on Windows NT so we use Unicode FrameProcs and get