summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:16:43 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:16:43 +0100
commitabf7b94123a555c4f3e90a0ae41bd7a842d1c1fb (patch)
tree6e0208e0450308652be1a0a512f98023b35ca489 /sd/source/ui/unoidl
parentb271fb5ba1a8f7da2120d7037de087b02eb16c91 (diff)
More loplugin:cstylecast: sd
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I144975b94fe2725ac740a953ca2133e99f8a3fce
Diffstat (limited to 'sd/source/ui/unoidl')
-rw-r--r--sd/source/ui/unoidl/SdUnoDrawView.cxx4
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.cxx18
-rw-r--r--sd/source/ui/unoidl/unocpres.cxx4
-rw-r--r--sd/source/ui/unoidl/unolayer.cxx4
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx30
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx10
-rw-r--r--sd/source/ui/unoidl/unopage.cxx16
-rw-r--r--sd/source/ui/unoidl/unopool.cxx2
8 files changed, 44 insertions, 44 deletions
diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx
index 02e541d4b572..09289a73b976 100644
--- a/sd/source/ui/unoidl/SdUnoDrawView.cxx
+++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx
@@ -384,7 +384,7 @@ Any SAL_CALL SdUnoDrawView::getFastPropertyValue (
aValue <<= GetZoom();
break;
case DrawController::PROPERTY_ZOOMTYPE:
- aValue <<= (sal_Int16)css::view::DocumentZoomType::BY_VALUE;
+ aValue <<= sal_Int16(css::view::DocumentZoomType::BY_VALUE);
break;
case DrawController::PROPERTY_VIEWOFFSET:
aValue <<= GetViewOffset();
@@ -438,7 +438,7 @@ sal_Int16 SdUnoDrawView::GetZoom() const
{
if (mrDrawViewShell.GetActiveWindow() )
{
- return (sal_Int16)mrDrawViewShell.GetActiveWindow()->GetZoom();
+ return static_cast<sal_Int16>(mrDrawViewShell.GetActiveWindow()->GetZoom());
}
else
{
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index 44262f34c2c8..f8e682edfc8f 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -646,7 +646,7 @@ DocumentSettings::_setPropertyValues(const PropertyMapEntry** ppEntries,
{
if( aPrintOpts.GetOutputQuality() != nValue)
{
- aPrintOpts.SetOutputQuality( (sal_uInt16)nValue );
+ aPrintOpts.SetOutputQuality( static_cast<sal_uInt16>(nValue) );
bOptionsChanged = true;
}
bOk = true;
@@ -697,7 +697,7 @@ DocumentSettings::_setPropertyValues(const PropertyMapEntry** ppEntries,
sal_Int32 nValue = 0;
if( (*pValues >>= nValue) && (nValue >= 0) )
{
- pDoc->SetDefaultTabulator((sal_uInt16)nValue);
+ pDoc->SetDefaultTabulator(static_cast<sal_uInt16>(nValue));
bOk = true;
bChanged = true;
}
@@ -892,7 +892,7 @@ DocumentSettings::_setPropertyValues(const PropertyMapEntry** ppEntries,
// the document and determine it really differs from the old
// one.
sal_Int16 nOldValue =
- (sal_Int16)pDoc->GetPrinterIndependentLayout ();
+ static_cast<sal_Int16>(pDoc->GetPrinterIndependentLayout ());
sal_Int16 nValue = 0;
if (*pValues >>= nValue)
{
@@ -1060,7 +1060,7 @@ DocumentSettings::_getPropertyValues(
*pValue <<= aPrintOpts.IsOutline();
break;
case HANDLE_SLIDESPERHANDOUT:
- *pValue <<= (sal_Int16)aPrintOpts.GetHandoutPages();
+ *pValue <<= static_cast<sal_Int16>(aPrintOpts.GetHandoutPages());
break;
case HANDLE_HANDOUTHORIZONTAL:
*pValue <<= aPrintOpts.IsHandoutHorizontal();
@@ -1093,13 +1093,13 @@ DocumentSettings::_getPropertyValues(
*pValue <<= aPrintOpts.IsBackPage();
break;
case HANDLE_PRINTQUALITY:
- *pValue <<= (sal_Int32)aPrintOpts.GetOutputQuality();
+ *pValue <<= static_cast<sal_Int32>(aPrintOpts.GetOutputQuality());
break;
case HANDLE_MEASUREUNIT:
{
short nMeasure;
SvxFieldUnitToMeasureUnit( pDoc->GetUIUnit(), nMeasure );
- *pValue <<= (sal_Int16)nMeasure;
+ *pValue <<= static_cast<sal_Int16>(nMeasure);
}
break;
case HANDLE_SCALE_NUM:
@@ -1109,10 +1109,10 @@ DocumentSettings::_getPropertyValues(
*pValue <<= pDoc->GetUIScale().GetDenominator();
break;
case HANDLE_TABSTOP:
- *pValue <<= (sal_Int32)pDoc->GetDefaultTabulator();
+ *pValue <<= static_cast<sal_Int32>(pDoc->GetDefaultTabulator());
break;
case HANDLE_PAGENUMFMT:
- *pValue <<= (sal_Int32)pDoc->GetPageNumType();
+ *pValue <<= static_cast<sal_Int32>(pDoc->GetPageNumType());
break;
case HANDLE_PRINTERNAME:
{
@@ -1177,7 +1177,7 @@ DocumentSettings::_getPropertyValues(
case HANDLE_PRINTER_INDEPENDENT_LAYOUT:
{
sal_Int16 nPrinterIndependentLayout =
- (sal_Int16)pDoc->GetPrinterIndependentLayout();
+ static_cast<sal_Int16>(pDoc->GetPrinterIndependentLayout());
*pValue <<= nPrinterIndependentLayout;
}
break;
diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx
index 6cb6f6d6dbc5..be3b964aebb9 100644
--- a/sd/source/ui/unoidl/unocpres.cxx
+++ b/sd/source/ui/unoidl/unocpres.cxx
@@ -87,7 +87,7 @@ void SAL_CALL SdXCustomPresentation::insertByIndex( sal_Int32 Index, const uno::
if( bDisposing )
throw lang::DisposedException();
- if( Index < 0 || Index > (sal_Int32)( mpSdCustomShow ? mpSdCustomShow->PagesVector().size() : 0 ) )
+ if( Index < 0 || Index > static_cast<sal_Int32>( mpSdCustomShow ? mpSdCustomShow->PagesVector().size() : 0 ) )
throw lang::IndexOutOfBoundsException();
uno::Reference< drawing::XDrawPage > xPage;
@@ -185,7 +185,7 @@ uno::Any SAL_CALL SdXCustomPresentation::getByIndex( sal_Int32 Index )
if( bDisposing )
throw lang::DisposedException();
- if (Index < 0 || !mpSdCustomShow || Index >= (sal_Int32)mpSdCustomShow->PagesVector().size())
+ if (Index < 0 || !mpSdCustomShow || Index >= static_cast<sal_Int32>(mpSdCustomShow->PagesVector().size()))
throw lang::IndexOutOfBoundsException();
uno::Any aAny;
diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx
index 546e724af0fc..b6c6d9a1c968 100644
--- a/sd/source/ui/unoidl/unolayer.cxx
+++ b/sd/source/ui/unoidl/unolayer.cxx
@@ -494,7 +494,7 @@ uno::Reference< drawing::XLayer > SAL_CALL SdLayerManager::insertNewByIndex( sal
SdrLayerAdmin& rLA=mpModel->mpDoc->GetLayerAdmin();
const sal_Int32 nMax=rLA.GetLayerCount();
if (nIndex>nMax) nIndex=nMax;
- xLayer = GetLayer (rLA.NewLayer(aLayerName,(sal_uInt16)nIndex));
+ xLayer = GetLayer (rLA.NewLayer(aLayerName,static_cast<sal_uInt16>(nIndex)));
mpModel->SetModified();
}
return xLayer;
@@ -596,7 +596,7 @@ uno::Any SAL_CALL SdLayerManager::getByIndex( sal_Int32 nLayer )
if( mpModel->mpDoc )
{
SdrLayerAdmin& rLayerAdmin = mpModel->mpDoc->GetLayerAdmin();
- uno::Reference<drawing::XLayer> xLayer (GetLayer (rLayerAdmin.GetLayer((sal_uInt16)nLayer)));
+ uno::Reference<drawing::XLayer> xLayer (GetLayer (rLayerAdmin.GetLayer(static_cast<sal_uInt16>(nLayer))));
aAny <<= xLayer;
}
return aAny;
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 4216ff32874a..8e85f989b376 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -484,7 +484,7 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate )
else
{
// here we determine the page after which we should insert
- SdPage* pPreviousStandardPage = mpDoc->GetSdPage( std::min( (sal_uInt16)(nPageCount - 1), nPage ), PageKind::Standard );
+ SdPage* pPreviousStandardPage = mpDoc->GetSdPage( std::min( static_cast<sal_uInt16>(nPageCount - 1), nPage ), PageKind::Standard );
SdrLayerIDSet aVisibleLayers = pPreviousStandardPage->TRG_GetMasterPageVisibleLayers();
bool bIsPageBack = aVisibleLayers.IsSet( aBckgrnd );
bool bIsPageObj = aVisibleLayers.IsSet( aBckgrndObj );
@@ -1240,7 +1240,7 @@ void SAL_CALL SdXImpressDocument::setPropertyValue( const OUString& aPropertyNam
if(!(aValue >>= nValue) || nValue < 0 )
throw lang::IllegalArgumentException();
- mpDoc->SetDefaultTabulator((sal_uInt16)nValue);
+ mpDoc->SetDefaultTabulator(static_cast<sal_uInt16>(nValue));
break;
}
case WID_MODEL_VISAREA:
@@ -1314,7 +1314,7 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( const OUString& Property
break;
}
case WID_MODEL_TABSTOP:
- aAny <<= (sal_Int32)mpDoc->GetDefaultTabulator();
+ aAny <<= static_cast<sal_Int32>(mpDoc->GetDefaultTabulator());
break;
case WID_MODEL_VISAREA:
{
@@ -1907,11 +1907,11 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
{
vcl::PDFExtOutDevData* pPDFExtOutDevData = dynamic_cast<vcl::PDFExtOutDevData* >( pOut->GetExtOutDevData() );
- if ( !( mpDoc->GetSdPage((sal_Int16) nPageNumber-1, PageKind::Standard)->IsExcluded() ) ||
+ if ( !( mpDoc->GetSdPage(static_cast<sal_Int16>(nPageNumber)-1, PageKind::Standard)->IsExcluded() ) ||
(pPDFExtOutDevData && pPDFExtOutDevData->GetIsExportHiddenSlides()) )
{
std::unique_ptr<::sd::ClientView> pView( new ::sd::ClientView( mpDocShell, pOut ) );
- ::tools::Rectangle aVisArea = ::tools::Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() );
+ ::tools::Rectangle aVisArea = ::tools::Rectangle( Point(), mpDoc->GetSdPage( static_cast<sal_uInt16>(nPageNumber) - 1, ePageKind )->GetSize() );
vcl::Region aRegion( aVisArea );
::sd::ViewShell* pOldViewSh = mpDocShell->GetViewShell();
@@ -1934,7 +1934,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
if( xModel == mpDocShell->GetModel() )
{
- pView->ShowSdrPage( mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind ));
+ pView->ShowSdrPage( mpDoc->GetSdPage( static_cast<sal_uInt16>(nPageNumber) - 1, ePageKind ));
SdrPageView* pPV = pView->GetSdrPageView();
if( pOldSdView )
@@ -2151,7 +2151,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
rBookmarks.clear();
//---> #i56629, #i40318
//get the page name, will be used as outline element in PDF bookmark pane
- OUString aPageName = mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1 , PageKind::Standard )->GetName();
+ OUString aPageName = mpDoc->GetSdPage( static_cast<sal_uInt16>(nPageNumber) - 1 , PageKind::Standard )->GetName();
if( !aPageName.isEmpty() )
{
// Destination PageNum
@@ -2816,7 +2816,7 @@ uno::Any SAL_CALL SdDrawPagesAccess::getByIndex( sal_Int32 Index )
if( (Index < 0) || (Index >= mpModel->mpDoc->GetSdPageCount( PageKind::Standard ) ) )
throw lang::IndexOutOfBoundsException();
- SdPage* pPage = mpModel->mpDoc->GetSdPage( (sal_uInt16)Index, PageKind::Standard );
+ SdPage* pPage = mpModel->mpDoc->GetSdPage( static_cast<sal_uInt16>(Index), PageKind::Standard );
if( pPage )
{
uno::Reference< drawing::XDrawPage > xDrawPage( pPage->getUnoPage(), uno::UNO_QUERY );
@@ -2927,7 +2927,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdDrawPagesAccess::insertNewByInde
if( mpModel->mpDoc )
{
- SdPage* pPage = mpModel->InsertSdPage( (sal_uInt16)nIndex, false );
+ SdPage* pPage = mpModel->InsertSdPage( static_cast<sal_uInt16>(nIndex), false );
if( pPage )
{
uno::Reference< drawing::XDrawPage > xDrawPage( pPage->getUnoPage(), uno::UNO_QUERY );
@@ -3085,7 +3085,7 @@ uno::Any SAL_CALL SdMasterPagesAccess::getByIndex( sal_Int32 Index )
if( (Index < 0) || (Index >= mpModel->mpDoc->GetMasterSdPageCount( PageKind::Standard ) ) )
throw lang::IndexOutOfBoundsException();
- SdPage* pPage = mpModel->mpDoc->GetMasterSdPage( (sal_uInt16)Index, PageKind::Standard );
+ SdPage* pPage = mpModel->mpDoc->GetMasterSdPage( static_cast<sal_uInt16>(Index), PageKind::Standard );
if( pPage )
{
uno::Reference< drawing::XDrawPage > xDrawPage( pPage->getUnoPage(), uno::UNO_QUERY );
@@ -3136,7 +3136,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
bUnique = true;
for( sal_Int32 nMaster = 1; nMaster < nMPageCount; nMaster++ )
{
- SdPage* pPage = static_cast<SdPage*>(pDoc->GetMasterPage((sal_uInt16)nMaster));
+ SdPage* pPage = static_cast<SdPage*>(pDoc->GetMasterPage(static_cast<sal_uInt16>(nMaster)));
if( pPage && pPage->GetName() == aPrefix )
{
bUnique = false;
@@ -3160,8 +3160,8 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
static_cast<SdStyleSheetPool*>(pDoc->GetStyleSheetPool())->CreateLayoutStyleSheets( aPrefix );
// get the first page for initial size and border settings
- SdPage* pPage = mpModel->mpDoc->GetSdPage( (sal_uInt16)0, PageKind::Standard );
- SdPage* pRefNotesPage = mpModel->mpDoc->GetSdPage( (sal_uInt16)0, PageKind::Notes);
+ SdPage* pPage = mpModel->mpDoc->GetSdPage( sal_uInt16(0), PageKind::Standard );
+ SdPage* pRefNotesPage = mpModel->mpDoc->GetSdPage( sal_uInt16(0), PageKind::Notes);
// create and insert new draw masterpage
SdPage* pMPage = mpModel->mpDoc->AllocSdPage(true);
@@ -3171,7 +3171,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
pPage->GetRightBorder(),
pPage->GetLowerBorder() );
pMPage->SetLayoutName( aLayoutName );
- pDoc->InsertMasterPage(pMPage, (sal_uInt16)nInsertPos);
+ pDoc->InsertMasterPage(pMPage, static_cast<sal_uInt16>(nInsertPos));
{
// ensure default MasterPage fill
@@ -3189,7 +3189,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
pRefNotesPage->GetRightBorder(),
pRefNotesPage->GetLowerBorder() );
pMNotesPage->SetLayoutName( aLayoutName );
- pDoc->InsertMasterPage(pMNotesPage, (sal_uInt16)nInsertPos + 1);
+ pDoc->InsertMasterPage(pMNotesPage, static_cast<sal_uInt16>(nInsertPos) + 1);
pMNotesPage->SetAutoLayout(AUTOLAYOUT_NOTES, true, true);
mpModel->SetModified();
}
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 6dd5c89a1a90..be4785c732fc 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -553,7 +553,7 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& aPropertyName, const c
if(!(aValue >>= nVerb))
throw lang::IllegalArgumentException();
- pInfo->mnVerb = (sal_uInt16)nVerb;
+ pInfo->mnVerb = static_cast<sal_uInt16>(nVerb);
break;
}
case WID_DIMCOLOR:
@@ -766,10 +766,10 @@ css::uno::Any SAL_CALL SdXShape::getPropertyValue( const OUString& PropertyName
aRet <<= EffectMigration::GetSoundOn( mpShape );
break;
case WID_BLUESCREEN:
- aRet <<= (sal_Int32)( pInfo?pInfo->maBlueScreen.GetColor():0x00ffffff );
+ aRet <<= static_cast<sal_Int32>( pInfo?pInfo->maBlueScreen.GetColor():0x00ffffff );
break;
case WID_VERB:
- aRet <<= (sal_Int32)( pInfo?pInfo->mnVerb:0 );
+ aRet <<= static_cast<sal_Int32>( pInfo?pInfo->mnVerb:0 );
break;
case WID_DIMCOLOR:
aRet <<= EffectMigration::GetDimColor( mpShape );
@@ -1352,7 +1352,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
case presentation::ClickAction_VERB:
if( nFound & FoundFlags::Verb )
{
- pInfo->mnVerb = (sal_uInt16)nVerb;
+ pInfo->mnVerb = static_cast<sal_uInt16>(nVerb);
bOk = true;
}
break;
@@ -1628,7 +1628,7 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
break;
case presentation::ClickAction_VERB:
- aAny <<= (sal_Int32)pInfo->mnVerb;
+ aAny <<= static_cast<sal_Int32>(pInfo->mnVerb);
pProperties->Name = maStrVerb;
pProperties->Handle = -1;
pProperties->Value = aAny;
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 6aeedfd081eb..8cadc7db9239 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1035,10 +1035,10 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
aAny <<= GetPage()->GetLowerBorder();
break;
case WID_PAGE_WIDTH:
- aAny <<= (sal_Int32)( GetPage()->GetSize().getWidth() );
+ aAny <<= static_cast<sal_Int32>( GetPage()->GetSize().getWidth() );
break;
case WID_PAGE_HEIGHT:
- aAny <<= (sal_Int32)( GetPage()->GetSize().getHeight() );
+ aAny <<= static_cast<sal_Int32>( GetPage()->GetSize().getHeight() );
break;
case WID_PAGE_ORIENT:
aAny <<= view::PaperOrientation(
@@ -1050,7 +1050,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
aAny <<= GetPage()->GetFadeEffect();
break;
case WID_PAGE_CHANGE:
- aAny <<= (sal_Int32)( GetPage()->GetPresChange() );
+ aAny <<= static_cast<sal_Int32>( GetPage()->GetPresChange() );
break;
case WID_PAGE_SPEED:
{
@@ -1060,7 +1060,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
}
break;
case WID_PAGE_LAYOUT:
- aAny <<= (sal_Int16)( GetPage()->GetAutoLayout() );
+ aAny <<= static_cast<sal_Int16>( GetPage()->GetAutoLayout() );
break;
case WID_PAGE_NUMBER:
{
@@ -1069,7 +1069,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
if(nPageNumber > 0)
{
// for all other pages calculate the number
- aAny <<= (sal_Int16)((sal_uInt16)((nPageNumber-1)>>1) + 1);
+ aAny <<= static_cast<sal_Int16>(static_cast<sal_uInt16>((nPageNumber-1)>>1) + 1);
}
else
{
@@ -1078,7 +1078,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
}
break;
case WID_PAGE_DURATION:
- aAny <<= (sal_Int32)( GetPage()->GetTime() + .5 );
+ aAny <<= static_cast<sal_Int32>( GetPage()->GetTime() + .5 );
break;
case WID_PAGE_HIGHRESDURATION:
aAny <<= GetPage()->GetTime();
@@ -1109,7 +1109,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
{
sal_uInt16 nPgNum = 0;
sal_uInt16 nPageCount = pDoc->GetSdPageCount( PageKind::Standard );
- sal_uInt16 nPageNumber = (sal_uInt16)( ( GetPage()->GetPageNum() - 1 ) >> 1 );
+ sal_uInt16 nPageNumber = static_cast<sal_uInt16>( ( GetPage()->GetPageNum() - 1 ) >> 1 );
while( nPgNum < nPageCount )
{
pDoc->SetSelected( pDoc->GetSdPage( nPgNum, PageKind::Standard ), nPgNum == nPageNumber );
@@ -1150,7 +1150,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
{
sal_uInt16 nPgNum = 0;
sal_uInt16 nPageCount = pDoc->GetSdPageCount( PageKind::Standard );
- sal_uInt16 nPageNumber = (sal_uInt16)( ( GetPage()->GetPageNum() - 1 ) >> 1 );
+ sal_uInt16 nPageNumber = static_cast<sal_uInt16>( ( GetPage()->GetPageNum() - 1 ) >> 1 );
while( nPgNum < nPageCount )
{
pDoc->SetSelected( pDoc->GetSdPage( nPgNum, PageKind::Standard ), nPgNum == nPageNumber );
diff --git a/sd/source/ui/unoidl/unopool.cxx b/sd/source/ui/unoidl/unopool.cxx
index bee9100319e4..33573b3bea49 100644
--- a/sd/source/ui/unoidl/unopool.cxx
+++ b/sd/source/ui/unoidl/unopool.cxx
@@ -71,7 +71,7 @@ void SdUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEnt
if( rValue >>= aLocale )
mpDrawModel->SetLanguage(
SdUnoGetLanguage( aLocale ),
- (sal_uInt16)pEntry->mnHandle );
+ static_cast<sal_uInt16>(pEntry->mnHandle) );
}
}
SvxUnoDrawPool::putAny( pPool, pEntry, rValue );