[ooo-build-commit] 2 commits - patches/dev300

Thorsten Behrens thorsten at kemper.freedesktop.org
Fri Jul 3 11:30:22 PDT 2009


 patches/dev300/apply                       |    1 
 patches/dev300/sd-disable-layoutpane.diff  |  214 +++++++++++++++++++++++++++++
 patches/dev300/vcl-gtk-fullscreen-fix.diff |    2 
 3 files changed, 216 insertions(+), 1 deletion(-)

New commits:
commit 171ff1b45316982baa01b581e9f39f3b7c79731d
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Thu Jul 2 19:02:08 2009 +0200

    Disable Impress layout pane when in master page mode
    
    * patches/dev300/apply: added the patch
    * patches/dev300/sd-disable-layoutpane.diff: patch from issue 73289,
      kudos to liang weike for providing this nice fix

diff --git a/patches/dev300/apply b/patches/dev300/apply
index e795a98..c114adb 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3223,6 +3223,7 @@ configmgr-validate-removedtree.diff, n#505704
 svx-fix-fit-to-frame-crash.diff, n#508621, rodo
 vcl-gtk-fullscreen-fix.diff, n#480324, thorsten
 vcl-startup-crash-fix.diff, i#103148, thorsten
+sd-disable-layoutpane.diff, i#73289, thorsten
 
 # adds various color conversion functions to basegfx's BColor
 basegfx-color-tools.diff, thorsten
diff --git a/patches/dev300/sd-disable-layoutpane.diff b/patches/dev300/sd-disable-layoutpane.diff
new file mode 100644
index 0000000..78a526b
--- /dev/null
+++ b/patches/dev300/sd-disable-layoutpane.diff
@@ -0,0 +1,214 @@
+Disable layout pane in Impress, when editing master pages
+
+From: Thorsten Behrens <thb at openoffice.org>
+
+
+---
+
+ sd/source/ui/inc/taskpane/TitleBar.hxx      |    1 +
+ sd/source/ui/inc/taskpane/TitledControl.hxx |    2 ++
+ sd/source/ui/toolpanel/LayoutMenu.cxx       |   17 +++++++++++++++--
+ sd/source/ui/toolpanel/LayoutMenu.hxx       |    2 ++
+ sd/source/ui/toolpanel/TitleBar.cxx         |   24 +++++++++++++++++++-----
+ sd/source/ui/toolpanel/TitledControl.cxx    |   24 ++++++++++++++++++++++--
+ sd/source/ui/tools/EventMultiplexer.cxx     |    5 +++--
+ 7 files changed, 64 insertions(+), 11 deletions(-)
+
+
+diff --git sd/source/ui/inc/taskpane/TitleBar.hxx sd/source/ui/inc/taskpane/TitleBar.hxx
+index 0ee436b..26b3e57 100644
+--- sd/source/ui/inc/taskpane/TitleBar.hxx
++++ sd/source/ui/inc/taskpane/TitleBar.hxx
+@@ -92,6 +92,7 @@ public:
+     virtual void Paint (const Rectangle& rBoundingBox);
+     virtual bool Expand (bool bFlag = true);
+     virtual bool IsExpanded (void) const;
++    virtual void SetEnabledState(bool bFlag);
+ 
+     void SetFocus (bool bFlag);
+ 
+diff --git sd/source/ui/inc/taskpane/TitledControl.hxx sd/source/ui/inc/taskpane/TitledControl.hxx
+index da28ded..6dfd051 100644
+--- sd/source/ui/inc/taskpane/TitledControl.hxx
++++ sd/source/ui/inc/taskpane/TitledControl.hxx
+@@ -135,6 +135,8 @@ public:
+     */
+     virtual bool IsExpandable (void) const;
+ 
++    virtual void SetEnabledState(bool bFlag);
++
+     /** Ownership of the given data remains with the caller.  The data
+         is thus not destroyed when the destructor of this class is
+         called.
+diff --git sd/source/ui/toolpanel/LayoutMenu.cxx sd/source/ui/toolpanel/LayoutMenu.cxx
+index 3a5663f..c1d86c0 100644
+--- sd/source/ui/toolpanel/LayoutMenu.cxx
++++ sd/source/ui/toolpanel/LayoutMenu.cxx
+@@ -63,6 +63,7 @@
+ #include <vcl/image.hxx>
+ #include <svtools/languageoptions.hxx>
+ #include <sfx2/app.hxx>
++#include "taskpane/TitledControl.hxx"
+ #include <sfx2/dispatch.hxx>
+ #include <sfx2/request.hxx>
+ #include <comphelper/processfactory.hxx>
+@@ -413,8 +414,12 @@ bool LayoutMenu::IsResizable (void)
+     return true;
+ }
+ 
+-
+-
++void LayoutMenu::DetectEnabledState(bool bFlag) 
++{			
++    TreeNode* pParentNode = GetParentNode();
++    TreeNode* pGrandparentNode = pParentNode->GetParentNode();
++    dynamic_cast<TitledControl*>(pGrandparentNode)->SetEnabledState(bFlag);
++}
+ 
+ ::Window* LayoutMenu::GetWindow (void)
+ {
+@@ -905,12 +910,20 @@ void LayoutMenu::UpdateSelection (void)
+         // Find the entry of the menu for to the layout.
+         USHORT nItemCount (GetItemCount());
+         for (USHORT nId=1; nId<=nItemCount; nId++)
++        {
+             if (*static_cast<AutoLayout*>(GetItemData(nId)) == aLayout)
+             {
+                 SelectItem(nId);
+                 bItemSelected = true;
+                 break;
+             }
++        }
++
++ 		DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(pViewShell);
++ 		if (pDrawViewShell != NULL)
++ 		{
++ 			DetectEnabledState(pDrawViewShell->GetEditMode() != EM_MASTERPAGE);
++ 		}            
+     }
+     while (false);
+ 
+diff --git sd/source/ui/toolpanel/LayoutMenu.hxx sd/source/ui/toolpanel/LayoutMenu.hxx
+index 35280f2..9090296 100644
+--- sd/source/ui/toolpanel/LayoutMenu.hxx
++++ sd/source/ui/toolpanel/LayoutMenu.hxx
+@@ -131,6 +131,8 @@ public:
+     void Execute (SfxRequest& rRequest);
+     void GetState (SfxItemSet& rItemSet);
+ 
++    void DetectEnabledState(bool bFlag);
++
+     /** Call this method when the set of displayed layouts is not up-to-date
+         anymore.  It will re-assemple this set according to the current
+         settings.
+diff --git sd/source/ui/toolpanel/TitleBar.cxx sd/source/ui/toolpanel/TitleBar.cxx
+index f401371..6e25210 100644
+--- sd/source/ui/toolpanel/TitleBar.cxx
++++ sd/source/ui/toolpanel/TitleBar.cxx
+@@ -216,6 +216,14 @@ bool TitleBar::IsExpanded (void) const
+ }
+ 
+ 
++void TitleBar::SetEnabledState(bool bFlag)
++{
++    if(bFlag)
++	    Enable();
++    else
++	    Disable();
++    Invalidate ();
++}
+ 
+ 
+ void TitleBar::SetFocus (bool bFlag)
+@@ -454,15 +462,21 @@ void TitleBar::PaintText (const Rectangle& rTextBox)
+ 
+ USHORT TitleBar::GetTextStyle (void)
+ {
+-    return TEXT_DRAW_LEFT 
+-        | TEXT_DRAW_TOP
+-        | TEXT_DRAW_MULTILINE 
+-        | TEXT_DRAW_WORDBREAK;
++ 	if(IsEnabled())
++ 	{
++ 		return TEXT_DRAW_LEFT 
++ 			| TEXT_DRAW_TOP
++ 			| TEXT_DRAW_MULTILINE 
++ 			| TEXT_DRAW_WORDBREAK;
++ 	}
++ 	else
++ 	{
++ 		return TEXT_DRAW_DISABLE;
++ 	}
+ }
+ 
+ 
+ 
+-
+ void TitleBar::PaintBackground (const Rectangle& rTitleBarBox)
+ {
+     // Fill a slightly rounded rectangle.
+diff --git sd/source/ui/toolpanel/TitledControl.cxx sd/source/ui/toolpanel/TitledControl.cxx
+index 829c3be..495a5d3 100644
+--- sd/source/ui/toolpanel/TitledControl.cxx
++++ sd/source/ui/toolpanel/TitledControl.cxx
+@@ -292,7 +292,7 @@ bool TitledControl::Expand (bool bExpanded)
+ {
+     bool bExpansionStateChanged (false);
+ 
+-    if (IsExpandable())
++    if (IsExpandable() && IsEnabled())
+     {
+         if (GetTitleBar()->IsExpanded() != bExpanded)
+             bExpansionStateChanged |= GetTitleBar()->Expand (bExpanded);
+@@ -338,6 +338,25 @@ bool TitledControl::IsExpanded (void) const
+         return false;
+ }
+ 
++void TitledControl::SetEnabledState(bool bFlag) 
++{
++    if (!bFlag)
++    {
++	    GetParentNode()->GetControlContainer().SetExpansionState (
++		    this,
++		    ControlContainer::ES_COLLAPSE);
++	    Disable();
++    }
++    else 
++    {
++	    GetParentNode()->GetControlContainer().SetExpansionState (
++		    this,
++		    ControlContainer::ES_EXPAND);
++	    Enable();
++    }
++
++    GetTitleBar()->SetEnabledState(bFlag);
++}
+ 
+ 
+ 
+@@ -406,7 +425,8 @@ IMPL_LINK(TitledControl, WindowEventListener,
+         switch (pWindowEvent->GetId())
+         {
+             case VCLEVENT_WINDOW_MOUSEBUTTONUP:
+-                (*mpClickHandler)(*this);
++                if (IsEnabled())
++                    (*mpClickHandler)(*this);
+                 break;
+         }
+     }
+diff --git sd/source/ui/tools/EventMultiplexer.cxx sd/source/ui/tools/EventMultiplexer.cxx
+index 786308a..afe88eb 100644
+--- sd/source/ui/tools/EventMultiplexer.cxx
++++ sd/source/ui/tools/EventMultiplexer.cxx
+@@ -783,8 +783,9 @@ void EventMultiplexer::Implementation::CallListeners (
+ 
+ void EventMultiplexer::Implementation::CallListeners (EventMultiplexerEvent& rEvent)
+ {
+-    ListenerList::const_iterator iListener (maListeners.begin());
+-    ListenerList::const_iterator iListenerEnd (maListeners.end());
++    ListenerList aCopyListeners( maListeners );
++    ListenerList::iterator iListener (aCopyListeners.begin());
++    ListenerList::const_iterator iListenerEnd (aCopyListeners.end());
+     for (; iListener!=iListenerEnd; ++iListener)
+     {
+         if ((iListener->second && rEvent.meEventId) != 0)
commit 766c7aa21891206bc788c03e3003b237620aedb1
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Thu Jul 2 17:17:24 2009 +0200

    Merged with a patch from Caolan; now using HINT_TOOLBAR
    
    * patches/dev300/vcl-gtk-fullscreen-fix.diff: latest changes from
      issue i#103145

diff --git a/patches/dev300/vcl-gtk-fullscreen-fix.diff b/patches/dev300/vcl-gtk-fullscreen-fix.diff
index 6725889..a693e80 100644
--- a/patches/dev300/vcl-gtk-fullscreen-fix.diff
+++ b/patches/dev300/vcl-gtk-fullscreen-fix.diff
@@ -18,7 +18,7 @@ index c1fbbc5..96dfa14 100644
          if( (nStyle & SAL_FRAME_STYLE_PARTIAL_FULLSCREEN ) )
          {
 -            eType = GDK_WINDOW_TYPE_HINT_DOCK;
-+            eType = GDK_WINDOW_TYPE_HINT_UTILITY;
++            eType = GDK_WINDOW_TYPE_HINT_TOOLBAR;
              gtk_window_set_keep_above( GTK_WINDOW(m_pWindow), true );
          }
          


More information about the ooo-build-commit mailing list