summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-16 13:39:18 +0200
committerNoel Grandin <noel@peralex.com>2016-08-17 08:45:15 +0200
commit430b93f7f3c9f5aeb89db634447cb554acd125aa (patch)
treea38e466a9f8cacfe753ac7373016ce01191bbfa9 /cui/source
parent49561be0fd2041fc9d32c4ac1ab1063f620a4e08 (diff)
convert SvxEscapement to scoped enum
and fix a potential bug with footnotes and superscripts in writer in ndtxt.cxx, where it was passing bad args to the SvxEscapementItem constructor Change-Id: I0d2de34c056e7824f3b456a86d502e10ac93a1c1
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/inc/chardlg.hxx2
-rw-r--r--cui/source/tabpages/chardlg.cxx16
2 files changed, 9 insertions, 9 deletions
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 9600ca627442..7610e3eee420 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -295,7 +295,7 @@ private:
void Initialize();
void UpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc );
- void SetEscapement_Impl( sal_uInt16 nEsc );
+ void SetEscapement_Impl( SvxEscapement nEsc );
DECL_LINK_TYPED( PositionHdl_Impl, Button*, void );
DECL_LINK_TYPED( RotationHdl_Impl, Button*, void );
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 2684039e004e..99563d6a9afb 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2715,16 +2715,16 @@ void SvxCharPositionPage::UpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 nEscPro
}
-void SvxCharPositionPage::SetEscapement_Impl( sal_uInt16 nEsc )
+void SvxCharPositionPage::SetEscapement_Impl( SvxEscapement nEsc )
{
- SvxEscapementItem aEscItm( (SvxEscapement)nEsc, SID_ATTR_CHAR_ESCAPEMENT );
+ SvxEscapementItem aEscItm( nEsc, SID_ATTR_CHAR_ESCAPEMENT );
- if ( SVX_ESCAPEMENT_SUPERSCRIPT == nEsc )
+ if ( SvxEscapement::Superscript == nEsc )
{
aEscItm.GetEsc() = m_nSuperEsc;
aEscItm.GetProportionalHeight() = m_nSuperProp;
}
- else if ( SVX_ESCAPEMENT_SUBSCRIPT == nEsc )
+ else if ( SvxEscapement::Subscript == nEsc )
{
aEscItm.GetEsc() = m_nSubEsc;
aEscItm.GetProportionalHeight() = m_nSubProp;
@@ -2735,7 +2735,7 @@ void SvxCharPositionPage::SetEscapement_Impl( sal_uInt16 nEsc )
m_pHighLowMF->SetValue( aEscItm.GetEsc() * nFac );
m_pFontSizeMF->SetValue( aEscItm.GetProportionalHeight() );
- if ( SVX_ESCAPEMENT_OFF == nEsc )
+ if ( SvxEscapement::Off == nEsc )
{
m_pHighLowFT->Disable();
m_pHighLowMF->Disable();
@@ -2764,12 +2764,12 @@ void SvxCharPositionPage::SetEscapement_Impl( sal_uInt16 nEsc )
IMPL_LINK_TYPED( SvxCharPositionPage, PositionHdl_Impl, Button*, pBtn, void )
{
- sal_uInt16 nEsc = SVX_ESCAPEMENT_OFF; // also when pBtn == NULL
+ SvxEscapement nEsc = SvxEscapement::Off; // also when pBtn == NULL
if ( m_pHighPosBtn == pBtn )
- nEsc = SVX_ESCAPEMENT_SUPERSCRIPT;
+ nEsc = SvxEscapement::Superscript;
else if ( m_pLowPosBtn == pBtn )
- nEsc = SVX_ESCAPEMENT_SUBSCRIPT;
+ nEsc = SvxEscapement::Subscript;
SetEscapement_Impl( nEsc );
}