diff options
author | Michael Meeks <michael.meeks@suse.com> | 2011-12-02 17:15:48 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-12-05 20:53:22 +0000 |
commit | b35b7080980c0ba43f411db469feb30f8a5c6881 (patch) | |
tree | 3b299cd25acab71627182956cf62ef7cbb583721 /wizards/com/sun | |
parent | 21131ea640f158963d4b69b1269c0bc7e5215006 (diff) |
pywizards: resurrect Xisco's code lost in rebasing
Xisco merged this to master and then deleted it on master, which cause
these files to get lost during the re-base across that.
Diffstat (limited to 'wizards/com/sun')
33 files changed, 5100 insertions, 7 deletions
diff --git a/wizards/com/sun/star/wizards/RemoteWebWizard b/wizards/com/sun/star/wizards/RemoteWebWizard new file mode 100755 index 000000000000..1f6d747c349e --- /dev/null +++ b/wizards/com/sun/star/wizards/RemoteWebWizard @@ -0,0 +1,7 @@ +#!/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 new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/wizards/com/sun/star/wizards/__init__.py diff --git a/wizards/com/sun/star/wizards/agenda/TemplateConsts.py b/wizards/com/sun/star/wizards/agenda/TemplateConsts.py new file mode 100644 index 000000000000..3095f31444a9 --- /dev/null +++ b/wizards/com/sun/star/wizards/agenda/TemplateConsts.py @@ -0,0 +1,72 @@ +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/__init__.py b/wizards/com/sun/star/wizards/agenda/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/wizards/com/sun/star/wizards/agenda/__init__.py diff --git a/wizards/com/sun/star/wizards/common/ConfigNode.py b/wizards/com/sun/star/wizards/common/ConfigNode.py new file mode 100644 index 000000000000..892e6e3277c7 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/ConfigNode.py @@ -0,0 +1,13 @@ +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/DebugHelper.py b/wizards/com/sun/star/wizards/common/DebugHelper.py new file mode 100644 index 000000000000..75016033a533 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/DebugHelper.py @@ -0,0 +1,10 @@ +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/HelpIds.py b/wizards/com/sun/star/wizards/common/HelpIds.py new file mode 100644 index 000000000000..c6bd1b78c2fd --- /dev/null +++ b/wizards/com/sun/star/wizards/common/HelpIds.py @@ -0,0 +1,1012 @@ +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/NoValidPathException.py b/wizards/com/sun/star/wizards/common/NoValidPathException.py new file mode 100644 index 000000000000..53db155e2e6d --- /dev/null +++ b/wizards/com/sun/star/wizards/common/NoValidPathException.py @@ -0,0 +1,10 @@ +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/Properties.py b/wizards/com/sun/star/wizards/common/Properties.py new file mode 100644 index 000000000000..4a906ed27d79 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/Properties.py @@ -0,0 +1,43 @@ +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 new file mode 100644 index 000000000000..c1dde18522f3 --- /dev/null +++ b/wizards/com/sun/star/wizards/common/PropertyNames.py @@ -0,0 +1,15 @@ +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/document/__init__.py b/wizards/com/sun/star/wizards/document/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/wizards/com/sun/star/wizards/document/__init__.py diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index 433384cfecb1..1dedca3b636d 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -343,7 +343,7 @@ public class StyleApplier String[] sPropList = JavaTools.ArrayoutofString(scurline, ":"); String sPropValue = sPropList[1]; sPropValue = sPropValue.trim(); - if (sPropValue.indexOf("#") > -1) + if (sPropValue.indexOf("#") > 0) { sPropValue = JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, PropertyNames.SEMI_COLON); sPropValue = JavaTools.replaceSubString(sPropValue, PropertyNames.EMPTY_STRING, PropertyNames.SPACE); diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py new file mode 100644 index 000000000000..c44c6dc40eee --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py @@ -0,0 +1,60 @@ +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/__init__.py b/wizards/com/sun/star/wizards/letter/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/wizards/com/sun/star/wizards/letter/__init__.py diff --git a/wizards/com/sun/star/wizards/text/ViewHandler.py b/wizards/com/sun/star/wizards/text/ViewHandler.py new file mode 100644 index 000000000000..e86c128205c1 --- /dev/null +++ b/wizards/com/sun/star/wizards/text/ViewHandler.py @@ -0,0 +1,37 @@ +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 new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/wizards/com/sun/star/wizards/text/__init__.py diff --git a/wizards/com/sun/star/wizards/ui/UIConsts.py b/wizards/com/sun/star/wizards/ui/UIConsts.py new file mode 100644 index 000000000000..a975ff4904d5 --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/UIConsts.py @@ -0,0 +1,53 @@ +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/XPathSelectionListener.py b/wizards/com/sun/star/wizards/ui/XPathSelectionListener.py new file mode 100644 index 000000000000..1f065209d2ea --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/XPathSelectionListener.py @@ -0,0 +1,7 @@ +from abc import ABCMeta, abstractmethod + +class XPathSelectionListener(object): + + @abstractmethod + def validatePath(self): + pass diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py new file mode 100644 index 000000000000..c94ae418036c --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py @@ -0,0 +1,124 @@ +#********************************************************************** +# +# 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.java b/wizards/com/sun/star/wizards/ui/event/DataAware.java index 608203c21252..6138286e80c0 100644 --- a/wizards/com/sun/star/wizards/ui/event/DataAware.java +++ b/wizards/com/sun/star/wizards/ui/event/DataAware.java @@ -291,12 +291,15 @@ public abstract class DataAware { * @param obj the object which contains the property. * @return the get method reflection object. */ + private static Class[] EMPTY_ARRAY = new Class[0]; + protected Method createGetMethod(String propName, Object obj) { Method m = null; try { //try to get a "get" method. - m = obj.getClass().getMethod("get" + propName, (Class[]) null); + + m = obj.getClass().getMethod("get" + propName, EMPTY_ARRAY); } catch (NoSuchMethodException ex1) { @@ -310,7 +313,7 @@ public abstract class DataAware { */ public Object get(Object target) { try { - return getMethod.invoke(target, (Object[]) null); + return getMethod.invoke(target, EMPTY_ARRAY); } catch (IllegalAccessException ex1) { ex1.printStackTrace(); } catch (InvocationTargetException ex2) { @@ -326,7 +329,6 @@ public abstract class DataAware { return new short[0]; } return null; - } protected Method createSetMethod(String propName, Object obj, Class paramClass) { diff --git a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java index 621158ec89cf..adea073ef3e6 100644 --- a/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java +++ b/wizards/com/sun/star/wizards/ui/event/MethodInvocation.java @@ -42,6 +42,10 @@ import java.lang.reflect.Method; */ public class MethodInvocation { + + static final Class[] EMPTY_ARRAY = + { + }; //the method to invoke. Method mMethod; //the object to invoke the method on. @@ -62,7 +66,7 @@ public class MethodInvocation public MethodInvocation(String methodName, Object obj, Class paramClass) throws NoSuchMethodException { - this(paramClass == null ? obj.getClass().getMethod(methodName, (Class[]) null) : obj.getClass().getMethod(methodName, new Class[] + this(paramClass == null ? obj.getClass().getMethod(methodName, null) : obj.getClass().getMethod(methodName, new Class[] { paramClass }), obj, paramClass); @@ -82,11 +86,12 @@ public class MethodInvocation { if (mWithParam) { - return mMethod.invoke(mObject, (Object) param); + return mMethod.invoke(mObject, (Object) param + ); } else { - return mMethod.invoke(mObject, (Object[]) null); + return mMethod.invoke(mObject, EMPTY_ARRAY); } } diff --git a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py new file mode 100644 index 000000000000..fad4a7c5c186 --- /dev/null +++ b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py @@ -0,0 +1,194 @@ +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 new file mode 100644 index 000000000000..cc9ef111dcef --- /dev/null +++ b/wizards/com/sun/star/wizards/web/IconsDialog.py @@ -0,0 +1,96 @@ +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 new file mode 100644 index 000000000000..d34f690594d4 --- /dev/null +++ b/wizards/com/sun/star/wizards/web/ImageListDialog.py @@ -0,0 +1,211 @@ +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 new file mode 100644 index 000000000000..1ad6f9561cda --- /dev/null +++ b/wizards/com/sun/star/wizards/web/StylePreview.py @@ -0,0 +1,76 @@ +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 new file mode 100644 index 000000000000..e15d98a4eeaa --- /dev/null +++ b/wizards/com/sun/star/wizards/web/WWD_Events.py @@ -0,0 +1,937 @@ +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 new file mode 100644 index 000000000000..6fbb0dcd8c1e --- /dev/null +++ b/wizards/com/sun/star/wizards/web/WWD_General.py @@ -0,0 +1,258 @@ +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 new file mode 100644 index 000000000000..86d0091fc752 --- /dev/null +++ b/wizards/com/sun/star/wizards/web/WWD_Startup.py @@ -0,0 +1,661 @@ +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 new file mode 100644 index 000000000000..28b3aaaa892e --- /dev/null +++ b/wizards/com/sun/star/wizards/web/WWHID.py @@ -0,0 +1,140 @@ +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 new file mode 100644 index 000000000000..1903dcbcd01a --- /dev/null +++ b/wizards/com/sun/star/wizards/web/WebWizardConst.py @@ -0,0 +1,39 @@ +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 new file mode 100644 index 000000000000..621d1da2510d --- /dev/null +++ b/wizards/com/sun/star/wizards/web/WebWizardDialog.py @@ -0,0 +1,713 @@ +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 new file mode 100644 index 000000000000..f52f1517f183 --- /dev/null +++ b/wizards/com/sun/star/wizards/web/WebWizardDialogResources.py @@ -0,0 +1,298 @@ +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 new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/wizards/com/sun/star/wizards/web/__init__.py |