[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Dec 10 16:12:14 UTC 2020
sw/source/uibase/docvw/AnnotationWin2.cxx | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 47a5000822588b695f514866fd8cca48fb2d1ac3
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Dec 10 13:14:18 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Dec 10 17:11:38 2020 +0100
fix printing of 'margins in comment'
mangled since...
commit c200aa27ee4a0f5a89af6e970c2c22580029eded
Author: Caolán McNamara <caolanm at redhat.com>
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/+/107493
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 4b1e7c70836c..4e17e799e46d 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -273,7 +273,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() )
{
@@ -300,6 +300,7 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags nInFl
aPos += rPt;
vcl::Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetLabelFont() );
mpMetadataDate->SetControlFont( aFont );
+ mpMetadataDate->Draw(pDev, aPos, nInFlags);
mpMetadataDate->SetControlFont( aOrigFont );
}
@@ -310,13 +311,11 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, DrawFlags nInFl
aPos += rPt;
vcl::Font aFont( mpMetadataResolved->GetSettings().GetStyleSettings().GetLabelFont() );
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(
@@ -332,6 +331,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());
@@ -343,7 +344,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);
More information about the Libreoffice-commits
mailing list