diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-22 11:01:27 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-22 11:01:27 +0000 |
commit | 59389868dc1536dbfec4b564543ab38ee463cb14 (patch) | |
tree | 707ee27e3a954d886264b55e1c476f09fbd21d8f /wizards/com/sun/star/wizards/ui | |
parent | 541b1c676c377082a71c3b8bde2d95b714a7b0da (diff) |
CWS-TOOLING: integrate CWS dba32a
2009-04-16 13:08:19 +0200 oj r270882 : #i14538# set property at control
2009-04-16 13:04:28 +0200 oj r270881 : #i98557# remove binary string for SRB
2009-04-15 13:19:10 +0200 oj r270838 : #i96782# use type set at view
2009-04-14 14:53:20 +0200 oj r270778 : #i96782# set initialize size for custom shape
2009-04-06 14:19:14 +0200 oj r270546 : #i88432# correct pos when < 0 while resizing
2009-04-06 13:36:13 +0200 oj r270541 : #i96782# handle toolbar and menubar differently
2009-04-06 13:33:54 +0200 oj r270540 : #i96782# handle toolbar and menubar differently
2009-04-06 12:28:23 +0200 oj r270534 : #i96782# handle toolbar and menubar differently
2009-04-06 12:27:44 +0200 oj r270533 : #i96782# handle toolbar and menubar differently
2009-04-06 12:24:32 +0200 oj r270532 : #i96782# handle toolbar and menubar differently
2009-04-06 12:15:15 +0200 oj r270531 : do not initialze when field is empty
2009-04-06 10:06:08 +0200 oj r270528 : #i96782# clean up of menubar and remove duplicates
2009-04-06 09:47:49 +0200 oj r270527 : #i96519# adjust help text dynamic
2009-04-03 13:43:20 +0200 oj r270482 : do not need to remove section from observer they are already disposed
2009-04-03 13:27:28 +0200 fs r270479 : #i97356#
2009-04-02 11:30:39 +0200 fs r270386 : UNX line ends
2009-04-02 10:54:51 +0200 fs r270379 : UNX line ends
2009-04-02 10:39:57 +0200 fs r270378 : UNX line ends
2009-04-02 10:37:24 +0200 fs r270377 : why did this survive the rebase? was removed on trunk ...
2009-03-31 13:31:12 +0200 fs r270277 : component_foo should be public
2009-03-28 00:21:01 +0100 fs r270176 : manuallly merged the changes which happened in CWS before resync to m45, where the directory had been moved from reportdesign/registry to reportbuilder/registry
2009-03-27 23:01:20 +0100 fs r270174 : CWS-TOOLING: rebase CWS dba32a to trunk@270033 (milestone: DEV300:m45)
2009-03-11 12:23:35 +0100 fs r269310 : #i99958# ensure the ControlModelLock doesn't release twice
2009-03-06 09:07:32 +0100 fs r268970 : ignore output paths in SVN's status
2009-03-06 09:07:08 +0100 fs r268969 : ignore output paths in SVN's status
2009-03-04 11:28:02 +0100 oj r268800 : copy and paste error, check correct end now
2009-03-03 15:49:11 +0100 fs r268736 : #i10000# those merges were lost during the rebase (m38->m42)
2009-03-03 13:25:27 +0100 lla r268720 : #i99652# fix wrong refactoring
2009-02-27 11:12:56 +0100 fs r268566 : beautified
2009-02-27 10:53:47 +0100 fs r268561 : doFormListening(false) only when actually isFormListening() (found during complex test case XMLFormSettings with assertions)
2009-02-26 20:55:31 +0100 fs r268546 : #i96530# set the Label property of the bound control, if we didn't create a dedicated label control
2009-02-26 11:53:09 +0100 fs r268494 : #i10000#
2009-02-26 11:27:50 +0100 fs r268493 : #i10000#
2009-02-26 11:17:08 +0100 fs r268490 : reportdesign depends on REPORTBUILDER, not REPORTDESIGN
2009-02-25 11:39:48 +0100 fs r268422 : #i10000# post-resync: INFO_ESCAPE_DATETIME got lost during rebase
2009-02-24 23:24:10 +0100 fs r268411 : CWS-TOOLING: rebase CWS dba32a to trunk@268395 (milestone: DEV300:m42)
2009-02-20 15:09:48 +0100 fs r268324 : respect ImplicitCatalog/SchemaRestriction in all necessary places
2009-02-20 13:48:10 +0100 oj r268318 : order of initialize corrected
2009-02-14 15:07:52 +0100 fs r267759 : #i98975# when an image does not have a bitmap, but a text, draw this (as placeholder)
2009-02-14 15:02:40 +0100 fs r267758 : consolidated and removed some duplicate code
2009-02-14 13:52:23 +0100 fs r267756 : #i10000#
2009-02-13 22:08:34 +0100 fs r267750 : #i100000#
2009-02-13 22:07:25 +0100 fs r267749 : #i10000#
2009-02-13 21:55:36 +0100 fs r267747 : #i10000#
2009-02-13 21:54:27 +0100 fs r267746 : use const_cast
2009-02-13 21:29:10 +0100 fs r267745 : #i10000#
2009-02-13 21:27:39 +0100 fs r267744 : #i10000#
2009-02-13 20:59:13 +0100 fs r267742 : #i10000#
2009-02-13 13:21:30 +0100 fs r267717 : better diagnostics
2009-02-13 13:17:24 +0100 fs r267715 : #i58313# support Catalog/SchemaRestriction settings, which are applied in getTables when 'all catalogs/schemas' are to be retrieved
2009-02-13 13:16:14 +0100 fs r267714 : filter out some more known global settings
2009-02-13 12:39:43 +0100 fs r267713 : #i58313# ImplicitCatalog/SchemaRestriction
2009-02-13 12:36:50 +0100 fs r267712 : when exporting data source settings, allow for properties which have a VOID default value, but are currently not VOID
2009-02-13 12:35:57 +0100 fs r267711 : implement XSet, to allow inserting properties which have a default value of VOID
2009-02-13 12:35:03 +0100 fs r267710 : +addVoidProperty
2009-02-13 10:20:08 +0100 fs r267697 : removed unused variable
2009-02-13 09:46:46 +0100 fs r267695 : refactored the table filtering code, to have a better base for introducing additional low level filters
2009-02-10 09:23:07 +0100 lla r267537 : #i10000# wrong line feed, double named variable
2009-02-09 12:13:08 +0100 oj r267508 : #i98605# notify hanlder
2009-02-09 11:50:34 +0100 oj r267507 : #i98926# solve refcount problem
2009-02-09 11:50:05 +0100 oj r267506 : #i98971# fix for simple html
2009-02-09 11:49:24 +0100 oj r267505 : #i98971# fix for simple html
2009-02-09 11:47:27 +0100 oj r267504 : invoke on copy
2009-02-09 09:51:00 +0100 fs r267500 : #i98316#
2009-02-09 09:46:10 +0100 fs r267499 : setCurrentSelection: don't reset the current form when we de-select everything
2009-02-09 09:43:45 +0100 fs r267498 : #i98316#
2009-02-08 21:25:18 +0100 fs r267496 : #i98272# introduce late ctor for cloning
2009-02-07 21:08:39 +0100 fs r267485 : #i98272# when copy-constructing a FmFormPageImpl, use the XCloneable of the forms collection, instead of XPersistObject (which is incompletely implemented)
2009-02-07 21:07:26 +0100 fs r267484 : removed obsolete include guards
2009-02-07 21:05:22 +0100 fs r267483 : #i98272# implement XCloneable
2009-02-06 15:02:48 +0100 lla r267467 : #i96523# add XImageControl
2009-02-06 14:41:38 +0100 oj r267463 : #i98926# late init when connection disposed but only when asked for
2009-02-06 13:49:57 +0100 lla r267457 : #i92860# bigint in forms doesn't allow input of values > 1, fixed
2009-02-06 13:03:55 +0100 oj r267455 : ImageScaleMode
2009-02-05 14:48:19 +0100 lla r267424 : #i89335# dropdown listboxes are 14 instead of 7 lines high
2009-02-05 13:40:00 +0100 oj r267423 : #i96945# insert new prop Opaque
2009-02-05 13:39:19 +0100 oj r267422 : #i96945# insert layer handling for hell and heaven
2009-02-05 13:29:32 +0100 lla r267420 : #i89335# add is null, is not null, is not like filter condition
2009-02-04 12:23:02 +0100 oj r267364 : #i98821# load table font settings
2009-02-04 10:05:27 +0100 oj r267351 : #i98821# load table font settings
2009-02-04 09:23:22 +0100 fs r267350 : checking persistency of UI settings in database documents - for the moment, capture table formattings (which is issue 98821)
2009-02-04 09:22:15 +0100 fs r267349 : moved some methods which are of wider interest from DatabaseDocument to FileHelper resp. TestCase
2009-02-04 08:56:27 +0100 oj r267347 : #i97586# UcbStreamHelper::CreateStream doesn't check all streamModes use different method
2009-02-04 08:23:26 +0100 oj r267346 : #i98701# check key size is >= 3 and some redesign
2009-02-03 23:29:24 +0100 fs r267345 : return the component (controller), not the frame
2009-02-03 23:28:53 +0100 fs r267344 : openExisting returns a controller now, not the frame (this was a bug)
2009-02-03 23:28:25 +0100 fs r267343 : openElement: properly return the component in the table/query case
2009-02-02 12:48:17 +0100 oj r267261 : #i96013# fix for relative path
2009-02-02 10:33:28 +0100 lla r267253 : #i98557# cleanups and consolidation
2009-02-02 09:37:23 +0100 lla r267250 : #i88432# resize will no longer move components to other sections
2009-02-02 09:08:24 +0100 oj r267245 : #i97475# write 0x1A at the end of the file
2009-01-30 19:39:20 +0100 lla r267230 : #i10000# unused parameters
2009-01-30 09:51:09 +0100 fs r267181 : onsolete
2009-01-30 09:49:27 +0100 fs r267180 : onsolete
2009-01-29 14:28:22 +0100 oj r267139 : #i96825# import cell style
2009-01-29 14:23:12 +0100 oj r267137 : #i98601# export imagescalehandler
2009-01-29 14:19:57 +0100 lla r267135 : #i98601# add ImageScaleMode
2009-01-29 13:21:08 +0100 oj r267124 : #i98601# impl ScaleMode
2009-01-29 13:20:56 +0100 oj r267123 : #i98601# impl ScaleMode
2009-01-29 08:46:40 +0100 oj r267095 : new property: ScaleMode
2009-01-29 08:45:23 +0100 oj r267094 : new ScaleMode from UnControlImageModel
2009-01-29 08:28:12 +0100 oj r267093 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 19:54:34 +0100 lla r267082 : #i98557# pictures in report wizard
2009-01-28 15:06:25 +0100 oj r267060 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 11:38:41 +0100 lla r267046 : #i76783# handle binary fields in forms
2009-01-28 09:24:43 +0100 lla r267025 : #i10000#
2009-01-28 08:40:04 +0100 fs r267024 : #i10000#
2009-01-28 08:04:43 +0100 oj r267023 : #i93456# use resource strings for function names
2009-01-27 13:26:05 +0100 oj r266988 : check data field is type field or expression
2009-01-27 13:07:17 +0100 oj r266985 : check data field length
2009-01-27 11:48:19 +0100 oj r266974 : #i96823# return dll string as column name when no alias exists
2009-01-27 09:53:11 +0100 fs r266958 : display the message of a caught exception
2009-01-27 09:44:13 +0100 fs r266957 : #i58313# when retrieving all tables, just set an empty table type filter - the connection will care for translating this, by respecting the TableTypeFilterMode setting
2009-01-27 09:36:09 +0100 fs r266956 : #i58313# getTables: per JDBC spec, is not a valid table type filter. Translate it to 'null'.
2009-01-26 11:24:49 +0100 lla r266912 : #i97865# cleanups (AddField viewable in remote mode)
2009-01-26 07:49:27 +0100 lla r266897 : #i97865# AddField opens in remote case
2009-01-26 07:48:58 +0100 lla r266896 : #i97865# AddField opens in remote case
2009-01-26 07:48:42 +0100 lla r266895 : #i97865# AddField opens in remote case
2009-01-23 15:04:40 +0100 fs r266825 : consolidate the usage of OSQLMessageBox with MessageType==Warning into OSQLWarningBox
2009-01-23 10:47:33 +0100 fs r266787 : +supportsUserAdministration
2009-01-23 10:47:11 +0100 fs r266784 : use DatabaseMetaData.supportsUserAdministration
2009-01-23 07:55:59 +0100 lla r266767 : #i10000# fix gcc compiler failures
2009-01-21 15:08:55 +0100 lla r266673 : #i97265# Labels in HC (IsDark) with other color (viewable)
2009-01-19 14:58:54 +0100 lla r266504 : #i96523# last problems with FormatKey and '0' values fixed
2009-01-19 14:58:00 +0100 lla r266503 : #i96519# AddField help text
2009-01-19 11:59:02 +0100 fs r266485 : #i96523# for formatted field models, init them with TreatAsNumber = false
2009-01-16 10:31:49 +0100 lla r266405 : #i96793# add shrink to popup menu
2009-01-16 09:21:44 +0100 lla r266401 : #i96519# AddField contains a help text
2009-01-15 11:21:49 +0100 lla r266357 : #i96523# problem with XVclWindowPeer not fixed now
2009-01-15 09:19:20 +0100 lla r266335 : #i96523# more crashes fixed.
2009-01-14 13:08:34 +0100 lla r266291 : #i96523# problems with crashes fixed
2009-01-13 10:54:24 +0100 lla r266199 : #i96523# show datasource in formattedfields new files
2009-01-13 10:52:39 +0100 lla r266198 : #i96523# show datasource in formattedfields
2009-01-13 09:41:50 +0100 lla r266197 : #i96526# handling none existance default.otr
2009-01-12 12:55:49 +0100 fs r266151 : don't expect the control model to be a BoundComponent before adding as modify listener
2009-01-12 12:51:33 +0100 fs r266149 : #i88458# let the ImageControl be an XModifyBroadcaster, so the forms runtime can notice when the user changes the control content while it does not have the focus
2009-01-09 13:41:22 +0100 fs r266080 : doc
2009-01-09 13:14:14 +0100 fs r266077 : #i97377# SetModified when order is changed via DnD
2009-01-07 09:55:40 +0100 oj r265951 : merge from master
2009-01-07 09:55:24 +0100 oj r265950 : removed observer
2009-01-07 09:55:06 +0100 oj r265949 : merge from master
2009-01-07 07:29:11 +0100 oj r265945 : shadow var changed
2009-01-06 07:25:57 +0100 oj r265893 : CWS-TOOLING: rebase CWS dba32a to trunk@265758 (milestone: DEV300:m38)
2009-01-05 13:18:22 +0100 oj r265865 : convert to unix le
2009-01-05 09:13:52 +0100 lla r265857 : #i79423# lc_ sc_ permutation fix
2009-01-02 19:40:59 +0100 lla r265847 : #i79423# section shrink icons
2008-12-22 11:37:57 +0100 lla r265749 : #i97484# move component to negative Y-position
2008-12-22 11:37:05 +0100 lla r265748 : #i97484# move component to negative Y-position
2008-12-22 11:35:33 +0100 lla r265747 : #i97484# move component to negative Y-position
2008-12-22 11:25:07 +0100 lla r265745 : #i96757# changes via property browser was not undoable
2008-12-18 15:10:38 +0100 fs r265694 : corrected an condition in doFormListening, which otherwise leads to uncommitable grid columns in documents which are loaded from disc (not in documents which are newly created)
2008-12-18 14:54:39 +0100 fs r265692 : Hide Columns text slightly changed
2008-12-18 13:44:15 +0100 fs r265683 : #i94068# properly display erros happening during a form operation - at least once, and at most once
2008-12-18 11:28:29 +0100 fs r265677 : document the new InputRequired property
2008-12-18 11:04:15 +0100 fs r265676 : #i96530# createControlLabelPair: don't actually create a label for a checkbox
2008-12-18 10:35:53 +0100 fs r265674 : #i95226# when a column is replaced, and it's the selected column, update the selection
2008-12-18 10:34:42 +0100 fs r265673 : #i95226# refactoring of the implReplaced method
2008-12-18 10:34:28 +0100 fs r265672 : #i95226# when replacing a grid column, update the property browser
2008-12-18 10:33:17 +0100 fs r265671 : when an element is removed, remove it from m_aCurrentSelection, too (if necessary)
2008-12-18 10:31:57 +0100 fs r265670 : Hide Columns text slightly changed
2008-12-18 10:15:56 +0100 lla r265669 : #i14538# do not allow to press finish button twice
2008-12-18 08:56:33 +0100 lla r265665 : #i10000# build depend=t problem hacked.
2008-12-17 20:59:10 +0100 fs r265656 : #i89821# don't let a MultiLineEdit select all text when it receives the focus
2008-12-17 12:10:54 +0100 fs r265594 : #i97356#
2008-12-17 12:06:29 +0100 fs r265593 : #i97355# Print -> Printable
2008-12-17 11:59:31 +0100 fs r265591 : #i97350# combo boxes comment on list selection (as list boxes already do)
2008-12-16 09:53:57 +0100 lla r265527 : #i96526# handling none existance default.otr
2008-12-15 14:48:39 +0100 lla r265500 : #i79423# reparing, was wrong implemented
2008-12-12 15:08:33 +0100 lla r265424 : #i10000# remove wrong carridge returns
2008-12-12 15:07:55 +0100 lla r265423 : #i10000# remove wrong carridge returns
2008-12-12 15:06:41 +0100 lla r265422 : #i10000# remove wrong carridge returns
2008-12-12 10:23:13 +0100 lla r265395 : #i95234# reset DragDelta
2008-12-12 10:11:02 +0100 lla r265393 : #i79423# pre versions of shrink buttons
2008-12-11 15:32:13 +0100 fs r265318 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:30:06 +0100 fs r265316 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:07:05 +0100 fs r265307 : removed superfluous text
2008-12-11 12:29:54 +0100 lla r265282 : #i96757# cleanup second try
2008-12-11 12:09:15 +0100 lla r265278 : #i96757# cleanup
2008-12-11 12:07:56 +0100 lla r265277 : #i95234#
2008-12-10 14:04:39 +0100 lla r265183 : #i93472# D&D fixes
2008-12-10 12:29:33 +0100 lla r265168 : #i94067# add (APP|SYS)FONT to XUnitConversion
2008-12-10 12:15:02 +0100 lla r265166 : #i94067# add APPFONT, SYSFONT to MeasureUnit
2008-12-10 11:52:10 +0100 lla r265163 : #i94067# add comments
2008-12-06 20:33:05 +0100 fs r264935 : #i10000# precompiled header
2008-12-05 09:29:26 +0100 fs r264889 : #i10000#
2008-12-05 09:07:31 +0100 fs r264888 : #i10000#
2008-12-04 13:25:46 +0100 fs r264838 : CWS-TOOLING: rebase CWS dba32a to trunk@264807 (milestone: DEV300:m37)
2008-12-03 23:49:13 +0100 fs r264808 : merge changes from trunk, to be able to do a rebase
2008-12-03 17:13:09 +0100 lla r264801 : #i91041# update documentation
2008-12-03 16:57:04 +0100 lla r264799 : #i94067# allow convert(Point|Size)ToLogic as pixel also
2008-12-02 12:36:32 +0100 lla r264687 : #i96782# bring toolbar objects to menu structure
2008-12-02 10:32:44 +0100 lla r264667 : #i86255# make property work
2008-12-02 09:22:47 +0100 lla r264659 : #i79423# add section shrink toolbar
2008-12-02 07:41:22 +0100 lla r264657 : #i86255# add check box for Escape DateTime property
2008-12-02 07:37:17 +0100 lla r264656 : #i79423# new shrink buttons
2008-11-26 11:55:28 +0100 fs r264362 : #i96541#
FillPropertySet: do not only catch UnknownPropertyException when setting the Char/ParaAutoStyleName,
but also care for the other exceptions which can be thrown by XPropertySet::setPropertyValue.
This is actually not the real fix for #i96541#, but only a follow-up. The root cause of the issue
was fixed in CWS dba301b, but this here was another (potential) bug which popped up during investigations.
2008-11-25 09:04:40 +0100 lla r264273 : #i82083# new toolbox in GroupsSorting dialog
2008-11-25 08:56:08 +0100 lla r264272 : #i94729# change token strings into string list, move class out of function
2008-11-24 15:52:22 +0100 fs r264251 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:51:45 +0100 fs r264249 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:45:21 +0100 fs r264244 : #i96532# the API default for ParamNameSubst is false
2008-11-24 15:45:04 +0100 fs r264243 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:44:14 +0100 fs r264241 : #i96532# slight refactoring of exporting properties which have a XML default different from the API default
2008-11-24 10:50:01 +0100 lla r264216 : #i82083# icons for new toolbox
2008-11-24 09:38:45 +0100 lla r264205 : #i82083# new toolbox in GroupsSorting dialog
2008-11-24 09:32:20 +0100 lla r264201 : #i96501# cleanup assertions
2008-11-24 09:12:55 +0100 lla r264198 : #i83082# enhancement for toolboxes, better HC comfort
2008-11-24 08:46:43 +0100 lla r264197 : #i96501# fix problem with negative positions
2008-11-21 11:44:47 +0100 fs r264118 : #i57042# introduce a counter for suspending change notifications of a given property, so recursive calls are possible
2008-11-21 11:02:17 +0100 fs r264116 : #i96388# don't call ExecuteContextMenuAction when no action was chosen by the user
2008-11-21 10:36:53 +0100 fs r264114 : #i47384# assertion was wrong
2008-11-14 12:33:15 +0100 fs r263673 : #i47318# XRowSetChangeBroadcaster/Listener, to be able to listen for changes in an XRowSetSupplier's RowSet
2008-11-14 12:30:29 +0100 fs r263672 : #i47318# more refactoring
- BoundControlModels now listen at the XRowSetSupplier for changes in the supplied
RowSet, to properly revoke/register old/new listeners at the RowSet
- replaced ::osl::Mutex in various places with a ControlModelLock
2008-11-14 12:20:55 +0100 fs r263671 : when BUILD_TYPE includes QADEVOOO, the BUILD_QADEVOOO needs to bet set, too
2008-11-14 12:19:21 +0100 fs r263670 : oops, this was not intended to be committed
2008-11-12 11:08:10 +0100 fs r263579 : #i96096# new ctors taking UNO_QUERY_THROW
2008-11-12 09:15:54 +0100 fs r263576 : no need to load the complete dialog just to get a string which the dialog itself loads from resource
2008-11-10 17:55:45 +0100 fs r263535 : spelling in comment
2008-11-10 15:51:14 +0100 fs r263523 : #i47318# various refactorings
1. don't forward syntetic XLoadListener events from the grid control to
the grid columns. Instead, forward GridColumn::XChild::setParent to
the base class, which then can add itself as load listener
2. removed various occurances of XMultiServiceFactory, instead use the
::comphelper::ComponentContext
3. in O(Bound)ControlModel, have a mechanism to lock the instance (using
ControlModelLock) and fire property changes when the last lock dies.
2008-11-10 12:49:24 +0100 oj r263513 : #i94729# change token strings into string list
2008-11-10 12:13:15 +0100 oj r263512 : #i95222# export chart:title style as well
2008-11-10 08:55:25 +0100 oj r263507 : #i93471# show the correct tabpage when selecting a different object
2008-11-07 23:38:29 +0100 fs r263490 : #i95977# for the event input controls, add a component extending their functionality so they're reset when the users presses DEL
2008-11-07 23:35:39 +0100 fs r263489 : during #i95977#: When a VCL Window is deleted from within VCL code, the respective WindowPeer was never disposed. Corrected this.
2008-11-07 14:57:07 +0100 fs r263420 : #i95963# human-readable display names for event bindings
2008-11-06 10:34:52 +0100 fs r263366 : #i95865# don't use library names containing InvalidZipEntryFileNames - workaround until i95409 is fixed
2008-11-06 10:33:28 +0100 fs r263365 : #i95865#
copied the following change from CWS odfmetadata2 (not yet integrated) into CWS dba31d
- comphelper/inc/comphelper/storagehelper.hxx,
comphelper/source/misc/storagehelper.cxx:
+ add function IsValidZipEntryFileName (moved from module package)
Diffstat (limited to 'wizards/com/sun/star/wizards/ui')
8 files changed, 497 insertions, 193 deletions
diff --git a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java index d5d787744fd5..471a18c2365f 100644 --- a/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/CommandFieldSelection.java @@ -54,7 +54,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator String sTableLabelName; String sQueryPrefix; String sTablePrefix; - short iSelPos = -1; + private short m_iSelPos = -1; short iOldSelPos = -1; boolean bpreselectCommand = true; boolean bgetQueries; @@ -70,9 +70,9 @@ public class CommandFieldSelection extends FieldSelection implements Comparator short[] SelItems = (short[]) CurUnoDialog.getControlProperty(sTableListBoxName, "SelectedItems"); if (SelItems.length > 0) { - iOldSelPos = iSelPos; - iSelPos = SelItems[0]; - if ((iSelPos > -1) && (iSelPos != iOldSelPos)) + iOldSelPos = m_iSelPos; + m_iSelPos = SelItems[0]; + if ((m_iSelPos > -1) && (m_iSelPos != iOldSelPos)) { if (!AppendMode) { @@ -154,9 +154,9 @@ public class CommandFieldSelection extends FieldSelection implements Comparator }, new Object[] { - Boolean.TRUE, Boolean.FALSE, new Integer(12), "HID:" + (super.FirstHelpIndex - 1), new Short("7"), new Integer(95), new Integer(37), IStep, new Short((short) 4), getListboxWidth() + Boolean.TRUE, Boolean.FALSE, new Integer(12), "HID:" + (super.FirstHelpIndex - 1), new Short(UnoDialog.getListBoxLineCount()), new Integer(95), new Integer(37), IStep, new Short((short) 4), getListboxWidth() }); - XWindow xTableListBoxWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xTableListBox); + // XWindow xTableListBoxWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xTableListBox); fillupCommandListBox(); } catch (Exception exception) @@ -261,11 +261,11 @@ public class CommandFieldSelection extends FieldSelection implements Comparator if (binitialize) { CurDBMetaData.setCommandName(curCommandName); - if (CurDBMetaData.AllFieldNames != null) + if (CurDBMetaData.m_aAllFieldNames != null) { - if (CurDBMetaData.AllFieldNames.length > 0) + if (CurDBMetaData.m_aAllFieldNames.length > 0) { - initialize(CurDBMetaData.AllFieldNames, AppendMode, CurDBMetaData.getMaxColumnsInSelect()); + initialize(CurDBMetaData.m_aAllFieldNames, AppendMode, CurDBMetaData.getMaxColumnsInSelect()); return; } } @@ -288,21 +288,21 @@ public class CommandFieldSelection extends FieldSelection implements Comparator short[] iSelArray = new short[0]; boolean bgetFields = false; String[] ContentList = new String[0]; - CurDBMetaData.setCommandNames(); + // CurDBMetaData.initCommandNames(); if (bgetQueries) { - ContentList = new String[CurDBMetaData.TableNames.length + CurDBMetaData.QueryNames.length]; - System.arraycopy(CurDBMetaData.QueryNames, 0, ContentList, CurDBMetaData.TableNames.length, CurDBMetaData.QueryNames.length); - ContentList = setPrefixinArray(ContentList, sQueryPrefix, CurDBMetaData.TableNames.length, CurDBMetaData.QueryNames.length); + ContentList = new String[CurDBMetaData.getTableNames().length + CurDBMetaData.getQueryNames().length]; + System.arraycopy(CurDBMetaData.getQueryNames(), 0, ContentList, CurDBMetaData.getTableNames().length, CurDBMetaData.getQueryNames().length); + ContentList = setPrefixinArray(ContentList, sQueryPrefix, CurDBMetaData.getTableNames().length, CurDBMetaData.getQueryNames().length); } else { - ContentList = new String[CurDBMetaData.TableNames.length]; + ContentList = new String[CurDBMetaData.getTableNames().length]; } - System.arraycopy(CurDBMetaData.TableNames, 0, ContentList, 0, CurDBMetaData.TableNames.length); + System.arraycopy(CurDBMetaData.getTableNames(), 0, ContentList, 0, CurDBMetaData.getTableNames().length); if (bgetQueries) { - ContentList = setPrefixinArray(ContentList, sTablePrefix, 0, CurDBMetaData.TableNames.length); + ContentList = setPrefixinArray(ContentList, sTablePrefix, 0, CurDBMetaData.getTableNames().length); } java.util.Arrays.sort(ContentList, this); Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "StringItemList", ContentList); @@ -321,10 +321,7 @@ public class CommandFieldSelection extends FieldSelection implements Comparator else { emptyFieldsListBoxes(); - iSelArray = new short[] - { - (short) iSelPos - }; + iSelArray = new short[] { (short) iSelPos }; } Helper.setUnoPropertyValue(UnoDialog.getModel(xTableListBox), "SelectedItems", iSelArray); toggleCommandListBox(true); diff --git a/wizards/com/sun/star/wizards/ui/ControlScroller.java b/wizards/com/sun/star/wizards/ui/ControlScroller.java index 38fdca98edd7..176fd62f109b 100644 --- a/wizards/com/sun/star/wizards/ui/ControlScroller.java +++ b/wizards/com/sun/star/wizards/ui/ControlScroller.java @@ -120,7 +120,7 @@ public abstract class ControlScroller iStartPosY = iCompPosY + SORELFIRSTPOSY; int ScrollHeight = iCompHeight - 2; nlineincrement = 1; - sIncSuffix = com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.xDlgNameAccess, "imgBackground"); + sIncSuffix = com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.getDlgNameAccess(), "imgBackground"); oImgControl = CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlImageControlModel", "imgBackground" + sIncSuffix, new String[] { @@ -236,7 +236,7 @@ public abstract class ControlScroller PropertyValue[] valueProps = (PropertyValue[]) scrollfields.get(guiRow + nscrollvalue); for (int n = 0; n < nameProps.length; n++) { - if (CurUnoDialog.xDlgNameAccess.hasByName(nameProps[n].Name)) + if (CurUnoDialog.getDlgNameAccess().hasByName(nameProps[n].Name)) { setControlData(nameProps[n].Name, valueProps[n].Value); } @@ -418,7 +418,7 @@ public abstract class ControlScroller protected PropertyValue fieldInfo(PropertyValue valueProp, PropertyValue nameProp) { - if (CurUnoDialog.xDlgNameAccess.hasByName(nameProp.Name)) + if (CurUnoDialog.getDlgNameAccess().hasByName(nameProp.Name)) { valueProp.Value = getControlData(nameProp.Name); } diff --git a/wizards/com/sun/star/wizards/ui/FieldSelection.java b/wizards/com/sun/star/wizards/ui/FieldSelection.java index 652eb5f44392..e66a2e58af65 100644 --- a/wizards/com/sun/star/wizards/ui/FieldSelection.java +++ b/wizards/com/sun/star/wizards/ui/FieldSelection.java @@ -45,18 +45,19 @@ public class FieldSelection public UnoDialog CurUnoDialog; public XListBox xFieldsListBox; - public XListBox xSelFieldsListBox; + public XListBox xSelectedFieldsListBox; public XFieldSelectionListener xFieldSelection; public int maxfieldcount = 10000000; public String sIncSuffix; protected Integer IStep; protected int FirstHelpIndex; protected short curtabindex; - String[] AllFieldNames; - public Integer ListBoxWidth; + private String[] AllFieldNames; + private Integer ListBoxWidth; public Integer SelListBoxPosX; boolean bisModified = false; boolean AppendMode = false; + final int SOCMDMOVESEL = 1; final int SOCMDMOVEALL = 2; final int SOCMDREMOVESEL = 3; @@ -71,6 +72,7 @@ public class FieldSelection final int cmdButtonVertiDist = 2; final int lblHeight = 8; final int lblVertiDist = 2; + int CompPosX; int CompPosY; int CompHeight; @@ -217,7 +219,7 @@ public class FieldSelection Integer CmdButtonWidth = new Integer(cmdButtonWidth); - sIncSuffix = "_" + com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.xDlgNameAccess, "lblFields_"); + sIncSuffix = "_" + com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.getDlgNameAccess(), "lblFields_"); CurUnoDialog.insertControlModel("com.sun.star.awt.UnoControlFixedTextModel", "lblFields" + sIncSuffix, new String[] @@ -297,7 +299,7 @@ public class FieldSelection new Integer(8), slblSelFields, SelListBoxPosX, new Integer(CompPosY), IStep, new Short(curtabindex++), ListBoxWidth }); - xSelFieldsListBox = CurUnoDialog.insertListBox("lstSelFields" + sIncSuffix, SOSELFLDSLST, new ActionListenerImpl(), new ItemListenerImpl(), + xSelectedFieldsListBox = CurUnoDialog.insertListBox("lstSelFields" + sIncSuffix, SOSELFLDSLST, new ActionListenerImpl(), new ItemListenerImpl(), new String[] { "Height", "HelpURL", "MultiSelection", "PositionX", "PositionY", "Step", "TabIndex", "Width" @@ -330,7 +332,7 @@ public class FieldSelection CurUnoDialog.getPeerConfiguration().setAccessibleName(btnmoveselected, AccessTextMoveSelected); CurUnoDialog.getPeerConfiguration().setAccessibleName(btnremoveselected, AccessTextRemoveSelected); CurUnoDialog.getPeerConfiguration().setAccessibleName(xFieldsListBox, JavaTools.replaceSubString(slblFields, "", "~")); - CurUnoDialog.getPeerConfiguration().setAccessibleName(xSelFieldsListBox, JavaTools.replaceSubString(slblSelFields, "", "~")); + CurUnoDialog.getPeerConfiguration().setAccessibleName(xSelectedFieldsListBox, JavaTools.replaceSubString(slblSelFields, "", "~")); if (btnmoveall != null) { CurUnoDialog.getPeerConfiguration().setAccessibleName(btnmoveall, AccessTextMoveAll); @@ -382,18 +384,18 @@ public class FieldSelection private void changeSelectionOrder(int iNeighbor) { - short[] iSelIndices = xSelFieldsListBox.getSelectedItemsPos(); + short[] iSelIndices = xSelectedFieldsListBox.getSelectedItemsPos(); // Todo: we are assuming that the array starts with the lowest index. Verfy this assumption!!!!! if (iSelIndices.length == 1) { short iSelIndex = iSelIndices[0]; - String[] NewItemList = xSelFieldsListBox.getItems(); + String[] NewItemList = xSelectedFieldsListBox.getItems(); String CurItem = NewItemList[iSelIndex]; String NeighborItem = NewItemList[iSelIndex + iNeighbor]; NewItemList[iSelIndex + iNeighbor] = CurItem; NewItemList[iSelIndex] = NeighborItem; CurUnoDialog.setControlProperty("lstSelFields" + sIncSuffix, "StringItemList", NewItemList); - xSelFieldsListBox.selectItem(CurItem, true); + xSelectedFieldsListBox.selectItem(CurItem, true); if (xFieldSelection != null) { if (iNeighbor < 0) @@ -443,16 +445,16 @@ public class FieldSelection boolean bmoveUpenabled = false; boolean bmoveDownenabled = false; CurUnoDialog.selectListBoxItem(xFieldsListBox, iFieldsSelIndex); - CurUnoDialog.selectListBoxItem(xSelFieldsListBox, iSelFieldsSelIndex); - int SelListBoxSelLength = xSelFieldsListBox.getSelectedItems().length; + CurUnoDialog.selectListBoxItem(xSelectedFieldsListBox, iSelFieldsSelIndex); + int SelListBoxSelLength = xSelectedFieldsListBox.getSelectedItems().length; int ListBoxSelLength = xFieldsListBox.getSelectedItems().length; boolean bIsFieldSelected = (ListBoxSelLength > 0); int FieldCount = xFieldsListBox.getItemCount(); boolean bSelectSelected = (SelListBoxSelLength > 0); - int SelectCount = xSelFieldsListBox.getItemCount(); + int SelectCount = xSelectedFieldsListBox.getItemCount(); if (bSelectSelected) { - short[] iSelIndices = xSelFieldsListBox.getSelectedItemsPos(); + short[] iSelIndices = xSelectedFieldsListBox.getSelectedItemsPos(); bmoveUpenabled = ((iSelIndices[0] > 0) && (iSelIndices.length == 1)); bmoveDownenabled = (((iSelIndices[SelListBoxSelLength - 1]) < (short) (SelectCount - 1)) && (iSelIndices.length == 1)); } @@ -470,8 +472,8 @@ public class FieldSelection protected void toggleMoveButtons(boolean _btoggleMoveAll, boolean _btoggleMoveSelected) { - boolean btoggleMoveAll = (((xFieldsListBox.getItemCount() + xSelFieldsListBox.getItemCount()) < maxfieldcount) && (_btoggleMoveAll)); - boolean btoggleMoveSelected = (((xFieldsListBox.getSelectedItems().length + xSelFieldsListBox.getItemCount()) < maxfieldcount) && (_btoggleMoveSelected)); + boolean btoggleMoveAll = (((xFieldsListBox.getItemCount() + xSelectedFieldsListBox.getItemCount()) < maxfieldcount) && (_btoggleMoveAll)); + boolean btoggleMoveSelected = (((xFieldsListBox.getSelectedItems().length + xSelectedFieldsListBox.getItemCount()) < maxfieldcount) && (_btoggleMoveSelected)); CurUnoDialog.setControlProperty("cmdMoveAll" + sIncSuffix, "Enabled", new Boolean(btoggleMoveAll)); CurUnoDialog.setControlProperty("cmdMoveSelected" + sIncSuffix, "Enabled", new Boolean(btoggleMoveSelected)); } @@ -479,7 +481,7 @@ public class FieldSelection public void setMultipleMode(boolean _bisMultiple) { xFieldsListBox.setMultipleMode(_bisMultiple); - xSelFieldsListBox.setMultipleMode(_bisMultiple); + xSelectedFieldsListBox.setMultipleMode(_bisMultiple); } public void emptyFieldsListBoxes() @@ -502,25 +504,31 @@ public class FieldSelection public void mergeList(String[] AllFieldNames, String[] SecondList) { - int MaxIndex = SecondList.length; + // int MaxIndex = SecondList.length; xFieldsListBox.addItems(AllFieldNames, (short) 0); toggleListboxButtons((short) - 1, (short) - 1); } public void intializeSelectedFields(String[] _SelectedFieldNames) { - xSelFieldsListBox.addItems(_SelectedFieldNames, xSelFieldsListBox.getItemCount()); + xSelectedFieldsListBox.addItems(_SelectedFieldNames, xSelectedFieldsListBox.getItemCount()); + } + + private void removeAllItems(XListBox _xListBox) + { + _xListBox.removeItems((short) 0, _xListBox.getItemCount()); } + // Note Boolean Parameter public void initialize(String[] _AllFieldNames, boolean _AppendMode) { AppendMode = _AppendMode; - xFieldsListBox.removeItems((short) 0, xFieldsListBox.getItemCount()); + removeAllItems(xFieldsListBox); xFieldsListBox.addItems(_AllFieldNames, (short) 0); - this.AllFieldNames = xFieldsListBox.getItems(); - if ((xSelFieldsListBox.getItemCount() > 0) && (!AppendMode)) + AllFieldNames = xFieldsListBox.getItems(); + if ((xSelectedFieldsListBox.getItemCount() > 0) && (!AppendMode)) { - xSelFieldsListBox.removeItems((short) 0, xSelFieldsListBox.getItemCount()); + removeAllItems(xSelectedFieldsListBox); } toggleListboxControls(Boolean.TRUE); } @@ -543,8 +551,8 @@ public class FieldSelection public void initialize(String[] _AllFieldNames, String[] _SelFieldNames, boolean _AppendMode) { - xSelFieldsListBox.removeItems((short) 0, xSelFieldsListBox.getItemCount()); - xSelFieldsListBox.addItems(_SelFieldNames, (short) 0); + removeAllItems(xSelectedFieldsListBox); + xSelectedFieldsListBox.addItems(_SelFieldNames, (short) 0); initialize(_AllFieldNames, _AppendMode); } @@ -553,20 +561,20 @@ public class FieldSelection // int CurIndex; short iFieldSelected = (short) - 1; short iSelFieldSelected = (short) - 1; - // int MaxCurTarget = xSelFieldsListBox.getItemCount(); + // int MaxCurTarget = xSelectedFieldsListBox.getItemCount(); String[] SelFieldItems; if (bMoveAll) { SelFieldItems = xFieldsListBox.getItems(); - xFieldsListBox.removeItems((short) 0, xFieldsListBox.getItemCount()); + removeAllItems(xFieldsListBox); if (!AppendMode) { - xSelFieldsListBox.removeItems((short) 0, xSelFieldsListBox.getItemCount()); - xSelFieldsListBox.addItems(AllFieldNames, (short) 0); + removeAllItems(xSelectedFieldsListBox); + xSelectedFieldsListBox.addItems(AllFieldNames, (short) 0); } else { - xSelFieldsListBox.addItems(SelFieldItems, xSelFieldsListBox.getItemCount()); + xSelectedFieldsListBox.addItems(SelFieldItems, xSelectedFieldsListBox.getItemCount()); } } else @@ -576,18 +584,18 @@ public class FieldSelection if (MaxSourceSelected > 0) { iFieldSelected = xFieldsListBox.getSelectedItemPos(); - iSelFieldSelected = xSelFieldsListBox.getSelectedItemPos(); + iSelFieldSelected = xSelectedFieldsListBox.getSelectedItemPos(); short[] SourceSelList = new short[xFieldsListBox.getSelectedItemsPos().length]; SourceSelList = xFieldsListBox.getSelectedItemsPos(); - xSelFieldsListBox.addItems(SelFieldItems, xSelFieldsListBox.getItemCount()); + xSelectedFieldsListBox.addItems(SelFieldItems, xSelectedFieldsListBox.getItemCount()); CurUnoDialog.removeSelectedItems(xFieldsListBox); - xSelFieldsListBox.selectItemPos((short) 0, xSelFieldsListBox.getSelectedItems().length > 0); + xSelectedFieldsListBox.selectItemPos((short) 0, xSelectedFieldsListBox.getSelectedItems().length > 0); } } toggleListboxButtons(iFieldSelected, iSelFieldSelected); if (xFieldSelection != null) { - xFieldSelection.shiftFromLeftToRight(SelFieldItems, xSelFieldsListBox.getItems()); + xFieldSelection.shiftFromLeftToRight(SelFieldItems, xSelectedFieldsListBox.getItems()); } } @@ -596,14 +604,14 @@ public class FieldSelection // int m = 0; String SearchString; short iOldFieldSelected = xFieldsListBox.getSelectedItemPos(); - short iOldSelFieldSelected = xSelFieldsListBox.getSelectedItemPos(); - String[] OldSelFieldItems = xSelFieldsListBox.getSelectedItems(); + short iOldSelFieldSelected = xSelectedFieldsListBox.getSelectedItemPos(); + String[] OldSelFieldItems = xSelectedFieldsListBox.getSelectedItems(); if (bMoveAll) { - OldSelFieldItems = xSelFieldsListBox.getItems(); - xFieldsListBox.removeItems((short) 0, xFieldsListBox.getItemCount()); + OldSelFieldItems = xSelectedFieldsListBox.getItems(); + removeAllItems(xFieldsListBox); xFieldsListBox.addItems(AllFieldNames, (short) 0); - xSelFieldsListBox.removeItems((short) 0, xSelFieldsListBox.getItemCount()); + removeAllItems(xSelectedFieldsListBox); } else { @@ -630,10 +638,10 @@ public class FieldSelection NewSourceVector.toArray(NewSourceList); xFieldsListBox.addItems(NewSourceList, (short) 0); } - CurUnoDialog.removeSelectedItems(xSelFieldsListBox); + CurUnoDialog.removeSelectedItems(xSelectedFieldsListBox); } toggleListboxButtons(iOldFieldSelected, iOldSelFieldSelected); - String[] NewSelFieldItems = xSelFieldsListBox.getItems(); + String[] NewSelFieldItems = xSelectedFieldsListBox.getItems(); if (xFieldSelection != null) { xFieldSelection.shiftFromRightToLeft(OldSelFieldItems, NewSelFieldItems); diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index e1ae043db571..c84db4674c96 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -56,12 +56,13 @@ public class FilterComponent { private Integer IStep; - private int iStartPosX; - private int iStartPosY; + // private int iStartPosX; + // private int iStartPosY; // int Count; private int RowCount; // private int FilterCount; private static String[] sLogicOperators; + private static String[] sBooleanValues; // private /* public */ String[] FieldNames; private XRadioButton optMatchAll; private XRadioButton optMatchAny; @@ -77,9 +78,6 @@ public class FilterComponent private ControlRow[] oControlRows; // private Vector FilterNames; private String sDuplicateCondition; - final int SOLSTFIELDNAME = 3; - final int SOLSTOPERATOR = 4; - final int SOTXTVALUE = 5; final int SOOPTORMODE = 100; final int SOOPTANDMODE = 101; QueryMetaData oQueryMetaData; @@ -113,6 +111,14 @@ public class FilterComponent { SO_FIRSTTEXTFIELD, SO_SECONDTEXTFIELD, SO_THIRDTEXTFIELD, SO_FOURTHTEXTFIELD }; + final int SO_FIRSTBOOLFIELDNAME = 256 + 1; + final int SO_SECONDBOOLFIELDNAME = 256 + 2; + final int SO_THIRDBOOLFIELDNAME = 256 + 3; + final int SO_FOURTHBOOLFIELDNAME = 256 + 4; + int SO_BOOLEANLIST[] = { + SO_FIRSTBOOLFIELDNAME, SO_SECONDBOOLFIELDNAME, SO_THIRDBOOLFIELDNAME, SO_FOURTHBOOLFIELDNAME + }; + final int SO_OPTQUERYMODE = 5; int SOI_MATCHALL = 0; int SOI_MATCHANY = 1; @@ -127,7 +133,7 @@ public class FilterComponent try { int iKey = CurUnoDialog.getControlKey(EventObject.Source, CurUnoDialog.ControlList); - String scontrolname = ""; + String sControlName = ""; switch (iKey) { // case SOOPTQUERYMODE: @@ -136,31 +142,55 @@ public class FilterComponent case SO_SECONDFIELDNAME: case SO_THIRDFIELDNAME: case SO_FOURTHFIELDNAME: - scontrolname = getControlName(EventObject.Source); - String scontrolnameSuffix = sIncSuffix + "_" + scontrolname.substring(scontrolname.length() - 1, scontrolname.length()); - XListBox xCurFieldListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, CurUnoDialog.xDlgContainer.getControl(scontrolname)); + sControlName = getControlName(EventObject.Source); + String sControlNameSuffix = sIncSuffix + "_" + getIndexNumber(sControlName); + XListBox xCurFieldListBox = (XListBox) UnoRuntime.queryInterface(XListBox.class, CurUnoDialog.xDlgContainer.getControl(sControlName)); String CurDisplayFieldName = xCurFieldListBox.getSelectedItem(); FieldColumn CurFieldColumn = new FieldColumn(oQueryMetaData, CurDisplayFieldName); - XControl xValueControl = CurUnoDialog.xDlgContainer.getControl("txtValue" + scontrolnameSuffix); - XInterface xValueModel = (XInterface) UnoDialog.getModel(xValueControl); - Helper.setUnoPropertyValue(xValueModel, "TreatAsNumber", new Boolean(CurFieldColumn.bIsNumberFormat)); - final NumberFormatter aNumberFormatter = oQueryMetaData.getNumberFormatter(); - aNumberFormatter.setNumberFormat(xValueModel, CurFieldColumn.DBFormatKey, aNumberFormatter); + + String sControlNameTextValue = "txtValue" + sControlNameSuffix; +// String sControlNameBooleanList = "lstBoolean" + sControlNameSuffix; +// if (aFieldColumn.FieldType == DataType.BOOLEAN) +// { +// // scheint aufgrund eines Fehlers in Toolkit nicht zu funktionieren +// CurUnoDialog.setControlVisible(sControlNameTextValue, false); +// CurUnoDialog.setControlVisible(sControlNameBooleanList, true); +// } +// else +// { +// CurUnoDialog.setControlVisible(sControlNameTextValue, true); +// CurUnoDialog.setControlVisible(sControlNameBooleanList, false); + + XControl xValueControl = CurUnoDialog.xDlgContainer.getControl(sControlNameTextValue); + XInterface xValueModel = (XInterface) UnoDialog.getModel(xValueControl); + Helper.setUnoPropertyValue(xValueModel, "TreatAsNumber", new Boolean(CurFieldColumn.bIsNumberFormat)); + final NumberFormatter aNumberFormatter = oQueryMetaData.getNumberFormatter(); + aNumberFormatter.setNumberFormat(xValueModel, CurFieldColumn.DBFormatKey, aNumberFormatter); +// } + break; case SO_FIRSTCONDITION: case SO_SECONDCONDITION: case SO_THIRDCONDITION: case SO_FOURTHCONDITION: - scontrolname = getControlName(EventObject.Source); + sControlName = getControlName(EventObject.Source); break; case SOOPTORMODE: case SOOPTANDMODE: // getfilterstate(); return; + + case SO_FIRSTBOOLFIELDNAME: + case SO_SECONDBOOLFIELDNAME: + case SO_THIRDBOOLFIELDNAME: + case SO_FOURTHBOOLFIELDNAME: + sControlName = getControlName(EventObject.Source); + break; + default: break; } - togglefollowingControlRow(scontrolname); + togglefollowingControlRow(sControlName); } catch (Exception exception) { @@ -217,13 +247,25 @@ public class FilterComponent } } + public static String getIndexNumber(String _sStr) + { + String sLastNumber = _sStr.substring(_sStr.length() - 1, _sStr.length()); + return sLastNumber; + } + + /** + * Enable the next ControlRow if the Condition is complete in the current line + * + * @param _scurName every control name ends with something like _1, _2, _3 this is the index number + * we try to interpret to check which line we currently use. (number - 1) + */ private void togglefollowingControlRow(String _scurName) { // String sNameSuffix = sIncSuffix + "_" + _scurName.substring(_scurName.length() - 1, _scurName.length()); - int Index = Integer.valueOf(_scurName.substring(_scurName.length() - 1, _scurName.length())).intValue(); + int Index = Integer.valueOf(getIndexNumber(_scurName)).intValue(); if (Index < oControlRows.length) { - boolean bValue = oControlRows[Index - 1].isComplete(); + boolean bValue = oControlRows[Index - 1].isConditionComplete(); oControlRows[Index].setEnabled(bValue); } } @@ -246,80 +288,84 @@ public class FilterComponent public PropertyValue[][] getFilterConditions() { - ControlRow CurControlRow; - Object curValue; + // ControlRow CurControlRow; // getfilterstate(); - int filtercount = getFilterCount(); - if (filtercount > 0) + int nFilterCount = getFilterCount(); + if (nFilterCount > 0) { if (this.getfilterstate() == this.SOI_MATCHALL) { - filterconditions = new PropertyValue[1][filtercount]; + filterconditions = new PropertyValue[1][nFilterCount]; } else { - filterconditions = new PropertyValue[filtercount][1]; + filterconditions = new PropertyValue[nFilterCount][1]; } int a = 0; for (int i = 0; i < RowCount; i++) { - CurControlRow = oControlRows[i]; + ControlRow CurControlRow = oControlRows[i]; if (CurControlRow.isEnabled()) { - if (CurControlRow.isComplete()) + if (CurControlRow.isConditionComplete()) { - String curFieldName = CurControlRow.getSelectedFieldName(); - int curOperator = (int) CurControlRow.getSelectedOperator() + 1; - FieldColumn CurFieldColumn = oQueryMetaData.getFieldColumnByDisplayName(curFieldName); - if (CurFieldColumn.StandardFormatKey == oQueryMetaData.getNumberFormatter().getTextFormatKey()) + Object aValue; + String sFieldName = CurControlRow.getSelectedFieldName(); + int nOperator = (int) CurControlRow.getSelectedOperator(); + FieldColumn aFieldColumn = oQueryMetaData.getFieldColumnByDisplayName(sFieldName); + if (aFieldColumn.StandardFormatKey == oQueryMetaData.getNumberFormatter().getTextFormatKey()) { - curValue = "'" + CurControlRow.getValue() + "'"; + aValue = "'" + CurControlRow.getValue() + "'"; } //// TODO the following code is bound to be deprecated as soon as the query composer is able to handle date/time values as numbers - else if ((CurFieldColumn.StandardFormatKey == oQueryMetaData.getNumberFormatter().getDateFormatKey()) || - (CurFieldColumn.StandardFormatKey == oQueryMetaData.getNumberFormatter().getDateTimeFormatKey())) + else if ((aFieldColumn.StandardFormatKey == oQueryMetaData.getNumberFormatter().getDateFormatKey()) || + (aFieldColumn.StandardFormatKey == oQueryMetaData.getNumberFormatter().getDateTimeFormatKey())) { String sDate = CurControlRow.getDateTimeString(true); - curValue = "{D '" + sDate + "' }"; // FormatsSupplier + aValue = "{D '" + sDate + "' }"; // FormatsSupplier } - else if (CurFieldColumn.StandardFormatKey == oQueryMetaData.getNumberFormatter().getTimeFormatKey()) + else if (aFieldColumn.StandardFormatKey == oQueryMetaData.getNumberFormatter().getTimeFormatKey()) { String sTime = CurControlRow.getDateTimeString(true); - curValue = "'{T '" + sTime + "' }"; + aValue = "'{T '" + sTime + "' }"; } else { - curValue = CurControlRow.getValue(); - switch (CurFieldColumn.FieldType) + aValue = CurControlRow.getValue(); + // if void + if (! AnyConverter.isVoid(aValue)) { - case DataType.TINYINT: - case DataType.BIGINT: - case DataType.INTEGER: - case DataType.SMALLINT: - curValue = String.valueOf(((Double) curValue).intValue()); - break; - case DataType.BIT: - case DataType.BOOLEAN: - // curValue = CurControlRow.getText(); // wrong! (creates something like 'WAHR'/'FALSCH' if german locale is used. - - // double dblvalue = ((Double) curValue).doubleValue(); - //curValue = new Boolean(dblvalue == 1.0); // wrong! we need a string, not a boolean value - - // converts the '1.0'/'0.0' (EffectiveValue) to a 'boolean' String like 'true'/'false' - curValue = String.valueOf(((Double) curValue).intValue() == 1); - break; - default: - curValue = String.valueOf(curValue); - break; + switch (aFieldColumn.FieldType) + { + case DataType.TINYINT: + case DataType.BIGINT: + case DataType.INTEGER: + case DataType.SMALLINT: + aValue = String.valueOf(((Double) aValue).intValue()); + break; + case DataType.BIT: + case DataType.BOOLEAN: + // curValue = CurControlRow.getText(); // wrong! (creates something like 'WAHR'/'FALSCH' if german locale is used. + + // double dblvalue = ((Double) curValue).doubleValue(); + //curValue = new Boolean(dblvalue == 1.0); // wrong! we need a string, not a boolean value + + // converts the '1.0'/'0.0' (EffectiveValue) to a 'boolean' String like 'true'/'false' + aValue = String.valueOf(((Double) aValue).intValue() == 1); + break; + default: + aValue = String.valueOf(aValue); + break; + } } } - PropertyValue oPropertyValue = Properties.createProperty(curFieldName, curValue, curOperator); + PropertyValue oPropertyValue = Properties.createProperty(sFieldName, aValue, nOperator); if (getfilterstate()/*this.ifilterstate*/ == this.SOI_MATCHALL) { if (i == 0) { - filterconditions[0] = new PropertyValue[filtercount]; + filterconditions[0] = new PropertyValue[nFilterCount]; } filterconditions[0][a] = oPropertyValue; } @@ -422,7 +468,7 @@ public class FilterComponent int a = 0; for (int i = 0; i < RowCount; i++) { - if (oControlRows[i].isEnabled() && oControlRows[i].isComplete()) + if (oControlRows[i].isEnabled() && oControlRows[i].isConditionComplete()) { a++; } @@ -456,44 +502,79 @@ public class FilterComponent this.RowCount = FilterCount; this.oQueryMetaData = _oQueryMetaData; boolean bEnabled; - sIncSuffix = com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.xDlgNameAccess, "optMatchAll"); - iStartPosX = iPosX; - iStartPosY = iPosY; + sIncSuffix = com.sun.star.wizards.common.Desktop.getIncrementSuffix(CurUnoDialog.getDlgNameAccess(), "optMatchAll"); + // iStartPosX = iPosX; + // iStartPosY = iPosY; String soptMatchAll = CurUnoDialog.m_oResource.getResText(BaseID + 9); String soptMatchAny = CurUnoDialog.m_oResource.getResText(BaseID + 10); slblFieldNames = CurUnoDialog.m_oResource.getResText(BaseID + 17); slblOperators = CurUnoDialog.m_oResource.getResText(BaseID + 24); slblValue = CurUnoDialog.m_oResource.getResText(BaseID + 25); - sLogicOperators = CurUnoDialog.m_oResource.getResArray(BaseID + 26, 7); + sLogicOperators = CurUnoDialog.m_oResource.getResArray(BaseID + 26, 10 /* 7 */); // =, <>, <, >, <=, >=, like, !like, is null, !is null + sBooleanValues = CurUnoDialog.m_oResource.getResArray(BaseID + 36, 2); // true, false sDuplicateCondition = CurUnoDialog.m_oResource.getResText(BaseID + 89); + // create Radiobuttons + // * match all + // * match one optMatchAll = CurUnoDialog.insertRadioButton("optMatchAll" + sIncSuffix, SOOPTANDMODE, new ItemListenerImpl(), new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "State", "Step", "TabIndex", "Width" + "Height", + "HelpURL", + "Label", + "PositionX", + "PositionY", + "State", + "Step", + "TabIndex", + "Width" }, new Object[] { - new Integer(9), "HID:" + curHelpID++, soptMatchAll, new Integer(iPosX), new Integer(iStartPosY), new Short((short) 1), IStep, new Short(curtabindex++), new Integer(203) + new Integer(9), + "HID:" + curHelpID++, + soptMatchAll, + new Integer(iPosX), + new Integer(iPosY), + new Short((short) 1), + IStep, + new Short(curtabindex++), + new Integer(203) }); optMatchAny = CurUnoDialog.insertRadioButton("optMatchAny" + sIncSuffix, SOOPTORMODE, new ItemListenerImpl(), new String[] { - "Height", "HelpURL", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Height", + "HelpURL", + "Label", + "PositionX", + "PositionY", + "Step", + "TabIndex", + "Width" }, new Object[] { - new Integer(9), "HID:" + curHelpID++, soptMatchAny, new Integer(iPosX), new Integer(iStartPosY + 12), IStep, new Short(curtabindex++), new Integer(203) + new Integer(9), + "HID:" + curHelpID++, + soptMatchAny, + new Integer(iPosX), + new Integer(iPosY + 12), + IStep, + new Short(curtabindex++), + new Integer(203) }); getfilterstate(); + oControlRows = new ControlRow[FilterCount]; for (int i = 0; i < FilterCount; i++) { bEnabled = (i == 0); - oControlRows[i] = new ControlRow(iStartPosY + 20, i, bEnabled, (this.curHelpID + (i * 3))); - iStartPosY += 43; + oControlRows[i] = new ControlRow(iPosX, iPosY + 20, i, bEnabled, (this.curHelpID + (i * 3))); + iPosY += 43; } } catch (Exception exception) @@ -504,42 +585,51 @@ public class FilterComponent public void initialize(PropertyValue[][] _filterconditions, String[] _fieldnames) { - for (int i = 0; i < RowCount; i++) + // String aFieldNamesWithAdditionalEmpty[] = new String[_fieldnames.length + 1]; + // for (int i = 0; i < _fieldnames.length; i++) + // { + // aFieldNamesWithAdditionalEmpty[i] = _fieldnames[i]; + // } + // aFieldNamesWithAdditionalEmpty[_fieldnames.length] = ""; + + int i; + for (i = 0; i < RowCount; i++) { oControlRows[i].setFieldNames(_fieldnames); + // oControlRows[i].setFieldNames(aFieldNamesWithAdditionalEmpty); } this.filterconditions = _filterconditions; PropertyValue[] curfilterconditions; - int a; + // int a; if (_filterconditions.length == 1) { curfilterconditions = filterconditions[0]; - for (a = 0; a < curfilterconditions.length; a++) + for (i = 0; i < curfilterconditions.length; i++) { - oControlRows[a].setCondition(filterconditions[0][a]); + oControlRows[i].setCondition(filterconditions[0][i]); } } else { - for (a = 0; a < filterconditions.length; a++) + for (i = 0; i < filterconditions.length; i++) { - oControlRows[a].setCondition(filterconditions[a][0]); + oControlRows[i].setCondition(filterconditions[i][0]); } } - while (a < oControlRows.length) + while (i < oControlRows.length) { - oControlRows[a].settovoid(); + oControlRows[i].settovoid(); boolean bdoenable; - if (a > 0) + if (i > 0) { - bdoenable = oControlRows[a - 1].isComplete(); + bdoenable = oControlRows[i - 1].isConditionComplete(); } else { bdoenable = true; } - oControlRows[a].setEnabled(bdoenable); - a++; + oControlRows[i].setEnabled(bdoenable); + i++; } } @@ -557,73 +647,216 @@ public class FilterComponent } } + // ------------------------------------------------------------------------- + // + // + // ------------------------------------------------------------------------- + class ControlRow { + private final static int SOLSTFIELDNAME = 3; + private final static int SOLSTOPERATOR = 4; + private final static int SOTXTVALUE = 5; protected XInterface[] ControlElements = new XInterface[6]; - private boolean bEnabled; + private boolean m_bEnabled; String[] FieldNames; - protected ControlRow(int iCompPosY, int Index, boolean _bEnabled, int _firstRowHelpID) + protected ControlRow(int iCompPosX, int iCompPosY, int Index, boolean _bEnabled, int _firstRowHelpID) { + int nFieldWidth = 71; + int nOperatorWidth = 70; + int nValueWidth = 44; + + int nPosX1 = iCompPosX + 10; + int nPosX2 = iCompPosX + 10 + nFieldWidth + 6; // 87 + int nPosX3 = iCompPosX + 10 + nFieldWidth + 6 + nOperatorWidth + 6; + + try { String sCompSuffix = sIncSuffix + "_" + String.valueOf(Index + 1); - this.bEnabled = _bEnabled; + m_bEnabled = _bEnabled; + + // Label Field ControlElements[0] = (XInterface) CurUnoDialog.insertLabel("lblFieldNames" + sCompSuffix, new String[] { - "Enabled", "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Enabled", + "Height", + "Label", + "PositionX", + "PositionY", + "Step", + "TabIndex", + "Width" }, new Object[] { - new Boolean(bEnabled), new Integer(9), slblFieldNames, new Integer(iStartPosX + 10), new Integer(iCompPosY + 13), IStep, new Short(curtabindex++), new Integer(55) + new Boolean(isEnabled()), + new Integer(9), + slblFieldNames, + new Integer(nPosX1), + new Integer(iCompPosY + 13), + IStep, + new Short(curtabindex++), + new Integer(nFieldWidth) }); + + // Label Operator ControlElements[1] = (XInterface) CurUnoDialog.insertLabel("lblOperators" + sCompSuffix, new String[] { - "Enabled", "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Enabled", + "Height", + "Label", + "PositionX", + "PositionY", + "Step", + "TabIndex", + "Width" }, new Object[] { - new Boolean(bEnabled), new Integer(9), slblOperators, new Integer(iStartPosX + 87), new Integer(iCompPosY + 13), IStep, new Short(curtabindex++), new Integer(52) + new Boolean(isEnabled()), + new Integer(9), + slblOperators, + new Integer(nPosX2), + new Integer(iCompPosY + 13), + IStep, + new Short(curtabindex++), + new Integer(nOperatorWidth) }); + + // Label Value ControlElements[2] = (XInterface) CurUnoDialog.insertLabel("lblValue" + sCompSuffix, new String[] { - "Enabled", "Height", "Label", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Enabled", + "Height", + "Label", + "PositionX", + "PositionY", + "Step", + "TabIndex", + "Width" }, new Object[] { - new Boolean(bEnabled), new Integer(9), slblValue, new Integer(iStartPosX + 162), new Integer(iCompPosY + 13), IStep, new Short(curtabindex++), new Integer(44) + new Boolean(isEnabled()), + new Integer(9), + slblValue, + new Integer(nPosX3), + new Integer(iCompPosY + 13), + IStep, + new Short(curtabindex++), + new Integer(nValueWidth) }); - ControlElements[3] = (XInterface) CurUnoDialog.insertListBox("lstFieldName" + sCompSuffix, SO_FIELDNAMELIST[Index], null, new ItemListenerImpl(), + + // Listbox Fields + ControlElements[SOLSTFIELDNAME] = (XInterface) CurUnoDialog.insertListBox("lstFieldName" + sCompSuffix, SO_FIELDNAMELIST[Index], null, new ItemListenerImpl(), new String[] { - "Enabled", "Dropdown", "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Enabled", + "Dropdown", + "Height", + "HelpURL", + "PositionX", + "PositionY", + "Step", + "TabIndex", + "Width" }, new Object[] { - new Boolean(bEnabled), Boolean.TRUE, new Integer(13), "HID:" + _firstRowHelpID++, new Integer(iStartPosX + 10), new Integer(iCompPosY + 23), IStep, new Short(curtabindex++), new Integer(71) + new Boolean(isEnabled()), + Boolean.TRUE, + new Integer(13), + "HID:" + _firstRowHelpID++, + new Integer(nPosX1), + new Integer(iCompPosY + 23), + IStep, + new Short(curtabindex++), + new Integer(nFieldWidth) }); - ControlElements[4] = (XInterface) CurUnoDialog.insertListBox("lstOperator" + sCompSuffix, SO_CONDITIONLIST[Index], null, new ItemListenerImpl(), + + // Listbox Operators + ControlElements[SOLSTOPERATOR] = (XInterface) CurUnoDialog.insertListBox("lstOperator" + sCompSuffix, SO_CONDITIONLIST[Index], null, new ItemListenerImpl(), new String[] { - "Enabled", "Dropdown", "Height", "HelpURL", "LineCount", "PositionX", "PositionY", "Step", "StringItemList", "TabIndex", "Width" + "Enabled", + "Dropdown", + "Height", + "HelpURL", + "LineCount", + "PositionX", + "PositionY", + "Step", + "StringItemList", + "TabIndex", + "Width" }, new Object[] { - new Boolean(bEnabled), Boolean.TRUE, new Integer(13), "HID:" + _firstRowHelpID++, new Short((short) 7), new Integer(iStartPosX + 87), new Integer(iCompPosY + 23), IStep, sLogicOperators, new Short(curtabindex++), new Integer(70) + new Boolean(isEnabled()), + Boolean.TRUE, + new Integer(13), + "HID:" + _firstRowHelpID++, + new Short((short) sLogicOperators.length /* 7 */ ), + new Integer(nPosX2), + new Integer(iCompPosY + 23), + IStep, + sLogicOperators, + new Short(curtabindex++), + new Integer(nOperatorWidth) }); - ControlElements[5] = (XInterface) CurUnoDialog.insertFormattedField("txtValue" + sCompSuffix, SO_TEXTFIELDLIST[Index], new TextListenerImpl(), + ControlElements[SOTXTVALUE] = (XInterface) CurUnoDialog.insertFormattedField("txtValue" + sCompSuffix, SO_TEXTFIELDLIST[Index], new TextListenerImpl(), new String[] { - "Enabled", "Height", "HelpURL", "PositionX", "PositionY", "Step", "TabIndex", "Width" + "Enabled", + "Height", + "HelpURL", + "PositionX", + "PositionY", + "Step", + "TabIndex", + "Width" }, new Object[] { - new Boolean(bEnabled), new Integer(13), "HID:" + _firstRowHelpID++, new Integer(iStartPosX + 162), new Integer(iCompPosY + 23), IStep, new Short(curtabindex++), new Integer(44) + new Boolean(isEnabled()), + new Integer(13), + "HID:" + _firstRowHelpID++, + new Integer(nPosX3), + new Integer(iCompPosY + 23), + IStep, + new Short(curtabindex++), + new Integer(nValueWidth) }); + +// ControlElements[6] = CurUnoDialog.insertListBox((new StringBuilder()).append("lstBoolean").append(sCompSuffix).toString(), SO_BOOLEANLIST[Index], null, new ItemListenerImpl(), new String[] { +// "Enabled", +// "Dropdown", +// "Height", +// "HelpURL", +// "LineCount", +// "PositionX", "PositionY", +// "Step", +// "StringItemList", +// "TabIndex", +// "Width" +// }, new Object[] { +// new Boolean(bEnabled), +// Boolean.TRUE, +// new Integer(13), +// "HID:" + _firstRowHelpID++, +// new Short((short) 2), +// new Integer(nPosX3 + 44), new Integer(iCompPosY + 23), +// IStep, +// FilterComponent.sBooleanValues, +// new Short(curtabindex++), +// new Integer(nValueWidth) +// }); } catch (Exception exception) { @@ -631,15 +864,35 @@ public class FilterComponent } } - boolean isComplete() + /** + * @returns true if the current condition is complete, all needed fields are filled with values. + * So we can enable the next. + */ + boolean isConditionComplete() { try { short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTFIELDNAME]), "SelectedItems")); if (SelFields.length > 0) { - short[] SelOperator = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems")); - if (SelOperator.length > 0) + int nSelOperator = getSelectedOperator(); + // short[] SelOperator = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems")); + if (nSelOperator == com.sun.star.sdb.SQLFilterOperator.SQLNULL || /* is null */ + nSelOperator == com.sun.star.sdb.SQLFilterOperator.NOT_SQLNULL) /* is not null */ + { + // disable value field + Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[2]), "Enabled", Boolean.FALSE); + Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), "Enabled", Boolean.FALSE); + + return true; + } + else + { + // enable value field + Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[2]), "Enabled", Boolean.TRUE); + Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), "Enabled", Boolean.TRUE); + } + if (nSelOperator != -1) { Object oValue = Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), "EffectiveValue"); if (!AnyConverter.isVoid(oValue)) @@ -647,6 +900,13 @@ public class FilterComponent String sValue = (String.valueOf(oValue)); return (!sValue.equals("")); } +// String sBoolValue=""; +// short aSelectedBoolValue[] = (short[])Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[6]), "SelectedItems"); +// if (aSelectedBoolValue.length > 0) +// { +// sBoolValue = String.valueOf(aSelectedBoolValue[0] == 1); +// return !sBoolValue.equals(""); +// } } } return false; @@ -658,7 +918,7 @@ public class FilterComponent } } - public void fieldnamechanged(ItemEvent EventObject) + private void fieldnamechanged(ItemEvent EventObject) { int i = 0; } @@ -718,28 +978,27 @@ public class FilterComponent protected boolean isEnabled() { - return bEnabled; + return m_bEnabled; } - protected void settovoid() + private void settovoid() { CurUnoDialog.deselectListBox(ControlElements[SOLSTFIELDNAME]); CurUnoDialog.deselectListBox(ControlElements[SOLSTOPERATOR]); Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOTXTVALUE]), "EffectiveValue", com.sun.star.uno.Any.VOID); } - protected void setEnabled(boolean _bEnabled) + private void setEnabled(boolean _bEnabled) { + // enable all Controls Fieldname, operator, value for (int i = 0; i < ControlElements.length; i++) { Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[i]), "Enabled", new Boolean(_bEnabled)); } - bEnabled = _bEnabled; - if (bEnabled) + m_bEnabled = _bEnabled; + if (isEnabled()) { - short[] iselected = new short[] - { - }; + short[] iselected = new short[] {}; try { iselected = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems")); @@ -750,13 +1009,10 @@ public class FilterComponent } if ((iselected.length) == 0) { - Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems", new short[] - { - 0 - }); + Helper.setUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems", new short[] { 0 }); } } - else if (!isComplete()) + else if (!isConditionComplete()) { CurUnoDialog.deselectListBox(ControlElements[SOLSTOPERATOR]); } @@ -777,12 +1033,37 @@ public class FilterComponent } // TODO: check if it is really useful to match the indices of the listbox the API constants + // =, <>, <, >, <=, >=, like, !like, is null, !is null protected short getSelectedOperator() { try { short[] SelFields = (short[]) AnyConverter.toArray(Helper.getUnoPropertyValue(UnoDialog.getModel(ControlElements[SOLSTOPERATOR]), "SelectedItems")); - return SelFields[0]; + switch (SelFields[0]) + { + case 0: + return com.sun.star.sdb.SQLFilterOperator.EQUAL; + case 1: + return com.sun.star.sdb.SQLFilterOperator.NOT_EQUAL; + case 2: + return com.sun.star.sdb.SQLFilterOperator.LESS; + case 3: + return com.sun.star.sdb.SQLFilterOperator.GREATER; + case 4: + return com.sun.star.sdb.SQLFilterOperator.LESS_EQUAL; + case 5: + return com.sun.star.sdb.SQLFilterOperator.GREATER_EQUAL; + case 6: + return com.sun.star.sdb.SQLFilterOperator.LIKE; + case 7: + return com.sun.star.sdb.SQLFilterOperator.NOT_LIKE; + case 8: + return com.sun.star.sdb.SQLFilterOperator.SQLNULL; + case 9: + return com.sun.star.sdb.SQLFilterOperator.NOT_SQLNULL; + default: + return -1; + } } catch (Exception exception) { @@ -833,7 +1114,8 @@ public class FilterComponent } } } -}// com.sun.star.sdb.SQLFilterOperator.EQUAL +} +// com.sun.star.sdb.SQLFilterOperator.EQUAL // com.sun.star.sdb.SQLFilterOperator.NOT_EQUAL // com.sun.star.sdb.SQLFilterOperator.LESS // com.sun.star.sdb.SQLFilterOperator.GREATER diff --git a/wizards/com/sun/star/wizards/ui/SortingComponent.java b/wizards/com/sun/star/wizards/ui/SortingComponent.java index e3091d6c9599..f7fd075d6b4c 100644 --- a/wizards/com/sun/star/wizards/ui/SortingComponent.java +++ b/wizards/com/sun/star/wizards/ui/SortingComponent.java @@ -114,7 +114,7 @@ public class SortingComponent "Dropdown", "Enabled", "Height", "HelpURL", "LineCount", "Name", "PositionX", "PositionY", "Step", "TabIndex", "Width" }, new Object[] { - new Boolean(true), new Boolean(bDoEnable), new Integer(12), HIDString, new Short("7"), "lstSort" + new Integer(i + 1), IListBoxPosX, new Integer(iCurPosY + 14), IStep, new Short(curtabindex++), IListBoxWidth + new Boolean(true), new Boolean(bDoEnable), new Integer(12), HIDString, new Short(UnoDialog.getListBoxLineCount()), "lstSort" + new Integer(i + 1), IListBoxPosX, new Integer(iCurPosY + 14), IStep, new Short(curtabindex++), IListBoxWidth }); //new Short((short) (17+i*4)) HIDString = "HID:" + Integer.toString(FirstHelpIndex + 1); diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog.java b/wizards/com/sun/star/wizards/ui/UnoDialog.java index 1425c3eadb53..256a28eff6b6 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog.java @@ -57,7 +57,7 @@ public class UnoDialog implements EventNames public XMultiServiceFactory MSFDialogModel; public XNameContainer xDlgNames; public XControlContainer xDlgContainer; - public XNameAccess xDlgNameAccess; + private XNameAccess m_xDlgNameAccess; public XControl xControl; public XDialog xDialog; public XReschedule xReschedule; @@ -95,7 +95,7 @@ public class UnoDialog implements EventNames xPSetDlg = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xDialogModel); xDlgContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, xUnoDialog); xDlgNames = (XNameContainer) UnoRuntime.queryInterface(XNameContainer.class, xDialogModel); - xDlgNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xDialogModel); + // xDlgNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xDialogModel); xComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, xUnoDialog); xWindow = (XWindow) UnoRuntime.queryInterface(XWindow.class, xUnoDialog); @@ -141,17 +141,25 @@ public class UnoDialog implements EventNames return m_oPeerConfig; } + XNameAccess getDlgNameAccess() + { + if (m_xDlgNameAccess == null) + { + m_xDlgNameAccess = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, xDialogModel); + } + return m_xDlgNameAccess; + } public void setControlProperty(String ControlName, String PropertyName, Object PropertyValue) { try { if (PropertyValue != null) { - if (xDlgNameAccess.hasByName(ControlName) == false) + if (getDlgNameAccess().hasByName(ControlName) == false) { return; } - Object xControlModel = xDlgNameAccess.getByName(ControlName); + Object xControlModel = getDlgNameAccess().getByName(ControlName); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel); if (AnyConverter.isArray(PropertyValue)) { @@ -182,11 +190,11 @@ public class UnoDialog implements EventNames { if (PropertyValues != null) { - if (xDlgNameAccess.hasByName(ControlName) == false) + if (getDlgNameAccess().hasByName(ControlName) == false) { return; } - Object xControlModel = xDlgNameAccess.getByName(ControlName); + Object xControlModel = getDlgNameAccess().getByName(ControlName); XMultiPropertySet xMultiPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, xControlModel); xMultiPSet.setPropertyValues(PropertyNames, PropertyValues); } @@ -201,7 +209,7 @@ public class UnoDialog implements EventNames { try { - Object xControlModel = xDlgNameAccess.getByName(ControlName); + Object xControlModel = getDlgNameAccess().getByName(ControlName); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel); Object oPropValue = xPSet.getPropertyValue(PropertyName); // if (AnyConverter.isArray(oPropValue)) @@ -220,7 +228,7 @@ public class UnoDialog implements EventNames { try { - Object xControlModel = xDlgNameAccess.getByName(ControlName); + Object xControlModel = getDlgNameAccess().getByName(ControlName); XPropertySet xPSet = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xControlModel); Property[] allProps = xPSet.getPropertySetInfo().getProperties(); for (int i = 0; i < allProps.length; i++) @@ -685,7 +693,7 @@ public class UnoDialog implements EventNames * * @param _xBasisListBox */ - public void deselectListBox(XInterface _xBasisListBox) + public static void deselectListBox(XInterface _xBasisListBox) { Object oListBoxModel = getModel(_xBasisListBox); Object sList = Helper.getUnoPropertyValue(oListBoxModel, "StringItemList"); @@ -1128,4 +1136,9 @@ public class UnoDialog implements EventNames return _surl; } } + + public static short getListBoxLineCount() + { + return (short)20; + } } diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.java b/wizards/com/sun/star/wizards/ui/UnoDialog2.java index d8194c085626..94c6117486c6 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.java +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.java @@ -190,7 +190,7 @@ public class UnoDialog2 extends UnoDialog implements EventNames public XControl insertInfoImage(int _posx, int _posy, int _iStep) { - XControl xImgControl = insertImage(Desktop.getUniqueName(xDlgNameAccess, "imgHint"), + XControl xImgControl = insertImage(Desktop.getUniqueName(getDlgNameAccess(), "imgHint"), new String[] { "Border", "Height", "ImageURL", "PositionX", "PositionY", "ScaleImage", "Step", "Width" diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.java b/wizards/com/sun/star/wizards/ui/WizardDialog.java index 4fe94c5e3456..42cca588a5ce 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.java +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.java @@ -645,8 +645,12 @@ public abstract class WizardDialog extends UnoDialog2 implements VetoableChangeL public abstract void finishWizard(); + /** + * This function will call if the finish button is pressed on the UI. + */ public void finishWizard_1() { + enableFinishButton(false); finishWizard(); removeTerminateListener(); } |