summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/dlg')
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx4
-rw-r--r--sd/source/ui/dlg/RemoteDialogClientBox.cxx4
-rw-r--r--sd/source/ui/dlg/animobjs.cxx8
-rw-r--r--sd/source/ui/dlg/copydlg.cxx18
-rw-r--r--sd/source/ui/dlg/custsdlg.cxx8
-rw-r--r--sd/source/ui/dlg/diactrl.cxx4
-rw-r--r--sd/source/ui/dlg/dlgolbul.cxx4
-rw-r--r--sd/source/ui/dlg/dlgpage.cxx6
-rw-r--r--sd/source/ui/dlg/dlgsnap.cxx2
-rw-r--r--sd/source/ui/dlg/docprev.cxx10
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx12
-rw-r--r--sd/source/ui/dlg/navigatr.cxx4
-rw-r--r--sd/source/ui/dlg/paragr.cxx2
-rw-r--r--sd/source/ui/dlg/present.cxx4
-rw-r--r--sd/source/ui/dlg/sdpreslt.cxx10
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx2
-rw-r--r--sd/source/ui/dlg/tpoption.cxx18
-rw-r--r--sd/source/ui/dlg/vectdlg.cxx20
18 files changed, 70 insertions, 70 deletions
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 72d8bd2a1db2..ef8dca5ea873 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -645,8 +645,8 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, SelectHdl, ListBox&, void)
sal_Int32 nBmpWidth = aBmp.GetSizePixel().Width();
sal_Int32 nBmpHeight = aBmp.GetSizePixel().Height();
- double nXRatio = (double) 200 / nBmpWidth;
- double nYRatio = (double) 150 / nBmpHeight;
+ double nXRatio = double(200) / nBmpWidth;
+ double nYRatio = double(150) / nBmpHeight;
if ( nXRatio < nYRatio )
aBmp.Scale( nXRatio, nXRatio );
else
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
index ca9554ff509b..df6c64af704d 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
@@ -227,7 +227,7 @@ void ClientBox::selectEntry( const long nPos )
m_vEntries[ m_nActive ]->m_bActive = false;
}
- if ( ( nPos >= 0 ) && ( nPos < (long) m_vEntries.size() ) )
+ if ( ( nPos >= 0 ) && ( nPos < static_cast<long>(m_vEntries.size()) ) )
{
m_bHasActive = true;
m_nActive = nPos;
@@ -459,7 +459,7 @@ bool ClientBox::HandleCursorKey( sal_uInt16 nKeyCode )
if ( nSelect < 0 )
nSelect = 0;
- if ( nSelect >= (long) m_vEntries.size() )
+ if ( nSelect >= static_cast<long>(m_vEntries.size()) )
nSelect = m_vEntries.size() - 1;
selectEntry( nSelect );
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 8d1eda9a2e56..443b8cc44408 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -85,8 +85,8 @@ void SdDisplay::Paint( vcl::RenderContext& /*rRenderContext*/, const ::tools::Re
Point aPt;
Size aSize = GetOutputSize();
Size aBmpSize = aBitmapEx.GetBitmap().GetSizePixel();
- aBmpSize.Width() = (long) ( (double) aBmpSize.Width() * (double) aScale );
- aBmpSize.Height() = (long) ( (double) aBmpSize.Height() * (double) aScale );
+ aBmpSize.Width() = static_cast<long>( static_cast<double>(aBmpSize.Width()) * static_cast<double>(aScale) );
+ aBmpSize.Height() = static_cast<long>( static_cast<double>(aBmpSize.Height()) * static_cast<double>(aScale) );
if( aBmpSize.Width() < aSize.Width() )
aPt.X() = ( aSize.Width() - aBmpSize.Width() ) / 2;
@@ -662,8 +662,8 @@ Fraction AnimationWindow::GetScale()
Size aDisplaySize(m_pCtlDisplay->GetOutputSize());
- aFrac = Fraction( std::min( (double)aDisplaySize.Width() / (double)aBmpSize.Width(),
- (double)aDisplaySize.Height() / (double)aBmpSize.Height() ) );
+ aFrac = Fraction( std::min( static_cast<double>(aDisplaySize.Width()) / static_cast<double>(aBmpSize.Width()),
+ static_cast<double>(aDisplaySize.Height()) / static_cast<double>(aBmpSize.Height()) ) );
}
return aFrac;
}
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index 3186dd0c68aa..b5a69b709934 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -195,28 +195,28 @@ void CopyDlg::Reset()
else
{
long nTmp;
- nTmp = (long)aStr.getToken( 0, TOKEN ).toInt32();
+ nTmp = static_cast<long>(aStr.getToken( 0, TOKEN ).toInt32());
m_pNumFldCopies->SetValue( nTmp );
- nTmp = (long)aStr.getToken( 1, TOKEN ).toInt32();
+ nTmp = static_cast<long>(aStr.getToken( 1, TOKEN ).toInt32());
m_pMtrFldMoveX->SetValue( nTmp );
- nTmp = (long)aStr.getToken( 2, TOKEN ).toInt32();
+ nTmp = static_cast<long>(aStr.getToken( 2, TOKEN ).toInt32());
m_pMtrFldMoveY->SetValue( nTmp );
- nTmp = (long)aStr.getToken( 3, TOKEN ).toInt32();
+ nTmp = static_cast<long>(aStr.getToken( 3, TOKEN ).toInt32());
m_pMtrFldAngle->SetValue( nTmp );
- nTmp = (long)aStr.getToken( 4, TOKEN ).toInt32();
+ nTmp = static_cast<long>(aStr.getToken( 4, TOKEN ).toInt32());
m_pMtrFldWidth->SetValue( nTmp );
- nTmp = (long)aStr.getToken( 5, TOKEN ).toInt32();
+ nTmp = static_cast<long>(aStr.getToken( 5, TOKEN ).toInt32());
m_pMtrFldHeight->SetValue( nTmp );
- nTmp = (long)aStr.getToken( 6, TOKEN ).toInt32();
+ nTmp = static_cast<long>(aStr.getToken( 6, TOKEN ).toInt32());
m_pLbStartColor->SelectEntry( Color( nTmp ) );
- nTmp = (long)aStr.getToken( 7, TOKEN ).toInt32();
+ nTmp = static_cast<long>(aStr.getToken( 7, TOKEN ).toInt32());
m_pLbEndColor->SelectEntry( Color( nTmp ) );
}
@@ -232,7 +232,7 @@ void CopyDlg::GetAttr( SfxItemSet& rOutAttrs )
long nHeight = long( GetCoreValue( *m_pMtrFldHeight, MapUnit::Map100thMM) * maUIScale);
long nWidth = long( GetCoreValue( *m_pMtrFldWidth, MapUnit::Map100thMM) * maUIScale);
- rOutAttrs.Put( SfxUInt16Item( ATTR_COPY_NUMBER, (sal_uInt16) m_pNumFldCopies->GetValue() ) );
+ rOutAttrs.Put( SfxUInt16Item( ATTR_COPY_NUMBER, static_cast<sal_uInt16>(m_pNumFldCopies->GetValue()) ) );
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_MOVE_X, nMoveX ) );
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_MOVE_Y, nMoveY ) );
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_ANGLE, static_cast<sal_Int32>(m_pMtrFldAngle->GetValue()) ) );
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index bbd107dcdb1d..9e6bab218aa2 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -74,7 +74,7 @@ SdCustomShowDlg::SdCustomShowDlg( vcl::Window* pWindow,
{
m_pLbCustomShows->InsertEntry( pCustomShow->GetName() );
}
- m_pLbCustomShows->SelectEntryPos( (sal_Int32)nPosToSelect );
+ m_pLbCustomShows->SelectEntryPos( static_cast<sal_Int32>(nPosToSelect) );
pCustomShowList->Seek( nPosToSelect );
}
@@ -317,7 +317,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( vcl::Window* pWindow,
nPage < rDoc.GetSdPageCount( PageKind::Standard );
nPage++ )
{
- SdPage* pPage = rDoc.GetSdPage( (sal_uInt16) nPage, PageKind::Standard );
+ SdPage* pPage = rDoc.GetSdPage( static_cast<sal_uInt16>(nPage), PageKind::Standard );
OUString aStr( pPage->GetName() );
m_pLbPages->InsertEntry( aStr );
}
@@ -418,8 +418,8 @@ void SdDefineCustomShowDlg::ClickButtonHdl2(void const * p)
nullptr, false, nPosCP );
m_pLbCustomPages->Select( pEntry );
- SdPage* pPage = rDoc.GetSdPage( (sal_uInt16) m_pLbPages->
- GetSelectedEntryPos( i ), PageKind::Standard );
+ SdPage* pPage = rDoc.GetSdPage( static_cast<sal_uInt16>(m_pLbPages->
+ GetSelectedEntryPos( i )), PageKind::Standard );
pEntry->SetUserData( pPage );
if( nPosCP != TREELIST_APPEND )
diff --git a/sd/source/ui/dlg/diactrl.cxx b/sd/source/ui/dlg/diactrl.cxx
index 8aaf23686c3d..636ffa6db47e 100644
--- a/sd/source/ui/dlg/diactrl.cxx
+++ b/sd/source/ui/dlg/diactrl.cxx
@@ -69,7 +69,7 @@ void SdPagesField::UpdatePagesField( const SfxUInt16Item* pItem )
{
if( pItem )
{
- long nValue = (long) pItem->GetValue();
+ long nValue = static_cast<long>(pItem->GetValue());
SetValue( nValue );
if( nValue == 1 )
SetCustomUnitText( SdResId( STR_SLIDE_SINGULAR ) );
@@ -82,7 +82,7 @@ void SdPagesField::UpdatePagesField( const SfxUInt16Item* pItem )
void SdPagesField::Modify()
{
- SfxUInt16Item aItem( SID_PAGES_PER_ROW, (sal_uInt16) GetValue() );
+ SfxUInt16Item aItem( SID_PAGES_PER_ROW, static_cast<sal_uInt16>(GetValue()) );
::uno::Any a;
::uno::Sequence< ::beans::PropertyValue > aArgs( 1 );
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index a691b0667970..1ca852217a17 100644
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -157,7 +157,7 @@ void OutlineBulletDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
FieldUnit eMetric = pSdView->GetDoc().GetUIUnit();
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(sal_uInt16)eMetric));
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,static_cast<sal_uInt16>(eMetric)));
rPage.PageCreated(aSet);
}
}
@@ -167,7 +167,7 @@ void OutlineBulletDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
FieldUnit eMetric = pSdView->GetDoc().GetUIUnit();
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(sal_uInt16)eMetric));
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,static_cast<sal_uInt16>(eMetric)));
rPage.PageCreated(aSet);
}
}
diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx
index a80f24392012..0d53321cb1e0 100644
--- a/sd/source/ui/dlg/dlgpage.cxx
+++ b/sd/source/ui/dlg/dlgpage.cxx
@@ -76,9 +76,9 @@ void SdPageDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
if (nId == mnPage)
{
- aSet.Put (SfxAllEnumItem((sal_uInt16)SID_ENUM_PAGE_MODE, SVX_PAGE_MODE_PRESENTATION));
- aSet.Put (SfxAllEnumItem((sal_uInt16)SID_PAPER_START, PAPER_A0));
- aSet.Put (SfxAllEnumItem((sal_uInt16)SID_PAPER_END, PAPER_E));
+ aSet.Put (SfxAllEnumItem(sal_uInt16(SID_ENUM_PAGE_MODE), SVX_PAGE_MODE_PRESENTATION));
+ aSet.Put (SfxAllEnumItem(sal_uInt16(SID_PAPER_START), PAPER_A0));
+ aSet.Put (SfxAllEnumItem(sal_uInt16(SID_PAPER_END), PAPER_E));
rPage.PageCreated(aSet);
}
else if (nId == mnArea)
diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx
index 9f7ede841d56..2f1554389db1 100644
--- a/sd/source/ui/dlg/dlgsnap.cxx
+++ b/sd/source/ui/dlg/dlgsnap.cxx
@@ -155,7 +155,7 @@ void SdSnapLineDlg::GetAttr(SfxItemSet& rOutAttrs)
nXValue = long( GetCoreValue( *m_pMtrFldX, MapUnit::Map100thMM) * aUIScale);
nYValue = long( GetCoreValue( *m_pMtrFldY, MapUnit::Map100thMM) * aUIScale);
- rOutAttrs.Put(SfxAllEnumItem(ATTR_SNAPLINE_KIND, (sal_uInt16)eKind));
+ rOutAttrs.Put(SfxAllEnumItem(ATTR_SNAPLINE_KIND, static_cast<sal_uInt16>(eKind)));
rOutAttrs.Put(SfxInt32Item(ATTR_SNAPLINE_X, nXValue));
rOutAttrs.Put(SfxInt32Item(ATTR_SNAPLINE_Y, nYValue));
}
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 846b4f46207a..85dea1b94a90 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -95,17 +95,17 @@ void SdDocPreviewWin::CalcSizeAndPos( Size& rSize, Point& rPoint )
if( nHeight < 0 ) nHeight = 0;
double dRatio = 1;
- double dRatioPreV = nHeight ? (((double) nWidth ) / nHeight) : 0.0;
+ double dRatioPreV = nHeight ? (static_cast<double>(nWidth) / nHeight) : 0.0;
if (dRatio > dRatioPreV)
{
- rSize=Size(nWidth, (sal_uInt16)(nWidth/dRatio));
- rPoint=Point( 0, (sal_uInt16)((nHeight-rSize.Height())/2));
+ rSize=Size(nWidth, static_cast<sal_uInt16>(nWidth/dRatio));
+ rPoint=Point( 0, static_cast<sal_uInt16>((nHeight-rSize.Height())/2));
}
else
{
- rSize=Size((sal_uInt16)(nHeight*dRatio), nHeight);
- rPoint=Point((sal_uInt16)((nWidth-rSize.Width())/2),0);
+ rSize=Size(static_cast<sal_uInt16>(nHeight*dRatio), nHeight);
+ rPoint=Point(static_cast<sal_uInt16>((nWidth-rSize.Width())/2),0);
}
}
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index ced53b446926..55fee0870827 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -326,7 +326,7 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides )
int nPage;
for( nPage = 0; nPage < nPageCount; nPage++ )
{
- SdPage* pPage = mpDoc->GetSdPage( (sal_uInt16)nPage, PageKind::Standard );
+ SdPage* pPage = mpDoc->GetSdPage( static_cast<sal_uInt16>(nPage), PageKind::Standard );
change( pUndoGroup, pPage, aNewSettings );
}
}
@@ -367,7 +367,7 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides )
int nPage;
for( nPage = 0; nPage < nPageCount; nPage++ )
{
- SdPage* pPage = mpDoc->GetSdPage( (sal_uInt16)nPage, PageKind::Notes );
+ SdPage* pPage = mpDoc->GetSdPage( static_cast<sal_uInt16>(nPage), PageKind::Notes );
change( pUndoGroup, pPage, aNewSettings );
}
@@ -727,8 +727,8 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, SdrTextObj con
// build complete transformation by adding view transformation from
// logic page coordinates to local pixel coordinates
- const double fScaleX((double)maOutRect.getWidth() / (double)maPageSize.Width());
- const double fScaleY((double)maOutRect.getHeight() / (double)maPageSize.Height());
+ const double fScaleX(static_cast<double>(maOutRect.getWidth()) / static_cast<double>(maPageSize.Width()));
+ const double fScaleY(static_cast<double>(maOutRect.getHeight()) / static_cast<double>(maPageSize.Height()));
aObjectTransform.scale(fScaleX, fScaleY);
aObjectTransform.translate(maOutRect.TopLeft().X(), maOutRect.TopLeft().Y());
@@ -774,12 +774,12 @@ void PresLayoutPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools:
if( maPageSize.Width() > maPageSize.Height() )
{
nWidth = maOutRect.GetWidth();
- nHeight = maPageSize.Width() == 0 ? 0 : long( (double)(nWidth * maPageSize.Height()) / (double)maPageSize.Width() );
+ nHeight = maPageSize.Width() == 0 ? 0 : long( static_cast<double>(nWidth * maPageSize.Height()) / static_cast<double>(maPageSize.Width()) );
}
else
{
nHeight = maOutRect.GetHeight();
- nWidth = maPageSize.Height() == 0 ? 0 : long( (double)(nHeight * maPageSize.Width()) / (double)maPageSize.Height() );
+ nWidth = maPageSize.Height() == 0 ? 0 : long( static_cast<double>(nHeight * maPageSize.Width()) / static_cast<double>(maPageSize.Height()) );
}
maOutRect.Left() += (maOutRect.GetWidth() - nWidth) >> 1;
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 4552f262c7a1..f302b77028ee 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -232,7 +232,7 @@ IMPL_LINK_NOARG(SdNavigatorWin, SelectToolboxHdl, ToolBox *, void)
if (ePage != PAGE_NONE)
{
- SfxUInt16Item aItem( SID_NAVIGATOR_PAGE, (sal_uInt16)ePage );
+ SfxUInt16Item aItem( SID_NAVIGATOR_PAGE, static_cast<sal_uInt16>(ePage) );
mpBindings->GetDispatcher()->ExecuteList(SID_NAVIGATOR_PAGE,
SfxCallMode::SLOT | SfxCallMode::RECORD, { &aItem });
}
@@ -276,7 +276,7 @@ IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox, void )
meDragType = NAVIGATOR_DRAGTYPE_EMBEDDED;
}
- pMenu->CheckItem( (sal_uInt16)meDragType );
+ pMenu->CheckItem( static_cast<sal_uInt16>(meDragType) );
pMenu->SetSelectHdl( LINK( this, SdNavigatorWin, MenuSelectHdl ) );
pMenu->Execute( this, maToolbox->GetItemRect( nId ), PopupMenuFlags::ExecuteDown );
diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index 85b96791ae13..5ec2c07b0285 100644
--- a/sd/source/ui/dlg/paragr.cxx
+++ b/sd/source/ui/dlg/paragr.cxx
@@ -111,7 +111,7 @@ bool SdParagraphNumTabPage::FillItemSet( SfxItemSet* rSet )
bool bNumberNewStartChecked = TRISTATE_TRUE == m_pNewStartNumberCB->GetState();
rSet->Put(SfxBoolItem(ATTR_NUMBER_NEWSTART, bNewStartChecked));
- const sal_Int16 nStartAt = (sal_Int16)m_pNewStartNF->GetValue();
+ const sal_Int16 nStartAt = static_cast<sal_Int16>(m_pNewStartNF->GetValue());
rSet->Put(SfxInt16Item(ATTR_NUMBER_NEWSTART_AT, bNumberNewStartChecked && bNewStartChecked ? nStartAt : -1));
}
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index 88e66130c1f7..c36ab6d196ad 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -209,7 +209,7 @@ sal_Int32 SdStartPresentationDlg::InsertDisplayEntry(const rtl::OUString &aName,
{
maLBMonitor->InsertEntry( aName );
const sal_uInt32 nEntryIndex = maLBMonitor->GetEntryCount() - 1;
- maLBMonitor->SetEntryData( nEntryIndex, reinterpret_cast<void*>((sal_IntPtr)nDisplay) );
+ maLBMonitor->SetEntryData( nEntryIndex, reinterpret_cast<void*>(static_cast<sal_IntPtr>(nDisplay)) );
return nEntryIndex;
}
@@ -308,7 +308,7 @@ void SdStartPresentationDlg::GetAttr( SfxItemSet& rAttr )
sal_Int32 nPos = maLBMonitor->GetSelectedEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
- rAttr.Put( SfxInt32Item ( ATTR_PRESENT_DISPLAY, (sal_Int32)reinterpret_cast<sal_IntPtr>(maLBMonitor->GetEntryData(nPos))) );
+ rAttr.Put( SfxInt32Item ( ATTR_PRESENT_DISPLAY, static_cast<sal_Int32>(reinterpret_cast<sal_IntPtr>(maLBMonitor->GetEntryData(nPos)))) );
nPos = aLbCustomshow->GetSelectedEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index 094a93098931..28c06f6e4982 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -102,7 +102,7 @@ void SdPresLayoutDlg::Reset()
}
DBG_ASSERT(nName < mnLayoutCount, "Layout not found");
- m_pVS->SelectItem((sal_uInt16)nName + 1); // Indices of the ValueSets start at 1
+ m_pVS->SelectItem(static_cast<sal_uInt16>(nName) + 1); // Indices of the ValueSets start at 1
}
@@ -159,7 +159,7 @@ void SdPresLayoutDlg::FillValueSet()
maLayoutNames.push_back(aLayoutName);
Image aBitmap(mpDocSh->GetPagePreviewBitmap(pMaster));
- m_pVS->InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName);
+ m_pVS->InsertItem(static_cast<sal_uInt16>(maLayoutNames.size()), aBitmap, aLayoutName);
}
}
@@ -257,7 +257,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl, Button*, void)
maLayoutNames.push_back(aLayoutName);
Image aBitmap(pTemplDocSh->GetPagePreviewBitmap(pMaster));
- m_pVS->InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName);
+ m_pVS->InsertItem(static_cast<sal_uInt16>(maLayoutNames.size()), aBitmap, aLayoutName);
}
}
}
@@ -272,14 +272,14 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl, Button*, void)
{
// empty layout
maLayoutNames.push_back(maStrNone);
- m_pVS->InsertItem( (sal_uInt16) maLayoutNames.size(),
+ m_pVS->InsertItem( static_cast<sal_uInt16>(maLayoutNames.size()),
Image(BMP_FOIL_NONE), maStrNone );
}
if (!bCancel)
{
// select template
- m_pVS->SelectItem( (sal_uInt16) maLayoutNames.size() );
+ m_pVS->SelectItem( static_cast<sal_uInt16>(maLayoutNames.size()) );
}
}
}
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 33329a3ea808..b31ede51e6f8 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -147,7 +147,7 @@ sal_Int64 SAL_CALL SdPageObjsTLB::SdPageObjsTransferable::getSomething( const cs
if( ( rId.getLength() == 16 ) &&
( 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) )
{
- nRet = (sal_Int64)reinterpret_cast<sal_IntPtr>(this);
+ nRet = static_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
}
else
nRet = SdTransferable::getSomething(rId);
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index a600f2b77819..47bc6c5b5734 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -67,9 +67,9 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
aOptsItem.GetOptionsSnap().SetOrtho( pCbxOrtho->IsChecked() );
aOptsItem.GetOptionsSnap().SetBigOrtho( pCbxBigOrtho->IsChecked() );
aOptsItem.GetOptionsSnap().SetRotate( pCbxRotate->IsChecked() );
- aOptsItem.GetOptionsSnap().SetSnapArea( (sal_Int16) pMtrFldSnapArea->GetValue() );
- aOptsItem.GetOptionsSnap().SetAngle( (sal_Int16) pMtrFldAngle->GetValue() );
- aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle( (sal_Int16) pMtrFldBezAngle->GetValue() );
+ aOptsItem.GetOptionsSnap().SetSnapArea( static_cast<sal_Int16>(pMtrFldSnapArea->GetValue()) );
+ aOptsItem.GetOptionsSnap().SetAngle( static_cast<sal_Int16>(pMtrFldAngle->GetValue()) );
+ aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle( static_cast<sal_Int16>(pMtrFldBezAngle->GetValue()) );
rAttrs->Put( aOptsItem );
@@ -327,7 +327,7 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet )
{
const SfxUInt16Item* pItem = static_cast<const SfxUInt16Item*>(pAttr);
- FieldUnit eFUnit = (FieldUnit)(long)pItem->GetValue();
+ FieldUnit eFUnit = (FieldUnit)static_cast<long>(pItem->GetValue());
if( eFUnit != m_pMtrFldOriginalWidth->GetUnit() )
{
@@ -417,7 +417,7 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet* rAttrs )
const sal_Int32 nMPos = m_pLbMetric->GetSelectedEntryPos();
if ( m_pLbMetric->IsValueChangedFromSaved() )
{
- sal_uInt16 nFieldUnit = (sal_uInt16)reinterpret_cast<sal_IntPtr>(m_pLbMetric->GetEntryData( nMPos ));
+ sal_uInt16 nFieldUnit = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(m_pLbMetric->GetEntryData( nMPos )));
rAttrs->Put( SfxUInt16Item( GetWhich( SID_ATTR_METRIC ), nFieldUnit ) );
bModified = true;
}
@@ -427,7 +427,7 @@ bool SdTpOptionsMisc::FillItemSet( SfxItemSet* rAttrs )
{
sal_uInt16 nWh = GetWhich( SID_ATTR_DEFTABSTOP );
MapUnit eUnit = rAttrs->GetPool()->GetMetric( nWh );
- SfxUInt16Item aDef( nWh,(sal_uInt16)GetCoreValue( *m_pMtrFldTabstop, eUnit ) );
+ SfxUInt16Item aDef( nWh,static_cast<sal_uInt16>(GetCoreValue( *m_pMtrFldTabstop, eUnit )) );
rAttrs->Put( aDef );
bModified = true;
}
@@ -478,7 +478,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet* rAttrs )
if ( rAttrs->GetItemState( nWhich ) >= SfxItemState::DEFAULT )
{
const SfxUInt16Item& rItem = static_cast<const SfxUInt16Item&>(rAttrs->Get( nWhich ));
- long nFieldUnit = (long)rItem.GetValue();
+ long nFieldUnit = static_cast<long>(rItem.GetValue());
for ( sal_Int32 i = 0; i < m_pLbMetric->GetEntryCount(); ++i )
{
@@ -590,7 +590,7 @@ bool SdTpOptionsMisc::SetScale( const OUString& aScale, sal_Int32& rX, sal_Int32
if (!comphelper::string::isdigitAsciiString(aTmp))
return false;
- rX = (long) aTmp.toInt32();
+ rX = static_cast<long>(aTmp.toInt32());
if( rX == 0 )
return false;
@@ -598,7 +598,7 @@ bool SdTpOptionsMisc::SetScale( const OUString& aScale, sal_Int32& rX, sal_Int32
if (!comphelper::string::isdigitAsciiString(aTmp))
return false;
- rY = (long) aTmp.toInt32();
+ rY = static_cast<long>(aTmp.toInt32());
return rY != 0;
}
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index 5099ce6539a7..3b76955bb26d 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -97,18 +97,18 @@ void SdVectorizeDlg::dispose()
if( rBmpSize.Width() && rBmpSize.Height() && rDispSize.Width() && rDispSize.Height() )
{
Size aBmpSize( rBmpSize );
- const double fGrfWH = (double) aBmpSize.Width() / aBmpSize.Height();
- const double fWinWH = (double) rDispSize.Width() / rDispSize.Height();
+ const double fGrfWH = static_cast<double>(aBmpSize.Width()) / aBmpSize.Height();
+ const double fWinWH = static_cast<double>(rDispSize.Width()) / rDispSize.Height();
if( fGrfWH < fWinWH )
{
- aBmpSize.Width() = (long) ( rDispSize.Height() * fGrfWH );
+ aBmpSize.Width() = static_cast<long>( rDispSize.Height() * fGrfWH );
aBmpSize.Height()= rDispSize.Height();
}
else
{
aBmpSize.Width() = rDispSize.Width();
- aBmpSize.Height()= (long) ( rDispSize.Width() / fGrfWH);
+ aBmpSize.Height()= static_cast<long>( rDispSize.Width() / fGrfWH);
}
const Point aBmpPos( ( rDispSize.Width() - aBmpSize.Width() ) >> 1,
@@ -143,7 +143,7 @@ Bitmap SdVectorizeDlg::GetPreparedBitmap( Bitmap const & rBmp, Fraction& rScale
else
rScale = Fraction( 1, 1 );
- aNew.ReduceColors( (sal_uInt16) m_pNmLayers->GetValue() );
+ aNew.ReduceColors( static_cast<sal_uInt16>(m_pNmLayers->GetValue()) );
return aNew;
}
@@ -159,7 +159,7 @@ void SdVectorizeDlg::Calculate( Bitmap const & rBmp, GDIMetaFile& rMtf )
if( !!aTmp )
{
const Link<long,void> aPrgsHdl( LINK( this, SdVectorizeDlg, ProgressHdl ) );
- aTmp.Vectorize( rMtf, (sal_uInt8) m_pMtReduce->GetValue(), &aPrgsHdl );
+ aTmp.Vectorize( rMtf, static_cast<sal_uInt8>(m_pMtReduce->GetValue()), &aPrgsHdl );
if( m_pCbFillHoles->IsChecked() )
{
@@ -240,9 +240,9 @@ void SdVectorizeDlg::AddTile( BitmapReadAccess const * pRAcc, GDIMetaFile& rMtf,
}
}
- const Color aColor( (sal_uInt8) FRound( nSumR * fMult ),
- (sal_uInt8) FRound( nSumG * fMult ),
- (sal_uInt8) FRound( nSumB * fMult ) );
+ const Color aColor( static_cast<sal_uInt8>(FRound( nSumR * fMult )),
+ static_cast<sal_uInt8>(FRound( nSumG * fMult )),
+ static_cast<sal_uInt8>(FRound( nSumB * fMult )) );
::tools::Rectangle aRect( Point( nPosX, nPosY ), Size( nWidth + 1, nHeight + 1 ) );
const Size& rMaxSize = rMtf.GetPrefSize();
@@ -262,7 +262,7 @@ void SdVectorizeDlg::AddTile( BitmapReadAccess const * pRAcc, GDIMetaFile& rMtf,
IMPL_LINK( SdVectorizeDlg, ProgressHdl, long, nData, void )
{
- m_pPrgs->SetValue( (sal_uInt16)nData );
+ m_pPrgs->SetValue( static_cast<sal_uInt16>(nData) );
}
IMPL_LINK_NOARG(SdVectorizeDlg, ClickPreviewHdl, Button*, void)