From 6a4f538368f1719139fd1cc65ba84f8e50b1232c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 6 May 2014 15:59:27 +0100 Subject: [PATCH] clip over-long comments --- ...6815-clip-overlarge-comment-contents.patch | 102 ++++++++++++++++++ libreoffice.spec | 6 +- 2 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 0001-Related-fdo-36815-clip-overlarge-comment-contents.patch diff --git a/0001-Related-fdo-36815-clip-overlarge-comment-contents.patch b/0001-Related-fdo-36815-clip-overlarge-comment-contents.patch new file mode 100644 index 0000000..5e76743 --- /dev/null +++ b/0001-Related-fdo-36815-clip-overlarge-comment-contents.patch @@ -0,0 +1,102 @@ +From 0709713ad7ee0fa26b2a4f12720834e47e5dd681 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 6 May 2014 15:56:23 +0100 +Subject: [PATCH] Related: fdo#36815 clip overlarge comment contents + +and add an indicator that the comment won't fit in the space available + +Change-Id: I8dce7dfa678a606e8c4532addc4ba70c2a43644e +--- + sw/source/ui/docvw/SidebarTxtControl.cxx | 23 ++++------------------- + sw/source/ui/docvw/SidebarWin.cxx | 31 ++++++++++++++++++++++--------- + 2 files changed, 26 insertions(+), 28 deletions(-) + +diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx +index 15af740..889c3bb 100644 +--- a/sw/source/ui/docvw/SidebarTxtControl.cxx ++++ b/sw/source/ui/docvw/SidebarTxtControl.cxx +@@ -120,28 +120,13 @@ void SidebarTxtControl::RequestHelp(const HelpEvent &rEvt) + + void SidebarTxtControl::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, sal_uLong) + { +- if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) +- { +- if ( mrSidebarWin.IsMouseOverSidebarWin() || +- HasFocus() ) +- { +- pDev->DrawGradient( Rectangle( Point(0,0) + rPt, PixelToLogic(GetSizePixel()) ), +- Gradient( GradientStyle_LINEAR, +- mrSidebarWin.ColorDark(), +- mrSidebarWin.ColorDark() ) ); +- } +- else +- { +- pDev->DrawGradient( Rectangle( Point(0,0) + rPt, PixelToLogic(GetSizePixel()) ), +- Gradient( GradientStyle_LINEAR, +- mrSidebarWin.ColorLight(), +- mrSidebarWin.ColorDark())); +- } +- } ++ //Take the control's height, but overwrite the scrollbar area if there was one ++ Size aSize(PixelToLogic(GetSizePixel())); ++ aSize.Width() = rSz.Width(); + + if ( GetTextView() ) + { +- GetTextView()->GetOutliner()->Draw(pDev, Rectangle(rPt, rSz)); ++ GetTextView()->GetOutliner()->Draw(pDev, Rectangle(rPt, aSize)); + } + + if ( mrSidebarWin.GetLayoutStatus()==SwPostItHelper::DELETED ) +diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx +index c3aa5b0..ebc4d4c 100644 +--- a/sw/source/ui/docvw/SidebarWin.cxx ++++ b/sw/source/ui/docvw/SidebarWin.cxx +@@ -218,15 +218,7 @@ void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, s + { + if (mpMetadataAuthor->IsVisible() ) + { +- //draw left over space +- if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() ) +- { +- pDev->SetFillColor(COL_BLACK); +- } +- else +- { +- pDev->SetFillColor(mColorDark); +- } ++ pDev->SetFillColor(mColorDark); + pDev->SetLineColor(); + pDev->DrawRect( Rectangle( rPt, rSz ) ); + } +@@ -265,6 +257,27 @@ void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, s + + pProcessor->process(rSequence); + delete pProcessor; ++ ++ if (mpVScrollbar->IsVisible()) ++ { ++ Font aOrigFont(mpMetadataDate->GetControlFont()); ++ Color aOrigBg( mpMetadataDate->GetControlBackground() ); ++ OUString sOrigText(mpMetadataDate->GetText()); ++ ++ Size aSize(PixelToLogic(mpMenuButton->GetSizePixel())); ++ Point aPos(PixelToLogic(mpMenuButton->GetPosPixel())); ++ aPos += rPt; ++ ++ Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() ); ++ mpMetadataDate->SetControlFont( aFont ); ++ mpMetadataDate->SetControlBackground( 0xFFFFFF ); ++ mpMetadataDate->SetText("..."); ++ mpMetadataDate->Draw(pDev, aPos, aSize, nInFlags); ++ ++ mpMetadataDate->SetText(sOrigText); ++ mpMetadataDate->SetControlFont( aOrigFont ); ++ mpMetadataDate->SetControlBackground( aOrigBg ); ++ } + } + + void SwSidebarWin::SetPosSizePixelRect( long nX, +-- +1.9.0 + diff --git a/libreoffice.spec b/libreoffice.spec index 8e4afe3..78f1cb1 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -37,7 +37,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.2 -Release: 3%{?libo_prerelease}%{?dist} +Release: 4%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 Group: Applications/Productivity URL: http://www.libreoffice.org/ @@ -297,6 +297,7 @@ Patch36: 0001-Resolves-fdo-78128-go-back-to-using-an-interim-metaf.patch Patch37: 0001-Related-rhbz-1032774-slide-restarter-should-disable-.patch Patch38: 0001-add-X-TryExec-entries-to-desktop-files.patch Patch39: 0001-resolved-fdo-78294-default-null-date-for-document-im.patch +Patch40: 0001-Related-fdo-36815-clip-overlarge-comment-contents.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice @@ -2260,6 +2261,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %endif %changelog +* Tue May 06 2014 Caolán McNamara - 1:4.2.4.2-4 +- clip over-long comments + * Thu May 01 2014 Eike Rathke - 1:4.2.4.2-3 - Resolves: fdo#78294 default null-date for document import is 1899-12-30