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
019ab2b0
Kaydet (Commit)
019ab2b0
authored
Şub 27, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert GFF_ constants to enum class
Change-Id: I88469e8d6afb3fcefdaf285a56b7acd576bc8520
üst
6d729943
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
69 deletions
+71
-69
escherex.cxx
filter/source/msfilter/escherex.cxx
+9
-9
graphicfilter.hxx
include/vcl/graphicfilter.hxx
+35
-33
descriptor.cxx
svtools/source/graphic/descriptor.cxx
+27
-27
graphicfilter2.cxx
vcl/source/filter/graphicfilter2.cxx
+0
-0
No files found.
filter/source/msfilter/escherex.cxx
Dosyayı görüntüle @
019ab2b0
...
@@ -1585,18 +1585,18 @@ bool EscherPropertyContainer::CreateGraphicProperties(
...
@@ -1585,18 +1585,18 @@ bool EscherPropertyContainer::CreateGraphicProperties(
INetURLObject
aTmp
(
aGraphicUrl
);
INetURLObject
aTmp
(
aGraphicUrl
);
GraphicDescriptor
aDescriptor
(
aTmp
);
GraphicDescriptor
aDescriptor
(
aTmp
);
aDescriptor
.
Detect
();
aDescriptor
.
Detect
();
const
sal_uInt16
nFormat
=
aDescriptor
.
GetFileFormat
();
const
GraphicFileFormat
nFormat
=
aDescriptor
.
GetFileFormat
();
// can MSO handle it?
// can MSO handle it?
if
(
bMirrored
||
nAngle
||
nTransparency
||
nRed
||
nGreen
||
nBlue
||
(
1.0
!=
fGamma
)
||
if
(
bMirrored
||
nAngle
||
nTransparency
||
nRed
||
nGreen
||
nBlue
||
(
1.0
!=
fGamma
)
||
(
nFormat
!=
G
FF_
BMP
&&
(
nFormat
!=
G
raphicFileFormat
::
BMP
&&
nFormat
!=
G
FF_
GIF
&&
nFormat
!=
G
raphicFileFormat
::
GIF
&&
nFormat
!=
G
FF_
JPG
&&
nFormat
!=
G
raphicFileFormat
::
JPG
&&
nFormat
!=
G
FF_
PNG
&&
nFormat
!=
G
raphicFileFormat
::
PNG
&&
nFormat
!=
G
FF_
TIF
&&
nFormat
!=
G
raphicFileFormat
::
TIF
&&
nFormat
!=
G
FF_
PCT
&&
nFormat
!=
G
raphicFileFormat
::
PCT
&&
nFormat
!=
G
FF_
WMF
&&
nFormat
!=
G
raphicFileFormat
::
WMF
&&
nFormat
!=
G
FF_
EMF
)
)
nFormat
!=
G
raphicFileFormat
::
EMF
)
)
{
{
boost
::
scoped_ptr
<
SvStream
>
pIn
(
::
utl
::
UcbStreamHelper
::
CreateStream
(
boost
::
scoped_ptr
<
SvStream
>
pIn
(
::
utl
::
UcbStreamHelper
::
CreateStream
(
aTmp
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
StreamMode
::
READ
));
aTmp
.
GetMainURL
(
INetURLObject
::
NO_DECODE
),
StreamMode
::
READ
));
...
...
include/vcl/graphicfilter.hxx
Dosyayı görüntüle @
019ab2b0
...
@@ -88,35 +88,37 @@ struct ConvertData;
...
@@ -88,35 +88,37 @@ struct ConvertData;
// Info class for all supported file formats
// Info class for all supported file formats
#define GFF_NOT ( (sal_uInt16)0x0000 )
enum
class
GraphicFileFormat
#define GFF_BMP ( (sal_uInt16)0x0001 )
{
#define GFF_GIF ( (sal_uInt16)0x0002 )
NOT
=
0x0000
,
#define GFF_JPG ( (sal_uInt16)0x0003 )
BMP
=
0x0001
,
#define GFF_PCD ( (sal_uInt16)0x0004 )
GIF
=
0x0002
,
#define GFF_PCX ( (sal_uInt16)0x0005 )
JPG
=
0x0003
,
#define GFF_PNG ( (sal_uInt16)0x0006 )
PCD
=
0x0004
,
#define GFF_TIF ( (sal_uInt16)0x0007 )
PCX
=
0x0005
,
#define GFF_XBM ( (sal_uInt16)0x0008 )
PNG
=
0x0006
,
#define GFF_XPM ( (sal_uInt16)0x0009 )
TIF
=
0x0007
,
#define GFF_PBM ( (sal_uInt16)0x000a )
XBM
=
0x0008
,
#define GFF_PGM ( (sal_uInt16)0x000b )
XPM
=
0x0009
,
#define GFF_PPM ( (sal_uInt16)0x000c )
PBM
=
0x000a
,
#define GFF_RAS ( (sal_uInt16)0x000d )
PGM
=
0x000b
,
#define GFF_TGA ( (sal_uInt16)0x000e )
PPM
=
0x000c
,
#define GFF_PSD ( (sal_uInt16)0x000f )
RAS
=
0x000d
,
#define GFF_EPS ( (sal_uInt16)0x0010 )
TGA
=
0x000e
,
#define GFF_DXF ( (sal_uInt16)0x00f1 )
PSD
=
0x000f
,
#define GFF_MET ( (sal_uInt16)0x00f2 )
EPS
=
0x0010
,
#define GFF_PCT ( (sal_uInt16)0x00f3 )
DXF
=
0x00f1
,
#define GFF_SGF ( (sal_uInt16)0x00f4 )
MET
=
0x00f2
,
#define GFF_SVM ( (sal_uInt16)0x00f5 )
PCT
=
0x00f3
,
#define GFF_WMF ( (sal_uInt16)0x00f6 )
SGF
=
0x00f4
,
#define GFF_SGV ( (sal_uInt16)0x00f7 )
SVM
=
0x00f5
,
#define GFF_EMF ( (sal_uInt16)0x00f8 )
WMF
=
0x00f6
,
#define GFF_SVG ( (sal_uInt16)0x00f9 )
SGV
=
0x00f7
,
#define GFF_MOV ( (sal_uInt16)0x00fa )
EMF
=
0x00f8
,
#define GFF_XXX ( (sal_uInt16)0xffff )
SVG
=
0x00f9
,
MOV
=
0x00fa
,
XXX
=
0xffff
};
// - GraphicDescriptor -
// - GraphicDescriptor -
...
@@ -130,7 +132,7 @@ class VCL_DLLPUBLIC GraphicDescriptor
...
@@ -130,7 +132,7 @@ class VCL_DLLPUBLIC GraphicDescriptor
Size
aLogSize
;
Size
aLogSize
;
sal_uInt16
nBitsPerPixel
;
sal_uInt16
nBitsPerPixel
;
sal_uInt16
nPlanes
;
sal_uInt16
nPlanes
;
sal_uInt16
nFormat
;
GraphicFileFormat
nFormat
;
bool
bCompressed
;
bool
bCompressed
;
bool
bOwnStream
;
bool
bOwnStream
;
...
@@ -190,8 +192,8 @@ public:
...
@@ -190,8 +192,8 @@ public:
as many properties as possible (size, color, etc.) */
as many properties as possible (size, color, etc.) */
bool
Detect
(
bool
bExtendedInfo
=
false
);
bool
Detect
(
bool
bExtendedInfo
=
false
);
/** @return the file format, G
FF_
NOT if no format was recognized */
/** @return the file format, G
raphicFileFormat::
NOT if no format was recognized */
sal_uInt16
GetFileFormat
()
const
{
return
nFormat
;
}
GraphicFileFormat
GetFileFormat
()
const
{
return
nFormat
;
}
/** @return graphic size in pixels or 0 size */
/** @return graphic size in pixels or 0 size */
const
Size
&
GetSizePixel
()
const
{
return
(
Size
&
)
aPixSize
;
}
const
Size
&
GetSizePixel
()
const
{
return
(
Size
&
)
aPixSize
;
}
...
@@ -209,7 +211,7 @@ public:
...
@@ -209,7 +211,7 @@ public:
bool
IsCompressed
()
const
{
return
bCompressed
;
}
bool
IsCompressed
()
const
{
return
bCompressed
;
}
/** @return filter number that is needed by the GraphFilter to read this format */
/** @return filter number that is needed by the GraphFilter to read this format */
static
OUString
GetImportFormatShortName
(
sal_uInt16
nFormat
);
static
OUString
GetImportFormatShortName
(
GraphicFileFormat
nFormat
);
};
};
/** Information about errors during the GraphicFilter operation. */
/** Information about errors during the GraphicFilter operation. */
...
...
svtools/source/graphic/descriptor.cxx
Dosyayı görüntüle @
019ab2b0
...
@@ -102,39 +102,39 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL )
...
@@ -102,39 +102,39 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL )
mnBitsPerPixel
=
0
;
mnBitsPerPixel
=
0
;
mbTransparent
=
false
;
mbTransparent
=
false
;
if
(
aDescriptor
.
Detect
(
true
)
&&
aDescriptor
.
GetFileFormat
()
!=
G
FF_
NOT
)
if
(
aDescriptor
.
Detect
(
true
)
&&
aDescriptor
.
GetFileFormat
()
!=
G
raphicFileFormat
::
NOT
)
{
{
const
char
*
pMimeType
=
NULL
;
const
char
*
pMimeType
=
NULL
;
sal_uInt8
cType
=
graphic
::
GraphicType
::
EMPTY
;
sal_uInt8
cType
=
graphic
::
GraphicType
::
EMPTY
;
switch
(
aDescriptor
.
GetFileFormat
()
)
switch
(
aDescriptor
.
GetFileFormat
()
)
{
{
case
(
G
FF_
BMP
):
pMimeType
=
MIMETYPE_BMP
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
BMP
)
:
pMimeType
=
MIMETYPE_BMP
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
GIF
):
pMimeType
=
MIMETYPE_GIF
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
GIF
)
:
pMimeType
=
MIMETYPE_GIF
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
JPG
):
pMimeType
=
MIMETYPE_JPG
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
JPG
)
:
pMimeType
=
MIMETYPE_JPG
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
PCD
):
pMimeType
=
MIMETYPE_PCD
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
PCD
)
:
pMimeType
=
MIMETYPE_PCD
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
PCX
):
pMimeType
=
MIMETYPE_PCX
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
PCX
)
:
pMimeType
=
MIMETYPE_PCX
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
PNG
):
pMimeType
=
MIMETYPE_PNG
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
PNG
)
:
pMimeType
=
MIMETYPE_PNG
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
TIF
):
pMimeType
=
MIMETYPE_TIF
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
TIF
)
:
pMimeType
=
MIMETYPE_TIF
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
XBM
):
pMimeType
=
MIMETYPE_XBM
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
XBM
)
:
pMimeType
=
MIMETYPE_XBM
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
XPM
):
pMimeType
=
MIMETYPE_XPM
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
XPM
)
:
pMimeType
=
MIMETYPE_XPM
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
PBM
):
pMimeType
=
MIMETYPE_PBM
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
PBM
)
:
pMimeType
=
MIMETYPE_PBM
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
PGM
):
pMimeType
=
MIMETYPE_PGM
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
PGM
)
:
pMimeType
=
MIMETYPE_PGM
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
PPM
):
pMimeType
=
MIMETYPE_PPM
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
PPM
)
:
pMimeType
=
MIMETYPE_PPM
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
RAS
):
pMimeType
=
MIMETYPE_RAS
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
RAS
)
:
pMimeType
=
MIMETYPE_RAS
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
TGA
):
pMimeType
=
MIMETYPE_TGA
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
TGA
)
:
pMimeType
=
MIMETYPE_TGA
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
PSD
):
pMimeType
=
MIMETYPE_PSD
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
raphicFileFormat
:
:
PSD
)
:
pMimeType
=
MIMETYPE_PSD
;
cType
=
graphic
::
GraphicType
::
PIXEL
;
break
;
case
(
G
FF_
EPS
):
pMimeType
=
MIMETYPE_EPS
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
raphicFileFormat
:
:
EPS
)
:
pMimeType
=
MIMETYPE_EPS
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
FF_
DXF
):
pMimeType
=
MIMETYPE_DXF
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
raphicFileFormat
:
:
DXF
)
:
pMimeType
=
MIMETYPE_DXF
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
FF_
MET
):
pMimeType
=
MIMETYPE_MET
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
raphicFileFormat
:
:
MET
)
:
pMimeType
=
MIMETYPE_MET
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
FF_
PCT
):
pMimeType
=
MIMETYPE_PCT
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
raphicFileFormat
:
:
PCT
)
:
pMimeType
=
MIMETYPE_PCT
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
FF_
SGF
):
pMimeType
=
MIMETYPE_SGF
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
raphicFileFormat
:
:
SGF
)
:
pMimeType
=
MIMETYPE_SGF
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
FF_
SVM
):
pMimeType
=
MIMETYPE_SVM
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
raphicFileFormat
:
:
SVM
)
:
pMimeType
=
MIMETYPE_SVM
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
FF_
WMF
):
pMimeType
=
MIMETYPE_WMF
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
raphicFileFormat
:
:
WMF
)
:
pMimeType
=
MIMETYPE_WMF
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
FF_
SGV
):
pMimeType
=
MIMETYPE_SGV
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
raphicFileFormat
:
:
SGV
)
:
pMimeType
=
MIMETYPE_SGV
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
FF_
EMF
):
pMimeType
=
MIMETYPE_EMF
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
raphicFileFormat
:
:
EMF
)
:
pMimeType
=
MIMETYPE_EMF
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
FF_
SVG
):
pMimeType
=
MIMETYPE_SVG
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
case
(
G
raphicFileFormat
:
:
SVG
)
:
pMimeType
=
MIMETYPE_SVG
;
cType
=
graphic
::
GraphicType
::
VECTOR
;
break
;
default
:
default
:
break
;
break
;
...
...
vcl/source/filter/graphicfilter2.cxx
Dosyayı görüntüle @
019ab2b0
This diff is collapsed.
Click to expand it.
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