[Libreoffice-commits] core.git: include/svx svx/source
Aditya (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 4 09:28:21 UTC 2020
include/svx/galtheme.hxx | 4 ++++
svx/source/gallery2/galbrws1.cxx | 6 +-----
svx/source/gallery2/galtheme.cxx | 14 ++++++++++++++
3 files changed, 19 insertions(+), 5 deletions(-)
New commits:
commit 6b2eff7d69c6e14d89dd33eaa58c01d82c541266
Author: Aditya <adityasahu1511 at gmail.com>
AuthorDate: Thu Aug 27 15:25:31 2020 +0530
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Fri Sep 4 11:27:39 2020 +0200
svx: Refactor GalleryBrowser1::ImplFillExchangeData
Introduce GalleryTheme::getModificationDate()
Change-Id: I1ca34482ee5f0007a1d698e345e399ac3de31a51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101495
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index 985ce51e04bd..97e8d6b63985 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -25,6 +25,8 @@
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
+#include <tools/datetime.hxx>
+#include <unotools/datetime.hxx>
#include <vcl/bitmapex.hxx>
#include <svl/SfxBroadcaster.hxx>
#include <svx/galmisc.hxx>
@@ -158,6 +160,8 @@ public:
SAL_DLLPRIVATE void CopyToClipboard(sal_uInt32 nPos);
+ DateTime getModificationDate() const;
+
public:
SAL_DLLPRIVATE SvStream& ReadData( SvStream& rIn );
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 366bcecbd92d..3ac8bd8ff46b 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -111,12 +111,8 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa
try
{
- ::ucbhelper::Content aCnt( pThm->GetThmURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
- util::DateTime aDateTimeModified;
- DateTime aDateTime( DateTime::EMPTY );
+ DateTime aDateTime(pThm->getModificationDate());
- aCnt.getPropertyValue("DateModified") >>= aDateTimeModified;
- ::utl::typeConvert( aDateTimeModified, aDateTime );
rData.aThemeChangeDate = aDateTime;
rData.aThemeChangeTime = aDateTime;
}
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index cd503a4c11d7..69f8f4f7557c 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -31,6 +31,8 @@
#include <tools/diagnose_ex.h>
#include <tools/urlobj.hxx>
#include <tools/vcompat.hxx>
+#include <tools/datetime.hxx>
+#include <unotools/datetime.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/tempfile.hxx>
@@ -650,6 +652,18 @@ void GalleryTheme::CopyToClipboard(sal_uInt32 nPos)
pTransferable->CopyToClipboard(GetSystemClipboard());
}
+DateTime GalleryTheme::getModificationDate() const
+{
+ ::ucbhelper::Content aCnt(mpGalleryStorageEngine->GetThmURL().GetMainURL(INetURLObject::DecodeMechanism::NONE), uno::Reference< ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext());
+ util::DateTime aDateTimeModified;
+ DateTime aDateTime(DateTime::EMPTY);
+
+ aCnt.getPropertyValue("DateModified") >>= aDateTimeModified;
+ ::utl::typeConvert(aDateTimeModified, aDateTime);
+
+ return aDateTime;
+}
+
SvStream& GalleryTheme::ReadData( SvStream& rIStm )
{
sal_uInt32 nCount;
More information about the Libreoffice-commits
mailing list