20#include <com/sun/star/beans/XPropertySet.hpp>
21#include <com/sun/star/drawing/XDrawPage.hpp>
22#include <com/sun/star/drawing/XShapes.hpp>
23#include <com/sun/star/frame/XModel.hpp>
24#include <com/sun/star/lang/XMultiServiceFactory.hpp>
25#include <com/sun/star/container/XIndexContainer.hpp>
26#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
27#include <com/sun/star/form/XFormsSupplier.hpp>
28#include <com/sun/star/form/XForm.hpp>
29#include <osl/diagnose.h>
35constexpr OUStringLiteral
sWW8_form( u
"WW-Standard" );
49 uno::Reference< drawing::XDrawPageSupplier > xTxtDoc(
mxModel,
51 OSL_ENSURE(xTxtDoc.is(),
"no XDrawPageSupplier from XModel");
53 OSL_ENSURE(
xDrawPage.is(),
"no XDrawPage" );
58const uno::Reference< lang::XMultiServiceFactory >&
66 "no XMultiServiceFactory from doc Model" );
85const uno::Reference< container::XIndexContainer >&
93 uno::Reference< form::XFormsSupplier > xFormsSupplier(
xDrawPage,
95 OSL_ENSURE( xFormsSupplier.is(),
96 "UNO_QUERY failed for XFormsSupplier from XDrawPage" );
98 uno::Reference< container::XNameContainer > xNameCont =
99 xFormsSupplier->getForms();
106 while( xNameCont->hasByName(
sName ) )
111 const uno::Reference< lang::XMultiServiceFactory > &rServiceFactory
113 if( !rServiceFactory.is() )
116 uno::Reference< uno::XInterface > xCreate =
117 rServiceFactory->createInstance(
118 "com.sun.star.form.component.Form" );
121 uno::Reference< beans::XPropertySet > xFormPropSet( xCreate,
125 xFormPropSet->setPropertyValue(
"Name", aTmp );
127 uno::Reference< form::XForm > xForm( xCreate, uno::UNO_QUERY );
128 OSL_ENSURE(xForm.is(),
"no Form?");
130 uno::Reference< container::XIndexContainer > xForms( xNameCont,
132 OSL_ENSURE( xForms.is(),
"XForms not available" );
135 xForms->insertByIndex( xForms->getCount(), aTmp );
137 xFormComps = uno::Reference< container::XIndexContainer >
138 (xCreate, uno::UNO_QUERY);
css::uno::Reference< css::frame::XModel2 > mxModel
const css::uno::Reference< css::container::XIndexContainer > & GetFormComps()
css::uno::Reference< css::frame::XModel > mxModel
virtual ~SvxMSConvertOCXControls()
css::uno::Reference< css::lang::XMultiServiceFactory > xServiceFactory
virtual void GetDrawPage()
const css::uno::Reference< css::lang::XMultiServiceFactory > & GetServiceFactory()
SvxMSConvertOCXControls(css::uno::Reference< css::frame::XModel > xModel)
const css::uno::Reference< css::drawing::XShapes > & GetShapes()
css::uno::Reference< css::drawing::XShapes > xShapes
css::uno::Reference< css::container::XIndexContainer > xFormComps
css::uno::Reference< css::drawing::XDrawPage > xDrawPage
constexpr OUStringLiteral sWW8_form(u"WW-Standard")
Shape IDs per cluster in DGG atom.
Reference< XModel > xModel