LibreOffice Module sw (master) 1
|
A TextBox is a TextFrame, that is tied to a drawinglayer shape. More...
#include <textboxhelper.hxx>
Public Types | |
using | SavedLink = std::map< const SwFrameFormat *, const SwFrameFormat * > |
Maps a draw format to a fly format. More... | |
using | SavedContent = std::map< const SwFrameFormat *, SwFormatContent > |
Maps a draw format to content. More... | |
Static Public Member Functions | |
static void | create (SwFrameFormat *pShape, SdrObject *pObject, bool bCopyText=false) |
Create a TextBox for a shape. More... | |
static void | set (SwFrameFormat *pShape, SdrObject *pObject, css::uno::Reference< css::text::XTextFrame > xNew) |
Sets the given textframe as textbox for the given (group member) shape. More... | |
static void | destroy (const SwFrameFormat *pShape, const SdrObject *pObject) |
Destroy a TextBox for a shape. More... | |
static css::uno::Any | queryInterface (const SwFrameFormat *pShape, const css::uno::Type &rType, SdrObject *pObj) |
Get interface of a shape's TextBox, if there is any. More... | |
static void | syncProperty (SwFrameFormat *pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, const css::uno::Any &rValue, SdrObject *pObj=nullptr) |
Sync property of TextBox with the one of the shape. More... | |
static void | syncProperty (SwFrameFormat *pShape, std::u16string_view rPropertyName, const css::uno::Any &rValue, SdrObject *pObj=nullptr) |
Does the same, but works on properties which lack an sw-specific WID / MemberID. More... | |
static void | getProperty (SwFrameFormat const *pShape, sal_uInt16 nWID, sal_uInt8 nMemberID, css::uno::Any &rValue) |
Get a property of the underlying TextFrame. More... | |
static css::uno::Any | getProperty (SwFrameFormat const *pShape, const OUString &rPropName) |
Get a property of the underlying TextFrame. More... | |
static css::text::TextContentAnchorType | mapAnchorType (const RndStdIds &rAnchorID) |
There are two types of enum of anchor type, so this function maps this. More... | |
static void | syncFlyFrameAttr (SwFrameFormat &rShape, SfxItemSet const &rSet, SdrObject *pObj) |
Similar to syncProperty(), but used by the internal API (e.g. for UI purposes). More... | |
static void | updateTextBoxMargin (SdrObject *pObj) |
Copy shape attributes to the text frame. More... | |
static bool | changeAnchor (SwFrameFormat *pShape, SdrObject *pObj) |
Sets the anchor of the associated textframe of the given shape, and returns true on success. More... | |
static bool | doTextBoxPositioning (SwFrameFormat *pShape, SdrObject *pObj) |
Does the positioning for the associated textframe of the shape, and returns true on success. More... | |
static bool | syncTextBoxSize (SwFrameFormat *pShape, SdrObject *pObj) |
Sets the correct size of textframe depending on the given SdrObject. More... | |
static bool | DoTextBoxZOrderCorrection (SwFrameFormat *pShape, const SdrObject *pObj) |
static SwFrameFormat * | getOtherTextBoxFormat (const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr) |
If we have an associated TextFrame, then return that. More... | |
static SwFrameFormat * | getOtherTextBoxFormat (css::uno::Reference< css::drawing::XShape > const &xShape) |
If we have an associated TextFrame, then return that. More... | |
static css::uno::Reference< css::text::XTextFrame > | getUnoTextFrame (css::uno::Reference< css::drawing::XShape > const &xShape) |
If we have an associated TextFrame, then return its XTextFrame. More... | |
static tools::Rectangle | getRelativeTextRectangle (SdrObject *pShape) |
Return the textbox rectangle of a draw shape (in relative twips). More... | |
static bool | isTextBox (const SwFrameFormat *pFormat, sal_uInt16 nType, const SdrObject *pObject=nullptr) |
Is the frame format a text box? More... | |
static bool | hasTextFrame (const SdrObject *pObj) |
Returns true if the SdrObject has a SwTextFrame otherwise false. More... | |
static sal_Int32 | getCount (const SwDoc &rDoc) |
Count number of shapes in the document, excluding TextBoxes. More... | |
static sal_Int32 | getCount (SdrPage const *pPage) |
Count number of shapes on the page, excluding TextBoxes. More... | |
static css::uno::Any | getByIndex (SdrPage const *pPage, sal_Int32 nIndex) |
Get a shape by index, excluding TextBoxes. More... | |
static sal_Int32 | getOrdNum (const SdrObject *pObject) |
Get the order of the shape, excluding TextBoxes. More... | |
static void | getShapeWrapThrough (const SwFrameFormat *pTextBox, bool &rWrapThrough) |
If pTextBox is a textbox, then set rWrapThrough to the surround of its shape. More... | |
static void | saveLinks (const sw::FrameFormats< sw::SpzFrameFormat * > &rFormats, std::map< const SwFrameFormat *, const SwFrameFormat * > &rLinks) |
Saves the current shape -> textbox links in a map, so they can be restored later. More... | |
static void | restoreLinks (std::set< ZSortFly > &rOld, std::vector< SwFrameFormat * > &rNew, SavedLink &rSavedLinks) |
Undo the effect of saveLinks() + individual resetLink() calls. More... | |
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. More... | |
static std::vector< SwFrameFormat * > | CollectTextBoxes (const SdrObject *pGroupObject, SwFrameFormat *pFormat) |
Collect all textboxes of the group given by the pGroupObj Parameter. More... | |
static bool | isAnchorSyncNeeded (const SwFrameFormat *pFirst, const SwFrameFormat *pSecond) |
A TextBox is a TextFrame, that is tied to a drawinglayer shape.
This class provides helper methods to create, query and maintain such TextBoxes.
Definition at line 56 of file textboxhelper.hxx.
using SwTextBoxHelper::SavedContent = std::map<const SwFrameFormat*, SwFormatContent> |
Maps a draw format to content.
Definition at line 62 of file textboxhelper.hxx.
using SwTextBoxHelper::SavedLink = std::map<const SwFrameFormat*, const SwFrameFormat*> |
Maps a draw format to a fly format.
Definition at line 60 of file textboxhelper.hxx.
|
static |
Sets the anchor of the associated textframe of the given shape, and returns true on success.
Definition at line 1204 of file textboxhelper.cxx.
References SwXTextFrame::CreateXTextFrame(), doTextBoxPositioning(), DoTextBoxZOrderCorrection(), SwFormat::GetAnchor(), SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetContentAnchor(), SwFormat::GetDoc(), SwFormat::GetHoriOrient(), SwDoc::GetIDocumentUndoRedo(), getOtherTextBoxFormat(), SwFrameFormat::GetOtherTextBoxFormats(), SwFormatAnchor::GetPageNum(), SwFormatVertOrient::GetRelationOrient(), SwFormatHoriOrient::GetRelationOrient(), SwFormat::GetVertOrient(), isAnchorSyncNeeded(), mapAnchorType(), RES_DRAWFRMFMT(), SAL_WARN, SwFormatAnchor::SetAnchor(), SwFormat::SetFormatAttr(), SwFormatVertOrient::SetRelationOrient(), UNO_NAME_ANCHOR_PAGE_NO, UNO_NAME_ANCHOR_TYPE, UNO_NAME_HORI_ORIENT_RELATION, and UNO_NAME_VERT_ORIENT_RELATION.
Referenced by SwDrawContact::Changed_(), SwDoc::ChgAnchor(), SwTextBoxNode::Clone(), create(), SwFEShell::FindAnchorPos(), SwEditShell::HandleUndoRedoContext(), set(), SwDoc::SetAttr(), SwFlyCntPortion::SetBase(), SwAnchoredDrawObject::SetDrawObjAnchor(), SwXShape::setPropertyValue(), syncProperty(), SwUndoDrawDelete::UndoImpl(), and updateTextBoxMargin().
|
static |
Collect all textboxes of the group given by the pGroupObj Parameter.
Returns with a vector filled with the textboxes.
Definition at line 1591 of file textboxhelper.cxx.
References CollectTextBoxes(), SdrObject::getChildrenOfSdrObject(), getOtherTextBoxFormat(), i, isTextBox(), and RES_DRAWFRMFMT().
Referenced by CollectTextBoxes(), and SwDrawView::DeleteMarked().
|
static |
Create a TextBox for a shape.
If the third parameter is true, the original text in the shape will be copied to the frame The textbox is created for the shape given by the pObject parameter.
Definition at line 63 of file textboxhelper.cxx.
References changeAnchor(), DoTextBoxZOrderCorrection(), DynCastSdrTextObj(), eMode, SwFormat::GetAttrSet(), SfxObjectShell::GetBaseModel(), SwFormat::GetDoc(), SwDoc::GetDocShell(), SwDoc::getIDocumentState(), SwFrameFormat::GetOtherTextBoxFormats(), SwPaM::GetPointNode(), SwXServiceProvider::MakeInstance(), MID_ANCHOR_ANCHORTYPE, MID_FOLLOW_TEXT_FLOW, MID_FRMSIZE_IS_AUTO_HEIGHT, MID_FRMSIZE_SIZE, MID_HORIORIENT_ORIENT, MID_HORIORIENT_POSITION, MID_HORIORIENT_RELATION, MID_VERTORIENT_ORIENT, MID_VERTORIENT_POSITION, MID_VERTORIENT_RELATION, pObject, SfxItemSet::Put(), RES_ANCHOR(), RES_FOLLOW_TEXT_FLOW(), RES_FRAMEDIR(), RES_FRM_SIZE(), RES_HORI_ORIENT(), RES_TEXT_VERT_ADJUST(), RES_VERT_ORIENT(), SwFormat::SetFormatAttr(), IDocumentState::SetModified(), SwFrameFormat::SetOtherTextBoxFormats(), SwNode::StartOfSectionNode(), syncProperty(), syncTextBoxSize(), TypeTextFrame, UNO_NAME_ANCHOR_TYPE, UNO_NAME_BOTTOM_BORDER, UNO_NAME_FILL_TRANSPARENCE, UNO_NAME_HORI_ORIENT, UNO_NAME_HORI_ORIENT_POSITION, UNO_NAME_HORI_ORIENT_RELATION, UNO_NAME_IS_FOLLOWING_TEXT_FLOW, UNO_NAME_LEFT_BORDER, UNO_NAME_RIGHT_BORDER, UNO_NAME_SIZE_TYPE, UNO_NAME_SURROUND, UNO_NAME_TEXT_AUTOGROWHEIGHT, UNO_NAME_TEXT_VERT_ADJUST, UNO_NAME_TEXT_WRITINGMODE, UNO_NAME_TOP_BORDER, UNO_NAME_VERT_ORIENT, UNO_NAME_VERT_ORIENT_POSITION, UNO_NAME_VERT_ORIENT_RELATION, and sw::XTextRangeToSwPaM().
Referenced by SwDrawShell::Execute(), and SwXShape::setPropertyValue().
|
static |
Destroy a TextBox for a shape.
If the format has more textboxes like group shapes, it will destroy only that textbox what belongs to the given pObject shape.
Definition at line 285 of file textboxhelper.cxx.
References SwFrameFormat::GetOtherTextBoxFormats(), and pObject.
Referenced by SwDrawShell::Execute(), and SwXShape::setPropertyValue().
|
static |
Does the positioning for the associated textframe of the shape, and returns true on success.
Definition at line 1313 of file textboxhelper.cxx.
References SwNode::FindFlyStartNode(), SwFrameFormat::FindRealSdrObject(), SwNode::FindTableNode(), SwFormat::GetAnchor(), SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetAnchorNode(), SwFormat::GetDoc(), SwFormat::GetFollowTextFlow(), SwFormat::GetFrameSize(), SvxSizeItem::GetHeight(), SwFormatHoriOrient::GetHoriOrient(), SwFormat::GetHoriOrient(), SwDoc::GetIDocumentUndoRedo(), SvxLRSpaceItem::GetLeft(), SwFormat::GetLRSpace(), getOtherTextBoxFormat(), SwFrameFormat::GetOtherTextBoxFormats(), SwFormatVertOrient::GetPos(), SwFormatHoriOrient::GetPos(), SwFormatVertOrient::GetRelationOrient(), SwFormatHoriOrient::GetRelationOrient(), SdrObject::GetRelativePos(), getRelativeTextRectangle(), SfxBoolItem::GetValue(), SwFormatVertOrient::GetVertOrient(), SwFormat::GetVertOrient(), Point::getX(), Point::getY(), tools::Rectangle::Left(), SwPostItHelper::NONE, RES_DRAWFRMFMT(), SwFormat::SetFormatAttr(), SwFormatHoriOrient::SetHoriOrient(), SwFormatVertOrient::SetPos(), SwFormatHoriOrient::SetPos(), SwFormatVertOrient::SetRelationOrient(), SwFormatHoriOrient::SetRelationOrient(), SwFormatVertOrient::SetVertOrient(), Point::setX(), Point::setY(), and tools::Rectangle::Top().
Referenced by changeAnchor(), and SwTextBoxNode::Clone().
|
static |
Definition at line 1513 of file textboxhelper.cxx.
References SwFrameFormat::FindRealSdrObject(), SwFormat::GetDoc(), IDocumentDrawModelAccess::GetDrawModel(), SwDoc::getIDocumentDrawModelAccess(), SdrObject::GetOrdNum(), getOtherTextBoxFormat(), SdrModel::GetPage(), SdrObjList::RecalcObjOrdNums(), RES_DRAWFRMFMT(), and SAL_WARN.
Referenced by changeAnchor(), SwFEShell::ChangeOpaque(), SwTextBoxNode::Clone(), create(), SwFEShell::SelectionToBottom(), SwFEShell::SelectionToTop(), syncFlyFrameAttr(), and updateTextBoxMargin().
Get a shape by index, excluding TextBoxes.
css::lang::IndexOutOfBoundsException |
Definition at line 360 of file textboxhelper.cxx.
References SdrObjList::GetObj(), SdrObjList::GetObjCount(), SdrObject::getUnoShape(), i, nCount, nIndex, and p.
Referenced by SwFmDrawPage::getByIndex().
|
static |
Count number of shapes in the document, excluding TextBoxes.
Definition at line 349 of file textboxhelper.cxx.
References SwDoc::GetSpzFrameFormats(), isTextBox(), and RES_FLYFRMFMT().
Referenced by SwFmDrawPage::getCount().
|
static |
Count number of shapes on the page, excluding TextBoxes.
Definition at line 336 of file textboxhelper.cxx.
References SdrObjList::GetObj(), SdrObjList::GetObjCount(), i, and p.
|
static |
Get the order of the shape, excluding TextBoxes.
Definition at line 386 of file textboxhelper.cxx.
References i, p, pObject, and SAL_WARN.
Referenced by SwXShape::getPropertyValue().
|
static |
If we have an associated TextFrame, then return that.
If we have more textboxes for this format (group shape), that one will be returned, what belongs to the pObject.
nType | Expected frame format type. Valid types are RES_DRAWFRMFMT and RES_FLYFRMFMT. |
Definition at line 413 of file textboxhelper.cxx.
References SwFrameFormat::FindRealSdrObject(), SwFrameFormat::GetOtherTextBoxFormats(), isTextBox(), nType, pObject, RES_DRAWFRMFMT(), and RES_FLYFRMFMT().
Referenced by SwDrawVirtObj::AddToDrawingPage(), SwPageFrame::AppendFlyToPage(), objectpositioning::SwToContentAnchoredObjectPosition::CalcOverlap(), changeAnchor(), CollectTextBoxes(), SwDrawContact::ConnectToLayout(), SwFEShell::CopyDrawSel(), SwDrawView::DeleteMarked(), doTextBoxPositioning(), DoTextBoxZOrderCorrection(), SwFEShell::FindAnchorPos(), SwFlyFrame::Format(), SwFrame::GetBackgroundBrush(), SwFlyDrawContact::GetOrdNumForNewRef(), getProperty(), getShapeWrapThrough(), getUnoTextFrame(), hasTextFrame(), lcl_goIntoTextBox(), lcl_queryInterface(), SwFlyAtContentFrame::MakeAll(), SwEditWin::MouseButtonUp(), saveLinks(), SwFEShell::SelectObj(), SwTextFlyCnt::SetAnchor(), RtfSdrExport::StartShape(), syncFlyFrameAttr(), syncProperty(), syncTextBoxSize(), updateTextBoxMargin(), DocxAttributeOutput::WriteTextBox(), and DocxAttributeOutput::WriteVMLTextBox().
|
static |
If we have an associated TextFrame, then return that.
|
static |
Get a property of the underlying TextFrame.
Definition at line 712 of file textboxhelper.cxx.
References SwXTextFrame::CreateXTextFrame(), SwFormat::GetDoc(), getOtherTextBoxFormat(), and RES_DRAWFRMFMT().
|
static |
Get a property of the underlying TextFrame.
Definition at line 678 of file textboxhelper.cxx.
References SwFormat::GetChain(), SwFormat::GetName(), getOtherTextBoxFormat(), MID_CHAIN_NAME, MID_CHAIN_NEXTNAME, MID_CHAIN_PREVNAME, SwFormatChain::QueryValue(), RES_CHAIN(), RES_DRAWFRMFMT(), and SAL_WARN.
Referenced by SwXShape::getPropertyValue(), and SwFlyAtContentFrame::MakeAll().
|
static |
Return the textbox rectangle of a draw shape (in relative twips).
Definition at line 499 of file textboxhelper.cxx.
References Point::AdjustX(), Point::AdjustY(), tools::Rectangle::Center(), SdrObject::GetCurrentBoundRect(), SdrObject::GetLogicRect(), tools::Rectangle::GetSize(), SdrObject::GetSnapRect(), Size::Height(), tools::Rectangle::Left(), tools::Rectangle::Move(), tools::Rectangle::SetEmpty(), tools::Rectangle::Top(), and Size::Width().
Referenced by doTextBoxPositioning(), SwFlyAtContentFrame::MakeAll(), syncFlyFrameAttr(), syncProperty(), and syncTextBoxSize().
|
static |
If pTextBox is a textbox, then set rWrapThrough to the surround of its shape.
Definition at line 406 of file textboxhelper.cxx.
References getOtherTextBoxFormat(), SwFormatSurround::GetSurround(), SwFormat::GetSurround(), and RES_FLYFRMFMT().
Referenced by SwTabFrame::CalcFlyOffsets(), objectpositioning::SwAnchoredObjectPosition::GetHoriAlignmentValues(), and objectpositioning::SwAnchoredObjectPosition::GetTopForObjPos().
|
static |
If we have an associated TextFrame, then return its XTextFrame.
Definition at line 447 of file textboxhelper.cxx.
References getOtherTextBoxFormat().
Referenced by DocxAttributeOutput::GetUnoTextFrame(), and SwFmDrawPage::remove().
|
static |
Returns true if the SdrObject has a SwTextFrame otherwise false.
Definition at line 325 of file textboxhelper.cxx.
References getOtherTextBoxFormat(), and SdrObject::getWeakUnoShape().
Referenced by SwDrawShell::ExecDrawDlg(), and SwDrawBaseShell::Execute().
|
static |
Definition at line 1612 of file textboxhelper.cxx.
References SwFormat::GetAnchor(), SwFrameFormat::GetOtherTextBoxFormats(), RES_DRAWFRMFMT(), RES_FLYFRMFMT(), and SwFormat::Which().
Referenced by changeAnchor().
|
static |
Is the frame format a text box?
A text box consists of a coupled fly and draw format. Most times you just want to check for a single type, otherwise you get duplicate results.
pFormat | Is this format have a textbox? |
nType | Expected frame format input type. Valid types are RES_DRAWFRMFMT and RES_FLYFRMFMT. |
pObject | If the pFormat has more textboxes than one, like groupshapes, the textbox what belongs to the given pObject will be inspected. If this parameter nullptr, the textbox what belongs to the pObject will only be inspected. |
Definition at line 297 of file textboxhelper.cxx.
References DBG_TESTSOLARMUTEX, SwFrameFormat::FindRealSdrObject(), SwFrameFormat::GetOtherTextBoxFormats(), nType, pObject, RES_DRAWFRMFMT(), RES_FLYFRMFMT(), and SwFormat::Which().
Referenced by objectpositioning::SwToContentAnchoredObjectPosition::CalcOverlap(), CollectTextBoxes(), sw::DocumentContentOperationsManager::CopyFlyInFlyImpl(), SwXMLExport::ExportTable(), SwFEShell::FindAnchorPos(), getCount(), SwDoc::GetFlyCount(), SwDoc::GetFlyFrameFormats(), SwDoc::GetFlyNum(), objectpositioning::SwAnchoredObjectPosition::GetInfoAboutObj(), SwAnchoredDrawObject::GetObjBoundRect(), getOtherTextBoxFormat(), SwXShape::getPropertyStates(), SwXShape::getPropertyValue(), SwDrawShell::GetState(), SwVirtFlyDrawObj::IsTextBox(), DocxSdrExport::isTextBox(), RtfSdrExport::isTextBox(), lcl_ExportHints(), lcl_isTextBox(), lcl_textBoxSizeNotify(), SwFEShell::SelectionToBottom(), SwFEShell::SelectionToTop(), SwDoc::SetAttr(), and SwAnchoredDrawObject::SetDrawObjAnchor().
|
static |
There are two types of enum of anchor type, so this function maps this.
Definition at line 993 of file textboxhelper.cxx.
References SAL_WARN.
Referenced by changeAnchor(), and syncFlyFrameAttr().
|
static |
Get interface of a shape's TextBox, if there is any.
Definition at line 478 of file textboxhelper.cxx.
Referenced by SwXShape::getPropertyValue(), and SwXShape::queryInterface().
|
static |
Undo the effect of saveLinks() + individual resetLink() calls.
Definition at line 972 of file textboxhelper.cxx.
References i.
Referenced by sw::DocumentContentOperationsManager::CopyFlyInFlyImpl().
|
static |
Saves the current shape -> textbox links in a map, so they can be restored later.
Definition at line 962 of file textboxhelper.cxx.
References getOtherTextBoxFormat(), and RES_DRAWFRMFMT().
Referenced by sw::DocumentContentOperationsManager::CopyFlyInFlyImpl().
|
static |
Sets the given textframe as textbox for the given (group member) shape.
Definition at line 200 of file textboxhelper.cxx.
References changeAnchor(), eMode, SwFrameFormat::GetOtherTextBoxFormats(), SdrObject::getUnoShape(), MID_ANCHOR_ANCHORTYPE, MID_FRMSIZE_IS_AUTO_HEIGHT, MID_FRMSIZE_SIZE, MID_HORIORIENT_ORIENT, MID_HORIORIENT_POSITION, MID_HORIORIENT_RELATION, MID_VERTORIENT_ORIENT, MID_VERTORIENT_POSITION, MID_VERTORIENT_RELATION, RES_ANCHOR(), RES_FRAMEDIR(), RES_FRM_SIZE(), RES_HORI_ORIENT(), RES_VERT_ORIENT(), SwFrameFormat::SetOtherTextBoxFormats(), synchronizeGroupTextBoxProperty(), syncProperty(), syncTextBoxSize(), UNO_NAME_ANCHOR_TYPE, UNO_NAME_BOTTOM_BORDER, UNO_NAME_FILL_TRANSPARENCE, UNO_NAME_HORI_ORIENT, UNO_NAME_HORI_ORIENT_POSITION, UNO_NAME_HORI_ORIENT_RELATION, UNO_NAME_LEFT_BORDER, UNO_NAME_RIGHT_BORDER, UNO_NAME_SIZE_TYPE, UNO_NAME_SURROUND, UNO_NAME_TEXT_AUTOGROWHEIGHT, UNO_NAME_TEXT_VERT_ADJUST, UNO_NAME_TEXT_WRITINGMODE, UNO_NAME_TOP_BORDER, UNO_NAME_VERT_ORIENT, UNO_NAME_VERT_ORIENT_POSITION, UNO_NAME_VERT_ORIENT_RELATION, and updateTextBoxMargin().
Referenced by SwXShape::setPropertyValue().
|
static |
Similar to syncProperty(), but used by the internal API (e.g. for UI purposes).
Definition at line 1021 of file textboxhelper.cxx.
References aFrameFormatSetRange, SfxItemSet::Count(), DoTextBoxZOrderCorrection(), SwFrameFormat::FindRealSdrObject(), SwNode::FindTableNode(), SwFormat::GetAnchor(), SwFormatAnchor::GetAnchorId(), SwFormatAnchor::GetAnchorNode(), SwDoc::GetAttrPool(), SfxItemIter::GetCurItem(), SwFormat::GetDoc(), SwFormat::GetFollowTextFlow(), SwFormat::GetFrameSize(), SwFormat::GetHoriOrient(), tools::Rectangle::getOpenHeight(), tools::Rectangle::getOpenWidth(), getOtherTextBoxFormat(), SwFrameFormat::GetOtherTextBoxFormats(), SwFormatAnchor::GetPageNum(), SwFormatVertOrient::GetPos(), SwFormatHoriOrient::GetPos(), SwFormatVertOrient::GetRelationOrient(), SwFormatHoriOrient::GetRelationOrient(), SdrObject::GetRelativePos(), getRelativeTextRectangle(), SfxBoolItem::GetValue(), SwFormat::GetVertOrient(), Point::getX(), Point::getY(), tools::Rectangle::IsEmpty(), tools::Rectangle::Left(), mapAnchorType(), MID_ANCHOR_ANCHORTYPE, SfxItemIter::NextItem(), SfxItemSet::Put(), RES_ANCHOR(), RES_DRAWFRMFMT(), RES_FRM_SIZE(), RES_HORI_ORIENT(), RES_VERT_ORIENT(), rSet, SAL_WARN, SwFormat::SetFormatAttr(), SvxSizeItem::SetHeight(), SwFormatVertOrient::SetPos(), SwFormatHoriOrient::SetPos(), SwFormatVertOrient::SetRelationOrient(), SwFormatHoriOrient::SetRelationOrient(), SvxSizeItem::SetWidth(), SfxPoolItem::StaticWhichCast(), syncProperty(), tools::Rectangle::Top(), and SfxPoolItem::Which().
Referenced by SwDrawContact::Changed_(), SwFEShell::CopyDrawSel(), SwFEShell::FindAnchorPos(), lcl_textBoxSizeNotify(), and SwDoc::SetAttr().
|
static |
Calls the method given by pFunc with every textboxes of the group given by pFormat.
Definition at line 1577 of file textboxhelper.cxx.
References SdrObject::getChildrenOfSdrObject(), i, and synchronizeGroupTextBoxProperty().
Referenced by SwDrawContact::Changed_(), SwDoc::ChgAnchor(), SwEditShell::HandleUndoRedoContext(), set(), SwFlyCntPortion::SetBase(), SwXShape::setPropertyValue(), synchronizeGroupTextBoxProperty(), and SwUndoDrawDelete::UndoImpl().
|
static |
Sync property of TextBox with the one of the shape.
Definition at line 727 of file textboxhelper.cxx.
References BOTTOM_BORDER_DISTANCE, changeAnchor(), convertTwipToMm100(), SwXTextFrame::CreateXTextFrame(), SwFrameFormat::FindRealSdrObject(), FN_TEXT_RANGE, SwFormat::GetAnchor(), SwFormatAnchor::GetAnchorId(), SwFormat::GetDoc(), tools::Rectangle::getOpenHeight(), tools::Rectangle::getOpenWidth(), getOtherTextBoxFormat(), SwFrameFormat::GetOtherTextBoxFormats(), getRelativeTextRectangle(), tools::Rectangle::IsEmpty(), tools::Rectangle::Left(), LEFT_BORDER_DISTANCE, MID_ALLOW_OVERLAP, MID_ANCHOR_ANCHORTYPE, MID_CHAIN_NEXTNAME, MID_CHAIN_PREVNAME, MID_FRMSIZE_IS_AUTO_HEIGHT, MID_FRMSIZE_REL_HEIGHT_RELATION, MID_FRMSIZE_REL_WIDTH_RELATION, MID_FRMSIZE_WIDTH_TYPE, MID_HORIORIENT_ORIENT, MID_HORIORIENT_POSITION, MID_HORIORIENT_RELATION, MID_L_MARGIN, MID_R_MARGIN, MID_VERTORIENT_ORIENT, MID_VERTORIENT_POSITION, MID_VERTORIENT_RELATION, nValue, RES_ANCHOR(), RES_BOX(), RES_CHAIN(), RES_DRAWFRMFMT(), RES_FRAMEDIR(), RES_FRM_SIZE(), RES_HORI_ORIENT(), RES_LR_SPACE(), RES_OPAQUE(), RES_TEXT_VERT_ADJUST(), RES_VERT_ORIENT(), RES_WRAP_INFLUENCE_ON_OBJPOS(), RIGHT_BORDER_DISTANCE, SAL_WARN, SwFormatAnchor::SetAnchor(), SwFormat::SetFormatAttr(), SwPaM::Start(), tools::Rectangle::Top(), TOP_BORDER_DISTANCE, UNO_NAME_ALLOW_OVERLAP, UNO_NAME_BOTTOM_BORDER_DISTANCE, UNO_NAME_CHAIN_NEXT_NAME, UNO_NAME_CHAIN_PREV_NAME, UNO_NAME_FRAME_ISAUTOMATIC_HEIGHT, UNO_NAME_HORI_ORIENT, UNO_NAME_HORI_ORIENT_POSITION, UNO_NAME_HORI_ORIENT_RELATION, UNO_NAME_LEFT_BORDER_DISTANCE, UNO_NAME_LEFT_MARGIN, UNO_NAME_OPAQUE, UNO_NAME_RELATIVE_HEIGHT_RELATION, UNO_NAME_RELATIVE_WIDTH_RELATION, UNO_NAME_RIGHT_BORDER_DISTANCE, UNO_NAME_RIGHT_MARGIN, UNO_NAME_SIZE, UNO_NAME_TEXT_VERT_ADJUST, UNO_NAME_TOP_BORDER_DISTANCE, UNO_NAME_VERT_ORIENT, UNO_NAME_VERT_ORIENT_POSITION, UNO_NAME_VERT_ORIENT_RELATION, UNO_NAME_WIDTH_TYPE, UNO_NAME_WRITING_MODE, and sw::XTextRangeToSwPaM().
Referenced by create(), SwAnchoredDrawObject::GetObjBoundRect(), set(), SwXShape::setPropertyValue(), SwXShape::setSize(), syncFlyFrameAttr(), syncProperty(), and updateTextBoxMargin().
|
static |
Does the same, but works on properties which lack an sw-specific WID / MemberID.
Definition at line 541 of file textboxhelper.cxx.
References BOTTOM_BORDER_DISTANCE, convertTwipToMm100(), SwXTextFrame::CreateXTextFrame(), eMode, comphelper::SequenceAsHashMap::end(), comphelper::SequenceAsHashMap::find(), SwFrameFormat::FindRealSdrObject(), SwFormat::GetDoc(), getOtherTextBoxFormat(), tools::Rectangle::Left(), LEFT_BORDER_DISTANCE, MID_FRMSIZE_IS_AUTO_HEIGHT, MID_FRMSIZE_SIZE, MID_HORIORIENT_POSITION, MID_VERTORIENT_POSITION, pObject, RES_BOX(), RES_DRAWFRMFMT(), RES_FRAMEDIR(), RES_FRM_SIZE(), RES_HORI_ORIENT(), RES_TEXT_VERT_ADJUST(), RES_VERT_ORIENT(), RIGHT_BORDER_DISTANCE, SAL_INFO, SAL_WARN, syncProperty(), tools::Rectangle::Top(), TOP_BORDER_DISTANCE, u, UNO_NAME_PARA_ADJUST, UNO_NAME_TEXT_AUTOGROWHEIGHT, UNO_NAME_TEXT_HORZADJUST, UNO_NAME_TEXT_LEFTDIST, UNO_NAME_TEXT_LOWERDIST, UNO_NAME_TEXT_RIGHTDIST, UNO_NAME_TEXT_UPPERDIST, UNO_NAME_TEXT_VERT_ADJUST, and UNO_NAME_TEXT_WRITINGMODE.
|
static |
Sets the correct size of textframe depending on the given SdrObject.
Definition at line 1493 of file textboxhelper.cxx.
References getOtherTextBoxFormat(), SwFrameFormat::GetOtherTextBoxFormats(), getRelativeTextRectangle(), tools::Rectangle::GetSize(), RES_DRAWFRMFMT(), and SvxSizeItem::SetSize().
Referenced by SwDrawContact::Changed_(), SwTextBoxNode::Clone(), create(), set(), and SwFlyCntPortion::SetBase().
|
static |
Copy shape attributes to the text frame.
Definition at line 1160 of file textboxhelper.cxx.
References changeAnchor(), DoTextBoxZOrderCorrection(), getOtherTextBoxFormat(), SdrObject::getUnoShape(), MID_FRMSIZE_IS_AUTO_HEIGHT, MID_FRMSIZE_WIDTH_TYPE, RES_FLYFRMFMT(), RES_FRM_SIZE(), syncProperty(), UNO_NAME_TEXT_AUTOGROWHEIGHT, UNO_NAME_TEXT_HORZADJUST, UNO_NAME_TEXT_LEFTDIST, UNO_NAME_TEXT_LOWERDIST, UNO_NAME_TEXT_RIGHTDIST, UNO_NAME_TEXT_UPPERDIST, UNO_NAME_TEXT_VERTADJUST, and UNO_NAME_TEXT_WORDWRAP.
Referenced by SwDrawShell::ExecDrawDlg(), and set().