summaryrefslogtreecommitdiff
path: root/cui
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
parentabc5807fe1dfc4df794767df6696936e08272af5 (diff)
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')
-rw-r--r--cui/source/dialogs/about.cxx30
-rw-r--r--cui/source/dialogs/about.hrc8
-rw-r--r--cui/source/dialogs/about.src18
-rw-r--r--cui/source/inc/about.hxx10
4 files changed, 52 insertions, 14 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();
diff --git a/cui/source/dialogs/about.hrc b/cui/source/dialogs/about.hrc
index d1b60c33fda2..fe314232a28a 100644
--- a/cui/source/dialogs/about.hrc
+++ b/cui/source/dialogs/about.hrc
@@ -33,5 +33,9 @@
#define ABOUT_FTXT_LINK 4
#define ABOUT_STR_BUILD 5
#define ABOUT_STR_VERSION 6
-#define ABOUT_STR_COPYRIGHT 7
-#define ABOUT_STR_LINK 8
+#define ABOUT_STR_VENDOR 7
+#define ABOUT_STR_COPYRIGHT 8
+#define ABOUT_STR_COPYRIGHT_DERIVED 9
+#define ABOUT_STR_COPYRIGHT_ORACLE_DERIVED 10
+#define ABOUT_STR_ACKNOWLEDGEMENT 11
+#define ABOUT_STR_LINK 12
diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src
index 2e8c7226991a..5ad35acc4e90 100644
--- a/cui/source/dialogs/about.src
+++ b/cui/source/dialogs/about.src
@@ -72,9 +72,25 @@ ModalDialog RID_DEFAULTABOUT
{
Text[ en-US ] = "%PRODUCTNAME %ABOUTBOXPRODUCTVERSION %PRODUCTEXTENSION";
};
+ String ABOUT_STR_VENDOR
+ {
+ Text[ en-US ] = "This product was supplied by %OOOVENDOR.";
+ };
String ABOUT_STR_COPYRIGHT
{
- Text[ en-US ] = "Copyright © 2000, 2010 LibreOffice contributors and/or their affiliates. All rights reserved.\n\nThis product was created by %OOOVENDOR, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.\n\n%OOOVENDOR acknowledges all community members, please find more info at the link below:";
+ Text[ en-US ] = "LibreOffice is copyright © 2000, 2011 LibreOffice contributors and/or their affiliates. All rights reserved.";
+ };
+ String ABOUT_STR_COPYRIGHT_DERIVED
+ {
+ Text[ en-US ] = "%PRODUCTNAME is derived from LibreOffice. LibreOffice is copyright © 2000, 2011 LibreOffice contributors and/or their affiliates. All rights reserved.";
+ };
+ String ABOUT_STR_COPYRIGHT_ORACLE_DERIVED
+ {
+ Text[ en-US ] = "LibreOffice is derived from OpenOffice.org. OpenOffice.org is copyright © 2000, 2011 Oracle and/or its affiliates. All rights reserved.";
+ };
+ String ABOUT_STR_ACKNOWLEDGEMENT
+ {
+ Text[ en-US ] = "%OOOVENDOR acknowledges all community members, please find more info at the link below:";
};
String ABOUT_STR_LINK
{
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index 0909e9356e52..4e09e0e2e422 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -53,10 +53,12 @@ private:
MultiLineEdit aCopyrightText;
svt::FixedHyperlink aInfoLink;
- String aVersionData;
- String aVersionTextStr;
- String aCopyrightTextStr;
- String aLinkStr;
+ String aVersionData;
+ String aVersionTextStr;
+ String m_aVendorTextStr;
+ String m_aOracleCopyrightTextStr;
+ String m_aAcknowledgementTextStr;
+ String m_aLinkStr;
String m_sBuildStr;
protected: