[Libreoffice-commits] .: 2 commits - officecfg/registry sfx2/inc sfx2/source svx/source

Thorsten Behrens thorsten at kemper.freedesktop.org
Tue Oct 19 09:16:42 PDT 2010


 officecfg/registry/data/org/openoffice/Office/ExtensionManager.xcu          |    2 
 officecfg/registry/schema/org/openoffice/Office/OOoImprovement/Settings.xcs |    4 
 sfx2/inc/about.hxx                                                          |    9 -
 sfx2/inc/sfx2/sfx.hrc                                                       |    2 
 sfx2/source/dialog/about.cxx                                                |   77 +++++++---
 sfx2/source/dialog/makefile.mk                                              |    2 
 svx/source/intro/ooo.src                                                    |   16 +-
 7 files changed, 84 insertions(+), 28 deletions(-)

New commits:
commit c1682cff47ffe2ac7f12fcc7b61b29fc3cc5f34f
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Tue Oct 19 16:10:39 2010 +0200

    Switch all urls from TDF to LibreOffice
    
    Additionally, fixes fdo#30667 with new about dialog text, and a
    link to http://libreoffice.org/credits.html

diff --git a/officecfg/registry/data/org/openoffice/Office/ExtensionManager.xcu b/officecfg/registry/data/org/openoffice/Office/ExtensionManager.xcu
index bc55109..c8f5c57 100644
--- a/officecfg/registry/data/org/openoffice/Office/ExtensionManager.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/ExtensionManager.xcu
@@ -29,7 +29,7 @@
 <oor:component-data xmlns:oor="http://openoffice.org/2001/registry" oor:name="ExtensionManager" oor:package="org.openoffice.Office">
   <node oor:name="ExtensionRepositories">
     <prop oor:name="WebsiteLink">
-      <value>http://extensions.documentfoundation.org/</value>
+      <value>http://extensions.libreoffice.org/</value>
     </prop>
   </node>
 </oor:component-data>
diff --git a/officecfg/registry/schema/org/openoffice/Office/OOoImprovement/Settings.xcs b/officecfg/registry/schema/org/openoffice/Office/OOoImprovement/Settings.xcs
index 7ff9146..e2d420a 100755
--- a/officecfg/registry/schema/org/openoffice/Office/OOoImprovement/Settings.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/OOoImprovement/Settings.xcs
@@ -40,7 +40,7 @@
         <info>
           <desc>the url where additional infomation can be found.</desc>
         </info>
-        <value>http://wiki.services.openoffice.org/wiki/User_Experience/OpenOffice.org_User_Feedback_Program</value>
+        <value>http://wiki.documentfoundation.org/UX/LibreOffice_User_Feedback_Program</value>
       </prop>
     </group>
     <group oor:name="Counters">
@@ -74,7 +74,7 @@
         <info>
           <desc>the url where reports get send to.</desc>
         </info>
-        <value>http://report.services.openoffice.org:80/soap/servlet/rpcrouter</value>
+        <value>http://report.libreoffice.org:80/soap/servlet/rpcrouter</value>
       </prop>
       <prop oor:name="SoapIdAdditions" oor:type="xs:string">
         <info>
diff --git a/svx/source/intro/ooo.src b/svx/source/intro/ooo.src
index 91873cf..962e1cd 100644
--- a/svx/source/intro/ooo.src
+++ b/svx/source/intro/ooo.src
@@ -1,4 +1,4 @@
-/*************************************************************************
+/*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  * 
@@ -107,11 +107,11 @@ ModalDialog RID_DEFAULTABOUT
     };
     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, please find more info at the link below.";	
+        Text[ en-US ] = "Copyright © 2000, 2010 LibreOffice contributors and/or their affiliates. All rights reserved.\nThis product was created by %OOOVENDOR, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.\n%OOOVENDOR acknowledges all community members, please find more info at the link below:"
     };
     String ABOUT_STR_LINK
     {
-        Text[ en-US ] = "http://www.openoffice.org/welcome/credits.html";
+        Text[ en-US ] = "http://libreoffice.org/credits.html";
     };
     StringArray ABOUT_STR_DEVELOPER_ARY
     {
commit 62fd25b08af40c1a6d14c6a6d58ab2bdd238bc03
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Tue Oct 19 15:39:01 2010 +0200

    Make about dialog display clickable hyperlink for credits
    
    Added a svt::FixedHyperlink to the about dialog, so people can
    click on something to get to the credits page.

diff --git a/sfx2/inc/about.hxx b/sfx2/inc/about.hxx
index 2d6960c..901807e 100644
--- a/sfx2/inc/about.hxx
+++ b/sfx2/inc/about.hxx
@@ -35,6 +35,7 @@
 #include <svtools/svmedit.hxx>
 #include <tools/list.hxx>
 #include <svtools/stdctrl.hxx>
+#include "svtools/fixedhyper.hxx"
 #include <sfx2/basedlgs.hxx>		// SfxModalDialog
 
 DECLARE_LIST( AccelList, Accelerator* )
@@ -47,9 +48,9 @@ private:
     OKButton    	aOKButton;
     Image			aAppLogo;
 
-    MultiLineEdit   	aVersionText;
-    MultiLineEdit  	aCopyrightText;
-    FixedInfo   	aBuildData;
+    MultiLineEdit       aVersionText;
+    MultiLineEdit       aCopyrightText;
+    svt::FixedHyperlink aInfoLink;
 
     ResStringArray	aDeveloperAry;
     String			aDevVersionStr;
@@ -57,6 +58,7 @@ private:
     String			aVersionData;
     String          aVersionTextStr;
     String          aCopyrightTextStr;
+    String          aLinkStr;
 
     AccelList 		aAccelList;
 
@@ -77,6 +79,7 @@ public:
 
     DECL_LINK( TimerHdl, Timer * );
     DECL_LINK( AccelSelectHdl, Accelerator * );
+    DECL_LINK( HandleHyperlink, svt::FixedHyperlink * );
 };
 
 #endif // #ifndef _ABOUT_HXX
diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc
index e6a900e..631b0ee 100755
--- a/sfx2/inc/sfx2/sfx.hrc
+++ b/sfx2/inc/sfx2/sfx.hrc
@@ -212,12 +212,14 @@
 
 #define ABOUT_FTXT_VERSION                  1
 #define ABOUT_FTXT_COPYRIGHT                2
+#define ABOUT_FTXT_LINK                     3
 
 #define ABOUT_STR_DEVELOPER_ARY             1
 #define ABOUT_STR_FRENCH_COPYRIGHT          2
 #define ABOUT_STR_ACCEL                     3
 #define ABOUT_STR_VERSION					4
 #define ABOUT_STR_COPYRIGHT					5
+#define ABOUT_STR_LINK					    6
 
 #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 b047a09..a6360e1 100644
--- a/sfx2/source/dialog/about.cxx
+++ b/sfx2/source/dialog/about.cxx
@@ -45,6 +45,13 @@
 #include <vcl/graph.hxx>
 #include <svtools/filter.hxx>
 
+#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
+#include "com/sun/star/system/XSystemShellExecute.hpp"
+#include <comphelper/processfactory.hxx>
+#include "comphelper/anytostring.hxx"
+#include "cppuhelper/exc_hlp.hxx"
+#include "cppuhelper/bootstrap.hxx"
+
 #include <sfx2/sfxuno.hxx>
 #include "about.hxx"
 #include "sfxresid.hxx"
@@ -53,6 +60,8 @@
 
 #include "dialog.hrc"
 
+using namespace ::com::sun::star;
+
 // defines ---------------------------------------------------------------
 
 #define SCROLL_OFFSET	1
@@ -76,13 +85,13 @@ 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 ),
+    aInfoLink       ( this,     ResId( ABOUT_FTXT_LINK, *rId.GetResMgr() ) ),
     aDeveloperAry	( 			ResId( ABOUT_STR_DEVELOPER_ARY, *rId.GetResMgr() ) ),
     aDevVersionStr	( rVerStr ),
     aAccelStr		( 			ResId( ABOUT_STR_ACCEL, *rId.GetResMgr() ) ),
-    aVersionTextStr(          ResId( ABOUT_STR_VERSION, *rId.GetResMgr() ) ),
+    aVersionTextStr(            ResId( ABOUT_STR_VERSION, *rId.GetResMgr() ) ),
     aCopyrightTextStr(          ResId( ABOUT_STR_COPYRIGHT, *rId.GetResMgr() ) ),
+    aLinkStr        (           ResId( ABOUT_STR_LINK, *rId.GetResMgr() ) ),
     aTimer          (),
     nOff            ( 0 ),
     m_nDeltaWidth   ( 0 ),
@@ -147,24 +156,13 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
 
     aVersionText.SetBackground();
     aCopyrightText.SetBackground();
+    aInfoLink.SetURL( aLinkStr );
+    aInfoLink.SetBackground();
+    aInfoLink.SetClickHdl( LINK( this, AboutDialog, HandleHyperlink ) );
 
     Color aTextColor( rSettings.GetWindowTextColor() );
     aVersionText.SetControlForeground( aTextColor );
     aCopyrightText.SetControlForeground( aTextColor );
-    aBuildData.SetBackground( aWall );
-
-    Font aSmallFont = rSettings.GetInfoFont();
-    Size aSmaller = aNewFont.GetSize();
-    aSmaller.Width() = (long) (aSmaller.Width() * 0.75);
-    aSmaller.Height() = (long) (aSmaller.Height() * 0.75);
-    aNewFont.SetSize( aSmaller );
-    aBuildData.SetFont( aNewFont );
-    aBuildData.SetBackground( aWall );
-    // 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 );
 
@@ -197,17 +195,29 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS
     Size aOKSiz = aOKButton.GetSizePixel();
     Point aOKPnt = aOKButton.GetPosPixel();
     
+    // FixedHyperlink with more info link
+    Point aLinkPnt = aInfoLink.GetPosPixel();
+    Size aLinkSize = aInfoLink.GetSizePixel();
+
     // Multiline edit with Copyright-Text
     Point aCopyPnt = aCopyrightText.GetPosPixel();
     Size aCopySize = aCopyrightText.GetSizePixel();
     aCopySize.Width()  = nTextWidth;
-    aCopySize.Height() = aOutSiz.Height() - nY - ( aOKSiz.Height() * 2 ) - nCtrlMargin;
+    aCopySize.Height() = aOutSiz.Height() - nY - ( aOKSiz.Height() * 2 ) - 3*aLinkSize.Height() - nCtrlMargin;
 
     aCopyPnt.X() = ( aOutSiz.Width() - aCopySize.Width() ) / 2;
     aCopyPnt.Y() = nY;
     aCopyrightText.SetPosSizePixel( aCopyPnt, aCopySize );
 
-    nY += aCopySize.Height() + nCtrlMargin;
+    nY += aCopySize.Height() + aLinkSize.Height();
+
+    aLinkSize.Width() = aInfoLink.CalcMinimumSize().Width();
+    aLinkPnt.X() = ( aOutSiz.Width() - aLinkSize.Width() ) / 2;
+    aLinkPnt.Y() = nY;
+    aInfoLink.SetPosSizePixel( aLinkPnt, aLinkSize );
+
+    nY += aLinkSize.Height() + nCtrlMargin;
+
     aOKPnt.X() = ( aOutSiz.Width() - aOKSiz.Width() ) / 2;
     aOKPnt.Y() = nY;
     aOKButton.SetPosPixel( aOKPnt );
@@ -276,6 +286,35 @@ IMPL_LINK( AboutDialog, AccelSelectHdl, Accelerator *, pAccelerator )
 
 // -----------------------------------------------------------------------
 
+IMPL_LINK( AboutDialog, HandleHyperlink, svt::FixedHyperlink*, pHyperlink )
+{
+    rtl::OUString sURL=pHyperlink->GetURL();
+    rtl::OUString sTitle=GetText();
+
+    if ( ! sURL.getLength() ) // Nothing to do, when the URL is empty
+        return 1;
+    try 
+    {
+        uno::Reference< system::XSystemShellExecute > xSystemShellExecute(
+            ::comphelper::getProcessServiceFactory()->createInstance(
+                DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), uno::UNO_QUERY_THROW );
+        xSystemShellExecute->execute( sURL, rtl::OUString(),  system::SystemShellExecuteFlags::DEFAULTS );
+    }
+    catch ( uno::Exception& )
+    {
+        uno::Any exc( ::cppu::getCaughtException() );
+        rtl::OUString msg( ::comphelper::anyToString( exc ) );
+        const ::vos::OGuard guard( Application::GetSolarMutex() );
+        ErrorBox aErrorBox( NULL, WB_OK, msg );
+        aErrorBox.SetText( sTitle );
+        aErrorBox.Execute();
+    }
+
+    return 1;
+}
+
+// -----------------------------------------------------------------------
+
 BOOL AboutDialog::Close()
 {
     // stop Timer and finish the dialog
diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk
index b53e3ae..2643f66 100755
--- a/sfx2/source/dialog/makefile.mk
+++ b/sfx2/source/dialog/makefile.mk
@@ -37,6 +37,7 @@ TARGET=dialog
 # --- Files --------------------------------------------------------------
 
 EXCEPTIONSFILES=\
+        $(SLO)$/about.obj           \
         $(SLO)$/filedlghelper.obj	\
         $(SLO)$/filtergrouping.obj	\
         $(SLO)$/itemconnect.obj     \
@@ -50,7 +51,6 @@ EXCEPTIONSFILES=\
 
 SLOFILES =\
         $(EXCEPTIONSFILES)			\
-        $(SLO)$/about.obj           \
         $(SLO)$/alienwarn.obj       \
         $(SLO)$/basedlgs.obj		\
         $(SLO)$/dinfedt.obj			\
diff --git a/svx/source/intro/ooo.src b/svx/source/intro/ooo.src
index 008c55b..91873cf 100644
--- a/svx/source/intro/ooo.src
+++ b/svx/source/intro/ooo.src
@@ -93,13 +93,25 @@ ModalDialog RID_DEFAULTABOUT
         ReadOnly = TRUE ;
         AutoVScroll = TRUE ;
     };
+    FixedText ABOUT_FTXT_LINK
+    {
+        NoLabel = TRUE;
+        TabStop = TRUE;
+        Text [ en-US ] = "Contributor credits";
+        Pos = MAP_APPFONT ( 54 , 80 ) ;
+        Size = MAP_APPFONT ( 168 , 10 ) ;
+    };
     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.";	
+        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, please find more info at the link below.";	
+    };
+    String ABOUT_STR_LINK
+    {
+        Text[ en-US ] = "http://www.openoffice.org/welcome/credits.html";
     };
     StringArray ABOUT_STR_DEVELOPER_ARY
     {


More information about the Libreoffice-commits mailing list