27#include <osl/diagnose.h>
31 using ::com::sun::star::uno::Any;
32 using ::com::sun::star::inspection::XPropertyControl;
33 using ::com::sun::star::uno::Reference;
37 , m_xTabControl(rBuilder.weld_notebook(
"tabcontrol"))
38 , m_xControlHoldingParent(rBuilder.weld_container(
"controlparent"))
40 , m_pListener(nullptr)
41 , m_pObserver(nullptr)
43 , m_bHasHelpSection(false)
94 MapStringToPageId::const_iterator aPropertyPageIdPos =
m_aPropertyPageIds.find(rPropertyName);
96 pPage =
getPage(aPropertyPageIdPos->second);
110 pPage = aPagePos->second.xPage.get();
124 OUString sIdent = OUString::number(
nId);
133 xPage->SetHelpId(rHelpId);
155 OUString sIdent(OUString::number(nID));
178 (this->*_pOperation)( *pPage,
nullptr );
230 OSL_ENSURE( pPointerToOUString,
"OPropertyEditor::setHelpSectionText: invalid argument!" );
231 if ( !pPointerToOUString )
234 const OUString& rText( *
static_cast<const OUString*
>(pPointerToOUString) );
242 DBG_ASSERT( pPage,
"OPropertyEditor::InsertEntry: don't have such a page!" );
249 "OPropertyEditor::InsertEntry: property already present in the map!" );
261 "OPropertyEditor::RemoveEntry: property not present in the map!" );
293 OUString sIdent(OUString::number(
nPageId));
299 aPagePos->second.xPage->detach();
311 m_xTabControl->insert_page(sIdent, aPagePos->second.sLabel, aPagePos->second.nPos);
312 aPagePos->second.xPage->reattach(
m_xTabControl->get_page(sIdent));
342 Reference< XPropertyControl > xControl;
352 m_aPageActivationHandler.Call(rNewPage);
359 OBrowserPage* pCurrentPage = getPage(rIdent.toUInt32());
#define EDITOR_LIST_REPLACE_EXISTING
non-UNO version of the XPropertyControlObserver
void ChangeEntry(const OLineDescriptor &, ListBoxLines::size_type nPos)
void EnablePropertyControls(const OUString &_rEntryName, sal_Int16 _nControls, bool _bEnable)
bool RemoveEntry(const OUString &_rName)
css::uno::Reference< css::inspection::XPropertyControl > GetPropertyControl(const OUString &rEntryName)
sal_uInt16 GetPropertyPos(std::u16string_view rEntryName) const
void SetPropertyValue(const OUString &rEntryName, const css::uno::Any &rValue, bool _bUnknownValue)
void EnableHelpSection(bool _bEnable)
void EnablePropertyLine(const OUString &_rEntryName, bool _bEnable)
void SetObserver(IPropertyControlObserver *_pObserver)
void SetHelpText(const OUString &_rHelpText)
void InsertEntry(const OLineDescriptor &, sal_uInt16 nPos)
void SetListener(IPropertyLineListener *_pListener)
OBrowserListBox & getListBox()
IPropertyControlObserver * m_pObserver
void EnablePropertyControls(const OUString &_rEntryName, sal_Int16 _nControls, bool _bEnable)
void forEachPage(PageOperation _pOperation)
OPropertyEditor(const css::uno::Reference< css::uno::XComponentContext > &rContext, weld::Builder &rBuilder)
void RemoveEntry(const OUString &_rName)
void SetControlObserver(IPropertyControlObserver *)
css::uno::Reference< css::uno::XComponentContext > m_xContext
std::map< sal_uInt16, PropertyPage > m_aShownPages
css::uno::Reference< css::inspection::XPropertyControl > GetPropertyControl(const OUString &rEntryName)
Size get_preferred_size() const
sal_uInt16 GetPropertyPos(const OUString &rEntryName) const
std::unique_ptr< weld::Container > m_xControlHoldingParent
void RemovePage(sal_uInt16 nID)
MapStringToPageId m_aPropertyPageIds
std::map< sal_uInt16, PropertyPage > m_aHiddenPages
void ChangeEntry(const OLineDescriptor &)
void SetHelpText(const OUString &_rHelpText)
void enableHelpSection(OBrowserPage &_rPage, const void *)
std::unique_ptr< weld::Notebook > m_xTabControl
sal_uInt16 GetCurPage() const
void ShowPropertyPage(sal_uInt16 _nPageId, bool _bShow)
static void setHelpSectionText(OBrowserPage &_rPage, const void *_pPointerToOUString)
void EnableHelpSection(bool _bEnable)
void SetPropertyValue(const OUString &_rEntryName, const css::uno::Any &_rValue, bool _bUnknownValue)
void SetLineListener(IPropertyLineListener *)
void setPageLineListener(OBrowserPage &_rPage, const void *)
sal_uInt16 AppendPage(const OUString &r, const OUString &_rHelpId)
void InsertEntry(const OLineDescriptor &, sal_uInt16 _nPageId, sal_uInt16 nPos=EDITOR_LIST_APPEND)
void EnablePropertyLine(const OUString &_rEntryName, bool _bEnable)
void setPageControlObserver(OBrowserPage &_rPage, const void *)
IPropertyLineListener * m_pListener
void SetHelpId(const OUString &sHelpId)
OBrowserPage * getPage(sal_uInt16 _rPageId)
static void setBuilderParent(const css::uno::Reference< css::uno::XComponentContext > &rContext, weld::Widget *pParent)
static void clearBuilderParent(const css::uno::Reference< css::uno::XComponentContext > &rContext)
#define DBG_ASSERT(sCon, aError)
Reference< XComponentContext > m_xContext
#define LINK(Instance, Class, Member)
a property handler for any virtual string properties
IMPL_LINK(OBrowserLine, OnButtonClicked, weld::Button &, rButton, void)
Reference< XNameAccess > m_xContainer
#define EDITOR_LIST_ENTRY_NOTFOUND