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 | |
parent | 61027a637760087ee716f64ae0f216ef2a640108 (diff) |
vcl: mark more Image constructors as "explicit"
Change-Id: If59d7c75c89a102a573738d15d8593cb8ac5c486
34 files changed, 227 insertions, 210 deletions
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx index 3dc268dd80c6..baf4568cd663 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx @@ -450,36 +450,36 @@ void ColumnChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const switch(rParameter.nGeometry3D) { case DataPointGeometry3D::CYLINDER: - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_SAEULE_3D_1 ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_SAEULE_3D_2 ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_SAEULE_3D_3 ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_SAEULE_3D_4 ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_SAEULE_3D_1)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_SAEULE_3D_2)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_SAEULE_3D_3)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_SAEULE_3D_4)))); break; case DataPointGeometry3D::CONE: - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_KEGEL_3D_1 ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_KEGEL_3D_2 ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_KEGEL_3D_3 ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_KEGEL_3D_4 ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_KEGEL_3D_1)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_KEGEL_3D_2)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_KEGEL_3D_3)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_KEGEL_3D_4)))); break; case DataPointGeometry3D::PYRAMID: - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_PYRAMID_3D_1 ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_PYRAMID_3D_2 ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_PYRAMID_3D_3 ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_PYRAMID_3D_4 ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_PYRAMID_3D_1)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_PYRAMID_3D_2)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_PYRAMID_3D_3)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_PYRAMID_3D_4)))); break; default: //DataPointGeometry3D::CUBOID: - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_COLUMNS_3D_1 ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_COLUMNS_3D_2 ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_COLUMNS_3D_3 ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_COLUMNS_3D ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_COLUMNS_3D_1)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_COLUMNS_3D_2)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_COLUMNS_3D_3)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_COLUMNS_3D)))); break; } } else { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_COLUMNS_2D_1 ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_COLUMNS_2D_2 ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_COLUMNS_2D_3 ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_COLUMNS_2D_1)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_COLUMNS_2D_2)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_COLUMNS_2D_3)))); } rSubTypeList.SetItemText( 1, SCH_RESSTR( STR_NORMAL ) ); @@ -525,36 +525,36 @@ void BarChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const Ch switch(rParameter.nGeometry3D) { case DataPointGeometry3D::CYLINDER: - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_ROEHRE_3D_1 ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_ROEHRE_3D_2 ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_ROEHRE_3D_3 ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_ROEHRE_3D_4 ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_ROEHRE_3D_1)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_ROEHRE_3D_2)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_ROEHRE_3D_3)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_ROEHRE_3D_4)))); break; case DataPointGeometry3D::CONE: - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_KEGELQ_3D_1 ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_KEGELQ_3D_2 ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_KEGELQ_3D_3 ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_KEGELQ_3D_4 ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_KEGELQ_3D_1)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_KEGELQ_3D_2)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_KEGELQ_3D_3)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_KEGELQ_3D_4)))); break; case DataPointGeometry3D::PYRAMID: - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_PYRAMIDQ_3D_1 ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_PYRAMIDQ_3D_2 ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_PYRAMIDQ_3D_3 ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_PYRAMIDQ_3D_4 ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_PYRAMIDQ_3D_1)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_PYRAMIDQ_3D_2)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_PYRAMIDQ_3D_3)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_PYRAMIDQ_3D_4)))); break; default: //DataPointGeometry3D::CUBOID: - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_BARS_3D_1 ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_BARS_3D_2 ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_BARS_3D_3 ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_BARS_3D ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_BARS_3D_1)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_BARS_3D_2)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_BARS_3D_3)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_BARS_3D)))); break; } } else { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_BARS_2D_1 ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_BARS_2D_2 ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_BARS_2D_3 ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_BARS_2D_1)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_BARS_2D_2)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_BARS_2D_3)))); } rSubTypeList.SetItemText( 1, SCH_RESSTR( STR_NORMAL ) ); rSubTypeList.SetItemText( 2, SCH_RESSTR( STR_STACKED ) ); @@ -597,17 +597,17 @@ void PieChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const Ch if( rParameter.b3DLook ) { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_CIRCLES_3D ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_CIRCLES_3D_EXPLODED ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_DONUT_3D ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_DONUT_3D_EXPLODED ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_CIRCLES_3D)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_CIRCLES_3D_EXPLODED)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_DONUT_3D)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_DONUT_3D_EXPLODED)))); } else { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_CIRCLES_2D ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_CIRCLES_2D_EXPLODED ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_DONUT_2D ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_DONUT_2D_EXPLODED ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_CIRCLES_2D)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_CIRCLES_2D_EXPLODED)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_DONUT_2D)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_DONUT_2D_EXPLODED)))); } rSubTypeList.SetItemText( 1, SCH_RESSTR( STR_NORMAL ) ); rSubTypeList.SetItemText( 2, SCH_RESSTR( STR_PIE_EXPLODED ) ); @@ -667,17 +667,17 @@ void LineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const C case CurveStyle_B_SPLINES: if( GlobalStackMode_NONE == rParameter.eStackMode || GlobalStackMode_STACK_Z == rParameter.eStackMode ) { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_XCATEGORY ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_XCATEGORY_SMOOTH ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_XCATEGORY_SMOOTH ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_XCATEGORY_SMOOTH ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_POINTS_XCATEGORY)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_LINE_P_XCATEGORY_SMOOTH)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_LINE_O_XCATEGORY_SMOOTH)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_LINE3D_XCATEGORY_SMOOTH)))); } else { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_STACKED ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_STACKED_SMOOTH ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_STACKED_SMOOTH ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_STACKED_SMOOTH ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_POINTS_STACKED)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_LINE_P_STACKED_SMOOTH)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_LINE_O_STACKED_SMOOTH)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_LINE3D_STACKED_SMOOTH)))); } break; case CurveStyle_STEP_START: @@ -686,34 +686,34 @@ void LineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const C case CurveStyle_STEP_CENTER_Y: if( GlobalStackMode_NONE == rParameter.eStackMode || GlobalStackMode_STACK_Z == rParameter.eStackMode ) { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_XCATEGORY ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_XCATEGORY_STEPPED ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_XCATEGORY_STEPPED ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_XCATEGORY_STEPPED ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_POINTS_XCATEGORY)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_LINE_P_XCATEGORY_STEPPED)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_LINE_O_XCATEGORY_STEPPED)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_LINE3D_XCATEGORY_STEPPED)))); } else { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_STACKED ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_STACKED_STEPPED ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_STACKED_STEPPED ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_STACKED_STEPPED ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_POINTS_STACKED)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_LINE_P_STACKED_STEPPED)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_LINE_O_STACKED_STEPPED)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_LINE3D_STACKED_STEPPED)))); } break; default: // includes CurveStyle_LINES //direct lines if( GlobalStackMode_NONE == rParameter.eStackMode || GlobalStackMode_STACK_Z == rParameter.eStackMode ) { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_XCATEGORY ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_XCATEGORY ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_XCATEGORY ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_XCATEGORY ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_POINTS_XCATEGORY)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_LINE_P_XCATEGORY)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_LINE_O_XCATEGORY)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_LINE3D_XCATEGORY)))); } else { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_STACKED ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_STACKED ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_STACKED ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_STACKED ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_POINTS_STACKED)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_LINE_P_STACKED)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_LINE_O_STACKED)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_LINE3D_STACKED)))); } } @@ -806,10 +806,10 @@ void XYChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const Cha case CurveStyle_CUBIC_SPLINES: case CurveStyle_B_SPLINES: { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_XVALUES ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_XVALUES_SMOOTH ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_XVALUES_SMOOTH ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_XVALUES_SMOOTH ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_POINTS_XVALUES)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_LINE_P_XVALUES_SMOOTH)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_LINE_O_XVALUES_SMOOTH)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_LINE3D_XVALUES_SMOOTH)))); break; } case CurveStyle_STEP_START: @@ -817,17 +817,17 @@ void XYChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const Cha case CurveStyle_STEP_CENTER_X: case CurveStyle_STEP_CENTER_Y: { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_XVALUES ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_XVALUES_STEPPED ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_XVALUES_STEPPED ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_XVALUES_STEPPED ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_POINTS_XVALUES)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_LINE_P_XVALUES_STEPPED)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_LINE_O_XVALUES_STEPPED)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_LINE3D_XVALUES_STEPPED)))); break; } default: // includes CurveStyle_LINES - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_POINTS_XVALUES ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_LINE_P_XVALUES ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_LINE_O_XVALUES ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_LINE3D_XVALUES ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_POINTS_XVALUES)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_LINE_P_XVALUES)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_LINE_O_XVALUES)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_LINE3D_XVALUES)))); } rSubTypeList.SetItemText( 1, SCH_RESSTR( STR_POINTS_ONLY ) ); @@ -907,15 +907,15 @@ void AreaChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const C if( rParameter.b3DLook ) { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_AREAS_3D ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_AREAS_3D_1 ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_AREAS_3D_2 ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_AREAS_3D)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_AREAS_3D_1)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_AREAS_3D_2)))); } else { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_AREAS_2D_1 ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_AREAS_2D ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_AREAS_2D_3 ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_AREAS_2D_1)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_AREAS_2D)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_AREAS_2D_3)))); } rSubTypeList.SetItemText( 1, SCH_RESSTR( rParameter.b3DLook ? STR_DEEP : STR_NORMAL ) ); @@ -999,17 +999,17 @@ void NetChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const Ch if( GlobalStackMode_NONE == rParameter.eStackMode ) { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_NET_SYMB ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_NET_LINESYMB ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_NET ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_NET_FILL ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_NET_SYMB)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_NET_LINESYMB)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_NET)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_NET_FILL)))); } else { - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_NET_SYMB_STACK ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_NET_LINESYMB_STACK ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_NET_STACK ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_NET_FILL_STACK ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_NET_SYMB_STACK)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_NET_LINESYMB_STACK)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_NET_STACK)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_NET_FILL_STACK)))); } rSubTypeList.SetItemText( 1, SCH_RESSTR( STR_POINTS_ONLY ) ); @@ -1075,10 +1075,10 @@ const tTemplateServiceChartTypeParameterMap& StockChartDialogController::getTemp void StockChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) { rSubTypeList.Clear(); - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_STOCK_1 ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_STOCK_2 ))); - rSubTypeList.InsertItem( 3, Bitmap( SchResId( BMP_STOCK_3 ))); - rSubTypeList.InsertItem( 4, Bitmap( SchResId( BMP_STOCK_4 ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_STOCK_1)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_STOCK_2)))); + rSubTypeList.InsertItem(3, Image(Bitmap(SchResId(BMP_STOCK_3)))); + rSubTypeList.InsertItem(4, Image(Bitmap(SchResId(BMP_STOCK_4)))); rSubTypeList.SetItemText( 1, SCH_RESSTR(STR_STOCK_1) ); rSubTypeList.SetItemText( 2, SCH_RESSTR(STR_STOCK_2) ); @@ -1127,8 +1127,8 @@ const tTemplateServiceChartTypeParameterMap& CombiColumnLineChartDialogControlle void CombiColumnLineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) { rSubTypeList.Clear(); - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_COLUMN_LINE ))); - rSubTypeList.InsertItem( 2, Bitmap( SchResId( BMP_COLUMN_LINE_STACKED ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_COLUMN_LINE)))); + rSubTypeList.InsertItem(2, Image(Bitmap(SchResId(BMP_COLUMN_LINE_STACKED)))); rSubTypeList.SetItemText(1, SCH_RESSTR(STR_LINE_COLUMN)); rSubTypeList.SetItemText(2, SCH_RESSTR(STR_LINE_STACKEDCOLUMN)); @@ -1268,7 +1268,7 @@ const tTemplateServiceChartTypeParameterMap& BubbleChartDialogController::getTem void BubbleChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) { rSubTypeList.Clear(); - rSubTypeList.InsertItem( 1, Bitmap( SchResId( BMP_BUBBLE_1 ))); + rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_BUBBLE_1)))); rSubTypeList.SetItemText( 1, SCH_RESSTR(STR_BUBBLE_1) ); } diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index 31033df32e87..e3372b9265b8 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -140,7 +140,7 @@ namespace dbaui if ( !xIconList.hasElements() ) break; - aIcon = Graphic( xIconList[0] ).GetBitmapEx(); + aIcon = Image(Graphic(xIconList[0]).GetBitmapEx()); } while ( false ); } diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx index 6589dc1aa48a..3859e32005c0 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -89,8 +89,8 @@ OCollectionView::OCollectionView( Window * pParent m_aName.GrabFocus(); m_aNewFolder.SetStyle( m_aNewFolder.GetStyle() | WB_NOPOINTERFOCUS ); - m_aUp.SetModeImage(ModuleRes(IMG_NAVIGATION_BTN_UP_SC)); - m_aNewFolder.SetModeImage(ModuleRes(IMG_NAVIGATION_CREATEFOLDER_SC)); + m_aUp.SetModeImage(Image(ModuleRes(IMG_NAVIGATION_BTN_UP_SC))); + m_aNewFolder.SetModeImage(Image(ModuleRes(IMG_NAVIGATION_CREATEFOLDER_SC))); m_aView.SetDoubleClickHdl( LINK( this, OCollectionView, Dbl_Click_FileView ) ); m_aView.EnableAutoResize(); diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 885f07f0f1d2..a11a656923f1 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -109,8 +109,8 @@ SaneDlg::SaneDlg( Window* pParent, Sane& rSane, bool bScanEnabled ) : maOldLink = mrSane.SetReloadOptionsHdl( LINK( this, SaneDlg, ReloadSaneOptionsHdl ) ); maOptionBox.SetNodeBitmaps( - Bitmap( SaneResId( RID_SCAN_BITMAP_PLUS ) ), - Bitmap( SaneResId( RID_SCAN_BITMAP_MINUS ) ) + Image(Bitmap( SaneResId(RID_SCAN_BITMAP_PLUS) )), + Image(Bitmap( SaneResId(RID_SCAN_BITMAP_MINUS) )) ); maOptionBox.SetStyle( maOptionBox.GetStyle()| WB_HASLINES | diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index e04ba8adc8b4..2bf2029c3466 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -976,14 +976,14 @@ throw ( ::com::sun::star::lang::IllegalArgumentException, sal_uInt16 nPos = pImageList->GetImagePos( aCommandURLSequence[i] ); if ( nPos == IMAGELIST_IMAGE_NOTFOUND ) { - pImageList->AddImage( aCommandURLSequence[i], xGraphic ); + pImageList->AddImage(aCommandURLSequence[i], Image(xGraphic)); if ( !pInsertedImages ) pInsertedImages = new CmdToXGraphicNameAccess(); pInsertedImages->addElement( aCommandURLSequence[i], xGraphic ); } else { - pImageList->ReplaceImage( aCommandURLSequence[i], xGraphic ); + pImageList->ReplaceImage(aCommandURLSequence[i], Image(xGraphic)); if ( !pReplacedImages ) pReplacedImages = new CmdToXGraphicNameAccess(); pReplacedImages->addElement( aCommandURLSequence[i], xGraphic ); diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx index 912ecb916306..399bbe034eff 100644 --- a/include/vcl/image.hxx +++ b/include/vcl/image.hxx @@ -51,13 +51,13 @@ class VCL_DLLPUBLIC Image public: Image(); - Image( const ResId& rResId ); + explicit Image( const ResId& rResId ); Image( const Image& rImage ); - Image( const BitmapEx& rBitmapEx ); - Image( const Bitmap& rBitmap ); + explicit Image( const BitmapEx& rBitmapEx ); + explicit Image( const Bitmap& rBitmap ); Image( const Bitmap& rBitmap, const Bitmap& rMaskBitmap ); Image( const Bitmap& rBitmap, const Color& rColor ); - Image( const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& rxGraphic ); + explicit Image( const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& rxGraphic ); explicit Image( const OUString &rPNGFileUrl ); ~Image(); @@ -83,8 +83,8 @@ private: class VCL_DLLPUBLIC ImageList { public: - ImageList( sal_uInt16 nInit = 8, sal_uInt16 nGrow = 4 ); - ImageList( const ResId& rResId ); + explicit ImageList( sal_uInt16 nInit = 8, sal_uInt16 nGrow = 4 ); + explicit ImageList( const ResId& rResId ); ImageList( const ::std::vector< OUString >& rNameVector, const OUString& rPrefix, const Color* pMaskColor = NULL ); diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index ee1fd1873bff..8566dbdff5c0 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1334,7 +1334,7 @@ ScIconSetFrmtDataEntry::ScIconSetFrmtDataEntry( Window* pParent, ScIconSetType e maEdEntry( this, ScResId( ED_ICON_SET_ENTRY_VALUE ) ), maLbEntryType( this, ScResId( LB_ICON_SET_ENTRY_TYPE ) ) { - maImgIcon.SetImage(ScIconSetFormat::getBitmap( eType, i )); + maImgIcon.SetImage(Image(ScIconSetFormat::getBitmap(eType, i))); if(pEntry) { switch(pEntry->GetType()) diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index 8a3fd5e5f3de..5442d31bd0ff 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -151,7 +151,8 @@ static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info* pIn OUString aText( SD_RESSTR( pInfo->mnStrResId ) ); BitmapEx aBmp( SdResId( pInfo->mnBmpResId ) ); - pValue->InsertItem( static_cast<sal_uInt16>(pInfo->maAutoLayout)+1, aBmp, aText ); + pValue->InsertItem(static_cast<sal_uInt16>(pInfo->maAutoLayout)+1, + Image(aBmp), aText); aLayoutItemSize.Width() = std::max( aLayoutItemSize.Width(), aBmp.GetSizePixel().Width() ); aLayoutItemSize.Height() = std::max( aLayoutItemSize.Height(), aBmp.GetSizePixel().Height() ); diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 8820b5e7dce3..38d777fa9587 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -609,7 +609,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, SelectHdl) aBmp.Scale( nYRatio, nYRatio ); aBmp.Convert( BMP_CONVERSION_24BIT ); - pImg->SetImage( aBmp ); + pImg->SetImage(Image(aBmp)); } else { diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 76833b4702ec..76179bd37cd4 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -1808,7 +1808,7 @@ Image AssistentDlgImpl::GetUiIconForCommand (const OUString& sCommandURL) if ( ! xIconList.hasElements()) break; - aIcon = Graphic(xIconList[0]).GetBitmapEx(); + aIcon = Image(Graphic(xIconList[0]).GetBitmapEx()); } while(false); } diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index fc6a5682f9bf..eb7fbd784ec5 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -837,7 +837,7 @@ void SdNavigatorWin::ApplyImageList() { maToolbox.SetImageList( maImageList ); - maToolbox.SetItemImage( TBI_SHAPE_FILTER, BitmapEx( SdResId( BMP_GRAPHIC ) ) ); + maToolbox.SetItemImage(TBI_SHAPE_FILTER, Image(BitmapEx(SdResId(BMP_GRAPHIC)))); SetDragImage(); } diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx index ae074a713537..8597412e1b82 100644 --- a/sd/source/ui/dlg/sdpreslt.cxx +++ b/sd/source/ui/dlg/sdpreslt.cxx @@ -152,7 +152,7 @@ void SdPresLayoutDlg::FillValueSet() aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR)); maLayoutNames.push_back(aLayoutName); - Bitmap aBitmap(mpDocSh->GetPagePreviewBitmap(pMaster, 90)); + Image aBitmap(Bitmap(mpDocSh->GetPagePreviewBitmap(pMaster, 90))); maVS.InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName); } } @@ -255,7 +255,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl) aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR)); maLayoutNames.push_back(aLayoutName); - Bitmap aBitmap(pTemplDocSh->GetPagePreviewBitmap(pMaster, 90)); + Image aBitmap(Bitmap(pTemplDocSh->GetPagePreviewBitmap(pMaster, 90))); maVS.InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName); } } @@ -272,7 +272,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl) // empty layout maLayoutNames.push_back(maStrNone); maVS.InsertItem( (sal_uInt16) maLayoutNames.size(), - Bitmap( SdResId( BMP_FOIL_NONE ) ), maStrNone ); + Image(Bitmap(SdResId(BMP_FOIL_NONE))), maStrNone ); } if (!bCancel) diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 4a8576b439cc..f01c00cb7554 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -235,8 +235,8 @@ SdPageObjsTLB::SdPageObjsTLB( Window* pParentWin, const SdResId& rSdResId ) WB_HSCROLL | WB_HASBUTTONSATROOT | WB_QUICK_SEARCH /* i31275 */ ); - SetNodeBitmaps( Bitmap( SdResId( BMP_EXPAND ) ), - Bitmap( SdResId( BMP_COLLAPSE ) ) ); + SetNodeBitmaps( Image(Bitmap( SdResId(BMP_EXPAND) )), + Image(Bitmap( SdResId(BMP_COLLAPSE) ))); SetDragDropMode( SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY | diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index ea5ad828ba7d..11138d9c8ea8 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -653,7 +653,7 @@ void LayoutMenu::Fill (void) if (bRightToLeft && (WritingMode_TB_RL != pInfo->meWritingMode)) aBmp.Mirror (BMP_MIRROR_HORZ); - InsertItem (i, aBmp, SdResId (pInfo->mnStrResId)); + InsertItem(i, Image(aBmp), SdResId (pInfo->mnStrResId)); SetItemData (i, new AutoLayout(pInfo->maAutoLayout)); n++; } diff --git a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx index 8d52d1fe2b73..e1d6ee56b31b 100644 --- a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx +++ b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx @@ -108,7 +108,7 @@ Image TemplatePreviewProvider::operator() ( (void)pPage; (void)rRenderer; - return ThumbnailView::readThumbnail(msURL); + return Image(ThumbnailView::readThumbnail(msURL)); } diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx index 87d91d2aca4c..3755352cc3b3 100644 --- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx +++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx @@ -337,7 +337,7 @@ void InsertionIndicatorOverlay::Paint ( if ( ! IsVisible()) return; - rDevice.DrawImage(maLocation, maIcon); + rDevice.DrawImage(maLocation, Image(maIcon)); } diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 1b88f8ad06e3..aa40d46e1cbd 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -146,9 +146,9 @@ Image PreviewRenderer::RenderPage ( PaintFrame(); Size aSize (mpPreviewDevice->GetOutputSizePixel()); - aPreview = mpPreviewDevice->GetBitmap ( + aPreview = Image(mpPreviewDevice->GetBitmap ( mpPreviewDevice->PixelToLogic(Point(0,0)), - mpPreviewDevice->PixelToLogic(aSize)); + mpPreviewDevice->PixelToLogic(aSize))); Cleanup(); } @@ -211,9 +211,9 @@ Image PreviewRenderer::RenderSubstitution ( PaintFrame(); const Size aSize (mpPreviewDevice->GetOutputSizePixel()); - aPreview = mpPreviewDevice->GetBitmap ( + aPreview = Image(mpPreviewDevice->GetBitmap( mpPreviewDevice->PixelToLogic(Point(0,0)), - mpPreviewDevice->PixelToLogic(aSize)); + mpPreviewDevice->PixelToLogic(aSize))); } catch (const com::sun::star::uno::Exception&) { @@ -520,7 +520,7 @@ Image PreviewRenderer::ScaleBitmap ( aScaledBitmap.GetBitmap()); // Get the resulting bitmap. - aPreview = mpPreviewDevice->GetBitmap (Point(0,0), aFrameSize); + aPreview = Image(mpPreviewDevice->GetBitmap(Point(0,0), aFrameSize)); } while (false); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 1cc97a90d4c2..fc92e367f375 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1374,7 +1374,7 @@ CustomPropertyLine::CustomPropertyLine( Window* pParent ) : m_aTimeField.SetExtFormat( EXTTIMEF_24H_LONG ); m_aDateField.SetExtDateFormat( XTDATEF_SYSTEM_SHORT_YYYY ); - m_aRemoveButton.SetModeImage( SfxResId( SFX_IMG_PROPERTY_REMOVE ) ); + m_aRemoveButton.SetModeImage(Image(SfxResId(SFX_IMG_PROPERTY_REMOVE))); } void CustomPropertyLine::SetRemoved() diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index 42d9c3a1ed94..54ea70e91ec2 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -178,7 +178,7 @@ namespace sfx2 const OUString sCommandName( aCommandName.makeStringAndClear() ); const Image aPanelImage( GetImage( i_rDocFrame, sCommandName, sal_False ) ); - return aPanelImage.GetXGraphic(); + return aPanelImage; } // otherwise, delegate to the GraphicProvider diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 22271bada09c..d61d6b5c7155 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -177,8 +177,12 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent) // Create popup menus mpActionMenu = new PopupMenu; - mpActionMenu->InsertItem(MNI_ACTION_SORT_NAME,SfxResId(STR_ACTION_SORT_NAME).toString(),SfxResId(IMG_ACTION_SORT)); - mpActionMenu->InsertItem(MNI_ACTION_REFRESH,SfxResId(STR_ACTION_REFRESH).toString(),SfxResId(IMG_ACTION_REFRESH)); + mpActionMenu->InsertItem(MNI_ACTION_SORT_NAME, + SfxResId(STR_ACTION_SORT_NAME).toString(), + Image(SfxResId(IMG_ACTION_SORT))); + mpActionMenu->InsertItem(MNI_ACTION_REFRESH, + SfxResId(STR_ACTION_REFRESH).toString(), + Image(SfxResId(IMG_ACTION_REFRESH))); mpActionMenu->InsertItem(MNI_ACTION_DEFAULT,SfxResId(STR_ACTION_DEFAULT).toString()); mpActionMenu->SetSelectHdl(LINK(this,SfxTemplateManagerDlg,MenuSelectHdl)); diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 87ed82d92b5f..33c15d63125e 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -973,7 +973,7 @@ void LineListBox::UpdateEntries( long nOldWidth ) GetColorLine2( GetEntryCount( ) ), GetColorDist( GetEntryCount( ) ), pData->GetStyle(), aBmp ); - ListBox::InsertEntry( OUString( " " ), aBmp, LISTBOX_APPEND ); + ListBox::InsertEntry(OUString(" "), Image(aBmp), LISTBOX_APPEND); if ( n == nTypePos ) SelectEntryPos( GetEntryCount() - 1 ); } diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 3fd6fff0a399..9a6d60c173eb 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -1463,7 +1463,7 @@ bool TreeControlPeer::loadImage( const OUString& rURL, Image& rImage ) Reference< XGraphic > xGraphic( mxGraphicProvider->queryGraphic( aProps ) ); Graphic aGraphic( xGraphic ); - rImage = aGraphic.GetBitmapEx(); + rImage = Image(aGraphic.GetBitmapEx()); return true; } catch( Exception& ) 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 ); diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx index 7fc870d13d64..c06c15f77b70 100644 --- a/sw/source/ui/envelp/envprt.cxx +++ b/sw/source/ui/envelp/envprt.cxx @@ -70,22 +70,22 @@ IMPL_LINK_NOARG(SwEnvPrtPage, ClickHdl) if (m_pBottomButton->IsChecked()) { // Envelope from botton - m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_LEFT], Bitmap(SW_RES(BMP_HOR_LEFT_LOWER))); - m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_CNTR], Bitmap(SW_RES(BMP_HOR_CNTR_LOWER))); - m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_RGHT], Bitmap(SW_RES(BMP_HOR_RGHT_LOWER))); - m_pAlignBox->SetItemImage(m_aIds[ENV_VER_LEFT], Bitmap(SW_RES(BMP_VER_LEFT_LOWER))); - m_pAlignBox->SetItemImage(m_aIds[ENV_VER_CNTR], Bitmap(SW_RES(BMP_VER_CNTR_LOWER))); - m_pAlignBox->SetItemImage(m_aIds[ENV_VER_RGHT], Bitmap(SW_RES(BMP_VER_RGHT_LOWER))); + m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_LEFT], Image(Bitmap(SW_RES(BMP_HOR_LEFT_LOWER)))); + m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_CNTR], Image(Bitmap(SW_RES(BMP_HOR_CNTR_LOWER)))); + m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_RGHT], Image(Bitmap(SW_RES(BMP_HOR_RGHT_LOWER)))); + m_pAlignBox->SetItemImage(m_aIds[ENV_VER_LEFT], Image(Bitmap(SW_RES(BMP_VER_LEFT_LOWER)))); + m_pAlignBox->SetItemImage(m_aIds[ENV_VER_CNTR], Image(Bitmap(SW_RES(BMP_VER_CNTR_LOWER)))); + m_pAlignBox->SetItemImage(m_aIds[ENV_VER_RGHT], Image(Bitmap(SW_RES(BMP_VER_RGHT_LOWER)))); } else { // Envelope from top - m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_LEFT], Bitmap(SW_RES(BMP_HOR_LEFT_UPPER))); - m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_CNTR], Bitmap(SW_RES(BMP_HOR_CNTR_UPPER))); - m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_RGHT], Bitmap(SW_RES(BMP_HOR_RGHT_UPPER))); - m_pAlignBox->SetItemImage(m_aIds[ENV_VER_LEFT], Bitmap(SW_RES(BMP_VER_LEFT_UPPER))); - m_pAlignBox->SetItemImage(m_aIds[ENV_VER_CNTR], Bitmap(SW_RES(BMP_VER_CNTR_UPPER))); - m_pAlignBox->SetItemImage(m_aIds[ENV_VER_RGHT], Bitmap(SW_RES(BMP_VER_RGHT_UPPER))); + m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_LEFT], Image(Bitmap(SW_RES(BMP_HOR_LEFT_UPPER)))); + m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_CNTR], Image(Bitmap(SW_RES(BMP_HOR_CNTR_UPPER)))); + m_pAlignBox->SetItemImage(m_aIds[ENV_HOR_RGHT], Image(Bitmap(SW_RES(BMP_HOR_RGHT_UPPER)))); + m_pAlignBox->SetItemImage(m_aIds[ENV_VER_LEFT], Image(Bitmap(SW_RES(BMP_VER_LEFT_UPPER)))); + m_pAlignBox->SetItemImage(m_aIds[ENV_VER_CNTR], Image(Bitmap(SW_RES(BMP_VER_CNTR_UPPER)))); + m_pAlignBox->SetItemImage(m_aIds[ENV_VER_RGHT], Image(Bitmap(SW_RES(BMP_VER_RGHT_UPPER)))); } return 0; } diff --git a/sw/source/ui/sidebar/PageColumnControl.cxx b/sw/source/ui/sidebar/PageColumnControl.cxx index 771f0a2287f4..d4585b7a0937 100644 --- a/sw/source/ui/sidebar/PageColumnControl.cxx +++ b/sw/source/ui/sidebar/PageColumnControl.cxx @@ -46,19 +46,19 @@ PageColumnControl::PageColumnControl( if ( bLandscape ) { - mpColumnValueSet->AddItem( SW_RES(IMG_ONE_L), 0, SW_RES(STR_ONE), 0 ); - mpColumnValueSet->AddItem( SW_RES(IMG_TWO_L), 0, SW_RES(STR_TWO), 0 ); - mpColumnValueSet->AddItem( SW_RES(IMG_THREE_L), 0, SW_RES(STR_THREE), 0 ); - mpColumnValueSet->AddItem( SW_RES(IMG_LEFT_L), 0, SW_RES(STR_LEFT), 0 ); - mpColumnValueSet->AddItem( SW_RES(IMG_RIGHT_L), 0, SW_RES(STR_RIGHT), 0 ); + mpColumnValueSet->AddItem(Image(SW_RES(IMG_ONE_L)), 0, SW_RES(STR_ONE), 0 ); + mpColumnValueSet->AddItem(Image(SW_RES(IMG_TWO_L)), 0, SW_RES(STR_TWO), 0 ); + mpColumnValueSet->AddItem(Image(SW_RES(IMG_THREE_L)), 0, SW_RES(STR_THREE), 0 ); + mpColumnValueSet->AddItem(Image(SW_RES(IMG_LEFT_L)), 0, SW_RES(STR_LEFT), 0 ); + mpColumnValueSet->AddItem(Image(SW_RES(IMG_RIGHT_L)), 0, SW_RES(STR_RIGHT), 0 ); } else { - mpColumnValueSet->AddItem( SW_RES(IMG_ONE), 0, SW_RES(STR_ONE), 0 ); - mpColumnValueSet->AddItem( SW_RES(IMG_TWO), 0, SW_RES(STR_TWO), 0 ); - mpColumnValueSet->AddItem( SW_RES(IMG_THREE), 0, SW_RES(STR_THREE), 0 ); - mpColumnValueSet->AddItem( SW_RES(IMG_LEFT), 0, SW_RES(STR_LEFT), 0 ); - mpColumnValueSet->AddItem( SW_RES(IMG_RIGHT), 0, SW_RES(STR_RIGHT), 0 ); + mpColumnValueSet->AddItem(Image(SW_RES(IMG_ONE)), 0, SW_RES(STR_ONE), 0 ); + mpColumnValueSet->AddItem(Image(SW_RES(IMG_TWO)), 0, SW_RES(STR_TWO), 0 ); + mpColumnValueSet->AddItem(Image(SW_RES(IMG_THREE)), 0, SW_RES(STR_THREE), 0 ); + mpColumnValueSet->AddItem(Image(SW_RES(IMG_LEFT)), 0, SW_RES(STR_LEFT), 0 ); + mpColumnValueSet->AddItem(Image(SW_RES(IMG_RIGHT)), 0, SW_RES(STR_RIGHT), 0 ); } mpColumnValueSet->SetNoSelection(); diff --git a/sw/source/ui/sidebar/PageMarginControl.cxx b/sw/source/ui/sidebar/PageMarginControl.cxx index 4155edbf6402..2a59a77135cb 100644 --- a/sw/source/ui/sidebar/PageMarginControl.cxx +++ b/sw/source/ui/sidebar/PageMarginControl.cxx @@ -184,7 +184,7 @@ void PageMarginControl::FillValueSet( aHelpText += aBottom; aHelpText += aNarrowValText; mpMarginValueSet->AddItem( - (bLandscape ? SW_RES(IMG_NARROW_L) : SW_RES(IMG_NARROW) ), 0, + Image((bLandscape) ? SW_RES(IMG_NARROW_L) : SW_RES(IMG_NARROW)), 0, SW_RESSTR(STR_NARROW), &aHelpText ); SetMetricValue( maWidthHeightField, SWPAGE_NORMAL_VALUE, meUnit ); @@ -198,7 +198,7 @@ void PageMarginControl::FillValueSet( aHelpText += aBottom; aHelpText += aNormalValText; mpMarginValueSet->AddItem( - (bLandscape ? SW_RES(IMG_NORMAL_L) : SW_RES(IMG_NORMAL) ), 0, + Image((bLandscape) ? SW_RES(IMG_NORMAL_L) : SW_RES(IMG_NORMAL)), 0, SW_RESSTR(STR_NORMAL), &aHelpText ); SetMetricValue( maWidthHeightField, SWPAGE_WIDE_VALUE1, meUnit ); @@ -214,7 +214,7 @@ void PageMarginControl::FillValueSet( aHelpText += aBottom; aHelpText += aWide1ValText; mpMarginValueSet->AddItem( - (bLandscape ? SW_RES(IMG_WIDE_L) : SW_RES(IMG_WIDE) ), 0, + Image((bLandscape) ? SW_RES(IMG_WIDE_L) : SW_RES(IMG_WIDE)), 0, SW_RESSTR(STR_WIDE), &aHelpText ); const OUString aInner = SW_RESSTR(STR_MARGIN_TOOLTIP_INNER); @@ -231,7 +231,7 @@ void PageMarginControl::FillValueSet( aHelpText += aBottom; aHelpText += aWide1ValText; mpMarginValueSet->AddItem( - (bLandscape ? SW_RES(IMG_MIRRORED_L) : SW_RES(IMG_MIRRORED) ), 0, + Image((bLandscape) ? SW_RES(IMG_MIRRORED_L) : SW_RES(IMG_MIRRORED)), 0, SW_RESSTR(STR_MIRRORED), &aHelpText ); if ( bUserCustomValuesAvailable ) @@ -254,7 +254,7 @@ void PageMarginControl::FillValueSet( aHelpText = OUString(); } mpMarginValueSet->AddItem( - (bUserCustomValuesAvailable ? SW_RES(IMG_CUSTOM) : SW_RES(IMG_CUSTOM_DIS) ), 0, + Image((bUserCustomValuesAvailable) ? SW_RES(IMG_CUSTOM) : SW_RES(IMG_CUSTOM_DIS)), 0, SW_RESSTR(STR_LCVALUE), &aHelpText ); } diff --git a/sw/source/ui/sidebar/PageOrientationControl.cxx b/sw/source/ui/sidebar/PageOrientationControl.cxx index 397adf83ba68..302b1697c591 100644 --- a/sw/source/ui/sidebar/PageOrientationControl.cxx +++ b/sw/source/ui/sidebar/PageOrientationControl.cxx @@ -41,8 +41,10 @@ PageOrientationControl::PageOrientationControl( // initialize <ValueSetWithText> control { - mpOrientationValueSet->AddItem( SW_RES(IMG_PORTRAIT), 0, SW_RES(STR_PORTRAIT), 0 ); - mpOrientationValueSet->AddItem( SW_RES(IMG_LANDSCAPE), 0, SW_RES(STR_LANDSCAPE), 0 ); + mpOrientationValueSet->AddItem(Image(SW_RES(IMG_PORTRAIT)), 0, + SW_RES(STR_PORTRAIT), 0); + mpOrientationValueSet->AddItem(Image(SW_RES(IMG_LANDSCAPE)), 0, + SW_RES(STR_LANDSCAPE), 0 ); } Link aLink = LINK(this, PageOrientationControl,ImplOrientationHdl ); diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx index bc4063f6475e..b1be3c353eee 100644 --- a/vcl/source/control/throbber.cxx +++ b/vcl/source/control/throbber.cxx @@ -204,11 +204,10 @@ void Throbber::setImageList( ::std::vector< Image > const& i_images ) void Throbber::setImageList( const Sequence< Reference< XGraphic > >& rImageList ) { ::std::vector< Image > aImages( rImageList.getLength() ); - ::std::copy( - rImageList.getConstArray(), - rImageList.getConstArray() + rImageList.getLength(), - aImages.begin() - ); + for (sal_Int32 i = 0; i < rImageList.getLength(); ++i) + { + aImages[i] = Image(rImageList[i]); + } setImageList( aImages ); } diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 56b808ee6448..04795df9cae8 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -365,10 +365,11 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri if (eType == SYMBOL_IMAGE) { Bitmap aBitmap(VclResId(mapStockToImageResource(rImageInfo.m_sStock))); + Image const aImage(aBitmap); if (!aI->m_bRadio) - pTargetButton->SetModeImage(aBitmap); + pTargetButton->SetModeImage(aImage); else - pTargetRadio->SetModeRadioImage(aBitmap); + pTargetRadio->SetModeRadioImage(aImage); } switch (rImageInfo.m_nSize) { diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 214b6565b5f2..23545a909f7c 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -1303,10 +1303,11 @@ void Menu::InsertItem( const ResId& rResId, sal_uInt16 nPos ) if ( !bSep ) { Bitmap aBmp( ResId( (RSHEADER_TYPE*)GetClassRes(), *pMgr ) ); + Image const aImg(aBmp); if ( !aText.isEmpty() ) - InsertItem( nItemId, aText, aBmp, nStatus, OString(), nPos ); + InsertItem( nItemId, aText, aImg, nStatus, OString(), nPos ); else - InsertItem( nItemId, aBmp, nStatus, OString(), nPos ); + InsertItem( nItemId, aImg, nStatus, OString(), nPos ); } IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) ); } |