summaryrefslogtreecommitdiff
path: root/basctl/source/dlged
diff options
context:
space:
mode:
Diffstat (limited to 'basctl/source/dlged')
-rw-r--r--basctl/source/dlged/dlged.cxx20
-rw-r--r--basctl/source/dlged/propbrw.cxx47
2 files changed, 16 insertions, 51 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 857ac1df8230..67e6d6569023 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -174,7 +174,10 @@ bool DlgEditor::RemarkDialog()
}
-DlgEditor::DlgEditor( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel )
+DlgEditor::DlgEditor (
+ com::sun::star::uno::Reference<com::sun::star::frame::XModel> const& xModel,
+ PropBrw& rPropertyBrowser_
+)
:pHScroll(NULL)
,pVScroll(NULL)
,pDlgEdModel(NULL)
@@ -187,6 +190,7 @@ DlgEditor::DlgEditor( const ::com::sun::star::uno::Reference< ::com::sun::star::
,pObjFac(NULL)
,pWindow(NULL)
,pFunc(NULL)
+ ,rPropertyBrowser(rPropertyBrowser_)
,eMode( DlgEditor::SELECT )
,eActObj( OBJ_DLG_PUSHBUTTON )
,bFirstDraw(false)
@@ -608,14 +612,7 @@ IMPL_LINK_NOARG(DlgEditor, PaintTimeout)
IMPL_LINK_NOARG(DlgEditor, MarkTimeout)
{
- Shell* pShell = GetShell();
- SfxViewFrame* pViewFrame = pShell ? pShell->GetViewFrame() : NULL;
- SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow( SID_SHOW_PROPERTYBROWSER ) : NULL;
- if ( !pChildWin )
- return 0L;
-
- ((PropBrw*)(pChildWin->GetWindow()))->Update(pShell);
-
+ rPropertyBrowser.Update(GetShell());
return 1;
}
@@ -1128,10 +1125,7 @@ bool DlgEditor::IsPasteAllowed()
void DlgEditor::ShowProperties()
{
- Shell* pShell = GetShell();
- SfxViewFrame* pViewFrame = pShell ? pShell->GetViewFrame() : NULL;
- if ( pViewFrame && !pViewFrame->HasChildWindow( SID_SHOW_PROPERTYBROWSER ) )
- pViewFrame->ToggleChildWindow( SID_SHOW_PROPERTYBROWSER );
+ rPropertyBrowser.Show(!rPropertyBrowser.IsVisible());
}
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index 40695f3a09ba..c3bd5d2783f0 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -18,10 +18,10 @@
*/
+#include "propbrw.hxx"
#include "basidesh.hxx"
#include "dlgedobj.hxx"
#include "iderid.hxx"
-#include "propbrw.hxx"
#include "dlgresid.hrc"
#include <svx/svxids.hrc>
@@ -48,28 +48,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::comphelper;
-SFX_IMPL_FLOATINGWINDOW(PropBrwMgr, SID_SHOW_PROPERTYBROWSER)
-
-PropBrwMgr::PropBrwMgr( Window* _pParent, sal_uInt16 nId,
- SfxBindings *pBindings, SfxChildWinInfo* pInfo)
- :SfxChildWindow( _pParent, nId )
-{
- // set current selection
- SfxViewShell* pShell = SfxViewShell::Current();
- pWindow = new PropBrw(
- ::comphelper::getProcessServiceFactory(),
- pBindings,
- this,
- _pParent,
- pShell ? pShell->GetCurrentDocument() : Reference< XModel >()
- );
-
- eChildAlignment = SFX_ALIGN_NOALIGNMENT;
- ((SfxDockingWindow*)pWindow)->Initialize( pInfo );
-
- ((PropBrw*)pWindow)->Update( pShell );
-}
-
void PropBrw::Update( const SfxViewShell* pShell )
{
@@ -101,13 +79,12 @@ const long WIN_BORDER = 2;
DBG_NAME(PropBrw)
-PropBrw::PropBrw( const Reference< XMultiServiceFactory >& _xORB, SfxBindings* _pBindings, PropBrwMgr* _pMgr, Window* _pParent,
- const Reference< XModel >& _rxContextDocument )
- :SfxDockingWindow( _pBindings, _pMgr, _pParent, WinBits( WB_DOCKABLE | WB_STDMODELESS | WB_SIZEABLE | WB_3DLOOK | WB_ROLLABLE ) )
- ,m_bInitialStateChange(true)
- ,m_xORB(_xORB)
- ,m_xContextDocument( _rxContextDocument )
- ,pView( NULL )
+PropBrw::PropBrw (Layout& rLayout):
+ DockingWindow(&rLayout),
+ m_bInitialStateChange(true),
+ m_xORB(comphelper::getProcessServiceFactory()),
+ m_xContextDocument(SfxViewShell::Current() ? SfxViewShell::Current()->GetCurrentDocument() : Reference<XModel>()),
+ pView(0)
{
DBG_CTOR(PropBrw,NULL);
@@ -260,7 +237,7 @@ sal_Bool PropBrw::Close()
if( IsRollUp() )
RollDown();
- return SfxDockingWindow::Close();
+ return DockingWindow::Close();
}
@@ -450,15 +427,9 @@ void PropBrw::implSetNewObject( const Reference< XPropertySet >& _rxObject )
}
-void PropBrw::FillInfo( SfxChildWinInfo& rInfo ) const
-{
- rInfo.bVisible = false;
-}
-
-
void PropBrw::Resize()
{
- SfxDockingWindow::Resize();
+ DockingWindow::Resize();
// adjust size
Size aSize_ = GetOutputSizePixel();