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
df399523
Kaydet (Commit)
df399523
authored
Eki 14, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Reduce scope level & Annotate the code a bit.
Change-Id: I6ebf849243000920b1c1f7e67d2dc81fcee9e16b
üst
96554f05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
35 deletions
+43
-35
svdotext.cxx
svx/source/svdraw/svdotext.cxx
+43
-35
No files found.
svx/source/svdraw/svdotext.cxx
Dosyayı görüntüle @
df399523
...
@@ -548,51 +548,59 @@ bool SdrTextObj::NbcSetEckenradius(long nRad)
...
@@ -548,51 +548,59 @@ bool SdrTextObj::NbcSetEckenradius(long nRad)
// states of IsAutoGrowWidth/Height to correctly set TextMinFrameWidth/Height
// states of IsAutoGrowWidth/Height to correctly set TextMinFrameWidth/Height
void
SdrTextObj
::
AdaptTextMinSize
()
void
SdrTextObj
::
AdaptTextMinSize
()
{
{
if
(
bTextFrame
&&
(
!
pModel
||
!
pModel
->
IsPasteResize
()))
if
(
!
bTextFrame
)
{
// Only do this for text frame.
const
bool
bW
(
IsAutoGrowWidth
());
return
;
const
bool
bH
(
IsAutoGrowHeight
());
if
(
bW
||
bH
)
if
(
pModel
&&
pModel
->
IsPasteResize
())
{
// Don't do this during paste resize.
SfxItemSet
aSet
(
return
;
*
GetObjectItemSet
().
GetPool
(),
SDRATTR_TEXT_MINFRAMEHEIGHT
,
SDRATTR_TEXT_AUTOGROWHEIGHT
,
SDRATTR_TEXT_MINFRAMEWIDTH
,
SDRATTR_TEXT_AUTOGROWWIDTH
,
// contains SDRATTR_TEXT_MAXFRAMEWIDTH
0
,
0
);
if
(
bW
)
const
bool
bW
=
IsAutoGrowWidth
();
{
const
bool
bH
=
IsAutoGrowHeight
();
const
long
nDist
(
GetTextLeftDistance
()
+
GetTextRightDistance
());
const
long
nW
(
std
::
max
(
long
(
0
),
(
long
)(
aRect
.
GetWidth
()
-
1
-
nDist
)));
aSet
.
Put
(
makeSdrTextMinFrameWidthItem
(
nW
));
if
(
!
bW
&&
!
bH
)
// No auto grow requested. Bail out.
return
;
if
(
!
IsVerticalWriting
()
&&
bDisableAutoWidthOnDragging
)
SfxItemSet
aSet
(
{
*
GetObjectItemSet
().
GetPool
(),
bDisableAutoWidthOnDragging
=
true
;
SDRATTR_TEXT_MINFRAMEHEIGHT
,
SDRATTR_TEXT_AUTOGROWHEIGHT
,
aSet
.
Put
(
makeSdrTextAutoGrowWidthItem
(
false
));
SDRATTR_TEXT_MINFRAMEWIDTH
,
SDRATTR_TEXT_AUTOGROWWIDTH
,
// contains SDRATTR_TEXT_MAXFRAMEWIDTH
}
0
,
0
);
}
if
(
bH
)
if
(
bW
)
{
{
const
long
nDist
(
GetTextUpperDistance
()
+
GetTextLowerDistance
());
// Set minimum width.
const
long
nH
(
std
::
max
(
long
(
0
),
(
long
)(
aRect
.
GetHeight
()
-
1
-
nDist
)));
const
long
nDist
=
GetTextLeftDistance
()
+
GetTextRightDistance
();
const
long
nW
=
std
::
max
<
long
>
(
0
,
aRect
.
GetWidth
()
-
1
-
nDist
);
// text width without margins
aSet
.
Put
(
makeSdrTextMinFrameHeightItem
(
nH
));
aSet
.
Put
(
makeSdrTextMinFrameWidthItem
(
nW
));
if
(
IsVerticalWriting
()
&&
bDisableAutoWidthOnDragging
)
if
(
!
IsVerticalWriting
()
&&
bDisableAutoWidthOnDragging
)
{
{
bDisableAutoWidthOnDragging
=
fals
e
;
bDisableAutoWidthOnDragging
=
tru
e
;
aSet
.
Put
(
makeSdrTextAutoGrowHeight
Item
(
false
));
aSet
.
Put
(
makeSdrTextAutoGrowWidth
Item
(
false
));
}
}
}
}
SetObjectItemSet
(
aSet
);
if
(
bH
)
NbcAdjustTextFrameWidthAndHeight
();
{
// Set Minimum height.
const
long
nDist
=
GetTextUpperDistance
()
+
GetTextLowerDistance
();
const
long
nH
=
std
::
max
<
long
>
(
0
,
aRect
.
GetHeight
()
-
1
-
nDist
);
// text height without margins
aSet
.
Put
(
makeSdrTextMinFrameHeightItem
(
nH
));
if
(
IsVerticalWriting
()
&&
bDisableAutoWidthOnDragging
)
{
bDisableAutoWidthOnDragging
=
false
;
aSet
.
Put
(
makeSdrTextAutoGrowHeightItem
(
false
));
}
}
}
}
SetObjectItemSet
(
aSet
);
NbcAdjustTextFrameWidthAndHeight
();
}
}
void
SdrTextObj
::
ImpSetContourPolygon
(
SdrOutliner
&
rOutliner
,
Rectangle
&
rAnchorRect
,
bool
bLineWidth
)
const
void
SdrTextObj
::
ImpSetContourPolygon
(
SdrOutliner
&
rOutliner
,
Rectangle
&
rAnchorRect
,
bool
bLineWidth
)
const
...
...
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