Show locale paragraph names
This commit is contained in:
parent
e5b2241008
commit
fa4069030f
|
@ -2889,7 +2889,7 @@ class LOWriterStyles(object):
|
|||
|
||||
@property
|
||||
def names(self):
|
||||
return self._styles.ElementNames
|
||||
return {s.DisplayName: s.Name for s in self._styles}
|
||||
|
||||
def __str__(self):
|
||||
return '\n'.join(self.names)
|
||||
|
|
Binary file not shown.
|
@ -2889,7 +2889,7 @@ class LOWriterStyles(object):
|
|||
|
||||
@property
|
||||
def names(self):
|
||||
return self._styles.ElementNames
|
||||
return {s.DisplayName: s.Name for s in self._styles}
|
||||
|
||||
def __str__(self):
|
||||
return '\n'.join(self.names)
|
||||
|
|
|
@ -18,6 +18,7 @@ class Controllers(object):
|
|||
|
||||
def __init__(self, dlg):
|
||||
self.d = dlg
|
||||
self.styles = {}
|
||||
|
||||
@app.catch_exception
|
||||
def cmd_replace_by_paragraph_action(self, event):
|
||||
|
@ -41,6 +42,9 @@ class Controllers(object):
|
|||
if not app.question(msg):
|
||||
return
|
||||
|
||||
source = self.styles[source]
|
||||
target = self.styles[target]
|
||||
|
||||
doc = app.active
|
||||
i = 0
|
||||
for p in doc.paragraphs:
|
||||
|
@ -128,8 +132,9 @@ def _create_dialog_replace_styles():
|
|||
|
||||
doc = app.active
|
||||
styles = doc.styles['Paragraph'].names
|
||||
dlg.lst_paragraph_source.data = styles
|
||||
dlg.lst_paragraph_target.data = styles
|
||||
dlg.lst_paragraph_source.data = tuple(styles.keys())
|
||||
dlg.lst_paragraph_target.data = tuple(styles.keys())
|
||||
dlg.events.styles = styles
|
||||
|
||||
return dlg
|
||||
|
||||
|
|
Loading…
Reference in New Issue