34#include <libxml/xmlwriter.h>
35#include <osl/diagnose.h>
65 static bool b3dFactoryInitialized =
false;
66 if(!b3dFactoryInitialized)
69 b3dFactoryInitialized =
true;
77 if( xHyphenator.is() )
78 rOutliner.SetHyphenator( xHyphenator );
81 if ( xSpellChecker.is() )
82 rOutliner.SetSpeller( xSpellChecker );
86 OSL_FAIL(
"Can't get Hyphenator or SpellChecker for chart");
143 return xShapeFactory;
153 if (!xDrawPagesSuplier.is())
157 if (xDrawPages->getCount() > 1)
160 uno::Any aPage = xDrawPages->getByIndex(0);
185 if( xDrawPagesSuplier.is() )
188 if( xDrawPages->getCount()>1 )
190 uno::Any aPage = xDrawPages->getByIndex( 1 ) ;
199 if( xDrawPages->getCount()==0 )
215 if( xChartRoot.is() )
217 sal_Int32 nSubCount = xChartRoot->getCount();
219 for( sal_Int32 nS = nSubCount; nS--; )
221 if( xChartRoot->getByIndex( nS ) >>= xShape )
222 xChartRoot->remove( xShape );
236 xDrawModel->lockControllers();
242 xDrawModel->unlockControllers();
286 if( rName.isEmpty() )
293 if(!pSearchList || rObjectCID.isEmpty())
296 for(
size_t nN=0; nN<
nCount; ++nN )
315 xShapes->remove(xShape);
323 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"DrawModelWrapper"));
324 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
328 (void)xmlTextWriterEndElement(pWriter);
static OutputDevice * GetDefaultDevice()
static css::uno::Reference< css::linguistic2::XSpellChecker1 > GetSpellChecker()
static css::uno::Reference< css::linguistic2::XHyphenator > GetHyphenator()
void SetMapUnit(MapUnit eUnit)
XBitmapListRef GetBitmapList() const
XDashListRef GetDashList() const
XGradientListRef GetGradientList() const
void SetRefDevice(OutputDevice *pDev)
XPatternListRef GetPatternList() const
SdrOutliner & GetDrawOutliner(const SdrTextObj *pObj=nullptr) const
XLineEndListRef GetLineEndList() const
void SetTextDefaults() const
const SfxItemPool & GetItemPool() const
XColorListRef GetColorList() const
XHatchListRef GetHatchList() const
void SetDefaultFontHeight(sal_Int32 nVal)
OutputDevice * GetRefDevice() const
css::uno::Reference< css::uno::XInterface > const & getUnoModel()
const SdrPage * GetPage(sal_uInt16 nPgNum) const
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
virtual SdrObjList * GetSubList() const
virtual const OUString & GetName() const
SfxItemPool * GetSecondaryPool() const
void SetPoolDefaultItem(const SfxPoolItem &)
SfxItemPool * GetLastPoolInChain()
void SetDefaultMetric(MapUnit eNewMetric)
void SetSecondaryPool(SfxItemPool *pPool)
reference_type * get() const
static VclPtr< reference_type > Create(Arg &&... arg)
static rtl::Reference< SfxItemPool > CreateChartItemPool()
creates a pure chart item pool
XDashListRef GetDashList() const
css::uno::Reference< css::lang::XMultiServiceFactory > getShapeFactory()
static rtl::Reference< SvxShapeGroupAnyD > getChartRootShape(const rtl::Reference< SvxDrawPage > &xPage)
XColorListRef GetColorList() const
static bool removeShape(const rtl::Reference< SvxShape > &xShape)
SfxItemPool & GetItemPool()
SAL_DLLPRIVATE css::uno::Reference< css::frame::XModel > getUnoModel()
SAL_DLLPRIVATE void lockControllers()
SdrObject * getNamedSdrObject(const OUString &rName)
XGradientListRef GetGradientList() const
SAL_DLLPRIVATE void unlockControllers()
void dumpAsXml(xmlTextWriterPtr pWriter) const override
rtl::Reference< SfxItemPool > m_xChartItemPool
rtl::Reference< SvxDrawPage > m_xHiddenDrawPage
XPatternListRef GetPatternList() const
XBitmapListRef GetBitmapList() const
XLineEndListRef GetLineEndList() const
const rtl::Reference< SvxDrawPage > & getMainDrawPage()
XHatchListRef GetHatchList() const
SAL_DLLPRIVATE void clearMainDrawPage()
const rtl::Reference< SvxDrawPage > & getHiddenDrawPage()
rtl::Reference< SvxDrawPage > m_xMainDrawPage
VclPtr< OutputDevice > m_pRefDevice
SAL_DLLPRIVATE DrawModelWrapper()
virtual SAL_DLLPRIVATE ~DrawModelWrapper() override
OutputDevice * getReferenceDevice() const
virtual SAL_DLLPRIVATE css::uno::Reference< css::uno::XInterface > createUnoModel() override
static bool areIdenticalObjects(std::u16string_view rCID1, std::u16string_view rCID2)
static rtl::Reference< SvxShapeGroupAnyD > getChartRootShape(const rtl::Reference< SvxDrawPage > &xPage)
constexpr TypedWhichId< SfxBoolItem > EE_PARA_HYPHENATE(EE_PARA_START+6)
struct _xmlTextWriter * xmlTextWriterPtr
SfxUInt16Item makeSvx3DPercentDiagonalItem(sal_uInt16 nVal)