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
28f18b68
Kaydet (Commit)
28f18b68
authored
Eyl 29, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: replace alloca() with std::unique_ptr
Change-Id: I82b982895ee422bcf5a23756df4d81c89bc47636
üst
9555d03c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
14 deletions
+8
-14
fontconfig.cxx
vcl/generic/fontmanager/fontconfig.cxx
+2
-4
fontmanager.cxx
vcl/generic/fontmanager/fontmanager.cxx
+1
-3
PhysicalFontCollection.cxx
vcl/source/font/PhysicalFontCollection.cxx
+2
-3
jobdata.cxx
vcl/unx/generic/printer/jobdata.cxx
+3
-4
No files found.
vcl/generic/fontmanager/fontconfig.cxx
Dosyayı görüntüle @
28f18b68
...
@@ -53,8 +53,6 @@ using namespace psp;
...
@@ -53,8 +53,6 @@ using namespace psp;
#include "rtl/ustrbuf.hxx"
#include "rtl/ustrbuf.hxx"
#include "sal/alloca.h"
#include <utility>
#include <utility>
#include <algorithm>
#include <algorithm>
...
@@ -1086,7 +1084,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi
...
@@ -1086,7 +1084,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi
// update rMissingCodes by removing resolved unicodes
// update rMissingCodes by removing resolved unicodes
if
(
!
rMissingCodes
.
isEmpty
()
)
if
(
!
rMissingCodes
.
isEmpty
()
)
{
{
s
al_uInt32
*
pRemainingCodes
=
static_cast
<
sal_uInt32
*>
(
alloca
(
rMissingCodes
.
getLength
()
*
sizeof
(
sal_uInt32
)
)
);
s
td
::
unique_ptr
<
sal_uInt32
[]
>
const
pRemainingCodes
(
new
sal_uInt32
[
rMissingCodes
.
getLength
()]
);
int
nRemainingLen
=
0
;
int
nRemainingLen
=
0
;
FcCharSet
*
unicodes
;
FcCharSet
*
unicodes
;
if
(
!
FcPatternGetCharSet
(
pSet
->
fonts
[
0
],
FC_CHARSET
,
0
,
&
unicodes
))
if
(
!
FcPatternGetCharSet
(
pSet
->
fonts
[
0
],
FC_CHARSET
,
0
,
&
unicodes
))
...
@@ -1099,7 +1097,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi
...
@@ -1099,7 +1097,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi
pRemainingCodes
[
nRemainingLen
++
]
=
nCode
;
pRemainingCodes
[
nRemainingLen
++
]
=
nCode
;
}
}
}
}
OUString
sStillMissing
(
pRemainingCodes
,
nRemainingLen
);
OUString
sStillMissing
(
pRemainingCodes
.
get
()
,
nRemainingLen
);
#if defined(ENABLE_DBUS) && defined(ENABLE_PACKAGEKIT)
#if defined(ENABLE_DBUS) && defined(ENABLE_PACKAGEKIT)
if
(
get_xid_for_dbus
())
if
(
get_xid_for_dbus
())
{
{
...
...
vcl/generic/fontmanager/fontmanager.cxx
Dosyayı görüntüle @
28f18b68
...
@@ -59,8 +59,6 @@
...
@@ -59,8 +59,6 @@
#include <stdio.h>
#include <stdio.h>
#endif
#endif
#include "sal/alloca.h"
#include <algorithm>
#include <algorithm>
#include <set>
#include <set>
#include <unordered_set>
#include <unordered_set>
...
@@ -472,7 +470,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider,
...
@@ -472,7 +470,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider,
// first transform the character codes to unicode
// first transform the character codes to unicode
// note: this only works with single byte encodings
// note: this only works with single byte encodings
s
al_Unicode
*
pUnicodes
=
static_cast
<
sal_Unicode
*>
(
alloca
(
pInfo
->
numOfChars
*
sizeof
(
sal_Unicode
))
);
s
td
::
unique_ptr
<
sal_Unicode
[]
>
const
pUnicodes
(
new
sal_Unicode
[
pInfo
->
numOfChars
]
);
CharMetricInfo
*
pChar
=
pInfo
->
cmi
;
CharMetricInfo
*
pChar
=
pInfo
->
cmi
;
int
i
;
int
i
;
...
...
vcl/source/font/PhysicalFontCollection.cxx
Dosyayı görüntüle @
28f18b68
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
*/
*/
#include <sal/types.h>
#include <sal/types.h>
#include <sal/alloca.h>
#include <vector>
#include <vector>
...
@@ -244,7 +243,7 @@ PhysicalFontFamily* PhysicalFontCollection::GetGlyphFallbackFont( FontSelectPatt
...
@@ -244,7 +243,7 @@ PhysicalFontFamily* PhysicalFontCollection::GetGlyphFallbackFont( FontSelectPatt
// there is a matching fallback in the cache
// there is a matching fallback in the cache
// so update rMissingCodes with codepoints not yet resolved by this fallback
// so update rMissingCodes with codepoints not yet resolved by this fallback
int
nRemainingLength
=
0
;
int
nRemainingLength
=
0
;
s
al_UCS4
*
pRemainingCodes
=
static_cast
<
sal_UCS4
*>
(
alloca
(
rMissingCodes
.
getLength
()
*
sizeof
(
sal_UCS4
)
)
);
s
td
::
unique_ptr
<
sal_UCS4
[]
>
const
pRemainingCodes
(
new
sal_UCS4
[
rMissingCodes
.
getLength
()]
);
OUString
aFontName
;
OUString
aFontName
;
while
(
nStrIndex
<
rMissingCodes
.
getLength
()
)
while
(
nStrIndex
<
rMissingCodes
.
getLength
()
)
...
@@ -254,7 +253,7 @@ PhysicalFontFamily* PhysicalFontCollection::GetGlyphFallbackFont( FontSelectPatt
...
@@ -254,7 +253,7 @@ PhysicalFontFamily* PhysicalFontCollection::GetGlyphFallbackFont( FontSelectPatt
if
(
!
bCached
||
(
rFontSelData
.
maSearchName
!=
aFontName
)
)
if
(
!
bCached
||
(
rFontSelData
.
maSearchName
!=
aFontName
)
)
pRemainingCodes
[
nRemainingLength
++
]
=
cChar
;
pRemainingCodes
[
nRemainingLength
++
]
=
cChar
;
}
}
rMissingCodes
=
OUString
(
pRemainingCodes
,
nRemainingLength
);
rMissingCodes
=
OUString
(
pRemainingCodes
.
get
()
,
nRemainingLength
);
}
}
else
else
{
{
...
...
vcl/unx/generic/printer/jobdata.cxx
Dosyayı görüntüle @
28f18b68
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
#include "vcl/printerinfomanager.hxx"
#include "vcl/printerinfomanager.hxx"
#include "tools/stream.hxx"
#include "tools/stream.hxx"
#include <sal/alloca.h>
#include <rtl/strbuf.hxx>
#include <rtl/strbuf.hxx>
#include <memory>
#include <memory>
...
@@ -293,9 +292,9 @@ bool JobData::constructFromStreamBuffer( void* pData, int bytes, JobData& rJobDa
...
@@ -293,9 +292,9 @@ bool JobData::constructFromStreamBuffer( void* pData, int bytes, JobData& rJobDa
{
{
rJobData
.
m_aContext
.
setParser
(
rJobData
.
m_pParser
);
rJobData
.
m_aContext
.
setParser
(
rJobData
.
m_pParser
);
int
nBytes
=
bytes
-
aStream
.
Tell
();
int
nBytes
=
bytes
-
aStream
.
Tell
();
char
*
pRemain
=
static_cast
<
char
*>
(
alloca
(
bytes
-
aStream
.
Tell
()
)
);
std
::
unique_ptr
<
char
[]
>
pRemain
(
new
char
[
bytes
-
aStream
.
Tell
()]
);
aStream
.
Read
(
pRemain
,
nBytes
);
aStream
.
Read
(
pRemain
.
get
()
,
nBytes
);
rJobData
.
m_aContext
.
rebuildFromStreamBuffer
(
pRemain
,
nBytes
);
rJobData
.
m_aContext
.
rebuildFromStreamBuffer
(
pRemain
.
get
()
,
nBytes
);
bContext
=
true
;
bContext
=
true
;
}
}
}
}
...
...
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