| 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 |
#pragma once |
| 21 |
|
| 22 |
#include <sal/types.h> |
| 23 |
#include <svx/svxdllapi.h> |
| 24 |
|
| 25 |
|
| 26 |
// predefines |
| 27 |
class SfxItemSet; |
| 28 |
class SdrText; |
| 29 |
|
| 30 |
namespace drawinglayer::attribute { |
| 31 |
class SdrLineAttribute; |
| 32 |
class SdrLineStartEndAttribute; |
| 33 |
class SdrShadowAttribute; |
| 34 |
class SdrFillAttribute; |
| 35 |
class SdrTextAttribute; |
| 36 |
class FillGradientAttribute; |
| 37 |
class SdrFillGraphicAttribute; |
| 38 |
class SdrEffectsTextAttribute; |
| 39 |
class SdrLineEffectsTextAttribute; |
| 40 |
class SdrLineFillEffectsTextAttribute; |
| 41 |
class SdrLineFillShadowAttribute3D; |
| 42 |
class SdrSceneAttribute; |
| 43 |
class SdrLightingAttribute; |
| 44 |
class SdrFillTextAttribute; |
| 45 |
} |
| 46 |
|
| 47 |
namespace basegfx { |
| 48 |
class B2DRange; |
| 49 |
} |
| 50 |
|
| 51 |
|
| 52 |
namespace drawinglayer::primitive2d |
| 53 |
{ |
| 54 |
// SdrAttribute creators |
| 55 |
attribute::SdrLineAttribute SVXCORE_DLLPUBLIC createNewSdrLineAttribute( |
| 56 |
const SfxItemSet& rSet); |
| 57 |
|
| 58 |
attribute::SdrLineStartEndAttribute SVXCORE_DLLPUBLIC createNewSdrLineStartEndAttribute( |
| 59 |
const SfxItemSet& rSet, |
| 60 |
double fWidth); |
| 61 |
|
| 62 |
attribute::SdrShadowAttribute createNewSdrShadowAttribute( |
| 63 |
const SfxItemSet& rSet); |
| 64 |
|
| 65 |
attribute::SdrFillAttribute SVXCORE_DLLPUBLIC createNewSdrFillAttribute( |
| 66 |
const SfxItemSet& rSet); |
| 67 |
|
| 68 |
// #i101508# Support handing over given text-to-border distances |
| 69 |
attribute::SdrTextAttribute createNewSdrTextAttribute( |
| 70 |
const SfxItemSet& rSet, |
| 71 |
const SdrText& rText, |
| 72 |
const sal_Int32* pLeft = nullptr, |
| 73 |
const sal_Int32* pUpper = nullptr, |
| 74 |
const sal_Int32* pRight = nullptr, |
| 75 |
const sal_Int32* pLower = nullptr); |
| 76 |
|
| 77 |
attribute::FillGradientAttribute SVXCORE_DLLPUBLIC createNewTransparenceGradientAttribute( |
| 78 |
const SfxItemSet& rSet); |
| 79 |
|
| 80 |
attribute::SdrFillGraphicAttribute createNewSdrFillGraphicAttribute( |
| 81 |
const SfxItemSet& rSet); |
| 82 |
|
| 83 |
attribute::SdrEffectsTextAttribute createNewSdrEffectsTextAttribute( |
| 84 |
const SfxItemSet& rSet, |
| 85 |
const SdrText* pText, |
| 86 |
bool bSuppressText); // #i98072# added option to suppress text on demand |
| 87 |
|
| 88 |
attribute::SdrLineEffectsTextAttribute createNewSdrLineEffectsTextAttribute( |
| 89 |
const SfxItemSet& rSet, |
| 90 |
const SdrText* pText); |
| 91 |
|
| 92 |
attribute::SdrLineFillEffectsTextAttribute createNewSdrLineFillEffectsTextAttribute( |
| 93 |
const SfxItemSet& rSet, |
| 94 |
const SdrText* pText, |
| 95 |
bool bHasContent, // used from OLE and graphic |
| 96 |
bool bSuppressShadow = false); // used from SC notes |
| 97 |
|
| 98 |
attribute::SdrLineFillShadowAttribute3D createNewSdrLineFillShadowAttribute( |
| 99 |
const SfxItemSet& rSet, |
| 100 |
bool bSuppressFill); |
| 101 |
|
| 102 |
attribute::SdrSceneAttribute createNewSdrSceneAttribute( |
| 103 |
const SfxItemSet& rSet); |
| 104 |
|
| 105 |
attribute::SdrLightingAttribute createNewSdrLightingAttribute( |
| 106 |
const SfxItemSet& rSet); |
| 107 |
|
| 108 |
// #i101508# Support handing over given text-to-border distances |
| 109 |
attribute::SdrFillTextAttribute createNewSdrFillTextAttribute( |
| 110 |
const SfxItemSet& rSet, |
| 111 |
const SdrText* pSdrText, |
| 112 |
const sal_Int32* pLeft = nullptr, |
| 113 |
const sal_Int32* pUpper = nullptr, |
| 114 |
const sal_Int32* pRight = nullptr, |
| 115 |
const sal_Int32* pLower = nullptr); |
| 116 |
|
| 117 |
// helpers |
| 118 |
void calculateRelativeCornerRadius( |
| 119 |
sal_Int32 nRadius, |
| 120 |
const ::basegfx::B2DRange& rObjectRange, |
| 121 |
double& rfCornerRadiusX, |
| 122 |
double& rfCornerRadiusY); |
| 123 |
|
| 124 |
|
| 125 |
} // end of namespace drawinglayer::primitive2d |
| 126 |
|
| 127 |
|
| 128 |
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |