diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-08 17:01:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-08 20:57:04 +0200 |
commit | ef950b8f42c0c6e501540ffc74ba193f1952b864 (patch) | |
tree | 3874acb48b91a7145764c044e4118f0168d39dcf /include/svx | |
parent | 76a3c01c3abd01f404f8f5ac572e52b2f8a2927e (diff) |
GalleryObject*Storage are unnecessary
They are identical, and they contain no useful logic.
Remove them and just store the underlying INetURL object directly.
Change-Id: I73f46d13867ae3b6e738189c0dbaa3cb0ea40ba0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151539
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/galleryobjectcollection.hxx | 6 | ||||
-rw-r--r-- | include/svx/galleryobjectstorage.hxx | 32 |
2 files changed, 2 insertions, 36 deletions
diff --git a/include/svx/galleryobjectcollection.hxx b/include/svx/galleryobjectcollection.hxx index 07a952b59f54..ec27761cc07e 100644 --- a/include/svx/galleryobjectcollection.hxx +++ b/include/svx/galleryobjectcollection.hxx @@ -21,16 +21,16 @@ #include <svx/svxdllapi.h> #include <svx/galmisc.hxx> -#include <svx/galleryobjectstorage.hxx> #include <vcl/bitmapex.hxx> #include <tools/urlobj.hxx> #include <memory> +#include <optional> #include <vector> struct GalleryObject { - std::unique_ptr<GalleryObjectStorage> m_pGalleryObjectStorage; + std::optional<INetURLObject> m_oStorageUrl; sal_uInt32 nOffset; SgaObjKind eObjKind; bool mbDelete; @@ -40,8 +40,6 @@ struct GalleryObject Size maPreparedSize; OUString maTitle; OUString maPath; - - const INetURLObject& getURL() const { return m_pGalleryObjectStorage->getURL(); } }; class SVXCORE_DLLPUBLIC GalleryObjectCollection diff --git a/include/svx/galleryobjectstorage.hxx b/include/svx/galleryobjectstorage.hxx deleted file mode 100644 index cdca68b14a8f..000000000000 --- a/include/svx/galleryobjectstorage.hxx +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#pragma once - -#include <tools/urlobj.hxx> - -class GalleryObjectStorage -{ -public: - virtual ~GalleryObjectStorage() = 0; - virtual const INetURLObject& getURL() const = 0; - virtual void setURL(INetURLObject aURL) = 0; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |