desktop/source/splash/splash.cxx | 2 -- include/vcl/introwin.hxx | 7 ++----- vcl/inc/svdata.hxx | 3 ++- vcl/source/window/introwin.cxx | 23 +++++++---------------- 4 files changed, 11 insertions(+), 24 deletions(-)
New commits: commit d3d517c4cc1a3a19421f44420d1c71e8d1b4a6d7 Author: Michael Meeks <michael.me...@collabora.com> Date: Fri Jan 9 16:00:49 2015 +0000 vcl: cleanup introwindow a little. Change-Id: I5b1d4fe8281c49f9791e09b35c889177c68d88b0 diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index c406da9..17e84de 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -114,7 +114,6 @@ public: // workwindow virtual void Paint( const Rectangle& ) SAL_OVERRIDE; - }; SplashScreen::SplashScreen() @@ -157,7 +156,6 @@ SplashScreen::~SplashScreen() Application::RemoveEventListener( LINK( this, SplashScreen, AppEventListenerHdl ) ); Hide(); - } void SAL_CALL SplashScreen::start(const OUString&, sal_Int32 nRange) diff --git a/include/vcl/introwin.hxx b/include/vcl/introwin.hxx index 8576ecd..852612b 100644 --- a/include/vcl/introwin.hxx +++ b/include/vcl/introwin.hxx @@ -20,20 +20,17 @@ #ifndef INCLUDED_VCL_INTROWIN_HXX #define INCLUDED_VCL_INTROWIN_HXX -#include <vcl/bitmapex.hxx> #include <vcl/dllapi.h> #include <vcl/wrkwin.hxx> +/// This class just provides an API to set the intro-window to +/// our internal structures so we can special-case it. class VCL_DLLPUBLIC IntroWindow : public WorkWindow { -private: - SAL_DLLPRIVATE void ImplInitIntroWindowData(); - public: IntroWindow(); virtual ~IntroWindow(); virtual void dispose() SAL_OVERRIDE; - }; #endif // INCLUDED_VCL_INTROWIN_HXX diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 683f40d..15586e6 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -35,6 +35,7 @@ #include "vcl/keycod.hxx" #include "vcl/svapp.hxx" #include "vcl/vclevent.hxx" +#include "vcl/vclptr.hxx" #include "unotools/options.hxx" @@ -325,7 +326,7 @@ struct ImplSVData ImplSVHelpData maHelpData; // indepen data for Help classes ImplSVNWFData maNWFData; UnoWrapperBase* mpUnoWrapper; - vcl::Window* mpIntroWindow; // the splash screen + VclPtr<vcl::Window> mpIntroWindow; // the splash screen DockingManager* mpDockingManager; BlendFrameCache* mpBlendFrameCache; bool mbIsTestTool; diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx index 4268f49..b85f313 100644 --- a/vcl/source/window/introwin.cxx +++ b/vcl/source/window/introwin.cxx @@ -17,24 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <vcl/wrkwin.hxx> -#include <vcl/bitmap.hxx> -#include <vcl/introwin.hxx> - -#include <impbmp.hxx> #include <svdata.hxx> -#include <salframe.hxx> - -void IntroWindow::ImplInitIntroWindowData() -{ - ImplSVData* pSVData = ImplGetSVData(); - pSVData->mpIntroWindow = this; -} +#include <vcl/introwin.hxx> IntroWindow::IntroWindow( ) : WorkWindow( WINDOW_INTROWINDOW ) { - ImplInitIntroWindowData(); + ImplGetSVData()->mpIntroWindow = VclPtr<Window>(this); + WorkWindow::ImplInit( 0, WB_INTROWIN, NULL ); } @@ -45,10 +35,11 @@ IntroWindow::~IntroWindow() void IntroWindow::dispose() { - // FIXME: really we should have a dispose & a ref-ptr there [!] ... ImplSVData* pSVData = ImplGetSVData(); - if ( pSVData->mpIntroWindow == this ) - pSVData->mpIntroWindow = NULL; + if (pSVData->mpIntroWindow == this) + pSVData->mpIntroWindow = VclPtr<Window>(NULL); + + WorkWindow::dispose(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits