summaryrefslogtreecommitdiff
path: root/include/svx/sxekitm.hxx
blob: 2c302a3397e0f0623f4faca3f046cfc52f97ce20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */
#ifndef INCLUDED_SVX_SXEKITM_HXX
#define INCLUDED_SVX_SXEKITM_HXX

#include <svl/eitem.hxx>
#include <svx/svddef.hxx>
#include <svx/svxdllapi.h>

enum class SdrEdgeKind
{
    OrthoLines, ThreeLines, OneLine, Bezier, Arc
};



class SVX_DLLPUBLIC SdrEdgeKindItem: public SfxEnumItem<SdrEdgeKind> {
public:
    SdrEdgeKindItem(SdrEdgeKind eStyle=SdrEdgeKind::OrthoLines): SfxEnumItem(SDRATTR_EDGEKIND, eStyle) {}
    virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
    virtual sal_uInt16   GetValueCount() const override; // { return 5; }
    virtual bool         QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
    virtual bool         PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
    static OUString      GetValueTextByPos(sal_uInt16 nPos);
    virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
};

#endif

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
7ab7a2a02e6e6d0f9987c84. Change-Id: Iaa706bb4ea3144ef57ab359b982400abc589b97e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90454 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-02-22Factor out FillEListWithOneFormat_Impl()Eike Rathke ... from almost identical FillEListWithFormats_Impl(). Change-Id: Id0443b40a2acfdfee24426fa0672f711889f3e2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89286 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins 2020-02-22Resolves: tdf#130563 Add predefined 4-digit year date+time formatEike Rathke Add a predefined NF_DATETIME_SYS_DDMMYYYY_HHMM format code with formatindex="50" to all locale data files, which shifts all reserved area internally generated built-in formats up by one. Reserved area was filled already so that boundary has to be increased as well. Add some flexibility for future additions by setting the new boundary to 65, free first format index to be used by additional locale data formats is 66 now. Adapt all locales to the new boundary. The existing predefined NF_DATETIME_SYSTEM_SHORT_HHMM format code with formatindex="46" mostly was and is used with 2-digit years (stemming back from the old binary format and Excel compatibility), some locales that don't use 2-digit years at all already defined it to 4-digit years. Keep those but move the default="true" attribute (if so) to the new "50" format. Modify populating the format list such that resulting duplicates will be suppressed there as well. Also try to match the new format in ODF import if a long year was requested with date+time. Finally set the new format as default for all *_IT locales. In future changing the default date+time format to 4-digit year is just a matter of moving the default="true" attribute to the new format. Change-Id: Ib16aa9fda0e71b2d03f78e3dd013785de03cd288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89265 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins 2019-09-03loplugin:constmethod in svxNoel Grandin Change-Id: I6ae7c04479e3ea8ecd7535c33224a5e7095b64bb Reviewed-on: https://gerrit.libreoffice.org/78396 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2019-05-22tdf#42949 Fix IWYU warnings in include/svx/[h-r]*Gabor Kelemen Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib7e1d0f7483aa8b5cab320278714f2d5f36fdbd9 Reviewed-on: https://gerrit.libreoffice.org/72534 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 2019-01-16Resolves: tdf#122509 we have a second list with generated currency formatsEike Rathke ... which kicks in if SvxNumberFormatShell::FindEntry() determined a format index of NUMBERFORMAT_ENTRY_NEW_CURRENCY instead of a real existing index. Regression from commit e607f1da329a2d4dd91904053d7ff86ac05c77bf CommitDate: Thu Oct 4 15:02:13 2018 +0200 Select the current format if multiple instead of first matching format code The old (now removed as unused) SvxNumberFormatShell::GetListPos4Entry(const OUString&) used before took care of that, add the functionality back but combine into the existing GetListPos4Entry() function, the additional FindEntry() call wasn't necessary anyway because it was just called before in the caller. The actual crash happened elsewhere in SvNumberFormatter::GenerateFormat() because no format exists for the then determined entry, which should be changed independently to prevent such abuses. Change-Id: Id42efa152693119fbde82b234f367679f818cfab Reviewed-on: https://gerrit.libreoffice.org/66472 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins 2018-10-09loplugin:unusedmethodsNoel Grandin Change-Id: Icd7a0f9909f36363b307b4fe7ee920183881afbb Reviewed-on: https://gerrit.libreoffice.org/61576 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-10-08loplugin:constfields in svxNoel Grandin Change-Id: I643e8686e015ca85dd96221f1c93038f4fddf27b Reviewed-on: https://gerrit.libreoffice.org/61182 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-10-03Related: tdf#119613 tdf#118127 suppress duplicated builtins, rework All catEike Rathke In number formatter dialog: Some locales may define duplicated formats, specifically date formats, for all builtin formats <50 must be present and default formats may be equal to other formats. Try to suppress duplicated formats, preferring those that are essential (i.e. used as current, default or edit formats). This is done only per category, not in the All category. Example is [en-ZA] English (South Africa) that now has ISO 8601 also as default date+time format, though there only the date+time format is suppressed because for date we want to keep both the locale's default and the fixed ISO format pickable. The All category still listed the since long deprecated old currency formats including the worrying CCC format that follows the current default currency. Eliminate that crap, unless one matches the current format. Also, additional formats defined in locale data and user defined formats were never listed in the All category, do that. Change-Id: I6e6b9bfecc34d51e89930f348f7afbe5e3c41738 Reviewed-on: https://gerrit.libreoffice.org/61275 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>