update dev300-m58
[ooovba.git] / svx / source / dialog / swframeposstrings.cxx
blob1b1b40fc057fc060480cff0d484252609fbc2221
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: swframeposstrings.cxx,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
33 #include <swframeposstrings.hxx>
34 #include <tools/rc.hxx>
35 #include <tools/debug.hxx>
36 #include <svx/dialmgr.hxx>
37 #include <svx/dialogs.hrc>
39 class SvxSwFramePosString_Impl : public Resource
41 friend class SvxSwFramePosString;
42 String aStrings[SvxSwFramePosString::STR_MAX];
43 public:
44 SvxSwFramePosString_Impl();
45 };
46 SvxSwFramePosString_Impl::SvxSwFramePosString_Impl() :
47 Resource(SVX_RES(RID_SVXSW_FRAMEPOSITIONS))
49 for(USHORT i = 0; i < SvxSwFramePosString::STR_MAX; i++)
51 //string ids have to start at 1
52 aStrings[i] = String(SVX_RES(i + 1));
54 FreeResource();
56 /*-- 04.03.2004 13:14:48---------------------------------------------------
58 -----------------------------------------------------------------------*/
59 SvxSwFramePosString::SvxSwFramePosString() :
60 pImpl(new SvxSwFramePosString_Impl)
63 /*-- 04.03.2004 13:14:48---------------------------------------------------
65 -----------------------------------------------------------------------*/
66 SvxSwFramePosString::~SvxSwFramePosString()
68 delete pImpl;
70 /*-- 04.03.2004 13:14:48---------------------------------------------------
72 -----------------------------------------------------------------------*/
73 const String& SvxSwFramePosString::GetString(StringId eId)
75 DBG_ASSERT(eId >= 0 && eId < STR_MAX, "invalid StringId");
76 if(!(eId >= 0 && eId < STR_MAX))
77 eId = LEFT;
78 return pImpl->aStrings[eId];