[Libreoffice-commits] core.git: sd/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jun 5 12:26:07 UTC 2020
sd/source/ui/func/fuconrec.cxx | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
New commits:
commit 961655e7a8a925680271c7736a7d50ed62af6af4
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri Jun 5 12:36:00 2020 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Jun 5 14:25:32 2020 +0200
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 at collabora.com>
Tested-by: Jenkins
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 ||
More information about the Libreoffice-commits
mailing list