Author: jsc
Date: Tue May 21 05:53:21 2013
New Revision: 1484665
URL: http://svn.apache.org/r1484665
Log:
#122265# split resource string to get more flexibility and drop general
copyright from translation, remains untranslated
Modified:
openoffice/trunk/main/cui/source/dialogs/about.cxx
openoffice/trunk/main/cui/source/dialogs/about.hrc
openoffice/trunk/main/cui/source/dialogs/about.src
openoffice/trunk/main/cui/source/dialogs/makefile.mk
Modified: openoffice/trunk/main/cui/source/dialogs/about.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/dialogs/about.cxx?rev=1484665&r1=1484664&r2=1484665&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/dialogs/about.cxx (original)
+++ openoffice/trunk/main/cui/source/dialogs/about.cxx Tue May 21 05:53:21 2013
@@ -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* pParen
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
Modified: openoffice/trunk/main/cui/source/dialogs/about.hrc
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/dialogs/about.hrc?rev=1484665&r1=1484664&r2=1484665&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/dialogs/about.hrc (original)
+++ openoffice/trunk/main/cui/source/dialogs/about.hrc Tue May 21 05:53:21 2013
@@ -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
Modified: openoffice/trunk/main/cui/source/dialogs/about.src
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/dialogs/about.src?rev=1484665&r1=1484664&r2=1484665&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/dialogs/about.src (original)
+++ openoffice/trunk/main/cui/source/dialogs/about.src Tue May 21 05:53:21 2013
@@ -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";
};
};
Modified: openoffice/trunk/main/cui/source/dialogs/makefile.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/cui/source/dialogs/makefile.mk?rev=1484665&r1=1484664&r2=1484665&view=diff
==============================================================================
--- openoffice/trunk/main/cui/source/dialogs/makefile.mk (original)
+++ openoffice/trunk/main/cui/source/dialogs/makefile.mk Tue May 21 05:53:21
2013
@@ -38,6 +38,10 @@ CFLAGS+= -DENABLE_LAYOUT=1 -I../$(PRJ)/l
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