23 #include <com/sun/star/lang/XEventListener.hpp>
24 #include <com/sun/star/frame/Frame.hpp>
25 #include <com/sun/star/frame/FrameSearchFlag.hpp>
35 :
public cppu::WeakImplHelper<lang::XEventListener>
38 css::uno::Reference<css::frame::XFrame2>
m_xFrame;
40 virtual void SAL_CALL
disposing(
const lang::EventObject& )
override
55 m_xFrame->setComponent(
nullptr,
nullptr);
63 :
SfxDialogController(pParent,
"modules/swriter/ui/tablepreviewdialog.ui",
"TablePreviewDialog")
64 , m_xDescriptionFI(m_xBuilder->weld_label(
"description"))
65 , m_xBeamerWIN(m_xBuilder->weld_container(
"beamer"))
69 m_xBeamerWIN->set_size_request(aSize.Width(), aSize.Height());
71 auto pValue = std::find_if(rValues.begin(), rValues.end(),
72 [](
const beans::PropertyValue& rValue) {
return rValue.Name ==
"Command"; });
73 if (pValue != rValues.end())
77 pValue->Value >>= sTemp;
81 css::uno::Reference<css::frame::XFrame2>
xFrame;
88 catch (uno::Exception
const &)
99 aURL.Complete =
".component:DB/DataSourceBrowser";
100 uno::Reference<frame::XDispatch> xD = xFrame->queryDispatch(aURL,
"",
101 css::frame::FrameSearchFlag::CHILDREN | css::frame::FrameSearchFlag::CREATE);
104 xD->dispatch(aURL, rValues);
SwDBTablePreviewDialog(weld::Window *pParent, css::uno::Sequence< css::beans::PropertyValue > const &rValues)
rtl::Reference< DBTablePreviewFrame > m_xFrameListener
Reference< XFrame > xFrame
DBTablePreviewFrame(const css::uno::Reference< css::frame::XFrame2 > &rFrame)
css::uno::Reference< css::frame::XFrame2 > m_xFrame
virtual ~SwDBTablePreviewDialog() override
std::unique_ptr< weld::Container > m_xBeamerWIN
std::unique_ptr< weld::Label > m_xDescriptionFI
virtual void SAL_CALL disposing(const lang::EventObject &) override
Reference< XComponentContext > getProcessComponentContext()