summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/about.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <b_michaelsen@openoffice.org>2010-07-13 14:36:24 +0200
committerBjoern Michaelsen <b_michaelsen@openoffice.org>2010-07-13 14:36:24 +0200
commit9bea5fdbf9ac1ce9d6118a63e8f98d7264872cc8 (patch)
tree577b47340d556419e4b8e690f0c841c4d69f97fc /sfx2/source/dialog/about.cxx
parent4f19a2d4af8de4cb23e0a9e74d8df6ba27cdf5e1 (diff)
parent871f924d559017fcf06a4c691fae6bcd9a82491e (diff)
CWS gnumake2: resync to DEV300_m84
Diffstat (limited to 'sfx2/source/dialog/about.cxx')
-rw-r--r--sfx2/source/dialog/about.cxx98
1 files changed, 41 insertions, 57 deletions
diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx
index c5f410f70e..6f171e1ee8 100644
--- a/sfx2/source/dialog/about.cxx
+++ b/sfx2/source/dialog/about.cxx
@@ -29,8 +29,16 @@
#include "precompiled_sfx2.hxx"
// include ---------------------------------------------------------------
+
+#ifndef _SV_APP_HXX
#include <vcl/svapp.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
+#endif
+#ifndef GCC
+#endif
+
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
#include <rtl/bootstrap.hxx>
@@ -40,11 +48,13 @@
#include <unotools/configmgr.hxx>
#include <vcl/graph.hxx>
#include <svtools/filter.hxx>
+
#include <sfx2/sfxuno.hxx>
#include "about.hxx"
-#include "sfx2/sfxresid.hxx"
+#include "sfxresid.hxx"
#include <sfx2/sfxdefs.hxx>
#include <sfx2/app.hxx>
+
#include "dialog.hrc"
// defines ---------------------------------------------------------------
@@ -98,49 +108,12 @@ static bool impl_loadBitmap(
return false;
}
-AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerStr ) :
-
- SfxModalDialog ( pParent, rId ),
-
- aOKButton ( this, ResId( ABOUT_BTN_OK, *rId.GetResMgr() ) ),
- aVersionText ( this, ResId( ABOUT_FTXT_VERSION, *rId.GetResMgr() ) ),
- aCopyrightText ( this, ResId( ABOUT_FTXT_COPYRIGHT, *rId.GetResMgr() ) ),
- aBuildData ( this ),
- aDeveloperAry ( ResId( ABOUT_STR_DEVELOPER_ARY, *rId.GetResMgr() ) ),
- aDevVersionStr ( rVerStr ),
- aAccelStr ( ResId( ABOUT_STR_ACCEL, *rId.GetResMgr() ) ),
- aCopyrightTextStr( ResId( ABOUT_STR_COPYRIGHT, *rId.GetResMgr() ) ),
- aTimer (),
- nOff ( 0 ),
- m_nDeltaWidth ( 0 ),
- m_nPendingScrolls( 0 ),
- bNormal ( TRUE )
+/** loads the application logo as used in the about dialog and impress slideshow pause screen */
+Image SfxApplication::GetApplicationLogo()
{
- rtl::OUString sProduct;
- utl::ConfigManager::GetDirectConfigProperty(utl::ConfigManager::PRODUCTNAME) >>= sProduct;
-
- if ( sProduct.equals( rtl::OUString::createFromAscii("StarOffice") ) ||
- sProduct.equals( rtl::OUString::createFromAscii("StarSuite") ) )
- {
- // --> PB 2004-11-18 #118455# new copyright text (only in french version show a french text)
- ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
- ::rtl::OUString sFrenchLang( DEFINE_CONST_OUSTRING( "fr" ) );
- if ( aLocale.Language.equals( sFrenchLang ) )
- {
- String sNewCopyrightText( ResId( ABOUT_STR_FRENCH_COPYRIGHT, *rId.GetResMgr() ) );
- aCopyrightText.SetText( sNewCopyrightText );
- }
- // <--
- }
+ Image aAppLogo;
- // load image from module path
-// rtl::OUString aAbouts( RTL_CONSTASCII_USTRINGPARAM( ABOUT_BITMAP_STRINGLIST ) );
-#ifdef ABOUTBMPNAMES
- rtl::OUString aAbouts( RTL_CONSTASCII_USTRINGPARAM( "ABOUTBMPNAMES" ) );
-#else
rtl::OUString aAbouts;
-#endif
-
bool bLoaded = false;
sal_Int32 nIndex = 0;
do
@@ -174,6 +147,33 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo );
}
+ return aAppLogo;
+}
+
+AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerStr ) :
+
+ SfxModalDialog ( pParent, rId ),
+
+ aOKButton ( this, ResId( ABOUT_BTN_OK, *rId.GetResMgr() ) ),
+ aVersionText ( this, ResId( ABOUT_FTXT_VERSION, *rId.GetResMgr() ) ),
+ aCopyrightText ( this, ResId( ABOUT_FTXT_COPYRIGHT, *rId.GetResMgr() ) ),
+ aBuildData ( this ),
+ aDeveloperAry ( ResId( ABOUT_STR_DEVELOPER_ARY, *rId.GetResMgr() ) ),
+ aDevVersionStr ( rVerStr ),
+ aAccelStr ( ResId( ABOUT_STR_ACCEL, *rId.GetResMgr() ) ),
+ aCopyrightTextStr( ResId( ABOUT_STR_COPYRIGHT, *rId.GetResMgr() ) ),
+ aTimer (),
+ nOff ( 0 ),
+ m_nDeltaWidth ( 0 ),
+ m_nPendingScrolls( 0 ),
+ bNormal ( TRUE )
+{
+ rtl::OUString sProduct;
+ utl::ConfigManager::GetDirectConfigProperty(utl::ConfigManager::PRODUCTNAME) >>= sProduct;
+
+ // load image from module path
+ aAppLogo = SfxApplication::GetApplicationLogo();
+
// Transparenter Font
Font aFont = GetFont();
aFont.SetTransparent( TRUE );
@@ -284,22 +284,6 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
// explizite Help-Id
SetHelpId( SID_ABOUT );
-
- //#112429# replace occurences of "StarOffice" in the "StarSuite" version
- String sCopyright( aCopyrightText.GetText() );
- if(sProduct.equals(rtl::OUString::createFromAscii("StarSuite")))
- {
- String sSO(String::CreateFromAscii("StarOffice"));
- sCopyright.SearchAndReplaceAll(sSO, sProduct);
- }
-
- String sNewYear( DEFINE_CONST_UNICODE("2005") );
- xub_StrLen nIdx = sCopyright.SearchAndReplace( DEFINE_CONST_UNICODE("2002"), sNewYear );
- if ( STRING_NOTFOUND == nIdx )
- nIdx = sCopyright.SearchAndReplace( DEFINE_CONST_UNICODE("2003"), sNewYear );
- if ( STRING_NOTFOUND == nIdx )
- nIdx = sCopyright.SearchAndReplace( DEFINE_CONST_UNICODE("2004"), sNewYear );
- aCopyrightText.SetText( sCopyright );
}
// -----------------------------------------------------------------------