summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
Diffstat (limited to 'wizards')
-rwxr-xr-xwizards/com/sun/star/wizards/RemoteAgendaWizard6
-rwxr-xr-xwizards/com/sun/star/wizards/RemoteFaxWizard7
-rwxr-xr-xwizards/com/sun/star/wizards/RemoteLetterWizard7
-rwxr-xr-xwizards/com/sun/star/wizards/RemoteWebWizard7
-rw-r--r--wizards/com/sun/star/wizards/__init__.py0
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaTemplate.py1197
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py293
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py63
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py463
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py153
-rw-r--r--wizards/com/sun/star/wizards/agenda/CGAgenda.py27
-rw-r--r--wizards/com/sun/star/wizards/agenda/CGTopic.py45
-rw-r--r--wizards/com/sun/star/wizards/agenda/TemplateConsts.py72
-rw-r--r--wizards/com/sun/star/wizards/agenda/TopicsControl.py886
-rw-r--r--wizards/com/sun/star/wizards/agenda/__init__.py0
-rw-r--r--wizards/com/sun/star/wizards/common/ConfigGroup.py35
-rw-r--r--wizards/com/sun/star/wizards/common/ConfigNode.py13
-rw-r--r--wizards/com/sun/star/wizards/common/ConfigSet.py184
-rw-r--r--wizards/com/sun/star/wizards/common/Configuration.py214
-rw-r--r--wizards/com/sun/star/wizards/common/DebugHelper.py10
-rw-r--r--wizards/com/sun/star/wizards/common/Desktop.py228
-rw-r--r--wizards/com/sun/star/wizards/common/FileAccess.py675
-rw-r--r--wizards/com/sun/star/wizards/common/HelpIds.py1012
-rw-r--r--wizards/com/sun/star/wizards/common/Helper.py159
-rw-r--r--wizards/com/sun/star/wizards/common/NoValidPathException.py10
-rw-r--r--wizards/com/sun/star/wizards/common/NumberFormatter.py231
-rw-r--r--wizards/com/sun/star/wizards/common/Properties.py43
-rw-r--r--wizards/com/sun/star/wizards/common/PropertyNames.py15
-rw-r--r--wizards/com/sun/star/wizards/common/PropertySetHelper.py250
-rw-r--r--wizards/com/sun/star/wizards/common/Resource.py69
-rw-r--r--wizards/com/sun/star/wizards/common/SystemDialog.py231
-rw-r--r--wizards/com/sun/star/wizards/common/__init__.py1
-rw-r--r--wizards/com/sun/star/wizards/common/prova.py7
-rw-r--r--wizards/com/sun/star/wizards/document/OfficeDocument.py280
-rw-r--r--wizards/com/sun/star/wizards/document/__init__.py0
-rw-r--r--wizards/com/sun/star/wizards/fax/CGFax.py31
-rw-r--r--wizards/com/sun/star/wizards/fax/CGFaxWizard.py10
-rw-r--r--wizards/com/sun/star/wizards/fax/CallWizard.py156
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxDocument.py134
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialog.py756
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py87
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py858
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py144
-rw-r--r--wizards/com/sun/star/wizards/fax/__init__.py1
-rw-r--r--wizards/com/sun/star/wizards/letter/CGLetter.py37
-rw-r--r--wizards/com/sun/star/wizards/letter/CGLetterWizard.py10
-rw-r--r--wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py10
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterDocument.py259
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialog.py1105
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py60
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py1196
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py219
-rw-r--r--wizards/com/sun/star/wizards/letter/LocaleCodes.py154
-rw-r--r--wizards/com/sun/star/wizards/letter/__init__.py0
-rw-r--r--wizards/com/sun/star/wizards/text/TextDocument.py263
-rw-r--r--wizards/com/sun/star/wizards/text/TextFieldHandler.py166
-rw-r--r--wizards/com/sun/star/wizards/text/TextSectionHandler.py123
-rw-r--r--wizards/com/sun/star/wizards/text/ViewHandler.py37
-rw-r--r--wizards/com/sun/star/wizards/text/__init__.py0
-rw-r--r--wizards/com/sun/star/wizards/ui/ControlScroller.py230
-rw-r--r--wizards/com/sun/star/wizards/ui/DocumentPreview.py85
-rw-r--r--wizards/com/sun/star/wizards/ui/ImageList.py502
-rw-r--r--wizards/com/sun/star/wizards/ui/PathSelection.py121
-rw-r--r--wizards/com/sun/star/wizards/ui/PeerConfig.py62
-rw-r--r--wizards/com/sun/star/wizards/ui/UIConsts.py53
-rw-r--r--wizards/com/sun/star/wizards/ui/UnoDialog.py412
-rw-r--r--wizards/com/sun/star/wizards/ui/UnoDialog2.py239
-rw-r--r--wizards/com/sun/star/wizards/ui/WizardDialog.py489
-rw-r--r--wizards/com/sun/star/wizards/ui/XPathSelectionListener.py7
-rw-r--r--wizards/com/sun/star/wizards/ui/__init__.py1
-rw-r--r--wizards/com/sun/star/wizards/ui/event/CommonListener.py124
-rw-r--r--wizards/com/sun/star/wizards/ui/event/DataAware.py114
-rw-r--r--wizards/com/sun/star/wizards/ui/event/ListModelBinder.py75
-rw-r--r--wizards/com/sun/star/wizards/ui/event/RadioDataAware.py37
-rw-r--r--wizards/com/sun/star/wizards/ui/event/UnoDataAware.py84
-rw-r--r--wizards/com/sun/star/wizards/ui/event/__init__.py0
-rw-r--r--wizards/com/sun/star/wizards/web/BackgroundsDialog.py194
-rw-r--r--wizards/com/sun/star/wizards/web/IconsDialog.py96
-rw-r--r--wizards/com/sun/star/wizards/web/ImageListDialog.py211
-rw-r--r--wizards/com/sun/star/wizards/web/StylePreview.py76
-rw-r--r--wizards/com/sun/star/wizards/web/WWD_Events.py937
-rw-r--r--wizards/com/sun/star/wizards/web/WWD_General.py258
-rw-r--r--wizards/com/sun/star/wizards/web/WWD_Startup.py661
-rw-r--r--wizards/com/sun/star/wizards/web/WWHID.py140
-rw-r--r--wizards/com/sun/star/wizards/web/WebWizardConst.py39
-rw-r--r--wizards/com/sun/star/wizards/web/WebWizardDialog.py713
-rw-r--r--wizards/com/sun/star/wizards/web/WebWizardDialogResources.py298
-rw-r--r--wizards/com/sun/star/wizards/web/__init__.py0
88 files changed, 0 insertions, 18967 deletions
diff --git a/wizards/com/sun/star/wizards/RemoteAgendaWizard b/wizards/com/sun/star/wizards/RemoteAgendaWizard
deleted file mode 100755
index 996ad35e4e76..000000000000
--- a/wizards/com/sun/star/wizards/RemoteAgendaWizard
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env python
-from agenda.AgendaWizardDialogImpl import AgendaWizardDialogImpl
-import sys
-
-if __name__ == "__main__":
- AgendaWizardDialogImpl.main(sys.argv)
diff --git a/wizards/com/sun/star/wizards/RemoteFaxWizard b/wizards/com/sun/star/wizards/RemoteFaxWizard
deleted file mode 100755
index 76144cbfef1d..000000000000
--- a/wizards/com/sun/star/wizards/RemoteFaxWizard
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env python
-from fax.FaxWizardDialogImpl import FaxWizardDialogImpl
-import sys
-
-if __name__ == "__main__":
-
- FaxWizardDialogImpl.main(sys.argv)
diff --git a/wizards/com/sun/star/wizards/RemoteLetterWizard b/wizards/com/sun/star/wizards/RemoteLetterWizard
deleted file mode 100755
index 9928625f6e5f..000000000000
--- a/wizards/com/sun/star/wizards/RemoteLetterWizard
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env python
-from letter.LetterWizardDialogImpl import LetterWizardDialogImpl
-import sys
-
-if __name__ == "__main__":
-
- LetterWizardDialogImpl.main(sys.argv)
diff --git a/wizards/com/sun/star/wizards/RemoteWebWizard b/wizards/com/sun/star/wizards/RemoteWebWizard
deleted file mode 100755
index 1f6d747c349e..000000000000
--- a/wizards/com/sun/star/wizards/RemoteWebWizard
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env python
-from web.WWD_Events import WWD_Events
-import sys
-
-if __name__ == "__main__":
-
- WWD_Events.main(sys.argv)
diff --git a/wizards/com/sun/star/wizards/__init__.py b/wizards/com/sun/star/wizards/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/wizards/com/sun/star/wizards/__init__.py
+++ /dev/null
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py
deleted file mode 100644
index 9bae395b3880..000000000000
--- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py
+++ /dev/null
@@ -1,1197 +0,0 @@
-import uno
-from TemplateConsts import *
-from threading import RLock
-from text.TextDocument import *
-from common.FileAccess import FileAccess
-from text.TextSectionHandler import TextSectionHandler
-from TopicsControl import TopicsControl
-from datetime import date as dateTimeObject
-
-from com.sun.star.text.PlaceholderType import TEXT
-from com.sun.star.i18n.NumberFormatIndex import TIME_HHMM, DATE_SYSTEM_LONG
-
-def synchronized(lock):
- ''' Synchronization decorator. '''
- def wrap(f):
- def newFunction(*args, **kw):
- lock.acquire()
- try:
- return f(*args, **kw)
- finally:
- lock.release()
- return newFunction
- return wrap
-
-'''
-The classes here implement the whole document-functionality of the agenda wizard:
-the live-preview and the final "creation" of the document,
-when the user clicks "finish". <br/>
-<br/>
-<h2>Some terminology:<h2/>
-items are names or headings. we don't make any distinction.
-
-<br/>
-The Agenda Template is used as general "controller"
-of the whole document, whereas the two child-classes ItemsTable
-and TopicsTable control the item tables (note plural!) and the
-topics table (note singular).<br/>
-<br/>
-Other small classes are used to abstract the handling of cells and text and we
-try to use them as components.
-<br/><br/>
-We tried to keep the Agenda Template as flexible as possible, though there
-must be many limitations, because it is generated dynamically.<br/><br/>
-To keep the template flexible the following decisions were made:<br/>
-1. Item tables.<br/>
-1.a. there might be arbitrary number of Item tables.<br/>
-1.b. Item tables design (bordewr, background) is arbitrary.<br/>
-1.c. Items text styles are individual,
-and use stylelist styles with predefined names.<br/>
-As result the following limitations:<br/>
-Pairs of Name->value for each item.<br/>
-Tables contain *only* those pairs.<br/>
-2. Topics table.<br/>
-2.a. arbitrary structure.<br/>
-2.b. design is arbitrary.<br/>
-As result the following limitations:<br/>
-No column merge is allowed.<br/>
-One compolsary Heading row.<br/>
-<br/><br/>
-To let the template be flexible, we use a kind of "detection": we look where
-the items are read the design of each table, reaplying it after writing the
-table.AgendaTemplate.document
-<br/><br/>
-A note about threads:<br/>
-Many methods here are synchronized, in order to avoid colission made by
-events fired too often.
-@author rpiterman
-'''
-class AgendaTemplate(TextDocument):
-
- writtenTopics = []
- itemsCache = None
- _allItems = []
- items = []
- itemsMap = {}
- document = None
- textSectionHandler = None
- template = None
- agenda = None
- lock = RLock()
-
- '''constructor. The document is *not* loaded here.
- only some formal members are set.
- @param AgendaTemplate.document_ service factory.
- @param agenda_ the data model (CGAgenda)
- @param resources_ resources.
- '''
-
- def __init__(self, xmsf_, agenda_, resources_, listener):
- super(AgendaTemplate,self).__init__(xmsf_,listener, None,
- "WIZARD_LIVE_PREVIEW")
- AgendaTemplate.agenda = agenda_
- self.resources = resources_
-
- if AgendaTemplate.itemsCache is None:
- self.initItemsCache()
-
- AgendaTemplate._allItems = None
-
- @synchronized(lock)
- def load(self, templateURL, topics):
- AgendaTemplate.template = self.calcTemplateName(templateURL)
- AgendaTemplate.document = self.loadAsPreview(templateURL, False)
- self.xFrame.ComponentWindow.Enable = False
- self.xTextDocument.lockControllers()
- self.initialize()
- self.initializeData(topics)
- self.xTextDocument.unlockControllers()
-
- '''
- The agenda templates are in format of aw-XXX.ott
- the templates name is then XXX.ott.
- This method calculates it.
- @param url
- @return the template name without the "aw-" at the beginning.
- '''
-
- def calcTemplateName(self, url):
- return FileAccess.connectURLs(
- FileAccess.getParentDir(url), FileAccess.getFilename(url)[3:])
-
- '''synchronize the document to the model.<br/>
- this method rewrites all titles, item tables , and the topics table-
- thus synchronizing the document to the data model (CGAgenda).
- @param topicsData since the model does not contain Topics
- information (it is only actualized on save) the given list
- supplies this information.
- '''
-
- def initializeData(self, topicsData):
- for i in self.itemsTables:
- try:
- i.write("")
- except Exception, ex:
- traceback.print_exc()
-
- self.redrawTitle("txtTitle")
- self.redrawTitle("txtDate")
- self.redrawTitle("txtTime")
- self.redrawTitle("cbLocation")
- if AgendaTemplate.agenda.cp_TemplateName is None:
- AgendaTemplate.agenda.cp_TemplateName = ""
- self.setTemplateTitle(AgendaTemplate.agenda.cp_TemplateName)
-
- '''redraws/rewrites the table which contains the given item
- This method is called when the user checks/unchecks an item.
- The table is being found, in which the item is, and redrawn.
- @param itemName
- '''
-
- @classmethod
- @synchronized(lock)
- def redraw(self, itemName):
- AgendaTemplate.xTextDocument.lockControllers()
- try:
- # get the table in which the item is...
- itemsTable = AgendaTemplate.itemsMap[itemName]
- # rewrite the table.
- itemsTable.write(None)
- except Exception, e:
- traceback.print_exc()
- AgendaTemplate.xTextDocument.unlockControllers()
-
- '''update the documents title property to the given title
- @param newTitle title.
- '''
-
- @synchronized(lock)
- def setTemplateTitle(self, newTitle):
- self.m_xDocProps.Title = newTitle
-
- '''checks the data model if the
- item corresponding to the given string should be shown
- @param itemName a string representing an Item (name or heading).
- @return true if the model specifies that the item should be displayed.
- '''
-
- @classmethod
- def isShowItem(self, itemName):
- if itemName == FILLIN_MEETING_TYPE:
- return AgendaTemplate.agenda.cp_ShowMeetingType
- elif itemName == FILLIN_READ:
- return AgendaTemplate.agenda.cp_ShowRead
- elif itemName == FILLIN_BRING:
- return AgendaTemplate.agenda.cp_ShowBring
- elif itemName == FILLIN_NOTES:
- return AgendaTemplate.agenda.cp_ShowNotes
- elif itemName == FILLIN_FACILITATOR:
- return AgendaTemplate.agenda.cp_ShowFacilitator
- elif itemName == FILLIN_TIMEKEEPER:
- return AgendaTemplate.agenda.cp_ShowTimekeeper
- elif itemName == FILLIN_NOTETAKER:
- return AgendaTemplate.agenda.cp_ShowNotetaker
- elif itemName == FILLIN_PARTICIPANTS:
- return AgendaTemplate.agenda.cp_ShowAttendees
- elif itemName == FILLIN_CALLED_BY:
- return AgendaTemplate.agenda.cp_ShowCalledBy
- elif itemName == FILLIN_OBSERVERS:
- return AgendaTemplate.agenda.cp_ShowObservers
- elif itemName == FILLIN_RESOURCE_PERSONS:
- return AgendaTemplate.agenda.cp_ShowResourcePersons
- else:
- raise ValueError("No such item")
-
- '''itemsCache is a Map containing all agenda item. These are object which
- "write themselfs" to the table, given a table cursor.
- A cache is used in order to reuse the objects, instead of recreate them.
- This method fills the cache will all items objects (names and headings).
- '''
-
- def initItemsCache(self):
- AgendaTemplate.itemsCache = {}
- # Headings
- AgendaTemplate.itemsCache[FILLIN_MEETING_TYPE] = AgendaItem(
- FILLIN_MEETING_TYPE,
- TextElement (self.resources.itemMeetingType),
- PlaceholderElement(
- self.resources.reschkMeetingTitle_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_BRING] = AgendaItem(
- FILLIN_BRING, TextElement (self.resources.itemBring),
- PlaceholderElement (
- self.resources.reschkBring_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_READ] = AgendaItem (
- FILLIN_READ, TextElement (self.resources.itemRead),
- PlaceholderElement (
- self.resources.reschkRead_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_NOTES] = AgendaItem (
- FILLIN_NOTES, TextElement (self.resources.itemNote),
- PlaceholderElement (
- self.resources.reschkNotes_value,
- self.resources.resPlaceHolderHint, self.xMSF))
-
- # Names
- AgendaTemplate.itemsCache[FILLIN_CALLED_BY] = AgendaItem(
- FILLIN_CALLED_BY,
- TextElement (self.resources.itemCalledBy),
- PlaceholderElement (
- self.resources.reschkConvenedBy_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_FACILITATOR] = AgendaItem(
- FILLIN_FACILITATOR,
- TextElement (self.resources.itemFacilitator),
- PlaceholderElement (
- self.resources.reschkPresiding_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_PARTICIPANTS] = AgendaItem(
- FILLIN_PARTICIPANTS,
- TextElement (self.resources.itemAttendees),
- PlaceholderElement(
- self.resources.reschkAttendees_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_NOTETAKER] = AgendaItem(
- FILLIN_NOTETAKER,
- TextElement(self.resources.itemNotetaker),
- PlaceholderElement(
- self.resources.reschkNoteTaker_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_TIMEKEEPER] = AgendaItem(
- FILLIN_TIMEKEEPER,
- TextElement (self.resources.itemTimekeeper),
- PlaceholderElement(
- self.resources.reschkTimekeeper_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_OBSERVERS] = AgendaItem(
- FILLIN_OBSERVERS,
- TextElement(self.resources.itemObservers),
- PlaceholderElement(
- self.resources.reschkObservers_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_RESOURCE_PERSONS] = AgendaItem(
- FILLIN_RESOURCE_PERSONS,
- TextElement(self.resources.itemResource),
- PlaceholderElement(
- self.resources.reschkResourcePersons_value,
- self.resources.resPlaceHolderHint, self.xMSF))
-
- '''Initializes a template.<br/>
- This method does the following tasks:<br/>
- Get a Time and Date format for the document, and retrieve the null
- date of the document (which is document-specific).<br/>
- Initializes the Items Cache map.
- Analyses the document:<br/>
- -find all "fille-ins" (apear as &gt;xxx&lt; in the document).
- -analyze all items sections (and the tables in them).
- -locate the titles and actualize them
- -analyze the topics table
- '''
-
- def initialize(self):
- '''
- Get the default locale of the document,
- and create the date and time formatters.
- '''
- AgendaTemplate.dateUtils = Helper.DateUtils(
- self.xMSF, AgendaTemplate.document)
- AgendaTemplate.formatter = AgendaTemplate.dateUtils.formatter
- AgendaTemplate.dateFormat = AgendaTemplate.dateUtils.getFormat(DATE_SYSTEM_LONG)
- AgendaTemplate.timeFormat = AgendaTemplate.dateUtils.getFormat(TIME_HHMM)
-
- '''
- get the document properties object.
- '''
-
- self.m_xDocProps = AgendaTemplate.document.DocumentProperties
- self.initItemsCache()
- AgendaTemplate._allItems = self.searchFillInItems()
- self.initializeTitles()
- self.initializeItemsSections()
- AgendaTemplate.textSectionHandler = TextSectionHandler(
- AgendaTemplate.document, AgendaTemplate.document)
- self.topics = Topics()
- del AgendaTemplate._allItems[:]
- AgendaTemplate._allItems = None
-
- '''
- locates the titles (name, location, date, time)
- and saves a reference to thier Text ranges.
- '''
-
- def initializeTitles(self):
- i = 0
- while i < len(AgendaTemplate._allItems):
- workwith = AgendaTemplate._allItems[i]
- text = workwith.String.lstrip().lower()
- if text == FILLIN_TITLE:
- AgendaTemplate.teTitle = PlaceholderTextElement(
- workwith, self.resources.resPlaceHolderTitle,
- self.resources.resPlaceHolderHint,
- AgendaTemplate.document)
- AgendaTemplate.trTitle = workwith
- del AgendaTemplate._allItems[i]
- i -= 1
- elif text == FILLIN_DATE:
- AgendaTemplate.teDate = PlaceholderTextElement(
- workwith, self.resources.resPlaceHolderDate,
- self.resources.resPlaceHolderHint,
- AgendaTemplate.document)
- AgendaTemplate.trDate = workwith
- del AgendaTemplate._allItems[i]
- i -= 1
- elif text == FILLIN_TIME:
- AgendaTemplate.teTime = PlaceholderTextElement(
- workwith, self.resources.resPlaceHolderTime,
- self.resources.resPlaceHolderHint,
- AgendaTemplate.document)
- AgendaTemplate.trTime = workwith
- del AgendaTemplate._allItems[i]
- i -= 1
- elif text == FILLIN_LOCATION:
- AgendaTemplate.teLocation = PlaceholderTextElement(
- workwith, self.resources.resPlaceHolderLocation,
- self.resources.resPlaceHolderHint,
- AgendaTemplate.document)
- AgendaTemplate.trLocation = workwith
- del AgendaTemplate._allItems[i]
- i -= 1
- i += 1
-
- '''
- searches the document for items in the format "&gt;*&lt;"
- @return a vector containing the XTextRanges of the found items
- '''
-
- def searchFillInItems(self):
- try:
- sd = AgendaTemplate.document.createSearchDescriptor()
- sd.setSearchString("<[^>]+>")
- sd.setPropertyValue("SearchRegularExpression", True)
- sd.setPropertyValue("SearchWords", True)
- ia = AgendaTemplate.document.findAll(sd)
- try:
- l = [ia.getByIndex(i) for i in xrange(ia.Count)]
- except Exception, ex:
- print "Nonfatal Error in finding fillins."
- return l
- except Exception, ex:
- traceback.print_exc()
- raise AttributeError (
- "Fatal Error: Loading template failed: searching fillins failed")
-
- '''
- analyze the item sections in the template.
- delegates the analyze of each table to the ItemsTable class.
- '''
-
- def initializeItemsSections(self):
- sections = self.getSections(AgendaTemplate.document, SECTION_ITEMS)
- # for each section - there is a table...
- self.itemsTables = []
- for i in sections:
- try:
- self.itemsTables.append(
- ItemsTable(self.getSection(i), self.getTable(i)))
- except Exception, ex:
- traceback.print_exc()
- raise AttributeError (
- "Fatal Error while initialilzing \
- Template: items table in section " + i)
-
-
- def getSections(self, document, s):
- allSections = document.TextSections.ElementNames
- return self.getNamesWhichStartWith(allSections, s)
-
- @classmethod
- def getSection(self, name):
- return getattr(AgendaTemplate.document.TextSections, name)
-
- @classmethod
- def getTable(self, name):
- return getattr(AgendaTemplate.document.TextTables, name)
-
- @classmethod
- @synchronized(lock)
- def redrawTitle(self, controlName):
- try:
- if controlName == "txtTitle":
- self.writeTitle(
- AgendaTemplate.teTitle, AgendaTemplate.trTitle,
- AgendaTemplate.agenda.cp_Title)
- elif controlName == "txtDate":
- self.writeTitle(
- AgendaTemplate.teDate, AgendaTemplate.trDate,
- self.getDateString(AgendaTemplate.agenda.cp_Date))
- elif controlName == "txtTime":
- self.writeTitle(
- AgendaTemplate.teTime, AgendaTemplate.trTime,
- self.getTimeString(AgendaTemplate.agenda.cp_Time))
- elif controlName == "cbLocation":
- self.writeTitle(
- AgendaTemplate.teLocation, AgendaTemplate.trLocation,
- AgendaTemplate.agenda.cp_Location)
- else:
- raise IllegalArgumentException ("No such title control...")
- except Exception:
- traceback.print_exc()
-
- @classmethod
- def writeTitle(self, te, tr, text):
- if text is None:
- te.text = ""
- else:
- te.text = text
- te.write(tr)
-
- @classmethod
- def getDateString(self, d):
- if d is None or d == "":
- return ""
- date = int(d)
- year = date / 10000
- month = (date % 10000) / 100
- day = date % 100
- dateObject = dateTimeObject(year, month, day)
- return AgendaTemplate.dateUtils.format(
- AgendaTemplate.dateFormat, dateObject)
-
- @classmethod
- def getTimeString(self, s):
- if s is None or s == "":
- return ""
- time = int(s)
- t = ((time / float(1000000)) / float(24)) \
- + ((time % 1000000) / float(1000000)) / float(35)
- return self.formatter.convertNumberToString(AgendaTemplate.timeFormat, t)
-
- @synchronized(lock)
- def finish(self, topics):
- self.createMinutes(topics)
- self.deleteHiddenSections()
- AgendaTemplate.textSectionHandler.removeAllTextSections()
-
- '''
- hidden sections exist when an item's section is hidden because the
- user specified not to display any items which it contains.
- When finishing the wizard removes this sections entireley from the document.
- '''
-
- def deleteHiddenSections(self):
- allSections = AgendaTemplate.document.TextSections.ElementNames
- try:
- for i in allSections:
- self.section = self.getSection(i)
- visible = bool(Helper.getUnoPropertyValue(
- self.section, "IsVisible"))
- if not visible:
- self.section.Anchor.String = ""
-
- except Exception, ex:
- traceback.print_exc()
-
- '''
- create the minutes for the given topics or remove the minutes
- section from the document.
- If no topics are supplied, or the user specified not to create minuts,
- the minutes section will be removed,
- @param topicsData supplies PropertyValue arrays containing
- the values for the topics.
- '''
-
- @synchronized(lock)
- def createMinutes(self, topicsData):
- # if the minutes section should be removed (the
- # user did not check "create minutes")
- if not AgendaTemplate.agenda.cp_IncludeMinutes \
- or len(topicsData) <= 1:
- try:
- minutesAllSection = self.getSection(SECTION_MINUTES_ALL)
- minutesAllSection.Anchor.String = ""
- except Exception, ex:
- traceback.print_exc()
-
- # the user checked "create minutes"
- else:
- try:
- topicStartTime = int(AgendaTemplate.agenda.cp_Time)
- #first I replace the minutes titles...
- AgendaTemplate.items = self.searchFillInItems()
- itemIndex = 0
- for item in self.items:
- itemText = item.String.lstrip().lower()
- if itemText == FILLIN_MINUTES_TITLE:
- self.fillMinutesItem(
- item, AgendaTemplate.agenda.cp_Title,
- self.resources.resPlaceHolderTitle)
- elif itemText == FILLIN_MINUTES_LOCATION:
- self.fillMinutesItem(
- item, AgendaTemplate.agenda.cp_Location,
- self.resources.resPlaceHolderLocation)
- elif itemText == FILLIN_MINUTES_DATE:
- self.fillMinutesItem(
- item, getDateString(AgendaTemplate.agenda.cp_Date),
- self.resources.resPlaceHolderDate)
- elif itemText == FILLIN_MINUTES_TIME:
- self.fillMinutesItem(
- item, getTimeString(AgendaTemplate.agenda.cp_Time),
- self.resources.resPlaceHolderTime)
-
- self.items.clear()
- '''
- now add minutes for each topic.
- The template contains *one* minutes section, so
- we first use the one available, and then add a one...
- topics data has *always* an empty topic at the end...
- '''
-
- for i in xrange(len(topicsData) - 1):
- topic = topicsData[i]
- AgendaTemplate.items = self.searchFillInItems()
- itemIndex = 0
- for item in self.items:
- itemText = item.String.lstrip().lower()
- if itemText == FILLIN_MINUTE_NUM:
- fillMinutesItem(item, topic[0].Value, "")
- elif itemText == FILLIN_MINUTE_TOPIC:
- fillMinutesItem(item, topic[1].Value, "")
- elif itemText == FILLIN_MINUTE_RESPONSIBLE:
- fillMinutesItem(item, topic[2].Value, "")
- elif itemText == FILLIN_MINUTE_TIME:
- topicTime = 0
- try:
- topicTime = topic[3].Value
- except Exception, ex:
- pass
-
- '''
- if the topic has no time, we do not
- display any time here.
- '''
- if topicTime == 0 or topicStartTime == 0:
- time = topic[3].Value
- else:
- time = getTimeString(str(topicStartTime)) + " - "
- topicStartTime += topicTime * 1000
- time += getTimeString(str(topicStartTime))
-
- fillMinutesItem(item, time, "")
-
- AgendaTemplate.textSectionHandler.removeTextSectionbyName(
- SECTION_MINUTES)
- # after the last section we do not insert a one.
- if i < len(topicsData) - 2:
- AgendaTemplate.textSectionHandler.insertTextSection(
- SECTION_MINUTES, AgendaTemplate.template, False)
-
- except Exception, ex:
- traceback.print_exc()
-
- '''given a text range and a text, fills the given
- text range with the given text.
- If the given text is empty, uses a placeholder with the giveb
- placeholder text.
- @param range text range to fill
- @param text the text to fill to the text range object.
- @param placeholder the placeholder text to use, if the
- text argument is empty (null or "")
- '''
-
- def fillMinutesItem(self, Range, text, placeholder):
- paraStyle = Helper.getUnoPropertyValue(Range, "ParaStyleName")
- Range.setString(text)
- Helper.setUnoPropertyValue(Range, "ParaStyleName", paraStyle)
- if text == None or text == "":
- if placeholder != None and not placeholder == "":
- placeHolder = createPlaceHolder(
- AgendaTemplate.document, placeholder,
- self.resources.resPlaceHolderHint)
- try:
- Range.Start.Text.insertTextContent(
- Range.Start, placeHolder, True)
- except Exception, ex:
- traceback.print_exc()
-
- '''creates a placeholder field with the given text and given hint.
- @param AgendaTemplate.document service factory
- @param ph place holder text
- @param hint hint text
- @return the place holder field.
- '''
-
- @classmethod
- def createPlaceHolder(self, xmsf, ph, hint):
- try:
- placeHolder = xmsf.createInstance(
- "com.sun.star.text.TextField.JumpEdit")
- except Exception, ex:
- traceback.print_exc()
- return None
-
- Helper.setUnoPropertyValue(placeHolder, "PlaceHolder", ph)
- Helper.setUnoPropertyValue(placeHolder, "Hint", hint)
- Helper.setUnoPropertyValue(
- placeHolder, "PlaceHolderType", uno.Any("short",TEXT))
- return placeHolder
-
- def getNamesWhichStartWith(self, allNames, prefix):
- v = []
- for i in allNames:
- if i.startswith(prefix):
- v.append(i)
- return v
-
- '''Convenience method for inserting some cells into a table.
- @param table
- @param start
- @param count
- '''
-
- @classmethod
- def insertTableRows(self, table, start, count):
- rows = table.Rows
- rows.insertByIndex(start, count)
-
- '''returns the row index for this cell name.
- @param cellName
- @return the row index for this cell name.
- '''
-
- @classmethod
- def getRowIndex(self, cellName):
- return int(cellName.RangeName[1:])
-
- '''returns the rows count of this table, assuming
- there is no vertical merged cells.
- @param table
- @return the rows count of the given table.
- '''
-
- @classmethod
- def getRowCount(self, table):
- cells = table.getCellNames()
- return int(cells[len(cells) - 1][1:])
-
-class ItemsTable(object):
- '''
- the items in the table.
- '''
- items = []
- table = None
-
- def __init__(self, section_, table_):
- ItemsTable.table = table_
- self.section = section_
- self.items = []
- '''
- go through all <*> items in the document
- and each one if it is in this table.
- If they are, register them to belong here, notice their order
- and remove them from the list of all <*> items, so the next
- search will be faster.
- '''
- i = 0
- while i < len(AgendaTemplate._allItems):
- workwith = AgendaTemplate._allItems[i]
- t = Helper.getUnoPropertyValue(workwith, "TextTable")
- if t == ItemsTable.table:
- iText = workwith.String.lower().lstrip()
- ai = AgendaTemplate.itemsCache[iText]
- if ai is not None:
- self.items.append(ai)
- del AgendaTemplate._allItems[i]
- AgendaTemplate.itemsMap[iText] = self
- i -= 1
- i += 1
-
- '''
- link the section to the template. this will restore the original table
- with all the items.<br/>
- then break the link, to make the section editable.<br/>
- then, starting at cell one, write all items that should be visible.
- then clear the rest and remove obsolete rows.
- If no items are visible, hide the section.
- @param dummy we need a param to make this an Implementation
- of AgendaElement.
- @throws Exception
- '''
-
- def write(self, dummy):
- with AgendaTemplate.lock:
- name = self.section.Name
- # link and unlink the section to the template.
- AgendaTemplate.textSectionHandler.linkSectiontoTemplate(
- AgendaTemplate.template, name, self.section)
- AgendaTemplate.textSectionHandler.breakLinkOfTextSection(
- self.section)
- # we need to get a instance after linking.
- ItemsTable.table = AgendaTemplate.getTable(name)
- self.section = AgendaTemplate.getSection(name)
- cursor = ItemsTable.table.createCursorByCellName("A1")
- # should this section be visible?
- visible = False
- # write items
- # ===========
- cellName = ""
- '''
- now go through all items that belong to this
- table. Check each one agains the model. If it should
- be display, call it's write method.
- All items are of type AgendaItem which means they write
- two cells to the table: a title (text) and a placeholder.
- see AgendaItem class below.
- '''
- for i in self.items:
- if AgendaTemplate.isShowItem(i.name):
- visible = True
- i.table = ItemsTable.table
- i.write(cursor)
- # I store the cell name which was last written...
- cellName = cursor.RangeName
- cursor.goRight(1, False)
-
- if visible:
- boolean = True
- else:
- boolean = False
- Helper.setUnoPropertyValue(self.section, "IsVisible", boolean)
- if not visible:
- return
- '''
- remove obsolete rows
- ====================
- if the cell that was last written is the current cell,
- it means this is the end of the table, so we end here.
- (because after getting the cellName above,
- I call the goRight method.
- If it did not go right, it means its the last cell.
- '''
-
- if cellName == cursor.RangeName:
- return
- '''
- if not, we continue and clear all cells until
- we are at the end of the row.
- '''
-
- while not cellName == cursor.RangeName and \
- not cursor.RangeName.startswith("A"):
- cell = ItemsTable.table.getCellByName(cursor.RangeName)
- cell.String = ""
- cellName = cursor.RangeName
- cursor.goRight(1, False)
-
- '''
- again: if we are at the end of the table, end here.
- '''
- if cellName == cursor.RangeName:
- return
-
- rowIndex = AgendaTemplate.getRowIndex(cursor)
- rowsCount = AgendaTemplate.getRowCount(ItemsTable.table)
- '''
- now before deleteing i move the cursor up so it
- does not disappear, because it will crash office.
- '''
- cursor.gotoStart(False)
-
-'''
-This class handles the preview of the topics table.
-You can call it the controller of the topics table.
-It differs from ItemsTable in that it has no data model -
-the update is done programttically.<br/>
-<br/>
-The decision to make this class a class by its own
-was done out of logic reasons and not design/functionality reasons,
-since there is anyway only one instance of this class at runtime
-it could have also be implemented in the AgendaTemplate class
-but for clarity and separation I decided to make a sub class for it.
-
-@author rp143992
-'''
-
-class Topics(object):
- '''Analyze the structure of the Topics table.
- The structure Must be as follows:<br>
- -One Header Row. <br>
- -arbitrary number of rows per topic <br>
- -arbitrary content in the topics row <br>
- -only soft formatting will be restored. <br>
- -the topic rows must repeat three times. <br>
- -in the topics rows, placeholders for number, topic, responsible,
- and duration must be placed.<br><br>
- A word about table format: to reconstruct the format of the table we hold
- to the following formats: first row (header), topic, and last row.
- We hold the format of the last row, because one might wish to give it
- a special format, other than the one on the bottom of each topic.
- The left and right borders of the whole table are, on the other side,
- part of the topics rows format, and need not be preserved seperateley.
- '''
- table = None
- lastRowFormat = []
- numCell = -1
- topicCell = -1
- responsibleCell = -1
- timeCell = -1
- rowsPerTopic = None
- topicCells = []
-
- def __init__(self):
- self.topicItems = {}
- self.firstRowFormat = []
- # This is the topics table. say hallo :-)
- try:
- Topics.table = AgendaTemplate.getTable(SECTION_TOPICS)
- except Exception, ex:
- traceback.print_exc()
- raise AttributeError (
- "Fatal error while loading template: table " + \
- SECTION_TOPICS + " could not load.")
-
- '''
- first I store all <*> ranges
- which are in the topics table.
- I store each <*> range in this - the key
- is the cell it is in. Later when analyzing the topic,
- cell by cell, I check in this map to know
- if a cell contains a <*> or not.
- '''
- items = {}
- for i in AgendaTemplate._allItems:
- t = Helper.getUnoPropertyValue(i, "TextTable")
- if t == Topics.table:
- cell = Helper.getUnoPropertyValue(i, "Cell")
- iText = cell.CellName
- items[iText] = i
-
- '''
- in the topics table, there are always one
- title row and three topics defined.
- So no mutter how many rows a topic takes - we
- can restore its structure and format.
- '''
- rows = AgendaTemplate.getRowCount(Topics.table)
- Topics.rowsPerTopic = (rows - 1) / 3
- firstCell = "A" + str(1 + Topics.rowsPerTopic + 1)
- afterLastCell = "A" + str(1 + (Topics.rowsPerTopic * 2) + 1)
- # go to the first row of the 2. topic
- cursor = Topics.table.createCursorByCellName(firstCell)
- # analyze the structure of the topic rows.
- while not cursor.RangeName == afterLastCell:
- cell = Topics.table.getCellByName(cursor.RangeName)
- # first I store the content and para style of the cell
- ae = TextElement(cell)
- # if the cell contains a relevant <...>
- # i add the text element to the hash,
- # so it's text can be updated later.
- try:
- if items[cell.CellName] is not None:
- self.topicItems[cell.String.lower().lstrip()] = ae
- except KeyError:
- pass
-
- Topics.topicCells.append(ae)
- # goto next cell.
- cursor.goRight(1, False)
- '''
- now - in which cell is every fillin?
- '''
-
- Topics.numCell = Topics.topicCells.index(
- self.topicItems[FILLIN_TOPIC_NUMBER])
- Topics.topicCell = Topics.topicCells.index(
- self.topicItems[FILLIN_TOPIC_TOPIC])
- Topics.responsibleCell = Topics.topicCells.index(
- self.topicItems[FILLIN_TOPIC_RESPONSIBLE])
- Topics.timeCell = Topics.topicCells.index(
- self.topicItems[FILLIN_TOPIC_TIME])
-
- '''@param topic the topic number to write
- @param data the data of the topic.
- @return the number of rows that have been added
- to the table. 0 or a negative number: no rows added.
- '''
-
- @classmethod
- def write2(self, topic, data):
- if topic >= len(AgendaTemplate.writtenTopics):
- size = topic - len(AgendaTemplate.writtenTopics)
- AgendaTemplate.writtenTopics += [None] * size
- AgendaTemplate.writtenTopics.insert(topic, "")
- # make sure threr are enough rows for me...
- rows = AgendaTemplate.getRowCount(Topics.table)
- reqRows = 1 + (topic + 1) * Topics.rowsPerTopic
- firstRow = reqRows - Topics.rowsPerTopic + 1
- diff = reqRows - rows
- if diff > 0:
- AgendaTemplate.insertTableRows(Topics.table, rows, diff)
- # set the item's text...
-
- self.setItemText(Topics.numCell, data[0].Value)
- self.setItemText(Topics.topicCell, data[1].Value)
- self.setItemText(Topics.responsibleCell, data[2].Value)
- self.setItemText(Topics.timeCell, data[3].Value)
- # now write !
- cursor = Topics.table.createCursorByCellName("A" + str(firstRow))
- for i in Topics.topicCells:
- i.write(Topics.table.getCellByName(cursor.RangeName))
- cursor.goRight(1, False)
- # now format !
- cursor.gotoCellByName("A" + str(firstRow), False)
- return diff
-
- '''check if the topic with the given index is written to the table.
- @param topic the topic number (0 base)
- @return true if the topic is already written to the table. False if not.
- (false would mean rows must be added to the table in order to
- be able to write this topic).
- '''
-
- def isWritten(self, topic):
- return (len(AgendaTemplate.writtenTopics) > topic \
- and AgendaTemplate.writtenTopics[topic] is not None)
-
- '''rewrites a single cell containing.
- This is used in order to refresh the topic/responsible/duration data
- in the preview document, in response to a change in the gui (by the user)
- Since the structure of the topics table is flexible,
- we don't reference a cell number. Rather, we use "what" argument to
- specify which cell should be redrawn.
- The Topics object, which analyzed the structure of the topics table appon
- initialization, refreshes the approperiate cell.
- @param topic index of the topic (0 based).
- @param what 0 for num, 1 for topic, 2 for responsible, 3 for duration
- @param data the row's data.
- @throws Exception if something goes wrong (thow nothing should)
- '''
-
- def writeCell(self, topic, what, data):
- # if the whole row should be written...
- if not self.isWritten(topic):
- self.write(topic, data)
- # write only the "what" cell.
- else:
- # calculate the table row.
- firstRow = 1 + (topic * Topics.rowsPerTopic) + 1
- # go to the first cell of this topic.
- cursor = Topics.table.createCursorByCellName("A" + str(firstRow))
- te = None
- cursorMoves = 0
- if what == 0:
- te = self.setItemText(Topics.numCell, data[0].Value)
- cursorMoves = Topics.numCell
- elif what == 1:
- te = self.setItemText(Topics.topicCell, data[1].Value)
- cursorMoves = Topics.topicCell
- elif what == 2:
- te = self.setItemText(Topics.responsibleCell, data[2].Value)
- cursorMoves = Topics.responsibleCell
- elif what == 3:
- te = self.setItemText(Topics.timeCell, data[3].Value)
- cursorMoves = Topics.timeCell
-
- # move the cursor to the needed cell...
- cursor.goRight(cursorMoves, False)
- xc = Topics.table.getCellByName(cursor.RangeName)
- # and write it !
- te.write(xc)
-
- '''writes the given topic.
- if the first topic was involved, reformat the
- first row.
- If any rows were added to the table, reformat
- the last row.
- @param topic the index of the topic to write.
- @param data the topic's data. (see TopicsControl
- for explanation about the topics data model)
- @throws Exception if something goes wrong (though nothing should).
- '''
-
- def write(self, topic, data):
- diff = self.write2(topic, data)
- '''if the first topic has been written,
- one needs to reformat the first row.
- '''
- if topic == 0:
- self.formatFirstRow()
- '''
- if any rows were added, one needs to format
- the whole table again.
- '''
-
- if diff > 0:
- self.formatLastRow()
-
- '''removes obsolete rows, reducing the
- topics table to the given number of topics.
- Note this method does only reducing - if
- the number of topics given is greater than the
- number of actuall topics it does *not* add
- rows !
- Note also that the first topic will never be removed.
- If the table contains no topics, the whole section will
- be removed uppon finishing.
- The reason for that is a "table-design" one: the first topic is
- maintained in order to be able to add rows with a design of this topic,
- and not of the header row.
- @param topics the number of topics the table should contain.
- @throws Exception
- '''
-
- def reduceDocumentTo(self, topics):
- # we never remove the first topic...
- if topics <= 0:
- topics = 1
-
- tableRows = Topics.table.Rows
- targetNumOfRows = topics * Topics.rowsPerTopic + 1
- '''if tableRows.Count > targetNumOfRows:
- tableRows.removeByIndex(
- targetNumOfRows, tableRows.Count - targetNumOfRows)'''
-
- self.formatLastRow()
- while len(AgendaTemplate.writtenTopics) > topics:
- del AgendaTemplate.writtenTopics[topics]
-
- '''reapply the format of the first (header) row.
- '''
-
- def formatFirstRow(self):
- cursor = Topics.table.createCursorByCellName("A1")
- self.formatTable(cursor, self.firstRowFormat, False)
-
- '''reaply the format of the last row.
- '''
- @classmethod
- def formatLastRow(self):
- cursor = Topics.table.createCursorByCellName("A1")
- cursor.gotoEnd(False)
- self.formatTable(cursor, Topics.lastRowFormat, True)
-
- '''returns a text element for the given cell,
- which will write the given text.
- @param cell the topics cell number.
- @param value the value to write.
- @return a TextElement object which will write the given value
- to the given cell.
- '''
-
- @classmethod
- def setItemText(self, cell, value):
- if cell >= 0:
- te = Topics.topicCells[cell]
- if te is not None:
- te.text = str(value)
- return te
-
- return None
-
- '''formats a series of cells from the given one,
- using the given List of TableCellFormatter objects,
- in the given order.
- This method is used to format the first (header) and the last
- rows of the table.
- @param cursor a table cursor, pointing to the start cell to format
- @param formats a List containing TableCellFormatter objects.
- Each will format one cell in the direction specified.
- @param reverse if true the cursor will move left,
- formatting in reverse order (used for the last row).
- '''
- @classmethod
- def formatTable(self, cursor, formats, reverse):
- for i in formats:
- i.format(Topics.table.getCellByName(cursor.RangeName))
- if reverse:
- cursor.goLeft(1, False)
- else:
- cursor.goRight(1, False)
-
-'''
-A basic implementation of AgendaElement:
-writes a String to the given XText/XTextRange, and applies
-a ParaStyle to it (using the parent class).
-@author rp143992
-'''
-class TextElement(object):
-
- def __init__(self, text_):
- self.text = text_
-
- def write(self, textRange):
- textRange.String = self.text
-
-'''
-A Text element which, if the text to write is empty (null or "")
-inserts a placeholder instead.
-@author rp143992
-'''
-
-class PlaceholderTextElement(TextElement):
-
- def __init__(self, textRange, placeHolderText_, hint_, xmsf_):
- super(PlaceholderTextElement,self).__init__(textRange)
-
- self.placeHolderText = placeHolderText_
- self.hint = hint_
- self.xmsf = xmsf_
-
- def write(self, textRange):
- textRange.String = self.text
- if self.text is None or self.text == "":
- try:
- xTextContent = AgendaTemplate.createPlaceHolder(
- self.xmsf, self.placeHolderText, self.hint)
- textRange.Text.insertTextContent(
- textRange.Start, xTextContent, True)
- except Exception, ex:
- traceback.print_exc()
-
-'''
-An Agenda element which writes no text, but inserts a placeholder, and formats
-it using a ParaStyleName.
-@author rp143992
-'''
-
-class PlaceholderElement(object):
-
- def __init__(self, placeHolderText_, hint_, xmsf_):
- self.placeHolderText = placeHolderText_
- self.hint = hint_
- self.xmsf = xmsf_
-
- def write(self, textRange):
- try:
- xTextContent = AgendaTemplate.createPlaceHolder(
- AgendaTemplate.document, self.placeHolderText, self.hint)
- textRange.Text.insertTextContent(
- textRange.Start, xTextContent, True)
- except Exception, ex:
- traceback.print_exc()
-
-'''
-An implementation of AgendaElement which
-gets as a parameter a table cursor, and writes
-a text to the cell marked by this table cursor, and
-a place holder to the next cell.
-@author rp143992
-'''
-
-class AgendaItem(object):
-
- def __init__(self, name_, te, f):
- self.name = name_
- self.field = f
- self.textElement = te
-
- def write(self, tableCursor):
- cellname = tableCursor.RangeName
- cell = ItemsTable.table.getCellByName(cellname)
- self.textElement.write(cell)
- tableCursor.goRight(1, False)
- #second field is actually always null...
- # this is a preparation for adding placeholders.
- if self.field is not None:
- self.field.write(ItemsTable.table.getCellByName(
- tableCursor.RangeName))
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
deleted file mode 100644
index 1090717e4fc7..000000000000
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
+++ /dev/null
@@ -1,293 +0,0 @@
-from ui.WizardDialog import *
-from AgendaWizardDialogConst import *
-from AgendaWizardDialogResources import AgendaWizardDialogResources
-
-from com.sun.star.awt.FontUnderline import SINGLE
-
-class AgendaWizardDialog(WizardDialog):
-
- def __init__(self, xmsf):
- super(AgendaWizardDialog,self).__init__(xmsf, HID )
- #Load Resources
- self.resources = AgendaWizardDialogResources(xmsf)
- #set dialog properties...
- Helper.setUnoPropertyValues(
- self.xDialogModel, ("Closeable",
- PropertyNames.PROPERTY_HEIGHT,
- "Moveable",
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- "Title",
- PropertyNames.PROPERTY_WIDTH),
- (True, 210, True, 200, 52, 1, 1,
- self.resources.resAgendaWizardDialog_title,310))
-
- self.IMGHELP1_HID = ""
- self.PROPS_LIST = ("Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- self.PROPS_LABEL_B = ("FontDescriptor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- self.PROPS_CHECK = (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- self.PROPS_BUTTON = (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- self.PROPS_X = (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- self.PROPS_TEXTAREA = (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- self.PROPS_TEXT = (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- self.PROPS_IMAGE = ("Border",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_IMAGEURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "ScaleImage",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- self.fontDescriptor1 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor2 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor4 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- #Set member- FontDescriptors...
- self.fontDescriptor1.Weight = 150
- self.fontDescriptor1.Underline = SINGLE
- self.fontDescriptor2.Weight = 100
- self.fontDescriptor4.Weight = 150
-
- '''
- build components
- '''
- def buildStep1(self):
- self.insertLabel("lblTitle1", self.PROPS_LABEL_B, (self.fontDescriptor4,
- 16, self.resources.reslblTitle1_value, True, 91, 8, 1, 100,212))
- self.insertLabel("lblPageDesign", self.PROPS_TEXT,
- (8, self.resources.reslblPageDesign_value, 97, 32, 1, 101, 66))
- self.listPageDesign = self.insertListBox("listPageDesign",
- None, LISTPAGEDESIGN_ACTION_PERFORMED, self.PROPS_LIST,
- (True, 12, LISTPAGEDESIGN_HID, 166, 30, 1, 102, 70), self)
- self.chkMinutes = self.insertCheckBox("chkMinutes", None,
- self.PROPS_CHECK, (9, CHKMINUTES_HID,
- self.resources.reschkMinutes_value, 97, 50, 0, 1, 103, 203), self)
- self.insertImage("imgHelp1", self.PROPS_IMAGE,
- (0, 10, self.IMGHELP1_HID,
- INFO_IMAGE_URL, 92,
- 145, False, 1, 104, 10))
- self.insertLabel("lblHelp1", self.PROPS_TEXTAREA,
- (39, self.resources.reslblHelp1_value, True,104,145, 1, 105,199))
-
- def buildStep2(self):
- self.insertLabel("lblTitle2", self.PROPS_LABEL_B,
- (self.fontDescriptor4, 16,
- self.resources.reslblTitle2_value, True,91, 8, 2, 200,212))
- self.insertLabel("lblDate", self.PROPS_TEXT,
- (8, self.resources.reslblDate_value, 97, 32, 2, 201,66))
- self.txtDate = self.insertDateField(
- "txtDate", TXTDATE_TEXT_CHANGED, self.PROPS_LIST,
- (True, 12, TXTDATE_HID,166,30, 2, 202,70), self)
- self.insertLabel("lblTime", self.PROPS_TEXT,
- (8, self.resources.reslblTime_value, 97, 50, 2, 203, 66))
- self.txtTime = self.insertTimeField("txtTime", TXTTIME_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- "StrictFormat",
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (12, TXTTIME_HID, 166, 48, 2, True, 204,70), self)
- self.insertLabel("lblTitle", self.PROPS_TEXT,
- (8, self.resources.reslblTitle_value, 97, 68, 2, 205,66))
- self.txtTitle = self.insertTextField(
- "txtTitle", TXTTITLE_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (26, TXTTITLE_HID, True, 166, 66, 2, 206, 138), self)
- self.insertLabel("lblLocation", self.PROPS_TEXT,
- (8, self.resources.reslblLocation_value, 97, 100, 2, 207, 66))
- self.cbLocation = self.insertTextField(
- "cbLocation", TXTLOCATION_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (34, CBLOCATION_HID, True, 166,98, 2, 208, 138), self)
- self.insertImage("imgHelp2", self.PROPS_IMAGE,
- (0, 10, self.IMGHELP1_HID,
- INFO_IMAGE_URL,
- 92, 145, False, 2, 209, 10))
- self.insertLabel("lblHelp2", self.PROPS_TEXTAREA,
- (39, self.resources.reslblHelp2_value, True, 104, 145, 2, 210, 199))
-
- def buildStep3(self):
- self.insertLabel("lblTitle3", self.PROPS_LABEL_B,
- (self.fontDescriptor4, 16, self.resources.reslblTitle3_value,
- True, 91, 8, 3, 300,212))
- self.chkMeetingTitle = self.insertCheckBox("chkMeetingTitle",
- CHKUSEMEETINGTYPE_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKMEETINGTITLE_HID, self.resources.reschkMeetingTitle_value,
- 97, 32, 1, 3, 301, 69), self)
- self.chkRead = self.insertCheckBox("chkRead",
- CHKUSEREAD_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKREAD_HID, self.resources.reschkRead_value,
- 97, 46, 0, 3, 302, 162), self)
- self.chkBring = self.insertCheckBox("chkBring",
- CHKUSEBRING_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKBRING_HID, self.resources.reschkBring_value,
- 97, 60, 0, 3, 303, 162), self)
- self.chkNotes = self.insertCheckBox("chkNotes",
- CHKUSENOTES_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKNOTES_HID, self.resources.reschkNotes_value,
- 97, 74, 1, 3, 304, 160), self)
- self.insertImage("imgHelp3", self.PROPS_IMAGE, (0, 10,
- self.IMGHELP1_HID, INFO_IMAGE_URL,
- 92, 145, False, 3, 305, 10))
- self.insertLabel("lblHelp3", self.PROPS_TEXTAREA,
- (39, self.resources.reslblHelp3_value, True,104, 145, 3, 306, 199))
-
- def buildStep4(self):
- self.insertLabel("lblTitle5", self.PROPS_LABEL_B,
- (self.fontDescriptor4, 16, self.resources.reslblTitle5_value,
- True, 91, 8, 4, 400, 212))
- self.chkConvenedBy = self.insertCheckBox("chkConvenedBy",
- CHKUSECALLEDBYNAME_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKCONVENEDBY_HID, self.resources.reschkConvenedBy_value,
- 97, 32, 1, 4, 401, 150), self)
- self.chkPresiding = self.insertCheckBox("chkPresiding",
- CHKUSEFACILITATOR_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKPRESIDING_HID, self.resources.reschkPresiding_value,
- 97, 46, 0, 4, 402, 150), self)
- self.chkNoteTaker = self.insertCheckBox("chkNoteTaker",
- CHKUSENOTETAKER_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKNOTETAKER_HID, self.resources.reschkNoteTaker_value,
- 97, 60, 0, 4, 403, 150), self)
- self.chkTimekeeper = self.insertCheckBox("chkTimekeeper",
- CHKUSETIMEKEEPER_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKTIMEKEEPER_HID, self.resources.reschkTimekeeper_value,
- 97, 74, 0, 4, 404, 150), self)
- self.chkAttendees = self.insertCheckBox("chkAttendees",
- CHKUSEATTENDEES_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKATTENDEES_HID, self.resources.reschkAttendees_value,
- 97, 88, 1, 4, 405, 150), self)
- self.chkObservers = self.insertCheckBox("chkObservers",
- CHKUSEOBSERVERS_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKOBSERVERS_HID, self.resources.reschkObservers_value,
- 97, 102, 0, 4, 406, 150), self)
- self.chkResourcePersons = self.insertCheckBox("chkResourcePersons",
- CHKUSERESOURCEPERSONS_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKRESOURCEPERSONS_HID, self.resources.reschkResourcePersons_value,
- 97, 116, 0, 4, 407, 150), self)
- self.insertImage("imgHelp4", self.PROPS_IMAGE,
- (0, 10, self.IMGHELP1_HID, INFO_IMAGE_URL,
- 92, 145, False, 4, 408, 10))
- self.insertLabel("lblHelp4", self.PROPS_TEXTAREA,
- (39, self.resources.reslblHelp4_value, True, 104, 145, 4, 409, 199))
-
- def buildStep5(self):
- self.insertLabel("lblTitle4", self.PROPS_LABEL_B,
- (self.fontDescriptor4, 16, self.resources.reslblTitle4_value,
- True, 91, 8, 5, 500, 212))
- self.insertLabel("lblTopic", self.PROPS_TEXT,
- (8, self.resources.reslblTopic_value, 107, 28, 5, 71, 501))
- self.insertLabel("lblResponsible", self.PROPS_TEXT,
- (8, self.resources.reslblResponsible_value, 195, 28, 5, 72, 502))
- self.insertLabel("lblDuration", self.PROPS_TEXT,
- (8, self.resources.reslblDuration_value, 267, 28, 5, 73, 503))
- self.btnInsert = self.insertButton("btnInsert", BTNINSERT_ACTION_PERFORMED,
- self.PROPS_BUTTON, (14, BTNINSERT_HID,
- self.resources.resButtonInsert, 92, 136, 5, 580, 40), self)
- self.btnRemove = self.insertButton("btnRemove", BTNREMOVE_ACTION_PERFORMED,
- self.PROPS_BUTTON, (14, BTNREMOVE_HID,
- self.resources.resButtonRemove, 134, 136, 5, 581, 40), self)
- self.btnUp = self.insertButton("btnUp", BTNUP_ACTION_PERFORMED,
- self.PROPS_BUTTON, (14, BTNUP_HID,
- self.resources.resButtonUp, 222, 136, 5, 582, 40), self)
- self.btnDown = self.insertButton("btnDown", BTNDOWN_ACTION_PERFORMED,
- self.PROPS_BUTTON, (14, BTNDOWN_HID,
- self.resources.resButtonDown, 264, 136, 5, 583, 40), self)
-
- def buildStep6(self):
- self.insertLabel("lblTitle6", self.PROPS_LABEL_B,
- (self.fontDescriptor4, 16, self.resources.reslblTitle6_value,
- True, 91, 8, 6, 600, 212))
- self.insertLabel("lblHelpPg6", self.PROPS_TEXTAREA,
- (24, self.resources.reslblHelpPg6_value, True,
- 97, 32, 6, 601,204))
- self.insertLabel("lblTemplateName", self.PROPS_TEXT,
- (8, self.resources.reslblTemplateName_value,
- 97, 62, 6, 602, 101))
- self.txtTemplateName = self.insertTextField("txtTemplateName",
- TXTTEMPLATENAME_TEXT_CHANGED, self.PROPS_X,
- (12, TXTTEMPLATENAME_HID, 202, 60, 6, 603, 100), self)
- self.insertLabel("lblProceed", self.PROPS_TEXT,
- (8, self.resources.reslblProceed_value, 97, 101, 6, 607,204))
- self.optCreateAgenda = self.insertRadioButton("optCreateAgenda", None,
- self.PROPS_CHECK, (8, OPTCREATEAGENDA_HID,
- self.resources.resoptCreateAgenda_value,
- 103, 113, 1, 6, 608, 198), self)
- self.optMakeChanges = self.insertRadioButton("optMakeChanges", None,
- self.PROPS_BUTTON, (8, OPTMAKECHANGES_HID,
- self.resources.resoptMakeChanges_value, 103, 125, 6, 609, 198), self)
- self.insertImage("imgHelp6", self.PROPS_IMAGE, (0, 10, self.IMGHELP1_HID,
- INFO_IMAGE_URL, 92, 145, False, 6, 610, 10))
- self.insertLabel("lblHelp6", self.PROPS_TEXTAREA,
- (39, self.resources.reslblHelp6_value, True, 104, 145, 6, 611, 199))
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py
deleted file mode 100644
index 6f3fe7a25c60..000000000000
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py
+++ /dev/null
@@ -1,63 +0,0 @@
-from common.HelpIds import HelpIds
-
-TXTTITLE_TEXT_CHANGED = "txtTitleTextChanged"
-TXTDATE_TEXT_CHANGED = "txtDateTextChanged"
-TXTTIME_TEXT_CHANGED = "txtTimeTextChanged"
-TXTLOCATION_TEXT_CHANGED = "txtLocationTextChanged"
-CHKMINUTES_ITEM_CHANGED = "chkMinutesItemChanged"
-CHKUSEMEETINGTYPE_ITEM_CHANGED = "chkUseMeetingTypeItemChanged"
-CHKUSEREAD_ITEM_CHANGED = "chkUseReadItemChanged"
-CHKUSEBRING_ITEM_CHANGED = "chkUseBringItemChanged"
-CHKUSENOTES_ITEM_CHANGED = "chkUseNotesItemChanged"
-CHKUSECALLEDBYNAME_ITEM_CHANGED = "chkUseCalledByItemChanged"
-CHKUSEFACILITATOR_ITEM_CHANGED = "chkUseFacilitatorItemChanged"
-CHKUSENOTETAKER_ITEM_CHANGED = "chkUseNoteTakerItemChanged"
-CHKUSETIMEKEEPER_ITEM_CHANGED = "chkUseTimeKeeperItemChanged"
-CHKUSEATTENDEES_ITEM_CHANGED = "chkUseAttendeesItemChanged"
-CHKUSEOBSERVERS_ITEM_CHANGED = "chkUseObserversItemChanged"
-CHKUSERESOURCEPERSONS_ITEM_CHANGED = "chkUseResourcePersonsItemChanged"
-LISTPAGEDESIGN_ACTION_PERFORMED = "pageDesignChanged"
-TXTTEMPLATENAME_TEXT_CHANGED = "templateTitleChanged"
-BTNTEMPLATEPATH_ACTION_PERFORMED = "saveAs"
-BTNINSERT_ACTION_PERFORMED = "insertRow"
-BTNREMOVE_ACTION_PERFORMED = "removeRow"
-BTNUP_ACTION_PERFORMED = "rowUp"
-BTNDOWN_ACTION_PERFORMED = "rowDown"
-
-INFO_IMAGE_URL = "private:resource/dbu/image/19205"
-
-HID = 41051
-
-LISTPAGEDESIGN_HID = HelpIds.getHelpIdString(HID + 6)
-CHKMINUTES_HID = HelpIds.getHelpIdString(HID + 7)
-TXTTIME_HID = HelpIds.getHelpIdString(HID + 8)
-TXTDATE_HID = HelpIds.getHelpIdString(HID + 9)
-TXTTITLE_HID = HelpIds.getHelpIdString(HID + 10)
-CBLOCATION_HID = HelpIds.getHelpIdString(HID + 11)
-
-CHKMEETINGTITLE_HID = HelpIds.getHelpIdString(HID + 12)
-CHKREAD_HID = HelpIds.getHelpIdString(HID + 13)
-CHKBRING_HID = HelpIds.getHelpIdString(HID + 14)
-CHKNOTES_HID = HelpIds.getHelpIdString(HID + 15)
-
-CHKCONVENEDBY_HID = HelpIds.getHelpIdString(HID + 16)
-CHKPRESIDING_HID = HelpIds.getHelpIdString(HID + 17)
-CHKNOTETAKER_HID = HelpIds.getHelpIdString(HID + 18)
-CHKTIMEKEEPER_HID = HelpIds.getHelpIdString(HID + 19)
-CHKATTENDEES_HID = HelpIds.getHelpIdString(HID + 20)
-CHKOBSERVERS_HID = HelpIds.getHelpIdString(HID + 21)
-CHKRESOURCEPERSONS_HID = HelpIds.getHelpIdString(HID + 22)
-
-TXTTEMPLATENAME_HID = HelpIds.getHelpIdString(HID + 23)
-TXTTEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 24)
-BTNTEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 25)
-
-OPTCREATEAGENDA_HID = HelpIds.getHelpIdString(HID + 26)
-OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 27)
-
-BTNINSERT_HID = HelpIds.getHelpIdString(HID + 28)
-BTNREMOVE_HID = HelpIds.getHelpIdString(HID + 29)
-BTNUP_HID = HelpIds.getHelpIdString(HID + 30)
-BTNDOWN_HID = HelpIds.getHelpIdString(HID + 31)
-
-LAST_HID = HID + 32
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
deleted file mode 100644
index 22ed320229d4..000000000000
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
+++ /dev/null
@@ -1,463 +0,0 @@
-from AgendaWizardDialog import *
-from AgendaTemplate import *
-from CGAgenda import CGAgenda
-from ui.PathSelection import PathSelection
-from ui.event.UnoDataAware import UnoDataAware
-from ui.event.RadioDataAware import RadioDataAware
-from common.NoValidPathException import NoValidPathException
-from common.SystemDialog import SystemDialog
-
-from com.sun.star.view.DocumentZoomType import OPTIMAL
-from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO
-from com.sun.star.awt.VclWindowPeerAttribute import OK
-
-class AgendaWizardDialogImpl(AgendaWizardDialog):
-
- fileAccess1 = None
- pageDesign = None
-
- def __init__(self, xmsf):
- super(AgendaWizardDialogImpl, self).__init__(xmsf)
- self.filenameChanged = False
-
- def enterStep(self, OldStep, NewStep):
- pass
-
- def leaveStep(self, OldStep, NewStep):
- pass
-
- '''
- used in developement to start the wizard
- '''
-
- @classmethod
- def main(self, args):
- ConnectStr = \
- "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
- try:
- xLocMSF = Desktop.connect(ConnectStr)
- wizard = AgendaWizardDialogImpl(xLocMSF)
- wizard.startWizard()
- except Exception, exception:
- traceback.print_exc()
-
- '''
- read the configuration data, open the specified template,
- initialize the template controller (AgendaTemplate) and
- set the status of the displayed template to the one
- read from the configuration.
- build the dialog.
- Synchronize the dialog to the same status (read from
- the configuration).
- show the dialog.
- '''
-
- def startWizard(self):
- self.running = True
- try:
- #Number of steps on WizardDialog
- self.nMaxStep = 6
-
- # initialize the agenda template
- self.agenda = CGAgenda()
- self.agendaTemplate = AgendaTemplate(
- self.xMSF, self.agenda, self.resources, self)
-
- # build the dialog.
- self.drawNaviBar()
-
- self.buildStep1()
- self.buildStep2()
- self.buildStep3()
- self.buildStep4()
- self.buildStep5()
- self.buildStep6()
-
- self.topicsControl = TopicsControl(self, self.xMSF, self.agenda)
-
- self.initializePaths()
- #special Control for setting the save Path:
- self.insertPathSelectionControl()
-
- self.initializeTemplates()
-
- # synchronize GUI and CGAgenda object.
- self.initConfiguration()
-
- if self.myPathSelection.xSaveTextBox.Text.lower() == "":
- self.myPathSelection.initializePath()
-
- # create the peer
- xContainerWindow = self.agendaTemplate.xFrame.ContainerWindow
- self.createWindowPeer(xContainerWindow)
-
- # initialize roadmap
- self.insertRoadmap()
-
- self.pageDesignChanged()
-
- self.executeDialogFromComponent(self.agendaTemplate.xFrame)
- self.removeTerminateListener()
- self.closeDocument()
- self.running = False
- except Exception, ex:
- self.removeTerminateListener()
- traceback.print_exc()
- self.running = False
- return
-
- def insertPathSelectionControl(self):
- self.myPathSelection = PathSelection(
- self.xMSF, self, PathSelection.TransferMode.SAVE,
- PathSelection.DialogTypes.FILE)
- self.myPathSelection.insert(6, 97, 70, 205, 45,
- self.resources.reslblTemplatePath_value, True,
- HelpIds.getHelpIdString(HID + 24),
- HelpIds.getHelpIdString(HID + 25))
- self.myPathSelection.sDefaultDirectory = self.sUserTemplatePath
- self.myPathSelection.sDefaultName = "myAgendaTemplate.ott"
- self.myPathSelection.sDefaultFilter = "writer8_template"
- self.myPathSelection.addSelectionListener(
- self.myPathSelectionListener())
-
- def initializePaths(self):
- try:
- self.sTemplatePath = FileAccess.getOfficePath2(
- self.xMSF, "Template", "share", "/wizard")
- self.sUserTemplatePath = FileAccess.getOfficePath2(
- self.xMSF, "Template", "user", "")
- self.sBitmapPath = FileAccess.combinePaths(
- self.xMSF, self.sTemplatePath, "/../wizard/bitmap")
- except NoValidPathException:
- traceback.print_exc()
-
- def checkSavePath(self):
- if self.agenda.cp_TemplatePath is None \
- or self.agenda.cp_TemplatePath == "" \
- or not self.getFileAccess().exists(
- FileAccess.getParentDir(self.agenda.cp_TemplatePath), False) \
- or not self.getFileAccess().isDirectory(
- FileAccess.getParentDir(self.agenda.cp_TemplatePath)):
- try:
- self.agenda.cp_TemplatePath = FileAccess.connectURLs(
- FileAccess.getOfficePath2(self.xMSF, "Work", "", ""),
- self.resources.resDefaultFilename)
- except Exception, ex:
- traceback.print_exc()
-
- '''
- bind controls to the agenda member (DataAware model)
- '''
-
- def initConfiguration(self):
- # read configuration data.
- root = Configuration.getConfigurationRoot(
- self.xMSF, "/org.openoffice.Office.Writer/Wizards/Agenda", False)
- self.agenda.readConfiguration(root, "cp_")
-
- self.setControlProperty(
- "listPageDesign", "StringItemList", tuple(self.agendaTemplates[0]))
- self.checkSavePath()
- UnoDataAware.attachListBox(
- self.agenda, "cp_AgendaType", self.listPageDesign, True).updateUI()
- UnoDataAware.attachCheckBox(
- self.agenda, "cp_IncludeMinutes", self.chkMinutes, True).updateUI()
- UnoDataAware.attachEditControl(
- self.agenda, "cp_Title", self.txtTitle, True).updateUI()
- UnoDataAware.attachDateControl(
- self.agenda, "cp_Date", self.txtDate, True).updateUI()
- UnoDataAware.attachTimeControl(
- self.agenda, "cp_Time", self.txtTime, True).updateUI()
- UnoDataAware.attachEditControl(
- self.agenda, "cp_Location", self.cbLocation, True).updateUI()
- UnoDataAware.attachCheckBox(
- self.agenda, "cp_ShowMeetingType", self.chkMeetingTitle,
- True).updateUI()
- UnoDataAware.attachCheckBox(
- self.agenda, "cp_ShowRead", self.chkRead, True).updateUI()
- UnoDataAware.attachCheckBox(
- self.agenda, "cp_ShowBring", self.chkBring, True).updateUI()
- UnoDataAware.attachCheckBox(
- self.agenda, "cp_ShowNotes", self.chkNotes, True).updateUI()
- UnoDataAware.attachCheckBox(
- self.agenda, "cp_ShowCalledBy", self.chkConvenedBy,
- True).updateUI()
- UnoDataAware.attachCheckBox(
- self.agenda, "cp_ShowFacilitator", self.chkPresiding,
- True).updateUI()
- UnoDataAware.attachCheckBox(
- self.agenda, "cp_ShowNotetaker", self.chkNoteTaker,
- True).updateUI()
- UnoDataAware.attachCheckBox(
- self.agenda, "cp_ShowTimekeeper", self.chkTimekeeper,
- True).updateUI()
- UnoDataAware.attachCheckBox(
- self.agenda, "cp_ShowAttendees", self.chkAttendees,
- True).updateUI()
- UnoDataAware.attachCheckBox(
- self.agenda, "cp_ShowObservers", self.chkObservers,
- True).updateUI()
- UnoDataAware.attachCheckBox(
- self.agenda, "cp_ShowResourcePersons",self.chkResourcePersons,
- True).updateUI()
- UnoDataAware.attachEditControl(
- self.agenda, "cp_TemplateName", self.txtTemplateName,
- True).updateUI()
- RadioDataAware.attachRadioButtons(
- self.agenda, "cp_ProceedMethod",
- (self.optCreateAgenda, self.optMakeChanges), True).updateUI()
-
- def saveConfiguration(self):
- root = Configuration.getConfigurationRoot(
- self.xMSF, "/org.openoffice.Office.Writer/Wizards/Agenda", True)
- self.agenda.writeConfiguration(root, "cp_")
- root.commitChanges()
-
- def insertRoadmap(self):
- self.addRoadmap()
-
- self.insertRoadMapItems(
- [True, True, True, True, True, True],
- [self.resources.resStep1, self.resources.resStep2,
- self.resources.resStep3, self.resources.resStep4,
- self.resources.resStep5, self.resources.resStep6])
-
- self.setRoadmapInteractive(True)
- self.setRoadmapComplete(True)
- self.setCurrentRoadmapItemID(1)
-
- '''
- read the available agenda wizard templates.
- '''
-
- def initializeTemplates(self):
- try:
- self.sTemplatePath = FileAccess.getOfficePath2(
- self.xMSF, "Template", "share", "/wizard")
- sAgendaPath = FileAccess.combinePaths(
- self.xMSF, self.sTemplatePath, "/wizard/agenda")
- self.agendaTemplates = FileAccess.getFolderTitles(
- self.xMSF, "aw", sAgendaPath)
- return True
- except NoValidPathException:
- traceback.print_exc()
- return False
-
- '''
- first page, page design listbox changed.
- '''
-
- def pageDesignChanged(self):
- try:
- SelectedItemPos = self.listPageDesign.SelectedItemPos
- #avoid to load the same item again
- if AgendaWizardDialogImpl.pageDesign is not SelectedItemPos:
- AgendaWizardDialogImpl.pageDesign = SelectedItemPos
- self.agendaTemplate.load(
- self.agendaTemplates[1][SelectedItemPos],
- self.topicsControl.scrollfields)
- except Exception:
- traceback.print_exc()
-
- '''
- last page, template title changed...
- '''
-
- def templateTitleChanged(self):
- title = Helper.getUnoPropertyValue(getModel(txtTemplateName), "Text")
- self.agendaTemplate.setTemplateTitle(title)
-
- #textFields listeners
- def txtTitleTextChanged(self):
- AgendaTemplate.redrawTitle("txtTitle")
-
- def txtDateTextChanged(self):
- AgendaTemplate.redrawTitle("txtDate")
-
- def txtTimeTextChanged(self):
- AgendaTemplate.redrawTitle("txtTime")
-
- def txtLocationTextChanged(self):
- AgendaTemplate.redrawTitle("cbLocation")
-
- #checkbox listeners
- def chkUseMeetingTypeItemChanged(self):
- AgendaTemplate.agenda.cp_IncludeMinutes = bool(self.chkMinutes.State)
-
- def chkUseMeetingTypeItemChanged(self):
- AgendaTemplate.redraw(FILLIN_MEETING_TYPE)
-
- def chkUseReadItemChanged(self):
- AgendaTemplate.redraw(FILLIN_READ)
-
- def chkUseBringItemChanged(self):
- AgendaTemplate.redraw(FILLIN_BRING)
-
- def chkUseNotesItemChanged(self):
- AgendaTemplate.redraw(FILLIN_NOTES)
-
- def chkUseCalledByItemChanged(self):
- AgendaTemplate.redraw(FILLIN_CALLED_BY)
-
- def chkUseFacilitatorItemChanged(self):
- AgendaTemplate.redraw(FILLIN_FACILITATOR)
-
- def chkUseNoteTakerItemChanged(self):
- AgendaTemplate.redraw(FILLIN_NOTETAKER)
-
- def chkUseTimeKeeperItemChanged(self):
- AgendaTemplate.redraw(FILLIN_TIMEKEEPER)
-
- def chkUseAttendeesItemChanged(self):
- AgendaTemplate.redraw(FILLIN_PARTICIPANTS)
-
- def chkUseObserversItemChanged(self):
- AgendaTemplate.redraw(FILLIN_OBSERVERS)
-
- def chkUseResourcePersonsItemChanged(self):
- AgendaTemplate.redraw(FILLIN_RESOURCE_PERSONS)
-
- '''
- convenience method.
- instead of creating a FileAccess object every time
- it is needed, I have a FileAccess object memeber.
- the first time it is needed it will be created, and
- then be reused...
- @return the FileAccess memeber object.
- '''
-
- def getFileAccess(self):
- if AgendaWizardDialogImpl.fileAccess1 is None:
- try:
- AgendaWizardDialogImpl.fileAccess1 = FileAccess(self.xMSF)
- except Exception, e:
- traceback.print_exc()
- return AgendaWizardDialogImpl.fileAccess1
-
- '''
- last page, "browse" ("...") button was clicked...
- '''
-
- def saveAs(self):
- try:
- checkSavePath()
- saveAs = SystemDialog.createStoreDialog(xMSF)
- saveAs.addFilterToDialog("ott", "writer8_template", True)
- # call the saveAs dialog.
- url = saveAs.callStoreDialog(
- FileAccess.getParentDir(self.agenda.cp_TemplatePath),
- FileAccess.getFilename(self.agenda.cp_TemplatePath))
- if url != None:
- self.agenda.cp_TemplatePath = url
- setFilename(url)
- self.filenameChanged = True
-
- except Exception, ex:
- traceback.print_exc()
-
- '''
- is called when the user
- changes the path through the "save as" dialog.
- The path displayed is a translated, user-friendly, platform dependant path.
- @param url the new save url.
- '''
-
- def setFilename(self, url):
- try:
- path = getFileAccess().getPath(url, "")
- Helper.setUnoPropertyValue(
- getModel(self.myPathSelection.xSaveTextBox), "Text", path)
- except Exception, ex:
- traceback.print_exc()
-
- def insertRow(self):
- self.topicsControl.insertRow()
-
- def removeRow(self):
- self.topicsControl.removeRow()
-
- def rowUp(self):
- self.topicsControl.rowUp()
-
- def rowDown(self):
- self.topicsControl.rowDown()
-
- def cancelWizard(self):
- self.xUnoDialog.endExecute()
- self.running = False
-
- def finishWizard(self):
- self.switchToStep(self.getCurrentStep(), self.nMaxStep)
- bSaveSuccess = False
- endWizard = True
- try:
- fileAccess = FileAccess(self.xMSF)
- self.sPath = self.myPathSelection.getSelectedPath()
- if self.sPath == "":
- self.myPathSelection.triggerPathPicker()
- self.sPath = self.myPathSelection.getSelectedPath()
-
- self.sPath = fileAccess.getURL(self.sPath)
- #first, if the filename was not changed, thus
- #it is coming from a saved session, check if the
- # file exists and warn the user.
- if not self.filenameChanged:
- if fileAccess.exists(self.sPath, True):
- answer = SystemDialog.showMessageBox(
- self.xMSF, "MessBox", YES_NO + DEF_NO,
- self.resources.resFileExists,
- self.xUnoDialog.Peer)
- if answer == 3:
- # user said: no, do not overwrite
- endWizard = False
- return False
-
- xTextDocument = self.agendaTemplate.document
- bSaveSuccess = OfficeDocument.store(
- self.xMSF, AgendaTemplate.xTextDocument, self.sPath,
- "writer8_template")
-
- if bSaveSuccess:
- self.saveConfiguration()
-
- self.agendaTemplate.finish(self.topicsControl.scrollfields)
-
- loadValues = range(2)
- loadValues[0] = uno.createUnoStruct( \
- 'com.sun.star.beans.PropertyValue')
- loadValues[0].Name = "AsTemplate"
- if self.agenda.cp_ProceedMethod == 1:
- loadValues[0].Value = True
- else:
- loadValues[0].Value = False
-
- loadValues[1] = uno.createUnoStruct( \
- 'com.sun.star.beans.PropertyValue')
- loadValues[1].Name = "InteractionHandler"
-
- xIH = self.xMSF.createInstance(
- "com.sun.star.comp.uui.UUIInteractionHandler")
- loadValues[1].Value = xIH
-
- oDoc = OfficeDocument.load(
- Desktop.getDesktop(self.xMSF),
- self.sPath, "_default", loadValues)
- myViewHandler = ViewHandler(self.xMSF, oDoc)
- myViewHandler.setViewSetting("ZoomType", OPTIMAL)
- else:
- pass
-
- except Exception, e:
- traceback.print_exc()
- finally:
- if endWizard:
- self.xUnoDialog.endExecute()
- self.running = False
- return True
-
- def closeDocument(self):
- try:
- xCloseable = self.agendaTemplate.xFrame
- xCloseable.close(False)
- except CloseVetoException, e:
- traceback.print_exc()
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
deleted file mode 100644
index da84ee5b94e9..000000000000
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
+++ /dev/null
@@ -1,153 +0,0 @@
-from common.Resource import Resource
-
-class AgendaWizardDialogResources(Resource):
- MODULE_NAME = "dbw"
- RID_AGENDAWIZARDDIALOG_START = 5000
- RID_COMMON_START = 500
-
- def __init__(self, xmsf):
- super(AgendaWizardDialogResources,self).__init__(xmsf,
- AgendaWizardDialogResources.MODULE_NAME)
- #Delete the String, uncomment the getResText method
- self.resAgendaWizardDialog_title = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 1)
- self.resoptMakeChanges_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 2)
- self.reslblTemplateName_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 3)
- self.reslblTemplatePath_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 4)
- self.reslblProceed_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 5)
- self.reslblTitle1_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 6)
- self.reslblTitle3_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 7)
- self.reslblTitle2_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 8)
- self.reslblTitle4_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 9)
- self.reslblTitle5_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 10)
- self.reslblTitle6_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 11)
- self.reschkMinutes_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 12)
- self.reslblHelp1_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 13)
- self.reslblTime_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 14)
- self.reslblTitle_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 15)
- self.reslblLocation_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 16)
- self.reslblHelp2_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 17)
- self.resbtnTemplatePath_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 18)
- self.resoptCreateAgenda_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 19)
- self.reslblHelp6_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 20)
- self.reslblTopic_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 21)
- self.reslblResponsible_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 22)
- self.reslblDuration_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 23)
- self.reschkConvenedBy_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 24)
- self.reschkPresiding_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 25)
- self.reschkNoteTaker_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 26)
- self.reschkTimekeeper_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 27)
- self.reschkAttendees_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 28)
- self.reschkObservers_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 29)
- self.reschkResourcePersons_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 30)
- self.reslblHelp4_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 31)
- self.reschkMeetingTitle_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 32)
- self.reschkRead_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 33)
- self.reschkBring_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 34)
- self.reschkNotes_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 35)
- self.reslblHelp3_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 36)
- self.reslblDate_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 38)
- self.reslblHelpPg6_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 39)
- self.reslblPageDesign_value = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 40)
- self.resDefaultFilename = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 41)
- self.resDefaultFilename = self.resDefaultFilename[:-4] + ".ott"
- self.resDefaultTitle = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 42)
- self.resErrSaveTemplate = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 43)
- self.resPlaceHolderTitle = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 44)
- self.resPlaceHolderDate = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 45)
- self.resPlaceHolderTime = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 46)
- self.resPlaceHolderLocation = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 47)
- self.resPlaceHolderHint = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 48)
- self.resStep1 = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 50)
- self.resStep2 = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 51)
- self.resStep3 = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 52)
- self.resStep4 = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 53)
- self.resStep5 = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 54)
- self.resStep6 = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 55)
- self.resErrOpenTemplate = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 56)
- self.itemMeetingType = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 57)
- self.itemBring = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 58)
- self.itemRead = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 59)
- self.itemNote = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 60)
- self.itemCalledBy = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 61)
- self.itemFacilitator = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 62)
- self.itemAttendees = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 63)
- self.itemNotetaker = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 64)
- self.itemTimekeeper = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 65)
- self.itemObservers = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 66)
- self.itemResource = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 67)
- self.resButtonInsert = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 68)
- self.resButtonRemove = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 69)
- self.resButtonUp = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 70)
- self.resButtonDown = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 71)
-
- self.resFileExists = self.getResText(
- AgendaWizardDialogResources.RID_COMMON_START + 19)
diff --git a/wizards/com/sun/star/wizards/agenda/CGAgenda.py b/wizards/com/sun/star/wizards/agenda/CGAgenda.py
deleted file mode 100644
index 112ef041df25..000000000000
--- a/wizards/com/sun/star/wizards/agenda/CGAgenda.py
+++ /dev/null
@@ -1,27 +0,0 @@
-from common.ConfigGroup import ConfigGroup
-from common.ConfigSet import ConfigSet
-from CGTopic import CGTopic
-
-class CGAgenda(ConfigGroup):
- cp_AgendaType = int()
- cp_IncludeMinutes = bool()
- cp_Title = ""
- cp_Date = str()
- cp_Time = str()
- cp_Location = ""
- cp_ShowMeetingType = bool()
- cp_ShowRead = bool()
- cp_ShowBring = bool()
- cp_ShowNotes = bool()
- cp_ShowCalledBy = bool()
- cp_ShowFacilitator = bool()
- cp_ShowNotetaker = bool()
- cp_ShowTimekeeper = bool()
- cp_ShowAttendees = bool()
- cp_ShowObservers = bool()
- cp_ShowResourcePersons = bool()
- cp_TemplateName = str()
- cp_TemplatePath = str()
- cp_ProceedMethod = int()
-
- cp_Topics = ConfigSet(CGTopic())
diff --git a/wizards/com/sun/star/wizards/agenda/CGTopic.py b/wizards/com/sun/star/wizards/agenda/CGTopic.py
deleted file mode 100644
index ae6fb5125533..000000000000
--- a/wizards/com/sun/star/wizards/agenda/CGTopic.py
+++ /dev/null
@@ -1,45 +0,0 @@
-from common.ConfigGroup import *
-
-'''
-CGTopic means: Configuration Group Topic.
-This object encapsulates a configuration group with topic information.
-Since the topics gui conftrol uses its own data model, there is
-also code here to convert from the data model to CGTopic object (the constructor)
-and vice versa (setDataToRow method - used when loading the last session...)
-'''
-
-class CGTopic(ConfigGroup):
-
- cp_Index = int()
- cp_Topic = str()
- cp_Responsible = str()
- cp_Time = str()
-
- '''
- create a new CGTopic object with data from the given row.
- the row object is a PropertyValue array, as used
- by the TopicsControl's data model.
- @param row PropertyValue array as used by the TopicsControl data model.
- '''
-
- def __init__(self, row=None):
- if row is None:
- return
- num = row[0].Value
- CGTopic.cp_Index = int(row[0].Value[:-1])
- CGTopic.cp_Topic = row[1].Value
- CGTopic.cp_Responsible = row[2].Value
- CGTopic.cp_Time = row[3].Value
-
- '''
- copies the data in this CGTopic object
- to the given row.
- @param row the row object (PropertyValue array) to
- copy the data to.
- '''
-
- def setDataToRow(self, row):
- row[0].Value = "" + str(CGTopic.cp_Index) + "."
- row[1].Value = CGTopic.cp_Topic
- row[2].Value = CGTopic.cp_Responsible
- row[3].Value = CGTopic.cp_Time
diff --git a/wizards/com/sun/star/wizards/agenda/TemplateConsts.py b/wizards/com/sun/star/wizards/agenda/TemplateConsts.py
deleted file mode 100644
index 3095f31444a9..000000000000
--- a/wizards/com/sun/star/wizards/agenda/TemplateConsts.py
+++ /dev/null
@@ -1,72 +0,0 @@
-FILLIN_TITLE = "<title>"
-FILLIN_DATE = "<date>"
-FILLIN_TIME = "<time>"
-FILLIN_LOCATION = "<location>"
-'''
-section name <b>prefix</b> for sections that contain items.
-this is also used as table name prefix, since each items section
-must contain a table whos name is identical name to the section's name.
-'''
-SECTION_ITEMS = "AGENDA_ITEMS"
-'''
-the name of the section which contains the topics.
-'''
-SECTION_TOPICS = "AGENDA_TOPICS"
-'''
-the name of the parent minutes section.
-'''
-SECTION_MINUTES_ALL = "MINUTES_ALL"
-'''
-the name of the child nimutes section.
-This section will be duplicated for each topic.
-'''
-SECTION_MINUTES = "MINUTES"
-'''
-taged headings and names.
-These will be searched in item tables (in the template) and will be
-replaced with resource strings.
-
-headings...
-'''
-FILLIN_MEETING_TYPE = "<meeting-type>"
-FILLIN_BRING = "<bring>"
-FILLIN_READ = "<read>"
-FILLIN_NOTES = "<notes>"
-'''
-names...
-'''
-FILLIN_CALLED_BY = "<called-by>"
-FILLIN_FACILITATOR = "<facilitator>"
-FILLIN_PARTICIPANTS = "<attendees>"
-FILLIN_NOTETAKER = "<notetaker>"
-FILLIN_TIMEKEEPER = "<timekeeper>"
-FILLIN_OBSERVERS = "<observers>"
-FILLIN_RESOURCE_PERSONS = "<resource-persons>"
-
-'''
-Fillins for the topic table.
-These strings will be searched inside the topic table as
-part of detecting its structure.
-'''
-FILLIN_TOPIC_NUMBER = "<num>"
-FILLIN_TOPIC_TOPIC = "<topic>"
-FILLIN_TOPIC_RESPONSIBLE = "<responsible>"
-FILLIN_TOPIC_TIME = "<topic-time>"
-'''
-fillins for minutes.
-These will be searched in the minutes section and will be replaced
-with the appropriate data.
-'''
-FILLIN_MINUTES_TITLE = "<minutes-title>"
-FILLIN_MINUTES_LOCATION = "<minutes-location>"
-FILLIN_MINUTES_DATE = "<minutes-date>"
-FILLIN_MINUTES_TIME = "<minutes-time>"
-'''
-Minutes-topic fillins
-These will be searched in the minutes-child-section, and
-will be replaced with topic data.
-'''
-FILLIN_MINUTE_NUM = "<mnum>"
-FILLIN_MINUTE_TOPIC = "<mtopic>"
-FILLIN_MINUTE_RESPONSIBLE = "<mresponsible>"
-FILLIN_MINUTE_TIME = "<mtime>"
diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.py b/wizards/com/sun/star/wizards/agenda/TopicsControl.py
deleted file mode 100644
index d1fe2cac9979..000000000000
--- a/wizards/com/sun/star/wizards/agenda/TopicsControl.py
+++ /dev/null
@@ -1,886 +0,0 @@
-from threading import RLock
-from CGTopic import CGTopic
-from ui.ControlScroller import *
-from AgendaWizardDialogConst import LAST_HID
-from common.Properties import Properties
-from ui.event.CommonListener import FocusListenerProcAdapter, KeyListenerProcAdapter
-
-from com.sun.star.awt.Key import DOWN, UP, TAB
-from com.sun.star.awt.KeyModifier import SHIFT, MOD1
-
-'''
-@author rpiterman
-This class implements the UI functionality of the topics scroller control.
-<br/>
-During developement, there has been a few changes which were not *fully* done
-mainly in converting the topics and time boxes
-from combobox and time box to normal textboxes,
-so in the code they might be referenced as combobox or timebox. This should be
-rather understood as topicstextbox and timetextbox.<br/><br/>
-Important behaiviour of this control is that there is always a
-blank row at the end, in which the user can enter data.<br/>
-Once the row is not blank (thus, the user entered data...),
-a new blank row is added.<br/>
-Once the user removes the last *unempty* row, binsertRowy deleteing its data, it becomes
-the *last empty row* and the one after is being automatically removed.<br/><br/>
-The contorl shows 5 rows at a time.<br/>
-If, for example, only 2 rows exist (from which the 2ed one is empty...)
-then the other three rows, which do not exist in the data model, are disabled.
-<br/>
-The following other functionality is implemented:
-<br/>
-0. synchroniting data between controls, data model and live preview.
-1. Tab scrolling.<br/>
-2. Keyboard scrolling.<br/>
-3. Removing rows and adding new rows.<br/>
-4. Moving rows up and down. <br/>
-<br/>
-This control relays on the ControlScroller control which uses the following
-Data model:<br/>
-1. It uses a vector, whos members are arrays of PropertyValue.<br/>
-2. Each array represents a row.<br/>
-(Note: the Name and Value memebrs of the PropertyValue object are being used)
-3. Each property Value represents a value
-for a single control with the following rules:<br/>
-3. a. the Value of the property is used for as value
-of the controls (usually text).<br/>
-3. b. the Name of the property is used to map values
-to UI controls in the following manner:<br/>
-3. b. 1. only the Name of the first X Rows is regarded,
-where X is the number of visible rows (in the ainsertRowgenda wizard this would be 5,
-since 5 topic rows are visible on the dialog).<br/>
-3. b. 2. The Names of the first X (or 5...) rows are the names
-of the UI Controls to hold values. When the control scroller scrolls,
-it looks at the first 5 rows and uses the names specified there to map the
-current values to the specified controls. <br/>
-This data model makes the following limitations on the implementation:
-When moving rows, only the values should be moved. The Rows objects,
-which contain also the Names of the controls should not be switched. <br/>
-also when deleting or inserting rows, attention should be paid that no rows
-should be removed or inserted. Instead, only the Values should rotate. <br/><br/>
-To save the topics in the registry a ConfigSet of objects of type CGTopic is
-being used.
-This one is not synchronized "live", since it is unnecessary... instead, it is
-synchronized on call, before the settings should be saved.
-'''
-
-def synchronized(lock):
- ''' Synchronization decorator. '''
- def wrap(f):
- def newFunction(*args, **kw):
- lock.acquire()
- try:
- return f(*args, **kw)
- finally:
- lock.release()
- return newFunction
- return wrap
-
-class TopicsControl(ControlScroller):
-
- lock = RLock()
- LABEL = "lblTopicCnt_"
- TOPIC = "txtTopicTopic_"
- RESP = "cbTopicResp_"
- TIME = "txtTopicTime_"
- nscrollvalue = 0
- LABEL_PROPS = (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- TEXT_PROPS = (PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- lastFocusRow = 0
- lastFocusControl = None
-
- def __init__(self, dialog, xmsf, agenda):
- try:
- super(TopicsControl, self).__init__(
- dialog, xmsf, 5, 92, 38, 212, 5, 18, LAST_HID)
- self.initializeScrollFields(agenda)
- # set some focus listeners for TAB scroll down and up...
- # prepare scroll down on tab press...
- self.lastTime = \
- self.ControlGroupVector[self.nblockincrement - 1].timebox
-
- self.lastTime.addKeyListener(KeyListenerProcAdapter(
- self.lastControlKeyPressed))
- #prepare scroll up on tab press...
- self.firstTopic = self.ControlGroupVector[0].textbox
- self.firstTopic.addKeyListener(KeyListenerProcAdapter(
- self.firstControlKeyPressed))
- self.enableButtons()
- except Exception:
- traceback.print_exc()
-
- '''
- initializes the data of the control.
- @param agenda
- '''
-
- def initializeScrollFields(self, agenda):
- # create a row for each topic with the given values....
- for i in xrange(agenda.cp_Topics.getSize()):
- row = self.newRow(i)
- agenda.cp_Topics.getElementAt(i).setDataToRow(row)
- # a parent class method
- self.registerControlGroup(row, i)
- self.updateDocumentRow(i)
- # inserts a blank row at the end...
- self.insertRowAtEnd()
-
- '''
- Insert a blank (empty) row
- as last row of the control.
- The control has always a blank row at the
- end, which enables the user to enter data...
- '''
-
- @classmethod
- def insertRowAtEnd(self):
- l = len(ControlScroller.scrollfields)
- self.registerControlGroup(self.newRow(l), l)
- self.setTotalFieldCount(l + 1)
- # if the new row is visible, it must have been disabled
- # so it should be now enabled...
- if l - ControlScroller.nscrollvalue < self.nblockincrement:
- self.ControlGroupVector[l - ControlScroller.nscrollvalue].\
- setEnabled(True)
-
- '''
- remove the last row
- '''
-
- @classmethod
- def removeLastRow(self):
- l = len(ControlScroller.scrollfields)
- # if we should scroll up...
- if (l - ControlScroller.nscrollvalue) >= 1 \
- and (l - ControlScroller.nscrollvalue) <= self.nblockincrement \
- and ControlScroller.nscrollvalue > 0:
- while (l - ControlScroller.nscrollvalue >= 1) \
- and l - ControlScroller.nscrollvalue <= self.nblockincrement \
- and ControlScroller.nscrollvalue > 0:
- self.setScrollValue(ControlScroller.nscrollvalue - 1)
- # if we should disable a row...
- elif ControlScroller.nscrollvalue == 0 and l - 1 < self.nblockincrement:
- self.ControlGroupVector[l - 1].setEnabled(False)
-
- self.unregisterControlGroup(l - 1)
- self.setTotalFieldCount(l - 1)
-
- '''
- in order to use the "move up", "down" "insert" and "remove" buttons,
- we track the last control the gained focus, in order to know which
- row should be handled.
- @param fe
- '''
-
- @classmethod
- def focusGained(self, fe):
- xc = fe.Source
- self.focusGained2(xc)
-
- '''
- Sometimes I set the focus programatically to a control
- (for example when moving a row up or down, the focus should move
- with it).
- In such cases, no VCL event is being triggered so it must
- be called programtically.
- This is done by this method.
- @param control
- '''
-
- @classmethod
- def focusGained2(self, control):
- try:
- #calculate in which row we are...
- name = Helper.getUnoPropertyValue(
- control.Model, PropertyNames.PROPERTY_NAME)
- num = name[name.index("_") + 1:]
- TopicsControl.lastFocusRow = int(num) + ControlScroller.nscrollvalue
- TopicsControl.lastFocusControl = control
- # enable/disable the buttons...
- self.enableButtons()
- except Exception:
- traceback.print_exc()
-
- '''
- enable or disable the buttons according to the
- current row we are in.
- '''
-
- @classmethod
- def enableButtons(self):
- UnoDialog.setEnabled(
- ControlScroller.CurUnoDialog.btnInsert,
- TopicsControl.lastFocusRow < len(ControlScroller.scrollfields))
- UnoDialog.setEnabled(
- ControlScroller.CurUnoDialog.btnRemove,
- TopicsControl.lastFocusRow < len(ControlScroller.scrollfields) - 1)
- if TopicsControl.lastFocusControl is not None:
- UnoDialog.setEnabled(
- ControlScroller.CurUnoDialog.btnUp, TopicsControl.lastFocusRow > 0)
- UnoDialog.setEnabled(
- ControlScroller.CurUnoDialog.btnDown,
- TopicsControl.lastFocusRow < len(ControlScroller.scrollfields) - 1)
- else:
- UnoDialog.setEnabled(
- ControlScroller.CurUnoDialog.btnUp, False)
- UnoDialog.setEnabled(
- ControlScroller.CurUnoDialog.btnDown, False)
-
- '''
- Removes the current row.
- See general class documentation explanation about the
- data model used and the limitations which explain the implementation here.
- '''
-
- def removeRow(self):
- try:
- for i in xrange(TopicsControl.lastFocusRow,
- len(ControlScroller.scrollfields) - 1):
- pv1 = ControlScroller.scrollfields[i]
- pv2 = ControlScroller.scrollfields[i + 1]
- pv1[1].Value = pv2[1].Value
- pv1[2].Value = pv2[2].Value
- pv1[3].Value = pv2[3].Value
- self.updateDocumentRow(i)
- if i - ControlScroller.nscrollvalue < self.nblockincrement:
- self.fillupControl(i - ControlScroller.nscrollvalue)
-
- self.removeLastRow()
- # update the live preview background document
- self.reduceDocumentToTopics()
- self.enableButtons()
- if TopicsControl.lastFocusControl is not None:
- # the focus should return to the edit control
- self.focus(TopicsControl.lastFocusControl)
- except Exception:
- traceback.print_exc()
-
- '''
- Inserts a row before the current row.
- See general class documentation explanation about the
- data model used and the limitations which explain the implementation here.
- '''
-
- def insertRow(self):
- try:
- self.insertRowAtEnd()
- for i in xrange(len(ControlScroller.scrollfields) - 2,
- TopicsControl.lastFocusRow, -1):
- pv1 = ControlScroller.scrollfields[i]
- pv2 = ControlScroller.scrollfields[i - 1]
- pv1[1].Value = pv2[1].Value
- pv1[2].Value = pv2[2].Value
- pv1[3].Value = pv2[3].Value
- self.updateDocumentRow(i)
- if i - ControlScroller.nscrollvalue < self.nblockincrement:
- self.fillupControl(i - ControlScroller.nscrollvalue)
-
- # after rotating all the properties from this row on,
- # we clear the row, so it is practically a new one...
- pv1 = ControlScroller.scrollfields[TopicsControl.lastFocusRow]
- pv1[1].Value = ""
- pv1[2].Value = ""
- pv1[3].Value = ""
- # update the preview document.
- self.updateDocumentRow(TopicsControl.lastFocusRow)
- self.fillupControl(
- TopicsControl.lastFocusRow - ControlScroller.nscrollvalue)
- self.enableButtons()
-
- if TopicsControl.lastFocusControl is not None:
- self.focus(TopicsControl.lastFocusControl)
- except Exception:
- traceback.print_exc()
-
- '''
- create a new row with the given index.
- The index is important because it is used in the
- Name member of the PropertyValue objects.
- To know why see general class documentation above (data model explanation)
- @param i the index of the new row
- @return
- '''
-
- @classmethod
- def newRow(self, i):
- pv = [None] * 4
- pv[0] = Properties.createProperty(
- TopicsControl.LABEL + str(i), "" + str(i + 1) + ".")
- pv[1] = Properties.createProperty(TopicsControl.TOPIC + str(i), "")
- pv[2] = Properties.createProperty(TopicsControl.RESP + str(i), "")
- pv[3] = Properties.createProperty(TopicsControl.TIME + str(i), "")
- return pv
-
- '''
- Implementation of ControlScroller
- This is a UI method which inserts a new row to the control.
- It uses the child-class ControlRow. (see below).
- @param _index
- @param npos
- @see ControlRow
- '''
-
- def insertControlGroup(self, _index, npos):
- oControlRow = ControlRow(
- ControlScroller.CurUnoDialog, self.iCompPosX, npos, _index,
- ControlRow.tabIndex)
- self.ControlGroupVector.append(oControlRow)
- ControlRow.tabIndex += 4
-
- '''
- Checks if a row is empty.
- This is used when the last row is changed.
- If it is empty, the next row (which is always blank) is removed.
- If it is not empty, a next row must exist.
- @param row the index number of the row to check.
- @return true if empty. false if not.
- '''
-
- @classmethod
- def isRowEmpty(self, row):
- data = self.getTopicData(row)
- # now - is this row empty?
- return data[1].Value and data[2].Value and data[3].Value
-
- '''
- update the preview document and
- remove/insert rows if needed.
- @param guiRow
- @param column
- '''
- oldData = []
-
- @classmethod
- def fieldChanged(self, guiRow, column):
- with TopicsControl.lock:
- try:
- # First, I update the document
- data = self.getTopicData(guiRow + ControlScroller.nscrollvalue)
- if data is None:
- return
-
- dataValue = [i.Value for i in data]
- if dataValue == TopicsControl.oldData:
- return
- else:
- TopicsControl.oldData = dataValue
-
- self.updateDocumentCell(
- guiRow + ControlScroller.nscrollvalue, column, data)
- if self.isRowEmpty(guiRow + ControlScroller.nscrollvalue):
- '''
- if this is the row before the last one
- (the last row is always empty)
- delete the last row...
- '''
- if (guiRow + ControlScroller.nscrollvalue) \
- == len(ControlScroller.scrollfields) - 2:
- self.removeLastRow()
- '''now consequentially check the last two rows,
- and remove the last one if they are both empty.
- (actually I check always the "before last" row,
- because the last one is always empty...
- '''
- while len(ControlScroller.scrollfields) > 1 \
- and self.isRowEmpty(len(ControlScroller.scrollfields) - 2):
- removeLastRow()
- cr = self.ControlGroupVector[
- ControlScroller.scrollfields.size - ControlScroller.nscrollvalue - 1]
- # if a remove was performed, set focus
- #to the last row with some data in it...
- self.focus(getControl(cr, column))
- # update the preview document.
- self.reduceDocumentToTopics()
-
- else:
- # row contains data
- # is this the last row?
- if (guiRow + ControlScroller.nscrollvalue + 1) \
- == len(ControlScroller.scrollfields):
- self.insertRowAtEnd()
-
- except Exception:
- traceback.print_exc()
-
- '''
- return the corresponding row data for the given index.
- @param topic index of the topic to get.
- @return a PropertyValue array with the data for the given topic.
- '''
-
- @classmethod
- def getTopicData(self, topic):
- if topic < len(ControlScroller.scrollfields):
- return ControlScroller.scrollfields[topic]
- else:
- return None
-
- '''
- If the user presses tab on the last control, and
- there *are* more rows in the model, scroll down.
- @param event
- '''
-
- def lastControlKeyPressed(self, event):
- # if tab without shift was pressed...
- try:
- if event.KeyCode == TAB and event.Modifiers == 0:
- # if there is another row...
- if (self.nblockincrement + ControlScroller.nscrollvalue) \
- < len(ControlScroller.scrollfields):
- self.setScrollValue(ControlScroller.nscrollvalue + 1)
- self.focus(self.getControlByIndex(self.ControlGroupVector[4], 1))
- except Exception:
- traceback.print_exc()
-
- '''
- If the user presses shift-tab on the first control, and
- there *are* more rows in the model, scroll up.
- @param event
- '''
-
- def firstControlKeyPressed(self, event):
- # if tab with shift was pressed...
- if (event.KeyCode == TAB) and \
- (event.Modifiers == SHIFT):
- if ControlScroller.nscrollvalue > 0:
- setScrollValue(ControlScroller.nscrollvalue - 1)
- focus(self.lastTime)
-
- '''
- sets focus to the given control.
- @param textControl
- '''
-
- @classmethod
- def focus(self, textControl):
- textControl.setFocus()
- text = textControl.Text
- textControl.Selection = uno.createUnoStruct( \
- 'com.sun.star.awt.Selection', 0, len(text))
- self.focusGained2(textControl)
-
- '''
- moves the given row one row down.
- @param guiRow the gui index of the row to move.
- @param control the control to gain focus after moving.
- '''
-
- @synchronized(lock)
- def rowDown(self, guiRow=None, control=None):
- try:
- if guiRow is None and control is None:
- guiRow = TopicsControl.lastFocusRow - ControlScroller.nscrollvalue
- control = TopicsControl.lastFocusControl
- # only perform if this is not the last row.
- actuallRow = guiRow + ControlScroller.nscrollvalue
- if actuallRow + 1 < len(ControlScroller.scrollfields):
- # get the current selection
- selection = control.Selection
- # the last row should scroll...
- scroll = (guiRow == self.nblockincrement - 1)
- if scroll:
- self.setScrollValue(ControlScroller.nscrollvalue + 1)
-
- scroll1 = ControlScroller.nscrollvalue
- if scroll:
- aux = -1
- else:
- aux = 1
- self.switchRows(guiRow, guiRow + aux)
- if ControlScroller.nscrollvalue != scroll1:
- guiRow += (ControlScroller.nscrollvalue - scroll1)
-
- self.setSelection(guiRow + (not scroll), control, selection)
- except Exception:
- traceback.print_exc()
-
- '''
- move the current row up
- '''
-
- @synchronized(lock)
- def rowUp(self, guiRow=None, control=None):
- try:
- if guiRow is None and control is None:
- guiRow = TopicsControl.lastFocusRow - ControlScroller.nscrollvalue
- control = TopicsControl.lastFocusControl
- # only perform if this is not the first row
- actuallRow = guiRow + ControlScroller.nscrollvalue
- if actuallRow > 0:
- # get the current selection
- selection = control.Selection
- # the last row should scroll...
- scroll = (guiRow == 0)
- if scroll:
- self.setScrollValue(ControlScroller.nscrollvalue - 1)
- if scroll:
- aux = 1
- else:
- aux = -1
- self.switchRows(guiRow, guiRow + aux)
- self.setSelection(guiRow - (not scroll), control, selection)
- except Exception:
- traceback.print_exc()
-
- '''
- moves the cursor up.
- @param guiRow
- @param control
- '''
-
- @classmethod
- @synchronized(lock)
- def cursorUp(self, guiRow, control):
- # is this the last full row ?
- actuallRow = guiRow + ControlScroller.nscrollvalue
- #if this is the first row
- if actuallRow == 0:
- return
- # the first row should scroll...
-
- scroll = (guiRow == 0)
- if scroll:
- self.setScrollValue(ControlScroller.nscrollvalue - 1)
- upperRow = self.ControlGroupVector[guiRow]
- else:
- upperRow = self.ControlGroupVector[guiRow - 1]
-
- self.focus(self.getControl(upperRow, control))
-
- '''
- moves the cursor down
- @param guiRow
- @param control
- '''
-
- @classmethod
- @synchronized(lock)
- def cursorDown(self, guiRow, control):
- # is this the last full row ?
- actuallRow = guiRow + ControlScroller.nscrollvalue
- #if this is the last row, exit
- if actuallRow == len(ControlScroller.scrollfields) - 1:
- return
- # the first row should scroll...
-
- scroll = (guiRow == self.nblockincrement - 1)
- if scroll:
- self.setScrollValue(ControlScroller.nscrollvalue + 1)
- lowerRow = self.ControlGroupVector[guiRow]
- else:
- # if we scrolled we are done...
- #otherwise..
- lowerRow = self.ControlGroupVector[guiRow + 1]
-
- self.focus(self.getControl(lowerRow, control))
-
- '''
- changes the values of the given rows with eachother
- @param row1 one can figure out what this parameter is...
- @param row2 one can figure out what this parameter is...
- '''
-
- def switchRows(self, row1, row2):
- o1 = ControlScroller.scrollfields[row1 + ControlScroller.nscrollvalue]
- o2 = ControlScroller.scrollfields[row2 + ControlScroller.nscrollvalue]
- temp = None
- for i in xrange(1, len(o1)):
- temp = o1[i].Value
- o1[i].Value = o2[i].Value
- o2[i].Value = temp
- self.fillupControl(row1)
- self.fillupControl(row2)
- self.updateDocumentRow(row1 + ControlScroller.nscrollvalue, o1)
- self.updateDocumentRow(row2 + ControlScroller.nscrollvalue, o2)
-
- '''
- if we changed the last row, add another one...
- '''
- if (row1 + ControlScroller.nscrollvalue + 1 == \
- len(ControlScroller.scrollfields)) \
- or (row2 + ControlScroller.nscrollvalue + 1 == \
- len(ControlScroller.scrollfields)):
-
- self.insertRowAtEnd()
- '''
- if we did not change the last row but
- we did change the one before - check if we
- have two empty rows at the end.
- If so, delete the last one...
- '''
- elif (row1 + ControlScroller.nscrollvalue) + \
- (row2 + ControlScroller.nscrollvalue) \
- == (len(ControlScroller.scrollfields) * 2 - 5):
- if self.isRowEmpty(len(ControlScroller.scrollfields) - 2) \
- and self.isRowEmpty(len(ControlScroller.scrollfields) - 1):
- self.removeLastRow()
- self.reduceDocumentToTopics()
-
- '''
- sets a text selection to a given control.
- This is used when one moves a row up or down.
- After moving row X to X+/-1, the selection (or cursor position) of the
- last focused control should be restored.
- The control's row is the given guiRow.
- The control's column is detecte4d according to the given event.
- This method is called as subsequent to different events,
- thus it is comfortable to use the event here to detect the column,
- rather than in the different event methods.
- @param guiRow the row of the control to set the selection to.
- @param eventSource helps to detect
- the control's column to set the selection to.
- @param s the selection object to set.
- '''
-
- def setSelection(self, guiRow, eventSource, s):
- cr = self.ControlGroupVector[guiRow]
- control = self.getControl(cr, eventSource)
- control.setFocus()
- control.setSelection(s)
-
- '''
- returns a control out of the given row, according to a column number.
- @param cr control row object.
- @param column the column number.
- @return the control...
- '''
-
- @classmethod
- def getControlByIndex(self, cr, column):
- tmp_switch_var1 = column
- if tmp_switch_var1 == 0:
- return cr.label
- elif tmp_switch_var1 == 1:
- return cr.textbox
- elif tmp_switch_var1 == 2:
- return cr.combobox
- elif tmp_switch_var1 == 3:
- return cr.timebox
- else:
- raise IllegalArgumentException ("No such column");
-
- '''getControl
- returns a control out of the given row, which is
- in the same column as the given control.
- @param cr control row object
- @param control a control indicating a column.
- @return
- '''
-
- @classmethod
- def getControl(self, cr, control):
- column = self.getColumn(control)
- return self.getControlByIndex(cr, column)
-
- '''
- returns the column number of the given control.
- @param control
- @return
- '''
-
- @classmethod
- def getColumn(self, control):
- name = Helper.getUnoPropertyValue(
- control.Model, PropertyNames.PROPERTY_NAME)
- if name.startswith(TopicsControl.TOPIC):
- return 1
- if name.startswith(TopicsControl.RESP):
- return 2
- if name.startswith(TopicsControl.TIME):
- return 3
- if name.startswith(TopicsControl.LABEL):
- return 0
- return -1
-
- '''
- update the given row in the preview document with the given data.
- @param row
- @param data
- '''
-
- def updateDocumentRow(self, row, data=None):
- if data is None:
- data = ControlScroller.scrollfields[row]
- try:
- ControlScroller.CurUnoDialog.agendaTemplate.topics.write(
- row, data)
- except Exception, ex:
- traceback.print_exc()
-
- '''
- updates a single cell in the preview document.
- Is called when a single value is changed, since we really
- don't have to update the whole row for one small changhe...
- @param row the data row to update (topic number).
- @param column the column to update (a gui column, not a document column).
- @param data the data of the entire row.
- '''
-
- @classmethod
- def updateDocumentCell(self, row, column, data):
- try:
- ControlScroller.CurUnoDialog.agendaTemplate.topics.writeCell(
- row, column, data)
- except Exception, ex:
- traceback.print_exc()
-
- '''
- when removeing rows, this method updates
- the preview document to show the number of rows
- according to the data model.
- '''
-
- def reduceDocumentToTopics(self):
- try:
- ControlScroller.CurUnoDialog.agendaTemplate.topics.reduceDocumentTo(
- len(ControlScroller.scrollfields) - 1)
- except Exception, ex:
- traceback.print_exc()
-
-'''
-@author rp143992
-A class represting a single GUI row.
-Note that the instance methods of this class
-are being called and handle controls of
-a single row.
-'''
-
-class ControlRow(object):
-
- tabIndex = 520
- '''
- constructor. Create the row in the given dialog given cordinates,
- with the given offset (row number) and tabindex.
- Note that since I use this specifically for the agenda wizard,
- the step and all control coordinates inside the
- row are constant (5).
- @param dialog the agenda dialog
- @param x x coordinates
- @param y y coordinates
- @param i the gui row index
- @param tabindex first tab index for this row.
- '''
-
- def __init__(self, dialog, x, y, i, tabindex):
- self.offset = i
- self.dialog = dialog
- self.label = self.dialog.insertLabel(
- TopicsControl.LABEL + str(i),
- TopicsControl.LABEL_PROPS,
- (8, "" + str(i + 1) + ".",
- x + 4, y + 2, ControlScroller.iStep, tabindex, 10))
- self.textbox = self.dialog.insertTextField(
- TopicsControl.TOPIC + str(i), "topicTextChanged",
- TopicsControl.TEXT_PROPS,
- (12, HelpIds.getHelpIdString(ControlScroller.curHelpIndex + i * 3 + 1),
- x + 15, y, ControlScroller.iStep, tabindex + 1, 84), self)
- self.combobox = self.dialog.insertTextField(
- TopicsControl.RESP + str(i), "responsibleTextChanged",
- TopicsControl.TEXT_PROPS,
- (12, HelpIds.getHelpIdString(ControlScroller.curHelpIndex + i * 3 + 2),
- x + 103, y, ControlScroller.iStep, tabindex + 2, 68), self)
- self.timebox = self.dialog.insertTextField(
- TopicsControl.TIME + str(i), "timeTextChanged",
- TopicsControl.TEXT_PROPS,
- (12, HelpIds.getHelpIdString(ControlScroller.curHelpIndex + i * 3 + 3),
- x + 175, y, ControlScroller.iStep, tabindex + 3, 20), self)
- self.setEnabled(False)
- self.textbox.addKeyListener(KeyListenerProcAdapter(self.keyPressed))
- self.combobox.addKeyListener(KeyListenerProcAdapter(self.keyPressed))
- self.timebox.addKeyListener(KeyListenerProcAdapter(self.keyPressed))
- self.textbox.addFocusListener(FocusListenerProcAdapter(
- TopicsControl.focusGained))
- self.combobox.addFocusListener(FocusListenerProcAdapter(
- TopicsControl.focusGained))
- self.timebox.addFocusListener(FocusListenerProcAdapter(
- TopicsControl.focusGained))
-
- def topicTextChanged(self):
- try:
- # update the data model
- ControlScroller.fieldInfo(self.offset, 1)
- # update the preview document
- TopicsControl.fieldChanged(self.offset, 1)
- except Exception:
- traceback.print_exc()
-
- '''
- called through an event listener when the
- responsible text is changed by the user.
- updates the data model and the preview document.
- '''
-
- def responsibleTextChanged(self):
- try:
- # update the data model
- ControlScroller.fieldInfo(self.offset, 2)
- # update the preview document
- TopicsControl.fieldChanged(self.offset, 2)
- except Exception:
- traceback.print_exc()
-
- '''
- called through an event listener when the
- time text is changed by the user.
- updates the data model and the preview document.
- '''
-
- def timeTextChanged(self):
- try:
- # update the data model
- ControlScroller.fieldInfo(self.offset, 3)
- # update the preview document
- TopicsControl.fieldChanged(self.offset, 3)
- except Exception:
- traceback.print_exc()
-
- '''
- enables/disables the row.
- @param enabled true for enable, false for disable.
- '''
-
- def setEnabled(self, enabled):
- self.dialog.setEnabled(self.label, enabled)
- self.dialog.setEnabled(self.textbox, enabled)
- self.dialog.setEnabled(self.combobox, enabled)
- self.dialog.setEnabled(self.timebox, enabled)
-
- '''
- Impelementation of XKeyListener.
- Optionally performs the one of the following:
- cursor up, or down, row up or down
- '''
-
- def keyPressed(self, event):
- try:
- if self.isMoveDown(event):
- TopicsControl.rowDown(self.offset, event.Source)
- elif self.isMoveUp(event):
- TopicsControl.rowUp(self.offset, event.Source)
- elif self.isDown(event):
- TopicsControl.cursorDown(self.offset, event.Source)
- elif self.isUp(event):
- TopicsControl.cursorUp(self.offset, event.Source)
-
- TopicsControl.enableButtons()
- except Exception:
- traceback.print_exc()
-
- def isMoveDown(self, e):
- return (e.KeyCode == DOWN) and (e.Modifiers == MOD1)
-
- def isMoveUp(self, e):
- return (e.KeyCode == UP) and (e.Modifiers == MOD1)
-
- def isDown(self, e):
- return (e.KeyCode == DOWN) and (e.Modifiers == 0)
-
- def isUp(self, e):
- return (e.KeyCode == UP) and (e.Modifiers == 0)
diff --git a/wizards/com/sun/star/wizards/agenda/__init__.py b/wizards/com/sun/star/wizards/agenda/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/wizards/com/sun/star/wizards/agenda/__init__.py
+++ /dev/null
diff --git a/wizards/com/sun/star/wizards/common/ConfigGroup.py b/wizards/com/sun/star/wizards/common/ConfigGroup.py
deleted file mode 100644
index 2e0fd9434699..000000000000
--- a/wizards/com/sun/star/wizards/common/ConfigGroup.py
+++ /dev/null
@@ -1,35 +0,0 @@
-from ConfigNode import *
-from Configuration import Configuration
-import traceback
-import inspect
-
-class ConfigGroup(ConfigNode):
-
- def writeConfiguration(self, configurationView, param):
- for name,data in inspect.getmembers(self):
- if name.startswith(param):
- self.writeField( name, configurationView, param)
-
- def writeField(self, field, configView, prefix):
- propertyName = field[len(prefix):]
- child = getattr(self, field)
- if isinstance(child, ConfigNode):
- child.writeConfiguration(configView.getByName(propertyName),
- prefix)
- else:
- setattr(configView,propertyName,getattr(self,field))
-
- def readConfiguration(self, configurationView, param):
- for name,data in inspect.getmembers(self):
- if name.startswith(param):
- self.readField( name, configurationView, param)
-
- def readField(self, field, configView, prefix):
- propertyName = field[len(prefix):]
- child = getattr(self, field)
- if isinstance(child, ConfigNode):
- child.root = self.root
- child.readConfiguration(configView.getByName(propertyName),
- prefix)
- else:
- setattr(self,field,configView.getByName(propertyName))
diff --git a/wizards/com/sun/star/wizards/common/ConfigNode.py b/wizards/com/sun/star/wizards/common/ConfigNode.py
deleted file mode 100644
index 892e6e3277c7..000000000000
--- a/wizards/com/sun/star/wizards/common/ConfigNode.py
+++ /dev/null
@@ -1,13 +0,0 @@
-from abc import ABCMeta, abstractmethod
-
-class ConfigNode(object):
-
- root = None
-
- @abstractmethod
- def readConfiguration(self, configurationView, param):
- pass
-
- @abstractmethod
- def writeConfiguration(self, configurationView, param):
- pass
diff --git a/wizards/com/sun/star/wizards/common/ConfigSet.py b/wizards/com/sun/star/wizards/common/ConfigSet.py
deleted file mode 100644
index 26b051adf2ef..000000000000
--- a/wizards/com/sun/star/wizards/common/ConfigSet.py
+++ /dev/null
@@ -1,184 +0,0 @@
-import traceback
-from ConfigNode import *
-from Configuration import Configuration
-
-class ConfigSet(ConfigNode):
- '''
- After reading the configuration set items,
- the ConfigSet checks this field.
- If it is true, it will remove any nulls from
- the vector.
- subclasses can change this field in the constructor
- to avoid this "deletion" of nulls.
- '''
-
- def __init__(self, childType):
- self.childClass = childType
- self.childrenMap = {}
- self.childrenList = []
- self.noNulls = False
-
- def add(self, name, o):
- self.childrenMap[name] = o
- if isinstance(name, int):
- i = name
- self.childrenList.insert(i, o)
- else:
- try:
- i = o.cp_Index
- oldSize = self.getSize()
- if oldSize <= i:
- newSize = i - oldSize
- self.childrenList += [None] * newSize
- self.noNulls = True
- else:
- self.noNulls = False
- self.childrenList.insert(i, o);
- if oldSize > i:
- oldSize = i
- except Exception:
- self.childrenList.append(o)
-
- def writeConfiguration(self, configView, param):
- names = self.childrenMap.keys()
- if isinstance(self.childClass, ConfigNode):
- #first I remove all the children from the configuration.
- children = configView.ElementNames
- if children:
- for i in children:
- try:
- Configuration.removeNode(configView, i)
- except Exception:
- traceback.print_exc()
-
- # and add them new.
- for i in names:
- try:
- child = self.getElement(i)
- childView = configView.getByName(i)
- child.writeConfiguration(childView, param)
- except Exception:
- traceback.print_exc()
- else:
- raise AttributeError (
- "Unable to write primitive sets to configuration (not implemented)")
-
- def readConfiguration(self, configurationView, param):
- names = configurationView.ElementNames
- if isinstance(self.childClass, ConfigNode):
- if names:
- for i in names:
- try:
- child = type(self.childClass)()
- child.root = self.root
- child.readConfiguration(
- configurationView.getByName(i), param)
- self.add(i, child)
- except Exception, ex:
- traceback.print_exc()
- #remove any nulls from the list
- if self.noNulls:
- i = 0
- while i < len(self.childrenList):
- if self.childrenList[i] is None:
- del self.childrenList[i]
- i -= 1
- i += 1
-
- else:
- for i in names:
- try:
- child = configurationView.getByName(i)
- self.add(i, child)
- except Exception, ex:
- traceback.print_exc()
-
- def remove(self, obj):
- key = getKey(obj)
- self.childrenMap.remove(key)
- i = self.childrenList.indexOf(obj)
- self.childrenList.remove(obj)
- fireListDataListenerIntervalRemoved(i, i)
-
- def remove(self, i):
- o = getElementAt(i)
- remove(o)
-
- def clear(self):
- self.childrenMap.clear()
- del self.childrenList[:]
-
- def createDOM(self, parent):
- items = items()
- i = 0
- while i < items.length:
- item = items[i]
- if item.instanceof.XMLProvider:
- item.createDOM(parent)
-
- i += 1
- return parent
-
- def getKey(self, _object):
- for k,v in self.childrenMap.items():
- if v == _object:
- return k
-
- return None
-
- def getElementAt(self, i):
- return self.childrenList[i]
-
- def getElement(self, o):
- return self.childrenMap[o]
-
- def getSize(self):
- return len(self.childrenList)
-
- def getIndexOf(self, item):
- return self.childrenList.index(item)
-
- '''
- Set members might include a property
- which orders them.
- This method reindexes the given member to be
- the index number 0
- Do not forget to call commit() after calling this method.
- @param confView
- @param memebrName
- '''
-
- def reindexSet(self, confView, memberName, indexPropertyName):
- '''
- First I read all memebrs of the set,
- except the one that should be number 0
- to a vector, ordered by there index property
- '''
- names = Configuration.getChildrenNames(confView)
- v = Vector.Vector_unknown(names.length)
- member = None
- index = 0
- i = 0
- while i < names.length:
- if not names[i].equals(memberName):
- member = Configuration.getConfigurationNode(names[i], confView)
- index = Configuration.getInt(indexPropertyName, member)
- while index >= v.size():
- v.add(None)
- v.setElementAt(member, index)
- '''
- Now I reindex them
- '''
-
- i += 1
- index = 1
- i = 0
- while i < v.size():
- member = v.get(i)
- if member != None:
- Configuration.set((index + 1), indexPropertyName, member)
-
- i += 1
-
- def sort(self, comparator):
- self.childrenList.sort(comparator)
diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py
deleted file mode 100644
index 9f768e9bfb8d..000000000000
--- a/wizards/com/sun/star/wizards/common/Configuration.py
+++ /dev/null
@@ -1,214 +0,0 @@
-from PropertyNames import PropertyNames
-from Helper import *
-import traceback
-import uno
-'''
-This class gives access to the OO configuration api.
-It contains 4 get and 4 set convenience methods for getting and settings
-properties in the configuration. <br/>
-For the get methods, two parameters must be given: name and parent, where
-name is the name of the property, parent is a HierarchyElement
-(::com::sun::star::configuration::HierarchyElement)<br/>
-The get and set methods support hieryrchical property names like
-"options/gridX". <br/>
-NOTE: not yet supported, but sometime later,
-If you will ommit the "parent" parameter, then the "name" parameter must be
-in hierarchy form from the root of the registry.
-'''
-
-class Configuration(object):
-
- @classmethod
- def getConfigurationRoot(self, xmsf, sPath, updateable):
- oConfigProvider = xmsf.createInstance(
- "com.sun.star.configuration.ConfigurationProvider")
- args = []
-
- aPathArgument = uno.createUnoStruct(
- 'com.sun.star.beans.PropertyValue')
- aPathArgument.Name = "nodepath"
- aPathArgument.Value = sPath
-
- args.append(aPathArgument)
- if updateable:
- sView = "com.sun.star.configuration.ConfigurationUpdateAccess"
- aModeArgument = uno.createUnoStruct(
- 'com.sun.star.beans.PropertyValue')
- aModeArgument.Name = "lazywrite"
- aModeArgument.Value = False
- args.append(aModeArgument)
- else:
- sView = "com.sun.star.configuration.ConfigurationAccess"
-
- return oConfigProvider.createInstanceWithArguments(sView, tuple(args))
-
- @classmethod
- def getProductName(self, xMSF):
- try:
- oProdNameAccess = self.getConfigurationRoot(xMSF,
- "org.openoffice.Setup/Product", False)
- ProductName = Helper.getUnoObjectbyName(oProdNameAccess, "ooName")
- return ProductName
- except Exception:
- traceback.print_exc()
- return None
-
- @classmethod
- def getOfficeLocaleString(self, xMSF):
- sLocale = ""
- try:
- aLocLocale = Locale.Locale()
- oMasterKey = self.getConfigurationRoot(xMSF,
- "org.openoffice.Setup/L10N/", False)
- sLocale = (String)
- Helper.getUnoObjectbyName(oMasterKey, "ooLocale")
- except Exception, exception:
- traceback.print_exc()
-
- return sLocale
-
- @classmethod
- def getOfficeLocale(self, xMSF):
- aLocLocale = Locale.Locale()
- sLocale = getOfficeLocaleString(xMSF)
- sLocaleList = JavaTools.ArrayoutofString(sLocale, "-")
- aLocLocale.Language = sLocaleList[0]
- if sLocaleList.length > 1:
- aLocLocale.Country = sLocaleList[1]
-
- return aLocLocale
-
- @classmethod
- def getOfficeLinguistic(self, xMSF):
- try:
- oMasterKey = self.getConfigurationRoot(xMSF,
- "org.openoffice.Setup/L10N/", False)
- sLinguistic = Helper.getUnoObjectbyName(oMasterKey, "ooLocale")
- return sLinguistic
- except Exception, exception:
- traceback.print_exc()
- return None
-
- @classmethod
- def removeNode(self, configView, name, xmsf=None):
- commitChanges = False
- if xmsf is not None:
- configView = self.getConfigurationRoot(xmsf, path, True)
- commit = True
-
- if configView.hasByName(name):
- configView.removeByName(name)
-
- if commitChanges:
- configView.commitChanges()
-
- @classmethod
- def updateConfiguration(self, xmsf, path, name, node, param):
- view = self.getConfigurationRoot(xmsf, path, True)
- addConfigNode(path, name)
- node.writeConfiguration(view, param)
- view.commitChanges()
-
- @classmethod
- def getNodeDisplayNames(self, _xNameAccessNode):
- snames = None
- return getNodeChildNames(_xNameAccessNode,
- PropertyNames.PROPERTY_NAME)
-
- @classmethod
- def getNodeChildNames(self, xNameAccessNode, _schildname):
- snames = None
- try:
- snames = xNameAccessNode.getElementNames()
- sdisplaynames = range(snames.length)
- i = 0
- while i < snames.length:
- oContent = Helper.getUnoPropertyValue(
- xNameAccessNode.getByName(snames[i]), _schildname)
- if not AnyConverter.isVoid(oContent):
- sdisplaynames[i] = (String)
- Helper.getUnoPropertyValue(xNameAccessNode.getByName(
- snames[i]), _schildname)
- else:
- sdisplaynames[i] = snames[i]
-
- i += 1
- return sdisplaynames
- except Exception, e:
- traceback.print_exc()
- return snames
-
- @classmethod
- def getChildNodebyIndex(self, _xNameAccess, _index):
- try:
- snames = _xNameAccess.getElementNames()
- oNode = _xNameAccess.getByName(snames[_index])
- return oNode
- except Exception, e:
- traceback.print_exc()
- return None
-
- @classmethod
- def getChildNodebyName(self, _xNameAccessNode, _SubNodeName):
- try:
- if _xNameAccessNode.hasByName(_SubNodeName):
- return _xNameAccessNode.getByName(_SubNodeName)
-
- except Exception, e:
- traceback.print_exc()
-
- return None
-
- @classmethod
- def getChildNodebyDisplayName(self, _xNameAccessNode, _displayname):
- snames = None
- return getChildNodebyDisplayName(_xNameAccessNode, _displayname,
- PropertyNames.PROPERTY_NAME)
-
- @classmethod
- def getChildNodebyDisplayName(self, _xNameAccessNode, _displayname,
- _nodename):
-
- snames = None
- try:
- snames = _xNameAccessNode.getElementNames()
- sdisplaynames = range(snames.length)
- i = 0
- while i < snames.length:
- curdisplayname = Helper.getUnoPropertyValue(
- _xNameAccessNode.getByName(snames[i]), _nodename)
- if curdisplayname.equals(_displayname):
- return _xNameAccessNode.getByName(snames[i])
-
- i += 1
- except Exception, e:
- traceback.print_exc()
-
- return None
-
- @classmethod
- def getChildNodebyDisplayName(self, _xMSF, _aLocale, _xNameAccessNode,
- _displayname, _nodename, _nmaxcharcount):
-
- snames = None
- try:
- snames = _xNameAccessNode.getElementNames()
- sdisplaynames = range(snames.length)
- i = 0
- while i < snames.length:
- curdisplayname = Helper.getUnoPropertyValue(
- _xNameAccessNode.getByName(snames[i]), _nodename)
- if (_nmaxcharcount > 0) and (_nmaxcharcount < \
- curdisplayname.length()):
- curdisplayname = curdisplayname.substring(0,
- _nmaxcharcount)
-
- curdisplayname = Desktop.removeSpecialCharacters(_xMSF,
- _aLocale, curdisplayname)
- if curdisplayname.equals(_displayname):
- return _xNameAccessNode.getByName(snames[i])
-
- i += 1
- except Exception, e:
- traceback.print_exc()
- return None
diff --git a/wizards/com/sun/star/wizards/common/DebugHelper.py b/wizards/com/sun/star/wizards/common/DebugHelper.py
deleted file mode 100644
index 75016033a533..000000000000
--- a/wizards/com/sun/star/wizards/common/DebugHelper.py
+++ /dev/null
@@ -1,10 +0,0 @@
-class DebugHelper(object):
-
- @classmethod
- def exception(self, ex):
- raise NotImplementedError
-
- @classmethod
- def writeInfo(self, msg):
- raise NotImplementedError
-
diff --git a/wizards/com/sun/star/wizards/common/Desktop.py b/wizards/com/sun/star/wizards/common/Desktop.py
deleted file mode 100644
index 757767a93459..000000000000
--- a/wizards/com/sun/star/wizards/common/Desktop.py
+++ /dev/null
@@ -1,228 +0,0 @@
-import uno
-import traceback
-from com.sun.star.frame.FrameSearchFlag import ALL, PARENT
-from com.sun.star.util import URL
-from com.sun.star.i18n.KParseTokens import ANY_LETTER_OR_NUMBER, ASC_UNDERSCORE
-from NoValidPathException import *
-
-class Desktop(object):
-
- @classmethod
- def getDesktop(self, xMSF):
- xDesktop = None
- if xMSF is not None:
- try:
- xDesktop = xMSF.createInstance( "com.sun.star.frame.Desktop")
- except Exception, exception:
- traceback.print_exc()
- else:
- print "Can't create a desktop. null pointer !"
-
- return xDesktop
-
- @classmethod
- def getActiveFrame(self, xMSF):
- xDesktop = self.getDesktop(xMSF)
- return xDesktop.getActiveFrame()
-
- @classmethod
- def getActiveComponent(self, _xMSF):
- xFrame = self.getActiveFrame(_xMSF)
- return xFrame.getController().getModel()
-
- @classmethod
- def getActiveTextDocument(self, _xMSF):
- xComponent = getActiveComponent(_xMSF)
- return xComponent #Text
-
- @classmethod
- def getActiveSpreadsheetDocument(self, _xMSF):
- xComponent = getActiveComponent(_xMSF)
- return xComponent
-
- @classmethod
- def getDispatcher(self, xMSF, xFrame, _stargetframe, oURL):
- try:
- oURLArray = range(1)
- oURLArray[0] = oURL
- xDispatch = xFrame.queryDispatch(oURLArray[0], _stargetframe, ALL)
- return xDispatch
- except Exception, e:
- e.printStackTrace(System.out)
-
- return None
-
- @classmethod
- def connect(self, connectStr):
- localContext = uno.getComponentContext()
- resolver = localContext.ServiceManager.createInstanceWithContext(
- "com.sun.star.bridge.UnoUrlResolver", localContext)
- ctx = resolver.resolve( connectStr )
- orb = ctx.ServiceManager
- return orb
-
- @classmethod
- def getIncrementSuffix(self, xElementContainer, sElementName):
- bElementexists = True
- i = 1
- sIncSuffix = ""
- BaseName = sElementName
- while bElementexists:
- try:
- bElementexists = xElementContainer.hasByName(sElementName)
- except:
- bElementexists = xElementContainer.hasByHierarchicalName(
- sElementName)
- if bElementexists:
- i += 1
- sElementName = BaseName + str(i)
-
- if i > 1:
- sIncSuffix = str(i)
-
- return sIncSuffix
-
- @classmethod
- def checkforfirstSpecialCharacter(self, _xMSF, _sString, _aLocale):
- try:
- nStartFlags = ANY_LETTER_OR_NUMBER + ASC_UNDERSCORE
- ocharservice = _xMSF.createInstance(
- "com.sun.star.i18n.CharacterClassification")
- aResult = ocharservice.parsePredefinedToken(KParseType.IDENTNAME,
- _sString, 0, _aLocale, nStartFlags, "", nStartFlags, " ")
- return aResult.EndPos
- except Exception, e:
- e.printStackTrace(System.out)
- return -1
-
- @classmethod
- def removeSpecialCharacters(self, _xMSF, _aLocale, _sname):
- snewname = _sname
- i = 0
- while i < snewname.length():
- i = Desktop.checkforfirstSpecialCharacter(_xMSF, snewname,
- _aLocale)
- if i < snewname.length():
- sspecialchar = snewname.substring(i, i + 1)
- snewname = JavaTools.replaceSubString(snewname, "",
- sspecialchar)
-
- return snewname
-
- '''
- Checks if the passed Element Name already exists in the ElementContainer.
- If yes it appends a suffix to make it unique
- @param xElementContainer
- @param sElementName
- @return a unique Name ready to be added to the container.
- '''
-
- @classmethod
- def getUniqueName(self, xElementContainer, sElementName):
- sIncSuffix = self.getIncrementSuffix(xElementContainer, sElementName)
- return sElementName + sIncSuffix
-
-class OfficePathRetriever:
-
- def OfficePathRetriever(self, xMSF):
- try:
- TemplatePath = FileAccess.getOfficePath(xMSF,
- "Template", "share", "/wizard")
- UserTemplatePath = FileAccess.getOfficePath(xMSF,
- "Template", "user", "")
- BitmapPath = FileAccess.combinePaths(xMSF, TemplatePath,
- "/../wizard/bitmap")
- WorkPath = FileAccess.getOfficePath(xMSF,
- "Work", "", "")
- except NoValidPathException, nopathexception:
- pass
-
- @classmethod
- def getTemplatePath(self, _xMSF):
- sTemplatePath = ""
- try:
- sTemplatePath = FileAccess.getOfficePath(_xMSF,
- "Template", "share", "/wizard")
- except NoValidPathException, nopathexception:
- pass
- return sTemplatePath
-
- @classmethod
- def getUserTemplatePath(self, _xMSF):
- sUserTemplatePath = ""
- try:
- sUserTemplatePath = FileAccess.getOfficePath(_xMSF,
- "Template", "user", "")
- except NoValidPathException, nopathexception:
- pass
- return sUserTemplatePath
-
- @classmethod
- def getBitmapPath(self, _xMSF):
- sBitmapPath = ""
- try:
- sBitmapPath = FileAccess.combinePaths(_xMSF,
- getTemplatePath(_xMSF), "/../wizard/bitmap")
- except NoValidPathException, nopathexception:
- pass
-
- return sBitmapPath
-
- @classmethod
- def getWorkPath(self, _xMSF):
- sWorkPath = ""
- try:
- sWorkPath = FileAccess.getOfficePath(_xMSF, "Work", "", "")
-
- except NoValidPathException, nopathexception:
- pass
-
- return sWorkPath
-
- @classmethod
- def createStringSubstitution(self, xMSF):
- xPathSubst = None
- try:
- xPathSubst = xMSF.createInstance(
- "com.sun.star.util.PathSubstitution")
- except com.sun.star.uno.Exception, e:
- e.printStackTrace()
-
- if xPathSubst != None:
- return xPathSubst
- else:
- return None
-
- '''This method searches (and hopefully finds...) a frame
- with a componentWindow.
- It does it in three phases:
- 1. Check if the given desktop argument has a componentWindow.
- If it is null, the myFrame argument is taken.
- 2. Go up the tree of frames and search a frame with a component window.
- 3. Get from the desktop all the components, and give the first one
- which has a frame.
- @param xMSF
- @param myFrame
- @param desktop
- @return
- @throws NoSuchElementException
- @throws WrappedTargetException
- '''
-
- @classmethod
- def findAFrame(self, xMSF, myFrame, desktop):
- if desktop == None:
- desktop = myFrame
- #we go up in the tree...
-
- while desktop != None and desktop.getComponentWindow() == None:
- desktop = desktop.findFrame("_parent", FrameSearchFlag.PARENT)
- if desktop == None:
- e = Desktop.getDesktop(xMSF).getComponents().createEnumeration()
- while e.hasMoreElements():
- xModel = (e.nextElement()).getObject()
- xFrame = xModel.getCurrentController().getFrame()
- if xFrame != None and xFrame.getComponentWindow() != None:
- return xFrame
-
- return desktop
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py
deleted file mode 100644
index 64c78cac93f0..000000000000
--- a/wizards/com/sun/star/wizards/common/FileAccess.py
+++ /dev/null
@@ -1,675 +0,0 @@
-import traceback
-from NoValidPathException import *
-from com.sun.star.ucb import CommandAbortedException
-from com.sun.star.awt.VclWindowPeerAttribute import OK, YES_NO
-import types
-from os import path as osPath
-
-'''
-This class delivers static convenience methods
-to use with ucb SimpleFileAccess service.
-You can also instanciate the class, to encapsulate
-some functionality of SimpleFileAccess. The instance
-keeps a reference to an XSimpleFileAccess and an
-XFileIdentifierConverter, saves the permanent
-overhead of quering for those interfaces, and delivers
-conveneince methods for using them.
-These Convenince methods include mainly Exception-handling.
-'''
-
-class FileAccess(object):
- '''
- @param xMSF
- @param sPath
- @param sAddPath
- '''
-
- @classmethod
- def addOfficePath(self, xMSF, sPath, sAddPath):
- xSimpleFileAccess = None
- ResultPath = getOfficePath(xMSF, sPath, xSimpleFileAccess)
- '''
- As there are several conventions about the look of Url
- (e.g. with " " or with "%20") you cannot make a
- simple String comparison to find out, if a path
- is already in "ResultPath
- '''
- PathList = JavaTools.ArrayoutofString(ResultPath, ";")
- MaxIndex = PathList.length - 1
- CompAddPath = JavaTools.replaceSubString(sAddPath, "", "/")
- i = 0
- while i <= MaxIndex:
- CurPath = JavaTools.convertfromURLNotation(PathList[i])
- CompCurPath = JavaTools.replaceSubString(CurPath, "", "/")
- if CompCurPath.equals(CompAddPath):
- return
-
- i += 1
- ResultPath += ";" + sAddPath
- return
-
- @classmethod
- def deleteLastSlashfromUrl(self, _sPath):
- if _sPath.endswith("/"):
- return _sPath[:-1]
- else:
- return _sPath
-
- '''
- Further information on arguments value see in OO Developer Guide,
- chapter 6.2.7
- @param xMSF
- @param sPath
- @param xSimpleFileAccess
- @return the respective path of the office application.
- A probable following "/" at the end is trimmed.
- '''
-
- @classmethod
- def getOfficePath(self, xMSF, sPath, xSimpleFileAccess):
- try:
- ResultPath = ""
- xInterface = xMSF.createInstance("com.sun.star.util.PathSettings")
- ResultPath = str(Helper.getUnoPropertyValue(xInterface, sPath))
- ResultPath = self.deleteLastSlashfromUrl(ResultPath)
- return ResultPath
- except Exception, exception:
- traceback.print_exc()
- return ""
-
- '''
- Further information on arguments value see in OO Developer Guide,
- chapter 6.2.7
- @param xMSF
- @param sPath
- @param sType use "share" or "user". Set to ""
- f not needed eg for the WorkPath;
- In the return Officepath a possible slash at the end is cut off
- @param sSearchDir
- @return
- @throws NoValidPathException
- '''
-
- @classmethod
- def getOfficePath2(self, xMSF, sPath, sType, sSearchDir):
- #This method currently only works with sPath="Template"
- bexists = False
- try:
- xPathInterface = xMSF.createInstance(
- "com.sun.star.util.PathSettings")
- ResultPath = ""
- ReadPaths = ()
- xUcbInterface = xMSF.createInstance(
- "com.sun.star.ucb.SimpleFileAccess")
- Template_writable = xPathInterface.getPropertyValue(
- sPath + "_writable")
- Template_internal = xPathInterface.getPropertyValue(
- sPath + "_internal")
- Template_user = xPathInterface.getPropertyValue(
- sPath + "_user")
- if type(Template_internal) is not types.InstanceType:
- ReadPaths = ReadPaths + Template_internal
- if type(Template_user) is not types.InstanceType:
- ReadPaths = ReadPaths + Template_user
- ReadPaths = ReadPaths + (Template_writable,)
- if sType.lower() == "user":
- ResultPath = Template_writable
- bexists = True
- else:
- #find right path using the search sub path
- for i in ReadPaths:
- tmpPath = i + sSearchDir
- if xUcbInterface.exists(tmpPath):
- ResultPath = i
- bexists = True
- break
-
- ResultPath = self.deleteLastSlashfromUrl(ResultPath)
- except Exception, exception:
- traceback.print_exc()
- ResultPath = ""
-
- if not bexists:
- raise NoValidPathException (xMSF, "");
-
- return ResultPath
-
- @classmethod
- def getOfficePaths(self, xMSF, _sPath, sType, sSearchDir):
- #This method currently only works with sPath="Template"
- aPathList = []
- Template_writable = ""
- try:
- xPathInterface = xMSF.createInstance(
- "com.sun.star.util.PathSettings")
- Template_writable = xPathInterface.getPropertyValue(
- _sPath + "_writable")
- Template_internal = xPathInterface.getPropertyValue(
- _sPath + "_internal")
- Template_user = xPathInterface.getPropertyValue(_sPath + "_user")
- i = 0
- for i in Template_internal:
- if i.startsWith("vnd."):
- # if there exists a language in the directory,
- # we try to add the right language
- sPathToExpand = sPath.substring(len("vnd.sun.star.Expand:"))
- xExpander = Helper.getMacroExpander(xMSF)
- sPath = xExpander.expandMacros(sPathToExpand)
-
- sPath = checkIfLanguagePathExists(xMSF, sPath)
- aPathList.add(sPath)
- i += 1
- i = 0
- while i < Template_user.length:
- aPathList.add(Template_user[i])
- i += 1
- aPathList.add(Template_writable)
-
- except Exception, exception:
- traceback.print_exc()
- return aPathList
-
- @classmethod
- def checkIfLanguagePathExists(self, _xMSF, _sPath):
- try:
- defaults = _xMSF.createInstance("com.sun.star.text.Defaults")
- aLocale = Helper.getUnoStructValue(defaults, "CharLocale")
- if aLocale == None:
- java.util.Locale.getDefault()
- aLocale = com.sun.star.lang.Locale.Locale()
- aLocale.Country = java.util.Locale.getDefault().getCountry()
- aLocale.Language = java.util.Locale.getDefault().getLanguage()
- aLocale.Variant = java.util.Locale.getDefault().getVariant()
-
- sLanguage = aLocale.Language
- sCountry = aLocale.Country
- sVariant = aLocale.Variant
- # de-DE-Bayrisch
- aLocaleAll = StringBuffer.StringBuffer()
- aLocaleAll.append(sLanguage).append('-').append(sCountry).append('-').append(sVariant)
- sPath = _sPath + "/" + aLocaleAll.toString()
- xInterface = _xMSF.createInstance(
- "com.sun.star.ucb.SimpleFileAccess")
- if xInterface.exists(sPath):
- # de-DE
- return sPath
-
- aLocaleLang_Country = StringBuffer.StringBuffer()
- aLocaleLang_Country.append(sLanguage).append('-').append(sCountry)
- sPath = _sPath + "/" + aLocaleLang_Country.toString()
- if xInterface.exists(sPath):
- # de
- return sPath
-
- aLocaleLang = StringBuffer.StringBuffer()
- aLocaleLang.append(sLanguage)
- sPath = _sPath + "/" + aLocaleLang.toString()
- if xInterface.exists(sPath):
- # the absolute default is en-US or en
- return sPath
-
- sPath = _sPath + "/en-US"
- if xInterface.exists(sPath):
- return sPath
-
- sPath = _sPath + "/en"
- if xInterface.exists(sPath):
- return sPath
-
- except com.sun.star.uno.Exception, e:
- pass
-
- return _sPath
-
- @classmethod
- def combinePaths2(self, xMSF, _aFirstPath, _sSecondPath):
- i = 0
- while i < _aFirstPath.size():
- sOnePath = _aFirstPath.get(i)
- sOnePath = addPath(sOnePath, _sSecondPath)
- if isPathValid(xMSF, sOnePath):
- _aFirstPath.add(i, sOnePath)
- _aFirstPath.remove(i + 1)
- else:
- _aFirstPath.remove(i)
- i -= 1
-
- i += 1
-
- @classmethod
- def isPathValid(self, xMSF, _sPath):
- bExists = False
- try:
- xUcbInterface = xMSF.createInstance(
- "com.sun.star.ucb.SimpleFileAccess")
- bExists = xUcbInterface.exists(_sPath)
- except Exception, exception:
- traceback.print_exc()
-
- return bExists
-
- @classmethod
- def combinePaths(self, xMSF, _sFirstPath, _sSecondPath):
- bexists = False
- ReturnPath = ""
- try:
- xUcbInterface = xMSF.createInstance(
- "com.sun.star.ucb.SimpleFileAccess")
- ReturnPath = _sFirstPath + _sSecondPath
- bexists = xUcbInterface.exists(ReturnPath)
- except Exception, exception:
- traceback.print_exc()
- return ""
-
- if not bexists:
- raise NoValidPathException (xMSF, "");
-
- return ReturnPath
-
- @classmethod
- def createSubDirectory(self, xMSF, xSimpleFileAccess, Path):
- sNoDirCreation = ""
- try:
- oResource = Resource.Resource_unknown(xMSF, "ImportWizard", "imp")
- if oResource != None:
- sNoDirCreation = oResource.getResText(1050)
- sMsgDirNotThere = oResource.getResText(1051)
- sQueryForNewCreation = oResource.getResText(1052)
- OSPath = JavaTools.convertfromURLNotation(Path)
- sQueryMessage = JavaTools.replaceSubString(sMsgDirNotThere,
- OSPath, "%1")
- sQueryMessage = sQueryMessage + (char)
- 13 + sQueryForNewCreation
- icreate = SystemDialog.showMessageBox(xMSF, "QueryBox",
- YES_NO, sQueryMessage)
- if icreate == 2:
- xSimpleFileAccess.createFolder(Path)
- return True
-
- return False
- except Exception:
- sMsgNoDir = JavaTools.replaceSubString(sNoDirCreation, Path, "%1")
- SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sMsgNoDir)
- return False
-
- @classmethod
- def getFolderTitles(self, xMSF, FilterName, FolderName):
- LocLayoutFiles = [[2],[]]
- try:
- xDocInterface = xMSF.createInstance(
- "com.sun.star.document.DocumentProperties")
- xInterface = xMSF.createInstance(
- "com.sun.star.ucb.SimpleFileAccess")
- nameList = xInterface.getFolderContents(FolderName, False)
- TitleVector = []
- NameVector = []
- if FilterName is None or FilterName == "":
- FilterName = None
- else:
- FilterName = FilterName + "-"
- fileName = ""
- NameVectorAppend = NameVector.append
- TitleVectorAppend = TitleVector.append
- for i in nameList:
- fileName = self.getFilename(i)
- if FilterName is None or fileName.startswith(FilterName):
- xDocInterface.loadFromMedium(i, tuple())
- NameVectorAppend(i)
- TitleVectorAppend(xDocInterface.Title)
-
- LocLayoutFiles[1] = NameVector
- LocLayoutFiles[0] = TitleVector
-
- except Exception, exception:
- traceback.print_exc()
-
- return self.__bubblesortList(LocLayoutFiles)
-
- '''
- This function bubble sorts an array of with 2 dimensions.
- The default sorting order is the first dimension
- Only if sort2ndValue is True the second dimension is
- the relevant for the sorting order
- '''
-
- @classmethod
- def __bubblesortList(self, SortList):
- SortCount = len(SortList[0])
- DimCount = len(SortList)
- for i in xrange(SortCount):
- for t in xrange(SortCount - i - 1):
- if SortList[0][t] > SortList[0][t + 1]:
- for k in xrange(DimCount):
- DisplayDummy = SortList[k][t];
- SortList[k][t] = SortList[k][t + 1];
- SortList[k][t + 1] = DisplayDummy
- return SortList
- '''
- We search in all given path for a given file
- @param _sPath
- @param _sPath2
- @return
- '''
-
- @classmethod
- def addPath(self, _sPath, _sPath2):
- if not _sPath.endsWith("/"):
- _sPath += "/"
-
- if _sPath2.startsWith("/"):
- _sPath2 = _sPath2.substring(1)
-
- sNewPath = _sPath + _sPath2
- return sNewPath
-
- @classmethod
- def getPathFromList(self, xMSF, _aList, _sFile):
- sFoundFile = ""
- try:
- xInterface = xMSF.createInstance(
- "com.sun.star.ucb.SimpleFileAccess")
- i = 0
- while i < _aList.size():
- sPath = _aList.get(i)
- sPath = addPath(sPath, _sFile)
- if xInterface.exists(sPath):
- sFoundFile = sPath
-
- i += 1
- except Exception, e:
- pass
-
- return sFoundFile
-
- @classmethod
- def getTitle(self, xMSF, _sFile):
- sTitle = ""
- try:
- xDocInterface = xMSF.createInstance(
- "com.sun.star.document.DocumentProperties")
- noArgs = []
- xDocInterface.loadFromMedium(_sFile, noArgs)
- sTitle = xDocInterface.getTitle()
- except Exception, e:
- traceback.print_exc()
-
- return sTitle
-
- def __init__(self, xmsf):
- #get a simple file access...
- self.fileAccess = xmsf.createInstance(
- "com.sun.star.ucb.SimpleFileAccess")
- #get the file identifier converter
- self.filenameConverter = xmsf.createInstance(
- "com.sun.star.ucb.FileContentProvider")
-
- def getURL(self, path, childPath=None):
- try:
- f = open(path, 'w')
-
- r = self.filenameConverter.getFileURLFromSystemPath(path,
- osPath.abspath(path))
- return r
- except Exception:
- traceback.print_exc()
- return None
-
- def getPath(self, parentURL, childURL):
- string = ""
- if childURL is not None and childURL is not "":
- string = "/" + childURL
- return self.filenameConverter.getSystemPathFromFileURL(
- parentURL + string)
-
- '''
- @author rpiterman
- @param filename
- @return the extension of the given filename.
- '''
-
- @classmethod
- def getExtension(self, filename):
- p = filename.indexOf(".")
- if p == -1:
- return ""
- else:
- while p > -1:
- filename = filename.substring(p + 1)
- p = filename.indexOf(".")
-
- return filename
-
- '''
- @author rpiterman
- @param s
- @return
- '''
-
- def mkdir(self, s):
- try:
- self.fileAccess.createFolder(s)
- return True
- except Exception:
- traceback.print_exc()
-
- return False
-
- '''
- @author rpiterman
- @param filename
- @param def what to return in case of an exception
- @return true if the given file exists or not.
- if an exception accures, returns the def value.
- '''
-
- def exists(self, filename, defe):
- try:
- return self.fileAccess.exists(filename)
- except Exception:
- traceback.print_exc()
-
- return defe
-
- '''
- @author rpiterman
- @param filename
- @return
- '''
-
- def isDirectory(self, filename):
- try:
- return self.fileAccess.isFolder(filename)
- except Exception:
- traceback.print_exc()
-
- return False
-
- '''
- lists the files in a given directory
- @author rpiterman
- @param dir
- @param includeFolders
- @return
- '''
-
- def listFiles(self, dir, includeFolders):
- try:
- return self.fileAccess.getFolderContents(dir, includeFolders)
- except Exception:
- traceback.print_exc()
-
- return range(0)
-
- '''
- @author rpiterman
- @param file
- @return
- '''
-
- def delete(self, file):
- try:
- self.fileAccess.kill(file)
- return True
- except Exception:
- traceback.print_exc()
-
- return False
-
-
- '''
- return the filename out of a system-dependent path
- @param path
- @return
- '''
-
- @classmethod
- def getPathFilename(self, path):
- return self.getFilename(path, File.separator)
-
- '''
- @author rpiterman
- @param path
- @param pathSeparator
- @return
- '''
-
- @classmethod
- def getFilename(self, path, pathSeparator = "/"):
- return path.split(pathSeparator)[-1]
-
- @classmethod
- def getBasename(self, path, pathSeparator):
- filename = self.getFilename(path, pathSeparator)
- sExtension = getExtension(filename)
- basename = filename.substring(0, filename.length() - \
- (sExtension.length() + 1))
- return basename
-
- '''
- @author rpiterman
- @param source
- @param target
- @return
- '''
-
- def copy(self, source, target):
- try:
- self.fileAccess.copy(source, target)
- return True
- except Exception:
- traceback.print_exc()
-
- return False
-
- def getLastModified(self, url):
- try:
- return self.fileAccess.getDateTimeModified(url)
- except Exception:
- traceback.print_exc()
-
- return None
-
- '''
- @param url
- @return the parent dir of the given url.
- if the path points to file, gives the directory in which the file is.
- '''
-
- @classmethod
- def getParentDir(self, url):
- while url[-1] == "/":
- url = hello[:-1]
- return url[:url.rfind("/")]
-
- def createNewDir(self, parentDir, name):
- s = self.getNewFile(parentDir, name, "")
- if self.mkdir(s):
- return s
- else:
- return None
-
- def getNewFile(self, parentDir, name, extension):
- i = 0
- temp = True
- while temp:
- filename = self.filename(name, extension, i)
- url = parentDir + "/" + filename
- temp = self.exists(url, True)
- i += 1
- return url
-
- @classmethod
- def filename(self, name, ext, i):
- stringI = ""
- stringExt = ""
- if i != 0:
- stringI = str(i)
- if ext != "":
- stringExt = "." + ext
-
- return name + stringI + stringExt
-
- def getSize(self, url):
- try:
- return self.fileAccess.getSize(url)
- except Exception, ex:
- return -1
-
- @classmethod
- def connectURLs(self, urlFolder, urlFilename):
- stringFolder = ""
- stringFileName = urlFilename
- if not urlFolder.endswith("/"):
- stringFolder = "/"
- if urlFilename.startswith("/"):
- stringFileName = urlFilename[1:]
- return urlFolder + stringFolder + stringFileName
-
- @classmethod
- def getDataFromTextFile(self, _xMSF, _filepath):
- sFileData = None
- try:
- oDataVector = []
- oSimpleFileAccess = _xMSF.createInstance(
- "com.sun.star.ucb.SimpleFileAccess")
- if oSimpleFileAccess.exists(_filepath):
- xInputStream = oSimpleFileAccess.openFileRead(_filepath)
- oTextInputStream = _xMSF.createInstance(
- "com.sun.star.io.TextInputStream")
- oTextInputStream.setInputStream(xInputStream)
- while not oTextInputStream.isEOF():
- oDataVector.addElement(oTextInputStream.readLine())
- oTextInputStream.closeInput()
- sFileData = [oDataVector.size()]
- oDataVector.toArray(sFileData)
-
- except Exception, e:
- traceback.print_exc()
-
- return sFileData
-
- '''
- shortens a filename to a user displayable representation.
- @param path
- @param maxLength
- @return
- '''
-
- @classmethod
- def getShortFilename(self, path, maxLength):
- firstPart = 0
- if path.length() > maxLength:
- if path.startsWith("/"):
- # unix
- nextSlash = path.indexOf("/", 1) + 1
- firstPart = Math.min(nextSlash, (maxLength - 3) / 2)
- else:
- #windows
- firstPart = Math.min(10, (maxLength - 3) / 2)
-
- s1 = path.substring(0, firstPart)
- s2 = path.substring(path.length() - (maxLength - (3 + firstPart)))
- return s1 + "..." + s2
- else:
- return path
-
diff --git a/wizards/com/sun/star/wizards/common/HelpIds.py b/wizards/com/sun/star/wizards/common/HelpIds.py
deleted file mode 100644
index c6bd1b78c2fd..000000000000
--- a/wizards/com/sun/star/wizards/common/HelpIds.py
+++ /dev/null
@@ -1,1012 +0,0 @@
-class HelpIds:
- array1 = [
- "HID:WIZARDS_HID0_WEBWIZARD", # HID:34200
- "HID:WIZARDS_HID0_HELP", # HID:34201
- "HID:WIZARDS_HID0_NEXT", # HID:34202
- "HID:WIZARDS_HID0_PREV", # HID:34203
- "HID:WIZARDS_HID0_CREATE", # HID:34204
- "HID:WIZARDS_HID0_CANCEL", # HID:34205
- "HID:WIZARDS_HID0_STATUS_DIALOG", # HID:34206
- "HID:WIZARDS_HID1_LST_SESSIONS", # HID:34207
- "",
- "HID:WIZARDS_HID1_BTN_DEL_SES", # HID:34209
- "HID:WIZARDS_HID2_LST_DOCS", # HID:34210
- "HID:WIZARDS_HID2_BTN_ADD_DOC", # HID:34211
- "HID:WIZARDS_HID2_BTN_REM_DOC", # HID:34212
- "HID:WIZARDS_HID2_BTN_DOC_UP", # HID:34213
- "HID:WIZARDS_HID2_BTN_DOC_DOWN", # HID:34214
- "HID:WIZARDS_HID2_TXT_DOC_TITLE", # HID:34215
- "HID:WIZARDS_HID2_TXT_DOC_DESC", # HID:34216
- "HID:WIZARDS_HID2_TXT_DOC_AUTHOR", # HID:34217
- "HID:WIZARDS_HID2_LST_DOC_EXPORT", # HID:34218
- "HID:WIZARDS_HID2_STATUS_ADD_DOCS", # HID:34219
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG1", # HID:34220
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG2", # HID:34221
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG3", # HID:34222
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG4", # HID:34223
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG5", # HID:34224
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG6", # HID:34225
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG7", # HID:34226
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG8", # HID:34227
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG9", # HID:34228
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG10", # HID:34229
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG11", # HID:34230
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG12", # HID:34231
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG13", # HID:34232
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG14", # HID:34233
- "HID:WIZARDS_HID3_IL_LAYOUTS_IMG15", # HID:34234
- "HID:WIZARDS_HID4_CHK_DISPLAY_FILENAME", # HID:34235
- "HID:WIZARDS_HID4_CHK_DISPLAY_DESCRIPTION", # HID:34236
- "HID:WIZARDS_HID4_CHK_DISPLAY_AUTHOR", # HID:34237
- "HID:WIZARDS_HID4_CHK_DISPLAY_CR_DATE", # HID:34238
- "HID:WIZARDS_HID4_CHK_DISPLAY_UP_DATE", # HID:34239
- "HID:WIZARDS_HID4_CHK_DISPLAY_FORMAT", # HID:34240
- "HID:WIZARDS_HID4_CHK_DISPLAY_F_ICON", # HID:34241
- "HID:WIZARDS_HID4_CHK_DISPLAY_PAGES", # HID:34242
- "HID:WIZARDS_HID4_CHK_DISPLAY_SIZE", # HID:34243
- "HID:WIZARDS_HID4_GRP_OPTIMAIZE_640", # HID:34244
- "HID:WIZARDS_HID4_GRP_OPTIMAIZE_800", # HID:34245
- "HID:WIZARDS_HID4_GRP_OPTIMAIZE_1024", # HID:34246
- "HID:WIZARDS_HID5_LST_STYLES", # HID:34247
- "HID:WIZARDS_HID5_BTN_BACKGND", # HID:34248
- "HID:WIZARDS_HID5_BTN_ICONS", # HID:34249
- "HID:WIZARDS_HID6_TXT_SITE_TITLE", # HID:34250
- "",
- "",
- "HID:WIZARDS_HID6_TXT_SITE_DESC", # HID:34253
- "",
- "HID:WIZARDS_HID6_DATE_SITE_CREATED", # HID:34255
- "HID:WIZARDS_HID6_DATE_SITE_UPDATED", # HID:34256
- "",
- "HID:WIZARDS_HID6_TXT_SITE_EMAIL", # HID:34258
- "HID:WIZARDS_HID6_TXT_SITE_COPYRIGHT", # HID:34259
- "HID:WIZARDS_HID7_BTN_PREVIEW", # HID:34260
- "HID:WIZARDS_HID7_CHK_PUBLISH_LOCAL", # HID:34261
- "HID:WIZARDS_HID7_TXT_LOCAL", # HID:34262
- "HID:WIZARDS_HID7_BTN_LOCAL", # HID:34263
- "HID:WIZARDS_HID7_CHK_PUBLISH_ZIP", # HID:34264
- "HID:WIZARDS_HID7_TXT_ZIP", # HID:34265
- "HID:WIZARDS_HID7_BTN_ZIP", # HID:34266
- "HID:WIZARDS_HID7_CHK_PUBLISH_FTP", # HID:34267
- "HID:WIZARDS_HID7_TXT_FTP", # HID:34268
- "HID:WIZARDS_HID7_BTN_FTP", # HID:34269
- "HID:WIZARDS_HID7_CHK_SAVE", # HID:34270
- "HID:WIZARDS_HID7_TXT_SAVE", # HID:34271
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_BG", # HID:34290
- "HID:WIZARDS_HID_BG_BTN_OTHER", # HID:34291
- "HID:WIZARDS_HID_BG_BTN_NONE", # HID:34292
- "HID:WIZARDS_HID_BG_BTN_OK", # HID:34293
- "HID:WIZARDS_HID_BG_BTN_CANCEL", # HID:34294
- "HID:WIZARDS_HID_BG_BTN_BACK", # HID:34295
- "HID:WIZARDS_HID_BG_BTN_FW", # HID:34296
- "HID:WIZARDS_HID_BG_BTN_IMG1", # HID:34297
- "HID:WIZARDS_HID_BG_BTN_IMG2", # HID:34298
- "HID:WIZARDS_HID_BG_BTN_IMG3", # HID:34299
- "HID:WIZARDS_HID_BG_BTN_IMG4", # HID:34300
- "HID:WIZARDS_HID_BG_BTN_IMG5", # HID:34301
- "HID:WIZARDS_HID_BG_BTN_IMG6", # HID:34302
- "HID:WIZARDS_HID_BG_BTN_IMG7", # HID:34303
- "HID:WIZARDS_HID_BG_BTN_IMG8", # HID:34304
- "HID:WIZARDS_HID_BG_BTN_IMG9", # HID:34305
- "HID:WIZARDS_HID_BG_BTN_IMG10", # HID:34306
- "HID:WIZARDS_HID_BG_BTN_IMG11", # HID:34307
- "HID:WIZARDS_HID_BG_BTN_IMG12", # HID:34308
- "HID:WIZARDS_HID_BG_BTN_IMG13", # HID:34309
- "HID:WIZARDS_HID_BG_BTN_IMG14", # HID:34300
- "HID:WIZARDS_HID_BG_BTN_IMG15", # HID:34311
- "HID:WIZARDS_HID_BG_BTN_IMG16", # HID:34312
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGREPORT_DIALOG", # HID:34320
- "",
- "HID:WIZARDS_HID_DLGREPORT_0_CMDPREV", # HID:34322
- "HID:WIZARDS_HID_DLGREPORT_0_CMDNEXT", # HID:34323
- "HID:WIZARDS_HID_DLGREPORT_0_CMDFINISH", # HID:34324
- "HID:WIZARDS_HID_DLGREPORT_0_CMDCANCEL", # HID:34325
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGREPORT_1_LBTABLES", # HID:34330
- "HID:WIZARDS_HID_DLGREPORT_1_FIELDSAVAILABLE", # HID:34331
- "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVESELECTED", # HID:34332
- "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEALL", # HID:34333
- "HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVESELECTED", # HID:34334
- "HID:WIZARDS_HID_DLGREPORT_1_CMDREMOVEALL", # HID:34335
- "HID:WIZARDS_HID_DLGREPORT_1_FIELDSSELECTED", # HID:34336
- "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEUP", # HID:34337
- "HID:WIZARDS_HID_DLGREPORT_1_CMDMOVEDOWN", # HID:34338
- "",
- "HID:WIZARDS_HID_DLGREPORT_2_GROUPING", # HID:34340
- "HID:WIZARDS_HID_DLGREPORT_2_CMDGROUP", # HID:34341
- "HID:WIZARDS_HID_DLGREPORT_2_CMDUNGROUP", # HID:34342
- "HID:WIZARDS_HID_DLGREPORT_2_PREGROUPINGDEST", # HID:34343
- "HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEUPGROUP", # HID:34344
- "HID:WIZARDS_HID_DLGREPORT_2_CMDMOVEDOWNGROUP", # HID:34345
- "HID:WIZARDS_HID_DLGREPORT_3_SORT1", # HID:34346
- "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND1", # HID:34347
- "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND1", # HID:34348
- "HID:WIZARDS_HID_DLGREPORT_3_SORT2", # HID:34349
- "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND2", # HID:34350
- "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND2", # HID:34351
- "HID:WIZARDS_HID_DLGREPORT_3_SORT3", # HID:34352
- "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND3", # HID:34353
- "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND3", # HID:34354
- "HID:WIZARDS_HID_DLGREPORT_3_SORT4", # HID:34355
- "HID:WIZARDS_HID_DLGREPORT_3_OPTASCEND4", # HID:34356
- "HID:WIZARDS_HID_DLGREPORT_3_OPTDESCEND4", # HID:34357
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGREPORT_4_TITLE", # HID:34362
- "HID:WIZARDS_HID_DLGREPORT_4_DATALAYOUT", # HID:34363
- "HID:WIZARDS_HID_DLGREPORT_4_PAGELAYOUT", # HID:34364
- "HID:WIZARDS_HID_DLGREPORT_4_LANDSCAPE", # HID:34365
- "HID:WIZARDS_HID_DLGREPORT_4_PORTRAIT", # HID:34366
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGREPORT_5_OPTDYNTEMPLATE", # HID:34370
- "HID:WIZARDS_HID_DLGREPORT_5_OPTSTATDOCUMENT", # HID:34371
- "HID:WIZARDS_HID_DLGREPORT_5_TXTTEMPLATEPATH", # HID:34372
- "HID:WIZARDS_HID_DLGREPORT_5_CMDTEMPLATEPATH", # HID:34373
- "HID:WIZARDS_HID_DLGREPORT_5_OPTEDITTEMPLATE", # HID:34374
- "HID:WIZARDS_HID_DLGREPORT_5_OPTUSETEMPLATE", # HID:34375
- "HID:WIZARDS_HID_DLGREPORT_5_TXTDOCUMENTPATH", # HID:34376
- "HID:WIZARDS_HID_DLGREPORT_5_CMDDOCUMENTPATH", # HID:34377
- "HID:WIZARDS_HID_DLGREPORT_5_CHKLINKTODB", # HID:34378
- "",
- "",
- "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_1", # HID:34381
- "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_2", # HID:34382
- "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_3", # HID:34383
- "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_4", # HID:34384
- "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_5", # HID:34385
- "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_6", # HID:34386
- "HID:WIZARDS_HID_DLGREPORT_6_TXTTITLE_7", # HID:34387
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGFORM_DIALOG", # HID:34400
- "",
- "HID:WIZARDS_HID_DLGFORM_CMDPREV", # HID:34402
- "HID:WIZARDS_HID_DLGFORM_CMDNEXT", # HID:34403
- "HID:WIZARDS_HID_DLGFORM_CMDFINISH", # HID:34404
- "HID:WIZARDS_HID_DLGFORM_CMDCANCEL", # HID:34405
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGFORM_MASTER_LBTABLES", # HID:34411
- "HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSAVAILABLE", # HID:34412
- "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVESELECTED", # HID:34413
- "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEALL", # HID:34414
- "HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVESELECTED", # HID:34415
- "HID:WIZARDS_HID_DLGFORM_MASTER_CMDREMOVEALL", # HID:34416
- "HID:WIZARDS_HID_DLGFORM_MASTER_FIELDSSELECTED", # HID:34417
- "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEUP", # HID:34418
- "HID:WIZARDS_HID_DLGFORM_MASTER_CMDMOVEDOWN", # HID:34419
- "",
- "HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM", # HID:34421
- "HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION", # HID:34422
- "HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY", # HID:34423
- "HID:WIZARDS_HID_DLGFORM_lstRELATIONS", # HID:34424
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGFORM_SUB_LBTABLES", # HID:34431
- "HID:WIZARDS_HID_DLGFORM_SUB_FIELDSAVAILABLE", # HID:34432
- "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVESELECTED", # HID:34433
- "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEALL", # HID:34434
- "HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVESELECTED", # HID:34435
- "HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVEALL", # HID:34436
- "HID:WIZARDS_HID_DLGFORM_SUB_FIELDSSELECTED", # HID:34437
- "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEUP", # HID:34438
- "HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEDOWN", # HID:34439
- "",
- "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK1", # HID:34441
- "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK1", # HID:34442
- "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK2", # HID:34443
- "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK2", # HID:34444
- "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK3", # HID:34445
- "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK3", # HID:34446
- "HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK4", # HID:34447
- "HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK4", # HID:34448
- "",
- "",
- "HID:WIZARDS_HID_DLGFORM_CMDALIGNLEFT", # HID:34451
- "HID:WIZARDS_HID_DLGFORM_CMDALIGNRIGHT", # HID:34452
- "HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED", # HID:34453
- "HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED", # HID:34454
- "HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE", # HID:34455
- "HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED", # HID:34456
- "HID:WIZARDS_HID_DLGFORM_CMDLEFTLABELED2", # HID:34457
- "HID:WIZARDS_HID_DLGFORM_CMDTOPLABELED2", # HID:34458
- "HID:WIZARDS_HID_DLGFORM_CMDTABLESTYLE2", # HID:34459
- "HID:WIZARDS_HID_DLGFORM_CMDTOPJUSTIFIED2", # HID:34460
- "HID:WIZARDS_HID_DLGFORM_OPTNEWDATAONLY", # HID:34461
- "HID:WIZARDS_HID_DLGFORM_OPTDISPLAYALLDATA", # HID:34462
- "HID:WIZARDS_HID_DLGFORM_CHKNOMODIFICATION", # HID:34463
- "HID:WIZARDS_HID_DLGFORM_CHKNODELETION", # HID:34464
- "HID:WIZARDS_HID_DLGFORM_CHKNOADDITION", # HID:34465
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGFORM_LSTSTYLES", # HID:34471
- "HID:WIZARDS_HID_DLGFORM_CMDNOBORDER", # HID:34472
- "HID:WIZARDS_HID_DLGFORM_CMD3DBORDER", # HID:34473
- "HID:WIZARDS_HID_DLGFORM_CMDSIMPLEBORDER", # HID:34474
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGFORM_TXTPATH", # HID:34481
- "HID:WIZARDS_HID_DLGFORM_OPTWORKWITHFORM", # HID:34482
- "HID:WIZARDS_HID_DLGFORM_OPTMODIFYFORM", # HID:34483
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGNEWSLTR_DIALOG", # HID:34500
- "HID:WIZARDS_HID_DLGNEWSLTR_OPTSTANDARDLAYOUT", # HID:34501
- "HID:WIZARDS_HID_DLGNEWSLTR_OPTPARTYLAYOUT", # HID:34502
- "HID:WIZARDS_HID_DLGNEWSLTR_OPTBROCHURELAYOUT", # HID:34503
- "HID:WIZARDS_HID_DLGNEWSLTR_OPTSINGLESIDED", # HID:34504
- "HID:WIZARDS_HID_DLGNEWSLTR_OPTDOUBLESIDED", # HID:34505
- "HID:WIZARDS_HID_DLGNEWSLTR_CMDGOON", # HID:34506
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGDEPOT_DIALOG_SELLBUY", # HID:34520
- "HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SELLBUY", # HID:34521
- "HID:WIZARDS_HID_DLGDEPOT_0_TXTQUANTITY", # HID:34522
- "HID:WIZARDS_HID_DLGDEPOT_0_TXTRATE", # HID:34523
- "HID:WIZARDS_HID_DLGDEPOT_0_TXTDATE", # HID:34524
- "HID:WIZARDS_HID_DLGDEPOT_0_TXTCOMMISSION", # HID:34525
- "HID:WIZARDS_HID_DLGDEPOT_0_TXTFIX", # HID:34526
- "HID:WIZARDS_HID_DLGDEPOT_0_TXTMINIMUM", # HID:34527
- "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SELLBUY", # HID:34528
- "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SELLBUY", # HID:34529
- "HID:WIZARDS_HID_DLGDEPOT_1_LSTSELLSTOCKS", # HID:34530
- "HID:WIZARDS_HID_DLGDEPOT_2_LSTBUYSTOCKS", # HID:34531
- "HID:WIZARDS_HID_DLGDEPOT_DIALOG_SPLIT", # HID:34532
- "HID:WIZARDS_HID_DLGDEPOT_0_LSTSTOCKNAMES", # HID:34533
- "HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SPLIT", # HID:34534
- "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SPLIT", # HID:34535
- "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SPLIT", # HID:34536
- "HID:WIZARDS_HID_DLGDEPOT_1_OPTPERSHARE", # HID:34537
- "HID:WIZARDS_HID_DLGDEPOT_1_OPTTOTAL", # HID:34538
- "HID:WIZARDS_HID_DLGDEPOT_1_TXTDIVIDEND", # HID:34539
- "HID:WIZARDS_HID_DLGDEPOT_2_TXTOLDRATE", # HID:34540
- "HID:WIZARDS_HID_DLGDEPOT_2_TXTNEWRATE", # HID:34541
- "HID:WIZARDS_HID_DLGDEPOT_2_TXTDATE", # HID:34542
- "HID:WIZARDS_HID_DLGDEPOT_3_TXTSTARTDATE", # HID:34543
- "HID:WIZARDS_HID_DLGDEPOT_3_TXTENDDATE", # HID:34544
- "HID:WIZARDS_HID_DLGDEPOT_3_OPTDAILY", # HID:34545
- "HID:WIZARDS_HID_DLGDEPOT_3_OPTWEEKLY", # HID:34546
- "HID:WIZARDS_HID_DLGDEPOT_DIALOG_HISTORY", # HID:34547
- "HID:WIZARDS_HID_DLGDEPOT_LSTMARKETS", # HID:34548
- "HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_HISTORY", # HID:34549
- "HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_HISTORY", # HID:34550
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGIMPORT_DIALOG", # HID:34570
- "HID:WIZARDS_HID_DLGIMPORT_0_CMDHELP", # HID:34571
- "HID:WIZARDS_HID_DLGIMPORT_0_CMDCANCEL", # HID:34572
- "HID:WIZARDS_HID_DLGIMPORT_0_CMDPREV", # HID:34573
- "HID:WIZARDS_HID_DLGIMPORT_0_CMDNEXT", # HID:34574
- "HID:WIZARDS_HID_DLGIMPORT_0_OPTSODOCUMENTS", # HID:34575
- "HID:WIZARDS_HID_DLGIMPORT_0_OPTMSDOCUMENTS", # HID:34576
- "HID:WIZARDS_HID_DLGIMPORT_0_CHKLOGFILE", # HID:34577
- "HID:WIZARDS_HID_DLGIMPORT_2_CHKWORD", # HID:34578
- "HID:WIZARDS_HID_DLGIMPORT_2_CHKEXCEL", # HID:34579
- "HID:WIZARDS_HID_DLGIMPORT_2_CHKPOWERPOINT", # HID:34580
- "HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATE", # HID:34581
- "HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATERECURSE", # HID:34582
- "HID:WIZARDS_HID_DLGIMPORT_2_LBTEMPLATEPATH", # HID:34583
- "HID:WIZARDS_HID_DLGIMPORT_2_EDTEMPLATEPATH", # HID:34584
- "HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT", # HID:34585
- "HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENT", # HID:34586
- "HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENTRECURSE", # HID:34587
- "HID:WIZARDS_HID_DLGIMPORT_2_LBDOCUMENTPATH", # HID:34588
- "HID:WIZARDS_HID_DLGIMPORT_2_EDDOCUMENTPATH", # HID:34589
- "HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT", # HID:34590
- "HID:WIZARDS_HID_DLGIMPORT_2_LBEXPORTDOCUMENTPATH", # HID:34591
- "HID:WIZARDS_HID_DLGIMPORT_2_EDEXPORTDOCUMENTPATH", # HID:34592
- "HID:WIZARDS_HID_DLGIMPORT_2_CMDEXPORTPATHSELECT", # HID:34593
- "",
- "HID:WIZARDS_HID_DLGIMPORT_3_TBSUMMARY", # HID:34595
- "HID:WIZARDS_HID_DLGIMPORT_0_CHKWRITER", # HID:34596
- "HID:WIZARDS_HID_DLGIMPORT_0_CHKCALC", # HID:34597
- "HID:WIZARDS_HID_DLGIMPORT_0_CHKIMPRESS", # HID:34598
- "HID:WIZARDS_HID_DLGIMPORT_0_CHKMATHGLOBAL", # HID:34599
- "HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT2", # HID:34600
- "HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT2", # HID:34601
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGCORRESPONDENCE_DIALOG", # HID:34630
- "HID:WIZARDS_HID_DLGCORRESPONDENCE_CANCEL", # HID:34631
- "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA1", # HID:34632
- "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA2", # HID:34633
- "HID:WIZARDS_HID_DLGCORRESPONDENCE_AGENDAOKAY", # HID:34634
- "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER1", # HID:34635
- "HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER2", # HID:34636
- "HID:WIZARDS_HID_DLGCORRESPONDENCE_LETTEROKAY", # HID:34637
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGSTYLES_DIALOG", # HID:34650
- "HID:WIZARDS_HID_DLGSTYLES_LISTBOX", # HID:34651
- "HID:WIZARDS_HID_DLGSTYLES_CANCEL", # HID:34652
- "HID:WIZARDS_HID_DLGSTYLES_OKAY", # HID:34653
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGCONVERT_DIALOG", # HID:34660
- "HID:WIZARDS_HID_DLGCONVERT_CHECKBOX1", # HID:34661
- "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON1", # HID:34662
- "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON2", # HID:34663
- "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON3", # HID:34664
- "HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON4", # HID:34665
- "HID:WIZARDS_HID_DLGCONVERT_LISTBOX1", # HID:34666
- "HID:WIZARDS_HID_DLGCONVERT_OBFILE", # HID:34667
- "HID:WIZARDS_HID_DLGCONVERT_OBDIR", # HID:34668
- "HID:WIZARDS_HID_DLGCONVERT_COMBOBOX1", # HID:34669
- "HID:WIZARDS_HID_DLGCONVERT_TBSOURCE", # HID:34670
- "HID:WIZARDS_HID_DLGCONVERT_CHECKRECURSIVE", # HID:34671
- "HID:WIZARDS_HID_DLGCONVERT_TBTARGET", # HID:34672
- "HID:WIZARDS_HID_DLGCONVERT_CBCANCEL", # HID:34673
- "HID:WIZARDS_HID_DLGCONVERT_CBHELP", # HID:34674
- "HID:WIZARDS_HID_DLGCONVERT_CBBACK", # HID:34675
- "HID:WIZARDS_HID_DLGCONVERT_CBGOON", # HID:34676
- "HID:WIZARDS_HID_DLGCONVERT_CBSOURCEOPEN", # HID:34677
- "HID:WIZARDS_HID_DLGCONVERT_CBTARGETOPEN", # HID:34678
- "HID:WIZARDS_HID_DLGCONVERT_CHKPROTECT", # HID:34679
- "HID:WIZARDS_HID_DLGCONVERT_CHKTEXTDOCUMENTS", # HID:34680
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGPASSWORD_CMDGOON", # HID:34690
- "HID:WIZARDS_HID_DLGPASSWORD_CMDCANCEL", # HID:34691
- "HID:WIZARDS_HID_DLGPASSWORD_CMDHELP", # HID:34692
- "HID:WIZARDS_HID_DLGPASSWORD_TXTPASSWORD", # HID:34693
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_DIALOG", # HID:34700
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_PREVIEW", # HID:34701
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPYEAR", # HID:34702
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPMONTH", # HID:34703
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDYEAR", # HID:34704
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDMONTH", # HID:34705
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINYEAR", # HID:34706
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_SPINMONTH", # HID:34707
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_1_CMBSTATE", # HID:34708
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_LBOWNDATA", # HID:34709
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDINSERT", # HID:34710
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDDELETE", # HID:34711
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENT", # HID:34712
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CHKEVENT", # HID:34713
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTDAY", # HID:34714
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTDAY", # HID:34715
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTMONTH", # HID:34716
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTMONTH", # HID:34717
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTYEAR", # HID:34718
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_2_SPINEVENTYEAR", # HID:34719
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOWNDATA", # HID:34720
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDCANCEL", # HID:34721
- "HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOK" # HID:34722
- ]
- array2 = ["HID:WIZARDS_HID_LTRWIZ_OPTBUSINESSLETTER", # HID:40769
- "HID:WIZARDS_HID_LTRWIZ_OPTPRIVOFFICIALLETTER", # HID:40770
- "HID:WIZARDS_HID_LTRWIZ_OPTPRIVATELETTER", # HID:40771
- "HID:WIZARDS_HID_LTRWIZ_LSTBUSINESSSTYLE", # HID:40772
- "HID:WIZARDS_HID_LTRWIZ_CHKBUSINESSPAPER", # HID:40773
- "HID:WIZARDS_HID_LTRWIZ_LSTPRIVOFFICIALSTYLE", # HID:40774
- "HID:WIZARDS_HID_LTRWIZ_LSTPRIVATESTYLE", # HID:40775
- "HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYLOGO", # HID:40776
- "HID:WIZARDS_HID_LTRWIZ_NUMLOGOHEIGHT", # HID:40777
- "HID:WIZARDS_HID_LTRWIZ_NUMLOGOX", # HID:40778
- "HID:WIZARDS_HID_LTRWIZ_NUMLOGOWIDTH", # HID:40779
- "HID:WIZARDS_HID_LTRWIZ_NUMLOGOY", # HID:40780
- "HID:WIZARDS_HID_LTRWIZ_CHKPAPERCOMPANYADDRESS", # HID:40781
- "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSHEIGHT", # HID:40782
- "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSX", # HID:40783
- "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSWIDTH", # HID:40784
- "HID:WIZARDS_HID_LTRWIZ_NUMADDRESSY", # HID:40785
- "HID:WIZARDS_HID_LTRWIZ_CHKCOMPANYRECEIVER", # HID:40786
- "HID:WIZARDS_HID_LTRWIZ_CHKPAPERFOOTER", # HID:40787
- "HID:WIZARDS_HID_LTRWIZ_NUMFOOTERHEIGHT", # HID:40788
- "HID:WIZARDS_HID_LTRWIZ_LSTLETTERNORM", # HID:40789
- "HID:WIZARDS_HID_LTRWIZ_CHKUSELOGO", # HID:40790
- "HID:WIZARDS_HID_LTRWIZ_CHKUSEADDRESSRECEIVER", # HID:40791
- "HID:WIZARDS_HID_LTRWIZ_CHKUSESIGNS", # HID:40792
- "HID:WIZARDS_HID_LTRWIZ_CHKUSESUBJECT", # HID:40793
- "HID:WIZARDS_HID_LTRWIZ_CHKUSESALUTATION", # HID:40794
- "HID:WIZARDS_HID_LTRWIZ_LSTSALUTATION", # HID:40795
- "HID:WIZARDS_HID_LTRWIZ_CHKUSEBENDMARKS", # HID:40796
- "HID:WIZARDS_HID_LTRWIZ_CHKUSEGREETING", # HID:40797
- "HID:WIZARDS_HID_LTRWIZ_LSTGREETING", # HID:40798
- "HID:WIZARDS_HID_LTRWIZ_CHKUSEFOOTER", # HID:40799
- "HID:WIZARDS_HID_LTRWIZ_OPTSENDERPLACEHOLDER", # HID:40800
- "HID:WIZARDS_HID_LTRWIZ_OPTSENDERDEFINE", # HID:40801
- "HID:WIZARDS_HID_LTRWIZ_TXTSENDERNAME", # HID:40802
- "HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTREET", # HID:40803
- "HID:WIZARDS_HID_LTRWIZ_TXTSENDERPOSTCODE", # HID:40804
- "HID:WIZARDS_HID_LTRWIZ_TXTSENDERSTATE_TEXT", # HID:40805
- "HID:WIZARDS_HID_LTRWIZ_TXTSENDERCITY", # HID:40806
- "HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERPLACEHOLDER", # HID:40807
- "HID:WIZARDS_HID_LTRWIZ_OPTRECEIVERDATABASE", # HID:40808
- "HID:WIZARDS_HID_LTRWIZ_TXTFOOTER", # HID:40809
- "HID:WIZARDS_HID_LTRWIZ_CHKFOOTERNEXTPAGES", # HID:40810
- "HID:WIZARDS_HID_LTRWIZ_CHKFOOTERPAGENUMBERS", # HID:40811
- "HID:WIZARDS_HID_LTRWIZ_TXTTEMPLATENAME", # HID:40812
- "HID:WIZARDS_HID_LTRWIZ_OPTCREATELETTER", # HID:40813
- "HID:WIZARDS_HID_LTRWIZ_OPTMAKECHANGES", # HID:40814
- "HID:WIZARDS_HID_LTRWIZ_TXTPATH", # HID:40815
- "HID:WIZARDS_HID_LTRWIZ_CMDPATH", # HID:40816
- "",
- "",
- "",
- "HID:WIZARDS_HID_LTRWIZARD", # HID:40820
- "HID:WIZARDS_HID_LTRWIZARD_HELP", # HID:40821
- "HID:WIZARDS_HID_LTRWIZARD_BACK", # HID:40822
- "HID:WIZARDS_HID_LTRWIZARD_NEXT", # HID:40823
- "HID:WIZARDS_HID_LTRWIZARD_CREATE", # HID:40824
- "HID:WIZARDS_HID_LTRWIZARD_CANCEL", # HID:40825
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_QUERYWIZARD_LSTTABLES", # HID:40850
- "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDS", # HID:40851
- "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVESELECTED", # HID:40852
- "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEALL", # HID:40853
- "HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVESELECTED", # HID:40854
- "HID:WIZARDS_HID_QUERYWIZARD_CMDREMOVEALL", # HID:40855
- "HID:WIZARDS_HID_QUERYWIZARD_LSTSELFIELDS", # HID:40856
- "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEUP", # HID:40857
- "HID:WIZARDS_HID_QUERYWIZARD_CMDMOVEDOWN", # HID:40858
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_QUERYWIZARD_SORT1", # HID:40865
- "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND1", # HID:40866
- "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND1", # HID:40867
- "HID:WIZARDS_HID_QUERYWIZARD_SORT2", # HID:40868
- "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND2", # HID:40869
- "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND2", # HID:40870
- "HID:WIZARDS_HID_QUERYWIZARD_SORT3", # HID:40871
- "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND3", # HID:40872
- "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND3", # HID:40873
- "HID:WIZARDS_HID_QUERYWIZARD_SORT4", # HID:40874
- "HID:WIZARDS_HID_QUERYWIZARD_OPTASCEND4", # HID:40875
- "HID:WIZARDS_HID_QUERYWIZARD_OPTDESCEND4", # HID:40876
- "",
- "HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHALL", # HID:40878
- "HID:WIZARDS_HID_QUERYWIZARD_OPTMATCHANY", # HID:40879
- "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_1", # HID:40880
- "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_1", # HID:40881
- "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_1", # HID:40882
- "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_2", # HID:40883
- "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_2", # HID:40884
- "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_2", # HID:40885
- "HID:WIZARDS_HID_QUERYWIZARD_LSTFIELDNAME_3", # HID:40886
- "HID:WIZARDS_HID_QUERYWIZARD_LSTOPERATOR_3", # HID:40887
- "HID:WIZARDS_HID_QUERYWIZARD_TXTVALUE_3", # HID:40888
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATEDETAILQUERY", # HID:40895
- "HID:WIZARDS_HID_QUERYWIZARD_OPTAGGREGATESUMMARYQUERY", # HID:40896
- "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_1", # HID:40897
- "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_1", # HID:40898
- "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_2", # HID:40899
- "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_2", # HID:40900
- "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_3", # HID:40901
- "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_3", # HID:40902
- "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_4", # HID:40903
- "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_4", # HID:40904
- "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFUNCTION_5", # HID:40905
- "HID:WIZARDS_HID_QUERYWIZARD_LSTAGGREGATEFIELDS_5", # HID:40906
- "HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEPLUS", # HID:40907
- "HID:WIZARDS_HID_QUERYWIZARD_BTNAGGREGATEMINUS", # HID:40908
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDS", # HID:40915
- "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVESELECTED", # HID:40916
- "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERREMOVESELECTED", # HID:40917
- "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERSELFIELDS", # HID:40918
- "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEUP", # HID:40919
- "HID:WIZARDS_HID_QUERYWIZARD_CMDFILTERMOVEDOWN", # HID:40920
- "",
- "",
- "HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHALL", # HID:40923
- "HID:WIZARDS_HID_QUERYWIZARD_OPTGROUPMATCHANY", # HID:40924
- "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_1", # HID:40925
- "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_1", # HID:40926
- "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_1", # HID:40927
- "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_2", # HID:40928
- "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_2", # HID:40929
- "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_2", # HID:40930
- "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTERFIELDNAME_3", # HID:40931
- "HID:WIZARDS_HID_QUERYWIZARD_LSTFILTEROPERATOR_3", # HID:40932
- "HID:WIZARDS_HID_QUERYWIZARD_TXTFILTERVALUE_3", # HID:40933
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_1", # HID:40940
- "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_2", # HID:40941
- "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_3", # HID:40942
- "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_4", # HID:40943
- "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_5", # HID:40944
- "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_6", # HID:40945
- "HID:WIZARDS_HID_QUERYWIZARD_TXTTITLE_7", # HID:40946
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_QUERYWIZARD_TXTQUERYTITLE", # HID:40955
- "HID:WIZARDS_HID_QUERYWIZARD_OPTDISPLAYQUERY", # HID:40956
- "HID:WIZARDS_HID_QUERYWIZARD_OPTMODIFYQUERY", # HID:40957
- "HID:WIZARDS_HID_QUERYWIZARD_TXTSUMMARY", # HID:40958
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_QUERYWIZARD", # HID:40970
- "",
- "HID:WIZARDS_HID_QUERYWIZARD_BACK", # HID:40972
- "HID:WIZARDS_HID_QUERYWIZARD_NEXT", # HID:40973
- "HID:WIZARDS_HID_QUERYWIZARD_CREATE", # HID:40974
- "HID:WIZARDS_HID_QUERYWIZARD_CANCEL", # HID:40975
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_IS", # HID:41000
- "", "HID:WIZARDS_HID_IS_BTN_NONE", # HID:41002
- "HID:WIZARDS_HID_IS_BTN_OK", # HID:41003
- "HID:WIZARDS_HID_IS_BTN_CANCEL", # HID:41004
- "HID:WIZARDS_HID_IS_BTN_IMG1", # HID:41005
- "HID:WIZARDS_HID_IS_BTN_IMG2", # HID:41006
- "HID:WIZARDS_HID_IS_BTN_IMG3", # HID:41007
- "HID:WIZARDS_HID_IS_BTN_IMG4", # HID:41008
- "HID:WIZARDS_HID_IS_BTN_IMG5", # HID:41009
- "HID:WIZARDS_HID_IS_BTN_IMG6", # HID:41010
- "HID:WIZARDS_HID_IS_BTN_IMG7", # HID:41011
- "HID:WIZARDS_HID_IS_BTN_IMG8", # HID:41012
- "HID:WIZARDS_HID_IS_BTN_IMG9", # HID:41013
- "HID:WIZARDS_HID_IS_BTN_IMG10", # HID:41014
- "HID:WIZARDS_HID_IS_BTN_IMG11", # HID:41015
- "HID:WIZARDS_HID_IS_BTN_IMG12", # HID:41016
- "HID:WIZARDS_HID_IS_BTN_IMG13", # HID:41017
- "HID:WIZARDS_HID_IS_BTN_IMG14", # HID:41018
- "HID:WIZARDS_HID_IS_BTN_IMG15", # HID:41019
- "HID:WIZARDS_HID_IS_BTN_IMG16", # HID:41020
- "HID:WIZARDS_HID_IS_BTN_IMG17", # HID:41021
- "HID:WIZARDS_HID_IS_BTN_IMG18", # HID:41022
- "HID:WIZARDS_HID_IS_BTN_IMG19", # HID:41023
- "HID:WIZARDS_HID_IS_BTN_IMG20", # HID:41024
- "HID:WIZARDS_HID_IS_BTN_IMG21", # HID:41025
- "HID:WIZARDS_HID_IS_BTN_IMG22", # HID:41026
- "HID:WIZARDS_HID_IS_BTN_IMG23", # HID:41027
- "HID:WIZARDS_HID_IS_BTN_IMG24", # HID:41028
- "HID:WIZARDS_HID_IS_BTN_IMG25", # HID:41029
- "HID:WIZARDS_HID_IS_BTN_IMG26", # HID:41030
- "HID:WIZARDS_HID_IS_BTN_IMG27", # HID:41031
- "HID:WIZARDS_HID_IS_BTN_IMG28", # HID:41032
- "HID:WIZARDS_HID_IS_BTN_IMG29", # HID:41033
- "HID:WIZARDS_HID_IS_BTN_IMG30", # HID:41034
- "HID:WIZARDS_HID_IS_BTN_IMG31", # HID:41035
- "HID:WIZARDS_HID_IS_BTN_IMG32", # HID:41036
- "",
- "",
- "",
- "HID:WIZARDS_HID_FTP", # HID:41040
- "HID:WIZARDS_HID_FTP_SERVER", # HID:41041
- "HID:WIZARDS_HID_FTP_USERNAME", # HID:41042
- "HID:WIZARDS_HID_FTP_PASS", # HID:41043
- "HID:WIZARDS_HID_FTP_TEST", # HID:41044
- "HID:WIZARDS_HID_FTP_TXT_PATH", # HID:41045
- "HID:WIZARDS_HID_FTP_BTN_PATH", # HID:41046
- "HID:WIZARDS_HID_FTP_OK", # HID:41047
- "HID:WIZARDS_HID_FTP_CANCEL", # HID:41048
- "",
- "",
- "HID:WIZARDS_HID_AGWIZ", # HID:41051
- "HID:WIZARDS_HID_AGWIZ_HELP", # HID:41052
- "HID:WIZARDS_HID_AGWIZ_NEXT", # HID:41053
- "HID:WIZARDS_HID_AGWIZ_PREV", # HID:41054
- "HID:WIZARDS_HID_AGWIZ_CREATE", # HID:41055
- "HID:WIZARDS_HID_AGWIZ_CANCEL", # HID:41056
- "HID:WIZARDS_HID_AGWIZ_1_LIST_PAGEDESIGN", # HID:41057
- "HID:WIZARDS_HID_AGWIZ_1_CHK_MINUTES", # HID:41058
- "HID:WIZARDS_HID_AGWIZ_2_TXT_TIME", # HID:41059
- "HID:WIZARDS_HID_AGWIZ_2_TXT_DATE", # HID:41060
- "HID:WIZARDS_HID_AGWIZ_2_TXT_TITLE", # HID:41061
- "HID:WIZARDS_HID_AGWIZ_2_TXT_LOCATION", # HID:41062
- "HID:WIZARDS_HID_AGWIZ_3_CHK_MEETING_TYPE", # HID:41063
- "HID:WIZARDS_HID_AGWIZ_3_CHK_READ", # HID:41064
- "HID:WIZARDS_HID_AGWIZ_3_CHK_BRING", # HID:41065
- "HID:WIZARDS_HID_AGWIZ_3_CHK_NOTES", # HID:41066
- "HID:WIZARDS_HID_AGWIZ_4_CHK_CALLED_BY", # HID:41067
- "HID:WIZARDS_HID_AGWIZ_4_CHK_FACILITATOR", # HID:41068
- "HID:WIZARDS_HID_AGWIZ_4_CHK_NOTETAKER", # HID:41069
- "HID:WIZARDS_HID_AGWIZ_4_CHK_TIMEKEEPER", # HID:41070
- "HID:WIZARDS_HID_AGWIZ_4_CHK_ATTENDEES", # HID:41071
- "HID:WIZARDS_HID_AGWIZ_4_CHK_OBSERVERS", # HID:41072
- "HID:WIZARDS_HID_AGWIZ_4_CHK_RESOURCEPERSONS", # HID:41073
- "HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATENAME", # HID:41074
- "HID:WIZARDS_HID_AGWIZ_6_TXT_TEMPLATEPATH", # HID:41075
- "HID:WIZARDS_HID_AGWIZ_6_BTN_TEMPLATEPATH", # HID:41076
- "HID:WIZARDS_HID_AGWIZ_6_OPT_CREATEAGENDA", # HID:41077
- "HID:WIZARDS_HID_AGWIZ_6_OPT_MAKECHANGES", # HID:41078
- "HID:WIZARDS_HID_AGWIZ_5_BTN_INSERT", # HID:41079
- "HID:WIZARDS_HID_AGWIZ_5_BTN_REMOVE", # HID:41080
- "HID:WIZARDS_HID_AGWIZ_5_BTN_UP", # HID:41081
- "HID:WIZARDS_HID_AGWIZ_5_BTN_DOWN", # HID:41082
- "HID:WIZARDS_HID_AGWIZ_5_SCROLL_BAR", # HID:41083
- "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_1", # HID:41084
- "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_1", # HID:41085
- "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_1", # HID:41086
- "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_2", # HID:41087
- "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_2", # HID:41088
- "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_2", # HID:41089
- "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_3", # HID:41090
- "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_3", # HID:41091
- "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_3", # HID:41092
- "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_4", # HID:41093
- "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_4", # HID:41094
- "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_4", # HID:41095
- "HID:WIZARDS_HID_AGWIZ_5_TXT_TOPIC_5", # HID:41096
- "HID:WIZARDS_HID_AGWIZ_5_TXT_RESPONSIBLE_5", # HID:41097
- "HID:WIZARDS_HID_AGWIZ_5_TXT_MINUTES_5", # HID:41098
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_FAXWIZ_OPTBUSINESSFAX", # HID:41120
- "HID:WIZARDS_HID_FAXWIZ_LSTBUSINESSSTYLE", # HID:41121
- "HID:WIZARDS_HID_FAXWIZ_OPTPRIVATEFAX", # HID:41122
- "HID:WIZARDS_HID_LSTPRIVATESTYLE", # HID:41123
- "HID:WIZARDS_HID_IMAGECONTROL3", # HID:41124
- "HID:WIZARDS_HID_CHKUSELOGO", # HID:41125
- "HID:WIZARDS_HID_CHKUSEDATE", # HID:41126
- "HID:WIZARDS_HID_CHKUSECOMMUNICATIONTYPE", # HID:41127
- "HID:WIZARDS_HID_LSTCOMMUNICATIONTYPE", # HID:41128
- "HID:WIZARDS_HID_CHKUSESUBJECT", # HID:41129
- "HID:WIZARDS_HID_CHKUSESALUTATION", # HID:41130
- "HID:WIZARDS_HID_LSTSALUTATION", # HID:41131
- "HID:WIZARDS_HID_CHKUSEGREETING", # HID:41132
- "HID:WIZARDS_HID_LSTGREETING", # HID:41133
- "HID:WIZARDS_HID_CHKUSEFOOTER", # HID:41134
- "HID:WIZARDS_HID_OPTSENDERPLACEHOLDER", # HID:41135
- "HID:WIZARDS_HID_OPTSENDERDEFINE", # HID:41136
- "HID:WIZARDS_HID_TXTSENDERNAME", # HID:41137
- "HID:WIZARDS_HID_TXTSENDERSTREET", # HID:41138
- "HID:WIZARDS_HID_TXTSENDERPOSTCODE", # HID:41139
- "HID:WIZARDS_HID_TXTSENDERSTATE", # HID:41140
- "HID:WIZARDS_HID_TXTSENDERCITY", # HID:41141
- "HID:WIZARDS_HID_TXTSENDERFAX", # HID:41142
- "HID:WIZARDS_HID_OPTRECEIVERPLACEHOLDER", # HID:41143
- "HID:WIZARDS_HID_OPTRECEIVERDATABASE", # HID:41144
- "HID:WIZARDS_HID_TXTFOOTER", # HID:41145
- "HID:WIZARDS_HID_CHKFOOTERNEXTPAGES", # HID:41146
- "HID:WIZARDS_HID_CHKFOOTERPAGENUMBERS", # HID:41147
- "HID:WIZARDS_HID_TXTTEMPLATENAME", # HID:41148
- "HID:WIZARDS_HID_FILETEMPLATEPATH", # HID:41149
- "HID:WIZARDS_HID_OPTCREATEFAX", # HID:41150
- "HID:WIZARDS_HID_OPTMAKECHANGES", # HID:41151
- "HID:WIZARDS_HID_IMAGECONTROL2", # HID:41152
- "HID:WIZARDS_HID_FAXWIZ_TXTPATH", # HID:41153
- "HID:WIZARDS_HID_FAXWIZ_CMDPATH", # HID:41154
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_FAXWIZARD", # HID:41180
- "HID:WIZARDS_HID_FAXWIZARD_HELP", # HID:41181
- "HID:WIZARDS_HID_FAXWIZARD_BACK", # HID:41182
- "HID:WIZARDS_HID_FAXWIZARD_NEXT", # HID:41183
- "HID:WIZARDS_HID_FAXWIZARD_CREATE", # HID:41184
- "HID:WIZARDS_HID_FAXWIZARD_CANCEL", # HID:41185
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGTABLE_DIALOG", # HID:41200
- "",
- "HID:WIZARDS_HID_DLGTABLE_CMDPREV", # HID:41202
- "HID:WIZARDS_HID_DLGTABLE_CMDNEXT", # HID:41203
- "HID:WIZARDS_HID_DLGTABLE_CMDFINISH", # HID:41204
- "HID:WIZARDS_HID_DLGTABLE_CMDCANCEL", # HID:41205
- "HID:WIZARDS_HID_DLGTABLE_OPTBUSINESS", # HID:41206
- "HID:WIZARDS_HID_DLGTABLE_OPTPRIVATE", # HID:41207
- "HID:WIZARDS_HID_DLGTABLE_LBTABLES", # HID:41208
- "HID:WIZARDS_HID_DLGTABLE_FIELDSAVAILABLE", # HID:41209
- "HID:WIZARDS_HID_DLGTABLE_CMDMOVESELECTED", # HID:41210
- "HID:WIZARDS_HID_DLGTABLE_CMDMOVEALL", # HID:41211
- "HID:WIZARDS_HID_DLGTABLE_CMDREMOVESELECTED", # HID:41212
- "HID:WIZARDS_HID_DLGTABLE_CMDREMOVEALL", # HID:41213
- "HID:WIZARDS_HID_DLGTABLE_FIELDSSELECTED", # HID:41214
- "HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP", # HID:41215
- "HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN", # HID:41216
- "",
- "",
- "",
- "HID:WIZARDS_HID_DLGTABLE_LB_SELFIELDNAMES", # HID:41220
- "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDUP", # HID:41221
- "HID:WIZARDS_HID_DLGTABLE_CMDMOVEFIELDDOWN", # HID:41222
- "HID:WIZARDS_HID_DLGTABLE_CMDMINUS", # HID:41223
- "HID:WIZARDS_HID_DLGTABLE_CMDPLUS", # HID:41224
- "HID:WIZARDS_HID_DLGTABLE_COLNAME", # HID:41225
- "HID:WIZARDS_HID_DLGTABLE_COLMODIFIER", # HID:41226
- "HID:WIZARDS_HID_DLGTABLE_CHK_USEPRIMEKEY", # HID:41227
- "HID:WIZARDS_HID_DLGTABLE_OPT_PK_AUTOMATIC", # HID:41228
- "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE_AUTOMATIC", # HID:41229
- "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SINGLE", # HID:41230
- "HID:WIZARDS_HID_DLGTABLE_LB_PK_FIELDNAME", # HID:41231
- "HID:WIZARDS_HID_DLGTABLE_CK_PK_AUTOVALUE", # HID:41232
- "HID:WIZARDS_HID_DLGTABLE_OPT_PK_SEVERAL", # HID:41233
- "HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_AVAILABLE", # HID:41234
- "HID:WIZARDS_HID_DLGTABLE_CMDMOVE_PK_SELECTED", # HID:41235
- "HID:WIZARDS_HID_DLGTABLE_CMDREMOVE_PK_SELECTED", # HID:41236
- "HID:WIZARDS_HID_DLGTABLE_FIELDS_PK_SELECTED", # HID:41237
- "HID:WIZARDS_HID_DLGTABLE_CMDMOVEUP_PK_SELECTED", # HID:41238
- "HID:WIZARDS_HID_DLGTABLE_CMDMOVEDOWN_PK_SELECTED", # HID:41239
- "HID:WIZARDS_HID_DLGTABLE_TXT_NAME", # HID:41240
- "HID:WIZARDS_HID_DLGTABLE_OPT_MODIFYTABLE", # HID:41241
- "HID:WIZARDS_HID_DLGTABLE_OPT_WORKWITHTABLE", # HID:41242
- "HID:WIZARDS_HID_DLGTABLE_OPT_STARTFORMWIZARD", # HID:41243
- "HID:WIZARDS_HID_DLGTABLE_LST_CATALOG", # HID:41244
- "HID:WIZARDS_HID_DLGTABLE_LST_SCHEMA" # HID:41245
- ]
-
- @classmethod
- def getHelpIdString(self, nHelpId):
- if nHelpId >= 34200 and nHelpId <= 34722:
- return HelpIds.array1[nHelpId - 34200]
- elif nHelpId >= 40769 and nHelpId <= 41245:
- return HelpIds.array2[nHelpId - 40769]
- else:
- return None
diff --git a/wizards/com/sun/star/wizards/common/Helper.py b/wizards/com/sun/star/wizards/common/Helper.py
deleted file mode 100644
index a31a6376fe8d..000000000000
--- a/wizards/com/sun/star/wizards/common/Helper.py
+++ /dev/null
@@ -1,159 +0,0 @@
-import uno
-import traceback
-from datetime import date as DateTime
-from com.sun.star.uno import RuntimeException
-from NumberFormatter import NumberFormatter
-
-class Helper(object):
-
- @classmethod
- def setUnoPropertyValue(self, xPSet, PropertyName, PropertyValue):
- try:
- if PropertyValue is not None:
- setattr(xPSet, PropertyName, PropertyValue)
-
- except AttributeError:
- raise AttributeError, "No Such Property: '%s'" % PropertyName
- except Exception:
- traceback.print_exc()
-
- @classmethod
- def getUnoObjectbyName(self, xName, ElementName):
- try:
- if xName.hasByName(ElementName):
- return xName.getByName(ElementName)
- else:
- raise RuntimeException()
-
- except Exception, exception:
- traceback.print_exc()
- return None
-
- @classmethod
- def getPropertyValue(self, CurPropertyValue, PropertyName):
- for i in CurPropertyValue:
- if i is not None:
- if i.Name == PropertyName:
- return i.Value
-
- raise RuntimeException()
-
- @classmethod
- def getUnoPropertyValue(self, xPSet, PropertyName):
- try:
- if xPSet is not None:
- oObject = xPSet.getPropertyValue(PropertyName)
- return oObject
- return None
-
- except Exception, exception:
- traceback.print_exc()
- return None
-
- @classmethod
- def getUnoArrayPropertyValue(self, xPSet, PropertyName):
- try:
- if xPSet is not None:
- oObject = xPSet.getPropertyValue(PropertyName)
- if isinstance(oObject,list):
- return getArrayValue(oObject)
-
- except Exception, exception:
- traceback.print_exc()
-
- return None
-
- @classmethod
- def getUnoStructValue(self, xPSet, PropertyName):
- try:
- if xPSet is not None:
- if xPSet.getPropertySetInfo().hasPropertyByName(PropertyName):
- oObject = xPSet.getPropertyValue(PropertyName)
- return oObject
-
- return None
- except Exception, exception:
- traceback.print_exc()
- return None
-
- @classmethod
- def setUnoPropertyValues(self, xMultiPSetLst, PropertyNames,
- PropertyValues):
- try:
- if xMultiPSetLst is not None:
- uno.invoke(xMultiPSetLst, "setPropertyValues",
- (PropertyNames, PropertyValues))
- else:
- for index, workwith in enumerate(PropertyNames):
- self.setUnoPropertyValue(
- xMultiPSetLst, PropertyNames[index], workwith)
-
- except Exception:
- traceback.print_exc()
-
- '''
- checks if the value of an object that represents an array is null.
- check beforehand if the Object is really an array with
- "AnyConverter.IsArray(oObject)
- @param oValue the paramter that has to represent an object
- @return a null reference if the array is empty
- '''
-
- @classmethod
- def getArrayValue(self, oValue):
- try:
- #VetoableChangeSupport Object
- oPropList = list(oValue)
- nlen = len(oPropList)
- if nlen == 0:
- return None
- else:
- return oPropList
-
- except Exception, exception:
- traceback.print_exc()
- return None
-
- def getComponentContext(_xMSF):
- #Get the path to the extension and
- #try to add the path to the class loader
- aHelper = PropertySetHelper(_xMSF);
- aDefaultContext = aHelper.getPropertyValueAsObject("DefaultContext")
- return aDefaultContext;
-
- def getMacroExpander(_xMSF):
- xComponentContext = self.getComponentContext(_xMSF);
- aSingleton = xComponentContext.getValueByName(
- "/singletons/com.sun.star.util.theMacroExpander")
- return aSingleton;
-
- class DateUtils(object):
-
- def __init__(self, xmsf, document):
- defaults = xmsf.createInstance("com.sun.star.text.Defaults")
- l = Helper.getUnoStructValue(defaults, "CharLocale")
- self.formatSupplier = document
- formatSettings = self.formatSupplier.getNumberFormatSettings()
- date = Helper.getUnoPropertyValue(formatSettings, "NullDate")
- self.calendar = DateTime(date.Year, date.Month, date.Day)
- self.formatter = NumberFormatter.createNumberFormatter(xmsf,
- self.formatSupplier)
-
- '''
- @param format a constant of the enumeration NumberFormatIndex
- @return
- '''
-
- def getFormat(self, format):
- return NumberFormatter.getNumberFormatterKey(
- self.formatSupplier, format)
-
- '''
- @param date a VCL date in form of 20041231
- @return a document relative date
- '''
-
- def format(self, formatIndex, date):
- difference = date - self.calendar
- return self.formatter.convertNumberToString(formatIndex,
- difference.days)
diff --git a/wizards/com/sun/star/wizards/common/NoValidPathException.py b/wizards/com/sun/star/wizards/common/NoValidPathException.py
deleted file mode 100644
index 53db155e2e6d..000000000000
--- a/wizards/com/sun/star/wizards/common/NoValidPathException.py
+++ /dev/null
@@ -1,10 +0,0 @@
-class NoValidPathException(Exception):
-
- def __init__(self, xMSF, _sText):
- super(NoValidPathException,self).__init__(_sText)
- # TODO: NEVER open a dialog in an exception
- from SystemDialog import SystemDialog
- if xMSF:
- SystemDialog.showErrorBox(xMSF,
- "dbwizres", "dbw", 521) #OfficePathnotavailable
-
diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.py b/wizards/com/sun/star/wizards/common/NumberFormatter.py
deleted file mode 100644
index a3deb173022f..000000000000
--- a/wizards/com/sun/star/wizards/common/NumberFormatter.py
+++ /dev/null
@@ -1,231 +0,0 @@
-import traceback
-from com.sun.star.lang import Locale
-from com.sun.star.util.NumberFormat import DATE, LOGICAL, DATETIME, TEXT, NUMBER
-
-class NumberFormatter(object):
-
- def __init__(self, _xNumberFormatsSupplier, _aLocale, _xMSF=None):
- self.iDateFormatKey = -1
- self.iDateTimeFormatKey = -1
- self.iNumberFormatKey = -1
- self.iTextFormatKey = -1
- self.iTimeFormatKey = -1
- self.iLogicalFormatKey = -1
- self.bNullDateCorrectionIsDefined = False
- self.aLocale = _aLocale
- if _xMSF is not None:
- self.xNumberFormatter = _xMSF.createInstance(
- "com.sun.star.util.NumberFormatter")
- self.xNumberFormats = _xNumberFormatsSupplier.NumberFormats
- self.xNumberFormatSettings = \
- _xNumberFormatsSupplier.NumberFormatSettings
- self.xNumberFormatter.attachNumberFormatsSupplier(
- _xNumberFormatsSupplier)
-
- '''
- @param _xMSF
- @param _xNumberFormatsSupplier
- @return
- @throws Exception
- @deprecated
- '''
-
- @classmethod
- def createNumberFormatter(self, _xMSF, _xNumberFormatsSupplier):
- oNumberFormatter = _xMSF.createInstance(
- "com.sun.star.util.NumberFormatter")
- oNumberFormatter.attachNumberFormatsSupplier(_xNumberFormatsSupplier)
- return oNumberFormatter
-
- '''
- gives a key to pass to a NumberFormat object. <br/>
- example: <br/>
- <pre>
- XNumberFormatsSupplier nsf =
- (XNumberFormatsSupplier)UnoRuntime.queryInterface(...,document)
- int key = Desktop.getNumberFormatterKey(
- nsf, ...star.i18n.NumberFormatIndex.DATE...)
- XNumberFormatter nf = Desktop.createNumberFormatter(xmsf, nsf);
- nf.convertNumberToString( key, 1972 );
- </pre>
- @param numberFormatsSupplier
- @param type - a constant out of i18n.NumberFormatIndex enumeration.
- @return a key to use with a util.NumberFormat instance.
- '''
-
- @classmethod
- def getNumberFormatterKey(self, numberFormatsSupplier, Type):
- return numberFormatsSupplier.NumberFormats.getFormatIndex(
- Type, Locale())
-
- def convertNumberToString(self, _nkey, _dblValue, _xNumberFormatter=None):
- if _xNumberFormatter is None:
- return self.xNumberFormatter.convertNumberToString(
- _nkey, _dblValue)
- else:
- return _xNumberFormatter.convertNumberToString(_nkey, _dblValue)
-
- def convertStringToNumber(self, _nkey, _sString):
- return self.xNumberFormatter.convertStringToNumber(_nkey, _sString)
-
- '''
- @param dateCorrection The lDateCorrection to set.
- '''
-
- def setNullDateCorrection(self, dateCorrection):
- self.lDateCorrection = dateCorrection
-
- def defineNumberFormat(self, _FormatString):
- try:
- NewFormatKey = self.xNumberFormats.queryKey(
- _FormatString, self.aLocale, True)
- if NewFormatKey is -1:
- NewFormatKey = self.xNumberFormats.addNew(
- _FormatString, self.aLocale)
-
- return NewFormatKey
- except Exception, e:
- traceback.print_exc()
- return -1
-
- '''
- returns a numberformat for a FormatString.
- @param _FormatString
- @param _aLocale
- @return
- '''
-
- def defineNumberFormat(self, _FormatString, _aLocale):
- try:
- NewFormatKey = self.xNumberFormats.queryKey(
- _FormatString, _aLocale, True)
- if NewFormatKey == -1:
- NewFormatKey = self.xNumberFormats.addNew(
- _FormatString, _aLocale)
-
- return NewFormatKey
- except Exception, e:
- traceback.print_exc()
- return -1
-
- def setNumberFormat(self, _xFormatObject, _FormatKey, _oNumberFormatter):
- try:
- xNumberFormat = _oNumberFormatter.xNumberFormats.getByKey(
- _FormatKey)
- FormatString = str(Helper.getUnoPropertyValue(
- xNumberFormat, "FormatString"))
- oLocale = Helper.getUnoPropertyValue(xNumberFormat, "Locale")
- NewFormatKey = defineNumberFormat(FormatString, oLocale)
- _xFormatObject.setPropertyValue(
- "FormatsSupplier",
- _oNumberFormatter.xNumberFormatter.getNumberFormatsSupplier())
- if _xFormatObject.getPropertySetInfo().hasPropertyByName(
- "NumberFormat"):
- _xFormatObject.setPropertyValue("NumberFormat", NewFormatKey)
- elif _xFormatObject.getPropertySetInfo().hasPropertyByName(
- "FormatKey"):
- _xFormatObject.setPropertyValue("FormatKey", NewFormatKey)
- else:
- # TODO: throws a exception in a try catch environment, very helpful?
- raise Exception
-
- except Exception, exception:
- traceback.print_exc()
-
- def getNullDateCorrection(self):
- if not self.bNullDateCorrectionIsDefined:
- dNullDate = Helper.getUnoStructValue(
- self.xNumberFormatSettings, "NullDate")
- lNullDate = Helper.convertUnoDatetoInteger(dNullDate)
- oCal = java.util.Calendar.getInstance()
- oCal.set(1900, 1, 1)
- dTime = oCal.getTime()
- lTime = dTime.getTime()
- lDBNullDate = lTime / (3600 * 24000)
- self.lDateCorrection = lDBNullDate - lNullDate
- return self.lDateCorrection
- else:
- return self.lDateCorrection
-
- def setBooleanReportDisplayNumberFormat(self):
- FormatString = "[=1]" + str(9745) + ";[=0]" + str(58480) + ";0"
- self.iLogicalFormatKey = self.xNumberFormats.queryKey(
- FormatString, self.aLocale, True)
- try:
- if self.iLogicalFormatKey == -1:
- self.iLogicalFormatKey = self.xNumberFormats.addNew(
- FormatString, self.aLocale)
-
- except Exception, e:
- #MalformedNumberFormat
- traceback.print_exc()
- self.iLogicalFormatKey = self.xNumberFormats.getStandardFormat(
- NumberFormat.LOGICAL, self.aLocale)
-
- return self.iLogicalFormatKey
-
- '''
- @return Returns the iDateFormatKey.
- '''
-
- def getDateFormatKey(self):
- if self.iDateFormatKey == -1:
- self.iDateFormatKey = self.xNumberFormats.getStandardFormat(
- NumberFormat.DATE, self.aLocale)
-
- return self.iDateFormatKey
-
- '''
- @return Returns the iDateTimeFormatKey.
- '''
-
- def getDateTimeFormatKey(self):
- if self.iDateTimeFormatKey == -1:
- self.iDateTimeFormatKey = self.xNumberFormats.getStandardFormat(
- NumberFormat.DATETIME, self.aLocale)
-
- return self.iDateTimeFormatKey
-
- '''
- @return Returns the iLogicalFormatKey.
- '''
-
- def getLogicalFormatKey(self):
- if self.iLogicalFormatKey == -1:
- self.iLogicalFormatKey = self.xNumberFormats.getStandardFormat(
- NumberFormat.LOGICAL, self.aLocale)
-
- return self.iLogicalFormatKey
-
- '''
- @return Returns the iNumberFormatKey.
- '''
-
- def getNumberFormatKey(self):
- if self.iNumberFormatKey == -1:
- self.iNumberFormatKey = self.xNumberFormats.getStandardFormat(
- NumberFormat.NUMBER, self.aLocale)
-
- return self.iNumberFormatKey
-
- '''
- @return Returns the iTextFormatKey.
- '''
-
- def getTextFormatKey(self):
- if self.iTextFormatKey == -1:
- self.iTextFormatKey = self.xNumberFormats.getStandardFormat(
- NumberFormat.TEXT, self.aLocale)
-
- return self.iTextFormatKey
-
- '''
- @return Returns the iTimeFormatKey.
- '''
-
- def getTimeFormatKey(self):
- if self.iTimeFormatKey == -1:
- self.iTimeFormatKey = self.xNumberFormats.getStandardFormat(
- NumberFormat.TIME, self.aLocale)
-
- return self.iTimeFormatKey
diff --git a/wizards/com/sun/star/wizards/common/Properties.py b/wizards/com/sun/star/wizards/common/Properties.py
deleted file mode 100644
index 4a906ed27d79..000000000000
--- a/wizards/com/sun/star/wizards/common/Properties.py
+++ /dev/null
@@ -1,43 +0,0 @@
-from com.sun.star.beans import PropertyValue
-
-'''
-Simplifies handling Arrays of PropertyValue.
-To make a use of this class, instantiate it, and call
-the put(propName,propValue) method.
-caution: propName should always be a String.
-When finished, call the getProperties() method to get an array of the set properties.
-@author rp
-'''
-
-class Properties(dict):
-
- @classmethod
- def getPropertyValue(self, props, propName):
- for i in props:
- if propName == i.Name:
- return i.Value
-
- raise AttributeError ("Property '" + propName + "' not found.")
-
- @classmethod
- def hasPropertyValue(self, props, propName):
- for i in props:
- if propName == i.Name:
- return True
- return False
-
- @classmethod
- def getProperties(self, _map):
- pv = []
- for k,v in _map.items():
- pv.append(self.createProperty(k, v))
- return pv
-
- @classmethod
- def createProperty(self, name, value, handle=None):
- pv = PropertyValue()
- pv.Name = name
- pv.Value = value
- if handle is not None:
- pv.Handle = handle
- return pv
diff --git a/wizards/com/sun/star/wizards/common/PropertyNames.py b/wizards/com/sun/star/wizards/common/PropertyNames.py
deleted file mode 100644
index c1dde18522f3..000000000000
--- a/wizards/com/sun/star/wizards/common/PropertyNames.py
+++ /dev/null
@@ -1,15 +0,0 @@
-class PropertyNames:
- PROPERTY_ENABLED = "Enabled"
- PROPERTY_HEIGHT = "Height"
- PROPERTY_HELPURL = "HelpURL"
- PROPERTY_POSITION_X = "PositionX"
- PROPERTY_POSITION_Y = "PositionY"
- PROPERTY_LABEL = "Label"
- PROPERTY_MULTILINE = "MultiLine"
- PROPERTY_NAME = "Name"
- PROPERTY_STEP = "Step"
- PROPERTY_WIDTH = "Width"
- PROPERTY_TABINDEX = "TabIndex"
- PROPERTY_STATE = "State"
- PROPERTY_IMAGEURL = "ImageURL"
-
diff --git a/wizards/com/sun/star/wizards/common/PropertySetHelper.py b/wizards/com/sun/star/wizards/common/PropertySetHelper.py
deleted file mode 100644
index 2fce42abce53..000000000000
--- a/wizards/com/sun/star/wizards/common/PropertySetHelper.py
+++ /dev/null
@@ -1,250 +0,0 @@
-from DebugHelper import *
-
-class PropertySetHelper(object):
-
- @classmethod
- def __init__(self, _aObj):
- if not _aObj:
- return
-
- self.m_xPropertySet = _aObj
-
- def getHashMap(self):
- if self.m_aHashMap == None:
- self.m_aHashMap = HashMap < String, Object >.Object()
-
- return self.m_aHashMap
-
- '''
- set a property, don't throw any exceptions,
- they will only write down as a hint in the helper debug output
- @param _sName name of the property to set
- @param _aValue property value as object
- '''
-
- def setPropertyValueDontThrow(self, _sName, _aValue):
- try:
- setPropertyValue(_sName, _aValue)
- except Exception, e:
- DebugHelper.writeInfo(
- "Don't throw the exception with property name(" \
- + _sName + " ) : " + e.getMessage())
-
- '''
- set a property,
- @param _sName name of the property to set
- @param _aValue property value as object
- @throws java.lang.Exception
- '''
-
- def setPropertyValue(self, _sName, _aValue):
- if self.m_xPropertySet != None:
- try:
- self.m_xPropertySet.setPropertyValue(_sName, _aValue)
- except com.sun.star.beans.UnknownPropertyException, e:
- DebugHelper.writeInfo(e.getMessage())
- DebugHelper.exception(e)
- except com.sun.star.beans.PropertyVetoException, e:
- DebugHelper.writeInfo(e.getMessage())
- DebugHelper.exception(e)
- except ValueError, e:
- DebugHelper.writeInfo(e.getMessage())
- DebugHelper.exception(e)
- except com.sun.star.lang.WrappedTargetException, e:
- DebugHelper.writeInfo(e.getMessage())
- DebugHelper.exception(e)
-
- else:
- getHashMap().put(_sName, _aValue)
-
- '''
- get a property and convert it to a int value
- @param _sName the string name of the property
- @param _nDefault if an error occur, return this value
- @return the int value of the property
- '''
-
- def getPropertyValueAsInteger(self, _sName, _nDefault):
- aObject = None
- nValue = _nDefault
- if self.m_xPropertySet != None:
- try:
- aObject = self.m_xPropertySet.getPropertyValue(_sName)
- except com.sun.star.beans.UnknownPropertyException, e:
- DebugHelper.writeInfo(e.getMessage())
- except com.sun.star.lang.WrappedTargetException, e:
- DebugHelper.writeInfo(e.getMessage())
-
- if aObject != None:
- try:
- nValue = NumericalHelper.toInt(aObject)
- except ValueError, e:
- DebugHelper.writeInfo(
- "can't convert a object to integer.")
-
- return nValue
-
- '''
- get a property and convert it to a short value
- @param _sName the string name of the property
- @param _nDefault if an error occur, return this value
- @return the int value of the property
- '''
-
- def getPropertyValueAsShort(self, _sName, _nDefault):
- aObject = None
- nValue = _nDefault
- if self.m_xPropertySet != None:
- try:
- aObject = self.m_xPropertySet.getPropertyValue(_sName)
- except com.sun.star.beans.UnknownPropertyException, e:
- DebugHelper.writeInfo(e.getMessage())
- except com.sun.star.lang.WrappedTargetException, e:
- DebugHelper.writeInfo(e.getMessage())
-
- if aObject != None:
- try:
- nValue = NumericalHelper.toShort(aObject)
- except ValueError, e:
- DebugHelper.writeInfo("can't convert a object to short.")
-
- return nValue
-
- '''
- get a property and convert it to a double value
- @param _sName the string name of the property
- @param _nDefault if an error occur, return this value
- @return the int value of the property
- '''
-
- def getPropertyValueAsDouble(self, _sName, _nDefault):
- aObject = None
- nValue = _nDefault
- if self.m_xPropertySet != None:
- try:
- aObject = self.m_xPropertySet.getPropertyValue(_sName)
- except com.sun.star.beans.UnknownPropertyException, e:
- DebugHelper.writeInfo(e.getMessage())
- except com.sun.star.lang.WrappedTargetException, e:
- DebugHelper.writeInfo(e.getMessage())
-
- if aObject == None:
- if getHashMap().containsKey(_sName):
- aObject = getHashMap().get(_sName)
-
- if aObject != None:
- try:
- nValue = NumericalHelper.toDouble(aObject)
- except ValueError, e:
- DebugHelper.writeInfo("can't convert a object to integer.")
-
- return nValue
-
- '''
- get a property and convert it to a boolean value
- @param _sName the string name of the property
- @param _bDefault if an error occur, return this value
- @return the boolean value of the property
- '''
-
- def getPropertyValueAsBoolean(self, _sName, _bDefault):
- aObject = None
- bValue = _bDefault
- if self.m_xPropertySet != None:
- try:
- aObject = self.m_xPropertySet.getPropertyValue(_sName)
- except com.sun.star.beans.UnknownPropertyException, e:
- DebugHelper.writeInfo(e.getMessage())
- DebugHelper.writeInfo(
- "UnknownPropertyException caught: Name:=" + _sName)
- except com.sun.star.lang.WrappedTargetException, e:
- DebugHelper.writeInfo(e.getMessage())
-
- if aObject != None:
- try:
- bValue = NumericalHelper.toBoolean(aObject)
- except ValueError, e:
- DebugHelper.writeInfo("can't convert a object to boolean.")
-
- return bValue
-
- '''
- get a property and convert it to a string value
- @param _sName the string name of the property
- @param _sDefault if an error occur, return this value
- @return the string value of the property
- '''
-
- def getPropertyValueAsString(self, _sName, _sDefault):
- aObject = None
- sValue = _sDefault
- if self.m_xPropertySet != None:
- try:
- aObject = self.m_xPropertySet.getPropertyValue(_sName)
- except com.sun.star.beans.UnknownPropertyException, e:
- DebugHelper.writeInfo(e.getMessage())
- except com.sun.star.lang.WrappedTargetException, e:
- DebugHelper.writeInfo(e.getMessage())
-
- if aObject != None:
- try:
- sValue = AnyConverter.toString(aObject)
- except ValueError, e:
- DebugHelper.writeInfo("can't convert a object to string.")
-
- return sValue
-
- '''
- get a property and don't convert it
- @param _sName the string name of the property
- @return the object value of the property without any conversion
- '''
-
- def getPropertyValueAsObject(self, _sName):
- aObject = None
- if self.m_xPropertySet != None:
- try:
- aObject = self.m_xPropertySet.getPropertyValue(_sName)
- except com.sun.star.beans.UnknownPropertyException, e:
- DebugHelper.writeInfo(e.getMessage())
- except com.sun.star.lang.WrappedTargetException, e:
- DebugHelper.writeInfo(e.getMessage())
-
- return aObject
-
- '''
- Debug helper, to show all properties
- which are available in the given object.
- @param _xObj the object of which the properties should shown
- '''
-
- @classmethod
- def showProperties(self, _xObj):
- aHelper = PropertySetHelper.PropertySetHelper_unknown(_xObj)
- aHelper.showProperties()
-
- '''
- Debug helper, to show all properties which are available
- in the current object.
- '''
-
- def showProperties(self):
- sName = ""
- if self.m_xPropertySet != None:
- XServiceInfo xServiceInfo = (XServiceInfo)
- UnoRuntime.queryInterface(XServiceInfo.class, self.m_xPropertySet)
- if xServiceInfo != None:
- sName = xServiceInfo.getImplementationName()
-
- xInfo = self.m_xPropertySet.getPropertySetInfo()
- aAllProperties = xInfo.getProperties()
- DebugHelper.writeInfo(
- "Show all properties of Implementation of :'" + sName + "'")
- i = 0
- while i < aAllProperties.length:
- DebugHelper.writeInfo(" - " + aAllProperties[i].Name)
- i += 1
- else:
- DebugHelper.writeInfo(
- "The given object don't support XPropertySet interface.")
-
diff --git a/wizards/com/sun/star/wizards/common/Resource.py b/wizards/com/sun/star/wizards/common/Resource.py
deleted file mode 100644
index ce2c9e1a4a3b..000000000000
--- a/wizards/com/sun/star/wizards/common/Resource.py
+++ /dev/null
@@ -1,69 +0,0 @@
-from com.sun.star.awt.VclWindowPeerAttribute import OK
-from Configuration import Configuration
-from SystemDialog import SystemDialog
-import traceback
-
-class Resource(object):
- '''
- Creates a new instance of Resource
- @param _xMSF
- @param _Unit
- @param _Module
- '''
-
- @classmethod
- def __init__(self, _xMSF, _Module):
- self.xMSF = _xMSF
- self.Module = _Module
- try:
- xResource = self.xMSF.createInstanceWithArguments(
- "org.libreoffice.resource.ResourceIndexAccess", (self.Module,))
- if xResource is None:
- raise Exception ("could not initialize ResourceIndexAccess")
-
- self.xStringIndexAccess = xResource.getByName("String")
- self.xStringListIndexAccess = xResource.getByName("StringList")
- if self.xStringListIndexAccess is None:
- raise Exception ("could not initialize xStringListIndexAccess")
-
- if self.xStringIndexAccess is None:
- raise Exception ("could not initialize xStringIndexAccess")
-
- except Exception, exception:
- traceback.print_exc()
- self.showCommonResourceError(self.xMSF)
-
- def getResText(self, nID):
- try:
- return self.xStringIndexAccess.getByIndex(nID)
- except Exception, exception:
- traceback.print_exc()
- raise ValueError("Resource with ID not " + str(nID) + " not found")
-
- def getStringList(self, nID):
- try:
- return self.xStringListIndexAccess.getByIndex(nID)
- except Exception, exception:
- traceback.print_exc()
- raise ValueError("Resource with ID not " + str(nID) + " not found")
-
- def getResArray(self, nID, iCount):
- try:
- ResArray = range(iCount)
- i = 0
- while i < iCount:
- ResArray[i] = getResText(nID + i)
- i += 1
- return ResArray
- except Exception, exception:
- traceback.print_exc()
- raise ValueError("Resource with ID not" + str(nID) + " not found")
-
- @classmethod
- def showCommonResourceError(self, xMSF):
- ProductName = Configuration.getProductName(xMSF)
- sError = "The files required could not be found.\n" + \
- "Please start the %PRODUCTNAME Setup and choose 'Repair'."
- sError = sError.replace("%PRODUCTNAME", ProductName)
- SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sError)
-
diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py
deleted file mode 100644
index a04c0272c96b..000000000000
--- a/wizards/com/sun/star/wizards/common/SystemDialog.py
+++ /dev/null
@@ -1,231 +0,0 @@
-import uno
-import traceback
-from Configuration import Configuration
-
-from Desktop import Desktop
-from Helper import Helper
-
-from com.sun.star.ui.dialogs.TemplateDescription import FILESAVE_AUTOEXTENSION, FILEOPEN_SIMPLE
-from com.sun.star.ui.dialogs.ExtendedFilePickerElementIds import CHECKBOX_AUTOEXTENSION
-from com.sun.star.awt import WindowDescriptor
-from com.sun.star.awt.WindowClass import MODALTOP
-from com.sun.star.lang import IllegalArgumentException
-from com.sun.star.awt.VclWindowPeerAttribute import OK
-
-class SystemDialog(object):
-
- '''
- @param xMSF
- @param ServiceName
- @param type according to com.sun.star.ui.dialogs.TemplateDescription
- '''
-
- def __init__(self, xMSF, ServiceName, Type):
- try:
- self.xMSF = xMSF
- self.systemDialog = xMSF.createInstance(ServiceName)
- self.xStringSubstitution = self.createStringSubstitution(xMSF)
-
- except Exception, exception:
- traceback.print_exc()
-
- @classmethod
- def createStoreDialog(self, xmsf):
- return SystemDialog(
- xmsf, "com.sun.star.ui.dialogs.FilePicker",FILESAVE_AUTOEXTENSION)
-
- @classmethod
- def createOpenDialog(self, xmsf):
- return SystemDialog(
- xmsf, "com.sun.star.ui.dialogs.FilePicker", FILEOPEN_SIMPLE)
-
- @classmethod
- def createFolderDialog(self, xmsf):
- return SystemDialog(
- xmsf, "com.sun.star.ui.dialogs.FolderPicker", 0)
-
- @classmethod
- def createOfficeFolderDialog(self, xmsf):
- return SystemDialog(
- xmsf, "com.sun.star.ui.dialogs.OfficeFolderPicker", 0)
-
- def subst(self, path):
- try:
- s = self.xStringSubstitution.substituteVariables(path, False)
- return s
- except Exception, ex:
- traceback.print_exc()
- return path
-
- '''
- @param displayDir
- @param defaultName
- given url to a local path.
- @return
- '''
-
- def callStoreDialog(self, displayDir, defaultName, sDocuType=None):
- if sDocuType is not None:
- self.addFilterToDialog(defaultName[-3:], sDocuType, True)
-
- self.sStorePath = None
- try:
- self.systemDialog.setValue(CHECKBOX_AUTOEXTENSION, 0, True)
- self.systemDialog.setDefaultName(defaultName)
- self.systemDialog.setDisplayDirectory(self.subst(displayDir))
- if self.execute(self.systemDialog):
- sPathList = self.systemDialog.getFiles()
- self.sStorePath = sPathList[0]
-
- except Exception, exception:
- traceback.print_exc()
-
- return self.sStorePath
-
- def callFolderDialog(self, title, description, displayDir):
- try:
- self.systemDialog.setDisplayDirectoryxPropertyValue(
- subst(displayDir))
- except IllegalArgumentException, iae:
- traceback.print_exc()
- raise AttributeError(iae.getMessage());
-
- self.systemDialog.setTitle(title)
- self.systemDialog.setDescription(description)
- if self.execute(self.systemDialog):
- return self.systemDialog.getDirectory()
- else:
- return None
-
- def execute(self, execDialog):
- return execDialog.execute() == 1
-
- def callOpenDialog(self, multiSelect, displayDirectory):
- try:
- self.systemDialog.setMultiSelectionMode(multiSelect)
- self.systemDialog.setDisplayDirectory(self.subst(displayDirectory))
- if self.execute(self.systemDialog):
- return self.systemDialog.getFiles()
-
- except Exception, exception:
- traceback.print_exc()
-
- return None
-
- def addFilterToDialog(self, sExtension, filterName, setToDefault):
- try:
- #get the localized filtername
- uiName = self.getFilterUIName(filterName)
- pattern = "*." + sExtension
- #add the filter
- self.addFilter(uiName, pattern, setToDefault)
- except Exception, exception:
- traceback.print_exc()
-
- def addFilter(self, uiName, pattern, setToDefault):
- try:
- self.systemDialog.appendFilter(uiName, pattern)
- if setToDefault:
- self.systemDialog.setCurrentFilter(uiName)
-
- except Exception, ex:
- traceback.print_exc()
-
- '''
- converts the name returned from getFilterUIName_(...) so the
- product name is correct.
- @param filterName
- @return
- '''
-
- def getFilterUIName(self, filterName):
- prodName = Configuration.getProductName(self.xMSF)
- s = [[self.getFilterUIName_(filterName)]]
- s[0][0] = s[0][0].replace("%productname%", prodName)
- return s[0][0]
-
- '''
- note the result should go through conversion of the product name.
- @param filterName
- @return the UI localized name of the given filter name.
- '''
-
- def getFilterUIName_(self, filterName):
- try:
- oFactory = self.xMSF.createInstance(
- "com.sun.star.document.FilterFactory")
- oObject = Helper.getUnoObjectbyName(oFactory, filterName)
- xPropertyValue = list(oObject)
- for i in xPropertyValue:
- if i is not None and i.Name == "UIName":
- return str(i.Value)
-
- raise NullPointerException(
- "UIName property not found for Filter " + filterName);
- except Exception, exception:
- traceback.print_exc()
- return None
-
- @classmethod
- def showErrorBox(self, xMSF, ResName, ResPrefix,
- ResID, AddTag=None, AddString=None):
- ProductName = Configuration.getProductName(xMSF)
- oResource = Resource(xMSF, ResPrefix)
- sErrorMessage = oResource.getResText(ResID)
- sErrorMessage = sErrorMessage.replace( ProductName, "%PRODUCTNAME")
- sErrorMessage = sErrorMessage.replace(str(13), "<BR>")
- if AddTag and AddString:
- sErrorMessage = sErrorMessage.replace( AddString, AddTag)
- return self.showMessageBox(xMSF, "ErrorBox", OK, sErrorMessage)
-
- '''
- example:
- (xMSF, "ErrorBox", com.sun.star.awt.VclWindowPeerAttribute.OK, "message")
-
- @param windowServiceName one of the following strings:
- "ErrorBox", "WarningBox", "MessBox", "InfoBox", "QueryBox".
- There are other values possible, look
- under src/toolkit/source/awt/vcltoolkit.cxx
- @param windowAttribute see com.sun.star.awt.VclWindowPeerAttribute
- @return 0 = cancel, 1 = ok, 2 = yes, 3 = no(I'm not sure here)
- other values check for yourself ;-)
- '''
- @classmethod
- def showMessageBox(self, xMSF, windowServiceName, windowAttribute,
- MessageText, peer=None):
-
- if MessageText is None:
- return 0
-
- iMessage = 0
- try:
- # If the peer is null we try to get one from the desktop...
- if peer is None:
- xFrame = Desktop.getActiveFrame(xMSF)
- peer = xFrame.getComponentWindow()
-
- xToolkit = xMSF.createInstance("com.sun.star.awt.Toolkit")
- oDescriptor = WindowDescriptor()
- oDescriptor.WindowServiceName = windowServiceName
- oDescriptor.Parent = peer
- oDescriptor.Type = MODALTOP
- oDescriptor.WindowAttributes = windowAttribute
- xMsgPeer = xToolkit.createWindow(oDescriptor)
- xMsgPeer.MessageText = MessageText
- iMessage = xMsgPeer.execute()
- xMsgPeer.dispose()
- except Exception:
- traceback.print_exc()
-
- return iMessage
-
- @classmethod
- def createStringSubstitution(self, xMSF):
- xPathSubst = None
- try:
- xPathSubst = xMSF.createInstance(
- "com.sun.star.util.PathSubstitution")
- return xPathSubst
- except Exception, e:
- traceback.print_exc()
- return None
diff --git a/wizards/com/sun/star/wizards/common/__init__.py b/wizards/com/sun/star/wizards/common/__init__.py
deleted file mode 100644
index 1e42b88e42ec..000000000000
--- a/wizards/com/sun/star/wizards/common/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-"""Common"""
diff --git a/wizards/com/sun/star/wizards/common/prova.py b/wizards/com/sun/star/wizards/common/prova.py
deleted file mode 100644
index 1219ba9aff7b..000000000000
--- a/wizards/com/sun/star/wizards/common/prova.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from PropertyNames import PropertyNames
-
-class prova:
-
- def Imprimir(self):
- print PropertyNames.PROPERTY_STEP
-
diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py
deleted file mode 100644
index a5eef40992dd..000000000000
--- a/wizards/com/sun/star/wizards/document/OfficeDocument.py
+++ /dev/null
@@ -1,280 +0,0 @@
-import uno
-import traceback
-import unohelper
-from ui.event.CommonListener import TerminateListenerProcAdapter
-from common.Desktop import Desktop
-
-from com.sun.star.awt import WindowDescriptor
-from com.sun.star.awt import Rectangle
-from com.sun.star.awt.WindowClass import TOP
-from com.sun.star.task import ErrorCodeIOException
-
-#Window Constants
-com_sun_star_awt_WindowAttribute_BORDER \
- = uno.getConstantByName( "com.sun.star.awt.WindowAttribute.BORDER" )
-com_sun_star_awt_WindowAttribute_SIZEABLE \
- = uno.getConstantByName( "com.sun.star.awt.WindowAttribute.SIZEABLE" )
-com_sun_star_awt_WindowAttribute_MOVEABLE \
- = uno.getConstantByName( "com.sun.star.awt.WindowAttribute.MOVEABLE" )
-com_sun_star_awt_VclWindowPeerAttribute_CLIPCHILDREN \
- = uno.getConstantByName(
- "com.sun.star.awt.VclWindowPeerAttribute.CLIPCHILDREN" )
-
-class OfficeDocument(object):
- '''Creates a new instance of OfficeDocument '''
-
- def __init__(self, _xMSF):
- self.xMSF = _xMSF
-
- @classmethod
- def attachEventCall(self, xComponent, EventName, EventType, EventURL):
- try:
- oEventProperties = range(2)
- oEventProperties[0] = uno.createUnoStruct(
- 'com.sun.star.beans.PropertyValue')
- oEventProperties[0].Name = "EventType"
- oEventProperties[0].Value = EventType
- # "Service", "StarBasic"
- oEventProperties[1] = uno.createUnoStruct(
- 'com.sun.star.beans.PropertyValue')
- oEventProperties[1].Name = "Script" #"URL";
- oEventProperties[1].Value = EventURL
- uno.invoke(xComponent.Events, "replaceByName",
- (EventName, uno.Any("[]com.sun.star.beans.PropertyValue",
- tuple(oEventProperties))))
- except Exception, exception:
- traceback.print_exc()
-
- def dispose(self, xMSF, xComponent):
- try:
- if xComponent != None:
- xFrame = xComponent.CurrentController.Frame
- if xComponent.isModified():
- xComponent.setModified(False)
-
- Desktop.dispatchURL(xMSF, ".uno:CloseDoc", xFrame)
-
- except PropertyVetoException, exception:
- traceback.print_exc()
-
- '''
- Create a new office document, attached to the given frame.
- @param desktop
- @param frame
- @param sDocumentType e.g. swriter, scalc, ( simpress, scalc : not tested)
- @return the document Component
- (implements XComponent) object ( XTextDocument, or XSpreadsheedDocument )
- '''
-
- @classmethod
- def createNewDocument(self, frame, sDocumentType, preview, readonly):
- loadValues = range(2)
- loadValues[0] = uno.createUnoStruct(
- 'com.sun.star.beans.PropertyValue')
- loadValues[0].Name = "ReadOnly"
- if readonly:
- loadValues[0].Value = True
- else:
- loadValues[0].Value = False
-
- loadValues[1] = uno.createUnoStruct(
- 'com.sun.star.beans.PropertyValue')
- loadValues[1].Name = "Preview"
- if preview:
- loadValues[1].Value = True
- else:
- loadValues[1].Value = False
- sURL = "private:factory/" + sDocumentType
- xComponent = None
- try:
- xComponent = frame.loadComponentFromURL(
- sURL, "_self", 0, tuple(loadValues))
-
- except Exception:
- traceback.print_exc()
-
- return xComponent
-
- @classmethod
- def createNewFrame(self, xMSF, listener, FrameName="_blank"):
- xFrame = None
- if FrameName.lower() == "WIZARD_LIVE_PREVIEW".lower():
- xFrame = self.createNewPreviewFrame(xMSF, listener)
- else:
- xF = Desktop.getDesktop(xMSF)
- xFrame = xF.findFrame(FrameName, 0)
- if listener is not None:
- xFF = xF.getFrames()
- xFF.remove(xFrame)
- xF.addTerminateListener(TerminateListenerProcAdapter(listener))
-
- return xFrame
-
- @classmethod
- def createNewPreviewFrame(self, xMSF, listener):
- xToolkit = None
- try:
- xToolkit = xMSF.createInstance("com.sun.star.awt.Toolkit")
- except Exception, e:
- # TODO Auto-generated catch block
- traceback.print_exc()
-
- #describe the window and its properties
- aDescriptor = WindowDescriptor()
- aDescriptor.Type = TOP
- aDescriptor.WindowServiceName = "window"
- aDescriptor.ParentIndex = -1
- aDescriptor.Parent = None
- aDescriptor.Bounds = Rectangle(10, 10, 640, 480)
-
- #Set Window Attributes
- gnDefaultWindowAttributes = \
- com_sun_star_awt_WindowAttribute_BORDER + \
- com_sun_star_awt_WindowAttribute_MOVEABLE + \
- com_sun_star_awt_WindowAttribute_SIZEABLE + \
- com_sun_star_awt_VclWindowPeerAttribute_CLIPCHILDREN
-
- aDescriptor.WindowAttributes = gnDefaultWindowAttributes
- #create a new blank container window
- xPeer = None
- try:
- xPeer = xToolkit.createWindow(aDescriptor)
- except IllegalArgumentException, e:
- # TODO Auto-generated catch block
- traceback.print_exc()
-
- #define some further properties of the frame window
- #if it's needed .-)
- #xPeer->setBackground(...);
- #create new empty frame and set window on it
- xFrame = None
- try:
- xFrame = xMSF.createInstance("com.sun.star.frame.Frame")
- except Exception, e:
- # TODO Auto-generated catch block
- traceback.print_exc()
-
- xFrame.initialize(xPeer)
- #from now this frame is useable ...
- #and not part of the desktop tree.
- #You are alone with him .-)
- if listener is not None:
- Desktop.getDesktop(xMSF).addTerminateListener(
- TerminateListenerProcAdapter(listener))
-
- return xFrame
-
- @classmethod
- def load(self, xInterface, sURL, sFrame, xValues):
- xComponent = None
- try:
- xComponent = xInterface.loadComponentFromURL(
- sURL, sFrame, 0, tuple(xValues))
- except Exception, exception:
- traceback.print_exc()
-
- return xComponent
-
- @classmethod
- def store(self, xMSF, xComponent, StorePath, FilterName):
- try:
- if len(FilterName):
- oStoreProperties = range(2)
- oStoreProperties[0] = uno.createUnoStruct(
- 'com.sun.star.beans.PropertyValue')
- oStoreProperties[0].Name = "FilterName"
- oStoreProperties[0].Value = FilterName
- oStoreProperties[1] = uno.createUnoStruct(
- 'com.sun.star.beans.PropertyValue')
- oStoreProperties[1].Name = "InteractionHandler"
- oStoreProperties[1].Value = xMSF.createInstance(
- "com.sun.star.comp.uui.UUIInteractionHandler")
- else:
- oStoreProperties = range(0)
-
- if StorePath.startswith("file://"):
- #Unix
- StorePath = StorePath[7:]
-
- sPath = StorePath[:(StorePath.rfind("/") + 1)]
- sFile = StorePath[(StorePath.rfind("/") + 1):]
- xComponent.storeToURL(
- unohelper.absolutize(
- unohelper.systemPathToFileUrl(sPath),
- unohelper.systemPathToFileUrl(sFile)),
- tuple(oStoreProperties))
- return True
- except ErrorCodeIOException:
- return True
- #There's a bug here, fix later
- pass
- except Exception, exception:
- traceback.print_exc()
- return False
-
- def close(self, xComponent):
- bState = False
- if xComponent != None:
- try:
- xComponent.close(True)
- bState = True
- except com.sun.star.util.CloseVetoException, exCloseVeto:
- print "could not close doc"
- bState = False
-
- else:
- xComponent.dispose()
- bState = True
-
- return bState
-
- def ArraytoCellRange(self, datalist, oTable, xpos, ypos):
- try:
- rowcount = datalist.length
- if rowcount > 0:
- colcount = datalist[0].length
- if colcount > 0:
- xNewRange = oTable.getCellRangeByPosition(
- xpos, ypos, (colcount + xpos) - 1,
- (rowcount + ypos) - 1)
- xNewRange.setDataArray(datalist)
-
- except Exception, e:
- traceback.print_exc()
-
- @classmethod
- def getFileMediaDecriptor(self, xmsf, url):
- typeDetect = xmsf.createInstance(
- "com.sun.star.document.TypeDetection")
- mediaDescr = range(1)
- mediaDescr[0] = uno.createUnoStruct(
- 'com.sun.star.beans.PropertyValue')
- mediaDescr[0].Name = "URL"
- mediaDescr[0].Value = url
- Type = typeDetect.queryTypeByDescriptor(tuple(mediaDescr), True)[0]
- if Type == "":
- return None
- else:
- return typeDetect.getByName(Type)
-
- @classmethod
- def getTypeMediaDescriptor(self, xmsf, type):
- typeDetect = xmsf.createInstance(
- "com.sun.star.document.TypeDetection")
- return typeDetect.getByName(type)
-
- '''
- returns the count of slides in a presentation,
- or the count of pages in a draw document.
- @param model a presentation or a draw document
- @return the number of slides/pages in the given document.
- '''
-
- def getSlideCount(self, model):
- return model.getDrawPages().getCount()
-
- def showMessageBox(
- self, xMSF, windowServiceName, windowAttribute, MessageText):
-
- return SystemDialog.showMessageBox(
- xMSF, windowServiceName, windowAttribute, MessageText)
diff --git a/wizards/com/sun/star/wizards/document/__init__.py b/wizards/com/sun/star/wizards/document/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/wizards/com/sun/star/wizards/document/__init__.py
+++ /dev/null
diff --git a/wizards/com/sun/star/wizards/fax/CGFax.py b/wizards/com/sun/star/wizards/fax/CGFax.py
deleted file mode 100644
index 24b5ae067c7d..000000000000
--- a/wizards/com/sun/star/wizards/fax/CGFax.py
+++ /dev/null
@@ -1,31 +0,0 @@
-from common.ConfigGroup import *
-
-class CGFax(ConfigGroup):
-
- def __init__(self):
-
- self.cp_Style = int()
- self.cp_PrintCompanyLogo = bool()
- self.cp_PrintDate = bool()
- self.cp_PrintSubjectLine = bool()
- self.cp_PrintSalutation = bool()
- self.cp_PrintCommunicationType = bool()
- self.cp_PrintGreeting = bool()
- self.cp_PrintFooter = bool()
- self.cp_CommunicationType = str()
- self.cp_Salutation = str()
- self.cp_Greeting = str()
- self.cp_SenderAddressType = int()
- self.cp_SenderCompanyName = str()
- self.cp_SenderStreet = str()
- self.cp_SenderPostCode = str()
- self.cp_SenderState = str()
- self.cp_SenderCity = str()
- self.cp_SenderFax = str()
- self.cp_ReceiverAddressType = int()
- self.cp_Footer = str()
- self.cp_FooterOnlySecondPage = bool()
- self.cp_FooterPageNumbers = bool()
- self.cp_CreationType = int()
- self.cp_TemplateName = str()
- self.cp_TemplatePath = str()
diff --git a/wizards/com/sun/star/wizards/fax/CGFaxWizard.py b/wizards/com/sun/star/wizards/fax/CGFaxWizard.py
deleted file mode 100644
index a6729e4a5486..000000000000
--- a/wizards/com/sun/star/wizards/fax/CGFaxWizard.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from common.ConfigGroup import *
-from CGFax import CGFax
-
-class CGFaxWizard(ConfigGroup):
-
- def __init__(self):
- self.cp_FaxType = int()
- self.cp_BusinessFax = CGFax()
- self.cp_PrivateFax = CGFax()
-
diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.py b/wizards/com/sun/star/wizards/fax/CallWizard.py
deleted file mode 100644
index 21414507e6c6..000000000000
--- a/wizards/com/sun/star/wizards/fax/CallWizard.py
+++ /dev/null
@@ -1,156 +0,0 @@
-import traceback
-
-class CallWizard(object):
-
- '''
- Gives a factory for creating the service. This method is called by the
- <code>JavaLoader</code>
- <p></p>
- @param stringImplementationName The implementation name of the component.
- @param xMSF The service manager, who gives access to every known service.
- @param xregistrykey Makes structural information (except regarding tree
- structures) of a single registry key accessible.
- @return Returns a <code>XSingleServiceFactory</code>
- for creating the component.
- @see com.sun.star.comp.loader.JavaLoader#
- '''
-
- @classmethod
- def __getServiceFactory(self, stringImplementationName, xMSF, \
- xregistrykey):
-
- xsingleservicefactory = None
- if stringImplementationName.equals(WizardImplementation.Name):
- xsingleservicefactory = FactoryHelper.getServiceFactory( \
- WizardImplementation, WizardImplementation.__serviceName,
- xMSF, xregistrykey)
-
- return xsingleservicefactory
-
- '''
- This class implements the component. At least the interfaces XServiceInfo,
- XTypeProvider, and XInitialization should be provided by the service.
- '''
-
- class WizardImplementation:
- __serviceName = "com.sun.star.wizards.fax.CallWizard"
- #private XMultiServiceFactory xmultiservicefactory
-
- '''
- The constructor of the inner class has a XMultiServiceFactory
- parameter.
- @param xmultiservicefactoryInitialization A special service factory
- could be introduced while initializing.
- '''
-
- @classmethod
- def WizardImplementation_XMultiServiceFactory(self, \
- xmultiservicefactoryInitialization):
-
- tmp = WizardImplementation()
- tmp.WizardImplementation_body_XMultiServiceFactory( \
- xmultiservicefactoryInitialization)
- return tmp
-
- def WizardImplementation_body_XMultiServiceFactory(self, \
- xmultiservicefactoryInitialization):
-
- self.xmultiservicefactory = xmultiservicefactoryInitialization
- if self.xmultiservicefactory != None:
- pass
-
- '''
- Execute Wizard
- @param str only valid parameter is 'start' at the moment.
- '''
-
- def trigger(self, str):
- if str.equalsIgnoreCase("start"):
- lw = FaxWizardDialogImpl(self.xmultiservicefactory)
- if not FaxWizardDialogImpl.running:
- lw.startWizard(self.xmultiservicefactory, None)
-
- '''
- The service name, that must be used to get an instance of this service
- The service manager, that gives access to all registered services.
- This method is a member of the interface for initializing an object
- directly after its creation.
- @param object This array of arbitrary objects will be passed to the
- component after its creation.
- @throws com.sun.star.uno.Exception Every exception will not be
- handled, but will be passed to the caller.
- '''
-
- def initialize(self, object):
- pass
-
- '''
- This method returns an array of all supported service names.
- @return Array of supported service names.
- '''
-
- def getSupportedServiceNames(self):
- stringSupportedServiceNames = range(1)
- stringSupportedServiceNames[0] = self.__class__.__serviceName
- return (stringSupportedServiceNames)
-
- '''
- This method returns true, if the given service will be supported by
- the component.
- @param stringService Service name.
- @return True, if the given service name will be supported.
- '''
-
- def supportsService(self, stringService):
- booleanSupportsService = False
- if stringService.equals(self.__class__.__serviceName):
- booleanSupportsService = True
-
- return (booleanSupportsService)
-
- '''
- This method returns an array of bytes, that can be used to
- unambiguously distinguish between two sets of types,
- e.g. to realise hashing functionality when the object is introspected.
- Two objects that return the same ID also have to return the same
- set of types in getTypes(). If an unique implementation Id cannot be
- provided this method has to return an empty sequence. Important:
- If the object aggregates other objects the ID has to be unique for
- the whole combination of objects.
- @return Array of bytes, in order to distinguish between two sets.
- '''
-
- def getImplementationId(self):
- byteReturn = []
- try:
- byteReturn = ("" + self.hashCode()).Bytes
- except Exception, exception:
- traceback.print_exc()
-
- return (byteReturn)
-
- '''
- Return the class name of the component.
- @return Class name of the component.
- '''
-
- def getImplementationName(self):
- return (WizardImplementation.Name)
-
- '''
- Provides a sequence of all types (usually interface types) provided
- by the object.
- @return Sequence of all types (usually interface types) provided
- by the service.
- '''
-
- def getTypes(self):
- typeReturn = []
- try:
- #COMMENTED
- #typeReturn = [new Type (XPropertyAccess.class), new Type (XJob.class), new Type (XJobExecutor.class), new Type (XTypeProvider.class), new Type (XServiceInfo.class), new Type (XInitialization.class)]
- except Exception, exception:
- traceback.print_exc()
-
- return (typeReturn)
-
diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py
deleted file mode 100644
index 3b132e40df4c..000000000000
--- a/wizards/com/sun/star/wizards/fax/FaxDocument.py
+++ /dev/null
@@ -1,134 +0,0 @@
-from text.TextDocument import *
-from text.TextSectionHandler import TextSectionHandler
-<<<<<<< HEAD
-=======
-from text.TextFieldHandler import TextFieldHandler
-from common.Configuration import Configuration
->>>>>>> master
-from common.PropertyNames import PropertyNames
-
-from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK
-from com.sun.star.style.ParagraphAdjust import CENTER
-from com.sun.star.text.PageNumberType import CURRENT
-from com.sun.star.style.NumberingType import ARABIC
-
-class FaxDocument(TextDocument):
-
- def __init__(self, xMSF, listener):
- super(FaxDocument,self).__init__(xMSF, listener, None,
- "WIZARD_LIVE_PREVIEW")
- self.keepLogoFrame = True
- self.keepTypeFrame = True
-
- def switchElement(self, sElement, bState):
- try:
- mySectionHandler = TextSectionHandler(self.xMSF,
- TextDocument.xTextDocument)
- oSection = \
- mySectionHandler.xTextDocument.TextSections.getByName(sElement)
- Helper.setUnoPropertyValue(oSection,"IsVisible",bState)
- except Exception:
- traceback.print_exc()
-
- def updateDateFields(self):
- FH = TextFieldHandler(
- TextDocument.xTextDocument, TextDocument.xTextDocument)
- FH.updateDateFields()
-
- def switchFooter(self, sPageStyle, bState, bPageNumber, sText):
- if TextDocument.xTextDocument is not None:
- TextDocument.xTextDocument.lockControllers()
- try:
- xPageStyleCollection = \
- TextDocument.xTextDocument.StyleFamilies.getByName("PageStyles")
- xPageStyle = xPageStyleCollection.getByName(sPageStyle)
-
- if bState:
- xPageStyle.setPropertyValue("FooterIsOn", True)
- xFooterText = \
- Helper.getUnoPropertyValue(xPageStyle, "FooterText")
- xFooterText.String = sText
-
- if bPageNumber:
- #Adding the Page Number
- myCursor = xFooterText.Text.createTextCursor()
- myCursor.gotoEnd(False)
- xFooterText.insertControlCharacter(myCursor,
- PARAGRAPH_BREAK, False)
- myCursor.setPropertyValue("ParaAdjust", CENTER )
-
- xPageNumberField = \
- TextDocument.xTextDocument.createInstance(
- "com.sun.star.text.TextField.PageNumber")
- xPageNumberField.setPropertyValue("SubType", CURRENT)
- xPageNumberField.NumberingType = ARABIC
- xFooterText.insertTextContent(xFooterText.End,
- xPageNumberField, False)
- else:
- Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn",
- False)
-
- TextDocument.xTextDocument.unlockControllers()
- except Exception:
- traceback.print_exc()
-
- def hasElement(self, sElement):
- if TextDocument.xTextDocument is not None:
- mySectionHandler = TextSectionHandler(self.xMSF,
- TextDocument.xTextDocument)
- return mySectionHandler.hasTextSectionByName(sElement)
- else:
- return False
-
- def switchUserField(self, sFieldName, sNewContent, bState):
- myFieldHandler = TextFieldHandler(
- self.xMSF, TextDocument.xTextDocument)
- if bState:
- myFieldHandler.changeUserFieldContent(sFieldName, sNewContent)
- else:
- myFieldHandler.changeUserFieldContent(sFieldName, "")
-
- def fillSenderWithUserData(self):
- try:
- myFieldHandler = TextFieldHandler(TextDocument.xTextDocument,
- TextDocument.xTextDocument)
- oUserDataAccess = Configuration.getConfigurationRoot(
- self.xMSF, "org.openoffice.UserProfile/Data", False)
- myFieldHandler.changeUserFieldContent("Company",
- Helper.getUnoObjectbyName(oUserDataAccess, "o"))
- myFieldHandler.changeUserFieldContent("Street",
- Helper.getUnoObjectbyName(oUserDataAccess, "street"))
- myFieldHandler.changeUserFieldContent("PostCode",
- Helper.getUnoObjectbyName(oUserDataAccess, "postalcode"))
- myFieldHandler.changeUserFieldContent(
- PropertyNames.PROPERTY_STATE,
- Helper.getUnoObjectbyName(oUserDataAccess, "st"))
- myFieldHandler.changeUserFieldContent("City",
- Helper.getUnoObjectbyName(oUserDataAccess, "l"))
- myFieldHandler.changeUserFieldContent("Fax",
- Helper.getUnoObjectbyName(oUserDataAccess,
- "facsimiletelephonenumber"))
- except Exception:
- traceback.print_exc()
-
- def killEmptyUserFields(self):
- myFieldHandler = TextFieldHandler(
- self.xMSF, TextDocument.xTextDocument)
- myFieldHandler.removeUserFieldByContent("")
-
- def killEmptyFrames(self):
- try:
- if not self.keepLogoFrame:
- xTF = self.getFrameByName("Company Logo",
- TextDocument.xTextDocument)
- if xTF is not None:
- xTF.dispose()
-
- if not self.keepTypeFrame:
- xTF = self.getFrameByName("Communication Type",
- TextDocument.xTextDocument)
- if xTF is not None:
- xTF.dispose()
-
- except Exception:
- traceback.print_exc()
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py
deleted file mode 100644
index 8d7ea270f18e..000000000000
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py
+++ /dev/null
@@ -1,756 +0,0 @@
-from ui.WizardDialog import *
-from FaxWizardDialogResources import FaxWizardDialogResources
-from FaxWizardDialogConst import *
-from com.sun.star.awt.FontUnderline import SINGLE
-
-class FaxWizardDialog(WizardDialog):
-
- def __init__(self, xmsf):
- super(FaxWizardDialog,self).__init__(xmsf, HIDMAIN )
-
- #Load Resources
- self.resources = FaxWizardDialogResources(xmsf)
-
- #set dialog properties...
- Helper.setUnoPropertyValues(self.xDialogModel,
- ("Closeable", PropertyNames.PROPERTY_HEIGHT, "Moveable",
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX,
- "Title", PropertyNames.PROPERTY_WIDTH),
- (True, 210, True, 104, 52, 1, 1,
- self.resources.resFaxWizardDialog_title, 310))
-
- self.fontDescriptor1 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor2 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor4 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor5 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- #Set member- FontDescriptors...
- self.fontDescriptor1.Weight = 150
- self.fontDescriptor1.Underline = SINGLE
- self.fontDescriptor2.Weight = 100
- self.fontDescriptor4.Weight = 100
- self.fontDescriptor5.Weight = 150
-
- '''
- build components
- '''
- def buildStep1(self):
- self.optBusinessFax = self.insertRadioButton("optBusinessFax",
- OPTBUSINESSFAX_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, OPTBUSINESSFAX_HID, self.resources.resoptBusinessFax_value,
- 97, 28, 1, 1, 184), self)
- self.lstBusinessStyle = self.insertListBox("lstBusinessStyle",
- LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED,
- ("Dropdown", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, LSTBUSINESSSTYLE_HID, 180, 40, 1, 3, 74), self)
- self.optPrivateFax = self.insertRadioButton("optPrivateFax",
- OPTPRIVATEFAX_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, OPTPRIVATEFAX_HID, self.resources.resoptPrivateFax_value,
- 97, 81, 1, 2, 184), self)
- self.lstPrivateStyle = self.insertListBox("lstPrivateStyle",
- LSTPRIVATESTYLE_ACTION_PERFORMED,
- LSTPRIVATESTYLE_ITEM_CHANGED,
- ("Dropdown", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, LSTPRIVATESTYLE_HID, 180, 95, 1,
- 4, 74), self)
-<<<<<<< HEAD
- self.insertLabel("lblBusinessStyle",
-=======
- self.lblBusinessStyle = self.insertLabel("lblBusinessStyle",
->>>>>>> master
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblBusinessStyle_value,
- 110, 42, 1, 32, 60))
-
-<<<<<<< HEAD
- self.insertLabel("lblTitle1",
-=======
- self.lblTitle1 = self.insertLabel("lblTitle1",
->>>>>>> master
- ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor5, 16, self.resources.reslblTitle1_value,
- True, 91, 8, 1, 37, 212))
-<<<<<<< HEAD
- self.insertLabel("lblPrivateStyle",
-=======
- self.lblPrivateStyle = self.insertLabel("lblPrivateStyle",
->>>>>>> master
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblPrivateStyle_value, 110, 95, 1, 50, 60))
-<<<<<<< HEAD
- self.insertLabel("lblIntroduction",
-=======
- self.lblIntroduction = self.insertLabel("lblIntroduction",
->>>>>>> master
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (39, self.resources.reslblIntroduction_value, True, 104, 145, 1, 55, 199))
- self.ImageControl3 = self.insertInfoImage(92, 145, 1)
- def buildStep2(self):
- self.chkUseLogo = self.insertCheckBox("chkUseLogo",
- CHKUSELOGO_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, CHKUSELOGO_HID, self.resources.reschkUseLogo_value, 97, 28,
- 0, 2, 5, 212), self)
- self.chkUseDate = self.insertCheckBox("chkUseDate",
- CHKUSEDATE_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, CHKUSEDATE_HID, self.resources.reschkUseDate_value, 97, 43,
- 0, 2, 6, 212), self)
- self.chkUseCommunicationType = self.insertCheckBox(
- "chkUseCommunicationType",
- CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, CHKUSECOMMUNICATIONTYPE_HID,
- self.resources.reschkUseCommunicationType_value, 97, 57,
- 0, 2, 7, 100), self)
- self.lstCommunicationType = self.insertComboBox(
- "lstCommunicationType",
- LSTCOMMUNICATIONTYPE_ACTION_PERFORMED,
- LSTCOMMUNICATIONTYPE_ITEM_CHANGED,
- LSTCOMMUNICATIONTYPE_TEXT_CHANGED,
- ("Dropdown", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, LSTCOMMUNICATIONTYPE_HID, 105, 68, 2,
- 8, 174), self)
- self.chkUseSubject = self.insertCheckBox("chkUseSubject",
- CHKUSESUBJECT_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, CHKUSESUBJECT_HID, self.resources.reschkUseSubject_value,
- 97, 87, 0, 2, 9, 212), self)
- self.chkUseSalutation = self.insertCheckBox("chkUseSalutation",
- CHKUSESALUTATION_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, CHKUSESALUTATION_HID,
- self.resources.reschkUseSalutation_value, 97, 102,
- 0, 2, 10, 100), self)
- self.lstSalutation = self.insertComboBox("lstSalutation",
- LSTSALUTATION_ACTION_PERFORMED,
- LSTSALUTATION_ITEM_CHANGED,
- LSTSALUTATION_TEXT_CHANGED,
- ("Dropdown", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, LSTSALUTATION_HID, 105, 113, 2,
- 11, 174), self)
- self.chkUseGreeting = self.insertCheckBox("chkUseGreeting",
- CHKUSEGREETING_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, CHKUSEGREETING_HID,
- self.resources.reschkUseGreeting_value, 97, 132,
- 0, 2, 12, 100), self)
- self.lstGreeting = self.insertComboBox("lstGreeting",
- LSTGREETING_ACTION_PERFORMED,
- LSTGREETING_ITEM_CHANGED,
- LSTGREETING_TEXT_CHANGED,
- ("Dropdown", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, LSTGREETING_HID, 105, 143, 2, 13, 174), self)
- self.chkUseFooter = self.insertCheckBox("chkUseFooter",
- CHKUSEFOOTER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, CHKUSEFOOTER_HID,
- self.resources.reschkUseFooter_value, 97, 163,
- 0, 2, 14, 212), self)
-<<<<<<< HEAD
- self.insertLabel("lblTitle3",
-=======
- self.lblTitle3 = self.insertLabel("lblTitle3",
->>>>>>> master
- ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor5, 16, self.resources.reslblTitle3_value,
- True, 91, 8, 2, 59, 212))
-
- def buildStep3(self):
- self.optSenderPlaceholder = self.insertRadioButton(
- "optSenderPlaceholder",
- OPTSENDERPLACEHOLDER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, OPTSENDERPLACEHOLDER_HID,
- self.resources.resoptSenderPlaceholder_value,
- 104, 42, 3, 15, 149), self)
- self.optSenderDefine = self.insertRadioButton("optSenderDefine",
- OPTSENDERDEFINE_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, OPTSENDERDEFINE_HID, self.resources.resoptSenderDefine_value,
- 104, 54, 3, 16, 149), self)
- self.txtSenderName = self.insertTextField("txtSenderName",
- TXTSENDERNAME_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
-<<<<<<< HEAD
- (12, TXTSENDERNAME_HID, 182, 67, 3, 17, 119), self)
-=======
- (12, TXTSENDERNAME_HID, 182, 67, 3,
- 17, 119), self)
->>>>>>> master
- self.txtSenderStreet = self.insertTextField("txtSenderStreet",
- TXTSENDERSTREET_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
-<<<<<<< HEAD
- (12, TXTSENDERSTREET_HID, 182, 81, 3, 18, 119), self)
-=======
- (12, TXTSENDERSTREET_HID, 182, 81, 3,
- 18, 119), self)
->>>>>>> master
- self.txtSenderPostCode = self.insertTextField("txtSenderPostCode",
- TXTSENDERPOSTCODE_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
-<<<<<<< HEAD
- (12, TXTSENDERPOSTCODE_HID, 182, 95, 3, 19, 25), self)
-=======
- (12, TXTSENDERPOSTCODE_HID, 182, 95, 3,
- 19, 25), self)
->>>>>>> master
- self.txtSenderState = self.insertTextField("txtSenderState",
- TXTSENDERSTATE_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
-<<<<<<< HEAD
- (12, TXTSENDERSTATE_HID, 211, 95, 3, 20, 21), self)
-=======
- (12, TXTSENDERSTATE_HID, 211, 95, 3,
- 20, 21), self)
->>>>>>> master
- self.txtSenderCity = self.insertTextField("txtSenderCity",
- TXTSENDERCITY_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
-<<<<<<< HEAD
- (12, TXTSENDERCITY_HID, 236, 95, 3, 21, 65), self)
-=======
- (12, TXTSENDERCITY_HID, 236, 95, 3,
- 21, 65), self)
->>>>>>> master
- self.txtSenderFax = self.insertTextField("txtSenderFax",
- TXTSENDERFAX_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
-<<<<<<< HEAD
- (12, TXTSENDERFAX_HID, 182, 109, 3, 22, 119), self)
-=======
- (12, TXTSENDERFAX_HID, 182, 109, 3,
- 22, 119), self)
->>>>>>> master
- self.optReceiverPlaceholder = self.insertRadioButton(
- "optReceiverPlaceholder",
- OPTRECEIVERPLACEHOLDER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, OPTRECEIVERPLACEHOLDER_HID,
- self.resources.resoptReceiverPlaceholder_value,
- 104, 148, 3, 23, 200), self)
- self.optReceiverDatabase = self.insertRadioButton(
- "optReceiverDatabase",
- OPTRECEIVERDATABASE_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, OPTRECEIVERDATABASE_HID,
- self.resources.resoptReceiverDatabase_value, 104, 160, 3,
- 24, 200), self)
-<<<<<<< HEAD
- self.insertLabel("lblSenderAddress",
-=======
- self.lblSenderAddress = self.insertLabel("lblSenderAddress",
->>>>>>> master
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblSenderAddress_value, 97, 28, 3, 46, 136))
-<<<<<<< HEAD
- self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT,
-=======
- self.FixedLine2 = self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT,
->>>>>>> master
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (5, 90, 126, 3, 51, 212))
-<<<<<<< HEAD
- self.insertLabel("lblSenderName",
-=======
- self.lblSenderName = self.insertLabel("lblSenderName",
->>>>>>> master
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
-<<<<<<< HEAD
- (8, self.resources.reslblSenderName_value, 113, 69, 3, 52, 68))
- self.insertLabel("lblSenderStreet",
-=======
- (8, self.resources.reslblSenderName_value, 113, 69, 3,
- 52, 68))
- self.lblSenderStreet = self.insertLabel("lblSenderStreet",
->>>>>>> master
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
-<<<<<<< HEAD
- (8, self.resources.reslblSenderStreet_value, 113, 82, 3, 53, 68))
- self.insertLabel("lblPostCodeCity",
-=======
- (8, self.resources.reslblSenderStreet_value, 113, 82, 3,
- 53, 68))
- self.lblPostCodeCity = self.insertLabel("lblPostCodeCity",
->>>>>>> master
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
-<<<<<<< HEAD
- (8, self.resources.reslblPostCodeCity_value, 113, 97, 3, 54, 68))
- self.insertLabel("lblTitle4",
-=======
- (8, self.resources.reslblPostCodeCity_value,
- 113, 97, 3, 54, 68))
- self.lblTitle4 = self.insertLabel("lblTitle4",
->>>>>>> master
- ("FontDescriptor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor5, 16, self.resources.reslblTitle4_value,
- True, 91, 8, 3, 60, 212))
-<<<<<<< HEAD
- self.insertLabel("lblSenderFax",
-=======
- self.Label1 = self.insertLabel("lblSenderFax",
->>>>>>> master
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.resLabel1_value, 113, 111, 3, 68, 68))
-<<<<<<< HEAD
- self.insertLabel("Label2",
-=======
- self.Label2 = self.insertLabel("Label2",
->>>>>>> master
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.resLabel2_value, 97, 137, 3, 69, 136))
-
- def buildStep4(self):
- self.txtFooter = self.insertTextField("txtFooter",
- TXTFOOTER_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (47, TXTFOOTER_HID, True, 97, 40, 4, 25, 203), self)
- self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages",
- CHKFOOTERNEXTPAGES_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, CHKFOOTERNEXTPAGES_HID,
- self.resources.reschkFooterNextPages_value, 97, 92,
- 0, 4, 26, 202), self)
- self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers",
- CHKFOOTERPAGENUMBERS_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, CHKFOOTERPAGENUMBERS_HID,
- self.resources.reschkFooterPageNumbers_value, 97, 106,
- 0, 4, 27, 201), self)
-<<<<<<< HEAD
- self.insertLabel("lblFooter",
-=======
- self.lblFooter = self.insertLabel("lblFooter",
->>>>>>> master
- ("FontDescriptor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor4, 8, self.resources.reslblFooter_value,
- 97, 28, 4, 33, 116))
-<<<<<<< HEAD
- self.insertLabel("lblTitle5",
-=======
- self.lblTitle5 = self.insertLabel("lblTitle5",
->>>>>>> master
- ("FontDescriptor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor5, 16, self.resources.reslblTitle5_value,
- True, 91, 8, 4, 61, 212))
-
- def buildStep5(self):
- self.txtTemplateName = self.insertTextField("txtTemplateName",
- TXTTEMPLATENAME_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- "Text",
- PropertyNames.PROPERTY_WIDTH),
- (12, TXTTEMPLATENAME_HID, 202, 56, 5, 28,
- self.resources.restxtTemplateName_value, 100), self)
-
- self.optCreateFax = self.insertRadioButton("optCreateFax",
- OPTCREATEFAX_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, OPTCREATEFAX_HID, self.resources.resoptCreateFax_value,
- 104, 111, 5, 30, 198), self)
- self.optMakeChanges = self.insertRadioButton("optMakeChanges",
- OPTMAKECHANGES_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, OPTMAKECHANGES_HID, self.resources.resoptMakeChanges_value,
- 104, 123, 5, 31, 198), self)
-<<<<<<< HEAD
- self.insertLabel("lblFinalExplanation1",
-=======
- self.lblFinalExplanation1 = self.insertLabel("lblFinalExplanation1",
->>>>>>> master
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (28, self.resources.reslblFinalExplanation1_value,
- True, 97, 28, 5, 34, 205))
-<<<<<<< HEAD
- self.insertLabel("lblProceed",
-=======
- self.lblProceed = self.insertLabel("lblProceed",
->>>>>>> master
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblProceed_value, 97, 100, 5,
- 35, 204))
-<<<<<<< HEAD
- self.insertLabel("lblFinalExplanation2",
-=======
- self.lblFinalExplanation2 = self.insertLabel("lblFinalExplanation2",
->>>>>>> master
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (33, self.resources.reslblFinalExplanation2_value, True, 104, 145, 5,
- 36, 199))
-<<<<<<< HEAD
- self.insertImage("ImageControl2",
-=======
- self.ImageControl2 = self.insertImage("ImageControl2",
->>>>>>> master
- ("Border",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_IMAGEURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "ScaleImage",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (0, 10, UIConsts.INFOIMAGEURL, 92, 145,
- False, 5, 47, 10))
-<<<<<<< HEAD
- self.insertLabel("lblTemplateName",
-=======
- self.lblTemplateName = self.insertLabel("lblTemplateName",
->>>>>>> master
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblTemplateName_value, 97, 58, 5,
- 57, 101))
-
-<<<<<<< HEAD
- self.insertLabel("lblTitle6",
-=======
- self.lblTitle6 = self.insertLabel("lblTitle6",
->>>>>>> master
- ("FontDescriptor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor5, 16, self.resources.reslblTitle6_value,
- True, 91, 8, 5, 62, 212))
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py
deleted file mode 100644
index e690248caa70..000000000000
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py
+++ /dev/null
@@ -1,87 +0,0 @@
-from common.HelpIds import HelpIds
-
-
-OPTBUSINESSFAX_ITEM_CHANGED = "optBusinessFaxItemChanged"
-LSTBUSINESSSTYLE_ACTION_PERFORMED = None # "lstBusinessStyleActionPerformed"
-LSTBUSINESSSTYLE_ITEM_CHANGED = "lstBusinessStyleItemChanged"
-OPTPRIVATEFAX_ITEM_CHANGED = "optPrivateFaxItemChanged"
-LSTPRIVATESTYLE_ACTION_PERFORMED = None # "lstPrivateStyleActionPerformed"
-LSTPRIVATESTYLE_ITEM_CHANGED = "lstPrivateStyleItemChanged"
-CHKUSELOGO_ITEM_CHANGED = "chkUseLogoItemChanged"
-CHKUSEDATE_ITEM_CHANGED = "chkUseDateItemChanged"
-CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED = "chkUseCommunicationItemChanged"
-LSTCOMMUNICATIONTYPE_ACTION_PERFORMED = None # "lstCommunicationActionPerformed"
-LSTCOMMUNICATIONTYPE_ITEM_CHANGED = "lstCommunicationItemChanged"
-LSTCOMMUNICATIONTYPE_TEXT_CHANGED = "lstCommunicationItemChanged"
-CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged"
-CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged"
-LSTSALUTATION_ACTION_PERFORMED = None # "lstSalutationActionPerformed"
-LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged"
-LSTSALUTATION_TEXT_CHANGED = "lstSalutationItemChanged"
-CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged"
-LSTGREETING_ACTION_PERFORMED = None # "lstGreetingActionPerformed"
-LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged"
-LSTGREETING_TEXT_CHANGED = "lstGreetingItemChanged"
-CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged"
-OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged"
-OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged"
-TXTSENDERNAME_TEXT_CHANGED = "txtSenderNameTextChanged"
-TXTSENDERSTREET_TEXT_CHANGED = "txtSenderStreetTextChanged"
-TXTSENDERPOSTCODE_TEXT_CHANGED = "txtSenderPostCodeTextChanged"
-TXTSENDERSTATE_TEXT_CHANGED = "txtSenderStateTextChanged"
-TXTSENDERCITY_TEXT_CHANGED = "txtSenderCityTextChanged"
-TXTSENDERFAX_TEXT_CHANGED = "txtSenderFaxTextChanged"
-OPTRECEIVERPLACEHOLDER_ITEM_CHANGED = "optReceiverPlaceholderItemChanged"
-OPTRECEIVERDATABASE_ITEM_CHANGED = "optReceiverDatabaseItemChanged"
-TXTFOOTER_TEXT_CHANGED = "txtFooterTextChanged"
-CHKFOOTERNEXTPAGES_ITEM_CHANGED = "chkFooterNextPagesItemChanged"
-CHKFOOTERPAGENUMBERS_ITEM_CHANGED = "chkFooterPageNumbersItemChanged"
-TXTTEMPLATENAME_TEXT_CHANGED = "txtTemplateNameTextChanged"
-FILETEMPLATEPATH_TEXT_CHANGED = None # "fileTemplatePathTextChanged"
-<<<<<<< HEAD
-OPTCREATEFAX_ITEM_CHANGED = "optCreateFromTemplateItemChanged"
-=======
-OPTCREATEFAX_ITEM_CHANGED = "optCreateFaxItemChanged"
->>>>>>> master
-OPTMAKECHANGES_ITEM_CHANGED = "optMakeChangesItemChanged"
-imageURLImageControl2 = None #"images/ImageControl2"
-imageURLImageControl3 = None #"images/ImageControl3"
-
-#Help IDs
-
-HID = 41119 #TODO enter first hid here
-HIDMAIN = 41180
-OPTBUSINESSFAX_HID = HelpIds.getHelpIdString(HID + 1)
-LSTBUSINESSSTYLE_HID = HelpIds.getHelpIdString(HID + 2)
-OPTPRIVATEFAX_HID = HelpIds.getHelpIdString(HID + 3)
-LSTPRIVATESTYLE_HID = HelpIds.getHelpIdString(HID + 4)
-IMAGECONTROL3_HID = HelpIds.getHelpIdString(HID + 5)
-CHKUSELOGO_HID = HelpIds.getHelpIdString(HID + 6)
-CHKUSEDATE_HID = HelpIds.getHelpIdString(HID + 7)
-CHKUSECOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 8)
-LSTCOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 9)
-CHKUSESUBJECT_HID = HelpIds.getHelpIdString(HID + 10)
-CHKUSESALUTATION_HID = HelpIds.getHelpIdString(HID + 11)
-LSTSALUTATION_HID = HelpIds.getHelpIdString(HID + 12)
-CHKUSEGREETING_HID = HelpIds.getHelpIdString(HID + 13)
-LSTGREETING_HID = HelpIds.getHelpIdString(HID + 14)
-CHKUSEFOOTER_HID = HelpIds.getHelpIdString(HID + 15)
-OPTSENDERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 16)
-OPTSENDERDEFINE_HID = HelpIds.getHelpIdString(HID + 17)
-TXTSENDERNAME_HID = HelpIds.getHelpIdString(HID + 18)
-TXTSENDERSTREET_HID = HelpIds.getHelpIdString(HID + 19)
-TXTSENDERPOSTCODE_HID = HelpIds.getHelpIdString(HID + 20)
-TXTSENDERSTATE_HID = HelpIds.getHelpIdString(HID + 21)
-TXTSENDERCITY_HID = HelpIds.getHelpIdString(HID + 22)
-TXTSENDERFAX_HID = HelpIds.getHelpIdString(HID + 23)
-OPTRECEIVERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 24)
-OPTRECEIVERDATABASE_HID = HelpIds.getHelpIdString(HID + 25)
-TXTFOOTER_HID = HelpIds.getHelpIdString(HID + 26)
-CHKFOOTERNEXTPAGES_HID = HelpIds.getHelpIdString(HID + 27)
-CHKFOOTERPAGENUMBERS_HID = HelpIds.getHelpIdString(HID + 28)
-TXTTEMPLATENAME_HID = HelpIds.getHelpIdString(HID + 29)
-FILETEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 30)
-OPTCREATEFAX_HID = HelpIds.getHelpIdString(HID + 31)
-OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 32)
-IMAGECONTROL2_HID = HelpIds.getHelpIdString(HID + 33)
-
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
deleted file mode 100644
index 4da4146322c6..000000000000
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+++ /dev/null
@@ -1,858 +0,0 @@
-from FaxWizardDialog import *
-from CGFaxWizard import *
-from FaxDocument import *
-<<<<<<< HEAD
-from ui.PathSelection import PathSelection
-from common.FileAccess import FileAccess
-from ui.event.UnoDataAware import UnoDataAware
-from ui.event.RadioDataAware import RadioDataAware
-from text.TextFieldHandler import TextFieldHandler
-from common.SystemDialog import SystemDialog
-from common.NoValidPathException import NoValidPathException
-
-from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO
-from com.sun.star.uno import RuntimeException
-from com.sun.star.util import CloseVetoException
-=======
-from ui.PathSelection import *
-from common.FileAccess import *
-from ui.event.UnoDataAware import *
-from ui.event.RadioDataAware import *
-from common.Configuration import *
-from document.OfficeDocument import OfficeDocument
-from text.TextFieldHandler import TextFieldHandler
-from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO
-
-from common.NoValidPathException import *
-from com.sun.star.uno import RuntimeException
-from com.sun.star.util import CloseVetoException
-
->>>>>>> master
-from com.sun.star.view.DocumentZoomType import OPTIMAL
-from com.sun.star.document.UpdateDocMode import FULL_UPDATE
-from com.sun.star.document.MacroExecMode import ALWAYS_EXECUTE
-
-class FaxWizardDialogImpl(FaxWizardDialog):
-
- def leaveStep(self, nOldStep, nNewStep):
- pass
-
- def enterStep(self, nOldStep, nNewStep):
- pass
-
- RM_TYPESTYLE = 1
- RM_ELEMENTS = 2
- RM_SENDERRECEIVER = 3
- RM_FOOTER = 4
- RM_FINALSETTINGS = 5
-
-<<<<<<< HEAD
- lstBusinessStylePos = None
- lstPrivateStylePos = None
-
- def __init__(self, xmsf):
- super(FaxWizardDialogImpl, self).__init__(xmsf)
-=======
-
- def __init__(self, xmsf):
- super(FaxWizardDialogImpl, self).__init__(xmsf)
- self.mainDA = []
- self.faxDA = []
->>>>>>> master
- self.bSaveSuccess = False
- self.filenameChanged = False
- self.UserTemplatePath = ""
- self.sTemplatePath = ""
-
- @classmethod
- def main(self, args):
- #only being called when starting wizard remotely
- try:
- ConnectStr = \
- "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
- xLocMSF = Desktop.connect(ConnectStr)
- lw = FaxWizardDialogImpl(xLocMSF)
- lw.startWizard(xLocMSF, None)
- except RuntimeException, e:
- # TODO Auto-generated catch block
- traceback.print_exc()
- except Exception, e:
- # TODO Auto-generated catch blocksetMaxStep
- traceback.print_exc()
-
- def startWizard(self, xMSF, CurPropertyValue):
- self.running = True
- try:
-<<<<<<< HEAD
- #Number of steps on WizardDialog
-=======
- #Number of steps on WizardDialog:
->>>>>>> master
- self.nMaxStep = 5
-
- #instatiate The Document Frame for the Preview
- self.myFaxDoc = FaxDocument(xMSF, self)
-
- #create the dialog:
- self.drawNaviBar()
-
- self.buildStep1()
- self.buildStep2()
- self.buildStep3()
- self.buildStep4()
- self.buildStep5()
-
- self.initializeSalutation()
- self.initializeGreeting()
- self.initializeCommunication()
- self.__initializePaths()
-
- #special Control fFrameor setting the save Path:
- self.insertPathSelectionControl()
-
-<<<<<<< HEAD
- self.initializeTemplates(xMSF)
-
-=======
->>>>>>> master
- #load the last used settings
- #from the registry and apply listeners to the controls:
- self.initConfiguration()
-
-<<<<<<< HEAD
-
- if self.myPathSelection.xSaveTextBox.Text.lower() == "":
- self.myPathSelection.initializePath()
-
- xContainerWindow = self.myFaxDoc.xFrame.ContainerWindow
- self.createWindowPeer(xContainerWindow)
-=======
- self.initializeTemplates(xMSF)
-
- #update the dialog UI according to the loaded Configuration
- self.__updateUI()
- if self.myPathSelection.xSaveTextBox.Text.lower() == "":
- self.myPathSelection.initializePath()
-
- self.xContainerWindow = self.myFaxDoc.xFrame.ContainerWindow
- self.createWindowPeer(self.xContainerWindow)
->>>>>>> master
-
- #add the Roadmap to the dialog:
- self.insertRoadmap()
-
- #load the last used document and apply last used settings:
- #TODO:
- self.setConfiguration()
-
- #If the configuration does not define
- #Greeting/Salutation/CommunicationType yet choose a default
- self.__setDefaultForGreetingAndSalutationAndCommunication()
-
- #disable funtionality that is not supported by the template:
- self.initializeElements()
-
- #disable the document, so that the user cannot change anything:
- self.myFaxDoc.xFrame.ComponentWindow.Enable = False
- self.executeDialogFromComponent(self.myFaxDoc.xFrame)
- self.removeTerminateListener()
- self.closeDocument()
- self.running = False
- except Exception, exception:
- self.removeTerminateListener()
- traceback.print_exc()
- self.running = False
- return
-
- def cancelWizard(self):
- self.xUnoDialog.endExecute()
- self.running = False
-
- def finishWizard(self):
- self.switchToStep(self.getCurrentStep(), self.nMaxStep)
- self.myFaxDoc.setWizardTemplateDocInfo( \
- self.resources.resFaxWizardDialog_title,
- self.resources.resTemplateDescription)
- endWizard = True
- try:
- fileAccess = FileAccess(self.xMSF)
- self.sPath = self.myPathSelection.getSelectedPath()
- if self.sPath == "":
- self.myPathSelection.triggerPathPicker()
- self.sPath = self.myPathSelection.getSelectedPath()
-
- self.sPath = fileAccess.getURL(self.sPath)
- #first, if the filename was not changed, thus
- #it is coming from a saved session, check if the
- # file exists and warn the user.
- if not self.filenameChanged:
- if fileAccess.exists(self.sPath, True):
- answer = SystemDialog.showMessageBox(
- self.xMSF, "MessBox", YES_NO + DEF_NO,
-<<<<<<< HEAD
- self.resources.resOverwriteWarning,
- self.xUnoDialog.Peer)
-=======
- self.resources.resOverwriteWarning, self.xUnoDialog.Peer)
->>>>>>> master
- if answer == 3:
- # user said: no, do not overwrite...
- endWizard = False
- return False
-
- self.myFaxDoc.setWizardTemplateDocInfo( \
- self.resources.resFaxWizardDialog_title,
- self.resources.resTemplateDescription)
- self.myFaxDoc.killEmptyUserFields()
- self.myFaxDoc.keepLogoFrame = (self.chkUseLogo.State is not 0)
- self.myFaxDoc.keepTypeFrame = \
- (self.chkUseCommunicationType.State is not 0)
- self.myFaxDoc.killEmptyFrames()
- self.bSaveSuccess = OfficeDocument.store(self.xMSF, TextDocument.xTextDocument,
- self.sPath, "writer8_template")
- if self.bSaveSuccess:
- self.saveConfiguration()
- xIH = self.xMSF.createInstance( \
- "com.sun.star.comp.uui.UUIInteractionHandler")
- loadValues = range(4)
- loadValues[0] = uno.createUnoStruct( \
- 'com.sun.star.beans.PropertyValue')
- loadValues[0].Name = "AsTemplate"
- loadValues[0].Value = True
- loadValues[1] = uno.createUnoStruct( \
- 'com.sun.star.beans.PropertyValue')
- loadValues[1].Name = "MacroExecutionMode"
- loadValues[1].Value = ALWAYS_EXECUTE
- loadValues[2] = uno.createUnoStruct( \
- 'com.sun.star.beans.PropertyValue')
- loadValues[2].Name = "UpdateDocMode"
- loadValues[2].Value = FULL_UPDATE
- loadValues[3] = uno.createUnoStruct( \
- 'com.sun.star.beans.PropertyValue')
- loadValues[3].Name = "InteractionHandler"
- loadValues[3].Value = xIH
- if self.bEditTemplate:
- loadValues[0].Value = False
- else:
- loadValues[0].Value = True
-
- oDoc = OfficeDocument.load(Desktop.getDesktop(self.xMSF),
- self.sPath, "_default", loadValues)
- myViewHandler = ViewHandler(self.xMSF, oDoc)
- myViewHandler.setViewSetting("ZoomType", OPTIMAL)
- else:
- pass
- #TODO: Error Handling
-
- except Exception, e:
- traceback.print_exc()
- finally:
- if endWizard:
- self.xUnoDialog.endExecute()
- self.running = False
-
- return True
-
- def closeDocument(self):
- try:
- self.myFaxDoc.xFrame.close(False)
- except CloseVetoException, e:
- traceback.print_exc()
-
- def insertRoadmap(self):
- self.addRoadmap()
-<<<<<<< HEAD
- self.insertRoadMapItems(
- [True, True, True, False, True], self.resources.RoadmapLabels)
-
-=======
- i = 0
- i = self.insertRoadmapItem(
- 0, True, self.resources.RoadmapLabels[
- FaxWizardDialogImpl.RM_TYPESTYLE - 1],
- FaxWizardDialogImpl.RM_TYPESTYLE)
- i = self.insertRoadmapItem(
- i, True, self.resources.RoadmapLabels[
- FaxWizardDialogImpl.RM_ELEMENTS - 1],
- FaxWizardDialogImpl.RM_ELEMENTS)
- i = self.insertRoadmapItem(
- i, True, self.resources.RoadmapLabels[
- FaxWizardDialogImpl.RM_SENDERRECEIVER - 1],
- FaxWizardDialogImpl.RM_SENDERRECEIVER)
- i = self.insertRoadmapItem(
- i, False, self.resources.RoadmapLabels[
- FaxWizardDialogImpl.RM_FOOTER - 1], FaxWizardDialogImpl.RM_FOOTER)
- i = self.insertRoadmapItem(i, True,
- self.resources.RoadmapLabels[
- FaxWizardDialogImpl.RM_FINALSETTINGS - 1],
- FaxWizardDialogImpl.RM_FINALSETTINGS)
->>>>>>> master
- self.setRoadmapInteractive(True)
- self.setRoadmapComplete(True)
- self.setCurrentRoadmapItemID(1)
-
- def insertPathSelectionControl(self):
- self.myPathSelection = PathSelection(self.xMSF,
- self, PathSelection.TransferMode.SAVE,
- PathSelection.DialogTypes.FILE)
- self.myPathSelection.insert(
- 5, 97, 70, 205, 45, self.resources.reslblTemplatePath_value,
- True, HelpIds.getHelpIdString(HID + 34),
- HelpIds.getHelpIdString(HID + 35))
- self.myPathSelection.sDefaultDirectory = self.UserTemplatePath
- self.myPathSelection.sDefaultName = "myFaxTemplate.ott"
- self.myPathSelection.sDefaultFilter = "writer8_template"
- self.myPathSelection.addSelectionListener( \
- self.myPathSelectionListener())
-
-<<<<<<< HEAD
-=======
- def __updateUI(self):
- UnoDataAware.updateUIs(self.mainDA)
- UnoDataAware.updateUIs(self.faxDA)
-
->>>>>>> master
- def __initializePaths(self):
- try:
- self.sTemplatePath = FileAccess.getOfficePath2(self.xMSF,
- "Template", "share", "/wizard")
- self.UserTemplatePath = FileAccess.getOfficePath2(self.xMSF,
- "Template", "user", "")
- self.sBitmapPath = FileAccess.combinePaths(self.xMSF,
- self.sTemplatePath, "/../wizard/bitmap")
- except NoValidPathException, e:
- traceback.print_exc()
-
- def initializeTemplates(self, xMSF):
- try:
- self.sFaxPath = FileAccess.combinePaths(xMSF, self.sTemplatePath,
- "/wizard/fax")
- self.sWorkPath = FileAccess.getOfficePath2(xMSF, "Work", "", "")
- self.BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus",
- self.sFaxPath)
- self.PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri",
- self.sFaxPath)
- self.setControlProperty("lstBusinessStyle", "StringItemList",
- tuple(self.BusinessFiles[0]))
- self.setControlProperty("lstPrivateStyle", "StringItemList",
- tuple(self.PrivateFiles[0]))
- self.setControlProperty("lstBusinessStyle", "SelectedItems", (0,))
- self.setControlProperty("lstPrivateStyle", "SelectedItems" , (0,))
- return True
- except NoValidPathException, e:
- # TODO Auto-generated catch block
- traceback.print_exc()
- return False
-
- def initializeElements(self):
- self.setControlProperty("chkUseLogo",
- PropertyNames.PROPERTY_ENABLED,
- self.myFaxDoc.hasElement("Company Logo"))
- self.setControlProperty("chkUseSubject",
- PropertyNames.PROPERTY_ENABLED,
- self.myFaxDoc.hasElement("Subject Line"))
- self.setControlProperty("chkUseDate",
- PropertyNames.PROPERTY_ENABLED,
- self.myFaxDoc.hasElement("Date"))
- self.myFaxDoc.updateDateFields()
-
- def initializeSalutation(self):
- self.setControlProperty("lstSalutation", "StringItemList",
- self.resources.SalutationLabels)
-
- def initializeGreeting(self):
- self.setControlProperty("lstGreeting", "StringItemList",
- self.resources.GreetingLabels)
-
- def initializeCommunication(self):
- self.setControlProperty("lstCommunicationType", "StringItemList",
- self.resources.CommunicationLabels)
-
- def __setDefaultForGreetingAndSalutationAndCommunication(self):
- if self.lstSalutation.Text == "":
- self.lstSalutation.setText(self.resources.SalutationLabels[0])
-
- if self.lstGreeting.Text == "":
- self.lstGreeting.setText(self.resources.GreetingLabels[0])
-
- if self.lstCommunicationType.Text == "":
- self.lstCommunicationType.setText( \
- self.resources.CommunicationLabels[0])
-
- def initConfiguration(self):
- try:
- self.myConfig = CGFaxWizard()
- root = Configuration.getConfigurationRoot(self.xMSF,
- "/org.openoffice.Office.Writer/Wizards/Fax", False)
- self.myConfig.readConfiguration(root, "cp_")
-<<<<<<< HEAD
- RadioDataAware.attachRadioButtons(
- self.myConfig, "cp_FaxType",
- (self.optBusinessFax, self.optPrivateFax), True).updateUI()
- UnoDataAware.attachListBox(
- self.myConfig.cp_BusinessFax, "cp_Style",
- self.lstBusinessStyle, True).updateUI()
- UnoDataAware.attachListBox(
- self.myConfig.cp_PrivateFax, "cp_Style", self.lstPrivateStyle,
- True).updateUI()
- cgl = self.myConfig.cp_BusinessFax
- UnoDataAware.attachCheckBox(cgl,
- "cp_PrintCompanyLogo", self.chkUseLogo, True).updateUI()
- UnoDataAware.attachCheckBox(cgl,
- "cp_PrintSubjectLine", self.chkUseSubject, True).updateUI()
- UnoDataAware.attachCheckBox(cgl,
- "cp_PrintSalutation", self.chkUseSalutation, True).updateUI()
- UnoDataAware.attachCheckBox(cgl,
- "cp_PrintDate", self.chkUseDate, True).updateUI()
- UnoDataAware.attachCheckBox(cgl, "cp_PrintCommunicationType",
- self.chkUseCommunicationType, True).updateUI()
- UnoDataAware.attachCheckBox(cgl,
- "cp_PrintGreeting", self.chkUseGreeting, True).updateUI()
- UnoDataAware.attachCheckBox(cgl,
- "cp_PrintFooter", self.chkUseFooter, True).updateUI()
- UnoDataAware.attachEditControl(cgl,
- "cp_Salutation", self.lstSalutation, True).updateUI()
- UnoDataAware.attachEditControl(cgl,
- "cp_Greeting", self.lstGreeting, True).updateUI()
- UnoDataAware.attachEditControl(cgl, "cp_CommunicationType",
- self.lstCommunicationType, True).updateUI()
- RadioDataAware.attachRadioButtons(cgl, "cp_SenderAddressType",
- (self.optSenderDefine, self.optSenderPlaceholder),
- True).updateUI()
- UnoDataAware.attachEditControl(cgl, "cp_SenderCompanyName",
- self.txtSenderName, True).updateUI()
- UnoDataAware.attachEditControl(cgl, "cp_SenderStreet",
- self.txtSenderStreet, True).updateUI()
- UnoDataAware.attachEditControl(cgl, "cp_SenderPostCode",
- self.txtSenderPostCode, True).updateUI()
- UnoDataAware.attachEditControl(cgl, "cp_SenderState",
- self.txtSenderState, True).updateUI()
- UnoDataAware.attachEditControl(cgl, "cp_SenderCity",
- self.txtSenderCity, True).updateUI()
- UnoDataAware.attachEditControl(cgl, "cp_SenderFax",
- self.txtSenderFax, True).updateUI()
- RadioDataAware.attachRadioButtons(cgl, "cp_ReceiverAddressType",
- (self.optReceiverDatabase, self.optReceiverPlaceholder),
- True).updateUI()
- UnoDataAware.attachEditControl(cgl, "cp_Footer",
- self.txtFooter, True).updateUI()
- UnoDataAware.attachCheckBox(cgl, "cp_FooterOnlySecondPage",
- self.chkFooterNextPages, True).updateUI()
- UnoDataAware.attachCheckBox(cgl, "cp_FooterPageNumbers",
- self.chkFooterPageNumbers, True).updateUI()
- RadioDataAware.attachRadioButtons(cgl, "cp_CreationType",
- (self.optCreateFax, self.optMakeChanges), True).updateUI()
- UnoDataAware.attachEditControl(cgl,
- "cp_TemplateName", self.txtTemplateName, True).updateUI()
- UnoDataAware.attachEditControl(cgl, "cp_TemplatePath",
- self.myPathSelection.xSaveTextBox, True).updateUI()
-=======
- self.mainDA.append(RadioDataAware.attachRadioButtons(
- self.myConfig, "cp_FaxType",
- (self.optBusinessFax, self.optPrivateFax), True))
- self.mainDA.append(UnoDataAware.attachListBox(
- self.myConfig.cp_BusinessFax, "cp_Style",
- self.lstBusinessStyle, True))
- self.mainDA.append(UnoDataAware.attachListBox(
- self.myConfig.cp_PrivateFax, "cp_Style", self.lstPrivateStyle,
- True))
- cgl = self.myConfig.cp_BusinessFax
- self.faxDA.append(UnoDataAware.attachCheckBox(cgl,
- "cp_PrintCompanyLogo", self.chkUseLogo, True))
- self.faxDA.append(UnoDataAware.attachCheckBox(cgl,
- "cp_PrintSubjectLine", self.chkUseSubject, True))
- self.faxDA.append(UnoDataAware.attachCheckBox(cgl,
- "cp_PrintSalutation", self.chkUseSalutation, True))
- self.faxDA.append(UnoDataAware.attachCheckBox(cgl,
- "cp_PrintDate", self.chkUseDate, True))
- self.faxDA.append(UnoDataAware.attachCheckBox(cgl,
- "cp_PrintCommunicationType", self.chkUseCommunicationType,
- True))
- self.faxDA.append(UnoDataAware.attachCheckBox(cgl,
- "cp_PrintGreeting", self.chkUseGreeting, True))
- self.faxDA.append(UnoDataAware.attachCheckBox(cgl,
- "cp_PrintFooter", self.chkUseFooter, True))
- self.faxDA.append(UnoDataAware.attachEditControl(cgl,
- "cp_Salutation", self.lstSalutation, True))
- self.faxDA.append(UnoDataAware.attachEditControl(cgl,
- "cp_Greeting", self.lstGreeting, True))
- self.faxDA.append(UnoDataAware.attachEditControl(cgl,
- "cp_CommunicationType", self.lstCommunicationType,
- True))
- self.faxDA.append(RadioDataAware.attachRadioButtons(cgl,
- "cp_SenderAddressType", (self.optSenderDefine, \
- self.optSenderPlaceholder), True))
- self.faxDA.append(UnoDataAware.attachEditControl(cgl,
- "cp_SenderCompanyName", self.txtSenderName, True))
- self.faxDA.append(UnoDataAware.attachEditControl(cgl,
- "cp_SenderStreet", self.txtSenderStreet, True))
- self.faxDA.append(UnoDataAware.attachEditControl(cgl,
- "cp_SenderPostCode", self.txtSenderPostCode, True))
- self.faxDA.append(UnoDataAware.attachEditControl(cgl,
- "cp_SenderState", self.txtSenderState, True))
- self.faxDA.append(UnoDataAware.attachEditControl(cgl,
- "cp_SenderCity", self.txtSenderCity, True))
- self.faxDA.append(UnoDataAware.attachEditControl(cgl,
- "cp_SenderFax", self.txtSenderFax, True))
- self.faxDA.append(RadioDataAware.attachRadioButtons(cgl,
- "cp_ReceiverAddressType", (self.optReceiverDatabase,
- self.optReceiverPlaceholder), True))
- self.faxDA.append(UnoDataAware.attachEditControl(cgl,
- "cp_Footer", self.txtFooter, True))
- self.faxDA.append(UnoDataAware.attachCheckBox(cgl,
- "cp_FooterOnlySecondPage", self.chkFooterNextPages,
- True))
- self.faxDA.append(UnoDataAware.attachCheckBox(cgl,
- "cp_FooterPageNumbers", self.chkFooterPageNumbers,
- True))
- self.faxDA.append(RadioDataAware.attachRadioButtons(cgl,
- "cp_CreationType", (self.optCreateFax, self.optMakeChanges),
- True))
- self.faxDA.append(UnoDataAware.attachEditControl(cgl,
- "cp_TemplateName", self.txtTemplateName, True))
- self.faxDA.append(UnoDataAware.attachEditControl(cgl,
- "cp_TemplatePath", self.myPathSelection.xSaveTextBox,
- True))
->>>>>>> master
- except Exception, exception:
- traceback.print_exc()
-
- def saveConfiguration(self):
- try:
- root = Configuration.getConfigurationRoot(self.xMSF,
- "/org.openoffice.Office.Writer/Wizards/Fax", True)
- self.myConfig.writeConfiguration(root, "cp_")
- root.commitChanges()
- except Exception, e:
- traceback.print_exc()
-
- def setConfiguration(self):
- #set correct Configuration tree:
- if self.optBusinessFax.State:
- self.optBusinessFaxItemChanged()
- elif self.optPrivateFax.State:
- self.optPrivateFaxItemChanged()
-
- def optBusinessFaxItemChanged(self):
-<<<<<<< HEAD
- FaxWizardDialogImpl.lstPrivateStylePos = None
-=======
- DataAware.setDataObjects(self.faxDA,
- self.myConfig.cp_BusinessFax, True)
->>>>>>> master
- self.setControlProperty("lblBusinessStyle",
- PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty("lstBusinessStyle",
- PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty("lblPrivateStyle",
- PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty("lstPrivateStyle",
- PropertyNames.PROPERTY_ENABLED, False)
- self.lstBusinessStyleItemChanged()
- self.__enableSenderReceiver()
- self.__setPossibleFooter(True)
-<<<<<<< HEAD
-
- def lstBusinessStyleItemChanged(self):
- selectedItemPos = self.lstBusinessStyle.SelectedItemPos
- #avoid to load the same item again
- if FaxWizardDialogImpl.lstBusinessStylePos is not selectedItemPos:
- FaxWizardDialogImpl.lstBusinessStylePos = selectedItemPos
- TextDocument.xTextDocument = self.myFaxDoc.loadAsPreview(
- self.BusinessFiles[1][selectedItemPos], False)
- self.initializeElements()
- self.setElements()
-
- def optPrivateFaxItemChanged(self):
- FaxWizardDialogImpl.lstBusinessStylePos = None
-=======
- def lstBusinessStyleItemChanged(self):
- TextDocument.xTextDocument = self.myFaxDoc.loadAsPreview( \
- self.BusinessFiles[1][self.lstBusinessStyle.SelectedItemPos],
- False)
- self.initializeElements()
- self.setElements()
-
- def optPrivateFaxItemChanged(self):
- DataAware.setDataObjects(self.faxDA,
- self.myConfig.cp_PrivateFax, True)
->>>>>>> master
- self.setControlProperty("lblBusinessStyle",
- PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty("lstBusinessStyle",
- PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty("lblPrivateStyle",
- PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty("lstPrivateStyle",
- PropertyNames.PROPERTY_ENABLED, True)
- self.lstPrivateStyleItemChanged()
- self.__disableSenderReceiver()
- self.__setPossibleFooter(False)
-
- def lstPrivateStyleItemChanged(self):
-<<<<<<< HEAD
- selectedItemPos = self.lstPrivateStyle.SelectedItemPos
- #avoid to load the same item again
- if FaxWizardDialogImpl.lstPrivateStylePos is not selectedItemPos:
- FaxWizardDialogImpl.lstPrivateStylePos = selectedItemPos
- TextDocument.xTextDocument = self.myFaxDoc.loadAsPreview(
- self.PrivateFiles[1][selectedItemPos], False)
- self.initializeElements()
- self.setElements()
-=======
- TextDocument.xTextDocument = self.myFaxDoc.loadAsPreview( \
- self.PrivateFiles[1][self.lstPrivateStyle.SelectedItemPos],
- False)
- self.initializeElements()
- self.setElements()
->>>>>>> master
-
- def txtTemplateNameTextChanged(self):
- xDocProps = TextDocument.xTextDocument.DocumentProperties
- xDocProps.Title = self.txtTemplateName.Text
-
- def optSenderPlaceholderItemChanged(self):
- self.setControlProperty("lblSenderName",
- PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty("lblSenderStreet",
- PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty("lblPostCodeCity",
- PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty("lblSenderFax",
- PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty("txtSenderName",
- PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty("txtSenderStreet",
- PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty("txtSenderPostCode",
- PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty("txtSenderState",
- PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty("txtSenderCity",
- PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty("txtSenderFax",
- PropertyNames.PROPERTY_ENABLED, False)
- self.myFaxDoc.fillSenderWithUserData()
-
- def optSenderDefineItemChanged(self):
- self.setControlProperty("lblSenderName",
- PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty("lblSenderStreet",
- PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty("lblPostCodeCity",
- PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty("lblSenderFax",
- PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty("txtSenderName",
- PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty("txtSenderStreet",
- PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty("txtSenderPostCode",
- PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty("txtSenderState",
- PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty("txtSenderCity",
- PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty("txtSenderFax",
- PropertyNames.PROPERTY_ENABLED, True)
-
- self.myFieldHandler = TextFieldHandler(self.myFaxDoc.xMSF,
- TextDocument.xTextDocument)
- self.txtSenderNameTextChanged()
- self.txtSenderStreetTextChanged()
- self.txtSenderPostCodeTextChanged()
- self.txtSenderStateTextChanged()
- self.txtSenderCityTextChanged()
- self.txtSenderFaxTextChanged()
-
-<<<<<<< HEAD
-=======
- def optReceiverPlaceholderItemChanged(self):
- OfficeDocument.attachEventCall(TextDocument.xTextDocument, "OnNew",
- "StarBasic", "macro:#/Template.Correspondence.Placeholder()")
-
- def optReceiverDatabaseItemChanged(self):
- OfficeDocument.attachEventCall(TextDocument.xTextDocument, "OnNew",
- "StarBasic", "macro:#/Template.Correspondence.Database()")
-
- def optCreateFaxItemChanged(self):
- self.bEditTemplate = False
-
- def optMakeChangesItemChanged(self):
- self.bEditTemplate = True
-
->>>>>>> master
- def txtSenderNameTextChanged(self):
- self.myFieldHandler.changeUserFieldContent(
- "Company", self.txtSenderName.Text)
-
- def txtSenderStreetTextChanged(self):
- self.myFieldHandler.changeUserFieldContent(
- "Street", self.txtSenderStreet.Text)
-
- def txtSenderCityTextChanged(self):
- self.myFieldHandler.changeUserFieldContent(
- "City", self.txtSenderCity.Text)
-
- def txtSenderPostCodeTextChanged(self):
- self.myFieldHandler.changeUserFieldContent(
- "PostCode", self.txtSenderPostCode.Text)
-
- def txtSenderStateTextChanged(self):
- self.myFieldHandler.changeUserFieldContent(
- PropertyNames.PROPERTY_STATE, self.txtSenderState.Text)
-
- def txtSenderFaxTextChanged(self):
- self.myFieldHandler.changeUserFieldContent(
- "Fax", self.txtSenderFax.Text)
-
- #switch Elements on/off --------------------------------------------------
-
- def setElements(self):
- #UI relevant:
- if self.optSenderDefine.State:
- self.optSenderDefineItemChanged()
-
- if self.optSenderPlaceholder.State:
- self.optSenderPlaceholderItemChanged()
-
- self.chkUseLogoItemChanged()
- self.chkUseSubjectItemChanged()
- self.chkUseSalutationItemChanged()
- self.chkUseGreetingItemChanged()
- self.chkUseCommunicationItemChanged()
- self.chkUseDateItemChanged()
- self.chkUseFooterItemChanged()
- self.txtTemplateNameTextChanged()
- #not UI relevant:
- if self.optReceiverDatabase.State:
- self.optReceiverDatabaseItemChanged()
-
-<<<<<<< HEAD
- elif self.optReceiverPlaceholder.State:
- self.optReceiverPlaceholderItemChanged()
-
- if self.optCreateFax.State:
- self.optCreateFromTemplateItemChanged()
-
- elif self.optMakeChanges.State:
-=======
- if self.optReceiverPlaceholder.State:
- self.optReceiverPlaceholderItemChanged()
-
- if self.optCreateFax.State:
- self.optCreateFaxItemChanged()
-
- if self.optMakeChanges.State:
->>>>>>> master
- self.optMakeChangesItemChanged()
-
- def chkUseLogoItemChanged(self):
- if self.myFaxDoc.hasElement("Company Logo"):
- self.myFaxDoc.switchElement("Company Logo",
- (self.chkUseLogo.State is not 0))
-
- def chkUseSubjectItemChanged(self):
- if self.myFaxDoc.hasElement("Subject Line"):
- self.myFaxDoc.switchElement("Subject Line",
- (self.chkUseSubject.State is not 0))
-
- def chkUseDateItemChanged(self):
- if self.myFaxDoc.hasElement("Date"):
- self.myFaxDoc.switchElement("Date",
- (self.chkUseDate.State is not 0))
-
- def chkUseFooterItemChanged(self):
- try:
- bFooterPossible = (self.chkUseFooter.State is not 0) \
- and bool(self.getControlProperty("chkUseFooter",
- PropertyNames.PROPERTY_ENABLED))
- if self.chkFooterNextPages.State is not 0:
- self.myFaxDoc.switchFooter("First Page", False,
- (self.chkFooterPageNumbers.State is not 0),
- self.txtFooter.Text)
- self.myFaxDoc.switchFooter("Standard", bFooterPossible,
- (self.chkFooterPageNumbers.State is not 0),
- self.txtFooter.Text)
- else:
- self.myFaxDoc.switchFooter("First Page", bFooterPossible,
- (self.chkFooterPageNumbers.State is not 0),
- self.txtFooter.Text)
- self.myFaxDoc.switchFooter("Standard", bFooterPossible,
- (self.chkFooterPageNumbers.State is not 0),
- self.txtFooter.Text)
-
- #enable/disable roadmap item for footer page
- BPaperItem = self.getRoadmapItemByID( \
- FaxWizardDialogImpl.RM_FOOTER)
- Helper.setUnoPropertyValue(BPaperItem,
- PropertyNames.PROPERTY_ENABLED, bFooterPossible)
- except Exception, exception:
- traceback.print_exc()
-
- def chkFooterNextPagesItemChanged(self):
- self.chkUseFooterItemChanged()
-
- def chkFooterPageNumbersItemChanged(self):
- self.chkUseFooterItemChanged()
-
- def txtFooterTextChanged(self):
- self.myFaxDoc.switchFooter("First Page", True,
- (self.chkFooterPageNumbers.State is not 0),
- self.txtFooter.Text)
-
- def chkUseSalutationItemChanged(self):
- self.myFaxDoc.switchUserField("Salutation",
- self.lstSalutation.Text, (self.chkUseSalutation.State is not 0))
- self.setControlProperty("lstSalutation",
- PropertyNames.PROPERTY_ENABLED,
- self.chkUseSalutation.State is not 0)
-
- def lstSalutationItemChanged(self):
- self.myFaxDoc.switchUserField("Salutation",
- self.lstSalutation.Text, (self.chkUseSalutation.State is not 0))
-
- def chkUseCommunicationItemChanged(self):
- self.myFaxDoc.switchUserField("CommunicationType",
- self.lstCommunicationType.Text,
- (self.chkUseCommunicationType.State is not 0))
- self.setControlProperty("lstCommunicationType",
- PropertyNames.PROPERTY_ENABLED,
- self.chkUseCommunicationType.State is not 0)
-
- def lstCommunicationItemChanged(self):
- self.myFaxDoc.switchUserField("CommunicationType",
- self.lstCommunicationType.Text,
- (self.chkUseCommunicationType.State is not 0))
-
- def chkUseGreetingItemChanged(self):
- self.myFaxDoc.switchUserField("Greeting",
- self.lstGreeting.Text, (self.chkUseGreeting.State is not 0))
- self.setControlProperty("lstGreeting",
- PropertyNames.PROPERTY_ENABLED,
- (self.chkUseGreeting.State is not 0))
-
- def lstGreetingItemChanged(self):
- self.myFaxDoc.switchUserField("Greeting", self.lstGreeting.Text,
- (self.chkUseGreeting.State is not 0))
-
- def __setPossibleFooter(self, bState):
- self.setControlProperty("chkUseFooter",
- PropertyNames.PROPERTY_ENABLED, bState)
- if not bState:
- self.chkUseFooter.State = 0
-
- self.chkUseFooterItemChanged()
-
- def __enableSenderReceiver(self):
- BPaperItem = self.getRoadmapItemByID( \
- FaxWizardDialogImpl.RM_SENDERRECEIVER)
- Helper.setUnoPropertyValue(BPaperItem,
- PropertyNames.PROPERTY_ENABLED, True)
-
- def __disableSenderReceiver(self):
- BPaperItem = self.getRoadmapItemByID( \
- FaxWizardDialogImpl.RM_SENDERRECEIVER)
- Helper.setUnoPropertyValue(BPaperItem,
- PropertyNames.PROPERTY_ENABLED, False)
-
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
deleted file mode 100644
index 20c32c38045f..000000000000
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
+++ /dev/null
@@ -1,144 +0,0 @@
-from common.Resource import Resource
-
-class FaxWizardDialogResources(Resource):
-<<<<<<< HEAD
-=======
- UNIT_NAME = "dbwizres"
->>>>>>> master
- MODULE_NAME = "dbw"
- RID_FAXWIZARDDIALOG_START = 3200
- RID_FAXWIZARDCOMMUNICATION_START = 3270
- RID_FAXWIZARDGREETING_START = 3280
- RID_FAXWIZARDSALUTATION_START = 3290
- RID_FAXWIZARDROADMAP_START = 3300
- RID_RID_COMMON_START = 500
-
-
- def __init__(self, xmsf):
- super(FaxWizardDialogResources,self).__init__(xmsf,
- FaxWizardDialogResources.MODULE_NAME)
- self.RoadmapLabels = ()
- self.SalutationLabels = ()
- self.GreetingLabels = ()
- self.CommunicationLabels = ()
-
- #Delete the String, uncomment the self.getResText method
-
-
- self.resFaxWizardDialog_title = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 1)
- self.resLabel9_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 2)
- self.resoptBusinessFax_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 3)
- self.resoptPrivateFax_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 4)
- self.reschkUseLogo_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 5)
- self.reschkUseSubject_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 6)
- self.reschkUseSalutation_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 7)
- self.reschkUseGreeting_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 8)
- self.reschkUseFooter_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 9)
- self.resoptSenderPlaceholder_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 10)
- self.resoptSenderDefine_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 11)
- self.restxtTemplateName_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 12)
- self.resoptCreateFax_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 13)
- self.resoptMakeChanges_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 14)
- self.reslblBusinessStyle_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 15)
- self.reslblPrivateStyle_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 16)
- self.reslblIntroduction_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 17)
- self.reslblSenderAddress_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 18)
- self.reslblSenderName_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 19)
- self.reslblSenderStreet_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 20)
- self.reslblPostCodeCity_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 21)
- self.reslblFooter_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 22)
- self.reslblFinalExplanation1_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 23)
- self.reslblFinalExplanation2_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 24)
- self.reslblTemplateName_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 25)
- self.reslblTemplatePath_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 26)
- self.reslblProceed_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 27)
- self.reslblTitle1_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 28)
- self.reslblTitle3_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 29)
- self.reslblTitle4_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 30)
- self.reslblTitle5_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 31)
- self.reslblTitle6_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 32)
- self.reschkFooterNextPages_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 33)
- self.reschkFooterPageNumbers_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 34)
- self.reschkUseDate_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 35)
- self.reschkUseCommunicationType_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 36)
- self.resLabel1_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 37)
- self.resoptReceiverPlaceholder_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 38)
- self.resoptReceiverDatabase_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 39)
- self.resLabel2_value = self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 40)
- self.loadRoadmapResources()
- self.loadSalutationResources()
- self.loadGreetingResources()
- self.loadCommunicationResources()
- self.loadCommonResources()
-
- def loadCommonResources(self):
- self.resOverwriteWarning = self.getResText(
- FaxWizardDialogResources.RID_RID_COMMON_START + 19)
- self.resTemplateDescription = self.getResText(
- FaxWizardDialogResources.RID_RID_COMMON_START + 20)
-
- def loadRoadmapResources(self):
- for i in xrange(5):
- self.RoadmapLabels = self.RoadmapLabels + ((self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + \
- + i + 1)),)
-
- def loadSalutationResources(self):
- i = 1
- for i in xrange(4):
- self.SalutationLabels = self.SalutationLabels + ((self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + \
- i + 1)),)
-
- def loadGreetingResources(self):
- for i in xrange(4):
- self.GreetingLabels = self.GreetingLabels + ((self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + \
- i +1 )),)
-
- def loadCommunicationResources(self):
- for i in xrange(3):
- self.CommunicationLabels = \
- self.CommunicationLabels + ((self.getResText(
- FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + \
- i + 1)),)
diff --git a/wizards/com/sun/star/wizards/fax/__init__.py b/wizards/com/sun/star/wizards/fax/__init__.py
deleted file mode 100644
index ff5ad269ba10..000000000000
--- a/wizards/com/sun/star/wizards/fax/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-"""fax """
diff --git a/wizards/com/sun/star/wizards/letter/CGLetter.py b/wizards/com/sun/star/wizards/letter/CGLetter.py
deleted file mode 100644
index b9550283711f..000000000000
--- a/wizards/com/sun/star/wizards/letter/CGLetter.py
+++ /dev/null
@@ -1,37 +0,0 @@
-from common.ConfigGroup import *
-from CGPaperElementLocation import CGPaperElementLocation
-
-class CGLetter(ConfigGroup):
-
- def __init__(self):
- self.cp_Style = int()
- self.cp_BusinessPaper = bool()
- self.cp_CompanyLogo = CGPaperElementLocation()
- self.cp_CompanyAddress = CGPaperElementLocation()
- self.cp_PaperCompanyAddressReceiverField = bool()
- self.cp_PaperFooter = bool()
- self.cp_PaperFooterHeight = float()
- self.cp_Norm = int()
- self.cp_PrintCompanyLogo = bool()
- self.cp_PrintCompanyAddressReceiverField = bool()
- self.cp_PrintLetterSigns = bool()
- self.cp_PrintSubjectLine = bool()
- self.cp_PrintSalutation = bool()
- self.cp_PrintBendMarks = bool()
- self.cp_PrintGreeting = bool()
- self.cp_PrintFooter = bool()
- self.cp_Salutation = str()
- self.cp_Greeting = str()
- self.cp_SenderAddressType = int()
- self.cp_SenderCompanyName = str()
- self.cp_SenderStreet = str()
- self.cp_SenderPostCode = str()
- self.cp_SenderState = str()
- self.cp_SenderCity = str()
- self.cp_ReceiverAddressType = int()
- self.cp_Footer = str()
- self.cp_FooterOnlySecondPage = bool()
- self.cp_FooterPageNumbers = bool()
- self.cp_CreationType = int()
- self.cp_TemplateName = str()
- self.cp_TemplatePath = str()
diff --git a/wizards/com/sun/star/wizards/letter/CGLetterWizard.py b/wizards/com/sun/star/wizards/letter/CGLetterWizard.py
deleted file mode 100644
index 3df1ee17b800..000000000000
--- a/wizards/com/sun/star/wizards/letter/CGLetterWizard.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from common.ConfigGroup import *
-from CGLetter import CGLetter
-
-class CGLetterWizard (ConfigGroup):
-
- def __init__(self):
- self.cp_LetterType = int()
- self.cp_BusinessLetter = CGLetter()
- self.cp_PrivateOfficialLetter = CGLetter()
- self.cp_PrivateLetter = CGLetter()
diff --git a/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py b/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py
deleted file mode 100644
index 901fbae82a91..000000000000
--- a/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from common.ConfigGroup import *
-
-class CGPaperElementLocation(ConfigGroup):
-
- def __init__(self):
- self.cp_Display = bool()
- self.cp_Width = float()
- self.cp_Height = float()
- self.cp_X = float()
- self.cp_Y = float()
diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.py b/wizards/com/sun/star/wizards/letter/LetterDocument.py
deleted file mode 100644
index af928c8aab3f..000000000000
--- a/wizards/com/sun/star/wizards/letter/LetterDocument.py
+++ /dev/null
@@ -1,259 +0,0 @@
-from text.TextDocument import *
-from text.TextSectionHandler import TextSectionHandler
-from com.sun.star.table import BorderLine
-from common.PropertyNames import PropertyNames
-
-from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK
-from com.sun.star.style.ParagraphAdjust import CENTER
-from com.sun.star.text.PageNumberType import CURRENT
-from com.sun.star.style.NumberingType import ARABIC
-from com.sun.star.text.HoriOrientation import NONE as NONEHORI
-from com.sun.star.text.VertOrientation import NONE as NONEVERT
-from com.sun.star.text.RelOrientation import PAGE_FRAME
-from com.sun.star.text.TextContentAnchorType import AT_PAGE
-from com.sun.star.text.SizeType import FIX
-from com.sun.star.text.WrapTextMode import THROUGHT
-from com.sun.star.awt.FontWeight import BOLD
-
-class LetterDocument(TextDocument):
-
- TextDocument = None
-
- def __init__(self, xMSF, listener):
- super(LetterDocument,self).__init__(xMSF, listener, None,
- "WIZARD_LIVE_PREVIEW")
- self.keepLogoFrame = True
- self.keepBendMarksFrame = True
- self.keepLetterSignsFrame = True
- self.keepSenderAddressRepeatedFrame = True
- self.keepAddressFrame = True
-
- def switchElement(self, sElement, bState):
- try:
- mySectionHandler = TextSectionHandler(
- self.xMSF, TextDocument.xTextDocument)
- oSection = \
- mySectionHandler.xTextDocument.TextSections.getByName(sElement)
- Helper.setUnoPropertyValue(oSection, "IsVisible", bState)
- except Exception:
- traceback.print_exc()
-
- def updateDateFields(self):
- FH = TextFieldHandler(
- TextDocument.xTextDocument, TextDocument.xTextDocument)
- FH.updateDateFields()
-
- def switchFooter(self, sPageStyle, bState, bPageNumber, sText):
- if TextDocument.xTextDocument != None:
- try:
- TextDocument.xTextDocument.lockControllers()
- xNameAccess = TextDocument.xTextDocument.StyleFamilies
- xPageStyleCollection = xNameAccess.getByName("PageStyles")
- xPageStyle = xPageStyleCollection.getByName(sPageStyle)
- if bState:
- Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", True)
- xFooterText = \
- Helper.getUnoPropertyValue(xPageStyle, "FooterText")
- xFooterText.String = sText
- if bPageNumber:
- #Adding the Page Number
- myCursor = xFooterText.Text.createTextCursor()
- myCursor.gotoEnd(False)
- xFooterText.insertControlCharacter(myCursor,
- PARAGRAPH_BREAK, False)
- myCursor.setPropertyValue("ParaAdjust", CENTER )
-
- xPageNumberField = \
- TextDocument.xTextDocument.createInstance(
- "com.sun.star.text.TextField.PageNumber")
- xPageNumberField.setPropertyValue("SubType", CURRENT)
- xPageNumberField.NumberingType = ARABIC
- xFooterText.insertTextContent(xFooterText.End,
- xPageNumberField, False)
-
- else:
- Helper.setUnoPropertyValue(
- xPageStyle, "FooterIsOn", False)
-
- TextDocument.xTextDocument.unlockControllers()
- except Exception:
- traceback.print_exc()
-
- def hasElement(self, sElement):
- if TextDocument.xTextDocument != None:
- SH = TextSectionHandler(self.xMSF, TextDocument.xTextDocument)
- return SH.hasTextSectionByName(sElement)
- else:
- return False
-
- def switchUserField(self, sFieldName, sNewContent, bState):
- myFieldHandler = TextFieldHandler(
- self.xMSF, TextDocument.xTextDocument)
- if bState:
- myFieldHandler.changeUserFieldContent(sFieldName, sNewContent)
- else:
- myFieldHandler.changeUserFieldContent(sFieldName, "")
-
- def fillSenderWithUserData(self):
- try:
- myFieldHandler = TextFieldHandler(
- TextDocument.xTextDocument, TextDocument.xTextDocument)
- oUserDataAccess = Configuration.getConfigurationRoot(
- self.xMSF, "org.openoffice.UserProfile/Data", False)
- myFieldHandler.changeUserFieldContent(
- "Company", Helper.getUnoObjectbyName(oUserDataAccess, "o"))
- myFieldHandler.changeUserFieldContent(
- "Street", Helper.getUnoObjectbyName(oUserDataAccess, "street"))
- myFieldHandler.changeUserFieldContent(
- "PostCode",
- Helper.getUnoObjectbyName(oUserDataAccess, "postalcode"))
- myFieldHandler.changeUserFieldContent(
- "City", Helper.getUnoObjectbyName(oUserDataAccess, "l"))
- myFieldHandler.changeUserFieldContent(
- PropertyNames.PROPERTY_STATE,
- Helper.getUnoObjectbyName(oUserDataAccess, "st"))
- except Exception:
- traceback.print_exc()
-
- def killEmptyUserFields(self):
- myFieldHandler = TextFieldHandler(
- self.xMSF, TextDocument.xTextDocument)
- myFieldHandler.removeUserFieldByContent("")
-
- def killEmptyFrames(self):
- try:
- if not self.keepLogoFrame:
- xTF = self.getFrameByName(
- "Company Logo", TextDocument.xTextDocument)
- if xTF != None:
- xTF.dispose()
-
- if not self.keepBendMarksFrame:
- xTF = self.getFrameByName(
- "Bend Marks", TextDocument.xTextDocument)
- if xTF != None:
- xTF.dispose()
-
- if not self.keepLetterSignsFrame:
- xTF = self.getFrameByName(
- "Letter Signs", TextDocument.xTextDocument)
- if xTF != None:
- xTF.dispose()
-
- if not self.keepSenderAddressRepeatedFrame:
- xTF = self.getFrameByName(
- "Sender Address Repeated", TextDocument.xTextDocument)
- if xTF != None:
- xTF.dispose()
-
- if not self.keepAddressFrame:
- xTF = self.getFrameByName(
- "Sender Address", TextDocument.xTextDocument)
- if xTF != None:
- xTF.dispose()
-
- except Exception:
- traceback.print_exc()
-
-class BusinessPaperObject(object):
-
- def __init__(self, FrameText, Width, Height, XPos, YPos):
- self.iWidth = Width
- self.iHeight = Height
- self.iXPos = XPos
- self.iYPos = YPos
- self.xFrame = None
- try:
- self.xFrame = \
- TextDocument.xTextDocument.createInstance(
- "com.sun.star.text.TextFrame")
- self.setFramePosition()
- Helper.setUnoPropertyValue(
- self.xFrame,
- "AnchorType", AT_PAGE)
- Helper.setUnoPropertyValue(
- self.xFrame,
- "SizeType", FIX)
-
- Helper.setUnoPropertyValue(
- self.xFrame,
- "TextWrap", THROUGHT)
- Helper.setUnoPropertyValue(
- self.xFrame,
- "Opaque", True);
- Helper.setUnoPropertyValue(
- self.xFrame,
- "BackColor", 15790320)
-
- myBorder = BorderLine()
- myBorder.OuterLineWidth = 0
- Helper.setUnoPropertyValue(
- self.xFrame,
- "LeftBorder", myBorder)
- Helper.setUnoPropertyValue(
- self.xFrame,
- "RightBorder", myBorder)
- Helper.setUnoPropertyValue(
- self.xFrame,
- "TopBorder", myBorder)
- Helper.setUnoPropertyValue(
- self.xFrame,
- "BottomBorder", myBorder)
- Helper.setUnoPropertyValue(
- self.xFrame,
- "Print", False)
- xTextCursor = \
- TextDocument.xTextDocument.Text.createTextCursor()
- xTextCursor.gotoEnd(True)
- xText = TextDocument.xTextDocument.Text
- xText.insertTextContent(
- xTextCursor, self.xFrame,
- False)
-
- xFrameText = self.xFrame.Text
- xFrameCursor = xFrameText.createTextCursor()
- xFrameCursor.setPropertyValue("CharWeight", BOLD)
- xFrameCursor.setPropertyValue("CharColor", 16777215)
- xFrameCursor.setPropertyValue("CharFontName", "Albany")
- xFrameCursor.setPropertyValue("CharHeight", 18)
-
- xFrameText.insertString(xFrameCursor, FrameText, False)
- except Exception:
- traceback.print_exc()
-
- def setFramePosition(self):
- try:
- Helper.setUnoPropertyValue(
- self.xFrame,
- "HoriOrient", NONEHORI)
- Helper.setUnoPropertyValue(
- self.xFrame,
- "VertOrient", NONEVERT)
- Helper.setUnoPropertyValue(
- self.xFrame,
- PropertyNames.PROPERTY_HEIGHT, self.iHeight)
- Helper.setUnoPropertyValue(
- self.xFrame,
- PropertyNames.PROPERTY_WIDTH, self.iWidth)
- Helper.setUnoPropertyValue(
- self.xFrame,
- "HoriOrientPosition", self.iXPos)
- Helper.setUnoPropertyValue(
- self.xFrame,
- "VertOrientPosition", self.iYPos)
- Helper.setUnoPropertyValue(
- self.xFrame,
- "HoriOrientRelation", PAGE_FRAME)
- Helper.setUnoPropertyValue(
- self.xFrame,
- "VertOrientRelation", PAGE_FRAME)
- except Exception:
- traceback.print_exc()
-
- def removeFrame(self):
- if self.xFrame is not None:
- try:
- TextDocument.xTextDocument.Text.removeTextContent(
- self.xFrame)
- except Exception:
- traceback.print_exc()
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
deleted file mode 100644
index 76d4f8e79969..000000000000
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
+++ /dev/null
@@ -1,1105 +0,0 @@
-from ui.WizardDialog import *
-from LetterWizardDialogConst import *
-from LetterWizardDialogResources import LetterWizardDialogResources
-
-from com.sun.star.awt.FontUnderline import SINGLE
-
-class LetterWizardDialog(WizardDialog):
-
- def __init__(self, xmsf):
- super(LetterWizardDialog, self).__init__(xmsf, HIDMAIN )
-
- self.resources = LetterWizardDialogResources(xmsf)
- Helper.setUnoPropertyValues(
- self.xDialogModel,
- ("Closeable",
- PropertyNames.PROPERTY_HEIGHT,
- "Moveable",
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- "Title",
- PropertyNames.PROPERTY_WIDTH),
- (True, 210, True,
- "LetterWizardDialog", 104, 52, 1, 1,
- self.resources.resLetterWizardDialog_title, 310))
- self.fontDescriptor1 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor2 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor5 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor6 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor1.Weight = 150
- self.fontDescriptor1.Underline = SINGLE
- self.fontDescriptor2.Weight = 100
- self.fontDescriptor5.Weight = 100
- self.fontDescriptor6.Weight = 150
-
- def buildStep1(self):
- self.optBusinessLetter = self.insertRadioButton(
- "optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 1),
- self.resources.resoptBusinessLetter_value,
- "optBusinessLetter", 97, 28, 1, 1, 184), self)
- self.optPrivOfficialLetter = self.insertRadioButton(
- "optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 2),
- self.resources.resoptPrivOfficialLetter_value,
- "optPrivOfficialLetter", 97, 74, 1, 2, 184), self)
- self.optPrivateLetter = self.insertRadioButton(
- "optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 3),
- self.resources.resoptPrivateLetter_value,
- "optPrivateLetter", 97, 106, 1, 3, 184), self)
- self.lstBusinessStyle = self.insertListBox(
- "lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED,
- LSTBUSINESSSTYLE_ITEM_CHANGED,
- ("Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, HelpIds.getHelpIdString(HID + 4),
- "lstBusinessStyle",
- 180, 40, 1, 4, 74), self)
- self.chkBusinessPaper = self.insertCheckBox(
- "chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 5),
- self.resources.reschkBusinessPaper_value,
- "chkBusinessPaper", 110, 56, 0, 1, 5, 168), self)
- self.lstPrivOfficialStyle = self.insertListBox(
- "lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED,
- LSTPRIVOFFICIALSTYLE_ITEM_CHANGED,
- ("Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, HelpIds.getHelpIdString(HID + 6),
- "lstPrivOfficialStyle", 180, 86, 1, 6, 74), self)
- self.lstPrivateStyle = self.insertListBox(
- "lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED,
- LSTPRIVATESTYLE_ITEM_CHANGED,
- ("Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, HelpIds.getHelpIdString(HID + 7),
- "lstPrivateStyle", 180, 118, 1, 7, 74), self)
- self.insertLabel("lblBusinessStyle",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblBusinessStyle_value,
- "lblBusinessStyle", 110, 42, 1, 48, 60))
- self.insertLabel("lblPrivOfficialStyle",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblPrivOfficialStyle_value,
- "lblPrivOfficialStyle", 110, 88, 1, 49, 60))
- self.insertLabel("lblTitle1",
- ("FontDescriptor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor6, 16,
- self.resources.reslblTitle1_value, True,
- "lblTitle1", 91, 8, 1, 55, 212))
- self.insertLabel("lblPrivateStyle",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblPrivateStyle_value,
- "lblPrivateStyle", 110, 120, 1, 74, 60))
- self.insertLabel("lblIntroduction",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (39, self.resources.reslblIntroduction_value,
- True,
- "lblIntroduction", 104, 145, 1, 80, 199))
- self.ImageControl3 = self.insertInfoImage(92, 145, 1)
-
- def buildStep2(self):
- self.chkPaperCompanyLogo = self.insertCheckBox(
- "chkPaperCompanyLogo",
- CHKPAPERCOMPANYLOGO_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 8),
- self.resources.reschkPaperCompanyLogo_value,
- "chkPaperCompanyLogo", 97, 28, 0, 2, 8, 68), self)
- self.numLogoHeight = self.insertNumericField(
- "numLogoHeight",
- NUMLOGOHEIGHT_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "Spin",
- PropertyNames.PROPERTY_STEP,
- "StrictFormat",
- PropertyNames.PROPERTY_TABINDEX,
- "Value",
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 9),
- "numLogoHeight", 138, 40, True, 2, True, 9, 3, 30), self)
- self.numLogoX = self.insertNumericField(
- "numLogoX", NUMLOGOX_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "Spin",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- "Value",
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 10),
- "numLogoX", 266, 40, True, 2, 10, 0, 30), self)
- self.numLogoWidth = self.insertNumericField(
- "numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "Spin",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- "Value",
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 11),
- "numLogoWidth", 138, 56, True, 2, 11, 3.8, 30), self)
- self.numLogoY = self.insertNumericField(
- "numLogoY", NUMLOGOY_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "Spin",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- "Value",
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 12),
- "numLogoY", 266, 56, True, 2, 12, -3.4, 30), self)
- self.chkPaperCompanyAddress = self.insertCheckBox(
- "chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 13),
- self.resources.reschkPaperCompanyAddress_value,
- "chkPaperCompanyAddress", 98, 84, 0, 2, 13, 68), self)
- self.numAddressHeight = self.insertNumericField(
- "numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "Spin",
- PropertyNames.PROPERTY_STEP,
- "StrictFormat",
- PropertyNames.PROPERTY_TABINDEX,
- "Value",
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 14),
- "numAddressHeight", 138, 96, True, 2, True, 14, 3, 30), self)
- self.numAddressX = self.insertNumericField(
- "numAddressX", NUMADDRESSX_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "Spin",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- "Value",
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 15),
- "numAddressX", 266, 96, True, 2, 15, 3.8, 30), self)
- self.numAddressWidth = self.insertNumericField(
- "numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "Spin",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- "Value",
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 16),
- "numAddressWidth", 138, 112, True, 2, 16, 13.8, 30), self)
- self.numAddressY = self.insertNumericField(
- "numAddressY", NUMADDRESSY_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "Spin",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- "Value",
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 17),
- "numAddressY", 266, 112, True, 2, 17, -3.4, 30), self)
- self.chkCompanyReceiver = self.insertCheckBox(
- "chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 18),
- self.resources.reschkCompanyReceiver_value,
- "chkCompanyReceiver", 103, 131, 0, 2, 18, 185), self)
- self.chkPaperFooter = self.insertCheckBox(
- "chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 19),
- self.resources.reschkPaperFooter_value,
- "chkPaperFooter", 97, 158, 0, 2, 19, 68), self)
- self.numFooterHeight = self.insertNumericField(
- "numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "Spin",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- "Value",
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 20),
- "numFooterHeight", 236, 156, True, 2, 20, 5, 30), self)
- self.insertLabel("lblLogoHeight",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblLogoHeight_value,
- "lblLogoHeight", 103, 42, 2, 68, 32))
- self.insertLabel("lblLogoWidth",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblLogoWidth_value,
- "lblLogoWidth", 103, 58, 2, 69, 32))
- self.insertFixedLine(
- "FixedLine5",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (2,
- "FixedLine5", 90, 78, 2, 70, 215))
- self.insertFixedLine(
- "FixedLine6",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (2,
- "FixedLine6", 90, 150, 2, 71, 215))
- self.insertLabel("lblFooterHeight",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblFooterHeight_value,
- "lblFooterHeight", 200, 158, 2, 72, 32))
- self.insertLabel("lblLogoX",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblLogoX_value,
- "lblLogoX", 170, 42, 2, 84, 94))
- self.insertLabel("lblLogoY",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblLogoY_value,
- "lblLogoY", 170, 58, 2, 85, 94))
- self.insertLabel("lblAddressHeight",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblAddressHeight_value,
- "lblAddressHeight", 103, 98, 2, 86, 32))
- self.insertLabel("lblAddressWidth",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblAddressWidth_value,
- "lblAddressWidth", 103, 114, 2, 87, 32))
- self.insertLabel("lblAddressX",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblAddressX_value,
- "lblAddressX", 170, 98, 2, 88, 94))
- self.insertLabel("lblAddressY",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblAddressY_value,
- "lblAddressY", 170, 114, 2, 89, 94))
- self.insertLabel("lblTitle2",
- ("FontDescriptor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor6, 16,
- self.resources.reslblTitle2_value, True,
- "lblTitle2", 91, 8, 2, 91, 212))
-
- def buildStep3(self):
- self.lstLetterNorm = self.insertListBox(
- "lstLetterNorm",
- LSTLETTERNORM_ACTION_PERFORMED,
- LSTLETTERNORM_ITEM_CHANGED,
- ("Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, HelpIds.getHelpIdString(HID + 21),
- "lstLetterNorm", 210, 34, 3, 21, 74), self)
- self.chkUseLogo = self.insertCheckBox(
- "chkUseLogo", CHKUSELOGO_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 22),
- self.resources.reschkUseLogo_value,
- "chkUseLogo", 97, 54, 0, 3, 22, 212), self)
- self.chkUseAddressReceiver = self.insertCheckBox(
- "chkUseAddressReceiver",
- CHKUSEADDRESSRECEIVER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 23),
- self.resources.reschkUseAddressReceiver_value,
- "chkUseAddressReceiver", 97, 69, 0, 3, 23, 212), self)
- self.chkUseSigns = self.insertCheckBox(
- "chkUseSigns", CHKUSESIGNS_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 24),
- self.resources.reschkUseSigns_value,
- "chkUseSigns", 97, 82, 0, 3, 24, 212), self)
- self.chkUseSubject = self.insertCheckBox(
- "chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 25),
- self.resources.reschkUseSubject_value,
- "chkUseSubject", 97, 98, 0, 3, 25, 212), self)
- self.chkUseSalutation = self.insertCheckBox(
- "chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 26),
- self.resources.reschkUseSalutation_value,
- "chkUseSalutation", 97, 113, 0, 3, 26, 66), self)
- self.lstSalutation = self.insertComboBox(
- "lstSalutation",
- LSTSALUTATION_ACTION_PERFORMED,
- LSTSALUTATION_ITEM_CHANGED,
- LSTSALUTATION_TEXT_CHANGED,
- ("Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, HelpIds.getHelpIdString(HID + 27),
- "lstSalutation", 210, 110, 3, 27, 74), self)
- self.chkUseBendMarks = self.insertCheckBox(
- "chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 28),
- self.resources.reschkUseBendMarks_value,
- "chkUseBendMarks", 97, 127, 0, 3, 28, 212), self)
- self.chkUseGreeting = self.insertCheckBox(
- "chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 29),
- self.resources.reschkUseGreeting_value,
- "chkUseGreeting", 97, 142, 0, 3, 29, 66), self)
- self.lstGreeting = self.insertComboBox(
- "lstGreeting", LSTGREETING_ACTION_PERFORMED,
- LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED,
- ("Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, HelpIds.getHelpIdString(HID + 30),
- "lstGreeting", 210, 141, 3, 30, 74), self)
- self.chkUseFooter = self.insertCheckBox(
- "chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 31),
- self.resources.reschkUseFooter_value,
- "chkUseFooter", 97, 158, 0, 3, 31, 212), self)
- self.insertLabel("lblLetterNorm",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (16, self.resources.reslblLetterNorm_value, True,
- "lblLetterNorm", 97, 28, 3, 50, 109))
- self.insertLabel("lblTitle3",
- (
- "FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor6, 16,
- self.resources.reslblTitle3_value, True,
- "lblTitle3", 91, 8, 3, 90, 212))
-
- def buildStep4(self):
- self.optSenderPlaceholder = self.insertRadioButton(
- "optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 32),
- self.resources.resoptSenderPlaceholder_value,
- "optSenderPlaceholder", 104, 42, 4, 32, 149), self)
- self.optSenderDefine = self.insertRadioButton(
- "optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 33),
- self.resources.resoptSenderDefine_value,
- "optSenderDefine", 104, 54, 4, 33, 149), self)
- self.txtSenderName = self.insertTextField(
- "txtSenderName", TXTSENDERNAME_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 34),
- "txtSenderName", 182, 67, 4, 34, 119), self)
- self.txtSenderStreet = self.insertTextField(
- "txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 35),
- "txtSenderStreet", 182, 81, 4, 35, 119), self)
- self.txtSenderPostCode = self.insertTextField(
- "txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 36),
- "txtSenderPostCode", 182, 95, 4, 36, 25), self)
- self.txtSenderState = self.insertTextField(
- "txtSenderState", TXTSENDERSTATE_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 37),
- "txtSenderState", 211, 95, 4, 37, 21), self)
- self.txtSenderCity = self.insertTextField(
- "txtSenderCity", TXTSENDERCITY_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 38),
- "txtSenderCity", 236, 95, 4, 38, 65), self)
- self.optReceiverPlaceholder = self.insertRadioButton(
- "optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 39),
- self.resources.resoptReceiverPlaceholder_value,
- "optReceiverPlaceholder", 104, 145, 4, 39, 200), self)
- self.optReceiverDatabase = self.insertRadioButton(
- "optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 40),
- self.resources.resoptReceiverDatabase_value,
- "optReceiverDatabase", 104, 157, 4, 40, 200), self)
- self.insertLabel("lblSenderAddress",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblSenderAddress_value,
- "lblSenderAddress", 97, 28, 4, 64, 136))
- self.insertFixedLine("FixedLine2",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (5,
- "FixedLine2", 90, 126, 4, 75, 212))
- self.insertLabel("lblReceiverAddress",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblReceiverAddress_value,
- "lblReceiverAddress", 97, 134, 4, 76, 136))
- self.insertLabel("lblSenderName",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblSenderName_value,
- "lblSenderName", 113, 69, 4, 77, 68))
- self.insertLabel("lblSenderStreet",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblSenderStreet_value,
- "lblSenderStreet", 113, 82, 4, 78, 68))
- self.insertLabel("lblPostCodeCity",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblPostCodeCity_value,
- "lblPostCodeCity", 113, 97, 4, 79, 68))
- self.insertLabel("lblTitle4",
- ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor6, 16,
- self.resources.reslblTitle4_value, True,
- "lblTitle4", 91, 8, 4, 92, 212))
-
- def buildStep5(self):
- self.txtFooter = self.insertTextField(
- "txtFooter", TXTFOOTER_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (47, HelpIds.getHelpIdString(HID + 41), True,
- "txtFooter", 97, 40, 5, 41, 203), self)
- self.chkFooterNextPages = self.insertCheckBox(
- "chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 42),
- self.resources.reschkFooterNextPages_value,
- "chkFooterNextPages", 97, 92, 0, 5, 42, 202), self)
- self.chkFooterPageNumbers = self.insertCheckBox(
- "chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 43),
- self.resources.reschkFooterPageNumbers_value,
- "chkFooterPageNumbers", 97, 106, 0, 5, 43, 201), self)
- self.insertLabel("lblFooter",
- ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor5, 8, self.resources.reslblFooter_value,
- "lblFooter", 97, 28, 5, 52, 116))
- self.insertLabel("lblTitle5",
- ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor6, 16,
- self.resources.reslblTitle5_value, True,
- "lblTitle5", 91, 8, 5, 93, 212))
-
- def buildStep6(self):
- self.txtTemplateName = self.insertTextField(
- "txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- "Text",
- PropertyNames.PROPERTY_WIDTH),
- (12, HelpIds.getHelpIdString(HID + 44),
- "txtTemplateName", 202, 56, 6, 44,
- self.resources.restxtTemplateName_value, 100), self)
- self.optCreateLetter = self.insertRadioButton(
- "optCreateLetter", OPTCREATELETTER_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 45),
- self.resources.resoptCreateLetter_value,
- "optCreateLetter", 104, 111, 6, 50, 198), self)
- self.optMakeChanges = self.insertRadioButton(
- "optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, HelpIds.getHelpIdString(HID + 46),
- self.resources.resoptMakeChanges_value,
- "optMakeChanges", 104, 123, 6, 51, 198), self)
- self.insertLabel("lblFinalExplanation1",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (26, self.resources.reslblFinalExplanation1_value, True,
- "lblFinalExplanation1", 97, 28, 6, 52, 205))
- self.insertLabel("lblProceed",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblProceed_value,
- "lblProceed", 97, 100, 6, 53, 204))
- self.insertLabel("lblFinalExplanation2",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (33, self.resources.reslblFinalExplanation2_value, True,
- "lblFinalExplanation2", 104, 145, 6, 54, 199))
- self.insertImage(
- "ImageControl2",
- ("Border", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_IMAGEURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "ScaleImage",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (0, 10,
- "private:resource/dbu/image/19205",
- "ImageControl2", 92, 145, False, 6, 66, 10))
- self.insertLabel("lblTemplateName",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblTemplateName_value,
- "lblTemplateName", 97, 58, 6, 82, 101))
- self.insertLabel("lblTitle6",
- ("FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor6, 16,
- self.resources.reslblTitle6_value, True,
- "lblTitle6", 91, 8, 6, 94, 212))
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py
deleted file mode 100644
index c44c6dc40eee..000000000000
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py
+++ /dev/null
@@ -1,60 +0,0 @@
-OPTBUSINESSLETTER_ITEM_CHANGED = "optBusinessLetterItemChanged"
-OPTPRIVOFFICIALLETTER_ITEM_CHANGED = "optPrivOfficialLetterItemChanged"
-OPTPRIVATELETTER_ITEM_CHANGED = "optPrivateLetterItemChanged"
-LSTBUSINESSSTYLE_ACTION_PERFORMED = None
-LSTBUSINESSSTYLE_ITEM_CHANGED = "lstBusinessStyleItemChanged"
-LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED = None
-LSTPRIVOFFICIALSTYLE_ITEM_CHANGED = "lstPrivOfficialStyleItemChanged"
-CHKBUSINESSPAPER_ITEM_CHANGED = "chkBusinessPaperItemChanged"
-LSTPRIVATESTYLE_ACTION_PERFORMED = None
-LSTPRIVATESTYLE_ITEM_CHANGED = "lstPrivateStyleItemChanged"
-CHKPAPERCOMPANYLOGO_ITEM_CHANGED = "chkPaperCompanyLogoItemChanged"
-NUMLOGOHEIGHT_TEXT_CHANGED = "numLogoHeightTextChanged"
-NUMLOGOX_TEXT_CHANGED = "numLogoXTextChanged"
-NUMLOGOWIDTH_TEXT_CHANGED = "numLogoWidthTextChanged"
-NUMLOGOY_TEXT_CHANGED = "numLogoYTextChanged"
-CHKCOMPANYRECEIVER_ITEM_CHANGED = "chkCompanyReceiverItemChanged"
-CHKPAPERFOOTER_ITEM_CHANGED = "chkPaperFooterItemChanged"
-NUMFOOTERHEIGHT_TEXT_CHANGED = "numFooterHeightTextChanged"
-CHKPAPERCOMPANYADDRESS_ITEM_CHANGED = "chkPaperCompanyAddressItemChanged"
-NUMADDRESSHEIGHT_TEXT_CHANGED = "numAddressHeightTextChanged"
-NUMADDRESSX_TEXT_CHANGED = "numAddressXTextChanged"
-NUMADDRESSWIDTH_TEXT_CHANGED = "numAddressWidthTextChanged"
-NUMADDRESSY_TEXT_CHANGED = "numAddressYTextChanged"
-LSTLETTERNORM_ACTION_PERFORMED = None
-LSTLETTERNORM_ITEM_CHANGED = "lstLetterNormItemChanged"
-CHKUSELOGO_ITEM_CHANGED = "chkUseLogoItemChanged"
-CHKUSEADDRESSRECEIVER_ITEM_CHANGED = "chkUseAddressReceiverItemChanged"
-CHKUSESIGNS_ITEM_CHANGED = "chkUseSignsItemChanged"
-CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged"
-CHKUSEBENDMARKS_ITEM_CHANGED = "chkUseBendMarksItemChanged"
-CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged"
-CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged"
-CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged"
-LSTSALUTATION_ACTION_PERFORMED = None
-LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged"
-LSTSALUTATION_TEXT_CHANGED = "lstSalutationItemChanged"
-LSTGREETING_ACTION_PERFORMED = None
-LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged"
-LSTGREETING_TEXT_CHANGED = "lstGreetingItemChanged"
-OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged"
-OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged"
-OPTRECEIVERPLACEHOLDER_ITEM_CHANGED = "optReceiverPlaceholderItemChanged"
-OPTRECEIVERDATABASE_ITEM_CHANGED = "optReceiverDatabaseItemChanged"
-TXTSENDERNAME_TEXT_CHANGED = "txtSenderNameTextChanged"
-TXTSENDERSTREET_TEXT_CHANGED = "txtSenderStreetTextChanged"
-TXTSENDERCITY_TEXT_CHANGED = "txtSenderCityTextChanged"
-TXTSENDERPOSTCODE_TEXT_CHANGED = "txtSenderPostCodeTextChanged"
-TXTSENDERSTATE_TEXT_CHANGED = "txtSenderStateTextChanged"
-TXTFOOTER_TEXT_CHANGED = "txtFooterTextChanged"
-CHKFOOTERNEXTPAGES_ITEM_CHANGED = "chkFooterNextPagesItemChanged"
-CHKFOOTERPAGENUMBERS_ITEM_CHANGED = "chkFooterPageNumbersItemChanged"
-TXTTEMPLATENAME_TEXT_CHANGED = "txtTemplateNameTextChanged"
-OPTCREATELETTER_ITEM_CHANGED = "optCreateFromTemplateItemChanged"
-OPTMAKECHANGES_ITEM_CHANGED = "optMakeChangesItemChanged"
-FILETEMPLATEPATH_TEXT_CHANGED = None
-imageURLImageControl1 = None
-imageURLImageControl2 = None
-imageURLImageControl3 = None
-HID = 40768
-HIDMAIN = 40820
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
deleted file mode 100644
index d2ca5f7150f7..000000000000
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
+++ /dev/null
@@ -1,1196 +0,0 @@
-from LetterWizardDialog import *
-from LetterDocument import *
-from common.NoValidPathException import NoValidPathException
-from common.FileAccess import FileAccess
-from LocaleCodes import LocaleCodes
-from ui.PathSelection import PathSelection
-from common.Configuration import Configuration
-from CGLetterWizard import CGLetterWizard
-from ui.event.UnoDataAware import UnoDataAware
-from ui.event.RadioDataAware import RadioDataAware
-from text.TextFieldHandler import TextFieldHandler
-from common.SystemDialog import SystemDialog
-
-from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO
-from com.sun.star.view.DocumentZoomType import OPTIMAL
-from com.sun.star.document.UpdateDocMode import FULL_UPDATE
-from com.sun.star.document.MacroExecMode import ALWAYS_EXECUTE
-
-class LetterWizardDialogImpl(LetterWizardDialog):
-
- RM_TYPESTYLE = 1
- RM_BUSINESSPAPER = 2
- RM_ELEMENTS = 3
- RM_SENDERRECEIVER = 4
- RM_FOOTER = 5
- RM_FINALSETTINGS = 6
-
- lstBusinessStylePos = None
- lstPrivateStylePos = None
- lstPrivOfficialStylePos = None
-
- def enterStep(self, OldStep, NewStep):
- pass
-
- def leaveStep(self, OldStep, NewStep):
- pass
-
- def __init__(self, xmsf):
- super(LetterWizardDialogImpl, self).__init__(xmsf)
- self.xmsf = xmsf
- self.bSaveSuccess = False
- self.filenameChanged = False
- self.BusCompanyLogo = None
- self.BusCompanyAddress = None
- self.BusCompanyAddressReceiver = None
- self.BusFooter = None
- self.Norms = []
- self.NormPaths = []
-
- @classmethod
- def main(self, args):
- ConnectStr = \
- "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
- xLocMSF = None
- try:
- xLocMSF = Desktop.connect(ConnectStr)
- except Exception, e:
- traceback.print_exc()
-
- lw = LetterWizardDialogImpl(xLocMSF)
- lw.startWizard(xLocMSF, None)
-
- def startWizard(self, xMSF, CurPropertyValue):
- self.running = True
- try:
- #Number of steps on WizardDialog
- self.nMaxStep = 6
-
- #instatiate The Document Frame for the Preview
- self.myLetterDoc = LetterDocument(xMSF, self)
-
- #create the dialog
- self.drawNaviBar()
- self.buildStep1()
- self.buildStep2()
- self.buildStep3()
- self.buildStep4()
- self.buildStep5()
- self.buildStep6()
- self.__initializePaths()
- self.initializeNorms()
- self.initializeSalutation()
- self.initializeGreeting()
-
- #special Control fFrameor setting the save Path:
- self.insertPathSelectionControl()
-
- self.myConfig = CGLetterWizard()
-
- oL = self.getOfficeLinguistic()
- self.myConfig.cp_BusinessLetter.cp_Norm = oL
- self.myConfig.cp_PrivateOfficialLetter.cp_Norm = oL
- self.myConfig.cp_PrivateLetter.cp_Norm = oL
- self.initializeTemplates(xMSF)
-
- #load the last used settings
- #from the registry and apply listeners to the controls:
- self.initConfiguration()
-
- if self.myConfig.cp_BusinessLetter.cp_Greeting == "":
- self.myConfig.cp_BusinessLetter.cp_Greeting = \
- self.resources.GreetingLabels[0]
-
- if self.myConfig.cp_BusinessLetter.cp_Salutation == "":
- self.myConfig.cp_BusinessLetter.cp_Salutation = \
- self.resources.SalutationLabels[0]
-
- if self.myConfig.cp_PrivateOfficialLetter.cp_Greeting == "":
- self.myConfig.cp_PrivateOfficialLetter.cp_Greeting = \
- self.resources.GreetingLabels[1]
-
- if self.myConfig.cp_PrivateOfficialLetter.cp_Salutation == "":
- self.myConfig.cp_PrivateOfficialLetter.cp_Salutation = \
- self.resources.SalutationLabels[1]
-
- if self.myConfig.cp_PrivateLetter.cp_Greeting == "":
- self.myConfig.cp_PrivateLetter.cp_Greeting = \
- self.resources.GreetingLabels[2]
-
- if self.myConfig.cp_PrivateLetter.cp_Salutation == "":
- self.myConfig.cp_PrivateLetter.cp_Salutation = \
- self.resources.SalutationLabels[2]
-
- if self.myPathSelection.xSaveTextBox.Text.lower() == "":
- self.myPathSelection.initializePath()
-
- xContainerWindow = self.myLetterDoc.xFrame.ContainerWindow
- self.createWindowPeer(xContainerWindow)
- self.insertRoadmap()
- self.setConfiguration()
- self.setDefaultForGreetingAndSalutation()
- self.initializeElements()
- self.myLetterDoc.xFrame.ComponentWindow.Enable = False
- self.executeDialogFromComponent(self.myLetterDoc.xFrame)
- self.removeTerminateListener()
- self.closeDocument()
- self.running = False
- except Exception, exception:
- self.removeTerminateListener()
- traceback.print_exc()
- self.running = False
- return
-
- def cancelWizard(self):
- self.xUnoDialog.endExecute()
- self.running = False
-
- def finishWizard(self):
- self.switchToStep(self.getCurrentStep(), self.nMaxStep)
- endWizard = True
- try:
- fileAccess = FileAccess(self.xMSF)
- self.sPath = self.myPathSelection.getSelectedPath()
- if self.sPath == "":
- self.myPathSelection.triggerPathPicker()
- self.sPath = self.myPathSelection.getSelectedPath()
-
- self.sPath = fileAccess.getURL(self.sPath)
- if not self.filenameChanged:
- if fileAccess.exists(self.sPath, True):
- answer = SystemDialog.showMessageBox(
- self.xMSF, "MessBox", YES_NO + DEF_NO,
- self.resources.resOverwriteWarning,
- self.xUnoDialog.Peer)
- if answer == 3:
- # user said: no, do not overwrite...
- endWizard = False
- return False
-
- self.myLetterDoc.setWizardTemplateDocInfo(
- self.resources.resLetterWizardDialog_title,
- self.resources.resTemplateDescription)
- self.myLetterDoc.killEmptyUserFields()
- self.myLetterDoc.keepLogoFrame = self.chkUseLogo.State != 0
- if self.chkBusinessPaper.State != 0 \
- and self.chkPaperCompanyLogo.State != 0:
- self.myLetterDoc.keepLogoFrame = False
-
- self.myLetterDoc.keepBendMarksFrame = \
- self.chkUseBendMarks.State != 0
- self.myLetterDoc.keepLetterSignsFrame = \
- self.chkUseSigns.State != 0
- self.myLetterDoc.keepSenderAddressRepeatedFrame = \
- self.chkUseAddressReceiver.State != 0
- if self.optBusinessLetter.State:
- if self.chkBusinessPaper.State != 0 \
- and self.chkCompanyReceiver.State != 0:
- self.myLetterDoc.keepSenderAddressRepeatedFrame = False
-
- if self.chkBusinessPaper.State != 0 \
- and self.chkPaperCompanyAddress.State != 0:
- self.myLetterDoc.keepAddressFrame = False
-
- self.myLetterDoc.killEmptyFrames()
- self.bSaveSuccess = \
- OfficeDocument.store(
- self.xMSF, TextDocument.xTextDocument,
- self.sPath, "writer8_template")
- if self.bSaveSuccess:
- self.saveConfiguration()
- xIH = self.xMSF.createInstance(
- "com.sun.star.comp.uui.UUIInteractionHandler")
- loadValues = range(4)
- loadValues[0] = uno.createUnoStruct( \
- 'com.sun.star.beans.PropertyValue')
- loadValues[0].Name = "AsTemplate"
- loadValues[1] = uno.createUnoStruct( \
- 'com.sun.star.beans.PropertyValue')
- loadValues[1].Name = "MacroExecutionMode"
- loadValues[1].Value = ALWAYS_EXECUTE
- loadValues[2] = uno.createUnoStruct( \
- 'com.sun.star.beans.PropertyValue')
- loadValues[2].Name = "UpdateDocMode"
- loadValues[2].Value = FULL_UPDATE
- loadValues[3] = uno.createUnoStruct( \
- 'com.sun.star.beans.PropertyValue')
- loadValues[3].Name = "InteractionHandler"
- loadValues[3].Value = xIH
- if self.bEditTemplate:
- loadValues[0].Value = False
- else:
- loadValues[0].Value = True
-
- oDoc = OfficeDocument.load(
- Desktop.getDesktop(self.xMSF),
- self.sPath, "_default", loadValues)
- myViewHandler = ViewHandler(self.xMSF, oDoc)
- myViewHandler.setViewSetting("ZoomType", OPTIMAL)
- else:
- pass
-
- except Exception, e:
- traceback.print_exc()
- finally:
- if endWizard:
- self.xUnoDialog.endExecute()
- self.running = False
-
- return True;
-
- def closeDocument(self):
- try:
- xCloseable = self.myLetterDoc.xFrame
- xCloseable.close(False)
- except CloseVetoException, e:
- traceback.print_exc()
-
- def optBusinessLetterItemChanged(self):
- LetterWizardDialogImpl.lstPrivateStylePos = None
- LetterWizardDialogImpl.lstPrivOfficialStylePos = None
- self.setControlProperty(
- "lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False)
- self.lstBusinessStyleItemChanged()
- self.enableSenderReceiver()
- self.setPossibleFooter(True)
- if self.myPathSelection.xSaveTextBox.Text.lower() == "":
- self.myPathSelection.initializePath()
-
- def optPrivOfficialLetterItemChanged(self):
- LetterWizardDialogImpl.lstBusinessStylePos = None
- LetterWizardDialogImpl.lstPrivateStylePos = None
- self.setControlProperty(
- "lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, False)
- self.lstPrivOfficialStyleItemChanged()
- self.disableBusinessPaper()
- self.enableSenderReceiver()
- self.setPossibleFooter(True)
- if self.myPathSelection.xSaveTextBox.Text.lower() == "":
- self.myPathSelection.initializePath()
-
- def optPrivateLetterItemChanged(self):
- LetterWizardDialogImpl.lstBusinessStylePos = None
- LetterWizardDialogImpl.lstPrivOfficialStylePos = None
- self.setControlProperty(
- "lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, True)
- self.lstPrivateStyleItemChanged()
- self.disableBusinessPaper()
- self.disableSenderReceiver()
- self.setPossibleFooter(False)
- if self.myPathSelection.xSaveTextBox.Text.lower() == "":
- self.myPathSelection.initializePath()
-
- def optSenderPlaceholderItemChanged(self):
- self.setControlProperty(
- "lblSenderName", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblSenderStreet", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "txtSenderName", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "txtSenderStreet", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "txtSenderState", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "txtSenderCity", PropertyNames.PROPERTY_ENABLED, False)
- self.myLetterDoc.fillSenderWithUserData()
-
- def optSenderDefineItemChanged(self):
- self.setControlProperty(
- "lblSenderName", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lblSenderStreet", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "txtSenderName", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "txtSenderStreet", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "txtSenderState", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "txtSenderCity", PropertyNames.PROPERTY_ENABLED, True)
- self.txtSenderNameTextChanged()
- self.txtSenderStreetTextChanged()
- self.txtSenderPostCodeTextChanged()
- self.txtSenderStateTextChanged()
- self.txtSenderCityTextChanged()
-
- def lstBusinessStyleItemChanged(self):
- selectedItemPos = self.lstBusinessStyle.SelectedItemPos
- if LetterWizardDialogImpl.lstBusinessStylePos is not selectedItemPos:
- LetterWizardDialogImpl.lstBusinessStylePos = selectedItemPos
- TextDocument.xTextDocument = \
- self.myLetterDoc.loadAsPreview(
- self.BusinessFiles[1][selectedItemPos],
- False)
- self.myLetterDoc.xTextDocument.lockControllers()
- self.initializeElements()
- self.chkBusinessPaperItemChanged()
- self.setElements(False)
- self.myLetterDoc.xTextDocument.unlockControllers()
-
- def lstPrivOfficialStyleItemChanged(self):
- selectedItemPos = self.lstPrivOfficialStyle.SelectedItemPos
- if LetterWizardDialogImpl.lstPrivOfficialStylePos is not selectedItemPos:
- LetterWizardDialogImpl.lstPrivOfficialStylePos = selectedItemPos
- TextDocument.xTextDocument = \
- self.myLetterDoc.loadAsPreview(
- self.OfficialFiles[1][selectedItemPos],
- False)
- self.myLetterDoc.xTextDocument.lockControllers()
- self.initializeElements()
- self.setPossibleSenderData(True)
- self.setElements(False)
- self.myLetterDoc.xTextDocument.unlockControllers()
-
- def lstPrivateStyleItemChanged(self):
- selectedItemPos = self.lstPrivateStyle.SelectedItemPos
- if LetterWizardDialogImpl.lstPrivateStylePos is not selectedItemPos:
- LetterWizardDialogImpl.lstPrivateStylePos = selectedItemPos
- TextDocument.xTextDocument = \
- self.myLetterDoc.loadAsPreview(
- self.PrivateFiles[1][selectedItemPos],
- False)
- self.myLetterDoc.xTextDocument.lockControllers()
- self.initializeElements()
- self.setElements(True)
- self.myLetterDoc.xTextDocument.unlockControllers()
-
- def numLogoHeightTextChanged(self):
- self.BusCompanyLogo.iHeight = int(self.numLogoHeight.Value * 1000)
- self.BusCompanyLogo.setFramePosition()
-
- def numLogoWidthTextChanged(self):
- self.BusCompanyLogo.iWidth = int(self.numLogoWidth.Value * 1000)
- self.BusCompanyLogo.setFramePosition()
-
- def numLogoXTextChanged(self):
- self.BusCompanyLogo.iXPos = int(self.numLogoX.Value * 1000)
- self.BusCompanyLogo.setFramePosition()
-
- def numLogoYTextChanged(self):
- self.BusCompanyLogo.iYPos = int(self.numLogoY.Value * 1000)
- self.BusCompanyLogo.setFramePosition()
-
- def numAddressWidthTextChanged(self):
- self.BusCompanyAddress.iWidth = int(self.numAddressWidth.Value * 1000)
- self.BusCompanyAddress.setFramePosition()
-
- def numAddressXTextChanged(self):
- self.BusCompanyAddress.iXPos = int(self.numAddressX.Value * 1000)
- self.BusCompanyAddress.setFramePosition()
-
- def numAddressYTextChanged(self):
- self.BusCompanyAddress.iYPos = int(self.numAddressY.Value * 1000)
- self.BusCompanyAddress.setFramePosition()
-
- def numAddressHeightTextChanged(self):
- self.BusCompanyAddress.iHeight = int(self.numAddressHeight.Value * 1000)
- self.BusCompanyAddress.setFramePosition()
-
- def numFooterHeightTextChanged(self):
- self.BusFooter.iHeight = int(self.numFooterHeight.Value * 1000)
- self.BusFooter.iYPos = \
- self.myLetterDoc.DocSize.Height - self.BusFooter.iHeight
- self.BusFooter.setFramePosition()
-
- def chkPaperCompanyLogoItemChanged(self):
- if self.chkPaperCompanyLogo.State != 0:
- if self.numLogoWidth.Value == 0:
- self.numLogoWidth.Value = 0.1
-
- if self.numLogoHeight.Value == 0:
- self.numLogoHeight.Value = 0.1
- self.BusCompanyLogo = BusinessPaperObject(
- "Company Logo", int(self.numLogoWidth.Value * 1000),
- int(self.numLogoHeight.Value * 1000),
- int(self.numLogoX.Value * 1000),
- self.numLogoY.Value * 1000)
- self.setControlProperty(
- "numLogoHeight", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "numLogoWidth", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "numLogoX", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "numLogoY", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, True)
- self.setPossibleLogo(False)
- else:
- if self.BusCompanyLogo != None:
- self.BusCompanyLogo.removeFrame()
-
- self.setControlProperty(
- "numLogoHeight", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "numLogoWidth", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "numLogoX", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "numLogoY", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, False)
- self.setPossibleLogo(True)
-
- def chkPaperCompanyAddressItemChanged(self):
- if self.chkPaperCompanyAddress.State != 0:
- if self.numAddressWidth.Value == 0:
- self.numAddressWidth.Value = 0.1
-
- if self.numAddressHeight.Value == 0:
- self.numAddressHeight.Value = 0.1
-
- self.BusCompanyAddress = BusinessPaperObject(
- "Company Address", int(self.numAddressWidth.Value * 1000),
- int(self.numAddressHeight.Value * 1000),
- int(self.numAddressX.Value * 1000),
- int(self.numAddressY.Value * 1000))
- self.setControlProperty(
- "numAddressHeight", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "numAddressWidth", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "numAddressX", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "numAddressY", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, True)
- if self.myLetterDoc.hasElement("Sender Address"):
- self.myLetterDoc.switchElement(
- "Sender Address", False)
-
- if self.chkCompanyReceiver.State != 0:
- self.setPossibleSenderData(False)
-
- else:
- if self.BusCompanyAddress is not None:
- self.BusCompanyAddress.removeFrame()
- self.setControlProperty(
- "numAddressHeight", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "numAddressWidth", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "numAddressX", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "numAddressY", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, False)
- if self.myLetterDoc.hasElement("Sender Address"):
- self.myLetterDoc.switchElement("Sender Address", True)
-
- self.setPossibleSenderData(True)
- if self.optSenderDefine.State:
- self.optSenderDefineItemChanged()
-
- if self.optSenderPlaceholder.State:
- self.optSenderPlaceholderItemChanged()
-
- def chkCompanyReceiverItemChanged(self):
- xReceiverFrame = None
- if self.chkCompanyReceiver.State != 0:
- try:
- xReceiverFrame = TextDocument.getFrameByName(
- "Receiver Address", TextDocument.xTextDocument)
- iFrameWidth = int(Helper.getUnoPropertyValue(
- xReceiverFrame, PropertyNames.PROPERTY_WIDTH))
- iFrameX = int(Helper.getUnoPropertyValue(
- xReceiverFrame, "HoriOrientPosition"))
- iFrameY = int(Helper.getUnoPropertyValue(
- xReceiverFrame, "VertOrientPosition"))
- iReceiverHeight = int(0.5 * 1000)
- self.BusCompanyAddressReceiver = BusinessPaperObject(
- " ", iFrameWidth, iReceiverHeight, iFrameX,
- iFrameY - iReceiverHeight)
- self.setPossibleAddressReceiver(False)
- except NoSuchElementException:
- traceback.print_exc()
- except WrappedTargetException:
- traceback.print_exc()
-
- if self.chkPaperCompanyAddress.State != 0:
- self.setPossibleSenderData(False)
-
- else:
- if self.BusCompanyAddressReceiver != None:
- self.BusCompanyAddressReceiver.removeFrame()
-
- self.setPossibleAddressReceiver(True)
- self.setPossibleSenderData(True)
- if self.optSenderDefine.State:
- self.optSenderDefineItemChanged()
-
- if self.optSenderPlaceholder.State:
- self.optSenderPlaceholderItemChanged()
-
- def chkPaperFooterItemChanged(self):
- if self.chkPaperFooter.State != 0:
- if self.numFooterHeight.Value == 0:
- self.numFooterHeight.Value = 0.1
-
- self.BusFooter = BusinessPaperObject(
- "Footer", self.myLetterDoc.DocSize.Width,
- int(self.numFooterHeight.Value * 1000), 0,
- int(self.myLetterDoc.DocSize.Height - \
- (self.numFooterHeight.Value * 1000)))
- self.setControlProperty(
- "numFooterHeight", PropertyNames.PROPERTY_ENABLED, True)
- self.setControlProperty(
- "lblFooterHeight", PropertyNames.PROPERTY_ENABLED, True)
- self.setPossibleFooter(False)
- else:
- if self.BusFooter != None:
- self.BusFooter.removeFrame()
-
- self.setControlProperty(
- "numFooterHeight", PropertyNames.PROPERTY_ENABLED, False)
- self.setControlProperty(
- "lblFooterHeight", PropertyNames.PROPERTY_ENABLED, False)
- self.setPossibleFooter(True)
-
- def chkUseLogoItemChanged(self):
- try:
- if self.myLetterDoc.hasElement("Company Logo"):
- logostatus = \
- bool(self.getControlProperty(
- "chkUseLogo", PropertyNames.PROPERTY_ENABLED)) \
- and (self.chkUseLogo.State != 0)
- self.myLetterDoc.switchElement(
- "Company Logo", logostatus)
- except IllegalArgumentException, e:
- traceback.print_exc()
-
- def chkUseAddressReceiverItemChanged(self):
- try:
- if self.myLetterDoc.hasElement("Sender Address Repeated"):
- rstatus = \
- bool(self.getControlProperty(
- "chkUseAddressReceiver",
- PropertyNames.PROPERTY_ENABLED)) \
- and (self.chkUseAddressReceiver.State != 0)
- self.myLetterDoc.switchElement(
- "Sender Address Repeated", rstatus)
-
- except IllegalArgumentException, e:
- traceback.print_exc()
-
- def chkUseSignsItemChanged(self):
- if self.myLetterDoc.hasElement("Letter Signs"):
- self.myLetterDoc.switchElement(
- "Letter Signs", self.chkUseSigns.State != 0)
-
- def chkUseSubjectItemChanged(self):
- if self.myLetterDoc.hasElement("Subject Line"):
- self.myLetterDoc.switchElement(
- "Subject Line", self.chkUseSubject.State != 0)
-
- def chkUseBendMarksItemChanged(self):
- if self.myLetterDoc.hasElement("Bend Marks"):
- self.myLetterDoc.switchElement(
- "Bend Marks", self.chkUseBendMarks.State != 0)
-
- def chkUseFooterItemChanged(self):
- try:
- bFooterPossible = (self.chkUseFooter.State != 0) \
- and bool(self.getControlProperty(
- "chkUseFooter", PropertyNames.PROPERTY_ENABLED))
- if self.chkFooterNextPages.State != 0:
- self.myLetterDoc.switchFooter(
- "First Page", False, self.chkFooterPageNumbers.State != 0,
- txtFooter.Text)
- self.myLetterDoc.switchFooter("Standard", bFooterPossible,
- self.chkFooterPageNumbers.State != 0, self.txtFooter.Text)
- else:
- self.myLetterDoc.switchFooter(
- "First Page", bFooterPossible,
- self.chkFooterPageNumbers.State != 0, self.txtFooter.Text)
- self.myLetterDoc.switchFooter(
- "Standard", bFooterPossible,
- self.chkFooterPageNumbers.State != 0, self.txtFooter.Text)
-
- BPaperItem = \
- self.getRoadmapItemByID(LetterWizardDialogImpl.RM_FOOTER)
- Helper.setUnoPropertyValue(
- BPaperItem, PropertyNames.PROPERTY_ENABLED, bFooterPossible)
- except Exception, exception:
- traceback.print_exc()
-
- def chkFooterNextPagesItemChanged(self):
- self.chkUseFooterItemChanged()
-
- def chkFooterPageNumbersItemChanged(self):
- self.chkUseFooterItemChanged()
-
- def setPossibleFooter(self, bState):
- self.setControlProperty(
- "chkUseFooter", PropertyNames.PROPERTY_ENABLED, bState)
- self.chkUseFooterItemChanged()
-
- def setPossibleAddressReceiver(self, bState):
- if self.myLetterDoc.hasElement("Sender Address Repeated"):
- self.setControlProperty(
- "chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, bState)
- self.chkUseAddressReceiverItemChanged()
-
- def setPossibleLogo(self, bState):
- if self.myLetterDoc.hasElement("Company Logo"):
- self.setControlProperty(
- "chkUseLogo", PropertyNames.PROPERTY_ENABLED, bState)
- self.chkUseLogoItemChanged()
-
- def txtFooterTextChanged(self):
- self.chkUseFooterItemChanged()
-
- def txtSenderNameTextChanged(self):
- myFieldHandler = TextFieldHandler(
- self.myLetterDoc.xMSF, TextDocument.xTextDocument)
- myFieldHandler.changeUserFieldContent(
- "Company", self.txtSenderName.Text)
-
- def txtSenderStreetTextChanged(self):
- myFieldHandler = TextFieldHandler(
- self.myLetterDoc.xMSF, TextDocument.xTextDocument)
- myFieldHandler.changeUserFieldContent(
- "Street", self.txtSenderStreet.Text)
-
- def txtSenderCityTextChanged(self):
- myFieldHandler = TextFieldHandler(
- self.myLetterDoc.xMSF, TextDocument.xTextDocument)
- myFieldHandler.changeUserFieldContent(
- "City", self.txtSenderCity.Text)
-
- def txtSenderPostCodeTextChanged(self):
- myFieldHandler = TextFieldHandler(
- self.myLetterDoc.xMSF, TextDocument.xTextDocument)
- myFieldHandler.changeUserFieldContent(
- "PostCode", self.txtSenderPostCode.Text)
-
- def txtSenderStateTextChanged(self):
- myFieldHandler = TextFieldHandler(
- self.myLetterDoc.xMSF, TextDocument.xTextDocument)
- myFieldHandler.changeUserFieldContent(
- PropertyNames.PROPERTY_STATE, self.txtSenderState.Text)
-
- def txtTemplateNameTextChanged(self):
- xDocProps = TextDocument.xTextDocument.DocumentProperties
- TitleName = self.txtTemplateName.Text
- xDocProps.Title = TitleName
-
- def chkUseSalutationItemChanged(self):
- self.myLetterDoc.switchUserField(
- "Salutation", self.lstSalutation.Text,
- self.chkUseSalutation.State != 0)
- self.setControlProperty(
- "lstSalutation", PropertyNames.PROPERTY_ENABLED,
- self.chkUseSalutation.State != 0)
-
- def lstSalutationItemChanged(self):
- self.myLetterDoc.switchUserField(
- "Salutation", self.lstSalutation.Text,
- self.chkUseSalutation.State != 0)
-
- def chkUseGreetingItemChanged(self):
- self.myLetterDoc.switchUserField(
- "Greeting", self.lstGreeting.Text, self.chkUseGreeting.State != 0)
- self.setControlProperty(
- "lstGreeting", PropertyNames.PROPERTY_ENABLED,
- self.chkUseGreeting.State != 0)
-
- def setDefaultForGreetingAndSalutation(self):
- if self.lstSalutation.Text == "":
- self.lstSalutation.Text = self.resources.SalutationLabels[0]
-
- if self.lstGreeting.Text == "":
- self.lstGreeting.Text = self.resources.GreetingLabels[0]
-
- def lstGreetingItemChanged(self):
- self.myLetterDoc.switchUserField(
- "Greeting", self.lstGreeting.Text, self.chkUseGreeting.State != 0)
-
- def chkBusinessPaperItemChanged(self):
- if self.chkBusinessPaper.State != 0:
- self.enableBusinessPaper()
- else:
- self.disableBusinessPaper()
- self.setPossibleSenderData(True)
-
- def getOfficeLinguistic(self):
- oL = 0
- found = False
- OfficeLinguistic = Configuration.getOfficeLinguistic(self.xMSF)
- i = 0
- for index, workwith in enumerate(self.Norms):
- if workwith.lower() == OfficeLinguistic.lower():
- oL = index
- found = True
- break
-
- if not found:
- for index, workwith in enumerate(self.Norms):
- if workwith.lower() == "en-US".lower():
- oL = index
- found = True
- break
- return oL
-
- def setPossibleSenderData(self, bState):
- self.setControlProperty(
- "optSenderDefine", PropertyNames.PROPERTY_ENABLED, bState)
- self.setControlProperty(
- "optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, bState)
- self.setControlProperty(
- "lblSenderAddress", PropertyNames.PROPERTY_ENABLED, bState)
- if not bState:
- self.setControlProperty(
- "txtSenderCity", PropertyNames.PROPERTY_ENABLED, bState)
- self.setControlProperty(
- "txtSenderName", PropertyNames.PROPERTY_ENABLED, bState)
- self.setControlProperty(
- "txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, bState)
- self.setControlProperty(
- "txtSenderStreet", PropertyNames.PROPERTY_ENABLED, bState)
- self.setControlProperty(
- "txtSenderCity", PropertyNames.PROPERTY_ENABLED, bState)
- self.setControlProperty(
- "txtSenderState", PropertyNames.PROPERTY_ENABLED, bState)
- self.setControlProperty(
- "lblSenderName", PropertyNames.PROPERTY_ENABLED, bState)
- self.setControlProperty(
- "lblSenderStreet", PropertyNames.PROPERTY_ENABLED, bState)
- self.setControlProperty(
- "lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, bState)
-
- def enableSenderReceiver(self):
- BPaperItem = self.getRoadmapItemByID(
- LetterWizardDialogImpl.RM_SENDERRECEIVER)
- Helper.setUnoPropertyValue(
- BPaperItem, PropertyNames.PROPERTY_ENABLED, True)
-
- def disableSenderReceiver(self):
- BPaperItem = self.getRoadmapItemByID(
- LetterWizardDialogImpl.RM_SENDERRECEIVER)
- Helper.setUnoPropertyValue(
- BPaperItem, PropertyNames.PROPERTY_ENABLED, False)
-
- def enableBusinessPaper(self):
- try:
- BPaperItem = self.getRoadmapItemByID(
- LetterWizardDialogImpl.RM_BUSINESSPAPER)
- Helper.setUnoPropertyValue(
- BPaperItem, PropertyNames.PROPERTY_ENABLED, True)
- self.chkPaperCompanyLogoItemChanged()
- self.chkPaperCompanyAddressItemChanged()
- self.chkPaperFooterItemChanged()
- self.chkCompanyReceiverItemChanged()
- except Exception:
- traceback.print_exc()
-
- def disableBusinessPaper(self):
- try:
- BPaperItem = self.getRoadmapItemByID(
- LetterWizardDialogImpl.RM_BUSINESSPAPER)
- Helper.setUnoPropertyValue(
- BPaperItem, PropertyNames.PROPERTY_ENABLED, False)
- if self.BusCompanyLogo != None:
- self.BusCompanyLogo.removeFrame()
-
- if self.BusCompanyAddress != None:
- self.BusCompanyAddress.removeFrame()
-
- if self.BusFooter != None:
- self.BusFooter.removeFrame()
-
- if self.BusCompanyAddressReceiver != None:
- self.BusCompanyAddressReceiver.removeFrame()
-
- self.setPossibleAddressReceiver(True)
- self.setPossibleFooter(True)
- self.setPossibleLogo(True)
- if self.myLetterDoc.hasElement("Sender Address"):
- self.myLetterDoc.switchElement(
- "Sender Address", True)
- except Exception:
- traceback.print_exc()
-
- def lstLetterNormItemChanged(self):
- sCurrentNorm = self.Norms[getCurrentLetter().cp_Norm]
- initializeTemplates(xMSF)
- if self.optBusinessLetter.State:
- self.lstBusinessStyleItemChanged()
-
- elif optPrivOfficialLetter.State:
- self.lstPrivOfficialStyleItemChanged()
-
- elif optPrivateLetter.State:
- self.lstPrivateStyleItemChanged()
-
- def initializeSalutation(self):
- self.setControlProperty(
- "lstSalutation", "StringItemList",
- self.resources.SalutationLabels)
-
- def initializeGreeting(self):
- self.setControlProperty(
- "lstGreeting", "StringItemList", self.resources.GreetingLabels)
-
- def initializeNorms(self):
- lc = LocaleCodes(self.xmsf)
- allLocales = lc.getIDs()
- nameList = []
- sLetterSubPath = "/wizard/letter/"
- try:
- self.sTemplatePath = \
- FileAccess.deleteLastSlashfromUrl(self.sTemplatePath)
- nuString = \
- self.sTemplatePath[:self.sTemplatePath.rfind("/")] + "/"
- sMainPath = FileAccess.deleteLastSlashfromUrl(nuString)
- self.sLetterPath = sMainPath + sLetterSubPath
- xInterface = \
- self.xmsf.createInstance("com.sun.star.ucb.SimpleFileAccess")
- nameList = xInterface.getFolderContents(self.sLetterPath, True)
- except Exception, e:
- traceback.print_exc()
-
- found = False
- cIsoCode = ""
- MSID = ""
- LanguageLabels = []
-
- for i in nameList:
- found = False
- cIsoCode = FileAccess.getFilename(i)
- for j in allLocales:
- aLang = j.split(";")
- if cIsoCode.lower() == aLang[1].lower():
- MSID = aLang[2]
- found = True
- break
-
- if not found:
- for j in allLocales:
- aLang = j.split(";")
- if cIsoCode.lower() == aLang[1][:2]:
- MSID = aLang[2]
- found = True
- break
-
- if found:
- self.Norms.append(cIsoCode)
- self.NormPaths.append(i)
- #LanguageLabels.append(lc.getLanguageString(MSID))
-
- self.setControlProperty(
- "lstLetterNorm", "StringItemList", tuple(LanguageLabels))
-
- def getCurrentLetter(self):
- if self.myConfig.cp_LetterType == 0:
- return self.myConfig.cp_BusinessLetter
- elif self.myConfig.cp_LetterType == 1:
- return self.myConfig.cp_PrivateOfficialLetter
- elif self.myConfig.cp_LetterType == 2:
- return self.myConfig.cp_PrivateLetter
- else:
- return None
-
- def __initializePaths(self):
- try:
- self.sTemplatePath = \
- FileAccess.getOfficePath2(
- self.xMSF, "Template", "share", "/wizard")
- self.sUserTemplatePath = \
- FileAccess.getOfficePath2(self.xMSF, "Template", "user", "")
- self.sBitmapPath = \
- FileAccess.combinePaths(
- self.xMSF, self.sTemplatePath, "/../wizard/bitmap")
- except NoValidPathException, e:
- traceback.print_exc()
-
- def initializeTemplates(self, xMSF):
- self.sCurrentNorm = self.Norms[self.getCurrentLetter().cp_Norm]
- sLetterPath = self.NormPaths[self.getCurrentLetter().cp_Norm]
- self.BusinessFiles = \
- FileAccess.getFolderTitles(xMSF, "bus", sLetterPath)
- self.OfficialFiles = \
- FileAccess.getFolderTitles(xMSF, "off", sLetterPath)
- self.PrivateFiles = \
- FileAccess.getFolderTitles(xMSF, "pri", sLetterPath)
- self.setControlProperty(
- "lstBusinessStyle", "StringItemList",
- tuple(self.BusinessFiles[0]))
- self.setControlProperty(
- "lstPrivOfficialStyle", "StringItemList",
- tuple(self.OfficialFiles[0]))
- self.setControlProperty(
- "lstPrivateStyle", "StringItemList",
- tuple(self.PrivateFiles[0]))
- self.setControlProperty(
- "lstBusinessStyle", "SelectedItems", (0,))
- self.setControlProperty(
- "lstPrivOfficialStyle", "SelectedItems", (0,))
- self.setControlProperty(
- "lstPrivateStyle", "SelectedItems", (0,))
- return True
-
- def initializeElements(self):
- self.setControlProperty(
- "chkUseLogo", PropertyNames.PROPERTY_ENABLED,
- self.myLetterDoc.hasElement("Company Logo"))
- self.setControlProperty(
- "chkUseBendMarks", PropertyNames.PROPERTY_ENABLED,
- self.myLetterDoc.hasElement("Bend Marks"))
- self.setControlProperty(
- "chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED,
- self.myLetterDoc.hasElement("Sender Address Repeated"))
- self.setControlProperty(
- "chkUseSubject", PropertyNames.PROPERTY_ENABLED,
- self.myLetterDoc.hasElement("Subject Line"))
- self.setControlProperty(
- "chkUseSigns", PropertyNames.PROPERTY_ENABLED,
- self.myLetterDoc.hasElement("Letter Signs"))
- self.myLetterDoc.updateDateFields()
-
- def setConfiguration(self):
- if self.optBusinessLetter.State:
- self.optBusinessLetterItemChanged()
-
- elif self.optPrivOfficialLetter.State:
- self.optPrivOfficialLetterItemChanged()
-
- elif self.optPrivateLetter.State:
- self.optPrivateLetterItemChanged()
-
- def setElements(self, privLetter):
- if self.optSenderDefine.State:
- self.optSenderDefineItemChanged()
-
- if self.optSenderPlaceholder.State:
- self.optSenderPlaceholderItemChanged()
-
- self.chkUseSignsItemChanged()
- self.chkUseSubjectItemChanged()
- self.chkUseSalutationItemChanged()
- self.chkUseGreetingItemChanged()
- self.chkUseBendMarksItemChanged()
- self.chkUseAddressReceiverItemChanged()
- self.txtTemplateNameTextChanged()
- if self.optReceiverDatabase.State and not privLetter:
- self.optReceiverDatabaseItemChanged()
-
- if self.optReceiverPlaceholder.State and not privLetter:
- self.optReceiverPlaceholderItemChanged()
-
- if self.optCreateLetter.State:
- self.optCreateFromTemplateItemChanged()
-
- if self.optMakeChanges.State:
- self.optMakeChangesItemChanged()
-
- def insertRoadmap(self):
- self.addRoadmap()
-
- self.insertRoadMapItems(
- [True, False, True, True, False, True],
- self.resources.RoadmapLabels)
-
- self.setRoadmapInteractive(True)
- self.setRoadmapComplete(True)
- self.setCurrentRoadmapItemID(1)
-
- def insertPathSelectionControl(self):
- self.myPathSelection = \
- PathSelection(self.xMSF, self, PathSelection.TransferMode.SAVE,
- PathSelection.DialogTypes.FILE)
- self.myPathSelection.insert(
- 6, 97, 70, 205, 45, self.resources.reslblTemplatePath_value,
- True, HelpIds.getHelpIdString(HID + 47),
- HelpIds.getHelpIdString(HID + 48))
- self.myPathSelection.sDefaultDirectory = self.sUserTemplatePath
- self.myPathSelection.sDefaultName = "myLetterTemplate.ott"
- self.myPathSelection.sDefaultFilter = "writer8_template"
- self.myPathSelection.addSelectionListener(
- self.myPathSelectionListener())
-
- def initConfiguration(self):
- try:
- root = Configuration.getConfigurationRoot(
- self.xMSF, "/org.openoffice.Office.Writer/Wizards/Letter",
- False)
- self.myConfig.readConfiguration(root, "cp_")
- RadioDataAware.attachRadioButtons(self.myConfig, "cp_LetterType",
- (self.optBusinessLetter, self.optPrivOfficialLetter,
- self.optPrivateLetter), True).updateUI()
- UnoDataAware.attachListBox(
- self.myConfig.cp_BusinessLetter, "cp_Style",
- self.lstBusinessStyle, True).updateUI()
- UnoDataAware.attachListBox(
- self.myConfig.cp_PrivateOfficialLetter, "cp_Style",
- self.lstPrivOfficialStyle, True).updateUI()
- UnoDataAware.attachListBox(
- self.myConfig.cp_PrivateLetter, "cp_Style",
- self.lstPrivateStyle, True).updateUI()
- UnoDataAware.attachCheckBox(
- self.myConfig.cp_BusinessLetter, "cp_BusinessPaper",
- self.chkBusinessPaper, True).updateUI()
- cgl = self.myConfig.cp_BusinessLetter
- cgpl = self.myConfig.cp_BusinessLetter.cp_CompanyLogo
- cgpa = self.myConfig.cp_BusinessLetter.cp_CompanyAddress
- UnoDataAware.attachCheckBox(
- cgpl, "cp_Display", self.chkPaperCompanyLogo, True).updateUI()
- UnoDataAware.attachNumericControl(
- cgpl, "cp_Width", self.numLogoWidth, True).updateUI()
- UnoDataAware.attachNumericControl(
- cgpl, "cp_Height", self.numLogoHeight, True).updateUI()
- UnoDataAware.attachNumericControl(
- cgpl, "cp_X", self.numLogoX, True).updateUI()
- UnoDataAware.attachNumericControl(
- cgpl, "cp_Y", self.numLogoY, True).updateUI()
- UnoDataAware.attachCheckBox(
- cgpa, "cp_Display", self.chkPaperCompanyAddress, True).updateUI()
- UnoDataAware.attachNumericControl(
- cgpa, "cp_Width", self.numAddressWidth, True).updateUI()
- UnoDataAware.attachNumericControl(
- cgpa, "cp_Height", self.numAddressHeight, True).updateUI()
- UnoDataAware.attachNumericControl(
- cgpa, "cp_X", self.numAddressX, True).updateUI()
- UnoDataAware.attachNumericControl(
- cgpa, "cp_Y", self.numAddressY, True).updateUI()
- UnoDataAware.attachCheckBox(
- cgl, "cp_PaperCompanyAddressReceiverField",
- self.chkCompanyReceiver, True).updateUI()
- UnoDataAware.attachCheckBox(
- cgl, "cp_PaperFooter", self.chkPaperFooter, True).updateUI()
- UnoDataAware.attachNumericControl(
- cgl, "cp_PaperFooterHeight", self.numFooterHeight, True).updateUI()
- UnoDataAware.attachListBox(
- cgl, "cp_Norm", self.lstLetterNorm, True).updateUI()
- UnoDataAware.attachCheckBox(
- cgl, "cp_PrintCompanyLogo", self.chkUseLogo, True).updateUI()
- UnoDataAware.attachCheckBox(
- cgl, "cp_PrintCompanyAddressReceiverField",
- self.chkUseAddressReceiver, True).updateUI()
- UnoDataAware.attachCheckBox(
- cgl, "cp_PrintLetterSigns", self.chkUseSigns, True).updateUI()
- UnoDataAware.attachCheckBox(
- cgl, "cp_PrintSubjectLine", self.chkUseSubject, True).updateUI()
- UnoDataAware.attachCheckBox(
- cgl, "cp_PrintSalutation", self.chkUseSalutation, True).updateUI()
- UnoDataAware.attachCheckBox(
- cgl, "cp_PrintBendMarks", self.chkUseBendMarks, True).updateUI()
- UnoDataAware.attachCheckBox(
- cgl, "cp_PrintGreeting", self.chkUseGreeting, True).updateUI()
- UnoDataAware.attachCheckBox(
- cgl, "cp_PrintFooter", self.chkUseFooter, True).updateUI()
- UnoDataAware.attachEditControl(
- cgl, "cp_Salutation", self.lstSalutation, True).updateUI()
- UnoDataAware.attachEditControl(
- cgl, "cp_Greeting", self.lstGreeting, True).updateUI()
- RadioDataAware.attachRadioButtons(
- cgl, "cp_SenderAddressType",
- (self.optSenderDefine, self.optSenderPlaceholder), True).updateUI()
- UnoDataAware.attachEditControl(
- cgl, "cp_SenderCompanyName", self.txtSenderName, True).updateUI()
- UnoDataAware.attachEditControl(
- cgl, "cp_SenderStreet", self.txtSenderStreet, True).updateUI()
- UnoDataAware.attachEditControl(
- cgl, "cp_SenderPostCode", self.txtSenderPostCode, True).updateUI()
- UnoDataAware.attachEditControl(
- cgl, "cp_SenderState", self.txtSenderState, True).updateUI()
- UnoDataAware.attachEditControl(
- cgl, "cp_SenderCity", self.txtSenderCity, True).updateUI()
- RadioDataAware.attachRadioButtons(
- cgl, "cp_ReceiverAddressType",
- (self.optReceiverDatabase, self.optReceiverPlaceholder),
- True).updateUI()
- UnoDataAware.attachEditControl(
- cgl, "cp_Footer", self.txtFooter, True).updateUI()
- UnoDataAware.attachCheckBox(
- cgl, "cp_FooterOnlySecondPage",
- self.chkFooterNextPages, True).updateUI()
- UnoDataAware.attachCheckBox(
- cgl, "cp_FooterPageNumbers",
- self.chkFooterPageNumbers, True).updateUI()
- RadioDataAware.attachRadioButtons(
- cgl, "cp_CreationType",
- (self.optCreateLetter, self.optMakeChanges), True).updateUI()
- UnoDataAware.attachEditControl(
- cgl, "cp_TemplateName", self.txtTemplateName, True).updateUI()
- UnoDataAware.attachEditControl(
- cgl, "cp_TemplatePath", self.myPathSelection.xSaveTextBox,
- True).updateUI()
- except Exception, exception:
- traceback.print_exc()
-
- def saveConfiguration(self):
- try:
- root = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", True)
- self.myConfig.writeConfiguration(root, "cp_")
- root.commitChanges()
- except Exception, e:
- traceback.print_exc()
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
deleted file mode 100644
index 12474e34c343..000000000000
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
+++ /dev/null
@@ -1,219 +0,0 @@
-from common.Resource import Resource
-
-class LetterWizardDialogResources(Resource):
-
- MODULE_NAME = "dbw"
- RID_LETTERWIZARDDIALOG_START = 3000
- RID_LETTERWIZARDGREETING_START = 3080
- RID_LETTERWIZARDSALUTATION_START = 3090
- RID_LETTERWIZARDROADMAP_START = 3100
- RID_LETTERWIZARDLANGUAGE_START = 3110
- RID_RID_COMMON_START = 500
-
- def __init__(self, xmsf):
- super(LetterWizardDialogResources,self).__init__(
- xmsf, LetterWizardDialogResources.MODULE_NAME)
-
- self.RoadmapLabels = ()
- self.SalutationLabels = ()
- self.GreetingLabels = ()
- self.LanguageLabels = ()
- self.resLetterWizardDialog_title = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 1)
- self.resLabel9_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 2)
- self.resoptBusinessLetter_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 3)
- self.resoptPrivOfficialLetter_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 4)
- self.resoptPrivateLetter_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 5)
- self.reschkBusinessPaper_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 6)
- self.reschkPaperCompanyLogo_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 7)
- self.reschkPaperCompanyAddress_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 8)
- self.reschkPaperFooter_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 9)
- self.reschkCompanyReceiver_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 10)
- self.reschkUseLogo_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 11)
- self.reschkUseAddressReceiver_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 12)
- self.reschkUseSigns_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 13)
- self.reschkUseSubject_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 14)
- self.reschkUseSalutation_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 15)
- self.reschkUseBendMarks_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 16)
- self.reschkUseGreeting_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 17)
- self.reschkUseFooter_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 18)
- self.resoptSenderPlaceholder_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 19)
- self.resoptSenderDefine_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 20)
- self.resoptReceiverPlaceholder_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 21)
- self.resoptReceiverDatabase_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 22)
- self.reschkFooterNextPages_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 23)
- self.reschkFooterPageNumbers_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 24)
- self.restxtTemplateName_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 25)
- self.resoptCreateLetter_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 26)
- self.resoptMakeChanges_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 27)
- self.reslblBusinessStyle_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 28)
- self.reslblPrivOfficialStyle_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 29)
- self.reslblPrivateStyle_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 30)
- self.reslblIntroduction_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 31)
- self.reslblLogoHeight_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 32)
- self.reslblLogoWidth_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 33)
- self.reslblLogoX_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 34)
- self.reslblLogoY_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 35)
- self.reslblAddressHeight_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 36)
- self.reslblAddressWidth_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 37)
- self.reslblAddressX_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 38)
- self.reslblAddressY_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 39)
- self.reslblFooterHeight_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 40)
- self.reslblLetterNorm_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 41)
- self.reslblSenderAddress_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 42)
- self.reslblSenderName_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 43)
- self.reslblSenderStreet_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 44)
- self.reslblPostCodeCity_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 45)
- self.reslblReceiverAddress_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 46)
- self.reslblFooter_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 47)
- self.reslblFinalExplanation1_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 48)
- self.reslblFinalExplanation2_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 49)
- self.reslblTemplateName_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 50)
- self.reslblTemplatePath_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 51)
- self.reslblProceed_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 52)
- self.reslblTitle1_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 53)
- self.reslblTitle3_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 54)
- self.reslblTitle2_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 55)
- self.reslblTitle4_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 56)
- self.reslblTitle5_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 57)
- self.reslblTitle6_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 58)
- self.loadRoadmapResources()
- self.loadSalutationResources()
- self.loadGreetingResources()
- self.loadCommonResources()
-
- def loadCommonResources(self):
- self.resOverwriteWarning = \
- self.getResText(
- LetterWizardDialogResources.RID_RID_COMMON_START + 19)
- self.resTemplateDescription = \
- self.getResText(
- LetterWizardDialogResources.RID_RID_COMMON_START + 20)
-
- def loadRoadmapResources(self):
- i = 1
- for i in xrange(6):
- self.RoadmapLabels = self.RoadmapLabels + (self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDROADMAP_START + i + 1),)
-
- def loadSalutationResources(self):
- for i in xrange(3):
- self.SalutationLabels = self.SalutationLabels + (self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDSALUTATION_START + i + 1),)
-
- def loadGreetingResources(self):
- for i in xrange(3):
- self.GreetingLabels = self.GreetingLabels + (self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDGREETING_START + i + 1),)
diff --git a/wizards/com/sun/star/wizards/letter/LocaleCodes.py b/wizards/com/sun/star/wizards/letter/LocaleCodes.py
deleted file mode 100644
index ef376c575d8f..000000000000
--- a/wizards/com/sun/star/wizards/letter/LocaleCodes.py
+++ /dev/null
@@ -1,154 +0,0 @@
-from common.Resource import Resource
-
-class LocaleCodes(Resource):
- UNIT_NAME = "svtres",
- MODULE_NAME = "svt",
-
- def __init__(self, xmsf):
- super(LocaleCodes, self).__init__(xmsf, LocaleCodes.MODULE_NAME)
- #self.allLanguageStrings = self.getStringList(16633)
-
- def getLanguageString(self, MSID):
- LS = "unknown Language",
- for i in self.allLanguageStrings:
- if str(i.Value).lower() == MSID.lower():
- LS = i.Name
- return LS
-
- def getIDs(self):
- Ids = ("Afrikaans;af;1078",
- "Albanian;sq;1052",
- "Arabic - United Arab Emirates;ar-ae;14337",
- "Arabic - Bahrain;ar-bh;15361",
- "Arabic - Algeria;ar-dz;5121",
- "Arabic - Egypt;ar-eg;3073",
- "Arabic - Iraq;ar-iq;2049",
- "Arabic - Jordan;ar-jo;11265",
- "Arabic - Kuwait;ar-kw;13313",
- "Arabic - Lebanon;ar-lb;12289",
- "Arabic - Libya;ar-ly;4097",
- "Arabic - Morocco;ar-ma;6145",
- "Arabic - Oman;ar-om;8193",
- "Arabic - Qatar;ar-qa;16385",
- "Arabic - Saudi Arabia;ar-sa;1025",
- "Arabic - Syria;ar-sy;10241",
- "Arabic - Tunisia;ar-tn;7169",
- "Arabic - Yemen;ar-ye;9217",
- "Armenian;hy;1067",
- "Azeri - Latin;az-az;1068",
- "Azeri - Cyrillic;az-az;2092",
- "Basque;eu;1069",
- "Belarusian;be;1059",
- "Bulgarian;bg;1026",
- "Catalan;ca;1027",
- "Chinese - China;zh-cn;2052",
- "Chinese - Hong Kong SAR;zh-hk;3076",
- "Chinese - Macau SAR;zh-mo;5124",
- "Chinese - Singapore;zh-sg;4100",
- "Chinese - Taiwan;zh-tw;1028",
- "Croatian;hr;1050",
- "Czech;cs;1029",
- "Danish;da;1030",
- "Dutch - The Netherlands;nl-nl;1043",
- "Dutch - Belgium;nl-be;2067",
- "English - Australia;en-au;3081",
- "English - Belize;en-bz;10249",
- "English - Canada;en-ca;4105",
- "English - Caribbean;en-cb;9225",
- "English - Ireland;en-ie;6153",
- "English - Jamaica;en-jm;8201",
- "English - New Zealand;en-nz;5129",
- "English - Phillippines;en-ph;13321",
- "English - South Africa;en-za;7177",
- "English - Trinidad;en-tt;11273",
- "English - United Kingdom;en-gb;2057",
- "English - United States;en-us;1033",
- "Estonian;et;1061",
- "Farsi;fa;1065",
- "Finnish;fi;1035",
- "Faroese;fo;1080",
- "French - France;fr-fr;1036",
- "French - Belgium;fr-be;2060",
- "French - Canada;fr-ca;3084",
- "French - Luxembourg;fr-lu;5132",
- "French - Switzerland;fr-ch;4108",
- "Gaelic - Ireland;gd-ie;2108",
- "Gaelic - Scotland;gd;1084",
- "German - Germany;de-de;1031",
- "German - Austria;de-at;3079",
- "German - Liechtenstein;de-li;5127",
- "German - Luxembourg;de-lu;4103",
- "German - Switzerland;de-ch;2055",
- "Greek;el;1032",
- "Hebrew;he;1037",
- "Hindi;hi;1081",
- "Hungarian;hu;1038",
- "Icelandic;is;1039",
- "Indonesian;id;1057",
- "Italian - Italy;it-it;1040",
- "Italian - Switzerland;it-ch;2064",
- "Japanese;ja;1041",
- "Korean;ko;1042",
- "Latvian;lv;1062",
- "Lithuanian;lt;1063",
- "FYRO Macedonian;mk;1071",
- "Malay - Malaysia;ms-my;1086",
- "Malay - Brunei;ms-bn;2110",
- "Maltese;mt;1082",
- "Marathi;mr;1102",
- "Norwegian - Bokm?l;no-no;1044",
- "Norwegian - Nynorsk;no-no;2068",
- "Polish;pl;1045",
- "Portuguese - Portugal;pt-pt;2070",
- "Portuguese - Brazil;pt-br;1046",
- "Raeto-Romance;rm;1047",
- "Romanian - Romania;ro;1048",
- "Romanian - Moldova;ro-mo;2072",
- "Russian;ru;1049",
- "Russian - Moldova;ru-mo;2073",
- "Sanskrit;sa;1103",
- "Serbian - Cyrillic;sr-sp;3098",
- "Serbian - Latin;sr-sp;2074",
- "Setsuana;tn;1074",
- "Slovenian;sl;1060",
- "Slovak;sk;1051",
- "Sorbian;sb;1070",
- "Spanish - Spain;es-es;3082",
- "Spanish - Argentina;es-ar;11274",
- "Spanish - Bolivia;es-bo;16394",
- "Spanish - Chile;es-cl;13322",
- "Spanish - Colombia;es-co;9226",
- "Spanish - Costa Rica;es-cr;5130",
- "Spanish - Dominican Republic;es-do;7178",
- "Spanish - Ecuador;es-ec;12298",
- "Spanish - Guatemala;es-gt;4106",
- "Spanish - Honduras;es-hn;18442",
- "Spanish - Mexico;es-mx;2058",
- "Spanish - Nicaragua;es-ni;19466",
- "Spanish - Panama;es-pa;6154",
- "Spanish - Peru;es-pe;10250",
- "Spanish - Puerto Rico;es-pr;20490",
- "Spanish - Paraguay;es-py;15370",
- "Spanish - El Salvador;es-sv;17418",
- "Spanish - Uruguay;es-uy;14346",
- "Spanish - Venezuela;es-ve;8202",
- "Sutu;sx;1072",
- "Swahili;sw;1089",
- "Swedish - Sweden;sv-se;1053",
- "Swedish - Finland;sv-fi;2077",
- "Tamil;ta;1097",
- "Tatar;tt;1092",
- "Thai;th;1054",
- "Turkish;tr;1055",
- "Tsonga;ts;1073",
- "Ukrainian;uk;1058",
- "Urdu;ur;1056",
- "Uzbek - Cyrillic;uz-uz;2115",
- "Uzbek - Latin;uz-uz;1091",
- "Vietnamese;vi;1066",
- "Xhosa;xh;1076",
- "Yiddish;yi;1085",
- "Zulu;zu;1077",
- "Khmer;km-kh;1107",
- "Burmese;my-mm;1109")
- return Ids
diff --git a/wizards/com/sun/star/wizards/letter/__init__.py b/wizards/com/sun/star/wizards/letter/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/wizards/com/sun/star/wizards/letter/__init__.py
+++ /dev/null
diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py
deleted file mode 100644
index df7c0e76aafa..000000000000
--- a/wizards/com/sun/star/wizards/text/TextDocument.py
+++ /dev/null
@@ -1,263 +0,0 @@
-import uno
-import traceback
-import time
-from datetime import date as dateTimeObject
-
-from common.Desktop import Desktop
-from common.Helper import Helper
-from document.OfficeDocument import OfficeDocument
-from text.ViewHandler import ViewHandler
-from text.TextFieldHandler import TextFieldHandler
-from common.Configuration import Configuration
-
-from com.sun.star.container import NoSuchElementException
-from com.sun.star.lang import WrappedTargetException
-from com.sun.star.i18n.NumberFormatIndex import DATE_SYS_DDMMYY
-from com.sun.star.view.DocumentZoomType import ENTIRE_PAGE
-from com.sun.star.beans.PropertyState import DIRECT_VALUE
-
-class TextDocument(object):
-
- xTextDocument = None
-
- def __init__(self, xMSF,listener=None,bShowStatusIndicator=None,
- FrameName=None,_sPreviewURL=None,_moduleIdentifier=None,
- _textDocument=None, xArgs=None):
-
- self.xMSF = xMSF
-
- if listener is not None:
- if FrameName is not None:
- '''creates an instance of TextDocument
- and creates a named frame.
- No document is actually loaded into this frame.'''
- self.xFrame = OfficeDocument.createNewFrame(
- xMSF, listener, FrameName)
- return
-
- elif _sPreviewURL is not None:
- '''creates an instance of TextDocument by
- loading a given URL as preview'''
- self.xFrame = OfficeDocument.createNewFrame(xMSF, listener)
- TextDocument.xTextDocument = self.loadAsPreview(_sPreviewURL, True)
-
- elif xArgs is not None:
- '''creates an instance of TextDocument
- and creates a frame and loads a document'''
- self.xDesktop = Desktop.getDesktop(xMSF);
- self.xFrame = OfficeDocument.createNewFrame(xMSF, listener)
- TextDocument.xTextDocument = OfficeDocument.load(
- xFrame, URL, "_self", xArgs);
- self.xWindowPeer = xFrame.getComponentWindow()
- self.m_xDocProps = TextDocument.xTextDocument.DocumentProperties
- CharLocale = Helper.getUnoStructValue(
- TextDocument.xTextDocument, "CharLocale");
- return
-
- else:
- '''creates an instance of TextDocument from
- the desktop's current frame'''
- self.xDesktop = Desktop.getDesktop(xMSF);
- self.xFrame = self.xDesktop.getActiveFrame()
- TextDocument.xTextDocument = self.xFrame.getController().Model
-
- elif _moduleIdentifier is not None:
- try:
- '''create the empty document, and set its module identifier'''
- TextDocument.xTextDocument = xMSF.createInstance(
- "com.sun.star.text.TextDocument")
- TextDocument.xTextDocument.initNew()
- TextDocument.xTextDocument.setIdentifier(
- _moduleIdentifier.Identifier)
- # load the document into a blank frame
- xDesktop = Desktop.getDesktop(xMSF)
- loadArgs = range(1)
- loadArgs[0] = "Model"
- loadArgs[0] = -1
- loadArgs[0] = TextDocument.xTextDocument
- loadArgs[0] = DIRECT_VALUE
- xDesktop.loadComponentFromURL(
- "private:object", "_blank", 0, loadArgs)
- # remember some things for later usage
- self.xFrame = TextDocument.xTextDocument.CurrentController.Frame
- except Exception, e:
- traceback.print_exc()
-
- elif _textDocument is not None:
- '''creates an instance of TextDocument
- from a given XTextDocument'''
- self.xFrame = _textDocument.CurrentController.Frame
- TextDocument.xTextDocument = _textDocument
- if bShowStatusIndicator:
- self.showStatusIndicator()
- self.init()
-
- def init(self):
- self.xWindowPeer = self.xFrame.getComponentWindow()
- self.m_xDocProps = TextDocument.xTextDocument.DocumentProperties
- self.CharLocale = Helper.getUnoStructValue(
- TextDocument.xTextDocument, "CharLocale")
- self.xText = TextDocument.xTextDocument.Text
-
- def showStatusIndicator(self):
- self.xProgressBar = self.xFrame.createStatusIndicator()
- self.xProgressBar.start("", 100)
- self.xProgressBar.setValue(5)
-
- def loadAsPreview(self, sDefaultTemplate, asTemplate):
- loadValues = range(3)
- # open document in the Preview mode
- loadValues[0] = uno.createUnoStruct(
- 'com.sun.star.beans.PropertyValue')
- loadValues[0].Name = "ReadOnly"
- loadValues[0].Value = True
- loadValues[1] = uno.createUnoStruct(
- 'com.sun.star.beans.PropertyValue')
- loadValues[1].Name = "AsTemplate"
- if asTemplate:
- loadValues[1].Value = True
- else:
- loadValues[1].Value = False
-
- loadValues[2] = uno.createUnoStruct(
- 'com.sun.star.beans.PropertyValue')
- loadValues[2].Name = "Preview"
- loadValues[2].Value = True
- '''set the preview document to non-modified
- mode in order to avoid the 'do u want to save' box'''
- if TextDocument.xTextDocument is not None:
- try:
- TextDocument.xTextDocument.Modified = False
- except PropertyVetoException, e1:
- traceback.print_exc()
-
- TextDocument.xTextDocument = OfficeDocument.load(
- self.xFrame, sDefaultTemplate, "_self", loadValues)
-
- self.DocSize = self.getPageSize()
-
- myViewHandler = ViewHandler(TextDocument.xTextDocument, TextDocument.xTextDocument)
- try:
- myViewHandler.setViewSetting(
- "ZoomType", ENTIRE_PAGE)
- except Exception, e:
- traceback.print_exc()
- myFieldHandler = TextFieldHandler(self.xMSF, TextDocument.xTextDocument)
- myFieldHandler.updateDocInfoFields()
- return TextDocument.xTextDocument
-
- def getPageSize(self):
- try:
- xNameAccess = TextDocument.xTextDocument.StyleFamilies
- xPageStyleCollection = xNameAccess.getByName("PageStyles")
- xPageStyle = xPageStyleCollection.getByName("First Page")
- return Helper.getUnoPropertyValue(xPageStyle, "Size")
- except Exception, exception:
- traceback.print_exc()
- return None
-
- '''creates an instance of TextDocument and creates a
- frame and loads a document'''
-
- def createTextCursor(self, oCursorContainer):
- xTextCursor = oCursorContainer.createTextCursor()
- return xTextCursor
-
- # Todo: This method is unsecure because the last index is not necessarily the last section
- # Todo: This Routine should be modified, because I cannot rely on the last Table in the document to be the last in the TextTables sequence
- # to make it really safe you must acquire the Tablenames before the insertion and after the insertion of the new Table. By comparing the
- # two sequences of tablenames you can find out the tablename of the last inserted Table
- # Todo: This method is unsecure because the last index is not necessarily the last section
-
- def getCharWidth(self, ScaleString):
- iScale = 200
- TextDocument.xTextDocument.lockControllers()
- iScaleLen = ScaleString.length()
- xTextCursor = createTextCursor(TextDocument.xTextDocument.Text)
- xTextCursor.gotoStart(False)
- com.sun.star.wizards.common.Helper.setUnoPropertyValue(
- xTextCursor, "PageDescName", "First Page")
- xTextCursor.String = ScaleString
- xViewCursor = TextDocument.xTextDocument.CurrentController
- xTextViewCursor = xViewCursor.ViewCursor
- xTextViewCursor.gotoStart(False)
- iFirstPos = xTextViewCursor.Position.X
- xTextViewCursor.gotoEnd(False)
- iLastPos = xTextViewCursor.Position.X
- iScale = (iLastPos - iFirstPos) / iScaleLen
- xTextCursor.gotoStart(False)
- xTextCursor.gotoEnd(True)
- xTextCursor.String = ""
- unlockallControllers()
- return iScale
-
- def unlockallControllers(self):
- while TextDocument.xTextDocument.hasControllersLocked():
- TextDocument.xTextDocument.unlockControllers()
-
- def refresh(self):
- TextDocument.xTextDocument.refresh()
-
- '''
- This method sets the Author of a Wizard-generated template correctly
- and adds a explanatory sentence to the template description.
- @param WizardName The name of the Wizard.
- @param TemplateDescription The old Description which is being
- appended with another sentence.
- @return void.
- '''
-
- def setWizardTemplateDocInfo(self, WizardName, TemplateDescription):
- try:
- xNA = Configuration.getConfigurationRoot(
- self.xMSF, "/org.openoffice.UserProfile/Data", False)
- gn = xNA.getByName("givenname")
- sn = xNA.getByName("sn")
- fullname = str(gn) + " " + str(sn)
- now = time.localtime(time.time())
- year = time.strftime("%Y", now)
- month = time.strftime("%m", now)
- day = time.strftime("%d", now)
-
- dateObject = dateTimeObject(int(year), int(month), int(day))
- du = Helper.DateUtils(self.xMSF, TextDocument.xTextDocument)
- ff = du.getFormat(DATE_SYS_DDMMYY)
- myDate = du.format(ff, dateObject)
- xDocProps2 = TextDocument.xTextDocument.DocumentProperties
- xDocProps2.Author = fullname
- xDocProps2.ModifiedBy = fullname
- description = xDocProps2.Description
- description = description + " " + TemplateDescription
- description = description.replace("<wizard_name>", WizardName)
- description = description.replace("<current_date>", myDate)
- xDocProps2.Description = description
- except NoSuchElementException, e:
- # TODO Auto-generated catch block
- traceback.print_exc()
- except WrappedTargetException, e:
- # TODO Auto-generated catch block
- traceback.print_exc()
- except Exception, e:
- # TODO Auto-generated catch block
- traceback.print_exc()
-
- '''
- Apparently there is no other way to get the
- page count of a text document other than using a cursor and
- making it jump to the last page...
- @param model the document model.
- @return the page count of the document.
- '''
-
- def getPageCount(self, model):
- xController = model.getCurrentController()
- xPC = xController.getViewCursor()
- xPC.jumpToLastPage()
- return xPC.getPage()
-
- @classmethod
- def getFrameByName(self, sFrameName, xTD):
- if xTD.TextFrames.hasByName(sFrameName):
- return xTD.TextFrames.getByName(sFrameName)
-
- return None
diff --git a/wizards/com/sun/star/wizards/text/TextFieldHandler.py b/wizards/com/sun/star/wizards/text/TextFieldHandler.py
deleted file mode 100644
index 465a19e822d9..000000000000
--- a/wizards/com/sun/star/wizards/text/TextFieldHandler.py
+++ /dev/null
@@ -1,166 +0,0 @@
-import traceback
-import time
-from com.sun.star.util import DateTime
-from common.PropertyNames import PropertyNames
-import unicodedata
-
-import inspect
-
-class TextFieldHandler(object):
- '''
- Creates a new instance of TextFieldHandler
- @param xMSF
- @param xTextDocument
- '''
-
- xTextFieldsSupplierAux = None
- arrayTextFields = None
- dictTextFields = None
-
- def __init__(self, xMSF, xTextDocument):
- self.xMSFDoc = xMSF
- self.xTextFieldsSupplier = xTextDocument
- if TextFieldHandler.xTextFieldsSupplierAux is not \
- self.xTextFieldsSupplier:
- self.__getTextFields()
- TextFieldHandler.xTextFieldsSupplierAux = self.xTextFieldsSupplier
-
- def refreshTextFields(self):
- xUp = self.xTextFieldsSupplier.TextFields
- xUp.refresh()
-
- def getUserFieldContent(self, xTextCursor):
- try:
- xTextRange = xTextCursor.getEnd()
- oTextField = Helper.getUnoPropertyValue(xTextRange, "TextField")
- if com.sun.star.uno.AnyConverter.isVoid(oTextField):
- return ""
- else:
- xMaster = oTextField.getTextFieldMaster()
- UserFieldContent = xMaster.getPropertyValue("Content")
- return UserFieldContent
-
- except Exception, exception:
- traceback.print_exc()
-
- return ""
-
- def insertUserField(self, xTextCursor, FieldName, FieldTitle):
- try:
- xField = self.xMSFDoc.createInstance(
- "com.sun.star.text.TextField.User")
-
- if self.xTextFieldsSupplier.TextFieldMasters.hasByName(
- "com.sun.star.text.FieldMaster.User." + FieldName):
- oMaster = self.xTextFieldsSupplier.TextFieldMasters.getByName( \
- "com.sun.star.text.FieldMaster.User." + FieldName)
- oMaster.dispose()
-
- xPSet = createUserField(FieldName, FieldTitle)
- xField.attachTextFieldMaster(xPSet)
- xTextCursor.getText().insertTextContent(
- xTextCursor, xField, False)
- except com.sun.star.uno.Exception, exception:
- traceback.print_exc()
-
- def createUserField(self, FieldName, FieldTitle):
- xPSet = self.xMSFDoc.createInstance(
- "com.sun.star.text.FieldMaster.User")
- xPSet.setPropertyValue(PropertyNames.PROPERTY_NAME, FieldName)
- xPSet.setPropertyValue("Content", FieldTitle)
- return xPSet
-
- def __getTextFields(self):
- try:
- if self.xTextFieldsSupplier.TextFields.hasElements():
- TextFieldHandler.dictTextFields = {}
- TextFieldHandler.arrayTextFields = []
- xEnum = \
- self.xTextFieldsSupplier.TextFields.createEnumeration()
- while xEnum.hasMoreElements():
- oTextField = xEnum.nextElement()
- TextFieldHandler.arrayTextFields.append(oTextField)
- xPropertySet = oTextField.TextFieldMaster
- if xPropertySet.Name:
- TextFieldHandler.dictTextFields[xPropertySet.Name] = \
- oTextField
- except Exception, e:
- #TODO Auto-generated catch block
- traceback.print_exc()
-
- def __getTextFieldsByProperty(
- self, _PropertyName, _aPropertyValue):
- try:
- xProperty = TextFieldHandler.dictTextFields[_aPropertyValue]
- xPropertySet = xProperty.TextFieldMaster
- if xPropertySet.PropertySetInfo.hasPropertyByName(
- _PropertyName):
- oValue = xPropertySet.getPropertyValue(_PropertyName)
- sValue = unicodedata.normalize(
- 'NFKD', oValue).encode('ascii','ignore')
- if sValue == _aPropertyValue:
- return xProperty
- return None
- except KeyError, e:
- return None
-
- def changeUserFieldContent(self, _FieldName, _FieldContent):
- DependentTextFields = self.__getTextFieldsByProperty(
- PropertyNames.PROPERTY_NAME, _FieldName)
- if DependentTextFields is not None:
- DependentTextFields.TextFieldMaster.setPropertyValue("Content", _FieldContent)
- self.refreshTextFields()
-
- def updateDocInfoFields(self):
- try:
- for i in TextFieldHandler.arrayTextFields:
- if i.supportsService(
- "com.sun.star.text.TextField.ExtendedUser"):
- i.update()
-
- if i.supportsService(
- "com.sun.star.text.TextField.User"):
- i.update()
-
- except Exception, e:
- traceback.print_exc()
-
- def updateDateFields(self):
- try:
- now = time.localtime(time.time())
- dt = DateTime()
- dt.Day = time.strftime("%d", now)
- dt.Year = time.strftime("%Y", now)
- dt.Month = time.strftime("%m", now)
- dt.Month += 1
- for i in TextFieldHandler.arrayTextFields:
- if i.supportsService(
- "com.sun.star.text.TextField.DateTime"):
- i.setPropertyValue("IsFixed", False)
- i.setPropertyValue("DateTimeValue", dt)
-
- except Exception, e:
- traceback.print_exc()
-
- def fixDateFields(self, _bSetFixed):
- try:
- for i in TextFieldHandler.arrayTextFields:
- if i.supportsService(
- "com.sun.star.text.TextField.DateTime"):
- i.setPropertyValue("IsFixed", _bSetFixed)
-
- except Exception, e:
- traceback.print_exc()
-
- def removeUserFieldByContent(self, _FieldContent):
- try:
- xDependentTextFields = self.__getTextFieldsByProperty(
- "Content", _FieldContent)
- if xDependentTextFields != None:
- i = 0
- while i < xDependentTextFields.length:
- xDependentTextFields[i].dispose()
- i += 1
-
- except Exception, e:
- traceback.print_exc()
diff --git a/wizards/com/sun/star/wizards/text/TextSectionHandler.py b/wizards/com/sun/star/wizards/text/TextSectionHandler.py
deleted file mode 100644
index 685cd1c8aa8f..000000000000
--- a/wizards/com/sun/star/wizards/text/TextSectionHandler.py
+++ /dev/null
@@ -1,123 +0,0 @@
-import traceback
-import uno
-from common.Helper import Helper
-
-class TextSectionHandler(object):
- '''Creates a new instance of TextSectionHandler'''
- def __init__(self, xMSF, xTextDocument):
- self.xMSFDoc = xMSF
- self.xTextDocument = xTextDocument
- self.xText = xTextDocument.Text
-
- def removeTextSectionbyName(self, SectionName):
- try:
- xAllTextSections = self.xTextDocument.TextSections
- if xAllTextSections.hasByName(SectionName):
- oTextSection = self.xTextDocument.TextSections.getByName(
- SectionName)
- self.removeTextSection(oTextSection)
-
-
- except Exception, exception:
- traceback.print_exc()
-
- def hasTextSectionByName(self, SectionName):
- xAllTextSections = self.xTextDocument.TextSections
- return xAllTextSections.hasByName(SectionName)
-
- def removeLastTextSection(self):
- try:
- xAllTextSections = self.xTextDocument.TextSections
- oTextSection = xAllTextSections.getByIndex(
- xAllTextSections.getCount() - 1)
- self.removeTextSection(oTextSection)
- except Exception, exception:
- traceback.print_exc()
-
- def removeTextSection(self, _oTextSection):
- try:
- self.xText.removeTextContent(_oTextSection)
- except Exception, exception:
- traceback.print_exc()
-
- def removeInvisibleTextSections(self):
- try:
- xAllTextSections = self.xTextDocument.TextSections
- TextSectionCount = xAllTextSections.getCount()
- i = TextSectionCount - 1
- while i >= 0:
- xTextContentTextSection = xAllTextSections.getByIndex(i)
- if not bool(xTextContentTextSection.getPropertyValue("IsVisible")):
- self.xText.removeTextContent(xTextContentTextSection)
-
- i -= 1
- except Exception, exception:
- traceback.print_exc()
-
- def removeAllTextSections(self):
- try:
- TextSectionCount = self.xTextDocument.TextSections.Count
- xAllTextSections = self.xTextDocument.TextSections
- for i in xrange(TextSectionCount - 1, -1, -1):
- xTextContentTextSection = xAllTextSections.getByIndex(i)
- self.xText.removeTextContent(xTextContentTextSection)
- except Exception, exception:
- traceback.print_exc()
-
- def breakLinkOfTextSection(self, oTextSection):
- try:
- oSectionLink = \
- uno.createUnoStruct('com.sun.star.text.SectionFileLink')
- oSectionLink.FileURL = ""
- Helper.setUnoPropertyValues(
- oTextSection, ("FileLink", "LinkRegion"),(oSectionLink, ""))
- except Exception:
- traceback.print_exc()
-
- def linkSectiontoTemplate(
- self, TemplateName, SectionName, oTextSection=None):
- try:
- if oTextSection is not None:
- oTextSection = self.xTextDocument.TextSections.getByName(
- SectionName)
- oSectionLink = \
- uno.createUnoStruct('com.sun.star.text.SectionFileLink')
- oSectionLink.FileURL = TemplateName
- Helper.setUnoPropertyValues(
- oTextSection, ("FileLink", "LinkRegion"),
- (oSectionLink, SectionName))
- NewSectionName = oTextSection.Name
- if NewSectionName is not SectionName:
- oTextSection.Name = SectionName
- except Exception:
- traceback.print_exc()
-
- def insertTextSection(self, GroupName, TemplateName, _bAddParagraph):
- try:
- if _bAddParagraph:
- xTextCursor = self.xText.createTextCursor()
- self.xText.insertControlCharacter(
- xTextCursor, ControlCharacter.PARAGRAPH_BREAK, False)
- xTextCursor.collapseToEnd()
-
- xSecondTextCursor = self.xText.createTextCursor()
- xSecondTextCursor.gotoEnd(False)
- insertTextSection(GroupName, TemplateName, xSecondTextCursor)
- except IllegalArgumentException, e:
- traceback.print_exc()
-
- def insertTextSection(self, sectionName, templateName, position):
- try:
- if self.xTextDocument.TextSections.hasByName(sectionName):
- xTextSection = \
- self.xTextDocument.TextSections.getByName(sectionName)
- else:
- xTextSection = self.xMSFDoc.createInstance(
- "com.sun.star.text.TextSection")
- position.getText().insertTextContent(
- position, xTextSection, False)
-
- linkSectiontoTemplate(xTextSection, templateName, sectionName)
- except Exception, exception:
- traceback.print_exc()
-
diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.py b/wizards/com/sun/star/wizards/text/ViewHandler.py
deleted file mode 100644
index e86c128205c1..000000000000
--- a/wizards/com/sun/star/wizards/text/ViewHandler.py
+++ /dev/null
@@ -1,37 +0,0 @@
-class ViewHandler(object):
- '''Creates a new instance of View '''
-
- def __init__ (self, xMSF, xTextDocument):
- self.xMSFDoc = xMSF
- self.xTextDocument = xTextDocument
- self.xTextViewCursorSupplier = xTextDocument.CurrentController
-
- def selectFirstPage(self, oTextTableHandler):
- try:
- xPageCursor = self.xTextViewCursorSupplier.ViewCursor
- xPageCursor.jumpToFirstPage()
- xPageCursor.jumpToStartOfPage()
- Helper.setUnoPropertyValue(
- xPageCursor, "PageDescName", "First Page")
- oPageStyles = self.xTextDocument.StyleFamilies.getByName(
- "PageStyles")
- oPageStyle = oPageStyles.getByName("First Page")
- xAllTextTables = oTextTableHandler.xTextTablesSupplier.TextTables
- xTextTable = xAllTextTables.getByIndex(0)
- xRange = xTextTable.Anchor.Text
- xPageCursor.gotoRange(xRange, False)
- if not com.sun.star.uno.AnyConverter.isVoid(XTextRange):
- xViewTextCursor.gotoRange(xHeaderRange, False)
- xViewTextCursor.collapseToStart()
- else:
- print "No Headertext available"
-
- except com.sun.star.uno.Exception, exception:
- exception.printStackTrace(System.out)
-
- def setViewSetting(self, Setting, Value):
- self.xTextViewCursorSupplier.ViewSettings.setPropertyValue(Setting, Value)
-
- def collapseViewCursorToStart(self):
- xTextViewCursor = self.xTextViewCursorSupplier.ViewCursor
- xTextViewCursor.collapseToStart()
diff --git a/wizards/com/sun/star/wizards/text/__init__.py b/wizards/com/sun/star/wizards/text/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/wizards/com/sun/star/wizards/text/__init__.py
+++ /dev/null
diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.py b/wizards/com/sun/star/wizards/ui/ControlScroller.py
deleted file mode 100644
index 9601400d3237..000000000000
--- a/wizards/com/sun/star/wizards/ui/ControlScroller.py
+++ /dev/null
@@ -1,230 +0,0 @@
-import uno
-import traceback
-from common.Desktop import Desktop
-from common.PropertyNames import PropertyNames
-from common.HelpIds import HelpIds
-from common.Helper import Helper
-from ui.UnoDialog import UnoDialog
-
-from com.sun.star.awt.ScrollBarOrientation import HORIZONTAL, VERTICAL
-
-class ControlScroller(object):
-
- SORELFIRSTPOSY = 3
- iScrollBarWidth = 10
- scrollfields = []
- CurUnoDialog = None
- iStep = None
- curHelpIndex = None
-
- # TODO add parameters for tabindices and helpindex
- def __init__(self, _CurUnoDialog, _xMSF, _iStep, _iCompPosX, _iCompPosY,
- _iCompWidth, _nblockincrement, _nlinedistance, _firsthelpindex):
- self.xMSF = _xMSF
- ControlScroller.nblockincrement = _nblockincrement
- ControlScroller.CurUnoDialog = _CurUnoDialog
- ControlScroller.iStep = _iStep
- ControlScroller.curHelpIndex = _firsthelpindex
- self.curtabindex = ControlScroller.iStep * 100
- self.linedistance = _nlinedistance
- self.iCompPosX = _iCompPosX
- self.iCompPosY = _iCompPosY
- self.iCompWidth = _iCompWidth
- self.iCompHeight = 2 * ControlScroller.SORELFIRSTPOSY + \
- ControlScroller.nblockincrement * self.linedistance
- self.iStartPosY = self.iCompPosY + ControlScroller.SORELFIRSTPOSY
- ScrollHeight = self.iCompHeight - 2
- self.nlineincrement = 1
- self.sincSuffix = Desktop.getIncrementSuffix(
- ControlScroller.CurUnoDialog.xDialogModel, "imgBackground")
- self.oImgControl = ControlScroller.CurUnoDialog.insertControlModel(
- "com.sun.star.awt.UnoControlImageControlModel",
- "imgBackground" + self.sincSuffix,
- ("Border", PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_WIDTH),
- (1, self.iCompHeight, self.iCompPosX,
- self.iCompPosY, ControlScroller.iStep, self.iCompWidth))
- self.oImgControl = ControlScroller.CurUnoDialog.xUnoDialog.getControl(
- "imgBackground" + self.sincSuffix)
- self.setComponentMouseTransparent()
- ControlScroller.xScrollBar = ControlScroller.CurUnoDialog.insertScrollBar(
- "TitleScrollBar" + self.sincSuffix,
- ("Border", PropertyNames.PROPERTY_ENABLED,
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL, "Orientation",
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_WIDTH),
- (0, True, ScrollHeight,
- HelpIds.getHelpIdString(ControlScroller.curHelpIndex),
- VERTICAL, self.iCompPosX + self.iCompWidth - \
- ControlScroller.iScrollBarWidth - 1,
- self.iCompPosY + 1, ControlScroller.iStep,
- ControlScroller.iScrollBarWidth), 0, self)
- ControlScroller.nscrollvalue = 0
- ControlScroller.ControlGroupVector = []
- ypos = self.iStartPosY + ControlScroller.SORELFIRSTPOSY
- for i in xrange(ControlScroller.nblockincrement):
- self.insertControlGroup(i, ypos)
- ypos += self.linedistance
-
- def setComponentMouseTransparent(self):
- ControlScroller.CurUnoDialog.getPeerConfiguration().\
- setPeerProperties(self.oImgControl, "MouseTransparent", True)
-
- def setScrollBarOrientationHorizontal(self):
- Helper.setUnoPropertyValue(
- ControlScroller.xScrollBar, "Orientation", HORIZONTAL)
-
- @classmethod
- def fillupControls(self, binitialize):
- for i in xrange(ControlScroller.nblockincrement):
- if i < self.ncurfieldcount:
- self.fillupControl(i)
-
- if binitialize:
- ControlScroller.CurUnoDialog.repaintDialogStep()
-
- @classmethod
- def fillupControl(self, guiRow):
- nameProps = ControlScroller.scrollfields[guiRow]
- valueProps = ControlScroller.scrollfields[guiRow + ControlScroller.nscrollvalue]
- for index, item in enumerate(nameProps):
- if ControlScroller.CurUnoDialog.xDialogModel.hasByName(item.Name):
- self.setControlData(item.Name, valueProps[index].Value)
- else:
- raise AttributeError("No such control !")
-
- @classmethod
- def setScrollValue(self, _nscrollvalue, _ntotfieldcount=None):
- if _ntotfieldcount is not None:
- self.setTotalFieldCount(_ntotfieldcount)
- if _nscrollvalue >= 0:
- Helper.setUnoPropertyValue(
- ControlScroller.xScrollBar.Model, "ScrollValue", _nscrollvalue)
- self.scrollControls()
-
- @classmethod
- def setCurFieldCount(self):
- if self.ntotfieldcount > ControlScroller.nblockincrement:
- self.ncurfieldcount = ControlScroller.nblockincrement
- else:
- self.ncurfieldcount = self.ntotfieldcount
-
- @classmethod
- def setTotalFieldCount(self, _ntotfieldcount):
- self.ntotfieldcount = _ntotfieldcount
- self.setCurFieldCount()
- if self.ntotfieldcount > ControlScroller.nblockincrement:
- Helper.setUnoPropertyValues(
- ControlScroller.xScrollBar.Model,
- (PropertyNames.PROPERTY_ENABLED, "ScrollValueMax"),
- (True, self.ntotfieldcount - ControlScroller.nblockincrement))
- else:
- Helper.setUnoPropertyValue(ControlScroller.xScrollBar.Model,
- PropertyNames.PROPERTY_ENABLED, False)
-
- def toggleComponent(self, _bdoenable):
- bdoenable = _bdoenable and \
- (self.ntotfieldcount > ControlScroller.nblockincrement)
- ControlScroller.CurUnoDialog.setControlProperty(
- "TitleScrollBar" + self.sincSuffix,
- PropertyNames.PROPERTY_ENABLED, bdoenable)
-
- def toggleControls(self, _bdoenable):
- n = 0
- while n < ControlScroller.scrollfields.size():
- curproperties = ControlScroller.scrollfields.elementAt(n)
- m = 0
- while m < curproperties.length:
- curproperty = curproperties[m]
- ControlScroller.CurUnoDialog.setControlProperty(
- curproperty.Name, PropertyNames.PROPERTY_ENABLED, _bdoenable)
- m += 1
- n += 1
-
- @classmethod
- def scrollControls(self):
- try:
- ControlScroller.nscrollvalue = int(Helper.getUnoPropertyValue(
- ControlScroller.xScrollBar.Model, "ScrollValue"))
- if ControlScroller.nscrollvalue + ControlScroller.nblockincrement \
- >= self.ntotfieldcount:
- ControlScroller.nscrollvalue = \
- self.ntotfieldcount - ControlScroller.nblockincrement
- self.fillupControls(False)
- except Exception:
- traceback.print_exc()
-
- '''
- updates the corresponding data to
- the control in guiRow and column
- @param guiRow 0 based row index
- @param column 0 based column index
- @return the propertyValue object corresponding to
- this control.
- '''
-
- @classmethod
- def fieldInfo(self, guiRow, column):
- if guiRow + ControlScroller.nscrollvalue < len(ControlScroller.scrollfields):
- valueProp = (ControlScroller.scrollfields[guiRow + ControlScroller.nscrollvalue])[column]
- nameProp = (ControlScroller.scrollfields[guiRow])[column]
- if ControlScroller.CurUnoDialog.xDialogModel.hasByName(nameProp.Name):
- valueProp.Value = self.getControlData(nameProp.Name)
- else:
- valueProp.Value = nameProp.Value
- return valueProp
- else:
- return None
-
- @classmethod
- def unregisterControlGroup(self, _index):
- del ControlScroller.scrollfields[_index]
-
- @classmethod
- def registerControlGroup(self, _currowproperties, _i):
- if _i == 0:
- del ControlScroller.scrollfields[:]
-
- if _i >= len(ControlScroller.scrollfields):
- ControlScroller.scrollfields.append(_currowproperties)
- else:
- ControlScroller.scrollfields.insert(_currowproperties, _i)
-
- @classmethod
- def setControlData(self, controlname, newvalue):
- oControlModel = ControlScroller.CurUnoDialog.xUnoDialog.getControl(
- controlname).Model
- propertyname = UnoDialog.getDisplayProperty(oControlModel)
- if propertyname != "":
- ControlScroller.CurUnoDialog.setControlProperty(
- controlname, propertyname, newvalue)
-
- @classmethod
- def getControlData(self, controlname):
- oControlModel = ControlScroller.CurUnoDialog.xUnoDialog.getControl(
- controlname).Model
- propertyname = UnoDialog.getDisplayProperty(oControlModel)
- if propertyname != "":
- return ControlScroller.CurUnoDialog.getControlProperty(
- controlname, propertyname)
- else:
- return None
-
- def getScrollFieldValues(self):
- retproperties = [[ControlScroller.scrollfields.size()],[]]
- try:
- i = 0
- while i < ControlScroller.scrollfields.size():
- curproperties = ControlScroller.scrollfields.elementAt(i)
- retproperties[i] = curproperties
- i += 1
- return retproperties
- except java.lang.Exception, ex:
- ex.printStackTrace(System.out)
- return None
diff --git a/wizards/com/sun/star/wizards/ui/DocumentPreview.py b/wizards/com/sun/star/wizards/ui/DocumentPreview.py
deleted file mode 100644
index b3842b85b7ae..000000000000
--- a/wizards/com/sun/star/wizards/ui/DocumentPreview.py
+++ /dev/null
@@ -1,85 +0,0 @@
-import traceback
-from common.Properties import Properties
-
-from com.sun.star.awt import WindowDescriptor
-from com.sun.star.awt import Rectangle
-from com.sun.star.awt.WindowClass import SIMPLE
-from com.sun.star.awt.VclWindowPeerAttribute import CLIPCHILDREN
-from com.sun.star.awt.WindowAttribute import SHOW
-
-'''
-@author rpiterman
-To change the template for this generated type comment go to
-Window>Preferences>Java>Code Generation>Code and Comments
-'''
-
-class DocumentPreview(object):
- PREVIEW_MODE = 1
-
- '''
- create new frame with window inside
- load a component as preview into this frame
- '''
-
- def __init__(self, xmsf, control):
- self.xControl = control
- self.createPreviewFrame(xmsf, self.xControl)
-
- def setDocument(self, url_, propNames, propValues=None):
- if propValues is None:
- if propNames == DocumentPreview.PREVIEW_MODE:
- self.setDocument(url_, ("Preview", "ReadOnly"), (True, True))
- else:
- self.loadArgs = propNames
- self.xFrame.activate()
- self.xComponent = self.xFrame.loadComponentFromURL(url_, "_self", 0, tuple(self.loadArgs))
- return self.xComponent
- else:
- self.url = url_
- ps = Properties()
- for index,item in enumerate(propNames):
- ps[item] = propValues[index]
- return self.setDocument(self.url, ps.getProperties(ps))
-
- def reload(self, xmsf):
- self.closeFrame()
- self.createPreviewFrame(xmsf, self.xControl)
- self.setDocument(self.url, self.loadArgs)
-
- def closeFrame(self):
- if self.xFrame is not None:
- self.xFrame.close(False)
-
- '''
- create a new frame with a new container window inside,
- which isnt part of the global frame tree.
-
- Attention:
- a) This frame wont be destroyed by the office. It must be closed by you!
- Do so - please call XCloseable::close().
- b) The container window is part of the frame. Dont hold it alive - nor try to kill it.
- It will be destroyed inside close().
- '''
-
- def createPreviewFrame(self, xmsf, xControl):
- controlPeer = xControl.Peer
- r = xControl.PosSize
- toolkit = xmsf.createInstance("com.sun.star.awt.Toolkit")
- aDescriptor = WindowDescriptor()
- aDescriptor.Type = SIMPLE
- aDescriptor.WindowServiceName = "window"
- aDescriptor.ParentIndex = -1
- aDescriptor.Parent = controlPeer
- #xWindowPeer; #argument !
- aDescriptor.Bounds = Rectangle(0, 0, r.Width, r.Height)
- aDescriptor.WindowAttributes = CLIPCHILDREN | SHOW
- self.xWindow = toolkit.createWindow(aDescriptor)
- self.xFrame = xmsf.createInstance("com.sun.star.frame.Frame")
- self.xFrame.initialize(self.xWindow)
- self.xWindow.setVisible(True)
-
- def dispose(self):
- try:
- self.closeFrame()
- except Exception:
- traceback.print_exc()
diff --git a/wizards/com/sun/star/wizards/ui/ImageList.py b/wizards/com/sun/star/wizards/ui/ImageList.py
deleted file mode 100644
index a8b40dcaf79b..000000000000
--- a/wizards/com/sun/star/wizards/ui/ImageList.py
+++ /dev/null
@@ -1,502 +0,0 @@
-from threading import RLock
-from com.sun.star.awt import Size
-from common.PropertyNames import *
-from PeerConfig import PeerConfig
-from common.HelpIds import HelpIds
-from common.Helper import Helper
-
-def synchronized(lock):
- ''' Synchronization decorator. '''
- def wrap(f):
- def newFunction(*args, **kw):
- lock.acquire()
- try:
- return f(*args, **kw)
- finally:
- lock.release()
- return newFunction
- return wrap
-
-class ImageList(object):
- NO_BORDER = 0
- BACKGROUND_COLOR = 16777216
- HIDE_PAGE = 99
- TRANSPARENT = -1
- LINE_HEIGHT = 8
- IMAGE_PROPS = ("Border", "BackgroundColor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y, "ScaleImage",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX, "Tabstop",
- PropertyNames.PROPERTY_WIDTH)
- MOVE_SELECTION = (PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP)
- lock = RLock()
- listModel = []
- btnNext = None
- btnBack = None
-
- def __init__(self):
- self.benabled = True
- self.gap = Size(4, 4)
- self.cols = 4
- self.rows = 3
- self.imageSize = Size(20, 20)
- self.selectionGap = Size(2, 2)
- self.showButtons = True
- self.refreshOverNull = True
- self.imageTextLines = 1
- self.rowSelect = False
- self.scaleImages = True
- self.name = "il"
- self.selected = -1
- self.pageStart = 0
- self.helpURL = 0
- self.counterRenderer = self.SimpleCounterRenderer()
- self.MOVE_SELECTION_VALS = range(3)
-
- def create(self, dialog):
- self.oUnoDialog = dialog
- self.dialogModel = dialog.xDialogModel
- imageTextHeight = self.imageTextLines * ImageList.LINE_HEIGHT
- opeerConfig = PeerConfig(dialog)
- self.MOVE_SELECTION_VALS[2] = self.step
- imgContainer = dialog.insertImage(
- self.name + "lblContainer",
- ("BackgroundColor", "Border",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_WIDTH),
- (ImageList.BACKGROUND_COLOR, 1,
- (self.imageSize.Height + self.gap.Height) \
- * self.rows + self.gap.Height + imageTextHeight + 1,
- self.pos.Width,self.pos.Height, self.step,
- (self.imageSize.Width + self.gap.Width) \
- * self.cols + self.gap.Width))
- opeerConfig.setPeerProperties(imgContainer,"MouseTransparent", True)
-
- if self.rowSelect:
- selectionWidth = (self.imageSize.Width + self.gap.Width) \
- * self.cols - self.gap.Width + (self.selectionGap.Width * 2)
- else:
- selectionWidth = self.imageSize.Width + (self.selectionGap.Width * 2)
-
- self.grbxSelectedImage = dialog.insertLabel(
- self.name + "_grbxSelected",
- ("BackgroundColor", "Border",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP, "Tabstop",
- PropertyNames.PROPERTY_WIDTH),
- (ImageList.TRANSPARENT, 1,
- self.imageSize.Height + (self.selectionGap.Height * 2),
- 0, #height
- 0, #posx
- 0, #posy
- self.step, True, selectionWidth))
- xWindow = self.grbxSelectedImage
- xWindow.addMouseListener(None)
- pNames1 = (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX, "Tabstop",
- PropertyNames.PROPERTY_WIDTH)
- self.lblImageText = dialog.insertLabel(
- self.name + "_imageText", pNames1,
- (imageTextHeight, "", self.pos.Width + 1,
- self.pos.Height + (self.imageSize.Height + self.gap.Height) \
- * self.rows + self.gap.Height, self.step, 0, False,
- self.cols * (self.imageSize.Width + self.gap.Width) \
- + self.gap.Width - 2))
- if self.showButtons:
- ImageList.btnBack = dialog.insertButton(
- self.name + "_btnBack", "prevPage", pNames1,
- (14, HelpIds.getHelpIdString((self.helpURL + 1)),
- self.pos.Width, self.pos.Height + \
- (self.imageSize.Height + self.gap.Height) * \
- self.rows + self.gap.Height + imageTextHeight + 1,
- self.step, self.tabIndex + 1, True, 14), self)
- ImageList.btnNext = dialog.insertButton(
- self.name + "_btnNext", "nextPage", pNames1,
- (14, HelpIds.getHelpIdString((self.helpURL + 1)),
- self.pos.Width + (self.imageSize.Width + self.gap.Width) * \
- self.cols + self.gap.Width - 14 + 1,
- self.pos.Height + (self.imageSize.Height + self.gap.Height) \
- * self.rows + self.gap.Height + imageTextHeight + 1,
- self.step, self.tabIndex + 2, True, 14), self)
- self.lblCounter = dialog.insertLabel(
- self.name + "_lblCounter", pNames1,
- (ImageList.LINE_HEIGHT, "", self.pos.Width + 14 + 1,
- self.pos.Height + (self.imageSize.Height + self.gap.Height) \
- * self.rows + self.gap.Height + imageTextHeight + \
- ((14 - ImageList.LINE_HEIGHT) / 2),
- self.step, 0, False, self.cols * \
- (self.imageSize.Width + self.gap.Width) + \
- self.gap.Width - 2 * 14 - 1))
- Helper.setUnoPropertyValue(self.lblCounter.Model, "Align", 1)
- Helper.setUnoPropertyValue(ImageList.btnBack.Model,
- PropertyNames.PROPERTY_LABEL, "<")
- Helper.setUnoPropertyValue(ImageList.btnNext.Model,
- PropertyNames.PROPERTY_LABEL, ">")
-
- self.m_aImages = [None] * (self.rows * self.cols)
-
- for r in xrange(self.rows):
- for c in xrange(self.cols):
- self.m_aImages[r * self.cols + c] = self.createImage(dialog, r, c)
-
- self.refreshImages()
- #COMMENTED
- #ImageList.listModel.addListDataListener(None)
-
- #used for optimization
-
- def createImage(self, dialog, _row, _col):
- imageName = self.name + "_image" + str(_row * self.cols + _col)
- image = dialog.insertImage(
- imageName, ImageList.IMAGE_PROPS,
- (ImageList.NO_BORDER, ImageList.BACKGROUND_COLOR,
- self.imageSize.Height,
- HelpIds.getHelpIdString(self.helpURL + 1),
- self.getImagePosX(_col), self.getImagePosY(_row),
- self.scaleImages, self.step, self.tabIndex,
- False, self.imageSize.Width))
- #COMMENTED
- image.addMouseListener(None)
- image.addKeyListener(None)
- return image
-
- def getImagePosX(self, col):
- return self.pos.Width + col * \
- (self.imageSize.Width + self.gap.Width) + self.gap.Width
-
- def getImagePosY(self, row):
- return self.pos.Height + row * \
- (self.imageSize.Height + self.gap.Height) + self.gap.Height
-
- def refreshImages(self):
- if self.showButtons:
- self.refreshCounterText()
-
- self.hideSelection()
- if self.refreshOverNull:
- i = 0
- for i in self.m_aImages:
- i.Visible = False
-
- focusable = True
- for index, item in enumerate(self.m_aImages):
- #COMMENTED
- oResources = None #self.renderer.getImageUrls(self.getObjectFor(index))
- if oResources is not None:
- if len(oResources) == 1:
- Helper.setUnoPropertyValue(item.Model,
- PropertyNames.PROPERTY_IMAGEURL, oResources[0])
- elif len(oResources) == 2:
- self.oUnoDialog.getPeerConfiguration().setImageUrl(
- item.Model, oResources[0], oResources[1])
-
- Helper.setUnoPropertyValue(
- item.Model, "Tabstop", bool(focusable))
- if self.refreshOverNull:
- item.Visible = True
-
- focusable = False
-
- self.refreshSelection()
-
- def refreshCounterText(self):
- Helper.setUnoPropertyValue(
- self.lblCounter.Model, PropertyNames.PROPERTY_LABEL,
- self.counterRenderer.render(
- self.Counter (self.pageStart + 1,
- self.pageEnd, len(ImageList.listModel))))
-
- def pageEnd(self):
- i = self.pageStart + self.cols * self.rows
- if i > ImageList.listModel.getSize() - 1:
- return ImageList.listModel.getSize()
- else:
- return i
-
- def refreshSelection(self):
- if self.selected < self.pageStart or \
- self.selected >= (self.pageStart + self.rows * self.cols):
- self.hideSelection()
- else:
- self.moveSelection(self.getImageIndexFor(self.selected))
-
- def hideSelection(self):
- Helper.setUnoPropertyValue(self.grbxSelectedImage.Model,
- PropertyNames.PROPERTY_STEP, ImageList.HIDE_PAGE)
- self.grbxSelectedImage.Visible = False
-
- '''
- Utility field holding list of ItemListeners.
- '''
-
- def moveSelection(self, image):
- self.grbxSelectedImage.Visible = False
- row = image / self.cols
- if self.rowSelect:
- col = 0
- else:
- col = image - (row * self.cols)
-
- self.MOVE_SELECTION_VALS[0] = \
- (self.getImagePosX(col) - self.selectionGap.Width)
- self.MOVE_SELECTION_VALS[1] = \
- (self.getImagePosY(row) - self.selectionGap.Height)
- Helper.setUnoPropertyValues(
- self.grbxSelectedImage.Model, ImageList.MOVE_SELECTION,
- self.MOVE_SELECTION_VALS)
- if (Helper.getUnoPropertyValue(self.dialogModel,
- PropertyNames.PROPERTY_STEP)) == self.step:
- self.grbxSelectedImage.Visible = True
- #now focus...
-
- for index,item in enumerate(self.m_aImages):
- if index != image:
- self.defocus(index)
- else:
- Helper.setUnoPropertyValue(
- self.m_aImages[image].Model, "Tabstop", True)
-
- '''
- @param i
- @return the Object in the list model corresponding to the given image index
- '''
-
- def getObjectFor(self, i):
- ii = self.getIndexFor(i)
- if ImageList.listModel.getSize() <= ii:
- return None
- else:
- return ImageList.listModel.getElementAt(ii)
-
- '''
- @param i
- @return the index in the listModel for the given image index.
- '''
-
- def getIndexFor(self, i):
- return self.pageStart + i
-
- def getImageIndexFor(self, i):
- return i - self.pageStart
-
- def intervalAdded(self, event):
- if event.getIndex0() <= self.selected:
- if event.getIndex1() <= self.selected:
- self.selected += event.getIndex1() - event.getIndex0() + 1
-
- if event.getIndex0() < self.pageStart or \
- event.getIndex1() < (self.pageStart + getRows() + getCols()):
- refreshImages()
-
- '''
- Registers ItemListener to receive events.
- @param listener The listener to register.
- '''
-
- @synchronized(lock)
- def addItemListener(self, listener):
- if self.itemListenerList == None:
- self.itemListenerList = java.util.ArrayList.ArrayList()
-
- self.itemListenerList.append(listener)
-
- '''
- Removes ItemListener from the list of listeners.
- @param listener The listener to remove.
- '''
-
- @synchronized(lock)
- def removeItemListener(self, listener):
- if self.itemListenerList != None:
- self.itemListenerList.remove(listener)
-
- '''
- Notifies all registered listeners about the event.
- @param event The event to be fired
- '''
-
- def fireItemSelected(self):
- with ImageList.lock:
- if self.itemListenerList is None:
- return
-
- auxlist = self.itemListenerList.clone()
-
- for i in auxlist:
- i.itemStateChanged(None)
-
- def setSelected(self, _object):
- if not isinstance(_object, int):
- _object = -1
- if _object is not None:
- for index, item in enumerate(ImageList.listModel):
- if item == _object:
- _object = index
- return
-
- if self.rowSelect and (_object >= 0):
- _object = (_object / self.cols) * self.cols
-
- if self.selected == _object:
- return
-
- self.selected = _object
- self.refreshImageText()
- self.refreshSelection()
- #COMMENTED
- #self.fireItemSelected()
-
- def refreshImageText(self):
- if self.selected >= 0:
- #COMMENTED
- item = None #ImageList.listModel.getElementAt(self.selected)
- else:
- item = None
-
- Helper.setUnoPropertyValue(
- self.lblImageText.Model, PropertyNames.PROPERTY_LABEL,
- " " + self.renderer.render(item))
-
-
- def nextPage(self):
- if self.pageStart < listModel().getSize() - self.rows * self.cols:
- setPageStart(self.pageStart + self.rows * self.cols)
-
- def prevPage(self):
- if self.pageStart == 0:
- return
-
- i = self.pageStart - self.rows * self.cols
- if i < 0:
- i = 0
-
- setPageStart(i)
-
- def enableButtons(self):
- self.enable(
- ImageList.btnNext,
- bool(self.pageStart + self.rows * self.cols < len(ImageList.listModel)))
- self.enable(ImageList.btnBack, bool(self.pageStart > 0))
-
- def enable(self, control, enable):
- Helper.setUnoPropertyValue(control.Model,
- PropertyNames.PROPERTY_ENABLED, enable)
-
- def setBorder(self, control, border):
- Helper.setUnoPropertyValue(control.Model, "Border", border)
-
- def getImageFromEvent(self, event):
- image = (event).Source
- controlName = Helper.getUnoPropertyValue(image.Model,
- PropertyNames.PROPERTY_NAME)
- return Integer.valueOf(controlName.substring(6 + self.name.length()))
-
- def mousePressed(self, event):
- image = getImageFromEvent(event)
- index = getIndexFor(image)
- if index < ImageList.listModel.getSize():
- focus(image)
- setSelected(index)
-
- def getSelectedObjects(self):
- return[listModel().getElementAt(self.selected)]
-
- class SimpleCounterRenderer:
-
- def render(self, counter):
- return \
- "" + (counter).start + ".." + (counter).end + "/" + (counter).max
-
- class Counter(object):
-
- def __init__(self, start_, end_, max_):
- self.start = start_
- self.end = end_
- self.max = max_
-
- def getSelectedObject(self):
- if self.selected >= 0:
- return listModel().getElementAt(self.selected)
- return None
-
- def showSelected(self):
- oldPageStart = self.pageStart
- if self.selected != -1:
- self.pageStart = \
- (self.selected / len(self.m_aImages)) * len(self.m_aImages)
-
- if oldPageStart != self.pageStart:
- #COMMENTED
- #self.enableButtons()
- self.refreshImages()
-
- def keyPressed(self, ke):
- image = getImageFromEvent(ke)
- r = image / getCols()
- c = image - (r * getCols())
- d = getKeyMove(ke, r, c)
- newImage = image + d
- if newImage == image:
- return
-
- if isFocusable(newImage):
- changeFocus(image, newImage)
-
- def isFocusable(self, image):
- return (image >= 0) and \
- (getIndexFor(image) < ImageList.listModel.getSize())
-
- def changeFocus(self, oldFocusImage, newFocusImage):
- focus(newFocusImage)
- defocus(oldFocusImage)
-
- def select(self, ke):
- setSelected(getIndexFor(getImageFromEvent(ke)))
-
- def focus(self, image):
- Helper.setUnoPropertyValue(
- self.m_aImages[image].Model, "Tabstop", True)
- xWindow = self.m_aImages[image]
- xWindow.setFocus()
-
- def defocus(self, image):
- Helper.setUnoPropertyValue(
- self.m_aImages[image].Model, "Tabstop", False)
-
- '''jump to the given item (display the screen
- that contains the given item).
- @param i
- '''
-
- def display(self, i):
- isAux = (getCols() * getRows())
- ps = (ImageList.listModel.getSize() / isAux) * isAux
- setPageStart(ps)
-
- def setenabled(self, b):
- i = 0
- while i < self.m_aImages.length:
- UnoDialog2.setEnabled(self.m_aImages[i], b)
- i += 1
- UnoDialog2.setEnabled(self.grbxSelectedImage, b)
- UnoDialog2.setEnabled(self.lblImageText, b)
- if self.showButtons:
- UnoDialog2.setEnabled(ImageList.btnBack, b)
- UnoDialog2.setEnabled(ImageList.btnNext, b)
- UnoDialog2.setEnabled(self.lblCounter, b)
-
- self.benabled = b
diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py
deleted file mode 100644
index 2be27ac836f9..000000000000
--- a/wizards/com/sun/star/wizards/ui/PathSelection.py
+++ /dev/null
@@ -1,121 +0,0 @@
-import traceback
-from common.PropertyNames import *
-from common.FileAccess import *
-from common.SystemDialog import SystemDialog
-
-class PathSelection(object):
-
- class DialogTypes(object):
- FOLDER = 0
- FILE = 1
-
- class TransferMode(object):
- SAVE = 0
- LOAD = 1
-
- def __init__(self, xMSF, CurUnoDialog, TransferMode, DialogType):
- self.CurUnoDialog = CurUnoDialog
- self.xMSF = xMSF
- self.iDialogType = DialogType
- self.iTransferMode = TransferMode
- self.sDefaultDirectory = ""
- self.sDefaultName = ""
- self.sDefaultFilter = ""
- self.usedPathPicker = False
- self.CMDSELECTPATH = 1
- self.TXTSAVEPATH = 1
-
- def insert(
- self, DialogStep, XPos, YPos, Width,
- CurTabIndex, LabelText, Enabled, TxtHelpURL, BtnHelpURL):
-
- self.CurUnoDialog.insertControlModel(
- "com.sun.star.awt.UnoControlFixedTextModel", "lblSaveAs",
- (PropertyNames.PROPERTY_ENABLED,
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (Enabled, 8, LabelText, XPos, YPos, DialogStep,
- CurTabIndex, Width))
- self.xSaveTextBox = self.CurUnoDialog.insertTextField(
- "txtSavePath", "callXPathSelectionListener",
- (PropertyNames.PROPERTY_ENABLED,
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (Enabled, 12, TxtHelpURL, XPos, YPos + 10, DialogStep,
- (CurTabIndex + 1), Width - 26), self)
-
- self.CurUnoDialog.setControlProperty("txtSavePath",
- PropertyNames.PROPERTY_ENABLED, False )
- self.CurUnoDialog.insertButton("cmdSelectPath", "triggerPathPicker",
- (PropertyNames.PROPERTY_ENABLED,
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (Enabled, 14, BtnHelpURL, "...",XPos + Width - 16, YPos + 9,
- DialogStep, (CurTabIndex + 2), 16), self)
-
- def addSelectionListener(self, xAction):
- self.xAction = xAction
-
- def getSelectedPath(self):
- return self.xSaveTextBox.Text
-
- def initializePath(self):
- try:
- myFA = FileAccess(self.xMSF)
- self.xSaveTextBox.setText(
- myFA.getPath(self.sDefaultDirectory + \
- "/" + \
- self.sDefaultName, None))
- except Exception, e:
- traceback.print_exc()
-
- def triggerPathPicker(self):
- try:
- if self.iTransferMode == self.TransferMode.SAVE:
- if self.iDialogType == self.DialogTypes.FOLDER:
- #TODO: write code for picking a folder for saving
- return
- elif self.iDialogType == self.DialogTypes.FILE:
- self.usedPathPicker = True
- myFilePickerDialog = \
- SystemDialog.createStoreDialog(self.xMSF)
- myFilePickerDialog.callStoreDialog(
- self.sDefaultDirectory,
- self.sDefaultName, self.sDefaultFilter)
- sStorePath = myFilePickerDialog.sStorePath
- if sStorePath is not None:
- myFA = FileAccess(self.xMSF);
- self.xSaveTextBox.Text = myFA.getPath(sStorePath, None)
- self.sDefaultDirectory = \
- FileAccess.getParentDir(sStorePath)
- self.sDefaultName = myFA.getFilename(sStorePath)
- return
- elif iTransferMode == TransferMode.LOAD:
- if iDialogType == DialogTypes.FOLDER:
- #TODO: write code for picking a folder for loading
- return
- elif iDialogType == DialogTypes.FILE:
- #TODO: write code for picking a file for loading
- return
- except Exception, e:
- traceback.print_exc()
-
- def callXPathSelectionListener(self):
- if self.xAction != None:
- self.xAction.validatePath()
diff --git a/wizards/com/sun/star/wizards/ui/PeerConfig.py b/wizards/com/sun/star/wizards/ui/PeerConfig.py
deleted file mode 100644
index b43d8bd5cc13..000000000000
--- a/wizards/com/sun/star/wizards/ui/PeerConfig.py
+++ /dev/null
@@ -1,62 +0,0 @@
-from event.CommonListener import WindowListenerProcAdapter
-
-'''
-@author rpiterman
-To change the template for this generated type comment go to
-Window>Preferences>Java>Code Generation>Code and Comments
-'''
-
-class PeerConfig(object):
-
- def __init__(self, _oUnoDialog):
- self.oUnoDialog = _oUnoDialog
- self.oUnoDialog.xUnoDialog.addWindowListener(
- WindowListenerProcAdapter(self.windowShown))
- self.m_aPeerTasks = []
- self.aImageUrlTasks = []
-
- class PeerTask(object):
-
- def __init__(self, _xControl, _propNames, _propValues):
- self.propnames = _propNames
- self.propvalues = _propValues
- self.xControl = _xControl
-
- class ImageUrlTask(object):
-
- def __init__(self, _oModel, _oResource, _oHCResource):
- self.oModel = _oModel
- self.oResource = _oResource
- self.oHCResource = _oHCResource
-
- def windowShown(self):
- try:
- for i in self.m_aPeerTasks:
- xVclWindowPeer = i.xControl.Peer
- xVclWindowPeer.setProperty(i.propnames, i.propvalues)
-
- for i in self.aImageUrlTasks:
- if isinstance(aImageUrlTask.oResource, int):
- sImageUrl = oUnoDialog.getWizardImageUrl(aImageUrlTask.oResource, aImageUrlTask.oHCResource)
- elif isinstance(aImageUrlTask.oResource, str):
- sImageUrl = oUnoDialog.getImageUrl(aImageUrlTask.oResource, aImageUrlTask.oHCResource)
- if sImageUrl != "":
- Helper.setUnoPropertyValue(aImageUrlTask.oModel, PropertyNames.PROPERTY_IMAGEURL, sImageUrl)
-
- except Exception:
- traceback.print_exc()
-
- '''
- @param oAPIControl an API control that the interface
- XControl can be derived from
- @param _propnames
- @param _propvalues
- '''
-
- def setPeerProperties(self, _xControl, propnames, propvalues):
- oPeerTask = self.PeerTask(_xControl, propnames, propvalues)
- self.m_aPeerTasks.append(oPeerTask)
-
- def setImageUrl(self, _ocontrolmodel, _oResource, _oHCResource):
- oImageUrlTask = self.ImageUrlTask(_ocontrolmodel, _oResource, _oHCResource)
- self.aImageUrlTasks.append(oImageUrlTask)
diff --git a/wizards/com/sun/star/wizards/ui/UIConsts.py b/wizards/com/sun/star/wizards/ui/UIConsts.py
deleted file mode 100644
index a975ff4904d5..000000000000
--- a/wizards/com/sun/star/wizards/ui/UIConsts.py
+++ /dev/null
@@ -1,53 +0,0 @@
-RID_COMMON = 500
-RID_DB_COMMON = 1000
-RID_FORM = 2200
-RID_QUERY = 2300
-RID_REPORT = 2400
-RID_TABLE = 2500
-RID_IMG_REPORT = 1000
-RID_IMG_FORM = 1100
-RID_IMG_WEB = 1200
-INVISIBLESTEP = 99
-INFOIMAGEURL = "private:resource/dbu/image/19205"
-
-'''
-The tabindex of the navigation buttons in a wizard must be assigned a very
-high tabindex because on every step their taborder must appear at the end
-'''
-SOFIRSTWIZARDNAVITABINDEX = 30000
-
-#Steps of the QueryWizard
-
-SOFIELDSELECTIONPAGE = 1
-SOSORTINGPAGE = 2
-SOFILTERPAGE = 3
-SOAGGREGATEPAGE = 4
-SOGROUPSELECTIONPAGE = 5
-SOGROUPFILTERPAGE = 6
-SOTITLESPAGE = 7
-SOSUMMARYPAGE = 8
-
-class CONTROLTYPE():
-
- BUTTON = 1
- IMAGECONTROL = 2
- LISTBOX = 3
- COMBOBOX = 4
- CHECKBOX = 5
- RADIOBUTTON = 6
- DATEFIELD = 7
- EDITCONTROL = 8
- FILECONTROL = 9
- FIXEDLINE = 10
- FIXEDTEXT = 11
- FORMATTEDFIELD = 12
- GROUPBOX = 13
- HYPERTEXT = 14
- NUMERICFIELD = 15
- PATTERNFIELD = 16
- PROGRESSBAR = 17
- ROADMAP = 18
- SCROLLBAR = 19
- TIMEFIELD = 20
- CURRENCYFIELD = 21
- UNKNOWN = -1
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.py b/wizards/com/sun/star/wizards/ui/UnoDialog.py
deleted file mode 100644
index 53519ec30fec..000000000000
--- a/wizards/com/sun/star/wizards/ui/UnoDialog.py
+++ /dev/null
@@ -1,412 +0,0 @@
-import uno
-import traceback
-import UIConsts
-from common.PropertyNames import PropertyNames
-from common.Helper import Helper
-from ui.PeerConfig import PeerConfig
-
-from com.sun.star.awt import Rectangle
-from com.sun.star.awt import Rectangle
-from com.sun.star.awt.PosSize import POS
-
-class UnoDialog(object):
-
- createDict = False
- dictProperties = None
-
- def __init__(self, xMSF, PropertyNames, PropertyValues):
- try:
- self.xMSF = xMSF
- self.ControlList = {}
- self.xDialogModel = xMSF.createInstance(
- "com.sun.star.awt.UnoControlDialogModel")
- self.xDialogModel.setPropertyValues(PropertyNames, PropertyValues)
- self.xUnoDialog = xMSF.createInstance(
- "com.sun.star.awt.UnoControlDialog")
- self.xUnoDialog.setModel(self.xDialogModel)
- self.m_oPeerConfig = None
- self.xWindowPeer = None
- except Exception, e:
- traceback.print_exc()
-
- def getControlKey(self, EventObject, ControlList):
- xControlModel = EventObject.getModel()
- try:
- sName = xControlModel.getPropertyValue(
- PropertyNames.PROPERTY_NAME)
- iKey = ControlList.get(sName).intValue()
- except com.sun.star.uno.Exception, exception:
- traceback.print_exc()
- iKey = 2000
-
- return iKey
-
- def getPeerConfiguration(self):
- if self.m_oPeerConfig is None:
- self.m_oPeerConfig = PeerConfig(self)
- return self.m_oPeerConfig
-
- def setControlProperty(self, ControlName, PropertyName, PropertyValue):
- try:
- if PropertyValue is not None:
- if not self.xDialogModel.hasByName(ControlName):
- return
- xPSet = self.xDialogModel.getByName(ControlName)
- setattr(xPSet,PropertyName, PropertyValue)
-
- except Exception, exception:
- traceback.print_exc()
-
- def setControlProperties(
- self, ControlName, PropertyNames, PropertyValues):
- self.setControlProperty(ControlName, PropertyNames, PropertyValues)
-
- def getControlProperty(self, ControlName, PropertyName):
- try:
- xPSet = self.xDialogModel.getByName(ControlName)
- return xPSet.getPropertyValue(PropertyName)
- except Exception, exception:
- traceback.print_exc()
- return None
-
-
- def printControlProperties(self, ControlName):
- try:
- xControlModel = self.xDialogModel().getByName(ControlName)
- allProps = xControlModel.PropertySetInfo.Properties
- i = 0
- while i < allProps.length:
- sName = allProps[i].Name
- i += 1
- except Exception, exception:
- traceback.print_exc()
-
- def getMAPConversionFactor(self, ControlName):
- xControl2 = self.xUnoDialog.getControl(ControlName)
- aSize = xControl2.Size
- dblMAPWidth = Helper.getUnoPropertyValue(xControl2.Model,
- int(PropertyNames.PROPERTY_WIDTH))
- return (aSize.Width / dblMAPWidth)
-
- def getpreferredLabelSize(self, LabelName, sLabel):
- xControl2 = self.xUnoDialog.getControl(LabelName)
- OldText = xControl2.Text
- xControl2.setText(sLabel)
- aSize = xControl2.PreferredSize
- xControl2.setText(OldText)
- return aSize
-
- def removeSelectedItems(self, xListBox):
- SelList = xListBox.SelectedItemsPos
- Sellen = SelList.length
- i = Sellen - 1
- while i >= 0:
- xListBox.removeItems(SelList[i], 1)
- i -= 1
-
- def getListBoxItemCount(self, _xListBox):
- # This function may look ugly, but this is the only way to check
- # the count of values in the model,which is always right.
- # the control is only a view and could be right or not.
- fieldnames = Helper.getUnoPropertyValue(getModel(_xListBox),
- "StringItemList")
- return fieldnames.length
-
- def getSelectedItemPos(self, _xListBox):
- ipos = Helper.getUnoPropertyValue(getModel(_xListBox),
- "SelectedItems")
- return ipos[0]
-
- def isListBoxSelected(self, _xListBox):
- ipos = Helper.getUnoPropertyValue(getModel(_xListBox),
- "SelectedItems")
- return ipos.length > 0
-
- def addSingleItemtoListbox(self, xListBox, ListItem, iSelIndex):
- xListBox.addItem(ListItem, xListBox.getItemCount())
- if iSelIndex != -1:
- xListBox.selectItemPos(iSelIndex, True)
-
- '''
- The problem with setting the visibility of controls is that
- changing the current step of a dialog will automatically make
- all controls visible. The PropertyNames.PROPERTY_STEP property
- always wins against the property "visible".
- Therfor a control meant to be invisible is placed on a step far far away.
- Afterwards the step property of the dialog has to be set with
- "repaintDialogStep". As the performance of that method is very bad it
- should be used only once for all controls
- @param controlname the name of the control
- @param bIsVisible sets the control visible or invisible
- '''
-
- def setControlVisible(self, controlname, bIsVisible):
- try:
- iCurControlStep = int(getControlProperty(
- controlname, PropertyNames.PROPERTY_STEP))
- iCurDialogStep = int(Helper.getUnoPropertyValue(
- self.xDialogModel, PropertyNames.PROPERTY_STEP))
- if bIsVisible:
- setControlProperty(
- controlname, PropertyNames.PROPERTY_STEP, iCurDialogStep)
- else:
- setControlProperty(
- controlname, PropertyNames.PROPERTY_STEP,
- UIConsts.INVISIBLESTEP)
-
- except com.sun.star.uno.Exception, exception:
- traceback.print_exc()
-
- # repaints the currentDialogStep
-
- def repaintDialogStep(self):
- try:
- ncurstep = int(Helper.getUnoPropertyValue(
- self.xDialogModel, PropertyNames.PROPERTY_STEP))
- Helper.setUnoPropertyValue(
- self.xDialogModel, PropertyNames.PROPERTY_STEP, 99)
- Helper.setUnoPropertyValue(
- self.xDialogModel, PropertyNames.PROPERTY_STEP, ncurstep)
- except com.sun.star.uno.Exception, exception:
- traceback.print_exc()
-
- def insertControlModel(
- self, serviceName, componentName, sPropNames, oPropValues):
- try:
- xControlModel = self.xDialogModel.createInstance(serviceName)
- Helper.setUnoPropertyValues(
- xControlModel, sPropNames, oPropValues)
- self.xDialogModel.insertByName(componentName, xControlModel)
- Helper.setUnoPropertyValue(xControlModel,
- PropertyNames.PROPERTY_NAME, componentName)
- except Exception, ex:
- traceback.print_exc()
-
- aObj = self.xUnoDialog.getControl(componentName)
- return aObj
-
- def setFocus(self, ControlName):
- oFocusControl = self.xUnoDialog.getControl(ControlName)
- oFocusControl.setFocus()
-
- def combineListboxList(self, sFirstEntry, MainList):
- try:
- FirstList = [sFirstEntry]
- ResultList = [MainList.length + 1]
- System.arraycopy(FirstList, 0, ResultList, 0, 1)
- System.arraycopy(MainList, 0, ResultList, 1, len(MainList))
- return ResultList
- except java.lang.Exception, jexception:
- traceback.print_exc()
- return None
-
- def selectListBoxItem(self, xListBox, iFieldsSelIndex):
- if iFieldsSelIndex > -1:
- FieldCount = xListBox.getItemCount()
- if FieldCount > 0:
- if iFieldsSelIndex < FieldCount:
- xListBox.selectItemPos(iFieldsSelIndex, True)
- else:
- xListBox.selectItemPos((short)(iFieldsSelIndex - 1), True)
-
- # deselects a Listbox. MultipleMode is not supported
-
- def deselectListBox(self, _xBasisListBox):
- oListBoxModel = getModel(_xBasisListBox)
- sList = Helper.getUnoPropertyValue(oListBoxModel, "StringItemList")
- Helper.setUnoPropertyValue(oListBoxModel, "StringItemList", [[],[]])
- Helper.setUnoPropertyValue(oListBoxModel, "StringItemList", sList)
-
- def calculateDialogPosition(self, FramePosSize):
- # Todo:check if it would be useful or possible to create a dialog peer
- # that can be used for the messageboxes to
- # maintain modality when they pop up.
- CurPosSize = self.xUnoDialog.getPosSize()
- WindowHeight = FramePosSize.Height
- WindowWidth = FramePosSize.Width
- DialogWidth = CurPosSize.Width
- DialogHeight = CurPosSize.Height
- iXPos = ((WindowWidth / 2) - (DialogWidth / 2))
- iYPos = ((WindowHeight / 2) - (DialogHeight / 2))
- self.xUnoDialog.setPosSize(
- iXPos, iYPos, DialogWidth, DialogHeight, POS)
-
- '''
- @param FramePosSize
- @return 0 for cancel, 1 for ok
- @throws com.sun.star.uno.Exception
- '''
-
- def executeDialog(self, FramePosSize):
- if self.xUnoDialog.getPeer() == None:
- raise AttributeError(
- "Please create a peer, using your own frame")
-
- self.calculateDialogPosition(FramePosSize)
-
- if self.xWindowPeer == None:
- self.createWindowPeer()
- return self.xUnoDialog.execute()
-
- def setVisible(self, parent):
- self.calculateDialogPosition(parent.xWindow.getPosSize())
- if self.xWindowPeer == None:
- self.createWindowPeer()
-
- self.xUnoDialog.setVisible(True)
-
- '''
- @param parent
- @return 0 for cancel, 1 for ok
- @throws com.sun.star.uno.Exception
- '''
-
- def executeDialogFromParent(self, parent):
- return self.executeDialog(parent.xUnoDialog.PosSize)
-
- '''
- @param XComponent
- @return 0 for cancel, 1 for ok
- @throws com.sun.star.uno.Exception
- '''
-
- def executeDialogFromComponent(self, xComponent):
- if xComponent is not None:
- w = xComponent.ComponentWindow
- if w is not None:
- return self.executeDialog(w.PosSize)
-
- return self.executeDialog( Rectangle (0, 0, 640, 400))
-
- def modifyFontWeight(self, ControlName, FontWeight):
- oFontDesc = FontDescriptor.FontDescriptor()
- oFontDesc.Weight = FontWeight
- setControlProperty(ControlName, "FontDescriptor", oFontDesc)
-
- '''
- create a peer for this
- dialog, using the given
- peer as a parent.
- @param parentPeer
- @return
- @throws java.lang.Exception
- '''
-
- def createWindowPeer(self, parentPeer=None):
- self.xUnoDialog.setVisible(False)
- xToolkit = self.xMSF.createInstance("com.sun.star.awt.Toolkit")
- if parentPeer == None:
- parentPeer = xToolkit.getDesktopWindow()
-
- self.xUnoDialog.createPeer(xToolkit, parentPeer)
- self.xWindowPeer = self.xUnoDialog.getPeer()
- return self.xUnoDialog.getPeer()
-
- # deletes the first entry when this is equal to "DelEntryName"
- # returns true when a new item is selected
-
- def deletefirstListboxEntry(self, ListBoxName, DelEntryName):
- xListBox = self.xUnoDialog.getControl(ListBoxName)
- FirstItem = xListBox.getItem(0)
- if FirstItem.equals(DelEntryName):
- SelPos = xListBox.getSelectedItemPos()
- xListBox.removeItems(0, 1)
- if SelPos > 0:
- setControlProperty(ListBoxName, "SelectedItems", [SelPos])
- xListBox.selectItemPos((short)(SelPos - 1), True)
-
- @classmethod
- def setEnabled(self, control, enabled):
- Helper.setUnoPropertyValue(
- control.Model, PropertyNames.PROPERTY_ENABLED, enabled)
-
- @classmethod
- def getControlModelType(self, xServiceInfo):
- if xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlFixedTextModel"):
- return UIConsts.CONTROLTYPE.FIXEDTEXT
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlButtonModel"):
- return UIConsts.CONTROLTYPE.BUTTON
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlCurrencyFieldModel"):
- return UIConsts.CONTROLTYPE.CURRENCYFIELD
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlDateFieldModel"):
- return UIConsts.CONTROLTYPE.DATEFIELD
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlFixedLineModel"):
- return UIConsts.CONTROLTYPE.FIXEDLINE
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlFormattedFieldModel"):
- return UIConsts.CONTROLTYPE.FORMATTEDFIELD
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlRoadmapModel"):
- return UIConsts.CONTROLTYPE.ROADMAP
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlNumericFieldModel"):
- return UIConsts.CONTROLTYPE.NUMERICFIELD
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlPatternFieldModel"):
- return UIConsts.CONTROLTYPE.PATTERNFIELD
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlHyperTextModel"):
- return UIConsts.CONTROLTYPE.HYPERTEXT
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlProgressBarModel"):
- return UIConsts.CONTROLTYPE.PROGRESSBAR
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlTimeFieldModel"):
- return UIConsts.CONTROLTYPE.TIMEFIELD
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlImageControlModel"):
- return UIConsts.CONTROLTYPE.IMAGECONTROL
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlRadioButtonModel"):
- return UIConsts.CONTROLTYPE.RADIOBUTTON
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlCheckBoxModel"):
- return UIConsts.CONTROLTYPE.CHECKBOX
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlEditModel"):
- return UIConsts.CONTROLTYPE.EDITCONTROL
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlComboBoxModel"):
- return UIConsts.CONTROLTYPE.COMBOBOX
- elif xServiceInfo.supportsService(
- "com.sun.star.awt.UnoControlListBoxModel"):
- return UIConsts.CONTROLTYPE.LISTBOX
- else:
- return UIConsts.CONTROLTYPE.UNKNOWN
-
- @classmethod
- def getDisplayProperty(self, oControlModel):
- itype = self.getControlModelType(oControlModel)
- if not UnoDialog.createDict:
- UnoDialog.createDict = True
- UnoDialog.dictProperties = {
- UIConsts.CONTROLTYPE.FIXEDTEXT:PropertyNames.PROPERTY_LABEL,
- UIConsts.CONTROLTYPE.BUTTON:PropertyNames.PROPERTY_LABEL,
- UIConsts.CONTROLTYPE.FIXEDLINE:PropertyNames.PROPERTY_LABEL,
- UIConsts.CONTROLTYPE.NUMERICFIELD:"Value",
- UIConsts.CONTROLTYPE.CURRENCYFIELD:"Value",
- UIConsts.CONTROLTYPE.FORMATTEDFIELD:"EffectiveValue",
- UIConsts.CONTROLTYPE.DATEFIELD:"Date",
- UIConsts.CONTROLTYPE.TIMEFIELD:"Time",
- UIConsts.CONTROLTYPE.SCROLLBAR:"ScrollValue",
- UIConsts.CONTROLTYPE.PROGRESSBAR:"ProgressValue",
- UIConsts.CONTROLTYPE.IMAGECONTROL:PropertyNames.PROPERTY_IMAGEURL,
- UIConsts.CONTROLTYPE.RADIOBUTTON:PropertyNames.PROPERTY_STATE,
- UIConsts.CONTROLTYPE.CHECKBOX:PropertyNames.PROPERTY_STATE,
- UIConsts.CONTROLTYPE.EDITCONTROL:"Text",
- UIConsts.CONTROLTYPE.COMBOBOX:"Text",
- UIConsts.CONTROLTYPE.PATTERNFIELD:"Text",
- UIConsts.CONTROLTYPE.LISTBOX:"SelectedItems"
- }
- try:
- return UnoDialog.dictProperties[itype]
- except KeyError:
- return ""
-
- def addResourceHandler(self, _Unit, _Module):
- self.m_oResource = Resource(self.xMSF, _Unit, _Module)
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py
deleted file mode 100644
index 45b6249a942f..000000000000
--- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py
+++ /dev/null
@@ -1,239 +0,0 @@
-from UnoDialog import *
-from ui.event.CommonListener import *
-from common.Desktop import Desktop
-
-'''
-This class contains convenience methods for inserting components to a dialog.
-It was created for use with the automatic conversion of Basic XML Dialog
-description files to a Java class which builds
-the same dialog through the UNO API.<br/>
-It uses an Event-Listener method, which calls a method through reflection
-wenn an event on a component is trigered.
-see the classes CommonListener for details
-'''
-
-class UnoDialog2(UnoDialog):
-
- '''
- Override this method to return another listener.
- @return
- '''
-
- def __init__(self, xmsf):
- super(UnoDialog2,self).__init__(xmsf,(), ())
- ControlList = {}
-
- def insertButton(
- self, sName, actionPerformed, sPropNames, oPropValues, listener):
- xButton = self.insertControlModel(
- "com.sun.star.awt.UnoControlButtonModel",
- sName, sPropNames, oPropValues)
- if actionPerformed is not None:
- actionPerformed = getattr(listener, actionPerformed)
- xButton.addActionListener(
- ActionListenerProcAdapter(actionPerformed))
-
- return xButton
-
- def insertImageButton(
- self, sName, actionPerformed, sPropNames, oPropValues, listener):
- xButton = self.insertControlModel(
- "com.sun.star.awt.UnoControlButtonModel",
- sName, sPropNames, oPropValues)
- if actionPerformed is not None:
- actionPerformed = getattr(listener, actionPerformed)
- xButton.addActionListener(
- ActionListenerProcAdapter(actionPerformed))
-
- return xButton
-
- def insertCheckBox(
- self, sName, itemChanged, sPropNames, oPropValues, listener):
- xCheckBox = self.insertControlModel(
- "com.sun.star.awt.UnoControlCheckBoxModel",
- sName, sPropNames, oPropValues)
- if itemChanged is not None:
- itemChanged = getattr(listener, itemChanged)
- xCheckBox.addItemListener(ItemListenerProcAdapter(itemChanged))
-
- return xCheckBox
-
- def insertComboBox(
- self, sName, actionPerformed, itemChanged,
- textChanged, sPropNames, oPropValues, listener):
- xComboBox = self.insertControlModel(
- "com.sun.star.awt.UnoControlComboBoxModel",
- sName, sPropNames, oPropValues)
- if actionPerformed is not None:
- actionPerformed = getattr(listener, actionPerformed)
- xComboBox.addActionListener(
- ActionListenerProcAdapter(actionPerformed))
-
- if itemChanged is not None:
- itemChanged = getattr(listener, itemChanged)
- xComboBox.addItemListener(ItemListenerProcAdapter(itemChanged))
-
- if textChanged is not None:
- textChanged = getattr(listener, textChanged)
- xComboBox.addTextListener(TextListenerProcAdapter(textChanged))
-
- return xComboBox
-
- def insertListBox(
- self, sName, actionPerformed, itemChanged,
- sPropNames, oPropValues, listener):
- xListBox = self.insertControlModel(
- "com.sun.star.awt.UnoControlListBoxModel",
- sName, sPropNames, oPropValues)
-
- if itemChanged is not None:
- itemChanged = getattr(listener, itemChanged)
- xListBox.addItemListener(ItemListenerProcAdapter(itemChanged))
-
- return xListBox
-
- def insertRadioButton(
- self, sName, itemChanged, sPropNames, oPropValues, listener):
- xRadioButton = self.insertControlModel(
- "com.sun.star.awt.UnoControlRadioButtonModel",
- sName, sPropNames, oPropValues)
- if itemChanged is not None:
- itemChanged = getattr(listener, itemChanged)
- xRadioButton.addItemListener(
- ItemListenerProcAdapter(itemChanged))
-
- return xRadioButton
-
- def insertTitledBox(self, sName, sPropNames, oPropValues):
- oTitledBox = self.insertControlModel(
- "com.sun.star.awt.UnoControlGroupBoxModel",
- sName, sPropNames, oPropValues)
- return oTitledBox
-
- def insertTextField(
- self, sName, sTextChanged, sPropNames, oPropValues, listener):
- return self.insertEditField(
- sName, sTextChanged, "com.sun.star.awt.UnoControlEditModel",
- sPropNames, oPropValues, listener)
-
- def insertImage(self, sName, sPropNames, oPropValues):
- return self.insertControlModel(
- "com.sun.star.awt.UnoControlImageControlModel",
- sName, sPropNames, oPropValues)
-
- def insertInfoImage(self, _posx, _posy, _iStep):
- xImgControl = self.insertImage(
- Desktop.getUniqueName(self.xDialogModel, "imgHint"),
- ("Border",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_IMAGEURL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y, "ScaleImage",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_WIDTH),
- (0, 10, UIConsts.INFOIMAGEURL, _posx, _posy, False, _iStep, 10))
- return xImgControl
-
- '''
- This method is used for creating Edit, Currency, Date, Formatted,
- Pattern, File and Time edit components.
- '''
-
- def insertEditField(
- self, sName, sTextChanged, sModelClass,
- sPropNames, oPropValues, listener):
- xField = self.insertControlModel(sModelClass,
- sName, sPropNames, oPropValues)
- if sTextChanged is not None:
- sTextChanged = getattr(listener, sTextChanged)
- xField.addTextListener(TextListenerProcAdapter(sTextChanged))
- return xField
-
- def insertFileControl(
- self, sName, sTextChanged, sPropNames, oPropValues, listener):
- return self.insertEditField(sName, sTextChanged,
- "com.sun.star.awt.UnoControlFileControlModel",
- sPropNames, oPropValues, listener)
-
- def insertCurrencyField(
- self, sName, sTextChanged, sPropNames, oPropValues, listener):
- return self.insertEditField(
- sName, sTextChanged,
- "com.sun.star.awt.UnoControlCurrencyFieldModel",
- sPropNames, oPropValues, listener)
-
- def insertDateField(
- self, sName, sTextChanged, sPropNames, oPropValues, listener):
- return self.insertEditField(
- sName, sTextChanged,
- "com.sun.star.awt.UnoControlDateFieldModel",
- sPropNames, oPropValues, listener)
-
- def insertNumericField(
- self, sName, sTextChanged, sPropNames, oPropValues, listener):
- return self.insertEditField(
- sName, sTextChanged,
- "com.sun.star.awt.UnoControlNumericFieldModel",
- sPropNames, oPropValues, listener)
-
- def insertTimeField(
- self, sName, sTextChanged, sPropNames, oPropValues, listener):
- return self.insertEditField(
- sName, sTextChanged,
- "com.sun.star.awt.UnoControlTimeFieldModel",
- sPropNames, oPropValues, listener)
-
- def insertPatternField(
- self, sName, sTextChanged, oPropValues, listener):
- return self.insertEditField(sName, sTextChanged,
- "com.sun.star.awt.UnoControlPatternFieldModel",
- sPropNames, oPropValues, listener)
-
- def insertFormattedField(
- self, sName, sTextChanged, sPropNames, oPropValues, listener):
- return self.insertEditField(
- sName, sTextChanged,
- "com.sun.star.awt.UnoControlFormattedFieldModel",
- sPropNames, oPropValues, listener)
-
- def insertFixedLine(self, sName, sPropNames, oPropValues):
- oLine = self.insertControlModel(
- "com.sun.star.awt.UnoControlFixedLineModel",
- sName, sPropNames, oPropValues)
- return oLine
-
- def insertLabel(self, sName, sPropNames, oPropValues):
- oFixedText = self.insertControlModel(
- "com.sun.star.awt.UnoControlFixedTextModel",
- sName, sPropNames, oPropValues)
- return oFixedText
-
- def insertScrollBar(self, sName, sPropNames, oPropValues,
- iControlKey, listener):
- oScrollBar = self.insertControlModel(
- "com.sun.star.awt.UnoControlScrollBarModel",
- sName, sPropNames, oPropValues)
- if listener is not None:
- method = getattr(listener, "scrollControls")
- oScrollBar.addAdjustmentListener(
- AdjustmentListenerProcAdapter(method))
- if self.ControlList is not None:
- self.ControlList[sName] = iControlKey
- return oScrollBar
-
- def insertProgressBar(self, sName, sPropNames, oPropValues):
- oProgressBar = self.insertControlModel(
- "com.sun.star.awt.UnoControlProgressBarModel",
- sName, sPropNames, oPropValues)
- return oProgressBar
-
- def insertGroupBox(self, sName, sPropNames, oPropValues):
- oGroupBox = self.insertControlModel(
- "com.sun.star.awt.UnoControlGroupBoxModel",
- sName, sPropNames, oPropValues)
- return oGroupBox
-
- def showMessageBox(self, windowServiceName, windowAttribute, MessageText):
- return SystemDialog.showMessageBox(
- xMSF, self.xControl.Peer,
- windowServiceName, windowAttribute, MessageText)
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py
deleted file mode 100644
index b2a687d1de5a..000000000000
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.py
+++ /dev/null
@@ -1,489 +0,0 @@
-from UnoDialog2 import *
-from common.Resource import Resource
-from abc import ABCMeta, abstractmethod
-from common.HelpIds import *
-from document.OfficeDocument import OfficeDocument
-from text.TextDocument import TextDocument
-
-from com.sun.star.lang import NoSuchMethodException
-from com.sun.star.lang import IllegalArgumentException
-from com.sun.star.frame import TerminationVetoException
-from com.sun.star.awt.PushButtonType import HELP, STANDARD
-from ui.XPathSelectionListener import XPathSelectionListener
-
-class WizardDialog(UnoDialog2):
-
- __metaclass__ = ABCMeta
-
- __NEXT_ACTION_PERFORMED = "gotoNextAvailableStep"
- __BACK_ACTION_PERFORMED = "gotoPreviousAvailableStep"
- __FINISH_ACTION_PERFORMED = "finishWizard_1"
- __CANCEL_ACTION_PERFORMED = "cancelWizard_1"
- __HELP_ACTION_PERFORMED = None
-
- '''
- Creates a new instance of WizardDialog
- the hid is used as following :
- "HID:(hid)" - the dialog
- "HID:(hid+1) - the help button
- "HID:(hid+2)" - the back button
- "HID:(hid+3)" - the next button
- "HID:(hid+4)" - the create button
- "HID:(hid+5)" - the cancel button
- @param xMSF
- @param hid_
- '''
-
- def __init__(self, xMSF, hid_):
- super(WizardDialog,self).__init__(xMSF)
- self.__hid = hid_
- self.__iButtonWidth = 50
- self.nNewStep = 1
- self.nOldStep = 1
- self.nMaxStep = 1
- self.__bTerminateListenermustberemoved = True
- self.__oWizardResource = Resource(xMSF, "dbw")
- self.sMsgEndAutopilot = self.__oWizardResource.getResText(
- UIConsts.RID_DB_COMMON + 33)
- self.oRoadmap = None
-
- def itemStateChanged(self, itemEvent):
- try:
- self.nNewStep = itemEvent.ItemId
- self.nOldStep = int(Helper.getUnoPropertyValue(
- self.xDialogModel,
- PropertyNames.PROPERTY_STEP))
- if self.nNewStep != self.nOldStep:
- self.switchToStep()
-
- except IllegalArgumentException, exception:
- traceback.print_exc()
-
- def setRoadmapInteractive(self, _bInteractive):
- Helper.setUnoPropertyValue(self.oRoadmap, "Activated", _bInteractive)
-
- def setRoadmapComplete(self, bComplete):
- Helper.setUnoPropertyValue(self.oRoadmap, "Complete", bComplete)
-
- def isRoadmapComplete(self):
- try:
- return bool(Helper.getUnoPropertyValue(self.oRoadmap, "Complete"))
- except IllegalArgumentException, exception:
- traceback.print_exc()
- return False
-
- def setCurrentRoadmapItemID(self, ID):
- if self.oRoadmap is not None:
- nCurItemID = self.getCurrentRoadmapItemID()
- if nCurItemID != ID:
- Helper.setUnoPropertyValue(self.oRoadmap, "CurrentItemID",ID)
-
- def getCurrentRoadmapItemID(self):
- try:
- return int(Helper.getUnoPropertyValue(
- self.oRoadmap, "CurrentItemID"))
- except Exception, exception:
- traceback.print_exc()
- return -1
-
- def addRoadmap(self):
- try:
- iDialogHeight = Helper.getUnoPropertyValue(
- self.xDialogModel,
- PropertyNames.PROPERTY_HEIGHT)
- # the roadmap control has got no real TabIndex ever
- # that is not correct, but changing this would need time,
- # so it is used without TabIndex as before
-
- xRoadmapControl = self.insertControlModel(
- "com.sun.star.awt.UnoControlRoadmapModel",
- "rdmNavi",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX, "Tabstop",
- PropertyNames.PROPERTY_WIDTH),
- ((iDialogHeight - 26), 0, 0, 0,
- 0, True, 85))
- self.oRoadmap = xRoadmapControl.Model
- method = getattr(self, "itemStateChanged")
- xRoadmapControl.addItemListener(
- ItemListenerProcAdapter(method))
-
- Helper.setUnoPropertyValue(
- self.oRoadmap, "Text",
- self.__oWizardResource.getResText(UIConsts.RID_COMMON + 16))
- except NoSuchMethodException, ex:
- Resource.showCommonResourceError(xMSF)
- except Exception, jexception:
- traceback.print_exc()
-
- def setRMItemLabels(self, _oResource, StartResID):
- self.sRMItemLabels = _oResource.getResArray(
- StartResID, self.nMaxStep)
-
- def insertRoadmapItem(self, Index, _bEnabled, _sLabel, _CurItemID):
- try:
- if isinstance(_sLabel, int):
- _sLabel = self.sRMItemLabels(_sLabel)
- oRoadmapItem = self.oRoadmap.createInstance()
- Helper.setUnoPropertyValue(oRoadmapItem,
- PropertyNames.PROPERTY_LABEL, _sLabel)
- Helper.setUnoPropertyValue(oRoadmapItem,
- PropertyNames.PROPERTY_ENABLED, _bEnabled)
- Helper.setUnoPropertyValue(oRoadmapItem, "ID", _CurItemID)
- self.oRoadmap.insertByIndex(Index, oRoadmapItem)
- except Exception, exception:
- traceback.print_exc()
-
- def getRoadmapItemByID(self, _ID):
- try:
- getByIndex = self.oRoadmap.getByIndex
- for i in xrange(self.oRoadmap.Count):
- CurRoadmapItem = getByIndex(i)
- CurID = int(Helper.getUnoPropertyValue(CurRoadmapItem, "ID"))
- if CurID == _ID:
- return CurRoadmapItem
-
- return None
- except Exception, exception:
- traceback.print_exc()
- return None
-
- def switchToStep(self,_nOldStep=None, _nNewStep=None):
- if _nOldStep is not None and _nNewStep is not None:
- self.nOldStep = _nOldStep
- self.nNewStep = _nNewStep
-
- self.leaveStep(self.nOldStep, self.nNewStep)
- if self.nNewStep != self.nOldStep:
- if self.nNewStep == self.nMaxStep:
- self.setControlProperty(
- "btnWizardNext", "DefaultButton", False)
- self.setControlProperty(
- "btnWizardFinish", "DefaultButton", True)
- else:
- self.setControlProperty(
- "btnWizardNext", "DefaultButton", True)
- self.setControlProperty(
- "btnWizardFinish", "DefaultButton", False)
-
- self.changeToStep(self.nNewStep)
- self.enterStep(self.nOldStep, self.nNewStep)
- return True
-
- return False
-
- @abstractmethod
- def leaveStep(self, nOldStep, nNewStep):
- pass
-
- @abstractmethod
- def enterStep(self, nOldStep, nNewStep):
- pass
-
- def changeToStep(self, nNewStep):
- Helper.setUnoPropertyValue(self.xDialogModel,
- PropertyNames.PROPERTY_STEP, nNewStep)
- self.setCurrentRoadmapItemID(nNewStep)
- self.enableNextButton(self.getNextAvailableStep() > 0)
- self.enableBackButton(nNewStep != 1)
-
- def drawNaviBar(self):
- try:
- curtabindex = UIConsts.SOFIRSTWIZARDNAVITABINDEX
- iButtonWidth = self.__iButtonWidth
- iButtonHeight = 14
- iCurStep = 0
- iDialogHeight = Helper.getUnoPropertyValue(self.xDialogModel,
- PropertyNames.PROPERTY_HEIGHT)
- iDialogWidth = Helper.getUnoPropertyValue(self.xDialogModel,
- PropertyNames.PROPERTY_WIDTH)
- iHelpPosX = 8
- iBtnPosY = iDialogHeight - iButtonHeight - 6
- iCancelPosX = iDialogWidth - self.__iButtonWidth - 6
- iFinishPosX = iCancelPosX - 6 - self.__iButtonWidth
- iNextPosX = iFinishPosX - 6 - self.__iButtonWidth
- iBackPosX = iNextPosX - 3 - self.__iButtonWidth
- self.insertControlModel(
- "com.sun.star.awt.UnoControlFixedLineModel",
- "lnNaviSep",
- (PropertyNames.PROPERTY_HEIGHT, "Orientation",
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_WIDTH),
- (1, 0, 0, iDialogHeight - 26, iCurStep, iDialogWidth))
- self.insertControlModel(
- "com.sun.star.awt.UnoControlFixedLineModel",
- "lnRoadSep",
- (PropertyNames.PROPERTY_HEIGHT,
- "Orientation",
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_WIDTH),
- (iBtnPosY - 6, 1, 85, 0, iCurStep, 1))
- propNames = (PropertyNames.PROPERTY_ENABLED,
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "PushButtonType",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- Helper.setUnoPropertyValue(
- self.xDialogModel, PropertyNames.PROPERTY_HELPURL,
- HelpIds.getHelpIdString(self.__hid))
- self.insertButton("btnWizardHelp",
- WizardDialog.__HELP_ACTION_PERFORMED,
- (PropertyNames.PROPERTY_ENABLED,
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "PushButtonType",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, iButtonHeight,
- self.__oWizardResource.getResText(UIConsts.RID_COMMON + 15),
- iHelpPosX, iBtnPosY,
- uno.Any("short",HELP), iCurStep,
- uno.Any("short",(curtabindex + 1)), iButtonWidth), self)
- self.insertButton("btnWizardBack",
- WizardDialog.__BACK_ACTION_PERFORMED, propNames,
- (False, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 2),
- self.__oWizardResource.getResText(UIConsts.RID_COMMON + 13),
- iBackPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep,
- uno.Any("short",(curtabindex + 1)), iButtonWidth), self)
- self.insertButton("btnWizardNext",
- WizardDialog.__NEXT_ACTION_PERFORMED, propNames,
- (True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 3),
- self.__oWizardResource.getResText(UIConsts.RID_COMMON + 14),
- iNextPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep,
- uno.Any("short",(curtabindex + 1)), iButtonWidth), self)
- self.insertButton("btnWizardFinish",
- WizardDialog.__FINISH_ACTION_PERFORMED, propNames,
- (True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 4),
- self.__oWizardResource.getResText(UIConsts.RID_COMMON + 12),
- iFinishPosX, iBtnPosY, uno.Any("short",STANDARD),
- iCurStep,
- uno.Any("short",(curtabindex + 1)),
- iButtonWidth), self)
- self.insertButton("btnWizardCancel",
- WizardDialog.__CANCEL_ACTION_PERFORMED, propNames,
- (True, iButtonHeight, HelpIds.getHelpIdString(self.__hid + 5),
- self.__oWizardResource.getResText(UIConsts.RID_COMMON + 11),
- iCancelPosX, iBtnPosY, uno.Any("short",STANDARD), iCurStep,
- uno.Any("short",(curtabindex + 1)),
- iButtonWidth), self)
- self.setControlProperty("btnWizardNext", "DefaultButton", True)
- except Exception, exception:
- traceback.print_exc()
-
- def insertRoadMapItems(self, enabled, items):
- for index, item in enumerate(items):
- self.insertRoadmapItem(index, enabled[index], item, index + 1)
-
- def setStepEnabled(self, _nStep, bEnabled, enableNextButton=None):
- xRoadmapItem = self.getRoadmapItemByID(_nStep)
- if xRoadmapItem is not None:
- Helper.setUnoPropertyValue(xRoadmapItem,
- PropertyNames.PROPERTY_ENABLED, bEnabled)
- if enableNextButton is not None:
- if self.getNextAvailableStep() > 0:
- self.enableNextButton(bEnabled)
-
- def enableNavigationButtons(
- self, _bEnableBack, _bEnableNext, _bEnableFinish):
- self.enableBackButton(_bEnableBack)
- self.enableNextButton(_bEnableNext)
- self.enableFinishButton(_bEnableFinish)
-
- def enableBackButton(self, enabled):
- self.setControlProperty("btnWizardBack",
- PropertyNames.PROPERTY_ENABLED, enabled)
-
- def enableNextButton(self, enabled):
- self.setControlProperty("btnWizardNext",
- PropertyNames.PROPERTY_ENABLED, enabled)
-
- def enableFinishButton(self, enabled):
- self.setControlProperty("btnWizardFinish",
- PropertyNames.PROPERTY_ENABLED, enabled)
-
- def enablefromStep(self, _iStep, _bDoEnable):
- if _iStep <= self.nMaxStep:
- for i in xrange(_iStep, self.nMaxStep):
- self.setStepEnabled(i, _bDoEnable)
- enableFinishButton(_bDoEnable)
- if not _bDoEnable:
- enableNextButton(_iStep > getCurrentStep() + 1)
- else:
- enableNextButton(not (getCurrentStep() == self.nMaxStep))
-
- def isStepEnabled(self, _nStep):
- try:
- xRoadmapItem = self.getRoadmapItemByID(_nStep)
- # Todo: In this case an exception should be thrown
- if xRoadmapItem is None:
- return False
- bIsEnabled = bool(Helper.getUnoPropertyValue(xRoadmapItem,
- PropertyNames.PROPERTY_ENABLED))
- return bIsEnabled
- except Exception, exception:
- traceback.print_exc()
- return False
-
- def gotoPreviousAvailableStep(self):
- try:
- if self.nNewStep > 1:
- self.nOldStep = self.nNewStep
- self.nNewStep -= 1
- while self.nNewStep > 0:
- bIsEnabled = self.isStepEnabled(self.nNewStep)
- if bIsEnabled:
- break;
-
- self.nNewStep -= 1
- if (self.nNewStep == 0):
- self.nNewStep = self.nOldStep
- self.switchToStep()
- except Exception, e:
- traceback.print_exc()
-
- #TODO discuss with rp
-
- def getNextAvailableStep(self):
- if self.isRoadmapComplete():
- i = self.nNewStep + 1
- while i <= self.nMaxStep:
- if self.isStepEnabled(i):
- return i
- i += 1
- return -1
-
- def gotoNextAvailableStep(self):
- try:
- self.nOldStep = self.nNewStep
- self.nNewStep = self.getNextAvailableStep()
- if self.nNewStep > -1:
- self.switchToStep()
- except Exception, e:
- traceback.print_exc()
-
- @abstractmethod
- def finishWizard(self):
- pass
-
- def finishWizard_1(self):
- '''This function will call
- if the finish button is pressed on the UI'''
- try:
- self.enableFinishButton(False)
- success = False
- try:
- success = self.finishWizard()
- finally:
- if not success:
- self.enableFinishButton(True)
-
- if success:
- self.removeTerminateListener()
- except Exception, e:
- traceback.print_exc()
-
- def getMaximalStep(self):
- return self.nMaxStep
-
- def getCurrentStep(self):
- try:
- return int(Helper.getUnoPropertyValue(self.xDialogModel,
- PropertyNames.PROPERTY_STEP))
- except Exception, exception:
- traceback.print_exc()
- return -1
-
- def setCurrentStep(self, _nNewstep):
- self.nNewStep = _nNewstep
- changeToStep(self.nNewStep)
-
- def setRightPaneHeaders(self, _oResource, StartResID, _nMaxStep):
- self.sRightPaneHeaders = _oResource.getResArray(StartResID, _nMaxStep)
- setRightPaneHeaders(self.sRightPaneHeaders)
-
- def setRightPaneHeaders(self, _sRightPaneHeaders):
- self.nMaxStep = _sRightPaneHeaders.length
- self.sRightPaneHeaders = _sRightPaneHeaders
- oFontDesc = FontDescriptor.FontDescriptor()
- oFontDesc.Weight = com.sun.star.awt.FontWeight.BOLD
- i = 0
- while i < self.sRightPaneHeaders.length:
- insertLabel("lblQueryTitle" + String.valueOf(i),("FontDescriptor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),(
- oFontDesc, 16, self.sRightPaneHeaders(i),
- True, 91, 8, i + 1, 12, 212))
- i += 1
-
- def cancelWizard(self):
- #can be overwritten by extending class
- self.xUnoDialog.endExecute()
-
- def removeTerminateListener(self):
- if self.__bTerminateListenermustberemoved:
- Desktop.getDesktop(self.xMSF).removeTerminateListener( \
- TerminateListenerProcAdapter(self))
- self.__bTerminateListenermustberemoved = False
-
- '''
- called by the cancel button and
- by the window hidden event.
- if this method was not called before,
- perform a cancel.
- '''
-
- def cancelWizard_1(self):
- try:
- self.cancelWizard()
- self.removeTerminateListener()
- except Exception,e:
- traceback.print_exc()
-
- def queryTermination(self):
- self.activate()
- raise TerminationVetoException()
-
- def optCreateFromTemplateItemChanged(self):
- self.bEditTemplate = False
-
- def optMakeChangesItemChanged(self):
- self.bEditTemplate = True
-
- def optReceiverPlaceholderItemChanged(self):
- OfficeDocument.attachEventCall(
- TextDocument.xTextDocument, "OnNew", "StarBasic",
- "macro:///Template.Correspondence.Placeholder()")
-
- def optReceiverDatabaseItemChanged(self):
- OfficeDocument.attachEventCall(
- TextDocument.xTextDocument, "OnNew", "StarBasic",
- "macro:///Template.Correspondence.Database()")
-
- class myPathSelectionListener(XPathSelectionListener):
-
- def validatePath(self):
- if self.myPathSelection.usedPathPicker:
- self.filenameChanged = True
-
- self.myPathSelection.usedPathPicker = False
diff --git a/wizards/com/sun/star/wizards/ui/XPathSelectionListener.py b/wizards/com/sun/star/wizards/ui/XPathSelectionListener.py
deleted file mode 100644
index 1f065209d2ea..000000000000
--- a/wizards/com/sun/star/wizards/ui/XPathSelectionListener.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from abc import ABCMeta, abstractmethod
-
-class XPathSelectionListener(object):
-
- @abstractmethod
- def validatePath(self):
- pass
diff --git a/wizards/com/sun/star/wizards/ui/__init__.py b/wizards/com/sun/star/wizards/ui/__init__.py
deleted file mode 100644
index 51429ce86cfb..000000000000
--- a/wizards/com/sun/star/wizards/ui/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-"""UI"""
diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py
deleted file mode 100644
index c94ae418036c..000000000000
--- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py
+++ /dev/null
@@ -1,124 +0,0 @@
-#**********************************************************************
-#
-# Danny.OOo.Listeners.ListenerProcAdapters.py
-#
-# A module to easily work with OpenOffice.org.
-#
-#**********************************************************************
-# Copyright (c) 2003-2004 Danny Brewer
-# d29583@groovegarden.com
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See: http://www.gnu.org/licenses/lgpl.html
-#
-#**********************************************************************
-# If you make changes, please append to the change log below.
-#
-# Change Log
-# Danny Brewer Revised 2004-06-05-01
-#
-#**********************************************************************
-
-# OOo's libraries
-import unohelper
-
-from com.sun.star.awt import XActionListener
-class ActionListenerProcAdapter( unohelper.Base, XActionListener ):
- def __init__( self, oProcToCall, tParams=() ):
- self.oProcToCall = oProcToCall # a python procedure
- self.tParams = tParams # a tuple
-
-
- # oActionEvent is a com.sun.star.awt.ActionEvent struct.
- def actionPerformed( self, oActionEvent ):
- if callable( self.oProcToCall ):
- apply( self.oProcToCall )
-
-from com.sun.star.awt import XItemListener
-class ItemListenerProcAdapter( unohelper.Base, XItemListener ):
- def __init__( self, oProcToCall, tParams=() ):
- self.oProcToCall = oProcToCall # a python procedure
- self.tParams = tParams # a tuple
-
- # oItemEvent is a com.sun.star.awt.ItemEvent struct.
- def itemStateChanged( self, oItemEvent ):
- if callable( self.oProcToCall ):
- try:
- apply( self.oProcToCall)
- except:
- apply( self.oProcToCall, (oItemEvent,) + self.tParams )
-
-from com.sun.star.awt import XTextListener
-class TextListenerProcAdapter( unohelper.Base, XTextListener ):
- def __init__( self, oProcToCall, tParams=() ):
- self.oProcToCall = oProcToCall # a python procedure
- self.tParams = tParams # a tuple
-
- # oTextEvent is a com.sun.star.awt.TextEvent struct.
- def textChanged( self, oTextEvent ):
- if callable( self.oProcToCall ):
- apply( self.oProcToCall )
-
-from com.sun.star.frame import XTerminateListener
-class TerminateListenerProcAdapter( unohelper.Base, XTerminateListener ):
- def __init__( self, oProcToCall, tParams=() ):
- self.oProcToCall = oProcToCall # a python procedure
- self.tParams = tParams # a tuple
-
- def queryTermination(self, TerminateEvent):
- self.oProcToCall = getattr(self.oProcToCall,"queryTermination")
- if callable( self.oProcToCall ):
- apply( self.oProcToCall )
-
-from com.sun.star.awt import XWindowListener
-class WindowListenerProcAdapter( unohelper.Base, XWindowListener ):
- def __init__( self, oProcToCall, tParams=() ):
- self.oProcToCall = oProcToCall # a python procedure
- self.tParams = tParams # a tuple
-
- def windowShown(self, TerminateEvent):
- if callable( self.oProcToCall ):
- apply( self.oProcToCall )
-
-from com.sun.star.awt import XAdjustmentListener
-class AdjustmentListenerProcAdapter( unohelper.Base, XAdjustmentListener ):
- def __init__( self, oProcToCall, tParams=() ):
- self.oProcToCall = oProcToCall # a python procedure
- self.tParams = tParams # a tuple
-
- def adjustmentValueChanged(self, TerminateEvent):
- if callable( self.oProcToCall ):
- apply( self.oProcToCall )
-
-from com.sun.star.awt import XFocusListener
-class FocusListenerProcAdapter( unohelper.Base, XFocusListener ):
- def __init__( self, oProcToCall, tParams=() ):
- self.oProcToCall = oProcToCall # a python procedure
- self.tParams = tParams # a tuple
-
- def focusGained(self, FocusEvent):
- if callable( self.oProcToCall ):
- apply( self.oProcToCall, (FocusEvent,) + self.tParams )
-
-from com.sun.star.awt import XKeyListener
-class KeyListenerProcAdapter( unohelper.Base, XKeyListener ):
- def __init__( self, oProcToCall, tParams=() ):
- self.oProcToCall = oProcToCall # a python procedure
- self.tParams = tParams # a tuple
-
- def keyPressed(self, KeyEvent):
- if callable( self.oProcToCall ):
- apply( self.oProcToCall, (KeyEvent,) + self.tParams )
diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py
deleted file mode 100644
index 5f4df9585587..000000000000
--- a/wizards/com/sun/star/wizards/ui/event/DataAware.py
+++ /dev/null
@@ -1,114 +0,0 @@
-from common.PropertyNames import *
-from abc import ABCMeta, abstractmethod
-import traceback
-from ui.event.CommonListener import *
-
-'''
-@author rpiterman
-DataAware objects are used to live-synchronize UI and DataModel/DataObject.
-It is used as listener on UI events, to keep the DataObject up to date.
-This class, as a base abstract class, sets a frame of functionality,
-delegating the data Object get/set methods to a Value object,
-and leaving the UI get/set methods abstract.
-Note that event listenning is *not* a part of this model.
-the updateData() or updateUI() methods should be porogramatically called.
-in child classes, the updateData() will be binded to UI event calls.
-<br><br>
-This class holds references to a Data Object and a Value object.
-The Value object "knows" how to get and set a value from the
-Data Object.
-'''
-
-class DataAware(object):
- __metaclass__ = ABCMeta
-
- '''
- creates a DataAware object for the given data object and Value object.
- @param dataObject_
- @param value_
- '''
-
- def __init__(self, dataObject_, field_):
- self._dataObject = dataObject_
- self._field = field_
-
- def enableControls(self, value):
- pass
-
- '''
- sets the given value to the UI control
- @param newValue the value to set to the ui control.
- '''
- @abstractmethod
- def setToUI (self,newValue):
- pass
-
- '''
- gets the current value from the UI control.
- @return the current value from the UI control.
- '''
-
- @abstractmethod
- def getFromUI (self):
- pass
-
- '''
- updates the UI control according to the
- current state of the data object.
- '''
-
- def updateUI(self):
- data = getattr(self._dataObject, self._field)
- ui = self.getFromUI()
- if data is not ui:
- try:
- self.setToUI(data)
- except Exception, ex:
- traceback.print_exc()
- #TODO tell user...
- self.enableControls(data)
-
- '''
- sets a new data object. Optionally
- update the UI.
- @param obj the new data object.
- @param updateUI if true updateUI() will be called.
- '''
-
- def setDataObject(self, obj, updateUI):
- if obj is not None and not isinstance(obj, type(self._field)):
- return
-
- self._dataObject = obj
-
- if updateUI:
- self.updateUI()
-
- '''
- updates the DataObject according to
- the current state of the UI control.
- '''
-
- def updateData(self):
- try:
- data = getattr(self._dataObject, self._field)
- ui = self.getFromUI()
- if data is not ui:
- if isinstance(ui,tuple):
- #Selected Element listbox
- ui = ui[0]
- setattr(self._dataObject, self._field, ui)
- self.enableControls(ui)
- except Exception:
- traceback.print_exc()
-
- '''
- given a collection containing DataAware objects,
- calls updateUI() on each memebr of the collection.
- @param dataAwares a collection containing DataAware objects.
- '''
-
- @classmethod
- def updateUIs(self, dataAwares):
- for i in dataAwares:
- i.updateUI()
diff --git a/wizards/com/sun/star/wizards/ui/event/ListModelBinder.py b/wizards/com/sun/star/wizards/ui/event/ListModelBinder.py
deleted file mode 100644
index 183bab050139..000000000000
--- a/wizards/com/sun/star/wizards/ui/event/ListModelBinder.py
+++ /dev/null
@@ -1,75 +0,0 @@
-from common.Helper import Helper
-
-class ListModelBinder(object):
-
- def __init__(self, unoListBox, listModel_):
- self.unoList = unoListBox
- self.unoListModel = unoListBox.Model
- #COMMENTED
- #self.setListModel(listModel_)
-
- def setListModel(self, newListModel):
- if self.listModel is not None:
- self.listModel.removeListDataListener(self)
-
- self.listModel = newListModel
- self.listModel.addListDataListener(this)
-
- def contentsChanged(self, lde):
- selected = getSelectedItems()
- i = lde.getIndex0()
- while i <= lde.getIndex1():
- update(i)
- i += 1
- setSelectedItems(selected)
-
- def update(self, i):
- remove(i, i)
- insert(i)
-
- def remove(self, i1, i2):
- self.unoList.removeItems(i1, i2 - i1 + 1)
-
- def insert(self, i):
- self.unoList.addItem(getItemString(i), i)
-
- def getItemString(self, i):
- return getItemString(self.listModel.getElementAt(i))
-
- def getItemString(self, item):
- return self.renderer.render(item)
-
- def getSelectedItems(self):
- return Helper.getUnoPropertyValue(self.unoListModel, "SelectedItems")
-
- def setSelectedItems(self, selected):
- Helper.setUnoPropertyValue(self.unoListModel, "SelectedItems", selected)
-
- def intervalAdded(self, lde):
- for i in xrange(lde.Index0, lde.Index1):
- insert(i)
-
- def intervalRemoved(self, lde):
- remove(lde.Index0, lde.Index1)
-
- @classmethod
- def fillList(self, xlist, items, renderer):
- Helper.setUnoPropertyValue(xlist.Model, "StringItemList", ())
- for index,item in enumerate(items):
- if item is not None:
- if renderer is not None:
- aux = renderer.render(index)
- else:
- aux = item.cp_Name
- xlist.addItem(aux, index)
-
- @classmethod
- def fillComboBox(self, xComboBox, items, renderer):
- Helper.setUnoPropertyValue(xComboBox.Model, "StringItemList", ())
- for index,item in enumerate(items):
- if item is not None:
- if renderer is not None:
- aux = renderer.render(index)
- else:
- aux = item.toString()
- xComboBox.addItem(aux, index)
diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py
deleted file mode 100644
index 181662b19b5f..000000000000
--- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py
+++ /dev/null
@@ -1,37 +0,0 @@
-from DataAware import *
-from UnoDataAware import *
-import time
-'''
-@author rpiterman
-To change the template for this generated type comment go to
-Window>Preferences>Java>Code Generation>Code and Comments
-'''
-
-class RadioDataAware(DataAware):
-
- def __init__(self, data, value, radioButtons):
- super(RadioDataAware,self).__init__(data, value)
- self.radioButtons = radioButtons
-
- def setToUI(self, value):
- selected = int(value)
- if selected == -1:
- for i in self.radioButtons:
- i.State = False
- else:
- self.radioButtons[selected].State = True
-
- def getFromUI(self):
- for index, workwith in enumerate(self.radioButtons):
- if workwith.State:
- return index
-
- return -1
-
- @classmethod
- def attachRadioButtons(self, data, prop, buttons, field):
- da = RadioDataAware(data, prop, buttons)
- method = getattr(da,"updateData")
- for i in da.radioButtons:
- i.addItemListener(ItemListenerProcAdapter(method))
- return da
diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
deleted file mode 100644
index 483a56916afc..000000000000
--- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
+++ /dev/null
@@ -1,84 +0,0 @@
-from DataAware import *
-from common.Helper import *
-
-'''
-@author rpiterman
-This class suppoprts imple cases where a UI control can
-be directly synchronized with a data property.
-Such controls are: the different text controls
-(synchronizing the "Text" , "Value", "Date", "Time" property),
-Checkbox controls, Dropdown listbox controls (synchronizing the
-SelectedItems[] property.
-For those controls, static convenience methods are offered, to simplify use.
-'''
-
-class UnoDataAware(DataAware):
-
- disableObjects = []
-
- def __init__(self, dataObject, field, unoObject_, unoPropName_, isShort=False):
- super(UnoDataAware,self).__init__(dataObject, field)
- self.unoControl = unoObject_
- self.unoModel = self.unoControl.Model
- self.unoPropName = unoPropName_
- self.isShort = isShort
-
- def enableControls(self, value):
- for i in self.disableObjects:
- Helper.setUnoPropertyValue(
- i.Model, PropertyNames.PROPERTY_ENABLED, bool(value))
-
- def setToUI(self, value):
- if self.isShort:
- value = uno.Any("[]short", (value,))
- Helper.setUnoPropertyValue(self.unoModel, self.unoPropName, value)
-
- def getFromUI(self):
- return Helper.getUnoPropertyValue(self.unoModel, self.unoPropName)
-
- @classmethod
- def __attachTextControl(
- self, data, prop, unoText, unoProperty, field, value):
- uda = UnoDataAware(data, prop, unoText, unoProperty)
- method = getattr(uda,"updateData")
- unoText.addTextListener(TextListenerProcAdapter(method))
- return uda
-
- @classmethod
- def attachEditControl(self, data, prop, unoControl, field):
- return self.__attachTextControl(
- data, prop, unoControl, "Text", field, "")
-
- @classmethod
- def attachDateControl(self, data, prop, unoControl, field):
- return self.__attachTextControl(
- data, prop, unoControl, "Date", field, 0)
-
- @classmethod
- def attachTimeControl(self, data, prop, unoControl, field):
- return self.__attachTextControl(
- data, prop, unoControl, "Time", field, 0)
-
- @classmethod
- def attachNumericControl(self, data, prop, unoControl, field):
- return self.__attachTextControl(
- data, prop, unoControl, "Value", field, float(0))
-
- @classmethod
- def attachCheckBox(
- self, data, prop, checkBox, field):
- uda = UnoDataAware(data, prop, checkBox, PropertyNames.PROPERTY_STATE)
- method = getattr(uda,"updateData")
- checkBox.addItemListener(ItemListenerProcAdapter(method))
- return uda
-
- @classmethod
- def attachLabel(self, data, prop, label, field):
- return UnoDataAware(data, prop, label, PropertyNames.PROPERTY_LABEL)
-
- @classmethod
- def attachListBox(self, data, prop, listBox, field):
- uda = UnoDataAware(data, prop, listBox, "SelectedItems", True)
- method = getattr(uda,"updateData")
- listBox.addItemListener(ItemListenerProcAdapter(method))
- return uda
diff --git a/wizards/com/sun/star/wizards/ui/event/__init__.py b/wizards/com/sun/star/wizards/ui/event/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/wizards/com/sun/star/wizards/ui/event/__init__.py
+++ /dev/null
diff --git a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
deleted file mode 100644
index fad4a7c5c186..000000000000
--- a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py
+++ /dev/null
@@ -1,194 +0,0 @@
-from ImageListDialog import *
-from WWHID import HID_BG
-from common.SystemDialog import SystemDialog
-from common.FileAccess import FileAccess
-
-class BackgroundsDialog(ImageListDialog):
-
- def __init__(self, xmsf, set_, resources):
- super(BackgroundsDialog, self).__init__(xmsf, HID_BG,
- (resources.resBackgroundsDialog,
- resources.resBackgroundsDialogCaption,
- resources.resOK,
- resources.resCancel,
- resources.resHelp,
- resources.resDeselect,
- resources.resOther,
- resources.resCounter))
- self.sd = SystemDialog.createOpenDialog(xmsf)
- self.sd.addFilter(
- resources.resImages, "*.jpg;*.jpeg;*.jpe;*.gif", True)
- self.sd.addFilter(resources.resAllFiles, "*.*", False)
- self.settings = set_.root
- self.fileAccess = FileAccess(xmsf)
- #COMMENTED
- #self.il.setListModel(Model(set_))
- self.il.imageSize = Size (40, 40)
- #self.il.setRenderer(BGRenderer (0))
- self.build()
-
- '''
- trigered when the user clicks the "other" button.
- opens a "file open" dialog, adds the selected
- image to the list and to the web wizard configuration,
- and then jumps to the new image, selecting it in the list.
- @see add(String)
- '''
-
- def other(self):
- filename = self.sd.callOpenDialog(
- False, self.settings.cp_DefaultSession.cp_InDirectory)
- if filename != None and filename.length > 0 and filename[0] != None:
- self.settings.cp_DefaultSession.cp_InDirectory = \
- FileAccess.getParentDir(filename[0])
- i = add(filename[0])
- il.setSelected(i)
- il.display(i)
-
- '''
- adds the given image to the image list (to the model)
- and to the web wizard configuration.
- @param s
- @return
- '''
-
- def add(self, s):
- #first i check the item does not already exists in the list...
- i = 0
- while i < il.getListModel().getSize():
- if il.getListModel().getElementAt(i).equals(s):
- return i
-
- i += 1
- il.getListModel().addElement(s)
- try:
- configView = Configuration.getConfigurationRoot(
- self.xMSF, FileAccess.connectURLs(
- WebWizardConst.CONFIG_PATH, "BackgroundImages"), True)
- i = Configuration.getChildrenNames(configView).length + 1
- o = Configuration.addConfigNode(configView, "" + i)
- Configuration.set(s, "Href", o)
- Configuration.commit(configView)
- except Exception, ex:
- ex.printStackTrace()
-
- return il.getListModel().getSize() - 1
-
- '''
- an ImageList Imagerenderer implemtation.
- The image URL is the object given from the list model.
- the image name, got from the "render" method is
- the filename portion of the url.
- @author rpiterman
- '''
-
- class BGRenderer(object):
-
- def __init__(self, cut_):
- ImageListDialog.ImageListDialog_body()
- self.cut = cut_
-
- def getImageUrls(self, listItem):
- if listItem != None:
- sRetUrls = range(1)
- sRetUrls[0] = listItem
- return sRetUrls
-
- return None
-
- def render(self, _object):
- if _object is None:
- return ""
- else:
- return FileAccess.getPathFilename(
- self.fileAccess.getPath(_object, None))
-
- '''
- This is a list model for the image list of the
- backgrounds dialog.
- It takes the Backgrounds config set as an argument,
- and "parses" it to a list of files:
- It goes through each image in the set, and checks it:
- if it is a directory it lists all image files in this directory.
- if it is a file, it adds the file to the list.
- @author rpiterman
- '''
-
- class Model(object):
- '''
- constructor. </br>
- see class description for a description of
- the handling of the given model
- @param model the configuration set of the background images.
- '''
-
- def __init__(self, model):
- try:
- i = 0
- while i < model.getSize():
- image = model.getElementAt(i)
- path = self.sd.xStringSubstitution.substituteVariables(
- image.cp_Href, False)
- if self.fileAccess.exists(path, False):
- addDir(path)
- else:
- remove(model.getKey(image))
-
- i += 1
- except Exception, ex:
- ex.printStackTrace()
-
- '''
- when instanciating the model, it checks if each image
- exists. If it doesnot, it will be removed from
- the configuration.
- This is what this method does...
- @param imageName
- '''
-
- def remove(self, imageName):
- try:
- conf = Configuration.getConfigurationRoot(
- self.xMSF, WebWizardConst.CONFIG_PATH + "/BackgroundImages",
- True)
- Configuration.removeNode(conf, imageName)
- except Exception, ex:
- ex.printStackTrace()
-
- '''
- if the given url is a directory
- adds the images in the given directory,
- otherwise (if it is a file) adds the file to the list.
- @param url
- '''
-
- def addDir(self, url):
- if self.fileAccess.isDirectory(url):
- add(self.fileAccess.listFiles(url, False))
- else:
- add(url)
-
- '''
- adds the given filenames (urls) to
- the list
- @param filenames
- '''
-
- def add(self, filenames):
- i = 0
- while i < filenames.length:
- add(filenames[i])
- i += 1
-
- '''
- adds the given image url to the list.
- if and only if it ends with jpg, jpeg or gif
- (case insensitive)
- @param filename image url.
- '''
-
- def add(self, filename):
- lcase = filename.toLowerCase()
- if lcase.endsWith("jpg") or lcase.endsWith("jpeg") or \
- lcase.endsWith("gif"):
- Model.this.addElement(filename)
diff --git a/wizards/com/sun/star/wizards/web/IconsDialog.py b/wizards/com/sun/star/wizards/web/IconsDialog.py
deleted file mode 100644
index cc9ef111dcef..000000000000
--- a/wizards/com/sun/star/wizards/web/IconsDialog.py
+++ /dev/null
@@ -1,96 +0,0 @@
-from ImageListDialog import *
-from WWHID import HID_IS
-from common.FileAccess import FileAccess
-
-'''
-@author rpiterman
-The dialog class for choosing an icon set.
-This class simulates a model, though it does not functions really as one,
-since it does not cast events.
-It also implements the ImageList.ImageRenderer interface, to handle
-its own objects.
-'''
-
-class IconsDialog(ImageListDialog):
-
- def __init__(self, xmsf, set_, resources):
- super(IconsDialog, self).__init__(xmsf, HID_IS,
- (resources.resIconsDialog,
- resources.resIconsDialogCaption,
- resources.resOK,
- resources.resCancel,
- resources.resHelp,
- resources.resDeselect,
- resources.resOther,
- resources.resCounter))
- self.htmlexpDirectory = FileAccess.getOfficePath2(
- xmsf, "Gallery", "share", "")
- self.icons = \
- ["firs", "prev", "next", "last", "nav", "text", "up", "down"]
- self.set = set_
- self.objects = (self.set.getSize() * len(self.icons),)
-
- self.il.listModel = self
- self.il.renderer = self
- self.il.rows = 4
- self.il.cols = 8
- self.il.ImageSize = Size (20, 20)
- self.il.showButtons = False
- self.il.rowSelect = True
- self.il.scaleImages = False
- self.showDeselectButton = True
- self.showOtherButton = False
- self.build()
-
- def getIconset(self):
- if getSelected() == None:
- return None
- else:
- return self.set.getKey((getSelected()) / len(self.icons))
-
- def setIconset(self, iconset):
- #COMMENTED
- icon = 0 #self.set.getIndexOf(self.set.getElement(iconset)) * len(self.icons)
- aux = None
- if icon >=0:
- aux = self.objects[icon]
- self.setSelected(aux)
-
- def getSize(self):
- return self.set.getSize() * len(self.icons)
-
- def getElementAt(self, arg0):
- return self.objects[arg0]
-
- def getImageUrls(self, listItem):
- i = (listItem).intValue()
- iset = getIconsetNum(i)
- icon = getIconNum(i)
- sRetUrls = range(2)
- sRetUrls[0] = self.htmlexpDirectory + "/htmlexpo/" \
- + getIconsetPref(iset) + self.icons[icon] + getIconsetPostfix(iset)
- sRetUrls[1] = sRetUrls[0]
- return sRetUrls
-
- def render(self, object):
- if object == None:
- return ""
-
- i = (object).intValue()
- iset = getIconsetNum(i)
- return getIconset(iset).cp_Name
-
- def getIconsetNum(self, i):
- return i / self.icons.length
-
- def getIconNum(self, i):
- return i % self.icons.length
-
- def getIconsetPref(self, iconset):
- return getIconset(iconset).cp_FNPrefix
-
- def getIconsetPostfix(self, iconset):
- return getIconset(iconset).cp_FNPostfix
-
- def getIconset(self, i):
- return self.set.getElementAt(i)
diff --git a/wizards/com/sun/star/wizards/web/ImageListDialog.py b/wizards/com/sun/star/wizards/web/ImageListDialog.py
deleted file mode 100644
index d34f690594d4..000000000000
--- a/wizards/com/sun/star/wizards/web/ImageListDialog.py
+++ /dev/null
@@ -1,211 +0,0 @@
-from ui.UnoDialog2 import *
-from ui.ImageList import ImageList
-from common.HelpIds import HelpIds
-
-from com.sun.star.awt import FontDescriptor
-from com.sun.star.awt.PushButtonType import OK, CANCEL, HELP, STANDARD
-from com.sun.star.awt import Size
-
-'''
-This class is a general implementation for a
-dialog which displays a choice of images.
-The model and the renderer are
-still abstract in this class.
-To use the class one should extend it,
-in the constructor then set the imageList
-properties (member name il) like image size, grid size,
-model renderer aso, and then call "build".
-This class uses a counter renderer which
-gets an expression which contains %START %END %TOTAL and replaces
-them with the actual numbers.
-<BR/>
-two buttons: "other" and "none" which are there
-to enable choosing images that are not in the list and
-"no image" respectivley, are optional, with default to True,
-so dialogs which do not need those, should set the corresponding
-members showDeselectButton and/or showOtherButton to false.
-<br/>
-the consturctor should recieve, among others, an Array of String resources
-see constructor documentation for details.
-
-@author rpiterman
-'''
-
-class ImageListDialog(UnoDialog2):
- RES_TITLE = 0
- RES_LABEL = 1
- RES_OK = 2
- RES_CANCEL = 3
- RES_HELP = 4
- RES_DESELECT = 5
- RES_OTHER = 6
- RES_COUNTER = 7
- START = "%START"
- END = "%END"
- TOTAL = "%TOTAL"
-
- '''
- @param xmsf
- @param resources_ a string array with the following strings :
- dialog title, label text, ok, cancel, help, deselect, other.
- <br/> if "deselect" and "other" are not displayed,
- the array can also be shorter. but if "other" is displayed
- and "deselect" not, both must be there :-(
- '''
-
- def __init__(self, xmsf, hid_, resources_):
- super(ImageListDialog, self).__init__(xmsf)
- self.hid = hid_
- self.cutFilename = 0
- self.showDeselectButton = True
- self.showOtherButton = True
- self.fontDescriptor1 = FontDescriptor()
- self.resources = resources_
- self.il = ImageList()
- self.il.counterRenderer = self.ARenderer(
- self.resources[ImageListDialog.RES_COUNTER])
-
- '''
- adds the controls to the dialog, depending on
- the size of the image list.
- This method should be called by subclasses after setting
- the il ImageList member properties
- '''
-
- def build(self):
- #set dialog properties...
- ilWidth = (self.il.imageSize.Width + self.il.gap.Width) \
- * self.il.cols + self.il.gap.Width
- ilHeight = (self.il.imageSize.Height + self.il.gap.Height) \
- * self.il.rows + self.il.gap.Height
- dialogWidth = 6 + ilWidth + 6 + 50 + 6
- dialogHeight = 3 + 16 + 3 + (ilHeight + 8 + 14) + 6
- Helper.setUnoPropertyValues(
- self.xDialogModel,
- ("Closeable",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- "Moveable",
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- "Title",
- PropertyNames.PROPERTY_WIDTH),
- (True, dialogHeight, HelpIds.getHelpIdString(self.hid), True,
- "imgDialog", 59, 24, 1,
- self.resources[ImageListDialog.RES_TITLE],dialogWidth))
- #Set member- FontDescriptors...
- self.fontDescriptor1.Weight = 150
- PROPNAMES = ("DefaultButton",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- "PushButtonType",
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- iButtonsX = 6 + ilWidth + 6
- self.btnOK = self.insertButton(
- "btnOK", None, PROPNAMES,
- (True, 14, HelpIds.getHelpIdString(self.hid + 3),
- self.resources[ImageListDialog.RES_OK], "btnOK",
- iButtonsX, 22, uno.Any("short", OK), 7, 50), self)
- self.btnCancel = self.insertButton(
- "btnCancel", None, PROPNAMES,
- (False, 14, HelpIds.getHelpIdString(self.hid + 4),
- self.resources[ImageListDialog.RES_CANCEL], "btnCancel",
- iButtonsX, 41, uno.Any("short", CANCEL), 8, 50), self)
- self.btnHelp = self.insertButton(
- "btnHelp", None, PROPNAMES,
- (False, 14, "", self.resources[ImageListDialog.RES_HELP],
- "CommandButton3", iButtonsX, 71,
- uno.Any("short", HELP), 9, 50), self)
- if self.showOtherButton:
- aux = 0
- if self.showDeselectButton:
- aux = 19
- otherY = 22 + ilHeight - 14 - aux
- self.btnOther = self.insertButton(
- "btnOther", "other", PROPNAMES,
- (False, 14, HelpIds.getHelpIdString(self.hid + 1),
- self.resources[ImageListDialog.RES_OTHER], "btnOther",
- iButtonsX, otherY,
- uno.Any("short", STANDARD), 5, 50), self)
-
- if self.showDeselectButton:
- deselectY = 22 + ilHeight - 14
- self.btnDeselect = self.insertButton(
- "btnNoImage", "deselect", PROPNAMES,
- (False, 14, HelpIds.getHelpIdString(self.hid + 2),
- self.resources[ImageListDialog.RES_DESELECT], "btnNoImage",
- iButtonsX, deselectY,
- uno.Any("short", STANDARD), 4, 50), self)
-
- self.il.step = 1
- self.il.pos = Size(6, 22)
- self.il.helpURL = self.hid + 5
- self.il.tabIndex = 1
- self.il.create(self)
- self.lblTitle = self.insertLabel("lblTitle",
- ("FontDescriptor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor1, 8,
- self.resources[ImageListDialog.RES_LABEL],
- "lblTitle", 6, 6, 1, 4, 216))
-
- '''
- is called when the user clicks "none"
- '''
-
- def deselect(self):
- self.il.setSelected(-1)
-
- '''
- @return the currently elected object.
- '''
-
- def getSelected(self):
- return self.il.getSelectedObject()
-
- '''
- sets the currently selected object.
- @param obj the object (out of the model) to be selected.
- '''
-
- def setSelected(self, obj):
- self.il.setSelected(obj)
- self.il.showSelected()
-
- '''
- The counter renderer, which uses a template.
- The template replaces the Strings "%START", "%END" and
- "%TOTAL" with the respective values.
- @author rpiterman
- '''
- class ARenderer(object):
-
- '''
- @param aTempalte a template for this renderer.
- The strings %START, %END ,%TOTAL will be replaced
- with the actual values.
- '''
-
- def __init__(self, aTemplate):
- self.template = aTemplate
-
- def render(self, counter):
- s = self.template.replace(ImageListDialog.START, "" + \
- str(counter.start))
- s = s.replace(ImageListDialog.END, "" + str(counter.end))
- s = s.replace(ImageListDialog.TOTAL, "" + str(counter.max))
- return s
diff --git a/wizards/com/sun/star/wizards/web/StylePreview.py b/wizards/com/sun/star/wizards/web/StylePreview.py
deleted file mode 100644
index 1ad6f9561cda..000000000000
--- a/wizards/com/sun/star/wizards/web/StylePreview.py
+++ /dev/null
@@ -1,76 +0,0 @@
-from common.FileAccess import FileAccess
-import traceback
-
-'''
-@author rpiterman
-the style preview, which is a OOo Document Preview in
-an Image Control.
-This class copies the files needed for this
-preview from the web wizard work directory
-to a given temporary directory, and updates them
-on request, according to the current style/background selection
-of the user.
-'''
-
-class StylePreview(object):
-
- '''
- copies the html file to the temp directory, and calculates the
- destination names of the background and css files.
- @param wwRoot is the root directory of the web wizard files (
- usually [oo]/share/template/[lang]/wizard/web
- '''
-
- def __init__(self, xmsf, wwRoot_):
- self.fileAccess = FileAccess(xmsf)
- self.tempDir = self.createTempDir(xmsf)
- self.htmlFilename = FileAccess.connectURLs(
- self.tempDir, "wwpreview.html")
- self.cssFilename = FileAccess.connectURLs(self.tempDir, "style.css")
- self.backgroundFilename = FileAccess.connectURLs(
- self.tempDir, "images/background.gif")
- self.wwRoot = wwRoot_
- self.fileAccess.copy(FileAccess.connectURLs(
- self.wwRoot, "preview.html"), self.htmlFilename)
-
- '''
- copies the given style and background files to the temporary
- directory.
- @param style
- @param background
- @throws Exception
- '''
-
- def refresh(self, style, background):
- css = FileAccess.connectURLs(self.wwRoot, "styles/" + style.cp_CssHref)
- if background is None or background == "":
- #delete the background image
- if self.fileAccess.exists(self.backgroundFilename, False):
- self.fileAccess.delete(self.backgroundFilename)
- else:
- # a solaris bug workaround
- # TODO
- #copy the background image to the temp directory.
- self.fileAccess.copy(background, self.backgroundFilename)
-
- #copy the actual css to the temp directory
- self.fileAccess.copy(css, self.cssFilename)
-
- def cleanup(self):
- try:
- self.fileAccess.delete(self.tempDir)
- except Exception:
- traceback.print_exc()
-
- '''
- creates a temporary directory.
- @param xmsf
- @return the url of the new directory.
- @throws Exception
- '''
-
- def createTempDir(self, xmsf):
- tempPath = FileAccess.getOfficePath2(xmsf, "Temp", "", "")
- s = self.fileAccess.createNewDir(tempPath, "wwiz")
- self.fileAccess.createNewDir(s, "images")
- return s
diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.py b/wizards/com/sun/star/wizards/web/WWD_Events.py
deleted file mode 100644
index e15d98a4eeaa..000000000000
--- a/wizards/com/sun/star/wizards/web/WWD_Events.py
+++ /dev/null
@@ -1,937 +0,0 @@
-import traceback
-from common.Desktop import Desktop
-from WWD_Startup import *
-from BackgroundsDialog import BackgroundsDialog
-from IconsDialog import IconsDialog
-
-'''
-This class implements the ui-events of the
-web wizard.
-it is therfore sorted to steps.
-not much application-logic here - just plain
-methods which react to events.
-The only exception are the finish methods with the save
-session methods.
-'''
-
-class WWD_Events(WWD_Startup):
-
- iconsDialog = None
- bgDialog = None
-
- '''
- He - my constructor !
- I add a window listener, which, when
- the window closes, deltes the temp directory.
- '''
-
- def __init__(self, xmsf):
- super(WWD_Events, self).__init__(xmsf)
- self.chkFTP.addKeyListener(None)
- self.chkLocalDir.addKeyListener(None)
- self.chkZip.addKeyListener(None)
- self.currentSession = ""
- self.exitOnCreate = True
- self.time = 0
- self.count = 0
-
- @classmethod
- def main(self, args):
- ConnectStr = \
- "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
- try:
- xmsf = Desktop.connect(ConnectStr)
- ww = WWD_Events(xmsf)
- ww.show()
- ww.cleanup()
- except Exception:
- traceback.print_exc()
-
- def leaveStep(self, nOldStep, nNewStep):
- pass
-
- def enterStep(self, old, newStep):
- if old == 1:
- sessionToLoad = ""
- s = Helper.getUnoPropertyValue(lstLoadWWD_Startup.settings.Model, "SelectedItems")
- if s.length == 0 or s[0] == 0:
- sessionToLoad = ""
- else:
- sessionToLoad = \
- WWD_Startup.settings.cp_SavedSessions.getElementAt(s[0]).cp_Name
-
- if not sessionToLoad.equals(self.currentSession):
- loadSession(sessionToLoad)
-
- '''
- **************
- STEP 1
- **************
- '''
-
- '''
- Called from the Uno event dispatcher when the
- user selects a saved session.
- '''
- def sessionSelected(self):
- s = Helper.getUnoPropertyValue(getModel(lstLoadSettings), "SelectedItems")
- setEnabled(btnDelSession, s.length > 0 and s[0] > 0)
-
- '''
- Ha ! the session should be loaded :-)
- '''
-
- def loadSession(self, sessionToLoad):
- try:
- sd = self.getStatusDialog()
- #task = Task("LoadDocs", "", 10)
- sd.execute(this, task, resources.resLoadingSession)
- #task.start()
- self.setSelectedDoc(WWD_Events.EMPTY_SHORT_ARRAY)
- Helper.setUnoPropertyValue(
- lstDocuments.Model, "SelectedItems", WWD_Events.EMPTY_SHORT_ARRAY)
- Helper.setUnoPropertyValue(
- lstDocuments.Model, "StringItemList", WWD_Events.EMPTY_STRING_ARRAY)
- if not sessionToLoad:
- view = Configuration.getConfigurationRoot(
- xMSF, CONFIG_PATH + "/DefaultSession", False)
- else:
- view = Configuration.getConfigurationRoot(
- xMSF, CONFIG_PATH + "/SavedSessions", False)
- view = Configuration.getNode(sessionToLoad, view)
-
- session = CGSession()
- session.root = settings
- session.readConfiguration(view, CONFIG_READ_PARAM)
- #task.setMax(session.cp_Content.cp_Documents.getSize() * 5 + 7)
- #task.advance(True)
- if sessionToLoad == "":
- setSaveSessionName(session)
-
- mount(session, task, False, sd.self.xUnoDialog)
- checkSteps()
- self.currentSession = sessionToLoad
- '''while task.getStatus() <= task.getMax():
- task.advance(False)
- task.removeTaskListener(sd)'''
- except Exception, ex:
- unexpectedError(ex)
-
- try:
- refreshStylePreview()
- updateIconsetText()
- except Exception, e:
- # TODO Auto-generated catch block
- e.printStackTrace()
-
- '''
- hmm. the user clicked the delete button.
- '''
-
- def delSession(self):
- selected = Helper.getUnoPropertyValue(
- lstLoadWWD_Startup.settings.Model, "SelectedItems")
- if selected.length == 0:
- return
-
- if selected[0] == 0:
- return
-
- confirm = AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer, resources.resDelSessionConfirm,
- ErrorHandler.ERROR_QUESTION_NO)
- if confirm:
- try:
- name = WWD_Startup.settings.cp_SavedSessions.getKey(selected[0])
- # first delete the session from the registry/configuration.
- Configuration.removeNode(
- self.xMSF, CONFIG_PATH + "/SavedSessions", name)
- # then delete WWD_Startup.settings.cp_SavedSessions
- WWD_Startup.settings.cp_SavedSessions.remove(selected[0])
- WWD_Startup.settings.savedSessions.remove(selected[0] - 1)
- nextSelected = [0]
- # We try to select the same item index again, if possible
- if WWD_Startup.settings.cp_SavedSessions.getSize() > selected[0]:
- nextSelected[0] = selected[0]
- else:
- # this will always be available because
- # the user can not remove item 0.
- nextSelected[0] = (short)(selected[0] - 1)
- # if the <none> session will
- # be selected, disable the remove button...
- if nextSelected[0] == 0:
- Helper.setUnoPropertyValue(
- btnDelSession.Model,
- PropertyNames.PROPERTY_ENABLED, False)
- # select...
-
- Helper.setUnoPropertyValue(
- lstLoadWWD_Startup.settings.Model, "SelectedItems", nextSelected)
-
- except Exception, ex:
- ex.printStackTrace()
- unexpectedError(ex)
-
- '''
- **************
- STEP 2
- **************
- '''
-
- '''
- when the user clicks another document
- in the listbox, this method is called,
- and couses the display in
- the textboxes title,description, author and export format
- to change
- '''
-
- def setSelectedDoc(self, s):
- oldDoc = self.getDoc([WWD_Startup.selectedDoc])
- doc = self.getDoc(s)
- if doc is None:
- self.fillExportList([])
- #I try to avoid refreshing the export list if
- #the same type of document is chosen.
- elif oldDoc is None or oldDoc.appType != doc.appType:
- self.fillExportList(WWD_Startup.settings.getExporters(doc.appType))
-
- WWD_Startup.selectedDoc = s
- self.mountList(doc, self.docAware)
- self.disableDocUpDown()
-
- '''
- The user clicks the "Add" button.
- This will open a "FileOpen" dialog,
- and, if the user chooses more than one file,
- will open a status dialog, when validating each document.
- '''
-
- def addDocument(self):
- try:
- files = self.getDocAddDialog().callOpenDialog(
- True, WWD_Startup.settings.cp_DefaultSession.cp_InDirectory)
- if files is None:
- return
-
- task = None #Task("", "", len(files) * 5)
- '''
- If more than a certain number
- of documents have been added,
- open the status dialog.
- '''
- if (len(files) > MIN_ADD_FILES_FOR_DIALOG):
- sd = self.getStatusDialog()
- sd.setLabel(resources.resValidatingDocuments)
- sd.execute(this, task, resources.prodName)
- oLoadDocs = self.LoadDocs(self.xMSF, self.xUnoDialog, files, self)
- oLoadDocs.loadDocuments()
- #task.removeTaskListener(sd)
- else:
- '''
- When adding a single document, do not use a
- status dialog...
- '''
- oLoadDocs = self.LoadDocs(self.xMSF, self.xUnoDialog, files, self)
- oLoadDocs.loadDocuments()
- except Exception:
- traceback.print_exc()
-
- '''
- The user clicked delete.
- '''
-
- def removeDocument(self):
- if WWD_Startup.selectedDoc.length == 0:
- return
-
- WWD_Startup.settings.cp_DefaultSession.cp_Content.cp_Documents.remove(
- WWD_Startup.selectedDoc[0])
- # update the selected document
- while WWD_Startup.selectedDoc[0] >= getDocsCount():
- WWD_Startup.selectedDoc[0] -= 1
- # if there are no documents...
- if WWD_Startup.selectedDoc[0] == -1:
- WWD_Startup.selectedDoc = WWD_Events.EMPTY_SHORT_ARRAY
- # update the list to show the right selection.
-
- docListDA.updateUI()
- # disables all the next steps, if the list of docuemnts
- # is empty.
- checkSteps()
-
- '''
- doc up.
- '''
-
- def docUp(self):
- doc = WWD_Startup.settings.cp_DefaultSession.cp_Content.cp_Documents.getElementAt(
- WWD_Startup.selectedDoc[0])
- WWD_Startup.settings.cp_DefaultSession.cp_Content.cp_Documents.remove(
- WWD_Startup.selectedDoc[0])
- WWD_Startup.settings.cp_DefaultSession.cp_Content.cp_Documents.add(
- WWD_Startup.selectedDoc[0] - 1, doc)
- docListDA.updateUI()
- self.disableDocUpDown()
-
- '''
- doc down
- '''
-
- def docDown(self):
- doc = WWD_Startup.settings.cp_DefaultSession.cp_Content.cp_Documents.getElementAt(
- WWD_Startup.selectedDoc[0])
- WWD_Startup.settings.cp_DefaultSession.cp_Content.cp_Documents.remove(
- WWD_Startup.selectedDoc[0])
- WWD_Startup.settings.cp_DefaultSession.cp_Content.cp_Documents.add(
- (WWD_Startup.selectedDoc[0] + 1), doc)
- docListDA.updateUI()
- self.disableDocUpDown()
-
- '''
- **************
- STEP 5
- **************
- '''
-
- '''
- the user clicked the "backgrounds" button
- '''
-
- def chooseBackground(self):
- try:
- self.setEnabled(self.btnBackgrounds, False)
- if WWD_Events.bgDialog is None:
- WWD_Events.bgDialog = BackgroundsDialog(
- self.xMSF, WWD_Startup.settings.cp_BackgroundImages,
- self.resources)
- WWD_Events.bgDialog.createWindowPeer(self.xUnoDialog.Peer)
-
- WWD_Events.bgDialog.setSelected(
- WWD_Startup.settings.cp_DefaultSession.cp_Design.cp_BackgroundImage)
- i = WWD_Events.bgDialog.executeDialogFromParent(self)
- if i == 1:
- #ok
- setBackground(WWD_Events.bgDialog.getSelected())
- except Exception:
- traceback.print_exc()
- finally:
- self.setEnabled(btnBackgrounds, True)
-
- '''
- invoked when the BackgorundsDialog is "OKed".
- '''
-
- def setBackground(self, background):
- if background == None:
- background = ""
-
- WWD_Startup.settings.cp_DefaultSession.cp_Design.cp_BackgroundImage \
- = background
- refreshStylePreview()
-
- '''
- is called when the user clicks "Icon sets" button.
- '''
-
- def chooseIconset(self):
- try:
- self.setEnabled(self.btnIconSets, False)
- if WWD_Events.iconsDialog is None:
- WWD_Events.iconsDialog = IconsDialog(
- self.xMSF, WWD_Startup.settings.cp_IconSets,
- self.resources)
- WWD_Events.iconsDialog.createWindowPeer(self.xUnoDialog.Peer)
-
- WWD_Events.iconsDialog.setIconset(
- WWD_Startup.settings.cp_DefaultSession.cp_Design.cp_IconSet)
- i = WWD_Events.iconsDialog.executeDialogFromParent(self)
- if i == 1:
- #ok
- self.setIconset(WWD_Events.iconsDialog.getIconset())
- except Exception:
- traceback.print_exc()
- finally:
- self.setEnabled(btnIconSets, True)
-
- '''
- invoked when the Iconsets Dialog is OKed.
- '''
-
- def setIconset(self, icon):
- WWD_Startup.settings.cp_DefaultSession.cp_Design.cp_IconSet = icon
- updateIconsetText()
-
- '''
- **************
- STEP 7
- **************
- '''
-
- '''
- sets the publishing url of either a local/zip or ftp publisher.
- updates the ui....
- '''
- def setPublishUrl(self, publisher, url, number):
- if url == None:
- return None
-
- p = getPublisher(publisher)
- p.cp_URL = url
- p.cp_Publish = True
- updatePublishUI(number)
- p.overwriteApproved = True
- return p
-
- '''
- updates the ui of a certain publisher
- (the text box url)
- @param number
- '''
-
- def updatePublishUI(self, number):
- (pubAware.get(number)).updateUI()
- (pubAware.get(number + 1)).updateUI()
- checkPublish()
-
- '''
- The user clicks the local "..." button.
- '''
-
- def setPublishLocalDir(self):
- dir = showFolderDialog(
- "Local destination directory", "",
- WWD_Startup.settings.cp_DefaultSession.cp_OutDirectory)
- #if ok was pressed...
- setPublishUrl(LOCAL_PUBLISHER, dir, 0)
-
- '''
- The user clicks the "Configure" FTP button.
- '''
-
- def setFTPPublish(self):
- if showFTPDialog(getPublisher(FTP_PUBLISHER)):
- getPublisher
- (FTP_PUBLISHER).cp_Publish = True
- updatePublishUI(2)
-
- '''
- show the ftp dialog
- @param pub
- @return true if OK was pressed, otherwise false.
- '''
-
- def showFTPDialog(self, pub):
- try:
- return getFTPDialog(pub).execute(this) == 1
- except Exception, ex:
- ex.printStackTrace()
- return False
-
- '''
- the user clicks the zip "..." button.
- Choose a zip file...
- '''
-
- def setZipFilename(self):
- sd = getZipDialog()
- zipFile = sd.callStoreDialog(
- WWD_Startup.settings.cp_DefaultSession.cp_OutDirectory,
- resources.resDefaultArchiveFilename)
- setPublishUrl(ZIP_PUBLISHER, zipFile, 4)
- getPublisher
- (ZIP_PUBLISHER).overwriteApproved = True
-
- '''
- the user clicks the "Preview" button.
- '''
-
- def documentPreview(self):
- try:
- if self.docPreview == None:
- self.docPreview = TOCPreview(
- self.xMSF, settings, resources,
- stylePreview.tempDir, myFrame)
-
- self.docPreview.refresh(settings)
- except Exception, ex:
- unexpectedError(ex)
-
- '''
- **************
- FINISH
- **************
- '''
-
- '''
- This method checks if the given target's path,
- added the pathExtension argument, exists,
- and asks the user what to do about it.
- If the user says its all fine, then the target will
- be replaced.
- @return true if "create" should continue. false if "create" should abort.
- '''
- def publishTargetApproved(self):
- result = True
- # 1. check local publish target
- p = getPublisher(LOCAL_PUBLISHER)
- # should publish ?
- if (p.cp_Publish):
- path = getFileAccess().getPath(p.url, None)
- # target exists?
- if getFileAccess().exists(p.url, False):
- #if its a directory
- if getFileAccess().isDirectory(p.url):
- #check if its empty
- files = getFileAccess().listFiles(p.url, True)
- if files.length > 0:
- '''
- it is not empty :-(
- it either a local publisher or an ftp
- (zip uses no directories as target...)
- '''
- message = resources.resLocalTragetNotEmpty.replace(
- "%FILENAME", path)
- result = AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer, message,
- ErrorHandler.MESSAGE_WARNING,
- ErrorHandler.BUTTONS_YES_NO, ErrorHandler.DEF_NO,
- ErrorHandler.RESULT_YES)
- if not result:
- return result
-
- else:
- #not a directory, but still exists
- message = resources.resLocalTargetExistsAsfile.replace(
- "%FILENAME", path)
- AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer, message,
- ErrorHandler.ERROR_PROCESS_FATAL)
- return False
-
- # try to write to the path...
- else:
- # the local target directory does not exist.
- message = resources.resLocalTargetCreate.replace(
- "%FILENAME", path)
- try:
- result = AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer, message,
- ErrorHandler.ERROR_QUESTION_YES)
- except Exception, ex:
- ex.printStackTrace()
-
- if not result:
- return result
- # try to create the directory...
-
- try:
- getFileAccess().fileAccess.createFolder(p.cp_URL)
- except Exception, ex:
- message = resources.resLocalTargetCouldNotCreate.replace(
- "%FILENAME", path)
- AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer, message,
- ErrorHandler.ERROR_PROCESS_FATAL)
- return False
-
- p = getPublisher(ZIP_PUBLISHER)
- if p.cp_Publish:
- path = getFileAccess().getPath(p.cp_URL, None)
- # target exists?
- if getFileAccess().exists(p.cp_URL, False):
- #if its a directory
- if getFileAccess().isDirectory(p.cp_URL):
- message = resources.resZipTargetIsDir.replace(
- "%FILENAME", path)
- AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer, message,
- ErrorHandler.ERROR_PROCESS_FATAL)
- return False
- else:
- #not a directory, but still exists ( a file...)
- if not p.overwriteApproved:
- message = resources.resZipTargetExists.replace(
- "%FILENAME", path)
- result = AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer, message,
- ErrorHandler.ERROR_QUESTION_YES)
- if not result:
- return False
- # 3. check FTP
-
- p = getPublisher(FTP_PUBLISHER)
- # should publish ?
- if p.cp_Publish:
- path = getFileAccess().getPath(p.cp_URL, None)
- # target exists?
- if getFileAccess().exists(p.url, False):
- #if its a directory
- if getFileAccess().isDirectory(p.url):
- #check if its empty
- files = getFileAccess().listFiles(p.url, True)
- if files.length > 0:
- '''
- it is not empty :-(
- it either a local publisher or an ftp
- (zip uses no directories as target...)
- '''
- message = resources.resFTPTargetNotEmpty.replace(
- "%FILENAME", path)
- result = AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer, message,
- ErrorHandler.ERROR_QUESTION_CANCEL)
- if not result:
- return result
-
- else:
- #not a directory, but still exists (as a file)
- message = resources.resFTPTargetExistsAsfile.replace(
- "%FILENAME", path)
- AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer, message,
- ErrorHandler.ERROR_PROCESS_FATAL)
- return False
-
- # try to write to the path...
- else:
- # the ftp target directory does not exist.
- message = resources.resFTPTargetCreate.replace(
- "%FILENAME", path)
- result = AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer, message,
- ErrorHandler.ERROR_QUESTION_YES)
- if not result:
- return result
- # try to create the directory...
-
- try:
- getFileAccess().fileAccess.createFolder(p.url)
- except Exception, ex:
- message = resources.resFTPTargetCouldNotCreate.replace(
- "%FILENAME", path)
- AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer, message,
- ErrorHandler.ERROR_PROCESS_FATAL)
- return False
-
- return True
-
- '''
- return false if "create" should be aborted. true if everything is fine.
- '''
-
- def saveSession(self):
- try:
- node = None
- name = getSessionSaveName()
- #set documents index field.
- docs = WWD_Startup.settings.cp_DefaultSession.cp_Content.cp_Documents
- i = 0
- while i < docs.getSize():
- (docs.getElementAt(i)).cp_Index = i
- i += 1
- conf = Configuration.getConfigurationRoot(
- self.xMSF, CONFIG_PATH + "/SavedSessions", True)
- # first I check if a session with the given name exists
- try:
- node = Configuration.getNode(name, conf)
- if node != None:
- if not AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer,
- resources.resSessionExists.replace("${NAME}", name),
- ErrorHandler.ERROR_NORMAL_IGNORE):
- return False
- #remove the old session
-
- Configuration.removeNode(conf, name)
- except NoSuchElementException, nsex:
- traceb
-
- WWD_Startup.settings.cp_DefaultSession.cp_Index = 0;
- node = Configuration.addConfigNode(conf, name)
- WWD_Startup.settings.cp_DefaultSession.cp_Name = name;
- WWD_Startup.settings.cp_DefaultSession.writeConfiguration(
- node, CONFIG_READ_PARAM)
- WWD_Startup.settings.cp_SavedSessions.reindexSet(conf, name, "Index")
- Configuration.commit(conf)
- # now I reload the sessions to actualize the list/combo
- # boxes load/save sessions.
- WWD_Startup.settings.cp_SavedSessions.clear()
- confView = Configuration.getConfigurationRoot(
- self.xMSF, CONFIG_PATH + "/SavedSessions", False)
- WWD_Startup.settings.cp_SavedSessions.readConfiguration(
- confView, CONFIG_READ_PARAM)
- WWD_Startup.settings.cp_LastSavedSession = name;
- self.currentSession = name
- # now save the name of the last saved session...
- WWD_Startup.settings.cp_LastSavedSession = name;
- # TODO add the <none> session...
- prepareSessionLists()
- ListModelBinder.fillList(
- lstLoadSettings, WWD_Startup.settings.cp_SavedSessions.items(), None)
- ListModelBinder.fillComboBox(
- cbSaveSettings, WWD_Startup.settings.savedSessions.items(), None)
- selectSession()
- self.currentSession = WWD_Startup.settings.cp_LastSavedSession
- return True
- except Exception, ex:
- ex.printStackTrace()
- return False
-
- def targetStringFor(self, publisher):
- p = getPublisher(publisher)
- if p.cp_Publish:
- return "\n" + getFileAccess().getPath(p.cp_URL, None)
- else:
- return ""
-
- '''
- this method will be called when the Status Dialog
- is hidden.
- It checks if the "Process" was successfull, and if so,
- it closes the wizard dialog.
- '''
-
- def finishWizardFinished(self):
- if self.process.getResult():
- targets = targetStringFor(LOCAL_PUBLISHER) + \
- targetStringFor(ZIP_PUBLISHER) + \
- targetStringFor(FTP_PUBLISHER)
- message = resources.resFinishedSuccess.replace(
- "%FILENAME", targets)
- AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer, message, ErrorHandler.ERROR_MESSAGE)
- if self.exitOnCreate:
- self.xDialog.endExecute()
-
- else:
- AbstractErrorHandler.showMessage(
- self.xMSF, self.xUnoDialog.Peer, resources.resFinishedNoSuccess,
- ErrorHandler.ERROR_WARNING)
-
- def cancel(self):
- xDialog.endExecute()
-
- '''
- the user clicks the finish/create button.
- '''
-
- def finishWizard(self):
- finishWizard(True)
- return True
-
- '''
- finish the wizard
- @param exitOnCreate_ should the wizard close after
- a successfull create.
- Default is true,
- I have a hidden feature which enables false here
- '''
-
- def finishWizard(self, exitOnCreate_):
- self.exitOnCreate = exitOnCreate_
- '''
- First I check if ftp password was set, if not - the ftp dialog pops up
- This may happen when a session is loaded, since the
- session saves the ftp url and username, but not the password.
- '''
- p = getPublisher(FTP_PUBLISHER)
- # if ftp is checked, and no proxies are set, and password is empty...
- if p.cp_Publish and not proxies and p.password == None or \
- p.password == "":
- if showFTPDialog(p):
- updatePublishUI(2)
- #now continue...
- finishWizard2()
-
- else:
- finishWizard2()
-
- '''
- this method is only called
- if ftp-password was eather set, or
- the user entered one in the FTP Dialog which
- popped up when clicking "Create".
- '''
-
- def finishWizard2(self):
- p = getPublisher(LOCAL_PUBLISHER)
- p.url = p.cp_URL
- '''
- zip publisher is using another url form...
- '''
- p = getPublisher(ZIP_PUBLISHER)
- #replace the '%' with '%25'
- url1 = JavaTools.replaceSubString(p.cp_URL, "%25", "%")
- #replace all '/' with '%2F'
- url1 = JavaTools.replaceSubString(url1, "%2F", "/")
- p.url = "vnd.sun.star.zip:#" + url1 + "/";
- '''
- and now ftp...
- '''
- p = getPublisher(FTP_PUBLISHER)
- p.url = FTPDialog.getFullURL(p);
- ''' first we check the publishing targets. If they exist we warn and
- ask what to do. a False here means the user said "cancel"
- (or rather:clicked)
- '''
- if not publishTargetApproved():
- return
- '''
- In order to save the session correctly,
- I return the value of the ftp publisher cp_Publish
- property to its original value...
- '''
-
- p.cp_Publish = __ftp;
- #if the "save settings" checkbox is on...
-
- if isSaveSession():
- # if canceled by user
- if not saveSession():
- return
-
- else:
- WWD_Startup.settings.cp_LastSavedSession = ""
-
- try:
- conf = Configuration.getConfigurationRoot(xMSF, CONFIG_PATH, True)
- Configuration.set(
- WWD_Startup.settings.cp_LastSavedSession, "LastSavedSession", conf)
- Configuration.commit(conf)
- except Exception, ex:
- ex.printStackTrace()
-
- '''
- again, if proxies are on, I disable ftp before the creation process
- starts.
- '''
- if proxies:
- p.cp_Publish = False
- '''
- There is currently a bug, which crashes office when
- writing folders to an existing zip file, after deleting
- its content, so I "manually" delete it here...
- '''
-
- p = getPublisher(ZIP_PUBLISHER)
- if getFileAccess().exists(p.cp_URL, False):
- getFileAccess().delete(p.cp_URL)
-
- try:
- eh = ProcessErrorHandler(xMSF, self.xUnoDialog.Peer, resources)
- self.process = Process(settings, xMSF, eh)
- pd = getStatusDialog()
- pd.setRenderer(ProcessStatusRenderer (resources))
- pd.execute(self, self.process.myTask, resources.prodName)
- #process,
- self.process.runProcess()
- finishWizardFinished()
- self.process.myTask.removeTaskListener(pd)
- except Exception, ex:
- ex.printStackTrace()
-
- '''
- is called on the WindowHidden event,
- deletes the temporary directory.
- '''
-
- def cleanup(self):
- try:
- self.dpStylePreview.dispose()
- self.stylePreview.cleanup()
-
- if WWD_Events.bgDialog is not None:
- WWD_Events.bgDialog.xComponent.dispose()
-
- if WWD_Events.iconsDialog is not None:
- WWD_Events.iconsDialog.xComponent.dispose()
-
- if ftpDialog is not None:
- ftpDialog.xComponent.dispose()
-
- xComponent.dispose()
-
- if ProcessStatusRenderer is not None:
- ProcessStatusRenderer.close(False)
-
- except Exception, ex:
- traceback.print_exc()
-
- class LoadDocs(object):
-
- def __init__(self,xmsf, xC_, files_, parent_):
- self.xMSF = xmsf
- self.xC = xC_
- self.files = files_
- self.parent = parent_
-
- def loadDocuments(self):
- if len(WWD_Startup.selectedDoc) > 0:
- offset = WWD_Startup.selectedDoc[0] + 1
- else:
- offset = WWD_General.getDocsCount()
-
- '''
- if the user chose one file, the list starts at 0,
- if he chose more than one, the first entry is a directory name,
- all the others are filenames.
- '''
- if len(self.files) > 1:
- start = 1
- else:
- start = 0
-
- #Number of documents failed to validate.
- failed = 0
-
- # store the directory
- if start == 1:
- WWD_General.settings.cp_DefaultSession.cp_InDirectory = files[0]
- else:
- WWD_General.settings.cp_DefaultSession.cp_InDirectory = \
- FileAccess.getParentDir(self.files[0])
-
- '''
- Here i go through each file, and validate it.
- If its ok, I add it to the ListModel/ConfigSet
- '''
-
- for i in xrange(start, len(self.files)):
- doc = CGDocument()
-
- if start == 0:
- doc.cp_URL = self.files[i]
- else:
- doc.cp_URL = FileAccess.connectURLs(files[0], files[i])
-
- '''
- so - i check each document and if it is ok I add it.
- The failed variable is used only to calculate the place to add -
- Error reporting to the user is (or should (-: )
- done in the checkDocument(...) method
- '''
- if WWD_Startup.checkDocument(self.xMSF, doc, None, self.xC):
- WWD_General.settings.cp_DefaultSession.cp_Content.cp_Documents.add(
- offset + i - failed - start, doc)
- else:
- failed += 1
-
- # if any documents where added,
- # set the first one to be the current-selected document.
- if len(self.files) > start + failed:
- self.parent.setSelectedDoc([offset])
-
- # update the ui...
- self.parent.docListDA.updateUI();
- # this enables/disables the next steps.
- # when no documents in the list, all next steps are disabled
- self.parent.checkSteps()
- '''
- a small insurance that the status dialog will
- really close...
- '''
-
- #while (self.task.getStatus() < self.task.getMax()):
- # self.task.advance(false)
diff --git a/wizards/com/sun/star/wizards/web/WWD_General.py b/wizards/com/sun/star/wizards/web/WWD_General.py
deleted file mode 100644
index 6fbb0dcd8c1e..000000000000
--- a/wizards/com/sun/star/wizards/web/WWD_General.py
+++ /dev/null
@@ -1,258 +0,0 @@
-from WebWizardDialog import *
-from common.SystemDialog import SystemDialog
-from ui.event.ListModelBinder import ListModelBinder
-
-'''
-@author rpiterman
-This class implements general methods, used by different sub-classes
-(either WWD_Sturtup, or WWD_Events) or both.
-'''
-
-class WWD_General(WebWizardDialog):
-
- settings = None
-
- def __init__(self, xmsf):
- super(WWD_General, self).__init__(xmsf)
- self.xStringSubstitution = SystemDialog.createStringSubstitution(xmsf)
-
- def getStatusDialog(self):
- statusDialog = StatusDialog(
- self.xMSF, StatusDialog.STANDARD_WIDTH,
- self.resources.resLoadingSession, False,
- [self.resources.prodName, "", "", "", "", ""],
- HelpIds.getHelpIdString(HID0_STATUS_DIALOG))
- try:
- statusDialog.createWindowPeer(xControl.Peer)
- except Exception:
- traceback.print_exc()
-
- return statusDialog
-
- '''
- File Dialog methods
- '''
-
- def getDocAddDialog(self):
- self.docAddDialog = SystemDialog.createOpenDialog(self.xMSF)
- for i in xrange(WWD_General.settings.cp_Filters.getSize()):
- f = WWD_General.settings.cp_Filters.getElementAt(i)
- if f is not None:
- self.docAddDialog.addFilter(
- f.cp_Name.replace("%PRODNAME", self.resources.prodName),
- f.cp_Filter, i == 0)
- return self.docAddDialog
-
- def getZipDialog(self):
- if self.zipDialog is None:
- self.zipDialog = SystemDialog.createStoreDialog(xMSF)
- self.zipDialog.addFilter(self.resources.resZipFiles, "*.zip", True)
-
- return self.zipDialog
-
- def getFTPDialog(self, pub):
- if self.ftpDialog is None:
- try:
- self.ftpDialog = FTPDialog.FTPDialog_unknown(xMSF, pub)
- self.ftpDialog.createWindowPeer(xControl.getPeer())
- except Exception:
- traceback.print_exc()
-
- return self.ftpDialog
-
- def showFolderDialog(self, title, description, dir):
- if self.folderDialog is None:
- self.folderDialog = SystemDialog.createFolderDialog(xMSF)
-
- return self.folderDialog.callFolderDialog(title, description, dir)
-
- '''
- returns the document specified
- by the given short array.
- @param s
- @return
- '''
-
- @classmethod
- def getDoc(self, s):
- if len(s) == 0:
- return None
- elif WWD_General.settings.cp_DefaultSession.cp_Content.cp_Documents.getSize() <= s[0]:
- return None
- else:
- return \
- WWD_General.settings.cp_DefaultSession.cp_Content.cp_Documents.childrenList[s[0]]
-
- '''
- how many documents are in the list?
- @return the number of documents in the docs list.
- '''
-
- @classmethod
- def getDocsCount(self):
- return WWD_General.settings.cp_DefaultSession.cp_Content.cp_Documents.getSize()
-
- '''
- fills the export listbox.
- @param listContent
- '''
-
- def fillExportList(self, listContent):
- ListModelBinder.fillList(self.lstDocTargetType, listContent, None)
-
- '''
- returns a publisher object for the given name
- @param name one of the WebWizardConst constants : FTP
- @return
- '''
-
- def getPublisher(self, name):
- return WWD_General.settings.cp_DefaultSession.cp_Publishing.getElement(name)
-
- '''
- @return true if the checkbox "save session" is checked.
- '''
-
- def isSaveSession(self):
- return int(Helper.getUnoPropertyValue(
- chkSaveSettings.Model, PropertyNames.PROPERTY_STATE) == 1)
-
- '''
- @return the name to save the session (step 7)
- '''
-
- def getSessionSaveName(self):
- return Helper.getUnoPropertyValue(getModel(cbSaveSettings), "Text")
-
- '''
- This method checks the status of the wizards and
- enables or disables the 'next' and the 'create' button.
- '''
-
- def checkSteps(self):
- '''
- first I check the document list.
- If it is empty, then step3 and on are disabled.
- '''
- if self.checkDocList():
- self.checkPublish()
-
- '''
- enables/disables the steps 3 to 7)
- @param enabled true = enabled, false = disabled.
- '''
-
- def enableSteps(self, enabled):
- if not enabled and not self.isStepEnabled(3):
- #disbale steps 3-7
- return
-
- for i in xrange(3,8):
- self.setStepEnabled(i, enabled, True)
- '''
- in this place i just disable the finish button.
- later, in the checkPublish, which is only performed if
- this one is true, it will be enabled (if the check
- is positive)
- '''
-
- if not enabled:
- self.enableFinishButton(False)
-
- '''
- Checks if the documents list is
- empty. If it is, disables the steps 3-7, and the
- create button.
- @return
- '''
-
- def checkDocList(self):
- if WWD_General.settings.cp_DefaultSession.cp_Content.cp_Documents.getSize() \
- == 0:
- self.enableSteps(False)
- return False
- else:
- self.enableSteps(True)
- return True
-
- '''
- check if the save-settings input is ok.
- (eather the checkbox is unmarked, or,
- if it is marked, a session name exists.
- '''
-
- def checkSaveSession(self):
- return (not isSaveSession() or not getSessionSaveName() == "")
-
- '''
- @return false if this publisher is not active, or, if it
- active, returns true if the url is not empty...
- if the url is empty, throws an exception
- '''
-
- def checkPublish2(self, s, text, _property):
- p = self.getPublisher(s)
- if p.cp_Publish:
- url = Helper.getUnoPropertyValue(text.Model, _property)
- if url is None or url == "":
- raise IllegalArgumentException ()
- else:
- return True
-
- else:
- return False
-
- '''
-
- @return false either if publishing input is wrong or there
- are no publishing targets chosen. returns true when at least
- one target is chosen, *and* all
- which are chosen are legal.
- If proxies are on, ftp publisher is ignored.
- '''
-
- def checkPublish_(self):
- try:
- return \
- self.checkPublish2(LOCAL_PUBLISHER, self.txtLocalDir, "Text") \
- or (not self.proxies and self.checkPublish(
- FTP_PUBLISHER, lblFTP, PropertyNames.PROPERTY_LABEL) \
- or self.checkPublish2(ZIP_PUBLISHER, self.txtZip, "Text")) \
- and self.checkSaveSession()
- except IllegalArgumentException, ex:
- return False
-
- '''
- This method checks if the publishing
- input is ok, and enables and disables
- the 'create' button.
- public because it is called from
- an event listener object.
- '''
-
- def checkPublish(self):
- self.enableFinishButton(self.checkPublish_())
-
- '''
- shows a message box "Unexpected Error... " :-)
- @param ex
- '''
-
- def unexpectedError(self, ex):
- ex.printStackTrace()
- peer = xControl.getPeer()
- AbstractErrorHandler.showMessage(
- self.xMSF, peer, self.resources.resErrUnexpected,
- ErrorHandler.ERROR_PROCESS_FATAL)
-
- '''
- substitutes path variables with the corresponding values.
- @param path a path, which might contain OOo path variables.
- @return the path, after substituing path variables.
- '''
-
- def substitute(self, path):
- try:
- return self.xStringSubstitution.substituteVariables(path, False)
- except Exception, ex:
- return path
diff --git a/wizards/com/sun/star/wizards/web/WWD_Startup.py b/wizards/com/sun/star/wizards/web/WWD_Startup.py
deleted file mode 100644
index 86d0091fc752..000000000000
--- a/wizards/com/sun/star/wizards/web/WWD_Startup.py
+++ /dev/null
@@ -1,661 +0,0 @@
-from WWD_General import *
-from common.Configuration import Configuration
-from common.FileAccess import FileAccess
-from data.CGSettings import CGSettings
-from data.CGSessionName import CGSessionName
-from ui.event.ListModelBinder import ListModelBinder
-from ui.event.UnoDataAware import UnoDataAware
-from ui.event.RadioDataAware import RadioDataAware
-from data.CGDocument import CGDocument
-from ui.DocumentPreview import DocumentPreview
-from StylePreview import StylePreview
-from ui.event.DataAware import DataAware
-
-from com.sun.star.lang import IllegalArgumentException
-
-'''
-Web Wizard Dialog implementation : Startup.
-This class contains the startup implementation and session mounting methods.
-<h2> Data Aware Concept </h2>
-<p> I use DataAware objects, which synchronize
-UI and Data. A DataAware object a kind of interface
-between a Value and a UI element.
-</P>
-<p>
-A Value is either a JavaBean property with
-a Getter and a Setter or a public class Memeber.
-</P>
-When the UI Control changes, the Value changes correspondingly.
-This depends on WWD_General.settings a Listener which calls the updateData()
-method od the DataAware object.
-When the Value changes, the UI Control changes respopndingly.
-This also depends on WWD_General.settings a Listener which calls the updateUI
-method of the DataAware object.
-</P>
-<P>
-here I use only UI Listeners, and keep calling
-the updateUI() method whenever I change the Value.
-</P>
-To contain the Data, I use the Configuration Data Objects
-which read themselfs out of the Configuration. they are all located under
-the data package.
-<p/>
-Different groups of DataAware objects are grouped into vectors.
-Each group (all elements of a vector) uses the same DataObject,
-so when I change the underlying dataObject, I change the whole vector's
-DataObject, thus actualizing UI.<br/>
-This is what happends when a session loads: I Load the session into
-a tree of DataObjects, and change the DataAware's DataObject. <br/>
-One could also look at this as a kind of "View-Model" relationship.
-The controls are the View, The DataObjects are the Model, containing the
-Data rad directly from the configuration, and the DataAware objects
-are the controller inbetween.
-
-@author rpiterman
-'''
-
-class WWD_Startup(WWD_General):
-
- selectedDoc = ()
-
- '''
- He - my constructor !
- I call/do here in this order: <br/>
- Check if ftp http proxy is set, and warn user he can not use
- ftp if it is.<br/>
- draw NaviBar and steps 1 to 7, incl. Step X,
- which is the Layouts ImageList on step 3.<br/>
- load the WWD_General.settings from the configuration. <br/>
- set the default save session name to the first
- available one (sessionX or something like that). <br/>
- set the Layouts ImageList ListModel, and call
- its "create()" method. <br/>
- check the content (documents) specified in the default session.<br/>
- fill the list boxes (saved sessions, styles, combobox save session). <br/>
- make data aware. <br/>
- updateUI (refreshes the display to crrespond to the data in
- the default session.)<br/>
- fill the documents listbox. <br/>
- if proxies are set, disable the ftp controls in step 7.
- '''
-
- def __init__(self, xmsf):
- super(WWD_Startup, self).__init__(xmsf)
- self.sda = None
- self.docAware = []
- self.designAware = []
- self.genAware = []
- self.pubAware = []
- self.proxies = self.getOOProxies()
- soTemplateDir = FileAccess.getOfficePath2(
- xmsf, "Template", "share", "/wizard")
- exclamationURL = FileAccess.connectURLs(
- soTemplateDir, "../wizard/bitmap/caution_16.png")
- self.drawNaviBar()
- self.buildStep1()
- self.buildStep2()
- self.buildStep3()
- self.buildStep4()
- self.buildStep5()
- self.buildStep6()
- self.buildStep7(self.proxies, exclamationURL)
- self.buildStepX()
- self.xMSF = xmsf
- xDesktop = Desktop.getDesktop(xmsf)
- self.myFrame = OfficeDocument.createNewFrame(xmsf, self)
- doc = OfficeDocument.createNewDocument(
- self.myFrame, "swriter", False, True)
- self.loadSettings(doc)
- self.setSaveSessionName(WWD_General.settings.cp_DefaultSession)
- self.ilLayouts.listModel = WWD_General.settings.cp_Layouts
- self.ilLayouts.create(self)
- #COMMENTED
- self.checkContent(WWD_General.settings.cp_DefaultSession.cp_Content, None, self.xUnoDialog)
- #saved sessions, styles, combobox save session.
- # also set the chosen saved session...
- self.fillLists()
- self.makeDataAware()
-
- self.updateUI()
-
- # fill the documents listbox.
- self.fillDocumentList(self.settings.cp_DefaultSession.cp_Content)
-
- if self.proxies:
- self.setEnabled(btnFTP, False)
- self.setEnabled(chkFTP, False)
-
- '''
- return true if http proxies or other proxies
- which do not enable ftp to function correctly are set.
- @return true if (http) proxies are on.
- @throws Exception
- '''
-
- def getOOProxies(self):
- node = Configuration.getConfigurationRoot(
- self.xMSF, "org.openoffice.Inet/Settings", False)
- i = int(node.getByName("ooInetProxyType"))
- if i== 0:
- #no proxies
- return False
- elif i == 2:
- #http proxies
- return True
- else:
- return True
-
- '''
- calculates the first available session name,
- and sets the current session name to it.
- The combobox text in step 7 will be updated
- automatically when updateUI() is called.
- '''
-
- def setSaveSessionName(self, session):
- maxValue = 0
- length = self.resources.resSessionName
- # traverse between the sessions and find the one that
- # has the biggest number.
- for i in xrange(WWD_General.settings.cp_SavedSessions.getSize()):
- sessionName = \
- WWD_General.settings.cp_SavedSessions.getElementAt(i).cp_Name
- if sessionName.startswith(self.resources.resSessionName):
- maxValue = max(maxValue, int(sessionName[length:]))
-
- '''
- fills the road map, and sets the necessary properties,
- like MaxStep, Complete, Interactive-
- Disables the finbihButton.
- '''
-
- def addRoadMapItems(self):
- self.insertRoadMapItems(
- [True, True, False, False, False, False, False],
- [self.resources.resStep1, self.resources.resStep2,
- self.resources.resStep3, self.resources.resStep4,
- self.resources.resStep5, self.resources.resStep6,
- self.resources.resStep7])
- self.setRoadmapInteractive(True)
- self.setRoadmapComplete(True)
- self.setCurrentRoadmapItemID(1)
- self.nMaxStep = 7
- self.enableFinishButton(False)
-
- '''
- This method goes through all
- the DataAware vectors and objects and
- calls their updateUI() method.
- In response, the UI is synchronized to
- the state of the corresponding data objects.
- '''
- def updateUI(self):
- DataAware.updateUIs(self.designAware)
- DataAware.updateUIs(self.genAware)
- DataAware.updateUIs(self.pubAware)
- self.sessionNameDA.updateUI()
- self.checkPublish()
-
- '''
- create the peer, add roadmap,
- add roadmap items, add style-preview,
- disable the steps 3 to 7 if no documents are
- on the list, and... show the dialog!
- '''
-
- def show(self):
- try:
- xContainerWindow = self.myFrame.getComponentWindow()
- self.createWindowPeer(xContainerWindow)
- self.addRoadmap()
- self.addRoadMapItems()
- self.addStylePreview()
- self.checkSteps()
- self.executeDialogFromComponent(self.myFrame)
- self.removeTerminateListener()
- except Exception:
- traceback.print_exc()
-
- '''
- initializes the style preview.
- '''
-
- def addStylePreview(self):
- try:
- self.dpStylePreview = DocumentPreview(self.xMSF, self.imgPreview)
- self.stylePreview = StylePreview(
- self.xMSF, WWD_General.settings.workPath)
- self.stylePreview.refresh(
- WWD_General.settings.cp_DefaultSession.getStyle(),
- WWD_General.settings.cp_DefaultSession.cp_Design.cp_BackgroundImage)
- self.dpStylePreview.setDocument(
- self.stylePreview.htmlFilename, DocumentPreview.PREVIEW_MODE)
- except Exception:
- traceback.print_exc()
-
- '''
- Loads the web wizard WWD_General.settings from the registry.
- '''
-
- def loadSettings(self, document):
- try:
- # instanciate
- WWD_General.settingsResources = \
- [self.resources.resPages, self.resources.resSlides,
- self.resources.resCreatedTemplate,
- self.resources.resUpdatedTemplate,
- self.resources.resSizeTemplate]
-
- WWD_General.settings = CGSettings(
- self.xMSF, WWD_General.settingsResources, document)
- # get configuration view
- confRoot = Configuration.getConfigurationRoot(
- self.xMSF, CONFIG_PATH, False)
- # read
- WWD_General.settings.readConfiguration(
- confRoot, CONFIG_READ_PARAM)
- configSet = WWD_General.settings.cp_DefaultSession.cp_Publishing
- # now if path variables are used in publisher pathes, they
- # are getting replaced here...
- for i in xrange(configSet.getSize()):
- p = configSet.getElementAt(i)
- p.cp_URL = self.substitute(p.cp_URL)
- # initialize the WWD_General.settings.
- WWD_General.settings.configure(self.xMSF)
- # set resource needed for web page.
- # sort the styles alphabetically
- #COMMENTED
- WWD_General.settings.cp_Styles.sort(None)
- self.prepareSessionLists()
- if self.proxies:
- self.__ftp = self.getPublisher(FTP_PUBLISHER).cp_Publish
- self.getPublisher(FTP_PUBLISHER).cp_Publish = False
-
- except Exception:
- traceback.print_exc()
-
- def prepareSessionLists(self):
- # now copy the sessions list...
- sessions = WWD_General.settings.cp_SavedSessions.childrenList
-
- WWD_General.settings.savedSessions.clear()
- for index,item in enumerate(sessions):
- WWD_General.settings.savedSessions.add(index, item)
- # add an empty session to the saved session
- # list which apears in step 1
- sn = CGSessionName()
- sn.cp_Name = self.resources.resSessionNameNone
- WWD_General.settings.cp_SavedSessions.add(0, sn)
-
- '''
- fills the saved session list, the styles list,
- and save session combo box.
- Also set the selected "load" session to the last session
- which was saved.
- '''
-
- def fillLists(self):
- # fill the saved session list.
-
- ListModelBinder.fillList(self.lstLoadSettings,
- WWD_General.settings.cp_SavedSessions.childrenList, None)
- # set the selected session to load. (step 1)
- self.selectSession()
- # fill the styles list.
- ListModelBinder.fillList(self.lstStyles,
- WWD_General.settings.cp_Styles.childrenList, None)
- # fill the save session combobox (step 7)
- ListModelBinder.fillComboBox(self.cbSaveSettings,
- WWD_General.settings.savedSessions.childrenList, None)
-
- def selectSession(self):
- selectedSession = 0
- if WWD_General.settings.cp_LastSavedSession is not None \
- and not WWD_General.settings.cp_LastSavedSession == "":
- ses = WWD_General.settings.cp_SavedSessions.getElement(
- settings.cp_LastSavedSession)
- if ses is not None:
- selectedSession = \
- WWD_General.settings.cp_SavedSessions.getIndexOf(ses)
-
- Helper.setUnoPropertyValue(
- self.lstLoadSettings.Model, "SelectedItems", (selectedSession,))
-
- '''
- attaches to each ui-data-control (like checkbox, groupbox or
- textbox, no buttons though), a DataObject's JavaBean Property,
- or class member.
- '''
-
- def makeDataAware(self):
- #page 1
- ListModelBinder(
- self.lstLoadSettings, WWD_General.settings.cp_SavedSessions)
- #page 2 : document properties
- self.docListDA = UnoDataAware.attachListBox(
- self, "selectedDoc", self.lstDocuments, False)
- self.docListDA.disableObjects = \
- [self.lnDocsInfo, self.btnRemoveDoc, self.lblDocTitle,
- self.txtDocTitle, self.lblDocInfo, self.txtDocInfo,
- self.lblDocAuthor, self.txtDocAuthor, self.lblDocExportFormat,
- self.lstDocTargetType]
- self.docListDA.updateUI()
- doc = CGDocument
- #dummy
- self.docsBinder = ListModelBinder(self.lstDocuments,
- WWD_General.settings.cp_DefaultSession.cp_Content.cp_Documents)
- self.docAware.append(UnoDataAware.attachEditControl(
- doc, "cp_Title", self.txtDocTitle, True))
- self.docAware.append(UnoDataAware.attachEditControl(
- doc, "cp_Description", self.txtDocInfo, True))
- self.docAware.append(UnoDataAware.attachEditControl(
- doc, "cp_Author", self.txtDocAuthor, True))
- self.docAware.append(UnoDataAware.attachListBox(
- doc, "Exporter", self.lstDocTargetType, False))
- #page 3 : Layout
- design = WWD_General.settings.cp_DefaultSession.cp_Design
-
- #COMMENTED
- #self.sda = SimpleDataAware.SimpleDataAware_unknown(design, DataAware.PropertyValue ("Layout", design), ilLayouts, DataAware.PropertyValue ("Selected", ilLayouts))
-
- #self.ilLayouts.addItemListener(None)
- #page 4 : layout 2
- self.designAware.append(UnoDataAware.attachCheckBox(
- design, "cp_DisplayDescription", self.chbDocDesc, True))
- self.designAware.append(UnoDataAware.attachCheckBox(
- design, "cp_DisplayAuthor", self.chbDocAuthor, True))
- self.designAware.append(UnoDataAware.attachCheckBox(
- design, "cp_DisplayCreateDate", self.chkDocCreated, True))
- self.designAware.append(UnoDataAware.attachCheckBox(
- design, "cp_DisplayUpdateDate", self.chkDocChanged, True))
- self.designAware.append(UnoDataAware.attachCheckBox(
- design, "cp_DisplayFilename", self.chkDocFilename, True))
- self.designAware.append(UnoDataAware.attachCheckBox(
- design, "cp_DisplayFileFormat", self.chkDocFormat, True))
- self.designAware.append(UnoDataAware.attachCheckBox(
- design, "cp_DisplayFormatIcon", self.chkDocFormatIcon, True))
- self.designAware.append(UnoDataAware.attachCheckBox(
- design, "cp_DisplayPages", self.chkDocPages, True))
- self.designAware.append(UnoDataAware.attachCheckBox(
- design, "cp_DisplaySize", self.chkDocSize, True))
- self.designAware.append(RadioDataAware.attachRadioButtons(
- WWD_General.settings.cp_DefaultSession.cp_Design,
- "cp_OptimizeDisplaySize",
- (self.optOptimize640x480, self.optOptimize800x600,
- self.optOptimize1024x768), True))
- #page 5 : Style
- '''
- note : on style change, i do not call here refresh ,but rather on
- a special method which will perform some display, background and Iconsets changes.
- '''
- self.designAware.append(UnoDataAware.attachListBox(
- WWD_General.settings.cp_DefaultSession.cp_Design,
- "cp_Style", self.lstStyles, False))
- #page 6 : site general props
- self.genAware.append(UnoDataAware.attachEditControl(
- WWD_General.settings.cp_DefaultSession.cp_GeneralInfo,
- "cp_Title", self.txtSiteTitle, True))
- self.genAware.append(UnoDataAware.attachEditControl(
- WWD_General.settings.cp_DefaultSession.cp_GeneralInfo,
- "cp_Description", self.txtSiteDesc, True))
- self.genAware.append(UnoDataAware.attachDateControl(
- WWD_General.settings.cp_DefaultSession.cp_GeneralInfo,
- "cp_CreationDate", self.dateSiteCreated, False))
- self.genAware.append(UnoDataAware.attachDateControl(
- WWD_General.settings.cp_DefaultSession.cp_GeneralInfo,
- "cp_UpdateDate", self.dateSiteUpdate, False))
- self.genAware.append(UnoDataAware.attachEditControl(
- WWD_General.settings.cp_DefaultSession.cp_GeneralInfo,
- "cp_Email", self.txtEmail, True))
- self.genAware.append(UnoDataAware.attachEditControl(
- WWD_General.settings.cp_DefaultSession.cp_GeneralInfo,
- "cp_Copyright", self.txtCopyright, True))
- #page 7 : publishing
- self.pubAware_(
- LOCAL_PUBLISHER, self.chkLocalDir, self.txtLocalDir, False)
- self.pubAware_(
- FTP_PUBLISHER, self.chkFTP, self.lblFTP, True)
- self.pubAware_(
- ZIP_PUBLISHER, self.chkZip, self.txtZip, False)
- self.sessionNameDA = UnoDataAware.attachEditControl(
- WWD_General.settings.cp_DefaultSession, "cp_Name",
- self.cbSaveSettings, True)
-
- '''
- A help method to attach a Checkbox and a TextBox to
- a CGPublish object properties/class members,
- @param publish
- @param checkbox
- @param textbox
- '''
-
- def pubAware_(self, publish, checkbox, textbox, isLabel):
- p = WWD_General.settings.cp_DefaultSession.cp_Publishing.getElement(publish)
- uda = UnoDataAware.attachCheckBox(p, "cp_Publish", checkbox, True)
- uda.Inverse = True
- uda.disableObjects = [textbox]
- self.pubAware.append(uda)
- if isLabel:
- aux = UnoDataAware.attachLabel(p, "cp_URL", textbox, False)
- else:
- aux = UnoDataAware.attachEditControl(p, "cp_URL", textbox, False)
- self.pubAware.append(aux)
-
- '''
- Session load methods
- (are used both on the start of the wizard and
- when the user loads a session)
-
- Is called when a new session/settings is
- loaded. <br/>
- Checks the documents (validate), fills the
- documents listbox, and changes the
- DataAware data objects to the
- new session's objects.<br/>
- Task advances 4 times in the mount method,
- and ??? times for each document in the session.
- '''
-
- def mount(self, session, task, refreshStyle, xC):
- '''
- This checks the documents. If the user
- chooses to cancel, the session is not loaded.
- '''
- checkContent(session.cp_Content, task, xC)
- settings.cp_DefaultSession = session;
- mount(session.cp_Content)
- task.advance(True)
- mount(session.cp_Design, self.designAware)
- mount(session.cp_GeneralInfo, self.genAware)
- task.advance(True)
- mount(session.cp_Publishing.getElement(LOCAL_PUBLISHER), 0)
- mount(session.cp_Publishing.getElement(FTP_PUBLISHER), 1)
- mount(session.cp_Publishing.getElement(ZIP_PUBLISHER), 2)
- task.advance(True)
- self.sessionNameDA.setDataObject(session, True)
- Helper.setUnoPropertyValue(
- chkSaveSettings.Model, PropertyNames.PROPERTY_STATE, 1)
- self.docListDA.updateUI()
- task.advance(True)
- if refreshStyle:
- self.refreshStylePreview()
- self.updateIconsetText()
-
- '''
- used to mount the publishing objects. This is somehow cryptic -
- there are 6 DataAware objects, 2 for each Publishing Object (CGPublish).
- All 6 reside on one Vector (pubAware).
- Since, otherwise than other DataAware objects, different
- Objects on the same Vector need different DataObjectBinding,
- I use this method...
- @param data the CGPublish object
- @param i the number of the object (0 = local, 1 = ftp, 2 = zip)
- '''
-
- def mountDataAware(self, data, i):
- self.pubAware.get(i * 2).setDataObject(data, True)
- self.pubAware.get(i * 2 + 1).setDataObject(data, True)
-
- '''
- Fills the documents listbox.
- @param root the CGContent object
- that contains the documents (a ListModel)
- '''
-
- def fillDocumentList(self, root):
- ListModelBinder.fillList(self.lstDocuments, root.cp_Documents.childrenList, None)
- #COMMENTED
- #self.docsBinder.setListModel(root.cp_Documents)
- self.disableDocUpDown()
-
- '''
- changes the DataAwares Objects' (in
- the gioen list) DataObject to the
- @param data
- @param list
- '''
-
- def mountList(self, data, _list):
- for i in _list:
- i.setDataObject(data, True)
-
- '''
- Checks if the document specified by the given CGDocument
- object (cp_URL) exists. Calls also the validate(...) method
- of this document.
- If the document does not exist, it asks the user whether
- to specify a new URL, or forget about this document.
- @param doc the document to check.
- @param task while loading a session, a status is
- displayed, using the Task object to monitor progress.
- @return true if the document is ok (a file exists in the given url).
- '''
-
- @classmethod
- def checkDocument(self,xmsf, doc, task, xC):
- doc.validate(xmsf, task)
- return True
- '''except IOError:
- relocate = SystemDialog.showMessageBox(
- self.xMSF, xC.Peer, "WarningBox",
- VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO,
- getFileAccess().getPath(doc.cp_URL, "") + "\n\n" + \
- self.resources.resSpecifyNewFileLocation)
- if relocate == 2:
- _file = getDocAddDialog().callOpenDialog(
- False, FileAccess.getParentDir(doc.cp_URL))
- if _file is None:
- return False
- else:
- doc.cp_URL = _file[0]
- return checkDocument(doc, task, xC)
-
- else:
- return False
-
- except IllegalArgumentException, iaex:
- #file is a directory
- SystemDialog.showMessage(
- self.xMSF, xControl.Peer,
- self.resources.resErrIsDirectory.replace(
- "%FILENAME", getFileAccess().getPath(doc.cp_URL, "")),
- ErrorHandler.ERROR_PROCESS_FATAL)
- return False
- except Exception:
- #something went wrong.
- traceback.print_exc()
- SystemDialog.showMessage(
- self.xMSF, xControl.Peer,
- self.resources.resErrDocValidate.replace(
- "%FILENAME", getFileAccess().getPath(doc.cp_URL, "")),
- ErrorHandler.ERROR_PROCESS_FATAL)
- return False
- '''
-
- '''
- Checks the documents contained in this content.
- @param content
- @param task
- '''
-
- def checkContent(self, content, task, xC):
- i = 0
- while i < content.cp_Documents.getSize():
- if not checkDocument(content.cp_Documents.getElementAt(i), task, xC):
- # I use here 'i--' since, when the document is removed
- # an index change accures
- content.cp_Documents.remove(i)
- i -= 1
- i += 1
-
- '''
- Disables/enables the docUpDown buttons (step 2)
- according to the currently selected document
- (no doc selected - both disbaled, last doc selected,
- down disabled and so on...)
- '''
-
- def disableDocUpDown(self):
- try:
- if len(WWD_Startup.selectedDoc) == 0:
- aux = False
- aux2 = False
- else:
- if WWD_Startup.selectedDoc[0] == 0:
- aux = False
- else:
- aux = True
-
- if WWD_Startup.selectedDoc[0] + 1 < \
- WWD_General.settings.cp_DefaultSession.cp_Content.cp_Documents.getSize():
- aux2 = True
- else:
- aux2 = False
-
- self.setEnabled(self.btnDocUp, aux)
- self.setEnabled(self.btnDocDown, aux2)
- except Exception:
- traceback.print_exc()
-
- def updateBackgroundText(self):
- bg = \
- WWD_General.settings.cp_DefaultSession.cp_Design.cp_BackgroundImage
- if bg is None or bg == "":
- bg = self.resources.resBackgroundNone
- else:
- bg = FileAccess.getPathFilename(getFileAccess().getPath(bg, None))
-
- Helper.setUnoPropertyValue(
- self.txtBackground.Model, PropertyNames.PROPERTY_LABEL, bg)
-
- def updateIconsetText(self):
- iconset = WWD_General.settings.cp_DefaultSession.cp_Design.cp_IconSet
- if iconset is None or iconset == "":
- iconsetName = self.resources.resIconsetNone
- else:
- IconSet = WWD_General.settings.cp_IconSets.getElement(iconset)
- if IconSet is None:
- iconsetName = self.resources.resIconsetNone
- else:
- iconsetName = IconSet.cp_Name
-
- Helper.setUnoPropertyValue(
- txtIconset.Model, PropertyNames.PROPERTY_LABEL, iconsetName)
-
- '''
- refreshes the style preview.
- I also call here "updateBackgroundtext", because always
- when the background is changed, this method
- has to be called, so I am walking on the safe side here...
- '''
-
- def refreshStylePreview(self):
- try:
- WWD_General.settings.cp_DefaultSession.cp_Design.cp_Style = \
- "style" + \
- str(WWD_General.settings.cp_DefaultSession.cp_Design.cp_Style)
- self.updateBackgroundText()
- self.stylePreview.refresh(WWD_General.settings.cp_DefaultSession.getStyle(), WWD_General.settings.cp_DefaultSession.cp_Design.cp_BackgroundImage)
- self.dpStylePreview.reload(self.xMSF)
- except Exception:
- traceback.print_exc()
diff --git a/wizards/com/sun/star/wizards/web/WWHID.py b/wizards/com/sun/star/wizards/web/WWHID.py
deleted file mode 100644
index 28b3aaaa892e..000000000000
--- a/wizards/com/sun/star/wizards/web/WWHID.py
+++ /dev/null
@@ -1,140 +0,0 @@
-HID0_WEBWIZARD = 34200 + 0
-HID0_HELP = 34200 + 1
-HID0_NEXT = 34200 + 2
-HID0_PREV = 34200 + 3
-HID0_CREATE = 34200 + 4
-HID0_CANCEL = 34200 + 5
-HID0_STATUS_DIALOG = 34200 + 6 #step 1
-HID1_LST_SESSIONS = 34200 + 7
-HID1_BTN_DEL_SES = 34200 + 9 #step 2
-HID2_LST_DOCS = 34200 + 10
-HID2_BTN_ADD_DOC = 34200 + 11
-HID2_BTN_REM_DOC = 34200 + 12
-HID2_BTN_DOC_UP = 34200 + 13
-HID2_BTN_DOC_DOWN = 34200 + 14
-HID2_TXT_DOC_TITLE = 34200 + 15
-HID2_TXT_DOC_DESC = 34200 + 16
-HID2_TXT_DOC_AUTHOR = 34200 + 17
-HID2_LST_DOC_EXPORT = 34200 + 18
-HID2_STATUS_ADD_DOCS = 34200 + 19 #step 3
-HID3_IL_LAYOUTS_IMG1 = 34200 + 20
-HID3_IL_LAYOUTS_IMG2 = 34200 + 21
-HID3_IL_LAYOUTS_IMG3 = 34200 + 22
-HID3_IL_LAYOUTS_IMG4 = 34200 + 23
-HID3_IL_LAYOUTS_IMG5 = 34200 + 24
-HID3_IL_LAYOUTS_IMG6 = 34200 + 25
-HID3_IL_LAYOUTS_IMG7 = 34200 + 26
-HID3_IL_LAYOUTS_IMG8 = 34200 + 27
-HID3_IL_LAYOUTS_IMG9 = 34200 + 28
-HID3_IL_LAYOUTS_IMG10 = 34200 + 29
-HID3_IL_LAYOUTS_IMG11 = 34200 + 30
-HID3_IL_LAYOUTS_IMG12 = 34200 + 31
-HID3_IL_LAYOUTS_IMG13 = 34200 + 32
-HID3_IL_LAYOUTS_IMG14 = 34200 + 33
-HID3_IL_LAYOUTS_IMG15 = 34200 + 34 #step 4
-HID4_CHK_DISPLAY_FILENAME = 34200 + 35
-HID4_CHK_DISPLAY_DESCRIPTION = 34200 + 36
-HID4_CHK_DISPLAY_AUTHOR = 34200 + 37
-HID4_CHK_DISPLAY_CR_DATE = 34200 + 38
-HID4_CHK_DISPLAY_UP_DATE = 34200 + 39
-HID4_CHK_DISPLAY_FORMAT = 34200 + 40
-HID4_CHK_DISPLAY_F_ICON = 34200 + 41
-HID4_CHK_DISPLAY_PAGES = 34200 + 42
-HID4_CHK_DISPLAY_SIZE = 34200 + 43
-HID4_GRP_OPTIMAIZE_640 = 34200 + 44
-HID4_GRP_OPTIMAIZE_800 = 34200 + 45
-HID4_GRP_OPTIMAIZE_1024 = 34200 + 46 #step 5
-HID5_LST_STYLES = 34200 + 47
-HID5_BTN_BACKGND = 34200 + 48
-HID5_BTN_ICONS = 34200 + 49 #step 6
-HID6_TXT_SITE_TITLE = 34200 + 50
-HID6_TXT_SITE_ICON = 34200 + 51
-HID6_BTN_SITE_ICON = 34200 + 52
-HID6_TXT_SITE_DESC = 34200 + 53
-HID6_TXT_SITE_KEYWRDS = 34200 + 54
-HID6_DATE_SITE_CREATED = 34200 + 55
-HID6_DATE_SITE_UPDATED = 34200 + 56
-HID6_NUM_SITE_REVISTS = 34200 + 57
-HID6_TXT_SITE_EMAIL = 34200 + 58
-HID6_TXT_SITE_COPYRIGHT = 34200 + 59 #step 7
-HID7_BTN_PREVIEW = 34200 + 60
-HID7_CHK_PUBLISH_LOCAL = 34200 + 61
-HID7_TXT_LOCAL = 34200 + 62
-HID7_BTN_LOCAL = 34200 + 63
-HID7_CHK_PUBLISH_ZIP = 34200 + 64
-HID7_TXT_ZIP = 34200 + 65
-HID7_BTN_ZIP = 34200 + 66
-HID7_CHK_PUBLISH_FTP = 34200 + 67
-HID7_BTN_FTP = 34200 + 69
-HID7_CHK_SAVE = 34200 + 70
-HID7_TXT_SAVE = 34200 + 71 #web wizard backgrounds dialog
-HID_BG = 34200 + 90
-HID_BG_BTN_OTHER = 34200 + 91
-HID_BG_BTN_NONE = 34200 + 92
-HID_BG_BTN_OK = 34200 + 93
-HID_BG_BTN_CANCEL = 34200 + 94
-HID_BG_BTN_BACK = 34200 + 95
-HID_BG_BTN_FW = 34200 + 96
-HID_BG_BTN_IMG1 = 34200 + 97
-HID_BG_BTN_IMG2 = 34200 + 98
-HID_BG_BTN_IMG3 = 34200 + 99
-HID_BG_BTN_IMG4 = 34200 + 100
-HID_BG_BTN_IMG5 = 34200 + 101
-HID_BG_BTN_IMG6 = 34200 + 102
-HID_BG_BTN_IMG7 = 34200 + 103
-HID_BG_BTN_IMG8 = 34200 + 104
-HID_BG_BTN_IMG9 = 34200 + 105
-HID_BG_BTN_IMG10 = 34200 + 106
-HID_BG_BTN_IMG11 = 34200 + 107
-HID_BG_BTN_IMG12 = 34200 + 108
-HID_BG_BTN_IMG13 = 34200 + 109
-HID_BG_BTN_IMG14 = 34200 + 100
-HID_BG_BTN_IMG15 = 34200 + 111
-HID_BG_BTN_IMG16 = 34200 + 112 #web wizard icons sets dialog
-HID_IS = 41000 + 0
-HID_IS_ICONSETS = 41000 + 1
-HID_IS_BTN_NONE = 41000 + 2
-HID_IS_BTN_OK = 41000 + 3
-HID_IS_BTN_IMG1 = 41000 + 5
-HID_IS_BTN_IMG2 = 41000 + 6
-HID_IS_BTN_IMG3 = 41000 + 7
-HID_IS_BTN_IMG4 = 41000 + 8
-HID_IS_BTN_IMG5 = 41000 + 9
-HID_IS_BTN_IMG6 = 41000 + 10
-HID_IS_BTN_IMG7 = 41000 + 11
-HID_IS_BTN_IMG8 = 41000 + 12
-HID_IS_BTN_IMG9 = 41000 + 13
-HID_IS_BTN_IMG10 = 41000 + 14
-HID_IS_BTN_IMG11 = 41000 + 15
-HID_IS_BTN_IMG12 = 41000 + 16
-HID_IS_BTN_IMG13 = 41000 + 17
-HID_IS_BTN_IMG14 = 41000 + 18
-HID_IS_BTN_IMG15 = 41000 + 19
-HID_IS_BTN_IMG16 = 41000 + 20
-HID_IS_BTN_IMG17 = 41000 + 21
-HID_IS_BTN_IMG18 = 41000 + 22
-HID_IS_BTN_IMG19 = 41000 + 23
-HID_IS_BTN_IMG20 = 41000 + 24
-HID_IS_BTN_IMG21 = 41000 + 25
-HID_IS_BTN_IMG22 = 41000 + 26
-HID_IS_BTN_IMG23 = 41000 + 27
-HID_IS_BTN_IMG24 = 41000 + 28
-HID_IS_BTN_IMG25 = 41000 + 29
-HID_IS_BTN_IMG26 = 41000 + 30
-HID_IS_BTN_IMG27 = 41000 + 31
-HID_IS_BTN_IMG28 = 41000 + 32
-HID_IS_BTN_IMG29 = 41000 + 33
-HID_IS_BTN_IMG30 = 41000 + 34
-HID_IS_BTN_IMG31 = 41000 + 35
-HID_IS_BTN_IMG32 = 41000 + 36
-
-# web wizard ftp dialog
-HID_FTP = 41000 + 40
-HID_FTP_SERVER = 41000 + 41
-HID_FTP_USERNAME = 41000 + 42
-HID_FTP_PASS = 41000 + 43
-HID_FTP_TEST = 41000 + 44
-HID_FTP_TXT_PATH = 41000 + 45
-HID_FTP_BTN_PATH = 41000 + 46
-HID_FTP_OK = 41000 + 47
-HID_FTP_CANCEL = 41000 + 48
diff --git a/wizards/com/sun/star/wizards/web/WebWizardConst.py b/wizards/com/sun/star/wizards/web/WebWizardConst.py
deleted file mode 100644
index 1903dcbcd01a..000000000000
--- a/wizards/com/sun/star/wizards/web/WebWizardConst.py
+++ /dev/null
@@ -1,39 +0,0 @@
-LSTLOADSETTINGS_ITEM_CHANGED = "sessionSelected" # "lstLoadSettingsItemChanged"
-BTNLOADSESSION_ACTION_PERFORMED = "loadSession" # "btnLoadSessionActionPerformed"
-BTNDELSESSION_ACTION_PERFORMED = "delSession" # "btnDelSessionActionPerformed"
-BTNADDDOC_ACTION_PERFORMED = "addDocument" # "btnAddDocActionPerformed"
-BTNREMOVEDOC_ACTION_PERFORMED = "removeDocument" # "btnRemoveDocActionPerformed"
-BTNDOCUP_ACTION_PERFORMED = "docUp" # "btnDocUpActionPerformed"
-BTNDOCDOWN_ACTION_PERFORMED = "docDown" # "btnDocDownActionPerformed"
-LSTSTYLES_ITEM_CHANGED = "refreshStylePreview" # "lstStylesItemChanged"
-BTNBACKGROUNDS_ACTION_PERFORMED = "chooseBackground" # "btnBackgroundsActionPerformed"
-BTNICONSETS_ACTION_PERFORMED = "chooseIconset" # "btnIconSetsActionPerformed"
-BTNFAVICON_ACTION_PERFORMED = "chooseFavIcon" # "btnFavIconActionPerformed"
-BTNPREVIEW_ACTION_PERFORMED = "documentPreview" # "btnPreviewActionPerformed"
-BTNFTP_ACTION_PERFORMED = "setFTPPublish" # "btnFTPActionPerformed"
-CHKLOCALDIR_ITEM_CHANGED = "checkPublish" # "chkLocalDirItemChanged"
-CHKSAVESETTINGS_ITEM_CHANGED = "checkPublish" # "chkSaveSettingsItemChanged"
-TXTSAVESETTINGS_TEXT_CHANGED = "checkPublish" # "txtSaveSettingsTextChanged"
-BTNLOCALDIR_ACTION_PERFORMED = "setPublishLocalDir" # "btnLocalDirActionPerformed"
-BTNZIP_ACTION_PERFORMED = "setZipFilename" # "btnZipActionPerformed"
-CONFIG_PATH = "/org.openoffice.Office.WebWizard/WebWizard"
-CONFIG_READ_PARAM = "cp_"
-TASK = "WWIZ"
-TASK_PREPARE = "t-prep"
-LOCAL_PUBLISHER = "local"
-FTP_PUBLISHER = "ftp"
-ZIP_PUBLISHER = "zip"
-TASK_EXPORT = "t_exp"
-TASK_EXPORT_PREPARE = "t_exp_prep"
-TASK_EXPORT_DOCUMENTS = "t_exp_docs"
-TASK_GENERATE_PREPARE = "t_gen_prep"
-TASK_GENERATE_XSL = "t_gen_x"
-TASK_GENERATE_COPY = "t_gen_cp"
-TASK_PUBLISH_PREPARE = "t_pub_prep"
-TASK_FINISH = "t_fin"
-
-'''
-when the user adds more than this number
-of documents to the list, a status dialog opens.
-'''
-MIN_ADD_FILES_FOR_DIALOG = 2
diff --git a/wizards/com/sun/star/wizards/web/WebWizardDialog.py b/wizards/com/sun/star/wizards/web/WebWizardDialog.py
deleted file mode 100644
index 621d1da2510d..000000000000
--- a/wizards/com/sun/star/wizards/web/WebWizardDialog.py
+++ /dev/null
@@ -1,713 +0,0 @@
-from ui.WizardDialog import *
-from WebWizardDialogResources import WebWizardDialogResources
-from WebWizardConst import *
-from WWHID import *
-from ui.ImageList import ImageList
-from com.sun.star.awt import Size
-from com.sun.star.awt.FontUnderline import SINGLE
-from com.sun.star.awt.FontFamily import ROMAN
-from com.sun.star.awt.FontSlant import ITALIC
-from com.sun.star.awt.ImageAlign import LEFT
-
-class WebWizardDialog(WizardDialog):
- PROPNAMES_LBL = (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- PROPNAMES_CHKBOX = (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STATE,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- PROPNAMES_BUTTON = (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- PROPNAMES_TXT = (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- PROPNAMES_TXT_2 = (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y, "ReadOnly",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
- PROPNAMES_TITLE = ("FontDescriptor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH)
-
- def __init__(self, xmsf):
- super(WebWizardDialog, self).__init__(xmsf, HID0_WEBWIZARD)
- #Load Resources
- self.resources = WebWizardDialogResources(xmsf)
- #set dialog properties...
- Helper.setUnoPropertyValues(self.xDialogModel,(
- "Closeable",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL, "Moveable",
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX, "Title",
- PropertyNames.PROPERTY_WIDTH),
- (True, 210, HelpIds.getHelpIdString(HID0_WEBWIZARD), True,
- "WebWizardDialog", 102, 52, 1, 6,
- self.resources.resWebWizardDialog_title, 330))
- self.fontDescriptor0 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor1 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor4 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor5 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor6 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.fontDescriptor7 = \
- uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
- self.imgIconsPrev = range(8)
- #Set member- self.fontDescriptors...
- self.fontDescriptor0.Weight = 100
- self.fontDescriptor1.Weight = 150
- self.fontDescriptor1.Underline = SINGLE
- self.fontDescriptor4.Weight = 150
- self.fontDescriptor5.Name = "Angsana New"
- self.fontDescriptor5.Height = 16
- self.fontDescriptor5.StyleName = "Regular"
- self.fontDescriptor5.Family = ROMAN
- self.fontDescriptor5.Weight = 100
- self.fontDescriptor6.Name = "Andalus"
- self.fontDescriptor6.Height = 22
- self.fontDescriptor6.StyleName = "Bold Italic"
- self.fontDescriptor6.Weight = 150
- self.fontDescriptor6.Slant = ITALIC
- self.fontDescriptor7.Name = "StarSymbol"
- self.fontDescriptor7.Height = 9
- self.fontDescriptor7.StyleName = "Regular"
- self.fontDescriptor7.Weight = 100
-
- #build components
-
- def buildStep1(self):
- tabIndex = 100
- self.insertLabel("lbIntroTitle", WebWizardDialog.PROPNAMES_TITLE,
- (self.fontDescriptor4, 16, self.resources.reslbIntroTitle_value,
- True, "lbIntroTitle", 91, 8, 1, tabIndex + 1, 232))
- self.insertLabel("lblIntroduction",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (119, self.resources.reslblIntroduction_value, True,
- "lblIntroduction", 97, 28, 1, tabIndex + 1, 226))
- self.insertFixedLine("lnLoadSettings", WebWizardDialog.PROPNAMES_TXT,
- (2, "", "lnLoadSettings", 91, 147, 1, tabIndex + 1, 234))
- self.lblLoadSettings = self.insertLabel("lblLoadSettings",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (8, self.resources.reslblLoadSettings_value, True,
- "lblLoadSettings", 97, 153, 1, tabIndex + 1, 226))
- self.lstLoadSettings = self.insertListBox(
- "lstLoadSettings", None, LSTLOADSETTINGS_ITEM_CHANGED,("Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL, "LineCount",
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, HelpIds.getHelpIdString(HID1_LST_SESSIONS), 14,
- "lstLoadSettings", 97, 165, 1, tabIndex + 1, 173), self)
- self.btnDelSession = self.insertButton(
- "btnDelSession", BTNDELSESSION_ACTION_PERFORMED,
- (PropertyNames.PROPERTY_ENABLED,
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL, "ImageAlign",
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (False, 14, HelpIds.getHelpIdString(HID1_BTN_DEL_SES), LEFT,
- self.resources.resbtnDelSession_value, "btnDelSession",
- 274, 164, 1, tabIndex + 1, 50), self)
-
- def buildStep2(self):
- tabIndex = 200
- self.lblContentTitle = self.insertLabel(
- "lblContentTitle", WebWizardDialog.PROPNAMES_TITLE,
- (self.fontDescriptor4, 16, self.resources.reslblContentTitle_value,
- True, "lblContentTitle", 91, 8, 2, tabIndex + 1, 232))
- self.lblSiteContent = self.insertLabel(
- "lblSiteContent", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblSiteContent_value,
- "lblSiteContent", 97, 28, 2, tabIndex + 1, 105))
- self.lstDocuments = self.insertListBox(
- "lstDocuments", None, None,
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- "LineCount",
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (123, HelpIds.getHelpIdString(HID2_LST_DOCS),
- 9, "lstDocuments", 97, 38, 2, tabIndex + 1, 103), self)
- self.btnAddDoc = self.insertButton(
- "btnAddDoc", BTNADDDOC_ACTION_PERFORMED,
- WebWizardDialog.PROPNAMES_BUTTON,
- (14, HelpIds.getHelpIdString(HID2_BTN_ADD_DOC),
- self.resources.resbtnAddDoc_value, "btnAddDoc", 97, 165, 2,
- tabIndex + 1, 50), self)
- self.btnRemoveDoc = self.insertButton(
- "btnRemoveDoc", BTNREMOVEDOC_ACTION_PERFORMED,
- WebWizardDialog.PROPNAMES_BUTTON,
- (14, HelpIds.getHelpIdString(HID2_BTN_REM_DOC),
- self.resources.resbtnRemoveDoc_value, "btnRemoveDoc", 150, 165,
- 2, tabIndex + 1, 50), self)
- self.btnDocUp = self.insertButton(
- "btnDocUp", BTNDOCUP_ACTION_PERFORMED,
- ("FontDescriptor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor7, 14, HelpIds.getHelpIdString(HID2_BTN_DOC_UP),
- self.resources.resbtnDocUp_value, "btnDocUp",
- 205, 87, 2, tabIndex + 1, 18), self)
- self.btnDocDown = self.insertButton(
- "btnDocDown", BTNDOCDOWN_ACTION_PERFORMED,(
- "FontDescriptor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (self.fontDescriptor7, 14, HelpIds.getHelpIdString(HID2_BTN_DOC_DOWN),
- self.resources.resbtnDocDown_value, "btnDocDown", 205,
- 105, 2, tabIndex + 1, 18), self)
- self.lblDocExportFormat = self.insertLabel(
- "lblDocExportFormat", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblDocExportFormat_value,
- "lblDocExportFormat", 235, 28, 2, tabIndex + 1, 89))
- self.lstDocTargetType = self.insertListBox("lstDocTargetType", None, None,
- ("Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL, "LineCount",
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, HelpIds.getHelpIdString(HID2_LST_DOC_EXPORT), 14,
- "lstDocTargetType", 235, 38, 2, tabIndex + 1, 89), self)
- self.lnDocsInfo = self.insertFixedLine(
- "lnDocsInfo", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslnDocsInfo_value, "lnDocsInfo",
- 235, 66, 2, tabIndex + 1, 90))
- self.lblDocTitle = self.insertLabel(
- "lblDocTitle", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblDocTitle_value, "lblDocTitle",
- 235, 78, 2, tabIndex + 1, 89))
- self.txtDocTitle = self.insertTextField(
- "txtDocTitle", None, WebWizardDialog.PROPNAMES_TXT,
- (12, HelpIds.getHelpIdString(HID2_TXT_DOC_TITLE), "txtDocTitle",
- 235, 88, 2, tabIndex + 1, 89), self)
- self.lblDocInfo = self.insertLabel(
- "lblDocInfo", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblDocInfo_value, "lblDocInfo",
- 235, 103, 2, tabIndex + 1, 89))
- self.txtDocInfo = self.insertTextField(
- "txtDocInfo", None,(PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (40, HelpIds.getHelpIdString(HID2_TXT_DOC_DESC), True,
- "txtDocInfo", 235, 113, 2, tabIndex + 1, 89), self)
- self.lblDocAuthor = self.insertLabel(
- "lblDocAuthor", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblDocAuthor_value, "lblDocAuthor",
- 235, 155, 2, tabIndex + 1, 89))
- self.txtDocAuthor = self.insertTextField(
- "txtDocAuthor", None, WebWizardDialog.PROPNAMES_TXT,
- (12, HelpIds.getHelpIdString(HID2_TXT_DOC_AUTHOR),
- "txtDocAuthor", 235, 165, 2, tabIndex + 1, 89), self)
-
- def buildStep3(self):
- self.insertLabel("lblLayoutTitle", WebWizardDialog.PROPNAMES_TITLE,
- (self.fontDescriptor4, 16, self.resources.reslblLayoutTitle_value,
- True, "lblLayoutTitle", 91, 8, 3, 29, 232))
- self.lblLayouts = self.insertLabel("lblLayouts",
- WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblLayouts_value, "lblLayouts",
- 97, 28, 3, 30, 206))
-
- def buildStep4(self):
- self.insertLabel("lblLayout2Title", WebWizardDialog.PROPNAMES_TITLE,
- (self.fontDescriptor4, 16, self.resources.reslblLayout2Title_value,
- True, "lblLayout2Title", 91, 8, 4, 33, 232))
- self.lnDisplay = self.insertLabel("lblDisplay",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (16, self.resources.reslblDisplay_value, True,
- "lblDisplay", 97, 28, 4, 34, 226))
- self.chkDocFilename = self.insertCheckBox("chkDocFilename", None,
- WebWizardDialog.PROPNAMES_CHKBOX,
- (8, HelpIds.getHelpIdString(HID4_CHK_DISPLAY_FILENAME),
- self.resources.reschkDocFilename_value, "chkDocFilename",
- 103, 50, 0, 4, 35, 99), self)
- self.chbDocDesc = self.insertCheckBox(
- "chbDocDesc", None, WebWizardDialog.PROPNAMES_CHKBOX,
- (8, HelpIds.getHelpIdString(HID4_CHK_DISPLAY_DESCRIPTION),
- self.resources.reschbDocDesc_value, "chbDocDesc",
- 103, 60, 0, 4, 36, 99), self)
- self.chbDocAuthor = self.insertCheckBox(
- "chbDocAuthor", None, WebWizardDialog.PROPNAMES_CHKBOX,
- (8, HelpIds.getHelpIdString(HID4_CHK_DISPLAY_AUTHOR),
- self.resources.reschbDocAuthor_value, "chbDocAuthor",
- 103, 70, 0, 4, 37, 99), self)
- self.chkDocCreated = self.insertCheckBox(
- "chkDocCreated", None, WebWizardDialog.PROPNAMES_CHKBOX,
- (8, HelpIds.getHelpIdString(HID4_CHK_DISPLAY_CR_DATE),
- self.resources.reschkDocCreated_value, "chkDocCreated",
- 103, 80, 0, 4, 38, 99), self)
- self.chkDocChanged = self.insertCheckBox(
- "chkDocChanged", None, WebWizardDialog.PROPNAMES_CHKBOX,
- (8, HelpIds.getHelpIdString(HID4_CHK_DISPLAY_UP_DATE),
- self.resources.reschkDocChanged_value, "chkDocChanged",
- 103, 90, 0, 4, 39, 99), self)
- self.chkDocFormat = self.insertCheckBox(
- "chkDocFormat", None, WebWizardDialog.PROPNAMES_CHKBOX,
- (8, HelpIds.getHelpIdString(HID4_CHK_DISPLAY_FORMAT),
- self.resources.reschkDocFormat_value, "chkDocFormat",
- 200, 50, 0, 4, 40, 110), self)
- self.chkDocFormatIcon = self.insertCheckBox(
- "chkDocFormatIcon", None, WebWizardDialog.PROPNAMES_CHKBOX,
- (8, HelpIds.getHelpIdString(HID4_CHK_DISPLAY_F_ICON),
- self.resources.reschkDocFormatIcon_value, "chkDocFormatIcon",
- 200, 60, 0, 4, 41, 110), self)
- self.chkDocPages = self.insertCheckBox(
- "chkDocPages", None, WebWizardDialog.PROPNAMES_CHKBOX,
- (8, HelpIds.getHelpIdString(HID4_CHK_DISPLAY_PAGES),
- self.resources.reschkDocPages_value, "chkDocPages",
- 200,70, 0, 4, 42, 110), self)
- self.chkDocSize = self.insertCheckBox(
- "chkDocSize", None, WebWizardDialog.PROPNAMES_CHKBOX,
- (8, HelpIds.getHelpIdString(HID4_CHK_DISPLAY_SIZE),
- self.resources.reschkDocSize_value, "chkDocSize",
- 200, 80, 0, 4, 43, 110), self)
- self.insertLabel("lblOptimizeFor", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblOptimizeFor_value, "lblOptimizeFor",
- 97, 113, 4, 44, 226))
- self.optOptimize640x480 = self.insertRadioButton(
- "optOptimize640x480", None, WebWizardDialog.PROPNAMES_BUTTON,
- (10, HelpIds.getHelpIdString(HID4_GRP_OPTIMAIZE_640),
- self.resources.resoptOptimize640x480_value,
- "optOptimize640x480", 103, 133, 4, 45, 44), self)
- self.optOptimize800x600 = self.insertRadioButton(
- "optOptimize800x600", None, WebWizardDialog.PROPNAMES_BUTTON,
- (10, HelpIds.getHelpIdString(HID4_GRP_OPTIMAIZE_800),
- self.resources.resoptOptimize800x600_value,
- "optOptimize800x600", 103, 146, 4, 46, 44), self)
- self.optOptimize1024x768 = self.insertRadioButton(
- "optOptimize1024x768", None, WebWizardDialog.PROPNAMES_BUTTON,
- (10, HelpIds.getHelpIdString(HID4_GRP_OPTIMAIZE_1024),
- self.resources.resoptOptimize1024x768_value,
- "optOptimize1024x768", 103, 158, 4, 47, 44), self)
-
- def buildStep5(self):
- self.lblStyleTitle = self.insertLabel(
- "lblStyleTitle", WebWizardDialog.PROPNAMES_TITLE,
- (self.fontDescriptor4, 16, self.resources.reslblStyleTitle_value,
- True, "lblStyleTitle", 91, 8, 5, 50, 232))
- self.lblStyle = self.insertLabel(
- "lblStyle", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblStyle_value,
- "lblStyle", 97, 28, 5, 51, 80))
- self.lstStyles = self.insertListBox(
- "lstStyles", None, LSTSTYLES_ITEM_CHANGED,(
- "Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL, "LineCount",
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, HelpIds.getHelpIdString(HID5_LST_STYLES),
- 14, "lstStyles", 179, 26, 5, 52, 145), self)
- self.insertLabel("lblBackground", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblBackground, "lblBackground",
- 97, 46, 5, 51, 70))
- self.txtBackground = self.insertLabel("txtBackground",
- ("Border",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (1, 12, self.resources.resBackgroundNone,
- "txtBackground", 179, 44, 5, 52, 90))
- self.btnBackgrounds = self.insertButton(
- "btnBackgrounds", BTNBACKGROUNDS_ACTION_PERFORMED,
- WebWizardDialog.PROPNAMES_BUTTON,
- (14, HelpIds.getHelpIdString(HID5_BTN_BACKGND),
- self.resources.resBtnChooseBackground, "btnBackgrounds",
- 274, 43, 5, 53, 50), self)
- self.insertLabel("lblIconset", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblIconset, "lblIconset", 97, 64, 5, 51, 70))
- self.insertLabel("txtIconset",
- ("Border",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (1, 12, self.resources.resIconsetNone, "txtIconset",
- 179, 62, 5, 52, 90))
- self.btnIconSets = self.insertButton(
- "btnIconSets", BTNICONSETS_ACTION_PERFORMED,
- WebWizardDialog.PROPNAMES_BUTTON,
- (14, HelpIds.getHelpIdString(HID5_BTN_ICONS),
- self.resources.resBtnChooseIconset, "btnIconSets",
- 274, 61, 5, 54, 50), self)
- self.insertLabel("lblIconsetInfo",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (16, self.resources.reslblIconSetInfo, True, "lblIconsetInfo",
- 179, 78, 5, 51, 145))
- self.imgPreview = self.insertImage("imgPreview",
- ("BackgroundColor",
- PropertyNames.PROPERTY_ENABLED,
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_IMAGEURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y, "ScaleImage",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (0, False, 78, "", "imgPreview", 91, 100, False, 5, 55, 232))
-
- def buildStep6(self):
- tabIndex = 60
- self.insertLabel("lblTitleGeneralPage",
- WebWizardDialog.PROPNAMES_TITLE,
- (self.fontDescriptor4, 8,
- self.resources.reslblTitleGeneralPage_value, True,
- "lblTitleGeneralPage", 90, 9, 6, tabIndex + 1, 232))
- self.insertLabel("lblSiteTitle", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblSiteTitle_value, "lblSiteTitle",
- 97, 28, 6, tabIndex + 1, 80))
- self.txtSiteTitle = self.insertTextField(
- "txtSiteTitle", None, WebWizardDialog.PROPNAMES_TXT,
- (12, HelpIds.getHelpIdString(HID6_TXT_SITE_TITLE),
- "txtSiteTitle", 179, 26, 6, tabIndex + 1, 145), self)
- self.insertFixedLine(
- "FixedLineMetaData", WebWizardDialog.PROPNAMES_LBL,
- (9, self.resources.reslblMetaData, "FixedLineMetaData",
- 97, 56, 6, tabIndex + 1, 228))
- self.insertLabel("lblSiteDesc", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblSiteDesc_value, "lblSiteDesc",
- 103, 72, 6, tabIndex + 1, 80))
- self.txtSiteDesc = self.insertTextField(
- "txtSiteDesc", None, WebWizardDialog.PROPNAMES_TXT,
- (12, HelpIds.getHelpIdString(HID6_TXT_SITE_DESC), "txtSiteDesc",
- 179, 70, 6, tabIndex + 1, 145), self)
- self.insertLabel(
- "lblEmail", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblEmail_value, "lblEmail",
- 103, 90, 6, tabIndex + 1, 80))
- self.txtEmail = self.insertTextField(
- "txtEmail", None, WebWizardDialog.PROPNAMES_TXT,
- (12, HelpIds.getHelpIdString(HID6_TXT_SITE_EMAIL), "txtEmail",
- 179, 87, 6, tabIndex + 1, 145), self)
- self.insertLabel("lblCopyright", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblCopyright_value, "lblCopyright",
- 103, 108, 6, tabIndex + 1, 80))
- self.txtCopyright = self.insertTextField(
- "txtCopyright", None, WebWizardDialog.PROPNAMES_TXT,
- (12, HelpIds.getHelpIdString(HID6_TXT_SITE_COPYRIGHT),
- "txtCopyright", 179, 106, 6, tabIndex + 1, 145), self)
- self.insertLabel("lblSiteCreated", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblSiteCreated_value, "lblSiteCreated",
- 103, 126, 6, tabIndex + 1, 80))
- self.dateSiteCreated = self.insertDateField("dateSiteCreated", None,
- ("Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, HelpIds.getHelpIdString(HID6_DATE_SITE_CREATED),
- "dateSiteCreated", 179, 124, 6, tabIndex + 1, 49), self)
- self.insertLabel("lblSiteUpdated", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblSiteUpdated_value, "lblSiteUpdated",
- 103, 144, 6, tabIndex + 1, 80))
- self.dateSiteUpdate = self.insertDateField("dateSiteUpdate", None,
- ("Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, HelpIds.getHelpIdString(HID6_DATE_SITE_UPDATED),
- "dateSiteUpdate", 179, 142, 6, tabIndex + 1, 49), self)
-
- def buildStep7(self, disableFTP, exclamationURL):
- tabIndex = 700
- self.lblTitlePublish = self.insertLabel(
- "lblTitlePublish", WebWizardDialog.PROPNAMES_TITLE,
- (self.fontDescriptor4, 16, self.resources.reslblTitlePublish_value,
- True, "lblTitlePublish", 91, 8, 7, tabIndex + 1, 232))
- self.FixedLine1 = self.insertFixedLine(
- "FixedLine1", WebWizardDialog.PROPNAMES_LBL,
- (9, self.resources.resFixedLine1_value, "FixedLine1",
- 97, 28, 7, tabIndex + 1, 228))
- self.btnPreview = self.insertButton(
- "btnPreview", BTNPREVIEW_ACTION_PERFORMED,
- WebWizardDialog.PROPNAMES_BUTTON,
- (14, HelpIds.getHelpIdString(HID7_BTN_PREVIEW),
- self.resources.resbtnPreview_value, "btnPreview",
- 103, 40, 7, tabIndex + 1, 50), self)
- self.insertFixedLine(
- "lblCreateSite", WebWizardDialog.PROPNAMES_LBL,
- (9, self.resources.reslblCreateSite_value, "lblCreateSite",
- 97, 56, 7, tabIndex + 1, 228))
- self.chkLocalDir = self.insertCheckBox(
- "chkLocalDir", CHKLOCALDIR_ITEM_CHANGED,
- WebWizardDialog.PROPNAMES_CHKBOX,
- (8, HelpIds.getHelpIdString(HID7_CHK_PUBLISH_LOCAL),
- self.resources.reschkLocalDir_value, "chkLocalDir",
- 103, 68, 0, 7, tabIndex + 1, 215), self)
- self.txtLocalDir = self.insertTextField(
- "txtLocalDir", None, WebWizardDialog.PROPNAMES_TXT,
- (12, HelpIds.getHelpIdString(HID7_TXT_LOCAL), "txtLocalDir",
- 113, 78, 7, tabIndex + 1, 190), self)
- self.btnLocalDir = self.insertButton(
- "btnLocalDir", BTNLOCALDIR_ACTION_PERFORMED,
- WebWizardDialog.PROPNAMES_BUTTON,
- (14, HelpIds.getHelpIdString(HID7_BTN_LOCAL),
- self.resources.resbtnLocalDir_value, "btnLocalDir",
- 308, 77, 7, tabIndex + 1, 16), self)
- self.chkZip = self.insertCheckBox(
- "chkZip", None, WebWizardDialog.PROPNAMES_CHKBOX,
- (9, HelpIds.getHelpIdString(HID7_CHK_PUBLISH_ZIP),
- self.resources.reschkZip_value, "chkZip", 103, 96, 0, 7,
- tabIndex + 1, 215), self)
- self.txtZip = self.insertTextField(
- "txtZip", None, WebWizardDialog.PROPNAMES_TXT,
- (12, HelpIds.getHelpIdString(HID7_TXT_ZIP), "txtZip",
- 113, 108, 7, tabIndex + 1, 190), self)
- self.btnZip = self.insertButton(
- "btnZip", BTNZIP_ACTION_PERFORMED,
- WebWizardDialog.PROPNAMES_BUTTON,
- (14, HelpIds.getHelpIdString(HID7_BTN_ZIP),
- self.resources.resbtnZip_value, "btnZip", 308, 107, 7,
- tabIndex + 1, 16), self)
- self.chkFTP = self.insertCheckBox(
- "chkFTP", None, WebWizardDialog.PROPNAMES_CHKBOX,
- (8, HelpIds.getHelpIdString(HID7_CHK_PUBLISH_FTP),
- self.resources.reschkFTP_value, "chkFTP", 103, 124, 0, 7,
- tabIndex + 1, 215), self)
- if disableFTP:
- FTP_STEP = 99
- else:
- FTP_STEP = 7
-
- self.lblFTP = self.insertLabel(
- "lblFTP", ("Border",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (1, 12, "txtFTP", 113, 134, FTP_STEP, tabIndex + 1, 156))
- self.btnFTP = self.insertButton(
- "btnFTP", BTNFTP_ACTION_PERFORMED,
- WebWizardDialog.PROPNAMES_BUTTON,
- (14, HelpIds.getHelpIdString(HID7_BTN_FTP),
- self.resources.resbtnFTP_value, "btnFTP", 274, 133,
- FTP_STEP, tabIndex + 1, 50), self)
- if disableFTP:
- self.insertImage(
- "imgFTPDisabled",("BackgroundColor", "Border",
- PropertyNames.PROPERTY_ENABLED,
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_IMAGEURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y, "ScaleImage",
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (-1, 0, False, 10, exclamationURL, "imgFTPDisabled", 115,
- 135, False, 7, tabIndex + 1, 8))
- self.insertLabel(
- "lblFTPDisabled",("BackgroundColor",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (-1, 8, self.resources.reslblFTPDisabled, True,
- "lblFTPDisabled", 125, 136, 7, tabIndex + 1, 226))
-
- self.insertFixedLine(
- "lnSaveSetting", WebWizardDialog.PROPNAMES_TXT,
- (2, "", "lnSaveSetting", 97, 151, 7, tabIndex + 1, 228))
- self.chkSaveSettings = self.insertCheckBox(
- "chkSaveSettings", CHKSAVESETTINGS_ITEM_CHANGED,
- WebWizardDialog.PROPNAMES_CHKBOX,
- (9, HelpIds.getHelpIdString(HID7_CHK_SAVE),
- self.resources.reschkSaveSettings_value, "chkSaveSettings",
- 97, 157, 1, 7, tabIndex + 1, 215), self)
- self.insertLabel(
- "lblSaveSettings", WebWizardDialog.PROPNAMES_LBL,
- (8, self.resources.reslblSaveSettings_value, "lblSaveSettings",
- 107, 169, 7, tabIndex + 1, 45))
- self.cbSaveSettings = self.insertComboBox(
- "txtSaveSettings", TXTSAVESETTINGS_TEXT_CHANGED,
- TXTSAVESETTINGS_TEXT_CHANGED, TXTSAVESETTINGS_TEXT_CHANGED,
- ("Autocomplete", "Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL, "LineCount",
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, True, 12, HelpIds.getHelpIdString(HID7_TXT_SAVE),
- 14, "txtSaveSettings", 179, 167, 7, tabIndex + 1, 145), self)
-
- '''
- builds the layouts image list.
- '''
-
- def buildStepX(self):
- self.ilLayouts = ImageList()
- self.ilLayouts.pos = Size (97, 38)
- self.ilLayouts.imageSize = Size (34, 30)
- self.ilLayouts.cols = 5
- self.ilLayouts.rows = 3
- self.ilLayouts.step = 3
- self.ilLayouts.showButtons = False
- self.ilLayouts.renderer = self.LayoutRenderer()
- self.ilLayouts.scaleImages = False
- self.ilLayouts.tabIndex = 31
- self.ilLayouts.helpURL = HID3_IL_LAYOUTS_IMG1
-
-
- '''
- renders the images and titles of
- the layouts
- @author rpiterman
- '''
-
- class LayoutRenderer:
-
- def getImageUrls(self, listItem):
- oResIds = None
- if listItem != None:
- oResIds = listItem.getImageUrls()
-
- return oResIds
-
- def render(self, listItem):
- print "implementar"
- #return listItem == None ? "" : (listItem).cp_Name
diff --git a/wizards/com/sun/star/wizards/web/WebWizardDialogResources.py b/wizards/com/sun/star/wizards/web/WebWizardDialogResources.py
deleted file mode 100644
index f52f1517f183..000000000000
--- a/wizards/com/sun/star/wizards/web/WebWizardDialogResources.py
+++ /dev/null
@@ -1,298 +0,0 @@
-import traceback
-from common.Resource import Resource
-from common.Configuration import Configuration
-from common.Properties import Properties
-from document.OfficeDocument import OfficeDocument
-
-class WebWizardDialogResources(Resource):
- UNIT_NAME = "dbwizres"
- MODULE_NAME = "dbw"
- RID_WEBWIZARDDIALOG_START = 4000
- RID_COMMON_START = 500
- RID_DB_COMMON_START = 1000
-
- def __init__(self, xmsf):
- super(WebWizardDialogResources,self).__init__(xmsf,
- WebWizardDialogResources.MODULE_NAME)
- self.resbtnDocUp_value = str(8743)
- self.resbtnDocDown_value = str(8744)
-
- #Delete the String, uncomment the getResText method
- self.resWebWizardDialog_title = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 1)
- self.reslblIntroduction_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 2)
- self.resbtnDelSession_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 4)
- self.reslbIntroTitle_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 5)
- self.reslblContentTitle_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 6)
- self.reslnDocsInfo_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 8)
- self.reslblDocTitle_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 9)
- self.reslblDocInfo_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 10)
- self.reslblDocAuthor_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 11)
- self.reslblDocExportFormat_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 12)
- self.reslblTitleGeneralPage_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 13)
- self.reslblSiteTitle_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 14)
- self.reslblSiteDesc_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 16)
- self.reslblSiteCreated_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 18)
- self.reslblEmail_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 20)
- self.reslblCopyright_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 21)
- self.reslblSiteUpdated_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 22)
- self.resbtnPreview_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 24)
- self.reslblTitlePublish_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 25)
- self.reslblCreateSite_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 26)
- self.reschkLocalDir_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 27)
- self.resbtnLocalDir_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 28)
- self.reschkFTP_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 29)
-
- self.resbtnFTP_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 31)
- self.reschkZip_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 32)
- self.resbtnZip_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 33)
- self.reschkSaveSettings_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 34)
- self.reslblSaveSettings_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 35)
- self.reslblLoadSettings_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 36)
- self.reslblSiteContent_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 37)
- self.resbtnAddDoc_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 38)
- self.resbtnRemoveDoc_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 39)
- self.reslblLayoutTitle_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 40)
- self.reslblStyleTitle_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 41)
- self.reslblStyle_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 42)
-
- self.reslblLayouts_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 48)
-
- self.reschbDocDesc_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 50)
- self.reschbDocAuthor_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 51)
- self.reschkDocCreated_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 52)
- self.reschkDocChanged_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 53)
- self.reschkDocFilename_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 54)
- self.reschkDocFormat_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 55)
- self.reschkDocFormatIcon_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 56)
- self.reschkDocPages_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 57)
- self.reschkDocSize_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 58)
- self.resFixedLine1_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 59)
- self.reslblLayout2Title_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 60)
- self.reslblDisplay_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 61)
- self.reslblOptimizeFor_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 62)
- self.resoptOptimize640x480_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 64)
- self.resoptOptimize800x600_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 65)
- self.resoptOptimize1024x768_value = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 66)
-
- self.resStatusDialogTitle = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 70)
- self.resCounter = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 71)
- self.resPublishDir = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 72)
- self.resFTPTargetExistsAsfile = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 73)
- self.resLocalTargetExistsAsfile = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 74)
- self.resZipTargetExists = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 75)
- self.resFTPTargetNotEmpty = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 76)
- self.resLocalTragetNotEmpty = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 77)
- self.resSessionExists = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 78)
- self.resTaskExportDocs = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 79)
- self.resTaskExportPrepare = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 80)
- self.resTaskGenerateCopy = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 81)
- self.resTaskGeneratePrepare = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 82)
- self.resTaskGenerateXsl = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 83)
- self.resTaskPrepare = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 84)
- self.resTaskPublishPrepare = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 86)
- self.resTaskPublishLocal = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 87)
- self.resTaskPublishFTP = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 88)
- self.resTaskPublishZip = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 89)
- self.resTaskFinish = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 90)
-
- self.resImages = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 94)
- self.resAllFiles = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 95)
- self.resZipFiles = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 96)
- self.resBackgroundsDialog = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 98)
- self.resBackgroundsDialogCaption = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 99)
- self.resIconsDialog = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 100)
- self.resIconsDialogCaption = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 101)
- self.resOther = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 102)
- self.resDeselect = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 103)
- self.resFinishedSuccess = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 104)
- self.resFinishedNoSuccess = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 105)
- self.resErrTOC = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 106)
- self.resErrTOCMedia = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 107)
- self.resErrDocInfo = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 108)
- self.resErrDocExport = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 109)
- self.resErrMkDir = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 110)
- self.resErrSecurity = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 111)
- self.resErrExportIO = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 112)
- self.resErrPublishMedia = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 113)
- self.resErrPublish = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 114)
- self.resErrUnknown = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 115)
- self.resErrDocValidate = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 116)
- self.resErrIsDirectory = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 117)
- self.resLoadingSession = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 118)
- self.resErrUnexpected = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 119)
- self.resValidatingDocuments = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 120)
- self.resDefaultArchiveFilename = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 121)
- self.resStep1 = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 122)
- self.resStep2 = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 123)
- self.resStep3 = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 124)
- self.resStep4 = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 125)
- self.resStep5 = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 126)
- self.resStep6 = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 127)
- self.resStep7 = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 128)
- self.resDelSessionConfirm = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 130)
- self.resPages = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 131)
- self.resSlides = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 132)
- self.resCreatedTemplate = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 133)
- self.resUpdatedTemplate = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 134)
- self.resSessionName = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 135)
- self.reslblBackground = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 136)
- self.reslblIconset = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 137)
- self.reslblIconSetInfo = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 138)
- self.reslblMetaData = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 139)
- self.resBtnChooseBackground = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 140)
- self.resBtnChooseIconset = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 141)
- self.resSessionNameNone = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 142)
- self.reslblFTPDisabled = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 143)
- self.resBackgroundNone = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 144)
- self.resIconsetNone = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 145)
- self.resFTPTargetCouldNotCreate = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 146)
- self.resFTPTargetCreate = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 147)
- self.resZipTargetIsDir = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 148)
- self.resLocalTargetCouldNotCreate = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 149)
- self.resLocalTargetCreate = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 150)
- self.resSizeTemplate = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 151)
- self.resSpecifyNewFileLocation = self.getResText(
- WebWizardDialogResources.RID_WEBWIZARDDIALOG_START + 152)
- self.resClose = self.getResText(
- WebWizardDialogResources.RID_COMMON_START + 17)
- self.resCancel = self.getResText(
- WebWizardDialogResources.RID_COMMON_START + 11)
- self.resOK = self.getResText(
- WebWizardDialogResources.RID_COMMON_START + 18)
- self.resHelp = self.getResText(
- WebWizardDialogResources.RID_COMMON_START + 15)
- try:
- self.prodName = Configuration.getProductName(xmsf)
- self.resGifFiles = Properties.getPropertyValue(
- OfficeDocument.getTypeMediaDescriptor(
- xmsf, "gif_Graphics_Interchange"), "UIName")
- except Exception, ex:
- traceback.print_exc()
diff --git a/wizards/com/sun/star/wizards/web/__init__.py b/wizards/com/sun/star/wizards/web/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/wizards/com/sun/star/wizards/web/__init__.py
+++ /dev/null