LibreOffice Module svx (master)  1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
GalleryTheme Class Reference

#include <galtheme.hxx>

Inheritance diagram for GalleryTheme:
[legend]
Collaboration diagram for GalleryTheme:
[legend]

Public Member Functions

virtual SAL_DLLPRIVATE ~GalleryTheme () override
 
SAL_DLLPRIVATE sal_uInt32 GetObjectCount () const
 
std::unique_ptr< SgaObjectAcquireObject (sal_uInt32 nPos)
 
bool InsertObject (const SgaObject &rObj, sal_uInt32 nPos=SAL_MAX_UINT32)
 
void RemoveObject (sal_uInt32 nPos)
 
SAL_DLLPRIVATE bool ChangeObjectPos (sal_uInt32 nOldPos, sal_uInt32 nNewPos)
 
const OUString & GetName () const
 
SAL_DLLPRIVATE void SetDestDir (const OUString &rDestDir, bool bRelative)
 
SAL_DLLPRIVATE const INetURLObjectGetThmURL () const
 
const INetURLObjectGetSdgURL () const
 
SAL_DLLPRIVATE const INetURLObjectGetSdvURL () const
 
SAL_DLLPRIVATE const INetURLObjectGetStrURL () const
 
sal_uInt32 GetId () const
 
SAL_DLLPRIVATE void SetId (sal_uInt32 nNewId, bool bResetThemeName)
 
SAL_DLLPRIVATE void SetDragging (bool bSet)
 
SAL_DLLPRIVATE bool IsDragging () const
 
SAL_DLLPRIVATE void LockTheme ()
 
SAL_DLLPRIVATE bool UnlockTheme ()
 
SAL_DLLPRIVATE void LockBroadcaster ()
 
void UnlockBroadcaster ()
 
SAL_DLLPRIVATE bool IsBroadcasterLocked () const
 
SAL_DLLPRIVATE void SetDragPos (sal_uInt32 nPos)
 
SAL_DLLPRIVATE sal_uInt32 GetDragPos () const
 
SAL_DLLPRIVATE bool IsThemeNameFromResource () const
 
bool IsReadOnly () const
 
bool IsDefault () const
 
void Actualize (const Link< const INetURLObject &, void > &rActualizeLink, GalleryProgress *pProgress=nullptr)
 
SAL_DLLPRIVATE void AbortActualize ()
 
SAL_DLLPRIVATE GalleryGetParent () const
 
SAL_DLLPRIVATE const tools::SvRef< SotStorage > & GetSvDrawStorage () const
 
SAL_DLLPRIVATE SgaObjKind GetObjectKind (sal_uInt32 nPos) const
 
SAL_DLLPRIVATE const INetURLObjectGetObjectURL (sal_uInt32 nPos) const
 
SAL_DLLPRIVATE bool GetThumb (sal_uInt32 nPos, BitmapEx &rBmp)
 
bool GetGraphic (sal_uInt32 nPos, Graphic &rGraphic)
 
bool InsertGraphic (const Graphic &rGraphic, sal_uInt32 nInsertPos)
 
bool GetModel (sal_uInt32 nPos, SdrModel &rModel)
 
bool InsertModel (const FmFormModel &rModel, sal_uInt32 nInsertPos)
 
SAL_DLLPRIVATE bool GetModelStream (sal_uInt32 nPos, tools::SvRef< SotStorageStream > const &rModelStreamRef)
 
SAL_DLLPRIVATE bool InsertModelStream (const tools::SvRef< SotStorageStream > &rModelStream, sal_uInt32 nInsertPos)
 
SAL_DLLPRIVATE bool GetURL (sal_uInt32 nPos, INetURLObject &rURL)
 
bool InsertURL (const INetURLObject &rURL, sal_uInt32 nInsertPos=SAL_MAX_UINT32)
 
SAL_DLLPRIVATE bool InsertFileOrDirURL (const INetURLObject &rFileOrDirURL, sal_uInt32 nInsertPos)
 
SAL_DLLPRIVATE bool InsertTransferable (const css::uno::Reference< css::datatransfer::XTransferable > &rxTransferable, sal_uInt32 nInsertPos)
 
SAL_DLLPRIVATE void CopyToClipboard (vcl::Window *pWindow, sal_uInt32 nPos)
 
SAL_DLLPRIVATE void StartDrag (vcl::Window *pWindow, sal_uInt32 nPos)
 
SAL_DLLPRIVATE SvStreamWriteData (SvStream &rOut) const
 
SAL_DLLPRIVATE SvStreamReadData (SvStream &rIn)
 
SAL_DLLPRIVATE void GetPreviewBitmapExAndStrings (sal_uInt32 nPos, BitmapEx &rBitmapEx, Size &rSize, OUString &rTitle, OUString &rPath) const
 
SAL_DLLPRIVATE void SetPreviewBitmapExAndStrings (sal_uInt32 nPos, const BitmapEx &rBitmapEx, const Size &rSize, const OUString &rTitle, const OUString &rPath)
 
- Public Member Functions inherited from SfxBroadcaster
 SfxBroadcaster ()
 
 SfxBroadcaster (const SfxBroadcaster &rBC)
 
virtual ~SfxBroadcaster () COVERITY_NOEXCEPT_FALSE
 
void Broadcast (const SfxHint &rHint)
 
bool HasListeners () const
 
size_t GetListenerCount () const
 
size_t GetSizeOfVector () const
 
SfxListenerGetListener (size_t nNo) const
 

Static Public Member Functions

static SAL_DLLPRIVATE GalleryThemeEntryCreateThemeEntry (const INetURLObject &rURL, bool bReadOnly)
 
static void InsertAllThemes (weld::ComboBox &rListBox)
 

Private Member Functions

SAL_DLLPRIVATE void ImplCreateSvDrawStorage ()
 
std::unique_ptr< SgaObjectImplReadSgaObject (GalleryObject const *pEntry)
 
SAL_DLLPRIVATE bool ImplWriteSgaObject (const SgaObject &rObj, sal_uInt32 nPos, GalleryObject *pExistentEntry)
 
SAL_DLLPRIVATE void ImplWrite ()
 
SAL_DLLPRIVATE const GalleryObjectImplGetGalleryObject (sal_uInt32 nPos) const
 
const GalleryObjectImplGetGalleryObject (const INetURLObject &rURL)
 
SAL_DLLPRIVATE sal_uInt32 ImplGetGalleryObjectPos (const GalleryObject *pObj) const
 
SAL_DLLPRIVATE INetURLObject ImplCreateUniqueURL (SgaObjKind eObjKind, ConvertDataFormat nFormat=ConvertDataFormat::Unknown)
 
SAL_DLLPRIVATE void ImplSetModified (bool bModified)
 
SAL_DLLPRIVATE void ImplBroadcast (sal_uInt32 nUpdatePos)
 
SAL_DLLPRIVATE GalleryTheme (Gallery *pGallery, GalleryThemeEntry *pThemeEntry)
 
 GalleryTheme (GalleryTheme const &)=delete
 
void operator= (GalleryTheme const &)=delete
 

Static Private Member Functions

static SAL_DLLPRIVATE INetURLObject ImplGetURL (const GalleryObject *pObject)
 

Private Attributes

::std::vector< std::unique_ptr< GalleryObject > > aObjectList
 
OUString m_aDestDir
 
bool m_bDestDirRelative
 
tools::SvRef< SotStorageaSvDrawStorageRef
 
Gallery *const pParent
 
GalleryThemeEntrypThm
 
sal_uInt32 mnThemeLockCount
 
sal_uInt32 mnBroadcasterLockCount
 
sal_uInt32 nDragPos
 
bool bDragging
 
bool bAbortActualize
 

Friends

class Gallery
 
class GalleryThemeCacheEntry
 
class ::unogallery::GalleryTheme
 
class ::unogallery::GalleryItem
 

Additional Inherited Members

- Protected Member Functions inherited from SfxBroadcaster
void Forward (SfxBroadcaster &rBC, const SfxHint &rHint)
 

Detailed Description

Definition at line 67 of file galtheme.hxx.

Constructor & Destructor Documentation

GalleryTheme::GalleryTheme ( Gallery pGallery,
GalleryThemeEntry pThemeEntry 
)
private

Definition at line 67 of file galtheme.cxx.

References ImplCreateSvDrawStorage().

GalleryTheme::GalleryTheme ( GalleryTheme const &  )
privatedelete
GalleryTheme::~GalleryTheme ( )
overridevirtual

Definition at line 80 of file galtheme.cxx.

References aObjectList, SfxBroadcaster::Broadcast(), CLOSE_OBJECT, GetName(), and ImplWrite().

Member Function Documentation

SAL_DLLPRIVATE void GalleryTheme::AbortActualize ( )
inline

Definition at line 160 of file galtheme.hxx.

std::unique_ptr< SgaObject > GalleryTheme::AcquireObject ( sal_uInt32  nPos)
void GalleryTheme::Actualize ( const Link< const INetURLObject &, void > &  rActualizeLink,
GalleryProgress pProgress = nullptr 
)
bool GalleryTheme::ChangeObjectPos ( sal_uInt32  nOldPos,
sal_uInt32  nNewPos 
)

Definition at line 453 of file galtheme.cxx.

References aObjectList, ImplBroadcast(), and ImplSetModified().

Referenced by GalleryBrowser2::ExecuteDrop().

void GalleryTheme::CopyToClipboard ( vcl::Window pWindow,
sal_uInt32  nPos 
)

Definition at line 1224 of file galtheme.cxx.

References TransferableHelper::CopyToClipboard().

Referenced by GalleryBrowser2::Execute().

GalleryThemeEntry * GalleryTheme::CreateThemeEntry ( const INetURLObject rURL,
bool  bReadOnly 
)
static
SAL_DLLPRIVATE sal_uInt32 GalleryTheme::GetDragPos ( ) const
inline

Definition at line 152 of file galtheme.hxx.

Referenced by GalleryBrowser2::ExecuteDrop().

bool GalleryTheme::GetGraphic ( sal_uInt32  nPos,
Graphic rGraphic 
)
sal_uInt32 GalleryTheme::GetId ( ) const

Definition at line 1467 of file galtheme.cxx.

References GalleryThemeEntry::GetId(), and pThm.

Referenced by WriteData().

bool GalleryTheme::GetModel ( sal_uInt32  nPos,
SdrModel rModel 
)
bool GalleryTheme::GetModelStream ( sal_uInt32  nPos,
tools::SvRef< SotStorageStream > const &  rModelStreamRef 
)
const OUString & GalleryTheme::GetName ( ) const
SAL_DLLPRIVATE sal_uInt32 GalleryTheme::GetObjectCount ( ) const
inline
SAL_DLLPRIVATE SgaObjKind GalleryTheme::GetObjectKind ( sal_uInt32  nPos) const
inline
SAL_DLLPRIVATE const INetURLObject& GalleryTheme::GetObjectURL ( sal_uInt32  nPos) const
inline
SAL_DLLPRIVATE Gallery* GalleryTheme::GetParent ( ) const
inline

Definition at line 162 of file galtheme.hxx.

Referenced by ImplCreateUniqueURL(), ReadData(), and WriteData().

void GalleryTheme::GetPreviewBitmapExAndStrings ( sal_uInt32  nPos,
BitmapEx rBitmapEx,
Size rSize,
OUString &  rTitle,
OUString &  rPath 
) const
const INetURLObject & GalleryTheme::GetSdgURL ( ) const
const INetURLObject & GalleryTheme::GetSdvURL ( ) const

Definition at line 1465 of file galtheme.cxx.

References GalleryThemeEntry::GetSdvURL(), and pThm.

Referenced by Actualize(), ImplCreateSvDrawStorage(), and Gallery::RemoveTheme().

const INetURLObject & GalleryTheme::GetStrURL ( ) const

Definition at line 1466 of file galtheme.cxx.

References GalleryThemeEntry::GetStrURL(), and pThm.

Referenced by Gallery::RemoveTheme().

const tools::SvRef< SotStorage > & GalleryTheme::GetSvDrawStorage ( ) const

Definition at line 1473 of file galtheme.cxx.

References aSvDrawStorageRef.

Referenced by GetModel(), GetModelStream(), InsertModel(), and InsertModelStream().

const INetURLObject & GalleryTheme::GetThmURL ( ) const
bool GalleryTheme::GetThumb ( sal_uInt32  nPos,
BitmapEx rBmp 
)

Definition at line 717 of file galtheme.cxx.

References AcquireObject().

Referenced by GalleryExplorer::GetSdrObj().

bool GalleryTheme::GetURL ( sal_uInt32  nPos,
INetURLObject rURL 
)
void GalleryTheme::ImplBroadcast ( sal_uInt32  nUpdatePos)
private
void GalleryTheme::ImplCreateSvDrawStorage ( )
private
INetURLObject GalleryTheme::ImplCreateUniqueURL ( SgaObjKind  eObjKind,
ConvertDataFormat  nFormat = ConvertDataFormat::Unknown 
)
private
SAL_DLLPRIVATE const GalleryObject* GalleryTheme::ImplGetGalleryObject ( sal_uInt32  nPos) const
inlineprivate

Definition at line 92 of file galtheme.hxx.

Referenced by AcquireObject(), GetGraphic(), GetModel(), GetModelStream(), GetURL(), and WriteData().

const GalleryObject * GalleryTheme::ImplGetGalleryObject ( const INetURLObject rURL)
private

Definition at line 222 of file galtheme.cxx.

References aObjectList, and i.

SAL_DLLPRIVATE sal_uInt32 GalleryTheme::ImplGetGalleryObjectPos ( const GalleryObject pObj) const
inlineprivate

Definition at line 96 of file galtheme.hxx.

References i, and SAL_MAX_UINT32.

INetURLObject GalleryTheme::ImplGetURL ( const GalleryObject pObject)
staticprivate

Definition at line 230 of file galtheme.cxx.

References GalleryObject::aURL.

Referenced by GetGraphic(), GetModel(), GetModelStream(), and GetURL().

std::unique_ptr< SgaObject > GalleryTheme::ImplReadSgaObject ( GalleryObject const *  pEntry)
private
void GalleryTheme::ImplSetModified ( bool  bModified)
private
void GalleryTheme::ImplWrite ( )
private
bool GalleryTheme::ImplWriteSgaObject ( const SgaObject rObj,
sal_uInt32  nPos,
GalleryObject pExistentEntry 
)
private
void GalleryTheme::InsertAllThemes ( weld::ComboBox rListBox)
static
bool GalleryTheme::InsertFileOrDirURL ( const INetURLObject rFileOrDirURL,
sal_uInt32  nInsertPos 
)
bool GalleryTheme::InsertGraphic ( const Graphic rGraphic,
sal_uInt32  nInsertPos 
)
bool GalleryTheme::InsertModel ( const FmFormModel rModel,
sal_uInt32  nInsertPos 
)
bool GalleryTheme::InsertModelStream ( const tools::SvRef< SotStorageStream > &  rModelStream,
sal_uInt32  nInsertPos 
)
bool GalleryTheme::InsertObject ( const SgaObject rObj,
sal_uInt32  nPos = SAL_MAX_UINT32 
)
bool GalleryTheme::InsertTransferable ( const css::uno::Reference< css::datatransfer::XTransferable > &  rxTransferable,
sal_uInt32  nInsertPos 
)
bool GalleryTheme::InsertURL ( const INetURLObject rURL,
sal_uInt32  nInsertPos = SAL_MAX_UINT32 
)
SAL_DLLPRIVATE bool GalleryTheme::IsBroadcasterLocked ( ) const
inline

Definition at line 149 of file galtheme.hxx.

Referenced by ImplBroadcast().

bool GalleryTheme::IsDefault ( ) const

Definition at line 1471 of file galtheme.cxx.

References GalleryThemeEntry::IsDefault(), and pThm.

Referenced by GalleryBrowser1::ImplGetExecuteVector().

SAL_DLLPRIVATE bool GalleryTheme::IsDragging ( ) const
inline

Definition at line 142 of file galtheme.hxx.

Referenced by GalleryBrowser2::AcceptDrop(), and GalleryBrowser2::ExecuteDrop().

bool GalleryTheme::IsReadOnly ( ) const
bool GalleryTheme::IsThemeNameFromResource ( ) const

Definition at line 1469 of file galtheme.cxx.

References GalleryThemeEntry::IsNameFromResource(), and pThm.

Referenced by WriteData().

SAL_DLLPRIVATE void GalleryTheme::LockBroadcaster ( )
inline

Definition at line 147 of file galtheme.hxx.

Referenced by Actualize().

SAL_DLLPRIVATE void GalleryTheme::LockTheme ( )
inline

Definition at line 144 of file galtheme.hxx.

Referenced by GalleryExplorer::BeginLocking().

void GalleryTheme::operator= ( GalleryTheme const &  )
privatedelete
SvStream & GalleryTheme::ReadData ( SvStream rIn)
void GalleryTheme::RemoveObject ( sal_uInt32  nPos)
SAL_DLLPRIVATE void GalleryTheme::SetDestDir ( const OUString &  rDestDir,
bool  bRelative 
)
inline

Definition at line 130 of file galtheme.hxx.

SAL_DLLPRIVATE void GalleryTheme::SetDragging ( bool  bSet)
inline
SAL_DLLPRIVATE void GalleryTheme::SetDragPos ( sal_uInt32  nPos)
inline
void GalleryTheme::SetId ( sal_uInt32  nNewId,
bool  bResetThemeName 
)

Definition at line 1468 of file galtheme.cxx.

References pThm, and GalleryThemeEntry::SetId().

Referenced by GalleryBrowser1::ImplExecute(), and ReadData().

void GalleryTheme::SetPreviewBitmapExAndStrings ( sal_uInt32  nPos,
const BitmapEx rBitmapEx,
const Size rSize,
const OUString &  rTitle,
const OUString &  rPath 
)
void GalleryTheme::StartDrag ( vcl::Window pWindow,
sal_uInt32  nPos 
)
void GalleryTheme::UnlockBroadcaster ( )

Definition at line 356 of file galtheme.cxx.

References DBG_ASSERT, ImplBroadcast(), and mnBroadcasterLockCount.

Referenced by Actualize().

bool GalleryTheme::UnlockTheme ( )

Definition at line 341 of file galtheme.cxx.

References DBG_ASSERT, and mnThemeLockCount.

Referenced by GalleryExplorer::EndLocking().

SvStream & GalleryTheme::WriteData ( SvStream rOut) const

Friends And Related Function Documentation

friend class ::unogallery::GalleryItem
friend

Definition at line 72 of file galtheme.hxx.

friend class ::unogallery::GalleryTheme
friend

Definition at line 71 of file galtheme.hxx.

friend class Gallery
friend

Definition at line 69 of file galtheme.hxx.

friend class GalleryThemeCacheEntry
friend

Definition at line 70 of file galtheme.hxx.

Member Data Documentation

::std::vector< std::unique_ptr<GalleryObject> > GalleryTheme::aObjectList
private
tools::SvRef<SotStorage> GalleryTheme::aSvDrawStorageRef
private

Definition at line 79 of file galtheme.hxx.

Referenced by Actualize(), GetSvDrawStorage(), ImplCreateSvDrawStorage(), and RemoveObject().

bool GalleryTheme::bAbortActualize
private

Definition at line 86 of file galtheme.hxx.

Referenced by Actualize().

bool GalleryTheme::bDragging
private

Definition at line 85 of file galtheme.hxx.

OUString GalleryTheme::m_aDestDir
private

Definition at line 77 of file galtheme.hxx.

Referenced by ImplWriteSgaObject(), and WriteData().

bool GalleryTheme::m_bDestDirRelative
private

Definition at line 78 of file galtheme.hxx.

Referenced by WriteData().

sal_uInt32 GalleryTheme::mnBroadcasterLockCount
private

Definition at line 83 of file galtheme.hxx.

Referenced by UnlockBroadcaster().

sal_uInt32 GalleryTheme::mnThemeLockCount
private

Definition at line 82 of file galtheme.hxx.

Referenced by UnlockTheme().

sal_uInt32 GalleryTheme::nDragPos
private

Definition at line 84 of file galtheme.hxx.

Gallery* const GalleryTheme::pParent
private

Definition at line 80 of file galtheme.hxx.

GalleryThemeEntry* GalleryTheme::pThm
private

The documentation for this class was generated from the following files: