Files
libreoffice/dbaccess/source/core/dataaccess/databasedocument.hxx

739 lines
38 KiB
C++
Raw Normal View History

2010-10-27 12:33:13 +01: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 .
*/
#ifndef INCLUDED_DBACCESS_SOURCE_CORE_DATAACCESS_DATABASEDOCUMENT_HXX
#define INCLUDED_DBACCESS_SOURCE_CORE_DATAACCESS_DATABASEDOCUMENT_HXX
#include <sal/config.h>
#include <map>
#include "ModelImpl.hxx"
2008-10-16 06:57:26 +00:00
#include "documenteventnotifier.hxx"
#include <com/sun/star/document/XDocumentSubStorageSupplier.hpp>
#include <com/sun/star/frame/XModel2.hpp>
#include <com/sun/star/frame/XTitle.hpp>
#include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
#include <com/sun/star/frame/XUntitledNumbers.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/sdb/XReportDocumentsSupplier.hpp>
#include <com/sun/star/sdb/XFormDocumentsSupplier.hpp>
#include <com/sun/star/view/XPrintable.hpp>
#include <com/sun/star/frame/XModuleManager2.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
#include <com/sun/star/embed/XTransactionListener.hpp>
#include <com/sun/star/document/XStorageBasedDocument.hpp>
#include <com/sun/star/document/XEmbeddedScripts.hpp>
2008-10-16 06:57:26 +00:00
#include <com/sun/star/document/XEventsSupplier.hpp>
#include <com/sun/star/document/XScriptInvocationContext.hpp>
#include <com/sun/star/script/XStorageBasedLibraryContainer.hpp>
#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
2008-10-16 06:57:26 +00:00
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/document/XEventBroadcaster.hpp>
#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
#include <com/sun/star/document/XDocumentRecovery.hpp>
#include <com/sun/star/ui/XUIConfigurationManager2.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/util/XModifiable.hpp>
#include <cppuhelper/compbase.hxx>
2008-10-16 06:57:26 +00:00
#include <cppuhelper/implbase3.hxx>
#include <rtl/ref.hxx>
namespace comphelper {
class NamedValueCollection;
}
namespace dbaccess
{
2008-10-16 06:57:26 +00:00
class DocumentEvents;
class DocumentEventExecutor;
class DocumentGuard;
typedef ::std::vector< css::uno::Reference< css::frame::XController > > Controllers;
// ViewMonitor
2008-10-16 06:57:26 +00:00
/** helper class monitoring the views of a document, and firing appropriate events
when views are attached / detached
*/
class ViewMonitor
2008-10-16 06:57:26 +00:00
{
public:
explicit ViewMonitor( DocumentEventNotifier& _rEventNotifier )
2008-10-16 06:57:26 +00:00
:m_rEventNotifier( _rEventNotifier )
,m_bIsNewDocument( true )
,m_bEverHadController( false )
,m_bLastIsFirstEverController( false )
,m_xLastConnectedController()
{
}
ViewMonitor(const ViewMonitor&) = delete;
const ViewMonitor& operator=(const ViewMonitor&) = delete;
2008-10-16 06:57:26 +00:00
void reset()
{
m_bEverHadController = false;
m_bLastIsFirstEverController = false;
m_xLastConnectedController.clear();
}
/** to be called when a view (aka controller) has been connected to the document
@return
<TRUE/> if and only if this was the first-ever controller connected to the document
*/
bool onControllerConnected(
const css::uno::Reference< css::frame::XController >& _rxController
2008-10-16 06:57:26 +00:00
);
/** to be called when a controller is set as current controller
@return <TRUE/>
if and only if the controller connection indicates that loading the document is finished. This
is the case if the given controller has previously been connected, and it was the first controller
ever for which this happened.
2008-10-16 06:57:26 +00:00
*/
bool onSetCurrentController(
const css::uno::Reference< css::frame::XController >& _rxController
2008-10-16 06:57:26 +00:00
);
void onLoadedDocument() { m_bIsNewDocument = false; }
private:
DocumentEventNotifier& m_rEventNotifier;
bool m_bIsNewDocument;
bool m_bEverHadController;
bool m_bLastIsFirstEverController;
css::uno::Reference< css::frame::XController >
2008-10-16 06:57:26 +00:00
m_xLastConnectedController;
};
// ODatabaseDocument
typedef cppu::PartialWeakComponentImplHelper< css::frame::XModel2
, css::util::XModifiable
, css::frame::XStorable
, css::document::XEventBroadcaster
, css::document::XDocumentEventBroadcaster
, css::view::XPrintable
, css::util::XCloseable
, css::lang::XServiceInfo
, css::sdb::XOfficeDatabaseDocument
, css::ui::XUIConfigurationManagerSupplier
, css::document::XStorageBasedDocument
, css::document::XEmbeddedScripts
, css::document::XScriptInvocationContext
, css::script::provider::XScriptProviderSupplier
, css::document::XEventsSupplier
, css::frame::XLoadable
, css::document::XDocumentRecovery
> ODatabaseDocument_OfficeDocument;
typedef ::cppu::ImplHelper3< css::frame::XTitle
, css::frame::XTitleChangeBroadcaster
, css::frame::XUntitledNumbers
> ODatabaseDocument_Title;
class ODatabaseDocument :public ModelDependentComponent // ModelDependentComponent must be first!
,public ODatabaseDocument_OfficeDocument
,public ODatabaseDocument_Title
{
2008-10-16 06:57:26 +00:00
enum InitState
{
NotInitialized,
Initializing,
Initialized
};
typedef std::map< OUString, css::uno::Reference< css::frame::XUntitledNumbers > > TNumberedController;
css::uno::Reference< css::ui::XUIConfigurationManager2> m_xUIConfigurationManager;
::comphelper::OInterfaceContainerHelper2 m_aModifyListeners;
::comphelper::OInterfaceContainerHelper2 m_aCloseListener;
::comphelper::OInterfaceContainerHelper2 m_aStorageListeners;
2008-10-16 06:57:26 +00:00
DocumentEvents* m_pEventContainer;
::rtl::Reference< DocumentEventExecutor > m_pEventExecutor;
DocumentEventNotifier m_aEventNotifier;
css::uno::Reference< css::frame::XController > m_xCurrentController;
Controllers m_aControllers;
2008-10-16 06:57:26 +00:00
ViewMonitor m_aViewMonitor;
css::uno::WeakReference< css::container::XNameAccess > m_xForms;
css::uno::WeakReference< css::container::XNameAccess > m_xReports;
css::uno::WeakReference< css::script::provider::XScriptProvider > m_xScriptProvider;
2008-10-16 06:57:26 +00:00
/** @short such module manager is used to classify new opened documents. */
css::uno::Reference< css::frame::XModuleManager2 > m_xModuleManager;
css::uno::Reference< css::frame::XTitle > m_xTitleHelper;
2008-10-16 06:57:26 +00:00
TNumberedController m_aNumberedControllers;
/** true if and only if the DatabaseDocument's "initNew" or "load" have been called (or, well,
the document has be initialized implicitly - see storeAsURL
*/
InitState m_eInitState;
bool m_bClosing;
bool m_bAllowDocumentScripting;
bool m_bHasBeenRecovered;
/// If XModel::attachResource() was called to inform us that the document is embedded into an other one.
bool m_bEmbedded;
2008-10-16 06:57:26 +00:00
enum StoreType { SAVE, SAVE_AS };
/** stores the document to the given URL, rebases it to the respective new storage, if necessary, resets
the modified flag, and notifies any listeners as required
2008-10-16 06:57:26 +00:00
@param _rURL
the URL to store the document to
@param _rArguments
arguments for storing the document (MediaDescriptor)
@param _eType
the type of the store process (Save or SaveAs). The method will automatically
notify the proper events for this type.
@param _rGuard
the instance lock to be released before doing synchronous notifications
*/
void impl_storeAs_throw(
const OUString& _rURL,
const ::comphelper::NamedValueCollection& _rArguments,
2008-10-16 06:57:26 +00:00
const StoreType _eType,
DocumentGuard& _rGuard
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
)
throw (css::io::IOException,
css::uno::RuntimeException,
std::exception);
/** notifies our storage change listeners that our underlying storage changed
@param _rxNewRootStorage
the new root storage to be notified. If <NULL/>, it is assumed that no storage change actually
happened, and the listeners are not notified.
*/
void impl_notifyStorageChange_nolck_nothrow(
const css::uno::Reference< css::embed::XStorage >& _rxNewRootStorage
);
/// write a single XML stream into the package
void WriteThroughComponent(
const css::uno::Reference< css::lang::XComponent > & xComponent, /// the component we export
const sal_Char* pStreamName, /// the stream name
const sal_Char* pServiceName, /// service name of the component
const css::uno::Sequence< css::uno::Any> & rArguments, /// the argument (XInitialization)
const css::uno::Sequence< css::beans::PropertyValue> & rMediaDesc,/// output descriptor
const css::uno::Reference< css::embed::XStorage >& _xStorageToSaveTo
) const;
/// write a single output stream
/// (to be called either directly or by WriteThroughComponent(...))
void WriteThroughComponent(
const css::uno::Reference< css::io::XOutputStream >& xOutputStream,
const css::uno::Reference< css::lang::XComponent >& xComponent,
const sal_Char* pServiceName,
const css::uno::Sequence< css::uno::Any >& rArguments,
const css::uno::Sequence< css::beans::PropertyValue> & rMediaDesc
) const;
/** writes the content and settings
@param sURL
The URL
@param lArguments
The media descriptor
@param _xStorageToSaveTo
The storage which should be used for saving
*/
void impl_writeStorage_throw(
const css::uno::Reference< css::embed::XStorage >& _rxTargetStorage,
const ::comphelper::NamedValueCollection& _rMediaDescriptor
) const;
// ModelDependentComponent overridables
virtual css::uno::Reference< css::uno::XInterface > getThis() const override;
css::uno::Reference< css::frame::XTitle > impl_getTitleHelper_throw();
css::uno::Reference< css::frame::XUntitledNumbers > impl_getUntitledHelper_throw(
const css::uno::Reference< css::uno::XInterface >& _xComponent = css::uno::Reference< css::uno::XInterface >());
private:
explicit ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>& _pImpl);
// Do NOT create those documents directly, always use ODatabaseModelImpl::getModel. Reason is that
// ODatabaseDocument requires clear ownership, and in turn lifetime synchronisation with the ModelImpl.
// If you create a ODatabaseDocument directly, you might easily create a leak.
2011-02-27 22:55:22 +01:00
// #i50905#
protected:
virtual void SAL_CALL disposing() override;
virtual ~ODatabaseDocument();
public:
struct FactoryAccess { friend class ODatabaseModelImpl; private: FactoryAccess() { } };
static ODatabaseDocument* createDatabaseDocument( const ::rtl::Reference<ODatabaseModelImpl>& _pImpl, FactoryAccess /*accessControl*/ )
{
return new ODatabaseDocument( _pImpl );
}
// XServiceInfo
virtual OUString SAL_CALL getImplementationName( ) throw(css::uno::RuntimeException, std::exception) override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(css::uno::RuntimeException, std::exception) override;
// XInterface
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& _rType) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL acquire( ) throw () override;
virtual void SAL_CALL release( ) throw () override;
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) throw (css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (css::uno::RuntimeException, std::exception) override;
// XComponent
virtual void SAL_CALL dispose( ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) throw (css::uno::RuntimeException, std::exception) override;
// XModel
virtual sal_Bool SAL_CALL attachResource( const OUString& URL, const css::uno::Sequence< css::beans::PropertyValue >& Arguments ) throw (css::uno::RuntimeException, std::exception) override ;
virtual OUString SAL_CALL getURL( ) throw (css::uno::RuntimeException, std::exception) override ;
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getArgs( ) throw (css::uno::RuntimeException, std::exception) override ;
virtual void SAL_CALL connectController( const css::uno::Reference< css::frame::XController >& Controller ) throw (css::uno::RuntimeException, std::exception) override ;
virtual void SAL_CALL disconnectController( const css::uno::Reference< css::frame::XController >& Controller ) throw (css::uno::RuntimeException, std::exception) override ;
virtual void SAL_CALL lockControllers( ) throw (css::uno::RuntimeException, std::exception) override ;
virtual void SAL_CALL unlockControllers( ) throw (css::uno::RuntimeException, std::exception) override ;
virtual sal_Bool SAL_CALL hasControllersLocked( ) throw (css::uno::RuntimeException, std::exception) override ;
virtual css::uno::Reference< css::frame::XController > SAL_CALL getCurrentController( ) throw (css::uno::RuntimeException, std::exception) override ;
virtual void SAL_CALL setCurrentController( const css::uno::Reference< css::frame::XController >& Controller ) throw (css::container::NoSuchElementException, css::uno::RuntimeException, std::exception) override ;
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getCurrentSelection( ) throw (css::uno::RuntimeException, std::exception) override ;
2008-10-16 06:57:26 +00:00
// XModel2
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL getControllers( ) throw (css::uno::RuntimeException, std::exception) override ;
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableViewControllerNames( ) throw (css::uno::RuntimeException, std::exception) override ;
virtual css::uno::Reference< css::frame::XController2 > SAL_CALL createDefaultViewController( const css::uno::Reference< css::frame::XFrame >& Frame ) throw (css::lang::IllegalArgumentException, css::uno::Exception, css::uno::RuntimeException, std::exception) override ;
virtual css::uno::Reference< css::frame::XController2 > SAL_CALL createViewController( const OUString& ViewName, const css::uno::Sequence< css::beans::PropertyValue >& Arguments, const css::uno::Reference< css::frame::XFrame >& Frame ) throw (css::lang::IllegalArgumentException, css::uno::Exception, css::uno::RuntimeException, std::exception) override ;
2008-10-16 06:57:26 +00:00
// XStorable
virtual sal_Bool SAL_CALL hasLocation( ) throw (css::uno::RuntimeException, std::exception) override ;
virtual OUString SAL_CALL getLocation( ) throw (css::uno::RuntimeException, std::exception) override ;
virtual sal_Bool SAL_CALL isReadonly( ) throw (css::uno::RuntimeException, std::exception) override ;
virtual void SAL_CALL store( ) throw (css::io::IOException, css::uno::RuntimeException, std::exception) override ;
virtual void SAL_CALL storeAsURL( const OUString& sURL, const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw (css::io::IOException, css::uno::RuntimeException, std::exception) override ;
virtual void SAL_CALL storeToURL( const OUString& sURL, const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw (css::io::IOException, css::uno::RuntimeException, std::exception) override ;
2008-10-16 06:57:26 +00:00
// XModifyBroadcaster
virtual void SAL_CALL addModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL removeModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) throw (css::uno::RuntimeException, std::exception) override;
// css::util::XModifiable
virtual sal_Bool SAL_CALL isModified( ) throw (css::uno::RuntimeException, std::exception) override ;
virtual void SAL_CALL setModified( sal_Bool bModified ) throw (css::beans::PropertyVetoException, css::uno::RuntimeException, std::exception) override ;
2008-10-16 06:57:26 +00:00
// XEventBroadcaster
virtual void SAL_CALL addEventListener( const css::uno::Reference< css::document::XEventListener >& aListener ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::document::XEventListener >& aListener ) throw (css::uno::RuntimeException, std::exception) override;
2008-10-16 06:57:26 +00:00
// XDocumentEventBroadcaster
virtual void SAL_CALL addDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& _Listener ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL removeDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& _Listener ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL notifyDocumentEvent( const OUString& _EventName, const css::uno::Reference< css::frame::XController2 >& _ViewController, const css::uno::Any& _Supplement ) throw (css::lang::IllegalArgumentException, css::lang::NoSupportException, css::uno::RuntimeException, std::exception) override;
2008-10-16 06:57:26 +00:00
// XPrintable
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getPrinter( ) throw (css::uno::RuntimeException, std::exception) override ;
virtual void SAL_CALL setPrinter( const css::uno::Sequence< css::beans::PropertyValue >& aPrinter ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override ;
virtual void SAL_CALL print( const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override ;
2008-10-16 06:57:26 +00:00
// XFormDocumentsSupplier
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getFormDocuments( ) throw (css::uno::RuntimeException, std::exception) override;
2008-10-16 06:57:26 +00:00
// XReportDocumentsSupplier
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getReportDocuments( ) throw (css::uno::RuntimeException, std::exception) override;
2008-10-16 06:57:26 +00:00
// XCloseable
virtual void SAL_CALL close( sal_Bool DeliverOwnership ) throw (css::util::CloseVetoException, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL addCloseListener( const css::uno::Reference< css::util::XCloseListener >& Listener ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL removeCloseListener( const css::uno::Reference< css::util::XCloseListener >& Listener ) throw (css::uno::RuntimeException, std::exception) override;
2008-10-16 06:57:26 +00:00
// XUIConfigurationManagerSupplier
virtual css::uno::Reference< css::ui::XUIConfigurationManager > SAL_CALL getUIConfigurationManager( ) throw (css::uno::RuntimeException, std::exception) override;
2008-10-16 06:57:26 +00:00
// XDocumentSubStorageSupplier
virtual css::uno::Reference< css::embed::XStorage > SAL_CALL getDocumentSubStorage( const OUString& aStorageName, sal_Int32 nMode ) throw (css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< OUString > SAL_CALL getDocumentSubStoragesNames( ) throw (css::io::IOException, css::uno::RuntimeException, std::exception) override;
// XOfficeDatabaseDocument
virtual css::uno::Reference< css::sdbc::XDataSource > SAL_CALL getDataSource() throw (css::uno::RuntimeException, std::exception) override;
// XStorageBasedDocument
virtual void SAL_CALL loadFromStorage( const css::uno::Reference< css::embed::XStorage >& xStorage, const css::uno::Sequence< css::beans::PropertyValue >& aMediaDescriptor ) throw (css::lang::IllegalArgumentException, css::frame::DoubleInitializationException, css::io::IOException, css::uno::Exception, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL storeToStorage( const css::uno::Reference< css::embed::XStorage >& xStorage, const css::uno::Sequence< css::beans::PropertyValue >& aMediaDescriptor ) throw (css::lang::IllegalArgumentException, css::io::IOException, css::uno::Exception, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL switchToStorage( const css::uno::Reference< css::embed::XStorage >& xStorage ) throw (css::lang::IllegalArgumentException, css::io::IOException, css::uno::Exception, css::uno::RuntimeException, std::exception) override;
virtual css::uno::Reference< css::embed::XStorage > SAL_CALL getDocumentStorage( ) throw (css::io::IOException, css::uno::Exception, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL addStorageChangeListener( const css::uno::Reference< css::document::XStorageChangeListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL removeStorageChangeListener( const css::uno::Reference< css::document::XStorageChangeListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override;
// XEmbeddedScripts
virtual css::uno::Reference< css::script::XStorageBasedLibraryContainer > SAL_CALL getBasicLibraries() throw (css::uno::RuntimeException, std::exception) override;
virtual css::uno::Reference< css::script::XStorageBasedLibraryContainer > SAL_CALL getDialogLibraries() throw (css::uno::RuntimeException, std::exception) override;
virtual sal_Bool SAL_CALL getAllowMacroExecution() throw (css::uno::RuntimeException, std::exception) override;
// XScriptInvocationContext
virtual css::uno::Reference< css::document::XEmbeddedScripts > SAL_CALL getScriptContainer() throw (css::uno::RuntimeException, std::exception) override;
// XScriptProviderSupplier
virtual css::uno::Reference< css::script::provider::XScriptProvider > SAL_CALL getScriptProvider( ) throw (css::uno::RuntimeException, std::exception) override;
2008-10-16 06:57:26 +00:00
// XEventsSupplier
virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents( ) throw (css::uno::RuntimeException, std::exception) override;
2008-10-16 06:57:26 +00:00
// XLoadable
virtual void SAL_CALL initNew( ) throw (css::frame::DoubleInitializationException, css::io::IOException, css::uno::Exception, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL load( const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw (css::frame::DoubleInitializationException, css::io::IOException, css::uno::Exception, css::uno::RuntimeException, std::exception) override;
2008-10-16 06:57:26 +00:00
// css.document.XDocumentRecovery
virtual sal_Bool SAL_CALL wasModifiedSinceLastSave() throw ( css::uno::RuntimeException, std::exception ) override;
virtual void SAL_CALL storeToRecoveryFile( const OUString& i_TargetLocation, const css::uno::Sequence< css::beans::PropertyValue >& i_MediaDescriptor ) throw ( css::uno::RuntimeException, css::io::IOException, css::lang::WrappedTargetException, std::exception ) override;
virtual void SAL_CALL recoverFromFile( const OUString& i_SourceLocation, const OUString& i_SalvagedFile, const css::uno::Sequence< css::beans::PropertyValue >& i_MediaDescriptor ) throw ( css::uno::RuntimeException, css::io::IOException, css::lang::WrappedTargetException, std::exception ) override;
// XTitle
virtual OUString SAL_CALL getTitle( ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL setTitle( const OUString& sTitle ) throw (css::uno::RuntimeException, std::exception) override;
// XTitleChangeBroadcaster
virtual void SAL_CALL addTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL removeTitleChangeListener( const css::uno::Reference< css::frame::XTitleChangeListener >& xListener ) throw (css::uno::RuntimeException, std::exception) override;
// XUntitledNumbers
virtual ::sal_Int32 SAL_CALL leaseNumber( const css::uno::Reference< css::uno::XInterface >& xComponent ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL releaseNumber( ::sal_Int32 nNumber ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL releaseNumberForComponent( const css::uno::Reference< css::uno::XInterface >& xComponent ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override;
virtual OUString SAL_CALL getUntitledPrefix( ) throw (css::uno::RuntimeException, std::exception) override;
/** clears the given object container
Clearing is done via disposal - the method calls XComponent::dispose at the given object,
which must be one of our impl's or our object containers (m_xForms, m_xReports,
m_xTableDefinitions, m_xCommandDefinitions)
@param _rxContainer
the container to clear
*/
static void clearObjectContainer(
css::uno::WeakReference< css::container::XNameAccess >& _rxContainer);
2008-10-16 06:57:26 +00:00
/** checks whether the component is already initialized, throws a NotInitializedException if not
*/
inline void checkInitialized() const
{
if ( !impl_isInitialized() )
throw css::lang::NotInitializedException( OUString(), getThis() );
2008-10-16 06:57:26 +00:00
}
/** checks the document is currently in the initialization phase, or already initialized.
Throws NotInitializedException if not so.
*/
inline void checkNotUninitilized() const
{
if ( impl_isInitialized() || impl_isInitializing() )
// fine
return;
throw css::lang::NotInitializedException( OUString(), getThis() );
2008-10-16 06:57:26 +00:00
}
/** checks whether the document is currently being initialized, or already initialized,
throws a DoubleInitializationException if so
*/
inline void checkNotInitialized() const
{
if ( impl_isInitializing() || impl_isInitialized() )
throw css::frame::DoubleInitializationException( OUString(), getThis() );
2008-10-16 06:57:26 +00:00
}
private:
css::uno::Reference< css::ui::XUIConfigurationManager2 > getUIConfigurationManager2() throw (css::uno::RuntimeException);
2008-10-16 06:57:26 +00:00
/** returns whether the model is currently being initialized
*/
bool impl_isInitializing() const { return m_eInitState == Initializing; }
/** returns whether the model is already initialized, i.e. the XModel's "initNew" or "load" methods have been called
*/
bool impl_isInitialized() const { return m_eInitState == Initialized; }
/// tells the model it is being initialized now
void impl_setInitializing() { m_eInitState = Initializing; }
/// tells the model its initialization is done
void impl_setInitialized();
/** closes the frames of all connected controllers
@param _bDeliverOwnership
Many spelling fixes: directories a* - g*. Attempt to clean up most but certainly not all the spelling mistakes that found home in OpenOffice through decades. We could probably blame the international nature of the code but it is somewhat shameful that this wasn't done before. (cherry picked from commit a6efc99d19d533fcf53106b6667bafba4d364370) Conflicts: accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java accessibility/bridge/org/openoffice/java/accessibility/Component.java accessibility/bridge/org/openoffice/java/accessibility/Container.java accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java accessibility/bridge/org/openoffice/java/accessibility/Dialog.java accessibility/bridge/org/openoffice/java/accessibility/Frame.java accessibility/bridge/org/openoffice/java/accessibility/List.java accessibility/bridge/org/openoffice/java/accessibility/Menu.java accessibility/bridge/org/openoffice/java/accessibility/Table.java accessibility/bridge/org/openoffice/java/accessibility/Tree.java accessibility/bridge/org/openoffice/java/accessibility/Window.java accessibility/bridge/source/java/WindowsAccessBridgeAdapter.cxx accessibility/inc/accessibility/extended/AccessibleBrowseBoxBase.hxx accessibility/inc/accessibility/extended/AccessibleGridControlBase.hxx accessibility/inc/accessibility/standard/vclxaccessiblebox.hxx accessibility/source/extended/accessibleiconchoicectrlentry.cxx accessibility/source/extended/accessiblelistboxentry.cxx accessibility/source/extended/accessibletablistbox.cxx accessibility/source/extended/accessibletablistboxtable.cxx accessibility/workben/org/openoffice/accessibility/awb/canvas/Canvas.java accessibility/workben/org/openoffice/accessibility/misc/OfficeConnection.java apple_remote/AppleRemote.m autodoc/inc/ary/cpp/c_gate.hxx autodoc/inc/ary/cpp/cp_ce.hxx autodoc/inc/ary/cpp/cp_def.hxx autodoc/inc/ary/cpp/cp_type.hxx autodoc/inc/ary/doc/d_parametrized.hxx autodoc/inc/ary/idl/i_type.hxx autodoc/source/ary/inc/cross_refs.hxx autodoc/source/ary/inc/sorted_idset.hxx autodoc/source/display/html/outfile.hxx autodoc/source/display/html/pagemake.cxx autodoc/source/display/idl/hi_env.hxx autodoc/source/parser/inc/tokens/tokproct.hxx autodoc/source/parser_i/inc/s2_luidl/tokproct.hxx autodoc/source/parser_i/inc/tokens/tkp2.hxx automation/inc/automation/commtypes.hxx automation/inc/automation/simplecm.hxx automation/source/server/recorder.cxx automation/source/server/recorder.hxx automation/source/server/statemnt.cxx automation/source/simplecm/packethandler.hxx automation/source/simplecm/simplecm.cxx avmedia/source/framework/soundhandler.cxx basegfx/inc/basegfx/range/rangeexpander.hxx basic/inc/basic/sbxdef.hxx basic/source/classes/sbunoobj.cxx basic/source/classes/sbxmod.cxx basic/source/comp/dim.cxx basic/source/comp/exprgen.cxx basic/source/runtime/step1.cxx basic/source/runtime/step2.cxx basic/source/sbx/sbxint.cxx basic/source/uno/namecont.cxx basic/workben/mgrtest.cxx bean/com/sun/star/beans/LocalOfficeConnection.java bean/com/sun/star/beans/LocalOfficeWindow.java bean/com/sun/star/comp/beans/LocalOfficeConnection.java bean/com/sun/star/comp/beans/LocalOfficeWindow.java bean/com/sun/star/comp/beans/OOoBean.java bridges/inc/bridges/cpp_uno/bridge.hxx bridges/source/cpp_uno/cc50_solaris_intel/cpp2uno.cxx bridges/source/cpp_uno/cc50_solaris_intel/except.cxx bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx bridges/source/cpp_uno/cc50_solaris_sparc/cpp2uno.cxx bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx bridges/source/cpp_uno/gcc3_macosx_powerpc/cpp2uno.cxx bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx bridges/source/cpp_uno/gcc3_netbsd_intel/cpp2uno.cxx bridges/source/cpp_uno/gcc3_netbsd_intel/except.cxx bridges/source/cpp_uno/gcc3_netbsd_intel/uno2cpp.cxx bridges/source/cpp_uno/gcc3_os2_intel/cpp2uno.cxx bridges/source/cpp_uno/gcc3_os2_intel/except.cxx bridges/source/cpp_uno/gcc3_os2_intel/uno2cpp.cxx bridges/source/cpp_uno/mingw_x86-64/uno2cpp.cxx bridges/source/cpp_uno/msvc_win32_intel/except.cxx bridges/source/cpp_uno/s5abi_macosx_x86-64/except.cxx bridges/source/cpp_uno/shared/component.cxx bridges/source/jni_uno/jni_base.h bridges/source/jni_uno/jni_bridge.cxx bridges/source/jni_uno/jni_java2uno.cxx bridges/source/jni_uno/jni_uno2java.cxx canvas/inc/canvas/base/doublebitmapbase.hxx canvas/inc/canvas/base/floatbitmapbase.hxx canvas/inc/canvas/base/integerbitmapbase.hxx canvas/source/cairo/cairo_canvasbitmap.cxx canvas/source/cairo/cairo_textlayout.cxx chart2/source/controller/dialogs/ObjectNameProvider.cxx chart2/source/view/diagram/VDiagram.cxx chart2/source/view/main/ChartView.cxx cli_ure/source/native/makefile.mk cli_ure/source/uno_bridge/cli_data.cxx codemaker/source/javamaker/javatype.cxx comphelper/inc/comphelper/componentcontext.hxx comphelper/inc/comphelper/interaction.hxx comphelper/inc/comphelper/locale.hxx comphelper/inc/comphelper/string.hxx comphelper/source/container/embeddedobjectcontainer.cxx comphelper/source/misc/accessiblecontexthelper.cxx comphelper/source/misc/asyncnotification.cxx comphelper/source/misc/locale.cxx comphelper/source/misc/mediadescriptor.cxx comphelper/source/misc/numberedcollection.cxx comphelper/source/misc/proxyaggregation.cxx comphelper/source/misc/scopeguard.cxx comphelper/source/misc/sequenceashashmap.cxx configure.in connectivity/source/commontools/parameters.cxx connectivity/source/drivers/dbase/DTable.cxx connectivity/source/drivers/evoab2/NStatement.cxx connectivity/source/drivers/file/FPreparedStatement.cxx connectivity/source/drivers/jdbc/DatabaseMetaData.cxx connectivity/source/inc/flat/ETable.hxx connectivity/source/parse/sqlnode.cxx cosv/inc/cosv/persist.hxx cosv/inc/cosv/ploc_dir.hxx cosv/inc/cosv/tpl/dyn.hxx cppu/source/LogBridge/LogBridge.cxx cppu/source/uno/data.cxx cppuhelper/source/bootstrap.cxx cppuhelper/source/component_context.cxx cppuhelper/source/propshlp.cxx cppuhelper/source/servicefactory.cxx cpputools/source/registercomponent/registercomponent.cxx cui/source/customize/acccfg.cxx cui/source/dialogs/about.cxx cui/source/dialogs/commonlingui.hxx cui/source/dialogs/showcols.cxx cui/source/inc/cuihyperdlg.hxx cui/source/inc/cuitabline.hxx cui/source/options/optsave.src cui/source/tabpages/tpline.cxx cui/source/tabpages/transfrm.cxx dbaccess/source/core/api/CacheSet.cxx dbaccess/source/core/api/KeySet.cxx dbaccess/source/core/api/RowSet.cxx dbaccess/source/core/api/RowSet.hxx dbaccess/source/core/api/RowSetBase.cxx dbaccess/source/core/api/RowSetBase.hxx dbaccess/source/core/api/RowSetCache.cxx dbaccess/source/core/api/querycomposer.cxx dbaccess/source/ext/adabas/Acomponentmodule.hxx dbaccess/source/ui/app/AppControllerDnD.cxx dbaccess/source/ui/app/AppDetailView.cxx dbaccess/source/ui/browser/brwctrlr.cxx dbaccess/source/ui/browser/sbagrid.cxx dbaccess/source/ui/browser/unodatbr.cxx dbaccess/source/ui/dlg/AdabasStat.hxx dbaccess/source/ui/dlg/UserAdmin.cxx dbaccess/source/ui/dlg/directsql.cxx dbaccess/source/ui/dlg/generalpage.hxx dbaccess/source/ui/dlg/tablespage.cxx dbaccess/source/ui/inc/JoinTableView.hxx dbaccess/source/ui/inc/TableController.hxx dbaccess/source/ui/inc/UITools.hxx dbaccess/source/ui/inc/brwctrlr.hxx dbaccess/source/ui/inc/datasourcemap.hxx dbaccess/source/ui/querydesign/JoinTableView.cxx dbaccess/source/ui/querydesign/QueryDesignView.cxx dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx dbaccess/source/ui/querydesign/TableWindow.cxx dbaccess/source/ui/querydesign/querycontroller.cxx dbaccess/source/ui/relationdesign/RelationTableView.cxx dbaccess/source/ui/tabledesign/TableController.cxx desktop/source/app/app.cxx desktop/source/app/appinit.cxx desktop/source/app/langselect.cxx desktop/source/app/officeipcthread.cxx desktop/source/deployment/manager/dp_extensionmanager.cxx desktop/source/deployment/misc/dp_misc.cxx desktop/source/deployment/misc/dp_resource.cxx desktop/source/deployment/registry/dp_backend.cxx desktop/source/deployment/registry/package/dp_package.cxx desktop/source/migration/cfgfilter.cxx desktop/source/migration/migration.cxx desktop/source/splash/splash.cxx desktop/win32/source/QuickStart/QuickStart.cpp desktop/win32/source/setup/setup.cpp drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx dtrans/source/win32/clipb/MtaOleClipb.hxx dtrans/source/win32/clipb/WinClipbImpl.cxx editeng/source/editeng/editview.cxx editeng/source/editeng/impedit2.cxx editeng/source/editeng/impedit3.cxx editeng/source/editeng/impedit4.cxx editeng/source/editeng/textconv.hxx editeng/source/misc/unolingu.cxx embeddedobj/source/commonembedding/persistence.cxx embeddedobj/source/general/dummyobject.cxx embeddedobj/source/msole/olecomponent.cxx embeddedobj/source/msole/olepersist.cxx embeddedobj/test/Container1/NativeView.java extensions/source/bibliography/framectr.cxx extensions/source/macosx/spotlight/OOoContentDataParser.m extensions/source/macosx/spotlight/unzip.h extensions/source/macosx/spotlight/unzip.m extensions/source/oooimprovement/myconfigurationhelper.hxx extensions/source/propctrlr/eventhandler.cxx extensions/source/propctrlr/formcomponenthandler.cxx extensions/source/propctrlr/pcrcomponentcontext.hxx extensions/source/scanner/twain.cxx extensions/source/update/check/updatecheckconfig.hxx external/mingwheaders/mingw_atl_headers.patch extras/source/misc_config/wizard/web/layouts/source.xml.xsl fileaccess/source/FileAccess.cxx filter/inc/filter/msfilter/msocximex.hxx filter/inc/filter/msfilter/svxmsbas.hxx filter/qa/complex/filter/detection/typeDetection/Helper.java filter/source/config/cache/basecontainer.cxx filter/source/config/cache/cacheitem.hxx filter/source/config/cache/contenthandlerfactory.cxx filter/source/config/cache/filtercache.cxx filter/source/config/cache/filtercache.hxx filter/source/config/cache/filterfactory.cxx filter/source/config/cache/frameloaderfactory.cxx filter/source/config/cache/querytokenizer.hxx filter/source/config/cache/typedetection.cxx filter/source/config/cache/typedetection.hxx filter/source/config/cache/versions.hxx filter/source/config/fragments/makefile.mk filter/source/config/tools/merge/pyAltFCFGMerge filter/source/flash/swfwriter.cxx filter/source/flash/swfwriter1.cxx filter/source/msfilter/msdffimp.cxx filter/source/msfilter/msocximex.cxx filter/source/msfilter/msvbahelper.cxx filter/source/msfilter/svxmsbas.cxx filter/source/xmlfilterdetect/filterdetect.cxx filter/source/xslt/import/uof2/uof2odf.xsl filter/source/xslt/odf2xhtml/export/xhtml/body.xsl filter/source/xsltfilter/com/sun/star/comp/xsltfilter/Base64.java forms/source/xforms/convert.hxx forms/source/xforms/model.cxx fpicker/source/aqua/SalAquaFilePicker.mm fpicker/source/office/fpinteraction.cxx fpicker/source/unx/gnome/SalGtkFolderPicker.cxx fpicker/source/unx/kde4/KDE4FilePicker.cxx fpicker/source/win32/filepicker/PreviewCtrl.cxx fpicker/source/win32/filepicker/PreviewCtrl.hxx fpicker/source/win32/filepicker/VistaFilePicker.cxx fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx fpicker/source/win32/filepicker/helppopupwindow.hxx fpicker/source/win32/folderpicker/MtaFop.hxx framework/inc/classes/droptargetlistener.hxx framework/inc/classes/filtercache.hxx framework/inc/classes/filtercachedata.hxx framework/inc/classes/protocolhandlercache.hxx framework/inc/classes/servicemanager.hxx framework/inc/commands.h framework/inc/dispatch/basedispatcher.hxx framework/inc/dispatch/blankdispatcher.hxx framework/inc/dispatch/closedispatcher.hxx framework/inc/dispatch/createdispatcher.hxx framework/inc/dispatch/dispatchprovider.hxx framework/inc/dispatch/helpagentdispatcher.hxx framework/inc/dispatch/mailtodispatcher.hxx framework/inc/dispatch/menudispatcher.hxx framework/inc/dispatch/oxt_handler.hxx framework/inc/dispatch/popupmenudispatcher.hxx framework/inc/dispatch/selfdispatcher.hxx framework/inc/dispatch/servicehandler.hxx framework/inc/dispatch/startmoduledispatcher.hxx framework/inc/dispatch/systemexec.hxx framework/inc/helper/fixeddocumentproperties.hxx framework/inc/helper/ocomponentaccess.hxx framework/inc/helper/oframes.hxx framework/inc/helper/otasksenumeration.hxx framework/inc/helper/persistentwindowstate.hxx framework/inc/helper/statusindicator.hxx framework/inc/helper/statusindicatorfactory.hxx framework/inc/helper/tagwindowasmodified.hxx framework/inc/helper/titlebarupdate.hxx framework/inc/helper/vclstatusindicator.hxx framework/inc/interaction/quietinteraction.hxx framework/inc/jobs/helponstartup.hxx framework/inc/jobs/job.hxx framework/inc/jobs/jobdata.hxx framework/inc/jobs/jobexecutor.hxx framework/inc/loadstate.h framework/inc/macros/debug/assertion.hxx framework/inc/macros/debug/event.hxx framework/inc/macros/debug/filterdbg.hxx framework/inc/macros/debug/memorymeasure.hxx framework/inc/macros/debug/timemeasure.hxx framework/inc/macros/xserviceinfo.hxx framework/inc/queries.h framework/inc/recording/dispatchrecordersupplier.hxx framework/inc/services/autorecovery.hxx framework/inc/services/backingcomp.hxx framework/inc/services/contenthandlerfactory.hxx framework/inc/services/desktop.hxx framework/inc/services/detectorfactory.hxx framework/inc/services/frame.hxx framework/inc/services/frameloaderfactory.hxx framework/inc/services/layoutmanager.hxx framework/inc/services/license.hxx framework/inc/services/logindialog.hxx framework/inc/services/modulemanager.hxx framework/inc/services/pathsettings.hxx framework/inc/services/pluginframe.hxx framework/inc/services/substitutepathvars.hxx framework/inc/services/task.hxx framework/inc/services/taskcreatorsrv.hxx framework/inc/stdtypes.h framework/inc/threadhelp/fairrwlock.hxx framework/inc/threadhelp/inoncopyable.h framework/inc/threadhelp/itransactionmanager.h framework/inc/threadhelp/lockhelper.hxx framework/inc/threadhelp/readguard.hxx framework/inc/threadhelp/resetableguard.hxx framework/inc/threadhelp/transactionguard.hxx framework/inc/threadhelp/writeguard.hxx framework/inc/uifactory/uielementfactorymanager.hxx framework/inc/xml/acceleratorconfigurationreader.hxx framework/qa/complex/dispatches/checkdispatchapi.java framework/qa/complex/framework/autosave/AutoSave.java framework/qa/complex/framework/autosave/Protocol.java framework/qa/complex/framework/recovery/RecoveryTest.java framework/qa/complex/loadAllDocuments/StreamSimulator.java framework/source/accelerators/acceleratorconfiguration.cxx framework/source/accelerators/acceleratorexecute.cxx framework/source/accelerators/acceleratorexecute.hxx framework/source/accelerators/keymapping.cxx framework/source/accelerators/presethandler.cxx framework/source/application/framework.cxx framework/source/application/login.cxx framework/source/classes/framecontainer.cxx framework/source/classes/menumanager.cxx framework/source/classes/taskcreator.cxx framework/source/dispatch/closedispatcher.cxx framework/source/dispatch/dispatchprovider.cxx framework/source/dispatch/helpagentdispatcher.cxx framework/source/dispatch/interceptionhelper.cxx framework/source/dispatch/mailtodispatcher.cxx framework/source/dispatch/menudispatcher.cxx framework/source/dispatch/oxt_handler.cxx framework/source/dispatch/servicehandler.cxx framework/source/fwe/classes/framelistanalyzer.cxx framework/source/fwe/dispatch/interaction.cxx framework/source/fwe/helper/titlehelper.cxx framework/source/fwe/helper/undomanagerhelper.cxx framework/source/fwe/xml/eventsdocumenthandler.cxx framework/source/fwe/xml/statusbardocumenthandler.cxx framework/source/fwe/xml/toolboxdocumenthandler.cxx framework/source/fwi/classes/protocolhandlercache.cxx framework/source/fwi/threadhelp/lockhelper.cxx framework/source/fwi/threadhelp/transactionmanager.cxx framework/source/helper/persistentwindowstate.cxx framework/source/helper/statusindicatorfactory.cxx framework/source/helper/vclstatusindicator.cxx framework/source/inc/accelerators/acceleratorcache.hxx framework/source/inc/accelerators/acceleratorconfiguration.hxx framework/source/inc/accelerators/presethandler.hxx framework/source/inc/accelerators/storageholder.hxx framework/source/inc/loadenv/actionlockguard.hxx framework/source/inc/loadenv/loadenv.hxx framework/source/inc/loadenv/loadenvexception.hxx framework/source/inc/pattern/frame.hxx framework/source/inc/pattern/storages.hxx framework/source/inc/pattern/window.hxx framework/source/jobs/helponstartup.cxx framework/source/jobs/job.cxx framework/source/jobs/jobdata.cxx framework/source/jobs/jobdispatch.cxx framework/source/jobs/jobresult.cxx framework/source/jobs/joburl.cxx framework/source/jobs/shelljob.cxx framework/source/loadenv/loadenv.cxx framework/source/services/autorecovery.cxx framework/source/services/backingwindow.cxx framework/source/services/desktop.cxx framework/source/services/frame.cxx framework/source/services/modulemanager.cxx framework/source/services/pathsettings.cxx framework/source/services/substitutepathvars.cxx framework/source/uiconfiguration/moduleuicfgsupplier.cxx framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx framework/source/uiconfiguration/uicategorydescription.cxx framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx framework/source/uiconfiguration/windowstateconfiguration.cxx framework/source/uielement/uicommanddescription.cxx framework/source/unotypes/fwk.xml framework/source/xml/imagesdocumenthandler.cxx framework/test/test.cxx framework/test/test_componentenumeration.bas framework/test/test_statusindicatorfactory.bas framework/test/threadtest.cxx framework/test/threadtest/threadtest.cxx framework/test/typecfg/cfgview.cxx framework/test/typecfg/xml2xcd.cxx include/basegfx/polygon/b2dpolygon.hxx include/canvas/base/graphicdevicebase.hxx include/canvas/canvastools.hxx include/comphelper/configurationhelper.hxx include/comphelper/embeddedobjectcontainer.hxx include/comphelper/propagg.hxx include/comphelper/sequenceashashmap.hxx include/connectivity/sqlerror.hxx include/connectivity/sqlnode.hxx include/cppuhelper/propshlp.hxx include/editeng/AccessibleContextBase.hxx include/framework/framelistanalyzer.hxx sfx2/source/dialog/backingcomp.cxx vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx Change-Id: I2618bf83c0e30f68f23ff25f6eb466df04d34c6d
2014-04-29 19:05:05 +00:00
determines if the ownership should be transferred to the component which
possibly vetos the closing
@raises css::util::CloseVetoException
if the closing was vetoed by any instance
*/
void impl_closeControllerFrames_nolck_throw( bool _bDeliverOwnership );
/** disposes the frames of all controllers which are still left in m_aControllers.
*/
void impl_disposeControllerFrames_nothrow();
/** does a reparenting at the given object container to ourself
Calls XChild::setParent at the given object, which must be one of our impl's or our
object containers (m_xForms, m_xReports, m_xTableDefinitions, m_xCommandDefinitions)
*/
void impl_reparent_nothrow( const css::uno::WeakReference< css::container::XNameAccess >& _rxContainer );
/** retrieves the forms or reports contained, creates and initializes it, if necessary
@raises DisposedException
if the instance is already disposed
@raises IllegalArgumentException
if <arg>_eType</arg> is not ODatabaseModelImpl::E_FORM and not ODatabaseModelImpl::E_REPORT
*/
css::uno::Reference< css::container::XNameAccess >
impl_getDocumentContainer_throw( ODatabaseModelImpl::ObjectType _eType );
/** resets everything
@precond
m_pImpl is not <NULL/>
*/
void
impl_reset_nothrow();
/** imports the document from the given resource.
*/
static void
impl_import_nolck_throw(
const css::uno::Reference< css::uno::XComponentContext >& _rContext,
const css::uno::Reference< css::uno::XInterface >& _rxTargetComponent,
const ::comphelper::NamedValueCollection& _rResource
);
/** creates a storage for the given URL, truncating it if a file with this name already exists
@throws Exception
if creating the storage failed
@return
the newly created storage for the file at the given URL
*/
css::uno::Reference< css::embed::XStorage >
impl_createStorageFor_throw(
const OUString& _rURL
) const;
2008-10-16 06:57:26 +00:00
/** sets our "modified" flag
will notify all our respective listeners, if the "modified" state actually changed
@param _bModified
the (new) flag indicating whether the document is currently modified or not
@param _rGuard
the guard for our instance. At method entry, the guard must hold the lock. At the moment
of method leave, the lock will be released.
@precond
our mutex is locked
@postcond
our mutex is not locked
*/
void impl_setModified_nothrow( bool _bModified, DocumentGuard& _rGuard );
/** stores the document to the given storage
Note that the document is actually not rebased to this storage, it just stores a copy of itself
to the given target storage.
@param _rxTargetStorage
denotes the storage to store the document into
@param _rMediaDescriptor
contains additional parameters for storing the document
@param _rDocGuard
a guard which holds the (only) lock to the document, and which will be temporarily
released where necessary (e.g. for notifications, or calling into other components)
@throws css::uno::IllegalArgumentException
if the given storage is <NULL/>.
@throws css::uno::RuntimeException
when any of the used operations throws it
@throws css::io::IOException
when any of the used operations throws it, or any other exception occurs which is no
RuntimeException and no IOException
*/
void impl_storeToStorage_throw(
const css::uno::Reference< css::embed::XStorage >& _rxTargetStorage,
const css::uno::Sequence< css::beans::PropertyValue >& _rMediaDescriptor,
DocumentGuard& _rDocGuard
) const;
/** impl-version of attachResource
@param i_rLogicalDocumentURL
denotes the logical URL of the document, to be reported by getURL/getLocation
@param i_rMediaDescriptor
denotes additional document parameters
@param _rDocGuard
is the guard which currently protects the document instance
*/
bool impl_attachResource(
const OUString& i_rLogicalDocumentURL,
const css::uno::Sequence< css::beans::PropertyValue >& i_rMediaDescriptor,
DocumentGuard& _rDocGuard
);
/** throws an IOException with the message as defined in the RID_STR_ERROR_WHILE_SAVING resource, wrapping
the given caught non-IOException error
*/
void impl_throwIOExceptionCausedBySave_throw(
const css::uno::Any& i_rError,
const OUString& i_rTargetURL
) const;
2008-10-16 06:57:26 +00:00
};
/** an extended version of the ModelMethodGuard, which also cares for the initialization state
of the document
*/
class DocumentGuard : private ModelMethodGuard
2008-10-16 06:57:26 +00:00
{
public:
enum __InitMethod
2008-10-16 06:57:26 +00:00
{
// a method which is to initialize the document
InitMethod,
};
enum __DefaultMethod
{
2008-10-16 06:57:26 +00:00
// a default method
DefaultMethod
};
enum __MethodUsedDuringInit
{
2008-10-16 06:57:26 +00:00
// a method which is used (externally) during the initialization phase
MethodUsedDuringInit
};
enum __MethodWithoutInit
{
2008-10-16 06:57:26 +00:00
// a method which does not need initialization - use with care!
MethodWithoutInit
};
/** constructs the guard
@param _document
the ODatabaseDocument instance
@throws css::lang::DisposedException
If the given component is already disposed
@throws css::lang::NotInitializedException
if the given component is not yet initialized
*/
DocumentGuard(const ODatabaseDocument& _document, __DefaultMethod)
: ModelMethodGuard(_document)
, m_document(_document )
{
m_document.checkInitialized();
}
2008-10-16 06:57:26 +00:00
/** constructs the guard
@param _document
the ODatabaseDocument instance
@throws css::lang::DisposedException
2008-10-16 06:57:26 +00:00
If the given component is already disposed
@throws css::frame::DoubleInitializationException
if the given component is already initialized, or currently being initialized.
*/
DocumentGuard(const ODatabaseDocument& _document, __InitMethod)
: ModelMethodGuard(_document)
, m_document(_document)
{
m_document.checkNotInitialized();
}
/** constructs the guard
@param _document
the ODatabaseDocument instance
@throws css::lang::DisposedException
If the given component is already disposed
2008-10-16 06:57:26 +00:00
@throws css::lang::NotInitializedException
if the component is still uninitialized, and not in the initialization
2008-10-16 06:57:26 +00:00
phase currently.
*/
DocumentGuard(const ODatabaseDocument& _document, __MethodUsedDuringInit)
: ModelMethodGuard(_document)
, m_document(_document)
{
m_document.checkNotUninitilized();
}
/** constructs the guard
@param _document
the ODatabaseDocument instance
@throws css::lang::DisposedException
If the given component is already disposed
*/
DocumentGuard(const ODatabaseDocument& _document, __MethodWithoutInit)
: ModelMethodGuard( _document )
, m_document( _document )
2008-10-16 06:57:26 +00:00
{
}
~DocumentGuard()
{
}
void clear()
{
ModelMethodGuard::clear();
}
void reset()
{
ModelMethodGuard::reset();
m_document.checkDisposed();
}
private:
const ODatabaseDocument& m_document;
};
} // namespace dbaccess
#endif // INCLUDED_DBACCESS_SOURCE_CORE_DATAACCESS_DATABASEDOCUMENT_HXX
2010-10-27 12:33:13 +01:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */