summaryrefslogtreecommitdiff
path: root/vcl/win/source/window/salframe.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/win/source/window/salframe.cxx')
-rw-r--r--vcl/win/source/window/salframe.cxx29
1 files changed, 15 insertions, 14 deletions
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 78c4e4e6ddcc..fc92757e0925 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -39,6 +39,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
#include <comphelper/processfactory.hxx>
+#include <unotools/misccfg.hxx>
#include <string.h>
#include <limits.h>
@@ -2158,15 +2159,15 @@ static void ImplSalToTop( HWND hWnd, USHORT nFlags )
if ( nFlags & SAL_FRAME_TOTOP_FOREGROUNDTASK )
{
- // This magic code is necessary to connect the input focus of the
- // current window thread and the thread which owns the window that
- // should be the new foreground window.
- HWND hCurrWnd = GetForegroundWindow();
- DWORD myThreadID = GetCurrentThreadId();
- DWORD currThreadID = GetWindowThreadProcessId(hCurrWnd,NULL);
- AttachThreadInput(myThreadID, currThreadID,TRUE);
- SetForegroundWindow(hWnd);
- AttachThreadInput(myThreadID,currThreadID,FALSE);
+ // This magic code is necessary to connect the input focus of the
+ // current window thread and the thread which owns the window that
+ // should be the new foreground window.
+ HWND hCurrWnd = GetForegroundWindow();
+ DWORD myThreadID = GetCurrentThreadId();
+ DWORD currThreadID = GetWindowThreadProcessId(hCurrWnd,NULL);
+ AttachThreadInput(myThreadID, currThreadID,TRUE);
+ SetForegroundWindow(hWnd);
+ AttachThreadInput(myThreadID,currThreadID,FALSE);
}
if ( nFlags & SAL_FRAME_TOTOP_RESTOREWHENMIN )
@@ -3095,7 +3096,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
if ( (nValue > 1000) && (nValue < 10000) )
{
MiscSettings aMiscSettings = rSettings.GetMiscSettings();
- aMiscSettings.SetTwoDigitYearStart( (USHORT)(nValue-99) );
+ utl::MiscCfg().SetYear2000( (sal_Int32)(nValue-99) );
rSettings.SetMiscSettings( aMiscSettings );
}
}
@@ -5436,7 +5437,7 @@ static 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 );
- delete pTextBuf;
+ delete [] pTextBuf;
}
aEvt.mnCursorPos = aEvt.maText.Len();
@@ -5462,7 +5463,7 @@ static 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 );
- delete pTextBuf;
+ delete [] pTextBuf;
WIN_BYTE* pAttrBuf = NULL;
LONG nAttrLen = ImmGetCompositionStringW( hIMC, GCS_COMPATTR, 0, 0 );
@@ -5498,7 +5499,7 @@ static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame,
}
aEvt.mpTextAttr = pSalAttrAry;
- delete pAttrBuf;
+ delete [] pAttrBuf;
}
}
@@ -5535,7 +5536,7 @@ static BOOL ImplHandleIMECompositionInput( WinSalFrame* pFrame,
}
if ( pSalAttrAry )
- delete pSalAttrAry;
+ delete [] pSalAttrAry;
}
return !bDef;