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

Definition at line 95 of file DMLPresetShapeExport.hxx.

Definition at line 94 of file DMLPresetShapeExport.hxx.

Definition at line 96 of file DMLPresetShapeExport.hxx.

Definition at line 97 of file DMLPresetShapeExport.hxx.

Constructor & Destructor Documentation

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

Definition at line 92 of file DMLPresetShapeExport.cxx.

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

Member Function Documentation

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

Definition at line 269 of file DMLPresetShapeExport.cxx.

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

Referenced by WriteShapeWithAVlist().

static css::uno::Any oox::drawingml::DMLPresetShapeExporter::FindHandleValue ( css::uno::Sequence< css::beans::PropertyValue >  aValues,
std::u16string_view  sKey 
)
staticprivate
DMLPresetShapeExporter::AngleAdjustmentValue oox::drawingml::DMLPresetShapeExporter::GetAdjustmentPointAngleValue ( sal_Int32  nPoint)
private
DMLPresetShapeExporter::RadiusAdjustmentValue oox::drawingml::DMLPresetShapeExporter::GetAdjustmentPointRadiusValue ( sal_Int32  nPoint)
private
DMLPresetShapeExporter::XAdjustmentValue oox::drawingml::DMLPresetShapeExporter::GetAdjustmentPointXValue ( sal_Int32  nPoint)
private
DMLPresetShapeExporter::YAdjustmentValue oox::drawingml::DMLPresetShapeExporter::GetAdjustmentPointYValue ( sal_Int32  nPoint)
private
const css::uno::Sequence< css::drawing::EnhancedCustomShapeAdjustmentValue > & oox::drawingml::DMLPresetShapeExporter::GetAdjustmentValues ( ) const
private
css::uno::Any oox::drawingml::DMLPresetShapeExporter::GetHandleValueOfModificationPoint ( sal_Int32  nPoint,
std::u16string_view  sType 
)
private
const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > & oox::drawingml::DMLPresetShapeExporter::GetHandleValues ( ) const
private

Definition at line 101 of file DMLPresetShapeExport.cxx.

References m_HandleValues.

Referenced by GetHandleValueOfModificationPoint().

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

Definition at line 98 of file DMLPresetShapeExport.cxx.

References m_sPresetShapeType.

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

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

Definition at line 96 of file DMLPresetShapeExport.cxx.

References m_bHasHandleValues.

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

Definition at line 103 of file DMLPresetShapeExport.hxx.

Referenced by WriteShape(), and WriteShapeWithAVlist().

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

Definition at line 104 of file DMLPresetShapeExport.hxx.

Referenced by WriteShape(), and WriteShapeWithAVlist().

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

Definition at line 241 of file DMLPresetShapeExport.cxx.

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

Referenced by WriteShapeWithAVlist().

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

Member Data Documentation

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().

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

Definition at line 59 of file DMLPresetShapeExport.hxx.

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

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

Definition at line 61 of file DMLPresetShapeExport.hxx.

Referenced by DMLPresetShapeExporter().

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().

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

Definition at line 57 of file DMLPresetShapeExport.hxx.

Referenced by DMLPresetShapeExporter(), and GetShapeType().

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

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