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();
118 ExportSettings::ExportSettings()
121 ,mbExportOnlyBackground(
false )
122 ,mbScrollText(
false )
123 ,mbUseHighContrast(
false )
124 ,mbTranslucent(
false )
134 class GraphicExporter :
public WeakImplHelper< XGraphicExportFilter, XServiceInfo >
140 virtual sal_Bool SAL_CALL
filter(
const Sequence< PropertyValue >& aDescriptor )
override;
141 virtual void SAL_CALL cancel( )
override;
144 virtual void SAL_CALL setSourceDocument(
const Reference< XComponent >& xDoc )
override;
152 virtual sal_Bool SAL_CALL supportsMimeType(
const OUString& MimeTypeName )
override;
153 virtual Sequence< OUString > SAL_CALL getSupportedMimeTypeNames( )
override;
159 void ParseSettings(
const Sequence< PropertyValue >& aDescriptor, ExportSettings& rSettings );
160 bool GetGraphic( ExportSettings
const & rSettings,
Graphic& aGraphic,
bool bVectorType );
164 Reference< XDrawPage > mxPage;
165 Reference< XShapes > mxShapes;
171 sal_Int32 mnPageNumber;
182 sal_uInt32 nMaximumQuadraticPixels(500000);
194 nMaximumQuadraticPixels = std::min(sal_uInt32(4096 * 4096), sal_uInt32(pSize->
Width() * pSize->
Height()));
207 Size* CalcSize( sal_Int32 nWidth, sal_Int32 nHeight,
const Size& aBoundSize,
Size& aOutSize )
209 if( (nWidth == 0) && (nHeight == 0) )
212 if( (nWidth == 0) && (nHeight != 0) && (aBoundSize.
Height() != 0) )
214 nWidth = ( nHeight * aBoundSize.
Width() ) / aBoundSize.
Height();
216 else if( (nWidth != 0) && (nHeight == 0) && (aBoundSize.
Width() != 0) )
218 nHeight = ( nWidth * aBoundSize.
Height() ) / aBoundSize.
Width();
230 explicit ImplExportCheckVisisbilityRedirector(
SdrPage* pCurrentPage );
241ImplExportCheckVisisbilityRedirector::ImplExportCheckVisisbilityRedirector(
SdrPage* pCurrentPage )
242: mpCurrentPage( pCurrentPage )
246void ImplExportCheckVisisbilityRedirector::createRedirectedPrimitive2DSequence(
255 SdrPage* pPage = mpCurrentPage;
259 pPage =
pObject->getSdrPageFromSdrObject();
262 if( (pPage ==
nullptr) || pPage->
checkVisibility(rOriginal, rDisplayInfo,
false) )
276GraphicExporter::GraphicExporter()
277: mpUnoPage(
nullptr ), mnPageNumber(-1), mpCurrentPage(
nullptr), mpDoc(
nullptr )
287 pInfo->SetSdrPage( mpCurrentPage );
289 else if( mnPageNumber != -1 )
291 const SvxFieldData* pField = pInfo->GetField().GetField();
294 OUString aPageNumValue;
297 switch(mpDoc->GetPageNumType())
299 case css::style::NumberingType::CHARS_UPPER_LETTER:
300 aPageNumValue += OUStringChar(
sal_Unicode((mnPageNumber - 1) % 26 +
'A') );
302 case css::style::NumberingType::CHARS_LOWER_LETTER:
303 aPageNumValue += OUStringChar(
sal_Unicode((mnPageNumber - 1) % 26 +
'a') );
305 case css::style::NumberingType::ROMAN_UPPER:
308 case css::style::NumberingType::ROMAN_LOWER:
311 case css::style::NumberingType::NUMBER_NONE:
315 aPageNumValue += OUString::number( mnPageNumber );
318 pInfo->SetRepresentation( aPageNumValue );
325 maOldCalcFieldValueHdl.Call( pInfo );
327 if( pInfo && mpCurrentPage )
328 pInfo->SetSdrPage(
nullptr );
338 MapMode aMM( MapUnit::Map100thMM );
340 Point aPoint( 0, 0 );
344 if( nWidthPixel != 0 )
346 const Fraction aFrac( nWidthPixel, pVDev->LogicToPixel( aPageSize, aMM ).Width() );
350 if( nHeightPixel == 0 )
354 if( nHeightPixel != 0 )
356 const Fraction aFrac( nHeightPixel, pVDev->LogicToPixel( aPageSize, aMM ).Height() );
358 if( nWidthPixel == 0 )
364 pVDev->SetMapMode( aMM );
365 bool bSuccess(
false);
368 if(nWidthPixel && nHeightPixel)
370 bSuccess = pVDev->SetOutputSizePixel(
Size(nWidthPixel, nHeightPixel));
374 bSuccess = pVDev->SetOutputSize(aPageSize);
390 ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage );
396 OSL_ENSURE(
false,
"Could not get a VirtualDevice of requested size (!)");
402void GraphicExporter::ParseSettings(
const Sequence<PropertyValue>& rDescriptor,
403 ExportSettings& rSettings)
405 Sequence<PropertyValue> aDescriptor = rDescriptor;
406 if (aDescriptor.hasElements())
409 Sequence<PropertyValue> aFilterData;
410 OUString aFilterOptions;
411 auto it =
aMap.find(
"FilterData");
412 if (it !=
aMap.end())
414 it->second >>= aFilterData;
416 it =
aMap.find(
"FilterOptions");
417 if (it !=
aMap.end())
419 it->second >>= aFilterOptions;
421 if (!aFilterData.hasElements() && !aFilterOptions.isEmpty())
424 std::vector<PropertyValue>
aData
427 if (aFilterData.hasElements())
429 aMap[
"FilterData"] <<= aFilterData;
430 aDescriptor =
aMap.getAsConstPropertyValueList();
435 for(
const PropertyValue& rValue : aDescriptor )
437 if ( rValue.Name ==
"FilterName" )
439 rValue.Value >>= rSettings.maFilterName;
441 else if ( rValue.Name ==
"MediaType" )
443 rValue.Value >>= rSettings.maMediaType;
445 else if ( rValue.Name ==
"URL" )
447 if( !( rValue.Value >>= rSettings.maURL ) )
449 rValue.Value >>= rSettings.maURL.Complete;
452 else if ( rValue.Name ==
"OutputStream" )
454 rValue.Value >>= rSettings.mxOutputStream;
456 else if ( rValue.Name ==
"GraphicRenderer" )
458 rValue.Value >>= rSettings.mxGraphicRenderer;
460 else if ( rValue.Name ==
"StatusIndicator" )
462 rValue.Value >>= rSettings.mxStatusIndicator;
464 else if ( rValue.Name ==
"InteractionHandler" )
466 rValue.Value >>= rSettings.mxInteractionHandler;
468 else if( rValue.Name ==
"Width" )
470 rValue.Value >>= rSettings.mnWidth;
472 else if( rValue.Name ==
"Height" )
474 rValue.Value >>= rSettings.mnHeight;
476 else if( rValue.Name ==
"ExportOnlyBackground" )
478 rValue.Value >>= rSettings.mbExportOnlyBackground;
480 else if ( rValue.Name ==
"FilterData" )
482 rValue.Value >>= rSettings.maFilterData;
484 for( PropertyValue& rDataValue : asNonConstRange(rSettings.maFilterData) )
486 if ( rDataValue.Name ==
"Translucent" )
488 if ( !( rDataValue.Value >>= rSettings.mbTranslucent ) )
490 sal_Int32 nTranslucent = 0;
491 if ( rDataValue.Value >>= nTranslucent )
492 rSettings.mbTranslucent = nTranslucent != 0;
495 else if ( rDataValue.Name ==
"PixelWidth" )
497 rDataValue.Value >>= rSettings.mnWidth;
499 else if ( rDataValue.Name ==
"PixelHeight" )
501 rDataValue.Value >>= rSettings.mnHeight;
503 else if( rDataValue.Name ==
"Width" )
505 rDataValue.Value >>= rSettings.mnWidth;
506 rDataValue.Name =
"PixelWidth";
508 else if( rDataValue.Name ==
"Height" )
510 rDataValue.Value >>= rSettings.mnHeight;
511 rDataValue.Name =
"PixelHeight";
513 else if ( rDataValue.Name ==
"ExportOnlyBackground" )
515 rDataValue.Value >>= rSettings.mbExportOnlyBackground;
517 else if ( rDataValue.Name ==
"HighContrast" )
519 rDataValue.Value >>= rSettings.mbUseHighContrast;
521 else if ( rDataValue.Name ==
"PageNumber" )
523 rDataValue.Value >>= mnPageNumber;
525 else if ( rDataValue.Name ==
"ScrollText" )
528 rDataValue.Value >>= rSettings.mbScrollText;
530 else if ( rDataValue.Name ==
"CurrentPage" )
532 Reference< XDrawPage > xPage;
533 rDataValue.Value >>= xPage;
536 SvxDrawPage* pUnoPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage );
541 else if ( rDataValue.Name ==
"ScaleXNumerator" )
544 if( rDataValue.Value >>= nVal )
545 rSettings.maScaleX =
Fraction( nVal, rSettings.maScaleX.GetDenominator() );
547 else if ( rDataValue.Name ==
"ScaleXDenominator" )
550 if( rDataValue.Value >>= nVal )
551 rSettings.maScaleX =
Fraction( rSettings.maScaleX.GetNumerator(), nVal );
553 else if ( rDataValue.Name ==
"ScaleYNumerator" )
556 if( rDataValue.Value >>= nVal )
557 rSettings.maScaleY =
Fraction( nVal, rSettings.maScaleY.GetDenominator() );
559 else if ( rDataValue.Name ==
"ScaleYDenominator" )
562 if( rDataValue.Value >>= nVal )
563 rSettings.maScaleY =
Fraction( rSettings.maScaleY.GetNumerator(), nVal );
565 else if (rDataValue.Name ==
"AntiAliasing")
568 if (rDataValue.Value >>= bAntiAliasing)
576 if ( rSettings.mxStatusIndicator.is() )
578 int i = rSettings.maFilterData.getLength();
579 rSettings.maFilterData.realloc(
i + 1 );
580 auto pFilterData = rSettings.maFilterData.getArray();
581 pFilterData[
i ].Name =
"StatusIndicator";
582 pFilterData[
i ].Value <<= rSettings.mxStatusIndicator;
586bool GraphicExporter::GetGraphic( ExportSettings
const & rSettings,
Graphic& aGraphic,
bool bVectorType )
588 if( !mpDoc || !mpUnoPage )
591 SdrPage* pPage = mpUnoPage->GetSdrPage();
596 const MapMode aMap( mpDoc->GetScaleUnit(),
Point(), rSettings.maScaleX, rSettings.maScaleY );
609 std::vector< SdrObject* > aShapes;
615 if( rSettings.mbExportOnlyBackground )
619 if(pCorrectProperties)
624 pTempBackgroundShape->SetMergedItemSet(pCorrectProperties->
GetItemSet());
625 pTempBackgroundShape->SetMergedItem(
XLineStyleItem(drawing::LineStyle_NONE));
626 pTempBackgroundShape->NbcSetStyleSheet(pCorrectProperties->
GetStyleSheet(),
true);
627 aShapes.push_back(pTempBackgroundShape.get());
636 if ( !bVectorType && !rSettings.mbTranslucent )
640 if ( rSettings.mnWidth > 0 && rSettings.mnHeight > 0 )
642 nWidthPix = rSettings.mnWidth;
643 nHeightPix = rSettings.mnHeight;
653 nWidthPix = aSizePix.
Width();
657 nHeightPix = aSizePix.
Height();
659 double fWidthDif =
static_cast<double>(aSizePix.
Width()) / nWidthPix;
660 double fHeightDif =
static_cast<double>(aSizePix.
Height()) / nHeightPix;
662 if (fWidthDif > fHeightDif)
669 nWidthPix = aSizePix.
Width();
670 nHeightPix = aSizePix.
Height();
674 std::unique_ptr<SdrView> xLocalView;
678 xLocalView.reset(
new FmFormView(*pFormModel, aVDev));
682 xLocalView.reset(
new SdrView(*mpDoc, aVDev));
689 aGraphic = pVDev->GetBitmapEx(
Point(), pVDev->GetOutputSize() );
699 aVDev->SetMapMode(
aMap );
700 if( rSettings.mbUseHighContrast )
701 aVDev->SetDrawMode( aVDev->GetDrawMode() | DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient );
702 aVDev->EnableOutput(
false );
707 std::unique_ptr< SdrView > pView;
711 pView.reset(
new FmFormView(*pFormModel, aVDev));
715 pView.reset(
new SdrView(*mpDoc, aVDev));
718 pView->SetBordVisible(
false );
719 pView->SetPageVisible(
false );
720 pView->ShowSdrPage( pPage );
725 pView->SetPageDecorationAllowed(
false);
735 aVDev->SetRelativeMapMode( aVMap );
736 aVDev->IntersectClipRegion( aClipRect );
739 ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage );
760 pView->HideSdrPage();
762 if( rSettings.mbTranslucent )
765 aGraphic = GetBitmapFromMetaFile( aGraphic.
GetGDIMetaFile(), CalcSize( rSettings.mnWidth, rSettings.mnHeight, aNewSize, aOutSize ) );
777 Reference< XShape > xShape;
778 const sal_Int32
nCount = mxShapes->getCount();
782 mxShapes->getByIndex(
nIndex ) >>= xShape;
785 aShapes.push_back( pObj );
793 aShapes.push_back( pObj );
796 if( aShapes.empty() )
800 if( bRet && !aShapes.empty() )
803 bool bSingleGraphic =
false;
805 if( 1 == aShapes.size() )
809 if(
auto pGrafObj =
dynamic_cast<const SdrGrafObj*
>(aShapes.front()) )
810 if (pGrafObj->HasText() )
812 aGraphic = pGrafObj->GetTransformedGraphic();
813 if ( aGraphic.
GetType() == GraphicType::Bitmap )
816 if( rSettings.mnWidth && rSettings.mnHeight &&
817 ( ( rSettings.mnWidth != aSizePixel.
Width() ) ||
818 ( rSettings.mnHeight != aSizePixel.
Height() ) ) )
822 aBmpEx.
Scale(
Size( rSettings.mnWidth, rSettings.mnHeight ), BmpScaleFlag::Lanczos );
829 bSingleGraphic =
true;
833 else if( rSettings.mbScrollText )
837 if( pTextObj && pTextObj->HasText() )
842 const std::unique_ptr< GDIMetaFile > pMtf(
843 pTextObj->GetTextScrollMetaFileAndRectangle(
844 aScrollRectangle, aPaintRectangle ) );
851 if( aScrollRectangle.
Contains( aPaintRectangle ) )
852 aTextRect = aScrollRectangle;
854 aTextRect = aPaintRectangle;
857 pMtf->SetPrefSize( aTextRect.
GetSize() );
864 -aPaintRectangle.
Top() ) );
865 pMtf->SetPrefMapMode( aLocalMapMode );
868 "XTEXT_SCROLLRECT", 0,
869 reinterpret_cast<sal_uInt8 const*
>(&aScrollRectangle),
872 "XTEXT_PAINTRECT", 0,
873 reinterpret_cast<sal_uInt8 const*
>(&aPaintRectangle),
878 bSingleGraphic =
true;
883 if( !bSingleGraphic )
903 pObj->GetViewContact().getViewIndependentPrimitive2DContainer(aSequence);
908 aOut->EnableOutput(
false );
909 aOut->SetMapMode(
aMap );
910 if( rSettings.mbUseHighContrast )
911 aOut->SetDrawMode( aOut->GetDrawMode() | DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient );
918 const Size aOnePixelInMtf(
922 const Size aHalfPixelInMtf(
923 (aOnePixelInMtf.
getWidth() + 1) / 2,
932 aOut->SetRelativeMapMode( aOutMap );
938 if(mpCurrentPage->TRG_HasMasterPage() && pPage->
IsMasterPage())
941 aDisplayInfo.
SetProcessLayers(mpCurrentPage->TRG_GetMasterPageVisibleLayers());
950 ImplExportCheckVisisbilityRedirector aCheckVisibilityRedirector(mpCurrentPage);
952 aMultiObjectPainter.SetViewObjectContactRedirector(&aCheckVisibilityRedirector);
968 const Size aBoundSize(
977 aGraphic = GetBitmapFromMetaFile( aMtf, CalcSize( rSettings.mnWidth, rSettings.mnHeight, aBoundSize, aOutSize ) );
986 pTempBackgroundShape.clear();
998sal_Bool SAL_CALL GraphicExporter::filter(
const Sequence< PropertyValue >& aDescriptor )
1005 if(
maGraphic.
IsNone() && (
nullptr == mpUnoPage->GetSdrPage() ||
nullptr == mpDoc ) )
1011 ExportSettings aSettings;
1012 ParseSettings(aDescriptor, aSettings);
1014 const sal_uInt16 nFilter = !aSettings.maMediaType.isEmpty()
1059 if( aSettings.mxGraphicRenderer.is() )
1062 aSettings.mxGraphicRenderer->render( aGraphic.
GetXGraphic() );
1064 else if( aSettings.mxOutputStream.is() )
1070 nStatus = rFilter.
ExportGraphic( aGraphic,
u"", aStream, nFilter, &aSettings.maFilterData );
1075 aOutputStream.WriteStream( aStream );
1087 if ( aSettings.mxInteractionHandler.is() && ( nStatus !=
ERRCODE_NONE ) )
1090 Sequence< css::uno::Reference< css::task::XInteractionContinuation > > lContinuations{
1091 new ::comphelper::OInteractionApprove()
1094 GraphicFilterRequest aErrorCode;
1095 aErrorCode.ErrCode = sal_uInt32(nStatus);
1096 aInteraction <<= aErrorCode;
1102void SAL_CALL GraphicExporter::cancel()
1109void SAL_CALL GraphicExporter::setSourceDocument(
const Reference< lang::XComponent >& xComponent )
1114 mpUnoPage =
nullptr;
1121 mxPage.set( xComponent, UNO_QUERY );
1122 mxShapes.set( xComponent, UNO_QUERY );
1123 mxShape.set( xComponent, UNO_QUERY );
1126 if( !mxPage.is() && !
mxShape.is() && mxShapes.is() )
1129 if( 0 == mxShapes->getCount() )
1133 mxShapes->getByIndex(0) >>=
mxShape;
1146 uno::Reference<beans::XPropertySet> xPropertySet(
mxShape, uno::UNO_QUERY);
1147 if (!xPropertySet.is())
1149 uno::Reference<graphic::XGraphic> xGraphic(
1150 xPropertySet->getPropertyValue(
"Graphic"), uno::UNO_QUERY);
1162 Reference< XChild > xChild(
mxShape, UNO_QUERY );
1166 Reference< XInterface > xInt;
1169 xInt = xChild->getParent();
1170 mxPage.set( xInt, UNO_QUERY );
1172 xChild.set( xInt, UNO_QUERY );
1174 while( !mxPage.is() && xChild.is() );
1184 mpUnoPage = comphelper::getFromUnoTunnel<SvxDrawPage>( mxPage );
1186 if(
nullptr == mpUnoPage ||
nullptr == mpUnoPage->GetSdrPage() )
1189 mpDoc = &mpUnoPage->GetSdrPage()->getSdrModelFromSdrPage();
1196 SdrPage* pPage = mpUnoPage->GetSdrPage();
1198 Reference< XShape > xShape;
1202 const sal_Int32
nCount = mxShapes->getCount();
1208 mxShapes->getByIndex(
nIndex ) >>= xShape;
1226 throw IllegalArgumentException();
1230OUString SAL_CALL GraphicExporter::getImplementationName( )
1232 return "com.sun.star.comp.Draw.GraphicExporter";
1240Sequence< OUString > SAL_CALL GraphicExporter::getSupportedServiceNames( )
1242 Sequence< OUString > aSupportedServiceNames {
"com.sun.star.drawing.GraphicExportFilter" };
1243 return aSupportedServiceNames;
1247sal_Bool SAL_CALL GraphicExporter::supportsMimeType(
const OUString& rMimeTypeName )
1252 for( nFilter = 0; nFilter <
nCount; nFilter++ )
1263Sequence< OUString > SAL_CALL GraphicExporter::getSupportedMimeTypeNames( )
1268 sal_uInt16 nFound = 0;
1271 OUString* pStr =
aSeq.getArray();
1273 for( nFilter = 0; nFilter <
nCount; nFilter++ )
1284 aSeq.realloc( nFound );
1297 Reference< XComponent > xComp( rShape.
getUnoShape(), UNO_QUERY_THROW );
1298 xExporter->setSourceDocument( xComp );
1299 ExportSettings aSettings;
1300 xExporter->GetGraphic( aSettings, aGraphic,
true );
1309extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
1311 css::uno::XComponentContext *,
1312 css::uno::Sequence<css::uno::Any>
const &)
1314 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 OUString &, 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
constexpr tools::Long Y() const
constexpr tools::Long X() const
This class represents an embedded or linked bitmap graphic object.
SdrPageView * ShowSdrPage(SdrPage *pPage) override
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
virtual css::uno::Reference< css::drawing::XShape > getUnoShape()
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)
class SvxPropertySetInfoPool
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...