[Libreoffice-commits] .: scripting/source
scripting/source/pyprov/mailmerge.py | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) New commits: commit c25bee9ca3c3015c46c8fcb28654e5bed8a4d912 Author: Caolán McNamara Date: Tue Jan 15 17:17:45 2013 + make emailmerge work with python3 and python2 at the same time Change-Id: I6289b522513a2fc86e261c85a04ca9c89fd55b63 diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index 482387f..18b476c 100755 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -11,6 +11,8 @@ # true # +from __future__ import print_function + import unohelper import uno import re @@ -171,8 +173,6 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): if dbg: print("PyMailSMTPService mimetype is: " + flavor.MimeType, file=dbgout) textbody = content.getTransferData(flavor) - #http://stackoverflow.com/questions/9403265/how-do-i-use-python-3-2-email-module-to-send-unicode-messages-encoded-in-utf-8-w - textbody = textbody.encode('utf-8').decode('iso8859-1') if len(textbody): mimeEncoding = re.sub("charset=.*", "charset=UTF-8", flavor.MimeType) @@ -180,9 +180,16 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): mimeEncoding = mimeEncoding + "; charset=UTF-8" textmsg['Content-Type'] = mimeEncoding textmsg['MIME-Version'] = '1.0' - c = Charset('utf-8') - c.body_encoding = QP - textmsg.set_payload(textbody, c) + + textbody = textbody.encode('utf-8') + if sys.version >= '3': + #http://stackoverflow.com/questions/9403265/how-do-i-use-python-3-2-email-module-to-send-unicode-messages-encoded-in-utf-8-w + textbody = textbody.decode('iso8859-1') + c = Charset('utf-8') + c.body_encoding = QP + textmsg.set_payload(textbody, c) + else: + textmsg.set_payload(textbody) break ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: scripting/source
scripting/source/pyprov/mailmerge.py |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 9dec0c79011a0c09068d86fba9387c67da84a39b Author: Michael Stahl Date: Fri Jan 11 19:07:08 2013 +0100 fdo#59249: mailmerge.py: some more bytes vs. str mangling Obvious problems are in debug code only. Change-Id: I45aafb4f194a5a020bb95bd96c2d92ca7ee578f8 diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index 9dce4d3..cfbe761 100755 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -103,7 +103,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): password = xAuthenticator.getPassword().encode('ascii') if user != b'': if dbg: - print("Logging in, username of", user, file=dbgout) + print("Logging in, username of" + user.decode('ascii'), file=dbgout) self.server.login(user, password) for listener in self.listeners: @@ -137,7 +137,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): bccrecipients = xMailMessage.getBccRecipients() if dbg: print("PyMailSMTPService subject " + subject, file=dbgout) - print("PyMailSMTPService from " + sendername.encode('utf-8'), file=dbgout) + print("PyMailSMTPService from " + sendername, file=dbgout) print("PyMailSMTPService from " + sendermail, file=dbgout) print("PyMailSMTPService send to " + recipients, file=dbgout) @@ -283,7 +283,7 @@ class PyMailIMAPService(unohelper.Base, XMailService): password = xAuthenticator.getPassword().encode('ascii') if user != b'': if dbg: - print("Logging in, username of" + user, file=dbgout) + print("Logging in, username of" + user.decode('ascii'), file=dbgout) self.server.login(user, password) for listener in self.listeners: @@ -351,7 +351,7 @@ class PyMailPOP3Service(unohelper.Base, XMailService): user = xAuthenticator.getUserName().encode('ascii') password = xAuthenticator.getPassword().encode('ascii') if dbg: - print("Logging in, username of" + user, file=dbgout) + print("Logging in, username of" + user.decode('ascii'), file=dbgout) self.server.user(user) self.server.pass_(user, password) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: scripting/source
scripting/source/pyprov/mailmerge.py |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit ac56d9373a66378a04048993ed5aec65cf39f149 Author: Stephan Bergmann Date: Fri Jan 11 18:32:04 2013 +0100 Can't convert 'Enum' resp. 'bytes' object to str implicitly ...when you set dbg = True Change-Id: Ifc170e9336a662dce2ae59227baf3bea692eedac diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index cc7a5df..9dce4d3 100755 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -103,7 +103,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): password = xAuthenticator.getPassword().encode('ascii') if user != b'': if dbg: - print("Logging in, username of" + user, file=dbgout) + print("Logging in, username of", user, file=dbgout) self.server.login(user, password) for listener in self.listeners: @@ -381,7 +381,7 @@ class PyMailServiceProvider(unohelper.Base, XMailServiceProvider): self.ctx = ctx def create(self, aType): if dbg: - print("PyMailServiceProvider create with " + aType, file=dbgout) + print("PyMailServiceProvider create with", aType, file=dbgout) if aType == SMTP: return PyMailSMTPService(self.ctx); elif aType == POP3: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: scripting/source
scripting/source/pyprov/mailmerge.py |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 7a7e19c166df326c45f76a142b478b0629f784c9 Author: Stephan Bergmann Date: Fri Jan 11 18:29:14 2013 +0100 fdo#59249: String literal needs a "b" prefix in Pyhton 3 as the corresponding test is otherwise seen to fail, with user being b, but I have no idea if this is the most Python-3-ish approach to fix that, or whether more code needs to be fixed, too. Change-Id: Ia7fbcbca3cf578ffe1bd5ce3c7c5b709cc77317e diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index e87f9a5..cc7a5df 100755 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -101,7 +101,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): user = xAuthenticator.getUserName().encode('ascii') password = xAuthenticator.getPassword().encode('ascii') - if user != '': + if user != b'': if dbg: print("Logging in, username of" + user, file=dbgout) self.server.login(user, password) @@ -281,7 +281,7 @@ class PyMailIMAPService(unohelper.Base, XMailService): user = xAuthenticator.getUserName().encode('ascii') password = xAuthenticator.getPassword().encode('ascii') - if user != '': + if user != b'': if dbg: print("Logging in, username of" + user, file=dbgout) self.server.login(user, password) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: scripting/source
scripting/source/pyprov/mailmerge.py | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) New commits: commit 8269d576ec5dcfd4ca76ae219e85935efcdc008b Author: Julien Nabet Date: Sun Jan 6 15:02:41 2013 +0100 Fix type SMPT->SMTP Change-Id: I09dfd8c2385e6257248b6a43ee4e2ce97ee6bdfc diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index 236bea1..e87f9a5 100755 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -61,23 +61,23 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): self.connectioncontext = None self.notify = EventObject() if dbg: - print("PyMailSMPTService init", file=dbgout) + print("PyMailSMTPService init", file=dbgout) def addConnectionListener(self, xListener): if dbg: - print("PyMailSMPTService addConnectionListener", file=dbgout) + print("PyMailSMTPService addConnectionListener", file=dbgout) self.listeners.append(xListener) def removeConnectionListener(self, xListener): if dbg: - print("PyMailSMPTService removeConnectionListener", file=dbgout) + print("PyMailSMTPService removeConnectionListener", file=dbgout) self.listeners.remove(xListener) def getSupportedConnectionTypes(self): if dbg: - print("PyMailSMPTService getSupportedConnectionTypes", file=dbgout) + print("PyMailSMTPService getSupportedConnectionTypes", file=dbgout) return self.supportedtypes def connect(self, xConnectionContext, xAuthenticator): self.connectioncontext = xConnectionContext if dbg: - print("PyMailSMPTService connect", file=dbgout) + print("PyMailSMTPService connect", file=dbgout) server = xConnectionContext.getValueByName("ServerName") if dbg: print(server, file=dbgout) @@ -110,7 +110,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): listener.connected(self.notify) def disconnect(self): if dbg: - print("PyMailSMPTService disconnect", file=dbgout) + print("PyMailSMTPService disconnect", file=dbgout) if self.server: self.server.quit() self.server = None @@ -118,17 +118,17 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): listener.disconnected(self.notify) def isConnected(self): if dbg: - print("PyMailSMPTService isConnected", file=dbgout) + print("PyMailSMTPService isConnected", file=dbgout) return self.server != None def getCurrentConnectionContext(self): if dbg: - print("PyMailSMPTService getCurrentConnectionContext", file=dbgout) + print("PyMailSMTPService getCurrentConnectionContext", file=dbgout) return self.connectioncontext def sendMailMessage(self, xMailMessage): COMMASPACE = ', ' if dbg: - print("PyMailSMPTService sendMailMessage", file=dbgout) + print("PyMailSMTPService sendMailMessage", file=dbgout) recipients = xMailMessage.getRecipients() sendermail = xMailMessage.SenderAddress sendername = xMailMessage.SenderName @@ -136,10 +136,10 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): ccrecipients = xMailMessage.getCcRecipients() bccrecipients = xMailMessage.getBccRecipients() if dbg: - print("PyMailSMPTService subject " + subject, file=dbgout) - print("PyMailSMPTService from " + sendername.encode('utf-8'), file=dbgout) + print("PyMailSMTPService subject " + subject, file=dbgout) + print("PyMailSMTPService from " + sendername.encode('utf-8'), file=dbgout) print("PyMailSMTPService from " + sendermail, file=dbgout) - print("PyMailSMPTService send to " + recipients, file=dbgout) + print("PyMailSMTPService send to " + recipients, file=dbgout) attachments = xMailMessage.getAttachments() @@ -148,13 +148,13 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): content = xMailMessage.Body flavors = content.getTransferDataFlavors() if dbg: - print("PyMailSMPTService flavors len " + len(flavors), file
[Libreoffice-commits] .: scripting/source
scripting/source/pyprov/mailmerge.py| 24 scripting/source/pyprov/officehelper.py | 16 2 files changed, 20 insertions(+), 20 deletions(-) New commits: commit 37c6cfde4db921699a1b2660beeb581a9e963630 Author: Michael Stahl Date: Wed Dec 12 12:51:21 2012 +0100 officehelper.py: fix obvious Python 3 issues Change-Id: I40691cd6b1a0a6777e6469bf242fb41dac423587 diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index b177d8e..236bea1 100755 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -80,10 +80,10 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): print("PyMailSMPTService connect", file=dbgout) server = xConnectionContext.getValueByName("ServerName") if dbg: - print >> dbgout, server + print(server, file=dbgout) port = int(xConnectionContext.getValueByName("Port")) if dbg: - print >> dbgout, port + print(port, file=dbgout) self.server = smtplib.SMTP(server, port) #stderr not available for us under windows, but #set_debuglevel outputs there, and so throw @@ -93,7 +93,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): self.server.set_debuglevel(1) connectiontype = xConnectionContext.getValueByName("ConnectionType") if dbg: - print >> dbgout, connectiontype + print(connectiontype, file=dbgout) if connectiontype == 'Ssl': self.server.ehlo() self.server.starttls() @@ -103,7 +103,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): password = xAuthenticator.getPassword().encode('ascii') if user != '': if dbg: - print >> dbgout, 'Logging in, username of', user + print("Logging in, username of" + user, file=dbgout) self.server.login(user, password) for listener in self.listeners: @@ -265,13 +265,13 @@ class PyMailIMAPService(unohelper.Base, XMailService): self.connectioncontext = xConnectionContext server = xConnectionContext.getValueByName("ServerName") if dbg: - print >> dbgout, server + print(server, file=dbgout) port = int(xConnectionContext.getValueByName("Port")) if dbg: - print >> dbgout, port + print(port, file=dbgout) connectiontype = xConnectionContext.getValueByName("ConnectionType") if dbg: - print >> dbgout, connectiontype + print(connectiontype, file=dbgout) print("BEFORE", file=dbgout) if connectiontype == 'Ssl': self.server = imaplib.IMAP4_SSL(server, port) @@ -283,7 +283,7 @@ class PyMailIMAPService(unohelper.Base, XMailService): password = xAuthenticator.getPassword().encode('ascii') if user != '': if dbg: - print >> dbgout, 'Logging in, username of', user + print("Logging in, username of" + user, file=dbgout) self.server.login(user, password) for listener in self.listeners: @@ -334,13 +334,13 @@ class PyMailPOP3Service(unohelper.Base, XMailService): self.connectioncontext = xConnectionContext server = xConnectionContext.getValueByName("ServerName") if dbg: - print >> dbgout, server + print(server, file=dbgout) port = int(xConnectionContext.getValueByName("Port")) if dbg: - print >> dbgout, port + print(port, file=dbgout) connectiontype = xConnectionContext.getValueByName("ConnectionType") if dbg: - print >> dbgout, connectiontype + print(connectiontype, file=dbgout) print("BEFORE", file=dbgout) if connectiontype == 'Ssl': self.server = poplib.POP3_SSL(server, port) @@ -351,7 +351,7 @@ class PyMailPOP3Service(unohelper.Base, XMailService): user = xAuthenticator.getUserName().encode('ascii') password = xAuthenticator.getPassword().encode('ascii') if dbg: - print >> dbgout, 'Logging in, username of', user + print("Logging in, username of" + user, file=dbgout
[Libreoffice-commits] .: scripting/source
scripting/source/pyprov/mailmerge.py | 114 +-- scripting/source/pyprov/msgbox.py|4 - 2 files changed, 59 insertions(+), 59 deletions(-) New commits: commit 2462391f4cc2ffad4fb218afe83ce0ed38f45207 Author: Michael Stahl Date: Tue Dec 11 22:55:56 2012 +0100 mailmerge.py: fix obvious Python 3 issues Change-Id: I796696fbfe1756d625dcabc56c8769bed3d5dbc1 diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index f8ccbd6..b177d8e 100755 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -34,13 +34,13 @@ from com.sun.star.lang import IllegalArgumentException from com.sun.star.lang import EventObject from com.sun.star.mail import SendMailMessageFailedException -from email.MIMEBase import MIMEBase -from email.Message import Message -from email import Encoders -from email.Header import Header -from email.MIMEMultipart import MIMEMultipart -from email.Utils import formatdate -from email.Utils import parseaddr +from email.mime.base import MIMEBase +from email.message import Message +from email.encoders import encode_base64 +from email.header import Header +from email.mime.multipart import MIMEMultipart +from email.utils import formatdate +from email.utils import parseaddr import sys, smtplib, imaplib, poplib dbg = False @@ -61,23 +61,23 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): self.connectioncontext = None self.notify = EventObject() if dbg: - print >> dbgout, "PyMailSMPTService init" + print("PyMailSMPTService init", file=dbgout) def addConnectionListener(self, xListener): if dbg: - print >> dbgout, "PyMailSMPTService addConnectionListener" + print("PyMailSMPTService addConnectionListener", file=dbgout) self.listeners.append(xListener) def removeConnectionListener(self, xListener): if dbg: - print >> dbgout, "PyMailSMPTService removeConnectionListener" + print("PyMailSMPTService removeConnectionListener", file=dbgout) self.listeners.remove(xListener) def getSupportedConnectionTypes(self): if dbg: - print >> dbgout, "PyMailSMPTService getSupportedConnectionTypes" + print("PyMailSMPTService getSupportedConnectionTypes", file=dbgout) return self.supportedtypes def connect(self, xConnectionContext, xAuthenticator): self.connectioncontext = xConnectionContext if dbg: - print >> dbgout, "PyMailSMPTService connect" + print("PyMailSMPTService connect", file=dbgout) server = xConnectionContext.getValueByName("ServerName") if dbg: print >> dbgout, server @@ -110,7 +110,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): listener.connected(self.notify) def disconnect(self): if dbg: - print >> dbgout, "PyMailSMPTService disconnect" + print("PyMailSMPTService disconnect", file=dbgout) if self.server: self.server.quit() self.server = None @@ -118,17 +118,17 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): listener.disconnected(self.notify) def isConnected(self): if dbg: - print >> dbgout, "PyMailSMPTService isConnected" + print("PyMailSMPTService isConnected", file=dbgout) return self.server != None def getCurrentConnectionContext(self): if dbg: - print >> dbgout, "PyMailSMPTService getCurrentConnectionContext" + print("PyMailSMPTService getCurrentConnectionContext", file=dbgout) return self.connectioncontext def sendMailMessage(self, xMailMessage): COMMASPACE = ', ' if dbg: - print >> dbgout, "PyMailSMPTService sendMailMessage" + print("PyMailSMPTService sendMailMessage", file=dbgout) recipients = xMailMessage.getRecipients() sendermail = xMailMessage.SenderAddress sendername = xMailMessage.SenderName @@ -136,10 +136,10 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): ccrecipients = xMailMessage.getCcRecipients() bccrecipients = xMailMessage.getBccRecipients() if dbg: - print >> dbgout, "PyMailSMPTService subject", subject - print >> dbgout, "PyMailSMPTService from", sendername.encode('utf-8') -
[Libreoffice-commits] .: scripting/source
scripting/source/pyprov/pythonscript.py |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 7914f867139c06fd751f6e37c9ed3e563388ed62 Author: Julien Nabet Date: Sun Dec 9 10:55:46 2012 +0100 Python: fix deprecated + "== None" instead of "is None" Change-Id: Ic19c2ac5817cf5f6359bccda14795ec4f17aad7e Reviewed-on: https://gerrit.libreoffice.org/1275 Reviewed-by: Tomáš Chvátal Tested-by: Tomáš Chvátal diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py index dcf05d4..dbc5725 100755 --- a/scripting/source/pyprov/pythonscript.py +++ b/scripting/source/pyprov/pythonscript.py @@ -328,7 +328,7 @@ class ProviderContext: packageName = self.getPackageNameFromUrl( url ) transientPart = self.getTransientPartFromUrl( url ) log.isDebugLevel() and log.debug( "addPackageByUrl : " + packageName + ", " + transientPart + "("+url+")" + ", rootUrl="+self.rootUrl ) -if self.mapPackageName2Path.has_key( packageName ): +if packageName in self.mapPackageName2Path: package = self.mapPackageName2Path[ packageName ] package.pathes = package.pathes + (url, ) else: @@ -380,7 +380,7 @@ class ProviderContext: allFuncs = [] -if code == None: +if code is None: return allFuncs g_exportedScripts = [] ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: scripting/source
scripting/source/provider/ProviderCache.cxx|2 +- scripting/source/stringresource/stringresource.cxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 60e7472b9dcaffb8ca04f9dba7ee04d7a3e7513c Author: Tor Lillqvist Date: Wed Nov 28 21:49:00 2012 +0200 OUString::concat() does not modify in-place Change-Id: I298f33a23e44146d7ce5fbf72d176020804e03d6 diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx index 0b65ffa..09e760e 100644 --- a/scripting/source/provider/ProviderCache.cxx +++ b/scripting/source/provider/ProviderCache.cxx @@ -176,7 +176,7 @@ ProviderCache::populateCache() throw ( RuntimeException ) { ::rtl::OUString temp = OUSTR( "ProviderCache::populateCache: couldn't obtain XSingleComponentFactory for " ); -temp.concat( serviceName ); +temp = temp.concat( serviceName ); throw RuntimeException( temp.concat( e.Message ), Reference< XInterface >() ); } } diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index 0086ea9..1b30c81 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -200,7 +200,7 @@ void StringResourceImpl::removeModifyListener( const Reference< XModifyListener if( !bSuccess ) { ::rtl::OUString errorMsg("StringResourceImpl: No entry for ResourceID: "); -errorMsg.concat( ResourceID ); +errorMsg = errorMsg.concat( ResourceID ); throw ::com::sun::star::resource::MissingResourceException( errorMsg, Reference< XInterface >() ); } return aRetStr; @@ -448,7 +448,7 @@ void StringResourceImpl::implRemoveId( const ::rtl::OUString& ResourceID, Locale if( it == rHashMap.end() ) { ::rtl::OUString errorMsg("StringResourceImpl: No entries for ResourceID: "); -errorMsg.concat( ResourceID ); +errorMsg = errorMsg.concat( ResourceID ); throw ::com::sun::star::resource::MissingResourceException( errorMsg, Reference< XInterface >() ); } rHashMap.erase( it ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: scripting/source
scripting/source/vbaevents/eventhelper.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e06575d46c6f3b24faf912018baea0eec9c82e4d Author: Michael Stahl Date: Thu Nov 8 18:38:04 2012 +0100 scripting: warning C4804 usafe use of type bool Change-Id: I2db644a3c18658b07834fe6653b17713fd8201a7 diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index ac9d302..575fe2f 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -915,7 +915,7 @@ EventListener::firing_Impl(const ScriptEvent& evt, Any* pRet ) throw(RuntimeExce //rtl::OUString sMacroLoc("Project"); sProject = "Standard"; -if ( !pBasicManager->GetName().isEmpty() > 0 ) +if (!pBasicManager->GetName().isEmpty()) { sProject = pBasicManager->GetName(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: scripting/source
scripting/source/stringresource/stringresource.cxx | 26 ++--- 1 file changed, 13 insertions(+), 13 deletions(-) New commits: commit 350de508cfb0b3c9a471744f1b4ce440ae2edd44 Author: Julien Nabet Date: Sun Jul 15 15:21:12 2012 +0200 Prefer prefix ++/-- operators for non-primitive types Change-Id: Iedb58cade2bc7cdbce2e8d40b0e3502bf3df4fa9 diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index c26492b..b0d4eb6 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -113,13 +113,13 @@ StringResourceImpl::StringResourceImpl( const Reference< XComponentContext >& rx StringResourceImpl::~StringResourceImpl() { -for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ ) +for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it ) { LocaleItem* pLocaleItem = *it; delete pLocaleItem; } -for( LocaleItemVectorIt it = m_aDeletedLocaleItemVector.begin(); it != m_aDeletedLocaleItemVector.end(); it++ ) +for( LocaleItemVectorIt it = m_aDeletedLocaleItemVector.begin(); it != m_aDeletedLocaleItemVector.end(); ++it ) { LocaleItem* pLocaleItem = *it; delete pLocaleItem; @@ -316,7 +316,7 @@ Sequence< Locale > StringResourceImpl::getLocales( ) Sequence< Locale > aLocalSeq( nSize ); Locale* pLocales = aLocalSeq.getArray(); int iTarget = 0; -for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ ) +for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it ) { LocaleItem* pLocaleItem = *it; pLocales[iTarget] = pLocaleItem->m_locale; @@ -556,7 +556,7 @@ void StringResourceImpl::removeLocale( const Locale& locale ) if( m_pCurrentLocaleItem == pRemoveItem || m_pDefaultLocaleItem == pRemoveItem ) { -for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ ) +for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it ) { LocaleItem* pLocaleItem = *it; if( pLocaleItem != pRemoveItem ) @@ -576,7 +576,7 @@ void StringResourceImpl::removeLocale( const Locale& locale ) } } } -for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ ) +for( LocaleItemVectorIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it ) { LocaleItem* pLocaleItem = *it; if( pLocaleItem == pRemoveItem ) @@ -656,7 +656,7 @@ LocaleItem* StringResourceImpl::getItemForLocale LocaleItem* pRetItem = NULL; // Search for locale -for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ ) +for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it ) { LocaleItem* pLocaleItem = *it; if( pLocaleItem ) @@ -689,7 +689,7 @@ LocaleItem* StringResourceImpl::getClosestMatchItemForLocale( const Locale& loca // Search for locale for( sal_Int32 iPass = 0 ; iPass <= 2 ; ++iPass ) { -for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ ) +for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it ) { LocaleItem* pLocaleItem = *it; if( pLocaleItem ) @@ -1048,7 +1048,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage } } -for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); it++ ) +for( LocaleItemVectorConstIt it = m_aLocaleItemVector.begin(); it != m_aLocaleItemVector.end(); ++it ) { LocaleItem* pLocaleItem = *it; if( pLocaleItem != NULL && (bStoreAll || pLocaleItem->m_bModified) && @@ -1087,7 +1087,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage if( bUsedForStore ) { for( LocaleItemVectorIt it = m_aChangedDefaultLocaleVector.begin(); - it != m_aChangedDefaultLocaleVector.end(); it++ ) + it != m_aChangedDefaultLocaleVector.end(); ++it ) { LocaleItem* pLocaleItem = *it; if( pLocaleItem != NULL ) @@ -1182,7 +1182,7 @@ void StringResourcePersistenceImpl::implKillChangedDefaultFiles { // Delete files for changed defaults for( LocaleItemVectorIt it = m_aChangedDefaultLocaleVector.begin(); - it != m_aChangedDefaultLocaleVector.end(); it++ ) + it != m_aChangedDefaultLocaleVector.end
[Libreoffice-commits] .: scripting/source
scripting/source/pyprov/description.xml |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit eae0f40bbad072de0bc3a035a4c7fba0a0fa1a53 Author: Stephan Bergmann Date: Thu Apr 26 08:34:12 2012 +0200 Bump extension version after changing to passive registration ...otherwise, if it is bundled, its per-user data is not regenerated, leading to inconsistencies. diff --git a/scripting/source/pyprov/description.xml b/scripting/source/pyprov/description.xml index a42c764..6f4e420 100644 --- a/scripting/source/pyprov/description.xml +++ b/scripting/source/pyprov/description.xml @@ -10,7 +10,7 @@ - + http://www.documentfoundation.org"; lang="en-US">The Document Foundation ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits