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
9464775a
Kaydet (Commit)
9464775a
authored
Haz 05, 2015
tarafından
Szymon Kłos
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
filter select handler
Change-Id: Iec362f7cf6540a5f312a9fdb4898c94433f68a9d
üst
e8815046
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
5 deletions
+52
-5
RemoteFilesDialog.hxx
include/svtools/RemoteFilesDialog.hxx
+7
-0
appopen.cxx
sfx2/source/appl/appopen.cxx
+6
-0
RemoteFilesDialog.cxx
svtools/source/dialogs/RemoteFilesDialog.cxx
+39
-5
No files found.
include/svtools/RemoteFilesDialog.hxx
Dosyayı görüntüle @
9464775a
...
...
@@ -32,6 +32,8 @@
#define WB_MULTISELECTION 0x20000000L
#define FILTER_ALL "*.*"
enum
SvtRemoteDlgMode
{
REMOTEDLG_MODE_OPEN
=
0
,
...
...
@@ -58,6 +60,8 @@ public:
virtual
void
dispose
()
SAL_OVERRIDE
;
virtual
void
Resize
()
SAL_OVERRIDE
;
void
AddFilter
(
OUString
sName
,
OUString
sType
);
private
:
::
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>
m_context
;
...
...
@@ -80,6 +84,7 @@ private:
VclPtr
<
Edit
>
m_pName_ed
;
std
::
vector
<
ServicePtr
>
m_aServices
;
std
::
vector
<
OUString
>
m_aFilters
;
void
FillServicesListbox
();
...
...
@@ -98,6 +103,8 @@ private:
DECL_LINK
(
SelectHdl
,
void
*
);
DECL_LINK
(
SplitHdl
,
void
*
);
DECL_LINK
(
SelectFilterHdl
,
void
*
);
};
#endif // INCLUDED_SVTOOLS_REMOTEFILESDIALOG_HXX
...
...
sfx2/source/appl/appopen.cxx
Dosyayı görüntüle @
9464775a
...
...
@@ -1128,6 +1128,12 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
void
SfxApplication
::
OpenRemoteExec_Impl
(
SfxRequest
&
)
{
ScopedVclPtrInstance
<
RemoteFilesDialog
>
aDlg
((
vcl
::
Window
*
)
NULL
,
WB_OPEN
);
// Filters for test purposes
aDlg
->
AddFilter
(
"All files"
,
FILTER_ALL
);
aDlg
->
AddFilter
(
"ODT files"
,
"*.odt"
);
aDlg
->
AddFilter
(
"ODS files"
,
"*.ods"
);
aDlg
->
Execute
();
}
...
...
svtools/source/dialogs/RemoteFilesDialog.cxx
Dosyayı görüntüle @
9464775a
...
...
@@ -11,8 +11,6 @@
using
namespace
::
com
::
sun
::
star
::
uno
;
#define FILTER_ALL "*.*"
class
FileViewContainer
:
public
vcl
::
Window
{
private
:
...
...
@@ -99,6 +97,11 @@ RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, WinBits nBits)
m_bMultiselection
=
(
nBits
&
WB_MULTISELECTION
)
?
true
:
false
;
m_bIsUpdated
=
false
;
m_pOpen_btn
->
Enable
(
false
);
m_pSave_btn
->
Enable
(
false
);
m_pFilter_lb
->
Enable
(
false
);
m_pName_ed
->
Enable
(
false
);
if
(
m_eMode
==
REMOTEDLG_MODE_OPEN
)
{
m_pSave_btn
->
Hide
();
...
...
@@ -143,6 +146,7 @@ RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, WinBits nBits)
m_pContainer
->
init
(
m_pFileView
,
m_pSplitter
,
m_pTreeView
);
m_pContainer
->
Show
();
m_pContainer
->
Enable
(
false
);
m_pAddService_btn
->
SetMenuMode
(
MENUBUTTON_MENUMODE_TIMED
);
m_pAddService_btn
->
SetClickHdl
(
LINK
(
this
,
RemoteFilesDialog
,
AddServiceHdl
)
);
...
...
@@ -152,8 +156,7 @@ RemoteFilesDialog::RemoteFilesDialog(vcl::Window* pParent, WinBits nBits)
m_pServices_lb
->
SetSelectHdl
(
LINK
(
this
,
RemoteFilesDialog
,
SelectServiceHdl
)
);
m_pFilter_lb
->
InsertEntry
(
FILTER_ALL
);
m_pFilter_lb
->
SelectEntryPos
(
0
);
m_pFilter_lb
->
SetSelectHdl
(
LINK
(
this
,
RemoteFilesDialog
,
SelectFilterHdl
)
);
}
RemoteFilesDialog
::~
RemoteFilesDialog
()
...
...
@@ -261,11 +264,25 @@ int RemoteFilesDialog::GetSelectedServicePos()
return
nPos
;
}
void
RemoteFilesDialog
::
AddFilter
(
OUString
sName
,
OUString
sType
)
{
m_aFilters
.
push_back
(
sType
);
m_pFilter_lb
->
InsertEntry
(
sName
);
if
(
m_pFilter_lb
->
GetSelectEntryPos
()
==
LISTBOX_ENTRY_NOTFOUND
)
m_pFilter_lb
->
SelectEntryPos
(
0
);
}
OUString
RemoteFilesDialog
::
getCurrentFilter
()
{
OUString
sFilter
;
sFilter
=
m_pFilter_lb
->
GetSelectEntry
();
int
nPos
=
m_pFilter_lb
->
GetSelectEntryPos
();
if
(
nPos
!=
LISTBOX_ENTRY_NOTFOUND
)
sFilter
=
m_aFilters
[
nPos
];
else
sFilter
=
FILTER_ALL
;
return
sFilter
;
}
...
...
@@ -281,6 +298,13 @@ void RemoteFilesDialog::OpenURL( OUString sURL )
m_pFileView
->
EndInplaceEditing
(
false
);
m_pPath_ed
->
SetText
(
sURL
);
eResult
=
m_pFileView
->
Initialize
(
sURL
,
sFilter
,
NULL
,
BlackList
);
if
(
eResult
==
eSuccess
)
{
m_pFilter_lb
->
Enable
(
true
);
m_pName_ed
->
Enable
(
true
);
m_pContainer
->
Enable
(
true
);
}
}
}
...
...
@@ -430,4 +454,14 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, SplitHdl )
return
1
;
}
IMPL_LINK_NOARG
(
RemoteFilesDialog
,
SelectFilterHdl
)
{
OUString
sCurrentURL
=
m_pFileView
->
GetViewURL
();
if
(
!
sCurrentURL
.
isEmpty
()
)
OpenURL
(
sCurrentURL
);
return
1
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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