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
52e4ba4b
Kaydet (Commit)
52e4ba4b
authored
Haz 01, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert MediaState to scoped enum
Change-Id: Idf14f7d344be6c690cdd721cd5f7eb7c328b590c
üst
758916a8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
36 deletions
+28
-36
mediacontrol.cxx
avmedia/source/framework/mediacontrol.cxx
+5
-5
mediaitem.cxx
avmedia/source/framework/mediaitem.cxx
+1
-1
mediawindow_impl.cxx
avmedia/source/viewer/mediawindow_impl.cxx
+5
-5
mediaitem.hxx
include/avmedia/mediaitem.hxx
+16
-24
viewobjectcontactofsdrmediaobj.cxx
svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
+1
-1
No files found.
avmedia/source/framework/mediacontrol.cxx
Dosyayı görüntüle @
52e4ba4b
...
@@ -318,7 +318,7 @@ void MediaControl::implUpdateToolboxes()
...
@@ -318,7 +318,7 @@ void MediaControl::implUpdateToolboxes()
maPlayToolBox
->
Enable
();
maPlayToolBox
->
Enable
();
maMuteToolBox
->
Enable
();
maMuteToolBox
->
Enable
();
if
(
M
EDIASTATE_PLAY
==
maItem
.
getState
()
)
if
(
M
ediaState
::
Play
==
maItem
.
getState
()
)
{
{
maPlayToolBox
->
CheckItem
(
AVMEDIA_TOOLBOXITEM_PLAY
,
true
);
maPlayToolBox
->
CheckItem
(
AVMEDIA_TOOLBOXITEM_PLAY
,
true
);
maPlayToolBox
->
CheckItem
(
AVMEDIA_TOOLBOXITEM_PAUSE
,
false
);
maPlayToolBox
->
CheckItem
(
AVMEDIA_TOOLBOXITEM_PAUSE
,
false
);
...
@@ -498,7 +498,7 @@ IMPL_LINK_TYPED( MediaControl, implSelectHdl, ToolBox*, p, void )
...
@@ -498,7 +498,7 @@ IMPL_LINK_TYPED( MediaControl, implSelectHdl, ToolBox*, p, void )
else
else
{
{
aExecItem
.
setURL
(
aURL
,
""
,
""
/*TODO?*/
);
aExecItem
.
setURL
(
aURL
,
""
,
""
/*TODO?*/
);
aExecItem
.
setState
(
M
EDIASTATE_PLAY
);
aExecItem
.
setState
(
M
ediaState
::
Play
);
}
}
}
}
}
}
...
@@ -515,7 +515,7 @@ IMPL_LINK_TYPED( MediaControl, implSelectHdl, ToolBox*, p, void )
...
@@ -515,7 +515,7 @@ IMPL_LINK_TYPED( MediaControl, implSelectHdl, ToolBox*, p, void )
case
(
AVMEDIA_TOOLBOXITEM_PLAY
):
case
(
AVMEDIA_TOOLBOXITEM_PLAY
):
{
{
aExecItem
.
setState
(
M
EDIASTATE_PLAY
);
aExecItem
.
setState
(
M
ediaState
::
Play
);
if
(
maItem
.
getTime
()
==
maItem
.
getDuration
()
)
if
(
maItem
.
getTime
()
==
maItem
.
getDuration
()
)
aExecItem
.
setTime
(
0.0
);
aExecItem
.
setTime
(
0.0
);
...
@@ -526,13 +526,13 @@ IMPL_LINK_TYPED( MediaControl, implSelectHdl, ToolBox*, p, void )
...
@@ -526,13 +526,13 @@ IMPL_LINK_TYPED( MediaControl, implSelectHdl, ToolBox*, p, void )
case
(
AVMEDIA_TOOLBOXITEM_PAUSE
):
case
(
AVMEDIA_TOOLBOXITEM_PAUSE
):
{
{
aExecItem
.
setState
(
M
EDIASTATE_PAUSE
);
aExecItem
.
setState
(
M
ediaState
::
Pause
);
}
}
break
;
break
;
case
(
AVMEDIA_TOOLBOXITEM_STOP
):
case
(
AVMEDIA_TOOLBOXITEM_STOP
):
{
{
aExecItem
.
setState
(
M
EDIASTATE_STOP
);
aExecItem
.
setState
(
M
ediaState
::
Stop
);
aExecItem
.
setTime
(
0.0
);
aExecItem
.
setTime
(
0.0
);
}
}
break
;
break
;
...
...
avmedia/source/framework/mediaitem.cxx
Dosyayı görüntüle @
52e4ba4b
...
@@ -63,7 +63,7 @@ struct MediaItem::Impl
...
@@ -63,7 +63,7 @@ struct MediaItem::Impl
explicit
Impl
(
AVMediaSetMask
nMaskSet
)
explicit
Impl
(
AVMediaSetMask
nMaskSet
)
:
m_nMaskSet
(
nMaskSet
)
:
m_nMaskSet
(
nMaskSet
)
,
m_eState
(
M
EDIASTATE_STOP
)
,
m_eState
(
M
ediaState
::
Stop
)
,
m_fTime
(
0.0
)
,
m_fTime
(
0.0
)
,
m_fDuration
(
0.0
)
,
m_fDuration
(
0.0
)
,
m_nVolumeDB
(
0
)
,
m_nVolumeDB
(
0
)
...
...
avmedia/source/viewer/mediawindow_impl.cxx
Dosyayı görüntüle @
52e4ba4b
...
@@ -325,9 +325,9 @@ bool MediaWindowImpl::start()
...
@@ -325,9 +325,9 @@ bool MediaWindowImpl::start()
void
MediaWindowImpl
::
updateMediaItem
(
MediaItem
&
rItem
)
const
void
MediaWindowImpl
::
updateMediaItem
(
MediaItem
&
rItem
)
const
{
{
if
(
isPlaying
()
)
if
(
isPlaying
()
)
rItem
.
setState
(
M
EDIASTATE_PLAY
);
rItem
.
setState
(
M
ediaState
::
Play
);
else
else
rItem
.
setState
(
(
0.0
==
getMediaTime
()
)
?
M
EDIASTATE_STOP
:
MEDIASTATE_PAUSE
);
rItem
.
setState
(
(
0.0
==
getMediaTime
()
)
?
M
ediaState
::
Stop
:
MediaState
::
Pause
);
rItem
.
setDuration
(
getDuration
()
);
rItem
.
setDuration
(
getDuration
()
);
rItem
.
setTime
(
getMediaTime
()
);
rItem
.
setTime
(
getMediaTime
()
);
...
@@ -370,21 +370,21 @@ void MediaWindowImpl::executeMediaItem( const MediaItem& rItem )
...
@@ -370,21 +370,21 @@ void MediaWindowImpl::executeMediaItem( const MediaItem& rItem )
{
{
switch
(
rItem
.
getState
())
switch
(
rItem
.
getState
())
{
{
case
M
EDIASTATE_PLAY
:
case
M
ediaState
:
:
Play
:
{
{
if
(
!
isPlaying
())
if
(
!
isPlaying
())
start
();
start
();
}
}
break
;
break
;
case
M
EDIASTATE_PAUSE
:
case
M
ediaState
:
:
Pause
:
{
{
if
(
isPlaying
())
if
(
isPlaying
())
stop
();
stop
();
}
}
break
;
break
;
case
M
EDIASTATE_STOP
:
case
M
ediaState
:
:
Stop
:
{
{
if
(
isPlaying
())
if
(
isPlaying
())
{
{
...
...
include/avmedia/mediaitem.hxx
Dosyayı görüntüle @
52e4ba4b
...
@@ -29,6 +29,8 @@
...
@@ -29,6 +29,8 @@
#include <memory>
#include <memory>
#include <o3tl/typed_flags_set.hxx>
#include <o3tl/typed_flags_set.hxx>
class
SvStream
;
enum
class
AVMediaSetMask
enum
class
AVMediaSetMask
{
{
NONE
=
0x000
,
NONE
=
0x000
,
...
@@ -48,26 +50,17 @@ namespace o3tl
...
@@ -48,26 +50,17 @@ namespace o3tl
template
<>
struct
typed_flags
<
AVMediaSetMask
>
:
is_typed_flags
<
AVMediaSetMask
,
0x1ff
>
{};
template
<>
struct
typed_flags
<
AVMediaSetMask
>
:
is_typed_flags
<
AVMediaSetMask
,
0x1ff
>
{};
}
}
class
SvStream
;
namespace
avmedia
namespace
avmedia
{
{
// - MediaState -
enum
class
MediaState
enum
MediaState
{
{
MEDIASTATE_STOP
=
0
,
Stop
,
Play
,
Pause
MEDIASTATE_PLAY
=
1
,
MEDIASTATE_PAUSE
=
2
};
};
// - MediaItem -
class
AVMEDIA_DLLPUBLIC
MediaItem
:
public
SfxPoolItem
class
AVMEDIA_DLLPUBLIC
MediaItem
:
public
SfxPoolItem
{
{
public
:
public
:
...
@@ -80,13 +73,13 @@ public:
...
@@ -80,13 +73,13 @@ public:
virtual
bool
operator
==
(
const
SfxPoolItem
&
)
const
SAL_OVERRIDE
;
virtual
bool
operator
==
(
const
SfxPoolItem
&
)
const
SAL_OVERRIDE
;
virtual
SfxPoolItem
*
Clone
(
SfxItemPool
*
pPool
=
0
)
const
SAL_OVERRIDE
;
virtual
SfxPoolItem
*
Clone
(
SfxItemPool
*
pPool
=
0
)
const
SAL_OVERRIDE
;
virtual
bool
GetPresentation
(
SfxItemPresentation
ePres
,
virtual
bool
GetPresentation
(
SfxItemPresentation
ePres
,
SfxMapUnit
eCoreUnit
,
SfxMapUnit
eCoreUnit
,
SfxMapUnit
ePresUnit
,
SfxMapUnit
ePresUnit
,
OUString
&
rText
,
OUString
&
rText
,
const
IntlWrapper
*
pIntl
)
const
SAL_OVERRIDE
;
const
IntlWrapper
*
pIntl
)
const
SAL_OVERRIDE
;
virtual
bool
QueryValue
(
c
om
::
sun
::
star
::
uno
::
Any
&
rVal
,
sal_uInt8
nMemberId
=
0
)
const
SAL_OVERRIDE
;
virtual
bool
QueryValue
(
c
ss
::
uno
::
Any
&
rVal
,
sal_uInt8
nMemberId
=
0
)
const
SAL_OVERRIDE
;
virtual
bool
PutValue
(
const
c
om
::
sun
::
star
::
uno
::
Any
&
rVal
,
sal_uInt8
nMemberId
=
0
)
SAL_OVERRIDE
;
virtual
bool
PutValue
(
const
c
ss
::
uno
::
Any
&
rVal
,
sal_uInt8
nMemberId
=
0
)
SAL_OVERRIDE
;
void
merge
(
const
MediaItem
&
rMediaItem
);
void
merge
(
const
MediaItem
&
rMediaItem
);
...
@@ -110,19 +103,19 @@ public:
...
@@ -110,19 +103,19 @@ public:
void
setVolumeDB
(
sal_Int16
nDB
);
void
setVolumeDB
(
sal_Int16
nDB
);
sal_Int16
getVolumeDB
()
const
;
sal_Int16
getVolumeDB
()
const
;
void
setZoom
(
::
c
om
::
sun
::
star
::
media
::
ZoomLevel
eZoom
);
void
setZoom
(
::
c
ss
::
media
::
ZoomLevel
eZoom
);
::
c
om
::
sun
::
star
::
media
::
ZoomLevel
getZoom
()
const
;
::
c
ss
::
media
::
ZoomLevel
getZoom
()
const
;
void
setURL
(
const
OUString
&
rURL
,
void
setURL
(
const
OUString
&
rURL
,
const
OUString
&
rTempURL
,
const
OUString
&
rTempURL
,
const
OUString
&
rReferer
);
const
OUString
&
rReferer
);
const
OUString
&
getURL
()
const
;
const
OUString
&
getURL
()
const
;
void
setMimeType
(
const
OUString
&
rMimeType
);
void
setMimeType
(
const
OUString
&
rMimeType
);
OUString
getMimeType
()
const
;
OUString
getMimeType
()
const
;
const
OUString
&
getTempURL
()
const
;
const
OUString
&
getTempURL
()
const
;
const
OUString
&
getReferer
()
const
;
const
OUString
&
getReferer
()
const
;
private
:
private
:
...
@@ -133,15 +126,14 @@ private:
...
@@ -133,15 +126,14 @@ private:
typedef
::
avmedia
::
MediaItem
avmedia_MediaItem
;
typedef
::
avmedia
::
MediaItem
avmedia_MediaItem
;
bool
AVMEDIA_DLLPUBLIC
EmbedMedia
(
bool
AVMEDIA_DLLPUBLIC
EmbedMedia
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XModel
>
const
::
css
::
uno
::
Reference
<
::
css
::
frame
::
XModel
>&
xModel
,
const
&
xModel
,
const
OUString
&
rSourceURL
,
OUString
const
&
rSourceURL
,
OUString
&
o_rEmbeddedURL
);
OUString
&
o_rEmbeddedURL
);
OUString
GetFilename
(
OUString
const
&
rSourceURL
);
OUString
GetFilename
(
OUString
const
&
rSourceURL
);
::
c
om
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
io
::
XStream
>
CreateStream
(
::
c
ss
::
uno
::
Reference
<
::
css
::
io
::
XStream
>
CreateStream
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
embed
::
XStorage
>
const
&
xStorage
,
OUString
const
&
rFilename
);
const
::
css
::
uno
::
Reference
<
::
css
::
embed
::
XStorage
>&
xStorage
,
const
OUString
&
rFilename
);
}
}
#endif
#endif
...
...
svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
Dosyayı görüntüle @
52e4ba4b
...
@@ -97,7 +97,7 @@ void ViewObjectContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& rIte
...
@@ -97,7 +97,7 @@ void ViewObjectContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& rIte
mpMediaWindow
->
updateMediaItem
(
rItem
);
mpMediaWindow
->
updateMediaItem
(
rItem
);
// show/hide is now dependent of play state
// show/hide is now dependent of play state
if
(
avmedia
::
M
EDIASTATE_STOP
==
rItem
.
getState
())
if
(
avmedia
::
M
ediaState
::
Stop
==
rItem
.
getState
())
{
{
mpMediaWindow
->
hide
();
mpMediaWindow
->
hide
();
}
}
...
...
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