diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-09-05 16:42:14 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-09-05 18:05:43 +0200 |
commit | d70bf1c4caf37f38166b5f1facc08264cd203f92 (patch) | |
tree | 41deb2dfcf215e59248bcda925500938fa213cbb /include | |
parent | a91dfea300a379c2f754dbb1d5a002d093b73032 (diff) |
vcl: less text layout calls in Menu
Number of GenericSalLayout::LayoutText() calls for each & every menu
item till a Writer document is opened: 3 (before) -> 1 (after).
Change-Id: I08a3d174bf15bafbcbce612712f2ab773cd5e085
Reviewed-on: https://gerrit.libreoffice.org/60045
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/outdev.hxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 693a905b342e..ba15a974f78d 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -995,7 +995,8 @@ public: void DrawCtrlText( const Point& rPos, const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1, - DrawTextFlags nStyle = DrawTextFlags::Mnemonic, MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr ); + DrawTextFlags nStyle = DrawTextFlags::Mnemonic, MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr, + const SalLayoutGlyphs* pGlyphs = nullptr); void DrawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, @@ -1093,7 +1094,8 @@ public: OUString GetEllipsisString( const OUString& rStr, long nMaxWidth, DrawTextFlags nStyle = DrawTextFlags::EndEllipsis ) const; - long GetCtrlTextWidth( const OUString& rStr ) const; + long GetCtrlTextWidth( const OUString& rStr, + const SalLayoutGlyphs* pLayoutCache = nullptr ) const; static OUString GetNonMnemonicString( const OUString& rStr, sal_Int32& rMnemonicPos ); @@ -1163,7 +1165,8 @@ public: SalLayoutGlyphs const*const pLayoutCache = nullptr) const; void GetCaretPositions( const OUString&, long* pCaretXArray, - sal_Int32 nIndex, sal_Int32 nLen ) const; + sal_Int32 nIndex, sal_Int32 nLen, + const SalLayoutGlyphs* pGlyphs = nullptr ) const; void DrawStretchText( const Point& rStartPt, sal_uLong nWidth, const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1); |