Kaydet (Commit) 8821dc7f authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

Convert XMLTextParagraphExport::FrameType to scoped enum

Change-Id: I9e36f6566310e960a2b49f5a57f4b4491d32bb9a
Reviewed-on: https://gerrit.libreoffice.org/25366Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 3349594b
......@@ -105,7 +105,7 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport
XMLTextListsHelper* mpTextListsHelper;
::std::vector< XMLTextListsHelper* > maTextListsHelperStack;
enum FrameType { FT_TEXT, FT_GRAPHIC, FT_EMBEDDED, FT_SHAPE };
enum class FrameType { Text, Graphic, Embedded, Shape };
public:
enum FieldmarkType { NONE, TEXT, CHECK }; // Used for simulating fieldmarks in OpenDocument 1.n Strict (for n <= 2). CHECK currently ignored.
......@@ -607,7 +607,7 @@ inline void XMLTextParagraphExport::exportTextFrame(
bool bAutoStyles, bool bIsProgress, bool bExportContent,
const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet)
{
exportAnyTextFrame( rTextContent, FT_TEXT, bAutoStyles, bIsProgress,
exportAnyTextFrame( rTextContent, FrameType::Text, bAutoStyles, bIsProgress,
bExportContent, pRangePropSet );
}
......@@ -616,7 +616,7 @@ inline void XMLTextParagraphExport::exportTextGraphic(
bool bAutoStyles,
const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet )
{
exportAnyTextFrame( rTextContent, FT_GRAPHIC, bAutoStyles, false,
exportAnyTextFrame( rTextContent, FrameType::Graphic, bAutoStyles, false,
true, pRangePropSet );
}
......@@ -625,7 +625,7 @@ inline void XMLTextParagraphExport::exportTextEmbedded(
bool bAutoStyles,
const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet )
{
exportAnyTextFrame( rTextContent, FT_EMBEDDED, bAutoStyles, false,
exportAnyTextFrame( rTextContent, FrameType::Embedded, bAutoStyles, false,
true, pRangePropSet );
}
......@@ -634,7 +634,7 @@ inline void XMLTextParagraphExport::exportShape(
bool bAutoStyles,
const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet )
{
exportAnyTextFrame( rTextContent, FT_SHAPE, bAutoStyles, false,
exportAnyTextFrame( rTextContent, FrameType::Shape, bAutoStyles, false,
true, pRangePropSet );
}
......
......@@ -2770,10 +2770,10 @@ void XMLTextParagraphExport::exportAnyTextFrame(
if( bAutoStyles )
{
if( FT_EMBEDDED == eType )
if( FrameType::Embedded == eType )
_collectTextEmbeddedAutoStyles( xPropSet );
// No text frame style for shapes (#i28745#)
else if ( FT_SHAPE != eType )
else if ( FrameType::Shape != eType )
Add( XML_STYLE_FAMILY_TEXT_FRAME, xPropSet );
if( pRangePropSet && lcl_txtpara_isBoundAsChar( xPropSet,
......@@ -2782,7 +2782,7 @@ void XMLTextParagraphExport::exportAnyTextFrame(
switch( eType )
{
case FT_TEXT:
case FrameType::Text:
{
// frame bound frames
if ( bExportContent )
......@@ -2794,7 +2794,7 @@ void XMLTextParagraphExport::exportAnyTextFrame(
}
}
break;
case FT_SHAPE:
case FrameType::Shape:
{
Reference < XShape > xShape( rTxtCntnt, UNO_QUERY );
GetExport().GetShapeExport()->collectShapeAutoStyles( xShape );
......@@ -2840,22 +2840,22 @@ void XMLTextParagraphExport::exportAnyTextFrame(
XML_NAMESPACE_TEXT, XML_SPAN, false, false );
{
SvXMLElementExport aElement( GetExport(),
FT_SHAPE != eType &&
FrameType::Shape != eType &&
addHyperlinkAttributes( xPropSet,
xPropState,xPropSetInfo ),
XML_NAMESPACE_DRAW, XML_A, false, false );
switch( eType )
{
case FT_TEXT:
case FrameType::Text:
_exportTextFrame( xPropSet, xPropSetInfo, bIsProgress );
break;
case FT_GRAPHIC:
case FrameType::Graphic:
_exportTextGraphic( xPropSet, xPropSetInfo );
break;
case FT_EMBEDDED:
case FrameType::Embedded:
_exportTextEmbedded( xPropSet, xPropSetInfo );
break;
case FT_SHAPE:
case FrameType::Shape:
{
Reference < XShape > xShape( rTxtCntnt, UNO_QUERY );
XMLShapeExportFlags nFeatures =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment