22#include <core_resource.hxx>
28#include <com/sun/star/beans/NamedValue.hpp>
29#include <com/sun/star/container/XChild.hpp>
30#include <com/sun/star/container/XContainer.hpp>
31#include <com/sun/star/container/XContentEnumerationAccess.hpp>
32#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
33#include <com/sun/star/container/XHierarchicalNameContainer.hpp>
34#include <com/sun/star/frame/XStorable.hpp>
35#include <com/sun/star/sdb/CommandType.hpp>
36#include <com/sun/star/sdb/ErrorMessageDialog.hpp>
37#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
38#include <com/sun/star/sdbc/SQLException.hpp>
39#include <com/sun/star/sdbc/SQLWarning.hpp>
40#include <com/sun/star/sdbc/XDataSource.hpp>
41#include <com/sun/star/sdbcx/XAlterView.hpp>
42#include <com/sun/star/sdbcx/XAppend.hpp>
43#include <com/sun/star/sdbcx/XRename.hpp>
44#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
45#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
46#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
47#include <com/sun/star/util/XFlushable.hpp>
48#include <com/sun/star/util/XModifiable.hpp>
49#include <com/sun/star/util/XModifyBroadcaster.hpp>
50#include <com/sun/star/util/XURLTransformer.hpp>
51#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
52#include <com/sun/star/document/XEmbeddedScripts.hpp>
53#include <com/sun/star/frame/XModel2.hpp>
54#include <com/sun/star/task/XInteractionHandler.hpp>
55#include <com/sun/star/sdb/application/DatabaseObject.hpp>
56#include <com/sun/star/sdb/application/DatabaseObjectContainer.hpp>
57#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
60#include <osl/diagnose.h>
94#include <osl/mutex.hxx>
103#include <UITools.hxx>
106#include <dbaccess_slotid.hrc>
108extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
110 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const& )
112 return cppu::acquire(new ::dbaui::OApplicationController(context));
118using namespace ::
svx;
134using ::com::sun::star::document::XEmbeddedScripts;
135using ::com::sun::star::document::XDocumentEventBroadcaster;
136using ::com::sun::star::sdb::application::NamedDatabaseObject;
138namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject;
139namespace DatabaseObjectContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer;
148 return {
"com.sun.star.sdb.application.DefaultViewController" };
226 explicit SelectionGuard( SelectionNotifier& _rNotifier )
229 m_rNotifier.enterSelection( SelectionNotifier::SelectionGuardAccess() );
234 m_rNotifier.leaveSelection( SelectionNotifier::SelectionGuardAccess() );
237 SelectionGuard(
const SelectionGuard&) =
delete;
238 const SelectionGuard& operator=(
const SelectionGuard&) =
delete;
249 ,m_aContextMenuInterceptors(
getMutex() )
251 ,m_aTypeCollection( _rxORB )
252 ,m_aTableCopyHelper(this)
253 ,m_nAsyncDrop(nullptr)
257 ,m_bNeedToReconnect(false)
258 ,m_bSuspended( false )
265 if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
267 OSL_FAIL(
"Please check who doesn't dispose this component!");
279 if ( m_xDataSourceConnection.is() )
280 stopConnectionListening( m_xDataSourceConnection );
286 if ( xFlush.is() && m_xMetaData.is() && !m_xMetaData->isReadOnly() )
294 m_xDataSourceConnection.clear();
304 if( rContainerListener.is() )
306 rContainerListener->removeContainerListener(
this );
330 m_xDataSource->removePropertyChangeListener(OUString(),
this);
343 if ( xBroadcaster.is() )
344 xBroadcaster->removeModifyListener(
static_cast<XModifyListener*
>(
this));
349 if ( !sUrl.isEmpty() )
357 aFilter = pFilter->GetFilterName();
364 std::nullopt, std::nullopt);
367 if (
aURL.GetProtocol() == INetProtocol::File )
369 pFilter ? pFilter->GetMimeType() : OUString(),
370 pFilter ? pFilter->GetServiceName() : OUString() );
374 m_xModel->disconnectController(
this );
393 bool bSuccess =
false;
399 catch(
const SQLException&)
404 OSL_FAIL(
"OApplicationController::Construct : the construction of UnoDataBrowserView failed !");
428 ::osl::MutexGuard aGuard(
getMutex() );
433 "OApplicationController::disposing: which connection does this come from?" );
443 else if ( _rSource.Source ==
m_xModel )
453 Reference<XContainer> xContainer( _rSource.Source, UNO_QUERY );
454 if ( xContainer.is() )
468 if ( xBroadcaster.is() )
470 xBroadcaster->notifyDocumentEvent(
471 "OnPrepareViewClosing",
478 ::osl::MutexGuard aGuard(
getMutex() );
483 bool bCanSuspend =
true;
495 && !xStor->isReadonly()
497 && xModi->isModified()
505 bCanSuspend = !xModi->isModified();
535 case SID_NEWDOCDIRECT:
537 aReturn.
sTitle =
"private:factory/sdatabase";
569 case SID_DB_APP_PASTE_SPECIAL:
591 case SID_APP_NEW_FORM:
595 case SID_APP_NEW_REPORT:
601 aReturn.
bEnabled = xEnumAccess.is();
604 const OUString sReportEngineServiceName = ::dbtools::getDefaultReportEngineServiceName(
m_xContext);
605 aReturn.
bEnabled = !sReportEngineServiceName.isEmpty();
609 aReturn.
bEnabled = xEnumDrivers.is() && xEnumDrivers->hasMoreElements();
614 case SID_DB_APP_VIEW_TABLES:
618 case SID_DB_APP_VIEW_QUERIES:
622 case SID_DB_APP_VIEW_FORMS:
626 case SID_DB_APP_VIEW_REPORTS:
633 case SID_DB_FORM_NEW_PILOT:
637 case SID_DB_NEW_VIEW_SQL:
653 case SID_APP_NEW_FOLDER:
661 case SID_FORM_CREATE_REPWIZ_PRE_SEL:
662 case SID_REPORT_CREATE_REPWIZ_PRE_SEL:
663 case SID_APP_NEW_REPORT_PRE_SEL:
671 if ( aReturn.
bEnabled && SID_APP_NEW_REPORT_PRE_SEL == _nId )
674 aReturn.
bEnabled = xEnumAccess.is();
677 static constexpr OUStringLiteral s_sReportDesign =
u"org.libreoffice.report.pentaho.SOReportJobFactory";
679 aReturn.
bEnabled = xEnumDrivers.is() && xEnumDrivers->hasMoreElements();
684 case SID_DB_APP_DELETE:
685 case SID_DB_APP_RENAME:
688 case SID_DB_APP_TABLE_DELETE:
689 case SID_DB_APP_TABLE_RENAME:
692 case SID_DB_APP_QUERY_DELETE:
693 case SID_DB_APP_QUERY_RENAME:
696 case SID_DB_APP_FORM_DELETE:
697 case SID_DB_APP_FORM_RENAME:
700 case SID_DB_APP_REPORT_DELETE:
701 case SID_DB_APP_REPORT_RENAME:
708 case SID_DB_APP_EDIT:
709 case SID_DB_APP_TABLE_EDIT:
710 case SID_DB_APP_QUERY_EDIT:
711 case SID_DB_APP_FORM_EDIT:
712 case SID_DB_APP_REPORT_EDIT:
716 case SID_DB_APP_EDIT_SQL_VIEW:
735 std::vector< OUString > aSelected;
737 bool bAlterableViews =
true;
738 for (
auto const& selectedName : aSelected)
741 if (!bAlterableViews)
752 case SID_DB_APP_OPEN:
753 case SID_DB_APP_TABLE_OPEN:
754 case SID_DB_APP_QUERY_OPEN:
755 case SID_DB_APP_FORM_OPEN:
756 case SID_DB_APP_REPORT_OPEN:
759 case SID_DB_APP_DSUSERADMIN:
762 case SID_DB_APP_DSRELDESIGN:
765 case SID_DB_APP_TABLEFILTER:
768 case SID_DB_APP_REFRESH_TABLES:
771 case SID_DB_APP_DSPROPS:
774 case SID_DB_APP_DSCONNECTION_TYPE:
777 case SID_DB_APP_DSADVANCED_SETTINGS:
780 case SID_DB_APP_CONVERTTOVIEW:
793 case SID_DB_APP_DISABLE_PREVIEW:
797 case SID_DB_APP_VIEW_DOCINFO_PREVIEW:
804 case SID_DB_APP_VIEW_DOC_PREVIEW:
811 case SID_MAIL_SENDDOC:
814 case SID_DB_APP_SENDREPORTASMAIL:
820 case SID_DB_APP_SENDREPORTTOWRITER:
821 case SID_DB_APP_DBADMIN:
824 case SID_DB_APP_STATUS_TYPE:
830 OUString sDSTypeName;
833 sDSTypeName =
DBA_RES(RID_STR_EMBEDDED_DATABASE);
839 aReturn.
sTitle = sDSTypeName;
842 case SID_DB_APP_STATUS_DBNAME:
848 OUString sDatabaseName;
850 sal_Int32 nPortNumber( -1 );
854 if ( sDatabaseName.isEmpty() )
859 if ( !sDatabaseName.isEmpty() )
867 if ( sDatabaseName.isEmpty() )
870 aReturn.
sTitle = sDatabaseName;
873 case SID_DB_APP_STATUS_USERNAME:
878 case SID_DB_APP_STATUS_HOSTNAME:
885 OUString sHostName, sDatabaseName;
886 sal_Int32 nPortNumber = -1;
888 aReturn.
sTitle = sHostName;
904 bool lcl_handleException_nothrow(
const Reference< XModel >& _rxDocument,
const Any& _rException )
906 bool bHandled =
false;
912 rtl::Reference pRequest( new ::comphelper::OInteractionRequest( _rException ) );
914 pRequest->addContinuation( pApprove );
918 xHandler->handle( pRequest );
920 catch(
const Exception& )
925 bHandled = pApprove->wasSelected();
934 ::osl::MutexGuard aGuard(
getMutex() );
956 pTransfer->CopyToClipboard(
getView());
969 std::vector< OUString > aList;
971 if ( !aList.empty() )
981 if ( rTransferData.
HasFormat(SotClipboardFormatId::DBACCESS_QUERY) )
982 paste(
E_QUERY, ODataAccessObjectTransferable::extractObjectDescriptor( rTransferData ) );
986 std::vector< OUString> aList;
988 OUString sFolderNameToInsertInto;
989 if ( !aList.empty() )
993 && xContainer->hasByHierarchicalName(*aList.begin())
994 && (xContainer->getByHierarchicalName(*aList.begin()) >>= xContainer)
997 sFolderNameToInsertInto = *aList.begin();
999 paste(
eType, OComponentTransferable::extractComponentDescriptor( rTransferData ),
1000 sFolderNameToInsertInto );
1006 case SID_DB_APP_PASTE_SPECIAL:
1008 if ( !aArgs.hasElements() )
1012 std::vector<SotClipboardFormatId> aFormatIds;
1014 for (
auto const& formatId : aFormatIds)
1015 pDlg->Insert(formatId,
"");
1022 const PropertyValue* pIter = aArgs.getConstArray();
1023 const PropertyValue* pEnd = pIter + aArgs.getLength();
1024 for( ; pIter != pEnd ; ++pIter)
1026 if ( pIter->Name ==
"FormatStringId" )
1029 if ( pIter->Value >>= nTmp )
1037 case SID_NEWDOCDIRECT:
1045 if ( _nId == SID_NEWDOCDIRECT )
1047 aURL.Complete =
"private:factory/sdatabase?Interactive";
1048 aTarget =
"_default";
1051 aURL.Complete =
".uno:Open";
1070 lcl_handleException_nothrow(
m_xModel, ::cppu::getCaughtException() );
1082 ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
1085 if (!sUrl.isEmpty())
1091 aFileDlg.
AddFilter(pFilter->GetUIName(),pFilter->GetDefaultExtension());
1106 lcl_handleException_nothrow(
m_xModel, ::cppu::getCaughtException() );
1135 case SID_DB_FORM_NEW_PILOT:
1136 case SID_REPORT_CREATE_REPWIZ_PRE_SEL:
1137 case SID_APP_NEW_REPORT_PRE_SEL:
1138 case SID_FORM_CREATE_REPWIZ_PRE_SEL:
1140 case SID_APP_NEW_FORM:
1141 case SID_APP_NEW_REPORT:
1147 bool bAutoPilot =
false;
1152 case SID_DB_FORM_NEW_PILOT:
1153 case SID_FORM_CREATE_REPWIZ_PRE_SEL:
1156 case SID_APP_NEW_FORM:
1160 case SID_REPORT_CREATE_REPWIZ_PRE_SEL:
1163 case SID_APP_NEW_REPORT:
1164 case SID_APP_NEW_REPORT_PRE_SEL:
1183 OSL_FAIL(
"illegal switch call!");
1194 case SID_APP_NEW_FOLDER:
1202 case SID_DB_NEW_VIEW_SQL:
1205 if ( xConnection.
is() )
1218 case SID_DB_APP_DELETE:
1219 case SID_DB_APP_TABLE_DELETE:
1220 case SID_DB_APP_QUERY_DELETE:
1221 case SID_DB_APP_FORM_DELETE:
1222 case SID_DB_APP_REPORT_DELETE:
1225 case SID_DB_APP_RENAME:
1226 case SID_DB_APP_TABLE_RENAME:
1227 case SID_DB_APP_QUERY_RENAME:
1228 case SID_DB_APP_FORM_RENAME:
1229 case SID_DB_APP_REPORT_RENAME:
1232 case SID_DB_APP_EDIT:
1233 case SID_DB_APP_EDIT_SQL_VIEW:
1234 case SID_DB_APP_TABLE_EDIT:
1235 case SID_DB_APP_QUERY_EDIT:
1236 case SID_DB_APP_FORM_EDIT:
1237 case SID_DB_APP_REPORT_EDIT:
1240 case SID_DB_APP_OPEN:
1241 case SID_DB_APP_TABLE_OPEN:
1242 case SID_DB_APP_QUERY_OPEN:
1243 case SID_DB_APP_FORM_OPEN:
1244 case SID_DB_APP_REPORT_OPEN:
1247 case SID_DB_APP_CONVERTTOVIEW:
1254 case SID_DB_APP_DSRELDESIGN:
1260 if ( xConnection.
is() )
1271 case SID_DB_APP_DSUSERADMIN:
1274 if ( xConnection.
is() )
1275 openDialog(
"com.sun.star.sdb.UserAdministrationDialog");
1278 case SID_DB_APP_TABLEFILTER:
1280 openDialog(
"com.sun.star.sdb.TableFilterDialog" );
1283 case SID_DB_APP_REFRESH_TABLES:
1286 case SID_DB_APP_DSPROPS:
1288 openDialog(
"com.sun.star.sdb.DatasourceAdministrationDialog" );
1291 case SID_DB_APP_DSADVANCED_SETTINGS:
1292 openDialog(
"com.sun.star.sdb.AdvancedDatabaseSettingsDialog");
1295 case SID_DB_APP_DSCONNECTION_TYPE:
1296 openDialog(
"com.sun.star.sdb.DataSourceTypeChangeDialog");
1302 if ( xConnection.
is() )
1307 case SID_DB_APP_VIEW_TABLES:
1310 case SID_DB_APP_VIEW_QUERIES:
1313 case SID_DB_APP_VIEW_FORMS:
1316 case SID_DB_APP_VIEW_REPORTS:
1319 case SID_DB_APP_DISABLE_PREVIEW:
1323 case SID_DB_APP_VIEW_DOCINFO_PREVIEW:
1327 case SID_DB_APP_VIEW_DOC_PREVIEW:
1331 case SID_MAIL_SENDDOC:
1338 case SID_DB_APP_SENDREPORTASMAIL:
1359 CommandGroup::DOCUMENT );
1361 CommandGroup::DOCUMENT );
1366 SID_FORM_CREATE_REPWIZ_PRE_SEL,
1367 CommandGroup::APPLICATION );
1373 SID_REPORT_CREATE_REPWIZ_PRE_SEL,
1374 CommandGroup::APPLICATION );
1378 CommandGroup::INSERT );
1381 CommandGroup::INSERT );
1422 CommandGroup::EDIT );
1424 SID_DB_APP_DSADVANCED_SETTINGS,
1425 CommandGroup::EDIT );
1436 SID_DB_APP_VIEW_DOCINFO_PREVIEW,
1437 CommandGroup::VIEW );
1439 CommandGroup::VIEW );
1445 SID_APP_NEW_REPORT_PRE_SEL );
1466 ::osl::MutexGuard aGuard(
getMutex() );
1477 _rEvent.Accessor >>=
sName;
1489 if ( xSubContainer.is() )
1502 ::osl::MutexGuard aGuard(
getMutex() );
1510 _rEvent.Accessor >>=
sName;
1521 if ( xContent.is() )
1523 sName = xContent->getIdentifier()->getContentIdentifier() +
"/" +
sName;
1536 ::osl::MutexGuard aGuard(
getMutex() );
1546 _rEvent.Accessor >>=
sName;
1558 (void) ::dbaui::composeTableName(
m_xMetaData, xProp, ::dbtools::EComposeRule::InDataManipulation,
false );
1565 if ( xContent.is() )
1567 sName = xContent->getIdentifier()->getContentIdentifier() +
"/" +
sName;
1584 OUString lcl_getToolBarResource(
ElementType _eType)
1590 sToolbar =
"private:resource/toolbar/tableobjectbar";
1593 sToolbar =
"private:resource/toolbar/queryobjectbar";
1596 sToolbar =
"private:resource/toolbar/formobjectbar";
1599 sToolbar =
"private:resource/toolbar/reportobjectbar";
1604 OSL_FAIL(
"Invalid ElementType!");
1647 if ( xLayoutManager.is() )
1649 OUString sToolbar = lcl_getToolBarResource(_eType);
1650 OUString sDestroyToolbar = lcl_getToolBarResource(
m_eCurrentType);
1652 xLayoutManager->lock();
1653 xLayoutManager->destroyElement( sDestroyToolbar );
1654 if ( !sToolbar.isEmpty() )
1656 xLayoutManager->createElement( sToolbar );
1657 xLayoutManager->requestElement( sToolbar );
1659 xLayoutManager->unlock();
1660 xLayoutManager->doLayout();
1670 SelectionByElementType::const_iterator pendingSelection =
m_aPendingSelection.find( _eType );
1691 std::unique_ptr<weld::TreeIter> xHdlEntry = rTreeView.
make_iterator();
1695 if (!pContainer->
isLeaf(rTreeView, *xHdlEntry))
1721 bool bIsAlterableView(
false );
1726 if ( xViewsSupp.is() )
1727 xViews = xViewsSupp->getViews();
1730 if ( xViews.is() && xViews->hasByName( _rTableOrViewName ) )
1731 xAsAlterableView.set( xViews->getByName( _rTableOrViewName ), UNO_QUERY );
1733 bIsAlterableView = xAsAlterableView.is();
1739 return bIsAlterableView;
1743 ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand, const ::comphelper::NamedValueCollection& _rAdditionalArguments )
1745 OSL_PRECOND(
getContainer(),
"OApplicationController::openElementWithArguments: no view!" );
1756 bool isStandaloneDocument =
false;
1764 isStandaloneDocument =
true;
1769 if ( isStandaloneDocument || !
m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode, xRet ) )
1772 if ( !
aHelper->isConnected() )
1776 xRet =
aHelper->open( _sName, xDefinition, _eOpenMode, _rAdditionalArguments );
1778 if ( !isStandaloneDocument )
1790 if ( !xConnection.
is() )
1793 std::unique_ptr< DatabaseObjectView > pDesigner;
1799 bool bAddViewTypeArg =
false;
1806 bAddViewTypeArg =
true;
1816 bAddViewTypeArg =
true;
1820 if ( bAddViewTypeArg )
1822 const bool bQueryGraphicalMode =( _nInstigatorCommand != SID_DB_APP_EDIT_SQL_VIEW );
1837 xRet.set( pDesigner->openExisting( aDataSource, _sName,
aArguments ) );
1844 OSL_FAIL(
"OApplicationController::openElement: illegal object type!" );
1854 getContainer()->selectContainer(
eType);
1860 newElementWithPilot(
eType );
1868 OSL_ENSURE(
getContainer(),
"OApplicationController::newElementWithPilot: without a view?" );
1878 sal_Int32 nCommandType = -1;
1881 aHelper->newReportWithPilot( nCommandType, sCurrentSelected );
1883 aHelper->newFormWithPilot( nCommandType, sCurrentSelected );
1914 o_rDocumentDefinition.clear();
1922 if ( !
aHelper->isConnected() )
1932 std::unique_ptr< DatabaseObjectView > pDesigner;
1934 if ( !xConnection.
is() )
1947 xComponent = pDesigner->createNew( xDataSource, i_rAdditionalArguments );
1952 OSL_FAIL(
"OApplicationController::newElement: illegal type!" );
1956 if ( xComponent.is() )
1973 xCont->addContainerListener(
this);
1987 ::osl::MutexGuard aGuard(
getMutex() );
1990 std::vector< OUString> aList;
1994 OSL_ENSURE(aList.size() == 1,
"Invalid rename call here. More than one element!");
1995 if ( aList.empty() )
2000 if ( xContainer.is() )
2002 std::unique_ptr< IObjectNameCheck > pNameChecker;
2003 std::unique_ptr<OSaveAsDlg> xDialog;
2017 sLabel =
DBA_RES(STR_FRM_LABEL);
2019 sLabel =
DBA_RES(STR_RPT_LABEL);
2021 OUString
sName = *aList.begin();
2022 if ( xHNames->hasByHierarchicalName(
sName) )
2024 xRename.set(xHNames->getByHierarchicalName(
sName),UNO_QUERY);
2048 if ( xContainer->hasByName(*aList.begin()) )
2050 xRename.set(xContainer->getByName(*aList.begin()),UNO_QUERY);
2063 if (xRename.is() && xDialog)
2066 bool bTryAgain =
true;
2069 if (xDialog->run() ==
RET_OK)
2076 OUString
sName = xDialog->getName();
2077 OUString
sCatalog = xDialog->getCatalog();
2078 OUString
sSchema = xDialog->getSchema();
2083 sNewName = xDialog->getName();
2085 OUString sOldName = *aList.begin();
2089 if ( xContent.is() )
2091 sOldName = xContent->getIdentifier()->getContentIdentifier();
2095 xRename->rename(sNewName);
2100 sNewName = ::dbaui::composeTableName(
m_xMetaData, xProp, ::dbtools::EComposeRule::InDataManipulation,
false );
2106 catch(
const SQLException& )
2111 catch(
const ElementExistException& e)
2113 OUString sMsg(
DBA_RES(STR_NAME_ALREADY_EXISTS));
2180 if ( xConnection.
is() )
2186 OSL_FAIL(
"OApplicationController::showPreviewFor: unexpected element type!" );
2190 catch(
const SQLException& )
2202 OnInvalidateClipboard();
2230 nId = SID_DB_APP_TABLE_DELETE;
2233 nId = SID_DB_APP_QUERY_DELETE;
2236 nId = SID_DB_APP_FORM_DELETE;
2239 nId = SID_DB_APP_REPORT_DELETE;
2242 OSL_FAIL(
"Invalid ElementType!");
2267 return Any( aSelection );
2287 bool bSuccess =
false;
2347 if ( !
sName.isEmpty() )
2350 if ( xContainer.is() && xContainer->hasByHierarchicalName(
sName) )
2353 if ( xHitObject.is() )
2368 OSL_FAIL(
"OApplicationController::executeDrop: what the hell did queryDrop do?");
2390 if ( ODataAccessObjectTransferable::canExtractObjectDescriptor(aDroppedData.
GetDataFlavorExVector()) )
2408 if ( xContent.is() )
2410 OUString
sName = xContent->getIdentifier()->getContentIdentifier();
2423 xNameAccess.set(xContainer->getByHierarchicalName(
m_aAsyncDrop.
aUrl),UNO_QUERY);
2425 if ( xNameAccess.is() )
2431 if ( xNameAccess.is() && xNameAccess->hasByName(
sName) )
2432 nAction &= ~DND_ACTION_MOVE;
2435 nAction &= ~DND_ACTION_MOVE;
2469 sal_Int32 nConnectedControllers( 0 );
2474 while ( xEnumControllers->hasMoreElements() )
2477 ++nConnectedControllers;
2485 if ( nConnectedControllers > 1 )
2497 OSL_FAIL(
"OApplicationController::OnFirstControllerConnected: too late!" );
2503 if ( xDocumentScripts.is() )
2523 SQLWarning aWarning;
2524 aWarning.Message =
DBA_RES(STR_SUB_DOCS_WITH_SCRIPTS);
2525 SQLException aDetail;
2526 aDetail.Message =
DBA_RES(STR_SUB_DOCS_WITH_SCRIPTS_DETAIL);
2527 aWarning.NextException <<= aDetail;
2541 ::osl::MutexGuard aGuard(
getMutex() );
2550 ::osl::MutexGuard aGuard(
getMutex() );
2553 if ( ( !xOfficeDoc.is() || !xDocModify.is() ) && _rxModel.is() )
2555 OSL_FAIL(
"OApplicationController::attachModel: invalid model!" );
2561 OSL_ENSURE(
false,
"OApplicationController::attachModel: missing implementation: setting a new model while we have another one!" );
2566 const OUString aPropertyNames[] =
2576 for (
const auto & aPropertyName : aPropertyNames)
2578 m_xDataSource->removePropertyChangeListener( aPropertyName,
this );
2583 if ( xBroadcaster.is() )
2584 xBroadcaster->removeModifyListener(
this );
2599 for (
const auto & aPropertyName : aPropertyNames)
2601 m_xDataSource->addPropertyChangeListener( aPropertyName,
this );
2606 xBroadcaster->addModifyListener(
this );
2642 if ( _xContainer.is() )
2645 _xContainer->addContainerListener(
this);
2660 if ( _rnCommandType != -1 )
2665 OSL_ENSURE( !
sName.isEmpty(),
"OApplicationController::getCurrentlySelectedName: no name given!" );
2688 ::osl::MutexGuard aGuard(
getMutex() );
2690 if ( !_aSelection.hasValue() || !
getView() )
2698 if ( (_aSelection >>= aCurrentSelection) && aCurrentSelection.hasElements() )
2701 const NamedValue* pIter = aCurrentSelection.getConstArray();
2702 const NamedValue* pEnd = pIter + aCurrentSelection.getLength();
2703 for(;pIter != pEnd;++pIter)
2705 if ( pIter->Name ==
"Type" )
2707 sal_Int32
nType = 0;
2708 pIter->Value >>=
nType;
2710 throw IllegalArgumentException();
2713 else if ( pIter->Name ==
"Selection" )
2714 pIter->Value >>= aSelection;
2725 if ( !( _aSelection >>= aSelectedObjects ) )
2727 aSelectedObjects.realloc( 1 );
2728 if ( !( _aSelection >>= aSelectedObjects.getArray()[0] ) )
2729 throw IllegalArgumentException();
2734 for (
const NamedDatabaseObject*
pObject = aSelectedObjects.getConstArray();
2735 pObject != aSelectedObjects.getConstArray() + aSelectedObjects.getLength();
2742 case DatabaseObjectContainer::SCHEMA:
2743 case DatabaseObjectContainer::CATALOG:
2749 case DatabaseObject::FORM:
2750 case DatabaseObjectContainer::FORMS_FOLDER:
2754 case DatabaseObjectContainer::REPORTS_FOLDER:
2757 case DatabaseObjectContainer::TABLES:
2758 case DatabaseObjectContainer::QUERIES:
2759 case DatabaseObjectContainer::FORMS:
2760 case DatabaseObjectContainer::REPORTS:
2761 if ( eSelectedCategory !=
E_NONE )
2762 throw IllegalArgumentException(
2764 *
this, sal_Int16(
pObject - aSelectedObjects.getConstArray() ) );
2767 : (
pObject->Type == DatabaseObjectContainer::QUERIES ) ?
E_QUERY
2768 : (
pObject->Type == DatabaseObjectContainer::FORMS ) ?
E_FORM
2774 case DatabaseObjectContainer::DATA_SOURCE:
2777 DBA_RES(RID_STR_UNSUPPORTED_OBJECT_TYPE).
2778 replaceFirst(
"$type$", OUString::number(
pObject->Type)));
2779 throw IllegalArgumentException(
sMessage, *
this, sal_Int16(
pObject - aSelectedObjects.getConstArray() ));
2783 for (
auto const& selectedElement : aSelectedElements)
2804 ::osl::MutexGuard aGuard(
getMutex() );
2811 if ( !aCurrentSelection.hasElements() )
2814 aCurrentSelection.realloc(1);
2815 auto pCurrentSelection = aCurrentSelection.getArray();
2819 case E_TABLE: pCurrentSelection[0].Type = DatabaseObjectContainer::TABLES;
break;
2820 case E_QUERY: pCurrentSelection[0].Type = DatabaseObjectContainer::QUERIES;
break;
2821 case E_FORM: pCurrentSelection[0].Type = DatabaseObjectContainer::FORMS;
break;
2822 case E_REPORT: pCurrentSelection[0].Type = DatabaseObjectContainer::REPORTS;
break;
2824 OSL_FAIL(
"OApplicationController::getSelection: unexpected current element type!" );
2829 return Any( aCurrentSelection );
SelectionNotifier & m_rNotifier
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * org_openoffice_comp_dbu_OApplicationController_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
SFX2_DLLPUBLIC short ExecuteQuerySaveDocument(weld::Widget *_pParent, std::u16string_view _rTitle)
#define ID_NEW_TABLE_DESIGN
#define ID_NEW_VIEW_DESIGN_AUTO_PILOT
#define ID_BROWSER_SAVEDOC
#define ID_NEW_TABLE_DESIGN_AUTO_PILOT
#define ID_BROWSER_SORTDOWN
#define ID_APP_NEW_QUERY_AUTO_PILOT
#define ID_NEW_VIEW_DESIGN
#define ID_BROWSER_SORTUP
#define ID_BROWSER_SAVEASDOC
#define ID_DOCUMENT_CREATE_REPWIZ
#define ID_REPORT_NEW_TEXT
#define ID_NEW_QUERY_DESIGN
static void AddToRecentDocumentList(const OUString &rFileUrl, const OUString &rMimeType, const OUString &rDocumentService)
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
SendMailResult AttachDocument(const css::uno::Reference< css::uno::XInterface > &xFrameOrModel, const OUString &sAttachmentTitle)
SendMailResult Send(const css::uno::Reference< css::frame::XFrame > &xFrame)
bool IsModuleInstalled(EModule eModule) const
OUString SubstituteVariable(const OUString &rVar) const
static SvxAbstractDialogFactory * Create()
bool StartClipboardListening()
const DataFlavorExVector & GetDataFlavorExVector() const
static TransferableDataHelper CreateFromSystemClipboard(vcl::Window *pWindow)
bool HasFormat(SotClipboardFormatId nFormat) const
const css::uno::Reference< css::datatransfer::XTransferable > & GetTransferable() const
bool put(const OUString &_rValueName, const VALUE_TYPE &_rValue)
VALUE_TYPE getOrDefault(const OUString &_rValueName, const VALUE_TYPE &_rDefault) const
sal_Int32 addInterface(const css::uno::Reference< ListenerT > &rxIFace)
void disposeAndClear(const css::lang::EventObject &rEvt)
sal_Int32 removeInterface(const css::uno::Reference< ListenerT > &rxIFace)
void notifyEach(void(SAL_CALL ListenerT::*NotificationMethod)(const EventT &), const EventT &Event)
OUString getType(std::u16string_view _sURL) const
OUString cutPrefix(std::u16string_view _sURL) const
on a given string, cut the type prefix and return the result
static bool isShowPropertiesEnabled(const OUString &_sURL)
bool isFileSystemBased(std::u16string_view _sURL) const
check if the given data source type is based on the file system - i.e. the URL is a prefix plus a fil...
static bool isEmbeddedDatabase(std::u16string_view _sURL)
checks if the given data source type embeds its data into the database document
OUString getTypeDisplayName(std::u16string_view _sURL) const
get the datasource type display name from a DSN string
void extractHostNamePort(const OUString &_rDsn, OUString &_sDatabaseName, OUString &_rHostname, sal_Int32 &_nPortNumber) const
static bool doesHaveAnyAdvancedSettings(const OUString &_sURL)
determines whether or not the given data source type has any advanced setting
const css::uno::Reference< css::frame::XFrame > & getFrame() const
css::uno::Reference< css::lang::XComponent > createNew(const css::uno::Reference< css::sdbc::XDataSource > &_xDataSource, const ::comphelper::NamedValueCollection &i_rDispatchArgs=::comphelper::NamedValueCollection())
opens a view for a to-be-created object
class implementing the IObjectNameCheck interface, and checking a given name for being valid as eithe...
class implementing the IObjectNameCheck interface, and checking given object names against a hierarch...
PreviewMode m_ePreviewMode
virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL removeSelectionChangeListener(const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
ImplSVEvent * m_nAsyncDrop
virtual bool requestDrag(const weld::TreeIter &rEntry) override
handler for StartDrag requests
void onDeleteEntry()
called when a "Delete" command is executed in a tree view
void addContainerListener(const css::uno::Reference< css::container::XNameAccess > &_xCollection)
adds a listener to the current name access.
const TransferableDataHelper & getViewClipboard() const
returns the system clipboard.
bool isRenameDeleteAllowed(ElementType _eType, bool _bDelete) const
checks if delete command or rename command is allowed
virtual void SAL_CALL addSelectionChangeListener(const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
virtual ~OApplicationController() override
bool insertHierarchyElement(ElementType _eType, const OUString &_sParentFolder, bool _bCollection=true, const css::uno::Reference< css::ucb::XContent > &_xContent=css::uno::Reference< css::ucb::XContent >(), bool _bMove=false)
Inserts a new object into the hierarchy given be the type.
void pasteFormat(SotClipboardFormatId _nFormatId)
pastes a special format from the system clipboard to the currently selected object types
std::map< ElementType, std::vector< OUString > > SelectionByElementType
OApplicationController(const css::uno::Reference< css::uno::XComponentContext > &_rxORB)
virtual void SAL_CALL attachFrame(const css::uno::Reference< css::frame::XFrame > &xFrame) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
static void getSupportedFormats(ElementType _eType, std::vector< SotClipboardFormatId > &_rFormatIds)
fills the vector with all supported formats
void openDialog(const OUString &_sServiceName)
opens a uno dialog with the currently selected data source as initialize argument
static ElementType getElementType(const css::uno::Reference< css::container::XContainer > &_xContainer)
return the element type for given container
virtual sal_Bool SAL_CALL closeSubComponents() override
virtual void SAL_CALL elementInserted(const css::container::ContainerEvent &Event) override
void refreshTables()
refreshes the tables
void renameEntry()
renames the selected entry in the detail page
void OnInvalidateClipboard()
void askToReconnect()
when the settings of the data source changed, it opens a dialog which ask to close all depending docu...
virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent &Event) override
std::unique_ptr< SelectionNotifier > m_pSelectionNotifier
virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent &Event) override
virtual ::comphelper::OInterfaceContainerHelper2 * getContextMenuInterceptors() override
returns the container of registered context menu interceptors, or NULL if the implementation does not...
OTableCopyHelper::DropDescriptor m_aAsyncDrop
void OnFirstControllerConnected()
virtual css::uno::Any SAL_CALL getSelection() override
bool isConnectionReadOnly() const
checks if the connection for the selected data source is read only.
css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData
void newElementWithPilot(ElementType _eType)
creates a new database object, using an auto pilot
virtual OUString getContextMenuResourceName() const override
returns the context menu resource name for the control
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
virtual bool isDataSourceReadOnly() const override
checks if the selected data source is read only
SelectionByElementType m_aPendingSelection
virtual sal_Int8 queryDrop(const AcceptDropEvent &_rEvt, const DataFlavorExVector &_rFlavors) override
check whether or not a drop request should be accepted
virtual sal_Int8 executeDrop(const ExecuteDropEvent &_rEvt) override
execute a drop request
css::uno::Reference< css::lang::XComponent > newElement(ElementType _eType, const ::comphelper::NamedValueCollection &i_rAdditionalArguments, css::uno::Reference< css::lang::XComponent > &o_rDocumentDefinition)
opens a new frame for creation or auto pilot
OTableCopyHelper m_aTableCopyHelper
void showPreviewFor(const ElementType _eType, const OUString &_sName)
shows the preview for the given entry
bool copySQLObject(ODataClipboard &rExchange)
fills rExchange with current object if it's a Table or Query
void disconnect()
disconnects from our XConnection, and cleans up this connection
virtual css::uno::Any getCurrentSelection(weld::TreeView &rControl) const override
returns the current selection in the given control
virtual bool Construct(vcl::Window *pParent) override
virtual void SAL_CALL disposing() override
bool onContainerSelect(ElementType _eType)
called when a container (category) in the application view has been selected
virtual sal_Bool SAL_CALL isConnected() override
void onDocumentOpened(const OUString &_rName, const sal_Int32 _nType, const ElementOpenMode _eMode, const css::uno::Reference< css::lang::XComponent > &_xDocument, const css::uno::Reference< css::lang::XComponent > &_xDefinition)
remember a newly opened sub document for later access
void onSelectionChanged()
called when an entry in a tree view has been selected
const SharedConnection & ensureConnection(::dbtools::SQLExceptionInfo *_pErrorInfo=nullptr)
retrieves the current connection, creates it if necessary
bool paste(ElementType _eType, const svx::ODataAccessDescriptor &_rPasteData, const OUString &_sParentFolder=OUString(), bool _bMove=false)
pastes a query, form or report into the data source
rtl::Reference< TransferableHelper > copyObject()
copies the current object into clipboard
virtual css::uno::Reference< css::frame::XModel > SAL_CALL getModel() override
virtual vcl::Window * getMenuParent() const override
virtual bool requestQuickHelp(const void *pUserData, OUString &rText) const override
requests a quick help text to display
ElementType m_eCurrentType
rtl::Reference< TransferableClipboardListener > m_pClipboardNotifier
void deleteEntries()
deletes the entries selected.
void containerFound(const css::uno::Reference< css::container::XContainer > &_xContainer)
called when an object container of any kind was found during enumerating tree view elements
const SharedConnection & getConnection() const
retrieves the current connection
css::uno::Reference< css::beans::XPropertySet > m_xDataSource
void getSelectionElementNames(std::vector< OUString > &_rNames) const
fills the list with the selected entries.
std::unique_ptr< OLinkedDocumentsAccess > getDocumentsAccess(ElementType _eType)
returns the document access for the specific type
OAsynchronousLink m_aSelectContainerEvent
css::uno::Reference< css::lang::XComponent > openElementWithArguments(const OUString &_sName, ElementType _eType, ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand, const ::comphelper::NamedValueCollection &_rAdditionalArguments)
opens a new sub frame with a table/query/form/report/view, passing additional arguments
::comphelper::OInterfaceContainerHelper2 m_aContextMenuInterceptors
virtual void Execute(sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
bool impl_isAlterableView_nothrow(const OUString &_rTableOrViewName) const
determines whether the given table name denotes a view which can be altered
virtual FeatureState GetState(sal_uInt16 nId) const override
TransferableDataHelper m_aSystemClipboard
void onPasteEntry()
called when a "Paste" command is executed in a tree view
void doAction(sal_uInt16 _nId, ElementOpenMode _eOpenMode)
all selected entries will be opened, or edited, or converted to a view
css::uno::Reference< css::frame::XModel > m_xModel
bool copyDocObject(svx::OComponentTransferable &rExchange)
fills rExchange with current object if it's a Form or Report
OUString getStrippedDatabaseName() const
returns the stripped database name.
OUString getDatabaseName() const
returns the database name
void onCopyEntry()
called when a "Copy" command is executed in a tree view
css::uno::Reference< css::container::XNameAccess > getElements(ElementType _eType)
returns the nameaccess
::rtl::Reference< SubComponentManager > m_pSubComponentManager
bool isTableFormat() const
returns <TRUE> if the clipboard supports a table format, otherwise <FALSE>.
virtual void describeSupportedFeatures() override
OApplicationView * getContainer() const
virtual sal_Bool SAL_CALL select(const css::uno::Any &xSelection) override
::dbaccess::ODsnTypeCollection m_aTypeCollection
void onAttachedFrame()
called we were attached to a frame
virtual sal_Bool SAL_CALL attachModel(const css::uno::Reference< css::frame::XModel > &xModel) override
bool onEntryDoubleClick(const weld::TreeView &rTree)
called when an entry in a tree list box has been double-clicked
OUString getCurrentlySelectedName(sal_Int32 &_rnCommandType) const
returns the currently selected table or query name.
SharedConnection m_xDataSourceConnection
virtual IController & getCommandController() override
returns the controller which is responsible for providing states of certain features,...
TContainerVector m_aCurrentContainers
void createPage(ElementType _eType, const css::uno::Reference< css::container::XNameAccess > &_xContainer)
creates the page for the specific type.
void createTablesPage(const css::uno::Reference< css::sdbc::XConnection > &_xConnection)
creates the tables page
TreeListBox * getTreeWindow() const
sal_Int32 getSelectionCount() const
returns the count of selected entries
OApplicationDetailView * getDetailView() const
get the detail page
bool isALeafSelected() const
returns if one of the selected entries is a leaf
bool isFilled() const
returns <TRUE> when a detail page was filled
std::unique_ptr< weld::TreeIter > elementAdded(ElementType eType, const OUString &rName, const css::uno::Any &rObject)
adds a new object to the detail page.
PreviewMode getPreviewMode() const
returns the preview mode
OUString getQualifiedName(const weld::TreeIter *_pEntry) const
return the qualified name.
void showPreview(const css::uno::Reference< css::ucb::XContent > &_xContent)
shows the Preview of the content when it is enabled.
void elementReplaced(ElementType eType, const OUString &_rOldName, const OUString &_rNewName)
replaces an objects name with a new one
void selectElements(const css::uno::Sequence< OUString > &_aNames)
select all names on the currently selected container.
void clearPages()
clears the detail page and the selection on the left side.
void selectAll()
select all entries in the detail page
void switchPreview(PreviewMode _eMode)
switches to the given preview mode
bool isSortUp() const
returns <TRUE> if it sorts ascending
void elementRemoved(ElementType _eType, const OUString &_rName)
removes an element from the detail page.
ElementType getElementType() const
return the element of currently select entry
void sortDown()
sort the entries in the detail page down
sal_Int32 getElementCount() const
returns the count of entries
void selectContainer(ElementType _eType)
changes the container which should be displayed.
vcl::Window * getMenuParent() const
get the menu parent window for the given control
void describeCurrentSelectionForType(const ElementType _eType, css::uno::Sequence< css::sdb::application::NamedDatabaseObject > &_out_rSelectedObjects)
describes the current selection for the given ElementType
void sortUp()
sort the entries in the detail page up
virtual void cut() override
void adjustMenuPosition(const weld::TreeView &rControl, ::Point &rPos) const
adjust rPos relative to rControl to instead relative to getMenuParent
void describeCurrentSelectionForControl(const weld::TreeView &rControl, css::uno::Sequence< css::sdb::application::NamedDatabaseObject > &_out_rSelectedObjects)
describes the current selection for the given control
std::unique_ptr< weld::TreeIter > getEntry(const Point &rPosPixel) const
virtual bool isCutAllowed() override
bool isLeaf(const weld::TreeView &rTreeView, const weld::TreeIter &rEntry) const
returns if an entry is a leaf
void Call(void *_pArgument=nullptr)
virtual void Construct()
late construction
weld::Window * getFrameWeld() const
virtual FeatureState GetState(sal_uInt16 nId) const
css::uno::Reference< css::util::XURLTransformer > m_xUrlTransformer
ControllerFrame m_aCurrentFrame
virtual void SAL_CALL attachFrame(const css::uno::Reference< css::frame::XFrame > &xFrame) override
virtual css::uno::Reference< css::frame::XFrame > SAL_CALL getFrame() override
void showError(const ::dbtools::SQLExceptionInfo &_rInfo)
void implDescribeSupportedFeature(const OUString &_rCommandURL, sal_uInt16 _nFeatureId, sal_Int16 _nCommandGroup=css::frame::CommandGroup::INTERNAL)
describes a feature supported by the controller
void setView(const VclPtr< ODataView > &i_rView)
ODataView * getView() const
virtual void SAL_CALL dispose() override
virtual void executeChecked(const css::util::URL &_rCommand, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
executes the given command only when it is allowed
void InvalidateFeature(sal_uInt16 nId, const css::uno::Reference< css::frame::XStatusListener > &xListener=nullptr, bool _bForceBroadcast=false)
virtual void Execute(sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs)
virtual bool Construct(vcl::Window *pParent)
::osl::Mutex & getMutex() const
bool m_bCurrentlyModified
virtual void SAL_CALL disposing() override
css::uno::Reference< css::uno::XComponentContext > m_xContext
void InvalidateAll()
InvalidateAll invalidates all features currently known.
static css::uno::Reference< css::frame::XLayoutManager > getLayoutManager(const css::uno::Reference< css::frame::XFrame > &_xFrame)
get the layout manager
virtual void describeSupportedFeatures()
const css::uno::Reference< css::uno::XComponentContext > & getORB() const
static bool isUserDefinedFeature(const sal_uInt16 nFeatureId)
determines whether the given feature ID denotes a user-defined feature
void pasteTable(const TransferableDataHelper &_rTransData, std::u16string_view _sDestDataSourceName, const SharedConnection &_xConnection)
pastes a table into the data source
bool copyTagTable(DropDescriptor const &_rDesc, bool _bCheck, const SharedConnection &_xConnection)
copies a table which was constructed by tags like HTML or RTF
void ResetTableNameForAppend()
void SetTableNameForAppend(const OUString &_rDefaultTableName)
void leaveSelection(SelectionGuardAccess)
leaves a block which modifies the selection of our owner
sal_Int32 m_nSelectionNestingLevel
void removeListener(const Reference< XSelectionChangeListener > &Listener)
const SelectionNotifier & operator=(const SelectionNotifier &)=delete
::comphelper::OInterfaceContainerHelper3< XSelectionChangeListener > m_aSelectionListeners
void addListener(const Reference< XSelectionChangeListener > &Listener)
SelectionNotifier(const SelectionNotifier &)=delete
::cppu::OWeakObject & m_rContext
SelectionNotifier(::osl::Mutex &_rMutex, ::cppu::OWeakObject &_rContext)
void enterSelection(SelectionGuardAccess)
enters a block which modifies the selection of our owner.
TransferDataContainer & GetDataTransfer()
void AddFilter(const OUString &rFilterName, const OUString &rExtension)
void SetDisplayDirectory(const OUString &rPath)
void SetCurrentFilter(const OUString &rFilter)
void SetContext(Context _eNewContext)
OUString get(NOTATION _eOutputNotation) const
ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
virtual std::unique_ptr< TreeIter > make_iterator(const TreeIter *pOrig=nullptr) const=0
virtual bool get_cursor(TreeIter *pIter) const=0
#define DBG_UNHANDLED_EXCEPTION(...)
EmbeddedObjectRef * pObject
::std::vector< DataFlavorEx > DataFlavorExVector
Sequence< PropertyValue > aArguments
#define LINK(Instance, Class, Member)
void AppendItem(EHistoryType eHistory, const OUString &sURL, const OUString &sFilter, const OUString &sTitle, const std::optional< OUString > &sThumbnail, ::std::optional< bool > const oIsReadOnly)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
IMPL_LINK_NOARG(OApplicationController, OnClipboardChanged, TransferableDataHelper *, void)
IMPL_LINK(OApplicationController, OnSelectContainer, void *, _pType, void)
std::shared_ptr< const SfxFilter > getStandardDatabaseFilter()
returns the standard database filter
::osl::Mutex & getMutex()
const PPTXLayoutInfo aLayoutInfo[LAYOUT_SIZE]
IMPLEMENT_FORWARD_XTYPEPROVIDER2(OStatement, OStatementBase, OStatement_IFACE)
IMPLEMENT_FORWARD_XINTERFACE2(OStatement, OStatementBase, OStatement_IFACE)
constexpr OUStringLiteral PROPERTY_TABLEFILTER(u"TableFilter")
constexpr OUStringLiteral PROPERTY_USER(u"User")
constexpr OUStringLiteral PROPERTY_URL(u"URL")
constexpr OUStringLiteral PROPERTY_INFO(u"Info")
constexpr OUStringLiteral SERVICE_SDB_DIRECTSQLDIALOG
constexpr OUStringLiteral SERVICE_SDB_APPLICATIONCONTROLLER
constexpr OUStringLiteral PROPERTY_TABLETYPEFILTER(u"TableTypeFilter")
constexpr OUStringLiteral PROPERTY_SUPPRESSVERSIONCL(u"SuppressVersionColumns")
constexpr OUStringLiteral PROPERTY_NAME(u"Name")
constexpr OUStringLiteral PROPERTY_LAYOUTINFORMATION(u"LayoutInformation")
constexpr OUStringLiteral PROPERTY_SHOWMENU(u"ShowMenu")
constexpr OUStringLiteral PROPERTY_GRAPHICAL_DESIGN(u"GraphicalDesign")
constexpr OUStringLiteral PROPERTY_ISPASSWORDREQUIRED(u"IsPasswordRequired")
constexpr OUStringLiteral INFO_PREVIEW
const css::datatransfer::dnd::DropTargetDropEvent maDropEvent
describes the state of a feature
std::optional< bool > bChecked
std::optional< OUString > sTitle
svx::ODataAccessDescriptor aDroppedData
Functor object for class DataFlavorExVector::value_type returntype is bool.
Reference< XController > xController
the controller of the sub component. Must not be <NULL>
Reference< XFrame > xFrame
the frame which the component resides in. Must not be <NULL>
Reference< XModel > xModel
the model of the sub component. Might be <NULL>
#define DND_ACTION_COPYMOVE