Updated new.py for installing Plone 4 without buildout and added an alternative way to insert POD expressions in POD templates via fields (track-changed text still works).
This commit is contained in:
parent
feca97bda3
commit
50c8a139fc
9 changed files with 1841 additions and 1825 deletions
|
@ -100,8 +100,8 @@ class PodEnvironment(OdfEnvironment):
|
|||
# For the currently read expression, is there style-related information
|
||||
# associated with it?
|
||||
self.exprHasStyle = False
|
||||
self.gotNamespaces = False # Namespace definitions were not already
|
||||
# encountered
|
||||
# Namespace definitions are not already encountered.
|
||||
self.gotNamespaces = False
|
||||
# Store inserts
|
||||
self.inserts = inserts
|
||||
# Currently walked "if" actions
|
||||
|
@ -208,7 +208,8 @@ class PodParser(OdfParser):
|
|||
e.state = e.IGNORING
|
||||
elif elem == ('%s:annotation' % officeNs):
|
||||
e.state = e.READING_STATEMENT
|
||||
elif elem == ('%s:change-start' % textNs):
|
||||
elif (elem == ('%s:change-start' % textNs)) or \
|
||||
(elem == ('%s:conditional-text' % textNs)):
|
||||
e.state = e.READING_EXPRESSION
|
||||
e.exprHasStyle = False
|
||||
else:
|
||||
|
@ -280,7 +281,8 @@ class PodParser(OdfParser):
|
|||
e.currentStatement.append(statementLine)
|
||||
e.currentContent = ''
|
||||
elif e.state == e.READING_EXPRESSION:
|
||||
if elem == ('%s:change-end' % textNs):
|
||||
if (elem == ('%s:change-end' % textNs)) or \
|
||||
(elem == ('%s:conditional-text' % textNs)):
|
||||
expression = e.currentContent.strip()
|
||||
e.currentContent = ''
|
||||
# Manage expression
|
||||
|
|
3280
pod/test/Tests.rtf
3280
pod/test/Tests.rtf
File diff suppressed because it is too large
Load diff
2
pod/test/contexts/FieldExpressions.py
Normal file
2
pod/test/contexts/FieldExpressions.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
old = 'OLD'
|
||||
new = 'NEW'
|
BIN
pod/test/results/fieldExpression.odt
Normal file
BIN
pod/test/results/fieldExpression.odt
Normal file
Binary file not shown.
BIN
pod/test/templates/FieldExpressions.odt
Normal file
BIN
pod/test/templates/FieldExpressions.odt
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue