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
912ecaf5
Kaydet (Commit)
912ecaf5
authored
Eki 09, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Resolves: fdo#55546 center ellipsis tooltips that don't fit on screen
Change-Id: Ic44c9032878892fa33c839e5aaac1996e7bed943
üst
fcf953b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
edtwin2.cxx
sw/source/uibase/docvw/edtwin2.cxx
+15
-2
edtwin.hxx
sw/source/uibase/inc/edtwin.hxx
+5
-0
No files found.
sw/source/uibase/docvw/edtwin2.cxx
Dosyayı görüntüle @
912ecaf5
...
...
@@ -94,6 +94,17 @@ static OUString lcl_GetRedlineHelp( const SwRangeRedline& rRedl, bool bBalloon )
return
sBuf
.
makeStringAndClear
();
}
OUString
SwEditWin
::
ClipLongToolTip
(
const
OUString
&
rTxt
)
{
OUString
sDisplayTxt
(
rTxt
);
long
nTextWidth
=
GetTextWidth
(
sDisplayTxt
);
long
nMaxWidth
=
GetDesktopRectPixel
().
GetWidth
()
*
2
/
3
;
nMaxWidth
=
PixelToLogic
(
Size
(
nMaxWidth
,
0
)).
Width
();
if
(
nTextWidth
>
nMaxWidth
)
sDisplayTxt
=
GetEllipsisString
(
sDisplayTxt
,
nMaxWidth
,
TEXT_DRAW_CENTERELLIPSIS
);
return
sDisplayTxt
;
}
void
SwEditWin
::
RequestHelp
(
const
HelpEvent
&
rEvt
)
{
SwWrtShell
&
rSh
=
m_rView
.
GetWrtShell
();
...
...
@@ -369,7 +380,8 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
aPt
=
OutputToScreenPixel
(
LogicToPixel
(
aRect
.
BottomRight
()
));
aRect
.
Right
()
=
aPt
.
X
();
aRect
.
Bottom
()
=
aPt
.
Y
();
Help
::
ShowQuickHelp
(
this
,
aRect
,
sTxt
,
nStyle
);
OUString
sDisplayTxt
(
ClipLongToolTip
(
sTxt
));
Help
::
ShowQuickHelp
(
this
,
aRect
,
sDisplayTxt
,
nStyle
);
}
}
...
...
@@ -410,7 +422,8 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
sTxt
=
SW_RESSTR
(
nTabRes
);
Size
aTxtSize
(
GetTextWidth
(
sTxt
),
GetTextHeight
());
Rectangle
aRect
(
rEvt
.
GetMousePosPixel
(),
aTxtSize
);
Help
::
ShowQuickHelp
(
this
,
aRect
,
sTxt
);
OUString
sDisplayTxt
(
ClipLongToolTip
(
sTxt
));
Help
::
ShowQuickHelp
(
this
,
aRect
,
sDisplayTxt
);
}
bContinue
=
false
;
}
...
...
sw/source/uibase/inc/edtwin.hxx
Dosyayı görüntüle @
912ecaf5
...
...
@@ -286,6 +286,11 @@ public:
void
SetUseInputLanguage
(
bool
bNew
);
bool
IsUseInputLanguage
()
const
{
return
m_bUseInputLanguage
;
}
/** fdo#55546 cut very long tooltips to 2/3 of the width of the screen
via center ellipsis
*/
OUString
ClipLongToolTip
(
const
OUString
&
rTxt
);
SwFrameControlsManager
&
GetFrameControlsManager
()
{
return
m_aFrameControlsManager
;
}
SwEditWin
(
vcl
::
Window
*
pParent
,
SwView
&
);
...
...
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