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
b62e70ef
Kaydet (Commit)
b62e70ef
authored
Kas 19, 2014
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
ImpGraphic::ImplReadEmbedded: bSwap is false; remove dead code
Change-Id: Ie5b6b593e178d3752ebf7421af8aee4b50f75819
üst
8f317cd3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
90 deletions
+3
-90
impgraph.hxx
vcl/inc/impgraph.hxx
+1
-1
impgraph.cxx
vcl/source/gdi/impgraph.cxx
+2
-89
No files found.
vcl/inc/impgraph.hxx
Dosyayı görüntüle @
b62e70ef
...
@@ -136,7 +136,7 @@ private:
...
@@ -136,7 +136,7 @@ private:
const
OUString
&
ImplGetDocFileName
()
const
;
const
OUString
&
ImplGetDocFileName
()
const
;
sal_uLong
ImplGetDocFilePos
()
const
{
return
mnDocFilePos
;}
sal_uLong
ImplGetDocFilePos
()
const
{
return
mnDocFilePos
;}
bool
ImplReadEmbedded
(
SvStream
&
rIStream
,
bool
bSwap
=
false
);
bool
ImplReadEmbedded
(
SvStream
&
rIStream
);
bool
ImplWriteEmbedded
(
SvStream
&
rOStream
);
bool
ImplWriteEmbedded
(
SvStream
&
rOStream
);
bool
ImplSwapIn
();
bool
ImplSwapIn
();
...
...
vcl/source/gdi/impgraph.cxx
Dosyayı görüntüle @
b62e70ef
...
@@ -40,7 +40,6 @@
...
@@ -40,7 +40,6 @@
#include <vcl/dibtools.hxx>
#include <vcl/dibtools.hxx>
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_ptr.hpp>
#define GRAPHIC_MAXPARTLEN 256000L
#define GRAPHIC_MTFTOBMP_MAXEXT 2048
#define GRAPHIC_MTFTOBMP_MAXEXT 2048
#define GRAPHIC_STREAMBUFSIZE 8192UL
#define GRAPHIC_STREAMBUFSIZE 8192UL
...
@@ -970,7 +969,7 @@ const OUString& ImpGraphic::ImplGetDocFileName() const
...
@@ -970,7 +969,7 @@ const OUString& ImpGraphic::ImplGetDocFileName() const
}
}
bool
ImpGraphic
::
ImplReadEmbedded
(
SvStream
&
rIStm
,
bool
bSwap
)
bool
ImpGraphic
::
ImplReadEmbedded
(
SvStream
&
rIStm
)
{
{
MapMode
aMapMode
;
MapMode
aMapMode
;
Size
aSize
;
Size
aSize
;
...
@@ -1071,93 +1070,7 @@ bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, bool bSwap )
...
@@ -1071,93 +1070,7 @@ bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, bool bSwap )
maMetaFile
.
SetPrefSize
(
aSize
);
maMetaFile
.
SetPrefSize
(
aSize
);
}
}
if
(
bSwap
)
if
(
meType
==
GRAPHIC_BITMAP
||
meType
==
GRAPHIC_GDIMETAFILE
)
{
if
(
!
maDocFileURLStr
.
isEmpty
())
{
rIStm
.
Seek
(
nStartPos
+
nHeaderLen
+
nLen
);
bRet
=
mbSwapOut
=
true
;
}
else
{
::
utl
::
TempFile
aTempFile
;
const
INetURLObject
aTmpURL
(
aTempFile
.
GetURL
()
);
if
(
!
aTmpURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
).
isEmpty
()
)
{
boost
::
scoped_ptr
<
SvStream
>
pOStm
;
try
{
pOStm
.
reset
(
::
utl
::
UcbStreamHelper
::
CreateStream
(
aTmpURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
STREAM_READWRITE
|
STREAM_SHARE_DENYWRITE
));
}
catch
(
const
::
com
::
sun
::
star
::
uno
::
Exception
&
)
{
}
if
(
pOStm
)
{
sal_uLong
nFullLen
=
nHeaderLen
+
nLen
;
sal_uLong
nPartLen
=
std
::
min
(
nFullLen
,
(
sal_uLong
)
GRAPHIC_MAXPARTLEN
);
sal_uInt8
*
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
nPartLen
);
pOStm
->
SetNumberFormatInt
(
NUMBERFORMAT_INT_LITTLEENDIAN
);
if
(
pBuffer
)
{
rIStm
.
Seek
(
nStartPos
);
while
(
nFullLen
)
{
rIStm
.
Read
(
(
char
*
)
pBuffer
,
nPartLen
);
pOStm
->
Write
(
(
char
*
)
pBuffer
,
nPartLen
);
nFullLen
-=
nPartLen
;
if
(
nFullLen
<
GRAPHIC_MAXPARTLEN
)
nPartLen
=
nFullLen
;
}
rtl_freeMemory
(
pBuffer
);
sal_uLong
nReadErr
=
rIStm
.
GetError
(),
nWriteErr
=
pOStm
->
GetError
();
pOStm
.
reset
();
if
(
!
nReadErr
&&
!
nWriteErr
)
{
bRet
=
mbSwapOut
=
true
;
mpSwapFile
=
new
ImpSwapFile
;
mpSwapFile
->
nRefCount
=
1
;
mpSwapFile
->
aSwapURL
=
aTmpURL
;
}
else
{
try
{
::
ucbhelper
::
Content
aCnt
(
aTmpURL
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
ucb
::
XCommandEnvironment
>
(),
comphelper
::
getProcessComponentContext
()
);
aCnt
.
executeCommand
(
OUString
(
"delete"
),
::
com
::
sun
::
star
::
uno
::
makeAny
(
true
)
);
}
catch
(
const
::
com
::
sun
::
star
::
ucb
::
ContentCreationException
&
)
{
}
catch
(
const
::
com
::
sun
::
star
::
uno
::
RuntimeException
&
)
{
}
catch
(
const
::
com
::
sun
::
star
::
ucb
::
CommandAbortedException
&
)
{
}
catch
(
const
::
com
::
sun
::
star
::
uno
::
Exception
&
)
{
}
}
}
}
}
}
}
else
if
(
meType
==
GRAPHIC_BITMAP
||
meType
==
GRAPHIC_GDIMETAFILE
)
{
{
ReadImpGraphic
(
rIStm
,
*
this
);
ReadImpGraphic
(
rIStm
,
*
this
);
bRet
=
(
rIStm
.
GetError
()
==
0UL
);
bRet
=
(
rIStm
.
GetError
()
==
0UL
);
...
...
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