summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2008-02-07 12:42:32 +0000
committerArmin Weiss <aw@openoffice.org>2008-02-07 12:42:32 +0000
commit42b6b472aef0e9a7e6496979182cfaca1c597394 (patch)
tree4e029aef69c38fed26ca96ff9f7ebb698b83c08f
parent7a7c1dcb9bfb49b38b7ea6bb276c5189262773c0 (diff)
stable version from working GIT repository for unxlngi6 build
-rw-r--r--drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx74
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx12
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx5
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx118
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx13
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx6
-rw-r--r--drawinglayer/prj/d.lst1
-rw-r--r--drawinglayer/source/geometry/viewinformation2d.cxx316
-rw-r--r--drawinglayer/source/primitive2d/baseprimitive2d.cxx29
-rw-r--r--drawinglayer/source/primitive2d/makefile.mk5
-rw-r--r--drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx188
-rw-r--r--drawinglayer/source/primitive2d/sceneprimitive2d.cxx10
-rw-r--r--drawinglayer/source/primitive3d/baseprimitive3d.cxx64
-rw-r--r--drawinglayer/source/processor2d/canvasprocessor.cxx17
-rw-r--r--drawinglayer/source/processor2d/contourextractor2d.cxx23
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx25
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx14
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx50
-rw-r--r--drawinglayer/source/processor3d/defaultprocessor3d.cxx19
-rw-r--r--drawinglayer/source/processor3d/geometry2dextractor.cxx9
-rw-r--r--drawinglayer/source/processor3d/shadow3dextractor.cxx9
21 files changed, 811 insertions, 196 deletions
diff --git a/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx b/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx
index f7e00a1ebe62..1c2f8e3e9ae0 100644
--- a/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx
+++ b/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: viewinformation2d.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2006-12-13 16:57:07 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:57 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -43,6 +43,18 @@
#include <sal/config.h>
#endif
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_
+#include <com/sun/star/uno/Sequence.h>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGE_HPP_
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#endif
+
//////////////////////////////////////////////////////////////////////////////
// predefines
@@ -55,10 +67,6 @@ namespace basegfx {
class B2DRange;
}
-namespace com { namespace sun { namespace star { namespace graphic {
- struct Primitive2DParameters;
-}}}}
-
//////////////////////////////////////////////////////////////////////////////
namespace drawinglayer
@@ -68,35 +76,57 @@ namespace drawinglayer
class ViewInformation2D
{
private:
+ // impl pointer
ImpViewInformation2D* mpViewInformation2D;
public:
- // constructors/destructor
+ // constructor to easily build a ViewInformation2D when all view
+ // information is available as basegfx implementation classes. The
+ // ExtendedParameters allows adding extra parameters besides ViewTransformation,
+ // Viewport and ViewTime and should not itself include one of these.
ViewInformation2D(
- const ::basegfx::B2DHomMatrix& rViewTransformation,
- const ::basegfx::B2DRange& rViewport,
- double fViewTime);
- ViewInformation2D(
- const ::com::sun::star::graphic::Primitive2DParameters& rParams);
- ViewInformation2D(
- const ViewInformation2D& rCandidate);
+ const basegfx::B2DHomMatrix& rViewTransformation,
+ const basegfx::B2DRange& rViewport,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& rxDrawPage,
+ double fViewTime,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rExtendedParameters);
+
+ // constructor to create a ViewInformation2D based on API information only. The
+ // ViewParameters can contain ViewTransformation, Viewport and ViewTime but also
+ // other parameters which will be preserved in the ExtendedInformation. The three
+ // named information will be extracted locally for faster access.
+ ViewInformation2D(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters);
+
+ // copy constructor
+ ViewInformation2D(const ViewInformation2D& rCandidate);
+
+ // destructor
~ViewInformation2D();
// assignment operator
ViewInformation2D& operator=(const ViewInformation2D& rCandidate);
- // compare operator
- bool operator==(const ViewInformation2D& rCandidate) const;
- bool operator!=(const ViewInformation2D& rCandidate) const { return !operator==(rCandidate); }
-
// data access
- const ::basegfx::B2DHomMatrix& getViewTransformation() const;
- const ::basegfx::B2DRange& getViewport() const;
+ const basegfx::B2DHomMatrix& getViewTransformation() const;
+ const basegfx::B2DRange& getViewport() const;
double getViewTime() const;
+ // get the DrawPage which is visualized. Tjhis is needed e.g. for the
+ // view-dependent decomposition of PageNumber Fields in Texts
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& ViewInformation2D::getVisualizedPage() const;
+
// data access with on-demand preparations
- const ::basegfx::B2DHomMatrix& getInverseViewTransformation() const;
- const ::basegfx::B2DRange& getDiscreteViewport() const;
+ const basegfx::B2DHomMatrix& getInverseViewTransformation() const;
+ const basegfx::B2DRange& getDiscreteViewport() const;
+
+ // get the uno::Sequence< beans::PropertyValue > which contains all information. When
+ // constructed using the API constructor, You will get back Your input. If not, the
+ // needed sequence will be constructed including the extended informations.
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& getViewInformationSequence() const;
+
+ // get the uno::Sequence< beans::PropertyValue > which contains only extra information. This means
+ // information different from ViewTransformation, Viewport and ViewTime.
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& getExtendedInformationSequence() const;
};
} // end of namespace geometry
} // end of namespace drawinglayer
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx
index ffb8d156e786..85dc32f27f9e 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: baseprimitive2d.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: aw $ $Date: 2007-03-06 12:30:46 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:57 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -141,12 +141,12 @@ namespace drawinglayer
//
// The getDecomposition implementation for UNO API will use getDecomposition from this implementation. It
- // will construct a ViewInformation2D from the Primitive2DParameters for that purpose
- virtual Primitive2DSequence SAL_CALL getDecomposition( const ::com::sun::star::graphic::Primitive2DParameters& aPrimitive2DParameters ) throw ( ::com::sun::star::uno::RuntimeException );
+ // will construct a ViewInformation2D from the ViewParameters for that purpose
+ virtual Primitive2DSequence SAL_CALL getDecomposition( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters ) throw ( ::com::sun::star::uno::RuntimeException );
// The getRange implementation for UNO API will use getRange from this implementation. It
- // will construct a ViewInformation2D from the Primitive2DParameters for that purpose
- virtual ::com::sun::star::geometry::RealRectangle2D SAL_CALL getRange( const ::com::sun::star::graphic::Primitive2DParameters& aPrimitive2DParameters ) throw ( ::com::sun::star::uno::RuntimeException );
+ // will construct a ViewInformation2D from the ViewParameters for that purpose
+ virtual ::com::sun::star::geometry::RealRectangle2D SAL_CALL getRange( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters ) throw ( ::com::sun::star::uno::RuntimeException );
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
index ec4544dd99c2..6519a20df009 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: drawinglayer_primitivetypes2d.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: aw $ $Date: 2007-12-20 13:13:14 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:57 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -96,6 +96,7 @@
#define PRIMITIVE2D_ID_TEXTHIERARCHYBULLETPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 45)
#define PRIMITIVE2D_ID_POLYPOLYGONHAIRLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 46)
#define PRIMITIVE2D_ID_EXECUTEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 47)
+#define PRIMITIVE2D_ID_PAGEPREVIEWPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 48)
//////////////////////////////////////////////////////////////////////////////
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx
new file mode 100644
index 000000000000..afbe1a00b033
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: pagepreviewprimitive2d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2008-02-07 13:42:32 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PAGEPREVIEWPRIMITIVE2D_HXX
+#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PAGEPREVIEWPRIMITIVE2D_HXX
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GROUPPRIMITIVE2D_HXX
+#include <drawinglayer/primitive2d/groupprimitive2d.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XDRAWPAGE_HPP_
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#endif
+
+#ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ // This primitive is needed to have the correct XDrawPage as ViewInformation for decomposing
+ // the page contents (given as childs of the GroupPrimitive2D here) if these contain e.g.
+ // view-dependent (in this case XDrawPage-dependent) text fields like PageNumber. If You want
+ // those primitives to be visualized correctly, Your renderer needs to locally correct it's
+ // ViewInformation2D to reference the new XDrawPage.
+ class PagePreviewPrimitive2D : public GroupPrimitive2D
+ {
+ private:
+ // the XDrawPage visualized by this primitive. When we go forward with primitives
+ // this will not only be used by the renderers to provide the correct decompose
+ // graphic attribute context, but also to completely create the page's sub-content.
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > mxDrawPage;
+
+ // the own geometry
+ basegfx::B2DHomMatrix maTransform;
+
+ // content width and height
+ double mfContentWidth;
+ double mfContentHeight;
+
+ // bitfield
+ // flag to allow keeping the aspect ratio
+ unsigned mbKeepAspectRatio : 1;
+
+ protected:
+ // local decomposition. Implementation will just return children
+ virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+
+ public:
+ PagePreviewPrimitive2D(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& rxDrawPage,
+ const basegfx::B2DHomMatrix& rTransform,
+ double fContentWidth,
+ double fContentHeight,
+ const Primitive2DSequence& rChildren,
+ bool bKeepAspectRatio);
+
+ // get data
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& getXDrawPage() const { return mxDrawPage; }
+ const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
+ double getContentWidth() const { return mfContentWidth; }
+ double getContentHeight() const { return mfContentHeight; }
+ bool getKeepAspectRatio() const { return mbKeepAspectRatio; }
+
+ // compare operator
+ virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+ // own getB2DRange
+ virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
+
+ // provide unique ID
+ DeclPrimitrive2DIDBlock()
+ };
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PAGEPREVIEWPRIMITIVE2D_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx
index bfc46815e074..a65921f65091 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: baseprimitive3d.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: aw $ $Date: 2007-03-06 12:31:19 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:57 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -132,12 +132,12 @@ namespace drawinglayer
//
// The getDecomposition implementation for UNO API will use getDecomposition from this implementation. It
- // will get the time from the Primitive2DParameters for that purpose
- virtual Primitive3DSequence SAL_CALL getDecomposition( const ::com::sun::star::graphic::Primitive3DParameters& aPrimitive2DParameters ) throw ( ::com::sun::star::uno::RuntimeException );
+ // will get the time from the ViewParameters for that purpose
+ virtual Primitive3DSequence SAL_CALL getDecomposition( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters ) throw ( ::com::sun::star::uno::RuntimeException );
// the getRange default implemenation will use getDecomposition to create the range information from merging
// getRange results from the single local decomposition primitives.
- virtual ::com::sun::star::geometry::RealRectangle3D SAL_CALL getRange( const ::com::sun::star::graphic::Primitive3DParameters& aPrimitive2DParameters ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::geometry::RealRectangle3D SAL_CALL getRange( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters ) throw ( ::com::sun::star::uno::RuntimeException );
};
} // end of namespace primitive3d
} // end of namespace drawinglayer
@@ -168,6 +168,9 @@ namespace drawinglayer
// concatenate single Primitive3D
void appendPrimitive3DReferenceToPrimitive3DSequence(Primitive3DSequence& rDest, const Primitive3DReference& rSource);
+ // conversion helpers for 3D ViewParameters (only time used ATM)
+ double ViewParametersToTime(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters);
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > TimeToViewParameters(double fTime);
} // end of namespace primitive3d
} // end of namespace drawinglayer
diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
index e7c6b1682036..0745bc7a1f74 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: vclprocessor2d.hxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: aw $ $Date: 2007-12-18 15:10:11 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:58 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -73,6 +73,7 @@ namespace drawinglayer { namespace primitive2d {
class WrongSpellPrimitive2D;
class PolygonStrokePrimitive2D;
class ControlPrimitive2D;
+ class PagePreviewPrimitive2D;
}}
//////////////////////////////////////////////////////////////////////////////
@@ -114,6 +115,7 @@ namespace drawinglayer
void RenderModifiedColorPrimitive2D(const primitive2d::ModifiedColorPrimitive2D& rModifiedCandidate);
void RenderAlphaPrimitive2D(const primitive2d::AlphaPrimitive2D& rTransCandidate);
void RenderTransformPrimitive2D(const primitive2d::TransformPrimitive2D& rTransformCandidate);
+ void RenderPagePreviewPrimitive2D(const primitive2d::PagePreviewPrimitive2D& rPagePreviewCandidate);
void RenderMarkerArrayPrimitive2D(const primitive2d::MarkerArrayPrimitive2D& rMarkerArrayCandidate);
void RenderPointArrayPrimitive2D(const primitive2d::PointArrayPrimitive2D& rPointArrayCandidate);
void RenderWrongSpellPrimitive2D(const primitive2d::WrongSpellPrimitive2D& rWrongSpellCandidate);
diff --git a/drawinglayer/prj/d.lst b/drawinglayer/prj/d.lst
index 6ef4b4279b20..eb173a06280b 100644
--- a/drawinglayer/prj/d.lst
+++ b/drawinglayer/prj/d.lst
@@ -28,6 +28,7 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\primitive2d
..\inc\drawinglayer\primitive2d\metafileprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\metafileprimitive2d.hxx
..\inc\drawinglayer\primitive2d\modifiedcolorprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\modifiedcolorprimitive2d.hxx
..\inc\drawinglayer\primitive2d\oleprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\oleprimitive2d.hxx
+..\inc\drawinglayer\primitive2d\pagepreviewprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\pagepreviewprimitive2d.hxx
..\inc\drawinglayer\primitive2d\pointarrayprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\pointarrayprimitive2d.hxx
..\inc\drawinglayer\primitive2d\polygonprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\polygonprimitive2d.hxx
..\inc\drawinglayer\primitive2d\polypolygonprimitive2d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive2d\polypolygonprimitive2d.hxx
diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx b/drawinglayer/source/geometry/viewinformation2d.cxx
index 0ad71b94dd80..4fc008067608 100644
--- a/drawinglayer/source/geometry/viewinformation2d.cxx
+++ b/drawinglayer/source/geometry/viewinformation2d.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: viewinformation2d.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: aw $ $Date: 2006-10-19 10:40:02 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:58 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -53,10 +53,18 @@
#include <basegfx/tools/canvastools.hxx>
#endif
-#ifndef _COM_SUN_STAR_GRAPHIC_PRIMITIVE2DPARAMETERS_HPP_
-#include "com/sun/star/graphic/Primitive2DParameters.hpp"
+#ifndef _COM_SUN_STAR_GEOMETRY_AFFINEMATRIX2D_HPP_
+#include <com/sun/star/geometry/AffineMatrix2D.hpp>
#endif
+#ifndef _COM_SUN_STAR_GEOMETRY_REALRECTANGLE2D_HPP__
+#include <com/sun/star/geometry/RealRectangle2D.hpp>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+using namespace com::sun::star;
+
//////////////////////////////////////////////////////////////////////////////
namespace drawinglayer
@@ -74,77 +82,225 @@ namespace drawinglayer
sal_uInt32 mnRefCount;
protected:
- // the view transformation
- ::basegfx::B2DHomMatrix maViewTransformation;
- ::basegfx::B2DHomMatrix maInverseViewTransformation;
+ // the view transformation and the on-demand inverse of it
+ basegfx::B2DHomMatrix maViewTransformation;
+ basegfx::B2DHomMatrix maInverseViewTransformation;
+
+ // the visible range and the on-demand one in ViewCoordinates
+ basegfx::B2DRange maViewport;
+ basegfx::B2DRange maDiscreteViewport;
- // the visible ranges
- ::basegfx::B2DRange maViewport;
- ::basegfx::B2DRange maDiscreteViewport;
+ // the DrawPage which is target of visualisation. This is needed e.g. for
+ // the view-dependent decomposition of PageNumber TextFields
+ uno::Reference< drawing::XDrawPage > mxVisualizedPage;
// the point in time
double mfViewTime;
+ // the complete PropertyValue representation (if already created)
+ uno::Sequence< beans::PropertyValue > mxViewInformation;
+
+ // the extra PropertyValues; not represented by ViewTransformation,
+ // Viewport or ViewTime
+ uno::Sequence< beans::PropertyValue > mxExtendedInformation;
+
// bitfield
unsigned mbInverseValid : 1;
unsigned mbDiscreteViewportValid : 1;
+ // the local UNO API strings
+ const ::rtl::OUString& getNamePropertyTransformation()
+ {
+ static ::rtl::OUString s_sNamePropertyTransformation(RTL_CONSTASCII_USTRINGPARAM("Transformation"));
+ return s_sNamePropertyTransformation;
+ }
+
+ const ::rtl::OUString& getNamePropertyViewport()
+ {
+ static ::rtl::OUString s_sNamePropertyViewport(RTL_CONSTASCII_USTRINGPARAM("Viewport"));
+ return s_sNamePropertyViewport;
+ }
+
+ const ::rtl::OUString& getNamePropertyTime()
+ {
+ static ::rtl::OUString s_sNamePropertyTime(RTL_CONSTASCII_USTRINGPARAM("Time"));
+ return s_sNamePropertyTime;
+ }
+
+ const ::rtl::OUString& getNamePropertyVisualizedPage()
+ {
+ static ::rtl::OUString s_sNamePropertyXDrawPage(RTL_CONSTASCII_USTRINGPARAM("VisualizedPage"));
+ return s_sNamePropertyXDrawPage;
+ }
+
+ void impInterpretPropertyValues(const uno::Sequence< beans::PropertyValue >& rViewParameters)
+ {
+ if(rViewParameters.hasElements())
+ {
+ const sal_Int32 nCount(rViewParameters.getLength());
+ sal_Int32 nExtendedInsert(0);
+
+ // prepare extended information for filtering. Maximum size is nCount
+ mxExtendedInformation.realloc(nCount);
+
+ for(sal_Int32 a(0); a < nCount; a++)
+ {
+ const beans::PropertyValue& rProp = rViewParameters[a];
+
+ if(rProp.Name == getNamePropertyTransformation())
+ {
+ com::sun::star::geometry::AffineMatrix2D aAffineMatrix2D;
+ rProp.Value >>= aAffineMatrix2D;
+ basegfx::unotools::homMatrixFromAffineMatrix(maViewTransformation, aAffineMatrix2D);
+ }
+ else if(rProp.Name == getNamePropertyViewport())
+ {
+ com::sun::star::geometry::RealRectangle2D aViewport;
+ rProp.Value >>= aViewport;
+ maViewport = basegfx::unotools::b2DRectangleFromRealRectangle2D(aViewport);
+ }
+ else if(rProp.Name == getNamePropertyTime())
+ {
+ rProp.Value >>= mfViewTime;
+ }
+ else if(rProp.Name == getNamePropertyVisualizedPage())
+ {
+ rProp.Value >>= mxVisualizedPage;
+ }
+ else
+ {
+ // extra information; add to filtered information
+ mxExtendedInformation[nExtendedInsert++] = rProp;
+ }
+ }
+
+ // extra information size is now known; realloc to final size
+ mxExtendedInformation.realloc(nExtendedInsert);
+ }
+ }
+
+ void impFillViewInformationFromContent()
+ {
+ uno::Sequence< beans::PropertyValue > xRetval;
+ const bool bViewTransformationUsed(!maViewTransformation.isIdentity());
+ const bool bViewportUsed(!maViewport.isEmpty());
+ const bool bTimeUsed(0.0 < mfViewTime);
+ const bool bVisualizedPageUsed(mxVisualizedPage.is());
+ const bool bExtraInformation(mxExtendedInformation.hasElements());
+ sal_uInt32 nIndex(0);
+ const sal_uInt32 nCount(
+ (bViewTransformationUsed ? 1 : 0) +
+ (bViewportUsed ? 1 : 0) +
+ (bTimeUsed ? 1 : 0) +
+ (bVisualizedPageUsed ? 1 : 0) +
+ (bExtraInformation ? mxExtendedInformation.getLength() : 0));
+
+ mxViewInformation.realloc(nCount);
+
+ if(bViewTransformationUsed)
+ {
+ com::sun::star::geometry::AffineMatrix2D aAffineMatrix2D;
+ basegfx::unotools::affineMatrixFromHomMatrix(aAffineMatrix2D, maViewTransformation);
+ mxViewInformation[nIndex].Name = getNamePropertyTransformation();
+ mxViewInformation[nIndex].Value <<= aAffineMatrix2D;
+ nIndex++;
+ }
+
+ if(bViewportUsed)
+ {
+ const com::sun::star::geometry::RealRectangle2D aViewport(basegfx::unotools::rectangle2DFromB2DRectangle(maViewport));
+ mxViewInformation[nIndex].Name = getNamePropertyViewport();
+ mxViewInformation[nIndex].Value <<= aViewport;
+ nIndex++;
+ }
+
+ if(bTimeUsed)
+ {
+ mxViewInformation[nIndex].Name = getNamePropertyTime();
+ mxViewInformation[nIndex].Value <<= mfViewTime;
+ nIndex++;
+ }
+
+ if(bVisualizedPageUsed)
+ {
+ mxViewInformation[nIndex].Name = getNamePropertyVisualizedPage();
+ mxViewInformation[nIndex].Value <<= mxVisualizedPage;
+ nIndex++;
+ }
+
+ if(bExtraInformation)
+ {
+ const sal_Int32 nExtra(mxExtendedInformation.getLength());
+
+ for(sal_Int32 a(0); a < nExtra; a++)
+ {
+ mxViewInformation[nIndex++] = mxExtendedInformation[a];
+ }
+ }
+ }
+
public:
ImpViewInformation2D(
- const ::basegfx::B2DHomMatrix& rViewTransformation,
- const ::basegfx::B2DRange& rViewport,
- double fViewTime)
- : mnRefCount(0L),
+ const basegfx::B2DHomMatrix& rViewTransformation,
+ const basegfx::B2DRange& rViewport,
+ const uno::Reference< drawing::XDrawPage >& rxDrawPage,
+ double fViewTime,
+ const uno::Sequence< beans::PropertyValue >& rExtendedParameters)
+ : mnRefCount(0),
maViewTransformation(rViewTransformation),
maInverseViewTransformation(maViewTransformation),
maViewport(rViewport),
maDiscreteViewport(),
mfViewTime(fViewTime),
+ mxVisualizedPage(rxDrawPage),
+ mxViewInformation(),
+ mxExtendedInformation(),
mbInverseValid(false),
mbDiscreteViewportValid(false)
{
+ impInterpretPropertyValues(rExtendedParameters);
}
- ImpViewInformation2D(
- const ::com::sun::star::graphic::Primitive2DParameters& rParams)
- : mnRefCount(0L),
- maViewTransformation(basegfx::unotools::homMatrixFromAffineMatrix(rParams.ViewTransformation)),
- maInverseViewTransformation(maViewTransformation),
- maViewport(basegfx::unotools::b2DRectangleFromRealRectangle2D(rParams.Viewport)),
+ ImpViewInformation2D(const uno::Sequence< beans::PropertyValue >& rViewParameters)
+ : mnRefCount(0),
+ maViewTransformation(),
+ maInverseViewTransformation(),
+ maViewport(),
maDiscreteViewport(),
- mfViewTime(rParams.Time),
+ mfViewTime(),
+ mxVisualizedPage(),
+ mxViewInformation(rViewParameters),
+ mxExtendedInformation(),
mbInverseValid(false),
mbDiscreteViewportValid(false)
{
+ impInterpretPropertyValues(rViewParameters);
}
- bool operator==(const ImpViewInformation2D& rCandidate) const
- {
- return (maViewTransformation == rCandidate.maViewTransformation
- && mfViewTime == rCandidate.mfViewTime
- && maViewport == rCandidate.maViewport);
- }
-
- const ::basegfx::B2DHomMatrix& getViewTransformation() const { return maViewTransformation; }
+ const basegfx::B2DHomMatrix& getViewTransformation() const { return maViewTransformation; }
- const ::basegfx::B2DRange& getViewport() const { return maViewport; }
+ const basegfx::B2DRange& getViewport() const { return maViewport; }
- const ::basegfx::B2DRange& getDiscreteViewport() const
+ const basegfx::B2DRange& getDiscreteViewport() const
{
::osl::Mutex m_mutex;
if(!mbDiscreteViewportValid)
{
- ::basegfx::B2DRange aDiscreteViewport(maViewport);
- aDiscreteViewport.transform(getViewTransformation());
- const_cast< ImpViewInformation2D* >(this)->maDiscreteViewport = aDiscreteViewport;
+ if(!maViewport.isEmpty())
+ {
+ basegfx::B2DRange aDiscreteViewport(maViewport);
+ aDiscreteViewport.transform(getViewTransformation());
+ const_cast< ImpViewInformation2D* >(this)->maDiscreteViewport = aDiscreteViewport;
+ }
+
const_cast< ImpViewInformation2D* >(this)->mbDiscreteViewportValid = true;
}
return maDiscreteViewport;
}
- const ::basegfx::B2DHomMatrix& getInverseViewTransformation() const
+ const basegfx::B2DHomMatrix& getInverseViewTransformation() const
{
::osl::Mutex m_mutex;
@@ -158,6 +314,26 @@ namespace drawinglayer
}
double getViewTime() const { return mfViewTime; }
+
+ const uno::Reference< drawing::XDrawPage >& getVisualizedPage() const
+ {
+ return mxVisualizedPage;
+ }
+
+ const uno::Sequence< beans::PropertyValue >& getViewInformationSequence() const
+ {
+ if(!mxViewInformation.hasElements())
+ {
+ const_cast< ImpViewInformation2D* >(this)->impFillViewInformationFromContent();
+ }
+
+ return mxViewInformation;
+ }
+
+ const uno::Sequence< beans::PropertyValue >& getExtendedInformationSequence() const
+ {
+ return mxExtendedInformation;
+ }
};
} // end of anonymous namespace
} // end of namespace drawinglayer
@@ -169,21 +345,21 @@ namespace drawinglayer
namespace geometry
{
ViewInformation2D::ViewInformation2D(
- const ::basegfx::B2DHomMatrix& rViewTransformation,
- const ::basegfx::B2DRange& rViewport,
- double fViewTime)
- : mpViewInformation2D(new ImpViewInformation2D(rViewTransformation, rViewport, fViewTime))
+ const basegfx::B2DHomMatrix& rViewTransformation,
+ const basegfx::B2DRange& rViewport,
+ const uno::Reference< drawing::XDrawPage >& rxDrawPage,
+ double fViewTime,
+ const uno::Sequence< beans::PropertyValue >& rExtendedParameters)
+ : mpViewInformation2D(new ImpViewInformation2D(rViewTransformation, rViewport, rxDrawPage, fViewTime, rExtendedParameters))
{
}
- ViewInformation2D::ViewInformation2D(
- const ::com::sun::star::graphic::Primitive2DParameters& rParams)
- : mpViewInformation2D(new ImpViewInformation2D(rParams))
+ ViewInformation2D::ViewInformation2D(const uno::Sequence< beans::PropertyValue >& rViewParameters)
+ : mpViewInformation2D(new ImpViewInformation2D(rViewParameters))
{
}
- ViewInformation2D::ViewInformation2D(
- const ViewInformation2D& rCandidate)
+ ViewInformation2D::ViewInformation2D(const ViewInformation2D& rCandidate)
: mpViewInformation2D(rCandidate.mpViewInformation2D)
{
::osl::Mutex m_mutex;
@@ -208,50 +384,37 @@ namespace drawinglayer
{
::osl::Mutex m_mutex;
- if(rCandidate.mpViewInformation2D != mpViewInformation2D)
+ if(mpViewInformation2D->mnRefCount)
{
- if(mpViewInformation2D->mnRefCount)
- {
- mpViewInformation2D->mnRefCount--;
- }
- else
- {
- delete mpViewInformation2D;
- }
-
- mpViewInformation2D = rCandidate.mpViewInformation2D;
- mpViewInformation2D->mnRefCount++;
+ mpViewInformation2D->mnRefCount--;
}
-
- return *this;
- }
-
- bool ViewInformation2D::operator==(const ViewInformation2D& rCandidate) const
- {
- if(rCandidate.mpViewInformation2D == mpViewInformation2D)
+ else
{
- return true;
+ delete mpViewInformation2D;
}
- return (*rCandidate.mpViewInformation2D == *mpViewInformation2D);
+ mpViewInformation2D = rCandidate.mpViewInformation2D;
+ mpViewInformation2D->mnRefCount++;
+
+ return *this;
}
- const ::basegfx::B2DHomMatrix& ViewInformation2D::getViewTransformation() const
+ const basegfx::B2DHomMatrix& ViewInformation2D::getViewTransformation() const
{
return mpViewInformation2D->getViewTransformation();
}
- const ::basegfx::B2DRange& ViewInformation2D::getViewport() const
+ const basegfx::B2DRange& ViewInformation2D::getViewport() const
{
return mpViewInformation2D->getViewport();
}
- const ::basegfx::B2DRange& ViewInformation2D::getDiscreteViewport() const
+ const basegfx::B2DRange& ViewInformation2D::getDiscreteViewport() const
{
return mpViewInformation2D->getDiscreteViewport();
}
- const ::basegfx::B2DHomMatrix& ViewInformation2D::getInverseViewTransformation() const
+ const basegfx::B2DHomMatrix& ViewInformation2D::getInverseViewTransformation() const
{
return mpViewInformation2D->getInverseViewTransformation();
}
@@ -260,6 +423,21 @@ namespace drawinglayer
{
return mpViewInformation2D->getViewTime();
}
+
+ const uno::Reference< drawing::XDrawPage >& ViewInformation2D::getVisualizedPage() const
+ {
+ return mpViewInformation2D->getVisualizedPage();
+ }
+
+ const uno::Sequence< beans::PropertyValue >& ViewInformation2D::getViewInformationSequence() const
+ {
+ return mpViewInformation2D->getViewInformationSequence();
+ }
+
+ const uno::Sequence< beans::PropertyValue >& ViewInformation2D::getExtendedInformationSequence() const
+ {
+ return mpViewInformation2D->getExtendedInformationSequence();
+ }
} // end of namespace geometry
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
index 230e3f6ea25e..41e530ad15e2 100644
--- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: baseprimitive2d.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: aw $ $Date: 2007-01-25 12:57:55 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:58 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -37,14 +37,14 @@
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#endif
-#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX
-#include <basegfx/tools/canvastools.hxx>
-#endif
-
#ifndef INCLUDED_DRAWINGLAYER_GEOMETRY_VIEWINFORMATION2D_HXX
#include <drawinglayer/geometry/viewinformation2d.hxx>
#endif
+#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX
+#include <basegfx/tools/canvastools.hxx>
+#endif
+
//////////////////////////////////////////////////////////////////////////////
using namespace com::sun::star;
@@ -89,15 +89,15 @@ namespace drawinglayer
return getLocalDecomposition();
}
- Primitive2DSequence SAL_CALL BasePrimitive2D::getDecomposition( const graphic::Primitive2DParameters& aPrimitive2DParameters ) throw ( uno::RuntimeException )
+ Primitive2DSequence SAL_CALL BasePrimitive2D::getDecomposition( const uno::Sequence< beans::PropertyValue >& rViewParameters ) throw ( uno::RuntimeException )
{
- const geometry::ViewInformation2D aViewInformation(aPrimitive2DParameters);
+ const geometry::ViewInformation2D aViewInformation(rViewParameters);
return get2DDecomposition(aViewInformation);
}
- com::sun::star::geometry::RealRectangle2D SAL_CALL BasePrimitive2D::getRange( const graphic::Primitive2DParameters& aPrimitive2DParameters ) throw ( uno::RuntimeException )
+ com::sun::star::geometry::RealRectangle2D SAL_CALL BasePrimitive2D::getRange( const uno::Sequence< beans::PropertyValue >& rViewParameters ) throw ( uno::RuntimeException )
{
- const geometry::ViewInformation2D aViewInformation(aPrimitive2DParameters);
+ const geometry::ViewInformation2D aViewInformation(rViewParameters);
return basegfx::unotools::rectangle2DFromB2DRectangle(getB2DRange(aViewInformation));
}
} // end of namespace primitive2d
@@ -128,13 +128,8 @@ namespace drawinglayer
else
{
// use UNO API call instead
- graphic::Primitive2DParameters aPrimitive2DParameters;
-
- basegfx::unotools::affineMatrixFromHomMatrix(aPrimitive2DParameters.ViewTransformation, aViewInformation.getViewTransformation());
- aPrimitive2DParameters.Viewport = basegfx::unotools::rectangle2DFromB2DRectangle(aViewInformation.getViewport());
- aPrimitive2DParameters.Time = aViewInformation.getViewTime();
-
- aRetval.expand(basegfx::unotools::b2DRectangleFromRealRectangle2D(rCandidate->getRange(aPrimitive2DParameters)));
+ const uno::Sequence< beans::PropertyValue >& rViewParameters(aViewInformation.getViewInformationSequence());
+ aRetval.expand(basegfx::unotools::b2DRectangleFromRealRectangle2D(rCandidate->getRange(rViewParameters)));
}
}
diff --git a/drawinglayer/source/primitive2d/makefile.mk b/drawinglayer/source/primitive2d/makefile.mk
index c09562ca545d..4d48233c683d 100644
--- a/drawinglayer/source/primitive2d/makefile.mk
+++ b/drawinglayer/source/primitive2d/makefile.mk
@@ -4,9 +4,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.8 $
+# $Revision: 1.9 $
#
-# last change: $Author: aw $ $Date: 2007-09-26 11:36:36 $
+# last change: $Author: aw $ $Date: 2008-02-07 13:41:58 $
#
# The Contents of this file are made available subject to
# the terms of GNU Lesser General Public License Version 2.1.
@@ -66,6 +66,7 @@ SLOFILES= \
$(SLO)$/metafileprimitive2d.obj \
$(SLO)$/modifiedcolorprimitive2d.obj \
$(SLO)$/oleprimitive2d.obj \
+ $(SLO)$/pagepreviewprimitive2d.obj \
$(SLO)$/polypolygonprimitive2d.obj \
$(SLO)$/polygonprimitive2d.obj \
$(SLO)$/sceneprimitive2d.obj \
diff --git a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
new file mode 100644
index 000000000000..78b973c52c00
--- /dev/null
+++ b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
@@ -0,0 +1,188 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: pagepreviewprimitive2d.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2008-02-07 13:42:32 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PAGEPREVIEWPRIMITIVE2D_HXX
+#include <drawinglayer/primitive2d/pagepreviewprimitive2d.hxx>
+#endif
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PRIMITIVETYPES2D_HXX
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#endif
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_MASKPRIMITIVE2D_HXX
+#include <drawinglayer/primitive2d/maskprimitive2d.hxx>
+#endif
+
+#ifndef _BGFX_POLYGON_B2DPOLYGONTOOLS_HXX
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#endif
+
+#ifndef _BGFX_POLYGON_B2DPOLYGON_HXX
+#include <basegfx/polygon/b2dpolygon.hxx>
+#endif
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSFORMPRIMITIVE2D_HXX
+#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+using namespace com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ Primitive2DSequence PagePreviewPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const
+ {
+ Primitive2DSequence xRetval;
+ Primitive2DSequence aContent(getChildren());
+
+ if(aContent.hasElements())
+ {
+ // check if content overlaps with tageted size and needs to be embedded with a
+ // clipping primitive
+ const basegfx::B2DRange aRealContentRange(getB2DRangeFromPrimitive2DSequence(aContent, rViewInformation));
+ const basegfx::B2DRange aAllowedContentRange(0.0, 0.0, getContentWidth(), getContentHeight());
+
+ if(!aAllowedContentRange.isInside(aRealContentRange))
+ {
+ const Primitive2DReference xReferenceA(new MaskPrimitive2D(basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(aAllowedContentRange)), aContent));
+ aContent = Primitive2DSequence(&xReferenceA, 1);
+ }
+
+ // content is not scaled or rotated and occupates aContentRange. Create a mapping
+ // to own local geometry. Create matrix describing the content by setting scaling
+ basegfx::B2DHomMatrix aPageTrans;
+ aPageTrans.set(0, 0, getContentWidth());
+ aPageTrans.set(1, 1, getContentHeight());
+
+ // decompose to access own scaling
+ basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ getTransform().decompose(aScale, aTranslate, fRotate, fShearX);
+
+ if(getKeepAspectRatio())
+ {
+ // look at the aspect ratio of the content and the local geometry
+ const double fRatioOwn(aScale.getX() ? (aScale.getY() / aScale.getX()) : 1.0);
+ const double fRatioContent(getContentWidth() ? (getContentHeight() / getContentWidth()) : 1.0);
+
+ // the ratios are based on different coordinate systems, so look if they differ really more
+ // than 0,1 percent
+ if(fabs(fRatioOwn - fRatioContent) > 0.001)
+ {
+ if(basegfx::fTools::more(fRatioOwn, fRatioContent))
+ {
+ // vertically center the page by translating
+ const double fFullY(aScale.getX() ? (aScale.getY() * getContentWidth()) / aScale.getX() : 0.0);
+ const double fTransY((fFullY - getContentHeight()) * 0.5);
+ aPageTrans.set(1, 2, fTransY);
+ }
+ else
+ {
+ // horizontally center the page by translating
+ const double fFullX(aScale.getY() ? (aScale.getX() * getContentHeight()) / aScale.getY() : 0.0);
+ const double fTransX((fFullX - getContentWidth()) * 0.5);
+ aPageTrans.set(0, 2, fTransX);
+ }
+ }
+ }
+
+ // create composed transformation from content to local geometry. An
+ // eventually needed clipping is already added, so directly go to local coordinates
+ basegfx::B2DHomMatrix aPageToObject(aPageTrans);
+ aPageToObject.invert();
+ aPageToObject *= getTransform();
+
+ // embed in necessary transformation to map from SdrPage to SdrPageObject
+ const Primitive2DReference xReferenceB(new TransformPrimitive2D(aPageToObject, aContent));
+ xRetval = Primitive2DSequence(&xReferenceB, 1);
+ }
+
+ return xRetval;
+ }
+
+ PagePreviewPrimitive2D::PagePreviewPrimitive2D(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& rxDrawPage,
+ const basegfx::B2DHomMatrix& rTransform,
+ double fContentWidth,
+ double fContentHeight,
+ const Primitive2DSequence& rChildren,
+ bool bKeepAspectRatio)
+ : GroupPrimitive2D(rChildren),
+ mxDrawPage(rxDrawPage),
+ maTransform(rTransform),
+ mfContentWidth(fContentWidth),
+ mfContentHeight(fContentHeight),
+ mbKeepAspectRatio(bKeepAspectRatio)
+ {
+ }
+
+ bool PagePreviewPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+ {
+ if(GroupPrimitive2D::operator==(rPrimitive))
+ {
+ const PagePreviewPrimitive2D& rCompare = static_cast< const PagePreviewPrimitive2D& >(rPrimitive);
+
+ return (getXDrawPage() == rCompare.getXDrawPage()
+ && getTransform() == rCompare.getTransform()
+ && getContentWidth() == rCompare.getContentWidth()
+ && getContentHeight() == rCompare.getContentHeight()
+ && getKeepAspectRatio() == rCompare.getKeepAspectRatio());
+ }
+
+ return false;
+ }
+
+ basegfx::B2DRange PagePreviewPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation`*/) const
+ {
+ // nothing is allowed to stick out of a PagePreviewPrimitive, thus we
+ // can quickly deliver our range here
+ basegfx::B2DRange aRetval(0.0, 0.0, 1.0, 1.0);
+ aRetval.transform(getTransform());
+ return aRetval;
+ }
+
+ // provide unique ID
+ ImplPrimitrive2DIDBlock(PagePreviewPrimitive2D, PRIMITIVE2D_ID_PAGEPREVIEWPRIMITIVE2D)
+
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
index c3db747847c7..063705323137 100644
--- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: sceneprimitive2d.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: aw $ $Date: 2008-01-30 12:25:05 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:58 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -113,8 +113,9 @@ namespace drawinglayer
{
// test visibility
const basegfx::B2DRange aShadow2DRange(getB2DRangeFromPrimitive2DSequence(maShadowPrimitives, rViewInformation));
+ const basegfx::B2DRange aViewRange(rViewInformation.getViewport());
- if(aShadow2DRange.overlaps(rViewInformation.getViewport()))
+ if(aViewRange.isEmpty() || aShadow2DRange.overlaps(aViewRange))
{
// add extracted 2d shadows (before 3d scene creations itself)
aRetval = maShadowPrimitives;
@@ -236,8 +237,9 @@ namespace drawinglayer
{
// test visibility
const basegfx::B2DRange aLabel2DRange(getB2DRangeFromPrimitive2DSequence(maLabelPrimitives, rViewInformation));
+ const basegfx::B2DRange aViewRange(rViewInformation.getViewport());
- if(aLabel2DRange.overlaps(rViewInformation.getViewport()))
+ if(aViewRange.isEmpty() || aLabel2DRange.overlaps(aViewRange))
{
// add extracted 2d labels (after 3d scene creations)
appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, maLabelPrimitives);
diff --git a/drawinglayer/source/primitive3d/baseprimitive3d.cxx b/drawinglayer/source/primitive3d/baseprimitive3d.cxx
index 10525a13d0d7..bf52f6d42546 100644
--- a/drawinglayer/source/primitive3d/baseprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/baseprimitive3d.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: baseprimitive3d.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: aw $ $Date: 2006-10-19 10:38:32 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:59 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -47,6 +47,17 @@ using namespace com::sun::star;
//////////////////////////////////////////////////////////////////////////////
+namespace
+{
+ const ::rtl::OUString& getNamePropertyTime()
+ {
+ static ::rtl::OUString s_sNamePropertyTime(RTL_CONSTASCII_USTRINGPARAM("Time"));
+ return s_sNamePropertyTime;
+ }
+} // end of anonymous namespace
+
+//////////////////////////////////////////////////////////////////////////////
+
namespace drawinglayer
{
namespace primitive3d
@@ -87,14 +98,14 @@ namespace drawinglayer
return getLocalDecomposition();
}
- Primitive3DSequence SAL_CALL BasePrimitive3D::getDecomposition( const graphic::Primitive3DParameters& aPrimitive2DParameters ) throw ( uno::RuntimeException )
+ Primitive3DSequence SAL_CALL BasePrimitive3D::getDecomposition( const uno::Sequence< beans::PropertyValue >& rViewParameters ) throw ( uno::RuntimeException )
{
- return get3DDecomposition(aPrimitive2DParameters.Time);
+ return get3DDecomposition(ViewParametersToTime(rViewParameters));
}
- geometry::RealRectangle3D SAL_CALL BasePrimitive3D::getRange( const graphic::Primitive3DParameters& aPrimitive2DParameters ) throw ( uno::RuntimeException )
+ geometry::RealRectangle3D SAL_CALL BasePrimitive3D::getRange( const uno::Sequence< beans::PropertyValue >& rViewParameters ) throw ( uno::RuntimeException )
{
- return basegfx::unotools::rectangle3DFromB3DRectangle(getB3DRange(aPrimitive2DParameters.Time));
+ return basegfx::unotools::rectangle3DFromB3DRectangle(getB3DRange(ViewParametersToTime(rViewParameters)));
}
} // end of namespace primitive3d
} // end of namespace drawinglayer
@@ -124,9 +135,8 @@ namespace drawinglayer
else
{
// use UNO API call instead
- graphic::Primitive3DParameters aPrimitive3DParameters;
- aPrimitive3DParameters.Time = fTime;
- aRetval.expand(basegfx::unotools::b3DRectangleFromRealRectangle3D(rCandidate->getRange(aPrimitive3DParameters)));
+ const uno::Sequence< beans::PropertyValue > xViewParameters(TimeToViewParameters(fTime));
+ aRetval.expand(basegfx::unotools::b3DRectangleFromRealRectangle3D(rCandidate->getRange(xViewParameters)));
}
}
@@ -259,6 +269,42 @@ namespace drawinglayer
}
}
+ // conversion helpers for 3D ViewParameters (only time used ATM)
+ double ViewParametersToTime(const uno::Sequence< beans::PropertyValue >& rViewParameters)
+ {
+ double fRetval(0.0);
+
+ if(rViewParameters.hasElements())
+ {
+ const sal_Int32 nCount(rViewParameters.getLength());
+
+ for(sal_Int32 a(0); a < nCount; a++)
+ {
+ const beans::PropertyValue& rProp = rViewParameters[a];
+
+ if(rProp.Name == getNamePropertyTime())
+ {
+ rProp.Value >>= fRetval;
+ }
+ }
+ }
+
+ return fRetval;
+ }
+
+ const uno::Sequence< beans::PropertyValue > TimeToViewParameters(double fTime)
+ {
+ uno::Sequence< beans::PropertyValue > xViewParameters;
+
+ if(0.0 < fTime)
+ {
+ xViewParameters.realloc(1);
+ xViewParameters[0].Name = getNamePropertyTime();
+ xViewParameters[0].Value <<= fTime;
+ }
+
+ return xViewParameters;
+ }
} // end of namespace primitive3d
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/processor2d/canvasprocessor.cxx b/drawinglayer/source/processor2d/canvasprocessor.cxx
index 4441ee6060a3..e3e6eec4ecd4 100644
--- a/drawinglayer/source/processor2d/canvasprocessor.cxx
+++ b/drawinglayer/source/processor2d/canvasprocessor.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: canvasprocessor.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2008-01-30 12:25:05 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:59 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1345,7 +1345,9 @@ namespace drawinglayer
maViewInformation2D = geometry::ViewInformation2D(
getViewInformation2D().getViewTransformation() * rTransformCandidate.getTransformation(),
getViewInformation2D().getViewport(),
- getViewInformation2D().getViewTime());
+ getViewInformation2D().getVisualizedPage(),
+ getViewInformation2D().getViewTime(),
+ getViewInformation2D().getExtendedInformationSequence());
// set at canvas
canvas::tools::setViewStateTransform(maViewState, maCurrentTransformation);
@@ -1399,13 +1401,8 @@ namespace drawinglayer
else
{
// unknown implementation, use UNO API call instead and process recursively
- com::sun::star::graphic::Primitive2DParameters aPrimitive2DParameters;
-
- basegfx::unotools::affineMatrixFromHomMatrix(aPrimitive2DParameters.ViewTransformation, getViewInformation2D().getViewTransformation());
- aPrimitive2DParameters.Viewport = basegfx::unotools::rectangle2DFromB2DRectangle(getViewInformation2D().getViewport());
- aPrimitive2DParameters.Time = getViewInformation2D().getViewTime();
-
- process(xReference->getDecomposition(aPrimitive2DParameters));
+ const uno::Sequence< beans::PropertyValue >& rViewParameters(getViewInformation2D().getViewInformationSequence());
+ process(xReference->getDecomposition(rViewParameters));
}
}
}
diff --git a/drawinglayer/source/processor2d/contourextractor2d.cxx b/drawinglayer/source/processor2d/contourextractor2d.cxx
index db0168affaad..e61e76719e35 100644
--- a/drawinglayer/source/processor2d/contourextractor2d.cxx
+++ b/drawinglayer/source/processor2d/contourextractor2d.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: contourextractor2d.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: aw $ $Date: 2008-01-30 12:26:48 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:59 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -77,9 +77,9 @@
#include <drawinglayer/primitive2d/sceneprimitive2d.hxx>
#endif
-#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX
-#include <basegfx/tools/canvastools.hxx>
-#endif
+//////////////////////////////////////////////////////////////////////////////
+
+using namespace com::sun::star;
//////////////////////////////////////////////////////////////////////////////
@@ -175,7 +175,9 @@ namespace drawinglayer
maViewInformation2D = geometry::ViewInformation2D(
getViewInformation2D().getViewTransformation() * rTransformCandidate.getTransformation(),
getViewInformation2D().getViewport(),
- getViewInformation2D().getViewTime());
+ getViewInformation2D().getVisualizedPage(),
+ getViewInformation2D().getViewTime(),
+ getViewInformation2D().getExtendedInformationSequence());
// proccess content
process(rTransformCandidate.getChildren());
@@ -248,13 +250,8 @@ namespace drawinglayer
else
{
// unknown implementation, use UNO API call instead and process recursively
- com::sun::star::graphic::Primitive2DParameters aPrimitive2DParameters;
-
- basegfx::unotools::affineMatrixFromHomMatrix(aPrimitive2DParameters.ViewTransformation, getViewInformation2D().getViewTransformation());
- aPrimitive2DParameters.Viewport = basegfx::unotools::rectangle2DFromB2DRectangle(getViewInformation2D().getViewport());
- aPrimitive2DParameters.Time = getViewInformation2D().getViewTime();
-
- process(xReference->getDecomposition(aPrimitive2DParameters));
+ const uno::Sequence< beans::PropertyValue >& rViewParameters(getViewInformation2D().getViewInformationSequence());
+ process(xReference->getDecomposition(rViewParameters));
}
}
}
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index adf901b64259..318feab3692a 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: vclmetafileprocessor2d.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: aw $ $Date: 2008-01-30 12:25:05 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:59 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -173,6 +173,10 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#endif
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PAGEPREVIEWPRIMITIVE2D_HXX
+#include <drawinglayer/primitive2d/pagepreviewprimitive2d.hxx>
+#endif
+
//////////////////////////////////////////////////////////////////////////////
// for PDFExtOutDevData Graphic support
@@ -1631,8 +1635,15 @@ namespace drawinglayer
aViewTransform.scale(fDPIXChange, fDPIYChange);
}
- // create view information and pixel renderer
- const geometry::ViewInformation2D aViewInfo(aViewTransform, aViewRange, 0.0);
+ // create view information and pixel renderer. Reuse known ViewInformation
+ // except new transformation and range
+ const geometry::ViewInformation2D aViewInfo(
+ aViewTransform,
+ aViewRange,
+ getViewInformation2D().getVisualizedPage(),
+ getViewInformation2D().getViewTime(),
+ getViewInformation2D().getExtendedInformationSequence());
+
VclPixelProcessor2D aBufferProcessor(aViewInfo, aBufferDevice);
// draw content using pixel renderer
@@ -1670,6 +1681,12 @@ namespace drawinglayer
RenderTransformPrimitive2D(static_cast< const primitive2d::TransformPrimitive2D& >(rCandidate));
break;
}
+ case PRIMITIVE2D_ID_PAGEPREVIEWPRIMITIVE2D :
+ {
+ // new XDrawPage for ViewInformation2D
+ RenderPagePreviewPrimitive2D(static_cast< const primitive2d::PagePreviewPrimitive2D& >(rCandidate));
+ break;
+ }
case PRIMITIVE2D_ID_MARKERARRAYPRIMITIVE2D :
{
// use default marker array pocessing
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index d95f690ed03d..58c07967f034 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: vclpixelprocessor2d.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: aw $ $Date: 2007-12-13 16:43:09 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:59 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -109,6 +109,10 @@
#include <drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx>
#endif
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PAGEPREVIEWPRIMITIVE2D_HXX
+#include <drawinglayer/primitive2d/pagepreviewprimitive2d.hxx>
+#endif
+
#include <cstdio>
//////////////////////////////////////////////////////////////////////////////
@@ -322,6 +326,12 @@ namespace drawinglayer
RenderTransformPrimitive2D(static_cast< const primitive2d::TransformPrimitive2D& >(rCandidate));
break;
}
+ case PRIMITIVE2D_ID_PAGEPREVIEWPRIMITIVE2D :
+ {
+ // new XDrawPage for ViewInformation2D
+ RenderPagePreviewPrimitive2D(static_cast< const primitive2d::PagePreviewPrimitive2D& >(rCandidate));
+ break;
+ }
case PRIMITIVE2D_ID_MARKERARRAYPRIMITIVE2D :
{
// marker array
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index a07ac83b79f0..8efd2df082b1 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: vclprocessor2d.cxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: aw $ $Date: 2007-12-13 16:43:09 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:59 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -129,10 +129,6 @@
#include <drawinglayer/primitive2d/pointarrayprimitive2d.hxx>
#endif
-#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX
-#include <basegfx/tools/canvastools.hxx>
-#endif
-
#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_WRONGSPELLPRIMITIVE2D_HXX
#include <drawinglayer/primitive2d/wrongspellprimitive2d.hxx>
#endif
@@ -145,6 +141,10 @@
#include <vcl/svapp.hxx>
#endif
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PAGEPREVIEWPRIMITIVE2D_HXX
+#include <drawinglayer/primitive2d/pagepreviewprimitive2d.hxx>
+#endif
+
//////////////////////////////////////////////////////////////////////////////
// control support
@@ -177,6 +177,10 @@
//////////////////////////////////////////////////////////////////////////////
+using namespace com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
namespace drawinglayer
{
namespace processor2d
@@ -840,7 +844,9 @@ namespace drawinglayer
maViewInformation2D = geometry::ViewInformation2D(
getViewInformation2D().getViewTransformation() * rTransformCandidate.getTransformation(),
getViewInformation2D().getViewport(),
- getViewInformation2D().getViewTime());
+ getViewInformation2D().getVisualizedPage(),
+ getViewInformation2D().getViewTime(),
+ getViewInformation2D().getExtendedInformationSequence());
// proccess content
process(rTransformCandidate.getChildren());
@@ -850,6 +856,27 @@ namespace drawinglayer
maViewInformation2D = aLastViewInformation2D;
}
+ // new XDrawPage for ViewInformation2D
+ void VclProcessor2D::RenderPagePreviewPrimitive2D(const primitive2d::PagePreviewPrimitive2D& rPagePreviewCandidate)
+ {
+ // remember current transformation and ViewInformation
+ const geometry::ViewInformation2D aLastViewInformation2D(getViewInformation2D());
+
+ // create new local ViewInformation2D
+ maViewInformation2D = geometry::ViewInformation2D(
+ getViewInformation2D().getViewTransformation(),
+ getViewInformation2D().getViewport(),
+ rPagePreviewCandidate.getXDrawPage(),
+ getViewInformation2D().getViewTime(),
+ getViewInformation2D().getExtendedInformationSequence());
+
+ // proccess decomposed content
+ process(rPagePreviewCandidate.get2DDecomposition(getViewInformation2D()));
+
+ // restore transformations
+ maViewInformation2D = aLastViewInformation2D;
+ }
+
// marker
void VclProcessor2D::RenderMarkerArrayPrimitive2D(const primitive2d::MarkerArrayPrimitive2D& rMarkArrayCandidate)
{
@@ -1229,13 +1256,8 @@ namespace drawinglayer
else
{
// unknown implementation, use UNO API call instead and process recursively
- com::sun::star::graphic::Primitive2DParameters aPrimitive2DParameters;
-
- basegfx::unotools::affineMatrixFromHomMatrix(aPrimitive2DParameters.ViewTransformation, getViewInformation2D().getViewTransformation());
- aPrimitive2DParameters.Viewport = basegfx::unotools::rectangle2DFromB2DRectangle(getViewInformation2D().getViewport());
- aPrimitive2DParameters.Time = getViewInformation2D().getViewTime();
-
- process(xReference->getDecomposition(aPrimitive2DParameters));
+ const uno::Sequence< beans::PropertyValue >& rViewParameters(getViewInformation2D().getViewInformationSequence());
+ process(xReference->getDecomposition(rViewParameters));
}
}
}
diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
index 3186ce607eae..5e4435c91aa5 100644
--- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: defaultprocessor3d.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: aw $ $Date: 2008-01-30 12:25:05 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:59 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -117,6 +117,10 @@
//////////////////////////////////////////////////////////////////////////////
+using namespace com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
namespace basegfx
{
class BDInterpolator
@@ -957,6 +961,12 @@ namespace drawinglayer
}
}
}
+
+ const ::rtl::OUString& getNamePropertyTime()
+ {
+ static ::rtl::OUString s_sNamePropertyTime(RTL_CONSTASCII_USTRINGPARAM("Time"));
+ return s_sNamePropertyTime;
+ }
} // end of anonymous namespace
} // end of namespace drawinglayer
@@ -1820,9 +1830,8 @@ namespace drawinglayer
else
{
// unknown implementation, use UNO API call instead and process recursively
- com::sun::star::graphic::Primitive3DParameters aPrimitive3DParameters;
- aPrimitive3DParameters.Time = getTime();
- process(xReference->getDecomposition(aPrimitive3DParameters));
+ const uno::Sequence< beans::PropertyValue > xViewParameters(primitive3d::TimeToViewParameters(getTime()));
+ process(xReference->getDecomposition(xViewParameters));
}
}
}
diff --git a/drawinglayer/source/processor3d/geometry2dextractor.cxx b/drawinglayer/source/processor3d/geometry2dextractor.cxx
index ffeb1ddfd1f8..6fd9b5e48d5d 100644
--- a/drawinglayer/source/processor3d/geometry2dextractor.cxx
+++ b/drawinglayer/source/processor3d/geometry2dextractor.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: geometry2dextractor.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: aw $ $Date: 2008-01-30 12:26:48 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:59 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -213,9 +213,8 @@ namespace drawinglayer
else
{
// unknown implementation, use UNO API call instead and process recursively
- com::sun::star::graphic::Primitive3DParameters aPrimitive3DParameters;
- aPrimitive3DParameters.Time = getTime();
- process(xReference->getDecomposition(aPrimitive3DParameters));
+ const uno::Sequence< beans::PropertyValue > xViewParameters(primitive3d::TimeToViewParameters(getTime()));
+ process(xReference->getDecomposition(xViewParameters));
}
}
}
diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx
index 109e4cb40faa..fd16f89d6866 100644
--- a/drawinglayer/source/processor3d/shadow3dextractor.cxx
+++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: shadow3dextractor.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: aw $ $Date: 2007-03-06 12:35:55 $
+ * last change: $Author: aw $ $Date: 2008-02-07 13:41:59 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -310,9 +310,8 @@ namespace drawinglayer
else
{
// unknown implementation, use UNO API call instead and process recursively
- com::sun::star::graphic::Primitive3DParameters aPrimitive3DParameters;
- aPrimitive3DParameters.Time = getTime();
- process(xReference->getDecomposition(aPrimitive3DParameters));
+ const uno::Sequence< beans::PropertyValue > xViewParameters(primitive3d::TimeToViewParameters(getTime()));
+ process(xReference->getDecomposition(xViewParameters));
}
}
}