LibreOffice Module dbaccess (master) 1
formadapter.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <formadapter.hxx>
21#include <o3tl/safeint.hxx>
22#include <osl/diagnose.h>
23#include <comphelper/types.hxx>
25#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
26#include <strings.hxx>
29
30using namespace dbaui;
31using namespace ::com::sun::star::uno;
32using namespace ::com::sun::star::sdb;
33using namespace ::com::sun::star::sdbcx;
34using namespace ::com::sun::star::beans;
35using namespace ::com::sun::star::container;
36
37// SbaXFormAdapter
38
39SbaXFormAdapter::SbaXFormAdapter()
40 :m_aLoadListeners(*this, m_aMutex)
41 ,m_aRowSetListeners(*this, m_aMutex)
42 ,m_aRowSetApproveListeners(*this, m_aMutex)
43 ,m_aErrorListeners(*this, m_aMutex)
44 ,m_aParameterListeners(*this, m_aMutex)
45 ,m_aSubmitListeners(*this, m_aMutex)
46 ,m_aResetListeners(*this, m_aMutex)
47 ,m_aPropertyChangeListeners(*this, m_aMutex)
48 ,m_aVetoablePropertyChangeListeners(*this, m_aMutex)
49 ,m_aPropertiesChangeListeners(*this, m_aMutex)
50 ,m_aDisposeListeners(m_aMutex)
51 ,m_aContainerListeners(m_aMutex)
52 ,m_nNamePropHandle(-1)
53{
54
55}
56
58{
59
60}
61
63{
64 return ::comphelper::concatSequences(
65 SbaXFormAdapter_BASE1::getTypes(),
68 );
69}
70
72{
73 return css::uno::Sequence<sal_Int8>();
74}
75
77{
78 Any aReturn = SbaXFormAdapter_BASE1::queryInterface( _rType );
79
80 if (!aReturn.hasValue())
81 aReturn = SbaXFormAdapter_BASE2::queryInterface( _rType );
82
83 if (!aReturn.hasValue())
84 aReturn = SbaXFormAdapter_BASE3::queryInterface( _rType );
85
86 return aReturn;
87}
88
90{
91 // log off all our multiplexers
93 {
94 css::uno::Reference< css::form::XLoadable > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
95 if (xBroadcaster.is())
96 xBroadcaster->removeLoadListener(&m_aLoadListeners);
97 }
99 {
100 css::uno::Reference< css::sdbc::XRowSet > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
101 if (xBroadcaster.is())
102 xBroadcaster->removeRowSetListener(&m_aRowSetListeners);
103 }
105 {
106 css::uno::Reference< css::sdb::XRowSetApproveBroadcaster > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
107 if (xBroadcaster.is())
108 xBroadcaster->removeRowSetApproveListener(&m_aRowSetApproveListeners);
109 }
111 {
112 css::uno::Reference< css::sdb::XSQLErrorBroadcaster > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
113 if (xBroadcaster.is())
114 xBroadcaster->removeSQLErrorListener(&m_aErrorListeners);
115 }
117 {
118 css::uno::Reference< css::form::XSubmit > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
119 if (xBroadcaster.is())
120 xBroadcaster->removeSubmitListener(&m_aSubmitListeners);
121 }
123 {
124 css::uno::Reference< css::form::XReset > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
125 if (xBroadcaster.is())
126 xBroadcaster->removeResetListener(&m_aResetListeners);
127 }
129 {
131 if (xBroadcaster.is())
132 xBroadcaster->removeParameterListener(&m_aParameterListeners);
133 }
134
136 {
137 css::uno::Reference< css::beans::XPropertySet > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
138 if (xBroadcaster.is())
139 xBroadcaster->removePropertyChangeListener(OUString(), &m_aPropertyChangeListeners);
140 }
141
143 {
144 css::uno::Reference< css::beans::XPropertySet > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
145 if (xBroadcaster.is())
146 xBroadcaster->removeVetoableChangeListener(OUString(), &m_aVetoablePropertyChangeListeners);
147 }
148
150 {
152 if (xBroadcaster.is())
153 xBroadcaster->removePropertiesChangeListener(&m_aPropertiesChangeListeners);
154 }
155
156 // log off ourself
158 if (xComp.is())
159 xComp->removeEventListener(static_cast<css::lang::XEventListener*>(static_cast<css::beans::XPropertyChangeListener*>(this)));
160}
161
163{
164 // log off all our multiplexers
166 {
167 css::uno::Reference< css::form::XLoadable > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
168 if (xBroadcaster.is())
169 xBroadcaster->addLoadListener(&m_aLoadListeners);
170 }
172 {
173 css::uno::Reference< css::sdbc::XRowSet > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
174 if (xBroadcaster.is())
175 xBroadcaster->addRowSetListener(&m_aRowSetListeners);
176 }
178 {
179 css::uno::Reference< css::sdb::XRowSetApproveBroadcaster > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
180 if (xBroadcaster.is())
181 xBroadcaster->addRowSetApproveListener(&m_aRowSetApproveListeners);
182 }
184 {
185 css::uno::Reference< css::sdb::XSQLErrorBroadcaster > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
186 if (xBroadcaster.is())
187 xBroadcaster->addSQLErrorListener(&m_aErrorListeners);
188 }
190 {
191 css::uno::Reference< css::form::XSubmit > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
192 if (xBroadcaster.is())
193 xBroadcaster->addSubmitListener(&m_aSubmitListeners);
194 }
196 {
197 css::uno::Reference< css::form::XReset > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
198 if (xBroadcaster.is())
199 xBroadcaster->addResetListener(&m_aResetListeners);
200 }
201
203 {
205 if (xBroadcaster.is())
206 xBroadcaster->addParameterListener(&m_aParameterListeners);
207 }
208
210 {
211 css::uno::Reference< css::beans::XPropertySet > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
212 if (xBroadcaster.is())
213 xBroadcaster->addPropertyChangeListener(OUString(), &m_aPropertyChangeListeners);
214 }
215
217 {
218 css::uno::Reference< css::beans::XPropertySet > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
219 if (xBroadcaster.is())
220 xBroadcaster->addVetoableChangeListener(OUString(), &m_aVetoablePropertyChangeListeners);
221 }
222
224 {
226 if (xBroadcaster.is())
227 xBroadcaster->addPropertiesChangeListener(css::uno::Sequence<OUString>{""}, &m_aPropertiesChangeListeners);
228 }
229
230 // log off ourself
232 if (xComp.is())
233 xComp->addEventListener(static_cast<css::lang::XEventListener*>(static_cast<css::beans::XPropertyChangeListener*>(this)));
234}
235
237{
238 if (xNewMaster == m_xMainForm)
239 return;
240
241 OSL_ENSURE(xNewMaster.get() != static_cast< css::sdbc::XRowSet* >(this), "SbaXFormAdapter::AttachForm : invalid argument !");
242
243 if (m_xMainForm.is())
244 {
246
247 // if our old master is loaded we have to send an 'unloaded' event
249 if (xLoadable->isLoaded())
250 {
251 css::lang::EventObject aEvt(*this);
252 m_aLoadListeners.notifyEach( &css::form::XLoadListener::unloaded, aEvt );
253 }
254 }
255
256 m_xMainForm = xNewMaster;
257
258 if (!m_xMainForm.is())
259 return;
260
262
263 // if our new master is loaded we have to send an 'loaded' event
265 if (xLoadable->isLoaded())
266 {
267 css::lang::EventObject aEvt(*this);
268 m_aLoadListeners.notifyEach( &css::form::XLoadListener::loaded, aEvt );
269 }
270
271 // TODO : perhaps _all_ of our listeners should be notified about our new state
272 // (nearly every aspect of us may have changed with new master form)
273}
274
275// css::sdbc::XCloseable
277{
279 if (xIface.is())
280 xIface->close();
281}
282
283// css::sdbc::XResultSetMetaDataSupplier
285{
287 if (xIface.is())
288 return xIface->getMetaData();
290}
291
292// css::sdbc::XColumnLocate
293sal_Int32 SAL_CALL SbaXFormAdapter::findColumn(const OUString& columnName)
294{
296 if (xIface.is())
297 return xIface->findColumn(columnName);
298
299 ::dbtools::throwInvalidColumnException( columnName, *this );
300 assert(false);
301 return 0; // Never reached
302}
303
304// css::sdbcx::XColumnsSupplier
306{
308 if (xIface.is())
309 return xIface->getColumns();
311}
312
313// css::sdbc::XRow
315{
316 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
317 if (xIface.is())
318 return xIface->wasNull();
319 return true;
320}
321
322OUString SAL_CALL SbaXFormAdapter::getString(sal_Int32 columnIndex)
323{
324 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
325 if (xIface.is())
326 return xIface->getString(columnIndex);
327 return OUString();
328}
329
330sal_Bool SAL_CALL SbaXFormAdapter::getBoolean(sal_Int32 columnIndex)
331{
332 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
333 if (xIface.is())
334 return xIface->getBoolean(columnIndex);
335 return false;
336}
337
338sal_Int8 SAL_CALL SbaXFormAdapter::getByte(sal_Int32 columnIndex)
339
340{
341 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
342 if (xIface.is())
343 return xIface->getByte(columnIndex);
344 return 0;
345}
346
347sal_Int16 SAL_CALL SbaXFormAdapter::getShort(sal_Int32 columnIndex)
348{
349 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
350 if (xIface.is())
351 return xIface->getShort(columnIndex);
352 return 0;
353}
354
355sal_Int32 SAL_CALL SbaXFormAdapter::getInt(sal_Int32 columnIndex)
356{
357 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
358 if (xIface.is())
359 return xIface->getInt(columnIndex);
360 return 0;
361}
362
363sal_Int64 SAL_CALL SbaXFormAdapter::getLong(sal_Int32 columnIndex)
364{
365 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
366 if (xIface.is())
367 return xIface->getLong(columnIndex);
368 return 0;
369}
370
371float SAL_CALL SbaXFormAdapter::getFloat(sal_Int32 columnIndex)
372{
373 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
374 if (xIface.is())
375 return xIface->getFloat(columnIndex);
376 return 0.0;
377}
378
379double SAL_CALL SbaXFormAdapter::getDouble(sal_Int32 columnIndex)
380{
381 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
382 if (xIface.is())
383 return xIface->getDouble(columnIndex);
384 return 0.0;
385}
386
387Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getBytes(sal_Int32 columnIndex)
388{
389 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
390 if (xIface.is())
391 return xIface->getBytes(columnIndex);
392 return Sequence <sal_Int8> ();
393}
394
395css::util::Date SAL_CALL SbaXFormAdapter::getDate(sal_Int32 columnIndex)
396{
397 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
398 if (xIface.is())
399 return xIface->getDate(columnIndex);
400 return css::util::Date();
401}
402
403css::util::Time SAL_CALL SbaXFormAdapter::getTime(sal_Int32 columnIndex)
404{
405 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
406 if (xIface.is())
407 return xIface->getTime(columnIndex);
408 return css::util::Time();
409}
410
411css::util::DateTime SAL_CALL SbaXFormAdapter::getTimestamp(sal_Int32 columnIndex)
412{
413 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
414 if (xIface.is())
415 return xIface->getTimestamp(columnIndex);
416 return css::util::DateTime();
417}
418
420{
421 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
422 if (xIface.is())
423 return xIface->getBinaryStream(columnIndex);
425}
426
428{
429 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
430 if (xIface.is())
431 return xIface->getCharacterStream(columnIndex);
433}
434
435Any SAL_CALL SbaXFormAdapter::getObject(sal_Int32 columnIndex, const Reference< css::container::XNameAccess >& typeMap)
436{
437 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
438 if (xIface.is())
439 return xIface->getObject(columnIndex, typeMap);
440 return Any();
441}
442
444{
445 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
446 if (xIface.is())
447 return xIface->getRef(columnIndex);
449}
450
452{
453 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
454 if (xIface.is())
455 return xIface->getBlob(columnIndex);
457}
458
460{
461 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
462 if (xIface.is())
463 return xIface->getClob(columnIndex);
465}
466
468{
469 Reference< css::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY);
470 if (xIface.is())
471 return xIface->getArray(columnIndex);
473}
474
475// css::sdbcx::XRowLocate
477{
479 if (xIface.is())
480 return xIface->getBookmark();
481 return Any();
482}
483
484sal_Bool SAL_CALL SbaXFormAdapter::moveToBookmark(const Any& bookmark)
485{
487 if (xIface.is())
488 return xIface->moveToBookmark(bookmark);
489 return false;
490}
491
492sal_Bool SAL_CALL SbaXFormAdapter::moveRelativeToBookmark(const Any& bookmark, sal_Int32 rows)
493{
495 if (xIface.is())
496 return xIface->moveRelativeToBookmark(bookmark,rows);
497 return false;
498}
499
500sal_Int32 SAL_CALL SbaXFormAdapter::compareBookmarks(const Any& _first, const Any& _second)
501{
503 if (xIface.is())
504 return xIface->compareBookmarks(_first, _second);
505 return 0;
506}
507
509{
511 if (xIface.is())
512 return xIface->hasOrderedBookmarks();
513 return false;
514}
515
516sal_Int32 SAL_CALL SbaXFormAdapter::hashBookmark(const Any& bookmark)
517{
519 if (xIface.is())
520 return xIface->hashBookmark(bookmark);
521 return 0;
522}
523
524// css::sdbc::XRowUpdate
525void SAL_CALL SbaXFormAdapter::updateNull(sal_Int32 columnIndex)
526{
528 if (xIface.is())
529 xIface->updateNull(columnIndex);
530}
531
532void SAL_CALL SbaXFormAdapter::updateBoolean(sal_Int32 columnIndex, sal_Bool x)
533{
535 if (xIface.is())
536 xIface->updateBoolean(columnIndex, x);
537}
538
539void SAL_CALL SbaXFormAdapter::updateByte(sal_Int32 columnIndex, sal_Int8 x)
540{
542 if (xIface.is())
543 xIface->updateByte(columnIndex, x);
544}
545
546void SAL_CALL SbaXFormAdapter::updateShort(sal_Int32 columnIndex, sal_Int16 x)
547{
549 if (xIface.is())
550 xIface->updateShort(columnIndex, x);
551}
552
553void SAL_CALL SbaXFormAdapter::updateInt(sal_Int32 columnIndex, sal_Int32 x)
554{
556 if (xIface.is())
557 xIface->updateInt(columnIndex, x);
558}
559
560void SAL_CALL SbaXFormAdapter::updateLong(sal_Int32 columnIndex, sal_Int64 x)
561{
563 if (xIface.is())
564 xIface->updateLong(columnIndex, x);
565}
566
567void SAL_CALL SbaXFormAdapter::updateFloat(sal_Int32 columnIndex, float x)
568{
570 if (xIface.is())
571 xIface->updateFloat(columnIndex, x);
572}
573
574void SAL_CALL SbaXFormAdapter::updateDouble(sal_Int32 columnIndex, double x)
575{
577 if (xIface.is())
578 xIface->updateDouble(columnIndex, x);
579}
580
581void SAL_CALL SbaXFormAdapter::updateString(sal_Int32 columnIndex, const OUString& x)
582{
584 if (xIface.is())
585 xIface->updateString(columnIndex, x);
586}
587
588void SAL_CALL SbaXFormAdapter::updateBytes(sal_Int32 columnIndex, const Sequence< sal_Int8 >& x)
589{
591 if (xIface.is())
592 xIface->updateBytes(columnIndex, x);
593}
594
595void SAL_CALL SbaXFormAdapter::updateDate(sal_Int32 columnIndex, const css::util::Date& x)
596{
598 if (xIface.is())
599 xIface->updateDate(columnIndex, x);
600}
601
602void SAL_CALL SbaXFormAdapter::updateTime(sal_Int32 columnIndex, const css::util::Time& x)
603{
605 if (xIface.is())
606 xIface->updateTime(columnIndex, x);
607}
608
609void SAL_CALL SbaXFormAdapter::updateTimestamp(sal_Int32 columnIndex, const css::util::DateTime& x)
610{
612 if (xIface.is())
613 xIface->updateTimestamp(columnIndex, x);
614}
615
616void SAL_CALL SbaXFormAdapter::updateBinaryStream(sal_Int32 columnIndex, const Reference< css::io::XInputStream >& x, sal_Int32 length)
617{
619 if (xIface.is())
620 xIface->updateBinaryStream(columnIndex, x, length);
621}
622
623void SAL_CALL SbaXFormAdapter::updateCharacterStream(sal_Int32 columnIndex, const Reference< css::io::XInputStream >& x, sal_Int32 length)
624{
626 if (xIface.is())
627 xIface->updateCharacterStream(columnIndex, x, length);
628}
629
630void SAL_CALL SbaXFormAdapter::updateObject(sal_Int32 columnIndex, const Any& x)
631{
633 if (xIface.is())
634 xIface->updateObject(columnIndex, x);
635}
636
637void SAL_CALL SbaXFormAdapter::updateNumericObject(sal_Int32 columnIndex, const Any& x, sal_Int32 scale)
638{
640 if (xIface.is())
641 xIface->updateNumericObject(columnIndex, x, scale);
642}
643
644// css::sdbc::XResultSet
646{
647 if (m_xMainForm.is())
648 return m_xMainForm->next();
649 return false;
650}
651
653{
654 if (m_xMainForm.is())
655 return m_xMainForm->isBeforeFirst();
656 return false;
657}
658
660{
661 if (m_xMainForm.is())
662 return m_xMainForm->isAfterLast();
663 return false;
664}
665
667{
668 if (m_xMainForm.is())
669 return m_xMainForm->isFirst();
670 return false;
671}
672
674{
675 if (m_xMainForm.is())
676 return m_xMainForm->isLast();
677 return false;
678}
679
681{
682 if (m_xMainForm.is())
683 m_xMainForm->beforeFirst();
684}
685
687{
688 if (m_xMainForm.is())
689 m_xMainForm->afterLast();
690}
691
693{
694 if (m_xMainForm.is())
695 return m_xMainForm->first();
696 return false;
697}
698
700{
701 if (m_xMainForm.is())
702 return m_xMainForm->last();
703 return false;
704}
705
706sal_Int32 SAL_CALL SbaXFormAdapter::getRow()
707{
708 if (m_xMainForm.is())
709 return m_xMainForm->getRow();
710 return 0;
711}
712
713sal_Bool SAL_CALL SbaXFormAdapter::absolute(sal_Int32 row)
714{
715 if (m_xMainForm.is())
716 return m_xMainForm->absolute(row);
717 return false;
718}
719
720sal_Bool SAL_CALL SbaXFormAdapter::relative(sal_Int32 rows)
721{
722 if (m_xMainForm.is())
723 return m_xMainForm->relative(rows);
724 return false;
725}
726
728{
729 if (m_xMainForm.is())
730 return m_xMainForm->previous();
731 return false;
732}
733
735{
736 if (m_xMainForm.is())
737 m_xMainForm->refreshRow();
738}
739
741{
742 if (m_xMainForm.is())
743 return m_xMainForm->rowUpdated();
744 return false;
745}
746
748{
749 if (m_xMainForm.is())
750 return m_xMainForm->rowInserted();
751 return false;
752}
753
755{
756 if (m_xMainForm.is())
757 return m_xMainForm->rowDeleted();
758 return false;
759}
760
762{
763 if (m_xMainForm.is())
764 return m_xMainForm->getStatement();
765 return nullptr;
766}
767
768// css::sdbc::XResultSetUpdate
770{
772 if (xIface.is())
773 xIface->insertRow();
774}
775
777{
779 if (xIface.is())
780 xIface->updateRow();
781}
782
784{
786 if (xIface.is())
787 xIface->deleteRow();
788}
789
791{
793 if (xIface.is())
794 xIface->cancelRowUpdates();
795}
796
798{
800 if (xIface.is())
801 xIface->moveToInsertRow();
802}
803
805{
807 if (xIface.is())
808 xIface->moveToCurrentRow();
809}
810
811// css::sdbc::XRowSet
813{
814 if (m_xMainForm.is())
815 m_xMainForm->execute();
816}
817
818void SAL_CALL SbaXFormAdapter::addRowSetListener(const css::uno::Reference< css::sdbc::XRowSetListener >& l)
819{
821 if (m_aRowSetListeners.getLength() == 1)
822 {
823 css::uno::Reference< css::sdbc::XRowSet > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
824 if (xBroadcaster.is())
825 xBroadcaster->addRowSetListener(&m_aRowSetListeners);
826 }
827}
828void SAL_CALL SbaXFormAdapter::removeRowSetListener(const css::uno::Reference< css::sdbc::XRowSetListener >& l)
829{
830 if (m_aRowSetListeners.getLength() == 1)
831 {
832 css::uno::Reference< css::sdbc::XRowSet > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
833 if (xBroadcaster.is())
834 xBroadcaster->removeRowSetListener(&m_aRowSetListeners);
835 }
837}
838
839// css::sdbcx::XDeleteRows
841{
843 if (xIface.is())
844 return xIface->deleteRows(rows);
845 return Sequence<sal_Int32>();
846}
847
848// css::sdbc::XWarningsSupplier
850{
852 if (xIface.is())
853 return xIface->getWarnings();
854 return Any();
855}
856
858{
860 if (xIface.is())
861 xIface->clearWarnings();
862}
863
864// css::sdb::XRowSetApproveBroadcaster
865void SAL_CALL SbaXFormAdapter::addRowSetApproveListener(const css::uno::Reference< css::sdb::XRowSetApproveListener >& l)
866{
869 {
870 css::uno::Reference< css::sdb::XRowSetApproveBroadcaster > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
871 if (xBroadcaster.is())
872 xBroadcaster->addRowSetApproveListener(&m_aRowSetApproveListeners);
873 }
874}
875void SAL_CALL SbaXFormAdapter::removeRowSetApproveListener(const css::uno::Reference< css::sdb::XRowSetApproveListener >& l)
876{
878 {
879 css::uno::Reference< css::sdb::XRowSetApproveBroadcaster > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
880 if (xBroadcaster.is())
881 xBroadcaster->removeRowSetApproveListener(&m_aRowSetApproveListeners);
882 }
884}
885
886// css::sdbc::XSQLErrorBroadcaster
887void SAL_CALL SbaXFormAdapter::addSQLErrorListener(const css::uno::Reference< css::sdb::XSQLErrorListener >& l)
888{
890 if (m_aErrorListeners.getLength() == 1)
891 {
892 css::uno::Reference< css::sdb::XSQLErrorBroadcaster > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
893 if (xBroadcaster.is())
894 xBroadcaster->addSQLErrorListener(&m_aErrorListeners);
895 }
896}
897void SAL_CALL SbaXFormAdapter::removeSQLErrorListener(const css::uno::Reference< css::sdb::XSQLErrorListener >& l)
898{
899 if (m_aErrorListeners.getLength() == 1)
900 {
901 css::uno::Reference< css::sdb::XSQLErrorBroadcaster > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
902 if (xBroadcaster.is())
903 xBroadcaster->removeSQLErrorListener(&m_aErrorListeners);
904 }
906}
907
908// css::sdb::XResultSetAccess
910{
912 if (xIface.is())
913 return xIface->createResultSet();
915}
916
917// css::form::XLoadable
919{
921 if (xIface.is())
922 xIface->load();
923}
924
926{
928 if (xIface.is())
929 xIface->unload();
930}
931
933{
935 if (xIface.is())
936 xIface->reload();
937}
938
940{
942 if (xIface.is())
943 return xIface->isLoaded();
944 return false;
945}
946
947void SAL_CALL SbaXFormAdapter::addLoadListener(const css::uno::Reference< css::form::XLoadListener>& l)
948{
950 if (m_aLoadListeners.getLength() == 1)
951 {
952 css::uno::Reference< css::form::XLoadable > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
953 if (xBroadcaster.is())
954 xBroadcaster->addLoadListener(&m_aLoadListeners);
955 }
956}
957void SAL_CALL SbaXFormAdapter::removeLoadListener(const css::uno::Reference< css::form::XLoadListener >& l)
958{
959 if (m_aLoadListeners.getLength() == 1)
960 {
961 css::uno::Reference< css::form::XLoadable > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
962 if (xBroadcaster.is())
963 xBroadcaster->removeLoadListener(&m_aLoadListeners);
964 }
966}
967
968// css::sdbc::XParameters
969void SAL_CALL SbaXFormAdapter::setNull(sal_Int32 parameterIndex, sal_Int32 sqlType)
970{
972 if (xIface.is())
973 xIface->setNull(parameterIndex, sqlType);
974}
975
976void SAL_CALL SbaXFormAdapter::setObjectNull(sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& typeName)
977{
979 if (xIface.is())
980 xIface->setObjectNull(parameterIndex, sqlType, typeName);
981}
982
983void SAL_CALL SbaXFormAdapter::setBoolean(sal_Int32 parameterIndex, sal_Bool x)
984{
986 if (xIface.is())
987 xIface->setBoolean(parameterIndex, x);
988}
989
990void SAL_CALL SbaXFormAdapter::setByte(sal_Int32 parameterIndex, sal_Int8 x)
991{
993 if (xIface.is())
994 xIface->setByte(parameterIndex, x);
995}
996
997void SAL_CALL SbaXFormAdapter::setShort(sal_Int32 parameterIndex, sal_Int16 x)
998{
1000 if (xIface.is())
1001 xIface->setShort(parameterIndex, x);
1002}
1003
1004void SAL_CALL SbaXFormAdapter::setInt(sal_Int32 parameterIndex, sal_Int32 x)
1005{
1007 if (xIface.is())
1008 xIface->setInt(parameterIndex, x);
1009}
1010
1011void SAL_CALL SbaXFormAdapter::setLong(sal_Int32 parameterIndex, sal_Int64 x)
1012{
1014 if (xIface.is())
1015 xIface->setLong(parameterIndex, x);
1016}
1017
1018void SAL_CALL SbaXFormAdapter::setFloat(sal_Int32 parameterIndex, float x)
1019{
1021 if (xIface.is())
1022 xIface->setFloat(parameterIndex, x);
1023}
1024
1025void SAL_CALL SbaXFormAdapter::setDouble(sal_Int32 parameterIndex, double x)
1026{
1028 if (xIface.is())
1029 xIface->setDouble(parameterIndex, x);
1030}
1031
1032void SAL_CALL SbaXFormAdapter::setString(sal_Int32 parameterIndex, const OUString& x)
1033{
1035 if (xIface.is())
1036 xIface->setString(parameterIndex, x);
1037}
1038
1039void SAL_CALL SbaXFormAdapter::setBytes(sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x)
1040{
1042 if (xIface.is())
1043 xIface->setBytes(parameterIndex, x);
1044}
1045
1046void SAL_CALL SbaXFormAdapter::setDate(sal_Int32 parameterIndex, const css::util::Date& x)
1047{
1049 if (xIface.is())
1050 xIface->setDate(parameterIndex, x);
1051}
1052
1053void SAL_CALL SbaXFormAdapter::setTime(sal_Int32 parameterIndex, const css::util::Time& x)
1054{
1056 if (xIface.is())
1057 xIface->setTime(parameterIndex, x);
1058}
1059
1060void SAL_CALL SbaXFormAdapter::setTimestamp(sal_Int32 parameterIndex, const css::util::DateTime& x)
1061{
1063 if (xIface.is())
1064 xIface->setTimestamp(parameterIndex, x);
1065}
1066
1067void SAL_CALL SbaXFormAdapter::setBinaryStream(sal_Int32 parameterIndex, const Reference< css::io::XInputStream >& x, sal_Int32 length)
1068{
1070 if (xIface.is())
1071 xIface->setBinaryStream(parameterIndex, x, length);
1072}
1073
1074void SAL_CALL SbaXFormAdapter::setCharacterStream(sal_Int32 parameterIndex, const Reference< css::io::XInputStream >& x, sal_Int32 length)
1075{
1077 if (xIface.is())
1078 xIface->setCharacterStream(parameterIndex, x, length);
1079}
1080
1081void SAL_CALL SbaXFormAdapter::setObject(sal_Int32 parameterIndex, const Any& x)
1082{
1084 if (xIface.is())
1085 xIface->setObject(parameterIndex, x);
1086}
1087
1088void SAL_CALL SbaXFormAdapter::setObjectWithInfo(sal_Int32 parameterIndex, const Any& x, sal_Int32 targetSqlType, sal_Int32 scale)
1089{
1091 if (xIface.is())
1092 xIface->setObjectWithInfo(parameterIndex, x, targetSqlType, scale);
1093}
1094
1095void SAL_CALL SbaXFormAdapter::setRef(sal_Int32 parameterIndex, const Reference< css::sdbc::XRef >& x)
1096{
1098 if (xIface.is())
1099 xIface->setRef(parameterIndex, x);
1100}
1101
1102void SAL_CALL SbaXFormAdapter::setBlob(sal_Int32 parameterIndex, const Reference< css::sdbc::XBlob >& x)
1103{
1105 if (xIface.is())
1106 xIface->setBlob(parameterIndex, x);
1107}
1108
1109void SAL_CALL SbaXFormAdapter::setClob(sal_Int32 parameterIndex, const Reference< css::sdbc::XClob >& x)
1110{
1112 if (xIface.is())
1113 xIface->setClob(parameterIndex, x);
1114}
1115
1116void SAL_CALL SbaXFormAdapter::setArray(sal_Int32 parameterIndex, const Reference< css::sdbc::XArray >& x)
1117{
1119 if (xIface.is())
1120 xIface->setArray(parameterIndex, x);
1121}
1122
1124{
1126 if (xIface.is())
1127 xIface->clearParameters();
1128}
1129
1130// css::form::XDatabaseParameterBroadcaster
1132{
1135 {
1137 if (xBroadcaster.is())
1138 xBroadcaster->addParameterListener(&m_aParameterListeners);
1139 }
1140}
1141
1143{
1145 {
1147 if (xBroadcaster.is())
1148 xBroadcaster->removeParameterListener(&m_aParameterListeners);
1149 }
1151}
1152
1153// css::container::XChild
1155{
1156 return m_xParent;
1157}
1158
1160{
1161 m_xParent = Parent;
1162}
1163
1164// css::form::XSubmit
1165void SAL_CALL SbaXFormAdapter::submit(const Reference< css::awt::XControl >& aControl, const css::awt::MouseEvent& aMouseEvt)
1166{
1167 Reference< css::form::XSubmit > xSubmit(m_xMainForm, UNO_QUERY);
1168 if (xSubmit.is())
1169 xSubmit->submit(aControl, aMouseEvt);
1170}
1171
1172void SAL_CALL SbaXFormAdapter::addSubmitListener(const css::uno::Reference< css::form::XSubmitListener >& l)
1173{
1175 if (m_aSubmitListeners.getLength() == 1)
1176 {
1177 css::uno::Reference< css::form::XSubmit > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
1178 if (xBroadcaster.is())
1179 xBroadcaster->addSubmitListener(&m_aSubmitListeners);
1180 }
1181}
1182void SAL_CALL SbaXFormAdapter::removeSubmitListener(const css::uno::Reference< css::form::XSubmitListener >& l)
1183{
1184 if (m_aSubmitListeners.getLength() == 1)
1185 {
1186 css::uno::Reference< css::form::XSubmit > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
1187 if (xBroadcaster.is())
1188 xBroadcaster->removeSubmitListener(&m_aSubmitListeners);
1189 }
1191}
1192
1193// css::awt::XTabControllerModel
1195{
1196 OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupControl : not supported !");
1197 return false;
1198}
1199
1200void SAL_CALL SbaXFormAdapter::setGroupControl(sal_Bool /*GroupControl*/)
1201{
1202 OSL_FAIL("SAL_CALL SbaXFormAdapter::setGroupControl : not supported !");
1203}
1204
1206{
1207 OSL_FAIL("SAL_CALL SbaXFormAdapter::setControlModels : not supported !");
1208}
1209
1211{
1212 OSL_FAIL("SAL_CALL SbaXFormAdapter::getControlModels : not supported !");
1214}
1215
1216void SAL_CALL SbaXFormAdapter::setGroup(const Sequence< Reference< css::awt::XControlModel > >& /*_rGroup*/, const OUString& /*GroupName*/)
1217{
1218 OSL_FAIL("SAL_CALL SbaXFormAdapter::setGroup : not supported !");
1219}
1220
1222{
1223 OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupCount : not supported !");
1224 return 0;
1225}
1226
1227void SAL_CALL SbaXFormAdapter::getGroup(sal_Int32 /*nGroup*/, Sequence< Reference< css::awt::XControlModel > >& /*_rGroup*/, OUString& /*Name*/)
1228{
1229 OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroup : not supported !");
1230}
1231
1232void SAL_CALL SbaXFormAdapter::getGroupByName(const OUString& /*Name*/, Sequence< Reference< css::awt::XControlModel > >& /*_rGroup*/)
1233{
1234 OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupByName : not supported !");
1235}
1236
1237// css::lang::XComponent
1239{
1240 // log off all multiplexers
1241 if (m_xMainForm.is())
1242 StopListening();
1243
1244 css::lang::EventObject aEvt(*this);
1252
1256
1259
1260 // dispose all children
1261 for (auto const& child : m_aChildren)
1262 {
1263 Reference< css::beans::XPropertySet > xSet(child, UNO_QUERY);
1264 if (xSet.is())
1265 xSet->removePropertyChangeListener(PROPERTY_NAME, static_cast<css::beans::XPropertyChangeListener*>(this));
1266
1267 Reference< css::container::XChild > xChild(child, UNO_QUERY);
1268 if (xChild.is())
1269 xChild->setParent(Reference< XInterface > ());
1270
1271 Reference< css::lang::XComponent > xComp(child, UNO_QUERY);
1272 if (xComp.is())
1273 xComp->dispose();
1274 }
1275 m_aChildren.clear();
1276}
1277
1279{
1281}
1282
1284{
1286}
1287
1288// css::beans::XFastPropertySet
1289void SAL_CALL SbaXFormAdapter::setFastPropertyValue(sal_Int32 nHandle, const Any& aValue)
1290{
1292 OSL_ENSURE(xSet.is(), "SAL_CALL SbaXFormAdapter::setFastPropertyValue : have no master form !");
1293
1295 {
1296 if (aValue.getValueType().getTypeClass() != TypeClass_STRING)
1297 {
1298 throw css::lang::IllegalArgumentException();
1299 }
1300
1301 // for notifying property listeners
1302 css::beans::PropertyChangeEvent aEvt;
1303 aEvt.Source = *this;
1304 aEvt.PropertyName = PROPERTY_NAME;
1305 aEvt.PropertyHandle = m_nNamePropHandle;
1306 aEvt.OldValue <<= m_sName;
1307 aEvt.NewValue = aValue;
1308
1309 aValue >>= m_sName;
1310
1312 &XPropertyChangeListener::propertyChange, aEvt );
1313
1314 return;
1315 }
1316
1317 xSet->setFastPropertyValue(nHandle, aValue);
1318}
1319
1321{
1323 OSL_ENSURE(xSet.is(), "SAL_CALL SbaXFormAdapter::getFastPropertyValue : have no master form !");
1324
1326 return Any(m_sName);
1327
1328 return xSet->getFastPropertyValue(nHandle);
1329}
1330
1331// css::container::XNamed
1332OUString SAL_CALL SbaXFormAdapter::getName()
1333{
1334 return ::comphelper::getString(getPropertyValue(PROPERTY_NAME));
1335}
1336
1337void SAL_CALL SbaXFormAdapter::setName(const OUString& aName)
1338{
1340}
1341
1342// css::io::XPersistObject
1344{
1346 if (xPersist.is())
1347 return xPersist->getServiceName();
1348 return OUString();
1349}
1350
1352{
1354 if (xPersist.is())
1355 xPersist->write(_rxOutStream);
1356}
1357
1359{
1361 if (xPersist.is())
1362 xPersist->read(_rxInStream);
1363}
1364
1365// css::beans::XMultiPropertySet
1367{
1369 if (!xSet.is())
1371
1372 Reference< css::beans::XPropertySetInfo > xReturn = xSet->getPropertySetInfo();
1373 if (-1 == m_nNamePropHandle)
1374 {
1375 // we need to determine the handle for the NAME property
1376 const Sequence<css::beans::Property> aProps = xReturn->getProperties();
1377 for (const css::beans::Property& rProp : aProps)
1378 {
1379 if (rProp.Name == PROPERTY_NAME)
1380 {
1381 m_nNamePropHandle = rProp.Handle;
1382 break;
1383 }
1384 }
1385 }
1386 return xReturn;
1387}
1388
1389void SAL_CALL SbaXFormAdapter::setPropertyValues(const Sequence< OUString >& PropertyNames, const Sequence< Any >& Values)
1390{
1392 if (xSet.is())
1393 xSet->setPropertyValues(PropertyNames, Values);
1394}
1395
1397{
1399 if (!xSet.is())
1400 return Sequence< Any>(aPropertyNames.getLength());
1401
1402 Sequence< Any> aReturn = xSet->getPropertyValues(aPropertyNames);
1403 auto aReturnRange = asNonConstRange(aReturn);
1404
1405 // search for (and fake) the NAME property
1406 OSL_ENSURE(aReturn.getLength() == aPropertyNames.getLength(), "SAL_CALL SbaXFormAdapter::getPropertyValues : the main form returned an invalid-length sequence !");
1407 for (sal_Int32 i=0; i<aPropertyNames.getLength(); ++i)
1408 if (aPropertyNames[i] == PROPERTY_NAME)
1409 {
1410 aReturnRange[i] <<= m_sName;
1411 break;
1412 }
1413
1414 return aReturn;
1415}
1416
1418{
1419 // we completely ignore the property names, _all_ changes of _all_ properties will be forwarded to _all_ listeners
1422 {
1424 if (xBroadcaster.is())
1425 xBroadcaster->addPropertiesChangeListener(Sequence< OUString>{""}, &m_aPropertiesChangeListeners);
1426 }
1427}
1428
1430{
1432 {
1434 if (xBroadcaster.is())
1435 xBroadcaster->removePropertiesChangeListener(&m_aPropertiesChangeListeners);
1436 }
1438}
1439
1441{
1443 if (xSet.is())
1444 xSet->firePropertiesChangeEvent(aPropertyNames, xListener);
1445}
1446
1447// css::beans::XPropertySet
1448void SAL_CALL SbaXFormAdapter::setPropertyValue(const OUString& aPropertyName, const Any& aValue)
1449{
1451 if (!xSet.is())
1452 return;
1453
1454 // special handling for the "name" property
1455 if (aPropertyName == PROPERTY_NAME)
1457
1458 xSet->setPropertyValue(aPropertyName, aValue);
1459}
1460
1461Any SAL_CALL SbaXFormAdapter::getPropertyValue(const OUString& PropertyName)
1462{
1464 if (!xSet.is())
1465 return Any();
1466
1467 // special handling for the "name" property
1468 if (PropertyName == PROPERTY_NAME)
1470
1471 return xSet->getPropertyValue(PropertyName);
1472}
1473
1474void SAL_CALL SbaXFormAdapter::addPropertyChangeListener(const OUString& rName, const css::uno::Reference< css::beans::XPropertyChangeListener>& l )
1475{
1478 {
1479 css::uno::Reference< css::beans::XPropertySet > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
1480 if (xBroadcaster.is())
1481 xBroadcaster->addPropertyChangeListener(OUString(), &m_aPropertyChangeListeners);
1482 }
1483}
1484void SAL_CALL SbaXFormAdapter::removePropertyChangeListener(const OUString& rName, const css::uno::Reference< css::beans::XPropertyChangeListener>& l )
1485{
1487 {
1488 css::uno::Reference< css::beans::XPropertySet > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
1489 if (xBroadcaster.is())
1490 xBroadcaster->removePropertyChangeListener(OUString(), &m_aPropertyChangeListeners);
1491 }
1493}
1494
1495void SAL_CALL SbaXFormAdapter::addVetoableChangeListener(const OUString& rName, const css::uno::Reference< css::beans::XVetoableChangeListener>& l )
1496{
1499 {
1500 css::uno::Reference< css::beans::XPropertySet > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
1501 if (xBroadcaster.is())
1502 xBroadcaster->addVetoableChangeListener(OUString(), &m_aVetoablePropertyChangeListeners);
1503 }
1504}
1505void SAL_CALL SbaXFormAdapter::removeVetoableChangeListener(const OUString& rName, const css::uno::Reference< css::beans::XVetoableChangeListener>& l )
1506{
1508 {
1509 css::uno::Reference< css::beans::XPropertySet > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
1510 if (xBroadcaster.is())
1511 xBroadcaster->removeVetoableChangeListener(OUString(), &m_aVetoablePropertyChangeListeners);
1512 }
1514}
1515
1516
1517// css::util::XCancellable
1519{
1521 if (!xCancel.is())
1522 return;
1523 xCancel->cancel();
1524}
1525
1526// css::beans::XPropertyState
1527css::beans::PropertyState SAL_CALL SbaXFormAdapter::getPropertyState(const OUString& PropertyName)
1528{
1530 if (xState.is())
1531 return xState->getPropertyState(PropertyName);
1532 return css::beans::PropertyState_DEFAULT_VALUE;
1533}
1534
1536{
1538 if (xState.is())
1539 return xState->getPropertyStates(aPropertyName);
1540
1541 // set them all to DEFAULT
1542 Sequence< css::beans::PropertyState> aReturn(aPropertyName.getLength());
1543 for (css::beans::PropertyState& rState : asNonConstRange(aReturn))
1544 rState = css::beans::PropertyState_DEFAULT_VALUE;
1545 return aReturn;
1546}
1547
1548void SAL_CALL SbaXFormAdapter::setPropertyToDefault(const OUString& PropertyName)
1549{
1551 if (xState.is())
1552 xState->setPropertyToDefault(PropertyName);
1553}
1554
1555Any SAL_CALL SbaXFormAdapter::getPropertyDefault(const OUString& aPropertyName)
1556{
1558 if (xState.is())
1559 return xState->getPropertyDefault(aPropertyName);
1560 return Any();
1561}
1562
1563// css::form::XReset
1565{
1567 if (xReset.is())
1568 xReset->reset();
1569}
1570
1571void SAL_CALL SbaXFormAdapter::addResetListener(const css::uno::Reference< css::form::XResetListener >& l)
1572{
1574 if (m_aResetListeners.getLength() == 1)
1575 {
1576 css::uno::Reference< css::form::XReset > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
1577 if (xBroadcaster.is())
1578 xBroadcaster->addResetListener(&m_aResetListeners);
1579 }
1580}
1581void SAL_CALL SbaXFormAdapter::removeResetListener(const css::uno::Reference< css::form::XResetListener >& l)
1582{
1583 if (m_aResetListeners.getLength() == 1)
1584 {
1585 css::uno::Reference< css::form::XReset > xBroadcaster(m_xMainForm, css::uno::UNO_QUERY);
1586 if (xBroadcaster.is())
1587 xBroadcaster->removeResetListener(&m_aResetListeners);
1588 }
1590}
1591
1592// css::container::XNameContainer
1593void SbaXFormAdapter::implInsert(const Any& aElement, sal_Int32 nIndex, const OUString* pNewElName)
1594{
1595 // extract the form component
1596 if (aElement.getValueType().getTypeClass() != TypeClass_INTERFACE)
1597 {
1598 throw css::lang::IllegalArgumentException();
1599 }
1600
1601 Reference< css::form::XFormComponent > xElement(aElement, UNO_QUERY);
1602 if (!xElement.is())
1603 {
1604 throw css::lang::IllegalArgumentException();
1605 }
1606
1607 // for the name we need the propset
1608 Reference< css::beans::XPropertySet > xElementSet(xElement, UNO_QUERY);
1609 if (!xElementSet.is())
1610 {
1611 throw css::lang::IllegalArgumentException();
1612 }
1613 OUString sName;
1614 try
1615 {
1616 if (pNewElName)
1617 xElementSet->setPropertyValue(PROPERTY_NAME, Any(*pNewElName));
1618
1619 xElementSet->getPropertyValue(PROPERTY_NAME) >>= sName;
1620 }
1621 catch(Exception&)
1622 {
1623 // the set didn't support the name prop
1624 throw css::lang::IllegalArgumentException();
1625 }
1626
1627 // check the index
1628 OSL_ASSERT(nIndex >= 0);
1629 if (sal::static_int_cast< sal_uInt32 >(nIndex) > m_aChildren.size())
1630 nIndex = m_aChildren.size();
1631
1632 OSL_ENSURE(m_aChildren.size() == m_aChildNames.size(), "SAL_CALL SbaXFormAdapter::implInsert : inconsistent container state !");
1633 m_aChildren.insert(m_aChildren.begin() + nIndex, xElement);
1634 m_aChildNames.insert(m_aChildNames.begin() + nIndex, sName);
1635
1636 // listen for a change of the name
1637 xElementSet->addPropertyChangeListener(PROPERTY_NAME, static_cast<css::beans::XPropertyChangeListener*>(this));
1638
1639 // we are now the parent of the new element
1640 xElement->setParent(static_cast<css::container::XContainer*>(this));
1641
1642 // notify the container listeners
1643 css::container::ContainerEvent aEvt;
1644 aEvt.Source = *this;
1645 aEvt.Accessor <<= nIndex;
1646 aEvt.Element <<= xElement;
1647 m_aContainerListeners.notifyEach( &XContainerListener::elementInserted, aEvt );
1648}
1649
1650sal_Int32 SbaXFormAdapter::implGetPos(const OUString& rName)
1651{
1652 std::vector< OUString>::const_iterator aIter = std::find( m_aChildNames.begin(),
1653 m_aChildNames.end(),
1654 rName);
1655
1656 if(aIter != m_aChildNames.end())
1657 return aIter - m_aChildNames.begin();
1658
1659 return -1;
1660}
1661
1662void SAL_CALL SbaXFormAdapter::insertByName(const OUString& aName, const Any& aElement)
1663{
1664 implInsert(aElement, m_aChildren.size(), &aName);
1665}
1666
1667void SAL_CALL SbaXFormAdapter::removeByName(const OUString& Name)
1668{
1669 sal_Int32 nPos = implGetPos(Name);
1670 if (-1 == nPos)
1671 {
1672 throw css::container::NoSuchElementException();
1673 }
1675}
1676
1677// css::container::XNameReplace
1678void SAL_CALL SbaXFormAdapter::replaceByName(const OUString& aName, const Any& aElement)
1679{
1680 sal_Int32 nPos = implGetPos(aName);
1681 if (-1 == nPos)
1682 {
1683 throw css::container::NoSuchElementException();
1684 }
1685 replaceByIndex(nPos, aElement);
1686}
1687
1688// css::container::XNameAccess
1689Any SAL_CALL SbaXFormAdapter::getByName(const OUString& aName)
1690{
1691 sal_Int32 nPos = implGetPos(aName);
1692 if (-1 == nPos)
1693 {
1694 throw css::container::NoSuchElementException();
1695 }
1696 return Any(m_aChildren[nPos]);
1697}
1698
1700{
1701 return Sequence< OUString >(m_aChildNames.data(), m_aChildNames.size());
1702}
1703
1704sal_Bool SAL_CALL SbaXFormAdapter::hasByName(const OUString& aName)
1705{
1706 return (-1 != implGetPos(aName));
1707}
1708
1709// css::container::XElementAccess
1711{
1713}
1714
1716{
1717 return !m_aChildren.empty();
1718}
1719
1720// css::container::XIndexContainer
1721void SAL_CALL SbaXFormAdapter::insertByIndex(sal_Int32 _rIndex, const Any& Element)
1722{
1723 if ( ( _rIndex < 0 ) || ( o3tl::make_unsigned(_rIndex) >= m_aChildren.size() ) )
1724 throw css::lang::IndexOutOfBoundsException();
1725 implInsert(Element, _rIndex);
1726}
1727
1728void SAL_CALL SbaXFormAdapter::removeByIndex(sal_Int32 _rIndex)
1729{
1730 if ( ( _rIndex < 0 ) || ( o3tl::make_unsigned(_rIndex) >= m_aChildren.size() ) )
1731 throw css::lang::IndexOutOfBoundsException();
1732
1733 Reference< css::form::XFormComponent > xAffected = *(m_aChildren.begin() + _rIndex);
1734
1735 OSL_ENSURE(m_aChildren.size() == m_aChildNames.size(), "SAL_CALL SbaXFormAdapter::removeByIndex : inconsistent container state !");
1736 m_aChildren.erase(m_aChildren.begin() + _rIndex);
1737 m_aChildNames.erase(m_aChildNames.begin() + _rIndex);
1738
1739 // no need to listen anymore
1740 Reference< css::beans::XPropertySet > xAffectedSet(xAffected, UNO_QUERY);
1741 xAffectedSet->removePropertyChangeListener(PROPERTY_NAME, static_cast<css::beans::XPropertyChangeListener*>(this));
1742
1743 // we are no longer the parent
1744 xAffected->setParent(Reference< XInterface > ());
1745
1746 // notify container listeners
1747 css::container::ContainerEvent aEvt;
1748 aEvt.Source = *this;
1749 aEvt.Element <<= xAffected;
1750 m_aContainerListeners.notifyEach( &XContainerListener::elementRemoved, aEvt );
1751}
1752
1753// css::container::XIndexReplace
1754void SAL_CALL SbaXFormAdapter::replaceByIndex(sal_Int32 _rIndex, const Any& Element)
1755{
1756 if ( ( _rIndex < 0 ) || ( o3tl::make_unsigned(_rIndex) >= m_aChildren.size() ) )
1757 throw css::lang::IndexOutOfBoundsException();
1758
1759 // extract the form component
1760 if (Element.getValueType().getTypeClass() != TypeClass_INTERFACE)
1761 {
1762 throw css::lang::IllegalArgumentException();
1763 }
1764
1765 Reference< css::form::XFormComponent > xElement(Element, UNO_QUERY);
1766 if (!xElement.is())
1767 {
1768 throw css::lang::IllegalArgumentException();
1769 }
1770
1771 // for the name we need the propset
1772 Reference< css::beans::XPropertySet > xElementSet(xElement, UNO_QUERY);
1773 if (!xElementSet.is())
1774 {
1775 throw css::lang::IllegalArgumentException();
1776 }
1777 OUString sName;
1778 try
1779 {
1780 xElementSet->getPropertyValue(PROPERTY_NAME) >>= sName;
1781 }
1782 catch(Exception&)
1783 {
1784 // the set didn't support the name prop
1785 throw css::lang::IllegalArgumentException();
1786 }
1787
1788 Reference< css::form::XFormComponent > xOld = *(m_aChildren.begin() + _rIndex);
1789
1790 OSL_ENSURE(m_aChildren.size() == m_aChildNames.size(), "SAL_CALL SbaXFormAdapter::replaceByIndex : inconsistent container state !");
1791 *(m_aChildren.begin() + _rIndex) = xElement;
1792 *(m_aChildNames.begin() + _rIndex) = sName;
1793
1794 // correct property change listening
1795 Reference< css::beans::XPropertySet > xOldSet(xOld, UNO_QUERY);
1796 xOldSet->removePropertyChangeListener(PROPERTY_NAME, static_cast<css::beans::XPropertyChangeListener*>(this));
1797 xElementSet->addPropertyChangeListener(PROPERTY_NAME, static_cast<css::beans::XPropertyChangeListener*>(this));
1798
1799 // parent reset
1800 xOld->setParent(Reference< XInterface > ());
1801 xElement->setParent(static_cast<css::container::XContainer*>(this));
1802
1803 // notify container listeners
1804 css::container::ContainerEvent aEvt;
1805 aEvt.Source = *this;
1806 aEvt.Accessor <<= _rIndex;
1807 aEvt.Element <<= xElement;
1808 aEvt.ReplacedElement <<= xOld;
1809
1810 m_aContainerListeners.notifyEach( &XContainerListener::elementReplaced, aEvt );
1811}
1812
1813// css::container::XIndexAccess
1814sal_Int32 SAL_CALL SbaXFormAdapter::getCount()
1815{
1816 return m_aChildren.size();
1817}
1818
1819Any SAL_CALL SbaXFormAdapter::getByIndex(sal_Int32 _rIndex)
1820{
1821 if ( ( _rIndex < 0 ) || ( o3tl::make_unsigned(_rIndex) >= m_aChildren.size() ) )
1822 throw css::lang::IndexOutOfBoundsException();
1823
1824 Reference< css::form::XFormComponent > xElement = *(m_aChildren.begin() + _rIndex);
1825 return Any(xElement);
1826}
1827
1828// css::container::XContainer
1830{
1832}
1833
1835{
1837}
1838
1839// css::container::XEnumerationAccess
1841{
1842 return new ::comphelper::OEnumerationByName(this);
1843}
1844
1845// css::beans::XPropertyChangeListener
1846void SAL_CALL SbaXFormAdapter::propertyChange(const css::beans::PropertyChangeEvent& evt)
1847{
1848 if (evt.PropertyName != PROPERTY_NAME)
1849 return;
1850
1851 std::vector< css::uno::Reference< css::form::XFormComponent > >::const_iterator aIter = std::find_if( m_aChildren.begin(),
1852 m_aChildren.end(),
1853 [&evt](css::uno::Reference< css::uno::XInterface > const & x) { return x == evt.Source; });
1854
1855 if(aIter != m_aChildren.end())
1856 {
1857 sal_Int32 nPos = aIter - m_aChildren.begin();
1858 OSL_ENSURE(*(m_aChildNames.begin() + nPos) == ::comphelper::getString(evt.OldValue), "SAL_CALL SbaXFormAdapter::propertyChange : object has a wrong name !");
1859 *(m_aChildNames.begin() + nPos) = ::comphelper::getString(evt.NewValue);
1860 }
1861}
1862
1863// css::lang::XEventListener
1864void SAL_CALL SbaXFormAdapter::disposing(const css::lang::EventObject& Source)
1865{
1866 // was it our main form ?
1867 if (Source.Source == m_xMainForm)
1868 dispose();
1869
1870 std::vector< css::uno::Reference< css::form::XFormComponent > >::const_iterator aIter = std::find_if( m_aChildren.begin(),
1871 m_aChildren.end(),
1872 [&Source](css::uno::Reference< css::uno::XInterface > const & x) { return x == Source.Source; });
1873 if(aIter != m_aChildren.end())
1874 removeByIndex(aIter - m_aChildren.begin());
1875}
1876
1877/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OptionalString sName
sal_Int32 addInterface(const css::uno::Reference< ListenerT > &rxIFace)
void disposeAndClear(const css::lang::EventObject &rEvt)
sal_Int32 removeInterface(const css::uno::Reference< ListenerT > &rxIFace)
void notifyEach(void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
css::uno::Type const & get()
std::vector< OUString > m_aChildNames
virtual css::util::DateTime SAL_CALL getTimestamp(sal_Int32 columnIndex) override
virtual void SAL_CALL updateBinaryStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual void SAL_CALL insertRow() override
virtual void SAL_CALL setName(const OUString &aName) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL removeRowSetApproveListener(const css::uno::Reference< css::sdb::XRowSetApproveListener > &listener) override
void AttachForm(const css::uno::Reference< css::sdbc::XRowSet > &xNewMaster)
virtual void SAL_CALL setArray(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XArray > &x) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getStatement() override
virtual void SAL_CALL addRowSetListener(const css::uno::Reference< css::sdbc::XRowSetListener > &listener) override
virtual css::uno::Reference< css::sdbc::XBlob > SAL_CALL getBlob(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL hasOrderedBookmarks() override
virtual void SAL_CALL replaceByIndex(sal_Int32 _rIndex, const css::uno::Any &Element) override
SbaXVetoableChangeMultiplexer m_aVetoablePropertyChangeListeners
SbaXResetMultiplexer m_aResetListeners
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
virtual void SAL_CALL getGroupByName(const OUString &Name, css::uno::Sequence< css::uno::Reference< css::awt::XControlModel > > &_rGroup) override
virtual css::uno::Any SAL_CALL getObject(sal_Int32 columnIndex, const css::uno::Reference< css::container::XNameAccess > &typeMap) override
virtual float SAL_CALL getFloat(sal_Int32 columnIndex) override
virtual void SAL_CALL setLong(sal_Int32 parameterIndex, sal_Int64 x) override
virtual void SAL_CALL setShort(sal_Int32 parameterIndex, sal_Int16 x) override
virtual css::uno::Reference< css::sdbc::XRef > SAL_CALL getRef(sal_Int32 columnIndex) override
virtual void SAL_CALL updateTimestamp(sal_Int32 columnIndex, const css::util::DateTime &x) override
virtual sal_Bool SAL_CALL moveToBookmark(const css::uno::Any &bookmark) override
virtual void SAL_CALL write(const css::uno::Reference< css::io::XObjectOutputStream > &_rxOutStream) override
virtual sal_Int32 SAL_CALL getCount() override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
virtual OUString SAL_CALL getName() override
virtual css::util::Time SAL_CALL getTime(sal_Int32 columnIndex) override
virtual void SAL_CALL updateObject(sal_Int32 columnIndex, const css::uno::Any &x) override
virtual void SAL_CALL unload() override
virtual void SAL_CALL updateInt(sal_Int32 columnIndex, sal_Int32 x) override
sal_Int32 implGetPos(const OUString &rName)
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual void SAL_CALL setBytes(sal_Int32 parameterIndex, const css::uno::Sequence< sal_Int8 > &x) override
virtual sal_Bool SAL_CALL absolute(sal_Int32 row) override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual void SAL_CALL moveToCurrentRow() override
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual void SAL_CALL setInt(sal_Int32 parameterIndex, sal_Int32 x) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: formadapter.cxx:62
virtual void SAL_CALL removeByName(const OUString &Name) override
virtual void SAL_CALL addContainerListener(const css::uno::Reference< css::container::XContainerListener > &xListener) override
virtual sal_Bool SAL_CALL relative(sal_Int32 rows) override
virtual void SAL_CALL setGroup(const css::uno::Sequence< css::uno::Reference< css::awt::XControlModel > > &_rGroup, const OUString &GroupName) override
SbaXPropertiesChangeMultiplexer m_aPropertiesChangeListeners
virtual void SAL_CALL submit(const css::uno::Reference< css::awt::XControl > &aControl, const css::awt::MouseEvent &aMouseEvt) override
virtual void SAL_CALL setClob(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XClob > &x) override
virtual double SAL_CALL getDouble(sal_Int32 columnIndex) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual void SAL_CALL setFastPropertyValue(sal_Int32 nHandle, const css::uno::Any &aValue) override
virtual void SAL_CALL load() override
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
virtual void SAL_CALL setBoolean(sal_Int32 parameterIndex, sal_Bool x) override
virtual sal_Bool SAL_CALL isFirst() override
virtual void SAL_CALL reset() override
virtual void SAL_CALL setParent(const css::uno::Reference< css::uno::XInterface > &Parent) override
virtual void SAL_CALL removeRowSetListener(const css::uno::Reference< css::sdbc::XRowSetListener > &listener) override
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames) override
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual void SAL_CALL insertByName(const OUString &aName, const css::uno::Any &aElement) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent() override
virtual void SAL_CALL insertByIndex(sal_Int32 _rIndex, const css::uno::Any &Element) override
SbaXSubmitMultiplexer m_aSubmitListeners
virtual void SAL_CALL clearParameters() override
virtual sal_Int32 SAL_CALL compareBookmarks(const css::uno::Any &first, const css::uno::Any &second) override
virtual sal_Bool SAL_CALL getBoolean(sal_Int32 columnIndex) override
virtual void SAL_CALL setString(sal_Int32 parameterIndex, const OUString &x) override
virtual void SAL_CALL removeByIndex(sal_Int32 _rIndex) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &_rType) override
Definition: formadapter.cxx:76
virtual void SAL_CALL setTimestamp(sal_Int32 parameterIndex, const css::util::DateTime &x) override
virtual void SAL_CALL setObject(sal_Int32 parameterIndex, const css::uno::Any &x) override
virtual sal_Int64 SAL_CALL getLong(sal_Int32 columnIndex) override
virtual void SAL_CALL updateNull(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL first() override
virtual void SAL_CALL removeContainerListener(const css::uno::Reference< css::container::XContainerListener > &xListener) override
virtual void SAL_CALL afterLast() override
virtual OUString SAL_CALL getString(sal_Int32 columnIndex) override
virtual void SAL_CALL addSubmitListener(const css::uno::Reference< css::form::XSubmitListener > &aListener) override
virtual void SAL_CALL refreshRow() override
virtual void SAL_CALL updateBytes(sal_Int32 columnIndex, const css::uno::Sequence< sal_Int8 > &x) override
virtual void SAL_CALL setTime(sal_Int32 parameterIndex, const css::util::Time &x) override
virtual sal_Int32 SAL_CALL getRow() override
virtual void SAL_CALL read(const css::uno::Reference< css::io::XObjectInputStream > &_rxInStream) override
virtual sal_Bool SAL_CALL isAfterLast() override
virtual sal_Bool SAL_CALL previous() override
virtual css::uno::Reference< css::sdbc::XClob > SAL_CALL getClob(sal_Int32 columnIndex) override
virtual sal_Bool SAL_CALL isLast() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL addLoadListener(const css::uno::Reference< css::form::XLoadListener > &aListener) override
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &aPropertyName) override
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
virtual ~SbaXFormAdapter() override
Definition: formadapter.cxx:57
virtual void SAL_CALL cancel() override
virtual void SAL_CALL updateLong(sal_Int32 columnIndex, sal_Int64 x) override
SbaXParameterMultiplexer m_aParameterListeners
virtual void SAL_CALL setControlModels(const css::uno::Sequence< css::uno::Reference< css::awt::XControlModel > > &Controls) override
virtual void SAL_CALL setNull(sal_Int32 parameterIndex, sal_Int32 sqlType) override
virtual void SAL_CALL updateNumericObject(sal_Int32 columnIndex, const css::uno::Any &x, sal_Int32 scale) override
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
virtual void SAL_CALL replaceByName(const OUString &aName, const css::uno::Any &aElement) override
virtual void SAL_CALL updateDate(sal_Int32 columnIndex, const css::util::Date &x) override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
virtual void SAL_CALL setFloat(sal_Int32 parameterIndex, float x) override
virtual void SAL_CALL setBinaryStream(sal_Int32 parameterIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
SbaXPropertyChangeMultiplexer m_aPropertyChangeListeners
virtual sal_Int32 SAL_CALL getInt(sal_Int32 columnIndex) override
virtual void SAL_CALL updateRow() override
virtual void SAL_CALL updateCharacterStream(sal_Int32 columnIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual css::uno::Any SAL_CALL getBookmark() override
SbaXRowSetMultiplexer m_aRowSetListeners
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: formadapter.cxx:71
virtual void SAL_CALL setRef(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XRef > &x) override
css::uno::Reference< css::uno::XInterface > m_xParent
virtual void SAL_CALL addResetListener(const css::uno::Reference< css::form::XResetListener > &aListener) override
virtual void SAL_CALL removeParameterListener(const css::uno::Reference< css::form::XDatabaseParameterListener > &aListener) override
virtual void SAL_CALL cancelRowUpdates() override
::comphelper::OInterfaceContainerHelper3< css::container::XContainerListener > m_aContainerListeners
virtual sal_Int8 SAL_CALL getByte(sal_Int32 columnIndex) override
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &Listener) override
virtual sal_Bool SAL_CALL rowInserted() override
virtual void SAL_CALL setByte(sal_Int32 parameterIndex, sal_Int8 x) override
std::vector< css::uno::Reference< css::form::XFormComponent > > m_aChildren
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual css::uno::Sequence< sal_Int32 > SAL_CALL deleteRows(const css::uno::Sequence< css::uno::Any > &rows) override
virtual sal_Bool SAL_CALL rowDeleted() override
virtual void SAL_CALL updateDouble(sal_Int32 columnIndex, double x) override
virtual OUString SAL_CALL getServiceName() override
virtual void SAL_CALL addSQLErrorListener(const css::uno::Reference< css::sdb::XSQLErrorListener > &_rListener) override
virtual void SAL_CALL moveToInsertRow() override
virtual sal_Bool SAL_CALL rowUpdated() override
virtual void SAL_CALL updateFloat(sal_Int32 columnIndex, float x) override
virtual void SAL_CALL getGroup(sal_Int32 nGroup, css::uno::Sequence< css::uno::Reference< css::awt::XControlModel > > &_rGroup, OUString &Name) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes(sal_Int32 columnIndex) override
virtual void SAL_CALL addParameterListener(const css::uno::Reference< css::form::XDatabaseParameterListener > &aListener) override
virtual css::util::Date SAL_CALL getDate(sal_Int32 columnIndex) override
virtual void SAL_CALL removeLoadListener(const css::uno::Reference< css::form::XLoadListener > &aListener) override
virtual void SAL_CALL updateBoolean(sal_Int32 columnIndex, sal_Bool x) override
virtual void SAL_CALL execute() override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual void SAL_CALL setGroupControl(sal_Bool GroupControl) override
virtual void SAL_CALL deleteRow() override
virtual void SAL_CALL updateByte(sal_Int32 columnIndex, sal_Int8 x) override
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &PropertyNames, const css::uno::Sequence< css::uno::Any > &Values) override
virtual sal_Bool SAL_CALL moveRelativeToBookmark(const css::uno::Any &bookmark, sal_Int32 rows) override
void implInsert(const css::uno::Any &aElement, sal_Int32 nIndex, const OUString *pNewElName=nullptr)
virtual css::uno::Reference< css::sdbc::XArray > SAL_CALL getArray(sal_Int32 columnIndex) override
SbaXSQLErrorMultiplexer m_aErrorListeners
virtual void SAL_CALL clearWarnings() override
virtual void SAL_CALL close() override
virtual void SAL_CALL removeResetListener(const css::uno::Reference< css::form::XResetListener > &aListener) override
virtual sal_Bool SAL_CALL isBeforeFirst() override
virtual void SAL_CALL updateString(sal_Int32 columnIndex, const OUString &x) override
virtual sal_Int32 SAL_CALL getGroupCount() override
::comphelper::OInterfaceContainerHelper3< css::lang::XEventListener > m_aDisposeListeners
virtual sal_Bool SAL_CALL isLoaded() override
virtual css::uno::Reference< css::sdbc::XResultSetMetaData > SAL_CALL getMetaData() override
virtual css::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) override
virtual void SAL_CALL updateTime(sal_Int32 columnIndex, const css::util::Time &x) override
virtual void SAL_CALL setObjectNull(sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString &typeName) override
virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL createResultSet() override
SbaXLoadMultiplexer m_aLoadListeners
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
virtual void SAL_CALL reload() override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual sal_Int32 SAL_CALL findColumn(const OUString &columnName) override
virtual sal_Int16 SAL_CALL getShort(sal_Int32 columnIndex) override
virtual css::uno::Any SAL_CALL getWarnings() override
virtual sal_Bool SAL_CALL next() override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream(sal_Int32 columnIndex) override
virtual void SAL_CALL removeSubmitListener(const css::uno::Reference< css::form::XSubmitListener > &aListener) override
virtual css::uno::Sequence< css::uno::Reference< css::awt::XControlModel > > SAL_CALL getControlModels() override
virtual void SAL_CALL setDate(sal_Int32 parameterIndex, const css::util::Date &x) override
virtual void SAL_CALL setCharacterStream(sal_Int32 parameterIndex, const css::uno::Reference< css::io::XInputStream > &x, sal_Int32 length) override
virtual void SAL_CALL beforeFirst() override
virtual sal_Int32 SAL_CALL hashBookmark(const css::uno::Any &bookmark) override
virtual void SAL_CALL updateShort(sal_Int32 columnIndex, sal_Int16 x) override
virtual void SAL_CALL setObjectWithInfo(sal_Int32 parameterIndex, const css::uno::Any &x, sal_Int32 targetSqlType, sal_Int32 scale) override
virtual void SAL_CALL dispose() override
virtual void SAL_CALL removeSQLErrorListener(const css::uno::Reference< css::sdb::XSQLErrorListener > &_rListener) override
virtual sal_Bool SAL_CALL getGroupControl() override
virtual void SAL_CALL addRowSetApproveListener(const css::uno::Reference< css::sdb::XRowSetApproveListener > &listener) override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream(sal_Int32 columnIndex) override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex) override
virtual sal_Bool SAL_CALL hasElements() override
css::uno::Reference< css::sdbc::XRowSet > m_xMainForm
virtual sal_Bool SAL_CALL last() override
SbaXRowSetApproveMultiplexer m_aRowSetApproveListeners
virtual void SAL_CALL setBlob(sal_Int32 parameterIndex, const css::uno::Reference< css::sdbc::XBlob > &x) override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual void SAL_CALL setDouble(sal_Int32 parameterIndex, double x) override
virtual sal_Bool SAL_CALL wasNull() override
::comphelper::OInterfaceContainerHelper3< css::beans::XPropertyChangeListener > * getContainer(const OUString &rName)
void removeInterface(const OUString &rName, const css::uno::Reference< css::beans::XPropertyChangeListener > &rListener)
void addInterface(const OUString &rName, const css::uno::Reference< css::beans::XPropertyChangeListener > &rListener)
void removeInterface(const OUString &rName, const css::uno::Reference< css::beans::XVetoableChangeListener > &rListener)
void addInterface(const OUString &rName, const css::uno::Reference< css::beans::XVetoableChangeListener > &rListener)
float x
std::mutex m_aMutex
sal_Int32 nIndex
OUString aName
sal_uInt16 nPos
@ Exception
Type
int i
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
OUString typeName
sal_Int32 scale
const char * columnName
sal_Int32 nHandle
constexpr OUStringLiteral PROPERTY_NAME(u"Name")
OUString Name
unsigned char sal_Bool
signed char sal_Int8