12722ceddSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
32722ceddSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
42722ceddSAndrew Rist * or more contributor license agreements. See the NOTICE file
52722ceddSAndrew Rist * distributed with this work for additional information
62722ceddSAndrew Rist * regarding copyright ownership. The ASF licenses this file
72722ceddSAndrew Rist * to you under the Apache License, Version 2.0 (the
82722ceddSAndrew Rist * "License"); you may not use this file except in compliance
92722ceddSAndrew Rist * with the License. You may obtain a copy of the License at
102722ceddSAndrew Rist *
112722ceddSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
122722ceddSAndrew Rist *
132722ceddSAndrew Rist * Unless required by applicable law or agreed to in writing,
142722ceddSAndrew Rist * software distributed under the License is distributed on an
152722ceddSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
162722ceddSAndrew Rist * KIND, either express or implied. See the License for the
172722ceddSAndrew Rist * specific language governing permissions and limitations
182722ceddSAndrew Rist * under the License.
192722ceddSAndrew Rist *
202722ceddSAndrew Rist *************************************************************/
212722ceddSAndrew Rist
222722ceddSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_desktop.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir #include <introbmpnames.hxx>
28cdf0e10cSrcweir #include "splash.hxx"
29cdf0e10cSrcweir #include <stdio.h>
30cdf0e10cSrcweir #include <unotools/bootstrap.hxx>
31cdf0e10cSrcweir #include <vos/process.hxx>
32cdf0e10cSrcweir #include <tools/urlobj.hxx>
33cdf0e10cSrcweir #include <tools/stream.hxx>
34cdf0e10cSrcweir #include <sfx2/sfx.hrc>
35cdf0e10cSrcweir #include <vcl/svapp.hxx>
36cdf0e10cSrcweir #include <vcl/salnativewidgets.hxx>
37cdf0e10cSrcweir
38cdf0e10cSrcweir #include <com/sun/star/registry/XRegistryKey.hpp>
39cdf0e10cSrcweir #include <rtl/bootstrap.hxx>
40cdf0e10cSrcweir #include <rtl/logfile.hxx>
41cdf0e10cSrcweir #include <rtl/ustrbuf.hxx>
42cdf0e10cSrcweir #include <rtl/math.hxx>
43cdf0e10cSrcweir #include <vcl/graph.hxx>
44cdf0e10cSrcweir #include <svtools/filter.hxx>
45cdf0e10cSrcweir
46cdf0e10cSrcweir #define NOT_LOADED ((long)-1)
47cdf0e10cSrcweir
48cdf0e10cSrcweir using namespace ::rtl;
49cdf0e10cSrcweir using namespace ::com::sun::star::registry;
50cdf0e10cSrcweir
51cdf0e10cSrcweir namespace desktop
52cdf0e10cSrcweir {
53cdf0e10cSrcweir
SplashScreen(const Reference<XMultiServiceFactory> & rSMgr)54cdf0e10cSrcweir SplashScreen::SplashScreen(const Reference< XMultiServiceFactory >& rSMgr)
55cdf0e10cSrcweir : IntroWindow()
56cdf0e10cSrcweir , _vdev(*((IntroWindow*)this))
57cdf0e10cSrcweir , _cProgressFrameColor(sal::static_int_cast< ColorData >(NOT_LOADED))
58*781e0f66SAndre Fischer , _bShowProgressFrame(true)
59cdf0e10cSrcweir , _cProgressBarColor(sal::static_int_cast< ColorData >(NOT_LOADED))
60cdf0e10cSrcweir , _bNativeProgress(true)
61cdf0e10cSrcweir , _iMax(100)
62cdf0e10cSrcweir , _iProgress(0)
63cdf0e10cSrcweir , _eBitmapMode(BM_DEFAULTMODE)
64cdf0e10cSrcweir , _bPaintBitmap(sal_True)
65cdf0e10cSrcweir , _bPaintProgress(sal_False)
66cdf0e10cSrcweir , _bShowLogo(sal_True)
67cdf0e10cSrcweir , _bFullScreenSplash(sal_False)
68cdf0e10cSrcweir , _bProgressEnd(sal_False)
69cdf0e10cSrcweir , _tlx(NOT_LOADED)
70cdf0e10cSrcweir , _tly(NOT_LOADED)
71cdf0e10cSrcweir , _barwidth(NOT_LOADED)
72cdf0e10cSrcweir , _barheight(NOT_LOADED)
73cdf0e10cSrcweir , _barspace(2)
74cdf0e10cSrcweir , _fXPos(-1.0)
75cdf0e10cSrcweir , _fYPos(-1.0)
76cdf0e10cSrcweir , _fWidth(-1.0)
77cdf0e10cSrcweir , _fHeight(-1.0)
78cdf0e10cSrcweir , _xoffset(12)
79cdf0e10cSrcweir , _yoffset(18)
80cdf0e10cSrcweir {
81cdf0e10cSrcweir _rFactory = rSMgr;
82cdf0e10cSrcweir
83cdf0e10cSrcweir loadConfig();
84cdf0e10cSrcweir }
85cdf0e10cSrcweir
~SplashScreen()86cdf0e10cSrcweir SplashScreen::~SplashScreen()
87cdf0e10cSrcweir {
88cdf0e10cSrcweir Application::RemoveEventListener(
89cdf0e10cSrcweir LINK( this, SplashScreen, AppEventListenerHdl ) );
90cdf0e10cSrcweir Hide();
91cdf0e10cSrcweir
92cdf0e10cSrcweir }
93cdf0e10cSrcweir
start(const OUString &,sal_Int32 nRange)94cdf0e10cSrcweir void SAL_CALL SplashScreen::start(const OUString&, sal_Int32 nRange)
95cdf0e10cSrcweir throw (RuntimeException)
96cdf0e10cSrcweir {
97cdf0e10cSrcweir _iMax = nRange;
98cdf0e10cSrcweir if (_bVisible) {
99cdf0e10cSrcweir _bProgressEnd = sal_False;
100cdf0e10cSrcweir ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
101cdf0e10cSrcweir if ( _eBitmapMode == BM_FULLSCREEN )
102cdf0e10cSrcweir ShowFullScreenMode( sal_True );
103cdf0e10cSrcweir Show();
104cdf0e10cSrcweir Paint(Rectangle());
105cdf0e10cSrcweir Flush();
106cdf0e10cSrcweir }
107cdf0e10cSrcweir }
108cdf0e10cSrcweir
end()109cdf0e10cSrcweir void SAL_CALL SplashScreen::end()
110cdf0e10cSrcweir throw (RuntimeException)
111cdf0e10cSrcweir {
112cdf0e10cSrcweir _iProgress = _iMax;
113cdf0e10cSrcweir if (_bVisible )
114cdf0e10cSrcweir {
115cdf0e10cSrcweir if ( _eBitmapMode == BM_FULLSCREEN )
116cdf0e10cSrcweir EndFullScreenMode();
117cdf0e10cSrcweir Hide();
118cdf0e10cSrcweir }
119cdf0e10cSrcweir _bProgressEnd = sal_True;
120cdf0e10cSrcweir }
121cdf0e10cSrcweir
reset()122cdf0e10cSrcweir void SAL_CALL SplashScreen::reset()
123cdf0e10cSrcweir throw (RuntimeException)
124cdf0e10cSrcweir {
125cdf0e10cSrcweir _iProgress = 0;
126cdf0e10cSrcweir if (_bVisible && !_bProgressEnd )
127cdf0e10cSrcweir {
128cdf0e10cSrcweir if ( _eBitmapMode == BM_FULLSCREEN )
129cdf0e10cSrcweir ShowFullScreenMode( sal_True );
130cdf0e10cSrcweir Show();
131cdf0e10cSrcweir updateStatus();
132cdf0e10cSrcweir }
133cdf0e10cSrcweir }
134cdf0e10cSrcweir
setText(const OUString & rText)135cdf0e10cSrcweir void SAL_CALL SplashScreen::setText(const OUString& rText)
136cdf0e10cSrcweir throw (RuntimeException)
137cdf0e10cSrcweir {
138cdf0e10cSrcweir ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
139cdf0e10cSrcweir if ( _sProgressText != rText )
140cdf0e10cSrcweir {
141cdf0e10cSrcweir _sProgressText = rText;
142cdf0e10cSrcweir
143cdf0e10cSrcweir if (_bVisible && !_bProgressEnd)
144cdf0e10cSrcweir {
145cdf0e10cSrcweir if ( _eBitmapMode == BM_FULLSCREEN )
146cdf0e10cSrcweir ShowFullScreenMode( sal_True );
147cdf0e10cSrcweir Show();
148cdf0e10cSrcweir updateStatus();
149cdf0e10cSrcweir }
150cdf0e10cSrcweir }
151cdf0e10cSrcweir }
152cdf0e10cSrcweir
setValue(sal_Int32 nValue)153cdf0e10cSrcweir void SAL_CALL SplashScreen::setValue(sal_Int32 nValue)
154cdf0e10cSrcweir throw (RuntimeException)
155cdf0e10cSrcweir {
156cdf0e10cSrcweir RTL_LOGFILE_CONTEXT( aLog, "::SplashScreen::setValue (lo119109)" );
157cdf0e10cSrcweir RTL_LOGFILE_CONTEXT_TRACE1( aLog, "value=%d", nValue );
158cdf0e10cSrcweir
159cdf0e10cSrcweir ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
160cdf0e10cSrcweir if (_bVisible && !_bProgressEnd) {
161cdf0e10cSrcweir if ( _eBitmapMode == BM_FULLSCREEN )
162cdf0e10cSrcweir ShowFullScreenMode( sal_True );
163cdf0e10cSrcweir Show();
164cdf0e10cSrcweir if (nValue >= _iMax) _iProgress = _iMax;
165cdf0e10cSrcweir else _iProgress = nValue;
166cdf0e10cSrcweir updateStatus();
167cdf0e10cSrcweir }
168cdf0e10cSrcweir }
169cdf0e10cSrcweir
170cdf0e10cSrcweir // XInitialize
171cdf0e10cSrcweir void SAL_CALL
initialize(const::com::sun::star::uno::Sequence<::com::sun::star::uno::Any> & aArguments)172cdf0e10cSrcweir SplashScreen::initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& aArguments )
173cdf0e10cSrcweir throw (RuntimeException)
174cdf0e10cSrcweir {
175cdf0e10cSrcweir ::osl::ClearableMutexGuard aGuard( _aMutex );
176cdf0e10cSrcweir if (aArguments.getLength() > 0)
177cdf0e10cSrcweir {
178cdf0e10cSrcweir aArguments[0] >>= _bVisible;
179cdf0e10cSrcweir if (aArguments.getLength() > 1 )
180cdf0e10cSrcweir aArguments[1] >>= _sAppName;
181cdf0e10cSrcweir
182cdf0e10cSrcweir // start to determine bitmap and all other required value
183cdf0e10cSrcweir initBitmap();
184cdf0e10cSrcweir Size aSize = _aIntroBmp.GetSizePixel();
185cdf0e10cSrcweir SetOutputSizePixel( aSize );
186cdf0e10cSrcweir _vdev.SetOutputSizePixel( aSize );
187cdf0e10cSrcweir _height = aSize.Height();
188cdf0e10cSrcweir _width = aSize.Width();
189cdf0e10cSrcweir if (_width > 500)
190cdf0e10cSrcweir {
191cdf0e10cSrcweir Point xtopleft(212,216);
192cdf0e10cSrcweir if ( NOT_LOADED == _tlx || NOT_LOADED == _tly )
193cdf0e10cSrcweir {
194cdf0e10cSrcweir _tlx = xtopleft.X(); // top-left x
195cdf0e10cSrcweir _tly = xtopleft.Y(); // top-left y
196cdf0e10cSrcweir }
197cdf0e10cSrcweir if ( NOT_LOADED == _barwidth )
198cdf0e10cSrcweir _barwidth = 263;
199cdf0e10cSrcweir if ( NOT_LOADED == _barheight )
200cdf0e10cSrcweir _barheight = 8;
201cdf0e10cSrcweir if (( _eBitmapMode == BM_FULLSCREEN ) &&
202cdf0e10cSrcweir _bFullScreenSplash )
203cdf0e10cSrcweir {
204cdf0e10cSrcweir if( ( _fXPos >= 0.0 ) && ( _fYPos >= 0.0 ))
205cdf0e10cSrcweir {
206cdf0e10cSrcweir _tlx = sal_Int32( double( aSize.Width() ) * _fXPos );
207cdf0e10cSrcweir _tly = sal_Int32( double( aSize.Height() ) * _fYPos );
208cdf0e10cSrcweir }
209cdf0e10cSrcweir if ( _fWidth >= 0.0 )
210cdf0e10cSrcweir _barwidth = sal_Int32( double( aSize.Width() ) * _fWidth );
211cdf0e10cSrcweir if ( _fHeight >= 0.0 )
212cdf0e10cSrcweir _barheight = sal_Int32( double( aSize.Width() ) * _fHeight );
213cdf0e10cSrcweir }
214cdf0e10cSrcweir }
215cdf0e10cSrcweir else
216cdf0e10cSrcweir {
217cdf0e10cSrcweir if ( NOT_LOADED == _barwidth )
218cdf0e10cSrcweir _barwidth = _width - (2 * _xoffset);
219cdf0e10cSrcweir if ( NOT_LOADED == _barheight )
220cdf0e10cSrcweir _barheight = 6;
221cdf0e10cSrcweir if ( NOT_LOADED == _tlx || NOT_LOADED == _tly )
222cdf0e10cSrcweir {
223cdf0e10cSrcweir _tlx = _xoffset; // top-left x
224cdf0e10cSrcweir _tly = _height - _yoffset; // top-left y
225cdf0e10cSrcweir }
226cdf0e10cSrcweir }
227cdf0e10cSrcweir
228cdf0e10cSrcweir if ( sal::static_int_cast< ColorData >(NOT_LOADED) ==
229cdf0e10cSrcweir _cProgressFrameColor.GetColor() )
230cdf0e10cSrcweir _cProgressFrameColor = Color( COL_LIGHTGRAY );
231cdf0e10cSrcweir
232cdf0e10cSrcweir if ( sal::static_int_cast< ColorData >(NOT_LOADED) ==
233cdf0e10cSrcweir _cProgressBarColor.GetColor() )
234cdf0e10cSrcweir {
235cdf0e10cSrcweir // progress bar: new color only for big bitmap format
236cdf0e10cSrcweir if ( _width > 500 )
237cdf0e10cSrcweir _cProgressBarColor = Color( 157, 202, 18 );
238cdf0e10cSrcweir else
239cdf0e10cSrcweir _cProgressBarColor = Color( COL_BLUE );
240cdf0e10cSrcweir }
241cdf0e10cSrcweir
242cdf0e10cSrcweir Application::AddEventListener(
243cdf0e10cSrcweir LINK( this, SplashScreen, AppEventListenerHdl ) );
244cdf0e10cSrcweir
245cdf0e10cSrcweir SetBackgroundBitmap( _aIntroBmp );
246cdf0e10cSrcweir }
247cdf0e10cSrcweir }
248cdf0e10cSrcweir
updateStatus()249cdf0e10cSrcweir void SplashScreen::updateStatus()
250cdf0e10cSrcweir {
251cdf0e10cSrcweir if (!_bVisible || _bProgressEnd) return;
252cdf0e10cSrcweir if (!_bPaintProgress) _bPaintProgress = sal_True;
253cdf0e10cSrcweir //_bPaintBitmap=sal_False;
254cdf0e10cSrcweir Paint(Rectangle());
255cdf0e10cSrcweir //_bPaintBitmap=sal_True;
256cdf0e10cSrcweir Flush();
257cdf0e10cSrcweir }
258cdf0e10cSrcweir
259cdf0e10cSrcweir // internal private methods
IMPL_LINK(SplashScreen,AppEventListenerHdl,VclWindowEvent *,inEvent)260cdf0e10cSrcweir IMPL_LINK( SplashScreen, AppEventListenerHdl, VclWindowEvent *, inEvent )
261cdf0e10cSrcweir {
262cdf0e10cSrcweir if ( inEvent != 0 )
263cdf0e10cSrcweir {
264cdf0e10cSrcweir // Paint( Rectangle() );
265cdf0e10cSrcweir switch ( inEvent->GetId() )
266cdf0e10cSrcweir {
267cdf0e10cSrcweir case VCLEVENT_WINDOW_SHOW:
268cdf0e10cSrcweir Paint( Rectangle() );
269cdf0e10cSrcweir break;
270cdf0e10cSrcweir default:
271cdf0e10cSrcweir break;
272cdf0e10cSrcweir }
273cdf0e10cSrcweir }
274cdf0e10cSrcweir return 0;
275cdf0e10cSrcweir }
276cdf0e10cSrcweir
277cdf0e10cSrcweir // Read keys from edition/edition.ini or soffice{.ini|rc}:
implReadBootstrapKey(const OUString & _rKey)278cdf0e10cSrcweir OUString implReadBootstrapKey( const OUString& _rKey )
279cdf0e10cSrcweir {
280cdf0e10cSrcweir OUString sValue(
281cdf0e10cSrcweir rtl::OUString(
282cdf0e10cSrcweir RTL_CONSTASCII_USTRINGPARAM(
283910823aeSJürgen Schmidt "${.override:${OOO_BASE_DIR}/program/edition/edition.ini:")) +
284cdf0e10cSrcweir _rKey + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("}")));
285cdf0e10cSrcweir rtl::Bootstrap::expandMacros(sValue);
286cdf0e10cSrcweir return sValue;
287cdf0e10cSrcweir }
288cdf0e10cSrcweir
loadConfig()289cdf0e10cSrcweir void SplashScreen::loadConfig()
290cdf0e10cSrcweir {
291cdf0e10cSrcweir _bShowLogo = !implReadBootstrapKey(
292cdf0e10cSrcweir rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Logo"))).
293cdf0e10cSrcweir equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("0"));
294cdf0e10cSrcweir
295cdf0e10cSrcweir OUString sProgressFrameColor = implReadBootstrapKey(
296cdf0e10cSrcweir OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressFrameColor" ) ) );
297cdf0e10cSrcweir OUString sProgressBarColor = implReadBootstrapKey(
298cdf0e10cSrcweir OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressBarColor" ) ) );
299cdf0e10cSrcweir OUString sSize = implReadBootstrapKey(
300cdf0e10cSrcweir OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressSize" ) ) );
301cdf0e10cSrcweir OUString sPosition = implReadBootstrapKey(
302cdf0e10cSrcweir OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressPosition" ) ) );
303cdf0e10cSrcweir OUString sFullScreenSplash = implReadBootstrapKey(
304cdf0e10cSrcweir OUString( RTL_CONSTASCII_USTRINGPARAM( "FullScreenSplash" ) ) );
305cdf0e10cSrcweir OUString sNativeProgress = implReadBootstrapKey(
306cdf0e10cSrcweir OUString( RTL_CONSTASCII_USTRINGPARAM( "NativeProgress" ) ) );
307*781e0f66SAndre Fischer OUString sShowProgressFrame = implReadBootstrapKey(
308*781e0f66SAndre Fischer OUString( RTL_CONSTASCII_USTRINGPARAM( "ShowProgressFrame" ) ) );
309cdf0e10cSrcweir
310cdf0e10cSrcweir
311cdf0e10cSrcweir // Determine full screen splash mode
312cdf0e10cSrcweir _bFullScreenSplash = (( sFullScreenSplash.getLength() > 0 ) &&
313cdf0e10cSrcweir ( !sFullScreenSplash.equalsAsciiL( "0", 1 )));
314cdf0e10cSrcweir
315cdf0e10cSrcweir // Try to retrieve the relative values for the progress bar. The current
316cdf0e10cSrcweir // schema uses the screen ratio to retrieve the associated values.
317cdf0e10cSrcweir if ( _bFullScreenSplash )
318cdf0e10cSrcweir determineProgressRatioValues( _fXPos, _fYPos, _fWidth, _fHeight );
319cdf0e10cSrcweir
320cdf0e10cSrcweir if ( sProgressFrameColor.getLength() )
321cdf0e10cSrcweir {
322cdf0e10cSrcweir sal_uInt8 nRed = 0;
323cdf0e10cSrcweir sal_uInt8 nGreen = 0;
324cdf0e10cSrcweir sal_uInt8 nBlue = 0;
325cdf0e10cSrcweir sal_Int32 idx = 0;
326cdf0e10cSrcweir sal_Int32 temp = sProgressFrameColor.getToken( 0, ',', idx ).toInt32();
327cdf0e10cSrcweir if ( idx != -1 )
328cdf0e10cSrcweir {
329cdf0e10cSrcweir nRed = static_cast< sal_uInt8 >( temp );
330cdf0e10cSrcweir temp = sProgressFrameColor.getToken( 0, ',', idx ).toInt32();
331cdf0e10cSrcweir }
332cdf0e10cSrcweir if ( idx != -1 )
333cdf0e10cSrcweir {
334cdf0e10cSrcweir nGreen = static_cast< sal_uInt8 >( temp );
335cdf0e10cSrcweir nBlue = static_cast< sal_uInt8 >( sProgressFrameColor.getToken( 0, ',', idx ).toInt32() );
336cdf0e10cSrcweir _cProgressFrameColor = Color( nRed, nGreen, nBlue );
337cdf0e10cSrcweir }
338cdf0e10cSrcweir }
339cdf0e10cSrcweir
340*781e0f66SAndre Fischer if (sShowProgressFrame.getLength() > 0)
341*781e0f66SAndre Fischer {
342*781e0f66SAndre Fischer _bShowProgressFrame = sShowProgressFrame.toBoolean();
343*781e0f66SAndre Fischer }
344*781e0f66SAndre Fischer
345cdf0e10cSrcweir if ( sProgressBarColor.getLength() )
346cdf0e10cSrcweir {
347cdf0e10cSrcweir sal_uInt8 nRed = 0;
348cdf0e10cSrcweir sal_uInt8 nGreen = 0;
349cdf0e10cSrcweir sal_uInt8 nBlue = 0;
350cdf0e10cSrcweir sal_Int32 idx = 0;
351cdf0e10cSrcweir sal_Int32 temp = sProgressBarColor.getToken( 0, ',', idx ).toInt32();
352cdf0e10cSrcweir if ( idx != -1 )
353cdf0e10cSrcweir {
354cdf0e10cSrcweir nRed = static_cast< sal_uInt8 >( temp );
355cdf0e10cSrcweir temp = sProgressBarColor.getToken( 0, ',', idx ).toInt32();
356cdf0e10cSrcweir }
357cdf0e10cSrcweir if ( idx != -1 )
358cdf0e10cSrcweir {
359cdf0e10cSrcweir nGreen = static_cast< sal_uInt8 >( temp );
360cdf0e10cSrcweir nBlue = static_cast< sal_uInt8 >( sProgressBarColor.getToken( 0, ',', idx ).toInt32() );
361cdf0e10cSrcweir _cProgressBarColor = Color( nRed, nGreen, nBlue );
362cdf0e10cSrcweir }
363cdf0e10cSrcweir }
364cdf0e10cSrcweir
365cdf0e10cSrcweir if( sNativeProgress.getLength() )
366cdf0e10cSrcweir {
367cdf0e10cSrcweir _bNativeProgress = sNativeProgress.toBoolean();
368cdf0e10cSrcweir }
369cdf0e10cSrcweir
370cdf0e10cSrcweir if ( sSize.getLength() )
371cdf0e10cSrcweir {
372cdf0e10cSrcweir sal_Int32 idx = 0;
373cdf0e10cSrcweir sal_Int32 temp = sSize.getToken( 0, ',', idx ).toInt32();
374cdf0e10cSrcweir if ( idx != -1 )
375cdf0e10cSrcweir {
376cdf0e10cSrcweir _barwidth = temp;
377cdf0e10cSrcweir _barheight = sSize.getToken( 0, ',', idx ).toInt32();
378cdf0e10cSrcweir }
379cdf0e10cSrcweir }
380cdf0e10cSrcweir
381cdf0e10cSrcweir if ( _barheight >= 10 )
382cdf0e10cSrcweir _barspace = 3; // more space between frame and bar
383cdf0e10cSrcweir
384cdf0e10cSrcweir if ( sPosition.getLength() )
385cdf0e10cSrcweir {
386cdf0e10cSrcweir sal_Int32 idx = 0;
387cdf0e10cSrcweir sal_Int32 temp = sPosition.getToken( 0, ',', idx ).toInt32();
388cdf0e10cSrcweir if ( idx != -1 )
389cdf0e10cSrcweir {
390cdf0e10cSrcweir _tlx = temp;
391cdf0e10cSrcweir _tly = sPosition.getToken( 0, ',', idx ).toInt32();
392cdf0e10cSrcweir }
393cdf0e10cSrcweir }
394cdf0e10cSrcweir }
395cdf0e10cSrcweir
initBitmap()396cdf0e10cSrcweir void SplashScreen::initBitmap()
397cdf0e10cSrcweir {
398cdf0e10cSrcweir if ( _bShowLogo )
399cdf0e10cSrcweir {
400cdf0e10cSrcweir OUString sExecutePath;
401cdf0e10cSrcweir ::rtl::Bootstrap::get(
402910823aeSJürgen Schmidt OUString( RTL_CONSTASCII_USTRINGPARAM( "OOO_BASE_DIR" ) ),
403cdf0e10cSrcweir sExecutePath );
404cdf0e10cSrcweir sExecutePath += OUString( RTL_CONSTASCII_USTRINGPARAM( "/program/" ) );
405cdf0e10cSrcweir
406cdf0e10cSrcweir bool haveBitmap = false;
407cdf0e10cSrcweir
408cdf0e10cSrcweir // Try all bitmaps in INTRO_BITMAP_NAMES
409cdf0e10cSrcweir sal_Int32 nIndex = 0;
410cdf0e10cSrcweir OUString aIntroBitmapFiles( RTL_CONSTASCII_USTRINGPARAM( INTRO_BITMAP_STRINGLIST ));
411cdf0e10cSrcweir do
412cdf0e10cSrcweir {
413cdf0e10cSrcweir haveBitmap = loadBitmap( sExecutePath, aIntroBitmapFiles.getToken( 0, ',', nIndex ) );
414cdf0e10cSrcweir }
415cdf0e10cSrcweir while ( !haveBitmap && ( nIndex >= 0 ) );
416cdf0e10cSrcweir
417cdf0e10cSrcweir if (!haveBitmap) {
418cdf0e10cSrcweir rtl::OUString edition(
419cdf0e10cSrcweir rtl::OUString(
420cdf0e10cSrcweir RTL_CONSTASCII_USTRINGPARAM(
421910823aeSJürgen Schmidt "${OOO_BASE_DIR}/program/edition")));
422cdf0e10cSrcweir rtl::Bootstrap::expandMacros(edition);
423cdf0e10cSrcweir haveBitmap = findBitmap(edition);
424cdf0e10cSrcweir }
425cdf0e10cSrcweir if (!haveBitmap) {
426cdf0e10cSrcweir findBitmap(sExecutePath);
427cdf0e10cSrcweir }
428cdf0e10cSrcweir }
429cdf0e10cSrcweir }
430cdf0e10cSrcweir
loadBitmap(rtl::OUString const & path,const rtl::OUString & rBmpFileName)431cdf0e10cSrcweir bool SplashScreen::loadBitmap(
432cdf0e10cSrcweir rtl::OUString const & path, const rtl::OUString &rBmpFileName )
433cdf0e10cSrcweir {
434cdf0e10cSrcweir if ( rBmpFileName.getLength() == 0 )
435cdf0e10cSrcweir return false;
436cdf0e10cSrcweir
437cdf0e10cSrcweir INetURLObject aObj( path, INET_PROT_FILE );
438cdf0e10cSrcweir aObj.insertName( rBmpFileName );
439cdf0e10cSrcweir
440cdf0e10cSrcweir SvFileStream aStrm( aObj.PathToFileName(), STREAM_STD_READ );
441cdf0e10cSrcweir if ( !aStrm.GetError() )
442cdf0e10cSrcweir {
443cdf0e10cSrcweir // Use graphic class to also support more graphic formats (bmp,png,...)
444cdf0e10cSrcweir Graphic aGraphic;
445cdf0e10cSrcweir
446cdf0e10cSrcweir GraphicFilter* pGF = GraphicFilter::GetGraphicFilter();
447cdf0e10cSrcweir pGF->ImportGraphic( aGraphic, String(), aStrm, GRFILTER_FORMAT_DONTKNOW );
448cdf0e10cSrcweir
449cdf0e10cSrcweir // Default case, we load the intro bitmap from a seperate file
450cdf0e10cSrcweir // (e.g. staroffice_intro.bmp or starsuite_intro.bmp)
451cdf0e10cSrcweir _aIntroBmp = aGraphic.GetBitmapEx();
452cdf0e10cSrcweir return true;
453cdf0e10cSrcweir }
454cdf0e10cSrcweir
455cdf0e10cSrcweir return false;
456cdf0e10cSrcweir }
457cdf0e10cSrcweir
findBitmap(rtl::OUString const & path)458cdf0e10cSrcweir bool SplashScreen::findBitmap(rtl::OUString const & path) {
459cdf0e10cSrcweir bool haveBitmap = false;
460cdf0e10cSrcweir if ( _bFullScreenSplash )
461cdf0e10cSrcweir {
462cdf0e10cSrcweir haveBitmap = findScreenBitmap(path);
463cdf0e10cSrcweir if ( haveBitmap )
464cdf0e10cSrcweir _eBitmapMode = BM_FULLSCREEN;
465cdf0e10cSrcweir else
466cdf0e10cSrcweir haveBitmap = findAppBitmap(path);
467cdf0e10cSrcweir }
468cdf0e10cSrcweir if ( !haveBitmap )
469cdf0e10cSrcweir {
470cdf0e10cSrcweir haveBitmap = loadBitmap(
471cdf0e10cSrcweir path, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("intro.png")));
472cdf0e10cSrcweir if ( !haveBitmap )
473cdf0e10cSrcweir haveBitmap = loadBitmap(
474cdf0e10cSrcweir path, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("intro.bmp")));
475cdf0e10cSrcweir }
476cdf0e10cSrcweir
477cdf0e10cSrcweir return haveBitmap;
478cdf0e10cSrcweir }
479cdf0e10cSrcweir
findScreenBitmap(rtl::OUString const & path)480cdf0e10cSrcweir bool SplashScreen::findScreenBitmap(rtl::OUString const & path)
481cdf0e10cSrcweir {
482cdf0e10cSrcweir sal_Int32 nWidth( 0 );
483cdf0e10cSrcweir sal_Int32 nHeight( 0 );
484cdf0e10cSrcweir
485cdf0e10cSrcweir // determine desktop resolution
486cdf0e10cSrcweir sal_uInt32 nCount = Application::GetScreenCount();
487cdf0e10cSrcweir if ( nCount > 0 )
488cdf0e10cSrcweir {
489cdf0e10cSrcweir // retrieve size from first screen
490cdf0e10cSrcweir Rectangle aScreenArea = Application::GetScreenPosSizePixel((unsigned int)0);
491cdf0e10cSrcweir nWidth = aScreenArea.GetWidth();
492cdf0e10cSrcweir nHeight = aScreenArea.GetHeight();
493cdf0e10cSrcweir }
494cdf0e10cSrcweir
495cdf0e10cSrcweir // create file name from screen resolution information
496cdf0e10cSrcweir OUStringBuffer aStrBuf( 128 );
497cdf0e10cSrcweir aStrBuf.appendAscii( "intro_" );
498cdf0e10cSrcweir if ( _sAppName.getLength() > 0 )
499cdf0e10cSrcweir {
500cdf0e10cSrcweir aStrBuf.append( _sAppName );
501cdf0e10cSrcweir aStrBuf.appendAscii( "_" );
502cdf0e10cSrcweir }
503cdf0e10cSrcweir aStrBuf.append( OUString::valueOf( nWidth ));
504cdf0e10cSrcweir aStrBuf.appendAscii( "x" );
505cdf0e10cSrcweir aStrBuf.append( OUString::valueOf( nHeight ));
506cdf0e10cSrcweir
507cdf0e10cSrcweir OUString aRootIntroFileName = aStrBuf.makeStringAndClear();
508cdf0e10cSrcweir OUString aBmpFileName = aRootIntroFileName + OUString::createFromAscii(".png");
509cdf0e10cSrcweir
510cdf0e10cSrcweir bool haveBitmap = loadBitmap( path, aBmpFileName );
511cdf0e10cSrcweir if ( !haveBitmap )
512cdf0e10cSrcweir {
513cdf0e10cSrcweir aBmpFileName = aRootIntroFileName + OUString::createFromAscii(".bmp");
514cdf0e10cSrcweir haveBitmap = loadBitmap( path, aBmpFileName );
515cdf0e10cSrcweir }
516cdf0e10cSrcweir
517cdf0e10cSrcweir if ( !haveBitmap )
518cdf0e10cSrcweir {
519cdf0e10cSrcweir aStrBuf.appendAscii( "intro_" );
520cdf0e10cSrcweir aStrBuf.appendAscii( "_" );
521cdf0e10cSrcweir aStrBuf.append( OUString::valueOf( nWidth ));
522cdf0e10cSrcweir aStrBuf.appendAscii( "x" );
523cdf0e10cSrcweir aStrBuf.append( OUString::valueOf( nHeight ));
524cdf0e10cSrcweir
525cdf0e10cSrcweir aRootIntroFileName = aStrBuf.makeStringAndClear();
526cdf0e10cSrcweir aBmpFileName = aRootIntroFileName + OUString::createFromAscii(".png");
527cdf0e10cSrcweir
528cdf0e10cSrcweir haveBitmap = loadBitmap( path, aBmpFileName );
529cdf0e10cSrcweir if ( !haveBitmap )
530cdf0e10cSrcweir {
531cdf0e10cSrcweir aBmpFileName = aRootIntroFileName + OUString::createFromAscii(".bmp");
532cdf0e10cSrcweir haveBitmap = loadBitmap( path, aBmpFileName );
533cdf0e10cSrcweir }
534cdf0e10cSrcweir }
535cdf0e10cSrcweir return haveBitmap;
536cdf0e10cSrcweir }
537cdf0e10cSrcweir
findAppBitmap(rtl::OUString const & path)538cdf0e10cSrcweir bool SplashScreen::findAppBitmap(rtl::OUString const & path)
539cdf0e10cSrcweir {
540cdf0e10cSrcweir bool haveBitmap = false;
541cdf0e10cSrcweir
542cdf0e10cSrcweir if ( _sAppName.getLength() > 0 )
543cdf0e10cSrcweir {
544cdf0e10cSrcweir OUStringBuffer aStrBuf( 128 );
545cdf0e10cSrcweir aStrBuf.appendAscii( "intro_" );
546cdf0e10cSrcweir aStrBuf.appendAscii( "_" );
547cdf0e10cSrcweir aStrBuf.append( _sAppName );
548cdf0e10cSrcweir
549cdf0e10cSrcweir OUString aRootIntroFileName = aStrBuf.makeStringAndClear();
550cdf0e10cSrcweir
551cdf0e10cSrcweir OUString aBmpFileName = aRootIntroFileName + OUString::createFromAscii( ".png" );
552cdf0e10cSrcweir haveBitmap = loadBitmap( path, aBmpFileName );
553cdf0e10cSrcweir if ( !haveBitmap )
554cdf0e10cSrcweir {
555cdf0e10cSrcweir aBmpFileName = aRootIntroFileName + OUString::createFromAscii( ".bmp" );
556cdf0e10cSrcweir haveBitmap = loadBitmap( path, aBmpFileName );
557cdf0e10cSrcweir }
558cdf0e10cSrcweir }
559cdf0e10cSrcweir return haveBitmap;
560cdf0e10cSrcweir }
561cdf0e10cSrcweir
determineProgressRatioValues(double & rXRelPos,double & rYRelPos,double & rRelWidth,double & rRelHeight)562cdf0e10cSrcweir void SplashScreen::determineProgressRatioValues(
563cdf0e10cSrcweir double& rXRelPos, double& rYRelPos,
564cdf0e10cSrcweir double& rRelWidth, double& rRelHeight )
565cdf0e10cSrcweir {
566cdf0e10cSrcweir sal_Int32 nWidth( 0 );
567cdf0e10cSrcweir sal_Int32 nHeight( 0 );
568cdf0e10cSrcweir sal_Int32 nScreenRatio( 0 );
569cdf0e10cSrcweir
570cdf0e10cSrcweir // determine desktop resolution
571cdf0e10cSrcweir sal_uInt32 nCount = Application::GetScreenCount();
572cdf0e10cSrcweir if ( nCount > 0 )
573cdf0e10cSrcweir {
574cdf0e10cSrcweir // retrieve size from first screen
575cdf0e10cSrcweir Rectangle aScreenArea = Application::GetScreenPosSizePixel((unsigned int)0);
576cdf0e10cSrcweir nWidth = aScreenArea.GetWidth();
577cdf0e10cSrcweir nHeight = aScreenArea.GetHeight();
578cdf0e10cSrcweir nScreenRatio = sal_Int32( math::round( double( nWidth ) / double( nHeight ), 2 ) * 100 );
579cdf0e10cSrcweir }
580cdf0e10cSrcweir
581cdf0e10cSrcweir char szFullScreenProgressRatio[] = "FullScreenProgressRatio0";
582cdf0e10cSrcweir char szFullScreenProgressPos[] = "FullScreenProgressPos0";
583cdf0e10cSrcweir char szFullScreenProgressSize[] = "FullScreenProgressSize0";
584cdf0e10cSrcweir for ( sal_Int32 i = 0; i <= 9; i++ )
585cdf0e10cSrcweir {
586cdf0e10cSrcweir char cNum = '0' + char( i );
587cdf0e10cSrcweir szFullScreenProgressRatio[23] = cNum;
588cdf0e10cSrcweir szFullScreenProgressPos[21] = cNum;
589cdf0e10cSrcweir szFullScreenProgressSize[22] = cNum;
590cdf0e10cSrcweir
591cdf0e10cSrcweir OUString sFullScreenProgressRatio = implReadBootstrapKey(
592cdf0e10cSrcweir OUString::createFromAscii( szFullScreenProgressRatio ) );
593cdf0e10cSrcweir
594cdf0e10cSrcweir if ( sFullScreenProgressRatio.getLength() > 0 )
595cdf0e10cSrcweir {
596cdf0e10cSrcweir double fRatio = sFullScreenProgressRatio.toDouble();
597cdf0e10cSrcweir sal_Int32 nRatio = sal_Int32( math::round( fRatio, 2 ) * 100 );
598cdf0e10cSrcweir if ( nRatio == nScreenRatio )
599cdf0e10cSrcweir {
600cdf0e10cSrcweir OUString sFullScreenProgressPos = implReadBootstrapKey(
601cdf0e10cSrcweir OUString::createFromAscii( szFullScreenProgressPos ) );
602cdf0e10cSrcweir OUString sFullScreenProgressSize = implReadBootstrapKey(
603cdf0e10cSrcweir OUString::createFromAscii( szFullScreenProgressSize ) );
604cdf0e10cSrcweir
605cdf0e10cSrcweir if ( sFullScreenProgressPos.getLength() )
606cdf0e10cSrcweir {
607cdf0e10cSrcweir sal_Int32 idx = 0;
608cdf0e10cSrcweir double temp = sFullScreenProgressPos.getToken( 0, ',', idx ).toDouble();
609cdf0e10cSrcweir if ( idx != -1 )
610cdf0e10cSrcweir {
611cdf0e10cSrcweir rXRelPos = temp;
612cdf0e10cSrcweir rYRelPos = sFullScreenProgressPos.getToken( 0, ',', idx ).toDouble();
613cdf0e10cSrcweir }
614cdf0e10cSrcweir }
615cdf0e10cSrcweir
616cdf0e10cSrcweir if ( sFullScreenProgressSize.getLength() )
617cdf0e10cSrcweir {
618cdf0e10cSrcweir sal_Int32 idx = 0;
619cdf0e10cSrcweir double temp = sFullScreenProgressSize.getToken( 0, ',', idx ).toDouble();
620cdf0e10cSrcweir if ( idx != -1 )
621cdf0e10cSrcweir {
622cdf0e10cSrcweir rRelWidth = temp;
623cdf0e10cSrcweir rRelHeight = sFullScreenProgressSize.getToken( 0, ',', idx ).toDouble();
624cdf0e10cSrcweir }
625cdf0e10cSrcweir }
626cdf0e10cSrcweir }
627cdf0e10cSrcweir }
628cdf0e10cSrcweir else
629cdf0e10cSrcweir break;
630cdf0e10cSrcweir }
631cdf0e10cSrcweir }
632cdf0e10cSrcweir
Paint(const Rectangle &)633cdf0e10cSrcweir void SplashScreen::Paint( const Rectangle&)
634cdf0e10cSrcweir {
635cdf0e10cSrcweir if(!_bVisible) return;
636cdf0e10cSrcweir
637cdf0e10cSrcweir //native drawing
638cdf0e10cSrcweir sal_Bool bNativeOK = sal_False;
639cdf0e10cSrcweir
640cdf0e10cSrcweir // in case of native controls we need to draw directly to the window
641cdf0e10cSrcweir if( _bNativeProgress && IsNativeControlSupported( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL ) )
642cdf0e10cSrcweir {
643cdf0e10cSrcweir DrawBitmapEx( Point(), _aIntroBmp );
644cdf0e10cSrcweir
645cdf0e10cSrcweir ImplControlValue aValue( _iProgress * _barwidth / _iMax);
646cdf0e10cSrcweir Rectangle aDrawRect( Point(_tlx, _tly), Size( _barwidth, _barheight ) );
647cdf0e10cSrcweir Rectangle aNativeControlRegion, aNativeContentRegion;
648cdf0e10cSrcweir
649cdf0e10cSrcweir if( GetNativeControlRegion( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aDrawRect,
650cdf0e10cSrcweir CTRL_STATE_ENABLED, aValue, rtl::OUString(),
651cdf0e10cSrcweir aNativeControlRegion, aNativeContentRegion ) )
652cdf0e10cSrcweir {
653cdf0e10cSrcweir long nProgressHeight = aNativeControlRegion.GetHeight();
654cdf0e10cSrcweir aDrawRect.Top() -= (nProgressHeight - _barheight)/2;
655cdf0e10cSrcweir aDrawRect.Bottom() += (nProgressHeight - _barheight)/2;
656cdf0e10cSrcweir }
657cdf0e10cSrcweir
658cdf0e10cSrcweir if( (bNativeOK = DrawNativeControl( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aDrawRect,
659cdf0e10cSrcweir CTRL_STATE_ENABLED, aValue, _sProgressText )) != sal_False )
660cdf0e10cSrcweir {
661cdf0e10cSrcweir return;
662cdf0e10cSrcweir }
663cdf0e10cSrcweir }
664cdf0e10cSrcweir //non native drawing
665cdf0e10cSrcweir // draw bitmap
666cdf0e10cSrcweir if (_bPaintBitmap)
667cdf0e10cSrcweir _vdev.DrawBitmapEx( Point(), _aIntroBmp );
668cdf0e10cSrcweir
669*781e0f66SAndre Fischer if (_bPaintProgress)
670*781e0f66SAndre Fischer {
671cdf0e10cSrcweir // draw progress...
672*781e0f66SAndre Fischer long length = (_iProgress * _barwidth / _iMax);
673*781e0f66SAndre Fischer if (_bShowProgressFrame)
674*781e0f66SAndre Fischer length -= (2 * _barspace);
675*781e0f66SAndre Fischer if (length < 0)
676*781e0f66SAndre Fischer length = 0;
677*781e0f66SAndre Fischer
678*781e0f66SAndre Fischer if (_bShowProgressFrame)
679*781e0f66SAndre Fischer {
680*781e0f66SAndre Fischer // border
681*781e0f66SAndre Fischer _vdev.SetFillColor();
682*781e0f66SAndre Fischer _vdev.SetLineColor( _cProgressFrameColor );
683*781e0f66SAndre Fischer _vdev.DrawRect(Rectangle(_tlx, _tly, _tlx+_barwidth, _tly+_barheight));
684*781e0f66SAndre Fischer _vdev.SetFillColor( _cProgressBarColor );
685*781e0f66SAndre Fischer _vdev.SetLineColor();
686*781e0f66SAndre Fischer _vdev.DrawRect(Rectangle(_tlx+_barspace, _tly+_barspace, _tlx+_barspace+length, _tly+_barheight-_barspace));
687*781e0f66SAndre Fischer _vdev.DrawText( Rectangle(_tlx, _tly+_barheight+5, _tlx+_barwidth, _tly+_barheight+5+20), _sProgressText, TEXT_DRAW_CENTER );
688*781e0f66SAndre Fischer }
689*781e0f66SAndre Fischer else
690*781e0f66SAndre Fischer {
691*781e0f66SAndre Fischer // Show flat progress bar without frame.
692*781e0f66SAndre Fischer
693*781e0f66SAndre Fischer // border
694*781e0f66SAndre Fischer _vdev.SetFillColor( _cProgressFrameColor );
695*781e0f66SAndre Fischer _vdev.SetLineColor();
696*781e0f66SAndre Fischer _vdev.DrawRect(Rectangle(_tlx, _tly, _tlx+_barwidth, _tly+_barheight));
697*781e0f66SAndre Fischer
698*781e0f66SAndre Fischer _vdev.SetFillColor( _cProgressBarColor );
699*781e0f66SAndre Fischer _vdev.SetLineColor();
700*781e0f66SAndre Fischer _vdev.DrawRect(Rectangle(_tlx, _tly, _tlx+length, _tly+_barheight));
701*781e0f66SAndre Fischer }
702*781e0f66SAndre Fischer
703cdf0e10cSrcweir _vdev.DrawText( Rectangle(_tlx, _tly+_barheight+5, _tlx+_barwidth, _tly+_barheight+5+20), _sProgressText, TEXT_DRAW_CENTER );
704cdf0e10cSrcweir }
705cdf0e10cSrcweir Size aSize = GetOutputSizePixel();
706cdf0e10cSrcweir Size bSize = _vdev.GetOutputSizePixel();
707cdf0e10cSrcweir //_vdev.Flush();
708cdf0e10cSrcweir //_vdev.DrawOutDev(Point(), GetOutputSize(), Point(), GetOutputSize(), *((IntroWindow*)this) );
709cdf0e10cSrcweir DrawOutDev(Point(), GetOutputSizePixel(), Point(), _vdev.GetOutputSizePixel(), _vdev );
710cdf0e10cSrcweir //Flush();
711cdf0e10cSrcweir }
712cdf0e10cSrcweir
713cdf0e10cSrcweir
714cdf0e10cSrcweir // get service instance...
715cdf0e10cSrcweir SplashScreen *SplashScreen::_pINSTANCE = NULL;
716cdf0e10cSrcweir osl::Mutex SplashScreen::_aMutex;
717cdf0e10cSrcweir
getInstance(const Reference<XMultiServiceFactory> & rSMgr)718cdf0e10cSrcweir Reference< XInterface > SplashScreen::getInstance(const Reference< XMultiServiceFactory >& rSMgr)
719cdf0e10cSrcweir {
720cdf0e10cSrcweir if ( _pINSTANCE == 0 )
721cdf0e10cSrcweir {
722cdf0e10cSrcweir osl::MutexGuard guard(_aMutex);
723cdf0e10cSrcweir if (_pINSTANCE == 0)
724cdf0e10cSrcweir return (XComponent*)new SplashScreen(rSMgr);
725cdf0e10cSrcweir }
726cdf0e10cSrcweir
727cdf0e10cSrcweir return (XComponent*)0;
728cdf0e10cSrcweir }
729cdf0e10cSrcweir
730cdf0e10cSrcweir // static service info...
731cdf0e10cSrcweir const char* SplashScreen::interfaces[] =
732cdf0e10cSrcweir {
733cdf0e10cSrcweir "com.sun.star.task.XStartusIndicator",
734cdf0e10cSrcweir "com.sun.star.lang.XInitialization",
735cdf0e10cSrcweir NULL,
736cdf0e10cSrcweir };
737cdf0e10cSrcweir const sal_Char *SplashScreen::serviceName = "com.sun.star.office.SplashScreen";
738cdf0e10cSrcweir const sal_Char *SplashScreen::implementationName = "com.sun.star.office.comp.SplashScreen";
739cdf0e10cSrcweir const sal_Char *SplashScreen::supportedServiceNames[] = {"com.sun.star.office.SplashScreen", NULL};
740cdf0e10cSrcweir
741cdf0e10cSrcweir }
742