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>
29 #include <graphic/UnoGraphic.hxx>
31 
32 using namespace ::com::sun::star;
33 
34 namespace
35 {
36 
37 void ImplDrawDefault(OutputDevice& rOutDev, const OUString* pText,
38  vcl::Font* pFont, const BitmapEx* pBitmapEx,
39  const Point& rDestPt, const Size& rDestSize)
40 {
41  sal_uInt16 nPixel = static_cast<sal_uInt16>(rOutDev.PixelToLogic( Size( 1, 1 ) ).Width());
42  sal_uInt16 nPixelWidth = nPixel;
43  Point aPoint( rDestPt.X() + nPixelWidth, rDestPt.Y() + nPixelWidth );
44  Size aSize( rDestSize.Width() - ( nPixelWidth << 1 ), rDestSize.Height() - ( nPixelWidth << 1 ) );
45  bool bFilled = ( pBitmapEx != nullptr || pFont != nullptr );
46  tools::Rectangle aBorderRect( aPoint, aSize );
47 
48  rOutDev.Push();
49 
50  rOutDev.SetFillColor();
51 
52  // On the printer a black rectangle and on the screen one with 3D effect
53  rOutDev.DrawBorder(aBorderRect);
54 
55  aPoint.AdjustX(nPixelWidth + 2*nPixel );
56  aPoint.AdjustY(nPixelWidth + 2*nPixel );
57  aSize.AdjustWidth( -(2*nPixelWidth + 4*nPixel) );
58  aSize.AdjustHeight( -(2*nPixelWidth + 4*nPixel) );
59 
60  if( !aSize.IsEmpty() && pBitmapEx && !pBitmapEx->IsEmpty() )
61  {
62  Size aBitmapSize( rOutDev.PixelToLogic( pBitmapEx->GetSizePixel() ) );
63 
64  if( aSize.Height() > aBitmapSize.Height() && aSize.Width() > aBitmapSize.Width() )
65  {
66  rOutDev.DrawBitmapEx( aPoint, *pBitmapEx );
67  aPoint.AdjustX(aBitmapSize.Width() + 2*nPixel );
68  aSize.AdjustWidth( -(aBitmapSize.Width() + 2*nPixel) );
69  }
70  }
71 
72  if ( !aSize.IsEmpty() && pFont && pText && pText->getLength() && rOutDev.IsOutputEnabled() )
73  {
74  MapMode aMapMode( MapUnit::MapPoint );
75  Size aSz = rOutDev.LogicToLogic( Size( 0, 12 ), &aMapMode, nullptr );
76  tools::Long nThreshold = aSz.Height() / 2;
77  tools::Long nStep = nThreshold / 3;
78 
79  if ( !nStep )
80  nStep = aSz.Height() - nThreshold;
81 
82  for(;; aSz.AdjustHeight( -nStep ) )
83  {
84  pFont->SetFontSize( aSz );
85  rOutDev.SetFont( *pFont );
86 
87  tools::Long nTextHeight = rOutDev.GetTextHeight();
88  tools::Long nTextWidth = rOutDev.GetTextWidth( *pText );
89  if ( nTextHeight )
90  {
91  // The approximation does not respect imprecisions caused
92  // by word wraps
93  tools::Long nLines = aSize.Height() / nTextHeight;
94  tools::Long nWidth = aSize.Width() * nLines; // Approximation!!!
95 
96  if ( nTextWidth <= nWidth || aSz.Height() <= nThreshold )
97  {
98  sal_Int32 nStart = 0;
99  sal_Int32 nLen = 0;
100 
101  while( nStart < pText->getLength() && (*pText)[nStart] == ' ' )
102  nStart++;
103  while( nStart+nLen < pText->getLength() && (*pText)[nStart+nLen] != ' ' )
104  nLen++;
105  while( nStart < pText->getLength() && nLines-- )
106  {
107  sal_Int32 nNext = nLen;
108  do
109  {
110  while ( nStart+nNext < pText->getLength() && (*pText)[nStart+nNext] == ' ' )
111  nNext++;
112  while ( nStart+nNext < pText->getLength() && (*pText)[nStart+nNext] != ' ' )
113  nNext++;
114  nTextWidth = rOutDev.GetTextWidth( *pText, nStart, nNext );
115  if ( nTextWidth > aSize.Width() )
116  break;
117  nLen = nNext;
118  }
119  while ( nStart+nNext < pText->getLength() );
120 
121  sal_Int32 n = nLen;
122  nTextWidth = rOutDev.GetTextWidth( *pText, nStart, n );
123  while( nTextWidth > aSize.Width() )
124  nTextWidth = rOutDev.GetTextWidth( *pText, nStart, --n );
125  rOutDev.DrawText( aPoint, *pText, nStart, n );
126 
127  aPoint.AdjustY(nTextHeight );
128  nStart = sal::static_int_cast<sal_uInt16>(nStart + nLen);
129  nLen = nNext-nLen;
130  while( nStart < pText->getLength() && (*pText)[nStart] == ' ' )
131  {
132  nStart++;
133  nLen--;
134  }
135  }
136  break;
137  }
138  }
139  else
140  break;
141  }
142  }
143 
144  // If the default graphic does not have content, we draw a red rectangle
145  if( !bFilled )
146  {
147  aBorderRect.AdjustLeft( 1 );
148  aBorderRect.AdjustTop( 1 );
149  aBorderRect.AdjustRight( -1 );
150  aBorderRect.AdjustBottom( -1 );
151 
152  rOutDev.SetLineColor( COL_LIGHTRED );
153  rOutDev.DrawLine( aBorderRect.TopLeft(), aBorderRect.BottomRight() );
154  rOutDev.DrawLine( aBorderRect.TopRight(), aBorderRect.BottomLeft() );
155  }
156 
157  rOutDev.Pop();
158 }
159 
160 } // end anonymous namespace
161 
163  : mxImpGraphic(vcl::graphic::Manager::get().newInstance())
164 {
165 }
166 
167 Graphic::Graphic(const Graphic& rGraphic)
168 {
169  if( rGraphic.IsAnimated() )
171  else
172  mxImpGraphic = rGraphic.mxImpGraphic;
173 }
174 
175 Graphic::Graphic(Graphic&& rGraphic) noexcept
176  : mxImpGraphic(std::move(rGraphic.mxImpGraphic))
177 {
178 }
179 
180 Graphic::Graphic(std::shared_ptr<GfxLink> const & rGfxLink, sal_Int32 nPageIndex)
181  : mxImpGraphic(vcl::graphic::Manager::get().newInstance(rGfxLink, nPageIndex))
182 {
183 }
184 
185 Graphic::Graphic(GraphicExternalLink const & rGraphicExternalLink)
186  : mxImpGraphic(vcl::graphic::Manager::get().newInstance(rGraphicExternalLink))
187 {
188 }
189 
191  : mxImpGraphic(vcl::graphic::Manager::get().newInstance(rBmpEx))
192 {
193 }
194 
195 // We use XGraphic for passing toolbar images across app UNO aps
196 // and we need to be able to see and preserve 'stock' images too.
197 Graphic::Graphic(const Image& rImage)
198  // FIXME: should really defer the BitmapEx load.
199  : mxImpGraphic(std::make_shared<ImpGraphic>(rImage.GetBitmapEx()))
200 {
201  OUString aStock = rImage.GetStock();
202  if (aStock.getLength())
203  mxImpGraphic->setOriginURL("private:graphicrepository/" + aStock);
204 }
205 
206 Graphic::Graphic(const std::shared_ptr<VectorGraphicData>& rVectorGraphicDataPtr)
207  : mxImpGraphic(vcl::graphic::Manager::get().newInstance(rVectorGraphicDataPtr))
208 {
209 }
210 
211 Graphic::Graphic(const Animation& rAnimation)
212  : mxImpGraphic(vcl::graphic::Manager::get().newInstance(rAnimation))
213 {
214 }
215 
217  : mxImpGraphic(vcl::graphic::Manager::get().newInstance(rMtf))
218 {
219 }
220 
221 Graphic::Graphic( const css::uno::Reference< css::graphic::XGraphic >& rxGraphic )
222 {
223  const ::Graphic* pGraphic = comphelper::getUnoTunnelImplementation<::Graphic>(rxGraphic);
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 
254 Graphic& Graphic::operator=( const Graphic& rGraphic )
255 {
256  if( &rGraphic != this )
257  {
258  if( rGraphic.IsAnimated() )
260  else
261  mxImpGraphic = rGraphic.mxImpGraphic;
262  }
263 
264  return *this;
265 }
266 
267 Graphic& Graphic::operator=(Graphic&& rGraphic) noexcept
268 {
269  mxImpGraphic = std::move(rGraphic.mxImpGraphic);
270  return *this;
271 }
272 
273 bool Graphic::operator==( const Graphic& rGraphic ) const
274 {
275  return (*mxImpGraphic == *rGraphic.mxImpGraphic);
276 }
277 
278 bool Graphic::operator!=( const Graphic& rGraphic ) const
279 {
280  return (*mxImpGraphic != *rGraphic.mxImpGraphic);
281 }
282 
283 bool 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 
315 bool Graphic::IsAlpha() const
316 {
317  return mxImpGraphic->isAlpha();
318 }
319 
321 {
322  return mxImpGraphic->isAnimated();
323 }
324 
325 bool 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 
350 uno::Reference<graphic::XGraphic> Graphic::GetXGraphic() const
351 {
352  uno::Reference<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 
369 void Graphic::SetPrefSize( const Size& rPrefSize )
370 {
372  mxImpGraphic->setPrefSize( rPrefSize );
373 }
374 
376 {
377  return mxImpGraphic->getPrefMapMode();
378 }
379 
380 void 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 
412 Size 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 
429 void Graphic::Draw(OutputDevice& rOutDev, const Point& rDestPt) const
430 {
431  mxImpGraphic->draw(rOutDev, rDestPt);
432 }
433 
434 void 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 
443 void 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 
450 void Graphic::StartAnimation(OutputDevice& rOutDev, const Point& rDestPt,
451  const Size& rDestSz, tools::Long nExtraData,
452  OutputDevice* pFirstFrameOutDev)
453 {
455  mxImpGraphic->startAnimation(rOutDev, rDestPt, rDestSz, nExtraData, pFirstFrameOutDev);
456 }
457 
458 void Graphic::StopAnimation( const OutputDevice* pOutDev, tools::Long nExtraData )
459 {
461  mxImpGraphic->stopAnimation( pOutDev, nExtraData );
462 }
463 
465 {
466  mxImpGraphic->setAnimationNotifyHdl( rLink );
467 }
468 
470 {
471  return mxImpGraphic->getAnimationNotifyHdl();
472 }
473 
475 {
476  return mxImpGraphic->getAnimationLoopCount();
477 }
478 
479 std::shared_ptr<GraphicReader>& Graphic::GetReaderContext()
480 {
481  return mxImpGraphic->getContext();
482 }
483 
484 void Graphic::SetReaderContext( const std::shared_ptr<GraphicReader> &pReader )
485 {
486  mxImpGraphic->setContext( pReader );
487 }
488 
489 void Graphic::SetDummyContext( bool value )
490 {
491  mxImpGraphic->setDummyContext( value );
492 }
493 
495 {
496  return mxImpGraphic->isDummyContext();
497 }
498 
499 void Graphic::SetGfxLink( const std::shared_ptr<GfxLink>& rGfxLink )
500 {
502  mxImpGraphic->setGfxLink(rGfxLink);
503 }
504 
505 const std::shared_ptr<GfxLink> & Graphic::GetSharedGfxLink() const
506 {
507  return mxImpGraphic->getSharedGfxLink();
508 }
509 
511 {
512  return mxImpGraphic->getGfxLink();
513 }
514 
515 bool Graphic::IsGfxLink() const
516 {
517  return mxImpGraphic->isGfxLink();
518 }
519 
521 {
522  return mxImpGraphic->getChecksum();
523 }
524 
525 const std::shared_ptr<VectorGraphicData>& Graphic::getVectorGraphicData() const
526 {
527  return mxImpGraphic->getVectorGraphicData();
528 }
529 
530 sal_Int32 Graphic::getPageNumber() const
531 {
532  return mxImpGraphic->getPageNumber();
533 }
534 
535 OUString Graphic::getOriginURL() const
536 {
537  if (mxImpGraphic)
538  {
539  return mxImpGraphic->getOriginURL();
540  }
541  return OUString();
542 }
543 
544 void Graphic::setOriginURL(OUString const & rOriginURL)
545 {
546  if (mxImpGraphic)
547  {
548  mxImpGraphic->setOriginURL(rOriginURL);
549  }
550 }
551 
552 OString Graphic::getUniqueID() const
553 {
554  OString aUniqueString;
555  if (mxImpGraphic)
556  aUniqueString = mxImpGraphic->getUniqueID();
557  return aUniqueString;
558 }
559 
560 css::uno::Sequence<sal_Int8> Graphic::getUnoTunnelId() {
561  static cppu::OImplementationId gId;
562  return gId.getImplementationId();
563 }
564 
565 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
void SetDummyContext(bool value)
Definition: graph.cxx:489
const Fraction & GetScaleX() const
Definition: mapmod.cxx:142
void StartAnimation(OutputDevice &rOutDev, const Point &rDestPt, const Size &rDestSize, tools::Long nExtraData=0, OutputDevice *pFirstFrameOutDev=nullptr)
Definition: graph.cxx:450
sal_uInt64 BitmapChecksum
Definition: checksum.hxx:30
void SetFontSize(const Size &)
Definition: font/font.cxx:127
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
Definition: map.cxx:1521
bool IsNone() const
Definition: graph.cxx:283
Size GetSizePixel(const OutputDevice *pRefDevice=nullptr) const
Definition: graph.cxx:412
std::shared_ptr< ImpGraphic > mxImpGraphic
Definition: graph.hxx:85
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
This is an overloaded member function, provided for convenience. It differs from the above function o...
BitmapChecksum GetChecksum() const
Definition: graph.cxx:520
sal_uIntPtr sal_uLong
long Long
void SetPrefMapMode(const MapMode &rPrefMapMode)
Definition: graph.cxx:380
bool IsOutputEnabled() const
Definition: outdev.hxx:474
sal_Int64 n
GraphicType
Definition: graph.hxx:34
bool IsSupportedGraphic() const
Definition: graph.cxx:305
void setOriginURL(OUString const &rOriginURL)
Definition: graph.cxx:544
exports com.sun.star. graphic
void Draw(OutputDevice &rOutDev, const Point &rDestPt) const
Definition: graph.cxx:429
SAL_DLLPRIVATE void ImplTestRefCount()
Definition: graph.cxx:236
bool IsTransparent() const
Definition: graph.cxx:310
std::shared_ptr< T > make_shared(Args &&...args)
virtual void DrawBorder(tools::Rectangle aBorderRect)
Definition: rect.cxx:32
std::shared_ptr< ImpGraphic > copy(std::shared_ptr< ImpGraphic > const &pImpGraphic)
Definition: Manager.cxx:200
static css::uno::Sequence< sal_Int8 > getUnoTunnelId()
Definition: graph.cxx:560
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
Definition: graph.cxx:350
const std::shared_ptr< GfxLink > & GetSharedGfxLink() const
Definition: graph.cxx:505
bool IsGfxLink() const
Definition: graph.cxx:515
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
Definition: svapp.cxx:1069
constexpr tools::Long Width() const
void Clear()
Definition: graph.cxx:288
void SetReaderContext(const std::shared_ptr< GraphicReader > &pReader)
Definition: graph.cxx:484
const Fraction & GetScaleY() const
Definition: mapmod.cxx:144
B2DVector B2DSize
sal_Int32 getPageNumber() const
Get the page number of the multi-page source this Graphic is rendered from.
Definition: graph.cxx:530
const GDIMetaFile & GetGDIMetaFile() const
Definition: graph.cxx:340
bool isAvailable() const
Definition: graph.cxx:244
void SetAnimationNotifyHdl(const Link< Animation *, void > &rLink)
Definition: graph.cxx:464
void SetGfxLink(const std::shared_ptr< GfxLink > &rGfxLink)
Definition: graph.cxx:499
void DrawLine(const Point &rStartPt, const Point &rEndPt)
Definition: line.cxx:89
bool IsAnimated() const
Definition: graph.cxx:320
Animation GetAnimation() const
Definition: graph.cxx:335
OUString GetStock() const
Definition: Image.cxx:79
bool IsEmpty() const
Definition: BitmapEx.cxx:177
void SetLineColor()
#define nPixel
std::shared_ptr< ImpGraphic > newInstance()
Definition: Manager.cxx:207
GraphicType GetType() const
Definition: graph.cxx:294
static Manager & get()
Definition: Manager.cxx:54
bool operator!=(const Graphic &rGraphic) const
Definition: graph.cxx:278
void SetFillColor()
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:162
const BitmapEx & GetBitmapExRef() const
Gives direct access to the contained BitmapEx.
Definition: graph.cxx:345
OUString getOriginURL() const
Definition: graph.cxx:535
MapUnit GetMapUnit() const
Definition: mapmod.cxx:138
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
Definition: graph.cxx:330
GfxLink GetGfxLink() const
Definition: graph.cxx:510
bool IsAlpha() const
Definition: graph.cxx:315
sal_uLong GetSizeBytes() const
Definition: graph.cxx:424
basegfx::B2DSize GetPPI() const
Definition: graph.cxx:386
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1066
Size GetPrefSize() const
Definition: graph.cxx:364
Link< Animation *, void > GetAnimationNotifyHdl() const
Definition: graph.cxx:469
Graphic()
Definition: graph.cxx:162
MapMode GetPrefMapMode() const
Definition: graph.cxx:375
constexpr tools::Long Height() const
static void DrawEx(OutputDevice &rOutDev, const OUString &rText, vcl::Font &rFont, const BitmapEx &rBitmap, const Point &rDestPt, const Size &rDestSize)
Definition: graph.cxx:443
sal_uInt32 GetAnimationLoopCount() const
Definition: graph.cxx:474
void SetFont(const vcl::Font &rNewFont)
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
Definition: text.cxx:891
std::shared_ptr< GraphicReader > & GetReaderContext()
Definition: graph.cxx:479
OString getUniqueID() const
Definition: graph.cxx:552
Definition: image.hxx:39
css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() const
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
Definition: text.cxx:880
bool makeAvailable()
Definition: graph.cxx:249
double getLength(const B2DPolygon &rCandidate)
void SetPrefSize(const Size &rPrefSize)
Definition: graph.cxx:369
tools::Long AdjustHeight(tools::Long n)
void StopAnimation(const OutputDevice *pOutputDevice, tools::Long nExtraData)
Definition: graph.cxx:458
void SetDefaultType()
Definition: graph.cxx:299
const std::shared_ptr< VectorGraphicData > & getVectorGraphicData() const
Definition: graph.cxx:525
const Size & GetSizePixel() const
Definition: bitmapex.hxx:73
Graphic & operator=(const Graphic &rGraphic)
Definition: graph.cxx:254
bool operator==(const Graphic &rGraphic) const
Definition: graph.cxx:273
void Push(PushFlags nFlags=PushFlags::ALL)
Definition: outdevstate.cxx:59
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:791
bool IsDummyContext() const
Definition: graph.cxx:494
bool IsEPS() const
Definition: graph.cxx:325