-- cgit v1.2.3 From 76c3d136310f8f2c19a3409edc5d4f70cb242311 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 4 Mar 2009 10:02:54 +0000 Subject: #i48179# Added support for going back one effect at a time. --- sd/source/ui/slideshow/slideshowimpl.cxx | 118 ++++++++++++++++++++++++++----- sd/source/ui/slideshow/slideshowimpl.hxx | 8 ++- 2 files changed, 106 insertions(+), 20 deletions(-) diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 4fbaa395b107..f5440274c232 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -178,7 +178,9 @@ public: bool nextSlide(); bool previousSlide(); - void displayCurrentSlide( const Reference< XSlideShow >& xShow ); + void displayCurrentSlide( + const Reference< XSlideShow >& xShow, + const bool bSkipAllMainSequenceEffects); sal_Int32 getNextSlideIndex() const; sal_Int32 getPreviousSlideIndex() const; @@ -475,15 +477,17 @@ bool AnimationSlideController::previousSlide() return jumpToSlideIndex( getPreviousSlideIndex() ); } -void AnimationSlideController::displayCurrentSlide( const Reference< XSlideShow >& xShow ) +void AnimationSlideController::displayCurrentSlide( + const Reference< XSlideShow >& xShow, + const bool bSkipAllMainSequenceEffects) { const sal_Int32 nCurrentSlideNumber = getCurrentSlideNumber(); if( xShow.is() && (nCurrentSlideNumber != -1 ) ) { - Sequence< PropertyValue > aProperties; Reference< XDrawPage > xSlide; Reference< XAnimationNode > xAnimNode; + ::std::vector aProperties; const sal_Int32 nNextSlideNumber = getNextSlideNumber(); if( getSlideAPI( nNextSlideNumber, xSlide, xAnimNode ) ) @@ -491,13 +495,40 @@ void AnimationSlideController::displayCurrentSlide( const Reference< XSlideShow Sequence< Any > aValue(2); aValue[0] <<= xSlide; aValue[1] <<= xAnimNode; - aProperties.realloc(1); - aProperties[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Prefetch" ) ); - aProperties[0].Value <<= aValue; + aProperties.push_back( + PropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM( "Prefetch" ) ), + -1, + Any(aValue), + PropertyState_DIRECT_VALUE)); + } + if (bSkipAllMainSequenceEffects) + { + // Add one property that prevents the slide transition from being + // shown (to speed up the transition to the previous slide) and + // one to show all main sequence effects so that the user can + // continue to undo effects. + aProperties.push_back( + PropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM("SkipAllMainSequenceEffects")), + -1, + Any(sal_True), + PropertyState_DIRECT_VALUE)); + aProperties.push_back( + PropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM("SkipSlideTransition")), + -1, + Any(sal_True), + PropertyState_DIRECT_VALUE)); } + // Convert vector into uno Sequence. + Sequence< PropertyValue > aPropertySequence (aProperties.size()); + for (int nIndex=0,nCount=aProperties.size();nIndexdisplaySlide( xSlide, xAnimNode, aProperties ); + xShow->displaySlide( xSlide, xAnimNode, aPropertySequence ); } } @@ -1239,9 +1270,12 @@ void SAL_CALL SlideshowImpl::removeSlideShowListener( const Reference< XSlideSho // --------------------------------------------------------- -void SlideshowImpl::slideEnded() +void SlideshowImpl::slideEnded(const bool bReverse) { - gotoNextSlide(); + if (bReverse) + gotoPreviousSlide(true); + else + gotoNextSlide(); } // --------------------------------------------------------- @@ -1391,14 +1425,14 @@ void SlideshowImpl::registerShapeEvents( Reference< XShapes >& xShapes ) throw( // --------------------------------------------------------- -void SlideshowImpl::displayCurrentSlide() +void SlideshowImpl::displayCurrentSlide (const bool bSkipAllMainSequenceEffects) { stopSound(); removeShapeEvents(); if( mpSlideController.get() && mxShow.is() ) { - mpSlideController->displayCurrentSlide( mxShow ); + mpSlideController->displayCurrentSlide( mxShow, bSkipAllMainSequenceEffects ); registerShapeEvents(mpSlideController->getCurrentSlideNumber()); update(); @@ -1967,11 +2001,17 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt) break; case KEY_PAGEUP: + if(rKEvt.GetKeyCode().IsMod2()) + { + gotoPreviousSlide(); + break; + } + // warning, fall through! case KEY_LEFT: case KEY_UP: case KEY_P: case KEY_BACKSPACE: - gotoPreviousSlide(); + gotoPreviousEffect(); break; case KEY_HOME: @@ -2895,6 +2935,30 @@ void SAL_CALL SlideshowImpl::gotoNextEffect( ) throw (RuntimeException) // -------------------------------------------------------------------- +void SAL_CALL SlideshowImpl::gotoPreviousEffect( ) throw (RuntimeException) +{ + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + + if( mxShow.is() && mpSlideController.get() && mpShowWindow ) + { + if( mbIsPaused ) + resume(); + + const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode(); + if( (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == SHOWWINDOWMODE_BLANK) ) + { + mpShowWindow->RestartShow(); + } + else + { + mxShow->previousEffect(); + update(); + } + } +} + +// -------------------------------------------------------------------- + void SAL_CALL SlideshowImpl::gotoFirstSlide( ) throw (RuntimeException) { ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); @@ -3014,6 +3078,11 @@ void SAL_CALL SlideshowImpl::gotoNextSlide( ) throw (RuntimeException) // -------------------------------------------------------------------- void SAL_CALL SlideshowImpl::gotoPreviousSlide( ) throw (RuntimeException) +{ + gotoPreviousSlide(false); +} + +void SlideshowImpl::gotoPreviousSlide (const bool bSkipAllMainSequenceEffects) { ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); @@ -3035,8 +3104,22 @@ void SAL_CALL SlideshowImpl::gotoPreviousSlide( ) throw (RuntimeException) } else { - if( mpSlideController->previousSlide() ) - displayCurrentSlide(); + if( mpSlideController->previousSlide()) + displayCurrentSlide(bSkipAllMainSequenceEffects); + else if (bSkipAllMainSequenceEffects) + { + // We could not go to the previous slide (probably because + // the current slide is already the first one). We still + // have to call displayCurrentSlide because the calling + // slideshow can not determine whether there is a previous + // slide or not and has already prepared for a slide change. + // This slide change has to be completed now, even when + // changing to the same slide. + // Note that in this special case we do NOT pass + // bSkipAllMainSequenceEffects because we display the same + // slide as before and do not want to show all its effects. + displayCurrentSlide(false); + } } } catch( Exception& e ) @@ -3487,19 +3570,20 @@ void SAL_CALL SlideShowListenerProxy::slideAnimationsEnded( ) throw (::com::sun // --------------------------------------------------------- -void SlideShowListenerProxy::slideEnded() throw (RuntimeException) +void SlideShowListenerProxy::slideEnded(sal_Bool bReverse) throw (RuntimeException) { { ::osl::MutexGuard aGuard( m_aMutex ); if( maListeners.getLength() >= 0 ) - maListeners.forEach( boost::mem_fn( &XSlideShowListener::slideEnded ) ); + maListeners.forEach( + boost::bind( &XSlideShowListener::slideEnded, _1, bReverse) ); } { ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); if( mxController.is() ) - mxController->slideEnded(); + mxController->slideEnded(bReverse); } } diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx index 829d7c8151ce..b2cf2329d889 100644 --- a/sd/source/ui/slideshow/slideshowimpl.hxx +++ b/sd/source/ui/slideshow/slideshowimpl.hxx @@ -166,7 +166,7 @@ public: virtual void SAL_CALL slideTransitionStarted() throw (css::uno::RuntimeException); virtual void SAL_CALL slideTransitionEnded() throw (css::uno::RuntimeException); virtual void SAL_CALL slideAnimationsEnded() throw (css::uno::RuntimeException); - virtual void SAL_CALL slideEnded() throw (css::uno::RuntimeException); + virtual void SAL_CALL slideEnded(sal_Bool bReverse) throw (css::uno::RuntimeException); virtual void SAL_CALL hyperLinkClicked(const ::rtl::OUString & hyperLink) throw (css::uno::RuntimeException); // css::lang::XEventListener: @@ -208,6 +208,7 @@ public: virtual void SAL_CALL addSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener ) throw (css::uno::RuntimeException); virtual void SAL_CALL removeSlideShowListener( const css::uno::Reference< css::presentation::XSlideShowListener >& Listener ) throw (css::uno::RuntimeException); virtual void SAL_CALL gotoNextEffect( ) throw (css::uno::RuntimeException); + virtual void SAL_CALL gotoPreviousEffect( ) throw (css::uno::RuntimeException); virtual void SAL_CALL gotoFirstSlide( ) throw (css::uno::RuntimeException); virtual void SAL_CALL gotoNextSlide( ) throw (css::uno::RuntimeException); virtual void SAL_CALL gotoPreviousSlide( ) throw (css::uno::RuntimeException); @@ -237,7 +238,7 @@ public: virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException); // will be called from the SlideShowListenerProxy when this event is fired from the XSlideShow - void slideEnded(); + void slideEnded(const bool bReverse); void hyperLinkClicked(const ::rtl::OUString & hyperLink) throw (css::uno::RuntimeException); void click(const css::uno::Reference< css::drawing::XShape > & xShape, const css::awt::MouseEvent & aOriginalEvent); @@ -278,7 +279,7 @@ private: void createSlideList( bool bAll, bool bStartWithActualSlide, const String& rPresSlide ); - void displayCurrentSlide(); + void displayCurrentSlide (const bool bSkipAllMainSequenceEffects = false); void displaySlideNumber( sal_Int32 nSlide ); void displaySlideIndex( sal_Int32 nIndex ); @@ -328,6 +329,7 @@ private: css::uno::Reference< css::presentation::XSlideShow > createSlideShow() const; void setAutoSaveState( bool bOn ); + void gotoPreviousSlide (const bool bSkipAllMainSequenceEffects); css::uno::Reference< css::presentation::XSlideShow > mxShow; comphelper::ImplementationReference< ::sd::SlideShowView, css::presentation::XSlideShowView > mxView; -- cgit v1.2.3 From dc300a3643d1424bda0fba622abc2c467446c085 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 4 Mar 2009 12:04:03 +0000 Subject: #i48179# Keep internal data structure up-to-date. --- slideshow/source/engine/slide/layermanager.cxx | 105 ++++++++++++------------- slideshow/source/engine/slide/layermanager.hxx | 35 +++------ 2 files changed, 61 insertions(+), 79 deletions(-) diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx index ceff661890bf..0ee488cd6102 100644 --- a/slideshow/source/engine/slide/layermanager.cxx +++ b/slideshow/source/engine/slide/layermanager.cxx @@ -67,11 +67,11 @@ namespace slideshow { LayerSharedPtr pCurrLayer; ViewLayerSharedPtr pCurrViewLayer; - LayerShapeSet::const_iterator aIter( maAllShapes.begin() ); - const LayerShapeSet::const_iterator aEnd ( maAllShapes.end() ); + LayerShapeMap::const_iterator aIter( maAllShapes.begin() ); + const LayerShapeMap::const_iterator aEnd ( maAllShapes.end() ); while( aIter != aEnd ) { - LayerSharedPtr pLayer = aIter->mpLayer.lock(); + LayerSharedPtr pLayer = aIter->second.lock(); if( pLayer && pLayer != pCurrLayer ) { pCurrLayer = pLayer; @@ -79,7 +79,7 @@ namespace slideshow } if( pCurrViewLayer ) - shapeFunc(aIter->mpShape,pCurrViewLayer); + shapeFunc(aIter->first,pCurrViewLayer); ++aIter; } @@ -164,9 +164,18 @@ namespace slideshow std::for_each(maAllShapes.begin(), maAllShapes.end(), boost::bind( &Shape::clearAllViewLayers, - boost::bind( &ShapeEntry::getShape, + boost::bind( std::select1st(), _1 ))); + for (LayerShapeMap::iterator + iShape (maAllShapes.begin()), + iEnd (maAllShapes.end()); + iShape!=iEnd; + ++iShape) + { + iShape->second.reset(); + } + if( bMoreThanOneLayer ) maLayers.erase(maLayers.begin()+1, maLayers.end()); @@ -265,8 +274,7 @@ namespace slideshow std::for_each( maAllShapes.begin(), maAllShapes.end(), boost::bind(&Shape::render, - boost::bind(&ShapeEntry::getShape, - _1)) ); + boost::bind( ::std::select1st(), _1)) ); } void LayerManager::addShape( const ShapeSharedPtr& rShape ) @@ -287,13 +295,11 @@ namespace slideshow implAddShape( rShape ); } - void LayerManager::putShape2BackgroundLayer( const ShapeEntry& rShapeEntry ) + void LayerManager::putShape2BackgroundLayer( LayerShapeMap::value_type& rShapeEntry ) { LayerSharedPtr& rBgLayer( maLayers.front() ); - rBgLayer->setShapeViews(rShapeEntry.mpShape); - // changing a part of the ShapeEntry irrelevant for the - // set sort order - const_cast(rShapeEntry).mpLayer = rBgLayer; + rBgLayer->setShapeViews(rShapeEntry.first); + rShapeEntry.second = rBgLayer; } void LayerManager::implAddShape( const ShapeSharedPtr& rShape ) @@ -301,16 +307,16 @@ namespace slideshow OSL_ASSERT( !maLayers.empty() ); // always at least background layer ENSURE_OR_THROW( rShape, "LayerManager::implAddShape(): invalid Shape" ); - ShapeEntry aShapeEntry(rShape); + LayerShapeMap::value_type aValue (rShape, LayerShapeMap::data_type()); - OSL_ASSERT( maAllShapes.find(aShapeEntry) == maAllShapes.end() ); // shape must not be added already + OSL_ASSERT( maAllShapes.find(rShape) == maAllShapes.end() ); // shape must not be added already mbLayerAssociationDirty = true; if( mbDisableAnimationZOrder ) putShape2BackgroundLayer( - *maAllShapes.insert(aShapeEntry).first ); + *maAllShapes.insert(aValue).first ); else - maAllShapes.insert(aShapeEntry); + maAllShapes.insert(aValue); // update shape, it's just added and not yet painted if( rShape->isVisible() ) @@ -323,8 +329,7 @@ namespace slideshow if( maXShapeHash.erase( rShape->getXShape() ) == 0 ) return false; // shape not in map - OSL_ASSERT( maAllShapes.find( - ShapeEntry(rShape)) != maAllShapes.end() ); + OSL_ASSERT( maAllShapes.find(rShape) != maAllShapes.end() ); implRemoveShape( rShape ); @@ -336,9 +341,7 @@ namespace slideshow OSL_ASSERT( !maLayers.empty() ); // always at least background layer ENSURE_OR_THROW( rShape, "LayerManager::implRemoveShape(): invalid Shape" ); - const LayerShapeSet::iterator aShapeEntry( - maAllShapes.find( - ShapeEntry(rShape)) ); + const LayerShapeMap::iterator aShapeEntry( maAllShapes.find(rShape) ); if( aShapeEntry == maAllShapes.end() ) return; @@ -354,7 +357,7 @@ namespace slideshow (rShape->isVisible() && !rShape->isBackgroundDetached()) ) { - LayerSharedPtr pLayer = aShapeEntry->mpLayer.lock(); + LayerSharedPtr pLayer = aShapeEntry->second.lock(); if( pLayer ) { // store area early, once the shape is removed from @@ -419,8 +422,7 @@ namespace slideshow if( rOrigShape->revokeSubset( rSubsetShape ) ) { - OSL_ASSERT( maAllShapes.find( - ShapeEntry(rSubsetShape)) != maAllShapes.end() ); + OSL_ASSERT( maAllShapes.find(rSubsetShape) != maAllShapes.end() ); implRemoveShape( rSubsetShape ); @@ -584,11 +586,11 @@ namespace slideshow bool bIsCurrLayerUpdating(false); Layer::EndUpdater aEndUpdater; LayerSharedPtr pCurrLayer; - LayerShapeSet::const_iterator aIter( maAllShapes.begin() ); - const LayerShapeSet::const_iterator aEnd ( maAllShapes.end() ); + LayerShapeMap::const_iterator aIter( maAllShapes.begin() ); + const LayerShapeMap::const_iterator aEnd ( maAllShapes.end() ); while( aIter != aEnd ) { - LayerSharedPtr pLayer = aIter->mpLayer.lock(); + LayerSharedPtr pLayer = aIter->second.lock(); if( pLayer != pCurrLayer ) { pCurrLayer = pLayer; @@ -599,10 +601,10 @@ namespace slideshow } if( bIsCurrLayerUpdating && - !aIter->mpShape->isBackgroundDetached() && - pCurrLayer->isInsideUpdateArea(aIter->mpShape) ) + !aIter->first->isBackgroundDetached() && + pCurrLayer->isInsideUpdateArea(aIter->first) ) { - if( !aIter->mpShape->render() ) + if( !aIter->first->render() ) bRet = false; } @@ -694,8 +696,8 @@ namespace slideshow bool bRet( true ); ViewLayerSharedPtr pTmpLayer( new DummyLayer( rTargetCanvas ) ); - LayerShapeSet::const_iterator aIter( maAllShapes.begin() ); - const LayerShapeSet::const_iterator aEnd ( maAllShapes.end() ); + LayerShapeMap::const_iterator aIter( maAllShapes.begin() ); + const LayerShapeMap::const_iterator aEnd ( maAllShapes.end() ); while( aIter != aEnd ) { try @@ -705,11 +707,11 @@ namespace slideshow // ViewLayer. Since we add the shapes in the // maShapeSet order (which is also the render order), // this is equivalent to a subsequent render() call) - aIter->mpShape->addViewLayer( pTmpLayer, - true ); + aIter->first->addViewLayer( pTmpLayer, + true ); // and remove again, this is only temporary - aIter->mpShape->removeViewLayer( pTmpLayer ); + aIter->first->removeViewLayer( pTmpLayer ); } catch( uno::Exception& ) { @@ -735,21 +737,19 @@ namespace slideshow OSL_ASSERT( !maLayers.empty() ); // always at least background layer ENSURE_OR_THROW( rShape, "LayerManager::addUpdateArea(): invalid Shape" ); - const LayerShapeSet::const_iterator aShapeEntry( - maAllShapes.find( - ShapeEntry(rShape)) ); + const LayerShapeMap::const_iterator aShapeEntry( maAllShapes.find(rShape) ); if( aShapeEntry == maAllShapes.end() ) return; - LayerSharedPtr pLayer = aShapeEntry->mpLayer.lock(); + LayerSharedPtr pLayer = aShapeEntry->second.lock(); if( pLayer ) pLayer->addUpdateRange( rShape->getUpdateArea() ); } void LayerManager::commitLayerChanges( std::size_t nCurrLayerIndex, - LayerShapeSet::const_iterator aFirstLayerShape, - LayerShapeSet::const_iterator aEndLayerShapes ) + LayerShapeMap::const_iterator aFirstLayerShape, + LayerShapeMap::const_iterator aEndLayerShapes ) { const bool bLayerExists( maLayers.size() > nCurrLayerIndex ); if( bLayerExists ) @@ -768,8 +768,8 @@ namespace slideshow // render and remove from update set while( aFirstLayerShape != aEndLayerShapes ) { - maUpdateShapes.erase(aFirstLayerShape->mpShape); - aFirstLayerShape->mpShape->render(); + maUpdateShapes.erase(aFirstLayerShape->first); + aFirstLayerShape->first->render(); ++aFirstLayerShape; } } @@ -825,13 +825,13 @@ namespace slideshow std::size_t nCurrLayerIndex(0); bool bIsBackgroundLayer(true); bool bLastWasBackgroundDetached(false); // last shape sprite state - LayerShapeSet::iterator aCurrShapeEntry( maAllShapes.begin() ); - LayerShapeSet::iterator aCurrLayerFirstShapeEntry( maAllShapes.begin() ); - const LayerShapeSet::iterator aEndShapeEntry ( maAllShapes.end() ); + LayerShapeMap::iterator aCurrShapeEntry( maAllShapes.begin() ); + LayerShapeMap::iterator aCurrLayerFirstShapeEntry( maAllShapes.begin() ); + const LayerShapeMap::iterator aEndShapeEntry ( maAllShapes.end() ); ShapeUpdateSet aUpdatedShapes; // shapes that need update while( aCurrShapeEntry != aEndShapeEntry ) { - const ShapeSharedPtr pCurrShape( aCurrShapeEntry->mpShape ); + const ShapeSharedPtr pCurrShape( aCurrShapeEntry->first ); const bool bThisIsBackgroundDetached( pCurrShape->isBackgroundDetached() ); @@ -851,7 +851,7 @@ namespace slideshow bIsBackgroundLayer = false; if( aWeakLayers.size() <= nCurrLayerIndex || - aWeakLayers.at(nCurrLayerIndex) != aCurrShapeEntry->mpLayer ) + aWeakLayers.at(nCurrLayerIndex) != aCurrShapeEntry->second ) { // no more layers left, or shape was not // member of this layer - create a new one @@ -868,7 +868,7 @@ namespace slideshow // above invalidates iterators LayerSharedPtr& rCurrLayer( maLayers.at(nCurrLayerIndex) ); LayerWeakPtr& rCurrWeakLayer( aWeakLayers.at(nCurrLayerIndex) ); - if( rCurrWeakLayer != aCurrShapeEntry->mpLayer ) + if( rCurrWeakLayer != aCurrShapeEntry->second ) { // mismatch: shape is not contained in current // layer - move shape to that layer, then. @@ -879,7 +879,7 @@ namespace slideshow // non-sprite shape if( !bThisIsBackgroundDetached && pCurrShape->isVisible() ) { - LayerSharedPtr pOldLayer( aCurrShapeEntry->mpLayer.lock() ); + LayerSharedPtr pOldLayer( aCurrShapeEntry->second.lock() ); if( pOldLayer ) { // old layer still valid? then we need to @@ -894,10 +894,7 @@ namespace slideshow maUpdateShapes.insert( pCurrShape ); } - // std::set iterators are const for a reason - but - // here, we need modify an aspect of the - // ShapeEntry that has no influence on sort order - const_cast(*aCurrShapeEntry).mpLayer = rCurrWeakLayer; + aCurrShapeEntry->second = rCurrWeakLayer; } // update layerbounds regardless of the fact that the diff --git a/slideshow/source/engine/slide/layermanager.hxx b/slideshow/source/engine/slide/layermanager.hxx index 2fb72af1be18..5a1512bb4f7e 100644 --- a/slideshow/source/engine/slide/layermanager.hxx +++ b/slideshow/source/engine/slide/layermanager.hxx @@ -254,33 +254,18 @@ namespace slideshow hash< ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > > > XShapeHash; - /** Element of all-shapes set - */ - struct ShapeEntry + class ShapeComparator { - /// Shape this entry stands for - ShapeSharedPtr mpShape; - - /// Layer this shape is currently displayed on - LayerWeakPtr mpLayer; - - explicit ShapeEntry( ShapeSharedPtr const& rShape ) : - mpShape(rShape), - mpLayer() - {} - - ShapeSharedPtr const& getShape() const { return mpShape; } - - bool operator<( const ShapeEntry& rRHS ) const + public: + bool operator() (const ShapeSharedPtr& rpS1, const ShapeSharedPtr& rpS2 ) const { - return Shape::lessThanShape::compare(mpShape.get(), - rRHS.mpShape.get()); + return Shape::lessThanShape::compare(rpS1.get(), rpS2.get()); } }; - /** Set of all shapes */ - typedef ::std::set< ShapeEntry > LayerShapeSet; + private: + typedef ::std::map< ShapeSharedPtr, LayerWeakPtr, ShapeComparator > LayerShapeMap; typedef ::std::set< ShapeSharedPtr > ShapeUpdateSet; @@ -309,12 +294,12 @@ namespace slideshow denoting one-behind-the-last shape of nCurrLayerIndex */ void commitLayerChanges( std::size_t nCurrLayerIndex, - LayerShapeSet::const_iterator aFirstLayerShape, - LayerShapeSet::const_iterator aEndLayerShapes ); + LayerShapeMap::const_iterator aFirstLayerShape, + LayerShapeMap::const_iterator aEndLayerShapes ); /** Init Shape layers with background layer. */ - void putShape2BackgroundLayer( const ShapeEntry& rShapeEntry ); + void putShape2BackgroundLayer( LayerShapeMap::value_type& rShapeEntry ); /** Commits any pending layer reorg, due to shapes either entering or leaving animation mode @@ -364,7 +349,7 @@ namespace slideshow for buffering animation enable/disable changes, and shape update requests. */ - LayerShapeSet maAllShapes; + LayerShapeMap maAllShapes; /** Set of shapes that have requested an update -- cgit v1.2.3 From 268c5a727b274916e0a0cc4bd61c3ed892a0b224 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 4 Mar 2009 13:41:44 +0000 Subject: #i48179# Introduced EffectRewinder class that replays main sequence effects on current or previous slide. --- .../source/engine/animationnodes/basenode.hxx | 4 +- .../animationnodes/sequentialtimecontainer.cxx | 6 +- slideshow/source/engine/effectrewinder.cxx | 404 +++++++++++++++++++++ slideshow/source/engine/effectrewinder.hxx | 183 ++++++++++ slideshow/source/engine/eventqueue.cxx | 43 ++- slideshow/source/engine/makefile.mk | 1 + slideshow/source/engine/screenupdater.cxx | 83 ++++- slideshow/source/engine/slideshowimpl.cxx | 262 ++++++++++--- slideshow/source/engine/usereventqueue.cxx | 54 ++- slideshow/source/inc/eventqueue.hxx | 8 + slideshow/source/inc/screenupdater.hxx | 21 ++ slideshow/source/inc/usereventqueue.hxx | 16 +- 12 files changed, 1020 insertions(+), 65 deletions(-) create mode 100644 slideshow/source/engine/effectrewinder.cxx create mode 100644 slideshow/source/engine/effectrewinder.hxx diff --git a/slideshow/source/engine/animationnodes/basenode.hxx b/slideshow/source/engine/animationnodes/basenode.hxx index 68ec92f0fea7..3a0b25e7ea94 100644 --- a/slideshow/source/engine/animationnodes/basenode.hxx +++ b/slideshow/source/engine/animationnodes/basenode.hxx @@ -137,6 +137,8 @@ public: // nop: virtual void notifyDeactivating( const AnimationNodeSharedPtr& rNotifier ); + bool isMainSequenceRootNode() const { return mbIsMainSequenceRootNode; } + protected: void scheduleDeactivationEvent( EventSharedPtr const& pEvent = EventSharedPtr() ); @@ -144,8 +146,6 @@ protected: SlideShowContext const& getContext() const { return maContext; } ::boost::shared_ptr const& getSelf() const { return mpSelf; } - bool isMainSequenceRootNode() const { return mbIsMainSequenceRootNode; } - bool checkValidNode() const { ENSURE_OR_THROW( mpSelf, "no self ptr set!" ); bool const bRet = (meCurrState != INVALID); diff --git a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx index cced9fa3f83f..e841c8e667de 100644 --- a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx +++ b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx @@ -88,7 +88,7 @@ void SequentialTimeContainer::skipEffect( if (isChildNode(pChildNode)) { // empty all events ignoring timings => until next effect getContext().mrEventQueue.forceEmpty(); - getContext().mrEventQueue.addEventForNextRound( + getContext().mrEventQueue.addEvent( makeEvent( boost::bind(&AnimationNode::deactivate, pChildNode) ) ); } else @@ -125,7 +125,8 @@ bool SequentialTimeContainer::resolveChild( // deactivate child node when skip event occurs: getContext().mrUserEventQueue.registerSkipEffectEvent( - mpCurrentSkipEvent ); + mpCurrentSkipEvent, + mnFinishedChildren+1 + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_slideshow.hxx" + +#include "EffectRewinder.hxx" +#include "eventqueue.hxx" +#include "usereventqueue.hxx" +#include "mouseeventhandler.hxx" +#include "animationnodes/basecontainernode.hxx" +#include "delayevent.hxx" + +#include +#include +#include +#include +#include +#include +#include + +using ::com::sun::star::uno::Reference; +using namespace ::com::sun::star; + +namespace slideshow { namespace internal { + + +namespace { + +class RewinderEventHandler : public EventHandler +{ +public: + typedef ::boost::function Action; + RewinderEventHandler (const Action& rAction) : maAction(rAction) {} + virtual ~RewinderEventHandler (void) {} +private: + const Action maAction; + virtual bool handleEvent (void) { return maAction(); } +}; + + + +class RewinderAnimationEventHandler : public AnimationEventHandler +{ +public: + typedef ::boost::function Action; + RewinderAnimationEventHandler (const Action& rAction) : maAction(rAction) {} + virtual ~RewinderAnimationEventHandler (void) {} +private: + const Action maAction; + virtual bool handleAnimationEvent (const AnimationNodeSharedPtr& rpNode) + { return maAction(rpNode); } +}; + + + +} // end of anonymous namespace + + +//----- EffectRewinder -------------------------------------------------------------- + +EffectRewinder::EffectRewinder ( + EventMultiplexer& rEventMultiplexer, + EventQueue& rEventQueue, + UserEventQueue& rUserEventQueue) + : mrEventMultiplexer(rEventMultiplexer), + mrEventQueue(rEventQueue), + mrUserEventQueue(rUserEventQueue), + mpSlideStartHandler(), + mpSlideEndHandler(), + mpAnimationStartHandler(), + mnMainSequenceEffectCount(0), + mpAsynchronousRewindEvent(), + mxCurrentAnimationRootNode() +{ + Initialize(); +} + + + + +void EffectRewinder::Initialize (void) +{ + // Add some event handlers so that we are informed when + // a) an animation is started (we then check whether that belongs to a + // main sequence effect and if so, increase the respective counter), + // b,c) a slide was started or ended (in which case the effect counter + // is reset. + + mpAnimationStartHandler.reset( + new RewinderAnimationEventHandler( + ::boost::bind(&EffectRewinder::NotifyAnimationStart, this, _1))); + mrEventMultiplexer.addAnimationStartHandler(mpAnimationStartHandler); + + mpSlideStartHandler.reset( + new RewinderEventHandler( + ::boost::bind(&EffectRewinder::ResetEffectCount, this))); + mrEventMultiplexer.addSlideStartHandler(mpSlideStartHandler); + + mpSlideEndHandler.reset( + new RewinderEventHandler( + ::boost::bind(&EffectRewinder::ResetEffectCount, this))); + mrEventMultiplexer.addSlideEndHandler(mpSlideEndHandler); +} + + + + +EffectRewinder::~EffectRewinder (void) +{ + Dispose(); +} + + + + +void EffectRewinder::Dispose (void) +{ + if (mpAsynchronousRewindEvent) + { + mpAsynchronousRewindEvent->dispose(); + mpAsynchronousRewindEvent.reset(); + } + + if (mpAnimationStartHandler) + { + mrEventMultiplexer.removeAnimationStartHandler(mpAnimationStartHandler); + mpAnimationStartHandler.reset(); + } + + if (mpSlideStartHandler) + { + mrEventMultiplexer.removeSlideStartHandler(mpSlideStartHandler); + mpSlideStartHandler.reset(); + } + + if (mpSlideEndHandler) + { + mrEventMultiplexer.removeSlideEndHandler(mpSlideEndHandler); + mpSlideEndHandler.reset(); + } +} + + + + +void EffectRewinder::SetRootAnimationNode ( + const uno::Reference& xRootNode) +{ + mxCurrentAnimationRootNode = xRootNode; +} + + + + +bool EffectRewinder::Rewind ( + const ::boost::shared_ptr& rpPaintLock, + const ::boost::function& rSlideRewindFunctor, + const ::boost::function& rPreviousSlideFunctor) +{ + mpPaintLock = rpPaintLock; + + // Do not allow nested rewinds. + if (mpAsynchronousRewindEvent) + { + OSL_ASSERT( ! mpAsynchronousRewindEvent); + return false; + } + + // Abort (and skip over the rest of) any currently active animation. + mrUserEventQueue.callSkipEffectEventHandler(); + mrEventQueue.forceEmpty(); + + const int nSkipCount (mnMainSequenceEffectCount - 1); + if (nSkipCount < 0) + { + if ( ! rPreviousSlideFunctor) + { + OSL_ASSERT(rPreviousSlideFunctor); + return false; + } + + // No main sequence effects to rewind on the current slide. + // Go back to the previous slide. + mpAsynchronousRewindEvent = makeEvent( + ::boost::bind( + &EffectRewinder::AsynchronousRewindToPreviousSlide, + this, + rPreviousSlideFunctor)); + } + else + { + // The actual rewinding is done asynchronously so that we can safely + // call other methods. + mpAsynchronousRewindEvent = makeEvent( + ::boost::bind( + &EffectRewinder::AsynchronousRewind, + this, + nSkipCount, + true, + rSlideRewindFunctor)); + } + + if (mpAsynchronousRewindEvent) + mrEventQueue.addEvent(mpAsynchronousRewindEvent); + + return mpAsynchronousRewindEvent.get()!=NULL; +} + + + + +void EffectRewinder::SkipAllMainSequenceEffects (void) +{ + // Do not allow nested rewinds. + if (mpAsynchronousRewindEvent) + { + OSL_ASSERT(!mpAsynchronousRewindEvent); + return; + } + + const int nTotalMainSequenceEffectCount (CountMainSequenceEffects()); + mpAsynchronousRewindEvent = makeEvent( + ::boost::bind( + &EffectRewinder::AsynchronousRewind, + this, + nTotalMainSequenceEffectCount, + false, + ::boost::function())); + mrEventQueue.addEvent(mpAsynchronousRewindEvent); +} + + + + +sal_Int32 EffectRewinder::CountMainSequenceEffects (void) +{ + // Determine the number of main sequence effects. + sal_Int32 nMainSequenceNodeCount (0); + + ::std::queue > aNodeQueue; + aNodeQueue.push(mxCurrentAnimationRootNode); + while ( ! aNodeQueue.empty()) + { + const uno::Reference xNode (aNodeQueue.front()); + aNodeQueue.pop(); + + // Does the current node belong to the main sequence? + if (xNode.is()) + { + animations::Event aEvent; + if (xNode->getBegin() >>= aEvent) + if (aEvent.Trigger == animations::EventTrigger::ON_NEXT) + ++nMainSequenceNodeCount; + } + + // If the current node is a container then prepare its children for investigation. + uno::Reference xEnumerationAccess (xNode, uno::UNO_QUERY); + if (xEnumerationAccess.is()) + { + uno::Reference xEnumeration ( + xEnumerationAccess->createEnumeration()); + if (xEnumeration.is()) + while (xEnumeration->hasMoreElements()) + { + aNodeQueue.push( + uno::Reference( + xEnumeration->nextElement(), uno::UNO_QUERY)); + } + } + } + + return nMainSequenceNodeCount; + + // // Skip all main sequence nodes. + // SkipSomeMainSequenceEffects(nMainSequenceNodeCount); +} + + + + +void EffectRewinder::SkipSomeMainSequenceEffects (sal_Int32 nSkipCount) +{ + while (--nSkipCount >= 0) + SkipSingleMainSequenceEffects(); +} + + + + +void EffectRewinder::SkipSingleMainSequenceEffects (void) +{ + // This basically just starts the next effect and then skips over its + // animation. + mrEventMultiplexer.notifyNextEffect(); + mrEventQueue.forceEmpty(); + mrUserEventQueue.callSkipEffectEventHandler(); + mrEventQueue.forceEmpty(); +} + + + + +bool EffectRewinder::ResetEffectCount (void) +{ + mnMainSequenceEffectCount = 0; + return false; +} + + + + +bool EffectRewinder::NotifyAnimationStart (const AnimationNodeSharedPtr& rpNode) +{ + // This notification is only relevant for us when the rpNode belongs to + // the main sequence. + BaseNodeSharedPtr pBaseNode (::boost::dynamic_pointer_cast(rpNode)); + if (pBaseNode) + { + BaseContainerNodeSharedPtr pParent (pBaseNode->getParentNode()); + if (pParent && pParent->isMainSequenceRootNode()) + { + ++mnMainSequenceEffectCount; + } + } + return false; +} + + + + +void EffectRewinder::AsynchronousRewind ( + sal_Int32 nEffectCount, + const bool bRedisplayCurrentSlide, + const boost::function& rSlideRewindFunctor) +{ + OSL_ASSERT(mpAsynchronousRewindEvent); + + if (bRedisplayCurrentSlide) + { + mpPaintLock->Activate(); + // Re-display the current slide. + if (rSlideRewindFunctor) + rSlideRewindFunctor(); + mpAsynchronousRewindEvent = makeEvent( + ::boost::bind( + &EffectRewinder::AsynchronousRewind, + this, + nEffectCount, + false, + rSlideRewindFunctor)); + mrEventQueue.addEventForNextRound(mpAsynchronousRewindEvent); + } + else + { + mrEventQueue.forceEmpty(); + while (--nEffectCount >= 0) + SkipSingleMainSequenceEffects(); + + mpAsynchronousRewindEvent.reset(); + mpPaintLock.reset(); + } +} + + + + +void EffectRewinder::AsynchronousRewindToPreviousSlide ( + const ::boost::function& rSlideRewindFunctor) +{ + OSL_ASSERT(mpAsynchronousRewindEvent); + + mpAsynchronousRewindEvent.reset(); + rSlideRewindFunctor(); +} + + +} } // end of namespace ::slideshow::internal diff --git a/slideshow/source/engine/effectrewinder.hxx b/slideshow/source/engine/effectrewinder.hxx new file mode 100644 index 000000000000..3aeca5a907c5 --- /dev/null +++ b/slideshow/source/engine/effectrewinder.hxx @@ -0,0 +1,183 @@ +/************************************************************************* + * + * 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: slideshowimpl.cxx,v $ + * $Revision: 1.10 $ + * + * 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_EFFECT_REWINDER_HXX +#define INCLUDED_SLIDESHOW_EFFECT_REWINDER_HXX + +#include "animationnode.hxx" +#include "eventhandler.hxx" +#include "animationeventhandler.hxx" +#include "event.hxx" +#include "screenupdater.hxx" + +#include +#include +#include +#include + +namespace css = ::com::sun::star; + +namespace slideshow { namespace internal { + +class EventMultiplexer; +class EventQueue; +class UserEventQueue; + +/** Rewind single effects of the main effect sequence. A rewind is + initiated by calling the Rewind() method. Part of the processing is + done asynchronously. Multiple EventQueue::update() calls may be + necessary to finish a rewind. + + Remember to call SetRootAnimationNode() when switching to a different + slide so that the EffectRewinder can determine the number of main + sequence effects. +*/ +class EffectRewinder +{ +public: + EffectRewinder ( + EventMultiplexer& rEventMultiplexer, + EventQueue& rEventQueue, + UserEventQueue& rUserEventQueue); + ~EffectRewinder (void); + + /** Call Dispose() before the ownder of an EffectRewinder object dies so + that the EffectRewinder can release all references to the owner. + + */ + void Dispose (void); + + /** Store the root node of the animation tree. It is used in + CountMainSequenceEffects() to count the number of main sequence + effects (or effect groups.) + */ + void SetRootAnimationNode ( + const css::uno::Reference& xRootNode); + + /** Rewind one effect of the main effect sequence. When the current + slide has not effects or no main sequence effect has yet been played + then switch to the previous slide and replay all of its main + sequence effects. + The caller has to pass two functors that redisplay the current slide + or switch to the previous slide so that it does not have to expose + its internals to us. Only one of the two functors is called. + @param rpPaintLock + This paint lock is released after the whole asynchronous + procoess of rewinding the current effect is completed. It + prevents intermediate repaints that would show partial replay + of effects. + @param rSlideRewindFunctor + This functor is called when the current slide is to be + redisplayed. When it is called then the other functor is not + called. + @param rPreviousSlideFunctor + This functor is called to switch to the previous slide. When it + is called then the other functor is not called. + */ + bool Rewind ( + const ::boost::shared_ptr& rpPaintLock, + const ::boost::function& rSlideRewindFunctor, + const ::boost::function& rPreviousSlideFunctor); + + /** Call this method after gotoPreviousEffect() triggered a slide change + to the previous slide. + */ + void SkipAllMainSequenceEffects (void); + +private: + EventMultiplexer& mrEventMultiplexer; + EventQueue& mrEventQueue; + UserEventQueue& mrUserEventQueue; + + EventHandlerSharedPtr mpSlideStartHandler; + EventHandlerSharedPtr mpSlideEndHandler; + AnimationEventHandlerSharedPtr mpAnimationStartHandler; + + /** The number off main sequence effects so far. + */ + sal_Int32 mnMainSequenceEffectCount; + + /** This is the currently scheduled event that executes the asynchronous + part of the effect rewinding. It is also used as flag that prevents + nested rewinds. + */ + EventSharedPtr mpAsynchronousRewindEvent; + + css::uno::Reference mxCurrentAnimationRootNode; + ::boost::shared_ptr mpPaintLock; + + void Initialize (void); + + bool ResetEffectCount (void); + /** Called by listeners when an animation (not necessarily of a main + sequence effect) starts. + */ + bool NotifyAnimationStart (const AnimationNodeSharedPtr& rpNode); + + /** Count the number of effects (or effect groups) in the main effect + sequence. + */ + sal_Int32 CountMainSequenceEffects (void); + + /** Skip the next main sequence effect. + */ + void SkipSingleMainSequenceEffects (void); + + /** Skip the specified number of main sequence effects. + */ + void SkipSomeMainSequenceEffects (const sal_Int32 nSkipCount); + + /** Rewind the last effect of the main effect sequence by replaying all + previous effects. + @param nEffectCount + The number of main sequence effects to replay. + @param bRedisplayCurrentSlide + When then the current slide is redisplayed before the + effects are replayed. + @param rSlideRewindFunctor + This functor is used to redisplay the current slide. + */ + void AsynchronousRewind ( + sal_Int32 nEffectCount, + const bool bRedisplayCurrentSlide, + const boost::function& rSlideRewindFunctor); + + /** Go to the previous slide and replay all of its main sequence effects + (or effect groups). + @param rPreviousSlideFunctor + This functor is used to go to the previous slide. + */ + void AsynchronousRewindToPreviousSlide ( + const ::boost::function& rPreviousSlideFunctor); +}; + +} } // end of namespace ::slideshow::internal + +#endif diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx index 9d7b7ed65eb1..cda03ff0c150 100644 --- a/slideshow/source/engine/eventqueue.cxx +++ b/slideshow/source/engine/eventqueue.cxx @@ -66,6 +66,7 @@ namespace slideshow : maMutex(), maEvents(), maNextEvents(), + maNextNextEvents(), mpTimer( pPresTimer ) { } @@ -132,6 +133,22 @@ namespace slideshow return true; } + bool EventQueue::addEventWhenQueueIsEmpty (const EventSharedPtr& rpEvent) + { + ::osl::MutexGuard aGuard( maMutex ); + + ENSURE_OR_RETURN( + rpEvent.get() != NULL, + "EventQueue::addEvent: event ptr NULL"); + + maNextNextEvents.push( + EventEntry( + rpEvent, + rpEvent->getActivationTime(mpTimer->getElapsedTime()))); + + return true; + } + void EventQueue::forceEmpty() { ::osl::MutexGuard aGuard( maMutex ); @@ -163,6 +180,17 @@ namespace slideshow const double nCurrTime( mpTimer->getElapsedTime() ); + // When maEvents does not contain any events that are due now + // then process one event from maNextNextEvents. + if (!maNextNextEvents.empty() + && !bFireAllEvents + && (maEvents.empty() || maEvents.top().nTime > nCurrTime)) + { + const EventEntry aEvent (maNextNextEvents.top()); + maNextNextEvents.pop(); + maEvents.push(aEvent); + } + // process ready/elapsed events. Note that the 'perceived' // current time remains constant for this loop, thus we're // processing only those events which where ready when we @@ -243,7 +271,7 @@ namespace slideshow { ::osl::MutexGuard aGuard( maMutex ); - return maEvents.empty(); + return maEvents.empty() && maNextEvents.empty() && maNextNextEvents.empty(); } double EventQueue::nextTimeout() const @@ -251,9 +279,16 @@ namespace slideshow ::osl::MutexGuard aGuard( maMutex ); // return time for next entry (if any) - return isEmpty() ? - ::std::numeric_limits::max() : - maEvents.top().nTime - mpTimer->getElapsedTime(); + double nTimeout (::std::numeric_limits::max()); + const double nCurrentTime (mpTimer->getElapsedTime()); + if ( ! maEvents.empty()) + nTimeout = maEvents.top().nTime - nCurrentTime; + if ( ! maNextEvents.empty()) + nTimeout = ::std::min(nTimeout, maNextEvents.front().nTime - nCurrentTime); + if ( ! maNextNextEvents.empty()) + nTimeout = ::std::min(nTimeout, maNextNextEvents.top().nTime - nCurrentTime); + + return nTimeout; } void EventQueue::clear() diff --git a/slideshow/source/engine/makefile.mk b/slideshow/source/engine/makefile.mk index ba00e028b9ff..8316355c68a4 100644 --- a/slideshow/source/engine/makefile.mk +++ b/slideshow/source/engine/makefile.mk @@ -70,6 +70,7 @@ SLOFILES = $(SLO)$/activitiesqueue.obj \ $(SLO)$/attributemap.obj \ $(SLO)$/color.obj \ $(SLO)$/delayevent.obj \ + $(SLO)$/effectrewinder.obj \ $(SLO)$/eventmultiplexer.obj \ $(SLO)$/eventqueue.obj \ $(SLO)$/expressionnodefactory.obj \ diff --git a/slideshow/source/engine/screenupdater.cxx b/slideshow/source/engine/screenupdater.cxx index bf512dfca5db..940d45337919 100644 --- a/slideshow/source/engine/screenupdater.cxx +++ b/slideshow/source/engine/screenupdater.cxx @@ -36,6 +36,19 @@ #include #include +namespace { + class UpdateLock : public ::slideshow::internal::ScreenUpdater::UpdateLock + { + public: + UpdateLock (::slideshow::internal::ScreenUpdater& rUpdater, const bool bStartLocked); + virtual ~UpdateLock (void); + virtual void Activate (void); + private: + ::slideshow::internal::ScreenUpdater& mrUpdater; + bool mbIsActivated; + }; +} + namespace slideshow { namespace internal @@ -64,12 +77,16 @@ namespace internal /// True, if at least one notifyUpdate() call had bViewClobbered set bool mbViewClobbered; + /// The screen is updated only when mnLockCount==0 + sal_Int32 mnLockCount; + explicit ImplScreenUpdater( UnoViewContainer const& rViewContainer ) : maUpdaters(), maViewUpdateRequests(), mrViewContainer(rViewContainer), mbUpdateAllRequest(false), - mbViewClobbered(false) + mbViewClobbered(false), + mnLockCount(0) {} }; @@ -100,6 +117,9 @@ namespace internal void ScreenUpdater::commitUpdates() { + if (mpImpl->mnLockCount > 0) + return; + // cases: // // (a) no update necessary at all @@ -178,6 +198,9 @@ namespace internal void ScreenUpdater::requestImmediateUpdate() { + if (mpImpl->mnLockCount > 0) + return; + // TODO(F2): This will interfere with other updates, since it // happens out-of-sync with main animation loop. Might cause // artifacts. @@ -186,5 +209,63 @@ namespace internal boost::mem_fn(&View::updateScreen) ); } + void ScreenUpdater::lockUpdates (void) + { + ++mpImpl->mnLockCount; + OSL_ASSERT(mpImpl->mnLockCount>0); + } + + void ScreenUpdater::unlockUpdates (void) + { + OSL_ASSERT(mpImpl->mnLockCount>0); + if (mpImpl->mnLockCount > 0) + { + --mpImpl->mnLockCount; + if (mpImpl->mnLockCount) + commitUpdates(); + } + } + + ::boost::shared_ptr ScreenUpdater::createLock (const bool bStartLocked) + { + return ::boost::shared_ptr(new ::UpdateLock(*this, bStartLocked)); + } + + } // namespace internal } // namespace slideshow + +namespace { + +UpdateLock::UpdateLock ( + ::slideshow::internal::ScreenUpdater& rUpdater, + const bool bStartLocked) + : mrUpdater(rUpdater), + mbIsActivated(false) +{ + if (bStartLocked) + Activate(); +} + + + + +UpdateLock::~UpdateLock (void) +{ + if (mbIsActivated) + mrUpdater.unlockUpdates(); +} + + + + +void UpdateLock::Activate (void) +{ + if ( ! mbIsActivated) + { + mbIsActivated = true; + mrUpdater.lockUpdates(); + } +} + +} diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 18c834e4dfb0..162b3cb8dc2c 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -92,6 +92,7 @@ #include "slidebitmap.hxx" #include "rehearsetimingsactivity.hxx" #include "waitsymbol.hxx" +#include "effectrewinder.hxx" #include #include @@ -193,7 +194,7 @@ public: This method notifies the end of the third phase. */ - void notifySlideEnded(); + void notifySlideEnded (const bool bReverse); /** Notification from eventmultiplexer that a hyperlink has been clicked. @@ -208,6 +209,7 @@ public: private: // XSlideShow: virtual sal_Bool SAL_CALL nextEffect() throw (uno::RuntimeException); + virtual sal_Bool SAL_CALL previousEffect() throw (uno::RuntimeException); virtual sal_Bool SAL_CALL startShapeActivity( uno::Reference const& xShape ) throw (uno::RuntimeException); @@ -258,6 +260,12 @@ private: virtual bool requestCursor( sal_Int16 nCursorShape ); virtual void resetCursor(); + /** This is somewhat similar to displaySlide when called for the current + slide. It has been simplified to take advantage of that no slide + change takes place. Furthermore it does not show the slide + transition. + */ + void redisplayCurrentSlide (void); protected: // WeakComponentImplHelperBase @@ -313,12 +321,32 @@ private: const SlideSharedPtr& rEnteringSlide, const EventSharedPtr& rTransitionEndEvent ); - /// Display/hide wait symbol on all views - void setWaitState( bool bOn ); + /** Request/release the wait symbol. The wait symbol is displayed when + there are more requests then releases. Locking the wait symbol + helps to avoid intermediate repaints. + + Do not call this method directly. Use WaitSymbolLock instead. + */ + void requestWaitSymbol (void); + void releaseWaitSymbol (void); + + class WaitSymbolLock {public: + WaitSymbolLock(SlideShowImpl& rSlideShowImpl) : mrSlideShowImpl(rSlideShowImpl) + { mrSlideShowImpl.requestWaitSymbol(); } + ~WaitSymbolLock(void) + { mrSlideShowImpl.releaseWaitSymbol(); } + private: SlideShowImpl& mrSlideShowImpl; + }; + /// Filter requested cursor shape against hard slideshow cursors (wait, etc.) sal_Int16 calcActiveCursor( sal_Int16 nCursorShape ) const; + /** This method is called asynchronously to finish the rewinding of an + effect to the previous slide that was initiated earlier. + */ + void rewindEffectToPreviousSlide (void); + /// all registered views UnoViewContainer maViewContainer; @@ -365,7 +393,7 @@ private: sal_Int16 mnCurrentCursor; - bool mbWaitState; + sal_Int32 mnWaitSymbolRequestCount; bool mbAutomaticAdvancementMode; bool mbImageAnimationsAllowed; bool mbNoSlideTransitions; @@ -374,6 +402,8 @@ private: bool mbShowPaused; bool mbSlideShowIdle; bool mbDisableAnimationZOrder; + + EffectRewinder maEffectRewinder; }; @@ -465,7 +495,7 @@ SlideShowImpl::SlideShowImpl( mxPrefetchSlide(), mxPrefetchAnimationNode(), mnCurrentCursor(awt::SystemPointer::ARROW), - mbWaitState(false), + mnWaitSymbolRequestCount(0), mbAutomaticAdvancementMode(false), mbImageAnimationsAllowed( true ), mbNoSlideTransitions( false ), @@ -473,7 +503,8 @@ SlideShowImpl::SlideShowImpl( mbForceManualAdvance( false ), mbShowPaused( false ), mbSlideShowIdle( true ), - mbDisableAnimationZOrder( false ) + mbDisableAnimationZOrder( false ), + maEffectRewinder(maEventMultiplexer, maEventQueue, maUserEventQueue) { // keep care not constructing any UNO references to this inside ctor, // shift that code to create()! @@ -507,6 +538,8 @@ void SlideShowImpl::disposing() { osl::MutexGuard const guard( m_aMutex ); + maEffectRewinder.Dispose(); + // stop slide transition sound, if any: stopSlideTransitionSound(); @@ -607,7 +640,7 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition( const uno::Reference< drawing::XDrawPage >& xDrawPage, const SlideSharedPtr& rLeavingSlide, const SlideSharedPtr& rEnteringSlide, - const EventSharedPtr& rTransitionEndEvent ) + const EventSharedPtr& rTransitionEndEvent) { ENSURE_OR_THROW( !maViewContainer.empty(), "createSlideTransition(): No views" ); @@ -778,20 +811,43 @@ SlideSharedPtr SlideShowImpl::makeSlide( return pSlide; } -void SlideShowImpl::setWaitState( bool bOn ) +void SlideShowImpl::requestWaitSymbol (void) { - mbWaitState = bOn; - if( !mpWaitSymbol ) // fallback to cursor - requestCursor(awt::SystemPointer::WAIT); - else if( mbWaitState ) - mpWaitSymbol->show(); - else - mpWaitSymbol->hide(); + ++mnWaitSymbolRequestCount; + OSL_ASSERT(mnWaitSymbolRequestCount>0); + + if (mnWaitSymbolRequestCount == 1) + { + if( !mpWaitSymbol ) + { + // fall back to cursor + requestCursor(calcActiveCursor(mnCurrentCursor)); + } + else + mpWaitSymbol->show(); + } +} + +void SlideShowImpl::releaseWaitSymbol (void) +{ + --mnWaitSymbolRequestCount; + OSL_ASSERT(mnWaitSymbolRequestCount>=0); + + if (mnWaitSymbolRequestCount == 0) + { + if( !mpWaitSymbol ) + { + // fall back to cursor + requestCursor(calcActiveCursor(mnCurrentCursor)); + } + else + mpWaitSymbol->hide(); + } } sal_Int16 SlideShowImpl::calcActiveCursor( sal_Int16 nCursorShape ) const { - if( mbWaitState && !mpWaitSymbol ) // enforce wait cursor + if( mnWaitSymbolRequestCount>0 && !mpWaitSymbol ) // enforce wait cursor nCursorShape = awt::SystemPointer::WAIT; else if( !mbMouseVisible ) // enforce INVISIBLE nCursorShape = awt::SystemPointer::INVISIBLE; @@ -835,10 +891,19 @@ void SlideShowImpl::stopShow() } } -struct SlideShowImpl::PrefetchPropertiesFunc + + +class SlideShowImpl::PrefetchPropertiesFunc { - SlideShowImpl *const that; - PrefetchPropertiesFunc( SlideShowImpl * that_ ) : that(that_) {} +public: + PrefetchPropertiesFunc( SlideShowImpl * that_, + bool& rbSkipAllMainSequenceEffects, + bool& rbSkipSlideTransition) + : mpSlideShowImpl(that_), + mrbSkipAllMainSequenceEffects(rbSkipAllMainSequenceEffects), + mrbSkipSlideTransition(rbSkipSlideTransition) + {} + void operator()( beans::PropertyValue const& rProperty ) const { if (rProperty.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Prefetch") )) @@ -846,16 +911,30 @@ struct SlideShowImpl::PrefetchPropertiesFunc uno::Sequence seq; if ((rProperty.Value >>= seq) && seq.getLength() == 2) { - seq[0] >>= that->mxPrefetchSlide; - seq[1] >>= that->mxPrefetchAnimationNode; + seq[0] >>= mpSlideShowImpl->mxPrefetchSlide; + seq[1] >>= mpSlideShowImpl->mxPrefetchAnimationNode; } } + else if (rProperty.Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("SkipAllMainSequenceEffects") )) + { + rProperty.Value >>= mrbSkipAllMainSequenceEffects; + } + else if (rProperty.Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("SkipSlideTransition") )) + { + rProperty.Value >>= mrbSkipSlideTransition; + } else { OSL_ENSURE( false, rtl::OUStringToOString( rProperty.Name, RTL_TEXTENCODING_UTF8 ).getStr() ); } } +private: + SlideShowImpl *const mpSlideShowImpl; + bool& mrbSkipAllMainSequenceEffects; + bool& mrbSkipSlideTransition; }; void SlideShowImpl::displaySlide( @@ -869,6 +948,8 @@ void SlideShowImpl::displaySlide( if (isDisposed()) return; + maEffectRewinder.SetRootAnimationNode(xRootNode); + // precondition: must only be called from the main thread! DBG_TESTSOLARMUTEX(); @@ -881,9 +962,11 @@ void SlideShowImpl::displaySlide( // shape animations (drawing layer and // GIF) will not be stopped. + bool bSkipAllMainSequenceEffects (false); + bool bSkipSlideTransition (false); std::for_each( rProperties.getConstArray(), rProperties.getConstArray() + rProperties.getLength(), - PrefetchPropertiesFunc(this) ); + PrefetchPropertiesFunc(this, bSkipAllMainSequenceEffects, bSkipSlideTransition) ); OSL_ENSURE( !maViewContainer.empty(), "### no views!" ); if (maViewContainer.empty()) @@ -891,9 +974,7 @@ void SlideShowImpl::displaySlide( // this here might take some time { - comphelper::ScopeGuard const scopeGuard( - boost::bind( &SlideShowImpl::setWaitState, this, false ) ); - setWaitState(true); + WaitSymbolLock aLock (*this); mpPreviousSlide = mpCurrentSlide; mpCurrentSlide.reset(); @@ -935,15 +1016,25 @@ void SlideShowImpl::displaySlide( // create slide transition, and add proper end event // (which then starts the slide effects // via CURRENT_SLIDE.show()) - ActivitySharedPtr const pSlideChangeActivity( - createSlideTransition( mpCurrentSlide->getXDrawPage(), - mpPreviousSlide, - mpCurrentSlide, - makeEvent( - boost::bind( - &SlideShowImpl::notifySlideTransitionEnded, - this, - false )))); + ActivitySharedPtr pSlideChangeActivity ( + createSlideTransition( + mpCurrentSlide->getXDrawPage(), + mpPreviousSlide, + mpCurrentSlide, + makeEvent( + boost::bind( + &SlideShowImpl::notifySlideTransitionEnded, + this, + false )))); + + if (bSkipSlideTransition) + { + // The transition activity was created for the side effects + // (like sound transitions). Because we want to skip the + // acutual transition animation we do not need the activity + // anymore. + pSlideChangeActivity.reset(); + } if (pSlideChangeActivity) { @@ -967,6 +1058,43 @@ void SlideShowImpl::displaySlide( maEventMultiplexer.notifySlideTransitionStarted(); maListenerContainer.forEach( boost::mem_fn( &presentation::XSlideShowListener::slideTransitionStarted ) ); + + // We are currently rewinding an effect. This lead us from the next + // slide to this one. To complete this we have to play back all main + // sequence effects on this slide. + if (bSkipAllMainSequenceEffects) + maEffectRewinder.SkipAllMainSequenceEffects(); +} + +void SlideShowImpl::redisplayCurrentSlide (void) +{ + osl::MutexGuard const guard( m_aMutex ); + + if (isDisposed()) + return; + + // precondition: must only be called from the main thread! + DBG_TESTSOLARMUTEX(); + stopShow(); + bool bSkipAllMainSequenceEffects (false); + bool bSkipSlideTransition (true); + + OSL_ENSURE( !maViewContainer.empty(), "### no views!" ); + if (maViewContainer.empty()) + return; + + // No transition effect on this slide - schedule slide + // effect start event right away. + maEventQueue.addEvent( + makeEvent( + boost::bind( + &SlideShowImpl::notifySlideTransitionEnded, + this, + true ))); + + maEventMultiplexer.notifySlideTransitionStarted(); + maListenerContainer.forEach( + boost::mem_fn( &presentation::XSlideShowListener::slideTransitionStarted ) ); } sal_Bool SlideShowImpl::nextEffect() throw (uno::RuntimeException) @@ -985,6 +1113,50 @@ sal_Bool SlideShowImpl::nextEffect() throw (uno::RuntimeException) return maEventMultiplexer.notifyNextEffect(); } + +sal_Bool SlideShowImpl::previousEffect() throw (uno::RuntimeException) +{ + osl::MutexGuard const guard( m_aMutex ); + + if (isDisposed()) + return false; + + // precondition: must only be called from the main thread! + DBG_TESTSOLARMUTEX(); + + if (mbShowPaused) + return true; + else + { + return maEffectRewinder.Rewind( + maScreenUpdater.createLock(false), + ::boost::bind(&SlideShowImpl::redisplayCurrentSlide, this), + ::boost::bind(&SlideShowImpl::rewindEffectToPreviousSlide, this)); + } +} + +void SlideShowImpl::rewindEffectToPreviousSlide (void) +{ + // Show the wait symbol now and prevent it from showing temporary slide + // content while effects are played back. + WaitSymbolLock aLock (*this); + + // A previous call to EffectRewinder::Rewind could not rewind the current + // effect because there are no effects on the current slide or none has + // yet been displayed. Go to the previous slide. + notifySlideEnded(true); + + // Process pending events once more in order to have the following + // screen update show the last effect. Not sure whether this should be + // necessary. + maEventQueue.forceEmpty(); + + // We have to call the screen updater before the wait symbol is turned + // off. Otherwise the wait symbol would force the display of an + // intermediate state of the slide (before the effects are replayed.) + maScreenUpdater.commitUpdates(); +} + sal_Bool SlideShowImpl::startShapeActivity( uno::Reference const& /*xShape*/ ) throw (uno::RuntimeException) @@ -1658,7 +1830,7 @@ void SlideShowImpl::notifySlideAnimationsEnded() // schedule a slide end event, with automatic mode's // delay aNotificationEvents = makeInterruptableDelay( - boost::bind( &SlideShowImpl::notifySlideEnded, this ), + boost::bind( &SlideShowImpl::notifySlideEnded, this, false ), maEventMultiplexer.getAutomaticTimeout() ); } else @@ -1683,7 +1855,7 @@ void SlideShowImpl::notifySlideAnimationsEnded() bHasAutomaticNextSlide ) { aNotificationEvents = makeInterruptableDelay( - boost::bind( &SlideShowImpl::notifySlideEnded, this ), + boost::bind( &SlideShowImpl::notifySlideEnded, this, false ), nAutomaticNextSlideTimeout); // TODO(F2): Provide a mechanism to let the user override @@ -1700,7 +1872,7 @@ void SlideShowImpl::notifySlideAnimationsEnded() // timeout involved. aNotificationEvents.mpImmediateEvent = makeEvent( boost::bind( - &SlideShowImpl::notifySlideEnded, this ) ); + &SlideShowImpl::notifySlideEnded, this, false ) ); } } @@ -1721,9 +1893,7 @@ void SlideShowImpl::notifySlideAnimationsEnded() // change setup time a lot). Show the wait cursor, this // indeed might take some seconds. { - comphelper::ScopeGuard const scopeGuard( - boost::bind( &SlideShowImpl::setWaitState, this, false ) ); - setWaitState(true); + WaitSymbolLock aLock (*this); if (! matches( mpPrefetchSlide, mxPrefetchSlide, mxPrefetchAnimationNode )) @@ -1745,13 +1915,13 @@ void SlideShowImpl::notifySlideAnimationsEnded() boost::mem_fn( &presentation::XSlideShowListener::slideAnimationsEnded ) ); } -void SlideShowImpl::notifySlideEnded() +void SlideShowImpl::notifySlideEnded (const bool bReverse) { osl::MutexGuard const guard( m_aMutex ); OSL_ENSURE( !isDisposed(), "### already disposed!" ); - if (mpRehearseTimingsActivity) + if (mpRehearseTimingsActivity && !bReverse) { const double time = mpRehearseTimingsActivity->stop(); if (mpRehearseTimingsActivity->hasBeenClicked()) @@ -1772,7 +1942,8 @@ void SlideShowImpl::notifySlideEnded() } } - maEventMultiplexer.notifySlideEndEvent(); + if (bReverse) + maEventMultiplexer.notifySlideEndEvent(); stopShow(); // MUST call that: results in // maUserEventQueue.clear(). What's more, @@ -1784,7 +1955,10 @@ void SlideShowImpl::notifySlideEnded() // GIF) will not be stopped. maListenerContainer.forEach( - boost::mem_fn( &presentation::XSlideShowListener::slideEnded ) ); + boost::bind( + &presentation::XSlideShowListener::slideEnded, + _1, + bReverse) ); } bool SlideShowImpl::notifyHyperLinkClicked( rtl::OUString const& hyperLink ) diff --git a/slideshow/source/engine/usereventqueue.cxx b/slideshow/source/engine/usereventqueue.cxx index ac7f39174118..2e6a8dbeb79e 100644 --- a/slideshow/source/engine/usereventqueue.cxx +++ b/slideshow/source/engine/usereventqueue.cxx @@ -306,26 +306,46 @@ public: EventMultiplexer & rEventMultiplexer ) : ClickEventHandler(rEventQueue), mrEventQueue(rEventQueue), - mrEventMultiplexer(rEventMultiplexer) {} + mrEventMultiplexer(rEventMultiplexer), + mbSkipTriggersNextEffect(true) {} + + /** Remember to trigger (or not to trigger) the next effect after the + current effect is skiped. + */ + void setSkipTriggersNextEffect (const bool bSkipTriggersNextEffect) + { mbSkipTriggersNextEffect = bSkipTriggersNextEffect; } + + /// Skip the current effect but do not triggere the next effect. + void skipEffect (void) { handleEvent_impl(false); } private: virtual bool handleEvent_impl() + { + return handleEvent_impl(true); + } + + bool handleEvent_impl (bool bNotifyNextEffect) { // fire all events, so animation nodes can register their // next effect listeners: if(fireAllEvents( maEvents, mrEventQueue )) { - // then simulate a next effect event: - // this skip effect handler is triggered upon next effect - // events (multiplexer prio=-1)! - // Posting a notifyNextEffect() here is only safe - // (we don't run into busy loop), because we assume that - // someone has registerered above for next effects - // (multiplexer prio=0) at the user event queue. - return mrEventQueue.addEventForNextRound( - makeEvent( boost::bind( + makeEvent(::boost::bind(&EventQueue::forceEmpty, ::boost::ref(mrEventQueue))); + if (mbSkipTriggersNextEffect && bNotifyNextEffect) + { + // then simulate a next effect event: this skip effect + // handler is triggered upon next effect events (multiplexer + // prio=-1)! Posting a notifyNextEffect() here is only safe + // (we don't run into busy loop), because we assume that + // someone has registerered above for next effects + // (multiplexer prio=0) at the user event queue. + return mrEventQueue.addEventWhenQueueIsEmpty( + makeEvent( boost::bind( &EventMultiplexer::notifyNextEffect, boost::ref(mrEventMultiplexer) ) ) ); + } + else + return true; } return false; } @@ -333,6 +353,7 @@ private: private: EventQueue & mrEventQueue; EventMultiplexer & mrEventMultiplexer; + bool mbSkipTriggersNextEffect; }; class RewindEffectEventHandler : public MouseEventHandler_, @@ -888,7 +909,9 @@ void UserEventQueue::registerNextEffectEvent( const EventSharedPtr& rEvent ) mbAdvanceOnClick ) ); } -void UserEventQueue::registerSkipEffectEvent( EventSharedPtr const & pEvent ) +void UserEventQueue::registerSkipEffectEvent( + EventSharedPtr const & pEvent, + const bool bSkipTriggersNextEffect) { if(!mpSkipEffectEventHandler) { @@ -905,6 +928,7 @@ void UserEventQueue::registerSkipEffectEvent( EventSharedPtr const & pEvent ) // we're called here) mpSkipEffectEventHandler->setAdvanceOnClick( mbAdvanceOnClick ); } + mpSkipEffectEventHandler->setSkipTriggersNextEffect(bSkipTriggersNextEffect); mpSkipEffectEventHandler->addEvent( pEvent ); } @@ -973,6 +997,14 @@ void UserEventQueue::registerMouseLeaveEvent( const EventSharedPtr& rEvent, 0.0 /* default prio */ ) ); } +void UserEventQueue::callSkipEffectEventHandler (void) +{ + ::boost::shared_ptr pHandler ( + ::boost::dynamic_pointer_cast(mpSkipEffectEventHandler)); + if (pHandler) + pHandler->skipEffect(); +} + } // namespace internal } // namespace presentation diff --git a/slideshow/source/inc/eventqueue.hxx b/slideshow/source/inc/eventqueue.hxx index 5963552d9c60..35adcf69c068 100644 --- a/slideshow/source/inc/eventqueue.hxx +++ b/slideshow/source/inc/eventqueue.hxx @@ -72,6 +72,13 @@ namespace slideshow */ bool addEventForNextRound( const EventSharedPtr& event ); + /** Another way to control the order of asynchronous event + exeqution. Use this method to schedule events that are to + be executed after all regular events that have no delay, + even when they schedule new regular events without delay. + */ + bool addEventWhenQueueIsEmpty (const EventSharedPtr& rpEvent); + /** Process the event queue. This method executes all events whose timeout has @@ -138,6 +145,7 @@ namespace slideshow ImplQueueType maEvents; typedef ::std::vector EventEntryVector; EventEntryVector maNextEvents; + ImplQueueType maNextNextEvents; void process_( bool bFireAllEvents ); // perform timing of events via relative time diff --git a/slideshow/source/inc/screenupdater.hxx b/slideshow/source/inc/screenupdater.hxx index 07837d6bfc4c..33d6c5d7263f 100644 --- a/slideshow/source/inc/screenupdater.hxx +++ b/slideshow/source/inc/screenupdater.hxx @@ -111,9 +111,30 @@ namespace slideshow */ void requestImmediateUpdate(); + class UpdateLock {public: virtual void Activate (void) = 0; }; + + /** Call this method to create a lock instead of calling + lockUpdates() and unlockUpdates() directly. + @param bStartLocked + When then the UpdateLock is created already + locked. When then Activate() has to be called in order + to lock the lock. + */ + ::boost::shared_ptr createLock (const bool bStartLocked); + + /** Lock updates to prevent intermediate repaints. + */ + void lockUpdates (void); + + /** When called as often as lockUpdates() then commitUpdates() + is called. + */ + void unlockUpdates (void); + private: struct ImplScreenUpdater; boost::scoped_ptr mpImpl; + }; } } diff --git a/slideshow/source/inc/usereventqueue.hxx b/slideshow/source/inc/usereventqueue.hxx index d0ab3b8c1ce5..26be68e1ffa0 100644 --- a/slideshow/source/inc/usereventqueue.hxx +++ b/slideshow/source/inc/usereventqueue.hxx @@ -188,8 +188,16 @@ public: Then, all registered events are fired and removed from this queue. After firing, a next effect event is issued to this queue to start the next effect. + @param pEvent + The event to execute when skipping the current effect. + @param bSkipTriggersNextEffect + When then after skipping the current effect the next + effect is triggered. When then the next effect is not + triggered. */ - void registerSkipEffectEvent( EventSharedPtr const& pEvent ); + void registerSkipEffectEvent( + EventSharedPtr const& pEvent, + const bool bSkipTriggersNextEffect); /** Registes an event that is fired when the current effects(s) are rewound, .e.g. when the right mouse button is pressed. @@ -263,6 +271,12 @@ public: void registerMouseLeaveEvent( const EventSharedPtr& rEvent, const ShapeSharedPtr& rShape ); + /** Typically skipping the current effect is triggered by mouse clicks + or key presses that trigger the next effect. This method allows the + skipping of effects to be triggered programatically. + */ + void callSkipEffectEventHandler (void); + private: /** Generically register an event on one of the handlers. -- cgit v1.2.3 From a7af6ce58f6969da81fd5b65d1ec75c0e02c46c3 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Thu, 5 Mar 2009 12:44:27 +0000 Subject: #i99916# Prevent infinite recursion. --- sd/source/ui/animations/CustomAnimationCreateDialog.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx index cdb894984edd..ce651b2965be 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx @@ -183,15 +183,15 @@ IMPL_LINK( CategoryListBox, implDoubleClickHdl, Control*, EMPTYARG ) void CategoryListBox::MouseButtonUp( const MouseEvent& rMEvt ) { + ReleaseMouse(); if( rMEvt.IsLeft() && (rMEvt.GetClicks() == 2) ) { - ReleaseMouse(); if( maDoubleClickHdl.IsSet() ) maDoubleClickHdl.Call( this ); } else { - CategoryListBox::MouseButtonUp( rMEvt ); + ListBox::MouseButtonUp( rMEvt ); } } -- cgit v1.2.3 From 344b10f55de6ef1385b3ef9cd0a2dfdaed817865 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Fri, 6 Mar 2009 08:59:32 +0000 Subject: #i10000# build fix - filename is lowercase --- slideshow/source/engine/effectrewinder.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx index 3578723443fc..91ffb40d6cce 100644 --- a/slideshow/source/engine/effectrewinder.cxx +++ b/slideshow/source/engine/effectrewinder.cxx @@ -30,7 +30,7 @@ #include "precompiled_slideshow.hxx" -#include "EffectRewinder.hxx" +#include "effectrewinder.hxx" #include "eventqueue.hxx" #include "usereventqueue.hxx" #include "mouseeventhandler.hxx" -- cgit v1.2.3 From 6ff3e037e87b5ca49f177eb1899f0c6715427782 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Fri, 6 Mar 2009 09:08:49 +0000 Subject: #i10000# CodingStandards: aligned EffectRewinder class to module conventions; WaE: removed two unused vars --- slideshow/source/engine/effectrewinder.cxx | 48 +++++++++++++++--------------- slideshow/source/engine/effectrewinder.hxx | 24 +++++++-------- slideshow/source/engine/slideshowimpl.cxx | 10 +++---- 3 files changed, 40 insertions(+), 42 deletions(-) diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx index 91ffb40d6cce..b4fd51968a15 100644 --- a/slideshow/source/engine/effectrewinder.cxx +++ b/slideshow/source/engine/effectrewinder.cxx @@ -99,13 +99,13 @@ EffectRewinder::EffectRewinder ( mpAsynchronousRewindEvent(), mxCurrentAnimationRootNode() { - Initialize(); + initialize(); } -void EffectRewinder::Initialize (void) +void EffectRewinder::initialize (void) { // Add some event handlers so that we are informed when // a) an animation is started (we then check whether that belongs to a @@ -115,17 +115,17 @@ void EffectRewinder::Initialize (void) mpAnimationStartHandler.reset( new RewinderAnimationEventHandler( - ::boost::bind(&EffectRewinder::NotifyAnimationStart, this, _1))); + ::boost::bind(&EffectRewinder::notifyAnimationStart, this, _1))); mrEventMultiplexer.addAnimationStartHandler(mpAnimationStartHandler); mpSlideStartHandler.reset( new RewinderEventHandler( - ::boost::bind(&EffectRewinder::ResetEffectCount, this))); + ::boost::bind(&EffectRewinder::resetEffectCount, this))); mrEventMultiplexer.addSlideStartHandler(mpSlideStartHandler); mpSlideEndHandler.reset( new RewinderEventHandler( - ::boost::bind(&EffectRewinder::ResetEffectCount, this))); + ::boost::bind(&EffectRewinder::resetEffectCount, this))); mrEventMultiplexer.addSlideEndHandler(mpSlideEndHandler); } @@ -134,13 +134,13 @@ void EffectRewinder::Initialize (void) EffectRewinder::~EffectRewinder (void) { - Dispose(); + dispose(); } -void EffectRewinder::Dispose (void) +void EffectRewinder::dispose (void) { if (mpAsynchronousRewindEvent) { @@ -170,7 +170,7 @@ void EffectRewinder::Dispose (void) -void EffectRewinder::SetRootAnimationNode ( +void EffectRewinder::setRootAnimationNode ( const uno::Reference& xRootNode) { mxCurrentAnimationRootNode = xRootNode; @@ -179,7 +179,7 @@ void EffectRewinder::SetRootAnimationNode ( -bool EffectRewinder::Rewind ( +bool EffectRewinder::rewind ( const ::boost::shared_ptr& rpPaintLock, const ::boost::function& rSlideRewindFunctor, const ::boost::function& rPreviousSlideFunctor) @@ -210,7 +210,7 @@ bool EffectRewinder::Rewind ( // Go back to the previous slide. mpAsynchronousRewindEvent = makeEvent( ::boost::bind( - &EffectRewinder::AsynchronousRewindToPreviousSlide, + &EffectRewinder::asynchronousRewindToPreviousSlide, this, rPreviousSlideFunctor)); } @@ -220,7 +220,7 @@ bool EffectRewinder::Rewind ( // call other methods. mpAsynchronousRewindEvent = makeEvent( ::boost::bind( - &EffectRewinder::AsynchronousRewind, + &EffectRewinder::asynchronousRewind, this, nSkipCount, true, @@ -236,7 +236,7 @@ bool EffectRewinder::Rewind ( -void EffectRewinder::SkipAllMainSequenceEffects (void) +void EffectRewinder::skipAllMainSequenceEffects (void) { // Do not allow nested rewinds. if (mpAsynchronousRewindEvent) @@ -245,10 +245,10 @@ void EffectRewinder::SkipAllMainSequenceEffects (void) return; } - const int nTotalMainSequenceEffectCount (CountMainSequenceEffects()); + const int nTotalMainSequenceEffectCount (countMainSequenceEffects()); mpAsynchronousRewindEvent = makeEvent( ::boost::bind( - &EffectRewinder::AsynchronousRewind, + &EffectRewinder::asynchronousRewind, this, nTotalMainSequenceEffectCount, false, @@ -259,7 +259,7 @@ void EffectRewinder::SkipAllMainSequenceEffects (void) -sal_Int32 EffectRewinder::CountMainSequenceEffects (void) +sal_Int32 EffectRewinder::countMainSequenceEffects (void) { // Determine the number of main sequence effects. sal_Int32 nMainSequenceNodeCount (0); @@ -305,16 +305,16 @@ sal_Int32 EffectRewinder::CountMainSequenceEffects (void) -void EffectRewinder::SkipSomeMainSequenceEffects (sal_Int32 nSkipCount) +void EffectRewinder::skipSomeMainSequenceEffects (sal_Int32 nSkipCount) { while (--nSkipCount >= 0) - SkipSingleMainSequenceEffects(); + skipSingleMainSequenceEffects(); } -void EffectRewinder::SkipSingleMainSequenceEffects (void) +void EffectRewinder::skipSingleMainSequenceEffects (void) { // This basically just starts the next effect and then skips over its // animation. @@ -327,7 +327,7 @@ void EffectRewinder::SkipSingleMainSequenceEffects (void) -bool EffectRewinder::ResetEffectCount (void) +bool EffectRewinder::resetEffectCount (void) { mnMainSequenceEffectCount = 0; return false; @@ -336,7 +336,7 @@ bool EffectRewinder::ResetEffectCount (void) -bool EffectRewinder::NotifyAnimationStart (const AnimationNodeSharedPtr& rpNode) +bool EffectRewinder::notifyAnimationStart (const AnimationNodeSharedPtr& rpNode) { // This notification is only relevant for us when the rpNode belongs to // the main sequence. @@ -355,7 +355,7 @@ bool EffectRewinder::NotifyAnimationStart (const AnimationNodeSharedPtr& rpNode) -void EffectRewinder::AsynchronousRewind ( +void EffectRewinder::asynchronousRewind ( sal_Int32 nEffectCount, const bool bRedisplayCurrentSlide, const boost::function& rSlideRewindFunctor) @@ -370,7 +370,7 @@ void EffectRewinder::AsynchronousRewind ( rSlideRewindFunctor(); mpAsynchronousRewindEvent = makeEvent( ::boost::bind( - &EffectRewinder::AsynchronousRewind, + &EffectRewinder::asynchronousRewind, this, nEffectCount, false, @@ -381,7 +381,7 @@ void EffectRewinder::AsynchronousRewind ( { mrEventQueue.forceEmpty(); while (--nEffectCount >= 0) - SkipSingleMainSequenceEffects(); + skipSingleMainSequenceEffects(); mpAsynchronousRewindEvent.reset(); mpPaintLock.reset(); @@ -391,7 +391,7 @@ void EffectRewinder::AsynchronousRewind ( -void EffectRewinder::AsynchronousRewindToPreviousSlide ( +void EffectRewinder::asynchronousRewindToPreviousSlide ( const ::boost::function& rSlideRewindFunctor) { OSL_ASSERT(mpAsynchronousRewindEvent); diff --git a/slideshow/source/engine/effectrewinder.hxx b/slideshow/source/engine/effectrewinder.hxx index 3aeca5a907c5..c00131233b0e 100644 --- a/slideshow/source/engine/effectrewinder.hxx +++ b/slideshow/source/engine/effectrewinder.hxx @@ -72,13 +72,13 @@ public: that the EffectRewinder can release all references to the owner. */ - void Dispose (void); + void dispose (void); /** Store the root node of the animation tree. It is used in CountMainSequenceEffects() to count the number of main sequence effects (or effect groups.) */ - void SetRootAnimationNode ( + void setRootAnimationNode ( const css::uno::Reference& xRootNode); /** Rewind one effect of the main effect sequence. When the current @@ -101,7 +101,7 @@ public: This functor is called to switch to the previous slide. When it is called then the other functor is not called. */ - bool Rewind ( + bool rewind ( const ::boost::shared_ptr& rpPaintLock, const ::boost::function& rSlideRewindFunctor, const ::boost::function& rPreviousSlideFunctor); @@ -109,7 +109,7 @@ public: /** Call this method after gotoPreviousEffect() triggered a slide change to the previous slide. */ - void SkipAllMainSequenceEffects (void); + void skipAllMainSequenceEffects (void); private: EventMultiplexer& mrEventMultiplexer; @@ -133,26 +133,26 @@ private: css::uno::Reference mxCurrentAnimationRootNode; ::boost::shared_ptr mpPaintLock; - void Initialize (void); + void initialize (void); - bool ResetEffectCount (void); + bool resetEffectCount (void); /** Called by listeners when an animation (not necessarily of a main sequence effect) starts. */ - bool NotifyAnimationStart (const AnimationNodeSharedPtr& rpNode); + bool notifyAnimationStart (const AnimationNodeSharedPtr& rpNode); /** Count the number of effects (or effect groups) in the main effect sequence. */ - sal_Int32 CountMainSequenceEffects (void); + sal_Int32 countMainSequenceEffects (void); /** Skip the next main sequence effect. */ - void SkipSingleMainSequenceEffects (void); + void skipSingleMainSequenceEffects (void); /** Skip the specified number of main sequence effects. */ - void SkipSomeMainSequenceEffects (const sal_Int32 nSkipCount); + void skipSomeMainSequenceEffects (const sal_Int32 nSkipCount); /** Rewind the last effect of the main effect sequence by replaying all previous effects. @@ -164,7 +164,7 @@ private: @param rSlideRewindFunctor This functor is used to redisplay the current slide. */ - void AsynchronousRewind ( + void asynchronousRewind ( sal_Int32 nEffectCount, const bool bRedisplayCurrentSlide, const boost::function& rSlideRewindFunctor); @@ -174,7 +174,7 @@ private: @param rPreviousSlideFunctor This functor is used to go to the previous slide. */ - void AsynchronousRewindToPreviousSlide ( + void asynchronousRewindToPreviousSlide ( const ::boost::function& rPreviousSlideFunctor); }; diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 162b3cb8dc2c..919cd478c160 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -538,7 +538,7 @@ void SlideShowImpl::disposing() { osl::MutexGuard const guard( m_aMutex ); - maEffectRewinder.Dispose(); + maEffectRewinder.dispose(); // stop slide transition sound, if any: stopSlideTransitionSound(); @@ -948,7 +948,7 @@ void SlideShowImpl::displaySlide( if (isDisposed()) return; - maEffectRewinder.SetRootAnimationNode(xRootNode); + maEffectRewinder.setRootAnimationNode(xRootNode); // precondition: must only be called from the main thread! DBG_TESTSOLARMUTEX(); @@ -1063,7 +1063,7 @@ void SlideShowImpl::displaySlide( // slide to this one. To complete this we have to play back all main // sequence effects on this slide. if (bSkipAllMainSequenceEffects) - maEffectRewinder.SkipAllMainSequenceEffects(); + maEffectRewinder.skipAllMainSequenceEffects(); } void SlideShowImpl::redisplayCurrentSlide (void) @@ -1076,8 +1076,6 @@ void SlideShowImpl::redisplayCurrentSlide (void) // precondition: must only be called from the main thread! DBG_TESTSOLARMUTEX(); stopShow(); - bool bSkipAllMainSequenceEffects (false); - bool bSkipSlideTransition (true); OSL_ENSURE( !maViewContainer.empty(), "### no views!" ); if (maViewContainer.empty()) @@ -1128,7 +1126,7 @@ sal_Bool SlideShowImpl::previousEffect() throw (uno::RuntimeException) return true; else { - return maEffectRewinder.Rewind( + return maEffectRewinder.rewind( maScreenUpdater.createLock(false), ::boost::bind(&SlideShowImpl::redisplayCurrentSlide, this), ::boost::bind(&SlideShowImpl::rewindEffectToPreviousSlide, this)); -- cgit v1.2.3 From a7bd3d52eec783eadd078797f504c1e3c4878ab8 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Mon, 9 Mar 2009 10:45:37 +0000 Subject: #i48179# Fixed handling of main sequence effects that are not user triggered. --- slideshow/source/engine/effectrewinder.cxx | 42 +++++++++++++++++++++++++----- slideshow/source/engine/effectrewinder.hxx | 2 ++ 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx index b4fd51968a15..465512a915cd 100644 --- a/slideshow/source/engine/effectrewinder.cxx +++ b/slideshow/source/engine/effectrewinder.cxx @@ -97,7 +97,8 @@ EffectRewinder::EffectRewinder ( mpAnimationStartHandler(), mnMainSequenceEffectCount(0), mpAsynchronousRewindEvent(), - mxCurrentAnimationRootNode() + mxCurrentAnimationRootNode(), + mbNonUserTriggeredMainSequenceEffectSeen(false) { initialize(); } @@ -341,14 +342,30 @@ bool EffectRewinder::notifyAnimationStart (const AnimationNodeSharedPtr& rpNode) // This notification is only relevant for us when the rpNode belongs to // the main sequence. BaseNodeSharedPtr pBaseNode (::boost::dynamic_pointer_cast(rpNode)); - if (pBaseNode) + if ( ! pBaseNode) + return false; + + BaseContainerNodeSharedPtr pParent (pBaseNode->getParentNode()); + if ( ! (pParent && pParent->isMainSequenceRootNode())) + return false; + + // This notification is only relevant for us when the effect is user + // triggered. + bool bIsUserTriggered (false); + + Reference xNode (rpNode->getXAnimationNode()); + if (xNode.is()) { - BaseContainerNodeSharedPtr pParent (pBaseNode->getParentNode()); - if (pParent && pParent->isMainSequenceRootNode()) - { - ++mnMainSequenceEffectCount; - } + animations::Event aEvent; + if ((xNode->getBegin() >>= aEvent)) + bIsUserTriggered = (aEvent.Trigger == animations::EventTrigger::ON_NEXT); } + + if (bIsUserTriggered) + ++mnMainSequenceEffectCount; + else + mbNonUserTriggeredMainSequenceEffectSeen = true; + return false; } @@ -379,7 +396,16 @@ void EffectRewinder::asynchronousRewind ( } else { + // Process initial events and skip any animations that are started + // when the slide is shown. + mbNonUserTriggeredMainSequenceEffectSeen = false; mrEventQueue.forceEmpty(); + if (mbNonUserTriggeredMainSequenceEffectSeen) + { + mrUserEventQueue.callSkipEffectEventHandler(); + mrEventQueue.forceEmpty(); + } + while (--nEffectCount >= 0) skipSingleMainSequenceEffects(); @@ -401,4 +427,6 @@ void EffectRewinder::asynchronousRewindToPreviousSlide ( } + + } } // end of namespace ::slideshow::internal diff --git a/slideshow/source/engine/effectrewinder.hxx b/slideshow/source/engine/effectrewinder.hxx index c00131233b0e..804696c99c92 100644 --- a/slideshow/source/engine/effectrewinder.hxx +++ b/slideshow/source/engine/effectrewinder.hxx @@ -133,6 +133,8 @@ private: css::uno::Reference mxCurrentAnimationRootNode; ::boost::shared_ptr mpPaintLock; + bool mbNonUserTriggeredMainSequenceEffectSeen; + void initialize (void); bool resetEffectCount (void); -- cgit v1.2.3 -- cgit v1.2.3 From bf91a397c0a89521727789efa0c8f64811b91872 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Tue, 24 Mar 2009 09:22:17 +0000 Subject: #i100047# Calling updateStateIds() from createAttributeLayer(). --- slideshow/source/engine/shapes/drawshape.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx index a4c36cf2e6af..e241c20df951 100644 --- a/slideshow/source/engine/shapes/drawshape.cxx +++ b/slideshow/source/engine/shapes/drawshape.cxx @@ -262,7 +262,8 @@ namespace slideshow void DrawShape::updateStateIds() const { - // update the states, we've just redrawn + // Update the states, we've just redrawn or created a new + // attribute layer. if( mpAttributeLayer ) { mnAttributeTransformationState = mpAttributeLayer->getTransformationState(); @@ -1258,6 +1259,9 @@ namespace slideshow // create new layer, with last as its new child mpAttributeLayer.reset( new ShapeAttributeLayer( mpAttributeLayer ) ); + // Update the local state ids to reflect those of the new layer. + updateStateIds(); + return mpAttributeLayer; } -- cgit v1.2.3 From 3444422cc1fd774961c43d5699a15f4e4b13d6d1 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Tue, 24 Mar 2009 13:53:29 +0000 Subject: #i98806# Added IsSoundEnabled property to mute sound in some slide show views. --- slideshow/source/engine/shapes/viewmediashape.cxx | 12 ++++++++-- slideshow/source/engine/slideshowimpl.cxx | 28 +++++++++++++++++++++++ slideshow/source/engine/slideview.cxx | 16 ++++++++++++- slideshow/source/inc/unoview.hxx | 10 ++++++++ 4 files changed, 63 insertions(+), 3 deletions(-) diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index a02c795d4943..03fdff737e7c 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -71,6 +71,7 @@ #include "viewmediashape.hxx" #include "mediashape.hxx" #include "tools.hxx" +#include "unoview.hxx" using namespace ::com::sun::star; @@ -88,12 +89,19 @@ namespace slideshow mxShape( rxShape ), mxPlayer(), mxPlayerWindow(), - mxComponentContext( rxContext ) + mxComponentContext( rxContext ), + mbIsSoundEnabled(true) { ENSURE_OR_THROW( mxShape.is(), "ViewMediaShape::ViewMediaShape(): Invalid Shape" ); ENSURE_OR_THROW( mpViewLayer, "ViewMediaShape::ViewMediaShape(): Invalid View" ); ENSURE_OR_THROW( mpViewLayer->getCanvas(), "ViewMediaShape::ViewMediaShape(): Invalid ViewLayer canvas" ); ENSURE_OR_THROW( mxComponentContext.is(), "ViewMediaShape::ViewMediaShape(): Invalid component context" ); + + UnoViewSharedPtr pUnoView (::boost::dynamic_pointer_cast(rViewLayer)); + if (pUnoView) + { + mbIsSoundEnabled = pUnoView->isSoundEnabled(); + } } // --------------------------------------------------------------------- @@ -352,7 +360,7 @@ namespace slideshow getPropertyValue( bMute, rxProps, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Mute" ))); - mxPlayer->setMute( bMute ); + mxPlayer->setMute( bMute || !mbIsSoundEnabled); sal_Int16 nVolumeDB(0); getPropertyValue( nVolumeDB, diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 919cd478c160..2658f2a490eb 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -1451,6 +1451,34 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty ) return (rProperty.Value >>= mbNoSlideTransitions); } + if (rProperty.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsSoundEnabled"))) + { + uno::Sequence aValues; + uno::Reference xView; + sal_Bool bValue; + if ((rProperty.Value >>= aValues) + && aValues.getLength()==2 + && (aValues[0] >>= xView) + && (aValues[1] >>= bValue)) + { + // Look up the view. + for (UnoViewVector::const_iterator + iView (maViewContainer.begin()), + iEnd (maViewContainer.end()); + iView!=iEnd; + ++iView) + { + if (*iView && (*iView)->getUnoView()==xView) + { + // Store the flag at the view so that media shapes have + // access to it. + (*iView)->setIsSoundEnabled(bValue); + return true; + } + } + } + } + return false; } diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx index 9d48612457b3..29ff302a7a77 100644 --- a/slideshow/source/engine/slideview.cxx +++ b/slideshow/source/engine/slideview.cxx @@ -715,6 +715,8 @@ private: // UnoView: virtual void _dispose(); virtual uno::Reference getUnoView()const; + virtual void setIsSoundEnabled (const bool bValue); + virtual bool isSoundEnabled (void) const; // XEventListener: virtual void SAL_CALL disposing( lang::EventObject const& evt ) @@ -755,6 +757,7 @@ private: basegfx::B2DHomMatrix maViewTransform; basegfx::B2DSize maUserSize; + bool mbIsSoundEnabled; }; @@ -770,7 +773,8 @@ SlideView::SlideView( const uno::Reference& xView, maViewLayers(), maClip(), maViewTransform(), - maUserSize( 1.0, 1.0 ) // default size: one-by-one rectangle + maUserSize( 1.0, 1.0 ), // default size: one-by-one rectangle + mbIsSoundEnabled(true) { // take care not constructing any UNO references to this _inside_ // ctor, shift that code to createSlideView()! @@ -1001,6 +1005,16 @@ uno::Reference SlideView::getUnoView() const return mxView; } +void SlideView::setIsSoundEnabled (const bool bValue) +{ + mbIsSoundEnabled = bValue; +} + +bool SlideView::isSoundEnabled (void) const +{ + return mbIsSoundEnabled; +} + void SlideView::_dispose() { dispose(); diff --git a/slideshow/source/inc/unoview.hxx b/slideshow/source/inc/unoview.hxx index 471cdae98a70..6dfc99da5a65 100644 --- a/slideshow/source/inc/unoview.hxx +++ b/slideshow/source/inc/unoview.hxx @@ -68,6 +68,16 @@ namespace slideshow with a different calling convention under Windows). */ virtual void _dispose() = 0; + + /** Return whether the sound play back is enabled. + */ + virtual bool isSoundEnabled (void) const = 0; + + /** Tell the view whether it may play sounds. Disabling this + can be used to prevent different views to play the same + sounds at the same time. + */ + virtual void setIsSoundEnabled (const bool bValue) = 0; }; typedef ::boost::shared_ptr< UnoView > UnoViewSharedPtr; -- cgit v1.2.3 From d03078d55b74168855596292c8c83708feb63523 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Fri, 27 Mar 2009 16:35:36 +0000 Subject: #i98806# Added mbIsSoundEnabled member. --- slideshow/source/engine/shapes/viewmediashape.hxx | 1 + 1 file changed, 1 insertion(+) diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx index 09f4d4fa53ef..f28fe3d74f75 100644 --- a/slideshow/source/engine/shapes/viewmediashape.hxx +++ b/slideshow/source/engine/shapes/viewmediashape.hxx @@ -166,6 +166,7 @@ namespace slideshow ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer; ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow > mxPlayerWindow; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> mxComponentContext; + bool mbIsSoundEnabled; }; typedef ::boost::shared_ptr< ViewMediaShape > ViewMediaShapeSharedPtr; -- cgit v1.2.3 From 789327979618b8e6d6cb1577167e1999010dc23c Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 1 Apr 2009 11:54:54 +0000 Subject: #i48719# Fixed compilation problem. --- slideshow/source/engine/slide/layermanager.cxx | 2 +- slideshow/source/engine/slideshowimpl.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx index 0ee488cd6102..251cff3a73b3 100644 --- a/slideshow/source/engine/slide/layermanager.cxx +++ b/slideshow/source/engine/slide/layermanager.cxx @@ -307,7 +307,7 @@ namespace slideshow OSL_ASSERT( !maLayers.empty() ); // always at least background layer ENSURE_OR_THROW( rShape, "LayerManager::implAddShape(): invalid Shape" ); - LayerShapeMap::value_type aValue (rShape, LayerShapeMap::data_type()); + LayerShapeMap::value_type aValue (rShape, LayerWeakPtr()); OSL_ASSERT( maAllShapes.find(rShape) == maAllShapes.end() ); // shape must not be added already mbLayerAssociationDirty = true; diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index a23c4b5f35d9..243f378d7223 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -1464,7 +1464,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty ) { uno::Sequence aValues; uno::Reference xView; - sal_Bool bValue; + sal_Bool bValue (false); if ((rProperty.Value >>= aValues) && aValues.getLength()==2 && (aValues[0] >>= xView) -- cgit v1.2.3 From 1c0eaccc7afe441169b154f2cecc8c15b31988ad Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Fri, 17 Apr 2009 12:10:45 +0000 Subject: #i69530# Access views in forEachView only if they still exist. --- slideshow/source/engine/eventmultiplexer.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx index 181a787301b7..a75d9c017987 100644 --- a/slideshow/source/engine/eventmultiplexer.cxx +++ b/slideshow/source/engine/eventmultiplexer.cxx @@ -448,7 +448,15 @@ void EventMultiplexerImpl::forEachView( XSlideShowViewFunc pViewMethod ) for( UnoViewVector::const_iterator aIter( mrViewContainer.begin() ), aEnd( mrViewContainer.end() ); aIter != aEnd; ++aIter ) { - ((*aIter)->getUnoView().get()->*pViewMethod)( mxListener.get() ); + uno::Reference xView ((*aIter)->getUnoView()); + if (xView.is()) + { + (xView.get()->*pViewMethod)( mxListener.get() ); + } + else + { + OSL_ASSERT(xView.is()); + } } } } -- cgit v1.2.3 From db9f5786167659b2197cc2695dc7a17b527ff748 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Fri, 17 Apr 2009 12:12:24 +0000 Subject: #i69530# End show before it is released. --- sd/source/ui/dlg/docprev.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx index b53b570f813e..b8c2f0b0867d 100644 --- a/sd/source/ui/dlg/docprev.cxx +++ b/sd/source/ui/dlg/docprev.cxx @@ -67,7 +67,11 @@ void SdDocPreviewWin::SetObjectShell( SfxObjectShell* pObj, sal_uInt16 nShowPage { mpObj = pObj; mnShowPage = nShowPage; - mxSlideShow.clear(); + if (mxSlideShow.is()) + { + mxSlideShow->end(); + mxSlideShow.clear(); + } updateViewSettings(); } -- cgit v1.2.3 From e8c1911592680b712cd989205e70918783bf4566 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Tue, 21 Apr 2009 08:27:57 +0000 Subject: #i96540# Hold timer even for single activities. --- slideshow/source/engine/slideshowimpl.cxx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 243f378d7223..8fd1cb07ca48 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -1669,19 +1669,17 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout ) // TODO(F2): re-evaluate whether that timer lagging makes // sense. - // hold timer, while processing the queues (ensures - // same time for all activities and events) + // hold timer, while processing the queues: + // 1. when there is more than one active activity this ensures the + // same time for all activities and events + // 2. processing of events may lead to creation of further events + // that have zero delay. While the timer is stopped these events + // are processed in the same run. { comphelper::ScopeGuard scopeGuard( boost::bind( &canvas::tools::ElapsedTime::releaseTimer, boost::cref(mpPresTimer) ) ); - - // no need to hold timer for only one active animation - - // it's only meant to keep multiple ones in sync - if( maActivitiesQueue.size() > 1 ) - mpPresTimer->holdTimer(); - else - scopeGuard.dismiss(); // we're not holding the timer + mpPresTimer->holdTimer(); // process queues maEventQueue.process(); -- cgit v1.2.3 From 1793f3ef4993ef6e33230e03ef7498f0e1cc298e Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Thu, 23 Apr 2009 15:04:41 +0000 Subject: #i96540# Fixed order of event processing when rewinding with fixed time. --- slideshow/source/engine/effectrewinder.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx index 465512a915cd..59db7ba50615 100644 --- a/slideshow/source/engine/effectrewinder.cxx +++ b/slideshow/source/engine/effectrewinder.cxx @@ -392,7 +392,7 @@ void EffectRewinder::asynchronousRewind ( nEffectCount, false, rSlideRewindFunctor)); - mrEventQueue.addEventForNextRound(mpAsynchronousRewindEvent); + mrEventQueue.addEvent(mpAsynchronousRewindEvent); } else { -- cgit v1.2.3 From 881043d1f01fad663c0a17f11cbe2dab79e31217 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Mon, 27 Apr 2009 11:23:14 +0000 Subject: #i98792# Allow frequent calls to slide show update(). --- sd/source/ui/slideshow/slideshowimpl.cxx | 82 ++++++++++++++++++++++---------- sd/source/ui/slideshow/slideshowimpl.hxx | 8 ++++ 2 files changed, 64 insertions(+), 26 deletions(-) diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 2b309333d006..48da5d474667 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -772,6 +772,9 @@ void SAL_CALL SlideshowImpl::disposing() setActiveXToolbarsVisible( sal_True ); + Application::EnableNoYieldMode(false); + Application::RemovePostYieldListener(LINK(this, SlideshowImpl, PostYieldListener)); + mbDisposed = true; } @@ -1867,11 +1870,34 @@ IMPL_LINK( SlideshowImpl, updateHdl, Timer*, EMPTYARG ) { mnUpdateEvent = 0; + return updateSlideShow(); +} + + + + +IMPL_LINK( SlideshowImpl, PostYieldListener, void*, EMPTYARG ) +{ + Application::EnableNoYieldMode(false); + Application::RemovePostYieldListener(LINK(this, SlideshowImpl, PostYieldListener)); + if (mbDisposed) + return 0; + return updateSlideShow(); +} + + + + +sal_Int32 SlideshowImpl::updateSlideShow (void) +{ // doing some nMagic const rtl::Reference this_(this); Reference< XSlideShow > xShow( mxShow ); - if( xShow.is() ) try + if ( ! xShow.is()) + return 0; + + try { // TODO(Q3): Evaluate under various systems and setups, // whether this is really necessary. Under WinXP and Matrox @@ -1886,32 +1912,37 @@ IMPL_LINK( SlideshowImpl, updateHdl, Timer*, EMPTYARG ) if( !xShow->update(fUpdate) ) fUpdate = -1.0; - if( mxShow.is() && ( fUpdate >= 0.0 ) ) + if (mxShow.is() && (fUpdate >= 0.0)) { -/* - if( fUpdate < 0.25 ) + if (::basegfx::fTools::equalZero(fUpdate)) { - mnUpdateEvent = Application::PostUserEvent(LINK(this, SlideshowImpl, updateHdl)); + // Use post yield listener for short update intervalls. + Application::EnableNoYieldMode(true); + Application::AddPostYieldListener(LINK(this, SlideshowImpl, PostYieldListener)); } else -*/ { // Avoid busy loop when the previous call to update() - // returns 0. The minimum value is small enough to allow - // high frame rates. Values larger than 0 are typically - // also larger then the small minimum value and thus are - // used to determine the frame rate. - const float MIN_UPDATE = 0.01f; // 10ms corresponds to 100 frames per second. - if( fUpdate < MIN_UPDATE ) - fUpdate = MIN_UPDATE; - else - { - const float MAX_UPDATE = 4.0f; // do not wait longer than 4 seconds for next refresh, because dilbert said so - if( fUpdate > MAX_UPDATE ) - fUpdate = MAX_UPDATE; - } - maUpdateTimer.SetTimeout( - ::std::max( 1UL, static_cast(fUpdate * 1000.0) ) ); + // returns a small positive number but not 0 (which is + // handled above). Also, make sure that calls to update() + // have a minimum frequency. + // => Allow up to 60 frames per second. Call at least once + // every 4 seconds. + const static sal_Int32 mnMaximumFrameCount (60); + const static double mnMinimumTimeout (1.0 / mnMaximumFrameCount); + const static double mnMaximumTimeout (4.0); + fUpdate = ::basegfx::clamp(fUpdate, mnMinimumTimeout, mnMaximumTimeout); + + // Make sure that the maximum frame count has not been set + // too high (only then conversion to milliseconds and long + // integer may lead to zero value.) + OSL_ASSERT(static_cast(fUpdate * 1000.0) > 0); + + Application::EnableNoYieldMode(false); + Application::RemovePostYieldListener(LINK(this, SlideshowImpl, PostYieldListener)); + + // Use a timer for the asynchronous callback. + maUpdateTimer.SetTimeout(static_cast(fUpdate * 1000.0)); maUpdateTimer.Start(); } } @@ -1920,11 +1951,10 @@ IMPL_LINK( SlideshowImpl, updateHdl, Timer*, EMPTYARG ) { static_cast(e); DBG_ERROR( - (OString("sd::SlideshowImpl::updateHdl(), " - "exception caught: ") + - rtl::OUStringToOString( - comphelper::anyToString( cppu::getCaughtException() ), - RTL_TEXTENCODING_UTF8 )).getStr() ); + (OString("sd::SlideshowImpl::updateSlideShow(), exception caught: ") + + rtl::OUStringToOString( + comphelper::anyToString( cppu::getCaughtException() ), + RTL_TEXTENCODING_UTF8 )).getStr() ); } return 0; } diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx index 8ec21638addb..7240e6efa087 100644 --- a/sd/source/ui/slideshow/slideshowimpl.hxx +++ b/sd/source/ui/slideshow/slideshowimpl.hxx @@ -298,6 +298,7 @@ private: void setActiveXToolbarsVisible( sal_Bool bVisible ); DECL_LINK( updateHdl, Timer* ); + DECL_LINK( PostYieldListener, void* ); DECL_LINK( ReadyForNextInputHdl, Timer* ); DECL_LINK( endPresentationHdl, void* ); DECL_LINK( ContextMenuSelectHdl, Menu * ); @@ -333,6 +334,13 @@ private: void setAutoSaveState( bool bOn ); void gotoPreviousSlide (const bool bSkipAllMainSequenceEffects); + /** Called by PostYieldListener and updateHdl handlers this method is + responsible to call the slideshow update() method and, depending on + its return value, wait for a certain amount of time before another + call to update() is scheduled. + */ + sal_Int32 updateSlideShow (void); + css::uno::Reference< css::presentation::XSlideShow > mxShow; comphelper::ImplementationReference< ::sd::SlideShowView, css::presentation::XSlideShowView > mxView; css::uno::Reference< css::frame::XModel > mxModel; -- cgit v1.2.3 From aa02f1da390cb9b1225de978f8e2965c34e3a45f Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Mon, 27 Apr 2009 11:25:13 +0000 Subject: #i98792# Synchronize frame rate during animations. --- slideshow/source/engine/slideshowimpl.cxx | 130 +++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 2 deletions(-) diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 8fd1cb07ca48..5ace44acda65 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -110,6 +110,65 @@ using namespace ::slideshow::internal; namespace { +/** During animations the update() method tells its caller to call it as + soon as possible. This gives us more time to render the next frame and + still maintain a steady frame rate. This class is responsible for + synchronizing the display of new frames and thus keeping the frame rate + steady. +*/ +class FrameSynchronization +{ +public: + /** Create new object with a predefined duration between two frames. + @param nFrameDuration + The preferred duration between the display of two frames in + seconds. + */ + FrameSynchronization (const double nFrameDuration); + + /** Set the current time as the time at which the current frame is + displayed. From this the target time of the next frame is derived. + */ + void MarkCurrentFrame (void); + + /** When there is time left until the next frame is due then wait. + Otherwise return without delay. + */ + void Synchronize (void); + + /** Activate frame synchronization when an animation is active and + frames are to be displayed in a steady rate. While active + Synchronize() will wait until the frame duration time has passed. + */ + void Activate (void); + + /** Deactivate frame sychronization when no animation is active and the + time between frames depends on user actions and other external + sources. While deactivated Synchronize() will return without delay. + */ + void Deactivate (void); + +private: + /** The timer that is used for synchronization is independent from the + one used by SlideShowImpl: it is not paused or modified by + animations. + */ + canvas::tools::ElapsedTime maTimer; + /** Time between the display of frames. Enforced only when mbIsActive + is . + */ + const double mnFrameDuration; + /** Time (of maTimer) when the next frame shall be displayed. + Synchronize() will wait until this time. + */ + double mnNextFrameTargetTime; + /** Synchronize() will wait only when this flag is . Otherwise + it returns immediately. + */ + bool mbIsActive; +}; + + /****************************************************************************** SlideShowImpl @@ -407,6 +466,7 @@ private: bool mbDisableAnimationZOrder; EffectRewinder maEffectRewinder; + FrameSynchronization maFrameSynchronization; }; @@ -507,7 +567,9 @@ SlideShowImpl::SlideShowImpl( mbShowPaused( false ), mbSlideShowIdle( true ), mbDisableAnimationZOrder( false ), - maEffectRewinder(maEventMultiplexer, maEventQueue, maUserEventQueue) + maEffectRewinder(maEventMultiplexer, maEventQueue, maUserEventQueue), + maFrameSynchronization(1.0 / FrameRate::PreferredFramesPerSecond) + { // keep care not constructing any UNO references to this inside ctor, // shift that code to create()! @@ -1686,6 +1748,7 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout ) maActivitiesQueue.process(); // commit frame to screen + maFrameSynchronization.Synchronize(); maScreenUpdater.commitUpdates(); // TODO(Q3): remove need to call dequeued() from @@ -1729,7 +1792,13 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout ) { // Activity queue is not empty. Tell caller that we would // like to render another frame. - nNextTimeout = 1.0 / FrameRate::PreferredFramesPerSecond; + + // Return a zero time-out to signal our caller to call us + // back as soon as possible. The actual timing, waiting the + // appropriate amount of time between frames, is then done + // by the maFrameSynchronization object. + nNextTimeout = 0; + maFrameSynchronization.Activate(); } else { @@ -1743,6 +1812,10 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout ) // ensure positive value: nNextTimeout = std::max( 0.0, maEventQueue.nextTimeout() ); + + // There is no active animation so the frame rate does not + // need to be synchronized. + maFrameSynchronization.Deactivate(); } mbSlideShowIdle = false; @@ -2038,6 +2111,59 @@ bool SlideShowImpl::handleAnimationEvent( const AnimationNodeSharedPtr& rNode ) return true; } + +//===== FrameSynchronization ================================================== + +FrameSynchronization::FrameSynchronization (const double nFrameDuration) + : maTimer(), + mnFrameDuration(nFrameDuration), + mnNextFrameTargetTime(0), + mbIsActive(false) +{ + MarkCurrentFrame(); +} + + + + +void FrameSynchronization::MarkCurrentFrame (void) +{ + mnNextFrameTargetTime = maTimer.getElapsedTime() + mnFrameDuration; +} + + + + +void FrameSynchronization::Synchronize (void) +{ + if (mbIsActive) + { + // Do busy waiting for now. + while (maTimer.getElapsedTime() < mnNextFrameTargetTime) + ; + } + + MarkCurrentFrame(); +} + + + + +void FrameSynchronization::Activate (void) +{ + mbIsActive = true; +} + + + + +void FrameSynchronization::Deactivate (void) +{ + mbIsActive = false; +} + + + } // anon namespace namespace sdecl = comphelper::service_decl; -- cgit v1.2.3 From 69a4a545a556bd189736b3e510d4b4b07ae8cb6e Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Mon, 27 Apr 2009 11:42:05 +0000 Subject: #i48179# Debug: added descriptive strings to events. --- .../engine/animationnodes/animationaudionode.cxx | 9 +- .../engine/animationnodes/animationbasenode.cxx | 3 +- .../engine/animationnodes/animationcommandnode.cxx | 3 +- .../engine/animationnodes/animationsetnode.cxx | 3 +- .../source/engine/animationnodes/basenode.cxx | 9 +- .../source/engine/animationnodes/generateevent.cxx | 36 ++- .../animationnodes/paralleltimecontainer.cxx | 3 +- .../animationnodes/sequentialtimecontainer.cxx | 12 +- slideshow/source/engine/debug.cxx | 328 +++++++++++++++++++++ slideshow/source/engine/effectrewinder.cxx | 12 +- slideshow/source/engine/eventmultiplexer.cxx | 15 +- slideshow/source/engine/eventqueue.cxx | 28 ++ slideshow/source/engine/makefile.mk | 3 +- .../source/engine/rehearsetimingsactivity.cxx | 3 + slideshow/source/engine/slideshowimpl.cxx | 19 +- slideshow/source/engine/slideview.cxx | 6 +- slideshow/source/engine/usereventqueue.cxx | 9 +- slideshow/source/engine/wakeupevent.cxx | 3 + slideshow/source/inc/debug.hxx | 87 ++++++ slideshow/source/inc/delayevent.hxx | 69 +++-- slideshow/source/inc/event.hxx | 14 +- slideshow/source/inc/interruptabledelayevent.hxx | 5 +- 22 files changed, 616 insertions(+), 63 deletions(-) create mode 100644 slideshow/source/engine/debug.cxx create mode 100644 slideshow/source/inc/debug.hxx diff --git a/slideshow/source/engine/animationnodes/animationaudionode.cxx b/slideshow/source/engine/animationnodes/animationaudionode.cxx index 634dc0342515..24c3a95382bf 100644 --- a/slideshow/source/engine/animationnodes/animationaudionode.cxx +++ b/slideshow/source/engine/animationnodes/animationaudionode.cxx @@ -94,14 +94,16 @@ void AnimationAudioNode::activate_st() // no node duration. Take inherent media time, then scheduleDeactivationEvent( makeDelay( boost::bind( &AnimationNode::deactivate, getSelf() ), - mpPlayer->getDuration() ) ); + mpPlayer->getDuration(), + "AnimationAudioNode::deactivate with delay") ); } } else { // deactivate ASAP: scheduleDeactivationEvent( - makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ) ) ); + makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ), + "AnimationAudioNode::deactivate without delay") ); } } @@ -127,7 +129,8 @@ void AnimationAudioNode::deactivate_st( NodeState /*eDestState*/ ) getContext().mrEventQueue.addEvent( makeEvent( boost::bind( &EventMultiplexer::notifyAudioStopped, boost::ref(getContext().mrEventMultiplexer), - getSelf() ) ) ); + getSelf() ), + "AnimationAudioNode::notifyAudioStopped") ); } bool AnimationAudioNode::hasPendingAnimation() const diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx index 82868063fefa..19a6df2a8244 100644 --- a/slideshow/source/engine/animationnodes/animationbasenode.cxx +++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx @@ -456,7 +456,8 @@ AnimationBaseNode::fillCommonParameters() const EventSharedPtr pEndEvent; if (pSelf) { pEndEvent = makeEvent( - boost::bind( &AnimationNode::deactivate, pSelf ) ); + boost::bind( &AnimationNode::deactivate, pSelf ), + "AnimationBaseNode::deactivate"); } // Calculate the minimum frame count that depends on the duration and diff --git a/slideshow/source/engine/animationnodes/animationcommandnode.cxx b/slideshow/source/engine/animationnodes/animationcommandnode.cxx index f9104f37a45a..2adbe2b9b75a 100644 --- a/slideshow/source/engine/animationnodes/animationcommandnode.cxx +++ b/slideshow/source/engine/animationnodes/animationcommandnode.cxx @@ -124,7 +124,8 @@ void AnimationCommandNode::activate_st() // deactivate ASAP: scheduleDeactivationEvent( - makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ) ) ); + makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ), + "AnimationCommandNode::deactivate" ) ); } bool AnimationCommandNode::hasPendingAnimation() const diff --git a/slideshow/source/engine/animationnodes/animationsetnode.cxx b/slideshow/source/engine/animationnodes/animationsetnode.cxx index f7669b7214d3..ba1f015cd4fe 100644 --- a/slideshow/source/engine/animationnodes/animationsetnode.cxx +++ b/slideshow/source/engine/animationnodes/animationsetnode.cxx @@ -80,7 +80,8 @@ AnimationActivitySharedPtr AnimationSetNode::createActivity() const pSelf, "cannot cast getSelf() to my type!" ); aParms.mpEndEvent = makeEvent( boost::bind( &AnimationSetNode::implScheduleDeactivationEvent, - pSelf ) ); + pSelf ), + "AnimationSetNode::implScheduleDeactivationEvent"); } switch (AnimationFactory::classifyAttributeName( attrName )) { diff --git a/slideshow/source/engine/animationnodes/basenode.cxx b/slideshow/source/engine/animationnodes/basenode.cxx index 9f74a75fd571..6ad15e43462f 100644 --- a/slideshow/source/engine/animationnodes/basenode.cxx +++ b/slideshow/source/engine/animationnodes/basenode.cxx @@ -50,6 +50,7 @@ #include "tools.hxx" #include "nodetools.hxx" #include "generateevent.hxx" +#include "debug.hxx" #include #include @@ -312,6 +313,10 @@ public: mpNode->meCurrState = meToState; clear(); } + + // Uncomment the following line to write the node tree to file on + // every state change of one of its nodes. + // Debug_ShowNodeTree(mpNode->mpSelf); } void clear() { @@ -488,7 +493,9 @@ bool BaseNode::resolve() // schedule delayed activation event. Take iterate node // timeout into account mpCurrentEvent = makeDelay( - boost::bind( &AnimationNode::activate, mpSelf ), mnStartDelay ); + boost::bind( &AnimationNode::activate, mpSelf ), + mnStartDelay, + "AnimationNode::activate with delay"); maContext.mrEventQueue.addEvent( mpCurrentEvent ); } diff --git a/slideshow/source/engine/animationnodes/generateevent.cxx b/slideshow/source/engine/animationnodes/generateevent.cxx index 0983019dafef..015db5586834 100644 --- a/slideshow/source/engine/animationnodes/generateevent.cxx +++ b/slideshow/source/engine/animationnodes/generateevent.cxx @@ -111,7 +111,9 @@ EventSharedPtr generateEvent( case animations::EventTrigger::BEGIN_EVENT: // try to extract XAnimationNode event source if (aEvent.Source >>= xNode) { - pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay ); + pEvent = makeDelay( rFunctor, + nDelay2 + nAdditionalDelay, + "generateEvent, BEGIN_EVENT"); rContext.mrUserEventQueue.registerAnimationStartEvent( pEvent, xNode ); } @@ -123,7 +125,9 @@ EventSharedPtr generateEvent( case animations::EventTrigger::END_EVENT: // try to extract XAnimationNode event source if (aEvent.Source >>= xNode) { - pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay ); + pEvent = makeDelay( rFunctor, + nDelay2 + nAdditionalDelay, + "generateEvent, END_EVENT"); rContext.mrUserEventQueue.registerAnimationEndEvent( pEvent, xNode ); } @@ -137,7 +141,9 @@ EventSharedPtr generateEvent( if ((aEvent.Source >>= xShape) && (pShape = rContext.mpSubsettableShapeManager->lookupShape(xShape)).get()) { - pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay ); + pEvent = makeDelay( rFunctor, + nDelay2 + nAdditionalDelay, + "generateEvent, ON_CLICK"); rContext.mrUserEventQueue.registerShapeClickEvent( pEvent, pShape ); } @@ -151,7 +157,9 @@ EventSharedPtr generateEvent( if ((aEvent.Source >>= xShape) && (pShape = rContext.mpSubsettableShapeManager->lookupShape(xShape)).get()) { - pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay ); + pEvent = makeDelay( rFunctor, + nDelay2 + nAdditionalDelay, + "generateEvent, ON_DBL_CLICK"); rContext.mrUserEventQueue.registerShapeDoubleClickEvent( pEvent, pShape ); } @@ -165,7 +173,9 @@ EventSharedPtr generateEvent( if ((aEvent.Source >>= xShape) && (pShape = rContext.mpSubsettableShapeManager->lookupShape(xShape)).get()) { - pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay ); + pEvent = makeDelay( rFunctor, + nDelay2 + nAdditionalDelay, + "generateEvent, ON_MOUSE_ENTER"); rContext.mrUserEventQueue.registerMouseEnterEvent( pEvent, pShape ); } @@ -179,7 +189,9 @@ EventSharedPtr generateEvent( if ((aEvent.Source >>= xShape) && (pShape = rContext.mpSubsettableShapeManager->lookupShape(xShape)).get()) { - pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay ); + pEvent = makeDelay( rFunctor, + nDelay2 + nAdditionalDelay, + "generateEvent, ON_MOUSE_LEAVE"); rContext.mrUserEventQueue.registerMouseLeaveEvent( pEvent, pShape ); } @@ -193,13 +205,17 @@ EventSharedPtr generateEvent( "mapped to ON_NEXT!" ); // FALLTHROUGH intended case animations::EventTrigger::ON_NEXT: - pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay ); + pEvent = makeDelay( rFunctor, + nDelay2 + nAdditionalDelay, + "generateEvent, ON_NEXT"); rContext.mrUserEventQueue.registerNextEffectEvent( pEvent ); break; case animations::EventTrigger::ON_STOP_AUDIO: // try to extract XAnimationNode event source if (aEvent.Source >>= xNode) { - pEvent = makeDelay( rFunctor, nDelay2 + nAdditionalDelay ); + pEvent = makeDelay( rFunctor, + nDelay2 + nAdditionalDelay, + "generateEvent, ON_STOP_AUDIO"); rContext.mrUserEventQueue.registerAudioStoppedEvent( pEvent, xNode ); } @@ -218,7 +234,9 @@ EventSharedPtr generateEvent( "not yet implemented!" ); } else if (rEventDescription >>= nDelay1) { - pEvent = makeDelay( rFunctor, nDelay1 + nAdditionalDelay ); + pEvent = makeDelay( rFunctor, + nDelay1 + nAdditionalDelay, + "generateEvent with delay"); // schedule delay event rContext.mrEventQueue.addEvent( pEvent ); } diff --git a/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx b/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx index 0bd4c524586e..0581c78e9c47 100644 --- a/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx +++ b/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx @@ -53,7 +53,8 @@ void ParallelTimeContainer::activate_st() if (isDurationIndefinite() && maChildren.empty()) { // deactivate ASAP: scheduleDeactivationEvent( - makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ) ) ); + makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ), + "ParallelTimeContainer::deactivate") ); } else { // use default scheduleDeactivationEvent(); diff --git a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx index e841c8e667de..bf0cba0cfe64 100644 --- a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx +++ b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx @@ -63,7 +63,8 @@ void SequentialTimeContainer::activate_st() { // deactivate ASAP: scheduleDeactivationEvent( - makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ) ) ); + makeEvent( boost::bind( &AnimationNode::deactivate, getSelf() ), + "SequentialTimeContainer::deactivate") ); } else // use default scheduleDeactivationEvent(); @@ -89,7 +90,8 @@ void SequentialTimeContainer::skipEffect( // empty all events ignoring timings => until next effect getContext().mrEventQueue.forceEmpty(); getContext().mrEventQueue.addEvent( - makeEvent( boost::bind(&AnimationNode::deactivate, pChildNode) ) ); + makeEvent( boost::bind(&AnimationNode::deactivate, pChildNode), + "SequentialTimeContainer::deactivate, skipEffect with delay") ); } else OSL_ENSURE( false, "unknown notifier!" ); @@ -116,12 +118,14 @@ bool SequentialTimeContainer::resolveChild( mpCurrentSkipEvent = makeEvent( boost::bind( &SequentialTimeContainer::skipEffect, boost::dynamic_pointer_cast( getSelf() ), - pChildNode ) ); + pChildNode ), + "SequentialTimeContainer::skipEffect, resolveChild"); // event that will reresolve the resolved/activated child: mpCurrentRewindEvent = makeEvent( boost::bind( &SequentialTimeContainer::rewindEffect, boost::dynamic_pointer_cast( getSelf() ), - pChildNode ) ); + pChildNode ), + "SequentialTimeContainer::rewindEffect, resolveChild"); // deactivate child node when skip event occurs: getContext().mrUserEventQueue.registerSkipEffectEvent( diff --git a/slideshow/source/engine/debug.cxx b/slideshow/source/engine/debug.cxx new file mode 100644 index 000000000000..36bb8c9e106b --- /dev/null +++ b/slideshow/source/engine/debug.cxx @@ -0,0 +1,328 @@ +/************************************************************************* + * + * 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: layer.hxx,v $ + * $Revision: 1.3 $ + * + * 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. + * + ************************************************************************/ + +#include "precompiled_slideshow.hxx" + +#include "debug.hxx" +#include "animationnodes/basecontainernode.hxx" +#include "animationnodes/paralleltimecontainer.hxx" +#include "animationnodes/sequentialtimecontainer.hxx" +#include "animationnodes/animationtransitionfilternode.hxx" +#include "animationnodes/animationaudionode.hxx" +#include "animationnodes/animationcolornode.hxx" +#include "animationnodes/animationcommandnode.hxx" +#include "animationnodes/animationpathmotionnode.hxx" +#include "animationnodes/animationsetnode.hxx" +#include "animationnodes/animationtransformnode.hxx" +#include "animationnodes/propertyanimationnode.hxx" + +#include +#include + +#include +#include + +using ::rtl::OUString; +using namespace ::com::sun::star; + +namespace slideshow { namespace internal { + +#if OSL_DEBUG_LEVEL > 1 + +namespace { + +class NodeContainer : public BaseContainerNode +{ +public: + void ShowChildrenState (void) const; +}; + + + + +OUString DebugGetDescription (const AnimationNodeSharedPtr& rpNode) +{ + if (::boost::dynamic_pointer_cast(rpNode)) + { + // Node is a container. + if (::boost::dynamic_pointer_cast(rpNode)) + return OUString::createFromAscii("ParallelTimeContainer"); + else if (::boost::dynamic_pointer_cast(rpNode)) + return OUString::createFromAscii("SequentialTimeContainer"); + else + return OUString::createFromAscii(""); + } + else if (::boost::dynamic_pointer_cast(rpNode)) + return OUString::createFromAscii("AnimationTransitionFilterNode"); + else if (::boost::dynamic_pointer_cast(rpNode)) + return OUString::createFromAscii("AnimationAudioNode"); + else if (::boost::dynamic_pointer_cast(rpNode)) + return OUString::createFromAscii("AnimationColorNode"); + else if (::boost::dynamic_pointer_cast(rpNode)) + return OUString::createFromAscii("AnimationCommandNode"); + else if (::boost::dynamic_pointer_cast(rpNode)) + return OUString::createFromAscii("AnimationPathMotionNode"); + else if (::boost::dynamic_pointer_cast(rpNode)) + return OUString::createFromAscii("AnimationSetNode"); + else if (::boost::dynamic_pointer_cast(rpNode)) + return OUString::createFromAscii("AnimationTransformNode"); + else if (::boost::dynamic_pointer_cast(rpNode)) + return OUString::createFromAscii("PropertyAnimationNode"); + else + return OUString::createFromAscii(""); +} + + + + +void DebugShowState (const AnimationNodeSharedPtr& rpNode) +{ + if ( ! rpNode) + return; + + OUString sState; + OUString sStateColor; + switch (rpNode->getState()) + { + default: + case AnimationNode::INVALID: + sState = OUString::createFromAscii("Invalid"); + sStateColor = OUString::createFromAscii("firebrick1"); + break; + case AnimationNode::UNRESOLVED: + sState = OUString::createFromAscii("Unresolved"); + sStateColor = OUString::createFromAscii("dodgerblue4"); + break; + case AnimationNode::RESOLVED: + sState = OUString::createFromAscii("Resolved"); + sStateColor = OUString::createFromAscii("dodgerblue"); + break; + case AnimationNode::ACTIVE: + sState = OUString::createFromAscii("Active"); + sStateColor = OUString::createFromAscii("seagreen1"); + break; + case AnimationNode::FROZEN: + sState = OUString::createFromAscii("Frozen"); + sStateColor = OUString::createFromAscii("lightskyblue1"); + break; + case AnimationNode::ENDED: + sState = OUString::createFromAscii("Ended"); + sStateColor = OUString::createFromAscii("slategray3"); + break; + } + + const uno::Any aBegin (rpNode->getXAnimationNode()->getBegin()); + OUString sTrigger; + if (aBegin.hasValue()) + { + animations::Event aEvent; + double nTimeOffset; + const static char* sEventTriggers[] = { + "NONE", "ON_BEGIN", "ON_END", "BEGIN_EVENT", "END_EVENT", "ON_CLICK", + "ON_DBL_CLICK", "ON_MOUSE_ENTER", "ON_MOUSE_LEAVE", "ON_NEXT", "ON_PREV", + "ON_STOP_AUDIO", "REPEAT"}; + if (aBegin >>= aEvent) + { + sTrigger = OUString::createFromAscii(sEventTriggers[aEvent.Trigger]); + } + else if (aBegin >>= nTimeOffset) + { + sTrigger = OUString::valueOf(nTimeOffset); + } + else + { + sTrigger = OUString::createFromAscii("other"); + } + } + else + sTrigger = ::rtl::OUString::createFromAscii("void"); + + TRACE("Node state: n%x [label=\"%x / %x / %s\\n%s\\n%s\",style=filled,fillcolor=\"%s\"]\r", + rpNode.get(), + rpNode.get(), + rpNode->getXAnimationNode().get(), + ::rtl::OUStringToOString(sState, RTL_TEXTENCODING_ASCII_US).getStr(), + ::rtl::OUStringToOString(DebugGetDescription(rpNode), RTL_TEXTENCODING_ASCII_US).getStr(), + ::rtl::OUStringToOString(sTrigger, RTL_TEXTENCODING_ASCII_US).getStr(), + ::rtl::OUStringToOString(sStateColor, RTL_TEXTENCODING_ASCII_US).getStr()); + + BaseContainerNodeSharedPtr pContainer ( + ::boost::dynamic_pointer_cast(rpNode)); + if (pContainer) + ::boost::static_pointer_cast(rpNode)->ShowChildrenState(); +} + + + + +void NodeContainer::ShowChildrenState (void) const +{ + for (std::size_t nIndex=0; nIndex n%x", this, maChildren[nIndex].get()); + DebugShowState(maChildren[nIndex]); + } +} + + + + +AnimationNodeSharedPtr DebugGetTreeRoot (const BaseNodeSharedPtr& rpNode) +{ + BaseNodeSharedPtr pNode (rpNode); + if (pNode) + { + BaseNodeSharedPtr pParent (pNode->getParentNode()); + while (pParent) + { + pNode = pParent; + pParent = pNode->getParentNode(); + } + } + return pNode; +} + +} // end of anonymous namespace + + + + +void Debug_ShowNodeTree (const AnimationNodeSharedPtr& rpNode) +{ + DebugTraceScope aTraceScope ("NodeTree"); + + DebugShowState(DebugGetTreeRoot(::boost::dynamic_pointer_cast(rpNode))); +} + +#endif // OSL_DEBUG_LEVEL > 1 + + + + +//----- Tracing --------------------------------------------------------------- + +#if OSL_DEBUG_LEVEL > 1 + +extern "C" { + + namespace { + + class TraceData + { + public: + TraceData (void) + : mnIndentation(0), + mpFile(fopen(TRACE_LOG_FILE_NAME, "w")), + maTime() + { + } + + int mnIndentation; + FILE* mpFile; + ::canvas::tools::ElapsedTime maTime; + }; + static TraceData gTraceData; + + inline void SAL_CALL DebugTrace ( + const int nIndentationOffset, + const sal_Char* sFormat, + va_list args) + { + if (gTraceData.mpFile != NULL) + { + // Write line head with current time and indentation. + // Adapt indentation. + if (nIndentationOffset < 0) + gTraceData.mnIndentation += nIndentationOffset; + fprintf(gTraceData.mpFile, "%10.8f ", gTraceData.maTime.getElapsedTime()); + for (int nIndentation=0; nIndentation 0) + gTraceData.mnIndentation += nIndentationOffset; + + // Write message. + vfprintf(gTraceData.mpFile, sFormat, args); + fprintf(gTraceData.mpFile, "\n"); + fflush(gTraceData.mpFile); + } + } + +} // end of anonymous namespace + + +} // end of extern "C" + +void SAL_CALL DebugTraceBegin (const sal_Char* sFormat, ...) +{ + va_list args; + va_start(args, sFormat); + DebugTrace(+1,sFormat, args); + va_end(args); +} + +void SAL_CALL DebugTraceEnd (const sal_Char* sFormat, ...) +{ + va_list args; + va_start(args, sFormat); + DebugTrace(-1,sFormat, args); + va_end(args); +} + +void SAL_CALL DebugTraceMessage (const sal_Char* sFormat, ...) +{ + va_list args; + va_start(args, sFormat); + DebugTrace(0,sFormat, args); + va_end(args); +} + + + +DebugTraceScope::DebugTraceScope (const sal_Char* sFormat, ...) + : msMessage(new sal_Char[mnBufferSize]) +{ + va_list args; + va_start(args, sFormat); + + msMessage[mnBufferSize-1] = 0; + _vsnprintf(msMessage, mnBufferSize-1, sFormat, args); + TRACE_BEGIN("[ %s", msMessage); + va_end(args); +} + +DebugTraceScope::~DebugTraceScope (void) +{ + TRACE_END("] %s", msMessage); + delete [] msMessage; +} + +#endif // OSL_DEBUG_LEVEL > 1 + +} } diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx index 59db7ba50615..3f6ceb54bb8e 100644 --- a/slideshow/source/engine/effectrewinder.cxx +++ b/slideshow/source/engine/effectrewinder.cxx @@ -213,7 +213,8 @@ bool EffectRewinder::rewind ( ::boost::bind( &EffectRewinder::asynchronousRewindToPreviousSlide, this, - rPreviousSlideFunctor)); + rPreviousSlideFunctor), + "EffectRewinder::asynchronousRewindToPreviousSlide"); } else { @@ -225,7 +226,8 @@ bool EffectRewinder::rewind ( this, nSkipCount, true, - rSlideRewindFunctor)); + rSlideRewindFunctor), + "EffectRewinder::asynchronousRewind"); } if (mpAsynchronousRewindEvent) @@ -253,7 +255,8 @@ void EffectRewinder::skipAllMainSequenceEffects (void) this, nTotalMainSequenceEffectCount, false, - ::boost::function())); + ::boost::function()), + "EffectRewinder::asynchronousRewind"); mrEventQueue.addEvent(mpAsynchronousRewindEvent); } @@ -391,7 +394,8 @@ void EffectRewinder::asynchronousRewind ( this, nEffectCount, false, - rSlideRewindFunctor)); + rSlideRewindFunctor), + "EffectRewinder::asynchronousRewind"); mrEventQueue.addEvent(mpAsynchronousRewindEvent); } else diff --git a/slideshow/source/engine/eventmultiplexer.cxx b/slideshow/source/engine/eventmultiplexer.cxx index a75d9c017987..d62a7946d3c7 100644 --- a/slideshow/source/engine/eventmultiplexer.cxx +++ b/slideshow/source/engine/eventmultiplexer.cxx @@ -369,7 +369,8 @@ void SAL_CALL EventMultiplexerListener::mousePressed( mpEventQueue->addEvent( makeEvent( boost::bind( &EventMultiplexerImpl::mousePressed, mpEventMultiplexer, - e ) ) ); + e ), + "EventMultiplexerImpl::mousePressed") ); } void SAL_CALL EventMultiplexerListener::mouseReleased( @@ -383,7 +384,8 @@ void SAL_CALL EventMultiplexerListener::mouseReleased( mpEventQueue->addEvent( makeEvent( boost::bind( &EventMultiplexerImpl::mouseReleased, mpEventMultiplexer, - e ) ) ); + e ), + "EventMultiplexerImpl::mouseReleased") ); } void SAL_CALL EventMultiplexerListener::mouseEntered( @@ -410,7 +412,8 @@ void SAL_CALL EventMultiplexerListener::mouseDragged( mpEventQueue->addEvent( makeEvent( boost::bind( &EventMultiplexerImpl::mouseDragged, mpEventMultiplexer, - e )) ); + e ), + "EventMultiplexerImpl::mouseDragged") ); } void SAL_CALL EventMultiplexerListener::mouseMoved( @@ -424,7 +427,8 @@ void SAL_CALL EventMultiplexerListener::mouseMoved( mpEventQueue->addEvent( makeEvent( boost::bind( &EventMultiplexerImpl::mouseMoved, mpEventMultiplexer, - e )) ); + e ), + "EventMultiplexerImpl::mouseMoved") ); } @@ -528,7 +532,8 @@ void EventMultiplexerImpl::scheduleTick() EventSharedPtr pEvent( makeDelay( boost::bind( &EventMultiplexerImpl::tick, this ), - mnTimeout )); + mnTimeout, + "EventMultiplexerImpl::tick with delay")); // store weak reference to generated event, to notice when // the event queue gets cleansed (we then have to diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx index cda03ff0c150..ee92e5df27d6 100644 --- a/slideshow/source/engine/eventqueue.cxx +++ b/slideshow/source/engine/eventqueue.cxx @@ -35,6 +35,7 @@ #include #include #include +#include "debug.hxx" #include #include @@ -104,6 +105,12 @@ namespace slideshow { ::osl::MutexGuard aGuard( maMutex ); +#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) + OSL_TRACE("adding event at %x [%s] with delay %f\r", + rEvent.get(), + OUStringToOString(rEvent->GetDescription(), RTL_TEXTENCODING_UTF8).getStr(), + rEvent->getActivationTime(0.0)); +#endif ENSURE_OR_RETURN( rEvent, "EventQueue::addEvent: event ptr NULL" ); @@ -125,6 +132,13 @@ namespace slideshow { ::osl::MutexGuard aGuard( maMutex ); +#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) + OSL_TRACE("adding event at %x [%s] for next round with delay %f\r", + rEvent.get(), + OUStringToOString(rEvent->GetDescription(), RTL_TEXTENCODING_UTF8).getStr(), + rEvent->getActivationTime(0.0)); +#endif + ENSURE_OR_RETURN( rEvent.get() != NULL, "EventQueue::addEvent: event ptr NULL" ); maNextEvents.push_back( @@ -137,6 +151,13 @@ namespace slideshow { ::osl::MutexGuard aGuard( maMutex ); +#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) + OSL_TRACE("adding event at %x [%s] for execution when queue is empty with delay %f\r", + rpEvent.get(), + OUStringToOString(rpEvent->GetDescription(), RTL_TEXTENCODING_UTF8).getStr(), + rpEvent->getActivationTime(0.0)); +#endif + ENSURE_OR_RETURN( rpEvent.get() != NULL, "EventQueue::addEvent: event ptr NULL"); @@ -217,6 +238,13 @@ namespace slideshow event.pEvent.get(), event.pEvent->getActivationTime(0.0) ); #endif +#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) + OSL_TRACE("firing event at %x [%s] with delay %f\r", + event.pEvent.get(), + OUStringToOString(event.pEvent->GetDescription(), + RTL_TEXTENCODING_UTF8).getStr(), + event.pEvent->getActivationTime(0.0)); +#endif event.pEvent->fire(); } diff --git a/slideshow/source/engine/makefile.mk b/slideshow/source/engine/makefile.mk index 8316355c68a4..1165ba93467e 100644 --- a/slideshow/source/engine/makefile.mk +++ b/slideshow/source/engine/makefile.mk @@ -88,7 +88,8 @@ SLOFILES = $(SLO)$/activitiesqueue.obj \ $(SLO)$/unoviewcontainer.obj \ $(SLO)$/usereventqueue.obj \ $(SLO)$/waitsymbol.obj \ - $(SLO)$/wakeupevent.obj + $(SLO)$/wakeupevent.obj \ + $(SLO)$/debug.obj .IF "$(debug)"!="" || "$(DEBUG)"!="" SLOFILES += $(SLO)$/sp_debug.obj diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx b/slideshow/source/engine/rehearsetimingsactivity.cxx index f8e9cf2f8e6c..c17dadc3ac5b 100644 --- a/slideshow/source/engine/rehearsetimingsactivity.cxx +++ b/slideshow/source/engine/rehearsetimingsactivity.cxx @@ -72,6 +72,9 @@ public: WakeupEvent( boost::shared_ptr< ::canvas::tools::ElapsedTime > const& pTimeBase, ActivitySharedPtr const& rActivity, ActivitiesQueue & rActivityQueue ) : +#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) + Event(::rtl::OUString::createFromAscii("WakeupEvent")), +#endif maTimer(pTimeBase), mnNextTime(0.0), mpActivity(rActivity), diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 5ace44acda65..1ab20f7f294e 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -504,7 +504,8 @@ struct SlideShowImpl::SeparateListenerImpl : public EventHandler, // in recursion. mrEventQueue.addEvent( makeEvent( boost::bind( &SlideShowImpl::notifySlideAnimationsEnded, - boost::ref(mrShow) ))); + boost::ref(mrShow) ), + "SlideShowImpl::notifySlideAnimationsEnded")); return true; } @@ -831,7 +832,8 @@ ActivitySharedPtr SlideShowImpl::createSlideTransition( &::slideshow::internal::Animation::prefetch, pTransition, AnimatableShapeSharedPtr(), - ShapeAttributeLayerSharedPtr()))); + ShapeAttributeLayerSharedPtr()), + "Animation::prefetch")); return ActivitySharedPtr( ActivitiesFactory::createSimpleActivity( @@ -1096,7 +1098,8 @@ void SlideShowImpl::displaySlide( boost::bind( &SlideShowImpl::notifySlideTransitionEnded, this, - false )))); + false ), + "SlideShowImpl::notifySlideTransitionEnded"))); if (bSkipSlideTransition) { @@ -1121,7 +1124,8 @@ void SlideShowImpl::displaySlide( boost::bind( &SlideShowImpl::notifySlideTransitionEnded, this, - true ))); + true ), + "SlideShowImpl::notifySlideTransitionEnded")); } } } // finally @@ -1159,7 +1163,8 @@ void SlideShowImpl::redisplayCurrentSlide (void) boost::bind( &SlideShowImpl::notifySlideTransitionEnded, this, - true ))); + true ), + "SlideShowImpl::notifySlideTransitionEnded")); maEventMultiplexer.notifySlideTransitionStarted(); maListenerContainer.forEach( @@ -1777,6 +1782,7 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout ) maActivitiesQueue.processDequeued(); // commit frame to screen + maFrameSynchronization.Synchronize(); maScreenUpdater.commitUpdates(); } // Time held until here @@ -1979,7 +1985,8 @@ void SlideShowImpl::notifySlideAnimationsEnded() // timeout involved. aNotificationEvents.mpImmediateEvent = makeEvent( boost::bind( - &SlideShowImpl::notifySlideEnded, this, false ) ); + &SlideShowImpl::notifySlideEnded, this, false ), + "SlideShowImpl::notifySlideEnded"); } } diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx index 29ff302a7a77..dcca4a51b4d7 100644 --- a/slideshow/source/engine/slideview.cxx +++ b/slideshow/source/engine/slideview.cxx @@ -1085,7 +1085,8 @@ void SlideView::modified( const lang::EventObject& /*aEvent*/ ) makeEvent( boost::bind( (bool (EventMultiplexer::*)( const uno::Reference&)) &EventMultiplexer::notifyViewChanged, - boost::ref(mrEventMultiplexer), mxView ))); + boost::ref(mrEventMultiplexer), mxView ), + "EventMultiplexer::notifyViewChanged")); } // XPaintListener @@ -1100,7 +1101,8 @@ void SlideView::windowPaint( const awt::PaintEvent& /*e*/ ) // this might not be the main thread! mrEventQueue.addEvent( makeEvent( boost::bind( &EventMultiplexer::notifyViewClobbered, - boost::ref(mrEventMultiplexer), mxView ) ) ); + boost::ref(mrEventMultiplexer), mxView ), + "EventMultiplexer::notifyViewClobbered") ); } void SlideView::updateCanvas() diff --git a/slideshow/source/engine/usereventqueue.cxx b/slideshow/source/engine/usereventqueue.cxx index 2e6a8dbeb79e..95ff86ab200b 100644 --- a/slideshow/source/engine/usereventqueue.cxx +++ b/slideshow/source/engine/usereventqueue.cxx @@ -330,7 +330,8 @@ private: // next effect listeners: if(fireAllEvents( maEvents, mrEventQueue )) { - makeEvent(::boost::bind(&EventQueue::forceEmpty, ::boost::ref(mrEventQueue))); + makeEvent(::boost::bind(&EventQueue::forceEmpty, ::boost::ref(mrEventQueue)), + "EventQueue::forceEmpty"); if (mbSkipTriggersNextEffect && bNotifyNextEffect) { // then simulate a next effect event: this skip effect @@ -340,9 +341,9 @@ private: // someone has registerered above for next effects // (multiplexer prio=0) at the user event queue. return mrEventQueue.addEventWhenQueueIsEmpty( - makeEvent( boost::bind( - &EventMultiplexer::notifyNextEffect, - boost::ref(mrEventMultiplexer) ) ) ); + makeEvent( boost::bind( &EventMultiplexer::notifyNextEffect, + boost::ref(mrEventMultiplexer) ), + "EventMultiplexer::notifyNextEffect") ); } else return true; diff --git a/slideshow/source/engine/wakeupevent.cxx b/slideshow/source/engine/wakeupevent.cxx index 0b30510f9cb3..31ea8956c17b 100644 --- a/slideshow/source/engine/wakeupevent.cxx +++ b/slideshow/source/engine/wakeupevent.cxx @@ -45,6 +45,9 @@ namespace slideshow WakeupEvent::WakeupEvent( boost::shared_ptr const & pTimeBase, ActivitiesQueue& rActivityQueue ) : +#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) + Event(::rtl::OUString::createFromAscii("WakeupEvent")), +#endif maTimer(pTimeBase), mnNextTime(0.0), mpActivity(), diff --git a/slideshow/source/inc/debug.hxx b/slideshow/source/inc/debug.hxx new file mode 100644 index 000000000000..e9c501ca58aa --- /dev/null +++ b/slideshow/source/inc/debug.hxx @@ -0,0 +1,87 @@ +/************************************************************************* + * + * 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: layer.hxx,v $ + * $Revision: 1.3 $ + * + * 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_DEBUG_HXX +#define INCLUDED_SLIDESHOW_DEBUG_HXX + +#include "animationnode.hxx" + +namespace slideshow { namespace internal { + +#if OSL_DEBUG_LEVEL > 1 +void Debug_ShowNodeTree (const AnimationNodeSharedPtr& rpNode); +#endif + +// Uncomment the following line to define +// SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS +// in order to add descriptions to Event objects that help debugging event +// base problems. +#define SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS + + +#if OSL_DEBUG_LEVEL > 1 + +// Change this to a valid filename. The file is created anew with every +// office start (and execution of at least one TRACE... command.) +#define TRACE_LOG_FILE_NAME "d:\\tmp\\log.txt" + +class DebugTraceScope +{ +public: + DebugTraceScope (const sal_Char* sFormat, ...); + ~DebugTraceScope (void); +private: + static const sal_Int32 mnBufferSize = 512; + sal_Char* msMessage; +}; + +void SAL_CALL DebugTraceBegin (const sal_Char* sFormat, ...); +void SAL_CALL DebugTraceEnd (const sal_Char* sFormat, ...); +void SAL_CALL DebugTraceMessage (const sal_Char* sFormat, ...); + +#define TRACE_BEGIN DebugTraceBegin +#define TRACE_END DebugTraceEnd +#define TRACE DebugTraceMessage +#define TRACE_SCOPE DebugTraceScope aTraceScope + +#else // OSL_DEBUG_LEVEL > 1 + +#define TRACE_BEGIN 1 ? ((void)0) : DebugTraceBegin +#define TRACE_END 1 ? ((void)0) : DebugTraceEnd +#define TRACE 1 ? ((void)0) : DebugTraceMessage +#define TRACE_SCOPE + +#endif // OSL_DEBUG_LEVEL > 1 + + +} } + + +#endif diff --git a/slideshow/source/inc/delayevent.hxx b/slideshow/source/inc/delayevent.hxx index 29ef713f6550..458d5f9c0a0e 100644 --- a/slideshow/source/inc/delayevent.hxx +++ b/slideshow/source/inc/delayevent.hxx @@ -31,6 +31,7 @@ #define INCLUDED_SLIDESHOW_DELAYEVENT_HXX #include "event.hxx" +#include "debug.hxx" #include #include #if defined(VERBOSE) && defined(DBG_UTIL) @@ -48,16 +49,23 @@ public: typedef ::boost::function0 FunctorT; template - Delay( FuncT const& func, double nTimeout ) - : mnTimeout(nTimeout), maFunc(func), mbWasFired(false) {} + Delay( FuncT const& func, + double nTimeout +#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) + , const ::rtl::OUString& rsDescription + ) : Event(rsDescription), +#else + ) : +#endif + mnTimeout(nTimeout), maFunc(func), mbWasFired(false) {} -#if defined(VERBOSE) && defined(DBG_UTIL) Delay( const boost::function0& func, - double nTimeout, - char const* const ) : + double nTimeout +#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) + , const ::rtl::OUString& rsDescription + ) : Event(rsDescription), #else - Delay( const boost::function0& func, - double nTimeout ) : + ) : #endif mnTimeout(nTimeout), maFunc(func), @@ -76,7 +84,7 @@ private: bool mbWasFired; }; -#if OSL_DEBUG_LEVEL < 1 +#if OSL_DEBUG_LEVEL <= 1 /** Generate delay event @@ -89,7 +97,7 @@ private: @return generated delay event */ template -inline EventSharedPtr makeDelay( FuncT const& func, double nTimeout ) +inline EventSharedPtr makeDelay_( FuncT const& func, double nTimeout ) { return EventSharedPtr( new Delay( func, nTimeout ) ); } @@ -102,19 +110,29 @@ inline EventSharedPtr makeDelay( FuncT const& func, double nTimeout ) @return generated immediate event. */ template -inline EventSharedPtr makeEvent( FuncT const& func ) +inline EventSharedPtr makeEvent_( FuncT const& func ) { return EventSharedPtr( new Delay( func, 0.0 ) ); } + +// Strip away description. +#define makeDelay(f, t, d) makeDelay_(f, t) +#define makeEvent(f, d) makeEvent_(f) + #else // OSL_DEBUG_LEVEL > 1 class Delay_ : public Delay { public: template Delay_( FuncT const& func, double nTimeout, - char const* from_function, char const* from_file, int from_line ) - : Delay(func, nTimeout), + char const* from_function, char const* from_file, int from_line, + const ::rtl::OUString& rsDescription ) + : Delay(func, nTimeout +#if defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) + , rsDescription +#endif + ), FROM_FUNCTION(from_function), FROM_FILE(from_file), FROM_LINE(from_line) {} @@ -126,16 +144,31 @@ public: template inline EventSharedPtr makeDelay_( FuncT const& func, double nTimeout, - char const* from_function, char const* from_file, int from_line ) + char const* from_function, char const* from_file, int from_line, + const ::rtl::OUString& rsDescription ) { return EventSharedPtr( new Delay_( func, nTimeout, - from_function, from_file, from_line ) ); + from_function, from_file, from_line, rsDescription ) ); } -#define makeDelay(f, t) makeDelay_(f, t, \ -BOOST_CURRENT_FUNCTION, __FILE__, __LINE__) -#define makeEvent(f) makeDelay_(f, 0.0, \ -BOOST_CURRENT_FUNCTION, __FILE__, __LINE__) +#if defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) + +#define makeDelay(f, t, d) makeDelay_(f, t, \ + BOOST_CURRENT_FUNCTION, __FILE__, __LINE__, \ + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(d))) +#define makeEvent(f, d) makeDelay_(f, 0.0, \ + BOOST_CURRENT_FUNCTION, __FILE__, __LINE__, \ + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(d))) + +#else + +#define makeDelay(f, t, d) makeDelay_(f, t, \ + BOOST_CURRENT_FUNCTION, __FILE__, __LINE__) +#define makeEvent(f, d) makeDelay_(f, 0.0, \ + BOOST_CURRENT_FUNCTION, __FILE__, __LINE__) + +#endif + #endif // OSL_DEBUG_LEVEL < 1 diff --git a/slideshow/source/inc/event.hxx b/slideshow/source/inc/event.hxx index 80e825cc8049..c609c3e814a5 100644 --- a/slideshow/source/inc/event.hxx +++ b/slideshow/source/inc/event.hxx @@ -31,7 +31,8 @@ #define INCLUDED_SLIDESHOW_EVENT_HXX #include "disposable.hxx" - +#include "debug.hxx" +#include #include #include @@ -43,6 +44,10 @@ namespace internal { class Event : public Disposable { public: +#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) + Event (const ::rtl::OUString& rsDescription) : msDescription(rsDescription) {}; +#endif + /** Execute the event. @return true, if event was successfully executed. @@ -72,6 +77,13 @@ public: event is to be fired. */ virtual double getActivationTime( double nCurrentTime ) const = 0; + +#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) + ::rtl::OUString GetDescription (void) const { return msDescription; } + +private: + const ::rtl::OUString msDescription; +#endif }; typedef ::boost::shared_ptr< Event > EventSharedPtr; diff --git a/slideshow/source/inc/interruptabledelayevent.hxx b/slideshow/source/inc/interruptabledelayevent.hxx index 96795dfa51d4..d983d3ba6cff 100644 --- a/slideshow/source/inc/interruptabledelayevent.hxx +++ b/slideshow/source/inc/interruptabledelayevent.hxx @@ -49,6 +49,9 @@ namespace slideshow public: DelayFacade( const EventSharedPtr& rEvent, double nTimeout ) : +#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) + Event(::rtl::OUString::createFromAscii("DelayFacade")), +#endif mpEvent( rEvent ), mnTimeout( nTimeout ) { @@ -138,7 +141,7 @@ namespace slideshow { InterruptableEventPair aRes; - aRes.mpImmediateEvent = makeEvent( rFunctor ); + aRes.mpImmediateEvent = makeEvent( rFunctor, "makeInterruptableDelay"); aRes.mpTimeoutEvent.reset( new DelayFacade( aRes.mpImmediateEvent, nTimeout ) ); -- cgit v1.2.3 From 11a2f378b1111e0d51e294fade2133c7563c359f Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 6 May 2009 08:16:59 +0000 Subject: #i48179# Improved/fixed debugging code. --- slideshow/source/engine/debug.cxx | 13 +++++----- .../source/engine/rehearsetimingsactivity.cxx | 2 +- slideshow/source/engine/wakeupevent.cxx | 2 +- slideshow/source/inc/debug.hxx | 23 ++++++----------- slideshow/source/inc/delayevent.hxx | 30 +++++----------------- slideshow/source/inc/event.hxx | 4 +-- slideshow/source/inc/interruptabledelayevent.hxx | 2 +- 7 files changed, 26 insertions(+), 50 deletions(-) diff --git a/slideshow/source/engine/debug.cxx b/slideshow/source/engine/debug.cxx index 36bb8c9e106b..75d1c30d5013 100644 --- a/slideshow/source/engine/debug.cxx +++ b/slideshow/source/engine/debug.cxx @@ -31,6 +31,9 @@ #include "precompiled_slideshow.hxx" #include "debug.hxx" + +#if OSL_DEBUG_LEVEL > 1 + #include "animationnodes/basecontainernode.hxx" #include "animationnodes/paralleltimecontainer.hxx" #include "animationnodes/sequentialtimecontainer.hxx" @@ -52,9 +55,8 @@ using ::rtl::OUString; using namespace ::com::sun::star; -namespace slideshow { namespace internal { -#if OSL_DEBUG_LEVEL > 1 +namespace slideshow { namespace internal { namespace { @@ -221,15 +223,11 @@ void Debug_ShowNodeTree (const AnimationNodeSharedPtr& rpNode) DebugShowState(DebugGetTreeRoot(::boost::dynamic_pointer_cast(rpNode))); } -#endif // OSL_DEBUG_LEVEL > 1 - //----- Tracing --------------------------------------------------------------- -#if OSL_DEBUG_LEVEL > 1 - extern "C" { namespace { @@ -323,6 +321,7 @@ DebugTraceScope::~DebugTraceScope (void) delete [] msMessage; } -#endif // OSL_DEBUG_LEVEL > 1 } } + +#endif // OSL_DEBUG_LEVEL > 1 diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx b/slideshow/source/engine/rehearsetimingsactivity.cxx index c17dadc3ac5b..90efe8b5aedd 100644 --- a/slideshow/source/engine/rehearsetimingsactivity.cxx +++ b/slideshow/source/engine/rehearsetimingsactivity.cxx @@ -72,7 +72,7 @@ public: WakeupEvent( boost::shared_ptr< ::canvas::tools::ElapsedTime > const& pTimeBase, ActivitySharedPtr const& rActivity, ActivitiesQueue & rActivityQueue ) : -#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) +#if OSL_DEBUG_LEVEL > 1 Event(::rtl::OUString::createFromAscii("WakeupEvent")), #endif maTimer(pTimeBase), diff --git a/slideshow/source/engine/wakeupevent.cxx b/slideshow/source/engine/wakeupevent.cxx index 31ea8956c17b..d2e13d188e14 100644 --- a/slideshow/source/engine/wakeupevent.cxx +++ b/slideshow/source/engine/wakeupevent.cxx @@ -45,7 +45,7 @@ namespace slideshow WakeupEvent::WakeupEvent( boost::shared_ptr const & pTimeBase, ActivitiesQueue& rActivityQueue ) : -#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) +#if OSL_DEBUG_LEVEL > 1 Event(::rtl::OUString::createFromAscii("WakeupEvent")), #endif maTimer(pTimeBase), diff --git a/slideshow/source/inc/debug.hxx b/slideshow/source/inc/debug.hxx index e9c501ca58aa..53c031231370 100644 --- a/slideshow/source/inc/debug.hxx +++ b/slideshow/source/inc/debug.hxx @@ -31,22 +31,16 @@ #ifndef INCLUDED_SLIDESHOW_DEBUG_HXX #define INCLUDED_SLIDESHOW_DEBUG_HXX -#include "animationnode.hxx" - -namespace slideshow { namespace internal { +#include #if OSL_DEBUG_LEVEL > 1 -void Debug_ShowNodeTree (const AnimationNodeSharedPtr& rpNode); -#endif -// Uncomment the following line to define -// SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS -// in order to add descriptions to Event objects that help debugging event -// base problems. -#define SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS +#include "animationnode.hxx" -#if OSL_DEBUG_LEVEL > 1 +namespace slideshow { namespace internal { + +void Debug_ShowNodeTree (const AnimationNodeSharedPtr& rpNode); // Change this to a valid filename. The file is created anew with every // office start (and execution of at least one TRACE... command.) @@ -66,6 +60,9 @@ void SAL_CALL DebugTraceBegin (const sal_Char* sFormat, ...); void SAL_CALL DebugTraceEnd (const sal_Char* sFormat, ...); void SAL_CALL DebugTraceMessage (const sal_Char* sFormat, ...); +} } // end of namespace ::slideshow::internal + + #define TRACE_BEGIN DebugTraceBegin #define TRACE_END DebugTraceEnd #define TRACE DebugTraceMessage @@ -80,8 +77,4 @@ void SAL_CALL DebugTraceMessage (const sal_Char* sFormat, ...); #endif // OSL_DEBUG_LEVEL > 1 - -} } - - #endif diff --git a/slideshow/source/inc/delayevent.hxx b/slideshow/source/inc/delayevent.hxx index 458d5f9c0a0e..ba06bffa95ec 100644 --- a/slideshow/source/inc/delayevent.hxx +++ b/slideshow/source/inc/delayevent.hxx @@ -51,7 +51,7 @@ public: template Delay( FuncT const& func, double nTimeout -#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) +#if OSL_DEBUG_LEVEL > 1 , const ::rtl::OUString& rsDescription ) : Event(rsDescription), #else @@ -61,7 +61,7 @@ public: Delay( const boost::function0& func, double nTimeout -#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) +#if OSL_DEBUG_LEVEL > 1 , const ::rtl::OUString& rsDescription ) : Event(rsDescription), #else @@ -127,12 +127,8 @@ public: template Delay_( FuncT const& func, double nTimeout, char const* from_function, char const* from_file, int from_line, - const ::rtl::OUString& rsDescription ) - : Delay(func, nTimeout -#if defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) - , rsDescription -#endif - ), + const ::rtl::OUString& rsDescription) + : Delay(func, nTimeout, rsDescription), FROM_FUNCTION(from_function), FROM_FILE(from_file), FROM_LINE(from_line) {} @@ -145,14 +141,12 @@ template inline EventSharedPtr makeDelay_( FuncT const& func, double nTimeout, char const* from_function, char const* from_file, int from_line, - const ::rtl::OUString& rsDescription ) + const ::rtl::OUString& rsDescription) { return EventSharedPtr( new Delay_( func, nTimeout, - from_function, from_file, from_line, rsDescription ) ); + from_function, from_file, from_line, rsDescription) ); } -#if defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) - #define makeDelay(f, t, d) makeDelay_(f, t, \ BOOST_CURRENT_FUNCTION, __FILE__, __LINE__, \ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(d))) @@ -160,17 +154,7 @@ inline EventSharedPtr makeDelay_( BOOST_CURRENT_FUNCTION, __FILE__, __LINE__, \ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(d))) -#else - -#define makeDelay(f, t, d) makeDelay_(f, t, \ - BOOST_CURRENT_FUNCTION, __FILE__, __LINE__) -#define makeEvent(f, d) makeDelay_(f, 0.0, \ - BOOST_CURRENT_FUNCTION, __FILE__, __LINE__) - -#endif - - -#endif // OSL_DEBUG_LEVEL < 1 +#endif // OSL_DEBUG_LEVEL <= 1 } // namespace internal } // namespace presentation diff --git a/slideshow/source/inc/event.hxx b/slideshow/source/inc/event.hxx index c609c3e814a5..6e41e5c30123 100644 --- a/slideshow/source/inc/event.hxx +++ b/slideshow/source/inc/event.hxx @@ -44,7 +44,7 @@ namespace internal { class Event : public Disposable { public: -#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) +#if OSL_DEBUG_LEVEL > 1 Event (const ::rtl::OUString& rsDescription) : msDescription(rsDescription) {}; #endif @@ -78,7 +78,7 @@ public: */ virtual double getActivationTime( double nCurrentTime ) const = 0; -#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) +#if OSL_DEBUG_LEVEL > 1 ::rtl::OUString GetDescription (void) const { return msDescription; } private: diff --git a/slideshow/source/inc/interruptabledelayevent.hxx b/slideshow/source/inc/interruptabledelayevent.hxx index d983d3ba6cff..485c96bc8c2c 100644 --- a/slideshow/source/inc/interruptabledelayevent.hxx +++ b/slideshow/source/inc/interruptabledelayevent.hxx @@ -49,7 +49,7 @@ namespace slideshow public: DelayFacade( const EventSharedPtr& rEvent, double nTimeout ) : -#if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) +#if OSL_DEBUG_LEVEL > 1 Event(::rtl::OUString::createFromAscii("DelayFacade")), #endif mpEvent( rEvent ), -- cgit v1.2.3 From 5c6ea15c19a15f758abeccf5cb3515e211c079cc Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 6 May 2009 11:40:04 +0000 Subject: #i98792# Removed second frame synchronization. --- slideshow/source/engine/slideshowimpl.cxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 1ab20f7f294e..45b94ac26501 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -148,6 +148,12 @@ public: */ void Deactivate (void); + /** Return the current time of the timer. It is not synchronized with + any other timer so its absolute values are of no concern. Typically + used during debugging to measure durations. + */ + double GetCurrentTime (void) const; + private: /** The timer that is used for synchronization is independent from the one used by SlideShowImpl: it is not paused or modified by @@ -169,6 +175,8 @@ private: }; + + /****************************************************************************** SlideShowImpl @@ -1782,7 +1790,6 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout ) maActivitiesQueue.processDequeued(); // commit frame to screen - maFrameSynchronization.Synchronize(); maScreenUpdater.commitUpdates(); } // Time held until here @@ -2171,6 +2178,13 @@ void FrameSynchronization::Deactivate (void) + +double FrameSynchronization::GetCurrentTime (void) const +{ + return maTimer.getElapsedTime(); +} + + } // anon namespace namespace sdecl = comphelper::service_decl; -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 From e3aa4b58f6221e65564941688db6a38182ff92c8 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 13 Jul 2009 11:08:01 +0000 Subject: #i1601# sentence case transliteration --- sd/sdi/_drvwsh.sdi | 5 +++++ sd/sdi/outlnvsh.sdi | 5 +++++ sd/source/ui/view/drviewse.cxx | 8 +++++++- sd/source/ui/view/drviewsf.cxx | 1 + sd/source/ui/view/outlnvsh.cxx | 10 ++++++++-- sd/uiconfig/sdraw/menubar/menubar.xml | 1 + sd/uiconfig/simpress/menubar/menubar.xml | 1 + 7 files changed, 28 insertions(+), 3 deletions(-) diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index 8f758dda5858..eb4d5a63985d 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -2181,6 +2181,11 @@ interface DrawView ExecMethod = FuSupport ; StateMethod = GetCtrlState ; ] + SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] SID_TRANSLITERATE_HALFWIDTH // ole : no, status : ? [ ExecMethod = FuSupport ; diff --git a/sd/sdi/outlnvsh.sdi b/sd/sdi/outlnvsh.sdi index 3b0c49af6901..61be9eae3606 100644 --- a/sd/sdi/outlnvsh.sdi +++ b/sd/sdi/outlnvsh.sdi @@ -446,6 +446,11 @@ interface OutlineView ExecMethod = FuSupport ; StateMethod = GetCtrlState ; ] + SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetCtrlState ; + ] SID_TRANSLITERATE_HALFWIDTH // ole : no, status : ? [ ExecMethod = FuSupport ; diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 0b3ecf1af6e7..725a7fb4ad27 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -34,7 +34,9 @@ #include #include #include -#include +#include +#include + #include @@ -1388,6 +1390,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) case SID_TRANSLITERATE_UPPER: case SID_TRANSLITERATE_LOWER: + case SID_TRANSLITERATE_SENTENCE_CASE: case SID_TRANSLITERATE_HALFWIDTH: case SID_TRANSLITERATE_FULLWIDTH: case SID_TRANSLITERATE_HIRAGANA: @@ -1407,6 +1410,9 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) case SID_TRANSLITERATE_LOWER: nType = TransliterationModules_UPPERCASE_LOWERCASE; break; + case SID_TRANSLITERATE_SENTENCE_CASE: + nType = TransliterationModulesExtra::SENTENCE_CASE; + break; case SID_TRANSLITERATE_HALFWIDTH: nType = TransliterationModules_FULLWIDTH_HALFWIDTH; break; diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 2b1b7518666c..47c487d8df93 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -256,6 +256,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) rSet.DisableItem( SID_TRANSLITERATE_UPPER ); rSet.DisableItem( SID_TRANSLITERATE_LOWER ); + rSet.DisableItem( SID_TRANSLITERATE_SENTENCE_CASE ); rSet.DisableItem( SID_TRANSLITERATE_HALFWIDTH ); rSet.DisableItem( SID_TRANSLITERATE_FULLWIDTH ); rSet.DisableItem( SID_TRANSLITERATE_HIRAGANA ); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index d629eef58fc6..cdbf218417d9 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -63,7 +63,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -538,6 +539,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) if( pOlView && ( (nSlot == SID_TRANSLITERATE_UPPER) || (nSlot == SID_TRANSLITERATE_LOWER) || + (nSlot == SID_TRANSLITERATE_SENTENCE_CASE) || (nSlot == SID_TRANSLITERATE_HALFWIDTH) || (nSlot == SID_TRANSLITERATE_FULLWIDTH) || (nSlot == SID_TRANSLITERATE_HIRAGANA) || @@ -671,6 +673,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) case SID_TRANSLITERATE_UPPER: case SID_TRANSLITERATE_LOWER: + case SID_TRANSLITERATE_SENTENCE_CASE: case SID_TRANSLITERATE_HALFWIDTH: case SID_TRANSLITERATE_FULLWIDTH: case SID_TRANSLITERATE_HIRAGANA: @@ -690,6 +693,9 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) case SID_TRANSLITERATE_LOWER: nType = TransliterationModules_UPPERCASE_LOWERCASE; break; + case SID_TRANSLITERATE_SENTENCE_CASE: + nType = TransliterationModulesExtra::SENTENCE_CASE; + break; case SID_TRANSLITERATE_HALFWIDTH: nType = TransliterationModules_FULLWIDTH_HALFWIDTH; break; @@ -996,7 +1002,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) GetDoc()->SetChanged(TRUE); } - // Da šberladen, muss hier der Status gesetzt werden + // Da �berladen, muss hier der Status gesetzt werden if( !GetDocSh()->IsModified() ) { rSet.DisableItem( SID_SAVEDOC ); diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml index e34baec0f29c..d9574ec48707 100644 --- a/sd/uiconfig/sdraw/menubar/menubar.xml +++ b/sd/uiconfig/sdraw/menubar/menubar.xml @@ -185,6 +185,7 @@ + diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml index ece53ad4c918..578bd89afacb 100644 --- a/sd/uiconfig/simpress/menubar/menubar.xml +++ b/sd/uiconfig/simpress/menubar/menubar.xml @@ -203,6 +203,7 @@ + -- cgit v1.2.3 From c4137a7db5360997c2dd699755fcfc31fddf7543 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 13 Jul 2009 12:48:12 +0000 Subject: undoing r273933 which was accidently commited on master m51 --- sd/sdi/_drvwsh.sdi | 5 ----- sd/sdi/outlnvsh.sdi | 5 ----- sd/source/ui/view/drviewse.cxx | 8 +------- sd/source/ui/view/drviewsf.cxx | 1 - sd/source/ui/view/outlnvsh.cxx | 10 ++-------- sd/uiconfig/sdraw/menubar/menubar.xml | 1 - sd/uiconfig/simpress/menubar/menubar.xml | 1 - 7 files changed, 3 insertions(+), 28 deletions(-) diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index eb4d5a63985d..8f758dda5858 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -2181,11 +2181,6 @@ interface DrawView ExecMethod = FuSupport ; StateMethod = GetCtrlState ; ] - SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ? - [ - ExecMethod = FuSupport ; - StateMethod = GetCtrlState ; - ] SID_TRANSLITERATE_HALFWIDTH // ole : no, status : ? [ ExecMethod = FuSupport ; diff --git a/sd/sdi/outlnvsh.sdi b/sd/sdi/outlnvsh.sdi index 61be9eae3606..3b0c49af6901 100644 --- a/sd/sdi/outlnvsh.sdi +++ b/sd/sdi/outlnvsh.sdi @@ -446,11 +446,6 @@ interface OutlineView ExecMethod = FuSupport ; StateMethod = GetCtrlState ; ] - SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ? - [ - ExecMethod = FuSupport ; - StateMethod = GetCtrlState ; - ] SID_TRANSLITERATE_HALFWIDTH // ole : no, status : ? [ ExecMethod = FuSupport ; diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 725a7fb4ad27..0b3ecf1af6e7 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -34,9 +34,7 @@ #include #include #include -#include -#include - +#include #include @@ -1390,7 +1388,6 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) case SID_TRANSLITERATE_UPPER: case SID_TRANSLITERATE_LOWER: - case SID_TRANSLITERATE_SENTENCE_CASE: case SID_TRANSLITERATE_HALFWIDTH: case SID_TRANSLITERATE_FULLWIDTH: case SID_TRANSLITERATE_HIRAGANA: @@ -1410,9 +1407,6 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) case SID_TRANSLITERATE_LOWER: nType = TransliterationModules_UPPERCASE_LOWERCASE; break; - case SID_TRANSLITERATE_SENTENCE_CASE: - nType = TransliterationModulesExtra::SENTENCE_CASE; - break; case SID_TRANSLITERATE_HALFWIDTH: nType = TransliterationModules_FULLWIDTH_HALFWIDTH; break; diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 47c487d8df93..2b1b7518666c 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -256,7 +256,6 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet) rSet.DisableItem( SID_TRANSLITERATE_UPPER ); rSet.DisableItem( SID_TRANSLITERATE_LOWER ); - rSet.DisableItem( SID_TRANSLITERATE_SENTENCE_CASE ); rSet.DisableItem( SID_TRANSLITERATE_HALFWIDTH ); rSet.DisableItem( SID_TRANSLITERATE_FULLWIDTH ); rSet.DisableItem( SID_TRANSLITERATE_HIRAGANA ); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index cdbf218417d9..d629eef58fc6 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -63,8 +63,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -539,7 +538,6 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) if( pOlView && ( (nSlot == SID_TRANSLITERATE_UPPER) || (nSlot == SID_TRANSLITERATE_LOWER) || - (nSlot == SID_TRANSLITERATE_SENTENCE_CASE) || (nSlot == SID_TRANSLITERATE_HALFWIDTH) || (nSlot == SID_TRANSLITERATE_FULLWIDTH) || (nSlot == SID_TRANSLITERATE_HIRAGANA) || @@ -673,7 +671,6 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) case SID_TRANSLITERATE_UPPER: case SID_TRANSLITERATE_LOWER: - case SID_TRANSLITERATE_SENTENCE_CASE: case SID_TRANSLITERATE_HALFWIDTH: case SID_TRANSLITERATE_FULLWIDTH: case SID_TRANSLITERATE_HIRAGANA: @@ -693,9 +690,6 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) case SID_TRANSLITERATE_LOWER: nType = TransliterationModules_UPPERCASE_LOWERCASE; break; - case SID_TRANSLITERATE_SENTENCE_CASE: - nType = TransliterationModulesExtra::SENTENCE_CASE; - break; case SID_TRANSLITERATE_HALFWIDTH: nType = TransliterationModules_FULLWIDTH_HALFWIDTH; break; @@ -1002,7 +996,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) GetDoc()->SetChanged(TRUE); } - // Da �berladen, muss hier der Status gesetzt werden + // Da šberladen, muss hier der Status gesetzt werden if( !GetDocSh()->IsModified() ) { rSet.DisableItem( SID_SAVEDOC ); diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml index d9574ec48707..e34baec0f29c 100644 --- a/sd/uiconfig/sdraw/menubar/menubar.xml +++ b/sd/uiconfig/sdraw/menubar/menubar.xml @@ -185,7 +185,6 @@ - diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml index 578bd89afacb..ece53ad4c918 100644 --- a/sd/uiconfig/simpress/menubar/menubar.xml +++ b/sd/uiconfig/simpress/menubar/menubar.xml @@ -203,7 +203,6 @@ - -- cgit v1.2.3 From 5800b0e7a1898f88fd675baf5f1e86b8a3b268ad Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 30 Jul 2009 09:37:08 +0200 Subject: more dependencies fixed --- sd/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sd/prj/build.lst b/sd/prj/build.lst index 40e6ed16ebee..5b0308d15b7c 100644 --- a/sd/prj/build.lst +++ b/sd/prj/build.lst @@ -1,4 +1,4 @@ -sd sd : l10n animations svx stoc uui canvas NULL +sd sd : l10n animations svx stoc canvas NULL sd sd usr1 - all sd_mkout NULL sd sd\inc nmake - all sd_inc NULL sd sd\prj get - all sd_prj NULL -- cgit v1.2.3 -- cgit v1.2.3 From 776336dc70e3e02d1be9c1f0c5aa531f5c47345e Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 14 Sep 2009 19:06:55 +0200 Subject: #i103496#: split cppunit in a pure external lib and a lib depending on sal -> testshl2 --- slideshow/test/makefile.mk | 13 +++++++------ slideshow/test/slidetest.cxx | 2 +- slideshow/test/testshape.cxx | 2 +- slideshow/test/testview.cxx | 2 +- slideshow/test/views.cxx | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/slideshow/test/makefile.mk b/slideshow/test/makefile.mk index cde95f49163a..b6bd1cc2889c 100644 --- a/slideshow/test/makefile.mk +++ b/slideshow/test/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # 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 @@ -32,7 +32,7 @@ PRJ=.. PRJNAME=slideshow -PRJINC=$(PRJ)$/source +PRJINC=$(PRJ)$/source TARGET=tests TARGETTYPE=GUI @@ -50,13 +50,14 @@ SHL1OBJS= \ $(SLO)$/views.obj \ $(SLO)$/slidetest.obj \ $(SLO)$/testshape.obj \ - $(SLO)$/testview.obj + $(SLO)$/testview.obj SHL1TARGET= tests SHL1STDLIBS= $(SALLIB) \ $(BASEGFXLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ + $(TESTSHL2LIB) \ $(CPPUNITLIB) \ $(UNOTOOLSLIB) \ $(VCLLIB) @@ -70,7 +71,7 @@ SHL1STDLIBS= $(SALLIB) \ SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) -SHL1VERSIONMAP = export.map +SHL1VERSIONMAP = export.map # END target1 ---------------------------------------------------------- # BEGIN target2 -------------------------------------------------------- @@ -96,9 +97,9 @@ APP2DEF= $(MISC)$/$(TARGET).def #------------------------------- All object files ---------------------------- # do this here, so we get right dependencies -SLOFILES=$(SHL1OBJS) +SLOFILES=$(SHL1OBJS) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk -.INCLUDE : _cppunit.mk +.INCLUDE : _cppunit.mk diff --git a/slideshow/test/slidetest.cxx b/slideshow/test/slidetest.cxx index 96ed6f07fb90..633ee324359e 100644 --- a/slideshow/test/slidetest.cxx +++ b/slideshow/test/slidetest.cxx @@ -28,7 +28,7 @@ * ************************************************************************/ -#include +#include #include #include diff --git a/slideshow/test/testshape.cxx b/slideshow/test/testshape.cxx index 00f9868bcae4..9482b9d31500 100644 --- a/slideshow/test/testshape.cxx +++ b/slideshow/test/testshape.cxx @@ -28,7 +28,7 @@ * ************************************************************************/ -#include +#include #include #include #include diff --git a/slideshow/test/testview.cxx b/slideshow/test/testview.cxx index 57024438ef43..5f4c44f2a50d 100644 --- a/slideshow/test/testview.cxx +++ b/slideshow/test/testview.cxx @@ -28,7 +28,7 @@ * ************************************************************************/ -#include +#include #include #include #include diff --git a/slideshow/test/views.cxx b/slideshow/test/views.cxx index 20a6a06a976a..e53a14e1fa33 100644 --- a/slideshow/test/views.cxx +++ b/slideshow/test/views.cxx @@ -28,7 +28,7 @@ * ************************************************************************/ -#include +#include #include #include -- cgit v1.2.3 From 5d11f6a1ab4a569e8977bbd43f4582775a9e43c7 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 19 Sep 2009 00:02:22 +0200 Subject: better dependencies for sdi files --- sd/sdi/ViewShellBase.sdi | 4 +-- sd/sdi/_docsh.sdi | 2 +- sd/sdi/docshell.sdi | 2 +- sd/sdi/grdocsh.sdi | 2 +- sd/sdi/makefile.mk | 14 ++++++-- sd/sdi/sdgslots.sdi | 9 +++-- sd/sdi/sdslots.sdi | 9 +++-- sd/sdi/svxitems.sdi | 93 ------------------------------------------------ 8 files changed, 29 insertions(+), 106 deletions(-) delete mode 100644 sd/sdi/svxitems.sdi diff --git a/sd/sdi/ViewShellBase.sdi b/sd/sdi/ViewShellBase.sdi index 306fabf0df7d..67d9cfb1e85e 100644 --- a/sd/sdi/ViewShellBase.sdi +++ b/sd/sdi/ViewShellBase.sdi @@ -267,7 +267,7 @@ SfxVoidItem TaskPaneShowPanel SID_TASK_PANE ( GroupId = GID_VIEW; ] -interface ViewShellBaseView : View +interface ViewShellBaseView { SID_SWITCH_SHELL [ @@ -380,7 +380,7 @@ interface ViewShellBaseView : View ] } -shell ViewShellBase : SfxViewShell +shell ViewShellBase { import ViewShellBaseView[Automation]; } diff --git a/sd/sdi/_docsh.sdi b/sd/sdi/_docsh.sdi index 15b6f52ffc01..6d3267aacf81 100644 --- a/sd/sdi/_docsh.sdi +++ b/sd/sdi/_docsh.sdi @@ -27,7 +27,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -interface DrawDocument : OfficeDocument +interface DrawDocument { SID_PACKNGO // ole : ?, status : ? [ diff --git a/sd/sdi/docshell.sdi b/sd/sdi/docshell.sdi index 13c979071b5c..159bd05227fc 100644 --- a/sd/sdi/docshell.sdi +++ b/sd/sdi/docshell.sdi @@ -35,7 +35,7 @@ interface ImpressDocument : DrawDocument { } -shell DrawDocShell : SfxObjectShell +shell DrawDocShell { import ImpressDocument[Automation]; } diff --git a/sd/sdi/grdocsh.sdi b/sd/sdi/grdocsh.sdi index 86cb36265704..4cd3ef0c905e 100644 --- a/sd/sdi/grdocsh.sdi +++ b/sd/sdi/grdocsh.sdi @@ -35,7 +35,7 @@ interface GraphicDocument : DrawDocument { } -shell GraphicDocShell : SfxObjectShell +shell GraphicDocShell { import GraphicDocument[Automation]; } diff --git a/sd/sdi/makefile.mk b/sd/sdi/makefile.mk index a442c65e8d64..8730d637e1a9 100644 --- a/sd/sdi/makefile.mk +++ b/sd/sdi/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # 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 @@ -50,6 +50,11 @@ SDI2NAME=$(TARGET2) SIDHRCNAME=SDSLOTS.HRC SVSDI1DEPEND= \ + $(SOLARINCXDIR)$/sfx2/sfx.sdi \ + $(SOLARINCXDIR)$/sfx2/sfxitems.sdi \ + $(SOLARINCXDIR)$/svx/svx.sdi \ + $(SOLARINCXDIR)$/svx/svxitems.sdi \ + $(SOLARINCXDIR)$/svx/xoitems.sdi \ sdraw.sdi \ app.sdi \ _docsh.sdi \ @@ -69,7 +74,12 @@ SVSDI1DEPEND= \ $(PRJ)$/inc$/app.hrc SVSDI2DEPEND= \ - sdraw.sdi \ + $(SOLARINCXDIR)$/sfx2/sfx.sdi \ + $(SOLARINCXDIR)$/sfx2/sfxitems.sdi \ + $(SOLARINCXDIR)$/svx/svx.sdi \ + $(SOLARINCXDIR)$/svx/svxitems.sdi \ + $(SOLARINCXDIR)$/svx/xoitems.sdi \ + sdraw.sdi \ app.sdi \ _docsh.sdi \ grdocsh.sdi \ diff --git a/sd/sdi/sdgslots.sdi b/sd/sdi/sdgslots.sdi index da196204d6ca..b650a467f925 100644 --- a/sd/sdi/sdgslots.sdi +++ b/sd/sdi/sdgslots.sdi @@ -27,8 +27,6 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -import "svxslots.ilb" - module "2DADF501-1F00-101C-A2E4-00001B4C5CE7" "33A1C840-1F00-101C-A2E4-00001B4C5CE7" @@ -36,10 +34,15 @@ StarDraw [ HelpText( "StarDraw Application" ) SlotIdFile( "sdslots.hrc" ) -TypeLibFile( "sdgslots.tlb" ) ModulePrefix( "Sd" ) ] { + include "sfxitems.sdi" + include "sfx.sdi" + include "svxitems.sdi" + include "xoitems.sdi" + include "svx.sdi" + item UINT16 TbxImageItem; enum FadeEffect diff --git a/sd/sdi/sdslots.sdi b/sd/sdi/sdslots.sdi index 83060f6dd36c..208613595b65 100644 --- a/sd/sdi/sdslots.sdi +++ b/sd/sdi/sdslots.sdi @@ -28,8 +28,6 @@ * ************************************************************************/ -import "svxslots.ilb" - module "2DADF501-1F00-101C-A2E4-00001B4C5CE7" "33A1C840-1F00-101C-A2E4-00001B4C5CE7" @@ -37,10 +35,15 @@ StarDraw [ HelpText( "StarDraw Application" ) SlotIdFile( "sdslots.hrc" ) -TypeLibFile( "sdslots.tlb" ) ModulePrefix( "Sd" ) ] { + include "sfx2/sfxitems.sdi" + include "sfx2/sfx.sdi" + include "svx/svxitems.sdi" + include "svx/xoitems.sdi" + include "svx/svx.sdi" + item UINT16 TbxImageItem; enum FadeEffect diff --git a/sd/sdi/svxitems.sdi b/sd/sdi/svxitems.sdi deleted file mode 100644 index 42d036d4e9d8..000000000000 --- a/sd/sdi/svxitems.sdi +++ /dev/null @@ -1,93 +0,0 @@ -enum SvxAdjust -{ - SVX_ADJUST_LEFT, - SVX_ADJUST_RIGHT, - SVX_ADJUST_BLOCK, - SVX_ADJUST_CENTER, - SVX_ADJUST_BLOCKLINE, - SVX_ADJUST_END -} - -item -{ - INT16 Red; - INT16 Green; - INT16 Blue; -} SvxColorItem - -item SvxAdjust SvxAdjustItem; - -item String SvxBoxInfoItem; - -item String SvxBoxItem; -item String SvxBrushItem; -item String SvxCaseMapItem; -item String SvxCharSetColorItem; -item String SvxColumnItem; -item String SvxContourItem; -item String SvxCrossedOutItem; -item String SvxDBDescMgr; -item String SvxDbTypeItem; -item String SvxEscapementItem; -item String SvxFmtBreakItem; -item String SvxFmtSplitItem; -item String SvxFontHeightItem; -item String SvxFontItem; -item String SvxFontListItem; -item String SvxHyphenZoneItem; -item String SvxInFrameItem; -item String SvxKerningItem; -item String SvxLRSpaceItem; -item String SvxLanguageItem; -item String SvxLineSpacingItem; -item String SvxMacroItem; -item String SvxNoHyphenItem; -item String SvxNoLinebreakItem; -item String SvxNumberInfoItem; -item String SvxOpaqueItem; -item String SvxOrphansItem; -item String SvxOverlineItem; -item String SvxPageItem; -item String SvxPageModelItem; -item String SvxPagePosSizeItem; -item String SvxPaperBinItem; -item String SvxParaDlgLimitsItem; -item String SvxPostItAuthorItem; -item String SvxPostItDateItem; -item String SvxPostItTextItem; -item String SvxPostureItem; -item String SvxPrintItem; -item String SvxPropSizeItem; -item String SvxProtectItem; -item String SvxPtrItem; -item String SvxRulerItem; -item String SvxSearchItem; -item String SvxSearchControllerItem; -item String SvxSearchItem; -item String SvxSetItem; -item String SvxShadowedItem; -item String SvxShadowItem; -item String SvxSizeItem; -item String SvxTabStopItem; -item String SvxULSpaceItem; -item String SvxUnderlineItem; -item String SvxWeightItem; -item String SvxWidowsItem; -item String SvxWordLineModeItem; -item String XFillAttrSetItem; -item String XFillBitmapItem; -item String XFillColorItem; -item String XFillGradientItem; -item String XFillHatchItem; -item String XFillStyleItem; -item String XLineAttrSetItem; -item String XLineColorItem; -item String XLineDashItem; -item String XLineEndItem; -item String XLineEndWidthItem; -item String XLineEndCenterItem; -item String XLineStartItem; -item String XLineStartWidthItem; -item String XLineStartCenterItem; -item String XLineStyleItem; -item String XLineWidthItem; -- cgit v1.2.3 -- cgit v1.2.3 From 4039d960fc2555b7043e2e6df24855b5ffcbb02f Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 25 Sep 2009 21:06:42 +0200 Subject: #103496#: forgot on sdi file in sd --- sd/sdi/sdgslots.sdi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sd/sdi/sdgslots.sdi b/sd/sdi/sdgslots.sdi index b650a467f925..db62ca5cdfb3 100644 --- a/sd/sdi/sdgslots.sdi +++ b/sd/sdi/sdgslots.sdi @@ -37,11 +37,11 @@ SlotIdFile( "sdslots.hrc" ) ModulePrefix( "Sd" ) ] { - include "sfxitems.sdi" - include "sfx.sdi" - include "svxitems.sdi" - include "xoitems.sdi" - include "svx.sdi" + include "sfx2/sfxitems.sdi" + include "sfx2/sfx.sdi" + include "svx/svxitems.sdi" + include "svx/xoitems.sdi" + include "svx/svx.sdi" item UINT16 TbxImageItem; -- cgit v1.2.3 From a0aea0374c174fe24cfff31f1589aca62bdb4d68 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 28 Sep 2009 17:17:07 +0200 Subject: merge problems --- sd/sdi/makefile.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/sd/sdi/makefile.mk b/sd/sdi/makefile.mk index 8f55ef10e21d..7eb22a96c770 100644 --- a/sd/sdi/makefile.mk +++ b/sd/sdi/makefile.mk @@ -72,7 +72,6 @@ SVSDI1DEPEND= \ ViewShellBase.sdi \ TaskPaneViewShell.sdi \ sdslots.hrc \ - $(SOLARINCXDIR)$/svxslots.ilb \ $(PRJ)$/inc$/app.hrc SVSDI2DEPEND= \ @@ -95,7 +94,6 @@ SVSDI2DEPEND= \ ViewShellBase.sdi \ TaskPaneViewShell.sdi \ sdslots.hrc \ - $(SOLARINCXDIR)$/svxslots.ilb \ $(PRJ)$/inc$/app.hrc # --- Targets ------------------------------------------------------- -- cgit v1.2.3 From aaa550781532849b514e1e61ace3c7db9e3db68a Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 6 Oct 2009 07:38:24 +0200 Subject: #103496#: move VCL free ConfigItems to unotools --- sd/inc/pch/precompiled_sd.hxx | 16 ++++++++-------- sd/source/core/CustomAnimationPreset.cxx | 2 +- sd/source/core/TransitionPreset.cxx | 2 +- sd/source/core/drawdoc.cxx | 10 +++++----- sd/source/filter/grf/sdgrffilter.cxx | 2 +- sd/source/filter/html/buttonset.cxx | 2 +- sd/source/filter/html/htmlex.cxx | 2 +- sd/source/filter/html/pubdlg.cxx | 4 ++-- sd/source/filter/ppt/pptin.cxx | 4 ++-- sd/source/filter/sdpptwrp.cxx | 2 +- sd/source/filter/xml/sdxmlwrp.cxx | 2 +- sd/source/ui/animations/AnimationSchemesPane.cxx | 2 +- sd/source/ui/animations/CustomAnimationCreateDialog.cxx | 2 +- sd/source/ui/animations/CustomAnimationDialog.cxx | 2 +- sd/source/ui/animations/SlideTransitionPane.cxx | 2 +- sd/source/ui/annotations/annotationmanager.cxx | 4 ++-- sd/source/ui/annotations/annotationwindow.cxx | 4 ++-- sd/source/ui/app/sddll.cxx | 2 +- sd/source/ui/app/sddll1.cxx | 2 +- sd/source/ui/app/sdmod.cxx | 2 +- sd/source/ui/app/sdmod1.cxx | 4 ++-- sd/source/ui/app/sdmod2.cxx | 2 +- sd/source/ui/app/sdpopup.cxx | 2 +- sd/source/ui/dlg/dlgass.cxx | 2 +- sd/source/ui/dlg/dlgassim.cxx | 2 +- sd/source/ui/dlg/dlgfield.cxx | 2 +- sd/source/ui/dlg/tpaction.cxx | 2 +- sd/source/ui/docshell/docshel4.cxx | 4 ++-- sd/source/ui/func/fuinsert.cxx | 2 +- sd/source/ui/notes/EditWindow.cxx | 4 ++-- sd/source/ui/presenter/PresenterTextView.cxx | 4 ++-- sd/source/ui/slideshow/slideshowimpl.hxx | 4 ++-- sd/source/ui/slideshow/slideshowviewimpl.hxx | 4 ++-- sd/source/ui/unoidl/sddetect.cxx | 2 +- sd/source/ui/view/Outliner.cxx | 4 ++-- sd/source/ui/view/drviews7.cxx | 2 +- sd/source/ui/view/drviewsb.cxx | 2 +- sd/source/ui/view/outlnvs2.cxx | 2 +- sd/source/ui/view/sdview3.cxx | 2 +- sd/source/ui/view/viewshe2.cxx | 2 +- sd/util/makefile.mk | 1 + 41 files changed, 63 insertions(+), 62 deletions(-) diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index e3329a44af7e..60e3e3aa069a 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -509,10 +509,10 @@ #include "svtools/filter.hxx" #include "svtools/flagitem.hxx" #include "svtools/fltcall.hxx" -#include "svtools/fltrcfg.hxx" +#include "unotools/fltrcfg.hxx" #include "svtools/globalnameitem.hxx" #include "svtools/hint.hxx" -#include "svtools/historyoptions.hxx" +#include "unotools/historyoptions.hxx" #include "svtools/htmlout.hxx" #include "svtools/imap.hxx" #include "svtools/imapcirc.hxx" @@ -526,18 +526,18 @@ #include "svtools/itemset.hxx" #include "svtools/languageoptions.hxx" #include "svtools/lckbitem.hxx" -#include "svtools/lingucfg.hxx" -#include "svtools/linguprops.hxx" +#include "unotools/lingucfg.hxx" +#include "unotools/linguprops.hxx" #include "svtools/listener.hxx" #include "svtools/lstner.hxx" #include "svtools/misccfg.hxx" -#include "svtools/pathoptions.hxx" +#include "unotools/pathoptions.hxx" #include "svtools/poolitem.hxx" #include "svtools/prgsbar.hxx" #include "svtools/printdlg.hxx" #include "svtools/ptitem.hxx" #include "svtools/rectitem.hxx" -#include "svtools/saveopt.hxx" +#include "unotools/saveopt.hxx" #include "svtools/sfxecode.hxx" #include "svtools/slstitm.hxx" #include "svtools/smplhint.hxx" @@ -557,9 +557,9 @@ #include "svtools/unoimap.hxx" #include "svtools/urihelper.hxx" #include "svtools/urlbmk.hxx" -#include "svtools/useroptions.hxx" +#include "unotools/useroptions.hxx" #include "svtools/valueset.hxx" -#include "svtools/viewoptions.hxx" +#include "unotools/viewoptions.hxx" #include "svtools/visitem.hxx" #include "svtools/whiter.hxx" #include "svtools/wmf.hxx" diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index cf5d94c420ce..6a732e58a405 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx index 563026fdc1ac..59251f62eb6f 100644 --- a/sd/source/core/TransitionPreset.cxx +++ b/sd/source/core/TransitionPreset.cxx @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index d5cd14a80b65..d8d6552c696c 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -42,7 +42,7 @@ #include #include -#include +#include #ifndef _OFA_MISCCFG_HXX #include @@ -71,16 +71,16 @@ #include #include #include -#include +#include #include #include #include #include #ifndef _SVTOOLS_PATHOPTIONS_HXX_ -#include +#include #endif -#include -#include +#include +#include #include "eetext.hxx" #include "drawdoc.hxx" diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index bb3c114f603f..5ef6123fdddf 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -60,7 +60,7 @@ // -- #include -#include +#include #include #include #include diff --git a/sd/source/filter/html/buttonset.cxx b/sd/source/filter/html/buttonset.cxx index c2942f6b5b8f..2671452a0a3b 100644 --- a/sd/source/filter/html/buttonset.cxx +++ b/sd/source/filter/html/buttonset.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 6e2a7feb5240..b89c6238dcaa 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #ifndef _UNOTOOLS_UCBSTREAMHELPER_HXX #include diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index aec387604488..7b0f8486f7bd 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -60,8 +60,8 @@ #include #include #include -#include -#include +#include +#include #include "sdresid.hxx" #include "sdattr.hxx" diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index b13935699b0f..2ea34ab831e4 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -88,11 +88,11 @@ #include "../../ui/inc/FrameView.hxx" #include "../../ui/inc/optsitem.hxx" -#include +#include #include #include #include -#include +#include #include #define MAX_USER_MOVE 2 diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index 8c1674dbf789..bc4a63012caa 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include "sdpptwrp.hxx" #include "ppt/pptin.hxx" diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 6f9e0d7b71da..fa127ec752dd 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -67,7 +67,7 @@ #include #include #include -#include +#include // #80365# include necessary for XML progress bar at load time #include diff --git a/sd/source/ui/animations/AnimationSchemesPane.cxx b/sd/source/ui/animations/AnimationSchemesPane.cxx index 02a230650583..51ddad2fb97d 100644 --- a/sd/source/ui/animations/AnimationSchemesPane.cxx +++ b/sd/source/ui/animations/AnimationSchemesPane.cxx @@ -49,7 +49,7 @@ #include #endif #include -#include +#include #include #include diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx index ce651b2965be..ea59e0773261 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx @@ -53,7 +53,7 @@ #include #include #include "sdresid.hxx" -#include +#include #include #include "CustomAnimationCreateDialog.hxx" #ifndef _SD_CUSTOMANIMATIONCREATEDIALOG_HRC diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index dc7a27ab5c53..9a1634a7f695 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -52,7 +52,7 @@ #ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include #endif -#include +#include #include #include #include diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index 13400964c18b..4a235e3cd9af 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -51,7 +51,7 @@ #include #endif #include -#include +#include #include #include #include "DrawViewShell.hxx" diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 144022d10758..d339da99c96c 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -47,9 +47,9 @@ #include #include -#include +#include #include -#include +#include #include #include diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index ae3c65a2b4d5..c285986452ca 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -58,8 +58,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx index c2ab152d950b..7cdec8c9f36b 100644 --- a/sd/source/ui/app/sddll.cxx +++ b/sd/source/ui/app/sddll.cxx @@ -34,7 +34,7 @@ #include #include -#include +#include #ifndef _FM_FMOBJFAC_HXX #include #endif diff --git a/sd/source/ui/app/sddll1.cxx b/sd/source/ui/app/sddll1.cxx index 2ef0815aed3c..6b525a0b3f90 100644 --- a/sd/source/ui/app/sddll1.cxx +++ b/sd/source/ui/app/sddll1.cxx @@ -32,7 +32,7 @@ #include "precompiled_sd.hxx" -#include +#include #include "sddll.hxx" #include "diactrl.hxx" #include "tbx_ww.hxx" diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index f7e74a481740..9a331f8c73f2 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -30,7 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sd.hxx" -#include +#include #include #ifndef _UNOTOOLS_UCBSTREAMHELPER_HXX #include diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 4144b4afb774..8c6903d3bb7c 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "framework/FrameworkHelper.hxx" #include @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include "app.hrc" #include "glob.hrc" diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index bbf80e942602..410af582283a 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx index 211e3a1fd02e..dc4246d57888 100644 --- a/sd/source/ui/app/sdpopup.cxx +++ b/sd/source/ui/app/sdpopup.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include "strings.hrc" #include "sdpopup.hxx" diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 13ad351c7b24..84259a54f66b 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -66,7 +66,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx index 0b394d57702b..a1781ec2d9dc 100644 --- a/sd/source/ui/dlg/dlgassim.cxx +++ b/sd/source/ui/dlg/dlgassim.cxx @@ -36,7 +36,7 @@ #endif #include #include -#include +#include #include "sdpage.hxx" #include "Outliner.hxx" diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx index 99fcace44186..7ec89ac9a000 100644 --- a/sd/source/ui/dlg/dlgfield.cxx +++ b/sd/source/ui/dlg/dlgfield.cxx @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include "strings.hrc" #include "dlgfield.hrc" diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index 2148b33d95d3..d6e379ce50fc 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 4a4e62f2a106..37045e9d0731 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -63,11 +63,11 @@ #include "unomodel.hxx" #endif -#include +#include #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index 12c94fbf9f8f..dfff1da8207e 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/notes/EditWindow.cxx b/sd/source/ui/notes/EditWindow.cxx index f86e9a358cbc..89c45decd123 100755 --- a/sd/source/ui/notes/EditWindow.cxx +++ b/sd/source/ui/notes/EditWindow.cxx @@ -45,8 +45,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index 0317b7530e5c..2fc4245269ec 100644 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -37,8 +37,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx index b9d5506ff2f3..5ae10b9ca872 100644 --- a/sd/source/ui/slideshow/slideshowimpl.hxx +++ b/sd/source/ui/slideshow/slideshowimpl.hxx @@ -62,8 +62,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/slideshow/slideshowviewimpl.hxx b/sd/source/ui/slideshow/slideshowviewimpl.hxx index 8eebe162b942..4d2ecbdef39c 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.hxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.hxx @@ -56,8 +56,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx index 71000d263cd7..60968fa9a51c 100644 --- a/sd/source/ui/unoidl/sddetect.cxx +++ b/sd/source/ui/unoidl/sddetect.cxx @@ -83,7 +83,7 @@ #include #include #include -#include +#include #include #include diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 233976585e58..ecfebc9a3cac 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -56,8 +56,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 983033be7b8c..91136028fd4d 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -61,7 +61,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx index 9a94cae21983..09e71dc547ac 100644 --- a/sd/source/ui/view/drviewsb.cxx +++ b/sd/source/ui/view/drviewsb.cxx @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include "app.hrc" #include "strings.hrc" diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index 99fbcb7f2eda..6b078c5f28cc 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -49,7 +49,7 @@ #include #include #include "optsitem.hxx" -#include +#include #include #include "Outliner.hxx" diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 184949f4e683..1e9e39383bec 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -36,7 +36,7 @@ #include #include #include -#include +#include #ifndef _EDITDATA_HXX #include #endif diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 0349388577eb..08a39c44d86a 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -59,7 +59,7 @@ #include #include #include -#include +#include #ifndef _SVX_DIALOGS_HRC #include #endif diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk index cf9a516094b7..e530511ee565 100644 --- a/sd/util/makefile.mk +++ b/sd/util/makefile.mk @@ -171,6 +171,7 @@ SHL2STDLIBS= \ $(VCLLIB) \ $(SOTLIB) \ $(TOOLSLIB) \ + $(UNOTOOLSLIB) \ $(UCBHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ -- cgit v1.2.3 -- cgit v1.2.3 From 5caa4326854d346e40b9d052255effa446e54513 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 14 Oct 2009 12:38:02 +0000 Subject: #i48179# Fixed stepping back for animations with active auto_reverse. --- .../source/engine/activities/activitiesfactory.cxx | 7 ++++++- .../animationnodes/sequentialtimecontainer.cxx | 1 - slideshow/source/engine/eventqueue.cxx | 23 ++++++++++++++-------- slideshow/source/engine/slideshowimpl.cxx | 16 +++++++++------ slideshow/source/engine/usereventqueue.cxx | 3 +-- 5 files changed, 32 insertions(+), 18 deletions(-) diff --git a/slideshow/source/engine/activities/activitiesfactory.cxx b/slideshow/source/engine/activities/activitiesfactory.cxx index 39cd7d733110..745e956c19e0 100644 --- a/slideshow/source/engine/activities/activitiesfactory.cxx +++ b/slideshow/source/engine/activities/activitiesfactory.cxx @@ -293,7 +293,12 @@ public: { // xxx todo: good guess if (mpAnim) - (*mpAnim)( getPresentationValue( maEndValue ) ); + { + if (isAutoReverse()) + (*mpAnim)( getPresentationValue( maStartValue ) ); + else + (*mpAnim)( getPresentationValue( maEndValue ) ); + } } /// Disposable: diff --git a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx index bf0cba0cfe64..66ff0c40ceee 100644 --- a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx +++ b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx @@ -141,7 +141,6 @@ bool SequentialTimeContainer::resolveChild( void SequentialTimeContainer::notifyDeactivating( AnimationNodeSharedPtr const& rNotifier ) { - OSL_TRACE(" SequentialTimeContainer::notifyDeactivating\r"); if (notifyDeactivatedChild( rNotifier )) return; diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx index ee92e5df27d6..44e1cad2f45e 100644 --- a/slideshow/source/engine/eventqueue.cxx +++ b/slideshow/source/engine/eventqueue.cxx @@ -106,9 +106,10 @@ namespace slideshow ::osl::MutexGuard aGuard( maMutex ); #if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) - OSL_TRACE("adding event at %x [%s] with delay %f\r", - rEvent.get(), + OSL_TRACE("adding at %f event [%s] at %x with delay %f\r", + mpTimer->getElapsedTime(), OUStringToOString(rEvent->GetDescription(), RTL_TEXTENCODING_UTF8).getStr(), + rEvent.get(), rEvent->getActivationTime(0.0)); #endif ENSURE_OR_RETURN( rEvent, @@ -133,9 +134,10 @@ namespace slideshow ::osl::MutexGuard aGuard( maMutex ); #if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) - OSL_TRACE("adding event at %x [%s] for next round with delay %f\r", - rEvent.get(), + OSL_TRACE("adding at %f event [%s] at %x for next round with delay %f\r", + mpTimer->getElapsedTime(), OUStringToOString(rEvent->GetDescription(), RTL_TEXTENCODING_UTF8).getStr(), + rEvent.get(), rEvent->getActivationTime(0.0)); #endif @@ -152,9 +154,10 @@ namespace slideshow ::osl::MutexGuard aGuard( maMutex ); #if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) - OSL_TRACE("adding event at %x [%s] for execution when queue is empty with delay %f\r", - rpEvent.get(), + OSL_TRACE("adding at %f event [%s] at %x for execution when queue is empty with delay %f\r", + mpTimer->getElapsedTime(), OUStringToOString(rpEvent->GetDescription(), RTL_TEXTENCODING_UTF8).getStr(), + rpEvent.get(), rpEvent->getActivationTime(0.0)); #endif @@ -239,10 +242,11 @@ namespace slideshow event.pEvent->getActivationTime(0.0) ); #endif #if OSL_DEBUG_LEVEL > 1 && defined (SLIDESHOW_ADD_DESCRIPTIONS_TO_EVENTS) - OSL_TRACE("firing event at %x [%s] with delay %f\r", - event.pEvent.get(), + OSL_TRACE("firing at %f event [%s] at %x with delay %f\r", + mpTimer->getElapsedTime(), OUStringToOString(event.pEvent->GetDescription(), RTL_TEXTENCODING_UTF8).getStr(), + event.pEvent.get(), event.pEvent->getActivationTime(0.0)); #endif @@ -326,6 +330,9 @@ namespace slideshow // TODO(P1): Maybe a plain vector and vector.swap will // be faster here. Profile. maEvents = ImplQueueType(); + + maNextEvents.clear(); + maNextNextEvents = ImplQueueType(); } } } diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 45b94ac26501..b042014af9c6 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -71,6 +71,7 @@ #include #include #include +#include #include #include #include @@ -509,11 +510,14 @@ struct SlideShowImpl::SeparateListenerImpl : public EventHandler, // directly, but queue an event. handleEvent() // might be called from e.g. // showNext(), and notifySlideAnimationsEnded() must not be called - // in recursion. - mrEventQueue.addEvent( - makeEvent( boost::bind( &SlideShowImpl::notifySlideAnimationsEnded, - boost::ref(mrShow) ), - "SlideShowImpl::notifySlideAnimationsEnded")); + // in recursion. Note that the event is scheduled for the next + // frame so that its expensive execution does not come in between + // sprite hiding and shape redraw (at the end of the animation of a + // shape), which would cause a flicker. + mrEventQueue.addEventForNextRound( + makeEvent( + boost::bind( &SlideShowImpl::notifySlideAnimationsEnded, boost::ref(mrShow) ), + "SlideShowImpl::notifySlideAnimationsEnded")); return true; } @@ -2079,7 +2083,7 @@ void SlideShowImpl::notifySlideEnded (const bool bReverse) boost::bind( &presentation::XSlideShowListener::slideEnded, _1, - bReverse) ); + bReverse)); } bool SlideShowImpl::notifyHyperLinkClicked( rtl::OUString const& hyperLink ) diff --git a/slideshow/source/engine/usereventqueue.cxx b/slideshow/source/engine/usereventqueue.cxx index 95ff86ab200b..4415599f84d8 100644 --- a/slideshow/source/engine/usereventqueue.cxx +++ b/slideshow/source/engine/usereventqueue.cxx @@ -330,8 +330,6 @@ private: // next effect listeners: if(fireAllEvents( maEvents, mrEventQueue )) { - makeEvent(::boost::bind(&EventQueue::forceEmpty, ::boost::ref(mrEventQueue)), - "EventQueue::forceEmpty"); if (mbSkipTriggersNextEffect && bNotifyNextEffect) { // then simulate a next effect event: this skip effect @@ -794,6 +792,7 @@ void UserEventQueue::setAdvanceOnClick( bool bAdvanceOnClick ) mpClickEventHandler->setAdvanceOnClick( bAdvanceOnClick ); } + void UserEventQueue::registerSlideStartEvent( const EventSharedPtr& rEvent ) { registerEvent( mpStartEventHandler, -- cgit v1.2.3 From 0cc66aaf7546862d515041edb9243988a3fcdd1b Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 16 Oct 2009 00:05:16 +0200 Subject: #i103496#: split svtools; improve ConfitItems --- sd/inc/helpids.h | 2 +- sd/inc/pch/precompiled_sd.hxx | 68 +++++++++++----------- sd/inc/sdattr.hxx | 6 +- sd/inc/sdmod.hxx | 2 +- sd/inc/sdundo.hxx | 2 +- sd/inc/stlfamily.hxx | 2 +- sd/inc/stlsheet.hxx | 2 +- sd/inc/undo/undomanager.hxx | 2 +- sd/source/core/anminfo.cxx | 4 +- sd/source/core/drawdoc.cxx | 8 +-- sd/source/core/drawdoc2.cxx | 2 +- sd/source/core/drawdoc3.cxx | 4 +- sd/source/core/drawdoc4.cxx | 4 +- sd/source/core/sdpage.cxx | 2 +- sd/source/core/sdpage2.cxx | 4 +- sd/source/core/stlfamily.cxx | 2 +- sd/source/core/stlpool.cxx | 8 +-- sd/source/core/stlsheet.cxx | 4 +- sd/source/core/typemap.cxx | 12 ++-- sd/source/filter/cgm/sdcgmfilter.cxx | 2 +- sd/source/filter/eppt/epptso.cxx | 2 +- sd/source/filter/html/htmlex.cxx | 6 +- sd/source/filter/html/htmlex.hxx | 2 +- sd/source/filter/html/pubdlg.cxx | 10 ++-- sd/source/filter/ppt/pptin.cxx | 8 +-- sd/source/filter/sdfilter.cxx | 2 +- sd/source/filter/xml/sdtransform.cxx | 8 +-- sd/source/filter/xml/sdxmlwrp.cxx | 4 +- sd/source/ui/annotations/annotationmanager.cxx | 6 +- sd/source/ui/annotations/annotationwindow.cxx | 6 +- sd/source/ui/app/optsitem.cxx | 6 +- sd/source/ui/app/res_bmp.src | 2 +- sd/source/ui/app/sdmod.cxx | 6 +- sd/source/ui/app/sdmod1.cxx | 2 +- sd/source/ui/app/sdmod2.cxx | 8 +-- sd/source/ui/app/sdpopup.cxx | 2 +- sd/source/ui/app/sdxfer.cxx | 4 +- sd/source/ui/app/tbxww.cxx | 2 +- sd/source/ui/app/tmplctrl.cxx | 4 +- sd/source/ui/dlg/LayerDialogContent.cxx | 2 +- sd/source/ui/dlg/animobjs.cxx | 2 +- sd/source/ui/dlg/celltempl.cxx | 4 +- sd/source/ui/dlg/dlgass.cxx | 4 +- sd/source/ui/dlg/dlgassim.hxx | 2 +- sd/source/ui/dlg/dlgchar.cxx | 2 +- sd/source/ui/dlg/dlgfield.cxx | 4 +- sd/source/ui/dlg/dlgolbul.cxx | 6 +- sd/source/ui/dlg/dlgpage.cxx | 4 +- sd/source/ui/dlg/dlgsnap.cxx | 4 +- sd/source/ui/dlg/gluectrl.cxx | 2 +- sd/source/ui/dlg/layeroptionsdlg.cxx | 2 +- sd/source/ui/dlg/morphdlg.cxx | 4 +- sd/source/ui/dlg/navigatr.cxx | 6 +- sd/source/ui/dlg/paragr.cxx | 6 +- sd/source/ui/dlg/present.cxx | 2 +- sd/source/ui/dlg/prltempl.cxx | 6 +- sd/source/ui/dlg/prntopts.cxx | 2 +- sd/source/ui/dlg/sdpreslt.cxx | 2 +- sd/source/ui/dlg/sdtreelb.cxx | 2 +- sd/source/ui/dlg/tabtempl.cxx | 6 +- sd/source/ui/dlg/tpaction.cxx | 4 +- sd/source/ui/dlg/tpoption.cxx | 2 +- sd/source/ui/dlg/unchss.cxx | 6 +- sd/source/ui/docshell/docshel3.cxx | 2 +- sd/source/ui/docshell/docshel4.cxx | 6 +- sd/source/ui/docshell/docshell.cxx | 12 ++-- sd/source/ui/docshell/formatclipboard.cxx | 4 +- sd/source/ui/framework/tools/FrameworkHelper.cxx | 2 +- sd/source/ui/func/bulmaper.cxx | 4 +- sd/source/ui/func/fuarea.cxx | 4 +- sd/source/ui/func/fubullet.cxx | 6 +- sd/source/ui/func/fucon3d.cxx | 2 +- sd/source/ui/func/fuconarc.cxx | 4 +- sd/source/ui/func/fuconbez.cxx | 4 +- sd/source/ui/func/fuconcs.cxx | 6 +- sd/source/ui/func/fuconrec.cxx | 4 +- sd/source/ui/func/fuconstr.cxx | 2 +- sd/source/ui/func/fuconuno.cxx | 4 +- sd/source/ui/func/fudraw.cxx | 2 +- sd/source/ui/func/fuediglu.cxx | 2 +- sd/source/ui/func/fuhhconv.cxx | 2 +- sd/source/ui/func/fuinsert.cxx | 6 +- sd/source/ui/func/fuinsfil.cxx | 4 +- sd/source/ui/func/fuline.cxx | 4 +- sd/source/ui/func/fuoaprms.cxx | 2 +- sd/source/ui/func/fuolbull.cxx | 4 +- sd/source/ui/func/fupage.cxx | 8 +-- sd/source/ui/func/fupoor.cxx | 2 +- sd/source/ui/func/fuprlout.cxx | 4 +- sd/source/ui/func/fuprobjs.cxx | 4 +- sd/source/ui/func/fusel.cxx | 8 +-- sd/source/ui/func/fusldlg.cxx | 2 +- sd/source/ui/func/fusnapln.cxx | 2 +- sd/source/ui/func/futempl.cxx | 2 +- sd/source/ui/func/futext.cxx | 6 +- sd/source/ui/inc/AccessibleOutlineEditSource.hxx | 4 +- sd/source/ui/inc/EventMultiplexer.hxx | 2 +- sd/source/ui/inc/FormShellManager.hxx | 2 +- sd/source/ui/inc/PreviewRenderer.hxx | 2 +- sd/source/ui/inc/ViewShellHint.hxx | 2 +- sd/source/ui/inc/WindowUpdater.hxx | 8 +-- sd/source/ui/inc/diactrl.hxx | 2 +- sd/source/ui/inc/docprev.hxx | 2 +- sd/source/ui/inc/formatclipboard.hxx | 2 +- sd/source/ui/inc/fuconuno.hxx | 2 +- sd/source/ui/inc/fuformatpaintbrush.hxx | 2 +- sd/source/ui/inc/optsitem.hxx | 1 + sd/source/ui/inc/sdtreelb.hxx | 2 +- sd/source/ui/inc/sdxfer.hxx | 2 +- sd/source/ui/inc/unomodel.hxx | 2 +- sd/source/ui/notes/EditWindow.cxx | 2 +- sd/source/ui/presenter/PresenterTextView.cxx | 4 +- sd/source/ui/slideshow/showwin.cxx | 2 +- sd/source/ui/slideshow/slideshow.cxx | 2 +- sd/source/ui/slideshow/slideshowimpl.cxx | 4 +- .../ui/slidesorter/controller/SlsListener.hxx | 2 +- .../ui/slidesorter/controller/SlsSlotManager.cxx | 8 +-- sd/source/ui/slidesorter/view/SlideSorterView.cxx | 6 +- sd/source/ui/table/TableDesignPane.cxx | 2 +- sd/source/ui/table/tablefunction.cxx | 4 +- sd/source/ui/table/tableobjectbar.cxx | 4 +- sd/source/ui/toolpanel/LayoutMenu.cxx | 2 +- sd/source/ui/toolpanel/TitleBar.cxx | 2 +- .../ui/toolpanel/controls/MasterPageContainer.cxx | 4 +- .../ui/toolpanel/controls/MasterPageObserver.cxx | 2 +- .../ui/toolpanel/controls/MasterPagesSelector.cxx | 8 +-- sd/source/ui/unoidl/sddetect.cxx | 6 +- sd/source/ui/unoidl/unoobj.cxx | 4 +- sd/source/ui/unoidl/unopage.cxx | 4 +- sd/source/ui/unoidl/unopage.hxx | 2 +- sd/source/ui/unoidl/unopback.cxx | 2 +- sd/source/ui/view/GraphicObjectBar.cxx | 6 +- sd/source/ui/view/MediaObjectBar.cxx | 4 +- sd/source/ui/view/PrintManager.cxx | 12 ++-- sd/source/ui/view/ToolBarManager.cxx | 2 +- sd/source/ui/view/ViewShellBase.cxx | 2 +- sd/source/ui/view/ViewShellImplementation.cxx | 2 +- sd/source/ui/view/WindowUpdater.cxx | 54 ++++++++--------- sd/source/ui/view/drawview.cxx | 8 +-- sd/source/ui/view/drbezob.cxx | 4 +- sd/source/ui/view/drtxtob.cxx | 10 ++-- sd/source/ui/view/drtxtob1.cxx | 10 ++-- sd/source/ui/view/drviews2.cxx | 2 +- sd/source/ui/view/drviews3.cxx | 12 ++-- sd/source/ui/view/drviews4.cxx | 2 +- sd/source/ui/view/drviews7.cxx | 14 ++--- sd/source/ui/view/drviews9.cxx | 6 +- sd/source/ui/view/drviewsa.cxx | 6 +- sd/source/ui/view/drviewsc.cxx | 2 +- sd/source/ui/view/drviewsd.cxx | 6 +- sd/source/ui/view/drviewse.cxx | 10 ++-- sd/source/ui/view/drviewsf.cxx | 8 +-- sd/source/ui/view/drviewsh.cxx | 4 +- sd/source/ui/view/drviewsi.cxx | 2 +- sd/source/ui/view/drviewsj.cxx | 2 +- sd/source/ui/view/outlnvs2.cxx | 2 +- sd/source/ui/view/outlnvsh.cxx | 6 +- sd/source/ui/view/outlview.cxx | 6 +- sd/source/ui/view/sdruler.cxx | 2 +- sd/source/ui/view/sdview2.cxx | 4 +- sd/source/ui/view/sdview3.cxx | 4 +- sd/source/ui/view/sdview4.cxx | 2 +- sd/source/ui/view/viewshe3.cxx | 7 +-- sd/source/ui/view/viewshel.cxx | 4 +- 164 files changed, 392 insertions(+), 396 deletions(-) diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h index e094027f9417..00268058745b 100644 --- a/sd/inc/helpids.h +++ b/sd/inc/helpids.h @@ -28,7 +28,7 @@ * ************************************************************************/ #ifndef _SOLAR_HRC -#include +#include #endif #define HID_SD_PRINT_OPTIONS (HID_SD_START + 0) diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index 60e3e3aa069a..1c236c9b290e 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -495,23 +495,23 @@ #include "sot/storinfo.hxx" #include "svtools/FilterConfigItem.hxx" -#include "svtools/aeitem.hxx" -#include "svtools/brdcst.hxx" +#include "svl/aeitem.hxx" +#include "svl/brdcst.hxx" #include "svtools/colorcfg.hxx" #include "svtools/colrdlg.hxx" #include "svtools/controldims.hrc" -#include "svtools/ctloptions.hxx" +#include "svl/ctloptions.hxx" #include "svtools/ctrlbox.hxx" #include "svtools/ctrltool.hxx" #include "svtools/ehdl.hxx" -#include "svtools/eitem.hxx" +#include "svl/eitem.hxx" #include "svtools/filedlg.hxx" #include "svtools/filter.hxx" -#include "svtools/flagitem.hxx" +#include "svl/flagitem.hxx" #include "svtools/fltcall.hxx" #include "unotools/fltrcfg.hxx" -#include "svtools/globalnameitem.hxx" -#include "svtools/hint.hxx" +#include "svl/globalnameitem.hxx" +#include "svl/hint.hxx" #include "unotools/historyoptions.hxx" #include "svtools/htmlout.hxx" #include "svtools/imap.hxx" @@ -519,51 +519,51 @@ #include "svtools/imapobj.hxx" #include "svtools/imappoly.hxx" #include "svtools/imaprect.hxx" -#include "svtools/inethist.hxx" -#include "svtools/intitem.hxx" -#include "svtools/itemiter.hxx" -#include "svtools/itempool.hxx" -#include "svtools/itemset.hxx" -#include "svtools/languageoptions.hxx" -#include "svtools/lckbitem.hxx" +#include "svl/inethist.hxx" +#include "svl/intitem.hxx" +#include "svl/itemiter.hxx" +#include "svl/itempool.hxx" +#include "svl/itemset.hxx" +#include "svl/languageoptions.hxx" +#include "svl/lckbitem.hxx" #include "unotools/lingucfg.hxx" #include "unotools/linguprops.hxx" -#include "svtools/listener.hxx" -#include "svtools/lstner.hxx" -#include "svtools/misccfg.hxx" +#include "svl/listener.hxx" +#include "svl/lstner.hxx" +#include "unotools/misccfg.hxx" #include "unotools/pathoptions.hxx" -#include "svtools/poolitem.hxx" +#include "svl/poolitem.hxx" #include "svtools/prgsbar.hxx" #include "svtools/printdlg.hxx" -#include "svtools/ptitem.hxx" -#include "svtools/rectitem.hxx" +#include "svl/ptitem.hxx" +#include "svl/rectitem.hxx" #include "unotools/saveopt.hxx" #include "svtools/sfxecode.hxx" -#include "svtools/slstitm.hxx" -#include "svtools/smplhint.hxx" +#include "svl/slstitm.hxx" +#include "svl/smplhint.hxx" #include "svtools/soerr.hxx" -#include "svtools/solar.hrc" +#include "svl/solar.hrc" #include "svtools/sores.hxx" #include "svtools/stdctrl.hxx" -#include "svtools/stritem.hxx" -#include "svtools/style.hrc" -#include "svtools/style.hxx" +#include "svl/stritem.hxx" +#include "svl/style.hrc" +#include "svl/style.hxx" #include "svtools/svmedit.hxx" -#include "svtools/svstdarr.hxx" -#include "svtools/syslocale.hxx" +#include "svl/svstdarr.hxx" +#include "unotools/syslocale.hxx" #include "svtools/tabbar.hxx" #include "svtools/treelist.hxx" -#include "svtools/undo.hxx" +#include "svl/undo.hxx" #include "svtools/unoimap.hxx" -#include "svtools/urihelper.hxx" -#include "svtools/urlbmk.hxx" +#include "svl/urihelper.hxx" +#include "svl/urlbmk.hxx" #include "unotools/useroptions.hxx" #include "svtools/valueset.hxx" #include "unotools/viewoptions.hxx" -#include "svtools/visitem.hxx" -#include "svtools/whiter.hxx" +#include "svl/visitem.hxx" +#include "svl/whiter.hxx" #include "svtools/wmf.hxx" -#include "svtools/zforlist.hxx" +#include "svl/zforlist.hxx" #include "svx/SpellDialogChildWindow.hxx" diff --git a/sd/inc/sdattr.hxx b/sd/inc/sdattr.hxx index 5600302c40ff..1972ad1583d3 100644 --- a/sd/inc/sdattr.hxx +++ b/sd/inc/sdattr.hxx @@ -32,9 +32,9 @@ #define _SDATTR_HXX #include -#include -#include -#include +#include +#include +#include #include #ifndef _SDATTR_HRC diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index 7481759cff4c..e4122ca0d4c3 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -42,7 +42,7 @@ #include #include #include "sddllapi.h" -#include +#include #include #include #include diff --git a/sd/inc/sdundo.hxx b/sd/inc/sdundo.hxx index d71d6371e1d1..794f23e94b8e 100644 --- a/sd/inc/sdundo.hxx +++ b/sd/inc/sdundo.hxx @@ -31,7 +31,7 @@ #ifndef _SD_SDUNDO_HXX #define _SD_SDUNDO_HXX -#include +#include #include "sddllapi.h" class SdDrawDocument; diff --git a/sd/inc/stlfamily.hxx b/sd/inc/stlfamily.hxx index ccd0619a4788..a00828a2690a 100644 --- a/sd/inc/stlfamily.hxx +++ b/sd/inc/stlfamily.hxx @@ -46,7 +46,7 @@ #include -#include +#include #include diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx index f683492c2110..69ee48e58dd9 100644 --- a/sd/inc/stlsheet.hxx +++ b/sd/inc/stlsheet.hxx @@ -44,7 +44,7 @@ #include #include -#include +#include #include diff --git a/sd/inc/undo/undomanager.hxx b/sd/inc/undo/undomanager.hxx index 5ced88e66dfe..583c74b71109 100644 --- a/sd/inc/undo/undomanager.hxx +++ b/sd/inc/undo/undomanager.hxx @@ -32,7 +32,7 @@ #define _SD_UNDOMANAGER_HXX #include "misc/scopelock.hxx" -#include +#include namespace sd { diff --git a/sd/source/core/anminfo.cxx b/sd/source/core/anminfo.cxx index 8d06ae3d0fcd..d5ffdd562a74 100644 --- a/sd/source/core/anminfo.cxx +++ b/sd/source/core/anminfo.cxx @@ -31,10 +31,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sd.hxx" #include -#include +#include #include "svx/xtable.hxx" #include -#include +#include #include #include diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index d8d6552c696c..c86296a90997 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -44,9 +44,6 @@ #include -#ifndef _OFA_MISCCFG_HXX -#include -#endif #include #include #include @@ -57,14 +54,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include #include @@ -262,7 +259,6 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) } // DefTab und SpellOptions setzen - //OfaMiscCfg* pOfaMiscCfg = SFX_APP()->GetMiscConfig(); // Jetzt am Modul (SD) USHORT nDefTab = pOptions->GetDefTab(); SetDefaultTabulator( nDefTab ); diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 0513e1d02083..e208399d636f 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 6beaee7082eb..9c44f9edc485 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -44,13 +44,13 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 413323d27e97..862c383f043b 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -102,7 +102,7 @@ #include #include #include -#include +#include #include #include #include @@ -119,7 +119,7 @@ #include "shapelist.hxx" #include #include -#include +#include using ::rtl::OUString; using namespace ::com::sun::star; diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 58274ab3a009..99fbc31a2bb0 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #include #ifndef _SVX_SRIPTTYPEITEM_HXX diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index 3f03640c27fb..047431bec461 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -60,7 +60,7 @@ // #90477# #include -#include +#include using namespace ::sd; using namespace ::com::sun::star; diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx index 9f6bc230359b..e90b55243726 100644 --- a/sd/source/core/stlfamily.cxx +++ b/sd/source/core/stlfamily.cxx @@ -37,7 +37,7 @@ #include #include -#include +#include #include diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 708ed0b3c8b0..8c156af32038 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -42,14 +42,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include #ifndef _SVX_EMPHITEM_HXX @@ -64,7 +64,7 @@ #include #include #include -#include +#include #define _SDR_POSITIVE #define _SDR_ITEMS @@ -78,7 +78,7 @@ #include "sdmod.hxx" #include "sdpage.hxx" #include "helpids.h" -#include +#include using ::rtl::OUString; using namespace ::com::sun::star::uno; diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 04a8c36263ef..d80881304b17 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -46,8 +46,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/sd/source/core/typemap.cxx b/sd/source/core/typemap.cxx index 7223cf193cbd..c3f69a675e10 100644 --- a/sd/source/core/typemap.cxx +++ b/sd/source/core/typemap.cxx @@ -43,13 +43,13 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -96,9 +96,9 @@ #include // #UndoRedo# -#include +#include -#include +#include #define CharSetItem SfxUInt16Item @@ -129,8 +129,8 @@ #define OfaStringListItem SfxStringListItem #define avmedia_MediaItem ::avmedia::MediaItem #include -#include -#include +#include +#include #include diff --git a/sd/source/filter/cgm/sdcgmfilter.cxx b/sd/source/filter/cgm/sdcgmfilter.cxx index b843fd06009f..68719b132bb7 100644 --- a/sd/source/filter/cgm/sdcgmfilter.cxx +++ b/sd/source/filter/cgm/sdcgmfilter.cxx @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include #include diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 75e5a4ba3227..eae3b2eadb40 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -46,7 +46,7 @@ #include #include #include -#include +#include //#ifndef _SVX_XIT_HXX //#include //#endif diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index b89c6238dcaa..e84d2b429ae3 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include @@ -75,9 +75,9 @@ #include #include #include -#include +#include #define _SVSTDARR_USHORTS -#include +#include //#ifndef _SVDETC_HXX //#include //#endif diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx index d139940bfa97..2512c99e72d4 100644 --- a/sd/source/filter/html/htmlex.hxx +++ b/sd/source/filter/html/htmlex.hxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "resltn.hxx" // enum PublishingResolution #include #include diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index 7b0f8486f7bd..6d9860740740 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -44,14 +44,14 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -#include +#include #include #include #include diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 2ea34ab831e4..a1bbc3288962 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include #include @@ -44,11 +44,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include @@ -75,7 +75,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx index 3507a71526cf..657d658e22d0 100644 --- a/sd/source/filter/sdfilter.cxx +++ b/sd/source/filter/sdfilter.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include "../ui/inc/DrawDocShell.hxx" #include "../ui/inc/strings.hrc" diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx index 16930a81b055..5fa918db31ef 100644 --- a/sd/source/filter/xml/sdtransform.cxx +++ b/sd/source/filter/xml/sdtransform.cxx @@ -32,10 +32,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sd.hxx" -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index fa127ec752dd..6aac1c1c3967 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -70,8 +70,8 @@ #include // #80365# include necessary for XML progress bar at load time -#include -#include +#include +#include #include #include "sderror.hxx" diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index d339da99c96c..49ad473db0f0 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -45,10 +45,10 @@ #include #include -#include -#include +#include +#include #include -#include +#include #include #include diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index c285986452ca..2a7ca2df9b0d 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -57,11 +57,11 @@ #include #include -#include +#include #include #include -#include -#include +#include +#include #include #include diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index 673e00477d46..b62bba0435ef 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -36,7 +36,7 @@ #ifndef _SV_SALBTYPE_HRC //autogen #include #endif -#include +#include #include "app.hxx" #include "optsitem.hxx" @@ -74,6 +74,10 @@ void SdOptionsItem::Commit() mrParent.Commit( *this ); }; +void SdOptionsItem::Notify( const com::sun::star::uno::Sequence& ) +{} + + // ----------------------------------------------------------------------------- Sequence< Any > SdOptionsItem::GetProperties( const Sequence< OUString >& rNames ) diff --git a/sd/source/ui/app/res_bmp.src b/sd/source/ui/app/res_bmp.src index 4796be585d1e..77ef817e4c44 100644 --- a/sd/source/ui/app/res_bmp.src +++ b/sd/source/ui/app/res_bmp.src @@ -29,7 +29,7 @@ ************************************************************************/ #include -#include +#include #include "glob.hrc" #include "res_bmp.hrc" diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index 9a331f8c73f2..49d52ad63cc3 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sd.hxx" #include -#include +#include #ifndef _UNOTOOLS_UCBSTREAMHELPER_HXX #include #endif @@ -39,14 +39,14 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 8c6903d3bb7c..65485d9df447 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -31,7 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sd.hxx" -#include +#include #include #include #include diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index 410af582283a..0a4eaf0bbebe 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -33,9 +33,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -85,7 +85,7 @@ #include "sdabstdlg.hxx" #include "tpoption.hrc" #include "prntopts.hrc" -#include +#include /** retrieves the page that is currently painted. This will only be the master page if the current drawn view only shows the master page*/ diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx index dc4246d57888..274a99f830e5 100644 --- a/sd/source/ui/app/sdpopup.cxx +++ b/sd/source/ui/app/sdpopup.cxx @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index f22af4ad2887..7a57c81178b6 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -49,13 +49,13 @@ #include #include #include -#include +#include #include #include #include #include #include -#include +#include #include //#ifndef _SVDETC_HXX //autogen diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx index e94fe501d73b..2f0bb6e4daea 100644 --- a/sd/source/ui/app/tbxww.cxx +++ b/sd/source/ui/app/tbxww.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #ifndef _SFX_IMAGEMGR_HXX #include diff --git a/sd/source/ui/app/tmplctrl.cxx b/sd/source/ui/app/tmplctrl.cxx index ce7f1ff28acc..86f0e4db6e10 100644 --- a/sd/source/ui/app/tmplctrl.cxx +++ b/sd/source/ui/app/tmplctrl.cxx @@ -37,8 +37,8 @@ #include #include -#include -#include +#include +#include #include #include "tmplctrl.hxx" diff --git a/sd/source/ui/dlg/LayerDialogContent.cxx b/sd/source/ui/dlg/LayerDialogContent.cxx index ac3149d4cadf..735af8c95042 100644 --- a/sd/source/ui/dlg/LayerDialogContent.cxx +++ b/sd/source/ui/dlg/LayerDialogContent.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include "sdattr.hxx" diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 0c05c58312b8..d74052a7ec3c 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/dlg/celltempl.cxx b/sd/source/ui/dlg/celltempl.cxx index 0acea6b8d033..b0a353c42b2f 100644 --- a/sd/source/ui/dlg/celltempl.cxx +++ b/sd/source/ui/dlg/celltempl.cxx @@ -35,8 +35,8 @@ #undef SD_DLLIMPLEMENTATION #endif -#include -#include +#include +#include #include #include diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 84259a54f66b..ea89fba79500 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include "DrawDocShell.hxx" #include #include diff --git a/sd/source/ui/dlg/dlgassim.hxx b/sd/source/ui/dlg/dlgassim.hxx index 33b3a777b68b..d4a75fb8dd3d 100644 --- a/sd/source/ui/dlg/dlgassim.hxx +++ b/sd/source/ui/dlg/dlgassim.hxx @@ -28,7 +28,7 @@ * ************************************************************************/ -#include +#include #include "drawdoc.hxx" #include #include diff --git a/sd/source/ui/dlg/dlgchar.cxx b/sd/source/ui/dlg/dlgchar.cxx index 6cee99175fcc..254e3f6dcfa2 100644 --- a/sd/source/ui/dlg/dlgchar.cxx +++ b/sd/source/ui/dlg/dlgchar.cxx @@ -44,7 +44,7 @@ #include "sdresid.hxx" #include "dlg_char.hxx" #include -#include +#include /************************************************************************* |* diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx index 7ec89ac9a000..19fb96a6e4d9 100644 --- a/sd/source/ui/dlg/dlgfield.cxx +++ b/sd/source/ui/dlg/dlgfield.cxx @@ -40,10 +40,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx index a7988b850214..dbe0e252f7eb 100644 --- a/sd/source/ui/dlg/dlgolbul.cxx +++ b/sd/source/ui/dlg/dlgolbul.cxx @@ -48,11 +48,11 @@ #include #include -#include +#include #include #include "View.hxx" #include -#include +#include #include #ifndef _SD_SDRESID_HXX @@ -64,7 +64,7 @@ #include "bulmaper.hxx" #include "DrawDocShell.hxx" #include -#include +#include namespace sd { diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx index bf5eb5da7c39..2145e477e476 100644 --- a/sd/source/ui/dlg/dlgpage.cxx +++ b/sd/source/ui/dlg/dlgpage.cxx @@ -35,7 +35,7 @@ #undef SD_DLLIMPLEMENTATION #endif -#include +#include #ifndef _SVX_DIALOGS_HRC #include #endif @@ -48,7 +48,7 @@ #include "dlgpage.hxx" #include "DrawDocShell.hxx" -#include +#include #include #include diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx index 5a232649251e..fc541e7925e8 100644 --- a/sd/source/ui/dlg/dlgsnap.cxx +++ b/sd/source/ui/dlg/dlgsnap.cxx @@ -38,8 +38,8 @@ #include #include -#include -#include +#include +#include #include "dlgsnap.hrc" #include "sdattr.hxx" diff --git a/sd/source/ui/dlg/gluectrl.cxx b/sd/source/ui/dlg/gluectrl.cxx index 1fea04cf31ab..a4f4e99d2463 100644 --- a/sd/source/ui/dlg/gluectrl.cxx +++ b/sd/source/ui/dlg/gluectrl.cxx @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/dlg/layeroptionsdlg.cxx b/sd/source/ui/dlg/layeroptionsdlg.cxx index cb9ade5336f8..3414f779cad8 100644 --- a/sd/source/ui/dlg/layeroptionsdlg.cxx +++ b/sd/source/ui/dlg/layeroptionsdlg.cxx @@ -34,7 +34,7 @@ #ifdef SD_DLLIMPLEMENTATION #undef SD_DLLIMPLEMENTATION #endif -#include +#include #include "strings.hrc" #include "sdattr.hxx" diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx index 6d34834ccab9..f43472d58ace 100644 --- a/sd/source/ui/dlg/morphdlg.cxx +++ b/sd/source/ui/dlg/morphdlg.cxx @@ -47,8 +47,8 @@ #include #include #include -#include -#include +#include +#include namespace sd { diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index fa31c7fbb209..b1f97ea29051 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -36,11 +36,11 @@ #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx index 2ebdf316af34..eeefcda29f3d 100644 --- a/sd/source/ui/dlg/paragr.cxx +++ b/sd/source/ui/dlg/paragr.cxx @@ -37,9 +37,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx index d881c45070d3..e624e3b23320 100644 --- a/sd/source/ui/dlg/present.cxx +++ b/sd/source/ui/dlg/present.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include "sdattr.hxx" #include "present.hxx" diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index 748d34a94c6c..b7a65b0d5b6e 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include "DrawDocShell.hxx" #include "glob.hrc" @@ -59,7 +59,7 @@ #include "enumdlg.hrc" //#include "enumdlg.hxx" #include "bulmaper.hxx" -#include +#include #include #include #include "drawdoc.hxx" diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx index 225919f32280..6a74ffaf206f 100644 --- a/sd/source/ui/dlg/prntopts.cxx +++ b/sd/source/ui/dlg/prntopts.cxx @@ -42,7 +42,7 @@ #include "sdresid.hxx" #include "prntopts.hxx" #include "app.hrc" -#include +#include #include // STATIC DATA ----------------------------------------------------------- diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx index b57474906567..1f97ce8d4cf2 100644 --- a/sd/source/ui/dlg/sdpreslt.cxx +++ b/sd/source/ui/dlg/sdpreslt.cxx @@ -36,7 +36,7 @@ #endif -#include +#include #include #include diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 9d335b859e31..bd93b07beb9a 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx index 98a4959abdb8..5ce27def13a6 100644 --- a/sd/source/ui/dlg/tabtempl.cxx +++ b/sd/source/ui/dlg/tabtempl.cxx @@ -40,18 +40,18 @@ #include #include -#include +#include #include #include #include -#include +#include #include #include #include -#include +#include #include #include "DrawDocShell.hxx" diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index d6e379ce50fc..80ba0b78c9f9 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -57,7 +57,7 @@ #include #include #include -#include +#include #include #include #include @@ -68,7 +68,7 @@ #include #include #include -#include +#include #include #include #include "View.hxx" diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index b22ad4e32dbd..102c95a9b3e5 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -58,7 +58,7 @@ #include "tpoption.hxx" #include "strings.hrc" #include "app.hrc" -#include +#include #include #define DLGWIN this->GetParent()->GetParent() diff --git a/sd/source/ui/dlg/unchss.cxx b/sd/source/ui/dlg/unchss.cxx index dc0ea3d63827..e42012d4b75d 100644 --- a/sd/source/ui/dlg/unchss.cxx +++ b/sd/source/ui/dlg/unchss.cxx @@ -32,9 +32,9 @@ #include "precompiled_sd.hxx" -#include -#include -#include +#include +#include +#include #include #include "unchss.hxx" diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index c62bc9fcc620..96461168e299 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -51,7 +51,7 @@ #include #endif #include -#include +#include #include #include #include diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 37045e9d0731..3d2ea5ace652 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -41,8 +41,8 @@ #endif #include #include -#include -#include +#include +#include #include #include #include @@ -50,7 +50,7 @@ #include #endif #include -#include +#include #include #include #ifndef _SFX_ECODE_HXX //autogen diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index f9381d08a219..d9e5f43535ef 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -44,8 +44,8 @@ #include #include #include -#include -#include +#include +#include #include #ifndef _SFX_DOCFILE_HXX //autogen #include @@ -55,16 +55,16 @@ #include #include #include -#include -#include +#include +#include #include #include #ifndef _SO_CLSIDS_HXX #include #endif #include -#include -#include +#include +#include #include diff --git a/sd/source/ui/docshell/formatclipboard.cxx b/sd/source/ui/docshell/formatclipboard.cxx index 8035e78150c7..ba4fb8efae99 100644 --- a/sd/source/ui/docshell/formatclipboard.cxx +++ b/sd/source/ui/docshell/formatclipboard.cxx @@ -35,10 +35,10 @@ #include // header for class SfxItemIter -#include +#include // header for class SfxStyleSheet -#include +#include /*-------------------------------------------------------------------- --------------------------------------------------------------------*/ diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx index d0d6938a2b21..4ce1bfebf6ee 100644 --- a/sd/source/ui/framework/tools/FrameworkHelper.cxx +++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx @@ -45,7 +45,7 @@ #include "app.hrc" #include #include -#include +#include #include #include diff --git a/sd/source/ui/func/bulmaper.cxx b/sd/source/ui/func/bulmaper.cxx index 3abd76237680..95687ab8a833 100644 --- a/sd/source/ui/func/bulmaper.cxx +++ b/sd/source/ui/func/bulmaper.cxx @@ -54,8 +54,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx index 5bb4942b8ea5..c3071461c7e3 100644 --- a/sd/source/ui/func/fuarea.cxx +++ b/sd/source/ui/func/fuarea.cxx @@ -37,8 +37,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index 64fb3783d78d..fac03893a880 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -38,7 +38,7 @@ #include #endif #include -#include +#include #include #include "OutlineViewShell.hxx" #include "DrawViewShell.hxx" @@ -49,8 +49,8 @@ #include #include #include -#include -#include +#include +#include #ifdef IRIX #include diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx index e9654a21bcee..eb738ef0d2fa 100644 --- a/sd/source/ui/func/fucon3d.cxx +++ b/sd/source/ui/func/fucon3d.cxx @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/func/fuconarc.cxx b/sd/source/ui/func/fuconarc.cxx index 238c047ef70c..de658c401428 100644 --- a/sd/source/ui/func/fuconarc.cxx +++ b/sd/source/ui/func/fuconarc.cxx @@ -35,8 +35,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx index ff95b7b3115b..1e16ac4c332c 100644 --- a/sd/source/ui/func/fuconbez.cxx +++ b/sd/source/ui/func/fuconbez.cxx @@ -34,9 +34,9 @@ #include #include "fuconbez.hxx" -#include +#include #include -#include +#include #include #include #include diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx index a360effd5469..a9f1445097e4 100644 --- a/sd/source/ui/func/fuconcs.cxx +++ b/sd/source/ui/func/fuconcs.cxx @@ -40,7 +40,7 @@ #include #include "app.hrc" -#include +#include #include #include #include @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include @@ -73,7 +73,7 @@ // #109583# #include #include -#include +#include #include #include "sdresid.hxx" diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index a36b6f508534..d9513f4b5c22 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -40,7 +40,7 @@ #include #include "app.hrc" -#include +#include #include #include #include @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx index 3f9d8151ef4e..28531c7bef47 100644 --- a/sd/source/ui/func/fuconstr.cxx +++ b/sd/source/ui/func/fuconstr.cxx @@ -34,7 +34,7 @@ #include "fuconstr.hxx" #include -#include +#include #include #include #include diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx index ef98942a581f..512ccdb53623 100644 --- a/sd/source/ui/func/fuconuno.cxx +++ b/sd/source/ui/func/fuconuno.cxx @@ -32,11 +32,11 @@ #include "precompiled_sd.hxx" #include "fuconuno.hxx" -#include +#include #include #include #include -#include +#include #include diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx index 6c6c0c3aaa81..7da8b98ea568 100644 --- a/sd/source/ui/func/fudraw.cxx +++ b/sd/source/ui/func/fudraw.cxx @@ -76,7 +76,7 @@ #include "sdresid.hxx" #include "drawview.hxx" #include "fusel.hxx" -#include +#include #include #include "slideshow.hxx" #include diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx index d23493de4249..24ed231ea25b 100644 --- a/sd/source/ui/func/fuediglu.cxx +++ b/sd/source/ui/func/fuediglu.cxx @@ -32,7 +32,7 @@ #include "precompiled_sd.hxx" #include "fuediglu.hxx" -#include +#include #include #include #include diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx index 0babfc9c2d38..42576f8d9d53 100644 --- a/sd/source/ui/func/fuhhconv.cxx +++ b/sd/source/ui/func/fuhhconv.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index dfff1da8207e..578830b37c25 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -44,12 +44,12 @@ #include #include -#include +#include #include #include #include -#include +#include #include #include #include @@ -64,7 +64,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index 0dea41e10ca9..a6dad3779ab7 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -38,7 +38,7 @@ #ifndef _EDITENG_HXX #include #endif -#include +#include #include #include #include @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx index 8e7d6c6b5b86..0ad0d84f19a5 100644 --- a/sd/source/ui/func/fuline.cxx +++ b/sd/source/ui/func/fuline.cxx @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index 694f1ae6615a..5083023efdde 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -46,7 +46,7 @@ #ifndef _MSGBOX_HXX //autogen #include #endif -#include +#include #include "svx/xtable.hxx" #include "strings.hrc" diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx index 29bc28e91e17..a16e6dbb20dd 100644 --- a/sd/source/ui/func/fuolbull.cxx +++ b/sd/source/ui/func/fuolbull.cxx @@ -34,11 +34,11 @@ #include "fuolbull.hxx" #include -#include +#include #include #include #include -#include +#include #include #include diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 10653e514697..284b4da2be66 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -40,14 +40,14 @@ #include #include -#include +#include #ifndef _MSGBOX_HXX //autogen #include #endif #include -#include +#include #include -#include +#include #include #ifndef _SVX_SVDORECT_HXX #include @@ -59,7 +59,7 @@ #include #include #include -#include +#include #include #include diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index c6b8f9feaab2..936802ff34cb 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -35,7 +35,7 @@ #include "fupoor.hxx" #include -#include +#include #include #include #include diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx index 6975aa66fba9..7fd48732ccc4 100644 --- a/sd/source/ui/func/fuprlout.cxx +++ b/sd/source/ui/func/fuprlout.cxx @@ -35,8 +35,8 @@ #include "fuprlout.hxx" #include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx index b1d43699e27b..d4f6dc71cc88 100644 --- a/sd/source/ui/func/fuprobjs.cxx +++ b/sd/source/ui/func/fuprobjs.cxx @@ -36,9 +36,9 @@ #ifndef _MSGBOX_HXX //autogen #include #endif -#include +#include #include -#include +#include #include "app.hrc" diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 4e91ef79dc9a..fe97b7410ee7 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -40,15 +40,15 @@ #include #include "drawview.hxx" #include -#include +#include #include #include #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx index 6b79046a9bf8..b10f539cf29e 100644 --- a/sd/source/ui/func/fusldlg.cxx +++ b/sd/source/ui/func/fusldlg.cxx @@ -33,7 +33,7 @@ #include "fusldlg.hxx" -#include +#include #ifndef _MSGBOX_HXX //autogen #include #endif diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index 28bb58538d85..9f0214668f82 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -32,7 +32,7 @@ #include "precompiled_sd.hxx" #include "fusnapln.hxx" -#include +#include #include #include diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index d9ebadd48ac7..e53d6d9d7789 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -42,7 +42,7 @@ #include #include // fuer SID_OBJECT_SELECT #include -#include +#include #include #include #include diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 86cfb6be3a77..0f94366f1c56 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -39,14 +39,14 @@ #include #include #include -#include -#include +#include +#include #include #ifndef _SVDOGROUP_HXX //autogen #include #endif #include -#include +#include #include #include #include diff --git a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx index abe492991067..e408b70b755a 100644 --- a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx +++ b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx @@ -33,8 +33,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/inc/EventMultiplexer.hxx b/sd/source/ui/inc/EventMultiplexer.hxx index 79e33452959c..5627612aec06 100644 --- a/sd/source/ui/inc/EventMultiplexer.hxx +++ b/sd/source/ui/inc/EventMultiplexer.hxx @@ -31,7 +31,7 @@ #ifndef SD_TOOLS_EVENT_MULTIPLEXER_HXX #define SD_TOOLS_EVENT_MULTIPLEXER_HXX -#include +#include #include #include diff --git a/sd/source/ui/inc/FormShellManager.hxx b/sd/source/ui/inc/FormShellManager.hxx index c919e5f95c91..9956d8dc2af9 100644 --- a/sd/source/ui/inc/FormShellManager.hxx +++ b/sd/source/ui/inc/FormShellManager.hxx @@ -34,7 +34,7 @@ #include #include -#include +#include class VclWindowEvent; class FmFormShell; diff --git a/sd/source/ui/inc/PreviewRenderer.hxx b/sd/source/ui/inc/PreviewRenderer.hxx index c508410045aa..7211a02da6f4 100644 --- a/sd/source/ui/inc/PreviewRenderer.hxx +++ b/sd/source/ui/inc/PreviewRenderer.hxx @@ -34,7 +34,7 @@ #include "drawview.hxx" #include #include -#include +#include #include diff --git a/sd/source/ui/inc/ViewShellHint.hxx b/sd/source/ui/inc/ViewShellHint.hxx index 23ff29c7f8de..493d2c2e2a19 100644 --- a/sd/source/ui/inc/ViewShellHint.hxx +++ b/sd/source/ui/inc/ViewShellHint.hxx @@ -31,7 +31,7 @@ #ifndef SD_VIEW_SHELL_HINT_HXX #define SD_VIEW_SHELL_HINT_HXX -#include +#include namespace sd { diff --git a/sd/source/ui/inc/WindowUpdater.hxx b/sd/source/ui/inc/WindowUpdater.hxx index 7b61c37adb45..a6c37a54991a 100644 --- a/sd/source/ui/inc/WindowUpdater.hxx +++ b/sd/source/ui/inc/WindowUpdater.hxx @@ -31,8 +31,8 @@ #ifndef SD_OUTPUT_DEVICE_UPDATER_HXX #define SD_OUTPUT_DEVICE_UPDATER_HXX -#include -#include +#include +#include #include "sddllapi.h" #ifndef INCLUDED_VECTOR @@ -65,7 +65,7 @@ class ViewShell; this document is reformatted when the monitored option changes.

*/ class SD_DLLPUBLIC WindowUpdater - : public SfxListener + : public utl::ConfigurationListener { public: explicit WindowUpdater (void); @@ -116,7 +116,7 @@ public: /** Callback that waits for notifications of a SvtCTLOptions object. */ - virtual void Notify (SfxBroadcaster& rBC, const SfxHint& rHint); + virtual void ConfigurationChanged ( utl::ConfigurationBroadcaster*, sal_uInt32 nHint); private: /// Options to monitor for changes. diff --git a/sd/source/ui/inc/diactrl.hxx b/sd/source/ui/inc/diactrl.hxx index b6e1b2dc9fbd..df235a66c71d 100644 --- a/sd/source/ui/inc/diactrl.hxx +++ b/sd/source/ui/inc/diactrl.hxx @@ -32,7 +32,7 @@ #define _SD_DIACTRL_HXX #include "dlgctrls.hxx" -#include +#include #include #include #include diff --git a/sd/source/ui/inc/docprev.hxx b/sd/source/ui/inc/docprev.hxx index 746df06794ea..80f219ddfc59 100644 --- a/sd/source/ui/inc/docprev.hxx +++ b/sd/source/ui/inc/docprev.hxx @@ -37,7 +37,7 @@ #include -#include +#include #include #include "fadedef.h" #include "sddllapi.h" diff --git a/sd/source/ui/inc/formatclipboard.hxx b/sd/source/ui/inc/formatclipboard.hxx index 67f77e2a406b..cd8d3b801bf8 100644 --- a/sd/source/ui/inc/formatclipboard.hxx +++ b/sd/source/ui/inc/formatclipboard.hxx @@ -33,7 +33,7 @@ #include "View.hxx" // header for class SfxItemSet -#include +#include //----------------------------------------------------------------------------- /** This class acts as data container and execution class for the format paintbrush feature in draw and impress. diff --git a/sd/source/ui/inc/fuconuno.hxx b/sd/source/ui/inc/fuconuno.hxx index c5feb07dcab6..49e98cd36e73 100644 --- a/sd/source/ui/inc/fuconuno.hxx +++ b/sd/source/ui/inc/fuconuno.hxx @@ -31,7 +31,7 @@ #ifndef SD_FU_CONSTRUCT_UNO_CONTROL_HXX #define SD_FU_CONSTRUCT_UNO_CONTROL_HXX -#include +#include #include "fuconstr.hxx" namespace sd { diff --git a/sd/source/ui/inc/fuformatpaintbrush.hxx b/sd/source/ui/inc/fuformatpaintbrush.hxx index 44b6548b50ce..223b766296c5 100644 --- a/sd/source/ui/inc/fuformatpaintbrush.hxx +++ b/sd/source/ui/inc/fuformatpaintbrush.hxx @@ -34,7 +34,7 @@ #include "fupoor.hxx" // header for class SfxItemSet -#include +#include namespace sd { diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx index a67c91948617..a69381d784df 100644 --- a/sd/source/ui/inc/optsitem.hxx +++ b/sd/source/ui/inc/optsitem.hxx @@ -85,6 +85,7 @@ public: virtual ~SdOptionsItem(); virtual void Commit(); + virtual void Notify( const com::sun::star::uno::Sequence& aPropertyNames); ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetProperties( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames ); diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx index 4fc2c12ad71b..182d2f68ac54 100644 --- a/sd/source/ui/inc/sdtreelb.hxx +++ b/sd/source/ui/inc/sdtreelb.hxx @@ -40,7 +40,7 @@ #include "sddllapi.h" #include #include -#include +#include #include #include "sdxfer.hxx" diff --git a/sd/source/ui/inc/sdxfer.hxx b/sd/source/ui/inc/sdxfer.hxx index 6ad9be896829..59a3a192907b 100644 --- a/sd/source/ui/inc/sdxfer.hxx +++ b/sd/source/ui/inc/sdxfer.hxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include // ------------------ // - SdTransferable - diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx index a29397a363af..a4dc305d6aeb 100644 --- a/sd/source/ui/inc/unomodel.hxx +++ b/sd/source/ui/inc/unomodel.hxx @@ -52,7 +52,7 @@ #include -#include +#include #include #include diff --git a/sd/source/ui/notes/EditWindow.cxx b/sd/source/ui/notes/EditWindow.cxx index 89c45decd123..10c4b58fd999 100755 --- a/sd/source/ui/notes/EditWindow.cxx +++ b/sd/source/ui/notes/EditWindow.cxx @@ -41,7 +41,7 @@ #include #include #include "sdresid.hxx" -#include +#include #include #include #include diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index 2fc4245269ec..8890c608f17f 100644 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -35,8 +35,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx index 911d31d2518f..3fad355c915a 100644 --- a/sd/source/ui/slideshow/showwin.cxx +++ b/sd/source/ui/slideshow/showwin.cxx @@ -35,7 +35,7 @@ #include "showwindow.hxx" -#include +#include #include diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 6d5e3e31ad80..f1cb2cf4afb9 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index c0b4857f3f6b..a3d117322e84 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -46,8 +46,8 @@ #include #include #include -#include -#include +#include +#include #include diff --git a/sd/source/ui/slidesorter/controller/SlsListener.hxx b/sd/source/ui/slidesorter/controller/SlsListener.hxx index f91c7337713a..6ace8ebdd370 100644 --- a/sd/source/ui/slidesorter/controller/SlsListener.hxx +++ b/sd/source/ui/slidesorter/controller/SlsListener.hxx @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index ba8dbb278ca4..a23c1d09a9e0 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -88,10 +88,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index 3cd696e4bb26..e877b41d3738 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -60,7 +60,7 @@ #include "sdresid.hxx" #include "glob.hrc" -#include +#include #include #include #include @@ -72,10 +72,10 @@ #include #include #include -#include +#include #ifndef _SFXITEMPOOL_HXX -#include +#include #endif using namespace std; diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 11cfdbb65ef0..b2adb8cc040e 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -50,7 +50,7 @@ #include //#include -#include +#include #include #include diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index e2f923424831..1d1d38df82bf 100644 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -57,12 +57,12 @@ #include #include -#include +#include #include #include #include #include -#include +#include #include "framework/FrameworkHelper.hxx" #include "app.hrc" diff --git a/sd/source/ui/table/tableobjectbar.cxx b/sd/source/ui/table/tableobjectbar.cxx index 2eaf13ea470f..abae004cb73a 100644 --- a/sd/source/ui/table/tableobjectbar.cxx +++ b/sd/source/ui/table/tableobjectbar.cxx @@ -39,8 +39,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx index 7a39f1c42f15..e769d4b5180d 100644 --- a/sd/source/ui/toolpanel/LayoutMenu.cxx +++ b/sd/source/ui/toolpanel/LayoutMenu.cxx @@ -61,7 +61,7 @@ #include #include "sdresid.hxx" #include -#include +#include #include #include "taskpane/TitledControl.hxx" #include diff --git a/sd/source/ui/toolpanel/TitleBar.cxx b/sd/source/ui/toolpanel/TitleBar.cxx index c4dd6537c9ce..c0e605cac79e 100644 --- a/sd/source/ui/toolpanel/TitleBar.cxx +++ b/sd/source/ui/toolpanel/TitleBar.cxx @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx index 03795e0e2d71..f78bbdfa0308 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx @@ -60,8 +60,8 @@ #include "DrawDocShell.hxx" #include "drawdoc.hxx" #include "sdpage.hxx" -#include -#include +#include +#include #include "sdresid.hxx" #include "tools/TimerBasedTaskExecution.hxx" #include "pres.hxx" diff --git a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx index 7e0c3b2887c0..cf0992596c64 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx index 9356dac3f7f9..9b419c9924ec 100644 --- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx @@ -62,12 +62,12 @@ #include "drawview.hxx" #endif #include -#include +#include #include #include #include -#include -#include +#include +#include #include #include #include @@ -76,7 +76,7 @@ #include "stlpool.hxx" #include "unmovss.hxx" #include -#include +#include using namespace ::sd::toolpanel::controls; #define MasterPagesSelector diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx index 60968fa9a51c..a59b63a3df10 100644 --- a/sd/source/ui/unoidl/sddetect.cxx +++ b/sd/source/ui/unoidl/sddetect.cxx @@ -63,10 +63,10 @@ #include #include -#include +#include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index a1a8a4f4dabb..5fedbcd717b3 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -40,8 +40,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index a252e2302b59..dbf0e8a424a5 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -54,7 +54,7 @@ #ifndef _SVX_SVXIDS_HRC #include #endif -#include +#include #include #include #include @@ -68,7 +68,7 @@ #include #include #include -#include +#include #include #include diff --git a/sd/source/ui/unoidl/unopage.hxx b/sd/source/ui/unoidl/unopage.hxx index a1d9e0436e98..5d4c76bd9e82 100644 --- a/sd/source/ui/unoidl/unopage.hxx +++ b/sd/source/ui/unoidl/unopage.hxx @@ -39,7 +39,7 @@ #include #include -#include +#include #ifndef _SVX_UNOPAGE_HXX #include diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index 0808221582f1..5150afb2d10f 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include diff --git a/sd/source/ui/view/GraphicObjectBar.cxx b/sd/source/ui/view/GraphicObjectBar.cxx index 9e34bc4e3f39..32f5de8594ba 100644 --- a/sd/source/ui/view/GraphicObjectBar.cxx +++ b/sd/source/ui/view/GraphicObjectBar.cxx @@ -35,8 +35,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include diff --git a/sd/source/ui/view/MediaObjectBar.cxx b/sd/source/ui/view/MediaObjectBar.cxx index c05c55c0d6de..510d4a6fccca 100644 --- a/sd/source/ui/view/MediaObjectBar.cxx +++ b/sd/source/ui/view/MediaObjectBar.cxx @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/sd/source/ui/view/PrintManager.cxx b/sd/source/ui/view/PrintManager.cxx index 797518473ebd..3963c4cb5273 100644 --- a/sd/source/ui/view/PrintManager.cxx +++ b/sd/source/ui/view/PrintManager.cxx @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include #include "WindowUpdater.hxx" @@ -71,7 +71,7 @@ #include "printdlg.hrc" #include "prntopts.hrc" #include "app.hrc" -#include +#include #include #include #include "printdialog.hxx" @@ -368,7 +368,7 @@ USHORT PrintManager::Print (SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* p if( pPrintOpts ) { - SfxMiscCfg* pMisc = SFX_APP()->GetMiscConfig(); + ::utl::MiscCfg aMisc; if( pPrintOpts->GetOptionsPrint().IsDate() ) { @@ -398,9 +398,9 @@ USHORT PrintManager::Print (SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* p ePageKind = PK_NOTES; } - pPrintOpts->GetOptionsPrint().SetWarningPrinter( pMisc->IsNotFoundWarning() ); - pPrintOpts->GetOptionsPrint().SetWarningSize( pMisc->IsPaperSizeWarning() ); - pPrintOpts->GetOptionsPrint().SetWarningOrientation( pMisc->IsPaperOrientationWarning() ); + pPrintOpts->GetOptionsPrint().SetWarningPrinter( aMisc.IsNotFoundWarning() ); + pPrintOpts->GetOptionsPrint().SetWarningSize( aMisc.IsPaperSizeWarning() ); + pPrintOpts->GetOptionsPrint().SetWarningOrientation( aMisc.IsPaperOrientationWarning() ); UINT16 nQuality = pPrintOpts->GetOptionsPrint().GetOutputQuality(); ULONG nMode = DRAWMODE_DEFAULT; diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx index 286132c304c0..487794816270 100644 --- a/sd/source/ui/view/ToolBarManager.cxx +++ b/sd/source/ui/view/ToolBarManager.cxx @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 25fca9e0bae7..2bcddeb6aaef 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -83,7 +83,7 @@ #include #include #include -#include +#include #include #include "fubullet.hxx" diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx index 3afef14deeed..75b728c7849b 100644 --- a/sd/source/ui/view/ViewShellImplementation.cxx +++ b/sd/source/ui/view/ViewShellImplementation.cxx @@ -60,7 +60,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/view/WindowUpdater.cxx b/sd/source/ui/view/WindowUpdater.cxx index 64e93aee785e..135c6974f64e 100644 --- a/sd/source/ui/view/WindowUpdater.cxx +++ b/sd/source/ui/view/WindowUpdater.cxx @@ -42,7 +42,7 @@ #endif #include #include -#include +#include #include @@ -52,7 +52,7 @@ WindowUpdater::WindowUpdater (void) : mpViewShell (NULL), mpDocument (NULL) { - StartListening (maCTLOptions); + maCTLOptions.AddListener(this); } @@ -60,7 +60,7 @@ WindowUpdater::WindowUpdater (void) WindowUpdater::~WindowUpdater (void) throw () { - EndListening (maCTLOptions); + maCTLOptions.RemoveListener(this); } @@ -163,33 +163,29 @@ void WindowUpdater::UpdateWindow (OutputDevice* pDevice) const -void WindowUpdater::Notify (SfxBroadcaster&, const SfxHint& rHint) +void WindowUpdater::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) { - const SfxSimpleHint& rSimpleHint = static_cast(rHint); - if (rSimpleHint.GetId() == SFX_HINT_CTL_SETTINGS_CHANGED) - { - // #110094#-7 - // Clear the master page cache so that master pages will be redrawn. - //if (mpViewShell != NULL) - //{ - // SdView* pView = mpViewShell->GetView(); - // if (pView != NULL) - // pView->ReleaseMasterPagePaintCache (); - //} - // Set the current state at all registered output devices. - tWindowList::iterator aWindowIterator (maWindowList.begin()); - while (aWindowIterator != maWindowList.end()) - Update (*aWindowIterator++); - - // Reformat the document for the modified state to take effect. - if (mpDocument != NULL) - mpDocument->ReformatAllTextObjects(); - - // Invalidate the windows to make the modified state visible. - aWindowIterator = maWindowList.begin(); - while (aWindowIterator != maWindowList.end()) - (*aWindowIterator++)->Invalidate(); - } + // #110094#-7 + // Clear the master page cache so that master pages will be redrawn. + //if (mpViewShell != NULL) + //{ + // SdView* pView = mpViewShell->GetView(); + // if (pView != NULL) + // pView->ReleaseMasterPagePaintCache (); + //} + // Set the current state at all registered output devices. + tWindowList::iterator aWindowIterator (maWindowList.begin()); + while (aWindowIterator != maWindowList.end()) + Update (*aWindowIterator++); + + // Reformat the document for the modified state to take effect. + if (mpDocument != NULL) + mpDocument->ReformatAllTextObjects(); + + // Invalidate the windows to make the modified state visible. + aWindowIterator = maWindowList.begin(); + while (aWindowIterator != maWindowList.end()) + (*aWindowIterator++)->Invalidate(); } diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 45a22dd9f56b..dfbd76e4a3b6 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -36,7 +36,7 @@ #endif #include #include -#include +#include #include #ifndef _VIEW3D_HXX //autogen #include @@ -48,12 +48,12 @@ #include #include #include -#include +#include #include #include -#include +#include #include -#include +#include #include #include diff --git a/sd/source/ui/view/drbezob.cxx b/sd/source/ui/view/drbezob.cxx index a638af2638c3..463c7415e853 100644 --- a/sd/source/ui/view/drbezob.cxx +++ b/sd/source/ui/view/drbezob.cxx @@ -39,10 +39,10 @@ #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index 55980ff02050..5a2b458341c9 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -39,14 +39,14 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 9c2733c933dd..2a29ecbc6d6c 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -46,9 +46,9 @@ #endif #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -65,14 +65,14 @@ #include #include #include -#include +#include #ifndef _SVX_SRIPTTYPEITEM_HXX //autogen #include #endif #include #include #include -#include +#include #include "app.hrc" diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 27d5f6202369..812bfca1a83d 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 87374cce8c04..54e0f37a1b19 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -51,13 +51,13 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 85706fb9cbb6..52a0a2e6b3cb 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -35,7 +35,7 @@ #include "DrawViewShell.hxx" #include -#include +#include #include #include #include diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 91136028fd4d..cfe52759033a 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -46,11 +46,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -58,11 +58,11 @@ #include // #UndoRedo# -#include +#include #include #include #include -#include +#include #include #include diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx index b5644418fdf2..0e39b4a82b33 100644 --- a/sd/source/ui/view/drviews9.cxx +++ b/sd/source/ui/view/drviews9.cxx @@ -47,10 +47,10 @@ #ifndef _SFX_DISPATCH_HXX //autogen #include #endif -#include +#include #include #include -#include +#include #ifndef _SVXIDS_HXX #include #endif @@ -60,7 +60,7 @@ #include #include #include -#include +#include #include #include diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 3c396db7207d..2eb4282bb6e5 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -42,14 +42,14 @@ #include #endif #include -#include -#include +#include +#include #include #include #include #include #include -#include +#include #ifndef _SVX_DIALOGS_HRC #include diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx index d8dbc451f0c3..3581fde618a7 100644 --- a/sd/source/ui/view/drviewsc.cxx +++ b/sd/source/ui/view/drviewsc.cxx @@ -53,7 +53,7 @@ #endif #include #include -#include +#include #include #include #include "stlsheet.hxx" diff --git a/sd/source/ui/view/drviewsd.cxx b/sd/source/ui/view/drviewsd.cxx index 9838f185807f..0d90619ff76a 100644 --- a/sd/source/ui/view/drviewsd.cxx +++ b/sd/source/ui/view/drviewsd.cxx @@ -36,10 +36,10 @@ #ifndef _SVXIDS_HRC #include #endif -#include -#include +#include +#include #include -#include +#include #include #include #include diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 0b3ecf1af6e7..f722f1b56477 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -40,10 +40,10 @@ #include "undo/undomanager.hxx" #include -#include +#include #include #include -#include +#include #include #include #include @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include #include @@ -64,11 +64,11 @@ #include #include #include -#include +#include #include #include #include -#include +#include #include #include diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 2b1b7518666c..3783f20a49ef 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -47,9 +47,9 @@ #include #endif #include -#include -#include -#include +#include +#include +#include #include #ifndef _BINDING_HXX //autogen #include @@ -63,7 +63,7 @@ #include #include #include -#include +#include #ifndef SD_FRAME_VIEW #include "FrameView.hxx" diff --git a/sd/source/ui/view/drviewsh.cxx b/sd/source/ui/view/drviewsh.cxx index f4fa1d027fd9..7952106e34e0 100644 --- a/sd/source/ui/view/drviewsh.cxx +++ b/sd/source/ui/view/drviewsh.cxx @@ -32,8 +32,8 @@ #include "precompiled_sd.hxx" #include "DrawViewShell.hxx" -#include -#include +#include +#include #include #ifndef _SVXIDS_HRC #include diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx index 703677d05415..4eb0b6671d82 100644 --- a/sd/source/ui/view/drviewsi.cxx +++ b/sd/source/ui/view/drviewsi.cxx @@ -34,7 +34,7 @@ #include "DrawViewShell.hxx" #include #include "sdattr.hxx" -#include +#include #include #include #include diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx index cdc5fac18912..c21432b27846 100644 --- a/sd/source/ui/view/drviewsj.cxx +++ b/sd/source/ui/view/drviewsj.cxx @@ -33,7 +33,7 @@ #include "DrawViewShell.hxx" #include -#include +#include #ifndef _SVXIDS_HRC //autogen #include #endif diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index 6b078c5f28cc..468ea50776f2 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -40,7 +40,7 @@ #include #include #include -#include +#include #ifndef _ZOOMITEM_HXX //autogen #include #endif diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index d14f6ed9dc34..43a8683cd039 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -55,9 +55,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include #include @@ -67,7 +67,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 1e5564427ac8..c500a95f2811 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -46,11 +46,11 @@ #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/view/sdruler.cxx b/sd/source/ui/view/sdruler.cxx index 52e098caf7f3..8fc564c358f6 100644 --- a/sd/source/ui/view/sdruler.cxx +++ b/sd/source/ui/view/sdruler.cxx @@ -32,7 +32,7 @@ #include "precompiled_sd.hxx" #include "Ruler.hxx" -#include +#include #include #ifndef _SVXIDS_HXX //autogen #include diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 0a17724df1ed..49a5639980ff 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -52,8 +52,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 1e9e39383bec..cbc8758d2b53 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -40,7 +40,7 @@ #ifndef _EDITDATA_HXX #include #endif -#include +#include #include #include #include @@ -55,7 +55,7 @@ #include #include #include -#include +#include #include #ifndef _FM_FMMODEL_HXX #include diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 72534b476a73..9d301368418c 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index 38e2b6b88001..86e441939b0e 100644 --- a/sd/source/ui/view/viewshe3.cxx +++ b/sd/source/ui/view/viewshe3.cxx @@ -59,11 +59,10 @@ #include #include #include -#include #include #include -#include -#include +#include +#include #include #include #include @@ -92,7 +91,7 @@ #include #endif #include -#include +#include #include using namespace ::com::sun::star; diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 208d5426c8bd..7effb79a00b1 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -48,7 +48,7 @@ #ifndef _SCRBAR_HXX //autogen #include #endif -#include +#include #include #ifndef _SVXIDS_HXX #include @@ -90,7 +90,7 @@ #include // #96090# -#include +#include #include #include "SpellDialogChildWindow.hxx" -- cgit v1.2.3 From 83168b2ff90cf04ee9f5b5f6408d184f2709f26e Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Fri, 16 Oct 2009 13:24:22 +0000 Subject: #i48179# Resolved merge problems. --- slideshow/source/engine/activities/activitiesfactory.cxx | 2 ++ slideshow/source/engine/slideshowimpl.cxx | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/slideshow/source/engine/activities/activitiesfactory.cxx b/slideshow/source/engine/activities/activitiesfactory.cxx index 745e956c19e0..398a813a62aa 100644 --- a/slideshow/source/engine/activities/activitiesfactory.cxx +++ b/slideshow/source/engine/activities/activitiesfactory.cxx @@ -289,6 +289,8 @@ public: BaseType::getNumberOfKeyTimes() ) ) ) ); } + using BaseType::isAutoReverse; + virtual void performEnd() { // xxx todo: good guess diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 9a4878f43d59..88637a431282 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -1954,11 +1954,7 @@ void SlideShowImpl::notifySlideAnimationsEnded() // schedule a slide end event, with automatic mode's // delay aNotificationEvents = makeInterruptableDelay( -<<<<<<< .working - boost::bind( &SlideShowImpl::notifySlideEnded, this, false ), -======= - boost::bind( boost::mem_fn(&SlideShowImpl::notifySlideEnded), this ), ->>>>>>> .merge-right.r276697 + boost::bind( boost::mem_fn(&SlideShowImpl::notifySlideEnded), this, false ), maEventMultiplexer.getAutomaticTimeout() ); } else -- cgit v1.2.3 From f87c43295d76721452e9d2319f8d5f5af884499b Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Fri, 16 Oct 2009 15:00:36 +0000 Subject: #i105958# Fixed throw part of declaration of getAccessibleChild(). --- sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx | 8 +------- sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx | 11 +---------- sd/source/ui/inc/AccessibleDocumentViewBase.hxx | 4 +++- sd/source/ui/inc/AccessibleDrawDocumentView.hxx | 4 ++-- 4 files changed, 7 insertions(+), 20 deletions(-) diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx index 2f86b8f8f1ad..55d485e7b08b 100644 --- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx +++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx @@ -39,17 +39,11 @@ #include #include #include -#ifndef _COM_SUN_STAR_ACCESSIBLE_ACCESSIBLEEVENTID_HPP_ #include -#endif #include -#ifndef _COM_SUN_STAR_LANG_XMULSTISERVICEFACTORY_HPP_ #include -#endif #include -#ifndef _SFXFRAME_HXX #include -#endif #include @@ -279,7 +273,7 @@ sal_Int32 SAL_CALL Reference SAL_CALL AccessibleDocumentViewBase::getAccessibleChild (sal_Int32 nIndex) - throw (uno::RuntimeException) + throw (uno::RuntimeException, lang::IndexOutOfBoundsException) { ThrowIfDisposed (); diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx index 38350f246bf1..1ea7d53ea35a 100644 --- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx @@ -40,20 +40,11 @@ #include #include #include -#ifndef _COM_SUN_STAR_ACCESSIBLE_ACCESSIBLEEVENTID_HPP_ #include -#endif -#ifndef _COM_SUN_STAR_ACCESSIBLE_ACCESSIBLESTATETYPE_HPP_ #include -#endif -#include -#ifndef _COM_SUN_STAR_LANG_XMULSTISERVICEFACTORY_HPP_ #include -#endif #include -#ifndef _SFXFRAME_HXX #include -#endif #include @@ -243,7 +234,7 @@ sal_Int32 SAL_CALL uno::Reference SAL_CALL AccessibleDrawDocumentView::getAccessibleChild (sal_Int32 nIndex) - throw (::com::sun::star::uno::RuntimeException) + throw (uno::RuntimeException, lang::IndexOutOfBoundsException) { ThrowIfDisposed (); diff --git a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx index c0def8ca27a4..e371da534b67 100644 --- a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx +++ b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx @@ -42,6 +42,7 @@ #include #include #include +#include #include namespace sd { @@ -159,7 +160,8 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL getAccessibleChild (sal_Int32 nIndex) - throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, + ::com::sun::star::lang::IndexOutOfBoundsException); //===== XAccessibleComponent ============================================ diff --git a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx index 74aef069d7f5..cc09d31464a9 100644 --- a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx +++ b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx @@ -33,7 +33,6 @@ #include "AccessibleDocumentViewBase.hxx" - namespace accessibility { @@ -78,7 +77,8 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL getAccessibleChild (sal_Int32 nIndex) - throw (::com::sun::star::uno::RuntimeException); + throw (::com::sun::star::uno::RuntimeException, + ::com::sun::star::lang::IndexOutOfBoundsException); //===== lang::XEventListener ============================================ -- cgit v1.2.3 From 6301be9e1ad4b359edd3c900acd36f3552761579 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 19 Oct 2009 13:22:39 +0200 Subject: #i103496#: move some fontsubstitution stuff from vcl to unotools to get xmloff vcl free --- sd/inc/pch/precompiled_sd.hxx | 2 +- sd/source/filter/eppt/eppt.hxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index 1c236c9b290e..8250e050bcf4 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -862,7 +862,7 @@ #include "vcl/field.hxx" #include "vcl/fixed.hxx" #include "vcl/font.hxx" -#include "vcl/fontcvt.hxx" +#include "unotools/fontcvt.hxx" #include "vcl/gdimtf.hxx" #include "vcl/gfxlink.hxx" #include "vcl/gradient.hxx" diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx index 84b64e33157c..c4a55b5c4369 100644 --- a/sd/source/filter/eppt/eppt.hxx +++ b/sd/source/filter/eppt/eppt.hxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include "pptexanimations.hxx" #include -- cgit v1.2.3 From d4813204c6341ee55f51975da46ac12a1a3069bc Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Tue, 20 Oct 2009 08:39:11 +0000 Subject: #i48179# Resolved some compilation problems. --- slideshow/source/engine/slideshowimpl.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 88637a431282..18b3a8ef4102 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -1216,8 +1216,8 @@ sal_Bool SlideShowImpl::previousEffect() throw (uno::RuntimeException) { return maEffectRewinder.rewind( maScreenUpdater.createLock(false), - ::boost::bind(&SlideShowImpl::redisplayCurrentSlide, this), - ::boost::bind(&SlideShowImpl::rewindEffectToPreviousSlide, this)); + ::boost::bind(&SlideShowImpl::redisplayCurrentSlide, this), + ::boost::bind(&SlideShowImpl::rewindEffectToPreviousSlide, this)); } } @@ -2080,10 +2080,10 @@ void SlideShowImpl::notifySlideEnded (const bool bReverse) // GIF) will not be stopped. maListenerContainer.forEach( - boost::bind( + boost::bind( &presentation::XSlideShowListener::slideEnded, _1, - bReverse)); + sal_Bool(bReverse))); } bool SlideShowImpl::notifyHyperLinkClicked( rtl::OUString const& hyperLink ) -- cgit v1.2.3 From 280ea32b9dd5b975a6d94f3555145dc3898c09ec Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Tue, 20 Oct 2009 11:13:10 +0000 Subject: #i105895# Prevent old view shell from being deleted too early. --- sd/source/ui/view/Outliner.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 233976585e58..ba5836e8f1db 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -334,6 +334,9 @@ void Outliner::EndSpelling (void) { if (mbViewShellValid) { + // Keep old view shell alive until we release the outliner view. + ::boost::shared_ptr pOldViewShell (mpViewShell); + ViewShellBase* pBase = PTR_CAST(ViewShellBase,SfxViewShell::Current()); if (pBase != NULL) mpViewShell = pBase->GetMainViewShell(); -- cgit v1.2.3 From 5e668fcbac328aa89b2be2997a6c3d0f861ed88f Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 23 Oct 2009 11:21:03 +0000 Subject: #i57928# reworked formatpaintbrush feature to support more shapes and text selection --- sd/sdi/_drvwsh.sdi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index b641ab64a1a0..5021249c4ff9 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -2226,7 +2226,7 @@ interface DrawView SID_FORMATPAINTBRUSH // [ - ExecMethod = FuTemporary ; + ExecMethod = FuPermanent ; StateMethod = GetMenuState ; ] -- cgit v1.2.3 From a7d2dd5d5dcfa2056b82856a0b5a42758000a689 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 23 Oct 2009 11:25:33 +0000 Subject: #i57928# reworked formatpaintbrush feature to support more shapes and text selection --- sd/source/ui/docshell/docshell.cxx | 6 - sd/source/ui/docshell/formatclipboard.cxx | 237 ----------------------------- sd/source/ui/docshell/makefile.mk | 1 - sd/source/ui/func/fuformatpaintbrush.cxx | 242 +++++++++++++++++++++++------- sd/source/ui/inc/DrawDocShell.hxx | 4 - sd/source/ui/inc/ViewShellBase.hxx | 4 + sd/source/ui/inc/formatclipboard.hxx | 64 -------- sd/source/ui/inc/fuformatpaintbrush.hxx | 29 ++-- sd/source/ui/view/ViewShellBase.cxx | 53 +++++++ sd/source/ui/view/drviews6.cxx | 33 ---- sd/source/ui/view/drviews7.cxx | 16 +- sd/source/ui/view/drviewse.cxx | 27 +++- 12 files changed, 291 insertions(+), 425 deletions(-) delete mode 100644 sd/source/ui/docshell/formatclipboard.cxx delete mode 100644 sd/source/ui/inc/formatclipboard.hxx diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index f9381d08a219..d6cc2a000b1d 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -92,7 +92,6 @@ #include "FrameView.hxx" #endif #include "unomodel.hxx" -#include "formatclipboard.hxx" #include "undo/undomanager.hxx" #include "undo/undofactory.hxx" #include "OutlineView.hxx" @@ -169,7 +168,6 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode, BOOL bDataObject, DocumentType eDocumentType,BOOL bScriptSupport) : SfxObjectShell( eMode == SFX_CREATE_MODE_INTERNAL ? SFX_CREATE_MODE_EMBEDDED : eMode), - mpFormatClipboard(new SdFormatClipboard()), mpDoc(NULL), mpUndoManager(NULL), mpPrinter(NULL), @@ -196,7 +194,6 @@ DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode, BOOL bDataObject, DocumentType eDocumentType) : SfxObjectShell(eMode == SFX_CREATE_MODE_INTERNAL ? SFX_CREATE_MODE_EMBEDDED : eMode), - mpFormatClipboard(new SdFormatClipboard()), mpDoc(pDoc), mpUndoManager(NULL), mpPrinter(NULL), @@ -235,9 +232,6 @@ DrawDocShell::~DrawDocShell() mpDoc->SetSdrUndoManager( 0 ); delete mpUndoManager; - if(mpFormatClipboard) - delete mpFormatClipboard; - if (mbOwnPrinter) delete mpPrinter; diff --git a/sd/source/ui/docshell/formatclipboard.cxx b/sd/source/ui/docshell/formatclipboard.cxx deleted file mode 100644 index 8035e78150c7..000000000000 --- a/sd/source/ui/docshell/formatclipboard.cxx +++ /dev/null @@ -1,237 +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: formatclipboard.cxx,v $ - * $Revision: 1.10 $ - * - * 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 "formatclipboard.hxx" -#include - -// header for class SfxItemIter -#include - -// header for class SfxStyleSheet -#include - -/*-------------------------------------------------------------------- - --------------------------------------------------------------------*/ - -SdFormatClipboard::SdFormatClipboard() - : m_pItemSet(0) - , m_bPersistentCopy(false) - , m_nType_Inventor(0) - , m_nType_Identifier(0) -{ -} -SdFormatClipboard::~SdFormatClipboard() -{ - if(m_pItemSet) - delete m_pItemSet; -} - -bool SdFormatClipboard::HasContent() const -{ - return m_pItemSet!=0; -} - -bool SdFormatClipboard::CanCopyThisType( UINT32 nObjectInventor, UINT16 nObjectIdentifier ) const -{ - if( nObjectInventor != SdrInventor && nObjectInventor != E3dInventor ) - return false; - switch(nObjectIdentifier) - { - case OBJ_NONE: - case OBJ_GRUP: - return false; - case OBJ_LINE: - case OBJ_RECT: - case OBJ_CIRC: - case OBJ_SECT: - case OBJ_CARC: - case OBJ_CCUT: - case OBJ_POLY: - case OBJ_PLIN: - case OBJ_PATHLINE: - case OBJ_PATHFILL: - case OBJ_FREELINE: - case OBJ_FREEFILL: - case OBJ_SPLNLINE: - case OBJ_SPLNFILL: - case OBJ_TEXT: - case OBJ_TEXTEXT: - case OBJ_TITLETEXT: - return true; - case OBJ_OUTLINETEXT: - case OBJ_GRAF: - case OBJ_OLE2: - case OBJ_EDGE: - case OBJ_CAPTION: - return false; - case OBJ_PATHPOLY: - case OBJ_PATHPLIN: - return true; - case OBJ_PAGE: - case OBJ_MEASURE: - case OBJ_DUMMY: - case OBJ_FRAME: - case OBJ_UNO: - return false; - case OBJ_CUSTOMSHAPE: - return true; - default: - return false; - } -} - -bool SdFormatClipboard::HasContentForThisType( UINT32 nObjectInventor, UINT16 nObjectIdentifier ) const -{ - if( !HasContent() ) - return false; - if( !CanCopyThisType( nObjectInventor, nObjectIdentifier ) ) - return false; - return true; -} - -void SdFormatClipboard::Copy( ::sd::View& rDrawView, bool bPersistentCopy ) -{ - this->Erase(); - m_bPersistentCopy = bPersistentCopy; - - const SdrMarkList& rMarkList = rDrawView.GetMarkedObjectList(); - if( rMarkList.GetMarkCount() >= 1 ) - { - BOOL bOnlyHardAttr = FALSE; - m_pItemSet = new SfxItemSet( rDrawView.GetAttrFromMarked(bOnlyHardAttr) ); - - SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - m_nType_Inventor = pObj->GetObjInventor(); - m_nType_Identifier = pObj->GetObjIdentifier(); - } -} - -void SdFormatClipboard::Paste( ::sd::View& rDrawView, bool, bool ) -{ - if( !rDrawView.AreObjectsMarked() ) - { - if(!m_bPersistentCopy) - this->Erase(); - return; - } - - SdrObject* pObj = 0; - - bool bWrongTargetType = false; - { - const SdrMarkList& rMarkList = rDrawView.GetMarkedObjectList(); - if( rMarkList.GetMarkCount() != 1 ) - bWrongTargetType = true; - else - { - pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - if( pObj && pObj->GetStyleSheet() ) - bWrongTargetType = !this->HasContentForThisType( pObj->GetObjInventor(), pObj->GetObjIdentifier() ); - } - } - if( bWrongTargetType ) - { - if(!m_bPersistentCopy) - this->Erase(); - return; - } - if(m_pItemSet) - { - //modify source itemset - { - boost::shared_ptr< SfxItemSet > pTargetSet; - - if( pObj->GetStyleSheet() ) - { - pTargetSet.reset( new SfxItemSet( pObj->GetStyleSheet()->GetItemSet() ) ); - } - else - { - SdrModel* pModel = pObj->GetModel(); - if( pModel ) - { - pTargetSet.reset( new SfxItemSet( pModel->GetItemPool() ) ); - } - } - - if( pTargetSet.get() ) - { - USHORT nWhich=0; - SfxItemState nSourceState; - SfxItemState nTargetState; - const SfxPoolItem* pSourceItem=0; - const SfxPoolItem* pTargetItem=0; - SfxItemIter aSourceIter(*m_pItemSet); - pSourceItem = aSourceIter.FirstItem(); - while( pSourceItem!=NULL ) - { - if (!IsInvalidItem(pSourceItem)) - { - nWhich = pSourceItem->Which(); - if(nWhich) - { - nSourceState = m_pItemSet->GetItemState( nWhich ); - nTargetState = pTargetSet->GetItemState( nWhich ); - pTargetItem = pTargetSet->GetItem( nWhich ); - - if(!pTargetItem) - m_pItemSet->ClearItem(nWhich); - else if( (*pSourceItem) == (*pTargetItem) ) - { - //do not set items which have the same content in source and target - m_pItemSet->ClearItem(nWhich); - } - } - } - pSourceItem = aSourceIter.NextItem(); - }//end while - } - } - BOOL bReplaceAll = TRUE; - rDrawView.SetAttrToMarked(*m_pItemSet, bReplaceAll); - } - if(!m_bPersistentCopy) - this->Erase(); -} - -void SdFormatClipboard::Erase() -{ - if(m_pItemSet) - { - delete m_pItemSet; - m_pItemSet = 0; - } - m_nType_Inventor=0; - m_nType_Identifier=0; - m_bPersistentCopy = false; -} diff --git a/sd/source/ui/docshell/makefile.mk b/sd/source/ui/docshell/makefile.mk index f9e34eb03097..d33faaf69bbe 100644 --- a/sd/source/ui/docshell/makefile.mk +++ b/sd/source/ui/docshell/makefile.mk @@ -47,7 +47,6 @@ AUTOSEG=true # --- Files -------------------------------------------------------- SLOFILES = \ - $(SLO)$/formatclipboard.obj \ $(SLO)$/docshell.obj \ $(SLO)$/docshel2.obj \ $(SLO)$/docshel3.obj \ diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx index 1eaee6385175..4333429e9356 100644 --- a/sd/source/ui/func/fuformatpaintbrush.cxx +++ b/sd/source/ui/func/fuformatpaintbrush.cxx @@ -31,19 +31,30 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sd.hxx" +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + #define _SD_DLL // fuer SD_MOD() #include "sdmod.hxx" #include "fuformatpaintbrush.hxx" -#include "formatclipboard.hxx" -#include "View.hxx" -#include "ViewShell.hxx" +#include "DrawView.hxx" #include "DrawDocShell.hxx" -// header for class SfxBindings -#include -/* -#include -*/ +#include "DrawViewShell.hxx" +#include "FrameView.hxx" +#include "drawdoc.hxx" +#include "Outliner.hxx" +#include "ViewShellBase.hxx" #ifndef SD_WINDOW_SHELL_HXX #include "Window.hxx" @@ -51,66 +62,142 @@ namespace sd { -TYPEINIT1( FuFormatPaintBrush, FuPoor ); +TYPEINIT1( FuFormatPaintBrush, FuText ); -FuFormatPaintBrush::FuFormatPaintBrush( - ViewShell* pViewSh - , ::sd::Window* pWin - , ::sd::View* pView - , SdDrawDocument* pDoc - , SfxRequest& rReq ) - : FuPoor(pViewSh, pWin, pView, pDoc, rReq) +FuFormatPaintBrush::FuFormatPaintBrush( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ) +: FuText(pViewSh, pWin, pView, pDoc, rReq) +, mbPermanent( false ) { } FunctionReference FuFormatPaintBrush::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ) { FunctionReference xFunc( new FuFormatPaintBrush( pViewSh, pWin, pView, pDoc, rReq ) ); + xFunc->DoExecute( rReq ); return xFunc; } +void FuFormatPaintBrush::DoExecute( SfxRequest& rReq ) +{ + const SfxItemSet *pArgs = rReq.GetArgs(); + if( pArgs && pArgs->Count() >= 1 ) + { + mbPermanent = static_cast(((SfxBoolItem &)pArgs->Get(SID_FORMATPAINTBRUSH)).GetValue()); + } + + if( mpView ) + { + mpView->TakeFormatPaintBrush( mpItemSet ); + } +} + +void FuFormatPaintBrush::implcancel() +{ + if( mpViewShell && mpViewShell->GetViewFrame() ) + { + SfxViewFrame* pViewFrame = mpViewShell->GetViewFrame(); + pViewFrame->GetBindings().Invalidate(SID_FORMATPAINTBRUSH); + pViewFrame->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON); + } +} + +static void unmarkimpl( SdrView* pView ) +{ + pView->SdrEndTextEdit(); + pView->UnMarkAll(); +} + BOOL FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt) { if(mpView&&mpWindow) { - USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); - BOOL bToggle = FALSE; - mpView->UnMarkAll(); - mpView->MarkObj(mpWindow->PixelToLogic( rMEvt.GetPosPixel() ), nHitLog, bToggle, FALSE); + + BOOL bTextEdit = FALSE; + SdrViewEvent aVEvt; + SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); + + if( (eHit == SDRHIT_TEXTEDIT) || (eHit == SDRHIT_TEXTEDITOBJ && ( mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast< sdr::table::SdrTableObj* >( aVEvt.pObj ) != NULL ) )) + { + SdrObject* pPickObj=0; + SdrPageView* pPV=0; + USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); + mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pPickObj, pPV, SDRSEARCH_PICKMARKABLE); + + if( (pPickObj != 0) && !pPickObj->IsEmptyPresObj() ) + { + // if we text hit another shape than the one currently selected, unselect the old one now + const SdrMarkList& rMarkList = mpView->GetMarkedObjectList(); + if( rMarkList.GetMarkCount() >= 1 ) + { + if( rMarkList.GetMarkCount() == 1 ) + { + if( rMarkList.GetMark(0)->GetMarkedSdrObj() != pPickObj ) + { + + // if current selected shape is not that of the hit text edit, deselect it + unmarkimpl( mpView ); + } + } + else + { + // more than one shape selected, deselect all of them + unmarkimpl( mpView ); + } + } + MouseEvent aMEvt( rMEvt.GetPosPixel(), rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), 0 ); + return FuText::MouseButtonDown(aMEvt); + } + else + { + unmarkimpl( mpView ); + + } + } + else + { + unmarkimpl( mpView ); + + if( aVEvt.pObj && !aVEvt.pObj->IsEmptyPresObj() ) + { + USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); + BOOL bToggle = FALSE; + mpView->MarkObj(mpWindow->PixelToLogic( rMEvt.GetPosPixel() ), nHitLog, bToggle, FALSE); + return TRUE; + } + } } return FALSE; } BOOL FuFormatPaintBrush::MouseMove(const MouseEvent& rMEvt) { - SdFormatClipboard* pFormatClipboard = 0; - if(mpViewShell) - pFormatClipboard = mpViewShell->GetDocSh()->mpFormatClipboard; - if(mpView&&mpWindow&&pFormatClipboard&&pFormatClipboard->HasContent()) + BOOL bReturn = FALSE; + if( mpWindow && mpView ) { - USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); - SdrObject* pObj=0; - SdrPageView* pPV=0; - BOOL bOverMarkableObject = mpView->PickObj( - mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) - ,nHitLog, pObj, pPV, SDRSEARCH_PICKMARKABLE); - - if(bOverMarkableObject && pFormatClipboard->HasContentForThisType(pObj->GetObjInventor(),pObj->GetObjIdentifier()) ) + if ( mpView->IsTextEdit() ) + { + bReturn = FuText::MouseMove( rMEvt ); mpWindow->SetPointer(Pointer(POINTER_FILL)); + } else - mpWindow->SetPointer(Pointer(POINTER_ARROW)); + { + USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); + SdrObject* pObj=0; + SdrPageView* pPV=0; + BOOL bOverMarkableObject = mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pObj, pPV, SDRSEARCH_PICKMARKABLE); + + if(bOverMarkableObject && HasContentForThisType(pObj->GetObjInventor(),pObj->GetObjIdentifier()) && !pObj->IsEmptyPresObj() ) + mpWindow->SetPointer(Pointer(POINTER_FILL)); + else + mpWindow->SetPointer(Pointer(POINTER_ARROW)); + } } - else - mpWindow->SetPointer(Pointer(POINTER_ARROW)); - return FALSE; + return bReturn; } BOOL FuFormatPaintBrush::MouseButtonUp(const MouseEvent& rMEvt) { - SdFormatClipboard* pFormatClipboard = 0; - if(mpViewShell) - pFormatClipboard = mpViewShell->GetDocSh()->mpFormatClipboard; - if( pFormatClipboard && mpView && mpView->AreObjectsMarked() ) + if( mpItemSet.get() && mpView && mpView->AreObjectsMarked() ) { bool bNoCharacterFormats = false; bool bNoParagraphFormats = false; @@ -120,28 +207,29 @@ BOOL FuFormatPaintBrush::MouseButtonUp(const MouseEvent& rMEvt) else if( rMEvt.GetModifier() & KEY_MOD1 ) bNoParagraphFormats = true; } - pFormatClipboard->Paste( *mpView, bNoCharacterFormats, bNoParagraphFormats ); + + OutlinerView* pOLV = mpView->GetTextEditOutlinerView(); + if( pOLV ) + pOLV->MouseButtonUp(rMEvt); + + Paste( bNoCharacterFormats, bNoParagraphFormats ); if(mpViewShell) mpViewShell->GetViewFrame()->GetBindings().Invalidate(SID_FORMATPAINTBRUSH); + + if( mbPermanent ) + return TRUE; } - if(mpViewShell && pFormatClipboard && !pFormatClipboard->HasContent() ) - mpViewShell->Cancel(); + + implcancel(); return TRUE; } BOOL FuFormatPaintBrush::KeyInput(const KeyEvent& rKEvt) { - if( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE && mpViewShell ) + if( (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE) && mpViewShell ) { - SdFormatClipboard* pFormatClipboard = mpViewShell->GetDocSh()->mpFormatClipboard; - if(pFormatClipboard) - { - pFormatClipboard->Erase(); - mpViewShell->GetViewFrame()->GetBindings().Invalidate(SID_FORMATPAINTBRUSH); - mpViewShell->Cancel(); - - return TRUE; - } + implcancel(); + return TRUE; } return FuPoor::KeyInput(rKEvt); } @@ -153,4 +241,52 @@ void FuFormatPaintBrush::Activate() void FuFormatPaintBrush::Deactivate() { } + +bool FuFormatPaintBrush::HasContentForThisType( UINT32 nObjectInventor, UINT16 nObjectIdentifier ) const +{ + if( mpItemSet.get() == 0 ) + return false; + if( !mpView || (!mpView->SupportsFormatPaintbrush( nObjectInventor, nObjectIdentifier) ) ) + return false; + return true; +} + +void FuFormatPaintBrush::Paste( bool bNoCharacterFormats, bool bNoParagraphFormats ) +{ + const SdrMarkList& rMarkList = mpView->GetMarkedObjectList(); + if(mpItemSet.get() && (rMarkList.GetMarkCount() == 1) ) + { + SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); + + if( mpDoc->IsUndoEnabled() ) + { + String sLabel( mpViewShell->GetViewShellBase().RetrieveLabelFromCommand( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormatPaintbrush" ) ) ) ); + mpDoc->BegUndo( sLabel ); + mpDoc->AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoAttrObject(*pObj,FALSE,TRUE)); + } + + mpView->ApplyFormatPaintBrush( *mpItemSet.get(), bNoCharacterFormats, bNoParagraphFormats ); + + if( mpDoc->IsUndoEnabled() ) + { + mpDoc->EndUndo(); + } + } +} + +/* static */ void FuFormatPaintBrush::GetMenuState( DrawViewShell& rDrawViewShell, SfxItemSet &rSet ) +{ + const SdrMarkList& rMarkList = rDrawViewShell.GetDrawView()->GetMarkedObjectList(); + const ULONG nMarkCount = rMarkList.GetMarkCount(); + + if( nMarkCount == 1 ) + { + SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); + if( pObj && rDrawViewShell.GetDrawView()->SupportsFormatPaintbrush(pObj->GetObjInventor(),pObj->GetObjIdentifier()) ) + return; + } + rSet.DisableItem( SID_FORMATPAINTBRUSH ); +} + + } // end of namespace sd diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index fb2d83ba4be9..6348f330e081 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -52,7 +52,6 @@ class SfxPrinter; struct SdrDocumentStreamInfo; struct SpellCallbackInfo; class AbstractSvxNameDialog; -class SdFormatClipboard; namespace sd { @@ -209,9 +208,6 @@ public: void ClearUndoBuffer(); -public: - SdFormatClipboard* mpFormatClipboard; - protected: SdDrawDocument* mpDoc; diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx index 8187d308bfb8..383bd12fcdb5 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -259,6 +259,10 @@ public: CustomHandleManager& getCustomHandleManager() const; + /** returns the ui descriptive name for the given uno slot. The result is taken from the configuration + and not cached, so do not use it excessive (f.e. in status updates) */ + ::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const; + protected: osl::Mutex maMutex; diff --git a/sd/source/ui/inc/formatclipboard.hxx b/sd/source/ui/inc/formatclipboard.hxx deleted file mode 100644 index 67f77e2a406b..000000000000 --- a/sd/source/ui/inc/formatclipboard.hxx +++ /dev/null @@ -1,64 +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: formatclipboard.hxx,v $ - * $Revision: 1.4 $ - * - * 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 _SDFORMATCLIPBOARD_HXX -#define _SDFORMATCLIPBOARD_HXX - -#include "View.hxx" -// header for class SfxItemSet -#include - -//----------------------------------------------------------------------------- -/** This class acts as data container and execution class for the format paintbrush feature in draw and impress. -*/ - -class SdFormatClipboard -{ -public: - SdFormatClipboard(); - virtual ~SdFormatClipboard(); - - bool HasContent() const; - bool CanCopyThisType( UINT32 nObjectInventor, UINT16 nObjectIdentifier ) const; - bool HasContentForThisType( UINT32 nObjectInventor, UINT16 nObjectIdentifier ) const; - - void Copy( ::sd::View& rDrawView, bool bPersistentCopy=false ); - void Paste( ::sd::View& rDrawView - , bool bNoCharacterFormats=false, bool bNoParagraphFormats=false ); - void Erase(); - -private: - SfxItemSet* m_pItemSet; - bool m_bPersistentCopy; - UINT32 m_nType_Inventor; - UINT16 m_nType_Identifier; -}; - -#endif diff --git a/sd/source/ui/inc/fuformatpaintbrush.hxx b/sd/source/ui/inc/fuformatpaintbrush.hxx index 44b6548b50ce..c1d0fb9318ca 100644 --- a/sd/source/ui/inc/fuformatpaintbrush.hxx +++ b/sd/source/ui/inc/fuformatpaintbrush.hxx @@ -31,15 +31,19 @@ #ifndef SD_FU_FORMATPAINTBRUSH_HXX #define SD_FU_FORMATPAINTBRUSH_HXX -#include "fupoor.hxx" +#include "futext.hxx" // header for class SfxItemSet #include +#include + +class SfxItemSet; namespace sd { -class FuFormatPaintBrush - : public FuPoor +class DrawViewShell; + +class FuFormatPaintBrush : public FuText { public: TYPEINFO(); @@ -54,14 +58,21 @@ public: virtual void Activate(); virtual void Deactivate(); + static void GetMenuState( DrawViewShell& rDrawViewShell, SfxItemSet &rSet ); + static bool CanCopyThisType( UINT32 nObjectInventor, UINT16 nObjectIdentifier ); + private: - FuFormatPaintBrush ( - ViewShell* pViewSh, - ::sd::Window* pWin, - ::sd::View* pView, - SdDrawDocument* pDoc, - SfxRequest& rReq); + FuFormatPaintBrush ( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq); + + void DoExecute( SfxRequest& rReq ); + + bool HasContentForThisType( UINT32 nObjectInventor, UINT16 nObjectIdentifier ) const; + void Paste( bool, bool ); + + void implcancel(); + ::boost::shared_ptr mpItemSet; + bool mbPermanent; }; } // end of namespace sd diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 25fca9e0bae7..bbf1b69ad68a 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -31,6 +31,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sd.hxx" +#include + +#include +#include +#include +#include + #include "ViewShellBase.hxx" #include #include "EventMultiplexer.hxx" @@ -94,6 +101,11 @@ using namespace sd; using ::sd::framework::FrameworkHelper; using ::rtl::OUString; +using namespace com::sun::star::uno; +using namespace com::sun::star::frame; +using namespace com::sun::star::container; +using namespace com::sun::star::lang; +using namespace com::sun::star::beans; namespace { @@ -1210,6 +1222,47 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const return *mpImpl->mpCustomHandleManager.get(); } +::rtl::OUString ViewShellBase::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const +{ + ::rtl::OUString aLabel; + + if ( aCmdURL.getLength() > 0 ) try + { + Reference< XMultiServiceFactory > xServiceManager( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW ); + + Reference< XModuleManager > xModuleManager( xServiceManager->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager") ) ), UNO_QUERY_THROW ); + Reference< XInterface > xIfac( GetMainViewShell()->GetViewFrame()->GetFrame()->GetFrameInterface(), UNO_QUERY_THROW ); + + ::rtl::OUString aModuleIdentifier( xModuleManager->identify( xIfac ) ); + + if( aModuleIdentifier.getLength() > 0 ) + { + Reference< XNameAccess > xNameAccess( xServiceManager->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.UICommandDescription" ) ) ), UNO_QUERY ); + if( xNameAccess.is() ) + { + Reference< ::com::sun::star::container::XNameAccess > m_xUICommandLabels( xNameAccess->getByName( aModuleIdentifier ), UNO_QUERY_THROW ); + Sequence< PropertyValue > aPropSeq; + if( m_xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq ) + { + for( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + { + if( aPropSeq[i].Name.equalsAscii( "Name" )) + { + aPropSeq[i].Value >>= aLabel; + break; + } + } + } + } + } + } + catch ( Exception& ) + { + } + + return aLabel; +} + //===== ViewShellBase::Implementation ========================================= diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 8c10effa061b..d89bb43a0098 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -81,12 +81,8 @@ #include "fusumry.hxx" #include "fucushow.hxx" #include "drawview.hxx" -#ifndef SD_FRAME_VIEW #include "FrameView.hxx" -#endif #include "Window.hxx" -#include "fuformatpaintbrush.hxx" -#include "formatclipboard.hxx" #include "DrawDocShell.hxx" #include "TaskPaneViewShell.hxx" #include "framework/FrameworkHelper.hxx" @@ -501,35 +497,6 @@ void DrawViewShell::FuTemp04(SfxRequest& rReq) USHORT nSId = rReq.GetSlot(); switch( nSId ) { - case SID_FORMATPAINTBRUSH: - { - SdFormatClipboard* pFormatClipboard = GetDocSh()->mpFormatClipboard; - if(pFormatClipboard) - { - if( pFormatClipboard->HasContent() ) - { - pFormatClipboard->Erase(); - GetViewFrame()->GetBindings().Invalidate(SID_FORMATPAINTBRUSH); - Cancel(); - rReq.Ignore (); - } - else - { - bool bPersistentCopy = false; - const SfxItemSet *pArgs = rReq.GetArgs(); - if( pArgs && pArgs->Count() >= 1 ) - { - bPersistentCopy = static_cast(((SfxBoolItem &)pArgs->Get( - SID_FORMATPAINTBRUSH)).GetValue()); - } - - pFormatClipboard->Copy( *mpDrawView, bPersistentCopy ); - SetCurrentFunction( FuFormatPaintBrush::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) ); - GetViewFrame()->GetBindings().Invalidate(SID_FORMATPAINTBRUSH); - } - } - } - break; case SID_FONTWORK: { if ( rReq.GetArgs() ) diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 983033be7b8c..5eda0d648f8b 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -87,7 +87,6 @@ #include "zoomlist.hxx" #include "slideshow.hxx" #include "drawview.hxx" -#include "formatclipboard.hxx" #include "ViewShellBase.hxx" #include "ViewShellManager.hxx" #include "LayerTabBar.hxx" @@ -95,6 +94,7 @@ #include "Window.hxx" #include "fuediglu.hxx" #include "fubullet.hxx" +#include "fuformatpaintbrush.hxx" using ::rtl::OUString; using namespace ::com::sun::star; @@ -249,19 +249,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) const ULONG nMarkCount = rMarkList.GetMarkCount(); //format paintbrush - { - SdFormatClipboard* pFormatClipboard = GetDocSh()->mpFormatClipboard; - bool bHasContent = pFormatClipboard && pFormatClipboard->HasContent(); - rSet.Put(SfxBoolItem(SID_FORMATPAINTBRUSH,bHasContent)); - if( ( nMarkCount!=1 && !bHasContent ) || mpDrawView->IsTextEdit() ) - rSet.DisableItem( SID_FORMATPAINTBRUSH ); - if( !bHasContent && nMarkCount==1 ) - { - SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - if( !pFormatClipboard->CanCopyThisType(pObj->GetObjInventor(),pObj->GetObjIdentifier()) ) - rSet.DisableItem( SID_FORMATPAINTBRUSH ); - } - } + FuFormatPaintBrush::GetMenuState( *this, rSet ); // Stati der SfxChild-Windows (Animator, Fontwork etc.) SetChildWindowState( rSet ); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 0b3ecf1af6e7..1ae3e4e1c40e 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -106,7 +106,7 @@ #include "anminfo.hxx" #include "optsitem.hxx" #include "Window.hxx" - +#include "fuformatpaintbrush.hxx" using ::rtl::OUString; using namespace ::com::sun::star; @@ -203,13 +203,22 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if(HasCurrentFunction()) { - if(GetOldFunction() == GetCurrentFunction()) + if( (nSId == SID_FORMATPAINTBRUSH) && (GetCurrentFunction()->GetSlotID() == SID_TEXTEDIT) ) + { + // save text edit mode for format paintbrush! + SetOldFunction( GetCurrentFunction() ); + } + else { - SetOldFunction(0); + if(GetOldFunction() == GetCurrentFunction()) + { + SetOldFunction(0); + } } if ( nSId != SID_TEXTEDIT && nSId != SID_ATTR_CHAR && nSId != SID_TEXT_FITTOSIZE && nSId != SID_ATTR_CHAR_VERTICAL && nSId != SID_TEXT_FITTOSIZE_VERTICAL && + nSId != SID_FORMATPAINTBRUSH && mpDrawView->IsTextEdit() ) { mpDrawView->SdrEndTextEdit(); @@ -526,8 +535,18 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) } break; + case SID_FORMATPAINTBRUSH: + { + SetCurrentFunction( FuFormatPaintBrush::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) ); + rReq.Done(); + SfxBindings& rBind = GetViewFrame()->GetBindings(); + rBind.Invalidate( nSId ); + rBind.Update( nSId ); + break; + } + default: - break; + break; } if(HasOldFunction()) -- cgit v1.2.3 From f00b397c4b5393a5ce352fee8a4a528dc637e0ad Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 23 Oct 2009 13:35:52 +0000 Subject: #i88371# allow format paintbrush to format empty presentation object --- sd/source/ui/func/fuformatpaintbrush.cxx | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx index 4333429e9356..457248201813 100644 --- a/sd/source/ui/func/fuformatpaintbrush.cxx +++ b/sd/source/ui/func/fuformatpaintbrush.cxx @@ -111,7 +111,6 @@ BOOL FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt) { if(mpView&&mpWindow) { - BOOL bTextEdit = FALSE; SdrViewEvent aVEvt; SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); @@ -147,23 +146,19 @@ BOOL FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt) MouseEvent aMEvt( rMEvt.GetPosPixel(), rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), 0 ); return FuText::MouseButtonDown(aMEvt); } - else - { - unmarkimpl( mpView ); - } + if( aVEvt.pObj == 0 ) + aVEvt.pObj = pPickObj; } - else - { - unmarkimpl( mpView ); - if( aVEvt.pObj && !aVEvt.pObj->IsEmptyPresObj() ) - { - USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); - BOOL bToggle = FALSE; - mpView->MarkObj(mpWindow->PixelToLogic( rMEvt.GetPosPixel() ), nHitLog, bToggle, FALSE); - return TRUE; - } + unmarkimpl( mpView ); + + if( aVEvt.pObj ) + { + USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); + BOOL bToggle = FALSE; + mpView->MarkObj(mpWindow->PixelToLogic( rMEvt.GetPosPixel() ), nHitLog, bToggle, FALSE); + return TRUE; } } return FALSE; @@ -186,7 +181,7 @@ BOOL FuFormatPaintBrush::MouseMove(const MouseEvent& rMEvt) SdrPageView* pPV=0; BOOL bOverMarkableObject = mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pObj, pPV, SDRSEARCH_PICKMARKABLE); - if(bOverMarkableObject && HasContentForThisType(pObj->GetObjInventor(),pObj->GetObjIdentifier()) && !pObj->IsEmptyPresObj() ) + if(bOverMarkableObject && HasContentForThisType(pObj->GetObjInventor(),pObj->GetObjIdentifier()) ) mpWindow->SetPointer(Pointer(POINTER_FILL)); else mpWindow->SetPointer(Pointer(POINTER_ARROW)); -- cgit v1.2.3 From ef14b7f6ed149465c80884b73b53c729b0286081 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 27 Oct 2009 15:01:25 +0000 Subject: CWS-TOOLING: integrate CWS impress178 2009-10-16 19:54:41 +0200 sj r276995 : removed warning 2009-10-16 17:46:12 +0200 sj r276993 : #i103757# applied patch (fixed crash if model changes) 2009-10-16 16:06:07 +0200 sj r276985 : CWS-TOOLING: rebase CWS impress178 to branches/OOO320@276942 (milestone: OOO320:m2) 2009-10-08 13:51:23 +0200 sj r276790 : #i105654# fixed closing of line geometry 2009-10-07 17:26:56 +0200 sj r276762 : #i105606# fixed object shadow 2009-10-07 17:25:39 +0200 sj r276761 : minor improvements 2009-10-07 11:48:26 +0200 af r276745 : #i103047# Prevent context menu of LayoutMenu from being shown when user clicks on background. 2009-10-07 11:33:59 +0200 af r276743 : #i99866# Set position of the design control manually. 2009-10-06 17:18:23 +0200 sj r276721 : minor improvements 2009-10-05 18:34:23 +0200 sj r276692 : #105606# fixed fontsize problem 2009-10-05 17:26:21 +0200 af r276691 : #i105354# Never process more than one request in a row. 2009-10-02 13:24:25 +0200 af r276639 : #i94242# Taking insertion position of slide sorter correctly into account. 2009-10-01 13:46:47 +0200 aw r276602 : #i102224# some Polygon/PolyPolygon usages in SVMConverter ignored the possible curve status of tools::Polygon; added at least an AdaptiveSubdivide 2009-10-01 12:33:56 +0200 aw r276588 : #i102224# ImplWritePolyPolygon killed the curve information at the PolyPolygon by NOT copying the flags 2009-09-30 17:48:56 +0200 aw r276567 : #i102224# removed GetSimple() from Polygon and PolyPolygon, replaced completely with AdaptiveSubdivide 2009-09-30 15:45:46 +0200 aw r276559 : #i102048# secured primitive creation for dimension lines with linestyle none 2009-09-30 14:56:41 +0200 af r276556 : #i105471# Reordered statements in ~SdModule. 2009-09-30 14:47:12 +0200 aw r276555 : #i105373# corrected curve ignoring places in MetaFile export --- sd/source/filter/eppt/eppt.cxx | 119 +-------------------- sd/source/filter/eppt/eppt.hxx | 1 - sd/source/filter/eppt/epptso.cxx | 47 ++++---- sd/source/ui/app/sdmod.cxx | 12 ++- .../ui/slidesorter/cache/SlsQueueProcessor.cxx | 22 +--- .../ui/slidesorter/controller/SlsSlotManager.cxx | 8 ++ sd/source/ui/table/TableDesignPane.cxx | 4 + sd/source/ui/toolpanel/LayoutMenu.cxx | 9 +- 8 files changed, 59 insertions(+), 163 deletions(-) diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index cb31e99aec63..ef697cfa9733 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -222,8 +222,6 @@ PPTWriter::PPTWriter( SvStorageRef& rSvStorage, } if ( !ImplCreateMainNotes() ) return; - maTextRuleList.First(); // rewind list, so we can get the current or next entry without - // searching, all entrys are sorted# for ( i = 0; i < mnPages; i++ ) { if ( !ImplCreateSlide( i ) ) @@ -274,8 +272,6 @@ PPTWriter::~PPTWriter() while( aStyleSheetIter < maStyleSheetList.end() ) delete *aStyleSheetIter++; - for ( pPtr = maTextRuleList.First(); pPtr; pPtr = maTextRuleList.Next() ) - delete (TextRuleEntry*)pPtr; for ( pPtr = maSlideNameList.First(); pPtr; pPtr = maSlideNameList.Next() ) delete (::rtl::OUString*)pPtr; for ( pPtr = maHyperlink.First(); pPtr; pPtr = maHyperlink.Next() ) @@ -560,22 +556,12 @@ sal_Bool PPTWriter::ImplCreateDocument() mpPptEscherEx->OpenContainer( EPP_SlideListWithText ); // Animation info fuer die Slides - sal_uInt32 nShapes; - sal_Bool bOtherThanPlaceHolders; - for ( i = 0; i < mnPages; i++ ) { - sal_uInt32 nPOffset, nPObjects; - sal_Bool bOutliner, bTitle; - - bOtherThanPlaceHolders = bOutliner = bTitle = FALSE; - nPObjects = 0; - mpPptEscherEx->AddAtom( 20, EPP_SlidePersistAtom ); mpPptEscherEx->InsertPersistOffset( EPP_MAINSLIDE_PERSIST_KEY | i, mpStrm->Tell() ); - *mpStrm << (sal_uInt32)0; // psrReference - logical reference to the slide persist object ( EPP_MAINSLIDE_PERSIST_KEY ) - nPOffset = mpStrm->Tell(); - *mpStrm << (sal_uInt32)0 // flags - only bit 3 used, if set then slide contains shapes other than placeholders + *mpStrm << (sal_uInt32)0 // psrReference - logical reference to the slide persist object ( EPP_MAINSLIDE_PERSIST_KEY ) + << (sal_uInt32)4 // flags - only bit 3 used, if set then slide contains shapes other than placeholders << (INT32)0 // numberTexts - number of placeholder texts stored with the persist object. Allows to display outline view without loading the slide persist objects << (INT32)i + 0x100 // slideId - Unique slide identifier, used for OLE link monikers for example << (sal_uInt32)0; // reserved, usualy 0 @@ -584,8 +570,6 @@ sal_Bool PPTWriter::ImplCreateDocument() return FALSE; ImplSetCurrentStyleSheet( ImplGetMasterIndex( NORMAL ) ); - const PHLayout& rLayout = ImplGetLayout( mXPagePropSet ); - ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > aXName( mXDrawPage, ::com::sun::star::uno::UNO_QUERY ); @@ -597,113 +581,16 @@ sal_Bool PPTWriter::ImplCreateDocument() } else maSlideNameList.Insert( new ::rtl::OUString(), LIST_APPEND ); - - nShapes = mXShapes->getCount(); - - sal_Bool bSecOutl = FALSE; - if ( nShapes && ( rLayout.bTitlePossible || rLayout.bOutlinerPossible ) ) - { - for ( sal_uInt32 nIndex = 0; nIndex < nShapes; nIndex++ ) - { - if ( !ImplGetShapeByIndex( nIndex ) ) - continue; - - if ( mbPresObj && ( ( mType == "presentation.Outliner" ) || ( mType == "presentation.Subtitle" ) ) ) - { - if ( bOutliner == FALSE ) - { - bOutliner = TRUE; - mnTextStyle = EPP_TEXTSTYLE_BODY; - sal_uInt32 nTextType = EPP_TEXTTYPE_Body; - if ( bSecOutl ) - nTextType = EPP_TEXTTYPE_HalfBody; - else if ( mType == "presentation.Subtitle" ) - nTextType = EPP_TEXTTYPE_CenterBody; - - TextRuleEntry* pRule = new TextRuleEntry( i ); - SvMemoryStream aExtBu( 0x200, 0x200 ); - if ( !mbEmptyPresObj ) - ImplGetText(); - ImplWriteTextStyleAtom( *mpStrm, nTextType, nPObjects, pRule, aExtBu, NULL ); - ImplWriteExtParaHeader( aExtBu, nPObjects++, nTextType, i + 0x100 ); - maTextRuleList.Insert( (void*)pRule, LIST_APPEND ); - if ( rLayout.bSecOutlinerPossible ) - { - if ( ( nIndex + 1 ) < nShapes ) - { - if ( ImplGetShapeByIndex( nIndex + 1 ) && mType == "presentation.Outliner" ) - { - bSecOutl = TRUE; - TextRuleEntry* pTempRule = new TextRuleEntry( i ); - SvMemoryStream aTmpStrm( 0x200, 0x200 ); - if ( !mbEmptyPresObj ) - ImplGetText(); - ImplWriteTextStyleAtom( *mpStrm, nTextType, nPObjects, pTempRule, aTmpStrm, NULL ); - ImplWriteExtParaHeader( aTmpStrm, nPObjects++, nTextType, i + 0x100 ); - maTextRuleList.Insert( (void*)pTempRule, LIST_APPEND ); - } - } - } - } - } - else if ( rLayout.bTitlePossible && ( mType == "presentation.TitleText" ) ) - { - if ( bTitle == FALSE ) - { - bTitle = TRUE; - mnTextStyle = EPP_TEXTSTYLE_TITLE; - TextRuleEntry* pRule = new TextRuleEntry( i ); - SvMemoryStream aExtBu( 0x200, 0x200 ); - if ( !mbEmptyPresObj ) - ImplGetText(); - ImplWriteTextStyleAtom( *mpStrm, EPP_TEXTTYPE_Title, nPObjects, pRule, aExtBu, NULL ); - ImplWriteExtParaHeader( aExtBu, nPObjects++, EPP_TEXTTYPE_Title, i + 0x100 ); - maTextRuleList.Insert( (void*)pRule, LIST_APPEND ); - } - } - else - { - if ( mbEmptyPresObj ) - nPObjects++; - else - bOtherThanPlaceHolders = TRUE; // muss noch auf background und leeren Title/outliner geprueft werden !!! - } - if ( bOutliner && bTitle && bOtherThanPlaceHolders ) - break; - } - } - if ( nPObjects ) - { - sal_uInt32 nOldPos = mpStrm->Tell(); - mpStrm->Seek( nPOffset ); - *mpStrm << (sal_uInt32)( ( bOtherThanPlaceHolders ) ? 4 : 0 ); - *mpStrm << nPObjects; - mpStrm->Seek( nOldPos ); - } } mpPptEscherEx->CloseContainer(); // EPP_SlideListWithText mpPptEscherEx->OpenContainer( EPP_SlideListWithText, 2 ); // Animation info fuer die notes for( i = 0; i < mnPages; i++ ) { - if ( !ImplGetPageByIndex( i, NOTICE ) ) - return FALSE; - - nShapes = mXShapes->getCount(); - - bOtherThanPlaceHolders = FALSE; - if ( nShapes ) - { - for ( sal_uInt32 nIndex = 0; ( nIndex < nShapes ) && ( bOtherThanPlaceHolders == FALSE ); nIndex++ ) - { - if ( ImplGetShapeByIndex( nIndex ) && ( mType != "drawing.Page" ) ) - bOtherThanPlaceHolders = TRUE; - } - } mpPptEscherEx->AddAtom( 20, EPP_SlidePersistAtom ); mpPptEscherEx->InsertPersistOffset( EPP_MAINNOTES_PERSIST_KEY | i, mpStrm->Tell() ); *mpStrm << (sal_uInt32)0 - << (sal_uInt32)( ( bOtherThanPlaceHolders ) ? 4 : 0 ) + << (sal_uInt32)4 << (INT32)0 << (INT32)i + 0x100 << (sal_uInt32)0; diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx index 84b64e33157c..2ef66bb9be75 100644 --- a/sd/source/filter/eppt/eppt.hxx +++ b/sd/source/filter/eppt/eppt.hxx @@ -756,7 +756,6 @@ class PPTWriter : public GroupTable, public PropValue, public PPTExBulletProvide sal_uInt32 mnShapeMasterTitle; sal_uInt32 mnShapeMasterBody; - List maTextRuleList; // TextRuleEntry's List maHyperlink; FontCollection maFontCollection; diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index 75e5a4ba3227..fbb46dc20b0f 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -4239,6 +4239,9 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a sal_Bool bAdditionalText = FALSE; + sal_Bool bSecOutl = FALSE; + sal_uInt32 nPObjects = 0; + SvMemoryStream* pClientTextBox = NULL; SvMemoryStream* pClientData = NULL; @@ -5341,32 +5344,32 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a if ( !pClientTextBox ) pClientTextBox = new SvMemoryStream( 0x200, 0x200 ); - *pClientTextBox << (sal_uInt32)( EPP_OutlineTextRefAtom << 16 ) << (sal_uInt32)4 - << nPlacementID; - if ( mbEmptyPresObj == FALSE ) { if ( ( ePageType == NORMAL ) && ( bMasterPage == FALSE ) ) - { // try to allocate the textruleratom - TextRuleEntry* pTextRule = (TextRuleEntry*)maTextRuleList.GetCurObject(); - while ( pTextRule ) + { + sal_uInt32 nTextType = EPP_TEXTTYPE_Body; + if ( mnTextStyle == EPP_TEXTSTYLE_BODY ) { - int nRulePage = pTextRule->nPageNumber; - if ( nRulePage > nPageNumber ) - break; - else if ( nRulePage < nPageNumber ) - pTextRule = (TextRuleEntry*)maTextRuleList.Next(); - else - { - SvMemoryStream* pOut = pTextRule->pOut; - if ( pOut ) - { - pClientTextBox->Write( pOut->GetData(), pOut->Tell() ); - delete pOut, pTextRule->pOut = NULL; - } - maTextRuleList.Next(); - break; - } + if ( bSecOutl ) + nTextType = EPP_TEXTTYPE_HalfBody; + else if ( mType == "presentation.Subtitle" ) + nTextType = EPP_TEXTTYPE_CenterBody; + bSecOutl = sal_True; + } + else + nTextType = EPP_TEXTTYPE_Title; + + TextRuleEntry aTextRule( nPageNumber ); + SvMemoryStream aExtBu( 0x200, 0x200 ); + ImplGetText(); + ImplWriteTextStyleAtom( *pClientTextBox, nTextType, nPObjects, &aTextRule, aExtBu, NULL ); + ImplWriteExtParaHeader( aExtBu, nPObjects++, nTextType, nPageNumber + 0x100 ); + SvMemoryStream* pOut = aTextRule.pOut; + if ( pOut ) + { + pClientTextBox->Write( pOut->GetData(), pOut->Tell() ); + delete pOut, aTextRule.pOut = NULL; } } } diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index f7e74a481740..957b1aa0475b 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -131,11 +131,6 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 ) SdModule::~SdModule() { - // Mark the module in the global AppData structure as deleted. - SdModule** ppShellPointer = (SdModule**)GetAppData(SHL_DRAW); - if (ppShellPointer != NULL) - (*ppShellPointer) = NULL; - delete pSearchItem; if( pNumberFormatter ) @@ -152,6 +147,13 @@ SdModule::~SdModule() } } + mpResourceContainer.reset(); + + // Mark the module in the global AppData structure as deleted. + SdModule** ppShellPointer = (SdModule**)GetAppData(SHL_DRAW); + if (ppShellPointer != NULL) + (*ppShellPointer) = NULL; + delete mpErrorHdl; delete static_cast< VirtualDevice* >( mpVirtualRefDevice ); } diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx index f634d437ba4b..09c633424c6d 100644 --- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx +++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx @@ -161,11 +161,12 @@ void QueueProcessor::ProcessRequests (void) { OSL_ASSERT(mpCacheContext.get()!=NULL); - while ( ! mrQueue.IsEmpty() && ! mbIsPaused) + // Never process more than one request at a time in order to prevent the + // lock up of the edit view. + if ( ! mrQueue.IsEmpty() + && ! mbIsPaused + && mpCacheContext->IsIdle()) { - if ( ! mpCacheContext->IsIdle()) - break; - CacheKey aKey = NULL; RequestPriorityClass ePriorityClass (NOT_VISIBLE); { @@ -182,25 +183,12 @@ void QueueProcessor::ProcessRequests (void) if (aKey != NULL) ProcessOneRequest(aKey, ePriorityClass); - - // Requests of lower priority are processed one at a time. - { - ::osl::MutexGuard aGuard (mrQueue.GetMutex()); - if ( ! mrQueue.IsEmpty()) - if (mrQueue.GetFrontPriorityClass() > 0) - break; - } } // Schedule the processing of the next element(s). { ::osl::MutexGuard aGuard (mrQueue.GetMutex()); if ( ! mrQueue.IsEmpty()) - /* - if (bIsShowingFullScreenShow) - Start(mnTimeBetweenRequestsWhenNotIdle); - else - */ Start(mrQueue.GetFrontPriorityClass()); } } diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index ba8dbb278ca4..4b48aa60678d 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -1085,6 +1085,14 @@ void SlotManager::InsertSlide (SfxRequest& rRequest) rSelector.SelectPage (nInsertionIndex); } + // Is there a stored insertion position? + else if (mrSlideSorter.GetController().GetSelectionManager()->GetInsertionPosition() >= 0) + { + nInsertionIndex + = mrSlideSorter.GetController().GetSelectionManager()->GetInsertionPosition() - 1; + rSelector.SelectPage(nInsertionIndex); + } + // Select the last page when there is at least one page. else if (rSelector.GetPageCount() > 0) { diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index 11cfdbb65ef0..098d71d1f06a 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -457,6 +457,10 @@ void TableDesignPane::updateLayout() Point aPos( pValueSet->GetPosPixel() ); + // The following line may look like a no-op but without it the + // control is placed off-screen when RTL is active. + pValueSet->SetPosPixel(pValueSet->GetPosPixel()); + // shift show options section down const long nOptionsPos = aPos.Y() + aValueSetSize.Height(); for( sal_Int32 nId = FL_STYLE_OPTIONS; nId <= CB_BANDED_COLUMNS; ++nId ) diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx index 7a39f1c42f15..e8ebc7fc605d 100644 --- a/sd/source/ui/toolpanel/LayoutMenu.cxx +++ b/sd/source/ui/toolpanel/LayoutMenu.cxx @@ -917,8 +917,13 @@ void LayoutMenu::Command (const CommandEvent& rEvent) if (GetShellManager() != NULL) GetShellManager()->MoveToTop(this); if (rEvent.IsMouseEvent()) - mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup( - SdResId(RID_TASKPANE_LAYOUTMENU_POPUP)); + { + // Do not show the context menu when the mouse was not + // pressed over an item. + if (GetItemId(rEvent.GetMousePosPixel()) > 0) + mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup( + SdResId(RID_TASKPANE_LAYOUTMENU_POPUP)); + } else { // When the command event was not caused by a mouse -- cgit v1.2.3 From 2e6e02efc7119ad8b8f2893f6f7f7ec8ffe6987c Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Tue, 27 Oct 2009 16:52:56 +0000 Subject: fixed unix errors --- sd/source/ui/func/fuformatpaintbrush.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx index 457248201813..58842f090d3a 100644 --- a/sd/source/ui/func/fuformatpaintbrush.cxx +++ b/sd/source/ui/func/fuformatpaintbrush.cxx @@ -48,7 +48,7 @@ #include "sdmod.hxx" #include "fuformatpaintbrush.hxx" -#include "DrawView.hxx" +#include "drawview.hxx" #include "DrawDocShell.hxx" #include "DrawViewShell.hxx" #include "FrameView.hxx" @@ -111,7 +111,6 @@ BOOL FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt) { if(mpView&&mpWindow) { - BOOL bTextEdit = FALSE; SdrViewEvent aVEvt; SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); -- cgit v1.2.3 From 08c281df2535b9fbe2ba5c5658ba3e8b47e77af0 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Wed, 28 Oct 2009 16:04:53 +0000 Subject: #i106369# only hide placeholder on master page not all text shapes --- sd/source/core/sdpage.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 7f80b5bd763a..9fbb3088efc5 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2883,7 +2883,7 @@ bool SdPage::checkVisibility( } } } // check for placeholders on master - else if( pCheckPage->IsMasterPage() && ( pVisualizedPage != pCheckPage ) ) + else if( (eKind != PRESOBJ_NONE) && pCheckPage->IsMasterPage() && ( pVisualizedPage != pCheckPage ) ) { // presentation objects on master slide are always invisible if slide is shown. return false; -- cgit v1.2.3 From 43cef38dfeea51d2058dcc5e18cfab8c05329c9d Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Sat, 31 Oct 2009 00:29:04 +0100 Subject: #i106421#: move msfilter to filter --- sd/source/filter/eppt/eppt.cxx | 40 +++++++++++++++++++++++++++++-- sd/source/filter/eppt/eppt.hxx | 2 +- sd/source/filter/eppt/escherex.hxx | 2 +- sd/source/filter/eppt/pptexanimations.hxx | 2 +- sd/source/filter/ppt/pptatom.hxx | 1 + sd/source/filter/ppt/pptin.cxx | 2 +- sd/source/filter/ppt/pptin.hxx | 4 ++-- sd/source/filter/ppt/pptinanimations.hxx | 4 +--- sd/source/filter/sdpptwrp.cxx | 38 ++++++++--------------------- sd/source/ui/docshell/docshel4.cxx | 2 +- sd/util/makefile.mk | 2 +- sd/util/sdfilt.map | 2 +- 12 files changed, 59 insertions(+), 42 deletions(-) diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index cb31e99aec63..197a977c78a8 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -58,10 +58,11 @@ #include #include #include -#include +#include #include #include -#include +#include +#include #include #include @@ -2580,3 +2581,38 @@ extern "C" SAL_DLLPUBLIC_EXPORT BOOL __LOADONCALLAPI ExportPPT( SvStorageRef& rS return bStatus; } +extern "C" SAL_DLLPUBLIC_EXPORT BOOL __LOADONCALLAPI SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas ) +{ + SvStorageRef xDest( new SvStorage( new SvMemoryStream(), TRUE ) ); + SvxImportMSVBasic aMSVBas( rDocShell, *xDest, FALSE, FALSE ); + aMSVBas.SaveOrDelMSVBAStorage( TRUE, String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); + + SvStorageRef xOverhead = xDest->OpenSotStorage( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); + if ( xOverhead.Is() && ( xOverhead->GetError() == SVSTREAM_OK ) ) + { + SvStorageRef xOverhead2 = xOverhead->OpenSotStorage( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); + if ( xOverhead2.Is() && ( xOverhead2->GetError() == SVSTREAM_OK ) ) + { + SvStorageStreamRef xTemp = xOverhead2->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead2") ) ); + if ( xTemp.Is() && ( xTemp->GetError() == SVSTREAM_OK ) ) + { + UINT32 nLen = xTemp->GetSize(); + if ( nLen ) + { + char* pTemp = new char[ nLen ]; + if ( pTemp ) + { + xTemp->Seek( STREAM_SEEK_TO_BEGIN ); + xTemp->Read( pTemp, nLen ); + pBas = new SvMemoryStream( pTemp, nLen, STREAM_READ ); + pBas->ObjectOwnsMemory( TRUE ); + return TRUE; + } + } + } + } + } + + return FALSE; +} + diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx index c4a55b5c4369..b4d6fdf79559 100644 --- a/sd/source/filter/eppt/eppt.hxx +++ b/sd/source/filter/eppt/eppt.hxx @@ -85,7 +85,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/filter/eppt/escherex.hxx b/sd/source/filter/eppt/escherex.hxx index 1ebebe8a5504..577531d9f534 100644 --- a/sd/source/filter/eppt/escherex.hxx +++ b/sd/source/filter/eppt/escherex.hxx @@ -30,7 +30,7 @@ #ifndef _PptEscherEX_HXX #define _PptEscherEX_HXX -#include +#include // --------------------------------------------------------------------------------------------- // Werte fuer den ULONG im PPT_PST_TextHeaderAtom diff --git a/sd/source/filter/eppt/pptexanimations.hxx b/sd/source/filter/eppt/pptexanimations.hxx index 78dbb731ef0b..effbe3381cea 100644 --- a/sd/source/filter/eppt/pptexanimations.hxx +++ b/sd/source/filter/eppt/pptexanimations.hxx @@ -38,7 +38,7 @@ #include "../ppt/pptanimations.hxx" #endif #include -#include +#include #ifdef DBG_ANIM_LOG #include diff --git a/sd/source/filter/ppt/pptatom.hxx b/sd/source/filter/ppt/pptatom.hxx index 9ccd845d14e6..14a7f81b4e98 100644 --- a/sd/source/filter/ppt/pptatom.hxx +++ b/sd/source/filter/ppt/pptatom.hxx @@ -32,6 +32,7 @@ #define _PPTATOM_HXX_ #include +#include class SvStream; diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index ae347eeaba12..37277a17c97b 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx index 59d59eece151..0549f8fa85c0 100644 --- a/sd/source/filter/ppt/pptin.hxx +++ b/sd/source/filter/ppt/pptin.hxx @@ -31,11 +31,11 @@ #ifndef _SD_PPTIN_HXX #define _SD_PPTIN_HXX -#include +#include #include #include #include -#include +#include #include #include diff --git a/sd/source/filter/ppt/pptinanimations.hxx b/sd/source/filter/ppt/pptinanimations.hxx index 114f471a3cef..e53a2c406f36 100644 --- a/sd/source/filter/ppt/pptinanimations.hxx +++ b/sd/source/filter/ppt/pptinanimations.hxx @@ -34,15 +34,13 @@ #include #include -#ifndef _SD_PPTANIMATIONS_HXX #include "pptanimations.hxx" -#endif #include #ifdef DBG_ANIM_LOG #include #endif -#include +#include #include diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index bc4a63012caa..8dea30f1659a 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -43,7 +43,7 @@ #include "ppt/pptin.hxx" #include "drawdoc.hxx" #include -#include +#include // -------------- // - Namespaces - @@ -54,7 +54,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::task; using namespace ::com::sun::star::frame; - typedef BOOL ( __LOADONCALLAPI *ExportPPT )( SvStorageRef&, Reference< XModel > &, Reference< XStatusIndicator > &, @@ -63,6 +62,8 @@ typedef BOOL ( __LOADONCALLAPI *ExportPPT )( SvStorageRef&, typedef sal_Bool ( SAL_CALL *ImportPPT )( const ::rtl::OUString&, Sequence< PropertyValue >*, SdDrawDocument*, SvStream&, SvStorage&, SfxMedium& ); +typedef BOOL ( __LOADONCALLAPI *SaveVBA )( SfxObjectShell&, SvMemoryStream*& ); + // --------------- // - SdPPTFilter - // --------------- @@ -188,32 +189,13 @@ void SdPPTFilter::PreSaveBasic() SvtFilterOptions* pFilterOptions = SvtFilterOptions::Get(); if( pFilterOptions && pFilterOptions->IsLoadPPointBasicStorage() ) { - SvStorageRef xDest( new SvStorage( new SvMemoryStream(), TRUE ) ); - SvxImportMSVBasic aMSVBas( (SfxObjectShell&) mrDocShell, *xDest, FALSE, FALSE ); - aMSVBas.SaveOrDelMSVBAStorage( TRUE, String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); - - SvStorageRef xOverhead = xDest->OpenSotStorage( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); - if ( xOverhead.Is() && ( xOverhead->GetError() == SVSTREAM_OK ) ) + ::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() ); + if( pLibrary ) { - SvStorageRef xOverhead2 = xOverhead->OpenSotStorage( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) ); - if ( xOverhead2.Is() && ( xOverhead2->GetError() == SVSTREAM_OK ) ) + SaveVBA pSaveVBA= reinterpret_cast(pLibrary->getFunctionSymbol( ::rtl::OUString::createFromAscii("SaveVBA") )); + if( pSaveVBA ) { - SvStorageStreamRef xTemp = xOverhead2->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead2") ) ); - if ( xTemp.Is() && ( xTemp->GetError() == SVSTREAM_OK ) ) - { - UINT32 nLen = xTemp->GetSize(); - if ( nLen ) - { - char* pTemp = new char[ nLen ]; - if ( pTemp ) - { - xTemp->Seek( STREAM_SEEK_TO_BEGIN ); - xTemp->Read( pTemp, nLen ); - pBas = new SvMemoryStream( pTemp, nLen, STREAM_READ ); - pBas->ObjectOwnsMemory( TRUE ); - } - } - } + pSaveVBA( (SfxObjectShell&) mrDocShell, pBas ); } } } diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index 3d2ea5ace652..ce2c38f20afd 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -66,7 +66,7 @@ #include #include #include -#include +//#include #include #include #include diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk index e530511ee565..6b1e6ebf1676 100644 --- a/sd/util/makefile.mk +++ b/sd/util/makefile.mk @@ -250,7 +250,7 @@ DEF5NAME=$(SHL5TARGET) SHL5STDLIBS = $(ISDLIB) \ $(SVXCORELIB) \ - $(SVXMSFILTERLIB) \ + $(MSFILTERLIB) \ $(SFX2LIB) \ $(SVTOOLLIB) \ $(SOTLIB) \ diff --git a/sd/util/sdfilt.map b/sd/util/sdfilt.map index ac6b782f3145..62213393408d 100644 --- a/sd/util/sdfilt.map +++ b/sd/util/sdfilt.map @@ -2,7 +2,7 @@ PPTEXPORTER_1_0 { global: ExportPPT; ImportPPT; - + SaveVBA; local: *; }; -- cgit v1.2.3 From 18552793d3b3f1a77e75de9d1f50921eba8f232e Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Mon, 2 Nov 2009 20:49:14 +0100 Subject: #i106421#: create new cui resource file --- sd/source/ui/docshell/docshel2.cxx | 2 +- sd/source/ui/func/fuarea.cxx | 1 - sd/source/ui/func/fuline.cxx | 2 +- sd/source/ui/func/fulinend.cxx | 2 +- sd/source/ui/func/fuscale.cxx | 7 +++---- sd/source/ui/func/futransf.cxx | 4 ++-- sd/source/ui/func/futxtatt.cxx | 2 +- sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 2 +- sd/source/ui/view/drviews2.cxx | 2 +- sd/source/ui/view/drviewsc.cxx | 4 ++-- sd/source/ui/view/sdview2.cxx | 2 +- 11 files changed, 14 insertions(+), 16 deletions(-) diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx index a62922381155..3917cc02880c 100644 --- a/sd/source/ui/docshell/docshel2.cxx +++ b/sd/source/ui/docshell/docshel2.cxx @@ -374,7 +374,7 @@ BOOL DrawDocShell::CheckPageName (::Window* pWin, String& rName ) { String aDesc( SdResId( STR_WARN_PAGE_EXISTS ) ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - AbstractSvxNameDialog* aNameDlg = pFact ? pFact->CreateSvxNameDialog( pWin, aStrForDlg, aDesc, RID_SVXDLG_NAME ) : 0; + AbstractSvxNameDialog* aNameDlg = pFact ? pFact->CreateSvxNameDialog( pWin, aStrForDlg, aDesc ) : 0; if( aNameDlg ) { aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE ); diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx index c3071461c7e3..e070365eddda 100644 --- a/sd/source/ui/func/fuarea.cxx +++ b/sd/source/ui/func/fuarea.cxx @@ -85,7 +85,6 @@ void FuArea::DoExecute( SfxRequest& rReq ) AbstractSvxAreaTabDialog * pDlg = pFact ? pFact->CreateSvxAreaTabDialog( NULL, &aNewAttr, mpDoc, - RID_SVXDLG_AREA, mpView) : 0; if( pDlg && (pDlg->Execute() == RET_OK) ) { diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx index 0ad0d84f19a5..08fdf2eb24b7 100644 --- a/sd/source/ui/func/fuline.cxx +++ b/sd/source/ui/func/fuline.cxx @@ -98,7 +98,7 @@ void FuLine::DoExecute( SfxRequest& rReq ) mpView->GetAttributes( *pNewAttr ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - SfxAbstractTabDialog * pDlg = pFact ? pFact->CreateSvxLineTabDialog(NULL,pNewAttr,mpDoc,RID_SVXDLG_LINE,pObj,bHasMarked) : 0; + SfxAbstractTabDialog * pDlg = pFact ? pFact->CreateSvxLineTabDialog(NULL,pNewAttr,mpDoc,pObj,bHasMarked) : 0; if( pDlg && (pDlg->Execute() == RET_OK) ) { mpView->SetAttributes (*(pDlg->GetOutputItemSet ())); diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx index 6f8373147845..1eb3300d30df 100644 --- a/sd/source/ui/func/fulinend.cxx +++ b/sd/source/ui/func/fulinend.cxx @@ -140,7 +140,7 @@ void FuLineEnd::DoExecute( SfxRequest& ) } SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - AbstractSvxNameDialog* pDlg = pFact ? pFact->CreateSvxNameDialog( NULL, aName, aDesc, RID_SVXDLG_NAME ) : 0; + AbstractSvxNameDialog* pDlg = pFact ? pFact->CreateSvxNameDialog( NULL, aName, aDesc ) : 0; if( pDlg ) { diff --git a/sd/source/ui/func/fuscale.cxx b/sd/source/ui/func/fuscale.cxx index 682dc1b4b719..b61836a74cca 100644 --- a/sd/source/ui/func/fuscale.cxx +++ b/sd/source/ui/func/fuscale.cxx @@ -139,7 +139,7 @@ void FuScale::DoExecute( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - pDlg = pFact->CreateSvxZoomDialog(NULL, aNewAttr, RID_SVXDLG_ZOOM); + pDlg = pFact->CreateSvxZoomDialog(NULL, aNewAttr); } if( pDlg ) @@ -169,12 +169,11 @@ void FuScale::DoExecute( SfxRequest& rReq ) delete pDlg; - // SvxZoomType eZT = ((const SvxZoomItem &) aArgs.Get (RID_SVXDLG_ZOOM)).GetType (); - switch (((const SvxZoomItem &) aArgs.Get (RID_SVXDLG_ZOOM)).GetType ()) + switch (((const SvxZoomItem &) aArgs.Get (SID_ATTR_ZOOM)).GetType ()) { case SVX_ZOOM_PERCENT: { - nValue = ((const SvxZoomItem &) aArgs.Get (RID_SVXDLG_ZOOM)).GetValue (); + nValue = ((const SvxZoomItem &) aArgs.Get (SID_ATTR_ZOOM)).GetValue (); mpViewShell->SetZoom( nValue ); diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx index b5db742f70b4..a5782aadb4c8 100644 --- a/sd/source/ui/func/futransf.cxx +++ b/sd/source/ui/func/futransf.cxx @@ -94,7 +94,7 @@ void FuTransform::DoExecute( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if ( pFact ) { - std::auto_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateCaptionDialog( NULL, mpView, RID_SVXDLG_CAPTION ) ); + std::auto_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateCaptionDialog( NULL, mpView ) ); const USHORT* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() ); SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange ); @@ -114,7 +114,7 @@ void FuTransform::DoExecute( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - std::auto_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateSvxTransformTabDialog( NULL, &aSet,mpView, RID_SVXDLG_TRANSFORM) ); + std::auto_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateSvxTransformTabDialog( NULL, &aSet, mpView ) ); if( pDlg.get() && (pDlg->Execute() == RET_OK) ) { rReq.Done( *( pDlg->GetOutputItemSet() ) ); diff --git a/sd/source/ui/func/futxtatt.cxx b/sd/source/ui/func/futxtatt.cxx index e94638ecf225..8ab4d8d02a75 100644 --- a/sd/source/ui/func/futxtatt.cxx +++ b/sd/source/ui/func/futxtatt.cxx @@ -79,7 +79,7 @@ void FuTextAttrDlg::DoExecute( SfxRequest& rReq ) if( !pArgs ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( NULL, &aNewAttr, RID_SVXDLG_TEXT, mpView ); + SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( NULL, &aNewAttr, mpView ); USHORT nResult = pDlg->Execute(); diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index a23c1d09a9e0..e5dc07fe80cb 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -905,7 +905,7 @@ void SlotManager::RenameSlide (void) DBG_ASSERT(pFact, "Dialogdiet fail!"); AbstractSvxNameDialog* aNameDlg = pFact->CreateSvxNameDialog( mrSlideSorter.GetActiveWindow(), - aPageName, aDescr, RID_SVXDLG_NAME); + aPageName, aDescr); DBG_ASSERT(aNameDlg, "Dialogdiet fail!"); aNameDlg->SetText( aTitle ); aNameDlg->SetCheckNameHdl( LINK( this, SlotManager, RenameSlideHdl ), true ); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 812bfca1a83d..12b81a01d3ba 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -467,7 +467,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!"); - AbstractSvxNameDialog* aNameDlg = pFact->CreateSvxNameDialog( GetActiveWindow(), aPageName, aDescr, RID_SVXDLG_NAME ); + AbstractSvxNameDialog* aNameDlg = pFact->CreateSvxNameDialog( GetActiveWindow(), aPageName, aDescr ); DBG_ASSERT(aNameDlg, "Dialogdiet fail!"); aNameDlg->SetText( aTitle ); aNameDlg->SetCheckNameHdl( LINK( this, DrawViewShell, RenameSlideHdl ), true ); diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx index 3581fde618a7..e9bad2064c10 100644 --- a/sd/source/ui/view/drviewsc.cxx +++ b/sd/source/ui/view/drviewsc.cxx @@ -127,7 +127,7 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); - AbstractSvxObjectNameDialog* pDlg = pFact->CreateSvxObjectNameDialog(NULL, aName, RID_SVXDLG_OBJECT_NAME); + AbstractSvxObjectNameDialog* pDlg = pFact->CreateSvxObjectNameDialog(NULL, aName); OSL_ENSURE(pDlg, "Dialogdiet fail!"); pDlg->SetCheckNameHdl(LINK(this, DrawViewShell, NameObjectHdl)); @@ -162,7 +162,7 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); - AbstractSvxObjectTitleDescDialog* pDlg = pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription, RID_SVXDLG_OBJECT_TITLE_DESC); + AbstractSvxObjectTitleDescDialog* pDlg = pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription); OSL_ENSURE(pDlg, "Dialogdiet fail!"); if(RET_OK == pDlg->Execute()) diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 49a5639980ff..49bbf3149c8b 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -963,7 +963,7 @@ BOOL View::GetExchangeList( List*& rpExchangeList, List* pBookmarkList, USHORT n String aTitle( SdResId( STR_TITLE_NAMEGROUP ) ); String aDesc( SdResId( STR_DESC_NAMEGROUP ) ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - AbstractSvxNameDialog* pDlg = pFact ? pFact->CreateSvxNameDialog( mpViewSh->GetActiveWindow(), *pNewName, aDesc, RID_SVXDLG_NAME ) : 0; + AbstractSvxNameDialog* pDlg = pFact ? pFact->CreateSvxNameDialog( mpViewSh->GetActiveWindow(), *pNewName, aDesc ) : 0; if( pDlg ) { pDlg->SetEditHelpId( HID_SD_NAMEDIALOG_OBJECT ); -- cgit v1.2.3 From 1ae23cece0bf35ea52a15c66519a34c43ac57937 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Tue, 3 Nov 2009 09:26:54 +0000 Subject: #i48179# Fixed some Solaris compilation problems. --- slideshow/source/engine/slideshowimpl.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 18b3a8ef4102..109e64ca63c1 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -1216,8 +1216,8 @@ sal_Bool SlideShowImpl::previousEffect() throw (uno::RuntimeException) { return maEffectRewinder.rewind( maScreenUpdater.createLock(false), - ::boost::bind(&SlideShowImpl::redisplayCurrentSlide, this), - ::boost::bind(&SlideShowImpl::rewindEffectToPreviousSlide, this)); + ::boost::bind(::boost::mem_fn(&SlideShowImpl::redisplayCurrentSlide), this), + ::boost::bind(::boost::mem_fn(&SlideShowImpl::rewindEffectToPreviousSlide), this)); } } @@ -2081,7 +2081,7 @@ void SlideShowImpl::notifySlideEnded (const bool bReverse) maListenerContainer.forEach( boost::bind( - &presentation::XSlideShowListener::slideEnded, + ::boost::mem_fn(&presentation::XSlideShowListener::slideEnded), _1, sal_Bool(bReverse))); } -- cgit v1.2.3 From cb2e7f49d2f8df9c78f15aeeb3f7a81e2807b83a Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 3 Nov 2009 18:12:19 +0100 Subject: #i104678# use high contrast mode setting instead of IsDark (paradigm shift begun with issue i35482) --- sd/source/ui/app/tbxww.cxx | 2 +- sd/source/ui/dlg/PaneDockingWindow.cxx | 2 +- sd/source/ui/dlg/animobjs.cxx | 4 ++-- sd/source/ui/dlg/navigatr.cxx | 2 +- sd/source/ui/toolpanel/LayoutMenu.cxx | 4 ++-- sd/source/ui/toolpanel/TitleToolBox.cxx | 2 +- sd/source/ui/unoidl/unopage.cxx | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx index e94fe501d73b..4318f8f9b4ac 100644 --- a/sd/source/ui/app/tbxww.cxx +++ b/sd/source/ui/app/tbxww.cxx @@ -311,7 +311,7 @@ void SdTbxControl::StateChanged( USHORT nSId, Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages(), - GetToolBox().GetDisplayBackground().GetColor().IsDark() ); + GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode() ); // !-Operator prueft, ob Image nicht vorhanden ist if( !!aImage ) diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx index 9ae95a079bd6..2aa6039cfb76 100644 --- a/sd/source/ui/dlg/PaneDockingWindow.cxx +++ b/sd/source/ui/dlg/PaneDockingWindow.cxx @@ -263,7 +263,7 @@ void PaneDockingWindow::InitializeTitleToolBox (void) Image aImage = Image (aBitmap, Color (COL_LIGHTMAGENTA)); Image aImageHC = Image (aBitmapHC, Color (BMP_COLOR_HIGHCONTRAST)); mpTitleToolBox->InsertItem (1, - GetSettings().GetStyleSettings().GetMenuBarColor().IsDark() + GetSettings().GetStyleSettings().GetHighContrastMode() ? aImageHC : aImage); mpTitleToolBox->ShowItem (1); diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 0c05c58312b8..84d030867abb 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -138,7 +138,7 @@ void SdDisplay::DataChanged( const DataChangedEvent& rDCEvt ) { const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings(); SetBackground( Wallpaper( Color( rStyles.GetFieldColor() ) ) ); - SetDrawMode( GetDisplayBackground().GetColor().IsDark() + SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? ViewShell::OUTPUT_DRAWMODE_CONTRAST : ViewShell::OUTPUT_DRAWMODE_COLOR ); } @@ -601,7 +601,7 @@ void AnimationWindow::UpdateControl( ULONG nListPos, BOOL bDisableCtrls ) aVD.SetOutputSize( aObjSize ); const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings(); aVD.SetBackground( Wallpaper( rStyles.GetFieldColor() ) ); - aVD.SetDrawMode( GetDisplayBackground().GetColor().IsDark() + aVD.SetDrawMode( rStyles.GetHighContrastMode() ? ViewShell::OUTPUT_DRAWMODE_CONTRAST : ViewShell::OUTPUT_DRAWMODE_COLOR ); aVD.Erase(); diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index fa31c7fbb209..f251f6964263 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -863,7 +863,7 @@ void SdNavigatorWin::SetDragImage() void SdNavigatorWin::ApplyImageList() { - const bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + const bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); maToolbox.SetImageList( bHighContrast ? maImageListH : maImageList ); diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx index 7a39f1c42f15..14f286c80e64 100644 --- a/sd/source/ui/toolpanel/LayoutMenu.cxx +++ b/sd/source/ui/toolpanel/LayoutMenu.cxx @@ -63,7 +63,7 @@ #include #include #include -#include "taskpane/TitledControl.hxx" +#include "taskpane/TitledControl.hxx" #include #include #include @@ -808,7 +808,7 @@ SfxRequest LayoutMenu::CreateRequest ( void LayoutMenu::Fill (void) { - const bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + const bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); SvtLanguageOptions aLanguageOptions; sal_Bool bVertical = aLanguageOptions.IsVerticalTextEnabled(); SdDrawDocument* pDocument = mrBase.GetDocument(); diff --git a/sd/source/ui/toolpanel/TitleToolBox.cxx b/sd/source/ui/toolpanel/TitleToolBox.cxx index b06ab615cbf2..d108724f03d4 100644 --- a/sd/source/ui/toolpanel/TitleToolBox.cxx +++ b/sd/source/ui/toolpanel/TitleToolBox.cxx @@ -77,7 +77,7 @@ void TitleToolBox::AddItem (ToolBoxId aId) case TBID_DOCUMENT_CLOSE: InsertItem (TBID_DOCUMENT_CLOSE, - GetSettings().GetStyleSettings().GetMenuBarColor().IsDark() + GetSettings().GetStyleSettings().GetHighContrastMode() ? maImageHC : maImage, 0 ); break; diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index a252e2302b59..15b3b2224b4b 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -1014,7 +1014,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) } case WID_PAGE_LDBITMAP: { - BOOL bHC = Application::GetSettings().GetStyleSettings().GetWindowColor().IsDark(); + BOOL bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); Reference< awt::XBitmap > xBitmap( VCLUnoHelper::CreateBitmap( BitmapEx( SdResId( bHC ? BMP_PAGE_H : BMP_PAGE ) ) ) ); aAny <<= xBitmap; -- cgit v1.2.3 From 2c0f94218a6775ced54d2dd14242596ed2749b07 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Wed, 4 Nov 2009 21:54:56 +0100 Subject: #i196421#: some problems with pch on Windows --- sd/inc/pch/precompiled_sd.hxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index 8250e050bcf4..360f32e880bf 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -1,4 +1,5 @@ -/************************************************************************* +/************************************************************************cherex + * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -596,7 +597,7 @@ #include "svx/editund2.hxx" #include "svx/editview.hxx" #include "svx/eeitem.hxx" -#include "svx/escherex.hxx" +#include "filter/msfilter/escherex.hxx" #include "svx/escpitem.hxx" #include "svx/extrusionbar.hxx" #include "svx/f3dchild.hxx" @@ -640,8 +641,8 @@ #include "svx/lspcitem.hxx" #include "svx/modctrl.hxx" #include "svx/msdffdef.hxx" -#include "svx/msocximex.hxx" -#include "svx/msoleexp.hxx" +#include "filter/msfilter/msocximex.hxx" +#include "filter/msfilter/msoleexp.hxx" #include "svx/numitem.hxx" #include "svx/obj3d.hxx" #include "svx/objfac3d.hxx" @@ -724,7 +725,7 @@ #include "svx/svxfont.hxx" #include "svx/svxgrahicitem.hxx" #include "svx/svxids.hrc" -#include "svx/svxmsbas.hxx" +#include "filter/msfilter/svxmsbas.hxx" #include "svx/sxciaitm.hxx" #include "svx/sxekitm.hxx" #include "svx/sxelditm.hxx" -- cgit v1.2.3 From 76582d69eb4ca5166fb9a41a698bfea4efd466a5 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Thu, 5 Nov 2009 09:52:12 +0100 Subject: forgot to add filter to build.lst of apps using msfilter --- sd/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 sd/prj/build.lst diff --git a/sd/prj/build.lst b/sd/prj/build.lst old mode 100644 new mode 100755 index 00150a5708fd..bc8bf923f7e5 --- a/sd/prj/build.lst +++ b/sd/prj/build.lst @@ -1,4 +1,4 @@ -sd sd : l10n animations svx stoc canvas NULL +sd sd : filter l10n animations svx stoc canvas NULL sd sd usr1 - all sd_mkout NULL sd sd\inc nmake - all sd_inc NULL sd sd\prj get - all sd_prj NULL -- cgit v1.2.3 From 9a0f53a4bef5489ff2f10a998249d5951ab71b24 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Thu, 5 Nov 2009 13:16:50 +0000 Subject: #i57928# force quick text edit mode during format paintbrush --- sd/source/ui/func/fuformatpaintbrush.cxx | 12 ++++++++++++ sd/source/ui/inc/fuformatpaintbrush.hxx | 1 + 2 files changed, 13 insertions(+) diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx index 58842f090d3a..eb4ca01ba621 100644 --- a/sd/source/ui/func/fuformatpaintbrush.cxx +++ b/sd/source/ui/func/fuformatpaintbrush.cxx @@ -67,6 +67,7 @@ TYPEINIT1( FuFormatPaintBrush, FuText ); FuFormatPaintBrush::FuFormatPaintBrush( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ) : FuText(pViewSh, pWin, pView, pDoc, rReq) , mbPermanent( false ) +, mbOldIsQuickTextEditMode( true ) { } @@ -230,10 +231,21 @@ BOOL FuFormatPaintBrush::KeyInput(const KeyEvent& rKEvt) void FuFormatPaintBrush::Activate() { + mbOldIsQuickTextEditMode = mpViewShell->GetFrameView()->IsQuickEdit(); + if( !mbOldIsQuickTextEditMode ) + { + mpViewShell->GetFrameView()->SetQuickEdit(TRUE); + mpView->SetQuickTextEditMode(TRUE); + } } void FuFormatPaintBrush::Deactivate() { + if( !mbOldIsQuickTextEditMode ) + { + mpViewShell->GetFrameView()->SetQuickEdit(FALSE); + mpView->SetQuickTextEditMode(FALSE); + } } bool FuFormatPaintBrush::HasContentForThisType( UINT32 nObjectInventor, UINT16 nObjectIdentifier ) const diff --git a/sd/source/ui/inc/fuformatpaintbrush.hxx b/sd/source/ui/inc/fuformatpaintbrush.hxx index c1d0fb9318ca..7c4b9da4ea95 100644 --- a/sd/source/ui/inc/fuformatpaintbrush.hxx +++ b/sd/source/ui/inc/fuformatpaintbrush.hxx @@ -73,6 +73,7 @@ private: ::boost::shared_ptr mpItemSet; bool mbPermanent; + bool mbOldIsQuickTextEditMode; }; } // end of namespace sd -- cgit v1.2.3 From 83b79a0c7e24dfc98c5da5c9809077a624da1147 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Tue, 10 Nov 2009 15:17:30 +0000 Subject: #i106678# remove unnecessary scaling as it causes only trouble --- sd/source/core/sdpage.cxx | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 7f80b5bd763a..b9071bb891c6 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2049,40 +2049,6 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR pObj->NbcMove(aVec); } - Rectangle aBoundRect = pObj->GetCurrentBoundRect(); - - if (!aBorderRect.IsInside(aBoundRect)) - { - /********************************************************** - * Objekt liegt nicht vollstaendig innerhalb der Raender - * -> Position korrigieren - **********************************************************/ - Point aOldPos(aBoundRect.TopLeft()); - aNewPos = aOldPos; - - // Position links oben ggf. korrigieren - aNewPos.X() = Max(aNewPos.X(), aBorderRect.Left()); - aNewPos.Y() = Max(aNewPos.Y(), aBorderRect.Top()); - aVec = Size(aNewPos.X() - aOldPos.X(), aNewPos.Y() - aOldPos.Y()); - - if (aVec.Height() != 0 || aVec.Width() != 0) - { - pObj->NbcMove(aVec); - } - - // Position rechts unten ggf. korrigieren - aOldPos = aBoundRect.BottomRight(); - aNewPos = aOldPos; - aNewPos.X() = Min(aNewPos.X(), aBorderRect.Right()); - aNewPos.Y() = Min(aNewPos.Y(), aBorderRect.Bottom()); - aVec = Size(aNewPos.X() - aOldPos.X(), aNewPos.Y() - aOldPos.Y()); - - if (aVec.Height() != 0 || aVec.Width() != 0) - { - pObj->NbcMove(aVec); - } - } - pObj->SetChanged(); pObj->BroadcastObjectChange(); } -- cgit v1.2.3 From eaa648fe8e82fca7806f93d45dbf751205a9ffa3 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Fri, 20 Nov 2009 12:42:09 +0000 Subject: #i107049# Do not scroll focus indicator into view when slide sorter is focused. --- .../controller/SlideSorterController.cxx | 2 +- .../ui/slidesorter/controller/SlsFocusManager.cxx | 29 +++++++++++++--------- .../slidesorter/inc/controller/SlsFocusManager.hxx | 12 +++++++-- 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index f355ada7089f..5303b9dc6426 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -604,7 +604,7 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent) case VCLEVENT_WINDOW_GETFOCUS: if (pActiveWindow != NULL && pWindow == pActiveWindow) - GetFocusManager().ShowFocus(); + GetFocusManager().ShowFocus(false); break; case VCLEVENT_WINDOW_LOSEFOCUS: diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx index 009a24910d5a..1077184b7db7 100644 --- a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx @@ -133,17 +133,17 @@ void FocusManager::MoveFocus (FocusMoveDirection eDirection) } if (mbPageIsFocused) - ShowFocusIndicator(GetFocusedPageDescriptor()); + ShowFocusIndicator(GetFocusedPageDescriptor(), true); } } -void FocusManager::ShowFocus (void) +void FocusManager::ShowFocus (const bool bScrollToFocus) { mbPageIsFocused = true; - ShowFocusIndicator(GetFocusedPageDescriptor()); + ShowFocusIndicator(GetFocusedPageDescriptor(), bScrollToFocus); } @@ -254,20 +254,25 @@ void FocusManager::HideFocusIndicator (const model::SharedPageDescriptor& rpDesc -void FocusManager::ShowFocusIndicator (const model::SharedPageDescriptor& rpDescriptor) +void FocusManager::ShowFocusIndicator ( + const model::SharedPageDescriptor& rpDescriptor, + const bool bScrollToFocus) { if (rpDescriptor.get() != NULL) { rpDescriptor->SetFocus (); - // Scroll the focused page object into the visible area and repaint - // it, so that the focus indicator becomes visible. - view::SlideSorterView& rView (mrSlideSorter.GetView()); - mrSlideSorter.GetController().GetSelectionManager()->MakeRectangleVisible ( - rView.GetPageBoundingBox ( - GetFocusedPageDescriptor(), - view::SlideSorterView::CS_MODEL, - view::SlideSorterView::BBT_INFO)); + if (bScrollToFocus) + { + // Scroll the focused page object into the visible area and repaint + // it, so that the focus indicator becomes visible. + view::SlideSorterView& rView (mrSlideSorter.GetView()); + mrSlideSorter.GetController().GetSelectionManager()->MakeRectangleVisible ( + rView.GetPageBoundingBox ( + GetFocusedPageDescriptor(), + view::SlideSorterView::CS_MODEL, + view::SlideSorterView::BBT_INFO)); + } mrSlideSorter.GetView().RequestRepaint (rpDescriptor); NotifyFocusChangeListeners(); diff --git a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx index 00678c83058d..4384e1a66d9d 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx @@ -87,8 +87,11 @@ public: void MoveFocus (FocusMoveDirection eDirection); /** Show the focus indicator of the current slide. + @param bScrollToFocus + When (the default) then the view is scrolled so that the + focus rectangle lies inside its visible area. */ - void ShowFocus (void); + void ShowFocus (const bool bScrollToFocus = true); /** Hide the focus indicator. */ @@ -215,8 +218,13 @@ private: made visible. @param pDescriptor When NULL is given then the call is ignored. + @param bScrollToFocus + When (the default) then the view is scrolled so that the + focus rectangle lies inside its visible area. */ - void ShowFocusIndicator (const model::SharedPageDescriptor& rpDescriptor); + void ShowFocusIndicator ( + const model::SharedPageDescriptor& rpDescriptor, + const bool bScrollToFocus); /** Call all currently registered listeners that a focus change has happended. The focus may be hidden or shown or moved from one page -- cgit v1.2.3 From d1515a61d40e8939acb7b695f60d61c21c66bddb Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Wed, 25 Nov 2009 16:04:16 +0000 Subject: fixed typo --- sd/source/ui/annotations/annotationmanager.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index bbc9bbd539f3..e24b28a0e814 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -199,7 +199,7 @@ AnnotationManagerImpl::AnnotationManagerImpl( ViewShellBase& rViewShellBase ) { SdOptions* pOptions = SD_MOD()->GetSdOptions(mpDoc->GetDocumentType()); if( pOptions ) - mbShowAnnotations = pOptions->IsPreviewTransitions() == sal_True; + mbShowAnnotations = pOptions->IsShowComments() == TRUE; } // -------------------------------------------------------------------- -- cgit v1.2.3 From 3838b0a0e8c89da328481dd6d417f5e4ebaeb953 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Tue, 1 Dec 2009 08:45:04 +0100 Subject: #i10000# fix for lik-error on Windows --- sd/source/ui/dlg/ins_paste.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sd/source/ui/dlg/ins_paste.cxx b/sd/source/ui/dlg/ins_paste.cxx index 9f2c3bf0b6b6..422acbec4a73 100644 --- a/sd/source/ui/dlg/ins_paste.cxx +++ b/sd/source/ui/dlg/ins_paste.cxx @@ -31,6 +31,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sd.hxx" +#ifdef SD_DLLIMPLEMENTATION +#undef SD_DLLIMPLEMENTATION +#endif + #include "ins_paste.hrc" #include "ins_paste.hxx" -- cgit v1.2.3 From 309c883e002dcd20ec775f323e74bf49c1bc0e06 Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Tue, 8 Dec 2009 15:18:29 +0100 Subject: some more fixes after resync --- sd/source/ui/func/fuformatpaintbrush.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx index eb4ca01ba621..98dbcba52ab2 100644 --- a/sd/source/ui/func/fuformatpaintbrush.cxx +++ b/sd/source/ui/func/fuformatpaintbrush.cxx @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include -- cgit v1.2.3