30#include <com/sun/star/frame/Frame.hpp>
31#include <com/sun/star/inspection/XObjectInspector.hpp>
32#include <com/sun/star/lang/XServiceInfo.hpp>
61 Shell const* pIdeShell =
dynamic_cast<Shell const*
>(pShell);
62 OSL_ENSURE( pIdeShell || !pShell,
"PropBrw::Update: invalid shell!" );
88 m_bInitialStateChange(true),
112 OSL_FAIL(
"PropBrw::PropBrw: could not create/initialize my frame!");
122 OSL_PRECOND(
m_xMeAsFrame.is(),
"PropBrw::ImplCreateController: no frame for myself!" );
140 ::cppu::createComponentContext( aHandlerContextInfo, std::size( aHandlerContextInfo ), xOwnContext ) );
144 static constexpr OUStringLiteral s_sControllerServiceName =
u"com.sun.star.awt.PropertyBrowserController";
154 DBG_ASSERT(xAsXController.is(),
"PropBrw::PropBrw: invalid controller object!");
155 if (!xAsXController.is())
166 Point aPropWinPos( WIN_BORDER, WIN_BORDER );
176 OSL_FAIL(
"PropBrw::PropBrw: could not create/initialize the browser controller!");
212 if ( xAsXController.is() )
213 xAsXController->attachFrame(
nullptr );
241 for(
size_t i = 0 ;
i < nMarkCount ; ++
i )
245 std::optional<SdrObjListIter> oGroupIterator;
248 oGroupIterator.emplace(pCurrent->
GetSubList());
249 pCurrent = oGroupIterator->IsMore() ? oGroupIterator->Next() :
nullptr;
257 if (xControlInterface.is())
258 aInterfaces.push_back(xControlInterface);
262 pCurrent = oGroupIterator && oGroupIterator->IsMore() ? oGroupIterator->Next() :
nullptr;
266 sal_Int32
nCount = aInterfaces.size();
269 for( sal_Int32
i = 0 ;
i <
nCount ;
i++ )
270 pInterfaces[
i] = aInterfaces[
i];
280 if ( xObjectInspector.is() )
282 xObjectInspector->inspect( _rObjectSeq );
284 OUString aText =
IDEResId(RID_STR_BRWTITLE_PROPERTIES)
285 +
IDEResId(RID_STR_BRWTITLE_MULTISELECT);
308 Reference< lang::XServiceInfo > xServiceInfo( _rxObject, UNO_QUERY );
310 if (xServiceInfo.is())
315 if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlDialogModel" ) )
319 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlButtonModel" ) )
323 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlRadioButtonModel" ) )
327 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlCheckBoxModel" ) )
331 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlListBoxModel" ) )
335 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlComboBoxModel" ) )
339 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlGroupBoxModel" ) )
343 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlEditModel" ) )
347 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlFixedTextModel" ) )
351 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlImageControlModel" ) )
355 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlProgressBarModel" ) )
359 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlScrollBarModel" ) )
363 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlFixedLineModel" ) )
367 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlDateFieldModel" ) )
371 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlTimeFieldModel" ) )
375 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlNumericFieldModel" ) )
379 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlCurrencyFieldModel" ) )
383 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlFormattedFieldModel" ) )
387 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlPatternFieldModel" ) )
391 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlFileControlModel" ) )
395 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.tree.TreeControlModel" ) )
399 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.grid.UnoControlGridModel" ) )
403 else if ( xServiceInfo->supportsService(
"com.sun.star.awt.UnoControlFixedHyperlinkModel" ) )
412 if (!sResId.isEmpty())
417 else if (!_rxObject.is())
432 OSL_ENSURE( !_rxContextDocument.is(),
"PropBrw::ImplUpdate: no view, but a document?!" );
465 if ( nMarkCount == 0 )
475 if ( nMarkCount == 1 )
479 if ( pDlgEdObj->IsGroupObject() )
482 xNewObject.set(pDlgEdObj->GetUnoControlModel(), css::uno::UNO_QUERY);
485 else if ( nMarkCount > 1 )
490 if ( aNewObjects.hasElements() )
497 catch (
const PropertyVetoException& ) { }
void SetMinOutputSizePixel(const Size &rSize)
void SetOutputSizePixel(const Size &rNewSize) override
virtual void SetText(const OUString &rStr) override
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
SdrObject * GetMarkedSdrObj() const
virtual SdrObjList * GetSubList() const
bool IsGroupObject() const
SdrModel & GetModel() const
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
virtual SdrView * GetDrawView() const
tools::Long AdjustHeight(tools::Long n)
tools::Long AdjustWidth(tools::Long n)
static css::uno::Reference< css::awt::XWindow > GetInterface(vcl::Window *pWindow)
static void setLayoutAllocation(vcl::Window &rWindow, const Point &rPos, const Size &rSize)
virtual void dispose() override
void ImplDestroyController()
virtual ~PropBrw() override
PropBrw(DialogWindowLayout &)
static OUString GetHeadlineName(const css::uno::Reference< css::beans::XPropertySet > &_rxObject)
bool m_bInitialStateChange
css::uno::Reference< css::beans::XPropertySet > m_xBrowserController
static css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > CreateMultiSelectionSequence(const SdrMarkList &_rMarkList)
std::vector< css::uno::Reference< css::uno::XInterface > > InterfaceArray
virtual bool Close() override
virtual void dispose() override
void ImplReCreateController()
void Update(const SfxViewShell *pShell)
css::uno::Reference< css::frame::XFrame2 > m_xMeAsFrame
VclPtr< vcl::Window > m_xContentArea
void ImplUpdate(const css::uno::Reference< css::frame::XModel > &_rxContextDocument, SdrView *pView)
void implSetNewObject(const css::uno::Reference< css::beans::XPropertySet > &_rxObject)
css::uno::Reference< css::frame::XModel > m_xContextDocument
void implSetNewObjectSequence(const css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > &_rObjectSeq)
virtual css::uno::Reference< css::frame::XModel > GetCurrentDocument() const override
SdrView * GetCurDlgView() const
vcl::Window * GetParent() const
weld::Window * GetFrameWeld() const
#define DBG_ASSERT(sCon, aError)
#define DBG_UNHANDLED_EXCEPTION(...)
Reference< XSingleServiceFactory > xFactory
Sequence< sal_Int8 > aSeq
OUString IDEResId(TranslateId aId)
Reference< XComponentContext > getProcessComponentContext()
void VCL_DLLPUBLIC ShowServiceNotAvailableError(weld::Widget *pParent, std::u16string_view rServiceName, bool bError)
constexpr OUStringLiteral RID_STR_CLASS_DIALOG
constexpr OUStringLiteral RID_STR_CLASS_CHECKBOX
constexpr OUStringLiteral RID_STR_CLASS_FILECONTROL
constexpr OUStringLiteral RID_STR_CLASS_GROUPBOX
constexpr OUStringLiteral RID_STR_CLASS_FIXEDTEXT
constexpr OUStringLiteral RID_STR_CLASS_TIMEFIELD
constexpr OUStringLiteral RID_STR_CLASS_LISTBOX
constexpr OUStringLiteral RID_STR_CLASS_FORMATTEDFIELD
constexpr OUStringLiteral RID_STR_CLASS_PATTERNFIELD
constexpr OUStringLiteral RID_STR_CLASS_GRIDCONTROL
constexpr OUStringLiteral RID_STR_CLASS_RADIOBUTTON
constexpr OUStringLiteral RID_STR_CLASS_TREECONTROL
constexpr OUStringLiteral RID_STR_CLASS_CURRENCYFIELD
constexpr OUStringLiteral RID_STR_CLASS_PROGRESSBAR
constexpr OUStringLiteral RID_STR_CLASS_BUTTON
constexpr OUStringLiteral RID_STR_CLASS_NUMERICFIELD
constexpr OUStringLiteral RID_STR_CLASS_DATEFIELD
constexpr OUStringLiteral RID_STR_CLASS_SCROLLBAR
constexpr OUStringLiteral RID_STR_CLASS_CONTROL
constexpr OUStringLiteral RID_STR_CLASS_COMBOBOX
constexpr OUStringLiteral RID_STR_CLASS_IMAGECONTROL
constexpr OUStringLiteral RID_STR_CLASS_EDIT
constexpr OUStringLiteral RID_STR_CLASS_HYPERLINKCONTROL
constexpr OUStringLiteral RID_STR_CLASS_FIXEDLINE
const tools::Long STD_WIN_SIZE_Y
const tools::Long STD_WIN_SIZE_X
WinBits const WB_CLIPCHILDREN