summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2010-09-24 13:33:29 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2010-09-28 08:44:14 +0200
commitbd228119d9e99b423279dcc88df149397f432d0c (patch)
tree08ead2a8bb0199f4570498a9bfc171bc8e58085d
parent0f0e8248dc92ebd2a620cd32eec78acfeb78cdf9 (diff)
Replace the "Help Support" menu item by the "License Information" one
-rw-r--r--framework/uiconfig/startmodule/menubar/menubar.xml2
-rwxr-xr-xofficecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu4
-rwxr-xr-xreadlicense_oo/makefile.mk4
-rw-r--r--readlicense_oo/odt/LICENSE.odtbin0 -> 156181 bytes
-rw-r--r--readlicense_oo/odt/makefile.mk46
-rw-r--r--readlicense_oo/prj/build.lst1
-rw-r--r--readlicense_oo/prj/d.lst4
-rw-r--r--sfx2/inc/sfx2/sfxsids.hrc2
-rw-r--r--sfx2/sdi/appslots.sdi2
-rwxr-xr-xsfx2/sdi/sfx.sdi2
-rw-r--r--sfx2/source/appl/appserv.cxx57
-rw-r--r--svx/inc/globlmn_tmpl.hrc12
12 files changed, 110 insertions, 26 deletions
diff --git a/framework/uiconfig/startmodule/menubar/menubar.xml b/framework/uiconfig/startmodule/menubar/menubar.xml
index e9a0f333f4..b7bcbd51c2 100644
--- a/framework/uiconfig/startmodule/menubar/menubar.xml
+++ b/framework/uiconfig/startmodule/menubar/menubar.xml
@@ -74,7 +74,7 @@
<menu:menuitem menu:id=".uno:HelpIndex"/>
<menu:menuitem menu:id=".uno:ExtendedHelp"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
+ <menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 2efbaaa703..e154a5ea4b 100755
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -4140,9 +4140,9 @@
<value xml:lang="en-US">Optio~n Bar</value>
</prop>
</node>
- <node oor:name=".uno:HelpSupport" oor:op="replace">
+ <node oor:name=".uno:ShowLicense" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Support</value>
+ <value xml:lang="en-US">License Information...</value>
</prop>
</node>
<node oor:name=".uno:StatusBarVisible" oor:op="replace">
diff --git a/readlicense_oo/makefile.mk b/readlicense_oo/makefile.mk
index bb6eff9cbd..0568a98bdf 100755
--- a/readlicense_oo/makefile.mk
+++ b/readlicense_oo/makefile.mk
@@ -46,3 +46,7 @@ $(SYSLICDEST)$/LICENSE_en-US : source$/license$/license_en-US.txt
$(SYSLICDEST)$/LICENSE_en-US.html : source$/license$/license_en-US.html
@-$(MKDIRHIER) $(SYSLICDEST)
$(COPY) $< $@
+
+$(SYSLICDEST)$/LICENSE.odt : source$/license$/license.odt
+ @-$(MKDIRHIER) $(SYSLICDEST)
+ $(COPY) $< $@
diff --git a/readlicense_oo/odt/LICENSE.odt b/readlicense_oo/odt/LICENSE.odt
new file mode 100644
index 0000000000..e2e383ab10
--- /dev/null
+++ b/readlicense_oo/odt/LICENSE.odt
Binary files differ
diff --git a/readlicense_oo/odt/makefile.mk b/readlicense_oo/odt/makefile.mk
new file mode 100644
index 0000000000..1e68a1722e
--- /dev/null
+++ b/readlicense_oo/odt/makefile.mk
@@ -0,0 +1,46 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..
+
+PRJNAME=readlicense_oo
+TARGET=odt
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files --------------------------------------------------------
+
+all: $(MISC)$/LICENSE.odt
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+$(MISC)$/LICENSE.odt: LICENSE.odt
+ $(COPY) LICENSE.odt $@
diff --git a/readlicense_oo/prj/build.lst b/readlicense_oo/prj/build.lst
index 987672db4e..0f484d01c3 100644
--- a/readlicense_oo/prj/build.lst
+++ b/readlicense_oo/prj/build.lst
@@ -2,5 +2,6 @@ ro readlicense_oo : l10n solenv LIBXSLT:libxslt NULL
ro readlicense_oo usr1 - all ro_root NULL
ro readlicense_oo\docs\readme nmake - all ro_readme NULL
ro readlicense_oo\html nmake - all ro_html NULL
+ro readlicense_oo\odt nmake - all ro_odt NULL
ro readlicense_oo nmake - all ro_conv NULL
diff --git a/readlicense_oo/prj/d.lst b/readlicense_oo/prj/d.lst
index 4c0ab675d6..2a368beb78 100644
--- a/readlicense_oo/prj/d.lst
+++ b/readlicense_oo/prj/d.lst
@@ -10,6 +10,8 @@ dos: echo =====================================================================
# FIXME: is - can you solve this?
..\%__SRC%\misc\license\unx\LICENSE* %_DEST%\bin%_EXT%\osl
..\%__SRC%\misc\license\unx\LICENSE*.html %_DEST%\bin%_EXT%\osl
+..\%__SRC%\misc\license\unx\LICENSE*.odt %_DEST%\bin%_EXT%\osl
+..\%__SRC%\misc\license\wnt\LICENSE*.odt %_DEST%\bin%_EXT%\osl
..\%__SRC%\misc\license\wnt\license*.txt %_DEST%\bin%_EXT%\osl
..\%__SRC%\misc\license\wnt\license*.html %_DEST%\bin%_EXT%\osl
..\%__SRC%\misc\license\wnt\license*.rtf %_DEST%\bin%_EXT%\osl
@@ -24,6 +26,8 @@ mkdir: %_DEST%\bin%_EXT%\ure
# Why? It comes from cws_src680_langsupporter.
..\%__SRC%\misc\THIRDPARTYLICENSEREADME.html %_DEST%\bin%_EXT%\THIRDPARTYLICENSEREADME.html
+..\%__SRC%\misc\LICENSE.odt %_DEST%\bin%_EXT%\LICENSE.odt
+
dos: echo =====================================================================
dos: echo Delivering README files
dos: echo =====================================================================
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index 358e05ca2b..47dfb336a0 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -124,7 +124,7 @@
#define SID_HELP_ZOOMOUT (SID_SFX_START + 418)
#define SID_HELP_HELPFILEBOX (SID_SFX_START + 419)
#define SID_HELP_HELPFILEBOX_SELECTED (SID_SFX_START + 420)
-#define SID_HELP_SUPPORTPAGE (SID_SFX_START + 1683)
+#define SID_SHOW_LICENSE (SID_SFX_START + 1683)
#define SID_HELP_TUTORIALS (SID_SFX_START + 1695)
// default-ids for document
diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi
index b80d93e3d4..6b736dac6a 100644
--- a/sfx2/sdi/appslots.sdi
+++ b/sfx2/sdi/appslots.sdi
@@ -167,7 +167,7 @@ interface Application
ExecMethod = MiscExec_Impl ;
StateMethod = MiscState_Impl ;
]
- SID_HELP_SUPPORTPAGE
+ SID_SHOW_LICENSE
[
ExecMethod = MiscExec_Impl ;
]
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 15d6f7b607..54e54cbab0 100755
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -7366,7 +7366,7 @@ SfxVoidItem UpdateConfiguration SID_UPDATE_CONFIG
]
//--------------------------------------------------------------------------
-SfxVoidItem HelpSupport SID_HELP_SUPPORTPAGE
+SfxVoidItem ShowLicense SID_SHOW_LICENSE
()
[
/* flags: */
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 837f5be86c..623d92dd5a 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -51,6 +51,8 @@
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/system/SystemShellExecuteException.hpp>
+#include <com/sun/star/frame/XComponentLoader.hpp>
+
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include "comphelper/configurationhelper.hxx"
@@ -74,6 +76,7 @@
#include <vcl/help.hxx>
#include <vcl/stdtext.hxx>
#include <rtl/ustrbuf.hxx>
+#include <osl/file.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/moduleoptions.hxx>
@@ -158,6 +161,23 @@ long QuitAgain_Impl( void* pObj, void* pArg )
return 0;
}
+namespace {
+ sal_Bool checkURL( const char *pName, rtl::OUString &rURL )
+ {
+ using namespace osl;
+ DirectoryItem aDirItem;
+
+ rURL = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/") );
+ rURL += rtl::OUString::createFromAscii( pName );
+ rtl::Bootstrap::expandMacros( rURL );
+
+ if (rURL.getLength() != 0)
+ return DirectoryItem::get( rURL, aDirItem ) == DirectoryItem::E_None;
+ else
+ return sal_False;
+ }
+}
+
void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
{
DBG_MEMTEST();
@@ -340,26 +360,35 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
break;
}
+ case SID_SHOW_LICENSE:
+ {
+ try {
+ Reference < XComponentLoader > xLoader( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ), UNO_QUERY );
+ Sequence < com::sun::star::beans::PropertyValue > args(2);
+ args[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ViewOnly"));
+ args[0].Value <<= sal_True;
+ args[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
+ args[1].Value <<= sal_True;
+
+ rtl::OUString aURL;
+ if ( checkURL ( "LICENSE.odt", aURL ) ||
+ checkURL ( "LICENSE.html", aURL ) ||
+ checkURL ( "LICENSE", aURL ) ) {
+ xLoader->loadComponentFromURL( aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_blank")), 0, args );
+ }
+ } catch (const ::com::sun::star::uno::Exception &) {
+ }
+ break;
+ }
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_HELPINDEX:
- case SID_HELP_SUPPORTPAGE:
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
- ULONG nHelpId = ( rReq.GetSlot() == SID_HELP_SUPPORTPAGE ) ? 66056 : 0;
- if ( 66056 == nHelpId )
- {
- // show Support page with new URL
- String sHelpURL = SfxHelp::CreateHelpURL( nHelpId, String() );
- String sParams = sHelpURL.Copy( sHelpURL.Search( '?' ) );
- sHelpURL = String::CreateFromAscii("vnd.sun.star.help://shared/text/shared/05/00000001.xhp");
- sHelpURL += sParams;
- sHelpURL += String::CreateFromAscii("&UseDB=no");
- pHelp->Start( sHelpURL, NULL );
- }
- else
- pHelp->Start( nHelpId, NULL ); // show start page
+ ULONG nHelpId = 0;
+ pHelp->Start( nHelpId, NULL ); // show start page
bDone = TRUE;
}
break;
diff --git a/svx/inc/globlmn_tmpl.hrc b/svx/inc/globlmn_tmpl.hrc
index 2a3c5c411b..51e70b18b7 100644
--- a/svx/inc/globlmn_tmpl.hrc
+++ b/svx/inc/globlmn_tmpl.hrc
@@ -1049,11 +1049,11 @@
HelpID = SID_HELPBALLOONS ; \
Text [ en-US ] = "~Extended Tips" ; \
-#define ITEM_HELP_SUPPORTPAGE \
- Identifier = SID_HELP_SUPPORTPAGE ; \
- Command = ".uno:HelpSupport" ; \
- HelpID = SID_HELP_SUPPORTPAGE ; \
- Text [ en-US ] = "~Support" ; \
+#define ITEM_SHOW_LICENSE \
+ Identifier = SID_SHOW_LICENSE ; \
+ Command = ".uno:ShowLicense" ; \
+ HelpID = SID_SHOW_LICENSE ; \
+ Text [ en-US ] = "License information..." ; \
#define ITEM_HELP_ONLINE_REGISTRATION \
Identifier = SID_ONLINE_REGISTRATION ; \
@@ -1106,7 +1106,7 @@
};\
MenuItem\
{\
- ITEM_HELP_SUPPORTPAGE\
+ ITEM_SHOW_MENU\
};\
MenuItem\
{\