37#include <osl/diagnose.h>
43using ::com::sun::star::uno::Reference;
52 : m_bDrawing(bDrawing)
54 std::unique_ptr<SdrExchangeView> pExchgView(std::make_unique<SdrView>( rSdrModel ));
57 pExchgView->MarkObj( pSelectedObj, pPv );
59 pExchgView->MarkAllObj( pPv );
60 Graphic aGraphic( pExchgView->GetMarkedObjMetaFile(
true));
75 AddFormat( SotClipboardFormatId::DRAWING );
77 AddFormat( SotClipboardFormatId::GDIMETAFILE );
79 AddFormat( SotClipboardFormatId::BITMAP );
89 if ( nFormat == SotClipboardFormatId::DRAWING )
93 else if ( nFormat == SotClipboardFormatId::GDIMETAFILE )
98 else if( nFormat == SotClipboardFormatId::BITMAP )
109 const datatransfer::DataFlavor& )
114 switch ( nUserObjectId )
119 if ( pMarkedObjModel )
121 rxOStm->SetBufferSize( 0xff00 );
128 for ( sal_uInt16
i = 0;
i <
nCount; ++
i )
152 OSL_FAIL(
"ChartTransferable::WriteObject: unknown object id" );
constexpr sal_uInt32 CHARTTRANSFER_OBJECTTYPE_DRAWMODEL
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
const GDIMetaFile & GetGDIMetaFile() const
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
const SfxItemPool & GetItemPool() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
sal_uInt16 GetPageCount() const
const SfxPoolItem & GetMergedItem(const sal_uInt16 nWhich) const
void SetMergedItem(const SfxPoolItem &rItem)
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
static SotClipboardFormatId GetFormat(const css::datatransfer::DataFlavor &rFlavor)
sal_uInt32 GetHeight() const
bool SetObject(void *pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor &rFlavor)
bool SetBitmapEx(const BitmapEx &rBitmap, const css::datatransfer::DataFlavor &rFlavor)
bool HasFormat(SotClipboardFormatId nFormat)
void AddFormat(SotClipboardFormatId nFormat)
bool SetGDIMetaFile(const GDIMetaFile &rMtf)
ChartTransferable(SdrModel &rSdrModel, SdrObject *pSelectedObj, bool bDrawing)
std::unique_ptr< SdrModel > m_xMarkedObjModel
virtual ~ChartTransferable() override
virtual bool WriteObject(tools::SvRef< SotTempStream > &rxOStm, void *pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor &rFlavor) override
virtual void AddSupportedFormats() override
virtual bool GetData(const css::datatransfer::DataFlavor &rFlavor, const OUString &rDestDoc) override
css::uno::Reference< css::graphic::XGraphic > m_xMetaFileGraphic
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
SVXCORE_DLLPUBLIC bool SvxDrawingLayerExport(SdrModel *pModel, const css::uno::Reference< css::io::XOutputStream > &xOut)