20#include <overlayobject.hxx>
37#define HINT_LINESPACE 2
42 : OverlayObject(rColor)
43 , m_aTitle(
std::move(aTit))
45 , m_aTextFont(
std::move(aFont))
75 double nTextOffsetY = nTop + aHintMargin.
Height() + aFontMetric.
GetAscent();
76 Point aTextPos(nLeft + aHintMargin.
Width() , nTextOffsetY);
81 aTextPos.
X(), aTextPos.
Y()));
86 std::vector<double>(), {}, std::move(aFontAttr), css::lang::Locale(),
93 rRange.
expand(pTitle->getB2DRange(aDummy));
106 Point aLineStart = aTextStart;
107 sal_Int32 nLineCount = 0;
111 if (aLine.getLength() > 255)
114 SAL_WARN(
"sc",
"ridiculously long line, truncating, len=" << aLine.getLength());
115 aLine = aLine.copy(0,255);
120 aLineStart.
X(), aLineStart.
Y() + nTextOffsetY);
125 aTextMatrix, aLine, 0, aLine.getLength(),
126 std::vector<double>(), {}, aFontAttr, css::lang::Locale(),
129 rRange.
expand(pMessage->getB2DRange(aDummy));
131 aSeq.push_back(pMessage);
133 aLineStart.
AdjustY(nLineHeight );
138 SAL_WARN(
"sc",
"ridiculously long message, bailing out");
154 std::move(aPoly), aBorderColor));
const StyleSettings & GetStyleSettings() const
static OutputDevice * GetDefaultDevice()
static const AllSettings & GetSettings()
basegfx::BColor getBColor() const
tools::Long GetLineHeight() const
tools::Long GetAscent() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
FontMetric GetFontMetric() const
const MapMode & GetMapMode() const
constexpr tools::Long Y() const
tools::Long AdjustY(tools::Long nVertMove)
constexpr tools::Long X() const
void SetPos(const Point &rPos, const MapMode &rMode)
Size GetSizePixel() const
virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override
const OUString m_aMessage
ScOverlayHint(OUString aTit, const OUString &rMsg, const Color &rColor, vcl::Font aFont)
drawinglayer::primitive2d::Primitive2DContainer createOverlaySequence(sal_Int32 nLeft, sal_Int32 nTop, const MapMode &rMapMode, basegfx::B2DRange &rRange) const
const vcl::Font m_aTextFont
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Color & GetLabelTextColor() const
void expand(const Tuple2D< TYPE > &rTuple)
const Color & getBaseColor() const
void SetFontSize(const Size &)
void SetWeight(FontWeight)
const Size & GetFontSize() const
TOOLS_DLLPUBLIC OString convertLineEnd(const OString &rIn, LineEnd eLineEnd)
Sequence< sal_Int8 > aSeq
#define SAL_WARN(area, stream)
B2DHomMatrix createScaleTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fTranslateX, double fTranslateY)
B2DPolygon createPolygonFromRect(const B2DRectangle &rRect, double fRadiusX, double fRadiusY)
attribute::FontAttribute getFontAttributeFromVclFont(basegfx::B2DVector &o_rSize, const vcl::Font &rFont, bool bRTL, bool bBiDiStrong)