2010-10-12 15:59:03 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-14 17:39:53 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2006-09-17 05:39:27 +00:00
|
|
|
|
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
|
|
|
#include "core_resource.hxx"
|
|
|
|
#include "core_resource.hrc"
|
2004-08-02 14:09:11 +00:00
|
|
|
#include "datasource.hxx"
|
2005-03-10 15:33:50 +00:00
|
|
|
#include "databasedocument.hxx"
|
2004-08-02 14:09:11 +00:00
|
|
|
#include "dbastrings.hrc"
|
2008-01-30 07:33:34 +00:00
|
|
|
#include "module_dba.hxx"
|
2008-10-16 06:57:26 +00:00
|
|
|
#include "documenteventexecutor.hxx"
|
|
|
|
#include "databasecontext.hxx"
|
|
|
|
#include "documentcontainer.hxx"
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
#include "sdbcoretools.hxx"
|
2010-01-28 22:34:45 +01:00
|
|
|
#include "recovery/dbdocrecovery.hxx"
|
2008-12-01 12:31:27 +00:00
|
|
|
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
#include <com/sun/star/beans/Optional.hpp>
|
2008-10-16 06:57:26 +00:00
|
|
|
#include <com/sun/star/document/XExporter.hpp>
|
|
|
|
#include <com/sun/star/document/XFilter.hpp>
|
|
|
|
#include <com/sun/star/document/XImporter.hpp>
|
2013-01-09 15:32:10 +02:00
|
|
|
#include <com/sun/star/document/GraphicObjectResolver.hpp>
|
2008-10-16 06:57:26 +00:00
|
|
|
#include <com/sun/star/embed/EntryInitModes.hpp>
|
|
|
|
#include <com/sun/star/embed/XEmbedPersist.hpp>
|
2004-08-02 14:09:11 +00:00
|
|
|
#include <com/sun/star/embed/XTransactedObject.hpp>
|
2008-10-16 06:57:26 +00:00
|
|
|
#include <com/sun/star/embed/XTransactionBroadcaster.hpp>
|
2012-12-14 12:58:00 +02:00
|
|
|
#include <com/sun/star/frame/Desktop.hpp>
|
2012-09-04 14:56:48 +02:00
|
|
|
#include <com/sun/star/frame/ModuleManager.hpp>
|
2004-08-02 14:09:11 +00:00
|
|
|
#include <com/sun/star/io/XActiveDataSource.hpp>
|
|
|
|
#include <com/sun/star/io/XSeekable.hpp>
|
2009-10-23 07:04:02 +02:00
|
|
|
#include <com/sun/star/io/XOutputStream.hpp>
|
|
|
|
#include <com/sun/star/io/XTruncate.hpp>
|
2013-02-27 15:16:02 +02:00
|
|
|
#include <com/sun/star/script/provider/theMasterScriptProviderFactory.hpp>
|
2013-02-26 16:24:53 +02:00
|
|
|
#include <com/sun/star/sdb/DatabaseContext.hpp>
|
|
|
|
#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
|
2004-08-02 14:09:11 +00:00
|
|
|
#include <com/sun/star/task/XStatusIndicator.hpp>
|
|
|
|
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
|
2012-05-29 17:17:28 +02:00
|
|
|
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
|
2013-02-26 16:24:53 +02:00
|
|
|
#include <com/sun/star/ucb/XContent.hpp>
|
|
|
|
#include <com/sun/star/ui/UIConfigurationManager.hpp>
|
2005-03-01 18:13:53 +00:00
|
|
|
#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
|
2004-08-02 14:09:11 +00:00
|
|
|
#include <com/sun/star/view/XSelectionSupplier.hpp>
|
2008-10-16 06:57:26 +00:00
|
|
|
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
|
2012-10-10 10:13:18 +02:00
|
|
|
#include <com/sun/star/xml/sax/Writer.hpp>
|
2011-08-22 15:41:30 +01:00
|
|
|
|
|
|
|
#include <com/sun/star/script/XStorageBasedLibraryContainer.hpp>
|
|
|
|
#include <com/sun/star/awt/XControl.hpp>
|
2013-01-18 09:18:17 +02:00
|
|
|
#include <com/sun/star/awt/DialogProvider.hpp>
|
2011-08-22 15:41:30 +01:00
|
|
|
#include <com/sun/star/document/XGraphicObjectResolver.hpp>
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
#include <comphelper/documentconstants.hxx>
|
|
|
|
#include <comphelper/enumhelper.hxx>
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
#include <comphelper/genericpropertyset.hxx>
|
|
|
|
#include <comphelper/interaction.hxx>
|
2008-10-16 06:57:26 +00:00
|
|
|
#include <comphelper/mediadescriptor.hxx>
|
|
|
|
#include <comphelper/namedvaluecollection.hxx>
|
|
|
|
#include <comphelper/numberedcollection.hxx>
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
#include <comphelper/property.hxx>
|
2008-10-16 06:57:26 +00:00
|
|
|
#include <comphelper/storagehelper.hxx>
|
2009-12-16 12:46:33 +01:00
|
|
|
|
|
|
|
#include <connectivity/dbtools.hxx>
|
|
|
|
|
2006-03-29 11:33:47 +00:00
|
|
|
#include <cppuhelper/exc_hlp.hxx>
|
2008-10-16 06:57:26 +00:00
|
|
|
#include <framework/titlehelper.hxx>
|
2009-12-03 08:37:11 +01:00
|
|
|
#include <unotools/saveopt.hxx>
|
2008-10-16 06:57:26 +00:00
|
|
|
#include <tools/debug.hxx>
|
|
|
|
#include <tools/diagnose_ex.h>
|
2011-02-03 00:33:36 +01:00
|
|
|
#include <osl/diagnose.h>
|
2008-10-16 06:57:26 +00:00
|
|
|
#include <tools/errcode.hxx>
|
2004-08-02 14:09:11 +00:00
|
|
|
|
2005-12-21 12:34:54 +00:00
|
|
|
#include <boost/bind.hpp>
|
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
#include <algorithm>
|
|
|
|
#include <functional>
|
2008-12-16 13:30:53 +00:00
|
|
|
#include <list>
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2011-08-22 15:41:30 +01:00
|
|
|
#include <svtools/grfmgr.hxx>
|
2008-10-01 12:28:29 +00:00
|
|
|
#define MAP_LEN(x) x, sizeof(x) - 1
|
|
|
|
|
2004-08-02 14:09:11 +00:00
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::beans;
|
|
|
|
using namespace ::com::sun::star::frame;
|
|
|
|
using namespace ::com::sun::star::lang;
|
|
|
|
using namespace ::com::sun::star::container;
|
|
|
|
using namespace ::com::sun::star::document;
|
|
|
|
using namespace ::com::sun::star::io;
|
|
|
|
using namespace ::com::sun::star::util;
|
|
|
|
using namespace ::com::sun::star::embed;
|
|
|
|
using namespace ::com::sun::star::task;
|
|
|
|
using namespace ::com::sun::star::view;
|
2012-09-18 09:46:34 +02:00
|
|
|
using namespace ::com::sun::star::sdb;
|
2005-03-10 15:33:50 +00:00
|
|
|
using namespace ::com::sun::star::sdbc;
|
2004-08-02 14:09:11 +00:00
|
|
|
using namespace ::com::sun::star;
|
|
|
|
using namespace ::com::sun::star::xml::sax;
|
2008-03-06 16:58:17 +00:00
|
|
|
using namespace ::com::sun::star::script;
|
|
|
|
using namespace ::com::sun::star::script::provider;
|
|
|
|
using namespace ::com::sun::star::ui;
|
2004-08-02 14:09:11 +00:00
|
|
|
using namespace ::cppu;
|
|
|
|
using namespace ::osl;
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-06-06 13:02:08 +00:00
|
|
|
using ::com::sun::star::awt::XWindow;
|
2010-01-12 23:32:12 +01:00
|
|
|
using ::com::sun::star::ucb::XContent;
|
|
|
|
using ::com::sun::star::sdb::application::XDatabaseDocumentUI;
|
2008-06-06 13:02:08 +00:00
|
|
|
|
2004-08-02 14:09:11 +00:00
|
|
|
namespace dbaccess
|
|
|
|
{
|
2005-03-10 15:33:50 +00:00
|
|
|
|
2013-08-17 23:43:14 +02:00
|
|
|
// ViewMonitor
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
bool ViewMonitor::onControllerConnected( const Reference< XController >& _rxController )
|
|
|
|
{
|
|
|
|
bool bFirstControllerEver = ( m_bEverHadController == false );
|
|
|
|
m_bEverHadController = true;
|
|
|
|
|
|
|
|
m_xLastConnectedController = _rxController;
|
|
|
|
m_bLastIsFirstEverController = bFirstControllerEver;
|
|
|
|
|
|
|
|
return bFirstControllerEver;
|
|
|
|
}
|
|
|
|
|
2010-02-16 15:31:07 +01:00
|
|
|
bool ViewMonitor::onSetCurrentController( const Reference< XController >& _rxController )
|
2008-10-16 06:57:26 +00:00
|
|
|
{
|
|
|
|
// we interpret this as "loading the document (including UI) is finished",
|
|
|
|
// if and only if this is the controller which was last connected, and it was the
|
|
|
|
// first controller ever connected
|
|
|
|
bool bLoadFinished = ( _rxController == m_xLastConnectedController ) && m_bLastIsFirstEverController;
|
|
|
|
|
|
|
|
// notify the respective events
|
|
|
|
if ( bLoadFinished )
|
|
|
|
m_rEventNotifier.notifyDocumentEventAsync( m_bIsNewDocument ? "OnNew" : "OnLoad" );
|
2010-02-16 15:31:07 +01:00
|
|
|
|
|
|
|
return bLoadFinished;
|
2008-10-16 06:57:26 +00:00
|
|
|
}
|
|
|
|
|
2013-08-17 23:43:14 +02:00
|
|
|
// ODatabaseDocument
|
2005-03-10 15:33:50 +00:00
|
|
|
DBG_NAME(ODatabaseDocument)
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
extern "C" void SAL_CALL createRegistryInfo_ODatabaseDocument()
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-01-30 07:33:34 +00:00
|
|
|
static ::dba::OAutoRegistration< ODatabaseDocument > aAutoRegistration;
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2005-03-10 15:33:50 +00:00
|
|
|
|
|
|
|
ODatabaseDocument::ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>& _pImpl )
|
2005-12-21 12:34:54 +00:00
|
|
|
:ModelDependentComponent( _pImpl )
|
|
|
|
,ODatabaseDocument_OfficeDocument( getMutex() )
|
|
|
|
,m_aModifyListeners( getMutex() )
|
|
|
|
,m_aCloseListener( getMutex() )
|
2008-03-06 16:58:17 +00:00
|
|
|
,m_aStorageListeners( getMutex() )
|
2009-04-24 18:34:24 +00:00
|
|
|
,m_pEventContainer( new DocumentEvents( *this, getMutex(), _pImpl->getDocumentEvents() ) )
|
2008-10-16 06:57:26 +00:00
|
|
|
,m_pEventExecutor( NULL ) // initialized below, ref-count-protected
|
|
|
|
,m_aEventNotifier( *this, getMutex() )
|
|
|
|
,m_aViewMonitor( m_aEventNotifier )
|
|
|
|
,m_eInitState( NotInitialized )
|
|
|
|
,m_bClosing( false )
|
2009-04-24 18:34:24 +00:00
|
|
|
,m_bAllowDocumentScripting( false )
|
2010-01-14 15:10:17 +01:00
|
|
|
,m_bHasBeenRecovered( false )
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2005-03-10 15:33:50 +00:00
|
|
|
DBG_CTOR(ODatabaseDocument,NULL);
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
OSL_TRACE( "DD: ctor: %p: %p", this, m_pImpl.get() );
|
2005-07-08 09:36:11 +00:00
|
|
|
|
2012-09-22 01:51:12 -05:00
|
|
|
osl_atomic_increment( &m_refCount );
|
2006-02-07 09:18:42 +00:00
|
|
|
{
|
|
|
|
impl_reparent_nothrow( m_xForms );
|
|
|
|
impl_reparent_nothrow( m_xReports );
|
|
|
|
impl_reparent_nothrow( m_pImpl->m_xTableDefinitions );
|
|
|
|
impl_reparent_nothrow( m_pImpl->m_xCommandDefinitions );
|
2008-10-16 06:57:26 +00:00
|
|
|
|
|
|
|
m_pEventExecutor = new DocumentEventExecutor( m_pImpl->m_aContext, this );
|
2006-02-07 09:18:42 +00:00
|
|
|
}
|
2012-09-22 01:51:12 -05:00
|
|
|
osl_atomic_decrement( &m_refCount );
|
2008-10-16 06:57:26 +00:00
|
|
|
|
|
|
|
// if there previously was a document instance for the same Impl which was already initialized,
|
|
|
|
// then consider ourself initialized, too.
|
|
|
|
// #i94840#
|
|
|
|
if ( m_pImpl->hadInitializedDocument() )
|
2009-04-24 18:34:24 +00:00
|
|
|
{
|
CWS-TOOLING: integrate CWS dba32h
2009-10-12 12:21:44 +0200 msc r276827 : remove warning for issue 102712 because the issue is fixed
2009-10-05 07:14:20 +0200 oj r276658 : #105585# add missing dependency for OOO_UI
2009-10-02 12:50:19 +0200 fs r276632 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 12:46:12 +0200 fs r276631 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 13:09:07 +0200 fs r276596 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 12:35:56 +0200 fs r276589 : #i105509# don't rely on default form component names, use indexes
2009-10-01 11:19:18 +0200 fs r276584 : copying the fix for #i105082# into this CWS
2009-10-01 11:13:22 +0200 fs r276583 : improved logs
2009-10-01 11:10:44 +0200 fs r276581 : #i105505#
2009-10-01 08:07:57 +0200 fs r276575 : manual merge of trunk, to allow cwslocalize to run
2009-09-30 22:48:30 +0200 fs r276574 : removed that strange ONLOAD definition
2009-09-30 12:58:18 +0200 fs r276553 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 12:56:45 +0200 fs r276552 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 11:47:45 +0200 fs r276549 : #i105235#
2009-09-29 12:27:40 +0200 fs r276521 : #i105367#
2009-09-28 12:08:17 +0200 oj r276485 : #i105371# export version in manifest.xml as well
2009-09-28 12:07:02 +0200 oj r276484 : #i105371# export version in manifest.xml as well
2009-09-28 09:48:01 +0200 oj r276481 : #i105366# init drivers when not empty
2009-09-25 14:31:27 +0200 fs r276466 : CWS-TOOLING: rebase CWS dba32h to trunk@276429 (milestone: DEV300:m60)
2009-09-24 13:52:54 +0200 fs r276422 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 11:42:03 +0200 fs r276413 : #i105234# proper zoom handling for the nav bar
2009-09-24 11:41:40 +0200 fs r276412 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-23 12:21:22 +0200 oj r276377 : remove dos lineends
2009-09-23 11:44:52 +0200 oj r276376 : #i105216# load config on demand
2009-09-23 11:44:19 +0200 oj r276375 : #i105216# load config on demand
2009-09-23 11:43:35 +0200 oj r276374 : #i105216# load config on demand
2009-09-21 09:13:03 +0200 oj r276307 : #i105158# use Thread support
2009-09-18 13:06:50 +0200 fs r276277 : #i105147#
2009-09-18 11:48:23 +0200 oj r276271 : #i105158# new method for thread safety
2009-09-18 10:42:56 +0200 fs r276266 : CWS-TOOLING: rebase CWS dba32h to trunk@276192 (milestone: DEV300:m59)
2009-09-18 08:30:03 +0200 oj r276263 : #i105016# load correct ldap so
2009-09-17 13:42:31 +0200 oj r276240 : change count of check boxes
2009-09-17 13:32:59 +0200 oj r276239 : revert false to true for currency
2009-09-17 09:14:46 +0200 oj r276220 : #i104901# add patch for every issue
2009-09-17 09:10:29 +0200 oj r276219 : #i104901# add patch for every issue
2009-09-11 13:47:49 +0200 oj r276060 : #i104901# fix for indentity
2009-09-11 12:14:14 +0200 fs r276056 : #i104594# allow to render controls without an SdrPageView
2009-09-11 11:49:31 +0200 fs r276055 : CWS-TOOLING: rebase CWS dba32h to trunk@276043 (milestone: DEV300:m58)
2009-09-10 08:41:40 +0200 oj r276021 : #i104911# export variable-set not for repeating sections
2009-10-14 18:48:09 +00:00
|
|
|
// Note we set our init-state to "Initializing", not "Initialized". We're created from inside the ModelImpl,
|
|
|
|
// which is expected to call attachResource in case there was a previous incarnation of the document,
|
|
|
|
// so we can properly finish our initialization then.
|
|
|
|
impl_setInitializing();
|
|
|
|
|
2011-12-19 18:10:37 -02:00
|
|
|
if ( !m_pImpl->getURL().isEmpty() )
|
CWS-TOOLING: integrate CWS dba32h
2009-10-12 12:21:44 +0200 msc r276827 : remove warning for issue 102712 because the issue is fixed
2009-10-05 07:14:20 +0200 oj r276658 : #105585# add missing dependency for OOO_UI
2009-10-02 12:50:19 +0200 fs r276632 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 12:46:12 +0200 fs r276631 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 13:09:07 +0200 fs r276596 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 12:35:56 +0200 fs r276589 : #i105509# don't rely on default form component names, use indexes
2009-10-01 11:19:18 +0200 fs r276584 : copying the fix for #i105082# into this CWS
2009-10-01 11:13:22 +0200 fs r276583 : improved logs
2009-10-01 11:10:44 +0200 fs r276581 : #i105505#
2009-10-01 08:07:57 +0200 fs r276575 : manual merge of trunk, to allow cwslocalize to run
2009-09-30 22:48:30 +0200 fs r276574 : removed that strange ONLOAD definition
2009-09-30 12:58:18 +0200 fs r276553 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 12:56:45 +0200 fs r276552 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 11:47:45 +0200 fs r276549 : #i105235#
2009-09-29 12:27:40 +0200 fs r276521 : #i105367#
2009-09-28 12:08:17 +0200 oj r276485 : #i105371# export version in manifest.xml as well
2009-09-28 12:07:02 +0200 oj r276484 : #i105371# export version in manifest.xml as well
2009-09-28 09:48:01 +0200 oj r276481 : #i105366# init drivers when not empty
2009-09-25 14:31:27 +0200 fs r276466 : CWS-TOOLING: rebase CWS dba32h to trunk@276429 (milestone: DEV300:m60)
2009-09-24 13:52:54 +0200 fs r276422 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 11:42:03 +0200 fs r276413 : #i105234# proper zoom handling for the nav bar
2009-09-24 11:41:40 +0200 fs r276412 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-23 12:21:22 +0200 oj r276377 : remove dos lineends
2009-09-23 11:44:52 +0200 oj r276376 : #i105216# load config on demand
2009-09-23 11:44:19 +0200 oj r276375 : #i105216# load config on demand
2009-09-23 11:43:35 +0200 oj r276374 : #i105216# load config on demand
2009-09-21 09:13:03 +0200 oj r276307 : #i105158# use Thread support
2009-09-18 13:06:50 +0200 fs r276277 : #i105147#
2009-09-18 11:48:23 +0200 oj r276271 : #i105158# new method for thread safety
2009-09-18 10:42:56 +0200 fs r276266 : CWS-TOOLING: rebase CWS dba32h to trunk@276192 (milestone: DEV300:m59)
2009-09-18 08:30:03 +0200 oj r276263 : #i105016# load correct ldap so
2009-09-17 13:42:31 +0200 oj r276240 : change count of check boxes
2009-09-17 13:32:59 +0200 oj r276239 : revert false to true for currency
2009-09-17 09:14:46 +0200 oj r276220 : #i104901# add patch for every issue
2009-09-17 09:10:29 +0200 oj r276219 : #i104901# add patch for every issue
2009-09-11 13:47:49 +0200 oj r276060 : #i104901# fix for indentity
2009-09-11 12:14:14 +0200 fs r276056 : #i104594# allow to render controls without an SdrPageView
2009-09-11 11:49:31 +0200 fs r276055 : CWS-TOOLING: rebase CWS dba32h to trunk@276043 (milestone: DEV300:m58)
2009-09-10 08:41:40 +0200 oj r276021 : #i104911# export variable-set not for repeating sections
2009-10-14 18:48:09 +00:00
|
|
|
{
|
|
|
|
// if the previous incarnation of the DatabaseDocument already had an URL, then creating this incarnation
|
|
|
|
// here is effectively loading the document.
|
2011-02-27 22:55:22 +01:00
|
|
|
// #i105505#
|
CWS-TOOLING: integrate CWS dba32h
2009-10-12 12:21:44 +0200 msc r276827 : remove warning for issue 102712 because the issue is fixed
2009-10-05 07:14:20 +0200 oj r276658 : #105585# add missing dependency for OOO_UI
2009-10-02 12:50:19 +0200 fs r276632 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 12:46:12 +0200 fs r276631 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 13:09:07 +0200 fs r276596 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 12:35:56 +0200 fs r276589 : #i105509# don't rely on default form component names, use indexes
2009-10-01 11:19:18 +0200 fs r276584 : copying the fix for #i105082# into this CWS
2009-10-01 11:13:22 +0200 fs r276583 : improved logs
2009-10-01 11:10:44 +0200 fs r276581 : #i105505#
2009-10-01 08:07:57 +0200 fs r276575 : manual merge of trunk, to allow cwslocalize to run
2009-09-30 22:48:30 +0200 fs r276574 : removed that strange ONLOAD definition
2009-09-30 12:58:18 +0200 fs r276553 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 12:56:45 +0200 fs r276552 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 11:47:45 +0200 fs r276549 : #i105235#
2009-09-29 12:27:40 +0200 fs r276521 : #i105367#
2009-09-28 12:08:17 +0200 oj r276485 : #i105371# export version in manifest.xml as well
2009-09-28 12:07:02 +0200 oj r276484 : #i105371# export version in manifest.xml as well
2009-09-28 09:48:01 +0200 oj r276481 : #i105366# init drivers when not empty
2009-09-25 14:31:27 +0200 fs r276466 : CWS-TOOLING: rebase CWS dba32h to trunk@276429 (milestone: DEV300:m60)
2009-09-24 13:52:54 +0200 fs r276422 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 11:42:03 +0200 fs r276413 : #i105234# proper zoom handling for the nav bar
2009-09-24 11:41:40 +0200 fs r276412 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-23 12:21:22 +0200 oj r276377 : remove dos lineends
2009-09-23 11:44:52 +0200 oj r276376 : #i105216# load config on demand
2009-09-23 11:44:19 +0200 oj r276375 : #i105216# load config on demand
2009-09-23 11:43:35 +0200 oj r276374 : #i105216# load config on demand
2009-09-21 09:13:03 +0200 oj r276307 : #i105158# use Thread support
2009-09-18 13:06:50 +0200 fs r276277 : #i105147#
2009-09-18 11:48:23 +0200 oj r276271 : #i105158# new method for thread safety
2009-09-18 10:42:56 +0200 fs r276266 : CWS-TOOLING: rebase CWS dba32h to trunk@276192 (milestone: DEV300:m59)
2009-09-18 08:30:03 +0200 oj r276263 : #i105016# load correct ldap so
2009-09-17 13:42:31 +0200 oj r276240 : change count of check boxes
2009-09-17 13:32:59 +0200 oj r276239 : revert false to true for currency
2009-09-17 09:14:46 +0200 oj r276220 : #i104901# add patch for every issue
2009-09-17 09:10:29 +0200 oj r276219 : #i104901# add patch for every issue
2009-09-11 13:47:49 +0200 oj r276060 : #i104901# fix for indentity
2009-09-11 12:14:14 +0200 fs r276056 : #i104594# allow to render controls without an SdrPageView
2009-09-11 11:49:31 +0200 fs r276055 : CWS-TOOLING: rebase CWS dba32h to trunk@276043 (milestone: DEV300:m58)
2009-09-10 08:41:40 +0200 oj r276021 : #i104911# export variable-set not for repeating sections
2009-10-14 18:48:09 +00:00
|
|
|
m_aViewMonitor.onLoadedDocument();
|
|
|
|
}
|
2009-04-24 18:34:24 +00:00
|
|
|
}
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
ODatabaseDocument::~ODatabaseDocument()
|
2004-12-03 13:34:06 +00:00
|
|
|
{
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
OSL_TRACE( "DD: dtor: %p: %p", this, m_pImpl.get() );
|
2005-03-10 15:33:50 +00:00
|
|
|
DBG_DTOR(ODatabaseDocument,NULL);
|
|
|
|
if ( !ODatabaseDocument_OfficeDocument::rBHelper.bInDispose && !ODatabaseDocument_OfficeDocument::rBHelper.bDisposed )
|
2004-12-03 13:34:06 +00:00
|
|
|
{
|
2005-03-10 15:33:50 +00:00
|
|
|
acquire();
|
|
|
|
dispose();
|
2004-12-03 13:34:06 +00:00
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
|
|
|
|
delete m_pEventContainer, m_pEventContainer = NULL;
|
2004-12-03 13:34:06 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2008-06-06 13:02:08 +00:00
|
|
|
Any SAL_CALL ODatabaseDocument::queryInterface( const Type& _rType ) throw (RuntimeException)
|
2008-04-04 13:32:17 +00:00
|
|
|
{
|
2008-04-08 11:46:07 +00:00
|
|
|
// strip XEmbeddedScripts and XScriptInvocationContext if we have any form/report
|
|
|
|
// which already contains macros. In this case, the database document itself is not
|
|
|
|
// allowed to contain macros, too.
|
2009-04-24 18:34:24 +00:00
|
|
|
if ( !m_bAllowDocumentScripting
|
2008-04-08 11:46:07 +00:00
|
|
|
&& ( _rType.equals( XEmbeddedScripts::static_type() )
|
|
|
|
|| _rType.equals( XScriptInvocationContext::static_type() )
|
|
|
|
)
|
|
|
|
)
|
|
|
|
return Any();
|
|
|
|
|
2008-04-04 13:32:17 +00:00
|
|
|
Any aReturn = ODatabaseDocument_OfficeDocument::queryInterface(_rType);
|
|
|
|
if (!aReturn.hasValue())
|
|
|
|
aReturn = ODatabaseDocument_Title::queryInterface(_rType);
|
|
|
|
return aReturn;
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2008-04-04 13:32:17 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::acquire( ) throw ()
|
|
|
|
{
|
|
|
|
ODatabaseDocument_OfficeDocument::acquire();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL ODatabaseDocument::release( ) throw ()
|
|
|
|
{
|
|
|
|
ODatabaseDocument_OfficeDocument::release();
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2008-04-04 13:32:17 +00:00
|
|
|
Sequence< Type > SAL_CALL ODatabaseDocument::getTypes( ) throw (RuntimeException)
|
|
|
|
{
|
2008-04-08 11:46:07 +00:00
|
|
|
Sequence< Type > aTypes = ::comphelper::concatSequences(
|
2008-04-04 13:32:17 +00:00
|
|
|
ODatabaseDocument_OfficeDocument::getTypes(),
|
|
|
|
ODatabaseDocument_Title::getTypes()
|
|
|
|
);
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
// strip XEmbeddedScripts and XScriptInvocationContext if we have any form/report
|
|
|
|
// which already contains macros. In this case, the database document itself is not
|
|
|
|
// allowed to contain macros, too.
|
2009-04-24 18:34:24 +00:00
|
|
|
if ( !m_bAllowDocumentScripting )
|
2005-03-30 10:55:24 +00:00
|
|
|
{
|
2008-03-06 16:58:17 +00:00
|
|
|
Sequence< Type > aStrippedTypes( aTypes.getLength() );
|
|
|
|
Type* pStripTo( aStrippedTypes.getArray() );
|
|
|
|
|
|
|
|
// strip XEmbeddedScripts, and immediately re-assign to aTypes
|
|
|
|
aTypes = Sequence< Type >(
|
|
|
|
pStripTo,
|
|
|
|
::std::remove_copy_if(
|
|
|
|
aTypes.getConstArray(),
|
|
|
|
aTypes.getConstArray() + aTypes.getLength(),
|
|
|
|
pStripTo,
|
|
|
|
::std::bind2nd( ::std::equal_to< Type >(), XEmbeddedScripts::static_type() )
|
|
|
|
) - pStripTo
|
|
|
|
);
|
|
|
|
|
|
|
|
// strip XScriptInvocationContext, and immediately re-assign to aTypes
|
|
|
|
aTypes = Sequence< Type >(
|
|
|
|
pStripTo,
|
|
|
|
::std::remove_copy_if(
|
|
|
|
aTypes.getConstArray(),
|
|
|
|
aTypes.getConstArray() + aTypes.getLength(),
|
|
|
|
pStripTo,
|
|
|
|
::std::bind2nd( ::std::equal_to< Type >(), XScriptInvocationContext::static_type() )
|
|
|
|
) - pStripTo
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
return aTypes;
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2008-04-08 11:46:07 +00:00
|
|
|
Sequence< sal_Int8 > SAL_CALL ODatabaseDocument::getImplementationId( ) throw (RuntimeException)
|
|
|
|
{
|
|
|
|
static ::cppu::OImplementationId * pId = 0;
|
|
|
|
if (! pId)
|
|
|
|
{
|
|
|
|
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
|
|
|
|
if (! pId)
|
|
|
|
{
|
|
|
|
static ::cppu::OImplementationId aId;
|
|
|
|
pId = &aId;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return pId->getImplementationId();
|
|
|
|
}
|
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
// local functions
|
|
|
|
namespace
|
|
|
|
{
|
2009-04-24 18:34:24 +00:00
|
|
|
Reference< XStatusIndicator > lcl_extractStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments )
|
|
|
|
{
|
|
|
|
Reference< XStatusIndicator > xStatusIndicator;
|
|
|
|
return _rArguments.getOrDefault( "StatusIndicator", xStatusIndicator );
|
|
|
|
}
|
|
|
|
|
|
|
|
static void lcl_triggerStatusIndicator_throw( const ::comphelper::NamedValueCollection& _rArguments, DocumentGuard& _rGuard, const bool _bStart )
|
|
|
|
{
|
|
|
|
Reference< XStatusIndicator > xStatusIndicator( lcl_extractStatusIndicator( _rArguments ) );
|
|
|
|
if ( !xStatusIndicator.is() )
|
|
|
|
return;
|
|
|
|
|
|
|
|
_rGuard.clear();
|
|
|
|
try
|
|
|
|
{
|
|
|
|
if ( _bStart )
|
2013-01-08 19:46:57 -02:00
|
|
|
xStatusIndicator->start( OUString(), (sal_Int32)1000000 );
|
2009-04-24 18:34:24 +00:00
|
|
|
else
|
|
|
|
xStatusIndicator->end();
|
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
|
|
|
}
|
|
|
|
_rGuard.reset();
|
|
|
|
// note that |reset| can throw a DisposedException
|
|
|
|
}
|
|
|
|
|
|
|
|
static void lcl_extractStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments, Sequence< Any >& _rCallArgs )
|
|
|
|
{
|
|
|
|
Reference< XStatusIndicator > xStatusIndicator( lcl_extractStatusIndicator( _rArguments ) );
|
|
|
|
if ( !xStatusIndicator.is() )
|
|
|
|
return;
|
|
|
|
|
|
|
|
sal_Int32 nLength = _rCallArgs.getLength();
|
|
|
|
_rCallArgs.realloc( nLength + 1 );
|
|
|
|
_rCallArgs[ nLength ] <<= xStatusIndicator;
|
|
|
|
}
|
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
static void lcl_extractAndStartStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments, Reference< XStatusIndicator >& _rxStatusIndicator,
|
|
|
|
Sequence< Any >& _rCallArgs )
|
|
|
|
{
|
2009-04-24 18:34:24 +00:00
|
|
|
_rxStatusIndicator = lcl_extractStatusIndicator( _rArguments );
|
|
|
|
if ( !_rxStatusIndicator.is() )
|
|
|
|
return;
|
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
try
|
2005-03-30 10:55:24 +00:00
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
_rxStatusIndicator->start( OUString(), (sal_Int32)1000000 );
|
2005-03-30 10:55:24 +00:00
|
|
|
|
2009-04-24 18:34:24 +00:00
|
|
|
sal_Int32 nLength = _rCallArgs.getLength();
|
|
|
|
_rCallArgs.realloc( nLength + 1 );
|
|
|
|
_rCallArgs[ nLength ] <<= _rxStatusIndicator;
|
2008-03-06 16:58:17 +00:00
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
2005-03-30 10:55:24 +00:00
|
|
|
}
|
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
static Sequence< PropertyValue > lcl_appendFileNameToDescriptor( const ::comphelper::NamedValueCollection& _rDescriptor, const OUString _rURL )
|
2005-03-30 10:55:24 +00:00
|
|
|
{
|
2010-01-29 13:54:37 +01:00
|
|
|
::comphelper::NamedValueCollection aMutableDescriptor( _rDescriptor );
|
2011-12-19 18:10:37 -02:00
|
|
|
if ( !_rURL.isEmpty() )
|
2008-03-06 16:58:17 +00:00
|
|
|
{
|
2010-01-29 13:54:37 +01:00
|
|
|
aMutableDescriptor.put( "FileName", _rURL );
|
|
|
|
aMutableDescriptor.put( "URL", _rURL );
|
2008-03-06 16:58:17 +00:00
|
|
|
}
|
2010-01-29 13:54:37 +01:00
|
|
|
return aMutableDescriptor.getPropertyValues();
|
2005-03-30 10:55:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
static OUString sPictures( "Pictures" );
|
2011-08-22 15:41:30 +01:00
|
|
|
|
|
|
|
// base documents seem to have a different behaviour to other documents, the
|
|
|
|
// root storage contents at least seem to be re-used over different saves, thus if there is a
|
|
|
|
// top level Picture directory it is never cleared.
|
|
|
|
// If we delete the 'Pictures' directory then the dialog library storage which does store
|
|
|
|
// any embed images will not work properly. ( this is due to the fact it will
|
|
|
|
// try to load the dialog which will try and access the embed images, if those images are not cached in
|
|
|
|
// memory it will try to read them from the Picture directory which is now gone, so... we have to use this
|
|
|
|
// inglorious hack below which basically will
|
2013-08-17 23:43:14 +02:00
|
|
|
//
|
2011-08-22 15:41:30 +01:00
|
|
|
// a) create a temp storage
|
2013-08-17 23:43:14 +02:00
|
|
|
//
|
2011-08-22 15:41:30 +01:00
|
|
|
// b) introspect any dialogs for any embed graphics and grab the associate URL(s)
|
2013-08-17 23:43:14 +02:00
|
|
|
//
|
2011-08-22 15:41:30 +01:00
|
|
|
// c) populate the temp storage with the associated embed images ( will be stored in a 'Pictures' folder )
|
2013-08-17 23:43:14 +02:00
|
|
|
//
|
2011-08-22 15:41:30 +01:00
|
|
|
// d) delete the 'Picture' element from the root storage
|
2013-08-17 23:43:14 +02:00
|
|
|
//
|
2011-08-22 15:41:30 +01:00
|
|
|
// e) copy the Pictures element of the temp storage to the root storage
|
|
|
|
//
|
|
|
|
// this assumes that we don't use the Pictures folder in the root of the base
|
|
|
|
// document for anything, I believe this is a valid assumption ( as much as
|
|
|
|
// I could check anyway )
|
|
|
|
|
2013-01-18 09:18:17 +02:00
|
|
|
void lcl_uglyHackToStoreDialogeEmbedImages( const Reference< XStorageBasedLibraryContainer >& xDlgCont, const Reference< XStorage >& xStorage, const Reference< XModel >& rxModel, const Reference<XComponentContext >& rxContext ) throw ( RuntimeException )
|
2011-08-22 15:41:30 +01:00
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
Sequence< OUString > sLibraries = xDlgCont->getElementNames();
|
|
|
|
Reference< XStorage > xTmpPic = xStorage->openStorageElement( "tempPictures", ElementModes::READWRITE );
|
2011-08-22 15:41:30 +01:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
std::vector< OUString > vEmbedImgUrls;
|
2011-08-22 15:41:30 +01:00
|
|
|
for ( sal_Int32 i=0; i < sLibraries.getLength(); ++i )
|
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString sLibrary( sLibraries[ i ] );
|
2011-08-22 15:41:30 +01:00
|
|
|
xDlgCont->loadLibrary( sLibrary );
|
|
|
|
Reference< XNameContainer > xLib;
|
|
|
|
xDlgCont->getByName( sLibrary ) >>= xLib;
|
|
|
|
if ( xLib.is() )
|
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
Sequence< OUString > sDialogs = xLib->getElementNames();
|
2011-08-22 15:41:30 +01:00
|
|
|
sal_Int32 nDialogs( sDialogs.getLength() );
|
|
|
|
for ( sal_Int32 j=0; j < nDialogs; ++j )
|
|
|
|
{
|
2013-01-18 09:18:17 +02:00
|
|
|
Reference < awt::XDialogProvider > xDlgPrv = awt::DialogProvider::createWithModel(rxContext, rxModel);
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString sDialogUrl = "vnd.sun.star.script:";
|
|
|
|
sDialogUrl = sDialogUrl.concat( sLibraries[ i ] ).concat( "." ).concat ( sDialogs[ j ] ).concat( "?location=document" );
|
2011-08-22 15:41:30 +01:00
|
|
|
|
|
|
|
Reference< ::com::sun::star::awt::XControl > xDialog( xDlgPrv->createDialog( sDialogUrl ), UNO_QUERY );
|
2011-10-26 13:31:46 +03:00
|
|
|
Reference< XInterface > xModel( xDialog->getModel() );
|
2011-08-22 15:41:30 +01:00
|
|
|
GraphicObject::InspectForGraphicObjectImageURL( xModel, vEmbedImgUrls );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// if we have any image urls, make sure we copy the associated images into tempPictures
|
2011-09-01 21:33:22 +02:00
|
|
|
if ( !vEmbedImgUrls.empty() )
|
2011-08-22 15:41:30 +01:00
|
|
|
{
|
|
|
|
// Export the images to the storage
|
2013-01-18 09:18:17 +02:00
|
|
|
Reference< XGraphicObjectResolver > xGraphicResolver = GraphicObjectResolver::createWithStorage(rxContext, xTmpPic);
|
2013-01-08 19:46:57 -02:00
|
|
|
std::vector< OUString >::iterator it = vEmbedImgUrls.begin();
|
|
|
|
std::vector< OUString >::iterator it_end = vEmbedImgUrls.end();
|
2011-08-22 15:41:30 +01:00
|
|
|
if ( xGraphicResolver.is() )
|
|
|
|
{
|
|
|
|
for ( sal_Int32 count = 0; it != it_end; ++it, ++count )
|
|
|
|
xGraphicResolver->resolveGraphicObjectURL( *it );
|
|
|
|
}
|
|
|
|
|
|
|
|
// delete old 'Pictures' storage and copy the contents of tempPictures into xStorage
|
|
|
|
xStorage->removeElement( sPictures );
|
|
|
|
xTmpPic->copyElementTo( sPictures, xStorage, sPictures );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// clean up an existing Pictures dir
|
|
|
|
if ( xStorage->isStorageElement( sPictures ) )
|
|
|
|
xStorage->removeElement( sPictures );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
void ODatabaseDocument::impl_setInitialized()
|
|
|
|
{
|
|
|
|
m_eInitState = Initialized;
|
|
|
|
|
|
|
|
// start event notifications
|
|
|
|
m_aEventNotifier.onDocumentInitialized();
|
|
|
|
}
|
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
void ODatabaseDocument::impl_reset_nothrow()
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2004-11-17 13:43:36 +00:00
|
|
|
try
|
|
|
|
{
|
2005-03-10 15:33:50 +00:00
|
|
|
m_pImpl->clearConnections();
|
|
|
|
m_pImpl->disposeStorages();
|
2008-03-06 16:58:17 +00:00
|
|
|
m_pImpl->resetRootStroage();
|
2004-12-03 13:34:06 +00:00
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
clearObjectContainer( m_xForms );
|
|
|
|
clearObjectContainer( m_xReports );
|
|
|
|
clearObjectContainer( m_pImpl->m_xTableDefinitions );
|
|
|
|
clearObjectContainer( m_pImpl->m_xCommandDefinitions );
|
2004-11-17 13:43:36 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
m_eInitState = NotInitialized;
|
|
|
|
|
2007-07-24 11:04:32 +00:00
|
|
|
m_pImpl->reset();
|
2004-11-17 13:43:36 +00:00
|
|
|
}
|
|
|
|
catch(const Exception&)
|
|
|
|
{
|
2007-11-21 14:37:45 +00:00
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
2004-11-17 13:43:36 +00:00
|
|
|
}
|
2005-03-10 15:33:50 +00:00
|
|
|
m_pImpl->m_bDocumentReadOnly = sal_False;
|
2008-03-06 16:58:17 +00:00
|
|
|
}
|
2004-11-17 13:43:36 +00:00
|
|
|
|
2013-03-19 13:08:47 +02:00
|
|
|
void ODatabaseDocument::impl_import_nolck_throw( const Reference< XComponentContext >& _rContext, const Reference< XInterface >& _rxTargetComponent,
|
2009-04-24 18:34:24 +00:00
|
|
|
const ::comphelper::NamedValueCollection& _rResource )
|
2008-03-06 16:58:17 +00:00
|
|
|
{
|
2010-01-29 13:54:37 +01:00
|
|
|
Sequence< Any > aFilterCreationArgs;
|
2008-10-16 06:57:26 +00:00
|
|
|
Reference< XStatusIndicator > xStatusIndicator;
|
2010-01-29 13:54:37 +01:00
|
|
|
lcl_extractAndStartStatusIndicator( _rResource, xStatusIndicator, aFilterCreationArgs );
|
2004-11-17 13:43:36 +00:00
|
|
|
|
2008-11-19 17:43:08 +00:00
|
|
|
/** property map for import info set */
|
|
|
|
comphelper::PropertyMapEntry aExportInfoMap[] =
|
2008-12-01 12:31:27 +00:00
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
{ MAP_LEN( "BaseURI"), 0,&::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 },
|
|
|
|
{ MAP_LEN( "StreamName"), 0,&::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 },
|
2008-12-01 12:31:27 +00:00
|
|
|
{ NULL, 0, 0, NULL, 0, 0 }
|
|
|
|
};
|
|
|
|
uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) );
|
2013-01-08 19:46:57 -02:00
|
|
|
xInfoSet->setPropertyValue("BaseURI", uno::makeAny(_rResource.getOrDefault("URL",OUString())));
|
|
|
|
xInfoSet->setPropertyValue("StreamName", uno::makeAny(OUString("content.xml")));
|
2008-11-19 17:43:08 +00:00
|
|
|
|
2010-01-29 13:54:37 +01:00
|
|
|
const sal_Int32 nCount = aFilterCreationArgs.getLength();
|
|
|
|
aFilterCreationArgs.realloc(nCount + 1);
|
|
|
|
aFilterCreationArgs[nCount] <<= xInfoSet;
|
2008-11-19 17:43:08 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
Reference< XImporter > xImporter(
|
2013-03-19 13:08:47 +02:00
|
|
|
_rContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.comp.sdb.DBFilter", aFilterCreationArgs, _rContext),
|
2009-04-24 18:34:24 +00:00
|
|
|
UNO_QUERY_THROW );
|
2004-11-17 13:43:36 +00:00
|
|
|
|
2009-04-24 18:34:24 +00:00
|
|
|
Reference< XComponent > xComponent( _rxTargetComponent, UNO_QUERY_THROW );
|
2008-10-16 06:57:26 +00:00
|
|
|
xImporter->setTargetDocument( xComponent );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
Reference< XFilter > xFilter( xImporter, UNO_QUERY_THROW );
|
2010-01-29 13:54:37 +01:00
|
|
|
Sequence< PropertyValue > aFilterArgs( ODatabaseModelImpl::stripLoadArguments( _rResource ).getPropertyValues() );
|
|
|
|
xFilter->filter( aFilterArgs );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( xStatusIndicator.is() )
|
|
|
|
xStatusIndicator->end();
|
2008-03-06 16:58:17 +00:00
|
|
|
}
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::initNew( ) throw (DoubleInitializationException, IOException, Exception, RuntimeException)
|
2008-03-06 16:58:17 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
// SYNCHRONIZED ->
|
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::InitMethod );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
impl_reset_nothrow();
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
impl_setInitializing();
|
|
|
|
|
|
|
|
// create a temporary storage
|
2013-03-19 13:08:47 +02:00
|
|
|
Reference< XStorage > xTempStor( ::comphelper::OStorageHelper::GetTemporaryStorage( m_pImpl->m_aContext ) );
|
2008-10-16 06:57:26 +00:00
|
|
|
|
|
|
|
// store therein
|
2009-04-24 18:34:24 +00:00
|
|
|
impl_storeToStorage_throw( xTempStor, Sequence< PropertyValue >(), aGuard );
|
2008-10-16 06:57:26 +00:00
|
|
|
|
|
|
|
// let the impl know we're now based on this storage
|
|
|
|
m_pImpl->switchToStorage( xTempStor );
|
|
|
|
|
2009-04-24 18:34:24 +00:00
|
|
|
// for the newly created document, allow document-wide scripting
|
|
|
|
m_bAllowDocumentScripting = true;
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
impl_setInitialized();
|
|
|
|
|
|
|
|
m_aEventNotifier.notifyDocumentEventAsync( "OnTitleChanged" );
|
|
|
|
|
|
|
|
impl_setModified_nothrow( sal_False, aGuard );
|
|
|
|
// <- SYNCHRONIZED
|
|
|
|
|
|
|
|
m_aEventNotifier.notifyDocumentEvent( "OnCreate" );
|
|
|
|
|
|
|
|
impl_notifyStorageChange_nolck_nothrow( xTempStor );
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL ODatabaseDocument::load( const Sequence< PropertyValue >& _Arguments ) throw (DoubleInitializationException, IOException, Exception, RuntimeException)
|
|
|
|
{
|
|
|
|
// SYNCHRONIZED ->
|
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::InitMethod );
|
|
|
|
|
|
|
|
impl_reset_nothrow();
|
|
|
|
|
|
|
|
::comphelper::NamedValueCollection aResource( _Arguments );
|
2008-12-01 12:31:27 +00:00
|
|
|
if ( aResource.has( "FileName" ) && !aResource.has( "URL" ) )
|
|
|
|
// FileName is the compatibility name for URL, so we might have clients passing
|
|
|
|
// a FileName only. However, some of our code works with the URL only, so ensure
|
|
|
|
// we have one.
|
|
|
|
aResource.put( "URL", aResource.get( "FileName" ) );
|
|
|
|
if ( aResource.has( "URL" ) && !aResource.has( "FileName" ) )
|
|
|
|
// similar ... just in case there is legacy code which expects a FileName only
|
|
|
|
aResource.put( "FileName", aResource.get( "URL" ) );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-05-05 14:50:07 +00:00
|
|
|
// now that somebody (perhaps) told us an macro execution mode, remember it as
|
|
|
|
// ImposedMacroExecMode
|
|
|
|
m_pImpl->setImposedMacroExecMode(
|
2008-06-06 13:02:08 +00:00
|
|
|
aResource.getOrDefault( "MacroExecutionMode", m_pImpl->getImposedMacroExecMode() ) );
|
2008-05-05 14:50:07 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
impl_setInitializing();
|
|
|
|
try
|
|
|
|
{
|
2009-04-24 18:34:24 +00:00
|
|
|
aGuard.clear();
|
|
|
|
impl_import_nolck_throw( m_pImpl->m_aContext, *this, aResource );
|
|
|
|
aGuard.reset();
|
2008-10-16 06:57:26 +00:00
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
impl_reset_nothrow();
|
|
|
|
throw;
|
|
|
|
}
|
|
|
|
// tell our view monitor that the document has been loaded - this way it will fire the proper
|
2009-04-24 18:34:24 +00:00
|
|
|
// event (OnLoad instead of OnCreate) later on
|
2008-10-16 06:57:26 +00:00
|
|
|
m_aViewMonitor.onLoadedDocument();
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// note that we do *not* call impl_setInitialized() here: The initialization is only complete
|
|
|
|
// when the XModel::attachResource has been called, not sooner.
|
|
|
|
|
|
|
|
impl_setModified_nothrow( sal_False, aGuard );
|
|
|
|
// <- SYNCHRONIZED
|
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2010-01-12 23:32:12 +01:00
|
|
|
namespace
|
autorecovery: define a new css.document.XDocumentRecovery interface, implement it in both SFX and DBACCESS, and use it in the autorecovery
In this course, the auto recovery learned to restore multiple views of a document. Also, in the course of the change,
the LoadDispatchListener became superfluous, and was removed.
Also, the loader code in dbaccess was slightly adjusted, since now the connectController call is in the responsibility
of the loader, and must not happen inside the XController::attachModel call anymore. This change made the
ModelControllerConnector class superfluous, so it has been removed, too.
2010-01-05 22:32:38 +01:00
|
|
|
{
|
2010-01-12 23:32:12 +01:00
|
|
|
bool lcl_hasAnyModifiedSubComponent_throw( const Reference< XController >& i_rController )
|
|
|
|
{
|
|
|
|
Reference< XDatabaseDocumentUI > xDatabaseUI( i_rController, UNO_QUERY_THROW );
|
|
|
|
|
2010-01-13 15:46:51 +01:00
|
|
|
Sequence< Reference< XComponent > > aComponents( xDatabaseUI->getSubComponents() );
|
|
|
|
const Reference< XComponent >* component = aComponents.getConstArray();
|
|
|
|
const Reference< XComponent >* componentsEnd = aComponents.getConstArray() + aComponents.getLength();
|
2010-01-12 23:32:12 +01:00
|
|
|
|
|
|
|
bool isAnyModified = false;
|
2010-01-13 15:46:51 +01:00
|
|
|
for ( ; component != componentsEnd; ++component )
|
2010-01-12 23:32:12 +01:00
|
|
|
{
|
2010-01-13 15:46:51 +01:00
|
|
|
Reference< XModifiable > xModify( *component, UNO_QUERY );
|
2010-01-12 23:32:12 +01:00
|
|
|
if ( xModify.is() )
|
|
|
|
{
|
|
|
|
isAnyModified = xModify->isModified();
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
// TODO: clarify: anything else to care for? Both the sub componbents with and without model
|
|
|
|
// should support the XModifiable interface, so I think nothing more is needed here.
|
2011-03-12 11:27:59 +01:00
|
|
|
OSL_FAIL( "lcl_hasAnyModifiedSubComponent_throw: anything left to do here?" );
|
2010-01-12 23:32:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return isAnyModified;
|
|
|
|
}
|
autorecovery: define a new css.document.XDocumentRecovery interface, implement it in both SFX and DBACCESS, and use it in the autorecovery
In this course, the auto recovery learned to restore multiple views of a document. Also, in the course of the change,
the LoadDispatchListener became superfluous, and was removed.
Also, the loader code in dbaccess was slightly adjusted, since now the connectController call is in the responsibility
of the loader, and must not happen inside the XController::attachModel call anymore. This change made the
ModelControllerConnector class superfluous, so it has been removed, too.
2010-01-05 22:32:38 +01:00
|
|
|
}
|
|
|
|
|
2010-01-12 23:32:12 +01:00
|
|
|
::sal_Bool SAL_CALL ODatabaseDocument::wasModifiedSinceLastSave() throw ( RuntimeException )
|
autorecovery: define a new css.document.XDocumentRecovery interface, implement it in both SFX and DBACCESS, and use it in the autorecovery
In this course, the auto recovery learned to restore multiple views of a document. Also, in the course of the change,
the LoadDispatchListener became superfluous, and was removed.
Also, the loader code in dbaccess was slightly adjusted, since now the connectController call is in the responsibility
of the loader, and must not happen inside the XController::attachModel call anymore. This change made the
ModelControllerConnector class superfluous, so it has been removed, too.
2010-01-05 22:32:38 +01:00
|
|
|
{
|
2010-01-12 23:32:12 +01:00
|
|
|
DocumentGuard aGuard( *this );
|
|
|
|
|
|
|
|
// The implementation here is somewhat sloppy, in that it returns whether *any* part of the whole
|
2010-01-25 09:56:57 +01:00
|
|
|
// database document, including opened sub components, is modified. This is more than what is requested:
|
2010-01-12 23:32:12 +01:00
|
|
|
// We need to return <TRUE/> if the doc itself, or any of the opened sub components, has been modified
|
|
|
|
// since the last call to any of the save* methods, or since the document has been loaded/created.
|
|
|
|
// However, the API definition explicitly allows to be that sloppy ...
|
|
|
|
|
|
|
|
if ( isModified() )
|
|
|
|
return sal_True;
|
|
|
|
|
|
|
|
// auto recovery is an "UI feature", it is to restore the UI the user knows. Thus,
|
|
|
|
// we ask our connected controllers, not simply our existing form/report definitions.
|
|
|
|
// (There is some information which even cannot be obtained without asking the controller.
|
|
|
|
// For instance, newly created, but not yet saved, forms/reports are acessible via the
|
|
|
|
// controller only, but not via the model.)
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
for ( Controllers::const_iterator ctrl = m_aControllers.begin();
|
|
|
|
ctrl != m_aControllers.end();
|
|
|
|
++ctrl
|
|
|
|
)
|
|
|
|
{
|
|
|
|
if ( lcl_hasAnyModifiedSubComponent_throw( *ctrl ) )
|
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
|
|
|
}
|
|
|
|
|
|
|
|
return sal_False;
|
|
|
|
}
|
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
void SAL_CALL ODatabaseDocument::storeToRecoveryFile( const OUString& i_TargetLocation, const Sequence< PropertyValue >& i_MediaDescriptor ) throw ( RuntimeException, IOException, WrappedTargetException )
|
2010-01-12 23:32:12 +01:00
|
|
|
{
|
|
|
|
DocumentGuard aGuard( *this );
|
|
|
|
ModifyLock aLock( *this );
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
// create a storage for the target location
|
|
|
|
Reference< XStorage > xTargetStorage( impl_createStorageFor_throw( i_TargetLocation ) );
|
|
|
|
|
|
|
|
// first store the document as a whole into this storage
|
|
|
|
impl_storeToStorage_throw( xTargetStorage, i_MediaDescriptor, aGuard );
|
|
|
|
|
2010-01-13 15:46:51 +01:00
|
|
|
// save the sub components which need saving
|
2010-01-14 15:10:17 +01:00
|
|
|
DatabaseDocumentRecovery aDocRecovery( m_pImpl->m_aContext);
|
|
|
|
aDocRecovery.saveModifiedSubComponents( xTargetStorage, m_aControllers );
|
2010-01-12 23:32:12 +01:00
|
|
|
|
|
|
|
// commit the root storage
|
2010-01-13 15:46:51 +01:00
|
|
|
tools::stor::commitStorageIfWriteable( xTargetStorage );
|
2010-01-12 23:32:12 +01:00
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
Any aError = ::cppu::getCaughtException();
|
|
|
|
if ( aError.isExtractableTo( ::cppu::UnoType< IOException >::get() )
|
|
|
|
|| aError.isExtractableTo( ::cppu::UnoType< RuntimeException >::get() )
|
2010-01-13 15:46:51 +01:00
|
|
|
|| aError.isExtractableTo( ::cppu::UnoType< WrappedTargetException >::get() )
|
2010-01-12 23:32:12 +01:00
|
|
|
)
|
|
|
|
{
|
|
|
|
// allowed to leave
|
|
|
|
throw;
|
|
|
|
}
|
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
throw WrappedTargetException( OUString(), *this, aError );
|
2010-01-12 23:32:12 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
void SAL_CALL ODatabaseDocument::recoverFromFile( const OUString& i_SourceLocation, const OUString& i_SalvagedFile, const Sequence< PropertyValue >& i_MediaDescriptor ) throw ( RuntimeException, IOException, WrappedTargetException )
|
2010-01-12 23:32:12 +01:00
|
|
|
{
|
2010-01-14 15:10:17 +01:00
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::InitMethod );
|
2010-02-15 16:05:58 +01:00
|
|
|
|
2011-12-19 18:10:37 -02:00
|
|
|
if ( i_SourceLocation.isEmpty() )
|
2013-01-08 19:46:57 -02:00
|
|
|
throw IllegalArgumentException( OUString(), *this, 1 );
|
2010-02-15 16:05:58 +01:00
|
|
|
|
2010-01-14 15:10:17 +01:00
|
|
|
try
|
|
|
|
{
|
|
|
|
// load the document itself, by simply delegating to our "load" method
|
|
|
|
|
|
|
|
// our load implementation expects the SalvagedFile and URL to be in the media descriptor
|
|
|
|
::comphelper::NamedValueCollection aMediaDescriptor( i_MediaDescriptor );
|
|
|
|
aMediaDescriptor.put( "SalvagedFile", i_SalvagedFile );
|
|
|
|
aMediaDescriptor.put( "URL", i_SourceLocation );
|
autorecovery: define a new css.document.XDocumentRecovery interface, implement it in both SFX and DBACCESS, and use it in the autorecovery
In this course, the auto recovery learned to restore multiple views of a document. Also, in the course of the change,
the LoadDispatchListener became superfluous, and was removed.
Also, the loader code in dbaccess was slightly adjusted, since now the connectController call is in the responsibility
of the loader, and must not happen inside the XController::attachModel call anymore. This change made the
ModelControllerConnector class superfluous, so it has been removed, too.
2010-01-05 22:32:38 +01:00
|
|
|
|
2010-01-14 15:10:17 +01:00
|
|
|
aGuard.clear(); // (load has an own guarding scheme)
|
|
|
|
load( aMediaDescriptor.getPropertyValues() );
|
autorecovery: define a new css.document.XDocumentRecovery interface, implement it in both SFX and DBACCESS, and use it in the autorecovery
In this course, the auto recovery learned to restore multiple views of a document. Also, in the course of the change,
the LoadDispatchListener became superfluous, and was removed.
Also, the loader code in dbaccess was slightly adjusted, since now the connectController call is in the responsibility
of the loader, and must not happen inside the XController::attachModel call anymore. This change made the
ModelControllerConnector class superfluous, so it has been removed, too.
2010-01-05 22:32:38 +01:00
|
|
|
|
2010-01-14 15:10:17 +01:00
|
|
|
// Without a controller, we are unable to recover the sub components, as they're always tied to a controller.
|
|
|
|
// So, everything else is done when the first controller is connected.
|
|
|
|
m_bHasBeenRecovered = true;
|
2010-01-28 22:19:50 +01:00
|
|
|
|
2010-02-15 16:05:58 +01:00
|
|
|
// tell the impl that we've been loaded from the given location
|
|
|
|
m_pImpl->setDocFileLocation( i_SourceLocation );
|
|
|
|
|
2010-01-28 22:19:50 +01:00
|
|
|
// by definition (of XDocumentRecovery), we're responsible for delivering a fully-initialized document,
|
|
|
|
// which includes an attachResource call.
|
2013-01-08 19:46:57 -02:00
|
|
|
const OUString sLogicalDocumentURL( i_SalvagedFile.isEmpty() ? i_SourceLocation : i_SalvagedFile );
|
2010-02-22 10:16:39 +01:00
|
|
|
impl_attachResource( sLogicalDocumentURL, aMediaDescriptor.getPropertyValues(), aGuard );
|
2010-01-28 22:19:50 +01:00
|
|
|
// <- SYNCHRONIZED
|
2010-01-14 15:10:17 +01:00
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
Any aError = ::cppu::getCaughtException();
|
|
|
|
if ( aError.isExtractableTo( ::cppu::UnoType< IOException >::get() )
|
|
|
|
|| aError.isExtractableTo( ::cppu::UnoType< RuntimeException >::get() )
|
|
|
|
|| aError.isExtractableTo( ::cppu::UnoType< WrappedTargetException >::get() )
|
|
|
|
)
|
|
|
|
{
|
|
|
|
// allowed to leave
|
|
|
|
throw;
|
|
|
|
}
|
2010-01-12 23:32:12 +01:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
throw WrappedTargetException( OUString(), *this, aError );
|
2010-01-14 15:10:17 +01:00
|
|
|
}
|
autorecovery: define a new css.document.XDocumentRecovery interface, implement it in both SFX and DBACCESS, and use it in the autorecovery
In this course, the auto recovery learned to restore multiple views of a document. Also, in the course of the change,
the LoadDispatchListener became superfluous, and was removed.
Also, the loader code in dbaccess was slightly adjusted, since now the connectController call is in the responsibility
of the loader, and must not happen inside the XController::attachModel call anymore. This change made the
ModelControllerConnector class superfluous, so it has been removed, too.
2010-01-05 22:32:38 +01:00
|
|
|
}
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// XModel
|
2013-01-08 19:46:57 -02:00
|
|
|
sal_Bool SAL_CALL ODatabaseDocument::attachResource( const OUString& _rURL, const Sequence< PropertyValue >& _rArguments ) throw (RuntimeException)
|
2008-10-16 06:57:26 +00:00
|
|
|
{
|
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
|
2010-01-28 22:19:50 +01:00
|
|
|
return impl_attachResource( _rURL, _rArguments, aGuard );
|
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
sal_Bool ODatabaseDocument::impl_attachResource( const OUString& i_rLogicalDocumentURL,
|
2010-02-15 16:05:58 +01:00
|
|
|
const Sequence< PropertyValue >& i_rMediaDescriptor, DocumentGuard& _rDocGuard )
|
2010-01-28 22:19:50 +01:00
|
|
|
{
|
2010-02-15 16:05:58 +01:00
|
|
|
if ( ( i_rLogicalDocumentURL == getURL() )
|
2010-01-28 22:19:50 +01:00
|
|
|
&& ( i_rMediaDescriptor.getLength() == 1 )
|
|
|
|
&& ( i_rMediaDescriptor[0].Name.compareToAscii( "BreakMacroSignature" ) == 0 )
|
2008-10-16 06:57:26 +00:00
|
|
|
)
|
2005-03-10 15:33:50 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
// this is a BAD hack of the Basic importer code ... there should be a dedicated API for this,
|
|
|
|
// not this bad mis-using of existing interfaces
|
2008-03-06 16:58:17 +00:00
|
|
|
return sal_False;
|
2008-10-16 06:57:26 +00:00
|
|
|
// (we do not support macro signatures, so we can ignore this call)
|
|
|
|
}
|
|
|
|
|
2010-02-15 16:05:58 +01:00
|
|
|
// if no URL has been provided, the caller was lazy enough to not call our getURL - which is not allowed anymore,
|
|
|
|
// now since getURL and getLocation both return the same, so calling one of those should be simple.
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString sDocumentURL( i_rLogicalDocumentURL );
|
2011-12-19 18:10:37 -02:00
|
|
|
OSL_ENSURE( !sDocumentURL.isEmpty(), "ODatabaseDocument::impl_attachResource: invalid URL!" );
|
|
|
|
if ( sDocumentURL.isEmpty() )
|
2010-02-15 16:05:58 +01:00
|
|
|
sDocumentURL = getURL();
|
2010-01-27 11:50:04 +01:00
|
|
|
|
2010-02-15 16:05:58 +01:00
|
|
|
m_pImpl->setResource( sDocumentURL, i_rMediaDescriptor );
|
2008-10-16 06:57:26 +00:00
|
|
|
|
|
|
|
if ( impl_isInitializing() )
|
|
|
|
{ // this means we've just been loaded, and this is the attachResource call which follows
|
|
|
|
// the load call.
|
|
|
|
impl_setInitialized();
|
2009-04-24 18:34:24 +00:00
|
|
|
|
|
|
|
// determine whether the document as a whole, or sub documents, have macros. Especially the latter
|
|
|
|
// controls the availability of our XEmbeddedScripts and XScriptInvocationContext interfaces, and we
|
|
|
|
// should know this before anybody actually uses the object.
|
|
|
|
m_bAllowDocumentScripting = ( m_pImpl->determineEmbeddedMacros() != ODatabaseModelImpl::eSubDocumentMacros );
|
|
|
|
|
2010-01-28 22:19:50 +01:00
|
|
|
_rDocGuard.clear();
|
CWS-TOOLING: integrate CWS dba32h
2009-10-12 12:21:44 +0200 msc r276827 : remove warning for issue 102712 because the issue is fixed
2009-10-05 07:14:20 +0200 oj r276658 : #105585# add missing dependency for OOO_UI
2009-10-02 12:50:19 +0200 fs r276632 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 12:46:12 +0200 fs r276631 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 13:09:07 +0200 fs r276596 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 12:35:56 +0200 fs r276589 : #i105509# don't rely on default form component names, use indexes
2009-10-01 11:19:18 +0200 fs r276584 : copying the fix for #i105082# into this CWS
2009-10-01 11:13:22 +0200 fs r276583 : improved logs
2009-10-01 11:10:44 +0200 fs r276581 : #i105505#
2009-10-01 08:07:57 +0200 fs r276575 : manual merge of trunk, to allow cwslocalize to run
2009-09-30 22:48:30 +0200 fs r276574 : removed that strange ONLOAD definition
2009-09-30 12:58:18 +0200 fs r276553 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 12:56:45 +0200 fs r276552 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 11:47:45 +0200 fs r276549 : #i105235#
2009-09-29 12:27:40 +0200 fs r276521 : #i105367#
2009-09-28 12:08:17 +0200 oj r276485 : #i105371# export version in manifest.xml as well
2009-09-28 12:07:02 +0200 oj r276484 : #i105371# export version in manifest.xml as well
2009-09-28 09:48:01 +0200 oj r276481 : #i105366# init drivers when not empty
2009-09-25 14:31:27 +0200 fs r276466 : CWS-TOOLING: rebase CWS dba32h to trunk@276429 (milestone: DEV300:m60)
2009-09-24 13:52:54 +0200 fs r276422 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 11:42:03 +0200 fs r276413 : #i105234# proper zoom handling for the nav bar
2009-09-24 11:41:40 +0200 fs r276412 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-23 12:21:22 +0200 oj r276377 : remove dos lineends
2009-09-23 11:44:52 +0200 oj r276376 : #i105216# load config on demand
2009-09-23 11:44:19 +0200 oj r276375 : #i105216# load config on demand
2009-09-23 11:43:35 +0200 oj r276374 : #i105216# load config on demand
2009-09-21 09:13:03 +0200 oj r276307 : #i105158# use Thread support
2009-09-18 13:06:50 +0200 fs r276277 : #i105147#
2009-09-18 11:48:23 +0200 oj r276271 : #i105158# new method for thread safety
2009-09-18 10:42:56 +0200 fs r276266 : CWS-TOOLING: rebase CWS dba32h to trunk@276192 (milestone: DEV300:m59)
2009-09-18 08:30:03 +0200 oj r276263 : #i105016# load correct ldap so
2009-09-17 13:42:31 +0200 oj r276240 : change count of check boxes
2009-09-17 13:32:59 +0200 oj r276239 : revert false to true for currency
2009-09-17 09:14:46 +0200 oj r276220 : #i104901# add patch for every issue
2009-09-17 09:10:29 +0200 oj r276219 : #i104901# add patch for every issue
2009-09-11 13:47:49 +0200 oj r276060 : #i104901# fix for indentity
2009-09-11 12:14:14 +0200 fs r276056 : #i104594# allow to render controls without an SdrPageView
2009-09-11 11:49:31 +0200 fs r276055 : CWS-TOOLING: rebase CWS dba32h to trunk@276043 (milestone: DEV300:m58)
2009-09-10 08:41:40 +0200 oj r276021 : #i104911# export variable-set not for repeating sections
2009-10-14 18:48:09 +00:00
|
|
|
// <- SYNCHRONIZED
|
2008-10-16 06:57:26 +00:00
|
|
|
m_aEventNotifier.notifyDocumentEvent( "OnLoadFinished" );
|
2005-03-10 15:33:50 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2004-08-02 14:09:11 +00:00
|
|
|
return sal_True;
|
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString SAL_CALL ODatabaseDocument::getURL( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
|
2008-03-06 16:58:17 +00:00
|
|
|
return m_pImpl->getURL();
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
Sequence< PropertyValue > SAL_CALL ODatabaseDocument::getArgs( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
|
2010-01-29 13:54:37 +01:00
|
|
|
return m_pImpl->getMediaDescriptor().getPropertyValues();
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::connectController( const Reference< XController >& _xController ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2007-11-21 14:37:45 +00:00
|
|
|
|
autorecovery: define a new css.document.XDocumentRecovery interface, implement it in both SFX and DBACCESS, and use it in the autorecovery
In this course, the auto recovery learned to restore multiple views of a document. Also, in the course of the change,
the LoadDispatchListener became superfluous, and was removed.
Also, the loader code in dbaccess was slightly adjusted, since now the connectController call is in the responsibility
of the loader, and must not happen inside the XController::attachModel call anymore. This change made the
ModelControllerConnector class superfluous, so it has been removed, too.
2010-01-05 22:32:38 +01:00
|
|
|
#if OSL_DEBUG_LEVEL > 0
|
|
|
|
for ( Controllers::const_iterator controller = m_aControllers.begin();
|
|
|
|
controller != m_aControllers.end();
|
|
|
|
++controller
|
|
|
|
)
|
|
|
|
{
|
|
|
|
OSL_ENSURE( *controller != _xController, "ODatabaseDocument::connectController: this controller is already connected!" );
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2007-07-24 11:04:32 +00:00
|
|
|
m_aControllers.push_back( _xController );
|
2007-11-21 14:37:45 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
m_aEventNotifier.notifyDocumentEventAsync( "OnViewCreated", Reference< XController2 >( _xController, UNO_QUERY ) );
|
|
|
|
|
|
|
|
bool bFirstControllerEver = m_aViewMonitor.onControllerConnected( _xController );
|
|
|
|
if ( !bFirstControllerEver )
|
2008-03-06 16:58:17 +00:00
|
|
|
return;
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// check/adjust our macro mode.
|
2008-03-06 16:58:17 +00:00
|
|
|
m_pImpl->checkMacrosOnLoading();
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::disconnectController( const Reference< XController >& _xController ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
bool bNotifyViewClosed = false;
|
|
|
|
bool bLastControllerGone = false;
|
|
|
|
bool bIsClosing = false;
|
|
|
|
|
|
|
|
// SYNCHRONIZED ->
|
|
|
|
{
|
|
|
|
DocumentGuard aGuard( *this );
|
|
|
|
|
|
|
|
Controllers::iterator pos = ::std::find( m_aControllers.begin(), m_aControllers.end(), _xController );
|
|
|
|
OSL_ENSURE( pos != m_aControllers.end(), "ODatabaseDocument::disconnectController: don't know this controller!" );
|
|
|
|
if ( pos != m_aControllers.end() )
|
|
|
|
{
|
|
|
|
m_aControllers.erase( pos );
|
|
|
|
bNotifyViewClosed = true;
|
|
|
|
}
|
2005-03-30 10:55:24 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( m_xCurrentController == _xController )
|
|
|
|
m_xCurrentController = NULL;
|
2006-12-01 16:29:18 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
bLastControllerGone = m_aControllers.empty();
|
|
|
|
bIsClosing = m_bClosing;
|
|
|
|
}
|
|
|
|
// <- SYNCHRONIZED
|
2006-03-29 11:33:47 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( bNotifyViewClosed )
|
|
|
|
m_aEventNotifier.notifyDocumentEvent( "OnViewClosed", Reference< XController2 >( _xController, UNO_QUERY ) );
|
2007-11-21 14:37:45 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( bLastControllerGone && !bIsClosing )
|
|
|
|
{
|
2006-03-29 11:33:47 +00:00
|
|
|
// if this was the last view, close the document as a whole
|
2011-02-27 22:55:22 +01:00
|
|
|
// #i51157#
|
2006-03-29 11:33:47 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
close( sal_True );
|
|
|
|
}
|
|
|
|
catch( const CloseVetoException& )
|
|
|
|
{
|
|
|
|
// okay, somebody vetoed and took ownership
|
|
|
|
}
|
|
|
|
}
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::lockControllers( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2005-03-30 10:55:24 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
++m_pImpl->m_nControllerLockCount;
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::unlockControllers( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2005-03-10 15:33:50 +00:00
|
|
|
|
|
|
|
--m_pImpl->m_nControllerLockCount;
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
sal_Bool SAL_CALL ODatabaseDocument::hasControllersLocked( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2005-03-10 15:33:50 +00:00
|
|
|
|
|
|
|
return m_pImpl->m_nControllerLockCount != 0;
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
Reference< XController > SAL_CALL ODatabaseDocument::getCurrentController() throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2005-03-10 15:33:50 +00:00
|
|
|
|
2007-07-24 11:04:32 +00:00
|
|
|
return m_xCurrentController.is() ? m_xCurrentController : ( m_aControllers.empty() ? Reference< XController >() : *m_aControllers.begin() );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::setCurrentController( const Reference< XController >& _xController ) throw (NoSuchElementException, RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2005-03-10 15:33:50 +00:00
|
|
|
|
2007-07-24 11:04:32 +00:00
|
|
|
m_xCurrentController = _xController;
|
2008-10-16 06:57:26 +00:00
|
|
|
|
2010-02-16 15:31:07 +01:00
|
|
|
if ( !m_aViewMonitor.onSetCurrentController( _xController ) )
|
|
|
|
return;
|
|
|
|
|
|
|
|
// check if there are sub components to recover from our document storage
|
|
|
|
bool bAttemptRecovery = m_bHasBeenRecovered;
|
|
|
|
if ( !bAttemptRecovery && m_pImpl->getMediaDescriptor().has( "ForceRecovery" ) )
|
|
|
|
// do not use getOrDefault, it will throw for invalid types, which is not desired here
|
|
|
|
m_pImpl->getMediaDescriptor().get( "ForceRecovery" ) >>= bAttemptRecovery;
|
|
|
|
|
|
|
|
if ( !bAttemptRecovery )
|
|
|
|
return;
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
DatabaseDocumentRecovery aDocRecovery( m_pImpl->m_aContext );
|
|
|
|
aDocRecovery.recoverSubDocuments( m_pImpl->getRootStorage(), _xController );
|
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
|
|
|
}
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2010-02-16 15:31:07 +01:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
Reference< XInterface > SAL_CALL ODatabaseDocument::getCurrentSelection( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2004-08-02 14:09:11 +00:00
|
|
|
|
|
|
|
Reference< XInterface > xRet;
|
|
|
|
Reference< XSelectionSupplier > xDocView( getCurrentController(), UNO_QUERY );
|
|
|
|
if ( xDocView.is() )
|
|
|
|
xRet.set(xDocView->getSelection(),UNO_QUERY);
|
|
|
|
|
|
|
|
return xRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
// XStorable
|
2005-03-10 15:33:50 +00:00
|
|
|
sal_Bool SAL_CALL ODatabaseDocument::hasLocation( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2011-12-19 18:10:37 -02:00
|
|
|
return !getLocation().isEmpty();
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString SAL_CALL ODatabaseDocument::getLocation( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
|
2010-02-15 16:05:58 +01:00
|
|
|
return m_pImpl->getURL();
|
|
|
|
// both XStorable::getLocation and XModel::getURL have to return the URL of the document, *not*
|
|
|
|
// the location of the file which the docunment was possibly recovered from (which would be getDocFileLocation)
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
sal_Bool SAL_CALL ODatabaseDocument::isReadonly( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
|
2005-03-10 15:33:50 +00:00
|
|
|
return m_pImpl->m_bDocumentReadOnly;
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::store( ) throw (IOException, RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2005-03-10 15:33:50 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString sDocumentURL( m_pImpl->getURL() );
|
2011-12-19 18:10:37 -02:00
|
|
|
if ( !sDocumentURL.isEmpty() )
|
2010-02-02 10:49:34 +01:00
|
|
|
{
|
|
|
|
if ( m_pImpl->getDocFileLocation() == m_pImpl->getURL() )
|
|
|
|
if ( m_pImpl->m_bDocumentReadOnly )
|
|
|
|
throw IOException();
|
|
|
|
|
|
|
|
impl_storeAs_throw( m_pImpl->getURL(), m_pImpl->getMediaDescriptor(), SAVE, aGuard );
|
|
|
|
return;
|
|
|
|
}
|
2005-02-02 13:01:30 +00:00
|
|
|
|
2010-02-02 10:49:34 +01:00
|
|
|
// if we have no URL, but did survive the DocumentGuard above, then we've been inited via XLoadable::initNew,
|
|
|
|
// i.e. we're based on a temporary storage
|
2011-12-19 18:10:37 -02:00
|
|
|
OSL_ENSURE( m_pImpl->getDocFileLocation().isEmpty(), "ODatabaseDocument::store: unexpected URL inconsistency!" );
|
2010-02-02 10:49:34 +01:00
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
impl_storeToStorage_throw( m_pImpl->getRootStorage(), m_pImpl->getMediaDescriptor().getPropertyValues(), aGuard );
|
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
Any aError = ::cppu::getCaughtException();
|
|
|
|
if ( aError.isExtractableTo( ::cppu::UnoType< IOException >::get() )
|
|
|
|
|| aError.isExtractableTo( ::cppu::UnoType< RuntimeException >::get() )
|
|
|
|
)
|
|
|
|
{
|
|
|
|
// allowed to leave
|
|
|
|
throw;
|
|
|
|
}
|
2013-01-08 19:46:57 -02:00
|
|
|
impl_throwIOExceptionCausedBySave_throw( aError, OUString() );
|
2010-02-02 10:49:34 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
void ODatabaseDocument::impl_throwIOExceptionCausedBySave_throw( const Any& i_rError, const OUString& i_rTargetURL ) const
|
2010-02-02 10:49:34 +01:00
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString sErrorMessage = extractExceptionMessage( m_pImpl->m_aContext, i_rError );
|
2010-02-02 10:49:34 +01:00
|
|
|
sErrorMessage = ResourceManager::loadString(
|
|
|
|
RID_STR_ERROR_WHILE_SAVING,
|
|
|
|
"$location$", i_rTargetURL,
|
|
|
|
"$message$", sErrorMessage
|
|
|
|
);
|
|
|
|
throw IOException( sErrorMessage, *const_cast< ODatabaseDocument* >( this ) );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comphelper::NamedValueCollection& _rArguments,
|
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
|
|
|
const StoreType _eType, DocumentGuard& _rGuard ) throw ( IOException, RuntimeException )
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
OSL_PRECOND( ( _eType == SAVE ) || ( _eType == SAVE_AS ),
|
|
|
|
"ODatabaseDocument::impl_storeAs_throw: you introduced a new type which cannot be handled here!" );
|
|
|
|
|
|
|
|
// if we're in the process of initializing the document (which effectively means it is an implicit
|
|
|
|
// initialization triggered in storeAsURL), the we do not notify events, since to an observer, the SaveAs
|
|
|
|
// should not be noticable
|
|
|
|
bool bIsInitializationProcess = impl_isInitializing();
|
|
|
|
|
|
|
|
if ( !bIsInitializationProcess )
|
|
|
|
{
|
|
|
|
_rGuard.clear();
|
|
|
|
m_aEventNotifier.notifyDocumentEvent( _eType == SAVE ? "OnSave" : "OnSaveAs", NULL, makeAny( _rURL ) );
|
|
|
|
_rGuard.reset();
|
|
|
|
}
|
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
Reference< XStorage > xNewRootStorage;
|
|
|
|
// will be non-NULL if our storage changed
|
2004-08-02 14:09:11 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
try
|
2006-01-03 15:14:40 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
ModifyLock aLock( *this );
|
|
|
|
// ignore all changes of our "modified" state during storing
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
sal_Bool bLocationChanged = ( _rURL != m_pImpl->getDocFileLocation() );
|
|
|
|
if ( bLocationChanged )
|
|
|
|
{
|
|
|
|
// create storage for target URL
|
|
|
|
Reference< XStorage > xTargetStorage( impl_createStorageFor_throw( _rURL ) );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( m_pImpl->isEmbeddedDatabase() )
|
|
|
|
m_pImpl->clearConnections();
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// commit everything
|
|
|
|
m_pImpl->commitEmbeddedStorage();
|
|
|
|
m_pImpl->commitStorages();
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// copy own storage to target storage
|
|
|
|
Reference< XStorage > xCurrentStorage( m_pImpl->getRootStorage() );
|
|
|
|
if ( xCurrentStorage.is() )
|
|
|
|
xCurrentStorage->copyToStorage( xTargetStorage );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
m_pImpl->disposeStorages();
|
2005-03-30 10:55:24 +00:00
|
|
|
|
2010-02-10 11:29:34 +01:00
|
|
|
// each and every document definition obtained via m_xForms and m_xReports depends
|
|
|
|
// on the sub storages which we just disposed. So, dispose the forms/reports collections, too.
|
|
|
|
// This ensures that they're re-created when needed.
|
|
|
|
clearObjectContainer( m_xForms );
|
|
|
|
clearObjectContainer( m_xReports );
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
xNewRootStorage = m_pImpl->switchToStorage( xTargetStorage );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
m_pImpl->m_bDocumentReadOnly = sal_False;
|
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// store to current storage
|
|
|
|
Reference< XStorage > xCurrentStorage( m_pImpl->getOrCreateRootStorage(), UNO_QUERY_THROW );
|
|
|
|
Sequence< PropertyValue > aMediaDescriptor( lcl_appendFileNameToDescriptor( _rArguments, _rURL ) );
|
2009-04-24 18:34:24 +00:00
|
|
|
impl_storeToStorage_throw( xCurrentStorage, aMediaDescriptor, _rGuard );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// success - tell our impl
|
2010-02-15 16:05:58 +01:00
|
|
|
m_pImpl->setDocFileLocation( _rURL );
|
|
|
|
m_pImpl->setResource( _rURL, aMediaDescriptor );
|
2004-08-02 14:09:11 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// if we are in an initialization process, then this is finished, now that we stored the document
|
|
|
|
if ( bIsInitializationProcess )
|
|
|
|
impl_setInitialized();
|
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
|
|
|
Any aError = ::cppu::getCaughtException();
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// notify the failure
|
|
|
|
if ( !bIsInitializationProcess )
|
|
|
|
m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? "OnSaveFailed" : "OnSaveAsFailed", NULL, makeAny( _rURL ) );
|
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
|
|
|
|
|
|
|
if ( aError.isExtractableTo( ::cppu::UnoType< IOException >::get() )
|
|
|
|
|| aError.isExtractableTo( ::cppu::UnoType< RuntimeException >::get() )
|
|
|
|
)
|
|
|
|
{
|
|
|
|
// allowed to leave
|
|
|
|
throw;
|
|
|
|
}
|
|
|
|
|
2010-02-02 10:49:34 +01:00
|
|
|
impl_throwIOExceptionCausedBySave_throw( aError, _rURL );
|
2008-10-16 06:57:26 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
// notify the document event
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( !bIsInitializationProcess )
|
|
|
|
m_aEventNotifier.notifyDocumentEventAsync( _eType == SAVE ? "OnSaveDone" : "OnSaveAsDone", NULL, makeAny( _rURL ) );
|
|
|
|
|
|
|
|
// reset our "modified" flag, and clear the guard
|
|
|
|
impl_setModified_nothrow( sal_False, _rGuard );
|
|
|
|
// <- SYNCHRONIZED
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
// notify storage listeners
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( xNewRootStorage.is() )
|
|
|
|
impl_notifyStorageChange_nolck_nothrow( xNewRootStorage );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
Reference< XStorage > ODatabaseDocument::impl_createStorageFor_throw( const OUString& _rURL ) const
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2013-03-19 13:08:47 +02:00
|
|
|
Reference< ucb::XSimpleFileAccess3 > xTempAccess(ucb::SimpleFileAccess::create(m_pImpl->m_aContext));
|
2009-10-23 07:04:02 +02:00
|
|
|
Reference< io::XStream > xStream = xTempAccess->openFileReadWrite( _rURL );
|
|
|
|
Reference< io::XTruncate > xTruncate(xStream,UNO_QUERY);
|
|
|
|
if ( xTruncate.is() )
|
|
|
|
{
|
|
|
|
xTruncate->truncate();
|
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
Sequence<Any> aParam(2);
|
2009-10-23 07:04:02 +02:00
|
|
|
aParam[0] <<= xStream;
|
2008-03-06 16:58:17 +00:00
|
|
|
aParam[1] <<= ElementModes::READWRITE | ElementModes::TRUNCATE;
|
|
|
|
|
2008-06-06 13:02:08 +00:00
|
|
|
Reference< XSingleServiceFactory > xStorageFactory( m_pImpl->createStorageFactory(), UNO_SET_THROW );
|
|
|
|
return Reference< XStorage >( xStorageFactory->createInstanceWithArguments( aParam ), UNO_QUERY_THROW );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2005-12-21 12:34:54 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
void SAL_CALL ODatabaseDocument::storeAsURL( const OUString& _rURL, const Sequence< PropertyValue >& _rArguments ) throw (IOException, RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
// SYNCHRONIZED ->
|
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
|
|
|
|
|
|
|
|
// Normally, a document initialization is done via XLoadable::load or XLoadable::initNew. For convenience
|
|
|
|
// reasons, and to not break existing API clients, it's allowed to call storeAsURL without having initialized
|
|
|
|
// the document, in which case the initialization will be done implicitly.
|
|
|
|
bool bImplicitInitialization = !impl_isInitialized();
|
|
|
|
// implicit initialization while another initialization is just running is not possible
|
|
|
|
if ( bImplicitInitialization && impl_isInitializing() )
|
|
|
|
throw DoubleInitializationException();
|
2005-03-10 15:33:50 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( bImplicitInitialization )
|
|
|
|
impl_setInitializing();
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
impl_storeAs_throw( _rURL, _rArguments, SAVE_AS, aGuard );
|
|
|
|
// <- SYNCHRONIZED
|
|
|
|
|
|
|
|
// impl_storeAs_throw cleared the lock on our mutex, but the below lines need this lock
|
|
|
|
// SYNCHRONIZED ->
|
|
|
|
aGuard.reset();
|
|
|
|
|
|
|
|
// our title might have changed, potentially at least
|
|
|
|
// Sadly, we cannot check this: Calling getTitle here and now would not deliver
|
|
|
|
// an up-to-date result, as the call is delegated to our TitleHelper instance, which itself
|
|
|
|
// updates its title only if it gets the OnSaveAsDone event (which was sent asynchronously
|
|
|
|
// by impl_storeAs_throw). So, we simply notify always, and also asynchronously
|
|
|
|
m_aEventNotifier.notifyDocumentEventAsync( "OnTitleChanged" );
|
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
impl_reset_nothrow();
|
|
|
|
throw;
|
|
|
|
}
|
2009-04-24 18:34:24 +00:00
|
|
|
|
|
|
|
if ( bImplicitInitialization )
|
|
|
|
m_bAllowDocumentScripting = true;
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
aGuard.clear();
|
|
|
|
// <- SYNCHRONIZED
|
|
|
|
|
|
|
|
if ( bImplicitInitialization )
|
|
|
|
m_aEventNotifier.notifyDocumentEvent( "OnCreate" );
|
2008-03-06 16:58:17 +00:00
|
|
|
}
|
2004-08-02 14:09:11 +00:00
|
|
|
|
2009-04-24 18:34:24 +00:00
|
|
|
void ODatabaseDocument::impl_storeToStorage_throw( const Reference< XStorage >& _rxTargetStorage, const Sequence< PropertyValue >& _rMediaDescriptor,
|
|
|
|
DocumentGuard& _rDocGuard ) const
|
2008-03-06 16:58:17 +00:00
|
|
|
{
|
|
|
|
if ( !_rxTargetStorage.is() )
|
2013-01-08 19:46:57 -02:00
|
|
|
throw IllegalArgumentException( OUString(), *const_cast< ODatabaseDocument* >( this ), 1 );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
if ( !m_pImpl.is() )
|
2013-01-08 19:46:57 -02:00
|
|
|
throw DisposedException( OUString(), *const_cast< ODatabaseDocument* >( this ) );
|
2005-03-30 10:55:24 +00:00
|
|
|
|
|
|
|
try
|
|
|
|
{
|
2008-03-06 16:58:17 +00:00
|
|
|
// commit everything
|
|
|
|
m_pImpl->commitEmbeddedStorage();
|
|
|
|
m_pImpl->commitStorages();
|
|
|
|
|
|
|
|
// copy own storage to target storage
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( impl_isInitialized() )
|
|
|
|
{
|
|
|
|
Reference< XStorage > xCurrentStorage( m_pImpl->getOrCreateRootStorage(), UNO_QUERY_THROW );
|
|
|
|
if ( xCurrentStorage != _rxTargetStorage )
|
|
|
|
xCurrentStorage->copyToStorage( _rxTargetStorage );
|
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
// write into target storage
|
2008-03-11 08:43:41 +00:00
|
|
|
::comphelper::NamedValueCollection aWriteArgs( _rMediaDescriptor );
|
2009-04-24 18:34:24 +00:00
|
|
|
lcl_triggerStatusIndicator_throw( aWriteArgs, _rDocGuard, true );
|
|
|
|
impl_writeStorage_throw( _rxTargetStorage, aWriteArgs );
|
|
|
|
lcl_triggerStatusIndicator_throw( aWriteArgs, _rDocGuard, false );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
// commit target storage
|
2010-01-13 15:46:51 +01:00
|
|
|
OSL_VERIFY( tools::stor::commitStorageIfWriteable( _rxTargetStorage ) );
|
2005-03-30 10:55:24 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
catch( const IOException& ) { throw; }
|
|
|
|
catch( const RuntimeException& ) { throw; }
|
|
|
|
catch ( const Exception& e )
|
2005-03-30 10:55:24 +00:00
|
|
|
{
|
2008-03-06 16:58:17 +00:00
|
|
|
throw IOException( e.Message, *const_cast< ODatabaseDocument* >( this ) );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
void SAL_CALL ODatabaseDocument::storeToURL( const OUString& _rURL, const Sequence< PropertyValue >& _rArguments ) throw (IOException, RuntimeException)
|
2008-03-06 16:58:17 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-03-06 16:58:17 +00:00
|
|
|
ModifyLock aLock( *this );
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
{
|
|
|
|
aGuard.clear();
|
|
|
|
m_aEventNotifier.notifyDocumentEvent( "OnSaveTo", NULL, makeAny( _rURL ) );
|
|
|
|
aGuard.reset();
|
|
|
|
}
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
// create storage for target URL
|
|
|
|
Reference< XStorage > xTargetStorage( impl_createStorageFor_throw( _rURL ) );
|
|
|
|
|
|
|
|
// extend media descriptor with URL
|
|
|
|
Sequence< PropertyValue > aMediaDescriptor( lcl_appendFileNameToDescriptor( _rArguments, _rURL ) );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// store to this storage
|
2009-04-24 18:34:24 +00:00
|
|
|
impl_storeToStorage_throw( xTargetStorage, aMediaDescriptor, aGuard );
|
2008-10-16 06:57:26 +00:00
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
|
|
|
Any aError = ::cppu::getCaughtException();
|
|
|
|
m_aEventNotifier.notifyDocumentEventAsync( "OnSaveToFailed", NULL, aError );
|
|
|
|
|
|
|
|
if ( aError.isExtractableTo( ::cppu::UnoType< IOException >::get() )
|
|
|
|
|| aError.isExtractableTo( ::cppu::UnoType< RuntimeException >::get() )
|
|
|
|
)
|
|
|
|
{
|
|
|
|
// allowed to leave
|
|
|
|
throw;
|
|
|
|
}
|
|
|
|
|
2010-02-02 10:49:34 +01:00
|
|
|
impl_throwIOExceptionCausedBySave_throw( aError, _rURL );
|
2008-10-16 06:57:26 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
m_aEventNotifier.notifyDocumentEventAsync( "OnSaveToDone", NULL, makeAny( _rURL ) );
|
2008-03-06 16:58:17 +00:00
|
|
|
}
|
|
|
|
|
2004-08-02 14:09:11 +00:00
|
|
|
// XModifyBroadcaster
|
2005-03-10 15:33:50 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::addModifyListener( const Reference< XModifyListener >& _xListener ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2004-08-02 14:09:11 +00:00
|
|
|
m_aModifyListeners.addInterface(_xListener);
|
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::removeModifyListener( const Reference< XModifyListener >& _xListener ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2004-08-02 14:09:11 +00:00
|
|
|
m_aModifyListeners.removeInterface(_xListener);
|
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2004-08-02 14:09:11 +00:00
|
|
|
// XModifiable
|
2005-03-10 15:33:50 +00:00
|
|
|
sal_Bool SAL_CALL ODatabaseDocument::isModified( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2005-03-10 15:33:50 +00:00
|
|
|
|
|
|
|
return m_pImpl->m_bModified;
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::setModified( sal_Bool _bModified ) throw (PropertyVetoException, RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
|
|
|
|
if ( impl_isInitialized() )
|
|
|
|
impl_setModified_nothrow( _bModified, aGuard );
|
|
|
|
// it's allowed to call setModified without the document being initialized already. In this case,
|
|
|
|
// we simply ignore the call - when the initialization is finished, the respective code will set
|
|
|
|
// a proper "modified" flag
|
2007-09-26 13:39:51 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
void ODatabaseDocument::impl_setModified_nothrow( sal_Bool _bModified, DocumentGuard& _rGuard )
|
2007-09-26 13:39:51 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
// SYNCHRONIZED ->
|
|
|
|
bool bModifiedChanged = ( m_pImpl->m_bModified != _bModified ) && ( !m_pImpl->isModifyLocked() );
|
2005-12-21 12:34:54 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( bModifiedChanged )
|
|
|
|
{
|
|
|
|
m_pImpl->m_bModified = _bModified;
|
|
|
|
m_aEventNotifier.notifyDocumentEventAsync( "OnModifyChanged" );
|
|
|
|
}
|
2007-09-26 13:39:51 +00:00
|
|
|
_rGuard.clear();
|
2008-10-16 06:57:26 +00:00
|
|
|
// <- SYNCHRONIZED
|
2005-12-21 12:34:54 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( bModifiedChanged )
|
|
|
|
{
|
|
|
|
lang::EventObject aEvent( *this );
|
|
|
|
m_aModifyListeners.notifyEach( &XModifyListener::modified, aEvent );
|
|
|
|
}
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2005-12-21 12:34:54 +00:00
|
|
|
|
2008-04-04 13:32:17 +00:00
|
|
|
// ::com::sun::star::document::XEventBroadcaster
|
2008-10-16 06:57:26 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::addEventListener(const uno::Reference< document::XEventListener >& _Listener ) throw (uno::RuntimeException)
|
|
|
|
{
|
|
|
|
m_aEventNotifier.addLegacyEventListener( _Listener );
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL ODatabaseDocument::removeEventListener( const uno::Reference< document::XEventListener >& _Listener ) throw (uno::RuntimeException)
|
|
|
|
{
|
|
|
|
m_aEventNotifier.removeLegacyEventListener( _Listener );
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL ODatabaseDocument::addDocumentEventListener( const Reference< XDocumentEventListener >& _Listener ) throw (RuntimeException)
|
2005-03-04 08:44:36 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
m_aEventNotifier.addDocumentEventListener( _Listener );
|
2005-03-04 08:44:36 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::removeDocumentEventListener( const Reference< XDocumentEventListener >& _Listener ) throw (RuntimeException)
|
2005-03-04 08:44:36 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
m_aEventNotifier.removeDocumentEventListener( _Listener );
|
2005-03-04 08:44:36 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
void SAL_CALL ODatabaseDocument::notifyDocumentEvent( const OUString& _EventName, const Reference< XController2 >& _ViewController, const Any& _Supplement ) throw (IllegalArgumentException, NoSupportException, RuntimeException)
|
2005-03-04 08:44:36 +00:00
|
|
|
{
|
2011-12-19 18:10:37 -02:00
|
|
|
if ( _EventName.isEmpty() )
|
2013-01-08 19:46:57 -02:00
|
|
|
throw IllegalArgumentException( OUString(), *this, 1 );
|
2008-10-16 06:57:26 +00:00
|
|
|
|
|
|
|
// SYNCHRONIZED ->
|
|
|
|
DocumentGuard aGuard( *this );
|
|
|
|
|
|
|
|
if ( !DocumentEvents::needsSynchronousNotification( _EventName ) )
|
|
|
|
{
|
|
|
|
m_aEventNotifier.notifyDocumentEventAsync( _EventName, _ViewController, _Supplement );
|
|
|
|
return;
|
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
aGuard.clear();
|
2008-10-16 06:57:26 +00:00
|
|
|
// <- SYNCHRONIZED
|
|
|
|
|
|
|
|
m_aEventNotifier.notifyDocumentEvent( _EventName, _ViewController, _Supplement );
|
2005-03-04 08:44:36 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
Sequence< PropertyValue > SAL_CALL ODatabaseDocument::getPrinter( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2011-02-25 17:47:41 +01:00
|
|
|
OSL_FAIL( "ODatabaseDocument::getPrinter: not supported!" );
|
2004-08-02 14:09:11 +00:00
|
|
|
return Sequence< PropertyValue >();
|
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2006-06-20 01:44:17 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::setPrinter( const Sequence< PropertyValue >& /*aPrinter*/ ) throw (IllegalArgumentException, RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2011-02-25 17:47:41 +01:00
|
|
|
OSL_FAIL( "ODatabaseDocument::setPrinter: not supported!" );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2006-06-20 01:44:17 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::print( const Sequence< PropertyValue >& /*xOptions*/ ) throw (IllegalArgumentException, RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2011-02-25 17:47:41 +01:00
|
|
|
OSL_FAIL( "ODatabaseDocument::print: not supported!" );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2006-02-07 09:18:42 +00:00
|
|
|
void ODatabaseDocument::impl_reparent_nothrow( const WeakReference< XNameAccess >& _rxContainer )
|
|
|
|
{
|
|
|
|
Reference< XChild > xChild( _rxContainer.get(), UNO_QUERY );
|
|
|
|
if ( xChild.is() )
|
|
|
|
xChild->setParent( *this );
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2006-04-19 12:18:41 +00:00
|
|
|
void ODatabaseDocument::clearObjectContainer( WeakReference< XNameAccess >& _rxContainer)
|
2006-02-07 09:18:42 +00:00
|
|
|
{
|
|
|
|
Reference< XNameAccess > xContainer = _rxContainer;
|
|
|
|
::comphelper::disposeComponent( xContainer );
|
|
|
|
|
2006-04-19 12:18:41 +00:00
|
|
|
Reference< XChild > xChild( _rxContainer.get(),UNO_QUERY );
|
|
|
|
if ( xChild.is() )
|
|
|
|
xChild->setParent( NULL );
|
2013-06-04 17:16:58 +02:00
|
|
|
_rxContainer.clear();
|
2006-02-07 09:18:42 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2006-02-07 09:18:42 +00:00
|
|
|
Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( ODatabaseModelImpl::ObjectType _eType )
|
|
|
|
{
|
|
|
|
if ( ( _eType != ODatabaseModelImpl::E_FORM ) && ( _eType != ODatabaseModelImpl::E_REPORT ) )
|
|
|
|
throw IllegalArgumentException();
|
|
|
|
|
|
|
|
bool bFormsContainer = _eType == ODatabaseModelImpl::E_FORM;
|
|
|
|
|
|
|
|
WeakReference< XNameAccess >& rContainerRef( bFormsContainer ? m_xForms : m_xReports );
|
|
|
|
Reference< XNameAccess > xContainer = rContainerRef;
|
|
|
|
if ( !xContainer.is() )
|
|
|
|
{
|
2009-12-16 12:46:33 +01:00
|
|
|
Any aValue;
|
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xMy(*this);
|
2010-02-10 13:08:22 +01:00
|
|
|
if ( dbtools::getDataSourceSetting(xMy,bFormsContainer ? "Forms" : "Reports",aValue) )
|
2009-12-16 12:46:33 +01:00
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString sSupportService;
|
2009-12-16 12:46:33 +01:00
|
|
|
aValue >>= sSupportService;
|
2011-12-19 18:10:37 -02:00
|
|
|
if ( !sSupportService.isEmpty() )
|
2009-12-16 12:46:33 +01:00
|
|
|
{
|
|
|
|
Sequence<Any> aArgs(1);
|
2013-01-08 19:46:57 -02:00
|
|
|
aArgs[0] <<= NamedValue("DatabaseDocument",makeAny(xMy));
|
2013-03-19 13:08:47 +02:00
|
|
|
xContainer.set(
|
|
|
|
m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(sSupportService, aArgs, m_pImpl->m_aContext),
|
|
|
|
UNO_QUERY);
|
2009-12-16 12:46:33 +01:00
|
|
|
rContainerRef = xContainer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( !xContainer.is() )
|
|
|
|
{
|
|
|
|
TContentPtr& rContainerData( m_pImpl->getObjectContainer( _eType ) );
|
2013-03-19 13:08:47 +02:00
|
|
|
rContainerRef = xContainer = new ODocumentContainer( m_pImpl->m_aContext, *this, rContainerData, bFormsContainer );
|
2009-12-16 12:46:33 +01:00
|
|
|
}
|
2006-02-07 09:18:42 +00:00
|
|
|
impl_reparent_nothrow( xContainer );
|
|
|
|
}
|
|
|
|
return xContainer;
|
|
|
|
}
|
2007-07-24 11:04:32 +00:00
|
|
|
|
2008-09-04 06:35:42 +00:00
|
|
|
void ODatabaseDocument::impl_closeControllerFrames_nolck_throw( sal_Bool _bDeliverOwnership )
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2007-07-24 11:04:32 +00:00
|
|
|
Controllers aCopy = m_aControllers;
|
2005-09-23 11:04:55 +00:00
|
|
|
|
2009-07-03 12:24:35 +00:00
|
|
|
Controllers::iterator aEnd = aCopy.end();
|
|
|
|
for ( Controllers::iterator aIter = aCopy.begin(); aIter != aEnd ; ++aIter )
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2007-07-24 11:04:32 +00:00
|
|
|
if ( !aIter->is() )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
try
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2007-07-24 11:04:32 +00:00
|
|
|
Reference< XCloseable> xFrame( (*aIter)->getFrame(), UNO_QUERY );
|
|
|
|
if ( xFrame.is() )
|
|
|
|
xFrame->close( _bDeliverOwnership );
|
|
|
|
}
|
|
|
|
catch( const CloseVetoException& ) { throw; }
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
|
|
|
}
|
2005-09-23 11:04:55 +00:00
|
|
|
}
|
|
|
|
|
2007-07-24 11:04:32 +00:00
|
|
|
struct DisposeControllerFrame : public ::std::unary_function< Reference< XController >, void >
|
|
|
|
{
|
|
|
|
void operator()( const Reference< XController >& _rxController ) const
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
if ( !_rxController.is() )
|
|
|
|
return;
|
|
|
|
|
|
|
|
Reference< XFrame > xFrame( _rxController->getFrame() );
|
|
|
|
::comphelper::disposeComponent( xFrame );
|
|
|
|
}
|
|
|
|
catch( const Exception& )
|
|
|
|
{
|
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
void ODatabaseDocument::impl_disposeControllerFrames_nothrow()
|
|
|
|
{
|
|
|
|
Controllers aCopy;
|
|
|
|
aCopy.swap( m_aControllers ); // ensure m_aControllers is empty afterwards
|
|
|
|
::std::for_each( aCopy.begin(), aCopy.end(), DisposeControllerFrame() );
|
|
|
|
}
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::close( sal_Bool _bDeliverOwnership ) throw (CloseVetoException, RuntimeException)
|
2005-09-23 11:04:55 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
// nearly everything below can/must be done without our mutex locked, the below is just for
|
|
|
|
// the checks for being disposed and the like
|
|
|
|
// SYNCHRONIZED ->
|
|
|
|
{
|
|
|
|
DocumentGuard aGuard( *this );
|
|
|
|
m_bClosing = true;
|
|
|
|
}
|
|
|
|
// <- SYNCHRONIZED
|
2005-09-23 11:04:55 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
// allow listeners to veto
|
|
|
|
lang::EventObject aEvent( *this );
|
|
|
|
m_aCloseListener.forEach< XCloseListener >(
|
|
|
|
boost::bind( &XCloseListener::queryClosing, _1, boost::cref( aEvent ), boost::cref( _bDeliverOwnership ) ) );
|
2005-09-23 11:04:55 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// notify that we're going to unload
|
|
|
|
m_aEventNotifier.notifyDocumentEvent( "OnPrepareUnload" );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
impl_closeControllerFrames_nolck_throw( _bDeliverOwnership );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
m_aCloseListener.notifyEach( &XCloseListener::notifyClosing, (const lang::EventObject&)aEvent );
|
|
|
|
|
|
|
|
dispose();
|
|
|
|
}
|
|
|
|
catch ( const Exception& )
|
|
|
|
{
|
2008-12-01 12:31:27 +00:00
|
|
|
::osl::MutexGuard aGuard( m_aMutex );
|
2008-10-16 06:57:26 +00:00
|
|
|
m_bClosing = false;
|
|
|
|
throw;
|
|
|
|
}
|
2005-09-23 11:04:55 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// SYNCHRONIZED ->
|
2008-12-01 12:31:27 +00:00
|
|
|
::osl::MutexGuard aGuard( m_aMutex );
|
2008-10-16 06:57:26 +00:00
|
|
|
m_bClosing = false;
|
|
|
|
// <- SYNCHRONIZED
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::addCloseListener( const Reference< ::com::sun::star::util::XCloseListener >& Listener ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2004-10-22 07:58:51 +00:00
|
|
|
m_aCloseListener.addInterface(Listener);
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::removeCloseListener( const Reference< ::com::sun::star::util::XCloseListener >& Listener ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2005-03-10 15:33:50 +00:00
|
|
|
m_aCloseListener.removeInterface(Listener);
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
Reference< XNameAccess > SAL_CALL ODatabaseDocument::getFormDocuments( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
|
2006-02-07 09:18:42 +00:00
|
|
|
return impl_getDocumentContainer_throw( ODatabaseModelImpl::E_FORM );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
Reference< XNameAccess > SAL_CALL ODatabaseDocument::getReportDocuments( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
|
2006-02-07 09:18:42 +00:00
|
|
|
return impl_getDocumentContainer_throw( ODatabaseModelImpl::E_REPORT );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
void ODatabaseDocument::WriteThroughComponent( const Reference< XComponent >& xComponent, const sal_Char* pStreamName,
|
|
|
|
const sal_Char* pServiceName, const Sequence< Any >& _rArguments, const Sequence< PropertyValue >& rMediaDesc,
|
|
|
|
const Reference<XStorage>& _xStorageToSaveTo ) const
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-03-06 16:58:17 +00:00
|
|
|
OSL_ENSURE( pStreamName, "Need stream name!" );
|
|
|
|
OSL_ENSURE( pServiceName, "Need service name!" );
|
2004-08-02 14:09:11 +00:00
|
|
|
|
|
|
|
// open stream
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString sStreamName = OUString::createFromAscii( pStreamName );
|
2008-03-06 16:58:17 +00:00
|
|
|
Reference< XStream > xStream = _xStorageToSaveTo->openStreamElement( sStreamName, ElementModes::READWRITE | ElementModes::TRUNCATE );
|
2004-08-02 14:09:11 +00:00
|
|
|
if ( !xStream.is() )
|
2008-03-06 16:58:17 +00:00
|
|
|
return;
|
2004-08-02 14:09:11 +00:00
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
Reference< XOutputStream > xOutputStream( xStream->getOutputStream() );
|
|
|
|
OSL_ENSURE( xOutputStream.is(), "Can't create output stream in package!" );
|
|
|
|
if ( !xOutputStream.is() )
|
|
|
|
return;
|
2004-08-02 14:09:11 +00:00
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
Reference< XSeekable > xSeek( xOutputStream, UNO_QUERY );
|
2004-08-02 14:09:11 +00:00
|
|
|
if ( xSeek.is() )
|
|
|
|
xSeek->seek(0);
|
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
Reference< XPropertySet > xStreamProp( xOutputStream, UNO_QUERY_THROW );
|
2013-01-08 19:46:57 -02:00
|
|
|
xStreamProp->setPropertyValue( INFO_MEDIATYPE, makeAny( OUString( "text/xml" ) ) );
|
|
|
|
xStreamProp->setPropertyValue( "Compressed", makeAny( (sal_Bool)sal_True ) );
|
2004-08-02 14:09:11 +00:00
|
|
|
|
|
|
|
// write the stuff
|
2008-03-06 16:58:17 +00:00
|
|
|
WriteThroughComponent( xOutputStream, xComponent, pServiceName, _rArguments, rMediaDesc );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
void ODatabaseDocument::WriteThroughComponent( const Reference< XOutputStream >& xOutputStream,
|
|
|
|
const Reference< XComponent >& xComponent, const sal_Char* pServiceName, const Sequence< Any >& _rArguments,
|
|
|
|
const Sequence< PropertyValue >& rMediaDesc ) const
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
|
|
|
OSL_ENSURE( xOutputStream.is(), "I really need an output stream!" );
|
|
|
|
OSL_ENSURE( xComponent.is(), "Need component!" );
|
|
|
|
OSL_ENSURE( NULL != pServiceName, "Need component name!" );
|
|
|
|
|
|
|
|
// get component
|
2013-03-19 13:08:47 +02:00
|
|
|
Reference< XWriter > xSaxWriter = xml::sax::Writer::create( m_pImpl->m_aContext );
|
2004-08-02 14:09:11 +00:00
|
|
|
|
|
|
|
// connect XML writer to output stream
|
|
|
|
xSaxWriter->setOutputStream( xOutputStream );
|
|
|
|
|
|
|
|
// prepare arguments (prepend doc handler to given arguments)
|
2008-03-06 16:58:17 +00:00
|
|
|
Reference< XDocumentHandler > xDocHandler( xSaxWriter,UNO_QUERY);
|
|
|
|
Sequence<Any> aArgs( 1 + _rArguments.getLength() );
|
2004-08-02 14:09:11 +00:00
|
|
|
aArgs[0] <<= xDocHandler;
|
2008-03-06 16:58:17 +00:00
|
|
|
for ( sal_Int32 i = 0; i < _rArguments.getLength(); ++i )
|
|
|
|
aArgs[ i+1 ] = _rArguments[i];
|
2004-08-02 14:09:11 +00:00
|
|
|
|
|
|
|
// get filter component
|
2013-03-19 13:08:47 +02:00
|
|
|
Reference< XExporter > xExporter( m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(OUString::createFromAscii(pServiceName), aArgs, m_pImpl->m_aContext), UNO_QUERY_THROW );
|
2004-08-02 14:09:11 +00:00
|
|
|
|
|
|
|
// connect model and filter
|
|
|
|
xExporter->setSourceDocument( xComponent );
|
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
// filter
|
|
|
|
Reference< XFilter > xFilter( xExporter, UNO_QUERY_THROW );
|
|
|
|
xFilter->filter( rMediaDesc );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2009-04-24 18:34:24 +00:00
|
|
|
void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _rxTargetStorage, const ::comphelper::NamedValueCollection& _rMediaDescriptor ) const
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-03-06 16:58:17 +00:00
|
|
|
// extract status indicator
|
2005-03-30 10:55:24 +00:00
|
|
|
Sequence< Any > aDelegatorArguments;
|
2009-04-24 18:34:24 +00:00
|
|
|
lcl_extractStatusIndicator( _rMediaDescriptor, aDelegatorArguments );
|
2004-08-02 14:09:11 +00:00
|
|
|
|
2008-10-01 12:28:29 +00:00
|
|
|
/** property map for export info set */
|
|
|
|
comphelper::PropertyMapEntry aExportInfoMap[] =
|
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
{ MAP_LEN( "BaseURI"), 0,&::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 },
|
|
|
|
{ MAP_LEN( "StreamName"), 0,&::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 },
|
2008-12-01 12:31:27 +00:00
|
|
|
{ MAP_LEN( "UsePrettyPrinting" ), 0, &::getCppuType((sal_Bool*)0), beans::PropertyAttribute::MAYBEVOID, 0},
|
2008-10-01 12:28:29 +00:00
|
|
|
{ NULL, 0, 0, NULL, 0, 0 }
|
|
|
|
};
|
|
|
|
uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) );
|
|
|
|
|
|
|
|
SvtSaveOptions aSaveOpt;
|
2013-01-08 19:46:57 -02:00
|
|
|
xInfoSet->setPropertyValue("UsePrettyPrinting", uno::makeAny(aSaveOpt.IsPrettyPrinting()));
|
2008-12-01 12:31:27 +00:00
|
|
|
if ( aSaveOpt.IsSaveRelFSys() )
|
2013-01-08 19:46:57 -02:00
|
|
|
xInfoSet->setPropertyValue("BaseURI", uno::makeAny(_rMediaDescriptor.getOrDefault("URL",OUString())));
|
2008-12-01 12:31:27 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString aVersion;
|
CWS-TOOLING: integrate CWS dba32h
2009-10-12 12:21:44 +0200 msc r276827 : remove warning for issue 102712 because the issue is fixed
2009-10-05 07:14:20 +0200 oj r276658 : #105585# add missing dependency for OOO_UI
2009-10-02 12:50:19 +0200 fs r276632 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 12:46:12 +0200 fs r276631 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 13:09:07 +0200 fs r276596 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 12:35:56 +0200 fs r276589 : #i105509# don't rely on default form component names, use indexes
2009-10-01 11:19:18 +0200 fs r276584 : copying the fix for #i105082# into this CWS
2009-10-01 11:13:22 +0200 fs r276583 : improved logs
2009-10-01 11:10:44 +0200 fs r276581 : #i105505#
2009-10-01 08:07:57 +0200 fs r276575 : manual merge of trunk, to allow cwslocalize to run
2009-09-30 22:48:30 +0200 fs r276574 : removed that strange ONLOAD definition
2009-09-30 12:58:18 +0200 fs r276553 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 12:56:45 +0200 fs r276552 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 11:47:45 +0200 fs r276549 : #i105235#
2009-09-29 12:27:40 +0200 fs r276521 : #i105367#
2009-09-28 12:08:17 +0200 oj r276485 : #i105371# export version in manifest.xml as well
2009-09-28 12:07:02 +0200 oj r276484 : #i105371# export version in manifest.xml as well
2009-09-28 09:48:01 +0200 oj r276481 : #i105366# init drivers when not empty
2009-09-25 14:31:27 +0200 fs r276466 : CWS-TOOLING: rebase CWS dba32h to trunk@276429 (milestone: DEV300:m60)
2009-09-24 13:52:54 +0200 fs r276422 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 11:42:03 +0200 fs r276413 : #i105234# proper zoom handling for the nav bar
2009-09-24 11:41:40 +0200 fs r276412 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-23 12:21:22 +0200 oj r276377 : remove dos lineends
2009-09-23 11:44:52 +0200 oj r276376 : #i105216# load config on demand
2009-09-23 11:44:19 +0200 oj r276375 : #i105216# load config on demand
2009-09-23 11:43:35 +0200 oj r276374 : #i105216# load config on demand
2009-09-21 09:13:03 +0200 oj r276307 : #i105158# use Thread support
2009-09-18 13:06:50 +0200 fs r276277 : #i105147#
2009-09-18 11:48:23 +0200 oj r276271 : #i105158# new method for thread safety
2009-09-18 10:42:56 +0200 fs r276266 : CWS-TOOLING: rebase CWS dba32h to trunk@276192 (milestone: DEV300:m59)
2009-09-18 08:30:03 +0200 oj r276263 : #i105016# load correct ldap so
2009-09-17 13:42:31 +0200 oj r276240 : change count of check boxes
2009-09-17 13:32:59 +0200 oj r276239 : revert false to true for currency
2009-09-17 09:14:46 +0200 oj r276220 : #i104901# add patch for every issue
2009-09-17 09:10:29 +0200 oj r276219 : #i104901# add patch for every issue
2009-09-11 13:47:49 +0200 oj r276060 : #i104901# fix for indentity
2009-09-11 12:14:14 +0200 fs r276056 : #i104594# allow to render controls without an SdrPageView
2009-09-11 11:49:31 +0200 fs r276055 : CWS-TOOLING: rebase CWS dba32h to trunk@276043 (milestone: DEV300:m58)
2009-09-10 08:41:40 +0200 oj r276021 : #i104911# export variable-set not for repeating sections
2009-10-14 18:48:09 +00:00
|
|
|
SvtSaveOptions::ODFDefaultVersion nDefVersion = aSaveOpt.GetODFDefaultVersion();
|
|
|
|
|
|
|
|
// older versions can not have this property set, it exists only starting from ODF1.2
|
|
|
|
if ( nDefVersion >= SvtSaveOptions::ODFVER_012 )
|
|
|
|
aVersion = ODFVER_012_TEXT;
|
|
|
|
|
2011-12-19 18:10:37 -02:00
|
|
|
if ( !aVersion.isEmpty() )
|
CWS-TOOLING: integrate CWS dba32h
2009-10-12 12:21:44 +0200 msc r276827 : remove warning for issue 102712 because the issue is fixed
2009-10-05 07:14:20 +0200 oj r276658 : #105585# add missing dependency for OOO_UI
2009-10-02 12:50:19 +0200 fs r276632 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 12:46:12 +0200 fs r276631 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 13:09:07 +0200 fs r276596 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 12:35:56 +0200 fs r276589 : #i105509# don't rely on default form component names, use indexes
2009-10-01 11:19:18 +0200 fs r276584 : copying the fix for #i105082# into this CWS
2009-10-01 11:13:22 +0200 fs r276583 : improved logs
2009-10-01 11:10:44 +0200 fs r276581 : #i105505#
2009-10-01 08:07:57 +0200 fs r276575 : manual merge of trunk, to allow cwslocalize to run
2009-09-30 22:48:30 +0200 fs r276574 : removed that strange ONLOAD definition
2009-09-30 12:58:18 +0200 fs r276553 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 12:56:45 +0200 fs r276552 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 11:47:45 +0200 fs r276549 : #i105235#
2009-09-29 12:27:40 +0200 fs r276521 : #i105367#
2009-09-28 12:08:17 +0200 oj r276485 : #i105371# export version in manifest.xml as well
2009-09-28 12:07:02 +0200 oj r276484 : #i105371# export version in manifest.xml as well
2009-09-28 09:48:01 +0200 oj r276481 : #i105366# init drivers when not empty
2009-09-25 14:31:27 +0200 fs r276466 : CWS-TOOLING: rebase CWS dba32h to trunk@276429 (milestone: DEV300:m60)
2009-09-24 13:52:54 +0200 fs r276422 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 11:42:03 +0200 fs r276413 : #i105234# proper zoom handling for the nav bar
2009-09-24 11:41:40 +0200 fs r276412 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-23 12:21:22 +0200 oj r276377 : remove dos lineends
2009-09-23 11:44:52 +0200 oj r276376 : #i105216# load config on demand
2009-09-23 11:44:19 +0200 oj r276375 : #i105216# load config on demand
2009-09-23 11:43:35 +0200 oj r276374 : #i105216# load config on demand
2009-09-21 09:13:03 +0200 oj r276307 : #i105158# use Thread support
2009-09-18 13:06:50 +0200 fs r276277 : #i105147#
2009-09-18 11:48:23 +0200 oj r276271 : #i105158# new method for thread safety
2009-09-18 10:42:56 +0200 fs r276266 : CWS-TOOLING: rebase CWS dba32h to trunk@276192 (milestone: DEV300:m59)
2009-09-18 08:30:03 +0200 oj r276263 : #i105016# load correct ldap so
2009-09-17 13:42:31 +0200 oj r276240 : change count of check boxes
2009-09-17 13:32:59 +0200 oj r276239 : revert false to true for currency
2009-09-17 09:14:46 +0200 oj r276220 : #i104901# add patch for every issue
2009-09-17 09:10:29 +0200 oj r276219 : #i104901# add patch for every issue
2009-09-11 13:47:49 +0200 oj r276060 : #i104901# fix for indentity
2009-09-11 12:14:14 +0200 fs r276056 : #i104594# allow to render controls without an SdrPageView
2009-09-11 11:49:31 +0200 fs r276055 : CWS-TOOLING: rebase CWS dba32h to trunk@276043 (milestone: DEV300:m58)
2009-09-10 08:41:40 +0200 oj r276021 : #i104911# export variable-set not for repeating sections
2009-10-14 18:48:09 +00:00
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
xInfoSet->setPropertyValue( "Version" , uno::makeAny( aVersion ) );
|
CWS-TOOLING: integrate CWS dba32h
2009-10-12 12:21:44 +0200 msc r276827 : remove warning for issue 102712 because the issue is fixed
2009-10-05 07:14:20 +0200 oj r276658 : #105585# add missing dependency for OOO_UI
2009-10-02 12:50:19 +0200 fs r276632 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 12:46:12 +0200 fs r276631 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 13:09:07 +0200 fs r276596 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 12:35:56 +0200 fs r276589 : #i105509# don't rely on default form component names, use indexes
2009-10-01 11:19:18 +0200 fs r276584 : copying the fix for #i105082# into this CWS
2009-10-01 11:13:22 +0200 fs r276583 : improved logs
2009-10-01 11:10:44 +0200 fs r276581 : #i105505#
2009-10-01 08:07:57 +0200 fs r276575 : manual merge of trunk, to allow cwslocalize to run
2009-09-30 22:48:30 +0200 fs r276574 : removed that strange ONLOAD definition
2009-09-30 12:58:18 +0200 fs r276553 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 12:56:45 +0200 fs r276552 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 11:47:45 +0200 fs r276549 : #i105235#
2009-09-29 12:27:40 +0200 fs r276521 : #i105367#
2009-09-28 12:08:17 +0200 oj r276485 : #i105371# export version in manifest.xml as well
2009-09-28 12:07:02 +0200 oj r276484 : #i105371# export version in manifest.xml as well
2009-09-28 09:48:01 +0200 oj r276481 : #i105366# init drivers when not empty
2009-09-25 14:31:27 +0200 fs r276466 : CWS-TOOLING: rebase CWS dba32h to trunk@276429 (milestone: DEV300:m60)
2009-09-24 13:52:54 +0200 fs r276422 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 11:42:03 +0200 fs r276413 : #i105234# proper zoom handling for the nav bar
2009-09-24 11:41:40 +0200 fs r276412 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-23 12:21:22 +0200 oj r276377 : remove dos lineends
2009-09-23 11:44:52 +0200 oj r276376 : #i105216# load config on demand
2009-09-23 11:44:19 +0200 oj r276375 : #i105216# load config on demand
2009-09-23 11:43:35 +0200 oj r276374 : #i105216# load config on demand
2009-09-21 09:13:03 +0200 oj r276307 : #i105158# use Thread support
2009-09-18 13:06:50 +0200 fs r276277 : #i105147#
2009-09-18 11:48:23 +0200 oj r276271 : #i105158# new method for thread safety
2009-09-18 10:42:56 +0200 fs r276266 : CWS-TOOLING: rebase CWS dba32h to trunk@276192 (milestone: DEV300:m59)
2009-09-18 08:30:03 +0200 oj r276263 : #i105016# load correct ldap so
2009-09-17 13:42:31 +0200 oj r276240 : change count of check boxes
2009-09-17 13:32:59 +0200 oj r276239 : revert false to true for currency
2009-09-17 09:14:46 +0200 oj r276220 : #i104901# add patch for every issue
2009-09-17 09:10:29 +0200 oj r276219 : #i104901# add patch for every issue
2009-09-11 13:47:49 +0200 oj r276060 : #i104901# fix for indentity
2009-09-11 12:14:14 +0200 fs r276056 : #i104594# allow to render controls without an SdrPageView
2009-09-11 11:49:31 +0200 fs r276055 : CWS-TOOLING: rebase CWS dba32h to trunk@276043 (milestone: DEV300:m58)
2009-09-10 08:41:40 +0200 oj r276021 : #i104911# export variable-set not for repeating sections
2009-10-14 18:48:09 +00:00
|
|
|
}
|
2011-04-13 09:40:26 +01:00
|
|
|
catch( const uno::Exception& )
|
CWS-TOOLING: integrate CWS dba32h
2009-10-12 12:21:44 +0200 msc r276827 : remove warning for issue 102712 because the issue is fixed
2009-10-05 07:14:20 +0200 oj r276658 : #105585# add missing dependency for OOO_UI
2009-10-02 12:50:19 +0200 fs r276632 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 12:46:12 +0200 fs r276631 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 13:09:07 +0200 fs r276596 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 12:35:56 +0200 fs r276589 : #i105509# don't rely on default form component names, use indexes
2009-10-01 11:19:18 +0200 fs r276584 : copying the fix for #i105082# into this CWS
2009-10-01 11:13:22 +0200 fs r276583 : improved logs
2009-10-01 11:10:44 +0200 fs r276581 : #i105505#
2009-10-01 08:07:57 +0200 fs r276575 : manual merge of trunk, to allow cwslocalize to run
2009-09-30 22:48:30 +0200 fs r276574 : removed that strange ONLOAD definition
2009-09-30 12:58:18 +0200 fs r276553 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 12:56:45 +0200 fs r276552 : copy fix for #i105387# into this CWS, as the issue prevents us from finalizing the CWS
2009-09-30 11:47:45 +0200 fs r276549 : #i105235#
2009-09-29 12:27:40 +0200 fs r276521 : #i105367#
2009-09-28 12:08:17 +0200 oj r276485 : #i105371# export version in manifest.xml as well
2009-09-28 12:07:02 +0200 oj r276484 : #i105371# export version in manifest.xml as well
2009-09-28 09:48:01 +0200 oj r276481 : #i105366# init drivers when not empty
2009-09-25 14:31:27 +0200 fs r276466 : CWS-TOOLING: rebase CWS dba32h to trunk@276429 (milestone: DEV300:m60)
2009-09-24 13:52:54 +0200 fs r276422 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 11:42:03 +0200 fs r276413 : #i105234# proper zoom handling for the nav bar
2009-09-24 11:41:40 +0200 fs r276412 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-23 12:21:22 +0200 oj r276377 : remove dos lineends
2009-09-23 11:44:52 +0200 oj r276376 : #i105216# load config on demand
2009-09-23 11:44:19 +0200 oj r276375 : #i105216# load config on demand
2009-09-23 11:43:35 +0200 oj r276374 : #i105216# load config on demand
2009-09-21 09:13:03 +0200 oj r276307 : #i105158# use Thread support
2009-09-18 13:06:50 +0200 fs r276277 : #i105147#
2009-09-18 11:48:23 +0200 oj r276271 : #i105158# new method for thread safety
2009-09-18 10:42:56 +0200 fs r276266 : CWS-TOOLING: rebase CWS dba32h to trunk@276192 (milestone: DEV300:m59)
2009-09-18 08:30:03 +0200 oj r276263 : #i105016# load correct ldap so
2009-09-17 13:42:31 +0200 oj r276240 : change count of check boxes
2009-09-17 13:32:59 +0200 oj r276239 : revert false to true for currency
2009-09-17 09:14:46 +0200 oj r276220 : #i104901# add patch for every issue
2009-09-17 09:10:29 +0200 oj r276219 : #i104901# add patch for every issue
2009-09-11 13:47:49 +0200 oj r276060 : #i104901# fix for indentity
2009-09-11 12:14:14 +0200 fs r276056 : #i104594# allow to render controls without an SdrPageView
2009-09-11 11:49:31 +0200 fs r276055 : CWS-TOOLING: rebase CWS dba32h to trunk@276043 (milestone: DEV300:m58)
2009-09-10 08:41:40 +0200 oj r276021 : #i104911# export variable-set not for repeating sections
2009-10-14 18:48:09 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-10-01 12:28:29 +00:00
|
|
|
sal_Int32 nArgsLen = aDelegatorArguments.getLength();
|
|
|
|
aDelegatorArguments.realloc(nArgsLen+1);
|
|
|
|
aDelegatorArguments[nArgsLen++] <<= xInfoSet;
|
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
Reference< XPropertySet > xProp( _rxTargetStorage, UNO_QUERY_THROW );
|
2013-01-08 19:46:57 -02:00
|
|
|
xProp->setPropertyValue( INFO_MEDIATYPE, makeAny( (OUString)MIMETYPE_OASIS_OPENDOCUMENT_DATABASE ) );
|
2004-08-02 14:09:11 +00:00
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
Reference< XComponent > xComponent( *const_cast< ODatabaseDocument* >( this ), UNO_QUERY_THROW );
|
2004-08-02 14:09:11 +00:00
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
Sequence< PropertyValue > aMediaDescriptor;
|
|
|
|
_rMediaDescriptor >>= aMediaDescriptor;
|
2004-08-02 14:09:11 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
xInfoSet->setPropertyValue("StreamName", uno::makeAny(OUString("settings.xml")));
|
2008-03-06 16:58:17 +00:00
|
|
|
WriteThroughComponent( xComponent, "settings.xml", "com.sun.star.comp.sdb.XMLSettingsExporter",
|
|
|
|
aDelegatorArguments, aMediaDescriptor, _rxTargetStorage );
|
2004-08-02 14:09:11 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
xInfoSet->setPropertyValue("StreamName", uno::makeAny(OUString("content.xml")));
|
2008-03-06 16:58:17 +00:00
|
|
|
WriteThroughComponent( xComponent, "content.xml", "com.sun.star.comp.sdb.DBExportFilter",
|
|
|
|
aDelegatorArguments, aMediaDescriptor, _rxTargetStorage );
|
2004-08-02 14:09:11 +00:00
|
|
|
|
2011-08-22 15:41:30 +01:00
|
|
|
if ( _rxTargetStorage->hasByName ( sPictures ) )
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
// Delete any previously existing Pictures folder and regenerate
|
|
|
|
// any needed content if needed
|
|
|
|
Reference< XStorageBasedLibraryContainer > xDlgs = m_pImpl->getLibraryContainer( false );
|
|
|
|
if ( xDlgs.is() )
|
|
|
|
{
|
|
|
|
Reference< XModel > xModel(const_cast< ODatabaseDocument*>(this));
|
2013-03-19 13:08:47 +02:00
|
|
|
lcl_uglyHackToStoreDialogeEmbedImages( m_pImpl->getLibraryContainer(false), _rxTargetStorage, xModel, m_pImpl->m_aContext );
|
2011-08-22 15:41:30 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
catch ( const Exception& )
|
|
|
|
{
|
|
|
|
DBG_UNHANDLED_EXCEPTION();
|
|
|
|
}
|
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
m_pImpl->storeLibraryContainersTo( _rxTargetStorage );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
Reference< XUIConfigurationManager > SAL_CALL ODatabaseDocument::getUIConfigurationManager( ) throw (RuntimeException)
|
2013-02-26 16:24:53 +02:00
|
|
|
{
|
|
|
|
return Reference< XUIConfigurationManager >( getUIConfigurationManager2(), UNO_QUERY_THROW );
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< XUIConfigurationManager2 > ODatabaseDocument::getUIConfigurationManager2( ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2005-03-10 15:33:50 +00:00
|
|
|
|
2004-08-02 14:09:11 +00:00
|
|
|
if ( !m_xUIConfigurationManager.is() )
|
|
|
|
{
|
2013-03-19 13:08:47 +02:00
|
|
|
m_xUIConfigurationManager = UIConfigurationManager::create( m_pImpl->m_aContext );
|
2004-08-02 14:09:11 +00:00
|
|
|
|
2013-02-26 16:24:53 +02:00
|
|
|
OUString aUIConfigFolderName( "Configurations2" );
|
|
|
|
Reference< XStorage > xConfigStorage;
|
|
|
|
|
|
|
|
// First try to open with READWRITE and then READ
|
|
|
|
xConfigStorage = getDocumentSubStorage( aUIConfigFolderName, ElementModes::READWRITE );
|
|
|
|
if ( xConfigStorage.is() )
|
|
|
|
{
|
|
|
|
OUString aUIConfigMediaType( "application/vnd.sun.xml.ui.configuration" );
|
|
|
|
OUString aMediaType;
|
|
|
|
Reference< XPropertySet > xPropSet( xConfigStorage, UNO_QUERY );
|
|
|
|
Any a = xPropSet->getPropertyValue( INFO_MEDIATYPE );
|
|
|
|
if ( !( a >>= aMediaType ) || aMediaType.isEmpty() )
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2013-02-26 16:24:53 +02:00
|
|
|
a <<= aUIConfigMediaType;
|
|
|
|
xPropSet->setPropertyValue( INFO_MEDIATYPE, a );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
|
|
|
}
|
2013-02-26 16:24:53 +02:00
|
|
|
else
|
|
|
|
xConfigStorage = getDocumentSubStorage( aUIConfigFolderName, ElementModes::READ );
|
|
|
|
|
|
|
|
// initialize ui configuration manager with document substorage
|
|
|
|
m_xUIConfigurationManager->setStorage( xConfigStorage );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return m_xUIConfigurationManager;
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
Reference< XStorage > SAL_CALL ODatabaseDocument::getDocumentSubStorage( const OUString& aStorageName, sal_Int32 nMode ) throw (RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2005-03-10 15:33:50 +00:00
|
|
|
|
2005-07-08 09:36:11 +00:00
|
|
|
Reference< XDocumentSubStorageSupplier > xStorageAccess( m_pImpl->getDocumentSubStorageSupplier() );
|
|
|
|
return xStorageAccess->getDocumentSubStorage( aStorageName, nMode );
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
Sequence< OUString > SAL_CALL ODatabaseDocument::getDocumentSubStoragesNames( ) throw (::com::sun::star::io::IOException, RuntimeException)
|
2004-08-02 14:09:11 +00:00
|
|
|
{
|
2005-07-08 09:36:11 +00:00
|
|
|
Reference< XDocumentSubStorageSupplier > xStorageAccess( m_pImpl->getDocumentSubStorageSupplier() );
|
|
|
|
return xStorageAccess->getDocumentSubStoragesNames();
|
2004-08-02 14:09:11 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
void ODatabaseDocument::impl_notifyStorageChange_nolck_nothrow( const Reference< XStorage >& _rxNewRootStorage )
|
|
|
|
{
|
|
|
|
Reference< XInterface > xMe( *const_cast< ODatabaseDocument* >( this ) );
|
|
|
|
|
|
|
|
m_aStorageListeners.forEach< XStorageChangeListener >(
|
|
|
|
boost::bind( &XStorageChangeListener::notifyStorageChange, _1, boost::cref( xMe ), boost::cref( _rxNewRootStorage ) ) );
|
|
|
|
}
|
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
void ODatabaseDocument::disposing()
|
2005-01-21 16:03:37 +00:00
|
|
|
{
|
dba33a: summary migration from SVN
2009-11-06 13:10:39 +0000 msc r277387 : minor fix for automatic test
2009-11-06 13:09:33 +0000 msc r277385 : minor fix for automatic test
2009-11-06 12:30:57 +0000 fs r277383 : argh. On some virtual machines, waiting 5 seconds for the event to arrive is not enough. Increasing the timeout ...
2009-11-06 12:13:34 +0000 fs r277382 : this diagnostic code should not have slipped in
2009-11-05 13:21:06 +0000 fs r277369 : SHL2NOCHECK=TRUE (requested by hjs)
2009-11-04 14:09:46 +0000 msc r277355 : minor fix for automatic testing
2009-11-04 13:23:02 +0000 msc r277352 : minor fix for automatic testing
2009-11-04 10:53:28 +0000 msc r277341 : minor fix for automated testscript
2009-11-04 08:30:58 +0000 msc r277333 : minor fix for automatic test
2009-11-04 08:15:43 +0000 msc r277332 : minor fix for automatic test
2009-11-03 14:25:44 +0000 fs r277324 : #i10000#
2009-11-03 09:47:47 +0000 fs r277315 : found yet another help ID zombie ... moved formhelpid.hrc content to propctrlr.hrc, where it belongs
2009-11-03 08:50:24 +0000 fs r277312 : use createTempFileURL, which cares for some more specialities ...
2009-11-03 08:44:55 +0000 fs r277311 : when creating a temp file for purpose of getting a temp file URL, the delete the file immediately. On some machines/JVMs, the file exists, with write access denied, which isn't Good (TM)
2009-10-22 13:06:17 +0000 fs r277126 : removed wrong assertion
2009-10-21 08:10:35 +0000 fs r277077 : reverted the previous change, which was nonsense
2009-10-21 07:19:43 +0000 fs r277076 : export the component_foo functions, now that some of the objects are built with VISIBILITY_HIDDEN=TRUE
2009-10-21 07:08:35 +0000 fs r277075 : spare useless call
2009-10-20 21:26:31 +0000 fs r277072 : #i10000#
2009-10-20 08:06:04 +0000 fs r277039 : CWS-TOOLING: rebase CWS dba33a to trunk@277035 (milestone: DEV300:m62)
2009-10-16 09:55:25 +0000 fs r276960 : remove one of the superfluous implts_doLayout calls introduced with the previous patch
2009-10-15 13:18:52 +0000 fs r276941 : removed the basic tests. According to cn, they're not used anymore (for a long time), and according to 'du -h', they take up 6.0M on my hard disc. For too much for useless code, /me thinks.
2009-10-15 13:06:51 +0000 fs r276940 : #i10000# remove useless include (otherwise the compiler warning it provokes would need to be fixed by declaring VISIBILITY_HIDDEN=TRUE in the makefile.mk)
2009-10-15 12:52:39 +0000 fs r276939 : #i10000#
2009-10-15 12:44:26 +0000 fs r276938 : #i10000#
2009-10-15 12:00:33 +0000 fs r276936 : #i10000#
2009-10-15 10:31:37 +0000 fs r276934 : #i105259# prepare for the Hidden arg
2009-10-15 10:31:05 +0000 fs r276933 : IsMaximized -> const
2009-10-15 09:50:15 +0000 fs r276932 : during #i105259#:
introduce an option to the layout manager to preserve, if possible, the size of the content window
when layouting. Enable this option for embedded (SFX-based) documents opened for outplace editing.
(the option is incompatible with in-place editing, anyway)
This is because such embedded objects couple the (content) window size to the VisAreaSize, in that
both are used interchangeably. When an embedded object is closed, it remembers the VisAreaSize,
and restores it upon next open. This, however, leads to different content window sizes when the
window is closed with another toolbar set than used during opening.
This patch here prevents those different content window sizes. Also, now the content window size
doesn't change when, explicitly or implicitly, a toolbar is shown or hidden. Instead, the content
window size stays the same, and the container window size is adjusted.
2009-10-15 09:32:41 +0000 fs r276931 : during #i105259#: UNO access to more attributes of top windows
2009-10-15 09:30:28 +0000 fs r276930 : indention corrected (better readable)
2009-10-15 09:26:46 +0000 fs r276929 : during #i105259#: access to more attributes of top windows
2009-10-14 10:04:39 +0000 fs r276889 : connecting via services manager, not naming service
2009-10-12 11:31:08 +0000 fs r276831 : during #i105806# FillPropertySet: do not attempt to set *AutoStyleName if it doesn't exist
2009-10-12 11:24:44 +0000 fs r276830 : #i105806# getPropertyValue: throw an UnknownPropertyException for, well, unknown properties
2009-10-08 08:20:58 +0000 fs r276774 : implSubmit: re-throw WrappedTargetExceptions unmodified
2009-10-07 19:19:42 +0000 fs r276770 : #i105198# do not pass an CommandType if we do not have a command
2009-10-07 17:39:36 +0000 fs r276768 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 12:59:17 +0000 fs r276754 : #i87693#
2009-10-07 11:19:22 +0000 fs r276752 : #i10000#
2009-10-07 10:21:08 +0000 fs r276748 : #105482# do not require a controller, at least not in *all* circumstances (executed reports have a model, the ReportDefinition, but no Controller)
2009-10-07 10:04:08 +0000 fs r276747 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:58:30 +0000 fs r276746 : copying the changes from CWS fwk121 herein, in particular the fix for
issue #i105371#
2009-10-07 09:48:14 +0000 fs r276744 : removed (now) pointless assertion
2009-10-07 06:59:19 +0000 fs r276740 : export the OWeakObject::disposeWeakConnectionPoint symbol
2009-10-07 06:44:43 +0000 fs r276739 : OComponentHelper::release & WeakAggComponentImplHelperBase::release:
when our ref count drops to 0, call OWeakObject's disposeWeakConnectionPoint before (temporarily) incrementing
the ref count, again. This ensures that our adapter cannot create references to the dying object anymore.
(A complex test case in dbaccess (#i105505#) triggered such a situation, but in another class using an analogous
release/dispose/destroy pattern, namely WeakComponentImplHelperBase)
2009-10-07 06:37:20 +0000 fs r276738 : found during some new complex test cases: call disposeWeakConnectionPoint before actually starting to destroy the object, this ensures no other threads will resurrect it while it is dying
2009-10-06 21:58:24 +0000 fs r276734 : oops, two small corrections to the previous fix (hey, complex test cases are cool)
2009-10-06 21:51:16 +0000 fs r276733 : log the name of the data source which cannot be revoked
2009-10-06 21:50:41 +0000 fs r276732 : more detailed error message when cleanup fails
2009-10-06 21:50:01 +0000 fs r276731 : reworked the ModelImpl caching. The new and improved UNO API test for css.sdb.RowSet
revealed some inconsistencies, in whether the objects are cached by their URL, or by their
registration name. This has been changed to caching by registration name.
2009-10-06 13:50:34 +0000 fs r276714 : print diagnostics when we cannot clean up the test case
2009-10-06 13:45:02 +0000 fs r276713 : this test failed all the time, since the core (rightfully) threw an exception. Disabled it for the moment, until issue 84253 is fixed
2009-10-06 12:52:46 +0000 fs r276711 : rewrote this test. Now we do not re-use the same .odb across different test cases, as this leads to unreliable
(timing-dependent) results/failures. Instead, every test sets up a new odb file.
Also, did some re-factoring, improved the cleanup code, and caught a few more errors.
2009-10-06 12:51:07 +0000 fs r276710 : DBTools taking a logger now
2009-10-06 12:50:42 +0000 fs r276709 : taking a PrintWriter for logging purpose
2009-10-06 12:50:03 +0000 fs r276708 : DBTools taking a logger now
2009-10-06 12:49:22 +0000 fs r276707 : typo
2009-10-06 12:49:03 +0000 fs r276706 : typo
2009-10-06 12:48:52 +0000 fs r276705 : wrappers around some database-related services - initial versions only, to evolve over time, and intended to finally replace the DBTools class
2009-10-06 12:48:02 +0000 fs r276704 : typo
2009-10-06 12:38:42 +0000 fs r276702 : some better diagnostics, done during getting the API tests to work more reliably
2009-10-06 10:35:51 +0000 fs r276698 : when living in, e.g., the DataSourceBrowser, we can't expect to find an XModifiable2, so don't assert its existence
2009-10-05 12:47:52 +0000 oj r276677 : #i105607# check for read moved into if scope
2009-10-05 11:37:06 +0000 fs r276676 : when saving a file fails, retrieve the error message from the InteractionRequestStringResolver - this is better than any generic message we can create
2009-10-05 10:04:23 +0000 oj r276673 : #i105607# check for read moved into if scope
2009-10-05 09:46:17 +0000 fs r276671 : #i10000#
2009-10-05 08:43:58 +0000 fs r276664 : #i105505#
release: dispose the (base classes) weak connection point before disposing ourself,
and in particular before temporarily incrementing our ref count, again.
This way, we prevent that a separate thread re-surrects us (using the weak connection
point's queryAdapted) while we're in the process of destruction
2009-10-05 08:41:49 +0000 fs r276663 : #i105505# +disposeWeakConnectionPoint (outsourced into dedicated method from ::release)
2009-10-05 08:40:26 +0000 fs r276662 : no need to derived from OSubComponent, its features are not used, directly derive from WeakComponentImplFoo instead
2009-10-05 08:39:38 +0000 fs r276661 : #i105505# diagnostics
2009-10-05 08:39:16 +0000 fs r276660 : #i105505# +testDocumentRevenants
2009-10-05 08:36:01 +0000 fs r276659 : #i105560# reverted the removal of GenericController::openHelpAgent - this is needed in module reportdesign
2009-10-04 19:53:30 +0000 fs r276657 : #105560#
remove unused code
thanks to cmc@openoffice.org for submitting the patch
2009-10-04 19:50:28 +0000 fs r276656 : #i105550# remove unused 'fire' method (thanks to cmc)
2009-10-03 16:13:15 +0000 fs r276655 : CWS-TOOLING: rebase CWS dba33a to trunk@276429 (milestone: DEV300:m60)
2009-10-02 19:20:48 +0000 fs r276651 : #i104117# lotta changed IDs ...
2009-10-02 10:52:24 +0000 fs r276634 : #i105505#
If a model is created, and is a revenant of a previous incarnation, then ensure it is properly initialized.
In particular, in its ctor, set the state to "Initializing", not "Initialized", and then let the ModelImpl
call attachResource. This ensures that the model is initialized completely, including firing the necessary
events.
2009-10-02 10:51:08 +0000 fs r276633 : #i105505# always do an attachResource at the newly loaded model, even if it (internally) was not really loaded, but only a revenant of a previous incarnation of this document
2009-10-01 11:10:13 +0000 fs r276597 : do not rely on the name 'Standard' for the one and only form in a document
2009-10-01 10:36:29 +0000 fs r276590 : #i105509# don't rely on default form component names, use indexes
2009-10-01 09:12:20 +0000 fs r276582 : #i105505#
2009-09-30 07:55:21 +0000 fs r276542 : removed some unsed methods / spared some unnecessary pixel<->logic conversion
2009-09-30 07:53:22 +0000 fs r276541 : removed unneeded methods
2009-09-30 06:35:59 +0000 fs r276538 : #i10000#
2009-09-29 13:45:02 +0000 fs r276531 : refactored the Roadmap* classes, to be able to fix above-mentioned #i105113#
2009-09-29 10:27:10 +0000 fs r276520 : #i105367#
2009-09-29 08:46:45 +0000 fs r276510 : #i104956# cleaned up the makefiles
2009-09-28 21:00:07 +0000 fs r276505 : #i104117# sourced those IDs out from extension.hrc
2009-09-28 20:59:05 +0000 fs r276504 : no need to let one FREE...
2009-09-28 20:53:36 +0000 fs r276503 : #i104117#
cleaned up the mess with help IDs in module extensions.
Formerly, extensions used to use help IDs which were declared in module svx, and vice versa.
Also, help ID ranges were not respected.
2009-09-28 11:25:36 +0000 fs r276489 : typo
2009-09-28 11:25:10 +0000 fs r276488 : #i105235#
2009-09-24 11:53:16 +0000 fs r276423 : #i105234# do not zoom the control when they view information is still uninitialized (happens at least in Writer when opening a form document)
2009-09-24 09:42:28 +0000 fs r276415 : #i105234# proper zoom handling for the nav bar
2009-09-24 09:42:19 +0000 fs r276414 : #i105234# setZoom: care for precision errors caused by implicit conversion float->double
2009-09-16 11:11:43 +0000 fs r276195 : #i105082#
consolidated the sub storage handling, by delegating more functionality into
the DocumentStorageAccess class. As a result, there won't be that many unnecessary
commits anymore. Also, the two different storage caches (in ModelImpl::m_aStorages
and DocumentStorageAccess::m_aExposedStorages) have been consolidated.
This is not really part of the fix of issue 105082, but it helped reducing the
calls to the storage/package implementation.
2009-09-15 21:42:27 +0000 fs r276190 : don't calculate space for BOLD if the text is not really bold (speeds up rendering for large tree structures)
2009-09-15 20:20:23 +0000 fs r276188 : getTypeInfo: fill m_aTypeInfoRows only if really all type infos could be retrieved
2009-09-15 20:19:29 +0000 fs r276187 : do not continue loading when the controller initialization throws an error
2009-09-14 12:25:57 +0000 fs r276119 : oops, this patch was not intended for this CWS
2009-09-14 12:13:57 +0000 fs r276114 : #cr6875455# introduce a ReferenceDevice property for various control models
2009-09-14 10:33:02 +0000 fs r276106 : removed dead file
2009-09-09 08:37:31 +0000 fs r275972 : remove OSL_TRACE in VCLXButton dtor
2009-09-08 11:19:17 +0000 oj r275926 : i76534# remove mnemonic from fixed text
2009-09-07 08:39:37 +0000 fs r275874 : create CWS dba33a from cws/dba32g@275857 (CWS: dba32g)
2009-11-27 12:39:32 +00:00
|
|
|
OSL_TRACE( "DD: disp: %p: %p", this, m_pImpl.get() );
|
2005-12-21 12:34:54 +00:00
|
|
|
if ( !m_pImpl.is() )
|
|
|
|
{
|
|
|
|
// this means that we're already disposed
|
2011-02-03 00:33:36 +01:00
|
|
|
OSL_ENSURE( ODatabaseDocument_OfficeDocument::rBHelper.bDisposed, "ODatabaseDocument::disposing: no impl anymore, but not yet disposed!" );
|
2005-12-21 12:34:54 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
if ( impl_isInitialized() )
|
|
|
|
m_aEventNotifier.notifyDocumentEvent( "OnUnload" );
|
|
|
|
|
|
|
|
Reference< XModel > xHoldAlive( this );
|
|
|
|
|
|
|
|
m_aEventNotifier.disposing();
|
|
|
|
|
|
|
|
lang::EventObject aDisposeEvent(static_cast<XWeak*>(this));
|
|
|
|
m_aModifyListeners.disposeAndClear( aDisposeEvent );
|
|
|
|
m_aCloseListener.disposeAndClear( aDisposeEvent );
|
|
|
|
m_aStorageListeners.disposeAndClear( aDisposeEvent );
|
|
|
|
|
2008-12-16 13:30:53 +00:00
|
|
|
// this is the list of objects which we currently hold as member. Upon resetting
|
|
|
|
// those members, we can (potentially) release the last reference to them, in which
|
|
|
|
// case they will be deleted - if they're C++ implementations, that is :).
|
|
|
|
// Some of those implementations are offending enough to require the SolarMutex, which
|
|
|
|
// means we should not release the last reference while our own mutex is locked ...
|
|
|
|
::std::list< Reference< XInterface > > aKeepAlive;
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// SYNCHRONIZED ->
|
2008-12-16 13:30:53 +00:00
|
|
|
::osl::ClearableMutexGuard aGuard( m_aMutex );
|
2008-10-16 06:57:26 +00:00
|
|
|
|
2011-02-03 00:33:36 +01:00
|
|
|
OSL_ENSURE( m_aControllers.empty(), "ODatabaseDocument::disposing: there still are controllers!" );
|
2011-09-29 23:02:56 +01:00
|
|
|
// normally, nobody should explicitly dispose, but only XCloseable::close
|
|
|
|
// the document. And upon closing, our controllers are closed, too
|
2005-09-23 11:04:55 +00:00
|
|
|
|
2011-09-29 23:02:56 +01:00
|
|
|
{
|
2011-10-26 13:31:46 +03:00
|
|
|
uno::Reference<uno::XInterface> xUIInterface( m_xUIConfigurationManager );
|
2011-09-29 23:02:56 +01:00
|
|
|
aKeepAlive.push_back( xUIInterface );
|
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
m_xUIConfigurationManager = NULL;
|
2008-04-04 13:32:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
clearObjectContainer( m_xForms );
|
|
|
|
clearObjectContainer( m_xReports );
|
2005-03-10 15:33:50 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// reset the macro mode: in case the our impl struct stays alive (e.g. because our DataSource
|
|
|
|
// object still exists), and somebody subsequently re-opens the document, we want to have
|
|
|
|
// the security warning, again.
|
|
|
|
m_pImpl->resetMacroExecutionMode();
|
2005-03-10 15:33:50 +00:00
|
|
|
|
2010-11-09 22:15:21 +00:00
|
|
|
// similar arguing for our ViewMonitor
|
2008-10-16 06:57:26 +00:00
|
|
|
m_aViewMonitor.reset();
|
2005-05-06 08:18:46 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// tell our Impl to forget us
|
|
|
|
m_pImpl->modelIsDisposing( impl_isInitialized(), ODatabaseModelImpl::ResetModelAccess() );
|
2006-12-01 16:29:18 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
// now, at the latest, the controller array should be empty. Controllers are
|
|
|
|
// expected to listen for our disposal, and disconnect then
|
2011-02-03 00:33:36 +01:00
|
|
|
OSL_ENSURE( m_aControllers.empty(), "ODatabaseDocument::disposing: there still are controllers!" );
|
2008-10-16 06:57:26 +00:00
|
|
|
impl_disposeControllerFrames_nothrow();
|
|
|
|
|
2011-09-29 23:02:56 +01:00
|
|
|
{
|
2011-10-26 13:31:46 +03:00
|
|
|
uno::Reference<uno::XInterface> xModuleInterface( m_xModuleManager );
|
2011-09-29 23:02:56 +01:00
|
|
|
aKeepAlive.push_back( xModuleInterface );
|
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
m_xModuleManager.clear();
|
2008-12-16 13:30:53 +00:00
|
|
|
|
2011-09-29 23:02:56 +01:00
|
|
|
{
|
2011-10-26 13:31:46 +03:00
|
|
|
uno::Reference<uno::XInterface> xTitleInterface( m_xTitleHelper );
|
2011-09-29 23:02:56 +01:00
|
|
|
aKeepAlive.push_back( xTitleInterface );
|
|
|
|
}
|
2008-10-16 06:57:26 +00:00
|
|
|
m_xTitleHelper.clear();
|
2006-12-01 16:29:18 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
m_pImpl.clear();
|
2008-12-16 13:30:53 +00:00
|
|
|
|
|
|
|
aGuard.clear();
|
2008-10-16 06:57:26 +00:00
|
|
|
// <- SYNCHRONIZED
|
2008-12-16 13:30:53 +00:00
|
|
|
|
|
|
|
aKeepAlive.clear();
|
2005-03-10 15:33:50 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
// XComponent
|
|
|
|
void SAL_CALL ODatabaseDocument::dispose( ) throw (RuntimeException)
|
|
|
|
{
|
|
|
|
::cppu::WeakComponentImplHelperBase::dispose();
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::addEventListener( const Reference< lang::XEventListener >& _xListener ) throw (RuntimeException)
|
2005-03-10 15:33:50 +00:00
|
|
|
{
|
2008-03-06 16:58:17 +00:00
|
|
|
::cppu::WeakComponentImplHelperBase::addEventListener( _xListener );
|
2005-03-10 15:33:50 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::removeEventListener( const Reference< lang::XEventListener >& _xListener ) throw (RuntimeException)
|
2005-03-10 15:33:50 +00:00
|
|
|
{
|
2008-03-06 16:58:17 +00:00
|
|
|
::cppu::WeakComponentImplHelperBase::removeEventListener( _xListener );
|
2005-03-10 15:33:50 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
// XServiceInfo
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString ODatabaseDocument::getImplementationName( ) throw(RuntimeException)
|
2005-03-10 15:33:50 +00:00
|
|
|
{
|
2008-01-30 07:33:34 +00:00
|
|
|
return getImplementationName_static();
|
2005-03-10 15:33:50 +00:00
|
|
|
}
|
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString ODatabaseDocument::getImplementationName_static( ) throw(RuntimeException)
|
2005-03-10 15:33:50 +00:00
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
return OUString("com.sun.star.comp.dba.ODatabaseDocument");
|
2005-03-10 15:33:50 +00:00
|
|
|
}
|
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
Sequence< OUString > ODatabaseDocument::getSupportedServiceNames( ) throw (RuntimeException)
|
2005-03-10 15:33:50 +00:00
|
|
|
{
|
2008-01-30 07:33:34 +00:00
|
|
|
return getSupportedServiceNames_static();
|
2005-03-10 15:33:50 +00:00
|
|
|
}
|
|
|
|
|
2008-01-30 07:33:34 +00:00
|
|
|
Reference< XInterface > ODatabaseDocument::Create( const Reference< XComponentContext >& _rxContext )
|
2005-03-10 15:33:50 +00:00
|
|
|
{
|
2012-09-18 09:46:34 +02:00
|
|
|
Reference< XUnoTunnel > xDBContextTunnel( DatabaseContext::create(_rxContext), UNO_QUERY_THROW );
|
2008-01-30 07:33:34 +00:00
|
|
|
ODatabaseContext* pContext = reinterpret_cast< ODatabaseContext* >( xDBContextTunnel->getSomething( ODatabaseContext::getUnoTunnelImplementationId() ) );
|
|
|
|
|
2013-03-19 13:08:47 +02:00
|
|
|
::rtl::Reference<ODatabaseModelImpl> pImpl( new ODatabaseModelImpl( _rxContext, *pContext ) );
|
2008-10-16 06:57:26 +00:00
|
|
|
Reference< XModel > xModel( pImpl->createNewModel_deliverOwnership( false ) );
|
2008-01-30 07:33:34 +00:00
|
|
|
return xModel.get();
|
2005-03-10 15:33:50 +00:00
|
|
|
}
|
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
Sequence< OUString > ODatabaseDocument::getSupportedServiceNames_static( ) throw (RuntimeException)
|
2005-03-10 15:33:50 +00:00
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
Sequence< OUString > aSNS( 2 );
|
|
|
|
aSNS[0] = "com.sun.star.sdb.OfficeDatabaseDocument";
|
|
|
|
aSNS[1] = "com.sun.star.document.OfficeDocument";
|
2005-03-10 15:33:50 +00:00
|
|
|
return aSNS;
|
|
|
|
}
|
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
sal_Bool ODatabaseDocument::supportsService( const OUString& _rServiceName ) throw (RuntimeException)
|
2005-03-10 15:33:50 +00:00
|
|
|
{
|
|
|
|
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
Reference< XDataSource > SAL_CALL ODatabaseDocument::getDataSource() throw (RuntimeException)
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
|
|
|
|
return m_pImpl->getOrCreateDataSource();
|
2005-03-10 15:33:50 +00:00
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
void SAL_CALL ODatabaseDocument::loadFromStorage( const Reference< XStorage >& /*xStorage*/, const Sequence< PropertyValue >& /*aMediaDescriptor*/ ) throw (IllegalArgumentException, DoubleInitializationException, IOException, Exception, RuntimeException)
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
throw Exception(
|
2009-11-27 10:17:16 +01:00
|
|
|
DBACORE_RESSTRING( RID_STR_NO_EMBEDDING ),
|
2008-03-06 16:58:17 +00:00
|
|
|
*this
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL ODatabaseDocument::storeToStorage( const Reference< XStorage >& _rxStorage, const Sequence< PropertyValue >& _rMediaDescriptor ) throw (IllegalArgumentException, IOException, Exception, RuntimeException)
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2009-04-24 18:34:24 +00:00
|
|
|
impl_storeToStorage_throw( _rxStorage, _rMediaDescriptor, aGuard );
|
2008-03-06 16:58:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL ODatabaseDocument::switchToStorage( const Reference< XStorage >& _rxNewRootStorage ) throw (IllegalArgumentException, IOException, Exception, RuntimeException)
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
Reference< XStorage > xNewRootStorage( m_pImpl->switchToStorage( _rxNewRootStorage ) );
|
|
|
|
|
|
|
|
aGuard.clear();
|
|
|
|
impl_notifyStorageChange_nolck_nothrow( xNewRootStorage );
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< XStorage > SAL_CALL ODatabaseDocument::getDocumentStorage( ) throw (IOException, Exception, RuntimeException)
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
|
|
|
return m_pImpl->getOrCreateRootStorage();
|
2008-03-06 16:58:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL ODatabaseDocument::addStorageChangeListener( const Reference< XStorageChangeListener >& _Listener ) throw (RuntimeException)
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-03-06 16:58:17 +00:00
|
|
|
m_aStorageListeners.addInterface( _Listener );
|
|
|
|
}
|
|
|
|
|
|
|
|
void SAL_CALL ODatabaseDocument::removeStorageChangeListener( const Reference< XStorageChangeListener >& _Listener ) throw (RuntimeException)
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-03-06 16:58:17 +00:00
|
|
|
m_aStorageListeners.addInterface( _Listener );
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< XStorageBasedLibraryContainer > SAL_CALL ODatabaseDocument::getBasicLibraries() throw (RuntimeException)
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
|
2008-03-06 16:58:17 +00:00
|
|
|
return m_pImpl->getLibraryContainer( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< XStorageBasedLibraryContainer > SAL_CALL ODatabaseDocument::getDialogLibraries() throw (RuntimeException)
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-03-06 16:58:17 +00:00
|
|
|
return m_pImpl->getLibraryContainer( false );
|
|
|
|
}
|
|
|
|
|
|
|
|
::sal_Bool SAL_CALL ODatabaseDocument::getAllowMacroExecution() throw (RuntimeException)
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-03-06 16:58:17 +00:00
|
|
|
return m_pImpl->adjustMacroMode_AutoReject();
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< XEmbeddedScripts > SAL_CALL ODatabaseDocument::getScriptContainer() throw (RuntimeException)
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-03-06 16:58:17 +00:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
Reference< provider::XScriptProvider > SAL_CALL ODatabaseDocument::getScriptProvider( ) throw (RuntimeException)
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
Reference< XScriptProvider > xScriptProvider( m_xScriptProvider );
|
|
|
|
if ( !xScriptProvider.is() )
|
|
|
|
{
|
2013-02-27 15:16:02 +02:00
|
|
|
Reference < XScriptProviderFactory > xFactory =
|
2013-03-19 13:08:47 +02:00
|
|
|
theMasterScriptProviderFactory::get( m_pImpl->m_aContext );
|
2008-03-06 16:58:17 +00:00
|
|
|
|
|
|
|
Any aScriptProviderContext;
|
2009-04-24 18:34:24 +00:00
|
|
|
if ( m_bAllowDocumentScripting )
|
2008-03-06 16:58:17 +00:00
|
|
|
aScriptProviderContext <<= Reference< XModel >( this );
|
|
|
|
|
|
|
|
xScriptProvider.set( xFactory->createScriptProvider( aScriptProviderContext ), UNO_SET_THROW );
|
|
|
|
m_xScriptProvider = xScriptProvider;
|
|
|
|
}
|
|
|
|
|
|
|
|
return xScriptProvider;
|
|
|
|
}
|
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
Reference< XNameReplace > SAL_CALL ODatabaseDocument::getEvents( ) throw (RuntimeException)
|
|
|
|
{
|
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
|
|
|
|
return m_pEventContainer;
|
|
|
|
}
|
2008-03-06 16:58:17 +00:00
|
|
|
|
2005-03-10 15:33:50 +00:00
|
|
|
void SAL_CALL ODatabaseDocument::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException)
|
|
|
|
{
|
|
|
|
if ( m_pImpl.is() )
|
|
|
|
m_pImpl->disposing(Source);
|
2005-01-21 16:03:37 +00:00
|
|
|
}
|
2005-12-21 12:34:54 +00:00
|
|
|
|
2008-03-06 16:58:17 +00:00
|
|
|
Reference< XInterface > ODatabaseDocument::getThis() const
|
2005-12-21 12:34:54 +00:00
|
|
|
{
|
2008-03-06 16:58:17 +00:00
|
|
|
return *const_cast< ODatabaseDocument* >( this );
|
2005-12-21 12:34:54 +00:00
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2007-04-16 15:23:47 +00:00
|
|
|
struct CreateAny : public ::std::unary_function< Reference<XController>, Any>
|
2007-07-24 11:04:32 +00:00
|
|
|
{
|
|
|
|
Any operator() (const Reference<XController>& lhs) const
|
|
|
|
{
|
|
|
|
return makeAny(lhs);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2007-04-16 15:23:47 +00:00
|
|
|
// XModel2
|
|
|
|
Reference< XEnumeration > SAL_CALL ODatabaseDocument::getControllers( ) throw (RuntimeException)
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2007-07-24 11:04:32 +00:00
|
|
|
uno::Sequence< Any> aController( m_aControllers.size() );
|
|
|
|
::std::transform( m_aControllers.begin(), m_aControllers.end(), aController.getArray(), CreateAny() );
|
2007-04-16 15:23:47 +00:00
|
|
|
return new ::comphelper::OAnyEnumeration(aController);
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
Sequence< OUString > SAL_CALL ODatabaseDocument::getAvailableViewControllerNames( ) throw (RuntimeException)
|
2007-04-16 15:23:47 +00:00
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
Sequence< OUString > aNames(1);
|
2007-04-16 15:23:47 +00:00
|
|
|
aNames[0] = SERVICE_SDB_APPLICATIONCONTROLLER;
|
|
|
|
return aNames;
|
|
|
|
}
|
2010-10-12 23:48:07 +02:00
|
|
|
|
2008-06-06 13:02:08 +00:00
|
|
|
Reference< XController2 > SAL_CALL ODatabaseDocument::createDefaultViewController( const Reference< XFrame >& _Frame ) throw (IllegalArgumentException, Exception, RuntimeException)
|
2007-04-16 15:23:47 +00:00
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
return createViewController( "Default", Sequence< PropertyValue >(), _Frame);
|
2007-04-16 15:23:47 +00:00
|
|
|
}
|
2008-06-06 13:02:08 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( const OUString& _ViewName, const Sequence< PropertyValue >& _Arguments, const Reference< XFrame >& _Frame ) throw (IllegalArgumentException, Exception, RuntimeException)
|
2007-04-16 15:23:47 +00:00
|
|
|
{
|
2012-04-06 19:49:53 +02:00
|
|
|
if ( _ViewName != "Default" && _ViewName != "Preview" )
|
2013-01-08 19:46:57 -02:00
|
|
|
throw IllegalArgumentException( OUString(), *this, 1 );
|
2008-06-06 13:02:08 +00:00
|
|
|
if ( !_Frame.is() )
|
2013-01-08 19:46:57 -02:00
|
|
|
throw IllegalArgumentException( OUString(), *this, 3 );
|
2008-06-06 13:02:08 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-06-06 13:02:08 +00:00
|
|
|
aGuard.clear();
|
|
|
|
|
2013-03-19 13:08:47 +02:00
|
|
|
Reference< XController2 > xController(
|
|
|
|
m_pImpl->m_aContext->getServiceManager()->createInstanceWithContext("org.openoffice.comp.dbu.OApplicationController", m_pImpl->m_aContext),
|
|
|
|
UNO_QUERY_THROW );
|
2008-06-06 13:02:08 +00:00
|
|
|
|
|
|
|
::comphelper::NamedValueCollection aInitArgs( _Arguments );
|
|
|
|
aInitArgs.put( "Frame", _Frame );
|
2012-04-06 14:28:18 +02:00
|
|
|
if ( _ViewName == "Preview" )
|
2008-06-06 13:02:08 +00:00
|
|
|
aInitArgs.put( "Preview", sal_Bool( sal_True ) );
|
|
|
|
Reference< XInitialization > xInitController( xController, UNO_QUERY_THROW );
|
|
|
|
xInitController->initialize( aInitArgs.getWrappedPropertyValues() );
|
|
|
|
|
|
|
|
return xController;
|
2007-04-16 15:23:47 +00:00
|
|
|
}
|
2008-06-06 13:02:08 +00:00
|
|
|
|
2008-04-08 11:46:07 +00:00
|
|
|
Reference< XTitle > ODatabaseDocument::impl_getTitleHelper_throw()
|
2008-04-04 13:32:17 +00:00
|
|
|
{
|
|
|
|
if ( ! m_xTitleHelper.is ())
|
|
|
|
{
|
2013-03-19 13:08:47 +02:00
|
|
|
Reference< XUntitledNumbers > xDesktop(Desktop::create(m_pImpl->m_aContext), uno::UNO_QUERY_THROW);
|
2012-12-14 12:58:00 +02:00
|
|
|
Reference< frame::XModel > xThis (getThis(), uno::UNO_QUERY_THROW);
|
2008-04-04 13:32:17 +00:00
|
|
|
|
2013-03-19 13:08:47 +02:00
|
|
|
::framework::TitleHelper* pHelper = new ::framework::TitleHelper(m_pImpl->m_aContext);
|
2008-04-04 13:32:17 +00:00
|
|
|
m_xTitleHelper.set(static_cast< ::cppu::OWeakObject* >(pHelper), uno::UNO_QUERY_THROW);
|
|
|
|
pHelper->setOwner (xThis );
|
|
|
|
pHelper->connectWithUntitledNumbers (xDesktop);
|
|
|
|
}
|
|
|
|
|
|
|
|
return m_xTitleHelper;
|
|
|
|
}
|
|
|
|
|
|
|
|
uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHelper_throw(const uno::Reference< uno::XInterface >& _xComponent)
|
|
|
|
{
|
|
|
|
if ( !m_xModuleManager.is() )
|
2013-03-19 13:08:47 +02:00
|
|
|
m_xModuleManager.set( ModuleManager::create(m_pImpl->m_aContext) );
|
2008-04-04 13:32:17 +00:00
|
|
|
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString sModuleId;
|
2008-06-16 11:30:48 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
sModuleId = m_xModuleManager->identify( _xComponent );
|
|
|
|
}
|
2011-04-13 09:40:26 +01:00
|
|
|
catch(const uno::Exception&)
|
2008-06-16 11:30:48 +00:00
|
|
|
{
|
|
|
|
}
|
2008-04-04 13:32:17 +00:00
|
|
|
uno::Reference< frame::XUntitledNumbers > xNumberedControllers;
|
|
|
|
|
|
|
|
TNumberedController::iterator aFind = m_aNumberedControllers.find(sModuleId);
|
|
|
|
if ( aFind == m_aNumberedControllers.end() )
|
|
|
|
{
|
|
|
|
uno::Reference< frame::XModel > xThis(static_cast< frame::XModel* >(this), uno::UNO_QUERY_THROW);
|
|
|
|
::comphelper::NumberedCollection* pHelper = new ::comphelper::NumberedCollection();
|
|
|
|
xNumberedControllers.set(static_cast< ::cppu::OWeakObject* >(pHelper), uno::UNO_QUERY_THROW);
|
|
|
|
|
|
|
|
pHelper->setOwner (xThis);
|
|
|
|
|
|
|
|
m_aNumberedControllers.insert(TNumberedController::value_type(sModuleId,xNumberedControllers));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
xNumberedControllers = aFind->second;
|
|
|
|
|
|
|
|
return xNumberedControllers;
|
|
|
|
}
|
|
|
|
|
|
|
|
// css.frame.XTitle
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString SAL_CALL ODatabaseDocument::getTitle()
|
2008-04-04 13:32:17 +00:00
|
|
|
throw (uno::RuntimeException)
|
|
|
|
{
|
|
|
|
// SYNCHRONIZED ->
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
|
|
|
|
return impl_getTitleHelper_throw()->getTitle();
|
2008-04-04 13:32:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// css.frame.XTitle
|
2013-01-08 19:46:57 -02:00
|
|
|
void SAL_CALL ODatabaseDocument::setTitle( const OUString& sTitle )
|
2008-04-04 13:32:17 +00:00
|
|
|
throw (uno::RuntimeException)
|
|
|
|
{
|
|
|
|
// SYNCHRONIZED ->
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
|
|
|
impl_getTitleHelper_throw()->setTitle( sTitle );
|
|
|
|
m_aEventNotifier.notifyDocumentEventAsync( "OnTitleChanged" );
|
|
|
|
// <- SYNCHRONIZED
|
2008-04-04 13:32:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// css.frame.XTitleChangeBroadcaster
|
|
|
|
void SAL_CALL ODatabaseDocument::addTitleChangeListener( const uno::Reference< frame::XTitleChangeListener >& xListener )
|
|
|
|
throw (uno::RuntimeException)
|
|
|
|
{
|
|
|
|
// SYNCHRONIZED ->
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-04-04 13:32:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
uno::Reference< frame::XTitleChangeBroadcaster > xBroadcaster( impl_getTitleHelper_throw(), uno::UNO_QUERY_THROW );
|
|
|
|
xBroadcaster->addTitleChangeListener( xListener );
|
2008-04-04 13:32:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// css.frame.XTitleChangeBroadcaster
|
|
|
|
void SAL_CALL ODatabaseDocument::removeTitleChangeListener( const uno::Reference< frame::XTitleChangeListener >& xListener )
|
|
|
|
throw (uno::RuntimeException)
|
|
|
|
{
|
|
|
|
// SYNCHRONIZED ->
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-04-04 13:32:17 +00:00
|
|
|
|
2008-10-16 06:57:26 +00:00
|
|
|
uno::Reference< frame::XTitleChangeBroadcaster > xBroadcaster( impl_getTitleHelper_throw(), uno::UNO_QUERY_THROW );
|
|
|
|
xBroadcaster->removeTitleChangeListener( xListener );
|
2008-04-04 13:32:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// css.frame.XUntitledNumbers
|
|
|
|
::sal_Int32 SAL_CALL ODatabaseDocument::leaseNumber( const uno::Reference< uno::XInterface >& xComponent )
|
|
|
|
throw (lang::IllegalArgumentException,
|
|
|
|
uno::RuntimeException )
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-04-04 13:32:17 +00:00
|
|
|
return impl_getUntitledHelper_throw(xComponent)->leaseNumber (xComponent);
|
|
|
|
}
|
|
|
|
|
|
|
|
// css.frame.XUntitledNumbers
|
|
|
|
void SAL_CALL ODatabaseDocument::releaseNumber( ::sal_Int32 nNumber )
|
|
|
|
throw (lang::IllegalArgumentException,
|
|
|
|
uno::RuntimeException )
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-04-04 13:32:17 +00:00
|
|
|
impl_getUntitledHelper_throw()->releaseNumber (nNumber);
|
|
|
|
}
|
|
|
|
|
|
|
|
// css.frame.XUntitledNumbers
|
|
|
|
void SAL_CALL ODatabaseDocument::releaseNumberForComponent( const uno::Reference< uno::XInterface >& xComponent )
|
|
|
|
throw (lang::IllegalArgumentException,
|
|
|
|
uno::RuntimeException )
|
|
|
|
{
|
2008-10-16 06:57:26 +00:00
|
|
|
DocumentGuard aGuard( *this );
|
2008-04-04 13:32:17 +00:00
|
|
|
impl_getUntitledHelper_throw(xComponent)->releaseNumberForComponent (xComponent);
|
|
|
|
}
|
|
|
|
|
|
|
|
// css.frame.XUntitledNumbers
|
2013-01-08 19:46:57 -02:00
|
|
|
OUString SAL_CALL ODatabaseDocument::getUntitledPrefix() throw (uno::RuntimeException)
|
2008-04-04 13:32:17 +00:00
|
|
|
{
|
2013-01-08 19:46:57 -02:00
|
|
|
return OUString();
|
2008-04-04 13:32:17 +00:00
|
|
|
}
|
2005-12-21 12:34:54 +00:00
|
|
|
|
2004-08-02 14:09:11 +00:00
|
|
|
} // namespace dbaccess
|
2013-08-17 23:43:14 +02:00
|
|
|
|
2010-10-12 15:59:03 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|