21#include <com/sun/star/io/XOutputStream.hpp>
22#include <com/sun/star/beans/XPropertySet.hpp>
23#include <com/sun/star/container/XChild.hpp>
24#include <com/sun/star/lang/XServiceInfo.hpp>
25#include <com/sun/star/lang/XComponent.hpp>
26#include <com/sun/star/drawing/XShape.hpp>
27#include <com/sun/star/drawing/XDrawPage.hpp>
28#include <com/sun/star/drawing/XGraphicExportFilter.hpp>
29#include <com/sun/star/graphic/XGraphic.hpp>
30#include <com/sun/star/graphic/XGraphicRenderer.hpp>
31#include <com/sun/star/task/XStatusIndicator.hpp>
32#include <com/sun/star/task/XInteractionHandler.hpp>
33#include <com/sun/star/task/XInteractionContinuation.hpp>
34#include <com/sun/star/uno/XComponentContext.hpp>
41#include <com/sun/star/drawing/GraphicFilterRequest.hpp>
42#include <com/sun/star/util/URL.hpp>
72#define MAX_EXT_PIX 2048
75using namespace ::
cppu;
93 OUString maFilterName;
96 css::uno::Reference< css::io::XOutputStream > mxOutputStream;
97 css::uno::Reference< css::graphic::XGraphicRenderer > mxGraphicRenderer;
99 css::uno::Reference< css::task::XInteractionHandler > mxInteractionHandler;
103 bool mbExportOnlyBackground;
105 bool mbUseHighContrast;
108 Sequence< PropertyValue > maFilterData;
115 explicit ExportSettings(
const SdrModel* pSdrModel);
118 ExportSettings::ExportSettings(
const SdrModel* pSdrModel)
121 ,mbExportOnlyBackground(
false )
122 ,mbScrollText(
false )
123 ,mbUseHighContrast(
false )
124 ,mbTranslucent(
false )
139 class GraphicExporter :
public WeakImplHelper< XGraphicExportFilter, XServiceInfo >
145 virtual sal_Bool SAL_CALL
filter(
const Sequence< PropertyValue >& aDescriptor )
override;
146 virtual void SAL_CALL cancel( )
override;
149 virtual void SAL_CALL setSourceDocument(
const Reference< XComponent >& xDoc )
override;
157 virtual sal_Bool SAL_CALL supportsMimeType(
const OUString& MimeTypeName )
override;
158 virtual Sequence< OUString > SAL_CALL getSupportedMimeTypeNames( )
override;
164 void ParseSettings(
const Sequence< PropertyValue >& aDescriptor, ExportSettings& rSettings );
165 bool GetGraphic( ExportSettings
const & rSettings,
Graphic& aGraphic,
bool bVectorType );
169 Reference< XDrawPage > mxPage;
170 Reference< XShapes > mxShapes;
176 sal_Int32 mnPageNumber;
187 sal_uInt32 nMaximumQuadraticPixels(500000);
199 nMaximumQuadraticPixels = std::min(sal_uInt32(4096 * 4096), sal_uInt32(pSize->
Width() * pSize->
Height()));
212 Size* CalcSize( sal_Int32 nWidth, sal_Int32 nHeight,
const Size& aBoundSize,
Size& aOutSize )
214 if( (nWidth == 0) && (nHeight == 0) )
217 if( (nWidth == 0) && (nHeight != 0) && (aBoundSize.
Height() != 0) )
219 nWidth = ( nHeight * aBoundSize.
Width() ) / aBoundSize.
Height();
221 else if( (nWidth != 0) && (nHeight == 0) && (aBoundSize.
Width() != 0) )
223 nHeight = ( nWidth * aBoundSize.
Height() ) / aBoundSize.
Width();
235 explicit ImplExportCheckVisisbilityRedirector(
SdrPage* pCurrentPage );
246ImplExportCheckVisisbilityRedirector::ImplExportCheckVisisbilityRedirector(
SdrPage* pCurrentPage )
247: mpCurrentPage( pCurrentPage )
251void ImplExportCheckVisisbilityRedirector::createRedirectedPrimitive2DSequence(
260 SdrPage* pPage = mpCurrentPage;
264 pPage =
pObject->getSdrPageFromSdrObject();
267 if( (pPage ==
nullptr) || pPage->
checkVisibility(rOriginal, rDisplayInfo,
false) )
281GraphicExporter::GraphicExporter()
282: mpUnoPage(
nullptr ), mnPageNumber(-1), mpCurrentPage(
nullptr), mpDoc(
nullptr )
292 pInfo->SetSdrPage( mpCurrentPage );
294 else if( mnPageNumber != -1 )
296 const SvxFieldData* pField = pInfo->GetField().GetField();
299 OUString aPageNumValue;
302 switch(mpDoc->GetPageNumType())
304 case css::style::NumberingType::CHARS_UPPER_LETTER:
305 aPageNumValue += OUStringChar(
sal_Unicode((mnPageNumber - 1) % 26 +
'A') );
307 case css::style::NumberingType::CHARS_LOWER_LETTER:
308 aPageNumValue += OUStringChar(
sal_Unicode((mnPageNumber - 1) % 26 +
'a') );
310 case css::style::NumberingType::ROMAN_UPPER:
313 case css::style::NumberingType::ROMAN_LOWER:
316 case css::style::NumberingType::NUMBER_NONE:
320 aPageNumValue += OUString::number( mnPageNumber );
323 pInfo->SetRepresentation( aPageNumValue );
330 maOldCalcFieldValueHdl.Call( pInfo );
332 if( pInfo && mpCurrentPage )
333 pInfo->SetSdrPage(
nullptr );
343 MapMode aMM( MapUnit::Map100thMM );
345 Point aPoint( 0, 0 );
349 if( nWidthPixel != 0 )
351 const Fraction aFrac( nWidthPixel, pVDev->LogicToPixel( aPageSize, aMM ).Width() );
355 if( nHeightPixel == 0 )
359 if( nHeightPixel != 0 )
361 const Fraction aFrac( nHeightPixel, pVDev->LogicToPixel( aPageSize, aMM ).Height() );
363 if( nWidthPixel == 0 )
369 pVDev->SetMapMode( aMM );
370 bool bSuccess(
false);
373 if(nWidthPixel && nHeightPixel)
375 bSuccess = pVDev->SetOutputSizePixel(
Size(nWidthPixel, nHeightPixel));
379 bSuccess = pVDev->SetOutputSize(aPageSize);
395 ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage );
401 OSL_ENSURE(
false,
"Could not get a VirtualDevice of requested size (!)");
407void GraphicExporter::ParseSettings(
const Sequence<PropertyValue>& rDescriptor,
408 ExportSettings& rSettings)
410 Sequence<PropertyValue> aDescriptor = rDescriptor;
411 if (aDescriptor.hasElements())
414 Sequence<PropertyValue> aFilterData;
415 OUString aFilterOptions;
416 auto it =
aMap.find(
"FilterData");
417 if (it !=
aMap.end())
419 it->second >>= aFilterData;
421 it =
aMap.find(
"FilterOptions");
422 if (it !=
aMap.end())
424 it->second >>= aFilterOptions;
426 if (!aFilterData.hasElements() && !aFilterOptions.isEmpty())
429 std::vector<PropertyValue>
aData
432 if (aFilterData.hasElements())
434 aMap[
"FilterData"] <<= aFilterData;
435 aDescriptor =
aMap.getAsConstPropertyValueList();
440 for(
const PropertyValue& rValue : aDescriptor )
442 if ( rValue.Name ==
"FilterName" )
444 rValue.Value >>= rSettings.maFilterName;
446 else if ( rValue.Name ==
"MediaType" )
448 rValue.Value >>= rSettings.maMediaType;
450 else if ( rValue.Name ==
"URL" )
452 if( !( rValue.Value >>= rSettings.maURL ) )
454 rValue.Value >>= rSettings.maURL.Complete;
457 else if ( rValue.Name ==
"OutputStream" )
459 rValue.Value >>= rSettings.mxOutputStream;
461 else if ( rValue.Name ==
"GraphicRenderer" )
463 rValue.Value >>= rSettings.mxGraphicRenderer;
465 else if ( rValue.Name ==
"StatusIndicator" )
467 rValue.Value >>= rSettings.mxStatusIndicator;
469 else if ( rValue.Name ==
"InteractionHandler" )
471 rValue.Value >>= rSettings.mxInteractionHandler;
473 else if( rValue.Name ==
"Width" )
475 rValue.Value >>= rSettings.mnWidth;
477 else if( rValue.Name ==
"Height" )
479 rValue.Value >>= rSettings.mnHeight;
481 else if( rValue.Name ==
"ExportOnlyBackground" )
483 rValue.Value >>= rSettings.mbExportOnlyBackground;
485 else if ( rValue.Name ==
"FilterData" )
487 rValue.Value >>= rSettings.maFilterData;
489 for( PropertyValue& rDataValue : asNonConstRange(rSettings.maFilterData) )
491 if ( rDataValue.Name ==
"Translucent" )
493 if ( !( rDataValue.Value >>= rSettings.mbTranslucent ) )
495 sal_Int32 nTranslucent = 0;
496 if ( rDataValue.Value >>= nTranslucent )
497 rSettings.mbTranslucent = nTranslucent != 0;
500 else if ( rDataValue.Name ==
"PixelWidth" )
502 rDataValue.Value >>= rSettings.mnWidth;
504 else if ( rDataValue.Name ==
"PixelHeight" )
506 rDataValue.Value >>= rSettings.mnHeight;
508 else if( rDataValue.Name ==
"Width" )
510 rDataValue.Value >>= rSettings.mnWidth;
511 rDataValue.Name =
"PixelWidth";
513 else if( rDataValue.Name ==
"Height" )
515 rDataValue.Value >>= rSettings.mnHeight;
516 rDataValue.Name =
"PixelHeight";
518 else if ( rDataValue.Name ==
"ExportOnlyBackground" )
520 rDataValue.Value >>= rSettings.mbExportOnlyBackground;
522 else if ( rDataValue.Name ==
"HighContrast" )
524 rDataValue.Value >>= rSettings.mbUseHighContrast;
526 else if ( rDataValue.Name ==
"PageNumber" )
528 rDataValue.Value >>= mnPageNumber;
530 else if ( rDataValue.Name ==
"ScrollText" )
533 rDataValue.Value >>= rSettings.mbScrollText;
535 else if ( rDataValue.Name ==
"CurrentPage" )
537 Reference< XDrawPage > xPage;
538 rDataValue.Value >>= xPage;
541 SvxDrawPage* pUnoPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage );
546 else if ( rDataValue.Name ==
"ScaleXNumerator" )
549 if( rDataValue.Value >>= nVal )
550 rSettings.maScaleX =
Fraction( nVal, rSettings.maScaleX.GetDenominator() );
552 else if ( rDataValue.Name ==
"ScaleXDenominator" )
555 if( rDataValue.Value >>= nVal )
556 rSettings.maScaleX =
Fraction( rSettings.maScaleX.GetNumerator(), nVal );
558 else if ( rDataValue.Name ==
"ScaleYNumerator" )
561 if( rDataValue.Value >>= nVal )
562 rSettings.maScaleY =
Fraction( nVal, rSettings.maScaleY.GetDenominator() );
564 else if ( rDataValue.Name ==
"ScaleYDenominator" )
567 if( rDataValue.Value >>= nVal )
568 rSettings.maScaleY =
Fraction( rSettings.maScaleY.GetNumerator(), nVal );
570 else if (rDataValue.Name ==
"AntiAliasing")
573 if (rDataValue.Value >>= bAntiAliasing)
581 if ( rSettings.mxStatusIndicator.is() )
583 int i = rSettings.maFilterData.getLength();
584 rSettings.maFilterData.realloc(
i + 1 );
585 auto pFilterData = rSettings.maFilterData.getArray();
586 pFilterData[
i ].Name =
"StatusIndicator";
587 pFilterData[
i ].Value <<= rSettings.mxStatusIndicator;
591bool GraphicExporter::GetGraphic( ExportSettings
const & rSettings,
Graphic& aGraphic,
bool bVectorType )
593 if( !mpDoc || !mpUnoPage )
596 SdrPage* pPage = mpUnoPage->GetSdrPage();
601 const MapMode aMap( mpDoc->GetScaleUnit(),
Point(), rSettings.maScaleX, rSettings.maScaleY );
614 std::vector< SdrObject* > aShapes;
620 if( rSettings.mbExportOnlyBackground )
624 if(pCorrectProperties)
629 pTempBackgroundShape->SetMergedItemSet(pCorrectProperties->
GetItemSet());
630 pTempBackgroundShape->SetMergedItem(
XLineStyleItem(drawing::LineStyle_NONE));
631 pTempBackgroundShape->NbcSetStyleSheet(pCorrectProperties->
GetStyleSheet(),
true);
632 aShapes.push_back(pTempBackgroundShape.get());
641 if ( !bVectorType && !rSettings.mbTranslucent )
645 if ( rSettings.mnWidth > 0 && rSettings.mnHeight > 0 )
647 nWidthPix = rSettings.mnWidth;
648 nHeightPix = rSettings.mnHeight;
658 nWidthPix = aSizePix.
Width();
662 nHeightPix = aSizePix.
Height();
664 double fWidthDif =
static_cast<double>(aSizePix.
Width()) / nWidthPix;
665 double fHeightDif =
static_cast<double>(aSizePix.
Height()) / nHeightPix;
667 if (fWidthDif > fHeightDif)
674 nWidthPix = aSizePix.
Width();
675 nHeightPix = aSizePix.
Height();
679 std::unique_ptr<SdrView> xLocalView;
683 xLocalView.reset(
new FmFormView(*pFormModel, aVDev));
687 xLocalView.reset(
new SdrView(*mpDoc, aVDev));
694 aGraphic = pVDev->GetBitmapEx(
Point(), pVDev->GetOutputSize() );
704 aVDev->SetMapMode(
aMap );
705 if( rSettings.mbUseHighContrast )
706 aVDev->SetDrawMode( aVDev->GetDrawMode() | DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient );
707 aVDev->EnableOutput(
false );
712 std::unique_ptr< SdrView > pView;
716 pView.reset(
new FmFormView(*pFormModel, aVDev));
720 pView.reset(
new SdrView(*mpDoc, aVDev));
723 pView->SetBordVisible(
false );
724 pView->SetPageVisible(
false );
725 pView->ShowSdrPage( pPage );
729 pView->SetPagePaintingAllowed(
false);
739 aVDev->SetRelativeMapMode( aVMap );
740 aVDev->IntersectClipRegion( aClipRect );
743 ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage );
764 pView->HideSdrPage();
766 if( rSettings.mbTranslucent )
769 aGraphic = GetBitmapFromMetaFile( aGraphic.
GetGDIMetaFile(), CalcSize( rSettings.mnWidth, rSettings.mnHeight, aNewSize, aOutSize ) );
781 Reference< XShape > xShape;
782 const sal_Int32
nCount = mxShapes->getCount();
786 mxShapes->getByIndex(
nIndex ) >>= xShape;
789 aShapes.push_back( pObj );
797 aShapes.push_back( pObj );
800 if( aShapes.empty() )
804 if( bRet && !aShapes.empty() )
807 bool bSingleGraphic =
false;
809 if( 1 == aShapes.size() )
813 if(
auto pGrafObj =
dynamic_cast<const SdrGrafObj*
>(aShapes.front()) )
814 if (pGrafObj->HasText() )
816 aGraphic = pGrafObj->GetTransformedGraphic();
817 if ( aGraphic.
GetType() == GraphicType::Bitmap )
820 if( rSettings.mnWidth && rSettings.mnHeight &&
821 ( ( rSettings.mnWidth != aSizePixel.
Width() ) ||
822 ( rSettings.mnHeight != aSizePixel.
Height() ) ) )
826 aBmpEx.
Scale(
Size( rSettings.mnWidth, rSettings.mnHeight ), BmpScaleFlag::Lanczos );
833 bSingleGraphic =
true;
837 else if( rSettings.mbScrollText )
841 if( pTextObj && pTextObj->HasText() )
846 const std::unique_ptr< GDIMetaFile > pMtf(
847 pTextObj->GetTextScrollMetaFileAndRectangle(
848 aScrollRectangle, aPaintRectangle ) );
855 if( aScrollRectangle.
Contains( aPaintRectangle ) )
856 aTextRect = aScrollRectangle;
858 aTextRect = aPaintRectangle;
861 pMtf->SetPrefSize( aTextRect.
GetSize() );
868 -aPaintRectangle.
Top() ) );
869 pMtf->SetPrefMapMode( aLocalMapMode );
872 "XTEXT_SCROLLRECT", 0,
873 reinterpret_cast<sal_uInt8 const*
>(&aScrollRectangle),
876 "XTEXT_PAINTRECT", 0,
877 reinterpret_cast<sal_uInt8 const*
>(&aPaintRectangle),
882 bSingleGraphic =
true;
887 if( !bSingleGraphic )
907 pObj->GetViewContact().getViewIndependentPrimitive2DContainer(aSequence);
912 aOut->EnableOutput(
false );
913 aOut->SetMapMode(
aMap );
914 if( rSettings.mbUseHighContrast )
915 aOut->SetDrawMode( aOut->GetDrawMode() | DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient );
922 const Size aOnePixelInMtf(
926 const Size aHalfPixelInMtf(
927 (aOnePixelInMtf.
getWidth() + 1) / 2,
936 aOut->SetRelativeMapMode( aOutMap );
942 if(mpCurrentPage->TRG_HasMasterPage() && pPage->
IsMasterPage())
945 aDisplayInfo.
SetProcessLayers(mpCurrentPage->TRG_GetMasterPageVisibleLayers());
954 ImplExportCheckVisisbilityRedirector aCheckVisibilityRedirector(mpCurrentPage);
956 aMultiObjectPainter.SetViewObjectContactRedirector(&aCheckVisibilityRedirector);
972 const Size aBoundSize(
981 aGraphic = GetBitmapFromMetaFile( aMtf, CalcSize( rSettings.mnWidth, rSettings.mnHeight, aBoundSize, aOutSize ) );
990 pTempBackgroundShape.clear();
1002sal_Bool SAL_CALL GraphicExporter::filter(
const Sequence< PropertyValue >& aDescriptor )
1009 if(
maGraphic.
IsNone() && (
nullptr == mpUnoPage->GetSdrPage() ||
nullptr == mpDoc ) )
1015 ExportSettings aSettings(mpDoc);
1016 ParseSettings(aDescriptor, aSettings);
1018 const sal_uInt16 nFilter = !aSettings.maMediaType.isEmpty()
1063 if( aSettings.mxGraphicRenderer.is() )
1066 aSettings.mxGraphicRenderer->render( aGraphic.
GetXGraphic() );
1068 else if( aSettings.mxOutputStream.is() )
1074 nStatus = rFilter.
ExportGraphic( aGraphic,
u"", aStream, nFilter, &aSettings.maFilterData );
1079 aOutputStream.WriteStream( aStream );
1091 if ( aSettings.mxInteractionHandler.is() && ( nStatus !=
ERRCODE_NONE ) )
1094 Sequence< css::uno::Reference< css::task::XInteractionContinuation > > lContinuations{
1095 new ::comphelper::OInteractionApprove()
1098 GraphicFilterRequest aErrorCode;
1099 aErrorCode.ErrCode = sal_uInt32(nStatus);
1100 aInteraction <<= aErrorCode;
1106void SAL_CALL GraphicExporter::cancel()
1113void SAL_CALL GraphicExporter::setSourceDocument(
const Reference< lang::XComponent >& xComponent )
1118 mpUnoPage =
nullptr;
1125 mxPage.set( xComponent, UNO_QUERY );
1126 mxShapes.set( xComponent, UNO_QUERY );
1127 mxShape.set( xComponent, UNO_QUERY );
1130 if( !mxPage.is() && !
mxShape.is() && mxShapes.is() )
1133 if( 0 == mxShapes->getCount() )
1137 mxShapes->getByIndex(0) >>=
mxShape;
1150 uno::Reference<beans::XPropertySet> xPropertySet(
mxShape, uno::UNO_QUERY);
1151 if (!xPropertySet.is())
1153 uno::Reference<graphic::XGraphic> xGraphic(
1154 xPropertySet->getPropertyValue(
"Graphic"), uno::UNO_QUERY);
1166 Reference< XChild > xChild(
mxShape, UNO_QUERY );
1170 Reference< XInterface > xInt;
1173 xInt = xChild->getParent();
1174 mxPage.set( xInt, UNO_QUERY );
1176 xChild.set( xInt, UNO_QUERY );
1178 while( !mxPage.is() && xChild.is() );
1188 mpUnoPage = comphelper::getFromUnoTunnel<SvxDrawPage>( mxPage );
1190 if(
nullptr == mpUnoPage ||
nullptr == mpUnoPage->GetSdrPage() )
1193 mpDoc = &mpUnoPage->GetSdrPage()->getSdrModelFromSdrPage();
1200 SdrPage* pPage = mpUnoPage->GetSdrPage();
1202 Reference< XShape > xShape;
1206 const sal_Int32
nCount = mxShapes->getCount();
1212 mxShapes->getByIndex(
nIndex ) >>= xShape;
1230 throw IllegalArgumentException();
1234OUString SAL_CALL GraphicExporter::getImplementationName( )
1236 return "com.sun.star.comp.Draw.GraphicExporter";
1244Sequence< OUString > SAL_CALL GraphicExporter::getSupportedServiceNames( )
1246 Sequence< OUString > aSupportedServiceNames {
"com.sun.star.drawing.GraphicExportFilter" };
1247 return aSupportedServiceNames;
1251sal_Bool SAL_CALL GraphicExporter::supportsMimeType(
const OUString& rMimeTypeName )
1256 for( nFilter = 0; nFilter <
nCount; nFilter++ )
1267Sequence< OUString > SAL_CALL GraphicExporter::getSupportedMimeTypeNames( )
1272 sal_uInt16 nFound = 0;
1275 OUString* pStr =
aSeq.getArray();
1277 for( nFilter = 0; nFilter <
nCount; nFilter++ )
1288 aSeq.realloc( nFound );
1301 Reference< XComponent > xComp( rShape.
getUnoShape(), UNO_QUERY_THROW );
1302 xExporter->setSourceDocument( xComp );
1304 xExporter->GetGraphic( aSettings, aGraphic,
true );
1313extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
1315 css::uno::XComponentContext *,
1316 css::uno::Sequence<css::uno::Any>
const &)
1318 return cppu::acquire(
new GraphicExporter);
css::uno::Reference< css::task::XStatusIndicator > mxStatusIndicator
Graphic SvxGetGraphicForShape(SdrObject &rShape)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_Draw_GraphicExporter_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
IMPL_LINK(MaskData, PipetteHdl, const OString &, rId, void)
const StyleSettings & GetStyleSettings() const
void SetStyleSettings(const StyleSettings &rSet)
static OutputDevice * GetDefaultDevice()
static const AllSettings & GetSettings()
static void SetSettings(const AllSettings &rSettings)
bool Scale(const Size &rNewSize, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default)
sal_uInt16 GetExportFormatNumberForShortName(std::u16string_view rShortName)
static GraphicFilter & GetGraphicFilter()
bool IsExportPixelFormat(sal_uInt16 nFormat)
sal_uInt16 GetExportFormatNumberForMediaType(std::u16string_view rShortName)
ErrCode ExportGraphic(const Graphic &rGraphic, const INetURLObject &rPath, sal_uInt16 nFormat, const css::uno::Sequence< css::beans::PropertyValue > *pFilterData=nullptr)
sal_uInt16 GetExportFormatCount() const
OUString GetExportFormatMediaType(sal_uInt16 nFormat)
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
void SetPrefMapMode(const MapMode &rPrefMapMode)
const GDIMetaFile & GetGDIMetaFile() const
GraphicType GetType() const
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
Size GetSizePixel(const OutputDevice *pRefDevice=nullptr) const
void SetPrefSize(const Size &rPrefSize)
INetProtocol GetProtocol() const
void SetOrigin(const Point &rOrigin)
void SetScaleY(const Fraction &rScaleY)
void SetScaleX(const Fraction &rScaleX)
EEControlBits GetControlWord() const
const Link< EditFieldInfo *, void > & GetCalcFieldValueHdl() const
void SetControlWord(EEControlBits nWord)
void SetCalcFieldValueHdl(const Link< EditFieldInfo *, void > &rLink)
void SetBackgroundColor(const Color &rColor)
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
This class represents an embedded or linked bitmap graphic object.
const Fraction & GetScaleFraction() const
SdrPageView * ShowSdrPage(SdrPage *pPage) override
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
virtual css::uno::Reference< css::drawing::XShape > getUnoShape()
SdrModel & getSdrModelFromSdrObject() const
SdrPage * getSdrPageFromSdrObject() const
const SfxItemSet & GetItemSet() const
SfxStyleSheet * GetStyleSheet() const
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
bool IsMasterPage() const
sal_Int32 GetUpperBorder() const
virtual bool checkVisibility(const sdr::contact::ViewObjectContact &rOriginal, const sdr::contact::DisplayInfo &rDisplayInfo, bool bEdit)
this method returns true if the object from the ViewObjectContact should be visible on this page whil...
sal_Int32 GetRightBorder() const
sal_Int32 GetLeftBorder() const
Color GetPageBackgroundColor() const
deprecated returns an averaged background color of this page
const SdrPageProperties * getCorrectSdrPageProperties() const
sal_Int32 GetLowerBorder() const
void SetPageVisible(bool bOn=true)
virtual void CompleteRedraw(OutputDevice *pOut, const vcl::Region &rReg, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr)
void SetHlplVisible(bool bOn=true)
void SetBordVisible(bool bOn=true)
void SetGlueVisible(bool bOn=true)
void SetGridVisible(bool bOn)
Rectangle objects (rectangle, circle, ...)
constexpr tools::Long getHeight() const
constexpr tools::Long Height() const
constexpr tools::Long getWidth() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
bool GetUseFontAAFromSystem() const
void SetUseFontAAFromSystem(bool bUseFontAAFromSystem)
sal_uInt64 Seek(sal_uInt64 nPos)
SdrPage * GetSdrPage() const
static VclPtr< reference_type > Create(Arg &&... arg)
static ErrCode ExportGraphic(const Graphic &rGraphic, const INetURLObject &rURL, GraphicFilter &rFilter, const sal_uInt16 nFormat, const css::uno::Sequence< css::beans::PropertyValue > *pFilterData)
void expand(const Tuple2D< TYPE > &rTuple)
basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D &aViewInformation) const
static css::uno::Reference< css::task::XInteractionRequest > CreateRequest(const css::uno::Any &aRequest, const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &lContinuations)
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
DECL_LINK(CheckNameHdl, SvxNameDialog &, bool)
EmbeddedObjectRef * pObject
#define ERRCODE_GRFILTER_FILTERERROR
#define LINK(Instance, Class, Member)
Sequence< sal_Int8 > aSeq
constexpr OUStringLiteral aData
void SetAntiAliasing(bool bOn, bool bTemporary)
B2IRange fround(const B2DRange &rRange)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
std::vector< css::beans::PropertyValue > JsonToPropertyValues(const OString &rJson)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
HashMap_OWString_Interface aMap
uno::Reference< drawing::XShape > const mxShape
const sal_Unicode *const aMimeType[]
SdrTextObj * DynCastSdrTextObj(SdrObject *pObj)
BitmapEx convertMetafileToBitmapEx(const GDIMetaFile &rMtf, const basegfx::B2DRange &rTargetRange, const sal_uInt32 nMaximumQuadraticPixels)
Helper to convert any GDIMetaFile to a good quality BitmapEx, using default parameters and graphic::X...