ooo-build r11728 - in trunk: . patches/test



Author: kyoshida
Date: Thu Feb 28 07:23:24 2008
New Revision: 11728
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11728&view=rev

Log:
2008-02-28  Kohei Yoshida  <kyoshida novell com>

	* patches/test/svx-correct-accidental-caps-lock.diff: updated with 
	more work since last check-in.  Still not done yet.


Modified:
   trunk/ChangeLog
   trunk/patches/test/svx-correct-accidental-caps-lock.diff

Modified: trunk/patches/test/svx-correct-accidental-caps-lock.diff
==============================================================================
--- trunk/patches/test/svx-correct-accidental-caps-lock.diff	(original)
+++ trunk/patches/test/svx-correct-accidental-caps-lock.diff	Thu Feb 28 07:23:24 2008
@@ -17,6 +17,47 @@
  			<prop oor:name="ReplaceSingleQuote" oor:type="xs:boolean">
  				<!-- OldPath: AutoCorrect/Options/All -->
  				<!-- OldLocation: Soffice.cfg -->
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=svx.vpj svx.clean/inc/svx/editeng.hxx svx/inc/svx/editeng.hxx
+--- svx.clean/inc/svx/editeng.hxx	2008-02-25 11:50:16.000000000 -0500
++++ svx/inc/svx/editeng.hxx	2008-02-27 23:29:13.000000000 -0500
+@@ -61,6 +61,7 @@ class Rectangle;
+ class SvStream;
+ class Link;
+ class OutputDevice;
++class Window;
+ class SvUShorts;
+ class SfxPoolItem;
+ class SvxNumBulletItem;
+@@ -133,7 +134,7 @@ private:
+ 	SVX_DLLPRIVATE EditEngine&		operator=( const EditEngine& );
+ 
+ //#if 0 // _SOLAR__PRIVATE
+-	SVX_DLLPRIVATE BOOL				PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView );
++	SVX_DLLPRIVATE BOOL				PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView, Window* pFrameWin = NULL );
+ //#endif
+ 
+ public:
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=svx.vpj svx.clean/inc/svx/editview.hxx svx/inc/svx/editview.hxx
+--- svx.clean/inc/svx/editview.hxx	2008-02-25 11:50:16.000000000 -0500
++++ svx/inc/svx/editview.hxx	2008-02-27 23:15:13.000000000 -0500
+@@ -162,7 +162,7 @@ public:
+ 
+ 	void			InsertText( const String& rNew, BOOL bSelect = FALSE );
+ 
+-	BOOL			PostKeyEvent( const KeyEvent& rKeyEvent );
++	BOOL			PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin = NULL );
+ 
+ 	BOOL			MouseButtonUp( const MouseEvent& rMouseEvent );
+ 	BOOL			MouseButtonDown( const MouseEvent& rMouseEvent );
+@@ -225,7 +225,7 @@ public:
+ 
+ 	BOOL			MatchGroup();
+ 
+-	void			CompleteAutoCorrect();
++	void			CompleteAutoCorrect( Window* pFrameWin = NULL );
+ 
+ 	EESpellState	StartSpeller( BOOL bMultipleDoc = FALSE );
+ 	EESpellState	StartThesaurus();
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=svx.vpj svx.clean/inc/svx/svxacorr.hxx svx/inc/svx/svxacorr.hxx
 --- svx.clean/inc/svx/svxacorr.hxx	2008-02-25 11:50:16.000000000 -0500
 +++ svx/inc/svx/svxacorr.hxx	2008-02-26 12:56:02.000000000 -0500
@@ -213,7 +254,7 @@
  	PutProperties(aNames, aValues);
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=svx.vpj svx.clean/source/editeng/editeng.cxx svx/source/editeng/editeng.cxx
 --- svx.clean/source/editeng/editeng.cxx	2008-02-25 11:50:18.000000000 -0500
-+++ svx/source/editeng/editeng.cxx	2008-02-26 12:59:22.000000000 -0500
++++ svx/source/editeng/editeng.cxx	2008-02-27 23:28:47.000000000 -0500
 @@ -117,6 +117,7 @@
  #endif
  
@@ -222,6 +263,15 @@
  
  #if OSL_DEBUG_LEVEL > 1
  #include <svx/frmdiritem.hxx>
+@@ -831,7 +832,7 @@ ESelection EditEngine::CursorRight( cons
+ 	return pE->pImpEditEngine->CreateESel( aSel );
+ }
+ 
+-sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView )
++sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, Window* pFrameWin )
+ {
+ 	DBG_CHKTHIS( EditEngine, 0 );
+ 	DBG_CHKOBJ( pEditView, EditView, 0 );
 @@ -844,6 +845,8 @@ sal_Bool EditEngine::PostKeyEvent( const
  	sal_Bool bAllowIdle = sal_True;
  	sal_Bool bReadOnly	= pEditView->IsReadOnly();
@@ -236,7 +286,7 @@
  							pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
  						if ( pImpEditEngine->GetStatus().DoAutoCorrect() )
 -							aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode() );
-+							aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), (nExtraMod & MODKEY_LOCK) );
++							aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), (nExtraMod & MODKEY_LOCK), pFrameWin );
  						aCurSel = pImpEditEngine->InsertTab( aCurSel );
  						if ( bSel )
  							pImpEditEngine->UndoActionEnd( EDITUNDO_INSERT );
@@ -245,7 +295,7 @@
  						if ( rKeyEvent.GetKeyCode().IsShift() )
                          {
 -                            aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode() );
-+                            aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), (nExtraMod & MODKEY_LOCK) );
++                            aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), (nExtraMod & MODKEY_LOCK), pFrameWin );
  							aCurSel = pImpEditEngine->InsertLineBreak( aCurSel );
                          }
  						else
@@ -254,7 +304,7 @@
  							{
  								if ( pImpEditEngine->GetStatus().DoAutoCorrect() )
 -									aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode() );
-+									aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), (nExtraMod & MODKEY_LOCK) );
++									aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), (nExtraMod & MODKEY_LOCK), pFrameWin );
  								aCurSel = pImpEditEngine->InsertParaBreak( aCurSel );
  							}
  							else
@@ -264,25 +314,56 @@
  					{
 -						aCurSel = pImpEditEngine->AutoCorrect( aCurSel, nCharCode, !pEditView->IsInsertMode() );
 +						aCurSel = pImpEditEngine->AutoCorrect( 
-+                            aCurSel, nCharCode, !pEditView->IsInsertMode(), (nExtraMod & MODKEY_LOCK) );
++                            aCurSel, nCharCode, !pEditView->IsInsertMode(), (nExtraMod & MODKEY_LOCK), pFrameWin );
  					}
  					else
  					{
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=svx.vpj svx.clean/source/editeng/editview.cxx svx/source/editeng/editview.cxx
 --- svx.clean/source/editeng/editview.cxx	2008-02-25 11:50:18.000000000 -0500
-+++ svx/source/editeng/editview.cxx	2008-02-26 13:00:02.000000000 -0500
-@@ -944,7 +944,7 @@ void EditView::CompleteAutoCorrect()
++++ svx/source/editeng/editview.cxx	2008-02-27 23:32:02.000000000 -0500
+@@ -59,6 +59,7 @@
+ #include <helpid.hrc>
+ #include <i18npool/lang.h>
+ #include <vcl/menu.hxx>
++#include <vcl/window.hxx>
+ #include <acorrcfg.hxx>
+ 
+ #ifndef _UNO_LINGU_HXX
+@@ -434,11 +435,11 @@ void EditView::InsertText( const XubStri
+ 	pImpEE->FormatAndUpdate( this );
+ }
+ 
+-sal_Bool EditView::PostKeyEvent( const KeyEvent& rKeyEvent )
++sal_Bool EditView::PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin )
+ {
+ 	DBG_CHKTHIS( EditView, 0 );
+ 	DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+-	return pImpEditView->PostKeyEvent( rKeyEvent );
++	return pImpEditView->PostKeyEvent( rKeyEvent, pFrameWin );
+ }
+ 
+ sal_Bool EditView::MouseButtonUp( const MouseEvent& rMouseEvent )
+@@ -934,7 +935,7 @@ sal_Bool EditView::MatchGroup()
+ 	return sal_False;
+ }
+ 
+-void EditView::CompleteAutoCorrect()
++void EditView::CompleteAutoCorrect( Window* pFrameWin )
+ {
+ 	DBG_CHKTHIS( EditView, 0 );
+ 	DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
+@@ -944,7 +945,7 @@ void EditView::CompleteAutoCorrect()
  		EditSelection aSel = pImpEditView->GetEditSelection();
  		aSel = PIMPEE->EndOfWord( aSel.Max() );
  		// MT 06/00: Why pass EditSelection to AutoCorrect, not EditPaM?!
 -		aSel = PIMPEE->AutoCorrect( aSel, 0, !IsInsertMode() );
-+		aSel = PIMPEE->AutoCorrect( aSel, 0, !IsInsertMode(), false );
++		aSel = PIMPEE->AutoCorrect( aSel, 0, !IsInsertMode(), false, pFrameWin );
  		pImpEditView->SetEditSelection( aSel );
  		if ( PIMPEE->IsModified() )
  			PIMPEE->FormatAndUpdate( this );
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=svx.vpj svx.clean/source/editeng/impedit2.cxx svx/source/editeng/impedit2.cxx
 --- svx.clean/source/editeng/impedit2.cxx	2008-02-25 11:50:18.000000000 -0500
-+++ svx/source/editeng/impedit2.cxx	2008-02-26 13:00:33.000000000 -0500
++++ svx/source/editeng/impedit2.cxx	2008-02-28 02:13:58.000000000 -0500
 @@ -559,7 +559,7 @@ void ImpEditEngine::Command( const Comma
  				if ( ( GetStatus().DoAutoCorrect() ) && ( ( nCharCode == '\"' ) || ( nCharCode == '\'' ) ) )
  				{
@@ -292,16 +373,28 @@
  					pView->pImpEditView->SetEditSelection( aSel );
  				}
  			}
-@@ -2428,7 +2428,7 @@ void ImpEditEngine::ImpRemoveParagraph( 
+@@ -2428,8 +2428,19 @@ void ImpEditEngine::ImpRemoveParagraph( 
  	}
  }
  
 -EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, BOOL bOverwrite )
-+EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, BOOL bOverwrite, bool bLockKeyOn )
++EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, 
++                                    bool bOverwrite, bool bLockKeyOn, Window* pFrameWin )
  {
++    fprintf(stdout, "ImpEditEngine::AutoCorrect: frame window = %p\n", pFrameWin);fflush(stdout);
++    if (pFrameWin)
++    {
++        USHORT nIndiState = pFrameWin->GetIndicatorState();
++        fprintf(stdout, "ImpEditEngine::AutoCorrect:   caps lock   %s\n", (nIndiState&INDICATOR_CAPS_LOCK)?"yes":"no");
++        fprintf(stdout, "ImpEditEngine::AutoCorrect:   num lock    %s\n", (nIndiState&INDICATOR_NUM_LOCK)?"yes":"no");
++        fprintf(stdout, "ImpEditEngine::AutoCorrect:   scroll lock %s\n", (nIndiState&INDICATOR_SCROLL_LOCK)?"yes":"no");
++        fflush(stdout);
++        pFrameWin->SimulateKeyPress( 0 );
++    }
  	EditSelection aSel( rCurSel );
  #ifndef SVX_LIGHT
-@@ -2478,7 +2478,7 @@ EditPaM ImpEditEngine::AutoCorrect( cons
+ 	SvxAutoCorrect*	pAutoCorrect = SvxAutoCorrCfg::Get()->GetAutoCorrect();
+@@ -2478,7 +2489,7 @@ EditPaM ImpEditEngine::AutoCorrect( cons
  		ContentNode* pNode = aSel.Max().GetNode();
  		USHORT nIndex = aSel.Max().GetIndex();
  		EdtAutoCorrDoc aAuto( this, pNode, nIndex, c );
@@ -310,15 +403,54 @@
  		aSel.Max().SetIndex( aAuto.GetCursor() );
  
  		// #i78661 since the SvxAutoCorrect object used here is
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=svx.vpj svx.clean/source/editeng/impedit.cxx svx/source/editeng/impedit.cxx
+--- svx.clean/source/editeng/impedit.cxx	2008-02-25 11:50:18.000000000 -0500
++++ svx/source/editeng/impedit.cxx	2008-02-28 02:02:11.000000000 -0500
+@@ -1041,7 +1041,7 @@ Pair ImpEditView::Scroll( long ndX, long
+ 	return Pair( nRealDiffX, nRealDiffY );
+ }
+ 
+-sal_Bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent )
++sal_Bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin )
+ {
+     BOOL bDone = FALSE;
+ 
+@@ -1085,7 +1085,7 @@ sal_Bool ImpEditView::PostKeyEvent( cons
+     }
+ 
+     if( !bDone )
+-	    bDone = pEditEngine->PostKeyEvent( rKeyEvent, GetEditViewPtr() );
++	    bDone = pEditEngine->PostKeyEvent( rKeyEvent, GetEditViewPtr(), pFrameWin );
+ 
+     return bDone;
+ }
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=svx.vpj svx.clean/source/editeng/impedit.hxx svx/source/editeng/impedit.hxx
 --- svx.clean/source/editeng/impedit.hxx	2008-02-25 11:50:18.000000000 -0500
-+++ svx/source/editeng/impedit.hxx	2008-02-26 12:56:13.000000000 -0500
-@@ -833,7 +833,7 @@ public:
++++ svx/source/editeng/impedit.hxx	2008-02-27 23:33:07.000000000 -0500
+@@ -138,6 +138,8 @@ class TextRanger;
+ class SvKeyValueIterator;
+ class SvxForbiddenCharactersTable;
+ class SvtCTLOptions;
++class Window;
++
+ #ifndef SVX_SPELL_PORTIONS_HXX
+ #include <svx/SpellPortions.hxx>
+ #endif
+@@ -333,7 +335,7 @@ public:
+ 
+ 	BOOL			IsVertical() const;
+ 
+-	BOOL			PostKeyEvent( const KeyEvent& rKeyEvent );
++	BOOL			PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin = NULL );
+ 
+ 	BOOL			MouseButtonUp( const MouseEvent& rMouseEvent );
+ 	BOOL			MouseButtonDown( const MouseEvent& rMouseEvent );
+@@ -833,7 +835,7 @@ public:
  	EditPaM			DeleteSelected( EditSelection aEditSelection);
      EditPaM         InsertText( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite, sal_Bool bIsUserInput = sal_False );
  	EditPaM			InsertText( EditSelection aCurEditSelection, const String& rStr );
 -	EditPaM			AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite );
-+	EditPaM			AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite, bool bLockKeyOn );
++	EditPaM			AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, bool bOverwrite, bool bLockKeyOn, Window* pFrameWin = NULL );
  	EditPaM			DeleteLeftOrRight( const EditSelection& rEditSelection, BYTE nMode, BYTE nDelMode = DELMODE_SIMPLE );
  	EditPaM			InsertParaBreak( EditSelection aEditSelection );
  	EditPaM			InsertLineBreak( EditSelection aEditSelection );
@@ -482,7 +614,7 @@
  // --------------------
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/inc/vcl/keycodes.hxx vcl/inc/vcl/keycodes.hxx
 --- vcl.clean/inc/vcl/keycodes.hxx	2008-01-14 11:20:04.000000000 -0500
-+++ vcl/inc/vcl/keycodes.hxx	2008-02-26 11:41:08.000000000 -0500
++++ vcl/inc/vcl/keycodes.hxx	2008-02-28 00:31:43.000000000 -0500
 @@ -182,15 +182,18 @@
  #define KEY_ALLMODTYPE	((USHORT)0xF000)
  
@@ -511,6 +643,36 @@
  
  // ---------------
  // - Mouse-Types -
+@@ -200,4 +203,12 @@
+ #define MOUSE_MIDDLE	((USHORT)0x0002)
+ #define MOUSE_RIGHT 	((USHORT)0x0004)
+ 
++// -------------------
++// - Indicator-Types -
++// -------------------
++
++#define INDICATOR_CAPS_LOCK     0x0001
++#define INDICATOR_NUM_LOCK      0x0002
++#define INDICATOR_SCROLL_LOCK   0x0004
++
+ #endif // _SV_KEYCODES_HXX
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/inc/vcl/salframe.hxx vcl/inc/vcl/salframe.hxx
+--- vcl.clean/inc/vcl/salframe.hxx	2007-10-09 11:17:45.000000000 -0400
++++ vcl/inc/vcl/salframe.hxx	2008-02-28 00:32:26.000000000 -0500
+@@ -272,6 +272,13 @@ public:
+ 
+     virtual SalPointerState		GetPointerState() = 0;
+ 
++    struct SalIndicatorState
++    {
++        USHORT  mnState;
++    };
++
++    virtual SalIndicatorState   GetIndicatorState() = 0;
++
+     // set new parent window
+     virtual void				SetParent( SalFrame* pNewParent ) = 0;
+     // reparent window to act as a plugin; implementation
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/inc/vcl/salwtype.hxx vcl/inc/vcl/salwtype.hxx
 --- vcl.clean/inc/vcl/salwtype.hxx	2007-10-09 11:18:22.000000000 -0400
 +++ vcl/inc/vcl/salwtype.hxx	2008-02-26 10:52:26.000000000 -0500
@@ -522,6 +684,61 @@
  };
  
  // MENUEVENT
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/inc/vcl/window.hxx vcl/inc/vcl/window.hxx
+--- vcl.clean/inc/vcl/window.hxx	2008-01-14 08:04:14.000000000 -0500
++++ vcl/inc/vcl/window.hxx	2008-02-28 02:11:44.000000000 -0500
+@@ -1121,6 +1121,22 @@ public:
+     /* mark Window for deletion in top of event queue
+     */
+     void doLazyDelete();
++
++    //-------------------------------------
++    //  Keyboard access functions
++    //-------------------------------------
++
++    /** Query the states of keyboard indicators - Caps Lock, Num Lock and
++        Scroll Lock.  Use the following mask to retrieve the state of each
++        indicator:
++        
++            INDICATOR_CAPS_LOCK
++            INDICATOR_NUM_LOCK
++            INDICATOR_SCROLL_LOCK
++      */
++    USHORT GetIndicatorState() const;
++
++    void SimulateKeyPress( USHORT nKeyCode ) const;
+ };
+ 
+ 
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/source/window/window.cxx vcl/source/window/window.cxx
+--- vcl.clean/source/window/window.cxx	2008-01-29 11:18:41.000000000 -0500
++++ vcl/source/window/window.cxx	2008-02-28 02:12:23.000000000 -0500
+@@ -203,6 +203,8 @@
+ #include <vcl/pdfextoutdevdata.hxx>
+ #include "vcl/lazydelete.hxx"
+ 
++#include <stdio.h>
++
+ using namespace rtl;
+ using namespace ::com::sun::star::uno;
+ using namespace ::com::sun::star::lang;
+@@ -4797,6 +4799,16 @@ void Window::doLazyDelete()
+     vcl::LazyDeletor<Window>::Delete( this );
+ }
+ 
++USHORT Window::GetIndicatorState() const
++{
++    return mpWindowImpl->mpFrame->GetIndicatorState().mnState;
++}
++
++void Window::SimulateKeyPress( USHORT nKeyCode ) const
++{
++    fprintf(stdout, "Window::SimulateKeyPress: \n");fflush(stdout);
++}
++
+ // -----------------------------------------------------------------------
+ 
+ void Window::MouseMove( const MouseEvent& rMEvt )
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/source/window/winproc.cxx vcl/source/window/winproc.cxx
 --- vcl.clean/source/window/winproc.cxx	2008-01-29 11:18:55.000000000 -0500
 +++ vcl/source/window/winproc.cxx	2008-02-26 14:29:58.000000000 -0500
@@ -596,7 +813,7 @@
          case SALEVENT_KEYMODCHANGE:
 diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkframe.cxx
 --- vcl.clean/unx/gtk/window/gtkframe.cxx	2008-01-29 11:21:11.000000000 -0500
-+++ vcl/unx/gtk/window/gtkframe.cxx	2008-02-26 14:31:19.000000000 -0500
++++ vcl/unx/gtk/window/gtkframe.cxx	2008-02-28 01:32:57.000000000 -0500
 @@ -84,9 +84,13 @@ using namespace com::sun::star;
  
  int GtkSalFrame::m_nFloats = 0;
@@ -631,7 +848,21 @@
      
      if( bDown )
      {
-@@ -2773,8 +2778,8 @@ gboolean GtkSalFrame::signalKey( GtkWidg
+@@ -2068,6 +2073,13 @@ SalFrame::SalPointerState GtkSalFrame::G
+     return aState;
+ }
+ 
++SalFrame::SalIndicatorState GtkSalFrame::GetIndicatorState()
++{
++    SalIndicatorState aState;
++    aState.mnState = GetX11SalData()->GetDisplay()->GetIndicatorState();
++    return aState;
++}
++
+ void GtkSalFrame::SetInputContext( SalInputContext* pContext )
+ {
+     if( ! pContext )
+@@ -2773,8 +2785,8 @@ gboolean GtkSalFrame::signalKey( GtkWidg
          pEvent->keyval == GDK_Meta_L || pEvent->keyval == GDK_Meta_R )
      {
  		SalKeyModEvent aModEvt;
@@ -642,3 +873,109 @@
  
          aModEvt.mnModKeyCode = 0; // emit no MODKEYCHANGE events
          if( pEvent->type == GDK_KEY_PRESS && !pThis->m_nKeyModifiers )
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/unx/headless/svpframe.cxx vcl/unx/headless/svpframe.cxx
+--- vcl.clean/unx/headless/svpframe.cxx	2007-08-03 10:09:51.000000000 -0400
++++ vcl/unx/headless/svpframe.cxx	2008-02-28 00:53:03.000000000 -0500
+@@ -396,6 +396,13 @@ SalFrame::SalPointerState SvpSalFrame::G
+     return aState;
+ }
+ 
++SalFrame::SalIndicatorState SvpSalFrame::GetIndicatorState()
++{
++    SalIndicatorState aState;
++    aState.mnState = 0;
++    return aState;
++}
++
+ void SvpSalFrame::SetParent( SalFrame* pNewParent )
+ {
+     if( m_pParent )
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/unx/headless/svpframe.hxx vcl/unx/headless/svpframe.hxx
+--- vcl.clean/unx/headless/svpframe.hxx	2007-07-24 06:27:17.000000000 -0400
++++ vcl/unx/headless/svpframe.hxx	2008-02-28 00:52:33.000000000 -0500
+@@ -119,6 +119,7 @@ public:
+     virtual void				Beep( SoundType eSoundType );
+     virtual const SystemEnvData*	GetSystemData() const;
+     virtual SalPointerState     GetPointerState();
++    virtual SalIndicatorState   GetIndicatorState();
+     virtual void				SetParent( SalFrame* pNewParent );
+     virtual bool				SetPluginParent( SystemParentData* pNewParent );
+     virtual void                SetBackgroundBitmap( SalBitmap* pBitmap );
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/unx/inc/plugins/gtk/gtkframe.hxx vcl/unx/inc/plugins/gtk/gtkframe.hxx
+--- vcl.clean/unx/inc/plugins/gtk/gtkframe.hxx	2008-01-29 11:21:43.000000000 -0500
++++ vcl/unx/inc/plugins/gtk/gtkframe.hxx	2008-02-28 00:33:48.000000000 -0500
+@@ -364,6 +364,8 @@ public:
+     // get current modifier and button mask
+     virtual SalPointerState     GetPointerState();
+ 
++    virtual SalIndicatorState   GetIndicatorState();
++
+     // set new parent window
+     virtual void                SetParent( SalFrame* pNewParent );
+     // reparent window to act as a plugin; implementation
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/unx/inc/saldisp.hxx vcl/unx/inc/saldisp.hxx
+--- vcl.clean/unx/inc/saldisp.hxx	2008-01-29 11:21:27.000000000 -0500
++++ vcl/unx/inc/saldisp.hxx	2008-02-28 01:25:45.000000000 -0500
+@@ -537,6 +537,8 @@ public:
+     BOOL            IsNumLockFromXS() const { return bNumLockFromXS_; }
+ 
+     std::list< SalObject* >& getSalObjects() { return m_aSalObjects; }
++
++    USHORT GetIndicatorState();
+ };
+ 
+ // -=-= inlines =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/unx/inc/salframe.h vcl/unx/inc/salframe.h
+--- vcl.clean/unx/inc/salframe.h	2007-08-30 09:56:30.000000000 -0400
++++ vcl/unx/inc/salframe.h	2008-02-28 00:54:39.000000000 -0500
+@@ -272,6 +272,7 @@ public:
+     virtual void				Beep( SoundType eSoundType );
+     virtual const SystemEnvData*	GetSystemData() const;
+     virtual SalPointerState     GetPointerState();
++    virtual SalIndicatorState   GetIndicatorState();
+     virtual void				SetParent( SalFrame* pNewParent );
+     virtual bool				SetPluginParent( SystemParentData* pNewParent );
+     virtual void                SetBackgroundBitmap( SalBitmap* pBitmap );
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/unx/source/app/saldisp.cxx vcl/unx/source/app/saldisp.cxx
+--- vcl.clean/unx/source/app/saldisp.cxx	2008-01-29 11:22:34.000000000 -0500
++++ vcl/unx/source/app/saldisp.cxx	2008-02-28 01:35:13.000000000 -0500
+@@ -2657,6 +2657,22 @@ void SalDisplay::GetScreenFontResolution
+     rDPIX = rDPIY;
+ }
+ 
++USHORT SalDisplay::GetIndicatorState()
++{
++    unsigned int _state;
++    USHORT nState = 0;
++    XkbGetIndicatorState(pDisp_, XkbUseCoreKbd, &_state);
++
++    if ((_state & 0x00000001))
++        nState |= INDICATOR_CAPS_LOCK;
++    if ((_state & 0x00000002))
++        nState |= INDICATOR_NUM_LOCK;
++    if ((_state & 0x00000004))
++        nState |= INDICATOR_SCROLL_LOCK;
++
++    return nState;
++}
++
+ void SalDisplay::InitXinerama()
+ {
+     if( m_aScreens.size() > 1 )
+diff -urp --exclude=CVS --exclude=unxlngi6.pro --exclude=vcl.vpj vcl.clean/unx/source/window/salframe.cxx vcl/unx/source/window/salframe.cxx
+--- vcl.clean/unx/source/window/salframe.cxx	2008-01-30 04:12:30.000000000 -0500
++++ vcl/unx/source/window/salframe.cxx	2008-02-28 01:32:32.000000000 -0500
+@@ -2757,6 +2757,13 @@ SalFrame::SalPointerState X11SalFrame::G
+     return aState;
+ }
+ 
++SalFrame::SalIndicatorState X11SalFrame::GetIndicatorState()
++{
++    SalIndicatorState aState;
++    aState.mnState = GetX11SalData()->GetDisplay()->GetIndicatorState();
++    return aState;
++}
++
+ long X11SalFrame::HandleMouseEvent( XEvent *pEvent )
+ {
+ 	SalMouseEvent		aMouseEvt;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]