summaryrefslogtreecommitdiff
path: root/sd/source/ui/func
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-06-05 12:36:00 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-06-05 14:25:32 +0200
commit961655e7a8a925680271c7736a7d50ed62af6af4 (patch)
tree3448d6330579d44f0e2c65272273d3ff0cdac536 /sd/source/ui/func
parent7653e4f209a5e81860d029c8a6c5436c0b25efdb (diff)
sd signature line: create a graphic object
And don't inherit the default blue fill style / line style. The actual graphic content is not yet filled, though. Change-Id: Iebd5bf98c7c63cfa1a4d7a72cfb53d9e1fb5aeee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95587 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r--sd/source/ui/func/fuconrec.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index 3fd7a099ab07..63daa06171c4 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -58,6 +58,7 @@
#include <editeng/writingmodeitem.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
+#include <svx/xfillit0.hxx>
#include <sdresid.hxx>
#include <View.hxx>
@@ -68,6 +69,8 @@
#include <strings.hrc>
+using namespace com::sun::star;
+
namespace sd {
@@ -407,6 +410,11 @@ void FuConstructRectangle::Activate()
mpView->SetGlueVisible();
}
break;
+ case SID_INSERT_SIGNATURELINE:
+ {
+ aObjKind = OBJ_GRAF;
+ }
+ break;
default:
{
@@ -422,6 +430,28 @@ void FuConstructRectangle::Activate()
void FuConstructRectangle::Deactivate()
{
+ if (nSlotId == SID_INSERT_SIGNATURELINE)
+ {
+ const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
+ if (rMarkList.GetMarkCount() > 0)
+ {
+ // Avoid the default solid fill and line, we'll set a graphic instead.
+ const SdrMark* pMark = rMarkList.GetMark(0);
+ SdrObject* pObject = pMark->GetMarkedSdrObj();
+ SfxItemSet aSet = pObject->GetMergedItemSet();
+
+ XFillStyleItem aFillStyleItem(aSet.Get(XATTR_FILLSTYLE));
+ aFillStyleItem.SetValue(drawing::FillStyle_NONE);
+ aSet.Put(aFillStyleItem);
+
+ XLineStyleItem aLineStyleItem(aSet.Get(XATTR_LINESTYLE));
+ aLineStyleItem.SetValue(drawing::LineStyle_NONE);
+ aSet.Put(aLineStyleItem);
+
+ pObject->SetMergedItemSet(aSet);
+ }
+ }
+
if( nSlotId == SID_TOOL_CONNECTOR ||
nSlotId == SID_CONNECTOR_ARROW_START ||
nSlotId == SID_CONNECTOR_ARROW_END ||