LibreOffice Module editeng (master) 1
optitems.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <editeng/optitems.hxx>
21#include <editeng/eerdll.hxx>
22#include <editeng/editrids.hrc>
23
24
25// class SfxHyphenRegionItem -----------------------------------------------
26
28
30{
31 nMinLead = nMinTrail = 0;
32}
33
35{
36 assert(SfxPoolItem::operator==(rAttr));
37
38 return ( ( static_cast<const SfxHyphenRegionItem&>( rAttr ).nMinLead == nMinLead ) &&
39 ( static_cast<const SfxHyphenRegionItem&>( rAttr ).nMinTrail == nMinTrail ) );
40}
41
43{
44 return new SfxHyphenRegionItem( *this );
45}
46
48(
49 SfxItemPresentation /*ePres*/,
50 MapUnit ,
51 MapUnit ,
52 OUString& rText,
53 const IntlWrapper&
54) const
55{
56 rText += EditResId(RID_SVXITEMS_HYPHEN_MINLEAD).replaceAll("%1", OUString::number(nMinLead)) +
57 "," +
58 EditResId(RID_SVXITEMS_HYPHEN_MINTRAIL).replaceAll("%1", OUString::number(nMinTrail));
59 return true;
60}
61
62
63/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt8 nMinTrail
Definition: optitems.hxx:31
sal_uInt8 nMinLead
Definition: optitems.hxx:30
SfxHyphenRegionItem(const sal_uInt16 nId)
Definition: optitems.cxx:27
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString &rText, const IntlWrapper &) const override
Definition: optitems.cxx:48
virtual SfxHyphenRegionItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: optitems.cxx:42
virtual bool operator==(const SfxPoolItem &) const override
Definition: optitems.cxx:34
OUString EditResId(TranslateId aId)
Definition: eerdll.cxx:192
MapUnit
sal_Int16 nId
SfxItemPresentation