diff options
author | sb <sb@openoffice.org> | 2010-04-14 17:21:13 +0200 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-04-14 17:21:13 +0200 |
commit | 10b1f939953d971de57c5bb20f901631ef5bfeea (patch) | |
tree | c93247da79c85bee1f96f0b655a27f463ec640d8 /slideshow/source/engine/shapes | |
parent | 6fc142c2e5993e1763a897186eef76a984105f5c (diff) | |
parent | 17d0f112effa923bc6bfeb799a775b9050941573 (diff) |
sb118: merged in backout
Diffstat (limited to 'slideshow/source/engine/shapes')
28 files changed, 155 insertions, 136 deletions
diff --git a/slideshow/source/engine/shapes/appletshape.cxx b/slideshow/source/engine/shapes/appletshape.cxx index 94b7db2a0ef2..339161e19ab6 100644 --- a/slideshow/source/engine/shapes/appletshape.cxx +++ b/slideshow/source/engine/shapes/appletshape.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: appletshape.cxx,v $ - * $Revision: 1.3.18.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/appletshape.hxx b/slideshow/source/engine/shapes/appletshape.hxx index d4ce7612554e..6ea4462d97af 100644 --- a/slideshow/source/engine/shapes/appletshape.hxx +++ b/slideshow/source/engine/shapes/appletshape.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: appletshape.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/backgroundshape.cxx b/slideshow/source/engine/shapes/backgroundshape.cxx index 07e1323a672c..fd6b0cfb1b68 100644 --- a/slideshow/source/engine/shapes/backgroundshape.cxx +++ b/slideshow/source/engine/shapes/backgroundshape.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: backgroundshape.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/backgroundshape.hxx b/slideshow/source/engine/shapes/backgroundshape.hxx index 8b6da29c19e8..5ce99da95a54 100644 --- a/slideshow/source/engine/shapes/backgroundshape.hxx +++ b/slideshow/source/engine/shapes/backgroundshape.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: backgroundshape.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx index 3f1f6109e3f4..6c1cab84e0eb 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawinglayeranimation.cxx,v $ - * $Revision: 1.5.10.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -703,7 +700,7 @@ bool ActivityImpl::perform() if( !isActive() ) return false; - ENSURE_OR_RETURN( + ENSURE_OR_RETURN_FALSE( mpDrawShape, "ActivityImpl::perform(): still active, but NULL draw shape" ); diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.hxx b/slideshow/source/engine/shapes/drawinglayeranimation.hxx index e19c12e674ef..956e411ac95d 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.hxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawinglayeranimation.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx index 899804fe1896..dc8fe959a0e8 100644 --- a/slideshow/source/engine/shapes/drawshape.cxx +++ b/slideshow/source/engine/shapes/drawshape.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawshape.cxx,v $ - * $Revision: 1.7.12.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -330,7 +327,7 @@ namespace slideshow mbForceUpdate = false; mbAttributeLayerRevoked = false; - ENSURE_OR_RETURN( !maViewShapes.empty(), + ENSURE_OR_RETURN_FALSE( !maViewShapes.empty(), "DrawShape::implRender(): render called on DrawShape without views" ); if( maBounds.isEmpty() ) @@ -1062,7 +1059,7 @@ namespace slideshow bool DrawShape::setIntrinsicAnimationFrame( ::std::size_t nCurrFrame ) { - ENSURE_OR_RETURN( nCurrFrame < maAnimationFrames.size(), + ENSURE_OR_RETURN_FALSE( nCurrFrame < maAnimationFrames.size(), "DrawShape::setIntrinsicAnimationFrame(): frame index out of bounds" ); if( mnCurrFrame != nCurrFrame ) diff --git a/slideshow/source/engine/shapes/drawshape.hxx b/slideshow/source/engine/shapes/drawshape.hxx index 1788fb1855f6..b3c985d3fddc 100644 --- a/slideshow/source/engine/shapes/drawshape.hxx +++ b/slideshow/source/engine/shapes/drawshape.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawshape.hxx,v $ - * $Revision: 1.4.12.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx index 3af4eeda59a2..1c4409e99c77 100644 --- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx +++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawshapesubsetting.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.hxx b/slideshow/source/engine/shapes/drawshapesubsetting.hxx index a79b511f9633..24ce3c0b2c60 100644 --- a/slideshow/source/engine/shapes/drawshapesubsetting.hxx +++ b/slideshow/source/engine/shapes/drawshapesubsetting.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: drawshapesubsetting.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/externalshapebase.cxx b/slideshow/source/engine/shapes/externalshapebase.cxx index a2f4e1d96b1a..1a6970bad5dc 100644 --- a/slideshow/source/engine/shapes/externalshapebase.cxx +++ b/slideshow/source/engine/shapes/externalshapebase.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: externalshapebase.cxx,v $ - * $Revision: 1.4.2.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/externalshapebase.hxx b/slideshow/source/engine/shapes/externalshapebase.hxx index 9af0b01bc59a..d0d9f89de739 100644 --- a/slideshow/source/engine/shapes/externalshapebase.hxx +++ b/slideshow/source/engine/shapes/externalshapebase.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: externalshapebase.hxx,v $ - * $Revision: 1.3.18.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index 4817a131cddc..ea58ec2af9d7 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: gdimtftools.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -189,7 +186,7 @@ bool getMetaFile( const uno::Reference< lang::XComponent >& xSource, int mtfLoadFlags, const uno::Reference< uno::XComponentContext >& rxContext ) { - ENSURE_OR_RETURN( rxContext.is(), + ENSURE_OR_RETURN_FALSE( rxContext.is(), "getMetaFile(): Invalid context" ); // create dummy XGraphicRenderer, which receives the @@ -389,7 +386,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, break; default: - ENSURE_OR_RETURN(false, + ENSURE_OR_RETURN_FALSE(false, "getAnimationFromGraphic(): Unexpected case" ); break; } diff --git a/slideshow/source/engine/shapes/gdimtftools.hxx b/slideshow/source/engine/shapes/gdimtftools.hxx index 3bf21bcfc514..0e34cce9a62f 100644 --- a/slideshow/source/engine/shapes/gdimtftools.hxx +++ b/slideshow/source/engine/shapes/gdimtftools.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: gdimtftools.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx b/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx index 6c9ee308f379..dd3b977ef624 100644 --- a/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx +++ b/slideshow/source/engine/shapes/intrinsicanimationactivity.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: intrinsicanimationactivity.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/intrinsicanimationactivity.hxx b/slideshow/source/engine/shapes/intrinsicanimationactivity.hxx index 2bbf43e826e1..6d44ebc45d4e 100644 --- a/slideshow/source/engine/shapes/intrinsicanimationactivity.hxx +++ b/slideshow/source/engine/shapes/intrinsicanimationactivity.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: intrinsicanimationactivity.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/makefile.mk b/slideshow/source/engine/shapes/makefile.mk index 1b1ac78dddf2..1d40c165707c 100644 --- a/slideshow/source/engine/shapes/makefile.mk +++ b/slideshow/source/engine/shapes/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/mediashape.cxx b/slideshow/source/engine/shapes/mediashape.cxx index 326fda9bb69c..fbab6d252b4f 100644 --- a/slideshow/source/engine/shapes/mediashape.cxx +++ b/slideshow/source/engine/shapes/mediashape.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mediashape.cxx,v $ - * $Revision: 1.3.18.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/mediashape.hxx b/slideshow/source/engine/shapes/mediashape.hxx index 9aa1475c3fb9..3e1ec6e5629f 100644 --- a/slideshow/source/engine/shapes/mediashape.hxx +++ b/slideshow/source/engine/shapes/mediashape.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mediashape.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx index 61f4d30fe2fc..f793dfed7e7e 100644 --- a/slideshow/source/engine/shapes/shapeimporter.cxx +++ b/slideshow/source/engine/shapes/shapeimporter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: shapeimporter.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -36,12 +33,25 @@ #include <vcl/cvtgrf.hxx> #include <tools/urlobj.hxx> #include <tools/stream.hxx> -#include <goodies/grfmgr.hxx> +#include <svtools/grfmgr.hxx> #include <unotools/ucbstreamhelper.hxx> #include <unotools/streamwrap.hxx> +#include <basegfx/point/b2dpoint.hxx> +#include <basegfx/polygon/b2dpolygon.hxx> +#include <cppcanvas/basegfxfactory.hxx> +#include <cppcanvas/polypolygon.hxx> #include <com/sun/star/awt/Rectangle.hpp> #include <com/sun/star/drawing/ColorMode.hpp> #include <com/sun/star/text/GraphicCrop.hpp> +#include <com/sun/star/container/XNameContainer.hpp> +#include <com/sun/star/drawing/PointSequenceSequence.hpp> +#include <com/sun/star/drawing/PointSequence.hpp> +#include <com/sun/star/lang/XMultiComponentFactory.hpp> +#include <com/sun/star/drawing/XLayerSupplier.hpp> +#include <com/sun/star/drawing/XLayerManager.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/drawing/XDrawPagesSupplier.hpp> #include "drawshapesubsetting.hxx" #include "drawshape.hxx" @@ -52,11 +62,13 @@ #include "slideshowexceptions.hxx" #include "gdimtftools.hxx" #include "tools.hxx" +#include "slideshowcontext.hxx" #include <boost/shared_ptr.hpp> #include <boost/scoped_ptr.hpp> using namespace com::sun::star; +using namespace ::comphelper; namespace slideshow { namespace internal { @@ -436,7 +448,8 @@ ShapeSharedPtr ShapeImporter::createShape( bool ShapeImporter::isSkip( uno::Reference<beans::XPropertySet> const& xPropSet, - rtl::OUString const& shapeType ) const + rtl::OUString const& shapeType, + uno::Reference< drawing::XLayer> const& xLayer ) { // skip empty presentation objects: bool bEmpty = false; @@ -448,6 +461,26 @@ bool ShapeImporter::isSkip( return true; } + //skip shapes which corresponds to annotations + if(xLayer.is()) + { + rtl::OUString layerName; + uno::Reference<beans::XPropertySet> xPropLayerSet( + xLayer, uno::UNO_QUERY ); + const uno::Any& a(xPropLayerSet->getPropertyValue(rtl::OUString::createFromAscii("Name")) ); + bool const bRet = (a >>= layerName); + if(bRet) + { + if( layerName.equals(rtl::OUString::createFromAscii("DrawnInSlideshow"))) + { + //Transform shapes into PolyPolygons + importPolygons(xPropSet); + + return true; + } + } + } + // don't export presentation placeholders on masterpage // they can be non empty when user edits the default texts if(mbConvertingMasterPage) @@ -465,6 +498,46 @@ bool ShapeImporter::isSkip( return false; } + +void ShapeImporter::importPolygons(uno::Reference<beans::XPropertySet> const& xPropSet) { + + drawing::PointSequenceSequence aRetval; + sal_Int32 nLineColor=0; + double fLineWidth; + getPropertyValue( aRetval, xPropSet, OUSTR("PolyPolygon") ); + getPropertyValue( nLineColor, xPropSet, OUSTR("LineColor") ); + getPropertyValue( fLineWidth, xPropSet, OUSTR("LineWidth") ); + + drawing::PointSequence* pOuterSequence = aRetval.getArray(); + awt::Point* pInnerSequence = pOuterSequence->getArray(); + + ::basegfx::B2DPolygon aPoly; + basegfx::B2DPoint aPoint; + for( sal_Int32 nCurrPoly=0; nCurrPoly<pOuterSequence->getLength(); ++nCurrPoly ) + { + aPoint.setX((*pInnerSequence).X); + aPoint.setY((*pInnerSequence).Y); + aPoly.append( aPoint ); + *pInnerSequence++; + } + UnoViewVector::const_iterator aIter=(mrContext.mrViewContainer).begin(); + UnoViewVector::const_iterator aEnd=(mrContext.mrViewContainer).end(); + while(aIter != aEnd) + { + ::cppcanvas::PolyPolygonSharedPtr pPolyPoly( + ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( (*aIter)->getCanvas(), + aPoly ) ); + if( pPolyPoly ) + { + pPolyPoly->setRGBALineColor( unoColor2RGBColor( nLineColor ).getIntegerColor() ); + pPolyPoly->setStrokeWidth(fLineWidth); + pPolyPoly->draw(); + maPolygons.push_back(pPolyPoly); + } + aIter++; + } +} + ShapeSharedPtr ShapeImporter::importBackgroundShape() // throw (ShapeLoadFailedException) { if( maShapesStack.empty() ) @@ -506,10 +579,23 @@ ShapeSharedPtr ShapeImporter::importShape() // throw (ShapeLoadFailedException) throw ShapeLoadFailedException(); } - rtl::OUString const shapeType( xCurrShape->getShapeType() ); + //Retrieve the layer for the current shape + uno::Reference< drawing::XLayer > xDrawnInSlideshow; + + uno::Reference< drawing::XLayerSupplier > xLayerSupplier(mxPagesSupplier, uno::UNO_QUERY); + if(xLayerSupplier.is()) + { + uno::Reference< container::XNameAccess > xNameAccess = xLayerSupplier->getLayerManager(); + + uno::Reference< drawing::XLayerManager > xLayerManager(xNameAccess, uno::UNO_QUERY); + + xDrawnInSlideshow = xLayerManager->getLayerForShape(xCurrShape); + } + + rtl::OUString const shapeType( xCurrShape->getShapeType()); // is this shape presentation-invisible? - if( !isSkip(xPropSet, shapeType) ) + if( !isSkip(xPropSet, shapeType, xDrawnInSlideshow) ) { bIsGroupShape = shapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( @@ -549,17 +635,32 @@ bool ShapeImporter::isImportDone() const return maShapesStack.empty(); } -ShapeImporter::ShapeImporter( uno::Reference<drawing::XDrawPage> const& xPage, - uno::Reference<drawing::XDrawPage> const& xActualPage, - const SlideShowContext& rContext, - sal_Int32 nOrdNumStart, - bool bConvertingMasterPage ) : +PolyPolygonVector ShapeImporter::getPolygons() +{ + return maPolygons; +} + +ShapeImporter::ShapeImporter( uno::Reference<drawing::XDrawPage> const& xPage, + uno::Reference<drawing::XDrawPage> const& xActualPage, + uno::Reference<drawing::XDrawPagesSupplier> const& xPagesSupplier, + const SlideShowContext& rContext, + sal_Int32 nOrdNumStart, + bool bConvertingMasterPage ) : mxPage( xActualPage ), +#ifdef ENABLE_PRESENTER_EXTRA_UI + mxPagesSupplier( xPagesSupplier ), +#else + mxPagesSupplier( NULL ), +#endif mrContext( rContext ), + maPolygons(), maShapesStack(), mnAscendingPrio( nOrdNumStart ), mbConvertingMasterPage( bConvertingMasterPage ) { +#ifndef ENABLE_PRESENTER_EXTRA_UI + (void)xPagesSupplier; +#endif uno::Reference<drawing::XShapes> const xShapes( xPage, uno::UNO_QUERY_THROW ); maShapesStack.push( XShapesEntry(xShapes) ); diff --git a/slideshow/source/engine/shapes/viewappletshape.cxx b/slideshow/source/engine/shapes/viewappletshape.cxx index 0889fd7654ed..fe15638edef9 100644 --- a/slideshow/source/engine/shapes/viewappletshape.cxx +++ b/slideshow/source/engine/shapes/viewappletshape.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewappletshape.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -141,7 +138,7 @@ namespace slideshow bool ViewAppletShape::startApplet( const ::basegfx::B2DRectangle& rBounds ) { - ENSURE_OR_RETURN( mpViewLayer && mpViewLayer->getCanvas() && mpViewLayer->getCanvas()->getUNOCanvas().is(), + ENSURE_OR_RETURN_FALSE( mpViewLayer && mpViewLayer->getCanvas() && mpViewLayer->getCanvas()->getUNOCanvas().is(), "ViewAppletShape::startApplet(): Invalid or disposed view" ); try { diff --git a/slideshow/source/engine/shapes/viewappletshape.hxx b/slideshow/source/engine/shapes/viewappletshape.hxx index 437d50d5059f..86782fe64f7b 100644 --- a/slideshow/source/engine/shapes/viewappletshape.hxx +++ b/slideshow/source/engine/shapes/viewappletshape.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewappletshape.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.cxx b/slideshow/source/engine/shapes/viewbackgroundshape.cxx index 5826f752cbec..bbaef1f486e0 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.cxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewbackgroundshape.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -71,7 +68,7 @@ namespace slideshow const GDIMetaFileSharedPtr& rMtf ) const { RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewBackgroundShape::prefetch()" ); - ENSURE_OR_RETURN( rMtf, + ENSURE_OR_RETURN_FALSE( rMtf, "ViewBackgroundShape::prefetch(): no valid metafile!" ); const ::basegfx::B2DHomMatrix& rCanvasTransform( @@ -131,7 +128,7 @@ namespace slideshow *rMtf.get(), ::cppcanvas::Renderer::Parameters() ) ); - ENSURE_OR_RETURN( pRenderer, + ENSURE_OR_RETURN_FALSE( pRenderer, "ViewBackgroundShape::prefetch(): Could not create Renderer" ); pRenderer->setTransformation( aShapeTransform ); @@ -172,7 +169,7 @@ namespace slideshow if( !prefetch( rDestinationCanvas, rMtf ) ) return false; - ENSURE_OR_RETURN( mxBitmap.is(), + ENSURE_OR_RETURN_FALSE( mxBitmap.is(), "ViewBackgroundShape::draw(): Invalid background bitmap" ); ::basegfx::B2DHomMatrix aTransform( mpViewLayer->getTransformation() ); diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.hxx b/slideshow/source/engine/shapes/viewbackgroundshape.hxx index 1c82a6782d3e..a7b6ff36406e 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.hxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewbackgroundshape.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index 03fdff737e7c..1c0b6f9b71a1 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewmediashape.cxx,v $ - * $Revision: 1.6.2.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -275,7 +272,7 @@ namespace slideshow { if( !mxPlayer.is() && mxShape.is() ) { - ENSURE_OR_RETURN( mpViewLayer->getCanvas(), + ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(), "ViewMediaShape::update(): Invalid layer canvas" ); uno::Reference< rendering::XCanvas > xCanvas( mpViewLayer->getCanvas()->getUNOCanvas() ); diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx index f28fe3d74f75..5e2568bbd98e 100644 --- a/slideshow/source/engine/shapes/viewmediashape.hxx +++ b/slideshow/source/engine/shapes/viewmediashape.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewmediashape.hxx,v $ - * $Revision: 1.3.18.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index 4e9c255c86ea..76bce5ebe3e7 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewshape.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -81,7 +78,7 @@ namespace slideshow const ShapeAttributeLayerSharedPtr& rAttr ) const { RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewShape::prefetch()" ); - ENSURE_OR_RETURN( rMtf, + ENSURE_OR_RETURN_FALSE( rMtf, "ViewShape::prefetch(): no valid metafile!" ); if( rMtf != io_rCacheEntry.mpMtf || @@ -207,7 +204,7 @@ namespace slideshow ::cppcanvas::RendererSharedPtr pRenderer( getRenderer( rDestinationCanvas, rMtf, rAttr ) ); - ENSURE_OR_RETURN( pRenderer, "ViewShape::draw(): Invalid renderer" ); + ENSURE_OR_RETURN_FALSE( pRenderer, "ViewShape::draw(): Invalid renderer" ); pRenderer->setTransformation( rTransform ); #if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0 @@ -399,7 +396,7 @@ namespace slideshow mpSprite->resize( rSpriteSizePixel ); } - ENSURE_OR_RETURN( mpSprite, "ViewShape::renderSprite(): No sprite" ); + ENSURE_OR_RETURN_FALSE( mpSprite, "ViewShape::renderSprite(): No sprite" ); VERBOSE_TRACE( "ViewShape::renderSprite(): Rendering sprite 0x%X", mpSprite.get() ); @@ -873,7 +870,7 @@ namespace slideshow bool bIsVisible ) const { RTL_LOGFILE_CONTEXT( aLog, "::presentation::internal::ViewShape::update()" ); - ENSURE_OR_RETURN( mpViewLayer->getCanvas(), "ViewShape::update(): Invalid layer canvas" ); + ENSURE_OR_RETURN_FALSE( mpViewLayer->getCanvas(), "ViewShape::update(): Invalid layer canvas" ); // Shall we render to a sprite, or to a plain canvas? if( isBackgroundDetached() ) diff --git a/slideshow/source/engine/shapes/viewshape.hxx b/slideshow/source/engine/shapes/viewshape.hxx index 3d97235f89a3..a497f8943985 100644 --- a/slideshow/source/engine/shapes/viewshape.hxx +++ b/slideshow/source/engine/shapes/viewshape.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viewshape.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify |