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/03/21 16:32:29 UTC
svn commit: r1459361 - in /openoffice/branches/sidebar/main:
officecfg/registry/data/org/openoffice/Office/UI/
officecfg/registry/schema/org/openoffice/Office/UI/ sfx2/inc/sfx2/sidebar/
sfx2/source/sidebar/ svx/ svx/inc/svx/ svx/source/sidebar/
Author: af
Date: Thu Mar 21 15:32:28 2013
New Revision: 1459361
URL: http://svn.apache.org/r1459361
Log:
i121420: Fixed the EmptyPanel.
Added:
openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hrc
openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.src
Modified:
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/sfx2/inc/sfx2/sidebar/EnumContext.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckLayouter.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckLayouter.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/EnumContext.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.cxx
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/TitleBar.cxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/TitleBar.hxx
openoffice/branches/sidebar/main/sfx2/source/sidebar/Tools.hxx
openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk
openoffice/branches/sidebar/main/svx/inc/svx/dialogs.hrc
openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.cxx
openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hxx
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=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu (original)
+++ openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu Thu Mar 21 15:32:28 2013
@@ -187,7 +187,7 @@
</prop>
<prop oor:name="ContextList">
<value oor:separator=";">
- any, any, visible ;
+ none, none, visible ;
</value>
</prop>
<prop oor:name="ImplementationURL" oor:type="xs:string">
@@ -358,7 +358,7 @@
Calc, Chart, visible ;
Calc, Draw, hidden ;
Calc, Form, visible ;
- Calc, Graphic, false ;
+ Calc, Graphic, hidden ;
Calc, Media, visible ;
Calc, MultiObject, visible ;
Calc, OLE, visible ;
@@ -596,7 +596,7 @@
</prop>
</node>
- <node oor:name="EmptyPropertyPanel" oor:op="replace">
+ <node oor:name="EmptyPanel" oor:op="replace">
<prop oor:name="TitleBarIsOptional" oor:type="xs:boolean">
<value>true</value>
</prop>
@@ -604,14 +604,14 @@
<value xml:lang="en-US">Empty</value>
</prop>
<prop oor:name="Id" oor:type="xs:string">
- <value>EmptyPropertyPanel</value>
+ <value>EmptyPanel</value>
</prop>
<prop oor:name="DeckId" oor:type="xs:string">
<value>PropertyDeck</value>
</prop>
<prop oor:name="ContextList">
<value oor:separator=";">
- Writer, Frame, visible ;
+ any, empty, visible ;
</value>
</prop>
<prop oor:name="ImplementationURL" oor:type="xs:string">
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=1459361&r1=1459360&r2=1459361&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 Thu Mar 21 15:32:28 2013
@@ -75,7 +75,7 @@
List of context descriptors. Each context descriptor is a string that contains four comma
separated values (note that values are case sensitive):
1 Application name. Valid values are
- com.sun.star.text.TextDocument or Writer
+ com.sun.star.text.TextDocument
com.sun.star.sheet.SpreadsheetDocument
com.sun.star.presentation.PresentationDocument
com.sun.star.drawing.DrawingDocument
@@ -97,14 +97,14 @@
Know context names are 3DObject, Annotation, Auditing, Cell, Chart, Draw, DrawPage, DrawText,
EditCell, Form, Frame, Graphic, HandoutPage, MasterPage, Media, Multiobj, OLE, OutlineText,
Pivot, SlidesorterPage, Table, Text, TextObject,
- Default
+ default
Special values:
any
3 Panel state. One of
- expanded Panel is initially visible and expanded
- collapsed Panel is initially collapsed, ie only its title bar is visible
+ visible Panel is initially visible and expanded
+ hidden Panel is initially collapsed, ie only its title bar is visible
4 (Optional, only used for panels) UNO command that overrides the DefaultMenuCommand. Use
the special value none to override the DefaultMenuCommand to the empty string and thereby
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=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/EnumContext.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/EnumContext.hxx Thu Mar 21 15:32:28 2013
@@ -88,6 +88,10 @@ public:
// Used only by deck or panel descriptors. Matches any context.
Context_Any,
+ // Special context name that is only used when a deck would
+ // otherwise be empty.
+ Context_Empty,
+
Context_Unknown,
__LastContextEnum = Context_Unknown
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckLayouter.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckLayouter.cxx?rev=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckLayouter.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckLayouter.cxx Thu Mar 21 15:32:28 2013
@@ -217,13 +217,23 @@ sal_Int32 DeckLayouter::PlacePanels (
// Place the title bar.
TitleBar* pTitleBar = rPanel.GetTitleBar();
- pTitleBar->SetPosSizePixel(0, nY, nWidth, nPanelTitleBarHeight);
- pTitleBar->Show();
- nY += nPanelTitleBarHeight;
-
- // Separator below the panel title bar.
- aSeparators.push_back(nY);
- nY += nDeckSeparatorHeight;
+ if (pTitleBar != NULL)
+ {
+ if (iItem->mbShowTitleBar)
+ {
+ pTitleBar->SetPosSizePixel(0, nY, nWidth, nPanelTitleBarHeight);
+ pTitleBar->Show();
+ nY += nPanelTitleBarHeight;
+
+ // Separator below the panel title bar.
+ aSeparators.push_back(nY);
+ nY += nDeckSeparatorHeight;
+ }
+ else
+ {
+ pTitleBar->Hide();
+ }
+ }
if (rPanel.IsExpanded())
{
@@ -284,11 +294,24 @@ void DeckLayouter::GetRequestedSizes (
IterateLayoutItems(iItem,rLayoutItems)
{
ui::LayoutSize aLayoutSize (ui::LayoutSize(0,0,0));
- if (iItem->mpPanel != NULL)
+ if (iItem->mpPanel != NULL)
{
- rAvailableHeight -= nPanelTitleBarHeight;
- rAvailableHeight -= 2*nDeckSeparatorHeight;
-
+ if (rLayoutItems.size() == 1
+ && iItem->mpPanel->IsTitleBarOptional())
+ {
+ // There is only one panel and its title bar is
+ // optional => hide it.
+ rAvailableHeight -= nDeckSeparatorHeight;
+ iItem->mbShowTitleBar = false;
+ }
+ else
+ {
+ // Show the title bar and a separator above and below
+ // the title bar.
+ rAvailableHeight -= nPanelTitleBarHeight;
+ rAvailableHeight -= 2*nDeckSeparatorHeight;
+ }
+
if (iItem->mpPanel->IsExpanded())
{
Reference<ui::XSidebarPanel> xPanel (iItem->mpPanel->GetPanelComponent());
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckLayouter.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckLayouter.hxx?rev=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckLayouter.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/DeckLayouter.hxx Thu Mar 21 15:32:28 2013
@@ -74,8 +74,11 @@ private:
sal_Int32 mnDistributedHeight;
sal_Int32 mnWeight;
sal_Int32 mnPanelIndex;
+ bool mbShowTitleBar;
- LayoutItem (void) : mpPanel(),maLayoutSize(0,0,0),mnDistributedHeight(0),mnWeight(0),mnPanelIndex(0) {}
+ LayoutItem (void)
+ : mpPanel(),maLayoutSize(0,0,0),mnDistributedHeight(0),mnWeight(0),mnPanelIndex(0),mbShowTitleBar(true)
+ {}
};
static Rectangle LayoutPanels (
const Rectangle aContentArea,
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=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/EnumContext.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/EnumContext.cxx Thu Mar 21 15:32:28 2013
@@ -214,6 +214,7 @@ void EnumContext::ProvideContextContaine
maContextVector.resize(static_cast<size_t>(__LastContextEnum)+1);
AddEntry(A2S("any"), Context_Any);
AddEntry(A2S("default"), Context_Default);
+ AddEntry(A2S("empty"), Context_Empty);
#define AddContext(context) AddEntry(A2S(#context), Context_##context);
AddContext(3DObject);
AddContext(Annotation);
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=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/ResourceManager.cxx Thu Mar 21 15:32:28 2013
@@ -22,6 +22,8 @@
#include "precompiled_sfx2.hxx"
#include "ResourceManager.hxx"
+#include "Tools.hxx"
+
#include <unotools/confignode.hxx>
#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
@@ -37,7 +39,6 @@
#include <map>
-#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
using ::rtl::OUString;
using namespace css;
@@ -340,7 +341,7 @@ void ResourceManager::ReadPanelList (voi
aPanelNode.getNodeValue("WantsCanvas"));
const OUString sDefaultMenuCommand (::comphelper::getString(
aPanelNode.getNodeValue("DefaultMenuCommand")));
-
+
ReadContextList(
aPanelNode,
rPanelDescriptor.maContextList,
@@ -476,12 +477,14 @@ void ResourceManager::ReadContextList (
sMenuCommand);
}
else
+ {
rContextList.AddContextDescription(
Context(
EnumContext::GetApplicationName(eApplication),
EnumContext::GetContextName(eContext)),
bIsInitiallyVisible,
sMenuCommand);
+ }
}
}
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarController.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarController.cxx?rev=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarController.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarController.cxx Thu Mar 21 15:32:28 2013
@@ -31,6 +31,7 @@
#include "sfx2/sidebar/Theme.hxx"
#include "SidebarDockingWindow.hxx"
#include "Context.hxx"
+#include "Tools.hxx"
#include "sfxresid.hxx"
#include "sfx2/sfxsids.hrc"
@@ -62,8 +63,6 @@ using namespace css;
using namespace cssu;
using ::rtl::OUString;
-#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
-#define S2A(s) OUStringToOString(s, RTL_TEXTENCODING_ASCII_US).getStr()
namespace sfx2 { namespace sidebar {
@@ -237,10 +236,6 @@ void SidebarController::NotifyResize (vo
const sal_Int32 nHeight (pParentWindow->GetSizePixel().Height());
// Place the deck.
- if ( ! mbIsDeckClosed)
- {
- OSL_ASSERT(mpCurrentDeck!=NULL);
- }
if (mpCurrentDeck)
{
mpCurrentDeck->SetPosSizePixel(0,0, nWidth-TabBar::GetDefaultWidth(), nHeight);
@@ -324,6 +319,16 @@ void SidebarController::UpdateConfigurat
msCurrentDeckId = pDeckDescriptor->msId;
SwitchToDeck(*pDeckDescriptor, rContext);
}
+
+#ifdef DEBUG
+ // Show the context name in the deck title bar.
+ if (mpCurrentDeck)
+ {
+ DeckTitleBar* pTitleBar = mpCurrentDeck->GetTitleBar();
+ if (pTitleBar != NULL)
+ pTitleBar->SetTitle(msCurrentDeckTitle+A2S(" (")+rContext.msContext+A2S(")"));
+ }
+#endif
}
}
@@ -372,6 +377,26 @@ void SidebarController::SwitchToDeck (
rDeckDescriptor.msId,
mxFrame);
+ if (aPanelContextDescriptors.empty())
+ {
+ // There are no panels to be displayed in the current context.
+ if (EnumContext::GetContextEnum(rContext.msContext) != EnumContext::Context_Empty)
+ {
+ // Switch to the "empty" context and try again.
+ SwitchToDeck(
+ rDeckDescriptor,
+ Context(
+ rContext.msApplication,
+ EnumContext::GetContextName(EnumContext::Context_Empty)));
+ return;
+ }
+ else
+ {
+ // This is already the "empty" context. Looks like we have
+ // to live with an empty deck.
+ }
+ }
+
if (mpCurrentDeck
&& ArePanelSetsEqual(mpCurrentDeck->GetPanels(), aPanelContextDescriptors))
{
@@ -388,6 +413,7 @@ void SidebarController::SwitchToDeck (
rDeckDescriptor,
mpParentWindow,
::boost::bind(&SidebarController::CloseDeck, this)));
+ msCurrentDeckTitle = rDeckDescriptor.msTitle;
}
if ( ! mpCurrentDeck)
return;
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarController.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarController.hxx?rev=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarController.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/SidebarController.hxx Thu Mar 21 15:32:28 2013
@@ -109,6 +109,7 @@ private:
cssu::Reference<css::frame::XFrame> mxFrame;
Context maCurrentContext;
::rtl::OUString msCurrentDeckId;
+ ::rtl::OUString msCurrentDeckTitle;
AsynchronousCall maPropertyChangeForwarder;
bool mbIsDeckClosed;
/** Before the deck is closed the sidebar width is saved into this variable,
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/TitleBar.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/TitleBar.cxx?rev=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/TitleBar.cxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/TitleBar.cxx Thu Mar 21 15:32:28 2013
@@ -55,6 +55,15 @@ TitleBar::~TitleBar (void)
+void TitleBar::SetTitle (const ::rtl::OUString& rsTitle)
+{
+ msTitle = rsTitle;
+ Invalidate();
+}
+
+
+
+
void TitleBar::Paint (const Rectangle& rUpdateArea)
{
(void)rUpdateArea;
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/TitleBar.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/TitleBar.hxx?rev=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/TitleBar.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/TitleBar.hxx Thu Mar 21 15:32:28 2013
@@ -40,6 +40,8 @@ public:
const sidebar::Paint& rInitialBackgroundPaint);
virtual ~TitleBar (void);
+ void SetTitle (const ::rtl::OUString& rsTitle);
+
virtual void Paint (const Rectangle& rUpdateArea);
virtual void DataChanged (const DataChangedEvent& rEvent);
virtual void SetPosSizePixel (
@@ -59,7 +61,7 @@ protected:
virtual void HandleToolBoxItemClick (const sal_uInt16 nItemIndex);
private:
- const ::rtl::OUString msTitle;
+ ::rtl::OUString msTitle;
void PaintTitle (const Rectangle& rTitleBox);
DECL_LINK(SelectionHandler, ToolBox*);
Modified: openoffice/branches/sidebar/main/sfx2/source/sidebar/Tools.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/Tools.hxx?rev=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/Tools.hxx (original)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/Tools.hxx Thu Mar 21 15:32:28 2013
@@ -31,6 +31,7 @@
#define A2S(s) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s)))
+#define S2A(s) OUStringToOString(s, RTL_TEXTENCODING_ASCII_US).getStr()
namespace css = ::com::sun::star;
namespace cssu = ::com::sun::star::uno;
Modified: openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk?rev=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk (original)
+++ openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk Thu Mar 21 15:32:28 2013
@@ -77,6 +77,7 @@ $(eval $(call gb_SrsTarget_add_files,svx
svx/source/items/svxerr.src \
svx/source/items/svxitems.src \
svx/source/mnuctrls/mnuctrls.src \
+ svx/source/sidebar/EmptyPanel.src \
svx/source/sidebar/area/AreaPropertyPanel.src \
svx/source/sidebar/graphic/GraphicPropertyPanel.src \
svx/source/sidebar/line/LinePropertyPanel.src \
Modified: openoffice/branches/sidebar/main/svx/inc/svx/dialogs.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/inc/svx/dialogs.hrc?rev=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/inc/svx/dialogs.hrc (original)
+++ openoffice/branches/sidebar/main/svx/inc/svx/dialogs.hrc Thu Mar 21 15:32:28 2013
@@ -394,6 +394,7 @@
#define RID_SIDEBAR_POSSIZE_PANEL (RID_SVX_START + 299)
#define RID_SIDEBAR_GRAPHIC_PANEL (RID_SVX_START + 300)
+#define RID_SIDEBAR_EMPTY_PANEL (RID_SVX_START + 301)
// !!! please update RID_SVX_FIRSTFREE !!! see line 46
Modified: openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.cxx?rev=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.cxx (original)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.cxx Thu Mar 21 15:32:28 2013
@@ -22,15 +22,39 @@
#include "precompiled_svx.hxx"
#include "EmptyPanel.hxx"
+#include "EmptyPanel.hrc"
+#include "area/AreaPropertyPanel.hrc"
+#include "svx/dialogs.hrc"
+#include "svx/dialmgr.hxx"
+
namespace svx { namespace sidebar {
+namespace
+{
+ class SidebarResource : public Resource
+ {
+ public:
+ SidebarResource (const ResId& rResId) : Resource(rResId) {}
+ ~SidebarResource (void) { FreeResource(); }
+ };
+}
+
+
+
+
EmptyPanel::EmptyPanel (::Window* pParent)
- : Window(pParent, 0),
- maMessageControl(this, 0)
+ : Control(pParent, SVX_RES(RID_SIDEBAR_EMPTY_PANEL)),
+ maMessageControl(this, SVX_RES(FT_MESSAGE))
{
maMessageControl.SetPosSizePixel(5,5, 250,15);
- maMessageControl.SetText(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Intentionally letft blank")));
+ maMessageControl.SetStyle(WB_WORDBREAK);// | WB_NOMNEMONICS);
+ //maMessageControl.GetStyle()
+ // & ~(WB_NOMULTILINE | WB_PATHELLIPSIS)
+ // | WB_WORDBREAK | WB_NOMNEMONICS);
+ FreeResource();
+
+ SetBackground(Wallpaper());
maMessageControl.Show();
Show();
@@ -46,4 +70,11 @@ EmptyPanel::~EmptyPanel (void)
+void EmptyPanel::Resize (void)
+{
+ const Size aSize (GetSizePixel());
+ maMessageControl.SetSizePixel(aSize);
+}
+
+
} } // end of namespace ::svx::sidebar
Added: openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hrc?rev=1459361&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hrc (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hrc Thu Mar 21 15:32:28 2013
@@ -0,0 +1,26 @@
+/**************************************************************
+ *
+ * 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 <svx/dialogs.hrc>
+
+// For RID_SIDEBAR_EMPTY_PANEL
+
+#define FT_MESSAGE 1
Modified: openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hxx?rev=1459361&r1=1459360&r2=1459361&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hxx (original)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hxx Thu Mar 21 15:32:28 2013
@@ -23,6 +23,7 @@
#define SVX_SIDEBAR_DEBUG_EMPTY_PANEL_HXX
#include <vcl/window.hxx>
+#include <vcl/ctrl.hxx>
#include <vcl/fixed.hxx>
@@ -33,12 +34,14 @@ namespace svx { namespace sidebar {
intentionally empty.
*/
class EmptyPanel
- : public Window
+ : public Control
{
public:
EmptyPanel (::Window* pParent);
virtual ~EmptyPanel (void);
+ virtual void Resize (void);
+
private:
FixedText maMessageControl;
};
Added: openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.src?rev=1459361&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.src (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.src Thu Mar 21 15:32:28 2013
@@ -0,0 +1,33 @@
+/**************************************************************
+ *
+ * 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 "EmptyPanel.hrc"
+#include <svx/dialogs.hrc>
+
+Control RID_SIDEBAR_EMPTY_PANEL
+{
+ FixedText FT_MESSAGE
+ {
+ Pos = MAP_APPFONT(2,2);
+ Size = MAP_APPFONT(100,24);
+ Text [en-US] = "Properties for the task that you are performing are not available in the sidebar at this time.";
+ };
+};