summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorAditya <adityasahu1511@gmail.com>2020-08-27 16:29:09 +0530
committerTomaž Vajngerl <quikee@gmail.com>2020-09-04 15:04:01 +0200
commit7429369678fdcf17c286b8c7238747b4a6b12866 (patch)
treeb09bfd5c218a2046a692558161597b4397238106 /svx/source
parentfa3f514f33d4beadabf8526278939ed51417918b (diff)
svx: Introduce GalleryBinaryEngine::getModificationDate()
Also make GalleryBinaryEngine's functions GetSdgURL(), GetThmURL(), GetStrURL(), GetSdvURL() private to the class. Introduce getModificationDate() to GalleryBinaryEngine because that it where it belongs - it deals with URL Change-Id: Idd3c42e779652df030ae104e40581d9de1a07863 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101505 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/gallery2/gallerybinaryengine.cxx16
-rw-r--r--svx/source/gallery2/galtheme.cxx9
2 files changed, 17 insertions, 8 deletions
diff --git a/svx/source/gallery2/gallerybinaryengine.cxx b/svx/source/gallery2/gallerybinaryengine.cxx
index 07cd79150eb8..298edd596001 100644
--- a/svx/source/gallery2/gallerybinaryengine.cxx
+++ b/svx/source/gallery2/gallerybinaryengine.cxx
@@ -40,6 +40,8 @@
#include <comphelper/processfactory.hxx>
#include <tools/urlobj.hxx>
#include <tools/diagnose_ex.h>
+#include <tools/datetime.hxx>
+#include <unotools/datetime.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/tempfile.hxx>
@@ -790,4 +792,18 @@ SvStream& GalleryBinaryEngine::writeGalleryTheme(SvStream& rOStm, const GalleryT
return rOStm;
}
+DateTime GalleryBinaryEngine::getModificationDate() const
+{
+ ::ucbhelper::Content aCnt(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;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 8486d6d4ad14..fd395eeb0601 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -654,14 +654,7 @@ void GalleryTheme::CopyToClipboard(sal_uInt32 nPos)
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;
+ return mpGalleryStorageEngine->getModificationDate();
}
SvStream& GalleryTheme::ReadData( SvStream& rIStm )