summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAditya <adityasahu1511@gmail.com>2020-08-01 18:58:06 +0530
committerTomaž Vajngerl <quikee@gmail.com>2020-08-31 20:10:01 +0200
commit9a7ab3527adef056291ec56c031ebbe3f471af66 (patch)
tree4ba36fc80abde36ec7c42799100f0b38bd0c0d47 /include
parent828914a94fe93d5b300bda1d23a049ae92c159e1 (diff)
svx:Refactor WriteData() and move m_aDestDir member out of GalleryTheme
Move m_aDestDir out of GalleryTheme because only GalleryBinaryEngine seems to be using it. Use SetDestDir() to delegate the member value to GalleryBinaryEngine. Refactor WriteData() so that it's called writeGalleryTheme() Change-Id: I5f6b6f0857695adeb102342e617ad341553abd14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99940 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/svx/gallerybinaryengine.hxx18
-rw-r--r--include/svx/galtheme.hxx7
2 files changed, 12 insertions, 13 deletions
diff --git a/include/svx/gallerybinaryengine.hxx b/include/svx/gallerybinaryengine.hxx
index cf56b98c8c47..eb9e0b291de1 100644
--- a/include/svx/gallerybinaryengine.hxx
+++ b/include/svx/gallerybinaryengine.hxx
@@ -38,6 +38,7 @@ class SotStorage;
struct GalleryObject;
class FmFormModel;
class GalleryTheme;
+class GalleryThemeEntry;
class SVXCORE_DLLPUBLIC GalleryBinaryEngine
{
@@ -46,6 +47,8 @@ private:
const GalleryStorageLocations& maGalleryStorageLocations;
GalleryObjectCollection& mrGalleryObjectCollection;
bool mbReadOnly;
+ OUString m_aDestDir;
+ bool m_bDestDirRelative;
public:
GalleryBinaryEngine(const GalleryStorageLocations& rGalleryStorageLocations,
@@ -54,6 +57,8 @@ public:
void clearSotStorage();
+ void setDestDir(const OUString& rDestDir, bool bRelative);
+
SAL_DLLPRIVATE void ImplCreateSvDrawStorage();
SAL_DLLPRIVATE const tools::SvRef<SotStorage>& GetSvDrawStorage() const;
@@ -62,14 +67,12 @@ public:
const INetURLObject& GetSdvURL() const { return maGalleryStorageLocations.GetSdvURL(); }
const INetURLObject& GetStrURL() const { return maGalleryStorageLocations.GetStrURL(); }
- SAL_DLLPRIVATE bool implWrite(const GalleryTheme& rTheme);
+ SAL_DLLPRIVATE bool implWrite(const GalleryTheme& rTheme, const GalleryThemeEntry* pThm);
- void insertObject(const SgaObject& rObj, GalleryObject* pFoundEntry, OUString& rDestDir,
- sal_uInt32& rInsertPos);
+ void insertObject(const SgaObject& rObj, GalleryObject* pFoundEntry, sal_uInt32& rInsertPos);
std::unique_ptr<SgaObject> implReadSgaObject(GalleryObject const* pEntry);
- bool implWriteSgaObject(const SgaObject& rObj, sal_uInt32 nPos, GalleryObject* pExistentEntry,
- OUString& aDestDir);
+ bool implWriteSgaObject(const SgaObject& rObj, sal_uInt32 nPos, GalleryObject* pExistentEntry);
bool readModel(const GalleryObject* pObject, SdrModel& rModel);
SgaObjectSvDraw insertModel(const FmFormModel& rModel, const INetURLObject& rUserURL);
@@ -90,8 +93,9 @@ public:
void updateTheme();
static void insertFileOrDirURL(const INetURLObject& rFileOrDirURL,
std::vector<INetURLObject>& rURLVector);
-};
-SvStream& WriteGalleryTheme(SvStream& rOut, const GalleryTheme& rTheme);
+ SvStream& writeGalleryTheme(SvStream& rOStm, const GalleryTheme& rTheme,
+ const GalleryThemeEntry* pThm);
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index 4c3748c7b145..97da3322044f 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -22,7 +22,6 @@
#include <svx/svxdllapi.h>
#include <svx/galleryobjectcollection.hxx>
-#include <svx/gallerybinaryengine.hxx>
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
@@ -76,8 +75,6 @@ private:
std::unique_ptr<GalleryBinaryEngine> mpGalleryBinaryEngine;
GalleryObjectCollection maGalleryObjectCollection;
- OUString m_aDestDir;
- bool m_bDestDirRelative;
Gallery* pParent;
GalleryThemeEntry* pThm;
sal_uInt32 mnThemeLockCount;
@@ -112,8 +109,7 @@ public:
const OUString& GetName() const;
// used for building gallery themes during compilation:
- SAL_DLLPRIVATE void SetDestDir(const OUString& rDestDir, bool bRelative)
- { m_aDestDir = rDestDir; m_bDestDirRelative = bRelative; }
+ void SetDestDir(const OUString& rDestDir, bool bRelative);
SAL_DLLPRIVATE const INetURLObject& GetThmURL() const;
const INetURLObject& GetSdgURL() const;
@@ -180,7 +176,6 @@ public:
public:
- SAL_DLLPRIVATE SvStream& WriteData( SvStream& rOut ) const;
SAL_DLLPRIVATE SvStream& ReadData( SvStream& rIn );
static void InsertAllThemes(weld::ComboBox& rListBox);
d: I74b159c3a046e23661473ddbfe53c92c4136a9db Reviewed-on: https://gerrit.libreoffice.org/85073 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2018-07-26external/boost: silence -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann Change-Id: I25703979ebe94649f9cf1464d282b21a70cfe1fa Reviewed-on: https://gerrit.libreoffice.org/58041 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2018-01-24Silence upcoming GCC 8 -Werror=parentheses in external/boostStephan Bergmann ...reporting such delights as > [CXX] sal/cppunittester/cppunittester.cxx > In file included from workdir/UnpackedTarball/boost/boost/mpl/aux_/na_assert.hpp:23, [...] > from external/boost/include/boost/algorithm/string.hpp:25, > from sal/cppunittester/cppunittester.cxx:60: > workdir/UnpackedTarball/boost/boost/mpl/assert.hpp:188:21: error: unnecessary parentheses in declaration of ‘assert_arg’ [-Werror=parentheses] > failed ************ (Pred::************ > ^ where boost/mpl/assert.hpp contains > template< typename Pred > > failed ************ (Pred::************ > assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type ) > ); Change-Id: I6976b2cc23f1d309d27d3fde9098b10c9d877599 Reviewed-on: https://gerrit.libreoffice.org/48386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2018-01-09Silence clang-cl -Werror,-Wmicrosoft-unqualified-friend in external/boostStephan Bergmann ...messages like: > workdir/UnpackedTarball/boost\boost/bimap/detail/map_view_iterator.hpp(138,18): error: unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier [-Werror,-Wmicrosoft-unqualified-friend] > friend class iterator_core_access; > ^ > ::boost::iterators:: Change-Id: I393b7c95943a55d5f755cfed41e0b7bc3306c568 Reviewed-on: https://gerrit.libreoffice.org/47673 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2017-12-20Remove Clang -Wunknown-pragmas workaroundStephan Bergmann ...that appears to only be necessary for Clang <= 3.4, so no longer needed since fa7b7f73938e837af2765f8a03f07e404046877b "Document that Clang 3.4.2 is known to be too old" Change-Id: I09361f6ffc23b8d20d65d3c84d9003719e2159f8 Reviewed-on: https://gerrit.libreoffice.org/46787 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2017-08-16Silence further warnings in external/boost/include wrappersStephan Bergmann ...as required by clang-cl: > [build CXX] avmedia/source/framework/modeltools.cxx > In file included from C:/lo64/core/avmedia/source/framework/modeltools.cxx:29: > In file included from C:/lo64/core/external/boost/include\boost/exception/diagnostic_information.hpp:23: > In file included from C:/lo64/core/workdir/UnpackedTarball/boost\boost/exception/diagnostic_information.hpp:17: > C:/lo64/core/workdir/UnpackedTarball/boost\boost/exception/info.hpp(103,13): error: 'boost::exception_detail::error_info_container_impl' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor] > ~error_info_container_impl() throw() > ^ > C:/lo64/core/workdir/UnpackedTarball/boost\boost/exception/info.hpp(172,21): error: delete called on non-final 'boost::exception_detail::error_info_container_impl' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor] > delete this; > ^ > 2 errors generated. Change-Id: I026f7e72d027becb68ac9118616ed6d8f2ecbf80 Reviewed-on: https://gerrit.libreoffice.org/41225 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2017-05-02Adapt bin/gen-boost-headers to Clang 5Stephan Bergmann ...since <http://llvm.org/viewvc/llvm-project?view=revision&revision=301647> "Use the -Wunknown-warning-option group for the 'unknown warning group' diagnostic in #pragma diagnostic". * external/boost/include/boost/{locale.hpp,locale/gnu_gettext.hpp} would have been removed by 'make cmd cmd=bin/gen-boost-headers' as they are still unused from c25eee44966703cb27d632bccb39b20978341ffd "build boost::locale library", but there's reportedly a patch in Gerrit to actually use them, so I fixed them manually for now. * The deviating comment style is to keep lines no wider than 80 characters. Change-Id: I64603ae8d8a82781eda46f12c9dd5c68dcf395b9