summaryrefslogtreecommitdiffstats
path: root/cui/source/dialogs/about.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-01 21:57:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-02 11:06:24 +0100
commitcdcb4db776bdb6b8198e0595543fd982eda68e02 (patch)
tree195a237fbec28109253e3c191fd8fb4e8fc5afd2 /cui/source/dialogs/about.cxx
parentcallcatcher: fix leak (diff)
downloadcore-cdcb4db776bdb6b8198e0595543fd982eda68e02.tar.gz
core-cdcb4db776bdb6b8198e0595543fd982eda68e02.zip
Split this up into the constituent facts and bump copyright year.
Make this more readable and make it clearer what's based on what if someone does a --with-vendor build with or without a custom product
Diffstat (limited to 'cui/source/dialogs/about.cxx')
-rw-r--r--cui/source/dialogs/about.cxx30
1 files changed, 23 insertions, 7 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 50e5ce9ac7bc..0d77033cc2d7 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -55,6 +55,7 @@
#include "about.hrc"
#include <sfx2/sfxdefs.hxx>
#include <sfx2/app.hxx>
+#include <rtl/ustrbuf.hxx>
using namespace ::com::sun::star;
@@ -114,9 +115,11 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
aVersionText ( this, ResId( ABOUT_FTXT_VERSION, *rId.GetResMgr() ) ),
aCopyrightText ( this, ResId( ABOUT_FTXT_COPYRIGHT, *rId.GetResMgr() ) ),
aInfoLink ( this, ResId( ABOUT_FTXT_LINK, *rId.GetResMgr() ) ),
- aVersionTextStr( ResId( ABOUT_STR_VERSION, *rId.GetResMgr() ) ),
- aCopyrightTextStr( ResId( ABOUT_STR_COPYRIGHT, *rId.GetResMgr() ) ),
- aLinkStr ( ResId( ABOUT_STR_LINK, *rId.GetResMgr() ) ),
+ aVersionTextStr(ResId(ABOUT_STR_VERSION, *rId.GetResMgr())),
+ m_aVendorTextStr(ResId(ABOUT_STR_VENDOR, *rId.GetResMgr())),
+ m_aOracleCopyrightTextStr(ResId(ABOUT_STR_COPYRIGHT_ORACLE_DERIVED, *rId.GetResMgr())),
+ m_aAcknowledgementTextStr(ResId(ABOUT_STR_ACKNOWLEDGEMENT, *rId.GetResMgr())),
+ m_aLinkStr(ResId( ABOUT_STR_LINK, *rId.GetResMgr())),
m_sBuildStr(ResId(ABOUT_STR_BUILD, *rId.GetResMgr()))
{
rtl::OUString sProduct;
@@ -157,7 +160,7 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
aVersionText.SetBackground();
aCopyrightText.SetBackground();
- aInfoLink.SetURL( aLinkStr );
+ aInfoLink.SetURL(m_aLinkStr);
aInfoLink.SetBackground();
aInfoLink.SetClickHdl( LINK( this, AboutDialog, HandleHyperlink ) );
@@ -165,7 +168,17 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
aVersionText.SetControlForeground( aTextColor );
aCopyrightText.SetControlForeground( aTextColor );
- aCopyrightText.SetText( aCopyrightTextStr );
+ rtl::OUStringBuffer sText(m_aVendorTextStr);
+ sText.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n\n"));
+ sal_uInt32 nCopyrightId = sProduct.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LibreOffice" )) ?
+ ABOUT_STR_COPYRIGHT : ABOUT_STR_COPYRIGHT_DERIVED;
+ String aProductCopyrightTextStr(ResId(nCopyrightId, *rId.GetResMgr()));
+ sText.append(aProductCopyrightTextStr);
+ sText.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n\n"));
+ sText.append(m_aOracleCopyrightTextStr);
+ sText.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n\n"));
+ sText.append(m_aAcknowledgementTextStr);
+ aCopyrightText.SetText(sText.makeStringAndClear());
// determine size and position of the dialog & elements
Size aAppLogoSiz = aAppLogo.GetSizePixel();
@@ -178,7 +191,7 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
long nDlgMargin = a6Size.Width() * 2;
long nCtrlMargin = a6Size.Height() * 2;
- aVersionText.SetSizePixel(Size(800,600));
+ aVersionText.SetSizePixel(Size(800, 600));
Size aVersionTextSize = aVersionText.CalcMinimumSize();
aVersionTextSize.Width() += nDlgMargin;
@@ -191,7 +204,10 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) :
if (aOutSiz.Width() < 300)
aOutSiz.Width() = 300;
- long nTextWidth = aOutSiz.Width() - nDlgMargin;
+ //round up to nearest even
+ aOutSiz.Width() += aOutSiz.Width() & 1;
+
+ long nTextWidth = (aOutSiz.Width() - nDlgMargin);
// finally set the aVersionText widget position and size
Size aVTSize = aVersionText.GetSizePixel();