[ooo-build-commit] .: sfx2/inc sfx2/source svx/source
René Engelhard
rene at kemper.freedesktop.org
Wed Sep 15 05:45:42 PDT 2010
sfx2/inc/about.hxx | 3 +-
sfx2/inc/sfx2/sfx.hrc | 3 +-
sfx2/source/dialog/about.cxx | 54 +++++++++++++++++++++----------------------
svx/source/intro/ooo.src | 14 +++++++----
4 files changed, 41 insertions(+), 33 deletions(-)
New commits:
commit 6757152b040b68aefef58f481b74f12f7e90b5b5
Author: Petr Mladek <pmladek at suse.cz>
Date: Wed Sep 15 14:42:28 2010 +0200
about-dialog-cleanup.diff: clean up about dialog, i#111425
diff --git a/sfx2/inc/about.hxx b/sfx2/inc/about.hxx
index 7a4d1c5..2d6960c 100644
--- a/sfx2/inc/about.hxx
+++ b/sfx2/inc/about.hxx
@@ -47,7 +47,7 @@ private:
OKButton aOKButton;
Image aAppLogo;
- FixedInfo aVersionText;
+ MultiLineEdit aVersionText;
MultiLineEdit aCopyrightText;
FixedInfo aBuildData;
@@ -55,6 +55,7 @@ private:
String aDevVersionStr;
String aAccelStr;
String aVersionData;
+ String aVersionTextStr;
String aCopyrightTextStr;
AccelList aAccelList;
diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc
index 4dc2fc5..87cc2b6 100755
--- a/sfx2/inc/sfx2/sfx.hrc
+++ b/sfx2/inc/sfx2/sfx.hrc
@@ -216,7 +216,8 @@
#define ABOUT_STR_DEVELOPER_ARY 1
#define ABOUT_STR_FRENCH_COPYRIGHT 2
#define ABOUT_STR_ACCEL 3
-#define ABOUT_STR_COPYRIGHT 4
+#define ABOUT_STR_VERSION 4
+#define ABOUT_STR_COPYRIGHT 5
#define RID_APPTITLE (RID_SFX_START+4)
#define RID_BUILDVERSION (RID_SFX_START+5)
diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx
index fba842e..e944fec 100644
--- a/sfx2/source/dialog/about.cxx
+++ b/sfx2/source/dialog/about.cxx
@@ -67,22 +67,6 @@
#define WELCOME_URL DEFINE_CONST_UNICODE( "http://www.openoffice.org/welcome/credits.html" )
// class AboutDialog -----------------------------------------------------
-static void layoutText( FixedInfo &rText, long &nY, long nTextWidth, Size a6Size )
-{
- Point aTextPos = rText.GetPosPixel();
- aTextPos.X() = a6Size.Width() * 2;
- aTextPos.Y() = nY;
- rText.SetPosPixel( aTextPos );
-
- Size aTxtSiz = rText.GetSizePixel();
- aTxtSiz.Width() = nTextWidth;
- Size aCalcSize = rText.CalcMinimumSize( nTextWidth );
- aTxtSiz.Height() = aCalcSize.Height();
- rText.SetSizePixel( aTxtSiz );
-
- nY += aTxtSiz.Height();
-}
-
static bool impl_loadBitmap(
const rtl::OUString &rPath, const rtl::OUString &rBmpFileName,
Image &rLogo )
@@ -158,10 +142,12 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
aOKButton ( this, ResId( ABOUT_BTN_OK, *rId.GetResMgr() ) ),
aVersionText ( this, ResId( ABOUT_FTXT_VERSION, *rId.GetResMgr() ) ),
aCopyrightText ( this, ResId( ABOUT_FTXT_COPYRIGHT, *rId.GetResMgr() ) ),
+ // FIXME: What is the purpose of the aBuildData when it is not connected to any widget?
aBuildData ( this ),
aDeveloperAry ( ResId( ABOUT_STR_DEVELOPER_ARY, *rId.GetResMgr() ) ),
aDevVersionStr ( rVerStr ),
aAccelStr ( ResId( ABOUT_STR_ACCEL, *rId.GetResMgr() ) ),
+ aVersionTextStr( ResId( ABOUT_STR_VERSION, *rId.GetResMgr() ) ),
aCopyrightTextStr( ResId( ABOUT_STR_COPYRIGHT, *rId.GetResMgr() ) ),
aTimer (),
nOff ( 0 ),
@@ -181,10 +167,15 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
SetFont( aFont );
// if necessary more info
- String sVersion = aVersionText.GetText();
+ String sVersion = aVersionTextStr;
sVersion.SearchAndReplaceAscii( "$(VER)", Application::GetDisplayName() );
sVersion += '\n';
sVersion += rVerStr;
+#ifdef BUILD_VER_STRING
+ String aBuildString( DEFINE_CONST_UNICODE( BUILD_VER_STRING ) );
+ sVersion += '\n';
+ sVersion += aBuildString;
+#endif
aVersionText.SetText( sVersion );
// Initialisierung fuer Aufruf Entwickler
@@ -235,28 +226,37 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
aNewFont.SetSize( aSmaller );
aBuildData.SetFont( aNewFont );
aBuildData.SetBackground( aWall );
-#ifdef BUILD_VER_STRING
- String aBuildString( DEFINE_CONST_UNICODE( BUILD_VER_STRING ) );
-#else
- String aBuildString;
-#endif
- aBuildData.SetText( aBuildString );
+ // FIXME: What is the purpose of the build data?
+ // they are not showed even when set, so???
+ String aBuildDataString;
+ aBuildData.SetText( aBuildDataString );
aBuildData.Show();
+ aCopyrightText.SetText( aCopyrightTextStr );
+
// determine size and position of the dialog & elements
Size aAppLogoSiz = aAppLogo.GetSizePixel();
Size aOutSiz = GetOutputSizePixel();
aOutSiz.Width() = aAppLogoSiz.Width();
+ // analyze size of the aVersionText widget
+ // character size
Size a6Size = aVersionText.LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
+ // preferred Version widget size
+ Size aVTSize = aVersionText.CalcMinimumSize();
long nY = aAppLogoSiz.Height() + ( a6Size.Height() * 2 );
- long nDlgMargin = a6Size.Width() * 4 ;
- long nCtrlMargin = a6Size.Height() * 2;
+ long nDlgMargin = a6Size.Width() * 3 ;
+ long nCtrlMargin = aVTSize.Height() + ( a6Size.Height() * 2 );
long nTextWidth = aOutSiz.Width() - nDlgMargin;
- aCopyrightText.SetText( aCopyrightTextStr );
+ // finally set the aVersionText widget position and size
+ Size aVTCopySize = aVTSize;
+ Point aVTCopyPnt;
+ aVTCopySize.Width() = nTextWidth;
+ aVTCopyPnt.X() = ( aOutSiz.Width() - aVTCopySize.Width() ) / 2;
+ aVTCopyPnt.Y() = nY;
+ aVersionText.SetPosSizePixel( aVTCopyPnt, aVTCopySize );
- layoutText( aVersionText, nY, nTextWidth, a6Size );
nY += nCtrlMargin;
// OK-Button-Position (at the bottom and centered)
diff --git a/svx/source/intro/ooo.src b/svx/source/intro/ooo.src
index b63a0f1..008c55b 100644
--- a/svx/source/intro/ooo.src
+++ b/svx/source/intro/ooo.src
@@ -75,22 +75,28 @@ ModalDialog RID_DEFAULTABOUT
Pos = MAP_APPFONT ( 174 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
- FixedText ABOUT_FTXT_VERSION
+ MultiLineEdit ABOUT_FTXT_VERSION
{
+ Border = FALSE ;
Pos = MAP_APPFONT ( 54 , 6 ) ;
Size = MAP_APPFONT ( 118 , 16 ) ;
- WordBreak = TRUE ;
- Text = "%PRODUCTNAME %ABOUTBOXPRODUCTVERSION %PRODUCTEXTENSION" ;
+ IgnoreTab = TRUE ;
+ ReadOnly = TRUE ;
+ AutoVScroll = TRUE ;
};
MultiLineEdit ABOUT_FTXT_COPYRIGHT
{
- Border = TRUE ;
+ Border = FALSE ;
Pos = MAP_APPFONT ( 54 , 25 ) ;
Size = MAP_APPFONT ( 168 , 51 ) ;
IgnoreTab = TRUE ;
ReadOnly = TRUE ;
AutoVScroll = TRUE ;
};
+ String ABOUT_STR_VERSION
+ {
+ Text[ en-US ] = "%PRODUCTNAME %ABOUTBOXPRODUCTVERSION %PRODUCTEXTENSION";
+ };
String ABOUT_STR_COPYRIGHT
{
Text[ en-US ] = "Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved.\nThis product was created by %OOOVENDOR, based on OpenOffice.org.\nOpenOffice.org acknowledges all community members, especially those mentioned at\n http://www.openoffice.org/welcome/credits.html.";
More information about the ooo-build-commit
mailing list