41#include <officecfg/Office/Common.hxx>
54 OSL_ENSURE(
GetFix() >= rInf.
X(),
"SwFlyPortion::Format" );
64 OSL_ENSURE(
Width(),
"+SwFlyPortion::Format: a fly is a fly is a fly" );
85 const sal_uInt16 nNewWidth = o3tl::narrowing<sal_uInt16>(rInf.
X() +
PrtWidth());
86 if( rInf.
Width() <= nNewWidth )
89 if( nNewWidth > rInf.
Width() )
112 const auto nLeft = ( pLastPor &&
118 if( nLeft == rInf.
X() && ! rInf.
GetFly() )
154 if (
nullptr == pObjs )
191 SwFrameFormat* pFrameFormat = pHt->GetFlyCnt().GetFrameFormat();
192 if( pFrameFormat == pSearch )
198 OSL_ENSURE(
false,
"CalcFlyPos: Not Found!");
236 if ( bIsAntiAliasing )
244 if ( bIsAntiAliasing )
262 if(!m_pContact->GetAnchorFrame())
265 m_pContact->ConnectToLayout();
275 , m_nAuthor(
std::string::npos)
285 SAL_WARN_IF(!pFly,
"sw.core",
"SwFlyCntPortion::SwFlyCntPortion: no SwFlyInContentFrame!");
289 : m_pContact(nullptr)
314 return m_pFly->GetVirtDrawObj();
321 pSdrObj = m_pContact->GetDrawObjectByAnchorFrame(rFrame);
324 SAL_WARN(
"sw.core",
"SwFlyCntPortion::SetBase(..) - No drawing object found by <GetDrawContact()->GetDrawObjectByAnchorFrame( rFrame )>");
325 pSdrObj = m_pContact->GetMaster();
332 m_pContact->GetAnchoredObj(pSdrObj)->MakeObjPos();
357 nLnAscent, nLnDescent, nFlyAsc, nFlyDesc );
367 if (pFormat->GetOtherTextBoxFormats()
368 && pFormat->GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR)
372 const bool bModified = pFormat->GetDoc()->getIDocumentState().IsEnableSetModified();
373 pFormat->GetDoc()->getIDocumentState().SetEnableSetModified(
false);
375 pFormat->FindRealSdrObject());
377 pFormat, pFormat->FindRealSdrObject());
378 pFormat->GetDoc()->getIDocumentState().SetEnableSetModified(bModified);
403 Height(
Height() + o3tl::narrowing<sal_uInt16>(nRelPos) );
o3tl::strong_int< sal_Int32, struct Tag_TextFrameIndex > TextFrameIndex
Denotes a character index in a text frame at a layout level, after extent mapping from a text node at...
vcl::text::ComplexTextLayoutFlags GetLayoutMode() const
AntialiasingFlags GetAntialiasing() const
class for the positioning of drawing objects
wrapper class for the positioning of Writer fly frames and drawing objects
virtual SwFrameFormat & GetFrameFormat()=0
virtual const SwFlyFrame * DynCastFlyFrame() const
sal_uInt16 GetFix() const
void SetBase(const SwTextFrame &rFrame, const Point &rBase, tools::Long nLnAscent, tools::Long nLnDescent, tools::Long nFlyAscent, tools::Long nFlyDescent, AsCharFlags nFlags)
After setting the RefPoints, the ascent needs to be recalculated because it is dependent on RelPos.
virtual bool Format(SwTextFormatInfo &rInf) override
SwFlyCntPortion()
Use the dimensions of pFly->OutRect()
const SwVirtFlyDrawObj * GetVirtDrawObj() const
static bool IsPaint(SdrObject *pObj, const SwViewShell *pSh)
virtual void PaintSwFrame(vcl::RenderContext &rRenderContext, SwRect const &, SwPrintData const *const pPrintData=nullptr) const override
Flys that are anchored as a character in the content.
virtual bool Format(SwTextFormatInfo &rInf) override
virtual void Paint(const SwTextPaintInfo &rInf) const override
class SwFlyPortion => we expect a frame-locale SwRect!
void SetBlankWidth(const sal_uInt16 nNew)
const SwRect & getFrameArea() const
Base class of the Writer layout elements.
SwRect GetPaintArea() const
|* The paintarea is the area, in which the content of a frame is allowed |* to be displayed.
void RemoveFly(SwFlyFrame *pToRemove)
const SwSortedObjs * GetDrawObjs() const
bool IsRightToLeft() const
void AppendFly(SwFlyFrame *pNew)
bool IsCompletePaint() const
SwRootFrame * getRootFrame()
void RemoveDrawObj(SwAnchoredObject &_rToRemoveObj)
void AppendDrawObj(SwAnchoredObject &_rNewObj)
void SetFixWidth(const sal_uInt16 nNew)
const SwFrame * Lower() const
Base class for anything that can be part of a line in the Writer layout.
TextFrameIndex mnLineLength
virtual void FormatEOL(SwTextFormatInfo &rInf)
void SetAscent(const SwTwips nNewAsc)
bool IsKernPortion() const
bool IsErgoSumPortion() const
bool IsBreakPortion() const
void SetLen(TextFrameIndex const nLen)
void SetWhichPor(const PortionType nNew)
Helper class for notify that positioning of an anchored object is in progress.
static Color GetColorAnchor(std::size_t aAuthorIndex)
Of course Writer needs its own rectangles.
void Top(const tools::Long nTop)
void Right(const tools::Long nRight)
void Bottom(const tools::Long nBottom)
SwRect & Intersection_(const SwRect &rRect)
void SSize(const Size &rNew)
bool Overlaps(const SwRect &rRect) const
void Left(const tools::Long nLeft)
SwViewShell * GetCurrShell() const
class for collecting anchored objects
virtual void FormatEOL(SwTextFormatInfo &rInf) override
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
static bool syncTextBoxSize(SwFrameFormat *pShape, SdrObject *pObj)
Sets the correct size of textframe depending on the given SdrObject.
static bool changeAnchor(SwFrameFormat *pShape, SdrObject *pObj)
Sets the anchor of the associated textframe of the given shape, and returns true on success.
static void synchronizeGroupTextBoxProperty(bool pFunc(SwFrameFormat *, SdrObject *), SwFrameFormat *pFormat, SdrObject *pObj)
Calls the method given by pFunc with every textboxes of the group given by pFormat.
SwLinePortion * GetLast()
SwTabPortion * GetLastTab()
void SetFly(SwFlyPortion *pNew)
sal_uInt16 RealWidth() const
SwLinePortion * GetRest()
void SetNewLine(const bool bNew)
Represents the visualization of a paragraph.
TextFrameIndex CalcFlyPos(SwFrameFormat const *pSearch)
Calculates the position of FlyInContentFrames.
void SwitchLTRtoRTL(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from LTR to RTL layout.
void SwitchHorizontalToVertical(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from horizontal to vertical layout.
TextFrameIndex MapModelToViewPos(SwPosition const &rPos) const
void MoveFlyInCnt(SwTextFrame *pNew, TextFrameIndex nStart, TextFrameIndex nEnd)
Rewires FlyInContentFrame, if nEnd > Index >= nStart.
SwParaPortion * GetParaPortion()
const SwRect & GetPaintRect() const
SwTextFrame * GetTextFrame()
vcl::RenderContext * GetOut()
SwPosSize GetTextSize(OutputDevice *pOut, const SwScriptInfo *pSI, const OUString &rText, TextFrameIndex nIdx, TextFrameIndex nLen) const
sal_Unicode GetChar(TextFrameIndex const nPos) const
const OUString & GetText() const
TextFrameIndex GetIdx() const
vcl::RenderContext * GetOut() const
sw::LineAlign GetLineAlignment() const
const Point & GetAnchorPos() const
SwTwips GetRelPosY() const
virtual void CalcPosition() override
calculate position for object position
const SwRect & GetObjBoundRectInclSpacing() const
static DrawFlyCntPortion * Create(const SwTextFrame &rFrame, SwFrameFormat const &rFormat, const Point &rBase, tools::Long nAsc, tools::Long nDescent, tools::Long nFlyAsc, tools::Long nFlyDesc, AsCharFlags nFlags)
virtual SdrObject * GetSdrObj(const SwTextFrame &) override
DrawFlyCntPortion(SwFrameFormat const &rFormat)
virtual ~DrawFlyCntPortion() override
SwDrawContact * m_pContact
virtual void Paint(const SwTextPaintInfo &rInf) const override
FlyContentPortion(SwFlyInContentFrame *pFly)
virtual SdrObject * GetSdrObj(const SwTextFrame &) override
SwFlyInContentFrame * m_pFly
virtual ~FlyContentPortion() override
static FlyContentPortion * Create(const SwTextFrame &rFrame, SwFlyInContentFrame *pFly, const Point &rBase, tools::Long nAscent, tools::Long nDescent, tools::Long nFlyAsc, tools::Long nFlyDesc, AsCharFlags nFlags)
virtual void Paint(const SwTextPaintInfo &rInf) const override
SwTextAttr const * NextAttr(SwTextNode const **ppNode=nullptr)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
void SetLineColor(const css::uno::Reference< css::beans::XPropertySet > &xGridProperties, sal_Int32 nColor)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
Dialog to specify the properties of date form field.
Marks a position in the document model.
constexpr sal_Int32 COMPLETE_STRING
HFONT SelectFont(HDC hDC, HFONT hFont)