sw/source/uibase/docvw/AnnotationWin2.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
New commits: commit 2e6ecdfec95ac18a197cf31a67455cd103b73198 Author: Caolán McNamara <[email protected]> AuthorDate: Thu Dec 10 13:14:18 2020 +0000 Commit: Adolfo Jayme Barrientos <[email protected]> CommitDate: Fri Dec 11 03:18:11 2020 +0100 fix printing of 'margins in comment' mangled since... commit c200aa27ee4a0f5a89af6e970c2c22580029eded Author: Caolán McNamara <[email protected]> Date: Thu May 21 15:54:15 2020 +0100 remove Size arg from Window::Draw and depend on GetSizePixel which was a real monday-morning commit that bizarrely dropped drawing of the date/resolved widgets entirely and failed to notice that the PixelToLogic call in SwPostItMgr::DrawNotesForPage was originally called on the input pPostIt, not the output pDev Change-Id: I73b87f5889ef13018bcc43f97cd65169a3b77a65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107534 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 9c3539f2e6d7..04c1f8332695 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -260,7 +260,7 @@ void SwAnnotationWin::SetCursorLogicPosition(const Point& rPosition, bool bPoint void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags nInFlags) { - Size aSz = pDev->PixelToLogic(GetSizePixel()); + Size aSz = PixelToLogic(GetSizePixel()); if (mpMetadataAuthor->IsVisible() ) { @@ -287,6 +287,7 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags nInFl aPos += rPt; vcl::Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() ); mpMetadataDate->SetControlFont( aFont ); + mpMetadataDate->Draw(pDev, aPos, nInFlags); mpMetadataDate->SetControlFont( aOrigFont ); } @@ -297,13 +298,11 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags nInFl aPos += rPt; vcl::Font aFont( mpMetadataResolved->GetSettings().GetStyleSettings().GetFieldFont() ); mpMetadataResolved->SetControlFont( aFont ); + mpMetadataResolved->Draw(pDev, aPos, nInFlags); mpMetadataResolved->SetControlFont( aOrigFont ); } - Size aOrigSize(mpSidebarTextControl->GetSizePixel()); - mpSidebarTextControl->SetSizePixel(aSz); mpSidebarTextControl->Draw(pDev, rPt, nInFlags); - mpSidebarTextControl->SetSizePixel(aOrigSize); const drawinglayer::geometry::ViewInformation2D aNewViewInfos; std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor( @@ -319,6 +318,8 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags nInFl if (!mpVScrollbar->IsVisible()) return; + // if there is a scrollbar shown, draw "..." to indicate the comment isn't + // completely shown vcl::Font aOrigFont(mpMetadataDate->GetControlFont()); Color aOrigBg( mpMetadataDate->GetControlBackground() ); OUString sOrigText(mpMetadataDate->GetText()); @@ -330,7 +331,7 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags nInFl mpMetadataDate->SetControlFont( aFont ); mpMetadataDate->SetControlBackground( Color(0xFFFFFF) ); mpMetadataDate->SetText("..."); - aOrigSize = mpMetadataDate->GetSizePixel(); + Size aOrigSize = mpMetadataDate->GetSizePixel(); mpMetadataDate->SetSizePixel(mpMenuButton->GetSizePixel()); mpMetadataDate->Draw(pDev, aPos, nInFlags); mpMetadataDate->SetSizePixel(aOrigSize); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
