[Libreoffice-commits] .: 4 commits - vcl/inc vcl/source vcl/unx

Jan Holesovsky kendy at kemper.freedesktop.org
Mon Nov 1 08:30:05 PDT 2010


 vcl/inc/vcl/svdata.hxx                   |    4 ++++
 vcl/source/app/svdata.cxx                |    1 -
 vcl/source/control/spinfld.cxx           |    5 +++--
 vcl/source/window/brdwin.cxx             |    6 ++++--
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |    4 +++-
 5 files changed, 14 insertions(+), 6 deletions(-)

New commits:
commit 4862c21773b5e92a285312a9a769ea28d652aedd
Merge: 7d552cc... 1acb87e...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Mon Nov 1 16:09:03 2010 +0100

    Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/libs-gui

commit 7d552cc1cf946b6af14918b21fa3b0341aafdd4f
Merge: a982744... c09c529...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Mon Nov 1 13:54:40 2010 +0100

    Merge commit 'ooo/OOO330_m13'
    
    Conflicts:
    	vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx

diff --cc vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 67c9ce8,dfd1d8c..13e3852
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@@ -402,22 -401,25 +402,24 @@@ void GtkData::initNWF( void 
  
      // draw separate buttons for toolbox dropdown items
      pSVData->maNWFData.mbToolboxDropDownSeparate = true;
 -    
 +
      // small extra border around menu items
      pSVData->maNWFData.mnMenuFormatExtraBorder = 1;
 -    
 +
      // draw toolbars in separate lines
      pSVData->maNWFData.mbDockingAreaSeparateTB = true;
 -    
 +
      // open first menu on F10
      pSVData->maNWFData.mbOpenMenuOnF10 = true;
 -    
 +
+     // omit GetNativeControl while painting (see brdwin.cxx)
+     pSVData->maNWFData.mbCanDrawWidgetAnySize = true;
 -    
++
      int nScreens = GetX11SalData()->GetDisplay()->GetScreenCount();
      gWidgetData = std::vector<NWFWidgetData>( nScreens );
      for( int i = 0; i < nScreens; i++ )
          gWidgetData[i].gNWPixmapCacheList = new NWPixmapCacheList;
  
- 
 -    
      if( SalGetDesktopEnvironment().equalsAscii( "KDE" ) )
      {
          // #i97196# ensure a widget exists and the style engine was loaded
commit c09c529cbe20a9915c2ca8d50b4b5a804b999715
Merge: 7f78d64... 94c5e41...
Author: obo <obo at openoffice.org>
Date:   Mon Oct 25 14:30:07 2010 +0200

    CWS-TOOLING: integrate CWS ooo33gsl12

commit 94c5e414d6df9348540aaf94b179b046aa18d6bc
Author: Philipp Lohmann [pl] <Philipp.Lohmann at Oracle.COM>
Date:   Fri Oct 22 14:25:53 2010 +0200

    ooo33gsl12: #i115107# do not call getNativeControlRegion during paint on gtk

diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx
index 6619494..8edbd42 100644
--- a/vcl/inc/vcl/svdata.hxx
+++ b/vcl/inc/vcl/svdata.hxx
@@ -318,6 +318,10 @@ struct ImplSVNWFData
                                                           // window background before drawing the native
                                                           // checkbox
     bool                    mbScrollbarJumpPage;          // true for "jump to here" behavior
+    bool                    mbCanDrawWidgetAnySize;       // set to true currently on gtk
+                                                          // signals that widgets can be drawn in any size and
+                                                          // brdwin.cxx ImplSmallBorderWindowView::DrawWindow
+                                                          // should not do GetNativeControlRegion
 };
 
 
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index a81a5ee..ccfe180 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -112,7 +112,6 @@ void ImplInitSVData()
     // init global instance data
     memset( pImplSVData, 0, sizeof( ImplSVData ) );
     pImplSVData->maHelpData.mbAutoHelpId = sal_True;
-    pImplSVData->maHelpData.mbAutoHelpId = sal_True;
     pImplSVData->maNWFData.maMenuBarHighlightTextColor = Color( COL_TRANSPARENT );
 
     // find out whether we are running in the testtool
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 1632e1e..c788d7d 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -114,8 +114,9 @@ BOOL ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonVa
             Size aSize( pBorder->GetOutputSizePixel() );    // the size of the border window, i.e., the whole control
             Rectangle aBound, aContent;
             Rectangle aNatRgn( aPt, aSize );
-            if( pBorder->GetNativeControlRegion(CTRL_SPINBOX, PART_ENTIRE_CONTROL,
-                    aNatRgn, 0, rSpinbuttonValue, rtl::OUString(), aBound, aContent) )
+            if( ! ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
+                pBorder->GetNativeControlRegion( CTRL_SPINBOX, PART_ENTIRE_CONTROL,
+                                                 aNatRgn, 0, rSpinbuttonValue, rtl::OUString(), aBound, aContent) )
             {
                 aSize = aContent.GetSize();
             }
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 1b5e03b..523f7a5 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1348,8 +1348,10 @@ void ImplSmallBorderWindowView::DrawWindow( USHORT nDrawFlags, OutputDevice*, co
         
         Rectangle aBoundingRgn( aPoint, Size( mnWidth, mnHeight ) );
         Rectangle aContentRgn( aCtrlRegion );
-        if(pWin->GetNativeControlRegion( aCtrlType, aCtrlPart, aCtrlRegion,
-            nState, aControlValue, rtl::OUString(), aBoundingRgn, aContentRgn ))
+        if( ! ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
+            pWin->GetNativeControlRegion( aCtrlType, aCtrlPart, aCtrlRegion,
+                                          nState, aControlValue, rtl::OUString(),
+                                          aBoundingRgn, aContentRgn ))
         {
             aCtrlRegion=aContentRgn;
         }
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index a4dcd31..dfd1d8c 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -411,6 +411,9 @@ void GtkData::initNWF( void )
     // open first menu on F10
     pSVData->maNWFData.mbOpenMenuOnF10 = true;
     
+    // omit GetNativeControl while painting (see brdwin.cxx)
+    pSVData->maNWFData.mbCanDrawWidgetAnySize = true;
+    
     int nScreens = GetX11SalData()->GetDisplay()->GetScreenCount();
     gWidgetData = std::vector<NWFWidgetData>( nScreens );
     for( int i = 0; i < nScreens; i++ )


More information about the Libreoffice-commits mailing list