From 7614668de3ffd550cc6d17075c408c01b7a3cc0a Mon Sep 17 00:00:00 2001 From: Release Engineers Date: Thu, 9 Jul 2009 10:44:26 +0000 Subject: [PATCH 01/14] Create DEV300_m52 milestone tag from trunk@273857 From 896edc904b8e32750662d851298ff793900d9057 Mon Sep 17 00:00:00 2001 From: Release Engineers Date: Wed, 16 Sep 2009 08:22:41 +0000 Subject: [PATCH 02/14] Create DEV300_m59 milestone tag from trunk@276191 From 4a30b933fae5b515bcefda592f5de682ba2526de Mon Sep 17 00:00:00 2001 From: thb Date: Fri, 16 Oct 2009 00:43:16 +0200 Subject: [PATCH 03/14] #i105937# Much improved gradient support for canvas/basegfx/drawinglayer. See http://blog.thebehrens.net/2009/07/28/hackweek-iv-canvas-convwatch/ for more background information --- .../source/engine/activities/activitybase.cxx | 2 +- .../continuouskeytimeactivitybase.cxx | 69 ++++--------------- .../continuouskeytimeactivitybase.hxx | 7 +- .../engine/activities/interpolation.hxx | 21 ++++-- slideshow/source/engine/shapes/viewshape.cxx | 7 +- slideshow/source/engine/tools.cxx | 26 +++---- slideshow/source/inc/lerp.hxx | 62 ----------------- 7 files changed, 46 insertions(+), 148 deletions(-) delete mode 100644 slideshow/source/inc/lerp.hxx diff --git a/slideshow/source/engine/activities/activitybase.cxx b/slideshow/source/engine/activities/activitybase.cxx index b1454bfbe392..cf4e55eb0c47 100644 --- a/slideshow/source/engine/activities/activitybase.cxx +++ b/slideshow/source/engine/activities/activitybase.cxx @@ -162,7 +162,7 @@ namespace slideshow // ================================ // clamp nT to permissible [0,1] range - nT = ::canvas::tools::clamp( nT, 0.0, 1.0 ); + nT = ::basegfx::clamp( nT, 0.0, 1.0 ); // take acceleration/deceleration into account. if the sum // of mnAccelerationFraction and mnDecelerationFraction diff --git a/slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx b/slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx index d7f5ccc2beeb..433de7a5a47f 100644 --- a/slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx +++ b/slideshow/source/engine/activities/continuouskeytimeactivitybase.cxx @@ -38,6 +38,7 @@ #include +#include #include #include @@ -48,34 +49,14 @@ namespace slideshow { ContinuousKeyTimeActivityBase::ContinuousKeyTimeActivityBase( const ActivityParameters& rParms ) : SimpleContinuousActivityBase( rParms ), - maKeyTimes( rParms.maDiscreteTimes ), - mnLastIndex( 0 ) + maLerper( rParms.maDiscreteTimes ) { - ENSURE_OR_THROW( maKeyTimes.size() > 1, + ENSURE_OR_THROW( rParms.maDiscreteTimes.size() > 1, "ContinuousKeyTimeActivityBase::ContinuousKeyTimeActivityBase(): key times vector must have two entries or more" ); - -#ifdef DBG_UTIL - // check parameters: rKeyTimes must be sorted in - // ascending order, and contain values only from the range - // [0,1] - for( ::std::size_t i=1, len=maKeyTimes.size(); i 1.0 || - maKeyTimes[i-1] < 0.0 || - maKeyTimes[i-1] > 1.0 ) - { - ENSURE_OR_THROW( false, "ContinuousKeyTimeActivityBase::ContinuousKeyTimeActivityBase(): time values not within [0,1] range!" ); - } - - if( maKeyTimes[i-1] > maKeyTimes[i] ) - { - ENSURE_OR_THROW( false, "ContinuousKeyTimeActivityBase::ContinuousKeyTimeActivityBase(): time vector is not sorted in ascending order!" ); - } - } - - // TODO(E2): check this also in production code? -#endif + ENSURE_OR_THROW( rParms.maDiscreteTimes.front() == 0.0, + "ContinuousKeyTimeActivityBase::ContinuousKeyTimeActivityBase(): key times vector first entry must be zero" ); + ENSURE_OR_THROW( rParms.maDiscreteTimes.back() <= 1.0, + "ContinuousKeyTimeActivityBase::ContinuousKeyTimeActivityBase(): key times vector last entry must be less or equal 1" ); } void ContinuousKeyTimeActivityBase::simplePerform( double nSimpleTime, @@ -84,40 +65,14 @@ namespace slideshow // calc simple time from global time - sweep through the // array multiple times for repeated animations (according to // SMIL spec). - const double nT( calcAcceleratedTime( nSimpleTime ) ); + double fAlpha( calcAcceleratedTime( nSimpleTime ) ); + std::ptrdiff_t nIndex; - // determine position within key times vector from - // current simple time - - // shortcut: cached value still okay? - if( maKeyTimes[ mnLastIndex ] < nT || - maKeyTimes[ mnLastIndex+1 ] >= nT ) - { - // nope, find new index - mnLastIndex = ::std::min< ::std::ptrdiff_t >( - maKeyTimes.size()-2, - // range is ensured by max below - ::std::max< ::std::ptrdiff_t >( - 0, - ::std::distance( maKeyTimes.begin(), - ::std::lower_bound( maKeyTimes.begin(), - maKeyTimes.end(), - nT ) ) - 1 ) ); - } - - OSL_ENSURE( mnLastIndex+1 < maKeyTimes.size(), - "ContinuousKeyTimeActivityBase::simplePerform(): index out of range" ); - - // mnLastIndex is now valid and up-to-date - - // calc current simple time, as a fractional value ([0,1] range). - // I.e. the relative position between the two index times. - const double nCurrFractionalSimplTime( (nT - maKeyTimes[ mnLastIndex ]) / - (maKeyTimes[ mnLastIndex+1 ] - maKeyTimes[ mnLastIndex ]) ); + boost::tuples::tie(nIndex,fAlpha) = maLerper.lerp(fAlpha); perform( - mnLastIndex, - nCurrFractionalSimplTime, + nIndex, + fAlpha, nRepeatCount ); } } diff --git a/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx b/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx index 8714db22bc82..4e1cf5c6703d 100644 --- a/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx +++ b/slideshow/source/engine/activities/continuouskeytimeactivitybase.hxx @@ -32,6 +32,8 @@ #define INCLUDED_SLIDESHOW_CONTINUOUSKEYTIMEACTIVITYBASE_HXX #include "simplecontinuousactivitybase.hxx" + +#include #include @@ -76,10 +78,7 @@ namespace slideshow sal_uInt32 nRepeatCount ) const; private: - const ::std::vector< double > maKeyTimes; - - /// last active index in maKeyTimes (to avoid frequent searching) - mutable ::std::size_t mnLastIndex; + const ::basegfx::tools::KeyStopLerp maLerper; }; } } diff --git a/slideshow/source/engine/activities/interpolation.hxx b/slideshow/source/engine/activities/interpolation.hxx index d79c8296e643..30c5ebc8d24d 100644 --- a/slideshow/source/engine/activities/interpolation.hxx +++ b/slideshow/source/engine/activities/interpolation.hxx @@ -31,11 +31,11 @@ #ifndef INCLUDED_SLIDESHOW_INTERPOLATION_HXX #define INCLUDED_SLIDESHOW_INTERPOLATION_HXX -#include "lerp.hxx" +#include -namespace slideshow +namespace basegfx { - namespace internal + namespace tools { // Interpolator specializations // ============================ @@ -45,9 +45,10 @@ namespace slideshow // not-straight-forward-interpolatable types /// Specialization for RGBColor, to employ color-specific interpolator - template<> RGBColor lerp< RGBColor >( const RGBColor& rFrom, - const RGBColor& rTo, - double t ) + template<> ::slideshow::internal::RGBColor lerp< ::slideshow::internal::RGBColor >( + const ::slideshow::internal::RGBColor& rFrom, + const ::slideshow::internal::RGBColor& rTo, + double t ) { return interpolate( rFrom, rTo, t ); } @@ -81,14 +82,20 @@ namespace slideshow "lerp called" ); return rTo; } + } +} +namespace slideshow +{ + namespace internal + { template< typename ValueType > struct Interpolator { ValueType operator()( const ValueType& rFrom, const ValueType& rTo, double t ) const { - return lerp( rFrom, rTo, t ); + return basegfx::tools::lerp( rFrom, rTo, t ); } }; diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index fb2246309343..23d7edce6174 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -59,7 +59,6 @@ #include "viewshape.hxx" #include "tools.hxx" -#include "lerp.hxx" #include @@ -463,9 +462,9 @@ namespace slideshow if( mbForceUpdate || (nUpdateFlags & ALPHA) ) { mpSprite->setAlpha( (pAttr && pAttr->isAlphaValid()) ? - ::canvas::tools::clamp(pAttr->getAlpha(), - 0.0, - 1.0) : + ::basegfx::clamp(pAttr->getAlpha(), + 0.0, + 1.0) : 1.0 ); } if( mbForceUpdate || (nUpdateFlags & CLIP) ) diff --git a/slideshow/source/engine/tools.cxx b/slideshow/source/engine/tools.cxx index b2c179647db3..dddd44df3b33 100644 --- a/slideshow/source/engine/tools.cxx +++ b/slideshow/source/engine/tools.cxx @@ -51,10 +51,10 @@ #include #include #include +#include #include -#include "lerp.hxx" #include "unoview.hxx" #include "smilfunctionparser.hxx" #include "tools.hxx" @@ -641,18 +641,18 @@ namespace slideshow const ::basegfx::B2DRange& rShapeBounds ) { return ::basegfx::B2DRectangle( - lerp( rShapeBounds.getMinX(), - rShapeBounds.getMaxX(), - rUnitBounds.getMinX() ), - lerp( rShapeBounds.getMinY(), - rShapeBounds.getMaxY(), - rUnitBounds.getMinY() ), - lerp( rShapeBounds.getMinX(), - rShapeBounds.getMaxX(), - rUnitBounds.getMaxX() ), - lerp( rShapeBounds.getMinY(), - rShapeBounds.getMaxY(), - rUnitBounds.getMaxY() ) ); + basegfx::tools::lerp( rShapeBounds.getMinX(), + rShapeBounds.getMaxX(), + rUnitBounds.getMinX() ), + basegfx::tools::lerp( rShapeBounds.getMinY(), + rShapeBounds.getMaxY(), + rUnitBounds.getMinY() ), + basegfx::tools::lerp( rShapeBounds.getMinX(), + rShapeBounds.getMaxX(), + rUnitBounds.getMaxX() ), + basegfx::tools::lerp( rShapeBounds.getMinY(), + rShapeBounds.getMaxY(), + rUnitBounds.getMaxY() ) ); } ::basegfx::B2DRectangle getShapePosSize( const ::basegfx::B2DRectangle& rOrigBounds, diff --git a/slideshow/source/inc/lerp.hxx b/slideshow/source/inc/lerp.hxx deleted file mode 100644 index d194c5217bc9..000000000000 --- a/slideshow/source/inc/lerp.hxx +++ /dev/null @@ -1,62 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: lerp.hxx,v $ - * $Revision: 1.6 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef INCLUDED_SLIDESHOW_LERP_HXX -#define INCLUDED_SLIDESHOW_LERP_HXX - -#include - -namespace slideshow -{ - namespace internal - { - - /** Generic linear interpolator - - @tpl ValueType - Must have operator+ and operator* defined, and should - have value semantics. - - @param t - As usual, t must be in the [0,1] range - */ - template< typename ValueType > ValueType lerp( const ValueType& rFrom, - const ValueType& rTo, - double t ) - { - // This is only to suppress a double->int warning. All other - // types should be okay here. - return static_cast( (1.0-t)*rFrom + t*rTo ); - } - - } -} - -#endif /* INCLUDED_SLIDESHOW_LERP_HXX */ From f2100460c15e58521c20d6cc75fbf3713631d408 Mon Sep 17 00:00:00 2001 From: thb Date: Fri, 16 Oct 2009 00:57:35 +0200 Subject: [PATCH 04/14] #i105939# Adds clip state handling class to basegfx; makes use of that also from slideshow --- slideshow/source/engine/slide/layer.cxx | 11 ++++++----- slideshow/source/engine/slide/layer.hxx | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/slideshow/source/engine/slide/layer.cxx b/slideshow/source/engine/slide/layer.cxx index ae64b7a38773..86864959902b 100644 --- a/slideshow/source/engine/slide/layer.cxx +++ b/slideshow/source/engine/slide/layer.cxx @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include @@ -202,7 +202,8 @@ namespace slideshow { // TODO(Q1): move this to B2DMultiRange if( !rUpdateRange.isEmpty() ) - maUpdateAreas.addRange( rUpdateRange ); + maUpdateAreas.appendElement( rUpdateRange, + basegfx::ORIENTATION_POSITIVE ); } void Layer::updateBounds( ShapeSharedPtr const& rShape ) @@ -248,7 +249,7 @@ namespace slideshow void Layer::clearUpdateRanges() { - maUpdateAreas.reset(); + maUpdateAreas.clear(); } void Layer::clearContent() @@ -284,12 +285,12 @@ namespace slideshow Layer::EndUpdater Layer::beginUpdate() { - if( !maUpdateAreas.isEmpty() ) + if( maUpdateAreas.count() ) { // perform proper layer update. That means, setup proper // clipping, and render each shape that intersects with // the calculated update area - ::basegfx::B2DPolyPolygon aClip( maUpdateAreas.getPolyPolygon() ); + ::basegfx::B2DPolyPolygon aClip( maUpdateAreas.solveCrossovers() ); // actually, if there happen to be shapes with zero // update area in the maUpdateAreas vector, the diff --git a/slideshow/source/engine/slide/layer.hxx b/slideshow/source/engine/slide/layer.hxx index 531d685a1396..e23be76639e8 100644 --- a/slideshow/source/engine/slide/layer.hxx +++ b/slideshow/source/engine/slide/layer.hxx @@ -31,7 +31,7 @@ #ifndef INCLUDED_SLIDESHOW_LAYER_HXX #define INCLUDED_SLIDESHOW_LAYER_HXX -#include +#include #include #include "view.hxx" @@ -187,7 +187,7 @@ namespace slideshow @return true, if any non-empty addUpdateRange() calls have been made since the last render()/update() call. */ - bool isUpdatePending() const { return !maUpdateAreas.isEmpty(); } + bool isUpdatePending() const { return maUpdateAreas.count()!=0; } /** Update layer bound rect from shape bounds */ @@ -297,7 +297,7 @@ namespace slideshow typedef ::std::vector< ViewEntry > ViewEntryVector; ViewEntryVector maViewEntries; - basegfx::B2DMultiRange maUpdateAreas; + basegfx::B2DPolyRange maUpdateAreas; basegfx::B2DRange maBounds; basegfx::B2DRange maNewBounds; const basegfx::B2DRange maMaxBounds; // maBounds is clipped against this From 54a3fd62fe515fc9e50e4f00620ea9600e06145b Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 12 Jan 2010 18:49:59 +0100 Subject: [PATCH 05/14] sb118: #i108269# first step of removing tcsh support --- sd/source/ui/app/makefile.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sd/source/ui/app/makefile.mk b/sd/source/ui/app/makefile.mk index 82a6177a9e95..97a5298d77e1 100644 --- a/sd/source/ui/app/makefile.mk +++ b/sd/source/ui/app/makefile.mk @@ -99,11 +99,7 @@ $(INCCOM)$/sddll0.hxx: makefile.mk .IF "$(GUI)"=="UNX" echo \#define DLL_NAME \"libsd$(DLLPOSTFIX)$(DLLPOST)\" >$@ .ELSE # "$(GUI)"=="UNX" -.IF "$(USE_SHELL)"!="4nt" echo \#define DLL_NAME \"sd$(DLLPOSTFIX).DLL\" >$@ -.ELSE # "$(USE_SHELL)"!="4nt" - echo #define DLL_NAME "sd$(DLLPOSTFIX).DLL" >$@ -.ENDIF # "$(USE_SHELL)"!="4nt" .ENDIF # "$(GUI)"=="UNX" LOCALIZE_ME = tbxids_tmpl.src menuids2_tmpl.src menu_tmpl.src menuids_tmpl.src menuids4_tmpl.src popup2_tmpl.src toolbox2_tmpl.src menuportal_tmpl.src menuids3_tmpl.src From 6e202d5dda72881f8463f5b3d6fe96cb0fedfccf Mon Sep 17 00:00:00 2001 From: hb Date: Tue, 19 Jan 2010 12:56:39 +0100 Subject: [PATCH 06/14] merged DEV300_m69 --- sd/source/core/CustomAnimationEffect.cxx | 19 ++---- sd/source/core/sdpage.cxx | 24 +++----- sd/source/helper/simplereferencecomponent.cxx | 2 +- sd/source/ui/animations/motionpathtag.cxx | 8 +-- sd/source/ui/func/fubullet.cxx | 3 - sd/source/ui/func/fumorph.cxx | 16 +++-- sd/source/ui/slideshow/slideshowviewimpl.cxx | 12 ++-- .../slidesorter/inc/view/SlsViewOverlay.hxx | 3 + .../view/SlsPageObjectViewObjectContact.cxx | 59 ++++++++++--------- .../ui/slidesorter/view/SlsViewOverlay.cxx | 36 +++++++++-- sd/source/ui/unoidl/unopage.cxx | 17 +++++- sd/source/ui/view/PrintManager.cxx | 7 ++- sd/source/ui/view/drviews1.cxx | 18 ++---- sd/source/ui/view/sdview.cxx | 18 +++--- .../engine/shapes/viewbackgroundshape.cxx | 8 +-- slideshow/source/engine/shapes/viewshape.cxx | 6 +- slideshow/source/engine/slidebitmap.cxx | 5 +- slideshow/source/engine/tools.cxx | 8 +-- .../engine/transitions/barndoorwipe.cxx | 7 +-- .../engine/transitions/clippingfunctor.cxx | 14 ++--- .../source/engine/transitions/clockwipe.cxx | 5 +- .../engine/transitions/combtransition.cxx | 23 ++------ .../source/engine/transitions/fanwipe.cxx | 20 +++---- .../source/engine/transitions/figurewipe.cxx | 6 +- .../source/engine/transitions/fourboxwipe.cxx | 20 ++++--- .../source/engine/transitions/iriswipe.cxx | 8 +-- .../engine/transitions/pinwheelwipe.cxx | 11 +--- .../source/engine/transitions/randomwipe.cxx | 5 +- .../engine/transitions/slidechangebase.cxx | 6 +- .../source/engine/transitions/snakewipe.cxx | 36 ++++++----- .../source/engine/transitions/spiralwipe.cxx | 7 +-- .../source/engine/transitions/sweepwipe.cxx | 21 ++++--- .../engine/transitions/transitiontools.cxx | 11 +--- .../engine/transitions/waterfallwipe.cxx | 5 +- .../source/engine/transitions/zigzagwipe.cxx | 9 ++- slideshow/test/demoshow.cxx | 9 +-- 36 files changed, 243 insertions(+), 249 deletions(-) diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 23a04bf9d5ee..040bc7c0a78c 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -69,6 +69,7 @@ #include #include #include +#include #include @@ -1715,21 +1716,16 @@ void CustomAnimationEffect::updateSdrPathObjFromPath( SdrPathObj& rPathObj ) SdrObject* pObj = GetSdrObjectFromXShape( getTargetShape() ); if( pObj ) { - ::basegfx::B2DHomMatrix aTransform; - SdrPage* pPage = pObj->GetPage(); if( pPage ) { const Size aPageSize( pPage->GetSize() ); - aTransform.scale( (double)aPageSize.Width(), (double)aPageSize.Height() ); - xPolyPoly.transform( aTransform ); - aTransform.identity(); + xPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix((double)aPageSize.Width(), (double)aPageSize.Height())); } const Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); const Point aCenter( aBoundRect.Center() ); - aTransform.translate( aCenter.X(), aCenter.Y() ); - xPolyPoly.transform( aTransform ); + xPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(aCenter.X(), aCenter.Y())); } } @@ -1748,17 +1744,14 @@ void CustomAnimationEffect::updatePathFromSdrPathObj( const SdrPathObj& rPathObj const Rectangle aBoundRect( pObj->GetCurrentBoundRect() ); const Point aCenter( aBoundRect.Center() ); - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( -aCenter.X(), -aCenter.Y() ); - xPolyPoly.transform( aTransform ); + xPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(-aCenter.X(), -aCenter.Y())); SdrPage* pPage = pObj->GetPage(); if( pPage ) { - aTransform.identity(); const Size aPageSize( pPage->GetSize() ); - aTransform.scale( 1.0 / (double)aPageSize.Width(), 1.0 / (double)aPageSize.Height() ); - xPolyPoly.transform( aTransform ); + xPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix( + 1.0 / (double)aPageSize.Width(), 1.0 / (double)aPageSize.Height())); } } diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 69d1d0203936..389af0473f85 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -302,8 +302,9 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec case PRESOBJ_HANDOUT: { //Erste Standardseite am SdrPageObj vermerken - SdrPage* pFirstPage = ( (SdDrawDocument*) pModel )->GetSdPage(0, PK_STANDARD); - pSdrObj = new SdrPageObj( pFirstPage ); + // #i105146# We want no content to be displayed for PK_HANDOUT, + // so just never set a page as content + pSdrObj = new SdrPageObj(0); pSdrObj->SetResizeProtect(TRUE); } break; @@ -745,28 +746,17 @@ void SdPage::CreateTitleAndLayout(BOOL bInit, BOOL bCreate ) CalculateHandoutAreas( *static_cast< SdDrawDocument* >(GetModel() ), pMasterPage->GetAutoLayout(), false, aAreas ); const bool bSkip = pMasterPage->GetAutoLayout() == AUTOLAYOUT_HANDOUT3; - - sal_uInt16 nPage = 0; std::vector< Rectangle >::iterator iter( aAreas.begin() ); + while( iter != aAreas.end() ) { SdrPageObj* pPageObj = static_cast(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, FALSE, (*iter++), TRUE) ); - - const sal_uInt16 nDestinationPageNum(2 * nPage + 1); - - if(nDestinationPageNum < pModel->GetPageCount()) - { - pPageObj->SetReferencedPage(pModel->GetPage(nDestinationPageNum)); - } - else - { - pPageObj->SetReferencedPage(0L); - } + // #i105146# We want no content to be displayed for PK_HANDOUT, + // so just never set a page as content + pPageObj->SetReferencedPage(0L); if( bSkip && iter != aAreas.end() ) iter++; - - nPage++; } } diff --git a/sd/source/helper/simplereferencecomponent.cxx b/sd/source/helper/simplereferencecomponent.cxx index 25776e3c420d..2f8bf68dbdf9 100644 --- a/sd/source/helper/simplereferencecomponent.cxx +++ b/sd/source/helper/simplereferencecomponent.cxx @@ -135,7 +135,7 @@ void SimpleReferenceComponent::operator delete(void * pPtr, ) SAL_THROW(()) { -#if defined WNT || (defined IRIX && !defined GCC) +#if defined WNT ::operator delete(pPtr); // WNT lacks a global nothrow operator delete... #else // WNT ::operator delete(pPtr, rNothrow); diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index 887c6014f29c..4fc0ec0dc80e 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -36,6 +36,7 @@ #include #include +#include #include #include @@ -196,9 +197,8 @@ bool PathDragResize::EndSdrDrag(bool /*bCopy*/) SdrPathObj* pPathObj = mxTag->getPathObj(); if( pPathObj ) { - basegfx::B2DHomMatrix aTrans; const Point aRef( DragStat().Ref1() ); - aTrans.translate(-aRef.X(), -aRef.Y()); + basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-aRef.X(), -aRef.Y())); aTrans.scale(double(aXFact), double(aYFact)); aTrans.translate(aRef.X(), aRef.Y()); basegfx::B2DPolyPolygon aDragPoly(pPathObj->GetPathPoly()); @@ -966,8 +966,8 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList ) ::com::sun::star::awt::Point aPos( mxOrigin->getPosition() ); if( (aPos.X != maOriginPos.X) || (aPos.Y != maOriginPos.Y) ) { - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( aPos.X - maOriginPos.X, aPos.Y - maOriginPos.Y ); + const basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + aPos.X - maOriginPos.X, aPos.Y - maOriginPos.Y)); mxPolyPoly.transform( aTransform ); mpPathObj->SetPathPoly( mxPolyPoly ); maOriginPos = aPos; diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index fac03893a880..63dc54edefa5 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -52,9 +52,6 @@ #include #include -#ifdef IRIX -#include -#endif #include #include #include "drawview.hxx" diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx index 83851db28cae..db1dc120e478 100644 --- a/sd/source/ui/func/fumorph.cxx +++ b/sd/source/ui/func/fumorph.cxx @@ -42,13 +42,13 @@ #include #include - #include "View.hxx" #include "ViewShell.hxx" #include "Window.hxx" #include #include #include +#include #include "strings.hrc" #include "sdresid.hxx" @@ -264,9 +264,8 @@ void FuMorph::ImpEqualizePolyPointCount(::basegfx::B2DPolygon& rSmall, const ::b const ::basegfx::B2DPoint aSrcPos(aSrcSize.getCenter()); const ::basegfx::B2DRange aDstSize(::basegfx::tools::getRange(rSmall)); const ::basegfx::B2DPoint aDstPos(aDstSize.getCenter()); - ::basegfx::B2DHomMatrix aTrans; - aTrans.translate(-aSrcPos.getX(), -aSrcPos.getY()); + basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-aSrcPos.getX(), -aSrcPos.getY())); aTrans.scale(aDstSize.getWidth() / aSrcSize.getWidth(), aDstSize.getHeight() / aSrcSize.getHeight()); aTrans.translate(aDstPos.getX(), aDstPos.getY()); @@ -499,16 +498,15 @@ sal_Bool FuMorph::ImpMorphPolygons( for(sal_uInt16 i(0); i < nSteps; i++) { fValue += fFactor; - ::basegfx::B2DPolyPolygon* pNewPolyPoly3D = ImpCreateMorphedPolygon(rPolyPoly1, rPolyPoly2, fValue); + ::basegfx::B2DPolyPolygon* pNewPolyPoly2D = ImpCreateMorphedPolygon(rPolyPoly1, rPolyPoly2, fValue); - const ::basegfx::B2DRange aNewPolySize(::basegfx::tools::getRange(*pNewPolyPoly3D)); + const ::basegfx::B2DRange aNewPolySize(::basegfx::tools::getRange(*pNewPolyPoly2D)); const ::basegfx::B2DPoint aNewS(aNewPolySize.getCenter()); const ::basegfx::B2DPoint aRealS(aStartCenter + (aDelta * fValue)); - ::basegfx::B2DHomMatrix aTrans; const ::basegfx::B2DPoint aDiff(aRealS - aNewS); - aTrans.translate(aDiff.getX(), aDiff.getY()); - pNewPolyPoly3D->transform(aTrans); - rPolyPolyList3D.Insert(pNewPolyPoly3D, LIST_APPEND); + + pNewPolyPoly2D->transform(basegfx::tools::createTranslateB2DHomMatrix(aDiff)); + rPolyPolyList3D.Insert(pNewPolyPoly2D, LIST_APPEND); } } return TRUE; diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx index f4de77f03394..69190f68a0aa 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.cxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx @@ -38,6 +38,8 @@ #include #include +#include + #include #include @@ -384,16 +386,12 @@ geometry::AffineMatrix2D SAL_CALL SlideShowView::getTransformation( ) throw (Ru Point aOutputOffset( ( aWindowSize.Width() - aOutputSize.Width() ) >> 1, ( aWindowSize.Height() - aOutputSize.Height() ) >> 1 ); - ::basegfx::B2DHomMatrix aMatrix; - maPresentationArea = Rectangle( aOutputOffset, aOutputSize ); mrOutputWindow.SetPresentationArea( maPresentationArea ); - // scale presentation into available window rect (minus 10%) - aMatrix.scale( aOutputSize.Width(), aOutputSize.Height() ); - - // center in the window - aMatrix.translate( aOutputOffset.X(), aOutputOffset.Y() ); + // scale presentation into available window rect (minus 10%); center in the window + const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createScaleTranslateB2DHomMatrix( + aOutputSize.Width(), aOutputSize.Height(), aOutputOffset.X(), aOutputOffset.Y())); geometry::AffineMatrix2D aRes; diff --git a/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx b/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx index 1d99584bec4b..93798e095871 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx @@ -89,6 +89,7 @@ protected: OverlayManager. This registration is done on demand. */ void EnsureRegistration (void); + void RemoveRegistration(); }; @@ -147,6 +148,7 @@ class SelectionRectangleOverlay { public: SelectionRectangleOverlay (ViewOverlay& rViewOverlay); + virtual ~SelectionRectangleOverlay(); void Start (const Point& rAnchor); void Update (const Point& rSecondCorner); @@ -176,6 +178,7 @@ class InsertionIndicatorOverlay { public: InsertionIndicatorOverlay (ViewOverlay& rViewOverlay); + virtual ~InsertionIndicatorOverlay(); /** Given a position in model coordinates this method calculates the insertion marker both as an index in the document and as a rectangle diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx index 3e0d61064bdf..8c3fd4532c4f 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx @@ -256,7 +256,7 @@ namespace sd { namespace slidesorter { namespace view { // class for all derived SdPageObjectPrimitives. The SdPageObjectBasePrimitive itself // is pure virtual -class SdPageObjectBasePrimitive : public drawinglayer::primitive2d::BasePrimitive2D +class SdPageObjectBasePrimitive : public drawinglayer::primitive2d::BufferedDecompositionPrimitive2D { private: // the inner range of the SdPageObject visualisation @@ -275,7 +275,7 @@ public: }; SdPageObjectBasePrimitive::SdPageObjectBasePrimitive(const basegfx::B2DRange& rRange) -: drawinglayer::primitive2d::BasePrimitive2D(), +: drawinglayer::primitive2d::BufferedDecompositionPrimitive2D(), maRange(rRange) { } @@ -286,7 +286,7 @@ SdPageObjectBasePrimitive::~SdPageObjectBasePrimitive() bool SdPageObjectBasePrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const { - if(drawinglayer::primitive2d::BasePrimitive2D::operator==(rPrimitive)) + if(drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const SdPageObjectBasePrimitive& rCompare = static_cast< const SdPageObjectBasePrimitive& >(rPrimitive); return (getPageObjectRange() == rCompare.getPageObjectRange()); @@ -306,7 +306,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -325,7 +325,7 @@ public: DeclPrimitrive2DIDBlock() }; -Primitive2DSequence SdPageObjectPageBitmapPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectPageBitmapPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { // add bitmap primitive // to avoid scaling, use the Bitmap pixel size as primitive size @@ -385,7 +385,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -399,7 +399,7 @@ public: const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorOffset(1); const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorThickness(3); -Primitive2DSequence SdPageObjectSelectPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectSelectPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval(2); @@ -470,7 +470,7 @@ class SdPageObjectBorderPrimitive : public SdPageObjectBasePrimitive { protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -481,7 +481,7 @@ public: DeclPrimitrive2DIDBlock() }; -Primitive2DSequence SdPageObjectBorderPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectBorderPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { // since old Width/Height calculations always added a single pixel value, // it is necessary to create a inner range which is one display unit less @@ -524,7 +524,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -537,7 +537,7 @@ public: const sal_Int32 SdPageObjectFocusPrimitive::mnFocusIndicatorOffset(2); -Primitive2DSequence SdPageObjectFocusPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectFocusPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval(2); @@ -633,7 +633,7 @@ private: protected: // method which is to be used to implement the local decomposition of a 2D primitive. - virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: // constructor and destructor @@ -683,6 +683,7 @@ const BitmapEx& SdPageObjectFadeNameNumberPrimitive::getFadeEffectIconBitmap() c return *mpFadeEffectIconBitmap; } + const sal_Int32 SdPageObjectFadeNameNumberPrimitive::mnCommentsIndicatorOffset(9); BitmapEx* SdPageObjectFadeNameNumberPrimitive::mpCommentsIconBitmap = 0; @@ -701,7 +702,7 @@ const BitmapEx& SdPageObjectFadeNameNumberPrimitive::getCommentsIconBitmap() con return *mpCommentsIconBitmap; } -Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const +Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { const xub_StrLen nTextLength(getPageName().Len()); const sal_uInt32 nCount( @@ -727,8 +728,8 @@ Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::createLocalDecompositio // get font attributes basegfx::B2DVector aTextSizeAttribute; - const drawinglayer::primitive2d::FontAttributes aFontAttributes( - drawinglayer::primitive2d::getFontAttributesFromVclFont( + const drawinglayer::attribute::FontAttribute aFontAttribute( + drawinglayer::primitive2d::getFontAttributeFromVclFont( aTextSizeAttribute, getPageNameFont(), false, @@ -834,7 +835,7 @@ Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::createLocalDecompositio 0, aPageName.Len(), aDXArray, - aFontAttributes, + aFontAttribute, aLocale, aFontColor)); } @@ -875,7 +876,7 @@ Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::createLocalDecompositio 0, nNumberLen, aDXArray, - aFontAttributes, + aFontAttribute, aLocale, aFontColor)); @@ -1190,12 +1191,16 @@ void PageObjectViewObjectContact::ActionChanged (void) // Even when we are called from destructor we still have to invalide // the preview bitmap in the cache. const SdrPage* pPage = GetPage(); - SdDrawDocument* pDocument = dynamic_cast(pPage->GetModel()); - if (mpCache!=NULL && pPage!=NULL && pDocument!=NULL) + + if(pPage) { - cache::PageCacheManager::Instance()->InvalidatePreviewBitmap( - pDocument->getUnoModel(), - GetPage()); + SdDrawDocument* pDocument = dynamic_cast(pPage->GetModel()); + if (mpCache!=NULL && pPage!=NULL && pDocument!=NULL) + { + cache::PageCacheManager::Instance()->InvalidatePreviewBitmap( + pDocument->getUnoModel(), + pPage); + } } // call parent @@ -1211,7 +1216,7 @@ void PageObjectViewObjectContact::ActionChanged (void) // Very simple primitive which just remembers the discrete data and applies // it at decomposition time. -class MouseOverEffectPrimitive : public drawinglayer::primitive2d::BasePrimitive2D +class MouseOverEffectPrimitive : public drawinglayer::primitive2d::BufferedDecompositionPrimitive2D { private: basegfx::B2DRange maLogicRange; @@ -1220,7 +1225,7 @@ private: basegfx::BColor maRGBColor; protected: - virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition( + virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition( const drawinglayer::geometry::ViewInformation2D& rViewInformation) const; public: @@ -1229,7 +1234,7 @@ public: sal_uInt32 nDiscreteOffset, sal_uInt32 nDiscreteWidth, const basegfx::BColor& rRGBColor) - : drawinglayer::primitive2d::BasePrimitive2D(), + : drawinglayer::primitive2d::BufferedDecompositionPrimitive2D(), maLogicRange(rLogicRange), mnDiscreteOffset(nDiscreteOffset), mnDiscreteWidth(nDiscreteWidth), @@ -1247,7 +1252,7 @@ public: DeclPrimitrive2DIDBlock() }; -drawinglayer::primitive2d::Primitive2DSequence MouseOverEffectPrimitive::createLocalDecomposition( +drawinglayer::primitive2d::Primitive2DSequence MouseOverEffectPrimitive::create2DDecomposition( const drawinglayer::geometry::ViewInformation2D& rViewInformation) const { // get logic sizes in object coordinate system @@ -1277,7 +1282,7 @@ drawinglayer::primitive2d::Primitive2DSequence MouseOverEffectPrimitive::createL bool MouseOverEffectPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const { - if(drawinglayer::primitive2d::BasePrimitive2D::operator==(rPrimitive)) + if(drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::operator==(rPrimitive)) { const MouseOverEffectPrimitive& rCompare = static_cast< const MouseOverEffectPrimitive& >(rPrimitive); diff --git a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx index 5e338480e236..0cad1985ce35 100644 --- a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx +++ b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx @@ -55,6 +55,8 @@ #include #include #include +#include + #include #include #include @@ -165,9 +167,7 @@ OverlayBase::OverlayBase (ViewOverlay& rViewOverlay) OverlayBase::~OverlayBase (void) { - OverlayManager* pOverlayManager = getOverlayManager(); - if (pOverlayManager != NULL) - pOverlayManager->remove(*this); + OSL_ENSURE(!getOverlayManager(), "Please call RemoveRegistration() in the derived class; it's too late to call it in the base class since virtual methods will be missing when called in the destructor."); } @@ -186,6 +186,16 @@ void OverlayBase::EnsureRegistration (void) +void OverlayBase::RemoveRegistration() +{ + OverlayManager* pOverlayManager = getOverlayManager(); + if (pOverlayManager != NULL) + pOverlayManager->remove(*this); +} + + + + //===== SubstitutionOverlay ================================================= SubstitutionOverlay::SubstitutionOverlay (ViewOverlay& rViewOverlay) @@ -200,6 +210,7 @@ SubstitutionOverlay::SubstitutionOverlay (ViewOverlay& rViewOverlay) SubstitutionOverlay::~SubstitutionOverlay (void) { + RemoveRegistration(); } @@ -245,8 +256,7 @@ void SubstitutionOverlay::Clear (void) void SubstitutionOverlay::Move (const Point& rOffset) { - basegfx::B2DHomMatrix aTranslation; - aTranslation.translate(rOffset.X(), rOffset.Y()); + const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createTranslateB2DHomMatrix(rOffset.X(), rOffset.Y())); maShapes.transform(aTranslation); maPosition += rOffset; @@ -316,6 +326,13 @@ SelectionRectangleOverlay::SelectionRectangleOverlay (ViewOverlay& rViewOverlay) +SelectionRectangleOverlay::~SelectionRectangleOverlay() +{ + RemoveRegistration(); +} + + + Rectangle SelectionRectangleOverlay::GetSelectionRectangle (void) { @@ -391,6 +408,14 @@ InsertionIndicatorOverlay::InsertionIndicatorOverlay (ViewOverlay& rViewOverlay) +InsertionIndicatorOverlay::~InsertionIndicatorOverlay() +{ + RemoveRegistration(); +} + + + + void InsertionIndicatorOverlay::SetPositionAndSize (const Rectangle& aNewBoundingBox) { EnsureRegistration(); @@ -509,6 +534,7 @@ MouseOverIndicatorOverlay::MouseOverIndicatorOverlay (ViewOverlay& rViewOverlay) MouseOverIndicatorOverlay::~MouseOverIndicatorOverlay (void) { + RemoveRegistration(); } diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 187a62f0dcfe..685bb4a48144 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -322,6 +322,7 @@ const SvxItemPropertySet* ImplGetMasterPagePropertySet( PageKind ePageKind ) { MAP_CHAR_LEN(UNO_NAME_PAGE_TOP), WID_PAGE_TOP, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_PAGE_HEIGHT), WID_PAGE_HEIGHT, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_PAGE_ORIENTATION), WID_PAGE_ORIENT, &::getCppuType((const view::PaperOrientation*)0),0, 0}, + { MAP_CHAR_LEN(UNO_NAME_PAGE_NUMBER), WID_PAGE_NUMBER, &::getCppuType((const sal_Int16*)0), beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN(UNO_NAME_PAGE_WIDTH), WID_PAGE_WIDTH, &::getCppuType((const sal_Int32*)0), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_PAGE_LAYOUT), WID_PAGE_LAYOUT, &::getCppuType((const sal_Int16*)0), 0, 0}, { MAP_CHAR_LEN(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, &::getCppuType((const Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, @@ -1001,7 +1002,21 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) aAny <<= (sal_Int16)( GetPage()->GetAutoLayout() ); break; case WID_PAGE_NUMBER: - aAny <<= (sal_Int16)((sal_uInt16)((GetPage()->GetPageNum()-1)>>1) + 1); + { + const sal_uInt16 nPageNumber(GetPage()->GetPageNum()); + + if(nPageNumber > 0) + { + // for all other pages calculate the number + aAny <<= (sal_Int16)((sal_uInt16)((nPageNumber-1)>>1) + 1); + } + else + { + // for pages with number 0 (Handout Master, Handout page) + // return 0 + aAny <<= (sal_Int16)0; + } + } break; case WID_PAGE_DURATION: aAny <<= (sal_Int32)(GetPage()->GetTime()); diff --git a/sd/source/ui/view/PrintManager.cxx b/sd/source/ui/view/PrintManager.cxx index 3963c4cb5273..6d24fdf98e79 100644 --- a/sd/source/ui/view/PrintManager.cxx +++ b/sd/source/ui/view/PrintManager.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include "PrintManager.hxx" @@ -1779,10 +1780,10 @@ void PrintManager::InitHandoutTemplate( PrintInfo& /*rInfo*/, USHORT nSlidesPerH aPoly.insert(0, basegfx::B2DPoint( aRect.Left(), aRect.Top() ) ); aPoly.insert(1, basegfx::B2DPoint( aRect.Right(), aRect.Top() ) ); - basegfx::B2DHomMatrix aMatrix; - aMatrix.translate( 0.0, static_cast< double >( aRect.GetHeight() / 7 ) ); - + const basegfx::B2DHomMatrix aMatrix(basegfx::tools::createTranslateB2DHomMatrix( + 0.0, static_cast< double >( aRect.GetHeight() / 7 ))); basegfx::B2DPolyPolygon aPathPoly; + for( sal_uInt16 nLine = 0; nLine < 7; nLine++ ) { aPoly.transform( aMatrix ); diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 2077a852f960..3d7ec543943b 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -1196,25 +1196,15 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage) { // set pages for all available handout presentation objects sd::ShapeList& rShapeList = pMaster->GetPresentationShapeList(); - - sal_uInt16 nPgNum = 0; SdrObject* pObj = 0; + while( (pObj = rShapeList.getNextShape(pObj)) != 0 ) { if( pMaster->GetPresObjKind(pObj) == PRESOBJ_HANDOUT ) { - const sal_uInt16 nDestinationPageNum(2 * nPgNum + 1); - - if(nDestinationPageNum < GetDoc()->GetPageCount()) - { - static_cast(pObj)->SetReferencedPage(GetDoc()->GetPage(nDestinationPageNum)); - } - else - { - static_cast(pObj)->SetReferencedPage(0L); - } - - nPgNum++; + // #i105146# We want no content to be displayed for PK_HANDOUT, + // so just never set a page as content + static_cast(pObj)->SetReferencedPage(0); } } } diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 020f2a1ffec5..d38704bd124c 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -99,6 +99,7 @@ #include #include #include +#include #include @@ -447,20 +448,19 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP aVclFont.SetHeight( 500 ); - const drawinglayer::primitive2d::FontAttributes aFontAttributes( - drawinglayer::primitive2d::getFontAttributesFromVclFont( + const drawinglayer::attribute::FontAttribute aFontAttribute( + drawinglayer::primitive2d::getFontAttributeFromVclFont( aTextSizeAttribute, aVclFont, false, false)); // fill text matrix - basegfx::B2DHomMatrix aTextMatrix; - - aTextMatrix.scale(aTextSizeAttribute.getX(), aTextSizeAttribute.getY()); - aTextMatrix.shearX(fShearX); - aTextMatrix.rotate(fRotate); - aTextMatrix.translate(fPosX, fPosY); + const basegfx::B2DHomMatrix aTextMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix( + aTextSizeAttribute.getX(), aTextSizeAttribute.getY(), + fShearX, + fRotate, + fPosX, fPosY)); // create DXTextArray (can be empty one) const ::std::vector< double > aDXArray; @@ -476,7 +476,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP 0, nTextLength, aDXArray, - aFontAttributes, + aFontAttribute, aLocale, aFontColor)); drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xRef); diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.cxx b/slideshow/source/engine/shapes/viewbackgroundshape.cxx index 8e6db547cb85..5826f752cbec 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.cxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.cxx @@ -48,6 +48,7 @@ #include #include #include +#include #include @@ -120,10 +121,9 @@ namespace slideshow aLinearTransform.set( 1, 2, 0.0 ); pBitmapCanvas->setTransformation( aLinearTransform ); - ::basegfx::B2DHomMatrix aShapeTransform; - - aShapeTransform.scale( maBounds.getWidth(), maBounds.getHeight() ); - aShapeTransform.translate( maBounds.getMinX(), maBounds.getMinY() ); + const basegfx::B2DHomMatrix aShapeTransform(basegfx::tools::createScaleTranslateB2DHomMatrix( + maBounds.getWidth(), maBounds.getHeight(), + maBounds.getMinX(), maBounds.getMinY())); ::cppcanvas::RendererSharedPtr pRenderer( ::cppcanvas::VCLFactory::getInstance().createRenderer( diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index fb2246309343..4e9c255c86ea 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -51,6 +51,7 @@ #include #include #include +#include #include #include @@ -713,9 +714,8 @@ namespace slideshow aBitmapTransform.invert(); - ::basegfx::B2DHomMatrix aTranslation; - aTranslation.translate( aTmpRect.getMinX(), - aTmpRect.getMinY() ); + const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createTranslateB2DHomMatrix( + aTmpRect.getMinX(), aTmpRect.getMinY())); aBitmapTransform = aBitmapTransform * aTranslation; pBitmap->setTransformation( aBitmapTransform ); diff --git a/slideshow/source/engine/slidebitmap.cxx b/slideshow/source/engine/slidebitmap.cxx index 9cc6f042cdb2..c06cc0786865 100644 --- a/slideshow/source/engine/slidebitmap.cxx +++ b/slideshow/source/engine/slidebitmap.cxx @@ -42,6 +42,7 @@ #include #include +#include #include #include @@ -78,9 +79,7 @@ namespace slideshow rendering::RenderState aRenderState; ::canvas::tools::initRenderState( aRenderState ); - ::basegfx::B2DHomMatrix aTranslation; - aTranslation.translate( maOutputPos.getX(), - maOutputPos.getY() ); + const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createTranslateB2DHomMatrix(maOutputPos)); ::canvas::tools::setRenderStateTransform( aRenderState, aTranslation ); try diff --git a/slideshow/source/engine/tools.cxx b/slideshow/source/engine/tools.cxx index b2c179647db3..136e70743916 100644 --- a/slideshow/source/engine/tools.cxx +++ b/slideshow/source/engine/tools.cxx @@ -51,6 +51,7 @@ #include #include #include +#include #include @@ -524,10 +525,9 @@ namespace slideshow { if( !pAttr ) { - ::basegfx::B2DHomMatrix aTransform; - - aTransform.scale( rShapeBounds.getWidth(), rShapeBounds.getHeight() ); - aTransform.translate( rShapeBounds.getMinX(), rShapeBounds.getMinY() ); + const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix( + rShapeBounds.getWidth(), rShapeBounds.getHeight(), + rShapeBounds.getMinX(), rShapeBounds.getMinY())); return aTransform; } diff --git a/slideshow/source/engine/transitions/barndoorwipe.cxx b/slideshow/source/engine/transitions/barndoorwipe.cxx index fb9388ff9ee8..be226c2c560d 100644 --- a/slideshow/source/engine/transitions/barndoorwipe.cxx +++ b/slideshow/source/engine/transitions/barndoorwipe.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include "barndoorwipe.hxx" @@ -45,8 +46,7 @@ namespace internal { if (m_doubled) t /= 2.0; - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( -0.5, -0.5 ); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); aTransform.scale( ::basegfx::pruneScaleValue(t), 1.0 ); aTransform.translate( 0.5, 0.5 ); ::basegfx::B2DPolygon poly( m_unitRect ); @@ -54,8 +54,7 @@ namespace internal { ::basegfx::B2DPolyPolygon res(poly); if (m_doubled) { - aTransform.identity(); - aTransform.translate( -0.5, -0.5 ); + aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); aTransform.rotate( M_PI_2 ); aTransform.translate( 0.5, 0.5 ); poly.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/clippingfunctor.cxx b/slideshow/source/engine/transitions/clippingfunctor.cxx index 97bb7fbd688f..58a50815b3ce 100644 --- a/slideshow/source/engine/transitions/clippingfunctor.cxx +++ b/slideshow/source/engine/transitions/clippingfunctor.cxx @@ -40,6 +40,7 @@ #include #include #include +#include namespace slideshow { @@ -134,20 +135,19 @@ namespace slideshow break; case TransitionInfo::REVERSEMETHOD_ROTATE_180: - maStaticTransformation.translate( -0.5, -0.5 ); - maStaticTransformation.rotate( M_PI ); - maStaticTransformation.translate( 0.5, 0.5 ); + maStaticTransformation = basegfx::tools::createRotateAroundPoint(0.5, 0.5, M_PI) + * maStaticTransformation; break; case TransitionInfo::REVERSEMETHOD_FLIP_X: - maStaticTransformation.scale( -1.0, 1.0 ); - maStaticTransformation.translate( 1.0, 0.0 ); + maStaticTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0) + * maStaticTransformation; mbFlip = true; break; case TransitionInfo::REVERSEMETHOD_FLIP_Y: - maStaticTransformation.scale( 1.0, -1.0 ); - maStaticTransformation.translate( 0.0, 1.0 ); + maStaticTransformation = basegfx::tools::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0) + * maStaticTransformation; mbFlip = true; break; } diff --git a/slideshow/source/engine/transitions/clockwipe.cxx b/slideshow/source/engine/transitions/clockwipe.cxx index 16088f1954d0..5beef1efcbd9 100644 --- a/slideshow/source/engine/transitions/clockwipe.cxx +++ b/slideshow/source/engine/transitions/clockwipe.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "clockwipe.hxx" @@ -66,9 +67,7 @@ namespace internal { ::basegfx::B2DPolyPolygon ClockWipe::operator () ( double t ) { - ::basegfx::B2DHomMatrix aTransform; - aTransform.scale( 0.5, 0.5 ); - aTransform.translate( 0.5, 0.5 ); + const basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); ::basegfx::B2DPolygon poly( calcCenteredClock(t) ); poly.transform( aTransform ); return ::basegfx::B2DPolyPolygon(poly); diff --git a/slideshow/source/engine/transitions/combtransition.cxx b/slideshow/source/engine/transitions/combtransition.cxx index a222592b7d8d..93238162cadb 100644 --- a/slideshow/source/engine/transitions/combtransition.cxx +++ b/slideshow/source/engine/transitions/combtransition.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include @@ -70,11 +71,7 @@ basegfx::B2DPolyPolygon createClipPolygon( // rotate polygons, such that the strips are parallel to // the given direction vector const ::basegfx::B2DVector aUpVec(0.0, 1.0); - ::basegfx::B2DHomMatrix aMatrix; - - aMatrix.translate( -0.5, -0.5 ); - aMatrix.rotate( aUpVec.angle( rDirection ) ); - aMatrix.translate( 0.5, 0.5 ); + basegfx::B2DHomMatrix aMatrix(basegfx::tools::createRotateAroundPoint(0.5, 0.5, aUpVec.angle( rDirection ))); // blow up clip polygon to slide size aMatrix.scale( rSlideSize.getX(), @@ -129,7 +126,6 @@ void CombTransition::renderComb( double t, // change transformation on cloned canvas to be in // device pixel cppcanvas::CanvasSharedPtr pCanvas( pCanvas_->clone() ); - basegfx::B2DHomMatrix transform; basegfx::B2DPoint p; // TODO(Q2): Use basegfx bitmaps here @@ -156,17 +152,14 @@ void CombTransition::renderComb( double t, pLeavingBitmap->clip( aClipPolygon1 ); // don't modify bitmap object (no move!): p = basegfx::B2DPoint( pageOrigin + (t * aPushDirection) ); - transform.translate( p.getX(), p.getY() ); - pCanvas->setTransformation( transform ); + pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); pLeavingBitmap->draw( pCanvas ); // render even strips: pLeavingBitmap->clip( aClipPolygon2 ); // don't modify bitmap object (no move!): - transform.identity(); p = basegfx::B2DPoint( pageOrigin - (t * aPushDirection) ); - transform.translate( p.getX(), p.getY() ); - pCanvas->setTransformation( transform ); + pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); pLeavingBitmap->draw( pCanvas ); } @@ -176,19 +169,15 @@ void CombTransition::renderComb( double t, // render odd strips: pEnteringBitmap->clip( aClipPolygon1 ); // don't modify bitmap object (no move!): - transform.identity(); p = basegfx::B2DPoint( pageOrigin + ((t - 1.0) * aPushDirection) ); - transform.translate( p.getX(), p.getY() ); - pCanvas->setTransformation( transform ); + pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); pEnteringBitmap->draw( pCanvas ); // render even strips: pEnteringBitmap->clip( aClipPolygon2 ); // don't modify bitmap object (no move!): - transform.identity(); p = basegfx::B2DPoint( pageOrigin + ((1.0 - t) * aPushDirection) ); - transform.translate( p.getX(), p.getY() ); - pCanvas->setTransformation( transform ); + pCanvas->setTransformation(basegfx::tools::createTranslateB2DHomMatrix(p.getX(), p.getY())); pEnteringBitmap->draw( pCanvas ); } diff --git a/slideshow/source/engine/transitions/fanwipe.cxx b/slideshow/source/engine/transitions/fanwipe.cxx index 286d2a6b57de..220aa108c3f6 100644 --- a/slideshow/source/engine/transitions/fanwipe.cxx +++ b/slideshow/source/engine/transitions/fanwipe.cxx @@ -33,6 +33,7 @@ #include #include +#include #include "transitiontools.hxx" #include "clockwipe.hxx" #include "fanwipe.hxx" @@ -50,26 +51,21 @@ namespace internal { res.append( poly ); // flip on y-axis: - ::basegfx::B2DHomMatrix aTransform; - aTransform.scale( -1.0, 1.0 ); - poly.transform( aTransform ); + poly.transform(basegfx::tools::createScaleB2DHomMatrix(-1.0, 1.0)); poly.flip(); res.append( poly ); - aTransform.identity(); - if (m_center) { - aTransform.scale( 0.5, 0.5 ); - aTransform.translate( 0.5, 0.5 ); - res.transform( aTransform ); + if (m_center) + { + res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); if (! m_single) res.append( flipOnXAxis(res) ); } - else { + else + { OSL_ASSERT( ! m_fanIn ); - aTransform.scale( 0.5, 1.0 ); - aTransform.translate( 0.5, 1.0 ); - res.transform( aTransform ); + res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 1.0, 0.5, 1.0)); } return res; } diff --git a/slideshow/source/engine/transitions/figurewipe.cxx b/slideshow/source/engine/transitions/figurewipe.cxx index d4f4a2d2fe52..9c0576905877 100644 --- a/slideshow/source/engine/transitions/figurewipe.cxx +++ b/slideshow/source/engine/transitions/figurewipe.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "transitiontools.hxx" #include "figurewipe.hxx" @@ -45,10 +46,7 @@ namespace internal { ::basegfx::B2DPolyPolygon FigureWipe::operator () ( double t ) { ::basegfx::B2DPolyPolygon res(m_figure); - ::basegfx::B2DHomMatrix aTransform; - aTransform.scale( t, t ); - aTransform.translate( 0.5, 0.5 ); - res.transform( aTransform ); + res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(t, t, 0.5, 0.5)); return res; } diff --git a/slideshow/source/engine/transitions/fourboxwipe.cxx b/slideshow/source/engine/transitions/fourboxwipe.cxx index 61793eaa5a6b..96895cf44b10 100644 --- a/slideshow/source/engine/transitions/fourboxwipe.cxx +++ b/slideshow/source/engine/transitions/fourboxwipe.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "fourboxwipe.hxx" @@ -45,13 +46,15 @@ namespace internal { { ::basegfx::B2DHomMatrix aTransform; const double d = ::basegfx::pruneScaleValue( t / 2.0 ); - if (m_cornersOut) { - aTransform.translate( -0.5, -0.5 ); - aTransform.scale( d, d ); - aTransform.translate( -0.25, -0.25 ); - } else { - aTransform.scale( d, d ); - aTransform.translate( -0.5, -0.5 ); + if (m_cornersOut) + { + aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); + aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, -0.25, -0.25) + * aTransform; + } + else + { + aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, -0.5, -0.5); } // top left: @@ -76,8 +79,7 @@ namespace internal { square4.flip(); // flip direction res.append( square4 ); - aTransform.identity(); - aTransform.translate( 0.5, 0.5 ); + aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.5, 0.5); res.transform( aTransform ); return res; } diff --git a/slideshow/source/engine/transitions/iriswipe.cxx b/slideshow/source/engine/transitions/iriswipe.cxx index 757108ada909..e58a8363e3f8 100644 --- a/slideshow/source/engine/transitions/iriswipe.cxx +++ b/slideshow/source/engine/transitions/iriswipe.cxx @@ -33,6 +33,7 @@ #include #include +#include #include "iriswipe.hxx" @@ -41,11 +42,10 @@ namespace internal { ::basegfx::B2DPolyPolygon IrisWipe::operator () ( double t ) { - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( -0.5, -0.5 ); const double d = ::basegfx::pruneScaleValue(t); - aTransform.scale( d, d ); - aTransform.translate( 0.5, 0.5 ); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); + aTransform = basegfx::tools::createScaleTranslateB2DHomMatrix(d, d, 0.5, 0.5) * aTransform; + ::basegfx::B2DPolyPolygon res( m_unitRect ); res.transform( aTransform ); return res; diff --git a/slideshow/source/engine/transitions/pinwheelwipe.cxx b/slideshow/source/engine/transitions/pinwheelwipe.cxx index 7e0ec35dff21..d959abb72a4d 100644 --- a/slideshow/source/engine/transitions/pinwheelwipe.cxx +++ b/slideshow/source/engine/transitions/pinwheelwipe.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include "clockwipe.hxx" #include "pinwheelwipe.hxx" @@ -43,23 +44,17 @@ namespace internal { ::basegfx::B2DPolyPolygon PinWheelWipe::operator () ( double t ) { - ::basegfx::B2DHomMatrix aTransform; ::basegfx::B2DPolygon poly( ClockWipe::calcCenteredClock( t / m_blades, 2.0 /* max edge when rotating */ ) ); ::basegfx::B2DPolyPolygon res; for ( sal_Int32 i = m_blades; i--; ) { - aTransform.identity(); - aTransform.rotate( (i * 2.0 * M_PI) / m_blades ); ::basegfx::B2DPolygon p(poly); - p.transform( aTransform ); + p.transform(basegfx::tools::createRotateB2DHomMatrix((i * 2.0 * M_PI) / m_blades)); res.append( p ); } - aTransform.identity(); - aTransform.scale( 0.5, 0.5 ); - aTransform.translate( 0.5, 0.5 ); - res.transform( aTransform ); + res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(0.5, 0.5, 0.5, 0.5)); return res; } diff --git a/slideshow/source/engine/transitions/randomwipe.cxx b/slideshow/source/engine/transitions/randomwipe.cxx index 94d73d613845..875ec1b3daa0 100644 --- a/slideshow/source/engine/transitions/randomwipe.cxx +++ b/slideshow/source/engine/transitions/randomwipe.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include "randomwipe.hxx" #include "tools.hxx" @@ -85,11 +86,9 @@ RandomWipe::RandomWipe( sal_Int32 nElements, bool randomBars ) ::basegfx::B2DPolyPolygon res; for ( sal_Int32 pos = static_cast(t * m_nElements); pos--; ) { - ::basegfx::B2DHomMatrix aTransform; ::basegfx::B2DPoint const & point = m_positions[ pos ]; - aTransform.translate( point.getX(), point.getY() ); ::basegfx::B2DPolygon poly( m_rect ); - poly.transform( aTransform ); + poly.transform(basegfx::tools::createTranslateB2DHomMatrix(point.getX(), point.getY())); res.append( poly ); } return res; diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx index c8b5cc4a4970..d855b7114ec6 100644 --- a/slideshow/source/engine/transitions/slidechangebase.cxx +++ b/slideshow/source/engine/transitions/slidechangebase.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include "slidechangebase.hxx" @@ -179,9 +180,10 @@ void SlideChangeBase::renderBitmap( viewTransform * basegfx::B2DPoint() ); const cppcanvas::CanvasSharedPtr pDevicePixelCanvas( pCanvas->clone() ); - basegfx::B2DHomMatrix transform; + // render at output position, don't modify bitmap object (no move!): - transform.translate( pageOrigin.getX(), pageOrigin.getY() ); + const basegfx::B2DHomMatrix transform(basegfx::tools::createTranslateB2DHomMatrix( + pageOrigin.getX(), pageOrigin.getY())); pDevicePixelCanvas->setTransformation( transform ); pSlideBitmap->draw( pDevicePixelCanvas ); diff --git a/slideshow/source/engine/transitions/snakewipe.cxx b/slideshow/source/engine/transitions/snakewipe.cxx index 496eaa559a6a..a8050a1b0e9a 100644 --- a/slideshow/source/engine/transitions/snakewipe.cxx +++ b/slideshow/source/engine/transitions/snakewipe.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "snakewipe.hxx" #include "transitiontools.hxx" @@ -121,16 +122,20 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) poly.append( ::basegfx::B2DPoint( len + a, 0.0 ) ); poly.setClosed(true); ::basegfx::B2DHomMatrix aTransform; - if ((static_cast(sqrtArea2) & 1) == 1) { + + if ((static_cast(sqrtArea2) & 1) == 1) + { // odd line - aTransform.rotate( M_PI_2 + M_PI_4 ); - aTransform.translate( edge + m_elementEdge, 0.0 ); + aTransform = basegfx::tools::createRotateB2DHomMatrix(M_PI_2 + M_PI_4); + aTransform.translate(edge + m_elementEdge, 0.0); } - else { - aTransform.translate( -a, 0.0 ); + else + { + aTransform = basegfx::tools::createTranslateB2DHomMatrix(-a, 0.0); aTransform.rotate( -M_PI_4 ); aTransform.translate( 0.0, edge ); } + poly.transform( aTransform ); res.append(poly); } @@ -161,14 +166,17 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) poly.append( ::basegfx::B2DPoint( len + a, 0.0 ) ); poly.setClosed(true); ::basegfx::B2DHomMatrix aTransform; - if ((static_cast(sqrtArea2) & 1) == 1) { + + if ((static_cast(sqrtArea2) & 1) == 1) + { // odd line - aTransform.translate( 0.0, -height ); + aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.0, -height); aTransform.rotate( M_PI_2 + M_PI_4 ); aTransform.translate( 1.0, edge ); } - else { - aTransform.rotate( -M_PI_4 ); + else + { + aTransform = basegfx::tools::createRotateB2DHomMatrix(-M_PI_4); aTransform.translate( edge, 1.0 ); } poly.transform( aTransform ); @@ -205,17 +213,16 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) ::basegfx::B2DPolyPolygon half( calcHalfDiagonalSnake( t, false /* out */ ) ); // flip on x axis and rotate 90 degrees: - ::basegfx::B2DHomMatrix aTransform; - aTransform.scale( 1.0, -1.0 ); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createScaleB2DHomMatrix(1.0, -1.0)); aTransform.translate( -0.5, 0.5 ); aTransform.rotate( M_PI_2 ); aTransform.translate( 0.5, 0.5 ); half.transform( aTransform ); half.flip(); res.append( half ); + // rotate 180 degrees: - aTransform.identity(); - aTransform.translate( -0.5, -0.5 ); + aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); aTransform.rotate( M_PI ); aTransform.translate( 0.5, 0.5 ); half.transform( aTransform ); @@ -225,8 +232,7 @@ SnakeWipe::SnakeWipe( sal_Int32 nElements, bool diagonal, bool flipOnYAxis ) { ::basegfx::B2DPolyPolygon half( calcSnake( t / 2.0 ) ); // rotate 90 degrees: - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( -0.5, -0.5 ); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); aTransform.rotate( M_PI_2 ); aTransform.translate( 0.5, 0.5 ); half.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/spiralwipe.cxx b/slideshow/source/engine/transitions/spiralwipe.cxx index f02c360a2628..5b8463ad9eea 100644 --- a/slideshow/source/engine/transitions/spiralwipe.cxx +++ b/slideshow/source/engine/transitions/spiralwipe.cxx @@ -38,6 +38,7 @@ #include #include #include +#include namespace slideshow { @@ -57,8 +58,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis ) const double e = (sqrt(area) / 2.0); const sal_Int32 edge = (static_cast(e) * 2); - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( -0.5, -0.5 ); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5)); const double edge_ = ::basegfx::pruneScaleValue( static_cast(edge) / m_sqrtElements ); aTransform.scale( edge_, edge_ ); @@ -75,8 +75,7 @@ SpiralWipe::SpiralWipe( sal_Int32 nElements, bool flipOnYAxis ) const sal_Int32 alen = (len > edge1 ? edge1 : len); len -= alen; poly = createUnitRect(); - aTransform.identity(); - aTransform.scale( + aTransform = basegfx::tools::createScaleB2DHomMatrix( ::basegfx::pruneScaleValue( static_cast(alen) / m_sqrtElements ), ::basegfx::pruneScaleValue( 1.0 / m_sqrtElements ) ); aTransform.translate( diff --git a/slideshow/source/engine/transitions/sweepwipe.cxx b/slideshow/source/engine/transitions/sweepwipe.cxx index 17a3d8933797..ae6bd8a21f82 100644 --- a/slideshow/source/engine/transitions/sweepwipe.cxx +++ b/slideshow/source/engine/transitions/sweepwipe.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include "clockwipe.hxx" #include "sweepwipe.hxx" #include "transitiontools.hxx" @@ -52,22 +53,26 @@ namespace internal { ::basegfx::B2DPolygon poly( ClockWipe::calcCenteredClock( 0.25 + t ) ); ::basegfx::B2DHomMatrix aTransform; - if (m_center) { - aTransform.translate( 0.5, 0.0 ); + + if (m_center) + { + aTransform = basegfx::tools::createTranslateB2DHomMatrix(0.5, 0.0); poly.transform( aTransform ); } ::basegfx::B2DPolyPolygon res(poly); - if (! m_single) { - aTransform.identity(); - if (m_oppositeVertical) { - aTransform.scale( 1.0, -1.0 ); + if (! m_single) + { + if (m_oppositeVertical) + { + aTransform = basegfx::tools::createScaleB2DHomMatrix(1.0, -1.0); aTransform.translate( 0.0, 1.0 ); poly.transform( aTransform ); poly.flip(); } - else { - aTransform.translate( -0.5, -0.5 ); + else + { + aTransform = basegfx::tools::createTranslateB2DHomMatrix(-0.5, -0.5); aTransform.rotate( M_PI ); aTransform.translate( 0.5, 0.5 ); poly.transform( aTransform ); diff --git a/slideshow/source/engine/transitions/transitiontools.cxx b/slideshow/source/engine/transitions/transitiontools.cxx index 6197e24514e0..c09bd12ef43d 100644 --- a/slideshow/source/engine/transitions/transitiontools.cxx +++ b/slideshow/source/engine/transitions/transitiontools.cxx @@ -36,6 +36,7 @@ #include #include #include +#include namespace slideshow { @@ -53,10 +54,7 @@ namespace internal { ::basegfx::B2DPolyPolygon const & polypoly ) { ::basegfx::B2DPolyPolygon res(polypoly); - ::basegfx::B2DHomMatrix aTransform; - aTransform.scale( -1.0, 1.0 ); - aTransform.translate( 1.0, 0.0 ); - res.transform( aTransform ); + res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(-1.0, 1.0, 1.0, 0.0)); res.flip(); return res; } @@ -65,10 +63,7 @@ namespace internal { ::basegfx::B2DPolyPolygon const & polypoly ) { ::basegfx::B2DPolyPolygon res(polypoly); - ::basegfx::B2DHomMatrix aTransform; - aTransform.scale( 1.0, -1.0 ); - aTransform.translate( 0.0, 1.0 ); - res.transform( aTransform ); + res.transform(basegfx::tools::createScaleTranslateB2DHomMatrix(1.0, -1.0, 0.0, 1.0)); res.flip(); return res; } diff --git a/slideshow/source/engine/transitions/waterfallwipe.cxx b/slideshow/source/engine/transitions/waterfallwipe.cxx index 7a86edff5c67..c81cf2c68433 100644 --- a/slideshow/source/engine/transitions/waterfallwipe.cxx +++ b/slideshow/source/engine/transitions/waterfallwipe.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "waterfallwipe.hxx" #include "transitiontools.hxx" @@ -67,9 +68,7 @@ WaterfallWipe::WaterfallWipe( sal_Int32 nElements, bool flipOnYAxis ) ::basegfx::B2DPolyPolygon WaterfallWipe::operator () ( double t ) { ::basegfx::B2DPolygon poly( m_waterfall ); - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( 0.0, ::basegfx::pruneScaleValue( 2.0 * t ) ); - poly.transform( aTransform ); + poly.transform(basegfx::tools::createTranslateB2DHomMatrix(0.0, ::basegfx::pruneScaleValue(2.0 * t))); poly.setB2DPoint( 0, ::basegfx::B2DPoint( 0.0, -1.0 ) ); poly.setB2DPoint( poly.count()-1, ::basegfx::B2DPoint( 1.0, -1.0 ) ); diff --git a/slideshow/source/engine/transitions/zigzagwipe.cxx b/slideshow/source/engine/transitions/zigzagwipe.cxx index edc16099f843..8fa22c15c052 100644 --- a/slideshow/source/engine/transitions/zigzagwipe.cxx +++ b/slideshow/source/engine/transitions/zigzagwipe.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "transitiontools.hxx" #include "zigzagwipe.hxx" @@ -58,10 +59,8 @@ ZigZagWipe::ZigZagWipe( sal_Int32 nZigs ) : m_zigEdge( 1.0 / nZigs ) ::basegfx::B2DPolyPolygon ZigZagWipe::operator () ( double t ) { - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( (1.0 + m_zigEdge) * t, 0.0 ); ::basegfx::B2DPolyPolygon res(m_stdZigZag); - res.transform( aTransform ); + res.transform(basegfx::tools::createTranslateB2DHomMatrix((1.0 + m_zigEdge) * t, 0.0)); return res; } @@ -70,8 +69,8 @@ ZigZagWipe::ZigZagWipe( sal_Int32 nZigs ) : m_zigEdge( 1.0 / nZigs ) ::basegfx::B2DPolyPolygon res( createUnitRect() ); ::basegfx::B2DPolygon poly( m_stdZigZag ); poly.flip(); - ::basegfx::B2DHomMatrix aTransform; - aTransform.translate( (1.0 + m_zigEdge) * (1.0 - t) / 2.0, 0.0 ); + basegfx::B2DHomMatrix aTransform(basegfx::tools::createTranslateB2DHomMatrix( + (1.0 + m_zigEdge) * (1.0 - t) / 2.0, 0.0)); poly.transform( aTransform ); res.append( poly ); aTransform.scale( -1.0, 1.0 ); diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx index da7b4bfe3d3a..f860644dd5ac 100644 --- a/slideshow/test/demoshow.cxx +++ b/slideshow/test/demoshow.cxx @@ -100,12 +100,9 @@ public: void resize( const ::Size& rNewSize ) { maSize = rNewSize; - maTransform.identity(); - const sal_Int32 nSize( std::min( rNewSize.Width(), - rNewSize.Height() ) - 10 ); - maTransform.scale( nSize, nSize ); - maTransform.translate( (rNewSize.Width() - nSize) / 2, - (rNewSize.Height() - nSize) / 2 ); + const sal_Int32 nSize( std::min( rNewSize.Width(), rNewSize.Height() ) - 10); + maTransform = basegfx::tools::createScaleTranslateB2DHomMatrix( + nSize, nSize, (rNewSize.Width() - nSize) / 2, (rNewSize.Height() - nSize) / 2); lang::EventObject aEvent( *this ); maTransformationListeners.notifyEach( &util::XModifyListener::modified, From 20001a2598d53b38ddb551851d31f1d536e6c3d0 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 29 Jan 2010 17:01:54 +0100 Subject: [PATCH 07/14] sb118: #i108776# changed addsym.awk to also export STLport num_put symbols, and simplified it by requiring that first section is labeled UDK_3_0_0; adapted map files accordingly, replacing many individual ones with solenv/src templates --- animations/source/animcore/animcore.map | 9 --------- animations/source/animcore/makefile.mk | 2 +- sd/util/makefile.mk | 2 +- sd/util/sd.map | 8 -------- sd/util/sdd.map | 8 -------- sd/util/sdfilt.map | 2 +- sd/util/sdui.map | 2 +- slideshow/source/engine/OGLTrans/exports.map | 8 -------- slideshow/source/engine/OGLTrans/makefile.mk | 2 +- slideshow/test/export.map | 2 +- slideshow/util/exports.map | 8 -------- slideshow/util/makefile.mk | 2 +- 12 files changed, 7 insertions(+), 48 deletions(-) delete mode 100644 animations/source/animcore/animcore.map delete mode 100644 sd/util/sd.map delete mode 100644 sd/util/sdd.map delete mode 100644 slideshow/source/engine/OGLTrans/exports.map delete mode 100644 slideshow/util/exports.map diff --git a/animations/source/animcore/animcore.map b/animations/source/animcore/animcore.map deleted file mode 100644 index 30c5bb729ac7..000000000000 --- a/animations/source/animcore/animcore.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/animations/source/animcore/makefile.mk b/animations/source/animcore/makefile.mk index b68f0299a53c..2fe38c02b166 100644 --- a/animations/source/animcore/makefile.mk +++ b/animations/source/animcore/makefile.mk @@ -52,7 +52,7 @@ SLOFILES = $(SLO)$/animcore.obj\ $(SLO)$/targetpropertiescreator.obj SHL1TARGET= $(TARGET) -SHL1VERSIONMAP= $(TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/unloadablecomponent.map SHL1STDLIBS= \ $(SALLIB) \ diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk index d74700307291..085074ba0974 100644 --- a/sd/util/makefile.mk +++ b/sd/util/makefile.mk @@ -160,7 +160,7 @@ LIB6FILES= \ # sdd SHL2TARGET= sdd$(DLLPOSTFIX) SHL2IMPLIB= sddimp -SHL2VERSIONMAP= sdd.map +SHL2VERSIONMAP=$(SOLARENV)/src/component.map SHL2DEF=$(MISC)$/$(SHL2TARGET).def DEF2NAME= $(SHL2TARGET) diff --git a/sd/util/sd.map b/sd/util/sd.map deleted file mode 100644 index 59e1057c6daa..000000000000 --- a/sd/util/sd.map +++ /dev/null @@ -1,8 +0,0 @@ -SD_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/sd/util/sdd.map b/sd/util/sdd.map deleted file mode 100644 index c7439a13948e..000000000000 --- a/sd/util/sdd.map +++ /dev/null @@ -1,8 +0,0 @@ -SCH_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/sd/util/sdfilt.map b/sd/util/sdfilt.map index 62213393408d..e38cc1e8c597 100644 --- a/sd/util/sdfilt.map +++ b/sd/util/sdfilt.map @@ -1,4 +1,4 @@ -PPTEXPORTER_1_0 { +UDK_3_0_0 { global: ExportPPT; ImportPPT; diff --git a/sd/util/sdui.map b/sd/util/sdui.map index 51f26bb81cfb..ad5e33836c7c 100644 --- a/sd/util/sdui.map +++ b/sd/util/sdui.map @@ -1,4 +1,4 @@ -CUI_1_0 { +UDK_3_0_0 { global: CreateDialogFactory; local: diff --git a/slideshow/source/engine/OGLTrans/exports.map b/slideshow/source/engine/OGLTrans/exports.map deleted file mode 100644 index ebc8f13ea1bd..000000000000 --- a/slideshow/source/engine/OGLTrans/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -SLI_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/slideshow/source/engine/OGLTrans/makefile.mk b/slideshow/source/engine/OGLTrans/makefile.mk index 6353b2da58fb..9612d1e7da93 100644 --- a/slideshow/source/engine/OGLTrans/makefile.mk +++ b/slideshow/source/engine/OGLTrans/makefile.mk @@ -72,7 +72,7 @@ SHL1IMPLIB=i$(TARGET) SHL1LIBS=$(SLB)$/$(TARGET).lib SHL1DEF=$(MISC)$/$(SHL1TARGET).def -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map DEF1NAME=$(SHL1TARGET) DEF1EXPORTFILE=exports.dxp diff --git a/slideshow/test/export.map b/slideshow/test/export.map index 1953f105dc08..df94ae98ee5c 100644 --- a/slideshow/test/export.map +++ b/slideshow/test/export.map @@ -29,7 +29,7 @@ # #************************************************************************* -UDK_3.1 { +UDK_3_0_0 { global: registerAllTestFunction; diff --git a/slideshow/util/exports.map b/slideshow/util/exports.map deleted file mode 100644 index 1c294f38c851..000000000000 --- a/slideshow/util/exports.map +++ /dev/null @@ -1,8 +0,0 @@ -SHW_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/slideshow/util/makefile.mk b/slideshow/util/makefile.mk index aba4094b242f..adde1895f52a 100644 --- a/slideshow/util/makefile.mk +++ b/slideshow/util/makefile.mk @@ -74,7 +74,7 @@ SHL1IMPLIB=i$(TARGET) SHL1LIBS=$(SLB)$/$(TARGET).lib SHL1DEF=$(MISC)$/$(SHL1TARGET).def -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map DEF1NAME=$(SHL1TARGET) DEF1EXPORTFILE=exports.dxp From 38c05fe0a6033d6051a71c6f42f6a686537a0f09 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 2 Feb 2010 11:22:51 +0100 Subject: [PATCH 08/14] ppp02: #i108824# string updates --- sd/source/ui/view/DocumentRenderer.src | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sd/source/ui/view/DocumentRenderer.src b/sd/source/ui/view/DocumentRenderer.src index c69a6ffe6469..4362299bc16d 100644 --- a/sd/source/ui/view/DocumentRenderer.src +++ b/sd/source/ui/view/DocumentRenderer.src @@ -187,8 +187,8 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS { < "Original size" ; > ; < "Fit to printable page" ; > ; - < "Distribute on multiple paper sheets" ; > ; - < "Tile paper sheet with repeated slides" ; > ; + < "Distribute on multiple sheets of paper" ; > ; + < "Tile sheet of paper with repeated slides" ; > ; }; }; StringArray _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW @@ -197,8 +197,8 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS { < "Original size" ; > ; < "Fit to printable page" ; > ; - < "Distribute on multiple paper sheets" ; > ; - < "Tile paper sheet with repeated pages" ; > ; + < "Distribute on multiple sheets of paper" ; > ; + < "Tile sheet of paper with repeated pages" ; > ; }; }; StringArray _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_HELP From 45603c86a46eac96ad3474bb233c4e0f94fd8ede Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 2 Feb 2010 13:41:44 +0100 Subject: [PATCH 09/14] ppp02: #i108824# string changes --- sd/source/ui/view/DocumentRenderer.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sd/source/ui/view/DocumentRenderer.src b/sd/source/ui/view/DocumentRenderer.src index 4362299bc16d..8392458098a0 100644 --- a/sd/source/ui/view/DocumentRenderer.src +++ b/sd/source/ui/view/DocumentRenderer.src @@ -163,7 +163,7 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS { < "Original colors" ; > ; < "Grayscale" ; > ; - < "Black & White" ; > ; + < "Black & white" ; > ; }; }; StringArray _STR_IMPRESS_PRINT_UI_QUALITY_CHOICES_HELP From 7c63faa1e8ebe9efbddef6f0f5215882f85f781a Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 16 Feb 2010 11:53:58 +0100 Subject: [PATCH 10/14] sb118: adapted remaining */qa/unoapi tests to new framework --- sd/prj/build.lst | 1 + sd/qa/unoapi/Test.java | 51 ++++++++++++++++++++++++++++++++++++++++ sd/qa/unoapi/makefile.mk | 36 +++++++++++++++------------- 3 files changed, 72 insertions(+), 16 deletions(-) mode change 100755 => 100644 sd/prj/build.lst create mode 100644 sd/qa/unoapi/Test.java diff --git a/sd/prj/build.lst b/sd/prj/build.lst old mode 100755 new mode 100644 index bc8bf923f7e5..87204261b200 --- a/sd/prj/build.lst +++ b/sd/prj/build.lst @@ -44,3 +44,4 @@ sd sd\source\ui\framework\factories nmake - all sd_framework_factories sd sd sd\source\ui\framework\tools nmake - all sd_framework_tools sd_inc NULL sd sd\source\ui\annotations nmake - all sd_uiannotations sd_inc NULL sd sd\util nmake - all sd_util sd_app sd_cgm sd_core sd_dlg sd_docsh sd_eppt sd_filt sd_func sd_grf sd_unid sd_view sd_xml sd_html sd_ppt sd_accessibility sd_animations sd_toolpanel sd_toolpanel_controls sd_tools sd_slsshell sd_slsmodel sd_slsview sd_slscontroller sd_slscache sd_notes sd_table sd_slideshow sd_presenter sd_undo sd_helper sd_framework_configuration sd_framework_module sd_framework_tools sd_framework_factories sd_text sd_annotations sd_uiannotations NULL +sd sd\qa\unoapi nmake - all sd_qa_unoapi NULL diff --git a/sd/qa/unoapi/Test.java b/sd/qa/unoapi/Test.java new file mode 100644 index 000000000000..cfb4f13d7743 --- /dev/null +++ b/sd/qa/unoapi/Test.java @@ -0,0 +1,51 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* +* for a copy of the LGPLv3 License. +************************************************************************/ + +package org.openoffice.sd.qa.unoapi; + +import org.openoffice.Runner; +import org.openoffice.test.OfficeConnection; +import static org.junit.Assert.*; + +public final class Test { + @org.junit.Before public void setUp() throws Exception { + connection.setUp(); + } + + @org.junit.After public void tearDown() + throws InterruptedException, com.sun.star.uno.Exception + { + connection.tearDown(); + } + + @org.junit.Test public void test() { + assertTrue( + Runner.run( + "-sce", "sd.sce", "-xcl", "knownissues.xcl", "-cs", + connection.getDescription())); + } + + private final OfficeConnection connection = new OfficeConnection(); +} diff --git a/sd/qa/unoapi/makefile.mk b/sd/qa/unoapi/makefile.mk index 22caa272ba0c..62aefb3f5f71 100644 --- a/sd/qa/unoapi/makefile.mk +++ b/sd/qa/unoapi/makefile.mk @@ -1,15 +1,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.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,19 +21,28 @@ # version 3 along with OpenOffice.org. If not, see # # for a copy of the LGPLv3 License. -# -#************************************************************************* +#***********************************************************************/ -PRJ=..$/.. +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE -PRJNAME=sd -TARGET=qa_unoapi +PRJ = ../.. +PRJNAME = sd +TARGET = qa_unoapi + +.IF "$(OOO_JUNIT_JAR)" != "" +PACKAGE = org/openoffice/sd/qa/unoapi +JAVATESTFILES = Test.java +JAVAFILES = $(JAVATESTFILES) +JARFILES = OOoRunner.jar ridl.jar test.jar +EXTRAJARFILES = $(OOO_JUNIT_JAR) +.END .INCLUDE: settings.mk - .INCLUDE: target.mk +.INCLUDE: installationtest.mk -ALLTAR : UNOAPI_TEST +ALLTAR : javatest -UNOAPI_TEST: - +$(SOLARENV)$/bin$/checkapi -sce sd.sce -xcl knownissues.xcl -tdoc $(PWD)$/testdocuments -THRCNT 1 +.END From 9e3b989dddfef591eb697be509c9a0113c7d148a Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 22 Feb 2010 16:09:02 +0100 Subject: [PATCH 11/14] sb118: #i109518# disabled unoapi tests affected by that issue --- sd/qa/unoapi/knownissues.xcl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sd/qa/unoapi/knownissues.xcl b/sd/qa/unoapi/knownissues.xcl index c3f100506e47..0f28aebd2890 100644 --- a/sd/qa/unoapi/knownissues.xcl +++ b/sd/qa/unoapi/knownissues.xcl @@ -50,3 +50,7 @@ sd.DrawController_OutlineView::com::sun::star::beans::XPropertySet ### i88537 ### sd.DrawController_PresentationView::com::sun::star::beans::XPropertySet + +### i109518 ### +sd.SdXPresentation::com::sun::star::presentation::XPresentation +sd.SdXPresentation::com::sun::star::beans::XPropertySet From b6f0318bda22fec7931110f2505c2397f87dcdb9 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Thu, 11 Mar 2010 07:45:36 +0100 Subject: [PATCH 12/14] dtardon02: #i108505# remove empty files in sd --- sd/source/ui/func/futext2.cxx | 30 --- .../toolpanel/ControlDescriptorIterator.cxx | 223 ------------------ sd/source/ui/view/sdview5.cxx | 29 --- 3 files changed, 282 deletions(-) delete mode 100644 sd/source/ui/func/futext2.cxx delete mode 100644 sd/source/ui/toolpanel/ControlDescriptorIterator.cxx delete mode 100644 sd/source/ui/view/sdview5.cxx diff --git a/sd/source/ui/func/futext2.cxx b/sd/source/ui/func/futext2.cxx deleted file mode 100644 index 5e6bed107e93..000000000000 --- a/sd/source/ui/func/futext2.cxx +++ /dev/null @@ -1,30 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" - diff --git a/sd/source/ui/toolpanel/ControlDescriptorIterator.cxx b/sd/source/ui/toolpanel/ControlDescriptorIterator.cxx deleted file mode 100644 index 9d873b897402..000000000000 --- a/sd/source/ui/toolpanel/ControlDescriptorIterator.cxx +++ /dev/null @@ -1,223 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" - -/* -#include "ControlDescriptorIterator.hxx" - -#include "ControlContainer.hxx" -#include "ControlContainerDescriptor.hxx" - -namespace sd { namespace toolpanel { - - -ControlDescriptorIterator::ControlDescriptorIterator (void) - : mpContainer (NULL), - mbSkipInvisibleControls(true) -{ -} - - - - -ControlDescriptorIterator::ControlDescriptorIterator ( - ControlDescriptorList& rContainer, - const ControlDescriptorList::iterator& aIterator, - bool bSkipInvisibleControls) - : mpContainer(&rContainer), - maIterator (aIterator), - mbSkipInvisibleControls(bSkipInvisibleControls) -{ - AdvanceToNextVisibleControl(); -} - - - - -ControlDescriptorIterator::ControlDescriptorIterator ( - const ControlDescriptorIterator& aIterator) - : mpContainer (aIterator.mpContainer), - maIterator (aIterator.maIterator), - mbSkipInvisibleControls (aIterator.mbSkipInvisibleControls) -{ -} - - - - -ControlDescriptorIterator& ControlDescriptorIterator::operator= ( - const ControlDescriptorIterator& aIterator) -{ - mpContainer = aIterator.mpContainer; - maIterator = aIterator.maIterator; - mbSkipInvisibleControls = aIterator.mbSkipInvisibleControls; - - AdvanceToNextVisibleControl(); - - return *this; -} - - - - -ControlDescriptorIterator::value_type& - ControlDescriptorIterator::operator* (void) -{ - return *maIterator; -} - - - - -const ControlDescriptorIterator::value_type& - ControlDescriptorIterator::operator* (void) - const -{ - return *maIterator; -} - - - - -ControlDescriptorIterator::value_type& - ControlDescriptorIterator::operator-> (void) -{ - return *maIterator; -} - - - - -const ControlDescriptorIterator::value_type& - ControlDescriptorIterator::operator-> (void) - const -{ - return *maIterator; -} - - - - -bool ControlDescriptorIterator::operator== ( - const ControlDescriptorIterator& aIterator) const -{ - return ! operator!=(aIterator); -} - - - - -bool ControlDescriptorIterator::operator!= ( - const ControlDescriptorIterator& aIterator) const -{ - return maIterator != aIterator.maIterator; -} - - - - -ControlDescriptorIterator& ControlDescriptorIterator::operator++ (void) -{ - maIterator++; - AdvanceToNextVisibleControl(); - return *this; -} - - - -ControlDescriptorIterator ControlDescriptorIterator::operator++ (int) -{ - ControlDescriptorIterator aIterator (*this); - ++(*this); - return aIterator; -} - - - - -ControlDescriptorIterator& ControlDescriptorIterator::operator-- (void) -{ - maIterator--; - AdvanceToPreviousVisibleControl(); - return *this; -} - - - -ControlDescriptorIterator ControlDescriptorIterator::operator-- (int) -{ - ControlDescriptorIterator aIterator (*this); - --(*this); - return aIterator; -} - - - - -ControlDescriptorIterator ControlDescriptorIterator::operator+ ( - int nValue) const -{ - return ControlDescriptorIterator (*mpContainer, maIterator+nValue); -} - - - -ControlDescriptorIterator ControlDescriptorIterator::operator- ( - int nValue) const -{ - return ControlDescriptorIterator (*mpContainer, maIterator-nValue); -} - - - -void ControlDescriptorIterator::AdvanceToNextVisibleControl (void) -{ - if (mbSkipInvisibleControls && mpContainer!=NULL) - { - while (maIterator != mpContainer->end() - && ! (**maIterator).IsVisible()) - ++maIterator; - } -} - - - - -void ControlDescriptorIterator::AdvanceToPreviousVisibleControl (void) -{ - if (mbSkipInvisibleControls && mpContainer!=NULL) - { - while (maIterator != mpContainer->begin() - && ! (**maIterator).IsVisible()) - --maIterator; - } -} - -} } // end of namespace ::sd::toolpanel -*/ diff --git a/sd/source/ui/view/sdview5.cxx b/sd/source/ui/view/sdview5.cxx deleted file mode 100644 index 51c6725f6d83..000000000000 --- a/sd/source/ui/view/sdview5.cxx +++ /dev/null @@ -1,29 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sd.hxx" From 4a8e9c4d08445b2a3bb9f43566e4b21b87bd5f2e Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 12 Mar 2010 13:16:09 +0100 Subject: [PATCH 13/14] dtardon02: #i108503# #i108505# #i108507# #i108508# #i110035# clean up makefiles and #includes --- sd/source/ui/func/makefile.mk | 2 -- sd/source/ui/view/makefile.mk | 1 - 2 files changed, 3 deletions(-) diff --git a/sd/source/ui/func/makefile.mk b/sd/source/ui/func/makefile.mk index 332d5d505792..9ec946325239 100644 --- a/sd/source/ui/func/makefile.mk +++ b/sd/source/ui/func/makefile.mk @@ -61,7 +61,6 @@ SLOFILES = \ $(SLO)$/fuscale.obj \ $(SLO)$/futransf.obj \ $(SLO)$/futext.obj \ - $(SLO)$/futext2.obj \ $(SLO)$/fuline.obj \ $(SLO)$/sdundo.obj \ $(SLO)$/sdundogr.obj \ @@ -133,7 +132,6 @@ LIB1OBJFILES= \ $(SLO)$/fuscale.obj \ $(SLO)$/futransf.obj \ $(SLO)$/futext.obj \ - $(SLO)$/futext2.obj \ $(SLO)$/fuline.obj \ $(SLO)$/sdundo.obj \ $(SLO)$/sdundogr.obj \ diff --git a/sd/source/ui/view/makefile.mk b/sd/source/ui/view/makefile.mk index 074497ca1de7..3b3bca4ff3d5 100644 --- a/sd/source/ui/view/makefile.mk +++ b/sd/source/ui/view/makefile.mk @@ -53,7 +53,6 @@ SLOFILES = \ $(SLO)$/sdview2.obj \ $(SLO)$/sdview3.obj \ $(SLO)$/sdview4.obj \ - $(SLO)$/sdview5.obj \ $(SLO)$/viewshel.obj \ $(SLO)$/viewshe2.obj \ $(SLO)$/viewshe3.obj \ From a3c3cc75ca53c1d0a6a804185f6ef56401e8324e Mon Sep 17 00:00:00 2001 From: Martin Hollmichel Date: Tue, 6 Apr 2010 14:40:41 +0200 Subject: [PATCH 14/14] nativea: #i110249# chg copyright --- sd/prj/make.bat | 92 --------------------------- sd/prj/postdlv.btm | 2 - sd/prj/stree.bat | 151 --------------------------------------------- 3 files changed, 245 deletions(-) delete mode 100644 sd/prj/make.bat delete mode 100644 sd/prj/postdlv.btm delete mode 100644 sd/prj/stree.bat diff --git a/sd/prj/make.bat b/sd/prj/make.bat deleted file mode 100644 index 7525d0a51632..000000000000 --- a/sd/prj/make.bat +++ /dev/null @@ -1,92 +0,0 @@ -@echo off -REM ***************************************************************** -REM * MAKE -REM * (c) Copyright 1992-1994 STAR DIVISION -REM * Beschreibung: Uebersetzt aktuelle Version -REM * Aufruf: MAKE [Option1 .. OptionN] -REM * Optionen: PRODUCT - Product-Version (FULL) -REM * DEMO - Product-Version (DEMO) -REM * DEPEND - Depend-Listen erzeugen -REM * OPTIMIZE - Version mit Optimierung -REM * DEBUG - Version mit Debuginformationen -REM * PROFILE - Version fuer Profiling -REM * DBGUITL - Version mit Assertions -REM * ESO: PCH - Precompiled Header verwenden -REM ***************************************************************** - -IF "%1" == "" goto Next - -set STEMPFILE=%temp%\temp.mak -echo. >%STEMPFILE% -set MAKECMD=@%STEMPFILE% - -REM *** Parameter parsen *** -:Loop - -IF "%1" == "" goto Next - -IF "%1" == "product" echo product=full >>%STEMPFILE% -IF "%1" == "Product" echo product=full >>%STEMPFILE% -IF "%1" == "PRODUCT" echo product=full >>%STEMPFILE% - -IF "%1" == "demo" echo product=demo >>%STEMPFILE% -IF "%1" == "Demo" echo product=demo >>%STEMPFILE% -IF "%1" == "DEMO" echo product=demo >>%STEMPFILE% - -IF "%1" == "depend" echo depend=true >>%STEMPFILE% -IF "%1" == "Depend" echo depend=true >>%STEMPFILE% -IF "%1" == "DEPEND" echo depend=true >>%STEMPFILE% - -IF "%1" == "optimize" echo optimize=true >>%STEMPFILE% -IF "%1" == "Optimize" echo optimize=true >>%STEMPFILE% -IF "%1" == "OPTIMIZE" echo optimize=true >>%STEMPFILE% - -IF "%1" == "debug" echo debug=true >>%STEMPFILE% -IF "%1" == "Debug" echo debug=true >>%STEMPFILE% -IF "%1" == "DEBUG" echo debug=true >>%STEMPFILE% - -IF "%1" == "profile" echo product=full profile=true >>%STEMPFILE% -IF "%1" == "Profile" echo product=full profile=true >>%STEMPFILE% -IF "%1" == "PROFILE" echo product=full profile=true >>%STEMPFILE% - -IF "%1" == "dbgutil" echo dbgutil=true >>%STEMPFILE% -IF "%1" == "Dbgutil" echo dbgutil=true >>%STEMPFILE% -IF "%1" == "DBGUTIL" echo dbgutil=true >>%STEMPFILE% - -IF "%1" == "seg" echo product=full seg=true >>%STEMPFILE% -IF "%1" == "Seg" echo product=full seg=true >>%STEMPFILE% -IF "%1" == "SEG" echo product=full seg=true >>%STEMPFILE% - -IF "%1" == "tcv" echo product=full tcv=-2000 >>%STEMPFILE% -IF "%1" == "tcv" echo product=full tcv=-2000 >>%STEMPFILE% -IF "%1" == "TCV" echo product=full tcv=-2000 >>%STEMPFILE% - -IF "%1" == "siz" echo product=full siz=true >>%STEMPFILE% -IF "%1" == "Siz" echo product=full siz=true >>%STEMPFILE% -IF "%1" == "SIZ" echo product=full siz=true >>%STEMPFILE% - -IF "%1" == "pch" echo prjpch=true >>%STEMPFILE% -IF "%1" == "Pch" echo prjpch=true >>%STEMPFILE% -IF "%1" == "PCH" echo prjpch=true >>%STEMPFILE% - -IF "%1" == "-i" echo -i >>%STEMPFILE% -IF "%1" == "-I" echo -i >>%STEMPFILE% - -shift -goto Loop - -:Next -REM *** Kommando setzen *** -SET STREECMD=nmake %MAKECMD% - -REM *** Kommando ausfuehren *** -echo ****************************************************** -echo MAKE - (c) 1992-1994 STAR DIVISION -call stree MAKE - -REM *** Aufraeumen *** -IF NOT "%STEMPFILE%" == "" del %STEMPFILE% -SET STREECMD= -set STEMPFILE= -set MAKECMD= -echo on diff --git a/sd/prj/postdlv.btm b/sd/prj/postdlv.btm deleted file mode 100644 index 3db49b3ad126..000000000000 --- a/sd/prj/postdlv.btm +++ /dev/null @@ -1,2 +0,0 @@ -quit - diff --git a/sd/prj/stree.bat b/sd/prj/stree.bat deleted file mode 100644 index 3903ca0043fc..000000000000 --- a/sd/prj/stree.bat +++ /dev/null @@ -1,151 +0,0 @@ -REM ***************************************************************** -REM * STREE -REM * (c) Copyright 1992-1994 STAR DIVISION -REM * Beschreibung: Arbeitet Source-Verzeichnis-Baum von TOOLS ab -REM * Aufruf: STREE DIR -REM * DIR: ALL - Alle Verzeichnisse -REM * MAKE - Alle Verzeichnisse mit MAKEFILE -REM * Umgebung: GUI - Systemversion -REM * COM - Systemversion -REM * GUIBASE - Abhaengiges Source-Verzeichnis -REM * STREECMD - Auszufuehrendes Kommando (z.B. nmake) -REM ***************************************************************** - -REM *** Parameter parsen und Variablen ueberpruefen *** -IF "%GUI%" == "" GOTO Error1 -IF "%COM%" == "" GOTO Error1 -IF "%GUIBASE%" == "" GOTO Error1 - -IF "%1" == "" GOTO Error3 -IF "%STREECMD%" == "" GOTO Error3 - - -REM *** Kommando ausgeben *** -echo Kommando: %STREECMD% - -REM *** In die Root wechseln -cd .. - - -REM *** Include - Verzeichnisse *** -IF NOT "%1" == "ALL" goto NotAll -cd inc -echo ------------------------------------------------------ -cd -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd .. - -cd res -echo ------------------------------------------------------ -cd -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd .. - -cd source\ui\inc -echo ------------------------------------------------------ -cd -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd ..\..\.. - -REM *** Verzeichnisse mit Makefile *** -:NotAll - -cd sdi -echo ------------------------------------------------------ -cd -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd .. - -REM stardiv/sd -> ONE - -cd source\ui -cd app -echo ------------------------------------------------------ -cd -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd .. - -cd dlg -echo ------------------------------------------------------ -cd -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd .. - -cd docshell -echo ------------------------------------------------------ -cd -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd .. - -cd view -echo ------------------------------------------------------ -cd -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd .. - -cd func -echo ------------------------------------------------------ -cd -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd .. - -cd unoidl -echo ------------------------------------------------------ -cd -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd ..\.. - -cd core -echo ------------------------------------------------------ -cd -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd .. - -cd filter -echo ------------------------------------------------------ -cd -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd .. - -echo ------------------------------------------------------ -cd -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd .. - -echo ------------------------------------------------------ -cd util -%STREECMD% -IF ERRORLEVEL 1 goto Error2 -cd .. - -echo ------------------------------------------------------ -cd prj -goto End - -REM *** Fehler ausgeben *** -:Error1 -echo Error: Keine Systemversion oder nicht vollstaendig gesetzt ! -goto End -:Error2 -echo Error: Fehler bei Ausfhrung eines Kommandos ! -goto End -:Error3 -echo Error: Falsche Parameter wurden an STREE uebergeben ! -goto End - -REM *** Aufraeumen *** -:End -