diff options
Diffstat (limited to 'dbaccess/source/core/dataaccess/documentdefinition.cxx')
-rw-r--r-- | dbaccess/source/core/dataaccess/documentdefinition.cxx | 179 |
1 files changed, 86 insertions, 93 deletions
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 2778a616597e..227bde4cde1b 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -21,16 +21,19 @@ #include <ModelImpl.hxx> #include <stringconstants.hxx> #include <sdbcoretools.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <osl/diagnose.h> +#include <comphelper/compbase.hxx> #include <comphelper/sequence.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/classids.hxx> #include <comphelper/propertysequence.hxx> +#include <comphelper/propertyvalue.hxx> #include <comphelper/types.hxx> #include <com/sun/star/frame/XUntitledNumbers.hpp> #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/lang/DisposedException.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/frame/XModel.hpp> @@ -75,6 +78,7 @@ #include <com/sun/star/view/XViewSettingsSupplier.hpp> #include <core_resource.hxx> #include <strings.hrc> +#include <strings.hxx> #include <com/sun/star/task/XInteractionApprove.hpp> #include <com/sun/star/task/XInteractionDisapprove.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> @@ -144,22 +148,20 @@ namespace dbaccess } // OEmbedObjectHolder - typedef ::cppu::WeakComponentImplHelper< embed::XStateChangeListener > TEmbedObjectHolder; + typedef ::comphelper::WeakComponentImplHelper< embed::XStateChangeListener > TEmbedObjectHolder; namespace { - class OEmbedObjectHolder : public ::cppu::BaseMutex - ,public TEmbedObjectHolder + class OEmbedObjectHolder : public TEmbedObjectHolder { Reference< XEmbeddedObject > m_xBroadCaster; ODocumentDefinition* m_pDefinition; bool m_bInStateChange; protected: - virtual void SAL_CALL disposing() override; + virtual void disposing(std::unique_lock<std::mutex>& rGuard) override; public: OEmbedObjectHolder(const Reference< XEmbeddedObject >& _xBroadCaster,ODocumentDefinition* _pDefinition) - : TEmbedObjectHolder(m_aMutex) - ,m_xBroadCaster(_xBroadCaster) + : m_xBroadCaster(_xBroadCaster) ,m_pDefinition(_pDefinition) ,m_bInStateChange(false) { @@ -178,7 +180,7 @@ namespace dbaccess } - void SAL_CALL OEmbedObjectHolder::disposing() + void OEmbedObjectHolder::disposing(std::unique_lock<std::mutex>& /*rGuard*/) { if ( m_xBroadCaster.is() ) m_xBroadCaster->removeStateChangeListener(this); @@ -474,21 +476,28 @@ css::uno::Sequence<sal_Int8> ODocumentDefinition::getImplementationId() return css::uno::Sequence<sal_Int8>(); } -IMPLEMENT_GETTYPES3(ODocumentDefinition,OContentHelper,OPropertyStateContainer,ODocumentDefinition_Base); +css::uno::Sequence< css::uno::Type > ODocumentDefinition::getTypes() +{ + return ::comphelper::concatSequences( + OContentHelper::getTypes( ), + OPropertyStateContainer::getTypes( ), + ODocumentDefinition_Base::getTypes( ) + ); +} IMPLEMENT_FORWARD_XINTERFACE3( ODocumentDefinition,OContentHelper,OPropertyStateContainer,ODocumentDefinition_Base) void ODocumentDefinition::registerProperties() { -#define REGISTER_PROPERTY( name, location ) \ - registerProperty( PROPERTY_##name, PROPERTY_ID_##name, PropertyAttribute::READONLY, &location, cppu::UnoType<decltype(location)>::get() ); + registerProperty(PROPERTY_NAME, PROPERTY_ID_NAME, PropertyAttribute::CONSTRAINED | PropertyAttribute::BOUND | PropertyAttribute::READONLY, + &m_pImpl->m_aProps.aTitle, cppu::UnoType<decltype(m_pImpl->m_aProps.aTitle)>::get()); + + registerProperty(PROPERTY_AS_TEMPLATE, PROPERTY_ID_AS_TEMPLATE, PropertyAttribute::READONLY, &m_pImpl->m_aProps.bAsTemplate, + cppu::UnoType<decltype(m_pImpl->m_aProps.bAsTemplate)>::get()); -#define REGISTER_PROPERTY_BV( name, location ) \ - registerProperty( PROPERTY_##name, PROPERTY_ID_##name, PropertyAttribute::CONSTRAINED | PropertyAttribute::BOUND | PropertyAttribute::READONLY, &location, cppu::UnoType<decltype(location)>::get() ); + registerProperty(PROPERTY_PERSISTENT_NAME, PROPERTY_ID_PERSISTENT_NAME, PropertyAttribute::READONLY, &m_pImpl->m_aProps.sPersistentName, + cppu::UnoType<decltype(m_pImpl->m_aProps.sPersistentName)>::get()); - REGISTER_PROPERTY_BV( NAME, m_pImpl->m_aProps.aTitle ); - REGISTER_PROPERTY ( AS_TEMPLATE, m_pImpl->m_aProps.bAsTemplate ); - REGISTER_PROPERTY ( PERSISTENT_NAME, m_pImpl->m_aProps.sPersistentName ); - REGISTER_PROPERTY ( IS_FORM, m_bForm ); + registerProperty(PROPERTY_IS_FORM, PROPERTY_ID_IS_FORM, PropertyAttribute::READONLY, &m_bForm, cppu::UnoType<decltype(m_bForm)>::get()); } void SAL_CALL ODocumentDefinition::getFastPropertyValue( Any& o_rValue, sal_Int32 i_nHandle ) const @@ -498,11 +507,8 @@ void SAL_CALL ODocumentDefinition::getFastPropertyValue( Any& o_rValue, sal_Int3 OUString sPersistentPath; if ( !m_pImpl->m_aProps.sPersistentName.isEmpty() ) { - OUStringBuffer aBuffer; - aBuffer.append( ODatabaseModelImpl::getObjectContainerStorageName( m_bForm ? ODatabaseModelImpl::E_FORM : ODatabaseModelImpl::E_REPORT ) ); - aBuffer.append( '/' ); - aBuffer.append( m_pImpl->m_aProps.sPersistentName ); - sPersistentPath = aBuffer.makeStringAndClear(); + sPersistentPath = ODatabaseModelImpl::getObjectContainerStorageName( m_bForm ? ODatabaseModelImpl::ObjectType::Form : ODatabaseModelImpl::ObjectType::Report ) + + "/" + m_pImpl->m_aProps.sPersistentName; } o_rValue <<= sPersistentPath; return; @@ -529,11 +535,10 @@ IPropertyArrayHelper* ODocumentDefinition::createArrayHelper( ) const describeProperties( aProps ); // properties not maintained by our base class - Sequence< Property > aManualProps( 1 ); - aManualProps[0].Name = PROPERTY_PERSISTENT_PATH; - aManualProps[0].Handle = PROPERTY_ID_PERSISTENT_PATH; - aManualProps[0].Type = ::cppu::UnoType<OUString>::get(); - aManualProps[0].Attributes = PropertyAttribute::READONLY; + Sequence< Property > aManualProps{ { /* Name */ PROPERTY_PERSISTENT_PATH, + /* Handle */ PROPERTY_ID_PERSISTENT_PATH, + /* Type */ ::cppu::UnoType<OUString>::get(), + /* Attributes */ PropertyAttribute::READONLY } }; return new OPropertyArrayHelper( ::comphelper::concatSequences( aProps, aManualProps ) ); } @@ -596,7 +601,7 @@ void ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow( const bool i_bR // ensure that we ourself are kept alive as long as the embedded object's frame is // opened - LifetimeCoupler::couple( *this, xFrame.get() ); + LifetimeCoupler::couple( *this, xFrame ); // init the edit view if ( m_bForm && m_bOpenInDesign && !i_bReactivated ) @@ -715,14 +720,14 @@ void ODocumentDefinition::impl_initFormEditView( const Reference< XController >& LayoutManagerLock aLockLayout( _rxController ); // setting of the visual properties - xViewSettings->setPropertyValue("ShowRulers",makeAny(true)); - xViewSettings->setPropertyValue("ShowVertRuler",makeAny(true)); - xViewSettings->setPropertyValue("ShowHoriRuler",makeAny(true)); - xViewSettings->setPropertyValue("IsRasterVisible",makeAny(true)); - xViewSettings->setPropertyValue("IsSnapToRaster",makeAny(true)); - xViewSettings->setPropertyValue("ShowOnlineLayout",makeAny(true)); - xViewSettings->setPropertyValue("RasterSubdivisionX",makeAny(sal_Int32(5))); - xViewSettings->setPropertyValue("RasterSubdivisionY",makeAny(sal_Int32(5))); + xViewSettings->setPropertyValue("ShowRulers",Any(true)); + xViewSettings->setPropertyValue("ShowVertRuler",Any(true)); + xViewSettings->setPropertyValue("ShowHoriRuler",Any(true)); + xViewSettings->setPropertyValue("IsRasterVisible",Any(true)); + xViewSettings->setPropertyValue("IsSnapToRaster",Any(true)); + xViewSettings->setPropertyValue("ShowOnlineLayout",Any(true)); + xViewSettings->setPropertyValue("RasterSubdivisionX",Any(sal_Int32(5))); + xViewSettings->setPropertyValue("RasterSubdivisionY",Any(sal_Int32(5))); } catch( const Exception& ) { @@ -846,7 +851,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons // So, in such a case, and with 2. above, we would silently execute those macros, // regardless of the global security settings - which would be a security issue, of // course. - if ( m_pImpl->m_pDataSource->determineEmbeddedMacros() == ODatabaseModelImpl::eNoMacros ) + if ( m_pImpl->m_pDataSource->determineEmbeddedMacros() == ODatabaseModelImpl::EmbeddedMacros::NONE ) { // this is case 2. from above // So, pass a USE_CONFIG to the to-be-loaded document. This means that @@ -876,14 +881,14 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons { // not supported ucbhelper::cancelCommandExecution( - makeAny( UnsupportedOpenModeException( + Any( UnsupportedOpenModeException( OUString(), static_cast< cppu::OWeakObject * >( this ), sal_Int16( nOpenMode ) ) ), _rxEnvironment ); // Unreachable OSL_FAIL( "unreachable" ); - } + } OSL_ENSURE( !m_pImpl->m_aProps.sPersistentName.isEmpty(), "ODocumentDefinition::onCommandOpenSomething: no persistent name - cannot load!" ); @@ -924,8 +929,8 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons xReportEngine->setReportDefinition(xReportDefinition); xReportEngine->setActiveConnection(m_xLastKnownConnection); if ( bOpenHidden ) - return makeAny( xReportEngine->createDocumentModel() ); - return makeAny( xReportEngine->createDocumentAlive( nullptr ) ); + return Any( xReportEngine->createDocumentModel() ); + return Any( xReportEngine->createDocumentAlive( nullptr ) ); } if ( _bActivate && !bOpenHidden ) @@ -937,13 +942,13 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons else { // ensure that we ourself are kept alive as long as the document is open - LifetimeCoupler::couple( *this, xModel.get() ); + LifetimeCoupler::couple( *this, xModel ); } if ( !m_bForm && m_pImpl->m_aProps.bAsTemplate && !m_bOpenInDesign ) ODocumentDefinition::fillReportData( m_aContext, getComponent(), xConnection ); - return makeAny( xModel ); + return Any( xModel ); } Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 CommandId, const Reference< XCommandEnvironment >& Environment ) @@ -990,7 +995,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co if ( !bIsAliveNewStyleReport ) { impl_onActivateEmbeddedObject_nothrow( true ); - return makeAny( getComponent() ); + return Any( getComponent() ); } } } @@ -1011,7 +1016,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co { OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( - makeAny( IllegalArgumentException( + Any( IllegalArgumentException( OUString(), static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -1037,7 +1042,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co { OSL_FAIL( "Wrong argument count!" ); ucbhelper::cancelCommandExecution( - makeAny( IllegalArgumentException( + Any( IllegalArgumentException( OUString(), static_cast< cppu::OWeakObject * >( this ), -1 ) ), @@ -1108,7 +1113,7 @@ namespace try { Reference< XPropertySet > xFormProps( xForm, UNO_QUERY_THROW ); - xFormProps->setPropertyValue( PROPERTY_DATASOURCENAME, makeAny( OUString() ) ); + xFormProps->setPropertyValue( PROPERTY_DATASOURCENAME, Any( OUString() ) ); } catch( const Exception& ) { @@ -1154,7 +1159,7 @@ void ODocumentDefinition::onCommandInsert( const OUString& _sURL, const Referenc Sequence<OUString> aProps { PROPERTY_URL }; ucbhelper::cancelCommandExecution( - makeAny( MissingPropertiesException( + Any( MissingPropertiesException( OUString(), static_cast< cppu::OWeakObject * >( this ), aProps ) ), @@ -1168,9 +1173,9 @@ void ODocumentDefinition::onCommandInsert( const OUString& _sURL, const Referenc if ( xStorage.is() ) { Reference< XEmbeddedObjectCreator> xEmbedFactory = EmbeddedObjectCreator::create(m_aContext); - Sequence<PropertyValue> aEmpty,aMediaDesc(1); - aMediaDesc[0].Name = PROPERTY_URL; - aMediaDesc[0].Value <<= _sURL; + Sequence<PropertyValue> aEmpty; + Sequence<PropertyValue> aMediaDesc{ comphelper::makePropertyValue(PROPERTY_URL, + _sURL) }; m_xEmbeddedObject.set(xEmbedFactory->createInstanceInitFromMediaDescriptor( xStorage ,m_pImpl->m_aProps.sPersistentName ,aMediaDesc @@ -1224,11 +1229,10 @@ bool ODocumentDefinition::save(bool _bApprove, const css::uno::Reference<css::aw } aRequest.Content.set(m_xParentContainer,UNO_QUERY); - OInteractionRequest* pRequest = new OInteractionRequest(makeAny(aRequest)); - Reference< XInteractionRequest > xRequest(pRequest); + rtl::Reference<OInteractionRequest> pRequest = new OInteractionRequest(Any(aRequest)); // some knittings // two continuations allowed: OK and Cancel - ODocumentSaveContinuation* pDocuSave = nullptr; + rtl::Reference<ODocumentSaveContinuation> pDocuSave; if ( m_pImpl->m_aProps.aTitle.isEmpty() ) { @@ -1237,21 +1241,21 @@ bool ODocumentDefinition::save(bool _bApprove, const css::uno::Reference<css::aw } if ( _bApprove ) { - OInteraction< XInteractionApprove >* pApprove = new OInteraction< XInteractionApprove >; + rtl::Reference<OInteraction< XInteractionApprove >> pApprove = new OInteraction< XInteractionApprove >; pRequest->addContinuation(pApprove); } - OInteraction< XInteractionDisapprove >* pDisApprove = new OInteraction< XInteractionDisapprove >; + rtl::Reference<OInteraction< XInteractionDisapprove >> pDisApprove = new OInteraction< XInteractionDisapprove >; pRequest->addContinuation(pDisApprove); - OInteractionAbort* pAbort = new OInteractionAbort; + rtl::Reference<OInteractionAbort> pAbort = new OInteractionAbort; pRequest->addContinuation(pAbort); Reference<XWindow> xDialogParent(rDialogParent, UNO_QUERY); // create the handler, let it handle the request Reference<XInteractionHandler2> xHandler(InteractionHandler::createWithParent(m_aContext, xDialogParent)); - xHandler->handle(xRequest); + xHandler->handle(pRequest); if ( pAbort->wasSelected() ) return false; @@ -1266,7 +1270,7 @@ bool ODocumentDefinition::save(bool _bApprove, const css::uno::Reference<css::aw m_pImpl->m_aProps.aTitle = pDocuSave->getName(); Reference< XContent> xContent = this; - xNC->insertByName(pDocuSave->getName(),makeAny(xContent)); + xNC->insertByName(pDocuSave->getName(),Any(xContent)); updateDocumentTitle(); } @@ -1311,20 +1315,19 @@ void ODocumentDefinition::saveAs() aRequest.Name = m_pImpl->m_aProps.aTitle; aRequest.Content.set(m_xParentContainer,UNO_QUERY); - OInteractionRequest* pRequest = new OInteractionRequest(makeAny(aRequest)); - Reference< XInteractionRequest > xRequest(pRequest); + rtl::Reference<OInteractionRequest> pRequest = new OInteractionRequest(Any(aRequest)); // some knittings // two continuations allowed: OK and Cancel - ODocumentSaveContinuation* pDocuSave = new ODocumentSaveContinuation; + rtl::Reference<ODocumentSaveContinuation> pDocuSave = new ODocumentSaveContinuation; pRequest->addContinuation(pDocuSave); - OInteraction< XInteractionDisapprove >* pDisApprove = new OInteraction< XInteractionDisapprove >; + rtl::Reference<OInteraction< XInteractionDisapprove >> pDisApprove = new OInteraction< XInteractionDisapprove >; pRequest->addContinuation(pDisApprove); - OInteractionAbort* pAbort = new OInteractionAbort; + rtl::Reference<OInteractionAbort> pAbort = new OInteractionAbort; pRequest->addContinuation(pAbort); // create the handler, let it handle the request Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext, nullptr) ); - xHandler->handle(xRequest); + xHandler->handle(pRequest); if ( pAbort->wasSelected() ) return; @@ -1358,7 +1361,7 @@ void ODocumentDefinition::saveAs() Reference< XMultiServiceFactory > xORB( m_xParentContainer, UNO_QUERY_THROW ); Reference< XInterface > xComponent( xORB->createInstanceWithArguments( SERVICE_SDB_DOCUMENTDEFINITION, aArguments ) ); Reference< XNameContainer > xNameContainer( m_xParentContainer, UNO_QUERY_THROW ); - xNameContainer->insertByName( sOldName, makeAny( xComponent ) ); + xNameContainer->insertByName( sOldName, Any( xComponent ) ); } catch(const Exception&) { @@ -1384,7 +1387,7 @@ namespace { void lcl_putLoadArgs( ::comphelper::NamedValueCollection& _io_rArgs, const optional_bool& _bSuppressMacros, const optional_bool& _bReadOnly ) { - if ( !!_bSuppressMacros ) + if ( _bSuppressMacros.has_value() ) { if ( *_bSuppressMacros ) { @@ -1401,7 +1404,7 @@ namespace } } - if ( !!_bReadOnly ) + if ( _bReadOnly.has_value() ) _io_rArgs.put( "ReadOnly", *_bReadOnly ); } } @@ -1427,7 +1430,7 @@ namespace bool ODocumentDefinition::objectSupportsEmbeddedScripts() const { bool bAllowDocumentMacros = !m_pImpl->m_pDataSource - || ( m_pImpl->m_pDataSource->determineEmbeddedMacros() == ODatabaseModelImpl::eSubDocumentMacros ); + || ( m_pImpl->m_pDataSource->determineEmbeddedMacros() == ODatabaseModelImpl::EmbeddedMacros::SubDocument ); // if *any* of the objects of the database document already has macros, we // continue to allow it to have them, until the user does a migration. @@ -1446,16 +1449,14 @@ void ODocumentDefinition::separateOpenCommandArguments( const Sequence< Property { ::comphelper::NamedValueCollection aOpenCommandArguments( i_rOpenCommandArguments ); - const char* const pObjectDescriptorArgs[] = - { - "RecoveryStorage" - }; - for (const char* pObjectDescriptorArg : pObjectDescriptorArgs) + static const std::u16string_view sObjectDescriptorArgs[] = { u"RecoveryStorage" }; + for (const auto& rObjectDescriptorArg : sObjectDescriptorArgs) { - if ( aOpenCommandArguments.has( pObjectDescriptorArg ) ) + const OUString sObjectDescriptorArg(rObjectDescriptorArg); + if ( aOpenCommandArguments.has( sObjectDescriptorArg ) ) { - o_rEmbeddedObjectDescriptor.put( pObjectDescriptorArg, aOpenCommandArguments.get( pObjectDescriptorArg ) ); - aOpenCommandArguments.remove( pObjectDescriptorArg ); + o_rEmbeddedObjectDescriptor.put( sObjectDescriptorArg, aOpenCommandArguments.get( sObjectDescriptorArg ) ); + aOpenCommandArguments.remove( sObjectDescriptorArg ); } } @@ -1473,7 +1474,7 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC } m_pInterceptor = new OInterceptor( this ); - Reference<XDispatchProviderInterceptor> xInterceptor = m_pInterceptor.get(); + Reference<XDispatchProviderInterceptor> xInterceptor = m_pInterceptor; ::comphelper::NamedValueCollection aEmbeddedDescriptor; aEmbeddedDescriptor.put( "OutplaceDispatchInterceptor", xInterceptor ); @@ -1565,9 +1566,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_ Reference< XEnumeration > xEnumDrivers = xEnumAccess->createContentEnumeration(sReportEngineServiceName); if ( !xEnumDrivers.is() || !xEnumDrivers->hasMoreElements() ) { - css::io::WrongFormatException aWFE; - aWFE.Message = DBA_RES( RID_STR_MISSING_EXTENSION ); - throw aWFE; + throw css::io::WrongFormatException(DBA_RES(RID_STR_MISSING_EXTENSION)); } } if ( !aClassID.hasElements() ) @@ -1601,8 +1600,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_ { m_pClientHelper = new OEmbeddedClientHelper; } - Reference<XEmbeddedClient> xClient = m_pClientHelper.get(); - m_xEmbeddedObject->setClientSite(xClient); + m_xEmbeddedObject->setClientSite(m_pClientHelper); m_xEmbeddedObject->changeState(EmbedStates::RUNNING); if ( bSetSize ) { @@ -1623,8 +1621,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_ { m_pClientHelper = new OEmbeddedClientHelper; } - Reference<XEmbeddedClient> xClient = m_pClientHelper.get(); - m_xEmbeddedObject->setClientSite(xClient); + m_xEmbeddedObject->setClientSite(m_pClientHelper); Sequence< PropertyValue > aEmbeddedObjectDescriptor; Sequence< PropertyValue > aLoadArgs( fillLoadArgs( @@ -1896,11 +1893,7 @@ OUString SAL_CALL ODocumentDefinition::getHierarchicalName() OUString SAL_CALL ODocumentDefinition::composeHierarchicalName( const OUString& i_rRelativeName ) { - OUStringBuffer aBuffer; - aBuffer.append( getHierarchicalName() ); - aBuffer.append( '/' ); - aBuffer.append( i_rRelativeName ); - return aBuffer.makeStringAndClear(); + return getHierarchicalName() + "/" + i_rRelativeName; } void SAL_CALL ODocumentDefinition::rename( const OUString& _rNewName ) @@ -1931,7 +1924,7 @@ void SAL_CALL ODocumentDefinition::rename( const OUString& _rNewName ) Reference< XStorage> ODocumentDefinition::getContainerStorage() const { return m_pImpl->m_pDataSource - ? m_pImpl->m_pDataSource->getStorage( m_bForm ? ODatabaseModelImpl::E_FORM : ODatabaseModelImpl::E_REPORT ) + ? m_pImpl->m_pDataSource->getStorage( m_bForm ? ODatabaseModelImpl::ObjectType::Form : ODatabaseModelImpl::ObjectType::Report ) : Reference< XStorage>(); } @@ -2081,8 +2074,8 @@ void ODocumentDefinition::firePropertyChange( sal_Int32 i_nHandle, const Any& i_ NameChangeNotifier::NameChangeNotifier( ODocumentDefinition& i_rDocumentDefinition, const OUString& i_rNewName, ::osl::ResettableMutexGuard& i_rClearForNotify ) :m_rDocumentDefinition( i_rDocumentDefinition ) - ,m_aOldValue( makeAny( i_rDocumentDefinition.getCurrentName() ) ) - ,m_aNewValue( makeAny( i_rNewName ) ) + ,m_aOldValue( Any( i_rDocumentDefinition.getCurrentName() ) ) + ,m_aNewValue( Any( i_rNewName ) ) ,m_rClearForNotify( i_rClearForNotify ) { impl_fireEvent_throw( true ); |