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
399e425f
Kaydet (Commit)
399e425f
authored
Ock 12, 2012
tarafından
August Sodora
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SvStringsDtor->std::vector
üst
6a14a582
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
78 deletions
+22
-78
OfficeFilePicker.cxx
fpicker/source/office/OfficeFilePicker.cxx
+7
-8
OfficeFolderPicker.cxx
fpicker/source/office/OfficeFolderPicker.cxx
+8
-57
iodlg.cxx
fpicker/source/office/iodlg.cxx
+6
-11
iodlg.hxx
fpicker/source/office/iodlg.hxx
+1
-2
No files found.
fpicker/source/office/OfficeFilePicker.cxx
Dosyayı görüntüle @
399e425f
...
...
@@ -616,28 +616,27 @@ Sequence< rtl::OUString > SAL_CALL SvtFilePicker::getFiles() throw( RuntimeExcep
// if there is more than one path we have to return the path to the
// files first and then the list of the selected entries
SvStringsDtor
*
pPathList
=
getDialog
()
->
GetPathList
(
);
s
al_uInt16
i
,
nCount
=
pPathList
->
Count
();
s
al_uInt16
nTotal
=
nCount
>
1
?
nCount
+
1
:
nCount
;
std
::
vector
<
rtl
::
OUString
>
aPathList
(
getDialog
()
->
GetPathList
()
);
s
ize_t
nCount
=
aPathList
.
size
();
s
ize_t
nTotal
=
nCount
>
1
?
nCount
+
1
:
nCount
;
Sequence
<
rtl
::
OUString
>
aPath
(
nTotal
);
if
(
nCount
==
1
)
aPath
[
0
]
=
rtl
::
OUString
(
*
pPathList
->
GetObject
(
0
)
);
aPath
[
0
]
=
rtl
::
OUString
(
aPathList
[
0
]
);
else
if
(
nCount
>
1
)
{
INetURLObject
aObj
(
*
pPathList
->
GetObject
(
0
)
);
INetURLObject
aObj
(
aPathList
[
0
]
);
aObj
.
removeSegment
();
aPath
[
0
]
=
aObj
.
GetMainURL
(
INetURLObject
::
NO_DECODE
);
for
(
i
=
0
;
i
<
nCount
;
/* i++ is done below */
)
for
(
size_t
i
=
0
;
i
<
aPathList
.
size
();
++
i
)
{
aObj
.
SetURL
(
*
pPathList
->
GetObject
(
i
++
)
);
aObj
.
SetURL
(
aPathList
[
i
]
);
aPath
[
i
]
=
aObj
.
getName
();
}
}
delete
pPathList
;
return
aPath
;
}
...
...
fpicker/source/office/OfficeFolderPicker.cxx
Dosyayı görüntüle @
399e425f
...
...
@@ -40,65 +40,39 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <unotools/pathoptions.hxx>
// using ----------------------------------------------------------------
using
namespace
::
com
::
sun
::
star
::
container
;
using
namespace
::
com
::
sun
::
star
::
lang
;
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
beans
;
//------------------------------------------------------------------------------------
// class SvtFolderPicker
//------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------
SvtFolderPicker
::
SvtFolderPicker
(
const
Reference
<
XMultiServiceFactory
>&
_rxFactory
)
:
OCommonPicker
(
_rxFactory
)
{
}
//------------------------------------------------------------------------------------
SvtFolderPicker
::~
SvtFolderPicker
()
{
}
//------------------------------------------------------------------------------------
// disambiguate XInterface
//------------------------------------------------------------------------------------
IMPLEMENT_FORWARD_XINTERFACE2
(
SvtFolderPicker
,
OCommonPicker
,
SvtFolderPicker_Base
)
//------------------------------------------------------------------------------------
// disambiguate XTypeProvider
//------------------------------------------------------------------------------------
IMPLEMENT_FORWARD_XTYPEPROVIDER2
(
SvtFolderPicker
,
OCommonPicker
,
SvtFolderPicker_Base
)
//------------------------------------------------------------------------------------
// XExecutableDialog functions
//------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------
void
SAL_CALL
SvtFolderPicker
::
setTitle
(
const
::
rtl
::
OUString
&
_rTitle
)
throw
(
RuntimeException
)
{
OCommonPicker
::
setTitle
(
_rTitle
);
}
//------------------------------------------------------------------------------------
sal_Int16
SAL_CALL
SvtFolderPicker
::
execute
(
)
throw
(
RuntimeException
)
{
return
OCommonPicker
::
execute
();
}
//------------------------------------------------------------------------------------
// XAsynchronousExecutableDialog functions
//------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------
void
SAL_CALL
SvtFolderPicker
::
setDialogTitle
(
const
::
rtl
::
OUString
&
_rTitle
)
throw
(
RuntimeException
)
{
setTitle
(
_rTitle
);
}
//------------------------------------------------------------------------------------
void
SAL_CALL
SvtFolderPicker
::
startExecuteModal
(
const
Reference
<
::
com
::
sun
::
star
::
ui
::
dialogs
::
XDialogClosedListener
>&
xListener
)
throw
(
RuntimeException
)
{
m_xListener
=
xListener
;
...
...
@@ -108,13 +82,11 @@ void SAL_CALL SvtFolderPicker::startExecuteModal( const Reference< ::com::sun::s
getDialog
()
->
StartExecuteModal
(
LINK
(
this
,
SvtFolderPicker
,
DialogClosedHdl
)
);
}
//------------------------------------------------------------------------------------
SvtFileDialog
*
SvtFolderPicker
::
implCreateDialog
(
Window
*
_pParent
)
{
return
new
SvtFileDialog
(
_pParent
,
SFXWB_PATHDIALOG
);
}
//------------------------------------------------------------------------------------
sal_Int16
SvtFolderPicker
::
implExecutePicker
(
)
{
prepareExecute
();
...
...
@@ -126,7 +98,6 @@ sal_Int16 SvtFolderPicker::implExecutePicker( )
return
nRet
;
}
//------------------------------------------------------------------------------------
void
SvtFolderPicker
::
prepareExecute
()
{
// set the default directory
...
...
@@ -140,7 +111,6 @@ void SvtFolderPicker::prepareExecute()
}
}
//-----------------------------------------------------------------------------
IMPL_LINK
(
SvtFolderPicker
,
DialogClosedHdl
,
Dialog
*
,
pDlg
)
{
if
(
m_xListener
.
is
()
)
...
...
@@ -153,63 +123,44 @@ IMPL_LINK( SvtFolderPicker, DialogClosedHdl, Dialog*, pDlg )
return
0
;
}
//------------------------------------------------------------------------------------
// XFolderPicker functions
//------------------------------------------------------------------------------------
void
SAL_CALL
SvtFolderPicker
::
setDisplayDirectory
(
const
::
rtl
::
OUString
&
aDirectory
)
throw
(
IllegalArgumentException
,
RuntimeException
)
{
m_aDisplayDirectory
=
aDirectory
;
}
//------------------------------------------------------------------------------------
::
rtl
::
OUString
SAL_CALL
SvtFolderPicker
::
getDisplayDirectory
()
throw
(
RuntimeException
)
{
::
rtl
::
OUString
aResult
;
if
(
!
getDialog
()
)
return
m_aDisplayDirectory
;
SvStringsDtor
*
pPathList
=
getDialog
()
->
GetPathList
();
if
(
pPathList
->
Count
()
)
aResult
=
::
rtl
::
OUString
(
*
pPathList
->
GetObject
(
0
)
);
std
::
vector
<
rtl
::
OUString
>
aPathList
(
getDialog
()
->
GetPathList
());
delete
pPathList
;
if
(
!
aPathList
.
empty
())
return
aPathList
[
0
];
return
aResult
;
return
rtl
::
OUString
()
;
}
//------------------------------------------------------------------------------------
::
rtl
::
OUString
SAL_CALL
SvtFolderPicker
::
getDirectory
()
throw
(
RuntimeException
)
{
::
rtl
::
OUString
aResult
;
if
(
!
getDialog
()
)
return
m_aDisplayDirectory
;
SvStringsDtor
*
pPathList
=
getDialog
()
->
GetPathList
(
);
std
::
vector
<
rtl
::
OUString
>
aPathList
(
getDialog
()
->
GetPathList
()
);
if
(
pPathList
->
Count
()
)
aResult
=
::
rtl
::
OUString
(
*
pPathList
->
GetObject
(
0
)
)
;
if
(
!
aPathList
.
empty
()
)
return
aPathList
[
0
]
;
delete
pPathList
;
return
aResult
;
return
rtl
::
OUString
();
}
//------------------------------------------------------------------------------------
void
SAL_CALL
SvtFolderPicker
::
setDescription
(
const
::
rtl
::
OUString
&
aDescription
)
throw
(
RuntimeException
)
{
m_aDescription
=
aDescription
;
}
//------------------------------------------------------------------------------------
// XServiceInfo
//------------------------------------------------------------------------------------
/* XServiceInfo */
::
rtl
::
OUString
SAL_CALL
SvtFolderPicker
::
getImplementationName
()
throw
(
RuntimeException
)
{
...
...
fpicker/source/office/iodlg.cxx
Dosyayı görüntüle @
399e425f
...
...
@@ -2452,34 +2452,29 @@ void SvtFileDialog::InitSize()
//*****************************************************************************
SvStringsDtor
*
SvtFileDialog
::
GetPathList
()
const
std
::
vector
<
rtl
::
OUString
>
SvtFileDialog
::
GetPathList
()
const
{
SvStringsDtor
*
pList
=
new
SvStringsDtor
;
std
::
vector
<
rtl
::
OUString
>
aList
;
sal_uLong
nCount
=
_pFileView
->
GetSelectionCount
();
SvLBoxEntry
*
pEntry
=
nCount
?
_pFileView
->
FirstSelected
()
:
NULL
;
if
(
!
pEntry
)
{
String
*
pURL
;
if
(
_pImp
->
_pEdFileName
->
GetText
().
Len
()
&&
_bIsInExecute
)
pURL
=
new
String
(
_pImp
->
_pEdFileName
->
GetURL
()
);
aList
.
push_back
(
_pImp
->
_pEdFileName
->
GetURL
()
);
else
pURL
=
new
String
(
_aPath
);
pList
->
Insert
(
pURL
,
pList
->
Count
()
);
aList
.
push_back
(
_aPath
);
}
else
{
while
(
pEntry
)
{
String
*
pURL
=
new
String
(
_pFileView
->
GetURL
(
pEntry
)
);
pList
->
Insert
(
pURL
,
pList
->
Count
()
);
aList
.
push_back
(
_pFileView
->
GetURL
(
pEntry
));
pEntry
=
_pFileView
->
NextSelected
(
pEntry
);
}
}
return
p
List
;
return
a
List
;
}
//*****************************************************************************
...
...
fpicker/source/office/iodlg.hxx
Dosyayı görüntüle @
399e425f
...
...
@@ -54,7 +54,6 @@
//*****************************************************************************
class
SvTabListBox
;
class
SvStringsDtor
;
class
SvtFileView
;
struct
ControlChain_Impl
;
class
SvtFileDialogFilter_Impl
;
...
...
@@ -214,7 +213,7 @@ public:
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>&
GetBlackList
()
const
;
void
SetStandardDir
(
const
String
&
rStdDir
);
const
String
&
GetStandardDir
()
const
;
SvStringsDtor
*
GetPathList
()
const
;
// for MultiSelection
std
::
vector
<
rtl
::
OUString
>
GetPathList
()
const
;
// for MultiSelection
void
AddFilter
(
const
String
&
rFilter
,
const
String
&
rType
);
...
...
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