From 42b6b472aef0e9a7e6496979182cfaca1c597394 Mon Sep 17 00:00:00 2001 From: Armin Weiss Date: Thu, 7 Feb 2008 12:42:32 +0000 Subject: stable version from working GIT repository for unxlngi6 build --- drawinglayer/source/geometry/viewinformation2d.cxx | 316 ++++++++++++++++----- .../source/primitive2d/baseprimitive2d.cxx | 29 +- drawinglayer/source/primitive2d/makefile.mk | 5 +- .../source/primitive2d/pagepreviewprimitive2d.cxx | 188 ++++++++++++ .../source/primitive2d/sceneprimitive2d.cxx | 10 +- .../source/primitive3d/baseprimitive3d.cxx | 64 ++++- .../source/processor2d/canvasprocessor.cxx | 17 +- .../source/processor2d/contourextractor2d.cxx | 23 +- .../source/processor2d/vclmetafileprocessor2d.cxx | 25 +- .../source/processor2d/vclpixelprocessor2d.cxx | 14 +- drawinglayer/source/processor2d/vclprocessor2d.cxx | 50 +++- .../source/processor3d/defaultprocessor3d.cxx | 19 +- .../source/processor3d/geometry2dextractor.cxx | 9 +- .../source/processor3d/shadow3dextractor.cxx | 9 +- 14 files changed, 619 insertions(+), 159 deletions(-) create mode 100644 drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx (limited to 'drawinglayer/source') 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 #endif -#ifndef _COM_SUN_STAR_GRAPHIC_PRIMITIVE2DPARAMETERS_HPP_ -#include "com/sun/star/graphic/Primitive2DParameters.hpp" +#ifndef _COM_SUN_STAR_GEOMETRY_AFFINEMATRIX2D_HPP_ +#include #endif +#ifndef _COM_SUN_STAR_GEOMETRY_REALRECTANGLE2D_HPP__ +#include +#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 #endif -#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX -#include -#endif - #ifndef INCLUDED_DRAWINGLAYER_GEOMETRY_VIEWINFORMATION2D_HXX #include #endif +#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX +#include +#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 +#endif + +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PRIMITIVETYPES2D_HXX +#include +#endif + +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_MASKPRIMITIVE2D_HXX +#include +#endif + +#ifndef _BGFX_POLYGON_B2DPOLYGONTOOLS_HXX +#include +#endif + +#ifndef _BGFX_POLYGON_B2DPOLYGON_HXX +#include +#endif + +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSFORMPRIMITIVE2D_HXX +#include +#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 #endif -#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX -#include -#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 #endif +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PAGEPREVIEWPRIMITIVE2D_HXX +#include +#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 #endif +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PAGEPREVIEWPRIMITIVE2D_HXX +#include +#endif + #include ////////////////////////////////////////////////////////////////////////////// @@ -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 #endif -#ifndef _BGFX_TOOLS_CANVASTOOLS_HXX -#include -#endif - #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_WRONGSPELLPRIMITIVE2D_HXX #include #endif @@ -145,6 +141,10 @@ #include #endif +#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PAGEPREVIEWPRIMITIVE2D_HXX +#include +#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)); } } } -- cgit