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
9e68beb8
Kaydet (Commit)
9e68beb8
authored
Kas 07, 2014
tarafından
Zolnai Tamás
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More replacements of manual swapping with SwGrfNode::GetGrf()/GetGrfObj()
Change-Id: Ie56584c03af8a6d3ea8f8d4294f5492a841933b7
üst
5e52aa12
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
54 deletions
+20
-54
ndgrf.hxx
sw/inc/ndgrf.hxx
+2
-2
notxtfrm.cxx
sw/source/core/doc/notxtfrm.cxx
+8
-10
ndnotxt.cxx
sw/source/core/docnode/ndnotxt.cxx
+1
-2
editsh.cxx
sw/source/core/edit/editsh.cxx
+2
-31
fefly1.cxx
sw/source/core/frmedt/fefly1.cxx
+1
-2
ndgrf.cxx
sw/source/core/graphic/ndgrf.cxx
+5
-5
unins.cxx
sw/source/core/undo/unins.cxx
+1
-2
No files found.
sw/inc/ndgrf.hxx
Dosyayı görüntüle @
9e68beb8
...
...
@@ -123,8 +123,8 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
public
:
virtual
~
SwGrfNode
();
const
Graphic
&
GetGrf
()
const
;
const
GraphicObject
&
GetGrfObj
()
const
;
const
Graphic
&
GetGrf
(
bool
bWait
=
false
)
const
;
const
GraphicObject
&
GetGrfObj
(
bool
bWait
=
false
)
const
;
const
GraphicObject
*
GetReplacementGrfObj
()
const
;
virtual
SwCntntNode
*
SplitCntntNode
(
const
SwPosition
&
)
SAL_OVERRIDE
;
...
...
sw/source/core/doc/notxtfrm.cxx
Dosyayı görüntüle @
9e68beb8
...
...
@@ -879,7 +879,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
}
bool
bContinue
=
true
;
const
GraphicObject
&
rGrfObj
=
pGrfNd
->
GetGrfObj
();
const
GraphicObject
&
rGrfObj
=
pGrfNd
->
GetGrfObj
(
bPrn
);
GraphicAttr
aGrfAttr
;
pGrfNd
->
GetGraphicAttr
(
aGrfAttr
,
this
);
...
...
@@ -917,8 +917,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
if
(
bContinue
)
{
const
bool
bSwappedIn
=
pGrfNd
->
SwapIn
(
bPrn
);
if
(
bSwappedIn
&&
rGrfObj
.
GetGraphic
().
IsSupportedGraphic
())
if
(
rGrfObj
.
GetGraphic
().
IsSupportedGraphic
())
{
const
bool
bAnimate
=
rGrfObj
.
IsAnimated
()
&&
!
pShell
->
IsPreview
()
&&
...
...
@@ -955,13 +954,12 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
else
{
sal_uInt16
nResId
=
0
;
if
(
bSwappedIn
)
{
if
(
GRAPHIC_NONE
==
rGrfObj
.
GetType
()
)
nResId
=
STR_COMCORE_READERROR
;
else
if
(
!
rGrfObj
.
GetGraphic
().
IsSupportedGraphic
()
)
nResId
=
STR_COMCORE_CANT_SHOW
;
}
if
(
GRAPHIC_NONE
==
rGrfObj
.
GetType
()
)
nResId
=
STR_COMCORE_READERROR
;
else
if
(
!
rGrfObj
.
GetGraphic
().
IsSupportedGraphic
()
)
nResId
=
STR_COMCORE_CANT_SHOW
;
((
SwNoTxtFrm
*
)
this
)
->
nWeight
=
-
1
;
OUString
aText
;
if
(
!
nResId
&&
...
...
sw/source/core/docnode/ndnotxt.cxx
Dosyayı görüntüle @
9e68beb8
...
...
@@ -251,8 +251,7 @@ Graphic SwNoTxtNode::GetGraphic() const
Graphic
aRet
;
if
(
GetGrfNode
()
)
{
((
SwGrfNode
*
)
this
)
->
SwapIn
(
true
);
aRet
=
((
SwGrfNode
*
)
this
)
->
GetGrf
();
aRet
=
((
SwGrfNode
*
)
this
)
->
GetGrf
(
true
);
}
else
{
...
...
sw/source/core/edit/editsh.cxx
Dosyayı görüntüle @
9e68beb8
...
...
@@ -238,28 +238,7 @@ const Graphic* SwEditShell::GetGraphic( bool bWait ) const
const
Graphic
*
pGrf
(
0L
);
if
(
pGrfNode
)
{
pGrf
=
&
(
pGrfNode
->
GetGrf
());
// --> #i73788#
// no load of linked graphic, if its not needed now (bWait = sal_False).
if
(
bWait
)
{
if
(
pGrf
->
IsSwapOut
()
||
(
pGrfNode
->
IsLinkedFile
()
&&
GRAPHIC_DEFAULT
==
pGrf
->
GetType
()
)
)
{
bool
const
bResult
=
pGrfNode
->
SwapIn
(
bWait
);
OSL_ENSURE
(
bResult
||
!
bWait
,
"Graphic could not be loaded"
);
(
void
)
bResult
;
// unused in non-debug
}
}
else
{
if
(
pGrf
->
IsSwapOut
()
&&
!
pGrfNode
->
IsLinkedFile
()
)
{
bool
const
bResult
=
pGrfNode
->
SwapIn
(
bWait
);
OSL_ENSURE
(
bResult
||
!
bWait
,
"Graphic could not be loaded"
);
(
void
)
bResult
;
// unused in non-debug
}
}
pGrf
=
&
(
pGrfNode
->
GetGrf
(
bWait
&&
GRAPHIC_DEFAULT
==
pGrfNode
->
GetGrf
().
GetType
()));
}
return
pGrf
;
}
...
...
@@ -611,15 +590,7 @@ Graphic SwEditShell::GetIMapGraphic() const
if
(
rNd
.
IsGrfNode
()
)
{
SwGrfNode
&
rGrfNode
(
static_cast
<
SwGrfNode
&>
(
rNd
));
const
Graphic
&
rGrf
=
rGrfNode
.
GetGrf
();
if
(
rGrf
.
IsSwapOut
()
||
(
rGrfNode
.
IsLinkedFile
()
&&
GRAPHIC_DEFAULT
==
rGrf
.
GetType
()
)
)
{
bool
const
bResult
=
rGrfNode
.
SwapIn
(
true
);
OSL_ENSURE
(
bResult
,
"Graphic could not be loaded"
);
(
void
)
bResult
;
// unused in non-debug
}
aRet
=
rGrf
;
aRet
=
rGrfNode
.
GetGrf
(
GRAPHIC_DEFAULT
==
rGrfNode
.
GetGrf
().
GetType
());
}
else
if
(
rNd
.
IsOLENode
()
)
{
...
...
sw/source/core/frmedt/fefly1.cxx
Dosyayı görüntüle @
9e68beb8
...
...
@@ -1557,8 +1557,7 @@ const Graphic *SwFEShell::GetGrfAtPos( const Point &rPt,
pNd
->
GetFileFilterNms
(
&
rName
,
0
);
if
(
rName
.
isEmpty
()
)
rName
=
pFly
->
GetFmt
()
->
GetName
();
pNd
->
SwapIn
(
true
);
return
&
pNd
->
GetGrf
();
return
&
pNd
->
GetGrf
(
true
);
}
}
}
...
...
sw/source/core/graphic/ndgrf.cxx
Dosyayı görüntüle @
9e68beb8
...
...
@@ -396,15 +396,15 @@ void SwGrfNode::SetGraphic(const Graphic& rGraphic, const OUString& rLink)
onGraphicChanged
();
}
const
Graphic
&
SwGrfNode
::
GetGrf
()
const
const
Graphic
&
SwGrfNode
::
GetGrf
(
bool
bWait
)
const
{
const_cast
<
SwGrfNode
*>
(
this
)
->
SwapIn
();
const_cast
<
SwGrfNode
*>
(
this
)
->
SwapIn
(
bWait
);
return
maGrfObj
.
GetGraphic
();
}
const
GraphicObject
&
SwGrfNode
::
GetGrfObj
()
const
const
GraphicObject
&
SwGrfNode
::
GetGrfObj
(
bool
bWait
)
const
{
const_cast
<
SwGrfNode
*>
(
this
)
->
SwapIn
();
const_cast
<
SwGrfNode
*>
(
this
)
->
SwapIn
(
bWait
);
return
maGrfObj
;
}
...
...
@@ -461,7 +461,7 @@ Size SwGrfNode::GetTwipSize() const
{
if
(
!
nGrfSize
.
Width
()
&&
!
nGrfSize
.
Height
()
)
{
const_cast
<
SwGrfNode
*>
(
this
)
->
SwapIn
(
true
);
const_cast
<
SwGrfNode
*>
(
this
)
->
SwapIn
();
}
return
nGrfSize
;
}
...
...
sw/source/core/undo/unins.cxx
Dosyayı görüntüle @
9e68beb8
...
...
@@ -851,8 +851,7 @@ void SwUndoReRead::SaveGraphicData( const SwGrfNode& rGrfNd )
}
else
{
((
SwGrfNode
&
)
rGrfNd
).
SwapIn
(
true
);
pGrf
=
new
Graphic
(
rGrfNd
.
GetGrf
()
);
pGrf
=
new
Graphic
(
rGrfNd
.
GetGrf
(
true
)
);
pNm
=
pFltr
=
0
;
}
nMirr
=
rGrfNd
.
GetSwAttrSet
().
GetMirrorGrf
().
GetValue
();
...
...
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