1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <svx/postattr.hxx>
21 #include <svx/strings.hrc>
22 #include <svx/dialmgr.hxx>
24 SfxPoolItem
* SvxPostItAuthorItem::CreateDefault() { return new SvxPostItAuthorItem(0); }
25 SfxPoolItem
* SvxPostItDateItem::CreateDefault() { return new SvxPostItDateItem(0); }
26 SfxPoolItem
* SvxPostItTextItem::CreateDefault() { return new SvxPostItTextItem(0); }
27 SfxPoolItem
* SvxPostItIdItem::CreateDefault() { return new SvxPostItIdItem(0); }
29 SvxPostItAuthorItem::SvxPostItAuthorItem( sal_uInt16 _nWhich
)
35 SvxPostItAuthorItem::SvxPostItAuthorItem( const OUString
& rAuthor
,
36 sal_uInt16 _nWhich
) :
37 SfxStringItem( _nWhich
, rAuthor
)
42 bool SvxPostItAuthorItem::GetPresentation
44 SfxItemPresentation ePres
,
45 MapUnit
/*eCoreUnit*/,
46 MapUnit
/*ePresUnit*/,
47 OUString
& rText
, const IntlWrapper
&
52 case SfxItemPresentation::Nameless
:
55 case SfxItemPresentation::Complete
:
56 rText
= SvxResId(RID_SVXITEMS_AUTHOR_COMPLETE
) + GetValue();
58 default: ;//prevent warning
63 SvxPostItAuthorItem
* SvxPostItAuthorItem::Clone( SfxItemPool
* ) const
65 return new SvxPostItAuthorItem( *this );
68 SvxPostItDateItem::SvxPostItDateItem( sal_uInt16 _nWhich
)
74 SvxPostItDateItem::SvxPostItDateItem( const OUString
& rDate
, sal_uInt16 _nWhich
) :
76 SfxStringItem( _nWhich
, rDate
)
81 bool SvxPostItDateItem::GetPresentation
83 SfxItemPresentation ePres
,
84 MapUnit
/*eCoreUnit*/,
85 MapUnit
/*ePresUnit*/,
86 OUString
& rText
, const IntlWrapper
&
91 case SfxItemPresentation::Nameless
:
94 case SfxItemPresentation::Complete
:
95 rText
= SvxResId(RID_SVXITEMS_DATE_COMPLETE
) + GetValue();
97 default: ;//prevent warning
103 SvxPostItDateItem
* SvxPostItDateItem::Clone( SfxItemPool
* ) const
105 return new SvxPostItDateItem( *this );
108 SvxPostItTextItem::SvxPostItTextItem( sal_uInt16 _nWhich
)
113 SvxPostItTextItem::SvxPostItTextItem( const OUString
& rText
, sal_uInt16 _nWhich
) :
115 SfxStringItem( _nWhich
, rText
)
119 bool SvxPostItTextItem::GetPresentation
121 SfxItemPresentation ePres
,
122 MapUnit
/*eCoreUnit*/,
123 MapUnit
/*ePresUnit*/,
124 OUString
& rText
, const IntlWrapper
&
129 case SfxItemPresentation::Nameless
:
132 case SfxItemPresentation::Complete
:
133 rText
= SvxResId(RID_SVXITEMS_TEXT_COMPLETE
) + GetValue();
135 default: ;//prevent warning
140 SvxPostItTextItem
* SvxPostItTextItem::Clone( SfxItemPool
* ) const
142 return new SvxPostItTextItem( *this );
145 SvxPostItIdItem::SvxPostItIdItem( sal_uInt16 _nWhich
)
150 SvxPostItIdItem
* SvxPostItIdItem::Clone( SfxItemPool
* ) const
152 return new SvxPostItIdItem( *this );
155 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */