summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-20 17:43:17 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-20 19:44:24 +0900
commitee616b050c82b138ee06117890b0381a0b5d750c (patch)
treec3c272a296bfb0e0b5c1b9a975314ff3e9a92b47
parent61719b1781b6147dcfa7278f44c9b910d9ab1286 (diff)
cleanup sidebar
Change-Id: If4964adcc693ccf32e815d6cf8aad8e1c196ada8
-rw-r--r--include/sfx2/sidebar/SidebarChildWindow.hxx12
-rw-r--r--include/sfx2/sidebar/SidebarPanelBase.hxx53
-rw-r--r--include/sfx2/sidebar/SidebarToolBox.hxx29
-rw-r--r--sfx2/source/sidebar/SidebarChildWindow.cxx16
4 files changed, 46 insertions, 64 deletions
diff --git a/include/sfx2/sidebar/SidebarChildWindow.hxx b/include/sfx2/sidebar/SidebarChildWindow.hxx
index 50caeb6114c0..d55d01d707c8 100644
--- a/include/sfx2/sidebar/SidebarChildWindow.hxx
+++ b/include/sfx2/sidebar/SidebarChildWindow.hxx
@@ -30,19 +30,15 @@ namespace sfx2 { namespace sidebar {
RegisterChildWindow() method from the RegisterControllers() method
of the applications DLL.
*/
-class SFX2_DLLPUBLIC SidebarChildWindow
- : public SfxChildWindow
+class SFX2_DLLPUBLIC SidebarChildWindow : public SfxChildWindow
{
public:
- SidebarChildWindow(
- vcl::Window* pParent,
- sal_uInt16 nId,
- SfxBindings* pBindings,
- SfxChildWinInfo* pInfo);
+ SidebarChildWindow(vcl::Window* pParent, sal_uInt16 nId,
+ SfxBindings* pBindings, SfxChildWinInfo* pInfo);
SFX_DECL_CHILDWINDOW_WITHID(SidebarChildWindow);
- static sal_Int32 GetDefaultWidth (vcl::Window* pWindow);
+ static sal_Int32 GetDefaultWidth(vcl::Window* pWindow);
};
diff --git a/include/sfx2/sidebar/SidebarPanelBase.hxx b/include/sfx2/sidebar/SidebarPanelBase.hxx
index a60f951b618f..e08f3c34bb2c 100644
--- a/include/sfx2/sidebar/SidebarPanelBase.hxx
+++ b/include/sfx2/sidebar/SidebarPanelBase.hxx
@@ -42,43 +42,39 @@ namespace sfx2 { namespace sidebar {
namespace
{
- typedef ::cppu::WeakComponentImplHelper4 <
- css::ui::XContextChangeEventListener,
- css::ui::XUIElement,
- css::ui::XToolPanel,
- css::ui::XSidebarPanel
- > SidebarPanelBaseInterfaceBase;
+
+typedef cppu::WeakComponentImplHelper4<css::ui::XContextChangeEventListener,
+ css::ui::XUIElement,
+ css::ui::XToolPanel,
+ css::ui::XSidebarPanel>
+ SidebarPanelBaseInterfaceBase;
}
/** Base class for sidebar panels that provides some convenience
functionality.
*/
-class SFX2_DLLPUBLIC SidebarPanelBase
- : private ::boost::noncopyable,
- private ::cppu::BaseMutex,
- public SidebarPanelBaseInterfaceBase
+class SFX2_DLLPUBLIC SidebarPanelBase : private ::boost::noncopyable,
+ private ::cppu::BaseMutex,
+ public SidebarPanelBaseInterfaceBase
{
public:
- static css::uno::Reference<css::ui::XUIElement> Create (
- const ::rtl::OUString& rsResourceURL,
- const css::uno::Reference<css::frame::XFrame>& rxFrame,
- vcl::Window* pControl,
- const css::ui::LayoutSize& rLayoutSize);
+ static css::uno::Reference<css::ui::XUIElement> Create(const OUString& rsResourceURL,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame,
+ vcl::Window* pControl,
+ const css::ui::LayoutSize& rLayoutSize);
// XContextChangeEventListener
- virtual void SAL_CALL notifyContextChangeEvent (
- const css::ui::ContextChangeEventObject& rEvent)
+ virtual void SAL_CALL notifyContextChangeEvent (const css::ui::ContextChangeEventObject& rEvent)
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XEventListener
- virtual void SAL_CALL disposing (
- const css::lang::EventObject& rEvent)
+ virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent)
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XUIElement
virtual css::uno::Reference<css::frame::XFrame> SAL_CALL getFrame()
throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual ::rtl::OUString SAL_CALL getResourceURL()
+ virtual OUString SAL_CALL getResourceURL()
throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual sal_Int16 SAL_CALL getType()
throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
@@ -86,26 +82,23 @@ public:
throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XToolPanel
- virtual css::uno::Reference<css::accessibility::XAccessible> SAL_CALL createAccessible (
- const css::uno::Reference<css::accessibility::XAccessible>& rxParentAccessible)
+ virtual css::uno::Reference<css::accessibility::XAccessible> SAL_CALL createAccessible(
+ const css::uno::Reference<css::accessibility::XAccessible>& rxParentAccessible)
throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual css::uno::Reference<css::awt::XWindow> SAL_CALL getWindow()
throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XSidebarPanel
- virtual css::ui::LayoutSize SAL_CALL getHeightForWidth (sal_Int32 nWidth)
+ virtual css::ui::LayoutSize SAL_CALL getHeightForWidth(sal_Int32 nWidth)
throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual sal_Int32 SAL_CALL getMinimalWidth ()
+ virtual sal_Int32 SAL_CALL getMinimalWidth()
throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
protected:
css::uno::Reference<css::frame::XFrame> mxFrame;
- SidebarPanelBase (
- const ::rtl::OUString& rsResourceURL,
- const css::uno::Reference<css::frame::XFrame>& rxFrame,
- vcl::Window* pWindow,
- const css::ui::LayoutSize& rLayoutSize);
+ SidebarPanelBase(const OUString& rsResourceURL, const css::uno::Reference<css::frame::XFrame>& rxFrame,
+ vcl::Window* pWindow, const css::ui::LayoutSize& rLayoutSize);
virtual ~SidebarPanelBase();
virtual void SAL_CALL disposing()
@@ -113,7 +106,7 @@ protected:
private:
VclPtr<vcl::Window> mpControl;
- const ::rtl::OUString msResourceURL;
+ const OUString msResourceURL;
const css::ui::LayoutSize maLayoutSize;
};
diff --git a/include/sfx2/sidebar/SidebarToolBox.hxx b/include/sfx2/sidebar/SidebarToolBox.hxx
index bf1663fc9757..21a9a7f9d47e 100644
--- a/include/sfx2/sidebar/SidebarToolBox.hxx
+++ b/include/sfx2/sidebar/SidebarToolBox.hxx
@@ -36,8 +36,7 @@ namespace sfx2 { namespace sidebar {
background window.
2. Create and handle tool bar controller for its items.
*/
-class SFX2_DLLPUBLIC SidebarToolBox
- : public ToolBox
+class SFX2_DLLPUBLIC SidebarToolBox : public ToolBox
{
public:
SidebarToolBox(vcl::Window* pParentWindow);
@@ -46,7 +45,7 @@ public:
using ToolBox::InsertItem;
virtual void InsertItem(const OUString& rCommand,
- const com::sun::star::uno::Reference<com::sun::star::frame::XFrame>& rFrame,
+ const css::uno::Reference<css::frame::XFrame>& rFrame,
ToolBoxItemBits nBits = ToolBoxItemBits::NONE,
const Size& rRequestedSize = Size(),
sal_uInt16 nPos = TOOLBOX_APPEND) SAL_OVERRIDE;
@@ -55,18 +54,16 @@ public:
virtual bool Notify (NotifyEvent& rEvent) SAL_OVERRIDE;
- css::uno::Reference<css::frame::XToolbarController> GetControllerForItemId (
- const sal_uInt16 nItemId) const;
- sal_uInt16 GetItemIdForSubToolbarName (
- const ::rtl::OUString& rsCOmmandName) const;
+ css::uno::Reference<css::frame::XToolbarController> GetControllerForItemId(const sal_uInt16 nItemId) const;
+ sal_uInt16 GetItemIdForSubToolbarName (const OUString& rsCOmmandName) const;
- void SetController (
- const sal_uInt16 nItemId,
- const css::uno::Reference<css::frame::XToolbarController>& rxController,
- const ::rtl::OUString& rsCommandName);
+ void SetController(const sal_uInt16 nItemId,
+ const css::uno::Reference<css::frame::XToolbarController>& rxController,
+ const OUString& rsCommandName);
private:
Image maItemSeparator;
+
class ItemDescriptor
{
public:
@@ -74,7 +71,8 @@ private:
css::util::URL maURL;
rtl::OUString msCurrentCommand;
};
- typedef ::std::map<sal_uInt16, ItemDescriptor> ControllerContainer;
+
+ typedef std::map<sal_uInt16, ItemDescriptor> ControllerContainer;
ControllerContainer maControllers;
bool mbAreHandlersRegistered;
@@ -85,10 +83,9 @@ private:
DECL_STATIC_LINK_TYPED(SidebarToolBox, ActivateToolBox, ToolBox*, void);
DECL_STATIC_LINK_TYPED(SidebarToolBox, DeactivateToolBox, ToolBox*, void);
- void CreateController (
- const sal_uInt16 nItemId,
- const css::uno::Reference<css::frame::XFrame>& rxFrame,
- const sal_Int32 nItemWidth = 0);
+ void CreateController(const sal_uInt16 nItemId,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame,
+ const sal_Int32 nItemWidth = 0);
void RegisterHandlers();
};
diff --git a/sfx2/source/sidebar/SidebarChildWindow.cxx b/sfx2/source/sidebar/SidebarChildWindow.cxx
index 8587c290e335..0925bf83e4c0 100644
--- a/sfx2/source/sidebar/SidebarChildWindow.cxx
+++ b/sfx2/source/sidebar/SidebarChildWindow.cxx
@@ -30,18 +30,14 @@ namespace sfx2 { namespace sidebar {
SFX_IMPL_DOCKINGWINDOW_WITHID(SidebarChildWindow, SID_SIDEBAR);
-SidebarChildWindow::SidebarChildWindow (
- vcl::Window* pParentWindow,
- sal_uInt16 nId,
- SfxBindings* pBindings,
- SfxChildWinInfo* pInfo)
+SidebarChildWindow::SidebarChildWindow (vcl::Window* pParentWindow, sal_uInt16 nId,
+ SfxBindings* pBindings, SfxChildWinInfo* pInfo)
: SfxChildWindow(pParentWindow, nId)
{
- pWindow.reset(VclPtr<SidebarDockingWindow>::Create(
- pBindings,
- *this,
- pParentWindow,
- WB_STDDOCKWIN | WB_OWNERDRAWDECORATION | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE));
+ pWindow.reset(VclPtr<SidebarDockingWindow>::Create(pBindings, *this, pParentWindow,
+ WB_STDDOCKWIN | WB_OWNERDRAWDECORATION |
+ WB_CLIPCHILDREN | WB_SIZEABLE |
+ WB_3DLOOK | WB_ROLLABLE));
eChildAlignment = SfxChildAlignment::RIGHT;
pWindow->SetHelpId(HID_SIDEBAR_WINDOW);