reportdesign/source/core/api/ReportComponent.cxx | 1 - reportdesign/source/core/inc/ReportControlModel.hxx | 3 ++- reportdesign/source/core/inc/ReportHelperImpl.hxx | 4 ++-- reportdesign/source/core/sdr/RptObject.cxx | 11 ++++++----- reportdesign/source/ui/inspection/GeometryHandler.cxx | 4 ++-- reportdesign/source/ui/report/ReportController.cxx | 7 ++++--- sdext/source/minimizer/optimizerdialogcontrols.cxx | 2 +- sdext/source/pdfimport/tree/drawtreevisiting.cxx | 2 +- slideshow/source/engine/shapes/viewshape.cxx | 2 +- stoc/source/corereflection/crbase.cxx | 2 +- stoc/source/corereflection/crefl.cxx | 2 +- svtools/source/misc/langtab.cxx | 2 +- 12 files changed, 22 insertions(+), 20 deletions(-)
New commits: commit 5d0e485e827057eee9fb2c997685690b710e7f34 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Mon Apr 3 11:02:38 2017 +0200 use actual UNO enums in reportdesign..svtools Change-Id: Idcd916382b87f8542dc6b5cdcb5ecb01d6947203 Reviewed-on: https://gerrit.libreoffice.org/36043 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/reportdesign/source/core/api/ReportComponent.cxx b/reportdesign/source/core/api/ReportComponent.cxx index f66e5e97d52f..3c6c4baac61d 100644 --- a/reportdesign/source/core/api/ReportComponent.cxx +++ b/reportdesign/source/core/api/ReportComponent.cxx @@ -29,7 +29,6 @@ #include "ReportControlModel.hxx" #include <com/sun/star/reflection/XProxyFactory.hpp> #include <com/sun/star/text/ParagraphVertAlign.hpp> -#include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/i18n/ScriptType.hpp> #include <editeng/unolingu.hxx> #include <unotools/syslocale.hxx> diff --git a/reportdesign/source/core/inc/ReportControlModel.hxx b/reportdesign/source/core/inc/ReportControlModel.hxx index 6df1c5a25484..b60aca183a3a 100644 --- a/reportdesign/source/core/inc/ReportControlModel.hxx +++ b/reportdesign/source/core/inc/ReportControlModel.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/container/XContainer.hpp> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <com/sun/star/lang/Locale.hpp> +#include <com/sun/star/style/ParagraphAdjust.hpp> #include <comphelper/uno3.hxx> #include <comphelper/interfacecontainer2.hxx> @@ -35,7 +36,7 @@ namespace reportdesign { struct OFormatProperties { - ::sal_Int16 nAlign; + css::style::ParagraphAdjust nAlign; css::awt::FontDescriptor aFontDescriptor; css::awt::FontDescriptor aAsianFontDescriptor; css::awt::FontDescriptor aComplexFontDescriptor; diff --git a/reportdesign/source/core/inc/ReportHelperImpl.hxx b/reportdesign/source/core/inc/ReportHelperImpl.hxx index bc92f1167ae7..67d59ba2703a 100644 --- a/reportdesign/source/core/inc/ReportHelperImpl.hxx +++ b/reportdesign/source/core/inc/ReportHelperImpl.hxx @@ -226,12 +226,12 @@ void SAL_CALL clazz::setCharScaleWidth(::sal_Int16 the_value) \ sal_Int16 SAL_CALL clazz::getParaAdjust() \ { \ ::osl::MutexGuard aGuard(m_aMutex); \ - return varName.nAlign; \ + return (sal_Int16)varName.nAlign; \ } \ \ void SAL_CALL clazz::setParaAdjust( sal_Int16 _align ) \ { \ - set(PROPERTY_PARAADJUST,_align,varName.nAlign); \ + set(PROPERTY_PARAADJUST,(css::style::ParagraphAdjust)_align,varName.nAlign); \ } \ \ awt::FontDescriptor SAL_CALL clazz::getFontDescriptor() \ diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index ed7426783038..92ee82a45587 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -187,29 +187,30 @@ namespace { sal_Int16 nTextAlign = 0; lhs >>= nTextAlign; + style::ParagraphAdjust eAdjust; switch(nTextAlign) { case awt::TextAlign::LEFT: - nTextAlign = style::ParagraphAdjust_LEFT; + eAdjust = style::ParagraphAdjust_LEFT; break; case awt::TextAlign::CENTER: - nTextAlign = style::ParagraphAdjust_CENTER; + eAdjust = style::ParagraphAdjust_CENTER; break; case awt::TextAlign::RIGHT: - nTextAlign = style::ParagraphAdjust_RIGHT; + eAdjust = style::ParagraphAdjust_RIGHT; break; default: OSL_FAIL("Illegal text alignment value!"); break; } - aRet <<= (style::ParagraphAdjust)nTextAlign; + aRet <<= eAdjust; } else { sal_Int16 nTextAlign = 0; sal_Int16 eParagraphAdjust = 0; lhs >>= eParagraphAdjust; - switch(eParagraphAdjust) + switch((style::ParagraphAdjust)eParagraphAdjust) { case style::ParagraphAdjust_LEFT: case style::ParagraphAdjust_BLOCK: diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 7f462c0492b7..32bc6233b347 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -1253,12 +1253,12 @@ uno::Any SAL_CALL GeometryHandler::convertToControlValue(const OUString & Proper ModuleRes aRes(RID_STR_VERTICAL_ALIGN_CONST); ResStringArray aResList(aRes); if (sal_uInt32(nParagraphVertAlign) < aResList.Count()) - aControlValue <<= aResList.GetString(nParagraphVertAlign); + aControlValue <<= aResList.GetString((sal_uInt32)nParagraphVertAlign); } break; case PROPERTY_ID_PARAADJUST: { - sal_Int16 nParagraphAdjust = style::ParagraphAdjust_LEFT; + sal_Int16 nParagraphAdjust = (sal_Int16)style::ParagraphAdjust_LEFT; aPropertyValue >>= nParagraphAdjust; ModuleRes aRes(RID_STR_PARAADJUST_CONST); ResStringArray aResList(aRes); diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index fd112bffc036..138d4791b499 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -859,7 +859,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const ::sal_Int16 nParaAdjust = 0; if ( aReturn.aValue >>= nParaAdjust ) { - switch(nParaAdjust) + switch((style::ParagraphAdjust)nParaAdjust) { case style::ParagraphAdjust_LEFT: aReturn.bChecked = _nId == SID_ATTR_PARA_ADJUST_LEFT; @@ -874,6 +874,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const case style::ParagraphAdjust_CENTER: aReturn.bChecked = _nId == SID_ATTR_PARA_ADJUST_CENTER; break; + default: break; } } aReturn.aValue.clear(); @@ -1481,7 +1482,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > case SID_ATTR_PARA_ADJUST_RIGHT: case SID_ATTR_PARA_ADJUST_BLOCK: { - sal_Int16 eParagraphAdjust = style::ParagraphAdjust_LEFT; + style::ParagraphAdjust eParagraphAdjust = style::ParagraphAdjust_LEFT; switch(_nId) { case SID_ATTR_PARA_ADJUST_LEFT: @@ -1497,7 +1498,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > eParagraphAdjust = style::ParagraphAdjust_BLOCK; break; } - impl_setPropertyAtControls_throw(RID_STR_UNDO_ALIGNMENT,PROPERTY_PARAADJUST,uno::makeAny(eParagraphAdjust),aArgs); + impl_setPropertyAtControls_throw(RID_STR_UNDO_ALIGNMENT,PROPERTY_PARAADJUST,uno::makeAny((sal_Int16)eParagraphAdjust),aArgs); InvalidateFeature(SID_ATTR_PARA_ADJUST_LEFT); InvalidateFeature(SID_ATTR_PARA_ADJUST_CENTER); diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx index 647cbc359590..9fde9d9f32ba 100644 --- a/sdext/source/minimizer/optimizerdialogcontrols.cxx +++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx @@ -86,7 +86,7 @@ OUString InsertSeparator( OptimizerDialog& rOptimizerDialog, const OUString& rCo OUString InsertButton( OptimizerDialog& rOptimizerDialog, const OUString& rControlName, Reference< XActionListener >& xActionListener, - sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex, bool bEnabled, PPPOptimizerTokenEnum nResID, sal_Int16 nPushButtonType ) + sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex, bool bEnabled, PPPOptimizerTokenEnum nResID, css::awt::PushButtonType nPushButtonType ) { OUString pNames[] = { OUString("Enabled"), diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index 6da5e7ded92c..50e875605189 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -114,7 +114,7 @@ void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::cons { for(int i=1; i< elem.Text.getLength(); i++) { - sal_Int16 nType = xCC->getCharacterDirection( str, i ); + css::i18n::DirectionProperty nType = (css::i18n::DirectionProperty)xCC->getCharacterDirection( str, i ); if ( nType == css::i18n::DirectionProperty_RIGHT_TO_LEFT || nType == css::i18n::DirectionProperty_RIGHT_TO_LEFT_ARABIC || nType == css::i18n::DirectionProperty_RIGHT_TO_LEFT_EMBEDDING || diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index 820ec8fbe13d..449f18116e02 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -141,7 +141,7 @@ namespace slideshow if( rAttr->isCharPostureValid() ) { aParms.maFontLetterForm = - rAttr->getCharPosture() == awt::FontSlant_NONE ? + rAttr->getCharPosture() == (sal_Int16)awt::FontSlant_NONE ? rendering::PanoseLetterForm::ANYTHING : rendering::PanoseLetterForm::OBLIQUE_CONTACT; } diff --git a/stoc/source/corereflection/crbase.cxx b/stoc/source/corereflection/crbase.cxx index 3352e85ebc3d..58439f67deb2 100644 --- a/stoc/source/corereflection/crbase.cxx +++ b/stoc/source/corereflection/crbase.cxx @@ -131,7 +131,7 @@ sal_Bool IdlClassImpl::isAssignableFrom( const Reference< XIdlClass > & xType ) if (eAssign > TypeClass_VOID && eAssign < TypeClass_STRING && eFrom > TypeClass_VOID && eFrom < TypeClass_STRING) { - return s_aAssignableFromTab[eAssign-1][eFrom-1]; + return s_aAssignableFromTab[(int)eAssign-1][(int)eFrom-1]; } } return false; diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index 999493113584..434776be2abf 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -184,7 +184,7 @@ inline Reference< XIdlClass > IdlReflectionServiceImpl::constructClass( case typelib_TypeClass_ANY: return new IdlClassImpl( this, pTypeDescr->pTypeName, pTypeDescr->eTypeClass, pTypeDescr ); - case TypeClass_ENUM: + case typelib_TypeClass_ENUM: return new EnumIdlClassImpl( this, pTypeDescr->pTypeName, pTypeDescr->eTypeClass, pTypeDescr ); case typelib_TypeClass_STRUCT: diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx index 9214780ca1ef..2e4abe64c766 100644 --- a/svtools/source/misc/langtab.cxx +++ b/svtools/source/misc/langtab.cxx @@ -84,7 +84,7 @@ const OUString ApplyLreOrRleEmbedding( const OUString &rText ) bool bIsRtlText = false; for (sal_Int32 i = 0; i < nLen && !bFound; ++i) { - sal_Int16 nDirection = rCharClass.getCharacterDirection( rText, i ); + i18n::DirectionProperty nDirection = rCharClass.getCharacterDirection( rText, i ); switch (nDirection) { case i18n::DirectionProperty_LEFT_TO_RIGHT : _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits