summaryrefslogtreecommitdiff
path: root/basctl/source/inc
diff options
context:
space:
mode:
authorUray M. János <uray.janos@gmail.com>2012-09-05 19:41:42 +0200
committerNoel Power <noel.power@suse.com>2012-09-07 09:14:12 +0000
commit5764c51f2c9870c91727464c0d889d3554a5663e (patch)
tree67ec431c14f0c61e427580d1f5a10863506c6a33 /basctl/source/inc
parent7d5911e40855ac6234590e008927c9b819084ad0 (diff)
Fix for docking property browser
This fixes the crash of 'Basic IDE: Docking property browser under object catalog' commit. The aPropertyBrowser data member was replaced by a new-allocated pointer. We need this because toolkit releases it by delete. When the property browser is closed in the floating state, it tells DialogWindowLayout to null the pointer. If the user clicks the 'property browser' button on the toolbar, it is created again. Change-Id: Ie842a72fe37dfdd2ed5921ffa2f1f41d3f2c51c6 Reviewed-on: https://gerrit.libreoffice.org/568 Tested-by: Noel Power <noel.power@suse.com> Reviewed-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'basctl/source/inc')
-rw-r--r--basctl/source/inc/baside3.hxx14
-rw-r--r--basctl/source/inc/dlged.hxx6
-rw-r--r--basctl/source/inc/propbrw.hxx6
3 files changed, 18 insertions, 8 deletions
diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx
index 6f4d86e61335..6e3216230651 100644
--- a/basctl/source/inc/baside3.hxx
+++ b/basctl/source/inc/baside3.hxx
@@ -125,6 +125,11 @@ class DialogWindowLayout : public Layout
public:
DialogWindowLayout (Window* pParent, ObjectCatalog&);
public:
+ void ShowPropertyBrowser ();
+ void UpdatePropertyBrowser ();
+ void DisablePropertyBrowser ();
+ void RemovePropertyBrowser ();
+public:
// Layout:
virtual void Activating (BaseWindow&);
virtual void Deactivating ();
@@ -138,12 +143,15 @@ protected:
private:
// child window
DialogWindow* pChild;
- // dockable windows
+ // dockable windows:
+ // object catalog (owned by Shell)
ObjectCatalog& rObjectCatalog;
- // property browser
- PropBrw aPropertyBrowser;
+ // property browser (created by this, deleted by toolkit)
+ PropBrw* pPropertyBrowser;
private:
+ void AddPropertyBrowser ();
+private:
friend class DialogWindow;
};
diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx
index 9f52cd4fd087..a564f97b820b 100644
--- a/basctl/source/inc/dlged.hxx
+++ b/basctl/source/inc/dlged.hxx
@@ -40,7 +40,7 @@ class Window;
namespace basctl
{
-class PropBrw;
+class DialogWindowLayout;
#define DLGED_PAGE_WIDTH_MIN 1280
#define DLGED_PAGE_HEIGHT_MIN 1024
@@ -119,7 +119,7 @@ private:
DlgEdFactory* pObjFac;
Window* pWindow;
DlgEdFunc* pFunc;
- PropBrw& rPropertyBrowser;
+ DialogWindowLayout& rLayout;
Mode eMode;
sal_uInt16 eActObj;
bool bFirstDraw;
@@ -136,7 +136,7 @@ private:
DlgEditor(); // not implemented
public:
- DlgEditor (com::sun::star::uno::Reference<com::sun::star::frame::XModel> const& xModel, PropBrw&);
+ DlgEditor (com::sun::star::uno::Reference<com::sun::star::frame::XModel> const& xModel, DialogWindowLayout&);
~DlgEditor();
void SetWindow( Window* pWindow );
diff --git a/basctl/source/inc/propbrw.hxx b/basctl/source/inc/propbrw.hxx
index a3bbad99b862..e8011ef646ef 100644
--- a/basctl/source/inc/propbrw.hxx
+++ b/basctl/source/inc/propbrw.hxx
@@ -34,7 +34,7 @@ class SfxViewShell;
namespace basctl
{
-class Layout;
+class DialogWindowLayout;
class PropBrw : public DockingWindow, public SfxListener, public SfxBroadcaster
{
@@ -52,6 +52,8 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
m_xContextDocument;
+ DialogWindowLayout& rLayout;
+
protected:
SdrView* pView;
virtual void Resize();
@@ -71,7 +73,7 @@ protected:
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject);
public:
- explicit PropBrw (Layout&);
+ explicit PropBrw (DialogWindowLayout&);
virtual ~PropBrw();
using Window::Update;
// note: changing the Context document to an instance other than the one given in the ctor is not supported