diff options
Diffstat (limited to 'sd/source/ui/dlg')
-rw-r--r-- | sd/source/ui/dlg/RemoteDialogClientBox.cxx | 88 | ||||
-rw-r--r-- | sd/source/ui/dlg/RemoteDialogClientBox.hxx | 11 | ||||
-rw-r--r-- | sd/source/ui/dlg/animobjs.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/dlg/brkdlg.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/copydlg.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgass.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgassim.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgassim.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgctrls.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgolbul.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/docprev.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/headerfooterdlg.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/navigatr.cxx | 253 | ||||
-rw-r--r-- | sd/source/ui/dlg/prltempl.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/dlg/sdtreelb.cxx | 6 |
15 files changed, 255 insertions, 166 deletions
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx index c3f4ebafb86b..3853a98d0dbe 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -73,16 +73,16 @@ ClientBox::ClientBox( vcl::Window* pParent, WinBits nStyle ) : m_nTopIndex( 0 ), m_nActiveHeight( 0 ), m_nExtraHeight( 2 ), - m_aPinBox( this, 0 ), - m_aDeauthoriseButton( this ), - m_aScrollBar( this, WB_VERT ) + m_aPinBox( new NumericBox( this, 0 ) ), + m_aDeauthoriseButton( new PushButton( this ) ), + m_aScrollBar( new ScrollBar( this, WB_VERT ) ) { - m_aScrollBar.SetScrollHdl( LINK( this, ClientBox, ScrollHdl ) ); - m_aScrollBar.EnableDrag(); + m_aScrollBar->SetScrollHdl( LINK( this, ClientBox, ScrollHdl ) ); + m_aScrollBar->EnableDrag(); - m_aPinBox.SetUseThousandSep(false); - m_aDeauthoriseButton.SetText( SD_RESSTR(STR_DEAUTHORISE_CLIENT) ); - m_aDeauthoriseButton.SetClickHdl( LINK( this, ClientBox, DeauthoriseHdl ) ); + m_aPinBox->SetUseThousandSep(false); + m_aDeauthoriseButton->SetText( SD_RESSTR(STR_DEAUTHORISE_CLIENT) ); + m_aDeauthoriseButton->SetClickHdl( LINK( this, ClientBox, DeauthoriseHdl ) ); SetPosPixel( Point( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP ) ); long nIconHeight = 2*TOP_OFFSET + SMALL_ICON_SIZE; @@ -124,6 +124,11 @@ Size ClientBox::GetOptimalSize() const ClientBox::~ClientBox() { + dispose(); +} + +void ClientBox::dispose() +{ if ( ! m_bInDelete ) DeleteRemoved(); @@ -132,6 +137,11 @@ ClientBox::~ClientBox() m_vEntries.clear(); m_xRemoveListener.clear(); + + m_aPinBox.disposeAndClear(); + m_aDeauthoriseButton.disposeAndClear(); + m_aScrollBar.disposeAndClear(); + Control::dispose(); } // Title + description @@ -152,7 +162,7 @@ void ClientBox::CalcActiveHeight( const long nPos ) // Text entry height Size aSize = GetOutputSizePixel(); if ( m_bHasScrollBar ) - aSize.Width() -= m_aScrollBar.GetSizePixel().Width(); + aSize.Width() -= m_aScrollBar->GetSizePixel().Width(); aSize.Width() -= ICON_OFFSET; @@ -173,7 +183,7 @@ Rectangle ClientBox::GetEntryRect( const long nPos ) const Size aSize( GetOutputSizePixel() ); if ( m_bHasScrollBar ) - aSize.Width() -= m_aScrollBar.GetSizePixel().Width(); + aSize.Width() -= m_aScrollBar->GetSizePixel().Width(); if ( m_vEntries[ nPos ]->m_bActive ) aSize.Height() = m_nActiveHeight; @@ -246,7 +256,7 @@ void ClientBox::selectEntry( const long nPos ) // We empty the pin box now too, just in case the user previously // entered a pin, but then changed their selected device. - m_aPinBox.SetText( "" ); + m_aPinBox->SetText( "" ); if ( m_bHasActive ) { bool bAlreadyAuthorised = @@ -254,11 +264,11 @@ void ClientBox::selectEntry( const long nPos ) if ( bAlreadyAuthorised ) { - m_aDeauthoriseButton.GetFocus(); + m_aDeauthoriseButton->GetFocus(); } else { - m_aPinBox.GetFocus(); + m_aPinBox->GetFocus(); } } @@ -350,19 +360,19 @@ void ClientBox::RecalcAll() Size aPBSize = LogicToPixel( Size( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ), MapMode( MAP_APPFONT ) ); - m_aPinBox.SetSizePixel( aPBSize ); - m_aDeauthoriseButton.SetSizePixel( m_aDeauthoriseButton.GetOptimalSize() ); + m_aPinBox->SetSizePixel( aPBSize ); + m_aDeauthoriseButton->SetSizePixel( m_aDeauthoriseButton->GetOptimalSize() ); if ( !m_bHasActive ) { - m_aPinBox.Show( false ); - m_aDeauthoriseButton.Show( false ); + m_aPinBox->Show( false ); + m_aDeauthoriseButton->Show( false ); } else { Rectangle aEntryRect = GetEntryRect( m_nActive ); - Size aPinBoxSize( m_aPinBox.GetSizePixel() ); + Size aPinBoxSize( m_aPinBox->GetSizePixel() ); Point aPos( aEntryRect.Left(), aEntryRect.Bottom() - TOP_OFFSET - aPinBoxSize.Height() ); @@ -378,7 +388,7 @@ void ClientBox::RecalcAll() aPos = Point( aEntryRect.Left() + GetTextWidth( sPinText ), aEntryRect.Bottom() - TOP_OFFSET - aPinBoxSize.Height() ); - m_aPinBox.SetPosPixel( aPos ); + m_aPinBox->SetPosPixel( aPos ); // The text would have it's TOP aligned with the top of // the pin box -- hence we push it down to align baselines. m_sPinTextRect += Point( 0, 4 ); @@ -386,11 +396,11 @@ void ClientBox::RecalcAll() else { aPos += Point( 20, 0 ); - m_aDeauthoriseButton.SetPosPixel( aPos ); + m_aDeauthoriseButton->SetPosPixel( aPos ); } - m_aPinBox.Show( !bAlreadyAuthorised ); - m_aDeauthoriseButton.Show( bAlreadyAuthorised ); + m_aPinBox->Show( !bAlreadyAuthorised ); + m_aDeauthoriseButton->Show( bAlreadyAuthorised ); if ( m_bAdjustActive ) { @@ -424,7 +434,7 @@ void ClientBox::RecalcAll() } if ( m_bHasScrollBar ) - m_aScrollBar.SetThumbPos( m_nTopIndex ); + m_aScrollBar->SetThumbPos( m_nTopIndex ); } } @@ -487,7 +497,7 @@ void ClientBox::Paint( const Rectangle &/*rPaintRect*/ ) Size aSize( GetOutputSizePixel() ); if ( m_bHasScrollBar ) - aSize.Width() -= m_aScrollBar.GetSizePixel().Width(); + aSize.Width() -= m_aScrollBar->GetSizePixel().Width(); const ::osl::MutexGuard aGuard( m_entriesMutex ); @@ -525,20 +535,20 @@ void ClientBox::SetupScrollBar() if ( m_nTopIndex + aSize.Height() > nTotalHeight ) m_nTopIndex = nTotalHeight - aSize.Height(); - m_aScrollBar.SetPosSizePixel( Point( aSize.Width() - nScrBarSize, 0 ), + m_aScrollBar->SetPosSizePixel( Point( aSize.Width() - nScrBarSize, 0 ), Size( nScrBarSize, aSize.Height() ) ); - m_aScrollBar.SetRangeMax( nTotalHeight ); - m_aScrollBar.SetVisibleSize( aSize.Height() ); - m_aScrollBar.SetPageSize( ( aSize.Height() * 4 ) / 5 ); - m_aScrollBar.SetLineSize( m_nStdHeight ); - m_aScrollBar.SetThumbPos( m_nTopIndex ); + m_aScrollBar->SetRangeMax( nTotalHeight ); + m_aScrollBar->SetVisibleSize( aSize.Height() ); + m_aScrollBar->SetPageSize( ( aSize.Height() * 4 ) / 5 ); + m_aScrollBar->SetLineSize( m_nStdHeight ); + m_aScrollBar->SetThumbPos( m_nTopIndex ); if ( !m_bHasScrollBar ) - m_aScrollBar.Show(); + m_aScrollBar->Show(); } else if ( m_bHasScrollBar ) { - m_aScrollBar.Hide(); + m_aScrollBar->Hide(); m_nTopIndex = 0; } @@ -567,7 +577,7 @@ long ClientBox::PointToPos( const Point& rPos ) OUString ClientBox::getPin() { - return OUString::number( m_aPinBox.GetValue() ); + return OUString::number( m_aPinBox->GetValue() ); } void ClientBox::MouseButtonDown( const MouseEvent& rMEvt ) @@ -608,11 +618,11 @@ bool ClientBox::Notify( NotifyEvent& rNEvt ) const CommandWheelData* pData = rNEvt.GetCommandEvent()->GetWheelData(); if ( pData->GetMode() == CommandWheelMode::SCROLL ) { - long nThumbPos = m_aScrollBar.GetThumbPos(); + long nThumbPos = m_aScrollBar->GetThumbPos(); if ( pData->GetDelta() < 0 ) - m_aScrollBar.DoScroll( nThumbPos + m_nStdHeight ); + m_aScrollBar->DoScroll( nThumbPos + m_nStdHeight ); else - m_aScrollBar.DoScroll( nThumbPos - m_nStdHeight ); + m_aScrollBar->DoScroll( nThumbPos - m_nStdHeight ); bHandled = true; } } @@ -702,13 +712,13 @@ void ClientBox::populateEntries() void ClientBox::DoScroll( long nDelta ) { m_nTopIndex += nDelta; - Point aNewSBPt( m_aScrollBar.GetPosPixel() ); + Point aNewSBPt( m_aScrollBar->GetPosPixel() ); Rectangle aScrRect( Point(), GetOutputSizePixel() ); - aScrRect.Right() -= m_aScrollBar.GetSizePixel().Width(); + aScrRect.Right() -= m_aScrollBar->GetSizePixel().Width(); Scroll( 0, -nDelta, aScrRect ); - m_aScrollBar.SetPosPixel( aNewSBPt ); + m_aScrollBar->SetPosPixel( aNewSBPt ); } IMPL_LINK( ClientBox, ScrollHdl, ScrollBar*, pScrBar ) diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.hxx b/sd/source/ui/dlg/RemoteDialogClientBox.hxx index 1dc481ebd79a..c40ac96212c1 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.hxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.hxx @@ -101,11 +101,11 @@ class ClientBox: Link m_aClickHdl; Link m_aDeauthoriseHdl; - NumericBox m_aPinBox; - PushButton m_aDeauthoriseButton; - Rectangle m_sPinTextRect; + VclPtr<NumericBox> m_aPinBox; + VclPtr<PushButton> m_aDeauthoriseButton; + Rectangle m_sPinTextRect; - ScrollBar m_aScrollBar; + VclPtr<ScrollBar> m_aScrollBar; com::sun::star::uno::Reference< ClientRemovedListener > m_xRemoveListener; @@ -136,7 +136,8 @@ class ClientBox: public: ClientBox( vcl::Window* pParent, WinBits nStyle ); - virtual ~ClientBox(); + virtual ~ClientBox(); + virtual void dispose() SAL_OVERRIDE; void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; void Paint( const Rectangle &rPaintRect ) SAL_OVERRIDE; diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 2881e392c239..2be1601d3c67 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -206,6 +206,11 @@ AnimationWindow::AnimationWindow(SfxBindings* pInBindings, SfxChildWindow *pCW, AnimationWindow::~AnimationWindow() { + dispose(); +} + +void AnimationWindow::dispose() +{ delete pControllerItem; for (size_t i = 0; i < m_FrameList.size(); ++i) @@ -220,6 +225,8 @@ AnimationWindow::~AnimationWindow() delete pMyDoc; delete m_pCtlDisplay; + + SfxDockingWindow::dispose(); } IMPL_LINK_NOARG(AnimationWindow, ClickFirstHdl) diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx index 6f1ebc68b54d..e36c5648c987 100644 --- a/sd/source/ui/dlg/brkdlg.cxx +++ b/sd/source/ui/dlg/brkdlg.cxx @@ -67,8 +67,14 @@ BreakDlg::BreakDlg( BreakDlg::~BreakDlg() { + dispose(); +} + +void BreakDlg::dispose() +{ delete mpProgress; delete pProgrInfo; + SfxModalDialog::dispose(); } // Control-Handler for cancel button diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx index c0b9b05f0b02..a66d6a041807 100644 --- a/sd/source/ui/dlg/copydlg.cxx +++ b/sd/source/ui/dlg/copydlg.cxx @@ -84,6 +84,11 @@ CopyDlg::CopyDlg(vcl::Window* pWindow, const SfxItemSet& rInAttrs, CopyDlg::~CopyDlg() { + dispose(); +} + +void CopyDlg::dispose() +{ OUString& rStr = GetExtraData(); rStr = OUString::number(m_pNumFldCopies->GetValue()); @@ -108,6 +113,8 @@ CopyDlg::~CopyDlg() rStr += OUString( TOKEN ); rStr += OUString::number( m_pLbEndColor->GetSelectEntryColor().GetColor() ); + + SfxModalDialog::dispose(); } /** diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 8ed91666fbd3..757028a0f4fc 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -1769,7 +1769,13 @@ IMPL_LINK_NOARG(AssistentDlg, FinishHdl) AssistentDlg::~AssistentDlg() { + dispose(); +} + +void AssistentDlg::dispose() +{ delete mpImpl; + ModalDialog::dispose(); } SfxObjectShellLock AssistentDlg::GetDocument() diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx index 5eaab0185c9f..331c1afb0ddb 100644 --- a/sd/source/ui/dlg/dlgassim.cxx +++ b/sd/source/ui/dlg/dlgassim.cxx @@ -78,7 +78,13 @@ IMPL_LINK_NOARG(SdPageListControl, CheckButtonClickHdl) SdPageListControl::~SdPageListControl() { + dispose(); +} + +void SdPageListControl::dispose() +{ delete m_pCheckButton; + SvTreeListBox::dispose(); } void SdPageListControl::Clear() diff --git a/sd/source/ui/dlg/dlgassim.hxx b/sd/source/ui/dlg/dlgassim.hxx index 8e966f856323..ee39788cb136 100644 --- a/sd/source/ui/dlg/dlgassim.hxx +++ b/sd/source/ui/dlg/dlgassim.hxx @@ -37,6 +37,7 @@ private: public: SdPageListControl( vcl::Window* pParent, const WinBits nStyle ); virtual ~SdPageListControl(); + virtual void dispose() SAL_OVERRIDE; void Fill( SdDrawDocument* pDoc ); void Clear(); diff --git a/sd/source/ui/dlg/dlgctrls.cxx b/sd/source/ui/dlg/dlgctrls.cxx index 10923287ac1b..0fc35a678fc2 100644 --- a/sd/source/ui/dlg/dlgctrls.cxx +++ b/sd/source/ui/dlg/dlgctrls.cxx @@ -40,7 +40,13 @@ FadeEffectLB::FadeEffectLB(vcl::Window* pParent, WinBits nStyle) FadeEffectLB::~FadeEffectLB() { + dispose(); +} + +void FadeEffectLB::dispose() +{ delete mpImpl; + ListBox::dispose(); } void FadeEffectLB::Fill() diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx index c3a77103b247..b8fb42d9a9c7 100644 --- a/sd/source/ui/dlg/dlgolbul.cxx +++ b/sd/source/ui/dlg/dlgolbul.cxx @@ -138,7 +138,13 @@ OutlineBulletDlg::OutlineBulletDlg( OutlineBulletDlg::~OutlineBulletDlg() { + dispose(); +} + +void OutlineBulletDlg::dispose() +{ delete pOutputSet; + SfxTabDialog::dispose(); } void OutlineBulletDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx index e3f9a2a394c5..2929f46bed55 100644 --- a/sd/source/ui/dlg/docprev.cxx +++ b/sd/source/ui/dlg/docprev.cxx @@ -83,7 +83,13 @@ SdDocPreviewWin::SdDocPreviewWin( vcl::Window* pParent, const WinBits nStyle ) SdDocPreviewWin::~SdDocPreviewWin() { + dispose(); +} + +void SdDocPreviewWin::dispose() +{ delete pMetaFile; + Control::dispose(); } Size SdDocPreviewWin::GetOptimalSize() const diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx index e7590357f67e..b7c95485fff2 100644 --- a/sd/source/ui/dlg/headerfooterdlg.cxx +++ b/sd/source/ui/dlg/headerfooterdlg.cxx @@ -240,8 +240,14 @@ HeaderFooterDialog::HeaderFooterDialog( ViewShell* pViewShell, vcl::Window* pPar HeaderFooterDialog::~HeaderFooterDialog() { + dispose(); +} + +void HeaderFooterDialog::dispose() +{ delete mpSlideTabPage; delete mpNotesHandoutsTabPage; + TabDialog::dispose(); } IMPL_LINK( HeaderFooterDialog, ActivatePageHdl, TabControl *, pTabCtrl ) diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index f7b479162026..60e107404917 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -68,9 +68,9 @@ SdNavigatorWin::SdNavigatorWin( SfxBindings* pInBindings, const UpdateRequestFunctor& rUpdateRequest) : vcl::Window( pParent, rSdResId ) - , maToolbox ( this, SdResId( 1 ) ) - , maTlbObjects( this, SdResId( TLB_OBJECTS ) ) - , maLbDocs ( this, SdResId( LB_DOCS ) ) + , maToolbox ( new ToolBox( this, SdResId( 1 ) ) ) + , maTlbObjects( new SdPageObjsTLB( this, SdResId( TLB_OBJECTS ) ) ) + , maLbDocs ( new ListBox( this, SdResId( LB_DOCS ) ) ) , mpChildWinContext( pChWinCtxt ) , mbDocImported ( false ) // On changes of the DragType: adjust SelectionMode of TLB! @@ -78,58 +78,58 @@ SdNavigatorWin::SdNavigatorWin( , mpBindings ( pInBindings ) , maImageList ( SdResId( IL_NAVIGATR ) ) { - maTlbObjects.SetViewFrame( mpBindings->GetDispatcher()->GetFrame() ); + maTlbObjects->SetViewFrame( mpBindings->GetDispatcher()->GetFrame() ); FreeResource(); - maTlbObjects.SetAccessibleName(SD_RESSTR(STR_OBJECTS_TREE)); + maTlbObjects->SetAccessibleName(SD_RESSTR(STR_OBJECTS_TREE)); mpNavigatorCtrlItem = new SdNavigatorControllerItem( SID_NAVIGATOR_STATE, this, mpBindings, rUpdateRequest); mpPageNameCtrlItem = new SdPageNameControllerItem( SID_NAVIGATOR_PAGENAME, this, mpBindings, rUpdateRequest); ApplyImageList(); // load images *before* calculating sizes to get something useful !!! - Size aTbxSize( maToolbox.CalcWindowSizePixel() ); - maToolbox.SetOutputSizePixel( aTbxSize ); - maToolbox.SetSelectHdl( LINK( this, SdNavigatorWin, SelectToolboxHdl ) ); - maToolbox.SetClickHdl( LINK( this, SdNavigatorWin, ClickToolboxHdl ) ); - maToolbox.SetDropdownClickHdl( LINK(this, SdNavigatorWin, DropdownClickToolBoxHdl) ); - maToolbox.SetItemBits( TBI_DRAGTYPE, maToolbox.GetItemBits( TBI_DRAGTYPE ) | ToolBoxItemBits::DROPDOWNONLY ); + Size aTbxSize( maToolbox->CalcWindowSizePixel() ); + maToolbox->SetOutputSizePixel( aTbxSize ); + maToolbox->SetSelectHdl( LINK( this, SdNavigatorWin, SelectToolboxHdl ) ); + maToolbox->SetClickHdl( LINK( this, SdNavigatorWin, ClickToolboxHdl ) ); + maToolbox->SetDropdownClickHdl( LINK(this, SdNavigatorWin, DropdownClickToolBoxHdl) ); + maToolbox->SetItemBits( TBI_DRAGTYPE, maToolbox->GetItemBits( TBI_DRAGTYPE ) | ToolBoxItemBits::DROPDOWNONLY ); // Shape filter drop down menu. - maToolbox.SetItemBits( + maToolbox->SetItemBits( TBI_SHAPE_FILTER, - maToolbox.GetItemBits(TBI_SHAPE_FILTER) | ToolBoxItemBits::DROPDOWNONLY); + maToolbox->GetItemBits(TBI_SHAPE_FILTER) | ToolBoxItemBits::DROPDOWNONLY); // TreeListBox // set position below toolbox - long nListboxYPos = maToolbox.GetPosPixel().Y() + maToolbox.GetSizePixel().Height() + 4; - maTlbObjects.setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); - maTlbObjects.SetDoubleClickHdl( LINK( this, SdNavigatorWin, ClickObjectHdl ) ); - maTlbObjects.SetSelectionMode( SINGLE_SELECTION ); + long nListboxYPos = maToolbox->GetPosPixel().Y() + maToolbox->GetSizePixel().Height() + 4; + maTlbObjects->setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); + maTlbObjects->SetDoubleClickHdl( LINK( this, SdNavigatorWin, ClickObjectHdl ) ); + maTlbObjects->SetSelectionMode( SINGLE_SELECTION ); // set focus to listbox, otherwise it is in the toolbox which is only useful // for keyboard navigation - maTlbObjects.GrabFocus(); - maTlbObjects.SetSdNavigatorWinFlag(true); + maTlbObjects->GrabFocus(); + maTlbObjects->SetSdNavigatorWinFlag(true); // DragTypeListBox - maLbDocs.SetSelectHdl( LINK( this, SdNavigatorWin, SelectDocumentHdl ) ); + maLbDocs->SetSelectHdl( LINK( this, SdNavigatorWin, SelectDocumentHdl ) ); // set position below treelistbox - nListboxYPos = maTlbObjects.GetPosPixel().Y() + maTlbObjects.GetSizePixel().Height() + 4; - maLbDocs.setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); + nListboxYPos = maTlbObjects->GetPosPixel().Y() + maTlbObjects->GetSizePixel().Height() + 4; + maLbDocs->setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); // assure that tool box is at least as wide as the tree list box { - const Size aTlbSize( maTlbObjects.GetOutputSizePixel() ); + const Size aTlbSize( maTlbObjects->GetOutputSizePixel() ); if ( aTlbSize.Width() > aTbxSize.Width() ) { - maToolbox.setPosSizePixel( 0, 0, aTlbSize.Width(), 0, WINDOW_POSSIZE_WIDTH ); - aTbxSize = maToolbox.GetOutputSizePixel(); + maToolbox->setPosSizePixel( 0, 0, aTlbSize.Width(), 0, WINDOW_POSSIZE_WIDTH ); + aTbxSize = maToolbox->GetOutputSizePixel(); } } // set min outputsize after all sizes are known - const long nFullHeight = nListboxYPos + maLbDocs.GetSizePixel().Height() + 4; + const long nFullHeight = nListboxYPos + maLbDocs->GetSizePixel().Height() + 4; maSize = GetOutputSizePixel(); if( maSize.Height() < nFullHeight ) { @@ -137,7 +137,7 @@ SdNavigatorWin::SdNavigatorWin( SetOutputSizePixel( maSize ); } maMinSize = maSize; - const long nMinWidth = 2*maToolbox.GetPosPixel().X() + aTbxSize.Width(); // never clip the toolbox + const long nMinWidth = 2*maToolbox->GetPosPixel().X() + aTbxSize.Width(); // never clip the toolbox if( nMinWidth > maMinSize.Width() ) maMinSize.Width() = nMinWidth; maMinSize.Height() -= 40; @@ -152,8 +152,17 @@ SdNavigatorWin::SdNavigatorWin( SdNavigatorWin::~SdNavigatorWin() { + dispose(); +} + +void SdNavigatorWin::dispose() +{ delete mpNavigatorCtrlItem; delete mpPageNameCtrlItem; + maToolbox.disposeAndClear(); + maTlbObjects.disposeAndClear(); + maLbDocs.disposeAndClear(); + vcl::Window::dispose(); } //when object is marked , fresh the corresponding entry tree . @@ -163,17 +172,17 @@ void SdNavigatorWin::FreshTree( const SdDrawDocument* pDoc ) sd::DrawDocShell* pDocShell = pNonConstDoc->GetDocSh(); OUString aDocShName( pDocShell->GetName() ); OUString aDocName = pDocShell->GetMedium()->GetName(); - maTlbObjects.SetSaveTreeItemStateFlag(true); //Added by yanjun for sym2_6385 - maTlbObjects.Clear(); - maTlbObjects.Fill( pDoc, false, aDocName ); // Nur normale Seiten - maTlbObjects.SetSaveTreeItemStateFlag(false); //Added by yanjun for sym2_6385 + maTlbObjects->SetSaveTreeItemStateFlag(true); //Added by yanjun for sym2_6385 + maTlbObjects->Clear(); + maTlbObjects->Fill( pDoc, false, aDocName ); // Nur normale Seiten + maTlbObjects->SetSaveTreeItemStateFlag(false); //Added by yanjun for sym2_6385 RefreshDocumentLB(); - maLbDocs.SelectEntry( aDocShName ); + maLbDocs->SelectEntry( aDocShName ); } void SdNavigatorWin::FreshEntry( ) { - maTlbObjects.FreshCurEntry(); + maTlbObjects->FreshCurEntry(); } void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc ) @@ -189,35 +198,35 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc ) { ::sd::FrameView* pFrameView = pViewShell->GetFrameView(); if (pFrameView != NULL) - maTlbObjects.SetShowAllShapes(pFrameView->IsNavigatorShowingAllShapes(), false); + maTlbObjects->SetShowAllShapes(pFrameView->IsNavigatorShowingAllShapes(), false); } // Disable the shape filter drop down menu when there is a running slide // show. if (pViewShell!=NULL && sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() )) - maToolbox.EnableItem(TBI_SHAPE_FILTER, false); + maToolbox->EnableItem(TBI_SHAPE_FILTER, false); else - maToolbox.EnableItem(TBI_SHAPE_FILTER); + maToolbox->EnableItem(TBI_SHAPE_FILTER); - if( !maTlbObjects.IsEqualToDoc( pDoc ) ) + if( !maTlbObjects->IsEqualToDoc( pDoc ) ) { OUString aDocName = pDocShell->GetMedium()->GetName(); - maTlbObjects.Clear(); - maTlbObjects.Fill( pDoc, false, aDocName ); // only normal pages + maTlbObjects->Clear(); + maTlbObjects->Fill( pDoc, false, aDocName ); // only normal pages RefreshDocumentLB(); - maLbDocs.SelectEntry( aDocShName ); + maLbDocs->SelectEntry( aDocShName ); } else { - maLbDocs.SetNoSelection(); - maLbDocs.SelectEntry( aDocShName ); + maLbDocs->SetNoSelection(); + maLbDocs->SelectEntry( aDocShName ); // commented in order to fix 30246 -// if( maLbDocs.GetSelectEntryCount() == 0 ) +// if( maLbDocs->GetSelectEntryCount() == 0 ) { RefreshDocumentLB(); - maLbDocs.SelectEntry( aDocShName ); + maLbDocs->SelectEntry( aDocShName ); } } @@ -235,7 +244,7 @@ NavigatorDragType SdNavigatorWin::GetNavigatorDragType() NavigatorDragType eDT = meDragType; NavDocInfo* pInfo = GetDocInfo(); - if( ( eDT == NAVIGATOR_DRAGTYPE_LINK ) && ( ( pInfo && !pInfo->HasName() ) || !maTlbObjects.IsLinkableSelected() ) ) + if( ( eDT == NAVIGATOR_DRAGTYPE_LINK ) && ( ( pInfo && !pInfo->HasName() ) || !maTlbObjects->IsLinkableSelected() ) ) eDT = NAVIGATOR_DRAGTYPE_NONE; return eDT; @@ -252,7 +261,7 @@ sd::DrawDocShell* SdNavigatorWin::GetDrawDocShell( const SdDrawDocument* pDoc ) IMPL_LINK_NOARG(SdNavigatorWin, SelectToolboxHdl) { - sal_uInt16 nId = maToolbox.GetCurItemId(); + sal_uInt16 nId = maToolbox->GetCurItemId(); sal_uInt16 nSId = 0; PageJump ePage = PAGE_NONE; @@ -307,7 +316,7 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickToolboxHdl) IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox ) { - sal_uInt16 nId = maToolbox.GetCurItemId(); + sal_uInt16 nId = maToolbox->GetCurItemId(); switch( nId ) { @@ -339,7 +348,7 @@ IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox ) } NavDocInfo* pInfo = GetDocInfo(); - if( ( pInfo && !pInfo->HasName() ) || !maTlbObjects.IsLinkableSelected() ) + if( ( pInfo && !pInfo->HasName() ) || !maTlbObjects->IsLinkableSelected() ) { pMenu->EnableItem( NAVIGATOR_DRAGTYPE_LINK, false ); pMenu->EnableItem( NAVIGATOR_DRAGTYPE_URL, false ); @@ -349,7 +358,7 @@ IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox ) pMenu->CheckItem( (sal_uInt16)meDragType ); pMenu->SetSelectHdl( LINK( this, SdNavigatorWin, MenuSelectHdl ) ); - pMenu->Execute( this, maToolbox.GetItemRect( nId ), POPUPMENU_EXECUTE_DOWN ); + pMenu->Execute( this, maToolbox->GetItemRect( nId ), POPUPMENU_EXECUTE_DOWN ); pBox->EndSelection(); delete pMenu; } @@ -366,13 +375,13 @@ IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox ) nShowAllShapesFilter, SD_RESSTR(STR_NAVIGATOR_SHOW_ALL_SHAPES)); - if (maTlbObjects.GetShowAllShapes()) + if (maTlbObjects->GetShowAllShapes()) pMenu->CheckItem(nShowAllShapesFilter); else pMenu->CheckItem(nShowNamedShapesFilter); pMenu->SetSelectHdl( LINK( this, SdNavigatorWin, ShapeFilterCallback ) ); - pMenu->Execute( this, maToolbox.GetItemRect( nId ), POPUPMENU_EXECUTE_DOWN ); + pMenu->Execute( this, maToolbox->GetItemRect( nId ), POPUPMENU_EXECUTE_DOWN ); pBox->EndSelection(); delete pMenu; } @@ -383,14 +392,14 @@ IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox ) IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl) { - if( !mbDocImported || maLbDocs.GetSelectEntryPos() != 0 ) + if( !mbDocImported || maLbDocs->GetSelectEntryPos() != 0 ) { NavDocInfo* pInfo = GetDocInfo(); // if it is the active window, we jump to the page if( pInfo && pInfo->IsActive() ) { - OUString aStr( maTlbObjects.GetSelectEntry() ); + OUString aStr( maTlbObjects->GetSelectEntry() ); if( !aStr.isEmpty() ) { @@ -398,7 +407,7 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl) mpBindings->GetDispatcher()->Execute( SID_NAVIGATOR_OBJECT, SfxCallMode::SLOT | SfxCallMode::RECORD, &aItem, 0L ); //set sign variable - maTlbObjects.MarkCurEntry(aStr); + maTlbObjects->MarkCurEntry(aStr); // moved here from SetGetFocusHdl. Reset the // focus only if something has been selected in the @@ -419,8 +428,8 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl) IMPL_LINK_NOARG(SdNavigatorWin, SelectDocumentHdl) { - OUString aStrLb = maLbDocs.GetSelectEntry(); - long nPos = maLbDocs.GetSelectEntryPos(); + OUString aStrLb = maLbDocs->GetSelectEntry(); + long nPos = maLbDocs->GetSelectEntryPos(); bool bFound = false; ::sd::DrawDocShell* pDocShell = NULL; NavDocInfo* pInfo = GetDocInfo(); @@ -441,18 +450,18 @@ IMPL_LINK_NOARG(SdNavigatorWin, SelectDocumentHdl) if( bFound ) { SdDrawDocument* pDoc = pDocShell->GetDoc(); - if( !maTlbObjects.IsEqualToDoc( pDoc ) ) + if( !maTlbObjects->IsEqualToDoc( pDoc ) ) { SdDrawDocument* pNonConstDoc = (SdDrawDocument*) pDoc; // const as const can... ::sd::DrawDocShell* pNCDocShell = pNonConstDoc->GetDocSh(); OUString aDocName = pNCDocShell->GetMedium()->GetName(); - maTlbObjects.Clear(); - maTlbObjects.Fill( pDoc, false, aDocName ); // only normal pages + maTlbObjects->Clear(); + maTlbObjects->Fill( pDoc, false, aDocName ); // only normal pages } } // check if link or url is possible - if( ( pInfo && !pInfo->HasName() ) || !maTlbObjects.IsLinkableSelected() || ( meDragType != NAVIGATOR_DRAGTYPE_EMBEDDED ) ) + if( ( pInfo && !pInfo->HasName() ) || !maTlbObjects->IsLinkableSelected() || ( meDragType != NAVIGATOR_DRAGTYPE_EMBEDDED ) ) { meDragType = NAVIGATOR_DRAGTYPE_EMBEDDED; SetDragImage(); @@ -484,13 +493,13 @@ IMPL_LINK( SdNavigatorWin, MenuSelectHdl, Menu *, pMenu ) if( meDragType == NAVIGATOR_DRAGTYPE_URL ) { // patch, prevents endless loop - if( maTlbObjects.GetSelectionCount() > 1 ) - maTlbObjects.SelectAll( false ); + if( maTlbObjects->GetSelectionCount() > 1 ) + maTlbObjects->SelectAll( false ); - maTlbObjects.SetSelectionMode( SINGLE_SELECTION ); + maTlbObjects->SetSelectionMode( SINGLE_SELECTION ); } else - maTlbObjects.SetSelectionMode( MULTIPLE_SELECTION ); + maTlbObjects->SetSelectionMode( MULTIPLE_SELECTION ); } } return 0; @@ -500,7 +509,7 @@ IMPL_LINK( SdNavigatorWin, ShapeFilterCallback, Menu *, pMenu ) { if (pMenu != NULL) { - bool bShowAllShapes (maTlbObjects.GetShowAllShapes()); + bool bShowAllShapes (maTlbObjects->GetShowAllShapes()); sal_uInt16 nMenuId (pMenu->GetCurItemId()); switch (nMenuId) { @@ -518,7 +527,7 @@ IMPL_LINK( SdNavigatorWin, ShapeFilterCallback, Menu *, pMenu ) break; } - maTlbObjects.SetShowAllShapes(bShowAllShapes, true); + maTlbObjects->SetShowAllShapes(bShowAllShapes, true); // Remember the selection in the FrameView. NavDocInfo* pInfo = GetDocInfo(); @@ -554,26 +563,26 @@ void SdNavigatorWin::Resize() aDiffSize.Height() = aWinSize.Height() - maSize.Height(); // change size of Toolbox - Size aObjSize( maToolbox.GetOutputSizePixel() ); + Size aObjSize( maToolbox->GetOutputSizePixel() ); aObjSize.Width() += aDiffSize.Width(); - maToolbox.SetOutputSizePixel( aObjSize ); + maToolbox->SetOutputSizePixel( aObjSize ); // change size of TreeLB - aObjSize = maTlbObjects.GetSizePixel(); + aObjSize = maTlbObjects->GetSizePixel(); aObjSize.Width() += aDiffSize.Width(); - aObjSize.Height() = maLbDocs.GetPosPixel().Y() + aDiffSize.Height() - - maTlbObjects.GetPosPixel().Y() - 4; - maTlbObjects.SetSizePixel( aObjSize ); + aObjSize.Height() = maLbDocs->GetPosPixel().Y() + aDiffSize.Height() - + maTlbObjects->GetPosPixel().Y() - 4; + maTlbObjects->SetSizePixel( aObjSize ); Point aPt( 0, aDiffSize.Height() ); // move other controls (DocumentLB) - maLbDocs.Hide(); - aObjSize = maLbDocs.GetOutputSizePixel(); + maLbDocs->Hide(); + aObjSize = maLbDocs->GetOutputSizePixel(); aObjSize.Width() += aDiffSize.Width(); - maLbDocs.SetPosPixel( maLbDocs.GetPosPixel() + aPt ); - maLbDocs.SetOutputSizePixel( aObjSize ); - maLbDocs.Show(); + maLbDocs->SetPosPixel( maLbDocs->GetPosPixel() + aPt ); + maLbDocs->SetOutputSizePixel( aObjSize ); + maLbDocs->Show(); maSize = aWinSize; } @@ -623,19 +632,19 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName) if (pMedium->IsStorage()) { // Now depending on mode: - // maTlbObjects.SetSelectionMode(MULTIPLE_SELECTION); + // maTlbObjects->SetSelectionMode(MULTIPLE_SELECTION); // handover of ownership of pMedium; - SdDrawDocument* pDropDoc = maTlbObjects.GetBookmarkDoc(pMedium); + SdDrawDocument* pDropDoc = maTlbObjects->GetBookmarkDoc(pMedium); if (pDropDoc) { - maTlbObjects.Clear(); + maTlbObjects->Clear(); maDropFileName = aFileName; - if( !maTlbObjects.IsEqualToDoc( pDropDoc ) ) + if( !maTlbObjects->IsEqualToDoc( pDropDoc ) ) { // only normal pages - maTlbObjects.Fill(pDropDoc, false, maDropFileName); + maTlbObjects->Fill(pDropDoc, false, maDropFileName); RefreshDocumentLB( &maDropFileName ); } } @@ -662,28 +671,28 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName ) if( pDocName ) { if( mbDocImported ) - maLbDocs.RemoveEntry( 0 ); + maLbDocs->RemoveEntry( 0 ); - maLbDocs.InsertEntry( *pDocName, 0 ); + maLbDocs->InsertEntry( *pDocName, 0 ); mbDocImported = true; } else { - nPos = maLbDocs.GetSelectEntryPos(); + nPos = maLbDocs->GetSelectEntryPos(); if( nPos == LISTBOX_ENTRY_NOTFOUND ) nPos = 0; OUString aStr; if( mbDocImported ) - aStr = maLbDocs.GetEntry( 0 ); + aStr = maLbDocs->GetEntry( 0 ); - maLbDocs.Clear(); + maLbDocs->Clear(); // delete list of DocInfos maDocList.clear(); if( mbDocImported ) - maLbDocs.InsertEntry( aStr, 0 ); + maLbDocs->InsertEntry( aStr, 0 ); ::sd::DrawDocShell* pCurrentDocShell = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() ); @@ -707,7 +716,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName ) // is shown in url notation! aStr = pDocShell->GetName(); - maLbDocs.InsertEntry( aStr, LISTBOX_APPEND ); + maLbDocs->InsertEntry( aStr, LISTBOX_APPEND ); if( pDocShell == pCurrentDocShell ) aInfo.SetActive(); @@ -719,7 +728,7 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* pDocName ) pSfxDocShell = SfxObjectShell::GetNext( *pSfxDocShell, 0, false ); } } - maLbDocs.SelectEntryPos( nPos ); + maLbDocs->SelectEntryPos( nPos ); } sal_uInt16 SdNavigatorWin::GetDragTypeSdResId( NavigatorDragType eDT, bool bImage ) @@ -741,7 +750,7 @@ sal_uInt16 SdNavigatorWin::GetDragTypeSdResId( NavigatorDragType eDT, bool bImag NavDocInfo* SdNavigatorWin::GetDocInfo() { - sal_uInt32 nPos = maLbDocs.GetSelectEntryPos(); + sal_uInt32 nPos = maLbDocs->GetSelectEntryPos(); if( mbDocImported ) { @@ -834,14 +843,14 @@ void SdNavigatorWin::DataChanged( const DataChangedEvent& rDCEvt ) void SdNavigatorWin::SetDragImage() { - maToolbox.SetItemImage( TBI_DRAGTYPE, maToolbox.GetImageList().GetImage( GetDragTypeSdResId( meDragType, true ) ) ); + maToolbox->SetItemImage( TBI_DRAGTYPE, maToolbox->GetImageList().GetImage( GetDragTypeSdResId( meDragType, true ) ) ); } void SdNavigatorWin::ApplyImageList() { - maToolbox.SetImageList( maImageList ); - maToolbox.SetItemImage(TBI_SHAPE_FILTER, Image(BitmapEx(SdResId(BMP_GRAPHIC)))); + maToolbox->SetImageList( maImageList ); + maToolbox->SetItemImage(TBI_SHAPE_FILTER, Image(BitmapEx(SdResId(BMP_GRAPHIC)))); SetDragImage(); } @@ -871,17 +880,17 @@ void SdNavigatorControllerItem::StateChanged( sal_uInt16 nSId, // pen if( nState & NAVBTN_PEN_ENABLED && - !pNavigatorWin->maToolbox.IsItemEnabled( TBI_PEN ) ) - pNavigatorWin->maToolbox.EnableItem( TBI_PEN ); + !pNavigatorWin->maToolbox->IsItemEnabled( TBI_PEN ) ) + pNavigatorWin->maToolbox->EnableItem( TBI_PEN ); if( nState & NAVBTN_PEN_DISABLED && - pNavigatorWin->maToolbox.IsItemEnabled( TBI_PEN ) ) - pNavigatorWin->maToolbox.EnableItem( TBI_PEN, false ); + pNavigatorWin->maToolbox->IsItemEnabled( TBI_PEN ) ) + pNavigatorWin->maToolbox->EnableItem( TBI_PEN, false ); if( nState & NAVBTN_PEN_CHECKED && - !pNavigatorWin->maToolbox.IsItemChecked( TBI_PEN ) ) - pNavigatorWin->maToolbox.CheckItem( TBI_PEN ); + !pNavigatorWin->maToolbox->IsItemChecked( TBI_PEN ) ) + pNavigatorWin->maToolbox->CheckItem( TBI_PEN ); if( nState & NAVBTN_PEN_UNCHECKED && - pNavigatorWin->maToolbox.IsItemChecked( TBI_PEN ) ) - pNavigatorWin->maToolbox.CheckItem( TBI_PEN, false ); + pNavigatorWin->maToolbox->IsItemChecked( TBI_PEN ) ) + pNavigatorWin->maToolbox->CheckItem( TBI_PEN, false ); // only if doc in LB is the active NavDocInfo* pInfo = pNavigatorWin->GetDocInfo(); @@ -889,35 +898,35 @@ void SdNavigatorControllerItem::StateChanged( sal_uInt16 nSId, { // First if( nState & NAVBTN_FIRST_ENABLED && - !pNavigatorWin->maToolbox.IsItemEnabled( TBI_FIRST ) ) - pNavigatorWin->maToolbox.EnableItem( TBI_FIRST ); + !pNavigatorWin->maToolbox->IsItemEnabled( TBI_FIRST ) ) + pNavigatorWin->maToolbox->EnableItem( TBI_FIRST ); if( nState & NAVBTN_FIRST_DISABLED && - pNavigatorWin->maToolbox.IsItemEnabled( TBI_FIRST ) ) - pNavigatorWin->maToolbox.EnableItem( TBI_FIRST, false ); + pNavigatorWin->maToolbox->IsItemEnabled( TBI_FIRST ) ) + pNavigatorWin->maToolbox->EnableItem( TBI_FIRST, false ); // Prev if( nState & NAVBTN_PREV_ENABLED && - !pNavigatorWin->maToolbox.IsItemEnabled( TBI_PREVIOUS ) ) - pNavigatorWin->maToolbox.EnableItem( TBI_PREVIOUS ); + !pNavigatorWin->maToolbox->IsItemEnabled( TBI_PREVIOUS ) ) + pNavigatorWin->maToolbox->EnableItem( TBI_PREVIOUS ); if( nState & NAVBTN_PREV_DISABLED && - pNavigatorWin->maToolbox.IsItemEnabled( TBI_PREVIOUS ) ) - pNavigatorWin->maToolbox.EnableItem( TBI_PREVIOUS, false ); + pNavigatorWin->maToolbox->IsItemEnabled( TBI_PREVIOUS ) ) + pNavigatorWin->maToolbox->EnableItem( TBI_PREVIOUS, false ); // Last if( nState & NAVBTN_LAST_ENABLED && - !pNavigatorWin->maToolbox.IsItemEnabled( TBI_LAST ) ) - pNavigatorWin->maToolbox.EnableItem( TBI_LAST ); + !pNavigatorWin->maToolbox->IsItemEnabled( TBI_LAST ) ) + pNavigatorWin->maToolbox->EnableItem( TBI_LAST ); if( nState & NAVBTN_LAST_DISABLED && - pNavigatorWin->maToolbox.IsItemEnabled( TBI_LAST ) ) - pNavigatorWin->maToolbox.EnableItem( TBI_LAST, false ); + pNavigatorWin->maToolbox->IsItemEnabled( TBI_LAST ) ) + pNavigatorWin->maToolbox->EnableItem( TBI_LAST, false ); // Next if( nState & NAVBTN_NEXT_ENABLED && - !pNavigatorWin->maToolbox.IsItemEnabled( TBI_NEXT ) ) - pNavigatorWin->maToolbox.EnableItem( TBI_NEXT ); + !pNavigatorWin->maToolbox->IsItemEnabled( TBI_NEXT ) ) + pNavigatorWin->maToolbox->EnableItem( TBI_NEXT ); if( nState & NAVBTN_NEXT_DISABLED && - pNavigatorWin->maToolbox.IsItemEnabled( TBI_NEXT ) ) - pNavigatorWin->maToolbox.EnableItem( TBI_NEXT, false ); + pNavigatorWin->maToolbox->IsItemEnabled( TBI_NEXT ) ) + pNavigatorWin->maToolbox->EnableItem( TBI_NEXT, false ); if( nState & NAVTLB_UPDATE ) { @@ -956,14 +965,14 @@ void SdPageNameControllerItem::StateChanged( sal_uInt16 nSId, DBG_ASSERT( pStateItem, "SfxStringItem expected"); OUString aPageName = pStateItem->GetValue(); - if( !pNavigatorWin->maTlbObjects.HasSelectedChildren( aPageName ) ) + if( !pNavigatorWin->maTlbObjects->HasSelectedChildren( aPageName ) ) { - if( pNavigatorWin->maTlbObjects.GetSelectionMode() == MULTIPLE_SELECTION ) + if( pNavigatorWin->maTlbObjects->GetSelectionMode() == MULTIPLE_SELECTION ) { // because otherwise it is always additional select - pNavigatorWin->maTlbObjects.SelectAll( false ); + pNavigatorWin->maTlbObjects->SelectAll( false ); } - pNavigatorWin->maTlbObjects.SelectEntry( aPageName ); + pNavigatorWin->maTlbObjects->SelectEntry( aPageName ); } } } diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index e2330f9f6b2f..0d8520b5ad66 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -223,7 +223,13 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, SdPresLayoutTemplateDlg::~SdPresLayoutTemplateDlg() { + dispose(); +} + +void SdPresLayoutTemplateDlg::dispose() +{ delete pOutSet; + SfxTabDialog::dispose(); } void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 12c2bcb08ebc..4b8d11f6728f 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -255,11 +255,17 @@ SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, WinBits nStyle ) SdPageObjsTLB::~SdPageObjsTLB() { + dispose(); +} + +void SdPageObjsTLB::dispose() +{ if ( mpBookmarkDoc ) CloseBookmarkDoc(); else // no document was created from mpMedium, so this object is still the owner of it delete mpMedium; + SvTreeListBox::dispose(); } // helper function for GetEntryAltText and GetEntryLongDescription |