Kaydet (Commit) 41449a86 authored tarafından Joseph Powers's avatar Joseph Powers

unusedcode.easy: slideshow::internal cleanup

üst fc2661c5
......@@ -170,11 +170,6 @@ namespace slideshow
maContentPixelOffset = rPixelOffset;
}
::basegfx::B2DSize AnimatedSprite::getPixelOffset() const
{
return maContentPixelOffset;
}
void AnimatedSprite::movePixel( const ::basegfx::B2DPoint& rNewPos )
{
maPosPixel.reset( rNewPos );
......@@ -205,11 +200,6 @@ namespace slideshow
mpSprite->transform( rTransform );
}
void AnimatedSprite::setPriority( double nPrio )
{
mpSprite->setPriority( nPrio );
}
void AnimatedSprite::hide()
{
mpSprite->hide();
......
......@@ -109,22 +109,6 @@ namespace slideshow
return true;
}
/// Extract the node type from the user data
bool getNodeType( sal_Int16& o_rNodeType,
const uno::Sequence< beans::NamedValue >& rValues )
{
beans::NamedValue aNamedValue;
if( findNamedValue( &aNamedValue,
rValues,
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("node-type") ) ) )
{
if( (aNamedValue.Value >>= o_rNodeType) )
return true;
}
return false;
}
}
}
......
......@@ -79,10 +79,6 @@ namespace slideshow
*/
bool isIndefiniteTiming( const ::com::sun::star::uno::Any& rAny );
/// Extract the node type from the user data
bool getNodeType( sal_Int16& o_rNodeType,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::NamedValue >& rValues );
}
}
......
......@@ -188,15 +188,6 @@ namespace slideshow
{
}
HSLColor::HSLColor( ::cppcanvas::Color::IntSRGBA nRGBColor ) :
maHSLTriple( rgb2hsl( ::cppcanvas::getRed( nRGBColor ) / 255.0,
::cppcanvas::getGreen( nRGBColor ) / 255.0,
::cppcanvas::getBlue( nRGBColor ) / 255.0 ) ),
mnMagicValue( getMagic( maHSLTriple.mnLuminance,
maHSLTriple.mnSaturation ) )
{
}
HSLColor::HSLColor( double nHue, double nSaturation, double nLuminance ) :
maHSLTriple( nHue, nSaturation, nLuminance ),
mnMagicValue( getMagic( maHSLTriple.mnLuminance,
......
......@@ -299,18 +299,6 @@ sal_Int32 EffectRewinder::countMainSequenceEffects (void)
}
return nMainSequenceNodeCount;
// // Skip all main sequence nodes.
// SkipSomeMainSequenceEffects(nMainSequenceNodeCount);
}
void EffectRewinder::skipSomeMainSequenceEffects (sal_Int32 nSkipCount)
{
while (--nSkipCount >= 0)
skipSingleMainSequenceEffects();
}
......
......@@ -150,10 +150,6 @@ private:
*/
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
......
......@@ -926,21 +926,6 @@ void EventMultiplexer::addUserPaintHandler( const UserPaintEventHandlerSharedPtr
mpImpl->maUserPaintEventHandlers.add( rHandler );
}
void EventMultiplexer::removeUserPaintHandler( const UserPaintEventHandlerSharedPtr& rHandler )
{
mpImpl->maUserPaintEventHandlers.remove( rHandler );
}
void EventMultiplexer::addShapeCursorHandler( const ShapeCursorEventHandlerSharedPtr& rHandler )
{
mpImpl->maShapeCursorHandlers.add( rHandler );
}
void EventMultiplexer::removeShapeCursorHandler( const ShapeCursorEventHandlerSharedPtr& rHandler )
{
mpImpl->maShapeCursorHandlers.remove( rHandler );
}
void EventMultiplexer::addClickHandler(
const MouseEventHandlerSharedPtr& rHandler,
double nPriority )
......
......@@ -258,12 +258,6 @@ namespace slideshow
return ExpressionNodeSharedPtr( new DividesExpression(rLHS, rRHS) );
}
ExpressionNodeSharedPtr ExpressionNodeFactory::createComposedExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
const ExpressionNodeSharedPtr& rInnerFunction )
{
return ExpressionNodeSharedPtr( new ComposedExpression(rOuterFunction, rInnerFunction) );
}
ExpressionNodeSharedPtr ExpressionNodeFactory::createMinExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
const ExpressionNodeSharedPtr& rInnerFunction )
{
......
......@@ -245,22 +245,6 @@ namespace slideshow
{
}
DrawShapeSubsetting::DrawShapeSubsetting( const GDIMetaFileSharedPtr& rMtf ) :
maActionClassVector(),
mpMtf( rMtf ),
maSubset(),
maSubsetShapes(),
mnMinSubsetActionIndex( SAL_MAX_INT32 ),
mnMaxSubsetActionIndex(0),
maCurrentSubsets(),
mbNodeTreeInitialized( false )
{
ENSURE_OR_THROW( mpMtf,
"DrawShapeSubsetting::DrawShapeSubsetting(): Invalid metafile" );
initCurrentSubsets();
}
DrawShapeSubsetting::DrawShapeSubsetting( const DocTreeNode& rShapeSubset,
const GDIMetaFileSharedPtr& rMtf ) :
maActionClassVector(),
......
......@@ -60,17 +60,6 @@ namespace slideshow
*/
DrawShapeSubsetting();
/** Create new shape subset handling.
This method creates a subset handler which initially
displays the whole shape.
@param rMtf
Metafile to retrieve subset info from (must have been
generated with verbose text comments switched on).
*/
explicit DrawShapeSubsetting( const ::boost::shared_ptr< GDIMetaFile >& rMtf );
/** Create new shape subset handling.
@param rShapeSubset
......
......@@ -261,44 +261,6 @@ bool getMetaFile( const uno::Reference< lang::XComponent >& xSource,
return true;
}
void removeTextActions( GDIMetaFile& rMtf )
{
// search metafile for text output
MetaAction* pCurrAct;
int nActionIndex(0);
pCurrAct = rMtf.FirstAction();
while( pCurrAct )
{
switch( pCurrAct->GetType() )
{
case META_TEXTCOLOR_ACTION:
case META_TEXTFILLCOLOR_ACTION:
case META_TEXTLINECOLOR_ACTION:
case META_TEXTALIGN_ACTION:
case META_FONT_ACTION:
case META_LAYOUTMODE_ACTION:
case META_TEXT_ACTION:
case META_TEXTARRAY_ACTION:
case META_TEXTRECT_ACTION:
case META_STRETCHTEXT_ACTION:
case META_TEXTLINE_ACTION:
{
// remove every text-related actions
pCurrAct = rMtf.NextAction();
rMtf.RemoveAction( nActionIndex );
break;
}
default:
pCurrAct = rMtf.NextAction();
++nActionIndex;
break;
}
}
}
sal_Int32 getNextActionOffset( MetaAction * pCurrAct )
{
// Special handling for actions that represent
......
......@@ -114,10 +114,6 @@ namespace slideshow
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
/** Remove all text actions from the given metafile.
*/
void removeTextActions( GDIMetaFile& io_rMtf );
/** Gets the next action offset for iterating meta actions which is most
often returns 1.
*/
......
......@@ -138,40 +138,6 @@ namespace slideshow
return pRet;
}
void Layer::viewChanged( const ViewSharedPtr& rChangedView )
{
ViewEntryVector::iterator aIter;
const ViewEntryVector::iterator aEnd( maViewEntries.end() );
if( (aIter=std::find_if( maViewEntries.begin(),
aEnd,
boost::bind<bool>(
std::equal_to< ViewSharedPtr >(),
boost::bind( &ViewEntry::getView, _1 ),
boost::cref( rChangedView )))) !=
aEnd )
{
// adapt size of given ViewLayer - background layer
// resizes with view.
if( !mbBackgroundLayer )
aIter->mpViewLayer->resize(maBounds);
}
}
void Layer::viewsChanged()
{
// adapt size of given ViewLayer - background layer
// resizes with view.
if( !mbBackgroundLayer )
{
std::for_each( maViewEntries.begin(),
maViewEntries.end(),
boost::bind( &ViewLayer::resize,
boost::bind( &ViewEntry::getViewLayer,
_1 ),
boost::cref(maBounds)));
}
}
void Layer::setShapeViews( ShapeSharedPtr const& rShape ) const
{
rShape->clearAllViewLayers();
......
......@@ -133,21 +133,6 @@ namespace slideshow
*/
ViewLayerSharedPtr removeView( const ViewSharedPtr& rView );
/** Notify that given ViewLayer has changed
@param rChangedView
This view's layer will get resized. Afterwards, a
complete repaint might be necessary.
*/
void viewChanged( const ViewSharedPtr& rChangedView );
/** Notify that all ViewLayer have changed
This resizes all view layers. Afterwards, a complete
repaint might be necessary.
*/
void viewsChanged();
/** Init shape with this layer's views
@param rShape
......
......@@ -323,19 +323,6 @@ namespace slideshow
notifyShapeUpdate( rShape );
}
bool LayerManager::removeShape( const ShapeSharedPtr& rShape )
{
// remove shape from XShape hash map
if( maXShapeHash.erase( rShape->getXShape() ) == 0 )
return false; // shape not in map
OSL_ASSERT( maAllShapes.find(rShape) != maAllShapes.end() );
implRemoveShape( rShape );
return true;
}
void LayerManager::implRemoveShape( const ShapeSharedPtr& rShape )
{
OSL_ASSERT( !maLayers.empty() ); // always at least background layer
......
......@@ -127,12 +127,6 @@ namespace slideshow
*/
void addShape( const ShapeSharedPtr& rShape );
/** Remove shape from this object
This method removes a shape from the shape.
*/
bool removeShape( const ShapeSharedPtr& rShape );
/** Lookup a Shape from an XShape model object
This method looks up the internal shape map for one
......
......@@ -533,12 +533,6 @@ namespace slideshow
mpHandler->drawPolygons();
}
void UserPaintOverlay::update_settings( bool bUserPaintEnabled, RGBColor const& aUserPaintColor, double dUserPaintStrokeWidth )
{
mpHandler->update_settings( bUserPaintEnabled, aUserPaintColor, dUserPaintStrokeWidth );
}
UserPaintOverlay::~UserPaintOverlay()
{
try
......
......@@ -76,9 +76,6 @@ namespace slideshow
PolyPolygonVector getPolygons();
void drawPolygons();
void update_settings( bool bUserPaintEnabled, RGBColor const& aUserPaintColor, double dUserPaintStrokeWidth );
private:
UserPaintOverlay( const RGBColor& rStrokeColor,
double nStrokeWidth,
......
......@@ -157,13 +157,6 @@ SlideBitmapSharedPtr SlideChangeBase::createBitmap( const UnoViewSharedPtr&
pView );
}
::basegfx::B2ISize SlideChangeBase::getLeavingSlideSizePixel( const UnoViewSharedPtr& pView ) const
{
return getSlideSizePixel( (*maLeavingSlide)->getSlideSize(),
pView );
}
void SlideChangeBase::renderBitmap(
SlideBitmapSharedPtr const & pSlideBitmap,
cppcanvas::CanvasSharedPtr const & pCanvas )
......
......@@ -131,7 +131,6 @@ protected:
const boost::optional<SlideSharedPtr>& rSlide_ ) const;
::basegfx::B2ISize getEnteringSlideSizePixel( const UnoViewSharedPtr& pView ) const;
::basegfx::B2ISize getLeavingSlideSizePixel( const UnoViewSharedPtr& pView ) const;
void renderBitmap( SlideBitmapSharedPtr const& pSlideBitmap,
boost::shared_ptr<cppcanvas::Canvas> const& pCanvas );
......
......@@ -115,30 +115,6 @@ namespace slideshow
return pView;
}
bool UnoViewContainer::removeView( const UnoViewSharedPtr& rView )
{
// remove locally
const UnoViewVector::iterator aEnd( maViews.end() );
UnoViewVector::iterator aIter;
if( (aIter=::std::find( maViews.begin(),
aEnd,
rView )) == aEnd )
{
// view seemingly was not added, failed
return false;
}
OSL_ENSURE( ::std::count( maViews.begin(),
aEnd,
rView ) == 1,
"UnoViewContainer::removeView(): View was added multiple times" );
// actually erase from container
maViews.erase( aIter );
return true;
}
void UnoViewContainer::dispose()
{
::std::for_each( maViews.begin(),
......
......@@ -694,30 +694,6 @@ UserEventQueue::~UserEventQueue()
}
}
bool UserEventQueue::isEmpty() const
{
// TODO(T2): This is not thread safe, the handlers are all
// only separately synchronized. This poses the danger of
// generating false empty status on XSlideShow::update(), such
// that the last events of a slide are not triggered.
// we're empty iff all handler queues are empty
return
(mpStartEventHandler ? mpStartEventHandler->isEmpty() : true) &&
(mpEndEventHandler ? mpEndEventHandler->isEmpty() : true) &&
(mpAnimationStartEventHandler ? mpAnimationStartEventHandler->isEmpty() : true) &&
(mpAnimationEndEventHandler ? mpAnimationEndEventHandler->isEmpty() : true) &&
(mpAudioStoppedEventHandler ? mpAudioStoppedEventHandler->isEmpty() : true) &&
(mpShapeClickEventHandler ? mpShapeClickEventHandler->isEmpty() : true) &&
(mpClickEventHandler ? mpClickEventHandler->isEmpty() : true) &&
(mpSkipEffectEventHandler ? mpSkipEffectEventHandler->isEmpty() : true) &&
(mpRewindEffectEventHandler ? mpRewindEffectEventHandler->isEmpty() : true) &&
(mpShapeDoubleClickEventHandler ? mpShapeDoubleClickEventHandler->isEmpty() : true) &&
(mpDoubleClickEventHandler ? mpDoubleClickEventHandler->isEmpty() : true) &&
(mpMouseEnterHandler ? mpMouseEnterHandler->isEmpty() : true) &&
(mpMouseLeaveHandler ? mpMouseLeaveHandler->isEmpty() : true);
}
void UserEventQueue::clear()
{
// unregister and delete all handlers
......@@ -790,23 +766,6 @@ void UserEventQueue::setAdvanceOnClick( bool bAdvanceOnClick )
mpClickEventHandler->setAdvanceOnClick( bAdvanceOnClick );
}
void UserEventQueue::registerSlideStartEvent( const EventSharedPtr& rEvent )
{
registerEvent( mpStartEventHandler,
rEvent,
boost::bind( &EventMultiplexer::addSlideStartHandler,
boost::ref( mrMultiplexer ), _1 ) );
}
void UserEventQueue::registerSlideEndEvent( const EventSharedPtr& rEvent )
{
registerEvent( mpEndEventHandler,
rEvent,
boost::bind( &EventMultiplexer::addSlideEndHandler,
boost::ref( mrMultiplexer ), _1 ) );
}
void UserEventQueue::registerAnimationStartEvent(
const EventSharedPtr& rEvent,
const uno::Reference< animations::XAnimationNode>& xNode )
......@@ -964,15 +923,6 @@ void UserEventQueue::registerShapeDoubleClickEvent(
mpShapeDoubleClickEventHandler->addEvent( rEvent, rShape );
}
void UserEventQueue::registerDoubleClickEvent( const EventSharedPtr& rEvent )
{
registerEvent( mpDoubleClickEventHandler,
rEvent,
boost::bind( &EventMultiplexer::addDoubleClickHandler,
boost::ref( mrMultiplexer ), _1,
0.0 /* default prio */ ) );
}
void UserEventQueue::registerMouseEnterEvent( const EventSharedPtr& rEvent,
const ShapeSharedPtr& rShape )
{
......
......@@ -96,9 +96,6 @@ namespace slideshow
*/
void setPixelOffset( const ::basegfx::B2DSize& rPixelOffset );
/// Retrieve current pixel offset for content output.
::basegfx::B2DSize getPixelOffset() const;
/// Show the sprite
void show();
......@@ -153,16 +150,6 @@ namespace slideshow
*/
void transform( const ::basegfx::B2DHomMatrix& rTransform );
/** Set the sprite priority.
The sprite priority determines the ordering of the
sprites on screen, i.e. which sprite lies before which.
@param rPrio
The new sprite prio. Must be in the range [0,1]
*/
void setPriority( double rPrio );
private:
ViewLayerSharedPtr mpViewLayer;
......
......@@ -168,15 +168,6 @@ public:
void addShapeListenerHandler( const ShapeListenerEventHandlerSharedPtr& rHandler );
void removeShapeListenerHandler( const ShapeListenerEventHandlerSharedPtr& rHandler );
/** Register an event handler that will be called when
XShapeListeners are changed.
@param rHandler
Handler to call when a shape listener changes
*/
void addShapeCursorHandler( const ShapeCursorEventHandlerSharedPtr& rHandler );
void removeShapeCursorHandler( const ShapeCursorEventHandlerSharedPtr& rHandler );
/** Register an event handler that will be called when
user paint parameters change.
......@@ -184,7 +175,6 @@ public:
Handler to call when a shape listener changes
*/
void addUserPaintHandler( const UserPaintEventHandlerSharedPtr& rHandler );
void removeUserPaintHandler( const UserPaintEventHandlerSharedPtr& rHandler );
/** Register an event handler that will be called when the
user requests the next effect.
......
......@@ -68,9 +68,6 @@ namespace slideshow
The resulting expression will calculate
rOuterFunction( rInnerFunction(t) ).
*/
static ExpressionNodeSharedPtr createComposedExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
const ExpressionNodeSharedPtr& rInnerFunction );
static ExpressionNodeSharedPtr createMinExpression ( const ExpressionNodeSharedPtr& rOuterFunction,
const ExpressionNodeSharedPtr& rInnerFunction );
......
......@@ -46,7 +46,6 @@ namespace slideshow
{
public:
HSLColor();
explicit HSLColor( ::cppcanvas::Color::IntSRGBA nRGBColor );
HSLColor( double nHue, double nSaturation, double nLuminance );
explicit HSLColor( const RGBColor& rColor );
......
......@@ -65,13 +65,6 @@ namespace slideshow
*/
bool addView( const UnoViewSharedPtr& rView );
/** Remove a previously added a view from this container
@return true, if this view was successfully removed, false
otherwise (e.g. if this view wasn't added in the first place)
*/
bool removeView( const UnoViewSharedPtr& rView );
/** Remove a previously added a view from this container
@return the View object, if this view was successfully
......
......@@ -93,10 +93,6 @@ public:
CursorManager& rCursorManager );
~UserEventQueue();
/** Query whether there are any events still pending.
*/
bool isEmpty() const;
/** Clear all registered events.
This method clears all registered, but
......@@ -116,24 +112,6 @@ public:
*/
void setAdvanceOnClick( bool bAdvanceOnClick );
/** Register an event that will be fired when the slide is
just shown.
Note that <em>all</em> registered events will be fired
when the slide start occurs. This is in contrast to
the mouse events below.
*/
void registerSlideStartEvent( const EventSharedPtr& rEvent );
/** Register an event that will be fired when the slide is
about to vanish.
Note that <em>all</em> registered events will be fired
when the slide end occurs. This is in contrast to
the mouse events below.
*/
void registerSlideEndEvent( const EventSharedPtr& rEvent );
/** Register an event that will be fired when the given
animation node starts.
......@@ -233,18 +211,6 @@ public:
void registerShapeDoubleClickEvent( const EventSharedPtr& rEvent,
const ShapeSharedPtr& rShape );
/** Register an event that is fired on a double mouse click
For every mouse double click, only one of the events
registered here is fired. The order of fired events is
the order of registration, i.e. the first event
registered will be the one fired for the first mouse
double click. It is irrelevant where on the slide the
mouse is clicked, i.e. the shape need not be hit by
the mouse.
*/
void registerDoubleClickEvent( const EventSharedPtr& rEvent );
/** Register an event that is fired when the mouse enters
the area of the given shape
......
......@@ -3066,27 +3066,6 @@ sdr::table::TableLayouter::getRowStart(int) const
sdr::table::TableLayouter::setColumnWidth(int, int)
sdr::table::TableLayouter::setRowHeight(int, int)
sfx2::TaskPaneWrapper::GetChildWindowId()
slideshow::internal::AnimatedSprite::getPixelOffset() const
slideshow::internal::AnimatedSprite::setPriority(double)
slideshow::internal::DrawShapeSubsetting::DrawShapeSubsetting(boost::shared_ptr<GDIMetaFile> const&)
slideshow::internal::EffectRewinder::skipSomeMainSequenceEffects(int)
slideshow::internal::EventMultiplexer::addShapeCursorHandler(boost::shared_ptr<slideshow::internal::ShapeCursorEventHandler> const&)
slideshow::internal::EventMultiplexer::removeShapeCursorHandler(boost::shared_ptr<slideshow::internal::ShapeCursorEventHandler> const&)
slideshow::internal::EventMultiplexer::removeUserPaintHandler(boost::shared_ptr<slideshow::internal::UserPaintEventHandler> const&)
slideshow::internal::ExpressionNodeFactory::createComposedExpression(boost::shared_ptr<slideshow::internal::ExpressionNode> const&, boost::shared_ptr<slideshow::internal::ExpressionNode> const&)
slideshow::internal::HSLColor::HSLColor(unsigned int)
slideshow::internal::Layer::viewChanged(boost::shared_ptr<slideshow::internal::View> const&)
slideshow::internal::Layer::viewsChanged()
slideshow::internal::LayerManager::removeShape(boost::shared_ptr<slideshow::internal::Shape> const&)
slideshow::internal::SlideChangeBase::getLeavingSlideSizePixel(boost::shared_ptr<slideshow::internal::UnoView> const&) const
slideshow::internal::UnoViewContainer::removeView(boost::shared_ptr<slideshow::internal::UnoView> const&)
slideshow::internal::UserEventQueue::isEmpty() const
slideshow::internal::UserEventQueue::registerDoubleClickEvent(boost::shared_ptr<slideshow::internal::Event> const&)
slideshow::internal::UserEventQueue::registerSlideEndEvent(boost::shared_ptr<slideshow::internal::Event> const&)
slideshow::internal::UserEventQueue::registerSlideStartEvent(boost::shared_ptr<slideshow::internal::Event> const&)
slideshow::internal::UserPaintOverlay::update_settings(bool, slideshow::internal::RGBColor const&, double)
slideshow::internal::getNodeType(short&, com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&)
slideshow::internal::removeTextActions(GDIMetaFile&)
svgi::(anonymous namespace)::appendChar(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char)
svgi::getTokenName(int)
svx::SearchToolbarControllersManager::~SearchToolbarControllersManager()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment