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
f1abe303
Kaydet (Commit)
f1abe303
authored
Kas 04, 2011
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
gtk: cleanup to make the vcl file-picker interface work.
üst
17084c75
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
22 deletions
+31
-22
optgdlg.cxx
cui/source/options/optgdlg.cxx
+10
-15
filedlghelper.hxx
sfx2/inc/sfx2/filedlghelper.hxx
+0
-1
filedlghelper.cxx
sfx2/source/dialog/filedlghelper.cxx
+5
-5
salinst.hxx
vcl/inc/salinst.hxx
+2
-0
gtkinst.hxx
vcl/inc/unx/gtk/gtkinst.hxx
+2
-0
svapp.hxx
vcl/inc/vcl/svapp.hxx
+4
-0
svapp.cxx
vcl/source/app/svapp.cxx
+6
-0
SalGtkFilePicker.cxx
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+1
-1
SalGtkFolderPicker.cxx
vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
+1
-0
No files found.
cui/source/options/optgdlg.cxx
Dosyayı görüntüle @
f1abe303
...
@@ -124,20 +124,11 @@ int OfaMiscTabPage::DeactivatePage( SfxItemSet* pSet_ )
...
@@ -124,20 +124,11 @@ int OfaMiscTabPage::DeactivatePage( SfxItemSet* pSet_ )
namespace
namespace
{
{
::
rtl
::
OUString
impl_SystemFileOpenServiceName
()
static
::
rtl
::
OUString
impl_SystemFileOpenServiceName
()
{
{
const
::
rtl
::
OUString
&
rDesktopEnvironment
=
const
::
rtl
::
OUString
&
rDesktopEnvironment
=
Application
::
GetDesktopEnvironment
();
Application
::
GetDesktopEnvironment
();
if
(
rDesktopEnvironment
.
equalsIgnoreAsciiCaseAscii
(
"gnome"
)
)
if
(
rDesktopEnvironment
.
equalsIgnoreAsciiCaseAscii
(
"kde4"
)
)
{
#ifdef ENABLE_GTK
return
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.ui.dialogs.GtkFilePicker"
)
);
#else
return
rtl
::
OUString
();
#endif
}
else
if
(
rDesktopEnvironment
.
equalsIgnoreAsciiCaseAscii
(
"kde4"
)
)
{
{
#ifdef ENABLE_KDE4
#ifdef ENABLE_KDE4
return
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.ui.dialogs.KDE4FilePicker"
)
);
return
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.ui.dialogs.KDE4FilePicker"
)
);
...
@@ -162,10 +153,14 @@ namespace
...
@@ -162,10 +153,14 @@ namespace
#endif
#endif
}
}
s
al_B
ool
lcl_HasSystemFilePicker
()
s
tatic
b
ool
lcl_HasSystemFilePicker
()
{
{
if
(
Application
::
hasNativeFileSelection
()
)
return
true
;
// Otherwise fall-back on querying services
bool
bRet
=
false
;
Reference
<
XMultiServiceFactory
>
xFactory
=
comphelper
::
getProcessServiceFactory
();
Reference
<
XMultiServiceFactory
>
xFactory
=
comphelper
::
getProcessServiceFactory
();
sal_Bool
bRet
=
sal_False
;
Reference
<
XContentEnumerationAccess
>
xEnumAccess
(
xFactory
,
UNO_QUERY
);
Reference
<
XContentEnumerationAccess
>
xEnumAccess
(
xFactory
,
UNO_QUERY
);
Reference
<
XSet
>
xSet
(
xFactory
,
UNO_QUERY
);
Reference
<
XSet
>
xSet
(
xFactory
,
UNO_QUERY
);
...
@@ -178,7 +173,7 @@ namespace
...
@@ -178,7 +173,7 @@ namespace
::
rtl
::
OUString
aFileService
=
impl_SystemFileOpenServiceName
();
::
rtl
::
OUString
aFileService
=
impl_SystemFileOpenServiceName
();
Reference
<
XEnumeration
>
xEnum
=
xEnumAccess
->
createContentEnumeration
(
aFileService
);
Reference
<
XEnumeration
>
xEnum
=
xEnumAccess
->
createContentEnumeration
(
aFileService
);
if
(
xEnum
.
is
()
&&
xEnum
->
hasMoreElements
()
)
if
(
xEnum
.
is
()
&&
xEnum
->
hasMoreElements
()
)
bRet
=
sal_T
rue
;
bRet
=
t
rue
;
}
}
catch
(
const
IllegalArgumentException
&
)
catch
(
const
IllegalArgumentException
&
)
{
{
...
...
sfx2/inc/sfx2/filedlghelper.hxx
Dosyayı görüntüle @
f1abe303
...
@@ -99,7 +99,6 @@ class Window;
...
@@ -99,7 +99,6 @@ class Window;
#define FILE_OPEN_SERVICE_NAME "com.sun.star.ui.dialogs.FilePicker"
#define FILE_OPEN_SERVICE_NAME "com.sun.star.ui.dialogs.FilePicker"
#define FOLDER_PICKER_SERVICE_NAME "com.sun.star.ui.dialogs.FolderPicker"
#define FOLDER_PICKER_SERVICE_NAME "com.sun.star.ui.dialogs.FolderPicker"
#define FILE_OPEN_SERVICE_NAME_SYSTEM "com.sun.star.ui.dialogs.SystemFilePicker"
#define FILE_OPEN_SERVICE_NAME_OOO "com.sun.star.ui.dialogs.OfficeFilePicker"
#define FILE_OPEN_SERVICE_NAME_OOO "com.sun.star.ui.dialogs.OfficeFilePicker"
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
...
...
sfx2/source/dialog/filedlghelper.cxx
Dosyayı görüntüle @
f1abe303
...
@@ -842,21 +842,21 @@ ErrCode FileDialogHelper_Impl::getGraphic( Graphic& rGraphic ) const
...
@@ -842,21 +842,21 @@ ErrCode FileDialogHelper_Impl::getGraphic( Graphic& rGraphic ) const
}
}
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
s
al_B
ool
lcl_isSystemFilePicker
(
const
uno
::
Reference
<
XFilePicker
>&
_rxFP
)
s
tatic
b
ool
lcl_isSystemFilePicker
(
const
uno
::
Reference
<
XFilePicker
>&
_rxFP
)
{
{
try
try
{
{
uno
::
Reference
<
XServiceInfo
>
xSI
(
_rxFP
,
UNO_QUERY
);
uno
::
Reference
<
XServiceInfo
>
xSI
(
_rxFP
,
UNO_QUERY
);
if
(
xSI
.
is
()
&&
xSI
->
supportsService
(
DEFINE_CONST_OUSTRING
(
"com.sun.star.ui.dialogs.SystemFilePicker"
)
)
)
if
(
!
xSI
.
is
()
)
return
sal_True
;
return
true
;
return
xSI
->
supportsService
(
DEFINE_CONST_OUSTRING
(
"com.sun.star.ui.dialogs.SystemFilePicker"
)
);
}
}
catch
(
const
Exception
&
)
catch
(
const
Exception
&
)
{
{
}
}
return
sal_F
alse
;
return
f
alse
;
}
}
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// ----------- FileDialogHelper_Impl ---------------------------
// ----------- FileDialogHelper_Impl ---------------------------
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
...
...
vcl/inc/salinst.hxx
Dosyayı görüntüle @
f1abe303
...
@@ -170,6 +170,8 @@ public:
...
@@ -170,6 +170,8 @@ public:
virtual
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XInterface
>
CreateDropTarget
();
virtual
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XInterface
>
CreateDropTarget
();
virtual
void
AddToRecentDocumentList
(
const
rtl
::
OUString
&
rFileUrl
,
const
rtl
::
OUString
&
rMimeType
)
=
0
;
virtual
void
AddToRecentDocumentList
(
const
rtl
::
OUString
&
rFileUrl
,
const
rtl
::
OUString
&
rMimeType
)
=
0
;
virtual
bool
hasNativeFileSelection
()
const
{
return
false
;
}
virtual
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ui
::
dialogs
::
XFilePicker2
>
virtual
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ui
::
dialogs
::
XFilePicker2
>
createFilePicker
(
const
com
::
sun
::
star
::
uno
::
Reference
<
createFilePicker
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>&
)
com
::
sun
::
star
::
uno
::
XComponentContext
>&
)
...
...
vcl/inc/unx/gtk/gtkinst.hxx
Dosyayı görüntüle @
f1abe303
...
@@ -109,6 +109,8 @@ public:
...
@@ -109,6 +109,8 @@ public:
virtual
GenPspGraphics
*
CreatePrintGraphics
();
virtual
GenPspGraphics
*
CreatePrintGraphics
();
virtual
bool
hasNativeFileSelection
()
const
{
return
true
;
}
virtual
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ui
::
dialogs
::
XFilePicker2
>
virtual
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ui
::
dialogs
::
XFilePicker2
>
createFilePicker
(
const
com
::
sun
::
star
::
uno
::
Reference
<
createFilePicker
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>&
);
com
::
sun
::
star
::
uno
::
XComponentContext
>&
);
...
...
vcl/inc/vcl/svapp.hxx
Dosyayı görüntüle @
f1abe303
...
@@ -373,6 +373,10 @@ public:
...
@@ -373,6 +373,10 @@ public:
*/
*/
static
void
AddToRecentDocumentList
(
const
rtl
::
OUString
&
rFileUrl
,
const
rtl
::
OUString
&
rMimeType
);
static
void
AddToRecentDocumentList
(
const
rtl
::
OUString
&
rFileUrl
,
const
rtl
::
OUString
&
rMimeType
);
/** Do we have a native / system file selector available ?
*/
static
bool
hasNativeFileSelection
();
/** Create a platform specific file picker, if one is available,
/** Create a platform specific file picker, if one is available,
otherwise return an empty reference
otherwise return an empty reference
*/
*/
...
...
vcl/source/app/svapp.cxx
Dosyayı görüntüle @
f1abe303
...
@@ -1895,6 +1895,12 @@ void Application::AppEvent( const ApplicationEvent& /*rAppEvent*/ )
...
@@ -1895,6 +1895,12 @@ void Application::AppEvent( const ApplicationEvent& /*rAppEvent*/ )
{
{
}
}
bool
Application
::
hasNativeFileSelection
()
{
ImplSVData
*
pSVData
=
ImplGetSVData
();
return
pSVData
->
mpDefInst
->
hasNativeFileSelection
();
}
Reference
<
ui
::
dialogs
::
XFilePicker2
>
Reference
<
ui
::
dialogs
::
XFilePicker2
>
Application
::
createFilePicker
(
const
Reference
<
uno
::
XComponentContext
>&
xSM
)
Application
::
createFilePicker
(
const
Reference
<
uno
::
XComponentContext
>&
xSM
)
{
{
...
...
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
Dosyayı görüntüle @
f1abe303
...
@@ -972,7 +972,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException )
...
@@ -972,7 +972,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException )
UNO_QUERY_THROW
);
UNO_QUERY_THROW
);
uno
::
Reference
<
frame
::
XDesktop
>
xDesktop
(
uno
::
Reference
<
frame
::
XDesktop
>
xDesktop
(
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.
awt.Toolkit
"
))
),
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.
frame.Desktop
"
))
),
UNO_QUERY_THROW
);
UNO_QUERY_THROW
);
RunDialog
*
pRunDialog
=
new
RunDialog
(
m_pDialog
,
xToolkit
,
xDesktop
);
RunDialog
*
pRunDialog
=
new
RunDialog
(
m_pDialog
,
xToolkit
,
xDesktop
);
...
...
vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
Dosyayı görüntüle @
f1abe303
...
@@ -206,6 +206,7 @@ GtkInstance::createFolderPicker( const uno::Reference< uno::XComponentContext >
...
@@ -206,6 +206,7 @@ GtkInstance::createFolderPicker( const uno::Reference< uno::XComponentContext >
{
{
fprintf
(
stderr
,
"Create gtk folder picker
\n
"
);
fprintf
(
stderr
,
"Create gtk folder picker
\n
"
);
#if GTK_CHECK_VERSION(3,0,0)
#if GTK_CHECK_VERSION(3,0,0)
(
void
)
xMSF
;
return
uno
::
Reference
<
ui
::
dialogs
::
XFolderPicker
>
();
return
uno
::
Reference
<
ui
::
dialogs
::
XFolderPicker
>
();
#else
#else
return
uno
::
Reference
<
ui
::
dialogs
::
XFolderPicker
>
(
return
uno
::
Reference
<
ui
::
dialogs
::
XFolderPicker
>
(
...
...
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