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
f5973365
Kaydet (Commit)
f5973365
authored
Mar 02, 2012
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
customshapes: use static integer array for EnhancedCustomShapeSequences
Saves 4% compile time and 200K of space
üst
36f8ef7f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
13 deletions
+24
-13
customshapeproperties.hxx
oox/inc/oox/drawingml/customshapeproperties.hxx
+1
-0
customshapeproperties.cxx
oox/source/drawingml/customshapeproperties.cxx
+11
-4
propertymap.cxx
oox/source/helper/propertymap.cxx
+12
-9
No files found.
oox/inc/oox/drawingml/customshapeproperties.hxx
Dosyayı görüntüle @
f5973365
...
@@ -116,6 +116,7 @@ struct Path2D
...
@@ -116,6 +116,7 @@ struct Path2D
class
CustomShapeProvider
{
class
CustomShapeProvider
{
protected
:
protected
:
static
com
::
sun
::
star
::
uno
::
Any
createStringSequence
(
size_t
nStrings
,
const
char
**
pStrings
);
static
com
::
sun
::
star
::
uno
::
Any
createStringSequence
(
size_t
nStrings
,
const
char
**
pStrings
);
static
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
drawing
::
EnhancedCustomShapeSegment
>
createCustomShapeSegmentSequence
(
size_t
nElems
,
const
sal_uInt16
*
pValues
);
public
:
public
:
virtual
PropertyMap
getProperties
()
=
0
;
virtual
PropertyMap
getProperties
()
=
0
;
};
};
...
...
oox/source/drawingml/customshapeproperties.cxx
Dosyayı görüntüle @
f5973365
...
@@ -374,14 +374,21 @@ Any CustomShapeProvider::createStringSequence( size_t nStrings, const char **pSt
...
@@ -374,14 +374,21 @@ Any CustomShapeProvider::createStringSequence( size_t nStrings, const char **pSt
{
{
Sequence
<
OUString
>
aStringSequence
(
nStrings
);
Sequence
<
OUString
>
aStringSequence
(
nStrings
);
for
(
size_t
i
=
0
;
i
<
nStrings
;
i
++
)
for
(
size_t
i
=
0
;
i
<
nStrings
;
i
++
)
{
aStringSequence
[
i
]
=
::
rtl
::
OUString
::
intern
(
aStringSequence
[
i
]
=
::
rtl
::
OUString
::
intern
(
pStrings
[
i
],
strlen
(
pStrings
[
i
]
),
pStrings
[
i
],
strlen
(
pStrings
[
i
]
),
RTL_TEXTENCODING_ASCII_US
);
RTL_TEXTENCODING_ASCII_US
);
return
makeAny
(
aStringSequence
);
}
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
drawing
::
EnhancedCustomShapeSegment
>
CustomShapeProvider
::
createCustomShapeSegmentSequence
(
size_t
nElems
,
const
sal_uInt16
*
pValues
)
{
Sequence
<
EnhancedCustomShapeSegment
>
aSequence
(
(
nElems
+
1
)
/
2
);
for
(
size_t
i
=
0
,
j
=
0
;
i
<
nElems
/
2
;
i
++
)
{
aSequence
[
i
].
Command
=
pValues
[
j
++
];
aSequence
[
i
].
Count
=
pValues
[
j
++
];
}
}
Any
aAny
;
return
aSequence
;
aAny
<<=
aStringSequence
;
return
aAny
;
}
}
}
}
}
}
...
...
oox/source/helper/propertymap.cxx
Dosyayı görüntüle @
f5973365
...
@@ -574,18 +574,21 @@ static const char* lclDumpAnyValueCode( Any value, int level = 0)
...
@@ -574,18 +574,21 @@ static const char* lclDumpAnyValueCode( Any value, int level = 0)
}
}
return
"aAdjSequence"
;
return
"aAdjSequence"
;
}
else
if
(
value
>>=
segArray
)
{
}
else
if
(
value
>>=
segArray
)
{
if
(
segArray
.
getLength
()
==
0
)
return
"Sequence< EnhancedCustomShapeSegment >(0)"
;
printLevel
(
level
);
printLevel
(
level
);
fprintf
(
stderr
,
"Sequence< EnhancedCustomShapeSegment > aSegmentSeq (%"
SAL_PRIdINT32
");
\n
"
,
segArray
.
getLength
());
fprintf
(
stderr
,
"static const sal_uInt16 nValues[] = {
\n
"
);
for
(
int
i
=
0
;
i
<
segArray
.
getLength
();
i
++
)
{
printLevel
(
level
);
printLevel
(
level
);
fprintf
(
stderr
,
"// Command, Count
\n
"
);
fprintf
(
stderr
,
"{
\n
"
);
for
(
int
i
=
0
;
i
<
segArray
.
getLength
();
i
++
)
{
const
char
*
var
=
lclDumpAnyValueCode
(
makeAny
(
segArray
[
i
]),
level
+
1
);
printLevel
(
level
+
1
);
fprintf
(
stderr
,
"aSegmentSeq [%d] = %s;
\n
"
,
i
,
var
);
printLevel
(
level
);
printLevel
(
level
);
fprintf
(
stderr
,
"}
\n
"
);
fprintf
(
stderr
,
"
\t
%d,%d%s
\n
"
,
segArray
[
i
].
Command
,
segArray
[
i
].
Count
,
i
<
segArray
.
getLength
()
-
1
?
","
:
""
);
}
}
return
"aSegmentSeq"
;
printLevel
(
level
);
fprintf
(
stderr
,
"};
\n
"
);
return
"createCustomShapeSegmentSequence( SAL_N_ELEMENTS( nValues ), nValues )"
;
}
else
if
(
value
>>=
segTextFrame
)
{
}
else
if
(
value
>>=
segTextFrame
)
{
printLevel
(
level
);
printLevel
(
level
);
fprintf
(
stderr
,
"Sequence< EnhancedCustomShapeTextFrame > aTextFrameSeq (%"
SAL_PRIdINT32
");
\n
"
,
segTextFrame
.
getLength
());
fprintf
(
stderr
,
"Sequence< EnhancedCustomShapeTextFrame > aTextFrameSeq (%"
SAL_PRIdINT32
");
\n
"
,
segTextFrame
.
getLength
());
...
...
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