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>
55 using SavedLink = std::map<const SwFrameFormat*, const SwFrameFormat*>;
57 using SavedContent = std::map<const SwFrameFormat*, SwFormatContent>;
64 css::uno::Reference<css::text::XTextFrame> xNew);
75 const css::uno::Any& rValue,
SdrObject* pObj =
nullptr);
77 static void syncProperty(
SwFrameFormat* pShape, std::u16string_view rPropertyName,
78 const css::uno::Any& rValue,
SdrObject* pObj =
nullptr);
81 css::uno::Any& rValue);
86 static css::text::TextContentAnchorType mapAnchorType(
const RndStdIds& rAnchorID);
92 static void updateTextBoxMargin(
SdrObject* pObj);
124 getOtherTextBoxFormat(css::uno::Reference<css::drawing::XShape>
const& xShape);
126 static css::uno::Reference<css::text::XTextFrame>
127 getUnoTextFrame(css::uno::Reference<css::drawing::XShape>
const& xShape);
147 static bool isTextBox(
const SwFrameFormat* pFormat, sal_uInt16 nType,
151 static bool hasTextFrame(
const SdrObject* pObj);
154 static sal_Int32 getCount(
const SwDoc& rDoc);
156 static sal_Int32 getCount(
SdrPage const* pPage);
160 static css::uno::Any getByIndex(
SdrPage const* pPage, sal_Int32 nIndex);
162 static sal_Int32 getOrdNum(
const SdrObject* pObject);
164 static void getShapeWrapThrough(
const SwFrameFormat* pTextBox,
bool& rWrapThrough);
168 std::map<const SwFrameFormat*, const SwFrameFormat*>& rLinks);
170 static void restoreLinks(std::set<ZSortFly>& rOld, std::vector<SwFrameFormat*>& rNew,
179 static std::vector<SwFrameFormat*> CollectTextBoxes(
const SdrObject* pGroupObject,
255 #endif // INCLUDED_SW_INC_TEXTBOXHELPER_HXX
SwFrameFormat * GetTextBox(const SdrObject *pDrawObject) const
SwFrameFormat * m_pTextBoxFormat
Textboxes are basically textframe + shape pairs.
Content, content of frame (header, footer, fly).
A TextBox is a TextFrame, that is tied to a drawinglayer shape.
std::vector< SwTextBoxElement > m_pTextBoxes
std::map< const SwFrameFormat *, const SwFrameFormat * > SavedLink
Maps a draw format to a fly format.
void AddTextBox(SdrObject *pDrawObject, SwFrameFormat *pNewTextBox)
Reference< deployment::XPackageRegistry > create(Reference< deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, Reference< XComponentContext > const &xComponentContext)
OUString getProperty(uno::Reference< beans::XPropertyContainer > const &rxPropertyContainer, OUString const &rName)
SwFrameFormat * GetOwnerShape()
Helper to copy paragraph-bound Flys.
SwFrameFormat * m_pOwnerShapeFormat
SdrObject * m_pDrawObject
size_t GetTextBoxCount() const
std::map< const SwFrameFormat *, SwFormatContent > SavedContent
Maps a draw format to content.
bool IsTextBoxActive(const SdrObject *pDrawObject) const
void SetTextBoxActive(const SdrObject *pDrawObject)
bool IsGroupTextBox() const
std::map< SdrObject *, SwFrameFormat * > GetAllTextBoxes() const
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
void SetTextBoxInactive(const SdrObject *pDrawObject)
void set(css::uno::UnoInterfaceReference const &value)
void DelTextBox(const SdrObject *pDrawObject, bool bDelFromDoc=false)