summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-04-22 11:01:27 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-04-22 11:01:27 +0000
commit7599f68cee9141cd16ca7697872b5f83c6ae9ad9 (patch)
tree7b6af2b3e3e2afad6302a623743ae5077acf3d9f
parent213aa2c95aa520cac3b5bcc68f373bec8d4ebf42 (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)
-rw-r--r--dbaccess/inc/dbaccess_helpid.hrc1
-rw-r--r--dbaccess/qa/complex/dbaccess/DatabaseDocument.java39
-rw-r--r--dbaccess/qa/complex/dbaccess/FileHelper.java46
-rw-r--r--dbaccess/qa/complex/dbaccess/TestCase.java21
-rw-r--r--dbaccess/qa/complex/dbaccess/UISettings.java133
-rw-r--r--dbaccess/qa/complex/dbaccess/dbaccess.sce1
-rw-r--r--dbaccess/source/core/api/FilteredContainer.cxx461
-rw-r--r--dbaccess/source/core/api/tablecontainer.cxx135
-rw-r--r--dbaccess/source/core/api/viewcontainer.cxx28
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx37
-rw-r--r--dbaccess/source/core/dataaccess/connection.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx100
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.hxx5
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.cxx5
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.hxx1
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx109
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.hxx16
-rw-r--r--dbaccess/source/core/inc/FilteredContainer.hxx43
-rw-r--r--dbaccess/source/core/inc/tablecontainer.hxx11
-rw-r--r--dbaccess/source/core/inc/viewcontainer.hxx5
-rw-r--r--dbaccess/source/ext/macromigration/macromigration.src2
-rw-r--r--dbaccess/source/filter/xml/xmlColumn.cxx43
-rw-r--r--dbaccess/source/filter/xml/xmlColumn.hxx10
-rw-r--r--dbaccess/source/filter/xml/xmlDataSource.cxx19
-rw-r--r--dbaccess/source/filter/xml/xmlDataSource.hxx10
-rw-r--r--dbaccess/source/filter/xml/xmlDatabase.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlEnums.hxx3
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx452
-rw-r--r--dbaccess/source/filter/xml/xmlExport.hxx20
-rw-r--r--dbaccess/source/filter/xml/xmlHierarchyCollection.cxx4
-rw-r--r--dbaccess/source/filter/xml/xmlHierarchyCollection.hxx9
-rw-r--r--dbaccess/source/filter/xml/xmlStyleImport.cxx29
-rw-r--r--dbaccess/source/filter/xml/xmlStyleImport.hxx6
-rw-r--r--dbaccess/source/filter/xml/xmlTable.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx24
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.hxx2
-rw-r--r--dbaccess/source/inc/stringconstants.hrc1
-rw-r--r--dbaccess/source/inc/stringconstants.inc1
-rw-r--r--dbaccess/source/ui/app/AppController.cxx6
-rw-r--r--dbaccess/source/ui/app/AppControllerDnD.cxx1
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx13
-rw-r--r--dbaccess/source/ui/browser/dbexchange.cxx45
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx1
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx2
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx1
-rw-r--r--dbaccess/source/ui/dlg/DriverSettings.cxx1
-rw-r--r--dbaccess/source/ui/dlg/ExtensionNotPresent.src3
-rw-r--r--dbaccess/source/ui/dlg/UserAdminDlg.cxx96
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.cxx13
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.hrc1
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.hxx1
-rw-r--r--dbaccess/source/ui/dlg/advancedsettings.src14
-rw-r--r--dbaccess/source/ui/dlg/datasourceui.cxx1
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.cxx6
-rw-r--r--dbaccess/source/ui/dlg/dsitems.hxx3
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx9
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx9
-rw-r--r--dbaccess/source/ui/inc/TableCopyHelper.hxx1
-rw-r--r--dbaccess/source/ui/inc/TokenWriter.hxx17
-rw-r--r--dbaccess/source/ui/inc/dsmeta.hxx4
-rw-r--r--dbaccess/source/ui/inc/sqlmessage.hxx14
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx3
-rw-r--r--dbaccess/source/ui/misc/RowSetDrop.cxx3
-rw-r--r--dbaccess/source/ui/misc/TableCopyHelper.cxx13
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx107
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx4
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx7
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx4
-rw-r--r--dbaccess/source/ui/misc/databaseobjectview.cxx8
-rw-r--r--dbaccess/source/ui/misc/dsmeta.cxx24
-rw-r--r--dbaccess/source/ui/misc/linkeddocuments.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx22
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx4
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx4
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx17
-rw-r--r--reportdesign/inc/RptDef.hxx5
-rw-r--r--reportdesign/inc/RptObject.hxx4
-rw-r--r--reportdesign/inc/RptPage.hxx14
-rw-r--r--reportdesign/inc/RptResId.hrc28
-rw-r--r--reportdesign/inc/UndoEnv.hxx30
-rw-r--r--reportdesign/inc/helpids.hrc3
-rw-r--r--reportdesign/inc/reportformula.hxx5
-rw-r--r--reportdesign/inc/rptui_slotid.hrc4
-rw-r--r--reportdesign/source/core/api/ImageControl.cxx30
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx26
-rw-r--r--reportdesign/source/core/api/Shape.cxx16
-rw-r--r--reportdesign/source/core/inc/ImageControl.hxx6
-rw-r--r--reportdesign/source/core/inc/Shape.hxx4
-rw-r--r--reportdesign/source/core/inc/Tools.hxx23
-rw-r--r--reportdesign/source/core/misc/reportformula.cxx9
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx122
-rw-r--r--reportdesign/source/core/sdr/RptPage.cxx20
-rw-r--r--reportdesign/source/core/sdr/UndoActions.cxx540
-rw-r--r--reportdesign/source/core/sdr/UndoEnv.cxx626
-rw-r--r--reportdesign/source/core/sdr/formatnormalizer.cxx2
-rw-r--r--reportdesign/source/core/sdr/makefile.mk2
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlHelper.cxx11
-rw-r--r--reportdesign/source/filter/xml/xmlHelper.hxx1
-rw-r--r--reportdesign/source/filter/xml/xmlImage.cxx55
-rw-r--r--reportdesign/source/filter/xml/xmlImage.hxx3
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx10
-rw-r--r--reportdesign/source/inc/stringconstants.hrc4
-rw-r--r--reportdesign/source/inc/uistrings.hrc3
-rw-r--r--reportdesign/source/shared/stringconstants.cxx8
-rw-r--r--reportdesign/source/shared/uistrings.cxx2
-rw-r--r--reportdesign/source/ui/dlg/AddField.cxx50
-rw-r--r--reportdesign/source/ui/dlg/CondFormat.hrc1
-rw-r--r--reportdesign/source/ui/dlg/CondFormat.src25
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx193
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.hrc13
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.src188
-rw-r--r--reportdesign/source/ui/dlg/makefile.mk3
-rw-r--r--reportdesign/source/ui/inc/AddField.hxx3
-rw-r--r--reportdesign/source/ui/inc/DesignView.hxx1
-rw-r--r--reportdesign/source/ui/inc/FixedTextColor.hxx80
-rw-r--r--reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx78
-rw-r--r--reportdesign/source/ui/inc/GroupsSorting.hxx38
-rw-r--r--reportdesign/source/ui/inc/IReportControllerObserver.hxx60
-rw-r--r--reportdesign/source/ui/inc/ReportController.hxx21
-rw-r--r--reportdesign/source/ui/inc/ReportControllerObserver.hxx141
-rw-r--r--reportdesign/source/ui/inc/ReportWindow.hxx1
-rw-r--r--reportdesign/source/ui/inc/ScrollHelper.hxx1
-rw-r--r--reportdesign/source/ui/inc/SectionView.hxx13
-rw-r--r--reportdesign/source/ui/inc/SectionWindow.hxx1
-rw-r--r--reportdesign/source/ui/inc/UITools.hxx5
-rw-r--r--reportdesign/source/ui/inc/ViewsWindow.hxx3
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx12
-rw-r--r--reportdesign/source/ui/inspection/inspection.src16
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx12
-rw-r--r--reportdesign/source/ui/misc/rptuiservices.cxx6
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx23
-rw-r--r--reportdesign/source/ui/report/FixedTextColor.cxx286
-rw-r--r--reportdesign/source/ui/report/FormattedFieldBeautifier.cxx205
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx326
-rw-r--r--reportdesign/source/ui/report/ReportControllerObserver.cxx483
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx3
-rw-r--r--reportdesign/source/ui/report/ReportWindow.cxx7
-rw-r--r--reportdesign/source/ui/report/ScrollHelper.cxx5
-rw-r--r--reportdesign/source/ui/report/SectionView.cxx103
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx140
-rw-r--r--reportdesign/source/ui/report/dlgedfunc.cxx65
-rw-r--r--reportdesign/source/ui/report/makefile.mk3
-rw-r--r--reportdesign/source/ui/report/report.src49
-rw-r--r--reportdesign/uiconfig/dbreport/menubar/menubar.xml502
-rw-r--r--reportdesign/uiconfig/dbreport/toolbar/Formatting.xml24
-rw-r--r--reportdesign/uiconfig/dbreport/toolbar/alignmentbar.xml12
-rw-r--r--reportdesign/uiconfig/dbreport/toolbar/arrowshapes.xml52
-rw-r--r--reportdesign/uiconfig/dbreport/toolbar/basicshapes.xml44
-rw-r--r--reportdesign/uiconfig/dbreport/toolbar/calloutshapes.xml14
-rw-r--r--reportdesign/uiconfig/dbreport/toolbar/drawbar.xml12
-rw-r--r--reportdesign/uiconfig/dbreport/toolbar/flowchartshapes.xml56
-rw-r--r--reportdesign/uiconfig/dbreport/toolbar/reportcontrols.xml18
-rw-r--r--reportdesign/uiconfig/dbreport/toolbar/sectionalignmentbar.xml10
-rwxr-xr-xreportdesign/uiconfig/dbreport/toolbar/sectionshrinkbar.xml7
-rw-r--r--reportdesign/uiconfig/dbreport/toolbar/starshapes.xml24
-rw-r--r--reportdesign/uiconfig/dbreport/toolbar/symbolshapes.xml36
-rw-r--r--reportdesign/uiconfig/dbreport/toolbar/toolbar.xml26
-rw-r--r--reportdesign/util/hidother.src24
160 files changed, 5384 insertions, 2089 deletions
diff --git a/dbaccess/inc/dbaccess_helpid.hrc b/dbaccess/inc/dbaccess_helpid.hrc
index 746f79da53d2..28771fad05b1 100644
--- a/dbaccess/inc/dbaccess_helpid.hrc
+++ b/dbaccess/inc/dbaccess_helpid.hrc
@@ -355,6 +355,7 @@
#define HID_DSADMIN_AS_BEFORE_CORRELATION_NAME (HID_DBACCESS_START + 297)
#define HID_DSADMIN_CHECK_REQUIRED_FIELDS (HID_DBACCESS_START + 298)
+#define HID_DSADMIN_ESCAPE_DATETIME (HID_DBACCESS_START + 299)
#define HID_PAGE_DBWIZARD_GENERALPAGE (HID_DBACCESS_START + 300)
#define HID_PAGE_DBWIZARD_GENERAL_RB_CREATEDBDATABASE (HID_DBACCESS_START + 301)
diff --git a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
index 82e7c8dc8a80..a46dda02e285 100644
--- a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
+++ b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
@@ -30,7 +30,6 @@
package complex.dbaccess;
import com.sun.star.awt.XTopWindow;
-import com.sun.star.awt.XTopWindow;
import com.sun.star.beans.PropertyState;
import com.sun.star.document.DocumentEvent;
import com.sun.star.lang.XEventListener;
@@ -81,11 +80,7 @@ import com.sun.star.util.XCloseable;
import com.sun.star.util.XModifiable;
import com.sun.star.util.XURLTransformer;
import connectivity.tools.*;
-import helper.FileTools;
-import java.io.File;
import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
import java.util.Iterator;
import java.util.Vector;
import java.util.logging.Level;
@@ -350,32 +345,6 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
}
// --------------------------------------------------------------------------------------------------------
- private String impl_correctFileURL( String _URL )
- {
- String returnURL = _URL;
- if ( ( returnURL.indexOf( "file:/" ) == 0 ) && ( returnURL.indexOf( "file:///" ) == -1 ) )
- {
- // for some reason, the URLs here in Java start with "file:/" only, instead of "file:///"
- // Some of the office code doesn't like this ...
- returnURL = "file:///" + returnURL.substring( 6 );
- }
- return returnURL;
- }
-
- // --------------------------------------------------------------------------------------------------------
- private String impl_copyTempFile( String _sourceURL ) throws IOException
- {
- String targetURL = createTempFileURL();
- try
- {
- FileTools.copyFile( new File( new URI( _sourceURL ) ), new File( new URI( targetURL ) ) );
- }
- catch ( URISyntaxException e ) { }
-
- return impl_correctFileURL( targetURL );
- }
-
- // --------------------------------------------------------------------------------------------------------
private XModel impl_createDocument( ) throws Exception
{
XModel databaseDoc = (XModel)UnoRuntime.queryInterface( XModel.class,
@@ -450,7 +419,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
// 2. XLoadable::load
databaseDoc = (XModel)UnoRuntime.queryInterface( XModel.class,
getORB().createInstance( "com.sun.star.sdb.OfficeDatabaseDocument" ) );
- documentURL = impl_copyTempFile( documentURL );
+ documentURL = copyToTempFile( documentURL );
// load the doc, and verify it's initialized then, and has the proper URL
XLoadable loadDoc = (XLoadable)UnoRuntime.queryInterface( XLoadable.class, databaseDoc );
loadDoc.load( new PropertyValue[] { new PropertyValue( "URL", 0, documentURL, PropertyState.DIRECT_VALUE ) } );
@@ -560,7 +529,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
// store the document, and close it
String documentURL = databaseDoc.getURL();
- documentURL = impl_correctFileURL( documentURL );
+ documentURL = FileHelper.getOOoCompatibleFileURL( documentURL );
XStorable storeDoc = (XStorable) UnoRuntime.queryInterface( XStorable.class,
databaseDoc );
storeDoc.store();
@@ -647,7 +616,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
impl_stopObservingEvents( m_globalEvents, new String[] { "OnSave", "OnSaveDone", "OnModifyChanged" }, context );
// XComponentLoader.loadComponentFromURL
- newURL = impl_copyTempFile( databaseDoc.getURL() );
+ newURL = copyToTempFile( databaseDoc.getURL() );
XComponentLoader loader = (XComponentLoader)UnoRuntime.queryInterface( XComponentLoader.class,
getORB().createInstance( "com.sun.star.frame.Desktop" ) );
context = "loadComponentFromURL";
@@ -704,7 +673,7 @@ public class DatabaseDocument extends TestCase implements com.sun.star.document.
loader.loadComponentFromURL( newURL, "_blank", 0, impl_getDefaultLoadArgs() ) );
int previousOnLoadEventPos = impl_waitForEvent( m_globalEvents, "OnLoad", 5000 );
// ... and another document ...
- String otherURL = impl_copyTempFile( databaseDoc.getURL() );
+ String otherURL = copyToTempFile( databaseDoc.getURL() );
XModel otherDoc = (XModel)UnoRuntime.queryInterface( XModel.class,
loader.loadComponentFromURL( otherURL, "_blank", 0, impl_getDefaultLoadArgs() ) );
impl_waitForEvent( m_globalEvents, "OnLoad", 5000, previousOnLoadEventPos + 1 );
diff --git a/dbaccess/qa/complex/dbaccess/FileHelper.java b/dbaccess/qa/complex/dbaccess/FileHelper.java
new file mode 100644
index 000000000000..fbe5f330b24d
--- /dev/null
+++ b/dbaccess/qa/complex/dbaccess/FileHelper.java
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: Parser.java,v $
+ * $Revision: 1.1.6.2 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+package complex.dbaccess;
+
+public class FileHelper
+{
+ static public String getOOoCompatibleFileURL( String _javaFileURL )
+ {
+ String returnURL = _javaFileURL;
+ if ( ( returnURL.indexOf( "file:/" ) == 0 ) && ( returnURL.indexOf( "file:///" ) == -1 ) )
+ {
+ // for some reason, the URLs here in Java start with "file:/" only, instead of "file:///"
+ // Some of the office code doesn't like this ...
+ returnURL = "file:///" + returnURL.substring( 6 );
+ }
+ return returnURL;
+ }
+}
diff --git a/dbaccess/qa/complex/dbaccess/TestCase.java b/dbaccess/qa/complex/dbaccess/TestCase.java
index 65774e108247..7fdc2c3d886b 100644
--- a/dbaccess/qa/complex/dbaccess/TestCase.java
+++ b/dbaccess/qa/complex/dbaccess/TestCase.java
@@ -33,10 +33,13 @@ import com.sun.star.beans.XPropertySet;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.uno.XComponentContext;
+import helper.FileTools;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.net.URI;
+import java.net.URISyntaxException;
public abstract class TestCase extends complexlib.ComplexTestCase
{
@@ -87,6 +90,24 @@ public abstract class TestCase extends complexlib.ComplexTestCase
}
// --------------------------------------------------------------------------------------------------------
+ /**
+ * copies the file given by URL to a temporary file
+ * @return
+ * the URL of the new file
+ */
+ protected final String copyToTempFile( String _sourceURL ) throws IOException
+ {
+ String targetURL = createTempFileURL();
+ try
+ {
+ FileTools.copyFile( new File( new URI( _sourceURL ) ), new File( new URI( targetURL ) ) );
+ }
+ catch ( URISyntaxException e ) { }
+
+ return FileHelper.getOOoCompatibleFileURL( targetURL );
+ }
+
+ // --------------------------------------------------------------------------------------------------------
protected void verifyExpectedException( Object _object, Class _unoInterfaceClass, String _methodName, Object[] _methodArgs,
Class _expectedExceptionClass )
{
diff --git a/dbaccess/qa/complex/dbaccess/UISettings.java b/dbaccess/qa/complex/dbaccess/UISettings.java
new file mode 100644
index 000000000000..a755b39aa63c
--- /dev/null
+++ b/dbaccess/qa/complex/dbaccess/UISettings.java
@@ -0,0 +1,133 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: Parser.java,v $
+ * $Revision: 1.1.6.2 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+package complex.dbaccess;
+
+import com.sun.star.awt.FontSlant;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.form.XFormController;
+import com.sun.star.frame.XComponentLoader;
+import com.sun.star.frame.XModel;
+import com.sun.star.lang.XComponent;
+import com.sun.star.sdb.application.XDatabaseDocumentUI;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.util.XCloseable;
+import helper.URLHelper;
+import java.io.File;
+import java.net.URI;
+
+public class UISettings extends TestCase
+{
+ // --------------------------------------------------------------------------------------------------------
+ public String[] getTestMethodNames()
+ {
+ return new String[] {
+ "checkTableFormattingPersistence"
+ };
+ }
+
+ // --------------------------------------------------------------------------------------------------------
+ public String getTestObjectName()
+ {
+ return "UISettings";
+ }
+
+ // --------------------------------------------------------------------------------------------------------
+ /** verifies that aliases for inner queries work as expected
+ */
+ public void checkTableFormattingPersistence() throws java.lang.Exception
+ {
+ CRMDatabase database = new CRMDatabase( getORB() );
+
+ // load the document
+ String docURL = database.getDatabase().getDocumentURL();
+ XComponentLoader loader = (XComponentLoader)UnoRuntime.queryInterface( XComponentLoader.class,
+ getORB().createInstance( "com.sun.star.frame.Desktop" ) );
+ XModel doc = (XModel)UnoRuntime.queryInterface( XModel.class,
+ loader.loadComponentFromURL( docURL, "_blank", 0, new PropertyValue[] {} ) );
+
+ // establish the connection
+ XDatabaseDocumentUI docUI = (XDatabaseDocumentUI)UnoRuntime.queryInterface( XDatabaseDocumentUI.class,
+ doc.getCurrentController() );
+ docUI.connect();
+
+ // display the table
+ XComponent tableViewComp = docUI.loadComponent( com.sun.star.sdb.application.DatabaseObject.TABLE, "customers", false );
+ XFormController tableViewController = (XFormController)UnoRuntime.queryInterface( XFormController.class,
+ tableViewComp );
+ XPropertySet tableControlModel = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class,
+ tableViewController.getCurrentControl().getModel() );
+
+ // change the table's formatting
+ tableControlModel.setPropertyValue( "FontName", "Andale Sans UI" );
+ tableControlModel.setPropertyValue( "FontHeight", new Float( 20 ) );
+ tableControlModel.setPropertyValue( "FontSlant", FontSlant.ITALIC );
+
+ // close the table
+ docUI.closeSubComponents();
+
+ // save and close the database document
+ database.getDatabase().store();
+ database.close();
+
+ // load a copy of the document
+ // normally, it should be sufficient to load the same doc. However, there might be objects in the Java VM
+ // which are not yet freed, and which effectively hold the document alive. More precise: The document (|doc|)
+ // is certainly disposed, but other objects might hold a reference to one of the many other components
+ // around the database document, the data source, the connection, etc. As long as those objects are
+ // not cleaned up, the "database model impl" - the structure holding all document data - will
+ // stay alive, and subsequent requests to load the doc will just reuse it, without really loading it.
+ docURL = copyToTempFile( docURL );
+ doc = (XModel)UnoRuntime.queryInterface( XModel.class,
+ loader.loadComponentFromURL( docURL, "_blank", 0, new PropertyValue[] {} ) );
+
+ docUI = (XDatabaseDocumentUI)UnoRuntime.queryInterface( XDatabaseDocumentUI.class,
+ doc.getCurrentController() );
+ docUI.connect();
+
+ // display the table, again
+ tableViewComp = docUI.loadComponent( com.sun.star.sdb.application.DatabaseObject.TABLE, "customers", false );
+ tableViewController = (XFormController)UnoRuntime.queryInterface( XFormController.class,
+ tableViewComp );
+ tableControlModel = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class,
+ tableViewController.getCurrentControl().getModel() );
+
+ // verify the properties
+ assureEquals( "wrong font name", "Andale Sans UI", (String)tableControlModel.getPropertyValue( "FontName" ) );
+ assureEquals( "wrong font height", (float)20, ((Float)tableControlModel.getPropertyValue( "FontHeight" )).floatValue() );
+ assureEquals( "wrong font slant", FontSlant.ITALIC, (FontSlant)tableControlModel.getPropertyValue( "FontSlant" ) );
+
+ // close the doc
+ docUI.closeSubComponents();
+ XCloseable closeDoc = (XCloseable)UnoRuntime.queryInterface( XCloseable.class,
+ doc );
+ closeDoc.close( true );
+ }
+}
diff --git a/dbaccess/qa/complex/dbaccess/dbaccess.sce b/dbaccess/qa/complex/dbaccess/dbaccess.sce
index b546f6ee7496..9b17f0cd9f84 100644
--- a/dbaccess/qa/complex/dbaccess/dbaccess.sce
+++ b/dbaccess/qa/complex/dbaccess/dbaccess.sce
@@ -7,3 +7,4 @@
-o complex.dbaccess.DataSource
-o complex.dbaccess.Parser
-o complex.dbaccess.ApplicationController
+-o complex.dbaccess.UISettings
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx
index adf9e1b587be..ff93b1fd9e8f 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -29,22 +29,21 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
+
#include "precompiled_dbaccess.hxx"
-#ifndef DBACCESS_CORE_FILTERED_CONTAINER_HXX
+
+#include "dbastrings.hrc"
#include "FilteredContainer.hxx"
-#endif
-#ifndef DBA_CORE_REFRESHLISTENER_HXX
#include "RefreshListener.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
+#include "sdbcoretools.hxx"
+
#include <com/sun/star/sdbc/XRow.hpp>
-#endif
-#ifndef _CONNECTIVITY_DBTOOLS_HXX_
-#include "connectivity/dbtools.hxx"
-#endif
-#ifndef _WLDCRD_HXX
+
+#include <connectivity/dbtools.hxx>
#include <tools/wldcrd.hxx>
-#endif
+#include <tools/diagnose_ex.h>
+
+#include <boost/optional.hpp>
namespace dbaccess
{
@@ -92,6 +91,171 @@ namespace dbaccess
return nShiftPos;
}
+ // -------------------------------------------------------------------------
+ bool lcl_isElementAllowed( const ::rtl::OUString& _rName,
+ const Sequence< ::rtl::OUString >& _rTableFilter,
+ const ::std::vector< WildCard >& _rWCSearch )
+ {
+ sal_Int32 nTableFilterLen = _rTableFilter.getLength();
+
+ const ::rtl::OUString* tableFilter = _rTableFilter.getConstArray();
+ const ::rtl::OUString* tableFilterEnd = _rTableFilter.getConstArray() + nTableFilterLen;
+ bool bFilterMatch = ::std::find( tableFilter, tableFilterEnd, _rName ) != tableFilterEnd;
+ // the table is allowed to "pass" if we had no filters at all or any of the non-wildcard filters matches
+ if (!bFilterMatch && !_rWCSearch.empty())
+ { // or if one of the wildcrad expression matches
+ for ( ::std::vector< WildCard >::const_iterator aLoop = _rWCSearch.begin();
+ aLoop != _rWCSearch.end() && !bFilterMatch;
+ ++aLoop
+ )
+ bFilterMatch = aLoop->Matches( _rName );
+ }
+
+ return bFilterMatch;
+ }
+
+ //--------------------------------------------------------------------------
+ typedef ::boost::optional< ::rtl::OUString > OptionalString;
+ struct TableInfo
+ {
+ OptionalString sComposedName;
+ OptionalString sType;
+ OptionalString sCatalog;
+ OptionalString sSchema;
+ OptionalString sName;
+
+ TableInfo( const ::rtl::OUString& _composedName )
+ :sComposedName( _composedName )
+ {
+ }
+
+ TableInfo( const ::rtl::OUString& _catalog, const ::rtl::OUString& _schema, const ::rtl::OUString& _name,
+ const ::rtl::OUString& _type )
+ :sComposedName()
+ ,sType( _type )
+ ,sCatalog( _catalog )
+ ,sSchema( _schema )
+ ,sName( _name )
+ {
+ }
+ };
+ typedef ::std::vector< TableInfo > TableInfos;
+
+ //--------------------------------------------------------------------------
+ void lcl_ensureComposedName( TableInfo& _io_tableInfo, const Reference< XDatabaseMetaData >& _metaData )
+ {
+ if ( !_metaData.is() )
+ throw RuntimeException();
+
+ if ( !_io_tableInfo.sComposedName )
+ {
+ OSL_ENSURE( !!_io_tableInfo.sCatalog && !!_io_tableInfo.sSchema && !!_io_tableInfo.sName, "lcl_ensureComposedName: How should I composed the name from nothing!?" );
+
+ _io_tableInfo.sComposedName = OptionalString(
+ composeTableName( _metaData, *_io_tableInfo.sCatalog, *_io_tableInfo.sSchema, *_io_tableInfo.sName,
+ sal_False, ::dbtools::eInDataManipulation )
+ );
+ }
+ }
+
+ //--------------------------------------------------------------------------
+ void lcl_ensureType( TableInfo& _io_tableInfo, const Reference< XDatabaseMetaData >& _metaData, const Reference< XNameAccess >& _masterContainer )
+ {
+ if ( !!_io_tableInfo.sType )
+ return;
+
+ lcl_ensureComposedName( _io_tableInfo, _metaData );
+
+ if ( !_masterContainer.is() )
+ throw RuntimeException();
+
+ ::rtl::OUString sTypeName;
+ try
+ {
+ Reference< XPropertySet > xTable( _masterContainer->getByName( *_io_tableInfo.sComposedName ), UNO_QUERY_THROW );
+ OSL_VERIFY( xTable->getPropertyValue( PROPERTY_TYPE ) >>= sTypeName );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ _io_tableInfo.sType = OptionalString( sTypeName );
+ }
+
+ //--------------------------------------------------------------------------
+ connectivity::TStringVector lcl_filter( const TableInfos& _unfilteredTables,
+ const Sequence< ::rtl::OUString >& _tableFilter, const Sequence< ::rtl::OUString >& _tableTypeFilter,
+ const Reference< XDatabaseMetaData >& _metaData, const Reference< XNameAccess >& _masterContainer )
+ {
+ TableInfos aFilteredTables;
+
+ // first, filter for the table names
+ sal_Int32 nTableFilterCount = _tableFilter.getLength();
+ sal_Bool dontFilterTableNames = ( ( nTableFilterCount == 1 ) && _tableFilter[0].equalsAsciiL( "%", 1 ) );
+ if( dontFilterTableNames )
+ {
+ aFilteredTables = _unfilteredTables;
+ }
+ else
+ {
+ // for wildcard search : remove all table filters which are a wildcard expression and build a WilCard
+ // for them
+ ::std::vector< WildCard > aWildCardTableFilter;
+ Sequence< ::rtl::OUString > aNonWildCardTableFilter = _tableFilter;
+ nTableFilterCount = createWildCardVector( aNonWildCardTableFilter, aWildCardTableFilter );
+
+ TableInfos aUnfilteredTables( _unfilteredTables );
+ aUnfilteredTables.reserve( nTableFilterCount + ( aWildCardTableFilter.size() * 10 ) );
+
+ for ( TableInfos::iterator table = aUnfilteredTables.begin();
+ table != aUnfilteredTables.end();
+ ++table
+ )
+ {
+ lcl_ensureComposedName( *table, _metaData );
+
+ if ( lcl_isElementAllowed( *table->sComposedName, aNonWildCardTableFilter, aWildCardTableFilter ) )
+ aFilteredTables.push_back( *table );
+ }
+ }
+
+ // second, filter for the table types
+ sal_Int32 nTableTypeFilterCount = _tableTypeFilter.getLength();
+ sal_Bool dontFilterTableTypes = ( ( nTableTypeFilterCount == 1 ) && _tableTypeFilter[0].equalsAsciiL( "%", 1 ) );
+ dontFilterTableTypes = dontFilterTableTypes || ( nTableTypeFilterCount == 0 );
+ // (for TableTypeFilter, unlike TableFilter, "empty" means "do not filter at all")
+ if ( !dontFilterTableTypes )
+ {
+ TableInfos aUnfilteredTables;
+ aUnfilteredTables.swap( aFilteredTables );
+
+ const ::rtl::OUString* pTableTypeFilterBegin = _tableTypeFilter.getConstArray();
+ const ::rtl::OUString* pTableTypeFilterEnd = pTableTypeFilterBegin + _tableTypeFilter.getLength();
+
+ for ( TableInfos::iterator table = aUnfilteredTables.begin();
+ table != aUnfilteredTables.end();
+ ++table
+ )
+ {
+ // ensure that we know the table type
+ lcl_ensureType( *table, _metaData, _masterContainer );
+
+ if ( ::std::find( pTableTypeFilterBegin, pTableTypeFilterEnd, *table->sType ) != pTableTypeFilterEnd )
+ aFilteredTables.push_back( *table );
+ }
+ }
+
+ connectivity::TStringVector aReturn;
+ for ( TableInfos::iterator table = aFilteredTables.begin();
+ table != aFilteredTables.end();
+ ++table
+ )
+ {
+ lcl_ensureComposedName( *table, _metaData );
+ aReturn.push_back( *table->sComposedName );
+ }
+ return aReturn;
+ }
//==========================================================================
//= OViewContainer
@@ -104,14 +268,15 @@ namespace dbaccess
IWarningsContainer* _pWarningsContainer
,oslInterlockedCount& _nInAppend)
:OCollection(_rParent,_bCase,_rMutex,::std::vector< ::rtl::OUString>())
+ ,m_bConstructed(sal_False)
,m_pWarningsContainer(_pWarningsContainer)
,m_pRefreshListener(_pRefreshListener)
,m_nInAppend(_nInAppend)
,m_xConnection(_xCon)
- ,m_bConstructed(sal_False)
{
}
+
// -------------------------------------------------------------------------
void OFilteredContainer::construct(const Reference< XNameAccess >& _rxMasterContainer,
const Sequence< ::rtl::OUString >& _rTableFilter,
@@ -125,81 +290,40 @@ namespace dbaccess
}
catch(SQLException&)
{
+ DBG_UNHANDLED_EXCEPTION();
}
m_xMasterContainer = _rxMasterContainer;
- if(m_xMasterContainer.is())
+ if ( m_xMasterContainer.is() )
{
addMasterContainerListener();
- sal_Int32 nTableFilterLen = _rTableFilter.getLength();
-
- connectivity::TStringVector aTableNames;
- sal_Bool bNoTableFilters = ((nTableFilterLen == 1) && _rTableFilter[0].equalsAsciiL("%", 1));
- if(!bNoTableFilters)
- {
- Sequence< ::rtl::OUString > aTableFilter = _rTableFilter;
- Sequence< ::rtl::OUString > aTableTypeFilter = _rTableTypeFilter;
-
- // build sorted versions of the filter sequences, so the visibility decision is faster
- ::std::sort( aTableFilter.getArray(), aTableFilter.getArray() + nTableFilterLen );
- // as we want to modify nTableFilterLen, remember this
+ TableInfos aUnfilteredTables;
- // for wildcard search : remove all table filters which are a wildcard expression and build a WilCard
- // for them
- ::std::vector< WildCard > aWCSearch; // contains the wildcards for the table filter
- nTableFilterLen = createWildCardVector(aTableFilter,aWCSearch);
+ Sequence< ::rtl::OUString > aNames = m_xMasterContainer->getElementNames();
+ const ::rtl::OUString* name = aNames.getConstArray();
+ const ::rtl::OUString* nameEnd = name + aNames.getLength();
+ for ( ; name != nameEnd; ++name )
+ aUnfilteredTables.push_back( TableInfo( *name ) );
- aTableNames.reserve(nTableFilterLen + (aWCSearch.size() * 10));
+ reFill( lcl_filter( aUnfilteredTables,
+ _rTableFilter, _rTableTypeFilter, m_xMetaData, m_xMasterContainer ) );
- Sequence< ::rtl::OUString> aNames = m_xMasterContainer->getElementNames();
- const ::rtl::OUString* pBegin = aNames.getConstArray();
- const ::rtl::OUString* pEnd = pBegin + aNames.getLength();
- for(;pBegin != pEnd;++pBegin)
- {
- if(isNameValid(*pBegin,aTableFilter,aTableTypeFilter,aWCSearch))
- aTableNames.push_back(*pBegin);
- }
- }
- else
- {
- // no filter so insert all names
- Sequence< ::rtl::OUString> aNames = m_xMasterContainer->getElementNames();
- const ::rtl::OUString* pBegin = aNames.getConstArray();
- const ::rtl::OUString* pEnd = pBegin + aNames.getLength();
- aTableNames = connectivity::TStringVector(pBegin,pEnd);
- }
- reFill(aTableNames);
m_bConstructed = sal_True;
}
else
{
- construct(_rTableFilter,_rTableTypeFilter);
+ construct( _rTableFilter, _rTableTypeFilter );
}
}
//------------------------------------------------------------------------------
void OFilteredContainer::construct(const Sequence< ::rtl::OUString >& _rTableFilter, const Sequence< ::rtl::OUString >& _rTableTypeFilter)
{
- try
- {
- Reference<XConnection> xCon = m_xConnection;
- if ( xCon.is() )
- m_xMetaData = xCon->getMetaData();
- }
- catch(SQLException&)
- {
- }
// build sorted versions of the filter sequences, so the visibility decision is faster
Sequence< ::rtl::OUString > aTableFilter(_rTableFilter);
sal_Int32 nTableFilterLen = aTableFilter.getLength();
- if (nTableFilterLen)
- ::std::sort( aTableFilter.getArray(), aTableFilter.getArray() + nTableFilterLen );
-
- sal_Bool bNoTableFilters = ((nTableFilterLen == 1) && _rTableFilter[0].equalsAsciiL("%", 1));
- // as we want to modify nTableFilterLen, remember this
-
// for wildcard search : remove all table filters which are a wildcard expression and build a WilCard
// for them
::std::vector< WildCard > aWCSearch;
@@ -207,90 +331,87 @@ namespace dbaccess
try
{
- if (m_xMetaData.is())
+ Reference< XConnection > xCon( m_xConnection, UNO_SET_THROW );
+ m_xMetaData.set( xCon->getMetaData(), UNO_SET_THROW );
+
+ // create a table table filter suitable for the XDatabaseMetaData::getTables call,
+ // taking into account both the externally-provided table type filter, and any
+ // table type restriction which is inherent to the container
+ Sequence< ::rtl::OUString > aTableTypeFilter;
+ ::rtl::OUString sInherentTableTypeRestriction( getTableTypeRestriction() );
+ if ( sInherentTableTypeRestriction.getLength() )
{
- static const ::rtl::OUString sAll = ::rtl::OUString::createFromAscii("%");
- Sequence< ::rtl::OUString > sTableTypes = getTableTypeFilter(_rTableTypeFilter);
- if ( m_bConstructed && sTableTypes.getLength() == 0 )
- return;
-
- Reference< XResultSet > xTables = m_xMetaData->getTables(Any(), sAll, sAll, sTableTypes);
- Reference< XRow > xCurrentRow(xTables, UNO_QUERY);
- if (xCurrentRow.is())
+ if ( _rTableTypeFilter.getLength() != 0 )
{
-
- // after creation the set is positioned before the first record, per definitionem
-
- ::rtl::OUString sCatalog, sSchema, sName, sType;
- ::rtl::OUString sComposedName;
-
- // we first collect the names and construct the OTable objects later, as the ctor of the table may need
- // another result set from the connection, and some drivers support only one statement per connection
-
- sal_Bool bFilterMatch;
- while (xTables->next())
+ const ::rtl::OUString* tableType = _rTableTypeFilter.getConstArray();
+ const ::rtl::OUString* tableTypeEnd = tableType + _rTableTypeFilter.getLength();
+ for ( ; tableType != tableTypeEnd; ++tableType )
{
- sCatalog = xCurrentRow->getString(1);
- sSchema = xCurrentRow->getString(2);
- sName = xCurrentRow->getString(3);
-#if OSL_DEBUG_LEVEL > 0
- ::rtl::OUString sTableType = xCurrentRow->getString(4);
-#endif
- // we're not interested in the "wasNull", as the getStrings would return an empty string in
- // that case, which is sufficient here
-
- sComposedName = composeTableName( m_xMetaData, sCatalog, sSchema, sName, sal_False, ::dbtools::eInDataManipulation );
-
- const ::rtl::OUString* tableFilter = aTableFilter.getConstArray();
- const ::rtl::OUString* tableFilterEnd = aTableFilter.getConstArray() + nTableFilterLen;
- bool composedNameInFilter = ::std::find( tableFilter, tableFilterEnd, sComposedName ) != tableFilterEnd;
-
- bFilterMatch = bNoTableFilters
- || ( ( nTableFilterLen != 0 )
- && composedNameInFilter
- );
-
- // the table is allowed to "pass" if we had no filters at all or any of the non-wildcard filters matches
-
- if (!bFilterMatch && aWCSearch.size())
- { // or if one of the wildcrad expression matches
- for ( ::std::vector< WildCard >::const_iterator aLoop = aWCSearch.begin();
- aLoop != aWCSearch.end() && !bFilterMatch;
- ++aLoop
- )
- bFilterMatch = aLoop->Matches(sComposedName);
- }
-
- if (bFilterMatch)
- { // the table name is allowed (not filtered out)
- insertElement(sComposedName,NULL);
- }
+ if ( *tableType == sInherentTableTypeRestriction )
+ break;
+ }
+ if ( tableType == tableTypeEnd )
+ { // the only table type which can be part of this container is not allowed
+ // by the externally provided table type filter.
+ m_bConstructed = sal_True;
+ return;
}
-
- // dispose the tables result set, in case the connection can handle only one concurrent statement
- // (the table object creation will need it's own statements)
- disposeComponent(xTables);
}
- else
- OSL_ENSURE(0,"OFilteredContainer::construct : did not get a XRow from the tables result set !");
+ aTableTypeFilter.realloc( 1 );
+ aTableTypeFilter[0] = sInherentTableTypeRestriction;
}
else
- OSL_ENSURE(0,"OFilteredContainer::construct : no connection meta data !");
+ {
+ // no container-inherent restriction for the table types
+ if ( _rTableTypeFilter.getLength() == 0 )
+ { // no externally-provided table type filter => use the default filter
+ getAllTableTypeFilter( aTableTypeFilter );
+ }
+ else
+ {
+ aTableTypeFilter = _rTableTypeFilter;
+ }
+ }
+
+ static const ::rtl::OUString sAll = ::rtl::OUString::createFromAscii("%");
+ Reference< XResultSet > xTables = m_xMetaData->getTables( Any(), sAll, sAll, aTableTypeFilter );
+ Reference< XRow > xCurrentRow( xTables, UNO_QUERY_THROW );
+
+ TableInfos aUnfilteredTables;
+
+ ::rtl::OUString sCatalog, sSchema, sName, sType;
+ while ( xTables->next() )
+ {
+ sCatalog = xCurrentRow->getString(1);
+ sSchema = xCurrentRow->getString(2);
+ sName = xCurrentRow->getString(3);
+ sType = xCurrentRow->getString(4);
+
+ aUnfilteredTables.push_back( TableInfo( sCatalog, sSchema, sName, sType ) );
+ }
+
+ reFill( lcl_filter( aUnfilteredTables,
+ _rTableFilter, aTableTypeFilter, m_xMetaData, NULL ) );
+
+ disposeComponent( xTables );
}
- catch (SQLException&)
+ catch (const Exception&)
{
- OSL_ENSURE(0,"OFilteredContainer::construct: caught an SQL-Exception !");
+ DBG_UNHANDLED_EXCEPTION();
disposing();
return;
}
m_bConstructed = sal_True;
}
+
//------------------------------------------------------------------------------
void OFilteredContainer::disposing()
{
OCollection::disposing();
- removeMasterContainerListener();
+
+ if ( m_xMasterContainer.is() )
+ removeMasterContainerListener();
m_xMasterContainer = NULL;
m_xMetaData = NULL;
@@ -310,36 +431,70 @@ namespace dbaccess
m_pRefreshListener->refresh(this);
}
}
- // -------------------------------------------------------------------------
- sal_Bool OFilteredContainer::isNameValid( const ::rtl::OUString& _rName,
- const Sequence< ::rtl::OUString >& _rTableFilter,
- const Sequence< ::rtl::OUString >& /*_rTableTypeFilter*/,
- const ::std::vector< WildCard >& _rWCSearch) const
- {
- sal_Int32 nTableFilterLen = _rTableFilter.getLength();
- const ::rtl::OUString* tableFilter = _rTableFilter.getConstArray();
- const ::rtl::OUString* tableFilterEnd = _rTableFilter.getConstArray() + nTableFilterLen;
- bool bFilterMatch = ::std::find( tableFilter, tableFilterEnd, _rName ) != tableFilterEnd;
- // the table is allowed to "pass" if we had no filters at all or any of the non-wildcard filters matches
- if (!bFilterMatch && !_rWCSearch.empty())
- { // or if one of the wildcrad expression matches
- String sWCCompare = (const sal_Unicode*)_rName;
- for ( ::std::vector< WildCard >::const_iterator aLoop = _rWCSearch.begin();
- aLoop != _rWCSearch.end() && !bFilterMatch;
- ++aLoop
- )
- bFilterMatch = aLoop->Matches(sWCCompare);
- }
-
- return bFilterMatch;
- }
// -----------------------------------------------------------------------------
::rtl::OUString OFilteredContainer::getNameForObject(const ObjectType& _xObject)
{
- OSL_ENSURE(_xObject.is(),"OTables::getNameForObject: Object is NULL!");
+ OSL_ENSURE( _xObject.is(), "OFilteredContainer::getNameForObject: Object is NULL!" );
return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false );
}
+
+ // -----------------------------------------------------------------------------
+ // multiple to obtain all tables from XDatabaseMetaData::getTables, via passing a particular
+ // table type filter:
+ // adhere to the standard, which requests to pass a NULL table type filter, if
+ // you want to retrieve all tables
+ #define FILTER_MODE_STANDARD 0
+ // only pass %, which is not allowed by the standard, but understood by some drivers
+ #define FILTER_MODE_WILDCARD 1
+ // only pass TABLE and VIEW
+ #define FILTER_MODE_FIXED 2
+ // do the thing which showed to be the safest way, understood by nearly all
+ // drivers, even the ones which do not understand the standard
+ #define FILTER_MODE_MIX_ALL 3
+
+ void OFilteredContainer::getAllTableTypeFilter( Sequence< ::rtl::OUString >& /* [out] */ _rFilter ) const
+ {
+ sal_Int32 nFilterMode = FILTER_MODE_MIX_ALL;
+ // for compatibility reasons, this is the default: we used this way before we
+ // introduced the TableTypeFilterMode setting
+
+ // obtain the data source we belong to, and the TableTypeFilterMode setting
+ Any aFilterModeSetting;
+ if ( getDataSourceSetting( getDataSource( (Reference< XInterface >)m_rParent ), "TableTypeFilterMode", aFilterModeSetting ) )
+ {
+ OSL_VERIFY( aFilterModeSetting >>= nFilterMode );
+ }
+
+ const ::rtl::OUString sAll( RTL_CONSTASCII_USTRINGPARAM( "%" ) );
+ const ::rtl::OUString sView( RTL_CONSTASCII_USTRINGPARAM( "VIEW" ) );
+ const ::rtl::OUString sTable( RTL_CONSTASCII_USTRINGPARAM( "TABLE" ) );
+
+ switch ( nFilterMode )
+ {
+ default:
+ OSL_ENSURE( sal_False, "OTableContainer::getAllTableTypeFilter: unknown TableTypeFilterMode!" );
+ case FILTER_MODE_MIX_ALL:
+ _rFilter.realloc( 3 );
+ _rFilter[0] = sView;
+ _rFilter[1] = sTable;
+ _rFilter[2] = sAll;
+ break;
+ case FILTER_MODE_FIXED:
+ _rFilter.realloc( 2 );
+ _rFilter[0] = sView;
+ _rFilter[1] = sTable;
+ break;
+ case FILTER_MODE_WILDCARD:
+ _rFilter.realloc( 1 );
+ _rFilter[0] = sAll;
+ break;
+ case FILTER_MODE_STANDARD:
+ _rFilter.realloc( 0 );
+ break;
+ }
+ }
+
// ..............................................................................
} // namespace
// ..............................................................................
diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx
index 96c20e00584b..269a5aca69ba 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -124,6 +124,9 @@
#ifndef _STRING_HXX
#include <tools/string.hxx>
#endif
+#ifndef TOOLS_DIAGNOSE_EX_H
+#include <tools/diagnose_ex.h>
+#endif
using namespace dbaccess;
using namespace dbtools;
@@ -162,12 +165,6 @@ namespace
OSL_ENSURE( 0, "lcl_isPropertySetDefaulted: Exception caught!" );
}
}
- // the code below doesn't function -> I don't kow why
-// Sequence<PropertyState> aStates = xState->getPropertyStates(_aNames);
-// const PropertyState* pIter = aStates.getConstArray();
-// const PropertyState* pEnd = pIter + aStates.getLength();
-// for( ; pIter != pEnd && *pIter == PropertyState_DEFAULT_VALUE; ++pIter)
-// ;
return ( pIter == pEnd );
}
return sal_False;
@@ -204,45 +201,29 @@ OTableContainer::~OTableContainer()
// -----------------------------------------------------------------------------
void OTableContainer::removeMasterContainerListener()
{
- Reference<XContainer> xCont(m_xMasterContainer,UNO_QUERY);
- if(xCont.is())
- xCont->removeContainerListener(this);
+ try
+ {
+ Reference<XContainer> xCont( m_xMasterContainer, UNO_QUERY_THROW );
+ xCont->removeContainerListener( this );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
+
+// -----------------------------------------------------------------------------
+::rtl::OUString OTableContainer::getTableTypeRestriction() const
+{
+ // no restriction at all (other than the ones provided externally)
+ return ::rtl::OUString();
+}
+
// -----------------------------------------------------------------------------
// XServiceInfo
//------------------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO2(OTableContainer, "com.sun.star.sdb.dbaccess.OTableContainer", SERVICE_SDBCX_CONTAINER, SERVICE_SDBCX_TABLES)
-// -------------------------------------------------------------------------
-sal_Bool OTableContainer::isNameValid( const ::rtl::OUString& _rName,
- const Sequence< ::rtl::OUString >& _rTableFilter,
- const Sequence< ::rtl::OUString >& _rTableTypeFilter,
- const ::std::vector< WildCard >& _rWCSearch) const
-{
- if ( OFilteredContainer::isNameValid(_rName,_rTableFilter,_rTableTypeFilter,_rWCSearch) )
- {// the table name is allowed (not filtered out)
- // no type filter
-
- sal_Int32 nTableTypeFilterLen = _rTableTypeFilter.getLength();
- sal_Bool bNoTableFilters = ((nTableTypeFilterLen == 1) && _rTableTypeFilter[0].equalsAsciiL("%", 1));
-
- if ( bNoTableFilters || !nTableTypeFilterLen )
- return sal_True;
- // this is expensive but there is no other way to get the type of the table
- Reference<XPropertySet> xTable;
- ::cppu::extractInterface(xTable,m_xMasterContainer->getByName(_rName));
- ::rtl::OUString aTypeName;
- xTable->getPropertyValue(PROPERTY_TYPE) >>= aTypeName;
- const ::rtl::OUString* pTypeBegin = _rTableTypeFilter.getConstArray();
- const ::rtl::OUString* pTypeEnd = pTypeBegin + _rTableTypeFilter.getLength();
- for(;pTypeBegin != pTypeEnd;++pTypeBegin)
- {
- if(*pTypeBegin == aTypeName)
- return sal_True; // same as break and then checking
- }
- }
- return sal_False;
-}
// -----------------------------------------------------------------------------
namespace
{
@@ -572,84 +553,18 @@ void SAL_CALL OTableContainer::disposing()
void SAL_CALL OTableContainer::disposing( const ::com::sun::star::lang::EventObject& /*Source*/ ) throw (::com::sun::star::uno::RuntimeException)
{
}
-// -----------------------------------------------------------------------------
-Sequence< ::rtl::OUString > OTableContainer::getTableTypeFilter(const Sequence< ::rtl::OUString >& _rTableTypeFilter) const
-{
- Sequence< ::rtl::OUString > sTableTypes;
- if ( _rTableTypeFilter.getLength() == 0 )
- {
- getAllTableTypeFilter( sTableTypes );
- }
- else
- {
- sTableTypes = _rTableTypeFilter;
- }
- return sTableTypes;
-}
// -----------------------------------------------------------------------------
void OTableContainer::addMasterContainerListener()
{
- // we have to listen at the mastertables because it could happen that another inserts new tables
- Reference<XContainer> xCont(m_xMasterContainer,UNO_QUERY);
- if(xCont.is())
- xCont->addContainerListener(this);
-}
-// -----------------------------------------------------------------------------
-// two ways to obtain all tables from XDatabaseMetaData::getTables, via passing a particular
-// table type filter:
-// adhere to the standard, which requests to pass a NULL table type filter, if
-// you want to retrieve all tables
-#define FILTER_MODE_STANDARD 0
-// only pass %, which is not allowed by the standard, but understood by some drivers
-#define FILTER_MODE_WILDCARD 1
-// only pass TABLE and VIEW
-#define FILTER_MODE_FIXED 2
-// do the thing which showed to be the safest way, understood by nearly all
-// drivers, even the ones which do not understand the standard
-#define FILTER_MODE_MIX_ALL 3
-
-void OTableContainer::getAllTableTypeFilter( Sequence< ::rtl::OUString >& /* [out] */ _rFilter ) const
-{
- sal_Int32 nFilterMode = FILTER_MODE_MIX_ALL;
- // for compatibility reasons, this is the default: we used this way before we
- // introduced the TableTypeFilterMode setting
-
- // obtain the data source we belong to, and the TableTypeFilterMode setting
- Any aFilterModeSetting;
- if ( getDataSourceSetting( getDataSource( (Reference< XInterface >)m_rParent ), "TableTypeFilterMode", aFilterModeSetting ) )
+ try
{
- OSL_VERIFY( aFilterModeSetting >>= nFilterMode );
+ Reference< XContainer > xCont( m_xMasterContainer, UNO_QUERY_THROW );
+ xCont->addContainerListener( this );
}
-
- const ::rtl::OUString sAll( RTL_CONSTASCII_USTRINGPARAM( "%" ) );
- const ::rtl::OUString sView( RTL_CONSTASCII_USTRINGPARAM( "VIEW" ) );
- const ::rtl::OUString sTable( RTL_CONSTASCII_USTRINGPARAM( "TABLE" ) );
-
- switch ( nFilterMode )
+ catch( const Exception& )
{
- default:
- OSL_ENSURE( sal_False, "OTableContainer::getAllTableTypeFilter: unknown TableTypeFilterMode!" );
- case FILTER_MODE_MIX_ALL:
- _rFilter.realloc( 3 );
- _rFilter[0] = sView;
- _rFilter[1] = sTable;
- _rFilter[2] = sAll;
- break;
- case FILTER_MODE_FIXED:
- _rFilter.realloc( 2 );
- _rFilter[0] = sView;
- _rFilter[1] = sTable;
- break;
- case FILTER_MODE_WILDCARD:
- _rFilter.realloc( 1 );
- _rFilter[0] = sAll;
- break;
- case FILTER_MODE_STANDARD:
- _rFilter.realloc( 0 );
- break;
+ DBG_UNHANDLED_EXCEPTION();
}
}
-// -----------------------------------------------------------------------------
-
diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx
index 58641966bb7d..2783c0586f64 100644
--- a/dbaccess/source/core/api/viewcontainer.cxx
+++ b/dbaccess/source/core/api/viewcontainer.cxx
@@ -316,30 +316,8 @@ void SAL_CALL OViewContainer::elementReplaced( const ContainerEvent& /*Event*/ )
{
}
// -----------------------------------------------------------------------------
-Sequence< ::rtl::OUString > OViewContainer::getTableTypeFilter(const Sequence< ::rtl::OUString >& _rTableTypeFilter) const
+::rtl::OUString OViewContainer::getTableTypeRestriction() const
{
- static const ::rtl::OUString s_sTableTypeView(RTL_CONSTASCII_USTRINGPARAM("VIEW"));
-
- if(_rTableTypeFilter.getLength() != 0)
- {
- const ::rtl::OUString* pBegin = _rTableTypeFilter.getConstArray();
- const ::rtl::OUString* pEnd = pBegin + _rTableTypeFilter.getLength();
- for(;pBegin != pEnd;++pBegin)
- {
- if ( *pBegin == s_sTableTypeView )
- break;
- }
- if ( pBegin != pEnd )
- { // view are filtered out
- m_bConstructed = sal_True;
- return Sequence< ::rtl::OUString >();
- }
- }
- // we want all catalogues, all schemas, all tables
- Sequence< ::rtl::OUString > sTableTypes(1);
- sTableTypes[0] = s_sTableTypeView;
- return sTableTypes;
+ // no restriction at all (other than the ones provided externally)
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VIEW" ) );
}
-// -----------------------------------------------------------------------------
-
-
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 0ccdbf8191e5..d78acc83712a 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -417,20 +417,35 @@ void ODatabaseModelImpl::impl_construct_nothrow()
// insert the default settings
Reference< XPropertyContainer > xContainer( m_xSettings, UNO_QUERY_THROW );
+ Reference< XSet > xSettingsSet( m_xSettings, UNO_QUERY_THROW );
const AsciiPropertyValue* pSettings = getDefaultDataSourceSettings();
for ( ; pSettings->AsciiName; ++pSettings )
{
- xContainer->addProperty(
- ::rtl::OUString::createFromAscii( pSettings->AsciiName ),
- PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT,
- pSettings->DefaultValue
- );
+ if ( !pSettings->DefaultValue.hasValue() )
+ {
+ Property aProperty(
+ ::rtl::OUString::createFromAscii( pSettings->AsciiName ),
+ -1,
+ ::getCppuType( static_cast< ::rtl::OUString* >( NULL ) ),
+ PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT | PropertyAttribute::MAYBEVOID
+ );
+ xSettingsSet->insert( makeAny( aProperty ) );
+ }
+ else
+ {
+ xContainer->addProperty(
+ ::rtl::OUString::createFromAscii( pSettings->AsciiName ),
+ PropertyAttribute::BOUND | PropertyAttribute::MAYBEDEFAULT,
+ pSettings->DefaultValue
+ );
+ }
}
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
+ m_pDBContext->appendAtTerminateListener(*this);
}
// -----------------------------------------------------------------------------
@@ -1031,6 +1046,7 @@ oslInterlockedCount SAL_CALL ODatabaseModelImpl::release()
if ( osl_decrementInterlockedCount(&m_refCount) == 0 )
{
acquire(); // prevent multiple releases
+ m_pDBContext->removeFromTerminateListener(*this);
dispose();
m_pDBContext->storeTransientProperties(*this);
revokeDataSource();
@@ -1063,6 +1079,7 @@ const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings()
{
// known JDBC settings
AsciiPropertyValue( "JavaDriverClass", makeAny( ::rtl::OUString() ) ),
+ AsciiPropertyValue( "IgnoreCurrency", makeAny( (sal_Bool)sal_False ) ),
// known settings for file-based drivers
AsciiPropertyValue( "Extension", makeAny( ::rtl::OUString() ) ),
AsciiPropertyValue( "CharSet", makeAny( ::rtl::OUString() ) ),
@@ -1075,6 +1092,7 @@ const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings()
// known ODBC settings
AsciiPropertyValue( "SystemDriverSettings", makeAny( ::rtl::OUString() ) ),
AsciiPropertyValue( "UseCatalog", makeAny( (sal_Bool)sal_False ) ),
+ AsciiPropertyValue( "TypeInfoSettings", makeAny( Sequence< Any >()) ),
// settings related to auto increment handling
AsciiPropertyValue( "AutoIncrementCreation", makeAny( ::rtl::OUString() ) ),
AsciiPropertyValue( "AutoRetrievingStatement", makeAny( ::rtl::OUString() ) ),
@@ -1090,11 +1108,15 @@ const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings()
AsciiPropertyValue( "PortNumber", makeAny( (sal_Int32)389 ) ),
AsciiPropertyValue( "BaseDN", makeAny( ::rtl::OUString() ) ),
AsciiPropertyValue( "MaxRowCount", makeAny( (sal_Int32)100 ) ),
+ // known MySQLNative driver settings
+ AsciiPropertyValue( "LocalSocket", makeAny( ::rtl::OUString() ) ),
// misc known driver settings
AsciiPropertyValue( "ParameterNameSubstitution", makeAny( (sal_Bool)sal_False ) ),
AsciiPropertyValue( "AddIndexAppendix", makeAny( (sal_Bool)sal_True ) ),
- // known SDB level settings
AsciiPropertyValue( "IgnoreDriverPrivileges", makeAny( (sal_Bool)sal_True ) ),
+ AsciiPropertyValue( "ImplicitCatalogRestriction", Any( ) ),
+ AsciiPropertyValue( "ImplicitSchemaRestriction", Any( ) ),
+ // known SDB level settings
AsciiPropertyValue( "NoNameLengthLimit", makeAny( (sal_Bool)sal_False ) ),
AsciiPropertyValue( "AppendTableAliasName", makeAny( (sal_Bool)sal_False ) ),
AsciiPropertyValue( "GenerateASBeforeCorrelationName", makeAny( (sal_Bool)sal_True ) ),
@@ -1109,9 +1131,6 @@ const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings()
AsciiPropertyValue( "PreferDosLikeLineEnds", makeAny( (sal_Bool)sal_False ) ),
AsciiPropertyValue( "FormsCheckRequiredFields", makeAny( (sal_Bool)sal_True ) ),
AsciiPropertyValue( "EscapeDateTime", makeAny( (sal_Bool)sal_True ) ),
- AsciiPropertyValue( "IgnoreCurrency", makeAny( (sal_Bool)sal_False ) ),
- AsciiPropertyValue( "TypeInfoSettings", makeAny( Sequence< Any >()) ),
- AsciiPropertyValue( "LocalSocket", makeAny( ::rtl::OUString() ) ),
AsciiPropertyValue( NULL, Any() )
};
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index f39f601d148f..4eab4145bd9c 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -434,8 +434,9 @@ OConnection::OConnection(ODatabaseSource& _rDB
impl_checkTableQueryNames_nothrow();
}
}
- catch(Exception&)
+ catch(const Exception& )
{
+ DBG_UNHANDLED_EXCEPTION();
}
osl_decrementInterlockedCount( &m_refCount );
}
@@ -621,6 +622,7 @@ void OConnection::refresh(const Reference< XNameAccess >& _rToBeRefreshed)
{
if (!m_pTables->isInitialized())
{
+ // check if our "master connection" can supply tables
getMasterTables();
if (m_xMasterTables.is() && m_xMasterTables->getTables().is())
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 0d5bcb3e7081..9bc92a003c9a 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -44,16 +44,20 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XImporter.hpp>
+#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XModel2.hpp>
+#include <com/sun/star/frame/XTerminateListener.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/registry/InvalidRegistryException.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
#include <com/sun/star/task/InteractionClassification.hpp>
#include <com/sun/star/ucb/InteractiveIOException.hpp>
#include <com/sun/star/ucb/IOErrorCode.hpp>
-#include <com/sun/star/document/MacroExecMode.hpp>
+#include <com/sun/star/util/XCloseable.hpp>
/** === end UNO includes === **/
#include <basic/basmgr.hxx>
@@ -74,6 +78,8 @@
#include <ucbhelper/content.hxx>
#include <unotools/confignode.hxx>
#include <unotools/sharedunocomponent.hxx>
+#include <list>
+#include <boost/bind.hpp>
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdb;
@@ -85,6 +91,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::registry;
+using namespace ::com::sun::star;
using namespace ::cppu;
using namespace ::osl;
using namespace ::utl;
@@ -129,7 +136,83 @@ namespace dbaccess
static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("Location");
return s_sNodeName;
}
+ // -----------------------------------------------------------------------------
}
+ // .............................................................................
+ typedef ::cppu::WeakImplHelper1 < XTerminateListener
+ > DatabaseDocumentLoader_Base;
+ class DatabaseDocumentLoader : public DatabaseDocumentLoader_Base
+ {
+ private:
+ Reference< XDesktop > m_xDesktop;
+ ::std::list< const ODatabaseModelImpl* > m_aDatabaseDocuments;
+
+ public:
+ DatabaseDocumentLoader( const comphelper::ComponentContext& _aContext);
+
+ inline void append(const ODatabaseModelImpl& _rModelImpl )
+ {
+ m_aDatabaseDocuments.push_back(&_rModelImpl);
+ }
+ inline void remove(const ODatabaseModelImpl& _rModelImpl) { m_aDatabaseDocuments.remove(&_rModelImpl); }
+
+ private:
+ // XTerminateListener
+ virtual void SAL_CALL queryTermination( const lang::EventObject& Event ) throw (TerminationVetoException, RuntimeException);
+ virtual void SAL_CALL notifyTermination( const lang::EventObject& Event ) throw (RuntimeException);
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+ };
+
+ // .............................................................................
+ DatabaseDocumentLoader::DatabaseDocumentLoader( const comphelper::ComponentContext& _aContext )
+ {
+ acquire();
+ try
+ {
+ m_xDesktop.set( _aContext.createComponent( (rtl::OUString)SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
+ m_xDesktop->addTerminateListener( this );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ struct TerminateFunctor : ::std::unary_function<ODatabaseModelImpl* , void>
+ {
+ void operator()( const ODatabaseModelImpl* _pModelImpl ) const
+ {
+ try
+ {
+ const Reference< XModel2> xModel( _pModelImpl ->getModel_noCreate(),UNO_QUERY_THROW );
+ if ( !xModel->getControllers()->hasMoreElements() )
+ {
+ Reference<util::XCloseable> xCloseable(xModel,UNO_QUERY_THROW);
+ xCloseable->close(sal_False);
+ } // if ( !xModel->getControllers()->hasMoreElements() )
+ }
+ catch(const CloseVetoException&)
+ {
+ throw TerminationVetoException();
+ }
+ }
+ };
+ // .............................................................................
+ void SAL_CALL DatabaseDocumentLoader::queryTermination( const lang::EventObject& /*Event*/ ) throw (TerminationVetoException, RuntimeException)
+ {
+ ::std::list< const ODatabaseModelImpl* > aCopy(m_aDatabaseDocuments);
+ ::std::for_each(aCopy.begin(),aCopy.end(),TerminateFunctor());
+ }
+
+ // .............................................................................
+ void SAL_CALL DatabaseDocumentLoader::notifyTermination( const lang::EventObject& /*Event*/ ) throw (RuntimeException)
+ {
+ }
+ // .............................................................................
+ void SAL_CALL DatabaseDocumentLoader::disposing( const lang::EventObject& /*Source*/ ) throw (RuntimeException)
+ {
+ }
//= ODatabaseContext
//==========================================================================
@@ -139,6 +222,7 @@ ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxCon
,m_aContext( _rxContext )
,m_aContainerListeners(m_aMutex)
{
+ m_pDatabaseDocumentLoader = new DatabaseDocumentLoader( m_aContext );
::basic::BasicManagerRepository::registerCreationListener( *this );
}
@@ -146,6 +230,8 @@ ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxCon
ODatabaseContext::~ODatabaseContext()
{
::basic::BasicManagerRepository::revokeCreationListener( *this );
+ if ( m_pDatabaseDocumentLoader )
+ m_pDatabaseDocumentLoader->release();
}
// Helper
@@ -348,13 +434,23 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const ::rtl::OUStrin
xModel->attachResource( _sURL, aResource );
::utl::CloseableComponent aEnsureClose( xModel );
- }
+ } // if ( !pExistent.get() )
setTransientProperties( _sURL, *pExistent );
return pExistent->getOrCreateDataSource().get();
}
// -----------------------------------------------------------------------------
+void ODatabaseContext::appendAtTerminateListener(const ODatabaseModelImpl& _rDataSourceModel)
+{
+ m_pDatabaseDocumentLoader->append(_rDataSourceModel);
+}
+// -----------------------------------------------------------------------------
+void ODatabaseContext::removeFromTerminateListener(const ODatabaseModelImpl& _rDataSourceModel)
+{
+ m_pDatabaseDocumentLoader->remove(_rDataSourceModel);
+}
+// -----------------------------------------------------------------------------
void ODatabaseContext::setTransientProperties(const ::rtl::OUString& _sURL, ODatabaseModelImpl& _rDataSourceModel )
{
if ( m_aDatasourceProperties.end() == m_aDatasourceProperties.find(_sURL) )
diff --git a/dbaccess/source/core/dataaccess/databasecontext.hxx b/dbaccess/source/core/dataaccess/databasecontext.hxx
index b164dd644671..f09d54daf3f3 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.hxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.hxx
@@ -98,7 +98,7 @@ namespace com { namespace sun { namespace star {
namespace dbaccess
{
//........................................................................
-
+class DatabaseDocumentLoader;
//============================================================
//= ODatabaseContext
//============================================================
@@ -159,6 +159,7 @@ protected:
// properties.
::cppu::OInterfaceContainerHelper m_aContainerListeners;
+ DatabaseDocumentLoader* m_pDatabaseDocumentLoader;
public:
ODatabaseContext( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& );
@@ -213,6 +214,8 @@ public:
void deregisterPrivate(const ::rtl::OUString& _sName);
void nameChangePrivate(const ::rtl::OUString& _sOldName, const ::rtl::OUString& _sNewName);
void storeTransientProperties( ODatabaseModelImpl& _rModelImpl);
+ void appendAtTerminateListener(const ODatabaseModelImpl& _rDataSourceModel);
+ void removeFromTerminateListener(const ODatabaseModelImpl& _rDataSourceModel);
private:
// BasicManagerCreationListener
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 6ccbb4d03a03..c5b176478ecd 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -162,6 +162,7 @@ ODocumentContainer::ODocumentContainer(const Reference< XMultiServiceFactory >&
ODocumentContainer::~ODocumentContainer()
{
DBG_DTOR(ODocumentContainer, NULL);
+
if ( !OContentHelper::rBHelper.bInDispose && !OContentHelper::rBHelper.bDisposed )
{
acquire();
@@ -262,6 +263,10 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
{
aValue.Value >>= bAsTemplate;
}
+ else
+ {
+ // DBG_ASSERT("unknown property exception");
+ }
}
const ODefinitionContainer_Impl& rDefinitions( getDefinitions() );
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.hxx b/dbaccess/source/core/dataaccess/documentcontainer.hxx
index b5c5a16e0383..c4f4aa24642c 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.hxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.hxx
@@ -77,6 +77,7 @@ class ODocumentContainer : public ODefinitionContainer
, public ::comphelper::OPropertyArrayUsageHelper< ODocumentContainer >
{
sal_Bool m_bFormsContainer;
+
public:
/** constructs the container.<BR>
*/
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 80096ebe427d..c14197110b48 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -254,31 +254,31 @@
#include <com/sun/star/sdb/application/DatabaseObject.hpp>
using namespace ::com::sun::star;
-using namespace ::com::sun::star::view;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::util;
-using namespace ::com::sun::star::ucb;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::embed;
-using namespace ::com::sun::star::frame;
-using namespace ::com::sun::star::document;
-using namespace ::com::sun::star::sdbc;
-using namespace ::com::sun::star::sdb;
-using namespace ::com::sun::star::io;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::datatransfer;
-using namespace ::com::sun::star::task;
-using namespace ::com::sun::star::form;
-using namespace ::com::sun::star::drawing;
+using namespace view;
+using namespace uno;
+using namespace util;
+using namespace ucb;
+using namespace beans;
+using namespace lang;
+using namespace awt;
+using namespace embed;
+using namespace frame;
+using namespace document;
+using namespace sdbc;
+using namespace sdb;
+using namespace io;
+using namespace container;
+using namespace datatransfer;
+using namespace task;
+using namespace form;
+using namespace drawing;
using namespace ::osl;
using namespace ::comphelper;
using namespace ::cppu;
namespace css = ::com::sun::star;
-using ::com::sun::star::sdb::application::XDatabaseDocumentUI;
-namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject;
+using sdb::application::XDatabaseDocumentUI;
+namespace DatabaseObject = sdb::application::DatabaseObject;
#define DEFAULT_WIDTH 10000
@@ -318,7 +318,7 @@ namespace dbaccess
//==================================================================
// OEmbedObjectHolder
//==================================================================
- typedef ::cppu::WeakComponentImplHelper1< ::com::sun::star::embed::XStateChangeListener > TEmbedObjectHolder;
+ typedef ::cppu::WeakComponentImplHelper1< embed::XStateChangeListener > TEmbedObjectHolder;
class OEmbedObjectHolder : public ::comphelper::OBaseMutex
,public TEmbedObjectHolder
{
@@ -344,9 +344,9 @@ namespace dbaccess
osl_decrementInterlockedCount( &m_refCount );
}
- virtual void SAL_CALL changingState( const ::com::sun::star::lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (::com::sun::star::embed::WrongStateException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL stateChanged( const ::com::sun::star::lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL changingState( const lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (embed::WrongStateException, uno::RuntimeException);
+ virtual void SAL_CALL stateChanged( const lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (uno::RuntimeException);
+ virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw (uno::RuntimeException);
};
//------------------------------------------------------------------
void SAL_CALL OEmbedObjectHolder::disposing()
@@ -357,7 +357,7 @@ namespace dbaccess
m_pDefinition = NULL;
}
//------------------------------------------------------------------
- void SAL_CALL OEmbedObjectHolder::changingState( const ::com::sun::star::lang::EventObject& /*aEvent*/, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (::com::sun::star::embed::WrongStateException, ::com::sun::star::uno::RuntimeException)
+ void SAL_CALL OEmbedObjectHolder::changingState( const lang::EventObject& /*aEvent*/, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (embed::WrongStateException, uno::RuntimeException)
{
if ( !m_bInChangingState && nNewState == EmbedStates::RUNNING && nOldState == EmbedStates::ACTIVE && m_pDefinition )
{
@@ -367,7 +367,7 @@ namespace dbaccess
}
}
//------------------------------------------------------------------
- void SAL_CALL OEmbedObjectHolder::stateChanged( const ::com::sun::star::lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (::com::sun::star::uno::RuntimeException)
+ void SAL_CALL OEmbedObjectHolder::stateChanged( const lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (uno::RuntimeException)
{
if ( !m_bInStateChange && nNewState == EmbedStates::RUNNING && nOldState == EmbedStates::ACTIVE && m_pDefinition )
{
@@ -382,7 +382,7 @@ namespace dbaccess
}
}
//------------------------------------------------------------------
- void SAL_CALL OEmbedObjectHolder::disposing( const ::com::sun::star::lang::EventObject& /*Source*/ ) throw (::com::sun::star::uno::RuntimeException)
+ void SAL_CALL OEmbedObjectHolder::disposing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException)
{
m_xBroadCaster = NULL;
}
@@ -405,7 +405,7 @@ namespace dbaccess
{
}
// XComponentSupplier
- virtual Reference< ::com::sun::star::util::XCloseable > SAL_CALL getComponent( ) throw (RuntimeException)
+ virtual Reference< util::XCloseable > SAL_CALL getComponent( ) throw (RuntimeException)
{
return Reference< css::util::XCloseable >();
}
@@ -561,6 +561,7 @@ ODocumentDefinition::ODocumentDefinition(const Reference< XInterface >& _rxConta
,m_bForm(_bForm)
,m_bOpenInDesign(sal_False)
,m_bInExecute(sal_False)
+ ,m_bRemoveListener(sal_False)
,m_pClientHelper(NULL)
{
DBG_CTOR(ODocumentDefinition, NULL);
@@ -568,7 +569,6 @@ ODocumentDefinition::ODocumentDefinition(const Reference< XInterface >& _rxConta
if ( _aClassID.getLength() )
loadEmbeddedObject( _xConnection, _aClassID, Sequence< PropertyValue >(), false, false );
}
-
//--------------------------------------------------------------------------
ODocumentDefinition::~ODocumentDefinition()
{
@@ -617,6 +617,12 @@ void SAL_CALL ODocumentDefinition::disposing()
::osl::MutexGuard aGuard(m_aMutex);
closeObject();
::comphelper::disposeComponent(m_xListener);
+ if ( m_bRemoveListener && m_xDesktop.is() )
+ {
+ Reference<util::XCloseable> xCloseable(m_pImpl->m_pDataSource->getModel_noCreate(),UNO_QUERY);
+ if ( xCloseable.is() )
+ xCloseable->removeCloseListener(this);
+ }
m_xDesktop = NULL;
}
// -----------------------------------------------------------------------------
@@ -745,7 +751,7 @@ namespace
{
private:
Reference< XVisualObject > m_xVisObject;
- ::com::sun::star::awt::Size m_aOriginalSize;
+ awt::Size m_aOriginalSize;
public:
inline PreserveVisualAreaSize( const Reference< XModel >& _rxModel )
@@ -1603,6 +1609,15 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC
if ( !m_xDesktop.is() )
m_xDesktop.set( m_aContext.createComponent( (::rtl::OUString)SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
xParentFrame.set(m_xDesktop,uno::UNO_QUERY);
+ if ( xParentFrame.is() )
+ {
+ Reference<util::XCloseable> xCloseable(m_pImpl->m_pDataSource->getModel_noCreate(),UNO_QUERY);
+ if ( xCloseable.is() )
+ {
+ xCloseable->addCloseListener(this);
+ m_bRemoveListener = sal_True;
+ }
+ }
}
OSL_ENSURE( xParentFrame.is(), "ODocumentDefinition::fillLoadArgs: no parent frame!" );
if ( xParentFrame.is() )
@@ -1633,6 +1648,8 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC
if ( m_pImpl->m_aProps.aTitle.getLength() )
aMediaDesc.put( "DocumentTitle", m_pImpl->m_aProps.aTitle );
+ aMediaDesc.put( "DocumentBaseURL", m_pImpl->m_pDataSource->getURL() );
+
// .........................................................................
// put the common load arguments into the document's media descriptor
lcl_putLoadArgs( aMediaDesc, optional_bool( _bSuppressMacros ), optional_bool( _bReadOnly ) );
@@ -1716,7 +1733,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& _x
m_xEmbeddedObject->changeState(EmbedStates::RUNNING);
if ( bSetSize )
{
- ::com::sun::star::awt::Size aSize( DEFAULT_WIDTH, DEFAULT_HEIGHT );
+ awt::Size aSize( DEFAULT_WIDTH, DEFAULT_HEIGHT );
m_xEmbeddedObject->setVisualAreaSize(Aspects::MSOLE_CONTENT,aSize);
}
@@ -1760,6 +1777,9 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& _x
Sequence< PropertyValue > aArgs = xModel->getArgs();
::comphelper::NamedValueCollection aMediaDesc( aArgs );
+ ::comphelper::NamedValueCollection aArguments( _rAdditionalArgs );
+ aMediaDesc.merge( aArguments, sal_False );
+
lcl_putLoadArgs( aMediaDesc, optional_bool(), optional_bool() );
// don't put _bSuppressMacros and _bReadOnly here - if the document was already
// loaded, we should not tamper with its settings.
@@ -1844,10 +1864,10 @@ void ODocumentDefinition::onCommandGetDocumentProperties( Any& _rProps )
}
}
// -----------------------------------------------------------------------------
-Reference< ::com::sun::star::util::XCloseable> ODocumentDefinition::getComponent() throw (RuntimeException)
+Reference< util::XCloseable> ODocumentDefinition::getComponent() throw (RuntimeException)
{
OSL_ENSURE(m_xEmbeddedObject.is(),"Illegal call for embeddedObject");
- Reference< ::com::sun::star::util::XCloseable> xComp;
+ Reference< util::XCloseable> xComp;
if ( m_xEmbeddedObject.is() )
{
int nOldState = m_xEmbeddedObject->getCurrentState();
@@ -2147,6 +2167,29 @@ void ODocumentDefinition::updateDocumentTitle()
if ( xTitle.is() )
xTitle->setTitle(sName);
}
+// -----------------------------------------------------------------------------
+void SAL_CALL ODocumentDefinition::queryClosing( const lang::EventObject& Source, ::sal_Bool GetsOwnership ) throw (util::CloseVetoException, uno::RuntimeException)
+{
+ (void) Source;
+ (void) GetsOwnership;
+ try
+ {
+ if ( !close() )
+ throw util::CloseVetoException();
+ }
+ catch(const lang::WrappedTargetException&)
+ {
+ throw util::CloseVetoException();
+ }
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL ODocumentDefinition::notifyClosing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException)
+{
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL ODocumentDefinition::disposing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException)
+{
+}
//........................................................................
} // namespace dbaccess
//........................................................................
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.hxx b/dbaccess/source/core/dataaccess/documentdefinition.hxx
index 510d9f30153c..2d8d5f6df343 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.hxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.hxx
@@ -34,8 +34,8 @@
#ifndef _CPPUHELPER_PROPSHLP_HXX
#include <cppuhelper/propshlp.hxx>
#endif
-#ifndef _CPPUHELPER_IMPLBASE2_HXX_
-#include <cppuhelper/implbase2.hxx>
+#ifndef _CPPUHELPER_IMPLBASE3_HXX_
+#include <cppuhelper/implbase3.hxx>
#endif
#ifndef DBA_CONTENTHELPER_HXX
#include "ContentHelper.hxx"
@@ -65,6 +65,7 @@
#include <com/sun/star/embed/XStateChangeListener.hpp>
#endif
#include <com/sun/star/sdb/XSubDocument.hpp>
+#include <com/sun/star/util/XCloseListener.hpp>
//........................................................................
namespace dbaccess
@@ -78,8 +79,9 @@ namespace dbaccess
//= document
//==========================================================================
-typedef ::cppu::ImplHelper2 < ::com::sun::star::embed::XComponentSupplier
+typedef ::cppu::ImplHelper3 < ::com::sun::star::embed::XComponentSupplier
, ::com::sun::star::sdb::XSubDocument
+ , ::com::sun::star::util::XCloseListener
> ODocumentDefinition_Base;
class ODocumentDefinition
@@ -97,6 +99,7 @@ class ODocumentDefinition
sal_Bool m_bForm; // <TRUE/> if it is a form
sal_Bool m_bOpenInDesign;
sal_Bool m_bInExecute;
+ sal_Bool m_bRemoveListener;
OEmbeddedClientHelper* m_pClientHelper;
protected:
@@ -143,6 +146,13 @@ public:
// XRename
virtual void SAL_CALL rename( const ::rtl::OUString& newName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException);
+ // XCloseListener
+ virtual void SAL_CALL queryClosing( const ::com::sun::star::lang::EventObject& Source, ::sal_Bool GetsOwnership ) throw (::com::sun::star::util::CloseVetoException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL notifyClosing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
/** returns the forms/reports container storage, depending on m_bForm. Our own storage
inside this container storage is the one with the name as indicated by m_pImpl->m_aProps.sPersistentName.
*/
diff --git a/dbaccess/source/core/inc/FilteredContainer.hxx b/dbaccess/source/core/inc/FilteredContainer.hxx
index d86277eae596..0fc0974c29eb 100644
--- a/dbaccess/source/core/inc/FilteredContainer.hxx
+++ b/dbaccess/source/core/inc/FilteredContainer.hxx
@@ -30,17 +30,11 @@
#ifndef DBACCESS_CORE_FILTERED_CONTAINER_HXX
#define DBACCESS_CORE_FILTERED_CONTAINER_HXX
-#ifndef _CONNECTIVITY_SDBCX_COLLECTION_HXX_
-#include <connectivity/sdbcx/VCollection.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
#include <com/sun/star/sdbc/XConnection.hpp>
-#endif
-class WildCard;
+#include <connectivity/sdbcx/VCollection.hxx>
+
namespace dbaccess
{
class IWarningsContainer;
@@ -48,6 +42,9 @@ namespace dbaccess
class OFilteredContainer : public ::connectivity::sdbcx::OCollection
{
+ private:
+ mutable sal_Bool m_bConstructed; // late ctor called
+
protected:
IWarningsContainer* m_pWarningsContainer;
IRefreshListener* m_pRefreshListener;
@@ -58,14 +55,10 @@ namespace dbaccess
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XConnection > m_xConnection;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData;
- mutable sal_Bool m_bConstructed; // late ctor called
-
- virtual sal_Bool isNameValid(const ::rtl::OUString& _rName,
- const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rTableFilter,
- const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rTableTypeFilter,
- const ::std::vector< WildCard >& _rWCSearch) const;
-
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > getTableTypeFilter(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rTableTypeFilter) const = 0;
+ /** returns a string denoting the only type of tables allowed in this container, or an empty string
+ if there is no such restriction
+ */
+ virtual ::rtl::OUString getTableTypeRestriction() const = 0;
inline virtual void addMasterContainerListener(){}
inline virtual void removeMasterContainerListener(){}
@@ -97,6 +90,12 @@ namespace dbaccess
private:
oslInterlockedCount& m_rValue;
};
+
+ /** retrieve a table type filter to pass to <member scope="com::sun::star::sdbc">XDatabaseMetaData::getTables</member>,
+ according to the current data source settings
+ */
+ void getAllTableTypeFilter( ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* [out] */ _rFilter ) const;
+
public:
/** ctor of the container. The parent has to support the <type scope="com::sun::star::sdbc">XConnection</type>
interface.<BR>
@@ -108,12 +107,12 @@ namespace dbaccess
@see construct
*/
OFilteredContainer( ::cppu::OWeakObject& _rParent,
- ::osl::Mutex& _rMutex,
- const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xCon,
- sal_Bool _bCase,
- IRefreshListener* _pRefreshListener,
- IWarningsContainer* _pWarningsContainer,
- oslInterlockedCount& _nInAppend
+ ::osl::Mutex& _rMutex,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xCon,
+ sal_Bool _bCase,
+ IRefreshListener* _pRefreshListener,
+ IWarningsContainer* _pWarningsContainer,
+ oslInterlockedCount& _nInAppend
);
inline void dispose() { disposing(); }
diff --git a/dbaccess/source/core/inc/tablecontainer.hxx b/dbaccess/source/core/inc/tablecontainer.hxx
index 3c96a0947cea..1644fc70bec6 100644
--- a/dbaccess/source/core/inc/tablecontainer.hxx
+++ b/dbaccess/source/core/inc/tablecontainer.hxx
@@ -102,7 +102,7 @@ namespace dbaccess
// OFilteredContainer
virtual void addMasterContainerListener();
virtual void removeMasterContainerListener();
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > getTableTypeFilter(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rTableTypeFilter) const;
+ virtual ::rtl::OUString getTableTypeRestriction() const;
// ::connectivity::sdbcx::OCollection
virtual connectivity::sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
@@ -110,17 +110,8 @@ namespace dbaccess
virtual connectivity::sdbcx::ObjectType appendObject( const ::rtl::OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName);
- virtual sal_Bool isNameValid(const ::rtl::OUString& _rName,
- const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rTableFilter,
- const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rTableTypeFilter,
- const ::std::vector< WildCard >& _rWCSearch) const;
virtual void SAL_CALL disposing();
- /** retrieve a table type filter to pass to <member scope="com::sun::star::sdbc">XDatabaseMetaData::getTables</member>,
- according to the current data source settings
- */
- void getAllTableTypeFilter( ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* [out] */ _rFilter ) const;
-
inline virtual void SAL_CALL acquire() throw(){ OFilteredContainer::acquire();}
inline virtual void SAL_CALL release() throw(){ OFilteredContainer::release();}
// ::com::sun::star::lang::XServiceInfo
diff --git a/dbaccess/source/core/inc/viewcontainer.hxx b/dbaccess/source/core/inc/viewcontainer.hxx
index 4ae1dc040ae6..4d339de34837 100644
--- a/dbaccess/source/core/inc/viewcontainer.hxx
+++ b/dbaccess/source/core/inc/viewcontainer.hxx
@@ -108,6 +108,10 @@ namespace dbaccess
virtual ~OViewContainer();
+ protected:
+ // OFilteredContainer overridables
+ virtual ::rtl::OUString getTableTypeRestriction() const;
+
private:
inline virtual void SAL_CALL acquire() throw(){ OFilteredContainer::acquire();}
inline virtual void SAL_CALL release() throw(){ OFilteredContainer::release();}
@@ -121,7 +125,6 @@ namespace dbaccess
virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > getTableTypeFilter(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rTableTypeFilter) const;
// ::connectivity::sdbcx::OCollection
virtual ::connectivity::sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
diff --git a/dbaccess/source/ext/macromigration/macromigration.src b/dbaccess/source/ext/macromigration/macromigration.src
index e92afa82f978..bb49ac7ad287 100644
--- a/dbaccess/source/ext/macromigration/macromigration.src
+++ b/dbaccess/source/ext/macromigration/macromigration.src
@@ -162,8 +162,6 @@ TabPage TP_SAVE_DBDOC_AS
Border = TRUE;
DropDown = TRUE ;
-
- Text = "/home/user/databases/database.backup.odb";
};
PushButton PB_BROWSE_SAVE_AS_LOCATION
diff --git a/dbaccess/source/filter/xml/xmlColumn.cxx b/dbaccess/source/filter/xml/xmlColumn.cxx
index 3405f137a28d..c9670d98317a 100644
--- a/dbaccess/source/filter/xml/xmlColumn.cxx
+++ b/dbaccess/source/filter/xml/xmlColumn.cxx
@@ -66,6 +66,7 @@
#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
#include <com/sun/star/container/XNameContainer.hpp>
#endif
+#include <com/sun/star/container/XChild.hpp>
#ifndef DBA_XMLSTYLEIMPORT_HXX
#include "xmlStyleImport.hxx"
#endif
@@ -87,9 +88,11 @@ OXMLColumn::OXMLColumn( ODBFilter& rImport
,const ::rtl::OUString& _sLocalName
,const Reference< XAttributeList > & _xAttrList
,const Reference< XNameAccess >& _xParentContainer
+ ,const Reference< XPropertySet >& _xTable
) :
SvXMLImportContext( rImport, nPrfx, _sLocalName )
,m_xParentContainer(_xParentContainer)
+ ,m_xTable(_xTable)
,m_bHidden(sal_False)
{
DBG_CTOR(OXMLColumn,NULL);
@@ -132,9 +135,11 @@ OXMLColumn::OXMLColumn( ODBFilter& rImport
case XML_TOK_COLUMN_VISIBLE:
m_bHidden = sValue.equalsAscii("false");
break;
+ case XML_TOK_DEFAULT_CELL_STYLE_NAME:
+ m_sCellStyleName = sValue;
+ break;
}
}
- OSL_ENSURE(m_sName.getLength(),"Invalid column name of length: ZERO");
}
// -----------------------------------------------------------------------------
@@ -160,6 +165,11 @@ void OXMLColumn::EndElement()
if ( m_aDefaultValue.hasValue() )
xProp->setPropertyValue(PROPERTY_CONTROLDEFAULT,m_aDefaultValue);
+ Reference<XAppend> xAppend(m_xParentContainer,UNO_QUERY);
+ if ( xAppend.is() )
+ xAppend->appendByDescriptor(xProp);
+ m_xParentContainer->getByName(m_sName) >>= xProp;
+
if ( m_sStyleName.getLength() )
{
const SvXMLStylesContext* pAutoStyles = GetOwnImport().GetAutoStyles();
@@ -171,10 +181,35 @@ void OXMLColumn::EndElement()
pAutoStyle->FillPropertySet(xProp);
}
}
+ } // if ( m_sStyleName.getLength() )
+ if ( m_sCellStyleName.getLength() )
+ {
+ const SvXMLStylesContext* pAutoStyles = GetOwnImport().GetAutoStyles();
+ if ( pAutoStyles )
+ {
+ OTableStyleContext* pAutoStyle = PTR_CAST(OTableStyleContext,pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_CELL,m_sCellStyleName));
+ if ( pAutoStyle )
+ {
+ pAutoStyle->FillPropertySet(xProp);
+ // we also have to do this on the table to import text-properties
+ pAutoStyle->FillPropertySet(m_xTable);
+ }
+ }
+ }
+
+ }
+ } // if ( xFac.is() && m_sName.getLength() )
+ else if ( m_sCellStyleName.getLength() )
+ {
+ const SvXMLStylesContext* pAutoStyles = GetOwnImport().GetAutoStyles();
+ if ( pAutoStyles )
+ {
+ OTableStyleContext* pAutoStyle = PTR_CAST(OTableStyleContext,pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_CELL,m_sCellStyleName));
+ if ( pAutoStyle )
+ {
+ // we also have to do this on the table to import text-properties
+ pAutoStyle->FillPropertySet(m_xTable);
}
- Reference<XAppend> xAppend(m_xParentContainer,UNO_QUERY);
- if ( xAppend.is() )
- xAppend->appendByDescriptor(xProp);
}
}
}
diff --git a/dbaccess/source/filter/xml/xmlColumn.hxx b/dbaccess/source/filter/xml/xmlColumn.hxx
index af436a3cc54e..bab8d7660120 100644
--- a/dbaccess/source/filter/xml/xmlColumn.hxx
+++ b/dbaccess/source/filter/xml/xmlColumn.hxx
@@ -30,13 +30,9 @@
#ifndef DBA_XMLCOLUMN_HXX
#define DBA_XMLCOLUMN_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
-
+#include <com/sun/star/beans/XPropertySet.hpp>
namespace dbaxml
{
@@ -44,8 +40,11 @@ namespace dbaxml
class OXMLColumn : public SvXMLImportContext
{
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xParentContainer;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xTable;
+
::rtl::OUString m_sName;
::rtl::OUString m_sStyleName;
+ ::rtl::OUString m_sCellStyleName;
::rtl::OUString m_sHelpMessage;
::com::sun::star::uno::Any m_aDefaultValue;
sal_Bool m_bHidden;
@@ -58,6 +57,7 @@ namespace dbaxml
,const ::rtl::OUString& rLName
,const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList
,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xParentContainer
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xTable
);
virtual ~OXMLColumn();
virtual void EndElement();
diff --git a/dbaccess/source/filter/xml/xmlDataSource.cxx b/dbaccess/source/filter/xml/xmlDataSource.cxx
index 169ebdb2ab65..5ec715764073 100644
--- a/dbaccess/source/filter/xml/xmlDataSource.cxx
+++ b/dbaccess/source/filter/xml/xmlDataSource.cxx
@@ -82,9 +82,8 @@ DBG_NAME(OXMLDataSource)
OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
sal_uInt16 nPrfx, const ::rtl::OUString& _sLocalName,
- const Reference< XAttributeList > & _xAttrList,bool _bAsDataSource ) :
+ const Reference< XAttributeList > & _xAttrList, const UsedFor _eUsedFor ) :
SvXMLImportContext( rImport, nPrfx, _sLocalName )
- ,m_bAsDataSource(_bAsDataSource)
{
DBG_CTOR(OXMLDataSource,NULL);
@@ -95,7 +94,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
Reference<XPropertySet> xDataSource = rImport.getDataSource();
PropertyValue aProperty;
- bool bParameter_name_substitution = false;
+ bool bFoundParamNameSubstitution = false;
bool bFoundTableNameLengthLimited = false;
bool bFoundAppendTableAliasName = false;
bool bFoundSuppressVersionColumns = false;
@@ -169,7 +168,7 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
case XML_TOK_PARAMETER_NAME_SUBSTITUTION:
aProperty.Name = INFO_PARAMETERNAMESUBST;
aProperty.Value <<= (sValue == s_sTRUE ? sal_True : sal_False);
- bParameter_name_substitution = true;
+ bFoundParamNameSubstitution = true;
break;
case XML_TOK_IGNORE_DRIVER_PRIVILEGES:
aProperty.Name = INFO_IGNOREDRIVER_PRIV;
@@ -207,25 +206,25 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport,
}
if ( rImport.isNewFormat() )
{
- if ( !bFoundTableNameLengthLimited )
+ if ( !bFoundTableNameLengthLimited && ( _eUsedFor == eAppSettings ) )
{
aProperty.Name = INFO_ALLOWLONGTABLENAMES;
aProperty.Value <<= sal_True;
rImport.addInfo(aProperty);
}
- if ( !bParameter_name_substitution )
+ if ( !bFoundParamNameSubstitution && ( _eUsedFor == eDriverSettings ) )
{
aProperty.Name = INFO_PARAMETERNAMESUBST;
aProperty.Value <<= sal_True;
rImport.addInfo(aProperty);
}
- if ( !bFoundAppendTableAliasName )
+ if ( !bFoundAppendTableAliasName && ( _eUsedFor == eAppSettings ) )
{
aProperty.Name = INFO_APPEND_TABLE_ALIAS;
aProperty.Value <<= sal_True;
rImport.addInfo(aProperty);
}
- if ( !bFoundSuppressVersionColumns )
+ if ( !bFoundSuppressVersionColumns && ( _eUsedFor == eAppSettings ) )
{
try
{
@@ -285,7 +284,7 @@ SvXMLImportContext* OXMLDataSource::CreateChildContext(
break;
case XML_TOK_DRIVER_SETTINGS:
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
- pContext = new OXMLDataSource( GetOwnImport(), nPrefix, rLocalName, xAttrList,false);
+ pContext = new OXMLDataSource( GetOwnImport(), nPrefix, rLocalName, xAttrList, OXMLDataSource::eDriverSettings );
break;
case XML_TOK_JAVA_CLASSPATH:
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
@@ -293,7 +292,7 @@ SvXMLImportContext* OXMLDataSource::CreateChildContext(
break;
case XML_TOK_APPLICATION_CONNECTION_SETTINGS:
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
- pContext = new OXMLDataSource( GetOwnImport(), nPrefix, rLocalName, xAttrList,false);
+ pContext = new OXMLDataSource( GetOwnImport(), nPrefix, rLocalName, xAttrList, OXMLDataSource::eAppSettings );
break;
}
diff --git a/dbaccess/source/filter/xml/xmlDataSource.hxx b/dbaccess/source/filter/xml/xmlDataSource.hxx
index e5b73a8c3056..5475efc67b07 100644
--- a/dbaccess/source/filter/xml/xmlDataSource.hxx
+++ b/dbaccess/source/filter/xml/xmlDataSource.hxx
@@ -43,15 +43,19 @@ namespace dbaxml
class ODBFilter;
class OXMLDataSource : public SvXMLImportContext
{
- bool m_bAsDataSource;
-
ODBFilter& GetOwnImport();
public:
+ enum UsedFor
+ {
+ eDataSource,
+ eDriverSettings,
+ eAppSettings
+ };
OXMLDataSource( ODBFilter& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
- bool _bAsDataSource = true);
+ const UsedFor _eUsedFor = eDataSource );
virtual ~OXMLDataSource();
virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
diff --git a/dbaccess/source/filter/xml/xmlDatabase.cxx b/dbaccess/source/filter/xml/xmlDatabase.cxx
index c75625fcfbe9..3f3f183ba038 100644
--- a/dbaccess/source/filter/xml/xmlDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlDatabase.cxx
@@ -106,7 +106,7 @@ SvXMLImportContext* OXMLDatabase::CreateChildContext(
{
case XML_TOK_DATASOURCE:
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
- pContext = new OXMLDataSource( GetOwnImport(), nPrefix, rLocalName,xAttrList );
+ pContext = new OXMLDataSource( GetOwnImport(), nPrefix, rLocalName, xAttrList, OXMLDataSource::eDataSource );
break;
case XML_TOK_FORMS:
{
diff --git a/dbaccess/source/filter/xml/xmlEnums.hxx b/dbaccess/source/filter/xml/xmlEnums.hxx
index 7e4321e9f7cf..0bb680eca477 100644
--- a/dbaccess/source/filter/xml/xmlEnums.hxx
+++ b/dbaccess/source/filter/xml/xmlEnums.hxx
@@ -166,7 +166,8 @@ namespace dbaxml
XML_TOK_COLUMN_VISIBILITY,
XML_TOK_COLUMN_DEFAULT_VALUE,
XML_TOK_COLUMN_TYPE_NAME,
- XML_TOK_COLUMN_VISIBLE
+ XML_TOK_COLUMN_VISIBLE,
+ XML_TOK_DEFAULT_CELL_STYLE_NAME
};
// -----------------------------------------------------------------------------
} // namespace dbaxml
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index decfe6ac1b4e..efd744df1428 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -88,9 +88,9 @@
#ifndef _COM_SUN_STAR_SDB_XQUERYDEFINITIONSSUPPLIER_HPP_
#include <com/sun/star/sdb/XQueryDefinitionsSupplier.hpp>
#endif
-#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
-#endif
+#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
+
#ifndef _COM_SUN_STAR_AWT_TEXTALIGN_HPP_
#include <com/sun/star/awt/TextAlign.hpp>
#endif
@@ -107,6 +107,8 @@
#include <svtools/pathoptions.hxx>
#include <tools/diagnose_ex.h>
+#include <boost/optional.hpp>
+
namespace dbaxml
{
using namespace comphelper;
@@ -222,6 +224,7 @@ namespace dbaxml
return s_sTypeInteger;
default:
+ OSL_ENSURE( false, "lcl_implGetPropertyXMLType: unsupported value type!" );
return s_sTypeDouble;
}
}
@@ -318,19 +321,17 @@ IMPLEMENT_SERVICE_INFO1_STATIC( ODBExport, "com.sun.star.comp.sdb.DBExportFilter
// -----------------------------------------------------------------------------
void ODBExport::exportDataSource()
{
- Reference<XPropertySet> xProp(getDataSource());
- if ( xProp.is() )
+ try
{
+ Reference<XPropertySet> xProp( getDataSource(), UNO_SET_THROW );
+
sal_Bool bAutoIncrementEnabled = sal_True;
TStringPair aAutoIncrement;
Reference< XPropertySet > xDataSourceSettings;
OSL_VERIFY( xProp->getPropertyValue( PROPERTY_SETTINGS ) >>= xDataSourceSettings );
- Reference< XPropertyState > xSettingsState( xDataSourceSettings, UNO_QUERY );
- Reference< XPropertySetInfo > xSettingsInfo;
- if ( xDataSourceSettings.is() )
- xSettingsInfo = xDataSourceSettings->getPropertySetInfo();
- OSL_ENSURE( xSettingsState.is() && xSettingsInfo.is(), "ODBExport::exportDataSource: invalid Setting property of the data source!" );
+ Reference< XPropertyState > xSettingsState( xDataSourceSettings, UNO_QUERY_THROW );
+ Reference< XPropertySetInfo > xSettingsInfo( xDataSourceSettings->getPropertySetInfo(), UNO_SET_THROW );
TDelimiter aDelimiter;
xSettingsState->getPropertyDefault( INFO_TEXTDELIMITER ) >>= aDelimiter.sText;
@@ -339,6 +340,7 @@ void ODBExport::exportDataSource()
xSettingsState->getPropertyDefault( INFO_THOUSANDSDELIMITER ) >>= aDelimiter.sThousand;
static ::rtl::OUString s_sTrue(::xmloff::token::GetXMLToken( XML_TRUE ));
+ static ::rtl::OUString s_sFalse(::xmloff::token::GetXMLToken( XML_FALSE ));
// loop through the properties, and export only those which are not defaulted
TSettingsMap aSettingsMap;
Sequence< Property > aProperties = xSettingsInfo->getProperties();
@@ -346,14 +348,6 @@ void ODBExport::exportDataSource()
const Property* pPropertiesEnd = pProperties + aProperties.getLength();
for ( ; pProperties != pPropertiesEnd; ++pProperties )
{
- // for properties which are not REMOVEABLE, we care for their state, and
- // only export them if they're not DEFAULTed
- if ( ( pProperties->Attributes & PropertyAttribute::REMOVEABLE ) == 0 )
- {
- PropertyState ePropertyState = xSettingsState->getPropertyState( pProperties->Name );
- if ( PropertyState_DEFAULT_VALUE == ePropertyState )
- continue;
- }
::rtl::OUString sValue;
Any aValue = xDataSourceSettings->getPropertyValue( pProperties->Name );
switch ( aValue.getValueTypeClass() )
@@ -379,146 +373,144 @@ void ODBExport::exportDataSource()
}
::xmloff::token::XMLTokenEnum eToken = XML_TOKEN_INVALID;
- if ( pProperties->Name == INFO_JDBCDRIVERCLASS )
- eToken = XML_JAVA_DRIVER_CLASS;
- else if ( pProperties->Name == INFO_TEXTFILEHEADER )
+
+ struct PropertyMap
{
- if ( sValue == s_sTrue )
- continue;
- eToken = XML_IS_FIRST_ROW_HEADER_LINE;
- }
- else if ( pProperties->Name == INFO_SHOWDELETEDROWS )
+ const ::rtl::OUString sPropertyName;
+ const XMLTokenEnum eAttributeToken;
+ const ::boost::optional< ::rtl::OUString > aXMLDefault;
+
+ PropertyMap( const ::rtl::OUString& _rPropertyName, const XMLTokenEnum _eToken )
+ :sPropertyName( _rPropertyName )
+ ,eAttributeToken( _eToken )
+ ,aXMLDefault()
+ {
+ }
+
+ PropertyMap( const ::rtl::OUString& _rPropertyName, const XMLTokenEnum _eToken, const ::rtl::OUString& _rDefault )
+ :sPropertyName( _rPropertyName )
+ ,eAttributeToken( _eToken )
+ ,aXMLDefault( _rDefault )
+ {
+ }
+ };
+
+ PropertyMap aTokens[] =
{
- if ( sValue != s_sTrue )
- continue;
- eToken = XML_SHOW_DELETED;
- }
- else if ( pProperties->Name == INFO_ALLOWLONGTABLENAMES )
+ PropertyMap( INFO_JDBCDRIVERCLASS, XML_JAVA_DRIVER_CLASS ),
+ PropertyMap( INFO_TEXTFILEHEADER, XML_IS_FIRST_ROW_HEADER_LINE, s_sTrue ),
+ PropertyMap( INFO_SHOWDELETEDROWS, XML_SHOW_DELETED, s_sFalse ),
+ PropertyMap( INFO_ALLOWLONGTABLENAMES, XML_IS_TABLE_NAME_LENGTH_LIMITED, s_sTrue ),
+ PropertyMap( INFO_ADDITIONALOPTIONS, XML_SYSTEM_DRIVER_SETTINGS ),
+ PropertyMap( PROPERTY_ENABLESQL92CHECK, XML_ENABLE_SQL92_CHECK, s_sFalse ),
+ PropertyMap( INFO_APPEND_TABLE_ALIAS, XML_APPEND_TABLE_ALIAS_NAME, s_sTrue ),
+ PropertyMap( INFO_PARAMETERNAMESUBST, XML_PARAMETER_NAME_SUBSTITUTION, s_sTrue ),
+ PropertyMap( INFO_IGNOREDRIVER_PRIV, XML_IGNORE_DRIVER_PRIVILEGES, s_sTrue ),
+ PropertyMap( INFO_USECATALOG, XML_USE_CATALOG, s_sFalse ),
+ PropertyMap( PROPERTY_SUPPRESSVERSIONCL,XML_SUPPRESS_VERSION_COLUMNS, s_sTrue ),
+ PropertyMap( INFO_CONN_LDAP_BASEDN, XML_BASE_DN ),
+ PropertyMap( INFO_CONN_LDAP_ROWCOUNT, XML_MAX_ROW_COUNT )
+ };
+
+ bool bIsXMLDefault = false;
+ for ( size_t i=0; i < sizeof( aTokens ) / sizeof( aTokens[0] ); ++i )
{
- if ( sValue == s_sTrue )
- continue;
- eToken = XML_IS_TABLE_NAME_LENGTH_LIMITED;
+ if ( pProperties->Name == aTokens[i].sPropertyName )
+ {
+ eToken = aTokens[i].eAttributeToken;
+
+ if ( !!aTokens[i].aXMLDefault
+ && ( sValue == *aTokens[i].aXMLDefault )
+ )
+ {
+ bIsXMLDefault = true;
+ }
+ break;
+ }
}
- else if ( pProperties->Name == INFO_ADDITIONALOPTIONS )
- eToken = XML_SYSTEM_DRIVER_SETTINGS;
- else if ( pProperties->Name == PROPERTY_ENABLESQL92CHECK )
+
+ if ( bIsXMLDefault )
+ // the property has the value which is specified as default in the XML schema -> no need to write it
+ continue;
+
+ if ( eToken == XML_TOKEN_INVALID )
{
- if ( sValue != s_sTrue )
+ // for properties which are not REMOVEABLE, we care for their state, and
+ // only export them if they're not DEFAULTed
+ if ( ( pProperties->Attributes & PropertyAttribute::REMOVEABLE ) == 0 )
+ {
+ PropertyState ePropertyState = xSettingsState->getPropertyState( pProperties->Name );
+ if ( PropertyState_DEFAULT_VALUE == ePropertyState )
+ continue;
+ }
+
+ // special handlings
+ if ( pProperties->Name == PROPERTY_BOOLEANCOMPARISONMODE )
+ {
+ sal_Int32 nValue = 0;
+ aValue >>= nValue;
+ if ( sValue.equalsAscii("0") )
+ sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("equal-integer"));
+ else if ( sValue.equalsAscii("1") )
+ sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("is-boolean"));
+ else if ( sValue.equalsAscii("2") )
+ sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("equal-boolean"));
+ else if ( sValue.equalsAscii("3") )
+ sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("equal-use-only-zero"));
+ if ( sValue.equalsAscii("equal-integer") )
+ continue;
+ eToken = XML_BOOLEAN_COMPARISON_MODE;
+ }
+ else if ( pProperties->Name == INFO_AUTORETRIEVEENABLED )
+ {
+ aValue >>= bAutoIncrementEnabled;
continue;
- eToken = XML_ENABLE_SQL92_CHECK;
- }
- else if ( pProperties->Name == INFO_APPEND_TABLE_ALIAS )
- {
- if ( sValue == s_sTrue )
+ }
+ else if ( pProperties->Name == INFO_AUTORETRIEVEVALUE )
+ {
+ aAutoIncrement.first = sValue;
continue;
- eToken = XML_APPEND_TABLE_ALIAS_NAME;
- }
- else if ( pProperties->Name == INFO_PARAMETERNAMESUBST )
- {
- if ( sValue == s_sTrue )
+ }
+ else if ( pProperties->Name == PROPERTY_AUTOINCREMENTCREATION )
+ {
+ aAutoIncrement.second = sValue;
continue;
- eToken = XML_PARAMETER_NAME_SUBSTITUTION;
- }
- else if ( pProperties->Name == INFO_IGNOREDRIVER_PRIV )
- {
- if ( sValue == s_sTrue )
+ }
+ else if ( pProperties->Name == INFO_TEXTDELIMITER )
+ {
+ aDelimiter.sText = sValue;
+ aDelimiter.bUsed = true;
continue;
- eToken = XML_IGNORE_DRIVER_PRIVILEGES;
- }
- else if ( pProperties->Name == PROPERTY_BOOLEANCOMPARISONMODE )
- {
- sal_Int32 nValue = 0;
- aValue >>= nValue;
- if ( sValue.equalsAscii("0") )
- sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("equal-integer"));
- else if ( sValue.equalsAscii("1") )
- sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("is-boolean"));
- else if ( sValue.equalsAscii("2") )
- sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("equal-boolean"));
- else if ( sValue.equalsAscii("3") )
- sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("equal-use-only-zero"));
- if ( sValue.equalsAscii("equal-integer") )
+ }
+ else if ( pProperties->Name == INFO_FIELDDELIMITER )
+ {
+ aDelimiter.sField = sValue;
+ aDelimiter.bUsed = true;
continue;
- eToken = XML_BOOLEAN_COMPARISON_MODE;
- }
- else if ( pProperties->Name == INFO_USECATALOG )
- {
- if ( sValue != s_sTrue )
+ }
+ else if ( pProperties->Name == INFO_DECIMALDELIMITER )
+ {
+ aDelimiter.sDecimal = sValue;
+ aDelimiter.bUsed = true;
continue;
- eToken = XML_USE_CATALOG;
- }
- else if ( pProperties->Name == PROPERTY_SUPPRESSVERSIONCL )
- {
- if ( sValue == s_sTrue )
+ }
+ else if ( pProperties->Name == INFO_THOUSANDSDELIMITER )
+ {
+ aDelimiter.sThousand = sValue;
+ aDelimiter.bUsed = true;
continue;
- eToken = XML_SUPPRESS_VERSION_COLUMNS;
- }
- else if ( pProperties->Name == INFO_CONN_LDAP_BASEDN )
- eToken = XML_BASE_DN;
- else if ( pProperties->Name == INFO_CONN_LDAP_ROWCOUNT )
- eToken = XML_MAX_ROW_COUNT;
- else if ( pProperties->Name == INFO_AUTORETRIEVEENABLED )
- {
- aValue >>= bAutoIncrementEnabled;
- // special handling
- continue;
- }
- else if ( pProperties->Name == INFO_AUTORETRIEVEVALUE )
- {
- aAutoIncrement.first = sValue;
- // special handling
- continue;
- }
- else if ( pProperties->Name == PROPERTY_AUTOINCREMENTCREATION )
- {
- aAutoIncrement.second = sValue;
- // special handling
- continue;
- }
- else if ( pProperties->Name == INFO_TEXTDELIMITER )
- {
- aDelimiter.sText = sValue;
- aDelimiter.bUsed = true;
- // special handling
- continue;
- }
- else if ( pProperties->Name == INFO_FIELDDELIMITER )
- {
- aDelimiter.sField = sValue;
- aDelimiter.bUsed = true;
- // special handling
- continue;
- }
- else if ( pProperties->Name == INFO_DECIMALDELIMITER )
- {
- aDelimiter.sDecimal = sValue;
- aDelimiter.bUsed = true;
- // special handling
- continue;
- }
- else if ( pProperties->Name == INFO_THOUSANDSDELIMITER )
- {
- aDelimiter.sThousand = sValue;
- aDelimiter.bUsed = true;
- // special handling
- continue;
- }
- else if ( pProperties->Name == INFO_CHARSET )
- {
- m_sCharSet = sValue;
- // special handling
- continue;
- }
- else
- {
- m_aDataSourceSettings.push_back( makeAny( PropertyValue(
- pProperties->Name,
- -1,
- aValue,
- PropertyState_DIRECT_VALUE
- ) ) );
- // special handling
- continue;
+ }
+ else if ( pProperties->Name == INFO_CHARSET )
+ {
+ m_sCharSet = sValue;
+ continue;
+ }
+ else
+ {
+ m_aDataSourceSettings.push_back( TypedPropertyValue(
+ pProperties->Name, pProperties->Type, aValue ) );
+ continue;
+ }
}
aSettingsMap.insert(TSettingsMap::value_type(eToken,sValue));
@@ -534,6 +526,10 @@ void ODBExport::exportDataSource()
exportDriverSettings(aSettingsMap);
exportApplicationConnectionSettings(aSettingsMap);
}
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
}
// -----------------------------------------------------------------------------
void ODBExport::exportApplicationConnectionSettings(const TSettingsMap& _aSettings)
@@ -700,84 +696,83 @@ void ODBExport::exportConnectionData()
// -----------------------------------------------------------------------------
void ODBExport::exportDataSourceSettings()
{
- if ( !m_aDataSourceSettings.empty() )
+ if ( m_aDataSourceSettings.empty() )
+ return;
+
+ SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTINGS, sal_True, sal_True);
+ ::std::vector< TypedPropertyValue >::iterator aIter = m_aDataSourceSettings.begin();
+ ::std::vector< TypedPropertyValue >::iterator aEnd = m_aDataSourceSettings.end();
+ for ( ; aIter != aEnd; ++aIter )
{
- SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTINGS, sal_True, sal_True);
- PropertyValue aValue;
- ::std::vector< Any>::iterator aIter = m_aDataSourceSettings.begin();
- ::std::vector< Any>::iterator aEnd = m_aDataSourceSettings.end();
- for (; aIter != aEnd; ++aIter)
- {
- *aIter >>= aValue;
- sal_Bool bIsSequence = TypeClass_SEQUENCE == aValue.Value.getValueTypeClass();
+ sal_Bool bIsSequence = TypeClass_SEQUENCE == aIter->Type.getTypeClass();
- Type aSimpleType;
- if ( bIsSequence )
- aSimpleType = ::comphelper::getSequenceElementType(aValue.Value.getValueType());
- else
- aSimpleType = aValue.Value.getValueType();
+ Type aSimpleType;
+ if ( bIsSequence )
+ aSimpleType = ::comphelper::getSequenceElementType( aIter->Value.getValueType() );
+ else
+ aSimpleType = aIter->Type;
- AddAttribute(XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_IS_LIST,bIsSequence ? XML_TRUE : XML_FALSE);
- AddAttribute(XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_NAME,aValue.Name);
- ::rtl::OUString sTypeName = lcl_implGetPropertyXMLType(aSimpleType);
- if ( bIsSequence && aSimpleType.getTypeClass() == TypeClass_ANY )
- {
- Sequence<Any> aSeq;
- aValue.Value >>= aSeq;
- if ( aSeq.getLength() )
- sTypeName = lcl_implGetPropertyXMLType(aSeq[0].getValueType());
- }
+ AddAttribute( XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_IS_LIST,bIsSequence ? XML_TRUE : XML_FALSE );
+ AddAttribute( XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_NAME, aIter->Name );
- AddAttribute(XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_TYPE,sTypeName);
+ ::rtl::OUString sTypeName = lcl_implGetPropertyXMLType( aSimpleType );
+ if ( bIsSequence && aSimpleType.getTypeClass() == TypeClass_ANY )
+ {
+ Sequence<Any> aSeq;
+ aIter->Value >>= aSeq;
+ if ( aSeq.getLength() )
+ sTypeName = lcl_implGetPropertyXMLType(aSeq[0].getValueType());
+ }
- SvXMLElementExport aDataSourceSetting(*this,XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING, sal_True, sal_True);
+ AddAttribute( XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_TYPE, sTypeName );
- if ( !bIsSequence )
+ SvXMLElementExport aDataSourceSetting( *this, XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING, sal_True, sal_True );
+
+ if ( !bIsSequence )
+ {
+ SvXMLElementExport aDataValue( *this, XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_VALUE, sal_True, sal_False );
+ // (no whitespace inside the tag)
+ Characters( implConvertAny( aIter->Value ) );
+ }
+ else
+ {
+ // the not-that-simple case, we need to iterate through the sequence elements
+ ::std::auto_ptr<IIterator> pSequenceIterator;
+ switch (aSimpleType.getTypeClass())
{
- SvXMLElementExport aDataValue(*this,XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_VALUE, sal_True, sal_False);
- // (no whitespace inside the tag)
- Characters(implConvertAny(aValue.Value));
+ case TypeClass_STRING:
+ pSequenceIterator.reset( new OSequenceIterator< ::rtl::OUString >( aIter->Value ) );
+ break;
+ case TypeClass_DOUBLE:
+ pSequenceIterator.reset( new OSequenceIterator< double >( aIter->Value ) );
+ break;
+ case TypeClass_BOOLEAN:
+ pSequenceIterator.reset( new OSequenceIterator< sal_Bool >( aIter->Value ) );
+ break;
+ case TypeClass_BYTE:
+ pSequenceIterator.reset( new OSequenceIterator< sal_Int8 >( aIter->Value ) );
+ break;
+ case TypeClass_SHORT:
+ pSequenceIterator.reset( new OSequenceIterator< sal_Int16 >( aIter->Value ) );
+ break;
+ case TypeClass_LONG:
+ pSequenceIterator.reset( new OSequenceIterator< sal_Int32 >( aIter->Value ) );
+ break;
+ case TypeClass_ANY:
+ pSequenceIterator.reset( new OSequenceIterator< Any >( aIter->Value ) );
+ break;
+ default:
+ OSL_ENSURE(sal_False, "unsupported sequence type !");
+ break;
}
- else
+ if ( pSequenceIterator.get() )
{
- // the not-that-simple case, we need to iterate through the sequence elements
- ::std::auto_ptr<IIterator> pSequenceIterator;
- switch (aSimpleType.getTypeClass())
+ ::rtl::OUString sCurrent;
+ while (pSequenceIterator->hasMoreElements())
{
- case TypeClass_STRING:
- pSequenceIterator.reset(new OSequenceIterator< ::rtl::OUString >(aValue.Value));
- break;
- case TypeClass_DOUBLE:
- pSequenceIterator.reset(new OSequenceIterator< double >(aValue.Value));
- break;
- case TypeClass_BOOLEAN:
- pSequenceIterator.reset(new OSequenceIterator< sal_Bool >(aValue.Value));
- break;
- case TypeClass_BYTE:
- pSequenceIterator.reset(new OSequenceIterator< sal_Int8 >(aValue.Value));
- break;
- case TypeClass_SHORT:
- pSequenceIterator.reset(new OSequenceIterator< sal_Int16 >(aValue.Value));
- break;
- case TypeClass_LONG:
- pSequenceIterator.reset(new OSequenceIterator< sal_Int32 >(aValue.Value));
- break;
- case TypeClass_ANY:
- pSequenceIterator.reset(new OSequenceIterator< Any >(aValue.Value));
- break;
- default:
- OSL_ENSURE(sal_False, "unsupported sequence type !");
- break;
- }
- if ( pSequenceIterator.get() )
- {
- ::rtl::OUString sCurrent;
- while (pSequenceIterator->hasMoreElements())
- {
- SvXMLElementExport aDataValue(*this,XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_VALUE, sal_True, sal_False);
- // (no whitespace inside the tag)
- Characters(implConvertAny(pSequenceIterator->nextElement()));
- }
+ SvXMLElementExport aDataValue(*this,XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTING_VALUE, sal_True, sal_False);
+ // (no whitespace inside the tag)
+ Characters(implConvertAny(pSequenceIterator->nextElement()));
}
}
}
@@ -1015,7 +1010,21 @@ void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup)
{
Reference<XNameAccess> xNameAccess( _xColSup->getColumns(), UNO_SET_THROW );
if ( !xNameAccess->hasElements() )
+ {
+ Reference< XPropertySet > xComponent(_xColSup,UNO_QUERY);
+ TTableColumnMap::iterator aFind = m_aTableDummyColumns.find(xComponent);
+ if ( aFind != m_aTableDummyColumns.end() )
+ {
+ SvXMLElementExport aColumns(*this,XML_NAMESPACE_DB, XML_COLUMNS, sal_True, sal_True);
+ SvXMLAttributeList* pAtt = new SvXMLAttributeList;
+ Reference<XAttributeList> xAtt = pAtt;
+ exportStyleName(aFind->second.get(),*pAtt);
+ AddAttributeList(xAtt);
+ SvXMLElementExport aColumn(*this,XML_NAMESPACE_DB, XML_COLUMN, sal_True, sal_True);
+
+ }
return;
+ }
SvXMLElementExport aColumns(*this,XML_NAMESPACE_DB, XML_COLUMNS, sal_True, sal_True);
Sequence< ::rtl::OUString> aSeq = xNameAccess->getElementNames();
@@ -1166,8 +1175,21 @@ void ODBExport::exportAutoStyle(XPropertySet* _xProp)
GetFontAutoStylePool()->Add(aFont.Name,aFont.StyleName,aFont.Family,aFont.Pitch,aFont.CharSet );
m_aCurrentPropertyStates = m_xCellExportHelper->Filter(_xProp);
- ::comphelper::mem_fun1_t<ODBExport,XPropertySet* > aMemFunc(&ODBExport::exportAutoStyle);
- exportCollection(xCollection,XML_TOKEN_INVALID,XML_TOKEN_INVALID,sal_False,aMemFunc);
+ if ( !m_aCurrentPropertyStates.empty() && !xCollection->hasElements() )
+ {
+ Reference< XDataDescriptorFactory> xFac(xCollection,UNO_QUERY);
+ if ( xFac.is() )
+ {
+ Reference< XPropertySet> xColumn = xFac->createDataDescriptor();
+ m_aTableDummyColumns.insert(TTableColumnMap::value_type(Reference< XPropertySet>(_xProp),xColumn));
+ exportAutoStyle(xColumn.get());
+ }
+ }
+ else
+ {
+ ::comphelper::mem_fun1_t<ODBExport,XPropertySet* > aMemFunc(&ODBExport::exportAutoStyle);
+ exportCollection(xCollection,XML_TOKEN_INVALID,XML_TOKEN_INVALID,sal_False,aMemFunc);
+ }
}
catch(Exception&)
{
diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx
index e11f9b244cfd..ae10a9a20709 100644
--- a/dbaccess/source/filter/xml/xmlExport.hxx
+++ b/dbaccess/source/filter/xml/xmlExport.hxx
@@ -130,15 +130,31 @@ class ODBExport : public SvXMLExport
TDelimiter() : bUsed( false ) { }
};
- typedef ::std::map< Reference<XPropertySet> ,::rtl::OUString > TPropertyStyleMap;
+ typedef ::std::map< Reference<XPropertySet> ,::rtl::OUString > TPropertyStyleMap;
+ typedef ::std::map< Reference<XPropertySet> ,Reference<XPropertySet> > TTableColumnMap;
+
+ struct TypedPropertyValue
+ {
+ ::rtl::OUString Name;
+ ::com::sun::star::uno::Type Type;
+ ::com::sun::star::uno::Any Value;
+
+ TypedPropertyValue( const ::rtl::OUString& _name, const ::com::sun::star::uno::Type& _type, const ::com::sun::star::uno::Any& _value )
+ :Name( _name )
+ ,Type( _type )
+ ,Value( _value )
+ {
+ }
+ };
::std::auto_ptr< TStringPair > m_aAutoIncrement;
::std::auto_ptr< TDelimiter > m_aDelimiter;
- ::std::vector< Any> m_aDataSourceSettings;
+ ::std::vector< TypedPropertyValue > m_aDataSourceSettings;
::std::vector< XMLPropertyState > m_aCurrentPropertyStates;
TPropertyStyleMap m_aAutoStyleNames;
TPropertyStyleMap m_aCellAutoStyleNames;
TPropertyStyleMap m_aRowAutoStyleNames;
+ TTableColumnMap m_aTableDummyColumns;
::rtl::OUString m_sCharSet;
UniReference < SvXMLExportPropertyMapper> m_xExportHelper;
UniReference < SvXMLExportPropertyMapper> m_xColumnExportHelper;
diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
index 03487a1d9060..892b50bd610f 100644
--- a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
+++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
@@ -146,9 +146,11 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport
,sal_uInt16 nPrfx
,const ::rtl::OUString& _sLocalName
,const Reference< XNameAccess >& _xContainer
+ ,const Reference< XPropertySet >& _xTable
) :
SvXMLImportContext( rImport, nPrfx, _sLocalName )
,m_xContainer(_xContainer)
+ ,m_xTable(_xTable)
{
DBG_CTOR(OXMLHierarchyCollection,NULL);
}
@@ -179,7 +181,7 @@ SvXMLImportContext* OXMLHierarchyCollection::CreateChildContext(
break;
case XML_TOK_COLUMN:
GetOwnImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
- pContext = new OXMLColumn( GetOwnImport(), nPrefix, rLocalName,xAttrList,m_xContainer);
+ pContext = new OXMLColumn( GetOwnImport(), nPrefix, rLocalName,xAttrList,m_xContainer,m_xTable);
break;
// case XML_TOK_QUERY_COLLECTION:
case XML_TOK_COMPONENT_COLLECTION:
diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx
index 35c93809a67d..23eb19d1a57c 100644
--- a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx
+++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx
@@ -30,15 +30,10 @@
#ifndef DBA_XMLHIERARCHYCOLLECTION_HXX
#define DBA_XMLHIERARCHYCOLLECTION_HXX
-#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
-#endif
-#ifndef DBA_XMLENUMS_HXX
#include "xmlEnums.hxx"
-#endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
#include <com/sun/star/container/XNameAccess.hpp>
-#endif
+#include <com/sun/star/beans/XPropertySet.hpp>
namespace dbaxml
@@ -48,6 +43,7 @@ namespace dbaxml
{
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xParentContainer;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xContainer;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xTable;
::rtl::OUString m_sName;
::rtl::OUString m_sCollectionServiceName;
::rtl::OUString m_sComponentServiceName;
@@ -67,6 +63,7 @@ namespace dbaxml
,sal_uInt16 nPrfx
,const ::rtl::OUString& rLName
,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xContainer
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xTable
);
virtual ~OXMLHierarchyCollection();
diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx
index 35bf7934cc44..a373bb4c79c8 100644
--- a/dbaccess/source/filter/xml/xmlStyleImport.cxx
+++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx
@@ -214,8 +214,9 @@ OTableStylesContext::OTableStylesContext( SvXMLImport& rImport,
const Reference< XAttributeList > & xAttrList,
const sal_Bool bTempAutoStyles ) :
SvXMLStylesContext( rImport, nPrfx, rLName, xAttrList ),
- sColumnStyleServiceName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME ))),
sTableStyleServiceName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME ))),
+ sColumnStyleServiceName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME ))),
+ sCellStyleServiceName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME ))),
m_nNumberFormatIndex(-1),
bAutoStyles(bTempAutoStyles)
{
@@ -251,6 +252,13 @@ UniReference < SvXMLImportPropertyMapper >
{
switch( nFamily )
{
+ case XML_STYLE_FAMILY_TABLE_TABLE:
+ {
+ if ( !m_xTableImpPropMapper.is() )
+ m_xTableImpPropMapper = new SvXMLImportPropertyMapper( const_cast<OTableStylesContext*>(this)->GetOwnImport().GetTableStylesPropertySetMapper(), const_cast<SvXMLImport&>(GetImport()) );
+ xMapper = m_xTableImpPropMapper;
+ }
+ break;
case XML_STYLE_FAMILY_TABLE_COLUMN:
{
if ( !m_xColumnImpPropMapper.is() )
@@ -258,11 +266,11 @@ UniReference < SvXMLImportPropertyMapper >
xMapper = m_xColumnImpPropMapper;
}
break;
- case XML_STYLE_FAMILY_TABLE_TABLE:
+ case XML_STYLE_FAMILY_TABLE_CELL:
{
- if ( !m_xTableImpPropMapper.is() )
- m_xTableImpPropMapper = new SvXMLImportPropertyMapper( const_cast<OTableStylesContext*>(this)->GetOwnImport().GetTableStylesPropertySetMapper(), const_cast<SvXMLImport&>(GetImport()) );
- xMapper = m_xTableImpPropMapper;
+ if ( !m_xCellImpPropMapper.is() )
+ m_xCellImpPropMapper = new SvXMLImportPropertyMapper( const_cast<OTableStylesContext*>(this)->GetOwnImport().GetCellStylesPropertySetMapper(), const_cast<SvXMLImport&>(GetImport()) );
+ xMapper = m_xCellImpPropMapper;
}
break;
}
@@ -282,8 +290,9 @@ SvXMLStyleContext *OTableStylesContext::CreateStyleStyleChildContext(
{
switch( nFamily )
{
- case XML_STYLE_FAMILY_TABLE_COLUMN:
case XML_STYLE_FAMILY_TABLE_TABLE:
+ case XML_STYLE_FAMILY_TABLE_COLUMN:
+ case XML_STYLE_FAMILY_TABLE_CELL:
pStyle = new OTableStyleContext( GetOwnImport(), nPrefix, rLocalName,
xAttrList, *this, nFamily );
break;
@@ -308,12 +317,16 @@ Reference < XNameContainer >
{
switch( nFamily )
{
+ case XML_STYLE_FAMILY_TABLE_TABLE:
+ sServiceName = sTableStyleServiceName;
+ break;
case XML_STYLE_FAMILY_TABLE_COLUMN:
sServiceName = sColumnStyleServiceName;
break;
- case XML_STYLE_FAMILY_TABLE_TABLE:
- sServiceName = sTableStyleServiceName;
+ case XML_STYLE_FAMILY_TABLE_CELL:
+ sServiceName = sCellStyleServiceName;
break;
+
}
}
return sServiceName;
diff --git a/dbaccess/source/filter/xml/xmlStyleImport.hxx b/dbaccess/source/filter/xml/xmlStyleImport.hxx
index e8dfe4eedac6..95be65774e6d 100644
--- a/dbaccess/source/filter/xml/xmlStyleImport.hxx
+++ b/dbaccess/source/filter/xml/xmlStyleImport.hxx
@@ -111,14 +111,16 @@ namespace dbaxml
class OTableStylesContext : public SvXMLStylesContext
{
- const ::rtl::OUString sColumnStyleServiceName;
const ::rtl::OUString sTableStyleServiceName;
+ const ::rtl::OUString sColumnStyleServiceName;
+ const ::rtl::OUString sCellStyleServiceName;
sal_Int32 m_nNumberFormatIndex;
sal_Int32 nMasterPageNameIndex;
sal_Bool bAutoStyles : 1;
- mutable UniReference < SvXMLImportPropertyMapper > m_xColumnImpPropMapper;
mutable UniReference < SvXMLImportPropertyMapper > m_xTableImpPropMapper;
+ mutable UniReference < SvXMLImportPropertyMapper > m_xColumnImpPropMapper;
+ mutable UniReference < SvXMLImportPropertyMapper > m_xCellImpPropMapper;
ODBFilter& GetOwnImport();
diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx
index fb85eecbb91a..86f4304b6eb5 100644
--- a/dbaccess/source/filter/xml/xmlTable.cxx
+++ b/dbaccess/source/filter/xml/xmlTable.cxx
@@ -184,7 +184,7 @@ SvXMLImportContext* OXMLTable::CreateChildContext(
{
xColumns = xColumnsSup->getColumns();
}
- pContext = new OXMLHierarchyCollection( GetOwnImport(), nPrefix, rLocalName ,xColumns);
+ pContext = new OXMLHierarchyCollection( GetOwnImport(), nPrefix, rLocalName ,xColumns,m_xTable);
}
break;
}
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 128ad71ffc21..5e9374dcce77 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -753,13 +753,14 @@ const SvXMLTokenMap& ODBFilter::GetColumnElemTokenMap() const
{
static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
{
- { XML_NAMESPACE_DB, XML_NAME, XML_TOK_COLUMN_NAME },
- { XML_NAMESPACE_DB, XML_STYLE_NAME, XML_TOK_COLUMN_STYLE_NAME },
- { XML_NAMESPACE_DB, XML_HELP_MESSAGE, XML_TOK_COLUMN_HELP_MESSAGE },
- { XML_NAMESPACE_DB, XML_VISIBILITY, XML_TOK_COLUMN_VISIBILITY },
- { XML_NAMESPACE_DB, XML_DEFAULT_VALUE, XML_TOK_COLUMN_DEFAULT_VALUE},
- { XML_NAMESPACE_DB, XML_TYPE_NAME, XML_TOK_COLUMN_TYPE_NAME },
- { XML_NAMESPACE_DB, XML_VISIBLE, XML_TOK_COLUMN_VISIBLE },
+ { XML_NAMESPACE_DB, XML_NAME, XML_TOK_COLUMN_NAME },
+ { XML_NAMESPACE_DB, XML_STYLE_NAME, XML_TOK_COLUMN_STYLE_NAME },
+ { XML_NAMESPACE_DB, XML_HELP_MESSAGE, XML_TOK_COLUMN_HELP_MESSAGE },
+ { XML_NAMESPACE_DB, XML_VISIBILITY, XML_TOK_COLUMN_VISIBILITY },
+ { XML_NAMESPACE_DB, XML_DEFAULT_VALUE, XML_TOK_COLUMN_DEFAULT_VALUE },
+ { XML_NAMESPACE_DB, XML_TYPE_NAME, XML_TOK_COLUMN_TYPE_NAME },
+ { XML_NAMESPACE_DB, XML_VISIBLE, XML_TOK_COLUMN_VISIBLE },
+ { XML_NAMESPACE_DB, XML_DEFAULT_CELL_STYLE_NAME, XML_TOK_DEFAULT_CELL_STYLE_NAME },
XML_TOKEN_MAP_END
};
m_pColumnElemTokenMap.reset(new SvXMLTokenMap( aElemTokenMap ));
@@ -807,6 +808,15 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetColumnStylesPropertySetMappe
return m_xColumnStylesPropertySetMapper;
}
// -----------------------------------------------------------------------------
+UniReference < XMLPropertySetMapper > ODBFilter::GetCellStylesPropertySetMapper() const
+{
+ if ( !m_xCellStylesPropertySetMapper.is() )
+ {
+ m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylesPropertySetMapper();
+ }
+ return m_xCellStylesPropertySetMapper;
+}
+// -----------------------------------------------------------------------------
void ODBFilter::setPropertyInfo()
{
Reference<XPropertySet> xDataSource(getDataSource());
diff --git a/dbaccess/source/filter/xml/xmlfilter.hxx b/dbaccess/source/filter/xml/xmlfilter.hxx
index 4805e242055d..744770305469 100644
--- a/dbaccess/source/filter/xml/xmlfilter.hxx
+++ b/dbaccess/source/filter/xml/xmlfilter.hxx
@@ -129,6 +129,7 @@ private:
mutable UniReference < XMLPropertySetMapper > m_xTableStylesPropertySetMapper;
mutable UniReference < XMLPropertySetMapper > m_xColumnStylesPropertySetMapper;
+ mutable UniReference < XMLPropertySetMapper > m_xCellStylesPropertySetMapper;
Reference<XPropertySet> m_xDataSource;
sal_Int32 m_nPreviewMode;
bool m_bNewFormat;
@@ -188,6 +189,7 @@ public:
UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const;
UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const;
+ UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const;
/** add a Info to the sequence which will be appened to the data source
@param _rInfo The property to append.
diff --git a/dbaccess/source/inc/stringconstants.hrc b/dbaccess/source/inc/stringconstants.hrc
index af9b3e879d74..6a58ba1ddd0d 100644
--- a/dbaccess/source/inc/stringconstants.hrc
+++ b/dbaccess/source/inc/stringconstants.hrc
@@ -421,6 +421,7 @@ DECLARE_CONSTASCII_USTRING(INFO_CONN_LDAP_BASEDN);
DECLARE_CONSTASCII_USTRING(INFO_CONN_LDAP_ROWCOUNT);
DECLARE_CONSTASCII_USTRING(INFO_PREVIEW);
DECLARE_CONSTASCII_USTRING(INFO_MEDIATYPE);
+DECLARE_CONSTASCII_USTRING(INFO_ESCAPE_DATETIME);
// other
DECLARE_CONSTASCII_USTRING(INFO_POOLURL);
diff --git a/dbaccess/source/inc/stringconstants.inc b/dbaccess/source/inc/stringconstants.inc
index b8ede15d1d55..8803d0e0edc7 100644
--- a/dbaccess/source/inc/stringconstants.inc
+++ b/dbaccess/source/inc/stringconstants.inc
@@ -265,6 +265,7 @@ IMPLEMENT_CONSTASCII_USTRING(INFO_CONN_LDAP_BASEDN,"BaseDN");
IMPLEMENT_CONSTASCII_USTRING(INFO_CONN_LDAP_ROWCOUNT,"MaxRowCount");
IMPLEMENT_CONSTASCII_USTRING(INFO_PREVIEW,"Preview");
IMPLEMENT_CONSTASCII_USTRING(INFO_MEDIATYPE,"MediaType");
+IMPLEMENT_CONSTASCII_USTRING(INFO_ESCAPE_DATETIME,"EscapeDateTime");
// other
IMPLEMENT_CONSTASCII_USTRING(INFO_POOLURL,"PoolURL");
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 1f6be558f551..21716791864d 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -2000,11 +2000,11 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const
if ( !aArguments.has( (::rtl::OUString)PROPERTY_SHOWMENU ) )
aArguments.put( (::rtl::OUString)PROPERTY_SHOWMENU, makeAny( (sal_Bool)sal_True ) );
- aDataSource <<= getDatabaseName();
+ aDataSource <<= getDatabaseName();
}
- Reference< XComponent > xComponent( pDesigner->openExisting( aDataSource, _sName, aArguments.getPropertyValues() ), UNO_QUERY );
- onDocumentOpened( _sName, _eType, _eOpenMode, xComponent, NULL );
+ xRet.set( pDesigner->openExisting( aDataSource, _sName, aArguments.getPropertyValues() ) );
+ onDocumentOpened( _sName, _eType, _eOpenMode, xRet, NULL );
}
}
break;
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 989ceacdc1f0..c532c0d45fe7 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -876,7 +876,6 @@ void OApplicationController::getSupportedFormats(ElementType _eType,::std::vecto
_rFormatIds.push_back(SOT_FORMATSTR_ID_DBACCESS_TABLE);
_rFormatIds.push_back(SOT_FORMAT_RTF);
_rFormatIds.push_back(SOT_FORMATSTR_ID_HTML);
- _rFormatIds.push_back(SOT_FORMATSTR_ID_HTML_SIMPLE);
// run through
case E_QUERY:
_rFormatIds.push_back(SOT_FORMATSTR_ID_DBACCESS_QUERY);
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index f4c7a4eca31d..50e357b687b8 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -181,6 +181,7 @@ using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star;
+using ::com::sun::star::awt::XTabController;
namespace dbaui
{
@@ -1299,18 +1300,18 @@ void OAppDetailPageHelper::showPreview( const ::rtl::OUString& _sDataSourceName,
aArgs[3].Name = PROPERTY_SHOWMENU;
aArgs[3].Value <<= sal_False;
- Reference<XFrame> xFrame( pDispatcher->openExisting( makeAny( _sDataSourceName ), _sName, aArgs ), UNO_QUERY );
- sal_Bool bClearPreview = !xFrame.is();
+ Reference< XController > xPreview( pDispatcher->openExisting( makeAny( _sDataSourceName ), _sName, aArgs ), UNO_QUERY );
+ sal_Bool bClearPreview = !xPreview.is();
// clear the preview when the query or table could not be loaded
if ( !bClearPreview )
{
- Reference<awt::XTabController> xController(xFrame->getController(),UNO_QUERY);
- bClearPreview = !xController.is();
+ Reference< XTabController > xTabController( xPreview, UNO_QUERY );
+ bClearPreview = !xTabController.is();
if ( !bClearPreview )
{
- Reference<XLoadable> xLoadable(xController->getModel(),UNO_QUERY);
- bClearPreview = !(xLoadable.is() && xLoadable->isLoaded());
+ Reference< XLoadable > xLoadable( xTabController->getModel(), UNO_QUERY );
+ bClearPreview = !( xLoadable.is() && xLoadable->isLoaded() );
}
}
if ( bClearPreview )
diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx
index 513cb9485f4c..5a6f11ebf840 100644
--- a/dbaccess/source/ui/browser/dbexchange.cxx
+++ b/dbaccess/source/ui/browser/dbexchange.cxx
@@ -164,7 +164,7 @@ namespace dbaui
// -----------------------------------------------------------------------------
sal_Bool ODataClipboard::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& /*rFlavor*/ )
{
- if (nUserObjectId == SOT_FORMAT_RTF || nUserObjectId == SOT_FORMATSTR_ID_HTML || nUserObjectId == SOT_FORMATSTR_ID_HTML_SIMPLE)
+ if (nUserObjectId == SOT_FORMAT_RTF || nUserObjectId == SOT_FORMATSTR_ID_HTML )
{
ODatabaseImportExport* pExport = reinterpret_cast<ODatabaseImportExport*>(pUserObject);
if ( pExport && rxOStm.Is() )
@@ -185,10 +185,7 @@ namespace dbaui
// HTML?
if (m_pHtml)
- {
AddFormat(SOT_FORMATSTR_ID_HTML);
- AddFormat(SOT_FORMATSTR_ID_HTML_SIMPLE);
- }
ODataAccessObjectTransferable::AddSupportedFormats();
}
@@ -196,8 +193,7 @@ namespace dbaui
// -----------------------------------------------------------------------------
sal_Bool ODataClipboard::GetData( const DataFlavor& rFlavor )
{
- ULONG nFormat = SotExchange::GetFormat(rFlavor);
- sal_uInt32 nHtml = SOT_FORMATSTR_ID_HTML_SIMPLE;
+ const ULONG nFormat = SotExchange::GetFormat(rFlavor);
switch (nFormat)
{
case SOT_FORMAT_RTF:
@@ -205,12 +201,9 @@ namespace dbaui
m_pRtf->initialize(getDescriptor());
return m_pRtf && SetObject(m_pRtf, SOT_FORMAT_RTF, rFlavor);
case SOT_FORMATSTR_ID_HTML:
- nHtml = SOT_FORMATSTR_ID_HTML;
- // run through
- case SOT_FORMATSTR_ID_HTML_SIMPLE:
if ( m_pHtml )
m_pHtml->initialize(getDescriptor());
- return m_pHtml && SetObject(m_pHtml, nHtml, rFlavor);
+ return m_pHtml && SetObject(m_pHtml, SOT_FORMATSTR_ID_HTML, rFlavor);
}
return ODataAccessObjectTransferable::GetData( rFlavor );
@@ -219,8 +212,16 @@ namespace dbaui
// -----------------------------------------------------------------------------
void ODataClipboard::ObjectReleased()
{
- m_pHtml = NULL;
- m_pRtf = NULL;
+ if ( m_pHtml )
+ {
+ m_pHtml->dispose();
+ m_pHtml = NULL;
+ } // if ( m_pHtml )
+ if ( m_pRtf )
+ {
+ m_pRtf->dispose();
+ m_pRtf = NULL;
+ }
m_aEventListeners.clear();
Reference<XConnection> xConnection;
Reference<XResultSet> xProp;
@@ -237,16 +238,30 @@ namespace dbaui
Reference<XConnection> xConnection;
Reference<XResultSet> xProp;
if ( getDescriptor().has(daConnection) && (getDescriptor()[daConnection] >>= xConnection) )
+ {
lcl_removeListener(xConnection,this);
+ getDescriptor().erase(daConnection);
+ } // if ( getDescriptor().has(daConnection) && (getDescriptor()[daConnection] >>= xConnection) )
if ( getDescriptor().has(daCursor) && (getDescriptor()[daCursor] >>= xProp) )
+ {
lcl_removeListener(xProp,this);
+ getDescriptor().erase(daCursor);
+ } // if ( getDescriptor().has(daCursor) && (getDescriptor()[daCursor] >>= xProp) )
+
+ if ( getDescriptor().has(daColumnObject) )
+ getDescriptor().erase(daColumnObject);
+
+ if ( getDescriptor().has(daComponent) )
+ getDescriptor().erase(daComponent);
+
ClearFormats();
- getDescriptor().clear();
+ //getDescriptor().clear();
+ AddSupportedFormats();
- m_pHtml = NULL;
+ /*m_pHtml = NULL;
m_pRtf = NULL;
- m_aEventListeners.clear();
+ m_aEventListeners.clear();*/
}
// -----------------------------------------------------------------------------
IMPLEMENT_FORWARD_XINTERFACE2( ODataClipboard, ODataAccessObjectTransferable, TDataClipboard_BASE )
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index dfda4b4f119b..0251b6f653b8 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -1503,7 +1503,6 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos)
{
// case SOT_FORMAT_RTF: // RTF data descriptions
// case SOT_FORMATSTR_ID_HTML: // HTML data descriptions
-// case SOT_FORMATSTR_ID_HTML_SIMPLE: // HTML data descriptions
case SOT_FORMATSTR_ID_DBACCESS_TABLE: // table descriptor
case SOT_FORMATSTR_ID_DBACCESS_QUERY: // query descriptor
case SOT_FORMATSTR_ID_DBACCESS_COMMAND: // SQL command
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index f9a01133b215..58335c5cd230 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -952,7 +952,7 @@ DBG_NAME(OConnectionHelper)
{
String sFile = String( ModuleRes( STR_FILE_DOES_NOT_EXIST ) );
sFile.SearchAndReplaceAscii("$file$", aTransformer.get(OFileNotation::N_SYSTEM));
- OSQLMessageBox(this,String(ModuleRes(STR_STAT_WARNING)),sFile).Execute();
+ OSQLWarningBox( this, sFile ).Execute();
setURLNoPrefix(sOldPath);
SetRoadmapStateValue(sal_False);
callModifiedHdl();
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 533ff93d5820..8018b424ee95 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -229,6 +229,7 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_APPEND_TABLE_ALIAS, INFO_APPEND_TABLE_ALIAS));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_AS_BEFORE_CORRNAME, INFO_AS_BEFORE_CORRELATION_NAME ) );
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CHECK_REQUIRED_FIELDS, INFO_FORMS_CHECK_REQUIRED_FIELDS ) );
+ m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_ESCAPE_DATETIME, INFO_ESCAPE_DATETIME ) );
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_PARAMETERNAMESUBST, INFO_PARAMETERNAMESUBST));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_IGNOREDRIVER_PRIV, INFO_IGNOREDRIVER_PRIV));
m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_BOOLEANCOMPARISON, PROPERTY_BOOLEANCOMPARISONMODE));
diff --git a/dbaccess/source/ui/dlg/DriverSettings.cxx b/dbaccess/source/ui/dlg/DriverSettings.cxx
index d9ae183a0c7a..15c40b3e40c5 100644
--- a/dbaccess/source/ui/dlg/DriverSettings.cxx
+++ b/dbaccess/source/ui/dlg/DriverSettings.cxx
@@ -59,6 +59,7 @@ void ODriversSettings::getSupportedIndirectSettings( ::dbaccess::DATASOURCE_TYPE
DSID_AUTOINCREMENTVALUE,
DSID_AUTORETRIEVEVALUE,
DSID_BOOLEANCOMPARISON,
+ DSID_ESCAPE_DATETIME,
0
};
for ( const USHORT* pGenericKnowSetting = nGenericKnownSettings; *pGenericKnowSetting; ++pGenericKnowSetting )
diff --git a/dbaccess/source/ui/dlg/ExtensionNotPresent.src b/dbaccess/source/ui/dlg/ExtensionNotPresent.src
index e3adfea5c0ad..e2d599befef9 100644
--- a/dbaccess/source/ui/dlg/ExtensionNotPresent.src
+++ b/dbaccess/source/ui/dlg/ExtensionNotPresent.src
@@ -1,4 +1,4 @@
-/*************************************************************************
+/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -89,3 +89,4 @@ ModalDialog RID_EXTENSION_NOT_PRESENT_DLG
TabStop = TRUE ;
};
};
+
diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
index bc070485fea2..63312762c7b8 100644
--- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx
+++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx
@@ -31,60 +31,27 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
-#ifndef DBAUI_USERADMINDLG_HXX
-#include "UserAdminDlg.hxx"
-#endif
-#ifndef DBAUI_USERADMINDLG_HRC
-#include "UserAdminDlg.hrc"
-#endif
-#ifndef _DBU_DLG_HRC_
+#include "adminpages.hxx"
+#include "DbAdminImpl.hxx"
#include "dbu_dlg.hrc"
-#endif
-#ifndef _DBAUI_DATASOURCEITEMS_HXX_
+#include "DriverSettings.hxx"
#include "dsitems.hxx"
-#endif
-#ifndef _SFXSTRITEM_HXX
-#include <svtools/stritem.hxx>
-#endif
-#ifndef _SFXENUMITEM_HXX
+#include "propertysetitem.hxx"
+#include "UITools.hxx"
+#include "UserAdmin.hxx"
+#include "UserAdminDlg.hrc"
+#include "UserAdminDlg.hxx"
+
+#include <comphelper/componentcontext.hxx>
+#include <connectivity/dbmetadata.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <svtools/eitem.hxx>
-#endif
-#ifndef _SFXINTITEM_HXX
#include <svtools/intitem.hxx>
-#endif
-#ifndef _VCL_STDTEXT_HXX
-#include <vcl/stdtext.hxx>
-#endif
-#ifndef _SV_MSGBOX_HXX
+#include <svtools/stritem.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/msgbox.hxx>
-#endif
-#ifndef _DBAUI_DATASOURCEITEMS_HXX_
-#include "dsitems.hxx"
-#endif
-#ifndef DBAUI_DRIVERSETTINGS_HXX
-#include "DriverSettings.hxx"
-#endif
-#ifndef _DBAUI_DBADMINIMPL_HXX_
-#include "DbAdminImpl.hxx"
-#endif
-#ifndef _DBAUI_PROPERTYSETITEM_HXX_
-#include "propertysetitem.hxx"
-#endif
-#ifndef _DBAUI_ADMINPAGES_HXX_
-#include "adminpages.hxx"
-#endif
-#ifndef DBAUI_USERADMIN_HXX
-#include "UserAdmin.hxx"
-#endif
-#ifndef DBAUI_TOOLS_HXX
-#include "UITools.hxx"
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XDATADEFINITIONSUPPLIER_HPP_
-#include <com/sun/star/sdbcx/XDataDefinitionSupplier.hpp>
-#endif
-#ifndef _COM_SUN_STAR_SDBCX_XUSERSSUPPLIER_HPP_
-#include <com/sun/star/sdbcx/XUsersSupplier.hpp>
-#endif
+#include <vcl/stdtext.hxx>
+
//.........................................................................
namespace dbaui
{
@@ -147,37 +114,22 @@ DBG_NAME(OUserAdminDlg)
{
try
{
- Reference<XUsersSupplier> xUsersSup(m_xConnection,UNO_QUERY);
- sal_Bool bError = sal_False;
- if ( !xUsersSup.is() )
- {
- Reference< XDataDefinitionSupplier > xDriver(getDriver(),UNO_QUERY);
- bError = !xDriver.is();
- if ( !bError )
- {
- m_xConnection = createConnection().first;
- bError = !m_xConnection.is();
-
- if ( !bError )
- {
- // now set the tables supplier at the table control
- xUsersSup.set(xDriver->getDataDefinitionByConnection(m_xConnection),UNO_QUERY);
- }
- }
- }
- bError = ! ( xUsersSup.is() && xUsersSup->getUsers().is());
-
- if ( bError )
+ ::dbtools::DatabaseMetaData aMetaData( createConnection().first );
+ if ( !aMetaData.supportsUserAdministration( ::comphelper::ComponentContext( getORB() ) ) )
{
String sError(ModuleRes(STR_USERADMIN_NOT_AVAILABLE));
throw SQLException(sError,NULL,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")) ,0,Any());
}
}
- catch(SQLException& e)
+ catch(const SQLException& e)
{
- ::dbaui::showError(::dbtools::SQLExceptionInfo(e),GetParent(),getORB());
+ ::dbaui::showError( ::dbtools::SQLExceptionInfo( ::cppu::getCaughtException() ), GetParent(), getORB() );
return RET_CANCEL;
}
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
short nRet = SfxTabDialog::Execute();
if ( nRet == RET_OK )
m_pImpl->saveChanges(*GetOutputItemSet());
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index ffc6e1cb8080..7b930b81e4ab 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -97,6 +97,7 @@ namespace dbaui
,m_pDosLineEnds( NULL )
,m_pCheckRequiredFields( NULL )
,m_pIgnoreCurrency(NULL)
+ ,m_pEscapeDateTime(NULL)
,m_pBooleanComparisonModeLabel( NULL )
,m_pBooleanComparisonMode( NULL )
,m_aControlDependencies()
@@ -112,9 +113,11 @@ namespace dbaui
++setting
)
{
- if ( aDSUI.hasSetting( setting->nItemId ) )
+ USHORT nItemId = setting->nItemId;
+ if ( aDSUI.hasSetting( nItemId ) )
{
- (*setting->ppControl) = new CheckBox( this, ModuleRes( setting->nControlResId ) );
+ USHORT nID = setting->nControlResId;
+ (*setting->ppControl) = new CheckBox( this, ModuleRes( nID ) );
(*setting->ppControl)->SetClickHdl( getControlModifiedLink() );
}
}
@@ -181,6 +184,7 @@ namespace dbaui
DELETEZ( m_pDosLineEnds );
DELETEZ( m_pCheckRequiredFields );
DELETEZ( m_pIgnoreCurrency );
+ DELETEZ( m_pEscapeDateTime );
DELETEZ( m_pBooleanComparisonModeLabel );
DELETEZ( m_pBooleanComparisonMode );
}
@@ -205,11 +209,16 @@ namespace dbaui
{ &m_pDosLineEnds, CB_DOSLINEENDS, DSID_DOSLINEENDS, false },
{ &m_pCheckRequiredFields, CB_CHECK_REQUIRED, DSID_CHECK_REQUIRED_FIELDS, false },
{ &m_pIgnoreCurrency, CB_IGNORECURRENCY, DSID_IGNORECURRENCY, false },
+ { &m_pEscapeDateTime, CB_ESCAPE_DATETIME, DSID_ESCAPE_DATETIME, false },
{ NULL, 0, 0, false }
};
for ( const BooleanSettingDesc* pCopy = aSettings; pCopy->nItemId != 0; ++pCopy )
+ {
+ USHORT nID = pCopy->nItemId;
+ (void) nID;
m_aBooleanSettings.push_back( *pCopy );
+ }
}
// -----------------------------------------------------------------------
diff --git a/dbaccess/source/ui/dlg/advancedsettings.hrc b/dbaccess/source/ui/dlg/advancedsettings.hrc
index f1f6cd5bcde6..8bd0063fc4d6 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.hrc
+++ b/dbaccess/source/ui/dlg/advancedsettings.hrc
@@ -63,6 +63,7 @@
#define CB_AS_BEFORE_CORR_NAME 12
#define CB_CHECK_REQUIRED 13
#define CB_IGNORECURRENCY 14
+#define CB_ESCAPE_DATETIME 15
#define ET_AUTOINCREMENTVALUE 1
#define ET_RETRIEVE_AUTO 2
diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx
index 6349f87ff2d1..78a572d7fb0f 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.hxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.hxx
@@ -73,6 +73,7 @@ namespace dbaui
CheckBox* m_pDosLineEnds;
CheckBox* m_pCheckRequiredFields;
CheckBox* m_pIgnoreCurrency;
+ CheckBox* m_pEscapeDateTime;
FixedText* m_pBooleanComparisonModeLabel;
ListBox* m_pBooleanComparisonMode;
diff --git a/dbaccess/source/ui/dlg/advancedsettings.src b/dbaccess/source/ui/dlg/advancedsettings.src
index be6a97bd1ce4..acb5fbb81656 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.src
+++ b/dbaccess/source/ui/dlg/advancedsettings.src
@@ -199,6 +199,17 @@
Text [ en-US ] = "Form data input checks for required fields"; \
};
+#define AUTO_ESCAPE_DATETIME(AUTO_Y) \
+ CheckBox CB_ESCAPE_DATETIME \
+ { \
+ Pos = MAP_APPFONT ( 6 , AUTO_Y ) ; \
+ Size = MAP_APPFONT ( ADVANCED_PAGE_X -12 , CHECKBOX_HEIGHT ) ; \
+ TabStop = TRUE ; \
+ HelpId = HID_DSADMIN_ESCAPE_DATETIME; \
+ Text [ en-US ] = "Use ODBC conformant date/time literals"; \
+ };
+
+
//-------------------------------------------------------------------------
#define WORKAROUND \
@@ -310,7 +321,8 @@ TabPage PAGE_ADVANCED_SETTINGS_SPECIAL
AUTO_DOSLINEENDS( 11*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 10*CHECKBOX_HEIGHT + RELATED_CONTROLS )
AUTO_CHECKREQUIRED( 12*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 11*CHECKBOX_HEIGHT + RELATED_CONTROLS )
AUTO_IGNORECURRENCY( 13*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 12*CHECKBOX_HEIGHT + RELATED_CONTROLS )
- AUTO_BOOLEANCOMPARISON( 14*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 13*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 )
+ AUTO_ESCAPE_DATETIME( 14*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 14*CHECKBOX_HEIGHT + RELATED_CONTROLS )
+ AUTO_BOOLEANCOMPARISON( 15*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + 13*CHECKBOX_HEIGHT + RELATED_CONTROLS + ( LISTBOX_HEIGHT - CHECKBOX_HEIGHT ) / 2 )
};
//-------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/dlg/datasourceui.cxx b/dbaccess/source/ui/dlg/datasourceui.cxx
index a255222c13b3..aa4c0e7f8444 100644
--- a/dbaccess/source/ui/dlg/datasourceui.cxx
+++ b/dbaccess/source/ui/dlg/datasourceui.cxx
@@ -92,6 +92,7 @@ namespace dbaui
case DSID_AUTOINCREMENTVALUE: return rAdvancedSupport.bGeneratedValues;
case DSID_AUTORETRIEVEVALUE: return rAdvancedSupport.bGeneratedValues;
case DSID_IGNORECURRENCY: return rAdvancedSupport.bIgnoreCurrency;
+ case DSID_ESCAPE_DATETIME: return rAdvancedSupport.bEscapeDateTime;
}
OSL_ENSURE( false, "DataSourceUI::hasSetting: this item id is currently not supported!" );
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index d025641477d6..a28567c6b0af 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -410,7 +410,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp
*pCounter++ = new SfxStringItem(DSID_THOUSANDSDELIMITER, String());
*pCounter++ = new SfxStringItem(DSID_TEXTFILEEXTENSION, String::CreateFromAscii("txt"));
*pCounter++ = new SfxBoolItem(DSID_TEXTFILEHEADER, sal_True);
- *pCounter++ = new SfxBoolItem(DSID_PARAMETERNAMESUBST, sal_True);
+ *pCounter++ = new SfxBoolItem(DSID_PARAMETERNAMESUBST, sal_False);
*pCounter++ = new SfxInt32Item(DSID_CONN_PORTNUMBER, 8100);
*pCounter++ = new SfxBoolItem(DSID_SUPPRESSVERSIONCL, sal_False);
*pCounter++ = new OPropertySetItem(DSID_DATASOURCE_UNO);
@@ -445,6 +445,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp
*pCounter++ = new SfxBoolItem(DSID_CHECK_REQUIRED_FIELDS, sal_True);
*pCounter++ = new SfxBoolItem(DSID_IGNORECURRENCY, sal_False);
*pCounter++ = new SfxStringItem(DSID_CONN_SOCKET, String());
+ *pCounter++ = new SfxBoolItem(DSID_ESCAPE_DATETIME, sal_True); // must be the same as in ModelImpl.cxx
// create the pool
static SfxItemInfo __READONLY_DATA aItemInfos[DSID_LAST_ITEM_ID - DSID_FIRST_ITEM_ID + 1] =
@@ -504,10 +505,11 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp
{0,0},
{0,0},
{0,0},
+ {0,0}, /* for Escape DateTime*/
{0,0}
};
- OSL_ENSURE(sizeof(aItemInfos)/sizeof(aItemInfos[0]) == DSID_LAST_ITEM_ID,"Invlaid Ids!");
+ OSL_ENSURE(sizeof(aItemInfos)/sizeof(aItemInfos[0]) == DSID_LAST_ITEM_ID,"Invalid Ids!");
_rpPool = new SfxItemPool(String::CreateFromAscii("DSAItemPool"), DSID_FIRST_ITEM_ID, DSID_LAST_ITEM_ID,
aItemInfos, _rppDefaults);
_rpPool->FreezeIdRanges();
diff --git a/dbaccess/source/ui/dlg/dsitems.hxx b/dbaccess/source/ui/dlg/dsitems.hxx
index ad0ca3ce780f..75316232684b 100644
--- a/dbaccess/source/ui/dlg/dsitems.hxx
+++ b/dbaccess/source/ui/dlg/dsitems.hxx
@@ -90,6 +90,7 @@
#define DSID_CHECK_REQUIRED_FIELDS 54
#define DSID_IGNORECURRENCY 55
#define DSID_CONN_SOCKET 56
+#define DSID_ESCAPE_DATETIME 57
// don't forget to adjust DSID_LAST_ITEM_ID below!
@@ -97,7 +98,7 @@
//= item range. Adjust this if you introduce new items above
#define DSID_FIRST_ITEM_ID DSID_NAME
-#define DSID_LAST_ITEM_ID DSID_CONN_SOCKET
+#define DSID_LAST_ITEM_ID DSID_ESCAPE_DATETIME
#endif // _DBAUI_DATASOURCEITEMS_HXX_
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 0130a44e2ab0..bd5a4c1e6392 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -768,6 +768,15 @@ IMPL_LINK( OSQLMessageBox, ButtonClickHdl, Button *, /*pButton*/ )
return 0;
}
+//==================================================================
+// OSQLWarningBox
+//==================================================================
+OSQLWarningBox::OSQLWarningBox( Window* _pParent, const UniString& _rMessage, WinBits _nStyle,
+ const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo )
+ :OSQLMessageBox( _pParent, String( ModuleRes( STR_STAT_WARNING ) ), _rMessage, _nStyle, OSQLMessageBox::Warning, _pAdditionalErrorInfo )
+{
+}
+
//.........................................................................
} // namespace dbaui
//.........................................................................
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 0f3bb3f73c0a..bbcd265c5f34 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -379,16 +379,11 @@ DBG_NAME(OTableSubscriptionPage)
Reference<XModifiable> xModi(getDataSourceOrModel(xProp),UNO_QUERY);
sal_Bool bModified = ( xModi.is() && xModi->isModified() );
- Sequence< ::rtl::OUString> aNewTableFilter(1),aEmpty(3);
+ Sequence< ::rtl::OUString > aNewTableFilter(1);
aNewTableFilter[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%"));
xProp->setPropertyValue(PROPERTY_TABLEFILTER,makeAny(aNewTableFilter));
- static const ::rtl::OUString s_sTableTypeView(RTL_CONSTASCII_USTRINGPARAM("VIEW"));
- static const ::rtl::OUString s_sTableTypeTable(RTL_CONSTASCII_USTRINGPARAM("TABLE"));
- aEmpty[0] = s_sTableTypeView;
- aEmpty[1] = s_sTableTypeTable;
- aEmpty[2] = aNewTableFilter[0];
- xProp->setPropertyValue(PROPERTY_TABLETYPEFILTER,makeAny(aEmpty));
+ xProp->setPropertyValue( PROPERTY_TABLETYPEFILTER, makeAny( Sequence< ::rtl::OUString >() ) );
Reference< ::com::sun::star::lang::XEventListener> xEvt;
aErrorInfo = ::dbaui::createConnection(xProp,m_xORB,xEvt,m_xCurrentConnection);
diff --git a/dbaccess/source/ui/inc/TableCopyHelper.hxx b/dbaccess/source/ui/inc/TableCopyHelper.hxx
index bf60736df901..c0b5e77cc403 100644
--- a/dbaccess/source/ui/inc/TableCopyHelper.hxx
+++ b/dbaccess/source/ui/inc/TableCopyHelper.hxx
@@ -76,7 +76,6 @@ namespace dbaui
{
case SOT_FORMAT_RTF: // RTF data descriptions
case SOT_FORMATSTR_ID_HTML: // HTML data descriptions
- case SOT_FORMATSTR_ID_HTML_SIMPLE: // HTML data descriptions
case SOT_FORMATSTR_ID_DBACCESS_TABLE: // table descriptor
return (E_TABLE == eEntryType);
case SOT_FORMATSTR_ID_DBACCESS_QUERY: // query descriptor
diff --git a/dbaccess/source/ui/inc/TokenWriter.hxx b/dbaccess/source/ui/inc/TokenWriter.hxx
index c373cc835b40..2eb162a05020 100644
--- a/dbaccess/source/ui/inc/TokenWriter.hxx
+++ b/dbaccess/source/ui/inc/TokenWriter.hxx
@@ -93,15 +93,9 @@ namespace dbaui
class ODatabaseImportExport : public ODatabaseImportExport_BASE
{
private:
- void disposing();
void impl_initializeRowMember_throw();
protected:
- typedef ::utl::SharedUNOComponent < ::com::sun::star::frame::XModel
- , ::utl::CloseableComponent
- > SharedModel;
-
- protected:
::com::sun::star::lang::Locale m_aLocale;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> m_aSelection;
SvStream* m_pStream;
@@ -114,7 +108,6 @@ namespace dbaui
::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > m_xRowSetColumns;
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> m_xFactory;
- SharedModel m_aKeepModelAlive;
::rtl::OUString m_sName;
//dyf add 20070601
@@ -123,6 +116,7 @@ namespace dbaui
//dyf add end
::rtl::OUString m_sDataSourceName;
sal_Int32 m_nCommandType;
+ bool m_bNeedToReInitialize;
#if defined UNX
static const char __FAR_DATA sNewLine;
@@ -158,17 +152,18 @@ namespace dbaui
void setSTableName(const ::rtl::OUString &_sTableName){ m_sDefaultTableName = _sTableName; }
//dyf add end
- virtual BOOL Write() = 0; // Export
- virtual BOOL Read() = 0; // Import
+ virtual BOOL Write(); // Export
+ virtual BOOL Read(); // Import
void initialize(const ::svx::ODataAccessDescriptor& _aDataDescriptor);
-
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+ void dispose();
void enableCheckOnly() { m_bCheckOnly = sal_True; }
sal_Bool isCheckEnabled() const { return m_bCheckOnly; }
+
private:
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
void impl_initFromDescriptor( const ::svx::ODataAccessDescriptor& _aDataDescriptor, bool _bPlusDefaultInit );
};
diff --git a/dbaccess/source/ui/inc/dsmeta.hxx b/dbaccess/source/ui/inc/dsmeta.hxx
index 174d42803086..88053668a4ed 100644
--- a/dbaccess/source/ui/inc/dsmeta.hxx
+++ b/dbaccess/source/ui/inc/dsmeta.hxx
@@ -109,6 +109,8 @@ namespace dbaui
bool bFormsCheckRequiredFields;
bool bIgnoreCurrency;
bool bAutoIncrementIsPrimaryKey;
+ bool bEscapeDateTime;
+
// Note: If you extend this list, you need to adjust the ctor (of course)
// and (maybe) the implementation of supportsAnySpecialSetting
@@ -129,6 +131,7 @@ namespace dbaui
,bFormsCheckRequiredFields ( true )
,bIgnoreCurrency ( false )
,bAutoIncrementIsPrimaryKey ( false )
+ ,bEscapeDateTime ( false )
{
}
@@ -156,6 +159,7 @@ namespace dbaui
|| ( bFormsCheckRequiredFields == true )
|| ( bIgnoreCurrency == true )
|| ( bAutoIncrementIsPrimaryKey == true )
+ || ( bEscapeDateTime == true )
;
}
diff --git a/dbaccess/source/ui/inc/sqlmessage.hxx b/dbaccess/source/ui/inc/sqlmessage.hxx
index 190cbbfe1d67..088ea8a1ac42 100644
--- a/dbaccess/source/ui/inc/sqlmessage.hxx
+++ b/dbaccess/source/ui/inc/sqlmessage.hxx
@@ -100,7 +100,7 @@ public:
);
/** display a database related error message
- <p/>
+
@param rTitle the title to display
@param rMessage the detailed message to display
@param _eType determines the image to use. AUTO is disallowed in this constructor version
@@ -126,6 +126,18 @@ private:
void impl_addDetailsButton();
};
+//==================================================================
+// OSQLWarningBox
+//==================================================================
+class OSQLWarningBox : public OSQLMessageBox
+{
+public:
+ OSQLWarningBox( Window* _pParent,
+ const UniString& _rMessage,
+ WinBits _nStyle = WB_OK | WB_DEF_OK,
+ const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo = NULL );
+};
+
//.........................................................................
} // namespace dbaui
//.........................................................................
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index fe31c60abc3b..b366695301a0 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -857,8 +857,7 @@ void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException
String aMsg(e.Message);
aMsg += '\n';
aMsg += String( ModuleRes( STR_QRY_CONTINUE ) );
- OSQLMessageBox aBox(NULL, String(ModuleRes(STR_STAT_WARNING)),
- aMsg, WB_YES_NO | WB_DEF_NO, OSQLMessageBox::Warning);
+ OSQLWarningBox aBox( NULL, aMsg, WB_YES_NO | WB_DEF_NO );
if (aBox.Execute() == RET_YES)
m_bDontAskAgain = TRUE;
diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx
index 444af3fba2a7..3098e4b88eb6 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -264,8 +264,7 @@ sal_Bool ORowSetImportExport::insertNewRow()
if(!m_bAlreadyAsked)
{
String sAskIfContinue = String(ModuleRes(STR_ERROR_OCCURED_WHILE_COPYING));
- String sTitle = String(ModuleRes(STR_STAT_WARNING));
- OSQLMessageBox aDlg(m_pParent,sTitle,sAskIfContinue,WB_YES_NO|WB_DEF_YES,OSQLMessageBox::Warning);
+ OSQLWarningBox aDlg( m_pParent, sAskIfContinue, WB_YES_NO | WB_DEF_YES );
if(aDlg.Execute() == RET_YES)
m_bAlreadyAsked = sal_True;
else
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index 299926f222b8..b2760e4d2e51 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -299,12 +299,12 @@ void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId
{
DropDescriptor aTrans;
if ( _nFormatId != SOT_FORMAT_RTF )
- const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(_rTransData.HasFormat(SOT_FORMATSTR_ID_HTML) ? SOT_FORMATSTR_ID_HTML : SOT_FORMATSTR_ID_HTML_SIMPLE,aTrans.aHtmlRtfStorage);
+ const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SOT_FORMATSTR_ID_HTML ,aTrans.aHtmlRtfStorage);
else
const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SOT_FORMAT_RTF,aTrans.aHtmlRtfStorage);
aTrans.nType = E_TABLE;
- aTrans.bHtml = SOT_FORMATSTR_ID_HTML == _nFormatId || SOT_FORMATSTR_ID_HTML_SIMPLE == _nFormatId;
+ aTrans.bHtml = SOT_FORMATSTR_ID_HTML == _nFormatId;
aTrans.sDefaultTableName = GetTableNameForAppend();
if ( !copyTagTable(aTrans,sal_False,_xConnection) )
m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,::rtl::OUString::createFromAscii("S1000") ,0,Any()));
@@ -331,8 +331,6 @@ void OTableCopyHelper::pasteTable( const TransferableDataHelper& _rTransData
pasteTable( SOT_FORMATSTR_ID_DBACCESS_TABLE,_rTransData,_sDestDataSourceName,_xConnection);
else if ( _rTransData.HasFormat(SOT_FORMATSTR_ID_HTML) )
pasteTable( SOT_FORMATSTR_ID_HTML,_rTransData,_sDestDataSourceName,_xConnection);
- else if ( _rTransData.HasFormat(SOT_FORMATSTR_ID_HTML_SIMPLE) )
- pasteTable( SOT_FORMATSTR_ID_HTML_SIMPLE,_rTransData,_sDestDataSourceName,_xConnection);
else if ( _rTransData.HasFormat(SOT_FORMAT_RTF) )
pasteTable( SOT_FORMAT_RTF,_rTransData,_sDestDataSourceName,_xConnection);
}
@@ -365,8 +363,7 @@ sal_Bool OTableCopyHelper::isTableFormat(const TransferableDataHelper& _rClipboa
sal_Bool bTableFormat = _rClipboard.HasFormat(SOT_FORMATSTR_ID_DBACCESS_TABLE)
|| _rClipboard.HasFormat(SOT_FORMATSTR_ID_DBACCESS_QUERY)
|| _rClipboard.HasFormat(SOT_FORMAT_RTF)
- || _rClipboard.HasFormat(SOT_FORMATSTR_ID_HTML)
- || _rClipboard.HasFormat(SOT_FORMATSTR_ID_HTML_SIMPLE);
+ || _rClipboard.HasFormat(SOT_FORMATSTR_ID_HTML);
return bTableFormat;
}
@@ -376,11 +373,11 @@ sal_Bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedD
,const SharedConnection& _xConnection)
{
sal_Bool bRet = sal_False;
- sal_Bool bHtml = _aDroppedData.HasFormat(SOT_FORMATSTR_ID_HTML) || _aDroppedData.HasFormat(SOT_FORMATSTR_ID_HTML_SIMPLE);
+ sal_Bool bHtml = _aDroppedData.HasFormat(SOT_FORMATSTR_ID_HTML);
if ( bHtml || _aDroppedData.HasFormat(SOT_FORMAT_RTF) )
{
if ( bHtml )
- const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(_aDroppedData.HasFormat(SOT_FORMATSTR_ID_HTML) ? SOT_FORMATSTR_ID_HTML : SOT_FORMATSTR_ID_HTML_SIMPLE,_rAsyncDrop.aHtmlRtfStorage);
+ const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(SOT_FORMATSTR_ID_HTML ,_rAsyncDrop.aHtmlRtfStorage);
else
const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(SOT_FORMAT_RTF,_rAsyncDrop.aHtmlRtfStorage);
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index db8bd6e5e21f..0910808a5f9d 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -135,6 +135,7 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdb;
+using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::awt;
@@ -163,6 +164,7 @@ ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor&
:m_xFormatter(_rxNumberF)
,m_xFactory(_rM)
,m_nCommandType(CommandType::TABLE)
+ ,m_bNeedToReInitialize(sal_False)
,m_pReader(NULL)
,m_pRowMarker(NULL)
,m_bInInitialize(sal_False)
@@ -192,6 +194,7 @@ ODatabaseImportExport::ODatabaseImportExport( const ::dbtools::SharedConnection&
,m_xFormatter(_rxNumberF)
,m_xFactory(_rM)
,m_nCommandType(::com::sun::star::sdb::CommandType::TABLE)
+ ,m_bNeedToReInitialize(sal_False)
,m_pReader(NULL)
,m_pRowMarker(NULL)
,m_bInInitialize(sal_False)
@@ -214,14 +217,14 @@ ODatabaseImportExport::~ODatabaseImportExport()
DBG_DTOR(ODatabaseImportExport,NULL);
acquire();
- disposing();
+ dispose();
if(m_pReader)
m_pReader->release();
delete m_pRowMarker;
}
// -----------------------------------------------------------------------------
-void ODatabaseImportExport::disposing()
+void ODatabaseImportExport::dispose()
{
DBG_CHKTHIS(ODatabaseImportExport,NULL);
// remove me as listener
@@ -240,8 +243,6 @@ void ODatabaseImportExport::disposing()
m_xResultSet.clear();
m_xRow.clear();
m_xFormatter.clear();
-
- m_aKeepModelAlive.clear();
}
// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseImportExport::disposing( const EventObject& Source ) throw(::com::sun::star::uno::RuntimeException)
@@ -251,9 +252,10 @@ void SAL_CALL ODatabaseImportExport::disposing( const EventObject& Source ) thro
if(m_xConnection.is() && m_xConnection == xCon)
{
m_xConnection.clear();
- disposing();
- if(!m_bInInitialize)
- initialize();
+ dispose();
+ m_bNeedToReInitialize = true;
+ //if(!m_bInInitialize)
+ // initialize();
}
}
// -----------------------------------------------------------------------------
@@ -266,30 +268,36 @@ void ODatabaseImportExport::initialize( const ODataAccessDescriptor& _aDataDescr
void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor& _aDataDescriptor, bool _bPlusDefaultInit)
{
DBG_CHKTHIS(ODatabaseImportExport,NULL);
- m_sDataSourceName = _aDataDescriptor.getDataSource();
- _aDataDescriptor[daCommandType] >>= m_nCommandType;
- _aDataDescriptor[daCommand] >>= m_sName;
- // some additonal information
- if(_aDataDescriptor.has(daConnection))
- {
- Reference< XConnection > xPureConn( _aDataDescriptor[daConnection], UNO_QUERY );
- m_xConnection.reset( xPureConn, SharedConnection::NoTakeOwnership );
- }
- if(_aDataDescriptor.has(daSelection))
- _aDataDescriptor[daSelection] >>= m_aSelection;
-
- sal_Bool bBookmarkSelection = sal_True; // the default if not present
- if ( _aDataDescriptor.has( daBookmarkSelection ) )
+ if ( !_bPlusDefaultInit )
{
- _aDataDescriptor[ daBookmarkSelection ] >>= bBookmarkSelection;
- DBG_ASSERT( !bBookmarkSelection, "ODatabaseImportExport::ODatabaseImportExport: bookmarked selection not yet supported!" );
- }
+ m_sDataSourceName = _aDataDescriptor.getDataSource();
+ _aDataDescriptor[daCommandType] >>= m_nCommandType;
+ _aDataDescriptor[daCommand] >>= m_sName;
+ // some additonal information
+ if(_aDataDescriptor.has(daConnection))
+ {
+ Reference< XConnection > xPureConn( _aDataDescriptor[daConnection], UNO_QUERY );
+ m_xConnection.reset( xPureConn, SharedConnection::NoTakeOwnership );
+ Reference< XEventListener> xEvt((::cppu::OWeakObject*)this,UNO_QUERY);
+ Reference< XComponent > xComponent(m_xConnection, UNO_QUERY);
+ if (xComponent.is() && xEvt.is())
+ xComponent->addEventListener(xEvt);
+ }
+ if(_aDataDescriptor.has(daSelection))
+ _aDataDescriptor[daSelection] >>= m_aSelection;
+ sal_Bool bBookmarkSelection = sal_True; // the default if not present
+ if ( _aDataDescriptor.has( daBookmarkSelection ) )
+ {
+ _aDataDescriptor[ daBookmarkSelection ] >>= bBookmarkSelection;
+ DBG_ASSERT( !bBookmarkSelection, "ODatabaseImportExport::ODatabaseImportExport: bookmarked selection not yet supported!" );
+ }
- if(_aDataDescriptor.has(daCursor))
- _aDataDescriptor[daCursor] >>= m_xResultSet;
- if ( _bPlusDefaultInit )
+ if(_aDataDescriptor.has(daCursor))
+ _aDataDescriptor[daCursor] >>= m_xResultSet;
+ } // if ( !_bPlusDefaultInit )
+ else
initialize();
try
@@ -306,23 +314,12 @@ void ODatabaseImportExport::initialize()
{
DBG_CHKTHIS(ODatabaseImportExport,NULL);
m_bInInitialize = sal_True;
+ m_bNeedToReInitialize = false;
if ( !m_xConnection.is() )
{ // we need a connection
OSL_ENSURE(m_sDataSourceName.getLength(),"There must be a datsource name!");
Reference<XNameAccess> xDatabaseContext = Reference< XNameAccess >(m_xFactory->createInstance(SERVICE_SDB_DATABASECONTEXT), UNO_QUERY);
-
- try
- {
- Reference< XDataSource > xDataSource( xDatabaseContext->getByName( m_sDataSourceName ), UNO_QUERY_THROW );
- Reference< XModel > xDocument( getDataSourceOrModel( xDataSource ), UNO_QUERY_THROW );
- m_aKeepModelAlive = SharedModel( xDocument );
- }
- catch( const Exception& )
- {
- OSL_ENSURE( sal_False, "ODatabaseImportExport::initialize: could not obtaine the document model!" );
- }
-
Reference< XEventListener> xEvt((::cppu::OWeakObject*)this,UNO_QUERY);
Reference< XConnection > xConnection;
@@ -332,13 +329,6 @@ void ODatabaseImportExport::initialize()
if(aInfo.isValid() && aInfo.getType() == SQLExceptionInfo::SQL_EXCEPTION)
throw *static_cast<const SQLException*>(aInfo);
}
- else
- {
- Reference< XEventListener> xEvt((::cppu::OWeakObject*)this,UNO_QUERY);
- Reference< XComponent > xComponent(m_xConnection, UNO_QUERY);
- if (xComponent.is() && xEvt.is())
- xComponent->addEventListener(xEvt);
- }
Reference<XNameAccess> xNameAccess;
switch(m_nCommandType)
@@ -411,6 +401,26 @@ void ODatabaseImportExport::initialize()
m_bInInitialize = sal_False;
}
// -----------------------------------------------------------------------------
+BOOL ODatabaseImportExport::Write()
+{
+ if ( m_bNeedToReInitialize )
+ {
+ if ( !m_bInInitialize )
+ initialize();
+ } // if ( m_bNeedToReInitialize )
+ return TRUE;
+}
+// -----------------------------------------------------------------------------
+BOOL ODatabaseImportExport::Read()
+{
+ if ( m_bNeedToReInitialize )
+ {
+ if ( !m_bInInitialize )
+ initialize();
+ } // if ( m_bNeedToReInitialize )
+ return TRUE;
+}
+// -----------------------------------------------------------------------------
void ODatabaseImportExport::impl_initializeRowMember_throw()
{
if ( !m_xRow.is() && m_xResultSet.is() )
@@ -424,6 +434,7 @@ void ODatabaseImportExport::impl_initializeRowMember_throw()
//======================================================================
BOOL ORTFImportExport::Write()
{
+ ODatabaseImportExport::Write();
(*m_pStream) << '{' << sRTF_RTF;
(*m_pStream) << sRTF_ANSI << ODatabaseImportExport::sNewLine;
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252;
@@ -680,6 +691,7 @@ BOOL ORTFImportExport::Write()
//-------------------------------------------------------------------
BOOL ORTFImportExport::Read()
{
+ ODatabaseImportExport::Read();
SvParserState eState = SVPAR_ERROR;
if ( m_pStream )
{
@@ -742,6 +754,7 @@ OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataD
//-------------------------------------------------------------------
BOOL OHTMLImportExport::Write()
{
+ ODatabaseImportExport::Write();
if(m_xObject.is())
{
(*m_pStream) << '<' << sHTML_doctype << ' ' << sHTML_doctype32 << '>' << ODatabaseImportExport::sNewLine << ODatabaseImportExport::sNewLine;
@@ -759,6 +772,7 @@ BOOL OHTMLImportExport::Write()
//-------------------------------------------------------------------
BOOL OHTMLImportExport::Read()
{
+ ODatabaseImportExport::Read();
SvParserState eState = SVPAR_ERROR;
if ( m_pStream )
{
@@ -1132,4 +1146,3 @@ void OHTMLImportExport::IncIndent( sal_Int16 nVal )
sIndent[m_nIndent] = 0;
}
// -----------------------------------------------------------------------------
-
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index e25258097e72..c5bfe2470b49 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1263,9 +1263,7 @@ sal_Bool appendToFilter(const Reference<XConnection>& _xConnection,
if(! ::dbaui::checkDataSourceAvailable(::comphelper::getString(xProp->getPropertyValue(PROPERTY_NAME)),_xFactory))
{
String aMessage(ModuleRes(STR_TABLEDESIGN_DATASOURCE_DELETED));
- String sTitle(ModuleRes(STR_STAT_WARNING));
- OSQLMessageBox aMsg(_pParent,sTitle,aMessage);
- aMsg.Execute();
+ OSQLWarningBox( _pParent, aMessage ).Execute();
bRet = sal_False;
}
else
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 08946d8660c5..ca3408bd0285 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -1598,12 +1598,9 @@ TOTypeInfoSP OCopyTableWizard::convertType(const TOTypeInfoSP& _pType,sal_Bool&
// -----------------------------------------------------------------------------
void OCopyTableWizard::showColumnTypeNotSupported(const ::rtl::OUString& _rColumnName)
{
- UniString sTitle(ModuleRes(STR_STAT_WARNING));
- UniString sMessage(ModuleRes(STR_UNKNOWN_TYPE_FOUND));
-
+ String sMessage( ModuleRes( STR_UNKNOWN_TYPE_FOUND ) );
sMessage.SearchAndReplaceAscii("#1",_rColumnName);
- OSQLMessageBox aMsg(this,sTitle,sMessage);
- aMsg.Execute();
+ OSQLWarningBox( this, sMessage ).Execute();
}
//-------------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index cdfefb5b673d..fa6e91142fc9 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -178,9 +178,7 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
{
String strMessage = String(ModuleRes(STR_TABLEDESIGN_DUPLICATE_NAME));
strMessage.SearchAndReplaceAscii("$column$", sNewName);
- String sTitle(ModuleRes(STR_STAT_WARNING));
- OSQLMessageBox aMsg(this,sTitle,strMessage,WB_OK | WB_DEF_OK,OSQLMessageBox::Error);
- aMsg.Execute();
+ OSQLWarningBox( this, strMessage ).Execute();
pCurFieldDescr->SetName(sName);
DisplayData(pCurFieldDescr);
static_cast<OWizTypeSelect*>(GetParent())->setDuplicateName(sal_True);
diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx
index 21a247c73c9f..259834be1724 100644
--- a/dbaccess/source/ui/misc/databaseobjectview.cxx
+++ b/dbaccess/source/ui/misc/databaseobjectview.cxx
@@ -166,7 +166,7 @@ namespace dbaui
{
try
{
- // get the desktop object
+ // if we have no externally provided frame, create one
if ( !m_xFrameLoader.is() )
{
Reference< XSingleServiceFactory > xFact(m_xORB->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.TaskCreator")), UNO_QUERY_THROW);
@@ -185,7 +185,7 @@ namespace dbaui
m_xFrameLoader.set(xFact->createInstanceWithArguments(lArgs), UNO_QUERY_THROW);
}
- Reference< XComponentLoader > xFrameLoader(m_xFrameLoader, UNO_QUERY_THROW);
+ Reference< XComponentLoader > xFrameLoader( m_xFrameLoader, UNO_QUERY_THROW );
xReturn = xFrameLoader->loadComponentFromURL(
m_sComponentURL,
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_self")),
@@ -193,8 +193,8 @@ namespace dbaui
_rArgs
);
- if ( xReturn.is() )
- xReturn.set(m_xFrameLoader,UNO_QUERY);
+ if ( !xReturn.is() )
+ xReturn.set( m_xFrameLoader, UNO_QUERY );
}
catch( const Exception& )
{
diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx
index 26e9bfd1e953..aa50736ba6b7 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -47,7 +47,7 @@ namespace dbaui
{
// strange ctor, but makes instantiating this class more readable (see below)
InitAdvanced( short _Generated, short _SQL, short _Append, short _As, short _Outer, short _Priv, short _Param,
- short _Version, short _Catalog, short _Schema, short _Index, short _DOS, short _Required, short _Bool,short _IgnoreCur,short _AutoPKey )
+ short _Version, short _Catalog, short _Schema, short _Index, short _DOS, short _Required, short _Bool,short _IgnoreCur,short _AutoPKey, short _EscapeDT )
:AdvancedSettingsSupport()
{
bGeneratedValues = ( _Generated != 0 );
@@ -66,6 +66,7 @@ namespace dbaui
bFormsCheckRequiredFields = ( _Required != 0 );
bIgnoreCurrency = ( _IgnoreCur != 0 );
bAutoIncrementIsPrimaryKey = ( _AutoPKey != 0 );
+ bEscapeDateTime = ( _EscapeDT != 0 );
}
enum Special { All, AllButIgnoreCurrency, None };
@@ -89,6 +90,7 @@ namespace dbaui
bFormsCheckRequiredFields = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
bIgnoreCurrency = ( _eType == All );
bAutoIncrementIsPrimaryKey = false; // hsqldb special
+ bEscapeDateTime = ( _eType == All ) || ( _eType == AllButIgnoreCurrency );
}
};
@@ -119,18 +121,18 @@ namespace dbaui
static AdvancedSupport s_aSupport;
if ( s_aSupport.empty() )
{
- s_aSupport[ ::dbaccess::DST_MSACCESS ] = InitAdvanced( 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0 );
- s_aSupport[ ::dbaccess::DST_MYSQL_ODBC ] = InitAdvanced( 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0 );
- s_aSupport[ ::dbaccess::DST_MYSQL_JDBC ] = InitAdvanced( 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0 );
- s_aSupport[ ::dbaccess::DST_MYSQL_NATIVE ] = InitAdvanced( 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0 );
+ s_aSupport[ ::dbaccess::DST_MSACCESS ] = InitAdvanced( 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0 );
+ s_aSupport[ ::dbaccess::DST_MYSQL_ODBC ] = InitAdvanced( 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0 );
+ s_aSupport[ ::dbaccess::DST_MYSQL_JDBC ] = InitAdvanced( 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1 );
+ s_aSupport[ ::dbaccess::DST_MYSQL_NATIVE ] = InitAdvanced( 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0 );
s_aSupport[ ::dbaccess::DST_ORACLE_JDBC ] = InitAdvanced( InitAdvanced::All );
- s_aSupport[ ::dbaccess::DST_ADABAS ] = InitAdvanced( 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0 );
+ s_aSupport[ ::dbaccess::DST_ADABAS ] = InitAdvanced( 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0 );
s_aSupport[ ::dbaccess::DST_CALC ] = InitAdvanced( InitAdvanced::None );
- s_aSupport[ ::dbaccess::DST_DBASE ] = InitAdvanced( 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 );
- s_aSupport[ ::dbaccess::DST_FLAT ] = InitAdvanced( 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
+ s_aSupport[ ::dbaccess::DST_DBASE ] = InitAdvanced( 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 );
+ s_aSupport[ ::dbaccess::DST_FLAT ] = InitAdvanced( 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );
s_aSupport[ ::dbaccess::DST_JDBC ] = InitAdvanced( InitAdvanced::AllButIgnoreCurrency );
s_aSupport[ ::dbaccess::DST_ODBC ] = InitAdvanced( InitAdvanced::AllButIgnoreCurrency );
- s_aSupport[ ::dbaccess::DST_ADO ] = InitAdvanced( 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0 );
+ s_aSupport[ ::dbaccess::DST_ADO ] = InitAdvanced( 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 );
s_aSupport[ ::dbaccess::DST_MOZILLA ] = InitAdvanced( InitAdvanced::None );
s_aSupport[ ::dbaccess::DST_THUNDERBIRD ] = InitAdvanced( InitAdvanced::None );
s_aSupport[ ::dbaccess::DST_LDAP ] = InitAdvanced( InitAdvanced::None );
@@ -141,8 +143,8 @@ namespace dbaui
s_aSupport[ ::dbaccess::DST_EVOLUTION_LDAP ] = InitAdvanced( InitAdvanced::None );
s_aSupport[ ::dbaccess::DST_KAB ] = InitAdvanced( InitAdvanced::None );
s_aSupport[ ::dbaccess::DST_MACAB ] = InitAdvanced( InitAdvanced::None );
- s_aSupport[ ::dbaccess::DST_MSACCESS_2007 ] = InitAdvanced( 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0 );
- s_aSupport[ ::dbaccess::DST_EMBEDDED_HSQLDB ] = InitAdvanced( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1 );
+ s_aSupport[ ::dbaccess::DST_MSACCESS_2007 ] = InitAdvanced( 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0 );
+ s_aSupport[ ::dbaccess::DST_EMBEDDED_HSQLDB ] = InitAdvanced( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0 );
s_aSupport[ ::dbaccess::DST_USERDEFINE1 ] = InitAdvanced( InitAdvanced::AllButIgnoreCurrency );
s_aSupport[ ::dbaccess::DST_USERDEFINE2 ] = InitAdvanced( InitAdvanced::AllButIgnoreCurrency );
s_aSupport[ ::dbaccess::DST_USERDEFINE3 ] = InitAdvanced( InitAdvanced::AllButIgnoreCurrency );
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx
index e84927a15690..d1c056b6e4a3 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -454,17 +454,13 @@ namespace dbaui
aInfo = dbtools::SQLExceptionInfo(aSQLException);
// more like a hack, insert an empty message
- OExtensionNotPresentDialog aDlg(m_pDialogParent, m_xORB);
-
- String sText = aDlg.getText();
+ String sText( ModuleRes( RID_STR_EXTENSION_NOT_PRESENT ) );
sText = sText.GetToken(0,'\n');
aInfo.prepend(sText);
String sMessage = String(ModuleRes(STR_COULDNOTOPEN_LINKEDDOC));
sMessage.SearchAndReplaceAscii("$file$",_rLinkName);
aInfo.prepend(sMessage);
- // OExtensionNotPresentDialog aDlg(m_pDialogParent, m_xORB);
- // aDlg.Execute();
}
catch(Exception& e)
{
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 56f52c986253..2ae24b6f6423 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -692,11 +692,9 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const ::rtl::OUString& _sColumnName,
sal_uInt16 nTabCount = 0;
if ( !static_cast<OQueryTableView*>(getDesignView()->getTableView())->FindTableFromField(_sColumnName,_pEntry,nTabCount) ) // error occured: column not in table window
{
- String sTitle(ModuleRes(STR_STAT_WARNING));
String sErrorMsg(ModuleRes(RID_STR_FIELD_DOESNT_EXIST));
sErrorMsg.SearchAndReplaceAscii("$name$",_sColumnName);
- OSQLMessageBox aDlg(this,sTitle,sErrorMsg,WB_OK | WB_DEF_OK,OSQLMessageBox::Warning);
- aDlg.Execute();
+ OSQLWarningBox( this, sErrorMsg ).Execute();
bError = sal_True;
}
else
@@ -772,10 +770,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
// something different which we have to check (may be a select statement)
String sErrorMessage( ModuleRes( STR_QRY_COLUMN_NOT_FOUND ) );
sErrorMessage.SearchAndReplaceAscii("$name$",_sFieldName);
- OSQLMessageBox aDlg( this,
- String( ModuleRes( STR_STAT_WARNING ) ), sErrorMessage,
- WB_OK | WB_DEF_OK, OSQLMessageBox::Warning );
- aDlg.Execute();
+ OSQLWarningBox( this, sErrorMessage ).Execute();
return sal_True;
}
@@ -964,10 +959,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
{ // the field could not be isnerted
String sErrorMessage( ModuleRes( RID_STR_FIELD_DOESNT_EXIST ) );
sErrorMessage.SearchAndReplaceAscii("$name$",aSelEntry->GetField());
- OSQLMessageBox aDlg( this,
- String( ModuleRes( STR_STAT_WARNING ) ), sErrorMessage,
- WB_OK | WB_DEF_OK, OSQLMessageBox::Warning );
- aDlg.Execute();
+ OSQLWarningBox( this, sErrorMessage ).Execute();
bError = sal_True;
}
}
@@ -1238,9 +1230,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
{
if ( !m_bDisableErrorBox )
{
- String sTitle(ModuleRes(STR_STAT_WARNING));
- OSQLMessageBox aDlg(this,sTitle,aErrorMsg,WB_OK | WB_DEF_OK,OSQLMessageBox::Warning);
- aDlg.Execute();
+ OSQLWarningBox( this, aErrorMsg ).Execute();
}
bError = sal_True;
}
@@ -1249,9 +1239,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
{
if ( !m_bDisableErrorBox )
{
- String sTitle(ModuleRes(STR_STAT_WARNING));
- OSQLMessageBox aDlg(this,sTitle,aErrorMsg,WB_OK | WB_DEF_OK,OSQLMessageBox::Warning);
- aDlg.Execute();
+ OSQLWarningBox( this, aErrorMsg ).Execute();
}
bError = sal_True;
}
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 48f51b31d5fd..5b6be38be4a9 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -1337,9 +1337,7 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs)
if ( !editingCommand() && !haveDataSource() )
{
String aMessage(ModuleRes(STR_DATASOURCE_DELETED));
- String sTitle(ModuleRes(STR_STAT_WARNING));
- OSQLMessageBox aMsg(getView(),sTitle,aMessage);
- aMsg.Execute();
+ OSQLWarningBox( getView(), aMessage ).Execute();
return false;
}
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index 8572ff867f41..b9b599c1c8cc 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -255,9 +255,7 @@ void ORelationController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue
if(!::dbaui::checkDataSourceAvailable(::comphelper::getString(getDataSource()->getPropertyValue(PROPERTY_NAME)),getORB()))
{
String aMessage(ModuleRes(STR_DATASOURCE_DELETED));
- String sTitle(ModuleRes(STR_STAT_WARNING));
- OSQLMessageBox aMsg(getView(),sTitle,aMessage);
- aMsg.Execute();
+ OSQLWarningBox( getView(), aMessage ).Execute();
}
else
{
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 633a7ed45b52..82d42ccc87de 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -375,7 +375,7 @@ void ORelationTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const
// -----------------------------------------------------------------------------
void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin )
{
- OSQLMessageBox aDlg(this,ModuleRes(STR_QUERY_REL_DELETE_WINDOW),String(),WB_YES_NO|WB_DEF_YES,OSQLMessageBox::Warning);
+ OSQLWarningBox aDlg( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES );
if ( m_bInRemove || aDlg.Execute() == RET_YES )
{
m_pView->getController().getUndoMgr()->Clear();
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 33990f5f296a..d81cf5f9a5cf 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -398,9 +398,7 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs)
if (!xTablesSup.is())
{
String aMessage(ModuleRes(STR_TABLEDESIGN_CONNECTION_MISSING));
- String sTitle(ModuleRes(STR_STAT_WARNING));
- OSQLMessageBox aMsg(getView(),sTitle,aMessage);
- aMsg.Execute();
+ OSQLWarningBox( getView(), aMessage ).Execute();
return sal_False;
}
@@ -642,8 +640,7 @@ void OTableController::impl_initialize()
}
catch(const SQLException&)
{
- OSQLMessageBox aErr(getView(),ModuleRes(STR_STAT_WARNING),ModuleRes(STR_NO_TYPE_INFO_AVAILABLE));
- aErr.Execute();
+ OSQLWarningBox( getView(), ModuleRes( STR_NO_TYPE_INFO_AVAILABLE ) ).Execute();
throw;
}
try
@@ -1109,9 +1106,7 @@ sal_Bool OTableController::checkColumns(sal_Bool _bNew) throw(::com::sun::star::
{
String strMessage = String(ModuleRes(STR_TABLEDESIGN_DUPLICATE_NAME));
strMessage.SearchAndReplaceAscii("$column$", pFieldDesc->GetName());
- String sTitle(ModuleRes(STR_STAT_WARNING));
- OSQLMessageBox aMsg(getView(),sTitle,strMessage,WB_OK | WB_DEF_OK,OSQLMessageBox::Error);
- aMsg.Execute();
+ OSQLWarningBox( getView(), strMessage ).Execute();
return sal_False;
}
}
@@ -1257,10 +1252,9 @@ void OTableController::alterColumns()
{
String aMessage( ModuleRes( STR_TABLEDESIGN_ALTER_ERROR ) );
aMessage.SearchAndReplaceAscii( "$column$", pField->GetName() );
- String sTitle( ModuleRes( STR_STAT_WARNING ) );
SQLExceptionInfo aError( ::cppu::getCaughtException() );
- OSQLMessageBox aMsg( getView(), sTitle, aMessage, WB_YES_NO | WB_DEF_YES , OSQLMessageBox::Warning, &aError );
+ OSQLWarningBox aMsg( getView(), aMessage, WB_YES_NO | WB_DEF_YES , &aError );
bNotOk = aMsg.Execute() == RET_YES;
}
else
@@ -1336,8 +1330,7 @@ void OTableController::alterColumns()
{
String aMessage(ModuleRes(STR_TABLEDESIGN_ALTER_ERROR));
aMessage.SearchAndReplaceAscii("$column$",pField->GetName());
- String sTitle(ModuleRes(STR_STAT_WARNING));
- OSQLMessageBox aMsg(getView(),sTitle,aMessage,WB_YES_NO|WB_DEF_YES,OSQLMessageBox::Warning);
+ OSQLWarningBox aMsg( getView(), aMessage, WB_YES_NO | WB_DEF_YES );
if ( aMsg.Execute() != RET_YES )
{
Reference<XPropertySet> xNewColumn(xIdxColumns->getByIndex(nPos),UNO_QUERY_THROW);
diff --git a/reportdesign/inc/RptDef.hxx b/reportdesign/inc/RptDef.hxx
index e86b3134cab8..9b30bef5ade3 100644
--- a/reportdesign/inc/RptDef.hxx
+++ b/reportdesign/inc/RptDef.hxx
@@ -46,6 +46,11 @@ FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
namespace rptui
{
+// not all used at the moment
+#define RPT_LAYER_FRONT 0
+#define RPT_LAYER_BACK 1
+#define RPT_LAYER_HIDDEN 2
+
const UINT32 ReportInventor = UINT32('R')*0x00000001+
UINT32('P')*0x00000100+
diff --git a/reportdesign/inc/RptObject.hxx b/reportdesign/inc/RptObject.hxx
index 50e0afa4afb3..87778659ea23 100644
--- a/reportdesign/inc/RptObject.hxx
+++ b/reportdesign/inc/RptObject.hxx
@@ -280,6 +280,10 @@ public:
virtual UINT16 GetObjIdentifier() const;
virtual UINT32 GetObjInventor() const;
virtual SdrObject* Clone() const;
+
+private:
+ void impl_setReportComponent_nothrow();
+ void impl_initializeModel_nothrow();
};
//============================================================================
diff --git a/reportdesign/inc/RptPage.hxx b/reportdesign/inc/RptPage.hxx
index 66a726bcda37..caed8c0c4eb1 100644
--- a/reportdesign/inc/RptPage.hxx
+++ b/reportdesign/inc/RptPage.hxx
@@ -46,18 +46,19 @@ class OReportModel;
class REPORTDESIGN_DLLPUBLIC OReportPage : public SdrPage
{
- OReportModel& rModel;
- ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >
- m_xSection;
+ OReportModel& rModel;
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > m_xSection;
+ bool m_bSpecialInsertMode;
+ std::vector<SdrObject*> m_aTemporaryObjectList;
OReportPage(const OReportPage&);
- bool m_bSpecialInsertMode;
- std::vector<SdrObject*> m_aTemporaryObjectList;
// methode to remove temporary objects, created by 'special mode'
// (BegDragObj)
void removeTempObject(SdrObject *_pToRemoveObj);
+ virtual ~OReportPage();
+
protected:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage();
public:
@@ -67,7 +68,6 @@ public:
,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
,FASTBOOL bMasterPage=FALSE );
- virtual ~OReportPage();
virtual SdrPage* Clone() const;
using SdrPage::Clone;
@@ -75,7 +75,7 @@ public:
virtual void NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason);
virtual SdrObject* RemoveObject(ULONG nObjNum);
- /** returns teh index inside the object list which belongs to the report component.
+ /** returns the index inside the object list which belongs to the report component.
@param _xObject the report component
*/
ULONG getIndexOf(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
diff --git a/reportdesign/inc/RptResId.hrc b/reportdesign/inc/RptResId.hrc
index 10723d4c66b8..c87ae1a9c216 100644
--- a/reportdesign/inc/RptResId.hrc
+++ b/reportdesign/inc/RptResId.hrc
@@ -228,6 +228,12 @@
#define RID_ERR_NO_OBJECTS (RID_STRING_START + 152)
#define RID_STR_AREA (RID_STRING_START + 153)
#define RID_STR_INSERT (RID_STRING_START + 154)
+#define RID_STR_UNDO_SHRINK (RID_STRING_START + 155)
+
+#define RID_STR_F_COUNTER (RID_STRING_START + 156)
+#define RID_STR_F_ACCUMULATION (RID_STRING_START + 157)
+#define RID_STR_F_MINIMUM (RID_STRING_START + 158)
+#define RID_STR_F_MAXIMUM (RID_STRING_START + 159)
// #define RID_STR_ (RID_STRING_START + 130)
@@ -263,12 +269,17 @@
#define IMG_CONDFORMAT_DLG_LCH (RID_IMAGELIST_START + 3)
#define RID_SVXIMGLIST_RPTEXPL (RID_IMAGELIST_START + 4)
#define RID_SVXIMGLIST_RPTEXPL_HC (RID_IMAGELIST_START + 5)
-#define IMG_ADDFIELD_DLG_SC (RID_IMAGELIST_START + 6)
-#define IMG_ADDFIELD_DLG_SCH (RID_IMAGELIST_START + 7)
-#define IMG_ADDFIELD_DLG_LC (RID_IMAGELIST_START + 8)
-#define IMG_ADDFIELD_DLG_LCH (RID_IMAGELIST_START + 9)
+#define IMGLST_GROUPSORT_DLG_SC (RID_IMAGELIST_START + 6)
+#define IMGLST_GROUPSORT_DLG_SCH (RID_IMAGELIST_START + 7)
+#define IMG_ADDFIELD_DLG_SC (RID_IMAGELIST_START + 8)
+#define IMG_ADDFIELD_DLG_SCH (RID_IMAGELIST_START + 9)
+#define IMG_ADDFIELD_DLG_LC (RID_IMAGELIST_START + 10)
+#define IMG_ADDFIELD_DLG_LCH (RID_IMAGELIST_START + 11)
+
+#define ADDFIELD_FL_HELP_SEPARATOR (RID_IMAGELIST_START + 12)
+#define ADDFIELD_HELP_FIELD (RID_IMAGELIST_START + 13)
-// untyped
+// untyped ---------------------------------------------------------------------
#define RID_STR_BOOL (RID_UNTYPED_START + 0 )
#define RID_STR_FORCENEWPAGE_CONST (RID_UNTYPED_START + 1 )
#define RID_STR_KEEPTOGETHER_CONST (RID_UNTYPED_START + 2)
@@ -277,4 +288,11 @@
#define RID_STR_SECTIONPAGEBREAK_CONST (RID_UNTYPED_START + 5)
#define RID_STR_TYPE_CONST (RID_UNTYPED_START + 6)
+// toolbox lists ---------------------------------------------------------------------
+
+#define SID_RPT_GROUPSORT_MOVE_UP ( RID_TOOLBOX_START + 0 )
+#define SID_RPT_GROUPSORT_MOVE_DOWN ( RID_TOOLBOX_START + 1 )
+#define SID_RPT_GROUPSORT_DELETE ( RID_TOOLBOX_START + 2 )
+
#endif // _RPTUI_DLGRESID_HRC
+
diff --git a/reportdesign/inc/UndoEnv.hxx b/reportdesign/inc/UndoEnv.hxx
index 8385ad6cd15c..af02366b3ff6 100644
--- a/reportdesign/inc/UndoEnv.hxx
+++ b/reportdesign/inc/UndoEnv.hxx
@@ -57,9 +57,15 @@ namespace rptui
protected:
virtual ~OXUndoEnvironment();
+ void SetUndoMode(sal_Bool _bUndo);
+
public:
OXUndoEnvironment(OReportModel& _rModel);
+ /**
+ Create an object ob OUndoEnvLock locks the undo possibility
+ As long as in the OUndoEnvLock scope, no undo is possible for manipulated object.
+ */
class OUndoEnvLock
{
OXUndoEnvironment& m_rUndoEnv;
@@ -68,10 +74,34 @@ namespace rptui
~OUndoEnvLock(){ m_rUndoEnv.UnLock(); }
};
+ /**
+ This is near the same as OUndoEnvLock but it is also possible to ask for the current mode.
+ UndoMode will set if SID_UNDO is called in execute()
+ */
+ class OUndoMode
+ {
+ OXUndoEnvironment& m_rUndoEnv;
+ public:
+ OUndoMode(OXUndoEnvironment& _rUndoEnv)
+ :m_rUndoEnv(_rUndoEnv)
+ {
+ m_rUndoEnv.Lock();
+ m_rUndoEnv.SetUndoMode(sal_True);
+ }
+ ~OUndoMode()
+ {
+ m_rUndoEnv.SetUndoMode(sal_False);
+ m_rUndoEnv.UnLock();
+ }
+ };
+
void Lock();
void UnLock();
sal_Bool IsLocked() const;
+ // returns sal_True is we are in UNDO
+ sal_Bool IsUndoMode() const;
+
// access control
struct Accessor { friend class OReportModel; private: Accessor() { } };
void Clear(const Accessor& _r);
diff --git a/reportdesign/inc/helpids.hrc b/reportdesign/inc/helpids.hrc
index 2366621db2e2..6026634499a1 100644
--- a/reportdesign/inc/helpids.hrc
+++ b/reportdesign/inc/helpids.hrc
@@ -120,6 +120,9 @@
#define UID_RPT_PROP_DLG_LINKFIELDS (HID_RPT_START + 81)
#define UID_RPT_PROP_FORMULA (HID_RPT_START + 82)
+#define HID_RPT_GROUPSORT_MOVE_UP (HID_RPT_START + 82)
+#define HID_RPT_GROUPSORT_MOVE_DOWN (HID_RPT_START + 83)
+#define HID_RPT_GROUPSORT_DELETE (HID_RPT_START + 84)
#if UID_RPT_PROP_FORMULA > HID_RPT_END
#error Help-Id Ueberlauf in #file, #line
diff --git a/reportdesign/inc/reportformula.hxx b/reportdesign/inc/reportformula.hxx
index f4e217acc450..18d70930edc6 100644
--- a/reportdesign/inc/reportformula.hxx
+++ b/reportdesign/inc/reportformula.hxx
@@ -99,6 +99,11 @@ namespace rptui
/// convenience alias for <code>getUndecoratedContent</code>, which asserts (in a non-product build) when used on an expression
inline ::rtl::OUString getFieldName() const;
+ /**
+ @returns "=" + getFieldName()
+ */
+ ::rtl::OUString getEqualUndecoratedContent() const;
+
/// convenience alias for <code>getUndecoratedContent</code>, which asserts (in a non-product build) when used on a field
inline ::rtl::OUString getExpression() const;
diff --git a/reportdesign/inc/rptui_slotid.hrc b/reportdesign/inc/rptui_slotid.hrc
index 472eefd523b0..68b3019f2d86 100644
--- a/reportdesign/inc/rptui_slotid.hrc
+++ b/reportdesign/inc/rptui_slotid.hrc
@@ -204,5 +204,9 @@
#define SID_SELECT_ALL_LABELS ( SID_RPTUI_START + 161 )
#define SID_SELECT_ALL_EDITS ( SID_RPTUI_START + 162 )
+#define SID_SECTION_SHRINK ( SID_RPTUI_START + 163 )
+#define SID_SECTION_SHRINK_TOP ( SID_RPTUI_START + 164 )
+#define SID_SECTION_SHRINK_BOTTOM ( SID_RPTUI_START + 165 )
+#define SID_SECTION_SHRINK_MENU ( SID_RPTUI_START + 166 )
#endif // _RPTUI_SLOTID_HRC_
diff --git a/reportdesign/source/core/api/ImageControl.cxx b/reportdesign/source/core/api/ImageControl.cxx
index c1830dd9c128..7b3147eac364 100644
--- a/reportdesign/source/core/api/ImageControl.cxx
+++ b/reportdesign/source/core/api/ImageControl.cxx
@@ -42,6 +42,7 @@
#include <tools/debug.hxx>
#include <comphelper/property.hxx>
#include "FormatCondition.hxx"
+#include <com/sun/star/awt/ImageScaleMode.hpp>
#include <com/sun/star/text/ParagraphVertAlign.hpp>
#include "ReportHelperImpl.hxx"
// =============================================================================
@@ -131,7 +132,7 @@ OImageControl::OImageControl(uno::Reference< uno::XComponentContext > const & _x
:ImageControlBase(m_aMutex)
,ImageControlPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getImageOptionals())
,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
-,m_bScaleImage(sal_False)
+,m_nScaleMode(awt::ImageScaleMode::None)
,m_bPreserveIRI(sal_True)
{
DBG_CTOR( rpt_OImageControl,NULL);
@@ -144,7 +145,7 @@ OImageControl::OImageControl(uno::Reference< uno::XComponentContext > const & _x
:ImageControlBase(m_aMutex)
,ImageControlPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getImageOptionals())
,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
-,m_bScaleImage(sal_False)
+,m_nScaleMode(awt::ImageScaleMode::None)
,m_bPreserveIRI(sal_True)
{
DBG_CTOR( rpt_OImageControl,NULL);
@@ -254,7 +255,7 @@ void SAL_CALL OImageControl::setHyperLinkName(const ::rtl::OUString & the_value)
}
// -----------------------------------------------------------------------------
-::sal_Int32 SAL_CALL OImageControl::getControlBackground() throw (::com::sun::star::beans::UnknownPropertyException, uno::RuntimeException)
+::sal_Int32 SAL_CALL OImageControl::getControlBackground() throw (beans::UnknownPropertyException, uno::RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
return m_aProps.aFormatProperties.m_bBackgroundTransparent ? COL_TRANSPARENT : m_aProps.aFormatProperties.nBackgroundColor;
@@ -364,16 +365,6 @@ uno::Reference< util::XCloneable > SAL_CALL OImageControl::createClone( ) throw
// -----------------------------------------------------------------------------
// XImageControl
-::sal_Bool SAL_CALL OImageControl::getScaleImage() throw (uno::RuntimeException)
-{
- ::osl::MutexGuard aGuard(m_aMutex);
- return m_bScaleImage;
-}
-// -----------------------------------------------------------------------------
-void SAL_CALL OImageControl::setScaleImage( ::sal_Bool _scaleimage ) throw (uno::RuntimeException)
-{
- set(PROPERTY_SCALEIMAGE,_scaleimage,m_bScaleImage);
-}
// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL OImageControl::getImageURL() throw (uno::RuntimeException)
{
@@ -488,6 +479,19 @@ void SAL_CALL OImageControl::setSize( const awt::Size& aSize ) throw (beans::Pro
return ::rtl::OUString();
}
// -----------------------------------------------------------------------------
+::sal_Int16 SAL_CALL OImageControl::getScaleMode() throw (uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard(m_aMutex);
+ return m_nScaleMode;
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL OImageControl::setScaleMode( ::sal_Int16 _scalemode ) throw (lang::IllegalArgumentException, uno::RuntimeException)
+{
+ if ( _scalemode < awt::ImageScaleMode::None ||_scalemode > awt::ImageScaleMode::Anisotropic )
+ throw lang::IllegalArgumentException();
+ set(PROPERTY_SCALEMODE,_scalemode,m_nScaleMode);
+}
+// -----------------------------------------------------------------------------
::sal_Bool SAL_CALL OImageControl::getPreserveIRI() throw (uno::RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 3ec6585c2931..c85e754eb63c 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -71,15 +71,12 @@
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/task/ErrorCodeIOException.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
-#ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
#include "corestrings.hrc"
-#endif
#include "Groups.hxx"
+#include "RptDef.hxx"
#include "Section.hxx"
#include "FixedLine.hxx"
-#ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
#include "core_resource.hrc"
-#endif
#include "core_resource.hxx"
#include "Tools.hxx"
#include <tools/debug.hxx>
@@ -679,8 +676,10 @@ void OReportDefinition::init()
m_pImpl->m_pReportModel->GetItemPool().FreezeIdRanges();
m_pImpl->m_pReportModel->SetScaleUnit( MAP_100TH_MM );
SdrLayerAdmin& rAdmin = m_pImpl->m_pReportModel->GetLayerAdmin();
- rAdmin.NewStandardLayer();
- rAdmin.NewLayer( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "HiddenLayer" ) ) );
+ rAdmin.NewStandardLayer(RPT_LAYER_FRONT);
+ rAdmin.NewLayer(UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "back" ) ), RPT_LAYER_BACK );
+ rAdmin.NewLayer( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "HiddenLayer" ) ), RPT_LAYER_HIDDEN );
+
m_pImpl->m_xFunctions = new OFunctions(this,m_aProps->m_xContext);
if ( !m_pImpl->m_xStorage.is() )
m_pImpl->m_xStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
@@ -1396,14 +1395,25 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
/** property map for export info set */
comphelper::PropertyMapEntry aExportInfoMap[] =
{
- { MAP_LEN( "UsePrettyPrinting" ), 0, &::getCppuType((sal_Bool*)0), beans::PropertyAttribute::MAYBEVOID, 0},
- { MAP_LEN( "StreamName"), 0,&::getCppuType( (::rtl::OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 },
+ { MAP_LEN( "UsePrettyPrinting" ), 0, &::getCppuType((sal_Bool*)0), beans::PropertyAttribute::MAYBEVOID, 0 },
+ { MAP_LEN( "StreamName") , 0,&::getCppuType( (::rtl::OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 },
+ { MAP_LEN( "StreamRelPath") , 0,&::getCppuType( (::rtl::OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 },
+ { MAP_LEN( "BaseURI") , 0,&::getCppuType( (::rtl::OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 },
{ NULL, 0, 0, NULL, 0, 0 }
};
uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) );
SvtSaveOptions aSaveOpt;
xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UsePrettyPrinting")), uno::makeAny(aSaveOpt.IsPrettyPrinting()));
+ if ( aSaveOpt.IsSaveRelFSys() )
+ {
+ const ::rtl::OUString sVal( aDescriptor.getUnpackedValueOrDefault(aDescriptor.PROP_DOCUMENTBASEURL(),::rtl::OUString()) );
+ xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BaseURI")), uno::makeAny(sVal));
+ } // if ( aSaveOpt.IsSaveRelFSys() )
+ const ::rtl::OUString sHierarchicalDocumentName( aDescriptor.getUnpackedValueOrDefault(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HierarchicalDocumentName")),::rtl::OUString()) );
+ xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath")), uno::makeAny(sHierarchicalDocumentName));
+
+
sal_Int32 nArgsLen = aDelegatorArguments.getLength();
aDelegatorArguments.realloc(nArgsLen+1);
aDelegatorArguments[nArgsLen++] <<= xInfoSet;
diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx
index 5641896dbbee..8c4413d9fd75 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -70,6 +70,7 @@ OShape::OShape(uno::Reference< uno::XComponentContext > const & _xContext)
,ShapePropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getShapeOptionals())
,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
,m_nZOrder(0)
+,m_bOpaque(sal_False)
{
DBG_CTOR( rpt_OShape,NULL);
m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_SHAPE,m_aProps.aComponent.m_xContext->getServiceManager());
@@ -83,6 +84,7 @@ OShape::OShape(uno::Reference< uno::XComponentContext > const & _xContext
,ShapePropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getShapeOptionals())
,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
,m_nZOrder(0)
+,m_bOpaque(sal_False)
,m_sServiceName(_sServiceName)
{
DBG_CTOR( rpt_OShape,NULL);
@@ -93,7 +95,7 @@ OShape::OShape(uno::Reference< uno::XComponentContext > const & _xContext
uno::Reference<beans::XPropertySet> xProp(_xShape,uno::UNO_QUERY);
if ( xProp.is() )
{
- xProp->getPropertyValue(PROPERTY_ZORDER) >>= m_nZOrder;
+ xProp->getPropertyValue(PROPERTY_ZORDER) >>= m_nZOrder;
xProp.clear();
}
m_aProps.aComponent.setShape(_xShape,this,m_refCount);
@@ -451,6 +453,18 @@ void SAL_CALL OShape::setZOrder( ::sal_Int32 _zorder ) throw (uno::RuntimeExcept
set(PROPERTY_ZORDER,_zorder,m_nZOrder);
}
// -----------------------------------------------------------------------------
+::sal_Bool SAL_CALL OShape::getOpaque() throw (::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard(m_aMutex);
+ return m_bOpaque;
+}
+// -----------------------------------------------------------------------------
+void SAL_CALL OShape::setOpaque( ::sal_Bool _opaque ) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard(m_aMutex);
+ set(PROPERTY_OPAQUE,_opaque,m_bOpaque);
+}
+// -----------------------------------------------------------------------------
drawing::HomogenMatrix3 SAL_CALL OShape::getTransformation() throw (uno::RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
diff --git a/reportdesign/source/core/inc/ImageControl.hxx b/reportdesign/source/core/inc/ImageControl.hxx
index 5f8b11dfa6ff..c2f21c7fb11a 100644
--- a/reportdesign/source/core/inc/ImageControl.hxx
+++ b/reportdesign/source/core/inc/ImageControl.hxx
@@ -55,7 +55,7 @@ namespace reportdesign
friend class OShapeHelper;
OReportControlModel m_aProps;
::rtl::OUString m_aImageURL;
- ::sal_Bool m_bScaleImage;
+ sal_Int16 m_nScaleMode;
::sal_Bool m_bPreserveIRI;
private:
OImageControl(const OImageControl&);
@@ -119,12 +119,12 @@ namespace reportdesign
virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
// XImageControl
- virtual ::sal_Bool SAL_CALL getScaleImage() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setScaleImage( ::sal_Bool _scaleimage ) throw (::com::sun::star::uno::RuntimeException);
virtual ::rtl::OUString SAL_CALL getImageURL() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getPreserveIRI() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPreserveIRI( ::sal_Bool _preserveiri ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getScaleMode() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setScaleMode( ::sal_Int16 _scalemode ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
// XImageProducerSupplier
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer > SAL_CALL getImageProducer( ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/reportdesign/source/core/inc/Shape.hxx b/reportdesign/source/core/inc/Shape.hxx
index 02328b9839b3..b2a5353214d7 100644
--- a/reportdesign/source/core/inc/Shape.hxx
+++ b/reportdesign/source/core/inc/Shape.hxx
@@ -59,6 +59,7 @@ namespace reportdesign
OReportControlModel m_aProps;
com::sun::star::drawing::HomogenMatrix3 m_Transformation;
::sal_Int32 m_nZOrder;
+ ::sal_Bool m_bOpaque;
::rtl::OUString m_sServiceName;
::rtl::OUString m_CustomShapeEngine;
@@ -125,6 +126,9 @@ namespace reportdesign
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCustomShapeGeometry() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setCustomShapeGeometry( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _customshapegeometry ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL getOpaque() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setOpaque( ::sal_Bool _opaque ) throw (::com::sun::star::uno::RuntimeException);
+
// XShapeDescriptor
virtual ::rtl::OUString SAL_CALL getShapeType( ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/reportdesign/source/core/inc/Tools.hxx b/reportdesign/source/core/inc/Tools.hxx
index 92c721dbc049..f549582019b2 100644
--- a/reportdesign/source/core/inc/Tools.hxx
+++ b/reportdesign/source/core/inc/Tools.hxx
@@ -37,6 +37,10 @@
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/report/XFixedText.hpp>
+#include <com/sun/star/report/XFormattedField.hpp>
+
+
#include "Section.hxx"
#include "corestrings.hrc"
@@ -118,19 +122,26 @@ namespace reportdesign
return ::com::sun::star::awt::Size(_pShape->m_aProps.aComponent.m_nWidth,_pShape->m_aProps.aComponent.m_nHeight);
}
- template<typename T> static void setPosition( const ::com::sun::star::awt::Point& aPosition ,T* _pShape)
+ template<typename T> static void setPosition( const ::com::sun::star::awt::Point& _aPosition ,T* _pShape)
{
- OSL_ENSURE(aPosition.X >= 0 && aPosition.Y >= 0,"Illegal position!");
+ // we know it is not allowed that the position in smaller 0, but in NbcMove() it will handled right.
+ // only at 'Undo' it is possible to short set the position smaller 0
+ // OSL_ENSURE(_aPosition.X >= 0 && _aPosition.Y >= 0,"set to Illegal position!");
::osl::MutexGuard aGuard(_pShape->m_aMutex);
+ ::com::sun::star::awt::Point aOldPos;
+ aOldPos.X = _pShape->m_aProps.aComponent.m_nPosX;
+ aOldPos.Y = _pShape->m_aProps.aComponent.m_nPosY;
+
+ ::com::sun::star::awt::Point aPosition(_aPosition);
if ( _pShape->m_aProps.aComponent.m_xShape.is() )
{
- ::com::sun::star::awt::Point aOldPos = _pShape->m_aProps.aComponent.m_xShape->getPosition();
+ aOldPos = _pShape->m_aProps.aComponent.m_xShape->getPosition();
_pShape->m_aProps.aComponent.m_nPosX = aOldPos.X;
_pShape->m_aProps.aComponent.m_nPosY = aOldPos.Y;
_pShape->m_aProps.aComponent.m_xShape->setPosition(aPosition);
}
- _pShape->set(PROPERTY_POSITIONX,aPosition.X,_pShape->m_aProps.aComponent.m_nPosX);
- _pShape->set(PROPERTY_POSITIONY,aPosition.Y,_pShape->m_aProps.aComponent.m_nPosY);
+ _pShape->set(PROPERTY_POSITIONX,aPosition.X,aOldPos.X);
+ _pShape->set(PROPERTY_POSITIONY,aPosition.Y,aOldPos.Y);
}
template<typename T> static ::com::sun::star::awt::Point getPosition(T* _pShape)
{
@@ -138,7 +149,7 @@ namespace reportdesign
if ( _pShape->m_aProps.aComponent.m_xShape.is() )
{
::com::sun::star::awt::Point aPosition = _pShape->m_aProps.aComponent.m_xShape->getPosition();
- OSL_ENSURE(aPosition.X >= 0 && aPosition.Y >= 0,"Illegal position!");
+// OSL_ENSURE(aPosition.X >= 0 && aPosition.Y >= 0,"Illegal position!");
return aPosition;
}
return ::com::sun::star::awt::Point(_pShape->m_aProps.aComponent.m_nPosX,_pShape->m_aProps.aComponent.m_nPosY);
diff --git a/reportdesign/source/core/misc/reportformula.cxx b/reportdesign/source/core/misc/reportformula.cxx
index f99919f2e941..7bbd76f31796 100644
--- a/reportdesign/source/core/misc/reportformula.cxx
+++ b/reportdesign/source/core/misc/reportformula.cxx
@@ -177,6 +177,15 @@ namespace rptui
m_sUndecoratedContent = _rHd.m_sUndecoratedContent;
return *this;
}
+ //--------------------------------------------------------------------
+ ::rtl::OUString ReportFormula::getEqualUndecoratedContent() const
+ {
+ ::rtl::OUStringBuffer aBuffer;
+ aBuffer.appendAscii( "=" );
+ aBuffer.append( getUndecoratedContent() );
+ return aBuffer.makeStringAndClear();
+ }
+
//........................................................................
} // namespace rptui
//........................................................................
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 1a5f7ebcde62..b5974a226341 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -67,9 +67,11 @@
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
#include <com/sun/star/chart2/data/DatabaseDataProvider.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/report/XFormattedField.hpp>
#include <comphelper/genericpropertyset.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/property.hxx>
+#include <tools/diagnose_ex.h>
#include "PropertyForward.hxx"
#include <connectivity/dbtools.hxx>
#include "UndoActions.hxx"
@@ -86,6 +88,7 @@ using namespace beans;
using namespace reportdesign;
using namespace container;
using namespace script;
+using namespace report;
//----------------------------------------------------------------------------
sal_uInt16 OObjectBase::getObjectType(const uno::Reference< report::XReportComponent>& _xComponent)
{
@@ -151,6 +154,16 @@ SdrObject* OObjectBase::createObject(const uno::Reference< report::XReportCompon
break;
case OBJ_CUSTOMSHAPE:
pNewObj = OCustomShape::Create( _xComponent );
+ try
+ {
+ sal_Bool bOpaque = sal_False;
+ _xComponent->getPropertyValue(PROPERTY_OPAQUE) >>= bOpaque;
+ pNewObj->SetLayer(bOpaque ? RPT_LAYER_FRONT : RPT_LAYER_BACK);
+ }
+ catch(const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
break;
case OBJ_DLG_SUBREPORT:
case OBJ_OLE2:
@@ -563,6 +576,8 @@ OUnoObject::OUnoObject(const ::rtl::OUString& _sComponentName
,m_nObjectType(_nObjectType)
{
DBG_CTOR( rpt_OUnoObject, NULL);
+ if ( rModelName.getLength() )
+ impl_initializeModel_nothrow();
}
//----------------------------------------------------------------------------
OUnoObject::OUnoObject(const uno::Reference< report::XReportComponent>& _xComponent
@@ -574,6 +589,9 @@ OUnoObject::OUnoObject(const uno::Reference< report::XReportComponent>& _xCompon
{
DBG_CTOR( rpt_OUnoObject, NULL);
mxUnoShape = uno::Reference< uno::XInterface >(_xComponent,uno::UNO_QUERY);
+
+ if ( rModelName.getLength() )
+ impl_initializeModel_nothrow();
}
//----------------------------------------------------------------------------
OUnoObject::~OUnoObject()
@@ -582,6 +600,40 @@ OUnoObject::~OUnoObject()
//mxUnoShape = uno::WeakReference< uno::XInterface >();
}
// -----------------------------------------------------------------------------
+void OUnoObject::impl_initializeModel_nothrow()
+{
+ try
+ {
+ Reference< XFormattedField > xFormatted( m_xReportComponent, UNO_QUERY );
+ if ( xFormatted.is() )
+ {
+ const Reference< XPropertySet > xModelProps( GetUnoControlModel(), UNO_QUERY_THROW );
+ const ::rtl::OUString sTreatAsNumberProperty = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TreatAsNumber" ) );
+ xModelProps->setPropertyValue( sTreatAsNumberProperty, makeAny( sal_False ) );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+// -----------------------------------------------------------------------------
+void OUnoObject::impl_setReportComponent_nothrow()
+{
+ if ( m_xReportComponent.is() )
+ return;
+
+ OReportModel* pReportModel = static_cast<OReportModel*>(GetModel());
+ OSL_ENSURE( pReportModel, "OUnoObject::impl_setReportComponent_nothrow: no report model!" );
+ if ( !pReportModel )
+ return;
+
+ OXUndoEnvironment::OUndoEnvLock aLock( pReportModel->GetUndoEnv() );
+ m_xReportComponent.set(getUnoShape(),uno::UNO_QUERY);
+
+ impl_initializeModel_nothrow();
+}
+// -----------------------------------------------------------------------------
UINT16 OUnoObject::GetObjIdentifier() const
{
return UINT16(m_nObjectType);
@@ -623,14 +675,47 @@ void OUnoObject::NbcMove( const Size& rSize )
// stop listening
OObjectBase::EndListening(sal_False);
+ bool bPositionFixed = false;
+ Size aUndoSize(0,0);
+ bool bUndoMode = false;
if ( m_xReportComponent.is() )
{
OReportModel* pRptModel = static_cast<OReportModel*>(GetModel());
+ if (pRptModel->GetUndoEnv().IsUndoMode())
+ {
+ // if we are locked from outside, then we must not handle wrong moves, we are in UNDO mode
+ bUndoMode = true;
+ }
OXUndoEnvironment::OUndoEnvLock aLock(pRptModel->GetUndoEnv());
- m_xReportComponent->setPositionX(m_xReportComponent->getPositionX() + rSize.A());
- m_xReportComponent->setPositionY(m_xReportComponent->getPositionY() + rSize.B());
- }
+ // LLA: why there exists getPositionX and getPositionY and NOT getPosition() which return a Point?
+ int nNewX = m_xReportComponent->getPositionX() + rSize.A();
+ // can this hinder us to set components outside the area?
+ // if (nNewX < 0)
+ // {
+ // nNewX = 0;
+ // }
+ m_xReportComponent->setPositionX(nNewX);
+ int nNewY = m_xReportComponent->getPositionY() + rSize.B();
+ if (nNewY < 0 && !bUndoMode)
+ {
+ aUndoSize.B() = abs(nNewY);
+ bPositionFixed = true;
+ nNewY = 0;
+ }
+ m_xReportComponent->setPositionY(nNewY);
+ }
+ if (bPositionFixed)
+ {
+ // OReportModel* pRptModel = static_cast<OReportModel*>(GetModel());
+ // if ( pRptModel )
+ // {
+ // if (! pRptModel->GetUndoEnv().IsLocked())
+ // {
+ GetModel()->AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoMoveObject(*this, aUndoSize));
+ // }
+ // }
+ }
// set geometry properties
SetPropsFromRect(GetLogicRect());
@@ -678,27 +763,23 @@ FASTBOOL OUnoObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
FASTBOOL bResult = SdrUnoObj::EndCreate(rStat, eCmd);
if ( bResult )
{
- OReportModel* pRptModel = static_cast<OReportModel*>(GetModel());
- if ( pRptModel )
+ impl_setReportComponent_nothrow();
+ // set labels
+ if ( m_xReportComponent.is() )
{
- OXUndoEnvironment::OUndoEnvLock aLock(pRptModel->GetUndoEnv());
- if ( !m_xReportComponent.is() )
- m_xReportComponent.set(getUnoShape(),uno::UNO_QUERY);
- // set labels
- if ( m_xReportComponent.is() )
+ try
{
- try
+ if ( supportsService( SERVICE_FIXEDTEXT ) )
{
- if ( supportsService( SERVICE_FIXEDTEXT ) )
- {
- m_xReportComponent->setPropertyValue( PROPERTY_LABEL, uno::makeAny(GetDefaultName(this)) );
- }
- }
- catch(const uno::Exception&)
- {
- OSL_ENSURE(0,"OUnoObject::EndCreate: Exception caught!");
+ m_xReportComponent->setPropertyValue( PROPERTY_LABEL, uno::makeAny(GetDefaultName(this)) );
}
}
+ catch(const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ impl_initializeModel_nothrow();
}
// set geometry properties
SetPropsFromRect(GetLogicRect());
@@ -804,8 +885,7 @@ void OUnoObject::CreateMediator(sal_Bool _bReverse)
{
if ( !m_xMediator.is() )
{
- if ( !m_xReportComponent.is() )
- m_xReportComponent.set(getUnoShape(),uno::UNO_QUERY);
+ impl_setReportComponent_nothrow();
Reference<XPropertySet> xControlModel(GetUnoControlModel(),uno::UNO_QUERY);
if ( !m_xMediator.is() && m_xReportComponent.is() && xControlModel.is() )
diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx
index e39b5d7957cc..1db6b8e95c98 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -58,6 +58,9 @@ OReportPage::OReportPage( OReportModel& _rModel
OReportPage::OReportPage( const OReportPage& rPage )
:SdrPage( rPage )
,rModel(rPage.rModel)
+ ,m_xSection(rPage.m_xSection)
+ ,m_bSpecialInsertMode(rPage.m_bSpecialInsertMode)
+ ,m_aTemporaryObjectList(rPage.m_aTemporaryObjectList)
{
DBG_CTOR( rpt_OReportPage,NULL);
}
@@ -83,18 +86,15 @@ ULONG OReportPage::getIndexOf(const uno::Reference< report::XReportComponent >&
DBG_CHKTHIS( rpt_OReportPage,NULL);
ULONG nCount = GetObjCount();
ULONG i = 0;
- if ( nCount != CONTAINER_ENTRY_NOTFOUND )
+ for (; i < nCount; ++i)
{
- for (; i < nCount; ++i)
+ OObjectBase* pObj = dynamic_cast<OObjectBase*>(GetObj(i));
+ OSL_ENSURE(pObj,"Invalid object found!");
+ if ( pObj && pObj->getReportComponent() == _xObject )
{
- OObjectBase* pObj = dynamic_cast<OObjectBase*>(GetObj(i));
- OSL_ENSURE(pObj,"Invalid object found!");
- if ( pObj && pObj->getReportComponent() == _xObject )
- {
- break;
- }
- } // for (; i < nCount; ++i)
- }
+ break;
+ }
+ } // for (; i < nCount; ++i)
return i;
}
//----------------------------------------------------------------------------
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx
index efcc718bfe90..4fd0fbad8dd7 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -27,6 +27,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+#include "precompiled_reportdesign.hxx"
+
#include "UndoActions.hxx"
#include "UndoEnv.hxx"
#include "formatnormalizer.hxx"
@@ -93,8 +95,6 @@ namespace rptui
return pMemFunSection;
}
-DECLARE_STL_USTRINGACCESS_MAP(bool, AllProperties);
-DECLARE_STL_STDKEY_MAP(uno::Reference< beans::XPropertySet >, AllProperties, PropertySetInfoCache);
//------------------------------------------------------------------------------
TYPEINIT1( OCommentUndoAction, SdrUndoAction );
DBG_NAME(rpt_OCommentUndoAction)
@@ -446,544 +446,8 @@ Reference< XPropertySet> OUndoPropertyReportSectionAction::getObject()
{
return m_pMemberFunction(&m_aReportHelper).get();
}
-// -----------------------------------------------------------------------------
-
-class OXUndoEnvironmentImpl
-{
- OXUndoEnvironmentImpl(OXUndoEnvironmentImpl&);
- void operator =(OXUndoEnvironmentImpl&);
-public:
- OReportModel& m_rModel;
- PropertySetInfoCache m_aPropertySetCache;
- FormatNormalizer m_aFormatNormalizer;
- ConditionUpdater m_aConditionUpdater;
- ::osl::Mutex m_aMutex;
- ::std::vector< uno::Reference< container::XChild> > m_aSections;
- oslInterlockedCount m_nLocks;
- sal_Bool m_bReadOnly;
-
- OXUndoEnvironmentImpl(OReportModel& _rModel);
-};
-
-OXUndoEnvironmentImpl::OXUndoEnvironmentImpl(OReportModel& _rModel) : m_rModel(_rModel)
- ,m_aFormatNormalizer( _rModel )
- ,m_aConditionUpdater()
- ,m_nLocks(0)
- ,m_bReadOnly(sal_False)
-{
-}
-//------------------------------------------------------------------------------
-DBG_NAME( rpt_OXUndoEnvironment );
-//------------------------------------------------------------------------------
-OXUndoEnvironment::OXUndoEnvironment(OReportModel& _rModel)
- :m_pImpl(new OXUndoEnvironmentImpl(_rModel) )
-{
- DBG_CTOR( rpt_OXUndoEnvironment,NULL);
- StartListening(m_pImpl->m_rModel);
-}
-
-//------------------------------------------------------------------------------
-OXUndoEnvironment::~OXUndoEnvironment()
-{
- DBG_DTOR( rpt_OXUndoEnvironment,NULL);
-}
-// -----------------------------------------------------------------------------
-void OXUndoEnvironment::Lock()
-{
- OSL_ENSURE(m_refCount,"Illegall call to dead object!");
- osl_incrementInterlockedCount( &m_pImpl->m_nLocks );
-}
-void OXUndoEnvironment::UnLock()
-{
- OSL_ENSURE(m_refCount,"Illegall call to dead object!");
-
- osl_decrementInterlockedCount( &m_pImpl->m_nLocks );
-}
-sal_Bool OXUndoEnvironment::IsLocked() const { return m_pImpl->m_nLocks != 0; }
-// -----------------------------------------------------------------------------
-void OXUndoEnvironment::RemoveSection(OReportPage* _pPage)
-{
- if ( _pPage )
- {
- Reference< XInterface > xSection(_pPage->getSection());
- if ( xSection.is() )
- RemoveElement( xSection );
- }
-}
-//------------------------------------------------------------------------------
-void OXUndoEnvironment::Clear(const Accessor& /*_r*/)
-{
- OUndoEnvLock aLock(*this);
-
-#if OSL_DEBUG_LEVEL > 0
- PropertySetInfoCache::iterator aIter = m_pImpl->m_aPropertySetCache.begin();
- PropertySetInfoCache::iterator aEnd = m_pImpl->m_aPropertySetCache.end();
- int ndbg_len = m_pImpl->m_aPropertySetCache.size();
- ndbg_len = ndbg_len;
- for (int idbg_ = 0; aIter != aEnd; ++aIter,++idbg_)
- {
- uno::Reference<beans::XPropertySet> xProp(aIter->first,uno::UNO_QUERY);
- xProp->getPropertySetInfo();
- int nlen = aIter->second.size();
- nlen = nlen;
- }
-#endif
- m_pImpl->m_aPropertySetCache.clear();
-
- sal_uInt16 nCount = m_pImpl->m_rModel.GetPageCount();
- sal_uInt16 i;
- for (i = 0; i < nCount; i++)
- {
- OReportPage* pPage = PTR_CAST( OReportPage, m_pImpl->m_rModel.GetPage(i) );
- RemoveSection(pPage);
- }
-
- nCount = m_pImpl->m_rModel.GetMasterPageCount();
- for (i = 0; i < nCount; i++)
- {
- OReportPage* pPage = PTR_CAST( OReportPage, m_pImpl->m_rModel.GetMasterPage(i) );
- RemoveSection(pPage);
- }
-
- m_pImpl->m_aSections.clear();
-
- if (IsListening(m_pImpl->m_rModel))
- EndListening(m_pImpl->m_rModel);
-}
-//------------------------------------------------------------------------------
-void OXUndoEnvironment::ModeChanged()
-{
- m_pImpl->m_bReadOnly = !m_pImpl->m_bReadOnly;
-
- if (!m_pImpl->m_bReadOnly)
- StartListening(m_pImpl->m_rModel);
- else
- EndListening(m_pImpl->m_rModel);
-}
-//------------------------------------------------------------------------------
-void OXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
-{
- if (rHint.ISA(SfxSimpleHint) && ((SfxSimpleHint&)rHint).GetId() == SFX_HINT_MODECHANGED )
- ModeChanged();
-}
-// -----------------------------------------------------------------------------
-// XEventListener
-//------------------------------------------------------------------------------
-void SAL_CALL OXUndoEnvironment::disposing(const EventObject& e) throw( RuntimeException )
-{
- // check if it's an object we have cached informations about
- Reference< XPropertySet > xSourceSet(e.Source, UNO_QUERY);
- if ( xSourceSet.is() )
- {
- uno::Reference< report::XSection> xSection(xSourceSet,uno::UNO_QUERY);
- if ( xSection.is() )
- RemoveSection(xSection);
- else
- RemoveElement(xSourceSet);
- /*if (!m_pImpl->m_aPropertySetCache.empty())
- m_pImpl->m_aPropertySetCache.erase(xSourceSet);*/
- }
-}
-
-// XPropertyChangeListener
-//------------------------------------------------------------------------------
-void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEvent ) throw(uno::RuntimeException)
-{
- ::osl::ClearableMutexGuard aGuard( m_pImpl->m_aMutex );
-
- if ( IsLocked() )
- return;
-
- Reference< XPropertySet > xSet( _rEvent.Source, UNO_QUERY );
- if (!xSet.is())
- return;
-
- dbaui::OSingleDocumentController* pController = m_pImpl->m_rModel.getController();
- if ( !pController )
- return;
-
- // no Undo for transient and readonly props.
- // let's see if we know something about the set
-#if OSL_DEBUG_LEVEL > 0
- int nlen = m_pImpl->m_aPropertySetCache.size();
- nlen = nlen;
-#endif
- PropertySetInfoCache::iterator aSetPos = m_pImpl->m_aPropertySetCache.find(xSet);
- if (aSetPos == m_pImpl->m_aPropertySetCache.end())
- {
- AllProperties aNewEntry;
- aSetPos = m_pImpl->m_aPropertySetCache.insert(PropertySetInfoCache::value_type(xSet,aNewEntry)).first;
- DBG_ASSERT(aSetPos != m_pImpl->m_aPropertySetCache.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
- }
- if ( aSetPos == m_pImpl->m_aPropertySetCache.end() )
- return;
-
- // now we have access to the cached info about the set
- // let's see what we know about the property
- AllProperties& rPropInfos = aSetPos->second;
- AllPropertiesIterator aPropertyPos = rPropInfos.find( _rEvent.PropertyName );
- if (aPropertyPos == rPropInfos.end())
- { // nothing 'til now ... have to change this ....
- // the attributes
- INT32 nAttributes = xSet->getPropertySetInfo()->getPropertyByName( _rEvent.PropertyName ).Attributes;
- bool bTransReadOnly = ((nAttributes & PropertyAttribute::READONLY) != 0) || ((nAttributes & PropertyAttribute::TRANSIENT) != 0);
-
- // insert the new entry
- aPropertyPos = rPropInfos.insert( AllProperties::value_type( _rEvent.PropertyName, bTransReadOnly ) ).first;
- DBG_ASSERT(aPropertyPos != rPropInfos.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
- }
-
- implSetModified();
-
- // now we have access to the cached info about the property affected
- // and are able to decide wether or not we need an undo action
-
- // no UNDO for transient/readonly properties
- if ( aPropertyPos->second )
- return;
-
- // give components with sub responsibilities a chance
- m_pImpl->m_aFormatNormalizer.notifyPropertyChange( _rEvent );
- m_pImpl->m_aConditionUpdater.notifyPropertyChange( _rEvent );
-
- aGuard.clear();
- // TODO: this is a potential race condition: two threads here could in theory
- // add their undo actions out-of-order
-
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
- ORptUndoPropertyAction* pUndo = NULL;
- try
- {
- uno::Reference< report::XSection> xSection( xSet, uno::UNO_QUERY );
- if ( xSection.is() )
- {
- uno::Reference< report::XGroup> xGroup = xSection->getGroup();
- if ( xGroup.is() )
- pUndo = new OUndoPropertyGroupSectionAction( m_pImpl->m_rModel, _rEvent, OGroupHelper::getMemberFunction( xSection ), xGroup );
- else
- pUndo = new OUndoPropertyReportSectionAction( m_pImpl->m_rModel, _rEvent, OReportHelper::getMemberFunction( xSection ), xSection->getReportDefinition() );
- }
- }
- catch(const Exception&)
- {
- DBG_UNHANDLED_EXCEPTION();
- }
-
- if ( pUndo == NULL )
- pUndo = new ORptUndoPropertyAction( m_pImpl->m_rModel, _rEvent );
-
- pController->addUndoActionAndInvalidate(pUndo);
- pController->InvalidateAll();
-}
-// -----------------------------------------------------------------------------
-::std::vector< uno::Reference< container::XChild> >::const_iterator OXUndoEnvironment::getSection(const Reference<container::XChild>& _xContainer) const
-{
- ::std::vector< uno::Reference< container::XChild> >::const_iterator aFind = m_pImpl->m_aSections.end();
- if ( _xContainer.is() )
- {
- aFind = ::std::find(m_pImpl->m_aSections.begin(),m_pImpl->m_aSections.end(),_xContainer);
-
- if ( aFind == m_pImpl->m_aSections.end() )
- {
- Reference<container::XChild> xParent(_xContainer->getParent(),uno::UNO_QUERY);
- aFind = getSection(xParent);
- }
- }
- return aFind;
-}
-// XContainerListener
-//------------------------------------------------------------------------------
-void SAL_CALL OXUndoEnvironment::elementInserted(const ContainerEvent& evt) throw(uno::RuntimeException)
-{
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
- ::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
-
- // neues Object zum lauschen
- Reference< uno::XInterface > xIface( evt.Element, UNO_QUERY );
- if ( !IsLocked() )
- {
- Reference< report::XReportComponent > xReportComponent( xIface, UNO_QUERY );
- if ( xReportComponent.is() )
- {
- Reference< report::XSection > xContainer(evt.Source,uno::UNO_QUERY);
-
- ::std::vector< uno::Reference< container::XChild> >::const_iterator aFind = getSection(xContainer.get());
-
- if ( aFind != m_pImpl->m_aSections.end() )
- {
- OUndoEnvLock aLock(*this);
- try
- {
- OReportPage* pPage = m_pImpl->m_rModel.getPage(uno::Reference< report::XSection>(*aFind,uno::UNO_QUERY));
- OSL_ENSURE(pPage,"No page could be found for section!");
- if ( pPage )
- pPage->insertObject(xReportComponent);
- }
- catch(uno::Exception&)
- {
- DBG_UNHANDLED_EXCEPTION();
- }
-
- }
- }
- else
- {
- uno::Reference< report::XFunctions> xContainer(evt.Source,uno::UNO_QUERY);
- if ( xContainer.is() )
- {
- dbaui::OSingleDocumentController* pController = m_pImpl->m_rModel.getController();
- pController->addUndoActionAndInvalidate(new OUndoContainerAction(m_pImpl->m_rModel
- ,rptui::Inserted
- ,xContainer.get()
- ,xIface
- ,RID_STR_UNDO_ADDFUNCTION));
- }
- }
- }
-
- AddElement(xIface);
-
- implSetModified();
-}
-
-//------------------------------------------------------------------------------
-void OXUndoEnvironment::implSetModified()
-{
- //if ( !IsLocked() )
- m_pImpl->m_rModel.SetModified( sal_True );
-}
-
-//------------------------------------------------------------------------------
-void SAL_CALL OXUndoEnvironment::elementReplaced(const ContainerEvent& evt) throw(uno::RuntimeException)
-{
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
- ::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
-
- Reference< XInterface > xIface(evt.ReplacedElement,uno::UNO_QUERY);
- OSL_ENSURE(xIface.is(), "OXUndoEnvironment::elementReplaced: invalid container notification!");
- RemoveElement(xIface);
-
- xIface.set(evt.Element,uno::UNO_QUERY);
- AddElement(xIface);
-
- implSetModified();
-}
-
-//------------------------------------------------------------------------------
-void SAL_CALL OXUndoEnvironment::elementRemoved(const ContainerEvent& evt) throw(uno::RuntimeException)
-{
- ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
- ::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
-
- Reference< uno::XInterface > xIface( evt.Element, UNO_QUERY );
- if ( !IsLocked() )
- {
- Reference< report::XSection > xContainer(evt.Source,uno::UNO_QUERY);
- ::std::vector< uno::Reference< container::XChild> >::const_iterator aFind = getSection(xContainer.get());
-
- Reference< report::XReportComponent > xReportComponent( xIface, UNO_QUERY );
- if ( aFind != m_pImpl->m_aSections.end() && xReportComponent.is() )
- {
- OXUndoEnvironment::OUndoEnvLock aLock(*this);
- try
- {
- OReportPage* pPage = m_pImpl->m_rModel.getPage(uno::Reference< report::XSection >( *aFind, uno::UNO_QUERY_THROW ) );
- OSL_ENSURE( pPage, "OXUndoEnvironment::elementRemoved: no page for the section!" );
- if ( pPage )
- pPage->removeSdrObject(xReportComponent);
- }
- catch(const uno::Exception&)
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- }
- else
- {
- uno::Reference< report::XFunctions> xFunctions(evt.Source,uno::UNO_QUERY);
- if ( xFunctions.is() )
- {
- dbaui::OSingleDocumentController* pController = m_pImpl->m_rModel.getController();
- pController->addUndoActionAndInvalidate(new OUndoContainerAction(m_pImpl->m_rModel
- ,rptui::Removed
- ,xFunctions.get()
- ,xIface
- ,RID_STR_UNDO_ADDFUNCTION));
- }
- }
- }
-
- if ( xIface.is() )
- RemoveElement(xIface);
-
- implSetModified();
-}
-
-//------------------------------------------------------------------------------
-void SAL_CALL OXUndoEnvironment::modified( const EventObject& /*aEvent*/ ) throw (RuntimeException)
-{
- implSetModified();
-}
-
-//------------------------------------------------------------------------------
-void OXUndoEnvironment::AddSection(const Reference< report::XSection > & _xSection)
-{
- OUndoEnvLock aLock(*this);
- try
- {
- uno::Reference<container::XChild> xChild = _xSection.get();
- uno::Reference<report::XGroup> xGroup(xChild->getParent(),uno::UNO_QUERY);
- m_pImpl->m_aSections.push_back(xChild);
- Reference< XInterface > xInt(_xSection);
- AddElement(xInt);
- }
- catch(const uno::Exception&)
- {
- DBG_UNHANDLED_EXCEPTION();
- }
-}
-
-//------------------------------------------------------------------------------
-void OXUndoEnvironment::RemoveSection(const Reference< report::XSection > & _xSection)
-{
- OUndoEnvLock aLock(*this);
- try
- {
- uno::Reference<container::XChild> xChild(_xSection.get());
- m_pImpl->m_aSections.erase(::std::remove(m_pImpl->m_aSections.begin(),m_pImpl->m_aSections.end(),
- xChild), m_pImpl->m_aSections.end());
- Reference< XInterface > xInt(_xSection);
- RemoveElement(xInt);
- }
- catch(uno::Exception&){}
-}
-
-//------------------------------------------------------------------------------
-void OXUndoEnvironment::TogglePropertyListening(const Reference< XInterface > & Element)
-{
- // am Container horchen
- Reference< XIndexAccess > xContainer(Element, UNO_QUERY);
- if (xContainer.is())
- {
- Reference< XInterface > xInterface;
- sal_Int32 nCount = xContainer->getCount();
- for(sal_Int32 i = 0;i != nCount;++i)
- {
- xInterface.set(xContainer->getByIndex( i ),uno::UNO_QUERY);
- TogglePropertyListening(xInterface);
- }
- }
-
- Reference< XPropertySet > xSet(Element, UNO_QUERY);
- if (xSet.is())
- {
- if (!m_pImpl->m_bReadOnly)
- xSet->addPropertyChangeListener( ::rtl::OUString(), this );
- else
- xSet->removePropertyChangeListener( ::rtl::OUString(), this );
- }
-}
-
-
-//------------------------------------------------------------------------------
-void OXUndoEnvironment::switchListening( const Reference< XIndexAccess >& _rxContainer, bool _bStartListening ) SAL_THROW(())
-{
- OSL_PRECOND( _rxContainer.is(), "OXUndoEnvironment::switchListening: invalid container!" );
- if ( !_rxContainer.is() )
- return;
-
- try
- {
- // also handle all children of this element
- Reference< XInterface > xInterface;
- sal_Int32 nCount = _rxContainer->getCount();
- for(sal_Int32 i = 0;i != nCount;++i)
- {
- xInterface.set(_rxContainer->getByIndex( i ),uno::UNO_QUERY);
- if ( _bStartListening )
- AddElement( xInterface );
- else
- RemoveElement( xInterface );
- }
-
- // be notified of any changes in the container elements
- Reference< XContainer > xSimpleContainer( _rxContainer, UNO_QUERY );
- // OSL_ENSURE( xSimpleContainer.is(), "OXUndoEnvironment::switchListening: how are we expected to be notified of changes in the container?" );
- if ( xSimpleContainer.is() )
- {
- if ( _bStartListening )
- xSimpleContainer->addContainerListener( this );
- else
- xSimpleContainer->removeContainerListener( this );
- }
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
-}
-
-//------------------------------------------------------------------------------
-void OXUndoEnvironment::switchListening( const Reference< XInterface >& _rxObject, bool _bStartListening ) SAL_THROW(())
-{
- OSL_PRECOND( _rxObject.is(), "OXUndoEnvironment::switchListening: how should I listen at a NULL object?" );
-
- try
- {
- if ( !m_pImpl->m_bReadOnly )
- {
- Reference< XPropertySet > xProps( _rxObject, UNO_QUERY );
- if ( xProps.is() )
- {
- if ( _bStartListening )
- xProps->addPropertyChangeListener( ::rtl::OUString(), this );
- else
- xProps->removePropertyChangeListener( ::rtl::OUString(), this );
- }
- }
-
- Reference< XModifyBroadcaster > xBroadcaster( _rxObject, UNO_QUERY );
- if ( xBroadcaster.is() )
- {
- if ( _bStartListening )
- xBroadcaster->addModifyListener( this );
- else
- xBroadcaster->removeModifyListener( this );
- }
- }
- catch( const Exception& )
- {
- //OSL_ENSURE( sal_False, "OXUndoEnvironment::switchListening: caught an exception!" );
- }
-}
-
-//------------------------------------------------------------------------------
-void OXUndoEnvironment::AddElement(const Reference< XInterface >& _rxElement )
-{
- if ( !IsLocked() )
- m_pImpl->m_aFormatNormalizer.notifyElementInserted( _rxElement );
-
- // if it's a container, start listening at all elements
- Reference< XIndexAccess > xContainer( _rxElement, UNO_QUERY );
- if ( xContainer.is() )
- switchListening( xContainer, true );
-
- switchListening( _rxElement, true );
-}
-
-//------------------------------------------------------------------------------
-void OXUndoEnvironment::RemoveElement(const Reference< XInterface >& _rxElement)
-{
- uno::Reference<beans::XPropertySet> xProp(_rxElement,uno::UNO_QUERY);
- if (!m_pImpl->m_aPropertySetCache.empty())
- m_pImpl->m_aPropertySetCache.erase(xProp);
- switchListening( _rxElement, false );
-
- Reference< XIndexAccess > xContainer( _rxElement, UNO_QUERY );
- if ( xContainer.is() )
- switchListening( xContainer, false );
-}
//============================================================================
} // rptui
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx
new file mode 100644
index 000000000000..55929333c079
--- /dev/null
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -0,0 +1,626 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: UndoActions.cxx,v $
+ * $Revision: 1.8 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "UndoActions.hxx"
+#include "UndoEnv.hxx"
+#include "formatnormalizer.hxx"
+#include "conditionupdater.hxx"
+#include "corestrings.hrc"
+#include "rptui_slotid.hrc"
+#include "RptDef.hxx"
+#include "ModuleHelper.hxx"
+#include "RptObject.hxx"
+#include "RptPage.hxx"
+#include "RptResId.hrc"
+#include "RptModel.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/script/XEventAttacherManager.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+/** === end UNO includes === **/
+
+#include <connectivity/dbtools.hxx>
+#include <svtools/smplhint.hxx>
+#include <tools/diagnose_ex.h>
+#include <comphelper/stl_types.hxx>
+#include <vcl/svapp.hxx>
+#include <dbaccess/singledoccontroller.hxx>
+#include <svx/unoshape.hxx>
+#include <vos/mutex.hxx>
+
+namespace rptui
+{
+ using namespace ::com::sun::star;
+ using namespace uno;
+ using namespace lang;
+ using namespace script;
+ using namespace beans;
+ using namespace awt;
+ using namespace util;
+ using namespace container;
+ using namespace report;
+//----------------------------------------------------------------------------
+
+
+DECLARE_STL_USTRINGACCESS_MAP(bool, AllProperties);
+DECLARE_STL_STDKEY_MAP(uno::Reference< beans::XPropertySet >, AllProperties, PropertySetInfoCache);
+
+// -----------------------------------------------------------------------------
+
+class OXUndoEnvironmentImpl
+{
+ OXUndoEnvironmentImpl(OXUndoEnvironmentImpl&);
+ void operator =(OXUndoEnvironmentImpl&);
+public:
+ OReportModel& m_rModel;
+ PropertySetInfoCache m_aPropertySetCache;
+ FormatNormalizer m_aFormatNormalizer;
+ ConditionUpdater m_aConditionUpdater;
+ ::osl::Mutex m_aMutex;
+ ::std::vector< uno::Reference< container::XChild> > m_aSections;
+ oslInterlockedCount m_nLocks;
+ sal_Bool m_bReadOnly;
+ sal_Bool m_bIsUndo;
+
+ OXUndoEnvironmentImpl(OReportModel& _rModel);
+};
+
+OXUndoEnvironmentImpl::OXUndoEnvironmentImpl(OReportModel& _rModel) : m_rModel(_rModel)
+ ,m_aFormatNormalizer( _rModel )
+ ,m_aConditionUpdater()
+ ,m_nLocks(0)
+ ,m_bReadOnly(sal_False)
+ ,m_bIsUndo(sal_False)
+{
+}
+
+//------------------------------------------------------------------------------
+DBG_NAME( rpt_OXUndoEnvironment );
+//------------------------------------------------------------------------------
+OXUndoEnvironment::OXUndoEnvironment(OReportModel& _rModel)
+ :m_pImpl(new OXUndoEnvironmentImpl(_rModel) )
+{
+ DBG_CTOR( rpt_OXUndoEnvironment,NULL);
+ StartListening(m_pImpl->m_rModel);
+}
+
+//------------------------------------------------------------------------------
+OXUndoEnvironment::~OXUndoEnvironment()
+{
+ DBG_DTOR( rpt_OXUndoEnvironment,NULL);
+}
+// -----------------------------------------------------------------------------
+void OXUndoEnvironment::Lock()
+{
+ OSL_ENSURE(m_refCount,"Illegal call to dead object!");
+ osl_incrementInterlockedCount( &m_pImpl->m_nLocks );
+}
+void OXUndoEnvironment::UnLock()
+{
+ OSL_ENSURE(m_refCount,"Illegal call to dead object!");
+
+ osl_decrementInterlockedCount( &m_pImpl->m_nLocks );
+}
+sal_Bool OXUndoEnvironment::IsLocked() const { return m_pImpl->m_nLocks != 0; }
+// -----------------------------------------------------------------------------
+void OXUndoEnvironment::RemoveSection(OReportPage* _pPage)
+{
+ if ( _pPage )
+ {
+ Reference< XInterface > xSection(_pPage->getSection());
+ if ( xSection.is() )
+ RemoveElement( xSection );
+ }
+}
+//------------------------------------------------------------------------------
+void OXUndoEnvironment::Clear(const Accessor& /*_r*/)
+{
+ OUndoEnvLock aLock(*this);
+
+#if OSL_DEBUG_LEVEL > 0
+ // TODO: LLA->OJ please describe what you are doing in this code fragment.
+ PropertySetInfoCache::iterator aIter = m_pImpl->m_aPropertySetCache.begin();
+ PropertySetInfoCache::iterator aEnd = m_pImpl->m_aPropertySetCache.end();
+ int ndbg_len = m_pImpl->m_aPropertySetCache.size();
+ ndbg_len = ndbg_len;
+ for (int idbg_ = 0; aIter != aEnd; ++aIter,++idbg_)
+ {
+ uno::Reference<beans::XPropertySet> xProp(aIter->first,uno::UNO_QUERY);
+ xProp->getPropertySetInfo();
+ int nlen = aIter->second.size();
+ nlen = nlen;
+ }
+#endif
+ m_pImpl->m_aPropertySetCache.clear();
+
+ sal_uInt16 nCount = m_pImpl->m_rModel.GetPageCount();
+ sal_uInt16 i;
+ for (i = 0; i < nCount; i++)
+ {
+ OReportPage* pPage = PTR_CAST( OReportPage, m_pImpl->m_rModel.GetPage(i) );
+ RemoveSection(pPage);
+ }
+
+ nCount = m_pImpl->m_rModel.GetMasterPageCount();
+ for (i = 0; i < nCount; i++)
+ {
+ OReportPage* pPage = PTR_CAST( OReportPage, m_pImpl->m_rModel.GetMasterPage(i) );
+ RemoveSection(pPage);
+ }
+
+ m_pImpl->m_aSections.clear();
+
+ if (IsListening(m_pImpl->m_rModel))
+ EndListening(m_pImpl->m_rModel);
+}
+
+//------------------------------------------------------------------------------
+void OXUndoEnvironment::ModeChanged()
+{
+ m_pImpl->m_bReadOnly = !m_pImpl->m_bReadOnly;
+
+ if (!m_pImpl->m_bReadOnly)
+ StartListening(m_pImpl->m_rModel);
+ else
+ EndListening(m_pImpl->m_rModel);
+}
+
+//------------------------------------------------------------------------------
+void OXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
+{
+ if (rHint.ISA(SfxSimpleHint) && ((SfxSimpleHint&)rHint).GetId() == SFX_HINT_MODECHANGED )
+ ModeChanged();
+}
+// -----------------------------------------------------------------------------
+// XEventListener
+//------------------------------------------------------------------------------
+void SAL_CALL OXUndoEnvironment::disposing(const EventObject& e) throw( RuntimeException )
+{
+ // check if it's an object we have cached informations about
+ Reference< XPropertySet > xSourceSet(e.Source, UNO_QUERY);
+ if ( xSourceSet.is() )
+ {
+ uno::Reference< report::XSection> xSection(xSourceSet,uno::UNO_QUERY);
+ if ( xSection.is() )
+ RemoveSection(xSection);
+ else
+ RemoveElement(xSourceSet);
+ /*if (!m_pImpl->m_aPropertySetCache.empty())
+ m_pImpl->m_aPropertySetCache.erase(xSourceSet);*/
+ }
+}
+
+// XPropertyChangeListener
+//------------------------------------------------------------------------------
+void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEvent ) throw(uno::RuntimeException)
+{
+ ::osl::ClearableMutexGuard aGuard( m_pImpl->m_aMutex );
+
+ if ( IsLocked() )
+ return;
+
+ Reference< XPropertySet > xSet( _rEvent.Source, UNO_QUERY );
+ if (!xSet.is())
+ return;
+
+ dbaui::OSingleDocumentController* pController = m_pImpl->m_rModel.getController();
+ if ( !pController )
+ return;
+
+ // no Undo for transient and readonly props.
+ // let's see if we know something about the set
+#if OSL_DEBUG_LEVEL > 0
+ int nlen = m_pImpl->m_aPropertySetCache.size();
+ nlen = nlen;
+#endif
+ PropertySetInfoCache::iterator aSetPos = m_pImpl->m_aPropertySetCache.find(xSet);
+ if (aSetPos == m_pImpl->m_aPropertySetCache.end())
+ {
+ AllProperties aNewEntry;
+ aSetPos = m_pImpl->m_aPropertySetCache.insert(PropertySetInfoCache::value_type(xSet,aNewEntry)).first;
+ DBG_ASSERT(aSetPos != m_pImpl->m_aPropertySetCache.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
+ }
+ if ( aSetPos == m_pImpl->m_aPropertySetCache.end() )
+ return;
+
+ // now we have access to the cached info about the set
+ // let's see what we know about the property
+ AllProperties& rPropInfos = aSetPos->second;
+ AllPropertiesIterator aPropertyPos = rPropInfos.find( _rEvent.PropertyName );
+ if (aPropertyPos == rPropInfos.end())
+ { // nothing 'til now ... have to change this ....
+ // the attributes
+ INT32 nAttributes = xSet->getPropertySetInfo()->getPropertyByName( _rEvent.PropertyName ).Attributes;
+ bool bTransReadOnly = ((nAttributes & PropertyAttribute::READONLY) != 0) || ((nAttributes & PropertyAttribute::TRANSIENT) != 0);
+
+ // insert the new entry
+ aPropertyPos = rPropInfos.insert( AllProperties::value_type( _rEvent.PropertyName, bTransReadOnly ) ).first;
+ DBG_ASSERT(aPropertyPos != rPropInfos.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
+ }
+
+ implSetModified();
+
+ // now we have access to the cached info about the property affected
+ // and are able to decide wether or not we need an undo action
+
+ // no UNDO for transient/readonly properties
+ if ( aPropertyPos->second )
+ return;
+
+ // give components with sub responsibilities a chance
+ m_pImpl->m_aFormatNormalizer.notifyPropertyChange( _rEvent );
+ m_pImpl->m_aConditionUpdater.notifyPropertyChange( _rEvent );
+
+ aGuard.clear();
+ // TODO: this is a potential race condition: two threads here could in theory
+ // add their undo actions out-of-order
+
+ ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ ORptUndoPropertyAction* pUndo = NULL;
+ try
+ {
+ uno::Reference< report::XSection> xSection( xSet, uno::UNO_QUERY );
+ if ( xSection.is() )
+ {
+ uno::Reference< report::XGroup> xGroup = xSection->getGroup();
+ if ( xGroup.is() )
+ pUndo = new OUndoPropertyGroupSectionAction( m_pImpl->m_rModel, _rEvent, OGroupHelper::getMemberFunction( xSection ), xGroup );
+ else
+ pUndo = new OUndoPropertyReportSectionAction( m_pImpl->m_rModel, _rEvent, OReportHelper::getMemberFunction( xSection ), xSection->getReportDefinition() );
+ }
+ }
+ catch(const Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ if ( pUndo == NULL )
+ pUndo = new ORptUndoPropertyAction( m_pImpl->m_rModel, _rEvent );
+
+ pController->addUndoActionAndInvalidate(pUndo);
+ pController->InvalidateAll();
+}
+// -----------------------------------------------------------------------------
+::std::vector< uno::Reference< container::XChild> >::const_iterator OXUndoEnvironment::getSection(const Reference<container::XChild>& _xContainer) const
+{
+ ::std::vector< uno::Reference< container::XChild> >::const_iterator aFind = m_pImpl->m_aSections.end();
+ if ( _xContainer.is() )
+ {
+ aFind = ::std::find(m_pImpl->m_aSections.begin(),m_pImpl->m_aSections.end(),_xContainer);
+
+ if ( aFind == m_pImpl->m_aSections.end() )
+ {
+ Reference<container::XChild> xParent(_xContainer->getParent(),uno::UNO_QUERY);
+ aFind = getSection(xParent);
+ }
+ }
+ return aFind;
+}
+// XContainerListener
+//------------------------------------------------------------------------------
+void SAL_CALL OXUndoEnvironment::elementInserted(const ContainerEvent& evt) throw(uno::RuntimeException)
+{
+ ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
+
+ // neues Object zum lauschen
+ Reference< uno::XInterface > xIface( evt.Element, UNO_QUERY );
+ if ( !IsLocked() )
+ {
+ Reference< report::XReportComponent > xReportComponent( xIface, UNO_QUERY );
+ if ( xReportComponent.is() )
+ {
+ Reference< report::XSection > xContainer(evt.Source,uno::UNO_QUERY);
+
+ ::std::vector< uno::Reference< container::XChild> >::const_iterator aFind = getSection(xContainer.get());
+
+ if ( aFind != m_pImpl->m_aSections.end() )
+ {
+ OUndoEnvLock aLock(*this);
+ try
+ {
+ OReportPage* pPage = m_pImpl->m_rModel.getPage(uno::Reference< report::XSection>(*aFind,uno::UNO_QUERY));
+ OSL_ENSURE(pPage,"No page could be found for section!");
+ if ( pPage )
+ pPage->insertObject(xReportComponent);
+ }
+ catch(uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ }
+ }
+ else
+ {
+ uno::Reference< report::XFunctions> xContainer(evt.Source,uno::UNO_QUERY);
+ if ( xContainer.is() )
+ {
+ dbaui::OSingleDocumentController* pController = m_pImpl->m_rModel.getController();
+ pController->addUndoActionAndInvalidate(new OUndoContainerAction(m_pImpl->m_rModel
+ ,rptui::Inserted
+ ,xContainer.get()
+ ,xIface
+ ,RID_STR_UNDO_ADDFUNCTION));
+ }
+ }
+ }
+
+ AddElement(xIface);
+
+ implSetModified();
+}
+
+//------------------------------------------------------------------------------
+void OXUndoEnvironment::implSetModified()
+{
+ //if ( !IsLocked() )
+ m_pImpl->m_rModel.SetModified( sal_True );
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL OXUndoEnvironment::elementReplaced(const ContainerEvent& evt) throw(uno::RuntimeException)
+{
+ ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
+
+ Reference< XInterface > xIface(evt.ReplacedElement,uno::UNO_QUERY);
+ OSL_ENSURE(xIface.is(), "OXUndoEnvironment::elementReplaced: invalid container notification!");
+ RemoveElement(xIface);
+
+ xIface.set(evt.Element,uno::UNO_QUERY);
+ AddElement(xIface);
+
+ implSetModified();
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL OXUndoEnvironment::elementRemoved(const ContainerEvent& evt) throw(uno::RuntimeException)
+{
+ ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
+
+ Reference< uno::XInterface > xIface( evt.Element, UNO_QUERY );
+ if ( !IsLocked() )
+ {
+ Reference< report::XSection > xContainer(evt.Source,uno::UNO_QUERY);
+ ::std::vector< uno::Reference< container::XChild> >::const_iterator aFind = getSection(xContainer.get());
+
+ Reference< report::XReportComponent > xReportComponent( xIface, UNO_QUERY );
+ if ( aFind != m_pImpl->m_aSections.end() && xReportComponent.is() )
+ {
+ OXUndoEnvironment::OUndoEnvLock aLock(*this);
+ try
+ {
+ OReportPage* pPage = m_pImpl->m_rModel.getPage(uno::Reference< report::XSection >( *aFind, uno::UNO_QUERY_THROW ) );
+ OSL_ENSURE( pPage, "OXUndoEnvironment::elementRemoved: no page for the section!" );
+ if ( pPage )
+ pPage->removeSdrObject(xReportComponent);
+ }
+ catch(const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+ else
+ {
+ uno::Reference< report::XFunctions> xFunctions(evt.Source,uno::UNO_QUERY);
+ if ( xFunctions.is() )
+ {
+ dbaui::OSingleDocumentController* pController = m_pImpl->m_rModel.getController();
+ pController->addUndoActionAndInvalidate(new OUndoContainerAction(m_pImpl->m_rModel
+ ,rptui::Removed
+ ,xFunctions.get()
+ ,xIface
+ ,RID_STR_UNDO_ADDFUNCTION));
+ }
+ }
+ }
+
+ if ( xIface.is() )
+ RemoveElement(xIface);
+
+ implSetModified();
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL OXUndoEnvironment::modified( const EventObject& /*aEvent*/ ) throw (RuntimeException)
+{
+ implSetModified();
+}
+
+//------------------------------------------------------------------------------
+void OXUndoEnvironment::AddSection(const Reference< report::XSection > & _xSection)
+{
+ OUndoEnvLock aLock(*this);
+ try
+ {
+ uno::Reference<container::XChild> xChild = _xSection.get();
+ uno::Reference<report::XGroup> xGroup(xChild->getParent(),uno::UNO_QUERY);
+ m_pImpl->m_aSections.push_back(xChild);
+ Reference< XInterface > xInt(_xSection);
+ AddElement(xInt);
+ }
+ catch(const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//------------------------------------------------------------------------------
+void OXUndoEnvironment::RemoveSection(const Reference< report::XSection > & _xSection)
+{
+ OUndoEnvLock aLock(*this);
+ try
+ {
+ uno::Reference<container::XChild> xChild(_xSection.get());
+ m_pImpl->m_aSections.erase(::std::remove(m_pImpl->m_aSections.begin(),m_pImpl->m_aSections.end(),
+ xChild), m_pImpl->m_aSections.end());
+ Reference< XInterface > xInt(_xSection);
+ RemoveElement(xInt);
+ }
+ catch(uno::Exception&){}
+}
+
+//------------------------------------------------------------------------------
+void OXUndoEnvironment::TogglePropertyListening(const Reference< XInterface > & Element)
+{
+ // am Container horchen
+ Reference< XIndexAccess > xContainer(Element, UNO_QUERY);
+ if (xContainer.is())
+ {
+ Reference< XInterface > xInterface;
+ sal_Int32 nCount = xContainer->getCount();
+ for(sal_Int32 i = 0;i != nCount;++i)
+ {
+ xInterface.set(xContainer->getByIndex( i ),uno::UNO_QUERY);
+ TogglePropertyListening(xInterface);
+ }
+ }
+
+ Reference< XPropertySet > xSet(Element, UNO_QUERY);
+ if (xSet.is())
+ {
+ if (!m_pImpl->m_bReadOnly)
+ xSet->addPropertyChangeListener( ::rtl::OUString(), this );
+ else
+ xSet->removePropertyChangeListener( ::rtl::OUString(), this );
+ }
+}
+
+
+//------------------------------------------------------------------------------
+void OXUndoEnvironment::switchListening( const Reference< XIndexAccess >& _rxContainer, bool _bStartListening ) SAL_THROW(())
+{
+ OSL_PRECOND( _rxContainer.is(), "OXUndoEnvironment::switchListening: invalid container!" );
+ if ( !_rxContainer.is() )
+ return;
+
+ try
+ {
+ // also handle all children of this element
+ Reference< XInterface > xInterface;
+ sal_Int32 nCount = _rxContainer->getCount();
+ for(sal_Int32 i = 0;i != nCount;++i)
+ {
+ xInterface.set(_rxContainer->getByIndex( i ),uno::UNO_QUERY);
+ if ( _bStartListening )
+ AddElement( xInterface );
+ else
+ RemoveElement( xInterface );
+ }
+
+ // be notified of any changes in the container elements
+ Reference< XContainer > xSimpleContainer( _rxContainer, UNO_QUERY );
+ // OSL_ENSURE( xSimpleContainer.is(), "OXUndoEnvironment::switchListening: how are we expected to be notified of changes in the container?" );
+ if ( xSimpleContainer.is() )
+ if ( _bStartListening )
+ xSimpleContainer->addContainerListener( this );
+ else
+ xSimpleContainer->removeContainerListener( this );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//------------------------------------------------------------------------------
+void OXUndoEnvironment::switchListening( const Reference< XInterface >& _rxObject, bool _bStartListening ) SAL_THROW(())
+{
+ OSL_PRECOND( _rxObject.is(), "OXUndoEnvironment::switchListening: how should I listen at a NULL object?" );
+
+ try
+ {
+ if ( !m_pImpl->m_bReadOnly )
+ {
+ Reference< XPropertySet > xProps( _rxObject, UNO_QUERY );
+ if ( xProps.is() )
+ if ( _bStartListening )
+ xProps->addPropertyChangeListener( ::rtl::OUString(), this );
+ else
+ xProps->removePropertyChangeListener( ::rtl::OUString(), this );
+ }
+
+ Reference< XModifyBroadcaster > xBroadcaster( _rxObject, UNO_QUERY );
+ if ( xBroadcaster.is() )
+ if ( _bStartListening )
+ xBroadcaster->addModifyListener( this );
+ else
+ xBroadcaster->removeModifyListener( this );
+ }
+ catch( const Exception& )
+ {
+ //OSL_ENSURE( sal_False, "OXUndoEnvironment::switchListening: caught an exception!" );
+ }
+}
+
+//------------------------------------------------------------------------------
+void OXUndoEnvironment::AddElement(const Reference< XInterface >& _rxElement )
+{
+ if ( !IsLocked() )
+ m_pImpl->m_aFormatNormalizer.notifyElementInserted( _rxElement );
+
+ // if it's a container, start listening at all elements
+ Reference< XIndexAccess > xContainer( _rxElement, UNO_QUERY );
+ if ( xContainer.is() )
+ switchListening( xContainer, true );
+
+ switchListening( _rxElement, true );
+}
+
+//------------------------------------------------------------------------------
+void OXUndoEnvironment::RemoveElement(const Reference< XInterface >& _rxElement)
+{
+ uno::Reference<beans::XPropertySet> xProp(_rxElement,uno::UNO_QUERY);
+ if (!m_pImpl->m_aPropertySetCache.empty())
+ m_pImpl->m_aPropertySetCache.erase(xProp);
+ switchListening( _rxElement, false );
+
+ Reference< XIndexAccess > xContainer( _rxElement, UNO_QUERY );
+ if ( xContainer.is() )
+ switchListening( xContainer, false );
+}
+
+void OXUndoEnvironment::SetUndoMode(sal_Bool _bUndo)
+{
+ m_pImpl->m_bIsUndo = _bUndo;
+}
+
+sal_Bool OXUndoEnvironment::IsUndoMode() const
+{
+ return m_pImpl->m_bIsUndo;
+}
+//============================================================================
+} // rptui
+//============================================================================
diff --git a/reportdesign/source/core/sdr/formatnormalizer.cxx b/reportdesign/source/core/sdr/formatnormalizer.cxx
index 7313d2c6989f..7ce45cb06f7a 100644
--- a/reportdesign/source/core/sdr/formatnormalizer.cxx
+++ b/reportdesign/source/core/sdr/formatnormalizer.cxx
@@ -27,6 +27,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+#include "precompiled_reportdesign.hxx"
#include "formatnormalizer.hxx"
#include "RptModel.hxx"
@@ -63,6 +64,7 @@ namespace rptui
using ::com::sun::star::sdbc::SQLException;
using ::com::sun::star::util::XNumberFormatsSupplier;
using ::com::sun::star::util::XNumberFormatTypes;
+ using ::com::sun::star::uno::makeAny;
/** === end UNO using === **/
//====================================================================
diff --git a/reportdesign/source/core/sdr/makefile.mk b/reportdesign/source/core/sdr/makefile.mk
index 6890ce6b726b..0e65a59f4e0e 100644
--- a/reportdesign/source/core/sdr/makefile.mk
+++ b/reportdesign/source/core/sdr/makefile.mk
@@ -49,8 +49,8 @@ SLOFILES= $(SLO)$/RptModel.obj \
$(SLO)$/PropertyForward.obj \
$(SLO)$/ReportDrawPage.obj \
$(SLO)$/ReportUndoFactory.obj \
+ $(SLO)$/UndoEnv.obj \
$(SLO)$/formatnormalizer.obj
-
# --- Targets ----------------------------------
.INCLUDE : target.mk
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index b9133e0cf447..add9ea18b7a8 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -323,6 +323,7 @@ ORptExport::ORptExport(const Reference< XMultiServiceFactory >& _rxMSF,sal_uInt1
UniReference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA ));
m_xParaPropMapper = new OSpecialHanldeXMLExportPropertyMapper( xPropMapper);
+ //m_xParaPropMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(*this));
::rtl::OUString sFamily( GetXMLToken(XML_PARAGRAPH) );
::rtl::OUString aPrefix( String( 'P' ) );
@@ -947,8 +948,6 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection)
AddAttribute(XML_NAMESPACE_FORM, XML_IMAGE_DATA,sTargetLocation);
}
bExportData = sal_True;
- if ( xImage->getScaleImage() )
- AddAttribute(XML_NAMESPACE_REPORT, XML_SCALE, XML_TRUE );
}
else if ( xReportDefinition.is() )
{
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index bd5cf170a5b2..1b81d87a1119 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -32,6 +32,7 @@
#include <xmloff/xmlnmspe.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/families.hxx>
+#include <xmloff/controlpropertyhdl.hxx>
#include <connectivity/dbtools.hxx>
#include <comphelper/propertysethelper.hxx>
#include <comphelper/mediadescriptor.hxx>
@@ -101,6 +102,8 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32
pHandler = new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum, ::getCppuType((const com::sun::star::drawing::TextVerticalAdjust*)0) );
}
break;
+ case (XML_SD_TYPES_START+34):
+ pHandler = new xmloff::ImageScaleModeHandler();
default:
;
}
@@ -137,6 +140,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool _
FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
MAP_CONST_P( PROPERTY_CONTROLBACKGROUNDTRANSPARENT,
FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
+ GMAP( PROPERTY_SCALEMODE,STYLE,REPEAT, (XML_SD_TYPES_START+34)|MID_FLAG_MULTI_PROPERTY, 0 ),
MAP_CONST_C_ASCII( "BorderLeft", FO, BORDER_LEFT, XML_TYPE_BORDER, 0 ),
MAP_CONST_C_ASCII( "BorderRight", FO, BORDER_RIGHT, XML_TYPE_BORDER, 0 ),
MAP_CONST_C_ASCII( "BorderTop", FO, BORDER_TOP, XML_TYPE_BORDER, 0 ),
@@ -155,6 +159,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool _
FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
MAP_CONST_C( PROPERTY_CONTROLBACKGROUNDTRANSPARENT,
FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
+ GMAP( PROPERTY_SCALEMODE,STYLE,REPEAT, (XML_SD_TYPES_START+34)|MID_FLAG_MULTI_PROPERTY, 0 ),
MAP_CONST_C_ASCII( "BorderLeft", FO, BORDER_LEFT, XML_TYPE_BORDER, 0 ),
MAP_CONST_C_ASCII( "BorderRight", FO, BORDER_RIGHT, XML_TYPE_BORDER, 0 ),
MAP_CONST_C_ASCII( "BorderTop", FO, BORDER_TOP, XML_TYPE_BORDER, 0 ),
@@ -305,7 +310,7 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const ::rtl::OUString& _sSty
{PROPERTY_FONTPITCH, static_cast<sal_uInt16>(PROPERTY_FONTPITCH.length), PROPERTY_ID_FONTPITCH, &::getCppuType(&aFont.Pitch) ,PropertyAttribute::BOUND,0},
{PROPERTY_FONTCHARWIDTH, static_cast<sal_uInt16>(PROPERTY_FONTCHARWIDTH.length), PROPERTY_ID_FONTCHARWIDTH, &::getCppuType(&aFont.CharacterWidth),PropertyAttribute::BOUND,0},
{PROPERTY_FONTWEIGHT, static_cast<sal_uInt16>(PROPERTY_FONTWEIGHT.length), PROPERTY_ID_FONTWEIGHT, &::getCppuType(&aFont.Weight) ,PropertyAttribute::BOUND,0},
- {PROPERTY_FONTSLANT, static_cast<sal_uInt16>(PROPERTY_FONTSLANT.length), PROPERTY_ID_FONTSLANT, &::getCppuType(&aFont.Slant) ,PropertyAttribute::BOUND,0},
+ {PROPERTY_CHARPOSTURE, static_cast<sal_uInt16>(PROPERTY_CHARPOSTURE.length), PROPERTY_ID_FONTSLANT, &::getCppuType(&aFont.Slant) ,PropertyAttribute::BOUND,0},
{PROPERTY_FONTUNDERLINE, static_cast<sal_uInt16>(PROPERTY_FONTUNDERLINE.length), PROPERTY_ID_FONTUNDERLINE, &::getCppuType(&aFont.Underline) ,PropertyAttribute::BOUND,0},
{PROPERTY_CHARSTRIKEOUT, static_cast<sal_uInt16>(PROPERTY_CHARSTRIKEOUT.length), PROPERTY_ID_FONTSTRIKEOUT, &::getCppuType(&aFont.Strikeout) ,PropertyAttribute::BOUND,0},
{PROPERTY_FONTORIENTATION, static_cast<sal_uInt16>(PROPERTY_FONTORIENTATION.length), PROPERTY_ID_FONTORIENTATION, &::getCppuType(&aFont.Orientation) ,PropertyAttribute::BOUND,0},
@@ -338,7 +343,7 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const ::rtl::OUString& _sSty
xProp->getPropertyValue(PROPERTY_FONTPITCH) >>= aFont.Pitch;
xProp->getPropertyValue(PROPERTY_FONTCHARWIDTH) >>= aFont.CharacterWidth;
xProp->getPropertyValue(PROPERTY_FONTWEIGHT) >>= aFont.Weight;
- xProp->getPropertyValue(PROPERTY_FONTSLANT) >>= aFont.Slant;
+ xProp->getPropertyValue(PROPERTY_CHARPOSTURE) >>= aFont.Slant;
xProp->getPropertyValue(PROPERTY_FONTUNDERLINE) >>= aFont.Underline;
xProp->getPropertyValue(PROPERTY_CHARSTRIKEOUT) >>= aFont.Strikeout;
xProp->getPropertyValue(PROPERTY_FONTORIENTATION) >>= aFont.Orientation;
@@ -436,8 +441,6 @@ SvXMLTokenMap* OXMLHelper::GetSubDocumentElemTokenMap()
};
return new SvXMLTokenMap( aElemTokenMap );
}
-
-
// -----------------------------------------------------------------------------
} // rptxml
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlHelper.hxx b/reportdesign/source/filter/xml/xmlHelper.hxx
index dddf4d0345ba..cfb0df81a213 100644
--- a/reportdesign/source/filter/xml/xmlHelper.hxx
+++ b/reportdesign/source/filter/xml/xmlHelper.hxx
@@ -87,6 +87,7 @@ namespace rptxml
static SvXMLTokenMap* GetReportElemTokenMap();
static SvXMLTokenMap* GetSubDocumentElemTokenMap();
+
};
// -----------------------------------------------------------------------------
} // rptxml
diff --git a/reportdesign/source/filter/xml/xmlImage.cxx b/reportdesign/source/filter/xml/xmlImage.cxx
index 7354e5e7e1dd..33c0b58646b2 100644
--- a/reportdesign/source/filter/xml/xmlImage.cxx
+++ b/reportdesign/source/filter/xml/xmlImage.cxx
@@ -38,9 +38,10 @@
#include "xmlReportElement.hxx"
#include "xmlControlProperty.hxx"
#include <tools/debug.hxx>
+#include <svtools/pathoptions.hxx>
#include <comphelper/componentcontext.hxx>
-#include <com/sun/star/util/XStringSubstitution.hpp>
+#include <com/sun/star/awt/ImageScaleMode.hpp>
namespace rptxml
{
@@ -50,24 +51,7 @@ namespace rptxml
DBG_NAME( rpt_OXMLImage )
-//--------------------------------------------------------------------
-::rtl::OUString OXMLImage::lcl_doStringsubstitution_nothrow( ::rtl::OUString const& _inout_rURL )
-{
- try
- {
- Reference< XInterface > xInt = m_rImport.getORB()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSubstitution" ) ) );
- Reference< util::XStringSubstitution > xStringSubst(xInt, UNO_QUERY);
-
- return xStringSubst->substituteVariables( _inout_rURL, true );
- }
- catch( const Exception& )
- {
- // DBG_UNHANDLED_EXCEPTION();
- }
- return ::rtl::OUString();
-}
// -----------------------------------------------------------------------------
-
OXMLImage::OXMLImage( ORptFilter& rImport,
sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
const Reference< XAttributeList > & _xAttrList
@@ -96,37 +80,8 @@ OXMLImage::OXMLImage( ORptFilter& rImport,
{
case XML_TOK_IMAGE_DATA:
{
- // rtl::OUString sTest = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$(inst)"));
- // sTest = lcl_doStringsubstitution_nothrow( sTest );
- //
- // sTest = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$(prog)"));
- // sTest = lcl_doStringsubstitution_nothrow( sTest );
- //
- // sTest = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$(user)"));
- // sTest = lcl_doStringsubstitution_nothrow( sTest );
- //
- // sTest = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$(work)"));
- // sTest = lcl_doStringsubstitution_nothrow( sTest );
- //
- // sTest = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$(home)"));
- // sTest = lcl_doStringsubstitution_nothrow( sTest );
- //
- // sTest = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$(temp)"));
- // sTest = lcl_doStringsubstitution_nothrow( sTest );
- //
- // sTest = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$(path)"));
- // sTest = lcl_doStringsubstitution_nothrow( sTest );
- //
- // sTest = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$(lang)"));
- // sTest = lcl_doStringsubstitution_nothrow( sTest );
- //
- // sTest = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$(langid)"));
- // sTest = lcl_doStringsubstitution_nothrow( sTest );
- //
- // sTest = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$(vlang)"));
- // sTest = lcl_doStringsubstitution_nothrow( sTest );
-
- sValue = lcl_doStringsubstitution_nothrow( sValue );
+ SvtPathOptions aPathOptions;
+ sValue = aPathOptions.SubstituteVariable(sValue);
_xComponent->setImageURL(rImport.GetAbsoluteReference( sValue ));
}
@@ -135,7 +90,7 @@ OXMLImage::OXMLImage( ORptFilter& rImport,
_xComponent->setPreserveIRI(s_sTRUE == sValue);
break;
case XML_TOK_SCALE:
- _xComponent->setScaleImage(s_sTRUE == sValue);
+ _xComponent->setScaleMode(s_sTRUE == sValue ? awt::ImageScaleMode::Anisotropic : awt::ImageScaleMode::None );
break;
case XML_TOK_DATA_FORMULA:
_xComponent->setDataField(ORptFilter::convertFormula(sValue));
diff --git a/reportdesign/source/filter/xml/xmlImage.hxx b/reportdesign/source/filter/xml/xmlImage.hxx
index 259b2f8ac8e5..59eb63689f8f 100644
--- a/reportdesign/source/filter/xml/xmlImage.hxx
+++ b/reportdesign/source/filter/xml/xmlImage.hxx
@@ -42,9 +42,6 @@ namespace rptxml
{
OXMLImage(const OXMLImage&);
void operator =(const OXMLImage&);
-
- ::rtl::OUString lcl_doStringsubstitution_nothrow( ::rtl::OUString const& _inout_rURL );
-
public:
OXMLImage( ORptFilter& rImport, sal_uInt16 nPrfx,
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 9c31618b212f..80c2c2d885f6 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -50,6 +50,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <comphelper/genericpropertyset.hxx>
+#include <comphelper/mediadescriptor.hxx>
#include <xmloff/ProgressBarHelper.hxx>
#include <sfx2/docfile.hxx>
#include <com/sun/star/io/XInputStream.hpp>
@@ -565,9 +566,16 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
{ MAP_LEN( "OldFormat" ), 1, &::getCppuType((const sal_Bool*)0), beans::PropertyAttribute::BOUND, 0 },
{ MAP_LEN( "StreamName"), 0, &::getCppuType( (::rtl::OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 },
{ MAP_LEN("PrivateData"), 0, &::getCppuType( (uno::Reference<XInterface> *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 },
+ { MAP_LEN( "BaseURI"), 0,&::getCppuType( (::rtl::OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 },
+ { MAP_LEN( "StreamRelPath"), 0,&::getCppuType( (::rtl::OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 },
{ NULL, 0, 0, NULL, 0, 0 }
};
+ ::comphelper::MediaDescriptor aDescriptor(rDescriptor);
uno::Reference<beans::XPropertySet> xProp = comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(pMap));
+ const ::rtl::OUString sVal( aDescriptor.getUnpackedValueOrDefault(aDescriptor.PROP_DOCUMENTBASEURL(),::rtl::OUString()) );
+ xProp->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BaseURI")), uno::makeAny(sVal));
+ const ::rtl::OUString sHierarchicalDocumentName( aDescriptor.getUnpackedValueOrDefault(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HierarchicalDocumentName")),::rtl::OUString()) );
+ xProp->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath")), uno::makeAny(sHierarchicalDocumentName));
uno::Reference<XComponent> xModel(GetModel(),UNO_QUERY);
static const ::rtl::OUString s_sMeta(RTL_CONSTASCII_USTRINGPARAM("meta.xml"));
@@ -863,7 +871,7 @@ const SvXMLTokenMap& ORptFilter::GetControlElemTokenMap() const
{ XML_NAMESPACE_REPORT, XML_REPORT_ELEMENT ,XML_TOK_REPORT_ELEMENT },
{ XML_NAMESPACE_REPORT, XML_FORMULA ,XML_TOK_DATA_FORMULA },
{ XML_NAMESPACE_REPORT, XML_PRESERVE_IRI ,XML_TOK_PRESERVE_IRI },
- { XML_NAMESPACE_REPORT, XML_SELECT_PAGE ,XML_TOK_SELECT_PAGE },
+ { XML_NAMESPACE_REPORT, XML_SELECT_PAGE ,XML_TOK_SELECT_PAGE },
XML_TOKEN_MAP_END
};
m_pControlElemTokenMap.reset(new SvXMLTokenMap( aElemTokenMap ));
diff --git a/reportdesign/source/inc/stringconstants.hrc b/reportdesign/source/inc/stringconstants.hrc
index cc38480a88b9..c9f4c520c863 100644
--- a/reportdesign/source/inc/stringconstants.hrc
+++ b/reportdesign/source/inc/stringconstants.hrc
@@ -130,7 +130,6 @@ DECLARE_CONSTASCII_USTRING(PROPERTY_FORMATKEY );
DECLARE_CONSTASCII_USTRING(PROPERTY_MAXTEXTLEN );
DECLARE_CONSTASCII_USTRING(PROPERTY_LISTSOURCE );
DECLARE_CONSTASCII_USTRING(PROPERTY_FORMATSSUPPLIER );
-DECLARE_CONSTASCII_USTRING(PROPERTY_SCALEIMAGE );
DECLARE_CONSTASCII_USTRING(PROPERTY_CONTROLBORDER );
DECLARE_CONSTASCII_USTRING(PROPERTY_CONTROLBORDERCOLOR );
DECLARE_CONSTASCII_USTRING(PROPERTY_BORDER );
@@ -234,11 +233,13 @@ DECLARE_CONSTASCII_USTRING(PROPERTY_PREEVALUATED );
DECLARE_CONSTASCII_USTRING(PROPERTY_DEEPTRAVERSING );
DECLARE_CONSTASCII_USTRING(PROPERTY_MIMETYPE );
DECLARE_CONSTASCII_USTRING(PROPERTY_BACKGROUNDCOLOR );
+DECLARE_CONSTASCII_USTRING(PROPERTY_TEXT );
DECLARE_CONSTASCII_USTRING(PROPERTY_TEXTCOLOR );
DECLARE_CONSTASCII_USTRING(PROPERTY_TEXTLINECOLOR );
DECLARE_CONSTASCII_USTRING(PROPERTY_FONTRELIEF );
DECLARE_CONSTASCII_USTRING(PROPERTY_FONTEMPHASISMARK );
DECLARE_CONSTASCII_USTRING(PROPERTY_ZORDER );
+DECLARE_CONSTASCII_USTRING(PROPERTY_OPAQUE );
DECLARE_CONSTASCII_USTRING(PROPERTY_TRANSFORMATION );
DECLARE_CONSTASCII_USTRING(PROPERTY_CUSTOMSHAPEENGINE );
DECLARE_CONSTASCII_USTRING(PROPERTY_CUSTOMSHAPEDATA );
@@ -251,6 +252,7 @@ DECLARE_CONSTASCII_USTRING(PROPERTY_ALIGN );
DECLARE_CONSTASCII_USTRING(PROPERTY_TYPE );
DECLARE_CONSTASCII_USTRING(PROPERTY_PRESERVEIRI );
+DECLARE_CONSTASCII_USTRING(PROPERTY_SCALEMODE );
DECLARE_CONSTASCII_USTRING(PROPERTY_LINESTYLE );
DECLARE_CONSTASCII_USTRING(PROPERTY_LINEDASH );
diff --git a/reportdesign/source/inc/uistrings.hrc b/reportdesign/source/inc/uistrings.hrc
index c6e4669f6b74..07d5f492ba89 100644
--- a/reportdesign/source/inc/uistrings.hrc
+++ b/reportdesign/source/inc/uistrings.hrc
@@ -73,6 +73,9 @@ DECLARE_CONSTASCII_USTRING(PROPERTY_FILLGRADIENTNAME );
DECLARE_CONSTASCII_USTRING(PROPERTY_FILLHATCHNAME );
DECLARE_CONSTASCII_USTRING(PROPERTY_FILLBITMAPNAME );
DECLARE_CONSTASCII_USTRING(PROPERTY_FILLSTYLE );
+
+DECLARE_CONSTASCII_USTRING(DBTEXTBOXBOUNDCONTENT );
+
}
#endif // REPORTDESIGN_SHARED_UISTRINGS_HRC
diff --git a/reportdesign/source/shared/stringconstants.cxx b/reportdesign/source/shared/stringconstants.cxx
index a36dd0a75f58..f0486bf9c92c 100644
--- a/reportdesign/source/shared/stringconstants.cxx
+++ b/reportdesign/source/shared/stringconstants.cxx
@@ -126,7 +126,6 @@ IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FORMATKEY , "FormatKey");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_MAXTEXTLEN , "MaxTextLen");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_LISTSOURCE , "ListSource");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FORMATSSUPPLIER , "FormatsSupplier");
-IMPLEMENT_CONSTASCII_USTRING(PROPERTY_SCALEIMAGE , "ScaleImage");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CONTROLBORDER , "ControlBorder");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CONTROLBORDERCOLOR , "ControlBorderColor");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_BORDER , "Border");
@@ -158,7 +157,7 @@ IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONTKERNING, "FontKerning");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONTNAME, "FontName");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONTORIENTATION, "CharRotation");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONTPITCH, "CharFontPitch");
-IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONTSLANT, "CharPosture");
+IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONTSLANT, "FontSlant");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CHARSTRIKEOUT, "CharStrikeout");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONTSTRIKEOUT, "FontStrikeout");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONTSTYLENAME, "CharFontStyleName");
@@ -230,11 +229,13 @@ IMPLEMENT_CONSTASCII_USTRING(PROPERTY_PREEVALUATED, "PreEvaluated");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_DEEPTRAVERSING, "DeepTraversing");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_MIMETYPE, "MimeType");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_BACKGROUNDCOLOR, "BackgroundColor");
+IMPLEMENT_CONSTASCII_USTRING(PROPERTY_TEXT, "Text");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_TEXTCOLOR, "TextColor");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_TEXTLINECOLOR , "TextLineColor");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONTRELIEF , "FontRelief");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FONTEMPHASISMARK, "FontEmphasisMark");
-IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ZORDER, "ZOrder");
+IMPLEMENT_CONSTASCII_USTRING(PROPERTY_ZORDER, "ZOrder");
+IMPLEMENT_CONSTASCII_USTRING(PROPERTY_OPAQUE, "Opaque");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_TRANSFORMATION, "Transformation");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CUSTOMSHAPEENGINE, "CustomShapeEngine");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CUSTOMSHAPEDATA, "CustomShapeData");
@@ -251,6 +252,7 @@ IMPLEMENT_CONSTASCII_USTRING(PROPERTY_LINECOLOR , "LineColor");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_LINETRANSPARENCE, "LineTransparence");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_LINEWIDTH , "LineWidth");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_PRESERVEIRI , "PreserveIRI");
+IMPLEMENT_CONSTASCII_USTRING(PROPERTY_SCALEMODE , "ScaleMode");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CHARFLASH, "CharFlash");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CHARESCAPEMENTHEIGHT, "CharEscapementHeight");
diff --git a/reportdesign/source/shared/uistrings.cxx b/reportdesign/source/shared/uistrings.cxx
index 2fc710228552..ceee0aea34f0 100644
--- a/reportdesign/source/shared/uistrings.cxx
+++ b/reportdesign/source/shared/uistrings.cxx
@@ -67,5 +67,7 @@ namespace rptui
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FILLHATCHNAME , "FillHatchName");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FILLBITMAPNAME , "FillBitmapName");
IMPLEMENT_CONSTASCII_USTRING(PROPERTY_FILLSTYLE , "FillStyle");
+
+ IMPLEMENT_CONSTASCII_USTRING(DBTEXTBOXBOUNDCONTENT , "TextBoxBoundContent");
}
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index dba3107fedfd..afc53270754a 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -56,7 +56,7 @@
namespace rptui
{
const long STD_WIN_SIZE_X = 180;
-const long STD_WIN_SIZE_Y = 220;
+const long STD_WIN_SIZE_Y = 320;
const long LISTBOX_BORDER = 2;
@@ -171,6 +171,8 @@ OAddFieldWindow::OAddFieldWindow(Window* pParent
,m_xRowSet(_xRowSet)
,m_aActions(this,ModuleRes(RID_TB_SORTING))
,m_pListBox(new OAddFieldWindowListBox( this ))
+ ,m_aFixedLine(this, ModuleRes(ADDFIELD_FL_HELP_SEPARATOR) )
+ ,m_aHelpText(this, ModuleRes(ADDFIELD_HELP_FIELD) )
,m_aInsertButton(this, WB_TABSTOP|WB_CENTER)
,m_nCommandType(0)
,m_bEscapeProcessing(sal_False)
@@ -200,6 +202,9 @@ OAddFieldWindow::OAddFieldWindow(Window* pParent
m_aInsertButton.SetClickHdl(LINK( this, OAddFieldWindow, OnDoubleClickHdl ) );
m_aInsertButton.Show();
+ m_aFixedLine.SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor() );
+ m_aHelpText.SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor() );
+
SetSizePixel(Size(STD_WIN_SIZE_X,STD_WIN_SIZE_Y));
//Show();
@@ -362,20 +367,41 @@ void OAddFieldWindow::Resize()
{
FloatingWindow::Resize();
- const Size aSize( GetOutputSizePixel() );
+ const Size aWindowSize( GetOutputSizePixel() );
- //////////////////////////////////////////////////////////////////////
- Size aToolbarSize( m_aActions.GetSizePixel() );
const Size aRelated(LogicToPixel( Size( RELATED_CONTROLS, RELATED_CONTROLS ), MAP_APPFONT ));
- Point aPos( aRelated.Width(), aToolbarSize.Height() + 2*aRelated.Height());
- Point aToolbarPos( aPos.X(),aRelated.Height());
- Size aLBSize( aSize );
- aLBSize.Width() -= (2*aRelated.Width());
- aLBSize.Height() -= (aRelated.Height() + aPos.Y() );
-
- m_aActions.SetPosPixel(Point(aPos.X(),aToolbarPos.Y()));
- m_pListBox->SetPosSizePixel( aPos, aLBSize );
+ const Size aFixedTextSize(LogicToPixel( Size( FIXEDTEXT_WIDTH, FIXEDTEXT_HEIGHT ), MAP_APPFONT ));
+
+ // ToolBar
+ Size aToolbarSize( m_aActions.GetSizePixel() );
+ Point aToolbarPos( aRelated.Width(), aRelated.Height());
+ m_aActions.SetPosPixel(Point(aToolbarPos.X(), aToolbarPos.Y()));
+
+ Size aLBSize( aWindowSize );
+ aLBSize.Width() -= ( 2 * aRelated.Width() );
+
+ // help text
+ const Size aHelpTextSize = m_aHelpText.CalcMinimumSize(aLBSize.Width());
+
+ // ListBox
+ Point aLBPos( aRelated.Width(), aRelated.Height() + aToolbarSize.Height() + aRelated.Height() );
+
+ aLBSize.Height() -= aToolbarSize.Height(); // Toolbar
+ aLBSize.Height() -= (6*aRelated.Height()); // 6 * gap
+ aLBSize.Height() -= aFixedTextSize.Height(); // fixed line
+ aLBSize.Height() -= aHelpTextSize.Height(); // help text
+ m_pListBox->SetPosSizePixel( aLBPos, aLBSize );
+
+ // FixedLine
+ Size aFLSize( aLBSize.Width(),aFixedTextSize.Height() );
+ Point aFLPos( aRelated.Width(), aLBPos.Y() + aLBSize.Height() + aRelated.Height());
+ m_aFixedLine.SetPosSizePixel( aFLPos, aFLSize );
+
+ // Help text
+ Point aFTPos( aRelated.Width(), aFLPos.Y() + aFLSize.Height() + aRelated.Height() );
+ m_aHelpText.SetPosSizePixel( aFTPos, aHelpTextSize );
+
}
// -----------------------------------------------------------------------------
uno::Reference< sdbc::XConnection> OAddFieldWindow::getConnection() const
diff --git a/reportdesign/source/ui/dlg/CondFormat.hrc b/reportdesign/source/ui/dlg/CondFormat.hrc
index 4446072804c6..474789419e9c 100644
--- a/reportdesign/source/ui/dlg/CondFormat.hrc
+++ b/reportdesign/source/ui/dlg/CondFormat.hrc
@@ -31,6 +31,7 @@
#define RPTUI_CONDFORMAT_HRC
#define CHECKBOX_HEIGHT 8
+#define FIXEDTEXT_WIDTH 60
#define FIXEDTEXT_HEIGHT 8
#define EDIT_WIDTH 75
#define RELATED_CONTROLS 4
diff --git a/reportdesign/source/ui/dlg/CondFormat.src b/reportdesign/source/ui/dlg/CondFormat.src
index 94c4727fd429..b71df70df707 100644
--- a/reportdesign/source/ui/dlg/CondFormat.src
+++ b/reportdesign/source/ui/dlg/CondFormat.src
@@ -337,6 +337,9 @@ ImageList IMG_CONDFORMAT_DLG_LCH
< "res/commandimagelist/lch_fontdialog.png" ; SID_CHAR_DLG ; > ;
};
};
+
+
+
ImageList 31000
{
MASKCOLOR;
@@ -345,6 +348,7 @@ ImageList 31000
IdCount = 1;
};
+
ToolBox RID_TB_SORTING
{
Pos = MAP_APPFONT ( 0,0 ) ;
@@ -381,6 +385,7 @@ ToolBox RID_TB_SORTING
};
};
};
+
ImageList IMG_ADDFIELD_DLG_SC
{
MASKCOLOR;
@@ -391,6 +396,7 @@ ImageList IMG_ADDFIELD_DLG_SC
< "res/commandimagelist/sc_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ;
};
};
+
ImageList IMG_ADDFIELD_DLG_SCH
{
MASKCOLOR;
@@ -401,6 +407,7 @@ ImageList IMG_ADDFIELD_DLG_SCH
< "res/commandimagelist/sch_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ;
};
};
+
ImageList IMG_ADDFIELD_DLG_LC
{
MASKCOLOR;
@@ -411,6 +418,7 @@ ImageList IMG_ADDFIELD_DLG_LC
< "res/commandimagelist/lc_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ;
};
};
+
ImageList IMG_ADDFIELD_DLG_LCH
{
MASKCOLOR;
@@ -421,3 +429,20 @@ ImageList IMG_ADDFIELD_DLG_LCH
< "res/commandimagelist/lch_removefiltersort.png" ; SID_FM_REMOVE_FILTER_SORT ; > ;
};
};
+
+FixedLine ADDFIELD_FL_HELP_SEPARATOR
+{
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( RELATED_CONTROLS , RELATED_CONTROLS ) ;
+ Size = MAP_APPFONT ( RELATED_CONTROLS , RELATED_CONTROLS ) ;
+ Text [ en-US ] = "Help";
+};
+
+FixedText ADDFIELD_HELP_FIELD
+{
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( RELATED_CONTROLS , RELATED_CONTROLS ) ;
+ Size = MAP_APPFONT ( RELATED_CONTROLS , RELATED_CONTROLS ) ;
+ WordBreak = TRUE;
+ Text [ en-US ] = "Highlight the fields to insert into the selected section of the template, then click Insert or press Enter.";
+};
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index a8b054ce8f2b..2f20d75c3fa4 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -45,6 +45,7 @@
#include <svx/globlmn.hrc>
#include <svx/svxids.hrc>
+#include <svtools/imgdef.hxx>
#include "GroupExchange.hxx"
#include "UITools.hxx"
@@ -59,6 +60,8 @@
#include <algorithm>
#include <boost/bind.hpp>
+#include <cppuhelper/bootstrap.hxx>
+
#define HANDLE_ID 0
#define FIELD_EXPRESSION 1
#define GROUPS_START_LEN 5
@@ -89,8 +92,8 @@ class OFieldExpressionControl : public TContainerListenerBase
void fillListBox(const uno::Reference< beans::XPropertySet>& _xDest,long nRow,USHORT nColumnId);
BOOL SaveModified(bool _bAppend);
- OFieldExpressionControl(const OFieldExpressionControl&);
- void operator =(const OFieldExpressionControl&);
+ OFieldExpressionControl(const OFieldExpressionControl&); // NO COPY
+ void operator =(const OFieldExpressionControl&); // NO ASSIGN
public:
OFieldExpressionControl( OGroupsSortingDialog* _pParent,const ResId& _rResId);
virtual ~OFieldExpressionControl();
@@ -153,10 +156,13 @@ private:
DECL_LINK( AsynchActivate, void* );
DECL_LINK( AsynchDeactivate, void* );
DECL_LINK( DelayedPaste, void* );
- DECL_LINK( DelayedDelete, void* );
DECL_LINK( CBChangeHdl,ComboBox*);
void InsertRows( long nRow );
+
+public:
+ DECL_LINK( DelayedDelete, void* );
+
};
//========================================================================
// class OFieldExpressionControl
@@ -771,7 +777,16 @@ void OFieldExpressionControl::DeleteRows()
{
DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL);
+ sal_Bool bIsEditing = IsEditing();
+ if (bIsEditing)
+ {
+ DeactivateCell();
+ }
long nIndex = FirstSelectedRow();
+ if (nIndex == -1)
+ {
+ nIndex = GetCurRow();
+ }
bool bFirstTime = true;
long nOldDataPos = nIndex;
@@ -945,8 +960,13 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
,OPropertyChangeListener(m_aMutex)
,m_aFL2(this, ModuleRes(FL_SEPARATOR2) )
,m_aMove(this, ModuleRes(FT_MOVELABEL) )
- ,m_aUp(this, ModuleRes(PB_UP) )
- ,m_aDown(this, ModuleRes(PB_DOWN) )
+/*
+ ,m_aPB_Up(this, ModuleRes(PB_UP) )
+ ,m_aPB_Down(this, ModuleRes(PB_DOWN) )
+ ,m_aPB_Delete(this, ModuleRes(PB_DELETE) )
+*/
+ ,m_aToolBox(this, ModuleRes(TB_TOOLBOX) )
+
,m_aFL3(this, ModuleRes(FL_SEPARATOR3) )
,m_aOrder(this, ModuleRes(FT_ORDER) )
,m_aOrderLst(this, ModuleRes(LST_ORDER) )
@@ -999,11 +1019,12 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
nMaxTextWidth = ::std::max<sal_Int32>(nTextWidth,nMaxTextWidth);
}
- Size aSpace = LogicToPixel( Size( UNRELATED_CONTROLS, PAGE_HEIGHT), MAP_APPFONT );
+ Size aSize(UNRELATED_CONTROLS, PAGE_HEIGHT);
+ Size aSpace = LogicToPixel( aSize, MAP_APPFONT );
Size aOutSize(nMaxTextWidth + m_aHeader.GetSizePixel().Width() + 3*aSpace.Width(),aSpace.Height());
SetMinOutputSizePixel(aOutSize);
SetOutputSizePixel(aOutSize);
- Resize();
+// Resize();
m_pReportListener = new OPropertyChangeMultiplexer(this,m_pController->getReportDefinition().get());
m_pReportListener->addProperty(PROPERTY_COMMAND);
@@ -1015,19 +1036,25 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
//m_aHelpWindow.SetReadOnly();
m_aHelpWindow.SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor() );
- m_aUp.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl));
- m_aDown.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl));
+ //BTN m_aPB_Up.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl));
+ //BTN m_aPB_Down.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl));
+ //BTN m_aPB_Delete.SetClickHdl(LINK(this,OGroupsSortingDialog,ClickHdl));
m_pFieldExpression->SetZOrder(&m_aFL2, WINDOW_ZORDER_BEHIND);
m_aMove.SetZOrder(m_pFieldExpression, WINDOW_ZORDER_BEHIND);
- m_aUp.SetZOrder(&m_aMove, WINDOW_ZORDER_BEHIND);
- m_aDown.SetZOrder(&m_aUp, WINDOW_ZORDER_BEHIND);
+ //BTN m_aPB_Up.SetZOrder(&m_aMove, WINDOW_ZORDER_BEHIND);
+ //BTN m_aPB_Down.SetZOrder(&m_aPB_Up, WINDOW_ZORDER_BEHIND);
// set Hi contrast bitmaps
- m_aUp.SetModeImage( ModuleRes(IMG_UP_H),BMP_COLOR_HIGHCONTRAST);
- m_aDown.SetModeImage( ModuleRes(IMG_DOWN_H),BMP_COLOR_HIGHCONTRAST);
+ //BTN m_aPB_Up.SetModeImage( ModuleRes(IMG_UP_H),BMP_COLOR_HIGHCONTRAST);
+ //BTN m_aPB_Down.SetModeImage( ModuleRes(IMG_DOWN_H),BMP_COLOR_HIGHCONTRAST);
+ m_aToolBox.SetStyle(m_aToolBox.GetStyle()|WB_LINESPACING);
+ m_aToolBox.SetSelectHdl(LINK(this, OGroupsSortingDialog, OnFormatAction));
+ m_aToolBox.SetImageListProvider(this);
+ setToolBox(&m_aToolBox);
checkButtons(0);
+ Resize();
FreeResource();
}
@@ -1182,9 +1209,13 @@ IMPL_LINK(OGroupsSortingDialog, OnControlFocusLost, Control*, pControl )
return 0L;
}
// -----------------------------------------------------------------------------
-IMPL_LINK( OGroupsSortingDialog, ClickHdl, ImageButton*, _pButton )
+IMPL_LINK( OGroupsSortingDialog, OnFormatAction, ToolBox*, /*NOTINTERESTEDIN*/ )
+// IMPL_LINK( OGroupsSortingDialog, ClickHdl, ImageButton*, _pButton )
{
DBG_CHKTHIS( rpt_OGroupsSortingDialog,NULL);
+
+ USHORT nCommand = m_aToolBox.GetCurItemId();
+
if ( m_pFieldExpression )
{
long nIndex = m_pFieldExpression->GetCurrRow();
@@ -1195,20 +1226,35 @@ IMPL_LINK( OGroupsSortingDialog, ClickHdl, ImageButton*, _pButton )
aClipboardList.realloc(1);
aClipboardList[0] = m_xGroups->getByIndex(nGroupPos);
}
- if ( _pButton == &m_aUp )
+ //BTN if ( _pButton == &m_aPB_Up )
+ if ( nCommand == SID_RPT_GROUPSORT_MOVE_UP )
+ {
--nIndex;
- else
+ }
+ //BTN if ( _pButton == &m_aPB_Down )
+ if ( nCommand == SID_RPT_GROUPSORT_MOVE_DOWN )
+ {
++nIndex;
-
- if ( nIndex >= 0 && aClipboardList.getLength() )
+ }
+ //BTN if ( _pButton == &m_aPB_Delete )
+ if ( nCommand == SID_RPT_GROUPSORT_DELETE )
{
- m_pFieldExpression->SetNoSelection();
- m_pFieldExpression->moveGroups(aClipboardList,nIndex,sal_False);
- m_pFieldExpression->DeactivateCell();
- m_pFieldExpression->GoToRow(nIndex);
- //long nCurRow = m_pFieldExpression->GetCurRow();
- m_pFieldExpression->ActivateCell(nIndex, m_pFieldExpression->GetCurColumnId());
- DisplayData(nIndex);
+ // m_pFieldExpression->DeleteCurrentRow();
+ Application::PostUserEvent( LINK(m_pFieldExpression, OFieldExpressionControl, DelayedDelete) );
+ // UpdateData( );
+ }
+ else
+ {
+ if ( nIndex >= 0 && aClipboardList.getLength() )
+ {
+ m_pFieldExpression->SetNoSelection();
+ m_pFieldExpression->moveGroups(aClipboardList,nIndex,sal_False);
+ m_pFieldExpression->DeactivateCell();
+ m_pFieldExpression->GoToRow(nIndex);
+ //long nCurRow = m_pFieldExpression->GetCurRow();
+ m_pFieldExpression->ActivateCell(nIndex, m_pFieldExpression->GetCurColumnId());
+ DisplayData(nIndex);
+ }
}
}
return 1L;
@@ -1393,10 +1439,17 @@ void OGroupsSortingDialog::Resize()
m_aFL2.SetSizePixel(Size(aTotalOutputSize.Width() - aSpace.Width(),m_aFL2.GetSizePixel().Height()));
m_aFL3.SetSizePixel(Size(aTotalOutputSize.Width() - aSpace.Width(),m_aFL3.GetSizePixel().Height()));
- sal_Int32 nPos = aTotalOutputSize.Width() - aSpace.Width() - m_aUp.GetSizePixel().Width();
- m_aDown.SetPosPixel(Point(nPos,m_aDown.GetPosPixel().Y()));
- nPos -= (m_aUp.GetSizePixel().Width() + LogicToPixel( Size( RELATED_CONTROLS, 0 ), MAP_APPFONT ).Width());
- m_aUp.SetPosPixel(Point(nPos,m_aUp.GetPosPixel().Y()));
+//BTN sal_Int32 nPos = aTotalOutputSize.Width() - aSpace.Width() - m_aPB_Up.GetSizePixel().Width();
+//BTN m_aPB_Delete.SetPosPixel(Point(nPos,m_aPB_Delete.GetPosPixel().Y()));
+//BTN
+//BTN nPos -= (m_aPB_Up.GetSizePixel().Width() + LogicToPixel( Size( UNRELATED_CONTROLS, 0 ), MAP_APPFONT ).Width());
+//BTN m_aPB_Down.SetPosPixel(Point(nPos,m_aPB_Down.GetPosPixel().Y()));
+//BTN
+//BTN nPos -= (m_aPB_Up.GetSizePixel().Width() + LogicToPixel( Size( RELATED_CONTROLS, 0 ), MAP_APPFONT ).Width());
+//BTN m_aPB_Up.SetPosPixel(Point(nPos,m_aPB_Up.GetPosPixel().Y()));
+ sal_Int32 nPos = aTotalOutputSize.Width() - aSpace.Width() - m_aToolBox.GetSizePixel().Width();
+ m_aToolBox.SetPosPixel(Point(nPos,m_aToolBox.GetPosPixel().Y()));
+
Point aHelpPos = m_aHelpWindow.GetPosPixel();
m_aHelpWindow.SetSizePixel(Size(aTotalOutputSize.Width() - aHelpPos.X(),aTotalOutputSize.Height() - aHelpPos.Y()));
}
@@ -1404,10 +1457,86 @@ void OGroupsSortingDialog::Resize()
void OGroupsSortingDialog::checkButtons(sal_Int32 _nRow)
{
sal_Int32 nGroupCount = m_xGroups->getCount();
- sal_Bool bEnable = nGroupCount > 1;
- m_aUp.Enable(bEnable && _nRow > 0 );
- m_aDown.Enable(bEnable && _nRow < (m_pFieldExpression->GetRowCount()-1) );
+ sal_Int32 nRowCount = m_pFieldExpression->GetRowCount();
+ sal_Bool bEnabled = nGroupCount > 1;
+
+ if (bEnabled && _nRow > 0 /* && _nRow < nGroupCount */ )
+ {
+ m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_UP, sal_True);
+ }
+ else
+ {
+ m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_UP, sal_False);
+ }
+ if (bEnabled && _nRow < (nRowCount - 1) /* && _nRow < (nGroupCount - 1) */ )
+ {
+ m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_DOWN, sal_True);
+ }
+ else
+ {
+ m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_DOWN, sal_False);
+ }
+ //BTN m_aPB_Up.Enable(bEnable && _nRow > 0 );
+ //BTN m_aPB_Down.Enable(bEnable && _nRow < (m_pFieldExpression->GetRowCount()-1) );
+ // m_aToolBox.EnableItem(SID_RPT_GROUPSORT_MOVE_DOWN, bEnable && _nRow < (-1) );
+
+ sal_Int32 nGroupPos = m_pFieldExpression->getGroupPosition(_nRow);
+ if ( nGroupPos != NO_GROUP )
+ {
+ sal_Bool bEnableDelete = nGroupCount > 0;
+ //BTN m_aPB_Delete.Enable(bEnableDelete );
+ m_aToolBox.EnableItem(SID_RPT_GROUPSORT_DELETE, bEnableDelete);
+ }
+ else
+ {
+ //BTN m_aPB_Delete.Enable( sal_False );
+ m_aToolBox.EnableItem(SID_RPT_GROUPSORT_DELETE, sal_False);
+ }
}
+
+ImageList OGroupsSortingDialog::getImageList(sal_Int16 _eBitmapSet,sal_Bool _bHiContast) const
+{
+ sal_Int16 nN = IMG_CONDFORMAT_DLG_SC;
+ sal_Int16 nH = IMG_CONDFORMAT_DLG_SCH;
+ if ( _eBitmapSet == SFX_SYMBOLS_SIZE_LARGE )
+ {
+ nN = IMG_CONDFORMAT_DLG_LC;
+ nH = IMG_CONDFORMAT_DLG_LCH;
+ }
+ return ImageList(ModuleRes( _bHiContast ? nH : nN ));
+}
+
+//------------------------------------------------------------------
+void OGroupsSortingDialog::resizeControls(const Size& _rDiff)
+{
+ // we use large images so we must change them
+ if ( _rDiff.Width() || _rDiff.Height() )
+ {
+ Point aPos = LogicToPixel( Point( 2*RELATED_CONTROLS , 0), MAP_APPFONT );
+ Invalidate();
+ }
+}
+
+//------------------------------------------------------------------
+// load the images
+ImageList OGroupsSortingDialog::getImageList(vcl::ImageListType _eType) SAL_THROW (( com::sun::star::lang::IllegalArgumentException ))
+{
+ if (_eType == vcl::HIGHCONTRAST_NO)
+ {
+ return ImageList(ModuleRes(IMGLST_GROUPSORT_DLG_SC));
+ }
+ else if (_eType == vcl::HIGHCONTRAST_YES)
+ {
+ return ImageList(ModuleRes(IMGLST_GROUPSORT_DLG_SCH));
+ }
+ else
+ {
+ throw com::sun::star::lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("High contrast parameter is wrong.")), NULL, 0);
+ }
+}
+
+
+
// =============================================================================
} // rptui
// =============================================================================
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.hrc b/reportdesign/source/ui/dlg/GroupsSorting.hrc
index 323ce579c6c7..24d9a78a1ef9 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.hrc
+++ b/reportdesign/source/ui/dlg/GroupsSorting.hrc
@@ -53,8 +53,17 @@
#define PB_DOWN (21)
#define FL_SEPARATOR2 (22)
#define FL_SEPARATOR3 (23)
-#define IMG_UP_H (24)
-#define IMG_DOWN_H (25)
+//BTN #define IMG_UP_H (24)
+//BTN #define IMG_DOWN_H (25)
+//BTN #define PB_DELETE (26)
+#define TB_TOOLBOX (27)
+
+// #define IMG_GROUPSORT_MOVE_DOWN (28)
+// #define IMG_GROUPSORT_MOVE_UP (29)
+// #define IMG_GROUPSORT_DELETE (30)
+// #define IMG_GROUPSORT_MOVE_DOWN_H (31)
+// #define IMG_GROUPSORT_MOVE_UP_H (32)
+// #define IMG_GROUPSORT_DELETE_H (33)
#define CHECKBOX_HEIGHT 8
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.src b/reportdesign/source/ui/dlg/GroupsSorting.src
index 3f7edff1aa61..f7184bdd3b6e 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.src
+++ b/reportdesign/source/ui/dlg/GroupsSorting.src
@@ -69,23 +69,88 @@ FloatingWindow RID_GROUPS_SORTING
{
Pos = MAP_APPFONT ( UNRELATED_CONTROLS , 3*UNRELATED_CONTROLS + BROWSER_HEIGHT ) ;
Size = MAP_APPFONT ( FIXEDTEXT_WIDTH , FIXEDTEXT_HEIGHT ) ;
- Text [ en-US ] = "Move group" ;
+// Text [ en-US ] = "Move group" ;
+ Text [ en-US ] = "Group actions" ;
};
- ImageButton PB_UP
- {
- Pos = MAP_APPFONT ( PAGE_WIDTH - UNRELATED_CONTROLS - 2*14 - RELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT -1 ) ;
- Size = MAP_APPFONT ( 14 , 14 ) ;
- TabStop = TRUE;
- Symbol = IMAGEBUTTON_ARROW_UP ;
- };
+// /*
+// | PAGE_WIDTH |
+// | /-----\ {-------\ /---------\ |
+// | unreleated FT_MOVELABEL |PB_UP| unreleated |PB_DOWN| unreleated |PD_DELETE| unreleated |
+// | \_____/ \_______/ \_________/ |
+//
+// Don't set any position here, it will be done in OGroupsSortingDialog::Resize()
+//
+// Find possible IMAGEBUTTON_* in rscicpx.cxx
+// Symbol is vclrsc.hxx
+// */
+// ImageButton PB_UP
+// {
+// Pos = MAP_APPFONT ( PAGE_WIDTH - 3*UNRELATED_CONTROLS - 3*14 - 2*RELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT -1 ) ;
+// Size = MAP_APPFONT ( 14 , 14 ) ;
+// TabStop = TRUE;
+// // Symbol = IMAGEBUTTON_ARROW_UP ; // arrow up
+// Symbol = IMAGEBUTTON_SPIN_UP ; // triangle up
+// // Symbol = IMAGEBUTTON_FLOAT;
+// };
+//
+// ImageButton PB_DOWN
+// {
+// Pos = MAP_APPFONT ( PAGE_WIDTH - 2*UNRELATED_CONTROLS - 2*14 - 2*RELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT - 1 ) ;
+// Size = MAP_APPFONT ( 14 , 14 ) ;
+// TabStop = TRUE;
+// // Symbol = IMAGEBUTTON_ARROW_DOWN ; // arrow down
+// // Symbol = IMAGEBUTTON_FIRST ;
+// Symbol = IMAGEBUTTON_SPIN_DOWN;
+//
+// };
+//
+// ImageButton PB_DELETE
+// {
+// Pos = MAP_APPFONT ( PAGE_WIDTH - UNRELATED_CONTROLS - 14, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT - 1 ) ;
+// Size = MAP_APPFONT ( 14 , 14 ) ;
+// TabStop = TRUE;
+// Symbol = IMAGEBUTTON_CLOSE ;
+// };
- ImageButton PB_DOWN
+
+ ToolBox TB_TOOLBOX
{
- Pos = MAP_APPFONT ( PAGE_WIDTH - UNRELATED_CONTROLS - 14 - RELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT - 1 ) ;
- Size = MAP_APPFONT ( 14 , 14 ) ;
- TabStop = TRUE;
- Symbol = IMAGEBUTTON_ARROW_DOWN ;
+ Pos = MAP_APPFONT ( PAGE_WIDTH - 4*14 - UNRELATED_CONTROLS, 3*UNRELATED_CONTROLS + BROWSER_HEIGHT - 1 ) ;
+ ButtonType = BUTTON_SYMBOL;
+// Align = BOXALIGN_TOP;
+// HelpId = HID_RPT_CONDFORMAT_TB;
+ Customize = FALSE;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = SID_RPT_GROUPSORT_MOVE_UP ;
+ // Command = ".uno:ReportGroupMoveUp" ; // default_images/res/commandimages/sc_reportgroupmoveup.png
+ HelpID = HID_RPT_GROUPSORT_MOVE_UP ;
+ Text [ en-US ] = "Move up" ;
+ Checkable = TRUE;
+// Disable = TRUE;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_RPT_GROUPSORT_MOVE_DOWN ;
+ // Command = ".uno:ReportGroupMoveDown" ;
+ HelpID = HID_RPT_GROUPSORT_MOVE_DOWN ;
+ Text [ en-US ] = "Move down" ;
+ Checkable = TRUE;
+// Disable = TRUE;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_RPT_GROUPSORT_DELETE ;
+ // Command = ".uno:ReportGroupDelete" ;
+ HelpID = HID_RPT_GROUPSORT_DELETE ;
+ Text [ en-US ] = "~Delete" ;
+ Checkable = TRUE;
+// Disable = TRUE;
+ };
+ };
};
FixedLine FL_SEPARATOR3
@@ -240,14 +305,16 @@ FloatingWindow RID_GROUPS_SORTING
WordBreak = TRUE;
};
- Image IMG_UP_H
- {
- ImageBitmap = Bitmap { File = "arrow_move_up_hc" ; };
- };
- Image IMG_DOWN_H
- {
- ImageBitmap = Bitmap { File = "arrow_move_down_hc" ; };
- };
+//BTN Image IMG_UP_H
+//BTN {
+//BTN ImageBitmap = Bitmap { File = "arrow_move_up_hc" ; };
+//BTN };
+//BTN Image IMG_DOWN_H
+//BTN {
+//BTN ImageBitmap = Bitmap { File = "arrow_move_down_hc" ; };
+//BTN };
+
+
};
String STR_RPT_EXPRESSION
@@ -351,3 +418,82 @@ Menu RID_GROUPSROWPOPUPMENU
};
};
};
+
+
+#define DEF_MASKCOLOR MaskColor = Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; }
+
+#define DEF_IL_GROUPSORT \
+\
+ IdList = {\
+ SID_RPT_GROUPSORT_MOVE_UP;\
+ SID_RPT_GROUPSORT_MOVE_DOWN;\
+ SID_RPT_GROUPSORT_DELETE;\
+ };\
+ IdCount = {\
+ 3;\
+ }
+
+ImageList IMGLST_GROUPSORT_DLG_SC
+{
+ DEF_MASKCOLOR;
+ prefix = "sc";
+ DEF_IL_GROUPSORT ;
+};
+
+ImageList IMGLST_GROUPSORT_DLG_SCH
+{
+ DEF_MASKCOLOR;
+ prefix = "sch";
+ DEF_IL_GROUPSORT ;
+};
+
+
+// Image IMG_GROUPSORT_MOVEUP
+// {
+// ImageBitmap = Bitmap
+// {
+// File = "reportgroupmoveup"; // reportdesign/res/...
+// };
+// DEF_MASKCOLOR;
+// };
+// Image IMG_GROUPSORT_MOVEDOWN
+// {
+// ImageBitmap = Bitmap
+// {
+// File = "reportgroupmovedown";
+// };
+// DEF_MASKCOLOR;
+// };
+// Image IMG_GROUPSORT_DELETE
+// {
+// ImageBitmap = Bitmap
+// {
+// File = "reportgroupdelete";
+// };
+// DEF_MASKCOLOR;
+// };
+//
+// Image IMG_GROUPSORT_MOVEUP_H
+// {
+// ImageBitmap = Bitmap
+// {
+// File = "reportgroupmoveup_h"; // reportdesign/res/...
+// };
+// DEF_MASKCOLOR;
+// };
+// Image IMG_GROUPSORT_MOVEDOWN_H
+// {
+// ImageBitmap = Bitmap
+// {
+// File = "reportgroupmovedown_h";
+// };
+// DEF_MASKCOLOR;
+// };
+// Image IMG_GROUPSORT_DELETE_H
+// {
+// ImageBitmap = Bitmap
+// {
+// File = "reportgroupdelete_h";
+// };
+// DEF_MASKCOLOR;
+// };
diff --git a/reportdesign/source/ui/dlg/makefile.mk b/reportdesign/source/ui/dlg/makefile.mk
index 483303b7ecca..80b8e870a9cb 100644
--- a/reportdesign/source/ui/dlg/makefile.mk
+++ b/reportdesign/source/ui/dlg/makefile.mk
@@ -56,6 +56,7 @@ SRC1FILES = \
Navigator.src \
GroupsSorting.src
+
# ... object files ............................
EXCEPTIONSFILES= \
@@ -69,7 +70,7 @@ EXCEPTIONSFILES= \
$(SLO)$/Navigator.obj \
$(SLO)$/GroupsSorting.obj \
$(SLO)$/Formula.obj
-
+
SLOFILES= \
$(EXCEPTIONSFILES) \
diff --git a/reportdesign/source/ui/inc/AddField.hxx b/reportdesign/source/ui/inc/AddField.hxx
index 511888bcc60d..4940848acc99 100644
--- a/reportdesign/source/ui/inc/AddField.hxx
+++ b/reportdesign/source/ui/inc/AddField.hxx
@@ -49,6 +49,7 @@
#include "cppuhelper/basemutex.hxx"
#include <dbaccess/ToolBoxHelper.hxx>
#include <vcl/toolbox.hxx>
+#include <vcl/fixed.hxx>
#include <rtl/ref.hxx>
@@ -71,6 +72,8 @@ class OAddFieldWindow :public FloatingWindow
ToolBox m_aActions;
::std::auto_ptr<OAddFieldWindowListBox> m_pListBox;
+ FixedLine m_aFixedLine;
+ FixedText m_aHelpText;
PushButton m_aInsertButton;
Link m_aCreateLink;
diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx
index 0eb633f7b154..683e4cb78a3d 100644
--- a/reportdesign/source/ui/inc/DesignView.hxx
+++ b/reportdesign/source/ui/inc/DesignView.hxx
@@ -234,6 +234,7 @@ namespace rptui
// IMarkedSection
::boost::shared_ptr<OSectionWindow> getMarkedSection(NearSectionAccess nsa = CURRENT) const;
+ ::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const;
virtual void markSection(const sal_uInt16 _nPos);
/** fills the positions of all collapsed sections.
diff --git a/reportdesign/source/ui/inc/FixedTextColor.hxx b/reportdesign/source/ui/inc/FixedTextColor.hxx
new file mode 100644
index 000000000000..c80a49a9a557
--- /dev/null
+++ b/reportdesign/source/ui/inc/FixedTextColor.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: UndoEnv.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_FIXEDTEXTCOLOR_HXX
+#define INCLUDED_FIXEDTEXTCOLOR_HXX
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_reportdesign.hxx"
+
+
+/** === begin UNO includes === **/
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/awt/XVclWindowPeer.hpp>
+#include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/report/XFixedText.hpp>
+/** === end UNO includes === **/
+
+#include <IReportControllerObserver.hxx>
+
+//#include <boost/noncopyable.hpp>
+#include <vector>
+
+namespace rptui
+{
+ class OReportController;
+
+ class FixedTextColor : public IReportControllerObserver
+ {
+ const OReportController& m_rReportController;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer > getVclWindowPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XFixedText >& _xComponent) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > getXControl(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XFixedText >& _xFixedText) throw(::com::sun::star::uno::RuntimeException);
+
+ void setPropertyTextColor(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer >& _xVclWindowPeer, sal_Int32 _nFormatKey);
+
+ // sal_Int32 getTextColor();
+
+ public:
+ FixedTextColor(const OReportController & _aObserver);
+ virtual ~FixedTextColor();
+
+ void notifyPropertyChange( const ::com::sun::star::beans::PropertyChangeEvent& _rEvent );
+ void notifyElementInserted( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxElement );
+ void handle( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxElement );
+
+ };
+
+} // namespace rptui
+
+
+#endif
diff --git a/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx b/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx
new file mode 100644
index 000000000000..bc5d406d1e5c
--- /dev/null
+++ b/reportdesign/source/ui/inc/FormattedFieldBeautifier.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: UndoEnv.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_FORMATTEDFIELDBEAUTIFIER_HXX
+#define INCLUDED_FORMATTEDFIELDBEAUTIFIER_HXX
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_reportdesign.hxx"
+
+
+/** === begin UNO includes === **/
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/awt/XVclWindowPeer.hpp>
+#include <com/sun/star/report/XReportComponent.hpp>
+#include <com/sun/star/report/XFormattedField.hpp>
+/** === end UNO includes === **/
+
+//#include <boost/noncopyable.hpp>
+#include <vector>
+#include <IReportControllerObserver.hxx>
+
+namespace rptui
+{
+ class OReportController;
+
+ class FormattedFieldBeautifier : public IReportControllerObserver
+ {
+ const OReportController& m_rReportController;
+ sal_Int32 m_nTextColor;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer > getVclWindowPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xComponent) throw(::com::sun::star::uno::RuntimeException);
+
+ void setPlaceholderText( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent );
+ void setPlaceholderText( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XVclWindowPeer >& _xVclWindowPeer, const ::rtl::OUString& _rText );
+
+ sal_Int32 getTextColor();
+
+ public:
+ FormattedFieldBeautifier(const OReportController & _aObserver);
+ virtual ~FormattedFieldBeautifier();
+
+ void notifyPropertyChange( const ::com::sun::star::beans::PropertyChangeEvent& _rEvent );
+ void notifyElementInserted( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxElement );
+ void handle( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxElement );
+ };
+
+} // namespace rptui
+
+
+#endif
diff --git a/reportdesign/source/ui/inc/GroupsSorting.hxx b/reportdesign/source/ui/inc/GroupsSorting.hxx
index 5a3f69c32175..fc26581ba37d 100644
--- a/reportdesign/source/ui/inc/GroupsSorting.hxx
+++ b/reportdesign/source/ui/inc/GroupsSorting.hxx
@@ -38,6 +38,7 @@
#include <vcl/edit.hxx>
#include <vcl/field.hxx>
#include <vcl/imagebtn.hxx>
+#include <vcl/toolbox.hxx>
#include <com/sun/star/report/XGroups.hpp>
#include <com/sun/star/report/XGroup.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -49,6 +50,10 @@
#include <vector>
+#include <dbaccess/ToolBoxHelper.hxx>
+
+#include <vcl/ImageListProvider.hxx>
+
namespace comphelper
{
class OPropertyChangeMultiplexer;
@@ -62,16 +67,22 @@ class OReportController;
|* Groups and Sorting dialog
|*
\************************************************************************/
+
class OGroupsSortingDialog : public FloatingWindow
, public ::cppu::BaseMutex
- , public ::comphelper::OPropertyChangeListener
+ , public ::comphelper::OPropertyChangeListener
+ ,public dbaui::OToolBoxHelper
+ ,public vcl::IImageListProvider
{
friend class OFieldExpressionControl;
FixedLine m_aFL2;
FixedText m_aMove;
- ImageButton m_aUp;
- ImageButton m_aDown;
+//BTN ImageButton m_aPB_Up;
+//BTN ImageButton m_aPB_Down;
+//BTN ImageButton m_aPB_Delete;
+ ToolBox m_aToolBox;
+
FixedLine m_aFL3;
FixedText m_aOrder;
ListBox m_aOrderLst;
@@ -100,7 +111,8 @@ private:
DECL_LINK( OnControlFocusLost, Control* );
DECL_LINK( OnControlFocusGot, Control* );
DECL_LINK( LBChangeHdl, ListBox* );
- DECL_LINK( ClickHdl, ImageButton* );
+//BTN DECL_LINK( ClickHdl, ImageButton* );
+ DECL_LINK( OnFormatAction, ToolBox* );
/** returns the groups
@return the groups which now have to check which one changes
@@ -171,6 +183,24 @@ public:
/* updates the current view
*/
void UpdateData( );
+
+ /** will be called when the controls need to be resized.
+ @param _rDiff
+ Contains the difference of the old and new toolbox size.
+ */
+ virtual void resizeControls(const Size& _rDiff);
+
+ /** will be called when the image list is needed.
+ @param _eSymbolsSize
+ <svtools/imgdef.hxx>
+ @param _bHiContast
+ <TRUE/> when in high contrast mode.
+ */
+ virtual ImageList getImageList(sal_Int16 _eSymbolsSize,sal_Bool _bHiContast) const;
+
+ // ImageListProvider interface
+ virtual ImageList getImageList(vcl::ImageListType) SAL_THROW ((com::sun::star::lang::IllegalArgumentException ));
+
};
// =============================================================================
} // namespace rptui
diff --git a/reportdesign/source/ui/inc/IReportControllerObserver.hxx b/reportdesign/source/ui/inc/IReportControllerObserver.hxx
new file mode 100644
index 000000000000..2a51e1a655eb
--- /dev/null
+++ b/reportdesign/source/ui/inc/IReportControllerObserver.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: UndoEnv.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_BEAUTIFIER_HXX
+#define INCLUDED_BEAUTIFIER_HXX
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_reportdesign.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+/** === end UNO includes === **/
+
+namespace rptui
+{
+ /* abstract */ class IReportControllerObserver
+ {
+ protected:
+ // IReportControllerObserver(){}
+ virtual ~IReportControllerObserver() {}
+
+ public:
+
+ virtual void notifyPropertyChange( const ::com::sun::star::beans::PropertyChangeEvent& _rEvent ) = 0;
+ virtual void notifyElementInserted( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxElement ) = 0;
+ virtual void handle( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxElement ) = 0;
+ };
+
+} // namespace rptui
+
+#endif
+
+
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index 887ae576a035..43e17fcff67e 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -65,7 +65,7 @@
#include <functional>
#include <boost/shared_ptr.hpp>
#include <com/sun/star/util/XModeSelector.hpp>
-
+#include "ReportControllerObserver.hxx"
class TransferableHelper;
class TransferableClipboardListener;
@@ -78,6 +78,7 @@ namespace rptui
class OReportModel;
class OSectionView;
class OAddFieldWindow;
+ class OSectionWindow;
typedef ::dbaui::OSingleDocumentController OReportController_BASE;
typedef ::cppu::ImplHelper4 < ::com::sun::star::container::XContainerListener
@@ -103,6 +104,9 @@ namespace rptui
TransferableClipboardListener*
m_pClipbordNotifier; /// notifier for changes in the clipboard
OGroupsSortingDialog* m_pGroupsFloater;
+
+ OXReportControllerObserver* m_pReportControllerObserver;
+
::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition> m_xReportDefinition;
::com::sun::star::uno::Reference< ::com::sun::star::report::XReportEngine> m_xReportEngine;
::com::sun::star::uno::Reference < ::com::sun::star::frame::XComponentLoader> m_xFrameLoader;
@@ -206,6 +210,16 @@ namespace rptui
void executeMethodWithUndo(USHORT _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun);
void alignControlsWithUndo(USHORT _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection = false);
+ /** shrink a section
+ @param _nUndoStrId the string id of the string which is shown in undo menu
+ @param _nShrinkId ID of what you would like to shrink.
+ */
+ protected:
+ void shrinkSectionBottom(::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection);
+ void shrinkSectionTop(::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection);
+ public:
+
+ void shrinkSection(USHORT _nUndoStrId, ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection, sal_Int32 _nShrinkId);
/** opens the file open dialog to allow the user to select a image which will be
* bound to a newly created image button.
@@ -267,9 +281,10 @@ namespace rptui
*/
void impl_zoom_nothrow();
+ private:
OReportController(OReportController const&);
OReportController& operator =(OReportController const&);
-
+ public:
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > getXFrame();
// open the help agent of report designer at start time
@@ -440,6 +455,8 @@ namespace rptui
// cppu::OPropertySetHelper
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+ ::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const;
+
private:
virtual void onLoadedMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager );
virtual void impl_initialize( );
diff --git a/reportdesign/source/ui/inc/ReportControllerObserver.hxx b/reportdesign/source/ui/inc/ReportControllerObserver.hxx
new file mode 100644
index 000000000000..7d11bf0d0fa8
--- /dev/null
+++ b/reportdesign/source/ui/inc/ReportControllerObserver.hxx
@@ -0,0 +1,141 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: UndoEnv.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+#ifndef INCLUDED_REPORTCONTROLLEROBSERVER_HXX
+#define INCLUDED_REPORTCONTROLLEROBSERVER_HXX
+
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#include <com/sun/star/report/XReportDefinition.hpp>
+#include <cppuhelper/implbase3.hxx>
+
+#include <memory>
+#include <dllapi.h>
+#include <vector>
+
+// #include <svtools/lstner.hxx>
+#include <vcl/svapp.hxx>
+#include <tools/link.hxx>
+
+#include <FormattedFieldBeautifier.hxx>
+#include <FixedTextColor.hxx>
+
+namespace rptui
+{
+ class OReportController;
+ class OXReportControllerObserverImpl;
+
+ //========================================================================
+ class /* REPORTDESIGN_DLLPUBLIC */ OXReportControllerObserver
+ : public ::cppu::WeakImplHelper3< ::com::sun::star::beans::XPropertyChangeListener
+ , ::com::sun::star::container::XContainerListener
+ , ::com::sun::star::util::XModifyListener
+ >
+ /*,public SfxListener*/
+ {
+
+ const ::std::auto_ptr<OXReportControllerObserverImpl> m_pImpl;
+
+ FormattedFieldBeautifier m_aFormattedFieldBeautifier;
+ FixedTextColor m_aFixedTextColor;
+
+ // do not allow copy
+ OXReportControllerObserver(const OXReportControllerObserver&);
+ OXReportControllerObserver& operator=(const OXReportControllerObserver&);
+
+// protected:
+
+ void switchListening(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxObject, sal_Bool _bStartListening);
+
+ /* virtual */ ~OXReportControllerObserver(); // UNO Object must have private destructor!
+
+ public:
+ OXReportControllerObserver(const OReportController& _rController);
+
+// protected:
+ // XPropertyChangeListener
+ virtual void SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XContainerListener
+ virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& rEvent) throw(::com::sun::star::uno::RuntimeException);
+
+ // XModifyListener
+ virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+
+ void AddElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Element);
+ void RemoveElement(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Element);
+
+ void AddSection( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection);
+ void RemoveSection( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection );
+
+ // SfxListener
+ // virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ /**
+ Create an object ob OUndoEnvLock locks the undo possibility
+ As long as in the OUndoEnvLock scope, no undo is possible for manipulated object.
+ */
+ class OEnvLock
+ {
+ OXReportControllerObserver& m_rObserver;
+ public:
+ OEnvLock(OXReportControllerObserver& _rObserver): m_rObserver(_rObserver){m_rObserver.Lock();}
+ ~OEnvLock(){ m_rObserver.UnLock(); }
+ };
+
+ void Lock();
+ void UnLock();
+ sal_Bool IsLocked() const;
+
+ void Clear();
+ private:
+
+ void TogglePropertyListening(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& Element);
+ void switchListening( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& _rxContainer, bool _bStartListening ) SAL_THROW(());
+ void switchListening( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxObject, bool _bStartListening ) SAL_THROW(());
+
+ // void ModeChanged(); // will be called from 'Notify'
+ DECL_LINK(SettingsChanged, VclWindowEvent* );
+ private:
+
+ ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild> >::const_iterator getSection(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XChild>& _xContainer) const;
+
+ };
+
+} // namespace rptui
+
+#endif /* INCLUDED_REPORTCONTROLLEROBSERVER_HXX */
+
+
diff --git a/reportdesign/source/ui/inc/ReportWindow.hxx b/reportdesign/source/ui/inc/ReportWindow.hxx
index 0cbe48c38203..e406bcf7ccb9 100644
--- a/reportdesign/source/ui/inc/ReportWindow.hxx
+++ b/reportdesign/source/ui/inc/ReportWindow.hxx
@@ -195,6 +195,7 @@ namespace rptui
// IMarkedSection
::boost::shared_ptr<OSectionWindow> getMarkedSection(NearSectionAccess nsa = CURRENT) const;
+ ::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const;
virtual void markSection(const sal_uInt16 _nPos);
diff --git a/reportdesign/source/ui/inc/ScrollHelper.hxx b/reportdesign/source/ui/inc/ScrollHelper.hxx
index 5321103b7c78..4eaf9720abda 100644
--- a/reportdesign/source/ui/inc/ScrollHelper.hxx
+++ b/reportdesign/source/ui/inc/ScrollHelper.hxx
@@ -189,6 +189,7 @@ namespace rptui
// IMarkedSection
::boost::shared_ptr<OSectionWindow> getMarkedSection(NearSectionAccess nsa = CURRENT) const;
+ ::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const;
virtual void markSection(const sal_uInt16 _nPos);
diff --git a/reportdesign/source/ui/inc/SectionView.hxx b/reportdesign/source/ui/inc/SectionView.hxx
index 61ccb17535c3..166bcaeea6af 100644
--- a/reportdesign/source/ui/inc/SectionView.hxx
+++ b/reportdesign/source/ui/inc/SectionView.hxx
@@ -62,6 +62,19 @@ public:
virtual void MakeVisible( const Rectangle& rRect, Window& rWin );
inline OReportSection* getReportSection() const { return m_pSectionWindow; }
+
+ // switch the marked objects to the given layer.
+ void SetMarkedToLayer( SdrLayerID nLayerNo );
+
+ // return true when only shapes are marked, otherwise false.
+ bool OnlyShapesMarked() const;
+
+ /* returns the common layer id of the marked objects, otherwise -1 will be returned.
+ */
+ short GetLayerIdOfMarkedObjects() const;
+
+ // returns true if objects at Drag & Drop is resize not move
+ bool IsDragResize() const;
};
}
#endif //_REPORT_SECTIONVIEW_HXX
diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx
index 9eda50751869..36eee47f83f3 100644
--- a/reportdesign/source/ui/inc/SectionWindow.hxx
+++ b/reportdesign/source/ui/inc/SectionWindow.hxx
@@ -115,6 +115,7 @@ namespace rptui
inline OStartMarker& getStartMarker() { return m_aStartMarker; }
inline OReportSection& getReportSection() { return m_aReportSection; }
inline OEndMarker& getEndMarker() { return m_aEndMarker; }
+ inline OViewsWindow* getViewsWindow() { return m_pParent; }
void setCollapsed(sal_Bool _bCollapsed);
diff --git a/reportdesign/source/ui/inc/UITools.hxx b/reportdesign/source/ui/inc/UITools.hxx
index d277a1abfd63..0b7e2b6230dc 100644
--- a/reportdesign/source/ui/inc/UITools.hxx
+++ b/reportdesign/source/ui/inc/UITools.hxx
@@ -138,6 +138,9 @@ namespace rptui
*/
void notifySystemWindow(Window* _pWindow,Window* _pToRegister, ::comphelper::mem_fun1_t<TaskPaneList,Window*> _rMemFunc);
+
+ const sal_Int16 ISOVER_IGNORE_CUSTOMSHAPES = 1;
+
/** checks whether the given rectangle overlapps another OUnoObject object in that view.
*
* \param _rRect
@@ -145,7 +148,7 @@ namespace rptui
* \param _bAllObjects if <TRUE/> all objects are taken into account, otherwise only not marked ones
* \return the object which is overlapped, otherwise <NULL/>
*/
- SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects = false,SdrObject* _pIgnore = NULL);
+ SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects = false,SdrObject* _pIgnore = NULL, sal_Int16 _nIgnoreType=0);
SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects, SdrUnoObj* _pIgnoreList[], int _nIgnoreListLength);
diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx
index 995b59e7adba..d4e0a720807a 100644
--- a/reportdesign/source/ui/inc/ViewsWindow.hxx
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -260,7 +260,8 @@ namespace rptui
/** returns the report section window for the given xsection
@param _xSection the section
*/
- ::boost::shared_ptr<OSectionWindow> getReportSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
+ // ::boost::shared_ptr<OSectionWindow> getReportSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
+ ::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const;
/** checks if the keycode is known by the child windows
@param _rCode the keycode
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 511dfbfdf355..95b7cdc3fcea 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -142,6 +142,7 @@ struct PropertyCompare : public ::std::binary_function< beans::Property, ::rtl::
return x.equals(y.Name);// ? true : false;
}
};
+
// -----------------------------------------------------------------------------
::rtl::OUString lcl_getQuotedFunctionName(const ::rtl::OUString& _sFunction)
{
@@ -1468,7 +1469,8 @@ void SAL_CALL GeometryHandler::actuatingPropertyChanged(const ::rtl::OUString &
{
_rxInspectorUI->rebuildPropertyUI(PROPERTY_DATAFIELD);
_rxInspectorUI->rebuildPropertyUI(PROPERTY_FORMULALIST);
- }
+ } // if ( bEnable )
+ m_xFormComponentHandler->actuatingPropertyChanged(ActuatingPropertyName, NewValue, OldValue, _rxInspectorUI, _bFirstTimeInit);
}
break;
case PROPERTY_ID_FORMULALIST:
@@ -1855,7 +1857,7 @@ void GeometryHandler::loadDefaultFunctions()
{
m_aCounterFunction.m_bPreEvaluated = sal_False;
m_aCounterFunction.m_bDeepTraversing = sal_False;
- m_aCounterFunction.m_sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Counter"));
+ m_aCounterFunction.m_sName = String(ModuleRes(RID_STR_F_COUNTER));
m_aCounterFunction.m_sFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:[%FunctionName] + 1"));
m_aCounterFunction.m_sSearchString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:\\[[:alpha:]+([:space:]*[:alnum:]*)*\\][:space:]*\\+[:space:]*[:digit:]*"));
m_aCounterFunction.m_sInitialFormula.IsPresent = sal_True;
@@ -1873,21 +1875,21 @@ void GeometryHandler::loadDefaultFunctions()
aDefault.m_bPreEvaluated = sal_True;
- aDefault.m_sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Accumulation"));
+ aDefault.m_sName = String(ModuleRes(RID_STR_F_ACCUMULATION));
aDefault.m_sFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:[%Column] + [%FunctionName]"));
aDefault.m_sSearchString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:\\[[:alpha:]+([:space:]*[:alnum:]*)*\\][:space:]*\\+[:space:]*\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]"));
aDefault.m_sInitialFormula.IsPresent = sal_True;
aDefault.m_sInitialFormula.Value = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:[%Column]"));
m_aDefaultFunctions.push_back(aDefault);
- aDefault.m_sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Minimum"));
+ aDefault.m_sName = String(ModuleRes(RID_STR_F_MINIMUM));
aDefault.m_sFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:IF([%Column] < [%FunctionName];[%Column];[%FunctionName])"));
aDefault.m_sSearchString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:IF\\((\\[[:alpha:]+([:space:]*[:alnum:]*)*\\])[:space:]*<[:space:]*(\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]);[:space:]*\\1[:space:]*;[:space:]*\\3[:space:]*\\)"));
aDefault.m_sInitialFormula.IsPresent = sal_True;
aDefault.m_sInitialFormula.Value = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:[%Column]"));
m_aDefaultFunctions.push_back(aDefault);
- aDefault.m_sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Maximum"));
+ aDefault.m_sName = String(ModuleRes(RID_STR_F_MAXIMUM));
aDefault.m_sFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:IF([%Column] > [%FunctionName];[%Column];[%FunctionName])"));
aDefault.m_sSearchString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:IF\\((\\[[:alpha:]+([:space:]*[:alnum:]*)*\\])[:space:]*>[:space:]*(\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]);[:space:]*\\1[:space:]*;[:space:]*\\3[:space:]*\\)"));
aDefault.m_sInitialFormula.IsPresent = sal_True;
diff --git a/reportdesign/source/ui/inspection/inspection.src b/reportdesign/source/ui/inspection/inspection.src
index 4413058faaac..c13eb2a141c9 100644
--- a/reportdesign/source/ui/inspection/inspection.src
+++ b/reportdesign/source/ui/inspection/inspection.src
@@ -336,3 +336,19 @@ String RID_STR_MIMETYPE
{
Text [ en-US ] = "Report Output Format" ;
};
+String RID_STR_F_COUNTER
+{
+ Text [ en-US ] = "Counter" ;
+};
+String RID_STR_F_ACCUMULATION
+{
+ Text [ en-US ] = "Accumulation" ;
+};
+String RID_STR_F_MINIMUM
+{
+ Text [ en-US ] = "Minimum" ;
+};
+String RID_STR_F_MAXIMUM
+{
+ Text [ en-US ] = "Maximum" ;
+};
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index c2f5fee7173b..4a964cf17715 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -951,7 +951,7 @@ void notifySystemWindow(Window* _pWindow,Window* _pToRegister, ::comphelper::mem
}
}
// -----------------------------------------------------------------------------
-SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _bAllObjects,SdrObject* _pIgnore)
+SdrObject* isOver(const Rectangle& _rRect, SdrPage& _rPage, SdrView& _rView, bool _bAllObjects, SdrObject* _pIgnore, sal_Int16 _nIgnoreType)
{
SdrObject* pOverlappedObj = NULL;
SdrObjListIter aIter(_rPage,IM_DEEPNOGROUPS);
@@ -963,11 +963,21 @@ SdrObject* isOver(const Rectangle& _rRect,SdrPage& _rPage,SdrView& _rView,bool _
&& (_bAllObjects || !_rView.IsObjMarked(pObjIter))
&& dynamic_cast<OUnoObject*>(pObjIter) != NULL )
{
+ if (_nIgnoreType == ISOVER_IGNORE_CUSTOMSHAPES && pObjIter->GetObjIdentifier() == OBJ_CUSTOMSHAPE)
+ {
+ continue;
+ }
+
+ OUnoObject* pObj = dynamic_cast<OUnoObject*>(pObjIter);
+ if (pObj != NULL)
+ {
+
Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect());
if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) )
pOverlappedObj = pObjIter;
}
}
+ }
return pOverlappedObj;
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/misc/rptuiservices.cxx b/reportdesign/source/ui/misc/rptuiservices.cxx
index 4a96c3ca9647..4ce1a9cde4bf 100644
--- a/reportdesign/source/ui/misc/rptuiservices.cxx
+++ b/reportdesign/source/ui/misc/rptuiservices.cxx
@@ -71,20 +71,20 @@ cppu::ImplementationEntry entries[] = {
};
}
-extern "C" void * SAL_CALL component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
char const * implName, void * serviceManager, void * registryKey)
{
return cppu::component_getFactoryHelper(
implName, serviceManager, registryKey, entries);
}
-extern "C" void SAL_CALL component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
char const ** envTypeName, uno_Environment **)
{
*envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-extern "C" sal_Bool SAL_CALL component_writeInfo(
+extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
void * serviceManager, void * registryKey)
{
return cppu::component_writeInfoHelper(
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 342812f1deea..b8da21afa273 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -206,15 +206,15 @@ ODesignView::~ODesignView()
}
if ( m_pAddField )
{
- SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( UID_RPT_RPT_APP_VIEW ) );
- aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pAddField->GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)).GetBuffer() ) );
+ SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( UID_RPT_RPT_APP_VIEW ) );
+ aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pAddField->GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)).GetBuffer() ) );
notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
::std::auto_ptr<Window> aTemp2(m_pAddField);
m_pAddField = NULL;
}
if ( m_pReportExplorer )
{
- SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( RID_NAVIGATOR ) );
+ SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( RID_NAVIGATOR ) );
aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pReportExplorer->GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)).GetBuffer() ) );
notifySystemWindow(this,m_pReportExplorer,::comphelper::mem_fun(&TaskPaneList::RemoveWindow));
::std::auto_ptr<Window> aTemp2(m_pReportExplorer);
@@ -567,7 +567,7 @@ void ODesignView::toggleReportExplorer()
OReportController& rReportController = getController();
m_pReportExplorer = new ONavigator(this,rReportController);
SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( RID_NAVIGATOR ) );
- if ( aDlgOpt.Exists() )
+ if ( aDlgOpt.Exists() )
m_pReportExplorer->SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) );
m_pReportExplorer->AddEventListener(LINK(&rReportController,OReportController,EventLstHdl));
notifySystemWindow(this,m_pReportExplorer,::comphelper::mem_fun(&TaskPaneList::AddWindow));
@@ -600,12 +600,12 @@ void ODesignView::toggleAddField()
uno::Reference< report::XSection > xSection = m_pCurrentView->getReportSection()->getSection();
xReport = xSection->getReportDefinition();
}
- uno::Reference < beans::XPropertySet > xSet(rReportController.getRowSet(),uno::UNO_QUERY);
- m_pAddField = new OAddFieldWindow(this,xSet);
+ uno::Reference < beans::XPropertySet > xSet(rReportController.getRowSet(),uno::UNO_QUERY);
+ m_pAddField = new OAddFieldWindow(this,xSet);
m_pAddField->SetCreateHdl(LINK( &rReportController, OReportController, OnCreateHdl ) );
- SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( UID_RPT_RPT_APP_VIEW ) );
- if ( aDlgOpt.Exists() )
- m_pAddField->SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) );
+ SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( UID_RPT_RPT_APP_VIEW ) );
+ if ( aDlgOpt.Exists() )
+ m_pAddField->SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) );
m_pAddField->Update();
m_pAddField->AddEventListener(LINK(&rReportController,OReportController,EventLstHdl));
notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::AddWindow));
@@ -644,6 +644,11 @@ uno::Reference< report::XReportComponent > ODesignView::getCurrentControlModel()
{
return m_aScrollWindow.getMarkedSection(nsa);
}
+//-----------------------------------------------------------------------------
+::boost::shared_ptr<OSectionWindow> ODesignView::getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const
+{
+ return m_aScrollWindow.getSectionWindow(_xSection);
+}
// -------------------------------------------------------------------------
void ODesignView::markSection(const sal_uInt16 _nPos)
{
diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx
new file mode 100644
index 000000000000..b4305f26c911
--- /dev/null
+++ b/reportdesign/source/ui/report/FixedTextColor.cxx
@@ -0,0 +1,286 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: UndoEnv.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_reportdesign.hxx"
+
+#include <FixedTextColor.hxx>
+#include <com/sun/star/report/XFixedText.hpp>
+#include <com/sun/star/awt/XVclWindowPeer.hpp>
+#include <com/sun/star/awt/InvalidateStyle.hpp>
+
+#include <RptObject.hxx>
+#include <RptModel.hxx>
+#include <RptPage.hxx>
+#include <ViewsWindow.hxx>
+#include <ReportSection.hxx>
+#include <ReportController.hxx>
+#include <uistrings.hrc>
+#include <reportformula.hxx>
+#include <toolkit/helper/property.hxx>
+
+#include <tools/color.hxx> // COL_TRANSPARENT
+#include <svtools/extcolorcfg.hxx>
+#include <unotools/confignode.hxx>
+
+// DBG_*
+#include <tools/debug.hxx>
+// DBG_UNHANDLED_EXCEPTION
+#include <tools/diagnose_ex.h>
+
+#include <vcl/svapp.hxx>
+#include <vcl/settings.hxx>
+
+namespace rptui
+{
+ using namespace ::com::sun::star;
+
+ DBG_NAME(rpt_FixedTextColor)
+
+ FixedTextColor::FixedTextColor(const OReportController& _aController)
+ :m_rReportController(_aController)
+ {
+ DBG_CTOR(rpt_FixedTextColor, NULL);
+ }
+
+ //--------------------------------------------------------------------
+ // sal_Int32 FixedTextColor::getTextColor()
+ // {
+ // const StyleSettings& aStyleSettings = Application::GetSettings().GetStyleSettings();
+ // BOOL bHighContrast = aStyleSettings.GetHighContrastMode();
+ //
+ // Color aGetFaceColor = aStyleSettings.GetFaceColor();
+ // Color aGetCheckedColor = aStyleSettings.GetCheckedColor();
+ // Color aGetLightColor = aStyleSettings.GetLightColor();
+ // Color aGetLightBorderColor = aStyleSettings.GetLightBorderColor();
+ // Color aGetShadowColor = aStyleSettings.GetShadowColor();
+ // Color aGetDarkShadowColor = aStyleSettings.GetDarkShadowColor();
+ // Color aGetButtonTextColor = aStyleSettings.GetButtonTextColor();
+ // Color aGetButtonRolloverTextColor = aStyleSettings.GetButtonRolloverTextColor();
+ // Color aGetRadioCheckTextColor = aStyleSettings.GetRadioCheckTextColor();
+ // Color aGetGroupTextColor = aStyleSettings.GetGroupTextColor();
+ // Color aGetLabelTextColor = aStyleSettings.GetLabelTextColor();
+ // Color aGetInfoTextColor = aStyleSettings.GetInfoTextColor();
+ // Color aGetWindowColor = aStyleSettings.GetWindowColor();
+ // Color aGetWindowTextColor = aStyleSettings.GetWindowTextColor();
+ // Color aGetDialogColor = aStyleSettings.GetDialogColor();
+ // Color aGetDialogTextColor = aStyleSettings.GetDialogTextColor();
+ // Color aGetWorkspaceColor = aStyleSettings.GetWorkspaceColor();
+ // Color aGetFieldColor = aStyleSettings.GetFieldColor();
+ // Color aGetFieldTextColor = aStyleSettings.GetFieldTextColor();
+ // Color aGetFieldRolloverTextColor = aStyleSettings.GetFieldRolloverTextColor();
+ // Color aGetActiveColor = aStyleSettings.GetActiveColor();
+ // Color aGetActiveColor2 = aStyleSettings.GetActiveColor2();
+ // Color aGetActiveTextColor = aStyleSettings.GetActiveTextColor();
+ // Color aGetActiveBorderColor = aStyleSettings.GetActiveBorderColor();
+ // Color aGetDeactiveColor = aStyleSettings.GetDeactiveColor();
+ // Color aGetDeactiveColor2 = aStyleSettings.GetDeactiveColor2();
+ // Color aGetDeactiveTextColor = aStyleSettings.GetDeactiveTextColor();
+ // Color aGetDeactiveBorderColor = aStyleSettings.GetDeactiveBorderColor();
+ // Color aGetHighlightColor = aStyleSettings.GetHighlightColor();
+ // Color aGetHighlightTextColor = aStyleSettings.GetHighlightTextColor();
+ // Color aGetDisableColor = aStyleSettings.GetDisableColor();
+ // Color aGetHelpColor = aStyleSettings.GetHelpColor();
+ // Color aGetHelpTextColor = aStyleSettings.GetHelpTextColor();
+ // Color aGetMenuColor = aStyleSettings.GetMenuColor();
+ // Color aGetMenuBarColor = aStyleSettings.GetMenuBarColor();
+ // Color aGetMenuBorderColor = aStyleSettings.GetMenuBorderColor();
+ // Color aGetMenuTextColor = aStyleSettings.GetMenuTextColor();
+ // Color aGetMenuHighlightColor = aStyleSettings.GetMenuHighlightColor();
+ // Color aGetMenuHighlightTextColor = aStyleSettings.GetMenuHighlightTextColor();
+ // Color aGetLinkColor = aStyleSettings.GetLinkColor();
+ // Color aGetVisitedLinkColor = aStyleSettings.GetVisitedLinkColor();
+ // Color aGetHighlightLinkColor = aStyleSettings.GetHighlightLinkColor();
+ // Color aGetMonoColor = aStyleSettings.GetMonoColor();
+ // Color aGetActiveTabColor = aStyleSettings.GetActiveTabColor();
+ // Color aGetInactiveTabColor = aStyleSettings.GetInactiveTabColor();
+ //
+ // Color aWindowColor = aStyleSettings.GetWindowColor();
+ // Color aLabelColor = aStyleSettings.GetLabelTextColor();
+ //
+ // // if (m_nTextColor == -1)
+ // // {
+ // // svtools::ExtendedColorConfig aConfig;
+ // // m_nTextColor = aConfig.GetColorValue(CFG_REPORTDESIGNER, DBTEXTBOXBOUNDCONTENT).getColor();
+ // // }
+ // return aLabelColor.GetColor();
+ // }
+
+ //--------------------------------------------------------------------
+ FixedTextColor::~FixedTextColor()
+ {
+ DBG_DTOR(rpt_FixedTextColor,NULL);
+ }
+ // -----------------------------------------------------------------------------
+
+ void FixedTextColor::notifyPropertyChange( const beans::PropertyChangeEvent& _rEvent )
+ {
+ // (void)_rEvent;
+ uno::Reference< report::XFixedText > xFixedText( _rEvent.Source, uno::UNO_QUERY );
+ if ( ! xFixedText.is() )
+ {
+ return;
+ }
+
+ try
+ {
+ uno::Reference< lang::XComponent > xComponent( xFixedText, uno::UNO_QUERY_THROW );
+ handle(xComponent);
+ // uno::Reference<awt::XVclWindowPeer> xVclWindowPeer = getVclWindowPeer(xComponent);
+
+ // setPropertyTextColor(xVclWindowPeer, getTextColor());
+ }
+ catch (uno::Exception e)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ // -----------------------------------------------------------------------------
+ void FixedTextColor::setPropertyTextColor(const uno::Reference< awt::XVclWindowPeer >& _xVclWindowPeer, sal_Int32 _nTextColor)
+ {
+ _xVclWindowPeer->setProperty(PROPERTY_TEXTCOLOR, uno::makeAny(sal_Int32(_nTextColor)));
+ }
+
+ // -----------------------------------------------------------------------------
+ void FixedTextColor::notifyElementInserted( const uno::Reference< uno::XInterface >& _rxElement )
+ {
+ handle(_rxElement);
+ }
+
+// -----------------------------------------------------------------------------
+ void FixedTextColor::handle( const uno::Reference< uno::XInterface >& _rxElement )
+ {
+ // (void) _rxElement;
+ uno::Reference< report::XFixedText > xFixedText( _rxElement, uno::UNO_QUERY );
+ if ( ! xFixedText.is() )
+ {
+ return;
+ }
+
+ try
+ {
+ sal_Bool bIsDark = sal_False;
+ const sal_Int32 nBackColor( xFixedText->getControlBackground() );
+ if ((sal_uInt32)nBackColor == COL_TRANSPARENT)
+ {
+ uno::Reference <report::XSection> xSection(xFixedText->getParent(), uno::UNO_QUERY_THROW);
+
+ sal_Bool bSectionBackColorIsTransparent = xSection->getBackTransparent();
+ if (bSectionBackColorIsTransparent)
+ {
+ // Label Transparent, Section Transparent set LabelTextColor
+ const StyleSettings& aStyleSettings = Application::GetSettings().GetStyleSettings();
+ Color aWindowColor = aStyleSettings.GetWindowColor();
+ bIsDark = aWindowColor.IsDark();
+ }
+ else
+ {
+ com::sun::star::util::Color aColor2 = xSection->getBackColor();
+ Color aBackColor(aColor2);
+ bIsDark = aBackColor.IsDark();
+ }
+ }
+ else
+ {
+ Color aLabelBackColor(nBackColor);
+ bIsDark = aLabelBackColor.IsDark();
+ }
+
+ uno::Reference<awt::XVclWindowPeer> xVclWindowPeer = getVclWindowPeer(xFixedText);
+ if (bIsDark)
+ {
+ const StyleSettings& aStyleSettings = Application::GetSettings().GetStyleSettings();
+ Color aLabelTextColor = aStyleSettings.GetLabelTextColor();
+ setPropertyTextColor(xVclWindowPeer, aLabelTextColor.GetColor());
+ }
+ else
+ {
+ util::Color aLabelColor = xFixedText->getCharColor();
+ setPropertyTextColor(xVclWindowPeer, aLabelColor);
+ }
+
+ }
+ catch( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+
+// -----------------------------------------------------------------------------
+ // XPropertyChangeListener
+ uno::Reference<awt::XControl> FixedTextColor::getXControl(const uno::Reference< report::XFixedText >& _xFixedText) throw(uno::RuntimeException)
+ {
+
+ uno::Reference<awt::XControl> xControl;
+ OReportController *pController = (OReportController *)&m_rReportController;
+
+ ::boost::shared_ptr<OReportModel> pModel = pController->getSdrModel();
+
+ uno::Reference<report::XSection> xSection(_xFixedText->getSection());
+ if ( xSection.is() )
+ {
+ OReportPage *pPage = pModel->getPage(xSection);
+ ULONG nIndex = pPage->getIndexOf(_xFixedText.get());
+ if (nIndex < pPage->GetObjCount() )
+ {
+ SdrObject *pObject = pPage->GetObj(nIndex);
+ OUnoObject* pUnoObj = dynamic_cast<OUnoObject*>(pObject);
+ if ( pUnoObj ) // this doesn't need to be done for shapes
+ {
+ ::boost::shared_ptr<OSectionWindow> pSectionWindow = pController->getSectionWindow(xSection);
+ if (pSectionWindow != NULL)
+ {
+ OReportSection& aOutputDevice = pSectionWindow->getReportSection(); // OutputDevice
+ OSectionView& aSdrView = aOutputDevice.getSectionView(); // SdrView
+ xControl = pUnoObj->GetUnoControl(aSdrView, aOutputDevice);
+ }
+ }
+ }
+ }
+ return xControl;
+ }
+
+// -----------------------------------------------------------------------------
+ uno::Reference<awt::XVclWindowPeer> FixedTextColor::getVclWindowPeer(const uno::Reference< report::XFixedText >& _xComponent) throw(uno::RuntimeException)
+ {
+ uno::Reference<awt::XVclWindowPeer> xVclWindowPeer;
+ uno::Reference<awt::XControl> xControl = getXControl(_xComponent);
+
+ xVclWindowPeer = uno::Reference<awt::XVclWindowPeer>( xControl->getPeer(), uno::UNO_QUERY);
+
+ return xVclWindowPeer;
+ }
+
+
+
+
+}
diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
new file mode 100644
index 000000000000..b0c5922556ab
--- /dev/null
+++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
@@ -0,0 +1,205 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: UndoEnv.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_reportdesign.hxx"
+
+#include <FormattedFieldBeautifier.hxx>
+
+#include <com/sun/star/report/XFormattedField.hpp>
+#include <com/sun/star/report/XImageControl.hpp>
+#include <com/sun/star/awt/XVclWindowPeer.hpp>
+#include <com/sun/star/awt/InvalidateStyle.hpp>
+
+#include <RptObject.hxx>
+#include <RptModel.hxx>
+#include <RptPage.hxx>
+#include <ViewsWindow.hxx>
+#include <ReportSection.hxx>
+#include <ReportController.hxx>
+#include <uistrings.hrc>
+#include <reportformula.hxx>
+#include <toolkit/helper/property.hxx>
+
+#include <svtools/extcolorcfg.hxx>
+#include <unotools/confignode.hxx>
+
+// DBG_*
+#include <tools/debug.hxx>
+// DBG_UNHANDLED_EXCEPTION
+#include <tools/diagnose_ex.h>
+
+namespace rptui
+{
+ using namespace ::com::sun::star;
+
+ DBG_NAME(rpt_FormattedFieldBeautifier)
+
+ //--------------------------------------------------------------------
+ FormattedFieldBeautifier::FormattedFieldBeautifier(const OReportController& _aController)
+ :m_rReportController(_aController)
+ ,m_nTextColor(-1)
+ {
+ DBG_CTOR(rpt_FormattedFieldBeautifier, NULL);
+ }
+
+ //--------------------------------------------------------------------
+ sal_Int32 FormattedFieldBeautifier::getTextColor()
+ {
+ if (m_nTextColor == -1)
+ {
+ svtools::ExtendedColorConfig aConfig;
+ m_nTextColor = aConfig.GetColorValue(CFG_REPORTDESIGNER, DBTEXTBOXBOUNDCONTENT).getColor();
+ }
+ return m_nTextColor;
+ }
+
+ //--------------------------------------------------------------------
+ FormattedFieldBeautifier::~FormattedFieldBeautifier()
+ {
+ DBG_DTOR(rpt_FormattedFieldBeautifier,NULL);
+ }
+
+ // -----------------------------------------------------------------------------
+ void FormattedFieldBeautifier::setPlaceholderText( const uno::Reference< uno::XInterface >& _rxComponent )
+ {
+ ::rtl::OUString sDataField;
+ uno::Reference< report::XReportComponent > xComponent;
+
+ try
+ {
+ // is it a formatted field?
+ uno::Reference< report::XFormattedField > xFormattedField( _rxComponent, uno::UNO_QUERY );
+ if ( xFormattedField.is() )
+ {
+ sDataField = xFormattedField->getDataField();
+ xComponent.set( xFormattedField.get() );
+ }
+ else
+ {
+ // perhaps an image control?
+ uno::Reference< report::XImageControl > xImageControl( _rxComponent, uno::UNO_QUERY );
+ if ( xImageControl.is() )
+ {
+ sDataField = xImageControl->getDataField();
+ xComponent.set( xImageControl.get() );
+ }
+ }
+ if ( !xComponent.is() )
+ return;
+
+ if ( sDataField.getLength() )
+ {
+ ReportFormula aFormula( sDataField );
+ sDataField = aFormula.getEqualUndecoratedContent();
+ }
+
+ setPlaceholderText( getVclWindowPeer( xComponent ), sDataField );
+ }
+ catch (uno::Exception e)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ // -----------------------------------------------------------------------------
+ void FormattedFieldBeautifier::setPlaceholderText( const uno::Reference< awt::XVclWindowPeer >& _xVclWindowPeer, const ::rtl::OUString& _rText )
+ {
+ OSL_ENSURE( _xVclWindowPeer.is(), "FormattedFieldBeautifier::setPlaceholderText: invalid peer!" );
+ if ( !_xVclWindowPeer.is() )
+ throw uno::RuntimeException();
+
+ // the actual text
+ _xVclWindowPeer->setProperty(PROPERTY_TEXT, uno::makeAny(_rText));
+ // the text color
+ _xVclWindowPeer->setProperty(PROPERTY_TEXTCOLOR, uno::makeAny(getTextColor()));
+ // font->italic
+ uno::Any aFontDescriptor = _xVclWindowPeer->getProperty(PROPERTY_FONTDESCRIPTOR);
+ awt::FontDescriptor aFontDescriptorStructure;
+ aFontDescriptor >>= aFontDescriptorStructure;
+ aFontDescriptorStructure.Slant = ::com::sun::star::awt::FontSlant_ITALIC;
+ _xVclWindowPeer->setProperty(PROPERTY_FONTDESCRIPTOR, uno::makeAny(aFontDescriptorStructure));
+ }
+
+ // -----------------------------------------------------------------------------
+ void FormattedFieldBeautifier::notifyPropertyChange( const beans::PropertyChangeEvent& _rEvent )
+ {
+ if ( !_rEvent.PropertyName.equalsAscii( "DataField" ) )
+ // not interested in
+ return;
+
+ setPlaceholderText( _rEvent.Source );
+ }
+
+ // -----------------------------------------------------------------------------
+ void FormattedFieldBeautifier::handle( const uno::Reference< uno::XInterface >& _rxElement )
+ {
+ setPlaceholderText( _rxElement );
+ }
+
+ // -----------------------------------------------------------------------------
+ void FormattedFieldBeautifier::notifyElementInserted( const uno::Reference< uno::XInterface >& _rxElement )
+ {
+ handle( _rxElement );
+ }
+
+ // -----------------------------------------------------------------------------
+ uno::Reference<awt::XVclWindowPeer> FormattedFieldBeautifier::getVclWindowPeer(const uno::Reference< report::XReportComponent >& _xComponent) throw(uno::RuntimeException)
+ {
+ uno::Reference<awt::XVclWindowPeer> xVclWindowPeer;
+
+ ::boost::shared_ptr<OReportModel> pModel = const_cast< OReportController& >( m_rReportController ).getSdrModel();
+
+ uno::Reference<report::XSection> xSection(_xComponent->getSection());
+ if ( xSection.is() )
+ {
+ OReportPage *pPage = pModel->getPage(xSection);
+ ULONG nIndex = pPage->getIndexOf(_xComponent);
+ if (nIndex < pPage->GetObjCount() )
+ {
+ SdrObject *pObject = pPage->GetObj(nIndex);
+ OUnoObject* pUnoObj = dynamic_cast<OUnoObject*>(pObject);
+ if ( pUnoObj ) // this doesn't need to be done for shapes
+ {
+ // Rectangle aRect = pUnoObj->GetCurrentBoundRect();
+ ::boost::shared_ptr<OSectionWindow> pSectionWindow = m_rReportController.getSectionWindow(xSection);
+ if (pSectionWindow != NULL)
+ {
+ OReportSection& aOutputDevice = pSectionWindow->getReportSection(); // OutputDevice
+ OSectionView& aSdrView = aOutputDevice.getSectionView(); // SdrView
+ uno::Reference<awt::XControl> xControl = pUnoObj->GetUnoControl(aSdrView, aOutputDevice);
+ xVclWindowPeer = uno::Reference<awt::XVclWindowPeer>( xControl->getPeer(), uno::UNO_QUERY);
+ }
+ }
+ }
+ }
+ return xVclWindowPeer;
+ }
+}
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 63aabbe008af..bb4ed5efae07 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -158,6 +158,8 @@
#include <unotools/confignode.hxx>
#include <helpids.hrc>
+#include <ReportControllerObserver.hxx>
+
using namespace ::com::sun::star;
using namespace uno;
using namespace io;
@@ -305,9 +307,14 @@ OReportController::OReportController(Reference< XComponentContext > const & xCon
,m_bChartEnabled(false)
,m_bChartEnabledAsked(false)
{
+ // new Observer
+ m_pReportControllerObserver = new OXReportControllerObserver(*this);
+ m_pReportControllerObserver->acquire();
+
m_sMode = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("normal"));
DBG_CTOR( rpt_OReportController,NULL);
registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZoomValue")),PROPERTY_ID_ZOOMVALUE,beans::PropertyAttribute::BOUND| beans::PropertyAttribute::TRANSIENT,&m_nZoomValue,::getCppuType(reinterpret_cast< sal_Int16*>(NULL)));
+
}
// -----------------------------------------------------------------------------
OReportController::~OReportController()
@@ -320,6 +327,7 @@ IMPLEMENT_FORWARD_XINTERFACE2(OReportController,OReportController_BASE,OReportCo
// -----------------------------------------------------------------------------
void OReportController::disposing()
{
+
if ( getView() && m_pClipbordNotifier )
{
m_pClipbordNotifier->ClearCallbackLink();
@@ -354,6 +362,8 @@ void OReportController::disposing()
pSectionWindow->getReportSection().deactivateOle();
getUndoMgr()->Clear(); // clear all undo redo things
listen(false);
+ m_pReportControllerObserver->Clear();
+ m_pReportControllerObserver->release();
}
catch(uno::Exception&)
{
@@ -456,11 +466,9 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
aReturn.bEnabled = pSectionView && pSectionView->GetMarkedObjectCount() > 2;
}
break;
+ case SID_ARRANGEMENU:
case SID_FRAME_DOWN:
case SID_FRAME_UP:
- aReturn.bEnabled = sal_False;
- break;
- case SID_ARRANGEMENU:
case SID_FRAME_TO_TOP:
case SID_FRAME_TO_BOTTOM:
case SID_OBJECT_HEAVEN:
@@ -468,29 +476,31 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
aReturn.bEnabled = isEditable() && m_pMyOwnView->HasSelection();
if ( aReturn.bEnabled )
{
- uno::Reference< report::XShape> xShape(m_pMyOwnView->getCurrentControlModel(),uno::UNO_QUERY);
- aReturn.bEnabled = xShape.is();
+ OSectionView* pSectionView = getCurrentSectionView();
+ aReturn.bEnabled = pSectionView && pSectionView->OnlyShapesMarked();
if ( aReturn.bEnabled )
{
- OSectionView* pSectionView = getCurrentSectionView();
- if ( pSectionView )
- {
- switch(_nId)
- {
- case SID_OBJECT_HEAVEN:
- aReturn.bEnabled = pSectionView->IsToTopPossible();
- break;
- case SID_OBJECT_HELL:
- aReturn.bEnabled = pSectionView->IsToBtmPossible();
- break;
- default:
- break;
- }
- }
+ if ( SID_OBJECT_HEAVEN == _nId )
+ aReturn.bEnabled = pSectionView->GetLayerIdOfMarkedObjects() != RPT_LAYER_FRONT;
+ else if ( SID_OBJECT_HELL == _nId )
+ aReturn.bEnabled = pSectionView->GetLayerIdOfMarkedObjects() != RPT_LAYER_BACK;
}
}
break;
+ case SID_SECTION_SHRINK:
+ case SID_SECTION_SHRINK_TOP:
+ case SID_SECTION_SHRINK_BOTTOM:
+ {
+ sal_Int32 nCount = 0;
+ uno::Reference<report::XSection> xSection = m_pMyOwnView->getCurrentSection();
+ if ( xSection.is() )
+ {
+ nCount = xSection->getCount();
+ }
+ aReturn.bEnabled = isEditable() && nCount > 0;
+ }
+ break;
case SID_OBJECT_ALIGN:
case SID_OBJECT_ALIGN_LEFT:
case SID_OBJECT_ALIGN_CENTER:
@@ -1025,7 +1035,9 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
case SID_REDO:
case SID_UNDO:
{
- const OXUndoEnvironment::OUndoEnvLock aLock( m_aReportModel->GetUndoEnv() );
+ // const OXUndoEnvironment::OUndoEnvLock aLock( m_aReportModel->GetUndoEnv() );
+ // We would like to know if we are in undo mode
+ const OXUndoEnvironment::OUndoMode aLock( m_aReportModel->GetUndoEnv() );
OReportController_BASE::Execute( _nId, aArgs );
InvalidateAll();
updateFloater();
@@ -1092,6 +1104,16 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
case SID_OBJECT_ALIGN_DOWN:
alignControlsWithUndo(RID_STR_UNDO_ALIGNMENT,ControlModification::BOTTOM,SID_SECTION_ALIGN_DOWN == _nId);
break;
+
+ case SID_SECTION_SHRINK_BOTTOM:
+ case SID_SECTION_SHRINK_TOP:
+ case SID_SECTION_SHRINK:
+ {
+ uno::Reference<report::XSection> xSection = m_pMyOwnView->getCurrentSection();
+ shrinkSection(RID_STR_UNDO_SHRINK, xSection, _nId);
+ }
+ break;
+
case SID_SELECTALL:
m_pMyOwnView->SelectAll(OBJ_NONE);
break;
@@ -1656,6 +1678,9 @@ void OReportController::impl_initialize( )
if ( !m_aReportModel )
throw Exception();
+ ::comphelper::NamedValueCollection aArgs(getModel()->getArgs());
+ setMode(aArgs.getOrDefault("Mode", rtl::OUString::createFromAscii("normal")));
+
listen(true);
setEditable( !m_aReportModel->IsReadOnly() );
m_xFormatter.set(getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))), UNO_QUERY);
@@ -1867,6 +1892,9 @@ void OReportController::describeSupportedFeatures()
implDescribeSupportedFeature( ".uno:SectionAlignTop", SID_SECTION_ALIGN_UP, CommandGroup::FORMAT );
implDescribeSupportedFeature( ".uno:SectionAlignMiddle", SID_SECTION_ALIGN_MIDDLE, CommandGroup::FORMAT );
implDescribeSupportedFeature( ".uno:SectionAlignBottom", SID_SECTION_ALIGN_DOWN, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:SectionShrink", SID_SECTION_SHRINK, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:SectionShrinkTop", SID_SECTION_SHRINK_TOP, CommandGroup::FORMAT );
+ implDescribeSupportedFeature( ".uno:SectionShrinkBottom", SID_SECTION_SHRINK_BOTTOM, CommandGroup::FORMAT );
implDescribeSupportedFeature( ".uno:ObjectResize", SID_OBJECT_RESIZING, CommandGroup::FORMAT );
implDescribeSupportedFeature( ".uno:SmallestWidth", SID_OBJECT_SMALLESTWIDTH, CommandGroup::FORMAT );
@@ -2091,6 +2119,7 @@ void OReportController::onLoadedMenu(const Reference< frame::XLayoutManager >& _
,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/alignmentbar"))
,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/sectionalignmentbar"))
,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/resizebar"))
+ ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/sectionshrinkbar"))
};
for (size_t i = 0; i< sizeof(s_sMenu)/sizeof(s_sMenu[0]); ++i)
{
@@ -2124,10 +2153,26 @@ void OReportController::notifyGroupSections(const ContainerEvent& _rEvent,bool _
if ( xGroup->getHeaderOn() )
{
groupChange(xGroup,PROPERTY_HEADERON,nGroupPos,_bShow);
+ if (_bShow)
+ {
+ m_pReportControllerObserver->AddSection(xGroup->getHeader());
+ }
+ else
+ {
+ m_pReportControllerObserver->RemoveSection(xGroup->getHeader());
+ }
}
if ( xGroup->getFooterOn() )
{
groupChange(xGroup,PROPERTY_FOOTERON,nGroupPos,_bShow);
+ if (_bShow)
+ {
+ m_pReportControllerObserver->AddSection(xGroup->getFooter());
+ }
+ else
+ {
+ m_pReportControllerObserver->RemoveSection(xGroup->getFooter());
+ }
}
}
}
@@ -2164,9 +2209,14 @@ void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEven
{
const USHORT nPosition = m_xReportDefinition->getPageHeaderOn() ? 1 : 0;
if ( bShow )
+ {
m_pMyOwnView->addSection(m_xReportDefinition->getReportHeader(),DBREPORTHEADER,nPosition);
+ m_pReportControllerObserver->AddSection(m_xReportDefinition->getReportHeader());
+ }
else
+ {
m_pMyOwnView->removeSection(nPosition);
+ }
}
else if ( evt.PropertyName.equals( PROPERTY_REPORTFOOTERON ) )
{
@@ -2174,23 +2224,38 @@ void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEven
if ( m_xReportDefinition->getPageFooterOn() )
--nPosition;
if ( bShow )
+ {
m_pMyOwnView->addSection(m_xReportDefinition->getReportFooter(),DBREPORTFOOTER,nPosition);
+ m_pReportControllerObserver->AddSection(m_xReportDefinition->getReportFooter());
+ }
else
+ {
m_pMyOwnView->removeSection(nPosition - 1);
+ }
}
else if ( evt.PropertyName.equals( PROPERTY_PAGEHEADERON ) )
{
if ( bShow )
+ {
m_pMyOwnView->addSection(m_xReportDefinition->getPageHeader(),DBPAGEHEADER,0);
+ m_pReportControllerObserver->AddSection(m_xReportDefinition->getPageHeader());
+ }
else
+ {
m_pMyOwnView->removeSection(USHORT(0));
+ }
}
else if ( evt.PropertyName.equals( PROPERTY_PAGEFOOTERON ) )
{
if ( bShow )
+ {
m_pMyOwnView->addSection(m_xReportDefinition->getPageFooter(),DBPAGEFOOTER);
+ m_pReportControllerObserver->AddSection(m_xReportDefinition->getPageFooter());
+ }
else
+ {
m_pMyOwnView->removeSection(m_pMyOwnView->getSectionCount() - 1);
+ }
}
else if ( evt.PropertyName.equals( PROPERTY_COMMAND )
|| evt.PropertyName.equals( PROPERTY_COMMANDTYPE )
@@ -2286,7 +2351,9 @@ void OReportController::groupChange( const uno::Reference< report::XGroup>& _xGr
m_pMyOwnView->addSection(pMemFunSection(&aGroupHelper),sColor,nPosition);
}
else
+ {
m_pMyOwnView->removeSection(nPosition);
+ }
}
}
//------------------------------------------------------------------------------
@@ -2493,10 +2560,10 @@ IMPL_LINK( OReportController, EventLstHdl, VclWindowEvent*, _pEvent )
return 1L;
}
// -----------------------------------------------------------------------------
-void OReportController::Notify(SfxBroadcaster & /*rBc*/, SfxHint const & rHint)
+void OReportController::Notify(SfxBroadcaster & /* _rBc */, SfxHint const & _rHint)
{
- if (rHint.ISA(DlgEdHint)
- && (static_cast< DlgEdHint const & >(rHint).GetKind()
+ if (_rHint.ISA(DlgEdHint)
+ && (static_cast< DlgEdHint const & >(_rHint).GetKind()
== RPTUI_HINT_SELECTIONCHANGED))
{
const sal_Int32 nSelectionCount = m_pMyOwnView->getMarkedObjectCount();
@@ -2510,6 +2577,16 @@ void OReportController::Notify(SfxBroadcaster & /*rBc*/, SfxHint const & rHint)
::boost::bind(&view::XSelectionChangeListener::selectionChanged,_1,boost::cref(aEvent)));
}
+ // if (_rHint.ISA(SfxSimpleHint)
+ // && (static_cast< SfxSimpleHint const & >(_rHint).GetId()
+ // == SFX_HINT_COLORS_CHANGED))
+ // {
+ // int dummy = 0;
+ // }
+ // if (m_pReportControllerObserver)
+ // {
+ // m_pReportControllerObserver->Notify(_rBc, _rHint);
+ // }
}
// -----------------------------------------------------------------------------
void OReportController::executeMethodWithUndo(USHORT _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun)
@@ -2530,6 +2607,107 @@ void OReportController::alignControlsWithUndo(USHORT _nUndoStrId,sal_Int32 _nCon
InvalidateFeature( SID_UNDO );
}
// -----------------------------------------------------------------------------
+void OReportController::shrinkSectionBottom(uno::Reference<report::XSection> _xSection)
+{
+ const sal_Int32 nElements = _xSection->getCount();
+ if (nElements == 0)
+ {
+ // there are no elements
+ return;
+ }
+ const sal_Int32 nSectionHeight = _xSection->getHeight();
+ // sal_Int32 nMinPositionY = nSectionHeight;
+ sal_Int32 nMaxPositionY = 0;
+ uno::Reference< report::XReportComponent> xReportComponent;
+
+ // for every component get it's Y-position and compare it to the current Y-position
+ for (int i=0;i<nElements;i++)
+ {
+ xReportComponent.set(_xSection->getByIndex(i), uno::UNO_QUERY);
+ const sal_Int32 nReportComponentPositionY = xReportComponent->getPositionY();
+ const sal_Int32 nReportComponentHeight = xReportComponent->getHeight();
+ const sal_Int32 nReportComponentPositionYAndHeight = nReportComponentPositionY + nReportComponentHeight;
+ // nMinPositionY = std::min(nReportComponentPositionY, nMinPositionY);
+ nMaxPositionY = std::max(nReportComponentPositionYAndHeight, nMaxPositionY);
+ }
+ // now we know the minimal Y-Position and maximal Y-Position
+
+ if (nMaxPositionY > (nSectionHeight - 7) ) // Magic Number, we use a little bit less heights for right positioning
+ {
+ // the lowest position is already 0
+ return;
+ }
+ _xSection->setHeight(nMaxPositionY);
+}
+
+void OReportController::shrinkSectionTop(uno::Reference<report::XSection> _xSection)
+{
+ const sal_Int32 nElements = _xSection->getCount();
+ if (nElements == 0)
+ {
+ // there are no elements
+ return;
+ }
+
+ const sal_Int32 nSectionHeight = _xSection->getHeight();
+ sal_Int32 nMinPositionY = nSectionHeight;
+ // sal_Int32 nMaxPositionY = 0;
+ uno::Reference< report::XReportComponent> xReportComponent;
+
+ // for every component get it's Y-position and compare it to the current Y-position
+ for (int i=0;i<nElements;i++)
+ {
+ xReportComponent.set(_xSection->getByIndex(i), uno::UNO_QUERY);
+ const sal_Int32 nReportComponentPositionY = xReportComponent->getPositionY();
+ // const sal_Int32 nReportComponentHeight = xReportComponent->getHeight();
+ // const sal_Int32 nReportComponentPositionYAndHeight = nReportComponentPositionY + nReportComponentHeight;
+ nMinPositionY = std::min(nReportComponentPositionY, nMinPositionY);
+ // nMaxPositionY = std::max(nReportComponentPositionYAndHeight, nMaxPositionY);
+ }
+ // now we know the minimal Y-Position and maximal Y-Position
+ if (nMinPositionY == 0)
+ {
+ // the lowest position is already 0
+ return;
+ }
+ for (int i=0;i<nElements;i++)
+ {
+ xReportComponent.set(_xSection->getByIndex(i), uno::UNO_QUERY);
+ const sal_Int32 nReportComponentPositionY = xReportComponent->getPositionY();
+ const sal_Int32 nNewPositionY = nReportComponentPositionY - nMinPositionY;
+ xReportComponent->setPositionY(nNewPositionY);
+ }
+ const sal_Int32 nNewSectionHeight = nSectionHeight - nMinPositionY;
+ _xSection->setHeight(nNewSectionHeight);
+}
+
+void OReportController::shrinkSection(USHORT _nUndoStrId, uno::Reference<report::XSection> _xSection, sal_Int32 _nSid)
+{
+ if ( _xSection.is() )
+ {
+ const String sUndoAction = String((ModuleRes(_nUndoStrId)));
+ UndoManagerListAction aListAction(m_aUndoManager,sUndoAction);
+
+ if (_nSid == SID_SECTION_SHRINK)
+ {
+ shrinkSectionTop(_xSection);
+ shrinkSectionBottom(_xSection);
+ }
+ else if (_nSid == SID_SECTION_SHRINK_TOP)
+ {
+ shrinkSectionTop(_xSection);
+ }
+ else if (_nSid == SID_SECTION_SHRINK_BOTTOM)
+ {
+ shrinkSectionBottom(_xSection);
+ }
+ }
+
+ InvalidateFeature( SID_SAVEDOC );
+ InvalidateFeature( SID_UNDO );
+}
+
+// -----------------------------------------------------------------------------
uno::Any SAL_CALL OReportController::getViewData(void) throw( uno::RuntimeException )
{
::osl::MutexGuard aGuard( getMutex() );
@@ -2964,7 +3142,11 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
{
pNewControl = SdrObjFactory::MakeNewObject( ReportInventor, _nObjectId, pSectionWindow->getReportSection().getPage(),m_aReportModel.get() );
xShapeProp.set(pNewControl->getUnoShape(),uno::UNO_QUERY);
- pSectionWindow->getReportSection().createDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("diamond")),pNewControl); // TODO: use real custom shape type
+ ::rtl::OUString sCustomShapeType = m_pMyOwnView->GetInsertObjString();
+ if ( !sCustomShapeType.getLength() )
+ sCustomShapeType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("diamond"));
+ pSectionWindow->getReportSection().createDefault(sCustomShapeType,pNewControl);
+ pNewControl->SetLogicRect(Rectangle(3000,500,6000,3500)); // switch height and width
} // if ( _nObjectId == OBJ_CUSTOMSHAPE )
else if ( _nObjectId == OBJ_OLE2 || OBJ_DLG_SUBREPORT == _nObjectId )
{
@@ -3121,11 +3303,11 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
pSectionWindow[0] = m_pMyOwnView->getMarkedSection();
if ( !pSectionWindow[0] )
- {
- select(uno::makeAny(m_xReportDefinition->getDetail()));
- pSectionWindow[0] = m_pMyOwnView->getMarkedSection();
- if ( !pSectionWindow[0] )
- return;
+ {
+ select(uno::makeAny(m_xReportDefinition->getDetail()));
+ pSectionWindow[0] = m_pMyOwnView->getMarkedSection();
+ if ( !pSectionWindow[0] )
+ return;
}
uno::Reference<report::XSection> xCurrentSection = m_pMyOwnView->getCurrentSection();
@@ -3451,21 +3633,24 @@ void OReportController::changeZOrder(sal_Int32 _nId)
{
switch(_nId)
{
+ case SID_FRAME_TO_BOTTOM:
+ pSectionView->PutMarkedToBtm();
+ break;
case SID_FRAME_TO_TOP:
- pSectionView->MovMarkedToTop();
+ pSectionView->PutMarkedToTop();
break;
case SID_FRAME_DOWN:
+ pSectionView->MovMarkedToBtm();
break;
case SID_FRAME_UP:
+ pSectionView->MovMarkedToTop();
break;
- case SID_FRAME_TO_BOTTOM:
- pSectionView->MovMarkedToBtm();
- break;
+
case SID_OBJECT_HEAVEN:
- pSectionView->PutMarkedToTop();
+ pSectionView->SetMarkedToLayer( RPT_LAYER_FRONT );
break;
case SID_OBJECT_HELL:
- pSectionView->PutMarkedToBtm();
+ pSectionView->SetMarkedToLayer( RPT_LAYER_BACK );
break;
}
}
@@ -3497,20 +3682,36 @@ void OReportController::listen(const bool _bAdd)
(m_xReportDefinition.get()->*pPropertyListenerAction)( pIter->Name, xUndo );
}
+ // Add Listeners to UndoEnvironment
void (OXUndoEnvironment::*pElementUndoFunction)( const uno::Reference< uno::XInterface >& ) =
_bAdd ? &OXUndoEnvironment::AddElement : &OXUndoEnvironment::RemoveElement;
(rUndoEnv.*pElementUndoFunction)( m_xReportDefinition->getStyleFamilies() );
(rUndoEnv.*pElementUndoFunction)( m_xReportDefinition->getFunctions() );
+ // Add Listeners to ReportControllerObserver
+ OXReportControllerObserver& rObserver = *m_pReportControllerObserver;
+ // void (OXReportControllerObserver::*pObserverFunction)( const uno::Reference< uno::XInterface >& ) =
+ // _bAdd ? &OXReportControllerObserver::AddElement : &OXReportControllerObserver::RemoveElement;
+
+ // (rObserver.*pObserverFunction)( m_xReportDefinition->getStyleFamilies() );
+ // (rObserver.*pObserverFunction)( m_xReportDefinition->getFunctions() );
+
if ( m_xReportDefinition->getPageHeaderOn() && _bAdd )
+ {
m_pMyOwnView->addSection(m_xReportDefinition->getPageHeader(),DBPAGEHEADER);
+ rObserver.AddSection(m_xReportDefinition->getPageHeader());
+ }
if ( m_xReportDefinition->getReportHeaderOn() && _bAdd )
+ {
m_pMyOwnView->addSection(m_xReportDefinition->getReportHeader(),DBREPORTHEADER);
+ rObserver.AddSection(m_xReportDefinition->getReportHeader());
+ }
uno::Reference< report::XGroups > xGroups = m_xReportDefinition->getGroups();
const sal_Int32 nCount = xGroups->getCount();
_bAdd ? xGroups->addContainerListener(&rUndoEnv) : xGroups->removeContainerListener(&rUndoEnv);
+ _bAdd ? xGroups->addContainerListener(&rObserver) : xGroups->removeContainerListener(&rObserver);
for (sal_Int32 i=0;i<nCount ; ++i)
{
@@ -3521,34 +3722,47 @@ void OReportController::listen(const bool _bAdd)
(rUndoEnv.*pElementUndoFunction)( xGroup );
(rUndoEnv.*pElementUndoFunction)( xGroup->getFunctions() );
if ( xGroup->getHeaderOn() && _bAdd )
+ {
m_pMyOwnView->addSection(xGroup->getHeader(),DBGROUPHEADER);
+ rObserver.AddSection(xGroup->getHeader());
+ }
} // for (sal_Int32 i=0;i<nCount ; ++i)
if ( _bAdd )
{
m_pMyOwnView->addSection(m_xReportDefinition->getDetail(),DBDETAIL);
+ rObserver.AddSection(m_xReportDefinition->getDetail());
for (sal_Int32 i=nCount;i > 0 ; --i)
{
uno::Reference< report::XGroup > xGroup(xGroups->getByIndex(i-1),uno::UNO_QUERY);
if ( xGroup->getFooterOn() )
+ {
m_pMyOwnView->addSection(xGroup->getFooter(),DBGROUPFOOTER);
+ rObserver.AddSection(xGroup->getFooter());
+ }
}
if ( m_xReportDefinition->getReportFooterOn() )
+ {
m_pMyOwnView->addSection(m_xReportDefinition->getReportFooter(),DBREPORTFOOTER);
+ rObserver.AddSection(m_xReportDefinition->getReportFooter());
+ }
if ( m_xReportDefinition->getPageFooterOn())
+ {
m_pMyOwnView->addSection(m_xReportDefinition->getPageFooter(),DBPAGEFOOTER);
- }
-
-
-
- _bAdd ? xGroups->addContainerListener(static_cast<XContainerListener*>(this))
- : xGroups->removeContainerListener(static_cast<XContainerListener*>(this));
- _bAdd ? m_xReportDefinition->addModifyListener(static_cast<XModifyListener*>(this))
- : m_xReportDefinition->removeModifyListener(static_cast<XModifyListener*>(this));
+ rObserver.AddSection(m_xReportDefinition->getPageFooter());
+ }
- if ( !_bAdd )
+ xGroups->addContainerListener(static_cast<XContainerListener*>(this));
+ m_xReportDefinition->addModifyListener(static_cast<XModifyListener*>(this));
+ }
+ else /* ! _bAdd */
+ {
+ rObserver.RemoveSection(m_xReportDefinition->getDetail());
+ xGroups->removeContainerListener(static_cast<XContainerListener*>(this));
+ m_xReportDefinition->removeModifyListener(static_cast<XModifyListener*>(this));
m_aReportModel->detachController();
+ }
}
// -----------------------------------------------------------------------------
void OReportController::switchReportSection(const sal_Int16 _nId)
@@ -3744,14 +3958,17 @@ void OReportController::markSection(const bool _bNext)
void OReportController::createDefaultControl(const uno::Sequence< beans::PropertyValue>& _aArgs)
{
uno::Reference< report::XSection > xSection = m_pMyOwnView->getCurrentSection();
+ if ( !xSection.is() )
+ xSection = m_xReportDefinition->getDetail();
+
if ( xSection.is() )
{
const ::rtl::OUString sKeyModifier(RTL_CONSTASCII_USTRINGPARAM("KeyModifier"));
const beans::PropertyValue* pIter = _aArgs.getConstArray();
const beans::PropertyValue* pEnd = pIter + _aArgs.getLength();
- const beans::PropertyValue* pFind = ::std::find_if(pIter,pEnd,::std::bind2nd(PropertyValueCompare(),boost::cref(sKeyModifier)));
+ const beans::PropertyValue* pKeyModifier = ::std::find_if(pIter,pEnd,::std::bind2nd(PropertyValueCompare(),boost::cref(sKeyModifier)));
sal_Int16 nKeyModifier = 0;
- if ( pFind != pEnd && (pFind->Value >>= nKeyModifier) && nKeyModifier == KEY_MOD1 )
+ if ( pKeyModifier == pEnd || (pKeyModifier->Value >>= nKeyModifier) && nKeyModifier == KEY_MOD1 )
{
Sequence< PropertyValue > aCreateArgs;
m_pMyOwnView->unmarkAllObjects(NULL);
@@ -3970,6 +4187,21 @@ void OReportController::impl_fillCustomShapeState_nothrow(const char* _pCustomSh
_rState.bEnabled = isEditable();
_rState.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_CUSTOMSHAPE && m_pMyOwnView->GetInsertObjString().compareToAscii(_pCustomShapeType) == 0;
}
+
+// -----------------------------------------------------------------------------
+::boost::shared_ptr<OSectionWindow> OReportController::getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const
+{
+ if (m_pMyOwnView)
+ {
+ return m_pMyOwnView->getSectionWindow(_xSection);
+ }
+
+ // throw NullPointerException?
+ ::boost::shared_ptr<OSectionWindow> pEmpty;
+ return pEmpty;
+}
+
+
// -----------------------------------------------------------------------------
void OReportController::openZoomDialog()
{
diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx
new file mode 100644
index 000000000000..32332b195cb4
--- /dev/null
+++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx
@@ -0,0 +1,483 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: UndoEnv.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_reportdesign.hxx"
+
+#include <ReportControllerObserver.hxx>
+#include <ReportController.hxx>
+#include <svtools/smplhint.hxx>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+#include <com/sun/star/report/XFormattedField.hpp>
+#include <com/sun/star/awt/FontSlant.hpp>
+#include <FormattedFieldBeautifier.hxx>
+
+#include <svx/unopage.hxx>
+
+// DBG_*
+#include <tools/debug.hxx>
+// DBG_UNHANDLED_EXCEPTION
+#include <tools/diagnose_ex.h>
+
+namespace rptui
+{
+
+ using namespace ::com::sun::star;
+
+ // const OReportController *& m_pReportController;
+
+DECLARE_STL_USTRINGACCESS_MAP(bool, AllProperties);
+DECLARE_STL_STDKEY_MAP(uno::Reference< beans::XPropertySet >, AllProperties, PropertySetInfoCache);
+
+class OXReportControllerObserverImpl
+{
+ OXReportControllerObserverImpl(OXReportControllerObserverImpl&);
+ void operator =(OXReportControllerObserverImpl&);
+public:
+ const OReportController& m_rReportController;
+ ::std::vector< uno::Reference< container::XChild> > m_aSections;
+ ::osl::Mutex m_aMutex;
+ oslInterlockedCount m_nLocks;
+ sal_Bool m_bReadOnly;
+
+ OXReportControllerObserverImpl(const OReportController& _rController);
+ ~OXReportControllerObserverImpl();
+};
+
+// -----------------------------------------------------------------------------
+
+ OXReportControllerObserverImpl::OXReportControllerObserverImpl(const OReportController& _rController)
+ :m_rReportController(_rController)
+ ,m_nLocks(0)
+ ,m_bReadOnly(sal_False)
+ {
+ }
+
+ OXReportControllerObserverImpl::~OXReportControllerObserverImpl()
+ {
+ }
+
+ // -----------------------------------------------------------------------------
+ // -----------------------------------------------------------------------------
+ // -----------------------------------------------------------------------------
+
+ DBG_NAME(rpt_OXReportControllerObserver)
+
+ OXReportControllerObserver::OXReportControllerObserver(const OReportController& _rController)
+ :m_pImpl(new OXReportControllerObserverImpl(_rController) )
+ ,m_aFormattedFieldBeautifier(_rController)
+ ,m_aFixedTextColor(_rController)
+ {
+ DBG_CTOR( rpt_OXReportControllerObserver,NULL);
+
+ Application::AddEventListener(LINK( this, OXReportControllerObserver, SettingsChanged ) );
+ }
+
+ OXReportControllerObserver::~OXReportControllerObserver()
+ {
+ DBG_CTOR( rpt_OXReportControllerObserver,NULL);
+ Application::RemoveEventListener(LINK( this, OXReportControllerObserver, SettingsChanged ) );
+ }
+
+ // -----------------------------------------------------------------------------
+ IMPL_LINK(OXReportControllerObserver, SettingsChanged, VclWindowEvent*, _pEvt)
+ {
+ if ( _pEvt )
+ {
+ sal_Int32 nEvent = _pEvt->GetId();
+ /*
+ // just for debug
+ if (nEvent == VCLEVENT_WINDOW_CHILDCREATED ||
+ nEvent == VCLEVENT_WINDOW_PAINT ||
+ nEvent == VCLEVENT_WINDOW_MOVE ||
+ nEvent == VCLEVENT_WINDOW_RESIZE ||
+ nEvent == VCLEVENT_WINDOW_SHOW ||
+ nEvent == VCLEVENT_WINDOW_MOUSEMOVE ||
+ nEvent == VCLEVENT_WINDOW_FRAMETITLECHANGED ||
+ nEvent == VCLEVENT_WINDOW_HIDE ||
+ nEvent == VCLEVENT_EDIT_MODIFY ||
+ nEvent == VCLEVENT_SCROLLBAR_ENDSCROLL ||
+ nEvent == VCLEVENT_EDIT_SELECTIONCHANGED ||
+ nEvent == VCLEVENT_TABPAGE_INSERTED ||
+ nEvent == VCLEVENT_TABPAGE_REMOVED ||
+ nEvent == VCLEVENT_TOOLBOX_FORMATCHANGED ||
+ nEvent == VCLEVENT_TOOLBOX_ITEMADDED ||
+ nEvent == VCLEVENT_TOOLBOX_ALLITEMCHANGED ||
+ nEvent == VCLEVENT_MENUBARADDED ||
+ nEvent == 1
+ )
+ {
+ return 0L;
+ }
+ */
+
+ if (nEvent == VCLEVENT_APPLICATION_DATACHANGED )
+ {
+ DataChangedEvent* pData = reinterpret_cast<DataChangedEvent*>(_pEvt->GetData());
+ if ( pData && ((( pData->GetType() == DATACHANGED_SETTINGS ) ||
+ ( pData->GetType() == DATACHANGED_DISPLAY )) &&
+ ( pData->GetFlags() & SETTINGS_STYLE )))
+ {
+ OEnvLock aLock(*this);
+
+ // sal_uInt32 nCount = m_pImpl->m_aSections.size();
+
+ // send all Section Objects a 'tingle'
+ // maybe they need a change in format, color, etc
+ ::std::vector< uno::Reference< container::XChild > >::const_iterator aIter = m_pImpl->m_aSections.begin();
+ ::std::vector< uno::Reference< container::XChild > >::const_iterator aEnd = m_pImpl->m_aSections.end();
+ for (;aIter != aEnd; aIter++)
+ {
+ const uno::Reference<container::XChild> xChild (*aIter);
+ if (xChild.is())
+ {
+ uno::Reference<report::XSection> xSection(xChild, uno::UNO_QUERY);
+ if (xSection.is())
+ {
+ const sal_Int32 nCount = xSection->getCount();
+ for (sal_Int32 i = 0; i < nCount; ++i)
+ {
+ const uno::Any aObj = xSection->getByIndex(i);
+ uno::Reference < report::XReportComponent > xReportComponent(aObj, uno::UNO_QUERY);
+ if (xReportComponent.is())
+ {
+ m_aFormattedFieldBeautifier.handle(xReportComponent);
+ m_aFixedTextColor.handle(xReportComponent);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return 0L;
+ }
+
+ // -----------------------------------------------------------------------------
+ void OXReportControllerObserver::switchListening(const uno::Reference< uno::XInterface >& _rxObject, sal_Bool _bStartListening)
+ {
+ try
+ {
+ uno::Reference< beans::XPropertySet > xProps( _rxObject, uno::UNO_QUERY );
+ if ( xProps.is() )
+ {
+ if ( _bStartListening )
+ {
+ xProps->addPropertyChangeListener( ::rtl::OUString(), this );
+ }
+ else
+ {
+ xProps->removePropertyChangeListener( ::rtl::OUString(), this );
+ }
+ }
+ }
+ catch( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ // XEventListener
+ void SAL_CALL OXReportControllerObserver::disposing(const lang::EventObject& e) throw( uno::RuntimeException )
+ {
+ (void) e;
+ // check if it's an object we have cached informations about
+ uno::Reference< beans::XPropertySet > xSourceSet(e.Source, uno::UNO_QUERY);
+ if ( xSourceSet.is() )
+ {
+ uno::Reference< report::XSection> xSection(xSourceSet,uno::UNO_QUERY);
+ if ( xSection.is() )
+ RemoveSection(xSection);
+ else
+ RemoveElement(xSourceSet);
+ }
+ }
+
+ void OXReportControllerObserver::Clear()
+ {
+ OEnvLock aLock(*this);
+ // sal_uInt32 nDebugValue = m_pImpl->m_aSections.size();
+ m_pImpl->m_aSections.clear();
+ }
+
+ // XPropertyChangeListener
+ void SAL_CALL OXReportControllerObserver::propertyChange(const beans::PropertyChangeEvent& _rEvent) throw(uno::RuntimeException)
+ {
+ (void) _rEvent;
+ ::osl::ClearableMutexGuard aGuard( m_pImpl->m_aMutex );
+
+ if ( IsLocked() )
+ return;
+
+ m_aFormattedFieldBeautifier.notifyPropertyChange(_rEvent);
+ m_aFixedTextColor.notifyPropertyChange(_rEvent);
+ }
+
+// -----------------------------------------------------------------------------
+void OXReportControllerObserver::Lock()
+{
+ OSL_ENSURE(m_refCount,"Illegal call to dead object!");
+ osl_incrementInterlockedCount( &m_pImpl->m_nLocks );
+}
+void OXReportControllerObserver::UnLock()
+{
+ OSL_ENSURE(m_refCount,"Illegal call to dead object!");
+
+ osl_decrementInterlockedCount( &m_pImpl->m_nLocks );
+}
+sal_Bool OXReportControllerObserver::IsLocked() const { return m_pImpl->m_nLocks != 0; }
+
+//------------------------------------------------------------------------------
+void OXReportControllerObserver::AddSection(const uno::Reference< report::XSection > & _xSection)
+{
+ OEnvLock aLock(*this);
+ try
+ {
+ uno::Reference<container::XChild> xChild = _xSection.get();
+ m_pImpl->m_aSections.push_back(xChild);
+ uno::Reference< uno::XInterface > xInt(_xSection);
+ AddElement(xInt);
+ }
+ catch(const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//------------------------------------------------------------------------------
+void OXReportControllerObserver::RemoveSection(const uno::Reference< report::XSection > & _xSection)
+{
+ OEnvLock aLock(*this);
+ try
+ {
+ uno::Reference<container::XChild> xChild(_xSection.get());
+ m_pImpl->m_aSections.erase(::std::remove(m_pImpl->m_aSections.begin(),m_pImpl->m_aSections.end(),
+ xChild), m_pImpl->m_aSections.end());
+ uno::Reference< uno::XInterface > xInt(_xSection);
+ RemoveElement(xInt);
+ }
+ catch(uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//------------------------------------------------------------------------------
+void OXReportControllerObserver::TogglePropertyListening(const uno::Reference< uno::XInterface > & Element)
+{
+ // listen at Container
+ uno::Reference< container::XIndexAccess > xContainer(Element, uno::UNO_QUERY);
+ if (xContainer.is())
+ {
+ uno::Reference< uno::XInterface > xInterface;
+ sal_Int32 nCount = xContainer->getCount();
+ for(sal_Int32 i = 0;i != nCount;++i)
+ {
+ xInterface.set(xContainer->getByIndex( i ),uno::UNO_QUERY);
+ TogglePropertyListening(xInterface);
+ }
+ }
+
+ uno::Reference< beans::XPropertySet > xSet(Element, uno::UNO_QUERY);
+ if (xSet.is())
+ {
+ if (!m_pImpl->m_bReadOnly)
+ xSet->addPropertyChangeListener( ::rtl::OUString(), this );
+ else
+ xSet->removePropertyChangeListener( ::rtl::OUString(), this );
+ }
+}
+
+
+//------------------------------------------------------------------------------
+void OXReportControllerObserver::switchListening( const uno::Reference< container::XIndexAccess >& _rxContainer, bool _bStartListening ) SAL_THROW(())
+{
+ OSL_PRECOND( _rxContainer.is(), "OXReportControllerObserver::switchListening: invalid container!" );
+ if ( !_rxContainer.is() )
+ return;
+
+ try
+ {
+ // also handle all children of this element
+ uno::Reference< uno::XInterface > xInterface;
+ sal_Int32 nCount = _rxContainer->getCount();
+ for(sal_Int32 i = 0;i != nCount;++i)
+ {
+ xInterface.set(_rxContainer->getByIndex( i ),uno::UNO_QUERY);
+ if ( _bStartListening )
+ AddElement( xInterface );
+ else
+ RemoveElement( xInterface );
+ }
+
+ // be notified of any changes in the container elements
+ uno::Reference< container::XContainer > xSimpleContainer( _rxContainer, uno::UNO_QUERY );
+ // OSL_ENSURE( xSimpleContainer.is(), "OXReportControllerObserver::switchListening: how are we expected to be notified of changes in the container?" );
+ if ( xSimpleContainer.is() )
+ if ( _bStartListening )
+ xSimpleContainer->addContainerListener( this );
+ else
+ xSimpleContainer->removeContainerListener( this );
+ }
+ catch( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//------------------------------------------------------------------------------
+void OXReportControllerObserver::switchListening( const uno::Reference< uno::XInterface >& _rxObject, bool _bStartListening ) SAL_THROW(())
+{
+ OSL_PRECOND( _rxObject.is(), "OXReportControllerObserver::switchListening: how should I listen at a NULL object?" );
+
+ try
+ {
+ if ( !m_pImpl->m_bReadOnly )
+ {
+ uno::Reference< beans::XPropertySet > xProps( _rxObject, uno::UNO_QUERY );
+ if ( xProps.is() )
+ if ( _bStartListening )
+ xProps->addPropertyChangeListener( ::rtl::OUString(), this );
+ else
+ xProps->removePropertyChangeListener( ::rtl::OUString(), this );
+ }
+
+ uno::Reference< util::XModifyBroadcaster > xBroadcaster( _rxObject, uno::UNO_QUERY );
+ if ( xBroadcaster.is() )
+ if ( _bStartListening )
+ xBroadcaster->addModifyListener( this );
+ else
+ xBroadcaster->removeModifyListener( this );
+ }
+ catch( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL OXReportControllerObserver::modified( const lang::EventObject& /*aEvent*/ ) throw (uno::RuntimeException)
+{
+ // implSetModified();
+}
+
+//------------------------------------------------------------------------------
+void OXReportControllerObserver::AddElement(const uno::Reference< uno::XInterface >& _rxElement )
+{
+ // if ( !IsLocked() )
+ // {
+ m_aFormattedFieldBeautifier.notifyElementInserted(_rxElement);
+ m_aFixedTextColor.notifyElementInserted(_rxElement);
+ // }
+
+ // if it's a container, start listening at all elements
+ uno::Reference< container::XIndexAccess > xContainer( _rxElement, uno::UNO_QUERY );
+ if ( xContainer.is() )
+ switchListening( xContainer, true );
+
+ switchListening( _rxElement, true );
+}
+
+//------------------------------------------------------------------------------
+void OXReportControllerObserver::RemoveElement(const uno::Reference< uno::XInterface >& _rxElement)
+{
+ switchListening( _rxElement, false );
+
+ uno::Reference< container::XIndexAccess > xContainer( _rxElement, uno::UNO_QUERY );
+ if ( xContainer.is() )
+ switchListening( xContainer, false );
+}
+
+// -----------------------------------------------------------------------------
+::std::vector< uno::Reference< container::XChild> >::const_iterator OXReportControllerObserver::getSection(const uno::Reference<container::XChild>& _xContainer) const
+{
+ ::std::vector< uno::Reference< container::XChild> >::const_iterator aFind = m_pImpl->m_aSections.end();
+ if ( _xContainer.is() )
+ {
+ aFind = ::std::find(m_pImpl->m_aSections.begin(),m_pImpl->m_aSections.end(),_xContainer);
+
+ if ( aFind == m_pImpl->m_aSections.end() )
+ {
+ uno::Reference<container::XChild> xParent(_xContainer->getParent(),uno::UNO_QUERY);
+ aFind = getSection(xParent);
+ }
+ }
+ return aFind;
+}
+// XContainerListener
+//------------------------------------------------------------------------------
+void SAL_CALL OXReportControllerObserver::elementInserted(const container::ContainerEvent& evt) throw(uno::RuntimeException)
+{
+ ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
+
+ // neues Object zum lauschen
+ uno::Reference< uno::XInterface > xIface( evt.Element, uno::UNO_QUERY );
+ if ( xIface.is() )
+ {
+ AddElement(xIface);
+ }
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL OXReportControllerObserver::elementReplaced(const container::ContainerEvent& evt) throw(uno::RuntimeException)
+{
+ ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
+
+ uno::Reference< uno::XInterface > xIface(evt.ReplacedElement,uno::UNO_QUERY);
+ OSL_ENSURE(xIface.is(), "OXReportControllerObserver::elementReplaced: invalid container notification!");
+ RemoveElement(xIface);
+
+ xIface.set(evt.Element,uno::UNO_QUERY);
+ AddElement(xIface);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL OXReportControllerObserver::elementRemoved(const container::ContainerEvent& evt) throw(uno::RuntimeException)
+{
+ ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_pImpl->m_aMutex );
+
+ uno::Reference< uno::XInterface > xIface( evt.Element, uno::UNO_QUERY );
+ if ( xIface.is() )
+ {
+ RemoveElement(xIface);
+ }
+}
+
+
+} // namespace rptui
+
+
+
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index c03f1426533c..2055f1ee5358 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -420,7 +420,7 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedOb
//----------------------------------------------------------------------------
void OReportSection::MouseButtonDown( const MouseEvent& rMEvt )
{
- m_pParent->getViewsWindow()->getView()->setMarked(m_pView,sal_True);
+ m_pParent->getViewsWindow()->getView()->setMarked(m_pView,sal_True); // mark the section in which is clicked
m_pFunc->MouseButtonDown( rMEvt );
Window::MouseButtonDown(rMEvt);
}
@@ -436,6 +436,7 @@ void OReportSection::MouseButtonUp( const MouseEvent& rMEvt )
void OReportSection::MouseMove( const MouseEvent& rMEvt )
{
m_pFunc->MouseMove( rMEvt );
+
}
//----------------------------------------------------------------------------
void OReportSection::SetGridVisible(BOOL _bVisible)
diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx
index 3d04b2898669..98dd0d2390a7 100644
--- a/reportdesign/source/ui/report/ReportWindow.cxx
+++ b/reportdesign/source/ui/report/ReportWindow.cxx
@@ -306,7 +306,7 @@ void OReportWindow::unmarkAllObjects(OSectionView* _pSectionView)
//-----------------------------------------------------------------------------
void OReportWindow::showProperties(const uno::Reference< report::XSection>& _xReportComponent)
{
- ::boost::shared_ptr<OSectionWindow> pSectionWindow = m_aViewsWindow.getReportSection( _xReportComponent );
+ ::boost::shared_ptr<OSectionWindow> pSectionWindow = m_aViewsWindow.getSectionWindow( _xReportComponent );
m_pView->UpdatePropertyBrowserDelayed(pSectionWindow->getReportSection().getSectionView());
}
//------------------------------------------------------------------------------
@@ -337,6 +337,11 @@ void OReportWindow::setMarked(const uno::Sequence< uno::Reference< report::XRepo
{
return m_aViewsWindow.getMarkedSection(nsa);
}
+//-----------------------------------------------------------------------------
+::boost::shared_ptr<OSectionWindow> OReportWindow::getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const
+{
+ return m_aViewsWindow.getSectionWindow(_xSection);
+}
// -------------------------------------------------------------------------
void OReportWindow::markSection(const sal_uInt16 _nPos)
{
diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx
index 9ab957796c39..c4410ae7f079 100644
--- a/reportdesign/source/ui/report/ScrollHelper.cxx
+++ b/reportdesign/source/ui/report/ScrollHelper.cxx
@@ -311,6 +311,11 @@ void OScrollWindowHelper::setMarked(const uno::Sequence< uno::Reference< report:
return m_aReportWindow.getMarkedSection(nsa);
}
// -------------------------------------------------------------------------
+::boost::shared_ptr<OSectionWindow> OScrollWindowHelper::getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const
+{
+ return m_aReportWindow.getSectionWindow(_xSection);
+}
+// -------------------------------------------------------------------------
void OScrollWindowHelper::markSection(const sal_uInt16 _nPos)
{
m_aReportWindow.markSection(_nPos);
diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx
index 79f0e1d5f502..974c9392d893 100644
--- a/reportdesign/source/ui/report/SectionView.cxx
+++ b/reportdesign/source/ui/report/SectionView.cxx
@@ -29,21 +29,22 @@
************************************************************************/
#include "precompiled_reportdesign.hxx"
#include "SectionView.hxx"
-#ifndef RPT_DESIGNVIEW_HXX
#include "DesignView.hxx"
-#endif
#include <RptPage.hxx>
#include <RptObject.hxx>
-#ifndef _SVXIDS_HRC
+#include <RptDef.hxx>
#include <svx/svxids.hrc>
-#endif
+#include <svx/svddrgmt.hxx>
#include <vcl/scrbar.hxx>
#include "ReportSection.hxx"
#include "ReportWindow.hxx"
-
+#include "uistrings.hrc"
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
namespace rptui
{
+ using namespace ::com::sun::star;
TYPEINIT1( OSectionView, SdrView );
//----------------------------------------------------------------------------
@@ -178,7 +179,99 @@ void OSectionView::ObjectRemovedInAliveMode( const SdrObject* _pObject )
}
}
}
+
+// -----------------------------------------------------------------------------
+void OSectionView::SetMarkedToLayer( SdrLayerID _nLayerNo )
+{
+ if (AreObjectsMarked())
+ {
+ // #i11702# use SdrUndoObjectLayerChange for undo
+ // STR_UNDO_SELATTR is "Attributes" - should use a different text later
+ BegUndo( );
+
+ const SdrMarkList& rMark = GetMarkedObjectList();
+ ULONG nCount = rMark.GetMarkCount();
+ for (ULONG i=0; i<nCount; i++)
+ {
+ SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
+ if ( pObj->ISA(OCustomShape) )
+ {
+ AddUndo( new SdrUndoObjectLayerChange( *pObj, pObj->GetLayer(), _nLayerNo) );
+ pObj->SetLayer( _nLayerNo );
+ OObjectBase* pBaseObj = dynamic_cast<OObjectBase*>(pObj);
+ try
+ {
+ pBaseObj->getReportComponent()->setPropertyValue(PROPERTY_OPAQUE,uno::makeAny(_nLayerNo == RPT_LAYER_FRONT));
+ }
+ catch(const uno::Exception&)
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+ }
+
+ EndUndo();
+
+ // #84073# check mark list now instead of later in a timer
+ CheckMarked();
+ MarkListHasChanged();
+ }
+}
// -----------------------------------------------------------------------------
+bool OSectionView::OnlyShapesMarked() const
+{
+ const SdrMarkList& rMark = GetMarkedObjectList();
+ const ULONG nCount = rMark.GetMarkCount();
+ if ( !nCount )
+ return false;
+ ULONG i=0;
+ for (; i<nCount; i++)
+ {
+ SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
+ if ( !pObj->ISA(OCustomShape) )
+ {
+ break;
+ }
+ } // for (ULONG i=0; i<nCount; i++)
+ return i == nCount;
+}
+
+bool OSectionView::IsDragResize() const
+{
+ const SdrDragMethod* pDragMethod = GetDragMethod();
+ if (pDragMethod)
+ {
+ bool bMoveOnly = pDragMethod->getMoveOnly();
+ if (bMoveOnly == false)
+ {
+ // current marked components will be resized
+ return true;
+ }
+ }
+ return false;
+}
+
+// -----------------------------------------------------------------------------
+short OSectionView::GetLayerIdOfMarkedObjects() const
+{
+ short nRet = SHRT_MAX;
+ const SdrMarkList &rMrkList = GetMarkedObjectList();
+ for ( USHORT i = 0; i < rMrkList.GetMarkCount(); ++i )
+ {
+ const SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
+ if ( nRet == SHRT_MAX )
+ nRet = pObj->GetLayer();
+ else if ( nRet != pObj->GetLayer() )
+ {
+ nRet = -1;
+ break;
+ }
+ }
+ if ( nRet == SHRT_MAX )
+ nRet = -1;
+ return nRet;
+}
+
//============================================================================
} // rptui
//============================================================================
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index f51074e14d6f..42ceaaea5eba 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -28,6 +28,7 @@
*
************************************************************************/
#include "precompiled_reportdesign.hxx"
+
#include "ViewsWindow.hxx"
#include "ScrollHelper.hxx"
#include "UndoActions.hxx"
@@ -436,6 +437,26 @@ void OViewsWindow::Paste()
pMarkedSection->getReportSection().Paste(aCopies,true);
}
}
+// ---------------------------------------------------------------------------
+::boost::shared_ptr<OSectionWindow> OViewsWindow::getSectionWindow(const uno::Reference< report::XSection>& _xSection) const
+{
+ OSL_ENSURE(_xSection.is(),"Section is NULL!");
+
+ ::boost::shared_ptr<OSectionWindow> pSectionWindow;
+ TSectionsMap::const_iterator aIter = m_aSections.begin();
+ TSectionsMap::const_iterator aEnd = m_aSections.end();
+ for (; aIter != aEnd ; ++aIter)
+ {
+ if ((*aIter)->getReportSection().getSection() == _xSection)
+ {
+ pSectionWindow = (*aIter);
+ break;
+ }
+ }
+
+ return pSectionWindow;
+}
+
//----------------------------------------------------------------------------
::boost::shared_ptr<OSectionWindow> OViewsWindow::getMarkedSection(NearSectionAccess nsa) const
{
@@ -548,6 +569,7 @@ void OViewsWindow::unmarkAllObjects(OSectionView* _pSectionView)
}
}
//-----------------------------------------------------------------------------
+/*
::boost::shared_ptr<OSectionWindow> OViewsWindow::getReportSection(const uno::Reference< report::XSection >& _xSection)
{
OSL_ENSURE(_xSection.is(),"Section is NULL!");
@@ -564,6 +586,7 @@ void OViewsWindow::unmarkAllObjects(OSectionView* _pSectionView)
} // for (; aIter != aEnd ; ++aIter)
return pRet;
}
+*/
// -----------------------------------------------------------------------
void OViewsWindow::Notify(SfxBroadcaster & /*rBc*/, SfxHint const & rHint)
{
@@ -681,7 +704,7 @@ void OViewsWindow::setMarked(const uno::Sequence< uno::Reference< report::XRepor
bFirst = false;
m_pParent->setMarked(xSection,_bMark);
}
- ::boost::shared_ptr<OSectionWindow> pSectionWindow = getReportSection(xSection);
+ ::boost::shared_ptr<OSectionWindow> pSectionWindow = getSectionWindow(xSection);
if ( pSectionWindow )
{
SvxShape* pShape = SvxShape::getImplementation( *pIter );
@@ -1140,6 +1163,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi
OSL_TRACE("BegDragObj createInvisible Objects\n" );
int nViewCount = 0;
Point aNewObjPos(0,0);
+ Point aLeftTop = Point(SAL_MAX_INT32, SAL_MAX_INT32);
for (aIter = m_aSections.begin(); aIter != aEnd; ++aIter)
{
OReportSection& rReportSection = (*aIter)->getReportSection();
@@ -1157,17 +1181,21 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi
{
Rectangle aRect( pObj->GetCurrentBoundRect() );
aRect.Move(0, aNewObjPos.Y());
+
+ aLeftTop.X() = ::std::min( aRect.Left(), aLeftTop.X() );
+ aLeftTop.Y() = ::std::min( aRect.Top(), aLeftTop.Y() );
+
OSL_TRACE("BegDragObj createInvisible X:%d Y:%d on View #%d\n", aRect.Left(), aRect.Top(), nViewCount );
BegDragObj_createInvisibleObjectAtPosition(aRect, rView);
// calculate the clickpoint
- const sal_Int32 nDeltaX = abs(aRect.Left() - aAbsolutePnt.X());
- const sal_Int32 nDeltaY = abs(aRect.Top() - aAbsolutePnt.Y());
- if (m_aDragDelta.X() > nDeltaX)
- m_aDragDelta.X() = nDeltaX;
- if (m_aDragDelta.Y() > nDeltaY)
- m_aDragDelta.Y() = nDeltaY;
+// const sal_Int32 nDeltaX = abs(aRect.Left() - aAbsolutePnt.X());
+// const sal_Int32 nDeltaY = abs(aRect.Top() - aAbsolutePnt.Y());
+// if (m_aDragDelta.X() > nDeltaX)
+// m_aDragDelta.X() = nDeltaX;
+// if (m_aDragDelta.Y() > nDeltaY)
+// m_aDragDelta.Y() = nDeltaY;
}
}
}
@@ -1183,6 +1211,11 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi
// aNewObjPos.Y() -= PixelToLogic(aIter->second.second->GetSizePixel()).Height();
}
+ const sal_Int32 nDeltaX = abs(aLeftTop.X() - aAbsolutePnt.X());
+ const sal_Int32 nDeltaY = abs(aLeftTop.Y() - aAbsolutePnt.Y());
+ m_aDragDelta.X() = nDeltaX;
+ m_aDragDelta.Y() = nDeltaY;
+
Point aNewPos = aAbsolutePnt;
// for (aIter = m_aSections.begin(); aIter != aEnd; ++aIter)
// {
@@ -1294,7 +1327,8 @@ OSectionView* OViewsWindow::getSectionRelativeToPosition(const OSectionView* _pS
for (; nCount && (_rPnt.Y() < 0); --nCount)
{
OReportSection& rReportSection = (*aIter)->getReportSection();
- _rPnt.Y() += rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
+ const sal_Int32 nHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
+ _rPnt.Y() += nHeight;
if ( (nCount -1) > 0 && (_rPnt.Y() < 0) )
--aIter;
}
@@ -1341,7 +1375,9 @@ void OViewsWindow::EndDragObj(BOOL _bControlKeyPressed, const OSectionView* _pSe
Point aNewPos = _aPnt;
OSectionView* pInSection = getSectionRelativeToPosition(_pSection, aNewPos);
- if (!_bControlKeyPressed && _pSection != pInSection)
+ if (!_bControlKeyPressed &&
+ (_pSection && ( _pSection->IsDragResize() == false ) ) && /* Not in resize mode */
+ _pSection != pInSection)
{
EndDragObj_removeInvisibleObjects();
@@ -1377,25 +1413,38 @@ void OViewsWindow::EndDragObj(BOOL _bControlKeyPressed, const OSectionView* _pSe
const sal_Int32 nRightMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_RIGHTMARGIN);
const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width;
+ if ( aNewPos.X() < nLeftMargin )
+ aNewPos.X() = nLeftMargin;
+ if ( aNewPos.Y() < 0 )
+ aNewPos.Y() = 0;
+
Point aPrevious;
for (; pIter != pEnd; ++pIter)
{
- uno::Sequence< uno::Reference<util::XCloneable> > aClones;
+ uno::Sequence< uno::Reference<report::XReportComponent> > aClones;
pIter->Value >>= aClones;
- uno::Reference<util::XCloneable>* pColIter = aClones.getArray();
- const uno::Reference<util::XCloneable>* pColEnd = pColIter + aClones.getLength();
+ uno::Reference<report::XReportComponent>* pColIter = aClones.getArray();
+ const uno::Reference<report::XReportComponent>* pColEnd = pColIter + aClones.getLength();
+
+ // move the cloned Components to new positions
for (; pColIter != pColEnd; ++pColIter)
{
- uno::Reference< report::XReportComponent> xRC(*pColIter,uno::UNO_QUERY);
+ uno::Reference< report::XReportComponent> xRC(*pColIter);
aPrevious = VCLPoint(xRC->getPosition());
-
awt::Size aSize = xRC->getSize();
+
if ( aNewPos.X() < nLeftMargin )
+ {
aNewPos.X() = nLeftMargin;
+ }
else if ( (aNewPos.X() + aSize.Width) > (nPaperWidth - nRightMargin) )
+ {
aNewPos.X() = nPaperWidth - nRightMargin - aSize.Width;
+ }
if ( aNewPos.Y() < 0 )
+ {
aNewPos.Y() = 0;
+ }
if ( aNewPos.X() < 0 )
{
aSize.Width += aNewPos.X();
@@ -1405,6 +1454,7 @@ void OViewsWindow::EndDragObj(BOOL _bControlKeyPressed, const OSectionView* _pSe
xRC->setPosition(AWTPoint(aNewPos));
if ( (pColIter+1) != pColEnd )
{
+ // bring aNewPos to the position of the next object
uno::Reference< report::XReportComponent> xRCNext(*(pColIter + 1),uno::UNO_QUERY);
Point aNextPosition = VCLPoint(xRCNext->getPosition());
aNewPos += (aNextPosition - aPrevious);
@@ -1423,6 +1473,7 @@ void OViewsWindow::EndDragObj(BOOL _bControlKeyPressed, const OSectionView* _pSe
::std::for_each( m_aSections.begin(), m_aSections.end(), ApplySectionViewAction( FALSE ) );
EndDragObj_removeInvisibleObjects();
}
+ m_aDragDelta = Point(SAL_MAX_INT32, SAL_MAX_INT32);
}
// -----------------------------------------------------------------------------
void OViewsWindow::EndAction()
@@ -1444,6 +1495,7 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo
{
aHdlPos = pHdl->GetPos();
}
+
TSectionsMap::iterator aIter/* = m_aSections.begin() */;
TSectionsMap::iterator aEnd = m_aSections.end();
@@ -1493,12 +1545,70 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection,bo
SdrHdl* pCurrentHdl = rReportSection.getSectionView().GetDragHdl();
if ( pCurrentHdl )
{
- aRealMousePos = _aPnt + pCurrentHdl->GetPos() - aHdlPos;
+ if ( aRealMousePos.Y() > 0 )
+ aRealMousePos = _aPnt + pCurrentHdl->GetPos() - aHdlPos;
}
rReportSection.getSectionView().MovAction ( aRealMousePos );
const long nSectionHeight = (*aIter)->PixelToLogic((*aIter)->GetOutputSizePixel()).Height();
aRealMousePos.Y() -= nSectionHeight;
}
+
+#if 0
+#if OSL_DEBUG_LEVEL > 0
+ // TEST TEST TEST TEST
+ // Ich versuche gerade rauszubekommen, ob ich ein Object bewege oder nur resize.
+ // TEST TEST TEST TEST
+
+ for (aIter = m_aSections.begin(); aIter != aEnd; ++aIter)
+ {
+ OReportSection& rReportSection = (*aIter)->getReportSection();
+ OSectionView& rView = rReportSection.getSectionView();
+ if ( rView.AreObjectsMarked() )
+ {
+ rView.SortMarkedObjects();
+ const sal_uInt32 nCount = rView.GetMarkedObjectCount();
+ for (sal_uInt32 i=0; i < nCount; ++i)
+ {
+ const SdrMark* pM = rView.GetSdrMarkByIndex(i);
+ SdrObject* pObj = pM->GetMarkedSdrObj();
+ (void)pObj;
+
+ int dummy = 0;
+ (void)dummy;
+ }
+ }
+
+ /*
+ OReportSection& rReportSection = (*aIter)->getReportSection();
+ OSectionView& rView = rReportSection.getSectionView();
+ const SdrHdlList& rHdlList = rView.GetHdlList();
+ SdrHdl* pHdl2 = rHdlList.GetFocusHdl();
+
+ if ( pHdl2 != 0 )
+ {
+ SdrHdlKind eKind = pHdl->GetKind();
+ int dummy = 0;
+ switch(eKind)
+ {
+ case HDL_UPLFT: // Oben links
+ case HDL_UPPER: // Oben
+ case HDL_UPRGT: // Oben rechts
+ case HDL_LEFT: // Links
+ case HDL_RIGHT: // Rechts
+ case HDL_LWLFT: // Unten links
+ case HDL_LOWER: // Unten
+ case HDL_LWRGT: // Unten rechts
+ dummy = 1;
+ break;
+ default:
+ dummy = 0;
+ }
+ }
+ */
+ }
+ // TEST TEST TEST TEST
+#endif
+#endif
}
// -----------------------------------------------------------------------------
BOOL OViewsWindow::IsAction() const
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx
index dd67851d20bc..2f460f37b638 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -544,7 +544,10 @@ void DlgEdFunc::checkMovementAllowed(const MouseEvent& rMEvt)
if ( m_pParent->getSectionWindow()->getViewsWindow()->IsDragObj() )
{
if ( isRectangleHit(rMEvt) )
+ {
+ // there is an other component under use, break action
m_pParent->getSectionWindow()->getViewsWindow()->BrkAction();
+ }
// object was dragged
Point aPnt( m_pParent->PixelToLogic( rMEvt.GetPosPixel() ) );
if (m_bSelectionMode)
@@ -559,6 +562,14 @@ void DlgEdFunc::checkMovementAllowed(const MouseEvent& rMEvt)
{
aPnt.Y() = 0;
}
+ if (m_rView.IsDragResize())
+ {
+ // we resize the object don't resize to above sections
+ if ( aPnt.Y() < 0 )
+ {
+ aPnt.Y() = 0;
+ }
+ }
m_pParent->getSectionWindow()->getViewsWindow()->EndDragObj( bControlKeyPressed, &m_rView, aPnt );
}
m_pParent->getSectionWindow()->getViewsWindow()->ForceMarkedToAnotherPage();
@@ -626,7 +637,7 @@ bool DlgEdFunc::isRectangleHit(const MouseEvent& rMEvt)
::ResizeRect(aNewRect,rDragStat.GetRef1(),rDragStat.GetXFact(),rDragStat.GetYFact());
- SdrObject* pObjOverlapped = isOver(aNewRect,*m_pParent->getPage(),m_rView,false,pObjIter);
+ SdrObject* pObjOverlapped = isOver(aNewRect,*m_pParent->getPage(),m_rView,false,pObjIter, ISOVER_IGNORE_CUSTOMSHAPES);
bIsSetPoint = pObjOverlapped ? true : false;
if (pObjOverlapped && !m_bSelectionMode)
{
@@ -683,9 +694,24 @@ BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
return TRUE;
SdrViewEvent aVEvt;
+ sal_Int16 nId = m_rView.GetCurrentObjIdentifier();
+
const SdrHitKind eHit = m_rView.PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
- if( eHit != SDRHIT_UNMARKEDOBJECT )
+// eHit == SDRHIT_UNMARKEDOBJECT under the mouse cursor is a unmarked object
+
+ if (eHit == SDRHIT_UNMARKEDOBJECT &&
+ nId != OBJ_CUSTOMSHAPE)
+ {
+ // there is an object under the mouse cursor, but not a customshape
+ // rtl::OUString suWasN = m_rView.getInsertObjString();
+ // rtl::OUString suWasN2 = m_pParent->getSectionWindow()->getViewsWindow()->GetInsertObjString();
+
+ m_pParent->getSectionWindow()->getViewsWindow()->BrkAction();
+ return FALSE;
+ }
+
+ if( eHit != SDRHIT_UNMARKEDOBJECT || nId == OBJ_CUSTOMSHAPE)
{
// if no action, create object
if ( !m_pParent->getSectionWindow()->getViewsWindow()->IsAction() )
@@ -700,8 +726,10 @@ BOOL DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
else
{
if( !rMEvt.IsShift() )
+ {
+ // shift key pressed?
m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL);
-
+ }
m_pParent->getSectionWindow()->getViewsWindow()->BegMarkObj( m_aMDPos,&m_rView );
}
@@ -777,7 +805,7 @@ BOOL DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
{
if ( DlgEdFunc::MouseMove(rMEvt ) )
return TRUE;
- const Point aPos( m_pParent->PixelToLogic( rMEvt.GetPosPixel() ) );
+ Point aPos( m_pParent->PixelToLogic( rMEvt.GetPosPixel() ) );
if ( m_rView.IsCreateObj() )
{
@@ -788,6 +816,14 @@ BOOL DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
bool bIsSetPoint = false;
if ( m_rView.IsAction() )
{
+ if ( m_rView.IsDragResize() )
+ {
+ // we resize the object don't resize to above sections
+ if ( aPos.Y() < 0 )
+ {
+ aPos.Y() = 0;
+ }
+ }
bIsSetPoint = setMovementPointer(rMEvt);
ForceScroll(aPos);
m_pParent->getSectionWindow()->getViewsWindow()->MovAction(aPos,&m_rView, m_rView.GetDragMethod() == NULL, false);
@@ -893,7 +929,7 @@ BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
if ( DlgEdFunc::MouseMove(rMEvt ) )
return TRUE;
- const Point aPnt( m_pParent->PixelToLogic( rMEvt.GetPosPixel() ) );
+ Point aPnt( m_pParent->PixelToLogic( rMEvt.GetPosPixel() ) );
bool bIsSetPoint = false;
if ( m_rView.IsAction() ) // Drag Mode
@@ -902,10 +938,29 @@ BOOL DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
ForceScroll(aPnt);
if (m_rView.GetDragMethod()==NULL)
{
+ // create a selection
m_pParent->getSectionWindow()->getViewsWindow()->MovAction(aPnt, &m_rView, true, false);
}
else
{
+ if ( m_rView.IsDragResize() )
+ {
+ // we resize the object don't resize to above sections
+ if ( aPnt.Y() < 0 )
+ {
+ aPnt.Y() = 0;
+ }
+ // grow section if it is under the current section
+// else
+// {
+// const Size& aSectionSize = m_rView->GetSizePixel();
+// if ( aPnt.Y() > aSectionSize.Height() )
+// {
+// aPnt.Y() = aSectionSize.Height();
+// }
+// }
+ }
+ // drag or resize an object
bool bControlKey = rMEvt.IsMod1();
m_pParent->getSectionWindow()->getViewsWindow()->MovAction(aPnt, &m_rView, false, bControlKey);
}
diff --git a/reportdesign/source/ui/report/makefile.mk b/reportdesign/source/ui/report/makefile.mk
index cb3c8c9ad159..f1739f1b7137 100644
--- a/reportdesign/source/ui/report/makefile.mk
+++ b/reportdesign/source/ui/report/makefile.mk
@@ -48,6 +48,9 @@ IMGLST_SRS=$(SRS)$/$(TARGET).srs
SLOFILES =\
$(SLO)$/SectionWindow.obj \
$(SLO)$/ReportController.obj \
+ $(SLO)$/ReportControllerObserver.obj \
+ $(SLO)$/FormattedFieldBeautifier.obj \
+ $(SLO)$/FixedTextColor.obj \
$(SLO)$/ReportSection.obj \
$(SLO)$/SectionView.obj \
$(SLO)$/ViewsWindow.obj \
diff --git a/reportdesign/source/ui/report/report.src b/reportdesign/source/ui/report/report.src
index 884fac8842b1..628161ef61ce 100644
--- a/reportdesign/source/ui/report/report.src
+++ b/reportdesign/source/ui/report/report.src
@@ -441,6 +441,7 @@ Menu RID_MENU_REPORT
{
Separator = TRUE;
};
+
MenuItem
{
Identifier = SID_OBJECT_RESIZING ;
@@ -491,6 +492,49 @@ Menu RID_MENU_REPORT
};
};
};
+
+ MenuItem
+ {
+ Separator = TRUE;
+ };
+ MenuItem
+ {
+ Identifier = SID_SECTION_SHRINK_MENU ;
+ Command = ".uno:SectionShrinkMenu" ;
+ HelpID = SID_SECTION_SHRINK_MENU ;
+ Text [ en-US ] = "Section" ;
+ Text [ x-comment ] = " ";
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_SECTION_SHRINK ;
+ Command = ".uno:SectionShrink" ;
+ HelpID = SID_SECTION_SHRINK ;
+ Text [ en-US ] = "Shrink" ;
+ Text [ x-comment ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_SECTION_SHRINK_TOP ;
+ Command = ".uno:SectionShrinkTop" ;
+ HelpID = SID_SECTION_SHRINK_TOP ;
+ Text [ en-US ] = "Shrink from top" ;
+ Text [ x-comment ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = SID_SECTION_SHRINK_BOTTOM ;
+ Command = ".uno:SectionShrinkBottom" ;
+ HelpID = SID_SECTION_SHRINK_BOTTOM ;
+ Text [ en-US ] = "Shrink from bottom" ;
+ Text [ x-comment ] = " ";
+ };
+ };
+ };
+ };
MenuItem
{
Separator = TRUE;
@@ -629,6 +673,10 @@ String RID_ERR_NO_OBJECTS
{
Text [ en-US ] = "The report can not be executed unless at least one object has been inserted.";
};
+String RID_STR_UNDO_SHRINK
+{
+ Text [ en-US ] = "Shrink Section";
+};
String RID_STR_DETAIL
{
Text [ en-US ] = "Detail";
@@ -653,4 +701,3 @@ String RID_STR_INSERT
{
Text [ en-US ] = "Insert";
};
-
diff --git a/reportdesign/uiconfig/dbreport/menubar/menubar.xml b/reportdesign/uiconfig/dbreport/menubar/menubar.xml
index 3e678b5b2f37..a8c8d2e0d871 100644
--- a/reportdesign/uiconfig/dbreport/menubar/menubar.xml
+++ b/reportdesign/uiconfig/dbreport/menubar/menubar.xml
@@ -1,172 +1,368 @@
<?xml version="1.0" encoding="UTF-8"?>
<menu:menubar xmlns:menu="http://openoffice.org/2001/menu" menu:id="menubar">
- <menu:menu menu:id=".uno:PickList" >
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:AddDirect"/>
- <menu:menuitem menu:id=".uno:Open"/>
- <menu:menuitem menu:id=".uno:RecentFileList"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CloseDoc"/>
- <menu:menuitem menu:id=".uno:Save"/>
- <menu:menuitem menu:id=".uno:SaveAs"/>
- <menu:menuitem menu:id=".uno:SaveAll"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:ExportReportTo">
+ <menu:menu menu:id=".uno:PickList" >
<menu:menupopup>
- <menu:menuitem menu:id=".uno:TextDocument"/>
- <menu:menuitem menu:id=".uno:Spreadsheet"/>
+ <menu:menuitem menu:id=".uno:AddDirect"/>
+ <menu:menuitem menu:id=".uno:Open"/>
+ <menu:menuitem menu:id=".uno:RecentFileList"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CloseDoc"/>
+ <menu:menuitem menu:id=".uno:Save"/>
+ <menu:menuitem menu:id=".uno:SaveAs"/>
+ <menu:menuitem menu:id=".uno:SaveAll"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ExportReportTo">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TextDocument"/>
+ <menu:menuitem menu:id=".uno:Spreadsheet"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Quit"/>
</menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Quit"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:EditMenu" >
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:Undo"/>
- <menu:menuitem menu:id=".uno:Redo"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Cut"/>
- <menu:menuitem menu:id=".uno:Copy"/>
- <menu:menuitem menu:id=".uno:Paste"/>
- <menu:menu menu:id=".uno:Select">
+ </menu:menu>
+ <menu:menu menu:id=".uno:EditMenu" >
<menu:menupopup>
- <menu:menuitem menu:id=".uno:SelectAll"/>
- <menu:menuitem menu:id=".uno:SelectAllLabels"/>
- <menu:menuitem menu:id=".uno:SelectAllEdits"/>
- <menu:menuitem menu:id=".uno:SelectReport"/>
+ <menu:menuitem menu:id=".uno:Undo"/>
+ <menu:menuitem menu:id=".uno:Redo"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Cut"/>
+ <menu:menuitem menu:id=".uno:Copy"/>
+ <menu:menuitem menu:id=".uno:Paste"/>
+ <menu:menu menu:id=".uno:Select">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SelectAll"/>
+ <menu:menuitem menu:id=".uno:SelectAllLabels"/>
+ <menu:menuitem menu:id=".uno:SelectAllEdits"/>
+ <menu:menuitem menu:id=".uno:SelectReport"/>
+ <menu:menuitem menu:id=".uno:SelectObject"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Delete"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:PageHeaderFooter"/>
+ <menu:menuitem menu:id=".uno:ReportHeaderFooter"/>
+ <menu:menuitem menu:id=".uno:ColumnHeaderFooter"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ExecuteReport"/>
</menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Delete"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:PageHeaderFooter"/>
- <menu:menuitem menu:id=".uno:ReportHeaderFooter"/>
- <menu:menuitem menu:id=".uno:ColumnHeaderFooter"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ExecuteReport"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ViewMenu" >
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SwitchControlDesignMode"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ControlProperties"/>
- <menu:menuitem menu:id=".uno:AddField"/>
- <menu:menuitem menu:id=".uno:DbSortingAndGrouping"/>
- <menu:menuitem menu:id=".uno:ReportNavigator"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AvailableToolbars"/>
- <menu:menuitem menu:id=".uno:StatusBarVisible"/>
- <menu:menuitem menu:id=".uno:ShowRuler"/>
- <menu:menu menu:id=".uno:GridMenu" >
+ </menu:menu>
+
+
+ <menu:menu menu:id=".uno:ViewMenu" >
<menu:menupopup>
- <menu:menuitem menu:id=".uno:GridVisible"/>
- <menu:menuitem menu:id=".uno:GridUse"/>
+ <menu:menuitem menu:id=".uno:SwitchControlDesignMode"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ControlProperties"/>
+ <menu:menuitem menu:id=".uno:AddField"/>
+ <menu:menuitem menu:id=".uno:DbSortingAndGrouping"/>
+ <menu:menuitem menu:id=".uno:ReportNavigator"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AvailableToolbars"/>
+ <menu:menuitem menu:id=".uno:StatusBarVisible"/>
+ <menu:menuitem menu:id=".uno:ShowRuler"/>
+ <menu:menu menu:id=".uno:GridMenu" >
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:GridVisible"/>
+ <menu:menuitem menu:id=".uno:GridUse"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:SnapLinesMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:HelplinesMove"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:Zoom"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:SnapLinesMenu">
+ </menu:menu>
+ <menu:menu menu:id=".uno:InsertMenu" >
<menu:menupopup>
- <menu:menuitem menu:id=".uno:HelplinesMove"/>
+ <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
+ <menu:menuitem menu:id=".uno:InsertDateTimeField"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ReportControlMenu" >
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:Label" />
+ <menu:menuitem menu:id=".uno:Edit" />
+ <menu:menuitem menu:id=".uno:ImageControl" />
+ <menu:menuitem menu:id=".uno:InsertObjectChart" />
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HFixedLine" />
+ <menu:menuitem menu:id=".uno:VFixedLine" />
+ </menu:menupopup>
+ </menu:menu>
+
+ <menu:menu menu:id=".uno:GraphicMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertGraphic"/>
+ </menu:menupopup>
+ </menu:menu>
+
+ <menu:menu menu:id=".uno:ShapesMenu" >
+ <menu:menupopup>
+
+ <menu:menu menu:id=".uno:BasicShapesMenu" >
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:BasicShapes.rectangle"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.round-rectangle"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.quadrat"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.round-quadrat"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.circle"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.ellipse"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:BasicShapes.circle-pie"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.isosceles-triangle"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.right-triangle"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.trapezoid"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.diamond"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.parallelogram"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:BasicShapes.pentagon"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.hexagon"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.octagon"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.cross"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.ring"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.block-arc"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:BasicShapes.can"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.cube"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.paper"/>
+ <menu:menuitem menu:id=".uno:BasicShapes.frame"/>
+ </menu:menupopup>
+ </menu:menu>
+
+ <menu:menu menu:id=".uno:SymbolShapesMenu" >
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SymbolShapes.smiley"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.sun"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.moon"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.lightning"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.heart"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.flower"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.cloud"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.forbidden"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.puzzle"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.bracket-pair"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.left-bracket"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.right-bracket"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.brace-pair"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.left-brace"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.right-brace"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.quad-bevel"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.octagon-bevel"/>
+ <menu:menuitem menu:id=".uno:SymbolShapes.diamond-bevel"/>
+ </menu:menupopup>
+ </menu:menu>
+
+ <menu:menu menu:id=".uno:ArrowShapesMenu" >
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ArrowShapes.left-arrow"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.right-arrow"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.up-arrow"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.down-arrow"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.left-right-arrow"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.up-down-arrow"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.up-right-arrow"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.up-right-down-arrow"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.quad-arrow"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.corner-right-arrow"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.split-arrow"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.striped-right-arrow"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.notched-right-arrow"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.pentagon-right"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.chevron"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.right-arrow-callout"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.left-arrow-callout"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.up-arrow-callout"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.down-arrow-callout"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.left-right-arrow-callout"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.up-down-arrow-callout"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.up-right-arrow-callout"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.quad-arrow-callout"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.circular-arrow"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.split-round-arrow"/>
+ <menu:menuitem menu:id=".uno:ArrowShapes.s-sharped-arrow"/>
+ </menu:menupopup>
+ </menu:menu>
+
+ <menu:menu menu:id=".uno:FlowChartShapesMenu" >
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-process"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-alternate-process"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-decision"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-data"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-predefined-process"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-internal-storage"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-document"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-multidocument"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-terminator"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-preparation"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-manual-input"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-manual-operation"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-connector"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-off-page-connector"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-card"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-punched-tape"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-summing-junction"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-or"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-collate"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-sort"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-extract"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-merge"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-stored-data"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-delay"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-sequential-access"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-magnetic-disk"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-direct-access-storage"/>
+ <menu:menuitem menu:id=".uno:FlowChartShapes.flowchart-display"/>
+ </menu:menupopup>
+ </menu:menu>
+
+ <menu:menu menu:id=".uno:CalloutShapesMenu" >
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:CalloutShapes.rectangular-callout" />
+ <menu:menuitem menu:id=".uno:CalloutShapes.round-rectangular-callout" />
+ <menu:menuitem menu:id=".uno:CalloutShapes.round-callout" />
+ <menu:menuitem menu:id=".uno:CalloutShapes.cloud-callout" />
+ <menu:menuitem menu:id=".uno:CalloutShapes.line-callout-1" />
+ <menu:menuitem menu:id=".uno:CalloutShapes.line-callout-2" />
+ <menu:menuitem menu:id=".uno:CalloutShapes.line-callout-3" />
+ </menu:menupopup>
+ </menu:menu>
+
+ <menu:menu menu:id=".uno:StarShapesMenu" >
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:StarShapes.bang"/>
+ <menu:menuitem menu:id=".uno:StarShapes.star4"/>
+ <menu:menuitem menu:id=".uno:StarShapes.star5"/>
+ <menu:menuitem menu:id=".uno:StarShapes.star6"/>
+ <menu:menuitem menu:id=".uno:StarShapes.star8"/>
+ <menu:menuitem menu:id=".uno:StarShapes.star12"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:StarShapes.star24"/>
+ <menu:menuitem menu:id=".uno:StarShapes.concave-star6"/>
+ <menu:menuitem menu:id=".uno:StarShapes.vertical-scroll"/>
+ <menu:menuitem menu:id=".uno:StarShapes.horizontal-scroll"/>
+ <menu:menuitem menu:id=".uno:StarShapes.signet"/>
+ <menu:menuitem menu:id=".uno:StarShapes.doorplate"/>
+ </menu:menupopup>
+ </menu:menu>
+
+ </menu:menupopup>
+ </menu:menu>
+
</menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:Zoom"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:InsertMenu" >
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertPageNumberField"/>
- <menu:menuitem menu:id=".uno:InsertDateTimeField"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:GraphicMenu">
+ </menu:menu>
+ <menu:menu menu:id=".uno:FormatMenu" >
<menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertGraphic"/>
+ <menu:menuitem menu:id=".uno:ConditionalFormatting"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FontDialog"/>
+ <menu:menuitem menu:id=".uno:PageDialog"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ArrangeMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:BringToFront"/>
+ <menu:menuitem menu:id=".uno:ObjectBackOne"/>
+ <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
+ <menu:menuitem menu:id=".uno:SendToBack"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
+ <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ObjectAlign" >
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ObjectAlignLeft"/>
+ <menu:menuitem menu:id=".uno:AlignCenter"/>
+ <menu:menuitem menu:id=".uno:ObjectAlignRight"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AlignUp"/>
+ <menu:menuitem menu:id=".uno:AlignMiddle"/>
+ <menu:menuitem menu:id=".uno:AlignDown"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ObjectResize" >
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SmallestWidth"/>
+ <menu:menuitem menu:id=".uno:GreatestWidth"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SmallestHeight"/>
+ <menu:menuitem menu:id=".uno:GreatestHeight"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:SectionAlignmentMenu" >
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SectionAlignLeft"/>
+ <menu:menuitem menu:id=".uno:SectionAlignRight"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SectionAlignTop"/>
+ <menu:menuitem menu:id=".uno:SectionAlignBottom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:SectionShrinkMenu" >
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SectionShrink"/>
+ <menu:menuitem menu:id=".uno:SectionShrinkTop"/>
+ <menu:menuitem menu:id=".uno:SectionShrinkBottom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Distribution"/>
</menu:menupopup>
- </menu:menu>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FormatMenu" >
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ConditionalFormatting"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FontDialog"/>
- <menu:menuitem menu:id=".uno:PageDialog"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:ArrangeMenu">
+ </menu:menu>
+ <menu:menu menu:id=".uno:ToolsMenu" >
<menu:menupopup>
- <menu:menuitem menu:id=".uno:BringToFront"/>
- <menu:menuitem menu:id=".uno:ObjectBackOne"/>
- <menu:menuitem menu:id=".uno:ObjectForwardOne"/>
- <menu:menuitem menu:id=".uno:SendToBack"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetObjectToForeground"/>
- <menu:menuitem menu:id=".uno:SetObjectToBackground"/>
+ <menu:menu menu:id=".uno:MacrosMenu" >
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:MacroRecorder"/>
+ <menu:menuitem menu:id=".uno:RunMacro"/>
+ <menu:menu menu:id=".uno:ScriptOrganizer"/>
+ <menu:menuitem menu:id=".uno:MacroSignature"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
+ <menu:menuitem menu:id=".uno:ConfigureDialog"/>
+ <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ObjectAlign" >
+ </menu:menu>
+ <menu:menu menu:id=".uno:WindowList" >
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ObjectAlignLeft"/>
- <menu:menuitem menu:id=".uno:AlignCenter"/>
- <menu:menuitem menu:id=".uno:ObjectAlignRight"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AlignUp"/>
- <menu:menuitem menu:id=".uno:AlignMiddle"/>
- <menu:menuitem menu:id=".uno:AlignDown"/>
+ <menu:menuitem menu:id=".uno:NewWindow"/>
+ <menu:menuitem menu:id=".uno:CloseWin"/>
+ <menu:menuseparator/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ObjectResize" >
+ </menu:menu>
+ <menu:menu menu:id=".uno:HelpMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:SmallestWidth"/>
- <menu:menuitem menu:id=".uno:GreatestWidth"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SmallestHeight"/>
- <menu:menuitem menu:id=".uno:GreatestHeight"/>
+ <menu:menuitem menu:id=".uno:HelpIndex"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ExtendedHelp"/>
+ <menu:menuitem menu:id=".uno:HelpTip"/>
+ <menu:menuitem menu:id=".uno:ActiveHelp"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HelperDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HelpSupport"/>
+ <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Distribution"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ToolsMenu" >
- <menu:menupopup>
- <menu:menu menu:id=".uno:MacrosMenu" >
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:MacroRecorder"/>
- <menu:menuitem menu:id=".uno:RunMacro"/>
- <menu:menu menu:id=".uno:ScriptOrganizer"/>
- <menu:menuitem menu:id=".uno:MacroSignature"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
- <menu:menuitem menu:id=".uno:ConfigureDialog"/>
- <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WindowList" >
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:NewWindow"/>
- <menu:menuitem menu:id=".uno:CloseWin"/>
- <menu:menuseparator/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:HelpMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:HelpIndex"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ExtendedHelp"/>
- <menu:menuitem menu:id=".uno:HelpTip"/>
- <menu:menuitem menu:id=".uno:ActiveHelp"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelperDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:About"/>
- </menu:menupopup>
- </menu:menu>
+ </menu:menu>
</menu:menubar>
diff --git a/reportdesign/uiconfig/dbreport/toolbar/Formatting.xml b/reportdesign/uiconfig/dbreport/toolbar/Formatting.xml
index 33b874d89102..c4fe386324a7 100644
--- a/reportdesign/uiconfig/dbreport/toolbar/Formatting.xml
+++ b/reportdesign/uiconfig/dbreport/toolbar/Formatting.xml
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink">
- <toolbar:toolbaritem xlink:href=".uno:SelectObject" toolbar:helpid="helpid:5552" toolbar:visible="false" />
+ <toolbar:toolbaritem xlink:href=".uno:SelectObject" toolbar:visible="false" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:CharFontName" toolbar:helpid="helpid:10007"/>
+ <toolbar:toolbaritem xlink:href=".uno:CharFontName" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontHeight" toolbar:helpid="helpid:10015"/>
+ <toolbar:toolbaritem xlink:href=".uno:FontHeight" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:Bold" toolbar:helpid="helpid:10009"/>
- <toolbar:toolbaritem xlink:href=".uno:Italic" toolbar:helpid="helpid:10008"/>
- <toolbar:toolbaritem xlink:href=".uno:Underline" toolbar:helpid="helpid:10014"/>
+ <toolbar:toolbaritem xlink:href=".uno:Bold" />
+ <toolbar:toolbaritem xlink:href=".uno:Italic" />
+ <toolbar:toolbaritem xlink:href=".uno:Underline" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:LeftPara" toolbar:helpid="helpid:10028" toolbar:style="radio" />
- <toolbar:toolbaritem xlink:href=".uno:CenterPara" toolbar:helpid="helpid:10030" toolbar:style="radio" />
- <toolbar:toolbaritem xlink:href=".uno:RightPara" toolbar:helpid="helpid:10029" toolbar:style="radio" />
+ <toolbar:toolbaritem xlink:href=".uno:LeftPara" toolbar:style="radio" />
+ <toolbar:toolbaritem xlink:href=".uno:CenterPara" toolbar:style="radio" />
+ <toolbar:toolbaritem xlink:href=".uno:RightPara" toolbar:style="radio" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontColor" toolbar:helpid="helpid:10017" toolbar:style="dropdown" />
- <toolbar:toolbaritem xlink:href=".uno:BackgroundColor" toolbar:helpid="helpid:10185" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontColor" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:BackgroundColor" toolbar:style="dropdown" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontDialog" toolbar:helpid="helpid:10296" toolbar:visible="false" />
+ <toolbar:toolbaritem xlink:href=".uno:FontDialog" toolbar:visible="false" />
</toolbar:toolbar>
diff --git a/reportdesign/uiconfig/dbreport/toolbar/alignmentbar.xml b/reportdesign/uiconfig/dbreport/toolbar/alignmentbar.xml
index dbd7294e566c..1c4a05228a07 100644
--- a/reportdesign/uiconfig/dbreport/toolbar/alignmentbar.xml
+++ b/reportdesign/uiconfig/dbreport/toolbar/alignmentbar.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:ObjectAlignLeft" toolbar:helpid="helpid:10131" />
- <toolbar:toolbaritem xlink:href=".uno:AlignCenter" toolbar:helpid="helpid:10132" />
- <toolbar:toolbaritem xlink:href=".uno:ObjectAlignRight" toolbar:helpid="helpid:10133" />
+ <toolbar:toolbaritem xlink:href=".uno:ObjectAlignLeft"/>
+ <toolbar:toolbaritem xlink:href=".uno:AlignCenter"/>
+ <toolbar:toolbaritem xlink:href=".uno:ObjectAlignRight"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:AlignUp" toolbar:helpid="helpid:10134" />
- <toolbar:toolbaritem xlink:href=".uno:AlignMiddle" toolbar:helpid="helpid:10135" />
- <toolbar:toolbaritem xlink:href=".uno:AlignDown" toolbar:helpid="helpid:10136" />
+ <toolbar:toolbaritem xlink:href=".uno:AlignUp"/>
+ <toolbar:toolbaritem xlink:href=".uno:AlignMiddle"/>
+ <toolbar:toolbaritem xlink:href=".uno:AlignDown"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/reportdesign/uiconfig/dbreport/toolbar/arrowshapes.xml b/reportdesign/uiconfig/dbreport/toolbar/arrowshapes.xml
index 4a53519494ea..62f2e5e2d534 100644
--- a/reportdesign/uiconfig/dbreport/toolbar/arrowshapes.xml
+++ b/reportdesign/uiconfig/dbreport/toolbar/arrowshapes.xml
@@ -1,34 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.left-arrow" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.right-arrow" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-arrow" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.down-arrow" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.left-right-arrow" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-down-arrow" toolbar:helpid="helpid:11004" />
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.left-arrow"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.right-arrow"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-arrow"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.down-arrow"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.left-right-arrow"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-down-arrow"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-right-arrow" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-right-down-arrow" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.quad-arrow" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.corner-right-arrow" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.split-arrow" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.striped-right-arrow" toolbar:helpid="helpid:11004" />
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-right-arrow"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-right-down-arrow"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.quad-arrow"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.corner-right-arrow"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.split-arrow"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.striped-right-arrow"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.notched-right-arrow" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.pentagon-right" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.chevron" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.right-arrow-callout" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.left-arrow-callout" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-arrow-callout" toolbar:helpid="helpid:11004" />
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.notched-right-arrow"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.pentagon-right"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.chevron"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.right-arrow-callout"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.left-arrow-callout"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-arrow-callout"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.down-arrow-callout" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.left-right-arrow-callout" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-down-arrow-callout" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-right-arrow-callout" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.quad-arrow-callout" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.circular-arrow" toolbar:helpid="helpid:11004" />
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.down-arrow-callout"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.left-right-arrow-callout"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-down-arrow-callout"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.up-right-arrow-callout"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.quad-arrow-callout"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.circular-arrow"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.split-round-arrow" toolbar:helpid="helpid:11004" />
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.s-sharped-arrow" toolbar:helpid="helpid:11004" />
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.split-round-arrow"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes.s-sharped-arrow"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/reportdesign/uiconfig/dbreport/toolbar/basicshapes.xml b/reportdesign/uiconfig/dbreport/toolbar/basicshapes.xml
index e65778305788..e26df54f29ab 100644
--- a/reportdesign/uiconfig/dbreport/toolbar/basicshapes.xml
+++ b/reportdesign/uiconfig/dbreport/toolbar/basicshapes.xml
@@ -1,29 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.rectangle" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.round-rectangle" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.quadrat" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.round-quadrat" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.circle" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.ellipse" toolbar:helpid="helpid:11002" />
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.rectangle"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.round-rectangle"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.quadrat"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.round-quadrat"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.circle"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.ellipse"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.circle-pie" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.isosceles-triangle" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.right-triangle" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.trapezoid" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.diamond" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.parallelogram" toolbar:helpid="helpid:11002" />
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.circle-pie"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.isosceles-triangle"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.right-triangle"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.trapezoid"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.diamond"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.parallelogram"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.pentagon" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.hexagon" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.octagon" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.cross" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.ring" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.block-arc" toolbar:helpid="helpid:11002" />
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.pentagon"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.hexagon"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.octagon"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.cross"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.ring"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.block-arc"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.can" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.cube" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.paper" toolbar:helpid="helpid:11002" />
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes.frame" toolbar:helpid="helpid:11002" />
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.can"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.cube"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.paper"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes.frame"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/reportdesign/uiconfig/dbreport/toolbar/calloutshapes.xml b/reportdesign/uiconfig/dbreport/toolbar/calloutshapes.xml
index 91b957fa697a..5a37c8de0301 100644
--- a/reportdesign/uiconfig/dbreport/toolbar/calloutshapes.xml
+++ b/reportdesign/uiconfig/dbreport/toolbar/calloutshapes.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.rectangular-callout" toolbar:helpid="helpid:11006" />
- <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.round-rectangular-callout" toolbar:helpid="helpid:11006" />
- <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.round-callout" toolbar:helpid="helpid:11006" />
- <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.cloud-callout" toolbar:helpid="helpid:11006" />
- <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.line-callout-1" toolbar:helpid="helpid:11006" />
- <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.line-callout-2" toolbar:helpid="helpid:11006" />
- <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.line-callout-3" toolbar:helpid="helpid:11006" />
+ <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.rectangular-callout" />
+ <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.round-rectangular-callout" />
+ <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.round-callout" />
+ <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.cloud-callout" />
+ <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.line-callout-1" />
+ <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.line-callout-2" />
+ <toolbar:toolbaritem xlink:href=".uno:CalloutShapes.line-callout-3" />
</toolbar:toolbar> \ No newline at end of file
diff --git a/reportdesign/uiconfig/dbreport/toolbar/drawbar.xml b/reportdesign/uiconfig/dbreport/toolbar/drawbar.xml
index 1edc55cc42ab..07778059053a 100644
--- a/reportdesign/uiconfig/dbreport/toolbar/drawbar.xml
+++ b/reportdesign/uiconfig/dbreport/toolbar/drawbar.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:BasicShapes" toolbar:helpid="11002" toolbar:style="dropdown"/>
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes" toolbar:helpid="11003" toolbar:style="dropdown"/>
- <toolbar:toolbaritem xlink:href=".uno:ArrowShapes" toolbar:helpid="11004" toolbar:style="dropdown"/>
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes" toolbar:helpid="11005" toolbar:style="dropdown"/>
- <toolbar:toolbaritem xlink:href=".uno:CalloutShapes" toolbar:helpid="11006" toolbar:style="dropdown"/>
- <toolbar:toolbaritem xlink:href=".uno:StarShapes" toolbar:helpid="11007" toolbar:style="dropdown"/>
+ <toolbar:toolbaritem xlink:href=".uno:BasicShapes" toolbar:style="dropdown"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes" toolbar:style="dropdown"/>
+ <toolbar:toolbaritem xlink:href=".uno:ArrowShapes" toolbar:style="dropdown"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes" toolbar:style="dropdown"/>
+ <toolbar:toolbaritem xlink:href=".uno:CalloutShapes" toolbar:style="dropdown"/>
+ <toolbar:toolbaritem xlink:href=".uno:StarShapes" toolbar:style="dropdown"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/reportdesign/uiconfig/dbreport/toolbar/flowchartshapes.xml b/reportdesign/uiconfig/dbreport/toolbar/flowchartshapes.xml
index bb1d1099dbd4..d3e649930942 100644
--- a/reportdesign/uiconfig/dbreport/toolbar/flowchartshapes.xml
+++ b/reportdesign/uiconfig/dbreport/toolbar/flowchartshapes.xml
@@ -1,36 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-process" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-alternate-process" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-decision" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-data" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-predefined-process" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-internal-storage" toolbar:helpid="helpid:11005" />
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-process"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-alternate-process"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-decision"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-data"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-predefined-process"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-internal-storage"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-document" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-multidocument" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-terminator" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-preparation" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-manual-input" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-manual-operation" toolbar:helpid="helpid:11005" />
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-document"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-multidocument"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-terminator"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-preparation"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-manual-input"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-manual-operation"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-connector" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-off-page-connector" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-card" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-punched-tape" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-summing-junction" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-or" toolbar:helpid="helpid:11005" />
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-connector"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-off-page-connector"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-card"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-punched-tape"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-summing-junction"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-or"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-collate" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-sort" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-extract" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-merge" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-stored-data" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-delay" toolbar:helpid="helpid:11005" />
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-collate"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-sort"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-extract"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-merge"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-stored-data"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-delay"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-sequential-access" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-magnetic-disk" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-direct-access-storage" toolbar:helpid="helpid:11005" />
- <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-display" toolbar:helpid="helpid:11005" />
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-sequential-access"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-magnetic-disk"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-direct-access-storage"/>
+ <toolbar:toolbaritem xlink:href=".uno:FlowChartShapes.flowchart-display"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/reportdesign/uiconfig/dbreport/toolbar/reportcontrols.xml b/reportdesign/uiconfig/dbreport/toolbar/reportcontrols.xml
index 1facc217b19b..ac460a3ba77c 100644
--- a/reportdesign/uiconfig/dbreport/toolbar/reportcontrols.xml
+++ b/reportdesign/uiconfig/dbreport/toolbar/reportcontrols.xml
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:SelectObject" toolbar:helpid="helpid:10128" toolbar:style="radio auto" />
+ <toolbar:toolbaritem xlink:href=".uno:SelectObject" toolbar:style="radio auto" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ControlProperties" toolbar:helpid="helpid:10613" />
+ <toolbar:toolbaritem xlink:href=".uno:ControlProperties"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:Label" toolbar:helpid="helpid:10597" toolbar:style="radio auto" />
- <toolbar:toolbaritem xlink:href=".uno:Edit" toolbar:helpid="helpid:10599" toolbar:style="radio auto" />
+ <toolbar:toolbaritem xlink:href=".uno:Label" toolbar:style="radio auto" />
+ <toolbar:toolbaritem xlink:href=".uno:Edit" toolbar:style="radio auto" />
<toolbar:toolbaritem xlink:href=".uno:ImageControl" toolbar:style="radio auto" />
<toolbar:toolbaritem xlink:href=".uno:InsertObjectChart" toolbar:style="radio auto" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:HFixedLine" toolbar:helpid="helpid:10928" toolbar:style="radio" />
- <toolbar:toolbaritem xlink:href=".uno:VFixedLine" toolbar:helpid="helpid:10929" toolbar:style="radio" />
+ <toolbar:toolbaritem xlink:href=".uno:HFixedLine" toolbar:style="radio" />
+ <toolbar:toolbaritem xlink:href=".uno:VFixedLine" toolbar:style="radio" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:GridVisible" toolbar:helpid="helpid:27322" toolbar:style="radio auto" toolbar:visible="false"/>
- <toolbar:toolbaritem xlink:href=".uno:GridUse" toolbar:helpid="helpid:27154" toolbar:visible="false"/>
- <toolbar:toolbaritem xlink:href=".uno:HelplinesMove" toolbar:helpid="helpid:27153" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:GridVisible" toolbar:style="radio auto" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:GridUse" toolbar:visible="false"/>
+ <toolbar:toolbaritem xlink:href=".uno:HelplinesMove" toolbar:visible="false"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/reportdesign/uiconfig/dbreport/toolbar/sectionalignmentbar.xml b/reportdesign/uiconfig/dbreport/toolbar/sectionalignmentbar.xml
index 7f21778b9d46..fc21516735a5 100644
--- a/reportdesign/uiconfig/dbreport/toolbar/sectionalignmentbar.xml
+++ b/reportdesign/uiconfig/dbreport/toolbar/sectionalignmentbar.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:SectionAlignLeft" toolbar:helpid="helpid:10131" />
- <toolbar:toolbaritem xlink:href=".uno:SectionAlignRight" toolbar:helpid="helpid:10133" />
+ <toolbar:toolbaritem xlink:href=".uno:SectionAlignLeft"/>
+ <toolbar:toolbaritem xlink:href=".uno:SectionAlignRight"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:SectionAlignTop" toolbar:helpid="helpid:10134" />
- <toolbar:toolbaritem xlink:href=".uno:SectionAlignBottom" toolbar:helpid="helpid:10136" />
-</toolbar:toolbar> \ No newline at end of file
+ <toolbar:toolbaritem xlink:href=".uno:SectionAlignTop"/>
+ <toolbar:toolbaritem xlink:href=".uno:SectionAlignBottom"/>
+</toolbar:toolbar>
diff --git a/reportdesign/uiconfig/dbreport/toolbar/sectionshrinkbar.xml b/reportdesign/uiconfig/dbreport/toolbar/sectionshrinkbar.xml
new file mode 100755
index 000000000000..0064ce8501b3
--- /dev/null
+++ b/reportdesign/uiconfig/dbreport/toolbar/sectionshrinkbar.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:SectionShrink"/>
+ <toolbar:toolbaritem xlink:href=".uno:SectionShrinkTop"/>
+ <toolbar:toolbaritem xlink:href=".uno:SectionShrinkBottom"/>
+</toolbar:toolbar>
diff --git a/reportdesign/uiconfig/dbreport/toolbar/starshapes.xml b/reportdesign/uiconfig/dbreport/toolbar/starshapes.xml
index a2ff874d2fe7..820e9c07434d 100644
--- a/reportdesign/uiconfig/dbreport/toolbar/starshapes.xml
+++ b/reportdesign/uiconfig/dbreport/toolbar/starshapes.xml
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:StarShapes.bang" toolbar:helpid="helpid:11007" />
- <toolbar:toolbaritem xlink:href=".uno:StarShapes.star4" toolbar:helpid="helpid:11007" />
- <toolbar:toolbaritem xlink:href=".uno:StarShapes.star5" toolbar:helpid="helpid:11007" />
- <toolbar:toolbaritem xlink:href=".uno:StarShapes.star6" toolbar:helpid="helpid:11007" />
- <toolbar:toolbaritem xlink:href=".uno:StarShapes.star8" toolbar:helpid="helpid:11007" />
- <toolbar:toolbaritem xlink:href=".uno:StarShapes.star12" toolbar:helpid="helpid:11007" />
+ <toolbar:toolbaritem xlink:href=".uno:StarShapes.bang"/>
+ <toolbar:toolbaritem xlink:href=".uno:StarShapes.star4"/>
+ <toolbar:toolbaritem xlink:href=".uno:StarShapes.star5"/>
+ <toolbar:toolbaritem xlink:href=".uno:StarShapes.star6"/>
+ <toolbar:toolbaritem xlink:href=".uno:StarShapes.star8"/>
+ <toolbar:toolbaritem xlink:href=".uno:StarShapes.star12"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:StarShapes.star24" toolbar:helpid="helpid:11007" />
- <toolbar:toolbaritem xlink:href=".uno:StarShapes.concave-star6" toolbar:helpid="helpid:11007" />
- <toolbar:toolbaritem xlink:href=".uno:StarShapes.vertical-scroll" toolbar:helpid="helpid:11007" />
- <toolbar:toolbaritem xlink:href=".uno:StarShapes.horizontal-scroll" toolbar:helpid="helpid:11007" />
- <toolbar:toolbaritem xlink:href=".uno:StarShapes.signet" toolbar:helpid="helpid:11007" />
- <toolbar:toolbaritem xlink:href=".uno:StarShapes.doorplate" toolbar:helpid="helpid:11007" />
+ <toolbar:toolbaritem xlink:href=".uno:StarShapes.star24"/>
+ <toolbar:toolbaritem xlink:href=".uno:StarShapes.concave-star6"/>
+ <toolbar:toolbaritem xlink:href=".uno:StarShapes.vertical-scroll"/>
+ <toolbar:toolbaritem xlink:href=".uno:StarShapes.horizontal-scroll"/>
+ <toolbar:toolbaritem xlink:href=".uno:StarShapes.signet"/>
+ <toolbar:toolbaritem xlink:href=".uno:StarShapes.doorplate"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/reportdesign/uiconfig/dbreport/toolbar/symbolshapes.xml b/reportdesign/uiconfig/dbreport/toolbar/symbolshapes.xml
index 0fa6aee313db..4269c1d42e08 100644
--- a/reportdesign/uiconfig/dbreport/toolbar/symbolshapes.xml
+++ b/reportdesign/uiconfig/dbreport/toolbar/symbolshapes.xml
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.smiley" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.sun" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.moon" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.lightning" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.heart" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.flower" toolbar:helpid="helpid:11003" />
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.smiley"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.sun"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.moon"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.lightning"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.heart"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.flower"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.cloud" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.forbidden" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.puzzle" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.bracket-pair" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.left-bracket" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.right-bracket" toolbar:helpid="helpid:11003" />
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.cloud"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.forbidden"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.puzzle"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.bracket-pair"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.left-bracket"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.right-bracket"/>
<toolbar:toolbarbreak/>
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.brace-pair" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.left-brace" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.right-brace" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.quad-bevel" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.octagon-bevel" toolbar:helpid="helpid:11003" />
- <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.diamond-bevel" toolbar:helpid="helpid:11003" />
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.brace-pair"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.left-brace"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.right-brace"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.quad-bevel"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.octagon-bevel"/>
+ <toolbar:toolbaritem xlink:href=".uno:SymbolShapes.diamond-bevel"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/reportdesign/uiconfig/dbreport/toolbar/toolbar.xml b/reportdesign/uiconfig/dbreport/toolbar/toolbar.xml
index 3894b36fd980..55d77cb75f97 100644
--- a/reportdesign/uiconfig/dbreport/toolbar/toolbar.xml
+++ b/reportdesign/uiconfig/dbreport/toolbar/toolbar.xml
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink">
- <toolbar:toolbaritem xlink:href=".uno:Save" toolbar:helpid="5505"/>
+ <toolbar:toolbaritem xlink:href=".uno:Save" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:EditDoc" toolbar:helpid="6312"/>
+ <toolbar:toolbaritem xlink:href=".uno:EditDoc" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:Cut" toolbar:helpid="5710"/>
- <toolbar:toolbaritem xlink:href=".uno:Copy" toolbar:helpid="5711"/>
- <toolbar:toolbaritem xlink:href=".uno:Paste" toolbar:helpid="helpid:5712" toolbar:text="" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:Cut" />
+ <toolbar:toolbaritem xlink:href=".uno:Copy" />
+ <toolbar:toolbaritem xlink:href=".uno:Paste" toolbar:text="" toolbar:style="dropdown" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:Undo" toolbar:helpid="5701"/>
- <toolbar:toolbaritem xlink:href=".uno:Redo" toolbar:helpid="5700"/>
+ <toolbar:toolbaritem xlink:href=".uno:Undo" />
+ <toolbar:toolbaritem xlink:href=".uno:Redo" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:AddField" toolbar:helpid="helpid:10623" toolbar:style="radio auto" />
- <toolbar:toolbaritem xlink:href=".uno:ReportNavigator" toolbar:helpid="helpid:12593" toolbar:style="radio auto" />
- <toolbar:toolbaritem xlink:href=".uno:DbSortingAndGrouping" toolbar:helpid="helpid:12454" />
- <toolbar:toolbaritem xlink:href=".uno:ExecuteReport" toolbar:helpid="helpid:12471" />
+ <toolbar:toolbaritem xlink:href=".uno:AddField" toolbar:style="radio auto" />
+ <toolbar:toolbaritem xlink:href=".uno:ReportNavigator" toolbar:style="radio auto" />
+ <toolbar:toolbaritem xlink:href=".uno:DbSortingAndGrouping" />
+ <toolbar:toolbaritem xlink:href=".uno:ExecuteReport" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:HelpIndex"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtendedHelp" toolbar:visible="false" toolbar:helpid="5402"/>
+ <toolbar:toolbaritem xlink:href=".uno:HelpIndex" />
+ <toolbar:toolbaritem xlink:href=".uno:ExtendedHelp" toolbar:visible="false" />
</toolbar:toolbar>
diff --git a/reportdesign/util/hidother.src b/reportdesign/util/hidother.src
index e72a781b6342..f0b1e8d5aa72 100644
--- a/reportdesign/util/hidother.src
+++ b/reportdesign/util/hidother.src
@@ -133,6 +133,23 @@ hidspecial SID_SECTION_ALIGN_DOWN { HelpId = SID_SECTION_ALIGN_DOWN; };
hidspecial SID_NEXT_MARK { HelpId = SID_NEXT_MARK; };
hidspecial SID_PREV_MARK { HelpId = SID_PREV_MARK; };
+hidspecial SID_SECTION_SHRINK { HelpId = SID_SECTION_SHRINK; };
+hidspecial SID_SECTION_SHRINK_TOP { HelpId = SID_SECTION_SHRINK_TOP; };
+hidspecial SID_SECTION_SHRINK_BOTTOM { HelpId = SID_SECTION_SHRINK_BOTTOM; };
+
+hidspecial UID_RPT_PROP_CHARTTYPE_DLG { HelpId = UID_RPT_PROP_CHARTTYPE_DLG; };
+hidspecial HID_RPT_PROP_CHARTTYPE { HelpId = HID_RPT_PROP_CHARTTYPE; };
+hidspecial HID_RPT_FIELD_SEL_WIN { HelpId = HID_RPT_FIELD_SEL_WIN; };
+hidspecial HID_RPT_FIELD_SEL { HelpId = HID_RPT_FIELD_SEL; };
+hidspecial HID_RPT_PROP_FORMULALIST { HelpId = HID_RPT_PROP_FORMULALIST; };
+hidspecial HID_RPT_PROP_SCOPE { HelpId = HID_RPT_PROP_SCOPE; };
+hidspecial HID_RPT_PROP_TYPE { HelpId = HID_RPT_PROP_TYPE; };
+hidspecial UID_RPT_PROP_DLG_LINKFIELDS { HelpId = UID_RPT_PROP_DLG_LINKFIELDS; };
+hidspecial HID_RPT_PROP_MASTERFIELDS { HelpId = HID_RPT_PROP_MASTERFIELDS; };
+hidspecial HID_RPT_PROP_DETAILFIELDS { HelpId = HID_RPT_PROP_DETAILFIELDS; };
+hidspecial HID_RPT_PROP_PREVIEW_COUNT { HelpId = HID_RPT_PROP_PREVIEW_COUNT; };
+hidspecial HID_RPT_PROP_AREA { HelpId = HID_RPT_PROP_AREA; };
+hidspecial UID_RPT_RPT_PROP_DLG_AREA { HelpId = UID_RPT_RPT_PROP_DLG_AREA; };
hidspecial UID_RPT_PROP_CHARTTYPE_DLG { HelpId = UID_RPT_PROP_CHARTTYPE_DLG; };
hidspecial HID_RPT_PROP_CHARTTYPE { HelpId = HID_RPT_PROP_CHARTTYPE; };
hidspecial HID_RPT_FIELD_SEL_WIN { HelpId = HID_RPT_FIELD_SEL_WIN; };
@@ -147,4 +164,9 @@ hidspecial HID_RPT_PROP_PREVIEW_COUNT { HelpId = HID_RPT_PROP_PREVIEW_COUNT; }
hidspecial HID_RPT_PROP_AREA { HelpId = HID_RPT_PROP_AREA; };
hidspecial UID_RPT_RPT_PROP_DLG_AREA { HelpId = UID_RPT_RPT_PROP_DLG_AREA; };
hidspecial UID_RPT_PROP_FORMULA { HelpId = UID_RPT_PROP_FORMULA; };
-hidspecial HID_RPT_PROP_MIMETYPE { HelpId = HID_RPT_PROP_MIMETYPE; }; \ No newline at end of file
+
+hidspecial HID_RPT_GROUPSORT_MOVE_UP { HelpId = HID_RPT_GROUPSORT_MOVE_UP; };
+hidspecial HID_RPT_GROUPSORT_MOVE_DOWN { HelpId = HID_RPT_GROUPSORT_MOVE_DOWN; };
+hidspecial HID_RPT_GROUPSORT_DELETE { HelpId = HID_RPT_GROUPSORT_DELETE; };
+hidspecial HID_RPT_PROP_MIMETYPE { HelpId = HID_RPT_PROP_MIMETYPE; };
+