diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-11-23 17:39:22 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-11-23 17:39:22 +0100 |
commit | 283842d88132c35379735cc8e7def68db9b89428 (patch) | |
tree | 541d02aed426b37977a4024e66c10a628616a24d /sd/source/ui/toolpanel | |
parent | 76582d69eb4ca5166fb9a41a698bfea4efd466a5 (diff) | |
parent | d78e19009f4cc8af969da61b3e35ac6c6527231d (diff) |
merge commit for m65
Diffstat (limited to 'sd/source/ui/toolpanel')
-rw-r--r-- | sd/source/ui/toolpanel/LayoutMenu.cxx | 13 | ||||
-rw-r--r-- | sd/source/ui/toolpanel/TitleToolBox.cxx | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx index e769d4b5180d..b78042e2e9ae 100644 --- a/sd/source/ui/toolpanel/LayoutMenu.cxx +++ b/sd/source/ui/toolpanel/LayoutMenu.cxx @@ -63,7 +63,7 @@ #include <vcl/image.hxx> #include <svl/languageoptions.hxx> #include <sfx2/app.hxx> -#include "taskpane/TitledControl.hxx"
+#include "taskpane/TitledControl.hxx" #include <sfx2/dispatch.hxx> #include <sfx2/request.hxx> #include <comphelper/processfactory.hxx> @@ -808,7 +808,7 @@ SfxRequest LayoutMenu::CreateRequest ( void LayoutMenu::Fill (void) { - const bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + const bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); SvtLanguageOptions aLanguageOptions; sal_Bool bVertical = aLanguageOptions.IsVerticalTextEnabled(); SdDrawDocument* pDocument = mrBase.GetDocument(); @@ -917,8 +917,13 @@ void LayoutMenu::Command (const CommandEvent& rEvent) if (GetShellManager() != NULL) GetShellManager()->MoveToTop(this); if (rEvent.IsMouseEvent()) - mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup( - SdResId(RID_TASKPANE_LAYOUTMENU_POPUP)); + { + // Do not show the context menu when the mouse was not + // pressed over an item. + if (GetItemId(rEvent.GetMousePosPixel()) > 0) + mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup( + SdResId(RID_TASKPANE_LAYOUTMENU_POPUP)); + } else { // When the command event was not caused by a mouse diff --git a/sd/source/ui/toolpanel/TitleToolBox.cxx b/sd/source/ui/toolpanel/TitleToolBox.cxx index b06ab615cbf2..d108724f03d4 100644 --- a/sd/source/ui/toolpanel/TitleToolBox.cxx +++ b/sd/source/ui/toolpanel/TitleToolBox.cxx @@ -77,7 +77,7 @@ void TitleToolBox::AddItem (ToolBoxId aId) case TBID_DOCUMENT_CLOSE: InsertItem (TBID_DOCUMENT_CLOSE, - GetSettings().GetStyleSettings().GetMenuBarColor().IsDark() + GetSettings().GetStyleSettings().GetHighContrastMode() ? maImageHC : maImage, 0 ); break; |