20#include <core_resource.hxx>
30#include <officecfg/Office/Common.hxx>
31#include <com/sun/star/beans/PropertyAttribute.hpp>
32#include <com/sun/star/document/XExporter.hpp>
33#include <com/sun/star/document/XFilter.hpp>
34#include <com/sun/star/document/XImporter.hpp>
35#include <com/sun/star/document/XGraphicStorageHandler.hpp>
36#include <com/sun/star/document/GraphicStorageHandler.hpp>
37#include <com/sun/star/frame/Desktop.hpp>
38#include <com/sun/star/frame/ModuleManager.hpp>
39#include <com/sun/star/io/IOException.hpp>
40#include <com/sun/star/io/XSeekable.hpp>
41#include <com/sun/star/io/XOutputStream.hpp>
42#include <com/sun/star/io/XTruncate.hpp>
43#include <com/sun/star/lang/NoSupportException.hpp>
44#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
45#include <com/sun/star/script/provider/theMasterScriptProviderFactory.hpp>
46#include <com/sun/star/sdb/DatabaseContext.hpp>
47#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
48#include <com/sun/star/task/XStatusIndicator.hpp>
49#include <com/sun/star/ucb/SimpleFileAccess.hpp>
50#include <com/sun/star/ui/UIConfigurationManager.hpp>
51#include <com/sun/star/util/CloseVetoException.hpp>
52#include <com/sun/star/view/XSelectionSupplier.hpp>
53#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
54#include <com/sun/star/xml/sax/Writer.hpp>
56#include <com/sun/star/script/XStorageBasedLibraryContainer.hpp>
57#include <com/sun/star/awt/XControl.hpp>
58#include <com/sun/star/awt/DialogProvider.hpp>
77#include <osl/diagnose.h>
98using namespace ::com::sun::star::script::provider;
100using namespace ::
cppu;
115 return bFirstControllerEver;
129 return bLoadFinished;
140 ,m_aEventNotifier( *this,
getMutex() )
141 ,m_aViewMonitor( m_aEventNotifier )
142 ,m_eInitState( NotInitialized )
144 ,m_bAllowDocumentScripting( false )
145 ,m_bHasBeenRecovered( false )
162 if ( !
m_pImpl->hadInitializedDocument() )
170 if ( !
m_pImpl->getURL().isEmpty() )
181 if ( !ODatabaseDocument_OfficeDocument::rBHelper.bInDispose && !ODatabaseDocument_OfficeDocument::rBHelper.bDisposed )
200 Any aReturn = ODatabaseDocument_OfficeDocument::queryInterface(_rType);
201 if (!aReturn.hasValue())
208 ODatabaseDocument_OfficeDocument::acquire();
213 ODatabaseDocument_OfficeDocument::release();
218 Sequence< Type >
aTypes = ::comphelper::concatSequences(
219 ODatabaseDocument_OfficeDocument::getTypes(),
229 auto newEnd = std::remove_if(
begin,
end,
241 return css::uno::Sequence<sal_Int8>();
247 Reference< XStatusIndicator > lcl_extractStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments )
249 Reference< XStatusIndicator > xStatusIndicator;
250 return _rArguments.getOrDefault(
"StatusIndicator", xStatusIndicator );
253 void lcl_triggerStatusIndicator_throw( const ::comphelper::NamedValueCollection& _rArguments, DocumentGuard& _rGuard,
const bool _bStart )
255 Reference< XStatusIndicator > xStatusIndicator( lcl_extractStatusIndicator( _rArguments ) );
256 if ( !xStatusIndicator.is() )
263 xStatusIndicator->start( OUString(), sal_Int32(1000000) );
265 xStatusIndicator->end();
267 catch(
const Exception& )
275 void lcl_extractStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments, Sequence< Any >& _rCallArgs )
277 Reference< XStatusIndicator > xStatusIndicator( lcl_extractStatusIndicator( _rArguments ) );
278 if ( !xStatusIndicator.is() )
281 sal_Int32
nLength = _rCallArgs.getLength();
282 _rCallArgs.realloc( nLength + 1 );
283 _rCallArgs.getArray()[
nLength ] <<= xStatusIndicator;
286 void lcl_extractAndStartStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments, Reference< XStatusIndicator >& _rxStatusIndicator,
287 Sequence< Any >& _rCallArgs )
289 _rxStatusIndicator = lcl_extractStatusIndicator( _rArguments );
290 if ( !_rxStatusIndicator.is() )
295 _rxStatusIndicator->start( OUString(), sal_Int32(1000000) );
297 sal_Int32
nLength = _rCallArgs.getLength();
298 _rCallArgs.realloc( nLength + 1 );
299 _rCallArgs.getArray()[
nLength ] <<= _rxStatusIndicator;
301 catch(
const Exception& )
307 Sequence< PropertyValue > lcl_appendFileNameToDescriptor( const ::comphelper::NamedValueCollection& _rDescriptor,
const OUString& _rURL )
309 if ( _rURL.isEmpty() )
310 return _rDescriptor.getPropertyValues();
313 aMutableDescriptor.put(
"FileName", _rURL );
314 aMutableDescriptor.put(
"URL", _rURL );
315 return aMutableDescriptor.getPropertyValues();
345static void lcl_uglyHackToStoreDialogeEmbedImages(
const Reference< XStorageBasedLibraryContainer >& xDlgCont,
const Reference< XStorage >& xStorage,
const Reference< XModel >& rxModel,
const Reference<XComponentContext >& rxContext )
347 const Sequence< OUString > sLibraries = xDlgCont->getElementNames();
348 Reference< XStorage > xTmpPic = xStorage->openStorageElement(
"tempPictures", ElementModes::READWRITE );
350 std::vector<uno::Reference<graphic::XGraphic>> vxGraphicList;
351 for ( OUString
const &
sLibrary : sLibraries )
354 Reference< XNameContainer > xLib;
355 xDlgCont->getByName(
sLibrary ) >>= xLib;
358 Sequence< OUString > sDialogs = xLib->getElementNames();
359 sal_Int32 nDialogs( sDialogs.getLength() );
360 for ( sal_Int32 j=0; j < nDialogs; ++j )
362 Reference < awt::XDialogProvider > xDlgPrv = awt::DialogProvider::createWithModel(rxContext, rxModel);
363 OUString sDialogUrl =
364 "vnd.sun.star.script:" +
sLibrary +
"." + sDialogs[j] +
"?location=document";
366 Reference< css::awt::XControl > xDialog( xDlgPrv->createDialog( sDialogUrl ), UNO_QUERY );
367 Reference< XInterface >
xModel( xDialog->getModel() );
373 if (!vxGraphicList.empty())
376 uno::Reference<document::XGraphicStorageHandler> xGraphicStorageHandler;
377 xGraphicStorageHandler.set(GraphicStorageHandler::createWithStorage(rxContext, xTmpPic));
378 if (xGraphicStorageHandler.is())
380 for (uno::Reference<graphic::XGraphic>
const & rxGraphic : vxGraphicList)
382 xGraphicStorageHandler->saveGraphic(rxGraphic);
392 if ( xStorage->isStorageElement(
sPictures ) )
426 m_pImpl->m_bDocumentReadOnly =
false;
443 const ::comphelper::NamedValueCollection& _rResource )
445 Sequence< Any > aFilterCreationArgs;
446 Reference< XStatusIndicator > xStatusIndicator;
447 lcl_extractAndStartStatusIndicator( _rResource, xStatusIndicator, aFilterCreationArgs );
450 OUString sBaseURI = _rResource.getOrDefault(
"BaseURI", OUString());
451 if (sBaseURI.isEmpty())
452 sBaseURI = _rResource.getOrDefault(
"URL",OUString());
453 assert(!sBaseURI.isEmpty());
454 xInfoSet->setPropertyValue(
"BaseURI",
uno::Any(sBaseURI));
455 xInfoSet->setPropertyValue(
"StreamName",
uno::Any(OUString(
"content.xml")));
457 const sal_Int32
nCount = aFilterCreationArgs.getLength();
458 aFilterCreationArgs.realloc(
nCount + 1);
459 aFilterCreationArgs.getArray()[
nCount] <<= xInfoSet;
461 Reference< XImporter > xImporter(
462 _rContext->getServiceManager()->createInstanceWithArgumentsAndContext(
"com.sun.star.comp.sdb.DBFilter", aFilterCreationArgs, _rContext),
465 Reference< XComponent > xComponent( _rxTargetComponent, UNO_QUERY_THROW );
466 xImporter->setTargetDocument( xComponent );
468 Reference< XFilter > xFilter( xImporter, UNO_QUERY_THROW );
470 xFilter->filter( aFilterArgs );
472 if ( xStatusIndicator.is() )
473 xStatusIndicator->end();
492 m_pImpl->switchToStorage( xTempStor );
517 if ( aResource.
has(
"FileName" ) && !aResource.
has(
"URL" ) )
521 aResource.
put(
"URL", aResource.
get(
"FileName" ) );
522 if ( aResource.
has(
"URL" ) && !aResource.
has(
"FileName" ) )
524 aResource.
put(
"FileName", aResource.
get(
"URL" ) );
528 m_pImpl->setImposedMacroExecMode(
559 bool lcl_hasAnyModifiedSubComponent_throw(
const Reference< XController >& i_rController )
561 Reference< css::sdb::application::XDatabaseDocumentUI > xDatabaseUI( i_rController, UNO_QUERY_THROW );
563 const Sequence< Reference< XComponent > > aComponents( xDatabaseUI->getSubComponents() );
565 bool isAnyModified =
false;
566 for (
auto const & xComponent : aComponents )
568 Reference< XModifiable > xModify( xComponent, UNO_QUERY );
571 isAnyModified = xModify->isModified();
577 OSL_FAIL(
"lcl_hasAnyModifiedSubComponent_throw: anything left to do here?" );
580 return isAnyModified;
607 if ( lcl_hasAnyModifiedSubComponent_throw(controller) )
647 catch(
const WrappedTargetException& )
653 Any aError = ::cppu::getCaughtException();
654 throw WrappedTargetException( OUString(), *
this, aError );
664 if ( i_SourceLocation.isEmpty() )
665 throw IllegalArgumentException( OUString(), *
this, 1 );
672 aMediaDescriptor.
put(
"SalvagedFile", i_SalvagedFile );
673 aMediaDescriptor.
put(
"URL", i_SourceLocation );
684 m_pImpl->setDocFileLocation( i_SourceLocation );
688 const OUString sLogicalDocumentURL( i_SalvagedFile.isEmpty() ? i_SourceLocation : i_SalvagedFile );
700 catch(
const WrappedTargetException& )
706 Any aError = ::cppu::getCaughtException();
707 throw WrappedTargetException( OUString(), *
this, aError );
714 if (_rURL.isEmpty() && _rArguments.getLength() == 1 && _rArguments[0].Name ==
"SetEmbedded")
732 Any aError = ::cppu::getCaughtException();
733 throw WrappedTargetRuntimeException( OUString(), *
this, aError );
739 const Sequence< PropertyValue >& i_rMediaDescriptor,
DocumentGuard& _rDocGuard )
741 if (i_rLogicalDocumentURL ==
getURL())
750 aArgs.
remove(
"BreakMacroSignature");
752 bool bMacroEventRead =
false;
753 if ((aArgs.
get(
"MacroEventRead" ) >>= bMacroEventRead) && bMacroEventRead)
754 m_pImpl->m_bMacroCallsSeenWhileLoading =
true;
755 aArgs.
remove(
"MacroEventRead" );
763 OUString sDocumentURL( i_rLogicalDocumentURL );
764 OSL_ENSURE( !sDocumentURL.isEmpty(),
"ODatabaseDocument::impl_attachResource: invalid URL!" );
765 if ( sDocumentURL.isEmpty() )
768 m_pImpl->setResource( sDocumentURL, i_rMediaDescriptor );
797 return m_pImpl->getMediaDescriptor().getPropertyValues();
803 std::vector<PropertyValue> aRet;
804 for (
const auto & rArgName : requestedArgs)
805 aRet.push_back(PropertyValue(rArgName, 0,
m_pImpl->getMediaDescriptor().get(rArgName), PropertyState_DIRECT_VALUE));
811 throw NoSupportException();
818#if OSL_DEBUG_LEVEL > 0
821 OSL_ENSURE( controller != _xController,
"ODatabaseDocument::connectController: this controller is already connected!" );
830 if ( !bFirstControllerEver )
834 m_pImpl->checkMacrosOnLoading();
839 bool bNotifyViewClosed =
false;
840 bool bLastControllerGone =
false;
841 bool bIsClosing =
false;
848 OSL_ENSURE(
pos !=
m_aControllers.end(),
"ODatabaseDocument::disconnectController: don't know this controller!" );
852 bNotifyViewClosed =
true;
863 if ( bNotifyViewClosed )
866 if ( !bLastControllerGone || bIsClosing )
875 catch(
const CloseVetoException& )
885 ++
m_pImpl->m_nControllerLockCount;
892 --
m_pImpl->m_nControllerLockCount;
899 return m_pImpl->m_nControllerLockCount != 0;
920 if ( !bAttemptRecovery &&
m_pImpl->getMediaDescriptor().has(
"ForceRecovery" ) )
922 m_pImpl->getMediaDescriptor().get(
"ForceRecovery" ) >>= bAttemptRecovery;
924 if ( !bAttemptRecovery )
942 Reference< XInterface > xRet;
945 xRet.set(xDocView->getSelection(),UNO_QUERY);
967 return m_pImpl->m_bDocumentReadOnly;
974 OUString sDocumentURL(
m_pImpl->getURL() );
975 if ( !sDocumentURL.isEmpty() )
978 if (
m_pImpl->m_bDocumentReadOnly )
987 OSL_ENSURE(
m_pImpl->getDocFileLocation().isEmpty(),
"ODatabaseDocument::store: unexpected URL inconsistency!" );
995 Any aError = ::cppu::getCaughtException();
1011 RID_STR_ERROR_WHILE_SAVING,
1012 "$location$", i_rTargetURL,
1013 "$message$", sErrorMessage
1021 OSL_PRECOND( ( _eType ==
SAVE ) || ( _eType ==
SAVE_AS ),
1022 "ODatabaseDocument::impl_storeAs_throw: you introduced a new type which cannot be handled here!" );
1029 if ( !bIsInitializationProcess )
1036 Reference< XStorage > xNewRootStorage;
1044 bool bLocationChanged = ( _rURL !=
m_pImpl->getDocFileLocation() );
1045 if ( bLocationChanged )
1048 uno::Reference<embed::XStorage> xTargetStorage(
1051 if (
m_pImpl->isEmbeddedDatabase() )
1055 m_pImpl->commitEmbeddedStorage();
1059 Reference< XStorage > xCurrentStorage(
m_pImpl->getRootStorage() );
1060 if ( xCurrentStorage.is() )
1061 xCurrentStorage->copyToStorage( xTargetStorage );
1071 xNewRootStorage =
m_pImpl->switchToStorage( xTargetStorage );
1073 m_pImpl->m_bDocumentReadOnly =
false;
1077 Reference< XStorage > xCurrentStorage(
m_pImpl->getOrCreateRootStorage(), UNO_SET_THROW );
1078 Sequence< PropertyValue > aMediaDescriptor( lcl_appendFileNameToDescriptor( _rArguments, _rURL ) );
1082 m_pImpl->setDocFileLocation( _rURL );
1083 m_pImpl->setResource( _rURL, aMediaDescriptor );
1086 if ( bIsInitializationProcess )
1091 if ( !bIsInitializationProcess )
1097 if ( !bIsInitializationProcess )
1103 Any aError = ::cppu::getCaughtException();
1106 if ( !bIsInitializationProcess )
1113 if ( !bIsInitializationProcess )
1121 if ( xNewRootStorage.is() )
1127 Reference< ucb::XSimpleFileAccess3 > xTempAccess(ucb::SimpleFileAccess::create(
m_pImpl->m_aContext));
1128 Reference< io::XStream >
xStream = xTempAccess->openFileReadWrite( _rURL );
1129 Reference< io::XTruncate > xTruncate(
xStream,UNO_QUERY);
1130 if ( xTruncate.is() )
1132 xTruncate->truncate();
1134 Sequence<Any> aParam{
Any(
xStream),
Any(ElementModes::READWRITE | ElementModes::TRUNCATE) };
1136 Reference< XSingleServiceFactory > xStorageFactory(
m_pImpl->createStorageFactory(), UNO_SET_THROW );
1137 return Reference< XStorage >( xStorageFactory->createInstanceWithArguments( aParam ), UNO_QUERY_THROW );
1141 const ::comphelper::NamedValueCollection& _rArguments,
const OUString& _rURL)
const
1144 uno::Reference<embed::XStorage> xTargetStorage;
1145 _rArguments.get(
"TargetStorage") >>= xTargetStorage;
1146 if (!xTargetStorage.is())
1150 OUString sStreamRelPath = _rArguments.getOrDefault(
"StreamRelPath", OUString());
1151 if (!sStreamRelPath.isEmpty())
1153 = xTargetStorage->openStorageElement(sStreamRelPath, embed::ElementModes::READWRITE);
1155 return xTargetStorage;
1171 if ( bImplicitInitialization )
1196 if ( bImplicitInitialization )
1202 if ( bImplicitInitialization )
1209 if ( !_rxTargetStorage.is() )
1210 throw IllegalArgumentException( OUString(), *
const_cast< ODatabaseDocument*
>(
this ), 1 );
1213 throw DisposedException( OUString(), *
const_cast< ODatabaseDocument*
>(
this ) );
1218 m_pImpl->commitEmbeddedStorage();
1224 Reference< XStorage > xCurrentStorage =
m_pImpl->getOrCreateRootStorage();
1226 if ( xCurrentStorage.is() && xCurrentStorage != _rxTargetStorage )
1227 xCurrentStorage->copyToStorage( _rxTargetStorage );
1232 lcl_triggerStatusIndicator_throw( aWriteArgs, _rDocGuard,
true );
1234 lcl_triggerStatusIndicator_throw( aWriteArgs, _rDocGuard,
false );
1237 m_pImpl->commitStorageIfWriteable_ignoreErrors(_rxTargetStorage);
1260 const ::comphelper::NamedValueCollection
aArguments(_rArguments);
1265 Sequence<PropertyValue> aMediaDescriptor(lcl_appendFileNameToDescriptor(
aArguments, _rURL));
1272 Any aError = ::cppu::getCaughtException();
1323 bool bModifiedChanged = (
m_pImpl->m_bModified != _bModified ) && ( !
m_pImpl->isModifyLocked() );
1325 if ( bModifiedChanged )
1327 m_pImpl->m_bModified = _bModified;
1333 if ( bModifiedChanged )
1335 lang::EventObject
aEvent( *
this );
1363 if ( EventName.isEmpty() )
1364 throw IllegalArgumentException( OUString(), *
this, 1 );
1382 OSL_FAIL(
"ODatabaseDocument::getPrinter: not supported!" );
1383 return Sequence< PropertyValue >();
1388 OSL_FAIL(
"ODatabaseDocument::setPrinter: not supported!" );
1393 OSL_FAIL(
"ODatabaseDocument::print: not supported!" );
1398 Reference< XChild > xChild( _rxContainer.get(), UNO_QUERY );
1400 xChild->setParent( *
this );
1405 Reference< XNameAccess > xContainer = _rxContainer;
1406 ::comphelper::disposeComponent( xContainer );
1408 Reference< XChild > xChild( _rxContainer.get(),UNO_QUERY );
1410 xChild->setParent(
nullptr );
1411 _rxContainer.clear();
1417 throw IllegalArgumentException();
1421 WeakReference< XNameAccess >& rContainerRef( bFormsContainer ?
m_xForms :
m_xReports );
1422 Reference< XNameAccess > xContainer = rContainerRef;
1423 if ( !xContainer.is() )
1426 css::uno::Reference< css::uno::XInterface > xMy(*
this);
1429 OUString sSupportService;
1430 aValue >>= sSupportService;
1431 if ( !sSupportService.isEmpty() )
1433 Sequence<Any> aArgs{
Any(NamedValue(
"DatabaseDocument",
Any(xMy))) };
1435 m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(sSupportService, aArgs,
m_pImpl->m_aContext),
1437 rContainerRef = xContainer;
1440 if ( !xContainer.is() )
1454 for (
auto const& elem : aCopy)
1461 Reference< XCloseable>
xFrame( elem->getFrame(), UNO_QUERY );
1463 xFrame->close( _bDeliverOwnership );
1465 catch(
const CloseVetoException& ) {
throw; }
1477 for(
const auto& rController : aCopy )
1481 if( rController.is() )
1483 Reference< XFrame >
xFrame( rController->getFrame() );
1484 ::comphelper::disposeComponent(
xFrame );
1509 lang::EventObject
aEvent( *
this );
1511 [&
aEvent, &bDeliverOwnership] (uno::Reference<XCloseListener>
const& xListener) {
1512 return xListener->queryClosing(
aEvent, bDeliverOwnership);
1562 const char* pServiceName,
const Sequence< Any >& _rArguments,
const Sequence< PropertyValue >& rMediaDesc,
1563 const Reference<XStorage>& _xStorageToSaveTo )
const
1565 OSL_ENSURE( pStreamName,
"Need stream name!" );
1566 OSL_ENSURE( pServiceName,
"Need service name!" );
1569 OUString sStreamName = OUString::createFromAscii( pStreamName );
1570 Reference< XStream >
xStream = _xStorageToSaveTo->openStreamElement( sStreamName, ElementModes::READWRITE | ElementModes::TRUNCATE );
1574 Reference< XOutputStream > xOutputStream(
xStream->getOutputStream() );
1575 OSL_ENSURE( xOutputStream.is(),
"Can't create output stream in package!" );
1576 if ( !xOutputStream.is() )
1579 Reference< XSeekable > xSeek( xOutputStream, UNO_QUERY );
1583 Reference< XPropertySet > xStreamProp( xOutputStream, UNO_QUERY_THROW );
1585 xStreamProp->setPropertyValue(
"Compressed",
Any(
true ) );
1592 const Reference< XComponent >& xComponent,
const char* pServiceName,
const Sequence< Any >& _rArguments,
1593 const Sequence< PropertyValue >& rMediaDesc )
const
1595 OSL_ENSURE( xOutputStream.is(),
"I really need an output stream!" );
1596 OSL_ENSURE( xComponent.is(),
"Need component!" );
1597 OSL_ENSURE(
nullptr != pServiceName,
"Need component name!" );
1600 Reference< XWriter > xSaxWriter = xml::sax::Writer::create(
m_pImpl->m_aContext );
1603 xSaxWriter->setOutputStream( xOutputStream );
1606 Sequence<Any> aArgs( 1 + _rArguments.getLength() );
1607 auto pArgs = aArgs.getArray();
1608 pArgs[0] <<= xSaxWriter;
1609 for ( sal_Int32 i = 0;
i < _rArguments.getLength(); ++
i )
1610 pArgs[ i+1 ] = _rArguments[i];
1613 Reference< XExporter > xExporter(
m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(OUString::createFromAscii(pServiceName), aArgs,
m_pImpl->m_aContext), UNO_QUERY_THROW );
1616 xExporter->setSourceDocument( xComponent );
1619 Reference< XFilter > xFilter( xExporter, UNO_QUERY_THROW );
1620 xFilter->filter( rMediaDesc );
1626 Sequence< Any > aDelegatorArguments;
1627 lcl_extractStatusIndicator( _rMediaDescriptor, aDelegatorArguments );
1631 xInfoSet->setPropertyValue(
"UsePrettyPrinting",
uno::Any(officecfg::Office::Common::Save::Document::PrettyPrinting::get()));
1632 if ( officecfg::Office::Common::Save::URL::FileSystem::get() )
1634 OUString sBaseURI = _rMediaDescriptor.getOrDefault(
"BaseURI", OUString());
1635 if (sBaseURI.isEmpty())
1636 sBaseURI = _rMediaDescriptor.getOrDefault(
"URL",OUString());
1637 xInfoSet->setPropertyValue(
"BaseURI",
uno::Any(sBaseURI));
1641 xInfoSet->setPropertyValue(
"TargetStorage",
uno::Any(
m_pImpl->getRootStorage()));
1644 OUString sStreamRelPath;
1645 OUString sURL = _rMediaDescriptor.getOrDefault(
"URL", OUString());
1646 if (sURL.startsWithIgnoreAsciiCase(
"vnd.sun.star.pkg:"))
1651 if (sStreamRelPath.startsWith(
"/"))
1652 sStreamRelPath = sStreamRelPath.copy(1);
1654 if (!sStreamRelPath.isEmpty())
1655 xInfoSet->setPropertyValue(
"StreamRelPath",
uno::Any(sStreamRelPath));
1657 sal_Int32 nArgsLen = aDelegatorArguments.getLength();
1658 aDelegatorArguments.realloc(nArgsLen+1);
1659 aDelegatorArguments.getArray()[nArgsLen++] <<= xInfoSet;
1661 Reference< XPropertySet > xProp( _rxTargetStorage, UNO_QUERY_THROW );
1678 if (!aVersion.isEmpty())
1682 xProp->setPropertyValue(
"Version" ,
uno::Any(aVersion));
1684 catch (
const uno::Exception&)
1690 Reference< XComponent > xComponent( *
const_cast< ODatabaseDocument*
>(
this ), UNO_QUERY_THROW );
1692 Sequence< PropertyValue > aMediaDescriptor;
1693 _rMediaDescriptor >>= aMediaDescriptor;
1695 xInfoSet->setPropertyValue(
"StreamName",
uno::Any(OUString(
"settings.xml")));
1697 aDelegatorArguments, aMediaDescriptor, _rxTargetStorage );
1699 xInfoSet->setPropertyValue(
"StreamName",
uno::Any(OUString(
"content.xml")));
1701 aDelegatorArguments, aMediaDescriptor, _rxTargetStorage );
1703 if ( _rxTargetStorage->hasByName (
sPictures ) )
1709 Reference< XStorageBasedLibraryContainer > xDlgs =
m_pImpl->getLibraryContainer(
false );
1721 m_pImpl->storeLibraryContainersTo( _rxTargetStorage );
1737 OUString aUIConfigFolderName(
"Configurations2" );
1740 Reference< XStorage > xConfigStorage =
getDocumentSubStorage( aUIConfigFolderName, ElementModes::READWRITE );
1741 if ( xConfigStorage.is() )
1743 OUString aMediaType;
1744 Reference< XPropertySet > xPropSet( xConfigStorage, UNO_QUERY );
1746 if ( !(
a >>= aMediaType ) || aMediaType.isEmpty() )
1748 a <<= OUString(
"application/vnd.sun.xml.ui.configuration");
1766 Reference< XDocumentSubStorageSupplier > xStorageAccess(
m_pImpl->getDocumentSubStorageSupplier() );
1767 return xStorageAccess->getDocumentSubStorage( aStorageName, nMode );
1772 Reference< XDocumentSubStorageSupplier > xStorageAccess(
m_pImpl->getDocumentSubStorageSupplier() );
1773 return xStorageAccess->getDocumentSubStoragesNames();
1778 Reference< XInterface > xMe( *
this );
1781 [&xMe, &xNewRootStorage] (uno::Reference<XStorageChangeListener>
const& xListener) {
1782 return xListener->notifyStorageChange(xMe, xNewRootStorage);
1791 OSL_ENSURE( ODatabaseDocument_OfficeDocument::rBHelper.bDisposed,
"ODatabaseDocument::disposing: no impl anymore, but not yet disposed!" );
1798 Reference< XModel > xHoldAlive(
this );
1802 lang::EventObject aDisposeEvent(
static_cast<XWeak*
>(
this));
1812 std::vector< Reference< XInterface > > aKeepAlive;
1819 "ODatabaseDocument::disposing: there still are controllers!");
1825 aKeepAlive.push_back(xUIInterface);
1835 m_pImpl->resetMacroExecutionMode();
1846 "ODatabaseDocument::disposing: there still are controllers!");
1851 aKeepAlive.push_back(xModuleInterface);
1857 aKeepAlive.push_back(xTitleInterface);
1871 ::cppu::WeakComponentImplHelperBase::dispose();
1876 ::cppu::WeakComponentImplHelperBase::addEventListener( _xListener );
1881 ::cppu::WeakComponentImplHelperBase::removeEventListener( _xListener );
1887 return "com.sun.star.comp.dba.ODatabaseDocument";
1892 return {
"com.sun.star.sdb.OfficeDatabaseDocument",
"com.sun.star.document.OfficeDocument" };
1903 return m_pImpl->getOrCreateDataSource();
1923 xInfoSet->setPropertyValue(
"StreamName",
uno::Any(OUString(
"content.xml")));
1924 xInfoSet->setPropertyValue(
"SourceStorage",
uno::Any(xStorage));
1926 uno::Sequence<uno::Any> aFilterCreationArgs{
Any(xInfoSet) };
1928 uno::Reference<document::XImporter> xImporter(
m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(
"com.sun.star.comp.sdb.DBFilter", aFilterCreationArgs,
m_pImpl->m_aContext), uno::UNO_QUERY_THROW);
1930 uno::Reference<lang::XComponent> xComponent(*
this, uno::UNO_QUERY_THROW);
1931 xImporter->setTargetDocument(xComponent);
1933 uno::Reference<document::XFilter> xFilter(xImporter, uno::UNO_QUERY_THROW);
1934 uno::Sequence<beans::PropertyValue> aFilterArgs;
1935 xFilter->filter(aFilterArgs);
1954 Reference< XStorage > xNewRootStorage(
m_pImpl->switchToStorage( _rxNewRootStorage ) );
1963 return m_pImpl->getOrCreateRootStorage();
1981 return m_pImpl->getLibraryContainer(
true );
1987 return m_pImpl->getLibraryContainer(
false );
1993 return m_pImpl->adjustMacroMode_AutoReject();
2006 if ( !xScriptProvider.is() )
2008 Reference < XScriptProviderFactory >
xFactory =
2009 theMasterScriptProviderFactory::get(
m_pImpl->m_aContext );
2011 Any aScriptProviderContext;
2013 aScriptProviderContext <<= Reference< XModel >(
this );
2015 xScriptProvider.set(
xFactory->createScriptProvider( aScriptProviderContext ), UNO_SET_THROW );
2019 return xScriptProvider;
2037 Any operator() (
const Reference<XController>& lhs)
const
2051 return new ::comphelper::OAnyEnumeration(aController);
2067 if ( ViewName !=
"Default" && ViewName !=
"Preview" )
2068 throw IllegalArgumentException( OUString(), *
this, 1 );
2070 throw IllegalArgumentException( OUString(), *
this, 3 );
2076 m_pImpl->m_aContext->getServiceManager()->createInstanceWithContext(
"org.openoffice.comp.dbu.OApplicationController",
m_pImpl->m_aContext),
2081 if ( ViewName ==
"Preview" )
2082 aInitArgs.
put(
"Preview",
true );
2083 Reference< XInitialization > xInitController(
xController, UNO_QUERY_THROW );
2093 Reference< XUntitledNumbers > xDesktop(Desktop::create(
m_pImpl->m_aContext), uno::UNO_QUERY_THROW);
2094 Reference< frame::XModel > xThis (
getThis(), uno::UNO_QUERY_THROW);
2108 if (_xComponent.is())
2111 uno::Reference< frame::XUntitledNumbers > xNumberedControllers;
2117 xNumberedControllers = pHelper;
2118 pHelper->setOwner(uno::Reference< frame::XModel >(
this));
2123 xNumberedControllers = aFind->second;
2125 return xNumberedControllers;
2153 xBroadcaster->addTitleChangeListener( xListener );
2163 xBroadcaster->removeTitleChangeListener( xListener );
2195extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
2197 css::uno::Sequence<css::uno::Any>
const &)
2199 Reference<XInterface> xDBContextTunnel(DatabaseContext::create(context), UNO_QUERY_THROW);
2206 css::uno::Reference<XInterface> inst(pImpl->createNewModel_deliverOwnership());
css::uno::Sequence< css::uno::Any > getWrappedPropertyValues() const
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::PropertyValue > getPropertyValues() const
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)
void forEach(FuncT const &func)
static css::uno::Reference< css::embed::XStorage > GetTemporaryStorage(const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
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()
void recoverSubDocuments(const css::uno::Reference< css::embed::XStorage > &i_rDocumentStorage, const css::uno::Reference< css::frame::XController > &i_rTargetController)
recovery sub components from the given document storage, if applicable
void saveModifiedSubComponents(const css::uno::Reference< css::embed::XStorage > &i_rTargetStorage, const std::vector< css::uno::Reference< css::frame::XController > > &i_rControllers)
saves the modified sub components of the given controller(s) to the "recovery" sub storage of the doc...
void addDocumentEventListener(const css::uno::Reference< css::document::XDocumentEventListener > &Listener)
void onDocumentInitialized()
tells the instance that its document is completely initialized now.
void disposing()
disposes the instance @precond the mutex is not locked
void addLegacyEventListener(const css::uno::Reference< css::document::XEventListener > &Listener)
void notifyDocumentEvent(const OUString &EventName, const css::uno::Reference< css::frame::XController2 > &_rxViewController, const css::uno::Any &Supplement)
notifies a document event described by the given parameters
void removeDocumentEventListener(const css::uno::Reference< css::document::XDocumentEventListener > &Listener)
void notifyDocumentEventAsync(const OUString &EventName, const css::uno::Reference< css::frame::XController2 > &ViewController, const css::uno::Any &Supplement)
notifies a document event, described by the given parameters, asynchronously
void removeLegacyEventListener(const css::uno::Reference< css::document::XEventListener > &Listener)
static bool needsSynchronousNotification(std::u16string_view _rEventName)
an extended version of the ModelMethodGuard, which also cares for the initialization state of the doc...
a small base class for UNO components whose functionality depends on an ODatabaseModelImpl
::rtl::Reference< ODatabaseModelImpl > m_pImpl
css::uno::Reference< css::ui::XUIConfigurationManager2 > m_xUIConfigurationManager
bool m_bAllowDocumentScripting
void impl_throwIOExceptionCausedBySave_throw(const css::uno::Any &i_rError, std::u16string_view i_rTargetURL) const
throws an IOException with the message as defined in the RID_STR_ERROR_WHILE_SAVING resource,...
virtual ::sal_Int32 SAL_CALL leaseNumber(const css::uno::Reference< css::uno::XInterface > &xComponent) override
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
css::uno::Reference< css::container::XNameAccess > impl_getDocumentContainer_throw(ODatabaseModelImpl::ObjectType _eType)
retrieves the forms or reports contained, creates and initializes it, if necessary
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getCurrentSelection() override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getArgs() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Controllers m_aControllers
css::uno::WeakReference< css::container::XNameAccess > m_xReports
ODatabaseDocument(const ::rtl::Reference< ODatabaseModelImpl > &_pImpl)
virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
InitState m_eInitState
true if and only if the DatabaseDocument's "initNew" or "load" have been called (or,...
virtual sal_Bool SAL_CALL getAllowMacroExecution() override
virtual void SAL_CALL notifyDocumentEvent(const OUString &EventName, const css::uno::Reference< css::frame::XController2 > &ViewController, const css::uno::Any &Supplement) override
::comphelper::OInterfaceContainerHelper3< css::util::XCloseListener > m_aCloseListener
::comphelper::OInterfaceContainerHelper3< css::util::XModifyListener > m_aModifyListeners
virtual sal_Bool SAL_CALL wasModifiedSinceLastSave() override
virtual OUString SAL_CALL getLocation() override
virtual void SAL_CALL initNew() override
virtual void SAL_CALL unlockControllers() override
void impl_storeToStorage_throw(const css::uno::Reference< css::embed::XStorage > &_rxTargetStorage, const css::uno::Sequence< css::beans::PropertyValue > &_rMediaDescriptor, DocumentGuard &_rDocGuard) const
stores the document to the given storage
css::uno::Reference< css::frame::XTitle > const & impl_getTitleHelper_throw()
void impl_notifyStorageChange_nolck_nothrow(const css::uno::Reference< css::embed::XStorage > &_rxNewRootStorage)
notifies our storage change listeners that our underlying storage changed
virtual void SAL_CALL lockControllers() override
virtual css::uno::Reference< css::script::XStorageBasedLibraryContainer > SAL_CALL getBasicLibraries() override
css::uno::Reference< css::ui::XUIConfigurationManager2 > const & getUIConfigurationManager2()
virtual void SAL_CALL setTitle(const OUString &sTitle) override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getReportDocuments() override
virtual void SAL_CALL connectController(const css::uno::Reference< css::frame::XController > &Controller) override
static void clearObjectContainer(css::uno::WeakReference< css::container::XNameAccess > &_rxContainer)
clears the given object container
void impl_closeControllerFrames_nolck_throw(bool _bDeliverOwnership)
closes the frames of all connected controllers
void impl_reparent_nothrow(const css::uno::WeakReference< css::container::XNameAccess > &_rxContainer)
does a reparenting at the given object container to ourself
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL getControllers() override
virtual void SAL_CALL storeToStorage(const css::uno::Reference< css::embed::XStorage > &xStorage, const css::uno::Sequence< css::beans::PropertyValue > &aMediaDescriptor) override
virtual sal_Bool SAL_CALL isReadonly() override
virtual void SAL_CALL removeDocumentEventListener(const css::uno::Reference< css::document::XDocumentEventListener > &Listener) override
DocumentEventNotifier m_aEventNotifier
virtual void SAL_CALL setPrinter(const css::uno::Sequence< css::beans::PropertyValue > &aPrinter) override
css::uno::WeakReference< css::container::XNameAccess > m_xForms
virtual void SAL_CALL storeToURL(const OUString &sURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments) override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getFormDocuments() override
virtual void SAL_CALL recoverFromFile(const OUString &i_SourceLocation, const OUString &i_SalvagedFile, const css::uno::Sequence< css::beans::PropertyValue > &i_MediaDescriptor) override
virtual css::uno::Reference< css::embed::XStorage > SAL_CALL getDocumentSubStorage(const OUString &aStorageName, sal_Int32 nMode) override
virtual ::css::uno::Sequence< ::css::beans::PropertyValue > SAL_CALL getArgs2(const ::css::uno::Sequence< ::rtl::OUString > &requestedArgs) override
virtual void SAL_CALL switchToStorage(const css::uno::Reference< css::embed::XStorage > &xStorage) override
css::uno::Reference< css::embed::XStorage > impl_createStorageFor_throw(const OUString &_rURL) const
creates a storage for the given URL, truncating it if a file with this name already exists
virtual css::uno::Sequence< OUString > SAL_CALL getDocumentSubStoragesNames() override
virtual void SAL_CALL setCurrentController(const css::uno::Reference< css::frame::XController > &Controller) override
virtual void SAL_CALL removeStorageChangeListener(const css::uno::Reference< css::document::XStorageChangeListener > &xListener) override
virtual void SAL_CALL setArgs(const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
::rtl::Reference< DocumentEventExecutor > m_pEventExecutor
virtual void SAL_CALL dispose() override
bool m_bEmbedded
If XModel::attachResource() was called to inform us that the document is embedded into another one.
TNumberedController m_aNumberedControllers
void impl_disposeControllerFrames_nothrow()
disposes the frames of all controllers which are still left in m_aControllers.
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &_rType) override
void impl_storeAs_throw(const OUString &_rURL, const ::comphelper::NamedValueCollection &_rArguments, const StoreType _eType, DocumentGuard &_rGuard)
stores the document to the given URL, rebases it to the respective new storage, if necessary,...
static void impl_import_nolck_throw(const css::uno::Reference< css::uno::XComponentContext > &_rContext, const css::uno::Reference< css::uno::XInterface > &_rxTargetComponent, const ::comphelper::NamedValueCollection &_rResource)
imports the document from the given resource.
void WriteThroughComponent(const css::uno::Reference< css::lang::XComponent > &xComponent, const char *pStreamName, const char *pServiceName, const css::uno::Sequence< css::uno::Any > &rArguments, const css::uno::Sequence< css::beans::PropertyValue > &rMediaDesc, const css::uno::Reference< css::embed::XStorage > &_xStorageToSaveTo) const
write a single XML stream into the package
virtual css::uno::Reference< css::script::provider::XScriptProvider > SAL_CALL getScriptProvider() override
virtual css::uno::Reference< css::frame::XController > SAL_CALL getCurrentController() override
virtual ~ODatabaseDocument() override
virtual void SAL_CALL releaseNumber(::sal_Int32 nNumber) override
css::uno::Reference< css::frame::XModuleManager2 > m_xModuleManager
such module manager is used to classify new opened documents.
void impl_setModified_nothrow(bool _bModified, DocumentGuard &_rGuard)
sets our "modified" flag
virtual void SAL_CALL release() noexcept override
virtual void SAL_CALL addTitleChangeListener(const css::uno::Reference< css::frame::XTitleChangeListener > &xListener) override
virtual void SAL_CALL storeToRecoveryFile(const OUString &i_TargetLocation, const css::uno::Sequence< css::beans::PropertyValue > &i_MediaDescriptor) override
virtual void SAL_CALL print(const css::uno::Sequence< css::beans::PropertyValue > &xOptions) override
virtual void SAL_CALL disposing() override
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableViewControllerNames() override
virtual void SAL_CALL load(const css::uno::Sequence< css::beans::PropertyValue > &lArguments) override
virtual void SAL_CALL acquire() noexcept override
::comphelper::OInterfaceContainerHelper3< css::document::XStorageChangeListener > m_aStorageListeners
virtual void SAL_CALL addCloseListener(const css::uno::Reference< css::util::XCloseListener > &Listener) override
void impl_setInitialized()
tells the model its initialization is done
virtual css::uno::Reference< css::frame::XController2 > SAL_CALL createDefaultViewController(const css::uno::Reference< css::frame::XFrame > &Frame) override
virtual sal_Bool SAL_CALL hasControllersLocked() override
virtual sal_Bool SAL_CALL isModified() override
virtual void SAL_CALL disconnectController(const css::uno::Reference< css::frame::XController > &Controller) override
css::uno::WeakReference< css::script::provider::XScriptProvider > m_xScriptProvider
virtual void SAL_CALL store() override
ViewMonitor m_aViewMonitor
void impl_writeStorage_throw(const css::uno::Reference< css::embed::XStorage > &_rxTargetStorage, const ::comphelper::NamedValueCollection &_rMediaDescriptor) const
writes the content and settings
bool impl_isInitialized() const
returns whether the model is already initialized, i.e.
virtual void SAL_CALL setModified(sal_Bool bModified) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
void impl_setInitializing()
tells the model it is being initialized now
virtual css::uno::Reference< css::frame::XController2 > SAL_CALL createViewController(const OUString &ViewName, const css::uno::Sequence< css::beans::PropertyValue > &Arguments, const css::uno::Reference< css::frame::XFrame > &Frame) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual OUString SAL_CALL getTitle() override
virtual void SAL_CALL loadFromStorage(const css::uno::Reference< css::embed::XStorage > &xStorage, const css::uno::Sequence< css::beans::PropertyValue > &aMediaDescriptor) override
bool impl_isInitializing() const
returns whether the model is currently being initialized
virtual void SAL_CALL addDocumentEventListener(const css::uno::Reference< css::document::XDocumentEventListener > &Listener) override
virtual OUString SAL_CALL getURL() override
virtual void SAL_CALL removeCloseListener(const css::uno::Reference< css::util::XCloseListener > &Listener) override
css::uno::Reference< css::embed::XStorage > impl_GetStorageOrCreateFor_throw(const ::comphelper::NamedValueCollection &_rArguments, const OUString &_rURL) const
Extracts storage from arguments, or creates for the given URL, truncating it if a file with this name...
css::uno::Reference< css::frame::XUntitledNumbers > impl_getUntitledHelper_throw(const css::uno::Reference< css::uno::XInterface > &_xComponent=css::uno::Reference< css::uno::XInterface >())
virtual css::uno::Reference< css::ui::XUIConfigurationManager > SAL_CALL getUIConfigurationManager() override
bool impl_attachResource(const OUString &i_rLogicalDocumentURL, const css::uno::Sequence< css::beans::PropertyValue > &i_rMediaDescriptor, DocumentGuard &_rDocGuard)
impl-version of attachResource
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL addStorageChangeListener(const css::uno::Reference< css::document::XStorageChangeListener > &xListener) override
virtual css::uno::Reference< css::script::XStorageBasedLibraryContainer > SAL_CALL getDialogLibraries() override
virtual sal_Bool SAL_CALL hasLocation() override
virtual OUString SAL_CALL getUntitledPrefix() override
virtual css::uno::Reference< css::document::XEmbeddedScripts > SAL_CALL getScriptContainer() override
css::uno::Reference< css::frame::XTitle > m_xTitleHelper
virtual css::uno::Reference< css::uno::XInterface > getThis() const override
returns the component itself
virtual sal_Bool SAL_CALL attachResource(const OUString &URL, const css::uno::Sequence< css::beans::PropertyValue > &Arguments) override
css::uno::Reference< css::frame::XController > m_xCurrentController
virtual void SAL_CALL storeAsURL(const OUString &sURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments) override
virtual css::uno::Reference< css::embed::XStorage > SAL_CALL getDocumentStorage() override
virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents() override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getPrinter() override
void impl_reset_nothrow()
resets everything
virtual css::uno::Reference< css::sdbc::XDataSource > SAL_CALL getDataSource() override
virtual void SAL_CALL removeTitleChangeListener(const css::uno::Reference< css::frame::XTitleChangeListener > &xListener) override
virtual void SAL_CALL releaseNumberForComponent(const css::uno::Reference< css::uno::XInterface > &xComponent) override
virtual void SAL_CALL close(sal_Bool DeliverOwnership) override
std::unique_ptr< DocumentEvents > m_pEventContainer
::comphelper::NamedValueCollection stripLoadArguments(const ::comphelper::NamedValueCollection &_rArguments)
static OUString loadString(TranslateId pResId)
loads the string with the specified resource id
bool m_bLastIsFirstEverController
bool m_bEverHadController
bool onControllerConnected(const css::uno::Reference< css::frame::XController > &_rxController)
to be called when a view (aka controller) has been connected to the document
css::uno::Reference< css::frame::XController > m_xLastConnectedController
DocumentEventNotifier & m_rEventNotifier
bool onSetCurrentController(const css::uno::Reference< css::frame::XController > &_rxController)
to be called when a controller is set as current controller
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_dba_ODatabaseDocument(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
constexpr OUStringLiteral MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII
constexpr OUStringLiteral ODFVER_013_TEXT
constexpr OUStringLiteral ODFVER_012_TEXT
Reference< XSingleServiceFactory > xFactory
Sequence< PropertyValue > aArguments
COMPHELPER_DLLPUBLIC css::uno::Reference< css::beans::XPropertySet > GenericPropertySet_CreateInstance(PropertySetInfo *pInfo)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
std::shared_ptr< OContentHelper_Impl > TContentPtr
std::vector< css::uno::Reference< css::frame::XController > > Controllers
OUString extractExceptionMessage(const css::uno::Reference< css::uno::XComponentContext > &_rContext, const css::uno::Any &_rError)
retrieves a to-be-displayed string for a given caught exception;
cppu::PartialWeakComponentImplHelper< css::frame::XModel3, css::util::XModifiable, css::frame::XStorable, css::document::XEventBroadcaster, css::document::XDocumentEventBroadcaster, css::view::XPrintable, css::util::XCloseable, css::lang::XServiceInfo, css::sdb::XOfficeDatabaseDocument, css::ui::XUIConfigurationManagerSupplier, css::document::XStorageBasedDocument, css::document::XEmbeddedScripts, css::document::XScriptInvocationContext, css::script::provider::XScriptProviderSupplier, css::document::XEventsSupplier, css::frame::XLoadable, css::document::XDocumentRecovery > ODatabaseDocument_OfficeDocument
static void lcl_uglyHackToStoreDialogeEmbedImages(const Reference< XStorageBasedLibraryContainer > &xDlgCont, const Reference< XStorage > &xStorage, const Reference< XModel > &rxModel, const Reference< XComponentContext > &rxContext)
constexpr OUStringLiteral sPictures
::osl::Mutex & getMutex()
enumrange< T >::Iterator begin(enumrange< T >)
void SearchForGraphics(uno::Reference< uno::XInterface > const &xInterface, std::vector< uno::Reference< css::graphic::XGraphic > > &raGraphicList)
UNOTOOLS_DLLPUBLIC SvtSaveOptions::ODFSaneDefaultVersion GetODFSaneDefaultVersion()
constexpr OUStringLiteral INFO_MEDIATYPE
constexpr OUStringLiteral SERVICE_SDB_APPLICATIONCONTROLLER
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>
constexpr OUStringLiteral sLibrary