LibreOffice Module svx (master) 1
swframeexample.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 <vcl/metric.hxx>
21#include <vcl/outdev.hxx>
22#include <vcl/svapp.hxx>
23#include <vcl/settings.hxx>
24#include <svtools/colorcfg.hxx>
27#include <com/sun/star/text/HoriOrientation.hpp>
28#include <com/sun/star/text/VertOrientation.hpp>
29#include <com/sun/star/text/RelOrientation.hpp>
30
31using namespace ::com::sun::star::text;
32
33#define FLYINFLY_BORDER 3
34constexpr OUStringLiteral DEMOTEXT = u"Ij";
35
36namespace {
37
38void DrawRect_Impl(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect,
39 const Color &rFillColor, const Color &rLineColor)
40{
41 rRenderContext.SetFillColor(rFillColor);
42 rRenderContext.SetLineColor(rLineColor);
43 rRenderContext.DrawRect(rRect);
44}
45
46}
47
49 : nHAlign(HoriOrientation::CENTER)
50 , nHRel(RelOrientation::FRAME)
51 , nVAlign(VertOrientation::TOP)
52 , nVRel(RelOrientation::PRINT_AREA)
53 , nWrap(WrapTextMode_NONE)
54 , nAnchor(RndStdIds::FLY_AT_PAGE)
55 , bTrans(false)
56 , aRelPos(Point(0,0))
57{
59}
60
62{
63 CustomWidgetController::SetDrawingArea(pDrawingArea);
64 pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 16,
65 pDrawingArea->get_text_height() * 12);
66}
67
69{
71 m_aBgCol = rSettings.GetWindowColor();
72
73 bool bHC = rSettings.GetHighContrastMode();
74
78
79 m_aTxtCol = bHC?
86}
87
89{
91 CustomWidgetController::StyleUpdated();
92}
93
95{
97
98 sal_uInt32 nOutWPix = aPage.GetWidth();
99 sal_uInt32 nOutHPix = aPage.GetHeight();
100
101 // PrintArea
102 sal_uInt32 nLBorder;
103 sal_uInt32 nRBorder;
104 sal_uInt32 nTBorder;
105 sal_uInt32 nBBorder;
106
107 sal_uInt32 nLTxtBorder;
108 sal_uInt32 nRTxtBorder;
109 sal_uInt32 nTTxtBorder;
110 sal_uInt32 nBTxtBorder;
111
113 {
114 nLBorder = 14;
115 nRBorder = 10;
116 nTBorder = 10;
117 nBBorder = 15;
118
119 nLTxtBorder = 8;
120 nRTxtBorder = 4;
121 nTTxtBorder = 2;
122 nBTxtBorder = 2;
123 }
124 else
125 {
126 nLBorder = 2;
127 nRBorder = 2;
128 nTBorder = 2;
129 nBBorder = 2;
130
131 nLTxtBorder = 2;
132 nRTxtBorder = 2;
133 nTTxtBorder = 2;
134 nBTxtBorder = 2;
135 }
136 aPagePrtArea = tools::Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder));
137
138 // Example text: Preparing for the text output
139 // A line of text
142 aTextLine.AdjustLeft(nLTxtBorder );
143 aTextLine.AdjustRight( -sal_Int32(nRTxtBorder) );
144 aTextLine.Move(0, nTTxtBorder);
145
146 // Rectangle to edges including paragraph
147 sal_uInt16 nLines = static_cast<sal_uInt16>((aPagePrtArea.GetHeight() / 2 - nTTxtBorder - nBTxtBorder)
148 / (aTextLine.GetHeight() + 2));
151 (aTextLine.GetHeight() + 2) * nLines + nTTxtBorder + nBTxtBorder));
152
153 // Rectangle around paragraph without borders
155 aParaPrtArea.AdjustLeft(nLTxtBorder );
156 aParaPrtArea.AdjustRight( -sal_Int32(nRTxtBorder) );
157 aParaPrtArea.AdjustTop(nTTxtBorder );
158 aParaPrtArea.AdjustBottom( -sal_Int32(nBTxtBorder) );
159
161 {
163 DefaultFontType::LATIN_TEXT, Application::GetSettings().GetLanguageTag().getLanguageType(),
164 GetDefaultFontFlags::OnlyOne, &rRenderContext );
165 aFont.SetColor( m_aTxtCol );
166 aFont.SetFillColor( m_aBgCol );
168
170 {
171 aFont.SetFontSize(Size(0, aParaPrtArea.GetHeight() - 2));
172 rRenderContext.SetFont(aFont);
173 aParaPrtArea.SetSize(Size(rRenderContext.GetTextWidth(DEMOTEXT), rRenderContext.GetTextHeight()));
174 }
175 else
176 {
177 aFont.SetFontSize(Size(0, aParaPrtArea.GetHeight() / 2));
178 rRenderContext.SetFont(aFont);
179 aAutoCharFrame.SetSize(Size(rRenderContext.GetTextWidth(OUString('A')), GetTextHeight()));
182 }
183 }
184
185 // Inner Frame anchored at the Frame
191
192 // Size of the frame to be positioned
194 {
195 sal_uInt32 nLFBorder = nAnchor == RndStdIds::FLY_AT_PAGE ? nLBorder : nLTxtBorder;
196 sal_uInt32 nRFBorder = nAnchor == RndStdIds::FLY_AT_PAGE ? nRBorder : nRTxtBorder;
197
198 switch (nHRel)
199 {
200 case RelOrientation::PAGE_LEFT:
201 case RelOrientation::FRAME_LEFT:
202 aFrmSize = Size(nLFBorder - 4, (aTextLine.GetHeight() + 2) * 3);
203 break;
204
205 case RelOrientation::PAGE_RIGHT:
206 case RelOrientation::FRAME_RIGHT:
207 aFrmSize = Size(nRFBorder - 4, (aTextLine.GetHeight() + 2) * 3);
208 break;
209
210 default:
211 aFrmSize = Size(nLBorder - 3, (aTextLine.GetHeight() + 2) * 3);
212 break;
213 }
214 aFrmSize.setWidth( std::max(tools::Long(5), aFrmSize.Width()) );
215 aFrmSize.setHeight( std::max(tools::Long(5), aFrmSize.Height()) );
216 }
217 else
218 {
219 sal_uInt32 nFreeWidth = aPagePrtArea.GetWidth() - rRenderContext.GetTextWidth(DEMOTEXT);
220
221 aFrmSize = Size(nFreeWidth / 2, (aTextLine.GetHeight() + 2) * 3);
222 aDrawObj.SetSize(Size(std::max(tools::Long(5), tools::Long(nFreeWidth / 3)), std::max(tools::Long(5), aFrmSize.Height() * 3)));
225 }
226}
227
229{
230 switch (nAnchor)
231 {
233 {
234 switch (nHRel)
235 {
236 case RelOrientation::FRAME:
237 case RelOrientation::PAGE_FRAME:
238 rRect.SetLeft( aPage.Left() );
239 rRect.SetRight( aPage.Right() );
240 break;
241
242 case RelOrientation::PRINT_AREA:
243 case RelOrientation::PAGE_PRINT_AREA:
244 rRect.SetLeft( aPagePrtArea.Left() );
245 rRect.SetRight( aPagePrtArea.Right() );
246 break;
247
248 case RelOrientation::PAGE_LEFT:
249 rRect.SetLeft( aPage.Left() );
250 rRect.SetRight( aPagePrtArea.Left() );
251 break;
252
253 case RelOrientation::PAGE_RIGHT:
254 rRect.SetLeft( aPagePrtArea.Right() );
255 rRect.SetRight( aPage.Right() );
256 break;
257 }
258
259 switch (nVRel)
260 {
261 case RelOrientation::PRINT_AREA:
262 case RelOrientation::PAGE_PRINT_AREA:
263 rRect.SetTop( aPagePrtArea.Top() );
264 rRect.SetBottom( aPagePrtArea.Bottom() );
265 break;
266
267 case RelOrientation::FRAME:
268 case RelOrientation::PAGE_FRAME:
269 rRect.SetTop( aPage.Top() );
270 rRect.SetBottom( aPage.Bottom() );
271 break;
272 }
273 }
274 break;
275
277 {
278 switch (nHRel)
279 {
280 case RelOrientation::FRAME:
281 case RelOrientation::PAGE_FRAME:
282 rRect.SetLeft( aFrameAtFrame.Left() );
283 rRect.SetRight( aFrameAtFrame.Right() );
284 break;
285
286 case RelOrientation::PRINT_AREA:
287 case RelOrientation::PAGE_PRINT_AREA:
290 break;
291
292 case RelOrientation::PAGE_LEFT:
293 rRect.SetLeft( aFrameAtFrame.Left() );
295 break;
296
297 case RelOrientation::PAGE_RIGHT:
298 rRect.SetLeft( aFrameAtFrame.Right() );
300 break;
301 }
302
303 switch (nVRel)
304 {
305 case RelOrientation::FRAME:
306 case RelOrientation::PAGE_FRAME:
307 rRect.SetTop( aFrameAtFrame.Top() );
308 rRect.SetBottom( aFrameAtFrame.Bottom() );
309 break;
310
311 case RelOrientation::PRINT_AREA:
312 case RelOrientation::PAGE_PRINT_AREA:
315 break;
316 }
317 }
318 break;
321 {
322 switch (nHRel)
323 {
324 case RelOrientation::FRAME:
325 rRect.SetLeft( aPara.Left() );
326 rRect.SetRight( aPara.Right() );
327 break;
328
329 case RelOrientation::PRINT_AREA:
330 rRect.SetLeft( aParaPrtArea.Left() );
331 rRect.SetRight( aParaPrtArea.Right() );
332 break;
333
334 case RelOrientation::PAGE_LEFT:
335 rRect.SetLeft( aPage.Left() );
336 rRect.SetRight( aPagePrtArea.Left() );
337 break;
338
339 case RelOrientation::PAGE_RIGHT:
340 rRect.SetLeft( aPagePrtArea.Right() );
341 rRect.SetRight( aPage.Right() );
342 break;
343
344 case RelOrientation::PAGE_FRAME:
345 rRect.SetLeft( aPage.Left() );
346 rRect.SetRight( aPage.Right() );
347 break;
348
349 case RelOrientation::PAGE_PRINT_AREA:
350 rRect.SetLeft( aPagePrtArea.Left() );
351 rRect.SetRight( aPagePrtArea.Right() );
352 break;
353
354 case RelOrientation::FRAME_LEFT:
355 rRect.SetLeft( aPara.Left() );
356 rRect.SetRight( aParaPrtArea.Left() );
357 break;
358
359 case RelOrientation::FRAME_RIGHT:
360 rRect.SetLeft( aParaPrtArea.Right() );
361 rRect.SetRight( aPara.Right() );
362 break;
363
364 case RelOrientation::CHAR:
365 rRect.SetLeft( aAutoCharFrame.Left() );
366 rRect.SetRight( aAutoCharFrame.Left() );
367 break;
368 }
369
370 switch (nVRel)
371 {
372 case RelOrientation::FRAME:
373 rRect.SetTop( aPara.Top() );
374 rRect.SetBottom( aPara.Bottom() );
375 break;
376
377 case RelOrientation::PRINT_AREA:
378 rRect.SetTop( aParaPrtArea.Top() );
379 rRect.SetBottom( aParaPrtArea.Bottom() );
380 break;
381
382 case RelOrientation::CHAR:
383 if (nVAlign != VertOrientation::NONE &&
384 nVAlign != VertOrientation::CHAR_BOTTOM)
385 rRect.SetTop( aAutoCharFrame.Top() );
386 else
387 rRect.SetTop( aAutoCharFrame.Bottom() );
389 break;
390 // OD 12.11.2003 #i22341#
391 case RelOrientation::TEXT_LINE:
392 rRect.SetTop( aAutoCharFrame.Top() );
393 rRect.SetBottom( aAutoCharFrame.Top() );
394 break;
395 }
396 }
397 break;
398
400 rRect.SetLeft( aParaPrtArea.Left() );
401 rRect.SetRight( aParaPrtArea.Right() );
402
403 switch (nVAlign)
404 {
405 case VertOrientation::NONE:
406 case VertOrientation::TOP:
407 case VertOrientation::CENTER:
408 case VertOrientation::BOTTOM:
409 {
410 FontMetric aMetric(rRenderContext.GetFontMetric());
411
412 rRect.SetTop( aParaPrtArea.Bottom() - aMetric.GetDescent() );
413 rRect.SetBottom( rRect.Top() );
414 }
415 break;
416
417 default:
418
419 case VertOrientation::LINE_TOP:
420 case VertOrientation::LINE_CENTER:
421 case VertOrientation::LINE_BOTTOM:
422 rRect.SetTop( aParaPrtArea.Top() );
423 rRect.SetBottom( aDrawObj.Bottom() );
424 break;
425
426 case VertOrientation::CHAR_TOP:
427 case VertOrientation::CHAR_CENTER:
428 case VertOrientation::CHAR_BOTTOM:
429 rRect.SetTop( aParaPrtArea.Top() );
430 rRect.SetBottom( aParaPrtArea.Bottom() );
431 break;
432 }
433 break;
434
435 default:
436 break;
437 }
438}
439
441 const Color &rFillColor, const Color &rBorderColor)
442{
443 DrawRect_Impl(rRenderContext, rRect, rFillColor, rBorderColor);
444
445 // determine the area relative to which the positioning happens
446 tools::Rectangle aRect(rRect); // aPagePrtArea = Default
447 CalcBoundRect_Impl(rRenderContext, aRect);
448
449 if (nAnchor == RndStdIds::FLY_AT_FLY && &rRect == &aPagePrtArea)
450 {
451 // draw text paragraph
453 sal_Int32 nStep = aTxt.GetHeight() + 2;
454 sal_uInt16 nLines = static_cast<sal_uInt16>(aParaPrtArea.GetHeight() / (aTextLine.GetHeight() + 2));
455
456 for (sal_uInt16 i = 0; i < nLines; i++)
457 {
458 if (i == nLines - 1)
459 aTxt.SetSize(Size(aTxt.GetWidth() / 2, aTxt.GetHeight()));
460 DrawRect_Impl(rRenderContext, aTxt, m_aTxtCol, m_aTransColor);
461 aTxt.Move(0, nStep);
462 }
463 }
464
465 return aRect;
466}
467
469{
470 rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel));
471
472 InitAllRects_Impl(rRenderContext);
473
474 // Draw page
475 DrawRect_Impl(rRenderContext, aPage, m_aBgCol, m_aBorderCol);
476
477 // Draw PrintArea
479
481 aRect = DrawInnerFrame_Impl(rRenderContext, aFrameAtFrame, m_aBgCol, m_aBorderCol);
482
483 tools::Long lXPos = 0;
484 tools::Long lYPos = 0;
485
486 // Horizontal alignment
488 {
489 switch (nHAlign)
490 {
491 case HoriOrientation::RIGHT:
492 {
493 lXPos = aRect.Right() - aFrmSize.Width() + 1;
494 break;
495 }
496 case HoriOrientation::CENTER:
497 {
498 lXPos = aRect.Left() + (aRect.GetWidth() - aFrmSize.Width()) / 2;
499 break;
500 }
501 case HoriOrientation::NONE:
502 {
503 lXPos = aRect.Left() + aRelPos.X();
504 break;
505 }
506
507 default: // HoriOrientation::LEFT
508 lXPos = aRect.Left();
509 break;
510 }
511 }
512 else
513 {
514 lXPos = aRect.Right() + 2;
515 }
516
517 // Vertical Alignment
519 {
520 switch (nVAlign)
521 {
522 case VertOrientation::BOTTOM:
523 case VertOrientation::LINE_BOTTOM:
524 {
525 // #i22341#
526 if ( nVRel != RelOrientation::TEXT_LINE )
527 {
528 lYPos = aRect.Bottom() - aFrmSize.Height() + 1;
529 }
530 else
531 {
532 lYPos = aRect.Top();
533 }
534 break;
535 }
536 case VertOrientation::CENTER:
537 case VertOrientation::LINE_CENTER:
538 {
539 lYPos = aRect.Top() + (aRect.GetHeight() - aFrmSize.Height()) / 2;
540 break;
541 }
542 case VertOrientation::NONE:
543 {
544 // #i22341#
545 if ( nVRel != RelOrientation::CHAR && nVRel != RelOrientation::TEXT_LINE )
546 lYPos = aRect.Top() + aRelPos.Y();
547 else
548 lYPos = aRect.Top() - aRelPos.Y();
549 break;
550 }
551 default:
552 // #i22341#
553 if ( nVRel != RelOrientation::TEXT_LINE )
554 {
555 lYPos = aRect.Top();
556 }
557 else
558 {
559 lYPos = aRect.Bottom() - aFrmSize.Height() + 1;
560 }
561 break;
562 }
563 }
564 else
565 {
566 switch(nVAlign)
567 {
568 case VertOrientation::CENTER:
569 case VertOrientation::CHAR_CENTER:
570 case VertOrientation::LINE_CENTER:
571 lYPos = aRect.Top() + (aRect.GetHeight() - aFrmSize.Height()) / 2;
572 break;
573
574 case VertOrientation::TOP:
575 case VertOrientation::CHAR_BOTTOM:
576 case VertOrientation::LINE_BOTTOM:
577 lYPos = aRect.Bottom() - aFrmSize.Height() + 1;
578 break;
579
580 default:
581 lYPos = aRect.Top() - aRelPos.Y();
582 break;
583 }
584 }
585
586 tools::Rectangle aFrmRect(Point(lXPos, lYPos), aFrmSize);
587
588 tools::Rectangle* pOuterFrame = &aPage;
589
591 pOuterFrame = &aFrameAtFrame;
592
593 if (aFrmRect.Left() < pOuterFrame->Left())
594 aFrmRect.Move(pOuterFrame->Left() - aFrmRect.Left(), 0);
595 if (aFrmRect.Right() > pOuterFrame->Right())
596 aFrmRect.Move(pOuterFrame->Right() - aFrmRect.Right(), 0);
597
598 if (aFrmRect.Top() < pOuterFrame->Top())
599 aFrmRect.Move(0, pOuterFrame->Top() - aFrmRect.Top());
600 if (aFrmRect.Bottom() > pOuterFrame->Bottom())
601 aFrmRect.Move(0, pOuterFrame->Bottom() - aFrmRect.Bottom());
602
603 // Draw Test paragraph
604 const tools::Long nTxtLineHeight = aTextLine.GetHeight();
606 sal_Int32 nStep;
607 sal_uInt16 nLines;
608
610 {
614 aTxt.SetBottom( aTxt.Top() + aTextLine.GetHeight() - 1 );
615
616 nStep = aTxt.GetHeight() + 2;
617 nLines = static_cast<sal_uInt16>(((aFrameAtFrame.GetHeight() - 2 * FLYINFLY_BORDER) * 2 / 3)
618 / (aTxt.GetHeight() + 2));
619 }
620 else
621 {
622 nStep = aTxt.GetHeight() + 2;
623 nLines = static_cast<sal_uInt16>(aParaPrtArea.GetHeight() / (aTextLine.GetHeight() + 2));
624 }
625
627 {
628 // Simulate text
629 const tools::Long nOldR = aTxt.Right();
630 const tools::Long nOldL = aTxt.Left();
631
632 // #i22341#
633 const bool bIgnoreWrap = nAnchor == RndStdIds::FLY_AT_CHAR &&
634 ( nHRel == RelOrientation::CHAR || nVRel == RelOrientation::CHAR ||
635 nVRel == RelOrientation::TEXT_LINE );
636
637 for (sal_uInt16 i = 0; i < nLines; ++i)
638 {
639 if (i == (nLines - 1))
640 aTxt.SetSize(Size(aTxt.GetWidth() / 2, aTxt.GetHeight()));
641
642 if (aTxt.Overlaps(aFrmRect) && nAnchor != RndStdIds::FLY_AS_CHAR && !bIgnoreWrap)
643 {
644 switch(nWrap)
645 {
646 case WrapTextMode_NONE:
647 aTxt.SetTop( aFrmRect.Bottom() + nTxtLineHeight );
648 aTxt.SetBottom( aTxt.Top() + nTxtLineHeight - 1 );
649 break;
650
651 case WrapTextMode_LEFT:
652 aTxt.SetRight( aFrmRect.Left() );
653 break;
654
655 case WrapTextMode_RIGHT:
656 aTxt.SetLeft( aFrmRect.Right() );
657 break;
658 default: break;
659 }
660 }
661 if (pOuterFrame->Contains(aTxt))
662 DrawRect_Impl(rRenderContext, aTxt, m_aTxtCol, m_aTransColor );
663
664 aTxt.Move(0, nStep);
665 aTxt.SetRight( nOldR );
666 aTxt.SetLeft( nOldL );
667 }
668 aTxt.Move(0, -nStep);
669
671 {
672 // Text has been replaced by frame, so adjust parameters height
673 sal_Int32 nDiff = aTxt.Bottom() - aParaPrtArea.Bottom();
675 aPara.AdjustBottom(nDiff );
676
677 CalcBoundRect_Impl(rRenderContext, aRect);
678
679 aParaPrtArea.AdjustBottom( -nDiff );
680 aPara.AdjustBottom( -nDiff );
681 }
682 if (nAnchor == RndStdIds::FLY_AT_CHAR && bIgnoreWrap)
683 rRenderContext.DrawText(aAutoCharFrame, OUString('A'));
684 }
685 else
686 {
687 rRenderContext.DrawText(aParaPrtArea, OUString(DEMOTEXT));
688 DrawRect_Impl(rRenderContext, aDrawObj, m_aBlankCol, m_aBlankFrameCol );
689 }
690
691 // Draw rectangle on which the frame is aligned:
692 DrawRect_Impl(rRenderContext, aRect, m_aTransColor, m_aAlignColor);
693
694 // Frame View
695 bool bDontFill = (nAnchor == RndStdIds::FLY_AT_CHAR && aFrmRect.Overlaps(aAutoCharFrame)) || bTrans;
696 DrawRect_Impl(rRenderContext, aFrmRect, bDontFill? m_aTransColor : m_aBgCol, m_aFrameColor);
697}
698
700{
701 aRelPos = rP;
702
703 if (aRelPos.X() > 0)
704 aRelPos.setX( 5 );
705 if (aRelPos.X() < 0)
706 aRelPos.setX( -5 );
707
708 if (aRelPos.Y() > 0)
709 aRelPos.setY( 5 );
710 if (aRelPos.Y() < 0)
711 aRelPos.setY( -5 );
712}
713
714/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
tools::Long GetDescent() const
void SetFont(const vcl::Font &rNewFont)
void DrawRect(const tools::Rectangle &rRect)
void SetLineColor()
void SetMapMode()
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
void SetFillColor()
FontMetric GetFontMetric() const
tools::Long GetTextHeight() const
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
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)
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long X() const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetWindowColor() const
bool GetHighContrastMode() const
tools::Rectangle aDrawObj
tools::Rectangle aPage
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
Color m_aBorderCol
frame of doc
Color m_aFrameColor
graphic frame
tools::Rectangle aParaPrtArea
Color m_aTransColor
transparency
void InitAllRects_Impl(vcl::RenderContext &rRenderContext)
void SetRelPos(const Point &rP)
Color m_aAlignColor
align anchor
void CalcBoundRect_Impl(const vcl::RenderContext &rRenderContext, tools::Rectangle &rRect)
tools::Rectangle DrawInnerFrame_Impl(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect, const Color &rFillColor, const Color &rBorderColor)
tools::Rectangle aFrameAtFrame
tools::Rectangle aPara
tools::Rectangle aAutoCharFrame
tools::Rectangle aPagePrtArea
Color m_aTxtCol
symbolised text
Color m_aPrintAreaCol
frame of printable area of doc
Color m_aBgCol
background
virtual void StyleUpdated() override
Color m_aBlankFrameCol
frame of symbol for blank
Color m_aBlankCol
area of symbol for blank
tools::Rectangle aTextLine
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
css::text::WrapTextMode nWrap
ColorConfigValue GetColorValue(ColorConfigEntry eEntry, bool bSmart=true) const
constexpr tools::Long GetWidth() const
bool Contains(const Point &rPOINT) const
constexpr void SetLeft(tools::Long v)
bool Overlaps(const tools::Rectangle &rRect) const
constexpr void SetTop(tools::Long v)
constexpr tools::Long Top() const
void SetSize(const Size &)
void SetPos(const Point &rPoint)
constexpr void SetRight(tools::Long v)
void Move(tools::Long nHorzMoveDelta, tools::Long nVertMoveDelta)
constexpr tools::Long Right() const
tools::Long AdjustTop(tools::Long nVertMoveDelta)
tools::Long AdjustRight(tools::Long nHorzMoveDelta)
constexpr void SetBottom(tools::Long v)
constexpr tools::Long GetHeight() const
tools::Long AdjustBottom(tools::Long nVertMoveDelta)
tools::Long AdjustLeft(tools::Long nHorzMoveDelta)
constexpr tools::Long Left() const
constexpr tools::Long Bottom() const
void SetFontSize(const Size &)
void SetFillColor(const Color &)
void SetColor(const Color &)
void SetWeight(FontWeight)
Size const & GetOutputSizePixel() const
virtual int get_text_height() const=0
virtual void set_size_request(int nWidth, int nHeight)=0
virtual float get_approximate_digit_width() const=0
constexpr ::Color COL_LIGHTRED(0xFF, 0x00, 0x00)
constexpr ::Color COL_GRAY(0x80, 0x80, 0x80)
constexpr ::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
constexpr ::Color COL_LIGHTGREEN(0x00, 0xFF, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
float u
WEIGHT_NORMAL
const sal_uInt32 TOP
int i
long Long
FRAME
constexpr OUStringLiteral DEMOTEXT
#define FLYINFLY_BORDER
RndStdIds