Webservice URLs now point to documentfoundation
Changed places referencing OOo webservices to refer to *.documentfoundation.org instead. Also, append coutry string to URL. Consolidated all places that did this country string appending into svtools/langhelp helper method.
This commit is contained in:
parent
2f0d406911
commit
c0ad15ac44
4 changed files with 90 additions and 1 deletions
42
svtools/inc/svtools/langhelp.hxx
Normal file
42
svtools/inc/svtools/langhelp.hxx
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*************************************************************************
|
||||
*
|
||||
* Copyright 2010 Novell, Inc.
|
||||
*
|
||||
* 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
|
||||
* or later, 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.
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#ifndef _SVTOOLS_LANGHELP_HXX_
|
||||
#define _SVTOOLS_LANGHELP_HXX_
|
||||
|
||||
#include <svtools/svtdllapi.h>
|
||||
|
||||
namespace rtl { class OUString; }
|
||||
|
||||
/** Localize a URI to one of the foundation's webservices
|
||||
|
||||
@param io_rURI
|
||||
URI to localize - depending on your UI locale, a country local
|
||||
part is appended to the URI (like "en", or "fr", or "es")
|
||||
*/
|
||||
SVT_DLLPUBLIC void localizeWebserviceURI( ::rtl::OUString& io_rURI );
|
||||
|
||||
#endif
|
||||
|
|
@ -30,6 +30,7 @@
|
|||
#include "templwin.hxx"
|
||||
#include "templdlg.hxx"
|
||||
#include <svtools/svtdata.hxx>
|
||||
#include <svtools/langhelp.hxx>
|
||||
#include <unotools/pathoptions.hxx>
|
||||
#include <unotools/dynamicmenuoptions.hxx>
|
||||
#include <unotools/extendedsecurityoptions.hxx>
|
||||
|
@ -1739,7 +1740,7 @@ void SvtDocumentTemplateDialog::InitImpl( )
|
|||
if ( !bHideLink )
|
||||
{
|
||||
aMoreTemplatesLink.SetURL( String(
|
||||
RTL_CONSTASCII_STRINGPARAM( "http://templates.services.openoffice.org/?cid=923508" ) ) );
|
||||
RTL_CONSTASCII_STRINGPARAM( "http://templates.documentfoundation.org/" ) ) );
|
||||
aMoreTemplatesLink.SetClickHdl( LINK( this, SvtDocumentTemplateDialog, OpenLinkHdl_Impl ) );
|
||||
}
|
||||
else
|
||||
|
@ -1988,6 +1989,7 @@ IMPL_LINK ( SvtDocumentTemplateDialog, OpenLinkHdl_Impl, svt::FixedHyperlink*, E
|
|||
::rtl::OUString sURL( aMoreTemplatesLink.GetURL() );
|
||||
if ( sURL.getLength() > 0 )
|
||||
{
|
||||
localizeWebserviceURI(sURL);
|
||||
try
|
||||
{
|
||||
uno::Reference< lang::XMultiServiceFactory > xSMGR =
|
||||
|
|
44
svtools/source/misc/langhelp.cxx
Normal file
44
svtools/source/misc/langhelp.cxx
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*************************************************************************
|
||||
*
|
||||
* Copyright 2010 Novell, Inc.
|
||||
*
|
||||
* 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
|
||||
* or later, 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.
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_svtools.hxx"
|
||||
|
||||
#include <svtools/langhelp.hxx>
|
||||
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <rtl/ustring.hxx>
|
||||
|
||||
void localizeWebserviceURI( ::rtl::OUString& rURI )
|
||||
{
|
||||
::rtl::OUString aLang = Application::GetSettings().GetUILocale().Language;
|
||||
if ( aLang.equalsIgnoreAsciiCaseAscii( "pt" )
|
||||
&& Application::GetSettings().GetUILocale().Country.equalsIgnoreAsciiCaseAscii("br") )
|
||||
{
|
||||
aLang = ::rtl::OUString::createFromAscii("pt-br");
|
||||
}
|
||||
|
||||
rURI += aLang;
|
||||
}
|
|
@ -68,6 +68,7 @@ SLOFILES=\
|
|||
$(SLO)$/imap3.obj \
|
||||
$(SLO)$/itemdel.obj \
|
||||
$(SLO)$/langtab.obj \
|
||||
$(SLO)$/langhelp.obj \
|
||||
$(SLO)$/stringtransfer.obj \
|
||||
$(SLO)$/svtaccessiblefactory.obj \
|
||||
$(SLO)$/svtdata.obj \
|
||||
|
|
Loading…
Reference in a new issue