cui/source/dialogs/about.cxx | 9 +++++++++ instsetoo_native/util/openoffice.lst.in | 8 ++++---- postprocess/CustomTarget_registry.mk | 2 +- scp2/source/ooo/registryitem_ooo.scp | 8 ++++---- sw/qa/extras/htmlexport/data/tdf76291.odt |binary sw/qa/extras/htmlexport/data/tdf90905.odt |binary sw/qa/extras/htmlexport/htmlexport.cxx | 18 ++++++++++++++++++ sw/source/filter/html/wrthtml.cxx | 17 +++++++++++++---- 8 files changed, 49 insertions(+), 13 deletions(-)
New commits: commit 452cf5faed0391211f8383a177bfdbb86a810a7f Author: Tor Lillqvist <t...@collabora.com> Date: Fri Sep 19 13:36:28 2014 +0300 Collabora specific URLs Change-Id: I5a16033851fd1e8441d451f14295e0c8d664d001 diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index ff61962..1124f6e 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -110,7 +110,16 @@ IMPL_LINK( AboutDialog, HandleClick, PushButton*, pButton ) else if ( pDialogButton == (AboutDialogButton*)WEBSITE_BUTTON ) { sURL = officecfg::Office::Common::Help::StartCenter::InfoURL::get(); +#if defined MACOSX && HAVE_FEATURE_MACOSX_SANDBOX + sURL += "lofc-mac-app-store/"; +#endif + +#if 0 // In this branch the URL is on + // libreoffice-from-collabora.com, which does not offer + // localized pages, or automatic redirection to an English + // page if a localized one does not exist. I think. localizeWebserviceURI(sURL); +#endif } // If the URL is empty, don't do anything diff --git a/instsetoo_native/util/openoffice.lst.in b/instsetoo_native/util/openoffice.lst.in index b4f74220..38a4484 100644 --- a/instsetoo_native/util/openoffice.lst.in +++ b/instsetoo_native/util/openoffice.lst.in @@ -67,7 +67,7 @@ LibreOffice CHANGETARGETDIR 1 PATCHCODEFILE ooo_patchcodes.txt STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/ - STARTCENTER_INFO_URL http://www.libreoffice.org/ + STARTCENTER_INFO_URL http://libreoffice-from-collabora.com/ STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/ DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/ STARTCENTER_HIDE_EXTERNAL_LINKS 0 @@ -120,7 +120,7 @@ LibreOffice_Dev CODEFILENAME codes_ooodev.txt LOCALUSERDIR $ORIGIN/.. STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/ - STARTCENTER_INFO_URL http://www.libreoffice.org/ + STARTCENTER_INFO_URL http://libreoffice-from-collabora.com/ STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/ DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/ STARTCENTER_HIDE_EXTERNAL_LINKS 0 @@ -162,7 +162,7 @@ LibreOffice_SDK CHANGETARGETDIR 1 DONTUSESTARTMENUFOLDER 1 STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/ - STARTCENTER_INFO_URL http://www.libreoffice.org/ + STARTCENTER_INFO_URL http://libreoffice-from-collabora.com/ STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/ DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/ STARTCENTER_HIDE_EXTERNAL_LINKS 0 @@ -208,7 +208,7 @@ LibreOffice_Dev_SDK CHANGETARGETDIR 1 DONTUSESTARTMENUFOLDER 1 STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/ - STARTCENTER_INFO_URL http://www.libreoffice.org/ + STARTCENTER_INFO_URL http://libreoffice-from-collabora.com/ STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/ DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/ STARTCENTER_HIDE_EXTERNAL_LINKS 0 diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk index 05f2406..122574e 100644 --- a/postprocess/CustomTarget_registry.mk +++ b/postprocess/CustomTarget_registry.mk @@ -567,7 +567,7 @@ postprocess_main_SED := \ -e 's,$${PRODUCTVERSION},$(PRODUCTVERSION),g' \ -e 's,$${PRODUCTEXTENSION},.$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX),g' \ -e 's,$${STARTCENTER_ADDFEATURE_URL},http://extensions.libreoffice.org/,g' \ - -e 's,$${STARTCENTER_INFO_URL},http://www.libreoffice.org/,g' \ + -e 's,$${STARTCENTER_INFO_URL},http://libreoffice-from-collabora.com/,g' \ -e 's,$${STARTCENTER_HIDE_EXTERNAL_LINKS},0,g' \ -e 's,$${STARTCENTER_TEMPLREP_URL},http://templates.libreoffice.org/,g' \ diff --git a/scp2/source/ooo/registryitem_ooo.scp b/scp2/source/ooo/registryitem_ooo.scp index 1c324d5..a18cfa4 100644 --- a/scp2/source/ooo/registryitem_ooo.scp +++ b/scp2/source/ooo/registryitem_ooo.scp @@ -197,7 +197,7 @@ RegistryItem gid_Regitem_Software_Microsoft_Windows_Currentversion_Uninstall_Sta ModuleID = gid_Module_Root; Subkey = "Software\Microsoft\Windows\CurrentVersion\Uninstall\%PRODUCTNAME %PRODUCTVERSION"; Name = "HelpLink"; - Value = "http://www.libreoffice.org"; + Value = "http://libreoffice-from-collabora.com"; End RegistryItem gid_Regitem_Software_Microsoft_Windows_Currentversion_Uninstall_Staroffice_Modifypath @@ -213,7 +213,7 @@ RegistryItem gid_Regitem_Software_Microsoft_Windows_Currentversion_Uninstall_Sta ModuleID = gid_Module_Root; Subkey = "Software\Microsoft\Windows\CurrentVersion\Uninstall\%PRODUCTNAME %PRODUCTVERSION"; Name = "Publisher"; - Value = "The The Document Foundation for the LibreOffice Community"; + Value = "Collabora Productivity Ltd."; End RegistryItem gid_Regitem_Software_Microsoft_Windows_Currentversion_Uninstall_Staroffice_Uninstallstring @@ -229,7 +229,7 @@ RegistryItem gid_Regitem_Software_Microsoft_Windows_Currentversion_Uninstall_Sta ModuleID = gid_Module_Root; Subkey = "Software\Microsoft\Windows\CurrentVersion\Uninstall\%PRODUCTNAME %PRODUCTVERSION"; Name = "URLInfoAbout"; - Value = "http://www.libreoffice.org/"; + Value = "http://libreoffice-from-collabora.com"; End RegistryItem gid_Regitem_Software_Microsoft_Windows_Currentversion_Uninstall_Staroffice_Urlupdateinfo @@ -237,7 +237,7 @@ RegistryItem gid_Regitem_Software_Microsoft_Windows_Currentversion_Uninstall_Sta ModuleID = gid_Module_Root; Subkey = "Software\Microsoft\Windows\CurrentVersion\Uninstall\%PRODUCTNAME %PRODUCTVERSION"; Name = "URLUpdateInfo"; - Value = "http://download.libreoffice.org"; + Value = "http://libreoffice-from-collabora.com"; End RegistryItem gid_Regitem_Software_Openoffice_Productname_Productversion_Path commit 88c8441a73c1b7f2269b0ef92d21c56d901a1d2e Author: Vasily Melenchuk <vasily.melenc...@cib.de> Date: Mon May 4 17:24:09 2015 +0300 tdf#90905 fix for url encoding in internal urls Do not try to use INetURLObject class for encoding of internal document links. External URLs are encoded as before. Change-Id: I90621819ed21c3f793171ac4ab3fc7d49ac69f56 diff --git a/sw/qa/extras/htmlexport/data/tdf90905.odt b/sw/qa/extras/htmlexport/data/tdf90905.odt new file mode 100644 index 0000000..cab8a04 Binary files /dev/null and b/sw/qa/extras/htmlexport/data/tdf90905.odt differ diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index 804d242..d51f7fe 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -192,6 +192,15 @@ DECLARE_HTMLEXPORT_TEST(testExportUrlEncoding, "tdf76291.odt") } #endif +DECLARE_HTMLEXPORT_TEST(testExportInternalUrl, "tdf90905.odt") +{ + htmlDocPtr pDoc = parseHtml(maTempFile); + CPPUNIT_ASSERT(pDoc); + + // Internal url should be valid + assertXPath(pDoc, "/html/body/p/a", "href", "#0.0.1.Text|outline"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 3c84e78..24f51ed 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -1168,8 +1168,12 @@ void SwHTMLWriter::convertHyperlinkHRefValue( const OUString& rURL ) } } } - INetURLObject aURL( sURL ); - return URIHelper::simpleNormalizedMakeRelative( GetBaseURL(), aURL.GetMainURL( INetURLObject::NO_DECODE ) ); + else + { + INetURLObject aURL(sURL); + sURL = aURL.GetMainURL(INetURLObject::NO_DECODE); + } + return URIHelper::simpleNormalizedMakeRelative( GetBaseURL(), sURL ); } void SwHTMLWriter::OutHyperlinkHRefValue( const OUString& rURL ) commit 98dbb5bac6c4933fd41afc1259dfaa17fc0678ca Author: Vasily Melenchuk <vasily.melenc...@cib.de> Date: Tue Jan 27 16:18:24 2015 +0000 tdf#76291 write encoded URL as href in html output INetURLObject class is used to create correctly encoded URL Signed-off-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit 0706b5756e06b7773a78e3046a47efc2c81d92b1) Signed-off-by: Andras Timar <andras.ti...@collabora.com> Conflicts: sw/source/filter/html/wrthtml.cxx Change-Id: Icc9e71e848fd8a0b487f74232b9ad3e7ddde50b4 diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index daab896..3c84e78 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -79,6 +79,7 @@ #include <rtl/strbuf.hxx> #include <IDocumentSettingAccess.hxx> #include <xmloff/odffields.hxx> +#include <tools/urlobj.hxx> #define MAX_INDENT_LEVEL 20 @@ -1145,7 +1146,7 @@ void SwHTMLWriter::OutImplicitMark( const OUString& rMark, } } -void SwHTMLWriter::OutHyperlinkHRefValue( const OUString& rURL ) +void SwHTMLWriter::convertHyperlinkHRefValue( const OUString& rURL ) { OUString sURL( rURL ); sal_Int32 nPos = sURL.lastIndexOf( cMarkSeparator ); @@ -1167,10 +1168,14 @@ void SwHTMLWriter::OutHyperlinkHRefValue( const OUString& rURL ) } } } + INetURLObject aURL( sURL ); + return URIHelper::simpleNormalizedMakeRelative( GetBaseURL(), aURL.GetMainURL( INetURLObject::NO_DECODE ) ); +} - sURL = URIHelper::simpleNormalizedMakeRelative( GetBaseURL(), sURL); - HTMLOutFuncs::Out_String( Strm(), sURL, eDestEnc, - &aNonConvertableCharacters ); +void SwHTMLWriter::OutHyperlinkHRefValue( const OUString& rURL ) +{ + OUString sURL = convertHyperlinkHRefValue(rURL); + HTMLOutFuncs::Out_String( Strm(), sURL, eDestEnc, &aNonConvertableCharacters ); } void SwHTMLWriter::OutBackground( const SvxBrushItem *pBrushItem, bool bGraphic ) commit 44f7f938f1269189c0927e9e10d5044b8dc029cb Author: Vasily Melenchuk <vasily.melenc...@cib.de> Date: Thu Feb 5 11:57:13 2015 +0000 tdf#76291 unit test for html export href encoding Reviewed-on: https://gerrit.libreoffice.org/14333 Tested-by: Michael Stahl <mst...@redhat.com> Reviewed-by: Michael Stahl <mst...@redhat.com> (cherry picked from commit 675e1fe198298702ced8eab02a7df5164d66a8f0) Signed-off-by: Andras Timar <andras.ti...@collabora.com> Change-Id: I273af8b570adfcb7bfb784495bc31d2f4f1ee00b diff --git a/sw/qa/extras/htmlexport/data/tdf76291.odt b/sw/qa/extras/htmlexport/data/tdf76291.odt new file mode 100644 index 0000000..68588c8 Binary files /dev/null and b/sw/qa/extras/htmlexport/data/tdf76291.odt differ diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index a377195..804d242 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -181,6 +181,15 @@ DECLARE_HTMLEXPORT_TEST(testExportCheckboxRadioButtonState, "checkbox-radiobutto assertXPath(pDoc, "/html/body/form/p[4]/input", "type", "radio"); // FIXME not in 4.3 assertXPathNoAttribute(pDoc, "/html/body/form/p[4]/input", "checked"); } + +DECLARE_HTMLEXPORT_TEST(testExportUrlEncoding, "tdf76291.odt") +{ + htmlDocPtr pDoc = parseHtml(maTempFile); + CPPUNIT_ASSERT(pDoc); + + // Test URI encoded hyperlink with Chinese characters + assertXPath(pDoc, "/html/body/p/a", "href", "http://www.youtube.com/results?search_query=%E7%B2%B5%E8%AA%9Emv&sm=12"); +} #endif CPPUNIT_PLUGIN_IMPLEMENT(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits