LibreOffice Module vcl (master) 1
graph.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 <tools/fract.hxx>
21#include <vcl/outdev.hxx>
22#include <vcl/svapp.hxx>
23#include <vcl/graph.hxx>
24#include <vcl/image.hxx>
25#include <impgraph.hxx>
26#include <com/sun/star/graphic/XGraphic.hpp>
30
31using namespace ::com::sun::star;
32
33namespace
34{
35
36void ImplDrawDefault(OutputDevice& rOutDev, const OUString* pText,
37 vcl::Font* pFont, const BitmapEx* pBitmapEx,
38 const Point& rDestPt, const Size& rDestSize)
39{
40 sal_uInt16 nPixel = static_cast<sal_uInt16>(rOutDev.PixelToLogic( Size( 1, 1 ) ).Width());
41 sal_uInt16 nPixelWidth = nPixel;
42 Point aPoint( rDestPt.X() + nPixelWidth, rDestPt.Y() + nPixelWidth );
43 Size aSize( rDestSize.Width() - ( nPixelWidth << 1 ), rDestSize.Height() - ( nPixelWidth << 1 ) );
44 bool bFilled = ( pBitmapEx != nullptr || pFont != nullptr );
45 tools::Rectangle aBorderRect( aPoint, aSize );
46
47 rOutDev.Push();
48
49 rOutDev.SetFillColor();
50
51 // On the printer a black rectangle and on the screen one with 3D effect
52 rOutDev.DrawBorder(aBorderRect);
53
54 aPoint.AdjustX(nPixelWidth + 2*nPixel );
55 aPoint.AdjustY(nPixelWidth + 2*nPixel );
56 aSize.AdjustWidth( -(2*nPixelWidth + 4*nPixel) );
57 aSize.AdjustHeight( -(2*nPixelWidth + 4*nPixel) );
58
59 if( !aSize.IsEmpty() && pBitmapEx && !pBitmapEx->IsEmpty() )
60 {
61 Size aBitmapSize( rOutDev.PixelToLogic( pBitmapEx->GetSizePixel() ) );
62
63 if( aSize.Height() > aBitmapSize.Height() && aSize.Width() > aBitmapSize.Width() )
64 {
65 rOutDev.DrawBitmapEx( aPoint, *pBitmapEx );
66 aPoint.AdjustX(aBitmapSize.Width() + 2*nPixel );
67 aSize.AdjustWidth( -(aBitmapSize.Width() + 2*nPixel) );
68 }
69 }
70
71 if ( !aSize.IsEmpty() && pFont && pText && pText->getLength() && rOutDev.IsOutputEnabled() )
72 {
73 MapMode aMapMode( MapUnit::MapPoint );
74 Size aSz = rOutDev.LogicToLogic( Size( 0, 12 ), &aMapMode, nullptr );
75 tools::Long nThreshold = aSz.Height() / 2;
76 tools::Long nStep = nThreshold / 3;
77
78 if ( !nStep )
79 nStep = aSz.Height() - nThreshold;
80
81 for(;; aSz.AdjustHeight( -nStep ) )
82 {
83 pFont->SetFontSize( aSz );
84 rOutDev.SetFont( *pFont );
85
86 tools::Long nTextHeight = rOutDev.GetTextHeight();
87 tools::Long nTextWidth = rOutDev.GetTextWidth( *pText );
88 if ( nTextHeight )
89 {
90 // The approximation does not respect imprecisions caused
91 // by word wraps
92 tools::Long nLines = aSize.Height() / nTextHeight;
93 tools::Long nWidth = aSize.Width() * nLines; // Approximation!!!
94
95 if ( nTextWidth <= nWidth || aSz.Height() <= nThreshold )
96 {
97 sal_Int32 nStart = 0;
98 sal_Int32 nLen = 0;
99
100 while( nStart < pText->getLength() && (*pText)[nStart] == ' ' )
101 nStart++;
102 while( nStart+nLen < pText->getLength() && (*pText)[nStart+nLen] != ' ' )
103 nLen++;
104 while( nStart < pText->getLength() && nLines-- )
105 {
106 sal_Int32 nNext = nLen;
107 do
108 {
109 while ( nStart+nNext < pText->getLength() && (*pText)[nStart+nNext] == ' ' )
110 nNext++;
111 while ( nStart+nNext < pText->getLength() && (*pText)[nStart+nNext] != ' ' )
112 nNext++;
113 nTextWidth = rOutDev.GetTextWidth( *pText, nStart, nNext );
114 if ( nTextWidth > aSize.Width() )
115 break;
116 nLen = nNext;
117 }
118 while ( nStart+nNext < pText->getLength() );
119
120 sal_Int32 n = nLen;
121 nTextWidth = rOutDev.GetTextWidth( *pText, nStart, n );
122 while( nTextWidth > aSize.Width() )
123 nTextWidth = rOutDev.GetTextWidth( *pText, nStart, --n );
124 rOutDev.DrawText( aPoint, *pText, nStart, n );
125
126 aPoint.AdjustY(nTextHeight );
127 nStart = sal::static_int_cast<sal_uInt16>(nStart + nLen);
128 nLen = nNext-nLen;
129 while( nStart < pText->getLength() && (*pText)[nStart] == ' ' )
130 {
131 nStart++;
132 nLen--;
133 }
134 }
135 break;
136 }
137 }
138 else
139 break;
140 }
141 }
142
143 // If the default graphic does not have content, we draw a red rectangle
144 if( !bFilled )
145 {
146 aBorderRect.AdjustLeft( 1 );
147 aBorderRect.AdjustTop( 1 );
148 aBorderRect.AdjustRight( -1 );
149 aBorderRect.AdjustBottom( -1 );
150
151 rOutDev.SetLineColor( COL_LIGHTRED );
152 rOutDev.DrawLine( aBorderRect.TopLeft(), aBorderRect.BottomRight() );
153 rOutDev.DrawLine( aBorderRect.TopRight(), aBorderRect.BottomLeft() );
154 }
155
156 rOutDev.Pop();
157}
158
159} // end anonymous namespace
160
162 : mxImpGraphic(vcl::graphic::Manager::get().newInstance())
163{
164}
165
166Graphic::Graphic(const Graphic& rGraphic)
167{
168 if( rGraphic.IsAnimated() )
170 else
171 mxImpGraphic = rGraphic.mxImpGraphic;
172}
173
174Graphic::Graphic(Graphic&& rGraphic) noexcept
175 : mxImpGraphic(std::move(rGraphic.mxImpGraphic))
176{
177}
178
179Graphic::Graphic(std::shared_ptr<GfxLink> const & rGfxLink, sal_Int32 nPageIndex)
180 : mxImpGraphic(vcl::graphic::Manager::get().newInstance(rGfxLink, nPageIndex))
181{
182}
183
184Graphic::Graphic(GraphicExternalLink const & rGraphicExternalLink)
185 : mxImpGraphic(vcl::graphic::Manager::get().newInstance(rGraphicExternalLink))
186{
187}
188
190 : mxImpGraphic(vcl::graphic::Manager::get().newInstance(rBmpEx))
191{
192}
193
194// We use XGraphic for passing toolbar images across app UNO aps
195// and we need to be able to see and preserve 'stock' images too.
197 // FIXME: should really defer the BitmapEx load.
198 : mxImpGraphic(std::make_shared<ImpGraphic>(rImage.GetBitmapEx()))
199{
200 OUString aStock = rImage.GetStock();
201 if (aStock.getLength())
202 mxImpGraphic->setOriginURL("private:graphicrepository/" + aStock);
203}
204
205Graphic::Graphic(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr)
206 : mxImpGraphic(vcl::graphic::Manager::get().newInstance(rVectorGraphicDataPtr))
207{
208}
209
210Graphic::Graphic(const Animation& rAnimation)
211 : mxImpGraphic(vcl::graphic::Manager::get().newInstance(rAnimation))
212{
213}
214
216 : mxImpGraphic(vcl::graphic::Manager::get().newInstance(rMtf))
217{
218}
219
220Graphic::Graphic( const css::uno::Reference< css::graphic::XGraphic >& rxGraphic )
221{
222 const ::unographic::Graphic* pUnoGraphic = dynamic_cast<::unographic::Graphic*>(rxGraphic.get());
223 const ::Graphic* pGraphic = pUnoGraphic ? &pUnoGraphic->GetGraphic() : nullptr;
224
225 if( pGraphic )
226 {
227 if (pGraphic->IsAnimated())
228 mxImpGraphic = vcl::graphic::Manager::get().copy(pGraphic->mxImpGraphic);
229 else
230 mxImpGraphic = pGraphic->mxImpGraphic;
231 }
232 else
234}
235
237{
238 if (mxImpGraphic.use_count() > 1)
239 {
241 }
242}
243
245{
246 return mxImpGraphic->isAvailable();
247}
248
250{
251 return mxImpGraphic->makeAvailable();
252}
253
255{
256 if( &rGraphic != this )
257 {
258 if( rGraphic.IsAnimated() )
260 else
261 mxImpGraphic = rGraphic.mxImpGraphic;
262 }
263
264 return *this;
265}
266
267Graphic& Graphic::operator=(Graphic&& rGraphic) noexcept
268{
269 mxImpGraphic = std::move(rGraphic.mxImpGraphic);
270 return *this;
271}
272
273bool Graphic::operator==( const Graphic& rGraphic ) const
274{
275 return (*mxImpGraphic == *rGraphic.mxImpGraphic);
276}
277
278bool Graphic::operator!=( const Graphic& rGraphic ) const
279{
280 return (*mxImpGraphic != *rGraphic.mxImpGraphic);
281}
282
283bool Graphic::IsNone() const
284{
285 return GraphicType::NONE == mxImpGraphic->getType();
286}
287
289{
291 mxImpGraphic->clear();
292}
293
295{
296 return mxImpGraphic->getType();
297}
298
300{
302 mxImpGraphic->setDefaultType();
303}
304
306{
307 return mxImpGraphic->isSupportedGraphic();
308}
309
311{
312 return mxImpGraphic->isTransparent();
313}
314
316{
317 return mxImpGraphic->isAlpha();
318}
319
321{
322 return mxImpGraphic->isAnimated();
323}
324
325bool Graphic::IsEPS() const
326{
327 return mxImpGraphic->isEPS();
328}
329
331{
332 return mxImpGraphic->getBitmapEx(rParameters);
333}
334
336{
337 return mxImpGraphic->getAnimation();
338}
339
341{
342 return mxImpGraphic->getGDIMetaFile();
343}
344
346{
347 return mxImpGraphic->getBitmapExRef();
348}
349
350uno::Reference<css::graphic::XGraphic> Graphic::GetXGraphic() const
351{
352 uno::Reference<css::graphic::XGraphic> xGraphic;
353
354 if (GetType() != GraphicType::NONE)
355 {
357 pUnoGraphic->init(*this);
358 xGraphic = pUnoGraphic;
359 }
360
361 return xGraphic;
362}
363
365{
366 return mxImpGraphic->getPrefSize();
367}
368
369void Graphic::SetPrefSize( const Size& rPrefSize )
370{
372 mxImpGraphic->setPrefSize( rPrefSize );
373}
374
376{
377 return mxImpGraphic->getPrefMapMode();
378}
379
380void Graphic::SetPrefMapMode( const MapMode& rPrefMapMode )
381{
383 mxImpGraphic->setPrefMapMode( rPrefMapMode );
384}
385
387{
388 double nGrfDPIx;
389 double nGrfDPIy;
390
391 const MapMode aGrfMap(GetPrefMapMode());
392 const Size aGrfPixelSize(GetSizePixel());
393 const Size aGrfPrefMapModeSize(GetPrefSize());
394 if (aGrfMap.GetMapUnit() == MapUnit::MapInch)
395 {
396 nGrfDPIx = aGrfPixelSize.Width() / ( static_cast<double>(aGrfMap.GetScaleX()) * aGrfPrefMapModeSize.Width() );
397 nGrfDPIy = aGrfPixelSize.Height() / ( static_cast<double>(aGrfMap.GetScaleY()) * aGrfPrefMapModeSize.Height() );
398 }
399 else
400 {
401 const Size aGrf1000thInchSize = OutputDevice::LogicToLogic(
402 aGrfPrefMapModeSize, aGrfMap, MapMode(MapUnit::Map1000thInch));
403 nGrfDPIx = aGrf1000thInchSize.Width() == 0
404 ? 0.0 : 1000.0 * aGrfPixelSize.Width() / aGrf1000thInchSize.Width();
405 nGrfDPIy = aGrf1000thInchSize.Height() == 0
406 ? 0.0 : 1000.0 * aGrfPixelSize.Height() / aGrf1000thInchSize.Height();
407 }
408
409 return basegfx::B2DSize(nGrfDPIx, nGrfDPIy);
410}
411
412Size Graphic::GetSizePixel( const OutputDevice* pRefDevice ) const
413{
414 Size aRet;
415
416 if( GraphicType::Bitmap == mxImpGraphic->getType() )
417 aRet = mxImpGraphic->getSizePixel();
418 else
419 aRet = ( pRefDevice ? pRefDevice : Application::GetDefaultDevice() )->LogicToPixel( GetPrefSize(), GetPrefMapMode() );
420
421 return aRet;
422}
423
425{
426 return mxImpGraphic->getSizeBytes();
427}
428
429void Graphic::Draw(OutputDevice& rOutDev, const Point& rDestPt) const
430{
431 mxImpGraphic->draw(rOutDev, rDestPt);
432}
433
434void Graphic::Draw(OutputDevice& rOutDev, const Point& rDestPt,
435 const Size& rDestSz) const
436{
437 if( GraphicType::Default == mxImpGraphic->getType() )
438 ImplDrawDefault(rOutDev, nullptr, nullptr, nullptr, rDestPt, rDestSz);
439 else
440 mxImpGraphic->draw(rOutDev, rDestPt, rDestSz);
441}
442
443void Graphic::DrawEx(OutputDevice& rOutDev, const OUString& rText,
444 vcl::Font& rFont, const BitmapEx& rBitmap,
445 const Point& rDestPt, const Size& rDestSz)
446{
447 ImplDrawDefault(rOutDev, &rText, &rFont, &rBitmap, rDestPt, rDestSz);
448}
449
450void Graphic::StartAnimation(OutputDevice& rOutDev, const Point& rDestPt,
451 const Size& rDestSz, tools::Long nRendererId,
452 OutputDevice* pFirstFrameOutDev)
453{
455 mxImpGraphic->startAnimation(rOutDev, rDestPt, rDestSz, nRendererId, pFirstFrameOutDev);
456}
457
458void Graphic::StopAnimation( const OutputDevice* pOutDev, tools::Long nRendererId )
459{
461 mxImpGraphic->stopAnimation( pOutDev, nRendererId );
462}
463
465{
466 mxImpGraphic->setAnimationNotifyHdl( rLink );
467}
468
470{
471 return mxImpGraphic->getAnimationNotifyHdl();
472}
473
475{
476 return mxImpGraphic->getAnimationLoopCount();
477}
478
479std::shared_ptr<GraphicReader>& Graphic::GetReaderContext()
480{
481 return mxImpGraphic->getContext();
482}
483
484void Graphic::SetReaderContext( const std::shared_ptr<GraphicReader> &pReader )
485{
486 mxImpGraphic->setContext( pReader );
487}
488
489void Graphic::SetDummyContext( bool value )
490{
491 mxImpGraphic->setDummyContext( value );
492}
493
495{
496 return mxImpGraphic->isDummyContext();
497}
498
499void Graphic::SetGfxLink( const std::shared_ptr<GfxLink>& rGfxLink )
500{
502 mxImpGraphic->setGfxLink(rGfxLink);
503}
504
505const std::shared_ptr<GfxLink> & Graphic::GetSharedGfxLink() const
506{
507 return mxImpGraphic->getSharedGfxLink();
508}
509
511{
512 return mxImpGraphic->getGfxLink();
513}
514
516{
517 return mxImpGraphic->isGfxLink();
518}
519
521{
522 return mxImpGraphic->getChecksum();
523}
524
525const std::shared_ptr<VectorGraphicData>& Graphic::getVectorGraphicData() const
526{
527 return mxImpGraphic->getVectorGraphicData();
528}
529
530sal_Int32 Graphic::getPageNumber() const
531{
532 return mxImpGraphic->getPageNumber();
533}
534
535OUString Graphic::getOriginURL() const
536{
537 if (mxImpGraphic)
538 {
539 return mxImpGraphic->getOriginURL();
540 }
541 return OUString();
542}
543
544void Graphic::setOriginURL(OUString const & rOriginURL)
545{
546 if (mxImpGraphic)
547 {
548 mxImpGraphic->setOriginURL(rOriginURL);
549 }
550}
551
552OString Graphic::getUniqueID() const
553{
554 OString aUniqueString;
555 if (mxImpGraphic)
556 aUniqueString = mxImpGraphic->getUniqueID();
557 return aUniqueString;
558}
559
560/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt64 BitmapChecksum
Definition: checksum.hxx:30
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
Definition: svapp.cxx:1043
bool IsEmpty() const
Definition: BitmapEx.cxx:186
const Size & GetSizePixel() const
Definition: bitmapex.hxx:73
void StopAnimation(const OutputDevice *pOutputDevice, tools::Long nExtraData)
Definition: graph.cxx:458
sal_uLong GetSizeBytes() const
Definition: graph.cxx:424
bool isAvailable() const
Definition: graph.cxx:244
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
Definition: graph.cxx:350
Size GetPrefSize() const
Definition: graph.cxx:364
bool makeAvailable()
Definition: graph.cxx:249
SAL_DLLPRIVATE void ImplTestRefCount()
Definition: graph.cxx:236
void SetAnimationNotifyHdl(const Link< Animation *, void > &rLink)
Definition: graph.cxx:464
basegfx::B2DSize GetPPI() const
Definition: graph.cxx:386
std::shared_ptr< ImpGraphic > mxImpGraphic
Definition: graph.hxx:85
OString getUniqueID() const
Definition: graph.cxx:552
Animation GetAnimation() const
Definition: graph.cxx:335
OUString getOriginURL() const
Definition: graph.cxx:535
void SetPrefMapMode(const MapMode &rPrefMapMode)
Definition: graph.cxx:380
void SetDummyContext(bool value)
Definition: graph.cxx:489
Graphic & operator=(const Graphic &rGraphic)
Definition: graph.cxx:254
bool IsSupportedGraphic() const
Definition: graph.cxx:305
const std::shared_ptr< GfxLink > & GetSharedGfxLink() const
Definition: graph.cxx:505
void SetReaderContext(const std::shared_ptr< GraphicReader > &pReader)
Definition: graph.cxx:484
sal_uInt32 GetAnimationLoopCount() const
Definition: graph.cxx:474
const GDIMetaFile & GetGDIMetaFile() const
Definition: graph.cxx:340
bool IsDummyContext() const
Definition: graph.cxx:494
GraphicType GetType() const
Definition: graph.cxx:294
void SetGfxLink(const std::shared_ptr< GfxLink > &rGfxLink)
Definition: graph.cxx:499
GfxLink GetGfxLink() const
Definition: graph.cxx:510
sal_Int32 getPageNumber() const
Get the page number of the multi-page source this Graphic is rendered from.
Definition: graph.cxx:530
bool IsAnimated() const
Definition: graph.cxx:320
BitmapChecksum GetChecksum() const
Definition: graph.cxx:520
bool IsNone() const
Definition: graph.cxx:283
const BitmapEx & GetBitmapExRef() const
Gives direct access to the contained BitmapEx.
Definition: graph.cxx:345
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
Definition: graph.cxx:330
MapMode GetPrefMapMode() const
Definition: graph.cxx:375
void Clear()
Definition: graph.cxx:288
Size GetSizePixel(const OutputDevice *pRefDevice=nullptr) const
Definition: graph.cxx:412
void Draw(OutputDevice &rOutDev, const Point &rDestPt) const
Definition: graph.cxx:429
void StartAnimation(OutputDevice &rOutDev, const Point &rDestPt, const Size &rDestSize, tools::Long nExtraData=0, OutputDevice *pFirstFrameOutDev=nullptr)
Definition: graph.cxx:450
bool IsEPS() const
Definition: graph.cxx:325
Link< Animation *, void > GetAnimationNotifyHdl() const
Definition: graph.cxx:469
Graphic()
Definition: graph.cxx:161
bool IsGfxLink() const
Definition: graph.cxx:515
std::shared_ptr< GraphicReader > & GetReaderContext()
Definition: graph.cxx:479
void SetPrefSize(const Size &rPrefSize)
Definition: graph.cxx:369
bool IsAlpha() const
Definition: graph.cxx:315
const std::shared_ptr< VectorGraphicData > & getVectorGraphicData() const
Definition: graph.cxx:525
static void DrawEx(OutputDevice &rOutDev, const OUString &rText, vcl::Font &rFont, const BitmapEx &rBitmap, const Point &rDestPt, const Size &rDestSize)
Definition: graph.cxx:443
void SetDefaultType()
Definition: graph.cxx:299
bool IsTransparent() const
Definition: graph.cxx:310
bool operator!=(const Graphic &rGraphic) const
Definition: graph.cxx:278
bool operator==(const Graphic &rGraphic) const
Definition: graph.cxx:273
void setOriginURL(OUString const &rOriginURL)
Definition: graph.cxx:544
Definition: image.hxx:40
OUString GetStock() const
Definition: Image.cxx:81
const Fraction & GetScaleX() const
Definition: mapmod.cxx:185
MapUnit GetMapUnit() const
Definition: mapmod.cxx:181
const Fraction & GetScaleY() const
Definition: mapmod.cxx:187
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:170
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
Definition: bitmapex.cxx:33
virtual void DrawBorder(tools::Rectangle aBorderRect)
Definition: rect.cxx:31
void SetFont(const vcl::Font &rNewFont)
Definition: outdev/font.cxx:56
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1110
void DrawLine(const Point &rStartPt, const Point &rEndPt)
Definition: line.cxx:161
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
Definition: map.cxx:1580
void SetLineColor()
Definition: line.cxx:37
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
Definition: text.cxx:886
void SetFillColor()
Definition: fill.cxx:29
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
Definition: stack.cxx:32
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Definition: text.cxx:897
void Pop()
Definition: stack.cxx:91
bool IsOutputEnabled() const
Definition: outdev.hxx:480
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
Definition: text.cxx:797
constexpr tools::Long Y() const
constexpr tools::Long X() const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
constexpr tools::Long Width() const
const ::Graphic & GetGraphic() const
Definition: UnoGraphic.hxx:45
void SetFontSize(const Size &)
Definition: font/font.cxx:149
std::shared_ptr< ImpGraphic > newInstance()
Definition: Manager.cxx:239
std::shared_ptr< ImpGraphic > copy(std::shared_ptr< ImpGraphic > const &pImpGraphic)
Definition: Manager.cxx:232
static Manager & get()
Definition: Manager.cxx:54
Any value
GraphicType
Definition: graph.hxx:35
sal_Int64 n
double getLength(const B2DPolygon &rCandidate)
std::shared_ptr< T > make_shared(Args &&... args)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
long Long
BitmapEx GetBitmapEx(BitmapEx const &rBitmapEx, DrawModeFlags nDrawMode)
Definition: drawmode.cxx:242
sal_uIntPtr sal_uLong
#define nPixel