[Libreoffice-commits] core.git: 5 commits - configure.ac include/sfx2 include/svx officecfg/registry sc/source sd/source sfx2/source solenv/bin svx/source
Ariel Constenla-Haile
arielch at apache.org
Tue May 28 09:03:45 PDT 2013
configure.ac | 17 +-
include/sfx2/shell.hxx | 15 +
include/sfx2/sidebar/EnumContext.hxx | 1
include/svx/sidebar/SelectionAnalyzer.hxx | 16 +-
include/svx/sidebar/SelectionChangeHandler.hxx | 4
officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu | 12 -
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 3
sc/source/ui/drawfunc/drawsh2.cxx | 26 ++-
sc/source/ui/inc/drawsh.hxx | 4
sd/source/ui/inc/DrawViewShell.hxx | 5
sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 18 --
sd/source/ui/view/drviews1.cxx | 12 -
sd/source/ui/view/drviewsa.cxx | 36 ++--
sd/source/ui/view/outlnvsh.cxx | 2
sd/source/ui/view/viewshel.cxx | 2
sfx2/source/control/shell.cxx | 25 +--
sfx2/source/sidebar/EnumContext.cxx | 8 +
solenv/bin/msg_filter | 78 ----------
svx/source/sidebar/SelectionAnalyzer.cxx | 54 ++++--
svx/source/sidebar/SelectionChangeHandler.cxx | 5
svx/source/sidebar/text/TextPropertyPanel.cxx | 37 ++++
svx/source/sidebar/text/TextPropertyPanel.hxx | 9 +
22 files changed, 206 insertions(+), 183 deletions(-)
New commits:
commit 0a5fda73e82b7c47db2612954f061f9ab2824de8
Author: Ariel Constenla-Haile <arielch at apache.org>
Date: Sun May 26 17:38:27 2013 +0000
Remove icon property from commands without icon
(cherry picked from commit 76f5fa8ed67bfcd162de49a74b2f4484935d55b2)
Conflicts:
officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
Change-Id: I72d3f6ae382793943084235a8e8112bba509e694
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index a1fef54..824eb62 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -1236,33 +1236,21 @@
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Picture Placeholders</value>
</prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
</node>
<node oor:name=".uno:FillDraft" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Contour Mode</value>
</prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
</node>
<node oor:name=".uno:TextDraft" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Text Placeholders</value>
</prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
</node>
<node oor:name=".uno:LineDraft" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Line Contour Only</value>
</prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
</node>
<node oor:name=".uno:SolidCreate" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 1134e9e..46ed65a 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -2282,9 +2282,6 @@
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Stop Loading</value>
</prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
</node>
<node oor:name=".uno:Radiobutton" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
commit aa4ceee5cc4fab5d55ba4cf7970a41df4e2d8ca7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue May 28 16:39:49 2013 +0100
drop ludicrously old msg_filter foo
Change-Id: Ie53c9acd51a53fbb11f0735739edbf18551a620b
diff --git a/solenv/bin/msg_filter b/solenv/bin/msg_filter
deleted file mode 100755
index 2d59e16..0000000
--- a/solenv/bin/msg_filter
+++ /dev/null
@@ -1,78 +0,0 @@
-: # -*- perl -*-
-eval 'exec perl -wS $0 ${1+"$@"}'
- if 0;
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This file incorporates work covered by the following license notice:
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed
-# with this work for additional information regarding copyright
-# ownership. The ASF licenses this file to you under the Apache
-# License, Version 2.0 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.apache.org/licenses/LICENSE-2.0 .
-#
-# This is a script to get rid of bogus error messages that are spit out
-# by the compiler - sub 30/11/1999
-
-# Lines that contain `xxxx' where xxxx belongs to the list knownMessages
-# and is surrounded by a backtick (`) and a forward tick (')
-# will not be seen in the compiler output
-
-
- at knownMessages = (
-"__pure_virtual",
-"__vt_9bad_alloc",
-"__vt_9exception",
-"_._9bad_alloc",
-"__cp_push_exception",
-"__uncatch_exception",
-"__rtti_user",
-"__rtti_si",
-"__throw",
-"terminate__Fv",
-"__cp_pop_exception",
-"__builtin_vec_new",
-"__cmpdi2",
-"__builtin_vec_delete",
-"__cp_eh_info",
-"__builtin_delete",
-"__builtin_new",
-"__eh_alloc",
-"__check_eh_spec",
-"_type_match_rtti",
-"__rtti_class",
-"set_new_handler_FPFv_v",
-"__throw_type_match_rtti",
-"__check_eh_spec",
-"exception_type_info",
-"exception type_info function",
-"exception type_info node",
-"exception virtual table",
-"terminate(void)"
-);
-
-# Create a hash %msgHash from list @knownMessages
-foreach $msg (@knownMessages) {
- $msgHash {$msg}++;
-}
-while ( <STDIN> ) {
-
- if (/\`([\s\w]+)\'/) {
- $entry = $1;
- if (defined($entry)) {
- if (!exists $msgHash{$entry}) {
- print $_;
- }
- }
- }
- else {
- print $_;
- }
-}
commit 21747cae6ad12ec6566e6dd9a06f3c268c72404d
Author: Andre Fischer <af at apache.org>
Date: Mon May 27 12:55:37 2013 +0000
Resolves: #i122387# Use the right tool box for font color in text sidebar
(cherry picked from commit 08159967126946849906827ceadd802053d132c0)
Conflicts:
sfx2/inc/sfx2/sidebar/EnumContext.hxx
Change-Id: If40d3dee7c11e4ea6b01d40d713280e1dc19484d
Unname unused argument to prevent compiler warnings.
(cherry picked from commit f68dfc2cc8754d9cf72ae1b09f119e683ad44124)
Change-Id: I6450c6e46d5971abc871ed378d2ad6307e8f7a3e
diff --git a/include/sfx2/sidebar/EnumContext.hxx b/include/sfx2/sidebar/EnumContext.hxx
index f45ecd9..b24a8b2 100644
--- a/include/sfx2/sidebar/EnumContext.hxx
+++ b/include/sfx2/sidebar/EnumContext.hxx
@@ -129,6 +129,7 @@ public:
Application GetApplication_DI (void) const;
const ::rtl::OUString& GetContextName (void) const;
+ Context GetContext (void) const;
bool operator == (const EnumContext aOther);
bool operator != (const EnumContext aOther);
diff --git a/sfx2/source/sidebar/EnumContext.cxx b/sfx2/source/sidebar/EnumContext.cxx
index d78d8cf..48a974e 100644
--- a/sfx2/source/sidebar/EnumContext.cxx
+++ b/sfx2/source/sidebar/EnumContext.cxx
@@ -136,6 +136,14 @@ const ::rtl::OUString& EnumContext::GetContextName (void) const
+EnumContext::Context EnumContext::GetContext (void) const
+{
+ return meContext;
+}
+
+
+
+
bool EnumContext::operator== (const EnumContext aOther)
{
return meApplication==aOther.meApplication
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 6547db6..258a730 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -147,9 +147,12 @@ TextPropertyPanel::TextPropertyPanel (
mpToolBoxFontColorBackground(ControlFactory::CreateToolBoxBackground(this)),
mpToolBoxFontColor(ControlFactory::CreateToolBox(
mpToolBoxFontColorBackground.get(),
- rContext.GetApplication_DI() == sfx2::sidebar::EnumContext::Application_WriterVariants
- ? SVX_RES(TB_FONTCOLOR_SW)
- : SVX_RES(TB_FONTCOLOR),
+ SVX_RES(TB_FONTCOLOR),
+ rxFrame)),
+ mpToolBoxFontColorBackgroundSW(ControlFactory::CreateToolBoxBackground(this)),
+ mpToolBoxFontColorSW(ControlFactory::CreateToolBox(
+ mpToolBoxFontColorBackgroundSW.get(),
+ SVX_RES(TB_FONTCOLOR_SW),
rxFrame)),
mpToolBoxHighlightBackground(ControlFactory::CreateToolBoxBackground(this)),
mpToolBoxHighlight(ControlFactory::CreateToolBox(
@@ -186,6 +189,8 @@ TextPropertyPanel::TextPropertyPanel (
Initialize();
FreeResource();
+
+ UpdateFontColorToolbox(rContext);
}
@@ -200,6 +205,7 @@ TextPropertyPanel::~TextPropertyPanel (void)
mpToolBoxIncDec.reset();
mpToolBoxFont.reset();
mpToolBoxFontColor.reset();
+ mpToolBoxFontColorSW.reset();
mpToolBoxScript.reset();
mpToolBoxScriptSw.reset();
mpToolBoxSpacing.reset();
@@ -209,6 +215,7 @@ TextPropertyPanel::~TextPropertyPanel (void)
mpToolBoxIncDecBackground.reset();
mpToolBoxFontBackground.reset();
mpToolBoxFontColorBackground.reset();
+ mpToolBoxFontColorBackgroundSW.reset();
mpToolBoxScriptBackground.reset();
mpToolBoxScriptSwBackground.reset();
mpToolBoxSpacingBackground.reset();
@@ -284,6 +291,30 @@ void TextPropertyPanel::HandleContextChange (
default:
break;
}
+
+ UpdateFontColorToolbox(aContext);
+}
+
+
+
+
+void TextPropertyPanel::UpdateFontColorToolbox (
+ const ::sfx2::sidebar::EnumContext /* aContext */)
+{
+ bool bIsWriterFontColor (false);
+ if (maContext.GetApplication_DI() == sfx2::sidebar::EnumContext::Application_WriterVariants)
+ if (maContext.GetContext() != sfx2::sidebar::EnumContext::Context_DrawText)
+ bIsWriterFontColor = true;
+ if (bIsWriterFontColor)
+ {
+ mpToolBoxFontColor->Hide();
+ mpToolBoxFontColorSW->Show();
+ }
+ else
+ {
+ mpToolBoxFontColor->Show();
+ mpToolBoxFontColorSW->Hide();
+ }
}
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx
index a7cc0dd..7f2f641 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.hxx
@@ -97,6 +97,8 @@ private:
::boost::scoped_ptr<ToolBox> mpToolBoxSpacing;
::boost::scoped_ptr<Window> mpToolBoxFontColorBackground;
::boost::scoped_ptr<ToolBox> mpToolBoxFontColor;
+ ::boost::scoped_ptr<Window> mpToolBoxFontColorBackgroundSW;
+ ::boost::scoped_ptr<ToolBox> mpToolBoxFontColorSW;
::boost::scoped_ptr<Window> mpToolBoxHighlightBackground;
::boost::scoped_ptr<ToolBox> mpToolBoxHighlight;
::boost::scoped_ptr<ToolboxButtonColorUpdater> mpFontColorUpdater;
@@ -173,6 +175,13 @@ private:
DECL_LINK(ToolBoxScriptSelectHdl, ToolBox *);
void UpdateItem (const sal_uInt16 nSlotId);
+
+ /** Depending on the given context make one of the toolboxes
+ mpToolBoxFontColor and mpToolBoxFontColorSW visible. Both
+ occupy the same space.
+ */
+ void UpdateFontColorToolbox (
+ const ::sfx2::sidebar::EnumContext aContext);
};
} } // end of namespace ::svx::sidebar
commit 0143805a565418d2a114c16b7eeba3b784176d9e
Author: Andre Fischer <af at apache.org>
Date: Mon May 27 11:18:04 2013 +0000
Resolves: #i122332# Don't change sidebar context when switching...
to other application window
(cherry picked from commit 604502e2a4b53f35aedbf0205598a9b691c0d532)
Conflicts:
sd/source/ui/view/drviewsa.cxx
sfx2/inc/sfx2/shell.hxx
sfx2/source/control/shell.cxx
svx/inc/svx/sidebar/SelectionAnalyzer.hxx
svx/inc/svx/sidebar/SelectionChangeHandler.hxx
Change-Id: Id3c427e02714ef0d6686a78094e2f7f3b390a693
diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx
index cb5b149..ddeb677 100644
--- a/include/sfx2/shell.hxx
+++ b/include/sfx2/shell.hxx
@@ -238,7 +238,20 @@ public:
virtual SfxItemSet* CreateItemSet( sal_uInt16 nId );
virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet );
- void SetContextName (const ::rtl::OUString& rsContextName);
+ /** Set the name of the sidebar context that is broadcast on calls
+ to Activation().
+ */
+ void SetContextName (const ::rtl::OUString& rsContextName);
+
+ /** Broadcast a sidebar context change.
+ This method is typically called from Activate() or
+ Deactivate().
+ @param bIsActivated
+ When <TRUE/> then broadcast the context name that was
+ defined with an earlier call to SetContextName().
+ When <FALSE/> then broadcast the 'default' context.
+ */
+ void BroadcastContextForActivation (const bool bIsActivated);
#ifndef _SFXSH_HXX
SAL_DLLPRIVATE bool CanExecuteSlot_Impl( const SfxSlot &rSlot );
diff --git a/include/svx/sidebar/SelectionAnalyzer.hxx b/include/svx/sidebar/SelectionAnalyzer.hxx
index 601a96e..1a36232 100644
--- a/include/svx/sidebar/SelectionAnalyzer.hxx
+++ b/include/svx/sidebar/SelectionAnalyzer.hxx
@@ -37,19 +37,25 @@ class SVX_DLLPUBLIC SelectionAnalyzer
public :
static sfx2::sidebar::EnumContext::Context GetContextForSelection_SC (
const SdrMarkList& rMarkList);
+
+ enum ViewType
+ {
+ VT_Standard,
+ VT_Master,
+ VT_Handout,
+ VT_Notes,
+ VT_Outline
+ };
static sfx2::sidebar::EnumContext::Context GetContextForSelection_SD (
const SdrMarkList& rMarkList,
- const bool bIsMasterPage,
- const bool bIsHandoutPage,
- const bool bIsNotesPage);
+ const ViewType eViewType);
private:
static sfx2::sidebar::EnumContext::Context GetContextForObjectId_SC (
const sal_uInt16 nObjectId);
static sfx2::sidebar::EnumContext::Context GetContextForObjectId_SD (
const sal_uInt16 nObjectId,
- const bool bIsHandoutPage,
- const bool bIsNotesPage);
+ const ViewType eViewType);
static sal_uInt32 GetInventorTypeFromMark (
const SdrMarkList& rMarkList);
static sal_uInt16 GetObjectTypeFromMark (
diff --git a/include/svx/sidebar/SelectionChangeHandler.hxx b/include/svx/sidebar/SelectionChangeHandler.hxx
index 29116e5..da1e4e7 100644
--- a/include/svx/sidebar/SelectionChangeHandler.hxx
+++ b/include/svx/sidebar/SelectionChangeHandler.hxx
@@ -53,7 +53,7 @@ class SVX_DLLPUBLIC SelectionChangeHandler
{
public:
SelectionChangeHandler (
- const boost::function<sfx2::sidebar::EnumContext::Context(void)>& rSelectionChangeCallback,
+ const boost::function<rtl::OUString(void)>& rSelectionChangeCallback,
const cssu::Reference<css::frame::XController>& rxController,
const sfx2::sidebar::EnumContext::Context eDefaultContext);
virtual ~SelectionChangeHandler (void);
@@ -71,7 +71,7 @@ public:
void Disconnect (void);
private:
- const boost::function<sfx2::sidebar::EnumContext::Context(void)> maSelectionChangeCallback;
+ const boost::function<rtl::OUString(void)> maSelectionChangeCallback;
cssu::Reference<css::frame::XController> mxController;
const sfx2::sidebar::EnumContext::Context meDefaultContext;
bool mbIsConnected;
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index 47df366..94c6852 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -35,6 +35,7 @@
#include <svx/fontworkbar.hxx>
#include <svx/sidebar/SelectionChangeHandler.hxx>
#include <svx/sidebar/SelectionAnalyzer.hxx>
+#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
#include "drawsh.hxx"
#include "drawview.hxx"
@@ -61,7 +62,7 @@ ScDrawShell::ScDrawShell( ScViewData* pData ) :
SfxShell(pData->GetViewShell()),
pViewData( pData ),
mpSelectionChangeHandler(new svx::sidebar::SelectionChangeHandler(
- ::boost::bind(&ScDrawShell::GetContextForSelection, this),
+ ::boost::bind(&ScDrawShell::GetSidebarContextName, this),
GetFrame()->GetFrame().GetController(),
sfx2::sidebar::EnumContext::Context_Cell))
{
@@ -396,10 +397,27 @@ void ScDrawShell::GetDrawAttrStateForIFBX( SfxItemSet& rSet )
}
}
-sfx2::sidebar::EnumContext::Context ScDrawShell::GetContextForSelection (void)
+
+
+
+void ScDrawShell::Activate (const sal_Bool bMDI)
+{
+ (void)bMDI;
+
+ ContextChangeEventMultiplexer::NotifyContextChange(
+ GetFrame()->GetFrame().GetController(),
+ ::sfx2::sidebar::EnumContext::GetContextEnum(
+ GetSidebarContextName()));
+}
+
+
+
+
+::rtl::OUString ScDrawShell::GetSidebarContextName (void)
{
- return ::svx::sidebar::SelectionAnalyzer::GetContextForSelection_SC(
- GetDrawView()->GetMarkedObjectList());
+ return sfx2::sidebar::EnumContext::GetContextName(
+ ::svx::sidebar::SelectionAnalyzer::GetContextForSelection_SC(
+ GetDrawView()->GetMarkedObjectList()));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/drawsh.hxx b/sc/source/ui/inc/drawsh.hxx
index d251eee..34050b1 100644
--- a/sc/source/ui/inc/drawsh.hxx
+++ b/sc/source/ui/inc/drawsh.hxx
@@ -23,7 +23,6 @@
#include <sfx2/shell.hxx>
#include "shellids.hxx"
#include <sfx2/module.hxx>
-#include <sfx2/sidebar/EnumContext.hxx>
#include <svx/svdmark.hxx>
#include <tools/link.hxx>
#include <rtl/ref.hxx>
@@ -45,6 +44,7 @@ class ScDrawShell : public SfxShell
void SetHlinkForObject( SdrObject* pObj, const OUString& rHlnk );
protected:
+ virtual void Activate(sal_Bool bMDI);
ScViewData* GetViewData() { return pViewData; }
public:
@@ -83,7 +83,7 @@ public:
sal_Bool AreAllObjectsOnLayer(sal_uInt16 nLayerNo,const SdrMarkList& rMark);
void GetDrawAttrStateForIFBX( SfxItemSet& rSet );
- ::sfx2::sidebar::EnumContext::Context GetContextForSelection (void);
+ ::rtl::OUString GetSidebarContextName (void);
};
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 6d91b18..8dfdea6 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -24,7 +24,6 @@
#include "tools/AsynchronousCall.hxx"
#include <sfx2/viewfac.hxx>
#include <sfx2/viewsh.hxx>
-#include <sfx2/sidebar/EnumContext.hxx>
#include "TabControl.hxx"
#include "pres.hxx"
#include <svx/sidebar/SelectionChangeHandler.hxx>
@@ -362,6 +361,8 @@ public:
*/
virtual bool RelocateToParentWindow (::Window* pParentWindow);
+ ::rtl::OUString GetSidebarContextName (void) const;
+
protected:
DrawView* mpDrawView;
SdPage* mpActualPage;
@@ -487,8 +488,6 @@ private:
const sal_uInt16 nSnapLineIndex,
const Point& rMouseLocation);
- ::sfx2::sidebar::EnumContext::Context GetContextForSelection (void) const;
-
using ViewShell::Notify;
::std::auto_ptr< AnnotationManager > mpAnnotationManager;
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 43ff824..e9c627f 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -51,6 +51,7 @@
#include "SdUnoSlideView.hxx"
#include "ViewShellManager.hxx"
#include "Window.hxx"
+#include "drawview.hxx"
#include <sfx2/app.hxx>
#include <sfx2/msg.hxx>
#include <sfx2/objface.hxx>
@@ -62,6 +63,7 @@
#include <svx/svxids.hrc>
#include <sfx2/sidebar/EnumContext.hxx>
#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
+#include <svx/sidebar/SelectionAnalyzer.hxx>
#include <com/sun/star/drawing/framework/XControllerManager.hpp>
#include <com/sun/star/drawing/framework/ResourceId.hpp>
#include <cppuhelper/bootstrap.hxx>
@@ -563,23 +565,20 @@ void SlideSorterViewShell::Activate (sal_Bool bIsMDIActivate)
switch (eMainViewShellType)
{
case ViewShell::ST_IMPRESS:
+ case ViewShell::ST_SLIDE_SORTER:
+ case ViewShell::ST_NOTES:
eContext = EnumContext::Context_DrawPage;
if (pMainViewShell->ISA(DrawViewShell))
{
- DrawViewShell* pDrawViewShell = static_cast<DrawViewShell*>(pMainViewShell.get());
- if (pDrawViewShell && (pDrawViewShell->GetEditMode()== EM_MASTERPAGE))
- eContext = EnumContext::Context_MasterPage;
+ DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(pMainViewShell.get());
+ if (pDrawViewShell != NULL)
+ eContext = EnumContext::GetContextEnum(pDrawViewShell->GetSidebarContextName());
}
break;
- case ViewShell::ST_SLIDE_SORTER:
eContext = EnumContext::Context_SlidesorterPage;
break;
- case ViewShell::ST_NOTES:
- eContext = EnumContext::Context_NotesPage;
- break;
-
default:
break;
}
@@ -593,9 +592,6 @@ void SlideSorterViewShell::Activate (sal_Bool bIsMDIActivate)
void SlideSorterViewShell::Deactivate (sal_Bool /*bIsMDIActivate*/)
{
- ContextChangeEventMultiplexer::NotifyContextChange(
- &GetViewShellBase(),
- EnumContext::Context_Default);
}
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 876eab3..26ad764 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -114,9 +114,9 @@ void DrawViewShell::UIDeactivated( SfxInPlaceClient* pCli )
}
-void DrawViewShell::Deactivate(sal_Bool bIsMDIActivate)
+void DrawViewShell::Deactivate(sal_Bool /*bIsMDIActivate*/)
{
- ViewShell::Deactivate(bIsMDIActivate);
+ // Do not forward to ViewShell::Deactivate() to prevent a context change.
}
namespace
@@ -459,13 +459,7 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
Invalidate( SID_NOTES_MASTERPAGE );
Invalidate( SID_HANDOUT_MASTERPAGE );
- if (meEditMode == EM_PAGE)
- SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_DrawPage));
- else if (mePageKind == PK_HANDOUT)
-
- SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_HandoutPage));
- else
- SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_MasterPage));
+ SetContextName(GetSidebarContextName());
}
}
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 2287258..1caab1a 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -125,7 +125,7 @@ DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBas
, mbIsLayerModeActive(false)
, mbIsInSwitchPage(false)
, mpSelectionChangeHandler(new svx::sidebar::SelectionChangeHandler(
- ::boost::bind(&DrawViewShell::GetContextForSelection, this),
+ ::boost::bind(&DrawViewShell::GetSidebarContextName, this),
uno::Reference<frame::XController>(&rViewShellBase.GetDrawController()),
sfx2::sidebar::EnumContext::Context_Default))
{
@@ -137,12 +137,7 @@ DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBas
mpSelectionChangeHandler->Connect();
- if (mpFrameView->GetViewShEditMode(mePageKind) == EM_PAGE)
- SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_DrawPage));
- else if (mePageKind == PK_HANDOUT)
- SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_HandoutPage));
- else
- SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_MasterPage));
+ SetContextName(GetSidebarContextName());
doShow();
}
@@ -833,13 +828,28 @@ void DrawViewShell::GetAnnotationState (SfxItemSet& rItemSet )
-EnumContext::Context DrawViewShell::GetContextForSelection (void) const
+::rtl::OUString DrawViewShell::GetSidebarContextName (void) const
{
- return ::svx::sidebar::SelectionAnalyzer::GetContextForSelection_SD(
- mpDrawView->GetMarkedObjectList(),
- meEditMode == EM_MASTERPAGE,
- mePageKind == PK_HANDOUT,
- mePageKind == PK_NOTES);
+ ::svx::sidebar::SelectionAnalyzer::ViewType eViewType (::svx::sidebar::SelectionAnalyzer::VT_Standard);
+ switch (mePageKind)
+ {
+ case PK_HANDOUT:
+ eViewType = ::svx::sidebar::SelectionAnalyzer::VT_Handout;
+ break;
+ case PK_NOTES:
+ eViewType = ::svx::sidebar::SelectionAnalyzer::VT_Notes;
+ break;
+ case PK_STANDARD:
+ if (meEditMode == EM_MASTERPAGE)
+ eViewType = ::svx::sidebar::SelectionAnalyzer::VT_Master;
+ else
+ eViewType = ::svx::sidebar::SelectionAnalyzer::VT_Standard;
+ break;
+ }
+ return EnumContext::GetContextName(
+ ::svx::sidebar::SelectionAnalyzer::GetContextForSelection_SD(
+ mpDrawView->GetMarkedObjectList(),
+ eViewType));
}
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 4941018..80f8b3d 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -363,6 +363,8 @@ void OutlineViewShell::Activate( sal_Bool bIsMDIActivate )
}
ViewShell::Activate( bIsMDIActivate );
+ SfxShell::BroadcastContextForActivation(true);
+
pOlView->SetLinks();
pOlView->ConnectToApplication();
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 6fe1ba2..19ab220 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -304,7 +304,7 @@ void ViewShell::Exit (void)
*/
void ViewShell::Activate(sal_Bool bIsMDIActivate)
{
- SfxShell::Activate(bIsMDIActivate);
+ // Do not forward to SfxShell::Activate()
/* According to MI, nobody is allowed to call GrabFocus, who does not
exactly know from which window the focus is grabbed. Since Activate()
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 6822af7..bbbe3f5 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -638,17 +638,13 @@ void SfxShell::Activate
in order to give the Subclasses the opportunity to respond to the
to the enabling.
- The base implementation is empty and does not need to be called.
-
[Cross-reference]
StarView SystemWindow::Activate(sal_Bool)
*/
{
- SfxViewFrame* pViewFrame = GetFrame();
- if (pViewFrame != NULL)
- pImp->maContextChangeBroadcaster.Activate(pViewFrame->GetFrame().GetFrameInterface());
+ BroadcastContextForActivation(true);
}
//--------------------------------------------------------------------
@@ -673,19 +669,16 @@ void SfxShell::Deactivate
Virtual method that is called when disabling the SfxShell instance,
to give the Subclasses the opportunity to respond to the disabling.
- The base implementation is empty and does not need to be called.
-
[Cross-reference]
StarView SystemWindow::Dectivate(sal_Bool)
*/
{
- SfxViewFrame* pViewFrame = GetFrame();
- if (pViewFrame != NULL)
- pImp->maContextChangeBroadcaster.Deactivate(pViewFrame->GetFrame().GetFrameInterface());
+ BroadcastContextForActivation(false);
}
+
void SfxShell::ParentActivate
(
)
@@ -1171,6 +1164,16 @@ void SfxShell::SetViewShell_Impl( SfxViewShell* pView )
pImp->pViewSh = pView;
}
-
+void SfxShell::BroadcastContextForActivation (const bool bIsActivated)
+{
+ SfxViewFrame* pViewFrame = GetFrame();
+ if (pViewFrame != NULL)
+ {
+ if (bIsActivated)
+ pImp->maContextChangeBroadcaster.Activate(pViewFrame->GetFrame().GetFrameInterface());
+ else
+ pImp->maContextChangeBroadcaster.Deactivate(pViewFrame->GetFrame().GetFrameInterface());
+ }
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/SelectionAnalyzer.cxx b/svx/source/sidebar/SelectionAnalyzer.cxx
index 5924c6f..6e0a419 100644
--- a/svx/source/sidebar/SelectionAnalyzer.cxx
+++ b/svx/source/sidebar/SelectionAnalyzer.cxx
@@ -93,9 +93,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SC (const SdrMark
EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
const SdrMarkList& rMarkList,
- const bool bIsMasterPage,
- const bool bIsHandoutPage,
- const bool bIsNotesPage)
+ const ViewType eViewType)
{
EnumContext::Context eContext = EnumContext::Context_Unknown;
@@ -104,14 +102,24 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
switch (rMarkList.GetMarkCount())
{
case 0:
- if (bIsHandoutPage)
- eContext = EnumContext::Context_HandoutPage;
- else if (bIsNotesPage)
- eContext = EnumContext::Context_NotesPage;
- else if (bIsMasterPage)
- eContext = EnumContext::Context_MasterPage;
- else
- eContext = EnumContext::Context_DrawPage;
+ switch(eViewType)
+ {
+ case VT_Standard:
+ eContext = EnumContext::Context_DrawPage;
+ break;
+ case VT_Master:
+ eContext = EnumContext::Context_MasterPage;
+ break;
+ case VT_Handout:
+ eContext = EnumContext::Context_HandoutPage;
+ break;
+ case VT_Notes:
+ eContext = EnumContext::Context_NotesPage;
+ break;
+ case VT_Outline:
+ eContext = EnumContext::Context_OutlineText;
+ break;
+ }
break;
case 1:
@@ -141,7 +149,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
if (nObjId == 0)
nObjId = OBJ_GRUP;
}
- eContext = GetContextForObjectId_SD(nObjId, bIsHandoutPage, bIsNotesPage);
+ eContext = GetContextForObjectId_SD(nObjId, eViewType);
}
else if (nInv == E3dInventor)
{
@@ -165,7 +173,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
if (nObjId == 0)
eContext = EnumContext::Context_MultiObject;
else
- eContext = GetContextForObjectId_SD(nObjId, bIsHandoutPage, bIsNotesPage);
+ eContext = GetContextForObjectId_SD(nObjId, eViewType);
break;
}
@@ -238,8 +246,7 @@ EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SC (const sal_uInt
EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SD (
const sal_uInt16 nObjectId,
- const bool bIsHandoutPage,
- const bool bIsNotesPage)
+ const ViewType eViewType)
{
switch (nObjectId)
{
@@ -281,12 +288,17 @@ EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SD (
return EnumContext::Context_Table;
case OBJ_PAGE:
- if (bIsHandoutPage)
- return EnumContext::Context_HandoutPage;
- else if (bIsNotesPage)
- return EnumContext::Context_NotesPage;
- else
- return EnumContext::Context_Unknown;
+ switch (eViewType)
+ {
+ case VT_Handout:
+ return EnumContext::Context_HandoutPage;
+ case VT_Notes:
+ return EnumContext::Context_NotesPage;
+ case VT_Outline:
+ return EnumContext::Context_OutlineText;
+ default:
+ return EnumContext::Context_Unknown;
+ }
default:
return EnumContext::Context_Unknown;
diff --git a/svx/source/sidebar/SelectionChangeHandler.cxx b/svx/source/sidebar/SelectionChangeHandler.cxx
index 275812f..b6f6d9b 100644
--- a/svx/source/sidebar/SelectionChangeHandler.cxx
+++ b/svx/source/sidebar/SelectionChangeHandler.cxx
@@ -32,7 +32,7 @@ using namespace sfx2::sidebar;
namespace svx { namespace sidebar {
SelectionChangeHandler::SelectionChangeHandler (
- const boost::function<sfx2::sidebar::EnumContext::Context(void)>& rSelectionChangeCallback,
+ const boost::function<rtl::OUString(void)>& rSelectionChangeCallback,
const Reference<frame::XController>& rxController,
const EnumContext::Context eDefaultContext)
: SelectionChangeHandlerInterfaceBase(m_aMutex),
@@ -58,7 +58,8 @@ void SAL_CALL SelectionChangeHandler::selectionChanged (const lang::EventObject&
{
if (maSelectionChangeCallback)
{
- const EnumContext::Context eContext (maSelectionChangeCallback());
+ const EnumContext::Context eContext (
+ EnumContext::GetContextEnum(maSelectionChangeCallback()));
ContextChangeEventMultiplexer::NotifyContextChange(
mxController,
eContext==EnumContext::Context_Unknown
commit ec3fafa60efa8f4bec1ca53e5bbe0e7b2be61f54
Author: Andre Fischer <af at apache.org>
Date: Thu Aug 16 10:45:36 2012 +0000
Resolves: #i120589# Improved detection of missing perl modules
(cherry picked from commit 39ca53381a03676402d3a8c27c05b8400888118e)
Conflicts:
configure.in
Change-Id: I2f5d18c98693daa29a19345f56faaf7d1ae3c34a
diff --git a/configure.ac b/configure.ac
index dcff809..7ce517b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4671,13 +4671,26 @@ dnl Testing for required Perl modules
dnl ===================================================================
AC_MSG_CHECKING([for required Perl modules])
-if `$PERL -e 'use Archive::Zip; use Cwd; use Digest::MD5'`; then
+if `$PERL -e 'use Archive::Zip; use Cwd; use Digest::MD5'>/dev/null 2>&1`; then
AC_MSG_RESULT([all modules found])
else
AC_MSG_ERROR([Failed to find some modules])
+ # Find out which modules are missing.
+ missing_perl_modules=
+ if ! `$PERL -e 'use Archive::Zip;'>/dev/null 2>&1`; then
+ missing_perl_modules=Archive::Zip
+ fi
+ if ! `$PERL -e 'use Cwd;'>/dev/null 2>&1`; then
+ missing_perl_modules="$missing_perl_modules Cwd"
+ fi
+ if ! `$PERL -e 'use Digest::MD5;'>/dev/null 2>&1`; then
+ missing_perl_modules="$missing_perl_modules Digest::MD5"
+ fi
+ AC_MSG_ERROR([
+ The missing Perl modules are: $missing_perl_modules
+ Install them as superuser/administrator with "cpan -i $missing_perl_modules"])
fi
-
dnl ===================================================================
dnl Check for pkg-config
dnl ===================================================================
More information about the Libreoffice-commits
mailing list