From 54bec7096ff8dbb82be4f05d2e8220bf2bbad8e1 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Tue, 20 Apr 2010 16:57:49 +0200 Subject: [PATCH] #i107213# finalized layout grippies tooltips --- sd/source/ui/app/strings.src | 25 ++++++++++++++++++++++++ sd/source/ui/inc/strings.hrc | 4 ++++ sd/source/ui/view/viewoverlaymanager.cxx | 5 +++-- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src index 26ed07d656a6..4a08324883bd 100755 --- a/sd/source/ui/app/strings.src +++ b/sd/source/ui/app/strings.src @@ -1235,3 +1235,28 @@ String STR_RESET_LAYOUT { Text[ en-US ] = "Reset Slide Layout"; }; + +String STR_RESET_LAYOUT +{ + Text [ en-US ] = "Comments"; +}; + +String STR_INSERT_TABLE +{ + Text [ en-US ] = "Insert Table"; +}; + +String STR_INSERT_CHART +{ + Text [ en-US ] = "Insert Chart"; +}; + +String STR_INSERT_PICTURE +{ + Text [ en-US ] = "Insert Picture"; +}; + +String STR_INSERT_MOVIE +{ + Text [ en-US ] = "Insert Movie"; +}; diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc index a1ae102ac93c..d9dc93a1ef20 100755 --- a/sd/source/ui/inc/strings.hrc +++ b/sd/source/ui/inc/strings.hrc @@ -503,6 +503,10 @@ #define STR_NAVIGATOR_SHAPE_BASE_NAME (RID_APP_START+720) #define STR_RESET_LAYOUT (RID_APP_START+721) +#define STR_INSERT_TABLE (RID_APP_START+722) +#define STR_INSERT_CHART (RID_APP_START+723) +#define STR_INSERT_PICTURE (RID_APP_START+724) +#define STR_INSERT_MOVIE (RID_APP_START+725) /****************************************************************************** * The ids in glob.hrc start at RID_APP_START+750! diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx index cbe5582fbadd..2bb1d5a20230 100755 --- a/sd/source/ui/view/viewoverlaymanager.cxx +++ b/sd/source/ui/view/viewoverlaymanager.cxx @@ -60,6 +60,7 @@ #include "DrawViewShell.hxx" #include "DrawController.hxx" #include "glob.hrc" +#include "strings.hrc" #include "sdresid.hxx" #include "EventMultiplexer.hxx" #include "ViewShellManager.hxx" @@ -83,6 +84,7 @@ BitmapEx ViewOverlayManager::maLargeButtonImages[BMP_PLACEHOLDER_LARGE_END - BMP static USHORT gButtonSlots[] = { SID_INSERT_TABLE, SID_INSERT_DIAGRAM, SID_INSERT_GRAPHIC, SID_INSERT_AVMEDIA }; static const sal_Char* gSlotStr[] = { ".uno:InsertTable", ".uno:InsertObjectChart", ".uno:InsertGraphic", ".uno:InsertVideo" }; +static USHORT gButtonToolTips[] = { STR_RESET_LAYOUT, STR_INSERT_TABLE, STR_INSERT_CHART, STR_INSERT_PICTURE,STR_INSERT_MOVIE }; // -------------------------------------------------------------------- @@ -209,8 +211,7 @@ void ImageButtonHdl::onMouseEnter(const MouseEvent& rMEvt) if( pHdlList ) { - Reference< XFrame > xFrame( static_cast< View* >( pHdlList->GetView() )->GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface() ); - String aHelpText( ImplRetrieveLabelFromCommand( xFrame, OUString::createFromAscii( gSlotStr[nHighlightId] ) ) ); + String aHelpText( SdResId( gButtonToolTips[mnHighlightId] ) ); Rectangle aScreenRect( pDev->LogicToPixel( GetPos() ), maImageSize ); mnTip = Help::ShowTip( static_cast< ::Window* >( pHdlList->GetView()->GetFirstOutputDevice() ), aScreenRect, aHelpText, 0 ) ; }