1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <tools/poly.hxx>
21 #include <vcl/builder.hxx>
22 #include <vcl/metric.hxx>
23 #include <vcl/svapp.hxx>
24 #include <vcl/settings.hxx>
25 #include <svtools/colorcfg.hxx>
26 #include <svx/swframeexample.hxx>
27 #include <com/sun/star/text/TextContentAnchorType.hpp>
28 #include <com/sun/star/text/HoriOrientation.hpp>
29 #include <com/sun/star/text/VertOrientation.hpp>
30 #include <com/sun/star/text/RelOrientation.hpp>
31 #include <com/sun/star/text/WrapTextMode.hpp>
33 using namespace ::com::sun::star::text
;
35 #define FLYINFLY_BORDER 3
38 SvxSwFrameExample::SvxSwFrameExample( Window
*pParent
, WinBits nStyle
) :
40 Window(pParent
, nStyle
),
42 nHAlign (HoriOrientation::CENTER
),
43 nHRel (RelOrientation::FRAME
),
44 nVAlign (VertOrientation::TOP
),
45 nVRel (RelOrientation::PRINT_AREA
),
46 nWrap (WrapTextMode_NONE
),
47 nAnchor (TextContentAnchorType_AT_PAGE
),
52 SetMapMode(MAP_PIXEL
);
55 extern "C" SAL_DLLPUBLIC_EXPORT Window
* SAL_CALL
makeSvxSwFrameExample(Window
*pParent
, VclBuilder::stringmap
&)
57 return new SvxSwFrameExample(pParent
, 0);
60 Size
SvxSwFrameExample::GetOptimalSize() const
62 return LogicToPixel(Size(52, 86), MapMode(MAP_APPFONT
));
65 SvxSwFrameExample::~SvxSwFrameExample()
69 void SvxSwFrameExample::InitColors_Impl( void )
71 const StyleSettings
& rSettings
= GetSettings().GetStyleSettings();
72 m_aBgCol
= Color( rSettings
.GetWindowColor() );
74 bool bHC
= rSettings
.GetHighContrastMode();
76 m_aFrameColor
= Color( COL_LIGHTGREEN
);
77 m_aAlignColor
= Color( COL_LIGHTRED
);
78 m_aTransColor
= Color( COL_TRANSPARENT
);
81 svtools::ColorConfig().GetColorValue(svtools::FONTCOLOR
).nColor
:
83 m_aPrintAreaCol
= bHC
? m_aTxtCol
: Color( COL_GRAY
);
84 m_aBorderCol
= m_aTxtCol
;
85 m_aBlankCol
= bHC
? m_aTxtCol
: Color( COL_LIGHTGRAY
);
86 m_aBlankFrameCol
= bHC
? m_aTxtCol
: Color( COL_GRAY
);
89 void SvxSwFrameExample::DataChanged( const DataChangedEvent
& rDCEvt
)
91 Window::DataChanged( rDCEvt
);
93 if( rDCEvt
.GetType() == DATACHANGED_SETTINGS
&& ( rDCEvt
.GetFlags() & SETTINGS_STYLE
) )
97 void SvxSwFrameExample::InitAllRects_Impl()
99 aPage
.SetSize( GetOutputSizePixel() );
101 sal_uIntPtr nOutWPix
= aPage
.GetWidth();
102 sal_uIntPtr nOutHPix
= aPage
.GetHeight();
105 sal_uIntPtr nLBorder
;
106 sal_uIntPtr nRBorder
;
107 sal_uIntPtr nTBorder
;
108 sal_uIntPtr nBBorder
;
110 sal_uIntPtr nLTxtBorder
;
111 sal_uIntPtr nRTxtBorder
;
112 sal_uIntPtr nTTxtBorder
;
113 sal_uIntPtr nBTxtBorder
;
115 if (nAnchor
!= TextContentAnchorType_AS_CHARACTER
)
139 aPagePrtArea
= Rectangle(Point(nLBorder
, nTBorder
), Point((nOutWPix
- 1) - nRBorder
, (nOutHPix
- 1) - nBBorder
));
141 // Example text: Preparing for the text output
143 aTextLine
= aPagePrtArea
;
144 aTextLine
.SetSize(Size(aTextLine
.GetWidth(), 2));
145 aTextLine
.Left() += nLTxtBorder
;
146 aTextLine
.Right() -= nRTxtBorder
;
147 aTextLine
.Move(0, nTTxtBorder
);
149 // Rectangle to edges including paragraph
150 sal_uInt16 nLines
= (sal_uInt16
)((aPagePrtArea
.GetHeight() / 2 - nTTxtBorder
- nBTxtBorder
)
151 / (aTextLine
.GetHeight() + 2));
152 aPara
= aPagePrtArea
;
153 aPara
.SetSize(Size(aPara
.GetWidth(),
154 (aTextLine
.GetHeight() + 2) * nLines
+ nTTxtBorder
+ nBTxtBorder
));
156 // Rectangle around paragraph without borders
157 aParaPrtArea
= aPara
;
158 aParaPrtArea
.Left() += nLTxtBorder
;
159 aParaPrtArea
.Right() -= nRTxtBorder
;
160 aParaPrtArea
.Top() += nTTxtBorder
;
161 aParaPrtArea
.Bottom() -= nBTxtBorder
;
163 if (nAnchor
== TextContentAnchorType_AS_CHARACTER
|| nAnchor
== TextContentAnchorType_AT_CHARACTER
)
165 Font aFont
= OutputDevice::GetDefaultFont(
166 DEFAULTFONT_LATIN_TEXT
, Application::GetSettings().GetLanguageTag().getLanguageType(),
167 DEFAULTFONT_FLAGS_ONLYONE
, this );
168 aFont
.SetColor( m_aTxtCol
);
169 aFont
.SetFillColor( m_aBgCol
);
170 aFont
.SetWeight(WEIGHT_NORMAL
);
172 if (nAnchor
== TextContentAnchorType_AS_CHARACTER
)
174 aFont
.SetSize(Size(0, aParaPrtArea
.GetHeight() - 2));
176 aParaPrtArea
.SetSize(Size(GetTextWidth(OUString(DEMOTEXT
)), GetTextHeight()));
180 aFont
.SetSize(Size(0, aParaPrtArea
.GetHeight() / 2));
182 aAutoCharFrame
.SetSize(Size(GetTextWidth(OUString('A')), GetTextHeight()));
183 aAutoCharFrame
.SetPos(Point(aParaPrtArea
.Left() + (aParaPrtArea
.GetWidth() - aAutoCharFrame
.GetWidth()) / 2,
184 aParaPrtArea
.Top() + (aParaPrtArea
.GetHeight() - aAutoCharFrame
.GetHeight()) / 2));
188 // Inner Frame anchored at the Frame
189 aFrameAtFrame
= aPara
;
190 aFrameAtFrame
.Left() += 9;
191 aFrameAtFrame
.Right() -= 5;
192 aFrameAtFrame
.Bottom() += 5;
193 aFrameAtFrame
.SetPos(Point(aFrameAtFrame
.Left() + 2, (aPagePrtArea
.Bottom() - aFrameAtFrame
.GetHeight()) / 2 + 5));
195 // Size of the frame to be positioned
196 if (nAnchor
!= TextContentAnchorType_AS_CHARACTER
)
198 sal_uIntPtr nLFBorder
= nAnchor
== TextContentAnchorType_AT_PAGE
? nLBorder
: nLTxtBorder
;
199 sal_uIntPtr nRFBorder
= nAnchor
== TextContentAnchorType_AT_PAGE
? nRBorder
: nRTxtBorder
;
203 case RelOrientation::PAGE_LEFT
:
204 case RelOrientation::FRAME_LEFT
:
205 aFrmSize
= Size(nLFBorder
- 4, (aTextLine
.GetHeight() + 2) * 3);
208 case RelOrientation::PAGE_RIGHT
:
209 case RelOrientation::FRAME_RIGHT
:
210 aFrmSize
= Size(nRFBorder
- 4, (aTextLine
.GetHeight() + 2) * 3);
214 aFrmSize
= Size(nLBorder
- 3, (aTextLine
.GetHeight() + 2) * 3);
217 aFrmSize
.Width() = std::max(5L, aFrmSize
.Width());
218 aFrmSize
.Height() = std::max(5L, aFrmSize
.Height());
222 sal_uIntPtr nFreeWidth
= aPagePrtArea
.GetWidth() - GetTextWidth(OUString(DEMOTEXT
));
224 aFrmSize
= Size(nFreeWidth
/ 2, (aTextLine
.GetHeight() + 2) * 3);
225 aDrawObj
.SetSize(Size(std::max(5L, (long)nFreeWidth
/ 3L), std::max(5L, aFrmSize
.Height() * 3L)));
226 aDrawObj
.SetPos(Point(aParaPrtArea
.Right() + 1, aParaPrtArea
.Bottom() / 2));
227 aParaPrtArea
.Right() = aDrawObj
.Right();
231 void SvxSwFrameExample::CalcBoundRect_Impl(Rectangle
&rRect
)
235 case TextContentAnchorType_AT_PAGE
:
239 case RelOrientation::FRAME
:
240 case RelOrientation::PAGE_FRAME
:
241 rRect
.Left() = aPage
.Left();
242 rRect
.Right() = aPage
.Right();
245 case RelOrientation::PRINT_AREA
:
246 case RelOrientation::PAGE_PRINT_AREA
:
247 rRect
.Left() = aPagePrtArea
.Left();
248 rRect
.Right() = aPagePrtArea
.Right();
251 case RelOrientation::PAGE_LEFT
:
252 rRect
.Left() = aPage
.Left();
253 rRect
.Right() = aPagePrtArea
.Left();
256 case RelOrientation::PAGE_RIGHT
:
257 rRect
.Left() = aPagePrtArea
.Right();
258 rRect
.Right() = aPage
.Right();
264 case RelOrientation::PRINT_AREA
:
265 case RelOrientation::PAGE_PRINT_AREA
:
266 rRect
.Top() = aPagePrtArea
.Top();
267 rRect
.Bottom() = aPagePrtArea
.Bottom();
270 case RelOrientation::FRAME
:
271 case RelOrientation::PAGE_FRAME
:
272 rRect
.Top() = aPage
.Top();
273 rRect
.Bottom() = aPage
.Bottom();
279 case TextContentAnchorType_AT_FRAME
:
283 case RelOrientation::FRAME
:
284 case RelOrientation::PAGE_FRAME
:
285 rRect
.Left() = aFrameAtFrame
.Left();
286 rRect
.Right() = aFrameAtFrame
.Right();
289 case RelOrientation::PRINT_AREA
:
290 case RelOrientation::PAGE_PRINT_AREA
:
291 rRect
.Left() = aFrameAtFrame
.Left() + FLYINFLY_BORDER
;
292 rRect
.Right() = aFrameAtFrame
.Right() - FLYINFLY_BORDER
;
295 case RelOrientation::PAGE_RIGHT
:
296 rRect
.Left() = aFrameAtFrame
.Left();
297 rRect
.Right() = aFrameAtFrame
.Left() + FLYINFLY_BORDER
;
300 case RelOrientation::PAGE_LEFT
:
301 rRect
.Left() = aFrameAtFrame
.Right();
302 rRect
.Right() = aFrameAtFrame
.Right() - FLYINFLY_BORDER
;
308 case RelOrientation::FRAME
:
309 case RelOrientation::PAGE_FRAME
:
310 rRect
.Top() = aFrameAtFrame
.Top();
311 rRect
.Bottom() = aFrameAtFrame
.Bottom();
314 case RelOrientation::PRINT_AREA
:
315 case RelOrientation::PAGE_PRINT_AREA
:
316 rRect
.Top() = aFrameAtFrame
.Top() + FLYINFLY_BORDER
;
317 rRect
.Bottom() = aFrameAtFrame
.Bottom() - FLYINFLY_BORDER
;
322 case TextContentAnchorType_AT_PARAGRAPH
:
323 case TextContentAnchorType_AT_CHARACTER
:
327 case RelOrientation::FRAME
:
328 rRect
.Left() = aPara
.Left();
329 rRect
.Right() = aPara
.Right();
332 case RelOrientation::PRINT_AREA
:
333 rRect
.Left() = aParaPrtArea
.Left();
334 rRect
.Right() = aParaPrtArea
.Right();
337 case RelOrientation::PAGE_LEFT
:
338 rRect
.Left() = aPage
.Left();
339 rRect
.Right() = aPagePrtArea
.Left();
342 case RelOrientation::PAGE_RIGHT
:
343 rRect
.Left() = aPagePrtArea
.Right();
344 rRect
.Right() = aPage
.Right();
347 case RelOrientation::PAGE_FRAME
:
348 rRect
.Left() = aPage
.Left();
349 rRect
.Right() = aPage
.Right();
352 case RelOrientation::PAGE_PRINT_AREA
:
353 rRect
.Left() = aPagePrtArea
.Left();
354 rRect
.Right() = aPagePrtArea
.Right();
357 case RelOrientation::FRAME_LEFT
:
358 rRect
.Left() = aPara
.Left();
359 rRect
.Right() = aParaPrtArea
.Left();
362 case RelOrientation::FRAME_RIGHT
:
363 rRect
.Left() = aParaPrtArea
.Right();
364 rRect
.Right() = aPara
.Right();
367 case RelOrientation::CHAR
:
368 rRect
.Left() = aAutoCharFrame
.Left();
369 rRect
.Right() = aAutoCharFrame
.Left();
375 case RelOrientation::FRAME
:
376 rRect
.Top() = aPara
.Top();
377 rRect
.Bottom() = aPara
.Bottom();
380 case RelOrientation::PRINT_AREA
:
381 rRect
.Top() = aParaPrtArea
.Top();
382 rRect
.Bottom() = aParaPrtArea
.Bottom();
385 case RelOrientation::CHAR
:
386 if (nVAlign
!= VertOrientation::NONE
&&
387 nVAlign
!= VertOrientation::CHAR_BOTTOM
)
388 rRect
.Top() = aAutoCharFrame
.Top();
390 rRect
.Top() = aAutoCharFrame
.Bottom();
391 rRect
.Bottom() = aAutoCharFrame
.Bottom();
393 // OD 12.11.2003 #i22341#
394 case RelOrientation::TEXT_LINE
:
395 rRect
.Top() = aAutoCharFrame
.Top();
396 rRect
.Bottom() = aAutoCharFrame
.Top();
402 case TextContentAnchorType_AS_CHARACTER
:
403 rRect
.Left() = aParaPrtArea
.Left();
404 rRect
.Right() = aParaPrtArea
.Right();
408 case VertOrientation::NONE
:
409 case VertOrientation::TOP
:
410 case VertOrientation::CENTER
:
411 case VertOrientation::BOTTOM
:
413 FontMetric
aMetric(GetFontMetric());
415 rRect
.Top() = aParaPrtArea
.Bottom() - aMetric
.GetDescent();
416 rRect
.Bottom() = rRect
.Top();
422 case VertOrientation::LINE_TOP
:
423 case VertOrientation::LINE_CENTER
:
424 case VertOrientation::LINE_BOTTOM
:
425 rRect
.Top() = aParaPrtArea
.Top();
426 rRect
.Bottom() = aDrawObj
.Bottom();
429 case VertOrientation::CHAR_TOP
:
430 case VertOrientation::CHAR_CENTER
:
431 case VertOrientation::CHAR_BOTTOM
:
432 rRect
.Top() = aParaPrtArea
.Top();
433 rRect
.Bottom() = aParaPrtArea
.Bottom();
443 Rectangle
SvxSwFrameExample::DrawInnerFrame_Impl(const Rectangle
&rRect
, const Color
&rFillColor
, const Color
&rBorderColor
)
445 DrawRect_Impl(rRect
, rFillColor
, rBorderColor
);
447 // Bereich, zu dem relativ positioniert wird, bestimmen
448 Rectangle
aRect(rRect
); // aPagePrtArea = Default
449 CalcBoundRect_Impl(aRect
);
451 if (nAnchor
== TextContentAnchorType_AT_FRAME
&& &rRect
== &aPagePrtArea
)
453 // Testabsatz zeichnen
454 Rectangle
aTxt(aTextLine
);
455 sal_Int32 nStep
= aTxt
.GetHeight() + 2;
456 sal_uInt16 nLines
= (sal_uInt16
)(aParaPrtArea
.GetHeight() / (aTextLine
.GetHeight() + 2));
458 for (sal_uInt16 i
= 0; i
< nLines
; i
++)
461 aTxt
.SetSize(Size(aTxt
.GetWidth() / 2, aTxt
.GetHeight()));
462 DrawRect_Impl(aTxt
, m_aTxtCol
, m_aTransColor
);
470 void SvxSwFrameExample::Paint(const Rectangle
&)
475 DrawRect_Impl( aPage
, m_aBgCol
, m_aBorderCol
);
478 Rectangle aRect
= DrawInnerFrame_Impl( aPagePrtArea
, m_aTransColor
, m_aPrintAreaCol
);
480 if (nAnchor
== TextContentAnchorType_AT_FRAME
)
481 aRect
= DrawInnerFrame_Impl( aFrameAtFrame
, m_aBgCol
, m_aBorderCol
);
486 // Horizontal alignment
487 if (nAnchor
!= TextContentAnchorType_AS_CHARACTER
)
491 case HoriOrientation::RIGHT
:
493 lXPos
= aRect
.Right() - aFrmSize
.Width() + 1;
496 case HoriOrientation::CENTER
:
498 lXPos
= aRect
.Left() + (aRect
.GetWidth() - aFrmSize
.Width()) / 2;
501 case HoriOrientation::NONE
:
503 lXPos
= aRect
.Left() + aRelPos
.X();
507 default: // HoriOrientation::LEFT
508 lXPos
= aRect
.Left();
513 lXPos
= aRect
.Right() + 2;
515 // Vertical Alignment
516 if (nAnchor
!= TextContentAnchorType_AS_CHARACTER
)
520 case VertOrientation::BOTTOM
:
521 case VertOrientation::LINE_BOTTOM
:
524 if ( nVRel
!= RelOrientation::TEXT_LINE
)
526 lYPos
= aRect
.Bottom() - aFrmSize
.Height() + 1;
534 case VertOrientation::CENTER
:
535 case VertOrientation::LINE_CENTER
:
537 lYPos
= aRect
.Top() + (aRect
.GetHeight() - aFrmSize
.Height()) / 2;
540 case VertOrientation::NONE
:
543 if ( nVRel
!= RelOrientation::CHAR
&& nVRel
!= RelOrientation::TEXT_LINE
)
544 lYPos
= aRect
.Top() + aRelPos
.Y();
546 lYPos
= aRect
.Top() - aRelPos
.Y();
551 if ( nVRel
!= RelOrientation::TEXT_LINE
)
557 lYPos
= aRect
.Bottom() - aFrmSize
.Height() + 1;
566 case VertOrientation::CENTER
:
567 case VertOrientation::CHAR_CENTER
:
568 case VertOrientation::LINE_CENTER
:
569 lYPos
= aRect
.Top() + (aRect
.GetHeight() - aFrmSize
.Height()) / 2;
572 case VertOrientation::TOP
:
573 case VertOrientation::CHAR_BOTTOM
:
574 case VertOrientation::LINE_BOTTOM
:
575 lYPos
= aRect
.Bottom() - aFrmSize
.Height() + 1;
579 lYPos
= aRect
.Top() - aRelPos
.Y();
584 Rectangle
aFrmRect(Point(lXPos
, lYPos
), aFrmSize
);
586 Rectangle
*pOuterFrame
= &aPage
;
588 if (nAnchor
== TextContentAnchorType_AT_FRAME
)
589 pOuterFrame
= &aFrameAtFrame
;
591 if (aFrmRect
.Left() < pOuterFrame
->Left())
592 aFrmRect
.Move(pOuterFrame
->Left() - aFrmRect
.Left(), 0);
593 if (aFrmRect
.Right() > pOuterFrame
->Right())
594 aFrmRect
.Move(pOuterFrame
->Right() - aFrmRect
.Right(), 0);
596 if (aFrmRect
.Top() < pOuterFrame
->Top())
597 aFrmRect
.Move(0, pOuterFrame
->Top() - aFrmRect
.Top());
598 if (aFrmRect
.Bottom() > pOuterFrame
->Bottom())
599 aFrmRect
.Move(0, pOuterFrame
->Bottom() - aFrmRect
.Bottom());
601 // Draw Test paragraph
602 const long nTxtLineHeight
= aTextLine
.GetHeight();
603 Rectangle
aTxt(aTextLine
);
607 if (nAnchor
== TextContentAnchorType_AT_FRAME
)
609 aTxt
.Left() = aFrameAtFrame
.Left() + FLYINFLY_BORDER
;
610 aTxt
.Right() = aFrameAtFrame
.Right() - FLYINFLY_BORDER
;
611 aTxt
.Top() = aFrameAtFrame
.Top() + FLYINFLY_BORDER
;
612 aTxt
.Bottom() = aTxt
.Top() + aTextLine
.GetHeight() - 1;
614 nStep
= aTxt
.GetHeight() + 2;
615 nLines
= (sal_uInt16
)(((aFrameAtFrame
.GetHeight() - 2 * FLYINFLY_BORDER
) * 2 / 3)
616 / (aTxt
.GetHeight() + 2));
620 nStep
= aTxt
.GetHeight() + 2;
621 nLines
= (sal_uInt16
)(aParaPrtArea
.GetHeight() / (aTextLine
.GetHeight() + 2));
624 if (nAnchor
!= TextContentAnchorType_AS_CHARACTER
)
627 const long nOldR
= aTxt
.Right();
628 const long nOldL
= aTxt
.Left();
631 const bool bIgnoreWrap
= nAnchor
== TextContentAnchorType_AT_CHARACTER
&&
632 ( nHRel
== RelOrientation::CHAR
|| nVRel
== RelOrientation::CHAR
||
633 nVRel
== RelOrientation::TEXT_LINE
);
635 for (sal_uInt16 i
= 0; i
< nLines
; ++i
)
637 if (i
== (nLines
- 1))
638 aTxt
.SetSize(Size(aTxt
.GetWidth() / 2, aTxt
.GetHeight()));
640 if (aTxt
.IsOver(aFrmRect
) && nAnchor
!= TextContentAnchorType_AS_CHARACTER
&& !bIgnoreWrap
)
644 case WrapTextMode_NONE
:
645 aTxt
.Top() = aFrmRect
.Bottom() + nTxtLineHeight
;
646 aTxt
.Bottom() = aTxt
.Top() + nTxtLineHeight
- 1;
649 case WrapTextMode_LEFT
:
650 aTxt
.Right() = aFrmRect
.Left();
653 case WrapTextMode_RIGHT
:
654 aTxt
.Left() = aFrmRect
.Right();
658 if (pOuterFrame
->IsInside(aTxt
))
659 DrawRect_Impl( aTxt
, m_aTxtCol
, m_aTransColor
);
662 aTxt
.Right() = nOldR
;
665 aTxt
.Move(0, -nStep
);
667 if (nAnchor
!= TextContentAnchorType_AT_FRAME
&& aTxt
.Bottom() > aParaPrtArea
.Bottom())
669 // Text has been replaced by frame, so adjust parameters height
670 sal_uIntPtr nDiff
= aTxt
.Bottom() - aParaPrtArea
.Bottom();
671 aParaPrtArea
.Bottom() += nDiff
;
672 aPara
.Bottom() += nDiff
;
674 CalcBoundRect_Impl(aRect
);
676 aParaPrtArea
.Bottom() -= nDiff
;
677 aPara
.Bottom() -= nDiff
;
679 if (nAnchor
== TextContentAnchorType_AT_CHARACTER
&& bIgnoreWrap
)
680 DrawText(aAutoCharFrame
, OUString('A'));
684 DrawText(aParaPrtArea
, OUString(DEMOTEXT
));
685 DrawRect_Impl(aDrawObj
, m_aBlankCol
, m_aBlankFrameCol
);
688 // Draw rectangle on which the frame is aligned:
689 DrawRect_Impl(aRect
, m_aTransColor
, m_aAlignColor
);
692 bool bDontFill
= (nAnchor
== TextContentAnchorType_AT_CHARACTER
&& aFrmRect
.IsOver(aAutoCharFrame
)) ? sal_True
: bTrans
;
693 DrawRect_Impl( aFrmRect
, bDontFill
? m_aTransColor
: m_aBgCol
, m_aFrameColor
);
696 void SvxSwFrameExample::SetRelPos(const Point
& rP
)
711 void SvxSwFrameExample::DrawRect_Impl(const Rectangle
&rRect
, const Color
&rFillColor
, const Color
&rLineColor
)
713 SetFillColor(rFillColor
);
714 SetLineColor(rLineColor
);
715 Window::DrawRect(rRect
);
720 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */