summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2009-01-29 10:50:15 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2009-01-29 10:50:15 +0000
commitc50b19180f474cc13dcf07a1efe7a5393c575efc (patch)
treeabc0f89e8eaea8f9389563ae3736a0a882c843e4
parent3cb9494b42a5be33d4bc210cc7481aeafd851656 (diff)
CWS-TOOLING: integrate CWS metropatch01_DEV300
-rw-r--r--framework/source/uielement/menubarmanager.cxx16
-rw-r--r--sfx2/source/menu/mnuitem.cxx6
-rw-r--r--svx/source/mnuctrls/clipboardctl.cxx10
3 files changed, 30 insertions, 2 deletions
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index f3d75d60e6..31893675c8 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -676,12 +676,24 @@ throw ( RuntimeException )
{
sal_Bool bCheckmark( sal_False );
sal_Bool bMenuItemEnabled( m_pVCLMenu->IsItemEnabled( pMenuItemHandler->nItemId ));
+ sal_Bool bEnabledItem( Event.IsEnabled );
rtl::OUString aItemText;
status::Visibility aVisibilityStatus;
+ #ifdef UNIX
+ // #b6673979# enable some slots hardly, because UNIX clipboard does not notify all changes
+ // Can be removed if follow up task will be fixed directly within applications.
+ if (
+ ( pMenuItemHandler->aMenuItemURL.equalsAscii (".uno:Paste" ) ) ||
+ ( pMenuItemHandler->aMenuItemURL.equalsAscii (".uno:PasteSpecial" ) ) ||
+ ( pMenuItemHandler->aMenuItemURL.equalsAscii (".uno:PasteClipboard") ) // special for draw/impress
+ )
+ bEnabledItem = sal_True;
+ #endif
+
// Enable/disable item
- if ( Event.IsEnabled != bMenuItemEnabled )
- m_pVCLMenu->EnableItem( pMenuItemHandler->nItemId, Event.IsEnabled );
+ if ( bEnabledItem != bMenuItemEnabled )
+ m_pVCLMenu->EnableItem( pMenuItemHandler->nItemId, bEnabledItem );
if ( Event.State >>= bCheckmark )
{
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 03702e6c8c..6462f1dde2 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -265,6 +265,12 @@ void SfxMenuControl::StateChanged
GetId() >= SID_OBJECTMENU0 && GetId() < SID_OBJECTMENU_LAST;
// enabled/disabled-Flag pauschal korrigieren
+
+#ifdef UNIX
+ if (nSID == SID_PASTE)
+ pOwnMenu->EnableItem( GetId(), TRUE );
+ else
+#endif
pOwnMenu->EnableItem( GetId(), bIsObjMenu
? 0 != pOwnMenu->GetSVMenu()->GetPopupMenu( GetId() )
: eState != SFX_ITEM_DISABLED );
diff --git a/svx/source/mnuctrls/clipboardctl.cxx b/svx/source/mnuctrls/clipboardctl.cxx
index ddb8671064..fdda4c01b0 100644
--- a/svx/source/mnuctrls/clipboardctl.cxx
+++ b/svx/source/mnuctrls/clipboardctl.cxx
@@ -143,6 +143,16 @@ void SvxClipBoardControl::StateChanged( USHORT nSID, SfxItemState eState, const
GetToolBox().SetItemBits( GetId(), GetToolBox().GetItemBits( GetId() ) & ~TIB_DROPDOWN );
GetToolBox().Invalidate( GetToolBox().GetItemRect( GetId() ) );
}
+ #ifdef UNIX
+ // #b6673979# enable some slots hardly, because UNIX clipboard does not notify all changes
+ // Can be removed if follow up task will be fixed directly within applications.
+ else
+ if ( SID_PASTE == nSID )
+ {
+ bDisabled = false;
+ GetToolBox().EnableItem( GetId(), true );
+ }
+ #endif
else
{
// enable the item as a whole