You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by af...@apache.org on 2013/01/29 09:14:12 UTC
svn commit: r1439779 [1/3] - in /openoffice/branches/sidebar/main:
default_images/sfx2/res/ default_images/sfx2/res/symphony/
framework/inc/services/ framework/source/services/ offapi/com/sun/star/util/
officecfg/registry/data/org/openoffice/Office/UI/...
Author: af
Date: Tue Jan 29 08:14:09 2013
New Revision: 1439779
URL: http://svn.apache.org/viewvc?rev=1439779&view=rev
Log:
i121420: Extended theming. General improvements of the sidebar.
Added:
openoffice/branches/sidebar/main/default_images/sfx2/res/separator.png (with props)
openoffice/branches/sidebar/main/default_images/sfx2/res/symphony/
openoffice/branches/sidebar/main/default_images/sfx2/res/symphony/hpaneldock01.png (with props)
openoffice/branches/sidebar/main/sfx2/source/sidebar/AsynchronousCall.cxx (with props)
openoffice/branches/sidebar/main/sfx2/source/sidebar/AsynchronousCall.hxx (with props)
openoffice/branches/sidebar/main/sfx2/source/sidebar/ToolBoxBackground.cxx (with props)
openoffice/branches/sidebar/main/sfx2/source/sidebar/ToolBoxBackground.hxx (with props)
Removed:
openoffice/branches/sidebar/main/offapi/com/sun/star/util/XEventListener.idl
openoffice/branches/sidebar/main/offapi/com/sun/star/util/XEventMultiplexer.idl
openoffice/branches/sidebar/main/sfx2/source/sidebar/Theme.hxx
Modified:
openoffice/branches/sidebar/main/framework/inc/services/ContextChangeEventMultiplexer.hxx
openoffice/branches/sidebar/main/framework/source/services/ContextChangeEventMultiplexer.cxx
openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
openoffice/branches/sidebar/main/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
openoffice/branches/sidebar/main/sc/source/ui/view/tabvwsh4.cxx
openoffice/branches/sidebar/main/sd/source/ui/func/futext.cxx
openoffice/branches/sidebar/main/sd/source/ui/view/ViewShellBase.cxx
openoffice/branches/sidebar/main/sd/source/ui/view/sdview.cxx
openoffice/branches/sidebar/main/sfx2/Library_sfx.mk
openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ControlFactory.hxx
openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/EnumContext.hxx
openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/SidebarPanelBase.hxx
openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/Theme.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/Context.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/ControlFactory.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/Deck.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/Deck.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckConfiguration.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckConfiguration.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckDescriptor.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckTitleBar.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/DrawHelper.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/DrawHelper.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/EnumContext.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/MenuButton.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/MenuButton.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/Paint.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/Paint.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/Panel.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/Panel.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelDescriptor.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelDescriptor.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelTitleBar.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/Sidebar.hrc
openoffice/branches/sidebar/main/sfx2/source/sidebar/Sidebar.src
openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarController.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarController.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarDockingWindow.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarPanel.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarPanel.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarPanelBase.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarResource.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarToolBox.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarToolBox.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/TabBar.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/TabBar.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/TabItem.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/Theme.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/TitleBar.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/Tools.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/Tools.hxx
openoffice/branches/sidebar/main/svx/source/sidebar/ContextChangeEventMultiplexer.cxx
openoffice/branches/sidebar/main/svx/source/sidebar/PanelFactory.cxx
openoffice/branches/sidebar/main/svx/source/sidebar/text/TextPropertyPanel.cxx
openoffice/branches/sidebar/main/svx/source/sidebar/text/TextPropertyPanel.hxx
openoffice/branches/sidebar/main/sw/source/ui/uiview/view1.cxx
openoffice/branches/sidebar/main/vcl/inc/vcl/button.hxx
openoffice/branches/sidebar/main/vcl/inc/vcl/window.hxx
openoffice/branches/sidebar/main/vcl/inc/window.h
openoffice/branches/sidebar/main/vcl/source/window/window.cxx
openoffice/branches/sidebar/main/vcl/source/window/window4.cxx
Added: openoffice/branches/sidebar/main/default_images/sfx2/res/separator.png
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/default_images/sfx2/res/separator.png?rev=1439779&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openoffice/branches/sidebar/main/default_images/sfx2/res/separator.png
------------------------------------------------------------------------------
svn:executable = *
Propchange: openoffice/branches/sidebar/main/default_images/sfx2/res/separator.png
------------------------------------------------------------------------------
svn:mime-type = image/png
Added: openoffice/branches/sidebar/main/default_images/sfx2/res/symphony/hpaneldock01.png
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/default_images/sfx2/res/symphony/hpaneldock01.png?rev=1439779&view=auto
==============================================================================
Binary file - no diff available.
Propchange: openoffice/branches/sidebar/main/default_images/sfx2/res/symphony/hpaneldock01.png
------------------------------------------------------------------------------
svn:executable = *
Propchange: openoffice/branches/sidebar/main/default_images/sfx2/res/symphony/hpaneldock01.png
------------------------------------------------------------------------------
svn:mime-type = image/png
Modified: openoffice/branches/sidebar/main/framework/inc/services/ContextChangeEventMultiplexer.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/framework/inc/services/ContextChangeEventMultiplexer.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/framework/inc/services/ContextChangeEventMultiplexer.hxx (original)
+++ openoffice/branches/sidebar/main/framework/inc/services/ContextChangeEventMultiplexer.hxx Tue Jan 29 08:14:09 2013
@@ -31,6 +31,10 @@
#include "macros/xserviceinfo.hxx"
+#include <map>
+#include <boost/noncopyable.hpp>
+
+
namespace
{
typedef ::cppu::WeakComponentImplHelper3 <
@@ -99,7 +103,14 @@ public:
private:
typedef ::std::vector<cssu::Reference<css::ui::XContextChangeEventListener> > ListenerContainer;
- typedef ::std::map<cssu::Reference<cssu::XInterface>, ListenerContainer> ListenerMap;
+ class FocusDescriptor
+ {
+ public:
+ ListenerContainer maListeners;
+ ::rtl::OUString msCurrentApplicationName;
+ ::rtl::OUString msCurrentContextName;
+ };
+ typedef ::std::map<cssu::Reference<cssu::XInterface>, FocusDescriptor> ListenerMap;
ListenerMap maListeners;
/** Notify all listeners in the container that is associated with
Modified: openoffice/branches/sidebar/main/framework/source/services/ContextChangeEventMultiplexer.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/framework/source/services/ContextChangeEventMultiplexer.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/framework/source/services/ContextChangeEventMultiplexer.cxx (original)
+++ openoffice/branches/sidebar/main/framework/source/services/ContextChangeEventMultiplexer.cxx Tue Jan 29 08:14:09 2013
@@ -58,14 +58,15 @@ void SAL_CALL ContextChangeEventMultiple
ListenerMap aListeners;
aListeners.swap(maListeners);
- css::lang::EventObject aEvent (cssu::Reference<cssu::XInterface>(static_cast<XWeak*>(this)));
+ cssu::Reference<cssu::XInterface> xThis (static_cast<XWeak*>(this));
+ css::lang::EventObject aEvent (xThis);
for (ListenerMap::const_iterator iContainer(aListeners.begin()), iEnd(aListeners.end());
iContainer!=iEnd;
++iContainer)
{
for (ListenerContainer::const_iterator
- iListener(iContainer->second.begin()),
- iContainerEnd(iContainer->second.end());
+ iListener(iContainer->second.maListeners.begin()),
+ iContainerEnd(iContainer->second.maListeners.end());
iListener!=iContainerEnd;
++iListener)
{
@@ -90,18 +91,18 @@ void SAL_CALL ContextChangeEventMultiple
static_cast<XWeak*>(this),
0);
- ListenerMap::iterator iListenerContainer (maListeners.find(rxEventFocus));
- if (iListenerContainer == maListeners.end())
+ ListenerMap::iterator iDescriptor (maListeners.find(rxEventFocus));
+ if (iDescriptor == maListeners.end())
{
// Create a new listener container for the event focus.
- iListenerContainer = maListeners.insert(
+ iDescriptor = maListeners.insert(
ListenerMap::value_type(
rxEventFocus,
- ListenerContainer())).first;
+ FocusDescriptor())).first;
}
- if (iListenerContainer != maListeners.end())
+ if (iDescriptor != maListeners.end())
{
- ListenerContainer& rContainer (iListenerContainer->second);
+ ListenerContainer& rContainer (iDescriptor->second.maListeners);
if (::std::find(rContainer.begin(), rContainer.end(), rxListener) == rContainer.end())
rContainer.push_back(rxListener);
else
@@ -111,6 +112,17 @@ void SAL_CALL ContextChangeEventMultiple
throw cssl::IllegalArgumentException(A2S("listener added twice"), static_cast<XWeak*>(this), 0);
}
}
+
+ // Send out an initial event that informs the new listener about
+ // the current context.
+ if (rxEventFocus.is() && iDescriptor != maListeners.end())
+ {
+ css::ui::ContextChangeEventObject aEvent (
+ NULL,
+ iDescriptor->second.msCurrentApplicationName,
+ iDescriptor->second.msCurrentContextName);
+ rxListener->notifyContextChangeEvent(aEvent);
+ }
}
@@ -122,13 +134,16 @@ void SAL_CALL ContextChangeEventMultiple
throw(cssu::RuntimeException,cssl::IllegalArgumentException)
{
if ( ! rxListener.is())
- throw cssl::IllegalArgumentException(A2S("can not remove an empty reference"), static_cast<XWeak*>(this), 0);
+ throw cssl::IllegalArgumentException(
+ A2S("can not remove an empty reference"),
+ static_cast<XWeak*>(this), 0);
- ListenerMap::iterator iListenerContainer (maListeners.find(rxEventFocus));
- if (iListenerContainer != maListeners.end())
+ ListenerMap::iterator iDescriptor (maListeners.find(rxEventFocus));
+ if (iDescriptor != maListeners.end())
{
- ListenerContainer& rContainer (iListenerContainer->second);
- const ListenerContainer::iterator iListener (::std::find(rContainer.begin(), rContainer.end(), rxListener));
+ ListenerContainer& rContainer (iDescriptor->second.maListeners);
+ const ListenerContainer::iterator iListener (
+ ::std::find(rContainer.begin(), rContainer.end(), rxListener));
if (iListener != rContainer.end())
{
rContainer.erase(iListener);
@@ -137,7 +152,7 @@ void SAL_CALL ContextChangeEventMultiple
// listener was just removed. This prevents us from
// holding the focus alive.
if (rContainer.empty())
- maListeners.erase(iListenerContainer);
+ maListeners.erase(iDescriptor);
}
}
@@ -151,7 +166,9 @@ void SAL_CALL ContextChangeEventMultiple
throw(cssu::RuntimeException,cssl::IllegalArgumentException)
{
if ( ! rxListener.is())
- throw cssl::IllegalArgumentException(A2S("can not remove an empty reference"), static_cast<XWeak*>(this), 0);
+ throw cssl::IllegalArgumentException(
+ A2S("can not remove an empty reference"),
+ static_cast<XWeak*>(this), 0);
::std::vector<cssu::Reference<cssu::XInterface> > aContainersToRemove;
for (ListenerMap::iterator
@@ -160,14 +177,15 @@ void SAL_CALL ContextChangeEventMultiple
iContainer!=iEnd;
++iContainer)
{
- const ListenerContainer::iterator iListener (::std::find(iContainer->second.begin(), iContainer->second.end(), rxListener));
- if (iListener != iContainer->second.end())
+ const ListenerContainer::iterator iListener (
+ ::std::find(iContainer->second.maListeners.begin(), iContainer->second.maListeners.end(), rxListener));
+ if (iListener != iContainer->second.maListeners.end())
{
- iContainer->second.erase(iListener);
+ iContainer->second.maListeners.erase(iListener);
// When we just removed the last listener then mark the
// container as to be removed.
- if (iContainer->second.empty())
+ if (iContainer->second.maListeners.empty())
aContainersToRemove.push_back(iContainer->first);
}
}
@@ -185,12 +203,22 @@ void SAL_CALL ContextChangeEventMultiple
-
void SAL_CALL ContextChangeEventMultiplexer::broadcastContextChangeEvent (
const css::ui::ContextChangeEventObject& rEventObject,
const cssu::Reference<cssu::XInterface>& rxEventFocus)
throw(cssu::RuntimeException)
{
+ // Remember the current context.
+ if (rxEventFocus.is())
+ {
+ ListenerMap::iterator iDescriptor (maListeners.find(rxEventFocus));
+ if (iDescriptor != maListeners.end())
+ {
+ iDescriptor->second.msCurrentApplicationName = rEventObject.ApplicationName;
+ iDescriptor->second.msCurrentContextName = rEventObject.ContextName;
+ }
+ }
+
BroadcastEventToSingleContainer(rEventObject, rxEventFocus);
if (rxEventFocus.is())
BroadcastEventToSingleContainer(rEventObject, NULL);
@@ -203,12 +231,12 @@ void ContextChangeEventMultiplexer::Broa
const css::ui::ContextChangeEventObject& rEventObject,
const cssu::Reference<cssu::XInterface>& rxEventFocus)
{
- ListenerMap::iterator iListenerContainer (maListeners.find(rxEventFocus));
- if (iListenerContainer != maListeners.end())
+ ListenerMap::iterator iDescriptor (maListeners.find(rxEventFocus));
+ if (iDescriptor != maListeners.end())
{
// Create a copy of the listener container to avoid problems
// when one of the called listeners calls add... or remove...
- ListenerContainer aContainer (iListenerContainer->second);
+ ListenerContainer aContainer (iDescriptor->second.maListeners);
for (ListenerContainer::const_iterator
iListener(aContainer.begin()),
iEnd(aContainer.end());
Modified: openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
Binary files - no diff available.
Modified: openoffice/branches/sidebar/main/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs (original)
+++ openoffice/branches/sidebar/main/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs Tue Jan 29 08:14:09 2013
@@ -42,7 +42,11 @@
<prop oor:name="Application" oor:type="xs:string" oor:localized="false">
<info>
<desc>Name of the application. Known values are:
- any, writer, calc, impress, draw, base</desc>
+ any,
+ com.sun.star.text.TextDocument (Writer),
+ com.sun.star.sheet.SpreadsheetDocument (Calc),
+ com.sun.star.presentation.PresentationDocument (Impress),
+ com.sun.star.drawing.DrawingDocument (Draw)</desc>
</info>
<value></value>
</prop>
@@ -161,6 +165,12 @@
</info>
<value>true</value>
</prop>
+ <prop oor:name="OrderIndex" oor:type="xs:int">
+ <info>
+ <desc>Index used for ordering panels inside a deck. Smaller values correspond to positions nearer to the top of the deck.</desc>
+ </info>
+ <value>10000</value>
+ </prop>
</group>
</templates>
<component>
Modified: openoffice/branches/sidebar/main/sc/source/ui/view/tabvwsh4.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sc/source/ui/view/tabvwsh4.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sc/source/ui/view/tabvwsh4.cxx (original)
+++ openoffice/branches/sidebar/main/sc/source/ui/view/tabvwsh4.cxx Tue Jan 29 08:14:09 2013
@@ -39,6 +39,7 @@
#include <editeng/sizeitem.hxx>
#include <editeng/boxitem.hxx>
#include <svx/prtqry.hxx>
+#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
#include <sfx2/request.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/dispatch.hxx>
@@ -220,6 +221,10 @@ void __EXPORT ScTabViewShell::Activate(s
// Wenn Referenzeingabe-Tip-Hilfe hier wieder angezeigt werden soll (ShowRefTip),
// muss sie beim Verschieben der View angepasst werden (gibt sonst Probleme unter OS/2
// beim Umschalten zwischen Dokumenten)
+
+ ContextChangeEventMultiplexer::NotifyContextChange(
+ GetController(),
+ ::sfx2::sidebar::EnumContext::Context_Default);
}
void __EXPORT ScTabViewShell::Deactivate(sal_Bool bMDI)
Modified: openoffice/branches/sidebar/main/sd/source/ui/func/futext.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/func/futext.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/func/futext.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/func/futext.cxx Tue Jan 29 08:14:09 2013
@@ -189,9 +189,6 @@ void FuText::DoExecute( SfxRequest& )
mpViewShell->GetViewShellBase().GetToolBarManager()->SetToolBarShell(
ToolBarManager::TBG_FUNCTION,
RID_DRAW_TEXT_TOOLBOX);
- ContextChangeEventMultiplexer::NotifyContextChange(
- mpViewShell->GetViewShellBase().GetController(),
- ::sfx2::sidebar::EnumContext::Context_Text);
mpView->SetCurrentObj(OBJ_TEXT);
mpView->SetEditMode(SDREDITMODE_EDIT);
Modified: openoffice/branches/sidebar/main/sd/source/ui/view/ViewShellBase.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/view/ViewShellBase.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/view/ViewShellBase.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/view/ViewShellBase.cxx Tue Jan 29 08:14:09 2013
@@ -854,11 +854,6 @@ void ViewShellBase::Activate (sal_Bool b
{
SfxViewShell::Activate(bIsMDIActivate);
-
- ContextChangeEventMultiplexer::NotifyContextChange(
- GetController(),
- ::sfx2::sidebar::EnumContext::Context_Default);
-
Reference<XControllerManager> xControllerManager (GetController(), UNO_QUERY);
if (xControllerManager.is())
{
@@ -868,6 +863,10 @@ void ViewShellBase::Activate (sal_Bool b
xConfigurationController->update();
}
GetToolBarManager()->RequestUpdate();
+
+ ContextChangeEventMultiplexer::NotifyContextChange(
+ GetController(),
+ ::sfx2::sidebar::EnumContext::Context_Default);
}
Modified: openoffice/branches/sidebar/main/sd/source/ui/view/sdview.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/view/sdview.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/view/sdview.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/view/sdview.cxx Tue Jan 29 08:14:09 2013
@@ -56,6 +56,7 @@
#include <svx/xlndsit.hxx>
#include <svx/xlineit0.hxx>
#include <svx/xlnclit.hxx>
+#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
#include <vcl/virdev.hxx>
#include "app.hrc"
@@ -775,6 +776,10 @@ sal_Bool View::SdrBeginTextEdit(
pGivenOutlinerView, bDontDeleteOutliner,
bOnlyOneView, bGrabFocus);
+ ContextChangeEventMultiplexer::NotifyContextChange(
+ GetViewShell()->GetViewShellBase().GetController(),
+ ::sfx2::sidebar::EnumContext::Context_Text);
+
if (bReturn)
{
::Outliner* pOL = GetTextEditOutliner();
@@ -831,7 +836,12 @@ SdrEndTextEditKind View::SdrEndTextEdit(
}
}
- GetViewShell()->GetViewShellBase().GetEventMultiplexer()->MultiplexEvent(sd::tools::EventMultiplexerEvent::EID_END_TEXT_EDIT, (void*)xObj.get() );
+ GetViewShell()->GetViewShellBase().GetEventMultiplexer()->MultiplexEvent(
+ sd::tools::EventMultiplexerEvent::EID_END_TEXT_EDIT,
+ (void*)xObj.get() );
+ ContextChangeEventMultiplexer::NotifyContextChange(
+ GetViewShell()->GetViewShellBase().GetController(),
+ ::sfx2::sidebar::EnumContext::Context_Default);
if( xObj.is() )
{
Modified: openoffice/branches/sidebar/main/sfx2/Library_sfx.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/Library_sfx.mk?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/Library_sfx.mk (original)
+++ openoffice/branches/sidebar/main/sfx2/Library_sfx.mk Tue Jan 29 08:14:09 2013
@@ -213,13 +213,13 @@ $(eval $(call gb_Library_add_exception_o
sfx2/source/menu/virtmenu \
sfx2/source/notify/eventsupplier \
sfx2/source/notify/hintpost \
- sfx2/source/sidebar/Theme \
sfx2/source/sidebar/SidebarChildWindow \
sfx2/source/sidebar/SidebarDockingWindow \
sfx2/source/sidebar/SidebarController \
sfx2/source/sidebar/SidebarPanel \
sfx2/source/sidebar/SidebarPanelBase \
sfx2/source/sidebar/SidebarToolBox \
+ sfx2/source/sidebar/AsynchronousCall \
sfx2/source/sidebar/Context \
sfx2/source/sidebar/ControlFactory \
sfx2/source/sidebar/ControllerItem \
@@ -240,6 +240,7 @@ $(eval $(call gb_Library_add_exception_o
sfx2/source/sidebar/TitleBar \
sfx2/source/sidebar/Theme \
sfx2/source/sidebar/Tools \
+ sfx2/source/sidebar/ToolBoxBackground \
sfx2/source/statbar/stbitem \
sfx2/source/toolbox/imgmgr \
sfx2/source/toolbox/tbxitem \
Modified: openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ControlFactory.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ControlFactory.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ControlFactory.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ControlFactory.hxx Tue Jan 29 08:14:09 2013
@@ -25,6 +25,8 @@
#include <sfx2/dllapi.h>
#include <vcl/button.hxx>
+class ToolBox;
+
namespace sfx2 { namespace sidebar {
class SFX2_DLLPUBLIC ControlFactory
Modified: openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/EnumContext.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/EnumContext.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/EnumContext.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/EnumContext.hxx Tue Jan 29 08:14:09 2013
@@ -26,6 +26,8 @@
#include <rtl/ustring.hxx>
+#include <vector>
+
namespace sfx2 { namespace sidebar {
@@ -38,10 +40,14 @@ public:
Application_Calc,
Application_Draw,
Application_Impress,
-
- Application_Other,
- __LastApplicationEnum = Application_Other
+ // Used only by deck or panel descriptors. Matches any
+ // application.
+ Application_Any,
+
+ Application_Unknown,
+
+ __LastApplicationEnum = Application_Unknown
};
enum Context
{
@@ -56,10 +62,16 @@ public:
Context_Table,
Context_Text,
Context_TextObject,
-
+
+ // Default context of an application. Do we need this?
Context_Default,
- __LastContextEnum = Context_Default
+ // Used only by deck or panel descriptors. Matches any context.
+ Context_Any,
+
+ Context_Unknown,
+
+ __LastContextEnum = Context_Unknown
};
Application meApplication;
@@ -69,9 +81,35 @@ public:
EnumContext (
const Application eApplication,
const Context eContext);
+ EnumContext (
+ const ::rtl::OUString& rsApplicationName,
+ const ::rtl::OUString& rsContextName);
+
sal_Int32 GetCombinedContext(void) const;
+ const ::rtl::OUString& GetApplicationName (void) const;
+ const ::rtl::OUString& GetContextName (void) const;
+
bool operator == (const EnumContext aOther);
+ bool operator != (const EnumContext aOther);
+ /** When two contexts are matched against each other then
+ application or context name may have the wildcard value 'any'.
+ In order to prefer matches without wildcards over matches with
+ wildcards we introduce a integer evaluation for matches.
+ */
+ const static sal_Int32 NoMatch;
+ const static sal_Int32 OptimalMatch;
+
+ /** Return the numeric value that describes how good the match
+ between two contexts is.
+ Smaller values represent better matches.
+ */
+ sal_Int32 EvaluateMatch (const EnumContext& rOther) const;
+
+ /** Return the best match against the given list of contexts.
+ */
+ sal_Int32 EvaluateMatch (const ::std::vector<EnumContext>& rOthers) const;
+
static Application GetApplicationEnum (const ::rtl::OUString& rsApplicationName);
static const ::rtl::OUString& GetApplicationName (const Application eApplication);
Modified: openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/SidebarPanelBase.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/SidebarPanelBase.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/SidebarPanelBase.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/SidebarPanelBase.hxx Tue Jan 29 08:14:09 2013
@@ -24,14 +24,14 @@
#include "EnumContext.hxx"
-#include <vcl/ctrl.hxx>
-#include <cppuhelper/compbase3.hxx>
+#include <cppuhelper/compbase4.hxx>
#include <cppuhelper/basemutex.hxx>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/ui/XContextChangeEventListener.hpp>
#include <com/sun/star/ui/XUIElement.hpp>
#include <com/sun/star/ui/XToolPanel.hpp>
+#include <com/sun/star/ui/XVerticalStackLayoutElement.hpp>
#include <boost/noncopyable.hpp>
@@ -39,14 +39,18 @@ namespace css = ::com::sun::star;
namespace cssu = ::com::sun::star::uno;
+class Control;
+
+
namespace sfx2 { namespace sidebar {
namespace
{
- typedef ::cppu::WeakComponentImplHelper3 <
+ typedef ::cppu::WeakComponentImplHelper4 <
css::ui::XContextChangeEventListener,
css::ui::XUIElement,
- css::ui::XToolPanel
+ css::ui::XToolPanel,
+ css::ui::XVerticalStackLayoutElement
> SidebarPanelBaseInterfaceBase;
}
@@ -56,13 +60,25 @@ namespace
class SFX2_DLLPUBLIC SidebarPanelBase
: private ::boost::noncopyable,
private ::cppu::BaseMutex,
- public SidebarPanelBaseInterfaceBase,
- public Control
+ public SidebarPanelBaseInterfaceBase
{
public:
+ class ContextChangeReceiverInterface
+ {
+ public:
+ virtual void HandleContextChange (
+ const EnumContext aContext) = 0;
+ };
+
+ static cssu::Reference<css::ui::XUIElement> Create (
+ const ::rtl::OUString& rsResourceURL,
+ const cssu::Reference<css::frame::XFrame>& rxFrame,
+ Control* pControl);
+
// XContextChangeEventListener
virtual void SAL_CALL notifyContextChangeEvent (
- const css::ui::ContextChangeEventObject& rEvent);
+ const css::ui::ContextChangeEventObject& rEvent)
+ throw (cssu::RuntimeException);
// XEventListener
virtual void SAL_CALL disposing (
@@ -85,30 +101,25 @@ public:
throw(cssu::RuntimeException);
virtual cssu::Reference<css::awt::XWindow> SAL_CALL getWindow (void)
throw(cssu::RuntimeException);
+
+ // XVerticalStackLayoutElement
+ virtual sal_Int32 SAL_CALL getHeightForWidth (const sal_Int32 nWidth)
+ throw(cssu::RuntimeException);
protected:
SidebarPanelBase (
const ::rtl::OUString& rsResourceURL,
- Window* pParentWindow,
const cssu::Reference<css::frame::XFrame>& rxFrame,
- const ResId& rResId);
+ Control* pControl);
virtual ~SidebarPanelBase (void);
virtual void SAL_CALL disposing (void)
throw (cssu::RuntimeException);
- virtual void HandleContextChange (
- const EnumContext aContext) = 0;
-
- FontUnderline GetDefaultUnderline (void) const;
- void SetDefaultUnderline (const FontUnderline eFontUnderline);
-
- Image GetIcon (const ::rtl::OUString& rsURL);
-
private:
const ::rtl::OUString msResourceURL;
cssu::Reference<css::frame::XFrame> mxFrame;
- FontUnderline meFontUnderline;
+ Control* mpControl;
};
} } // end of namespace sfx2::sidebar
Modified: openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/Theme.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/Theme.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/Theme.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/Theme.hxx Tue Jan 29 08:14:09 2013
@@ -26,11 +26,17 @@
#include <tools/color.hxx>
#include <vcl/image.hxx>
-#include <cppuhelper/compbase1.hxx>
+#include <cppuhelper/compbase2.hxx>
#include <cppuhelper/basemutex.hxx>
+#include <tools/gen.hxx>
+#include <rtl/ref.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <hash_map>
#include <map>
+#include <boost/optional.hpp>
+
class SvBorder;
@@ -43,8 +49,9 @@ namespace sfx2 { namespace sidebar {
namespace
{
- typedef ::cppu::WeakComponentImplHelper1 <
- css::beans::XPropertySet
+ typedef ::cppu::WeakComponentImplHelper2 <
+ css::beans::XPropertySet,
+ css::beans::XPropertySetInfo
> ThemeInterfaceBase;
}
@@ -61,13 +68,16 @@ class SFX2_DLLPUBLIC Theme
public:
enum ThemeItem
{
- __Pre_Image,
+ __Begin,
+ __Pre_Image = __Begin,
+
__AnyItem = __Pre_Image,
Image_Grip,
Image_Expand,
Image_Collapse,
Image_Menu,
+ Image_ToolBoxItemSeparator,
__Image_Color,
@@ -83,9 +93,14 @@ public:
Paint_PanelBackground,
Paint_PanelTitleBarBackground,
Paint_TabBarBackground,
- Paint_TabItemBackground,
+ Paint_TabItemBackgroundNormal,
+ Paint_TabItemBackgroundHighlight,
Paint_HorizontalBorder,
Paint_VerticalBorder,
+ Paint_ToolBoxBackground,
+ Paint_ToolBoxBorderTopLeft,
+ Paint_ToolBoxBorderCenterCorners,
+ Paint_ToolBoxBorderBottomRight,
__Paint_Int,
@@ -109,8 +124,17 @@ public:
__Int_Bool,
Bool_UseSymphonyIcons,
+ Bool_UseSystemColors,
+ Bool_UseToolBoxItemSeparator,
+ Bool_IsHighContrastModeActive,
+
+ __Bool_Rect,
+
+ Rect_ToolBoxPadding,
+ Rect_ToolBoxBorder,
- __Post_Bool
+ __Post_Rect,
+ __End=__Post_Rect
};
static Image GetImage (const ThemeItem eItem);
@@ -118,7 +142,8 @@ public:
static const Paint& GetPaint (const ThemeItem eItem);
static sal_Int32 GetInteger (const ThemeItem eItem);
static bool GetBoolean (const ThemeItem eItem);
-
+ static Rectangle GetRectangle (const ThemeItem eItem);
+
static bool IsHighContrastMode (void);
static void HandleDataChange (void);
@@ -131,42 +156,51 @@ public:
static cssu::Reference<css::beans::XPropertySet> GetPropertySet (void);
// beans::XPropertySet
- cssu::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo (void)
+ virtual cssu::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo (void)
throw(cssu::RuntimeException);
- void SAL_CALL setPropertyValue (
+ virtual void SAL_CALL setPropertyValue (
const ::rtl::OUString& rsPropertyName,
const cssu::Any& rValue)
throw(cssu::RuntimeException);
- cssu::Any SAL_CALL getPropertyValue (
+ virtual cssu::Any SAL_CALL getPropertyValue (
const ::rtl::OUString& rsPropertyName)
throw(css::beans::UnknownPropertyException,
css::lang::WrappedTargetException,
cssu::RuntimeException);
- void SAL_CALL addPropertyChangeListener(
+ virtual void SAL_CALL addPropertyChangeListener(
const ::rtl::OUString& rsPropertyName,
const cssu::Reference<css::beans::XPropertyChangeListener>& rxListener)
throw(css::beans::UnknownPropertyException,
css::lang::WrappedTargetException,
cssu::RuntimeException);
- void SAL_CALL removePropertyChangeListener(
+ virtual void SAL_CALL removePropertyChangeListener(
const ::rtl::OUString& rsPropertyName,
const cssu::Reference<css::beans::XPropertyChangeListener>& rxListener)
throw(css::beans::UnknownPropertyException,
css::lang::WrappedTargetException,
cssu::RuntimeException);
- void SAL_CALL addVetoableChangeListener(
+ virtual void SAL_CALL addVetoableChangeListener(
const ::rtl::OUString& rsPropertyName,
const cssu::Reference<css::beans::XVetoableChangeListener>& rxListener)
throw(css::beans::UnknownPropertyException,
css::lang::WrappedTargetException,
cssu::RuntimeException);
- void SAL_CALL removeVetoableChangeListener(
+ virtual void SAL_CALL removeVetoableChangeListener(
const ::rtl::OUString& rsPropertyName,
const cssu::Reference<css::beans::XVetoableChangeListener>& rxListener)
throw(css::beans::UnknownPropertyException,
css::lang::WrappedTargetException,
cssu::RuntimeException);
+ // beans::XPropertySetInfo
+ virtual cssu::Sequence<css::beans::Property> SAL_CALL getProperties (void)
+ throw(cssu::RuntimeException);
+ virtual css::beans::Property SAL_CALL getPropertyByName (const ::rtl::OUString& rsName)
+ throw(css::beans::UnknownPropertyException,
+ cssu::RuntimeException);
+ virtual sal_Bool SAL_CALL hasPropertyByName (const ::rtl::OUString& rsName)
+ throw(cssu::RuntimeException);
+
private:
static ::rtl::Reference<Theme> mpInstance;
static Theme& GetCurrentTheme (void);
@@ -176,7 +210,9 @@ private:
::std::vector<Paint> maPaints;
::std::vector<sal_Int32> maIntegers;
::std::vector<bool> maBooleans;
+ ::std::vector<Rectangle> maRectangles;
bool mbIsHighContrastMode;
+ bool mbIsHighContrastModeSetManually;
typedef ::std::hash_map<rtl::OUString,ThemeItem, rtl::OUStringHash> PropertyNameToIdMap;
PropertyNameToIdMap maPropertyNameToIdMap;
@@ -199,12 +235,15 @@ private:
PT_Paint,
PT_Integer,
PT_Boolean,
+ PT_Rectangle,
PT_Invalid
};
void SetupPropertyMaps (void);
void InitializeTheme (void);
+ void UpdateTheme (void);
static PropertyType GetPropertyType (const ThemeItem eItem);
+ static cssu::Type GetCppuType (const PropertyType eType);
static sal_Int32 GetIndex (
const ThemeItem eItem,
const PropertyType eType);
Added: openoffice/branches/sidebar/main/sfx2/source/sidebar/AsynchronousCall.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/AsynchronousCall.cxx?rev=1439779&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/AsynchronousCall.cxx (added)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/AsynchronousCall.cxx Tue Jan 29 08:14:09 2013
@@ -0,0 +1,93 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "precompiled_sfx2.hxx"
+
+#include "AsynchronousCall.hxx"
+
+#include <vcl/svapp.hxx>
+
+
+namespace sfx2 { namespace sidebar {
+
+AsynchronousCall::AsynchronousCall (const Action& rAction)
+ : maAction(rAction),
+ mnCallId(0)
+{
+}
+
+
+
+
+AsynchronousCall::~AsynchronousCall (void)
+{
+ CancelRequest();
+}
+
+
+
+
+void AsynchronousCall::RequestCall (const Action& rAction)
+{
+ CancelRequest();
+ maAction = rAction;
+ RequestCall();
+}
+
+
+
+
+void AsynchronousCall::RequestCall (void)
+{
+ if (mnCallId == 0)
+ {
+ Link aLink (LINK(this, AsynchronousCall, HandleUserCall));
+ mnCallId = Application::PostUserEvent(aLink);
+ }
+}
+
+
+
+
+void AsynchronousCall::CancelRequest (void)
+{
+ if (mnCallId != 0)
+ {
+ Application::RemoveUserEvent(mnCallId);
+ mnCallId = -1;
+ }
+}
+
+
+
+
+IMPL_LINK(AsynchronousCall, HandleUserCall, void*, EMPTYARG )
+{
+ mnCallId = 0;
+ if (maAction)
+ maAction();
+
+ return sal_True;
+}
+
+
+} } // end of namespace sfx2::sidebar
+
Propchange: openoffice/branches/sidebar/main/sfx2/source/sidebar/AsynchronousCall.cxx
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/branches/sidebar/main/sfx2/source/sidebar/AsynchronousCall.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/AsynchronousCall.hxx?rev=1439779&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/AsynchronousCall.hxx (added)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/AsynchronousCall.hxx Tue Jan 29 08:14:09 2013
@@ -0,0 +1,55 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef SFX_SIDEBAR_ASYNCHRONOUS_CALL_HXX
+#define SFX_SIDEBAR_ASYNCHRONOUS_CALL_HXX
+
+#include <boost/function.hpp>
+#include <tools/solar.h>
+#include <tools/link.hxx>
+
+namespace sfx2 { namespace sidebar {
+
+/** A simple asynchronous call via Application::PostUserCall.
+*/
+class AsynchronousCall
+{
+public:
+ typedef ::boost::function<void(void)> Action;
+
+ AsynchronousCall (const Action& rAction);
+ ~AsynchronousCall (void);
+
+ void RequestCall (const Action& rAction);
+ void RequestCall (void);
+ void CancelRequest (void);
+
+private:
+ Action maAction;
+ sal_uLong mnCallId;
+
+ DECL_LINK(HandleUserCall, void*);
+};
+
+
+} } // end of namespace sfx2::sidebar
+
+#endif
Propchange: openoffice/branches/sidebar/main/sfx2/source/sidebar/AsynchronousCall.hxx
------------------------------------------------------------------------------
svn:executable = *
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/Context.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/Context.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/Context.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/Context.hxx Tue Jan 29 08:14:09 2013
@@ -24,6 +24,7 @@
#include "rtl/ustring.hxx"
+#include <vector>
namespace sfx2 {
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/ControlFactory.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/ControlFactory.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/ControlFactory.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/ControlFactory.cxx Tue Jan 29 08:14:09 2013
@@ -26,6 +26,7 @@
#include "MenuButton.hxx"
#include "TabItem.hxx"
#include "SidebarToolBox.hxx"
+#include "ToolBoxBackground.hxx"
#include <vcl/toolbox.hxx>
@@ -52,7 +53,15 @@ ToolBox* ControlFactory::CreateToolBox (
Window* pParentWindow,
const ResId& rResId)
{
- return new SidebarToolBox(pParentWindow, rResId);
+ Window* pBorderWindow = new ToolBoxBackground(pParentWindow);
+ pBorderWindow->Show();
+
+ SidebarToolBox* pToolBox = new SidebarToolBox(pBorderWindow, rResId);
+ pToolBox->SetBorderWindow(pBorderWindow);
+
+ pToolBox->Invalidate();
+
+ return pToolBox;
}
} } // end of namespace sfx2::sidebar
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/Deck.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/Deck.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/Deck.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/Deck.cxx Tue Jan 29 08:14:09 2013
@@ -29,7 +29,7 @@
#include "Panel.hxx"
#include "sfx2/sidebar/Theme.hxx"
-#include <tools/SvBorder.hxx>
+#include <tools/svborder.hxx>
namespace sfx2 { namespace sidebar {
@@ -78,7 +78,8 @@ void Deck::Dispose (void)
iPanel!=iEnd;
++iPanel)
{
- (*iPanel)->Dispose();
+ if (*iPanel != NULL)
+ (*iPanel)->Dispose();
}
}
@@ -129,6 +130,8 @@ Rectangle Deck::GetContentArea (void) co
void Deck::Paint (const Rectangle& rUpdateArea)
{
+ (void) rUpdateArea;
+
const Size aWindowSize (GetSizePixel());
const SvBorder aPadding (
Theme::GetInteger(Theme::Int_DeckLeftPadding),
@@ -209,10 +212,6 @@ void Deck::RequestLayout (void)
case 0:
// This basically is an error but there is not much that
// we can do about it.
- if (mpFiller == NULL)
- {
- OSL_ASSERT(maPanels.size()>0);
- }
ShowFiller(PlaceDeckTitle(GetTitleBar(), GetContentArea()));
break;
@@ -298,7 +297,10 @@ void Deck::LayoutMultiplePanels (void)
iPanel!=iEnd;
++iPanel)
{
- const Panel& rPanel (**iPanel);
+ if (*iPanel == NULL)
+ continue;
+
+ const Panel& rPanel (**iPanel);
nHeight -= nPanelTitleBarHeight;
nHeight -= 2*nDeckSeparatorHeight;
@@ -307,9 +309,18 @@ void Deck::LayoutMultiplePanels (void)
{
if (rPanel.GetVerticalStackElement().is())
{
- ++nVerticalStackCount;
const sal_Int32 nRequestedHeight (rPanel.GetVerticalStackElement()->getHeightForWidth(nWidth));
- nHeight -= nRequestedHeight;
+ if (nRequestedHeight >= 0)
+ {
+ ++nVerticalStackCount;
+ nHeight -= nRequestedHeight;
+ }
+ else
+ {
+ // Treat -1 as a special value that the panel
+ // wants as much space as possible.
+ ++nFullCount;
+ }
}
else
{
@@ -318,12 +329,14 @@ void Deck::LayoutMultiplePanels (void)
}
}
+ // The remaining height is distributed between the full size panels.
sal_Int32 nHeightPerPanel (nFullCount<=0 ? 0 : nHeight / nFullCount);
+
// The division might lead to rounding errors. Enlarge the first
// panel to compensate for that.
sal_Int32 nHeightOfFirstPanel = nFullCount+nVerticalStackCount<=0
? 0
- : nHeightPerPanel + (nHeight - nHeightPerPanel*(nFullCount+nVerticalStackCount));
+ : nHeightPerPanel + (nHeight - nHeightPerPanel*nFullCount);
if (nHeightPerPanel < MinimalPanelHeight)
{
// Display a vertical scroll bar.
@@ -340,6 +353,9 @@ void Deck::LayoutMultiplePanels (void)
iPanel!=iEnd;
++iPanel)
{
+ if (*iPanel == NULL)
+ continue;
+
Panel& rPanel (**iPanel);
// Separator above the panel title bar.
@@ -418,8 +434,8 @@ void Deck::ShowFiller (const Rectangle&
if (mpFiller == NULL)
{
mpFiller = new Window(this);
- mpFiller->SetBackground(Theme::GetPaint(Theme::Paint_DeckBackground).GetWallpaper());
}
+ mpFiller->SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper());
mpFiller->SetPosSizePixel(rBox.TopLeft(), rBox.GetSize());
mpFiller->Show();
}
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/Deck.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/Deck.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/Deck.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/Deck.hxx Tue Jan 29 08:14:09 2013
@@ -23,6 +23,7 @@
#define SFX_SIDEBAR_DECK_HXX
#include "vcl/window.hxx"
+#include "vcl/image.hxx"
namespace sfx2 { namespace sidebar {
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckConfiguration.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckConfiguration.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckConfiguration.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckConfiguration.cxx Tue Jan 29 08:14:09 2013
@@ -38,7 +38,7 @@ DeckConfiguration::DeckConfiguration (vo
-void DeckConfiguration::Disable (void)
+void DeckConfiguration::Dispose (void)
{
// Move the deck and its children temporarily to a new root to
// avoid a crash when calling removeWindow(,NULL).
@@ -51,12 +51,4 @@ void DeckConfiguration::Disable (void)
}
-
-
-void DeckConfiguration::Activate (void)
-{
- mpDeck->SetPanels(maPanels);
-}
-
-
} } // end of namespace sfx2::sidebar
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckConfiguration.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckConfiguration.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckConfiguration.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckConfiguration.hxx Tue Jan 29 08:14:09 2013
@@ -38,8 +38,7 @@ public:
DeckConfiguration (void);
- void Disable (void);
- void Activate (void);
+ void Dispose (void);
};
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckDescriptor.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckDescriptor.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckDescriptor.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckDescriptor.hxx Tue Jan 29 08:14:09 2013
@@ -22,7 +22,7 @@
#ifndef SFX_SIDEBAR_DECK_DESCRIPTOR_HXX
#define SFX_SIDEBAR_DECK_DESCRIPTOR_HXX
-#include "Context.hxx"
+#include "sfx2/sidebar/EnumContext.hxx"
#include <vector>
#include <boost/shared_ptr.hpp>
@@ -38,8 +38,9 @@ public:
::rtl::OUString msHighContrastIconURL;
::rtl::OUString msHelpURL;
::rtl::OUString msHelpText;
- ::std::vector<Context> maContexts;
-
+ ::std::vector<EnumContext> maContexts;
+ bool mbIsEnabled;
+
DeckDescriptor (void);
DeckDescriptor (const DeckDescriptor& rOther);
~DeckDescriptor (void);
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckTitleBar.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckTitleBar.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckTitleBar.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckTitleBar.cxx Tue Jan 29 08:14:09 2013
@@ -24,6 +24,9 @@
#include "DeckTitleBar.hxx"
#include "sfx2/sidebar/Theme.hxx"
+#include <vcl/image.hxx>
+
+
namespace sfx2 { namespace sidebar {
static const sal_Int32 gaLeftGripPadding (3);
@@ -63,7 +66,7 @@ Rectangle DeckTitleBar::GetTitleArea (co
void DeckTitleBar::PaintDecoration (const Rectangle& rTitleBarBox)
{
(void)rTitleBarBox;
-
+
Image aGripImage (Theme::GetImage(Theme::Image_Grip));
const Point aTopLeft (
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/DrawHelper.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/DrawHelper.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/DrawHelper.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/DrawHelper.cxx Tue Jan 29 08:14:09 2013
@@ -73,6 +73,67 @@ void DrawHelper::DrawBorder (
+void DrawHelper::DrawBevelBorder (
+ OutputDevice& rDevice,
+ const Rectangle rBox,
+ const SvBorder aBorderSize,
+ const Paint& rTopLeftPaint,
+ const Paint& rCenterPaint,
+ const Paint& rBottomRightPaint)
+{
+ // Draw top line.
+ DrawHorizontalLine(
+ rDevice,
+ rBox.Left(),
+ rBox.Right() - aBorderSize.Right(),
+ rBox.Top(),
+ aBorderSize.Top(),
+ rTopLeftPaint);
+ // Draw bottom line.
+ DrawHorizontalLine(
+ rDevice,
+ rBox.Left()+aBorderSize.Left(),
+ rBox.Right(),
+ rBox.Bottom()-aBorderSize.Bottom()+1,
+ aBorderSize.Bottom(),
+ rBottomRightPaint);
+ // Draw left line.
+ DrawVerticalLine(
+ rDevice,
+ rBox.Top()+aBorderSize.Top(),
+ rBox.Bottom() - aBorderSize.Bottom(),
+ rBox.Left(),
+ aBorderSize.Left(),
+ rTopLeftPaint);
+ // Draw right line.
+ DrawVerticalLine(
+ rDevice,
+ rBox.Top()+aBorderSize.Top(),
+ rBox.Bottom()-aBorderSize.Bottom(),
+ rBox.Right()-aBorderSize.Right()+1,
+ aBorderSize.Right(),
+ rBottomRightPaint);
+ // Draw top right corner.
+ DrawVerticalLine(
+ rDevice,
+ rBox.Top(),
+ rBox.Top()+aBorderSize.Top()-1,
+ rBox.Right()-aBorderSize.Right()+1,
+ aBorderSize.Right(),
+ rCenterPaint);
+ // Draw bottom right corner.
+ DrawVerticalLine(
+ rDevice,
+ rBox.Bottom() - aBorderSize.Bottom()+1,
+ rBox.Bottom(),
+ rBox.Left(),
+ aBorderSize.Left(),
+ rCenterPaint);
+}
+
+
+
+
void DrawHelper::DrawHorizontalLine(
OutputDevice& rDevice,
const sal_Int32 nLeft,
@@ -184,4 +245,5 @@ void DrawHelper::DrawRoundedRectangle (
+
} } // end of namespace sfx2::sidebar
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/DrawHelper.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/DrawHelper.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/DrawHelper.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/DrawHelper.hxx Tue Jan 29 08:14:09 2013
@@ -24,8 +24,7 @@
#include "vcl/window.hxx"
-#include <tools/SvBorder.hxx>
-
+#include <tools/svborder.hxx>
class Color;
@@ -44,6 +43,13 @@ public:
const SvBorder aBorderSize,
const Paint& rHorizontalPaint,
const Paint& rVerticalPaint);
+ static void DrawBevelBorder (
+ OutputDevice& rDevice,
+ const Rectangle rBox,
+ const SvBorder aBorderSize,
+ const Paint& rTopLeftPaint,
+ const Paint& rCenterPaint,
+ const Paint& rBottomRightPaint);
static void DrawHorizontalLine(
OutputDevice& rDevice,
const sal_Int32 nLeft,
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/EnumContext.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/EnumContext.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/EnumContext.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/EnumContext.cxx Tue Jan 29 08:14:09 2013
@@ -23,6 +23,8 @@
#include "sidebar/EnumContext.hxx"
+#include <map>
+
namespace sfx2 { namespace sidebar {
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
@@ -41,11 +43,13 @@ static ContextVector maContextVector;
}
+const sal_Int32 EnumContext::NoMatch = 4;
+const sal_Int32 EnumContext::OptimalMatch = 0; // Neither application nor context name is "any".
EnumContext::EnumContext (void)
- : meApplication(Application_Other),
- meContext(Context_Default)
+ : meApplication(Application_Unknown),
+ meContext(Context_Unknown)
{
}
@@ -63,6 +67,17 @@ EnumContext::EnumContext (
+EnumContext::EnumContext (
+ const ::rtl::OUString& rsApplicationName,
+ const ::rtl::OUString& rsContextName)
+ : meApplication(GetApplicationEnum(rsApplicationName)),
+ meContext(GetContextEnum(rsContextName))
+{
+}
+
+
+
+
sal_Int32 EnumContext::GetCombinedContext(void) const
{
return CombinedEnumContext(meApplication, meContext);
@@ -71,6 +86,22 @@ sal_Int32 EnumContext::GetCombinedContex
+const ::rtl::OUString& EnumContext::GetApplicationName (void) const
+{
+ return EnumContext::GetApplicationName(meApplication);
+}
+
+
+
+
+const ::rtl::OUString& EnumContext::GetContextName (void) const
+{
+ return EnumContext::GetContextName(meContext);
+}
+
+
+
+
bool EnumContext::operator== (const EnumContext aOther)
{
return meApplication==aOther.meApplication
@@ -80,11 +111,20 @@ bool EnumContext::operator== (const Enum
+bool EnumContext::operator!= (const EnumContext aOther)
+{
+ return meApplication!=aOther.meApplication
+ || meContext!=aOther.meContext;
+}
+
+
+
+
void EnumContext::AddEntry (const ::rtl::OUString& rsName, const Application eApplication)
{
maApplicationMap[rsName] = eApplication;
OSL_ASSERT(eApplication<=__LastApplicationEnum);
- if (maApplicationVector.size() <= eApplication)
+ if (maApplicationVector.size() <= size_t(eApplication))
maApplicationVector.resize(eApplication+1);
maApplicationVector[eApplication]=rsName;
}
@@ -98,10 +138,11 @@ void EnumContext::ProvideApplicationCont
{
maApplicationVector.resize(static_cast<size_t>(EnumContext::__LastApplicationEnum)+1);
AddEntry(A2S("com.sun.star.text.TextDocument"), EnumContext::Application_Writer);
- AddEntry(A2S("com.sun.star ?calc?"), EnumContext::Application_Calc);
- AddEntry(A2S("com.sun.star ?draw?"), EnumContext::Application_Draw);
+ AddEntry(A2S("com.sun.star.sheet.SpreadsheetDocument"), EnumContext::Application_Calc);
+ AddEntry(A2S("com.sun.star.drawing.DrawingDocument"), EnumContext::Application_Draw);
AddEntry(A2S("com.sun.star.presentation.PresentationDocument"), EnumContext::Application_Impress);
- AddEntry(A2S("other"), EnumContext::Application_Other);
+ AddEntry(A2S("any"), EnumContext::Application_Any);
+ AddEntry(A2S("unknown"), EnumContext::Application_Unknown);
}
}
@@ -117,7 +158,7 @@ EnumContext::Application EnumContext::Ge
if (iApplication != maApplicationMap.end())
return iApplication->second;
else
- return EnumContext::Application_Other;
+ return EnumContext::Application_Unknown;
}
@@ -129,7 +170,7 @@ const ::rtl::OUString& EnumContext::GetA
const sal_Int32 nIndex (eApplication);
if (nIndex<0 || nIndex>= __LastApplicationEnum)
- return maApplicationVector[Application_Other];
+ return maApplicationVector[Application_Unknown];
else
return maApplicationVector[nIndex];
}
@@ -141,7 +182,7 @@ void EnumContext::AddEntry (const ::rtl:
{
maContextMap[rsName] = eApplication;
OSL_ASSERT(eApplication<=__LastContextEnum);
- if (maContextVector.size() <= eApplication)
+ if (maContextVector.size() <= size_t(eApplication))
maContextVector.resize(eApplication+1);
maContextVector[eApplication]=rsName;
}
@@ -154,8 +195,8 @@ void EnumContext::ProvideContextContaine
if (maContextMap.empty())
{
maContextVector.resize(static_cast<size_t>(__LastContextEnum)+1);
- AddEntry(A2S("text-edit"), Context_Text);
AddEntry(A2S("text"), Context_Text);
+ AddEntry(A2S("any"), Context_Any);
AddEntry(A2S("default"), Context_Default);
}
}
@@ -172,7 +213,7 @@ EnumContext::Context EnumContext::GetCon
if (iContext != maContextMap.end())
return iContext->second;
else
- return EnumContext::Context_Default;
+ return EnumContext::Context_Unknown;
}
@@ -184,7 +225,7 @@ const ::rtl::OUString& EnumContext::GetC
const sal_Int32 nIndex (eContext);
if (nIndex<0 || nIndex>= __LastContextEnum)
- return maContextVector[Context_Default];
+ return maContextVector[Context_Unknown];
else
return maContextVector[nIndex];
}
@@ -192,4 +233,51 @@ const ::rtl::OUString& EnumContext::GetC
+sal_Int32 EnumContext::EvaluateMatch (
+ const EnumContext& rOther) const
+{
+ const bool bApplicationNameIsAny (rOther.meApplication == Application_Any);
+ if (rOther.meApplication==meApplication || bApplicationNameIsAny)
+ {
+ // Application name matches.
+ const bool bContextNameIsAny (rOther.meContext == Context_Any);
+ if (rOther.meContext==meContext || bContextNameIsAny)
+ {
+ // Context name matches.
+ return (bApplicationNameIsAny ? 1 : 0)
+ + (bContextNameIsAny ? 2 : 0);
+ }
+ }
+ return NoMatch;
+}
+
+
+
+
+sal_Int32 EnumContext::EvaluateMatch (const ::std::vector<EnumContext>& rOthers) const
+{
+ sal_Int32 nBestMatch (NoMatch);
+
+ for (::std::vector<EnumContext>::const_iterator
+ iContext(rOthers.begin()),
+ iEnd(rOthers.end());
+ iContext!=iEnd;
+ ++iContext)
+ {
+ const sal_Int32 nMatch (EvaluateMatch(*iContext));
+ if (nMatch < nBestMatch)
+ {
+ if (nMatch == OptimalMatch)
+ {
+ // We will find no better match so stop searching.
+ return OptimalMatch;
+ }
+ nBestMatch = nMatch;
+ }
+ }
+ return nBestMatch;
+}
+
+
+
} } // end of namespace sfx2::sidebar
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/MenuButton.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/MenuButton.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/MenuButton.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/MenuButton.cxx Tue Jan 29 08:14:09 2013
@@ -65,7 +65,9 @@ void MenuButton::Paint (const Rectangle&
Rectangle(Point(0,0), GetSizePixel()),
2,
bIsMouseOver||bIsSelected ? Theme::GetColor(Theme::Color_TabItemBorder) : Color(0xffffffff),
- bIsMouseOver ? Theme::GetPaint(Theme::Paint_TabItemBackground) : sidebar::Paint());
+ bIsMouseOver
+ ? Theme::GetPaint(Theme::Paint_TabItemBackgroundHighlight)
+ : Theme::GetPaint(Theme::Paint_TabItemBackgroundNormal));
const Image aIcon (Button::GetModeImage(Theme::IsHighContrastMode()
? BMP_COLOR_HIGHCONTRAST
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/MenuButton.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/MenuButton.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/MenuButton.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/MenuButton.hxx Tue Jan 29 08:14:09 2013
@@ -39,6 +39,9 @@ public:
virtual void MouseButtonDown (const MouseEvent& rMouseEvent);
virtual void MouseButtonUp (const MouseEvent& rMouseEvent);
+protected:
+ using CheckBox::FillLayoutData;
+
private:
bool mbIsLeftButtonDown;
enum PaintType {
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/Paint.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/Paint.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/Paint.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/Paint.cxx Tue Jan 29 08:14:09 2013
@@ -22,6 +22,11 @@
#include "precompiled_sfx2.hxx"
#include "Paint.hxx"
+#include "Tools.hxx"
+#include <com/sun/star/awt/Gradient.hpp>
+
+
+using namespace ::com::sun::star;
namespace sfx2 { namespace sidebar {
@@ -51,6 +56,22 @@ Paint::Paint (const Gradient& rGradient)
+Paint Paint::Create (const cssu::Any& rValue)
+{
+ ColorData aColor (0);
+ if (rValue >>= aColor)
+ return Paint(Color(aColor));
+
+ awt::Gradient aAwtGradient;
+ if (rValue >>= aAwtGradient)
+ return Paint(Tools::AwtToVclGradient(aAwtGradient));
+
+ return Paint();
+}
+
+
+
+
void Paint::Set (const Paint& rOther)
{
meType = rOther.meType;
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/Paint.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/Paint.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/Paint.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/Paint.hxx Tue Jan 29 08:14:09 2013
@@ -25,9 +25,12 @@
#include <tools/color.hxx>
#include <vcl/gradient.hxx>
#include <vcl/wall.hxx>
+#include <com/sun/star/awt/Gradient.hpp>
#include <boost/variant.hpp>
+namespace cssu = ::com::sun::star::uno;
+
namespace sfx2 { namespace sidebar {
/** Abstraction of different ways to fill outlines.
@@ -46,6 +49,10 @@ public:
GradientPaint
};
+ // Create a Paint object for an Any that may contain a color, a
+ // awt::Gradient, or nothing.
+ static Paint Create (const cssu::Any& rValue);
+
// Create paint with type NoPaint.
explicit Paint (void);
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/Panel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/Panel.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/Panel.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/Panel.cxx Tue Jan 29 08:14:09 2013
@@ -29,6 +29,7 @@
#include <tools/svborder.hxx>
+#include <com/sun/star/awt/XWindowPeer.hpp>
#include <com/sun/star/ui/XToolPanel.hpp>
@@ -47,6 +48,7 @@ Panel::Panel (
Window* pParentWindow,
const ::boost::function<void(void)>& rDeckLayoutTrigger)
: Window(pParentWindow),
+ msPanelId(rPanelDescriptor.msId),
msLayoutHint(rPanelDescriptor.msLayout),
mpTitleBar(new PanelTitleBar(rPanelDescriptor.msTitle, pParentWindow, this)),
mbIsTitleBarOptional(rPanelDescriptor.mbIsTitleBarOptional),
@@ -72,12 +74,22 @@ Panel::~Panel (void)
void Panel::Dispose (void)
{
mxVerticalStackLayoutElement = NULL;
+
+
+ if (mxElement.is())
{
+ Reference<lang::XComponent> xComponent (mxElement->getRealInterface(), UNO_QUERY);
+ if (xComponent.is())
+ xComponent->dispose();
+ }
+
+ {
Reference<lang::XComponent> xComponent (mxElement, UNO_QUERY);
mxElement = NULL;
if (xComponent.is())
xComponent->dispose();
}
+
{
Reference<lang::XComponent> xComponent (mxElementWindow, UNO_QUERY);
mxElementWindow = NULL;
@@ -150,6 +162,17 @@ bool Panel::IsExpanded (void) const
+bool Panel::HasIdPredicate (const ::rtl::OUString& rsId) const
+{
+ if (this == NULL)
+ return false;
+ else
+ return msPanelId.equals(rsId);
+}
+
+
+
+
void Panel::Paint (const Rectangle& rUpdateArea)
{
Window::Paint(rUpdateArea);
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/Panel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/Panel.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/Panel.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/Panel.hxx Tue Jan 29 08:14:09 2013
@@ -57,6 +57,7 @@ public:
cssu::Reference<css::ui::XVerticalStackLayoutElement> GetVerticalStackElement (void) const;
void SetExpanded (const bool bIsExpanded);
bool IsExpanded (void) const;
+ bool HasIdPredicate (const ::rtl::OUString& rsId) const;
virtual void Paint (const Rectangle& rUpdateArea);
virtual void SetPosSizePixel (
@@ -69,6 +70,7 @@ public:
virtual void Activate (void);
private:
+ const ::rtl::OUString msPanelId;
const ::rtl::OUString msLayoutHint;
TitleBar* mpTitleBar;
const bool mbIsTitleBarOptional;
@@ -82,6 +84,7 @@ private:
DECL_LINK(WindowEventHandler, VclWindowEvent*);
};
+
} } // end of namespace sfx2::sidebar
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelDescriptor.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelDescriptor.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelDescriptor.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelDescriptor.cxx Tue Jan 29 08:14:09 2013
@@ -34,7 +34,8 @@ PanelDescriptor::PanelDescriptor (void)
msHelpURL(),
maContexts(),
msLayout(),
- msImplementationURL()
+ msImplementationURL(),
+ mnOrderIndex(10000) // Default value as defined in Sidebar.xcs
{
}
@@ -49,7 +50,8 @@ PanelDescriptor::PanelDescriptor (const
msHelpURL(rOther.msHelpURL),
maContexts(rOther.maContexts),
msLayout(rOther.msLayout),
- msImplementationURL(rOther.msImplementationURL)
+ msImplementationURL(rOther.msImplementationURL),
+ mnOrderIndex(rOther.mnOrderIndex)
{
}
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelDescriptor.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelDescriptor.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelDescriptor.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelDescriptor.hxx Tue Jan 29 08:14:09 2013
@@ -22,7 +22,7 @@
#ifndef SFX_SIDEBAR_PANEL_DESCRIPTOR_HXX
#define SFX_SIDEBAR_PANEL_DESCRIPTOR_HXX
-#include "Context.hxx"
+#include "sfx2/sidebar/EnumContext.hxx"
#include <boost/shared_ptr.hpp>
@@ -37,9 +37,10 @@ public:
::rtl::OUString msId;
::rtl::OUString msDeckId;
::rtl::OUString msHelpURL;
- ::std::vector<Context> maContexts;
+ ::std::vector<EnumContext> maContexts;
::rtl::OUString msLayout;
::rtl::OUString msImplementationURL;
+ sal_Int32 mnOrderIndex;
PanelDescriptor (void);
PanelDescriptor (const PanelDescriptor& rPanelDescriptor);
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelTitleBar.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelTitleBar.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelTitleBar.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/PanelTitleBar.cxx Tue Jan 29 08:14:09 2013
@@ -29,6 +29,8 @@
#include <tools/svborder.hxx>
#include <vcl/gradient.hxx>
+#include <vcl/image.hxx>
+
namespace sfx2 { namespace sidebar {
@@ -83,8 +85,8 @@ void PanelTitleBar::PaintDecoration (con
if (mpPanel != NULL)
{
Image aImage (mpPanel->IsExpanded()
- ? Theme::GetImage(Theme::Image_Expand)
- : Theme::GetImage(Theme::Image_Collapse));
+ ? Theme::GetImage(Theme::Image_Collapse)
+ : Theme::GetImage(Theme::Image_Expand));
const Point aTopLeft (
gaLeftIconPadding,
(GetSizePixel().Height()-aImage.GetSizePixel().Height())/2);
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.cxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.cxx Tue Jan 29 08:14:09 2013
@@ -24,9 +24,16 @@
#include "ResourceManager.hxx"
#include <unotools/confignode.hxx>
#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/namedvaluecollection.hxx>
+#include <comphelper/types.hxx>
+#include <rtl/ustrbuf.hxx>
#include <tools/diagnose_ex.h>
+#include <com/sun/star/frame/XModuleManager.hpp>
+
+#include <map>
+
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
@@ -81,12 +88,12 @@ ResourceManager::~ResourceManager (void)
const DeckDescriptor* ResourceManager::GetBestMatchingDeck (
- const Context& rContext,
+ const EnumContext& rContext,
const Reference<frame::XFrame>& rxFrame)
{
ReadLegacyAddons(rxFrame);
- sal_Int32 nBestMatch (Context::NoMatch);
+ sal_Int32 nBestMatch (EnumContext::NoMatch);
const DeckContainer::const_iterator iEnd (maDecks.end());
DeckContainer::const_iterator iBestDeck (iEnd);
@@ -97,10 +104,10 @@ const DeckDescriptor* ResourceManager::G
const sal_Int32 nMatch (rContext.EvaluateMatch(iDeck->maContexts));
if (nMatch < nBestMatch)
{
- // Found a better matching decks.
+ // Found a better matching deck.
nBestMatch = nMatch;
iBestDeck = iDeck;
- if (nBestMatch == Context::OptimalMatch)
+ if (nBestMatch == EnumContext::OptimalMatch)
{
// We will not find a better match.
break;
@@ -116,9 +123,66 @@ const DeckDescriptor* ResourceManager::G
-const ResourceManager::DeckContainer& ResourceManager::GetMatchingDecks (
- DeckContainer& rDeckDescriptors,
- const Context& rContext,
+const DeckDescriptor* ResourceManager::GetDeckDescriptor (
+ const ::rtl::OUString& rsDeckId) const
+{
+ for (DeckContainer::const_iterator
+ iDeck(maDecks.begin()),
+ iEnd(maDecks.end());
+ iDeck!=iEnd;
+ ++iDeck)
+ {
+ if (iDeck->msId.equals(rsDeckId))
+ return &*iDeck;
+ }
+ return NULL;
+}
+
+
+
+
+const PanelDescriptor* ResourceManager::GetPanelDescriptor (
+ const ::rtl::OUString& rsPanelId) const
+{
+ for (PanelContainer::const_iterator
+ iPanel(maPanels.begin()),
+ iEnd(maPanels.end());
+ iPanel!=iEnd;
+ ++iPanel)
+ {
+ if (iPanel->msId.equals(rsPanelId))
+ return &*iPanel;
+ }
+ return NULL;
+}
+
+
+
+
+void ResourceManager::SetIsDeckEnabled (
+ const ::rtl::OUString& rsDeckId,
+ const bool bIsEnabled)
+{
+ for (DeckContainer::iterator
+ iDeck(maDecks.begin()),
+ iEnd(maDecks.end());
+ iDeck!=iEnd;
+ ++iDeck)
+ {
+ if (iDeck->msId.equals(rsDeckId))
+ {
+ iDeck->mbIsEnabled = bIsEnabled;
+ return;
+ }
+ }
+}
+
+
+
+
+const ResourceManager::IdContainer& ResourceManager::GetMatchingDecks (
+ IdContainer& rDeckIds,
+ const EnumContext& rContext,
const Reference<frame::XFrame>& rxFrame)
{
ReadLegacyAddons(rxFrame);
@@ -129,24 +193,25 @@ const ResourceManager::DeckContainer& Re
iDeck!=iEnd;
++iDeck)
{
- if (rContext.EvaluateMatch(iDeck->maContexts) != Context::NoMatch)
- rDeckDescriptors.push_back(*iDeck);
+ if (rContext.EvaluateMatch(iDeck->maContexts) != EnumContext::NoMatch)
+ rDeckIds.push_back(iDeck->msId);
}
- return rDeckDescriptors;
+ return rDeckIds;
}
-const ResourceManager::PanelContainer& ResourceManager::GetMatchingPanels (
- PanelContainer& rPanelDescriptors,
- const Context& rContext,
+const ResourceManager::IdContainer& ResourceManager::GetMatchingPanels (
+ IdContainer& rPanelIds,
+ const EnumContext& rContext,
const ::rtl::OUString& rsDeckId,
const Reference<frame::XFrame>& rxFrame)
{
ReadLegacyAddons(rxFrame);
+ ::std::multimap<sal_Int32,OUString> aOrderedIds;
for (PanelContainer::const_iterator
iPanel(maPanels.begin()),
iEnd(maPanels.end());
@@ -155,11 +220,22 @@ const ResourceManager::PanelContainer& R
{
const PanelDescriptor& rPanelDescriptor (*iPanel);
if (rPanelDescriptor.msDeckId.equals(rsDeckId))
- if (rContext.EvaluateMatch(rPanelDescriptor.maContexts) != Context::NoMatch)
- rPanelDescriptors.push_back(*iPanel);
+ if (rContext.EvaluateMatch(rPanelDescriptor.maContexts) != EnumContext::NoMatch)
+ aOrderedIds.insert(::std::multimap<sal_Int32,OUString>::value_type(
+ iPanel->mnOrderIndex,
+ iPanel->msId));
}
- return rPanelDescriptors;
+ for (::std::multimap<sal_Int32,OUString>::const_iterator
+ iId(aOrderedIds.begin()),
+ iEnd(aOrderedIds.end());
+ iId!=iEnd;
+ ++iId)
+ {
+ rPanelIds.push_back(iId->second);
+ }
+
+ return rPanelIds;
}
@@ -193,6 +269,7 @@ void ResourceManager::ReadDeckList (void
rDeckDescriptor.msHighContrastIconURL = ::comphelper::getString(aDeckNode.getNodeValue("HighContrastIconURL"));
rDeckDescriptor.msHelpURL = ::comphelper::getString(aDeckNode.getNodeValue("HelpURL"));
rDeckDescriptor.msHelpText = rDeckDescriptor.msTitle;
+ rDeckDescriptor.mbIsEnabled = true;
ReadContextList(aDeckNode.openNode("ContextList"), rDeckDescriptor.maContexts);
}
@@ -241,6 +318,8 @@ void ResourceManager::ReadPanelList (voi
aPanelNode.getNodeValue("Layout"));
rPanelDescriptor.msImplementationURL = ::comphelper::getString(
aPanelNode.getNodeValue("ImplementationURL"));
+ rPanelDescriptor.mnOrderIndex = ::comphelper::getINT32(
+ aPanelNode.getNodeValue("OrderIndex"));
ReadContextList(aPanelNode.openNode("ContextList"), rPanelDescriptor.maContexts);
}
@@ -255,7 +334,7 @@ void ResourceManager::ReadPanelList (voi
void ResourceManager::ReadContextList (
const ::utl::OConfigurationNode& rNode,
- ::std::vector<Context>& rContextContainer) const
+ ::std::vector<EnumContext>& rContextContainer) const
{
const Sequence<OUString> aChildNodeNames (rNode.getNodeNames());
const sal_Int32 nCount (aChildNodeNames.getLength());
@@ -263,10 +342,9 @@ void ResourceManager::ReadContextList (
for (sal_Int32 nIndex(0); nIndex<nCount; ++nIndex)
{
const ::utl::OConfigurationNode aChildNode (rNode.openNode(aChildNodeNames[nIndex]));
- Context& rContext (rContextContainer[nIndex]);
-
- rContext.msApplication = ::comphelper::getString(aChildNode.getNodeValue("Application"));
- rContext.msContext = ::comphelper::getString(aChildNode.getNodeValue("ApplicationContext"));
+ rContextContainer[nIndex] = EnumContext(
+ ::comphelper::getString(aChildNode.getNodeValue("Application")),
+ ::comphelper::getString(aChildNode.getNodeValue("ApplicationContext")));
}
}
@@ -300,8 +378,8 @@ void ResourceManager::ReadLegacyAddons (
::std::vector<OUString> aMatchingNodeNames;
GetToolPanelNodeNames(aMatchingNodeNames, aLegacyRootNode);
const sal_Int32 nCount (aMatchingNodeNames.size());
- sal_Int32 nDeckWriteIndex (maDecks.size());
- sal_Int32 nPanelWriteIndex (maPanels.size());
+ size_t nDeckWriteIndex (maDecks.size());
+ size_t nPanelWriteIndex (maPanels.size());
maDecks.resize(maDecks.size() + nCount);
maPanels.resize(maPanels.size() + nCount);
for (sal_Int32 nReadIndex(0); nReadIndex<nCount; ++nReadIndex)
@@ -319,7 +397,8 @@ void ResourceManager::ReadLegacyAddons (
rDeckDescriptor.msHelpURL = ::comphelper::getString(aChildNode.getNodeValue("HelpURL"));
rDeckDescriptor.msHelpText = rDeckDescriptor.msTitle;
rDeckDescriptor.maContexts.resize(1);
- rDeckDescriptor.maContexts.front() = Context(A2S("any"), A2S("any"));
+ rDeckDescriptor.maContexts.front() = EnumContext(sModuleName, A2S("any"));
+ rDeckDescriptor.mbIsEnabled = true;
PanelDescriptor& rPanelDescriptor (maPanels[nPanelWriteIndex++]);
rPanelDescriptor.msTitle = ::comphelper::getString(aChildNode.getNodeValue("UIName"));
@@ -328,7 +407,7 @@ void ResourceManager::ReadLegacyAddons (
rPanelDescriptor.msDeckId = rsNodeName;
rPanelDescriptor.msHelpURL = ::comphelper::getString(aChildNode.getNodeValue("HelpURL"));
rPanelDescriptor.maContexts.resize(1);
- rPanelDescriptor.maContexts.front() = Context(A2S("any"), A2S("any"));
+ rPanelDescriptor.maContexts.front() = EnumContext(sModuleName, A2S("any"));
rPanelDescriptor.msLayout = A2S("full");
rPanelDescriptor.msImplementationURL = rsNodeName;
}
@@ -345,7 +424,7 @@ void ResourceManager::ReadLegacyAddons (
::rtl::OUString ResourceManager::GetModuleName (
- const cssu::Reference<css::frame::XFrame>& rxFrame) const
+ const cssu::Reference<css::frame::XFrame>& rxFrame)
{
try
{
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.hxx?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.hxx Tue Jan 29 08:14:09 2013
@@ -24,7 +24,9 @@
#include "DeckDescriptor.hxx"
#include "PanelDescriptor.hxx"
-
+#include "sfx2/sidebar/EnumContext.hxx"
+#include <unotools/confignode.hxx>
+#include <com/sun/star/frame/XFrame.hpp>
#include <set>
#include <boost/shared_ptr.hpp>
@@ -44,30 +46,50 @@ public:
static ResourceManager& Instance (void);
const DeckDescriptor* GetBestMatchingDeck (
- const Context& rContext,
+ const EnumContext& rContext,
const cssu::Reference<css::frame::XFrame>& rxFrame);
- typedef ::std::vector<DeckDescriptor> DeckContainer;
- typedef ::std::vector<PanelDescriptor> PanelContainer;
+ const DeckDescriptor* GetDeckDescriptor (
+ const ::rtl::OUString& rsDeckId) const;
+ const PanelDescriptor* GetPanelDescriptor (
+ const ::rtl::OUString& rsPanelId) const;
+
+ /** Excluded or include a deck from being displayed in the tab
+ bar.
+ Note that this value is not persistent.
+ The flag can not be set directly at a DeckDescriptor object
+ because the ResourceManager gives access to to them only
+ read-only.
+ */
+ void SetIsDeckEnabled (
+ const ::rtl::OUString& rsDeckId,
+ const bool bIsEnabled);
+
+ typedef ::std::vector<rtl::OUString> IdContainer;
- const DeckContainer& GetMatchingDecks (
- DeckContainer& rDeckDescriptors,
- const Context& rContext,
+ const IdContainer& GetMatchingDecks (
+ IdContainer& rDeckDescriptors,
+ const EnumContext& rContext,
const cssu::Reference<css::frame::XFrame>& rxFrame);
- const PanelContainer& GetMatchingPanels (
- PanelContainer& rPanelDescriptors,
- const Context& rContext,
+ const IdContainer& GetMatchingPanels (
+ IdContainer& rPanelDescriptors,
+ const EnumContext& rContext,
const ::rtl::OUString& rsDeckId,
const cssu::Reference<css::frame::XFrame>& rxFrame);
+ static ::rtl::OUString GetModuleName (
+ const cssu::Reference<css::frame::XFrame>& rxFrame);
+
private:
ResourceManager (void);
~ResourceManager (void);
class Deleter;
friend class Deleter;
+ typedef ::std::vector<DeckDescriptor> DeckContainer;
DeckContainer maDecks;
+ typedef ::std::vector<PanelDescriptor> PanelContainer;
PanelContainer maPanels;
mutable ::std::set<rtl::OUString> maProcessedApplications;
@@ -75,11 +97,9 @@ private:
void ReadPanelList (void);
void ReadContextList (
const ::utl::OConfigurationNode& rNode,
- ::std::vector<Context>& rContextContainer) const;
+ ::std::vector<EnumContext>& rContextContainer) const;
void ReadLegacyAddons (
const cssu::Reference<css::frame::XFrame>& rxFrame);
- ::rtl::OUString GetModuleName (
- const cssu::Reference<css::frame::XFrame>& rxFrame) const;
::utl::OConfigurationTreeRoot GetLegacyAddonRootNode (
const ::rtl::OUString& rsModuleName) const;
void GetToolPanelNodeNames (
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/Sidebar.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/Sidebar.hrc?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/Sidebar.hrc (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/Sidebar.hrc Tue Jan 29 08:14:09 2013
@@ -24,13 +24,15 @@
#define RID_SIDEBAR_RESOURCE (RID_SFX_SIDEBAR_START + 0)
-#define IMAGE_SIDEBAR_PLUS 1
-#define IMAGE_SIDEBAR_PLUS_HC 2
-#define IMAGE_SIDEBAR_MINUS 3
-#define IMAGE_SIDEBAR_MINUS_HC 4
-#define IMAGE_SIDEBAR_GRIP 5
-#define IMAGE_SIDEBAR_GRIP_HC 6
-#define IMAGE_SIDEBAR_MENU 7
-#define IMAGE_SIDEBAR_MENU_HC 8
-#define STRING_CUSTOMIZATION 9
-#define STRING_RESTORE 10
+#define IMAGE_SIDEBAR_PLUS 1
+#define IMAGE_SIDEBAR_PLUS_HC 2
+#define IMAGE_SIDEBAR_MINUS 3
+#define IMAGE_SIDEBAR_MINUS_HC 4
+#define IMAGE_SIDEBAR_GRIP 5
+#define IMAGE_SIDEBAR_GRIP_HC 6
+#define IMAGE_SIDEBAR_MENU 7
+#define IMAGE_SIDEBAR_MENU_HC 8
+#define IMAGE_SIDEBAR_TOOLBOX_SEPARATOR 9
+#define IMAGE_SIDEBAR_TABBAR_PROPERTIES 10
+#define STRING_CUSTOMIZATION 11
+#define STRING_RESTORE 12
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/Sidebar.src
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/Sidebar.src?rev=1439779&r1=1439778&r2=1439779&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/Sidebar.src (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/Sidebar.src Tue Jan 29 08:14:09 2013
@@ -63,6 +63,16 @@ Resource RID_SIDEBAR_RESOURCE
ImageBitmap = Bitmap { File = "menu_hc.png" ;};
};
+ Image IMAGE_SIDEBAR_TOOLBOX_SEPARATOR
+ {
+ ImageBitmap = Bitmap { File = "separator.png" ;};
+ };
+
+ Image IMAGE_SIDEBAR_TABBAR_PROPERTIES
+ {
+ ImageBitmap = Bitmap { File = "symphony/hpaneldock01.png" ;};
+ };
+
String STRING_CUSTOMIZATION
{
Text [en-US] = "Customization";