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
18ab7aba
Kaydet (Commit)
18ab7aba
authored
Kas 30, 2011
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
MediaWindow::executeMediaURLDialog: add link button
üst
c6fdc42e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
8 deletions
+50
-8
mediawindow.hxx
avmedia/inc/avmedia/mediawindow.hxx
+4
-1
mediacontrol.cxx
avmedia/source/framework/mediacontrol.cxx
+2
-1
mediawindow.cxx
avmedia/source/viewer/mediawindow.cxx
+35
-3
fuins1.cxx
sc/source/ui/drawfunc/fuins1.cxx
+3
-1
fuinsert.cxx
sd/source/ui/func/fuinsert.cxx
+3
-1
grfshex.cxx
sw/source/ui/shells/grfshex.cxx
+3
-1
No files found.
avmedia/inc/avmedia/mediawindow.hxx
Dosyayı görüntüle @
18ab7aba
...
...
@@ -119,7 +119,10 @@ namespace avmedia
public
:
static
void
getMediaFilters
(
FilterNameVector
&
rFilterNameVector
);
static
bool
executeMediaURLDialog
(
Window
*
pParent
,
::
rtl
::
OUString
&
rURL
,
bool
bInsertDialog
=
true
);
/// @param o_pbLink if not 0, this is an "insert" dialog: display link
/// checkbox and store its state in *o_pbLink
static
bool
executeMediaURLDialog
(
Window
*
pParent
,
::
rtl
::
OUString
&
rURL
,
bool
*
const
o_pbLink
);
static
void
executeFormatErrorBox
(
Window
*
pParent
);
static
bool
isMediaURL
(
const
::
rtl
::
OUString
&
rURL
,
bool
bDeep
=
false
,
Size
*
pPreferredSizePixel
=
NULL
);
...
...
avmedia/source/framework/mediacontrol.cxx
Dosyayı görüntüle @
18ab7aba
...
...
@@ -499,7 +499,8 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p )
{
::
rtl
::
OUString
aURL
;
if
(
::
avmedia
::
MediaWindow
::
executeMediaURLDialog
(
GetParent
(),
aURL
,
false
)
)
if
(
::
avmedia
::
MediaWindow
::
executeMediaURLDialog
(
GetParent
(),
aURL
,
0
))
{
if
(
!::
avmedia
::
MediaWindow
::
isMediaURL
(
aURL
,
true
)
)
::
avmedia
::
MediaWindow
::
executeFormatErrorBox
(
this
);
...
...
avmedia/source/viewer/mediawindow.cxx
Dosyayı görüntüle @
18ab7aba
...
...
@@ -39,7 +39,9 @@
#include <comphelper/processfactory.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/media/XManager.hpp>
#include "com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp"
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
#include "com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp"
#define AVMEDIA_FRAMEGRABBER_DEFAULTFRAME_MEDIATIME 3.0
...
...
@@ -251,15 +253,19 @@ void MediaWindow::getMediaFilters( FilterNameVector& rFilterNameVector )
// -------------------------------------------------------------------------
bool
MediaWindow
::
executeMediaURLDialog
(
Window
*
/* pParent */
,
::
rtl
::
OUString
&
rURL
,
bool
bInsertDialog
)
bool
MediaWindow
::
executeMediaURLDialog
(
Window
*
/* pParent */
,
::
rtl
::
OUString
&
rURL
,
bool
*
const
o_pbLink
)
{
::
sfx2
::
FileDialogHelper
aDlg
(
com
::
sun
::
star
::
ui
::
dialogs
::
TemplateDescription
::
FILEOPEN_SIMPLE
,
0
);
::
sfx2
::
FileDialogHelper
aDlg
(
(
o_pbLink
)
?
ui
::
dialogs
::
TemplateDescription
::
FILEOPEN_LINK_PREVIEW
:
ui
::
dialogs
::
TemplateDescription
::
FILEOPEN_SIMPLE
,
0
);
static
const
::
rtl
::
OUString
aWildcard
(
RTL_CONSTASCII_USTRINGPARAM
(
"*."
)
);
FilterNameVector
aFilters
;
const
::
rtl
::
OUString
aSeparator
(
RTL_CONSTASCII_USTRINGPARAM
(
";"
)
);
::
rtl
::
OUString
aAllTypes
;
aDlg
.
SetTitle
(
AVMEDIA_RESID
(
bInsertDialog
?
AVMEDIA_STR_INSERTMEDIA_DLG
:
AVMEDIA_STR_OPENMEDIA_DLG
)
);
aDlg
.
SetTitle
(
AVMEDIA_RESID
(
(
o_pbLink
)
?
AVMEDIA_STR_INSERTMEDIA_DLG
:
AVMEDIA_STR_OPENMEDIA_DLG
)
);
getMediaFilters
(
aFilters
);
...
...
@@ -297,10 +303,36 @@ bool MediaWindow::executeMediaURLDialog( Window* /* pParent */, ::rtl::OUString&
// add filter for all types
aDlg
.
AddFilter
(
AVMEDIA_RESID
(
AVMEDIA_STR_ALL_FILES
),
String
(
RTL_CONSTASCII_USTRINGPARAM
(
"*.*"
)
)
);
uno
::
Reference
<
ui
::
dialogs
::
XFilePicker
>
const
xFP
(
aDlg
.
GetFilePicker
());
uno
::
Reference
<
ui
::
dialogs
::
XFilePickerControlAccess
>
const
xCtrlAcc
(
xFP
,
uno
::
UNO_QUERY_THROW
);
if
(
o_pbLink
)
{
// for video link should be the default
xCtrlAcc
->
setValue
(
ui
::
dialogs
::
ExtendedFilePickerElementIds
::
CHECKBOX_LINK
,
0
,
uno
::
makeAny
(
sal_True
)
);
// disabled for now: TODO: preview?
xCtrlAcc
->
enableControl
(
ui
::
dialogs
::
ExtendedFilePickerElementIds
::
CHECKBOX_PREVIEW
,
sal_False
);
}
if
(
aDlg
.
Execute
()
==
ERRCODE_NONE
)
{
const
INetURLObject
aURL
(
aDlg
.
GetPath
()
);
rURL
=
aURL
.
GetMainURL
(
INetURLObject
::
DECODE_UNAMBIGUOUS
);
if
(
o_pbLink
)
{
uno
::
Any
const
any
=
xCtrlAcc
->
getValue
(
ui
::
dialogs
::
ExtendedFilePickerElementIds
::
CHECKBOX_LINK
,
0
);
if
(
!
(
any
>>=
*
o_pbLink
))
{
SAL_WARN
(
"avmedia"
,
"invalid link property"
);
*
o_pbLink
=
true
;
}
}
}
else
if
(
rURL
.
getLength
()
)
rURL
=
::
rtl
::
OUString
();
...
...
sc/source/ui/drawfunc/fuins1.cxx
Dosyayı görüntüle @
18ab7aba
...
...
@@ -326,7 +326,9 @@ FuInsertMedia::FuInsertMedia( ScTabViewShell* pViewSh,
}
}
if
(
bAPI
||
::
avmedia
::
MediaWindow
::
executeMediaURLDialog
(
pWindow
,
aURL
)
)
bool
bLink
(
true
);
if
(
bAPI
||
::
avmedia
::
MediaWindow
::
executeMediaURLDialog
(
pWindow
,
aURL
,
&
bLink
))
{
Size
aPrefSize
;
...
...
sd/source/ui/func/fuinsert.cxx
Dosyayı görüntüle @
18ab7aba
...
...
@@ -728,7 +728,9 @@ void FuInsertAVMedia::DoExecute( SfxRequest& rReq )
}
}
if
(
bAPI
||
::
avmedia
::
MediaWindow
::
executeMediaURLDialog
(
mpWindow
,
aURL
)
)
bool
bLink
(
true
);
if
(
bAPI
||
::
avmedia
::
MediaWindow
::
executeMediaURLDialog
(
mpWindow
,
aURL
,
&
bLink
))
{
Size
aPrefSize
;
...
...
sw/source/ui/shells/grfshex.cxx
Dosyayı görüntüle @
18ab7aba
...
...
@@ -89,7 +89,9 @@ bool SwTextShell::InsertMediaDlg( SfxRequest& rReq )
}
}
if
(
bAPI
||
::
avmedia
::
MediaWindow
::
executeMediaURLDialog
(
pWindow
,
aURL
)
)
bool
bLink
(
true
);
if
(
bAPI
||
::
avmedia
::
MediaWindow
::
executeMediaURLDialog
(
pWindow
,
aURL
,
&
bLink
))
{
Size
aPrefSize
;
...
...
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