1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <sal/config.h>
24 #include <string_view>
28 #include <propertybaghelper.hxx>
29 #include <com/sun/star/sdb/XSQLErrorListener.hpp>
30 #include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
31 #include <com/sun/star/form/FormSubmitMethod.hpp>
32 #include <com/sun/star/form/FormSubmitEncoding.hpp>
33 #include <com/sun/star/form/XSubmit.hpp>
34 #include <com/sun/star/form/XReset.hpp>
35 #include <com/sun/star/form/XDatabaseParameterBroadcaster2.hpp>
36 #include <com/sun/star/sdb/XCompletedExecution.hpp>
37 #include <com/sun/star/sdbc/XRowSet.hpp>
38 #include <com/sun/star/sdbcx/XDeleteRows.hpp>
39 #include <com/sun/star/sdbc/XResultSetUpdate.hpp>
40 #include <com/sun/star/sdb/XRowSetApproveListener.hpp>
41 #include <com/sun/star/sdb/XRowSetApproveBroadcaster.hpp>
42 #include <com/sun/star/form/NavigationBarMode.hpp>
43 #include <com/sun/star/form/XLoadable.hpp>
44 #include <com/sun/star/form/XLoadListener.hpp>
45 #include <com/sun/star/form/XForm.hpp>
46 #include <com/sun/star/awt/XTabControllerModel.hpp>
47 #include <com/sun/star/sdbc/XRowSetListener.hpp>
48 #include <com/sun/star/sdbc/XCloseable.hpp>
49 #include <com/sun/star/container/XNamed.hpp>
50 #include <com/sun/star/lang/XServiceInfo.hpp>
51 #include <com/sun/star/sdbc/XParameters.hpp>
52 #include <com/sun/star/sdbc/XConnection.hpp>
53 #include <com/sun/star/task/XInteractionHandler.hpp>
54 #include <com/sun/star/beans/XPropertyContainer.hpp>
55 #include <com/sun/star/beans/XPropertyAccess.hpp>
56 #include <com/sun/star/sdbc/XWarningsSupplier.hpp>
59 #include <tools/link.hxx>
60 #include <InterfaceContainer.hxx>
62 #include <connectivity/parameters.hxx>
63 #include <connectivity/filtermanager.hxx>
64 #include <connectivity/warningscontainer.hxx>
66 #include <comphelper/interfacecontainer3.hxx>
67 #include <comphelper/propmultiplex.hxx>
68 #include <comphelper/uno3.hxx>
69 #include <cppuhelper/implbase12.hxx>
70 #include <cppuhelper/implbase4.hxx>
71 #include <cppuhelper/implbase7.hxx>
72 #include <rtl/ref.hxx>
74 namespace com::sun::star::sdbc
{ class SQLException
; }
77 class INetMIMEMessage
;
87 const sal_uInt16 SUCCESSFUL_REPRESENT_TEXT
= 0x0001;
88 const sal_uInt16 SUCCESSFUL_REPRESENT_FILE
= 0x0002;
91 class HtmlSuccessfulObj
96 sal_uInt16 nRepresentation
;
98 HtmlSuccessfulObj( OUString _aName
, OUString _aValue
,
99 sal_uInt16 _nRepresent
= SUCCESSFUL_REPRESENT_TEXT
)
100 :aName(std::move( _aName
))
101 ,aValue(std::move( _aValue
))
102 ,nRepresentation( _nRepresent
)
107 typedef std::vector
<HtmlSuccessfulObj
> HtmlSuccessfulObjList
;
111 class OFormSubmitResetThread
;
112 typedef ::cppu::ImplHelper12
< css::form::XForm
113 , css::awt::XTabControllerModel
114 , css::form::XLoadListener
115 , css::sdbc::XRowSetListener
116 , css::sdb::XRowSetApproveListener
117 , css::form::XDatabaseParameterBroadcaster2
118 , css::sdb::XSQLErrorListener
119 , css::sdb::XSQLErrorBroadcaster
122 , css::form::XLoadable
123 , css::container::XNamed
124 > ODatabaseForm_BASE1
;
127 typedef ::cppu::ImplHelper4
< css::lang::XServiceInfo
128 , css::beans::XPropertyContainer
129 , css::beans::XPropertyAccess
130 , css::sdbc::XWarningsSupplier
131 > ODatabaseForm_BASE2
;
133 typedef ::cppu::ImplHelper7
< css::sdbc::XCloseable
,
135 css::sdb::XCompletedExecution
,
136 css::sdb::XRowSetApproveBroadcaster
,
137 css::sdbc::XResultSetUpdate
,
138 css::sdbcx::XDeleteRows
,
139 css::sdbc::XParameters
> ODatabaseForm_BASE3
;
142 class ODatabaseForm
:public OFormComponents
143 ,public OPropertySetAggregationHelper
144 ,public OPropertyChangeListener
145 ,public ODatabaseForm_BASE1
146 ,public ODatabaseForm_BASE2
147 ,public ODatabaseForm_BASE3
148 ,public IPropertyBagHelperContext
150 friend class OFormSubmitResetThread
;
152 // listener administration
153 ::comphelper::OInterfaceContainerHelper3
<css::form::XLoadListener
> m_aLoadListeners
;
154 ::comphelper::OInterfaceContainerHelper3
<css::sdb::XRowSetApproveListener
> m_aRowSetApproveListeners
;
155 ::comphelper::OInterfaceContainerHelper3
<css::form::XSubmitListener
> m_aSubmitListeners
;
156 ::comphelper::OInterfaceContainerHelper3
<css::sdb::XSQLErrorListener
> m_aErrorListeners
;
157 ::comphelper::OInterfaceContainerHelper3
<css::form::XResetListener
> m_aResetListeners
;
158 ::osl::Mutex m_aResetSafety
;
159 css::uno::Any m_aCycle
;
160 css::uno::Any m_aIgnoreResult
; // set when we are a subform and our master form positioned on a new row
161 css::uno::Sequence
< OUString
> m_aMasterFields
;
162 css::uno::Sequence
< OUString
> m_aDetailFields
;
164 // the object doin' most of the work - an SDB-rowset
165 css::uno::Reference
< css::uno::XAggregation
> m_xAggregate
;
166 // same object, interface as member because of performance reasons
167 css::uno::Reference
< css::sdbc::XRowSet
> m_xAggregateAsRowSet
;
169 PropertyBagHelper m_aPropertyBagHelper
;
170 ::dbtools::WarningsContainer m_aWarnings
;
171 rtl::Reference
<OPropertyChangeMultiplexer
> m_xAggregatePropertyMultiplexer
;
172 // Management of the Control Groups
173 rtl::Reference
<OGroupManager
> m_pGroupManager
;
174 ::dbtools::ParameterManager m_aParameterManager
;
175 ::dbtools::FilterManager m_aFilterManager
;
176 std::unique_ptr
<Timer
> m_pLoadTimer
;
178 rtl::Reference
<OFormSubmitResetThread
> m_pThread
;
179 OUString m_sCurrentErrorContext
;
180 // will be used as additional context information
181 // when an exception is caught and forwarded to the listeners
183 sal_Int32 m_nResetsPending
;
184 // <overwritten_properties>
185 sal_Int32 m_nPrivileges
;
187 // </overwritten_properties>
190 css::uno::Any m_aControlBorderColorFocus
;
191 css::uno::Any m_aControlBorderColorMouse
;
192 css::uno::Any m_aControlBorderColorInvalid
;
193 css::uno::Any m_aDynamicControlBorder
;
195 OUString m_aTargetURL
;
196 OUString m_aTargetFrame
;
197 css::form::FormSubmitMethod m_eSubmitMethod
;
198 css::form::FormSubmitEncoding m_eSubmitEncoding
;
199 css::form::NavigationBarMode m_eNavigation
;
200 bool m_bAllowInsert
: 1;
201 bool m_bAllowUpdate
: 1;
202 bool m_bAllowDelete
: 1;
206 bool m_bForwardingConnection
: 1; // true if we're setting the ActiveConnection on the aggregate
207 bool m_bSharingConnection
: 1; // true if the connection we're using is shared with our parent
210 explicit ODatabaseForm(const css::uno::Reference
< css::uno::XComponentContext
>& _rxFactory
);
211 ODatabaseForm( const ODatabaseForm
& _cloneSource
);
212 virtual ~ODatabaseForm() override
;
215 DECLARE_UNO3_AGG_DEFAULTS(ODatabaseForm
, OFormComponents
)
216 virtual css::uno::Any SAL_CALL
queryAggregation(const css::uno::Type
& _rType
) override
;
219 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( ) override
;
220 virtual css::uno::Sequence
<sal_Int8
> SAL_CALL
getImplementationId( ) override
;
222 // css::lang::XComponent
223 virtual void SAL_CALL
disposing() override
;
226 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
227 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() override
;
228 virtual void SAL_CALL
getFastPropertyValue(css::uno::Any
& rValue
, sal_Int32 nHandle
) const override
;
229 virtual sal_Bool SAL_CALL
convertFastPropertyValue(css::uno::Any
& rConvertedValue
, css::uno::Any
& rOldValue
, sal_Int32 nHandle
, const css::uno::Any
& rValue
) override
;
230 virtual void SAL_CALL
setFastPropertyValue_NoBroadcast(sal_Int32 nHandle
, const css::uno::Any
& rValue
) override
;
232 css::uno::Any SAL_CALL
getFastPropertyValue( sal_Int32 nHandle
) override
;
233 void fire( sal_Int32
* pnHandles
, const css::uno::Any
* pNewValues
, const css::uno::Any
* pOldValues
, sal_Int32 nCount
);
235 // IPropertyBagHelperContext
236 virtual ::osl::Mutex
& getMutex() override
;
237 virtual void describeFixedAndAggregateProperties(
238 css::uno::Sequence
< css::beans::Property
>& _out_rFixedProperties
,
239 css::uno::Sequence
< css::beans::Property
>& _out_rAggregateProperties
241 virtual css::uno::Reference
< css::beans::XMultiPropertySet
>
242 getPropertiesInterface() override
;
244 // css::beans::XPropertyState
245 virtual css::beans::PropertyState
getPropertyStateByHandle(sal_Int32 nHandle
) override
;
246 virtual void setPropertyToDefaultByHandle(sal_Int32 nHandle
) override
;
247 virtual css::uno::Any
getPropertyDefaultByHandle(sal_Int32 nHandle
) const override
;
249 // css::sdbc::XSQLErrorBroadcaster
250 virtual void SAL_CALL
addSQLErrorListener(const css::uno::Reference
< css::sdb::XSQLErrorListener
>& _rxListener
) override
;
251 virtual void SAL_CALL
removeSQLErrorListener(const css::uno::Reference
< css::sdb::XSQLErrorListener
>& _rxListener
) override
;
254 // nothing to implement
257 virtual void SAL_CALL
reset() override
;
258 virtual void SAL_CALL
addResetListener(const css::uno::Reference
< css::form::XResetListener
>& _rxListener
) override
;
259 virtual void SAL_CALL
removeResetListener(const css::uno::Reference
< css::form::XResetListener
>& _rxListener
) override
;
261 // css::form::XSubmit
262 virtual void SAL_CALL
submit(const css::uno::Reference
< css::awt::XControl
>& aControl
, const css::awt::MouseEvent
& aMouseEvt
) override
;
263 virtual void SAL_CALL
addSubmitListener(const css::uno::Reference
< css::form::XSubmitListener
>& _rxListener
) override
;
264 virtual void SAL_CALL
removeSubmitListener(const css::uno::Reference
< css::form::XSubmitListener
>& _rxListener
) override
;
266 // css::container::XChild
267 virtual css::uno::Reference
<css::uno::XInterface
> SAL_CALL
getParent() override
{ return OFormComponents::getParent(); }
268 virtual void SAL_CALL
setParent(const css::uno::Reference
<css::uno::XInterface
>& Parent
) override
;
270 // css::container::XNamed
271 virtual OUString SAL_CALL
getName() override
;
272 virtual void SAL_CALL
setName(const OUString
& aName
) override
;
274 // css::awt::XTabControllerModel
275 virtual sal_Bool SAL_CALL
getGroupControl() override
;
276 virtual void SAL_CALL
setGroupControl(sal_Bool
/*_bGroupControl*/) override
{ }
277 virtual void SAL_CALL
setControlModels(const css::uno::Sequence
< css::uno::Reference
< css::awt::XControlModel
> >& _rControls
) override
;
278 virtual css::uno::Sequence
< css::uno::Reference
< css::awt::XControlModel
> > SAL_CALL
getControlModels() override
;
279 virtual void SAL_CALL
setGroup(const css::uno::Sequence
< css::uno::Reference
< css::awt::XControlModel
> >& _rGroup
, const OUString
& _rGroupName
) override
;
280 virtual sal_Int32 SAL_CALL
getGroupCount() override
;
281 virtual void SAL_CALL
getGroup(sal_Int32 _nGroup
, css::uno::Sequence
< css::uno::Reference
< css::awt::XControlModel
> >& _rxGroup
, OUString
& _rName
) override
;
282 virtual void SAL_CALL
getGroupByName(const OUString
& _rName
, css::uno::Sequence
< css::uno::Reference
< css::awt::XControlModel
> >& _rxGroup
) override
;
284 // css::lang::XEventListener
285 virtual void SAL_CALL
disposing(const css::lang::EventObject
& _rSource
) override
;
287 // css::form::XLoadListener
288 virtual void SAL_CALL
loaded(const css::lang::EventObject
& aEvent
) override
;
289 virtual void SAL_CALL
unloading(const css::lang::EventObject
& aEvent
) override
;
290 virtual void SAL_CALL
unloaded(const css::lang::EventObject
& aEvent
) override
;
291 virtual void SAL_CALL
reloading(const css::lang::EventObject
& aEvent
) override
;
292 virtual void SAL_CALL
reloaded(const css::lang::EventObject
& aEvent
) override
;
294 // css::form::XLoadable
295 virtual void SAL_CALL
load() override
;
296 virtual void SAL_CALL
unload() override
;
297 virtual void SAL_CALL
reload() override
;
298 virtual sal_Bool SAL_CALL
isLoaded() override
;
299 virtual void SAL_CALL
addLoadListener(const css::uno::Reference
< css::form::XLoadListener
>& _rxListener
) override
;
300 virtual void SAL_CALL
removeLoadListener(const css::uno::Reference
< css::form::XLoadListener
>& _rxListener
) override
;
302 // css::sdbc::XCloseable
303 virtual void SAL_CALL
close() override
;
305 // css::sdbc::XRowSetListener
306 virtual void SAL_CALL
cursorMoved(const css::lang::EventObject
& event
) override
;
307 virtual void SAL_CALL
rowChanged(const css::lang::EventObject
& event
) override
;
308 virtual void SAL_CALL
rowSetChanged(const css::lang::EventObject
& event
) override
;
310 // css::sdb::XRowSetApproveListener
311 virtual sal_Bool SAL_CALL
approveCursorMove(const css::lang::EventObject
& event
) override
;
312 virtual sal_Bool SAL_CALL
approveRowChange(const css::sdb::RowChangeEvent
& event
) override
;
313 virtual sal_Bool SAL_CALL
approveRowSetChange(const css::lang::EventObject
& event
) override
;
315 // css::sdb::XRowSetApproveBroadcaster
316 virtual void SAL_CALL
addRowSetApproveListener(const css::uno::Reference
< css::sdb::XRowSetApproveListener
>& _rxListener
) override
;
317 virtual void SAL_CALL
removeRowSetApproveListener(const css::uno::Reference
< css::sdb::XRowSetApproveListener
>& _rxListener
) override
;
319 // com::sun:star::form::XDatabaseParameterBroadcaster2
320 virtual void SAL_CALL
addDatabaseParameterListener(const css::uno::Reference
< css::form::XDatabaseParameterListener
>& _rxListener
) override
;
321 virtual void SAL_CALL
removeDatabaseParameterListener(const css::uno::Reference
< css::form::XDatabaseParameterListener
>& _rxListener
) override
;
323 // com::sun:star::form::XDatabaseParameterBroadcaster
324 virtual void SAL_CALL
addParameterListener(const css::uno::Reference
< css::form::XDatabaseParameterListener
>& _rxListener
) override
;
325 virtual void SAL_CALL
removeParameterListener(const css::uno::Reference
< css::form::XDatabaseParameterListener
>& _rxListener
) override
;
327 // css::sdbc::XRowSet
328 virtual void SAL_CALL
execute() override
;
329 virtual void SAL_CALL
addRowSetListener(const css::uno::Reference
< css::sdbc::XRowSetListener
>& _rxListener
) override
;
330 virtual void SAL_CALL
removeRowSetListener(const css::uno::Reference
< css::sdbc::XRowSetListener
>& _rxListener
) override
;
332 // css::sdb::XCompletedExecution
333 virtual void SAL_CALL
executeWithCompletion( const css::uno::Reference
< css::task::XInteractionHandler
>& handler
) override
;
335 // css::sdbc::XResultSet
336 virtual sal_Bool SAL_CALL
next() override
;
337 virtual sal_Bool SAL_CALL
isBeforeFirst() override
;
338 virtual sal_Bool SAL_CALL
isAfterLast() override
;
339 virtual sal_Bool SAL_CALL
isFirst() override
;
340 virtual sal_Bool SAL_CALL
isLast() override
;
341 virtual void SAL_CALL
beforeFirst() override
;
342 virtual void SAL_CALL
afterLast() override
;
343 virtual sal_Bool SAL_CALL
first() override
;
344 virtual sal_Bool SAL_CALL
last() override
;
345 virtual sal_Int32 SAL_CALL
getRow() override
;
346 virtual sal_Bool SAL_CALL
absolute(sal_Int32 row
) override
;
347 virtual sal_Bool SAL_CALL
relative(sal_Int32 rows
) override
;
348 virtual sal_Bool SAL_CALL
previous() override
;
349 virtual void SAL_CALL
refreshRow() override
;
350 virtual sal_Bool SAL_CALL
rowUpdated() override
;
351 virtual sal_Bool SAL_CALL
rowInserted() override
;
352 virtual sal_Bool SAL_CALL
rowDeleted() override
;
353 virtual css::uno::Reference
<css::uno::XInterface
> SAL_CALL
getStatement() override
;
355 // css::sdbc::XResultSetUpdate
356 virtual void SAL_CALL
insertRow() override
;
357 virtual void SAL_CALL
updateRow() override
;
358 virtual void SAL_CALL
deleteRow() override
;
359 virtual void SAL_CALL
cancelRowUpdates() override
;
360 virtual void SAL_CALL
moveToInsertRow() override
;
361 virtual void SAL_CALL
moveToCurrentRow() override
;
363 // css::sdbcx::XDeleteRows
364 virtual css::uno::Sequence
< sal_Int32
> SAL_CALL
deleteRows(const css::uno::Sequence
< css::uno::Any
>& rows
) override
;
366 // css::lang::XServiceInfo
367 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
368 virtual OUString SAL_CALL
getImplementationName() override
;
369 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
371 // css::io::XPersistObject
372 virtual OUString SAL_CALL
getServiceName() override
;
373 virtual void SAL_CALL
write(const css::uno::Reference
< css::io::XObjectOutputStream
>& _rxOutStream
) override
;
374 virtual void SAL_CALL
read(const css::uno::Reference
< css::io::XObjectInputStream
>& _rxInStream
) override
;
376 // css::sdbc::XSQLErrorListener
377 virtual void SAL_CALL
errorOccured(const css::sdb::SQLErrorEvent
& aEvent
) override
;
379 // css::sdbc::XParameters
380 virtual void SAL_CALL
setNull(sal_Int32 parameterIndex
, sal_Int32 sqlType
) override
;
381 virtual void SAL_CALL
setObjectNull(sal_Int32 parameterIndex
, sal_Int32 sqlType
, const OUString
& typeName
) override
;
382 virtual void SAL_CALL
setBoolean(sal_Int32 parameterIndex
, sal_Bool x
) override
;
383 virtual void SAL_CALL
setByte(sal_Int32 parameterIndex
, sal_Int8 x
) override
;
384 virtual void SAL_CALL
setShort(sal_Int32 parameterIndex
, sal_Int16 x
) override
;
385 virtual void SAL_CALL
setInt(sal_Int32 parameterIndex
, sal_Int32 x
) override
;
386 virtual void SAL_CALL
setLong(sal_Int32 parameterIndex
, sal_Int64 x
) override
;
387 virtual void SAL_CALL
setFloat(sal_Int32 parameterIndex
, float x
) override
;
388 virtual void SAL_CALL
setDouble(sal_Int32 parameterIndex
, double x
) override
;
389 virtual void SAL_CALL
setString(sal_Int32 parameterIndex
, const OUString
& x
) override
;
390 virtual void SAL_CALL
setBytes(sal_Int32 parameterIndex
, const css::uno::Sequence
< sal_Int8
>& x
) override
;
391 virtual void SAL_CALL
setDate(sal_Int32 parameterIndex
, const css::util::Date
& x
) override
;
392 virtual void SAL_CALL
setTime(sal_Int32 parameterIndex
, const css::util::Time
& x
) override
;
393 virtual void SAL_CALL
setTimestamp(sal_Int32 parameterIndex
, const css::util::DateTime
& x
) override
;
394 virtual void SAL_CALL
setBinaryStream(sal_Int32 parameterIndex
, const css::uno::Reference
< css::io::XInputStream
>& x
, sal_Int32 length
) override
;
395 virtual void SAL_CALL
setCharacterStream(sal_Int32 parameterIndex
, const css::uno::Reference
< css::io::XInputStream
>& x
, sal_Int32 length
) override
;
396 virtual void SAL_CALL
setObject(sal_Int32 parameterIndex
, const css::uno::Any
& x
) override
;
397 virtual void SAL_CALL
setObjectWithInfo(sal_Int32 parameterIndex
, const css::uno::Any
& x
, sal_Int32 targetSqlType
, sal_Int32 scale
) override
;
398 virtual void SAL_CALL
setRef(sal_Int32 parameterIndex
, const css::uno::Reference
< css::sdbc::XRef
>& x
) override
;
399 virtual void SAL_CALL
setBlob(sal_Int32 parameterIndex
, const css::uno::Reference
< css::sdbc::XBlob
>& x
) override
;
400 virtual void SAL_CALL
setClob(sal_Int32 parameterIndex
, const css::uno::Reference
< css::sdbc::XClob
>& x
) override
;
401 virtual void SAL_CALL
setArray(sal_Int32 parameterIndex
, const css::uno::Reference
< css::sdbc::XArray
>& x
) override
;
402 virtual void SAL_CALL
clearParameters() override
;
404 // XPropertyChangeListener
405 virtual void SAL_CALL
propertyChange( const css::beans::PropertyChangeEvent
& evt
) override
;
407 // XPropertyContainer
408 virtual void SAL_CALL
addProperty( const OUString
& Name
, ::sal_Int16 Attributes
, const css::uno::Any
& DefaultValue
) override
;
409 virtual void SAL_CALL
removeProperty( const OUString
& Name
) override
;
412 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
getPropertyValues( ) override
;
413 virtual void SAL_CALL
setPropertyValues( const css::uno::Sequence
< css::beans::PropertyValue
>& aProps
) override
;
414 using OPropertySetAggregationHelper::setPropertyValues
;
417 virtual css::uno::Any SAL_CALL
getWarnings( ) override
;
418 virtual void SAL_CALL
clearWarnings( ) override
;
421 virtual css::uno::Reference
< css::util::XCloneable
> SAL_CALL
createClone( ) override
;
424 // OPropertySetAggregationHelper overridables
425 virtual void forwardingPropertyValue( sal_Int32 _nHandle
) override
;
426 virtual void forwardedPropertyValue( sal_Int32 _nHandle
) override
;
428 // OInterfaceContainer overridables
429 virtual void implInserted( const ElementDescription
* _pElement
) override
;
430 virtual void implRemoved(const css::uno::Reference
<css::uno::XInterface
>& _rxObject
) override
;
432 // OPropertyChangeListener
433 virtual void _propertyChanged( const css::beans::PropertyChangeEvent
& ) override
;
436 bool executeRowSet(::osl::ResettableMutexGuard
& _rClearForNotifies
, bool bMoveToFirst
,
437 const css::uno::Reference
< css::task::XInteractionHandler
>& _rxCompletionHandler
);
438 bool fillParameters(::osl::ResettableMutexGuard
& _rClearForNotifies
,
439 const css::uno::Reference
< css::task::XInteractionHandler
>& _rxCompletionHandler
);
440 void updateParameterInfo();
441 bool hasValidParent() const;
444 /// @throws css::uno::RuntimeException
445 void load_impl(bool bCausedByParentForm
, bool bMoveToFirst
= true,
446 const css::uno::Reference
< css::task::XInteractionHandler
>& _rxCompletionHandler
= css::uno::Reference
< css::task::XInteractionHandler
>());
447 /// @throws css::uno::RuntimeException
448 void reload_impl(bool bMoveToFirst
,
449 const css::uno::Reference
< css::task::XInteractionHandler
>& _rxCompletionHandler
= css::uno::Reference
< css::task::XInteractionHandler
>());
450 void submit_impl(const css::uno::Reference
< css::awt::XControl
>& Control
, const css::awt::MouseEvent
& MouseEvt
);
451 void reset_impl(bool _bApproveByListeners
);
453 bool implEnsureConnection();
455 // connection sharing
457 /// checks if we can re-use (aka share) the connection of the given parent
458 bool canShareConnection( const css::uno::Reference
< css::beans::XPropertySet
>& _rxParentProps
);
460 /// starts sharing the connection with the parent
461 void doShareConnection( const css::uno::Reference
< css::beans::XPropertySet
>& _rxParentProps
);
463 /// stops sharing the connection with the parent
464 void stopSharingConnection( );
466 /// called when the connection which we share with our parent is being disposed
467 void disposingSharedConnection( const css::uno::Reference
< css::sdbc::XConnection
>& _rxConn
);
469 /// checks if we currently share our connection with our parent
470 bool isSharingConnection( ) const { return m_bSharingConnection
; }
472 /** calls our row set approval listeners
476 @param _bAllowSQLException
477 <TRUE/> if SQLExceptions are allowed to leave the method
479 the guard to be cleared before actually calling into the listeners, but after making
480 a copy of the listeners array to operate on.
482 <TRUE/> if and only if the execution has been approved
484 bool impl_approveRowChange_throw(
485 const css::lang::EventObject
& _rEvent
,
486 const bool _bAllowSQLException
,
487 ::osl::ClearableMutexGuard
& _rGuard
490 /// invalidate all our parameter-related stuff
491 void invalidateParameters();
493 void saveInsertOnlyState( );
494 void restoreInsertOnlyState( );
497 void onError(const css::sdb::SQLErrorEvent
& _rEvent
);
498 void onError(const css::sdbc::SQLException
&, const OUString
& _rContextDescription
);
501 OUString
GetDataEncoded(bool _bURLEncoded
,const css::uno::Reference
< css::awt::XControl
>& SubmitButton
, const css::awt::MouseEvent
& MouseEvt
);
502 css::uno::Sequence
<sal_Int8
> GetDataMultiPartEncoded(const css::uno::Reference
< css::awt::XControl
>& SubmitButton
, const css::awt::MouseEvent
& MouseEvt
,
503 OUString
& rContentType
);
505 void AppendComponent(HtmlSuccessfulObjList
& rList
, const css::uno::Reference
< css::beans::XPropertySet
>& xComponentSet
, std::u16string_view rNamePrefix
,
506 const css::uno::Reference
< css::awt::XControl
>& rxSubmitButton
, const css::awt::MouseEvent
& MouseEvt
);
508 void FillSuccessfulList(HtmlSuccessfulObjList
& rList
, const css::uno::Reference
< css::awt::XControl
>& rxSubmitButton
, const css::awt::MouseEvent
& MouseEvt
);
510 static void InsertTextPart(INetMIMEMessage
& rParent
, std::u16string_view rName
, std::u16string_view rData
);
511 static void InsertFilePart(INetMIMEMessage
& rParent
, std::u16string_view rName
, const OUString
& rFileName
);
512 static void Encode(OUString
& rString
);
514 css::uno::Reference
< css::sdbc::XConnection
> getConnection();
516 void impl_createLoadTimer();
518 void impl_construct();
520 DECL_LINK( OnTimeout
, Timer
*, void );
522 using OPropertySetHelper::getPropertyValues
;
528 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */