[ooo-build-commit] Branch 'ooo/OOO320' - 2 commits - i18npool/source vcl/inc vcl/source vcl/win

Jan Holesovsky kendy at kemper.freedesktop.org
Tue Oct 27 01:48:50 PDT 2009


 i18npool/source/calendar/calendar_gregorian.cxx |   25 +++++++++++++++---------
 vcl/inc/vcl/window.hxx                          |    1 
 vcl/source/window/window.cxx                    |    2 -
 vcl/win/source/window/salframe.cxx              |   12 ++++++++++-
 4 files changed, 29 insertions(+), 11 deletions(-)

New commits:
commit bab8a9c6810c70ccc741899c0892f0760a239eb0
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Mon Oct 26 16:21:22 2009 +0000

    CWS-TOOLING: integrate CWS calc32stopper3_OOO320
    2009-10-12 14:26:09 +0200 er  r276833 : disable dump again
    2009-10-12 13:46:57 +0200 er  r276832 : #i102294# setValue: yet another DST glitch
    2009-10-12 13:21:48 +0200 iha  r276828 : #i105767# Y axis vanishes in case of zero rotated axis title
    2009-10-08 01:49:20 +0200 er  r276772 : NextSymbol: actually do reset ODF reference detection on file/sheet separator
    2009-10-08 00:18:58 +0200 er  r276771 : #i101639# use TabIDs in cached RangeArrays, not RefData Tabs
    2009-10-07 19:25:47 +0200 er  r276767 : #i105200# UpdateBroadcastAreas: hash key changes, remove area from all slots and reinsert
    2009-10-05 17:20:44 +0200 er  r276690 : #i105365# SI prefixes for ang, ang3, m/h, m/hr
    2009-10-05 16:21:29 +0200 er  r276686 : #i105161 intersection has higher precedence than union

diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx
index 7bed274..0001290 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -531,8 +531,8 @@ void Calendar_gregorian::setValue() throw(RuntimeException)
 
         bool bNeedZone = !(fieldSet & (1 << CalendarFieldIndex::ZONE_OFFSET));
         bool bNeedDST  = !(fieldSet & (1 << CalendarFieldIndex::DST_OFFSET));
-        sal_Int32 nZone1, nDST1, nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond, nZone, nDST;
-        nZone1 = nDST1 = nZone = nDST = 0;
+        sal_Int32 nZone1, nDST1, nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond, nZone0, nDST0;
+        nZone1 = nDST1 = nZone0 = nDST0 = 0;
         nYear = nMonth = nDay = nHour = nMinute = nSecond = nMilliSecond = -1;
         if ( bNeedZone || bNeedDST )
         {
@@ -581,19 +581,19 @@ void Calendar_gregorian::setValue() throw(RuntimeException)
             }
             if ( !(fieldSet & (1 << CalendarFieldIndex::ZONE_OFFSET)) )
             {
-                nZone = body->get( UCAL_ZONE_OFFSET, status = U_ZERO_ERROR);
+                nZone0 = body->get( UCAL_ZONE_OFFSET, status = U_ZERO_ERROR);
                 if ( !U_SUCCESS(status) )
-                    nZone = 0;
+                    nZone0 = 0;
             }
             if ( !(fieldSet & (1 << CalendarFieldIndex::DST_OFFSET)) )
             {
-                nDST = body->get( UCAL_DST_OFFSET, status = U_ZERO_ERROR);
+                nDST0 = body->get( UCAL_DST_OFFSET, status = U_ZERO_ERROR);
                 if ( !U_SUCCESS(status) )
-                    nDST = 0;
+                    nDST0 = 0;
             }
 
             // Submit values to obtain a time zone and DST corresponding to the date/time.
-            submitValues( nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond, nZone, nDST);
+            submitValues( nYear, nMonth, nDay, nHour, nMinute, nSecond, nMilliSecond, nZone0, nDST0);
 
             DUMP_ICU_CAL_MSG(("%s\n","setValue() in bNeedZone||bNeedDST after submitValues()"));
             DUMP_I18N_CAL_MSG(("%s\n","setValue() in bNeedZone||bNeedDST after submitValues()"));
@@ -605,7 +605,8 @@ void Calendar_gregorian::setValue() throw(RuntimeException)
                 nDST1 = 0;
         }
 
-        // The original submission, may lead to a different zone/DST.
+        // The original submission, may lead to a different zone/DST and 
+        // different date.
         submitFields();
         DUMP_ICU_CAL_MSG(("%s\n","setValue() after original submission"));
         DUMP_I18N_CAL_MSG(("%s\n","setValue() after original submission"));
@@ -619,7 +620,7 @@ void Calendar_gregorian::setValue() throw(RuntimeException)
             sal_Int32 nDST2 = body->get( UCAL_DST_OFFSET, status = U_ZERO_ERROR);
             if ( !U_SUCCESS(status) )
                 nDST2 = nDST1;
-            if ( nZone2 != nZone1 || nDST2 != nDST1 )
+            if ( nZone0 != nZone1 || nZone2 != nZone1 || nDST0 != nDST1 || nDST2 != nDST1 )
             {
                 // Due to different DSTs, resulting date values may differ if
                 // DST is onset at 00:00 and the very onsetRule date was
@@ -627,6 +628,12 @@ void Calendar_gregorian::setValue() throw(RuntimeException)
                 // is not what we want.
                 // Resubmit all values, this time including DST => date 01:00
                 // Similar for zone differences.
+                // If already the first full submission with nZone0 and nDST0 
+                // lead to date-1 23:00, the original submission was based on 
+                // that date if it wasn't a full date (nDST0 set, nDST1 not 
+                // set, nDST2==nDST1). If it was January 1st without year we're 
+                // even off by one year now. Resubmit all values including new 
+                // DST => date 00:00.
 
                 // Set field values accordingly in case they were used.
                 if (!bNeedZone)
commit b5c4c0f391854c8274ba6f79c02d532db675fa22
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Mon Oct 26 15:32:52 2009 +0000

    CWS-TOOLING: integrate CWS fwk123_OOO320
    2009-10-14 10:18:49 +0200 cd  r276885 : #i99971# Use AttachThreadInput to force SetForegroundWindow
    2009-10-14 08:56:20 +0200 mav  r276881 : #i105476# let the allocated memory live long anough
    2009-10-14 08:53:51 +0200 mav  r276880 : #i105476# let ZipFile use mutex while creating the requested stream
    2009-10-14 08:51:52 +0200 mav  r276879 : #i105476# let buffered IO use mutex ( patch from MHU )
    2009-10-09 12:20:22 +0200 cd  r276803 : #i99971# Use configuration to control window to front/focus handling
    2009-10-09 12:19:22 +0200 cd  r276802 : #i99971# New configuration item to force set focus and window to front for new document windows
    2009-10-09 12:18:23 +0200 cd  r276801 : #i99971# Introduction of a new show flag to force window to front
    2009-10-06 11:04:16 +0200 ab  r276695 : #i105386# Call xmlInitParser() before registering input callbacks

diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index d927ab0..1917158 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -165,6 +165,7 @@ namespace vcl { struct ControlLayoutData; }
 #define SHOW_NOPARENTUPDATE             ((USHORT)0x0001)
 #define SHOW_NOFOCUSCHANGE              ((USHORT)0x0002)
 #define SHOW_NOACTIVATE                 ((USHORT)0x0004)
+#define SHOW_FOREGROUNDTASK             ((USHORT)0x0008)
 
 // Flags for SetZOrder()
 #define WINDOW_ZORDER_BEFOR             ((USHORT)0x0001)
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 7498186..3b18e4d 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -6514,7 +6514,7 @@ void Window::Show( BOOL bVisible, USHORT nFlags )
             // nach vorne, wenn es gewuenscht ist
             if ( ImplIsOverlapWindow() && !(nFlags & SHOW_NOACTIVATE) )
             {
-                ImplStartToTop( 0 );
+                ImplStartToTop(( nFlags & SHOW_FOREGROUNDTASK ) ? TOTOP_FOREGROUNDTASK : 0 );
                 ImplFocusToTop( 0, FALSE );
             }
 
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index b8b9cb1..02152f8 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2157,7 +2157,17 @@ static void ImplSalToTop( HWND hWnd, USHORT nFlags )
         BringWindowToTop( hWnd );
     
     if ( nFlags & SAL_FRAME_TOTOP_FOREGROUNDTASK )
-        SetForegroundWindow( hWnd );
+    {
+        // 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 )
     {


More information about the ooo-build-commit mailing list