[Libreoffice-commits] core.git: Branch 'feature/slidehack' - sd/inc sd/source

Michael Meeks michael.meeks at suse.com
Fri Apr 12 05:55:21 PDT 2013


 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(-)

New commits:
commit 0992f5cb5465272908aa24d94bc53b5777ba89b9
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Fri Apr 12 13:54:25 2013 +0100

    publish API for UI library, more slidehack stubs.
    
    Change-Id: Iaf5801b208023cfa0c437e8d00049598d5a7077d

diff --git a/sd/inc/slidehack.hxx b/sd/inc/slidehack.hxx
index ce724ea..b806369 100644
--- a/sd/inc/slidehack.hxx
+++ b/sd/inc/slidehack.hxx
@@ -41,6 +41,8 @@
 #include <tools/datetime.hxx>
 #include <vcl/bitmapex.hxx>
 
+#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 cdf251c..9a586a4 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 9117a5c..d433467 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 3e347a9..3945e95 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;


More information about the Libreoffice-commits mailing list