Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
e1d1ea2d
Kaydet (Commit)
e1d1ea2d
authored
Şub 12, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Turn all-static TransitionFactory class into namespace
Change-Id: I0187cf4c1b31c5a8c930804c7d3f36c79142af3a
üst
b10fe49d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
56 deletions
+76
-56
shapetransitionfactory.cxx
...show/source/engine/transitions/shapetransitionfactory.cxx
+28
-28
slidetransitionfactory.cxx
...show/source/engine/transitions/slidetransitionfactory.cxx
+1
-0
transitionfactorytab.cxx
slideshow/source/engine/transitions/transitionfactorytab.cxx
+3
-2
transitionfactorytab.hxx
slideshow/source/engine/transitions/transitionfactorytab.hxx
+40
-0
transitionfactory.hxx
slideshow/source/inc/transitionfactory.hxx
+4
-26
No files found.
slideshow/source/engine/transitions/shapetransitionfactory.cxx
Dosyayı görüntüle @
e1d1ea2d
...
...
@@ -31,6 +31,7 @@
#include <com/sun/star/animations/TransitionSubType.hpp>
#include "transitionfactory.hxx"
#include "transitionfactorytab.hxx"
#include "transitiontools.hxx"
#include "parametricpolypolygonfactory.hxx"
#include "animationfactory.hxx"
...
...
@@ -191,26 +192,7 @@ double ClippingAnimation::getUnderlyingValue() const
// Permissible range for operator() above is [0,1]
}
}
// anon namespace
AnimationActivitySharedPtr
TransitionFactory
::
createShapeTransition
(
const
ActivitiesFactory
::
CommonParameters
&
rParms
,
const
AnimatableShapeSharedPtr
&
rShape
,
const
ShapeManagerSharedPtr
&
rShapeManager
,
const
::
basegfx
::
B2DVector
&
rSlideSize
,
uno
::
Reference
<
animations
::
XTransitionFilter
>
const
&
xTransition
)
{
return
createShapeTransition
(
rParms
,
rShape
,
rShapeManager
,
rSlideSize
,
xTransition
,
xTransition
->
getTransition
(),
xTransition
->
getSubtype
()
);
}
AnimationActivitySharedPtr
TransitionFactory
::
createShapeTransition
(
AnimationActivitySharedPtr
createShapeTransitionByType
(
const
ActivitiesFactory
::
CommonParameters
&
rParms
,
const
AnimatableShapeSharedPtr
&
rShape
,
const
ShapeManagerSharedPtr
&
rShapeManager
,
...
...
@@ -222,7 +204,7 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
{
ENSURE_OR_THROW
(
xTransition
.
is
(),
"
TransitionFactory::createShapeTransition
(): Invalid XTransition"
);
"
createShapeTransitionByType
(): Invalid XTransition"
);
const
TransitionInfo
*
pTransitionInfo
(
getTransitionInfo
(
nType
,
nSubType
)
);
...
...
@@ -234,7 +216,7 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
{
default
:
case
TransitionInfo
:
:
TRANSITION_INVALID
:
OSL_FAIL
(
"
TransitionFactory::createShapeTransition
(): Invalid transition type. "
OSL_FAIL
(
"
createShapeTransitionByType
(): Invalid transition type. "
"Don't ask me for a 0 TransitionType, have no XTransitionFilter node instead!"
);
return
AnimationActivitySharedPtr
();
...
...
@@ -272,13 +254,13 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
const
TransitionInfo
*
pRandomTransitionInfo
(
getRandomTransitionInfo
()
);
ENSURE_OR_THROW
(
pRandomTransitionInfo
!=
NULL
,
"
TransitionFactory::createShapeTransition
(): Got invalid random transition info"
);
"
createShapeTransitionByType
(): Got invalid random transition info"
);
ENSURE_OR_THROW
(
pRandomTransitionInfo
->
mnTransitionType
!=
animations
::
TransitionType
::
RANDOM
,
"
TransitionFactory::createShapeTransition
(): Got random again for random input!"
);
"
createShapeTransitionByType
(): Got random again for random input!"
);
// and recurse
pGeneratedActivity
=
createShapeTransition
(
rParms
,
pGeneratedActivity
=
createShapeTransition
ByType
(
rParms
,
rShape
,
rShapeManager
,
rSlideSize
,
...
...
@@ -319,7 +301,7 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
default
:
ENSURE_OR_THROW
(
false
,
"
TransitionFactory::createShapeTransition
(): Unexpected subtype for SLIDEWIPE"
);
"
createShapeTransitionByType
(): Unexpected subtype for SLIDEWIPE"
);
break
;
}
...
...
@@ -372,18 +354,36 @@ AnimationActivitySharedPtr TransitionFactory::createShapeTransition(
// No animation generated, maybe no table entry for given
// transition?
OSL_TRACE
(
"
TransitionFactory::createShapeTransition
(): Unknown type/subtype (%d/%d) "
"
createShapeTransitionByType
(): Unknown type/subtype (%d/%d) "
"combination encountered"
,
xTransition
->
getTransition
(),
xTransition
->
getSubtype
()
);
OSL_FAIL
(
"
TransitionFactory::createShapeTransition
(): Unknown type/subtype "
"
createShapeTransitionByType
(): Unknown type/subtype "
"combination encountered"
);
}
return
pGeneratedActivity
;
}
}
// anon namespace
AnimationActivitySharedPtr
TransitionFactory
::
createShapeTransition
(
const
ActivitiesFactory
::
CommonParameters
&
rParms
,
const
AnimatableShapeSharedPtr
&
rShape
,
const
ShapeManagerSharedPtr
&
rShapeManager
,
const
::
basegfx
::
B2DVector
&
rSlideSize
,
uno
::
Reference
<
animations
::
XTransitionFilter
>
const
&
xTransition
)
{
return
createShapeTransitionByType
(
rParms
,
rShape
,
rShapeManager
,
rSlideSize
,
xTransition
,
xTransition
->
getTransition
(),
xTransition
->
getSubtype
()
);
}
}
}
...
...
slideshow/source/engine/transitions/slidetransitionfactory.cxx
Dosyayı görüntüle @
e1d1ea2d
...
...
@@ -38,6 +38,7 @@
#include "slidechangebase.hxx"
#include "transitionfactory.hxx"
#include "transitionfactorytab.hxx"
#include "transitiontools.hxx"
#include "parametricpolypolygonfactory.hxx"
#include "animationfactory.hxx"
...
...
slideshow/source/engine/transitions/transitionfactorytab.cxx
Dosyayı görüntüle @
e1d1ea2d
...
...
@@ -24,6 +24,7 @@
#include <com/sun/star/animations/TransitionSubType.hpp>
#include "transitionfactory.hxx"
#include "transitionfactorytab.hxx"
#include "tools.hxx"
#include <algorithm>
...
...
@@ -2108,7 +2109,7 @@ static const TransitionInfo lcl_transitionInfo[] =
}
// anon namespace
const
TransitionInfo
*
TransitionFactory
::
getTransitionInfo
(
const
TransitionInfo
*
getTransitionInfo
(
sal_Int16
nTransitionType
,
sal_Int16
nTransitionSubType
)
{
static
const
TransitionInfo
*
pTableEnd
=
lcl_transitionInfo
+
...
...
@@ -2124,7 +2125,7 @@ const TransitionInfo* TransitionFactory::getTransitionInfo(
return
NULL
;
}
const
TransitionInfo
*
TransitionFactory
::
getRandomTransitionInfo
()
const
TransitionInfo
*
getRandomTransitionInfo
()
{
return
lcl_transitionInfo
+
getRandomOrdinal
(
SAL_N_ELEMENTS
(
lcl_transitionInfo
)
...
...
slideshow/source/engine/transitions/transitionfactorytab.hxx
0 → 100644
Dosyayı görüntüle @
e1d1ea2d
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_TRANSITIONS_TRANSITIONFACTORYTAB_HXX
#define INCLUDED_SLIDESHOW_SOURCE_ENGINE_TRANSITIONS_TRANSITIONFACTORYTAB_HXX
#include <sal/config.h>
#include <sal/types.h>
namespace
slideshow
{
namespace
internal
{
struct
TransitionInfo
;
TransitionInfo
const
*
getTransitionInfo
(
sal_Int16
nTransitionType
,
sal_Int16
nTransitionSubType
);
TransitionInfo
const
*
getRandomTransitionInfo
();
}
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
slideshow/source/inc/transitionfactory.hxx
Dosyayı görüntüle @
e1d1ea2d
...
...
@@ -33,16 +33,13 @@
#include "transitioninfo.hxx"
#include "soundplayer.hxx"
#include <boost/utility.hpp>
namespace
slideshow
{
namespace
internal
{
/* Definition of Transitionfactory class */
class
TransitionFactory
:
private
boost
::
noncopyable
namespace
TransitionFactory
{
public
:
/** Create a transition effect for shapes.
This method creates an AnimationActivity, which, when
...
...
@@ -64,7 +61,7 @@ namespace slideshow
@return the created activity, or NULL for no
transition effect
*/
static
AnimationActivitySharedPtr
createShapeTransition
(
AnimationActivitySharedPtr
createShapeTransition
(
const
ActivitiesFactory
::
CommonParameters
&
rParms
,
const
AnimatableShapeSharedPtr
&
rShape
,
const
ShapeManagerSharedPtr
&
rShapeManager
,
...
...
@@ -100,7 +97,7 @@ namespace slideshow
@return the created animation, or NULL for no
transition effect
*/
static
NumberAnimationSharedPtr
createSlideTransition
(
NumberAnimationSharedPtr
createSlideTransition
(
const
SlideSharedPtr
&
rLeavingSlide
,
const
SlideSharedPtr
&
rEnteringSlide
,
const
UnoViewContainer
&
rViewContainer
,
...
...
@@ -114,26 +111,7 @@ namespace slideshow
bool
bTransitionDirection
,
const
RGBColor
&
rTransitionFadeColor
,
const
SoundPlayerSharedPtr
&
rSoundPlayer
);
private
:
static
const
TransitionInfo
*
getTransitionInfo
(
sal_Int16
nTransitionType
,
sal_Int16
nTransitionSubType
);
static
const
TransitionInfo
*
getRandomTransitionInfo
();
static
AnimationActivitySharedPtr
createShapeTransition
(
const
ActivitiesFactory
::
CommonParameters
&
rParms
,
const
AnimatableShapeSharedPtr
&
rShape
,
const
ShapeManagerSharedPtr
&
rShapeManager
,
const
::
basegfx
::
B2DVector
&
rSlideSize
,
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
animations
::
XTransitionFilter
>
const
&
xTransition
,
sal_Int16
nTransitionType
,
sal_Int16
nTransitionSubType
);
// static factory
TransitionFactory
()
SAL_DELETED_FUNCTION
;
//TODO: get rid of this class
~
TransitionFactory
()
SAL_DELETED_FUNCTION
;
};
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment