summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-03 11:02:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-03 09:40:19 +0000
commit5d0e485e827057eee9fb2c997685690b710e7f34 (patch)
treec83057f1e85195379451fafe32b274065f99167e /reportdesign
parented6c5a4908edb7d4ab075127b710a92e2abc753f (diff)
use actual UNO enums in reportdesign..svtools
Change-Id: Idcd916382b87f8542dc6b5cdcb5ecb01d6947203 Reviewed-on: https://gerrit.libreoffice.org/36043 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/core/api/ReportComponent.cxx1
-rw-r--r--reportdesign/source/core/inc/ReportControlModel.hxx3
-rw-r--r--reportdesign/source/core/inc/ReportHelperImpl.hxx4
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx11
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx7
6 files changed, 16 insertions, 14 deletions
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);