[Libreoffice-commits] core.git: Branch 'aoo/trunk' - cui/source
Jürgen Schmidt
jsc at apache.org
Mon May 20 23:07:04 PDT 2013
cui/source/dialogs/about.cxx | 40 +++++++++++++++++++++++++++++++++++++---
cui/source/dialogs/about.hrc | 19 +++++++++++--------
cui/source/dialogs/about.src | 16 ++++++++++++++--
cui/source/dialogs/makefile.mk | 4 ++++
4 files changed, 66 insertions(+), 13 deletions(-)
New commits:
commit 11f657e989d677f53609af82f9002f50f064953e
Author: Jürgen Schmidt <jsc at apache.org>
Date: Tue May 21 05:53:21 2013 +0000
#122265# split resource string to get more flexibility and drop general copyright from translation, remains untranslated
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 3b586d0..7dfe13d 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -28,6 +28,7 @@
#include <dialmgr.hxx>
#include <osl/file.hxx>
#include <rtl/bootstrap.hxx>
+//#include <rtl/ustrbuf.hxx>
#include <sfx2/sfxcommands.h>
#include <sfx2/sfxdefs.hxx>
#include <sfx2/sfxuno.hxx>
@@ -279,15 +280,15 @@ namespace
// -----------------------------------------------------------------------
-AboutDialog::AboutDialog( Window* pParent, const ResId& rId ) :
+AboutDialog::AboutDialog( Window* pParent, const ResId & rId ) :
SfxModalDialog( pParent, rId ),
maOKButton( this, ResId( RID_CUI_ABOUT_BTN_OK, *rId.GetResMgr() ) ),
maReadmeButton( this, ResId( RID_CUI_ABOUT_BTN_README, *rId.GetResMgr() ) ),
maVersionText( this, ResId( RID_CUI_ABOUT_FTXT_VERSION, *rId.GetResMgr() ) ),
maBuildInfoEdit( this, ResId( RID_CUI_ABOUT_FTXT_BUILDDATA, *rId.GetResMgr() ) ),
maCopyrightEdit( this, ResId( RID_CUI_ABOUT_FTXT_COPYRIGHT, *rId.GetResMgr() ) ),
- maCreditsLink( this, ResId( RID_CUI_ABOUT_FTXT_WELCOME_LINK, *rId.GetResMgr() ) ),
- maCopyrightTextStr( ResId( RID_CUI_ABOUT_STR_COPYRIGHT, *rId.GetResMgr() ) )
+ maCreditsLink( this, ResId( RID_CUI_ABOUT_FTXT_WELCOME_LINK, *rId.GetResMgr() ) )
+// maCopyrightTextStr( ResId( RID_CUI_ABOUT_STR_COPYRIGHT, *rId.GetResMgr() ) )
{
bool bLoad = vcl::ImageRepository::loadBrandingImage(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("about")),
@@ -299,6 +300,39 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId ) :
maMainLogo );
OSL_ENSURE( bLoad, "Can't load logo image");
+ const String vendor( ResId( RID_CUI_ABOUT_STR_COPYRIGHT_VENDOR, *rId.GetResMgr() ) );
+ String createdRes( ResId( RID_CUI_ABOUT_STR_CREATED, *rId.GetResMgr() ) );
+ if ( !vendor.EqualsAscii("Apache Software Foundation") ) {
+ createdRes = String( ResId( RID_CUI_ABOUT_STR_CREATED_VENDOR, *rId.GetResMgr() ));
+ }
+ const String copyrightAcknowledge( ResId( RID_CUI_ABOUT_STR_ACKNOWLEDGE, *rId.GetResMgr() ) );
+
+ rtl::OUStringBuffer sbcopyright(250);
+ sbcopyright.appendAscii("Copyright ");
+ sbcopyright.append((sal_Unicode)0x00a9);
+ sbcopyright.appendAscii(" ");
+ rtl::OUString sYear( RTL_CONSTASCII_USTRINGPARAM("2013") );
+ if (vendor.EqualsAscii("Apache Software Foundation")) {
+ sbcopyright.append(sYear);
+ sbcopyright.appendAscii(" The Apache Software Foundation.\n\n");
+ } else {
+#ifdef COPYRIGHT_YEAR
+ const rtl::OUString sDefYear( RTL_CONSTASCII_USTRINGPARAM( STRINGIFY( COPYRIGHT_YEAR ) ) );
+ if ( sDefYear.getLength() > 0 )
+ {
+ sYear = sDefYear;
+ }
+#endif
+ sbcopyright.append(sYear);
+ sbcopyright.appendAscii(" ");
+ sbcopyright.append(vendor);
+ sbcopyright.appendAscii(".\nPortion copyright The Apache Software Foundation.\n\n");
+ }
+ sbcopyright.append( createdRes );
+ sbcopyright.appendAscii("\n\n");
+ sbcopyright.append( copyrightAcknowledge );
+ maCopyrightTextStr = sbcopyright.makeStringAndClear();
+
InitControls();
// set links
diff --git a/cui/source/dialogs/about.hrc b/cui/source/dialogs/about.hrc
index fa2cbfb..9944a58 100644
--- a/cui/source/dialogs/about.hrc
+++ b/cui/source/dialogs/about.hrc
@@ -28,12 +28,15 @@
#define RID_CUI_ABOUT_FTXT_VERSION 3
#define RID_CUI_ABOUT_FTXT_COPYRIGHT 4
#define RID_CUI_ABOUT_FTXT_BUILDDATA 5
-#define RID_CUI_ABOUT_STR_COPYRIGHT 6
-#define RID_CUI_ABOUT_FTXT_WELCOME_LINK 7
+#define RID_CUI_ABOUT_STR_COPYRIGHT_VENDOR 6
+#define RID_CUI_ABOUT_STR_CREATED 7
+#define RID_CUI_ABOUT_STR_CREATED_VENDOR 8
+#define RID_CUI_ABOUT_STR_ACKNOWLEDGE 9
+#define RID_CUI_ABOUT_FTXT_WELCOME_LINK 10
-#define RID_CUI_README_TBCTL 8
-#define RID_CUI_README_OKBTN 9
-#define RID_CUI_READMEPAGE 10
-#define RID_CUI_LICENSEPAGE 11
-#define RID_CUI_NOTICEPAGE 12
-#define RID_CUI_README_TBPAGE_EDIT 13
+#define RID_CUI_README_TBCTL 20
+#define RID_CUI_README_OKBTN 21
+#define RID_CUI_READMEPAGE 22
+#define RID_CUI_LICENSEPAGE 23
+#define RID_CUI_NOTICEPAGE 24
+#define RID_CUI_README_TBPAGE_EDIT 25
diff --git a/cui/source/dialogs/about.src b/cui/source/dialogs/about.src
index f70fd4a..4b10ac9 100644
--- a/cui/source/dialogs/about.src
+++ b/cui/source/dialogs/about.src
@@ -71,9 +71,21 @@ ModalDialog RID_DEFAULTABOUT
Left = TRUE ;
Text = "http://www.openoffice.org/welcome/credits.html";
};
- String RID_CUI_ABOUT_STR_COPYRIGHT
+ String RID_CUI_ABOUT_STR_COPYRIGHT_VENDOR
{
- Text[ en-US ] = "Copyright © 2012 Apache Software Foundation.\nAll rights reserved.\n\nThis product was created by %OOOVENDOR, based on Apache OpenOffice.\nApache OpenOffice acknowledges all community members, especially those mentioned at";
+ Text[ en-US ] = "%OOOVENDOR";
+ };
+ String RID_CUI_ABOUT_STR_CREATED
+ {
+ Text[ en-US ] = "This product was created by the OpenOffice community.";
+ };
+ String RID_CUI_ABOUT_STR_CREATED_VENDOR
+ {
+ Text[ en-US ] = "This product was created by %OOOVENDOR, based on Apache OpenOffice.";
+ };
+ String RID_CUI_ABOUT_STR_ACKNOWLEDGE
+ {
+ Text[ en-US ] = "The OpenOffice community acknowledges all contributing members, especially those mentioned at";
};
};
diff --git a/cui/source/dialogs/makefile.mk b/cui/source/dialogs/makefile.mk
index d10bd6e..03a657f 100644
--- a/cui/source/dialogs/makefile.mk
+++ b/cui/source/dialogs/makefile.mk
@@ -38,6 +38,10 @@ CFLAGS+= -DENABLE_LAYOUT=1 -I../$(PRJ)/layout/inc -I../$(PRJ)/layout/$(INPATH)/i
CFLAGS+= -DBUILD_VER_STRING="$(BUILD_VER_STRING)"
.ENDIF
+# compile date (year) = copyright year used in About dialog
+CFLAGS+= -DCOPYRIGHT_YEAR="$(shell date +"%Y")"
+
+
# --- Files --------------------------------------------------------
SRS1NAME=dialogs
More information about the Libreoffice-commits
mailing list