summaryrefslogtreecommitdiff
path: root/include/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-15 15:40:48 +0200
committerNoel Grandin <noel@peralex.com>2016-08-17 08:45:15 +0200
commitd5ad8f9619d463a643ab53447cf3576a9ff1a716 (patch)
tree47ce09a862b18ecab15d4fec9c74fea34b42e930 /include/editeng
parentfd0e67ce0d8cf84470b1414009ed1e0f81410b0f (diff)
convert SvxBreak to scoped enum
Change-Id: If8b79ed617e5662550bd73bd1506d047217f2313
Diffstat (limited to 'include/editeng')
-rw-r--r--include/editeng/formatbreakitem.hxx13
-rw-r--r--include/editeng/svxenum.hxx20
2 files changed, 16 insertions, 17 deletions
diff --git a/include/editeng/formatbreakitem.hxx b/include/editeng/formatbreakitem.hxx
index 23f412c7b021..b7a57f883b98 100644
--- a/include/editeng/formatbreakitem.hxx
+++ b/include/editeng/formatbreakitem.hxx
@@ -28,7 +28,7 @@
/* [Description]
- This item Describes a wrap-attribute
+ This item describes a wrap-attribute
Automatic?, Page or column break, before or after?
*/
#define FMTBREAK_NOAUTO ((sal_uInt16)0x0001)
@@ -38,7 +38,7 @@ class EDITENG_DLLPUBLIC SvxFormatBreakItem : public SfxEnumItem
public:
static SfxPoolItem* CreateDefault();
- inline SvxFormatBreakItem( const SvxBreak eBrk /*= SVX_BREAK_NONE*/,
+ inline SvxFormatBreakItem( const SvxBreak eBrk /*= SvxBreak::NONE*/,
const sal_uInt16 nWhich );
inline SvxFormatBreakItem( const SvxFormatBreakItem& rBreak );
inline SvxFormatBreakItem& operator=( const SvxFormatBreakItem& rCpy );
@@ -60,10 +60,9 @@ public:
virtual SfxPoolItem* Create( SvStream&, sal_uInt16 ) const override;
virtual sal_uInt16 GetValueCount() const override;
- // MS VC4.0 messes things up
- void SetValue( sal_uInt16 nNewVal )
- {SfxEnumItem::SetValue(nNewVal); }
- SvxBreak GetBreak() const { return SvxBreak( GetValue() ); }
+ void SetValue( SvxBreak nNewVal )
+ {SfxEnumItem::SetValue((sal_uInt16) nNewVal); }
+ SvxBreak GetBreak() const { return (SvxBreak) GetValue(); }
};
@@ -79,7 +78,7 @@ inline SvxFormatBreakItem::SvxFormatBreakItem( const SvxFormatBreakItem& rBreak
inline SvxFormatBreakItem& SvxFormatBreakItem::operator=(
const SvxFormatBreakItem& rBreak )
{
- SetValue( rBreak.GetValue() );
+ SetValue( rBreak.GetBreak() );
return *this;
}
diff --git a/include/editeng/svxenum.hxx b/include/editeng/svxenum.hxx
index f0860c252025..6044dbd4718b 100644
--- a/include/editeng/svxenum.hxx
+++ b/include/editeng/svxenum.hxx
@@ -93,16 +93,16 @@ enum SvxSpecialLineSpace
SVX_LINESPACE_END
};
-enum SvxBreak
-{
- SVX_BREAK_NONE,
- SVX_BREAK_COLUMN_BEFORE,
- SVX_BREAK_COLUMN_AFTER,
- SVX_BREAK_COLUMN_BOTH,
- SVX_BREAK_PAGE_BEFORE,
- SVX_BREAK_PAGE_AFTER,
- SVX_BREAK_PAGE_BOTH,
- SVX_BREAK_END
+enum class SvxBreak
+{
+ NONE,
+ ColumnBefore,
+ ColumnAfter,
+ ColumnBoth,
+ PageBefore,
+ PageAfter,
+ PageBoth,
+ End
};
enum SvxCellHorJustify