LibreOffice Module oox (master) 1
Classes | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
oox::drawingml::DMLPresetShapeExporter Class Reference

Class for exporting the custom shapes to OOXML preset ones, if possible. More...

#include <DMLPresetShapeExport.hxx>

Collaboration diagram for oox::drawingml::DMLPresetShapeExporter:
[legend]

Classes

struct  AdjustmentPointValueBase
 

Public Member Functions

 DMLPresetShapeExporter ()=delete
 
 ~DMLPresetShapeExporter ()
 
 DMLPresetShapeExporter (DrawingML *pDMLExporter, css::uno::Reference< css::drawing::XShape > xShape)
 
bool WriteShape ()
 

Private Types

typedef AdjustmentPointValueBase RadiusAdjustmentValue
 
typedef AdjustmentPointValueBase AngleAdjustmentValue
 
typedef AdjustmentPointValueBase XAdjustmentValue
 
typedef AdjustmentPointValueBase YAdjustmentValue
 

Private Member Functions

bool HasHandleValue () const
 
bool IsXFlipped () const
 
bool IsYFlipped () const
 
const OUString & GetShapeType () const
 
const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > & GetHandleValues () const
 
const css::uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > & GetAdjustmentValues () const
 
css::uno::Any GetHandleValueOfModificationPoint (sal_Int32 nPoint, std::u16string_view sType)
 
RadiusAdjustmentValue GetAdjustmentPointRadiusValue (sal_Int32 nPoint)
 
AngleAdjustmentValue GetAdjustmentPointAngleValue (sal_Int32 nPoint)
 
XAdjustmentValue GetAdjustmentPointXValue (sal_Int32 nPoint)
 
YAdjustmentValue GetAdjustmentPointYValue (sal_Int32 nPoint)
 
bool WriteAV (const OUString &sValName, const OUString &sVal)
 
bool StartAVListWriting ()
 
bool EndAVListWriting ()
 
bool WriteShapeWithAVlist ()
 

Static Private Member Functions

static css::uno::Any FindHandleValue (css::uno::Sequence< css::beans::PropertyValue > aValues, std::u16string_view sKey)
 

Private Attributes

css::uno::Reference< css::drawing::XShape > m_xShape
 
DrawingMLm_pDMLexporter
 
OUString m_sPresetShapeType
 
bool m_bHasHandleValues
 
std::pair< bool, bool > m_bIsFlipped
 
css::uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > m_AdjustmentValues
 
css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > m_HandleValues
 

Detailed Description

Class for exporting the custom shapes to OOXML preset ones, if possible.

This functionality needed for keeping the information for the office programs about the shape type, and geometry data. Before these shapes were exported with custom geometry, and they kept their geometry but has no information about the shape itself. This lead to lost textbox size/position/padding for example.

Definition at line 49 of file DMLPresetShapeExport.hxx.

Member Typedef Documentation

◆ AngleAdjustmentValue

Definition at line 95 of file DMLPresetShapeExport.hxx.

◆ RadiusAdjustmentValue

Definition at line 94 of file DMLPresetShapeExport.hxx.

◆ XAdjustmentValue

Definition at line 96 of file DMLPresetShapeExport.hxx.

◆ YAdjustmentValue

Definition at line 97 of file DMLPresetShapeExport.hxx.

Constructor & Destructor Documentation

◆ DMLPresetShapeExporter() [1/2]

oox::drawingml::DMLPresetShapeExporter::DMLPresetShapeExporter ( )
delete

◆ ~DMLPresetShapeExporter()

oox::drawingml::DMLPresetShapeExporter::~DMLPresetShapeExporter ( )

Definition at line 90 of file DMLPresetShapeExport.cxx.

◆ DMLPresetShapeExporter() [2/2]

oox::drawingml::DMLPresetShapeExporter::DMLPresetShapeExporter ( DrawingML pDMLExporter,
css::uno::Reference< css::drawing::XShape >  xShape 
)

Member Function Documentation

◆ EndAVListWriting()

bool oox::drawingml::DMLPresetShapeExporter::EndAVListWriting ( )
private

Definition at line 265 of file DMLPresetShapeExport.cxx.

References oox::drawingml::DrawingML::GetFS(), and m_pDMLexporter.

Referenced by WriteShapeWithAVlist().

◆ FindHandleValue()

static css::uno::Any oox::drawingml::DMLPresetShapeExporter::FindHandleValue ( css::uno::Sequence< css::beans::PropertyValue >  aValues,
std::u16string_view  sKey 
)
staticprivate

◆ GetAdjustmentPointAngleValue()

DMLPresetShapeExporter::AngleAdjustmentValue oox::drawingml::DMLPresetShapeExporter::GetAdjustmentPointAngleValue ( sal_Int32  nPoint)
private

◆ GetAdjustmentPointRadiusValue()

DMLPresetShapeExporter::RadiusAdjustmentValue oox::drawingml::DMLPresetShapeExporter::GetAdjustmentPointRadiusValue ( sal_Int32  nPoint)
private

◆ GetAdjustmentPointXValue()

DMLPresetShapeExporter::XAdjustmentValue oox::drawingml::DMLPresetShapeExporter::GetAdjustmentPointXValue ( sal_Int32  nPoint)
private

◆ GetAdjustmentPointYValue()

DMLPresetShapeExporter::YAdjustmentValue oox::drawingml::DMLPresetShapeExporter::GetAdjustmentPointYValue ( sal_Int32  nPoint)
private

◆ GetAdjustmentValues()

const css::uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > & oox::drawingml::DMLPresetShapeExporter::GetAdjustmentValues ( ) const
private

◆ GetHandleValueOfModificationPoint()

css::uno::Any oox::drawingml::DMLPresetShapeExporter::GetHandleValueOfModificationPoint ( sal_Int32  nPoint,
std::u16string_view  sType 
)
private

◆ GetHandleValues()

const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > & oox::drawingml::DMLPresetShapeExporter::GetHandleValues ( ) const
private

Definition at line 99 of file DMLPresetShapeExport.cxx.

References m_HandleValues.

Referenced by GetHandleValueOfModificationPoint().

◆ GetShapeType()

const OUString & oox::drawingml::DMLPresetShapeExporter::GetShapeType ( ) const
private

Definition at line 96 of file DMLPresetShapeExport.cxx.

References m_sPresetShapeType.

Referenced by StartAVListWriting(), WriteShape(), and WriteShapeWithAVlist().

◆ HasHandleValue()

bool oox::drawingml::DMLPresetShapeExporter::HasHandleValue ( ) const
private

Definition at line 94 of file DMLPresetShapeExport.cxx.

References m_bHasHandleValues.

◆ IsXFlipped()

bool oox::drawingml::DMLPresetShapeExporter::IsXFlipped ( ) const
inlineprivate

Definition at line 103 of file DMLPresetShapeExport.hxx.

References m_bIsFlipped.

Referenced by WriteShape(), and WriteShapeWithAVlist().

◆ IsYFlipped()

bool oox::drawingml::DMLPresetShapeExporter::IsYFlipped ( ) const
inlineprivate

Definition at line 104 of file DMLPresetShapeExport.hxx.

References m_bIsFlipped.

Referenced by WriteShape(), and WriteShapeWithAVlist().

◆ StartAVListWriting()

bool oox::drawingml::DMLPresetShapeExporter::StartAVListWriting ( )
private

◆ WriteAV()

bool oox::drawingml::DMLPresetShapeExporter::WriteAV ( const OUString &  sValName,
const OUString &  sVal 
)
private

Definition at line 238 of file DMLPresetShapeExport.cxx.

References oox::drawingml::DrawingML::GetFS(), and m_pDMLexporter.

Referenced by WriteShapeWithAVlist().

◆ WriteShape()

bool oox::drawingml::DMLPresetShapeExporter::WriteShape ( )

◆ WriteShapeWithAVlist()

bool oox::drawingml::DMLPresetShapeExporter::WriteShapeWithAVlist ( )
private

Member Data Documentation

◆ m_AdjustmentValues

css::uno::Sequence<css::drawing::EnhancedCustomShapeAdjustmentValue> oox::drawingml::DMLPresetShapeExporter::m_AdjustmentValues
private

Definition at line 66 of file DMLPresetShapeExport.hxx.

Referenced by DMLPresetShapeExporter(), and GetAdjustmentValues().

◆ m_bHasHandleValues

bool oox::drawingml::DMLPresetShapeExporter::m_bHasHandleValues
private

Definition at line 59 of file DMLPresetShapeExport.hxx.

Referenced by DMLPresetShapeExporter(), HasHandleValue(), and WriteShape().

◆ m_bIsFlipped

std::pair<bool, bool> oox::drawingml::DMLPresetShapeExporter::m_bIsFlipped
private

Definition at line 61 of file DMLPresetShapeExport.hxx.

Referenced by DMLPresetShapeExporter(), IsXFlipped(), and IsYFlipped().

◆ m_HandleValues

css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue> > oox::drawingml::DMLPresetShapeExporter::m_HandleValues
private

Definition at line 69 of file DMLPresetShapeExport.hxx.

Referenced by DMLPresetShapeExporter(), and GetHandleValues().

◆ m_pDMLexporter

DrawingML* oox::drawingml::DMLPresetShapeExporter::m_pDMLexporter
private

◆ m_sPresetShapeType

OUString oox::drawingml::DMLPresetShapeExporter::m_sPresetShapeType
private

Definition at line 57 of file DMLPresetShapeExport.hxx.

Referenced by DMLPresetShapeExporter(), and GetShapeType().

◆ m_xShape

css::uno::Reference<css::drawing::XShape> oox::drawingml::DMLPresetShapeExporter::m_xShape
private

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