[ooo-build-commit] .: patches/dev300

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Wed Feb 3 06:41:10 PST 2010


 patches/dev300/toolbar-decorations-fix.diff |  163 ++++++++++++++++++++++------
 1 file changed, 130 insertions(+), 33 deletions(-)

New commits:
commit 31f33c6e1a9d6fdb614b6d64feb7f9fc6296ee4b
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Wed Feb 3 15:40:07 2010 +0100

    Fixed some focus regressions
    
    * patches/dev300/toolbar-decorations-fix.diff:

diff --git a/patches/dev300/toolbar-decorations-fix.diff b/patches/dev300/toolbar-decorations-fix.diff
index cb24aae..32336fc 100644
--- a/patches/dev300/toolbar-decorations-fix.diff
+++ b/patches/dev300/toolbar-decorations-fix.diff
@@ -212,7 +212,7 @@ index 77de26d..30629ec 100644
      /** This function is called when the window gets the focus.  It grabs
          the focus to the line ends value set so that it can be controlled with
 diff --git svx/inc/linectrl.hxx svx/inc/linectrl.hxx
-index e3d3a5d..457e7f1 100644
+index e3d3a5d..bf3107a 100644
 --- svx/inc/linectrl.hxx
 +++ svx/inc/linectrl.hxx
 @@ -110,14 +110,13 @@ class SvxLineEndWindow : public SfxPopupWindow
@@ -231,7 +231,7 @@ index e3d3a5d..457e7f1 100644
      ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
  
  
-@@ -127,10 +126,7 @@ private:
+@@ -127,16 +126,14 @@ private:
      void            implInit();
  
  protected:
@@ -242,6 +242,13 @@ index e3d3a5d..457e7f1 100644
  
      /** This function is called when the window gets the focus.  It grabs
          the focus to the line ends value set so that it can be controlled with
+         the keyboard.
+     */
+     virtual void GetFocus (void);
++    virtual void KeyInput( const KeyEvent& rKEvt );
+ 
+ public:
+     SvxLineEndWindow( USHORT nId, 
 diff --git svx/source/tbxctrls/colorwindow.hxx svx/source/tbxctrls/colorwindow.hxx
 index 50388d6..9db6499 100644
 --- svx/source/tbxctrls/colorwindow.hxx
@@ -1625,7 +1632,7 @@ index 880bb5d..a6a3fec 100644
      
      String STR_CHARS_SPACING_VERY_TIGHT
 diff --git svx/source/tbxctrls/linectrl.cxx svx/source/tbxctrls/linectrl.cxx
-index dca3dd0..174bafb 100644
+index dca3dd0..013d0ec 100644
 --- svx/source/tbxctrls/linectrl.cxx
 +++ svx/source/tbxctrls/linectrl.cxx
 @@ -385,14 +385,13 @@ SvxLineEndWindow::SvxLineEndWindow(
@@ -1671,7 +1678,7 @@ index dca3dd0..174bafb 100644
      SetHelpId( HID_POPUP_LINEEND );
      aLineEndSet.SetHelpId( HID_POPUP_LINEEND_CTRL );
  
-@@ -447,6 +447,18 @@ void SvxLineEndWindow::implInit()
+@@ -447,10 +447,23 @@ void SvxLineEndWindow::implInit()
      // ValueSet mit Eintraegen der LineEndList fuellen
      FillValueSet();
  
@@ -1690,7 +1697,12 @@ index dca3dd0..174bafb 100644
      AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:LineEndListState" )));
  
      //ChangeHelpId( HID_POPUP_LINEENDSTYLE );
-@@ -491,8 +503,8 @@ IMPL_LINK( SvxLineEndWindow, SelectHdl, void *, EMPTYARG )
+     aLineEndSet.Show();
++    aLineEndSet.GetFocus();
+ }
+ 
+ SfxPopupWindow* SvxLineEndWindow::Clone() const
+@@ -491,8 +504,8 @@ IMPL_LINK( SvxLineEndWindow, SelectHdl, void *, EMPTYARG )
          pLineEndItem	= new XLineEndItem( pEntry->GetName(), pEntry->GetLineEnd() );
      }
  
@@ -1701,7 +1713,7 @@ index dca3dd0..174bafb 100644
  
      Sequence< PropertyValue > aArgs( 1 );
      Any a;
-@@ -577,79 +589,6 @@ void SvxLineEndWindow::FillValueSet()
+@@ -577,79 +590,6 @@ void SvxLineEndWindow::FillValueSet()
  
  // -----------------------------------------------------------------------
  
@@ -1781,7 +1793,7 @@ index dca3dd0..174bafb 100644
  void SvxLineEndWindow::StartSelection()
  {
      aLineEndSet.StartSelection();
-@@ -677,28 +616,12 @@ void SvxLineEndWindow::StateChanged(
+@@ -677,28 +617,12 @@ void SvxLineEndWindow::StateChanged(
  
              aLineEndSet.Clear();
              FillValueSet();
@@ -1810,7 +1822,7 @@ index dca3dd0..174bafb 100644
  void SvxLineEndWindow::SetSize()
  {
      //if( !bPopupMode )
-@@ -721,12 +644,12 @@ void SvxLineEndWindow::SetSize()
+@@ -721,12 +645,12 @@ void SvxLineEndWindow::SetSize()
      aSize.Width()  += 6;
      aSize.Height() += 6;
      aSize = aLineEndSet.CalcWindowSizePixel( aSize );
@@ -1827,7 +1839,19 @@ index dca3dd0..174bafb 100644
  }
  
  void SvxLineEndWindow::GetFocus (void)
-@@ -769,9 +692,9 @@ SfxPopupWindow*	SvxLineEndToolBoxControl::CreatePopupWindow()
+@@ -737,6 +661,11 @@ void SvxLineEndWindow::GetFocus (void)
+     aLineEndSet.GrabFocus();
+ }
+ 
++void SvxLineEndWindow::KeyInput( const KeyEvent& rKEvt )
++{
++    aLineEndSet.KeyInput( rKEvt );
++}
++
+ /*************************************************************************
+ |*
+ |* SvxLineEndToolBoxControl
+@@ -769,9 +698,9 @@ SfxPopupWindow*	SvxLineEndToolBoxControl::CreatePopupWindow()
  {
      SvxLineEndWindow* pLineEndWin =
          new SvxLineEndWindow( GetId(), m_xFrame, &GetToolBox(), SVX_RESSTR( RID_SVXSTR_LINEEND ) );
@@ -1840,7 +1864,7 @@ index dca3dd0..174bafb 100644
  }
  
 diff --git svx/source/tbxctrls/tbcontrl.cxx svx/source/tbxctrls/tbcontrl.cxx
-index 94494aa..f6a0e5f 100644
+index 94494aa..1eab739 100644
 --- svx/source/tbxctrls/tbcontrl.cxx
 +++ svx/source/tbxctrls/tbcontrl.cxx
 @@ -253,6 +253,7 @@ class SvxFrameWindow_Impl : public SfxPopupWindow
@@ -1851,7 +1875,15 @@ index 94494aa..f6a0e5f 100644
      SvxFrmValueSet_Impl  aFrameSet;
      ImageList 		aImgList;
      sal_Bool        bParagraphMode;
-@@ -292,6 +293,7 @@ class SvxLineWindow_Impl : public SfxPopupWindow
+@@ -264,6 +265,7 @@ private:
+ protected:
+     virtual void    Resize();
+     virtual BOOL	Close();
++    virtual void    KeyInput( const KeyEvent& rKEvt );
+     virtual Window*	GetPreferredKeyInputWindow();
+     virtual void	GetFocus();
+ 
+@@ -292,6 +294,7 @@ class SvxLineWindow_Impl : public SfxPopupWindow
  {
  private:
      ValueSet		    aLineSet;
@@ -1859,7 +1891,15 @@ index 94494aa..f6a0e5f 100644
      bool				m_bIsWriter;
  
  #if _SOLAR__PRIVATE
-@@ -832,10 +834,11 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString&            rCommand,
+@@ -303,6 +306,7 @@ private:
+ protected:
+     virtual void    Resize();
+     virtual BOOL	Close();
++    virtual void    KeyInput( const KeyEvent& rKEvt );
+     virtual Window*	GetPreferredKeyInputWindow();
+     virtual void	GetFocus();
+     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
+@@ -832,10 +836,11 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString&            rCommand,
                                            const String&              rWndTitle,
                                            Window*                    pParentWindow ) :
  
@@ -1872,7 +1912,7 @@ index 94494aa..f6a0e5f 100644
      maCommand( rCommand )
  
  {
-@@ -845,6 +848,8 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString&            rCommand,
+@@ -845,6 +850,8 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString&            rCommand,
      BOOL bKillTable = FALSE;
      const Size aSize12( 13, 13 );
  
@@ -1881,7 +1921,7 @@ index 94494aa..f6a0e5f 100644
      if ( pDocSh )
          if ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) )
              pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
-@@ -907,6 +912,17 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString&            rCommand,
+@@ -907,16 +914,31 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString&            rCommand,
      aColorSet.SetLineCount( PALETTE_Y );
  
      lcl_CalcSizeValueSet( *this, aColorSet, aSize12 );
@@ -1899,7 +1939,11 @@ index 94494aa..f6a0e5f 100644
  
      SetHelpId( HID_POPUP_COLOR );
      aColorSet.SetHelpId( HID_POPUP_COLOR_CTRL );
-@@ -917,6 +933,9 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString&            rCommand,
+ 
+     SetText( rWndTitle );
+     aColorSet.Show();
++    aColorSet.GetFocus();
+ 
      AddStatusListener( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ColorTableState" )));
      if ( bKillTable )
          delete pColorTable;
@@ -1909,7 +1953,7 @@ index 94494aa..f6a0e5f 100644
  }
  
  SvxColorWindow_Impl::~SvxColorWindow_Impl()
-@@ -945,8 +964,8 @@ IMPL_LINK( SvxColorWindow_Impl, SelectHdl, void *, EMPTYARG )
+@@ -945,8 +967,8 @@ IMPL_LINK( SvxColorWindow_Impl, SelectHdl, void *, EMPTYARG )
          while in Dispatch()), accessing members will crash in this case. */
      aColorSet.SetNoSelection();
  
@@ -1920,7 +1964,7 @@ index 94494aa..f6a0e5f 100644
  
      if ( !nItemId && ( SID_ATTR_CHAR_COLOR_BACKGROUND == theSlotId  || SID_BACKGROUND_COLOR == theSlotId ) )
      {
-@@ -1058,11 +1077,17 @@ void SvxColorWindow_Impl::StateChanged( USHORT nSID, SfxItemState eState, const
+@@ -1058,11 +1080,17 @@ void SvxColorWindow_Impl::StateChanged( USHORT nSID, SfxItemState eState, const
  
  SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) :
  
@@ -1939,7 +1983,7 @@ index 94494aa..f6a0e5f 100644
      BindListener();
      String sCommand(String::CreateFromAscii( ".uno:BorderReducedMode" ));
      AddStatusListener( sCommand );
-@@ -1092,6 +1117,17 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >&
+@@ -1092,10 +1120,22 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >&
      aFrameSet.SetSelectHdl( LINK( this, SvxFrameWindow_Impl, SelectHdl ) );
  
      lcl_CalcSizeValueSet( *this, aFrameSet,Size( 20, 20 ));
@@ -1957,7 +2001,24 @@ index 94494aa..f6a0e5f 100644
  
      SetHelpId( HID_POPUP_FRAME );
      SetText( SVX_RESSTR(RID_SVXSTR_FRAME) );
-@@ -1239,8 +1275,8 @@ IMPL_LINK( SvxFrameWindow_Impl, SelectHdl, void *, EMPTYARG )
+     aFrameSet.Show();
++    aFrameSet.GetFocus();
+ }
+ /*-- 22.09.2004 12:27:50---------------------------------------------------
+ 
+@@ -1111,6 +1151,11 @@ SfxPopupWindow* SvxFrameWindow_Impl::Clone() const
+     return new SvxFrameWindow_Impl( GetId(), GetFrame(), GetParent() );
+ }
+ 
++void SvxFrameWindow_Impl::KeyInput( const KeyEvent& rKEvt )
++{
++    aFrameSet.KeyInput(rKEvt);
++}
++
+ Window* SvxFrameWindow_Impl::GetPreferredKeyInputWindow()
+ {
+     return &aFrameSet;
+@@ -1239,8 +1284,8 @@ IMPL_LINK( SvxFrameWindow_Impl, SelectHdl, void *, EMPTYARG )
      aBorderInner.SetValid( VALID_DISTANCE, TRUE );
      aBorderInner.SetValid( VALID_DISABLE, FALSE );
  
@@ -1968,7 +2029,7 @@ index 94494aa..f6a0e5f 100644
  
      Any a;
      Sequence< PropertyValue > aArgs( 2 );
-@@ -1332,10 +1368,16 @@ BOOL SvxFrameWindow_Impl::Close()
+@@ -1332,10 +1377,16 @@ BOOL SvxFrameWindow_Impl::Close()
  
  SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) :
  
@@ -1987,7 +2048,7 @@ index 94494aa..f6a0e5f 100644
      try
      {
          Reference< lang::XServiceInfo > xServices( rFrame->getController()->getModel(), UNO_QUERY_THROW );
-@@ -1344,6 +1386,7 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r
+@@ -1344,6 +1395,7 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r
      catch(const uno::Exception& )
      {
      }
@@ -1995,7 +2056,7 @@ index 94494aa..f6a0e5f 100644
      Size	aBmpSize( 55, 12 );
      CreateBitmaps();
  
-@@ -1352,6 +1395,17 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r
+@@ -1352,10 +1404,22 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r
      aLineSet.SetText( SVX_RESSTR(STR_NONE) );
  
      lcl_CalcSizeValueSet( *this, aLineSet, aBmpSize );
@@ -2013,7 +2074,12 @@ index 94494aa..f6a0e5f 100644
  
      SetHelpId( HID_POPUP_LINE );
      SetText( SVX_RESSTR(RID_SVXSTR_FRAME_STYLE) );
-@@ -1601,8 +1655,8 @@ IMPL_LINK( SvxLineWindow_Impl, SelectHdl, void *, EMPTYARG )
+     aLineSet.Show();
++    aLineSet.GetFocus();
+ }
+ 
+ SfxPopupWindow* SvxLineWindow_Impl::Clone() const
+@@ -1601,8 +1665,8 @@ IMPL_LINK( SvxLineWindow_Impl, SelectHdl, void *, EMPTYARG )
      else
          aLineItem.SetLine( 0 );
  
@@ -2024,7 +2090,21 @@ index 94494aa..f6a0e5f 100644
  
      Any a;
      Sequence< PropertyValue > aArgs( 1 );
-@@ -2351,10 +2405,10 @@ SfxPopupWindow*	SvxFontColorToolBoxControl::CreatePopupWindow()
+@@ -1644,6 +1708,13 @@ BOOL SvxLineWindow_Impl::Close()
+ 
+ // -----------------------------------------------------------------------
+ 
++void SvxLineWindow_Impl::KeyInput( const KeyEvent& rKEvt )
++{
++    aLineSet.KeyInput( rKEvt );
++}
++
++// -----------------------------------------------------------------------
++
+ Window* SvxLineWindow_Impl::GetPreferredKeyInputWindow()
+ {
+     return &aLineSet;
+@@ -2351,10 +2422,10 @@ SfxPopupWindow*	SvxFontColorToolBoxControl::CreatePopupWindow()
                  SVX_RESSTR( RID_SVXITEMS_EXTRAS_CHARCOLOR ),
                  &GetToolBox() );
  
@@ -2038,7 +2118,7 @@ index 94494aa..f6a0e5f 100644
      return pColorWin;
  }
  
-@@ -2422,10 +2476,9 @@ SfxPopupWindow*	SvxColorToolBoxControl::CreatePopupWindow()
+@@ -2422,10 +2493,9 @@ SfxPopupWindow*	SvxColorToolBoxControl::CreatePopupWindow()
                                      SVX_RESSTR(nResId),
                                      &GetToolBox() );
  
@@ -2051,7 +2131,7 @@ index 94494aa..f6a0e5f 100644
      return pColorWin;
  }
  
-@@ -2496,16 +2549,15 @@ SfxPopupWindow*	SvxFontColorExtToolBoxControl::CreatePopupWindow()
+@@ -2496,16 +2566,15 @@ SfxPopupWindow*	SvxFontColorExtToolBoxControl::CreatePopupWindow()
                              m_aCommandURL,
                              GetSlotId(),
                              m_xFrame,
@@ -2071,7 +2151,7 @@ index 94494aa..f6a0e5f 100644
      return pColorWin;
  }
  
-@@ -2591,9 +2643,9 @@ SfxPopupWindow*	SvxFrameToolBoxControl::CreatePopupWindow()
+@@ -2591,9 +2660,9 @@ SfxPopupWindow*	SvxFrameToolBoxControl::CreatePopupWindow()
      SvxFrameWindow_Impl* pFrameWin = new SvxFrameWindow_Impl(
                                          GetSlotId(), m_xFrame, &GetToolBox() );
  
@@ -2083,7 +2163,7 @@ index 94494aa..f6a0e5f 100644
  
      return pFrameWin;
  }
-@@ -2640,9 +2692,9 @@ SfxPopupWindowType SvxFrameLineStyleToolBoxControl::GetPopupWindowType() const
+@@ -2640,9 +2709,9 @@ SfxPopupWindowType SvxFrameLineStyleToolBoxControl::GetPopupWindowType() const
  SfxPopupWindow*	SvxFrameLineStyleToolBoxControl::CreatePopupWindow()
  {
      SvxLineWindow_Impl* pLineWin = new SvxLineWindow_Impl( GetSlotId(), m_xFrame, &GetToolBox() );
@@ -2095,7 +2175,7 @@ index 94494aa..f6a0e5f 100644
  
      return pLineWin;
  }
-@@ -2703,10 +2755,9 @@ SfxPopupWindow*	SvxFrameLineColorToolBoxControl::CreatePopupWindow()
+@@ -2703,10 +2772,9 @@ SfxPopupWindow*	SvxFrameLineColorToolBoxControl::CreatePopupWindow()
                                          SVX_RESSTR(RID_SVXSTR_FRAME_COLOR),
                                          &GetToolBox() );
  
@@ -2108,7 +2188,7 @@ index 94494aa..f6a0e5f 100644
      return pColorWin;
  }
  
-@@ -2822,8 +2873,8 @@ void lcl_ResizeValueSet( Window &rWin, ValueSet &rValueSet )
+@@ -2822,8 +2890,8 @@ void lcl_ResizeValueSet( Window &rWin, ValueSet &rValueSet )
  {
      Size aSize = rWin.GetOutputSizePixel();
      aSize.Width()  -= 4;
@@ -2119,7 +2199,7 @@ index 94494aa..f6a0e5f 100644
  }
  
  // -----------------------------------------------------------------------
-@@ -2832,7 +2883,7 @@ void lcl_CalcSizeValueSet( Window &rWin, ValueSet &rValueSet, const Size &aItemS
+@@ -2832,7 +2900,7 @@ void lcl_CalcSizeValueSet( Window &rWin, ValueSet &rValueSet, const Size &aItemS
  {
      Size aSize = rValueSet.CalcWindowSizePixel( aItemSize );
      aSize.Width()  += 4;
@@ -2149,7 +2229,7 @@ index 0110960..6c84898 100644
  
      // required because those methods are not virtual in Window (!!!) and must
 diff --git vcl/source/window/dockmgr.cxx vcl/source/window/dockmgr.cxx
-index 6d70c20..d4e29a7 100644
+index 6d70c20..5c98a3b 100644
 --- vcl/source/window/dockmgr.cxx
 +++ vcl/source/window/dockmgr.cxx
 @@ -436,6 +436,13 @@ void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWin
@@ -2235,7 +2315,24 @@ index 6d70c20..d4e29a7 100644
      {
          if( rMEvt.IsLeft() && GetDragRect().IsInside( aMousePos ) )
          {
-@@ -1257,6 +1273,11 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox )
+@@ -1238,14 +1254,10 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox )
+     ULONG nFlags =  FLOATWIN_POPUPMODE_ALLOWTEAROFF         |
+                     FLOATWIN_POPUPMODE_NOFOCUSCLOSE 	    |
+                     FLOATWIN_POPUPMODE_ALLMOUSEBUTTONCLOSE  |
+-                    FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE;
++                    FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE       |
++                    FLOATWIN_POPUPMODE_GRABFOCUS;
+ //                    |FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE;
+ 
+-    // if the subtoolbar was opened via keyboard make sure that key events
+-    // will go into subtoolbar
+-    if( pParentToolBox->IsKeyEvent() )
+-        nFlags |= FLOATWIN_POPUPMODE_GRABFOCUS;
+-
+     mpFloatWin->StartPopupMode( pParentToolBox, nFlags );
+     GetWindow()->Show();
+ 
+@@ -1257,6 +1269,11 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox )
      }
  }
  


More information about the ooo-build-commit mailing list