21#include <core_resource.hxx>
32#include <com/sun/star/awt/MouseWheelBehavior.hpp>
33#include <com/sun/star/awt/TextAlign.hpp>
34#include <com/sun/star/awt/VisualEffect.hpp>
35#include <com/sun/star/beans/NamedValue.hpp>
36#include <com/sun/star/beans/PropertyValue.hpp>
37#include <com/sun/star/beans/XMultiPropertySet.hpp>
38#include <com/sun/star/container/XNameContainer.hpp>
39#include <com/sun/star/form/XGridColumnFactory.hpp>
40#include <com/sun/star/form/XLoadable.hpp>
41#include <com/sun/star/form/XReset.hpp>
42#include <com/sun/star/frame/Desktop.hpp>
43#include <com/sun/star/frame/FrameSearchFlag.hpp>
44#include <com/sun/star/frame/XLayoutManager.hpp>
45#include <com/sun/star/lang/DisposedException.hpp>
46#include <com/sun/star/lang/XMultiServiceFactory.hpp>
47#include <com/sun/star/i18n/Collator.hpp>
48#include <com/sun/star/sdb/CommandType.hpp>
49#include <com/sun/star/sdb/SQLContext.hpp>
50#include <com/sun/star/sdb/XDatabaseContext.hpp>
51#include <com/sun/star/sdb/XDatabaseRegistrations.hpp>
52#include <com/sun/star/sdb/XDocumentDataSource.hpp>
53#include <com/sun/star/sdb/XParametersSupplier.hpp>
54#include <com/sun/star/sdb/XQueriesSupplier.hpp>
55#include <com/sun/star/sdb/XQueryDefinitionsSupplier.hpp>
56#include <com/sun/star/sdb/XResultSetAccess.hpp>
57#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
58#include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
59#include <com/sun/star/sdbc/ColumnValue.hpp>
60#include <com/sun/star/sdbc/DataType.hpp>
61#include <com/sun/star/sdbc/FetchDirection.hpp>
62#include <com/sun/star/sdbc/SQLWarning.hpp>
63#include <com/sun/star/sdbc/XDataSource.hpp>
64#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
65#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
66#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
67#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
68#include <com/sun/star/task/InteractionHandler.hpp>
69#include <com/sun/star/util/XFlushable.hpp>
70#include <com/sun/star/util/XNumberFormatter.hpp>
71#include <com/sun/star/util/XURLTransformer.hpp>
72#include <com/sun/star/document/MacroExecMode.hpp>
73#include <com/sun/star/ui/XContextMenuInterceptor.hpp>
86#include <osl/diagnose.h>
122using namespace ::
svx;
125extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
127 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const& )
130 return cppu::acquire(new ::dbaui::SbaTableQueryBrowser(context));
136namespace DatabaseObject = css::sdb::application::DatabaseObject;
137namespace DatabaseObjectContainer = css::sdb::application::DatabaseObjectContainer;
142 if (xInfo->hasPropertyByName(rPropName))
143 xSet->addPropertyChangeListener(rPropName, pListener);
149 if (xInfo->hasPropertyByName(rPropName))
150 xSet->removePropertyChangeListener(rPropName, pListener);
155 return "org.openoffice.comp.dbu.ODatasourceBrowser";
160 return {
"com.sun.star.sdb.DataSourceBrowser" };
165 ,m_aSelectionListeners(
getMutex() )
166 ,m_aContextMenuInterceptors(
getMutex() )
167 ,m_aTableCopyHelper(this)
168 ,m_pTreeView(nullptr)
169 ,m_pSplitter(nullptr)
170 ,m_nAsyncDrop(nullptr)
171 ,m_bQueryEscapeProcessing( false )
174 ,m_bEnableBrowser(true)
180 if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
182 SAL_WARN(
"dbaccess.ui",
"Please check who doesn't dispose this component!");
196 OSL_PRECOND( !!
m_aDocScriptSupport,
"SbaTableQueryBrowser::queryInterface: did not initialize this, yet!" );
203 if (!aReturn.hasValue())
215 OSL_PRECOND( !!
m_aDocScriptSupport,
"SbaTableQueryBrowser::getTypes: did not initialize this, yet!" );
219 auto newEnd = std::remove_if(
begin,
end,
229 return css::uno::Sequence<sal_Int8>();
238 css::lang::EventObject aEvt(*
this);
256 m_xCurrentFrameParent->removeFrameActionListener(
static_cast<css::frame::XFrameActionListener*
>(
this));
262 xDatabaseRegistrations->removeDatabaseRegistrationsListener(
this );
280 xDatabaseRegistrations->addDatabaseRegistrationsListener(
this );
288 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::Construct: could not create (or start listening at) the database context!");
339 struct SelectValueByName
341 const Any& operator()( OUString
const& i_name )
const
360 bool bEscapeProcessing =
false;
362 if ( !bEscapeProcessing )
367 if ( !xComposer.is() )
381 const sal_Int32 nOrderColumns( xOrderColumns->getCount() );
382 bool invalidColumn = nOrderColumns == 0;
383 for ( sal_Int32 c=0; ( c < nOrderColumns ) && !invalidColumn; ++c )
388 OUString sColumnName;
389 OSL_VERIFY( xOrderColumn->getPropertyValue(
PROPERTY_NAME ) >>= sColumnName );
391 if ( sTableName.isEmpty() )
393 if ( !xColumnNames->hasByName( sColumnName ) )
395 invalidColumn =
true;
401 if ( !xTableNames->hasByName( sTableName ) )
403 invalidColumn =
true;
409 if ( !xTableColumnNames->hasByName( sColumnName ) )
411 invalidColumn =
true;
421 xComposer->setOrder(
"" );
481 const OUString aTransferProperties[] =
488 for (
const auto & aTransferProperty : aTransferProperties)
490 if ( !xPSI->hasPropertyByName( aTransferProperty ) )
492 aPropertyValues.put( aTransferProperty,
pData->xObjectProperties->getPropertyValue( aTransferProperty ) );
496 std::sort(aNames.begin(), aNames.end());
500 std::transform( aNames.begin(), aNames.end(), aPropValues.getArray(), SelectValueByName(
aPropertyValues ) );
503 xFormMultiSet->setPropertyValues(
aPropNames, aPropValues );
525 if ( xDataSourceSet.is() )
527 xDataSourceSet->setPropertyValue(
"AllowInserts",
Any(
false));
528 xDataSourceSet->setPropertyValue(
"AllowUpdates",
Any(
false));
529 xDataSourceSet->setPropertyValue(
"AllowDeletes",
Any(
false));
543 xFormAsLoadable.set(xGrid->getParent(), css::uno::UNO_QUERY);
544 if (xFormAsLoadable.is() && xFormAsLoadable->isLoaded())
554 OSL_ENSURE(
pData->xObjectProperties.is(),
"SbaTableQueryBrowser::InitializeGridModel: No table available!" );
555 if ( !
pData->xObjectProperties.is() )
559 Any* pValueIter = aValues.getArray();
562 *pStringIter++ =
"AlwaysShowCursor";
563 *pValueIter++ <<=
false;
565 *pValueIter++ <<= sal_Int16(0);
576 *pStringIter++ =
"HasNavigationBar";
577 *pValueIter++ <<=
false;
578 *pStringIter++ =
"HasRecordMarker";
579 *pValueIter++ <<=
false;
585 *pStringIter++ =
"Tabstop";
586 *pValueIter++ <<=
false;
594 xFormMultiSet->setPropertyValues(
aProperties, aValues);
603 OSL_ENSURE(xConnection.is(),
"A ActiveConnection should normally exists!");
607 bool bSuppressVersionCol =
false;
611 OUString aCurrentModelType;
615 OUString sDefaultProperty;
621 xColumn.set( xColumns->getByName( rName ), UNO_QUERY_THROW );
622 xColPSI.set(
xColumn->getPropertySetInfo(), UNO_SET_THROW );
625 if ( bSuppressVersionCol
632 bool bFormattedIsNumeric =
true;
635 std::vector< NamedValue > aInitialValues;
636 std::vector< OUString > aCopyProperties;
642 case DataType::BOOLEAN:
644 aCurrentModelType =
"CheckBox";
645 aInitialValues.emplace_back(
"VisualEffect",
Any( VisualEffect::FLAT ) );
648 sal_Int32
nNullable = ColumnValue::NULLABLE_UNKNOWN;
650 aInitialValues.emplace_back(
654 if ( ColumnValue::NO_NULLS ==
nNullable )
659 case DataType::LONGVARCHAR:
661 aInitialValues.emplace_back(
"MultiLine",
Any(
true ) );
663 case DataType::BINARY:
664 case DataType::VARBINARY:
665 case DataType::LONGVARBINARY:
666 aCurrentModelType =
"TextField";
670 case DataType::VARCHAR:
672 bFormattedIsNumeric =
false;
675 aCurrentModelType =
"FormattedField";
678 if ( xSupplier.is() )
679 aInitialValues.emplace_back(
"FormatsSupplier",
Any( xSupplier ) );
680 aInitialValues.emplace_back(
"TreatAsNumber",
Any( bFormattedIsNumeric ) );
688 if ( !sLabel.isEmpty() )
701 if (
nType == DataType::BIT ||
nType == DataType::BOOLEAN )
703 if ( aDefault.hasValue() )
710 if ( aDefault.hasValue() )
711 aInitialValues.emplace_back( sDefaultProperty, aDefault );
722 aDescription >>= sTemp;
723 if ( sTemp.isEmpty() )
726 aDescription <<= sTemp;
730 Any aAlign; aAlign <<= sal_Int16( 0 );
732 if ( aColAlign.hasValue() )
733 aAlign <<= sal_Int16( ::comphelper::getINT32( aColAlign ) );
741 for (
auto const&
property : aInitialValues)
745 for (
auto const& copyPropertyName : aCopyProperties)
746 xGridCol->setPropertyValue( copyPropertyName,
xColumn->getPropertyValue(copyPropertyName) );
748 xColContainer->insertByName(rName,
Any(xGridCol));
763 if (pCurrentlyDisplayed)
770 if(xNames.is() && xNames->hasByName(
aName))
771 xRet.set(xNames->getByName(
aName),UNO_QUERY);
783 OSL_ENSURE(xObjectProps.is(),
"SbaTableQueryBrowser::transferChangedControlProperty: no table/query object!");
784 if (xObjectProps.is())
785 xObjectProps->setPropertyValue(_rProperty, _rNewValue);
808 if(!evt.NewValue.hasValue())
831 if(evt.NewValue.hasValue())
833 sal_Int16 nAlign = 0;
834 if(evt.NewValue >>= nAlign)
851 && (TypeClass_LONG == evt.NewValue.getValueTypeClass())
867 OSL_ENSURE(
pData->xObjectProperties.is(),
"No table available!" );
869 bool bDefault = !evt.NewValue.hasValue();
900 ::osl::MutexGuard aGuard(
getMutex() );
907 if ( rBHelper.bDisposed )
908 throw DisposedException( OUString(), *
this );
927 if ( _rEvent.FeatureURL.Complete == externalFeature.second.aURL.Complete)
930 OSL_ENSURE( xSource.get() == externalFeature.second.xDispatcher.get(),
"SbaTableQueryBrowser::statusChanged: inconsistent!" );
932 externalFeature.second.bEnabled = _rEvent.IsEnabled;
934 switch ( externalFeature.first )
940 bool bProperFormat = _rEvent.State >>= aDescriptor;
941 OSL_ENSURE(bProperFormat,
"SbaTableQueryBrowser::statusChanged: need a data access descriptor here!");
949 "SbaTableQueryBrowser::statusChanged: incomplete descriptor!");
965 OSL_ENSURE(bFound,
"SbaTableQueryBrowser::statusChanged: don't know who sent this!");
970 std::unique_ptr<weld::TreeIter> xDataSourceEntry;
971 std::unique_ptr<weld::TreeIter> xContainerEntry;
973 bool bKnownDocDataSource =
static_cast<bool>(xObjectEntry);
974 if (!bKnownDocDataSource)
976 if (xDataSourceEntry)
981 bKnownDocDataSource =
true;
995 bKnownDocDataSource = (CommandType::COMMAND == nCommandType) && (!sCommand.isEmpty());
1001 if ( !bKnownDocDataSource )
1011 if ( _rDescriptor.
has(DataAccessDescriptorProperty::Command) )
1012 _rDescriptor[DataAccessDescriptorProperty::Command] >>= _rCommand;
1013 if ( _rDescriptor.
has(DataAccessDescriptorProperty::CommandType) )
1014 _rDescriptor[DataAccessDescriptorProperty::CommandType] >>= _rCommandType;
1017 _rEscapeProcessing =
true;
1018 if (_rDescriptor.
has(DataAccessDescriptorProperty::EscapeProcessing))
1019 _rEscapeProcessing = ::cppu::any2bool(_rDescriptor[DataAccessDescriptorProperty::EscapeProcessing]);
1024 bool getDataSourceDisplayName_isURL(
const OUString& _rDS, OUString& _rDisplayName, OUString& _rUniqueId )
1027 if (
aURL.GetProtocol() != INetProtocol::NotValid )
1033 _rDisplayName = _rDS;
1038 struct FilterByEntryDataId :
public IEntryFilter
1041 explicit FilterByEntryDataId( OUString _aId ) :
sId(
std::move( _aId )) { }
1043 virtual ~FilterByEntryDataId() {}
1045 virtual bool includeEntry(
const void* pEntry)
const override;
1048 bool FilterByEntryDataId::includeEntry(
const void* pUserData)
const
1050 const DBTreeListUserData*
pData =
static_cast<const DBTreeListUserData*
>(pUserData);
1051 return ( !pData || (
pData->sAccessor ==
sId ) );
1059 OSL_ENSURE(
pData,
"SbaTableQueryBrowser::getDataSourceAccessor: invalid entry data!" );
1060 OSL_ENSURE(
pData->eType ==
etDatasource,
"SbaTableQueryBrowser::getDataSourceAccessor: entry does not denote a data source!" );
1065 std::unique_ptr<weld::TreeIter>* ppDataSourceEntry, std::unique_ptr<weld::TreeIter>* ppContainerEntry,
bool bExpandAncestors,
1068 if (ppDataSourceEntry)
1069 ppDataSourceEntry->reset();
1070 if (ppContainerEntry)
1071 ppContainerEntry->reset();
1073 std::unique_ptr<weld::TreeIter> xObject;
1078 bool bIsDataSourceURL = getDataSourceDisplayName_isURL( _rDataSource,
sDisplayName, sDataSourceId );
1082 FilterByEntryDataId aFilter( sDataSourceId );
1083 std::unique_ptr<weld::TreeIter> xDataSource =
m_pTreeView->GetEntryPosByName(
sDisplayName,
nullptr, &aFilter );
1086 if ( bIsDataSourceURL )
1092 OSL_ENSURE( xDataSource,
"SbaTableQueryBrowser::getObjectEntry: hmm - did not find it again!" );
1100 if (ppDataSourceEntry)
1103 *ppDataSourceEntry = rTreeView.
make_iterator(xDataSource.get());
1107 if (bExpandAncestors)
1111 std::unique_ptr<weld::TreeIter> xCommandType;
1116 xCommandType.reset();
1123 xCommandType.reset();
1129 if (ppContainerEntry)
1132 *ppContainerEntry = rTreeView.
make_iterator(xCommandType.get());
1138 if (bExpandAncestors)
1148 switch (nCommandType)
1156 sPath = _rCommand.getToken( 0,
'/',
nIndex );
1162 xObject =
m_pTreeView->GetEntryPosByName(sPath, xCommandType.get());
1166 xCommandType.reset();
1173 sal_Int32 nIndex2 =
nIndex;
1174 sPath = _rCommand.getToken( 0,
'/', nIndex2 );
1177 if ( xCollection->hasByName(sPath) )
1179 if(!
m_pTreeView->GetEntryPosByName(sPath, xObject.get()))
1194 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::populateTree: could not fill the tree");
1209 std::unique_ptr<weld::TreeIter>* ppDataSourceEntry, std::unique_ptr<weld::TreeIter>* ppContainerEntry)
1212 OUString sDataSource;
1214 sal_Int32 nCommandType = CommandType::COMMAND;
1215 bool bEscapeProcessing =
true;
1218 return getObjectEntry(sDataSource, sCommand, nCommandType, ppDataSourceEntry, ppContainerEntry,
false );
1224 OSL_ENSURE(xProvider.is(),
"SbaTableQueryBrowser::connectExternalDispatches: no DispatchProvider !");
1225 if (!xProvider.is())
1230 const char* pURLs[] = {
1231 ".uno:DataSourceBrowser/DocumentDataSource",
1232 ".uno:DataSourceBrowser/FormLetter",
1233 ".uno:DataSourceBrowser/InsertColumns",
1234 ".uno:DataSourceBrowser/InsertContent",
1236 const sal_uInt16 nIds[] = {
1243 for (
size_t i=0;
i < std::size( pURLs ); ++
i )
1246 aURL.Complete = OUString::createFromAscii( pURLs[
i] );
1247 if ( m_xUrlTransformer.is() )
1248 m_xUrlTransformer->parseStrict(
aURL );
1255 externalFeature.second.xDispatcher = xProvider->queryDispatch(
1256 externalFeature.second.aURL,
"_parent", FrameSearchFlag::PARENT
1259 if ( externalFeature.second.xDispatcher.get() ==
static_cast< XDispatch*
>(
this ) )
1261 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::connectExternalDispatches: this should not happen anymore!" );
1264 externalFeature.second.xDispatcher.clear();
1267 if ( externalFeature.second.xDispatcher.is() )
1271 externalFeature.second.xDispatcher->addStatusListener(
this, externalFeature.second.aURL );
1290 OSL_ENSURE( pToolbox,
"SbaTableQueryBrowser::implCheckExternalSlot: cannot obtain the toolbox window!" );
1301 InvalidateFeature( _nId );
1309 m_xCurrentFrameParent->removeFrameActionListener(
static_cast<css::frame::XFrameActionListener*
>(
this));
1318 while (aLoop != aEnd)
1320 if ( aLoop->second.xDispatcher.get() == xSource.get() )
1322 sal_uInt16 nSlot = aLoop->first;
1344 std::unique_ptr<weld::TreeIter> xDSLoop(rTreeView.
make_iterator());
1353 pData->xConnection.clear();
1372 if ( externalFeature.second.xDispatcher.is() )
1376 externalFeature.second.xDispatcher->removeStatusListener(
this, externalFeature.second.aURL );
1380 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::implRemoveStatusListeners: could not remove a status listener!");
1393 if (!(_rSelection >>= aDescriptorSequence))
1394 throw IllegalArgumentException(OUString(), *
this, 1);
1397 ODataAccessDescriptor aDescriptor;
1400 aDescriptor = ODataAccessDescriptor(aDescriptorSequence);
1402 catch(
const Exception&)
1404 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::select: could not extract the descriptor!");
1408 if ( !(aDescriptor.has(DataAccessDescriptorProperty::DataSource) || aDescriptor.has(DataAccessDescriptorProperty::DatabaseLocation)) || !aDescriptor.has(DataAccessDescriptorProperty::Command) || !aDescriptor.has(DataAccessDescriptorProperty::CommandType))
1409 throw IllegalArgumentException(OUString(), *
this, 1);
1422 if (xLoadable.is() && xLoadable->isLoaded())
1425 ODataAccessDescriptor aDescriptor(aFormProps);
1427 aDescriptor.erase(DataAccessDescriptorProperty::Connection);
1428 aDescriptor.erase(DataAccessDescriptorProperty::Cursor);
1430 aReturn <<= aDescriptor.createPropertyValueSequence();
1456 m_xCurrentFrameParent->removeFrameActionListener(
static_cast<css::frame::XFrameActionListener*
>(
this));
1458 SbaXDataBrowserController::attachFrame(_xFrame);
1461 if ( xCurrentFrame.is() )
1465 m_xCurrentFrameParent->addFrameActionListener(
static_cast<css::frame::XFrameActionListener*
>(
this));
1472 xFrameProps->getPropertyValue(
"LayoutManager"),
1475 if ( xLayouter.is() )
1478 xLayouter->getElement(
"private:resource/toolbar/toolbar" ),
1480 m_xMainToolbar.set(xUI->getRealInterface(), css::uno::UNO_QUERY);
1481 OSL_ENSURE(
m_xMainToolbar.is(),
"SbaTableQueryBrowser::attachFrame: where's my toolbox?" );
1498 if (xSourceSet.is())
1500 xSourceSet->addPropertyChangeListener(
PROPERTY_ROW_HEIGHT,
static_cast<XPropertyChangeListener*
>(
this));
1501 xSourceSet->addPropertyChangeListener(
PROPERTY_FONT,
static_cast<XPropertyChangeListener*
>(
this));
1502 xSourceSet->addPropertyChangeListener(
PROPERTY_TEXTCOLOR,
static_cast<XPropertyChangeListener*
>(
this));
1503 xSourceSet->addPropertyChangeListener(
PROPERTY_TEXTLINECOLOR,
static_cast<XPropertyChangeListener*
>(
this));
1504 xSourceSet->addPropertyChangeListener(
PROPERTY_TEXTEMPHASIS,
static_cast<XPropertyChangeListener*
>(
this));
1505 xSourceSet->addPropertyChangeListener(
PROPERTY_TEXTRELIEF,
static_cast<XPropertyChangeListener*
>(
this));
1514 if (xSourceSet.is())
1516 xSourceSet->removePropertyChangeListener(
PROPERTY_ROW_HEIGHT,
static_cast<XPropertyChangeListener*
>(
this));
1517 xSourceSet->removePropertyChangeListener(
PROPERTY_FONT,
static_cast<XPropertyChangeListener*
>(
this));
1518 xSourceSet->removePropertyChangeListener(
PROPERTY_TEXTCOLOR,
static_cast<XPropertyChangeListener*
>(
this));
1519 xSourceSet->removePropertyChangeListener(
PROPERTY_TEXTLINECOLOR,
static_cast<XPropertyChangeListener*
>(
this));
1520 xSourceSet->removePropertyChangeListener(
PROPERTY_TEXTEMPHASIS,
static_cast<XPropertyChangeListener*
>(
this));
1521 xSourceSet->removePropertyChangeListener(
PROPERTY_TEXTRELIEF,
static_cast<XPropertyChangeListener*
>(
this));
1530 if (!pControl->IsEditing())
1541 if (!pControl->IsEditing())
1587 css::lang::EventObject
aEvent( *
this );
1593 bool bEnabled =
false;
1596 bEnabled = aPos->second.bEnabled;
1638 std::unique_ptr<weld::TreeIter> xCurrentEntry(rTreeView.
make_iterator());
1639 if (!rTreeView.
get_cursor(xCurrentEntry.get()))
1646 std::unique_ptr<weld::TreeIter> xDataSourceEntry =
m_pTreeView->GetRootLevelParent(xCurrentEntry.get());
1649 ? weld::fromId<DBTreeListUserData*>(rTreeView.
get_id(*xDataSourceEntry))
1659 "/org.openoffice.Office.DataAccess/Policies/Features/Common" ) );
1660 bool bHaveEditDatabase(
true );
1661 OSL_VERIFY( aConfig.
getNodeValue(
"EditDatabaseFromDataSourceView" ) >>= bHaveEditDatabase );
1662 aReturn.
bEnabled = getORB().is() && xDataSourceEntry && bHaveEditDatabase;
1679 bool bHandled =
false;
1721 if (xDataSource.is())
1729 catch(DisposedException&)
1731 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::GetState: object already disposed!");
1746 switch (nCommandType)
1749 sTitle =
DBA_RES(STR_TBL_TITLE);
break;
1751 case CommandType::COMMAND:
1752 sTitle =
DBA_RES(STR_QRY_TITLE);
break;
1754 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::GetState: unknown command type!");
1758 OUString sObject(
aName);
1760 aReturn.
sTitle = sTitle.replaceFirst(
"#", sObject);
1773 OSL_ENSURE( !
m_pTreeView->HasChildPathFocus(),
"SbaTableQueryBrowser::GetState( ID_BROWSER_COPY ): this should have been handled above!" );
1777 if ( pControl->GetSelectRowCount() )
1779 aReturn.
bEnabled = m_aCurrentFrame.isActive();
1811 std::unique_ptr<weld::TreeIter> xIter(rTreeView.
make_iterator());
1819 std::unique_ptr<weld::TreeIter> xIter(rTreeView.
make_iterator());
1822 xIter =
m_pTreeView->GetRootLevelParent(xIter.get());
1837 bool bFullReinit =
false;
1841 OUString sNewQueryCommand;
1846 OSL_ENSURE( bIsQuery,
"SbaTableQueryBrowser::Execute: was a query before, but is not anymore?" );
1900 "SbaTableQueryBrowser::Execute( ID_BROWSER_?): how could this ever be enabled?" );
1917 if (pSelection !=
nullptr)
1921 Any* pSelectionNos = aSelection.getArray();
1924 *pSelectionNos++ <<=
static_cast<sal_Int32
>(nIdx + 1);
1934 if (xResultSetAccess.is())
1935 xCursorClone = xResultSetAccess->createResultSet();
1937 catch(DisposedException&)
1939 SAL_WARN(
"dbaccess.ui",
"Object already disposed!");
1943 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::Execute(ID_BROWSER_?): could not clone the cursor!");
1950 ODataAccessDescriptor aDescriptor;
1951 OUString sDataSourceName;
1954 aDescriptor.setDataSource(sDataSourceName);
1955 aDescriptor[DataAccessDescriptorProperty::Command] = xProp->getPropertyValue(
PROPERTY_COMMAND);
1956 aDescriptor[DataAccessDescriptorProperty::CommandType] = xProp->getPropertyValue(
PROPERTY_COMMAND_TYPE);
1958 aDescriptor[DataAccessDescriptorProperty::Cursor] <<= xCursorClone;
1959 if ( aSelection.hasElements() )
1961 aDescriptor[DataAccessDescriptorProperty::Selection] <<= aSelection;
1962 aDescriptor[DataAccessDescriptorProperty::BookmarkSelection] <<=
false;
1968 xDispatch->dispatch(aParentUrl, aDescriptor.createPropertyValueSequence());
1987 std::unique_ptr<weld::TreeIter> xCursor(rTreeView.
make_iterator());
1994 pControl->
copyCellText(pControl->GetCurRow(), pControl->GetCurColumnId());
2004 OUString
a, b, c,
d, e;
2009 OUString& _rQueryName, OUString& _rQueryImage, OUString& _rTableName, OUString& _rTableImage,
2014 if (_rQueryName.isEmpty())
2015 _rQueryName =
DBA_RES(RID_STR_QUERIES_CONTAINER);
2016 if (_rTableName.isEmpty())
2017 _rTableName =
DBA_RES(RID_STR_TABLES_CONTAINER);
2019 if (_rQueryImage.isEmpty())
2021 if (_rTableImage.isEmpty())
2024 if (_rDbImage.isEmpty())
2025 _rDbImage = ImageProvider::getDatabaseImage();
2030 OUString sDSDisplayName, sDataSourceId;
2031 getDataSourceDisplayName_isURL( _rDbName, sDSDisplayName, sDataSourceId );
2040 std::unique_ptr<weld::TreeIter> xDatasourceEntry(rTreeView.
make_iterator());
2041 rTreeView.
insert(
nullptr, -1, &sDSDisplayName, &
sId,
nullptr,
nullptr,
false, xDatasourceEntry.get());
2042 rTreeView.
set_image(*xDatasourceEntry, _rDbImage);
2051 std::unique_ptr<weld::TreeIter> xRet(rTreeView.
make_iterator());
2052 rTreeView.
insert(xDatasourceEntry.get(), -1, &_rQueryName, &
sId,
2053 nullptr,
nullptr,
true , xRet.get());
2054 rTreeView.
set_image(*xRet, _rQueryImage);
2064 std::unique_ptr<weld::TreeIter> xRet(rTreeView.
make_iterator());
2065 rTreeView.
insert(xDatasourceEntry.get(), -1, &_rTableName, &
sId,
2066 nullptr,
nullptr,
true , xRet.get());
2067 rTreeView.
set_image(*xRet, _rTableImage);
2074 if (m_xDatabaseContext.is())
2076 OUString aDBImage, aQueriesImage, aTablesImage;
2077 OUString sQueriesName, sTablesName;
2081 for (
const OUString& rDatasource : aDatasourceNames)
2100 for (
const OUString& rName : aNames)
2102 if( !
m_pTreeView->GetEntryPosByName(rName, &rParent))
2105 pEntryData->
eType = eEntryType;
2118 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::populateTree: could not fill the tree");
2134 std::unique_ptr<weld::TreeIter> xNewEntry(rTreeView.
make_iterator());
2136 rTreeView.
set_image(*xNewEntry, aImage);
2151 std::unique_ptr<weld::TreeIter> xFirstParent = m_pTreeView->GetRootLevelParent(&rParent);
2152 OSL_ENSURE(xFirstParent,
"SbaTableQueryBrowser::OnExpandEntry: No rootlevelparent!");
2155 assert(
pData &&
"SbaTableQueryBrowser::OnExpandEntry: No user data!");
2157 if (etTableContainer ==
pData->eType)
2163 ensureConnection(xFirstParent.get(), xConnection);
2165 if ( xConnection.
is() )
2172 xWarnings->clearWarnings();
2179 populateTree( xViewSup->getViews(), rParent, etTableOrView );
2184 populateTree( xTabSup->getTables(), rParent, etTableOrView );
2188 xCont->addContainerListener(
this);
2202 SQLContext aContext;
2203 aContext.Message =
DBA_RES(STR_OPENTABLES_WARNINGS);
2204 aContext.Details =
DBA_RES(STR_OPENTABLES_WARNINGS_DETAILS);
2205 aContext.NextException = aWarnings.
get();
2206 aWarnings = aContext;
2215 catch(
const SQLContext& e) { aInfo = e; }
2216 catch(
const SQLWarning& e) { aInfo = e; }
2217 catch(
const SQLException& e) { aInfo = e; }
2218 catch(
const WrappedTargetException& e)
2221 if(e.TargetException >>= aSql)
2224 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::OnExpandEntry: something strange happened!");
2240 if (ensureEntryObject(rParent))
2244 populateTree(xCollection, rParent, etQuery);
2257 OSL_ENSURE(pEntryData,
"ensureEntryObject: user data should already be set!");
2259 std::unique_ptr<weld::TreeIter> xDataSourceEntry =
m_pTreeView->GetRootLevelParent(&rEntry);
2261 bool bSuccess =
false;
2273 std::unique_ptr<weld::TreeIter> xParent(rTreeView.
make_iterator(&rEntry));
2276 if (rTreeView.
iter_compare(*xParent, *xDataSourceEntry) != 0)
2283 if ( xNameAccess.is() )
2305 xCont->addContainerListener(
this);
2311 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::ensureEntryObject: no XQueryDefinitionsSupplier interface!");
2323 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::ensureEntryObject: ooops ... missing some implementation here!");
2333 OUString sDataSource;
2335 sal_Int32 nCommandType = CommandType::COMMAND;
2336 bool bEscapeProcessing =
true;
2344 const sal_Int32 nCommandType,
const bool _bEscapeProcessing,
const SharedConnection& _rxConnection)
2352 if(_rxConnection.
is())
2371 bool bSuccess =
true;
2387 if (aVal.hasValue() && ::comphelper::getBOOL(aVal))
2403 catch(
const SQLException& )
2405 Any aException( ::cppu::getCaughtException() );
2408 catch(
const WrappedTargetException& e )
2427 const sal_Int32 nCommandType,
const bool _bEscapeProcessing,
2429 bool _bSelectDirect)
2431 if (!_rDataSourceName.getLength() || !_rCommand.getLength() || (-1 == nCommandType))
2434 std::unique_ptr<weld::TreeIter> xDataSource;
2435 std::unique_ptr<weld::TreeIter> xCommandType;
2436 std::unique_ptr<weld::TreeIter> xCommand =
getObjectEntry( _rDataSourceName, _rCommand, nCommandType, &xDataSource, &xCommandType,
true, _rxConnection );
2442 bool bSuccess =
true;
2443 if ( _bSelectDirect )
2449 rTreeView.
select(*xCommand);
2458 else if (!xCommandType)
2468 return implLoadAnything(_rDataSourceName, _rCommand, nCommandType, _bEscapeProcessing, _rxConnection);
2476 std::unique_ptr<weld::TreeIter> xSelection(rTreeView.
make_iterator());
2479 implSelect(xSelection.get());
2485 std::unique_ptr<weld::TreeIter> xCurrentEntry(rTreeView.
make_iterator(&rEntry));
2490 pEntryData = weld::fromId<DBTreeListUserData*>(rTreeView.
get_id(*xCurrentEntry));
2492 return xCurrentEntry;
2502 switch (pEntryData->
eType)
2512 OSL_ENSURE(rTreeView.
get_iter_depth(*pEntry) >= 2,
"SbaTableQueryBrowser::implSelect: invalid entry!");
2515 std::unique_ptr<weld::TreeIter> xContainer = rTreeView.
make_iterator(pEntry);
2529 sal_Int32 nOldType = 0;
2534 const OUString sSimpleName = rTreeView.
get_text(*pEntry);
2535 OUStringBuffer sNameBuffer(sSimpleName);
2538 std::unique_ptr<weld::TreeIter> xTemp = rTreeView.
make_iterator(xContainer.get());
2539 std::unique_ptr<weld::TreeIter> xNextTemp = rTreeView.
make_iterator(xTemp.get());
2542 while (rTreeView.
iter_compare(*xNextTemp, *xConnection) != 0)
2544 sNameBuffer.insert(0, rTreeView.
get_text(*xTemp) +
"/");
2551 OUString
aName = sNameBuffer.makeStringAndClear();
2558 bool bRebuild = ( xOldConnection != pConData->
xConnection )
2559 || ( nOldType != nCommandType )
2560 || (
aName != aOldName );
2563 bRebuild |= !xLoadable->isLoaded();
2564 bool bSuccess =
true;
2590 switch(nCommandType)
2599 xNameAccess = xSup->getTables();
2604 xNameAccess.set( pContainerData->
xContainer, UNO_QUERY );
2610 xNameAccess.set( pContainerData->
xContainer, UNO_QUERY );
2615 xNameAccess = xSup->getQueries();
2621 sStatus = sStatus.replaceFirst(
"$name$",
aName);
2624 bool bEscapeProcessing =
true;
2625 if(xNameAccess.is() && xNameAccess->hasByName(sSimpleName))
2628 if ( !
pData->xObjectProperties.is() )
2631 if(xNameAccess->getByName(sSimpleName) >>= xObject)
2633 pData->xObjectProperties.set(xObject, css::uno::UNO_QUERY);
2649 if ( xAnalyzer.is() )
2651 xAnalyzer->setQuery(sSql);
2653 if ( xParSup->getParameters()->getCount() > 0 )
2655 OUString sFilter =
" WHERE " + xAnalyzer->getFilter();
2656 OUString sReplace = sSql.replaceFirst(sFilter,
"");
2657 xAnalyzer->setQuery(sReplace);
2659 xComposer->setFilter(
"0=1");
2660 aName = xAnalyzer->getQuery();
2661 nCommandType = CommandType::COMMAND;
2683 catch(
const SQLException& e)
2691 catch(WrappedTargetException& e)
2694 if(e.TargetException >>= aSql)
2697 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::implSelect: something strange happened!");
2716 std::unique_ptr<weld::TreeIter> xContainer;
2719 std::unique_ptr<weld::TreeIter> xDSLoop(rTreeView.
make_iterator(xContainer.get()));
2729 if (pQueriesData && pQueriesData->
xContainer == rxNameAccess)
2736 if (pTablesData && pTablesData->
xContainer == rxNameAccess)
2763 OSL_ENSURE(pContainerData,
"elementInserted: There must be user data for this type!");
2774 if (rTreeView.
iter_n_children(*xEntry) < xNames->getElementNames().getLength() - 1)
2782 implAppendEntry(xEntry.get(), ::comphelper::getString(rEvent.Accessor), pNewData);
2814 OUString
aName = ::comphelper::getString(_rEvent.Accessor);
2828 rTreeView.
set_id(*xTemp, OUString());
2830 rTreeView.
remove(*xTemp);
2835 std::unique_ptr<weld::TreeIter> xChild(rTreeView.
make_iterator(xContainer.get()));
2843 rTreeView.
set_id(*xChild, OUString());
2845 rTreeView.
remove(*xChild);
2868 OUString
aName = ::comphelper::getString(_rEvent.Accessor);
2884 _rEvent.Element >>=
pData->xObjectProperties;
2888 rTreeView.
set_id(*xTemp, OUString());
2896 std::unique_ptr<weld::TreeIter> xChild(rTreeView.
make_iterator(xContainer.get()));
2909 _rEvent.Element >>=
pData->xObjectProperties;
2913 rTreeView.
set_id(*xChild, OUString());
2926 else if (xNames.get() == m_xDatabaseContext.get())
2928 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::elementReplaced: no support for replaced data sources!");
2940 if ( xComponent.is() )
2943 xComponent->removeEventListener( xListener );
2959 _rxConnection.
clear();
2965 OSL_ENSURE( pDSEntry,
"SbaTableQueryBrowser::disposeConnection: invalid entry (NULL)!" );
2966 OSL_ENSURE(
impl_isDataSourceEntry( pDSEntry ),
"SbaTableQueryBrowser::disposeConnection: invalid entry (not top-level)!" );
2979 OSL_ENSURE(
impl_isDataSourceEntry(&rDSEntry),
"SbaTableQueryBrowser::closeConnection: invalid entry (not top-level)!");
2992 std::unique_ptr<weld::TreeIter> xContainers(rTreeView.
make_iterator(&rDSEntry));
2997 std::unique_ptr<weld::TreeIter> xElements(rTreeView.
make_iterator(xContainers.get()));
3002 bool bElements =
true;
3005 std::unique_ptr<weld::TreeIter> xRemove(rTreeView.
make_iterator(xElements.get()));
3008 rTreeView.
set_id(*xRemove, OUString());
3010 rTreeView.
remove(*xRemove);
3021 if ( _bDisposeConnection )
3043 if (xLoadable->isLoaded())
3044 xLoadable->unload();
3051 if(_bDisposeConnection)
3054 catch(SQLException& e)
3058 catch(WrappedTargetException& e)
3061 if(e.TargetException >>= aSql)
3064 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::unloadAndCleanup: something strange happened!");
3068 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::unloadAndCleanup: could not reset the form");
3080 if ( !_rDataSourceName.isEmpty() && _rxDatabaseContext->hasByName( _rDataSourceName ) )
3081 xDataSource.set( _rxDatabaseContext->getByName( _rDataSourceName ), UNO_QUERY_THROW );
3083 if ( !xDataSource.is() )
3086 if ( xConnAsChild.is() )
3087 xDataSource.set( xConnAsChild->getParent(), UNO_QUERY_THROW );
3090 catch(
const Exception& )
3104 SbaXDataBrowserController::impl_initialize();
3109 OUString aTableName, aCatalogName, aSchemaName;
3111 bool bEscapeProcessing =
true;
3112 sal_Int32 nInitialDisplayCommandType = CommandType::COMMAND;
3113 OUString sInitialDataSourceName;
3114 OUString sInitialCommand;
3131 bool bDisableBrowser = !rArguments.
getOrDefault(
"ShowTreeViewButton",
true )
3133 OSL_ENSURE( !rArguments.
has(
"ShowTreeViewButton" ),
3134 "SbaTableQueryBrowser::impl_initialize: ShowTreeViewButton is superseded by EnableBrowser!" );
3141 OSL_ENSURE( !rArguments.
has(
"ShowTreeView" ),
3142 "SbaTableQueryBrowser::impl_initialize: ShowTreeView is superseded by ShowBrowser!" );
3144 if ( bHideTreeView )
3155 "AlwaysShowCursor",
PROPERTY_BORDER,
"HasNavigationBar",
"HasRecordMarker",
"Tabstop"
3162 if ( xFormMultiSet.is() )
3163 xFormMultiSet->setPropertyValues(
aProperties, aValues);
3173 bool bSubFrameOfEmbeddedDocument =
false;
3179 bSubFrameOfEmbeddedDocument = xCont.is() && ::dbtools::isEmbeddedInDatabase( xCont->getModel(), xForeignConnection );
3188 bool bLimitedTreeEntries =
false;
3191 bLimitedTreeEntries |= bSubFrameOfEmbeddedDocument;
3199 if ( bLimitedTreeEntries )
3201 if ( xConnection.
is() )
3203 startConnectionListening( xConnection );
3206 if ( sInitialDataSourceName.isEmpty() )
3211 xDataSourceProperties.set(xChild->getParent(), css::uno::UNO_QUERY);
3212 if ( xDataSourceProperties.is() )
3216 OSL_VERIFY( xDataSourceProperties->getPropertyValue(
PROPERTY_NAME ) >>= sInitialDataSourceName );
3220 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::impl_initialize: a connection parent which does not have a 'Name'!??" );
3228 std::unique_ptr<weld::TreeIter> xFirst(rTreeView.
make_iterator());
3246 lcl_getDataSource( m_xDatabaseContext, sInitialDataSourceName, xConnection ) ), UNO_QUERY );
3250 if (
implSelect( sInitialDataSourceName, sInitialCommand, nInitialDisplayCommandType, bEscapeProcessing, xConnection,
true ) )
3262 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::impl_initialize: could not set the update related names!");
3305 std::unique_ptr<weld::TreeIter> xDSEntry =
m_pTreeView->GetRootLevelParent(pAnyEntry);
3309 ? weld::fromId<DBTreeListUserData*>(rTreeView.
get_id(*xDSEntry))
3317 std::unique_ptr<ImageProvider> xImageProvider(
new ImageProvider);
3320 xImageProvider.
reset(
new ImageProvider(xConnection));
3321 return xImageProvider;
3326 std::unique_ptr<weld::TreeIter> xDSEntry =
m_pTreeView->GetRootLevelParent(pAnyEntry);
3330 ? weld::fromId<DBTreeListUserData*>(rTreeView.
get_id(*xDSEntry))
3334 return rConnection.
is();
3341 std::unique_ptr<weld::TreeIter> xRoot(
m_pTreeView->GetRootLevelParent(pEntry));
3348 OSL_ENSURE(
impl_isDataSourceEntry( pDSEntry ),
"SbaTableQueryBrowser::ensureConnection: this entry does not denote a data source!" );
3352 OUString aDSName = rTreeView.
get_text(*pDSEntry);
3355 if ( pTreeListData )
3358 if ( !rConnection.
is() && pTreeListData )
3361 OUString sConnecting(
DBA_RES(STR_CONNECTING_DATASOURCE));
3362 sConnecting = sConnecting.replaceFirst(
"$name$", aDSName);
3366 OUString sConnectingContext(
DBA_RES(STR_COULDNOTCONNECT_DATASOURCE));
3367 sConnectingContext = sConnectingContext.replaceFirst(
"$name$", aDSName);
3378 return rConnection.
is();
3396 const OUString sLeft = rTreeView.
get_text(rLHS);
3399 if (
DBA_RES(RID_STR_TABLES_CONTAINER) == sLeft)
3401 else if (
DBA_RES(RID_STR_QUERIES_CONTAINER) == sLeft)
3404 if ( eLeft == eRight )
3413 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::OnTreeEntryCompare: unexpected case!" );
3417 OUString sLeftText = rTreeView.
get_text(rLHS);
3418 OUString sRightText = rTreeView.
get_text(rRHS);
3420 sal_Int32 nCompareResult = 0;
3426 nCompareResult =
m_xCollator->compareString(sLeftText, sRightText);
3434 nCompareResult = sLeftText.compareTo(sRightText);
3436 return nCompareResult;
3448 std::unique_ptr<weld::TreeIter> xTopLevelSelected(rTreeView.
make_iterator(&rApplyTo));
3458 if ( xDocumentModel.is() )
3461 InteractionHandler::createWithParent(getORB(),
nullptr) );
3464 aLoadArgs.
put(
"Model", xDocumentModel );
3465 aLoadArgs.
put(
"InteractionHandler", xInteractionHandler );
3466 aLoadArgs.
put(
"MacroExecutionMode", MacroExecMode::USE_CONFIG );
3469 aLoadArgs >>= aLoadArgPV;
3471 xFrameLoader->loadComponentFromURL(
3472 xDocumentModel->getURL(),
3474 FrameSearchFlag::ALL | FrameSearchFlag::GLOBAL,
3515 OSL_PRECOND( &rTreeView == &rControl,
3516 "SbaTableQueryBrowser::getCurrentSelection: where does this come from?" );
3518 if (&rTreeView != &rControl)
3521 std::unique_ptr<weld::TreeIter> xSelected(rTreeView.
make_iterator());
3525 NamedDatabaseObject aSelectedObject;
3527 aSelectedObject.Type =
static_cast< sal_Int32
>(
pData->eType );
3529 switch ( aSelectedObject.Type )
3533 aSelectedObject.Name = rTreeView.
get_text(*xSelected);
3536 case DatabaseObjectContainer::DATA_SOURCE:
3537 case DatabaseObjectContainer::QUERIES:
3538 case DatabaseObjectContainer::TABLES:
3543 SAL_WARN(
"dbaccess.ui",
"SbaTableQueryBrowser::getCurrentSelection: invalid (unexpected) object type!" );
3547 return Any( aSelectedObject );
3562 _bEscapeProcessing =
false;
3567 OUString sDataSourceName;
3569 sal_Int32 nCommandType = CommandType::COMMAND;
3571 ODataAccessDescriptor aDesc( xRowsetProps );
3572 sDataSourceName = aDesc.getDataSource();
3573 aDesc[ DataAccessDescriptorProperty::Command ] >>= sCommand;
3574 aDesc[ DataAccessDescriptorProperty::CommandType ] >>= nCommandType;
3584 m_xDatabaseContext->getByName( sDataSourceName ) >>= xSuppQueries;
3585 if ( xSuppQueries.is() )
3586 xQueries = xSuppQueries->getQueryDefinitions();
3587 if ( xQueries.is() )
3588 xQueries->getByName( sCommand ) >>= xQuery;
3589 OSL_ENSURE( xQuery.is(),
"SbaTableQueryBrowser::implGetQuerySignature: could not retrieve the query object!" );
3611 if(
aEvent.Action == FrameAction_COMPONENT_DETACHING)
3613 else if (
aEvent.Action == FrameAction_COMPONENT_REATTACHED)
3628 _xColContainer->getByName(rName) >>=
xColumn;
3629 _xColContainer->removeByName(rName);
3630 ::comphelper::disposeComponent(
xColumn);
3640 else if ( !m_bPreview )
3644 if ( xLayoutManager.is() )
3646 xLayoutManager->lock();
3647 xLayoutManager->createElement(
"private:resource/toolbar/toolbar" );
3648 xLayoutManager->unlock();
3649 xLayoutManager->doLayout();
3651 onLoadedMenu( xLayoutManager );
3669 if (
aURL.GetProtocol() != INetProtocol::NotValid )
3671 if ( !
sName.isEmpty() )
3673 sName +=
" - " + sTitle;
3692 OUString sDataSource;
3694 sal_Int32 nCommandType = CommandType::COMMAND;
3695 bool bEscapeProcessing =
true;
3697 if ( !sDataSource.isEmpty() && !sCommand.isEmpty() && (-1 != nCommandType) )
3720 if ( xConnection.is() )
3724 xDocument.set( xDataSource->getDatabaseDocument(), UNO_QUERY_THROW );
3732 OSL_ENSURE( xScripts.is() || !xDocument.is(),
3733 "SbaTableQueryBrowser::getScriptContainer: invalid database document!" );
3759 std::unique_ptr<weld::TreeIter> xDataSourceEntry(rTreeView.
make_iterator());
3760 bool bDataSourceEntry = rTreeView.
get_iter_first(*xDataSourceEntry);
3761 while (bDataSourceEntry)
3763 if (rTreeView.
get_text(*xDataSourceEntry) == rDataSourceName)
3768 OSL_ENSURE( bDataSourceEntry,
"SbaTableQueryBrowser::impl_cleanupDataSourceEntry: do not know this data source!" );
3769 if (!bDataSourceEntry)
3778 std::unique_ptr<weld::TreeIter> xChild(rTreeView.
make_iterator(xDataSourceEntry.get()));
3785 rTreeView.
set_id(*xChild, OUString());
3792 rTreeView.
set_id(*xDataSourceEntry, OUString());
3794 rTreeView.
remove(*xDataSourceEntry);
PropertyValueVector_t aPropertyValues
PropertiesInfo aProperties
#define ID_BROWSER_FORMLETTER
#define ID_TREE_ADMINISTRATE
#define ID_TREE_CLOSE_CONN
#define ID_BROWSER_INSERTCONTENT
#define ID_BROWSER_ROWHEIGHT
#define ID_BROWSER_REMOVEFILTER
#define ID_BROWSER_REFRESH
#define ID_BROWSER_EXPLORER
#define ID_BROWSER_TABLEATTR
#define ID_BROWSER_DOCUMENT_DATASOURCE
#define ID_BROWSER_REFRESH_REBUILD
#define ID_BROWSER_INSERTCOLUMNS
#define ID_BROWSER_COLWIDTH
#define ID_BROWSER_COLATTRSET
#define ID_TREE_EDIT_DATABASE
static const AllSettings & GetSettings()
void ForceHideScrollbars()
bool canCopyCellText(sal_Int32 _nRow, sal_uInt16 _nColId)
void copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId)
sal_Int32 GetSelectCount() const
sal_Int32 FirstSelected()
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
void reset(reference_type *pBody)
reference_type * get() const
static VclPtr< reference_type > Create(Arg &&... arg)
bool has(const OUString &_rValueName) const
bool get_ensureType(const OUString &_rValueName, VALUE_TYPE &_out_rValue) const
const css::uno::Any & get(const OUString &_rValueName) const
bool put(const OUString &_rValueName, const VALUE_TYPE &_rValue)
VALUE_TYPE getOrDefault(const OUString &_rValueName, const VALUE_TYPE &_rDefault) const
void notifyEach(void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event)
void disposeAndClear(const css::lang::EventObject &rEvt)
sal_Int32 removeInterface(const css::uno::Reference< css::uno::XInterface > &rxIFace)
sal_Int32 addInterface(const css::uno::Reference< css::uno::XInterface > &rxIFace)
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()
virtual void Resize() override
virtual void loadMenu(const css::uno::Reference< css::frame::XFrame > &_xFrame)
HeaderBar * GetHeaderBar() const
bool IsAllSelected() const
virtual IController & getCommandController() override
returns the controller which is responsible for providing states of certain features,...
css::uno::Reference< css::i18n::XCollator > m_xCollator
void transferChangedControlProperty(const OUString &_rProperty, const css::uno::Any &_rNewValue)
void clearTreeModel()
clears the tree list box
virtual void criticalFail() override
void checkDocumentDataSource()
checks if m_aDocumentDataSource describes a known object
::comphelper::OInterfaceContainerHelper2 m_aSelectionListeners
void impl_cleanupDataSourceEntry(std::u16string_view _rDataSourceName)
removes (and cleans up) the entry for the given data source
virtual void addModelListeners(const css::uno::Reference< css::awt::XControlModel > &_xGridControlModel) override
svx::ODataAccessDescriptor m_aDocumentDataSource
void impl_sanitizeRowSetClauses_nothrow()
checks whether the Order/Filter clauses set at our row set are valid, removes them if not so
void InitializeGridModel(const css::uno::Reference< css::form::XFormComponent > &xGrid)
virtual void SAL_CALL elementInserted(const css::container::ContainerEvent &Event) override
void initializePreviewMode()
called whenever the content of the browser is used for preview, as the very last action of the load p...
VclPtr< Splitter > m_pSplitter
void closeConnection(const weld::TreeIter &rEntry, bool bDisposeConnection=true)
close the connection (and collapse the list entries) of the given list entries
bool m_bQueryEscapeProcessing
void populateTree(const css::uno::Reference< css::container::XNameAccess > &xNameAccess, const weld::TreeIter &rParent, EntryType eEntryType)
css::uno::Reference< css::awt::XWindow > m_xMainToolbar
void disposeConnection(const weld::TreeIter *xpDSEntry)
bool haveExplorer() const
void implAdministrate(const weld::TreeIter &rApplyTo)
void implRemoveStatusListeners()
EntryType getChildType(const weld::TreeIter &rEntry) const
::comphelper::OInterfaceContainerHelper2 m_aContextMenuInterceptors
virtual ~SbaTableQueryBrowser() override
bool ensureConnection(const weld::TreeIter *pDSEntry, void *pDSData, SharedConnection &rConnection)
void selectPath(const weld::TreeIter *pEntry, bool bSelect=true)
virtual FeatureState GetState(sal_uInt16 nId) const override
virtual bool Construct(vcl::Window *pParent) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
void implAddDatasource(const OUString &_rDbName, OUString &_rDbImage, OUString &_rQueryName, OUString &_rQueryImage, OUString &_rTableName, OUString &_rTableImage, const SharedConnection &_rxConnection)
add an entry (including the subentries for queries/tables) to the list model
virtual css::uno::Any SAL_CALL getSelection() override
virtual void SAL_CALL attachFrame(const css::uno::Reference< css::frame::XFrame > &xFrame) override
virtual void AddColumnListener(const css::uno::Reference< css::beans::XPropertySet > &xCol) override
bool isCurrentlyDisplayedChanged(std::u16string_view rName, const weld::TreeIter &rContainer)
checks if the currently displayed entry changed
std::unique_ptr< weld::TreeIter > getObjectEntry(const svx::ODataAccessDescriptor &rDescriptor, std::unique_ptr< weld::TreeIter > *ppDataSourceEntry, std::unique_ptr< weld::TreeIter > *ppContainerEntry)
retrieves the tree entry for the object described by <arg>_rDescriptor</arg>
virtual sal_Bool SAL_CALL select(const css::uno::Any &aSelection) override
VclPtr< InterimDBTreeListBox > m_pTreeView
virtual void SAL_CALL disposing() override
virtual OUString getContextMenuResourceName() const override
returns the context menu resource name for the control
virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent &Event) override
bool isEntryCopyAllowed(const weld::TreeIter &rEntry) const
int OnTreeEntryCompare(const weld::TreeIter &rLHS, const weld::TreeIter &rRHS)
static void clearGridColumns(const css::uno::Reference< css::container::XNameContainer > &_xColContainer)
bool getExternalSlotState(sal_uInt16 _nId) const
get the state of an external slot
virtual void removeModelListeners(const css::uno::Reference< css::awt::XControlModel > &_xGridControlModel) override
void initializeTreeModel()
static sal_Int32 getDatabaseObjectType(EntryType _eType)
returns a DatabaseObject value corresponding to the given EntryType
bool ensureEntryObject(const weld::TreeIter &rEntry)
std::unique_ptr< weld::TreeIter > getEntryFromContainer(const css::uno::Reference< css::container::XNameAccess > &rxNameAccess)
search in the tree for query- or tablecontainer equal to this interface and return this container ent...
bool implSelect(const svx::ODataAccessDescriptor &_rDescriptor, bool _bSelectDirect=false)
bool getExistentConnectionFor(const weld::TreeIter *pDSEntry, SharedConnection &rConnection)
virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) override
virtual void SAL_CALL addSelectionChangeListener(const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
virtual bool preReloadForm() override
virtual bool InitializeForm(const css::uno::Reference< css::beans::XPropertySet > &i_formProperties) override
virtual void SAL_CALL changedDatabaseLocation(const css::sdb::DatabaseRegistrationEvent &Event) override
virtual ::comphelper::OInterfaceContainerHelper2 * getContextMenuInterceptors() override
returns the container of registered context menu interceptors, or NULL if the implementation does not...
SbaTableQueryBrowser(const css::uno::Reference< css::uno::XComponentContext > &_rM)
virtual void SAL_CALL revokedDatabaseLocation(const css::sdb::DatabaseRegistrationEvent &Event) override
std::unique_ptr< ImageProvider > getImageProviderFor(const weld::TreeIter *pAnyEntry)
returns an image provider which works with the connection belonging to the given entry
virtual css::uno::Reference< css::document::XEmbeddedScripts > SAL_CALL getScriptContainer() override
void impl_releaseConnection(SharedConnection &_rxConnection)
flushes and disposes the given connection, and de-registers as listener
bool impl_isDataSourceEntry(const weld::TreeIter *pEntry) const
::std::optional< bool > m_aDocScriptSupport
virtual void loadMenu(const css::uno::Reference< css::frame::XFrame > &_xFrame) override
virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent &Event) override
virtual vcl::Window * getMenuParent() const override
virtual bool requestQuickHelp(const void *pUserData, OUString &rText) const override
requests a quick help text to display
virtual void SAL_CALL frameAction(const css::frame::FrameActionEvent &aEvent) override
std::unique_ptr< weld::TreeIter > m_xCurrentlyDisplayed
OUString getDataSourceAccessor(const weld::TreeIter &rDataSourceEntry) const
retrieves the data source URL/name for the given entry representing a data source
std::unique_ptr< weld::TreeIter > implGetConnectionEntry(const weld::TreeIter &rEntry) const
css::uno::Reference< css::frame::XFrame > m_xCurrentFrameParent
OUString GetEntryText(const weld::TreeIter &rEntry) const
virtual void SAL_CALL registerContextMenuInterceptor(const css::uno::Reference< css::ui::XContextMenuInterceptor > &Interceptor) override
static void extractDescriptorProps(const svx::ODataAccessDescriptor &_rDescriptor, OUString &_rDataSource, OUString &_rCommand, sal_Int32 &_rCommandType, bool &_rEscapeProcessing)
virtual void SAL_CALL releaseContextMenuInterceptor(const css::uno::Reference< css::ui::XContextMenuInterceptor > &Interceptor) override
std::unique_ptr< weld::TreeIter > implAppendEntry(const weld::TreeIter *pParent, const OUString &rName, const DBTreeListUserData *pUserData)
inserts an entry into the tree
static bool isContainer(EntryType _eType)
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
virtual void ColumnChanged() override
virtual OUString getPrivateTitle() const override
virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent &Event) override
ExternalFeaturesMap m_aExternalFeatures
void copyEntry(const weld::TreeIter &rEntry)
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
bool implGetQuerySignature(OUString &_rCommand, bool &_bEscapeProcessing)
get the signature (command/escape processing) of the query the form is based on
virtual OUString SAL_CALL getImplementationName() override
virtual void impl_initialize() override
EntryType getEntryType(const weld::TreeIter &rEntry) const
virtual void postReloadForm() override
virtual void adjustMenuPosition(const weld::TreeView &rControl, ::Point &rPos) const override
adjust rPos which is initially relative to rControl to be relative to the window of getMenuParent
void implCheckExternalSlot(sal_uInt16 _nId)
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &_rType) override
bool isSelected(const weld::TreeIter &rEntry) const
bool implLoadAnything(const OUString &_rDataSourceName, const OUString &_rCommand, const sal_Int32 _nCommandType, const bool _bEscapeProcessing, const SharedConnection &_rxConnection)
loads the grid control with the data object specified (which may be a table, a query or a command)
virtual void SAL_CALL removeSelectionChangeListener(const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
void unloadAndCleanup(bool _bDisposeConnection=true)
unloads the form, empties the grid model, cleans up anything related to the currently displayed objec...
virtual void Execute(sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
virtual void RowChanged() override
virtual css::uno::Any getCurrentSelection(weld::TreeView &rControl) const override
returns the current selection in the given control
void connectExternalDispatches()
virtual void SAL_CALL registeredDatabaseLocation(const css::sdb::DatabaseRegistrationEvent &Event) override
virtual void RemoveColumnListener(const css::uno::Reference< css::beans::XPropertySet > &xCol) override
virtual void LoadFinished(bool _bWasSynch) override
const css::uno::Reference< css::form::XLoadable > & getLoadable() const
bool isValidCursor() const
virtual void RowChanged() override
virtual void RemoveColumnListener(const css::uno::Reference< css::beans::XPropertySet > &xCol)
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 disposing() override
const css::uno::Reference< css::form::XFormComponent > & getFormComponent() const
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &_rType) override
const css::uno::Reference< css::util::XNumberFormatter > & getNumberFormatter() const
virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) override
bool SaveModified(bool bAskFor=true)
virtual FeatureState GetState(sal_uInt16 nId) const override
virtual void AddColumnListener(const css::uno::Reference< css::beans::XPropertySet > &xCol)
UnoDataBrowserView * getBrowserView() const
const css::uno::Reference< css::sdbc::XRowSet > & getRowSet() const
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &evt) override
virtual bool Construct(vcl::Window *pParent) override
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 ColumnChanged() override
virtual void Execute(sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
bool loadingCancelled() const
virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent &Event) override
css::uno::Reference< css::sdb::XSingleSelectQueryComposer > createParser_nothrow()
css::uno::Reference< css::awt::XControlModel > getControlModel() const
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
SbaGridControl * getVclControl() const
const css::uno::Reference< css::awt::XControl > & getGridControl() const
void setSplitter(Splitter *pSplitter)
for the same reason the view column count isn't the same as the model column count
void setTreeView(InterimDBTreeListBox *pTreeView)
OUString get(NOTATION _eOutputNotation) const
void initializeFrom(const css::uno::Sequence< css::beans::PropertyValue > &_rValues)
bool has(DataAccessDescriptorProperty _eWhich) const
OUString getDataSource() const
css::uno::Any getNodeValue(const OUString &_rPath) const noexcept
static OConfigurationTreeRoot createWithComponentContext(const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const OUString &_rPath, sal_Int32 _nDepth=-1, CREATION_MODE _eMode=CM_UPDATABLE)
const css::uno::Reference< INTERFACE > & getTyped() const
void reset(const css::uno::Reference< INTERFACE > &_rxComponent, AssignmentMode _eMode=TakeOwnership)
Point LogicToPixel(const Point &rLogicPt) const
void SetHelpId(const OUString &)
virtual void scroll_to_row(int row)=0
virtual std::unique_ptr< TreeIter > make_iterator(const TreeIter *pOrig=nullptr) const=0
virtual bool get_selected(TreeIter *pIter) const=0
virtual void make_sorted()=0
virtual void expand_row(const TreeIter &rIter)=0
virtual OUString get_text(int row, int col=-1) const=0
virtual void set_text_emphasis(int row, bool bOn, int col)=0
virtual void insert(const TreeIter *pParent, int pos, const OUString *pStr, const OUString *pId, const OUString *pIconName, VirtualDevice *pImageSurface, bool bChildrenOnDemand, TreeIter *pRet)=0
virtual int iter_n_children(const TreeIter &rIter) const=0
void connect_expanding(const Link< const TreeIter &, bool > &rLink)
virtual void set_image(int row, const OUString &rImage, int col=-1)=0
virtual bool get_iter_first(TreeIter &rIter) const=0
virtual void copy_iterator(const TreeIter &rSource, TreeIter &rDest) const=0
virtual void remove(int pos)=0
virtual bool iter_next_sibling(TreeIter &rIter) const=0
virtual void select(int pos)=0
virtual bool iter_parent(TreeIter &rIter) const=0
virtual void set_sort_func(const std::function< int(const weld::TreeIter &, const weld::TreeIter &)> &func)
virtual int iter_compare(const TreeIter &a, const TreeIter &b) const=0
virtual void collapse_row(const TreeIter &rIter)=0
virtual bool iter_children(TreeIter &rIter) const=0
virtual void set_id(int row, const OUString &rId)=0
virtual bool iter_has_child(const TreeIter &rIter) const=0
virtual bool get_cursor(TreeIter *pIter) const=0
virtual void set_cursor(int pos)=0
virtual void set_sort_order(bool bAscending)=0
virtual int get_iter_depth(const TreeIter &rIter) const=0
virtual void make_unsorted()=0
virtual OUString get_id(int pos) const=0
#define TOOLS_WARN_EXCEPTION(area, stream)
#define ENSURE_OR_RETURN_FALSE(c, m)
#define DBG_UNHANDLED_EXCEPTION(...)
Reference< XDispatch > xDispatch
Reference< XSingleServiceFactory > xFactory
constexpr OUStringLiteral HID_CTL_TABBROWSER
constexpr OUStringLiteral HID_DATABROWSE_HEADER
constexpr OUStringLiteral HID_CTL_TREEVIEW
Reference< XNameAccess > _xNameAccess
#define LINK(Instance, Class, Member)
#define SAL_WARN(area, stream)
std::unique_ptr< sal_Int32[]> pData
#define SFX_ENDOFSELECTION
const LanguageTag & getLocale()
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
OUString getString(const Any &_rAny)
IMPL_LINK_NOARG(OApplicationController, OnClipboardChanged, TransferableDataHelper *, void)
css::uno::Reference< css::sdbc::XDataSource > getDataSourceByName(const OUString &_rDataSourceName, weld::Window *_pErrorMessageParent, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, ::dbtools::SQLExceptionInfo *_pErrorInfo)
retrieves a data source given by name or URL, and displays an error if this fails
IMPL_LINK(OApplicationController, OnSelectContainer, void *, _pType, void)
css::uno::Reference< css::uno::XInterface > getDataSourceOrModel(const css::uno::Reference< css::uno::XInterface > &_xObject)
returns either the model when data source is given as parameter, or returns a data source when a mode...
::utl::SharedUNOComponent< css::sdbc::XConnection > SharedConnection
static void SafeRemovePropertyListener(const Reference< XPropertySet > &xSet, const OUString &rPropName, XPropertyChangeListener *pListener)
static Reference< XPropertySet > getColumnHelper(const weld::TreeView &rTreeView, const weld::TreeIter *pCurrentlyDisplayed, const Reference< XPropertySet > &rxSource)
static void SafeAddPropertyListener(const Reference< XPropertySet > &xSet, const OUString &rPropName, XPropertyChangeListener *pListener)
::osl::Mutex & getMutex()
enumrange< T >::Iterator begin(enumrange< T >)
SwView * getView(const uno::Reference< frame::XModel > &xModel)
sal_uInt16 administrateDatabaseRegistration(weld::Window *_parentWindow)
OUString toId(const void *pValue)
const PropertyStruct aPropNames[]
const Color aColNames[SC_RANGECOLORS]
constexpr OUStringLiteral PROPERTY_WIDTH(u"Width")
constexpr OUStringLiteral PROPERTY_COMMAND(u"Command")
constexpr OUStringLiteral PROPERTY_TEXTCOLOR(u"TextColor")
constexpr OUStringLiteral PROPERTY_FETCHDIRECTION(u"FetchDirection")
constexpr OUStringLiteral PROPERTY_DEFAULTTEXT(u"DefaultText")
constexpr OUStringLiteral PROPERTY_HAVING_CLAUSE(u"HavingClause")
constexpr OUStringLiteral PROPERTY_UPDATE_TABLENAME(u"UpdateTableName")
constexpr OUStringLiteral PROPERTY_EFFECTIVEDEFAULT(u"EffectiveDefault")
constexpr OUStringLiteral PROPERTY_CONTROLSOURCE(u"DataField")
constexpr OUStringLiteral PROPERTY_CONTROLDEFAULT(u"ControlDefault")
constexpr OUStringLiteral PROPERTY_LABEL(u"Label")
constexpr OUStringLiteral PROPERTY_ISROWVERSION(u"IsRowVersion")
constexpr OUStringLiteral PROPERTY_ISNULLABLE(u"IsNullable")
constexpr OUStringLiteral PROPERTY_UPDATE_SCHEMANAME(u"UpdateSchemaName")
constexpr OUStringLiteral PROPERTY_DESCRIPTION(u"Description")
constexpr OUStringLiteral PROPERTY_FORMATKEY(u"FormatKey")
constexpr OUStringLiteral PROPERTY_APPLYFILTER(u"ApplyFilter")
constexpr OUStringLiteral PROPERTY_DEFAULTSTATE(u"DefaultState")
constexpr OUStringLiteral SERVICE_NAME_SINGLESELECTQUERYCOMPOSER
constexpr OUStringLiteral PROPERTY_BORDER(u"Border")
constexpr OUStringLiteral PROPERTY_MOUSE_WHEEL_BEHAVIOR(u"MouseWheelBehavior")
constexpr OUStringLiteral PROPERTY_TEXTEMPHASIS(u"FontEmphasisMark")
constexpr OUStringLiteral PROPERTY_FILTER(u"Filter")
constexpr OUStringLiteral PROPERTY_ACTIVE_CONNECTION(u"ActiveConnection")
constexpr OUStringLiteral PROPERTY_TABLENAME(u"TableName")
constexpr OUStringLiteral PROPERTY_FONT(u"FontDescriptor")
constexpr OUStringLiteral PROPERTY_ESCAPE_PROCESSING(u"EscapeProcessing")
constexpr OUStringLiteral PROPERTY_TEXTLINECOLOR(u"TextLineColor")
constexpr OUStringLiteral PROPERTY_HELPTEXT(u"HelpText")
constexpr OUStringLiteral PROPERTY_ENABLE_BROWSER(u"EnableBrowser")
constexpr OUStringLiteral PROPERTY_SUPPRESSVERSIONCL(u"SuppressVersionColumns")
constexpr OUStringLiteral PROPERTY_TYPE(u"Type")
constexpr OUStringLiteral PROPERTY_NAME(u"Name")
constexpr OUStringLiteral PROPERTY_TEXTRELIEF(u"FontRelief")
constexpr OUStringLiteral PROPERTY_UPDATE_CATALOGNAME(u"UpdateCatalogName")
constexpr OUStringLiteral PROPERTY_SHOWMENU(u"ShowMenu")
constexpr OUStringLiteral PROPERTY_DATASOURCENAME(u"DataSourceName")
constexpr OUStringLiteral PROPERTY_HIDDEN(u"Hidden")
constexpr OUStringLiteral PROPERTY_ALIGN(u"Align")
constexpr OUStringLiteral PROPERTY_ROW_HEIGHT(u"RowHeight")
constexpr OUStringLiteral PROPERTY_COMMAND_TYPE(u"CommandType")
constexpr OUStringLiteral PROPERTY_ORDER(u"Order")
constexpr OUStringLiteral PROPERTY_ISNEW(u"IsNew")
constexpr OUStringLiteral PROPERTY_SHOW_BROWSER(u"ShowBrowser")
SbaTableQueryBrowser::EntryType eType
css::uno::Reference< css::uno::XInterface > xContainer
if the entry denotes an object container, this is the UNO interface for this container
css::uno::Reference< css::beans::XPropertySet > xObjectProperties
if the entry denotes a table or query, this is the respective UNO object
SharedConnection xConnection
if the entry denotes a data source, this is the connection for this data source (if already connectio...
describes the state of a feature
std::optional< bool > bChecked
std::optional< OUString > sTitle
Reference< XFrame > xFrame
the frame which the component resides in. Must not be <NULL>
::comphelper::NamedValueCollection const & m_rCollection
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * org_openoffice_comp_dbu_ODatasourceBrowser_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)