22#include <com/sun/star/awt/XWindow.hpp>
23#include <com/sun/star/beans/NamedValue.hpp>
24#include <com/sun/star/beans/PropertyValue.hpp>
25#include <com/sun/star/beans/PropertyAttribute.hpp>
26#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
30#include <osl/diagnose.h>
32#include <osl/mutex.hxx>
35using namespace css::uno;
36using namespace css::lang;
37using namespace css::beans;
38using namespace css::ucb;
46 :OPropertyContainer(GetBroadcastHelper())
48 ,m_bTitleAmbiguous(true)
49 ,m_bInitialized( false )
64 ::osl::MutexGuard aGuard(
m_aMutex );
73 Any aReturn = OGenericUnoDialogBase::queryInterface(_rType);
75 if (!aReturn.hasValue())
76 aReturn = ::cppu::queryInterface(_rType
78 ,
static_cast<XMultiPropertySet*
>(
this)
79 ,
static_cast<XFastPropertySet*
>(
this)
88 return ::comphelper::concatSequences(
89 OGenericUnoDialogBase::getTypes(),
104 OPropertyContainer::setFastPropertyValue_NoBroadcast(
nHandle, rValue);
126 rConvertedValue <<= xNew;
133 return OPropertyContainer::convertFastPropertyValue(rConvertedValue, rOldValue,
nHandle, rValue);
169 OSL_ENSURE(xDialog,
"OGenericUnoDialog::impl_ensureDialog_lck: createDialog returned nonsense!");
175 xDialog->set_title(sTitle);
193 "already executing the dialog (recursive call)",
204 sal_Int16 nReturn(0);
225 PropertyValue aProperty;
227 if ( _rValue >>= aProperty )
231 else if ( _rValue >>= aValue )
244 ::osl::MutexGuard aGuard(
m_aMutex );
246 throw AlreadyInitializedException( OUString(), *
this );
void registerProperty(const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType)
static css::uno::Sequence< css::uno::Type > getBaseTypes()
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
OGenericUnoDialog(const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
bool impl_ensureDialog_lck()
ensures that m_pDialog is not <NULL>
std::unique_ptr< weld::DialogController > m_xDialog
virtual std::unique_ptr< weld::DialogController > createDialog(const css::uno::Reference< css::awt::XWindow > &rParent)=0
create the concrete dialog instance.
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void executedDialog(sal_Int16)
called after the dialog has been executed
css::uno::Reference< css::awt::XWindow > m_xParent
title of the dialog
OUString m_sTitle
has "initialize" been called?
virtual void implInitialize(const css::uno::Any &_rValue)
smaller form of <method>initialize</method>.
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
virtual ~OGenericUnoDialog() override
bool m_bExecuting
the dialog to execute
void destroyDialog()
called to destroy the dialog used. deletes m_pDialog and resets it to NULL
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &_rType) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
bool m_bInitialized
m_sTitle has not been set yet
virtual void SAL_CALL setTitle(const OUString &aTitle) override
virtual sal_Int16 SAL_CALL execute() override
bool m_bTitleAmbiguous
we're currently executing the dialog
helper class for guarding access to methods of an OGenericUnoDialog
Reference< XComponentContext > m_aContext
#define DBG_UNHANDLED_EXCEPTION(...)
#define UNODIALOG_PROPERTY_ID_TITLE
#define UNODIALOG_PROPERTY_ID_PARENT
Sequence< PropertyValue > aArguments
class SAL_NO_VTABLE XPropertySet
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
VBAHELPER_DLLPUBLIC bool setPropertyValue(css::uno::Sequence< css::beans::PropertyValue > &aProp, const OUString &aName, const css::uno::Any &aValue)
constexpr OUStringLiteral UNODIALOG_PROPERTY_TITLE
constexpr OUStringLiteral UNODIALOG_PROPERTY_PARENT