summaryrefslogtreecommitdiff
path: root/sd/source/ui/slideshow
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-28 11:41:31 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-28 15:08:48 +0100
commite8b97a52c96df9c8e8055407b1e40ed7cb9cfc67 (patch)
treeb322529f4a54a6427862cb20cb4cf87fb6a5d065 /sd/source/ui/slideshow
parent2b0be6c0e9d23f1b8535ba7033732ae2e3bfb5c9 (diff)
parent0cde74f788a054fa2b65107a030dd463b8d11c7a (diff)
Merge remote-tracking branch 'origin/feature/vclptr'
Resolve several thousand lines of conflicts. Conflicts: accessibility/source/extended/accessiblelistbox.cxx accessibility/source/standard/vclxaccessiblecombobox.cxx accessibility/source/standard/vclxaccessibledropdowncombobox.cxx accessibility/source/standard/vclxaccessibledropdownlistbox.cxx accessibility/source/standard/vclxaccessiblelistbox.cxx accessibility/source/standard/vclxaccessibletextfield.cxx basctl/source/basicide/basidesh.cxx cui/source/inc/chardlg.hxx cui/source/tabpages/tpbitmap.cxx dbaccess/source/ui/dlg/UserAdmin.cxx dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx extensions/source/propctrlr/propertyeditor.hxx extensions/source/scanner/sanedlg.cxx filter/source/pdf/impdialog.cxx include/sfx2/mgetempl.hxx include/sfx2/sidebar/SidebarToolBox.hxx include/sfx2/viewsh.hxx include/svtools/brwbox.hxx include/svtools/filectrl.hxx include/svtools/scrwin.hxx include/svx/dlgctrl.hxx include/svx/sidebar/Popup.hxx include/svx/sidebar/PopupContainer.hxx include/svx/sidebar/PopupControl.hxx include/svx/sidebar/SidebarDialControl.hxx include/svx/sidebar/ValueSetWithTextControl.hxx sc/source/ui/condformat/condformatdlgentry.cxx sc/source/ui/navipi/navipi.cxx sc/source/ui/sidebar/CellBorderStyleControl.hxx sd/source/ui/animations/CustomAnimationDialog.cxx sd/source/ui/inc/DrawViewShell.hxx sd/source/ui/inc/Ruler.hxx sd/source/ui/inc/SlideSorter.hxx sd/source/ui/inc/ViewTabBar.hxx sd/source/ui/inc/Window.hxx sd/source/ui/inc/morphdlg.hxx sd/source/ui/inc/sdpreslt.hxx sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx sd/source/ui/sidebar/LayoutMenu.hxx sd/source/ui/sidebar/MasterPagesSelector.hxx sd/source/ui/sidebar/NavigatorWrapper.hxx sd/source/ui/sidebar/PanelBase.hxx sd/source/ui/sidebar/RecentMasterPagesSelector.cxx sd/source/ui/sidebar/RecentMasterPagesSelector.hxx sd/source/ui/slideshow/showwindow.hxx sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx sd/source/ui/view/ViewShellBase.cxx sd/source/ui/view/drviewsa.cxx sfx2/source/appl/fileobj.hxx sfx2/source/appl/opengrf.cxx sfx2/source/control/thumbnailviewacc.hxx sfx2/source/dialog/securitypage.cxx sfx2/source/dialog/templdlg.cxx sfx2/source/doc/docinsert.cxx sfx2/source/doc/guisaveas.cxx sfx2/source/inc/alienwarn.hxx sfx2/source/sidebar/Deck.cxx sfx2/source/sidebar/Deck.hxx sfx2/source/sidebar/DeckTitleBar.cxx sfx2/source/sidebar/DeckTitleBar.hxx sfx2/source/sidebar/MenuButton.cxx sfx2/source/sidebar/MenuButton.hxx sfx2/source/sidebar/Panel.cxx sfx2/source/sidebar/Panel.hxx sfx2/source/sidebar/PanelTitleBar.hxx sfx2/source/sidebar/SidebarDockingWindow.hxx sfx2/source/sidebar/SidebarToolBox.cxx sfx2/source/sidebar/TabBar.hxx sfx2/source/sidebar/TabItem.cxx sfx2/source/sidebar/TabItem.hxx sfx2/source/sidebar/TitleBar.hxx sfx2/source/toolbox/imgmgr.cxx starmath/inc/edit.hxx starmath/inc/smmod.hxx starmath/qa/cppunit/test_starmath.cxx starmath/source/edit.cxx starmath/source/smmod.cxx svtools/source/brwbox/brwbox1.cxx svtools/source/brwbox/datwin.hxx svtools/source/contnr/fileview.cxx svtools/source/contnr/simptabl.cxx svtools/source/control/filectrl.cxx svtools/source/control/valueimp.hxx svx/inc/GalleryControl.hxx svx/source/dialog/dlgctrl.cxx svx/source/dialog/swframeexample.cxx svx/source/fmcomp/fmgridif.cxx svx/source/gallery2/GalleryControl.cxx svx/source/sidebar/EmptyPanel.hxx svx/source/sidebar/area/AreaPropertyPanel.hxx svx/source/sidebar/area/AreaTransparencyGradientControl.hxx svx/source/sidebar/graphic/GraphicPropertyPanel.hxx svx/source/sidebar/insert/InsertPropertyPanel.cxx svx/source/sidebar/insert/InsertPropertyPanel.hxx svx/source/sidebar/line/LinePropertyPanel.hxx svx/source/sidebar/line/LineWidthControl.cxx svx/source/sidebar/line/LineWidthControl.hxx svx/source/sidebar/line/LineWidthValueSet.hxx svx/source/sidebar/paragraph/ParaPropertyPanel.hxx svx/source/sidebar/possize/SidebarDialControl.cxx svx/source/sidebar/text/TextCharacterSpacingPopup.hxx svx/source/sidebar/text/TextPropertyPanel.hxx svx/source/sidebar/tools/PopupContainer.cxx svx/source/sidebar/tools/PopupControl.cxx svx/source/sidebar/tools/ValueSetWithTextControl.cxx svx/source/svdraw/svdfmtf.hxx svx/source/svdraw/svdibrow.cxx svx/source/tbxctrls/colrctrl.cxx svx/source/tbxctrls/tbcontrl.cxx sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/index/cnttab.cxx sw/source/uibase/inc/drpcps.hxx sw/source/uibase/sidebar/PageColumnControl.hxx sw/source/uibase/sidebar/PageMarginControl.hxx sw/source/uibase/sidebar/PageOrientationControl.hxx sw/source/uibase/sidebar/PagePropertyPanel.hxx sw/source/uibase/sidebar/PageSizeControl.hxx sw/source/uibase/uiview/view2.cxx sw/source/uibase/utlui/navipi.cxx vcl/inc/svdata.hxx vcl/source/control/combobox.cxx vcl/source/control/lstbox.cxx vcl/source/window/dockwin.cxx vcl/source/window/winproc.cxx Change-Id: I056cf3026ff17d65cca0b6e6588bda4a88fa8d95
Diffstat (limited to 'sd/source/ui/slideshow')
-rw-r--r--sd/source/ui/slideshow/showwin.cxx22
-rw-r--r--sd/source/ui/slideshow/showwindow.hxx1
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx4
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx22
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.hxx12
5 files changed, 33 insertions, 28 deletions
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index 29c4031dc20d..cb49f89227e5 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -79,8 +79,14 @@ ShowWindow::ShowWindow( const ::rtl::Reference< SlideshowImpl >& xController, vc
ShowWindow::~ShowWindow()
{
+ disposeOnce();
+}
+
+void ShowWindow::dispose()
+{
maPauseTimer.Stop();
maMouseTimer.Stop();
+ ::sd::Window::dispose();
}
void ShowWindow::KeyInput(const KeyEvent& rKEvt)
@@ -498,18 +504,18 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
if( SLIDE_NO_TIMEOUT != mnPauseTimeout )
{
MapMode aVMap( rMap );
- VirtualDevice aVDev( *this );
+ ScopedVclPtrInstance< VirtualDevice > pVDev( *this );
aVMap.SetOrigin( Point() );
- aVDev.SetMapMode( aVMap );
- aVDev.SetBackground( Wallpaper( Color( COL_BLACK ) ) );
+ pVDev->SetMapMode( aVMap );
+ pVDev->SetBackground( Wallpaper( Color( COL_BLACK ) ) );
// set font first, to determine real output height
- aVDev.SetFont( aFont );
+ pVDev->SetFont( aFont );
- const Size aVDevSize( aOutSize.Width(), aVDev.GetTextHeight() );
+ const Size aVDevSize( aOutSize.Width(), pVDev->GetTextHeight() );
- if( aVDev.SetOutputSize( aVDevSize ) )
+ if( pVDev->SetOutputSize( aVDevSize ) )
{
// Note: if performance gets an issue here, we can use NumberFormatter directly
SvtSysLocale aSysLocale;
@@ -518,8 +524,8 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
aText += " ( ";
aText += aLocaleData.getDuration( ::tools::Time( 0, 0, mnPauseTimeout ) );
aText += " )";
- aVDev.DrawText( Point( aOffset.Width(), 0 ), aText );
- DrawOutDev( Point( aOutOrg.X(), aOffset.Height() ), aVDevSize, Point(), aVDevSize, aVDev );
+ pVDev->DrawText( Point( aOffset.Width(), 0 ), aText );
+ DrawOutDev( Point( aOutOrg.X(), aOffset.Height() ), aVDevSize, Point(), aVDevSize, *pVDev.get() );
bDrawn = true;
}
}
diff --git a/sd/source/ui/slideshow/showwindow.hxx b/sd/source/ui/slideshow/showwindow.hxx
index 81bfe0a437c3..827dd1054071 100644
--- a/sd/source/ui/slideshow/showwindow.hxx
+++ b/sd/source/ui/slideshow/showwindow.hxx
@@ -51,6 +51,7 @@ class ShowWindow
public:
ShowWindow ( const ::rtl::Reference< ::sd::SlideshowImpl >& xController, vcl::Window* pParent );
virtual ~ShowWindow();
+ virtual void dispose() SAL_OVERRIDE;
bool SetEndMode();
bool SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeoutSec = SLIDE_NO_TIMEOUT, Graphic* pLogo = NULL );
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index d077853dfc65..36ca9d4b5eab 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -927,7 +927,7 @@ bool SlideShow::startPreview( const Reference< XDrawPage >& xDrawPage, const Ref
OutputDevice* SlideShow::getShowWindow()
{
- return mxController.is() ? mxController->mpShowWindow : 0;
+ return mxController.is() ? mxController->mpShowWindow.get() : 0;
}
int SlideShow::getAnimationMode()
@@ -1159,7 +1159,7 @@ void SlideShow::StartFullscreenPresentation( )
// will be created. This is done here explicitly so that we can make it
// fullscreen.
const sal_Int32 nDisplay (GetDisplay());
- WorkWindow* pWorkWindow = new FullScreenWorkWindow(this, mpCurrentViewShellBase);
+ VclPtr<WorkWindow> pWorkWindow = VclPtr<FullScreenWorkWindow>::Create(this, mpCurrentViewShellBase);
pWorkWindow->SetBackground(Wallpaper(COL_BLACK));
pWorkWindow->StartPresentationMode( true, mpDoc->getPresentationSettings().mbAlwaysOnTop ? PRESENTATION_HIDEALLAPPS : 0, nDisplay);
// pWorkWindow->ShowFullScreenMode(sal_False, nDisplay);
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 080f5da12cda..1d45a5b3d362 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -705,14 +705,12 @@ void SAL_CALL SlideshowImpl::disposing()
}
if( mpTimeButton )
- {
mpTimeButton->Hide();
- delete mpTimeButton;
- mpTimeButton = 0;
- }
+ mpTimeButton.disposeAndClear();
if( mpShowWindow )
mpShowWindow->Hide();
+ mpShowWindow.disposeAndClear();
if ( mpViewShell )
{
@@ -743,8 +741,7 @@ void SAL_CALL SlideshowImpl::disposing()
if( mpShowWindow )
{
- delete mpShowWindow;
- mpShowWindow = 0;
+ mpShowWindow.clear();
}
setActiveXToolbarsVisible( true );
@@ -805,7 +802,7 @@ bool SlideshowImpl::startPreview(
mpSlideController->insertSlideNumber( nSlideNumber-1 );
mpSlideController->setPreviewNode( xAnimationNode );
- mpShowWindow = new ShowWindow( this, ((pParent == 0) && mpViewShell) ? mpParentWindow : pParent );
+ mpShowWindow = VclPtr<ShowWindow>::Create( this, ((pParent == 0) && mpViewShell) ? mpParentWindow.get() : pParent );
if( mpViewShell )
{
mpViewShell->SetActiveWindow( mpShowWindow );
@@ -857,7 +854,7 @@ bool SlideshowImpl::startPreview(
bRet = startShowImpl( aProperties );
- if( mpShowWindow != 0 && meAnimationMode == ANIMATIONMODE_PREVIEW )
+ if( mpShowWindow != nullptr && meAnimationMode == ANIMATIONMODE_PREVIEW )
mpShowWindow->SetPreviewMode();
}
@@ -882,8 +879,8 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
DBG_ASSERT( !mxShow.is(), "sd::SlideshowImpl::startShow(), called twice!" );
if( mxShow.is() )
return true;
- DBG_ASSERT( mpParentWindow!=NULL, "sd::SlideshowImpl::startShow() called without parent window" );
- if (mpParentWindow == NULL)
+ DBG_ASSERT( mpParentWindow!=nullptr, "sd::SlideshowImpl::startShow() called without parent window" );
+ if (mpParentWindow == nullptr)
return false;
// Autoplay (pps/ppsx)
@@ -970,7 +967,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
// hide child windows
hideChildWindows();
- mpShowWindow = new ShowWindow( this, mpParentWindow );
+ mpShowWindow = VclPtr<ShowWindow>::Create( this, mpParentWindow );
mpShowWindow->SetMouseAutoHide( !maPresSettings.mbMouseVisible );
if( mpViewShell )
{
@@ -3346,7 +3343,8 @@ void PresentationSettingsEx::SetPropertyValue( const OUString& rProperty, const
Reference< XWindow > xWindow;
if( rValue >>= xWindow )
{
- mpParentWindow = xWindow.is() ? VCLUnoHelper::GetWindow( xWindow ) : 0;
+ mpParentWindow = xWindow.is() ? VCLUnoHelper::GetWindow( xWindow )
+ : VclPtr<vcl::Window>();
return;
}
}
diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx
index d9ddffb8a07a..a85e3ca526d4 100644
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -92,7 +92,7 @@ struct PresentationSettingsEx : public PresentationSettings
{
bool mbRehearseTimings;
bool mbPreview;
- vcl::Window* mpParentWindow;
+ VclPtr<vcl::Window> mpParentWindow;
css::uno::Reference< css::drawing::XDrawPage > mxStartPage;
css::uno::Reference< css::animations::XAnimationNode > mxAnimationNode;
@@ -332,9 +332,9 @@ private:
SdDrawDocument* mpDoc;
SfxItemSet* mpNewAttr;
- vcl::Window* mpParentWindow;
- ShowWindow* mpShowWindow;
- PushButton* mpTimeButton;
+ VclPtr<vcl::Window> mpParentWindow;
+ VclPtr<ShowWindow> mpShowWindow;
+ VclPtr<PushButton> mpTimeButton;
boost::shared_ptr< AnimationSlideController > mpSlideController;
@@ -347,8 +347,8 @@ private:
OUString maCharBuffer;
Pointer maOldPointer;
Pointer maPencil;
- std::vector< ::sd::Window* > maDrawModeWindows;
- ::sd::Window* mpOldActiveWindow;
+ std::vector< VclPtr<::sd::Window> > maDrawModeWindows;
+ VclPtr<::sd::Window> mpOldActiveWindow;
Link maStarBASICGlobalErrorHdl;
unsigned long mnChildMask;
bool mbGridVisible;