[Libreoffice-commits] .: vcl/win
vcl/win/source/gdi/salnativewidgets-luna.cxx | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) New commits: commit a4cc4d3ec982ac61100b337125983afa0bb6fbc3 Author: Ivan Timofeev Date: Wed Apr 11 21:34:06 2012 +0400 vcl: win: fix RTL menu separator and gutter, checkmarks are still misplaced diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 2bc2f4b..bcf80cd 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -984,8 +984,16 @@ sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, if( nPart == PART_ENTIRE_CONTROL ) { RECT aGutterRC = rc; -aGutterRC.left += aValue.getNumericVal(); -aGutterRC.right = aGutterRC.left+3; +if( Application::GetSettings().GetLayoutRTL() ) +{ +aGutterRC.right -= aValue.getNumericVal(); +aGutterRC.left = aGutterRC.right-3; +} +else +{ +aGutterRC.left += aValue.getNumericVal(); +aGutterRC.right = aGutterRC.left+3; +} return ImplDrawTheme( hTheme, hDC, MENU_POPUPBACKGROUND, 0, rc, aCaption ) && ImplDrawTheme( hTheme, hDC, MENU_POPUPGUTTER, 0, aGutterRC, aCaption ) @@ -1028,7 +1036,11 @@ sal_Bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, } else if( nPart == PART_MENU_SEPARATOR ) { -rc.left += aValue.getNumericVal(); // adjust for gutter position +// adjust for gutter position +if( Application::GetSettings().GetLayoutRTL() ) +rc.right -= aValue.getNumericVal(); +else +rc.left += aValue.getNumericVal(); Rectangle aRect( ImplGetThemeRect( hTheme, hDC, MENU_POPUPSEPARATOR, 0, Rectangle( rc.left, rc.top, rc.right, rc.bottom ) ) ); // center the separator inside the passed rectangle ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/gdi/salgdi3.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1613a4949fae679365996db2781c1fb26df9279f Author: LuboÅ¡ LuÅák Date: Tue Mar 13 11:27:49 2012 +0100 fix compile diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index 3e24d75..674567d 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -551,7 +551,7 @@ namespace const com::sun::star::lang::Locale& rLocale ) { // get the default font for a specified locale -const DefaultFontConfiguration& rDefaults = DefaultFontConfiguration::get(); +const DefaultFontConfiguration& rDefaults = utl::DefaultFontConfiguration::get(); const rtl::OUString aDefault = rDefaults.getUserInterfaceFont(rLocale); return rDevFontList.ImplFindByTokenNames(aDefault); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/app/salinst.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 244899285bfc515cca0a323f4aecf06b00342848 Author: Jesús Corrius Date: Thu Feb 2 12:00:02 2012 +0100 Try to fix the MinGW build with a simple solution diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index d491404..be70008 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -95,7 +95,7 @@ void SalAbort( const rtl::OUString& rErrorText, bool ) { // make sure crash reporter is triggered RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, NULL ); -FatalAppExitW( 0, rErrorText.getStr() ); +FatalAppExitW( 0, reinterpret_cast(rErrorText.getStr()) ); } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/app/saldata.cxx | 10 +- vcl/win/source/app/salinfo.cxx |8 vcl/win/source/app/salinst.cxx | 16 3 files changed, 17 insertions(+), 17 deletions(-) New commits: commit 37c198cf098976d4b6814017f3ac1a81b53d2fb5 Author: Jesús Corrius Date: Thu Feb 2 09:54:00 2012 +0100 Revert "Win32 API calls use the Unicode versions by default" This reverts commit 157a32f0dc2eaa195ff60e8b60902554e73e999f. The patch is good but it breaks the MinGW build because the compiler is misconfigured and by default the API calls there are ANSI. diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx index 617b03f..4445315 100644 --- a/vcl/win/source/app/saldata.cxx +++ b/vcl/win/source/app/saldata.cxx @@ -93,35 +93,35 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 ) BOOL ImplPostMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { -return PostMessage( hWnd, nMsg, wParam, lParam ); +return PostMessageW( hWnd, nMsg, wParam, lParam ); } // --- BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { -return SendMessage( hWnd, nMsg, wParam, lParam ); +return SendMessageW( hWnd, nMsg, wParam, lParam ); } // --- BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax ) { -return GetMessage( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax ); +return GetMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax ); } // --- BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg ) { -return PeekMessage( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg ); +return PeekMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg ); } // --- LONG ImplDispatchMessage( CONST MSG *lpMsg ) { -return DispatchMessage( lpMsg ); +return DispatchMessageW( lpMsg ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/win/source/app/salinfo.cxx b/vcl/win/source/app/salinfo.cxx index d370589..efd4d08 100644 --- a/vcl/win/source/app/salinfo.cxx +++ b/vcl/win/source/app/salinfo.cxx @@ -67,9 +67,9 @@ static BOOL CALLBACK ImplEnumMonitorProc( HMONITOR hMonitor, sal_Bool WinSalSystem::handleMonitorCallback( sal_IntPtr hMonitor, sal_IntPtr, sal_IntPtr ) { -MONITORINFOEX aInfo; +MONITORINFOEXW aInfo; aInfo.cbSize = sizeof( aInfo ); -if( GetMonitorInfo( reinterpret_cast(hMonitor), &aInfo ) ) +if( GetMonitorInfoW( reinterpret_cast(hMonitor), &aInfo ) ) { aInfo.szDevice[CCHDEVICENAME-1] = 0; rtl::OUString aDeviceName( reinterpret_cast(aInfo.szDevice) ); @@ -127,7 +127,7 @@ bool WinSalSystem::initMonitors() aDev.cb = sizeof( aDev ); DWORD nDevice = 0; boost::unordered_map< rtl::OUString, int, rtl::OUStringHash > aDeviceStringCount; -while( EnumDisplayDevices( NULL, nDevice++, &aDev, 0 ) ) +while( EnumDisplayDevicesW( NULL, nDevice++, &aDev, 0 ) ) { if( (aDev.StateFlags & DISPLAY_DEVICE_ACTIVE) && !(aDev.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER) ) // sort out non/disabled monitors @@ -236,7 +236,7 @@ int WinSalSystem::ShowNativeMessageBox(const rtl::OUString& rTitle, const rtl::O nFlags |= DEFAULT_BTN_MAPPING_TABLE[nButtonCombination][nDefaultButton]; ImplHideSplash(); -return MessageBox( +return MessageBoxW( 0, reinterpret_cast(rMessage.getStr()), reinterpret_cast(rTitle.getStr()), diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index c75ee06..d491404 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -89,13 +89,13 @@ void SalAbort( const rtl::OUString& rErrorText, bool ) { // make sure crash reporter is triggered RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, NULL ); -FatalAppExit( 0, L"Application Error" ); +FatalAppExitW( 0, L"Application Error" ); } else { // make sure crash reporter is triggered RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, NULL ); -FatalAppExit( 0, rErrorText.getStr() ); +FatalAppExitW( 0, rErrorText.getStr() ); } } @@ -521,32 +521,32 @@ SalInstance* CreateSalInstance() aWndClassEx.lpszMenuName= 0; aWndClassEx.lpszClassName = SAL_FRAME_CLASSNAMEW; ImplLoadSalIcon( SAL_RESID_ICON_DEFAULT, aWndClassEx.hIcon, aWndClassEx.hIconSm ); -if ( !RegisterClassEx( &aWndClassEx ) ) +if ( !RegisterClassExW( &aWndClassEx ) ) return NULL; aWndClassEx.hIcon
[Libreoffice-commits] .: vcl/win
vcl/win/source/window/salframe.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 54d278ae5feea82d105e4bd11d554ad5fcb41099 Author: Korrawit Pruegsanusak Date: Thu Feb 2 09:44:10 2012 +0700 missing semicolon diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index c21f95b..6a2a16f 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -1107,7 +1107,7 @@ void WinSalFrame::SetTitle( const rtl::OUString& rTitle ) { DBG_ASSERT( sizeof( WCHAR ) == sizeof( xub_Unicode ), "WinSalFrame::SetTitle(): WCHAR != sal_Unicode" ); -SetWindowTextW( mhWnd, reinterpret_cast(rTitle.getStr()) ) +SetWindowTextW( mhWnd, reinterpret_cast(rTitle.getStr()) ); } // --- ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/app/saldata.cxx | 10 +- vcl/win/source/app/salinfo.cxx |8 vcl/win/source/app/salinst.cxx | 16 3 files changed, 17 insertions(+), 17 deletions(-) New commits: commit 157a32f0dc2eaa195ff60e8b60902554e73e999f Author: Jesús Corrius Date: Thu Feb 2 00:09:53 2012 +0100 Win32 API calls use the Unicode versions by default diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx index 4445315..617b03f 100644 --- a/vcl/win/source/app/saldata.cxx +++ b/vcl/win/source/app/saldata.cxx @@ -93,35 +93,35 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 ) BOOL ImplPostMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { -return PostMessageW( hWnd, nMsg, wParam, lParam ); +return PostMessage( hWnd, nMsg, wParam, lParam ); } // --- BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { -return SendMessageW( hWnd, nMsg, wParam, lParam ); +return SendMessage( hWnd, nMsg, wParam, lParam ); } // --- BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax ) { -return GetMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax ); +return GetMessage( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax ); } // --- BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg ) { -return PeekMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg ); +return PeekMessage( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg ); } // --- LONG ImplDispatchMessage( CONST MSG *lpMsg ) { -return DispatchMessageW( lpMsg ); +return DispatchMessage( lpMsg ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/win/source/app/salinfo.cxx b/vcl/win/source/app/salinfo.cxx index efd4d08..d370589 100644 --- a/vcl/win/source/app/salinfo.cxx +++ b/vcl/win/source/app/salinfo.cxx @@ -67,9 +67,9 @@ static BOOL CALLBACK ImplEnumMonitorProc( HMONITOR hMonitor, sal_Bool WinSalSystem::handleMonitorCallback( sal_IntPtr hMonitor, sal_IntPtr, sal_IntPtr ) { -MONITORINFOEXW aInfo; +MONITORINFOEX aInfo; aInfo.cbSize = sizeof( aInfo ); -if( GetMonitorInfoW( reinterpret_cast(hMonitor), &aInfo ) ) +if( GetMonitorInfo( reinterpret_cast(hMonitor), &aInfo ) ) { aInfo.szDevice[CCHDEVICENAME-1] = 0; rtl::OUString aDeviceName( reinterpret_cast(aInfo.szDevice) ); @@ -127,7 +127,7 @@ bool WinSalSystem::initMonitors() aDev.cb = sizeof( aDev ); DWORD nDevice = 0; boost::unordered_map< rtl::OUString, int, rtl::OUStringHash > aDeviceStringCount; -while( EnumDisplayDevicesW( NULL, nDevice++, &aDev, 0 ) ) +while( EnumDisplayDevices( NULL, nDevice++, &aDev, 0 ) ) { if( (aDev.StateFlags & DISPLAY_DEVICE_ACTIVE) && !(aDev.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER) ) // sort out non/disabled monitors @@ -236,7 +236,7 @@ int WinSalSystem::ShowNativeMessageBox(const rtl::OUString& rTitle, const rtl::O nFlags |= DEFAULT_BTN_MAPPING_TABLE[nButtonCombination][nDefaultButton]; ImplHideSplash(); -return MessageBoxW( +return MessageBox( 0, reinterpret_cast(rMessage.getStr()), reinterpret_cast(rTitle.getStr()), diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index d491404..c75ee06 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -89,13 +89,13 @@ void SalAbort( const rtl::OUString& rErrorText, bool ) { // make sure crash reporter is triggered RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, NULL ); -FatalAppExitW( 0, L"Application Error" ); +FatalAppExit( 0, L"Application Error" ); } else { // make sure crash reporter is triggered RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, NULL ); -FatalAppExitW( 0, rErrorText.getStr() ); +FatalAppExit( 0, rErrorText.getStr() ); } } @@ -521,32 +521,32 @@ SalInstance* CreateSalInstance() aWndClassEx.lpszMenuName= 0; aWndClassEx.lpszClassName = SAL_FRAME_CLASSNAMEW; ImplLoadSalIcon( SAL_RESID_ICON_DEFAULT, aWndClassEx.hIcon, aWndClassEx.hIconSm ); -if ( !RegisterClassExW( &aWndClassEx ) ) +if ( !RegisterClassEx( &aWndClassEx ) ) return NULL; aWndClassEx.hIcon = 0; aWndClassEx.hIconSm = 0; aWndClassEx.style |= CS_SAVEBITS; aWndClassEx.lpszClassName = SAL_SUBFRAME_CLASSNAMEW; -if ( !RegisterClassExW( &aWndClass
[Libreoffice-commits] .: vcl/win
vcl/win/source/window/salframe.cxx |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) New commits: commit e1e8bd19a6acf5526f6bb3d9006ecb37ff01c89d Author: Andras Timar Date: Wed Feb 1 16:00:59 2012 +0100 kill ByteString by dropping support of Win9x diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 6c8dce8..c21f95b 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -1107,11 +1107,7 @@ void WinSalFrame::SetTitle( const rtl::OUString& rTitle ) { DBG_ASSERT( sizeof( WCHAR ) == sizeof( xub_Unicode ), "WinSalFrame::SetTitle(): WCHAR != sal_Unicode" ); -if ( !SetWindowTextW( mhWnd, reinterpret_cast(rTitle.getStr()) ) ) -{ -ByteString aAnsiTitle = ImplSalGetWinAnsiString( rTitle ); -SetWindowTextA( mhWnd, aAnsiTitle.GetBuffer() ); -} +SetWindowTextW( mhWnd, reinterpret_cast(rTitle.getStr()) ) } // --- ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/app/salinst.cxx |9 - 1 file changed, 4 insertions(+), 5 deletions(-) New commits: commit 56549a939cdf3a2510bbdba21b72632a4f238cf5 Author: Andras Timar Date: Wed Feb 1 15:56:34 2012 +0100 ByteString -> OUString diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index d0a6bd0..d491404 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -87,16 +87,15 @@ void SalAbort( const rtl::OUString& rErrorText, bool ) if ( rErrorText.isEmpty() ) { -// #112255# make sure crash reporter is triggered +// make sure crash reporter is triggered RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, NULL ); -FatalAppExit( 0, "Application Error" ); +FatalAppExitW( 0, L"Application Error" ); } else { -// #112255# make sure crash reporter is triggered +// make sure crash reporter is triggered RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, NULL ); -ByteString aErrorText( ImplSalGetWinAnsiString( rErrorText ) ); -FatalAppExit( 0, aErrorText.GetBuffer() ); +FatalAppExitW( 0, rErrorText.getStr() ); } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/gdi/salprn.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit ff9a823e1007c3473072422e38512e3be0177fa4 Author: Andras Timar Date: Wed Feb 1 15:30:38 2012 +0100 unused variable diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index 4bafcd2..53b54ed 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -326,7 +326,6 @@ static sal_Bool ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter, // this prevents using the jobsetup between different Windows versions (eg from XP to 9x) but we // can avoid potential driver crashes as their jobsetups are often not compatible // #110800#, #51#, #112381#, #i16580#, #i14173# and perhaps #112375# -ByteString aPrinterNameA= ImplSalGetWinAnsiString( pPrinter->maDeviceName, TRUE ); HANDLE hPrn; LPWSTR pPrinterNameW = reinterpret_cast(const_cast(pPrinter->maDeviceName.getStr())); if ( !OpenPrinterW( pPrinterNameW, &hPrn, NULL ) ) @@ -392,7 +391,6 @@ static sal_Bool ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter, static sal_Bool ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, sal_Bool bIn, WinSalFrame* pVisibleDlgParent ) { -ByteString aPrinterNameA = ImplSalGetWinAnsiString( pPrinter->maDeviceName, TRUE ); HANDLE hPrn; LPWSTR pPrinterNameW = reinterpret_cast(const_cast(pPrinter->maDeviceName.getStr())); if ( !OpenPrinterW( pPrinterNameW, &hPrn, NULL ) ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/app/salinst.cxx |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) New commits: commit 9b6cb7319e46a2da6f5d3e3f748f103cb508f698 Author: Julien Nabet Date: Mon Jan 30 21:16:20 2012 +0100 Just some simplification diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index 196b013..d0a6bd0 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -329,15 +329,13 @@ void ImplSalAcquireYieldMutex( sal_uLong nCount ) bool WinSalInstance::CheckYieldMutex() { -bool bRet = true; SalData*pSalData = GetSalData(); -DWORD nCurThreadId = GetCurrentThreadId(); if ( pSalData->mpFirstInstance ) { SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex; -bRet = (pYieldMutex->mnThreadId == nCurThreadId); +return (pYieldMutex->mnThreadId == (GetCurrentThreadId())); } -return bRet; +return true; } // === ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/app/salinst.cxx | 23 +++ 1 file changed, 3 insertions(+), 20 deletions(-) New commits: commit 6c779863bbd25499f4c7dff7d201403ebef898be Author: Julien Nabet Date: Mon Jan 30 19:00:00 2012 +0100 Fix "Found duplicate branches for if and else" diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index bf1b89f..196b013 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -332,27 +332,10 @@ bool WinSalInstance::CheckYieldMutex() bool bRet = true; SalData*pSalData = GetSalData(); DWORD nCurThreadId = GetCurrentThreadId(); -if ( pSalData->mnAppThreadId != nCurThreadId ) -{ -if ( pSalData->mpFirstInstance ) -{ -SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex; -if ( pYieldMutex->mnThreadId != nCurThreadId ) -{ -bRet = false; -} -} -} -else +if ( pSalData->mpFirstInstance ) { -if ( pSalData->mpFirstInstance ) -{ -SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex; -if ( pYieldMutex->mnThreadId != nCurThreadId ) -{ -bRet = false; -} -} +SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex; +bRet = (pYieldMutex->mnThreadId == nCurThreadId); } return bRet; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/app/salinfo.cxx |5 - 1 file changed, 5 deletions(-) New commits: commit b327c8355cd6e4e6d0a4b1bda0591c4d3964bff8 Author: Matúš Kukan Date: Sun Jan 15 12:08:14 2012 +0100 vcl: fix MinGW build diff --git a/vcl/win/source/app/salinfo.cxx b/vcl/win/source/app/salinfo.cxx index 3d3f487..efd4d08 100644 --- a/vcl/win/source/app/salinfo.cxx +++ b/vcl/win/source/app/salinfo.cxx @@ -179,11 +179,6 @@ unsigned int WinSalSystem::GetDisplayScreenCount() return m_aMonitors.size(); } -bool WinSalSystem::IsMultiDisplay() -{ -return false; -} - unsigned int WinSalSystem::GetDisplayDefaultScreen() { initMonitors(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/gdi/salprn.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bce71931ab08ef741b324664d9a69b3be1ff7a3b Author: Lionel Elie Mamane Date: Mon Nov 21 14:30:45 2011 +0100 Oups... Disambiguation solved another way in 1c2f5d diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index bcfc850..5f58cb7 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -368,7 +368,7 @@ static sal_Bool ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter, } SalDriverData* pSetupDriverData = (SalDriverData*)(pSetupData->mpDriverData); if ( (pSetupData->mnSystem == JOBSETUP_SYSTEM_WINDOWS) && - (OUString(pPrinter->maDriverName) == pSetupData->maDriver) && + (pPrinter->maDriverName == pSetupData->maDriver) && (pSetupData->mnDriverDataLen > sizeof( SalDriverData )) && (long)(pSetupData->mnDriverDataLen - pSetupDriverData->mnDriverOffset) == nSysJobSize && pSetupDriverData->mnSysSignature == SAL_DRIVERDATA_SYSSIGN ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/gdi/salprn.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 96d01c8f07478f4241f014145a64c57b041f0d44 Author: Lionel Elie Mamane Date: Mon Nov 21 14:14:40 2011 +0100 disambiguate (OU)?String comparison into OUString comparison diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index 5f58cb7..bcfc850 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -368,7 +368,7 @@ static sal_Bool ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter, } SalDriverData* pSetupDriverData = (SalDriverData*)(pSetupData->mpDriverData); if ( (pSetupData->mnSystem == JOBSETUP_SYSTEM_WINDOWS) && - (pPrinter->maDriverName == pSetupData->maDriver) && + (OUString(pPrinter->maDriverName) == pSetupData->maDriver) && (pSetupData->mnDriverDataLen > sizeof( SalDriverData )) && (long)(pSetupData->mnDriverDataLen - pSetupDriverData->mnDriverOffset) == nSysJobSize && pSetupDriverData->mnSysSignature == SAL_DRIVERDATA_SYSSIGN ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/gdi/salgdi3.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ce60138d339a5eb2a174a5d27063249acf2cac42 Author: Caolán McNamara Date: Mon Nov 21 13:11:46 2011 + link error diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index 58ec98f..71066ac 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -2169,7 +2169,7 @@ static int WINAPI __AddFontResourceExW( LPCWSTR lpszfileName, DWORD fl, PVOID pd } #endif -bool ImplAddTempFont( SalData& rSalData, const String& rFontFileURL ) +bool ImplAddTempFont( SalData& rSalData, const rtl::OUString& rFontFileURL ) { int nRet = 0; ::rtl::OUString aUSytemPath; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/gdi/winlayout.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 6a9593f8825c1c91007099ceae8ed0c497693ae9 Author: Caolán McNamara Date: Mon Nov 21 12:53:58 2011 + trailing/missing , diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index dbcd2ce..bed53a1 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -268,9 +268,9 @@ SimpleWinLayout::SimpleWinLayout( HDC hDC, BYTE nCharSet, mpGlyphs2Chars( NULL ), mpGlyphRTLFlags( NULL ), mnWidth( 0 ), -mbDisableGlyphs( false ) +mbDisableGlyphs( false ), mnNotdefWidth( -1 ), -mnCharSet( nCharSet ), +mnCharSet( nCharSet ) { mbDisableGlyphs = true; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/app/salinfo.cxx |4 ++-- vcl/win/source/gdi/salprn.cxx |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit e1de8237d5f8d5ac1db3c6eb4567eaffe2e7bd86 Author: Caolán McNamara Date: Mon Nov 21 11:01:56 2011 + these need to be getStr post OUString-ization diff --git a/vcl/win/source/app/salinfo.cxx b/vcl/win/source/app/salinfo.cxx index 9ac68b0..2db9090 100644 --- a/vcl/win/source/app/salinfo.cxx +++ b/vcl/win/source/app/salinfo.cxx @@ -246,8 +246,8 @@ int WinSalSystem::ShowNativeMessageBox(const rtl::OUString& rTitle, const rtl::O ImplHideSplash(); return MessageBoxW( 0, -reinterpret_cast(rMessage.GetBuffer()), -reinterpret_cast(rTitle.GetBuffer()), +reinterpret_cast(rMessage.getStr()), +reinterpret_cast(rTitle.getStr()), nFlags); } diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index b8f79d8..0da87bd 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -210,7 +210,7 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList ) void WinSalInstance::GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) { HANDLE hPrinter = 0; -LPWSTR pPrnName = reinterpret_cast(const_cast(pInfo->maPrinterName.GetBuffer())); +LPWSTR pPrnName = reinterpret_cast(const_cast(pInfo->maPrinterName.getStr())); if( OpenPrinterW( pPrnName, &hPrinter, NULL ) ) { DWORD nBytes = 0; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/win
vcl/win/source/window/salframe.cxx |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) New commits: commit 42b8e37570356beaded307fa744046a2ff40c0de Author: Jan Holesovsky Date: Sun Oct 9 20:50:50 2011 +0200 Make the key names look better under wine. diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index cfe05d7..488ff47 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -2429,10 +2429,9 @@ static void ImplGetKeyNameText( LONG lParam, sal_Unicode* pBuf, if( nKeyLen > 0 ) { -if( nKeyLen + rCount > nMaxSize ) -nKeyLen = nMaxSize - rCount; -memcpy( pBuf+rCount, aKeyBuf, nKeyLen*sizeof( sal_Unicode ) ); -rCount += nKeyLen; +WCHAR *pW = aKeyBuf, *pE = aKeyBuf + nKeyLen; +while( *pW && (pW < pE) && (rCount < nMaxSize) ) +pBuf[rCount++] = *pW++; } else // fall back to provided default name { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits