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
16fe20b6
Kaydet (Commit)
16fe20b6
authored
Tem 16, 2013
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
widget layout: Take decimal digits into account for MetricBoxes.
Change-Id: I2870dbf9dc1f7fb84adfe81b9be8f4060677e6d0
üst
7e71abad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
sidebarpossize.ui
svx/uiconfig/ui/sidebarpossize.ui
+1
-1
builder.cxx
vcl/source/window/builder.cxx
+20
-0
No files found.
svx/uiconfig/ui/sidebarpossize.ui
Dosyayı görüntüle @
16fe20b6
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
6
</property>
<property
name=
"spacing"
>
6
</property>
<child>
<child>
<object
class=
"GtkComboBox"
id=
"rotation:0degrees"
>
<object
class=
"GtkComboBox"
id=
"rotation:0
.00
degrees"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"has_tooltip"
>
True
</property>
<property
name=
"has_tooltip"
>
True
</property>
...
...
vcl/source/window/builder.cxx
Dosyayı görüntüle @
16fe20b6
...
@@ -754,6 +754,25 @@ namespace
...
@@ -754,6 +754,25 @@ namespace
return
sUnit
;
return
sUnit
;
}
}
int
extractDecimalDigits
(
const
OString
&
sPattern
)
{
int
nDigits
=
0
;
bool
bAfterPoint
=
false
;
for
(
sal_Int32
i
=
0
;
i
<
sPattern
.
getLength
();
++
i
)
{
if
(
sPattern
[
i
]
==
'.'
||
sPattern
[
i
]
==
','
)
bAfterPoint
=
true
;
else
if
(
sPattern
[
i
]
==
'0'
)
{
if
(
bAfterPoint
)
++
nDigits
;
}
else
break
;
}
return
nDigits
;
}
FieldUnit
detectMetricUnit
(
OString
sUnit
)
FieldUnit
detectMetricUnit
(
OString
sUnit
)
{
{
FieldUnit
eUnit
=
FUNIT_NONE
;
FieldUnit
eUnit
=
FUNIT_NONE
;
...
@@ -1199,6 +1218,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
...
@@ -1199,6 +1218,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
MetricBox
*
pBox
=
new
MetricBox
(
pParent
,
nBits
);
MetricBox
*
pBox
=
new
MetricBox
(
pParent
,
nBits
);
pBox
->
EnableAutoSize
(
true
);
pBox
->
EnableAutoSize
(
true
);
pBox
->
SetUnit
(
eUnit
);
pBox
->
SetUnit
(
eUnit
);
pBox
->
SetDecimalDigits
(
extractDecimalDigits
(
sPattern
));
if
(
eUnit
==
FUNIT_CUSTOM
)
if
(
eUnit
==
FUNIT_CUSTOM
)
pBox
->
SetCustomUnitText
(
OStringToOUString
(
sUnit
,
RTL_TEXTENCODING_UTF8
));
pBox
->
SetCustomUnitText
(
OStringToOUString
(
sUnit
,
RTL_TEXTENCODING_UTF8
));
pWindow
=
pBox
;
pWindow
=
pBox
;
...
...
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