diff options
-rw-r--r-- | sd/inc/glob.hrc | 6 | ||||
-rw-r--r-- | sd/source/core/sdpage.cxx | 62 | ||||
-rw-r--r-- | sd/source/ui/app/res_bmp.src | 20 |
3 files changed, 83 insertions, 5 deletions
diff --git a/sd/inc/glob.hrc b/sd/inc/glob.hrc index 0c4845048274..7ef9ecad779c 100644 --- a/sd/inc/glob.hrc +++ b/sd/inc/glob.hrc @@ -47,6 +47,12 @@ #define STR_PRESOBJ_ORGCHART RID_GLOB_START+11 #define STR_PRESOBJ_TABLE RID_GLOB_START+12 #define STR_PRESOBJ_IMAGE RID_GLOB_START+13 +#define BMP_PRESOBJ_GRAPHIC RID_GLOB_START+14 +#define BMP_PRESOBJ_OBJECT RID_GLOB_START+15 +#define BMP_PRESOBJ_CHART RID_GLOB_START+16 +#define BMP_PRESOBJ_ORGCHART RID_GLOB_START+17 +#define BMP_PRESOBJ_TABLE RID_GLOB_START+18 +#define BMP_PRESOBJ_IMAGE RID_GLOB_START+19 #define STR_OUTLINEVIEWSHELL RID_GLOB_START+21 #define STR_DRAWVIEWSHELL RID_GLOB_START+22 #define STR_TEXTOBJECTBARSHELL RID_GLOB_START+23 diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 4a2b740a1e14..0f58407a65b7 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -205,11 +205,6 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec } break; - case PRESOBJ_GRAPHIC: - case PRESOBJ_OBJECT: - case PRESOBJ_CHART: - case PRESOBJ_ORGCHART: - case PRESOBJ_TABLE: case PRESOBJ_OUTLINE: { pSdrObj = new SdrRectObj(OBJ_OUTLINETEXT); @@ -238,6 +233,63 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec } break; + case PRESOBJ_GRAPHIC: + { + BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_GRAPHIC ) ); + Graphic aGraphic( aBmpEx ); + OutputDevice &aOutDev = *Application::GetDefaultDevice(); + aOutDev.Push(); + + aOutDev.SetMapMode( aGraphic.GetPrefMapMode() ); + Size aSizePix = aOutDev.LogicToPixel( aGraphic.GetPrefSize() ); + aOutDev.SetMapMode(MAP_100TH_MM); + + Size aSize = aOutDev.PixelToLogic(aSizePix); + Point aPnt (0, 0); + Rectangle aRect (aPnt, aSize); + pSdrObj = new SdrGrafObj(aGraphic, aRect); + aOutDev.Pop(); + } + break; + + case PRESOBJ_OBJECT: + { + pSdrObj = new SdrOle2Obj(); + BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_OBJECT ) ); + Graphic aGraphic( aBmpEx ); + ( (SdrOle2Obj*) pSdrObj)->SetGraphic(&aGraphic); + } + break; + + case PRESOBJ_CHART: + { + pSdrObj = new SdrOle2Obj(); + ( (SdrOle2Obj*) pSdrObj)->SetProgName( String( RTL_CONSTASCII_USTRINGPARAM( "StarChart" ))); + BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_CHART ) ); + Graphic aGraphic( aBmpEx ); + ( (SdrOle2Obj*) pSdrObj)->SetGraphic(&aGraphic); + } + break; + + case PRESOBJ_ORGCHART: + { + pSdrObj = new SdrOle2Obj(); + ( (SdrOle2Obj*) pSdrObj)->SetProgName( String( RTL_CONSTASCII_USTRINGPARAM( "StarOrg" ))); + BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_ORGCHART ) ); + Graphic aGraphic( aBmpEx ); + ( (SdrOle2Obj*) pSdrObj)->SetGraphic(&aGraphic); + } + + case PRESOBJ_TABLE: + { + pSdrObj = new SdrOle2Obj(); + ( (SdrOle2Obj*) pSdrObj)->SetProgName( String( RTL_CONSTASCII_USTRINGPARAM( "StarCalc" ))); + BitmapEx aBmpEx( SdResId( BMP_PRESOBJ_TABLE ) ); + Graphic aGraphic( aBmpEx ); + ( (SdrOle2Obj*) pSdrObj)->SetGraphic(&aGraphic); + } + break; + case PRESOBJ_BACKGROUND: { pSdrObj = new SdrRectObj(); diff --git a/sd/source/ui/app/res_bmp.src b/sd/source/ui/app/res_bmp.src index 9257a52c3dd3..f17bec667bfa 100644 --- a/sd/source/ui/app/res_bmp.src +++ b/sd/source/ui/app/res_bmp.src @@ -499,6 +499,26 @@ SfxStyleFamilies DLG_STYLE_DESIGNER #undef STYLE_IMAGE_LISTEF }; +Bitmap BMP_PRESOBJ_GRAPHIC +{ + File = "image.bmp" ; +}; +Bitmap BMP_PRESOBJ_OBJECT +{ + File = "object.bmp" ; +}; +Bitmap BMP_PRESOBJ_CHART +{ + File = "chart.bmp" ; +}; +Bitmap BMP_PRESOBJ_ORGCHART +{ + File = "orgchart.bmp" ; +}; +Bitmap BMP_PRESOBJ_TABLE +{ + File = "table.bmp" ; +}; Bitmap BMP_WAIT_ICON { File = "waiticon.bmp"; |