diff options
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 9 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.hxx | 7 |
2 files changed, 14 insertions, 2 deletions
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 603a0622b2ba..0fad46db2ff0 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -793,6 +793,15 @@ Sequence< PropertyValue > SAL_CALL ODatabaseDocument::getArgs( ) return m_pImpl->getMediaDescriptor().getPropertyValues(); } +Sequence< PropertyValue > SAL_CALL ODatabaseDocument::getArgs2( const ::css::uno::Sequence< ::rtl::OUString >& requestedArgs ) +{ + DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit ); + std::vector<PropertyValue> aRet; + for (const auto & rArgName : requestedArgs) + aRet.push_back(PropertyValue(rArgName, 0, m_pImpl->getMediaDescriptor().get(rArgName), PropertyState_DIRECT_VALUE)); + return comphelper::containerToSequence(aRet); +} + void SAL_CALL ODatabaseDocument::setArgs(const Sequence<beans::PropertyValue>& /* aArgs */) { throw NoSupportException(); diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx index b1bfbedc61b2..b20a2f3ed1d8 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.hxx +++ b/dbaccess/source/core/dataaccess/databasedocument.hxx @@ -28,7 +28,7 @@ #include <com/sun/star/document/XDocumentSubStorageSupplier.hpp> #include <com/sun/star/frame/DoubleInitializationException.hpp> -#include <com/sun/star/frame/XModel2.hpp> +#include <com/sun/star/frame/XModel3.hpp> #include <com/sun/star/frame/XTitle.hpp> #include <com/sun/star/frame/XTitleChangeBroadcaster.hpp> #include <com/sun/star/frame/XUntitledNumbers.hpp> @@ -130,7 +130,7 @@ private: }; // ODatabaseDocument -typedef cppu::PartialWeakComponentImplHelper< css::frame::XModel2 +typedef cppu::PartialWeakComponentImplHelper< css::frame::XModel3 , css::util::XModifiable , css::frame::XStorable , css::document::XEventBroadcaster @@ -330,6 +330,9 @@ public: 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 void SAL_CALL setArgs(const css::uno::Sequence<css::beans::PropertyValue>& aArgs) override; + // XModel3 + virtual ::css::uno::Sequence< ::css::beans::PropertyValue > SAL_CALL getArgs2( const ::css::uno::Sequence< ::rtl::OUString >& requestedArgs ) override; + // XStorable virtual sal_Bool SAL_CALL hasLocation( ) override ; virtual OUString SAL_CALL getLocation( ) override ; |