From f4a62e5479b47d90d6de518f38a97ac0b5322c54 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 7 Sep 2021 12:16:24 +0200 Subject: SdrLayerID must be based on sal_Int16 ... which is the type corresponding to the related published property "LayerID" of com.sun.star.drawing.Shape service. Without this, the code asserts on values passed to the published API from external sources to be in the 8-bit limits, which is incorrect. Change-Id: I0449a7dd313f7e6c4adbc1c1f7b8c50b6a51434e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121760 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- reportdesign/source/core/api/ReportDefinition.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'reportdesign') diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 636346a163c3..9954b50c359e 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -588,9 +588,9 @@ void OReportDefinition::init() m_pImpl->m_pReportModel->GetItemPool().FreezeIdRanges(); m_pImpl->m_pReportModel->SetScaleUnit( MapUnit::Map100thMM ); SdrLayerAdmin& rAdmin = m_pImpl->m_pReportModel->GetLayerAdmin(); - rAdmin.NewLayer("front", sal_uInt8(RPT_LAYER_FRONT)); - rAdmin.NewLayer("back", sal_uInt8(RPT_LAYER_BACK)); - rAdmin.NewLayer("HiddenLayer", sal_uInt8(RPT_LAYER_HIDDEN)); + rAdmin.NewLayer("front", RPT_LAYER_FRONT.get()); + rAdmin.NewLayer("back", RPT_LAYER_BACK.get()); + rAdmin.NewLayer("HiddenLayer", RPT_LAYER_HIDDEN.get()); m_pImpl->m_pUndoManager = new ::dbaui::UndoManager( *this, m_aMutex ); m_pImpl->m_pReportModel->SetSdrUndoManager( &m_pImpl->m_pUndoManager->GetSfxUndoManager() ); -- cgit