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
55619c10
Kaydet (Commit)
55619c10
authored
Eki 26, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
set width in chars for url field to avoid character dialog overgrowing
Change-Id: I892a77f65ad420d0fbf4b95179e4bcfc2ec55192
üst
aed68136
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
20 deletions
+37
-20
actctrl.cxx
sw/source/ui/cctrl/actctrl.cxx
+1
-1
charurlpage.ui
sw/uiconfig/swriter/ui/charurlpage.ui
+3
-0
edit.hxx
vcl/inc/vcl/edit.hxx
+3
-3
combobox.cxx
vcl/source/control/combobox.cxx
+3
-3
edit.cxx
vcl/source/control/edit.cxx
+27
-13
No files found.
sw/source/ui/cctrl/actctrl.cxx
Dosyayı görüntüle @
55619c10
...
...
@@ -129,7 +129,7 @@ void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
extern
"C"
SAL_DLLPUBLIC_EXPORT
Window
*
SAL_CALL
makeTableNameEdit
(
Window
*
pParent
,
VclBuilder
::
stringmap
&
)
{
TableNameEdit
*
pTableNameEdit
=
new
TableNameEdit
(
pParent
);
pTableNameEdit
->
Set
Min
WidthInChars
(
25
);
pTableNameEdit
->
SetWidthInChars
(
25
);
return
pTableNameEdit
;
}
...
...
sw/uiconfig/swriter/ui/charurlpage.ui
Dosyayı görüntüle @
55619c10
...
...
@@ -101,6 +101,7 @@
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"width_chars"
>
32
</property>
<property
name=
"invisible_char_set"
>
True
</property>
</object>
<packing>
...
...
@@ -115,6 +116,7 @@
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"width_chars"
>
32
</property>
<property
name=
"invisible_char_set"
>
True
</property>
</object>
<packing>
...
...
@@ -129,6 +131,7 @@
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"width_chars"
>
32
</property>
<property
name=
"invisible_char_set"
>
True
</property>
</object>
<packing>
...
...
vcl/inc/vcl/edit.hxx
Dosyayı görüntüle @
55619c10
...
...
@@ -78,7 +78,7 @@ private:
Selection
maSelection
;
sal_uInt16
mnAlign
;
xub_StrLen
mnMaxTextLen
;
sal_Int32
mn
Min
WidthInChars
;
sal_Int32
mnWidthInChars
;
AutocompleteAction
meAutocompleteAction
;
sal_Unicode
mcEchoChar
;
sal_Bool
mbModified
:
1
,
...
...
@@ -199,8 +199,8 @@ public:
virtual
void
SetMaxTextLen
(
xub_StrLen
nMaxLen
=
EDIT_NOLIMIT
);
virtual
xub_StrLen
GetMaxTextLen
()
const
{
return
mnMaxTextLen
;
}
void
Set
MinWidthInChars
(
sal_Int32
nMi
nWidthInChars
);
sal_Int32
Get
MinWidthInChars
()
const
{
return
mnMi
nWidthInChars
;
}
void
Set
WidthInChars
(
sal_Int32
nWidthInChars
);
sal_Int32
Get
WidthInChars
()
const
{
return
m
nWidthInChars
;
}
virtual
void
SetSelection
(
const
Selection
&
rSelection
);
virtual
const
Selection
&
GetSelection
()
const
;
...
...
vcl/source/control/combobox.cxx
Dosyayı görüntüle @
55619c10
...
...
@@ -61,7 +61,7 @@ ComboBox::ComboBox( WindowType nType ) :
Edit
(
nType
)
{
ImplInitComboBoxData
();
Set
MinWidthInChars
(
0
);
Set
WidthInChars
(
-
1
);
}
// -----------------------------------------------------------------------
...
...
@@ -71,7 +71,7 @@ ComboBox::ComboBox( Window* pParent, WinBits nStyle ) :
{
ImplInitComboBoxData
();
ImplInit
(
pParent
,
nStyle
);
Set
MinWidthInChars
(
0
);
Set
WidthInChars
(
-
1
);
}
// -----------------------------------------------------------------------
...
...
@@ -85,7 +85,7 @@ ComboBox::ComboBox( Window* pParent, const ResId& rResId ) :
ImplInit
(
pParent
,
nStyle
);
ImplLoadRes
(
rResId
);
Set
MinWidthInChars
(
0
);
Set
WidthInChars
(
-
1
);
if
(
!
(
nStyle
&
WB_HIDE
)
)
Show
();
}
...
...
vcl/source/control/edit.cxx
Dosyayı görüntüle @
55619c10
...
...
@@ -219,11 +219,11 @@ Edit::Edit( Window* pParent, const ResId& rResId ) :
Show
();
}
void
Edit
::
Set
MinWidthInChars
(
sal_Int32
nMi
nWidthInChars
)
void
Edit
::
Set
WidthInChars
(
sal_Int32
nWidthInChars
)
{
if
(
mn
MinWidthInChars
!=
nMi
nWidthInChars
)
if
(
mn
WidthInChars
!=
nWidthInChars
)
{
mn
MinWidthInChars
=
nMi
nWidthInChars
;
mn
WidthInChars
=
nWidthInChars
;
queue_resize
();
}
}
...
...
@@ -231,7 +231,12 @@ void Edit::SetMinWidthInChars(sal_Int32 nMinWidthInChars)
bool
Edit
::
set_property
(
const
rtl
::
OString
&
rKey
,
const
rtl
::
OString
&
rValue
)
{
if
(
rKey
==
"width-chars"
)
SetMinWidthInChars
(
rValue
.
toInt32
());
SetWidthInChars
(
rValue
.
toInt32
());
else
if
(
rKey
==
"max-length"
)
{
sal_Int32
nTextLen
=
rValue
.
toInt32
();
SetMaxTextLen
(
nTextLen
==
0
?
EDIT_NOLIMIT
:
nTextLen
);
}
else
if
(
rKey
==
"editable"
)
SetReadOnly
(
!
toBool
(
rValue
));
else
if
(
rKey
==
"visibility"
)
...
...
@@ -266,7 +271,7 @@ void Edit::take_properties(Window &rOther)
maSelection
=
rOtherEdit
.
maSelection
;
mnAlign
=
rOtherEdit
.
mnAlign
;
mnMaxTextLen
=
rOtherEdit
.
mnMaxTextLen
;
mn
MinWidthInChars
=
rOtherEdit
.
mnMi
nWidthInChars
;
mn
WidthInChars
=
rOtherEdit
.
m
nWidthInChars
;
meAutocompleteAction
=
rOtherEdit
.
meAutocompleteAction
;
mcEchoChar
=
rOtherEdit
.
mcEchoChar
;
mbModified
=
rOtherEdit
.
mbModified
;
...
...
@@ -341,7 +346,7 @@ void Edit::ImplInitEditData()
mnXOffset
=
0
;
mnAlign
=
EDIT_ALIGN_LEFT
;
mnMaxTextLen
=
EDIT_NOLIMIT
;
mn
MinWidthInChars
=
3
;
mn
WidthInChars
=
-
1
;
meAutocompleteAction
=
AUTOCOMPLETE_KEYINPUT
;
mbModified
=
sal_False
;
mbInternModified
=
sal_False
;
...
...
@@ -2890,13 +2895,22 @@ void Edit::SetSubEdit( Edit* pEdit )
Size
Edit
::
CalcMinimumSizeForText
(
const
rtl
::
OUString
&
rString
)
const
{
Size
aSize
(
GetTextWidth
(
rString
),
GetTextHeight
()
);
aSize
.
Width
()
+=
ImplGetExtraOffset
()
*
2
;
// do not create edit fields in which one cannot enter anything
// a default minimum width should exist for at least 3 characters
Size
aMinSize
(
CalcSize
(
mnMinWidthInChars
)
);
if
(
aSize
.
Width
()
<
aMinSize
.
Width
()
)
aSize
.
Width
()
=
aMinSize
.
Width
();
Size
aSize
;
if
(
mnWidthInChars
!=
-
1
)
{
aSize
=
CalcSize
(
mnWidthInChars
);
}
else
{
aSize
.
Height
()
=
GetTextHeight
();
aSize
.
Width
()
=
GetTextWidth
(
rString
);
aSize
.
Width
()
+=
ImplGetExtraOffset
()
*
2
;
// do not create edit fields in which one cannot enter anything
// a default minimum width should exist for at least 3 characters
Size
aMinSize
(
CalcSize
(
3
));
if
(
aSize
.
Width
()
<
aMinSize
.
Width
())
aSize
.
Width
()
=
aMinSize
.
Width
();
}
// add some space between text entry and border
aSize
.
Height
()
+=
4
;
...
...
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