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
3ec25899
Kaydet (Commit)
3ec25899
authored
Eki 15, 2014
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: fix temp file leak in SwIoSystem::GetFileFilter()
Change-Id: Id483d58a9de27a247880aedfe6bb3fe1d410129c
üst
3b6ee586
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
16 deletions
+12
-16
iodetect.hxx
sw/inc/iodetect.hxx
+1
-1
iodetect.cxx
sw/source/filter/basflt/iodetect.cxx
+9
-12
dbmgr.cxx
sw/source/uibase/dbui/dbmgr.cxx
+1
-1
swdtflvr.cxx
sw/source/uibase/dochdl/swdtflvr.cxx
+1
-2
No files found.
sw/inc/iodetect.hxx
Dosyayı görüntüle @
3ec25899
...
...
@@ -94,7 +94,7 @@ public:
/** Detect for the given file which filter should be used. The filter name
is returned. If no filter could be found, the name of the ASCII filter
is returned! */
static
const
SfxFilter
*
GetFileFilter
(
const
OUString
&
rFileName
,
const
OUString
&
rPrefFltName
,
SfxMedium
*
pMedium
=
0
);
static
const
SfxFilter
*
GetFileFilter
(
const
OUString
&
rFileName
);
static
bool
IsValidStgFilter
(
SotStorage
&
,
const
SfxFilter
&
);
static
bool
IsValidStgFilter
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
embed
::
XStorage
>&
rStg
,
const
SfxFilter
&
rFilter
);
...
...
sw/source/filter/basflt/iodetect.cxx
Dosyayı görüntüle @
3ec25899
...
...
@@ -198,9 +198,7 @@ void TerminateBuffer(sal_Char *pBuffer, sal_uLong nBytesRead, sal_uLong nBufferL
// Check the type of the stream (file) by searching for corresponding set of bytes.
// If no known type is found, return ASCII for now!
// Returns the internal FilterName.
// rPrefFltName is the internal FilterName that was chosen by the user in the Open Dlg.
const
SfxFilter
*
SwIoSystem
::
GetFileFilter
(
const
OUString
&
rFileName
,
const
OUString
&
rPrefFltName
,
SfxMedium
*
pMedium
)
const
SfxFilter
*
SwIoSystem
::
GetFileFilter
(
const
OUString
&
rFileName
)
{
SfxFilterContainer
aCntSw
(
OUString
(
sSWRITER
)
);
SfxFilterContainer
aCntSwWeb
(
OUString
(
sSWRITERWEB
)
);
...
...
@@ -212,21 +210,20 @@ const SfxFilter* SwIoSystem::GetFileFilter(const OUString& rFileName,
if
(
!
pFilter
)
return
0
;
if
(
pMedium
?
(
pMedium
->
IsStorage
()
||
SotStorage
::
IsStorageFile
(
pMedium
->
GetInStream
()
)
)
:
SotStorage
::
IsStorageFile
(
rFileName
)
)
::
boost
::
scoped_ptr
<
SfxMedium
>
pMedium
;
if
(
SotStorage
::
IsStorageFile
(
rFileName
))
{
// package storage or OLEStorage based format
SotStorageRef
xStg
;
if
(
!
pMedium
)
{
INetURLObject
aObj
;
aObj
.
SetSmartProtocol
(
INET_PROT_FILE
);
aObj
.
SetSmartURL
(
rFileName
);
pMedium
=
new
SfxMedium
(
aObj
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
STREAM_STD_READ
);
}
INetURLObject
aObj
;
aObj
.
SetSmartProtocol
(
INET_PROT_FILE
);
aObj
.
SetSmartURL
(
rFileName
);
pMedium
.
reset
(
new
SfxMedium
(
aObj
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
STREAM_STD_READ
));
// templates should not get precedence over "normal" filters (#i35508, #i33168)
const
SfxFilter
*
pTemplateFilter
=
0
;
const
SfxFilter
*
pOldFilter
=
pFCntnr
->
GetFilter4FilterName
(
rPrefFltName
);
const
SfxFilter
*
pOldFilter
=
pFCntnr
->
GetFilter4FilterName
(
""
);
assert
(
!
pOldFilter
);
bool
bLookForTemplate
=
pOldFilter
&&
pOldFilter
->
IsOwnTemplateFormat
();
if
(
pMedium
->
IsStorage
()
)
{
...
...
sw/source/uibase/dbui/dbmgr.cxx
Dosyayı görüntüle @
3ec25899
...
...
@@ -867,7 +867,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
if
(
bMergeShell
||
!
pSourceDocSh
->
IsModified
()
)
{
const
SfxFilter
*
pStoreToFilter
=
SwIoSystem
::
GetFileFilter
(
pSourceDocSh
->
GetMedium
()
->
GetURLObject
().
GetMainURL
(
INetURLObject
::
NO_DECODE
),
::
aEmptyOUStr
);
pSourceDocSh
->
GetMedium
()
->
GetURLObject
().
GetMainURL
(
INetURLObject
::
NO_DECODE
)
);
SfxFilterContainer
*
pFilterContainer
=
SwDocShell
::
Factory
().
GetFilterContainer
();
const
OUString
*
pStoreToFilterOptions
=
0
;
...
...
sw/source/uibase/dochdl/swdtflvr.cxx
Dosyayı görüntüle @
3ec25899
...
...
@@ -2570,8 +2570,7 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData,
//Own FileFormat? --> insert, not for StarWriter/Web
OUString
sFileURL
=
URIHelper
::
SmartRel2Abs
(
INetURLObject
(),
sFile
,
Link
(),
false
);
const
SfxFilter
*
pFlt
=
SW_PASTESDR_SETATTR
==
nAction
?
0
:
SwIoSystem
::
GetFileFilter
(
sFileURL
,
aEmptyOUStr
);
?
0
:
SwIoSystem
::
GetFileFilter
(
sFileURL
);
if
(
pFlt
&&
!
rSh
.
GetView
().
GetDocShell
()
->
ISA
(
SwWebDocShell
)
)
{
// and then pull up the insert-region-dialog by PostUser event
...
...
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