diff options
author | Scott Clarke <scott.clarke@codethink.co.uk> | 2019-09-06 14:26:52 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-11-29 14:29:29 +0100 |
commit | cf7d723194d7a20e9c014dcf94dff7edfc6b7c04 (patch) | |
tree | da899272254bea8b412cc5262dc93ee94225ea96 /sw | |
parent | 4ebb86309b39b3d02b56d82ce710f57c0871e621 (diff) |
Make resolved comments appear resolved when printed
Added an indication to resolved comments when printing them or
exporting them as a PDF.
Change-Id: I9a84b76d6f12cca3c4541d19a0890cbd1cf430a7
Reviewed-on: https://gerrit.libreoffice.org/78712
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-on: https://gerrit.libreoffice.org/83740
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/strings.hrc | 1 | ||||
-rw-r--r-- | sw/source/core/doc/doc.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/EnhancedPDFExportHelper.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/docvw/AnnotationWin2.cxx | 12 |
4 files changed, 20 insertions, 1 deletions
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc index f094e5736947..324c49c88051 100644 --- a/sw/inc/strings.hrc +++ b/sw/inc/strings.hrc @@ -659,6 +659,7 @@ #define STR_POSTIT_SHOW NC_("STR_POSTIT_SHOW", "Show All") #define STR_POSTIT_HIDE NC_("STR_POSTIT_HIDE", "Hide All") #define STR_POSTIT_DELETE NC_("STR_POSTIT_DELETE", "Delete All") +#define STR_RESOLVED NC_("STR_RESOLVED", "RESOLVED") #define STR_MARGIN_TOOLTIP_LEFT NC_("STR_MARGIN_TOOLTIP_LEFT", "Left: ") #define STR_MARGIN_TOOLTIP_RIGHT NC_("STR_MARGIN_TOOLTIP_RIGHT", ". Right: ") diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 2c69bb7fa1fe..59ea8ea19672 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -616,6 +616,8 @@ static void lcl_FormatPostIt( aStr += " "; SvtSysLocale aSysLocale; aStr += /*(LocaleDataWrapper&)*/aSysLocale.GetLocaleData().getDate( pField->GetDate() ); + if(pField->GetResolved()) + aStr += " " + SwResId(STR_RESOLVED); pIDCO->InsertString( aPam, aStr ); pIDCO->SplitNode( *aPam.GetPoint(), false ); diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 4ad8d67964a2..8ddead098a80 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -75,6 +75,7 @@ #include <calbck.hxx> #include <stack> #include <frmtool.hxx> +#include <strings.hrc> #include <tools/globname.hxx> #include <svx/svdobj.hxx> @@ -1598,7 +1599,10 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() pNumFormatter->GetOutputString( aDateDiff.GetDate(), nFormat, sDate, &pColor ); // The title should consist of the author and the date: - aNote.Title = pField->GetPar1() + ", " + sDate; + if(pField->GetResolved()) + aNote.Title = pField->GetPar1() + ", " + sDate + ", " + SwResId(STR_RESOLVED); + else + aNote.Title = pField->GetPar1() + ", " + sDate; // Guess what the contents contains... aNote.Contents = pField->GetText(); diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 1016118aedec..48db11fdd37e 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -300,6 +300,18 @@ void SwAnnotationWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz mpMetadataDate->SetControlFont( aOrigFont ); } + if (mpMetadataResolved->IsVisible()) + { + vcl::Font aOrigFont(mpMetadataResolved->GetControlFont()); + Size aSize(PixelToLogic(mpMetadataResolved->GetSizePixel())); + Point aPos(PixelToLogic(mpMetadataResolved->GetPosPixel())); + aPos += rPt; + vcl::Font aFont( mpMetadataResolved->GetSettings().GetStyleSettings().GetFieldFont() ); + mpMetadataResolved->SetControlFont( aFont ); + mpMetadataResolved->Draw(pDev, aPos, aSize, nInFlags); + mpMetadataResolved->SetControlFont( aOrigFont ); + } + mpSidebarTextControl->Draw(pDev, rPt, rSz, nInFlags); const drawinglayer::geometry::ViewInformation2D aNewViewInfos; |