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
7770eb9b
Kaydet (Commit)
7770eb9b
authored
Eki 05, 2013
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
String to OUString + better names
Change-Id: I811789b9fec38d7745ffffbcb57659aa5e3dc59f
üst
f37bb5d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
ndgrf.hxx
sw/inc/ndgrf.hxx
+1
-1
ndgrf.cxx
sw/source/core/graphic/ndgrf.cxx
+12
-13
No files found.
sw/inc/ndgrf.hxx
Dosyayı görüntüle @
7770eb9b
...
...
@@ -104,7 +104,7 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
*/
SvStream
*
_GetStreamForEmbedGrf
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
embed
::
XStorage
>&
_refPics
,
const
String
&
rStr
mName
)
const
;
const
OUString
&
rStrea
mName
)
const
;
/** helper method to get a substorage of the document storage for readonly access.
...
...
sw/source/core/graphic/ndgrf.cxx
Dosyayı görüntüle @
7770eb9b
...
...
@@ -870,37 +870,36 @@ uno::Reference< embed::XStorage > SwGrfNode::_GetDocSubstorageOrRoot( const Stri
*/
SvStream
*
SwGrfNode
::
_GetStreamForEmbedGrf
(
const
uno
::
Reference
<
embed
::
XStorage
>&
_refPics
,
const
String
&
rStr
mName
)
const
const
OUString
&
rStrea
mName
)
const
{
SvStream
*
pStrm
(
0L
);
if
(
_refPics
.
is
()
&&
rStrmName
.
Len
()
)
if
(
_refPics
.
is
()
&&
!
rStreamName
.
isEmpty
()
)
{
String
_aStrmName
(
rStr
mName
);
OUString
sStreamName
(
rStrea
mName
);
// If stream doesn't exist in the storage, try access the graphic file by
// re-generating its name.
// A save action can have changed the filename of the embedded graphic,
// because a changed unique ID of the graphic is calculated.
// --> recursive calls of <GetUniqueID()> have to be avoided.
// Thus, use local static boolean to assure this.
if
(
!
_refPics
->
hasByName
(
_aStr
mName
)
||
!
_refPics
->
isStreamElement
(
_aStr
mName
)
)
if
(
!
_refPics
->
hasByName
(
sStrea
mName
)
||
!
_refPics
->
isStreamElement
(
sStrea
mName
)
)
{
xub_StrLen
nExtPos
=
_aStrmName
.
Search
(
'.'
);
String
aExtStr
=
_aStrmName
.
Copy
(
nExtPos
);
if
(
GetGrfObj
().
GetType
()
!=
GRAPHIC_NONE
)
{
_aStrmName
=
OStringToOUString
(
GetGrfObj
().
GetUniqueID
(),
RTL_TEXTENCODING_ASCII_US
);
_aStrmName
+=
aExtStr
;
const
sal_Int32
nExtPos
=
sStreamName
.
indexOf
(
'.'
);
const
OUString
aExtStr
=
(
nExtPos
>=
0
)
?
sStreamName
.
copy
(
nExtPos
)
:
OUString
();
sStreamName
=
OStringToOUString
(
GetGrfObj
().
GetUniqueID
(),
RTL_TEXTENCODING_ASCII_US
)
+
aExtStr
;
}
}
// assure that graphic file exist in the storage.
if
(
_refPics
->
hasByName
(
_aStr
mName
)
&&
_refPics
->
isStreamElement
(
_aStr
mName
)
)
if
(
_refPics
->
hasByName
(
sStrea
mName
)
&&
_refPics
->
isStreamElement
(
sStrea
mName
)
)
{
uno
::
Reference
<
io
::
XStream
>
refStrm
=
_refPics
->
openStreamElement
(
_aStr
mName
,
embed
::
ElementModes
::
READ
);
uno
::
Reference
<
io
::
XStream
>
refStrm
=
_refPics
->
openStreamElement
(
sStrea
mName
,
embed
::
ElementModes
::
READ
);
pStrm
=
utl
::
UcbStreamHelper
::
CreateStream
(
refStrm
);
}
else
...
...
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