22#include <com/sun/star/beans/XPropertySet.hpp>
23#include <com/sun/star/container/XChild.hpp>
24#include <com/sun/star/util/XModifiable.hpp>
25#include <com/sun/star/sdb/XDocumentDataSource.hpp>
26#include <com/sun/star/task/InteractionRequestStringResolver.hpp>
27#include <com/sun/star/embed/XTransactedObject.hpp>
28#include <com/sun/star/embed/ElementModes.hpp>
51 Reference<XDocumentDataSource> xDocumentDataSource(xDs,UNO_QUERY);
52 if ( xDocumentDataSource.is() )
53 xDs = xDocumentDataSource->getDatabaseDocument();
54 Reference< XModifiable > xModi( xDs, UNO_QUERY );
56 xModi->setModified(
true);
59 Reference< XInterface >
getDataSource(
const Reference< XInterface >& _rxDependentObject )
61 Reference< XInterface > xParent = _rxDependentObject;
62 Reference< XInterface > xReturn;
66 Reference<XChild> xChild(xParent,UNO_QUERY);
67 xParent.set(xChild.is() ? xChild->getParent() : Reference< XInterface >(),UNO_QUERY);
74 OUString sDisplayMessage;
78 Reference< XInteractionRequestStringResolver > xStringResolver = InteractionRequestStringResolver::create(_rContext);
80 ::rtl::Reference pRequest( new ::comphelper::OInteractionRequest( _rError ) );
82 pRequest->addContinuation( pApprove );
83 Optional< OUString > aMessage = xStringResolver->getStringFromInformationalRequest( pRequest );
84 if ( aMessage.IsPresent )
85 sDisplayMessage = aMessage.Value;
92 if ( sDisplayMessage.isEmpty() )
97 sDisplayMessage = _rError.getValueTypeName() +
102 return sDisplayMessage;
105 namespace tools::stor {
109 if ( !_rxStorage.is() )
112 sal_Int32 nMode = ElementModes::READ;
115 Reference< XPropertySet > xStorageProps( _rxStorage, UNO_QUERY_THROW );
116 xStorageProps->getPropertyValue(
"OpenMode" ) >>= nMode;
122 return ( nMode & ElementModes::WRITE ) != 0;
127 bool bSuccess =
false;
128 Reference< XTransactedObject > xTrans( _rxStorage, UNO_QUERY );
#define DBG_UNHANDLED_EXCEPTION(...)
css::uno::Reference< css::uno::XInterface > getDataSource(const css::uno::Reference< css::uno::XInterface > &_rxDependentObject)
void notifyDataSourceModified(const css::uno::Reference< css::uno::XInterface > &_rxObject)
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;