25#include <osl/diagnose.h>
33#include <com/sun/star/frame/XUntitledNumbers.hpp>
34#include <com/sun/star/awt/Size.hpp>
35#include <com/sun/star/lang/DisposedException.hpp>
36#include <com/sun/star/lang/XMultiServiceFactory.hpp>
37#include <com/sun/star/beans/PropertyAttribute.hpp>
38#include <com/sun/star/frame/Desktop.hpp>
39#include <com/sun/star/frame/XModel.hpp>
40#include <com/sun/star/frame/XTitle.hpp>
41#include <com/sun/star/frame/XController.hpp>
42#include <com/sun/star/task/XJobExecutor.hpp>
43#include <com/sun/star/report/XReportDefinition.hpp>
44#include <com/sun/star/report/XReportEngine.hpp>
45#include <com/sun/star/ucb/OpenMode.hpp>
46#include <com/sun/star/embed/WrongStateException.hpp>
47#include <com/sun/star/embed/EmbeddedObjectCreator.hpp>
48#include <com/sun/star/embed/Aspects.hpp>
49#include <com/sun/star/embed/OOoEmbeddedObjectFactory.hpp>
51#include <com/sun/star/ucb/UnsupportedOpenModeException.hpp>
52#include <com/sun/star/embed/ElementModes.hpp>
53#include <com/sun/star/embed/XEmbedPersist.hpp>
54#include <com/sun/star/embed/EmbedStates.hpp>
55#include <com/sun/star/embed/EntryInitModes.hpp>
56#include <com/sun/star/ucb/MissingPropertiesException.hpp>
57#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
58#include <com/sun/star/util/CloseVetoException.hpp>
59#include <com/sun/star/frame/XModule.hpp>
60#include <com/sun/star/datatransfer/DataFlavor.hpp>
61#include <com/sun/star/datatransfer/XTransferable.hpp>
62#include <com/sun/star/container/XNameContainer.hpp>
63#include <com/sun/star/embed/XCommonEmbedPersist.hpp>
65#include <com/sun/star/sdb/ErrorCondition.hpp>
66#include <com/sun/star/sdb/XInteractionDocumentSave.hpp>
67#include <com/sun/star/task/InteractionHandler.hpp>
68#include <com/sun/star/sdb/DocumentSaveRequest.hpp>
69#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
70#include <com/sun/star/document/MacroExecMode.hpp>
71#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
72#include <com/sun/star/form/XFormsSupplier.hpp>
73#include <com/sun/star/form/XForm.hpp>
77#include <osl/mutex.hxx>
78#include <com/sun/star/view/XViewSettingsSupplier.hpp>
79#include <core_resource.hxx>
82#include <com/sun/star/task/XInteractionApprove.hpp>
83#include <com/sun/star/task/XInteractionDisapprove.hpp>
84#include <com/sun/star/frame/XLayoutManager.hpp>
89#include <com/sun/star/container/XContentEnumerationAccess.hpp>
90#include <com/sun/star/io/WrongFormatException.hpp>
91#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
92#include <com/sun/star/sdb/application/DatabaseObject.hpp>
93#include <com/sun/star/util/XModifiable2.hpp>
100using namespace beans;
103using namespace embed;
104using namespace frame;
105using namespace document;
109using namespace container;
110using namespace datatransfer;
113using namespace drawing;
114using namespace ::
osl;
116using namespace ::
cppu;
118using sdb::application::XDatabaseDocumentUI;
119namespace DatabaseObject = sdb::application::DatabaseObject;
121#define DEFAULT_WIDTH 10000
122#define DEFAULT_HEIGHT 7500
132 OUString lcl_determineContentType_nothrow(
const Reference< XStorage >& _rxContainerStorage,
133 const OUString& _rEntityName )
135 OUString sContentType;
139 _rxContainerStorage->openStorageElement( _rEntityName, ElementModes::READ ), UNO_QUERY_THROW );
140 OSL_VERIFY( xStorageProps->getPropertyValue(
INFO_MEDIATYPE ) >>= sContentType );
161 virtual void disposing(std::unique_lock<std::mutex>& rGuard)
override;
163 OEmbedObjectHolder(
const Reference< XEmbeddedObject >& _xBroadCaster,ODocumentDefinition* _pDefinition)
168 osl_atomic_increment( &m_refCount );
173 osl_atomic_decrement( &m_refCount );
176 virtual void SAL_CALL changingState(
const lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState )
override;
177 virtual void SAL_CALL stateChanged(
const lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState )
override;
178 virtual void SAL_CALL disposing(
const lang::EventObject& Source )
override;
183 void OEmbedObjectHolder::disposing(std::unique_lock<std::mutex>& )
191 void SAL_CALL OEmbedObjectHolder::changingState(
const lang::EventObject& , ::sal_Int32 , ::sal_Int32 )
195 void SAL_CALL OEmbedObjectHolder::stateChanged(
const lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState )
202 Reference<XEmbeddedObject> xEmbeddedObject(
aEvent.Source,UNO_QUERY);
203 if ( xEmbeddedObject.is() )
204 xEmbeddedObject->changeState(EmbedStates::LOADED);
210 void SAL_CALL OEmbedObjectHolder::disposing(
const lang::EventObject& )
223 virtual Reference< util::XCloseable > SAL_CALL
getComponent( )
override
225 return Reference< css::util::XCloseable >();
240 explicit LockModifiable(
const Reference< XInterface >& i_rModifiable )
243 OSL_ENSURE(
m_xModifiable.is(),
"LockModifiable::LockModifiable: invalid component!" );
271 typedef ::cppu::WeakImplHelper< css::lang::XEventListener
293 static void couple(
const Reference< XInterface >& _rxClient,
const Reference< XComponent >& _rxActor )
295 new LifetimeCoupler( _rxClient, _rxActor );
299 LifetimeCoupler(
const Reference< XInterface >& _rxClient,
const Reference< XComponent >& _rxActor )
302 OSL_ENSURE( _rxActor.is(),
"LifetimeCoupler::LifetimeCoupler: this will crash!" );
303 osl_atomic_increment( &m_refCount );
305 _rxActor->addEventListener(
this );
307 osl_atomic_decrement( &m_refCount );
308 OSL_ENSURE( m_refCount,
"LifetimeCoupler::LifetimeCoupler: the actor is not holding us by hard ref - this won't work!" );
311 virtual void SAL_CALL disposing(
const css::lang::EventObject& Source )
override;
317 void SAL_CALL LifetimeCoupler::disposing(
const css::lang::EventObject& )
325 class ODocumentSaveContinuation :
public OInteraction< XInteractionDocumentSave >
331 ODocumentSaveContinuation() { }
334 const OUString& getName()
const {
return m_sName; }
337 virtual void SAL_CALL setName(
const OUString& _sName,
const Reference<XContent>& _xParent)
override;
342 void SAL_CALL ODocumentSaveContinuation::setName(
const OUString& _sName,
const Reference<XContent>& _xParent)
349 const OUString& _rEntityName,
const Reference< XComponentContext >& _rContext,
350 Sequence< sal_Int8 >& _rClassId )
353 lcl_determineContentType_nothrow( _rxContainerStorage, _rEntityName ),
354 _rContext, _rClassId );
358 const Reference< XComponentContext >& _rContext, Sequence< sal_Int8 >& _rClassId )
364 sResult = aConfigHelper.GetDocServiceNameFromMediaType( _rMediaType );
366 if ( !_rClassId.hasElements() && !sResult.isEmpty() )
368 Reference< XNameAccess > xObjConfig = aConfigHelper.GetObjConfiguration();
369 if ( xObjConfig.is() )
371 const Sequence< OUString > aClassIDs = xObjConfig->getElementNames();
372 for ( OUString
const & classId : aClassIDs )
374 Reference< XNameAccess > xObjectProps;
375 OUString aEntryDocName;
377 if ( ( xObjConfig->getByName( classId ) >>= xObjectProps ) && xObjectProps.is()
378 && ( xObjectProps->getByName(
"ObjectDocumentServiceName") >>= aEntryDocName )
379 && aEntryDocName == sResult )
387#if OSL_DEBUG_LEVEL > 0
389 const Sequence< NamedValue > aProps( aConfigHelper.GetObjectPropsByMediaType( _rMediaType ) );
390 const ::comphelper::NamedValueCollection aMediaTypeProps( aProps );
391 const OUString sAlternativeResult = aMediaTypeProps.getOrDefault(
"ObjectDocumentServiceName", OUString() );
392 OSL_ENSURE( sAlternativeResult == sResult,
"ODocumentDefinition::GetDocumentServiceFromMediaType: failed, this approach is *not* equivalent (1)!" );
393 const Sequence< sal_Int8 > aAlternativeClassID = aMediaTypeProps.getOrDefault(
"ClassID", Sequence< sal_Int8 >() );
394 OSL_ENSURE( aAlternativeClassID == _rClassId,
"ODocumentDefinition::GetDocumentServiceFromMediaType: failed, this approach is *not* equivalent (2)!" );
397 catch (
const Exception& )
411 ,m_bOpenInDesign(false)
413 ,m_bRemoveListener(false)
419 const Reference< XConnection >& i_rConnection )
421 OSL_ENSURE( i_rClassID.hasElements(),
"ODocumentDefinition::initialLoad: illegal class ID!" );
422 if ( !i_rClassID.hasElements() )
430 if ( !OContentHelper::rBHelper.bInDispose && !OContentHelper::rBHelper.bDisposed )
468 Reference<util::XCloseable> xCloseable(
m_pImpl->m_pDataSource->getModel_noCreate(),UNO_QUERY);
469 if ( xCloseable.is() )
470 xCloseable->removeCloseListener(
this);
476 return css::uno::Sequence<sal_Int8>();
481 return ::comphelper::concatSequences(
482 OContentHelper::getTypes( ),
483 OPropertyStateContainer::getTypes( ),
507 OUString sPersistentPath;
508 if ( !
m_pImpl->m_aProps.sPersistentName.isEmpty() )
511 +
"/" +
m_pImpl->m_aProps.sPersistentName;
513 o_rValue <<= sPersistentPath;
522 Reference<XPropertySetInfo> xInfo( createPropertySetInfo(
getInfoHelper() ) );
534 Sequence< Property > aProps;
541 PropertyAttribute::READONLY } };
543 return new OPropertyArrayHelper( ::comphelper::concatSequences( aProps, aManualProps ) );
552 explicit OExecuteImpl(
bool& _rbSet) :
m_rbSet(_rbSet){
m_rbSet=
true; }
553 ~OExecuteImpl(){
m_rbSet =
false; }
556 bool lcl_extractOpenMode(
const Any& _rValue, sal_Int32& _out_rMode )
558 OpenCommandArgument aOpenCommand;
559 if ( _rValue >>= aOpenCommand )
560 _out_rMode = aOpenCommand.Mode;
563 OpenCommandArgument2 aOpenCommand2;
564 if ( _rValue >>= aOpenCommand2 )
565 _out_rMode = aOpenCommand2.Mode;
575 Reference< XDesktop2 > xDesktop = Desktop::create( _rxContext );
576 Reference< XFrames > xFrames( xDesktop->getFrames(), UNO_SET_THROW );
577 xFrames->remove( _rxFrame );
585 Reference< XController >
xController(
xModel.is() ?
xModel->getCurrentController() : Reference< XController >() );
596 Reference< XTopWindow > xTopWindow(
xFrame->getContainerWindow(), UNO_QUERY_THROW );
597 xTopWindow->toFront();
604 LifetimeCoupler::couple( *
this,
xFrame );
621 class PreserveVisualAreaSize
628 explicit PreserveVisualAreaSize(
const Reference< XModel >& _rxModel )
644 ~PreserveVisualAreaSize()
652 catch (
const Exception& )
663 class LayoutManagerLock
669 explicit LayoutManagerLock(
const Reference< XController >& _rxController )
671 OSL_ENSURE( _rxController.is(),
"LayoutManagerLock::LayoutManagerLock: this will crash!" );
672 Reference< XFrame >
xFrame( _rxController->getFrame() );
675 Reference< XPropertySet > xPropSet(
xFrame, UNO_QUERY_THROW );
677 xPropSet->getPropertyValue(
"LayoutManager" ),
696 catch(
const Exception& )
708 Reference< XViewSettingsSupplier > xSettingsSupplier( _rxController, UNO_QUERY_THROW );
709 Reference< XPropertySet > xViewSettings( xSettingsSupplier->getViewSettings(), UNO_SET_THROW );
712 LockModifiable aLockModify( _rxController->getModel() );
716 PreserveVisualAreaSize aPreserveVisAreaSize( _rxController->getModel() );
720 LayoutManagerLock aLockLayout( _rxController );
723 xViewSettings->setPropertyValue(
"ShowRulers",
Any(
true));
724 xViewSettings->setPropertyValue(
"ShowVertRuler",
Any(
true));
725 xViewSettings->setPropertyValue(
"ShowHoriRuler",
Any(
true));
726 xViewSettings->setPropertyValue(
"IsRasterVisible",
Any(
true));
727 xViewSettings->setPropertyValue(
"IsSnapToRaster",
Any(
true));
728 xViewSettings->setPropertyValue(
"ShowOnlineLayout",
Any(
true));
729 xViewSettings->setPropertyValue(
"RasterSubdivisionX",
Any(sal_Int32(5)));
730 xViewSettings->setPropertyValue(
"RasterSubdivisionY",
Any(sal_Int32(5)));
741 switch ( nCurrentState )
744 case EmbedStates::LOADED:
745 throw embed::WrongStateException( OUString(), *
this );
747 case EmbedStates::RUNNING:
758 case EmbedStates::ACTIVE:
761 Reference< XController > xEmbeddedController( xEmbeddedDoc->getCurrentController(), UNO_SET_THROW );
762 Reference< XFrame > xEmbeddedFrame( xEmbeddedController->getFrame(), UNO_SET_THROW );
763 Reference< XWindow > xEmbeddedWindow( xEmbeddedFrame->getContainerWindow(), UNO_SET_THROW );
764 xEmbeddedWindow->setVisible( i_bShow );
771 const Reference< XCommandEnvironment >& _rxEnvironment )
775 Reference< XConnection > xConnection;
776 sal_Int32 nOpenMode = OpenMode::DOCUMENT;
782 const ::comphelper::NamedValueCollection& aDBDocArgs(
m_pImpl->m_pDataSource->getMediaDescriptor() );
783 Reference< XInteractionHandler > xHandler( aDBDocArgs.getOrDefault(
"InteractionHandler", Reference< XInteractionHandler >() ) );
785 aDocumentArgs.
put(
"InteractionHandler", xHandler );
787 ::std::optional< sal_Int16 > aDocumentMacroMode;
789 if ( !lcl_extractOpenMode( _rOpenArgument, nOpenMode ) )
794 const PropertyValue* pIter =
aArguments.getConstArray();
795 const PropertyValue* pEnd = pIter +
aArguments.getLength();
796 for ( ;pIter != pEnd; ++pIter )
800 xConnection.set( pIter->Value, UNO_QUERY );
804 if ( lcl_extractOpenMode( pIter->Value, nOpenMode ) )
807 if ( pIter->Name ==
"MacroExecutionMode" )
809 sal_Int16 nMacroExecMode( !aDocumentMacroMode ? MacroExecMode::USE_CONFIG : *aDocumentMacroMode );
810 OSL_VERIFY( pIter->Value >>= nMacroExecMode );
811 aDocumentMacroMode = nMacroExecMode;
816 aDocumentArgs.
put( pIter->Name, pIter->Value );
821 bool bExecuteDBDocMacros =
m_pImpl->m_pDataSource->checkMacrosOnLoading();
832 if ( (
m_pImpl->m_pDataSource->getImposedMacroExecMode() == MacroExecMode::USE_CONFIG )
833 && bExecuteDBDocMacros
862 aDocumentMacroMode = MacroExecMode::USE_CONFIG;
866 if ( !aDocumentMacroMode )
870 aDocumentMacroMode = bExecuteDBDocMacros ? MacroExecMode::ALWAYS_EXECUTE_NO_WARN
871 : MacroExecMode::NEVER_EXECUTE;
873 aDocumentArgs.
put(
"MacroExecutionMode", *aDocumentMacroMode );
875 if ( ( nOpenMode == OpenMode::ALL )
876 || ( nOpenMode == OpenMode::FOLDERS )
877 || ( nOpenMode == OpenMode::DOCUMENTS )
878 || ( nOpenMode == OpenMode::DOCUMENT_SHARE_DENY_NONE )
879 || ( nOpenMode == OpenMode::DOCUMENT_SHARE_DENY_WRITE )
884 Any( UnsupportedOpenModeException(
887 sal_Int16( nOpenMode ) ) ),
890 OSL_FAIL(
"unreachable" );
893 OSL_ENSURE( !
m_pImpl->m_aProps.sPersistentName.isEmpty(),
894 "ODocumentDefinition::onCommandOpenSomething: no persistent name - cannot load!" );
895 if (
m_pImpl->m_aProps.sPersistentName.isEmpty() )
900 bool bOpenHidden = aDocumentArgs.
getOrDefault(
"Hidden",
false );
901 aDocumentArgs.
remove(
"Hidden" );
904 OSL_ENSURE(
m_xEmbeddedObject.is(),
"ODocumentDefinition::onCommandOpenSomething: what's this?" );
909 Reference< report::XReportDefinition > xReportDefinition(
xModel,UNO_QUERY);
911 Reference< XModule > xModule(
xModel, UNO_QUERY );
915 xModule->setIdentifier(
"com.sun.star.sdb.FormDesign" );
916 else if ( !xReportDefinition.is() )
917 xModule->setIdentifier(
"com.sun.star.text.TextDocument" );
922 bool bIsAliveNewStyleReport = ( !
m_bOpenInDesign && xReportDefinition.is() );
923 if ( bIsAliveNewStyleReport )
927 Reference< report::XReportEngine > xReportEngine(
m_aContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.comp.report.OReportEngineJFree",
m_aContext), UNO_QUERY_THROW );
929 xReportEngine->setReportDefinition(xReportDefinition);
932 return Any( xReportEngine->createDocumentModel() );
933 return Any( xReportEngine->createDocumentAlive(
nullptr ) );
936 if ( _bActivate && !bOpenHidden )
945 LifetimeCoupler::couple( *
this,
xModel );
958 bool bOpen =
aCommand.Name ==
"open";
959 bool bOpenInDesign =
aCommand.Name ==
"openDesign";
960 bool bOpenForMail =
aCommand.Name ==
"openForMail";
961 if ( bOpen || bOpenInDesign || bOpenForMail )
976 bool bActivateObject =
true;
979 OSL_FAIL(
"ODocumentDefinition::execute: 'openForMail' should not be used anymore - use the 'Hidden' parameter instead!" );
980 bActivateObject =
false;
987 bool bIsActive = ( nCurrentState == EmbedStates::ACTIVE );
993 bool bIsAliveNewStyleReport = ( xReportDefinition.is() && ( bOpen || bOpenForMail ) );
995 if ( !bIsAliveNewStyleReport )
1015 if ( aIni.getLength() != 2 )
1017 OSL_FAIL(
"Wrong argument type!" );
1019 Any( IllegalArgumentException(
1026 Reference< XStorage> xDest(aIni[0],UNO_QUERY);
1027 OUString sPersistentName;
1028 aIni[1] >>= sPersistentName;
1031 xStorage->copyElementTo(
m_pImpl->m_aProps.sPersistentName,xDest,sPersistentName);
1033 else if (
aCommand.Name ==
"preview" )
1037 else if (
aCommand.Name ==
"insert" )
1041 if ( !aIni.hasElements() )
1043 OSL_FAIL(
"Wrong argument count!" );
1045 Any( IllegalArgumentException(
1056 else if (
aCommand.Name ==
"getdocumentinfo"
1057 ||
aCommand.Name ==
"getDocumentInfo" )
1061 else if (
aCommand.Name ==
"delete" )
1066 if ( xStorage.is() )
1067 xStorage->removeElement(
m_pImpl->m_aProps.sPersistentName);
1072 else if (
aCommand.Name ==
"storeOwn"
1078 else if (
aCommand.Name ==
"shutdown"
1084 else if (
aCommand.Name ==
"show" )
1088 else if (
aCommand.Name ==
"hide" )
1102 void lcl_resetChildFormsToEmptyDataSource(
const Reference< XIndexAccess>& _rxFormsContainer )
1104 OSL_PRECOND( _rxFormsContainer.is(),
"lcl_resetChildFormsToEmptyDataSource: illegal call!" );
1105 sal_Int32
count = _rxFormsContainer->getCount();
1106 for ( sal_Int32 i = 0;
i <
count; ++
i )
1108 Reference< XForm > xForm( _rxFormsContainer->getByIndex( i ), UNO_QUERY );
1115 Reference< XPropertySet > xFormProps( xForm, UNO_QUERY_THROW );
1118 catch(
const Exception& )
1124 Reference< XIndexAccess > xContainer( xForm, UNO_QUERY );
1125 if ( xContainer.is() )
1126 lcl_resetChildFormsToEmptyDataSource( xContainer );
1130 void lcl_resetFormsToEmptyDataSource(
const Reference< XEmbeddedObject>& _rxEmbeddedObject )
1134 Reference< XDrawPageSupplier > xSuppPage( _rxEmbeddedObject->getComponent(), UNO_QUERY_THROW );
1139 Reference< XFormsSupplier > xSuppForms( xSuppPage->getDrawPage(), UNO_QUERY_THROW );
1140 Reference< XIndexAccess > xForms( xSuppForms->getForms(), UNO_QUERY_THROW );
1141 lcl_resetChildFormsToEmptyDataSource( xForms );
1143 catch(
const Exception& )
1153 osl::ClearableGuard< osl::Mutex > aGuard(
m_aMutex );
1158 OSL_FAIL(
"Content::onCommandInsert - property value missing!" );
1162 Any( MissingPropertiesException(
1173 if ( xStorage.is() )
1175 Reference< XEmbeddedObjectCreator> xEmbedFactory = EmbeddedObjectCreator::create(
m_aContext);
1176 Sequence<PropertyValue> aEmpty;
1179 m_xEmbeddedObject.set(xEmbedFactory->createInstanceInitFromMediaDescriptor( xStorage
1180 ,
m_pImpl->m_aProps.sPersistentName
1182 ,aEmpty),UNO_QUERY);
1188 if ( xPersist.is() )
1190 xPersist->storeOwn();
1220 DocumentSaveRequest aRequest;
1221 aRequest.Name =
m_pImpl->m_aProps.aTitle;
1222 if ( aRequest.Name.isEmpty() )
1225 aRequest.Name =
DBA_RES( RID_STR_FORM );
1227 aRequest.Name =
DBA_RES( RID_STR_REPORT );
1228 aRequest.Name = ::dbtools::createUniqueName(xName,aRequest.Name);
1237 if (
m_pImpl->m_aProps.aTitle.isEmpty() )
1239 pDocuSave =
new ODocumentSaveContinuation;
1240 pRequest->addContinuation(pDocuSave);
1245 pRequest->addContinuation(pApprove);
1249 pRequest->addContinuation(pDisApprove);
1252 pRequest->addContinuation(pAbort);
1254 Reference<XWindow> xDialogParent(rDialogParent, UNO_QUERY);
1257 Reference<XInteractionHandler2> xHandler(InteractionHandler::createWithParent(
m_aContext, xDialogParent));
1258 xHandler->handle(pRequest);
1260 if ( pAbort->wasSelected() )
1262 if ( pDisApprove->wasSelected() )
1264 if ( pDocuSave && pDocuSave->wasSelected() )
1266 Reference<XNameContainer> xNC( pDocuSave->getContent(), UNO_QUERY_THROW );
1268 ::osl::ResettableMutexGuard aGuard(
m_aMutex );
1270 m_pImpl->m_aProps.aTitle = pDocuSave->getName();
1272 Reference< XContent> xContent =
this;
1273 xNC->insertByName(pDocuSave->getName(),
Any(xContent));
1279 ::osl::MutexGuard aGuard(
m_aMutex);
1281 if ( xPersist.is() )
1283 xPersist->storeOwn();
1289 TOOLS_WARN_EXCEPTION(
"dbaccess",
"ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
1301 osl::ClearableGuard< osl::Mutex > aGuard(
m_aMutex );
1302 if (
m_pImpl->m_aProps.aTitle.isEmpty() )
1305 save(
false, css::uno::Reference<css::awt::XTopWindow>());
1314 DocumentSaveRequest aRequest;
1315 aRequest.Name =
m_pImpl->m_aProps.aTitle;
1322 pRequest->addContinuation(pDocuSave);
1324 pRequest->addContinuation(pDisApprove);
1326 pRequest->addContinuation(pAbort);
1329 Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(
m_aContext,
nullptr) );
1330 xHandler->handle(pRequest);
1332 if ( pAbort->wasSelected() )
1334 if ( pDisApprove->wasSelected() )
1336 if ( pDocuSave->wasSelected() )
1338 ::osl::MutexGuard aGuard(
m_aMutex);
1339 Reference<XNameContainer> xNC(pDocuSave->getContent(),UNO_QUERY);
1342 if (
m_pImpl->m_aProps.aTitle != pDocuSave->getName() )
1348 OUString sPersistentName = ::dbtools::createUniqueName(xStorage,
"Obj");
1349 xStorage->copyElementTo(
m_pImpl->m_aProps.sPersistentName,xStorage,sPersistentName);
1351 OUString sOldName =
m_pImpl->m_aProps.aTitle;
1352 rename(pDocuSave->getName());
1364 xNameContainer->insertByName( sOldName,
Any( xComponent ) );
1372 if ( xPersist.is() )
1374 xPersist->storeOwn();
1382 TOOLS_WARN_EXCEPTION(
"dbaccess",
"ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
1390 if ( !!_bSuppressMacros )
1392 if ( *_bSuppressMacros )
1395 _io_rArgs.
put(
"MacroExecutionMode", MacroExecMode::NEVER_EXECUTE );
1400 if ( !_io_rArgs.
has(
"MacroExecutionMode" ) )
1402 _io_rArgs.
put(
"MacroExecutionMode", MacroExecMode::USE_CONFIG );
1408 _io_rArgs.
put(
"ReadOnly", *_bReadOnly );
1414 Reference< XFrame > lcl_getDatabaseDocumentFrame( ODatabaseModelImpl
const & _rImpl )
1416 Reference< XModel > xDatabaseDocumentModel( _rImpl.getModel_noCreate() );
1418 Reference< XController > xDatabaseDocumentController;
1419 if ( xDatabaseDocumentModel.is() )
1420 xDatabaseDocumentController = xDatabaseDocumentModel->getCurrentController();
1422 Reference< XFrame >
xFrame;
1423 if ( xDatabaseDocumentController.is() )
1424 xFrame = xDatabaseDocumentController->getFrame();
1432 bool bAllowDocumentMacros = !
m_pImpl->m_pDataSource
1439 return bAllowDocumentMacros;
1452 static const std::u16string_view sObjectDescriptorArgs[] = {
u"RecoveryStorage" };
1453 for (
const auto& rObjectDescriptorArg : sObjectDescriptorArgs)
1455 const OUString sObjectDescriptorArg(rObjectDescriptorArg);
1456 if ( aOpenCommandArguments.
has( sObjectDescriptorArg ) )
1458 o_rEmbeddedObjectDescriptor.
put( sObjectDescriptorArg, aOpenCommandArguments.
get( sObjectDescriptorArg ) );
1459 aOpenCommandArguments.
remove( sObjectDescriptorArg );
1463 o_rDocumentLoadArgs.
merge( aOpenCommandArguments,
false );
1467 const Sequence< PropertyValue >& i_rOpenCommandArguments, Sequence< PropertyValue >& _out_rEmbeddedObjectDescriptor )
1477 Reference<XDispatchProviderInterceptor> xInterceptor =
m_pInterceptor;
1480 aEmbeddedDescriptor.
put(
"OutplaceDispatchInterceptor", xInterceptor );
1487 OutplaceFrameProperties.
put(
"TopWindow",
true );
1488 OutplaceFrameProperties.
put(
"SupportPersistentWindowState",
true );
1490 Reference< XFrame > xParentFrame;
1492 xParentFrame = lcl_getDatabaseDocumentFrame( *
m_pImpl->m_pDataSource );
1493 if ( !xParentFrame.is() )
1495 Reference< XDesktop2 > xDesktop = Desktop::create(
m_aContext );
1496 xParentFrame.set( xDesktop, UNO_QUERY_THROW );
1497 Reference<util::XCloseable> xCloseable(
m_pImpl->m_pDataSource->getModel_noCreate(),UNO_QUERY);
1498 if ( xCloseable.is() )
1500 xCloseable->addCloseListener(
this);
1504 OSL_ENSURE( xParentFrame.is(),
"ODocumentDefinition::fillLoadArgs: no parent frame!" );
1505 if ( xParentFrame.is() )
1506 OutplaceFrameProperties.
put(
"ParentFrame", xParentFrame );
1508 aEmbeddedDescriptor.
put(
"OutplaceFrameProperties", OutplaceFrameProperties.
getNamedValues() );
1514 aEmbeddedDescriptor.
put(
"DocumentRecoverySupport",
false );
1517 aEmbeddedDescriptor >>= _out_rEmbeddedObjectDescriptor;
1522 aComponentData.
put(
"ActiveConnection", _xConnection );
1523 aComponentData.
put(
"ApplyFormDesignMode", !_bReadOnly );
1527 if ( !
m_pImpl->m_aProps.aTitle.isEmpty() )
1528 aMediaDesc.
put(
"DocumentTitle",
m_pImpl->m_aProps.aTitle );
1530 aMediaDesc.
put(
"DocumentBaseURL",
m_pImpl->m_pDataSource->getURL() );
1539 const Sequence< PropertyValue >& i_rOpenCommandArguments,
const bool _bSuppressMacros,
const bool _bReadOnly )
1544 if ( xStorage.is() )
1546 Reference< XEmbeddedObjectCreator> xEmbedFactory = OOoEmbeddedObjectFactory::create(
m_aContext);
1548 bool bSetSize =
false;
1549 sal_Int32 nEntryConnectionMode = EntryInitModes::DEFAULT_INIT;
1550 Sequence< sal_Int8 >
aClassID = _aClassID;
1553 nEntryConnectionMode = EntryInitModes::TRUNCATE_INIT;
1564 Reference< XContentEnumerationAccess > xEnumAccess(
m_aContext->getServiceManager(), UNO_QUERY );
1565 const OUString sReportEngineServiceName = ::dbtools::getDefaultReportEngineServiceName(
m_aContext);
1566 Reference< XEnumeration > xEnumDrivers = xEnumAccess->createContentEnumeration(sReportEngineServiceName);
1567 if ( !xEnumDrivers.is() || !xEnumDrivers->hasMoreElements() )
1569 css::io::WrongFormatException aWFE;
1570 aWFE.Message =
DBA_RES( RID_STR_MISSING_EXTENSION );
1585 OSL_ENSURE(
aClassID.hasElements(),
"No Class ID" );
1587 Sequence< PropertyValue > aEmbeddedObjectDescriptor;
1589 i_rConnection, _bSuppressMacros, _bReadOnly, i_rOpenCommandArguments, aEmbeddedObjectDescriptor ) );
1594 ,
m_pImpl->m_aProps.sPersistentName
1595 ,nEntryConnectionMode
1597 ,aEmbeddedObjectDescriptor
1620 if ( nCurrentState == EmbedStates::LOADED )
1628 Sequence< PropertyValue > aEmbeddedObjectDescriptor;
1630 i_rConnection, _bSuppressMacros, _bReadOnly, i_rOpenCommandArguments, aEmbeddedObjectDescriptor ) );
1633 OSL_ENSURE(xCommon.is(),
"unsupported interface!");
1635 xCommon->reload( aLoadArgs, aEmbeddedObjectDescriptor );
1640 OSL_ENSURE( ( nCurrentState == EmbedStates::RUNNING ) || ( nCurrentState == EmbedStates::ACTIVE ),
1641 "ODocumentDefinition::loadEmbeddedObject: unexpected state!" );
1655 const Sequence< PropertyValue > aArgs =
xModel->getArgs();
1657 aExistentMediaDesc.
merge( aNewMediaDesc,
false );
1675 Reference< XChild > xDepdendDocAsChild(
getComponent(), UNO_QUERY );
1676 if ( xDepdendDocAsChild.is() )
1680 if ( !xDepdendDocAsChild->getParent().is() )
1691 if ( i_rConnection.is() )
1703 Reference<XTransferable> xTransfer(
getComponent(),UNO_QUERY);
1704 if ( xTransfer.is() )
1707 aFlavor.MimeType =
"image/png";
1708 aFlavor.HumanPresentableName =
"Portable Network Graphics";
1711 _rImage = xTransfer->getTransferData( aFlavor );
1732 Reference<XDocumentPropertiesSupplier> xDocSup(
1735 _rProps <<= xDocSup->getDocumentProperties();
1746 Reference< util::XCloseable > xComp;
1750 if ( (
nState == EmbedStates::LOADED ) && i_ForceCreate )
1754 OSL_ENSURE(
nState == EmbedStates::RUNNING,
"ODocumentDefinition::impl_getComponent_throw: could not switch to RUNNING!" );
1757 if (
nState == EmbedStates::ACTIVE ||
nState == EmbedStates::RUNNING )
1762 OSL_ENSURE(xComp.is(),
"No valid component");
1771 ::osl::MutexGuard aGuard(
m_aMutex );
1777 Reference< XDatabaseDocumentUI > lcl_getDatabaseDocumentUI(
ODatabaseModelImpl const & _rModelImpl )
1779 Reference< XDatabaseDocumentUI > xUI;
1783 xUI.set(
xModel->getCurrentController(), UNO_QUERY );
1790 ::osl::ClearableMutexGuard aGuard(
m_aMutex );
1792 throw DisposedException();
1794 Reference< XComponent > xComponent;
1797 Reference< XDatabaseDocumentUI > xUI( lcl_getDatabaseDocumentUI( *
m_pImpl->m_pDataSource ) );
1803 OSL_ENSURE( xComponent.is(),
"ODocumentDefinition::impl_openUI_nolck_throw: opening the thingie failed." );
1812 xComponent = xUI->loadComponent(
1813 nObjectType,
sName, _bForEditing
1819 throw WrappedTargetException(
1820 OUString(), *
this, ::cppu::getCaughtException() );
1829 if ( xPersist.is() )
1831 xPersist->storeOwn();
1859 ::osl::MutexGuard aGuard(
m_aMutex );
1867 throw WrappedTargetException(
1868 OUString(), *
this, ::cppu::getCaughtException() );
1874 ::osl::MutexGuard aGuard(
m_aMutex );
1876 bool bSuccess =
false;
1884 throw WrappedTargetException(
1885 OUString(), *
this, ::cppu::getCaughtException() );
1892 ::osl::MutexGuard aGuard(
m_aMutex );
1905 ::osl::ResettableMutexGuard aGuard(
m_aMutex);
1906 if ( _rNewName ==
m_pImpl->m_aProps.aTitle )
1911 if ( _rNewName.indexOf(
'/' ) != -1 )
1915 m_pImpl->m_aProps.aTitle = _rNewName;
1920 catch(
const PropertyVetoException&)
1922 throw ElementExistException(_rNewName,*
this);
1930 : Reference< XStorage>();
1935 osl::ClearableGuard< osl::Mutex > aGuard(
m_aMutex);
1958 if ( !xComponent.is() )
1961 Reference< XModel >
xModel( xComponent, UNO_QUERY );
1967 "ODocumentDefinition::prepareClose: no controller!" );
1979 Reference<XTopWindow> xTopWindow;
1982 xTopWindow = Reference<XTopWindow>(
xFrame->getContainerWindow(), UNO_QUERY_THROW);
1983 xTopWindow->toFront();
1985 if (!
save(
true, xTopWindow))
2003 const Reference< util::XCloseable >& _rxComponent,
2004 const Reference< XConnection >& _rxActiveConnection )
2008 {
"TextDocument",
uno::Any(_rxComponent)},
2009 {
"ActiveConnection",
uno::Any(_rxActiveConnection)}
2013 Reference< XJobExecutor > xExecutable(
2014 _rContext->getServiceManager()->createInstanceWithArgumentsAndContext(
"com.sun.star.wizards.report.CallReportWizard", aArgs, _rContext), UNO_QUERY_THROW );
2015 xExecutable->trigger(
"fill" );
2028 if (
sName.isEmpty() )
2034 Reference< XUntitledNumbers > xUntitledProvider(
m_pImpl->m_pDataSource->getModel_noCreate(), UNO_QUERY );
2035 if ( xUntitledProvider.is() )
2039 Reference< XTitle > xDatabaseDocumentModel(
m_pImpl->m_pDataSource->getModel_noCreate(),uno::UNO_QUERY);
2040 if ( xDatabaseDocumentModel.is() )
2041 sName = xDatabaseDocumentModel->getTitle() +
" : " +
sName;
2045 xTitle->setTitle(
sName);
2053 throw util::CloseVetoException();
2055 catch(
const lang::WrappedTargetException&)
2057 throw util::CloseVetoException();
2072 fire( &i_nHandle, &i_rNewValue, &i_rOldValue, 1, i_bVetoable );
2077 ::osl::ResettableMutexGuard& i_rClearForNotify )
2078 :m_rDocumentDefinition( i_rDocumentDefinition )
2079 ,m_aOldValue(
Any( i_rDocumentDefinition.getCurrentName() ) )
2080 ,m_aNewValue(
Any( i_rNewName ) )
2081 ,m_rClearForNotify( i_rClearForNotify )
constexpr OUStringLiteral sDocumentService
static css::uno::Sequence< sal_Int8 > GetSequenceClassIDRepresentation(std::u16string_view aClassID)
static css::uno::Sequence< sal_Int8 > GetSequenceClassID(sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3, sal_uInt8 b8, sal_uInt8 b9, sal_uInt8 b10, sal_uInt8 b11, sal_uInt8 b12, sal_uInt8 b13, sal_uInt8 b14, sal_uInt8 b15)
bool has(const OUString &_rValueName) const
const css::uno::Any & get(const OUString &_rValueName) const
bool remove(const OUString &_rValueName)
bool put(const OUString &_rValueName, const VALUE_TYPE &_rValue)
css::uno::Sequence< css::beans::NamedValue > getNamedValues() const
NamedValueCollection & merge(const NamedValueCollection &_rAdditionalValues, bool _bOverwriteExisting)
css::uno::Sequence< css::beans::PropertyValue > getPropertyValues() const
VALUE_TYPE getOrDefault(const OUString &_rValueName, const VALUE_TYPE &_rDefault) const
::cppu::IPropertyArrayHelper * getArrayHelper()
void describeProperties(css::uno::Sequence< css::beans::Property > &_rProps) const
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
void raiseException(const ErrorCondition _eCondition, const css::uno::Reference< css::uno::XInterface > &_rxContext, const std::optional< OUString > &_rParamValue1=std::nullopt, const std::optional< OUString > &_rParamValue2=std::nullopt, const std::optional< OUString > &_rParamValue3=std::nullopt) const
mutable::osl::Mutex m_aMutex
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
css::uno::Type const & get()
::osl::ResettableMutexGuard & m_rClearForNotify
NameChangeNotifier(ODocumentDefinition &i_rDocumentDefinition, const OUString &i_rNewName, ::osl::ResettableMutexGuard &i_rClearForNotify)
void impl_fireEvent_throw(const bool i_bVetoable)
const css::uno::Any m_aNewValue
const css::uno::Any m_aOldValue
ODocumentDefinition & m_rDocumentDefinition
void notifyDataSourceModified()
OUString impl_getHierarchicalName(bool _includingRootContainer) const
virtual void SAL_CALL disposing() override
const css::uno::Reference< css::uno::XComponentContext > m_aContext
virtual css::uno::Any SAL_CALL execute(const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override
const ::connectivity::SQLError m_aErrorHelper
virtual OUString SAL_CALL getContentType() override
css::uno::Reference< css::uno::XInterface > m_xParentContainer
css::uno::Reference< css::frame::XModel > getModel_noCreate() const
returns the model, if there already exists one
static OUString getObjectContainerStorageName(const ObjectType _eType)
returns the name of the storage which is used to stored objects of the given type,...
virtual void SAL_CALL rename(const OUString &newName) override
static void impl_initFormEditView(const css::uno::Reference< css::frame::XController > &_rxController)
initializes a newly created view/controller of a form which is displaying our embedded object
static void impl_removeFrameFromDesktop_throw(const css::uno::Reference< css::uno::XComponentContext > &_rContext, const css::uno::Reference< css::frame::XFrame > &_rxFrame)
removes the given frame from the desktop's frame collection
bool impl_close_throw()
closes our document, if it's open
css::uno::Reference< css::sdbc::XConnection > m_xLastKnownConnection
virtual void getPropertyDefaultByHandle(sal_Int32 _nHandle, css::uno::Any &_rDefault) const override
void onCommandInsert(const OUString &_sURL, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment)
rtl::Reference< OEmbeddedClientHelper > m_pClientHelper
static void separateOpenCommandArguments(const css::uno::Sequence< css::beans::PropertyValue > &i_rOpenCommandArguments, ::comphelper::NamedValueCollection &o_rDocumentLoadArgs, ::comphelper::NamedValueCollection &o_rEmbeddedObjectDescriptor)
splits the given arguments to an "open*" command into arguments for loading the document,...
bool prepareClose()
prepares closing the document component
virtual css::uno::Reference< css::util::XCloseable > SAL_CALL getComponent() override
virtual void SAL_CALL disposing() override
void updateDocumentTitle()
searches for read-only flag in the args of the model and sets it to the given value,...
css::uno::Sequence< css::beans::PropertyValue > fillLoadArgs(const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const bool _bSuppressMacros, const bool _bReadOnly, const css::uno::Sequence< css::beans::PropertyValue > &i_rOpenCommandArguments, css::uno::Sequence< css::beans::PropertyValue > &_out_rEmbeddedObjectDescriptor)
fills the load arguments
void loadEmbeddedObject(const css::uno::Reference< css::sdbc::XConnection > &_xConnection, const css::uno::Sequence< sal_Int8 > &_aClassID, const css::uno::Sequence< css::beans::PropertyValue > &_rAdditionalArgs, const bool _bSuppressMacros, const bool _bReadOnly)
loads the EmbeddedObject if not already loaded
void loadEmbeddedObjectForPreview()
loads the embedded object for preview.
static void fillReportData(const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const css::uno::Reference< css::util::XCloseable > &_rxComponent, const css::uno::Reference< css::sdbc::XConnection > &_rxActiveConnection)
bool save(bool _bApprove, const css::uno::Reference< css::awt::XTopWindow > &rDialogParent)
void impl_store_throw()
stores our document, if it's already loaded
ODocumentDefinition(const css::uno::Reference< css::uno::XInterface > &_rxContainer, const css::uno::Reference< css::uno::XComponentContext > &, const TContentPtr &_pImpl, bool _bForm)
void onCommandPreview(css::uno::Any &_rImage)
virtual OUString determineContentType() const override
css::uno::Reference< css::embed::XStorage > getContainerStorage() const
returns the forms/reports container storage, depending on m_bForm.
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
rtl::Reference< OInterceptor > m_pInterceptor
css::uno::Reference< css::util::XCloseable > impl_getComponent_throw(const bool i_ForceCreate=true)
returns our component, creates it if necessary
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL open() override
void firePropertyChange(sal_Int32 i_nHandle, const css::uno::Any &i_rNewValue, const css::uno::Any &i_rOldValue, bool i_bVetoable, const NotifierAccess &)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual sal_Bool SAL_CALL close() override
css::uno::Reference< css::embed::XEmbeddedObject > m_xEmbeddedObject
void impl_showOrHideComponent_throw(const bool i_bShow)
shows or hides our component
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual ~ODocumentDefinition() override
void impl_onActivateEmbeddedObject_nothrow(const bool i_bReactivated)
does necessary initializations after our embedded object has been switched to ACTIVE
void registerProperties()
void onCommandGetDocumentProperties(css::uno::Any &_rProps)
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
bool objectSupportsEmbeddedScripts() const
determines whether the document we represent supports embedded scripts and macros
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL openDesign() override
void initialLoad(const css::uno::Sequence< sal_Int8 > &i_rClassID, const css::uno::Sequence< css::beans::PropertyValue > &i_rCreationArgs, const css::uno::Reference< css::sdbc::XConnection > &i_rConnection)
css::uno::Any onCommandOpenSomething(const css::uno::Any &_rArgument, const bool _bActivate, const css::uno::Reference< css::ucb::XCommandEnvironment > &_rxEnvironment)
css::uno::Reference< css::lang::XComponent > impl_openUI_nolck_throw(bool _bForEditing)
opens the UI for this sub document
virtual void SAL_CALL store() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual OUString SAL_CALL getHierarchicalName() override
virtual void SAL_CALL notifyClosing(const css::lang::EventObject &Source) override
css::uno::Reference< css::embed::XStateChangeListener > m_xListener
virtual void SAL_CALL queryClosing(const css::lang::EventObject &Source, sal_Bool GetsOwnership) override
virtual css::uno::Any SAL_CALL execute(const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override
virtual OUString SAL_CALL composeHierarchicalName(const OUString &aRelativeName) override
static OUString GetDocumentServiceFromMediaType(const OUString &_rMediaType, const css::uno::Reference< css::uno::XComponentContext > &_rxContext, css::uno::Sequence< sal_Int8 > &_rClassId)
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &o_rValue, sal_Int32 i_nHandle) const override
virtual void SAL_CALL visibilityChanged(sal_Bool) override
virtual void SAL_CALL saveObject() override
virtual Reference< util::XCloseable > SAL_CALL getComponent() override
#define SO3_RPT_CLASSID_90
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
ODocumentDefinition * m_pDefinition
Reference< XVisualObject > m_xVisObject
Reference< XModifiable2 > m_xModifiable
Reference< XEmbeddedObject > m_xBroadCaster
awt::Size m_aOriginalSize
Reference< XInterface > m_xClient
Reference< XLayoutManager > m_xLayoutManager
Reference< XContent > m_xParentContainer
Sequence< PropertyValue > aArguments
css::uno::Sequence< css::uno::Any > InitAnyPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
std::shared_ptr< OContentHelper_Impl > TContentPtr
css::uno::Reference< css::uno::XInterface > getDataSource(const css::uno::Reference< css::uno::XInterface > &_rxDependentObject)
::cppu::WeakImplHelper< css::lang::XEventListener > LifetimeCoupler_Base
::comphelper::WeakComponentImplHelper< embed::XStateChangeListener > TEmbedObjectHolder
::std::optional< bool > optional_bool
void cancelCommandExecution(const uno::Any &rException, const uno::Reference< ucb::XCommandEnvironment > &xEnv)
const char *const aClassID
#define PROPERTY_ID_AS_TEMPLATE
#define PROPERTY_ID_PERSISTENT_NAME
#define PROPERTY_ID_IS_FORM
#define PROPERTY_ID_PERSISTENT_PATH
constexpr OUStringLiteral INFO_MEDIATYPE
constexpr OUStringLiteral PROPERTY_URL(u"URL")
constexpr OUStringLiteral PROPERTY_PERSISTENT_NAME(u"PersistentName")
constexpr OUStringLiteral PROPERTY_IS_FORM(u"IsForm")
constexpr OUStringLiteral SERVICE_SDB_DOCUMENTDEFINITION
constexpr OUStringLiteral PROPERTY_ACTIVE_CONNECTION(u"ActiveConnection")
constexpr OUStringLiteral PROPERTY_AS_TEMPLATE(u"AsTemplate")
constexpr OUStringLiteral PROPERTY_NAME(u"Name")
constexpr OUStringLiteral PROPERTY_PERSISTENT_PATH(u"PersistentPath")
constexpr OUStringLiteral PROPERTY_DATASOURCENAME(u"DataSourceName")
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 IMPLEMENT_FORWARD_XINTERFACE3(classname, refcountbase, baseclass2, baseclass3)