diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-12-09 23:23:27 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2012-12-09 23:23:42 +0100 |
commit | 36638e6a876fbeb6217e7ea4ee00fbc022a013c8 (patch) | |
tree | fdbfae66a23f097bf627f0c857fb44f0f0aee287 | |
parent | be487d6ee1b97901a903fe5c6dd7ab2cad702b04 (diff) |
Python/pep8: fix E711 (is or is not None instead of = or !=) in letter module
Change-Id: Ic6ff028008aea87d1bf2126dccd2afb1bf3733d2
3 files changed, 16 insertions, 16 deletions
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py index c16dd7c20ee4..54be3691bac4 100644 --- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py +++ b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py @@ -560,8 +560,8 @@ class AgendaTemplate(TextDocument): paraStyle = Range.ParaStyleName Range.setString(text) Range.ParaStyleName = paraStyle - if text == None or text == "": - if placeholder != None and not placeholder == "": + if text is None or text == "": + if placeholder is not None and not placeholder == "": placeHolder = createPlaceHolder( self.xTextDocument, placeholder, self.resources.resPlaceHolderHint) diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.py b/wizards/com/sun/star/wizards/letter/LetterDocument.py index 75025a2c6c64..dd0484200113 100644 --- a/wizards/com/sun/star/wizards/letter/LetterDocument.py +++ b/wizards/com/sun/star/wizards/letter/LetterDocument.py @@ -60,7 +60,7 @@ class LetterDocument(TextDocument): FH.updateDateFields() def switchFooter(self, sPageStyle, bState, bPageNumber, sText): - if self.xTextDocument != None: + if self.xTextDocument is not None: try: self.xTextDocument.lockControllers() xNameAccess = self.xTextDocument.StyleFamilies @@ -94,7 +94,7 @@ class LetterDocument(TextDocument): traceback.print_exc() def hasElement(self, sElement): - if self.xTextDocument != None: + if self.xTextDocument is not None: SH = TextSectionHandler(self.xMSF, self.xTextDocument) return SH.hasTextSectionByName(sElement) else: @@ -137,31 +137,31 @@ class LetterDocument(TextDocument): if not self.keepLogoFrame: xTF = self.getFrameByName( "Company Logo", self.xTextDocument) - if xTF != None: + if xTF is not None: xTF.dispose() if not self.keepBendMarksFrame: xTF = self.getFrameByName( "Bend Marks", self.xTextDocument) - if xTF != None: + if xTF is not None: xTF.dispose() if not self.keepLetterSignsFrame: xTF = self.getFrameByName( "Letter Signs", self.xTextDocument) - if xTF != None: + if xTF is not None: xTF.dispose() if not self.keepSenderAddressRepeatedFrame: xTF = self.getFrameByName( "Sender Address Repeated", self.xTextDocument) - if xTF != None: + if xTF is not None: xTF.dispose() if not self.keepAddressFrame: xTF = self.getFrameByName( "Sender Address", self.xTextDocument) - if xTF != None: + if xTF is not None: xTF.dispose() except Exception: diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py index 29b802fcd601..e9ace51b5bd9 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py @@ -427,7 +427,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.xDialogModel.numLogoY.Enabled = True self.setPossibleLogo(False) else: - if self.BusCompanyLogo != None: + if self.BusCompanyLogo is not None: self.BusCompanyLogo.removeFrame() self.xDialogModel.numLogoHeight.Enabled = False @@ -501,7 +501,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.setPossibleSenderData(False) else: - if self.BusCompanyAddressReceiver != None: + if self.BusCompanyAddressReceiver is not None: self.BusCompanyAddressReceiver.removeFrame() self.setPossibleAddressReceiver(True) @@ -527,7 +527,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): self.xDialogModel.lblFooterHeight.Enabled = True self.setPossibleFooter(False) else: - if self.BusFooter != None: + if self.BusFooter is not None: self.BusFooter.removeFrame() self.xDialogModel.numFooterHeight.Enabled = False @@ -732,16 +732,16 @@ class LetterWizardDialogImpl(LetterWizardDialog): BPaperItem = self.getRoadmapItemByID( LetterWizardDialogImpl.RM_BUSINESSPAPER) BPaperItem.Enabled = False - if self.BusCompanyLogo != None: + if self.BusCompanyLogo is not None: self.BusCompanyLogo.removeFrame() - if self.BusCompanyAddress != None: + if self.BusCompanyAddress is not None: self.BusCompanyAddress.removeFrame() - if self.BusFooter != None: + if self.BusFooter is not None: self.BusFooter.removeFrame() - if self.BusCompanyAddressReceiver != None: + if self.BusCompanyAddressReceiver is not None: self.BusCompanyAddressReceiver.removeFrame() self.setPossibleAddressReceiver(True) |