21#include <core_resource.hxx>
30uno::Reference< report::XSection>
lcl_getSection(
const uno::Reference< uno::XInterface>& _xReportComponent)
32 uno::Reference< container::XChild> xChild(_xReportComponent,uno::UNO_QUERY);
33 uno::Reference< report::XSection> xRet(_xReportComponent,uno::UNO_QUERY);
34 while( !xRet.is() && xChild.is() )
36 uno::Reference< uno::XInterface> xTemp = xChild->getParent();
37 xChild.set(xTemp,uno::UNO_QUERY);
38 xRet.set(xTemp,uno::UNO_QUERY);
44 ,
const uno::Reference< uno::XInterface >& ExceptionContext_
45 ,sal_Int16 ArgumentPosition_
48 OUString sErrorMessage(
RptResId(RID_STR_ERROR_WRONG_ARGUMENT));
49 sErrorMessage = sErrorMessage.replaceAt(sErrorMessage.indexOf(
'#'),2,_sTypeName);
50 throw lang::IllegalArgumentException(sErrorMessage,ExceptionContext_,ArgumentPosition_);
53uno::Reference< util::XCloneable >
cloneObject(
const uno::Reference< report::XReportComponent>& _xReportComponent
54 ,
const uno::Reference< lang::XMultiServiceFactory>& _xFactory
55 ,
const OUString& _sServiceName)
57 OSL_ENSURE(_xReportComponent.is() && _xFactory.is() ,
"reportcomponent is null -> GPF");
58 uno::Reference< report::XReportComponent> xClone(_xFactory->createInstance(_sServiceName),uno::UNO_QUERY_THROW);
59 ::comphelper::copyProperties(_xReportComponent, xClone);
OUString RptResId(TranslateId aId)
uno::Reference< report::XSection > lcl_getSection(const uno::Reference< uno::XInterface > &_xReportComponent)
void throwIllegallArgumentException(std::u16string_view _sTypeName, const uno::Reference< uno::XInterface > &ExceptionContext_, sal_Int16 ArgumentPosition_)
uno::Reference< util::XCloneable > cloneObject(const uno::Reference< report::XReportComponent > &_xReportComponent, const uno::Reference< lang::XMultiServiceFactory > &_xFactory, const OUString &_sServiceName)