diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-10-22 14:35:31 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-10-22 14:42:17 +0200 |
commit | dd28837249088bf6e6ec11ed01a01be6f1774985 (patch) | |
tree | 452a88ea26e395f846df690472147898dd999036 /svx | |
parent | 61027a637760087ee716f64ae0f216ef2a640108 (diff) |
vcl: mark more Image constructors as "explicit"
Change-Id: If59d7c75c89a102a573738d15d8593cb8ac5c486
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 46 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/line/LinePropertyPanel.cxx | 9 | ||||
-rw-r--r-- | svx/source/tbxctrls/fillctrl.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/linectrl.cxx | 10 |
5 files changed, 41 insertions, 32 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 4463a179e7bd..330a9c93d05f 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1057,7 +1057,7 @@ void HatchingLB::Fill( const XHatchListRef &pList ) pEntry = pList->GetHatch( i ); const Bitmap aBitmap = pList->GetUiBitmap( i ); if( !aBitmap.IsEmpty() ) - InsertEntry( pEntry->GetName(), aBitmap ); + InsertEntry(pEntry->GetName(), Image(aBitmap)); else InsertEntry( pEntry->GetName() ); } @@ -1072,7 +1072,7 @@ void HatchingLB::Append( const XHatchEntry& rEntry, const Bitmap& rBitmap ) { if(!rBitmap.IsEmpty()) { - InsertEntry( rEntry.GetName(), rBitmap ); + InsertEntry(rEntry.GetName(), Image(rBitmap)); } else { @@ -1090,7 +1090,7 @@ void HatchingLB::Modify( const XHatchEntry& rEntry, sal_uInt16 nPos, const Bitma if( !rBitmap.IsEmpty() ) { - InsertEntry( rEntry.GetName(), rBitmap, nPos ); + InsertEntry( rEntry.GetName(), Image(rBitmap), nPos ); } else { @@ -1111,7 +1111,7 @@ void FillAttrLB::Fill( const XHatchListRef &pList ) pEntry = pList->GetHatch( i ); const Bitmap aBitmap = pList->GetUiBitmap( i ); if( !aBitmap.IsEmpty() ) - ListBox::InsertEntry( pEntry->GetName(), aBitmap ); + ListBox::InsertEntry(pEntry->GetName(), Image(aBitmap)); else InsertEntry( pEntry->GetName() ); } @@ -1156,7 +1156,7 @@ void GradientLB::Fill( const XGradientListRef &pList ) pEntry = pList->GetGradient( i ); const Bitmap aBitmap = pList->GetUiBitmap( i ); if( !aBitmap.IsEmpty() ) - InsertEntry( pEntry->GetName(), aBitmap ); + InsertEntry(pEntry->GetName(), Image(aBitmap)); else InsertEntry( pEntry->GetName() ); } @@ -1171,7 +1171,7 @@ void GradientLB::Append( const XGradientEntry& rEntry, const Bitmap& rBitmap ) { if(!rBitmap.IsEmpty()) { - InsertEntry( rEntry.GetName(), rBitmap ); + InsertEntry(rEntry.GetName(), Image(rBitmap)); } else { @@ -1189,7 +1189,7 @@ void GradientLB::Modify( const XGradientEntry& rEntry, sal_uInt16 nPos, const Bi if(!rBitmap.IsEmpty()) { - InsertEntry( rEntry.GetName(), rBitmap, nPos ); + InsertEntry( rEntry.GetName(), Image(rBitmap), nPos ); } else { @@ -1234,7 +1234,7 @@ void FillAttrLB::Fill( const XGradientListRef &pList ) pEntry = pList->GetGradient( i ); const Bitmap aBitmap = pList->GetUiBitmap( i ); if( !aBitmap.IsEmpty() ) - ListBox::InsertEntry( pEntry->GetName(), aBitmap ); + ListBox::InsertEntry(pEntry->GetName(), Image(aBitmap)); else InsertEntry( pEntry->GetName() ); } @@ -1340,7 +1340,7 @@ void BitmapLB::Fill( const XBitmapListRef &pList ) pEntry = pList->GetBitmap(i); maBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx(); formatBitmapExToSize(maBitmapEx, aSize); - InsertEntry(pEntry->GetName(), maBitmapEx); + InsertEntry(pEntry->GetName(), Image(maBitmapEx)); } AdaptDropDownLineCountToMaximum(); @@ -1356,7 +1356,7 @@ void BitmapLB::Append(const Size& rSize, const XBitmapEntry& rEntry) if(!maBitmapEx.IsEmpty()) { formatBitmapExToSize(maBitmapEx, rSize); - InsertEntry(rEntry.GetName(), maBitmapEx); + InsertEntry(rEntry.GetName(), Image(maBitmapEx)); } else { @@ -1376,7 +1376,7 @@ void BitmapLB::Modify(const Size& rSize, const XBitmapEntry& rEntry, sal_uInt16 if(!maBitmapEx.IsEmpty()) { formatBitmapExToSize(maBitmapEx, rSize); - InsertEntry(rEntry.GetName(), maBitmapEx, nPos); + InsertEntry(rEntry.GetName(), Image(maBitmapEx), nPos); } else { @@ -1405,7 +1405,7 @@ void FillAttrLB::Fill( const XBitmapListRef &pList ) pEntry = pList->GetBitmap( i ); maBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx(); formatBitmapExToSize(maBitmapEx, aSize); - ListBox::InsertEntry(pEntry->GetName(), maBitmapEx); + ListBox::InsertEntry(pEntry->GetName(), Image(maBitmapEx)); } AdaptDropDownLineCountToMaximum(); @@ -1474,7 +1474,8 @@ void LineLB::Fill( const XDashListRef &pList ) InsertEntry(pList->GetStringForUiNoLine()); // entry for solid line - InsertEntry(pList->GetStringForUiSolidLine(), pList->GetBitmapForUISolidLine()); + InsertEntry(pList->GetStringForUiSolidLine(), + Image(pList->GetBitmapForUISolidLine())); } // entries for dashed lines @@ -1489,7 +1490,7 @@ void LineLB::Fill( const XDashListRef &pList ) const Bitmap aBitmap = pList->GetUiBitmap( i ); if( !aBitmap.IsEmpty() ) { - InsertEntry( pEntry->GetName(), aBitmap ); + InsertEntry(pEntry->GetName(), Image(aBitmap)); } else InsertEntry( pEntry->GetName() ); @@ -1505,7 +1506,7 @@ void LineLB::Append( const XDashEntry& rEntry, const Bitmap& rBitmap ) { if(!rBitmap.IsEmpty()) { - InsertEntry( rEntry.GetName(), rBitmap ); + InsertEntry(rEntry.GetName(), Image(rBitmap)); } else { @@ -1523,7 +1524,7 @@ void LineLB::Modify( const XDashEntry& rEntry, sal_uInt16 nPos, const Bitmap& rB if(!rBitmap.IsEmpty()) { - InsertEntry( rEntry.GetName(), rBitmap, nPos ); + InsertEntry( rEntry.GetName(), Image(rBitmap), nPos ); } else { @@ -1577,8 +1578,9 @@ void LineEndLB::Fill( const XLineEndListRef &pList, bool bStart ) aVD.SetOutputSizePixel( aBmpSize, sal_False ); aVD.DrawBitmap( Point(), aBitmap ); InsertEntry( pEntry->GetName(), - aVD.GetBitmap( bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ), - Size( aBmpSize.Width() / 2, aBmpSize.Height() ) ) ); + Image(aVD.GetBitmap( + (bStart) ? Point() : Point(aBmpSize.Width() / 2, 0), + Size(aBmpSize.Width() / 2, aBmpSize.Height())))); //delete pBitmap; } else @@ -1602,7 +1604,9 @@ void LineEndLB::Append( const XLineEndEntry& rEntry, const Bitmap& rBitmap, bool aVD.DrawBitmap(Point(), rBitmap); InsertEntry( rEntry.GetName(), - aVD.GetBitmap(bStart ? Point() : Point(aBmpSize.Width() / 2, 0 ), Size(aBmpSize.Width() / 2, aBmpSize.Height()))); + Image(aVD.GetBitmap( + (bStart) ? Point() : Point(aBmpSize.Width() / 2, 0), + Size(aBmpSize.Width() / 2, aBmpSize.Height())))); } else { @@ -1627,7 +1631,9 @@ void LineEndLB::Modify( const XLineEndEntry& rEntry, sal_uInt16 nPos, const Bitm aVD.DrawBitmap(Point(), rBitmap); InsertEntry( rEntry.GetName(), - aVD.GetBitmap(bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ), Size( aBmpSize.Width() / 2, aBmpSize.Height())), + Image(aVD.GetBitmap( + (bStart) ? Point() : Point(aBmpSize.Width() / 2, 0), + Size(aBmpSize.Width() / 2, aBmpSize.Height()))), nPos); } else diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index e0ee5f932d6d..f926e5f4fe00 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -1392,8 +1392,8 @@ IMPL_LINK_NOARG(GalleryBrowser2, MiscHdl) aListBmpEx.Scale( aLargeSize ); } - maViewBox.SetItemImage( TBX_ID_ICON, aIconBmpEx ); - maViewBox.SetItemImage( TBX_ID_LIST, aListBmpEx ); + maViewBox.SetItemImage(TBX_ID_ICON, Image(aIconBmpEx)); + maViewBox.SetItemImage(TBX_ID_LIST, Image(aListBmpEx)); maViewBox.SetSizePixel( maViewBox.CalcWindowSizePixel() ); Resize(); diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx index e89fab88c349..00920f2ff2db 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.cxx +++ b/svx/source/sidebar/line/LinePropertyPanel.cxx @@ -93,12 +93,12 @@ namespace { aCopyStart.Crop(aCropRectStart); rListBoxStart.InsertEntry( pEntry->GetName(), - aCopyStart); + Image(aCopyStart)); aCopyEnd.Crop(aCropRectEnd); rListBoxEnd.InsertEntry( pEntry->GetName(), - aCopyEnd); + Image(aCopyEnd)); } else { @@ -122,7 +122,8 @@ namespace { rListBox.InsertEntry(rList.GetStringForUiNoLine()); // entry for solid line - rListBox.InsertEntry(rList.GetStringForUiSolidLine(), rList.GetBitmapForUISolidLine()); + rListBox.InsertEntry(rList.GetStringForUiSolidLine(), + Image( rList.GetBitmapForUISolidLine())); for(sal_uInt32 i(0); i < nCount; i++) { @@ -133,7 +134,7 @@ namespace { { rListBox.InsertEntry( pEntry->GetName(), - aBitmap); + Image(aBitmap)); // delete pBitmap; } else diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index 99b2d9cbac18..e8b45dc07bc5 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -309,7 +309,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState ) if( !aBmp.IsEmpty() ) { - ( (ListBox*)pFillAttrLB )->InsertEntry( pEntry->GetName(), aBmp ); + pFillAttrLB->InsertEntry(pEntry->GetName(), Image(aBmp)); pFillAttrLB->SelectEntryPos( pFillAttrLB->GetEntryCount() - 1 ); //delete pBmp; } @@ -354,7 +354,7 @@ void SvxFillToolBoxControl::Update( const SfxPoolItem* pState ) if( !aBmp.IsEmpty() ) { - ( (ListBox*)pFillAttrLB )->InsertEntry( pEntry->GetName(), aBmp ); + pFillAttrLB->InsertEntry(pEntry->GetName(), Image(aBmp)); pFillAttrLB->SelectEntryPos( pFillAttrLB->GetEntryCount() - 1 ); //delete pBmp; } diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index cc29e1f9f862..4db2dbce6a52 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -516,8 +516,8 @@ void SvxLineEndWindow::FillValueSet() Point aPt1( aBmpSize.Width(), 0 ); aVD.DrawBitmap( Point(), aBmp ); - aLineEndSet.InsertItem( 1, aVD.GetBitmap( aPt0, aBmpSize ), pEntry->GetName() ); - aLineEndSet.InsertItem( 2, aVD.GetBitmap( aPt1, aBmpSize ), pEntry->GetName() ); + aLineEndSet.InsertItem(1, Image(aVD.GetBitmap(aPt0, aBmpSize)), pEntry->GetName()); + aLineEndSet.InsertItem(2, Image(aVD.GetBitmap(aPt1, aBmpSize)), pEntry->GetName()); delete pLineEndList->Remove( nCount ); @@ -529,8 +529,10 @@ void SvxLineEndWindow::FillValueSet() OSL_ENSURE( !aBmp.IsEmpty(), "UI bitmap was not created" ); aVD.DrawBitmap( aPt0, aBmp ); - aLineEndSet.InsertItem( (sal_uInt16)((i+1L)*2L+1L), aVD.GetBitmap( aPt0, aBmpSize ), pEntry->GetName() ); - aLineEndSet.InsertItem( (sal_uInt16)((i+2L)*2L), aVD.GetBitmap( aPt1, aBmpSize ), pEntry->GetName() ); + aLineEndSet.InsertItem((sal_uInt16)((i+1L)*2L+1L), + Image(aVD.GetBitmap(aPt0, aBmpSize)), pEntry->GetName()); + aLineEndSet.InsertItem((sal_uInt16)((i+2L)*2L), + Image(aVD.GetBitmap(aPt1, aBmpSize)), pEntry->GetName()); } nLines = std::min( (sal_uInt16)(nCount + 1), (sal_uInt16) MAX_LINES ); aLineEndSet.SetLineCount( nLines ); |