summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorAttila Bakos (NISZ) <bakos.attilakaroly@nisz.hu>2020-09-30 11:24:14 +0200
committerLászló Németh <nemeth@numbertext.org>2020-10-14 08:56:02 +0200
commit726c911b90b9a3170fa6b3a34bb952a8d2dbe148 (patch)
tree91543b2ec8d32767485cfe15e0aac2d8895e1abd /sw/inc
parent16e88bd68c523117fee9070c986151a781c0e7bf (diff)
tdf#137025 sw: apply textbox padding set in Text
dialog window using Spacing to Borders in Format->Text Box and Shape->Text attributes... on the selected text box. There are two types of text boxes in sw, the older editeng one, what worked fine, and the newer one, the shape + text frame one, where modifying Spacing to Borders had no effect. This has been fixed by copying the modified shape attributes to the associated text frame. Change-Id: I8da0b414fd4771fa86851d9a6affbd9502894ebf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103674 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/textboxhelper.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
index 5d58305406c2..1c4a723cc07b 100644
--- a/sw/inc/textboxhelper.hxx
+++ b/sw/inc/textboxhelper.hxx
@@ -69,6 +69,9 @@ public:
/// Similar to syncProperty(), but used by the internal API (e.g. for UI purposes).
static void syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet const& rSet);
+ /// Copy shape attributes to the text frame
+ static void updateTextBoxMargin(SdrObject* pObj);
+
/**
* If we have an associated TextFrame, then return that.
*
@@ -95,6 +98,9 @@ public:
*/
static bool isTextBox(const SwFrameFormat* pFormat, sal_uInt16 nType);
+ /// Returns true if the SdrObject has a SwTextFrame otherwise false
+ static bool hasTextFrame(const SdrObject* pObj);
+
/// Count number of shapes in the document, excluding TextBoxes.
static sal_Int32 getCount(const SwDoc& rDoc);
/// Count number of shapes on the page, excluding TextBoxes.