diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-30 15:47:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-31 06:59:31 +0000 |
commit | dcffc21805828ddff7de1282f3d40ffdf3fac38d (patch) | |
tree | 1b4e81850b3fcd42cee470a18413745732c36c4a /cui | |
parent | 7fca8e61ce992e9dc6f900b77142a123c0c10b6d (diff) |
use actual UNO enums in svx
Change-Id: I00f53260667861ca2595892b5605479da3401adb
Reviewed-on: https://gerrit.libreoffice.org/35913
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/inc/swpossizetabpage.hxx | 5 | ||||
-rw-r--r-- | cui/source/tabpages/swpossizetabpage.cxx | 19 | ||||
-rw-r--r-- | cui/source/tabpages/tpline.cxx | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx index 4442250f19cf..c11050f778d5 100644 --- a/cui/source/inc/swpossizetabpage.hxx +++ b/cui/source/inc/swpossizetabpage.hxx @@ -26,6 +26,7 @@ #include <vcl/lstbox.hxx> #include <svx/swframeposstrings.hxx> #include <svx/swframeexample.hxx> +#include <com/sun/star/text/TextContentAnchorType.hpp> // SvxSwPosSizeTabPage - position and size page for Writer drawing objects struct FrmMap; @@ -109,13 +110,13 @@ class SvxSwPosSizeTabPage : public SfxTabPage DECL_LINK( ModifyHdl, Edit&, void ); DECL_LINK(ProtectHdl, Button*, void); - void InitPos(short nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel, + void InitPos(css::text::TextContentAnchorType nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel, sal_uInt16 nV, sal_uInt16 nVRel, long nX, long nY); sal_uInt16 GetMapPos(FrmMap *pMap, ListBox &rAlignLB); static short GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); static short GetRelation(FrmMap *pMap, ListBox &rRelationLB); - short GetAnchorType(bool* pbHasChanged = nullptr); + css::text::TextContentAnchorType GetAnchorType(bool* pbHasChanged = nullptr); void FillRelLB(FrmMap *pMap, sal_uInt16 nLBSelPos, sal_uInt16 nAlign, sal_uInt16 nRel, ListBox &rLB, FixedText &rFT); sal_uInt16 FillPosLB(FrmMap *pMap, sal_uInt16 nAlign, const sal_uInt16 _nRel, ListBox &rLB); diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 2a4deffed663..4e669fd6dcf3 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -30,7 +30,6 @@ #include <svx/svdpagv.hxx> #include <svx/rectenum.hxx> #include <sal/macros.h> -#include <com/sun/star/text/TextContentAnchorType.hpp> #include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/text/VertOrientation.hpp> #include <com/sun/star/text/RelOrientation.hpp> @@ -772,11 +771,11 @@ const sal_uInt16* SvxSwPosSizeTabPage::GetRanges() bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet) { bool bAnchorChanged = false; - short nAnchor = GetAnchorType(&bAnchorChanged); + css::text::TextContentAnchorType nAnchor = GetAnchorType(&bAnchorChanged); bool bModified = false; if(bAnchorChanged) { - rSet->Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor)); + rSet->Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, (sal_Int16)nAnchor)); bModified = true; } if ( m_pPositionCB->IsValueChangedFromSaved() ) @@ -926,10 +925,10 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet* rSet) { const SfxPoolItem* pItem = GetItem( *rSet, SID_ATTR_TRANSFORM_ANCHOR ); bool bInvalidateAnchor = false; - short nAnchorType = TextContentAnchorType_AT_PARAGRAPH; + TextContentAnchorType nAnchorType = TextContentAnchorType_AT_PARAGRAPH; if(pItem) { - nAnchorType = static_cast<const SfxInt16Item*>(pItem)->GetValue(); + nAnchorType = (TextContentAnchorType) static_cast<const SfxInt16Item*>(pItem)->GetValue(); switch(nAnchorType) { case TextContentAnchorType_AT_PAGE: m_pToPageRB->Check(); break; @@ -1102,9 +1101,9 @@ void SvxSwPosSizeTabPage::EnableAnchorTypes(SvxAnchorIds nAnchorEnable) m_pToPageRB->Enable(false); } -short SvxSwPosSizeTabPage::GetAnchorType(bool* pbHasChanged) +TextContentAnchorType SvxSwPosSizeTabPage::GetAnchorType(bool* pbHasChanged) { - short nRet = -1; + TextContentAnchorType nRet = (TextContentAnchorType)-1; RadioButton* pCheckedButton = nullptr; if(m_pToParaRB->IsEnabled()) { @@ -1234,7 +1233,7 @@ IMPL_LINK_NOARG(SvxSwPosSizeTabPage, AnchorTypeHdl, Button*, void) // type to-paragraph' and to-character m_pFollowCB->Enable( m_pToParaRB->IsChecked() || m_pToCharRB->IsChecked() ); - short nId = GetAnchorType(); + TextContentAnchorType nId = GetAnchorType(); InitPos( nId, USHRT_MAX, 0, USHRT_MAX, 0, LONG_MAX, LONG_MAX); RangeModifyHdl(*m_pWidthMF); @@ -1248,7 +1247,7 @@ IMPL_LINK_NOARG(SvxSwPosSizeTabPage, AnchorTypeHdl, Button*, void) IMPL_LINK_NOARG(SvxSwPosSizeTabPage, MirrorHdl, Button*, void) { - short nId = GetAnchorType(); + TextContentAnchorType nId = GetAnchorType(); InitPos( nId, USHRT_MAX, 0, USHRT_MAX, 0, LONG_MAX, LONG_MAX); } @@ -1490,7 +1489,7 @@ sal_uInt16 SvxSwPosSizeTabPage::GetMapPos(FrmMap *pMap, ListBox &rAlignLB) return nMapPos; } -void SvxSwPosSizeTabPage::InitPos(short nAnchor, +void SvxSwPosSizeTabPage::InitPos(TextContentAnchorType nAnchor, sal_uInt16 nH, sal_uInt16 nHRel, sal_uInt16 nV, diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index d01c4aa03f36..c9719e945f6a 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -1417,7 +1417,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs ) switch(eLineJoint) { - case css::drawing::LineJoint_MAKE_FIXED_SIZE: // fallback to round, unused value + case css::drawing::LineJoint::LineJoint_MAKE_FIXED_SIZE: // fallback to round, unused value case css::drawing::LineJoint_ROUND : m_pLBEdgeStyle->SelectEntryPos(0); break; case css::drawing::LineJoint_NONE : m_pLBEdgeStyle->SelectEntryPos(1); break; case css::drawing::LineJoint_MIDDLE : // fallback to mitre, unused value |