summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorGulsah Kose <gulsah.1004@gmail.com>2016-10-09 22:00:16 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2016-10-10 23:07:35 +0000
commite2f6c7f0d0cc14f851d7028ff846c5dc658a81c6 (patch)
treea94572100337b425c505c7604d4a2815c4af9b69 /sw/source/core
parentaa4e560822787d62de0bcca52036242ce1160b45 (diff)
tdf#101390 Add "Dimesion Line" command to the writer arrowsbox.
Change-Id: I238bc37871c029d547b21ce7c8ef3cb0c0ff95b8 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/29669 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/frmedt/feshview.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 5adc6cd9dc8a..0a84b479083f 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -36,6 +36,7 @@
#include <svx/xlnedwit.hxx>
#include <svx/xlnedit.hxx>
#include <svx/xlnstit.hxx>
+#include <svx/svdomeas.hxx>
#include <sfx2/app.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/opaqitem.hxx>
@@ -2918,6 +2919,9 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const
}
pObj->SetLogicRect(aRect);
+ Point aStart = aRect.TopLeft();
+ Point aEnd = aRect.BottomRight();
+
if(dynamic_cast<const SdrCircObj*>( pObj) != nullptr)
{
SfxItemSet aAttr(pDrawModel->GetItemPool());
@@ -3021,6 +3025,12 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const
static_cast<SdrPathObj*>(pObj)->SetPathPoly(aPoly);
}
+ else if(dynamic_cast<const SdrMeasureObj*>( pObj) != nullptr)
+ {
+ sal_Int32 nYMiddle((aRect.Top() + aRect.Bottom()) / 2);
+ static_cast<SdrMeasureObj*>(pObj)->SetPoint(Point(aStart.X(), nYMiddle), 0);
+ static_cast<SdrMeasureObj*>(pObj)->SetPoint(Point(aEnd.X(), nYMiddle), 1);
+ }
else if(dynamic_cast<const SdrCaptionObj*>( pObj) != nullptr)
{
bool bVerticalText = ( SID_DRAW_TEXT_VERTICAL == nSlotId ||