summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-06-20 09:16:11 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-06-22 08:14:10 +0200
commit235c54e115b66c880d3da0b8018f8ef29d20bc42 (patch)
tree73eec9d6470a12c0d10384cd43d50b329c70fc59 /sd/source/ui/unoidl
parent51d529c18dadb05754590a01ce4c1f06f41cf412 (diff)
pdf export: add support for modification time/date in annotations
Previously the modification date was written to the annotation "title" as string, together with the username. This is however not neccessary as PDF supports the modification date perfectly fine. Change-Id: I6f55e4fe63d9c3c81ec557f6cfd3387f011e67c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96766 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sd/source/ui/unoidl')
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index fba4d8f68e6f..c72ef5725b89 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1556,24 +1556,18 @@ static void ImplPDFExportComments( const uno::Reference< drawing::XDrawPage >& x
uno::Reference< office::XAnnotationAccess > xAnnotationAccess( xPage, uno::UNO_QUERY_THROW );
uno::Reference< office::XAnnotationEnumeration > xAnnotationEnumeration( xAnnotationAccess->createAnnotationEnumeration() );
- LanguageType eLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
while( xAnnotationEnumeration->hasMoreElements() )
{
uno::Reference< office::XAnnotation > xAnnotation( xAnnotationEnumeration->nextElement() );
geometry::RealPoint2D aRealPoint2D( xAnnotation->getPosition() );
uno::Reference< text::XText > xText( xAnnotation->getTextRange() );
- util::DateTime aDateTime( xAnnotation->getDateTime() );
-
- Date aDate( aDateTime.Day, aDateTime.Month, aDateTime.Year );
- ::tools::Time aTime( ::tools::Time::EMPTY );
- OUString aStr = SvxDateTimeField::GetFormatted( aDate, aTime,
- SvxDateFormat::B, SvxTimeFormat::AppDefault,
- *(SD_MOD()->GetNumberFormatter()), eLanguage );
vcl::PDFNote aNote;
- aNote.Title = xAnnotation->getAuthor() + ", " + aStr;
+ aNote.Title = xAnnotation->getAuthor();
aNote.Contents = xText->getString();
+ aNote.maModificationDate = xAnnotation->getDateTime();
+
rPDFExtOutDevData.CreateNote( ::tools::Rectangle( Point( static_cast< long >( aRealPoint2D.X * 100 ),
static_cast< long >( aRealPoint2D.Y * 100 ) ), Size( 1000, 1000 ) ), aNote );
}