[Libreoffice-commits] .: shell/source
shell/source/backends/gconfbe/gconfaccess.cxx | 27 + shell/source/backends/localebe/localebackend.cxx |6 - shell/source/cmdmail/cmdmailentry.cxx |4 shell/source/cmdmail/cmdmailsuppl.cxx | 73 ++ shell/source/unix/exec/shellexec.cxx | 11 -- shell/source/unix/exec/shellexecentry.cxx |4 shell/source/unix/sysshell/recently_used_file_handler.cxx | 16 +-- 7 files changed, 57 insertions(+), 84 deletions(-) New commits: commit e9aff4b508a1ccd1e5a40fadce3ca78db7b49b86 Author: Marcos Paulo de Souza marcos.souza@gmail.com Date: Mon Jan 14 23:03:40 2013 -0200 fdo#57950: Remove some chained appends in shell And remove some *STRINGPARAM macros. Change-Id: Idebee475e4b383f5f390040515bdfa7c49a24c1d Reviewed-on: https://gerrit.libreoffice.org/1682 Reviewed-by: LuboÅ¡ LuÅák l.lu...@suse.cz Tested-by: LuboÅ¡ LuÅák l.lu...@suse.cz diff --git a/shell/source/backends/gconfbe/gconfaccess.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx index 205a2cf..4705013 100644 --- a/shell/source/backends/gconfbe/gconfaccess.cxx +++ b/shell/source/backends/gconfbe/gconfaccess.cxx @@ -57,13 +57,12 @@ GConfClient* getGconfClient() GError* aError = NULL; if (!gconf_init(0, NULL, aError)) { -rtl::OUStringBuffer msg; -msg.appendAscii(GconfBackend:GconfLayer: Cannot Initialize Gconf connection - ); -msg.appendAscii(aError-message); +OUString msg(GconfBackend:GconfLayer: Cannot Initialize Gconf connection - + + OUString::createFromAscii(aError-message)); g_error_free(aError); aError = NULL; -throw uno::RuntimeException(msg.makeStringAndClear(),NULL); +throw uno::RuntimeException(msg, NULL); } mClient = gconf_client_get_default(); @@ -116,13 +115,11 @@ static OUString xdg_user_dir_lookup (const char *type) config_home = getenv (XDG_CONFIG_HOME); if (config_home == NULL || config_home[0] == 0) { -aConfigFileURL = OUString(aHomeDirURL); -aConfigFileURL += OUString(/.config/user-dirs.dirs); +aConfigFileURL = aHomeDirURL + /.config/user-dirs.dirs; } else { -aConfigFileURL = OUString::createFromAscii(config_home); -aConfigFileURL += OUString(/user-dirs.dirs); +aConfigFileURL = OUString::createFromAscii(config_home) + /user-dirs.dirs; } if(osl_File_E_None == osl_openFile(aConfigFileURL.pData, handle, osl_File_OpenFlag_Read)) @@ -167,8 +164,7 @@ static OUString xdg_user_dir_lookup (const char *type) continue; if (relative) { -aUserDirBuf = OUStringBuffer(aHomeDirURL); -aUserDirBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( / ) ); +aUserDirBuf = OUStringBuffer(aHomeDirURL + /); } else { @@ -195,15 +191,11 @@ static OUString xdg_user_dir_lookup (const char *type) /* Special case desktop for historical compatibility */ if (strcmp (type, DESKTOP) == 0) { -aUserDirBuf = OUStringBuffer(aHomeDirURL); -aUserDirBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( /Desktop ) ); -return aUserDirBuf.makeStringAndClear(); +return aHomeDirURL + /Desktop; } else { -aUserDirBuf = OUStringBuffer(aHomeDirURL); -aUserDirBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( /Documents ) ); -return aUserDirBuf.makeStringAndClear(); +return aHomeDirURL + /Documents; } } @@ -277,8 +269,7 @@ uno::Any translateToOOo( const ConfigurationValue rValue, GConfValue *pGconfVal GSList * list = gconf_value_get_list(pGconfValue); for(; list; list = g_slist_next(list)) { -aBuffer.append(gconf_value_get_string((GConfValue *) list-data)); -aBuffer.append(;); +aBuffer.append(gconf_value_get_string((GConfValue *) list-data) + OString(;)); } // Remove trailing ; aBuffer.setLength(aBuffer.getLength()-1); diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx index 544cb42..5e38f3a 100644 --- a/shell/source/backends/localebe/localebackend.cxx +++ b/shell/source/backends/localebe/localebackend.cxx @@ -289,14 +289,12 @@ css::uno::Any LocaleBackend::getPropertyValue( return css::uno::makeAny( css::beans::Optional css::uno::Any ( true, css::uno::makeAny(getLocale(; -} else if (PropertyName.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(SystemLocale))) +} else if (PropertyName.equals(SystemLocale)) { return css::uno::makeAny(
[Libreoffice-commits] .: shell/source
shell/source/tools/lngconvex/lngconvex.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit b0126a2ea297c692214ec11302d2a7b3cf70edde Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Tue Nov 20 10:11:24 2012 +0100 do not use exitcode 0 on failure Change-Id: I47ce1502e8ffd58709a64a3ca520d59cb765bfaa diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index 942ae75..1e4f1c2 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -590,15 +590,18 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) catch(const std::ios::failure ex) { std::cout ex.what() std::endl; +return 1; } catch(const std::exception ex) { std::cout ex.what() std::endl; ShowUsage(); +return 1; } catch(...) { std::cout Unexpected error... std::endl; +return 1; } return 0; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/win32/shlxthandler/res/shlxthdl.ulf | 18 -- 1 file changed, 18 deletions(-) New commits: commit 3d55b14aa23ac49c499ee654f793e722f517d858 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Tue Nov 20 10:20:43 2012 +0100 remove license header that confuses lngconvex This is not C++ source. Change-Id: I05fe98ef019df23fd4be0d7e281ebb877b545484 diff --git a/shell/source/win32/shlxthandler/res/shlxthdl.ulf b/shell/source/win32/shlxthandler/res/shlxthdl.ulf index 75c5416..eed3dd3 100644 --- a/shell/source/win32/shlxthandler/res/shlxthdl.ulf +++ b/shell/source/win32/shlxthandler/res/shlxthdl.ulf @@ -1,21 +1,3 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the License); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - [%TITLE%] en-US = Title ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/tools/lngconvex/lngconvex.cxx | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit 577b95a96092b50b454ad2d5a12edc35120db1d6 Author: Eike Rathke er...@redhat.com Date: Sat Nov 17 01:03:36 2012 +0100 use LanguageTag Change-Id: I1ec1f619cb6b427b4376d28292d3412ba6eb67ee diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index 473bf69..942ae75 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -53,7 +53,7 @@ typedef unsigned short WORD; #include sal/main.h #include tools/config.hxx -#include i18npool/mslangid.hxx +#include i18npool/languagetag.hxx #include iostream #include fstream @@ -332,7 +332,9 @@ void add_group_entries( rtl::OString iso_lang = aConfig.GetKeyName(sal::static_int_castsal_uInt16(i)); rtl::OString key_value_utf8 = aConfig.ReadKey(sal::static_int_castsal_uInt16(i)); iso_lang_identifier myiso_lang( iso_lang ); -LanguageType ltype = MsLangId::convertIsoNamesToLanguage(myiso_lang.language(), myiso_lang.country()); +LanguageType ltype = LanguageTag( +OStringToOUString( myiso_lang.language(), RTL_TEXTENCODING_UTF8), +OStringToOUString( myiso_lang.country(), RTL_TEXTENCODING_UTF8)).getLanguageType(); if( ( ltype 0x0200 ) == 0 map[ ltype ].empty() ) { Substitutor.set_language(iso_lang_identifier(iso_lang)); @@ -459,7 +461,9 @@ void start_language_section( std::string lang_section(LANGUAGE ); -LanguageType ltype = MsLangId::convertIsoNamesToLanguage(iso_lang.language(), iso_lang.country()); +LanguageType ltype = LanguageTag( +OStringToOUString( iso_lang.language(), RTL_TEXTENCODING_UTF8), +OStringToOUString( iso_lang.country(), RTL_TEXTENCODING_UTF8)).getLanguageType(); char buff[10]; int primLangID = PRIMARYLANGID(ltype); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/all/xml_parser.cxx | 22 -- 1 file changed, 22 deletions(-) New commits: commit f1dfc1f23f83f410172170d7b80d8f987f04635a Author: Tor Lillqvist t...@iki.fi Date: Thu Nov 15 18:38:16 2012 +0200 Bin leftover debugging printout Change-Id: I9ff9f53cedb34ff896104b39322edab91aa5cbdc diff --git a/shell/source/all/xml_parser.cxx b/shell/source/all/xml_parser.cxx index 23e43d5..e88abf6 100644 --- a/shell/source/all/xml_parser.cxx +++ b/shell/source/all/xml_parser.cxx @@ -123,8 +123,6 @@ static void xml_end_element_handler(void* UserData, const XML_Char* name) static void xml_character_data_handler(void* UserData, const XML_Char* s, int len) { -static int count = 0; - assert(UserData); xml_parser* pImpl = get_parser_instance(UserData); @@ -136,26 +134,6 @@ static void xml_character_data_handler(void* UserData, const XML_Char* s, int le else pDocHdl-characters(UTF8ToWString(std::string(reinterpret_castconst char*(s), len))); } -#if 0 -if (count 5) { -char buf[1000]; -sprintf(buf, -%s: len=%d\n -s=%.10s\n -pDocHdl=%p has_only_whitespaces()=%d\n -string=%S, -xml_character_data_handler, -len, -s, -pDocHdl, -has_only_whitespaces(s,len), -UTF8ToWString(std::string(reinterpret_castconst char*(s), len)).c_str() -); - -MessageBoxA(NULL, buf, xml_character_data_handler, MB_OK); -count++; -} -#endif } static void xml_comment_handler(void* UserData, const XML_Char* Data) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/sessioninstall/SyncDbusSessionHelper.cxx |8 +-- shell/source/sessioninstall/SyncDbusSessionHelper.hxx | 46 +- 2 files changed, 27 insertions(+), 27 deletions(-) New commits: commit 40c1e728c40ac03a2744bccefd0fb64ed5209776 Author: David Tardon dtar...@redhat.com Date: Sat Nov 10 08:46:53 2012 +0100 WaE: unused parameter Change-Id: Ib9956bd2671434fc15905e7c4fd56bd8f7162b60 diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx index 1653cb3..47f0749 100644 --- a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx +++ b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx @@ -17,8 +17,8 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; using namespace ::comphelper; -using namespace ::std;; -using namespace ::rtl;; +using namespace ::std; +using namespace ::rtl; namespace { @@ -29,7 +29,7 @@ namespace { GError* m_pError; public: -GErrorWrapper(GError* pError) : m_pError(pError) {}; +GErrorWrapper(GError* pError) : m_pError(pError) {} ~GErrorWrapper() { if(!m_pError) @@ -55,7 +55,7 @@ namespace if(!proxy) throw RuntimeException(OUString(couldnt get a proxy!),NULL); return proxy; -}; +} } namespace shell { namespace sessioninstall diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.hxx b/shell/source/sessioninstall/SyncDbusSessionHelper.hxx index bbb1201..4aab68c 100644 --- a/shell/source/sessioninstall/SyncDbusSessionHelper.hxx +++ b/shell/source/sessioninstall/SyncDbusSessionHelper.hxx @@ -21,33 +21,33 @@ namespace shell { namespace sessioninstall { public: SyncDbusSessionHelper(::com::sun::star::uno::Reference ::com::sun::star::uno::XComponentContext const); -virtual ~SyncDbusSessionHelper() {}; +virtual ~SyncDbusSessionHelper() {} // XModify Methods -virtual void SAL_CALL InstallPackageNames( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence ::rtl::OUString packages, const ::rtl::OUString interaction ) throw (::com::sun::star::uno::RuntimeException); +virtual void SAL_CALL InstallPackageNames( ::sal_uInt32 /* xid */, const ::com::sun::star::uno::Sequence ::rtl::OUString /* packages */, const ::rtl::OUString /* interaction */ ) throw (::com::sun::star::uno::RuntimeException); -virtual void SAL_CALL InstallPackageFiles( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence ::rtl::OUString files, const ::rtl::OUString interaction ) throw (::com::sun::star::uno::RuntimeException) -{ throw ::com::sun::star::uno::RuntimeException(); }; // not implemented -virtual void SAL_CALL InstallProvideFiles( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence ::rtl::OUString files, const ::rtl::OUString interaction ) throw (::com::sun::star::uno::RuntimeException) -{ throw ::com::sun::star::uno::RuntimeException(); }; // not implemented -virtual void SAL_CALL InstallCatalogs( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence ::rtl::OUString files, const ::rtl::OUString interaction ) throw (::com::sun::star::uno::RuntimeException) -{ throw ::com::sun::star::uno::RuntimeException(); }; // not implemented -virtual void SAL_CALL InstallMimeTypes( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence ::rtl::OUString mime_types, const ::rtl::OUString interaction ) throw (::com::sun::star::uno::RuntimeException) -{ throw ::com::sun::star::uno::RuntimeException(); }; // not implemented -virtual void SAL_CALL InstallFontconfigRessources( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence ::rtl::OUString resources, const ::rtl::OUString interaction ) throw (::com::sun::star::uno::RuntimeException) -{ throw ::com::sun::star::uno::RuntimeException(); }; // not implemented -virtual void SAL_CALL InstalliGStreamerRessources( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence ::rtl::OUString resources, const ::rtl::OUString interaction ) throw (::com::sun::star::uno::RuntimeException) -{ throw ::com::sun::star::uno::RuntimeException(); }; // not implemented -virtual void SAL_CALL InstallRessources( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence ::rtl::OUString types, const ::com::sun::star::uno::Sequence ::rtl::OUString resources, const ::rtl::OUString interaction ) throw (::com::sun::star::uno::RuntimeException) -{ throw ::com::sun::star::uno::RuntimeException(); }; // not implemented -virtual void SAL_CALL RemovePackageByFiles( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence ::rtl::OUString files, const ::rtl::OUString interaction ) throw
[Libreoffice-commits] .: shell/source
shell/source/unix/misc/senddoc.sh | 60 +- 1 file changed, 8 insertions(+), 52 deletions(-) New commits: commit 8e7a3669dd86f86325b3012abc657b5d4665374d Author: David Steele dste...@gmail.com Date: Tue Oct 16 19:11:37 2012 -0400 Combine senddoc null and default cases for better mailer selection. diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index 5a755d7..0ff1594 100644 --- a/shell/source/unix/misc/senddoc.sh +++ b/shell/source/unix/misc/senddoc.sh @@ -369,62 +369,18 @@ case `basename $MAILER | sed 's/-.*$//'` in /usr/bin/open -a ${MAILER} ${ATTACH} ;; -) - -# DESKTOP_LAUNCH, see http://freedesktop.org/pipermail/xdg/2004-August/004489.html -if [ -n $DESKTOP_LAUNCH ]; then -while [ $1 != ]; do -case $1 in ---to) -if [ ${TO} != ]; then -MAILTO=${MAILTO:-}${MAILTO:+}to=$2 -else -TO=$2 -fi -shift -;; ---cc) -MAILTO=${MAILTO:-}${MAILTO:+}cc=`echo $2 | ${URI_ENCODE}` -shift -;; ---bcc) -MAILTO=${MAILTO:-}${MAILTO:+}bcc=`echo $2 | ${URI_ENCODE}` -shift -;; ---subject) -MAILTO=${MAILTO:-}${MAILTO:+}subject=`echo $2 | ${URI_ENCODE}` -shift -;; ---body) -MAILTO=${MAILTO:-}${MAILTO:+}body=`echo $2 | ${URI_ENCODE}` -shift -;; ---attach) -MAILTO=${MAILTO:-}${MAILTO:+}attachment=`echo $2 | ${URI_ENCODE}` -shift -;; -*) -;; -esac -shift; -done - -MAILTO=mailto:${TO}?${MAILTO}; -${DESKTOP_LAUNCH} ${MAILTO} -else -echo Could not determine a mail client to use. -exit 2 -fi -;; - *) -# LO is configured to use something we do not recognize. + +# LO is configured to use something we do not recognize, or is not configured. # Try to be smart, and send the mail anyway, if we have the # possibility to do so. -if [ -n $KDE_FULL_SESSION -a -x /usr/bin/kde-open ] ; then +if [ -n $DESKTOP_LAUNCH ]; then +# http://lists.freedesktop.org/pipermail/xdg/2004-August/002873.html +MAILER=${DESKTOP_LAUNCH} +elif [ -n $KDE_FULL_SESSION -a -x /usr/bin/kde-open ] ; then MAILER=/usr/bin/kde-open -elif [ -x /usr/bin/gnome-open ] ; then +elif [ -n $GNOME_DESKTOP_SESSION_ID -a -x /usr/bin/gnome-open ] ; then MAILER=/usr/bin/gnome-open elif [ -x /usr/bin/xdg-open ] ; then MAILER=/usr/bin/xdg-open @@ -460,7 +416,7 @@ case `basename $MAILER | sed 's/-.*$//'` in shift ;; --attach) -MAILTO=${MAILTO:-}${MAILTO:+}attach=`echo file://$2 | ${URI_ENCODE}` +MAILTO=${MAILTO:-}${MAILTO:+}attachment=`echo file://$2 | ${URI_ENCODE}` shift ;; *) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/win32/zipfile/zipfile.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit ed08ddb31ba37da393a42586cbaa4c19e771598c Author: Andras Timar ati...@suse.com Date: Tue Sep 11 12:38:15 2012 +0200 fdo#53588 Assume cdir being in the last 1k of the file to speed-up search Change-Id: I25291c52d9f0117c70c48781c2eb575bb6b374ff diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx index 381e52c..70a20f7 100644 --- a/shell/source/win32/zipfile/zipfile.cxx +++ b/shell/source/win32/zipfile/zipfile.cxx @@ -264,6 +264,7 @@ static bool findCentralDirectoryEnd(StreamInterface *stream) if (!stream) return false; stream-sseek(0, SEEK_SET); +if (stream-sseek(-1024, SEEK_END)) stream-sseek(0, SEEK_SET); try { while (stream-stell() != -1) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/win32/ooofilereader/basereader.cxx |9 ++--- shell/source/win32/zipfile/zipfile.cxx |4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) New commits: commit 40c85b88ad0351acaf59fd2372676cdb8ca452d6 Author: Fridrich Å trba fridrich.st...@bluewin.ch Date: Mon Aug 27 16:33:13 2012 +0200 fdo#53592: Try not to crash on empty m_ZipContent Change-Id: I9bdc9997e260a75682177c8641695b60df0c81a6 diff --git a/shell/source/win32/ooofilereader/basereader.cxx b/shell/source/win32/ooofilereader/basereader.cxx index f4f694e..754d37e 100644 --- a/shell/source/win32/ooofilereader/basereader.cxx +++ b/shell/source/win32/ooofilereader/basereader.cxx @@ -81,9 +81,12 @@ void CBaseReader::Initialize( const std::string ContentName) if (m_ZipContent.empty()) m_ZipFile.GetUncompressedContent( ContentName, m_ZipContent ); -xml_parser parser; -parser.set_document_handler(this); // pass current reader as reader to the sax parser -parser.parse(m_ZipContent[0], m_ZipContent.size()); +if (!m_ZipContent.empty()) +{ +xml_parser parser; +parser.set_document_handler(this); // pass current reader as reader to the sax parser +parser.parse(m_ZipContent[0], m_ZipContent.size()); +} } catch(std::exception #if OSL_DEBUG_LEVEL 0 diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx index 13b319c..381e52c 100644 --- a/shell/source/win32/zipfile/zipfile.cxx +++ b/shell/source/win32/zipfile/zipfile.cxx @@ -261,6 +261,8 @@ static bool areHeadersConsistent(const LocalFileHeader header, const CentralDir static bool findCentralDirectoryEnd(StreamInterface *stream) { +if (!stream) +return false; stream-sseek(0, SEEK_SET); try { @@ -483,7 +485,7 @@ void ZipFile::GetUncompressedContent( ContentBuffer.clear(); return; } - (void)inflateEnd(strm); +(void)inflateEnd(strm); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/unix/misc/senddoc.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8cdd150a0aae3ec3b2829ad6c45da5cb58f1bcc3 Author: Arno Teigseth arnot...@gmail.com Date: Sat Jul 21 21:58:41 2012 -0500 Fixed multiple attachment passing to thunderbird: file:// part needs 's Change-Id: I365e559610e06c6ffe964121b3c45077bf6ca264 diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index f75e51d..2a4c414 100755 --- a/shell/source/unix/misc/senddoc.sh +++ b/shell/source/unix/misc/senddoc.sh @@ -112,7 +112,7 @@ case `basename $MAILER | sed 's/-.*$//'` in COMMAND=${COMMAND:-}${COMMAND:+,}body=${BODY} fi if [ $ATTACH != ]; then -COMMAND=${COMMAND:-}${COMMAND:+,}attachment=${ATTACH} +COMMAND=${COMMAND:-}${COMMAND:+,}attachment=\'${ATTACH}\' fi run_mozilla $MAILER $COMMAND ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/unix/misc/senddoc.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 60845a6d213f7e84857608f828dbbfd5d1c69e58 Author: Peter Tillemans p...@snamellit.com Date: Tue Jun 26 12:20:36 2012 +0100 enable gnome-mail and xdg-mail Change-Id: Iba47ee76328aeb4734dbeb46322a9516b0ea9f7a diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index a18562b..f75e51d 100755 --- a/shell/source/unix/misc/senddoc.sh +++ b/shell/source/unix/misc/senddoc.sh @@ -208,7 +208,7 @@ case `basename $MAILER | sed 's/-.*$//'` in rm -f $BODY ;; -evolution) +evolution | gnome | xdg) # NB. shortened from the dash on while [ $1 != ]; do case $1 in ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/backends/wininetbe/wininetbackend.cxx | 66 ++--- 1 file changed, 44 insertions(+), 22 deletions(-) New commits: commit 0dded0d18a5945ed5a38623068ba7aa93da39df0 Author: Stephan Bergmann sberg...@redhat.com Date: Fri Jun 8 16:54:18 2012 +0200 fdo#47044: Adapt to different Windows versions' InternetQueryOption behavior Change-Id: Ia4d1d8f903872e5eefae2d9687866243b9055a13 diff --git a/shell/source/backends/wininetbe/wininetbackend.cxx b/shell/source/backends/wininetbe/wininetbackend.cxx old mode 100644 new mode 100755 index 4f364f7..ac6829e --- a/shell/source/backends/wininetbe/wininetbackend.cxx +++ b/shell/source/backends/wininetbe/wininetbackend.cxx @@ -123,32 +123,54 @@ WinInetBackend::WinInetBackend() GetProcAddress( hWinInetDll.module, InternetQueryOptionA ) ); if (lpfnInternetQueryOption) { -LPINTERNET_PROXY_INFO lpi = NULL; - -// query for the neccessary space -DWORD dwLength = 0; -lpfnInternetQueryOption( -NULL, -INTERNET_OPTION_PROXY, -(LPVOID)lpi, -dwLength ); - -// allocate sufficient space on the heap -// insufficient space on the heap results -// in a stack overflow exception, we assume -// this never happens, because of the relatively -// small amount of memory we need -// alloca is nice because it is fast and we don't -// have to free the allocated memory, it will be -// automatically done -lpi = reinterpret_cast LPINTERNET_PROXY_INFO ( -alloca( dwLength ) ); - -lpfnInternetQueryOption( +// Some Windows versions would fail the InternetQueryOption call +// with ERROR_OUTOFMEMORY when the initial dwLength were zero (and +// are apparently fine with the initial sizeof (INTERNET_PROXY_INFO) +// and need no reallocation), while other versions fail with +// ERROR_INSUFFICIENT_BUFFER upon that initial dwLength and need a +// reallocation: +INTERNET_PROXY_INFO pi; +LPINTERNET_PROXY_INFO lpi = pi; +DWORD dwLength = sizeof (INTERNET_PROXY_INFO); +BOOL ok = lpfnInternetQueryOption( NULL, INTERNET_OPTION_PROXY, (LPVOID)lpi, dwLength ); +if (!ok) +{ +DWORD err = GetLastError(); +if (err = ERROR_INSUFFICIENT_BUFFER) +{ +// allocate sufficient space on the heap +// insufficient space on the heap results +// in a stack overflow exception, we assume +// this never happens, because of the relatively +// small amount of memory we need +// alloca is nice because it is fast and we don't +// have to free the allocated memory, it will be +// automatically done +lpi = reinterpret_cast LPINTERNET_PROXY_INFO ( +alloca( dwLength ) ); +ok = lpfnInternetQueryOption( +NULL, +INTERNET_OPTION_PROXY, +(LPVOID)lpi, +dwLength ); +if (!ok) +{ +err = GetLastError(); +} +} +if (!ok) +{ +SAL_WARN( +shell, +InternetQueryOption INTERNET_OPTION_PROXY + GetLastError= err); +return; +} +} // if a proxy is disabled, InternetQueryOption returns // an empty proxy list, so we don't have to check if ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/backends/gconfbe/gconfaccess.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b6ce391171e417199d33ae085d2f0768a3e952b3 Author: Stephan Bergmann sberg...@redhat.com Date: Tue May 29 09:01:32 2012 +0200 -Werror=deprecated-declarations g_strcasecmp - g_ascii_strcasecmp, hopefully the latter is already available in oldest relevant glib. Change-Id: Iac47ebd511672d4ca08d4dc998a536939d4a98c3 diff --git a/shell/source/backends/gconfbe/gconfaccess.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx index 9771b5d..8b17824 100644 --- a/shell/source/backends/gconfbe/gconfaccess.cxx +++ b/shell/source/backends/gconfbe/gconfaccess.cxx @@ -401,7 +401,7 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* pClient, const Configurati if ( pGconfValue != NULL ) { -bool bOk = g_strcasecmp( manual, gconf_value_get_string( pGconfValue ) ) == 0; +bool bOk = g_ascii_strcasecmp( manual, gconf_value_get_string( pGconfValue ) ) == 0; gconf_value_free( pGconfValue ); if (bOk) return sal_True; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/unix/misc/senddoc.sh |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 35ec1539218523579e9877e0a6d135bde128ab81 Author: Jan Holesovsky ke...@suse.cz Date: Wed May 2 08:52:12 2012 +0200 Minor comment tweak. Change-Id: Idb9ff7c41ad8a2cbe145224bd80c0864339207ec diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index e7309eb..26ea5e8 100755 --- a/shell/source/unix/misc/senddoc.sh +++ b/shell/source/unix/misc/senddoc.sh @@ -400,9 +400,9 @@ case `basename $MAILER | sed 's/-.*$//'` in ;; *) -# The user has tweaked the email settings, and configured something we -# do not recognize. Try to be smart, and send the mail anyway, if we -# have the possibility to do so. +# LO is configured something we do not recognize. +# Try to be smart, and send the mail anyway, if we have the +# possibility to do so. if [ -n $KDE_FULL_SESSION -a -x /usr/bin/kde-open ] ; then MAILER=/usr/bin/kde-open ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/unix/misc/senddoc.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b169bb235e0e96b994a2198dc90ff90b33c07511 Author: Jan Holesovsky ke...@suse.cz Date: Wed May 2 08:56:18 2012 +0200 Argh, another tweak. Change-Id: I69f3aa4151dde15b02cf28dae13415f86cffad10 diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index 26ea5e8..a18562b 100755 --- a/shell/source/unix/misc/senddoc.sh +++ b/shell/source/unix/misc/senddoc.sh @@ -400,7 +400,7 @@ case `basename $MAILER | sed 's/-.*$//'` in ;; *) -# LO is configured something we do not recognize. +# LO is configured to use something we do not recognize. # Try to be smart, and send the mail anyway, if we have the # possibility to do so. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/unix/misc/senddoc.sh | 49 -- 1 file changed, 47 insertions(+), 2 deletions(-) New commits: commit 77d4873ee653549eb8fb8761253f9feb1eea1c11 Author: David Steele dste...@gmail.com Date: Tue Apr 24 00:18:02 2012 -0400 fdo#32621: Fall back to using the GNOME mailto URI handler if no valid mail program found diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index 9d63ae3..692930e 100755 --- a/shell/source/unix/misc/senddoc.sh +++ b/shell/source/unix/misc/senddoc.sh @@ -400,8 +400,53 @@ case `basename $MAILER | sed 's/-.*$//'` in ;; *) -echo Unsupported mail client: `basename $MAILER | sed 's/-.*^//'` -exit 2 +if [ -x /usr/bin/gnome-open ] ; then +MAILER = /usr/bin/gnome-open +elif [ -x /usr/bin/xdg-open ] ; then +MAILER = /usr/bin/xdg-open +else +echo Unsupported mail client: `basename $MAILER | sed 's/-.*^//'` +exit 2 +fi + +while [ $1 != ]; do +case $1 in +--to) +if [ ${TO} != ]; then +MAILTO=${MAILTO:-}${MAILTO:+}to=$2 +else +TO=$2 +fi +shift +;; +--cc) +MAILTO=${MAILTO:-}${MAILTO:+}cc=`echo $2 | ${URI_ENCODE}` +shift +;; +--bcc) +MAILTO=${MAILTO:-}${MAILTO:+}bcc=`echo $2 | ${URI_ENCODE}` +shift +;; +--subject) +MAILTO=${MAILTO:-}${MAILTO:+}subject=`echo $2 | ${URI_ENCODE}` +shift +;; +--body) +MAILTO=${MAILTO:-}${MAILTO:+}body=`echo $2 | ${URI_ENCODE}` +shift +;; +--attach) +MAILTO=${MAILTO:-}${MAILTO:+}attach=`echo file://$2 | ${URI_ENCODE}` +shift +;; +*) +;; +esac +shift; +done + +MAILTO=mailto:${TO}?${MAILTO}; +${MAILER} ${MAILTO} ;; esac ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/unix/misc/senddoc.sh |4 1 file changed, 4 insertions(+) New commits: commit f0208e344b2500e9338885e6177dd2c4f52c6373 Author: Jan Holesovsky ke...@suse.cz Date: Mon Apr 30 15:54:26 2012 +0200 Add a comment why we do what we do ;-) Change-Id: I9686ed60c31129fc4bacf63fec2d6314bf513c73 diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index 692930e..f3657e6 100755 --- a/shell/source/unix/misc/senddoc.sh +++ b/shell/source/unix/misc/senddoc.sh @@ -400,6 +400,10 @@ case `basename $MAILER | sed 's/-.*$//'` in ;; *) +# The user has tweaked the email settings, and configured something we +# do not recognize. Try to be smart, and send the mail anyway, if we +# have the possibility to do so. + if [ -x /usr/bin/gnome-open ] ; then MAILER = /usr/bin/gnome-open elif [ -x /usr/bin/xdg-open ] ; then ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/win32/shlxthandler/res/shlxthdl.manifest |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 86a85224bcf3191254a4372085cac0ac040c883a Author: Andras Timar ati...@suse.com Date: Mon Apr 23 17:57:17 2012 +0200 s/OpenOffice/LibreOffice/ diff --git a/shell/source/win32/shlxthandler/res/shlxthdl.manifest b/shell/source/win32/shlxthandler/res/shlxthdl.manifest index a785006..36131a3 100755 --- a/shell/source/win32/shlxthandler/res/shlxthdl.manifest +++ b/shell/source/win32/shlxthandler/res/shlxthdl.manifest @@ -1,7 +1,7 @@ ?xml version=1.0 encoding=UTF-8 standalone=yes? assembly xmlns=urn:schemas-microsoft-com:asm.v1 manifestVersion=1.0 -assemblyIdentity version=1.0.0.0 processorArchitecture=x86 name=OpenOffice.shlxthdl type=win32 / -descriptionOpenOffice Shell Extension/description +assemblyIdentity version=1.0.0.0 processorArchitecture=x86 name=LibreOffice.shlxthdl type=win32 / +descriptionLibreOffice Shell Extension/description dependency dependentAssembly assemblyIdentity type=win32 name=Microsoft.Windows.Common-Controls version=6.0.0.0 processorArchitecture=X86 ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/backends/macbe/macbackend.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7bec04312dcef51c8f7b248231e139178fdeada1 Author: Tor Lillqvist t...@iki.fi Date: Sun Apr 22 21:44:29 2012 +0300 WaE: initialization of pointer to null from a constant boolean expression diff --git a/shell/source/backends/macbe/macbackend.cxx b/shell/source/backends/macbe/macbackend.cxx index 055628f..aaf7ebf 100644 --- a/shell/source/backends/macbe/macbackend.cxx +++ b/shell/source/backends/macbe/macbackend.cxx @@ -406,7 +406,7 @@ css::uno::Any MacOSXBackend::getPropertyValue( CFDictionaryRef rProxyDict = SCDynamicStoreCopyProxies(NULL); if (!rProxyDict) -rExceptionsList = false; +rExceptionsList = 0; else rExceptionsList = (CFArrayRef) CFDictionaryGetValue(rProxyDict, kSCPropNetProxiesExceptionsList); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/win32/zipfile/zipfile.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit e6aa2b67d4c0f1a65fcddabb77186c75a3ae1c1a Author: Fridrich Å trba fridrich.st...@bluewin.ch Date: Wed Mar 21 10:52:07 2012 +0100 Remove unused define diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx index de99aa6..e443313 100644 --- a/shell/source/win32/zipfile/zipfile.cxx +++ b/shell/source/win32/zipfile/zipfile.cxx @@ -416,8 +416,6 @@ ZipFile::~ZipFile() delete m_pStream; } -#define CHUNK 16384 - /** Provides an interface to read the uncompressed data of a content of the zip file @precondThe specified content must exist in this file ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/win32/zipfile/zipfile.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit baebdaa48e88949bf6aa92c478733518bede5c6e Author: Fridrich Å trba fridrich.st...@bluewin.ch Date: Wed Mar 21 13:42:38 2012 +0100 Call inflateInit2 instead of inflateInit for the zip stream diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx index e443313..1154e54 100644 --- a/shell/source/win32/zipfile/zipfile.cxx +++ b/shell/source/win32/zipfile/zipfile.cxx @@ -464,7 +464,7 @@ void ZipFile::GetUncompressedContent( strm.opaque = Z_NULL; strm.avail_in = 0; strm.next_in = Z_NULL; -ret = inflateInit(strm); +ret = inflateInit2(strm,-MAX_WBITS); if (ret != Z_OK) return; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/win32/zipfile/zipfile.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit f729d2d83034167db9727c2de2f4e5a32a7374d8 Author: Fridrich Å trba fridrich.st...@bluewin.ch Date: Wed Mar 21 22:42:43 2012 +0100 Appease valgrind diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx index 1154e54..452c17a 100644 --- a/shell/source/win32/zipfile/zipfile.cxx +++ b/shell/source/win32/zipfile/zipfile.cxx @@ -487,6 +487,7 @@ void ZipFile::GetUncompressedContent( ContentBuffer.clear(); return; } + (void)inflateEnd(strm); } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source
shell/source/win32/shlxthandler/util/iso8601_converter.cxx |4 1 file changed, 4 insertions(+) New commits: commit 101aa287fd64b5f229c5dd759de353721bc2f04a Author: Stephan Bergmann sberg...@redhat.com Date: Mon Mar 19 19:45:54 2012 +0100 Missing include diff --git a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx index e035481..4ab060c 100644 --- a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx +++ b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx @@ -26,6 +26,10 @@ * / +#include sal/config.h + +#include stdlib.h + #include internal/iso8601_converter.hxx #include internal/utilities.hxx ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: shell/source slideshow/source sot/source starmath/source
shell/source/cmdmail/cmdmailmsg.cxx | 18 +- shell/source/cmdmail/cmdmailsuppl.cxx |8 ++-- shell/source/unix/exec/shellexec.cxx |4 +- shell/source/unix/sysshell/recently_used_file.cxx |2 - slideshow/source/engine/activities/activitiesfactory.cxx |2 - slideshow/source/engine/animationnodes/animationaudionode.cxx |2 - slideshow/source/engine/shapes/shapeimporter.cxx |2 - slideshow/source/engine/shapes/viewmediashape.cxx |4 +- slideshow/source/engine/slide/shapemanagerimpl.cxx|4 +- slideshow/source/engine/slideshowimpl.cxx |4 +- sot/source/sdstor/storage.cxx |2 - sot/source/sdstor/ucbstorage.cxx |8 ++-- sot/source/unoolestorage/xolesimplestorage.cxx|4 +- starmath/source/cfgitem.cxx |4 +- starmath/source/dialog.cxx|2 - starmath/source/mathmlexport.cxx |2 - starmath/source/mathmlimport.cxx | 14 +++ starmath/source/smdetect.cxx |2 - starmath/source/unomodel.cxx |2 - 19 files changed, 45 insertions(+), 45 deletions(-) New commits: commit 806dce17d6631738c7388d8d68d8b5ac2e4c11a8 Author: Olivier Hallot olivier.hal...@alta.org.br Date: Wed Jan 11 11:37:33 2012 -0200 Fix for fdo43460 Part XXXIV getLength() to isEmpty() Part XXXIV Modules shell, slideshow, sot, starmath diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx index 1a33afd..2a2bb8a 100644 --- a/shell/source/cmdmail/cmdmailmsg.cxx +++ b/shell/source/cmdmail/cmdmailmsg.cxx @@ -167,10 +167,10 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString aName ) { MutexGuard aGuard( m_aMutex ); -if( 0 == aName.compareToAscii( from ) m_aOriginator.getLength() ) +if( 0 == aName.compareToAscii( from ) !m_aOriginator.isEmpty() ) return makeAny( m_aOriginator ); -else if( 0 == aName.compareToAscii( to ) m_aRecipient.getLength() ) +else if( 0 == aName.compareToAscii( to ) !m_aRecipient.isEmpty() ) return makeAny( m_aRecipient ); else if( 0 == aName.compareToAscii( cc ) m_CcRecipients.getLength() ) @@ -179,7 +179,7 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString aName ) else if( 0 == aName.compareToAscii( bcc ) m_BccRecipients.getLength() ) return makeAny( m_BccRecipients ); -else if( 0 == aName.compareToAscii( subject ) m_aSubject.getLength() ) +else if( 0 == aName.compareToAscii( subject ) !m_aSubject.isEmpty() ) return makeAny( m_aSubject ); else if( 0 == aName.compareToAscii( attachment ) m_Attachments.getLength() ) @@ -199,10 +199,10 @@ Sequence OUString SAL_CALL CmdMailMsg::getElementNames( ) sal_Int32 nItems = 0; Sequence OUString aRet( 6 ); -if( m_aOriginator.getLength() ) +if( !m_aOriginator.isEmpty() ) aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM(from)); -if( m_aRecipient.getLength() ) +if( !m_aRecipient.isEmpty() ) aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM(to)); if( m_CcRecipients.getLength() ) @@ -211,7 +211,7 @@ Sequence OUString SAL_CALL CmdMailMsg::getElementNames( ) if( m_BccRecipients.getLength() ) aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM(bcc)); -if( m_aSubject.getLength() ) +if( !m_aSubject.isEmpty() ) aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM(subject)); if( m_Attachments.getLength() ) @@ -228,10 +228,10 @@ Sequence OUString SAL_CALL CmdMailMsg::getElementNames( ) { MutexGuard aGuard( m_aMutex ); -if( 0 == aName.compareToAscii( from ) m_aOriginator.getLength() ) +if( 0 == aName.compareToAscii( from ) !m_aOriginator.isEmpty() ) return sal_True; -else if( 0 == aName.compareToAscii( to ) m_aRecipient.getLength() ) +else if( 0 == aName.compareToAscii( to ) !m_aRecipient.isEmpty() ) return sal_True; else if( 0 == aName.compareToAscii( cc ) m_CcRecipients.getLength() ) @@ -240,7 +240,7 @@ Sequence OUString SAL_CALL CmdMailMsg::getElementNames( ) else if( 0 == aName.compareToAscii( bcc ) m_BccRecipients.getLength() ) return sal_True; -else if( 0 == aName.compareToAscii( subject ) m_aSubject.getLength() ) +else if( 0 == aName.compareToAscii( subject ) !m_aSubject.isEmpty() ) return sal_True; else if( 0 == aName.compareToAscii( attachment ) m_Attachments.getLength() ) diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index 3af65c8..c0531e3 100644 ---
[Libreoffice-commits] .: shell/source
shell/source/unix/misc/open-url.c | 174 -- shell/source/unix/misc/open-url.def |1 shell/source/unix/misc/senddoc.c| 206 shell/source/unix/misc/senddoc.def |1 4 files changed, 382 deletions(-) New commits: commit aa878cddf8a504e3de1b55155c1353fc14ec5ebd Author: Stephan Bergmann sberg...@redhat.com Date: Wed Oct 5 13:50:08 2011 +0200 Removed dead code. diff --git a/shell/source/unix/misc/open-url.c b/shell/source/unix/misc/open-url.c deleted file mode 100755 index 7d7230f..000 --- a/shell/source/unix/misc/open-url.c +++ /dev/null @@ -1,174 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * - * 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. - * - / - -#include stdlib.h -#include stdio.h -#include string.h -#include unistd.h -#include process.h -#include time.h - -#define INCL_DOS -#define INCL_DOSERRORS -#define INCL_PM -#include os2.h - -// OOo uses popen() to start us, so we cannot show PM dialogs. -// log message to disk. -void logMessage( char* msg) -{ -PPIBpib; -CHARszApplicationName[_MAX_PATH]; -CHARszDrive[_MAX_PATH]; -CHARszDir[_MAX_PATH]; -CHARszFileName[_MAX_PATH]; -CHARszExt[_MAX_PATH]; -FILE* log; -time_t timeOfDay; -struct tm* localTime; - -// get executable fullpath -DosGetInfoBlocks(NULL, pib); -DosQueryModuleName(pib-pib_hmte, sizeof(szApplicationName), szApplicationName); -_splitpath( szApplicationName, szDrive, szDir, szFileName, szExt ); -// log name -_makepath( szApplicationName, szDrive, szDir, szFileName, (.LOG) ); -log = fopen( szApplicationName, a); -if (!log) -return; -time( timeOfDay); -localTime = localtime( timeOfDay); -fprintf( log, %04d/%02d/%02d %02d:%02d:%02d %s\n, -localTime-tm_year+1900, localTime-tm_mon+1, localTime-tm_mday, -localTime-tm_hour, localTime-tm_min, localTime-tm_sec, msg); -fclose( log); -} - -// dump comand line arguments -void dumpArgs( int argc, char *argv[] ) -{ -int i; - -logMessage( Start of command line arguments dump:); -for( i=0; iargc; i++) -logMessage( argv[i]); -} - -/* - * The intended use of this tool is to pass the argument to - * the default URL exe. - */ -int main(int argc, char *argv[] ) -{ -APIRET rc; -RESULTCODES result = {0}; -charszAppFromINI[_MAX_PATH]; -charszDirFromINI[_MAX_PATH]; -charszCmdLine[1024]; -charszFail[ _MAX_PATH]; -ULONG ulSID; -PID pid; - -// check parameters -if (argc != 2) -{ -logMessage( Usage: open-url url); -dumpArgs( argc, argv); -return -1; -} - -// check configuration -rc = PrfQueryProfileString(HINI_USER, WPURLDEFAULTSETTINGS, - DefaultBrowserExe, , - szAppFromINI, sizeof(szAppFromINI)); -rc = PrfQueryProfileString(HINI_USER, WPURLDEFAULTSETTINGS, - DefaultWorkingDir, , - szDirFromINI, sizeof(szDirFromINI)); -if (*szAppFromINI == 0 || *szDirFromINI == 0) -{ -logMessage( Unable to find default url handler in USER.INI; exiting.); -dumpArgs( argc, argv); -return -1; -} - -// get default parameter list -rc = PrfQueryProfileString(HINI_USER, WPURLDEFAULTSETTINGS, - DefaultParameters, , - szCmdLine, sizeof(szCmdLine)); -strcat( szCmdLine, ); -strcat( szCmdLine, argv[1]); - -// change default directory -_chdir( szDirFromINI); - -// start default handler -STARTDATA SData; -CHARszObjBuf[CCHMAXPATH]; - -SData.Length = sizeof(STARTDATA); -SData.Related = SSF_RELATED_INDEPENDENT; -SData.FgBg= (1) ?