20#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
21#include <com/sun/star/lang/IllegalArgumentException.hpp>
23#include <core_resource.hxx>
35 OUString aTmp( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8) );
42 using com::sun::star::inspection::PropertyCategoryDescriptor;
50 ,m_bConstructed( false )
51 ,m_bHasHelpSection( false )
53 ,m_nMinHelpTextLines( 3 )
54 ,m_nMaxHelpTextLines( 8 )
64 return "com.sun.star.comp.report.DefaultComponentInspectorModel";
74 return {
"com.sun.star.report.inspection.DefaultComponentInspectorModel" };
81 Any(OUString(
"com.sun.star.report.inspection.ReportComponentHandler")),
82 Any(OUString(
"com.sun.star.form.inspection.EditPropertyHandler")),
83 Any(OUString(
"com.sun.star.report.inspection.DataProviderHandler")),
84 Any(OUString(
"com.sun.star.report.inspection.GeometryHandler"))
124 throw ucb::AlreadyInitializedException();
126 if ( !_arguments.hasElements() )
132 if ( _arguments.getLength() == 2 )
134 sal_Int32 nMinHelpTextLines( 0 ), nMaxHelpTextLines( 0 );
135 if ( !( _arguments[0] >>= nMinHelpTextLines ) || !( _arguments[1] >>= nMaxHelpTextLines ) )
136 throw lang::IllegalArgumentException( OUString(), *
this, 0 );
141 throw lang::IllegalArgumentException( OUString(), *
this, 0 );
147 if ( ( _nMinHelpTextLines <= 0 ) || ( _nMaxHelpTextLines <= 0 ) || ( _nMinHelpTextLines > _nMaxHelpTextLines ) )
148 throw lang::IllegalArgumentException( OUString(), *
this, 0 );
158 ::osl::MutexGuard aGuard(
m_aMutex );
162 const char* programmaticName;
172 PropertyCategoryDescriptor* pReturn = aReturn.getArray();
173 for (
size_t i=0;
i<nCategories; ++
i, ++pReturn )
175 pReturn->ProgrammaticName = OUString::createFromAscii( aCategories[
i].programmaticName );
176 pReturn->UIName =
RptResId( aCategories[
i].uiNameResId );
194 m_xComponent.set(
m_xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.form.inspection.DefaultFormComponentInspectorModel",
m_xContext),UNO_QUERY_THROW);
201 return m_xComponent->getPropertyOrderIndex(_rPropertyName);
207extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
209 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const&)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * reportdesign_DefaultComponentInspectorModel_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
Reference< XComponentContext > m_xContext
sal_Int32 m_nMaxHelpTextLines
virtual sal_Bool SAL_CALL getIsReadOnly() override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getHandlerFactories() override
virtual ::sal_Int32 SAL_CALL getMaxHelpTextLines() override
virtual void SAL_CALL setIsReadOnly(sal_Bool _isreadonly) override
virtual sal_Bool SAL_CALL getHasHelpSection() override
virtual ::sal_Int32 SAL_CALL getMinHelpTextLines() override
virtual ~DefaultComponentInspectorModel() override
virtual ::sal_Int32 SAL_CALL getPropertyOrderIndex(const OUString &PropertyName) override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
sal_Int32 m_nMinHelpTextLines
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
void createWithHelpSection(sal_Int32 _nMinHelpTextLines, sal_Int32 _nMaxHelpTextLines)
DefaultComponentInspectorModel(const DefaultComponentInspectorModel &)=delete
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual css::uno::Sequence< css::inspection::PropertyCategoryDescriptor > SAL_CALL describeCategories() override
bool m_bConstructed
delegatee
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Reference< css::inspection::XObjectInspectorModel > m_xComponent
static OUString getHelpURL(std::string_view _sHelpId)
static sal_Int32 getPropertyId(const OUString &_rName)
OUString RptResId(TranslateId aId)
#define DBG_ASSERT(sCon, aError)
constexpr OStringLiteral HID_RPT_PROPDLG_TAB_DATA
constexpr OStringLiteral HID_RPT_PROPDLG_TAB_GENERAL
#define SAL_N_ELEMENTS(arr)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr OUStringLiteral INET_HID_SCHEME