1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_svx.hxx" 26 27 #include "svx/ActionDescriptionProvider.hxx" 28 #include "svx/svdglob.hxx" 29 #include "svx/svdstr.hrc" 30 createDescription(ActionType eActionType,const::rtl::OUString & rObjectName)31::rtl::OUString ActionDescriptionProvider::createDescription( ActionType eActionType 32 , const ::rtl::OUString& rObjectName ) 33 { 34 sal_uInt16 nResID=0; 35 switch( eActionType ) 36 { 37 case INSERT: 38 nResID=STR_UndoInsertObj; 39 break; 40 case DELETE: 41 nResID= STR_EditDelete; 42 break; 43 case CUT: 44 nResID= STR_ExchangeClpCut; 45 break; 46 case MOVE: 47 nResID= STR_EditMove; 48 break; 49 case RESIZE: 50 nResID= STR_EditResize; 51 break; 52 case ROTATE: 53 nResID= STR_EditRotate; 54 break; 55 case TRANSFORM: 56 nResID= STR_EditTransform; 57 break; 58 case FORMAT: 59 nResID= STR_EditSetAttributes; 60 break; 61 case MOVE_TOTOP: 62 nResID= STR_EditMovToTop; 63 break; 64 case MOVE_TOBOTTOM: 65 nResID= STR_EditMovToBtm; 66 break; 67 case POS_SIZE: 68 nResID = STR_EditPosSize; 69 break; 70 } 71 if(!nResID) 72 return rtl::OUString(); 73 74 XubString aStr(ImpGetResStr(nResID)); 75 XubString aName(rObjectName); 76 aStr.SearchAndReplaceAscii("%1", aName); 77 return rtl::OUString(aStr); 78 } 79