Overview
Comment: | [lo] Text formatter editor (draft) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | new_feature | lo |
Files: | files | file ages | folders |
SHA3-256: |
c46f9e162fe63eab7b15fcf64ce579d8 |
User & Date: | olr on 2020-12-15 16:33:30 |
Original Comment: | [lo] Text formatter editor |
Other Links: | manifest | tags |
Context
2020-12-16
| ||
17:54 | [lo] text formatter editor: save, import, export check-in: ac50c72aa8 user: olr tags: trunk, lo | |
2020-12-15
| ||
16:33 | [lo] Text formatter editor (draft) check-in: c46f9e162f user: olr tags: trunk, new_feature, lo | |
16:31 | [lo] launch console from menu check-in: 7e2f01e527 user: olr tags: trunk, lo | |
Changes
Modified gc_lang/fr/oxt/TextFormatter/TextFormatter.py from [1015843a01] to [8366eaa359].
︙ | |||
10 11 12 13 14 15 16 17 18 19 20 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | + + - + + | import json import tf_strings import tf_options import tf_tabrep import helpers import TextFormatterEditor import unohelper import uno from com.sun.star.task import XJobExecutor from com.sun.star.awt import XActionListener |
︙ | |||
56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | + | xWidget.Height = h for k, w in kwargs.items(): setattr(xWidget, k, w) self.xDialog.insertByName(name, xWidget) return xWidget def run (self, sLang): self.sLang = sLang self.dUI = tf_strings.getUI(sLang) ## dialog self.xDialog = self.xSvMgr.createInstanceWithContext('com.sun.star.awt.UnoControlDialogModel', self.ctx) self.xDialog.Width = 310 self.xDialog.Title = self.dUI.get('title', "#title#") |
︙ | |||
206 207 208 209 210 211 212 213 214 215 216 217 218 219 | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | + + + + - + - + - + | self.misc1a = self._addWidget('misc1a', 'CheckBox', x2+80, y+15, 30, nHeight, Label = self.dUI.get('misc1a', "#err"), State = True) self.misc2 = self._addWidget('misc2', 'CheckBox', x2, y+25, nWidth, nHeight, Label = self.dUI.get('misc2', "#err"), State = True) self.misc3 = self._addWidget('misc3', 'CheckBox', x2, y+35, nWidth, nHeight, Label = self.dUI.get('misc3', "#err"), State = True) #self.misc4 = self._addWidget('misc4', 'CheckBox', x2, y+45, nWidth, nHeight, Label = self.dUI.get('misc4', "#err"), State = True) self.misc5 = self._addWidget('misc5', 'CheckBox', x2, y+45, nWidth, nHeight, Label = self.dUI.get('misc5', "#err"), State = True) self.misc5b = self._addWidget('misc5b', 'CheckBox', x2+10, y+55, nWidth-40, nHeight, Label = self.dUI.get('misc5b', "#err"), State = False) self.misc5c = self._addWidget('misc5c', 'CheckBox', x2+nWidth-25, y+55, 30, nHeight, Label = self.dUI.get('misc5c', "#err"), State = False) self.misccustom = self._addWidget('misccustom', "CheckBox", x2, y+65, nWidth-40, nHeight, Label = self.dUI.get('misccustom', "#err"), State = False) self.beditor = self._addWidget('editor', 'Button', x2+95, y+64, 30, 9, Label = self.dUI.get('editor', "#err"), \ HelpText = self.dUI.get('editor_help', "#err"), FontDescriptor = xFDsmall) self.misc1_res = self._addWidget('misc1_res', 'FixedText', nPosRes, y+15, 20, nHeight, Label = "", Align = 2) self.misc2_res = self._addWidget('misc2_res', 'FixedText', nPosRes, y+25, 20, nHeight, Label = "", Align = 2) self.misc3_res = self._addWidget('misc3_res', 'FixedText', nPosRes, y+35, 20, nHeight, Label = "", Align = 2) #self.misc4_res = self._addWidget('misc4_res', 'FixedText', nPosRes, y+45, 20, nHeight, Label = "", Align = 2) self.misc5_res = self._addWidget('misc5_res', 'FixedText', nPosRes, y+45, 20, nHeight, Label = "", Align = 2) self.misccustom_res = self._addWidget('misccustom_res', 'FixedText', nPosRes, y+55, 20, nHeight, Label = "", Align = 2) # group box // restructuration |
︙ | |||
270 271 272 273 274 275 276 277 278 279 280 281 282 283 | 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | + + | ## container self.xContainer = self.xSvMgr.createInstanceWithContext('com.sun.star.awt.UnoControlDialog', self.ctx) self.xContainer.setModel(self.xDialog) self.xContainer.setVisible(False) self.xContainer.getControl('info').addActionListener(self) self.xContainer.getControl('info').setActionCommand('Info') self.xContainer.getControl('editor').addActionListener(self) self.xContainer.getControl('editor').setActionCommand('Editor') self.xContainer.getControl('default').addActionListener(self) self.xContainer.getControl('default').setActionCommand('Default') self.xContainer.getControl('apply').addActionListener(self) self.xContainer.getControl('apply').setActionCommand('Apply') self.xContainer.getControl('ssp').addActionListener(self) self.xContainer.getControl('ssp').setActionCommand('SwitchSsp') self.xContainer.getControl('space').addActionListener(self) |
︙ | |||
346 347 348 349 350 351 352 353 354 355 356 357 358 359 | 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | + + + | self._setApplyButtonLabel() elif xActionEvent.ActionCommand == 'SwitchStruct': self._switchCheckBox(self.struct) self._setApplyButtonLabel() elif xActionEvent.ActionCommand == 'Default': self._setConfig(tf_options.dDefaultOpt) self._setApplyButtonLabel() elif xActionEvent.ActionCommand == 'Editor': xDialog = TextFormatterEditor.TextFormatterEditor(self.ctx) xDialog.run(self.sLang) elif xActionEvent.ActionCommand == 'Info': xDesktop = self.xSvMgr.createInstanceWithContext('com.sun.star.frame.Desktop', self.ctx) xDoc = xDesktop.getCurrentComponent() xWindow = xDoc.CurrentController.Frame.ContainerWindow MessageBox (xWindow, self.dUI.get('infomsg', "#err"), self.dUI.get('infotitle', "#err")) else: print("Wrong command: " + xActionEvent.ActionCommand) |
︙ | |||
658 659 660 661 662 663 664 665 666 667 668 669 670 671 | 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 | + + + + | n = self._replaceList(xElem, "misc5a") if self.misc5b.State: n += self._replaceList(xElem, "misc5b") if self.misc5c.State: n += self._replaceList(xElem, "misc5c") self.misc5_res.Label = str(n) self.pbar.ProgressValue += 1 if self.misccustom.State: n = self._replaceList(xElem, "misccustom") self.misccustom_res.Label = str(n) self.pbar.ProgressValue += 1 self.misc.State = False self._switchCheckBox(self.misc) self.pbar.ProgressValue = self.pbar.ProgressValueMax # end of processing xPointer.setType(uno.getConstantByName("com.sun.star.awt.SystemPointer.ARROW")) xWindowPeer.setPointer(xPointer) for x in xWindowPeer.Windows: |
︙ |
Added gc_lang/fr/oxt/TextFormatter/TextFormatterEditor.py version [5352d7d61f].