[Libreoffice-commits] core.git: include/svx svx/source
Aditya (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 4 09:27:28 UTC 2020
include/svx/galtheme.hxx | 6 +++---
svx/source/gallery2/gallery1.cxx | 2 +-
svx/source/gallery2/galtheme.cxx | 34 +++++++++++++++++-----------------
svx/source/unogallery/unogalitem.cxx | 2 +-
4 files changed, 22 insertions(+), 22 deletions(-)
New commits:
commit bc8c29bea9393cd0f1a6cbff30291ccdfe1ccea0
Author: Aditya <adityasahu1511 at gmail.com>
AuthorDate: Thu Aug 27 00:24:00 2020 +0530
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Fri Sep 4 11:26:46 2020 +0200
svx: Rename GalleryTheme::mpGalleryBinaryEngine
Rename mpGalleryBinaryEngine to mpGalleryStorageEngine because GalleryTheme
will have 2 engines: GalleryBinaryEngine and GalleryXMLEngine.
Change-Id: I990a3655121b4e4e5735c6a8d5e5afe13c674b20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101427
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/svx/galtheme.hxx b/include/svx/galtheme.hxx
index cb8e7c1e1869..985ce51e04bd 100644
--- a/include/svx/galtheme.hxx
+++ b/include/svx/galtheme.hxx
@@ -57,7 +57,7 @@ class SVXCORE_DLLPUBLIC GalleryTheme : public SfxBroadcaster
private:
- std::unique_ptr<GalleryBinaryEngine> mpGalleryBinaryEngine;
+ std::unique_ptr<GalleryBinaryEngine> mpGalleryStorageEngine;
GalleryObjectCollection maGalleryObjectCollection;
Gallery* pParent;
GalleryThemeEntry* pThm;
@@ -67,8 +67,8 @@ private:
bool bDragging;
bool bAbortActualize;
- std::unique_ptr<GalleryBinaryEngine> createGalleryBinaryEngine(bool bReadOnly);
- const std::unique_ptr<GalleryBinaryEngine>& getGalleryBinaryEngine() const { return mpGalleryBinaryEngine; }
+ std::unique_ptr<GalleryBinaryEngine> createGalleryStorageEngine(bool bReadOnly);
+ const std::unique_ptr<GalleryBinaryEngine>& getGalleryStorageEngine() const { return mpGalleryStorageEngine; }
SAL_DLLPRIVATE void ImplSetModified( bool bModified );
SAL_DLLPRIVATE void ImplBroadcast(sal_uInt32 nUpdatePos);
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index b732294648c8..19b69a0a9bcf 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -593,7 +593,7 @@ void Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewName )
{
pThemeEntry->SetName( rNewName );
if (pThm->pThm->IsModified())
- if (!pThm->mpGalleryBinaryEngine->implWrite(*pThm, pThm->pThm))
+ if (!pThm->mpGalleryStorageEngine->implWrite(*pThm, pThm->pThm))
pThm->ImplSetModified(false);
Broadcast( GalleryHint( GalleryHintType::THEME_RENAMED, rOldName, pThm->GetName() ) );
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 476ad79f27e6..cd503a4c11d7 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -69,13 +69,13 @@ GalleryTheme::GalleryTheme( Gallery* pGallery, GalleryThemeEntry* pThemeEntry )
, bDragging(false)
, bAbortActualize(false)
{
- mpGalleryBinaryEngine = createGalleryBinaryEngine(IsReadOnly());
+ mpGalleryStorageEngine = createGalleryStorageEngine(IsReadOnly());
}
GalleryTheme::~GalleryTheme()
{
if(pThm->IsModified())
- if(!mpGalleryBinaryEngine->implWrite(*this, pThm))
+ if(!mpGalleryStorageEngine->implWrite(*this, pThm))
ImplSetModified(false);
for (auto & pEntry : maGalleryObjectCollection.getObjectList())
@@ -84,15 +84,15 @@ GalleryTheme::~GalleryTheme()
pEntry.reset();
}
maGalleryObjectCollection.clear();
- mpGalleryBinaryEngine->clearSotStorage();
+ mpGalleryStorageEngine->clearSotStorage();
}
void GalleryTheme::SetDestDir(const OUString& rDestDir, bool bRelative)
{
- mpGalleryBinaryEngine->setDestDir(rDestDir, bRelative);
+ mpGalleryStorageEngine->setDestDir(rDestDir, bRelative);
}
-std::unique_ptr<GalleryBinaryEngine> GalleryTheme::createGalleryBinaryEngine(bool bReadOnly)
+std::unique_ptr<GalleryBinaryEngine> GalleryTheme::createGalleryStorageEngine(bool bReadOnly)
{
std::unique_ptr<GalleryBinaryEngine> pGalleryBinaryEngine = std::make_unique<GalleryBinaryEngine>(pThm->getGalleryStorageLocations(), maGalleryObjectCollection, bReadOnly);
return pGalleryBinaryEngine;
@@ -148,7 +148,7 @@ bool GalleryTheme::InsertObject(const SgaObject& rObj, sal_uInt32 nInsertPos)
}
}
- mpGalleryBinaryEngine->insertObject(rObj, pFoundEntry, nInsertPos);
+ mpGalleryStorageEngine->insertObject(rObj, pFoundEntry, nInsertPos);
ImplSetModified(true);
ImplBroadcast(pFoundEntry? iFoundPos: nInsertPos);
@@ -158,7 +158,7 @@ bool GalleryTheme::InsertObject(const SgaObject& rObj, sal_uInt32 nInsertPos)
std::unique_ptr<SgaObject> GalleryTheme::AcquireObject(sal_uInt32 nPos)
{
- return mpGalleryBinaryEngine->implReadSgaObject(maGalleryObjectCollection.getForPosition(nPos));
+ return mpGalleryStorageEngine->implReadSgaObject(maGalleryObjectCollection.getForPosition(nPos));
}
void GalleryTheme::GetPreviewBitmapExAndStrings(sal_uInt32 nPos, BitmapEx& rBitmapEx, Size& rSize, OUString& rTitle, OUString& rPath)
@@ -187,7 +187,7 @@ void GalleryTheme::RemoveObject(sal_uInt32 nPos)
std::unique_ptr<GalleryObject> pEntry = std::move(*it);
maGalleryObjectCollection.getObjectList().erase( it );
- mpGalleryBinaryEngine->removeObject(pEntry);
+ mpGalleryStorageEngine->removeObject(pEntry);
Broadcast( GalleryHint( GalleryHintType::CLOSE_OBJECT, GetName(), pEntry.get() ) );
pEntry.reset();
@@ -281,9 +281,9 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize
else
{
//update SvDraw object
- if ( mpGalleryBinaryEngine->GetSvDrawStorage().is() )
+ if ( mpGalleryStorageEngine->GetSvDrawStorage().is() )
{
- SgaObjectSvDraw aNewObj = mpGalleryBinaryEngine->updateSvDrawObject(pEntry);
+ SgaObjectSvDraw aNewObj = mpGalleryStorageEngine->updateSvDrawObject(pEntry);
if (aNewObj.IsValid() && !InsertObject(aNewObj))
pEntry->mbDelete = true;
}
@@ -303,10 +303,10 @@ void GalleryTheme::Actualize( const Link<const INetURLObject&, void>& rActualize
}
// update theme
- mpGalleryBinaryEngine->updateTheme();
+ mpGalleryStorageEngine->updateTheme();
ImplSetModified( true );
if (pThm->IsModified())
- if (!mpGalleryBinaryEngine->implWrite(*this, pThm))
+ if (!mpGalleryStorageEngine->implWrite(*this, pThm))
ImplSetModified(false);
UnlockBroadcaster();
}
@@ -441,7 +441,7 @@ bool GalleryTheme::InsertGraphic(const Graphic& rGraphic, sal_uInt32 nInsertPos)
nExportFormat = ConvertDataFormat::SVM;
}
- const SgaObjectBmp aObjBmp = mpGalleryBinaryEngine->insertGraphic(rGraphic, aGfxLink, nExportFormat, GetParent()->GetUserURL());
+ const SgaObjectBmp aObjBmp = mpGalleryStorageEngine->insertGraphic(rGraphic, aGfxLink, nExportFormat, GetParent()->GetUserURL());
if (aObjBmp.IsValid())
bRet = InsertObject(aObjBmp, nInsertPos);
@@ -457,7 +457,7 @@ bool GalleryTheme::GetModel(sal_uInt32 nPos, SdrModel& rModel)
if( pObject && ( SgaObjKind::SvDraw == pObject->eObjKind ) )
{
- bRet = mpGalleryBinaryEngine->readModel(pObject, rModel);
+ bRet = mpGalleryStorageEngine->readModel(pObject, rModel);
}
return bRet;
@@ -466,7 +466,7 @@ bool GalleryTheme::GetModel(sal_uInt32 nPos, SdrModel& rModel)
bool GalleryTheme::InsertModel(const FmFormModel& rModel, sal_uInt32 nInsertPos)
{
bool bRet = false;
- SgaObjectSvDraw aObjSvDraw = mpGalleryBinaryEngine->insertModel(rModel, GetParent()->GetUserURL());
+ SgaObjectSvDraw aObjSvDraw = mpGalleryStorageEngine->insertModel(rModel, GetParent()->GetUserURL());
if(aObjSvDraw.IsValid())
bRet = InsertObject( aObjSvDraw, nInsertPos );
return bRet;
@@ -479,7 +479,7 @@ bool GalleryTheme::GetModelStream(sal_uInt32 nPos, tools::SvRef<SotStorageStream
if( pObject && ( SgaObjKind::SvDraw == pObject->eObjKind ) )
{
- bRet = mpGalleryBinaryEngine->readModelStream(pObject, rxModelStream);
+ bRet = mpGalleryStorageEngine->readModelStream(pObject, rxModelStream);
}
return bRet;
@@ -489,7 +489,7 @@ bool GalleryTheme::InsertModelStream(const tools::SvRef<SotStorageStream>& rxMod
{
bool bRet = false;
- const SgaObjectSvDraw aObjSvDraw = mpGalleryBinaryEngine->insertModelStream(rxModelStream, GetParent()->GetUserURL());
+ const SgaObjectSvDraw aObjSvDraw = mpGalleryStorageEngine->insertModelStream(rxModelStream, GetParent()->GetUserURL());
if(aObjSvDraw.IsValid())
bRet = InsertObject( aObjSvDraw, nInsertPos );
diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx
index 5c04c26cedb9..c10c16e5c7dd 100644
--- a/svx/source/unogallery/unogalitem.cxx
+++ b/svx/source/unogallery/unogalitem.cxx
@@ -220,7 +220,7 @@ void GalleryItem::_setPropertyValues( const comphelper::PropertyMapEntry** ppEnt
if( pGalTheme )
{
- std::unique_ptr<SgaObject> pObj(pGalTheme->getGalleryBinaryEngine()->implReadSgaObject( implGetObject() ));
+ std::unique_ptr<SgaObject> pObj(pGalTheme->getGalleryStorageEngine()->implReadSgaObject( implGetObject() ));
if( pObj )
{
More information about the Libreoffice-commits
mailing list