LibreOffice Module xmloff (master) 1
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
MultiImageImportHelper Class Referenceabstract

#include <xmlmultiimagehelper.hxx>

Inheritance diagram for MultiImageImportHelper:
[legend]

Public Member Functions

 MultiImageImportHelper ()
 
virtual ~MultiImageImportHelper ()
 
SvXMLImportContextRef solveMultipleImages ()
 solve multiple imported images. More...
 
void addContent (const SvXMLImportContext &rSvXMLImportContext)
 add a content to the remembered image import contexts More...
 
bool getSupportsMultipleContents () const
 read/write access to boolean switch More...
 
void setSupportsMultipleContents (bool bNew)
 

Protected Member Functions

virtual void removeGraphicFromImportContext (const SvXMLImportContext &rContext)=0
 helper to get the created xShape instance, override this More...
 
virtual OUString getGraphicPackageURLFromImportContext (const SvXMLImportContext &rContext) const =0
 
virtual css::uno::Reference< css::graphic::XGraphic > getGraphicFromImportContext (const SvXMLImportContext &rContext) const =0
 

Private Attributes

std::vector< SvXMLImportContextRefmaImplContextVector
 
bool mbSupportsMultipleContents
 

Detailed Description

Definition at line 25 of file xmlmultiimagehelper.hxx.

Constructor & Destructor Documentation

◆ MultiImageImportHelper()

MultiImageImportHelper::MultiImageImportHelper ( )

Definition at line 94 of file xmlmultiimagehelper.cxx.

◆ ~MultiImageImportHelper()

MultiImageImportHelper::~MultiImageImportHelper ( )
virtual

Definition at line 99 of file xmlmultiimagehelper.cxx.

Member Function Documentation

◆ addContent()

void MultiImageImportHelper::addContent ( const SvXMLImportContext rSvXMLImportContext)

add a content to the remembered image import contexts

Definition at line 170 of file xmlmultiimagehelper.cxx.

References maImplContextVector.

Referenced by SdXMLFrameShapeContext::createFastChildContext(), and XMLTextFrameContext::createFastChildContext().

◆ getGraphicFromImportContext()

virtual css::uno::Reference< css::graphic::XGraphic > MultiImageImportHelper::getGraphicFromImportContext ( const SvXMLImportContext rContext) const
protectedpure virtual

◆ getGraphicPackageURLFromImportContext()

virtual OUString MultiImageImportHelper::getGraphicPackageURLFromImportContext ( const SvXMLImportContext rContext) const
protectedpure virtual

◆ getSupportsMultipleContents()

bool MultiImageImportHelper::getSupportsMultipleContents ( ) const
inline

read/write access to boolean switch

Definition at line 51 of file xmlmultiimagehelper.hxx.

References mbSupportsMultipleContents.

Referenced by SdXMLFrameShapeContext::createFastChildContext(), and XMLTextFrameContext::createFastChildContext().

◆ removeGraphicFromImportContext()

virtual void MultiImageImportHelper::removeGraphicFromImportContext ( const SvXMLImportContext rContext)
protectedpure virtual

helper to get the created xShape instance, override this

Implemented in SdXMLFrameShapeContext, and XMLTextFrameContext.

Referenced by solveMultipleImages().

◆ setSupportsMultipleContents()

void MultiImageImportHelper::setSupportsMultipleContents ( bool  bNew)
inline

◆ solveMultipleImages()

SvXMLImportContextRef MultiImageImportHelper::solveMultipleImages ( )

solve multiple imported images.

The most valuable one is chosen, see implementation for evtl. changing weights and/or adding filetypes.

Returns
import context of the selected image

Definition at line 103 of file xmlmultiimagehelper.cxx.

References a, getGraphicFromImportContext(), getGraphicPackageURLFromImportContext(), comphelper::GraphicMimeTypeHelper::GetMimeTypeForXGraphic(), maImplContextVector, and removeGraphicFromImportContext().

Referenced by SdXMLFrameShapeContext::createFastChildContext(), XMLTextFrameContext::createFastChildContext(), SdXMLFrameShapeContext::endFastElement(), and XMLTextFrameContext::endFastElement().

Member Data Documentation

◆ maImplContextVector

std::vector< SvXMLImportContextRef > MultiImageImportHelper::maImplContextVector
private

Definition at line 28 of file xmlmultiimagehelper.hxx.

Referenced by addContent(), and solveMultipleImages().

◆ mbSupportsMultipleContents

bool MultiImageImportHelper::mbSupportsMultipleContents
private

The documentation for this class was generated from the following files: