10#ifndef INCLUDED_SW_INC_TEXTBOXHELPER_HXX
11#define INCLUDED_SW_INC_TEXTBOXHELPER_HXX
17#include <com/sun/star/uno/Any.hxx>
18#include <com/sun/star/uno/Type.h>
19#include <com/sun/star/text/TextContentAnchorType.hpp>
46template <
class T>
class FrameFormats;
60 using SavedLink = std::map<const SwFrameFormat*, const SwFrameFormat*>;
62 using SavedContent = std::map<const SwFrameFormat*, SwFormatContent>;
69 css::uno::Reference<css::text::XTextFrame> xNew);
80 const css::uno::Any& rValue,
SdrObject* pObj =
nullptr);
82 static void syncProperty(
SwFrameFormat* pShape, std::u16string_view rPropertyName,
83 const css::uno::Any& rValue,
SdrObject* pObj =
nullptr);
86 css::uno::Any& rValue);
91 static css::text::TextContentAnchorType mapAnchorType(
const RndStdIds& rAnchorID);
97 static void updateTextBoxMargin(
SdrObject* pObj);
131 static css::uno::Reference<css::text::XTextFrame>
132 getUnoTextFrame(css::uno::Reference<css::drawing::XShape>
const& xShape);
152 static bool isTextBox(
const SwFrameFormat* pFormat, sal_uInt16 nType,
156 static bool hasTextFrame(
const SdrObject* pObj);
159 static sal_Int32 getCount(
const SwDoc& rDoc);
161 static sal_Int32 getCount(
SdrPage const* pPage);
165 static css::uno::Any getByIndex(
SdrPage const* pPage, sal_Int32 nIndex);
167 static sal_Int32 getOrdNum(
const SdrObject* pObject);
169 static void getShapeWrapThrough(
const SwFrameFormat* pTextBox,
bool& rWrapThrough);
173 std::map<const SwFrameFormat*, const SwFrameFormat*>& rLinks);
175 static void restoreLinks(std::set<ZSortFly>& rOld, std::vector<SwFrameFormat*>& rNew,
184 static std::vector<SwFrameFormat*> CollectTextBoxes(
const SdrObject* pGroupObject,
271 bool bMakeFrame)
const;
276 bool bMakeFrame)
const;
Content, content of frame (header, footer, fly).
A TextBox is a TextFrame, that is tied to a drawinglayer shape.
std::map< const SwFrameFormat *, SwFormatContent > SavedContent
Maps a draw format to content.
static SwFrameFormat * getOtherTextBoxFormat(css::uno::Reference< css::drawing::XShape > const &xShape)
If we have an associated TextFrame, then return that.
std::map< const SwFrameFormat *, const SwFrameFormat * > SavedLink
Maps a draw format to a fly format.
SwTextBoxNode & m_rTextBoxes
SwTextBoxLockGuard(SwTextBoxNode &rTextBoxes)
Textboxes are basically textframe + shape pairs.
bool m_bIsCloningInProgress
void AddTextBox(SdrObject *pDrawObject, SwFrameFormat *pNewTextBox)
void Clone_Impl(SwDoc *pDoc, const SwFormatAnchor &rNewAnc, SwFrameFormat *o_pTarget, const SdrObject *pSrcObj, SdrObject *pDestObj, bool bSetAttr, bool bMakeFrame) const
SwFrameFormat * GetTextBox(const SdrObject *pDrawObject) const
std::map< SdrObject *, SwFrameFormat * > GetAllTextBoxes() const
bool IsGroupTextBox() const
void Clone(SwDoc *pDoc, const SwFormatAnchor &rNewAnc, SwFrameFormat *o_pTarget, bool bSetAttr, bool bMakeFrame) const
SwFrameFormat * m_pOwnerShapeFormat
std::vector< SwTextBoxElement > m_pTextBoxes
void DelTextBox(const SdrObject *pDrawObject, bool bDelFromDoc=false)
SwTextBoxNode(const SwTextBoxNode &)=default
size_t GetTextBoxCount() const
SwFrameFormat * GetOwnerShape()
Helper to copy paragraph-bound Flys.
void set(css::uno::UnoInterfaceReference const &value)
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
css::uno::Reference< css::deployment::XPackageRegistry > create(css::uno::Reference< css::deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, css::uno::Reference< css::uno::XComponentContext > const &xComponentContext)
SVX_DLLPUBLIC OUString getProperty(css::uno::Reference< css::beans::XPropertyContainer > const &rxPropertyContainer, OUString const &rName)
Dialog to specify the properties of date form field.
SdrObject * m_pDrawObject
SwFrameFormat * m_pTextBoxFormat