From f6789641af5e1c7ecd4a65ea5deb020c5d3367e5 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Wed, 10 Apr 2013 16:24:07 +0200 Subject: Photo Album: make localizable the hardcoded strings Change-Id: I9ffb10ddce9a8fba053c3adbb789854917595dd0 --- sd/source/ui/app/strings.src | 10 ++++++++++ sd/source/ui/dlg/PhotoAlbumDialog.cxx | 10 ++++++---- sd/source/ui/inc/strings.hrc | 3 +++ 3 files changed, 19 insertions(+), 4 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src index 17a07b98d238..bc96afb7552a 100644 --- a/sd/source/ui/app/strings.src +++ b/sd/source/ui/app/strings.src @@ -1268,4 +1268,14 @@ String STRING_DRAG_AND_DROP_SLIDES Text [ en-US ] = "Drag and Drop Slides" ; }; +String STR_PHOTO_ALBUM_TITLE +{ + Text [ en-US ] = "Photo Album" ; +}; + +String STR_PHOTO_ALBUM_AUTHOR +{ + Text [ en-US ] = "Author:" ; +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 5bbd5cf2a4e7..955cbbda9809 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -7,8 +7,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "PhotoAlbumDialog.hxx" - #include #include #include @@ -31,6 +29,10 @@ #include #include +#include "PhotoAlbumDialog.hxx" +#include "strings.hrc" +#include "sdresid.hxx" + namespace sd { @@ -107,12 +109,12 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl) SdrObject* pTitleObj = pFirstSlide->GetPresObj(PRESOBJ_TITLE, 0); SvxShapeText* pTitleText = new SvxShapeText(pTitleObj); pTitleText->SetShapeType("com.sun.star.presentation.TitleTextShape"); - pTitleText->setString(OUString("Photoalbum\n")); + pTitleText->setString(SD_RESSTR(STR_PHOTO_ALBUM_TITLE)); SdrObject* pTextObj = pFirstSlide->GetPresObj(PRESOBJ_TEXT, 0); SvxShapeText* pTextShape = new SvxShapeText(pTextObj); pTextShape->SetShapeType("com.sun.star.presentation.TextShape"); - pTextShape->setString(OUString("Author: ") + aUserOptions.GetFullName()); + pTextShape->setString(SD_RESSTR(STR_PHOTO_ALBUM_AUTHOR) + " " + aUserOptions.GetFullName()); Reference< XComponentContext > xContext(::comphelper::getProcessComponentContext()); Reference< graphic::XGraphicProvider> xProvider(graphic::GraphicProvider::create(xContext)); diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc index 98250a92fc49..c3d8268a6c49 100644 --- a/sd/source/ui/inc/strings.hrc +++ b/sd/source/ui/inc/strings.hrc @@ -415,6 +415,9 @@ #define STR_ACC_DIALOG_DESC (RID_APP_START+728) +#define STR_PHOTO_ALBUM_TITLE (RID_APP_START+729) +#define STR_PHOTO_ALBUM_AUTHOR (RID_APP_START+730) + /****************************************************************************** * The ids in glob.hrc start at RID_APP_START+750! ******************************************************************************/ -- cgit