[ooo-build-commit] .: 4 commits - starmath/uiconfig sw/source sw/uiconfig

Jan Holesovsky kendy at kemper.freedesktop.org
Wed Sep 15 04:57:38 PDT 2010


 starmath/uiconfig/smath/menubar/menubar.xml |    1 
 sw/source/ui/inc/view.hxx                   |    1 
 sw/source/ui/uiview/view.cxx                |    7 ++++++
 sw/source/ui/uiview/viewmdi.cxx             |   31 ++++++++++++++++++++++++++++
 sw/source/ui/uiview/viewport.cxx            |    5 ++--
 sw/uiconfig/sglobal/menubar/menubar.xml     |    1 
 sw/uiconfig/sweb/menubar/menubar.xml        |    1 
 sw/uiconfig/swriter/menubar/menubar.xml     |    1 
 8 files changed, 42 insertions(+), 6 deletions(-)

New commits:
commit 89dc30f2be1b30fa51808938c4d2d866e7d0c561
Author: Radek Doulik <rodo at novell.com>
Date:   Wed Sep 15 11:04:24 2010 +0200

    sw-auto-scrollbars-2.diff: Hide scrollbars in Writer - final.

diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 3320da3..0e3d55e 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -1112,6 +1112,8 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
         ShowHScrollbar( FALSE );
     if( !pVScrollbar->IsVisible( TRUE ) )
         ShowVScrollbar( FALSE );
+
+    GetViewFrame()->GetWindow().AddChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
 }
 
 /*--------------------------------------------------------------------
@@ -1121,6 +1123,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
 
 SwView::~SwView()
 {
+    GetViewFrame()->GetWindow().RemoveChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
     delete mpPostItMgr;
     // --> OD 2009-03-10 #i100035#
     mpPostItMgr = 0;
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 818e5ae..64c24f9 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -359,8 +359,6 @@ int SwView::_CreateScrollbar( BOOL bHori )
 
     (*ppScrollbar)->SetAuto( TRUE );
 
-    pMDI->AddChildEventListener( LINK( this, SwView, WindowChildEventListener ));
-
     if(GetWindow())
         InvalidateBorder();
 
commit 1a95ce282097c7ba315dd0eb7fd4e35d5ce61e66
Author: Radek Doulik <rodo at novell.com>
Date:   Wed Sep 15 11:04:02 2010 +0200

    sw-auto-scrollbars-1.diff: Hide scrollbars in Writer update.

diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 496e683..3320da3 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -1108,6 +1108,10 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
         pDocSh->EnableSetModified( sal_True );
     InvalidateBorder();
 
+    if( !pHScrollbar->IsVisible( TRUE ) )
+        ShowHScrollbar( FALSE );
+    if( !pVScrollbar->IsVisible( TRUE ) )
+        ShowVScrollbar( FALSE );
 }
 
 /*--------------------------------------------------------------------
commit 6b464e0d29c72cf06b5c7bd7e3cc0e42d66b1ec3
Author: Radek Doulik <rodo at novell.com>
Date:   Wed Sep 15 11:03:16 2010 +0200

    sw-auto-scrollbars.diff: Hide scrollbars in Writer when not necessary.

diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index 039f9ff..08e27ac 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -330,6 +330,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
     SW_DLLPRIVATE int               _CreateScrollbar( BOOL bHori );
     SW_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
     SW_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
+    SW_DLLPRIVATE DECL_LINK( WindowChildEventListener, VclSimpleEvent* );
     SW_DLLPRIVATE BOOL			UpdateScrollbars();
     SW_DLLPRIVATE void			CalcVisArea( const Size &rPixelSz );
 
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index f8212d8..818e5ae 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -308,6 +308,35 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
  * Scrollbar - Handler
  */
 
+IMPL_LINK( SwView, WindowChildEventListener, VclSimpleEvent*, pEvent )
+{
+    DBG_ASSERT( pEvent && pEvent->ISA( VclWindowEvent ), "Unknown WindowEvent!" );
+    if ( pEvent && pEvent->ISA( VclWindowEvent ) )
+    {
+        VclWindowEvent *pVclEvent = static_cast< VclWindowEvent * >( pEvent );
+        DBG_ASSERT( pVclEvent->GetWindow(), "Window???" );
+        Window* pChildWin = static_cast< Window* >( pVclEvent->GetData() );
+
+        switch ( pVclEvent->GetId() )
+        {
+            case VCLEVENT_WINDOW_HIDE:
+                if( pChildWin == pHScrollbar )
+                    ShowHScrollbar( FALSE );
+                else if( pChildWin == pVScrollbar )
+                    ShowVScrollbar( FALSE );
+                break;
+            case VCLEVENT_WINDOW_SHOW:
+                if( pChildWin == pHScrollbar )
+                    ShowHScrollbar( TRUE );
+                else if( pChildWin == pVScrollbar )
+                    ShowVScrollbar( TRUE );
+                break;
+        }
+    }
+
+    return 0;
+}
+
 int SwView::_CreateScrollbar( BOOL bHori )
 {
     Window *pMDI = &GetViewFrame()->GetWindow();
@@ -328,6 +357,10 @@ int SwView::_CreateScrollbar( BOOL bHori )
 
     (*ppScrollbar)->EnableDrag( TRUE );
 
+    (*ppScrollbar)->SetAuto( TRUE );
+
+    pMDI->AddChildEventListener( LINK( this, SwView, WindowChildEventListener ));
+
     if(GetWindow())
         InvalidateBorder();
 
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index d47436a..6137a00 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -1135,6 +1135,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
             {
                 bShowH = pVOpt->IsViewHScrollBar();
                 bShowV = pVOpt->IsViewVScrollBar();
+                bAuto = bHAuto = TRUE;
                 break;
             }
         }
@@ -1156,10 +1157,10 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
     {
         bShowH = bShowV = bHAuto = bAuto = FALSE;
     }
-    if(pHScrollbar->IsVisible(FALSE) != bShowH)
+    if(pHScrollbar->IsVisible(FALSE) != bShowH && !bHAuto)
         ShowHScrollbar(bShowH);
     pHScrollbar->SetAuto( bHAuto );
-    if(pVScrollbar->IsVisible(FALSE) != bShowV)
+    if(pVScrollbar->IsVisible(FALSE) != bShowV && !bAuto)
         ShowVScrollbar(bShowV);
     pVScrollbar->SetAuto(bAuto);
 
commit 8146734ddb4361f66e262b065c5130ae501fbcaa
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Wed Sep 15 10:52:08 2010 +0200

    default-no-registration-menu.diff: Remove registration from menu.

diff --git a/starmath/uiconfig/smath/menubar/menubar.xml b/starmath/uiconfig/smath/menubar/menubar.xml
index 63bf72c..dc3af92 100644
--- a/starmath/uiconfig/smath/menubar/menubar.xml
+++ b/starmath/uiconfig/smath/menubar/menubar.xml
@@ -113,7 +113,6 @@
       <menu:menuitem menu:id=".uno:ExtendedHelp"/>
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:HelpSupport"/>
-      <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:About"/>
     </menu:menupopup>
diff --git a/sw/uiconfig/sglobal/menubar/menubar.xml b/sw/uiconfig/sglobal/menubar/menubar.xml
index c3bef67..8945195 100644
--- a/sw/uiconfig/sglobal/menubar/menubar.xml
+++ b/sw/uiconfig/sglobal/menubar/menubar.xml
@@ -453,7 +453,6 @@
       <menu:menuitem menu:id=".uno:ExtendedHelp"/>
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:HelpSupport"/>
-      <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:About"/>
     </menu:menupopup>
diff --git a/sw/uiconfig/sweb/menubar/menubar.xml b/sw/uiconfig/sweb/menubar/menubar.xml
index 4b482e3..a99cdee 100644
--- a/sw/uiconfig/sweb/menubar/menubar.xml
+++ b/sw/uiconfig/sweb/menubar/menubar.xml
@@ -382,7 +382,6 @@
       <menu:menuitem menu:id=".uno:ExtendedHelp"/>
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:HelpSupport"/>
-      <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:About"/>
     </menu:menupopup>
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml
index fb10ca6..98eeddd 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -456,7 +456,6 @@
       <menu:menuitem menu:id=".uno:ExtendedHelp"/>
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:HelpSupport"/>
-      <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
       <menu:menuseparator/>
       <menu:menuitem menu:id=".uno:About"/>
     </menu:menupopup>


More information about the ooo-build-commit mailing list