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
3f390be5
Kaydet (Commit)
3f390be5
authored
Ock 17, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sal_Bool to bool.
Change-Id: I6ad0385041618ebff879ec8533c13ef0ddbe239c
üst
a6b459c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
34 deletions
+33
-34
embedhlp.hxx
svtools/inc/svtools/embedhlp.hxx
+6
-6
embedhlp.cxx
svtools/source/misc/embedhlp.cxx
+27
-28
No files found.
svtools/inc/svtools/embedhlp.hxx
Dosyayı görüntüle @
3f390be5
...
...
@@ -47,15 +47,15 @@ class SVT_DLLPUBLIC EmbeddedObjectRef
{
EmbeddedObjectRef_Impl
*
mpImpl
;
SVT_DLLPRIVATE
SvStream
*
GetGraphicStream
(
sal_B
ool
bUpdate
)
const
;
SVT_DLLPRIVATE
void
GetReplacement
(
sal_B
ool
bUpdate
);
SVT_DLLPRIVATE
SvStream
*
GetGraphicStream
(
b
ool
bUpdate
)
const
;
SVT_DLLPRIVATE
void
GetReplacement
(
b
ool
bUpdate
);
EmbeddedObjectRef
&
operator
=
(
const
EmbeddedObjectRef
&
);
public
:
static
void
DrawPaintReplacement
(
const
Rectangle
&
rRect
,
const
OUString
&
rText
,
OutputDevice
*
pOut
);
static
void
DrawShading
(
const
Rectangle
&
rRect
,
OutputDevice
*
pOut
);
static
sal_B
ool
TryRunningState
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
embed
::
XEmbeddedObject
>&
);
static
b
ool
TryRunningState
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
embed
::
XEmbeddedObject
>&
);
static
void
SetGraphicToContainer
(
const
Graphic
&
rGraphic
,
comphelper
::
EmbeddedObjectContainer
&
aContainer
,
const
::
rtl
::
OUString
&
aName
,
...
...
@@ -101,12 +101,12 @@ public:
void
UpdateReplacement
();
void
UpdateReplacementOnDemand
();
void
Lock
(
sal_Bool
bLock
=
sal_True
);
sal_Bool
IsLocked
()
const
;
void
Lock
(
bool
bLock
=
true
);
void
Clear
();
bool
is
()
const
;
sal_Bool
IsChart
()
const
;
bool
IsLocked
()
const
;
bool
IsChart
()
const
;
// #i104867#
// Provides a graphic version number for the fetchable Graphic during this object's lifetime. Internally,
...
...
svtools/source/misc/embedhlp.cxx
Dosyayı görüntüle @
3f390be5
...
...
@@ -48,8 +48,7 @@
using
namespace
com
::
sun
::
star
;
namespace
svt
{
namespace
svt
{
class
EmbedEventListener_Impl
:
public
::
cppu
::
WeakImplHelper4
<
embed
::
XStateChangeListener
,
document
::
XEventListener
,
...
...
@@ -339,7 +338,7 @@ void EmbeddedObjectRef::Clear()
try
{
mpImpl
->
mxObj
->
changeState
(
embed
::
EmbedStates
::
LOADED
);
xClose
->
close
(
sal_T
rue
);
xClose
->
close
(
t
rue
);
}
catch
(
const
util
::
CloseVetoException
&
)
{
...
...
@@ -360,12 +359,12 @@ void EmbeddedObjectRef::Clear()
}
mpImpl
->
mxObj
=
NULL
;
mpImpl
->
bNeedUpdate
=
sal_F
alse
;
mpImpl
->
bNeedUpdate
=
f
alse
;
}
mpImpl
->
pContainer
=
0
;
mpImpl
->
bIsLocked
=
sal_F
alse
;
mpImpl
->
bNeedUpdate
=
sal_F
alse
;
mpImpl
->
bIsLocked
=
f
alse
;
mpImpl
->
bNeedUpdate
=
f
alse
;
}
bool
EmbeddedObjectRef
::
is
()
const
...
...
@@ -397,17 +396,17 @@ void EmbeddedObjectRef::SetViewAspect( sal_Int64 nAspect )
mpImpl
->
nViewAspect
=
nAspect
;
}
void
EmbeddedObjectRef
::
Lock
(
sal_B
ool
bLock
)
void
EmbeddedObjectRef
::
Lock
(
b
ool
bLock
)
{
mpImpl
->
bIsLocked
=
bLock
;
}
sal_B
ool
EmbeddedObjectRef
::
IsLocked
()
const
b
ool
EmbeddedObjectRef
::
IsLocked
()
const
{
return
mpImpl
->
bIsLocked
;
}
void
EmbeddedObjectRef
::
GetReplacement
(
sal_B
ool
bUpdate
)
void
EmbeddedObjectRef
::
GetReplacement
(
b
ool
bUpdate
)
{
if
(
bUpdate
)
{
...
...
@@ -442,9 +441,9 @@ Graphic* EmbeddedObjectRef::GetGraphic( ::rtl::OUString* pMediaType ) const
{
if
(
mpImpl
->
bNeedUpdate
)
// bNeedUpdate will be set to false while retrieving new replacement
const_cast
<
EmbeddedObjectRef
*
>
(
this
)
->
GetReplacement
(
sal_T
rue
);
const_cast
<
EmbeddedObjectRef
*
>
(
this
)
->
GetReplacement
(
t
rue
);
else
if
(
!
mpImpl
->
pGraphic
)
const_cast
<
EmbeddedObjectRef
*
>
(
this
)
->
GetReplacement
(
sal_F
alse
);
const_cast
<
EmbeddedObjectRef
*
>
(
this
)
->
GetReplacement
(
f
alse
);
if
(
mpImpl
->
pGraphic
&&
pMediaType
)
*
pMediaType
=
mpImpl
->
aMediaType
;
...
...
@@ -538,7 +537,7 @@ void EmbeddedObjectRef::SetGraphicStream( const uno::Reference< io::XInputStream
delete
pGraphicStream
;
}
mpImpl
->
bNeedUpdate
=
sal_F
alse
;
mpImpl
->
bNeedUpdate
=
f
alse
;
}
...
...
@@ -553,10 +552,10 @@ void EmbeddedObjectRef::SetGraphic( const Graphic& rGraphic, const ::rtl::OUStri
if
(
mpImpl
->
pContainer
)
SetGraphicToContainer
(
rGraphic
,
*
mpImpl
->
pContainer
,
mpImpl
->
aPersistName
,
rMediaType
);
mpImpl
->
bNeedUpdate
=
sal_F
alse
;
mpImpl
->
bNeedUpdate
=
f
alse
;
}
SvStream
*
EmbeddedObjectRef
::
GetGraphicStream
(
sal_B
ool
bUpdate
)
const
SvStream
*
EmbeddedObjectRef
::
GetGraphicStream
(
b
ool
bUpdate
)
const
{
RTL_LOGFILE_CONTEXT
(
aLog
,
"svtools (mv76033) svt::EmbeddedObjectRef::GetGraphicStream"
);
DBG_ASSERT
(
bUpdate
||
mpImpl
->
pContainer
,
"Can't retrieve current graphic!"
);
...
...
@@ -605,7 +604,7 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( sal_Bool bUpdate ) const
SvStream
*
pResult
=
::
utl
::
UcbStreamHelper
::
CreateStream
(
xStream
);
if
(
pResult
&&
bUpdate
)
mpImpl
->
bNeedUpdate
=
sal_F
alse
;
mpImpl
->
bNeedUpdate
=
f
alse
;
return
pResult
;
}
...
...
@@ -619,7 +618,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt
MapMode
aMM
(
MAP_APPFONT
);
Size
aAppFontSz
=
pOut
->
LogicToLogic
(
Size
(
0
,
8
),
&
aMM
,
NULL
);
Font
aFnt
(
rtl
::
OUString
(
"Helvetica"
),
aAppFontSz
);
aFnt
.
SetTransparent
(
sal_T
rue
);
aFnt
.
SetTransparent
(
t
rue
);
aFnt
.
SetColor
(
Color
(
COL_LIGHTRED
)
);
aFnt
.
SetWeight
(
WEIGHT_BOLD
);
aFnt
.
SetFamily
(
FAMILY_SWISS
);
...
...
@@ -636,9 +635,9 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt
aPt
.
X
()
=
(
rRect
.
GetWidth
()
-
pOut
->
GetTextWidth
(
rText
))
/
2
;
aPt
.
Y
()
=
(
rRect
.
GetHeight
()
-
pOut
->
GetTextHeight
())
/
2
;
sal_Bool
bTiny
=
sal_F
alse
;
if
(
aPt
.
X
()
<
0
)
bTiny
=
sal_T
rue
,
aPt
.
X
()
=
0
;
if
(
aPt
.
Y
()
<
0
)
bTiny
=
sal_T
rue
,
aPt
.
Y
()
=
0
;
bool
bTiny
=
f
alse
;
if
(
aPt
.
X
()
<
0
)
bTiny
=
t
rue
,
aPt
.
X
()
=
0
;
if
(
aPt
.
Y
()
<
0
)
bTiny
=
t
rue
,
aPt
.
Y
()
=
0
;
if
(
bTiny
)
{
// heruntergehen bei kleinen Bildern
...
...
@@ -720,10 +719,10 @@ void EmbeddedObjectRef::DrawShading( const Rectangle &rRect, OutputDevice *pOut
}
sal_B
ool
EmbeddedObjectRef
::
TryRunningState
(
const
uno
::
Reference
<
embed
::
XEmbeddedObject
>&
xEmbObj
)
b
ool
EmbeddedObjectRef
::
TryRunningState
(
const
uno
::
Reference
<
embed
::
XEmbeddedObject
>&
xEmbObj
)
{
if
(
!
xEmbObj
.
is
()
)
return
sal_F
alse
;
return
f
alse
;
try
{
...
...
@@ -732,10 +731,10 @@ sal_Bool EmbeddedObjectRef::TryRunningState( const uno::Reference < embed::XEmbe
}
catch
(
const
uno
::
Exception
&
)
{
return
sal_F
alse
;
return
f
alse
;
}
return
sal_T
rue
;
return
t
rue
;
}
void
EmbeddedObjectRef
::
SetGraphicToContainer
(
const
Graphic
&
rGraphic
,
...
...
@@ -767,13 +766,13 @@ uno::Reference< io::XInputStream > EmbeddedObjectRef::GetGraphicReplacementStrea
void
EmbeddedObjectRef
::
UpdateReplacement
()
{
GetReplacement
(
sal_T
rue
);
GetReplacement
(
t
rue
);
}
void
EmbeddedObjectRef
::
UpdateReplacementOnDemand
()
{
DELETEZ
(
mpImpl
->
pGraphic
);
mpImpl
->
bNeedUpdate
=
sal_T
rue
;
mpImpl
->
bNeedUpdate
=
t
rue
;
mpImpl
->
mnGraphicVersion
++
;
if
(
mpImpl
->
pContainer
)
...
...
@@ -783,7 +782,7 @@ void EmbeddedObjectRef::UpdateReplacementOnDemand()
}
}
sal_B
ool
EmbeddedObjectRef
::
IsChart
()
const
b
ool
EmbeddedObjectRef
::
IsChart
()
const
{
//todo maybe for 3.0:
//if the changes work good for chart
...
...
@@ -802,10 +801,10 @@ sal_Bool EmbeddedObjectRef::IsChart() const
||
SvGlobalName
(
SO3_SCH_CLASSID_50
)
==
aObjClsId
||
SvGlobalName
(
SO3_SCH_CLASSID_60
)
==
aObjClsId
)
{
return
sal_T
rue
;
return
t
rue
;
}
return
sal_F
alse
;
return
f
alse
;
}
// #i104867#
...
...
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