summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-01-29 12:32:36 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-16 20:01:56 +0100
commit5aee0c13cc62a81a38d4132db7972dc301c21b3d (patch)
tree00c7837aa82296623f38305ce0f47bc6e6f5586a /include/svx
parent9618c7627061b9eb82ad6107de78a12c764744cf (diff)
Resolves: #i121532# enhanced visualisation of text edit&selection
D&D overhauled (cherry picked from commit c6e63b6bbb6b4a63fe1302de57fc32cd28432378) Conflicts: drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx drawinglayer/inc/drawinglayer/processor2d/linegeometryextractor2d.hxx drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx svx/Package_inc.mk svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx svx/inc/svx/sdr/overlay/overlayobject.hxx svx/inc/svx/sdr/overlay/overlaypolypolygon.hxx svx/inc/svx/sdr/overlay/overlayrectangle.hxx svx/inc/svx/sdr/overlay/overlaytools.hxx svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx svx/inc/svx/svdview.hxx svx/source/engine3d/view3d.cxx svx/source/sdr/overlay/overlayanimatedbitmapex.cxx svx/source/sdr/overlay/overlayhatchrect.cxx svx/source/sdr/overlay/overlaypolypolygon.cxx svx/source/sdr/overlay/overlaytools.cxx svx/source/svdraw/svdcrtv.cxx svx/source/svdraw/svdedxv.cxx svx/source/svdraw/svdhdl.cxx svx/source/svdraw/svdobj.cxx svx/source/svdraw/svdview.cxx sw/source/ui/dochdl/swdtflvr.cxx Unname unused arguments to prevent WaE issues. (cherry picked from commit 0735a61e631b8d4bb3d4e889bee436fb9e7c5734) Change-Id: I3b1cf4754063985dc1b4adac44b33e52e200607f e4288936cadd1f6e06bdf79611536d7114236b56
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/sdr/overlay/overlayanimatedbitmapex.hxx9
-rw-r--r--include/svx/sdr/overlay/overlayobject.hxx3
-rw-r--r--include/svx/sdr/overlay/overlaypolypolygon.hxx13
-rw-r--r--include/svx/sdr/overlay/overlayrectangle.hxx87
-rw-r--r--include/svx/sdr/overlay/overlaytools.hxx21
-rw-r--r--include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx2
-rw-r--r--include/svx/svdview.hxx6
7 files changed, 116 insertions, 25 deletions
diff --git a/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx b/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx
index 756d2dac3731..ee9a4a66017c 100644
--- a/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx
+++ b/include/svx/sdr/overlay/overlayanimatedbitmapex.hxx
@@ -45,16 +45,13 @@ namespace sdr
// #i53216# added CursorBlinkTime (in ms)
sal_uInt32 mnBlinkTime;
- // bitfield
- // Flag to remember which state to draw. Inited with sal_False (0)
- unsigned mbOverlayState : 1;
+ /// bitfield
+ // Flag to remember which state to draw. Inited with false (0)
+ bool mbOverlayState : 1;
// geometry creation for OverlayObject
virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
- // #i53216# check blink time value range (currently 25 < mnBlinkTime < 10000)
- void impCheckBlinkTimeValueRange();
-
public:
OverlayAnimatedBitmapEx(
const basegfx::B2DPoint& rBasePos,
diff --git a/include/svx/sdr/overlay/overlayobject.hxx b/include/svx/sdr/overlay/overlayobject.hxx
index 263e9a9ab57c..3b56c97556ed 100644
--- a/include/svx/sdr/overlay/overlayobject.hxx
+++ b/include/svx/sdr/overlay/overlayobject.hxx
@@ -82,6 +82,9 @@ namespace sdr
// a missing implementation
virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
+ // #i53216# check blink time value range (currently 25 < mnBlinkTime < 10000)
+ sal_uInt32 impCheckBlinkTimeValueRange(sal_uInt32 nBlinkTime) const;
+
// region in logical coordinates
basegfx::B2DRange maBaseRange;
diff --git a/include/svx/sdr/overlay/overlaypolypolygon.hxx b/include/svx/sdr/overlay/overlaypolypolygon.hxx
index d7dd82751f53..a716aac43069 100644
--- a/include/svx/sdr/overlay/overlaypolypolygon.hxx
+++ b/include/svx/sdr/overlay/overlaypolypolygon.hxx
@@ -22,6 +22,7 @@
#include <svx/sdr/overlay/overlayobject.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -29,21 +30,23 @@ namespace sdr
{
namespace overlay
{
- class SVX_DLLPUBLIC OverlayPolyPolygonStriped : public OverlayObject
+ class SVX_DLLPUBLIC OverlayPolyPolygonStripedAndFilled : public OverlayObject
{
protected:
// geometry
- basegfx::B2DPolyPolygon maPolyPolygon;
+ basegfx::B2DPolyPolygon maLinePolyPolygon;
// geometry creation for OverlayObject
virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
public:
- explicit OverlayPolyPolygonStriped(const basegfx::B2DPolyPolygon& rPolyPolygon);
- virtual ~OverlayPolyPolygonStriped();
+ explicit OverlayPolyPolygonStripedAndFilled(
+ const basegfx::B2DPolyPolygon& rLinePolyPolygon);
+ virtual ~OverlayPolyPolygonStripedAndFilled();
// change geometry
- basegfx::B2DPolyPolygon getPolyPolygon() const { return maPolyPolygon; }
+ basegfx::B2DPolyPolygon getLinePolyPolygon() const { return maLinePolyPolygon; }
+ void setLinePolyPolygon(const basegfx::B2DPolyPolygon& rNew);
// react on stripe definition change
virtual void stripeDefinitionHasChanged();
diff --git a/include/svx/sdr/overlay/overlayrectangle.hxx b/include/svx/sdr/overlay/overlayrectangle.hxx
new file mode 100644
index 000000000000..3d2f6f708be5
--- /dev/null
+++ b/include/svx/sdr/overlay/overlayrectangle.hxx
@@ -0,0 +1,87 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef _SDR_OVERLAY_OVERLAYRECTANGLE_HXX
+#define _SDR_OVERLAY_OVERLAYRECTANGLE_HXX
+
+#include <svx/sdr/overlay/overlayobject.hxx>
+#include <tools/gen.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+class PolyPolygon;
+
+namespace sdr
+{
+ namespace overlay
+ {
+ class OverlayRectangle : public OverlayObjectWithBasePosition
+ {
+ // geometric definitions
+ basegfx::B2DPoint maSecondPosition;
+ const double mfTransparence;
+ const double mfDiscreteGrow;
+ const double mfDiscreteShrink;
+ const double mfRotation;
+
+ // #i53216# added CursorBlinkTime (in ms)
+ sal_uInt32 mnBlinkTime;
+
+ /// bitfield
+ // Flag to remember which state to draw. Inited with false (0)
+ bool mbOverlayState : 1;
+
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
+
+ public:
+ OverlayRectangle(
+ const basegfx::B2DPoint& rBasePosition,
+ const basegfx::B2DPoint& rSecondPosition,
+ const Color& rHatchColor,
+ double fTransparence,
+ double fDiscreteGrow,
+ double fDiscreteShrink,
+ double fRotation,
+ sal_uInt32 nBlinkTime,
+ bool bAnimate);
+
+ const basegfx::B2DPoint& getSecondPosition() const { return maSecondPosition; }
+ void setSecondPosition(const basegfx::B2DPoint&);
+
+ // data read access
+ double getTransparence() const { return mfTransparence; }
+ double getDiscreteGrow() const { return mfDiscreteGrow; }
+ double getDiscreteShrink() const { return mfDiscreteShrink; }
+ double getRotation() const { return mfRotation; }
+
+ // added CursorBlinkTime (in ms)
+ sal_uInt32 getBlinkTime() const { return mnBlinkTime; }
+ void setBlinkTime(sal_uInt32 nNew);
+
+ // execute event from base class ::sdr::animation::Event. Default
+ // implementation does nothing and does not create a new event.
+ virtual void Trigger(sal_uInt32 nTime);
+ };
+ } // end of namespace overlay
+} // end of namespace sdr
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_SDR_OVERLAY_OVERLAYRECTANGLE_HXX
+
+// eof
diff --git a/include/svx/sdr/overlay/overlaytools.hxx b/include/svx/sdr/overlay/overlaytools.hxx
index 408c81b40d01..57bbcf72ebdb 100644
--- a/include/svx/sdr/overlay/overlaytools.hxx
+++ b/include/svx/sdr/overlay/overlaytools.hxx
@@ -118,16 +118,15 @@ namespace drawinglayer
{
namespace primitive2d
{
- class OverlayHatchRectanglePrimitive : public DiscreteMetricDependentPrimitive2D
+ class OverlayRectanglePrimitive : public DiscreteMetricDependentPrimitive2D
{
private:
// the logic rectangle definition
basegfx::B2DRange maObjectRange;
- // the hatch definition
- double mfDiscreteHatchDistance;
- double mfHatchRotation;
- basegfx::BColor maHatchColor;
+ // the graphic definition
+ basegfx::BColor maColor;
+ double mfTransparence;
// the dscrete grow and shrink of the box
double mfDiscreteGrow;
@@ -140,20 +139,18 @@ namespace drawinglayer
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
- OverlayHatchRectanglePrimitive(
+ OverlayRectanglePrimitive(
const basegfx::B2DRange& rObjectRange,
- double fDiscreteHatchDistance,
- double fHatchRotation,
- const basegfx::BColor& rHatchColor,
+ const basegfx::BColor& rColor,
+ double fTransparence,
double fDiscreteGrow,
double fDiscreteShrink,
double fRotation);
// data access
const basegfx::B2DRange& getObjectRange() const { return maObjectRange; }
- double getDiscreteHatchDistance() const { return mfDiscreteHatchDistance; }
- double getHatchRotation() const { return mfHatchRotation; }
- const basegfx::BColor& getHatchColor() const { return maHatchColor; }
+ const basegfx::BColor& getColor() const { return maColor; }
+ double getTransparence() const { return mfTransparence; }
double getDiscreteGrow() const { return mfDiscreteGrow; }
double getDiscreteShrink() const { return mfDiscreteShrink; }
double getRotation() const { return mfRotation; }
diff --git a/include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx b/include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx
index 6178695bf66d..42d5109d5c80 100644
--- a/include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx
+++ b/include/svx/sdr/primitive2d/svx_primitivetypes2d.hxx
@@ -42,7 +42,7 @@
#define PRIMITIVE2D_ID_SDRBORDERLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 15)
#define PRIMITIVE2D_ID_OVERLAYBITMAPEXPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 16)
#define PRIMITIVE2D_ID_OVERLAYCROSSHAIRPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 17)
-#define PRIMITIVE2D_ID_OVERLAYHATCHRECTANGLEPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 18)
+#define PRIMITIVE2D_ID_OVERLAYRECTANGLEPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 18)
#define PRIMITIVE2D_ID_OVERLAYHELPLINESTRIPEDPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 19)
#define PRIMITIVE2D_ID_OVERLAYROLLINGRECTANGLEPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 20)
#define PRIMITIVE2D_ID_SDRCONTROLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 21)
diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx
index ef28a17f4513..7628926770e8 100644
--- a/include/svx/svdview.hxx
+++ b/include/svx/svdview.hxx
@@ -28,6 +28,8 @@
#include "svx/svxdllapi.h"
#include <svx/svdcrtv.hxx>
#include <unotools/options.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
////////////////////////////////////////////////////////////////////////////////////////////////////
//
@@ -151,7 +153,9 @@ class SVX_DLLPUBLIC SdrDropMarkerOverlay
// The OverlayObjects
::sdr::overlay::OverlayObjectList maObjects;
- void ImplCreateOverlays(const SdrView& rView, const basegfx::B2DPolyPolygon& rPolyPolygon);
+ void ImplCreateOverlays(
+ const SdrView& rView,
+ const basegfx::B2DPolyPolygon& rLinePolyPolygon);
public:
SdrDropMarkerOverlay(const SdrView& rView, const SdrObject& rObject);