From 1fc79e17babe1511326f289e3539772674be9562 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Fri, 13 Aug 2010 17:00:29 +0200 Subject: #i113604# fix some charmap refcounting issues --- vcl/os2/source/gdi/salgdi3.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'vcl/os2/source') diff --git a/vcl/os2/source/gdi/salgdi3.cxx b/vcl/os2/source/gdi/salgdi3.cxx index e25e68ee5a4c..864fa7a1615d 100644 --- a/vcl/os2/source/gdi/salgdi3.cxx +++ b/vcl/os2/source/gdi/salgdi3.cxx @@ -592,6 +592,7 @@ void ImplOs2FontData::ReadCmapTable( HPS hPS ) const aResult.mpPairCodes, aResult.mpStartGlyphs ); else mpUnicodeMap = ImplFontCharMap::GetDefaultMap(); + mpUnicodeMap->AddReference(); } // ======================================================================= -- cgit From 34c6b390e191e8aca888ccc52351fc469f59b663 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 15 Sep 2010 12:01:51 +0200 Subject: #i113861# shared ImplFontCharMap objects better be constant --- vcl/os2/source/gdi/salgdi3.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vcl/os2/source') diff --git a/vcl/os2/source/gdi/salgdi3.cxx b/vcl/os2/source/gdi/salgdi3.cxx index 864fa7a1615d..5e94c0bd3a8b 100644 --- a/vcl/os2/source/gdi/salgdi3.cxx +++ b/vcl/os2/source/gdi/salgdi3.cxx @@ -434,7 +434,7 @@ bool ImplOs2FontData::IsGSUBstituted( sal_Ucs cChar ) const // ----------------------------------------------------------------------- -ImplFontCharMap* ImplOs2FontData::GetImplFontCharMap() const +const ImplFontCharMap* ImplOs2FontData::GetImplFontCharMap() const { mpUnicodeMap->AddReference(); return mpUnicodeMap; @@ -1000,10 +1000,10 @@ ULONG Os2SalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ) // ----------------------------------------------------------------------- -static ImplFontCharMap* pOs2DefaultImplFontCharMap = NULL; +static const ImplFontCharMap* pOs2DefaultImplFontCharMap = NULL; static const sal_uInt32 pOs2DefaultRangeCodes[] = {0x0020,0x00FF}; -ImplFontCharMap* Os2SalGraphics::GetImplFontCharMap() const +const ImplFontCharMap* Os2SalGraphics::GetImplFontCharMap() const { if( !mpOs2FontData[0] ) return ImplFontCharMap::GetDefaultMap(); @@ -1706,7 +1706,7 @@ void Os2SalGraphics::GetGlyphWidths( const ImplFontData* pFont, rUnicodeEnc.clear(); } const ImplOs2FontData* pWinFont = static_cast(pFont); - ImplFontCharMap* pMap = pWinFont->GetImplFontCharMap(); + const ImplFontCharMap* pMap = pWinFont->GetImplFontCharMap(); DBG_ASSERT( pMap && pMap->GetCharCount(), "no map" ); int nCharCount = pMap->GetCharCount(); -- cgit From 614f61017e5ad1b2cdb12f906f8aa928bd2d0877 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 15 Sep 2010 15:28:09 +0200 Subject: #i113861# make ImplFontCharMap ref-counting consistent on all platforms --- vcl/os2/source/gdi/salgdi3.cxx | 1 - 1 file changed, 1 deletion(-) (limited to 'vcl/os2/source') diff --git a/vcl/os2/source/gdi/salgdi3.cxx b/vcl/os2/source/gdi/salgdi3.cxx index 5e94c0bd3a8b..0e4cb1d58b0f 100644 --- a/vcl/os2/source/gdi/salgdi3.cxx +++ b/vcl/os2/source/gdi/salgdi3.cxx @@ -436,7 +436,6 @@ bool ImplOs2FontData::IsGSUBstituted( sal_Ucs cChar ) const const ImplFontCharMap* ImplOs2FontData::GetImplFontCharMap() const { - mpUnicodeMap->AddReference(); return mpUnicodeMap; } -- cgit From 6b2736fed5bb3c5e7949be2baa4a50c9a9c9b3e2 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 8 Oct 2010 11:48:35 +0200 Subject: vcl116: #i114958# implement DBG_TESTSOALRMUTEX on all platforms --- vcl/os2/source/app/salinst.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'vcl/os2/source') diff --git a/vcl/os2/source/app/salinst.cxx b/vcl/os2/source/app/salinst.cxx index b08a9769ccf4..df564f36ee0a 100644 --- a/vcl/os2/source/app/salinst.cxx +++ b/vcl/os2/source/app/salinst.cxx @@ -298,10 +298,9 @@ void ImplSalAcquireYieldMutex( ULONG nCount ) // ----------------------------------------------------------------------- -#ifdef DBG_UTIL - -void ImplDbgTestSolarMutex() +bool Os2SalInstance::CheckYieldMutex() { + bool bRet = true; SalData* pSalData = GetSalData(); ULONG nCurThreadId = GetCurrentThreadId(); if ( pSalData->mnAppThreadId != nCurThreadId ) @@ -311,7 +310,7 @@ void ImplDbgTestSolarMutex() SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex; if ( pYieldMutex->mnThreadId != nCurThreadId ) { - DBG_ERROR( "SolarMutex not locked, and not thread save code in VCL is called from outside of the main thread" ); + bRet = false; } } } @@ -322,14 +321,13 @@ void ImplDbgTestSolarMutex() SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex; if ( pYieldMutex->mnThreadId != nCurThreadId ) { - DBG_ERROR( "SolarMutex not locked in the main thread" ); + bRet = false; } } } + return bRet; } -#endif - // ======================================================================= void InitSalData() -- cgit From 95433a2374cae162aa2856b7c52a76d44ebd4509 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 8 Oct 2010 17:33:55 +0200 Subject: vcl116: #i114993# fix assertion, native menu cleanup --- vcl/os2/source/window/makefile.mk | 2 +- vcl/os2/source/window/salmenu.cxx | 132 -------------------------------------- 2 files changed, 1 insertion(+), 133 deletions(-) delete mode 100644 vcl/os2/source/window/salmenu.cxx (limited to 'vcl/os2/source') diff --git a/vcl/os2/source/window/makefile.mk b/vcl/os2/source/window/makefile.mk index f4a6ad0cb870..560d35880b21 100644 --- a/vcl/os2/source/window/makefile.mk +++ b/vcl/os2/source/window/makefile.mk @@ -40,7 +40,7 @@ CXXFILES__YD= salframe.cxx \ salobj.cxx SLOFILES= $(SLO)$/salframe.obj \ - $(SLO)$/salobj.obj $(SLO)$/salmenu.obj + $(SLO)$/salobj.obj # --- Targets ------------------------------------------------------ diff --git a/vcl/os2/source/window/salmenu.cxx b/vcl/os2/source/window/salmenu.cxx deleted file mode 100644 index 339ab5dbfadb..000000000000 --- a/vcl/os2/source/window/salmenu.cxx +++ /dev/null @@ -1,132 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#define INCL_DOS -#define INCL_PM -#define INCL_WIN -#include -#include -#include -#include - - -// ======================================================================= - -// Os2SalInst factory methods - -SalMenu* Os2SalInstance::CreateMenu( BOOL bMenuBar ) -{ - return NULL; // no support for native menues -} - -void Os2SalInstance::DestroyMenu( SalMenu* pSalMenu ) -{ - delete pSalMenu; -} - - -SalMenuItem* Os2SalInstance::CreateMenuItem( const SalItemParams* pItemData ) -{ - return NULL; // no support for native menues -} - -void Os2SalInstance::DestroyMenuItem( SalMenuItem* pSalMenuItem ) -{ - delete pSalMenuItem; -} - - -// ======================================================================= - - -/* - * Os2SalMenu - */ - - -Os2SalMenu::~Os2SalMenu() -{ -} - -BOOL Os2SalMenu::VisibleMenuBar() -{ - return FALSE; -} - -void Os2SalMenu::SetFrame( const SalFrame *pFrame ) -{ -} - -void Os2SalMenu::InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) -{ -} - -void Os2SalMenu::RemoveItem( unsigned nPos ) -{ -} - -void Os2SalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ) -{ -} - -void Os2SalMenu::CheckItem( unsigned nPos, BOOL bCheck ) -{ -} - -void Os2SalMenu::EnableItem( unsigned nPos, BOOL bEnable ) -{ -} - -void Os2SalMenu::SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ) -{ -} - -void Os2SalMenu::SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText ) -{ -} - -void Os2SalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ) -{ -} - -void Os2SalMenu::GetSystemMenuData( SystemMenuData* pData ) -{ -} - -// ======================================================================= - -/* - * SalMenuItem - */ - - -Os2SalMenuItem::~Os2SalMenuItem() -{ -} - -// ------------------------------------------------------------------- - -- cgit