1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 // MARKER(update_precomp.py): autogen include statement, do not remove
29 #include "precompiled_svx.hxx"
30 
31 #include "svx/ActionDescriptionProvider.hxx"
32 #include "svx/svdglob.hxx"
33 #include "svx/svdstr.hrc"
34 
35 ::rtl::OUString ActionDescriptionProvider::createDescription( ActionType eActionType
36                         , const ::rtl::OUString& rObjectName )
37 {
38     sal_uInt16 nResID=0;
39     switch( eActionType )
40     {
41     case INSERT:
42         nResID=STR_UndoInsertObj;
43         break;
44     case DELETE:
45         nResID= STR_EditDelete;
46         break;
47     case CUT:
48         nResID= STR_ExchangeClpCut;
49         break;
50     case MOVE:
51         nResID= STR_EditMove;
52         break;
53     case RESIZE:
54         nResID= STR_EditResize;
55         break;
56     case ROTATE:
57         nResID= STR_EditRotate;
58         break;
59     case TRANSFORM:
60         nResID= STR_EditTransform;
61         break;
62     case FORMAT:
63         nResID= STR_EditSetAttributes;
64         break;
65     case MOVE_TOTOP:
66         nResID= STR_EditMovToTop;
67         break;
68     case MOVE_TOBOTTOM:
69         nResID= STR_EditMovToBtm;
70         break;
71     case POS_SIZE:
72         nResID = STR_EditPosSize;
73         break;
74     }
75     if(!nResID)
76         return rtl::OUString();
77 
78     XubString aStr(ImpGetResStr(nResID));
79 	XubString aName(rObjectName);
80 	aStr.SearchAndReplaceAscii("%1", aName);
81     return rtl::OUString(aStr);
82 }
83