writerfilter: fix indentation in rtf{fly,listener}

Change-Id: I6cbb7ee535cb3c6aab2968150feff9e80fd7e010
This commit is contained in:
Miklos Vajna
2014-05-01 20:28:08 +02:00
parent 36dfee00fe
commit 8d3295bdac
2 changed files with 184 additions and 180 deletions

View File

@@ -10,12 +10,14 @@
#ifndef INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFFLY_HXX
#define INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFFLY_HXX
namespace writerfilter {
namespace rtftok {
/// Stores the vertical orientation properties of an RTF fly frame.
class RTFVertOrient
{
public:
namespace writerfilter
{
namespace rtftok
{
/// Stores the vertical orientation properties of an RTF fly frame.
class RTFVertOrient
{
public:
RTFVertOrient(sal_uInt16 nValue)
: nVal(nValue)
{
@@ -34,7 +36,7 @@ namespace writerfilter {
sal_Int32 GetAlign() const
{
sal_Int32 nAlign = 0;
switch( GetOrient( ) )
switch (GetOrient())
{
case text::VertOrientation::CENTER:
nAlign = NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_center;
@@ -53,7 +55,7 @@ namespace writerfilter {
sal_Int32 GetAnchor() const
{
sal_Int32 nAnchor = 0;
switch( GetRelation( ) )
switch (GetRelation())
{
case text::RelOrientation::FRAME:
nAnchor = NS_ooxml::LN_Value_wordprocessingml_ST_VAnchor_text;
@@ -74,14 +76,14 @@ namespace writerfilter {
return nVal;
}
private:
private:
sal_uInt16 nVal;
};
};
/// Stores the horizontal orientation properties of an RTF fly frame.
class RTFHoriOrient
{
public:
/// Stores the horizontal orientation properties of an RTF fly frame.
class RTFHoriOrient
{
public:
RTFHoriOrient(sal_uInt16 nValue)
: nVal(nValue)
{
@@ -105,7 +107,7 @@ namespace writerfilter {
sal_Int32 GetAlign() const
{
sal_Int32 nAlign = 0;
switch( GetOrient( ) )
switch (GetOrient())
{
case text::HoriOrientation::CENTER:
nAlign = NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_center;
@@ -130,7 +132,7 @@ namespace writerfilter {
sal_Int32 GetAnchor() const
{
sal_Int32 nAnchor = 0;
switch( GetRelation( ) )
switch (GetRelation())
{
case text::RelOrientation::FRAME:
nAnchor = NS_ooxml::LN_Value_wordprocessingml_ST_HAnchor_text;
@@ -151,10 +153,10 @@ namespace writerfilter {
return nVal;
}
private:
private:
sal_uInt16 nVal;
};
} // namespace rtftok
};
} // namespace rtftok
} // namespace writerfilter
#endif // INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFFLY_HXX

View File

@@ -12,34 +12,36 @@
#include <rtfcontrolwords.hxx>
namespace writerfilter {
namespace rtftok {
enum RTFInternalState
{
namespace writerfilter
{
namespace rtftok
{
enum RTFInternalState
{
INTERNAL_NORMAL,
INTERNAL_BIN,
INTERNAL_HEX
};
};
enum RTFErrors
{
enum RTFErrors
{
ERROR_OK,
ERROR_GROUP_UNDER,
ERROR_GROUP_OVER,
ERROR_EOF,
ERROR_HEX_INVALID,
ERROR_CHAR_OVER
};
};
/**
/**
* RTFTokenizer needs a class implementing this this interface. While
* RTFTokenizer separates control words (and their arguments) from
* text, the class implementing this interface is expected to map the
* raw RTF tokens to dmapper tokens.
*/
class RTFListener
{
public:
class RTFListener
{
public:
virtual ~RTFListener() { }
// Dispatching of control words and characters.
virtual int dispatchDestination(RTFKeyword nKeyword) = 0;
@@ -63,8 +65,8 @@ namespace writerfilter {
// Substream handling.
virtual void finishSubstream() = 0;
virtual bool isSubstream() const = 0;
};
} // namespace rtftok
};
} // namespace rtftok
} // namespace writerfilter
#endif // INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFLISTENER_HXX