summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-11-11 18:24:14 +0100
committerAndras Timar <atimar@suse.com>2012-11-11 18:24:14 +0100
commit06ec1c089519ef3249464aa09eadf03a8db93a39 (patch)
tree85b2eb6d8ba6ca95e18e1ff82151224cb14106f6 /wizards
parent8e0d67bed54633d555a4601a5d79e2d5ba7ab2bb (diff)
parent3f899eae02eaad0b967de749fe09b869ba93ad6d (diff)
Merge branch 'master' into feature/killsdf
Conflicts: Repository.mk RepositoryFixes.mk connectivity/prj/build.lst extensions/prj/build.lst filter/prj/build.lst fpicker/prj/build.lst l10ntools/StaticLibrary_transex.mk saxon/build.xml shell/prj/build.lst solenv/gbuild/AllLangResTarget.mk solenv/gbuild/Configuration.mk solenv/gbuild/UI.mk ucb/source/ucp/webdav/webdavcontent.cxx
Diffstat (limited to 'wizards')
-rw-r--r--wizards/Jar_fax.mk57
-rw-r--r--wizards/Jar_letter.mk60
-rw-r--r--wizards/Module_wizards.mk3
-rw-r--r--wizards/Pyuno_fax.mk6
-rw-r--r--wizards/Pyuno_letter.mk44
-rw-r--r--wizards/com/sun/star/wizards/README19
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaTemplate.py388
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py191
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py104
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py95
-rw-r--r--wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py10
-rw-r--r--wizards/com/sun/star/wizards/agenda/CallWizard.py50
-rw-r--r--wizards/com/sun/star/wizards/agenda/TemplateConsts.py144
-rw-r--r--wizards/com/sun/star/wizards/agenda/TopicsControl.py13
-rw-r--r--wizards/com/sun/star/wizards/common/Configuration.py186
-rw-r--r--wizards/com/sun/star/wizards/common/Desktop.py37
-rw-r--r--wizards/com/sun/star/wizards/common/FileAccess.py13
-rw-r--r--wizards/com/sun/star/wizards/common/NumberFormatter.py2
-rw-r--r--wizards/com/sun/star/wizards/common/Resource.py17
-rw-r--r--wizards/com/sun/star/wizards/common/SystemDialog.py26
-rw-r--r--wizards/com/sun/star/wizards/fax/CGFax.java50
-rw-r--r--wizards/com/sun/star/wizards/fax/CGFaxWizard.java28
-rw-r--r--wizards/com/sun/star/wizards/fax/CallWizard.java228
-rw-r--r--wizards/com/sun/star/wizards/fax/CallWizard.py30
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxDocument.java201
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxDocument.py5
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialog.java618
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialog.py74
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.java106
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py146
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java1073
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py61
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java216
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py27
-rw-r--r--wizards/com/sun/star/wizards/fax/MANIFEST.MF2
-rw-r--r--wizards/com/sun/star/wizards/fax/fax.component10
-rw-r--r--wizards/com/sun/star/wizards/fax/pyfax.component24
-rw-r--r--wizards/com/sun/star/wizards/letter/CGLetter.java55
-rw-r--r--wizards/com/sun/star/wizards/letter/CGLetter.py6
-rw-r--r--wizards/com/sun/star/wizards/letter/CGLetterWizard.java29
-rw-r--r--wizards/com/sun/star/wizards/letter/CGLetterWizard.py5
-rw-r--r--wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java30
-rw-r--r--wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py3
-rw-r--r--wizards/com/sun/star/wizards/letter/CallWizard.java228
-rw-r--r--wizards/com/sun/star/wizards/letter/CallWizard.py50
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterDocument.java319
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterDocument.py8
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialog.java883
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialog.py167
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java82
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py116
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java79
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java1484
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py271
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java224
-rw-r--r--wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py68
-rw-r--r--wizards/com/sun/star/wizards/letter/LocaleCodes.java192
-rw-r--r--wizards/com/sun/star/wizards/letter/LocaleCodes.py171
-rw-r--r--wizards/com/sun/star/wizards/letter/MANIFEST.MF2
-rw-r--r--wizards/com/sun/star/wizards/letter/letter.component8
-rw-r--r--wizards/com/sun/star/wizards/text/TextDocument.py98
-rw-r--r--wizards/com/sun/star/wizards/text/TextElement.py (renamed from wizards/com/sun/star/wizards/common/TextElement.py)19
-rw-r--r--wizards/com/sun/star/wizards/ui/UnoDialog2.py3
-rw-r--r--wizards/com/sun/star/wizards/ui/WizardDialog.py2
-rw-r--r--wizards/com/sun/star/wizards/ui/event/CommonListener.py1
-rw-r--r--wizards/com/sun/star/wizards/ui/event/DataAware.py3
-rw-r--r--wizards/com/sun/star/wizards/ui/event/RadioDataAware.py5
-rw-r--r--wizards/com/sun/star/wizards/ui/event/UnoDataAware.py7
68 files changed, 1204 insertions, 7778 deletions
diff --git a/wizards/Jar_fax.mk b/wizards/Jar_fax.mk
deleted file mode 100644
index b65fd4d5a107..000000000000
--- a/wizards/Jar_fax.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org 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 version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-$(eval $(call gb_Jar_Jar,fax))
-
-$(eval $(call gb_Jar_use_jars,fax,\
- ridl \
- unoil \
- jurt \
- juh \
- java_uno \
- commonwizards \
-))
-
-$(eval $(call gb_Jar_set_packageroot,fax,com))
-
-$(eval $(call gb_Jar_set_manifest,fax,$(SRCDIR)/wizards/com/sun/star/wizards/fax/MANIFEST.MF))
-
-$(eval $(call gb_Jar_add_sourcefiles,fax,\
- wizards/com/sun/star/wizards/fax/CallWizard \
- wizards/com/sun/star/wizards/fax/CGFax \
- wizards/com/sun/star/wizards/fax/CGFaxWizard \
- wizards/com/sun/star/wizards/fax/FaxDocument \
- wizards/com/sun/star/wizards/fax/FaxWizardDialog \
- wizards/com/sun/star/wizards/fax/FaxWizardDialogConst \
- wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl \
- wizards/com/sun/star/wizards/fax/FaxWizardDialogResources \
-))
-
-$(eval $(call gb_Jar_set_componentfile,fax,wizards/com/sun/star/wizards/fax/fax,OOO))
-
-# vim: set noet sw=4 ts=4:
diff --git a/wizards/Jar_letter.mk b/wizards/Jar_letter.mk
deleted file mode 100644
index 4b09fa7b96cd..000000000000
--- a/wizards/Jar_letter.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org 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 version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-$(eval $(call gb_Jar_Jar,letter))
-
-$(eval $(call gb_Jar_use_jars,letter,\
- ridl \
- unoil \
- jurt \
- juh \
- java_uno \
- commonwizards \
-))
-
-$(eval $(call gb_Jar_set_manifest,letter,$(SRCDIR)/wizards/com/sun/star/wizards/letter/MANIFEST.MF))
-
-$(eval $(call gb_Jar_set_packageroot,letter,com))
-
-$(eval $(call gb_Jar_add_sourcefiles,letter,\
- wizards/com/sun/star/wizards/letter/CallWizard \
- wizards/com/sun/star/wizards/letter/CGLetter \
- wizards/com/sun/star/wizards/letter/CGLetterWizard \
- wizards/com/sun/star/wizards/letter/CGPaperElementLocation \
- wizards/com/sun/star/wizards/letter/LetterDocument \
- wizards/com/sun/star/wizards/letter/LetterWizardDialog \
- wizards/com/sun/star/wizards/letter/LetterWizardDialogConst \
- wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents \
- wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl \
- wizards/com/sun/star/wizards/letter/LetterWizardDialogResources \
- wizards/com/sun/star/wizards/letter/LocaleCodes \
-))
-
-$(eval $(call gb_Jar_set_componentfile,letter,wizards/com/sun/star/wizards/letter/letter,OOO))
-
-# vim: set noet sw=4 ts=4:
diff --git a/wizards/Module_wizards.mk b/wizards/Module_wizards.mk
index fb23aa229728..8a2088acac89 100644
--- a/wizards/Module_wizards.mk
+++ b/wizards/Module_wizards.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_Module_add_targets,wizards,\
AllLangResTarget_tpl \
AllLangResTarget_wzi \
Pyuno_fax \
+ Pyuno_letter \
Pyuno_commonwizards \
Zip_depot \
Zip_euro \
@@ -55,9 +56,7 @@ ifeq ($(SOLAR_JAVA),TRUE)
$(eval $(call gb_Module_add_targets,wizards,\
Jar_commonwizards \
Jar_agenda \
- Jar_fax \
Jar_form \
- Jar_letter \
Jar_query \
Jar_report \
Jar_reportbuilder \
diff --git a/wizards/Pyuno_fax.mk b/wizards/Pyuno_fax.mk
index 868eecf4785d..cd5990e77a8f 100644
--- a/wizards/Pyuno_fax.mk
+++ b/wizards/Pyuno_fax.mk
@@ -25,9 +25,9 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
-$(eval $(call gb_Pyuno_Pyuno,pyfax,$(SRCDIR)/wizards/com/sun/star/wizards/fax))
+$(eval $(call gb_Pyuno_Pyuno,fax,$(SRCDIR)/wizards/com/sun/star/wizards/fax))
-$(eval $(call gb_Pyuno_add_files,pyfax,\
+$(eval $(call gb_Pyuno_add_files,fax,\
__init__.py \
CallWizard.py \
CGFax.py \
@@ -38,6 +38,6 @@ $(eval $(call gb_Pyuno_add_files,pyfax,\
FaxWizardDialog.py \
FaxWizardDialogResources.py \
))
-$(eval $(call gb_Pyuno_set_componentfile_full,pyfax,wizards/com/sun/star/wizards/fax/pyfax,vnd.openoffice.pymodule:wizards.fax,.CallWizard))
+$(eval $(call gb_Pyuno_set_componentfile_full,fax,wizards/com/sun/star/wizards/fax/fax,vnd.openoffice.pymodule:wizards.fax,.CallWizard))
# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/wizards/Pyuno_letter.mk b/wizards/Pyuno_letter.mk
new file mode 100644
index 000000000000..9d420713e75f
--- /dev/null
+++ b/wizards/Pyuno_letter.mk
@@ -0,0 +1,44 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2011 Red Hat, Inc., David Tardon <dtardon@redhat.com>
+# (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_Pyuno_Pyuno,letter,$(SRCDIR)/wizards/com/sun/star/wizards/letter))
+
+$(eval $(call gb_Pyuno_add_files,letter,\
+ CallWizard.py \
+ CGLetter.py \
+ CGLetterWizard.py \
+ CGPaperElementLocation.py \
+ __init__.py \
+ LetterDocument.py \
+ LetterWizardDialogConst.py \
+ LetterWizardDialogImpl.py \
+ LetterWizardDialog.py \
+ LetterWizardDialogResources.py \
+))
+$(eval $(call gb_Pyuno_set_componentfile_full,letter,wizards/com/sun/star/wizards/letter/letter,vnd.openoffice.pymodule:wizards.letter,.CallWizard))
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/wizards/com/sun/star/wizards/README b/wizards/com/sun/star/wizards/README
new file mode 100644
index 000000000000..473282f17dc8
--- /dev/null
+++ b/wizards/com/sun/star/wizards/README
@@ -0,0 +1,19 @@
+To call a wizard remotely you need to:
+
+-> For testing on core:
+ export URE_BOOTSTRAP="file:///home/'USER'/git/libo/install/program/fundamentalrc"
+ export PYTHONPATH=/home/'USER'/git/libo/install/program
+ #and run LibreOffice in listening mode:
+ ./soffice --"accept=socket,host=localhost,port=2002;urp;"
+
+-> For testing on installed LibreOffice:
+ export URE_BOOTSTRAP="file:///usr/lib/libreoffice/program/fundamentalrc"
+ export PYTHONPATH=/usr/lib/libreoffice/basis-link/program
+ #and run LibreOffice in listening mode:
+ soffice --"accept=socket,host=localhost,port=2002;urp;"
+
+-> Launch the wizard from wizards parent folder:
+ python
+ #Fax wizard
+ from wizards.fax.FaxWizardDialogImpl import FaxWizardDialogImpl
+ FaxWizardDialogImpl.main()
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py
index 56b852397129..4f99bfdebc17 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaTemplate.py
@@ -16,12 +16,14 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import uno
-from TemplateConsts import *
+import traceback
from threading import RLock
-from wizards.text.TextDocument import *
-from wizards.common.FileAccess import FileAccess
-from wizards.text.TextSectionHandler import TextSectionHandler
-from TopicsControl import TopicsControl
+from ..text.TextElement import TextElement
+from ..text.TextDocument import TextDocument
+from ..common.FileAccess import FileAccess
+from ..text.TextSectionHandler import TextSectionHandler
+from ..common.Helper import Helper
+
from datetime import date as dateTimeObject
from com.sun.star.text.PlaceholderType import TEXT
@@ -76,7 +78,7 @@ One compolsary Heading row.<br/>
<br/><br/>
To let the template be flexible, we use a kind of "detection": we look where
the items are read the design of each table, reaplying it after writing the
-table.AgendaTemplate.document
+table.AgendaTemplate.xTextDocument
<br/><br/>
A note about threads:<br/>
Many methods here are synchronized, in order to avoid colission made by
@@ -90,7 +92,7 @@ class AgendaTemplate(TextDocument):
_allItems = []
items = []
itemsMap = {}
- document = None
+ templateConsts = None
textSectionHandler = None
template = None
agenda = None
@@ -98,16 +100,17 @@ class AgendaTemplate(TextDocument):
'''constructor. The document is *not* loaded here.
only some formal members are set.
- @param AgendaTemplate.document_ service factory.
+ @param AgendaTemplate.xTextDocument_ service factory.
@param agenda_ the data model (CGAgenda)
@param resources_ resources.
'''
- def __init__(self, xmsf_, agenda_, resources_, listener):
- super(AgendaTemplate,self).__init__(xmsf_,listener, None,
+ def __init__(self, xmsf, agenda, resources, templateConsts, listener):
+ super(AgendaTemplate,self).__init__(xmsf,listener, None,
"WIZARD_LIVE_PREVIEW")
- AgendaTemplate.agenda = agenda_
- self.resources = resources_
+ AgendaTemplate.agenda = agenda
+ AgendaTemplate.templateConsts = templateConsts
+ self.resources = resources
if AgendaTemplate.itemsCache is None:
self.initItemsCache()
@@ -117,7 +120,7 @@ class AgendaTemplate(TextDocument):
@synchronized(lock)
def load(self, templateURL, topics):
AgendaTemplate.template = self.calcTemplateName(templateURL)
- AgendaTemplate.document = self.loadAsPreview(templateURL, False)
+ AgendaTemplate.xTextDocument = self.loadAsPreview(templateURL, False)
self.xFrame.ComponentWindow.Enable = False
self.xTextDocument.lockControllers()
self.initialize()
@@ -194,27 +197,27 @@ class AgendaTemplate(TextDocument):
@classmethod
def isShowItem(self, itemName):
- if itemName == FILLIN_MEETING_TYPE:
+ if itemName == AgendaTemplate.templateConsts.FILLIN_MEETING_TYPE:
return AgendaTemplate.agenda.cp_ShowMeetingType
- elif itemName == FILLIN_READ:
+ elif itemName == AgendaTemplate.templateConsts.FILLIN_READ:
return AgendaTemplate.agenda.cp_ShowRead
- elif itemName == FILLIN_BRING:
+ elif itemName == AgendaTemplate.templateConsts.FILLIN_BRING:
return AgendaTemplate.agenda.cp_ShowBring
- elif itemName == FILLIN_NOTES:
+ elif itemName == AgendaTemplate.templateConsts.FILLIN_NOTES:
return AgendaTemplate.agenda.cp_ShowNotes
- elif itemName == FILLIN_FACILITATOR:
+ elif itemName == AgendaTemplate.templateConsts.FILLIN_FACILITATOR:
return AgendaTemplate.agenda.cp_ShowFacilitator
- elif itemName == FILLIN_TIMEKEEPER:
+ elif itemName == AgendaTemplate.templateConsts.FILLIN_TIMEKEEPER:
return AgendaTemplate.agenda.cp_ShowTimekeeper
- elif itemName == FILLIN_NOTETAKER:
+ elif itemName == AgendaTemplate.templateConsts.FILLIN_NOTETAKER:
return AgendaTemplate.agenda.cp_ShowNotetaker
- elif itemName == FILLIN_PARTICIPANTS:
+ elif itemName == AgendaTemplate.templateConsts.FILLIN_PARTICIPANTS:
return AgendaTemplate.agenda.cp_ShowAttendees
- elif itemName == FILLIN_CALLED_BY:
+ elif itemName == AgendaTemplate.templateConsts.FILLIN_CALLED_BY:
return AgendaTemplate.agenda.cp_ShowCalledBy
- elif itemName == FILLIN_OBSERVERS:
+ elif itemName == AgendaTemplate.templateConsts.FILLIN_OBSERVERS:
return AgendaTemplate.agenda.cp_ShowObservers
- elif itemName == FILLIN_RESOURCE_PERSONS:
+ elif itemName == AgendaTemplate.templateConsts.FILLIN_RESOURCE_PERSONS:
return AgendaTemplate.agenda.cp_ShowResourcePersons
else:
raise ValueError("No such item")
@@ -228,71 +231,85 @@ class AgendaTemplate(TextDocument):
def initItemsCache(self):
AgendaTemplate.itemsCache = {}
# Headings
- AgendaTemplate.itemsCache[FILLIN_MEETING_TYPE] = AgendaItem(
- FILLIN_MEETING_TYPE,
- TextElement (self.resources.itemMeetingType),
- PlaceholderElement(
- self.resources.reschkMeetingTitle_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_BRING] = AgendaItem(
- FILLIN_BRING, TextElement (self.resources.itemBring),
- PlaceholderElement (
- self.resources.reschkBring_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_READ] = AgendaItem (
- FILLIN_READ, TextElement (self.resources.itemRead),
- PlaceholderElement (
- self.resources.reschkRead_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_NOTES] = AgendaItem (
- FILLIN_NOTES, TextElement (self.resources.itemNote),
- PlaceholderElement (
- self.resources.reschkNotes_value,
- self.resources.resPlaceHolderHint, self.xMSF))
+ AgendaTemplate.itemsCache[
+ AgendaTemplate.templateConsts.FILLIN_MEETING_TYPE] = \
+ AgendaItem(AgendaTemplate.templateConsts.FILLIN_MEETING_TYPE,
+ self.resources.itemMeetingType,
+ PlaceholderElement(
+ self.resources.reschkMeetingTitle_value,
+ self.resources.resPlaceHolderHint, self.xMSF))
+ AgendaTemplate.itemsCache[
+ AgendaTemplate.templateConsts.FILLIN_BRING] = \
+ AgendaItem(AgendaTemplate.templateConsts.FILLIN_BRING,
+ self.resources.itemBring,
+ PlaceholderElement (
+ self.resources.reschkBring_value,
+ self.resources.resPlaceHolderHint, self.xMSF))
+ AgendaTemplate.itemsCache[
+ AgendaTemplate.templateConsts.FILLIN_READ] = \
+ AgendaItem (AgendaTemplate.templateConsts.FILLIN_READ,
+ self.resources.itemRead,
+ PlaceholderElement (
+ self.resources.reschkRead_value,
+ self.resources.resPlaceHolderHint, self.xMSF))
+ AgendaTemplate.itemsCache[
+ AgendaTemplate.templateConsts.FILLIN_NOTES] = \
+ AgendaItem (AgendaTemplate.templateConsts.FILLIN_NOTES,
+ self.resources.itemNote,
+ PlaceholderElement (
+ self.resources.reschkNotes_value,
+ self.resources.resPlaceHolderHint, self.xMSF))
# Names
- AgendaTemplate.itemsCache[FILLIN_CALLED_BY] = AgendaItem(
- FILLIN_CALLED_BY,
- TextElement (self.resources.itemCalledBy),
- PlaceholderElement (
- self.resources.reschkConvenedBy_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_FACILITATOR] = AgendaItem(
- FILLIN_FACILITATOR,
- TextElement (self.resources.itemFacilitator),
- PlaceholderElement (
- self.resources.reschkPresiding_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_PARTICIPANTS] = AgendaItem(
- FILLIN_PARTICIPANTS,
- TextElement (self.resources.itemAttendees),
- PlaceholderElement(
- self.resources.reschkAttendees_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_NOTETAKER] = AgendaItem(
- FILLIN_NOTETAKER,
- TextElement(self.resources.itemNotetaker),
- PlaceholderElement(
- self.resources.reschkNoteTaker_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_TIMEKEEPER] = AgendaItem(
- FILLIN_TIMEKEEPER,
- TextElement (self.resources.itemTimekeeper),
- PlaceholderElement(
- self.resources.reschkTimekeeper_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_OBSERVERS] = AgendaItem(
- FILLIN_OBSERVERS,
- TextElement(self.resources.itemObservers),
- PlaceholderElement(
- self.resources.reschkObservers_value,
- self.resources.resPlaceHolderHint, self.xMSF))
- AgendaTemplate.itemsCache[FILLIN_RESOURCE_PERSONS] = AgendaItem(
- FILLIN_RESOURCE_PERSONS,
- TextElement(self.resources.itemResource),
- PlaceholderElement(
- self.resources.reschkResourcePersons_value,
- self.resources.resPlaceHolderHint, self.xMSF))
+ AgendaTemplate.itemsCache[
+ AgendaTemplate.templateConsts.FILLIN_CALLED_BY] = \
+ AgendaItem(AgendaTemplate.templateConsts.FILLIN_CALLED_BY,
+ self.resources.itemCalledBy,
+ PlaceholderElement (
+ self.resources.reschkConvenedBy_value,
+ self.resources.resPlaceHolderHint, self.xMSF))
+ AgendaTemplate.itemsCache[
+ AgendaTemplate.templateConsts.FILLIN_FACILITATOR] = \
+ AgendaItem(AgendaTemplate.templateConsts.FILLIN_FACILITATOR,
+ self.resources.itemFacilitator,
+ PlaceholderElement (
+ self.resources.reschkPresiding_value,
+ self.resources.resPlaceHolderHint, self.xMSF))
+ AgendaTemplate.itemsCache[
+ AgendaTemplate.templateConsts.FILLIN_PARTICIPANTS] = \
+ AgendaItem(AgendaTemplate.templateConsts.FILLIN_PARTICIPANTS,
+ self.resources.itemAttendees,
+ PlaceholderElement(
+ self.resources.reschkAttendees_value,
+ self.resources.resPlaceHolderHint, self.xMSF))
+ AgendaTemplate.itemsCache[
+ AgendaTemplate.templateConsts.FILLIN_NOTETAKER] = \
+ AgendaItem(AgendaTemplate.templateConsts.FILLIN_NOTETAKER,
+ self.resources.itemNotetaker,
+ PlaceholderElement(
+ self.resources.reschkNoteTaker_value,
+ self.resources.resPlaceHolderHint, self.xMSF))
+ AgendaTemplate.itemsCache[
+ AgendaTemplate.templateConsts.FILLIN_TIMEKEEPER] = \
+ AgendaItem(AgendaTemplate.templateConsts.FILLIN_TIMEKEEPER,
+ self.resources.itemTimekeeper,
+ PlaceholderElement(
+ self.resources.reschkTimekeeper_value,
+ self.resources.resPlaceHolderHint, self.xMSF))
+ AgendaTemplate.itemsCache[
+ AgendaTemplate.templateConsts.FILLIN_OBSERVERS] = \
+ AgendaItem(AgendaTemplate.templateConsts.FILLIN_OBSERVERS,
+ self.resources.itemObservers,
+ PlaceholderElement(
+ self.resources.reschkObservers_value,
+ self.resources.resPlaceHolderHint, self.xMSF))
+ AgendaTemplate.itemsCache[
+ AgendaTemplate.templateConsts.FILLIN_RESOURCE_PERSONS] = \
+ AgendaItem(AgendaTemplate.templateConsts.FILLIN_RESOURCE_PERSONS,
+ self.resources.itemResource,
+ PlaceholderElement(
+ self.resources.reschkResourcePersons_value,
+ self.resources.resPlaceHolderHint, self.xMSF))
'''Initializes a template.<br/>
This method does the following tasks:<br/>
@@ -312,22 +329,24 @@ class AgendaTemplate(TextDocument):
and create the date and time formatters.
'''
AgendaTemplate.dateUtils = Helper.DateUtils(
- self.xMSF, AgendaTemplate.document)
+ self.xMSF, AgendaTemplate.xTextDocument)
AgendaTemplate.formatter = AgendaTemplate.dateUtils.formatter
- AgendaTemplate.dateFormat = AgendaTemplate.dateUtils.getFormat(DATE_SYSTEM_LONG)
- AgendaTemplate.timeFormat = AgendaTemplate.dateUtils.getFormat(TIME_HHMM)
+ AgendaTemplate.dateFormat = \
+ AgendaTemplate.dateUtils.getFormat(DATE_SYSTEM_LONG)
+ AgendaTemplate.timeFormat = \
+ AgendaTemplate.dateUtils.getFormat(TIME_HHMM)
'''
get the document properties object.
'''
- self.m_xDocProps = AgendaTemplate.document.DocumentProperties
+ self.m_xDocProps = AgendaTemplate.xTextDocument.DocumentProperties
self.initItemsCache()
- AgendaTemplate._allItems = self.searchFillInItems()
+ AgendaTemplate._allItems = self.searchFillInItems(0)
self.initializeTitles()
self.initializeItemsSections()
AgendaTemplate.textSectionHandler = TextSectionHandler(
- AgendaTemplate.document, AgendaTemplate.document)
+ AgendaTemplate.xTextDocument, AgendaTemplate.xTextDocument)
self.topics = Topics()
del AgendaTemplate._allItems[:]
AgendaTemplate._allItems = None
@@ -338,65 +357,36 @@ class AgendaTemplate(TextDocument):
'''
def initializeTitles(self):
- i = 0
- while i < len(AgendaTemplate._allItems):
- workwith = AgendaTemplate._allItems[i]
- text = workwith.String.lstrip().lower()
- if text == FILLIN_TITLE:
+ auxList = []
+ for i in AgendaTemplate._allItems:
+ text = i.String.lstrip().lower()
+ if text == AgendaTemplate.templateConsts.FILLIN_TITLE:
AgendaTemplate.teTitle = PlaceholderTextElement(
- workwith, self.resources.resPlaceHolderTitle,
+ i, self.resources.resPlaceHolderTitle,
self.resources.resPlaceHolderHint,
- AgendaTemplate.document)
- AgendaTemplate.trTitle = workwith
- del AgendaTemplate._allItems[i]
- i -= 1
- elif text == FILLIN_DATE:
+ AgendaTemplate.xTextDocument)
+ AgendaTemplate.trTitle = i
+ elif text == AgendaTemplate.templateConsts.FILLIN_DATE:
AgendaTemplate.teDate = PlaceholderTextElement(
- workwith, self.resources.resPlaceHolderDate,
+ i, self.resources.resPlaceHolderDate,
self.resources.resPlaceHolderHint,
- AgendaTemplate.document)
- AgendaTemplate.trDate = workwith
- del AgendaTemplate._allItems[i]
- i -= 1
- elif text == FILLIN_TIME:
+ AgendaTemplate.xTextDocument)
+ AgendaTemplate.trDate = i
+ elif text == AgendaTemplate.templateConsts.FILLIN_TIME:
AgendaTemplate.teTime = PlaceholderTextElement(
- workwith, self.resources.resPlaceHolderTime,
+ i, self.resources.resPlaceHolderTime,
self.resources.resPlaceHolderHint,
- AgendaTemplate.document)
- AgendaTemplate.trTime = workwith
- del AgendaTemplate._allItems[i]
- i -= 1
- elif text == FILLIN_LOCATION:
+ AgendaTemplate.xTextDocument)
+ AgendaTemplate.trTime = i
+ elif text == AgendaTemplate.templateConsts.FILLIN_LOCATION:
AgendaTemplate.teLocation = PlaceholderTextElement(
- workwith, self.resources.resPlaceHolderLocation,
+ i, self.resources.resPlaceHolderLocation,
self.resources.resPlaceHolderHint,
- AgendaTemplate.document)
- AgendaTemplate.trLocation = workwith
- del AgendaTemplate._allItems[i]
- i -= 1
- i += 1
-
- '''
- searches the document for items in the format "&gt;*&lt;"
- @return a vector containing the XTextRanges of the found items
- '''
-
- def searchFillInItems(self):
- try:
- sd = AgendaTemplate.document.createSearchDescriptor()
- sd.setSearchString("<[^>]+>")
- sd.setPropertyValue("SearchRegularExpression", True)
- sd.setPropertyValue("SearchWords", True)
- ia = AgendaTemplate.document.findAll(sd)
- try:
- l = [ia.getByIndex(i) for i in xrange(ia.Count)]
- except Exception, ex:
- print "Nonfatal Error in finding fillins."
- return l
- except Exception, ex:
- traceback.print_exc()
- raise AttributeError (
- "Fatal Error: Loading template failed: searching fillins failed")
+ AgendaTemplate.xTextDocument)
+ AgendaTemplate.trLocation = i
+ else:
+ auxList.append(i)
+ AgendaTemplate._allItems = auxList
'''
analyze the item sections in the template.
@@ -404,7 +394,8 @@ class AgendaTemplate(TextDocument):
'''
def initializeItemsSections(self):
- sections = self.getSections(AgendaTemplate.document, SECTION_ITEMS)
+ sections = self.getSections(
+ AgendaTemplate.xTextDocument, AgendaTemplate.templateConsts.SECTION_ITEMS)
# for each section - there is a table...
self.itemsTables = []
for i in sections:
@@ -424,11 +415,11 @@ class AgendaTemplate(TextDocument):
@classmethod
def getSection(self, name):
- return getattr(AgendaTemplate.document.TextSections, name)
+ return getattr(AgendaTemplate.xTextDocument.TextSections, name)
@classmethod
def getTable(self, name):
- return getattr(AgendaTemplate.document.TextTables, name)
+ return getattr(AgendaTemplate.xTextDocument.TextTables, name)
@classmethod
@synchronized(lock)
@@ -458,9 +449,9 @@ class AgendaTemplate(TextDocument):
@classmethod
def writeTitle(self, te, tr, text):
if text is None:
- te.text = ""
+ te.placeHolderText = ""
else:
- te.text = text
+ te.placeHolderText = text
te.write(tr)
@classmethod
@@ -482,7 +473,8 @@ class AgendaTemplate(TextDocument):
time = int(s)
t = ((time / float(1000000)) / float(24)) \
+ ((time % 1000000) / float(1000000)) / float(35)
- return self.formatter.convertNumberToString(AgendaTemplate.timeFormat, t)
+ return self.formatter.convertNumberToString(
+ AgendaTemplate.timeFormat, t)
@synchronized(lock)
def finish(self, topics):
@@ -493,11 +485,12 @@ class AgendaTemplate(TextDocument):
'''
hidden sections exist when an item's section is hidden because the
user specified not to display any items which it contains.
- When finishing the wizard removes this sections entireley from the document.
+ When finishing the wizard removes this sections
+ entirely from the document.
'''
def deleteHiddenSections(self):
- allSections = AgendaTemplate.document.TextSections.ElementNames
+ allSections = AgendaTemplate.xTextDocument.TextSections.ElementNames
try:
for i in allSections:
self.section = self.getSection(i)
@@ -525,7 +518,8 @@ class AgendaTemplate(TextDocument):
if not AgendaTemplate.agenda.cp_IncludeMinutes \
or len(topicsData) <= 1:
try:
- minutesAllSection = self.getSection(SECTION_MINUTES_ALL)
+ minutesAllSection = self.getSection(
+ AgendaTemplate.templateConsts.SECTION_MINUTES_ALL)
minutesAllSection.Anchor.String = ""
except Exception, ex:
traceback.print_exc()
@@ -535,23 +529,27 @@ class AgendaTemplate(TextDocument):
try:
topicStartTime = int(AgendaTemplate.agenda.cp_Time)
#first I replace the minutes titles...
- AgendaTemplate.items = self.searchFillInItems()
+ AgendaTemplate.items = TextDocument.searchFillInItems()
itemIndex = 0
for item in self.items:
itemText = item.String.lstrip().lower()
- if itemText == FILLIN_MINUTES_TITLE:
+ if itemText == \
+ AgendaTemplate.templateConsts.FILLIN_MINUTES_TITLE:
self.fillMinutesItem(
item, AgendaTemplate.agenda.cp_Title,
self.resources.resPlaceHolderTitle)
- elif itemText == FILLIN_MINUTES_LOCATION:
+ elif itemText == \
+ AgendaTemplate.templateConsts.FILLIN_MINUTES_LOCATION:
self.fillMinutesItem(
item, AgendaTemplate.agenda.cp_Location,
self.resources.resPlaceHolderLocation)
- elif itemText == FILLIN_MINUTES_DATE:
+ elif itemText == \
+ AgendaTemplate.templateConsts.FILLIN_MINUTES_DATE:
self.fillMinutesItem(
item, getDateString(AgendaTemplate.agenda.cp_Date),
self.resources.resPlaceHolderDate)
- elif itemText == FILLIN_MINUTES_TIME:
+ elif itemText == \
+ AgendaTemplate.templateConsts.FILLIN_MINUTES_TIME:
self.fillMinutesItem(
item, getTimeString(AgendaTemplate.agenda.cp_Time),
self.resources.resPlaceHolderTime)
@@ -566,17 +564,21 @@ class AgendaTemplate(TextDocument):
for i in xrange(len(topicsData) - 1):
topic = topicsData[i]
- AgendaTemplate.items = self.searchFillInItems()
+ AgendaTemplate.items = TextDocument.searchFillInItems()
itemIndex = 0
for item in self.items:
itemText = item.String.lstrip().lower()
- if itemText == FILLIN_MINUTE_NUM:
+ if itemText == \
+ AgendaTemplate.templateConsts.FILLIN_MINUTE_NUM:
fillMinutesItem(item, topic[0].Value, "")
- elif itemText == FILLIN_MINUTE_TOPIC:
+ elif itemText == \
+ AgendaTemplate.templateConsts.FILLIN_MINUTE_TOPIC:
fillMinutesItem(item, topic[1].Value, "")
- elif itemText == FILLIN_MINUTE_RESPONSIBLE:
+ elif itemText == \
+ AgendaTemplate.templateConsts.FILLIN_MINUTE_RESPONSIBLE:
fillMinutesItem(item, topic[2].Value, "")
- elif itemText == FILLIN_MINUTE_TIME:
+ elif itemText == \
+ AgendaTemplate.templateConsts.FILLIN_MINUTE_TIME:
topicTime = 0
try:
topicTime = topic[3].Value
@@ -597,11 +599,12 @@ class AgendaTemplate(TextDocument):
fillMinutesItem(item, time, "")
AgendaTemplate.textSectionHandler.removeTextSectionbyName(
- SECTION_MINUTES)
+ AgendaTemplate.templateConsts.SECTION_MINUTES)
# after the last section we do not insert a one.
if i < len(topicsData) - 2:
AgendaTemplate.textSectionHandler.insertTextSection(
- SECTION_MINUTES, AgendaTemplate.template, False)
+ AgendaTemplate.templateConsts.SECTION_MINUTES,
+ AgendaTemplate.template, False)
except Exception, ex:
traceback.print_exc()
@@ -623,7 +626,7 @@ class AgendaTemplate(TextDocument):
if text == None or text == "":
if placeholder != None and not placeholder == "":
placeHolder = createPlaceHolder(
- AgendaTemplate.document, placeholder,
+ AgendaTemplate.xTextDocument, placeholder,
self.resources.resPlaceHolderHint)
try:
Range.Start.Text.insertTextContent(
@@ -632,7 +635,7 @@ class AgendaTemplate(TextDocument):
traceback.print_exc()
'''creates a placeholder field with the given text and given hint.
- @param AgendaTemplate.document service factory
+ @param AgendaTemplate.xTextDocument service factory
@param ph place holder text
@param hint hint text
@return the place holder field.
@@ -860,12 +863,13 @@ class Topics(object):
self.firstRowFormat = []
# This is the topics table. say hallo :-)
try:
- Topics.table = AgendaTemplate.getTable(SECTION_TOPICS)
+ Topics.table = AgendaTemplate.getTable(
+ AgendaTemplate.templateConsts.SECTION_TOPICS)
except Exception, ex:
traceback.print_exc()
raise AttributeError (
"Fatal error while loading template: table " + \
- SECTION_TOPICS + " could not load.")
+ AgendaTemplate.templateConsts.SECTION_TOPICS + " could not load.")
'''
first I store all <*> ranges
@@ -898,18 +902,16 @@ class Topics(object):
# analyze the structure of the topic rows.
while not cursor.RangeName == afterLastCell:
cell = Topics.table.getCellByName(cursor.RangeName)
- # first I store the content and para style of the cell
- ae = TextElement(cell)
# if the cell contains a relevant <...>
# i add the text element to the hash,
# so it's text can be updated later.
try:
if items[cell.CellName] is not None:
- self.topicItems[cell.String.lower().lstrip()] = ae
+ self.topicItems[cell.String.lower().lstrip()] = cell
except KeyError:
pass
- Topics.topicCells.append(ae)
+ Topics.topicCells.append(cell)
# goto next cell.
cursor.goRight(1, False)
'''
@@ -917,13 +919,17 @@ class Topics(object):
'''
Topics.numCell = Topics.topicCells.index(
- self.topicItems[FILLIN_TOPIC_NUMBER])
+ self.topicItems[
+ AgendaTemplate.templateConsts.FILLIN_TOPIC_NUMBER])
Topics.topicCell = Topics.topicCells.index(
- self.topicItems[FILLIN_TOPIC_TOPIC])
+ self.topicItems[
+ AgendaTemplate.templateConsts.FILLIN_TOPIC_TOPIC])
Topics.responsibleCell = Topics.topicCells.index(
- self.topicItems[FILLIN_TOPIC_RESPONSIBLE])
+ self.topicItems[
+ AgendaTemplate.templateConsts.FILLIN_TOPIC_RESPONSIBLE])
Topics.timeCell = Topics.topicCells.index(
- self.topicItems[FILLIN_TOPIC_TIME])
+ self.topicItems[
+ AgendaTemplate.templateConsts.FILLIN_TOPIC_TIME])
'''@param topic the topic number to write
@param data the data of the topic.
@@ -1126,20 +1132,6 @@ class Topics(object):
cursor.goRight(1, False)
'''
-A basic implementation of AgendaElement:
-writes a String to the given XText/XTextRange, and applies
-a ParaStyle to it (using the parent class).
-@author rp143992
-'''
-class TextElement(object):
-
- def __init__(self, text_):
- self.text = text_
-
- def write(self, textRange):
- textRange.String = self.text
-
-'''
A Text element which, if the text to write is empty (null or "")
inserts a placeholder instead.
@author rp143992
@@ -1148,18 +1140,18 @@ inserts a placeholder instead.
class PlaceholderTextElement(TextElement):
def __init__(self, textRange, placeHolderText_, hint_, xmsf_):
- super(PlaceholderTextElement,self).__init__(textRange)
+ super(PlaceholderTextElement,self).__init__(textRange, "")
- self.placeHolderText = placeHolderText_
+ self.text = placeHolderText_
self.hint = hint_
self.xmsf = xmsf_
def write(self, textRange):
- textRange.String = self.text
- if self.text is None or self.text == "":
+ textRange.String = self.placeHolderText
+ if self.placeHolderText is None or self.placeHolderText == "":
try:
xTextContent = AgendaTemplate.createPlaceHolder(
- self.xmsf, self.placeHolderText, self.hint)
+ self.xmsf, self.text, self.hint)
textRange.Text.insertTextContent(
textRange.Start, xTextContent, True)
except Exception, ex:
@@ -1181,7 +1173,7 @@ class PlaceholderElement(object):
def write(self, textRange):
try:
xTextContent = AgendaTemplate.createPlaceHolder(
- AgendaTemplate.document, self.placeHolderText, self.hint)
+ AgendaTemplate.xTextDocument, self.placeHolderText, self.hint)
textRange.Text.insertTextContent(
textRange.Start, xTextContent, True)
except Exception, ex:
@@ -1205,7 +1197,7 @@ class AgendaItem(object):
def write(self, tableCursor):
cellname = tableCursor.RangeName
cell = ItemsTable.table.getCellByName(cellname)
- self.textElement.write(cell)
+ cell.String = self.textElement
tableCursor.goRight(1, False)
#second field is actually always null...
# this is a preparation for adding placeholders.
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
index 82b29b5cf07c..605444f0a4a8 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialog.py
@@ -15,9 +15,9 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-from wizards.ui.WizardDialog import *
-from wizards.ui.WizardDialog import *
-from AgendaWizardDialogConst import *
+from wizards.ui.WizardDialog import WizardDialog, uno, Helper, UIConsts, \
+ PropertyNames
+from AgendaWizardDialogConst import AgendaWizardDialogConst, HID
from AgendaWizardDialogResources import AgendaWizardDialogResources
from com.sun.star.awt.FontUnderline import SINGLE
@@ -26,23 +26,22 @@ class AgendaWizardDialog(WizardDialog):
def __init__(self, xmsf):
super(AgendaWizardDialog,self).__init__(xmsf, HID )
+
#Load Resources
self.resources = AgendaWizardDialogResources(xmsf)
+
#set dialog properties...
Helper.setUnoPropertyValues(
- self.xDialogModel, ("Closeable",
+ self.xDialogModel, ("Closeable",
PropertyNames.PROPERTY_HEIGHT,
- "Moveable",
- PropertyNames.PROPERTY_POSITION_X,
+ "Moveable", PropertyNames.PROPERTY_POSITION_X,
PropertyNames.PROPERTY_POSITION_Y,
PropertyNames.PROPERTY_STEP,
PropertyNames.PROPERTY_TABINDEX,
- "Title",
- PropertyNames.PROPERTY_WIDTH),
+ "Title", PropertyNames.PROPERTY_WIDTH),
(True, 210, True, 200, 52, 1, 1,
self.resources.resAgendaWizardDialog_title,310))
- self.IMGHELP1_HID = ""
self.PROPS_LIST = ("Dropdown",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
@@ -105,16 +104,17 @@ class AgendaWizardDialog(WizardDialog):
PropertyNames.PROPERTY_IMAGEURL,
PropertyNames.PROPERTY_POSITION_X,
PropertyNames.PROPERTY_POSITION_Y,
- "ScaleImage",
- PropertyNames.PROPERTY_STEP,
+ "ScaleImage", PropertyNames.PROPERTY_STEP,
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH)
+
self.fontDescriptor1 = \
uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
self.fontDescriptor2 = \
uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
self.fontDescriptor4 = \
uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
+
#Set member- FontDescriptors...
self.fontDescriptor1.Weight = 150
self.fontDescriptor1.Underline = SINGLE
@@ -125,35 +125,40 @@ class AgendaWizardDialog(WizardDialog):
build components
'''
def buildStep1(self):
- self.insertLabel("lblTitle1", self.PROPS_LABEL_B, (self.fontDescriptor4,
- 16, self.resources.reslblTitle1_value, True, 91, 8, 1, 100,212))
+ self.insertLabel("lblTitle1", self.PROPS_LABEL_B,
+ (self.fontDescriptor4, 16, self.resources.reslblTitle1_value,
+ True, 91, 8, 1, 100,212))
self.insertLabel("lblPageDesign", self.PROPS_TEXT,
- (8, self.resources.reslblPageDesign_value, 97, 32, 1, 101, 66))
+ (8, self.resources.reslblPageDesign_value, 97, 32, 1, 101, 66))
self.listPageDesign = self.insertListBox("listPageDesign",
- None, LISTPAGEDESIGN_ACTION_PERFORMED, self.PROPS_LIST,
- (True, 12, LISTPAGEDESIGN_HID, 166, 30, 1, 102, 70), self)
+ None, AgendaWizardDialogConst.LISTPAGEDESIGN_ACTION_PERFORMED,
+ self.PROPS_LIST,
+ (True, 12, AgendaWizardDialogConst.LISTPAGEDESIGN_HID,
+ 166, 30, 1, 102, 70), self)
self.chkMinutes = self.insertCheckBox("chkMinutes", None,
- self.PROPS_CHECK, (9, CHKMINUTES_HID,
+ self.PROPS_CHECK, (9, AgendaWizardDialogConst.CHKMINUTES_HID,
self.resources.reschkMinutes_value, 97, 50, 0, 1, 103, 203), self)
self.insertImage("imgHelp1", self.PROPS_IMAGE,
- (0, 10, self.IMGHELP1_HID,
- INFO_IMAGE_URL, 92,
- 145, False, 1, 104, 10))
+ (0, 10, "", UIConsts.INFOIMAGEURL, 92, 145, False, 1, 104, 10))
self.insertLabel("lblHelp1", self.PROPS_TEXTAREA,
- (39, self.resources.reslblHelp1_value, True,104,145, 1, 105,199))
+ (39, self.resources.reslblHelp1_value,
+ True, 104, 145, 1, 105, 199))
def buildStep2(self):
self.insertLabel("lblTitle2", self.PROPS_LABEL_B,
- (self.fontDescriptor4, 16,
- self.resources.reslblTitle2_value, True,91, 8, 2, 200,212))
+ (self.fontDescriptor4, 16, self.resources.reslblTitle2_value,
+ True, 91, 8, 2, 200, 212))
self.insertLabel("lblDate", self.PROPS_TEXT,
(8, self.resources.reslblDate_value, 97, 32, 2, 201,66))
self.txtDate = self.insertDateField(
- "txtDate", TXTDATE_TEXT_CHANGED, self.PROPS_LIST,
- (True, 12, TXTDATE_HID,166,30, 2, 202,70), self)
+ "txtDate", AgendaWizardDialogConst.TXTDATE_TEXT_CHANGED,
+ self.PROPS_LIST,
+ (True, 12, AgendaWizardDialogConst.TXTDATE_HID,
+ 166,30, 2, 202, 70), self)
self.insertLabel("lblTime", self.PROPS_TEXT,
(8, self.resources.reslblTime_value, 97, 50, 2, 203, 66))
- self.txtTime = self.insertTimeField("txtTime", TXTTIME_TEXT_CHANGED,
+ self.txtTime = self.insertTimeField("txtTime",
+ AgendaWizardDialogConst.TXTTIME_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_POSITION_X,
@@ -162,11 +167,12 @@ class AgendaWizardDialog(WizardDialog):
"StrictFormat",
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
- (12, TXTTIME_HID, 166, 48, 2, True, 204,70), self)
+ (12, AgendaWizardDialogConst.TXTTIME_HID,
+ 166, 48, 2, True, 204, 70), self)
self.insertLabel("lblTitle", self.PROPS_TEXT,
- (8, self.resources.reslblTitle_value, 97, 68, 2, 205,66))
+ (8, self.resources.reslblTitle_value, 97, 68, 2, 205, 66))
self.txtTitle = self.insertTextField(
- "txtTitle", TXTTITLE_TEXT_CHANGED,
+ "txtTitle", AgendaWizardDialogConst.TXTTITLE_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_MULTILINE,
@@ -175,11 +181,12 @@ class AgendaWizardDialog(WizardDialog):
PropertyNames.PROPERTY_STEP,
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
- (26, TXTTITLE_HID, True, 166, 66, 2, 206, 138), self)
+ (26, AgendaWizardDialogConst.TXTTITLE_HID,
+ True, 166, 66, 2, 206, 138), self)
self.insertLabel("lblLocation", self.PROPS_TEXT,
(8, self.resources.reslblLocation_value, 97, 100, 2, 207, 66))
self.cbLocation = self.insertTextField(
- "cbLocation", TXTLOCATION_TEXT_CHANGED,
+ "cbLocation", AgendaWizardDialogConst.TXTLOCATION_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_MULTILINE,
@@ -188,37 +195,40 @@ class AgendaWizardDialog(WizardDialog):
PropertyNames.PROPERTY_STEP,
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
- (34, CBLOCATION_HID, True, 166,98, 2, 208, 138), self)
+ (34, AgendaWizardDialogConst.CBLOCATION_HID,
+ True, 166,98, 2, 208, 138), self)
self.insertImage("imgHelp2", self.PROPS_IMAGE,
- (0, 10, self.IMGHELP1_HID,
- INFO_IMAGE_URL,
- 92, 145, False, 2, 209, 10))
+ (0, 10, "", UIConsts.INFOIMAGEURL, 92, 145, False, 2, 209, 10))
self.insertLabel("lblHelp2", self.PROPS_TEXTAREA,
- (39, self.resources.reslblHelp2_value, True, 104, 145, 2, 210, 199))
+ (39, self.resources.reslblHelp2_value,
+ True, 104, 145, 2, 210, 199))
def buildStep3(self):
self.insertLabel("lblTitle3", self.PROPS_LABEL_B,
(self.fontDescriptor4, 16, self.resources.reslblTitle3_value,
True, 91, 8, 3, 300,212))
self.chkMeetingTitle = self.insertCheckBox("chkMeetingTitle",
- CHKUSEMEETINGTYPE_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKMEETINGTITLE_HID, self.resources.reschkMeetingTitle_value,
+ AgendaWizardDialogConst.CHKUSEMEETINGTYPE_ITEM_CHANGED,
+ self.PROPS_CHECK,
+ (8, AgendaWizardDialogConst.CHKMEETINGTITLE_HID,
+ self.resources.reschkMeetingTitle_value,
97, 32, 1, 3, 301, 69), self)
self.chkRead = self.insertCheckBox("chkRead",
- CHKUSEREAD_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKREAD_HID, self.resources.reschkRead_value,
- 97, 46, 0, 3, 302, 162), self)
+ AgendaWizardDialogConst.CHKUSEREAD_ITEM_CHANGED, self.PROPS_CHECK,
+ (8, AgendaWizardDialogConst.CHKREAD_HID,
+ self.resources.reschkRead_value, 97, 46, 0, 3, 302, 162), self)
self.chkBring = self.insertCheckBox("chkBring",
- CHKUSEBRING_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKBRING_HID, self.resources.reschkBring_value,
+ AgendaWizardDialogConst.CHKUSEBRING_ITEM_CHANGED, self.PROPS_CHECK,
+ (8, AgendaWizardDialogConst.CHKBRING_HID,
+ self.resources.reschkBring_value,
97, 60, 0, 3, 303, 162), self)
self.chkNotes = self.insertCheckBox("chkNotes",
- CHKUSENOTES_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKNOTES_HID, self.resources.reschkNotes_value,
+ AgendaWizardDialogConst.CHKUSENOTES_ITEM_CHANGED, self.PROPS_CHECK,
+ (8, AgendaWizardDialogConst.CHKNOTES_HID,
+ self.resources.reschkNotes_value,
97, 74, 1, 3, 304, 160), self)
self.insertImage("imgHelp3", self.PROPS_IMAGE, (0, 10,
- self.IMGHELP1_HID, INFO_IMAGE_URL,
- 92, 145, False, 3, 305, 10))
+ "", UIConsts.INFOIMAGEURL, 92, 145, False, 3, 305, 10))
self.insertLabel("lblHelp3", self.PROPS_TEXTAREA,
(39, self.resources.reslblHelp3_value, True,104, 145, 3, 306, 199))
@@ -227,35 +237,49 @@ class AgendaWizardDialog(WizardDialog):
(self.fontDescriptor4, 16, self.resources.reslblTitle5_value,
True, 91, 8, 4, 400, 212))
self.chkConvenedBy = self.insertCheckBox("chkConvenedBy",
- CHKUSECALLEDBYNAME_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKCONVENEDBY_HID, self.resources.reschkConvenedBy_value,
+ AgendaWizardDialogConst.CHKUSECALLEDBYNAME_ITEM_CHANGED,
+ self.PROPS_CHECK,
+ (8, AgendaWizardDialogConst.CHKCONVENEDBY_HID,
+ self.resources.reschkConvenedBy_value,
97, 32, 1, 4, 401, 150), self)
self.chkPresiding = self.insertCheckBox("chkPresiding",
- CHKUSEFACILITATOR_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKPRESIDING_HID, self.resources.reschkPresiding_value,
+ AgendaWizardDialogConst.CHKUSEFACILITATOR_ITEM_CHANGED,
+ self.PROPS_CHECK,
+ (8, AgendaWizardDialogConst.CHKPRESIDING_HID,
+ self.resources.reschkPresiding_value,
97, 46, 0, 4, 402, 150), self)
self.chkNoteTaker = self.insertCheckBox("chkNoteTaker",
- CHKUSENOTETAKER_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKNOTETAKER_HID, self.resources.reschkNoteTaker_value,
+ AgendaWizardDialogConst.CHKUSENOTETAKER_ITEM_CHANGED,
+ self.PROPS_CHECK,
+ (8, AgendaWizardDialogConst.CHKNOTETAKER_HID,
+ self.resources.reschkNoteTaker_value,
97, 60, 0, 4, 403, 150), self)
self.chkTimekeeper = self.insertCheckBox("chkTimekeeper",
- CHKUSETIMEKEEPER_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKTIMEKEEPER_HID, self.resources.reschkTimekeeper_value,
+ AgendaWizardDialogConst.CHKUSETIMEKEEPER_ITEM_CHANGED,
+ self.PROPS_CHECK,
+ (8, AgendaWizardDialogConst.CHKTIMEKEEPER_HID,
+ self.resources.reschkTimekeeper_value,
97, 74, 0, 4, 404, 150), self)
self.chkAttendees = self.insertCheckBox("chkAttendees",
- CHKUSEATTENDEES_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKATTENDEES_HID, self.resources.reschkAttendees_value,
+ AgendaWizardDialogConst.CHKUSEATTENDEES_ITEM_CHANGED,
+ self.PROPS_CHECK,
+ (8, AgendaWizardDialogConst.CHKATTENDEES_HID,
+ self.resources.reschkAttendees_value,
97, 88, 1, 4, 405, 150), self)
self.chkObservers = self.insertCheckBox("chkObservers",
- CHKUSEOBSERVERS_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKOBSERVERS_HID, self.resources.reschkObservers_value,
+ AgendaWizardDialogConst.CHKUSEOBSERVERS_ITEM_CHANGED,
+ self.PROPS_CHECK,
+ (8, AgendaWizardDialogConst.CHKOBSERVERS_HID,
+ self.resources.reschkObservers_value,
97, 102, 0, 4, 406, 150), self)
self.chkResourcePersons = self.insertCheckBox("chkResourcePersons",
- CHKUSERESOURCEPERSONS_ITEM_CHANGED, self.PROPS_CHECK,
- (8, CHKRESOURCEPERSONS_HID, self.resources.reschkResourcePersons_value,
+ AgendaWizardDialogConst.CHKUSERESOURCEPERSONS_ITEM_CHANGED,
+ self.PROPS_CHECK,
+ (8, AgendaWizardDialogConst.CHKRESOURCEPERSONS_HID,
+ self.resources.reschkResourcePersons_value,
97, 116, 0, 4, 407, 150), self)
self.insertImage("imgHelp4", self.PROPS_IMAGE,
- (0, 10, self.IMGHELP1_HID, INFO_IMAGE_URL,
+ (0, 10, "", UIConsts.INFOIMAGEURL,
92, 145, False, 4, 408, 10))
self.insertLabel("lblHelp4", self.PROPS_TEXTAREA,
(39, self.resources.reslblHelp4_value, True, 104, 145, 4, 409, 199))
@@ -270,18 +294,22 @@ class AgendaWizardDialog(WizardDialog):
(8, self.resources.reslblResponsible_value, 195, 28, 5, 72, 502))
self.insertLabel("lblDuration", self.PROPS_TEXT,
(8, self.resources.reslblDuration_value, 267, 28, 5, 73, 503))
- self.btnInsert = self.insertButton("btnInsert", BTNINSERT_ACTION_PERFORMED,
- self.PROPS_BUTTON, (14, BTNINSERT_HID,
+ self.btnInsert = self.insertButton("btnInsert",
+ AgendaWizardDialogConst.BTNINSERT_ACTION_PERFORMED,
+ self.PROPS_BUTTON, (14, AgendaWizardDialogConst.BTNINSERT_HID,
self.resources.resButtonInsert, 92, 136, 5, 580, 40), self)
- self.btnRemove = self.insertButton("btnRemove", BTNREMOVE_ACTION_PERFORMED,
- self.PROPS_BUTTON, (14, BTNREMOVE_HID,
- self.resources.resButtonRemove, 134, 136, 5, 581, 40), self)
- self.btnUp = self.insertButton("btnUp", BTNUP_ACTION_PERFORMED,
- self.PROPS_BUTTON, (14, BTNUP_HID,
- self.resources.resButtonUp, 202, 136, 5, 582, 50), self)
- self.btnDown = self.insertButton("btnDown", BTNDOWN_ACTION_PERFORMED,
- self.PROPS_BUTTON, (14, BTNDOWN_HID,
- self.resources.resButtonDown, 254, 136, 5, 583, 50), self)
+ self.btnRemove = self.insertButton("btnRemove",
+ AgendaWizardDialogConst.BTNREMOVE_ACTION_PERFORMED,
+ self.PROPS_BUTTON, (14, AgendaWizardDialogConst.BTNREMOVE_HID,
+ self.resources.resButtonRemove, 134, 136, 5, 581, 40), self)
+ self.btnUp = self.insertButton("btnUp",
+ AgendaWizardDialogConst.BTNUP_ACTION_PERFORMED,
+ self.PROPS_BUTTON, (14, AgendaWizardDialogConst.BTNUP_HID,
+ self.resources.resButtonUp, 202, 136, 5, 582, 50), self)
+ self.btnDown = self.insertButton("btnDown",
+ AgendaWizardDialogConst.BTNDOWN_ACTION_PERFORMED,
+ self.PROPS_BUTTON, (14, AgendaWizardDialogConst.BTNDOWN_HID,
+ self.resources.resButtonDown, 254, 136, 5, 583, 50), self)
def buildStep6(self):
self.insertLabel("lblTitle6", self.PROPS_LABEL_B,
@@ -294,18 +322,21 @@ class AgendaWizardDialog(WizardDialog):
(8, self.resources.reslblTemplateName_value,
97, 62, 6, 602, 101))
self.txtTemplateName = self.insertTextField("txtTemplateName",
- TXTTEMPLATENAME_TEXT_CHANGED, self.PROPS_X,
- (12, TXTTEMPLATENAME_HID, 202, 60, 6, 603, 100), self)
+ AgendaWizardDialogConst.TXTTEMPLATENAME_TEXT_CHANGED,
+ self.PROPS_X,
+ (12, AgendaWizardDialogConst.TXTTEMPLATENAME_HID,
+ 202, 60, 6, 603, 100), self)
self.insertLabel("lblProceed", self.PROPS_TEXT,
(8, self.resources.reslblProceed_value, 97, 101, 6, 607,204))
self.optCreateAgenda = self.insertRadioButton("optCreateAgenda", None,
- self.PROPS_CHECK, (8, OPTCREATEAGENDA_HID,
+ self.PROPS_CHECK, (8, AgendaWizardDialogConst.OPTCREATEAGENDA_HID,
self.resources.resoptCreateAgenda_value,
103, 113, 1, 6, 608, 198), self)
self.optMakeChanges = self.insertRadioButton("optMakeChanges", None,
- self.PROPS_BUTTON, (8, OPTMAKECHANGES_HID,
- self.resources.resoptMakeChanges_value, 103, 125, 6, 609, 198), self)
- self.insertImage("imgHelp6", self.PROPS_IMAGE, (0, 10, self.IMGHELP1_HID,
- INFO_IMAGE_URL, 92, 145, False, 6, 610, 10))
+ self.PROPS_BUTTON, (8, AgendaWizardDialogConst.OPTMAKECHANGES_HID,
+ self.resources.resoptMakeChanges_value,
+ 103, 125, 6, 609, 198), self)
+ self.insertImage("imgHelp6", self.PROPS_IMAGE, (0, 10, "",
+ UIConsts.INFOIMAGEURL, 92, 145, False, 6, 610, 10))
self.insertLabel("lblHelp6", self.PROPS_TEXTAREA,
(39, self.resources.reslblHelp6_value, True, 104, 145, 6, 611, 199))
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py
index d97ddf96fd15..4e8e7cb3cc57 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogConst.py
@@ -17,64 +17,62 @@
#
from wizards.common.HelpIds import HelpIds
-TXTTITLE_TEXT_CHANGED = "txtTitleTextChanged"
-TXTDATE_TEXT_CHANGED = "txtDateTextChanged"
-TXTTIME_TEXT_CHANGED = "txtTimeTextChanged"
-TXTLOCATION_TEXT_CHANGED = "txtLocationTextChanged"
-CHKMINUTES_ITEM_CHANGED = "chkMinutesItemChanged"
-CHKUSEMEETINGTYPE_ITEM_CHANGED = "chkUseMeetingTypeItemChanged"
-CHKUSEREAD_ITEM_CHANGED = "chkUseReadItemChanged"
-CHKUSEBRING_ITEM_CHANGED = "chkUseBringItemChanged"
-CHKUSENOTES_ITEM_CHANGED = "chkUseNotesItemChanged"
-CHKUSECALLEDBYNAME_ITEM_CHANGED = "chkUseCalledByItemChanged"
-CHKUSEFACILITATOR_ITEM_CHANGED = "chkUseFacilitatorItemChanged"
-CHKUSENOTETAKER_ITEM_CHANGED = "chkUseNoteTakerItemChanged"
-CHKUSETIMEKEEPER_ITEM_CHANGED = "chkUseTimeKeeperItemChanged"
-CHKUSEATTENDEES_ITEM_CHANGED = "chkUseAttendeesItemChanged"
-CHKUSEOBSERVERS_ITEM_CHANGED = "chkUseObserversItemChanged"
-CHKUSERESOURCEPERSONS_ITEM_CHANGED = "chkUseResourcePersonsItemChanged"
-LISTPAGEDESIGN_ACTION_PERFORMED = "pageDesignChanged"
-TXTTEMPLATENAME_TEXT_CHANGED = "templateTitleChanged"
-BTNTEMPLATEPATH_ACTION_PERFORMED = "saveAs"
-BTNINSERT_ACTION_PERFORMED = "insertRow"
-BTNREMOVE_ACTION_PERFORMED = "removeRow"
-BTNUP_ACTION_PERFORMED = "rowUp"
-BTNDOWN_ACTION_PERFORMED = "rowDown"
-
-INFO_IMAGE_URL = "private:resource/dbu/image/19205"
-
HID = 41051
-LISTPAGEDESIGN_HID = HelpIds.getHelpIdString(HID + 6)
-CHKMINUTES_HID = HelpIds.getHelpIdString(HID + 7)
-TXTTIME_HID = HelpIds.getHelpIdString(HID + 8)
-TXTDATE_HID = HelpIds.getHelpIdString(HID + 9)
-TXTTITLE_HID = HelpIds.getHelpIdString(HID + 10)
-CBLOCATION_HID = HelpIds.getHelpIdString(HID + 11)
+class AgendaWizardDialogConst:
+
+ TXTTITLE_TEXT_CHANGED = "txtTitleTextChanged"
+ TXTDATE_TEXT_CHANGED = "txtDateTextChanged"
+ TXTTIME_TEXT_CHANGED = "txtTimeTextChanged"
+ TXTLOCATION_TEXT_CHANGED = "txtLocationTextChanged"
+ CHKMINUTES_ITEM_CHANGED = "chkMinutesItemChanged"
+ CHKUSEMEETINGTYPE_ITEM_CHANGED = "chkUseMeetingTypeItemChanged"
+ CHKUSEREAD_ITEM_CHANGED = "chkUseReadItemChanged"
+ CHKUSEBRING_ITEM_CHANGED = "chkUseBringItemChanged"
+ CHKUSENOTES_ITEM_CHANGED = "chkUseNotesItemChanged"
+ CHKUSECALLEDBYNAME_ITEM_CHANGED = "chkUseCalledByItemChanged"
+ CHKUSEFACILITATOR_ITEM_CHANGED = "chkUseFacilitatorItemChanged"
+ CHKUSENOTETAKER_ITEM_CHANGED = "chkUseNoteTakerItemChanged"
+ CHKUSETIMEKEEPER_ITEM_CHANGED = "chkUseTimeKeeperItemChanged"
+ CHKUSEATTENDEES_ITEM_CHANGED = "chkUseAttendeesItemChanged"
+ CHKUSEOBSERVERS_ITEM_CHANGED = "chkUseObserversItemChanged"
+ CHKUSERESOURCEPERSONS_ITEM_CHANGED = "chkUseResourcePersonsItemChanged"
+ LISTPAGEDESIGN_ACTION_PERFORMED = "pageDesignChanged"
+ TXTTEMPLATENAME_TEXT_CHANGED = "templateTitleChanged"
+ BTNTEMPLATEPATH_ACTION_PERFORMED = "saveAs"
+ BTNINSERT_ACTION_PERFORMED = "insertRow"
+ BTNREMOVE_ACTION_PERFORMED = "removeRow"
+ BTNUP_ACTION_PERFORMED = "rowUp"
+ BTNDOWN_ACTION_PERFORMED = "rowDown"
-CHKMEETINGTITLE_HID = HelpIds.getHelpIdString(HID + 12)
-CHKREAD_HID = HelpIds.getHelpIdString(HID + 13)
-CHKBRING_HID = HelpIds.getHelpIdString(HID + 14)
-CHKNOTES_HID = HelpIds.getHelpIdString(HID + 15)
+ LISTPAGEDESIGN_HID = HelpIds.getHelpIdString(HID + 6)
+ CHKMINUTES_HID = HelpIds.getHelpIdString(HID + 7)
+ TXTTIME_HID = HelpIds.getHelpIdString(HID + 8)
+ TXTDATE_HID = HelpIds.getHelpIdString(HID + 9)
+ TXTTITLE_HID = HelpIds.getHelpIdString(HID + 10)
+ CBLOCATION_HID = HelpIds.getHelpIdString(HID + 11)
-CHKCONVENEDBY_HID = HelpIds.getHelpIdString(HID + 16)
-CHKPRESIDING_HID = HelpIds.getHelpIdString(HID + 17)
-CHKNOTETAKER_HID = HelpIds.getHelpIdString(HID + 18)
-CHKTIMEKEEPER_HID = HelpIds.getHelpIdString(HID + 19)
-CHKATTENDEES_HID = HelpIds.getHelpIdString(HID + 20)
-CHKOBSERVERS_HID = HelpIds.getHelpIdString(HID + 21)
-CHKRESOURCEPERSONS_HID = HelpIds.getHelpIdString(HID + 22)
+ CHKMEETINGTITLE_HID = HelpIds.getHelpIdString(HID + 12)
+ CHKREAD_HID = HelpIds.getHelpIdString(HID + 13)
+ CHKBRING_HID = HelpIds.getHelpIdString(HID + 14)
+ CHKNOTES_HID = HelpIds.getHelpIdString(HID + 15)
-TXTTEMPLATENAME_HID = HelpIds.getHelpIdString(HID + 23)
-TXTTEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 24)
-BTNTEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 25)
+ CHKCONVENEDBY_HID = HelpIds.getHelpIdString(HID + 16)
+ CHKPRESIDING_HID = HelpIds.getHelpIdString(HID + 17)
+ CHKNOTETAKER_HID = HelpIds.getHelpIdString(HID + 18)
+ CHKTIMEKEEPER_HID = HelpIds.getHelpIdString(HID + 19)
+ CHKATTENDEES_HID = HelpIds.getHelpIdString(HID + 20)
+ CHKOBSERVERS_HID = HelpIds.getHelpIdString(HID + 21)
+ CHKRESOURCEPERSONS_HID = HelpIds.getHelpIdString(HID + 22)
-OPTCREATEAGENDA_HID = HelpIds.getHelpIdString(HID + 26)
-OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 27)
+ TXTTEMPLATENAME_HID = HelpIds.getHelpIdString(HID + 23)
+ TXTTEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 24)
+ BTNTEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 25)
-BTNINSERT_HID = HelpIds.getHelpIdString(HID + 28)
-BTNREMOVE_HID = HelpIds.getHelpIdString(HID + 29)
-BTNUP_HID = HelpIds.getHelpIdString(HID + 30)
-BTNDOWN_HID = HelpIds.getHelpIdString(HID + 31)
+ OPTCREATEAGENDA_HID = HelpIds.getHelpIdString(HID + 26)
+ OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 27)
-LAST_HID = HID + 32
+ BTNINSERT_HID = HelpIds.getHelpIdString(HID + 28)
+ BTNREMOVE_HID = HelpIds.getHelpIdString(HID + 29)
+ BTNUP_HID = HelpIds.getHelpIdString(HID + 30)
+ BTNDOWN_HID = HelpIds.getHelpIdString(HID + 31)
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
index 8420680f82d1..dd09c33a7377 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
@@ -15,14 +15,21 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-from AgendaWizardDialog import *
-from AgendaTemplate import *
-from CGAgenda import CGAgenda
-from wizards.ui.PathSelection import PathSelection
-from wizards.ui.event.UnoDataAware import UnoDataAware
-from wizards.ui.event.RadioDataAware import RadioDataAware
-from wizards.common.NoValidPathException import NoValidPathException
-from wizards.common.SystemDialog import SystemDialog
+import traceback
+from .AgendaWizardDialog import AgendaWizardDialog
+from .AgendaWizardDialogConst import HID
+from .AgendaTemplate import AgendaTemplate, FileAccess
+from .TemplateConsts import TemplateConsts
+from .TopicsControl import TopicsControl
+from .CGAgenda import CGAgenda
+from ..ui.PathSelection import PathSelection
+from ..ui.event.UnoDataAware import UnoDataAware
+from ..ui.event.RadioDataAware import RadioDataAware
+from ..common.NoValidPathException import NoValidPathException
+from ..common.SystemDialog import SystemDialog
+from ..common.Desktop import Desktop
+from ..common.HelpIds import HelpIds
+from ..common.Configuration import Configuration
from com.sun.star.view.DocumentZoomType import OPTIMAL
from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO
@@ -43,33 +50,21 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
def leaveStep(self, OldStep, NewStep):
pass
- '''
- used in developement to start the wizard
- '''
-
@classmethod
- def main(self, args):
- ConnectStr = \
- "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
+ def main(self):
+ #Call the wizard remotely(see README)
try:
+ ConnectStr = \
+ "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
xLocMSF = Desktop.connect(ConnectStr)
- wizard = AgendaWizardDialogImpl(xLocMSF)
- wizard.startWizard()
- except Exception, exception:
- traceback.print_exc()
-
- '''
- read the configuration data, open the specified template,
- initialize the template controller (AgendaTemplate) and
- set the status of the displayed template to the one
- read from the configuration.
- build the dialog.
- Synchronize the dialog to the same status (read from
- the configuration).
- show the dialog.
- '''
-
- def startWizard(self):
+ lw = AgendaWizardDialogImpl(xLocMSF)
+ lw.startWizard(xLocMSF)
+ except Exception as e:
+ print ("Wizard failure exception " + str(type(e)) +
+ " message " + str(e) + " args " + str(e.args) +
+ traceback.format_exc())
+
+ def startWizard(self, xMSF):
self.running = True
try:
#Number of steps on WizardDialog
@@ -77,8 +72,10 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
# initialize the agenda template
self.agenda = CGAgenda()
+ self.templateConsts = TemplateConsts
self.agendaTemplate = AgendaTemplate(
- self.xMSF, self.agenda, self.resources, self)
+ self.xMSF, self.agenda, self.resources,
+ self.templateConsts, self)
# build the dialog.
self.drawNaviBar()
@@ -134,8 +131,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
self.myPathSelection.sDefaultDirectory = self.sUserTemplatePath
self.myPathSelection.sDefaultName = "myAgendaTemplate.ott"
self.myPathSelection.sDefaultFilter = "writer8_template"
- self.myPathSelection.addSelectionListener(
- self.myPathSelectionListener())
+ self.myPathSelection.addSelectionListener(self)
def initializePaths(self):
try:
@@ -173,7 +169,8 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
self.agenda.readConfiguration(root, "cp_")
self.setControlProperty(
- "listPageDesign", "StringItemList", tuple(self.agendaTemplates[0]))
+ "listPageDesign", "StringItemList",
+ tuple(self.agendaTemplates.keys()))
self.checkSavePath()
UnoDataAware.attachListBox(
self.agenda, "cp_AgendaType", self.listPageDesign, True).updateUI()
@@ -271,7 +268,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
if AgendaWizardDialogImpl.pageDesign is not SelectedItemPos:
AgendaWizardDialogImpl.pageDesign = SelectedItemPos
self.agendaTemplate.load(
- self.agendaTemplates[1][SelectedItemPos],
+ self.agendaTemplates.values()[SelectedItemPos],
self.topicsControl.scrollfields)
except Exception:
traceback.print_exc()
@@ -302,37 +299,37 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
AgendaTemplate.agenda.cp_IncludeMinutes = bool(self.chkMinutes.State)
def chkUseMeetingTypeItemChanged(self):
- AgendaTemplate.redraw(FILLIN_MEETING_TYPE)
+ AgendaTemplate.redraw(self.templateConsts.FILLIN_MEETING_TYPE)
def chkUseReadItemChanged(self):
- AgendaTemplate.redraw(FILLIN_READ)
+ AgendaTemplate.redraw(self.templateConsts.FILLIN_READ)
def chkUseBringItemChanged(self):
- AgendaTemplate.redraw(FILLIN_BRING)
+ AgendaTemplate.redraw(self.templateConsts.FILLIN_BRING)
def chkUseNotesItemChanged(self):
- AgendaTemplate.redraw(FILLIN_NOTES)
+ AgendaTemplate.redraw(self.templateConsts.FILLIN_NOTES)
def chkUseCalledByItemChanged(self):
- AgendaTemplate.redraw(FILLIN_CALLED_BY)
+ AgendaTemplate.redraw(self.templateConsts.FILLIN_CALLED_BY)
def chkUseFacilitatorItemChanged(self):
- AgendaTemplate.redraw(FILLIN_FACILITATOR)
+ AgendaTemplate.redraw(self.templateConsts.FILLIN_FACILITATOR)
def chkUseNoteTakerItemChanged(self):
- AgendaTemplate.redraw(FILLIN_NOTETAKER)
+ AgendaTemplate.redraw(self.templateConsts.FILLIN_NOTETAKER)
def chkUseTimeKeeperItemChanged(self):
- AgendaTemplate.redraw(FILLIN_TIMEKEEPER)
+ AgendaTemplate.redraw(self.templateConsts.FILLIN_TIMEKEEPER)
def chkUseAttendeesItemChanged(self):
- AgendaTemplate.redraw(FILLIN_PARTICIPANTS)
+ AgendaTemplate.redraw(self.templateConsts.FILLIN_PARTICIPANTS)
def chkUseObserversItemChanged(self):
- AgendaTemplate.redraw(FILLIN_OBSERVERS)
+ AgendaTemplate.redraw(self.templateConsts.FILLIN_OBSERVERS)
def chkUseResourcePersonsItemChanged(self):
- AgendaTemplate.redraw(FILLIN_RESOURCE_PERSONS)
+ AgendaTemplate.redraw(self.templateConsts.FILLIN_RESOURCE_PERSONS)
'''
convenience method.
@@ -422,7 +419,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
if fileAccess.exists(self.sPath, True):
answer = SystemDialog.showMessageBox(
self.xMSF, "MessBox", YES_NO + DEF_NO,
- self.resources.resFileExists,
+ self.resources.resOverwriteWarning,
self.xUnoDialog.Peer)
if answer == 3:
# user said: no, do not overwrite
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
index f8b9971973cf..67056fb5a5ef 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
@@ -18,9 +18,14 @@
from wizards.common.Resource import Resource
class AgendaWizardDialogResources(Resource):
+
MODULE_NAME = "dbw"
RID_AGENDAWIZARDDIALOG_START = 5000
RID_COMMON_START = 500
+ SECTION_ITEMS = "AGENDA_ITEMS"
+ SECTION_TOPICS = "AGENDA_TOPICS"
+ SECTION_MINUTES_ALL = "MINUTES_ALL"
+ SECTION_MINUTES = "MINUTES"
def __init__(self, xmsf):
super(AgendaWizardDialogResources,self).__init__(xmsf,
@@ -164,7 +169,8 @@ class AgendaWizardDialogResources(Resource):
self.resButtonUp = self.getResText(
AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 70)
self.resButtonDown = self.getResText(
- AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 71)
+ AgendaWizardDialogResources.RID_AGENDAWIZARDDIALOG_START + 71)
- self.resFileExists = self.getResText(
+ #Common Resources
+ self.resOverwriteWarning = self.getResText(
AgendaWizardDialogResources.RID_COMMON_START + 19)
diff --git a/wizards/com/sun/star/wizards/agenda/CallWizard.py b/wizards/com/sun/star/wizards/agenda/CallWizard.py
new file mode 100644
index 000000000000..5c76249d4c7f
--- /dev/null
+++ b/wizards/com/sun/star/wizards/agenda/CallWizard.py
@@ -0,0 +1,50 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+import unohelper
+import traceback
+
+from .AgendaWizardDialogImpl import AgendaWizardDialogImpl
+
+from com.sun.star.task import XJobExecutor
+
+# implement a UNO component by deriving from the standard unohelper.Base class
+# and from the interface(s) you want to implement.
+class CallWizard(unohelper.Base, XJobExecutor):
+ def __init__(self, ctx):
+ # store the component context for later use
+ self.ctx = ctx
+
+ def trigger(self, args):
+ try:
+ fw = AgendaWizardDialogImpl(self.ctx.ServiceManager)
+ fw.startWizard(self.ctx.ServiceManager)
+ except Exception as e:
+ print ("Wizard failure exception " + str(type(e)) +
+ " message " + str(e) + " args " + str(e.args) +
+ traceback.format_exc())
+
+# pythonloader looks for a static g_ImplementationHelper variable
+g_ImplementationHelper = unohelper.ImplementationHelper()
+
+g_ImplementationHelper.addImplementation( \
+ CallWizard, # UNO object class
+ "com.sun.star.wizards.agenda.CallWizard", # implemenation name
+ ("com.sun.star.task.Job",),) # list of implemented services
+ # (the only service)
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/wizards/com/sun/star/wizards/agenda/TemplateConsts.py b/wizards/com/sun/star/wizards/agenda/TemplateConsts.py
index 1736fce642d7..8d9f6697708d 100644
--- a/wizards/com/sun/star/wizards/agenda/TemplateConsts.py
+++ b/wizards/com/sun/star/wizards/agenda/TemplateConsts.py
@@ -15,76 +15,78 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-FILLIN_TITLE = "<title>"
-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>"
+class TemplateConsts:
+ FILLIN_TITLE = "<title>"
+ 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.
-'''
-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>"
+ headings...
+ '''
+ FILLIN_MEETING_TYPE = "<meeting-type>"
+ FILLIN_BRING = "<bring>"
+ FILLIN_READ = "<read>"
+ FILLIN_NOTES = "<notes>"
+ '''
+ names...
+ '''
+ FILLIN_CALLED_BY = "<called-by>"
+ FILLIN_FACILITATOR = "<facilitator>"
+ FILLIN_PARTICIPANTS = "<attendees>"
+ FILLIN_NOTETAKER = "<notetaker>"
+ FILLIN_TIMEKEEPER = "<timekeeper>"
+ FILLIN_OBSERVERS = "<observers>"
+ FILLIN_RESOURCE_PERSONS = "<resource-persons>"
+
+ '''
+ Fillins for the topic table.
+ These strings will be searched inside the topic table as
+ part of detecting its structure.
+ '''
+ FILLIN_TOPIC_NUMBER = "<num>"
+ FILLIN_TOPIC_TOPIC = "<topic>"
+ FILLIN_TOPIC_RESPONSIBLE = "<responsible>"
+ FILLIN_TOPIC_TIME = "<topic-time>"
+ '''
+ fillins for minutes.
+ These will be searched in the minutes section and will be replaced
+ with the appropriate data.
+ '''
+ FILLIN_MINUTES_TITLE = "<minutes-title>"
+ FILLIN_MINUTES_LOCATION = "<minutes-location>"
+ FILLIN_MINUTES_DATE = "<minutes-date>"
+ FILLIN_MINUTES_TIME = "<minutes-time>"
+ '''
+ Minutes-topic fillins
+ These will be searched in the minutes-child-section, and
+ will be replaced with topic data.
+ '''
+ FILLIN_MINUTE_NUM = "<mnum>"
+ FILLIN_MINUTE_TOPIC = "<mtopic>"
+ FILLIN_MINUTE_RESPONSIBLE = "<mresponsible>"
+ FILLIN_MINUTE_TIME = "<mtime>"
diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.py b/wizards/com/sun/star/wizards/agenda/TopicsControl.py
index 5e996ea40a9e..9a18ec710821 100644
--- a/wizards/com/sun/star/wizards/agenda/TopicsControl.py
+++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.py
@@ -16,11 +16,12 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
from threading import RLock
-from CGTopic import CGTopic
-from wizards.ui.ControlScroller import *
-from AgendaWizardDialogConst import LAST_HID
-from wizards.common.Properties import Properties
-from wizards.ui.event.CommonListener import FocusListenerProcAdapter, KeyListenerProcAdapter
+from .CGTopic import CGTopic
+from ..ui.ControlScroller import *
+from .AgendaWizardDialogConst import HID
+from ..common.Properties import Properties
+from ..ui.event.CommonListener import FocusListenerProcAdapter, \
+ KeyListenerProcAdapter
from com.sun.star.awt.Key import DOWN, UP, TAB
from com.sun.star.awt.KeyModifier import SHIFT, MOD1
@@ -115,7 +116,7 @@ class TopicsControl(ControlScroller):
def __init__(self, dialog, xmsf, agenda):
try:
super(TopicsControl, self).__init__(
- dialog, xmsf, 5, 92, 38, 212, 5, 18, LAST_HID)
+ dialog, xmsf, 5, 92, 38, 212, 5, 18, HID + 32)
self.initializeScrollFields(agenda)
# set some focus listeners for TAB scroll down and up...
# prepare scroll down on tab press...
diff --git a/wizards/com/sun/star/wizards/common/Configuration.py b/wizards/com/sun/star/wizards/common/Configuration.py
index 8f505582c662..69e150c8f7be 100644
--- a/wizards/com/sun/star/wizards/common/Configuration.py
+++ b/wizards/com/sun/star/wizards/common/Configuration.py
@@ -20,21 +20,8 @@ import traceback
from .PropertyNames import PropertyNames
from .Helper import Helper
-'''
-This class gives access to the OO configuration api.
-It contains 4 get and 4 set convenience methods for getting and settings
-properties in the configuration. <br/>
-For the get methods, two parameters must be given: name and parent, where
-name is the name of the property, parent is a HierarchyElement
-(::com::sun::star::configuration::HierarchyElement)<br/>
-The get and set methods support hieryrchical property names like
-"options/gridX". <br/>
-NOTE: not yet supported, but sometime later,
-If you will ommit the "parent" parameter, then the "name" parameter must be
-in hierarchy form from the root of the registry.
-'''
-
class Configuration(object):
+ '''This class gives access to the OO configuration api.'''
@classmethod
def getConfigurationRoot(self, xmsf, sPath, updateable):
@@ -59,174 +46,3 @@ class Configuration(object):
sView = "com.sun.star.configuration.ConfigurationAccess"
return oConfigProvider.createInstanceWithArguments(sView, tuple(args))
-
- @classmethod
- def getProductName(self, xMSF):
- try:
- oProdNameAccess = self.getConfigurationRoot(xMSF,
- "org.openoffice.Setup/Product", False)
- ProductName = Helper.getUnoObjectbyName(oProdNameAccess, "ooName")
- return ProductName
- except Exception:
- traceback.print_exc()
- return None
-
- @classmethod
- def getOfficeLocaleString(self, xMSF):
- sLocale = ""
- try:
- aLocLocale = Locale.Locale()
- oMasterKey = self.getConfigurationRoot(xMSF,
- "org.openoffice.Setup/L10N/", False)
- sLocale = (String)
- Helper.getUnoObjectbyName(oMasterKey, "ooLocale")
- except Exception, exception:
- traceback.print_exc()
-
- return sLocale
-
- @classmethod
- def getOfficeLocale(self, xMSF):
- aLocLocale = Locale.Locale()
- sLocale = getOfficeLocaleString(xMSF)
- sLocaleList = JavaTools.ArrayoutofString(sLocale, "-")
- aLocLocale.Language = sLocaleList[0]
- if sLocaleList.length > 1:
- aLocLocale.Country = sLocaleList[1]
-
- return aLocLocale
-
- @classmethod
- def getOfficeLinguistic(self, xMSF):
- try:
- oMasterKey = self.getConfigurationRoot(xMSF,
- "org.openoffice.Setup/L10N/", False)
- sLinguistic = Helper.getUnoObjectbyName(oMasterKey, "ooLocale")
- return sLinguistic
- except Exception, exception:
- traceback.print_exc()
- return None
-
- @classmethod
- def removeNode(self, configView, name, xmsf=None):
- commitChanges = False
- if xmsf is not None:
- configView = self.getConfigurationRoot(xmsf, path, True)
- commit = True
-
- if configView.hasByName(name):
- configView.removeByName(name)
-
- if commitChanges:
- configView.commitChanges()
-
- @classmethod
- def updateConfiguration(self, xmsf, path, name, node, param):
- view = self.getConfigurationRoot(xmsf, path, True)
- addConfigNode(path, name)
- node.writeConfiguration(view, param)
- view.commitChanges()
-
- @classmethod
- def getNodeDisplayNames(self, _xNameAccessNode):
- snames = None
- return getNodeChildNames(_xNameAccessNode,
- PropertyNames.PROPERTY_NAME)
-
- @classmethod
- def getNodeChildNames(self, xNameAccessNode, _schildname):
- snames = None
- try:
- snames = xNameAccessNode.getElementNames()
- sdisplaynames = range(snames.length)
- i = 0
- while i < snames.length:
- oContent = Helper.getUnoPropertyValue(
- xNameAccessNode.getByName(snames[i]), _schildname)
- if not AnyConverter.isVoid(oContent):
- sdisplaynames[i] = (String)
- Helper.getUnoPropertyValue(xNameAccessNode.getByName(
- snames[i]), _schildname)
- else:
- sdisplaynames[i] = snames[i]
-
- i += 1
- return sdisplaynames
- except Exception, e:
- traceback.print_exc()
- return snames
-
- @classmethod
- def getChildNodebyIndex(self, _xNameAccess, _index):
- try:
- snames = _xNameAccess.getElementNames()
- oNode = _xNameAccess.getByName(snames[_index])
- return oNode
- except Exception, e:
- traceback.print_exc()
- return None
-
- @classmethod
- def getChildNodebyName(self, _xNameAccessNode, _SubNodeName):
- try:
- if _xNameAccessNode.hasByName(_SubNodeName):
- return _xNameAccessNode.getByName(_SubNodeName)
-
- except Exception, e:
- traceback.print_exc()
-
- return None
-
- @classmethod
- def getChildNodebyDisplayName(self, _xNameAccessNode, _displayname):
- snames = None
- return getChildNodebyDisplayName(_xNameAccessNode, _displayname,
- PropertyNames.PROPERTY_NAME)
-
- @classmethod
- def getChildNodebyDisplayName(self, _xNameAccessNode, _displayname,
- _nodename):
-
- snames = None
- try:
- snames = _xNameAccessNode.getElementNames()
- sdisplaynames = range(snames.length)
- i = 0
- while i < snames.length:
- curdisplayname = Helper.getUnoPropertyValue(
- _xNameAccessNode.getByName(snames[i]), _nodename)
- if curdisplayname.equals(_displayname):
- return _xNameAccessNode.getByName(snames[i])
-
- i += 1
- except Exception, e:
- traceback.print_exc()
-
- return None
-
- @classmethod
- def getChildNodebyDisplayName(self, _xMSF, _aLocale, _xNameAccessNode,
- _displayname, _nodename, _nmaxcharcount):
-
- snames = None
- try:
- snames = _xNameAccessNode.getElementNames()
- sdisplaynames = range(snames.length)
- i = 0
- while i < snames.length:
- curdisplayname = Helper.getUnoPropertyValue(
- _xNameAccessNode.getByName(snames[i]), _nodename)
- if (_nmaxcharcount > 0) and (_nmaxcharcount < \
- curdisplayname.length()):
- curdisplayname = curdisplayname.substring(0,
- _nmaxcharcount)
-
- curdisplayname = Desktop.removeSpecialCharacters(_xMSF,
- _aLocale, curdisplayname)
- if curdisplayname.equals(_displayname):
- return _xNameAccessNode.getByName(snames[i])
-
- i += 1
- except Exception, e:
- traceback.print_exc()
- return None
diff --git a/wizards/com/sun/star/wizards/common/Desktop.py b/wizards/com/sun/star/wizards/common/Desktop.py
index 914be171e04b..1876bfd716b9 100644
--- a/wizards/com/sun/star/wizards/common/Desktop.py
+++ b/wizards/com/sun/star/wizards/common/Desktop.py
@@ -17,7 +17,6 @@
#
import uno
import traceback
-from .NoValidPathException import NoValidPathException
from com.sun.star.frame.FrameSearchFlag import ALL, PARENT
from com.sun.star.util import URL
@@ -130,39 +129,3 @@ class Desktop(object):
def getUniqueName(self, xElementContainer, sElementName):
sIncSuffix = self.getIncrementSuffix(xElementContainer, sElementName)
return sElementName + sIncSuffix
-
-class OfficePathRetriever:
-
- def OfficePathRetriever(self, xMSF):
- try:
- TemplatePath = FileAccess.getOfficePath(xMSF,
- "Template", "share", "/wizard")
- UserTemplatePath = FileAccess.getOfficePath(xMSF,
- "Template", "user", "")
- BitmapPath = FileAccess.combinePaths(xMSF, TemplatePath,
- "/../wizard/bitmap")
- WorkPath = FileAccess.getOfficePath(xMSF,
- "Work", "", "")
- except NoValidPathException, nopathexception:
- pass
-
- @classmethod
- def getTemplatePath(self, _xMSF):
- sTemplatePath = ""
- try:
- sTemplatePath = FileAccess.getOfficePath(_xMSF,
- "Template", "share", "/wizard")
- except NoValidPathException, nopathexception:
- pass
- return sTemplatePath
-
- @classmethod
- def getBitmapPath(self, _xMSF):
- sBitmapPath = ""
- try:
- sBitmapPath = FileAccess.combinePaths(_xMSF,
- getTemplatePath(_xMSF), "/../wizard/bitmap")
- except NoValidPathException, nopathexception:
- pass
-
- return sBitmapPath
diff --git a/wizards/com/sun/star/wizards/common/FileAccess.py b/wizards/com/sun/star/wizards/common/FileAccess.py
index 0364a0ddcc99..49acdeb063ce 100644
--- a/wizards/com/sun/star/wizards/common/FileAccess.py
+++ b/wizards/com/sun/star/wizards/common/FileAccess.py
@@ -307,7 +307,7 @@ class FileAccess(object):
return False
@classmethod
- def getFolderTitles(self, xMSF, FilterName, FolderName, resDict):
+ def getFolderTitles(self, xMSF, FilterName, FolderName, resDict=None):
#Returns and ordered dict containing the template's name and path
LocLayoutFiles = {}
@@ -326,11 +326,14 @@ class FileAccess(object):
fileName = self.getFilename(i)
if FilterName is None or fileName.startswith(FilterName):
xDocInterface.loadFromMedium(i, tuple())
- if xDocInterface.Title in resDict:
- # localise string at runtime
- title = resDict[xDocInterface.Title]
- else:
+ if resDict is None:
title = xDocInterface.Title
+ else:
+ if xDocInterface.Title in resDict:
+ # localise string at runtime
+ title = resDict[xDocInterface.Title]
+ else:
+ title = xDocInterface.Title
LocLayoutFiles[title] = i
except Exception, exception:
diff --git a/wizards/com/sun/star/wizards/common/NumberFormatter.py b/wizards/com/sun/star/wizards/common/NumberFormatter.py
index 67d9d987d2fd..5a9bb158dad3 100644
--- a/wizards/com/sun/star/wizards/common/NumberFormatter.py
+++ b/wizards/com/sun/star/wizards/common/NumberFormatter.py
@@ -18,7 +18,7 @@
import traceback
from com.sun.star.lang import Locale
from com.sun.star.util.NumberFormat import \
- DATE, LOGICAL, DATETIME, TEXT, NUMBER
+ DATE, LOGICAL, DATETIME, TEXT, NUMBER
class NumberFormatter(object):
diff --git a/wizards/com/sun/star/wizards/common/Resource.py b/wizards/com/sun/star/wizards/common/Resource.py
index 68f60a767522..fc607ea3a826 100644
--- a/wizards/com/sun/star/wizards/common/Resource.py
+++ b/wizards/com/sun/star/wizards/common/Resource.py
@@ -17,7 +17,6 @@
#
import traceback
from .Configuration import Configuration
-from .SystemDialog import SystemDialog
from com.sun.star.awt.VclWindowPeerAttribute import OK
@@ -34,9 +33,6 @@ class Resource(object):
raise Exception ("could not initialize ResourceIndexAccess")
self.xStringIndexAccess = xResource.getByName("String")
- self.xStringListIndexAccess = xResource.getByName("StringList")
- if self.xStringListIndexAccess is None:
- raise Exception ("could not initialize xStringListIndexAccess")
if self.xStringIndexAccess is None:
raise Exception ("could not initialize xStringIndexAccess")
@@ -52,13 +48,6 @@ class Resource(object):
traceback.print_exc()
raise ValueError("Resource with ID not " + str(nID) + " not found")
- def getStringList(self, nID):
- try:
- return self.xStringListIndexAccess.getByIndex(nID)
- except Exception, exception:
- traceback.print_exc()
- raise ValueError("Resource with ID not " + str(nID) + " not found")
-
def getResArray(self, nID, iCount):
try:
ResArray = range(iCount)
@@ -73,9 +62,7 @@ class Resource(object):
@classmethod
def showCommonResourceError(self, xMSF):
- ProductName = Configuration.getProductName(xMSF)
+ from .SystemDialog import SystemDialog
sError = "The files required could not be found.\n" + \
- "Please start the %PRODUCTNAME Setup and choose 'Repair'."
- sError = sError.replace("%PRODUCTNAME", ProductName)
+ "Please start the LibreOffice Setup and choose 'Repair'."
SystemDialog.showMessageBox(xMSF, "ErrorBox", OK, sError)
-
diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py b/wizards/com/sun/star/wizards/common/SystemDialog.py
index 3a89f9837ecf..6030d572099b 100644
--- a/wizards/com/sun/star/wizards/common/SystemDialog.py
+++ b/wizards/com/sun/star/wizards/common/SystemDialog.py
@@ -16,7 +16,6 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import traceback
-from .Configuration import Configuration
from .Desktop import Desktop
from .Helper import Helper
@@ -37,9 +36,9 @@ class SystemDialog(object):
self.systemDialog = xMSF.createInstance(ServiceName)
self.xStringSubstitution = self.createStringSubstitution(xMSF)
- # Add a name textbox to the filepicker
+ # Add a name textbox to the filepicker
if self.systemDialog is not None:
- self.systemDialog.initialize((Type,))
+ self.systemDialog.initialize((Type,))
except Exception, exception:
traceback.print_exc()
@@ -141,25 +140,12 @@ class SystemDialog(object):
traceback.print_exc()
'''
- converts the name returned from getFilterUIName_(...) so the
- product name is correct.
- @param filterName
- @return
- '''
-
- def getFilterUIName(self, filterName):
- prodName = Configuration.getProductName(self.xMSF)
- s = [[self.getFilterUIName_(filterName)]]
- s[0][0] = s[0][0].replace("%productname%", prodName)
- return s[0][0]
-
- '''
note the result should go through conversion of the product name.
@param filterName
@return the UI localized name of the given filter name.
'''
- def getFilterUIName_(self, filterName):
+ def getFilterUIName(self, filterName):
try:
oFactory = self.xMSF.createInstance(
"com.sun.star.document.FilterFactory")
@@ -167,7 +153,7 @@ class SystemDialog(object):
xPropertyValue = list(oObject)
for i in xPropertyValue:
if i is not None and i.Name == "UIName":
- return str(i.Value)
+ return str(i.Value).replace("%productname%", "LibreOffice")
raise NullPointerException(
"UIName property not found for Filter " + filterName);
@@ -178,10 +164,10 @@ class SystemDialog(object):
@classmethod
def showErrorBox(self, xMSF, ResName, ResPrefix,
ResID, AddTag=None, AddString=None):
- ProductName = Configuration.getProductName(xMSF)
+ from .Resource import Resource
oResource = Resource(xMSF, ResPrefix)
sErrorMessage = oResource.getResText(ResID)
- sErrorMessage = sErrorMessage.replace( ProductName, "%PRODUCTNAME")
+ sErrorMessage = sErrorMessage.replace("%PRODUCTNAME", "LibreOffice" )
sErrorMessage = sErrorMessage.replace(str(13), "<BR>")
if AddTag and AddString:
sErrorMessage = sErrorMessage.replace( AddString, AddTag)
diff --git a/wizards/com/sun/star/wizards/fax/CGFax.java b/wizards/com/sun/star/wizards/fax/CGFax.java
deleted file mode 100644
index 52e895a5e720..000000000000
--- a/wizards/com/sun/star/wizards/fax/CGFax.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.fax;
-
-import com.sun.star.wizards.common.ConfigGroup;
-
-public class CGFax extends ConfigGroup
-{
-
- public int cp_Style;
- public boolean cp_PrintCompanyLogo;
- public boolean cp_PrintDate;
- public boolean cp_PrintSubjectLine;
- public boolean cp_PrintSalutation;
- public boolean cp_PrintCommunicationType;
- public boolean cp_PrintGreeting;
- public boolean cp_PrintFooter;
- public String cp_CommunicationType;
- public String cp_Salutation;
- public String cp_Greeting;
- public int cp_SenderAddressType;
- public String cp_SenderCompanyName;
- public String cp_SenderStreet;
- public String cp_SenderPostCode;
- public String cp_SenderState;
- public String cp_SenderCity;
- public String cp_SenderFax;
- public int cp_ReceiverAddressType;
- public String cp_Footer;
- public boolean cp_FooterOnlySecondPage;
- public boolean cp_FooterPageNumbers;
- public int cp_CreationType;
- public String cp_TemplateName;
- public String cp_TemplatePath;
-}
diff --git a/wizards/com/sun/star/wizards/fax/CGFaxWizard.java b/wizards/com/sun/star/wizards/fax/CGFaxWizard.java
deleted file mode 100644
index 588c2faff47b..000000000000
--- a/wizards/com/sun/star/wizards/fax/CGFaxWizard.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.fax;
-
-import com.sun.star.wizards.common.ConfigGroup;
-
-public class CGFaxWizard extends ConfigGroup
-{
-
- public int cp_FaxType;
- public CGFax cp_BusinessFax = new CGFax();
- public CGFax cp_PrivateFax = new CGFax();
-}
diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.java b/wizards/com/sun/star/wizards/fax/CallWizard.java
deleted file mode 100644
index 64e341f0f7d1..000000000000
--- a/wizards/com/sun/star/wizards/fax/CallWizard.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.fax;
-
-import com.sun.star.beans.XPropertyAccess;
-import com.sun.star.comp.loader.FactoryHelper;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.task.XJob;
-import com.sun.star.task.XJobExecutor;
-import com.sun.star.uno.Type;
-import com.sun.star.wizards.common.PropertyNames;
-
-/**
- * This class capsulates the class, that implements the minimal component, a factory for
- * creating the service (<CODE>__getServiceFactory</CODE>).
- */
-public class CallWizard
-{
-
- /**
- * Gives a factory for creating the service. This method is called by the
- * <code>JavaLoader</code>
- *
- * <p></p>
- *
- * @param stringImplementationName The implementation name of the component.
- * @param xMSF The service manager, who gives access to every known service.
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single registry key accessible.
- *
- * @return Returns a <code>XSingleServiceFactory</code> for creating the component.
- *
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleServiceFactory __getServiceFactory(String stringImplementationName, XMultiServiceFactory xMSF, XRegistryKey xregistrykey)
- {
- XSingleServiceFactory xsingleservicefactory = null;
-
- if (stringImplementationName.equals(WizardImplementation.class.getName()))
- {
- xsingleservicefactory = FactoryHelper.getServiceFactory(WizardImplementation.class, WizardImplementation.__serviceName, xMSF, xregistrykey);
- }
-
- return xsingleservicefactory;
- }
-
- /**
- * This class implements the component. At least the interfaces XServiceInfo,
- * XTypeProvider, and XInitialization should be provided by the service.
- */
- public static class WizardImplementation implements XInitialization, XTypeProvider, XServiceInfo, XJobExecutor
- {
-
- /**
- * The constructor of the inner class has a XMultiServiceFactory parameter.
- *
- * @param xmultiservicefactoryInitialization A special service factory could be
- * introduced while initializing.
- */
- public WizardImplementation(XMultiServiceFactory xmultiservicefactoryInitialization)
- {
- xmultiservicefactory = xmultiservicefactoryInitialization;
-
- if (xmultiservicefactory != null)
- {
- }
- }
-
- /**
- * Execute Wizard
- *
- * @param str only valid parameter is 'start' at the moment.
- */
- public void trigger(String str)
- {
- if (str.equalsIgnoreCase(PropertyNames.START))
- {
- FaxWizardDialogImpl lw = new FaxWizardDialogImpl(xmultiservicefactory);
- if (!FaxWizardDialogImpl.running)
- {
- lw.startWizard(xmultiservicefactory, null);
- }
- }
- } //*******************************************
- /**
- * The service name, that must be used to get an instance of this service.
- */
- private static final String __serviceName = "com.sun.star.wizards.fax.CallWizard";
- /**
- * The service manager, that gives access to all registered services.
- */
- private XMultiServiceFactory xmultiservicefactory;
-
- /**
- * This method is a member of the interface for initializing an object directly
- * after its creation.
- *
- * @param object This array of arbitrary objects will be passed to the component
- * after its creation.
- *
- * @throws com.sun.star.uno.Exception Every exception will not be handled, but
- * will be passed to the caller.
- */
- public void initialize(Object[] object) throws com.sun.star.uno.Exception
- {
- }
-
- /**
- * This method returns an array of all supported service names.
- *
- * @return Array of supported service names.
- */
- public java.lang.String[] getSupportedServiceNames()
- {
- String[] stringSupportedServiceNames = new String[1];
- stringSupportedServiceNames[0] = __serviceName;
-
- return (stringSupportedServiceNames);
- }
-
- /**
- * This method returns true, if the given service will be supported by the
- * component.
- *
- * @param stringService Service name.
- *
- * @return True, if the given service name will be supported.
- */
- public boolean supportsService(String stringService)
- {
- boolean booleanSupportsService = false;
-
- if (stringService.equals(__serviceName))
- {
- booleanSupportsService = true;
- }
-
- return (booleanSupportsService);
- }
-
- /**
- * This method returns an array of bytes, that can be used to unambiguously
- * distinguish between two sets of types, e.g. to realise hashing functionality
- * when the object is introspected. Two objects that return the same ID also
- * have to return the same set of types in getTypes(). If an unique
- * implementation Id cannot be provided this method has to return an empty
- * sequence. Important: If the object aggregates other objects the ID has to be
- * unique for the whole combination of objects.
- *
- * @return Array of bytes, in order to distinguish between two sets.
- */
- public byte[] getImplementationId()
- {
- byte[] byteReturn =
- {
- };
-
- try
- {
- byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes();
- }
- catch (Exception exception)
- {
- System.err.println(exception);
- }
-
- return (byteReturn);
- }
-
- /**
- * Return the class name of the component.
- *
- * @return Class name of the component.
- */
- public java.lang.String getImplementationName()
- {
- return (WizardImplementation.class.getName());
- }
-
- /**
- * Provides a sequence of all types (usually interface types) provided by the
- * object.
- *
- * @return Sequence of all types (usually interface types) provided by the
- * service.
- */
- public com.sun.star.uno.Type[] getTypes()
- {
- Type[] typeReturn =
- {
- };
-
- try
- {
- typeReturn = new Type[]
- {
- new Type(XPropertyAccess.class), new Type(XJob.class), new Type(XJobExecutor.class), new Type(XTypeProvider.class), new Type(XServiceInfo.class), new Type(XInitialization.class)
- };
- }
- catch (Exception exception)
- {
- System.err.println(exception);
- }
-
- return (typeReturn);
- }
- }
-}
diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.py b/wizards/com/sun/star/wizards/fax/CallWizard.py
index 8ef1d24fa4ab..b779885622a7 100644
--- a/wizards/com/sun/star/wizards/fax/CallWizard.py
+++ b/wizards/com/sun/star/wizards/fax/CallWizard.py
@@ -25,26 +25,26 @@ from com.sun.star.task import XJobExecutor
# implement a UNO component by deriving from the standard unohelper.Base class
# and from the interface(s) you want to implement.
class CallWizard(unohelper.Base, XJobExecutor):
- def __init__(self, ctx):
- # store the component context for later use
- self.ctx = ctx
+ def __init__(self, ctx):
+ # store the component context for later use
+ self.ctx = ctx
- def trigger(self, args):
- try:
- fw = FaxWizardDialogImpl(self.ctx.ServiceManager)
- fw.startWizard(self.ctx.ServiceManager)
- except Exception as e:
- print ("Wizard failure exception " + str(type(e)) +
- " message " + str(e) + " args " + str(e.args) +
- traceback.format_exc())
+ def trigger(self, args):
+ try:
+ fw = FaxWizardDialogImpl(self.ctx.ServiceManager)
+ fw.startWizard(self.ctx.ServiceManager)
+ except Exception as e:
+ print ("Wizard failure exception " + str(type(e)) +
+ " message " + str(e) + " args " + str(e.args) +
+ traceback.format_exc())
# pythonloader looks for a static g_ImplementationHelper variable
g_ImplementationHelper = unohelper.ImplementationHelper()
g_ImplementationHelper.addImplementation( \
- CallWizard, # UNO object class
- "com.sun.star.wizards.fax.CallWizard", # implemenation name
- ("com.sun.star.task.Job",),) # list of implemented services
- # (the only service)
+ CallWizard, # UNO object class
+ "com.sun.star.wizards.fax.CallWizard", # implemenation name
+ ("com.sun.star.task.Job",),) # list of implemented services
+ # (the only service)
# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.java b/wizards/com/sun/star/wizards/fax/FaxDocument.java
deleted file mode 100644
index c4cd286dbba3..000000000000
--- a/wizards/com/sun/star/wizards/fax/FaxDocument.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.fax;
-
-import com.sun.star.wizards.common.*;
-import com.sun.star.wizards.text.*;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XTerminateListener;
-import com.sun.star.text.*;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.style.NumberingType;
-import com.sun.star.style.ParagraphAdjust;
-import com.sun.star.style.XStyleFamiliesSupplier;
-import com.sun.star.style.XStyle;
-
-public class FaxDocument extends TextDocument
-{
-
- XDesktop xDesktop;
- boolean keepLogoFrame = true;
- boolean keepTypeFrame = true;
-
- public FaxDocument(XMultiServiceFactory xMSF, XTerminateListener listener)
- {
- super(xMSF, listener, "WIZARD_LIVE_PREVIEW");
- }
-
- public XWindowPeer getWindowPeer()
- {
- return UnoRuntime.queryInterface(XWindowPeer.class, xTextDocument);
- }
-
- public void switchElement(String sElement, boolean bState)
- {
- try
- {
- TextSectionHandler mySectionHandler = new TextSectionHandler(xMSF, xTextDocument);
- Object oSection = mySectionHandler.xTextSectionsSupplier.getTextSections().getByName(sElement);
- Helper.setUnoPropertyValue(oSection, "IsVisible", Boolean.valueOf(bState));
-
- }
- catch (Exception exception)
- {
- exception.printStackTrace(System.err);
- }
- }
-
- public void updateDateFields()
- {
- TextFieldHandler FH = new TextFieldHandler(xMSFDoc, xTextDocument);
- FH.updateDateFields();
- }
-
- public void switchFooter(String sPageStyle, boolean bState, boolean bPageNumber, String sText)
- {
- if (xTextDocument != null)
- {
- xTextDocument.lockControllers();
- try
- {
- XStyleFamiliesSupplier xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
- com.sun.star.container.XNameAccess xNameAccess = null;
- xNameAccess = xStyleFamiliesSupplier.getStyleFamilies();
-
- com.sun.star.container.XNameContainer xPageStyleCollection = null;
- xPageStyleCollection = UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles"));
-
- XText xFooterText;
- XStyle xPageStyle = UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName(sPageStyle));
-
- if (bState)
- {
- Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.TRUE);
- xFooterText = UnoRuntime.queryInterface(XText.class, Helper.getUnoPropertyValue(xPageStyle, "FooterText"));
- xFooterText.setString(sText);
- if (bPageNumber)
- {
- //Adding the Page Number
- XTextCursor myCursor = xFooterText.createTextCursor();
- myCursor.gotoEnd(false);
- xFooterText.insertControlCharacter(myCursor, ControlCharacter.PARAGRAPH_BREAK, false);
- XPropertySet xCursorPSet = UnoRuntime.queryInterface(XPropertySet.class, myCursor);
- xCursorPSet.setPropertyValue("ParaAdjust", ParagraphAdjust.CENTER);
- XTextField xPageNumberField = UnoRuntime.queryInterface(XTextField.class, xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber"));
- XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xPageNumberField);
- xPSet.setPropertyValue("SubType", PageNumberType.CURRENT);
- xPSet.setPropertyValue("NumberingType", new Short(NumberingType.ARABIC));
- xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, false);
- }
- }
- else
- {
- Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.FALSE);
- }
- xTextDocument.unlockControllers();
- }
- catch (Exception exception)
- {
- exception.printStackTrace(System.err);
- }
- }
- }
-
- public boolean hasElement(String sElement)
- {
- if (xTextDocument != null)
- {
- TextSectionHandler mySectionHandler = new TextSectionHandler(xMSF, xTextDocument);
- return mySectionHandler.hasTextSectionByName(sElement);
- }
- else
- {
- return false;
- }
- }
-
- public void switchUserField(String sFieldName, String sNewContent, boolean bState)
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(xMSF, xTextDocument);
- if (bState)
- {
- myFieldHandler.changeUserFieldContent(sFieldName, sNewContent);
- }
- else
- {
- myFieldHandler.changeUserFieldContent(sFieldName, PropertyNames.EMPTY_STRING);
- }
- }
-
- public void fillSenderWithUserData()
- {
- try
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(xMSFDoc, xTextDocument);
- Object oUserDataAccess = Configuration.getConfigurationRoot(xMSF, "org.openoffice.UserProfile/Data", false);
- myFieldHandler.changeUserFieldContent("Company", (String) Helper.getUnoObjectbyName(oUserDataAccess, "o"));
- myFieldHandler.changeUserFieldContent("Street", (String) Helper.getUnoObjectbyName(oUserDataAccess, "street"));
- myFieldHandler.changeUserFieldContent("PostCode", (String) Helper.getUnoObjectbyName(oUserDataAccess, "postalcode"));
- myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, (String) Helper.getUnoObjectbyName(oUserDataAccess, "st"));
- myFieldHandler.changeUserFieldContent("City", (String) Helper.getUnoObjectbyName(oUserDataAccess, "l"));
- myFieldHandler.changeUserFieldContent("Fax", (String) Helper.getUnoObjectbyName(oUserDataAccess, "facsimiletelephonenumber"));
- }
- catch (Exception exception)
- {
- exception.printStackTrace(System.err);
- }
- }
-
- public void killEmptyUserFields()
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(xMSF, xTextDocument);
- myFieldHandler.removeUserFieldByContent(PropertyNames.EMPTY_STRING);
- }
-
- public void killEmptyFrames()
- {
- try
- {
- if (!keepLogoFrame)
- {
- XTextFrame xTF = TextFrameHandler.getFrameByName("Company Logo", xTextDocument);
- if (xTF != null)
- {
- xTF.dispose();
- }
- }
- if (!keepTypeFrame)
- {
- XTextFrame xTF = TextFrameHandler.getFrameByName("Communication Type", xTextDocument);
- if (xTF != null)
- {
- xTF.dispose();
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- }
-}
diff --git a/wizards/com/sun/star/wizards/fax/FaxDocument.py b/wizards/com/sun/star/wizards/fax/FaxDocument.py
index f86a3f5ba981..77ed13870606 100644
--- a/wizards/com/sun/star/wizards/fax/FaxDocument.py
+++ b/wizards/com/sun/star/wizards/fax/FaxDocument.py
@@ -15,9 +15,8 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-from ..text.TextDocument import *
- #TextDocument, traceback, Helper,\
- #TextFieldHandler, Configuration
+from ..text.TextDocument import TextDocument, traceback, Helper, \
+ TextFieldHandler, Configuration
from ..text.TextSectionHandler import TextSectionHandler
from ..common.PropertyNames import PropertyNames
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java
deleted file mode 100644
index 5fdfb2ab8fbe..000000000000
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.java
+++ /dev/null
@@ -1,618 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.fax;
-
-import com.sun.star.awt.*;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.wizards.common.*;
-import com.sun.star.wizards.ui.*;
-
-public abstract class FaxWizardDialog extends WizardDialog implements FaxWizardDialogConst, UIConsts
-{
-
- XRadioButton optBusinessFax;
- XListBox lstBusinessStyle;
- XRadioButton optPrivateFax;
- XListBox lstPrivateStyle;
- XFixedText lblBusinessStyle;
- XFixedText lblTitle1;
- XFixedText lblPrivateStyle;
- XFixedText lblIntroduction;
- //Image Control
- XControl ImageControl3;
- XCheckBox chkUseLogo;
- XCheckBox chkUseDate;
- XCheckBox chkUseCommunicationType;
- XComboBox lstCommunicationType;
- XCheckBox chkUseSubject;
- XCheckBox chkUseSalutation;
- XComboBox lstSalutation;
- XCheckBox chkUseGreeting;
- XComboBox lstGreeting;
- XCheckBox chkUseFooter;
- XFixedText lblTitle3;
- XRadioButton optSenderPlaceholder;
- XRadioButton optSenderDefine;
- XTextComponent txtSenderName;
- XTextComponent txtSenderStreet;
- XTextComponent txtSenderPostCode;
- XTextComponent txtSenderState;
- XTextComponent txtSenderCity;
- XTextComponent txtSenderFax;
- XRadioButton optReceiverDatabase;
- XRadioButton optReceiverPlaceholder;
- XFixedText lblSenderAddress;
- //Fixed Line
- XControl FixedLine2;
- XFixedText lblSenderName;
- XFixedText lblSenderStreet;
- XFixedText lblPostCodeCity;
- XFixedText lblTitle4;
- XFixedText Label1;
- XFixedText Label2;
- XTextComponent txtFooter;
- XCheckBox chkFooterNextPages;
- XCheckBox chkFooterPageNumbers;
- XFixedText lblFooter;
- XFixedText lblTitle5;
- XTextComponent txtTemplateName;
- //File Control
- XControl fileTemplatePath;
- XRadioButton optCreateFax;
- XRadioButton optMakeChanges;
- XFixedText lblFinalExplanation1;
- XFixedText lblProceed;
- XFixedText lblFinalExplanation2;
- //Image Control
- XControl ImageControl2;
- XFixedText lblTemplateName;
- XFixedText lblTemplatePath;
- XFixedText lblTitle6;
- XFixedText Label9;
- //Font Descriptors as Class members.
- FontDescriptor fontDescriptor1 = new FontDescriptor();
- FontDescriptor fontDescriptor2 = new FontDescriptor();
- FontDescriptor fontDescriptor4 = new FontDescriptor();
- FontDescriptor fontDescriptor5 = new FontDescriptor(); //Resources Object
- FaxWizardDialogResources resources;
-
- public FaxWizardDialog(XMultiServiceFactory xmsf)
- {
- super(xmsf, HIDMAIN);
- //Load Resources
- resources = new FaxWizardDialogResources(xmsf);
-
-
- //set dialog properties...
- Helper.setUnoPropertyValues(xDialogModel,
- new String[]
- {
- PropertyNames.PROPERTY_CLOSEABLE, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- Boolean.TRUE, 210, Boolean.TRUE, 104, 52, INTEGERS[1], new Short((short) 1), resources.resFaxWizardDialog_title, 310
- });
-
-
-
- //Set member- FontDescriptors...
- fontDescriptor1.Weight = 150;
- fontDescriptor1.Underline = com.sun.star.awt.FontUnderline.SINGLE;
- fontDescriptor2.Weight = 100;
- fontDescriptor4.Weight = 100;
- fontDescriptor5.Weight = 150;
- }
- //build components
- public void buildStep1()
- {
- optBusinessFax = insertRadioButton("optBusinessFax", OPTBUSINESSFAX_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], OPTBUSINESSFAX_HID, resources.resoptBusinessFax_value, 97, 28, INTEGERS[1], new Short((short) 1), 184
- });
- lstBusinessStyle = insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED,
- new String[]
- {
- "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- Boolean.TRUE, INTEGER_12, LSTBUSINESSSTYLE_HID, 180, INTEGER_40, INTEGERS[1], new Short((short) 3), 74
- });
- optPrivateFax = insertRadioButton("optPrivateFax", OPTPRIVATEFAX_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], OPTPRIVATEFAX_HID, resources.resoptPrivateFax_value, 97, 81, INTEGERS[1], new Short((short) 2), 184
- });
- lstPrivateStyle = insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED,
- new String[]
- {
- "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- Boolean.TRUE, INTEGER_12, LSTPRIVATESTYLE_HID, 180, 95, INTEGERS[1], new Short((short) 4), 74
- });
- lblBusinessStyle = insertLabel("lblBusinessStyle",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblBusinessStyle_value, 110, 42, INTEGERS[1], new Short((short) 32), 60
- });
- lblTitle1 = insertLabel("lblTitle1",
- new String[]
- {
- PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- fontDescriptor5, INTEGER_16, resources.reslblTitle1_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[1], new Short((short) 37), 212
- });
- lblPrivateStyle = insertLabel("lblPrivateStyle",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblPrivateStyle_value, 110, 95, INTEGERS[1], new Short((short) 50), 60
- });
- lblIntroduction = insertLabel("lblIntroduction",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- 39, resources.reslblIntroduction_value, Boolean.TRUE, 104, 145, INTEGERS[1], new Short((short) 55), 199
- });
- ImageControl3 = insertInfoImage(92, 145, 1);
-// ImageControl3 = insertImage("ImageControl3",
-// new String[] {PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH},
-// new Object[] { new Short((short)0),INTEGERS[10],"private:resource/dbu/image/19205",92,145,Boolean.FALSE,INTEGERS[1],new Short((short)56),INTEGERS[10]}
-// );
- }
-
- public void buildStep2()
- {
- chkUseLogo = insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], CHKUSELOGO_HID, resources.reschkUseLogo_value, 97, 28, new Short((short) 0), INTEGERS[2], new Short((short) 5), 212
- });
- chkUseDate = insertCheckBox("chkUseDate", CHKUSEDATE_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], CHKUSEDATE_HID, resources.reschkUseDate_value, 97, 43, new Short((short) 0), INTEGERS[2], new Short((short) 6), 212
- });
- chkUseCommunicationType = insertCheckBox("chkUseCommunicationType", CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], CHKUSECOMMUNICATIONTYPE_HID, resources.reschkUseCommunicationType_value, 97, 57, new Short((short) 0), INTEGERS[2], new Short((short) 7), 100
- });
- lstCommunicationType = insertComboBox("lstCommunicationType", LSTCOMMUNICATIONTYPE_ACTION_PERFORMED, LSTCOMMUNICATIONTYPE_ITEM_CHANGED, LSTCOMMUNICATIONTYPE_TEXT_CHANGED,
- new String[]
- {
- "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- Boolean.TRUE, INTEGER_12, LSTCOMMUNICATIONTYPE_HID, 105, 68, INTEGERS[2], new Short((short) 8), 174
- });
- chkUseSubject = insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], CHKUSESUBJECT_HID, resources.reschkUseSubject_value, 97, 87, new Short((short) 0), INTEGERS[2], new Short((short) 9), 212
- });
- chkUseSalutation = insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], CHKUSESALUTATION_HID, resources.reschkUseSalutation_value, 97, 102, new Short((short) 0), INTEGERS[2], new Short((short) 10), 100
- });
- lstSalutation = insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED,
- new String[]
- {
- "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- Boolean.TRUE, INTEGER_12, LSTSALUTATION_HID, 105, 113, INTEGERS[2], new Short((short) 11), 174
- });
- chkUseGreeting = insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], CHKUSEGREETING_HID, resources.reschkUseGreeting_value, 97, 132, new Short((short) 0), INTEGERS[2], new Short((short) 12), 100
- });
- lstGreeting = insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED,
- new String[]
- {
- "Dropdown", PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- Boolean.TRUE, INTEGER_12, LSTGREETING_HID, 105, 143, INTEGERS[2], new Short((short) 13), 174
- });
- chkUseFooter = insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], CHKUSEFOOTER_HID, resources.reschkUseFooter_value, 97, 163, new Short((short) 0), INTEGERS[2], new Short((short) 14), 212
- });
- lblTitle3 = insertLabel("lblTitle3",
- new String[]
- {
- PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- fontDescriptor5, INTEGER_16, resources.reslblTitle3_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[2], new Short((short) 59), 212
- });
- }
-
- public void buildStep3()
- {
- optSenderPlaceholder = insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], OPTSENDERPLACEHOLDER_HID, resources.resoptSenderPlaceholder_value, 104, 42, INTEGERS[3], new Short((short) 15), 149
- });
- optSenderDefine = insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], OPTSENDERDEFINE_HID, resources.resoptSenderDefine_value, 104, 54, INTEGERS[3], new Short((short) 16), 149
- });
- txtSenderName = insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, TXTSENDERNAME_HID, 182, 67, INTEGERS[3], new Short((short) 17), 119
- });
- txtSenderStreet = insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, TXTSENDERSTREET_HID, 182, 81, INTEGERS[3], new Short((short) 18), 119
- });
- txtSenderPostCode = insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, TXTSENDERPOSTCODE_HID, 182, 95, INTEGERS[3], new Short((short) 19), 25
- });
- txtSenderState = insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, TXTSENDERSTATE_HID, 211, 95, INTEGERS[3], new Short((short) 20), 21
- });
- txtSenderCity = insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, TXTSENDERCITY_HID, 236, 95, INTEGERS[3], new Short((short) 21), 65
- });
- txtSenderFax = insertTextField("txtSenderFax", TXTSENDERFAX_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, TXTSENDERFAX_HID, 182, 109, INTEGERS[3], new Short((short) 22), 119
- });
- optReceiverPlaceholder = insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], OPTRECEIVERPLACEHOLDER_HID, resources.resoptReceiverPlaceholder_value, 104, 148, INTEGERS[3], new Short((short) 23), 200
- });
- optReceiverDatabase = insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], OPTRECEIVERDATABASE_HID, resources.resoptReceiverDatabase_value, 104, 160, INTEGERS[3], new Short((short) 24), 200
- });
- lblSenderAddress = insertLabel("lblSenderAddress",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblSenderAddress_value, 97, 28, INTEGERS[3], new Short((short) 46), 136
- });
- FixedLine2 = insertFixedLine("FixedLine2",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[5], 90, 126, INTEGERS[3], new Short((short) 51), 212
- });
- lblSenderName = insertLabel("lblSenderName",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblSenderName_value, 113, 69, INTEGERS[3], new Short((short) 52), 68
- });
- lblSenderStreet = insertLabel("lblSenderStreet",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblSenderStreet_value, 113, 82, INTEGERS[3], new Short((short) 53), 68
- });
- lblPostCodeCity = insertLabel("lblPostCodeCity",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblPostCodeCity_value, 113, 97, INTEGERS[3], new Short((short) 54), 68
- });
- lblTitle4 = insertLabel("lblTitle4",
- new String[]
- {
- PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- fontDescriptor5, INTEGER_16, resources.reslblTitle4_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[3], new Short((short) 60), 212
- });
- Label1 = insertLabel("lblSenderFax",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], resources.resLabel1_value, 113, 111, INTEGERS[3], new Short((short) 68), 68
- });
- Label2 = insertLabel("Label2",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], resources.resLabel2_value, 97, 137, INTEGERS[3], new Short((short) 69), 136
- });
- }
-
- public void buildStep4()
- {
- txtFooter = insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- 47, TXTFOOTER_HID, Boolean.TRUE, 97, INTEGER_40, INTEGERS[4], new Short((short) 25), 203
- });
- chkFooterNextPages = insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], CHKFOOTERNEXTPAGES_HID, resources.reschkFooterNextPages_value, 97, 92, new Short((short) 0), INTEGERS[4], new Short((short) 26), 202
- });
- chkFooterPageNumbers = insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STATE, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], CHKFOOTERPAGENUMBERS_HID, resources.reschkFooterPageNumbers_value, 97, 106, new Short((short) 0), INTEGERS[4], new Short((short) 27), 201
- });
- lblFooter = insertLabel("lblFooter",
- new String[]
- {
- PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- fontDescriptor4, INTEGERS[8], resources.reslblFooter_value, 97, 28, INTEGERS[4], new Short((short) 33), 116
- });
- lblTitle5 = insertLabel("lblTitle5",
- new String[]
- {
- PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- fontDescriptor5, INTEGER_16, resources.reslblTitle5_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[4], new Short((short) 61), 212
- });
- }
-
- public void buildStep5()
- {
- txtTemplateName = insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, TXTTEMPLATENAME_HID, 202, 56, INTEGERS[5], new Short((short) 28), resources.restxtTemplateName_value, 100
- });
- /*
- fileTemplatePath = insertFileControl("fileTemplatePath", FILETEMPLATEPATH_TEXT_CHANGED,
- new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH},
- new Object[] { INTEGER_12,FILETEMPLATEPATH_HID,172,74,INTEGERS[5],new Short((short)29),130}
- );
- */
- optCreateFax = insertRadioButton("optCreateFax", OPTCREATEFAX_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], OPTCREATEFAX_HID, resources.resoptCreateFax_value, 104, 111, INTEGERS[5], new Short((short) 30), 198
- });
- optMakeChanges = insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], OPTMAKECHANGES_HID, resources.resoptMakeChanges_value, 104, 123, INTEGERS[5], new Short((short) 31), 198
- });
- lblFinalExplanation1 = insertLabel("lblFinalExplanation1",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- 28, resources.reslblFinalExplanation1_value, Boolean.TRUE, 97, 28, INTEGERS[5], new Short((short) 34), 205
- });
- lblProceed = insertLabel("lblProceed",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblProceed_value, 97, 100, INTEGERS[5], new Short((short) 35), 204
- });
- lblFinalExplanation2 = insertLabel("lblFinalExplanation2",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- 33, resources.reslblFinalExplanation2_value, Boolean.TRUE, 104, 145, INTEGERS[5], new Short((short) 36), 199
- });
- ImageControl2 = insertImage("ImageControl2",
- new String[]
- {
- PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- new Short((short) 0), INTEGERS[10], "private:resource/dbu/image/19205", 92, 145, Boolean.FALSE, INTEGERS[5], new Short((short) 47), INTEGERS[10]
- });
- lblTemplateName = insertLabel("lblTemplateName",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblTemplateName_value, 97, 58, INTEGERS[5], new Short((short) 57), 101
- });
- /*
- lblTemplatePath = insertLabel("lblTemplatePath",
- new String[] {PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH},
- new Object[] { INTEGERS[8],resources.reslblTemplatePath_value,97,77,INTEGERS[5],new Short((short)58),71}
- );
- */
- lblTitle6 = insertLabel("lblTitle6",
- new String[]
- {
- PropertyNames.FONT_DESCRIPTOR, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_LABEL, PropertyNames.PROPERTY_MULTILINE, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- fontDescriptor5, INTEGER_16, resources.reslblTitle6_value, Boolean.TRUE, 91, INTEGERS[8], INTEGERS[5], new Short((short) 62), 212
- });
-
- }
-} \ No newline at end of file
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py
index 36396d3709bd..9f033d784557 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py
@@ -16,9 +16,9 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
from .FaxWizardDialogResources import FaxWizardDialogResources
-from .FaxWizardDialogConst import FaxWizardDialogConst, HIDMAIN
+from .FaxWizardDialogConst import FaxWizardDialogConst, HIDMAIN, HID
from ..ui.WizardDialog import WizardDialog, uno, Helper, UIConsts, \
- PropertyNames
+ PropertyNames
from com.sun.star.awt.FontUnderline import SINGLE
@@ -70,8 +70,8 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, FaxWizardDialogConst.OPTBUSINESSFAX_HID,
- self.resources.resoptBusinessFax_value, 97, 28, 1, 1, 184),
- self)
+ self.resources.resoptBusinessFax_value, 97, 28, 1, 1, 184),
+ self)
self.lstBusinessStyle = self.insertListBox("lstBusinessStyle",
FaxWizardDialogConst.LSTBUSINESSSTYLE_ACTION_PERFORMED,
FaxWizardDialogConst.LSTBUSINESSSTYLE_ITEM_CHANGED,
@@ -83,7 +83,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(True, 12, FaxWizardDialogConst.LSTBUSINESSSTYLE_HID,
- 180, 40, 1, 3, 74), self)
+ 180, 40, 1, 3, 74), self)
self.optPrivateFax = self.insertRadioButton("optPrivateFax",
FaxWizardDialogConst.OPTPRIVATEFAX_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
@@ -95,7 +95,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, FaxWizardDialogConst.OPTPRIVATEFAX_HID,
- self.resources.resoptPrivateFax_value,97, 81, 1, 2, 184), self)
+ self.resources.resoptPrivateFax_value,97, 81, 1, 2, 184), self)
self.lstPrivateStyle = self.insertListBox("lstPrivateStyle",
FaxWizardDialogConst.LSTPRIVATESTYLE_ACTION_PERFORMED,
FaxWizardDialogConst.LSTPRIVATESTYLE_ITEM_CHANGED,
@@ -107,7 +107,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(True, 12, FaxWizardDialogConst.LSTPRIVATESTYLE_HID,
- 180, 95, 1, 4, 74), self)
+ 180, 95, 1, 4, 74), self)
self.insertLabel("lblBusinessStyle",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
@@ -149,7 +149,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(39, self.resources.reslblIntroduction_value,
- True, 104, 145, 1, 55, 199))
+ True, 104, 145, 1, 55, 199))
self.ImageControl3 = self.insertInfoImage(92, 145, 1)
def buildStep2(self):
@@ -165,8 +165,8 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, FaxWizardDialogConst.CHKUSELOGO_HID,
- self.resources.reschkUseLogo_value, 97, 28, 0, 2, 5, 212),
- self)
+ self.resources.reschkUseLogo_value, 97, 28, 0, 2, 5, 212),
+ self)
self.chkUseDate = self.insertCheckBox("chkUseDate",
FaxWizardDialogConst.CHKUSEDATE_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
@@ -179,8 +179,8 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, FaxWizardDialogConst.CHKUSEDATE_HID,
- self.resources.reschkUseDate_value, 97, 43, 0, 2, 6, 212),
- self)
+ self.resources.reschkUseDate_value, 97, 43, 0, 2, 6, 212),
+ self)
self.chkUseCommunicationType = self.insertCheckBox(
"chkUseCommunicationType",
FaxWizardDialogConst.CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED,
@@ -195,7 +195,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, FaxWizardDialogConst.CHKUSECOMMUNICATIONTYPE_HID,
self.resources.reschkUseCommunicationType_value,
- 97, 57, 0, 2, 7, 100), self)
+ 97, 57, 0, 2, 7, 100), self)
self.lstCommunicationType = self.insertComboBox(
"lstCommunicationType",
FaxWizardDialogConst.LSTCOMMUNICATIONTYPE_ACTION_PERFORMED,
@@ -209,7 +209,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(True, 12, FaxWizardDialogConst.LSTCOMMUNICATIONTYPE_HID,
- 105, 68, 2, 8, 174), self)
+ 105, 68, 2, 8, 174), self)
self.chkUseSubject = self.insertCheckBox("chkUseSubject",
FaxWizardDialogConst.CHKUSESUBJECT_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
@@ -222,8 +222,8 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, FaxWizardDialogConst.CHKUSESUBJECT_HID,
- self.resources.reschkUseSubject_value, 97, 87, 0, 2, 9, 212),
- self)
+ self.resources.reschkUseSubject_value, 97, 87, 0, 2, 9, 212),
+ self)
self.chkUseSalutation = self.insertCheckBox("chkUseSalutation",
FaxWizardDialogConst.CHKUSESALUTATION_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
@@ -237,7 +237,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, FaxWizardDialogConst.CHKUSESALUTATION_HID,
self.resources.reschkUseSalutation_value,
- 97, 102, 0, 2, 10, 100), self)
+ 97, 102, 0, 2, 10, 100), self)
self.lstSalutation = self.insertComboBox("lstSalutation",
FaxWizardDialogConst.LSTSALUTATION_ACTION_PERFORMED,
FaxWizardDialogConst.LSTSALUTATION_ITEM_CHANGED,
@@ -250,7 +250,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(True, 12, FaxWizardDialogConst.LSTSALUTATION_HID,
- 105, 113, 2, 11, 174), self)
+ 105, 113, 2, 11, 174), self)
self.chkUseGreeting = self.insertCheckBox("chkUseGreeting",
FaxWizardDialogConst.CHKUSEGREETING_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
@@ -277,7 +277,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(True, 12, FaxWizardDialogConst.LSTGREETING_HID,
- 105, 143, 2, 13, 174), self)
+ 105, 143, 2, 13, 174), self)
self.chkUseFooter = self.insertCheckBox("chkUseFooter",
FaxWizardDialogConst.CHKUSEFOOTER_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
@@ -330,7 +330,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, FaxWizardDialogConst.OPTSENDERDEFINE_HID,
- self.resources.resoptSenderDefine_value,
+ self.resources.resoptSenderDefine_value,
104, 54, 3, 16, 149), self)
self.txtSenderName = self.insertTextField("txtSenderName",
FaxWizardDialogConst.TXTSENDERNAME_TEXT_CHANGED,
@@ -342,7 +342,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(12, FaxWizardDialogConst.TXTSENDERNAME_HID,
- 182, 67, 3, 17, 119), self)
+ 182, 67, 3, 17, 119), self)
self.txtSenderStreet = self.insertTextField("txtSenderStreet",
FaxWizardDialogConst.TXTSENDERSTREET_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
@@ -353,7 +353,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(12, FaxWizardDialogConst.TXTSENDERSTREET_HID,
- 182, 81, 3, 18, 119), self)
+ 182, 81, 3, 18, 119), self)
self.txtSenderPostCode = self.insertTextField("txtSenderPostCode",
FaxWizardDialogConst.TXTSENDERPOSTCODE_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
@@ -364,7 +364,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(12, FaxWizardDialogConst.TXTSENDERPOSTCODE_HID,
- 182, 95, 3, 19, 25), self)
+ 182, 95, 3, 19, 25), self)
self.txtSenderState = self.insertTextField("txtSenderState",
FaxWizardDialogConst.TXTSENDERSTATE_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
@@ -375,7 +375,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(12, FaxWizardDialogConst.TXTSENDERSTATE_HID,
- 211, 95, 3, 20, 21), self)
+ 211, 95, 3, 20, 21), self)
self.txtSenderCity = self.insertTextField("txtSenderCity",
FaxWizardDialogConst.TXTSENDERCITY_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
@@ -386,7 +386,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(12, FaxWizardDialogConst.TXTSENDERCITY_HID,
- 236, 95, 3, 21, 65), self)
+ 236, 95, 3, 21, 65), self)
self.txtSenderFax = self.insertTextField("txtSenderFax",
FaxWizardDialogConst.TXTSENDERFAX_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
@@ -397,7 +397,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(12, FaxWizardDialogConst.TXTSENDERFAX_HID,
- 182, 109, 3, 22, 119), self)
+ 182, 109, 3, 22, 119), self)
self.optReceiverPlaceholder = self.insertRadioButton(
"optReceiverPlaceholder",
FaxWizardDialogConst.OPTRECEIVERPLACEHOLDER_ITEM_CHANGED,
@@ -425,7 +425,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, FaxWizardDialogConst.OPTRECEIVERDATABASE_HID,
self.resources.resoptReceiverDatabase_value,
- 104, 160, 3, 24, 200), self)
+ 104, 160, 3, 24, 200), self)
self.insertLabel("lblSenderAddress",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
@@ -435,7 +435,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblSenderAddress_value,
- 97, 28, 3, 46, 136))
+ 97, 28, 3, 46, 136))
self.insertFixedLine("FixedLine2", (PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_POSITION_X,
PropertyNames.PROPERTY_POSITION_Y,
@@ -452,7 +452,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblSenderName_value,
- 113, 69, 3, 52, 68))
+ 113, 69, 3, 52, 68))
self.insertLabel("lblSenderStreet",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
@@ -462,7 +462,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblSenderStreet_value,
- 113, 82, 3, 53, 68))
+ 113, 82, 3, 53, 68))
self.insertLabel("lblPostCodeCity",
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_LABEL,
@@ -472,7 +472,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, self.resources.reslblPostCodeCity_value,
- 113, 97, 3, 54, 68))
+ 113, 97, 3, 54, 68))
self.insertLabel("lblTitle4",
("FontDescriptor",
PropertyNames.PROPERTY_HEIGHT,
@@ -516,7 +516,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(47, FaxWizardDialogConst.TXTFOOTER_HID,
- True, 97, 40, 4, 25, 203), self)
+ True, 97, 40, 4, 25, 203), self)
self.chkFooterNextPages = self.insertCheckBox("chkFooterNextPages",
FaxWizardDialogConst.CHKFOOTERNEXTPAGES_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
@@ -530,7 +530,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, FaxWizardDialogConst.CHKFOOTERNEXTPAGES_HID,
self.resources.reschkFooterNextPages_value,
- 97, 92, 0, 4, 26, 202), self)
+ 97, 92, 0, 4, 26, 202), self)
self.chkFooterPageNumbers = self.insertCheckBox("chkFooterPageNumbers",
FaxWizardDialogConst.CHKFOOTERPAGENUMBERS_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
@@ -544,7 +544,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, FaxWizardDialogConst.CHKFOOTERPAGENUMBERS_HID,
self.resources.reschkFooterPageNumbers_value,
- 97, 106, 0, 4, 27, 201), self)
+ 97, 106, 0, 4, 27, 201), self)
self.insertLabel("lblFooter",
("FontDescriptor",
PropertyNames.PROPERTY_HEIGHT,
@@ -594,7 +594,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, FaxWizardDialogConst.OPTCREATEFAX_HID,
- self.resources.resoptCreateFax_value,
+ self.resources.resoptCreateFax_value,
104, 111, 5, 30, 198), self)
self.optMakeChanges = self.insertRadioButton("optMakeChanges",
FaxWizardDialogConst.OPTMAKECHANGES_ITEM_CHANGED,
@@ -607,7 +607,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(8, FaxWizardDialogConst.OPTMAKECHANGES_HID,
- self.resources.resoptMakeChanges_value,
+ self.resources.resoptMakeChanges_value,
104, 123, 5, 31, 198), self)
self.insertLabel("lblFinalExplanation1",
(PropertyNames.PROPERTY_HEIGHT,
@@ -640,7 +640,7 @@ class FaxWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(33, self.resources.reslblFinalExplanation2_value,
- True, 104, 145, 5, 36, 199))
+ True, 104, 145, 5, 36, 199))
self.insertImage("ImageControl2",
("Border",
PropertyNames.PROPERTY_HEIGHT,
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.java
deleted file mode 100644
index 65e52e99a6a2..000000000000
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.fax;
-import com.sun.star.wizards.common.*;
-
-public interface FaxWizardDialogConst
-{
-
- public static final String OPTBUSINESSFAX_ITEM_CHANGED = "optBusinessFaxItemChanged";
- public static final String LSTBUSINESSSTYLE_ACTION_PERFORMED = null; // "lstBusinessStyleActionPerformed";
- public static final String LSTBUSINESSSTYLE_ITEM_CHANGED = "lstBusinessStyleItemChanged";
- public static final String OPTPRIVATEFAX_ITEM_CHANGED = "optPrivateFaxItemChanged";
- public static final String LSTPRIVATESTYLE_ACTION_PERFORMED = null; // "lstPrivateStyleActionPerformed";
- public static final String LSTPRIVATESTYLE_ITEM_CHANGED = "lstPrivateStyleItemChanged";
- public static final String CHKUSELOGO_ITEM_CHANGED = "chkUseLogoItemChanged";
- public static final String CHKUSEDATE_ITEM_CHANGED = "chkUseDateItemChanged";
- public static final String CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED = "chkUseCommunicationItemChanged";
- public static final String LSTCOMMUNICATIONTYPE_ACTION_PERFORMED = null; // "lstCommunicationActionPerformed";
- public static final String LSTCOMMUNICATIONTYPE_ITEM_CHANGED = "lstCommunicationItemChanged";
- public static final String LSTCOMMUNICATIONTYPE_TEXT_CHANGED = "lstCommunicationTextChanged";
- public static final String CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged";
- public static final String CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged";
- public static final String LSTSALUTATION_ACTION_PERFORMED = null; // "lstSalutationActionPerformed";
- public static final String LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged";
- public static final String LSTSALUTATION_TEXT_CHANGED = "lstSalutationTextChanged";
- public static final String CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged";
- public static final String LSTGREETING_ACTION_PERFORMED = null; // "lstGreetingActionPerformed";
- public static final String LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged";
- public static final String LSTGREETING_TEXT_CHANGED = "lstGreetingTextChanged";
- public static final String CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged";
- public static final String OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged";
- public static final String OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged";
- public static final String TXTSENDERNAME_TEXT_CHANGED = "txtSenderNameTextChanged";
- public static final String TXTSENDERSTREET_TEXT_CHANGED = "txtSenderStreetTextChanged";
- public static final String TXTSENDERPOSTCODE_TEXT_CHANGED = "txtSenderPostCodeTextChanged";
- public static final String TXTSENDERSTATE_TEXT_CHANGED = "txtSenderStateTextChanged";
- public static final String TXTSENDERCITY_TEXT_CHANGED = "txtSenderCityTextChanged";
- public static final String TXTSENDERFAX_TEXT_CHANGED = "txtSenderFaxTextChanged";
- public static final String OPTRECEIVERPLACEHOLDER_ITEM_CHANGED = "optReceiverPlaceholderItemChanged";
- public static final String OPTRECEIVERDATABASE_ITEM_CHANGED = "optReceiverDatabaseItemChanged";
- public static final String TXTFOOTER_TEXT_CHANGED = "txtFooterTextChanged";
- public static final String CHKFOOTERNEXTPAGES_ITEM_CHANGED = "chkFooterNextPagesItemChanged";
- public static final String CHKFOOTERPAGENUMBERS_ITEM_CHANGED = "chkFooterPageNumbersItemChanged";
- public static final String TXTTEMPLATENAME_TEXT_CHANGED = "txtTemplateNameTextChanged";
- public static final String FILETEMPLATEPATH_TEXT_CHANGED = null; // "fileTemplatePathTextChanged";
- public static final String OPTCREATEFAX_ITEM_CHANGED = "optCreateFaxItemChanged";
- public static final String OPTMAKECHANGES_ITEM_CHANGED = "optMakeChangesItemChanged";
- public static final String imageURLImageControl2 = null; //"images/ImageControl2";
- public static final String imageURLImageControl3 = null; //"images/ImageControl3";
-
- /* ====================================
- * Help IDs
- * ====================================
- */
- public final static int HID = 41119; //TODO enter first hid here
- public static final int HIDMAIN = 41180;
- public final String OPTBUSINESSFAX_HID = HelpIds.getHelpIdString(HID + 1);
- public final String LSTBUSINESSSTYLE_HID = HelpIds.getHelpIdString(HID + 2);
- public final String OPTPRIVATEFAX_HID = HelpIds.getHelpIdString(HID + 3);
- public final String LSTPRIVATESTYLE_HID = HelpIds.getHelpIdString(HID + 4);
- public final String IMAGECONTROL3_HID = HelpIds.getHelpIdString(HID + 5);
- public final String CHKUSELOGO_HID = HelpIds.getHelpIdString(HID + 6);
- public final String CHKUSEDATE_HID = HelpIds.getHelpIdString(HID + 7);
- public final String CHKUSECOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 8);
- public final String LSTCOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 9);
- public final String CHKUSESUBJECT_HID = HelpIds.getHelpIdString(HID + 10);
- public final String CHKUSESALUTATION_HID = HelpIds.getHelpIdString(HID + 11);
- public final String LSTSALUTATION_HID = HelpIds.getHelpIdString(HID + 12);
- public final String CHKUSEGREETING_HID = HelpIds.getHelpIdString(HID + 13);
- public final String LSTGREETING_HID = HelpIds.getHelpIdString(HID + 14);
- public final String CHKUSEFOOTER_HID = HelpIds.getHelpIdString(HID + 15);
- public final String OPTSENDERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 16);
- public final String OPTSENDERDEFINE_HID = HelpIds.getHelpIdString(HID + 17);
- public final String TXTSENDERNAME_HID = HelpIds.getHelpIdString(HID + 18);
- public final String TXTSENDERSTREET_HID = HelpIds.getHelpIdString(HID + 19);
- public final String TXTSENDERPOSTCODE_HID = HelpIds.getHelpIdString(HID + 20);
- public final String TXTSENDERSTATE_HID = HelpIds.getHelpIdString(HID + 21);
- public final String TXTSENDERCITY_HID = HelpIds.getHelpIdString(HID + 22);
- public final String TXTSENDERFAX_HID = HelpIds.getHelpIdString(HID + 23);
- public final String OPTRECEIVERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 24);
- public final String OPTRECEIVERDATABASE_HID = HelpIds.getHelpIdString(HID + 25);
- public final String TXTFOOTER_HID = HelpIds.getHelpIdString(HID + 26);
- public final String CHKFOOTERNEXTPAGES_HID = HelpIds.getHelpIdString(HID + 27);
- public final String CHKFOOTERPAGENUMBERS_HID = HelpIds.getHelpIdString(HID + 28);
- public final String TXTTEMPLATENAME_HID = HelpIds.getHelpIdString(HID + 29);
- public final String FILETEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 30);
- public final String OPTCREATEFAX_HID = HelpIds.getHelpIdString(HID + 31);
- public final String OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 32);
- public final String IMAGECONTROL2_HID = HelpIds.getHelpIdString(HID + 33);
-}
-
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py
index 95c952c59b2a..faececb1bd1a 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogConst.py
@@ -22,78 +22,78 @@ HIDMAIN = 41180
class FaxWizardDialogConst:
- OPTBUSINESSFAX_ITEM_CHANGED = "optBusinessFaxItemChanged"
- LSTBUSINESSSTYLE_ACTION_PERFORMED = None
- LSTBUSINESSSTYLE_ITEM_CHANGED = "lstBusinessStyleItemChanged"
- OPTPRIVATEFAX_ITEM_CHANGED = "optPrivateFaxItemChanged"
- LSTPRIVATESTYLE_ACTION_PERFORMED = None
- LSTPRIVATESTYLE_ITEM_CHANGED = "lstPrivateStyleItemChanged"
- CHKUSELOGO_ITEM_CHANGED = "chkUseLogoItemChanged"
- CHKUSEDATE_ITEM_CHANGED = "chkUseDateItemChanged"
- CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED = "chkUseCommunicationItemChanged"
- LSTCOMMUNICATIONTYPE_ACTION_PERFORMED = None
- LSTCOMMUNICATIONTYPE_ITEM_CHANGED = "lstCommunicationItemChanged"
- LSTCOMMUNICATIONTYPE_TEXT_CHANGED = "lstCommunicationItemChanged"
- CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged"
- CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged"
- LSTSALUTATION_ACTION_PERFORMED = None
- LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged"
- LSTSALUTATION_TEXT_CHANGED = "lstSalutationItemChanged"
- CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged"
- LSTGREETING_ACTION_PERFORMED = None
- LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged"
- LSTGREETING_TEXT_CHANGED = "lstGreetingItemChanged"
- CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged"
- OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged"
- OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged"
- TXTSENDERNAME_TEXT_CHANGED = "txtSenderNameTextChanged"
- TXTSENDERSTREET_TEXT_CHANGED = "txtSenderStreetTextChanged"
- TXTSENDERPOSTCODE_TEXT_CHANGED = "txtSenderPostCodeTextChanged"
- TXTSENDERSTATE_TEXT_CHANGED = "txtSenderStateTextChanged"
- TXTSENDERCITY_TEXT_CHANGED = "txtSenderCityTextChanged"
- TXTSENDERFAX_TEXT_CHANGED = "txtSenderFaxTextChanged"
- OPTRECEIVERPLACEHOLDER_ITEM_CHANGED = "optReceiverPlaceholderItemChanged"
- OPTRECEIVERDATABASE_ITEM_CHANGED = "optReceiverDatabaseItemChanged"
- TXTFOOTER_TEXT_CHANGED = "txtFooterTextChanged"
- CHKFOOTERNEXTPAGES_ITEM_CHANGED = "chkFooterNextPagesItemChanged"
- CHKFOOTERPAGENUMBERS_ITEM_CHANGED = "chkFooterPageNumbersItemChanged"
- TXTTEMPLATENAME_TEXT_CHANGED = "txtTemplateNameTextChanged"
- FILETEMPLATEPATH_TEXT_CHANGED = None
- OPTCREATEFAX_ITEM_CHANGED = "optCreateFromTemplateItemChanged"
- OPTMAKECHANGES_ITEM_CHANGED = "optMakeChangesItemChanged"
+ OPTBUSINESSFAX_ITEM_CHANGED = "optBusinessFaxItemChanged"
+ LSTBUSINESSSTYLE_ACTION_PERFORMED = None
+ LSTBUSINESSSTYLE_ITEM_CHANGED = "lstBusinessStyleItemChanged"
+ OPTPRIVATEFAX_ITEM_CHANGED = "optPrivateFaxItemChanged"
+ LSTPRIVATESTYLE_ACTION_PERFORMED = None
+ LSTPRIVATESTYLE_ITEM_CHANGED = "lstPrivateStyleItemChanged"
+ CHKUSELOGO_ITEM_CHANGED = "chkUseLogoItemChanged"
+ CHKUSEDATE_ITEM_CHANGED = "chkUseDateItemChanged"
+ CHKUSECOMMUNICATIONTYPE_ITEM_CHANGED = "chkUseCommunicationItemChanged"
+ LSTCOMMUNICATIONTYPE_ACTION_PERFORMED = None
+ LSTCOMMUNICATIONTYPE_ITEM_CHANGED = "lstCommunicationItemChanged"
+ LSTCOMMUNICATIONTYPE_TEXT_CHANGED = "lstCommunicationItemChanged"
+ CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged"
+ CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged"
+ LSTSALUTATION_ACTION_PERFORMED = None
+ LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged"
+ LSTSALUTATION_TEXT_CHANGED = "lstSalutationItemChanged"
+ CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged"
+ LSTGREETING_ACTION_PERFORMED = None
+ LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged"
+ LSTGREETING_TEXT_CHANGED = "lstGreetingItemChanged"
+ CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged"
+ OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged"
+ OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged"
+ TXTSENDERNAME_TEXT_CHANGED = "txtSenderNameTextChanged"
+ TXTSENDERSTREET_TEXT_CHANGED = "txtSenderStreetTextChanged"
+ TXTSENDERPOSTCODE_TEXT_CHANGED = "txtSenderPostCodeTextChanged"
+ TXTSENDERSTATE_TEXT_CHANGED = "txtSenderStateTextChanged"
+ TXTSENDERCITY_TEXT_CHANGED = "txtSenderCityTextChanged"
+ TXTSENDERFAX_TEXT_CHANGED = "txtSenderFaxTextChanged"
+ OPTRECEIVERPLACEHOLDER_ITEM_CHANGED = "optReceiverPlaceholderItemChanged"
+ OPTRECEIVERDATABASE_ITEM_CHANGED = "optReceiverDatabaseItemChanged"
+ TXTFOOTER_TEXT_CHANGED = "txtFooterTextChanged"
+ CHKFOOTERNEXTPAGES_ITEM_CHANGED = "chkFooterNextPagesItemChanged"
+ CHKFOOTERPAGENUMBERS_ITEM_CHANGED = "chkFooterPageNumbersItemChanged"
+ TXTTEMPLATENAME_TEXT_CHANGED = "txtTemplateNameTextChanged"
+ FILETEMPLATEPATH_TEXT_CHANGED = None
+ OPTCREATEFAX_ITEM_CHANGED = "optCreateFromTemplateItemChanged"
+ OPTMAKECHANGES_ITEM_CHANGED = "optMakeChangesItemChanged"
- #Help IDs
+ #Help IDs
- OPTBUSINESSFAX_HID = HelpIds.getHelpIdString(HID + 1)
- LSTBUSINESSSTYLE_HID = HelpIds.getHelpIdString(HID + 2)
- OPTPRIVATEFAX_HID = HelpIds.getHelpIdString(HID + 3)
- LSTPRIVATESTYLE_HID = HelpIds.getHelpIdString(HID + 4)
- IMAGECONTROL3_HID = HelpIds.getHelpIdString(HID + 5)
- CHKUSELOGO_HID = HelpIds.getHelpIdString(HID + 6)
- CHKUSEDATE_HID = HelpIds.getHelpIdString(HID + 7)
- CHKUSECOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 8)
- LSTCOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 9)
- CHKUSESUBJECT_HID = HelpIds.getHelpIdString(HID + 10)
- CHKUSESALUTATION_HID = HelpIds.getHelpIdString(HID + 11)
- LSTSALUTATION_HID = HelpIds.getHelpIdString(HID + 12)
- CHKUSEGREETING_HID = HelpIds.getHelpIdString(HID + 13)
- LSTGREETING_HID = HelpIds.getHelpIdString(HID + 14)
- CHKUSEFOOTER_HID = HelpIds.getHelpIdString(HID + 15)
- OPTSENDERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 16)
- OPTSENDERDEFINE_HID = HelpIds.getHelpIdString(HID + 17)
- TXTSENDERNAME_HID = HelpIds.getHelpIdString(HID + 18)
- TXTSENDERSTREET_HID = HelpIds.getHelpIdString(HID + 19)
- TXTSENDERPOSTCODE_HID = HelpIds.getHelpIdString(HID + 20)
- TXTSENDERSTATE_HID = HelpIds.getHelpIdString(HID + 21)
- TXTSENDERCITY_HID = HelpIds.getHelpIdString(HID + 22)
- TXTSENDERFAX_HID = HelpIds.getHelpIdString(HID + 23)
- OPTRECEIVERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 24)
- OPTRECEIVERDATABASE_HID = HelpIds.getHelpIdString(HID + 25)
- TXTFOOTER_HID = HelpIds.getHelpIdString(HID + 26)
- CHKFOOTERNEXTPAGES_HID = HelpIds.getHelpIdString(HID + 27)
- CHKFOOTERPAGENUMBERS_HID = HelpIds.getHelpIdString(HID + 28)
- TXTTEMPLATENAME_HID = HelpIds.getHelpIdString(HID + 29)
- FILETEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 30)
- OPTCREATEFAX_HID = HelpIds.getHelpIdString(HID + 31)
- OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 32)
- IMAGECONTROL2_HID = HelpIds.getHelpIdString(HID + 33)
+ OPTBUSINESSFAX_HID = HelpIds.getHelpIdString(HID + 1)
+ LSTBUSINESSSTYLE_HID = HelpIds.getHelpIdString(HID + 2)
+ OPTPRIVATEFAX_HID = HelpIds.getHelpIdString(HID + 3)
+ LSTPRIVATESTYLE_HID = HelpIds.getHelpIdString(HID + 4)
+ IMAGECONTROL3_HID = HelpIds.getHelpIdString(HID + 5)
+ CHKUSELOGO_HID = HelpIds.getHelpIdString(HID + 6)
+ CHKUSEDATE_HID = HelpIds.getHelpIdString(HID + 7)
+ CHKUSECOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 8)
+ LSTCOMMUNICATIONTYPE_HID = HelpIds.getHelpIdString(HID + 9)
+ CHKUSESUBJECT_HID = HelpIds.getHelpIdString(HID + 10)
+ CHKUSESALUTATION_HID = HelpIds.getHelpIdString(HID + 11)
+ LSTSALUTATION_HID = HelpIds.getHelpIdString(HID + 12)
+ CHKUSEGREETING_HID = HelpIds.getHelpIdString(HID + 13)
+ LSTGREETING_HID = HelpIds.getHelpIdString(HID + 14)
+ CHKUSEFOOTER_HID = HelpIds.getHelpIdString(HID + 15)
+ OPTSENDERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 16)
+ OPTSENDERDEFINE_HID = HelpIds.getHelpIdString(HID + 17)
+ TXTSENDERNAME_HID = HelpIds.getHelpIdString(HID + 18)
+ TXTSENDERSTREET_HID = HelpIds.getHelpIdString(HID + 19)
+ TXTSENDERPOSTCODE_HID = HelpIds.getHelpIdString(HID + 20)
+ TXTSENDERSTATE_HID = HelpIds.getHelpIdString(HID + 21)
+ TXTSENDERCITY_HID = HelpIds.getHelpIdString(HID + 22)
+ TXTSENDERFAX_HID = HelpIds.getHelpIdString(HID + 23)
+ OPTRECEIVERPLACEHOLDER_HID = HelpIds.getHelpIdString(HID + 24)
+ OPTRECEIVERDATABASE_HID = HelpIds.getHelpIdString(HID + 25)
+ TXTFOOTER_HID = HelpIds.getHelpIdString(HID + 26)
+ CHKFOOTERNEXTPAGES_HID = HelpIds.getHelpIdString(HID + 27)
+ CHKFOOTERPAGENUMBERS_HID = HelpIds.getHelpIdString(HID + 28)
+ TXTTEMPLATENAME_HID = HelpIds.getHelpIdString(HID + 29)
+ FILETEMPLATEPATH_HID = HelpIds.getHelpIdString(HID + 30)
+ OPTCREATEFAX_HID = HelpIds.getHelpIdString(HID + 31)
+ OPTMAKECHANGES_HID = HelpIds.getHelpIdString(HID + 32)
+ IMAGECONTROL2_HID = HelpIds.getHelpIdString(HID + 33)
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
deleted file mode 100644
index 6f4792f341c9..000000000000
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.java
+++ /dev/null
@@ -1,1073 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.fax;
-
-import java.util.ArrayList;
-
-import com.sun.star.awt.VclWindowPeerAttribute;
-import com.sun.star.awt.XTextComponent;
-import com.sun.star.awt.XWindow;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.document.MacroExecMode;
-import com.sun.star.document.XDocumentProperties;
-import com.sun.star.document.XDocumentPropertiesSupplier;
-import com.sun.star.graphic.XGraphic;
-import com.sun.star.graphic.XGraphicProvider;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.task.XInteractionHandler;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.util.CloseVetoException;
-import com.sun.star.util.XCloseable;
-import com.sun.star.wizards.common.Configuration;
-import com.sun.star.wizards.common.Desktop;
-import com.sun.star.wizards.common.FileAccess;
-import com.sun.star.wizards.common.HelpIds;
-import com.sun.star.wizards.common.Helper;
-import com.sun.star.wizards.common.NoValidPathException;
-import com.sun.star.wizards.common.PropertyNames;
-import com.sun.star.wizards.common.SystemDialog;
-import com.sun.star.wizards.document.OfficeDocument;
-import com.sun.star.wizards.text.TextFieldHandler;
-import com.sun.star.wizards.text.ViewHandler;
-import com.sun.star.wizards.ui.PathSelection;
-import com.sun.star.wizards.ui.XPathSelectionListener;
-import com.sun.star.wizards.ui.event.DataAware;
-import com.sun.star.wizards.ui.event.RadioDataAware;
-import com.sun.star.wizards.ui.event.UnoDataAware;
-
-import com.sun.star.util.XSearchable;
-import com.sun.star.util.XSearchDescriptor;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.text.*;
-import com.sun.star.wizards.common.TextElement;
-import com.sun.star.wizards.common.PlaceholderTextElement;
-
-import java.util.List;
-import com.sun.star.beans.XPropertySet;
-
-public class FaxWizardDialogImpl extends FaxWizardDialog
-{
-
- protected void enterStep(int OldStep, int NewStep)
- {
- }
-
- protected void leaveStep(int OldStep, int NewStep)
- {
- }
- static FaxDocument myFaxDoc;
- static boolean running;
- XTextDocument xTextDocument;
- PathSelection myPathSelection;
- CGFaxWizard myConfig;
- ArrayList<DataAware> mainDA = new ArrayList<DataAware>();
- ArrayList<DataAware> faxDA = new ArrayList<DataAware>();
- String[][] BusinessFiles;
- String[][] PrivateFiles;
- String sTemplatePath;
- String sUserTemplatePath;
- String sBitmapPath;
- String sFaxPath;
- String sWorkPath;
- String sPath;
- boolean bEditTemplate;
- boolean bSaveSuccess = false;
- private boolean filenameChanged = false;
- final static int RM_TYPESTYLE = 1;
- final static int RM_ELEMENTS = 2;
- final static int RM_SENDERRECEIVER = 3;
- final static int RM_FOOTER = 4;
- final static int RM_FINALSETTINGS = 5;
-
- List<XTextRange> constRangeList = new ArrayList<XTextRange>();
- XTextRange trTo, trFrom, trFaxconst, trTelconst, trEmailconst, trConsist1, trConsist2, trConsist3;
- TextElement teTo, teFrom, teFaxconst, teTelconst, teEmailconst, teConsist1, teConsist2, teConsist3;
-
- public FaxWizardDialogImpl(XMultiServiceFactory xmsf)
- {
- super(xmsf);
- }
-
- public static void main(String args[])
- {
- //only being called when starting wizard remotely
-
- try
- {
- String ConnectStr = "uno:socket,host=127.0.0.1,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.ServiceManager";
- XMultiServiceFactory xLocMSF = Desktop.connect(ConnectStr);
- FaxWizardDialogImpl lw = new FaxWizardDialogImpl(xLocMSF);
- lw.startWizard(xLocMSF, null);
- }
- catch (RuntimeException e)
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- catch (Exception e)
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- catch (java.lang.Exception e)
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
-
- public void startWizard(XMultiServiceFactory xMSF, Object[] CurPropertyValue)
- {
-
- running = true;
- try
- {
- //Number of steps on WizardDialog:
- setMaxStep(5);
-
- //instatiate The Document Frame for the Preview
- myFaxDoc = new FaxDocument(xMSF, this);
-
- //create the dialog:
- drawNaviBar();
- buildStep1();
- buildStep2();
- buildStep3();
- buildStep4();
- buildStep5();
-
- initializeSalutation();
- initializeGreeting();
- initializeCommunication();
- initializePaths();
-
- //special Control for setting the save Path:
- insertPathSelectionControl();
-
- //load the last used settings from the registry and apply listeners to the controls:
- initConfiguration();
-
- initializeTemplates(xMSF);
-
-
- //update the dialog UI according to the loaded Configuration
- updateUI();
-
- if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING))
- {
- myPathSelection.initializePath();
- }
-
- XWindow xContainerWindow = myFaxDoc.xFrame.getContainerWindow();
- XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow);
- createWindowPeer(xWindowPeer);
-
- //add the Roadmap to the dialog:
- insertRoadmap();
-
- //load the last used document and apply last used settings:
- //TODO:
- setConfiguration();
-
- //If the configuration does not define Greeting/Salutation/CommunicationType yet choose a default
- setDefaultForGreetingAndSalutationAndCommunication();
-
- //disable funtionality that is not supported by the template:
- initializeElements();
-
- //disable the document, so that the user cannot change anything:
- myFaxDoc.xFrame.getComponentWindow().setEnable(false);
-
- executeDialog(myFaxDoc.xFrame);
- removeTerminateListener();
- closeDocument();
- running = false;
-
- }
- catch (Exception exception)
- {
- removeTerminateListener();
- exception.printStackTrace(System.err);
- running = false;
- }
- }
-
- public void cancelWizard()
- {
- xDialog.endExecute();
- running = false;
- }
-
- public boolean finishWizard()
- {
- switchToStep(getCurrentStep(), getMaxStep());
- myFaxDoc.setWizardTemplateDocInfo(resources.resFaxWizardDialog_title, resources.resTemplateDescription);
- try
- {
- //myFaxDoc.xTextDocument.lockControllers();
- FileAccess fileAccess = new FileAccess(xMSF);
- sPath = myPathSelection.getSelectedPath();
- if (sPath.equals(PropertyNames.EMPTY_STRING))
- {
- myPathSelection.triggerPathPicker();
- sPath = myPathSelection.getSelectedPath();
- }
- sPath = fileAccess.getURL(sPath);
-
- //first, if the filename was not changed, thus
- //it is coming from a saved session, check if the
- // file exists and warn the user.
- if (!filenameChanged)
- {
- if (fileAccess.exists(sPath, true))
- {
-
- int answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, resources.resOverwriteWarning);
- if (answer == 3) // user said: no, do not overwrite....
- {
- return false;
- }
- }
- }
- myFaxDoc.setWizardTemplateDocInfo(resources.resFaxWizardDialog_title, resources.resTemplateDescription);
- myFaxDoc.killEmptyUserFields();
- myFaxDoc.keepLogoFrame = (chkUseLogo.getState() != 0);
- myFaxDoc.keepTypeFrame = (chkUseCommunicationType.getState() != 0);
- myFaxDoc.killEmptyFrames();
-
-
- bSaveSuccess = OfficeDocument.store(xMSF, xTextDocument, sPath, "writer8_template", false);
- if (bSaveSuccess)
- {
- saveConfiguration();
- XInteractionHandler xIH = UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler"));
- PropertyValue loadValues[] = new PropertyValue[4];
- loadValues[0] = new PropertyValue();
- loadValues[0].Name = "AsTemplate";
- loadValues[1] = new PropertyValue();
- loadValues[1].Name = "MacroExecutionMode";
- loadValues[1].Value = new Short(MacroExecMode.ALWAYS_EXECUTE);
- loadValues[2] = new PropertyValue();
- loadValues[2].Name = "UpdateDocMode";
- loadValues[2].Value = new Short(com.sun.star.document.UpdateDocMode.FULL_UPDATE);
- loadValues[3] = new PropertyValue();
- loadValues[3].Name = "InteractionHandler";
- loadValues[3].Value = xIH;
-
-
- if (bEditTemplate)
- {
- loadValues[0].Value = Boolean.FALSE;
- }
- else
- {
- loadValues[0].Value = Boolean.TRUE;
- }
- Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_default", loadValues);
- XTextDocument xTextDocument = (com.sun.star.text.XTextDocument) oDoc;
- XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
- ViewHandler myViewHandler = new ViewHandler(xDocMSF, xTextDocument);
- myViewHandler.setViewSetting("ZoomType", new Short(com.sun.star.view.DocumentZoomType.OPTIMAL));
- }
- else
- {
- //TODO: Error Handling
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- finally
- {
- xDialog.endExecute();
- running = false;
- }
- return true;
- }
-
- public void closeDocument()
- {
- try
- {
- //xComponent.dispose();
- XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, myFaxDoc.xFrame);
- xCloseable.close(false);
- }
- catch (CloseVetoException e)
- {
- e.printStackTrace();
- }
- }
-
- public void drawConstants()
- {
- constRangeList = searchFillInItems(1);
-
- XTextRange item = null;
-
- for (int i = 0; i < constRangeList.size(); i++)
- {
- item = constRangeList.get(i);
- String text = item.getString().trim().toLowerCase();
- if (text.equals(resources.resToPlaceHolder))
- {
- teTo = new PlaceholderTextElement(item, resources.resToPlaceHolder_value, "hint", myFaxDoc.xMSF);
- trTo = item;
- constRangeList.remove(i--);
- writeTitle(teTo,trTo,resources.resToPlaceHolder_value);
- }
- else if (text.equals(resources.resFromPlaceHolder))
- {
- teFrom = new PlaceholderTextElement(item, resources.resFromPlaceHolder_value, "hint", myFaxDoc.xMSF);
- trFrom = item;
- constRangeList.remove(i--);
- writeTitle(teFrom,trFrom,resources.resFromPlaceHolder_value);
- }
- else if (text.equals(resources.resFaxconstPlaceHolder))
- {
- teFaxconst = new PlaceholderTextElement(item, resources.resFaxconstPlaceHolder_value, "hint", myFaxDoc.xMSF);
- trFaxconst = item;
- constRangeList.remove(i--);
- writeTitle(teFaxconst,trFaxconst,resources.resFaxconstPlaceHolder_value);
- }
- else if (text.equals(resources.resTelconstPlaceHolder))
- {
- teTelconst = new PlaceholderTextElement(item, resources.resTelconstPlaceHolder_value, "hint", myFaxDoc.xMSF);
- trTelconst = item;
- constRangeList.remove(i--);
- writeTitle(teTelconst,trTelconst,resources.resTelconstPlaceHolder_value);
- }
- else if (text.equals(resources.resEmailconstPlaceHolder))
- {
- teEmailconst = new PlaceholderTextElement(item, resources.resEmailconstPlaceHolder_value, "hint", myFaxDoc.xMSF);
- trEmailconst = item;
- constRangeList.remove(i--);
- writeTitle(teEmailconst,trEmailconst,resources.resEmailconstPlaceHolder_value);
- }
- else if (text.equals(resources.resConsist1PlaceHolder))
- {
- teConsist1 = new PlaceholderTextElement(item, resources.resConsist1PlaceHolder_value, "hint", myFaxDoc.xMSF);
- trConsist1 = item;
- constRangeList.remove(i--);
- writeTitle(teConsist1,trConsist1,resources.resConsist1PlaceHolder_value);
- }
- else if (text.equals(resources.resConsist2PlaceHolder))
- {
- teConsist2 = new PlaceholderTextElement(item, resources.resConsist2PlaceHolder_value, "hint", myFaxDoc.xMSF);
- trConsist2 = item;
- constRangeList.remove(i--);
- writeTitle(teConsist2,trConsist2,resources.resConsist2PlaceHolder_value);
- }
- else if (text.equals(resources.resConsist3PlaceHolder))
- {
- teConsist3 = new PlaceholderTextElement(item, resources.resConsist3PlaceHolder_value, "hint", myFaxDoc.xMSF);
- trConsist3 = item;
- constRangeList.remove(i--);
- writeTitle(teConsist3,trConsist3,resources.resConsist3PlaceHolder_value);
- }
-
- }
- }
-
- public void clearConstants()
- {
- constRangeList.clear();
- trTo = null;
- trFrom = null;
- trFaxconst = null;
- trTelconst = null;
- trEmailconst = null;
- trConsist1 = null;
- trConsist2 = null;
- trConsist3 = null;
- teTo = null;
- teFrom = null;
- teFaxconst = null;
- teTelconst = null;
- teEmailconst = null;
- teConsist1 = null;
- teConsist2 = null;
- teConsist3 = null;
- }
-
- private void writeTitle(TextElement te, XTextRange tr, String text)
- {
- te.setText(text == null ? PropertyNames.EMPTY_STRING : text);
- te.write(tr);
- }
-
- public List<XTextRange> searchFillInItems(int type)
- {
- try
- {
- XSearchable xSearchable = UnoRuntime.queryInterface(XSearchable.class, xTextDocument);
- XSearchDescriptor sd = xSearchable.createSearchDescriptor();
-
- if(type == 0)
- {
- sd.setSearchString("<[^>]+>");
- }
- else if(type == 1)
- {
- sd.setSearchString("#[^#]+#");
- }
- sd.setPropertyValue("SearchRegularExpression", Boolean.TRUE);
- sd.setPropertyValue("SearchWords", Boolean.TRUE);
-
- XIndexAccess ia = xSearchable.findAll(sd);
-
- List<XTextRange> l = new ArrayList<XTextRange>(ia.getCount());
- for (int i = 0; i < ia.getCount(); i++)
- {
- try
- {
- l.add(UnoRuntime.queryInterface(XTextRange.class, ia.getByIndex(i)));
- }
- catch (Exception ex)
- {
- System.err.println("Nonfatal Error in finding fillins.");
- }
- }
- return l;
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- throw new IllegalArgumentException("Fatal Error: Loading template failed: searching fillins failed");
- }
-
- }
-
- private void exchangeTitlesToLocalizedOnes()
- {
- for(int i = 0; i < BusinessFiles[0].length; ++i)
- {
- if( BusinessFiles[0][i].equals("Classic Fax") )
- {
- BusinessFiles[0][i] = resources.resBusinessFaxClassic;
- }
- else if( BusinessFiles[0][i].equals("Classic Fax from Private") )
- {
- BusinessFiles[0][i] = resources.resBusinessFaxClassicPrivate;
- }
- else if( BusinessFiles[0][i].equals("Modern Fax") )
- {
- BusinessFiles[0][i] = resources.resBusinessFaxModern;
- }
- else if( BusinessFiles[0][i].equals("Modern Fax from Private") )
- {
- BusinessFiles[0][i] = resources.resBusinessFaxModernPrivate;
- }
- }
-
- for(int i = 0; i < PrivateFiles[0].length; ++i)
- {
- if( PrivateFiles[0][i].equals("Bottle") )
- {
- PrivateFiles[0][i] = resources.resPrivateFaxBottle;
- }
- else if( PrivateFiles[0][i].equals("Lines") )
- {
- PrivateFiles[0][i] = resources.resPrivateFaxLines;
- }
- else if( PrivateFiles[0][i].equals("Marine") )
- {
- PrivateFiles[0][i] = resources.resPrivateFaxMarine;
- }
- }
- }
-
- public void insertRoadmap()
- {
- addRoadmap();
- int i = 0;
- i = insertRoadmapItem(0, true, resources.RoadmapLabels[RM_TYPESTYLE], RM_TYPESTYLE);
- i = insertRoadmapItem(i, true, resources.RoadmapLabels[RM_ELEMENTS], RM_ELEMENTS);
- i = insertRoadmapItem(i, true, resources.RoadmapLabels[RM_SENDERRECEIVER], RM_SENDERRECEIVER);
- i = insertRoadmapItem(i, false, resources.RoadmapLabels[RM_FOOTER], RM_FOOTER);
- i = insertRoadmapItem(i, true, resources.RoadmapLabels[RM_FINALSETTINGS], RM_FINALSETTINGS);
- setRoadmapInteractive(true);
- setRoadmapComplete(true);
- setCurrentRoadmapItemID((short) 1);
- }
-
- private class myPathSelectionListener implements XPathSelectionListener
- {
-
- public void validatePath()
- {
- if (myPathSelection.usedPathPicker)
- {
- filenameChanged = true;
- }
- myPathSelection.usedPathPicker = false;
- }
- }
-
- public void insertPathSelectionControl()
- {
- myPathSelection = new PathSelection(xMSF, this, PathSelection.TransferMode.SAVE, PathSelection.DialogTypes.FILE);
- myPathSelection.insert(5, 97, 70, 205, (short) 45, resources.reslblTemplatePath_value, true, HelpIds.getHelpIdString(HID + 34), HelpIds.getHelpIdString(HID + 35));
- myPathSelection.sDefaultDirectory = sUserTemplatePath;
- myPathSelection.sDefaultName = "myFaxTemplate.ott";
- myPathSelection.sDefaultFilter = "writer8_template";
- myPathSelection.addSelectionListener(new myPathSelectionListener());
- }
-
- private void insertIcons()
- {
- try
- {
- Object oGS = xMSF.createInstance("com.sun.star.graphic.GraphicProvider");
- XGraphicProvider xGraphicProvider = UnoRuntime.queryInterface(XGraphicProvider.class, oGS);
-
- PropertyValue GraphicValues[] = new PropertyValue[1];
- GraphicValues[0] = new PropertyValue();
- GraphicValues[0].Name = PropertyNames.URL;
- GraphicValues[0].Value = "private:resource/svx/imagelist/18000/18022";
- XGraphic xGraphic = xGraphicProvider.queryGraphic(GraphicValues);
-
- }
- catch (Exception e)
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
-
- private void updateUI()
- {
- UnoDataAware.updateUI(mainDA);
- UnoDataAware.updateUI(faxDA);
- }
-
- private void initializePaths()
- {
- try
- {
- XInterface xPathInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings");
- XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xPathInterface);
- sTemplatePath = ((String[]) xPropertySet.getPropertyValue("Template_user"))[0];
- sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING);
- sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap");
- }
- catch (NoValidPathException e)
- {
- e.printStackTrace();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public boolean initializeTemplates(XMultiServiceFactory xMSF)
- {
- try
- {
- String sFaxSubPath = "/wizard/fax";
- sFaxPath = FileAccess.combinePaths(xMSF, sTemplatePath, sFaxSubPath);
- sWorkPath = FileAccess.getOfficePath(xMSF, "Work", PropertyNames.EMPTY_STRING, PropertyNames.EMPTY_STRING);
-
- BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", sFaxPath);
- PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", sFaxPath);
-
- exchangeTitlesToLocalizedOnes();
-
- setControlProperty("lstBusinessStyle", PropertyNames.STRING_ITEM_LIST, BusinessFiles[0]);
- setControlProperty("lstPrivateStyle", PropertyNames.STRING_ITEM_LIST, PrivateFiles[0]);
-
- setControlProperty("lstBusinessStyle", PropertyNames.SELECTED_ITEMS, new short[]
- {
- 0
- });
- setControlProperty("lstPrivateStyle", PropertyNames.SELECTED_ITEMS, new short[]
- {
- 0
- });
-
- return true;
- }
- catch (NoValidPathException e)
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- return false;
- }
- }
-
- public void initializeElements()
- {
- setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myFaxDoc.hasElement("Company Logo")));
- setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myFaxDoc.hasElement("Subject Line")));
- setControlProperty("chkUseDate", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myFaxDoc.hasElement("Date")));
- myFaxDoc.updateDateFields();
- }
-
- public void initializeSalutation()
- {
- setControlProperty("lstSalutation", PropertyNames.STRING_ITEM_LIST, resources.SalutationLabels);
- }
-
- public void initializeGreeting()
- {
- setControlProperty("lstGreeting", PropertyNames.STRING_ITEM_LIST, resources.GreetingLabels);
- }
-
- public void initializeCommunication()
- {
- setControlProperty("lstCommunicationType", PropertyNames.STRING_ITEM_LIST, resources.CommunicationLabels);
- }
-
- private void setDefaultForGreetingAndSalutationAndCommunication()
- {
- XTextComponent xTextComponent;
- xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
- if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING))
- {
- xTextComponent.setText(resources.SalutationLabels[0]);
- }
- xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
- if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING))
- {
- xTextComponent.setText(resources.GreetingLabels[0]);
- }
- xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType);
- if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING))
- {
- xTextComponent.setText(resources.CommunicationLabels[0]);
- }
- }
-
- public void initConfiguration()
- {
- try
- {
- myConfig = new CGFaxWizard();
- Object root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Fax", false);
- myConfig.readConfiguration(root, "cp_");
- mainDA.add(RadioDataAware.attachRadioButtons(myConfig, "cp_FaxType", new Object[]
- {
- optBusinessFax, optPrivateFax
- }, null, true));
- mainDA.add(UnoDataAware.attachListBox(myConfig.cp_BusinessFax, "cp_Style", lstBusinessStyle, null, true));
- mainDA.add(UnoDataAware.attachListBox(myConfig.cp_PrivateFax, "cp_Style", lstPrivateStyle, null, true));
-
- CGFax cgl = myConfig.cp_BusinessFax;
-
- faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintCompanyLogo", chkUseLogo, null, true));
- faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintSubjectLine", chkUseSubject, null, true));
- faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintSalutation", chkUseSalutation, null, true));
- faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintDate", chkUseDate, null, true));
- faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintCommunicationType", chkUseCommunicationType, null, true));
- faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintGreeting", chkUseGreeting, null, true));
- faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintFooter", chkUseFooter, null, true));
- faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_Salutation", lstSalutation, null, true));
- faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_Greeting", lstGreeting, null, true));
- faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_CommunicationType", lstCommunicationType, null, true));
- faxDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_SenderAddressType", new Object[]
- {
- optSenderDefine, optSenderPlaceholder
- }, null, true));
- faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderCompanyName", txtSenderName, null, true));
- faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderStreet", txtSenderStreet, null, true));
- faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderPostCode", txtSenderPostCode, null, true));
- faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderState", txtSenderState, null, true));
- faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderCity", txtSenderCity, null, true));
- faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderFax", txtSenderFax, null, true));
- faxDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_ReceiverAddressType", new Object[]
- {
- optReceiverDatabase, optReceiverPlaceholder
- }, null, true));
- faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_Footer", txtFooter, null, true));
- faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_FooterOnlySecondPage", chkFooterNextPages, null, true));
- faxDA.add(UnoDataAware.attachCheckBox(cgl, "cp_FooterPageNumbers", chkFooterPageNumbers, null, true));
- faxDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_CreationType", new Object[]
- {
- optCreateFax, optMakeChanges
- }, null, true));
- faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_TemplateName", txtTemplateName, null, true));
- faxDA.add(UnoDataAware.attachEditControl(cgl, "cp_TemplatePath", myPathSelection.xSaveTextBox, null, true));
-
- }
- catch (Exception exception)
- {
- exception.printStackTrace();
- }
-
- }
-
- public void saveConfiguration()
- {
- try
- {
- Object root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Fax", true);
- myConfig.writeConfiguration(root, "cp_");
- Configuration.commit(root);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public void setConfiguration()
- {
- //set correct Configuration tree:
- if (optBusinessFax.getState())
- {
- optBusinessFaxItemChanged();
- }
- if (optPrivateFax.getState())
- {
- optPrivateFaxItemChanged();
- }
- }
-
- public void optBusinessFaxItemChanged()
- {
- DataAware.setDataObject(faxDA, myConfig.cp_BusinessFax, true);
- setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- lstBusinessStyleItemChanged();
- enableSenderReceiver();
- setPossibleFooter(true);
- }
-
- public void lstBusinessStyleItemChanged()
- {
- xTextDocument = myFaxDoc.loadAsPreview(BusinessFiles[1][lstBusinessStyle.getSelectedItemPos()], false);
- initializeElements();
- setElements();
- clearConstants();
- drawConstants();
- }
-
- public void optPrivateFaxItemChanged()
- {
- DataAware.setDataObject(faxDA, myConfig.cp_PrivateFax, true);
- setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- lstPrivateStyleItemChanged();
- disableSenderReceiver();
- setPossibleFooter(false);
- }
-
- public void lstPrivateStyleItemChanged()
- {
- xTextDocument = myFaxDoc.loadAsPreview(PrivateFiles[1][lstPrivateStyle.getSelectedItemPos()], false);
- initializeElements();
- setElements();
- }
-
- public void txtTemplateNameTextChanged()
- {
- XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
- XDocumentProperties xDocProps = xDocPropsSuppl.getDocumentProperties();
- String TitleName = txtTemplateName.getText();
- xDocProps.setTitle(TitleName);
- }
-
- public void optSenderPlaceholderItemChanged()
- {
- setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblSenderFax", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("txtSenderFax", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- myFaxDoc.fillSenderWithUserData();
- }
-
- public void optSenderDefineItemChanged()
- {
- setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblSenderFax", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("txtSenderFax", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- txtSenderNameTextChanged();
- txtSenderStreetTextChanged();
- txtSenderPostCodeTextChanged();
- txtSenderStateTextChanged();
- txtSenderCityTextChanged();
- txtSenderFaxTextChanged();
- }
-
- public void optReceiverPlaceholderItemChanged()
- {
- OfficeDocument.attachEventCall(xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Placeholder()");
- }
-
- public void optReceiverDatabaseItemChanged()
- {
- OfficeDocument.attachEventCall(xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Database()");
- }
-
- public void optCreateFaxItemChanged()
- {
- bEditTemplate = false;
- }
-
- public void optMakeChangesItemChanged()
- {
- bEditTemplate = true;
- }
-
- public void txtSenderNameTextChanged()
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument);
- myFieldHandler.changeUserFieldContent("Company", txtSenderName.getText());
- }
-
- public void txtSenderStreetTextChanged()
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument);
- myFieldHandler.changeUserFieldContent("Street", txtSenderStreet.getText());
- }
-
- public void txtSenderCityTextChanged()
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument);
- myFieldHandler.changeUserFieldContent("City", txtSenderCity.getText());
- }
-
- public void txtSenderPostCodeTextChanged()
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument);
- myFieldHandler.changeUserFieldContent("PostCode", txtSenderPostCode.getText());
- }
-
- public void txtSenderStateTextChanged()
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument);
- myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, txtSenderState.getText());
- }
-
- public void txtSenderFaxTextChanged()
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(myFaxDoc.xMSF, xTextDocument);
- myFieldHandler.changeUserFieldContent("Fax", txtSenderFax.getText());
- }
- //switch Elements on/off -------------------------------------------------------
- public void setElements()
- {
- //UI relevant:
- if (optSenderDefine.getState())
- {
- optSenderDefineItemChanged();
- }
- if (optSenderPlaceholder.getState())
- {
- optSenderPlaceholderItemChanged();
- }
- chkUseLogoItemChanged();
- chkUseSubjectItemChanged();
- chkUseSalutationItemChanged();
- chkUseGreetingItemChanged();
- chkUseCommunicationItemChanged();
- chkUseDateItemChanged();
- chkUseFooterItemChanged();
- txtTemplateNameTextChanged();
-
- //not UI relevant:
- if (optReceiverDatabase.getState())
- {
- optReceiverDatabaseItemChanged();
- }
- if (optReceiverPlaceholder.getState())
- {
- optReceiverPlaceholderItemChanged();
- }
- if (optCreateFax.getState())
- {
- optCreateFaxItemChanged();
- }
- if (optMakeChanges.getState())
- {
- optMakeChangesItemChanged();
- }
- }
-
- public void chkUseLogoItemChanged()
- {
- if (myFaxDoc.hasElement("Company Logo"))
- {
- myFaxDoc.switchElement("Company Logo", (chkUseLogo.getState() != 0));
- }
- }
-
- public void chkUseSubjectItemChanged()
- {
- if (myFaxDoc.hasElement("Subject Line"))
- {
- myFaxDoc.switchElement("Subject Line", (chkUseSubject.getState() != 0));
- }
- }
-
- public void chkUseDateItemChanged()
- {
- if (myFaxDoc.hasElement("Date"))
- {
- myFaxDoc.switchElement("Date", (chkUseDate.getState() != 0));
- }
- }
-
- public void chkUseFooterItemChanged()
- {
- try
- {
- boolean bFooterPossible = (chkUseFooter.getState() != 0) && AnyConverter.toBoolean(getControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED));
-
- if (chkFooterNextPages.getState() != 0)
- {
- myFaxDoc.switchFooter("First Page", false, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
- myFaxDoc.switchFooter("Standard", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
- }
- else
- {
- myFaxDoc.switchFooter("First Page", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
- myFaxDoc.switchFooter("Standard", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
- }
-
- //enable/disable roadmap item for footer page
- XInterface BPaperItem = getRoadmapItemByID(RM_FOOTER);
- Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bFooterPossible));
-
- }
- catch (Exception exception)
- {
- exception.printStackTrace(System.err);
- }
- }
-
- public void chkFooterNextPagesItemChanged()
- {
- chkUseFooterItemChanged();
- }
-
- public void chkFooterPageNumbersItemChanged()
- {
- chkUseFooterItemChanged();
- }
-
- public void txtFooterTextChanged()
- {
- chkUseFooterItemChanged();
- }
-
- public void chkUseSalutationItemChanged()
- {
- XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
- myFaxDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0));
- setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseSalutation.getState() != 0));
- }
-
- public void lstSalutationItemChanged()
- {
- XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
- myFaxDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0));
- }
-
- public void lstSalutationTextChanged()
- {
- }
-
- public void chkUseCommunicationItemChanged()
- {
- XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType);
- myFaxDoc.switchUserField("CommunicationType", xTextComponent.getText(), (chkUseCommunicationType.getState() != 0));
- setControlProperty("lstCommunicationType", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseCommunicationType.getState() != 0));
- }
-
- public void lstCommunicationItemChanged()
- {
- XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstCommunicationType);
- myFaxDoc.switchUserField("CommunicationType", xTextComponent.getText(), (chkUseCommunicationType.getState() != 0));
- }
-
- public void lstCommunicationTextChanged()
- {
- }
-
- public void chkUseGreetingItemChanged()
- {
- XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
- myFaxDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0));
- setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseGreeting.getState() != 0));
- }
-
- public void lstGreetingItemChanged()
- {
- XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
- myFaxDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0));
- }
-
- public void lstGreetingTextChanged()
- {
- }
-
- private void setPossibleFooter(boolean bState)
- {
- setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- if (!bState)
- {
- chkUseFooter.setState((short) 0);
- }
- chkUseFooterItemChanged();
- }
-
- private void enableSenderReceiver()
- {
- XInterface BPaperItem = getRoadmapItemByID(RM_SENDERRECEIVER);
- Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- }
-
- private void disableSenderReceiver()
- {
- XInterface BPaperItem = getRoadmapItemByID(RM_SENDERRECEIVER);
- Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- }
-}
-
-
-
-
-
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
index 58fa46f9c551..51d689447b2b 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
@@ -16,27 +16,25 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import traceback
-from .FaxWizardDialog import FaxWizardDialog, Helper, PropertyNames, uno
+from .FaxWizardDialog import FaxWizardDialog, Helper, PropertyNames, uno, HID
from .CGFaxWizard import CGFaxWizard
from .FaxDocument import FaxDocument
-from .FaxWizardDialogConst import HID
from ..ui.PathSelection import PathSelection
from ..ui.event.UnoDataAware import UnoDataAware
from ..ui.event.RadioDataAware import RadioDataAware
from ..text.TextFieldHandler import TextFieldHandler
from ..text.TextDocument import TextDocument
from ..text.ViewHandler import ViewHandler
+from ..text.TextElement import TextElement
from ..common.Configuration import Configuration
from ..common.SystemDialog import SystemDialog
from ..common.NoValidPathException import NoValidPathException
from ..common.HelpIds import HelpIds
from ..common.FileAccess import FileAccess
from ..common.Desktop import Desktop
-from ..common.TextElement import TextElement
from ..document.OfficeDocument import OfficeDocument
from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO
-from com.sun.star.uno import RuntimeException
from com.sun.star.util import CloseVetoException
from com.sun.star.view.DocumentZoomType import OPTIMAL
from com.sun.star.document.UpdateDocMode import FULL_UPDATE
@@ -56,19 +54,18 @@ class FaxWizardDialogImpl(FaxWizardDialog):
RM_FOOTER = 4
RM_FINALSETTINGS = 5
- lstBusinessStylePos = None
- lstPrivateStylePos = None
-
def __init__(self, xmsf):
super(FaxWizardDialogImpl, self).__init__(xmsf)
+ self.lstBusinessStylePos = None
+ self.lstPrivateStylePos = None
self.bSaveSuccess = False
self.filenameChanged = False
self.UserTemplatePath = ""
self.sTemplatePath = ""
@classmethod
- def main(self, args):
- #Call the wizard remotely
+ def main(self):
+ #Call the wizard remotely(see README)
try:
ConnectStr = \
"uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
@@ -76,9 +73,9 @@ class FaxWizardDialogImpl(FaxWizardDialog):
lw = FaxWizardDialogImpl(xLocMSF)
lw.startWizard(xLocMSF)
except Exception as e:
- print ("Wizard failure exception " + str(type(e)) +
- " message " + str(e) + " args " + str(e.args) +
- traceback.format_exc())
+ print ("Wizard failure exception " + str(type(e)) +
+ " message " + str(e) + " args " + str(e.args) +
+ traceback.format_exc())
def startWizard(self, xMSF):
self.running = True
@@ -150,9 +147,6 @@ class FaxWizardDialogImpl(FaxWizardDialog):
def finishWizard(self):
self.switchToStep(self.getCurrentStep(), self.nMaxStep)
- self.myFaxDoc.setWizardTemplateDocInfo( \
- self.resources.resFaxWizardDialog_title,
- self.resources.resTemplateDescription)
endWizard = True
try:
fileAccess = FileAccess(self.xMSF)
@@ -237,28 +231,13 @@ class FaxWizardDialogImpl(FaxWizardDialog):
def drawConstants(self):
'''Localise the template'''
- constRangeList = self.searchFillInItems(1)
+ constRangeList = TextDocument.searchFillInItems(1)
- for i in xrange(constRangeList.Count):
- item = constRangeList.getByIndex(i)
- text = item.String.lower()
- aux = TextElement(item, self.resources.dictConstants[text],
- "hint", self.xMSF)
+ for i in constRangeList:
+ text = i.String.lower()
+ aux = TextElement(i, self.resources.dictConstants[text])
aux.write()
- def searchFillInItems(self, typeSearch):
- sd = TextDocument.xTextDocument.createSearchDescriptor()
-
- if typeSearch == 0:
- sd.setSearchString("<[^>]+>")
- elif typeSearch == 1:
- sd.setSearchString("#[^#]+#")
-
- sd.setPropertyValue("SearchRegularExpression", True)
- sd.setPropertyValue("SearchWords", True)
-
- return TextDocument.xTextDocument.findAll(sd)
-
def insertRoadmap(self):
self.addRoadmap()
self.insertRoadMapItems(
@@ -437,7 +416,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
self.optPrivateFaxItemChanged()
def optBusinessFaxItemChanged(self):
- FaxWizardDialogImpl.lstPrivateStylePos = None
+ self.lstPrivateStylePos = None
self.setControlProperty("lblBusinessStyle",
PropertyNames.PROPERTY_ENABLED, True)
self.setControlProperty("lstBusinessStyle",
@@ -453,8 +432,8 @@ class FaxWizardDialogImpl(FaxWizardDialog):
def lstBusinessStyleItemChanged(self):
selectedItemPos = self.lstBusinessStyle.SelectedItemPos
#avoid to load the same item again
- if FaxWizardDialogImpl.lstBusinessStylePos is not selectedItemPos:
- FaxWizardDialogImpl.lstBusinessStylePos = selectedItemPos
+ if self.lstBusinessStylePos != selectedItemPos:
+ self.lstBusinessStylePos = selectedItemPos
TextDocument.xTextDocument = self.myFaxDoc.loadAsPreview(
self.BusinessFiles.values()[selectedItemPos], False)
self.initializeElements()
@@ -462,7 +441,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
self.drawConstants()
def optPrivateFaxItemChanged(self):
- FaxWizardDialogImpl.lstBusinessStylePos = None
+ self.lstBusinessStylePos = None
self.setControlProperty("lblBusinessStyle",
PropertyNames.PROPERTY_ENABLED, False)
self.setControlProperty("lstBusinessStyle",
@@ -478,14 +457,15 @@ class FaxWizardDialogImpl(FaxWizardDialog):
def lstPrivateStyleItemChanged(self):
selectedItemPos = self.lstPrivateStyle.SelectedItemPos
#avoid to load the same item again
- if FaxWizardDialogImpl.lstPrivateStylePos is not selectedItemPos:
- FaxWizardDialogImpl.lstPrivateStylePos = selectedItemPos
+ if self.lstPrivateStylePos != selectedItemPos:
+ self.lstPrivateStylePos = selectedItemPos
TextDocument.xTextDocument = self.myFaxDoc.loadAsPreview(
self.PrivateFiles.values()[selectedItemPos], False)
self.initializeElements()
self.setElements()
def txtTemplateNameTextChanged(self):
+ # Change Template Title in Properties
xDocProps = TextDocument.xTextDocument.DocumentProperties
xDocProps.Title = self.txtTemplateName.Text
@@ -707,7 +687,6 @@ class FaxWizardDialogImpl(FaxWizardDialog):
Helper.setUnoPropertyValue(BPaperItem,
PropertyNames.PROPERTY_ENABLED, False)
-
def validatePath(self):
if self.myPathSelection.usedPathPicker:
self.filenameChanged = True
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java
deleted file mode 100644
index fce209faf65b..000000000000
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.fax;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.wizards.common.Resource;
-
-public class FaxWizardDialogResources extends Resource
-{
-
- final static String UNIT_NAME = "dbwizres";
- final static String MODULE_NAME = "dbw";
- final static int RID_FAXWIZARDDIALOG_START = 3200;
- final static int RID_FAXWIZARDCOMMUNICATION_START = 3270;
- final static int RID_FAXWIZARDGREETING_START = 3280;
- final static int RID_FAXWIZARDSALUTATION_START = 3290;
- final static int RID_FAXWIZARDROADMAP_START = 3300;
- final static int RID_RID_COMMON_START = 500;
- protected String[] RoadmapLabels = new String[7];
- protected String[] SalutationLabels = new String[4];
- protected String[] GreetingLabels = new String[4];
- protected String[] CommunicationLabels = new String[3];
- String resOverwriteWarning;
- String resTemplateDescription;
- String resFaxWizardDialog_title;
- String resLabel9_value;
- String resoptBusinessFax_value;
- String resoptPrivateFax_value;
- String reschkUseLogo_value;
- String reschkUseSubject_value;
- String reschkUseSalutation_value;
- String reschkUseGreeting_value;
- String reschkUseFooter_value;
- String resoptSenderPlaceholder_value;
- String resoptSenderDefine_value;
- String restxtTemplateName_value;
- String resoptCreateFax_value;
- String resoptMakeChanges_value;
- String reslblBusinessStyle_value;
- String reslblPrivateStyle_value;
- String reslblIntroduction_value;
- String reslblSenderAddress_value;
- String reslblSenderName_value;
- String reslblSenderStreet_value;
- String reslblPostCodeCity_value;
- String reslblFooter_value;
- String reslblFinalExplanation1_value;
- String reslblFinalExplanation2_value;
- String reslblTemplateName_value;
- String reslblTemplatePath_value;
- String reslblProceed_value;
- String reslblTitle1_value;
- String reslblTitle3_value;
- String reslblTitle4_value;
- String reslblTitle5_value;
- String reslblTitle6_value;
- String reschkFooterNextPages_value;
- String reschkFooterPageNumbers_value;
- String reschkUseDate_value;
- String reschkUseCommunicationType_value;
- String resLabel1_value;
- String resoptReceiverPlaceholder_value;
- String resoptReceiverDatabase_value;
- String resLabel2_value;
-
- String resToPlaceHolder = "#to#";
- String resFromPlaceHolder = "#from#";
- String resFaxconstPlaceHolder = "#faxconst#";
- String resTelconstPlaceHolder = "#telconst#";
- String resEmailconstPlaceHolder = "#emailconst#";
- String resConsist1PlaceHolder = "#consist1#";
- String resConsist2PlaceHolder = "#consist2#";
- String resConsist3PlaceHolder = "#consist3#";
-
- String resToPlaceHolder_value;
- String resFromPlaceHolder_value;
- String resFaxconstPlaceHolder_value;
- String resTelconstPlaceHolder_value;
- String resEmailconstPlaceHolder_value;
- String resConsist1PlaceHolder_value;
- String resConsist2PlaceHolder_value;
- String resConsist3PlaceHolder_value;
-
- String resPrivateFaxBottle;
- String resPrivateFaxLines;
- String resPrivateFaxMarine;
- String resBusinessFaxClassic;
- String resBusinessFaxClassicPrivate;
- String resBusinessFaxModern;
- String resBusinessFaxModernPrivate;
-
- public FaxWizardDialogResources(XMultiServiceFactory xmsf)
- {
- super(xmsf, UNIT_NAME, MODULE_NAME);
- /**
- * Delete the String, uncomment the getResText method
- *
- */
- resFaxWizardDialog_title = getResText(RID_FAXWIZARDDIALOG_START + 1);
- resLabel9_value = getResText(RID_FAXWIZARDDIALOG_START + 2);
- resoptBusinessFax_value = getResText(RID_FAXWIZARDDIALOG_START + 3);
- resoptPrivateFax_value = getResText(RID_FAXWIZARDDIALOG_START + 4);
- reschkUseLogo_value = getResText(RID_FAXWIZARDDIALOG_START + 5);
- reschkUseSubject_value = getResText(RID_FAXWIZARDDIALOG_START + 6);
- reschkUseSalutation_value = getResText(RID_FAXWIZARDDIALOG_START + 7);
- reschkUseGreeting_value = getResText(RID_FAXWIZARDDIALOG_START + 8);
- reschkUseFooter_value = getResText(RID_FAXWIZARDDIALOG_START + 9);
- resoptSenderPlaceholder_value = getResText(RID_FAXWIZARDDIALOG_START + 10);
- resoptSenderDefine_value = getResText(RID_FAXWIZARDDIALOG_START + 11);
- restxtTemplateName_value = getResText(RID_FAXWIZARDDIALOG_START + 12);
- resoptCreateFax_value = getResText(RID_FAXWIZARDDIALOG_START + 13);
- resoptMakeChanges_value = getResText(RID_FAXWIZARDDIALOG_START + 14);
- reslblBusinessStyle_value = getResText(RID_FAXWIZARDDIALOG_START + 15);
- reslblPrivateStyle_value = getResText(RID_FAXWIZARDDIALOG_START + 16);
- reslblIntroduction_value = getResText(RID_FAXWIZARDDIALOG_START + 17);
- reslblSenderAddress_value = getResText(RID_FAXWIZARDDIALOG_START + 18);
- reslblSenderName_value = getResText(RID_FAXWIZARDDIALOG_START + 19);
- reslblSenderStreet_value = getResText(RID_FAXWIZARDDIALOG_START + 20);
- reslblPostCodeCity_value = getResText(RID_FAXWIZARDDIALOG_START + 21);
- reslblFooter_value = getResText(RID_FAXWIZARDDIALOG_START + 22);
- reslblFinalExplanation1_value = getResText(RID_FAXWIZARDDIALOG_START + 23);
- reslblFinalExplanation2_value = getResText(RID_FAXWIZARDDIALOG_START + 24);
- reslblTemplateName_value = getResText(RID_FAXWIZARDDIALOG_START + 25);
- reslblTemplatePath_value = getResText(RID_FAXWIZARDDIALOG_START + 26);
- reslblProceed_value = getResText(RID_FAXWIZARDDIALOG_START + 27);
- reslblTitle1_value = getResText(RID_FAXWIZARDDIALOG_START + 28);
- reslblTitle3_value = getResText(RID_FAXWIZARDDIALOG_START + 29);
- reslblTitle4_value = getResText(RID_FAXWIZARDDIALOG_START + 30);
- reslblTitle5_value = getResText(RID_FAXWIZARDDIALOG_START + 31);
- reslblTitle6_value = getResText(RID_FAXWIZARDDIALOG_START + 32);
- reschkFooterNextPages_value = getResText(RID_FAXWIZARDDIALOG_START + 33);
- reschkFooterPageNumbers_value = getResText(RID_FAXWIZARDDIALOG_START + 34);
- reschkUseDate_value = getResText(RID_FAXWIZARDDIALOG_START + 35);
- reschkUseCommunicationType_value = getResText(RID_FAXWIZARDDIALOG_START + 36);
- resLabel1_value = getResText(RID_FAXWIZARDDIALOG_START + 37);
- resoptReceiverPlaceholder_value = getResText(RID_FAXWIZARDDIALOG_START + 38);
- resoptReceiverDatabase_value = getResText(RID_FAXWIZARDDIALOG_START + 39);
- resLabel2_value = getResText(RID_FAXWIZARDDIALOG_START + 40);
-
- resToPlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 41);
- resFromPlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 42);
- resFaxconstPlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 43);
- resTelconstPlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 44);
- resEmailconstPlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 45);
- resConsist1PlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 46);
- resConsist2PlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 47);
- resConsist3PlaceHolder_value = getResText(RID_FAXWIZARDDIALOG_START + 48);
-
- resPrivateFaxBottle = getResText(RID_FAXWIZARDDIALOG_START + 49);
- resPrivateFaxLines = getResText(RID_FAXWIZARDDIALOG_START + 50);
- resPrivateFaxMarine = getResText(RID_FAXWIZARDDIALOG_START + 51);
- resBusinessFaxClassic = getResText(RID_FAXWIZARDDIALOG_START + 52);
- resBusinessFaxClassicPrivate = getResText(RID_FAXWIZARDDIALOG_START + 53);
- resBusinessFaxModern = getResText(RID_FAXWIZARDDIALOG_START + 54);
- resBusinessFaxModernPrivate = getResText(RID_FAXWIZARDDIALOG_START + 55);
-
- loadRoadmapResources();
- loadSalutationResources();
- loadGreetingResources();
- loadCommunicationResources();
- loadCommonResources();
- }
-
- private void loadCommonResources()
- {
- resOverwriteWarning = getResText(RID_RID_COMMON_START + 19);
- resTemplateDescription = getResText(RID_RID_COMMON_START + 20);
- }
-
- private void loadRoadmapResources()
- {
- for (int i = 1; i < 6; i++)
- {
- RoadmapLabels[i] = getResText(RID_FAXWIZARDROADMAP_START + i);
- }
- }
-
- private void loadSalutationResources()
- {
- for (int i = 1; i < 5; i++)
- {
- SalutationLabels[i - 1] = getResText(RID_FAXWIZARDSALUTATION_START + i);
- }
- }
-
- private void loadGreetingResources()
- {
- for (int i = 1; i < 5; i++)
- {
- GreetingLabels[i - 1] = getResText(RID_FAXWIZARDGREETING_START + i);
- }
- }
-
- private void loadCommunicationResources()
- {
- for (int i = 1; i < 4; i++)
- {
- CommunicationLabels[i - 1] = getResText(RID_FAXWIZARDCOMMUNICATION_START + i);
- }
- }
-}
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
index 7cf37031a93b..a02835a0374f 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py
@@ -25,15 +25,6 @@ class FaxWizardDialogResources(Resource):
RID_FAXWIZARDSALUTATION_START = 3290
RID_FAXWIZARDROADMAP_START = 3300
RID_RID_COMMON_START = 500
-
- resToPlaceHolder = "#to#"
- resFromPlaceHolder = "#from#"
- resFaxconstPlaceHolder = "#faxconst#"
- resTelconstPlaceHolder = "#telconst#"
- resEmailconstPlaceHolder = "#emailconst#"
- resConsist1PlaceHolder = "#consist1#"
- resConsist2PlaceHolder = "#consist2#"
- resConsist3PlaceHolder = "#consist3#"
def __init__(self, xmsf):
super(FaxWizardDialogResources,self).__init__(xmsf,
@@ -121,24 +112,24 @@ class FaxWizardDialogResources(Resource):
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 39)
self.resLabel2_value = self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 40)
-
+
#Create a Dictionary for the constants values.
self.dictConstants = {
- FaxWizardDialogResources.resToPlaceHolder : self.getResText(
+ "#to#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 41),
- FaxWizardDialogResources.resFromPlaceHolder : self.getResText(
+ "#from#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 42),
- FaxWizardDialogResources.resFaxconstPlaceHolder : self.getResText(
+ "#faxconst#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 43),
- FaxWizardDialogResources.resTelconstPlaceHolder : self.getResText(
+ "#telconst#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 44),
- FaxWizardDialogResources.resEmailconstPlaceHolder : self.getResText(
+ "#emailconst#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 45),
- FaxWizardDialogResources.resConsist1PlaceHolder : self.getResText(
+ "#consist1#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 46),
- FaxWizardDialogResources.resConsist2PlaceHolder : self.getResText(
+ "#consist2#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 47),
- FaxWizardDialogResources.resConsist3PlaceHolder : self.getResText(
+ "#consist3#" : self.getResText(
FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 48)}
#Create a dictionary for localising the private template
diff --git a/wizards/com/sun/star/wizards/fax/MANIFEST.MF b/wizards/com/sun/star/wizards/fax/MANIFEST.MF
deleted file mode 100644
index 4e699ee9073b..000000000000
--- a/wizards/com/sun/star/wizards/fax/MANIFEST.MF
+++ /dev/null
@@ -1,2 +0,0 @@
-RegistrationClassName: com.sun.star.wizards.fax.CallWizard
-UNO-Type-Path:
diff --git a/wizards/com/sun/star/wizards/fax/fax.component b/wizards/com/sun/star/wizards/fax/fax.component
index 6769ece0076a..abc871137fbf 100644
--- a/wizards/com/sun/star/wizards/fax/fax.component
+++ b/wizards/com/sun/star/wizards/fax/fax.component
@@ -15,12 +15,10 @@
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
- -->
-
-<component loader="com.sun.star.loader.Java2"
+-->
+<component loader="com.sun.star.loader.Python"
xmlns="http://openoffice.org/2010/uno-components">
- <implementation
- name="com.sun.star.wizards.fax.CallWizard$WizardImplementation">
- <service name="com.sun.star.wizards.fax.CallWizard"/>
+ <implementation name="com.sun.star.wizards.fax.CallWizard">
+ <service name="com.sun.star.task.Job"/>
</implementation>
</component>
diff --git a/wizards/com/sun/star/wizards/fax/pyfax.component b/wizards/com/sun/star/wizards/fax/pyfax.component
deleted file mode 100644
index abc871137fbf..000000000000
--- a/wizards/com/sun/star/wizards/fax/pyfax.component
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<component loader="com.sun.star.loader.Python"
- xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.wizards.fax.CallWizard">
- <service name="com.sun.star.task.Job"/>
- </implementation>
-</component>
diff --git a/wizards/com/sun/star/wizards/letter/CGLetter.java b/wizards/com/sun/star/wizards/letter/CGLetter.java
deleted file mode 100644
index b5c4eda783b9..000000000000
--- a/wizards/com/sun/star/wizards/letter/CGLetter.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.letter;
-
-import com.sun.star.wizards.common.ConfigGroup;
-
-public class CGLetter extends ConfigGroup
-{
-
- public int cp_Style;
- public boolean cp_BusinessPaper;
- public CGPaperElementLocation cp_CompanyLogo = new CGPaperElementLocation();
- public CGPaperElementLocation cp_CompanyAddress = new CGPaperElementLocation();
- public boolean cp_PaperCompanyAddressReceiverField;
- public boolean cp_PaperFooter;
- public double cp_PaperFooterHeight;
- public boolean cp_PrintCompanyLogo;
- public boolean cp_PrintCompanyAddressReceiverField;
- public boolean cp_PrintLetterSigns;
- public boolean cp_PrintSubjectLine;
- public boolean cp_PrintSalutation;
- public boolean cp_PrintBendMarks;
- public boolean cp_PrintGreeting;
- public boolean cp_PrintFooter;
- public String cp_Salutation;
- public String cp_Greeting;
- public int cp_SenderAddressType;
- public String cp_SenderCompanyName;
- public String cp_SenderStreet;
- public String cp_SenderPostCode;
- public String cp_SenderState;
- public String cp_SenderCity;
- public int cp_ReceiverAddressType;
- public String cp_Footer;
- public boolean cp_FooterOnlySecondPage;
- public boolean cp_FooterPageNumbers;
- public int cp_CreationType;
- public String cp_TemplateName;
- public String cp_TemplatePath;
-}
diff --git a/wizards/com/sun/star/wizards/letter/CGLetter.py b/wizards/com/sun/star/wizards/letter/CGLetter.py
index 0a464cb7c870..cf9bd76fe07f 100644
--- a/wizards/com/sun/star/wizards/letter/CGLetter.py
+++ b/wizards/com/sun/star/wizards/letter/CGLetter.py
@@ -15,9 +15,8 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-from wizards.common.ConfigGroup import *
-from wizards.common.ConfigGroup import *
-from CGPaperElementLocation import CGPaperElementLocation
+from .CGPaperElementLocation import CGPaperElementLocation
+from ..common.ConfigGroup import ConfigGroup
class CGLetter(ConfigGroup):
@@ -29,7 +28,6 @@ class CGLetter(ConfigGroup):
self.cp_PaperCompanyAddressReceiverField = bool()
self.cp_PaperFooter = bool()
self.cp_PaperFooterHeight = float()
- self.cp_Norm = int()
self.cp_PrintCompanyLogo = bool()
self.cp_PrintCompanyAddressReceiverField = bool()
self.cp_PrintLetterSigns = bool()
diff --git a/wizards/com/sun/star/wizards/letter/CGLetterWizard.java b/wizards/com/sun/star/wizards/letter/CGLetterWizard.java
deleted file mode 100644
index 3f61c1bc0733..000000000000
--- a/wizards/com/sun/star/wizards/letter/CGLetterWizard.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.letter;
-
-import com.sun.star.wizards.common.ConfigGroup;
-
-public class CGLetterWizard extends ConfigGroup
-{
-
- public int cp_LetterType;
- public CGLetter cp_BusinessLetter = new CGLetter();
- public CGLetter cp_PrivateOfficialLetter = new CGLetter();
- public CGLetter cp_PrivateLetter = new CGLetter();
-}
diff --git a/wizards/com/sun/star/wizards/letter/CGLetterWizard.py b/wizards/com/sun/star/wizards/letter/CGLetterWizard.py
index 508ee51d2758..eb1051c44696 100644
--- a/wizards/com/sun/star/wizards/letter/CGLetterWizard.py
+++ b/wizards/com/sun/star/wizards/letter/CGLetterWizard.py
@@ -15,9 +15,8 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-from wizards.common.ConfigGroup import *
-from wizards.common.ConfigGroup import *
-from CGLetter import CGLetter
+from ..common.ConfigGroup import ConfigGroup
+from .CGLetter import CGLetter
class CGLetterWizard (ConfigGroup):
diff --git a/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java b/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java
deleted file mode 100644
index 5b3d0661b6f3..000000000000
--- a/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.letter;
-
-import com.sun.star.wizards.common.ConfigGroup;
-
-public class CGPaperElementLocation extends ConfigGroup
-{
-
- public boolean cp_Display;
- public double cp_Width;
- public double cp_Height;
- public double cp_X;
- public double cp_Y;
-}
diff --git a/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py b/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py
index 3b30f0db2673..c57dde909919 100644
--- a/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py
+++ b/wizards/com/sun/star/wizards/letter/CGPaperElementLocation.py
@@ -15,8 +15,7 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-from wizards.common.ConfigGroup import *
-from wizards.common.ConfigGroup import *
+from ..common.ConfigGroup import ConfigGroup
class CGPaperElementLocation(ConfigGroup):
diff --git a/wizards/com/sun/star/wizards/letter/CallWizard.java b/wizards/com/sun/star/wizards/letter/CallWizard.java
deleted file mode 100644
index 2276f0356dbd..000000000000
--- a/wizards/com/sun/star/wizards/letter/CallWizard.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.letter;
-
-import com.sun.star.beans.XPropertyAccess;
-import com.sun.star.comp.loader.FactoryHelper;
-import com.sun.star.lang.XInitialization;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.lang.XServiceInfo;
-import com.sun.star.lang.XSingleServiceFactory;
-import com.sun.star.lang.XTypeProvider;
-import com.sun.star.registry.XRegistryKey;
-import com.sun.star.task.XJob;
-import com.sun.star.task.XJobExecutor;
-import com.sun.star.uno.Type;
-import com.sun.star.wizards.common.PropertyNames;
-
-/**
- * This class capsulates the class, that implements the minimal component, a factory for
- * creating the service (<CODE>__getServiceFactory</CODE>).
- */
-public class CallWizard
-{
-
- /**
- * Gives a factory for creating the service. This method is called by the
- * <code>JavaLoader</code>
- *
- * <p></p>
- *
- * @param stringImplementationName The implementation name of the component.
- * @param xMSF The service manager, who gives access to every known service.
- * @param xregistrykey Makes structural information (except regarding tree
- * structures) of a single registry key accessible.
- *
- * @return Returns a <code>XSingleServiceFactory</code> for creating the component.
- *
- * @see com.sun.star.comp.loader.JavaLoader
- */
- public static XSingleServiceFactory __getServiceFactory(String stringImplementationName, XMultiServiceFactory xMSF, XRegistryKey xregistrykey)
- {
- XSingleServiceFactory xsingleservicefactory = null;
-
- if (stringImplementationName.equals(WizardImplementation.class.getName()))
- {
- xsingleservicefactory = FactoryHelper.getServiceFactory(WizardImplementation.class, WizardImplementation.__serviceName, xMSF, xregistrykey);
- }
-
- return xsingleservicefactory;
- }
-
- /**
- * This class implements the component. At least the interfaces XServiceInfo,
- * XTypeProvider, and XInitialization should be provided by the service.
- */
- public static class WizardImplementation implements XInitialization, XTypeProvider, XServiceInfo, XJobExecutor
- {
-
- /**
- * The constructor of the inner class has a XMultiServiceFactory parameter.
- *
- * @param xmultiservicefactoryInitialization A special service factory could be
- * introduced while initializing.
- */
- public WizardImplementation(XMultiServiceFactory xmultiservicefactoryInitialization)
- {
- xmultiservicefactory = xmultiservicefactoryInitialization;
-
- if (xmultiservicefactory != null)
- {
- }
- }
-
- /**
- * Execute Wizard
- *
- * @param str only valid parameter is 'start' at the moment.
- */
- public void trigger(String str)
- {
- if (str.equalsIgnoreCase(PropertyNames.START))
- {
- LetterWizardDialogImpl lw = new LetterWizardDialogImpl(xmultiservicefactory);
- if (!LetterWizardDialogImpl.running)
- {
- lw.startWizard(xmultiservicefactory, null);
- }
- }
- } //*******************************************
- /**
- * The service name, that must be used to get an instance of this service.
- */
- private static final String __serviceName = "com.sun.star.wizards.letter.CallWizard";
- /**
- * The service manager, that gives access to all registered services.
- */
- private XMultiServiceFactory xmultiservicefactory;
-
- /**
- * This method is a member of the interface for initializing an object directly
- * after its creation.
- *
- * @param object This array of arbitrary objects will be passed to the component
- * after its creation.
- *
- * @throws com.sun.star.uno.Exception Every exception will not be handled, but
- * will be passed to the caller.
- */
- public void initialize(Object[] object) throws com.sun.star.uno.Exception
- {
- }
-
- /**
- * This method returns an array of all supported service names.
- *
- * @return Array of supported service names.
- */
- public java.lang.String[] getSupportedServiceNames()
- {
- String[] stringSupportedServiceNames = new String[1];
- stringSupportedServiceNames[0] = __serviceName;
-
- return (stringSupportedServiceNames);
- }
-
- /**
- * This method returns true, if the given service will be supported by the
- * component.
- *
- * @param stringService Service name.
- *
- * @return True, if the given service name will be supported.
- */
- public boolean supportsService(String stringService)
- {
- boolean booleanSupportsService = false;
-
- if (stringService.equals(__serviceName))
- {
- booleanSupportsService = true;
- }
-
- return (booleanSupportsService);
- }
-
- /**
- * This method returns an array of bytes, that can be used to unambiguously
- * distinguish between two sets of types, e.g. to realise hashing functionality
- * when the object is introspected. Two objects that return the same ID also
- * have to return the same set of types in getTypes(). If an unique
- * implementation Id cannot be provided this method has to return an empty
- * sequence. Important: If the object aggregates other objects the ID has to be
- * unique for the whole combination of objects.
- *
- * @return Array of bytes, in order to distinguish between two sets.
- */
- public byte[] getImplementationId()
- {
- byte[] byteReturn =
- {
- };
-
- try
- {
- byteReturn = (PropertyNames.EMPTY_STRING + this.hashCode()).getBytes();
- }
- catch (Exception exception)
- {
- System.err.println(exception);
- }
-
- return (byteReturn);
- }
-
- /**
- * Return the class name of the component.
- *
- * @return Class name of the component.
- */
- public java.lang.String getImplementationName()
- {
- return (WizardImplementation.class.getName());
- }
-
- /**
- * Provides a sequence of all types (usually interface types) provided by the
- * object.
- *
- * @return Sequence of all types (usually interface types) provided by the
- * service.
- */
- public com.sun.star.uno.Type[] getTypes()
- {
- Type[] typeReturn =
- {
- };
-
- try
- {
- typeReturn = new Type[]
- {
- new Type(XPropertyAccess.class), new Type(XJob.class), new Type(XJobExecutor.class), new Type(XTypeProvider.class), new Type(XServiceInfo.class), new Type(XInitialization.class)
- };
- }
- catch (Exception exception)
- {
- System.err.println(exception);
- }
-
- return (typeReturn);
- }
- }
-}
diff --git a/wizards/com/sun/star/wizards/letter/CallWizard.py b/wizards/com/sun/star/wizards/letter/CallWizard.py
new file mode 100644
index 000000000000..f2b071e0cd1c
--- /dev/null
+++ b/wizards/com/sun/star/wizards/letter/CallWizard.py
@@ -0,0 +1,50 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to you under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+import unohelper
+import traceback
+
+from .LetterWizardDialogImpl import LetterWizardDialogImpl
+
+from com.sun.star.task import XJobExecutor
+
+# implement a UNO component by deriving from the standard unohelper.Base class
+# and from the interface(s) you want to implement.
+class CallWizard(unohelper.Base, XJobExecutor):
+ def __init__(self, ctx):
+ # store the component context for later use
+ self.ctx = ctx
+
+ def trigger(self, args):
+ try:
+ lw = LetterWizardDialogImpl(self.ctx.ServiceManager)
+ lw.startWizard(self.ctx.ServiceManager)
+ except Exception as e:
+ print ("Wizard failure exception " + str(type(e)) +
+ " message " + str(e) + " args " + str(e.args) +
+ traceback.format_exc())
+
+# pythonloader looks for a static g_ImplementationHelper variable
+g_ImplementationHelper = unohelper.ImplementationHelper()
+
+g_ImplementationHelper.addImplementation( \
+ CallWizard, # UNO object class
+ "com.sun.star.wizards.letter.CallWizard", # implemenation name
+ ("com.sun.star.task.Job",),) # list of implemented services
+ # (the only service)
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.java b/wizards/com/sun/star/wizards/letter/LetterDocument.java
deleted file mode 100644
index fd2ca0cf408b..000000000000
--- a/wizards/com/sun/star/wizards/letter/LetterDocument.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.letter;
-
-import com.sun.star.wizards.common.*;
-import com.sun.star.wizards.text.*;
-import com.sun.star.frame.XDesktop;
-import com.sun.star.frame.XTerminateListener;
-import com.sun.star.table.BorderLine;
-import com.sun.star.text.*;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.drawing.XShape;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.style.NumberingType;
-import com.sun.star.style.ParagraphAdjust;
-import com.sun.star.style.XStyleFamiliesSupplier;
-import com.sun.star.style.XStyle;
-
-public class LetterDocument extends TextDocument
-{
-
- XDesktop xDesktop;
- boolean keepLogoFrame = true;
- boolean keepBendMarksFrame = true;
- boolean keepLetterSignsFrame = true;
- boolean keepSenderAddressRepeatedFrame = true;
- boolean keepAddressFrame = true;
-
- public LetterDocument(XMultiServiceFactory xMSF, XTerminateListener listener)
- {
- super(xMSF, listener, "WIZARD_LIVE_PREVIEW");
- }
-
- public XWindowPeer getWindowPeer()
- {
- return UnoRuntime.queryInterface(XWindowPeer.class, xTextDocument);
-}
-
- public void switchElement(String sElement, boolean bState)
- {
- try
- {
- TextSectionHandler mySectionHandler = new TextSectionHandler(xMSF, xTextDocument);
- Object oSection = mySectionHandler.xTextSectionsSupplier.getTextSections().getByName(sElement);
- Helper.setUnoPropertyValue(oSection, "IsVisible", Boolean.valueOf(bState));
-
- }
- catch (Exception exception)
- {
- exception.printStackTrace(System.err);
- }
- }
-
- public void updateDateFields()
- {
- TextFieldHandler FH = new TextFieldHandler(xMSFDoc, xTextDocument);
- FH.updateDateFields();
- }
-
- public void switchFooter(String sPageStyle, boolean bState, boolean bPageNumber, String sText)
- {
- if (xTextDocument != null)
- {
- try
- {
- xTextDocument.lockControllers();
- XStyleFamiliesSupplier xStyleFamiliesSupplier = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDocument);
- com.sun.star.container.XNameAccess xNameAccess = null;
- xNameAccess = xStyleFamiliesSupplier.getStyleFamilies();
-
- com.sun.star.container.XNameContainer xPageStyleCollection = null;
- xPageStyleCollection = UnoRuntime.queryInterface(com.sun.star.container.XNameContainer.class, xNameAccess.getByName("PageStyles"));
-
- XText xFooterText;
- XStyle xPageStyle = UnoRuntime.queryInterface(XStyle.class, xPageStyleCollection.getByName(sPageStyle));
-
- if (bState)
- {
- Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.TRUE);
- xFooterText = UnoRuntime.queryInterface(XText.class, Helper.getUnoPropertyValue(xPageStyle, "FooterText"));
- xFooterText.setString(sText);
- if (bPageNumber)
- {
- //Adding the Page Number
- XTextCursor myCursor = xFooterText.createTextCursor();
- myCursor.gotoEnd(false);
- xFooterText.insertControlCharacter(myCursor, ControlCharacter.PARAGRAPH_BREAK, false);
- XPropertySet xCursorPSet = UnoRuntime.queryInterface(XPropertySet.class, myCursor);
- xCursorPSet.setPropertyValue("ParaAdjust", ParagraphAdjust.CENTER);
- XTextField xPageNumberField = UnoRuntime.queryInterface(XTextField.class, xMSFDoc.createInstance("com.sun.star.text.TextField.PageNumber"));
- XPropertySet xPSet = UnoRuntime.queryInterface(XPropertySet.class, xPageNumberField);
- xPSet.setPropertyValue("SubType", PageNumberType.CURRENT);
- xPSet.setPropertyValue("NumberingType", new Short(NumberingType.ARABIC));
- xFooterText.insertTextContent(xFooterText.getEnd(), xPageNumberField, false);
- }
- }
- else
- {
- Helper.setUnoPropertyValue(xPageStyle, "FooterIsOn", Boolean.FALSE);
- }
- xTextDocument.unlockControllers();
- }
- catch (Exception exception)
- {
- exception.printStackTrace(System.err);
- }
- }
- }
-
- public boolean hasElement(String sElement)
- {
- if (xTextDocument != null)
- {
- TextSectionHandler SH = new TextSectionHandler(xMSF, xTextDocument);
- return SH.hasTextSectionByName(sElement);
- }
- else
- {
- return false;
- }
- }
-
- public void switchUserField(String sFieldName, String sNewContent, boolean bState)
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(xMSF, xTextDocument);
- if (bState)
- {
- myFieldHandler.changeUserFieldContent(sFieldName, sNewContent);
- }
- else
- {
- myFieldHandler.changeUserFieldContent(sFieldName, PropertyNames.EMPTY_STRING);
- }
- }
-
- public void fillSenderWithUserData()
- {
- try
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(xMSFDoc, xTextDocument);
- Object oUserDataAccess = Configuration.getConfigurationRoot(xMSF, "org.openoffice.UserProfile/Data", false);
- myFieldHandler.changeUserFieldContent("Company", (String) Helper.getUnoObjectbyName(oUserDataAccess, "o"));
- myFieldHandler.changeUserFieldContent("Street", (String) Helper.getUnoObjectbyName(oUserDataAccess, "street"));
- myFieldHandler.changeUserFieldContent("PostCode", (String) Helper.getUnoObjectbyName(oUserDataAccess, "postalcode"));
- myFieldHandler.changeUserFieldContent("City", (String) Helper.getUnoObjectbyName(oUserDataAccess, "l"));
- myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, (String) Helper.getUnoObjectbyName(oUserDataAccess, "st"));
- }
- catch (Exception exception)
- {
- exception.printStackTrace(System.err);
- }
- }
-
- public void killEmptyUserFields()
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(xMSF, xTextDocument);
- myFieldHandler.removeUserFieldByContent(PropertyNames.EMPTY_STRING);
- }
-
- public void killEmptyFrames()
- {
- try
- {
- if (!keepLogoFrame)
- {
- XTextFrame xTF = TextFrameHandler.getFrameByName("Company Logo", xTextDocument);
- if (xTF != null)
- {
- xTF.dispose();
- }
- }
- if (!keepBendMarksFrame)
- {
- XTextFrame xTF = TextFrameHandler.getFrameByName("Bend Marks", xTextDocument);
- if (xTF != null)
- {
- xTF.dispose();
- }
- }
- if (!keepLetterSignsFrame)
- {
- XTextFrame xTF = TextFrameHandler.getFrameByName("Letter Signs", xTextDocument);
- if (xTF != null)
- {
- xTF.dispose();
- }
- }
- if (!keepSenderAddressRepeatedFrame)
- {
- XTextFrame xTF = TextFrameHandler.getFrameByName("Sender Address Repeated", xTextDocument);
- if (xTF != null)
- {
- xTF.dispose();
- }
- }
- if (!keepAddressFrame)
- {
- XTextFrame xTF = TextFrameHandler.getFrameByName("Sender Address", xTextDocument);
- if (xTF != null)
- {
- xTF.dispose();
- }
- }
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- }
-
- public class BusinessPaperObject
- {
-
- public int iWidth;
- public int iHeight;
- public int iXPos;
- public int iYPos;
- XTextFrame xFrame;
- XShape xShape;
-
- public BusinessPaperObject(String FrameText, int Width, int Height, int XPos, int YPos)
- {
-
- iWidth = Width;
- iHeight = Height;
- iXPos = XPos;
- iYPos = YPos;
-
- try
- {
- xFrame = UnoRuntime.queryInterface(XTextFrame.class, xMSFDoc.createInstance("com.sun.star.text.TextFrame"));
- xShape = UnoRuntime.queryInterface(XShape.class, xFrame);
-
- setFramePosition();
- Helper.setUnoPropertyValue(xShape, "AnchorType", TextContentAnchorType.AT_PAGE);
- Helper.setUnoPropertyValue(xShape, "SizeType", new Short(SizeType.FIX));
-
- Helper.setUnoPropertyValue(xFrame, "TextWrap", WrapTextMode.THROUGHT);
- Helper.setUnoPropertyValue(xFrame, "Opaque", Boolean.TRUE);
- Helper.setUnoPropertyValue(xFrame, "BackColor", 15790320);
-
- BorderLine myBorder = new BorderLine();
- myBorder.OuterLineWidth = 0;
- Helper.setUnoPropertyValue(xFrame, "LeftBorder", myBorder);
- Helper.setUnoPropertyValue(xFrame, "RightBorder", myBorder);
- Helper.setUnoPropertyValue(xFrame, "TopBorder", myBorder);
- Helper.setUnoPropertyValue(xFrame, "BottomBorder", myBorder);
- Helper.setUnoPropertyValue(xFrame, "Print", Boolean.FALSE);
-
- XTextCursor xTextCursor = xTextDocument.getText().createTextCursor();
- xTextCursor.gotoEnd(true);
- XText xText = xTextDocument.getText();
- xText.insertTextContent(xTextCursor, xFrame, false);
-
- XText xFrameText = xFrame.getText();
- XTextCursor xFrameCursor = xFrameText.createTextCursor();
- XPropertySet xCursorProps = UnoRuntime.queryInterface(XPropertySet.class, xFrameCursor);
- xCursorProps.setPropertyValue("CharWeight", new Float(com.sun.star.awt.FontWeight.BOLD));
- xCursorProps.setPropertyValue("CharColor", 16777215);
- xCursorProps.setPropertyValue("CharFontName", "Albany");
- xCursorProps.setPropertyValue("CharHeight", new Float(18));
-
- xFrameText.insertString(xFrameCursor, FrameText, false);
-
- }
- catch (Exception e)
- {
- e.printStackTrace(System.err);
- }
- }
-
- public void setFramePosition()
- {
- Helper.setUnoPropertyValue(xFrame, "HoriOrient", new Short(HoriOrientation.NONE));
- Helper.setUnoPropertyValue(xFrame, "VertOrient", new Short(VertOrientation.NONE));
- Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_HEIGHT, new Integer(iHeight));
- Helper.setUnoPropertyValue(xFrame, PropertyNames.PROPERTY_WIDTH, new Integer(iWidth));
- Helper.setUnoPropertyValue(xFrame, "HoriOrientPosition", new Integer(iXPos));
- Helper.setUnoPropertyValue(xFrame, "VertOrientPosition", new Integer(iYPos));
- Helper.setUnoPropertyValue(xFrame, "HoriOrientRelation", new Short(RelOrientation.PAGE_FRAME));
- Helper.setUnoPropertyValue(xFrame, "VertOrientRelation", new Short(RelOrientation.PAGE_FRAME));
- }
-
- public void removeFrame()
- {
- if (xFrame != null)
- {
- try
- {
- xTextDocument.getText().removeTextContent(xFrame);
- }
- catch (Exception e)
- {
- e.printStackTrace(System.err);
- }
- }
- }
- }
-}
diff --git a/wizards/com/sun/star/wizards/letter/LetterDocument.py b/wizards/com/sun/star/wizards/letter/LetterDocument.py
index 0502b7dcf565..61baa5b643f7 100644
--- a/wizards/com/sun/star/wizards/letter/LetterDocument.py
+++ b/wizards/com/sun/star/wizards/letter/LetterDocument.py
@@ -15,10 +15,10 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-from wizards.text.TextDocument import *
-from wizards.text.TextDocument import *
-from wizards.text.TextSectionHandler import TextSectionHandler
-from wizards.common.PropertyNames import PropertyNames
+from ..text.TextDocument import TextDocument, traceback, Helper, \
+ TextFieldHandler, Configuration
+from ..text.TextSectionHandler import TextSectionHandler
+from ..common.PropertyNames import PropertyNames
from com.sun.star.table import BorderLine
from com.sun.star.text.ControlCharacter import PARAGRAPH_BREAK
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java
deleted file mode 100644
index ef27af49f547..000000000000
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.java
+++ /dev/null
@@ -1,883 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.letter;
-
-import com.sun.star.awt.*;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.wizards.common.*;
-import com.sun.star.wizards.ui.*;
-
-public abstract class LetterWizardDialog extends WizardDialog implements LetterWizardDialogConst, UIConsts
-{
- //GUI Components as Class members.
- XRadioButton optBusinessLetter;
- XListBox lstBusinessStyle;
- XCheckBox chkBusinessPaper;
- XRadioButton optPrivOfficialLetter;
- XListBox lstPrivOfficialStyle;
- XRadioButton optPrivateLetter;
- XListBox lstPrivateStyle;
- XFixedText lblBusinessStyle;
- XFixedText lblPrivOfficialStyle;
- XFixedText lblTitle1;
- XFixedText lblPrivateStyle;
- XFixedText lblIntroduction;
- //Image Control
- XControl ImageControl3;
- XCheckBox chkPaperCompanyLogo;
- XNumericField numLogoHeight;
- XNumericField numLogoX;
- XNumericField numLogoWidth;
- XNumericField numLogoY;
- XCheckBox chkPaperCompanyAddress;
- XNumericField numAddressHeight;
- XNumericField numAddressX;
- XNumericField numAddressWidth;
- XNumericField numAddressY;
- XCheckBox chkCompanyReceiver;
- XCheckBox chkPaperFooter;
- XNumericField numFooterHeight;
- XFixedText lblLogoHeight;
- XFixedText lblLogoWidth;
- //Fixed Line
- XControl FixedLine5;
- //Fixed Line
- XControl FixedLine6;
- XFixedText lblFooterHeight;
- XFixedText lblLogoX;
- XFixedText lblLogoY;
- XFixedText lblAddressHeight;
- XFixedText lblAddressWidth;
- XFixedText lblAddressX;
- XFixedText lblAddressY;
- XFixedText lblTitle2;
- XCheckBox chkUseLogo;
- XCheckBox chkUseAddressReceiver;
- XCheckBox chkUseSigns;
- XCheckBox chkUseSubject;
- XCheckBox chkUseSalutation;
- XComboBox lstSalutation;
- XCheckBox chkUseBendMarks;
- XCheckBox chkUseGreeting;
- XComboBox lstGreeting;
- XCheckBox chkUseFooter;
- XFixedText lblTitle3;
- XRadioButton optSenderPlaceholder;
- XRadioButton optSenderDefine;
- XTextComponent txtSenderName;
- XTextComponent txtSenderStreet;
- XTextComponent txtSenderPostCode;
- XTextComponent txtSenderState;
- XTextComponent txtSenderCity;
- XRadioButton optReceiverPlaceholder;
- XRadioButton optReceiverDatabase;
- XFixedText lblSenderAddress;
- //Fixed Line
- XControl FixedLine2;
- XFixedText lblReceiverAddress;
- XFixedText lblSenderName;
- XFixedText lblSenderStreet;
- XFixedText lblPostCodeCity;
- XFixedText lblTitle4;
- XTextComponent txtFooter;
- XCheckBox chkFooterNextPages;
- XCheckBox chkFooterPageNumbers;
- XFixedText lblFooter;
- XFixedText lblTitle5;
- XTextComponent txtTemplateName;
- //File Control
- XControl fileTemplatePath;
- XRadioButton optCreateLetter;
- XRadioButton optMakeChanges;
- XFixedText lblFinalExplanation1;
- XFixedText lblProceed;
- XFixedText lblFinalExplanation2;
- //Image Control
- XControl ImageControl2;
- XFixedText lblTemplateName;
- XFixedText lblTemplatePath;
- XFixedText lblTitle6;
- XFixedText Label9;
- //Font Descriptors as Class members.
- FontDescriptor fontDescriptor1 = new FontDescriptor();
- FontDescriptor fontDescriptor2 = new FontDescriptor();
- FontDescriptor fontDescriptor5 = new FontDescriptor();
- FontDescriptor fontDescriptor6 = new FontDescriptor(); //Resources Object
- LetterWizardDialogResources resources;
-
- public LetterWizardDialog(XMultiServiceFactory xmsf)
- {
- super(xmsf, HIDMAIN);
- //Load Resources
- resources = new LetterWizardDialogResources(xmsf);
-
-
- //set dialog properties...
- Helper.setUnoPropertyValues(xDialogModel,
- new String[]
- {
- PropertyNames.PROPERTY_CLOSEABLE, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_MOVEABLE, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_TITLE, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- Boolean.TRUE, 210, Boolean.TRUE, "LetterWizardDialog", 104, 52, INTEGERS[1], new Short((short) 1), resources.resLetterWizardDialog_title, 310
- });
-
-
-
- //Set member- FontDescriptors...
- fontDescriptor1.Weight = 150;
- fontDescriptor1.Underline = com.sun.star.awt.FontUnderline.SINGLE;
- fontDescriptor2.Weight = 100;
- fontDescriptor5.Weight = 100;
- fontDescriptor6.Weight = 150;
- }
- //build components
- public void buildStep1()
- {
- optBusinessLetter = insertRadioButton("optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 1), resources.resoptBusinessLetter_value, "optBusinessLetter", 97, 28, INTEGERS[1], new Short((short) 1), 184
- });
- optPrivOfficialLetter = insertRadioButton("optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 2), resources.resoptPrivOfficialLetter_value, "optPrivOfficialLetter", 97, 74, INTEGERS[1], new Short((short) 2), 184
- });
- optPrivateLetter = insertRadioButton("optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 3), resources.resoptPrivateLetter_value, "optPrivateLetter", 97, 106, INTEGERS[1], new Short((short) 3), 184
- });
- lstBusinessStyle = insertListBox("lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED, LSTBUSINESSSTYLE_ITEM_CHANGED,
- new String[]
- {
- "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
- },
- new Object[]
- {
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 4), "lstBusinessStyle", 180, INTEGER_40, INTEGERS[1], new Short((short) 4), 74
- });
- chkBusinessPaper = insertCheckBox("chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 5), resources.reschkBusinessPaper_value, "chkBusinessPaper", 110, 56, new Short((short) 0), INTEGERS[1], new Short((short) 5), 168
- });
- lstPrivOfficialStyle = insertListBox("lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED, LSTPRIVOFFICIALSTYLE_ITEM_CHANGED,
- new String[]
- {
- "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
- },
- new Object[]
- {
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 6), "lstPrivOfficialStyle", 180, 86, INTEGERS[1], new Short((short) 6), 74
- });
- lstPrivateStyle = insertListBox("lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED, LSTPRIVATESTYLE_ITEM_CHANGED,
- new String[]
- {
- "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
- },
- new Object[]
- {
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 7), "lstPrivateStyle", 180, 118, INTEGERS[1], new Short((short) 7), 74
- });
- lblBusinessStyle = insertLabel("lblBusinessStyle",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblBusinessStyle_value, "lblBusinessStyle", 110, 42, INTEGERS[1], new Short((short) 48), 60
- });
- lblPrivOfficialStyle = insertLabel("lblPrivOfficialStyle",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblPrivOfficialStyle_value, "lblPrivOfficialStyle", 110, 88, INTEGERS[1], new Short((short) 49), 60
- });
- lblTitle1 = insertLabel("lblTitle1",
- new String[]
- {
- PropertyNames.FONT_DESCRIPTOR, 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
- },
- new Object[]
- {
- fontDescriptor6, INTEGER_16, resources.reslblTitle1_value, Boolean.TRUE, "lblTitle1", 91, INTEGERS[8], INTEGERS[1], new Short((short) 55), 212
- });
- lblPrivateStyle = insertLabel("lblPrivateStyle",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblPrivateStyle_value, "lblPrivateStyle", 110, 120, INTEGERS[1], new Short((short) 74), 60
- });
- lblIntroduction = insertLabel("lblIntroduction",
- new String[]
- {
- 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
- },
- new Object[]
- {
- 39, resources.reslblIntroduction_value, Boolean.TRUE, "lblIntroduction", 104, 145, INTEGERS[1], new Short((short) 80), 199
- });
- ImageControl3 = insertInfoImage(92, 145, 1);
-
-// ImageControl3 = insertImage("ImageControl3",
-// new String[] {PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH},
-// new Object[] { new Short((short)0), INTEGERS[10],"private:resource/dbu/image/19205","ImageControl3",92,145,Boolean.FALSE,INTEGERS[1],new Short((short)81),INTEGERS[10]}
-// );
- }
-
- public void buildStep2()
- {
- chkPaperCompanyLogo = insertCheckBox("chkPaperCompanyLogo", CHKPAPERCOMPANYLOGO_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 8), resources.reschkPaperCompanyLogo_value, "chkPaperCompanyLogo", 97, 28, new Short((short) 0), INTEGERS[2], new Short((short) 8), 68
- });
- numLogoHeight = insertNumericField("numLogoHeight", NUMLOGOHEIGHT_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, "StrictFormat", PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 9), "numLogoHeight", 138, INTEGER_40, Boolean.TRUE, INTEGERS[2], Boolean.TRUE, new Short((short) 9), INTEGERS[3], 30
- });
- numLogoX = insertNumericField("numLogoX", NUMLOGOX_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 10), "numLogoX", 266, INTEGER_40, Boolean.TRUE, INTEGERS[2], new Short((short) 10), INTEGERS[0], 30
- });
- numLogoWidth = insertNumericField("numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 11), "numLogoWidth", 138, 56, Boolean.TRUE, INTEGERS[2], new Short((short) 11), new Double(3.8), 30
- });
- numLogoY = insertNumericField("numLogoY", NUMLOGOY_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 12), "numLogoY", 266, 56, Boolean.TRUE, INTEGERS[2], new Short((short) 12), new Double(-3.4), 30
- });
- chkPaperCompanyAddress = insertCheckBox("chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 13), resources.reschkPaperCompanyAddress_value, "chkPaperCompanyAddress", 98, 84, new Short((short) 0), INTEGERS[2], new Short((short) 13), 68
- });
- numAddressHeight = insertNumericField("numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, "StrictFormat", PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 14), "numAddressHeight", 138, 96, Boolean.TRUE, INTEGERS[2], Boolean.TRUE, new Short((short) 14), INTEGERS[3], 30
- });
- numAddressX = insertNumericField("numAddressX", NUMADDRESSX_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 15), "numAddressX", 266, 96, Boolean.TRUE, INTEGERS[2], new Short((short) 15), new Double(3.8), 30
- });
- numAddressWidth = insertNumericField("numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 16), "numAddressWidth", 138, 112, Boolean.TRUE, INTEGERS[2], new Short((short) 16), new Double(13.8), 30
- });
- numAddressY = insertNumericField("numAddressY", NUMADDRESSY_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 17), "numAddressY", 266, 112, Boolean.TRUE, INTEGERS[2], new Short((short) 17), new Double(-3.4), 30
- });
- chkCompanyReceiver = insertCheckBox("chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 18), resources.reschkCompanyReceiver_value, "chkCompanyReceiver", 103, 131, new Short((short) 0), INTEGERS[2], new Short((short) 18), 185
- });
- chkPaperFooter = insertCheckBox("chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 19), resources.reschkPaperFooter_value, "chkPaperFooter", 97, 158, new Short((short) 0), INTEGERS[2], new Short((short) 19), 68
- });
- numFooterHeight = insertNumericField("numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "Spin", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Value", PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 20), "numFooterHeight", 236, 156, Boolean.TRUE, INTEGERS[2], new Short((short) 20), INTEGERS[5], 30
- });
- lblLogoHeight = insertLabel("lblLogoHeight",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblLogoHeight_value, "lblLogoHeight", 103, 42, INTEGERS[2], new Short((short) 68), 32
- });
- lblLogoWidth = insertLabel("lblLogoWidth",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblLogoWidth_value, "lblLogoWidth", 103, 58, INTEGERS[2], new Short((short) 69), 32
- });
- FixedLine5 = insertFixedLine("FixedLine5",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[2], "FixedLine5", 90, 78, INTEGERS[2], new Short((short) 70), 215
- });
- FixedLine6 = insertFixedLine("FixedLine6",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[2], "FixedLine6", 90, 150, INTEGERS[2], new Short((short) 71), 215
- });
- lblFooterHeight = insertLabel("lblFooterHeight",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblFooterHeight_value, "lblFooterHeight", 200, 158, INTEGERS[2], new Short((short) 72), 32
- });
- lblLogoX = insertLabel("lblLogoX",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblLogoX_value, "lblLogoX", 170, 42, INTEGERS[2], new Short((short) 84), 94
- });
- lblLogoY = insertLabel("lblLogoY",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblLogoY_value, "lblLogoY", 170, 58, INTEGERS[2], new Short((short) 85), 94
- });
- lblAddressHeight = insertLabel("lblAddressHeight",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblAddressHeight_value, "lblAddressHeight", 103, 98, INTEGERS[2], new Short((short) 86), 32
- });
- lblAddressWidth = insertLabel("lblAddressWidth",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblAddressWidth_value, "lblAddressWidth", 103, 114, INTEGERS[2], new Short((short) 87), 32
- });
- lblAddressX = insertLabel("lblAddressX",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblAddressX_value, "lblAddressX", 170, 98, INTEGERS[2], new Short((short) 88), 94
- });
- lblAddressY = insertLabel("lblAddressY",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblAddressY_value, "lblAddressY", 170, 114, INTEGERS[2], new Short((short) 89), 94
- });
- lblTitle2 = insertLabel("lblTitle2",
- new String[]
- {
- PropertyNames.FONT_DESCRIPTOR, 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
- },
- new Object[]
- {
- fontDescriptor6, INTEGER_16, resources.reslblTitle2_value, Boolean.TRUE, "lblTitle2", 91, INTEGERS[8], INTEGERS[2], new Short((short) 91), 212
- });
- }
-
- public void buildStep3()
- {
- chkUseLogo = insertCheckBox("chkUseLogo", CHKUSELOGO_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 22), resources.reschkUseLogo_value, "chkUseLogo", 97, 54, new Short((short) 0), INTEGERS[3], new Short((short) 22), 212
- });
- chkUseAddressReceiver = insertCheckBox("chkUseAddressReceiver", CHKUSEADDRESSRECEIVER_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 23), resources.reschkUseAddressReceiver_value, "chkUseAddressReceiver", 97, 69, new Short((short) 0), INTEGERS[3], new Short((short) 23), 212
- });
- chkUseSigns = insertCheckBox("chkUseSigns", CHKUSESIGNS_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 24), resources.reschkUseSigns_value, "chkUseSigns", 97, 82, new Short((short) 0), INTEGERS[3], new Short((short) 24), 212
- });
- chkUseSubject = insertCheckBox("chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 25), resources.reschkUseSubject_value, "chkUseSubject", 97, 98, new Short((short) 0), INTEGERS[3], new Short((short) 25), 212
- });
- chkUseSalutation = insertCheckBox("chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 26), resources.reschkUseSalutation_value, "chkUseSalutation", 97, 113, new Short((short) 0), INTEGERS[3], new Short((short) 26), 66
- });
- lstSalutation = insertComboBox("lstSalutation", LSTSALUTATION_ACTION_PERFORMED, LSTSALUTATION_ITEM_CHANGED, LSTSALUTATION_TEXT_CHANGED,
- new String[]
- {
- "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
- },
- new Object[]
- {
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 27), "lstSalutation", 210, 110, INTEGERS[3], new Short((short) 27), 74
- });
- chkUseBendMarks = insertCheckBox("chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 28), resources.reschkUseBendMarks_value, "chkUseBendMarks", 97, 127, new Short((short) 0), INTEGERS[3], new Short((short) 28), 212
- });
- chkUseGreeting = insertCheckBox("chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 29), resources.reschkUseGreeting_value, "chkUseGreeting", 97, 142, new Short((short) 0), INTEGERS[3], new Short((short) 29), 66
- });
- lstGreeting = insertComboBox("lstGreeting", LSTGREETING_ACTION_PERFORMED, LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED,
- new String[]
- {
- "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
- },
- new Object[]
- {
- Boolean.TRUE, INTEGER_12, HelpIds.getHelpIdString(HID + 30), "lstGreeting", 210, 141, INTEGERS[3], new Short((short) 30), 74
- });
- chkUseFooter = insertCheckBox("chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 31), resources.reschkUseFooter_value, "chkUseFooter", 97, 158, new Short((short) 0), INTEGERS[3], new Short((short) 31), 212
- });
- lblTitle3 = insertLabel("lblTitle3",
- new String[]
- {
- PropertyNames.FONT_DESCRIPTOR, 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
- },
- new Object[]
- {
- fontDescriptor6, INTEGER_16, resources.reslblTitle3_value, Boolean.TRUE, "lblTitle3", 91, INTEGERS[8], INTEGERS[3], new Short((short) 90), 212
- });
- }
-
- public void buildStep4()
- {
- optSenderPlaceholder = insertRadioButton("optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 32), resources.resoptSenderPlaceholder_value, "optSenderPlaceholder", 104, 42, INTEGERS[4], new Short((short) 32), 149
- });
- optSenderDefine = insertRadioButton("optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 33), resources.resoptSenderDefine_value, "optSenderDefine", 104, 54, INTEGERS[4], new Short((short) 33), 149
- });
- txtSenderName = insertTextField("txtSenderName", TXTSENDERNAME_TEXT_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 34), "txtSenderName", 182, 67, INTEGERS[4], new Short((short) 34), 119
- });
- txtSenderStreet = insertTextField("txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 35), "txtSenderStreet", 182, 81, INTEGERS[4], new Short((short) 35), 119
- });
- txtSenderPostCode = insertTextField("txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 36), "txtSenderPostCode", 182, 95, INTEGERS[4], new Short((short) 36), 25
- });
- txtSenderState = insertTextField("txtSenderState", TXTSENDERSTATE_TEXT_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 37), "txtSenderState", 211, 95, INTEGERS[4], new Short((short) 37), 21
- });
- txtSenderCity = insertTextField("txtSenderCity", TXTSENDERCITY_TEXT_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 38), "txtSenderCity", 236, 95, INTEGERS[4], new Short((short) 38), 65
- });
- optReceiverPlaceholder = insertRadioButton("optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 39), resources.resoptReceiverPlaceholder_value, "optReceiverPlaceholder", 104, 145, INTEGERS[4], new Short((short) 39), 200
- });
- optReceiverDatabase = insertRadioButton("optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 40), resources.resoptReceiverDatabase_value, "optReceiverDatabase", 104, 157, INTEGERS[4], new Short((short) 40), 200
- });
- lblSenderAddress = insertLabel("lblSenderAddress",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblSenderAddress_value, "lblSenderAddress", 97, 28, INTEGERS[4], new Short((short) 64), 136
- });
- FixedLine2 = insertFixedLine("FixedLine2",
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGERS[5], "FixedLine2", 90, 126, INTEGERS[4], new Short((short) 75), 212
- });
- lblReceiverAddress = insertLabel("lblReceiverAddress",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblReceiverAddress_value, "lblReceiverAddress", 97, 134, INTEGERS[4], new Short((short) 76), 136
- });
- lblSenderName = insertLabel("lblSenderName",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblSenderName_value, "lblSenderName", 113, 69, INTEGERS[4], new Short((short) 77), 68
- });
- lblSenderStreet = insertLabel("lblSenderStreet",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblSenderStreet_value, "lblSenderStreet", 113, 82, INTEGERS[4], new Short((short) 78), 68
- });
- lblPostCodeCity = insertLabel("lblPostCodeCity",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblPostCodeCity_value, "lblPostCodeCity", 113, 97, INTEGERS[4], new Short((short) 79), 68
- });
- lblTitle4 = insertLabel("lblTitle4",
- new String[]
- {
- PropertyNames.FONT_DESCRIPTOR, 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
- },
- new Object[]
- {
- fontDescriptor6, INTEGER_16, resources.reslblTitle4_value, Boolean.TRUE, "lblTitle4", 91, INTEGERS[8], INTEGERS[4], new Short((short) 92), 212
- });
- }
-
- public void buildStep5()
- {
- txtFooter = insertTextField("txtFooter", TXTFOOTER_TEXT_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- 47, HelpIds.getHelpIdString(HID + 41), Boolean.TRUE, "txtFooter", 97, INTEGER_40, INTEGERS[5], new Short((short) 41), 203
- });
- chkFooterNextPages = insertCheckBox("chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 42), resources.reschkFooterNextPages_value, "chkFooterNextPages", 97, 92, new Short((short) 0), INTEGERS[5], new Short((short) 42), 202
- });
- chkFooterPageNumbers = insertCheckBox("chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 43), resources.reschkFooterPageNumbers_value, "chkFooterPageNumbers", 97, 106, new Short((short) 0), INTEGERS[5], new Short((short) 43), 201
- });
- lblFooter = insertLabel("lblFooter",
- new String[]
- {
- PropertyNames.FONT_DESCRIPTOR, 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
- },
- new Object[]
- {
- fontDescriptor5, INTEGERS[8], resources.reslblFooter_value, "lblFooter", 97, 28, INTEGERS[5], new Short((short) 52), 116
- });
- lblTitle5 = insertLabel("lblTitle5",
- new String[]
- {
- PropertyNames.FONT_DESCRIPTOR, 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
- },
- new Object[]
- {
- fontDescriptor6, INTEGER_16, resources.reslblTitle5_value, Boolean.TRUE, "lblTitle5", 91, INTEGERS[8], INTEGERS[5], new Short((short) 93), 212
- });
- }
-
- public void buildStep6()
- {
- txtTemplateName = insertTextField("txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED,
- new String[]
- {
- PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_HELPURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, "Text", PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- INTEGER_12, HelpIds.getHelpIdString(HID + 44), "txtTemplateName", 202, 56, INTEGERS[6], new Short((short) 44), resources.restxtTemplateName_value, 100
- });
- optCreateLetter = insertRadioButton("optCreateLetter", OPTCREATELETTER_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 45), resources.resoptCreateLetter_value, "optCreateLetter", 104, 111, INTEGERS[6], new Short((short) 50), 198
- });
- optMakeChanges = insertRadioButton("optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED,
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], HelpIds.getHelpIdString(HID + 46), resources.resoptMakeChanges_value, "optMakeChanges", 104, 123, INTEGERS[6], new Short((short) 51), 198
- });
- lblFinalExplanation1 = insertLabel("lblFinalExplanation1",
- new String[]
- {
- 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
- },
- new Object[]
- {
- 26, resources.reslblFinalExplanation1_value, Boolean.TRUE, "lblFinalExplanation1", 97, 28, INTEGERS[6], new Short((short) 52), 205
- });
- lblProceed = insertLabel("lblProceed",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblProceed_value, "lblProceed", 97, 100, INTEGERS[6], new Short((short) 53), 204
- });
- lblFinalExplanation2 = insertLabel("lblFinalExplanation2",
- new String[]
- {
- 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
- },
- new Object[]
- {
- 33, resources.reslblFinalExplanation2_value, Boolean.TRUE, "lblFinalExplanation2", 104, 145, INTEGERS[6], new Short((short) 54), 199
- });
- ImageControl2 = insertImage("ImageControl2",
- new String[]
- {
- PropertyNames.PROPERTY_BORDER, PropertyNames.PROPERTY_HEIGHT, PropertyNames.PROPERTY_IMAGEURL, PropertyNames.PROPERTY_NAME, PropertyNames.PROPERTY_POSITION_X, PropertyNames.PROPERTY_POSITION_Y, "ScaleImage", PropertyNames.PROPERTY_STEP, PropertyNames.PROPERTY_TABINDEX, PropertyNames.PROPERTY_WIDTH
- },
- new Object[]
- {
- new Short((short) 0), INTEGERS[10], "private:resource/dbu/image/19205", "ImageControl2", 92, 145, Boolean.FALSE, INTEGERS[6], new Short((short) 66), INTEGERS[10]
- });
- lblTemplateName = insertLabel("lblTemplateName",
- new String[]
- {
- 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
- },
- new Object[]
- {
- INTEGERS[8], resources.reslblTemplateName_value, "lblTemplateName", 97, 58, INTEGERS[6], new Short((short) 82), 101
- });
- lblTitle6 = insertLabel("lblTitle6",
- new String[]
- {
- PropertyNames.FONT_DESCRIPTOR, 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
- },
- new Object[]
- {
- fontDescriptor6, INTEGER_16, resources.reslblTitle6_value, Boolean.TRUE, "lblTitle6", 91, INTEGERS[8], INTEGERS[6], new Short((short) 94), 212
- });
-
- }
-}
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
index e4b5bfd2e354..76c74a4109f0 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
@@ -15,10 +15,10 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-from wizards.ui.WizardDialog import *
-from wizards.ui.WizardDialog import *
-from LetterWizardDialogConst import *
-from LetterWizardDialogResources import LetterWizardDialogResources
+from .LetterWizardDialogConst import LetterWizardDialogConst, HIDMAIN, HID
+from .LetterWizardDialogResources import LetterWizardDialogResources
+from ..common.HelpIds import HelpIds
+from ..ui.WizardDialog import WizardDialog, uno, Helper, PropertyNames
from com.sun.star.awt.FontUnderline import SINGLE
@@ -59,7 +59,8 @@ class LetterWizardDialog(WizardDialog):
def buildStep1(self):
self.optBusinessLetter = self.insertRadioButton(
- "optBusinessLetter", OPTBUSINESSLETTER_ITEM_CHANGED,
+ "optBusinessLetter",
+ LetterWizardDialogConst.OPTBUSINESSLETTER_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -73,7 +74,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.resoptBusinessLetter_value,
"optBusinessLetter", 97, 28, 1, 1, 184), self)
self.optPrivOfficialLetter = self.insertRadioButton(
- "optPrivOfficialLetter", OPTPRIVOFFICIALLETTER_ITEM_CHANGED,
+ "optPrivOfficialLetter",
+ LetterWizardDialogConst.OPTPRIVOFFICIALLETTER_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -87,7 +89,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.resoptPrivOfficialLetter_value,
"optPrivOfficialLetter", 97, 74, 1, 2, 184), self)
self.optPrivateLetter = self.insertRadioButton(
- "optPrivateLetter", OPTPRIVATELETTER_ITEM_CHANGED,
+ "optPrivateLetter",
+ LetterWizardDialogConst.OPTPRIVATELETTER_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -101,8 +104,9 @@ class LetterWizardDialog(WizardDialog):
self.resources.resoptPrivateLetter_value,
"optPrivateLetter", 97, 106, 1, 3, 184), self)
self.lstBusinessStyle = self.insertListBox(
- "lstBusinessStyle", LSTBUSINESSSTYLE_ACTION_PERFORMED,
- LSTBUSINESSSTYLE_ITEM_CHANGED,
+ "lstBusinessStyle",
+ LetterWizardDialogConst.LSTBUSINESSSTYLE_ACTION_PERFORMED,
+ LetterWizardDialogConst.LSTBUSINESSSTYLE_ITEM_CHANGED,
("Dropdown",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
@@ -116,7 +120,8 @@ class LetterWizardDialog(WizardDialog):
"lstBusinessStyle",
180, 40, 1, 4, 74), self)
self.chkBusinessPaper = self.insertCheckBox(
- "chkBusinessPaper", CHKBUSINESSPAPER_ITEM_CHANGED,
+ "chkBusinessPaper",
+ LetterWizardDialogConst.CHKBUSINESSPAPER_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -131,8 +136,9 @@ class LetterWizardDialog(WizardDialog):
self.resources.reschkBusinessPaper_value,
"chkBusinessPaper", 110, 56, 0, 1, 5, 168), self)
self.lstPrivOfficialStyle = self.insertListBox(
- "lstPrivOfficialStyle", LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED,
- LSTPRIVOFFICIALSTYLE_ITEM_CHANGED,
+ "lstPrivOfficialStyle",
+ LetterWizardDialogConst.LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED,
+ LetterWizardDialogConst.LSTPRIVOFFICIALSTYLE_ITEM_CHANGED,
("Dropdown",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
@@ -145,8 +151,9 @@ class LetterWizardDialog(WizardDialog):
(True, 12, HelpIds.getHelpIdString(HID + 6),
"lstPrivOfficialStyle", 180, 86, 1, 6, 74), self)
self.lstPrivateStyle = self.insertListBox(
- "lstPrivateStyle", LSTPRIVATESTYLE_ACTION_PERFORMED,
- LSTPRIVATESTYLE_ITEM_CHANGED,
+ "lstPrivateStyle",
+ LetterWizardDialogConst.LSTPRIVATESTYLE_ACTION_PERFORMED,
+ LetterWizardDialogConst.LSTPRIVATESTYLE_ITEM_CHANGED,
("Dropdown",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
@@ -223,7 +230,7 @@ class LetterWizardDialog(WizardDialog):
def buildStep2(self):
self.chkPaperCompanyLogo = self.insertCheckBox(
"chkPaperCompanyLogo",
- CHKPAPERCOMPANYLOGO_ITEM_CHANGED,
+ LetterWizardDialogConst.CHKPAPERCOMPANYLOGO_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -239,7 +246,7 @@ class LetterWizardDialog(WizardDialog):
"chkPaperCompanyLogo", 97, 28, 0, 2, 8, 68), self)
self.numLogoHeight = self.insertNumericField(
"numLogoHeight",
- NUMLOGOHEIGHT_TEXT_CHANGED,
+ LetterWizardDialogConst.NUMLOGOHEIGHT_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -254,7 +261,8 @@ class LetterWizardDialog(WizardDialog):
(12, HelpIds.getHelpIdString(HID + 9),
"numLogoHeight", 138, 40, True, 2, True, 9, 3, 30), self)
self.numLogoX = self.insertNumericField(
- "numLogoX", NUMLOGOX_TEXT_CHANGED,
+ "numLogoX",
+ LetterWizardDialogConst.NUMLOGOX_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -268,7 +276,8 @@ class LetterWizardDialog(WizardDialog):
(12, HelpIds.getHelpIdString(HID + 10),
"numLogoX", 266, 40, True, 2, 10, 0, 30), self)
self.numLogoWidth = self.insertNumericField(
- "numLogoWidth", NUMLOGOWIDTH_TEXT_CHANGED,
+ "numLogoWidth",
+ LetterWizardDialogConst.NUMLOGOWIDTH_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -282,7 +291,8 @@ class LetterWizardDialog(WizardDialog):
(12, HelpIds.getHelpIdString(HID + 11),
"numLogoWidth", 138, 56, True, 2, 11, 3.8, 30), self)
self.numLogoY = self.insertNumericField(
- "numLogoY", NUMLOGOY_TEXT_CHANGED,
+ "numLogoY",
+ LetterWizardDialogConst.NUMLOGOY_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -296,7 +306,8 @@ class LetterWizardDialog(WizardDialog):
(12, HelpIds.getHelpIdString(HID + 12),
"numLogoY", 266, 56, True, 2, 12, -3.4, 30), self)
self.chkPaperCompanyAddress = self.insertCheckBox(
- "chkPaperCompanyAddress", CHKPAPERCOMPANYADDRESS_ITEM_CHANGED,
+ "chkPaperCompanyAddress",
+ LetterWizardDialogConst.CHKPAPERCOMPANYADDRESS_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -311,7 +322,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.reschkPaperCompanyAddress_value,
"chkPaperCompanyAddress", 98, 84, 0, 2, 13, 68), self)
self.numAddressHeight = self.insertNumericField(
- "numAddressHeight", NUMADDRESSHEIGHT_TEXT_CHANGED,
+ "numAddressHeight",
+ LetterWizardDialogConst.NUMADDRESSHEIGHT_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -326,7 +338,8 @@ class LetterWizardDialog(WizardDialog):
(12, HelpIds.getHelpIdString(HID + 14),
"numAddressHeight", 138, 96, True, 2, True, 14, 3, 30), self)
self.numAddressX = self.insertNumericField(
- "numAddressX", NUMADDRESSX_TEXT_CHANGED,
+ "numAddressX",
+ LetterWizardDialogConst.NUMADDRESSX_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -340,7 +353,8 @@ class LetterWizardDialog(WizardDialog):
(12, HelpIds.getHelpIdString(HID + 15),
"numAddressX", 266, 96, True, 2, 15, 3.8, 30), self)
self.numAddressWidth = self.insertNumericField(
- "numAddressWidth", NUMADDRESSWIDTH_TEXT_CHANGED,
+ "numAddressWidth",
+ LetterWizardDialogConst.NUMADDRESSWIDTH_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -354,7 +368,8 @@ class LetterWizardDialog(WizardDialog):
(12, HelpIds.getHelpIdString(HID + 16),
"numAddressWidth", 138, 112, True, 2, 16, 13.8, 30), self)
self.numAddressY = self.insertNumericField(
- "numAddressY", NUMADDRESSY_TEXT_CHANGED,
+ "numAddressY",
+ LetterWizardDialogConst.NUMADDRESSY_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -368,7 +383,8 @@ class LetterWizardDialog(WizardDialog):
(12, HelpIds.getHelpIdString(HID + 17),
"numAddressY", 266, 112, True, 2, 17, -3.4, 30), self)
self.chkCompanyReceiver = self.insertCheckBox(
- "chkCompanyReceiver", CHKCOMPANYRECEIVER_ITEM_CHANGED,
+ "chkCompanyReceiver",
+ LetterWizardDialogConst.CHKCOMPANYRECEIVER_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -382,7 +398,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.reschkCompanyReceiver_value,
"chkCompanyReceiver", 103, 131, 0, 2, 18, 185), self)
self.chkPaperFooter = self.insertCheckBox(
- "chkPaperFooter", CHKPAPERFOOTER_ITEM_CHANGED,
+ "chkPaperFooter",
+ LetterWizardDialogConst.CHKPAPERFOOTER_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -397,7 +414,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.reschkPaperFooter_value,
"chkPaperFooter", 97, 158, 0, 2, 19, 68), self)
self.numFooterHeight = self.insertNumericField(
- "numFooterHeight", NUMFOOTERHEIGHT_TEXT_CHANGED,
+ "numFooterHeight",
+ LetterWizardDialogConst.NUMFOOTERHEIGHT_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -547,23 +565,9 @@ class LetterWizardDialog(WizardDialog):
"lblTitle2", 91, 8, 2, 91, 212))
def buildStep3(self):
- self.lstLetterNorm = self.insertListBox(
- "lstLetterNorm",
- LSTLETTERNORM_ACTION_PERFORMED,
- LSTLETTERNORM_ITEM_CHANGED,
- ("Dropdown",
- PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_HELPURL,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (True, 12, HelpIds.getHelpIdString(HID + 21),
- "lstLetterNorm", 210, 34, 3, 21, 74), self)
self.chkUseLogo = self.insertCheckBox(
- "chkUseLogo", CHKUSELOGO_ITEM_CHANGED,
+ "chkUseLogo",
+ LetterWizardDialogConst.CHKUSELOGO_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -579,7 +583,7 @@ class LetterWizardDialog(WizardDialog):
"chkUseLogo", 97, 54, 0, 3, 22, 212), self)
self.chkUseAddressReceiver = self.insertCheckBox(
"chkUseAddressReceiver",
- CHKUSEADDRESSRECEIVER_ITEM_CHANGED,
+ LetterWizardDialogConst.CHKUSEADDRESSRECEIVER_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -594,7 +598,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.reschkUseAddressReceiver_value,
"chkUseAddressReceiver", 97, 69, 0, 3, 23, 212), self)
self.chkUseSigns = self.insertCheckBox(
- "chkUseSigns", CHKUSESIGNS_ITEM_CHANGED,
+ "chkUseSigns",
+ LetterWizardDialogConst.CHKUSESIGNS_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -609,7 +614,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.reschkUseSigns_value,
"chkUseSigns", 97, 82, 0, 3, 24, 212), self)
self.chkUseSubject = self.insertCheckBox(
- "chkUseSubject", CHKUSESUBJECT_ITEM_CHANGED,
+ "chkUseSubject",
+ LetterWizardDialogConst.CHKUSESUBJECT_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -624,7 +630,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.reschkUseSubject_value,
"chkUseSubject", 97, 98, 0, 3, 25, 212), self)
self.chkUseSalutation = self.insertCheckBox(
- "chkUseSalutation", CHKUSESALUTATION_ITEM_CHANGED,
+ "chkUseSalutation",
+ LetterWizardDialogConst.CHKUSESALUTATION_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -640,9 +647,9 @@ class LetterWizardDialog(WizardDialog):
"chkUseSalutation", 97, 113, 0, 3, 26, 66), self)
self.lstSalutation = self.insertComboBox(
"lstSalutation",
- LSTSALUTATION_ACTION_PERFORMED,
- LSTSALUTATION_ITEM_CHANGED,
- LSTSALUTATION_TEXT_CHANGED,
+ LetterWizardDialogConst.LSTSALUTATION_ACTION_PERFORMED,
+ LetterWizardDialogConst.LSTSALUTATION_ITEM_CHANGED,
+ LetterWizardDialogConst.LSTSALUTATION_TEXT_CHANGED,
("Dropdown",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
@@ -655,7 +662,8 @@ class LetterWizardDialog(WizardDialog):
(True, 12, HelpIds.getHelpIdString(HID + 27),
"lstSalutation", 210, 110, 3, 27, 74), self)
self.chkUseBendMarks = self.insertCheckBox(
- "chkUseBendMarks", CHKUSEBENDMARKS_ITEM_CHANGED,
+ "chkUseBendMarks",
+ LetterWizardDialogConst.CHKUSEBENDMARKS_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -670,7 +678,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.reschkUseBendMarks_value,
"chkUseBendMarks", 97, 127, 0, 3, 28, 212), self)
self.chkUseGreeting = self.insertCheckBox(
- "chkUseGreeting", CHKUSEGREETING_ITEM_CHANGED,
+ "chkUseGreeting",
+ LetterWizardDialogConst.CHKUSEGREETING_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -685,8 +694,10 @@ class LetterWizardDialog(WizardDialog):
self.resources.reschkUseGreeting_value,
"chkUseGreeting", 97, 142, 0, 3, 29, 66), self)
self.lstGreeting = self.insertComboBox(
- "lstGreeting", LSTGREETING_ACTION_PERFORMED,
- LSTGREETING_ITEM_CHANGED, LSTGREETING_TEXT_CHANGED,
+ "lstGreeting",
+ LetterWizardDialogConst.LSTGREETING_ACTION_PERFORMED,
+ LetterWizardDialogConst.LSTGREETING_ITEM_CHANGED,
+ LetterWizardDialogConst.LSTGREETING_TEXT_CHANGED,
("Dropdown",
PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
@@ -699,7 +710,8 @@ class LetterWizardDialog(WizardDialog):
(True, 12, HelpIds.getHelpIdString(HID + 30),
"lstGreeting", 210, 141, 3, 30, 74), self)
self.chkUseFooter = self.insertCheckBox(
- "chkUseFooter", CHKUSEFOOTER_ITEM_CHANGED,
+ "chkUseFooter",
+ LetterWizardDialogConst.CHKUSEFOOTER_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -742,7 +754,8 @@ class LetterWizardDialog(WizardDialog):
def buildStep4(self):
self.optSenderPlaceholder = self.insertRadioButton(
- "optSenderPlaceholder", OPTSENDERPLACEHOLDER_ITEM_CHANGED,
+ "optSenderPlaceholder",
+ LetterWizardDialogConst.OPTSENDERPLACEHOLDER_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -756,7 +769,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.resoptSenderPlaceholder_value,
"optSenderPlaceholder", 104, 42, 4, 32, 149), self)
self.optSenderDefine = self.insertRadioButton(
- "optSenderDefine", OPTSENDERDEFINE_ITEM_CHANGED,
+ "optSenderDefine",
+ LetterWizardDialogConst.OPTSENDERDEFINE_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -770,7 +784,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.resoptSenderDefine_value,
"optSenderDefine", 104, 54, 4, 33, 149), self)
self.txtSenderName = self.insertTextField(
- "txtSenderName", TXTSENDERNAME_TEXT_CHANGED,
+ "txtSenderName",
+ LetterWizardDialogConst.TXTSENDERNAME_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -782,7 +797,8 @@ class LetterWizardDialog(WizardDialog):
(12, HelpIds.getHelpIdString(HID + 34),
"txtSenderName", 182, 67, 4, 34, 119), self)
self.txtSenderStreet = self.insertTextField(
- "txtSenderStreet", TXTSENDERSTREET_TEXT_CHANGED,
+ "txtSenderStreet",
+ LetterWizardDialogConst.TXTSENDERSTREET_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -794,7 +810,8 @@ class LetterWizardDialog(WizardDialog):
(12, HelpIds.getHelpIdString(HID + 35),
"txtSenderStreet", 182, 81, 4, 35, 119), self)
self.txtSenderPostCode = self.insertTextField(
- "txtSenderPostCode", TXTSENDERPOSTCODE_TEXT_CHANGED,
+ "txtSenderPostCode",
+ LetterWizardDialogConst.TXTSENDERPOSTCODE_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -806,7 +823,8 @@ class LetterWizardDialog(WizardDialog):
(12, HelpIds.getHelpIdString(HID + 36),
"txtSenderPostCode", 182, 95, 4, 36, 25), self)
self.txtSenderState = self.insertTextField(
- "txtSenderState", TXTSENDERSTATE_TEXT_CHANGED,
+ "txtSenderState",
+ LetterWizardDialogConst.TXTSENDERSTATE_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -818,7 +836,8 @@ class LetterWizardDialog(WizardDialog):
(12, HelpIds.getHelpIdString(HID + 37),
"txtSenderState", 211, 95, 4, 37, 21), self)
self.txtSenderCity = self.insertTextField(
- "txtSenderCity", TXTSENDERCITY_TEXT_CHANGED,
+ "txtSenderCity",
+ LetterWizardDialogConst.TXTSENDERCITY_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -830,7 +849,8 @@ class LetterWizardDialog(WizardDialog):
(12, HelpIds.getHelpIdString(HID + 38),
"txtSenderCity", 236, 95, 4, 38, 65), self)
self.optReceiverPlaceholder = self.insertRadioButton(
- "optReceiverPlaceholder", OPTRECEIVERPLACEHOLDER_ITEM_CHANGED,
+ "optReceiverPlaceholder",
+ LetterWizardDialogConst.OPTRECEIVERPLACEHOLDER_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -844,7 +864,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.resoptReceiverPlaceholder_value,
"optReceiverPlaceholder", 104, 145, 4, 39, 200), self)
self.optReceiverDatabase = self.insertRadioButton(
- "optReceiverDatabase", OPTRECEIVERDATABASE_ITEM_CHANGED,
+ "optReceiverDatabase",
+ LetterWizardDialogConst.OPTRECEIVERDATABASE_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -938,7 +959,8 @@ class LetterWizardDialog(WizardDialog):
def buildStep5(self):
self.txtFooter = self.insertTextField(
- "txtFooter", TXTFOOTER_TEXT_CHANGED,
+ "txtFooter",
+ LetterWizardDialogConst.TXTFOOTER_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_MULTILINE,
@@ -951,7 +973,8 @@ class LetterWizardDialog(WizardDialog):
(47, HelpIds.getHelpIdString(HID + 41), True,
"txtFooter", 97, 40, 5, 41, 203), self)
self.chkFooterNextPages = self.insertCheckBox(
- "chkFooterNextPages", CHKFOOTERNEXTPAGES_ITEM_CHANGED,
+ "chkFooterNextPages",
+ LetterWizardDialogConst.CHKFOOTERNEXTPAGES_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -966,7 +989,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.reschkFooterNextPages_value,
"chkFooterNextPages", 97, 92, 0, 5, 42, 202), self)
self.chkFooterPageNumbers = self.insertCheckBox(
- "chkFooterPageNumbers", CHKFOOTERPAGENUMBERS_ITEM_CHANGED,
+ "chkFooterPageNumbers",
+ LetterWizardDialogConst.CHKFOOTERPAGENUMBERS_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -1007,7 +1031,8 @@ class LetterWizardDialog(WizardDialog):
def buildStep6(self):
self.txtTemplateName = self.insertTextField(
- "txtTemplateName", TXTTEMPLATENAME_TEXT_CHANGED,
+ "txtTemplateName",
+ LetterWizardDialogConst.TXTTEMPLATENAME_TEXT_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_NAME,
@@ -1021,7 +1046,8 @@ class LetterWizardDialog(WizardDialog):
"txtTemplateName", 202, 56, 6, 44,
self.resources.restxtTemplateName_value, 100), self)
self.optCreateLetter = self.insertRadioButton(
- "optCreateLetter", OPTCREATELETTER_ITEM_CHANGED,
+ "optCreateLetter",
+ LetterWizardDialogConst.OPTCREATELETTER_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
@@ -1035,7 +1061,8 @@ class LetterWizardDialog(WizardDialog):
self.resources.resoptCreateLetter_value,
"optCreateLetter", 104, 111, 6, 50, 198), self)
self.optMakeChanges = self.insertRadioButton(
- "optMakeChanges", OPTMAKECHANGES_ITEM_CHANGED,
+ "optMakeChanges",
+ LetterWizardDialogConst.OPTMAKECHANGES_ITEM_CHANGED,
(PropertyNames.PROPERTY_HEIGHT,
PropertyNames.PROPERTY_HELPURL,
PropertyNames.PROPERTY_LABEL,
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java
deleted file mode 100644
index 0d345e94e538..000000000000
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.letter;
-
-public interface LetterWizardDialogConst
-{
-
- public static final String OPTBUSINESSLETTER_ITEM_CHANGED = "optBusinessLetterItemChanged";
- public static final String OPTPRIVOFFICIALLETTER_ITEM_CHANGED = "optPrivOfficialLetterItemChanged";
- public static final String OPTPRIVATELETTER_ITEM_CHANGED = "optPrivateLetterItemChanged";
- public static final String LSTBUSINESSSTYLE_ACTION_PERFORMED = null;
- public static final String LSTBUSINESSSTYLE_ITEM_CHANGED = "lstBusinessStyleItemChanged";
- public static final String LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED = null;
- public static final String LSTPRIVOFFICIALSTYLE_ITEM_CHANGED = "lstPrivOfficialStyleItemChanged";
- public static final String CHKBUSINESSPAPER_ITEM_CHANGED = "chkBusinessPaperItemChanged";
- public static final String LSTPRIVATESTYLE_ACTION_PERFORMED = null;
- public static final String LSTPRIVATESTYLE_ITEM_CHANGED = "lstPrivateStyleItemChanged";
- public static final String CHKPAPERCOMPANYLOGO_ITEM_CHANGED = "chkPaperCompanyLogoItemChanged";
- public static final String NUMLOGOHEIGHT_TEXT_CHANGED = "numLogoHeightTextChanged";
- public static final String NUMLOGOX_TEXT_CHANGED = "numLogoXTextChanged";
- public static final String NUMLOGOWIDTH_TEXT_CHANGED = "numLogoWidthTextChanged";
- public static final String NUMLOGOY_TEXT_CHANGED = "numLogoYTextChanged";
- public static final String CHKCOMPANYRECEIVER_ITEM_CHANGED = "chkCompanyReceiverItemChanged";
- public static final String CHKPAPERFOOTER_ITEM_CHANGED = "chkPaperFooterItemChanged";
- public static final String NUMFOOTERHEIGHT_TEXT_CHANGED = "numFooterHeightTextChanged";
- public static final String CHKPAPERCOMPANYADDRESS_ITEM_CHANGED = "chkPaperCompanyAddressItemChanged";
- public static final String NUMADDRESSHEIGHT_TEXT_CHANGED = "numAddressHeightTextChanged";
- public static final String NUMADDRESSX_TEXT_CHANGED = "numAddressXTextChanged";
- public static final String NUMADDRESSWIDTH_TEXT_CHANGED = "numAddressWidthTextChanged";
- public static final String NUMADDRESSY_TEXT_CHANGED = "numAddressYTextChanged";
- public static final String LSTLETTERNORM_ACTION_PERFORMED = null;
- public static final String CHKUSELOGO_ITEM_CHANGED = "chkUseLogoItemChanged";
- public static final String CHKUSEADDRESSRECEIVER_ITEM_CHANGED = "chkUseAddressReceiverItemChanged";
- public static final String CHKUSESIGNS_ITEM_CHANGED = "chkUseSignsItemChanged";
- public static final String CHKUSESUBJECT_ITEM_CHANGED = "chkUseSubjectItemChanged";
- public static final String CHKUSEBENDMARKS_ITEM_CHANGED = "chkUseBendMarksItemChanged";
- public static final String CHKUSEFOOTER_ITEM_CHANGED = "chkUseFooterItemChanged";
- public static final String CHKUSESALUTATION_ITEM_CHANGED = "chkUseSalutationItemChanged";
- public static final String CHKUSEGREETING_ITEM_CHANGED = "chkUseGreetingItemChanged";
- public static final String LSTSALUTATION_ACTION_PERFORMED = null;
- public static final String LSTSALUTATION_ITEM_CHANGED = "lstSalutationItemChanged";
- public static final String LSTSALUTATION_TEXT_CHANGED = "lstSalutationTextChanged";
- public static final String LSTGREETING_ACTION_PERFORMED = null;
- public static final String LSTGREETING_ITEM_CHANGED = "lstGreetingItemChanged";
- public static final String LSTGREETING_TEXT_CHANGED = "lstGreetingTextChanged";
- public static final String OPTSENDERPLACEHOLDER_ITEM_CHANGED = "optSenderPlaceholderItemChanged";
- public static final String OPTSENDERDEFINE_ITEM_CHANGED = "optSenderDefineItemChanged";
- public static final String OPTRECEIVERPLACEHOLDER_ITEM_CHANGED = "optReceiverPlaceholderItemChanged";
- public static final String OPTRECEIVERDATABASE_ITEM_CHANGED = "optReceiverDatabaseItemChanged";
- public static final String TXTSENDERNAME_TEXT_CHANGED = "txtSenderNameTextChanged";
- public static final String TXTSENDERSTREET_TEXT_CHANGED = "txtSenderStreetTextChanged";
- public static final String TXTSENDERCITY_TEXT_CHANGED = "txtSenderCityTextChanged";
- public static final String TXTSENDERPOSTCODE_TEXT_CHANGED = "txtSenderPostCodeTextChanged";
- public static final String TXTSENDERSTATE_TEXT_CHANGED = "txtSenderStateTextChanged";
- public static final String TXTFOOTER_TEXT_CHANGED = "txtFooterTextChanged";
- public static final String CHKFOOTERNEXTPAGES_ITEM_CHANGED = "chkFooterNextPagesItemChanged";
- public static final String CHKFOOTERPAGENUMBERS_ITEM_CHANGED = "chkFooterPageNumbersItemChanged";
- public static final String TXTTEMPLATENAME_TEXT_CHANGED = "txtTemplateNameTextChanged";
- public static final String OPTCREATELETTER_ITEM_CHANGED = "optCreateLetterItemChanged";
- public static final String OPTMAKECHANGES_ITEM_CHANGED = "optMakeChangesItemChanged";
- public static final String FILETEMPLATEPATH_TEXT_CHANGED = null;
- public static final String imageURLImageControl1 = null;
- public static final String imageURLImageControl2 = null;
- public static final String imageURLImageControl3 = null;
- public static final int HID = 40768;
- public static final int HIDMAIN = 40820;
-}
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py
index acfb7d19a6e4..8517b700eb99 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogConst.py
@@ -15,64 +15,62 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-OPTBUSINESSLETTER_ITEM_CHANGED = "optBusinessLetterItemChanged"
-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
+
+class LetterWizardDialogConst:
+ OPTBUSINESSLETTER_ITEM_CHANGED = "optBusinessLetterItemChanged"
+ 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"
+ 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
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java
deleted file mode 100644
index fa9b7bf1a12a..000000000000
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogEvents.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.letter;
-
-public interface LetterWizardDialogEvents
-{
-
- public static final String OPTBUSINESSLETTER_ITEM_CHANGED = null;
- public static final String OPTPRIVOFFICIALLETTER_ITEM_CHANGED = null;
- public static final String OPTPRIVATELETTER_ITEM_CHANGED = null;
- public static final String LSTBUSINESSSTYLE_ACTION_PERFORMED = null;
- public static final String LSTBUSINESSSTYLE_ITEM_CHANGED = null;
- public static final String LSTPRIVOFFICIALSTYLE_ACTION_PERFORMED = null;
- public static final String LSTPRIVOFFICIALSTYLE_ITEM_CHANGED = null;
- public static final String CHKBUSINESSPAPER_ITEM_CHANGED = null;
- public static final String LSTPRIVATESTYLE_ACTION_PERFORMED = null;
- public static final String LSTPRIVATESTYLE_ITEM_CHANGED = null;
- public static final String CHKPAPERCOMPANYLOGO_ITEM_CHANGED = null;
- public static final String NUMLOGOHEIGHT_TEXT_CHANGED = null;
- public static final String NUMLOGOX_TEXT_CHANGED = null;
- public static final String NUMLOGOWIDTH_TEXT_CHANGED = null;
- public static final String NUMLOGOY_TEXT_CHANGED = null;
- public static final String CHKCOMPANYRECEIVER_ITEM_CHANGED = null;
- public static final String CHKPAPERFOOTER_ITEM_CHANGED = null;
- public static final String NUMFOOTERHEIGHT_TEXT_CHANGED = null;
- public static final String CHKPAPERCOMPANYADDRESS_ITEM_CHANGED = null;
- public static final String NUMADDRESSHEIGHT_TEXT_CHANGED = null;
- public static final String NUMADDRESSX_TEXT_CHANGED = null;
- public static final String NUMADDRESSWIDTH_TEXT_CHANGED = null;
- public static final String NUMADDRESSY_TEXT_CHANGED = null;
- public static final String LSTLETTERNORM_ACTION_PERFORMED = null;
- public static final String LSTLETTERNORM_ITEM_CHANGED = null;
- public static final String CHKUSELOGO_ITEM_CHANGED = null;
- public static final String CHKUSEADDRESSRECEIVER_ITEM_CHANGED = null;
- public static final String CHKUSESIGNS_ITEM_CHANGED = null;
- public static final String CHKUSESUBJECT_ITEM_CHANGED = null;
- public static final String CHKUSEBENDMARKS_ITEM_CHANGED = null;
- public static final String CHKUSEFOOTER_ITEM_CHANGED = null;
- public static final String CHKUSESALUTATION_ITEM_CHANGED = null;
- public static final String CHKUSEGREETING_ITEM_CHANGED = null;
- public static final String LSTSALUTATION_ACTION_PERFORMED = null;
- public static final String LSTSALUTATION_ITEM_CHANGED = null;
- public static final String LSTGREETING_ACTION_PERFORMED = null;
- public static final String LSTGREETING_ITEM_CHANGED = null;
- public static final String OPTSENDERFIXED_ITEM_CHANGED = null;
- public static final String OPTSENDERPLACEHOLDER_ITEM_CHANGED = null;
- public static final String OPTSENDERDEFINE_ITEM_CHANGED = null;
- public static final String OPTRECEIVERPLACEHOLDER_ITEM_CHANGED = null;
- public static final String OPTRECEIVERDATABASE_ITEM_CHANGED = null;
- public static final String TXTSENDERNAME_TEXT_CHANGED = null;
- public static final String TXTSENDERSTREET_TEXT_CHANGED = null;
- public static final String TXTSENDERCITY_TEXT_CHANGED = null;
- public static final String TXTSENDERPOSTCODE_TEXT_CHANGED = null;
- public static final String TXTFOOTER_TEXT_CHANGED = null;
- public static final String CHKFOOTERNEXTPAGES_ITEM_CHANGED = null;
- public static final String CHKFOOTERPAGENUMBERS_ITEM_CHANGED = null;
- public static final String TXTTEMPLATENAME_TEXT_CHANGED = null;
- public static final String OPTCREATELETTER_ITEM_CHANGED = null;
- public static final String OPTMAKECHANGES_ITEM_CHANGED = null;
- public static final String FILETEMPLATEPATH_TEXT_CHANGED = null;
- public static final String imageURLImageControl1 = "images/ImageControl1";
- public static final String imageURLImageControl2 = "images/ImageControl2";
- public static final String imageURLImageControl3 = "images/ImageControl3";
-}
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
deleted file mode 100644
index 740420e77dd4..000000000000
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.java
+++ /dev/null
@@ -1,1484 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.letter;
-
-import java.util.List;
-import java.util.ArrayList;
-import com.sun.star.awt.VclWindowPeerAttribute;
-import com.sun.star.awt.XTextComponent;
-import com.sun.star.awt.XWindow;
-import com.sun.star.awt.XWindowPeer;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.container.NoSuchElementException;
-import com.sun.star.document.MacroExecMode;
-import com.sun.star.document.XDocumentProperties;
-import com.sun.star.document.XDocumentPropertiesSupplier;
-import com.sun.star.lang.WrappedTargetException;
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.task.XInteractionHandler;
-import com.sun.star.text.XTextDocument;
-import com.sun.star.text.XTextFrame;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.Exception;
-import com.sun.star.uno.RuntimeException;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-import com.sun.star.util.CloseVetoException;
-import com.sun.star.util.XCloseable;
-import com.sun.star.wizards.common.Configuration;
-import com.sun.star.wizards.common.Desktop;
-import com.sun.star.wizards.common.FileAccess;
-import com.sun.star.wizards.common.HelpIds;
-import com.sun.star.wizards.common.Helper;
-import com.sun.star.wizards.common.NoValidPathException;
-import com.sun.star.wizards.common.PropertyNames;
-import com.sun.star.wizards.common.SystemDialog;
-import com.sun.star.wizards.document.OfficeDocument;
-import com.sun.star.wizards.text.TextFieldHandler;
-import com.sun.star.wizards.text.TextFrameHandler;
-import com.sun.star.wizards.text.ViewHandler;
-import com.sun.star.wizards.ui.PathSelection;
-import com.sun.star.wizards.ui.XPathSelectionListener;
-import com.sun.star.wizards.ui.event.DataAware;
-import com.sun.star.wizards.ui.event.RadioDataAware;
-import com.sun.star.wizards.ui.event.UnoDataAware;
-
-import com.sun.star.util.XSearchable;
-import com.sun.star.util.XSearchDescriptor;
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.text.*;
-import com.sun.star.wizards.common.TextElement;
-import com.sun.star.wizards.common.PlaceholderTextElement;
-
-import com.sun.star.beans.XPropertySet;
-
-public class LetterWizardDialogImpl extends LetterWizardDialog
-{
-
- protected void enterStep(int OldStep, int NewStep)
- {
- }
-
- protected void leaveStep(int OldStep, int NewStep)
- {
- }
- static LetterDocument myLetterDoc;
- static boolean running;
- XMultiServiceFactory xmsf;
- XTextDocument xTextDocument;
- PathSelection myPathSelection;
- CGLetterWizard myConfig;
- ArrayList<DataAware> mainDA = new ArrayList<DataAware>();
- ArrayList<DataAware> letterDA = new ArrayList<DataAware>();
- ArrayList<DataAware> businessDA = new ArrayList<DataAware>();
- String[][] BusinessFiles;
- String[][] OfficialFiles;
- String[][] PrivateFiles;
- String sTemplatePath;
- String sUserTemplatePath;
- String sBitmapPath;
- String sLetterPath;
- String sLetterLangPackPath;
- String sWorkPath;
- String sPath;
- boolean bEditTemplate;
- boolean bSaveSuccess = false;
- private boolean filenameChanged = false;
- LetterDocument.BusinessPaperObject BusCompanyLogo = null;
- LetterDocument.BusinessPaperObject BusCompanyAddress = null;
- LetterDocument.BusinessPaperObject BusCompanyAddressReceiver = null;
- LetterDocument.BusinessPaperObject BusFooter = null;
- final static int RM_TYPESTYLE = 1;
- final static int RM_BUSINESSPAPER = 2;
- final static int RM_ELEMENTS = 3;
- final static int RM_SENDERRECEIVER = 4;
- final static int RM_FOOTER = 5;
- final static int RM_FINALSETTINGS = 6;
-
- List<XTextRange> constRangeList = new ArrayList<XTextRange>();
- XTextRange trSubjectconst;
- TextElement teSubjectconst;
-
- public LetterWizardDialogImpl(XMultiServiceFactory xmsf)
- {
- super(xmsf);
- this.xmsf = xmsf;
- }
-
- public static void main(String args[])
- {
- //only being called when starting wizard remotely
- String ConnectStr = "uno:socket,host=127.0.0.1,port=8100;urp,negotiate=0,forcesynchronous=1;StarOffice.ServiceManager";
- XMultiServiceFactory xLocMSF = null;
- try
- {
- xLocMSF = Desktop.connect(ConnectStr);
- }
- catch (RuntimeException e)
- {
- e.printStackTrace();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- catch (java.lang.Exception e)
- {
- e.printStackTrace();
- }
- LetterWizardDialogImpl lw = new LetterWizardDialogImpl(xLocMSF);
- lw.startWizard(xLocMSF, null);
-
- }
-
- public void startWizard(XMultiServiceFactory xMSF, Object[] CurPropertyValue)
- {
-
- running = true;
- try
- {
- //Number of steps on WizardDialog:
- setMaxStep(6);
-
- //instatiate The Document Frame for the Preview
- myLetterDoc = new LetterDocument(xMSF, this);
-
- //create the dialog:
- drawNaviBar();
- buildStep1();
- buildStep2();
- buildStep3();
- buildStep4();
- buildStep5();
- buildStep6();
-
- initializePaths();
- initializeSalutation();
- initializeGreeting();
-
-
- //special Control for setting the save Path:
- insertPathSelectionControl();
-
- //load the last used settings from the registry and apply listeners to the controls:
- initConfiguration();
-
- initializeTemplates(xMSF);
-
- if (myConfig.cp_BusinessLetter.cp_Greeting.equals(PropertyNames.EMPTY_STRING))
- {
- myConfig.cp_BusinessLetter.cp_Greeting = resources.GreetingLabels[0];
- }
- if (myConfig.cp_BusinessLetter.cp_Salutation.equals(PropertyNames.EMPTY_STRING))
- {
- myConfig.cp_BusinessLetter.cp_Salutation = resources.SalutationLabels[0];
- }
- if (myConfig.cp_PrivateOfficialLetter.cp_Greeting.equals(PropertyNames.EMPTY_STRING))
- {
- myConfig.cp_PrivateOfficialLetter.cp_Greeting = resources.GreetingLabels[1];
- }
- if (myConfig.cp_PrivateOfficialLetter.cp_Salutation.equals(PropertyNames.EMPTY_STRING))
- {
- myConfig.cp_PrivateOfficialLetter.cp_Salutation = resources.SalutationLabels[1];
- }
- if (myConfig.cp_PrivateLetter.cp_Greeting.equals(PropertyNames.EMPTY_STRING))
- {
- myConfig.cp_PrivateLetter.cp_Greeting = resources.GreetingLabels[2];
- }
- if (myConfig.cp_PrivateLetter.cp_Salutation.equals(PropertyNames.EMPTY_STRING))
- {
- myConfig.cp_PrivateLetter.cp_Salutation = resources.SalutationLabels[2];
- }
-
- //update the dialog UI according to the loaded Configuration
- updateUI();
-
- if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING))
- {
- myPathSelection.initializePath();
- }
-
- XWindow xContainerWindow = myLetterDoc.xFrame.getContainerWindow();
- XWindowPeer xWindowPeer = UnoRuntime.queryInterface(XWindowPeer.class, xContainerWindow);
- createWindowPeer(xWindowPeer);
-
- //add the Roadmap to the dialog:
- insertRoadmap();
-
- //load the last used document and apply last used settings:
- setConfiguration();
-
- //If the configuration does not define Greeting/Salutation yet choose a default
- setDefaultForGreetingAndSalutation();
-
- //disable funtionality that is not supported by the template:
- initializeElements();
-
- drawConstants();
-
- //disable the document, so that the user cannot change anything:
- myLetterDoc.xFrame.getComponentWindow().setEnable(false);
-
- executeDialog(myLetterDoc.xFrame);
- removeTerminateListener();
- closeDocument();
- running = false;
-
- }
- catch (Exception exception)
- {
- removeTerminateListener();
- exception.printStackTrace(System.err);
- running = false;
- }
- }
-
- public void cancelWizard()
- {
- xDialog.endExecute();
- running = false;
- }
-
- public boolean finishWizard()
- {
- switchToStep(getCurrentStep(), getMaxStep());
- try
- {
- //myLetterDoc.xTextDocument.lockControllers();
- FileAccess fileAccess = new FileAccess(xMSF);
- sPath = myPathSelection.getSelectedPath();
- if (sPath.equals(PropertyNames.EMPTY_STRING))
- {
- myPathSelection.triggerPathPicker();
- sPath = myPathSelection.getSelectedPath();
- }
- sPath = fileAccess.getURL(sPath);
-
- //first, if the filename was not changed, thus
- //it is coming from a saved session, check if the
- // file exists and warn the user.
- if (!filenameChanged)
- {
- if (fileAccess.exists(sPath, true))
- {
-
- int answer = SystemDialog.showMessageBox(xMSF, xControl.getPeer(), "MessBox", VclWindowPeerAttribute.YES_NO + VclWindowPeerAttribute.DEF_NO, resources.resOverwriteWarning);
- if (answer == 3) // user said: no, do not overwrite....
- {
- return false;
- }
- }
- }
- myLetterDoc.setWizardTemplateDocInfo(resources.resLetterWizardDialog_title, resources.resTemplateDescription);
- myLetterDoc.killEmptyUserFields();
- myLetterDoc.keepLogoFrame = (chkUseLogo.getState() != 0);
- if ((chkBusinessPaper.getState() != 0) && (chkPaperCompanyLogo.getState() != 0))
- {
- myLetterDoc.keepLogoFrame = false;
- }
- myLetterDoc.keepBendMarksFrame = (chkUseBendMarks.getState() != 0);
- myLetterDoc.keepLetterSignsFrame = (chkUseSigns.getState() != 0);
- myLetterDoc.keepSenderAddressRepeatedFrame = (chkUseAddressReceiver.getState() != 0);
-
- if (optBusinessLetter.getState())
- {
- if ((chkBusinessPaper.getState() != 0) && (chkCompanyReceiver.getState() != 0))
- {
- myLetterDoc.keepSenderAddressRepeatedFrame = false;
- }
- if ((chkBusinessPaper.getState() != 0) && (chkPaperCompanyAddress.getState() != 0))
- {
- myLetterDoc.keepAddressFrame = false;
- }
- }
-
- myLetterDoc.killEmptyFrames();
-
-
- bSaveSuccess = OfficeDocument.store(xMSF, xTextDocument, sPath, "writer8_template", false);
-
- if (bSaveSuccess)
- {
- saveConfiguration();
- XInteractionHandler xIH = UnoRuntime.queryInterface(XInteractionHandler.class, xMSF.createInstance("com.sun.star.comp.uui.UUIInteractionHandler"));
- PropertyValue loadValues[] = new PropertyValue[4];
- loadValues[0] = new PropertyValue();
- loadValues[0].Name = "AsTemplate";
- loadValues[1] = new PropertyValue();
- loadValues[1].Name = "MacroExecutionMode";
- loadValues[1].Value = new Short(MacroExecMode.ALWAYS_EXECUTE);
- loadValues[2] = new PropertyValue();
- loadValues[2].Name = "UpdateDocMode";
- loadValues[2].Value = new Short(com.sun.star.document.UpdateDocMode.FULL_UPDATE);
- loadValues[3] = new PropertyValue();
- loadValues[3].Name = "InteractionHandler";
- loadValues[3].Value = xIH;
-
- if (bEditTemplate)
- {
- loadValues[0].Value = Boolean.FALSE;
- }
- else
- {
- loadValues[0].Value = Boolean.TRUE;
- }
- Object oDoc = OfficeDocument.load(Desktop.getDesktop(xMSF), sPath, "_default", loadValues);
- XTextDocument xTextDocument = (com.sun.star.text.XTextDocument) oDoc;
- XMultiServiceFactory xDocMSF = UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDocument);
- ViewHandler myViewHandler = new ViewHandler(xDocMSF, xTextDocument);
- myViewHandler.setViewSetting("ZoomType", new Short(com.sun.star.view.DocumentZoomType.OPTIMAL));
- }
- else
- {
- //TODO: Error Handling
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- finally
- {
- xDialog.endExecute();
- running = false;
- }
- return true;
- }
-
- public void closeDocument()
- {
- try
- {
- //xComponent.dispose();
- XCloseable xCloseable = UnoRuntime.queryInterface(XCloseable.class, myLetterDoc.xFrame);
- xCloseable.close(false);
- }
- catch (CloseVetoException e)
- {
- e.printStackTrace();
- }
- }
-
- public void drawConstants()
- {
- constRangeList = searchFillInItems(1);
-
- XTextRange item = null;
-
- for (int i = 0; i < constRangeList.size(); i++)
- {
- item = constRangeList.get(i);
- String text = item.getString().trim().toLowerCase();
- if (text.equals(resources.resSubjectconstPlaceHolder))
- {
- teSubjectconst = new PlaceholderTextElement(item, resources.resSubjectconstPlaceHolder_value, "hint", myLetterDoc.xMSF);
- trSubjectconst = item;
- constRangeList.remove(i--);
- writeTitle(teSubjectconst,trSubjectconst,resources.resSubjectconstPlaceHolder_value);
- }
- }
- }
-
- public void clearConstants()
- {
- constRangeList.clear();
- trSubjectconst = null;
- teSubjectconst = null;
- }
-
- private void writeTitle(TextElement te, XTextRange tr, String text)
- {
- te.setText(text == null ? PropertyNames.EMPTY_STRING : text);
- te.write(tr);
- }
-
- public List<XTextRange> searchFillInItems(int type)
- {
- try
- {
- XSearchable xSearchable = UnoRuntime.queryInterface(XSearchable.class, xTextDocument);
- XSearchDescriptor sd = xSearchable.createSearchDescriptor();
-
- if(type == 0)
- {
- sd.setSearchString("<[^>]+>");
- }
- else if(type == 1)
- {
- sd.setSearchString("#[^#]+#");
- }
- sd.setPropertyValue("SearchRegularExpression", Boolean.TRUE);
- sd.setPropertyValue("SearchWords", Boolean.TRUE);
-
- XIndexAccess ia = xSearchable.findAll(sd);
-
- List<XTextRange> l = new ArrayList<XTextRange>(ia.getCount());
- for (int i = 0; i < ia.getCount(); i++)
- {
- try
- {
- l.add(UnoRuntime.queryInterface(XTextRange.class, ia.getByIndex(i)));
- }
- catch (Exception ex)
- {
- System.err.println("Nonfatal Error in finding fillins.");
- }
- }
- return l;
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- throw new IllegalArgumentException("Fatal Error: Loading template failed: searching fillins failed");
- }
- }
-
- public void optBusinessLetterItemChanged()
- {
- DataAware.setDataObject(letterDA, myConfig.cp_BusinessLetter, true);
- setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- lstBusinessStyleItemChanged();
- enableSenderReceiver();
- setPossibleFooter(true);
- if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING))
- {
- myPathSelection.initializePath();
- }
- }
-
- public void optPrivOfficialLetterItemChanged()
- {
- DataAware.setDataObject(letterDA, myConfig.cp_PrivateOfficialLetter, true);
- setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- lstPrivOfficialStyleItemChanged();
- disableBusinessPaper();
- enableSenderReceiver();
- setPossibleFooter(true);
- if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING))
- {
- myPathSelection.initializePath();
- }
- }
-
- public void optPrivateLetterItemChanged()
- {
- DataAware.setDataObject(letterDA, myConfig.cp_PrivateLetter, true);
- setControlProperty("lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lstBusinessStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("chkBusinessPaper", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lstPrivOfficialStyle", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lstPrivateStyle", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- lstPrivateStyleItemChanged();
- disableBusinessPaper();
- disableSenderReceiver();
- setPossibleFooter(false);
- if (myPathSelection.xSaveTextBox.getText().equalsIgnoreCase(PropertyNames.EMPTY_STRING))
- {
- myPathSelection.initializePath();
- }
- }
-
- public void optSenderPlaceholderItemChanged()
- {
- setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- myLetterDoc.fillSenderWithUserData();
- }
-
- public void optSenderDefineItemChanged()
- {
- setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- txtSenderNameTextChanged();
- txtSenderStreetTextChanged();
- txtSenderPostCodeTextChanged();
- txtSenderStateTextChanged();
- txtSenderCityTextChanged();
- }
-
- public void optCreateLetterItemChanged()
- {
- bEditTemplate = false;
- }
-
- public void optMakeChangesItemChanged()
- {
- bEditTemplate = true;
- }
-
- public void optReceiverPlaceholderItemChanged()
- {
- OfficeDocument.attachEventCall(xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Placeholder()");
- }
-
- public void optReceiverDatabaseItemChanged()
- {
- OfficeDocument.attachEventCall(xTextDocument, "OnNew", "StarBasic", "macro:///Template.Correspondence.Database()");
- }
-
- public void lstBusinessStyleItemChanged()
- {
- xTextDocument = myLetterDoc.loadAsPreview(BusinessFiles[1][lstBusinessStyle.getSelectedItemPos()], false);
- myLetterDoc.xTextDocument.lockControllers();
- initializeElements();
- chkBusinessPaperItemChanged();
- setElements(false);
- clearConstants();
- drawConstants();
- myLetterDoc.xTextDocument.unlockControllers();
- activate();
- }
-
- public void lstPrivOfficialStyleItemChanged()
- {
- xTextDocument = myLetterDoc.loadAsPreview(OfficialFiles[1][lstPrivOfficialStyle.getSelectedItemPos()], false);
- myLetterDoc.xTextDocument.lockControllers();
- initializeElements();
- setPossibleSenderData(true);
- setElements(false);
- clearConstants();
- drawConstants();
- myLetterDoc.xTextDocument.unlockControllers();
- activate();
- }
-
- public void lstPrivateStyleItemChanged()
- {
- xTextDocument = myLetterDoc.loadAsPreview(PrivateFiles[1][lstPrivateStyle.getSelectedItemPos()], false);
- myLetterDoc.xTextDocument.lockControllers();
- initializeElements();
- setElements(true);
- clearConstants();
- drawConstants();
- myLetterDoc.xTextDocument.unlockControllers();
- activate();
- }
-
- public void numLogoHeightTextChanged()
- {
- BusCompanyLogo.iHeight = (int) (numLogoHeight.getValue() * 1000);
- BusCompanyLogo.setFramePosition();
- }
-
- public void numLogoWidthTextChanged()
- {
- BusCompanyLogo.iWidth = (int) (numLogoWidth.getValue() * 1000);
- BusCompanyLogo.setFramePosition();
- }
-
- public void numLogoXTextChanged()
- {
- BusCompanyLogo.iXPos = (int) (numLogoX.getValue() * 1000);
- BusCompanyLogo.setFramePosition();
- }
-
- public void numLogoYTextChanged()
- {
- BusCompanyLogo.iYPos = (int) (numLogoY.getValue() * 1000);
- BusCompanyLogo.setFramePosition();
- }
-
- public void numAddressWidthTextChanged()
- {
- BusCompanyAddress.iWidth = (int) (numAddressWidth.getValue() * 1000);
- BusCompanyAddress.setFramePosition();
- }
-
- public void numAddressXTextChanged()
- {
- BusCompanyAddress.iXPos = (int) (numAddressX.getValue() * 1000);
- BusCompanyAddress.setFramePosition();
- }
-
- public void numAddressYTextChanged()
- {
- BusCompanyAddress.iYPos = (int) (numAddressY.getValue() * 1000);
- BusCompanyAddress.setFramePosition();
- }
-
- public void numAddressHeightTextChanged()
- {
- BusCompanyAddress.iHeight = (int) (numAddressHeight.getValue() * 1000);
- BusCompanyAddress.setFramePosition();
- }
-
- public void numFooterHeightTextChanged()
- {
- BusFooter.iHeight = (int) (numFooterHeight.getValue() * 1000);
- BusFooter.iYPos = myLetterDoc.DocSize.Height - BusFooter.iHeight;
- BusFooter.setFramePosition();
- }
-
- public void chkPaperCompanyLogoItemChanged()
- {
- if (chkPaperCompanyLogo.getState() != 0)
- {
- //minimal value is required, otherwise the frame creation fails
- if (numLogoWidth.getValue() == 0)
- {
- numLogoWidth.setValue(0.1);
- }
- if (numLogoHeight.getValue() == 0)
- {
- numLogoHeight.setValue(0.1);
- }
- BusCompanyLogo = myLetterDoc.new BusinessPaperObject("Company Logo", (int) (numLogoWidth.getValue() * 1000), (int) (numLogoHeight.getValue() * 1000), (int) (numLogoX.getValue() * 1000), (int) (numLogoY.getValue() * 1000));
- setControlProperty("numLogoHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("numLogoWidth", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("numLogoX", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("numLogoY", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setPossibleLogo(false);
- }
- else
- {
- if (BusCompanyLogo != null)
- {
- BusCompanyLogo.removeFrame();
- }
- setControlProperty("numLogoHeight", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblCompanyLogoHeight", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("numLogoWidth", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblCompanyLogoWidth", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("numLogoX", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblCompanyLogoX", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("numLogoY", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblCompanyLogoY", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setPossibleLogo(true);
- }
- }
-
- public void chkPaperCompanyAddressItemChanged()
- {
- if (chkPaperCompanyAddress.getState() != 0)
- {
-// minimal value is required, otherwise the frame creation fails
- if (numAddressWidth.getValue() == 0)
- {
- numAddressWidth.setValue(0.1);
- }
- if (numAddressHeight.getValue() == 0)
- {
- numAddressHeight.setValue(0.1);
- }
- BusCompanyAddress = myLetterDoc.new BusinessPaperObject("Company Address", (int) (numAddressWidth.getValue() * 1000), (int) (numAddressHeight.getValue() * 1000), (int) (numAddressX.getValue() * 1000), (int) (numAddressY.getValue() * 1000));
- setControlProperty("numAddressHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("numAddressWidth", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("numAddressX", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("numAddressY", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setControlProperty("lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- if (myLetterDoc.hasElement("Sender Address"))
- {
- myLetterDoc.switchElement("Sender Address", (false));
- }
- if (chkCompanyReceiver.getState() != 0)
- {
- setPossibleSenderData(false);
- }
- }
- else
- {
- if (BusCompanyAddress != null)
- {
- BusCompanyAddress.removeFrame();
- }
- setControlProperty("numAddressHeight", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblCompanyAddressHeight", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("numAddressWidth", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblCompanyAddressWidth", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("numAddressX", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblCompanyAddressX", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("numAddressY", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblCompanyAddressY", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- if (myLetterDoc.hasElement("Sender Address"))
- {
- myLetterDoc.switchElement("Sender Address", (true));
- }
- setPossibleSenderData(true);
- if (optSenderDefine.getState())
- {
- optSenderDefineItemChanged();
- }
- if (optSenderPlaceholder.getState())
- {
- optSenderPlaceholderItemChanged();
- }
- }
- }
-
- public void chkCompanyReceiverItemChanged()
- {
- XTextFrame xReceiverFrame = null;
-
- if (chkCompanyReceiver.getState() != 0)
- {
- try
- {
- xReceiverFrame = TextFrameHandler.getFrameByName("Receiver Address", xTextDocument);
- Integer FrameWidth = (Integer) Helper.getUnoPropertyValue(xReceiverFrame, PropertyNames.PROPERTY_WIDTH);
- int iFrameWidth = FrameWidth.intValue();
- Integer FrameX = (Integer) Helper.getUnoPropertyValue(xReceiverFrame, "HoriOrientPosition");
- int iFrameX = FrameX.intValue();
- Integer FrameY = (Integer) Helper.getUnoPropertyValue(xReceiverFrame, "VertOrientPosition");
- int iFrameY = FrameY.intValue();
-
- //Height of the Company Address in the Receiver Field
- int iReceiverHeight = (int) (0.5 * 1000);
- BusCompanyAddressReceiver = myLetterDoc.new BusinessPaperObject(PropertyNames.SPACE, iFrameWidth, iReceiverHeight, iFrameX, (iFrameY - iReceiverHeight));
-
- setPossibleAddressReceiver(false);
- }
- catch (NoSuchElementException e)
- {
- // TODO Error Message: Template modified!
- e.printStackTrace();
- }
- catch (WrappedTargetException e)
- {
- e.printStackTrace();
- }
- if (chkPaperCompanyAddress.getState() != 0)
- {
- setPossibleSenderData(false);
- }
- }
- else
- {
- if (BusCompanyAddressReceiver != null)
- {
- BusCompanyAddressReceiver.removeFrame();
- }
- setPossibleAddressReceiver(true);
- setPossibleSenderData(true);
- if (optSenderDefine.getState())
- {
- optSenderDefineItemChanged();
- }
- if (optSenderPlaceholder.getState())
- {
- optSenderPlaceholderItemChanged();
- }
- }
- }
-
- public void chkPaperFooterItemChanged()
- {
-
- if (chkPaperFooter.getState() != 0)
- {
- //minimal value is required, otherwise the frame creation fails
- if (numFooterHeight.getValue() == 0)
- {
- numFooterHeight.setValue(0.1);
- }
- BusFooter = myLetterDoc.new BusinessPaperObject("Footer", myLetterDoc.DocSize.Width, (int) (numFooterHeight.getValue() * 1000), 0, (int) (myLetterDoc.DocSize.Height - (numFooterHeight.getValue() * 1000)));
- this.setControlProperty("numFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- this.setControlProperty("lblFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- setPossibleFooter(false);
- }
- else
- {
- if (BusFooter != null)
- {
- BusFooter.removeFrame();
- }
- setControlProperty("numFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setControlProperty("lblFooterHeight", PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- setPossibleFooter(true);
- }
- }
-
- //switch Elements on/off -------------------------------------------------------
- public void chkUseLogoItemChanged()
- {
- try
- {
- if (myLetterDoc.hasElement("Company Logo"))
- {
- boolean logostatus = AnyConverter.toBoolean(getControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED)) && (chkUseLogo.getState() != 0);
- myLetterDoc.switchElement("Company Logo", logostatus);
- }
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- throw new IllegalArgumentException("Fatal Error: Loading template failed: searching fillins failed");
- }
- }
-
- public void chkUseAddressReceiverItemChanged()
- {
- try
- {
- if (myLetterDoc.hasElement("Sender Address Repeated"))
- {
- boolean rstatus = AnyConverter.toBoolean(getControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED)) && (chkUseAddressReceiver.getState() != 0);
- myLetterDoc.switchElement("Sender Address Repeated", rstatus);
- }
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- throw new IllegalArgumentException("Fatal Error: Loading template failed: searching fillins failed");
- }
- }
-
- public void chkUseSignsItemChanged()
- {
- if (myLetterDoc.hasElement("Letter Signs"))
- {
- myLetterDoc.switchElement("Letter Signs", (chkUseSigns.getState() != 0));
- }
- }
-
- public void chkUseSubjectItemChanged()
- {
- if (myLetterDoc.hasElement("Subject Line"))
- {
- myLetterDoc.switchElement("Subject Line", (chkUseSubject.getState() != 0));
- }
- }
-
- public void chkUseBendMarksItemChanged()
- {
- if (myLetterDoc.hasElement("Bend Marks"))
- {
- myLetterDoc.switchElement("Bend Marks", (chkUseBendMarks.getState() != 0));
- }
- }
-
- public void chkUseFooterItemChanged()
- {
- try
- {
- boolean bFooterPossible = (chkUseFooter.getState() != 0) && AnyConverter.toBoolean(getControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED));
-
- if (chkFooterNextPages.getState() != 0)
- {
- myLetterDoc.switchFooter("First Page", false, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
- myLetterDoc.switchFooter("Standard", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
- }
- else
- {
- myLetterDoc.switchFooter("First Page", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
- myLetterDoc.switchFooter("Standard", bFooterPossible, (chkFooterPageNumbers.getState() != 0), txtFooter.getText());
- }
-
- //enable/disable roadmap item for footer page
- XInterface BPaperItem = getRoadmapItemByID(RM_FOOTER);
- Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bFooterPossible));
-
- }
- catch (Exception exception)
- {
- exception.printStackTrace(System.err);
- }
- }
-
- public void chkFooterNextPagesItemChanged()
- {
- chkUseFooterItemChanged();
- }
-
- public void chkFooterPageNumbersItemChanged()
- {
- chkUseFooterItemChanged();
- }
-
- private void setPossibleFooter(boolean bState)
- {
- setControlProperty("chkUseFooter", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- chkUseFooterItemChanged();
- }
-
- private void setPossibleAddressReceiver(boolean bState)
- {
- if (myLetterDoc.hasElement("Sender Address Repeated"))
- {
- setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- chkUseAddressReceiverItemChanged();
- }
- }
-
- private void setPossibleLogo(boolean bState)
- {
- if (myLetterDoc.hasElement("Company Logo"))
- {
- setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- chkUseLogoItemChanged();
- }
- }
-
- public void txtFooterTextChanged()
- {
- chkUseFooterItemChanged();
- }
-
- public void txtSenderNameTextChanged()
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(myLetterDoc.xMSF, xTextDocument);
- myFieldHandler.changeUserFieldContent("Company", txtSenderName.getText());
- }
-
- public void txtSenderStreetTextChanged()
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(myLetterDoc.xMSF, xTextDocument);
- myFieldHandler.changeUserFieldContent("Street", txtSenderStreet.getText());
- }
-
- public void txtSenderCityTextChanged()
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(myLetterDoc.xMSF, xTextDocument);
- myFieldHandler.changeUserFieldContent("City", txtSenderCity.getText());
- }
-
- public void txtSenderPostCodeTextChanged()
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(myLetterDoc.xMSF, xTextDocument);
- myFieldHandler.changeUserFieldContent("PostCode", txtSenderPostCode.getText());
- }
-
- public void txtSenderStateTextChanged()
- {
- TextFieldHandler myFieldHandler = new TextFieldHandler(myLetterDoc.xMSF, xTextDocument);
- myFieldHandler.changeUserFieldContent(PropertyNames.PROPERTY_STATE, txtSenderState.getText());
- }
-
- public void txtTemplateNameTextChanged()
- {
- XDocumentPropertiesSupplier xDocPropsSuppl = UnoRuntime.queryInterface(XDocumentPropertiesSupplier.class, xTextDocument);
- XDocumentProperties xDocProps = xDocPropsSuppl.getDocumentProperties();
- String TitleName = txtTemplateName.getText();
- xDocProps.setTitle(TitleName);
- }
-
- public void chkUseSalutationItemChanged()
- {
- XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
- myLetterDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0));
- setControlProperty("lstSalutation", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseSalutation.getState() != 0));
- }
-
- public void lstSalutationItemChanged()
- {
- XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
- myLetterDoc.switchUserField("Salutation", xTextComponent.getText(), (chkUseSalutation.getState() != 0));
- }
-
- public void lstSalutationTextChanged()
- {
- }
-
- public void chkUseGreetingItemChanged()
- {
- XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
- myLetterDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0));
- setControlProperty("lstGreeting", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(chkUseGreeting.getState() != 0));
- }
-
- private void setDefaultForGreetingAndSalutation()
- {
- XTextComponent xTextComponent;
- xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstSalutation);
- if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING))
- {
- xTextComponent.setText(resources.SalutationLabels[0]);
- }
- xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
- if (xTextComponent.getText().equals(PropertyNames.EMPTY_STRING))
- {
- xTextComponent.setText(resources.GreetingLabels[0]);
- }
- }
-
- public void lstGreetingItemChanged()
- {
- XTextComponent xTextComponent = UnoRuntime.queryInterface(XTextComponent.class, lstGreeting);
- myLetterDoc.switchUserField("Greeting", xTextComponent.getText(), (chkUseGreeting.getState() != 0));
- }
-
- public void lstGreetingTextChanged()
- {
- }
-
- // ----------------------------------------------------------------------------
- public void chkBusinessPaperItemChanged()
- {
- //enable/disable Roadmap Entry Business Paper
- if (chkBusinessPaper.getState() != 0)
- {
- enableBusinessPaper();
- }
- else
- {
- disableBusinessPaper();
- setPossibleSenderData(true);
- }
- }
-
- private void setPossibleSenderData(boolean bState)
- {
- setControlProperty("optSenderDefine", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- setControlProperty("optSenderPlaceholder", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- setControlProperty("lblSenderAddress", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- if (!bState)
- {
- setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- setControlProperty("txtSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- setControlProperty("txtSenderPostCode", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- setControlProperty("txtSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- setControlProperty("txtSenderCity", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- setControlProperty("txtSenderState", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- setControlProperty("lblSenderName", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- setControlProperty("lblSenderStreet", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- setControlProperty("lblPostCodeCity", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(bState));
- }
- }
-
- private void enableSenderReceiver()
- {
- XInterface BPaperItem = getRoadmapItemByID(RM_SENDERRECEIVER);
- Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- }
-
- private void disableSenderReceiver()
- {
- XInterface BPaperItem = getRoadmapItemByID(RM_SENDERRECEIVER);
- Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- }
-
- private void enableBusinessPaper()
- {
- XInterface BPaperItem = getRoadmapItemByID(RM_BUSINESSPAPER);
- Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.TRUE);
- chkPaperCompanyLogoItemChanged();
- chkPaperCompanyAddressItemChanged();
- chkPaperFooterItemChanged();
- chkCompanyReceiverItemChanged();
- }
-
- private void disableBusinessPaper()
- {
- XInterface BPaperItem = getRoadmapItemByID(RM_BUSINESSPAPER);
- Helper.setUnoPropertyValue(BPaperItem, PropertyNames.PROPERTY_ENABLED, Boolean.FALSE);
- if (BusCompanyLogo != null)
- {
- BusCompanyLogo.removeFrame();
- }
- if (BusCompanyAddress != null)
- {
- BusCompanyAddress.removeFrame();
- }
- if (BusFooter != null)
- {
- BusFooter.removeFrame();
- }
- if (BusCompanyAddressReceiver != null)
- {
- BusCompanyAddressReceiver.removeFrame();
- }
- setPossibleAddressReceiver(true);
- setPossibleFooter(true);
- setPossibleLogo(true);
- if (myLetterDoc.hasElement("Sender Address"))
- {
- myLetterDoc.switchElement("Sender Address", (true));
- }
-
- }
-
- public void initializeSalutation()
- {
- setControlProperty("lstSalutation", PropertyNames.STRING_ITEM_LIST, resources.SalutationLabels);
- }
-
- public void initializeGreeting()
- {
- setControlProperty("lstGreeting", PropertyNames.STRING_ITEM_LIST, resources.GreetingLabels);
- }
-
- private CGLetter getCurrentLetter()
- {
- switch (myConfig.cp_LetterType)
- {
- case 0:
- return myConfig.cp_BusinessLetter;
- case 1:
- return myConfig.cp_PrivateOfficialLetter;
- case 2:
- return myConfig.cp_PrivateLetter;
- default:
- return null;
- }
- }
-
- private void initializePaths()
- {
- try
- {
- XInterface xPathInterface = (XInterface) xMSF.createInstance("com.sun.star.util.PathSettings");
- XPropertySet xPropertySet = UnoRuntime.queryInterface(XPropertySet.class, xPathInterface);
- sTemplatePath = ((String[]) xPropertySet.getPropertyValue("Template_user"))[0];
- sUserTemplatePath = FileAccess.getOfficePath(xMSF, "Template", "user", PropertyNames.EMPTY_STRING);
- sBitmapPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../wizard/bitmap");
- }
- catch (NoValidPathException e)
- {
- e.printStackTrace();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public boolean initializeTemplates(XMultiServiceFactory xMSF)
- {
-
- try
- {
- String sLetterPath = FileAccess.combinePaths(xMSF, sTemplatePath, "/../common/wizard/letter");
-
- BusinessFiles = FileAccess.getFolderTitles(xMSF, "bus", sLetterPath);
- OfficialFiles = FileAccess.getFolderTitles(xMSF, "off", sLetterPath);
- PrivateFiles = FileAccess.getFolderTitles(xMSF, "pri", sLetterPath);
-
- exchangeBusinessTitlesToLocalizedOnes();
- exchangeOfficialTitlesToLocalizedOnes();
- exchangePrivateTitlesToLocalizedOnes();
-
- setControlProperty("lstBusinessStyle", PropertyNames.STRING_ITEM_LIST, BusinessFiles[0]);
- setControlProperty("lstPrivOfficialStyle", PropertyNames.STRING_ITEM_LIST, OfficialFiles[0]);
- setControlProperty("lstPrivateStyle", PropertyNames.STRING_ITEM_LIST, PrivateFiles[0]);
-
- setControlProperty("lstBusinessStyle", PropertyNames.SELECTED_ITEMS, new short[]
- {
- 0
- });
- setControlProperty("lstPrivOfficialStyle", PropertyNames.SELECTED_ITEMS, new short[]
- {
- 0
- });
- setControlProperty("lstPrivateStyle", PropertyNames.SELECTED_ITEMS, new short[]
- {
- 0
- });
- }
- catch (com.sun.star.wizards.common.NoValidPathException e)
- {
- return false;
- }
- return true;
- }
-
- public void initializeElements()
- {
- setControlProperty("chkUseLogo", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Company Logo")));
- setControlProperty("chkUseBendMarks", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Bend Marks")));
- setControlProperty("chkUseAddressReceiver", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Sender Address Repeated")));
- setControlProperty("chkUseSubject", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Subject Line")));
- setControlProperty("chkUseSigns", PropertyNames.PROPERTY_ENABLED, Boolean.valueOf(myLetterDoc.hasElement("Letter Signs")));
- myLetterDoc.updateDateFields();
- }
-
- public void setConfiguration()
- {
- //set correct Configuration tree:
-
- if (optBusinessLetter.getState())
- {
- optBusinessLetterItemChanged();
- }
- if (optPrivOfficialLetter.getState())
- {
- optPrivOfficialLetterItemChanged();
- }
- if (optPrivateLetter.getState())
- {
- optPrivateLetterItemChanged();
- }
- }
-
- public void setElements(boolean privLetter)
- {
- //UI relevant:
- if (optSenderDefine.getState())
- {
- optSenderDefineItemChanged();
- }
- if (optSenderPlaceholder.getState())
- {
- optSenderPlaceholderItemChanged();
- }
- chkUseSignsItemChanged();
- chkUseSubjectItemChanged();
- chkUseSalutationItemChanged();
- chkUseGreetingItemChanged();
- chkUseBendMarksItemChanged();
- chkUseAddressReceiverItemChanged();
- txtTemplateNameTextChanged();
-
- //not UI relevant:
- if (optReceiverDatabase.getState() && !privLetter)
- {
- optReceiverDatabaseItemChanged();
- }
- if (optReceiverPlaceholder.getState() && !privLetter)
- {
- optReceiverPlaceholderItemChanged();
- }
- if (optCreateLetter.getState())
- {
- optCreateLetterItemChanged();
- }
- if (optMakeChanges.getState())
- {
- optMakeChangesItemChanged();
- }
- }
-
- public void insertRoadmap()
- {
- addRoadmap();
- int i = 0;
- i = insertRoadmapItem(0, true, resources.RoadmapLabels[RM_TYPESTYLE], RM_TYPESTYLE);
- i = insertRoadmapItem(i, false, resources.RoadmapLabels[RM_BUSINESSPAPER], RM_BUSINESSPAPER);
- i = insertRoadmapItem(i, true, resources.RoadmapLabels[RM_ELEMENTS], RM_ELEMENTS);
- i = insertRoadmapItem(i, true, resources.RoadmapLabels[RM_SENDERRECEIVER], RM_SENDERRECEIVER);
- i = insertRoadmapItem(i, false, resources.RoadmapLabels[RM_FOOTER], RM_FOOTER);
- i = insertRoadmapItem(i, true, resources.RoadmapLabels[RM_FINALSETTINGS], RM_FINALSETTINGS);
- setRoadmapInteractive(true);
- setRoadmapComplete(true);
- setCurrentRoadmapItemID((short) 1);
- }
-
- private class myPathSelectionListener implements XPathSelectionListener
- {
-
- public void validatePath()
- {
- if (myPathSelection.usedPathPicker)
- {
- filenameChanged = true;
- }
- myPathSelection.usedPathPicker = false;
- }
- }
-
- public void insertPathSelectionControl()
- {
- myPathSelection = new PathSelection(xMSF, this, PathSelection.TransferMode.SAVE, PathSelection.DialogTypes.FILE);
- myPathSelection.insert(6, 97, 70, 205, (short) 45, resources.reslblTemplatePath_value, true, HelpIds.getHelpIdString(HID + 47), HelpIds.getHelpIdString(HID + 48));
- myPathSelection.sDefaultDirectory = sUserTemplatePath;
- myPathSelection.sDefaultName = "myLetterTemplate.ott";
- myPathSelection.sDefaultFilter = "writer8_template";
- myPathSelection.addSelectionListener(new myPathSelectionListener());
- }
-
- public void initConfiguration()
- {
- try
- {
- myConfig = new CGLetterWizard();
- Object root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", false);
- myConfig.readConfiguration(root, "cp_");
- mainDA.add(RadioDataAware.attachRadioButtons(myConfig, "cp_LetterType", new Object[]
- {
- optBusinessLetter, optPrivOfficialLetter, optPrivateLetter
- }, null, true));
- mainDA.add(UnoDataAware.attachListBox(myConfig.cp_BusinessLetter, "cp_Style", lstBusinessStyle, null, true));
- mainDA.add(UnoDataAware.attachListBox(myConfig.cp_PrivateOfficialLetter, "cp_Style", lstPrivOfficialStyle, null, true));
- mainDA.add(UnoDataAware.attachListBox(myConfig.cp_PrivateLetter, "cp_Style", lstPrivateStyle, null, true));
- mainDA.add(UnoDataAware.attachCheckBox(myConfig.cp_BusinessLetter, "cp_BusinessPaper", chkBusinessPaper, null, true));
-
- CGLetter cgl = myConfig.cp_BusinessLetter;
-
- CGPaperElementLocation cgpl = myConfig.cp_BusinessLetter.cp_CompanyLogo;
- CGPaperElementLocation cgpa = myConfig.cp_BusinessLetter.cp_CompanyAddress;
-
- businessDA.add(UnoDataAware.attachCheckBox(cgpl, "cp_Display", chkPaperCompanyLogo, null, true));
- businessDA.add(UnoDataAware.attachNumericControl(cgpl, "cp_Width", numLogoWidth, null, true));
- businessDA.add(UnoDataAware.attachNumericControl(cgpl, "cp_Height", numLogoHeight, null, true));
- businessDA.add(UnoDataAware.attachNumericControl(cgpl, "cp_X", numLogoX, null, true));
- businessDA.add(UnoDataAware.attachNumericControl(cgpl, "cp_Y", numLogoY, null, true));
- businessDA.add(UnoDataAware.attachCheckBox(cgpa, "cp_Display", chkPaperCompanyAddress, null, true));
- businessDA.add(UnoDataAware.attachNumericControl(cgpa, "cp_Width", numAddressWidth, null, true));
- businessDA.add(UnoDataAware.attachNumericControl(cgpa, "cp_Height", numAddressHeight, null, true));
- businessDA.add(UnoDataAware.attachNumericControl(cgpa, "cp_X", numAddressX, null, true));
- businessDA.add(UnoDataAware.attachNumericControl(cgpa, "cp_Y", numAddressY, null, true));
-
- businessDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PaperCompanyAddressReceiverField", chkCompanyReceiver, null, true));
- businessDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PaperFooter", chkPaperFooter, null, true));
- businessDA.add(UnoDataAware.attachNumericControl(cgl, "cp_PaperFooterHeight", numFooterHeight, null, true));
-
- letterDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintCompanyLogo", chkUseLogo, null, true));
- letterDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintCompanyAddressReceiverField", chkUseAddressReceiver, null, true));
- letterDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintLetterSigns", chkUseSigns, null, true));
- letterDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintSubjectLine", chkUseSubject, null, true));
- letterDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintSalutation", chkUseSalutation, null, true));
- letterDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintBendMarks", chkUseBendMarks, null, true));
- letterDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintGreeting", chkUseGreeting, null, true));
- letterDA.add(UnoDataAware.attachCheckBox(cgl, "cp_PrintFooter", chkUseFooter, null, true));
- letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_Salutation", lstSalutation, null, true));
- letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_Greeting", lstGreeting, null, true));
- letterDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_SenderAddressType", new Object[]
- {
- optSenderDefine, optSenderPlaceholder
- }, null, true));
- letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderCompanyName", txtSenderName, null, true));
- letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderStreet", txtSenderStreet, null, true));
- letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderPostCode", txtSenderPostCode, null, true));
- letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderState", txtSenderState, null, true));
- letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_SenderCity", txtSenderCity, null, true));
- letterDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_ReceiverAddressType", new Object[]
- {
- optReceiverDatabase, optReceiverPlaceholder
- }, null, true));
- letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_Footer", txtFooter, null, true));
- letterDA.add(UnoDataAware.attachCheckBox(cgl, "cp_FooterOnlySecondPage", chkFooterNextPages, null, true));
- letterDA.add(UnoDataAware.attachCheckBox(cgl, "cp_FooterPageNumbers", chkFooterPageNumbers, null, true));
- letterDA.add(RadioDataAware.attachRadioButtons(cgl, "cp_CreationType", new Object[]
- {
- optCreateLetter, optMakeChanges
- }, null, true));
- letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_TemplateName", txtTemplateName, null, true));
- letterDA.add(UnoDataAware.attachEditControl(cgl, "cp_TemplatePath", myPathSelection.xSaveTextBox, null, true));
-
- }
- catch (Exception exception)
- {
- exception.printStackTrace();
- }
-
- }
-
- private void updateUI()
- {
- UnoDataAware.updateUI(mainDA);
- UnoDataAware.updateUI(letterDA);
- UnoDataAware.updateUI(businessDA);
- }
-
- public void saveConfiguration()
- {
- try
- {
- Object root = Configuration.getConfigurationRoot(xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", true);
- myConfig.writeConfiguration(root, "cp_");
- Configuration.commit(root);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- private void exchangeBusinessTitlesToLocalizedOnes()
- {
- for(int i = 0; i < BusinessFiles[0].length; ++i)
- {
- if( BusinessFiles[0][i].equals("Elegant") )
- {
- BusinessFiles[0][i] = resources.resBusinessElegantTitle;
- }
- else if( BusinessFiles[0][i].equals("Modern") )
- {
- BusinessFiles[0][i] = resources.resBusinessModernTitle;
- }
- else if( BusinessFiles[0][i].equals("Office") )
- {
- BusinessFiles[0][i] = resources.resBusinessOfficeTitle;
- }
- }
- }
-
- private void exchangeOfficialTitlesToLocalizedOnes()
- {
- for(int i = 0; i < OfficialFiles[0].length; ++i)
- {
- if( OfficialFiles[0][i].equals("Elegant") )
- {
- OfficialFiles[0][i] = resources.resOfficialElegantTitle;
- }
- else if( OfficialFiles[0][i].equals("Modern") )
- {
- OfficialFiles[0][i] = resources.resOfficialModernTitle;
- }
- else if( OfficialFiles[0][i].equals("Office") )
- {
- OfficialFiles[0][i] = resources.resOfficialOfficeTitle;
- }
- }
- }
-
- private void exchangePrivateTitlesToLocalizedOnes()
- {
- for(int i = 0; i < PrivateFiles[0].length; ++i)
- {
- if( PrivateFiles[0][i].equals("Bottle") )
- {
- PrivateFiles[0][i] = resources.resPrivateBottleTitle;
- }
- else if( PrivateFiles[0][i].equals("Mail") )
- {
- PrivateFiles[0][i] = resources.resPrivateMailTitle;
- }
- else if( PrivateFiles[0][i].equals("Marine") )
- {
- PrivateFiles[0][i] = resources.resPrivateMarineTitle;
- }
- else if( PrivateFiles[0][i].equals("Red Line") )
- {
- PrivateFiles[0][i] = resources.resPrivateRedLineTitle;
- }
- }
- }
-
-}
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
index ba72ea876bf1..8f294771603a 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
@@ -15,25 +15,33 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-from LetterWizardDialog import *
-from LetterWizardDialog import *
-from LetterDocument import *
-from wizards.common.NoValidPathException import NoValidPathException
-from wizards.common.FileAccess import FileAccess
-from LocaleCodes import LocaleCodes
-from wizards.ui.PathSelection import PathSelection
-from wizards.common.Configuration import Configuration
-from CGLetterWizard import CGLetterWizard
-from wizards.ui.event.UnoDataAware import UnoDataAware
-from wizards.ui.event.RadioDataAware import RadioDataAware
-from wizards.text.TextFieldHandler import TextFieldHandler
-from wizards.common.SystemDialog import SystemDialog
+import traceback
+from .LetterWizardDialog import LetterWizardDialog, Helper, \
+ PropertyNames, uno, HelpIds, HID
+from .LetterDocument import LetterDocument, BusinessPaperObject
+from .CGLetterWizard import CGLetterWizard
+from ..common.NoValidPathException import NoValidPathException
+from ..common.FileAccess import FileAccess
+from ..common.Configuration import Configuration
+from ..common.SystemDialog import SystemDialog
+from ..common.Desktop import Desktop
+from ..ui.PathSelection import PathSelection
+from ..ui.event.UnoDataAware import UnoDataAware
+from ..ui.event.RadioDataAware import RadioDataAware
+from ..text.TextElement import TextElement
+from ..text.TextDocument import TextDocument
+from ..text.ViewHandler import ViewHandler
+from ..text.TextFieldHandler import TextFieldHandler
+from ..document.OfficeDocument import OfficeDocument
from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO
+from com.sun.star.uno import RuntimeException
+from com.sun.star.util import CloseVetoException
from com.sun.star.view.DocumentZoomType import OPTIMAL
from com.sun.star.document.UpdateDocMode import FULL_UPDATE
from com.sun.star.document.MacroExecMode import ALWAYS_EXECUTE
+
class LetterWizardDialogImpl(LetterWizardDialog):
RM_TYPESTYLE = 1
@@ -43,10 +51,6 @@ class LetterWizardDialogImpl(LetterWizardDialog):
RM_FOOTER = 5
RM_FINALSETTINGS = 6
- lstBusinessStylePos = None
- lstPrivateStylePos = None
- lstPrivOfficialStylePos = None
-
def enterStep(self, OldStep, NewStep):
pass
@@ -55,6 +59,9 @@ class LetterWizardDialogImpl(LetterWizardDialog):
def __init__(self, xmsf):
super(LetterWizardDialogImpl, self).__init__(xmsf)
+ self.lstBusinessStylePos = None
+ self.lstPrivateStylePos = None
+ self.lstPrivOfficialStylePos = None
self.xmsf = xmsf
self.bSaveSuccess = False
self.filenameChanged = False
@@ -62,23 +69,22 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.BusCompanyAddress = None
self.BusCompanyAddressReceiver = None
self.BusFooter = None
- self.Norms = []
- self.NormPaths = []
@classmethod
- def main(self, args):
- ConnectStr = \
- "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
- xLocMSF = None
+ def main(self):
+ #Call the wizard remotely(see README)
try:
+ ConnectStr = \
+ "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
xLocMSF = Desktop.connect(ConnectStr)
- except Exception, e:
- traceback.print_exc()
-
- lw = LetterWizardDialogImpl(xLocMSF)
- lw.startWizard(xLocMSF, None)
-
- def startWizard(self, xMSF, CurPropertyValue):
+ lw = LetterWizardDialogImpl(xLocMSF)
+ lw.startWizard(xLocMSF)
+ except Exception as e:
+ print ("Wizard failure exception " + str(type(e)) +
+ " message " + str(e) + " args " + str(e.args) +
+ traceback.format_exc())
+
+ def startWizard(self, xMSF):
self.running = True
try:
#Number of steps on WizardDialog
@@ -96,7 +102,6 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.buildStep5()
self.buildStep6()
self.__initializePaths()
- self.initializeNorms()
self.initializeSalutation()
self.initializeGreeting()
@@ -105,41 +110,37 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.myConfig = CGLetterWizard()
- oL = self.getOfficeLinguistic()
- self.myConfig.cp_BusinessLetter.cp_Norm = oL
- self.myConfig.cp_PrivateOfficialLetter.cp_Norm = oL
- self.myConfig.cp_PrivateLetter.cp_Norm = oL
self.initializeTemplates(xMSF)
#load the last used settings
#from the registry and apply listeners to the controls:
self.initConfiguration()
- if self.myConfig.cp_BusinessLetter.cp_Greeting == "":
+ if self.myConfig.cp_BusinessLetter.cp_Greeting :
self.myConfig.cp_BusinessLetter.cp_Greeting = \
self.resources.GreetingLabels[0]
- if self.myConfig.cp_BusinessLetter.cp_Salutation == "":
+ if self.myConfig.cp_BusinessLetter.cp_Salutation:
self.myConfig.cp_BusinessLetter.cp_Salutation = \
self.resources.SalutationLabels[0]
- if self.myConfig.cp_PrivateOfficialLetter.cp_Greeting == "":
+ if self.myConfig.cp_PrivateOfficialLetter.cp_Greeting:
self.myConfig.cp_PrivateOfficialLetter.cp_Greeting = \
self.resources.GreetingLabels[1]
- if self.myConfig.cp_PrivateOfficialLetter.cp_Salutation == "":
+ if self.myConfig.cp_PrivateOfficialLetter.cp_Salutation:
self.myConfig.cp_PrivateOfficialLetter.cp_Salutation = \
self.resources.SalutationLabels[1]
- if self.myConfig.cp_PrivateLetter.cp_Greeting == "":
+ if self.myConfig.cp_PrivateLetter.cp_Greeting:
self.myConfig.cp_PrivateLetter.cp_Greeting = \
self.resources.GreetingLabels[2]
- if self.myConfig.cp_PrivateLetter.cp_Salutation == "":
+ if self.myConfig.cp_PrivateLetter.cp_Salutation:
self.myConfig.cp_PrivateLetter.cp_Salutation = \
self.resources.SalutationLabels[2]
- if self.myPathSelection.xSaveTextBox.Text.lower() == "":
+ if self.myPathSelection.xSaveTextBox.Text.lower():
self.myPathSelection.initializePath()
xContainerWindow = self.myLetterDoc.xFrame.ContainerWindow
@@ -169,7 +170,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
try:
fileAccess = FileAccess(self.xMSF)
self.sPath = self.myPathSelection.getSelectedPath()
- if self.sPath == "":
+ if not self.sPath:
self.myPathSelection.triggerPathPicker()
self.sPath = self.myPathSelection.getSelectedPath()
@@ -264,8 +265,8 @@ class LetterWizardDialogImpl(LetterWizardDialog):
traceback.print_exc()
def optBusinessLetterItemChanged(self):
- LetterWizardDialogImpl.lstPrivateStylePos = None
- LetterWizardDialogImpl.lstPrivOfficialStylePos = None
+ self.lstPrivateStylePos = None
+ self.lstPrivOfficialStylePos = None
self.setControlProperty(
"lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, True)
self.setControlProperty(
@@ -283,12 +284,12 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.lstBusinessStyleItemChanged()
self.enableSenderReceiver()
self.setPossibleFooter(True)
- if self.myPathSelection.xSaveTextBox.Text.lower() == "":
+ if self.myPathSelection.xSaveTextBox.Text.lower():
self.myPathSelection.initializePath()
def optPrivOfficialLetterItemChanged(self):
- LetterWizardDialogImpl.lstBusinessStylePos = None
- LetterWizardDialogImpl.lstPrivateStylePos = None
+ self.lstBusinessStylePos = None
+ self.lstPrivateStylePos = None
self.setControlProperty(
"lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False)
self.setControlProperty(
@@ -307,12 +308,12 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.disableBusinessPaper()
self.enableSenderReceiver()
self.setPossibleFooter(True)
- if self.myPathSelection.xSaveTextBox.Text.lower() == "":
+ if self.myPathSelection.xSaveTextBox.Text.lower():
self.myPathSelection.initializePath()
def optPrivateLetterItemChanged(self):
- LetterWizardDialogImpl.lstBusinessStylePos = None
- LetterWizardDialogImpl.lstPrivOfficialStylePos = None
+ self.lstBusinessStylePos = None
+ self.lstPrivOfficialStylePos = None
self.setControlProperty(
"lblBusinessStyle", PropertyNames.PROPERTY_ENABLED, False)
self.setControlProperty(
@@ -331,7 +332,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.disableBusinessPaper()
self.disableSenderReceiver()
self.setPossibleFooter(False)
- if self.myPathSelection.xSaveTextBox.Text.lower() == "":
+ if self.myPathSelection.xSaveTextBox.Text.lower():
self.myPathSelection.initializePath()
def optSenderPlaceholderItemChanged(self):
@@ -378,44 +379,37 @@ class LetterWizardDialogImpl(LetterWizardDialog):
def lstBusinessStyleItemChanged(self):
selectedItemPos = self.lstBusinessStyle.SelectedItemPos
- if LetterWizardDialogImpl.lstBusinessStylePos is not selectedItemPos:
- LetterWizardDialogImpl.lstBusinessStylePos = selectedItemPos
+ if self.lstBusinessStylePos != selectedItemPos:
+ self.lstBusinessStylePos = selectedItemPos
TextDocument.xTextDocument = \
self.myLetterDoc.loadAsPreview(
- self.BusinessFiles[1][selectedItemPos],
- False)
- self.myLetterDoc.xTextDocument.lockControllers()
+ self.BusinessFiles.values()[selectedItemPos], False)
self.initializeElements()
self.chkBusinessPaperItemChanged()
self.setElements(False)
- self.myLetterDoc.xTextDocument.unlockControllers()
-
+ self.drawConstants()
+
def lstPrivOfficialStyleItemChanged(self):
selectedItemPos = self.lstPrivOfficialStyle.SelectedItemPos
- if LetterWizardDialogImpl.lstPrivOfficialStylePos is not selectedItemPos:
- LetterWizardDialogImpl.lstPrivOfficialStylePos = selectedItemPos
+ if self.lstPrivOfficialStylePos != selectedItemPos:
+ self.lstPrivOfficialStylePos = selectedItemPos
TextDocument.xTextDocument = \
self.myLetterDoc.loadAsPreview(
- self.OfficialFiles[1][selectedItemPos],
- False)
- self.myLetterDoc.xTextDocument.lockControllers()
+ self.OfficialFiles.values()[selectedItemPos], False)
self.initializeElements()
self.setPossibleSenderData(True)
self.setElements(False)
- self.myLetterDoc.xTextDocument.unlockControllers()
+ self.drawConstants()
def lstPrivateStyleItemChanged(self):
selectedItemPos = self.lstPrivateStyle.SelectedItemPos
- if LetterWizardDialogImpl.lstPrivateStylePos is not selectedItemPos:
- LetterWizardDialogImpl.lstPrivateStylePos = selectedItemPos
+ if self.lstPrivateStylePos != selectedItemPos:
+ self.lstPrivateStylePos = selectedItemPos
TextDocument.xTextDocument = \
self.myLetterDoc.loadAsPreview(
- self.PrivateFiles[1][selectedItemPos],
- False)
- self.myLetterDoc.xTextDocument.lockControllers()
+ self.PrivateFiles.values()[selectedItemPos], False)
self.initializeElements()
self.setElements(True)
- self.myLetterDoc.xTextDocument.unlockControllers()
def numLogoHeightTextChanged(self):
self.BusCompanyLogo.iHeight = int(self.numLogoHeight.Value * 1000)
@@ -782,10 +776,10 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.chkUseGreeting.State != 0)
def setDefaultForGreetingAndSalutation(self):
- if self.lstSalutation.Text == "":
+ if self.lstSalutation.Text:
self.lstSalutation.Text = self.resources.SalutationLabels[0]
- if self.lstGreeting.Text == "":
+ if self.lstGreeting.Text:
self.lstGreeting.Text = self.resources.GreetingLabels[0]
def lstGreetingItemChanged(self):
@@ -799,25 +793,6 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.disableBusinessPaper()
self.setPossibleSenderData(True)
- def getOfficeLinguistic(self):
- oL = 0
- found = False
- OfficeLinguistic = Configuration.getOfficeLinguistic(self.xMSF)
- i = 0
- for index, workwith in enumerate(self.Norms):
- if workwith.lower() == OfficeLinguistic.lower():
- oL = index
- found = True
- break
-
- if not found:
- for index, workwith in enumerate(self.Norms):
- if workwith.lower() == "en-US".lower():
- oL = index
- found = True
- break
- return oL
-
def setPossibleSenderData(self, bState):
self.setControlProperty(
"optSenderDefine", PropertyNames.PROPERTY_ENABLED, bState)
@@ -897,75 +872,15 @@ class LetterWizardDialogImpl(LetterWizardDialog):
except Exception:
traceback.print_exc()
- def lstLetterNormItemChanged(self):
- sCurrentNorm = self.Norms[getCurrentLetter().cp_Norm]
- initializeTemplates(xMSF)
- if self.optBusinessLetter.State:
- self.lstBusinessStyleItemChanged()
-
- elif optPrivOfficialLetter.State:
- self.lstPrivOfficialStyleItemChanged()
-
- elif optPrivateLetter.State:
- self.lstPrivateStyleItemChanged()
-
def initializeSalutation(self):
self.setControlProperty(
"lstSalutation", "StringItemList",
- self.resources.SalutationLabels)
+ tuple(self.resources.SalutationLabels))
def initializeGreeting(self):
self.setControlProperty(
- "lstGreeting", "StringItemList", self.resources.GreetingLabels)
-
- def initializeNorms(self):
- lc = LocaleCodes(self.xmsf)
- allLocales = lc.getIDs()
- nameList = []
- sLetterSubPath = "/wizard/letter/"
- try:
- self.sTemplatePath = \
- FileAccess.deleteLastSlashfromUrl(self.sTemplatePath)
- nuString = \
- self.sTemplatePath[:self.sTemplatePath.rfind("/")] + "/"
- sMainPath = FileAccess.deleteLastSlashfromUrl(nuString)
- self.sLetterPath = sMainPath + sLetterSubPath
- xInterface = \
- self.xmsf.createInstance("com.sun.star.ucb.SimpleFileAccess")
- nameList = xInterface.getFolderContents(self.sLetterPath, True)
- except Exception, e:
- traceback.print_exc()
-
- found = False
- cIsoCode = ""
- MSID = ""
- LanguageLabels = []
-
- for i in nameList:
- found = False
- cIsoCode = FileAccess.getFilename(i)
- for j in allLocales:
- aLang = j.split(";")
- if cIsoCode.lower() == aLang[1].lower():
- MSID = aLang[2]
- found = True
- break
-
- if not found:
- for j in allLocales:
- aLang = j.split(";")
- if cIsoCode.lower() == aLang[1][:2]:
- MSID = aLang[2]
- found = True
- break
-
- if found:
- self.Norms.append(cIsoCode)
- self.NormPaths.append(i)
- #LanguageLabels.append(lc.getLanguageString(MSID))
-
- self.setControlProperty(
- "lstLetterNorm", "StringItemList", tuple(LanguageLabels))
+ "lstGreeting", "StringItemList",
+ tuple(self.resources.GreetingLabels))
def getCurrentLetter(self):
if self.myConfig.cp_LetterType == 0:
@@ -984,30 +899,30 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.xMSF, "Template", "share", "/wizard")
self.sUserTemplatePath = \
FileAccess.getOfficePath2(self.xMSF, "Template", "user", "")
- self.sBitmapPath = \
- FileAccess.combinePaths(
- self.xMSF, self.sTemplatePath, "/../wizard/bitmap")
except NoValidPathException, e:
traceback.print_exc()
def initializeTemplates(self, xMSF):
- self.sCurrentNorm = self.Norms[self.getCurrentLetter().cp_Norm]
- sLetterPath = self.NormPaths[self.getCurrentLetter().cp_Norm]
+ sLetterPath = FileAccess.combinePaths(
+ xMSF, self.sTemplatePath, "/../common/wizard/letter")
self.BusinessFiles = \
- FileAccess.getFolderTitles(xMSF, "bus", sLetterPath)
+ FileAccess.getFolderTitles(
+ xMSF, "bus", sLetterPath, self.resources.dictBusinessTemplate)
self.OfficialFiles = \
- FileAccess.getFolderTitles(xMSF, "off", sLetterPath)
+ FileAccess.getFolderTitles(
+ xMSF, "off", sLetterPath, self.resources.dictOfficialTemplate)
self.PrivateFiles = \
- FileAccess.getFolderTitles(xMSF, "pri", sLetterPath)
+ FileAccess.getFolderTitles(
+ xMSF, "pri", sLetterPath, self.resources.dictPrivateTemplate)
self.setControlProperty(
"lstBusinessStyle", "StringItemList",
- tuple(self.BusinessFiles[0]))
+ tuple(self.BusinessFiles.keys()))
self.setControlProperty(
"lstPrivOfficialStyle", "StringItemList",
- tuple(self.OfficialFiles[0]))
+ tuple(self.OfficialFiles.keys()))
self.setControlProperty(
"lstPrivateStyle", "StringItemList",
- tuple(self.PrivateFiles[0]))
+ tuple(self.PrivateFiles.keys()))
self.setControlProperty(
"lstBusinessStyle", "SelectedItems", (0,))
self.setControlProperty(
@@ -1069,7 +984,16 @@ class LetterWizardDialogImpl(LetterWizardDialog):
if self.optMakeChanges.State:
self.optMakeChangesItemChanged()
-
+
+ def drawConstants(self):
+ '''Localise the template'''
+ constRangeList = TextDocument.searchFillInItems(1)
+
+ for i in constRangeList:
+ text = i.String.lower()
+ aux = TextElement(i, self.resources.dictConstants[text])
+ aux.write()
+
def insertRoadmap(self):
self.addRoadmap()
@@ -1092,8 +1016,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
self.myPathSelection.sDefaultDirectory = self.sUserTemplatePath
self.myPathSelection.sDefaultName = "myLetterTemplate.ott"
self.myPathSelection.sDefaultFilter = "writer8_template"
- self.myPathSelection.addSelectionListener(
- self.myPathSelectionListener())
+ self.myPathSelection.addSelectionListener(self)
def initConfiguration(self):
try:
@@ -1146,8 +1069,6 @@ class LetterWizardDialogImpl(LetterWizardDialog):
cgl, "cp_PaperFooter", self.chkPaperFooter, True).updateUI()
UnoDataAware.attachNumericControl(
cgl, "cp_PaperFooterHeight", self.numFooterHeight, True).updateUI()
- UnoDataAware.attachListBox(
- cgl, "cp_Norm", self.lstLetterNorm, True).updateUI()
UnoDataAware.attachCheckBox(
cgl, "cp_PrintCompanyLogo", self.chkUseLogo, True).updateUI()
UnoDataAware.attachCheckBox(
@@ -1207,8 +1128,14 @@ class LetterWizardDialogImpl(LetterWizardDialog):
def saveConfiguration(self):
try:
- root = Configuration.getConfigurationRoot(self.xMSF, "/org.openoffice.Office.Writer/Wizards/Letter", True)
+ root = Configuration.getConfigurationRoot(self.xMSF,
+ "/org.openoffice.Office.Writer/Wizards/Letter", True)
self.myConfig.writeConfiguration(root, "cp_")
root.commitChanges()
except Exception, e:
traceback.print_exc()
+
+ def validatePath(self):
+ if self.myPathSelection.usedPathPicker:
+ self.filenameChanged = True
+ self.myPathSelection.usedPathPicker = False
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java
deleted file mode 100644
index 932b351039aa..000000000000
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.letter;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.wizards.common.Resource;
-
-public class LetterWizardDialogResources extends Resource
-{
-
- final static String UNIT_NAME = "dbwizres";
- final static String MODULE_NAME = "dbw";
- final static int RID_LETTERWIZARDDIALOG_START = 3000;
- final static int RID_LETTERWIZARDGREETING_START = 3080;
- final static int RID_LETTERWIZARDSALUTATION_START = 3090;
- final static int RID_LETTERWIZARDROADMAP_START = 3100;
- final static int RID_LETTERWIZARDLANGUAGE_START = 3110;
- final static int RID_RID_COMMON_START = 500;
- protected String[] RoadmapLabels = new String[7];
- protected String[] SalutationLabels = new String[3];
- protected String[] GreetingLabels = new String[3];
- protected String[] LanguageLabels = new String[16];
- String resOverwriteWarning;
- String resTemplateDescription;
- String resLetterWizardDialog_title;
- String resLabel9_value;
- String resoptBusinessLetter_value;
- String resoptPrivOfficialLetter_value;
- String resoptPrivateLetter_value;
- String reschkBusinessPaper_value;
- String reschkPaperCompanyLogo_value;
- String reschkPaperCompanyAddress_value;
- String reschkPaperFooter_value;
- String reschkCompanyReceiver_value;
- String reschkUseLogo_value;
- String reschkUseAddressReceiver_value;
- String reschkUseSigns_value;
- String reschkUseSubject_value;
- String reschkUseSalutation_value;
- String reschkUseBendMarks_value;
- String reschkUseGreeting_value;
- String reschkUseFooter_value;
- String resoptSenderPlaceholder_value;
- String resoptSenderDefine_value;
- String resoptReceiverPlaceholder_value;
- String resoptReceiverDatabase_value;
- String reschkFooterNextPages_value;
- String reschkFooterPageNumbers_value;
- String restxtTemplateName_value;
- String resoptCreateLetter_value;
- String resoptMakeChanges_value;
- String reslblBusinessStyle_value;
- String reslblPrivOfficialStyle_value;
- String reslblPrivateStyle_value;
- String reslblIntroduction_value;
- String reslblLogoHeight_value;
- String reslblLogoWidth_value;
- String reslblLogoX_value;
- String reslblLogoY_value;
- String reslblAddressHeight_value;
- String reslblAddressWidth_value;
- String reslblAddressX_value;
- String reslblAddressY_value;
- String reslblFooterHeight_value;
- String reslblLetterNorm_value;
- String reslblSenderAddress_value;
- String reslblSenderName_value;
- String reslblSenderStreet_value;
- String reslblPostCodeCity_value;
- String reslblReceiverAddress_value;
- String reslblFooter_value;
- String reslblFinalExplanation1_value;
- String reslblFinalExplanation2_value;
- String reslblTemplateName_value;
- String reslblTemplatePath_value;
- String reslblProceed_value;
- String reslblTitle1_value;
- String reslblTitle3_value;
- String reslblTitle2_value;
- String reslblTitle4_value;
- String reslblTitle5_value;
- String reslblTitle6_value;
-
- String resSubjectconstPlaceHolder = "#subjectconst#";
- String resSubjectconstPlaceHolder_value;
-
- String resBusinessElegantTitle;
- String resBusinessModernTitle;
- String resBusinessOfficeTitle;
- String resOfficialElegantTitle;
- String resOfficialModernTitle;
- String resOfficialOfficeTitle;
- String resPrivateBottleTitle;
- String resPrivateMailTitle;
- String resPrivateMarineTitle;
- String resPrivateRedLineTitle;
-
- public LetterWizardDialogResources(XMultiServiceFactory xmsf)
- {
- super(xmsf, UNIT_NAME, MODULE_NAME);
-
- resLetterWizardDialog_title = getResText(RID_LETTERWIZARDDIALOG_START + 1);
- resLabel9_value = getResText(RID_LETTERWIZARDDIALOG_START + 2);
- resoptBusinessLetter_value = getResText(RID_LETTERWIZARDDIALOG_START + 3);
- resoptPrivOfficialLetter_value = getResText(RID_LETTERWIZARDDIALOG_START + 4);
- resoptPrivateLetter_value = getResText(RID_LETTERWIZARDDIALOG_START + 5);
- reschkBusinessPaper_value = getResText(RID_LETTERWIZARDDIALOG_START + 6);
- reschkPaperCompanyLogo_value = getResText(RID_LETTERWIZARDDIALOG_START + 7);
- reschkPaperCompanyAddress_value = getResText(RID_LETTERWIZARDDIALOG_START + 8);
- reschkPaperFooter_value = getResText(RID_LETTERWIZARDDIALOG_START + 9);
- reschkCompanyReceiver_value = getResText(RID_LETTERWIZARDDIALOG_START + 10);
- reschkUseLogo_value = getResText(RID_LETTERWIZARDDIALOG_START + 11);
- reschkUseAddressReceiver_value = getResText(RID_LETTERWIZARDDIALOG_START + 12);
- reschkUseSigns_value = getResText(RID_LETTERWIZARDDIALOG_START + 13);
- reschkUseSubject_value = getResText(RID_LETTERWIZARDDIALOG_START + 14);
- reschkUseSalutation_value = getResText(RID_LETTERWIZARDDIALOG_START + 15);
- reschkUseBendMarks_value = getResText(RID_LETTERWIZARDDIALOG_START + 16);
- reschkUseGreeting_value = getResText(RID_LETTERWIZARDDIALOG_START + 17);
- reschkUseFooter_value = getResText(RID_LETTERWIZARDDIALOG_START + 18);
- resoptSenderPlaceholder_value = getResText(RID_LETTERWIZARDDIALOG_START + 19);
- resoptSenderDefine_value = getResText(RID_LETTERWIZARDDIALOG_START + 20);
- resoptReceiverPlaceholder_value = getResText(RID_LETTERWIZARDDIALOG_START + 21);
- resoptReceiverDatabase_value = getResText(RID_LETTERWIZARDDIALOG_START + 22);
- reschkFooterNextPages_value = getResText(RID_LETTERWIZARDDIALOG_START + 23);
- reschkFooterPageNumbers_value = getResText(RID_LETTERWIZARDDIALOG_START + 24);
- restxtTemplateName_value = getResText(RID_LETTERWIZARDDIALOG_START + 25);
- resoptCreateLetter_value = getResText(RID_LETTERWIZARDDIALOG_START + 26);
- resoptMakeChanges_value = getResText(RID_LETTERWIZARDDIALOG_START + 27);
- reslblBusinessStyle_value = getResText(RID_LETTERWIZARDDIALOG_START + 28);
- reslblPrivOfficialStyle_value = getResText(RID_LETTERWIZARDDIALOG_START + 29);
- reslblPrivateStyle_value = getResText(RID_LETTERWIZARDDIALOG_START + 30);
- reslblIntroduction_value = getResText(RID_LETTERWIZARDDIALOG_START + 31);
- reslblLogoHeight_value = getResText(RID_LETTERWIZARDDIALOG_START + 32);
- reslblLogoWidth_value = getResText(RID_LETTERWIZARDDIALOG_START + 33);
- reslblLogoX_value = getResText(RID_LETTERWIZARDDIALOG_START + 34);
- reslblLogoY_value = getResText(RID_LETTERWIZARDDIALOG_START + 35);
- reslblAddressHeight_value = getResText(RID_LETTERWIZARDDIALOG_START + 36);
- reslblAddressWidth_value = getResText(RID_LETTERWIZARDDIALOG_START + 37);
- reslblAddressX_value = getResText(RID_LETTERWIZARDDIALOG_START + 38);
- reslblAddressY_value = getResText(RID_LETTERWIZARDDIALOG_START + 39);
- reslblFooterHeight_value = getResText(RID_LETTERWIZARDDIALOG_START + 40);
- reslblLetterNorm_value = getResText(RID_LETTERWIZARDDIALOG_START + 41);
- reslblSenderAddress_value = getResText(RID_LETTERWIZARDDIALOG_START + 42);
- reslblSenderName_value = getResText(RID_LETTERWIZARDDIALOG_START + 43);
- reslblSenderStreet_value = getResText(RID_LETTERWIZARDDIALOG_START + 44);
- reslblPostCodeCity_value = getResText(RID_LETTERWIZARDDIALOG_START + 45);
- reslblReceiverAddress_value = getResText(RID_LETTERWIZARDDIALOG_START + 46);
- reslblFooter_value = getResText(RID_LETTERWIZARDDIALOG_START + 47);
- reslblFinalExplanation1_value = getResText(RID_LETTERWIZARDDIALOG_START + 48);
- reslblFinalExplanation2_value = getResText(RID_LETTERWIZARDDIALOG_START + 49);
- reslblTemplateName_value = getResText(RID_LETTERWIZARDDIALOG_START + 50);
- reslblTemplatePath_value = getResText(RID_LETTERWIZARDDIALOG_START + 51);
- reslblProceed_value = getResText(RID_LETTERWIZARDDIALOG_START + 52);
- reslblTitle1_value = getResText(RID_LETTERWIZARDDIALOG_START + 53);
- reslblTitle3_value = getResText(RID_LETTERWIZARDDIALOG_START + 54);
- reslblTitle2_value = getResText(RID_LETTERWIZARDDIALOG_START + 55);
- reslblTitle4_value = getResText(RID_LETTERWIZARDDIALOG_START + 56);
- reslblTitle5_value = getResText(RID_LETTERWIZARDDIALOG_START + 57);
- reslblTitle6_value = getResText(RID_LETTERWIZARDDIALOG_START + 58);
-
- resSubjectconstPlaceHolder_value = getResText(RID_LETTERWIZARDDIALOG_START + 59);
-
- resBusinessElegantTitle = getResText(RID_LETTERWIZARDDIALOG_START + 60);
- resBusinessModernTitle = getResText(RID_LETTERWIZARDDIALOG_START + 61);
- resBusinessOfficeTitle = getResText(RID_LETTERWIZARDDIALOG_START + 62);
- resOfficialElegantTitle = getResText(RID_LETTERWIZARDDIALOG_START + 60);
- resOfficialModernTitle = getResText(RID_LETTERWIZARDDIALOG_START + 61);
- resOfficialOfficeTitle = getResText(RID_LETTERWIZARDDIALOG_START + 62);
- resPrivateBottleTitle = getResText(RID_LETTERWIZARDDIALOG_START + 63);
- resPrivateMailTitle = getResText(RID_LETTERWIZARDDIALOG_START + 64);
- resPrivateMarineTitle = getResText(RID_LETTERWIZARDDIALOG_START + 65);
- resPrivateRedLineTitle = getResText(RID_LETTERWIZARDDIALOG_START + 66);
-
- loadRoadmapResources();
- loadSalutationResources();
- loadGreetingResources();
- loadCommonResources();
- }
-
- private void loadCommonResources()
- {
- resOverwriteWarning = getResText(RID_RID_COMMON_START + 19);
- resTemplateDescription = getResText(RID_RID_COMMON_START + 20);
- }
-
- private void loadRoadmapResources()
- {
- for (int i = 1; i < 7; i++)
- {
- RoadmapLabels[i] = getResText(RID_LETTERWIZARDROADMAP_START + i);
- }
- }
-
- private void loadSalutationResources()
- {
- for (int i = 1; i < 4; i++)
- {
- SalutationLabels[i - 1] = getResText(RID_LETTERWIZARDSALUTATION_START + i);
- }
- }
-
- private void loadGreetingResources()
- {
- for (int i = 1; i < 4; i++)
- {
- GreetingLabels[i - 1] = getResText(RID_LETTERWIZARDGREETING_START + i);
- }
- }
-}
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
index 299472e8844d..64b45f76cc1b 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
@@ -15,7 +15,7 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-from wizards.common.Resource import Resource
+from ..common.Resource import Resource
class LetterWizardDialogResources(Resource):
@@ -30,11 +30,10 @@ class LetterWizardDialogResources(Resource):
def __init__(self, xmsf):
super(LetterWizardDialogResources,self).__init__(
xmsf, LetterWizardDialogResources.MODULE_NAME)
+ self.RoadmapLabels = []
+ self.SalutationLabels = []
+ self.GreetingLabels = []
- self.RoadmapLabels = ()
- self.SalutationLabels = ()
- self.GreetingLabels = ()
- self.LanguageLabels = ()
self.resLetterWizardDialog_title = \
self.getResText(
LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 1)
@@ -209,28 +208,67 @@ class LetterWizardDialogResources(Resource):
self.reslblTitle6_value = \
self.getResText(
LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 58)
- self.loadRoadmapResources()
- self.loadSalutationResources()
- self.loadGreetingResources()
- self.loadCommonResources()
+
+ #Create a Dictionary for the constants values.
+ self.dictConstants = {
+ "#subjectconst#" : self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 59)}
+
+ #Create a dictionary for localising the bussiness templates
+ self.dictBusinessTemplate = {
+ "Elegant" : self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 60),
+ "Modern" : self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 61),
+ "Office" : self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 62)}
+
+ #Create a dictionary for localising the official templates
+ self.dictOfficialTemplate = {
+ "Elegant" : self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 60),
+ "Modern" : self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 61),
+ "Office" : self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 62)}
- def loadCommonResources(self):
+ #Create a dictionary for localising the private templates
+ self.dictPrivateTemplate = {
+ "Bottle" : self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 63),
+ "Mail" : self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 64),
+ "Marine" : self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 65),
+ "RedLine" : self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 66)}
+
+ #Common Resources
self.resOverwriteWarning = \
self.getResText(
LetterWizardDialogResources.RID_RID_COMMON_START + 19)
self.resTemplateDescription = \
self.getResText(
LetterWizardDialogResources.RID_RID_COMMON_START + 20)
+
+ self.loadRoadmapResources()
+ self.loadSalutationResources()
+ self.loadGreetingResources()
- def loadRoadmapResources(self):
- i = 1
+ def loadRoadmapResources(self):
for i in xrange(6):
- self.RoadmapLabels = self.RoadmapLabels + (self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDROADMAP_START + i + 1),)
+ self.RoadmapLabels.append(self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDROADMAP_START + \
+ i + 1))
def loadSalutationResources(self):
for i in xrange(3):
- self.SalutationLabels = self.SalutationLabels + (self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDSALUTATION_START + i + 1),)
+ self.SalutationLabels.append(self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDSALUTATION_START + \
+ i + 1))
def loadGreetingResources(self):
for i in xrange(3):
- self.GreetingLabels = self.GreetingLabels + (self.getResText(LetterWizardDialogResources.RID_LETTERWIZARDGREETING_START + i + 1),)
+ self.GreetingLabels.append(self.getResText(
+ LetterWizardDialogResources.RID_LETTERWIZARDGREETING_START + \
+ i + 1))
diff --git a/wizards/com/sun/star/wizards/letter/LocaleCodes.java b/wizards/com/sun/star/wizards/letter/LocaleCodes.java
deleted file mode 100644
index ce5d14a07e45..000000000000
--- a/wizards/com/sun/star/wizards/letter/LocaleCodes.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package com.sun.star.wizards.letter;
-
-import com.sun.star.lang.XMultiServiceFactory;
-import com.sun.star.wizards.common.Resource;
-import com.sun.star.beans.PropertyValue;
-
-public class LocaleCodes extends Resource
-{
-
- final static String UNIT_NAME = "svtres";
- final static String MODULE_NAME = "svt";
- PropertyValue[] allLanguageStrings;
-
- public LocaleCodes(XMultiServiceFactory xmsf)
- {
- super(xmsf, UNIT_NAME, MODULE_NAME);
- allLanguageStrings = getStringList(16642); // STR_ARR_SVT_LANGUAGE_TABLE from svtools/source/misc/langtab.src
- }
-
- public String getLanguageString(String MSID)
- {
- String LS = "unknown Language";
- for (int i = 0; i < allLanguageStrings.length; i++)
- {
- if (allLanguageStrings[i].Value.toString().equalsIgnoreCase(MSID))
- {
- LS = allLanguageStrings[i].Name;
- }
- }
- return LS;
- }
-
- public String[] getIDs()
- {
- String[] Ids = new String[135];
-
- Ids[0] = "Afrikaans;af;1078";
- Ids[1] = "Albanian;sq;1052";
- Ids[2] = "Arabic - United Arab Emirates;ar-ae;14337";
- Ids[3] = "Arabic - Bahrain;ar-bh;15361";
- Ids[4] = "Arabic - Algeria;ar-dz;5121";
- Ids[5] = "Arabic - Egypt;ar-eg;3073";
- Ids[6] = "Arabic - Iraq;ar-iq;2049";
- Ids[7] = "Arabic - Jordan;ar-jo;11265";
- Ids[8] = "Arabic - Kuwait;ar-kw;13313";
- Ids[9] = "Arabic - Lebanon;ar-lb;12289";
- Ids[10] = "Arabic - Libya;ar-ly;4097";
- Ids[11] = "Arabic - Morocco;ar-ma;6145";
- Ids[12] = "Arabic - Oman;ar-om;8193";
- Ids[13] = "Arabic - Qatar;ar-qa;16385";
- Ids[14] = "Arabic - Saudi Arabia;ar-sa;1025";
- Ids[15] = "Arabic - Syria;ar-sy;10241";
- Ids[16] = "Arabic - Tunisia;ar-tn;7169";
- Ids[17] = "Arabic - Yemen;ar-ye;9217";
- Ids[18] = "Armenian;hy;1067";
- Ids[19] = "Azeri - Latin;az-az;1068";
- Ids[20] = "Azeri - Cyrillic;az-az;2092";
- Ids[21] = "Basque;eu;1069";
- Ids[22] = "Belarusian;be;1059";
- Ids[23] = "Bulgarian;bg;1026";
- Ids[24] = "Catalan;ca;1027";
- Ids[25] = "Chinese - China;zh-cn;2052";
- Ids[26] = "Chinese - Hong Kong SAR;zh-hk;3076";
- Ids[27] = "Chinese - Macau SAR;zh-mo;5124";
- Ids[28] = "Chinese - Singapore;zh-sg;4100";
- Ids[29] = "Chinese - Taiwan;zh-tw;1028";
- Ids[30] = "Croatian;hr;1050";
- Ids[31] = "Czech;cs;1029";
- Ids[32] = "Danish;da;1030";
- Ids[33] = "Dutch - The Netherlands;nl-nl;1043";
- Ids[34] = "Dutch - Belgium;nl-be;2067";
- Ids[35] = "English - Australia;en-au;3081";
- Ids[36] = "English - Belize;en-bz;10249";
- Ids[37] = "English - Canada;en-ca;4105";
- Ids[38] = "English - Caribbean;en-cb;9225";
- Ids[39] = "English - Ireland;en-ie;6153";
- Ids[40] = "English - Jamaica;en-jm;8201";
- Ids[41] = "English - New Zealand;en-nz;5129";
- Ids[42] = "English - Phillippines;en-ph;13321";
- Ids[43] = "English - South Africa;en-za;7177";
- Ids[44] = "English - Trinidad;en-tt;11273";
- Ids[45] = "English - United Kingdom;en-gb;2057";
- Ids[46] = "English - United States;en-us;1033";
- Ids[47] = "Estonian;et;1061";
- Ids[48] = "Farsi;fa;1065";
- Ids[49] = "Finnish;fi;1035";
- Ids[50] = "Faroese;fo;1080";
- Ids[51] = "French - France;fr-fr;1036";
- Ids[52] = "French - Belgium;fr-be;2060";
- Ids[53] = "French - Canada;fr-ca;3084";
- Ids[54] = "French - Luxembourg;fr-lu;5132";
- Ids[55] = "French - Switzerland;fr-ch;4108";
- Ids[56] = "Gaelic - Ireland;gd-ie;2108";
- Ids[57] = "Gaelic - Scotland;gd;1084";
- Ids[58] = "German - Germany;de-de;1031";
- Ids[59] = "German - Austria;de-at;3079";
- Ids[60] = "German - Liechtenstein;de-li;5127";
- Ids[61] = "German - Luxembourg;de-lu;4103";
- Ids[62] = "German - Switzerland;de-ch;2055";
- Ids[63] = "Greek;el;1032";
- Ids[64] = "Hebrew;he;1037";
- Ids[65] = "Hindi;hi;1081";
- Ids[66] = "Hungarian;hu;1038";
- Ids[67] = "Icelandic;is;1039";
- Ids[68] = "Indonesian;id;1057";
- Ids[69] = "Italian - Italy;it-it;1040";
- Ids[70] = "Italian - Switzerland;it-ch;2064";
- Ids[71] = "Japanese;ja;1041";
- Ids[72] = "Korean;ko;1042";
- Ids[73] = "Latvian;lv;1062";
- Ids[74] = "Lithuanian;lt;1063";
- Ids[75] = "FYRO Macedonian;mk;1071";
- Ids[76] = "Malay - Malaysia;ms-my;1086";
- Ids[77] = "Malay - Brunei;ms-bn;2110";
- Ids[78] = "Maltese;mt;1082";
- Ids[79] = "Marathi;mr;1102";
- Ids[80] = "Norwegian - Bokm?l;no-no;1044";
- Ids[81] = "Norwegian - Nynorsk;no-no;2068";
- Ids[82] = "Polish;pl;1045";
- Ids[83] = "Portuguese - Portugal;pt-pt;2070";
- Ids[84] = "Portuguese - Brazil;pt-br;1046";
- Ids[85] = "Raeto-Romance;rm;1047";
- Ids[86] = "Romanian - Romania;ro;1048";
- Ids[87] = "Romanian - Moldova;ro-mo;2072";
- Ids[88] = "Russian;ru;1049";
- Ids[89] = "Russian - Moldova;ru-mo;2073";
- Ids[90] = "Sanskrit;sa;1103";
- Ids[91] = "Serbian - Cyrillic;sr-sp;3098";
- Ids[92] = "Serbian - Latin;sr-sp;2074";
- Ids[93] = "Setsuana;tn;1074";
- Ids[94] = "Slovenian;sl;1060";
- Ids[95] = "Slovak;sk;1051";
- Ids[96] = "Sorbian;sb;1070";
- Ids[97] = "Spanish - Spain;es-es;3082";
- Ids[98] = "Spanish - Argentina;es-ar;11274";
- Ids[99] = "Spanish - Bolivia;es-bo;16394";
- Ids[100] = "Spanish - Chile;es-cl;13322";
- Ids[101] = "Spanish - Colombia;es-co;9226";
- Ids[102] = "Spanish - Costa Rica;es-cr;5130";
- Ids[103] = "Spanish - Dominican Republic;es-do;7178";
- Ids[104] = "Spanish - Ecuador;es-ec;12298";
- Ids[105] = "Spanish - Guatemala;es-gt;4106";
- Ids[106] = "Spanish - Honduras;es-hn;18442";
- Ids[107] = "Spanish - Mexico;es-mx;2058";
- Ids[108] = "Spanish - Nicaragua;es-ni;19466";
- Ids[109] = "Spanish - Panama;es-pa;6154";
- Ids[110] = "Spanish - Peru;es-pe;10250";
- Ids[111] = "Spanish - Puerto Rico;es-pr;20490";
- Ids[112] = "Spanish - Paraguay;es-py;15370";
- Ids[113] = "Spanish - El Salvador;es-sv;17418";
- Ids[114] = "Spanish - Uruguay;es-uy;14346";
- Ids[115] = "Spanish - Venezuela;es-ve;8202";
- Ids[116] = "Sutu;sx;1072";
- Ids[117] = "Swahili;sw;1089";
- Ids[118] = "Swedish - Sweden;sv-se;1053";
- Ids[119] = "Swedish - Finland;sv-fi;2077";
- Ids[120] = "Tamil;ta;1097";
- Ids[121] = "Tatar;tt;1092";
- Ids[122] = "Thai;th;1054";
- Ids[123] = "Turkish;tr;1055";
- Ids[124] = "Tsonga;ts;1073";
- Ids[125] = "Ukrainian;uk;1058";
- Ids[126] = "Urdu;ur;1056";
- Ids[127] = "Uzbek - Cyrillic;uz-uz;2115";
- Ids[128] = "Uzbek - Latin;uz-uz;1091";
- Ids[129] = "Vietnamese;vi;1066";
- Ids[130] = "Xhosa;xh;1076";
- Ids[131] = "Yiddish;yi;1085";
- Ids[132] = "Zulu;zu;1077";
- Ids[133] = "Khmer;km-kh;1107";
- Ids[134] = "Burmese;my-mm;1109";
-
- return Ids;
- }
-}
diff --git a/wizards/com/sun/star/wizards/letter/LocaleCodes.py b/wizards/com/sun/star/wizards/letter/LocaleCodes.py
deleted file mode 100644
index 850dda11f195..000000000000
--- a/wizards/com/sun/star/wizards/letter/LocaleCodes.py
+++ /dev/null
@@ -1,171 +0,0 @@
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This file incorporates work covered by the following license notice:
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed
-# with this work for additional information regarding copyright
-# ownership. The ASF licenses this file to you under the Apache
-# License, Version 2.0 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.apache.org/licenses/LICENSE-2.0 .
-#
-from wizards.common.Resource import Resource
-
-class LocaleCodes(Resource):
- UNIT_NAME = "svtres",
- MODULE_NAME = "svt",
-
- def __init__(self, xmsf):
- super(LocaleCodes, self).__init__(xmsf, LocaleCodes.MODULE_NAME)
- #self.allLanguageStrings = self.getStringList(16633)
-
- def getLanguageString(self, MSID):
- LS = "unknown Language",
- for i in self.allLanguageStrings:
- if str(i.Value).lower() == MSID.lower():
- LS = i.Name
- return LS
-
- def getIDs(self):
- Ids = ("Afrikaans;af;1078",
- "Albanian;sq;1052",
- "Arabic - United Arab Emirates;ar-ae;14337",
- "Arabic - Bahrain;ar-bh;15361",
- "Arabic - Algeria;ar-dz;5121",
- "Arabic - Egypt;ar-eg;3073",
- "Arabic - Iraq;ar-iq;2049",
- "Arabic - Jordan;ar-jo;11265",
- "Arabic - Kuwait;ar-kw;13313",
- "Arabic - Lebanon;ar-lb;12289",
- "Arabic - Libya;ar-ly;4097",
- "Arabic - Morocco;ar-ma;6145",
- "Arabic - Oman;ar-om;8193",
- "Arabic - Qatar;ar-qa;16385",
- "Arabic - Saudi Arabia;ar-sa;1025",
- "Arabic - Syria;ar-sy;10241",
- "Arabic - Tunisia;ar-tn;7169",
- "Arabic - Yemen;ar-ye;9217",
- "Armenian;hy;1067",
- "Azeri - Latin;az-az;1068",
- "Azeri - Cyrillic;az-az;2092",
- "Basque;eu;1069",
- "Belarusian;be;1059",
- "Bulgarian;bg;1026",
- "Catalan;ca;1027",
- "Chinese - China;zh-cn;2052",
- "Chinese - Hong Kong SAR;zh-hk;3076",
- "Chinese - Macau SAR;zh-mo;5124",
- "Chinese - Singapore;zh-sg;4100",
- "Chinese - Taiwan;zh-tw;1028",
- "Croatian;hr;1050",
- "Czech;cs;1029",
- "Danish;da;1030",
- "Dutch - The Netherlands;nl-nl;1043",
- "Dutch - Belgium;nl-be;2067",
- "English - Australia;en-au;3081",
- "English - Belize;en-bz;10249",
- "English - Canada;en-ca;4105",
- "English - Caribbean;en-cb;9225",
- "English - Ireland;en-ie;6153",
- "English - Jamaica;en-jm;8201",
- "English - New Zealand;en-nz;5129",
- "English - Phillippines;en-ph;13321",
- "English - South Africa;en-za;7177",
- "English - Trinidad;en-tt;11273",
- "English - United Kingdom;en-gb;2057",
- "English - United States;en-us;1033",
- "Estonian;et;1061",
- "Farsi;fa;1065",
- "Finnish;fi;1035",
- "Faroese;fo;1080",
- "French - France;fr-fr;1036",
- "French - Belgium;fr-be;2060",
- "French - Canada;fr-ca;3084",
- "French - Luxembourg;fr-lu;5132",
- "French - Switzerland;fr-ch;4108",
- "Gaelic - Ireland;gd-ie;2108",
- "Gaelic - Scotland;gd;1084",
- "German - Germany;de-de;1031",
- "German - Austria;de-at;3079",
- "German - Liechtenstein;de-li;5127",
- "German - Luxembourg;de-lu;4103",
- "German - Switzerland;de-ch;2055",
- "Greek;el;1032",
- "Hebrew;he;1037",
- "Hindi;hi;1081",
- "Hungarian;hu;1038",
- "Icelandic;is;1039",
- "Indonesian;id;1057",
- "Italian - Italy;it-it;1040",
- "Italian - Switzerland;it-ch;2064",
- "Japanese;ja;1041",
- "Korean;ko;1042",
- "Latvian;lv;1062",
- "Lithuanian;lt;1063",
- "FYRO Macedonian;mk;1071",
- "Malay - Malaysia;ms-my;1086",
- "Malay - Brunei;ms-bn;2110",
- "Maltese;mt;1082",
- "Marathi;mr;1102",
- "Norwegian - Bokm?l;no-no;1044",
- "Norwegian - Nynorsk;no-no;2068",
- "Polish;pl;1045",
- "Portuguese - Portugal;pt-pt;2070",
- "Portuguese - Brazil;pt-br;1046",
- "Raeto-Romance;rm;1047",
- "Romanian - Romania;ro;1048",
- "Romanian - Moldova;ro-mo;2072",
- "Russian;ru;1049",
- "Russian - Moldova;ru-mo;2073",
- "Sanskrit;sa;1103",
- "Serbian - Cyrillic;sr-sp;3098",
- "Serbian - Latin;sr-sp;2074",
- "Setsuana;tn;1074",
- "Slovenian;sl;1060",
- "Slovak;sk;1051",
- "Sorbian;sb;1070",
- "Spanish - Spain;es-es;3082",
- "Spanish - Argentina;es-ar;11274",
- "Spanish - Bolivia;es-bo;16394",
- "Spanish - Chile;es-cl;13322",
- "Spanish - Colombia;es-co;9226",
- "Spanish - Costa Rica;es-cr;5130",
- "Spanish - Dominican Republic;es-do;7178",
- "Spanish - Ecuador;es-ec;12298",
- "Spanish - Guatemala;es-gt;4106",
- "Spanish - Honduras;es-hn;18442",
- "Spanish - Mexico;es-mx;2058",
- "Spanish - Nicaragua;es-ni;19466",
- "Spanish - Panama;es-pa;6154",
- "Spanish - Peru;es-pe;10250",
- "Spanish - Puerto Rico;es-pr;20490",
- "Spanish - Paraguay;es-py;15370",
- "Spanish - El Salvador;es-sv;17418",
- "Spanish - Uruguay;es-uy;14346",
- "Spanish - Venezuela;es-ve;8202",
- "Sutu;sx;1072",
- "Swahili;sw;1089",
- "Swedish - Sweden;sv-se;1053",
- "Swedish - Finland;sv-fi;2077",
- "Tamil;ta;1097",
- "Tatar;tt;1092",
- "Thai;th;1054",
- "Turkish;tr;1055",
- "Tsonga;ts;1073",
- "Ukrainian;uk;1058",
- "Urdu;ur;1056",
- "Uzbek - Cyrillic;uz-uz;2115",
- "Uzbek - Latin;uz-uz;1091",
- "Vietnamese;vi;1066",
- "Xhosa;xh;1076",
- "Yiddish;yi;1085",
- "Zulu;zu;1077",
- "Khmer;km-kh;1107",
- "Burmese;my-mm;1109")
- return Ids
diff --git a/wizards/com/sun/star/wizards/letter/MANIFEST.MF b/wizards/com/sun/star/wizards/letter/MANIFEST.MF
deleted file mode 100644
index a83d3a91d4f0..000000000000
--- a/wizards/com/sun/star/wizards/letter/MANIFEST.MF
+++ /dev/null
@@ -1,2 +0,0 @@
-RegistrationClassName: com.sun.star.wizards.letter.CallWizard
-UNO-Type-Path:
diff --git a/wizards/com/sun/star/wizards/letter/letter.component b/wizards/com/sun/star/wizards/letter/letter.component
index eb6f968c391d..f7496d8297a2 100644
--- a/wizards/com/sun/star/wizards/letter/letter.component
+++ b/wizards/com/sun/star/wizards/letter/letter.component
@@ -16,11 +16,9 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
-
-<component loader="com.sun.star.loader.Java2"
+<component loader="com.sun.star.loader.Python"
xmlns="http://openoffice.org/2010/uno-components">
- <implementation
- name="com.sun.star.wizards.letter.CallWizard$WizardImplementation">
- <service name="com.sun.star.wizards.letter.CallWizard"/>
+ <implementation name="com.sun.star.wizards.letter.CallWizard">
+ <service name="com.sun.star.task.Job"/>
</implementation>
</component>
diff --git a/wizards/com/sun/star/wizards/text/TextDocument.py b/wizards/com/sun/star/wizards/text/TextDocument.py
index 6570aa4387f6..5889f2c76e94 100644
--- a/wizards/com/sun/star/wizards/text/TextDocument.py
+++ b/wizards/com/sun/star/wizards/text/TextDocument.py
@@ -34,13 +34,12 @@ from com.sun.star.beans.PropertyState import DIRECT_VALUE
class TextDocument(object):
- xTextDocument = None
-
def __init__(self, xMSF,listener=None,bShowStatusIndicator=None,
FrameName=None,_sPreviewURL=None,_moduleIdentifier=None,
_textDocument=None, xArgs=None):
self.xMSF = xMSF
+ self.xTextDocument = None
if listener is not None:
if FrameName is not None:
@@ -55,19 +54,19 @@ class TextDocument(object):
'''creates an instance of TextDocument by
loading a given URL as preview'''
self.xFrame = OfficeDocument.createNewFrame(xMSF, listener)
- TextDocument.xTextDocument = self.loadAsPreview(_sPreviewURL, True)
+ self.xTextDocument = self.loadAsPreview(_sPreviewURL, True)
elif xArgs is not None:
'''creates an instance of TextDocument
and creates a frame and loads a document'''
self.xDesktop = Desktop.getDesktop(xMSF);
self.xFrame = OfficeDocument.createNewFrame(xMSF, listener)
- TextDocument.xTextDocument = OfficeDocument.load(
+ self.xTextDocument = OfficeDocument.load(
xFrame, URL, "_self", xArgs);
self.xWindowPeer = xFrame.getComponentWindow()
- self.m_xDocProps = TextDocument.xTextDocument.DocumentProperties
+ self.m_xDocProps = self.xTextDocument.DocumentProperties
CharLocale = Helper.getUnoStructValue(
- TextDocument.xTextDocument, "CharLocale");
+ self.xTextDocument, "CharLocale");
return
else:
@@ -75,27 +74,27 @@ class TextDocument(object):
the desktop's current frame'''
self.xDesktop = Desktop.getDesktop(xMSF);
self.xFrame = self.xDesktop.getActiveFrame()
- TextDocument.xTextDocument = self.xFrame.getController().Model
+ self.xTextDocument = self.xFrame.getController().Model
elif _moduleIdentifier is not None:
try:
'''create the empty document, and set its module identifier'''
- TextDocument.xTextDocument = xMSF.createInstance(
+ self.xTextDocument = xMSF.createInstance(
"com.sun.star.text.TextDocument")
- TextDocument.xTextDocument.initNew()
- TextDocument.xTextDocument.setIdentifier(
+ self.xTextDocument.initNew()
+ self.xTextDocument.setIdentifier(
_moduleIdentifier.Identifier)
# load the document into a blank frame
xDesktop = Desktop.getDesktop(xMSF)
loadArgs = range(1)
loadArgs[0] = "Model"
loadArgs[0] = -1
- loadArgs[0] = TextDocument.xTextDocument
+ loadArgs[0] = self.xTextDocument
loadArgs[0] = DIRECT_VALUE
xDesktop.loadComponentFromURL(
"private:object", "_blank", 0, loadArgs)
# remember some things for later usage
- self.xFrame = TextDocument.xTextDocument.CurrentController.Frame
+ self.xFrame = self.xTextDocument.CurrentController.Frame
except Exception, e:
traceback.print_exc()
@@ -103,17 +102,17 @@ class TextDocument(object):
'''creates an instance of TextDocument
from a given XTextDocument'''
self.xFrame = _textDocument.CurrentController.Frame
- TextDocument.xTextDocument = _textDocument
+ self.xTextDocument = _textDocument
if bShowStatusIndicator:
self.showStatusIndicator()
self.init()
def init(self):
self.xWindowPeer = self.xFrame.getComponentWindow()
- self.m_xDocProps = TextDocument.xTextDocument.DocumentProperties
+ self.m_xDocProps = self.xTextDocument.DocumentProperties
self.CharLocale = Helper.getUnoStructValue(
- TextDocument.xTextDocument, "CharLocale")
- self.xText = TextDocument.xTextDocument.Text
+ self.xTextDocument, "CharLocale")
+ self.xText = self.xTextDocument.Text
def showStatusIndicator(self):
self.xProgressBar = self.xFrame.createStatusIndicator()
@@ -140,24 +139,24 @@ class TextDocument(object):
loadValues[2].Name = "Preview"
loadValues[2].Value = True
- TextDocument.xTextDocument = OfficeDocument.load(
+ self.xTextDocument = OfficeDocument.load(
self.xFrame, sDefaultTemplate, "_self", loadValues)
self.DocSize = self.getPageSize()
- myViewHandler = ViewHandler(TextDocument.xTextDocument, TextDocument.xTextDocument)
+ myViewHandler = ViewHandler(self.xTextDocument, self.xTextDocument)
try:
myViewHandler.setViewSetting(
"ZoomType", ENTIRE_PAGE)
except Exception, e:
traceback.print_exc()
- myFieldHandler = TextFieldHandler(self.xMSF, TextDocument.xTextDocument)
+ myFieldHandler = TextFieldHandler(self.xMSF, self.xTextDocument)
myFieldHandler.updateDocInfoFields()
- return TextDocument.xTextDocument
+ return self.xTextDocument
def getPageSize(self):
try:
- xNameAccess = TextDocument.xTextDocument.StyleFamilies
+ xNameAccess = self.xTextDocument.StyleFamilies
xPageStyleCollection = xNameAccess.getByName("PageStyles")
xPageStyle = xPageStyleCollection.getByName("First Page")
return Helper.getUnoPropertyValue(xPageStyle, "Size")
@@ -172,40 +171,8 @@ class TextDocument(object):
xTextCursor = oCursorContainer.createTextCursor()
return xTextCursor
- # Todo: This method is unsecure because the last index is not necessarily the last section
- # Todo: This Routine should be modified, because I cannot rely on the last Table in the document to be the last in the TextTables sequence
- # to make it really safe you must acquire the Tablenames before the insertion and after the insertion of the new Table. By comparing the
- # two sequences of tablenames you can find out the tablename of the last inserted Table
- # Todo: This method is unsecure because the last index is not necessarily the last section
-
- def getCharWidth(self, ScaleString):
- iScale = 200
- TextDocument.xTextDocument.lockControllers()
- iScaleLen = ScaleString.length()
- xTextCursor = createTextCursor(TextDocument.xTextDocument.Text)
- xTextCursor.gotoStart(False)
- com.sun.star.wizards.common.Helper.setUnoPropertyValue(
- xTextCursor, "PageDescName", "First Page")
- xTextCursor.String = ScaleString
- xViewCursor = TextDocument.xTextDocument.CurrentController
- xTextViewCursor = xViewCursor.ViewCursor
- xTextViewCursor.gotoStart(False)
- iFirstPos = xTextViewCursor.Position.X
- xTextViewCursor.gotoEnd(False)
- iLastPos = xTextViewCursor.Position.X
- iScale = (iLastPos - iFirstPos) / iScaleLen
- xTextCursor.gotoStart(False)
- xTextCursor.gotoEnd(True)
- xTextCursor.String = ""
- unlockallControllers()
- return iScale
-
- def unlockallControllers(self):
- while TextDocument.xTextDocument.hasControllersLocked():
- TextDocument.xTextDocument.unlockControllers()
-
def refresh(self):
- TextDocument.xTextDocument.refresh()
+ self.xTextDocument.refresh()
'''
This method sets the Author of a Wizard-generated template correctly
@@ -229,10 +196,10 @@ class TextDocument(object):
day = time.strftime("%d", now)
dateObject = dateTimeObject(int(year), int(month), int(day))
- du = Helper.DateUtils(self.xMSF, TextDocument.xTextDocument)
+ du = Helper.DateUtils(self.xMSF, self.xTextDocument)
ff = du.getFormat(DATE_SYS_DDMMYY)
myDate = du.format(ff, dateObject)
- xDocProps2 = TextDocument.xTextDocument.DocumentProperties
+ xDocProps2 = self.xTextDocument.DocumentProperties
xDocProps2.Author = fullname
xDocProps2.ModifiedBy = fullname
description = xDocProps2.Description
@@ -270,3 +237,22 @@ class TextDocument(object):
return xTD.TextFrames.getByName(sFrameName)
return None
+
+ @classmethod
+ def searchFillInItems(self, typeSearch):
+ sd = self.xTextDocument.createSearchDescriptor()
+
+ if typeSearch == 0:
+ sd.setSearchString("<[^>]+>")
+ elif typeSearch == 1:
+ sd.setSearchString("#[^#]+#")
+
+ sd.setPropertyValue("SearchRegularExpression", True)
+ sd.setPropertyValue("SearchWords", True)
+
+ auxList = []
+ allItems = self.xTextDocument.findAll(sd)
+ for i in xrange(allItems.Count):
+ auxList.append(allItems.getByIndex(i))
+
+ return auxList
diff --git a/wizards/com/sun/star/wizards/common/TextElement.py b/wizards/com/sun/star/wizards/text/TextElement.py
index f035808c4892..840c70e55af1 100644
--- a/wizards/com/sun/star/wizards/common/TextElement.py
+++ b/wizards/com/sun/star/wizards/text/TextElement.py
@@ -16,26 +16,13 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import traceback
-from .Helper import Helper
-from com.sun.star.text.PlaceholderType import TEXT
class TextElement(object):
- def __init__(self, item, placeHolderText, hint, xmsf):
+ def __init__(self, item, placeHolderText):
self.item = item
self.placeHolderText = placeHolderText
- self.xmsf = xmsf
- self.paraStyle = Helper.getUnoPropertyValue(
- item.Start, "ParaStyleName")
def write(self):
- try:
- if self.item is not None:
- self.item.String = ""
- cursor = self.item.Text.createTextCursorByRange(
- self.item.Start)
- cursor.String = self.placeHolderText
- Helper.setUnoPropertyValue(
- cursor, "ParaStyleName", self.paraStyle)
- except Exception, e:
- traceback.print_exc()
+ if self.item is not None:
+ self.item.String = self.placeHolderText
diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py
index f13a24058b2a..aae04149982f 100644
--- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py
+++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py
@@ -20,7 +20,8 @@ from .UIConsts import UIConsts
from ..common.Desktop import Desktop
from ..common.PropertyNames import PropertyNames
from .event.CommonListener import ItemListenerProcAdapter, \
- ActionListenerProcAdapter, TextListenerProcAdapter
+ ActionListenerProcAdapter, TextListenerProcAdapter, \
+ AdjustmentListenerProcAdapter
'''
This class contains convenience methods for inserting components to a dialog.
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py
index ea7cab844dca..cfd2607f6d49 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.py
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py
@@ -19,7 +19,7 @@ import uno
import traceback
from abc import ABCMeta, abstractmethod
from .UnoDialog2 import UnoDialog2, Desktop, PropertyNames, UIConsts, \
- ItemListenerProcAdapter
+ ItemListenerProcAdapter
from .event.CommonListener import TerminateListenerProcAdapter
from ..common.Helper import Helper
from ..common.Resource import Resource
diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py
index 2a6ef5b68fb9..f8f2a9b70ca2 100644
--- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py
+++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py
@@ -31,7 +31,6 @@
# Danny Brewer Revised 2004-06-05-01
#
import unohelper
-
from com.sun.star.awt import XActionListener
class ActionListenerProcAdapter( unohelper.Base, XActionListener ):
diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py
index 8a9f08d36e65..781dc884031d 100644
--- a/wizards/com/sun/star/wizards/ui/event/DataAware.py
+++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py
@@ -17,8 +17,7 @@
#
import traceback
from abc import ABCMeta, abstractmethod
-from .CommonListener import *
-from ...common.PropertyNames import *
+from ...common.PropertyNames import PropertyNames
'''
@author rpiterman
diff --git a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py
index fa30c4d8beb9..9a263c17b983 100644
--- a/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py
+++ b/wizards/com/sun/star/wizards/ui/event/RadioDataAware.py
@@ -16,9 +16,8 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
import time
-from .DataAware import *
-from .DataAware import *
-from .UnoDataAware import *
+from .CommonListener import ItemListenerProcAdapter
+from .DataAware import DataAware
class RadioDataAware(DataAware):
diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
index 4cc5a3e4f25c..c753a9be256b 100644
--- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
+++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
@@ -15,9 +15,10 @@
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-from .DataAware import *
-from .DataAware import *
-from ...common.Helper import *
+import uno
+from .CommonListener import ItemListenerProcAdapter, TextListenerProcAdapter
+from .DataAware import DataAware, PropertyNames
+from ...common.Helper import Helper
'''
@author rpiterman