From 0992f5cb5465272908aa24d94bc53b5777ba89b9 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 12 Apr 2013 13:54:25 +0100 Subject: publish API for UI library, more slidehack stubs. Change-Id: Iaf5801b208023cfa0c437e8d00049598d5a7077d --- sd/inc/slidehack.hxx | 24 ++++++++++++--------- sd/source/core/slidehack.cxx | 39 ++++++++++++++++++++++++++++++---- sd/source/ui/dlg/GroupSlidesDialog.cxx | 5 ++++- sd/source/ui/dlg/GroupSlidesDialog.hxx | 2 +- 4 files changed, 54 insertions(+), 16 deletions(-) diff --git a/sd/inc/slidehack.hxx b/sd/inc/slidehack.hxx index ce724ea635ea..b806369d3ff9 100644 --- a/sd/inc/slidehack.hxx +++ b/sd/inc/slidehack.hxx @@ -41,6 +41,8 @@ #include #include +#include "sddllapi.h" + class SdPage; namespace SlideHack { @@ -53,8 +55,8 @@ typedef boost::shared_ptr< class VersionData > VersionDataPtr; typedef boost::shared_ptr< class OriginDetails > OriginDetailsPtr; /// version history -class VersionData : public boost::enable_shared_from_this< VersionData >, - private boost::noncopyable +class SD_DLLPUBLIC VersionData : public boost::enable_shared_from_this< VersionData >, + private boost::noncopyable { public: virtual ~VersionData() {} @@ -64,7 +66,8 @@ public: }; /// Tracking where a single slide came from -class Origin +class SD_DLLPUBLIC Origin : public boost::enable_shared_from_this< Origin >, + private boost::noncopyable { friend class Store; private: @@ -76,7 +79,7 @@ public: }; /// Tracking where a single slide came from and some policy around that -class OriginDetails : public Origin +class SD_DLLPUBLIC OriginDetails : public Origin { public: /// how should we set about updating data from this origin ? @@ -97,8 +100,8 @@ private: }; /// Defines information about a group of slides -class GroupMeta : public boost::enable_shared_from_this< GroupMeta >, - private boost::noncopyable +class SD_DLLPUBLIC GroupMeta : public boost::enable_shared_from_this< GroupMeta >, + private boost::noncopyable { public: virtual ~GroupMeta() {} @@ -115,8 +118,8 @@ public: }; /// Defines a group of slides on a related topic -class Group : public boost::enable_shared_from_this< Group >, - private boost::noncopyable +class SD_DLLPUBLIC Group : public boost::enable_shared_from_this< Group >, + private boost::noncopyable { public: virtual ~Group() {} @@ -137,8 +140,8 @@ public: }; /// Overall factory and store for these guys -class Store : public boost::enable_shared_from_this< Store >, - private boost::noncopyable +class SD_DLLPUBLIC Store : public boost::enable_shared_from_this< Store >, + private boost::noncopyable { public: virtual ~Store() {} @@ -156,6 +159,7 @@ public: virtual GroupPtr createGroup( const OUString &rName, const OUString &rTitle, const OUString &rKeywords, + SlideHack::OriginDetails::UpdateType eType, const std::vector< SdPage * > &rPages ) = 0; /// factory function: to get the root diff --git a/sd/source/core/slidehack.cxx b/sd/source/core/slidehack.cxx index cdf251c9ca6d..9a586a457ee7 100644 --- a/sd/source/core/slidehack.cxx +++ b/sd/source/core/slidehack.cxx @@ -12,9 +12,36 @@ namespace SlideHack { namespace { -class ImplStore : public Store { +class GroupImpl : public Group { public: - ImplStore(); + GroupImpl() + { + } + virtual ~GroupImpl() + { + } + + virtual GroupMetaPtr getMetaData() + { + // what is this doing here ? + } + + virtual void fetchData( bool bThumbnail, bool bODPStream ) + { + // queue maDataComplete signal at idle + } + + virtual void getVersions() + { + // queue maVersions signal at idle + } +}; + +class StoreImpl : public Store { +public: + StoreImpl() + { + } virtual sal_uInt32 search( OUString aSearchEntry ) { @@ -32,9 +59,13 @@ public: virtual GroupPtr createGroup( const OUString &rName, const OUString &rTitle, const OUString &rKeywords, + SlideHack::OriginDetails::UpdateType eType, const std::vector< SdPage * > &rPages ) { - return GroupPtr(); + GroupPtr pGroup( new GroupImpl() ); + // FIXME: really need something stored on SdPages for + // the rendering ... + return pGroup; } }; @@ -42,7 +73,7 @@ public: StorePtr Store::getStore() { - return StorePtr( new ImplStore() ); + return StorePtr( new StoreImpl() ); } } // end SlideHack namespace diff --git a/sd/source/ui/dlg/GroupSlidesDialog.cxx b/sd/source/ui/dlg/GroupSlidesDialog.cxx index 9117a5c95769..d433467b8f53 100644 --- a/sd/source/ui/dlg/GroupSlidesDialog.cxx +++ b/sd/source/ui/dlg/GroupSlidesDialog.cxx @@ -29,7 +29,8 @@ namespace { } } -void SdGroupSlidesDialog::addGroupsToCombo( ComboBox /* *pBox, */ SdDrawDocument *pDoc ) +#if 0 +void SdGroupSlidesDialog::addGroupsToCombo( ComboBox /* *pBox */, SdDrawDocument *pDoc ) { #if 0 mpGroupCombo->Clear(); @@ -57,6 +58,7 @@ void SdGroupSlidesDialog::addGroupsToCombo( ComboBox /* *pBox, */ SdDrawDocument #endif } } +#endif SdGroupSlidesDialog::SdGroupSlidesDialog(Window* pWindow, SdDrawDocument* pActDoc, const std::vector< SdPage * > &rPages ) @@ -99,6 +101,7 @@ int SdGroupSlidesDialog::endDialog( bool bSuccessSoSave ) SlideHack::Store::getStore()->createGroup( mpGroupEdit->GetText(), mpTitle->GetText(), mpKeywords->GetText(), + SlideHack::OriginDetails::ORIGIN_UPDATE_MANUAL, maPages ); #if 0 sal_uInt16 nSelected = mpGroupCombo->GetSelectEntryPos(); diff --git a/sd/source/ui/dlg/GroupSlidesDialog.hxx b/sd/source/ui/dlg/GroupSlidesDialog.hxx index 3e347a9ca343..3945e9513c4d 100644 --- a/sd/source/ui/dlg/GroupSlidesDialog.hxx +++ b/sd/source/ui/dlg/GroupSlidesDialog.hxx @@ -54,7 +54,7 @@ private: // ComboBox* mpGroupCombo; Edit *mpGroupEdit; std::vector< SlideHack::GroupPtr > maGroups; - void addGroupsToCombo( ComboBox *pBox, SdDrawDocument *pDoc ); +// void addGroupsToCombo( ComboBox *pBox, SdDrawDocument *pDoc ); Edit *mpTitle; Edit *mpKeywords; -- cgit