[ooo-build-commit] .: .gitignore sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Sep 28 08:15:52 PDT 2010
.gitignore | 35 +++++++++---
sc/source/ui/inc/overlayobject.hxx | 58 ++++++++++++++++++++
sc/source/ui/view/overlayobject.cxx | 104 ++++++++++++++++++++++++++++++++++++
3 files changed, 188 insertions(+), 9 deletions(-)
New commits:
commit 148af7b5a75760a111af8f533ea05e8ebb9271f9
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Tue Sep 28 11:15:28 2010 -0400
Forgot to add new files created by cws-koheicopyborder-sc.diff.
diff --git a/.gitignore b/.gitignore
index 50784a4..b3350f9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,26 @@
-# backup and temporary files
-*~
-.*.sw[op]
-
-# the build directories
-/*/unxlng??
-/*/unxlng??.pro
-/*/wntmsci??
-/*/wntmsci??.pro
+/applied_patches
+/Linux*Env.Set*
+/bootstrap
+/makefile.mk
+unxlng*.pro
+unxlngi6
+unxlngi4
+/solver
+*.orig
+*.rej
+*.~*~
+*.vpj
+*.vpw
+*.bak
+/autom4te.cache
+/config.log
+/config.parms
+/config.status
+/configure
+/set_soenv
+warn
+.svn
+CVS
+.hg
+.gitignore
+.hgignore
diff --git a/sc/source/ui/inc/overlayobject.hxx b/sc/source/ui/inc/overlayobject.hxx
new file mode 100644
index 0000000..3d10407
--- /dev/null
+++ b/sc/source/ui/inc/overlayobject.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: gridwin.hxx,v $
+ * $Revision: 1.30 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __SC_OVERLAYOBJECT_HXX__
+#define __SC_OVERLAYOBJECT_HXX__
+
+#include "svx/sdr/overlay/overlayobject.hxx"
+
+class OutputDevice;
+class Window;
+
+class ScOverlayDashedBorder : public ::sdr::overlay::OverlayObject
+{
+public:
+ ScOverlayDashedBorder(const ::basegfx::B2DRange& rRange, const Color& rColor, Window* pWin);
+ virtual ~ScOverlayDashedBorder();
+
+ virtual void Trigger(sal_uInt32 nTime);
+
+ virtual void stripeDefinitionHasChanged();
+
+protected:
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
+
+private:
+ ::basegfx::B2DRange maRange;
+ Window* mpParent;
+ bool mbToggle;
+};
+
+#endif
diff --git a/sc/source/ui/view/overlayobject.cxx b/sc/source/ui/view/overlayobject.cxx
new file mode 100644
index 0000000..7f44f45
--- /dev/null
+++ b/sc/source/ui/view/overlayobject.cxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: gridwin.hxx,v $
+ * $Revision: 1.30 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sc.hxx"
+
+#include "overlayobject.hxx"
+#include "vcl/outdev.hxx"
+#include "vcl/lineinfo.hxx"
+#include "vcl/salbtype.hxx"
+#include "vcl/window.hxx"
+#include "tools/fract.hxx"
+#include "basegfx/range/b2drange.hxx"
+#include "basegfx/polygon/b2dpolygon.hxx"
+#include "basegfx/polygon/b2dpolygontools.hxx"
+#include "svx/sdr/overlay/overlaymanager.hxx"
+#include "drawinglayer/primitive2d/baseprimitive2d.hxx"
+#include "drawinglayer/primitive2d/polypolygonprimitive2d.hxx"
+
+using ::sdr::overlay::OverlayObject;
+using ::sdr::overlay::OverlayManager;
+using ::drawinglayer::primitive2d::Primitive2DSequence;
+
+#define DASH_UPDATE_INTERVAL 180 // in msec
+
+ScOverlayDashedBorder::ScOverlayDashedBorder(const ::basegfx::B2DRange& rRange, const Color& rColor, Window* pWin) :
+ OverlayObject(rColor),
+ mpParent(pWin),
+ mbToggle(true)
+{
+ mbAllowsAnimation = true;
+ maRange = rRange;
+}
+
+ScOverlayDashedBorder::~ScOverlayDashedBorder()
+{
+}
+
+void ScOverlayDashedBorder::Trigger(sal_uInt32 nTime)
+{
+ OverlayManager* pMgr = getOverlayManager();
+ if (pMgr)
+ {
+ SetTime(nTime + DASH_UPDATE_INTERVAL);
+ mbToggle = !mbToggle;
+ pMgr->InsertEvent(this);
+ objectChange();
+ }
+}
+
+void ScOverlayDashedBorder::stripeDefinitionHasChanged()
+{
+ objectChange();
+}
+
+Primitive2DSequence ScOverlayDashedBorder::createOverlayObjectPrimitive2DSequence()
+{
+ using ::basegfx::B2DPolygon;
+ using ::basegfx::B2DPolyPolygon;
+
+ OverlayManager* pMgr = getOverlayManager();
+ if (!pMgr)
+ return Primitive2DSequence();
+
+ basegfx::BColor aColorA = pMgr->getStripeColorA().getBColor();
+ basegfx::BColor aColorB = pMgr->getStripeColorB().getBColor();
+ if (!mbToggle)
+ ::std::swap(aColorA, aColorB);
+
+ const basegfx::B2DPolygon aPoly = basegfx::tools::createPolygonFromRect(maRange);
+ B2DPolyPolygon aPolygon(aPoly);
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new drawinglayer::primitive2d::PolyPolygonMarkerPrimitive2D(
+ aPolygon, aColorA, aColorB, pMgr->getStripeLengthPixel()));
+
+ return drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
+}
More information about the ooo-build-commit
mailing list