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
507c1c99
Kaydet (Commit)
507c1c99
authored
Eki 04, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Resolves: rhbz#1012379 draw audio-placeholder in presentation mode
Change-Id: Ied61f9b4947e1a6eda04c442d95037cc1c7ef460
üst
fa5c7ccf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
7 deletions
+53
-7
mediawindow.cxx
avmedia/source/viewer/mediawindow.cxx
+13
-2
mediawindow.hxx
include/avmedia/mediawindow.hxx
+4
-0
viewmediashape.cxx
slideshow/source/engine/shapes/viewmediashape.cxx
+36
-5
No files found.
avmedia/source/viewer/mediawindow.cxx
Dosyayı görüntüle @
507c1c99
...
@@ -433,7 +433,7 @@ uno::Reference< graphic::XGraphic > MediaWindow::grabFrame( const OUString& rURL
...
@@ -433,7 +433,7 @@ uno::Reference< graphic::XGraphic > MediaWindow::grabFrame( const OUString& rURL
if
(
!
aPrefSize
.
Width
&&
!
aPrefSize
.
Height
)
if
(
!
aPrefSize
.
Width
&&
!
aPrefSize
.
Height
)
{
{
const
BitmapEx
aBmpEx
(
AVMEDIA_RESID
(
AVMEDIA_BMP_AUDIOLOGO
)
);
const
BitmapEx
aBmpEx
(
getAudioLogo
(
)
);
apGraphic
.
reset
(
new
Graphic
(
aBmpEx
)
);
apGraphic
.
reset
(
new
Graphic
(
aBmpEx
)
);
}
}
}
}
...
@@ -441,7 +441,7 @@ uno::Reference< graphic::XGraphic > MediaWindow::grabFrame( const OUString& rURL
...
@@ -441,7 +441,7 @@ uno::Reference< graphic::XGraphic > MediaWindow::grabFrame( const OUString& rURL
if
(
!
xRet
.
is
()
&&
!
apGraphic
.
get
()
&&
bAllowToCreateReplacementGraphic
)
if
(
!
xRet
.
is
()
&&
!
apGraphic
.
get
()
&&
bAllowToCreateReplacementGraphic
)
{
{
const
BitmapEx
aBmpEx
(
AVMEDIA_RESID
(
AVMEDIA_BMP_EMPTYLOGO
)
);
const
BitmapEx
aBmpEx
(
getEmptyLogo
(
)
);
apGraphic
.
reset
(
new
Graphic
(
aBmpEx
)
);
apGraphic
.
reset
(
new
Graphic
(
aBmpEx
)
);
}
}
...
@@ -451,6 +451,17 @@ uno::Reference< graphic::XGraphic > MediaWindow::grabFrame( const OUString& rURL
...
@@ -451,6 +451,17 @@ uno::Reference< graphic::XGraphic > MediaWindow::grabFrame( const OUString& rURL
return
xRet
;
return
xRet
;
}
}
BitmapEx
MediaWindow
::
getAudioLogo
()
{
return
BitmapEx
(
AVMEDIA_RESID
(
AVMEDIA_BMP_AUDIOLOGO
));
}
BitmapEx
MediaWindow
::
getEmptyLogo
()
{
return
BitmapEx
(
AVMEDIA_RESID
(
AVMEDIA_BMP_EMPTYLOGO
));
}
}
// namespace avemdia
}
// namespace avemdia
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
include/avmedia/mediawindow.hxx
Dosyayı görüntüle @
507c1c99
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include <com/sun/star/media/XPlayer.hpp>
#include <com/sun/star/media/XPlayer.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/uno/XInterface.hpp>
#include <vcl/bitmapex.hxx>
#include <avmedia/avmediadllapi.h>
#include <avmedia/avmediadllapi.h>
#define AVMEDIA_FRAMEGRABBER_DEFAULTFRAME -1.0
#define AVMEDIA_FRAMEGRABBER_DEFAULTFRAME -1.0
...
@@ -107,6 +108,9 @@ namespace avmedia
...
@@ -107,6 +108,9 @@ namespace avmedia
bool
bAllowToCreateReplacementGraphic
=
false
,
bool
bAllowToCreateReplacementGraphic
=
false
,
double
fMediaTime
=
AVMEDIA_FRAMEGRABBER_DEFAULTFRAME
);
double
fMediaTime
=
AVMEDIA_FRAMEGRABBER_DEFAULTFRAME
);
static
BitmapEx
getAudioLogo
();
static
BitmapEx
getEmptyLogo
();
private
:
private
:
// default: disabled copy/assignment
// default: disabled copy/assignment
...
...
slideshow/source/engine/shapes/viewmediashape.cxx
Dosyayı görüntüle @
507c1c99
...
@@ -28,10 +28,12 @@
...
@@ -28,10 +28,12 @@
#include <comphelper/anytostring.hxx>
#include <comphelper/anytostring.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <vcl/
window
.hxx>
#include <vcl/
canvastools
.hxx>
#include <vcl/syschild.hxx>
#include <vcl/syschild.hxx>
#include <vcl/window.hxx>
#include <basegfx/tools/canvastools.hxx>
#include <basegfx/tools/canvastools.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <basegfx/numeric/ftools.hxx>
#include <basegfx/numeric/ftools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/point/b2dpoint.hxx>
...
@@ -184,10 +186,32 @@ namespace slideshow
...
@@ -184,10 +186,32 @@ namespace slideshow
if
(
!
mpMediaWindow
.
get
()
&&
!
mxPlayerWindow
.
is
()
)
if
(
!
mpMediaWindow
.
get
()
&&
!
mxPlayerWindow
.
is
()
)
{
{
// fill the shape background with black
// draw placeholder for no-video (no window) case
fillRect
(
pCanvas
,
// no window and player == audio icon
rBounds
,
// no window and no player == broken icon
0x000000FFU
);
BitmapEx
aAudioLogo
(
mxPlayer
.
is
()
?
avmedia
::
MediaWindow
::
getAudioLogo
()
:
avmedia
::
MediaWindow
::
getEmptyLogo
()
);
uno
::
Reference
<
rendering
::
XBitmap
>
xBitmap
(
vcl
::
unotools
::
xBitmapFromBitmapEx
(
pCanvas
->
getUNOCanvas
()
->
getDevice
(),
aAudioLogo
));
rendering
::
ViewState
aViewState
;
aViewState
.
AffineTransform
=
pCanvas
->
getViewState
().
AffineTransform
;
rendering
::
RenderState
aRenderState
;
::
canvas
::
tools
::
initRenderState
(
aRenderState
);
const
::
Size
aBmpSize
(
aAudioLogo
.
GetSizePixel
()
);
const
::
basegfx
::
B2DVector
aScale
(
rBounds
.
getWidth
()
/
aBmpSize
.
Width
(),
rBounds
.
getHeight
()
/
aBmpSize
.
Height
()
);
const
basegfx
::
B2DHomMatrix
aTranslation
(
basegfx
::
tools
::
createScaleTranslateB2DHomMatrix
(
aScale
,
rBounds
.
getMinimum
()));
::
canvas
::
tools
::
setRenderStateTransform
(
aRenderState
,
aTranslation
);
pCanvas
->
getUNOCanvas
()
->
drawBitmap
(
xBitmap
,
aViewState
,
aRenderState
);
}
}
return
true
;
return
true
;
...
@@ -463,6 +487,13 @@ namespace slideshow
...
@@ -463,6 +487,13 @@ namespace slideshow
mxPlayerWindow
->
setEnable
(
true
);
mxPlayerWindow
->
setEnable
(
true
);
}
}
}
}
if
(
!
mxPlayerWindow
.
is
()
)
{
//if there was no playerwindow, then clear the mpMediaWindow too
//so that we can draw a placeholder instead in that space
mpMediaWindow
.
reset
();
}
}
}
}
}
}
}
...
...
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