25#include <core_resource.hxx>
30#include <com/sun/star/container/XNameContainer.hpp>
31#include <com/sun/star/form/XBoundControl.hpp>
32#include <com/sun/star/form/XDatabaseParameterBroadcaster.hpp>
33#include <com/sun/star/form/XLoadable.hpp>
34#include <com/sun/star/form/XReset.hpp>
35#include <com/sun/star/form/XResetListener.hpp>
36#include <com/sun/star/form/runtime/XFormController.hpp>
37#include <com/sun/star/form/runtime/FormOperations.hpp>
38#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
39#include <com/sun/star/lang/XMultiServiceFactory.hpp>
40#include <com/sun/star/lang/NoSupportException.hpp>
41#include <com/sun/star/sdb/CommandType.hpp>
42#include <com/sun/star/sdb/ErrorCondition.hpp>
43#include <com/sun/star/sdb/ParametersRequest.hpp>
44#include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
45#include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
46#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
47#include <com/sun/star/sdb/SQLFilterOperator.hpp>
48#include <com/sun/star/sdbc/XConnection.hpp>
49#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
50#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
51#include <com/sun/star/sdbcx/Privilege.hpp>
52#include <com/sun/star/sdbcx/XRowLocate.hpp>
53#include <com/sun/star/task/InteractionHandler.hpp>
54#include <com/sun/star/util/NumberFormatter.hpp>
67#include <osl/mutex.hxx>
72#include <osl/diagnose.h>
100class OParameterContinuation :
public OInteraction< XInteractionSupplyParameters >
110 virtual void SAL_CALL
setParameters(
const Sequence< PropertyValue >& _rValues )
override;
125 css::frame::XFrameActionListener >
135 virtual css::uno::Reference< css::form::runtime::XFormOperations > SAL_CALL getFormOperations()
override;
136 virtual css::uno::Reference< css::awt::XControl > SAL_CALL getCurrentControl()
override;
137 virtual void SAL_CALL addActivateListener(
const css::uno::Reference< css::form::XFormControllerListener > & l)
override;
138 virtual void SAL_CALL removeActivateListener(
const css::uno::Reference< css::form::XFormControllerListener > & l)
override;
139 virtual void SAL_CALL addChildController(
const css::uno::Reference< css::form::runtime::XFormController >& ChildController )
override;
140 virtual css::uno::Reference< css::form::runtime::XFormControllerContext > SAL_CALL getContext()
override;
141 virtual void SAL_CALL setContext(
const css::uno::Reference< css::form::runtime::XFormControllerContext >& _context )
override;
142 virtual css::uno::Reference< css::task::XInteractionHandler > SAL_CALL getInteractionHandler()
override;
143 virtual void SAL_CALL setInteractionHandler(
const css::uno::Reference< css::task::XInteractionHandler >& _interactionHandler )
override;
146 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent( )
override;
147 virtual void SAL_CALL setParent(
const css::uno::Reference< css::uno::XInterface >& Parent )
override;
150 virtual void SAL_CALL
dispose( )
override;
151 virtual void SAL_CALL addEventListener(
const css::uno::Reference< css::lang::XEventListener >& xListener )
override;
152 virtual void SAL_CALL removeEventListener(
const css::uno::Reference< css::lang::XEventListener >& aListener )
override;
155 virtual ::sal_Int32 SAL_CALL getCount( )
override;
156 virtual css::uno::Any SAL_CALL getByIndex( ::sal_Int32
Index )
override;
159 virtual css::uno::Type SAL_CALL getElementType( )
override;
160 virtual sal_Bool SAL_CALL hasElements( )
override;
163 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration( )
override;
166 virtual void SAL_CALL addModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener )
override;
167 virtual void SAL_CALL removeModifyListener(
const css::uno::Reference< css::util::XModifyListener >& aListener )
override;
170 virtual void SAL_CALL addConfirmDeleteListener(
const css::uno::Reference< css::form::XConfirmDeleteListener >& aListener )
override;
171 virtual void SAL_CALL removeConfirmDeleteListener(
const css::uno::Reference< css::form::XConfirmDeleteListener >& aListener )
override;
174 virtual void SAL_CALL addSQLErrorListener(
const css::uno::Reference< css::sdb::XSQLErrorListener >& Listener )
override;
175 virtual void SAL_CALL removeSQLErrorListener(
const css::uno::Reference< css::sdb::XSQLErrorListener >& Listener )
override;
178 virtual void SAL_CALL addRowSetApproveListener(
const css::uno::Reference< css::sdb::XRowSetApproveListener >& listener )
override;
179 virtual void SAL_CALL removeRowSetApproveListener(
const css::uno::Reference< css::sdb::XRowSetApproveListener >& listener )
override;
182 virtual void SAL_CALL addDatabaseParameterListener(
const css::uno::Reference< css::form::XDatabaseParameterListener >& aListener )
override;
183 virtual void SAL_CALL removeDatabaseParameterListener(
const css::uno::Reference< css::form::XDatabaseParameterListener >& aListener )
override;
186 virtual void SAL_CALL addParameterListener(
const css::uno::Reference< css::form::XDatabaseParameterListener >& aListener )
override;
187 virtual void SAL_CALL removeParameterListener(
const css::uno::Reference< css::form::XDatabaseParameterListener >& aListener )
override;
190 virtual void SAL_CALL setMode(
const OUString& aMode )
override;
191 virtual OUString SAL_CALL
getMode( )
override;
192 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedModes( )
override;
193 virtual sal_Bool SAL_CALL supportsMode(
const OUString& aMode )
override;
196 virtual void SAL_CALL setModel(
const css::uno::Reference< css::awt::XTabControllerModel > & Model)
override;
197 virtual css::uno::Reference< css::awt::XTabControllerModel > SAL_CALL getModel()
override;
198 virtual void SAL_CALL setContainer(
const css::uno::Reference< css::awt::XControlContainer > & Container)
override;
199 virtual css::uno::Reference< css::awt::XControlContainer > SAL_CALL getContainer()
override;
200 virtual css::uno::Sequence< css::uno::Reference< css::awt::XControl > > SAL_CALL getControls()
override;
201 virtual void SAL_CALL autoTabOrder()
override;
202 virtual void SAL_CALL activateTabOrder()
override;
203 virtual void SAL_CALL activateFirst()
override;
204 virtual void SAL_CALL activateLast()
override;
207 virtual void SAL_CALL frameAction(
const css::frame::FrameActionEvent& aEvent)
override;
210 virtual void SAL_CALL disposing(
const css::lang::EventObject& Source)
override;
217 :m_aActivateListeners(_pOwner->
getMutex())
221 OSL_ENSURE(
m_pOwner,
"SbaXDataBrowserController::FormControllerImpl::FormControllerImpl : invalid Owner !");
231 return FormOperations::createWithFormController(
m_pOwner->m_xContext,
this );
241 m_aActivateListeners.addInterface(l);
246 m_aActivateListeners.removeInterface(l);
252 throw IllegalArgumentException( OUString(), *
this, 1 );
257 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::getContext: no support!!" );
263 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::setContext: no support!!" );
268 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::getInteractionHandler: no support!!" );
274 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::setInteractionHandler: no support!!" );
285 throw NoSupportException( OUString(), *
this );
290 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::dispose: no, you do *not* want to do this!" );
295 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::addEventListener: no support!!" );
300 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::removeEventListener: no support!!" );
312 throw IndexOutOfBoundsException( OUString(), *
this );
317 return ::cppu::UnoType< runtime::XFormController >::get();
328 return new ::comphelper::OEnumerationByIndex(
this );
333 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::addModifyListener: no support!" );
338 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::removeModifyListener: no support!" );
343 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener: no support!" );
348 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener: no support!" );
353 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener: no support!" );
358 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener: no support!" );
363 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener: no support!" );
368 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener: no support!" );
373 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener: no support!" );
378 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener: no support!" );
383 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::addParameterListener: no support!" );
388 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::removeParameterListener: no support!" );
393 if ( !supportsMode( _rMode ) )
394 throw NoSupportException();
410 return aMode ==
"DataMode";
415 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::setModel : invalid call, can't change my model !");
425 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::setContainer : invalid call, can't change my container !");
431 return m_pOwner->getBrowserView()->getContainer();
447 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::autoTabOrder : nothing to do (always have only one control) !");
452 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::FormControllerImpl::activateTabOrder : nothing to do (always have only one control) !");
458 m_pOwner->getBrowserView()->getVclControl()->ActivateCell();
464 m_pOwner->getBrowserView()->getVclControl()->ActivateCell();
480 return ::comphelper::concatSequences(
481 SbaXDataBrowserController_Base::getTypes(),
488 return css::uno::Sequence<sal_Int8>();
494 Any aRet = SbaXDataBrowserController_Base::queryInterface(_rType);
497 if (!aRet.hasValue())
543 SbaXDataBrowserController_Base::startFrameListening( _rxFrame );
549 if ( _rxFrame.is() && xAggListener.is() )
550 _rxFrame->addFrameActionListener( xAggListener );
555 SbaXDataBrowserController_Base::stopFrameListening( _rxFrame );
561 if ( _rxFrame.is() && xAggListener.is() )
562 _rxFrame->removeFrameActionListener( xAggListener );
571 if ( xWarnings.is() )
575 xWarnings->clearWarnings();
577 catch(
const SQLException& )
587 if (
static_cast<const SQLException*
>(_rError)->
ErrorCode == nErrorCode )
601 if (_rxLoadable->isLoaded())
602 _rxLoadable->reload();
614 if ( xAnalyzer.is() )
617 const sal_Int32 nOrderColumns( xOrderColumns->getCount() );
618 for ( sal_Int32 c=0; c<nOrderColumns; ++c )
621 OUString sColumnName;
622 OSL_VERIFY( xOrderColumn->getPropertyValue(
PROPERTY_NAME ) >>= sColumnName);
633 if ( xWarnings.is() )
644 catch(
const SQLException& )
650 return _rxLoadable->isLoaded();
661 m_xFormatter.set(util::NumberFormatter::create(getORB()), UNO_QUERY_THROW);
670 SbaXDataBrowserController_Base::describeSupportedFeatures();
671 implDescribeSupportedFeature(
".uno:FormSlots/undoRecord",
ID_BROWSER_UNDORECORD, CommandGroup::CONTROLS );
672 implDescribeSupportedFeature(
".uno:FormController/undoRecord",
ID_BROWSER_UNDORECORD, CommandGroup::CONTROLS );
674 implDescribeSupportedFeature(
".uno:FormSlots/saveRecord",
ID_BROWSER_SAVERECORD, CommandGroup::CONTROLS );
675 implDescribeSupportedFeature(
".uno:FormController/saveRecord",
ID_BROWSER_SAVERECORD, CommandGroup::CONTROLS );
678 implDescribeSupportedFeature(
".uno:RecSearch", SID_FM_SEARCH, CommandGroup::CONTROLS );
679 implDescribeSupportedFeature(
".uno:AutoFilter", SID_FM_AUTOFILTER, CommandGroup::CONTROLS );
680 implDescribeSupportedFeature(
".uno:Refresh", SID_FM_REFRESH, CommandGroup::CONTROLS );
681 implDescribeSupportedFeature(
".uno:OrderCrit", SID_FM_ORDERCRIT, CommandGroup::CONTROLS );
682 implDescribeSupportedFeature(
".uno:RemoveFilterSort", SID_FM_REMOVE_FILTER_SORT,CommandGroup::CONTROLS );
683 implDescribeSupportedFeature(
".uno:FormFiltered", SID_FM_FORM_FILTERED, CommandGroup::CONTROLS );
684 implDescribeSupportedFeature(
".uno:FilterCrit", SID_FM_FILTERCRIT, CommandGroup::CONTROLS );
685 implDescribeSupportedFeature(
".uno:Sortup",
ID_BROWSER_SORTUP, CommandGroup::CONTROLS );
686 implDescribeSupportedFeature(
".uno:SortDown",
ID_BROWSER_SORTDOWN, CommandGroup::CONTROLS );
687 implDescribeSupportedFeature(
".uno:FormSlots/deleteRecord", SID_FM_DELETEROWS, CommandGroup::EDIT );
688 implDescribeSupportedFeature(
".uno:FormSlots/insertRecord",
ID_BROWSER_INSERT_ROW, CommandGroup::INSERT );
721 OUString sText(
DBA_RES(STR_DATASOURCE_GRIDCONTROL_NAME));
731 bool bSuccess =
false;
742 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::Construct : the construction of UnoDataBrowserView failed !");
759 SbaXDataBrowserController_Base::Construct(pParent);
765 OSL_ENSURE(pVclGrid,
"SbaXDataBrowserController::Construct : have no VCL control !");
774 xFormSet->addPropertyChangeListener(
PROPERTY_ISNEW,
static_cast<XPropertyChangeListener*
>(
this));
775 xFormSet->addPropertyChangeListener(
PROPERTY_ISMODIFIED,
static_cast<XPropertyChangeListener*
>(
this));
776 xFormSet->addPropertyChangeListener(
PROPERTY_ROWCOUNT,
static_cast<XPropertyChangeListener*
>(
this));
778 xFormSet->addPropertyChangeListener(
PROPERTY_ORDER,
static_cast<XPropertyChangeListener*
>(
this));
779 xFormSet->addPropertyChangeListener(
PROPERTY_FILTER,
static_cast<XPropertyChangeListener*
>(
this));
781 xFormSet->addPropertyChangeListener(
PROPERTY_APPLYFILTER,
static_cast<XPropertyChangeListener*
>(
this));
785 xFormError->addSQLErrorListener(
static_cast<css::sdb::XSQLErrorListener*
>(
this));
791 if (xFormParameter.is())
792 xFormParameter->addParameterListener(
static_cast<css::form::XDatabaseParameterListener*
>(
this));
819 getORB()->getServiceManager()->createInstanceWithContext(
"com.sun.star.form.component.Form", getORB()),
826 getORB()->getServiceManager()->createInstanceWithContext(
"com.sun.star.form.component.GridControl", getORB()),
837 if (xColContainer.is())
838 xColContainer->addContainerListener(
static_cast<css::container::XContainerListener*
>(
this));
842 xReset->addResetListener(
static_cast<css::form::XResetListener*
>(
this));
851 sal_Int32
nCount = xColumns->getCount();
860 if (xColContainer.is())
861 xColContainer->removeContainerListener(
this );
865 xReset->removeResetListener(
this );
872 if (xBroadcaster.is())
873 xBroadcaster->addModifyListener(
static_cast<XModifyListener*
>(
this));
877 if (xInterception.is())
878 xInterception->registerDispatchProviderInterceptor(
static_cast<XDispatchProviderInterceptor*
>(
this));
883 xWindow->addFocusListener(
this);
889 if (xBroadcaster.is())
890 xBroadcaster->removeModifyListener(
static_cast<XModifyListener*
>(
this));
893 if (xInterception.is())
894 xInterception->releaseDispatchProviderInterceptor(
static_cast<XDispatchProviderInterceptor*
>(
this));
898 xWindow->removeFocusListener(
this);
904 EventObject aEvt(*
this);
905 m_xFormControllerImpl->m_aActivateListeners.notifyEach( &css::form::XFormControllerListener::formActivated, aEvt );
914 if (!xMyGridPeer.is())
917 if (!xNextControlPeer.is())
921 if (xMyGridPeer->isChild(xNextControlPeer))
924 if (xMyGridPeer == xNextControlPeer)
928 EventObject aEvt(*
this);
929 m_xFormControllerImpl->m_aActivateListeners.notifyEach( &css::form::XFormControllerListener::formDeactivated, aEvt );
933 if (xCommitable.is())
934 xCommitable->commit();
936 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::focusLost : why is my control not committable?");
944 xSourceSet->removePropertyChangeListener(
PROPERTY_ISNEW,
static_cast<XPropertyChangeListener*
>(
this));
945 xSourceSet->removePropertyChangeListener(
PROPERTY_ISMODIFIED,
static_cast<XPropertyChangeListener*
>(
this));
946 xSourceSet->removePropertyChangeListener(
PROPERTY_ROWCOUNT,
static_cast<XPropertyChangeListener*
>(
this));
947 xSourceSet->removePropertyChangeListener(
PROPERTY_ACTIVECOMMAND,
static_cast<XPropertyChangeListener*
>(
this));
948 xSourceSet->removePropertyChangeListener(
PROPERTY_ORDER,
static_cast<XPropertyChangeListener*
>(
this));
949 xSourceSet->removePropertyChangeListener(
PROPERTY_FILTER,
static_cast<XPropertyChangeListener*
>(
this));
950 xSourceSet->removePropertyChangeListener(
PROPERTY_HAVING_CLAUSE,
static_cast<XPropertyChangeListener*
>(
this));
951 xSourceSet->removePropertyChangeListener(
PROPERTY_APPLYFILTER,
static_cast<XPropertyChangeListener*
>(
this));
956 xFormError->removeSQLErrorListener(
static_cast<css::sdb::XSQLErrorListener*
>(
this));
962 if (xFormParameter.is())
963 xFormParameter->removeParameterListener(
static_cast<css::form::XDatabaseParameterListener*
>(
this));
978 if ( xAggListener.is( ))
979 xAggListener->disposing( Source );
985 Reference< css::awt::XControl > xSourceControl(
Source.Source, UNO_QUERY);
999 Reference< XPropertySet > xSourceSet(
Source.Source, UNO_QUERY);
1000 if (xSourceSet.is())
1002 Reference< XPropertySetInfo > xInfo = xSourceSet->getPropertySetInfo();
1007 SbaXDataBrowserController_Base::OGenericUnoController::disposing( Source );
1012 ::osl::MutexGuard aGuard(
getMutex() );
1018 ::osl::MutexGuard aGuard(
getMutex() );
1031 && !::comphelper::getBOOL(evt.NewValue)
1039 && ::comphelper::getBOOL(evt.NewValue)
1064 sal_Int32 nNewValue = 0, nOldValue = 0;
1065 evt.NewValue >>= nNewValue;
1066 evt.OldValue >>= nOldValue;
1067 if((nOldValue == 0 && nNewValue != 0) || (nOldValue != 0 && nNewValue == 0))
1080 "SbaXDataBrowserController::elementInserted: where did this come from (not from the grid model)?!");
1082 if ( xNewColumn.is() )
1089 "SbaXDataBrowserController::elementRemoved: where did this come from (not from the grid model)?!");
1091 if ( xOldColumn.is() )
1098 "SbaXDataBrowserController::elementReplaced: where did this come from (not from the grid model)?!");
1100 if ( xOldColumn.is() )
1104 if ( xNewColumn.is() )
1112 m_aAsyncInvalidateAll.CancelCall();
1121 SbaXDataBrowserController_Base::OGenericUnoController::disposing();
1127 xFormSet->removePropertyChangeListener(
PROPERTY_ISNEW,
static_cast<XPropertyChangeListener*
>(
this));
1128 xFormSet->removePropertyChangeListener(
PROPERTY_ISMODIFIED,
static_cast<XPropertyChangeListener*
>(
this));
1129 xFormSet->removePropertyChangeListener(
PROPERTY_ROWCOUNT,
static_cast<XPropertyChangeListener*
>(
this));
1130 xFormSet->removePropertyChangeListener(
PROPERTY_ACTIVECOMMAND,
static_cast<XPropertyChangeListener*
>(
this));
1131 xFormSet->removePropertyChangeListener(
PROPERTY_ORDER,
static_cast<XPropertyChangeListener*
>(
this));
1132 xFormSet->removePropertyChangeListener(
PROPERTY_FILTER,
static_cast<XPropertyChangeListener*
>(
this));
1133 xFormSet->removePropertyChangeListener(
PROPERTY_HAVING_CLAUSE,
static_cast<XPropertyChangeListener*
>(
this));
1134 xFormSet->removePropertyChangeListener(
PROPERTY_APPLYFILTER,
static_cast<XPropertyChangeListener*
>(
this));
1138 if (xFormError.is())
1139 xFormError->removeSQLErrorListener(
static_cast<css::sdb::XSQLErrorListener*
>(
this));
1145 if (xFormParameter.is())
1146 xFormParameter->removeParameterListener(
static_cast<css::form::XDatabaseParameterListener*
>(
this));
1170 ::comphelper::disposeComponent(
m_xRowSet);
1186 ::osl::MutexGuard aGuard(
getMutex() );
1188 SbaXDataBrowserController_Base::frameAction(
aEvent );
1190 if (
aEvent.Source != getFrame() )
1195 case FrameAction_FRAME_ACTIVATED:
1196 case FrameAction_FRAME_UI_ACTIVATED:
1203 OnInvalidateClipboard(
nullptr );
1206 case FrameAction_FRAME_DEACTIVATING:
1207 case FrameAction_FRAME_UI_DEACTIVATING:
1212 OnInvalidateClipboard(
nullptr );
1224 if ( m_aCurrentError.isValid() )
1233 ::osl::MutexGuard aGuard(
getMutex() );
1241 OSL_ENSURE( !
m_aCurrentError.
isValid(),
"SbaXDataBrowserController::errorOccurred: can handle one error per transaction only!" );
1256 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::approveParameter : invalid event source !");
1270 ParametersRequest aRequest;
1271 aRequest.Parameters = xParameters;
1275 pParamRequest->addContinuation(pParamValues);
1276 pParamRequest->addContinuation(pAbort);
1280 xHandler->handle(pParamRequest);
1282 if (!pParamValues->wasSelected())
1290 if (aFinalValues.getLength() != aRequest.Parameters->getCount())
1292 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::approveParameter: the InteractionHandler returned nonsense!");
1296 const PropertyValue* pFinalValues = aFinalValues.getConstArray();
1297 for (sal_Int32
i=0;
i<aFinalValues.getLength(); ++
i, ++pFinalValues)
1300 aRequest.Parameters->getByIndex(
i), css::uno::UNO_QUERY);
1301 OSL_ENSURE(xParam.is(),
"SbaXDataBrowserController::approveParameter: one of the parameters is no property set!");
1307 OSL_ENSURE(
sName == pFinalValues->Name,
"SbaXDataBrowserController::approveParameter: suspicious value names!");
1309 try { xParam->setPropertyValue(
PROPERTY_VALUE, pFinalValues->Value); }
1312 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::approveParameter: setting one of the properties failed!");
1332 OSL_ENSURE(rEvent.Source ==
getControlModel(),
"SbaXDataBrowserController::resetted : where did this come from ?");
1339 VclMessageType::Question, VclButtonsType::YesNo,
1340 DBA_RES(STR_QUERY_BRW_DELETE_ROWS)));
1386 bool bAllowInsertions =
true;
1390 OSL_VERIFY( xRowSetProps->getPropertyValue(
"AllowInserts") >>= bAllowInsertions );
1396 aReturn.
bEnabled = bInsertPrivilege && bAllowInsertions;
1399 case SID_FM_DELETEROWS:
1403 bool bAllowDeletions =
true;
1404 sal_Int32 nRowCount = 0;
1405 bool bInsertionRow =
false;
1409 OSL_VERIFY( xRowSetProps->getPropertyValue(
"AllowDeletes") >>= bAllowDeletions );
1410 OSL_VERIFY( xRowSetProps->getPropertyValue(
PROPERTY_ROWCOUNT ) >>= nRowCount );
1411 OSL_VERIFY( xRowSetProps->getPropertyValue(
PROPERTY_ISNEW ) >>= bInsertionRow );
1417 aReturn.
bEnabled = bDeletePrivilege && bAllowDeletions && ( nRowCount != 0 ) && !bInsertionRow;
1424 aReturn.
bEnabled = m_aCurrentFrame.isActive();
1436 bool bIsReadOnly = pEditImplementation->
IsReadOnly();
1440 case SID_COPY : aReturn.
bEnabled = m_aCurrentFrame.isActive() && bHasLen;
break;
1442 aReturn.
bEnabled = m_aCurrentFrame.isActive() && !bIsReadOnly;
1463 if (!xCurrentField.is())
1470 && !xRow->isBeforeFirst()
1471 && !xRow->isAfterLast()
1472 && !xRow->rowDeleted()
1473 && ( ::comphelper::getINT32( xFormSet->getPropertyValue(
PROPERTY_ROWCOUNT ) ) != 0 );
1491 && ( ::comphelper::getINT32( xFormSet->getPropertyValue(
PROPERTY_ROWCOUNT ) ) != 0 );
1506 if (!m_bCurrentlyModified)
1522 if (!xDataSourceSet.is())
1525 sal_Int32 nDataSourcePrivileges = ::comphelper::getINT32(xDataSourceSet->getPropertyValue(
PROPERTY_PRIVILEGES));
1526 bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & css::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(
"AllowInserts"));
1527 bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & css::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(
"AllowUpdates"));
1528 bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & css::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue(
"AllowDeletes"));
1529 if (!bInsertAllowedAndPossible && !bUpdateAllowedAndPossible && !bDeleteAllowedAndPossible)
1538 aReturn.
bChecked = nGridMode > DbGridControlOptions::Readonly;
1545 OUString aFilter = ::comphelper::getString(xActiveSet->getPropertyValue(
PROPERTY_FILTER));
1547 if ( !(aFilter.isEmpty() && aHaving.isEmpty()) )
1560 return SbaXDataBrowserController_Base::GetState(
nId);
1576 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::applyParserOrder: invalid row set!");
1581 bool bSuccess =
false;
1616 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::applyParserFilter: invalid row set!");
1622 bool bSuccess =
false;
1668 OUString sActiveCommand;
1670 if ( !sActiveCommand.isEmpty() )
1672 xComposer->setElementaryQuery( sActiveCommand );
1677 OSL_VERIFY( xRowSetProps->getPropertyValue(
PROPERTY_COMMAND ) >>= sCommand );
1678 sal_Int32 nCommandType = CommandType::COMMAND;
1680 xComposer->setCommand( sCommand, nCommandType );
1684 OSL_VERIFY( xRowSetProps->getPropertyValue(
PROPERTY_FILTER ) >>= sFilter );
1685 xComposer->setFilter( sFilter );
1687 OUString sHavingClause;
1689 xComposer->setHavingClause( sHavingClause );
1692 OSL_VERIFY( xRowSetProps->getPropertyValue(
PROPERTY_ORDER ) >>= sOrder );
1693 xComposer->setOrder( sOrder );
1710 const OUString sOldHaving =
m_xParser->getHavingClause();
1732 catch(
const SQLException& )
1743 OUString sNewVal = bFilter ? xParser->getFilter() : xParser->getOrder();
1744 bool bOldFilterApplied(
false);
1750 OUString sNewHaving = xParser->getHavingClause();
1751 if ( sOldVal == sNewVal && (!bFilter || sOldHaving == sNewHaving) )
1760 ::comphelper::disposeComponent(xParser);
1767 OSL_ENSURE(xGrid.is(),
"SbaXDataBrowserController::ExecuteSearch : the control should have a css::form::XGrid interface !");
1771 OSL_ENSURE(xGridPeer.is() && xColumns.is(),
"SbaXDataBrowserController::ExecuteSearch : invalid peer !");
1773 sal_Int16 nViewCol = xGrid->getCurrentColumnPosition();
1780 OUString sInitialText;
1783 OUString aInitialText;
1785 sInitialText = aInitialText;
1789 OSL_ENSURE(xModelSet.is(),
"SbaXDataBrowserController::ExecuteSearch : no model set ?!");
1790 xModelSet->setPropertyValue(
"DisplayIsSynchron", css::uno::Any(
false));
1791 xModelSet->setPropertyValue(
"AlwaysShowCursor", css::uno::Any(
true));
1796 std::vector< OUString > aContextNames;
1797 aContextNames.emplace_back(
"Standard" );
1799 pDialog->SetActiveField( sActiveField );
1806 xModelSet->setPropertyValue(
"DisplayIsSynchron", css::uno::Any(
true));
1807 xModelSet->setPropertyValue(
"AlwaysShowCursor", css::uno::Any(
false));
1808 xModelSet->setPropertyValue(
"CursorColor",
Any());
1813 bool bSortUp =
true;
1818 SbaXDataBrowserController_Base::Execute(
nId, _rArgs );
1829 xUpdateCursor->moveToInsertRow();
1837 case SID_FM_DELETEROWS:
1844 if( !pVclGrid->GetSelectRowCount() )
1847 pVclGrid->SelectRow(pVclGrid->GetCurRow());
1867 if (nGridMode == DbGridControlOptions::Readonly)
1892 if (
getBrowserView()->getVclControl()->GetSelectRowCount() > 0 )
1908 pEditImplementation->
Cut();
1911 pEditImplementation->
Copy();
1914 pEditImplementation->
Paste();
1918 pController->Modify();
1940 const OUString sOldSort = xParser->getOrder();
1941 bool bParserSuccess =
false;
1944 bParserSuccess =
false;
1945 xParser->setOrder(OUString());
1946 xParser->appendOrderByColumn(xField, bSortUp);
1947 bParserSuccess =
true;
1949 catch(SQLException& e)
1951 SQLException aError = ::dbtools::prependErrorInfo(e, *
this,
DBA_RES(SBA_BROWSER_SETTING_ORDER));
1952 css::sdb::SQLErrorEvent
aEvent;
1953 aEvent.Reason <<= aError;
1958 DBG_UNHANDLED_EXCEPTION(
"dbaccess",
"SbaXDataBrowserController::Execute : caught an exception while composing the new filter !");
1982 const OUString sOldFilter = xParser->getFilter();
1983 const OUString sOldHaving = xParser->getHavingClause();
1993 xParser->setFilter(OUString());
1997 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::Execute : caught an exception while resetting unapplied filter !");
2001 xParser->setHavingClause(OUString());
2005 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::Execute : caught an exception while resetting unapplied HAVING clause !");
2009 bool bParserSuccess =
false;
2011 const sal_Int32 nOp = SQLFilterOperator::EQUAL;
2017 bParserSuccess =
false;
2018 xParser->appendHavingClauseByColumn(xField,
true,nOp);
2019 bParserSuccess =
true;
2021 catch(SQLException& e)
2023 SQLException aError = ::dbtools::prependErrorInfo(e, *
this,
DBA_RES(SBA_BROWSER_SETTING_FILTER));
2024 css::sdb::SQLErrorEvent
aEvent;
2025 aEvent.Reason <<= aError;
2030 DBG_UNHANDLED_EXCEPTION(
"dbaccess",
"SbaXDataBrowserController::Execute : caught an exception while composing the new filter !");
2037 bParserSuccess =
false;
2038 xParser->appendFilterByColumn(xField,
true,nOp);
2039 bParserSuccess =
true;
2041 catch(SQLException& e)
2043 SQLException aError = ::dbtools::prependErrorInfo(e, *
this,
DBA_RES(SBA_BROWSER_SETTING_FILTER));
2044 css::sdb::SQLErrorEvent
aEvent;
2045 aEvent.Reason <<= aError;
2050 DBG_UNHANDLED_EXCEPTION(
"dbaccess",
"SbaXDataBrowserController::Execute : caught an exception while composing the new filter !");
2089 if ( bNeedPostReload )
2121 if (aVal.hasValue() && ::comphelper::getBOOL(aVal))
2123 xCursor->moveToInsertRow();
2131 xCursor->cancelRowUpdates();
2139 catch(SQLException&)
2155 std::unique_ptr<weld::MessageDialog> xQry(xBuilder->weld_message_dialog(
"SaveModifiedDialog"));
2156 switch (xQry->run())
2170 bool bResult =
false;
2176 if (::comphelper::getBOOL(xFormSet->getPropertyValue(
PROPERTY_ISNEW)))
2177 xCursor->insertRow();
2179 xCursor->updateRow();
2183 catch(SQLException&)
2188 SAL_WARN(
"dbaccess.ui",
"SbaXDataBrowserController::SaveModified : could not save the current record !");
2204 bool bControlIsLocked = xLockingTest.is() && xLockingTest->getLock();
2205 if (xActiveControl.is() && !bControlIsLocked)
2209 if (!xBoundControl.is())
2210 xBoundControl.set(xActiveControl->getModel(), UNO_QUERY);
2211 if (xBoundControl.is() && !xBoundControl->commit())
2219 m_bCurrentlyModified = _bSet;
2249 OnInvalidateClipboard(
nullptr );
2255 OnInvalidateClipboard(
nullptr );
2261 OnInvalidateClipboard(
nullptr );
2274 if ( _pTimer != &m_aInvalidateClipboard )
2285 return xEmptyReturn;
2286 sal_uInt16 nViewPos = xGrid->getCurrentColumnPosition();
2288 if (nCurrentCol == sal_uInt16(-1))
2289 return xEmptyReturn;
2294 if (!xCurrentCol.is())
2295 return xEmptyReturn;
2298 return xEmptyReturn;
2307 OSL_ENSURE(xModelColumns.is(),
"SbaXDataBrowserController::OnSearchContextRequest : there is a grid control without columns !");
2309 OSL_ENSURE(xModelColumns->getCount() >= xPeerContainer->getCount(),
"SbaXDataBrowserController::OnSearchContextRequest : impossible : have more view than model columns !");
2311 OUString sFieldList;
2312 for (sal_Int32 nViewPos=0; nViewPos<xPeerContainer->getCount(); ++nViewPos)
2315 if (!xCurrentColumn.is())
2322 sal_uInt16 nModelPos = getBrowserView()->View2ModelPos(
static_cast<sal_uInt16
>(nViewPos));
2326 sFieldList +=
aName +
";";
2328 rContext.arrFields.push_back(xCurrentColumn);
2332 rContext.xCursor = getRowSet();
2333 rContext.strUsedFields = sFieldList;
2337 OSL_ENSURE(xCursorSet.is() && !::comphelper::getBOOL(xCursorSet->getPropertyValue(
PROPERTY_ISMODIFIED)),
2338 "SbaXDataBrowserController::OnSearchContextRequest : please do not call for cursors with modified rows !");
2339 if (xCursorSet.is() && ::comphelper::getBOOL(xCursorSet->getPropertyValue(
PROPERTY_ISNEW)))
2342 xUpdateCursor->moveToCurrentRow();
2344 return rContext.arrFields.size();
2350 OSL_ENSURE(xCursor.is(),
"SbaXDataBrowserController::OnFoundData : xCursor is empty");
2353 xCursor->moveToBookmark(rInfo.aPosition);
2357 OSL_ENSURE(xModelSet.is(),
"SbaXDataBrowserController::OnFoundData : no model set ?!");
2358 Any aOld = xModelSet->getPropertyValue(
"DisplayIsSynchron");
2359 xModelSet->setPropertyValue(
"DisplayIsSynchron", css::uno::Any(
true));
2360 xModelSet->setPropertyValue(
"DisplayIsSynchron", aOld);
2366 for ( nViewPos = 0; nViewPos < aColumnControls->getCount(); ++nViewPos )
2371 if (rInfo.nFieldPos)
2379 xGrid->setCurrentColumnPosition(nViewPos);
2388 OSL_ENSURE(xCursor.is(),
"SbaXDataBrowserController::OnCanceledNotFound : xCursor is empty");
2390 xCursor->moveToBookmark(rInfo.aPosition);
2401 OSL_ENSURE(xModelSet.is(),
"SbaXDataBrowserController::OnCanceledNotFound : no model set ?!");
2402 Any aOld = xModelSet->getPropertyValue(
"DisplayIsSynchron");
2403 xModelSet->setPropertyValue(
"DisplayIsSynchron", css::uno::Any(
true));
2404 xModelSet->setPropertyValue(
"DisplayIsSynchron", aOld);
2414 SbaGridControl* pVclGrid = getBrowserView() ? getBrowserView()->getVclControl() :
nullptr;
2416 if (pVclGrid && pVclGrid->IsEditing() && pVclGrid->HasChildPathFocus())
2417 pVclGrid->Controller()->GetWindow().GrabFocus();
2545 if (!xCols.is() || !xCols->hasElements())
2552 bIsValid = ::cppu::any2bool(xProp->getPropertyValue(
PROPERTY_ISNEW));
2564 sal_Int16 nViewPos = -1;
2568 nViewPos = xGrid->getCurrentColumnPosition();
2580 xGrid->setCurrentColumnPosition(
_nPos);
2588 if (xFormError.is())
2589 xFormError->removeSQLErrorListener(
static_cast<css::sdb::XSQLErrorListener*
>(
this));
2595 if (xFormError.is())
2596 xFormError->addSQLErrorListener(
static_cast<css::sdb::XSQLErrorListener*
>(
this));
2605 sal_Int32
nCount = xColumns->getCount();
#define ID_BROWSER_EDITDOC
#define ID_BROWSER_FILTERCRIT
#define ID_BROWSER_FILTERED
#define ID_BROWSER_REMOVEFILTER
#define ID_BROWSER_SORTDOWN
#define ID_BROWSER_REFRESH
#define ID_BROWSER_SEARCH
#define ID_BROWSER_UNDORECORD
#define ID_BROWSER_SORTUP
#define ID_BROWSER_SAVERECORD
#define ID_BROWSER_INSERT_ROW
#define ID_BROWSER_AUTOFILTER
#define ID_BROWSER_ORDERCRIT
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
DbGridControlOptions GetOptions() const
DbGridControlOptions SetOptions(DbGridControlOptions nOpt)
static SvxAbstractDialogFactory * Create()
virtual VclPtr< AbstractFmSearchDialog > CreateFmSearchDialog(weld::Window *pParent, const OUString &strInitialText, const ::std::vector< OUString > &_rContexts, sal_Int16 nInitialContext, const Link< FmSearchContext &, sal_uInt32 > &lnkContextSupplier)=0
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
virtual void Start(bool bStartTimer=true) override
bool StartClipboardListening()
const DataFlavorExVector & GetDataFlavorExVector() const
static TransferableDataHelper CreateFromSystemClipboard(vcl::Window *pWindow)
static ErrorCode getErrorCode(const ErrorCondition _eCondition)
void Call(void *_pArgument=nullptr)
void SetMasterListener(SbaGridListener *pListener)
void CopySelectedRowsToClipboard()
copies the currently selected rows to the clipboard @precond at least one row is selected
virtual void DeactivateCell(bool bUpdate=true) override
virtual void DeleteSelectedRows() override
virtual sal_Bool SAL_CALL confirmDelete(const css::sdb::RowChangeEvent &aEvent) override
bool isValidCursor() const
void onStartLoading(const css::uno::Reference< css::form::XLoadable > &_rxLoadable)
OAsynchronousLink m_aAsyncGetCellFocus
css::uno::Reference< css::form::XFormComponent > CreateGridModel()
virtual void describeSupportedFeatures() override
virtual void postReloadForm()
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL errorOccured(const css::sdb::SQLErrorEvent &aEvent) override
virtual void RowChanged() override
void removeControlListeners(const css::uno::Reference< css::awt::XControl > &_xGridControl)
void disposingColumnModel(const css::lang::EventObject &Source)
virtual void RemoveColumnListener(const css::uno::Reference< css::beans::XPropertySet > &xCol)
virtual void stopFrameListening(const css::uno::Reference< css::frame::XFrame > &_rxFrame) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void LoadFinished(bool bWasSynch)
virtual void SAL_CALL frameAction(const css::frame::FrameActionEvent &aEvent) override
virtual void SAL_CALL focusGained(const css::awt::FocusEvent &e) override
virtual void SAL_CALL resetted(const css::lang::EventObject &rEvent) override
void impl_checkForCannotSelectUnfiltered(const ::dbtools::SQLExceptionInfo &_rError)
rtl::Reference< FormControllerImpl > m_xFormControllerImpl
virtual sal_Bool SAL_CALL approveParameter(const css::form::DatabaseParameterEvent &aEvent) override
virtual sal_Bool SAL_CALL approveReset(const css::lang::EventObject &rEvent) override
virtual void SAL_CALL disposing() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &_rType) override
::dbtools::SQLExceptionInfo m_aCurrentError
virtual void SAL_CALL reloading(const css::lang::EventObject &aEvent) override
virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) override
void ExecuteFilterSortCrit(bool bFilter)
bool SaveModified(bool bAskFor=true)
virtual void CellActivated() override
virtual FeatureState GetState(sal_uInt16 nId) const override
virtual void AddColumnListener(const css::uno::Reference< css::beans::XPropertySet > &xCol)
virtual void SAL_CALL loaded(const css::lang::EventObject &aEvent) override
OUString m_sStateSaveRecord
UnoDataBrowserView * getBrowserView() const
bool m_bCannotSelectUnfiltered
TransferableDataHelper m_aSystemClipboard
virtual ~SbaXDataBrowserController() override
void setCurrentModified(bool _bSet)
virtual void SAL_CALL unloaded(const css::lang::EventObject &aEvent) override
css::uno::Reference< css::beans::XPropertySet > getBoundField() const
css::uno::Reference< css::form::XFormComponent > m_xGridModel
sal_Int32 m_nRowSetPrivileges
virtual bool InitializeForm(const css::uno::Reference< css::beans::XPropertySet > &i_formProperties)=0
virtual bool preReloadForm()
const css::uno::Reference< css::sdbc::XRowSet > & getRowSet() const
virtual void BeforeDrop() override
void applyParserFilter(const OUString &_rOldFilter, bool _bOldFilterApplied, const ::OUString &_sOldHaving, const css::uno::Reference< css::sdb::XSingleSelectQueryComposer > &_xParser)
void disposingFormModel(const css::lang::EventObject &Source)
OAsynchronousLink m_aAsyncDisplayError
virtual void SAL_CALL reloaded(const css::lang::EventObject &aEvent) override
css::uno::Reference< css::util::XNumberFormatter > m_xFormatter
virtual void SelectionChanged() override
SbaXDataBrowserController(const css::uno::Reference< css::uno::XComponentContext > &_rM)
AutoTimer m_aInvalidateClipboard
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
virtual void CellDeactivated() override
css::uno::Reference< css::form::XLoadable > m_xLoadable
css::uno::Reference< css::sdbcx::XColumnsSupplier > m_xColumnsSupplier
virtual void startFrameListening(const css::uno::Reference< css::frame::XFrame > &_rxFrame) override
css::uno::Reference< css::sdbc::XRowSet > m_xRowSet
virtual bool Construct(vcl::Window *pParent) override
void setLoadingCancelled()
virtual void addModelListeners(const css::uno::Reference< css::awt::XControlModel > &_xGridControlModel)
virtual void criticalFail()
virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent &Event) override
virtual void removeModelListeners(const css::uno::Reference< css::awt::XControlModel > &_xGridControlModel)
virtual void AfterDrop() override
virtual OUString SAL_CALL getIdentifier() override
virtual void ColumnChanged() override
void addColumnListeners(const css::uno::Reference< css::awt::XControlModel > &_xGridControlModel)
virtual void Execute(sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
css::uno::Reference< css::sdb::XSingleSelectQueryComposer > m_xParser
OUString m_sStateUndoRecord
virtual void SAL_CALL unloading(const css::lang::EventObject &aEvent) override
sal_Int16 getCurrentColumnPosition() const
OUString m_sModuleIdentifier
virtual void SAL_CALL setIdentifier(const OUString &Identifier) override
bool loadingCancelled() const
sal_uInt16 m_nFormActionNestingLevel
virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent &Event) override
css::uno::Reference< css::sdb::XSingleSelectQueryComposer > createParser_nothrow()
friend class FormControllerImpl
void addControlListeners(const css::uno::Reference< css::awt::XControl > &_xGridControl)
css::uno::Reference< css::awt::XControlModel > getControlModel() const
void setCurrentColumnPosition(sal_Int16 _nPos)
rtl::Reference< TransferableClipboardListener > m_pClipboardNotifier
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
virtual css::uno::Reference< css::sdbc::XRowSet > CreateForm()
void applyParserOrder(const OUString &_rOldOrder, const css::uno::Reference< css::sdb::XSingleSelectQueryComposer > &_xParser)
virtual void SAL_CALL elementInserted(const css::container::ContainerEvent &Event) override
bool reloadForm(const css::uno::Reference< css::form::XLoadable > &_rxLoadable)
loads or reloads the form
void initializeParser() const
virtual void SAL_CALL focusLost(const css::awt::FocusEvent &e) override
void Construct(const css::uno::Reference< css::awt::XControlModel > &xModel)
late construction
SbaGridControl * getVclControl() const
const css::uno::Reference< css::awt::XControl > & getGridControl() const
sal_uInt16 View2ModelPos(sal_uInt16 nPos) const
as columns may be hidden there is a difference between a columns model pos and its view pos so we you...
virtual bool IsReadOnly() const=0
virtual Selection GetSelection() const=0
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
constexpr ::Color COL_LIGHTRED(0xFF, 0x00, 0x00)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
SOT_DLLPUBLIC bool IsFormatSupported(const DataFlavorExVector &rDataFlavorExVector, SotClipboardFormatId nId)
Reference< XSingleServiceFactory > xFactory
SVXCORE_DLLPUBLIC bool IsSearchableControl(const css::uno::Reference< css::uno::XInterface > &_xControl, OUString *pCurrentText=nullptr)
#define LINK(Instance, Class, Member)
#define SAL_WARN(area, stream)
OString stripEnd(const OString &rIn, char c)
IMPL_LINK_NOARG(OApplicationController, OnClipboardChanged, TransferableDataHelper *, void)
IMPL_LINK(OApplicationController, OnSelectContainer, void *, _pType, void)
::cppu::ImplInheritanceHelper< OGenericUnoController, css::sdb::XSQLErrorListener, css::form::XDatabaseParameterListener, css::form::XConfirmDeleteListener, css::form::XLoadListener, css::form::XResetListener, css::awt::XFocusListener, css::container::XContainerListener, css::beans::XPropertyChangeListener, css::frame::XModule > SbaXDataBrowserController_Base
::osl::Mutex & getMutex()
SwView * getView(const uno::Reference< frame::XModel > &xModel)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
ContentProvider * m_pOwner
constexpr OUStringLiteral PROPERTY_WIDTH(u"Width")
constexpr OUStringLiteral PROPERTY_COMMAND(u"Command")
constexpr OUStringLiteral PROPERTY_HAVING_CLAUSE(u"HavingClause")
constexpr OUStringLiteral PROPERTY_CONTROLSOURCE(u"DataField")
constexpr OUStringLiteral PROPERTY_SINGLESELECTQUERYCOMPOSER(u"SingleSelectQueryComposer")
constexpr OUStringLiteral PROPERTY_ISMODIFIED(u"IsModified")
constexpr OUStringLiteral PROPERTY_APPLYFILTER(u"ApplyFilter")
constexpr OUStringLiteral SERVICE_NAME_SINGLESELECTQUERYCOMPOSER
constexpr OUStringLiteral PROPERTY_ISSEARCHABLE(u"IsSearchable")
constexpr OUStringLiteral PROPERTY_BORDER(u"Border")
constexpr OUStringLiteral PROPERTY_FILTER(u"Filter")
constexpr OUStringLiteral PROPERTY_ACTIVE_CONNECTION(u"ActiveConnection")
constexpr OUStringLiteral PROPERTY_TABLENAME(u"TableName")
constexpr OUStringLiteral PROPERTY_ESCAPE_PROCESSING(u"EscapeProcessing")
constexpr OUStringLiteral PROPERTY_NAME(u"Name")
constexpr OUStringLiteral PROPERTY_BOUNDFIELD(u"BoundField")
constexpr OUStringLiteral PROPERTY_ACTIVECOMMAND(u"ActiveCommand")
constexpr OUStringLiteral PROPERTY_PRIVILEGES(u"Privileges")
constexpr OUStringLiteral PROPERTY_COMMAND_TYPE(u"CommandType")
constexpr OUStringLiteral PROPERTY_ORDER(u"Order")
constexpr OUStringLiteral PROPERTY_ROWCOUNT(u"RowCount")
constexpr OUStringLiteral PROPERTY_ISNEW(u"IsNew")
constexpr OUStringLiteral PROPERTY_VALUE(u"Value")
describes the state of a feature
std::optional< bool > bChecked
std::optional< OUString > sTitle