[Libreoffice-commits] .: sd/inc sd/source
sd/inc/app.hxx |1 - sd/inc/sddll.hxx|6 -- sd/inc/sdmod.hxx| 10 -- sd/source/ui/animations/CustomAnimationCreateDialog.cxx |1 + sd/source/ui/app/sddll2.cxx |1 + sd/source/ui/app/sdmod.cxx |3 --- sd/source/ui/app/sdmod1.cxx |2 -- sd/source/ui/app/sdmod2.cxx |2 -- sd/source/ui/app/sdresid.cxx|2 +- sd/source/ui/func/fuformatpaintbrush.cxx|1 - sd/source/ui/slidesorter/controller/SlsClipboard.cxx|1 - sd/source/ui/slidesorter/view/SlsButtonBar.cxx |2 +- sd/source/ui/unoidl/unodoc.cxx |2 +- sd/source/ui/unoidl/unomodule.cxx |1 + 14 files changed, 6 insertions(+), 29 deletions(-) New commits: commit d8c9f36ecff6eb88a853fbdff6b240c856598b2b Author: Takeshi Abe Date: Wed Feb 8 01:49:36 2012 +0900 disentangled sddll.hxx vs. sdmod.hxx diff --git a/sd/inc/app.hxx b/sd/inc/app.hxx index e44485a..29cb200 100644 --- a/sd/inc/app.hxx +++ b/sd/inc/app.hxx @@ -25,7 +25,6 @@ * for a copy of the LGPLv3 License. * / -#define _SD_DLL // fuer SD_MOD() #include "sdmod.hxx" /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sddll.hxx b/sd/inc/sddll.hxx index 70b6b2c..642d655 100644 --- a/sd/inc/sddll.hxx +++ b/sd/inc/sddll.hxx @@ -29,7 +29,6 @@ #ifndef _SDDLL_HXX #define _SDDLL_HXX -#include "sdmod.hxx" #include #include @@ -70,11 +69,6 @@ public: }; - -#ifndef _SD_DLL // Das define muss im Draw gesetzt werden -#define SD_MOD() ( *(SdModule**) GetAppData(SHL_DRAW) ) -#endif - #endif // _SDDLL_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx index f133e93..4483a19 100644 --- a/sd/inc/sdmod.hxx +++ b/sd/inc/sdmod.hxx @@ -29,11 +29,6 @@ #ifndef _SDMOD_HXX #define _SDMOD_HXX - -#ifndef _SDDLL_HXX -#define _SD_DLL // fuer SD_MOD() -#include "sddll.hxx"// fuer SdModuleDummy -#endif #include "glob.hxx" #include "pres.hxx" @@ -206,12 +201,7 @@ private: }; - - - -#ifndef SD_MOD #define SD_MOD() ( *(SdModule**) GetAppData(SHL_DRAW) ) -#endif #endif // _SDMOD_HXX diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx index 86d53b7..5ba91ac 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx @@ -51,6 +51,7 @@ #include "CustomAnimationPane.hxx" #include "optsitem.hxx" #include "sddll.hxx" +#include "sdmod.hxx" #include "helpids.h" diff --git a/sd/source/ui/app/sddll2.cxx b/sd/source/ui/app/sddll2.cxx index 469599e..e4c8c4d 100644 --- a/sd/source/ui/app/sddll2.cxx +++ b/sd/source/ui/app/sddll2.cxx @@ -67,6 +67,7 @@ #include #include "sddll.hxx" +#include "sdmod.hxx" #define _SD_DIACTRL_CXX #include "diactrl.hxx" #include "gluectrl.hxx" diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx index f58975c..1b212ac 100644 --- a/sd/source/ui/app/sdmod.cxx +++ b/sd/source/ui/app/sdmod.cxx @@ -50,11 +50,8 @@ #include - -#define _SD_DLL // fuer SD_MOD() #include "sderror.hxx" #include "sdmod.hxx" -#include "sddll.hxx" #include "sdresid.hxx" #include "optsitem.hxx" #include "DrawDocShell.hxx" diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 026ef86..61b2e3d 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -53,9 +53,7 @@ #include "strings.hrc" #include "res_bmp.hrc" -#define _SD_DLL // fuer SD_MOD() #include "sdmod.hxx" -#include "sddll.hxx" #include "pres.hxx" #include "optsitem.hxx" #include "ViewShell.hxx" diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index ceeaf66..2c7f85c 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -53,9 +53,7 @@ #include -#define _SD_DLL // fuer SD_MOD() #include "sdmod.hxx" -#include "sddll.hxx" #include "app.hrc" #include "glob.hrc" #include "strings.hrc" diff --git a/sd/source/ui/app/sdresid.cxx b/sd/source/ui/app/sdresid.cxx index fa13e07..269f384 100644 --- a/sd/source/ui/app/sdresid.cxx +++ b/sd/source/ui/app/sdresid.cxx @@ -27,7 +27,7 @@ / -#include "sddll.hxx" +#include "sdmod.hxx" #include "sdresid.hxx" diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx index 24c33d2..897bf0b 100644 --- a/sd/source/ui/
[Libreoffice-commits] .: sd/inc
sd/inc/cusshow.hxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit ab8f1757cedf0029bf3bec40cfe48069a33151be Author: Ivan Timofeev Date: Wed Feb 1 15:05:27 2012 +0400 add comments diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx index 74c6cfa..64593fa 100644 --- a/sd/inc/cusshow.hxx +++ b/sd/inc/cusshow.hxx @@ -69,8 +69,14 @@ public: // @@@ copy ctor, but no copy assignment? @@@ SdCustomShow( const SdCustomShow& rShow ); +/** Provides a direct access to the collection of the SdPage objects. */ PageVec& PagesVector(); +/** + * Replaces all occurences of pOldPage with pNewPage. + * If pNewPage is 0 then removes all occurences of pOldPage. + */ void ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage ); +/** Removes all occurences of pPage. */ void RemovePage( const SdPage* pPage ); void SetName(const String& rName); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sd/inc sd/source
sd/inc/cusshow.hxx|1 + sd/source/core/cusshow.cxx|7 ++- sd/source/core/drawdoc_animations.cxx |6 +- sd/source/ui/unoidl/unocpres.cxx | 10 -- 4 files changed, 16 insertions(+), 8 deletions(-) New commits: commit f2e17f8f6b6724d7e56d6583d79434372f6221bd Author: Ivan Timofeev Date: Tue Jan 31 21:38:43 2012 +0400 erase garbage after std::remove this fixes commit 5a71069339b3a3c118f3015d978799ef66db7564 diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx index 1bd3614..74c6cfa 100644 --- a/sd/inc/cusshow.hxx +++ b/sd/inc/cusshow.hxx @@ -71,6 +71,7 @@ public: PageVec& PagesVector(); void ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage ); +void RemovePage( const SdPage* pPage ); void SetName(const String& rName); String GetName() const; diff --git a/sd/source/core/cusshow.cxx b/sd/source/core/cusshow.cxx index dcdb343..d3233b7 100644 --- a/sd/source/core/cusshow.cxx +++ b/sd/source/core/cusshow.cxx @@ -106,7 +106,7 @@ void SdCustomShow::ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage ) { if( !pNewPage ) { -::std::remove(maPages.begin(), maPages.end(), pOldPage); +RemovePage(pOldPage); } else { @@ -114,6 +114,11 @@ void SdCustomShow::ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage ) } } +void SdCustomShow::RemovePage( const SdPage* pPage ) +{ +maPages.erase(::std::remove(maPages.begin(), maPages.end(), pPage), maPages.end()); +} + void SdCustomShow::SetName(const String& rName) { aName = rName; diff --git a/sd/source/core/drawdoc_animations.cxx b/sd/source/core/drawdoc_animations.cxx index de62ec5..375dd4d 100644 --- a/sd/source/core/drawdoc_animations.cxx +++ b/sd/source/core/drawdoc_animations.cxx @@ -43,11 +43,7 @@ void SdDrawDocument::ReplacePageInCustomShows( const SdPage* pOldPage, const SdP for (sal_uLong i = 0; i < mpCustomShowList->Count(); i++) { SdCustomShow* pCustomShow = (SdCustomShow*) mpCustomShowList->GetObject(i); -if( pNewPage == 0 ) -::std::remove(pCustomShow->PagesVector().begin(), pCustomShow->PagesVector().end(), -pOldPage); -else -pCustomShow->ReplacePage(pOldPage,pNewPage); +pCustomShow->ReplacePage(pOldPage, pNewPage); } } } diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx index e0aa857..e44f61e 100644 --- a/sd/source/ui/unoidl/unocpres.cxx +++ b/sd/source/ui/unoidl/unocpres.cxx @@ -144,10 +144,16 @@ void SAL_CALL SdXCustomPresentation::removeByIndex( sal_Int32 Index ) if( xPage.is() ) { -SvxDrawPage* pPage = SvxDrawPage::getImplementation( xPage ); +SvxDrawPage* pPage = SvxDrawPage::getImplementation( xPage ); if(pPage) -::std::remove(mpSdCustomShow->PagesVector().begin(), mpSdCustomShow->PagesVector().end(), +{ +SdCustomShow::PageVec::iterator it = std::find( +mpSdCustomShow->PagesVector().begin(), +mpSdCustomShow->PagesVector().end(), pPage->GetSdrPage()); +if (it != mpSdCustomShow->PagesVector().end()) +mpSdCustomShow->PagesVector().erase(it); +} } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sd/inc sd/source
sd/inc/cusshow.hxx | 14 +- sd/source/core/cusshow.cxx | 28 ++-- sd/source/core/drawdoc_animations.cxx|3 ++- sd/source/filter/ppt/pptin.cxx |2 +- sd/source/ui/dlg/custsdlg.cxx| 26 +- sd/source/ui/dlg/sdtreelb.cxx|4 ++-- sd/source/ui/slideshow/slideshowimpl.cxx | 10 +- sd/source/ui/unoidl/unocpres.cxx | 16 ++-- 8 files changed, 52 insertions(+), 51 deletions(-) New commits: commit 5a71069339b3a3c118f3015d978799ef66db7564 Author: Noel Grandin Date: Tue Jan 31 14:16:38 2012 + convert SdCustomeShow from tools/list to vector diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx index 1f981e9..1bd3614 100644 --- a/sd/inc/cusshow.hxx +++ b/sd/inc/cusshow.hxx @@ -29,7 +29,7 @@ #ifndef _SD_CUSSHOW_HXX #define _SD_CUSSHOW_HXX -#include +#include #include #include #include @@ -43,9 +43,13 @@ class SdPage; |* CustomShow |* \/ -class SD_DLLPUBLIC SdCustomShow : public List +class SD_DLLPUBLIC SdCustomShow { +public: +typedef ::std::vector PageVec; + private: +PageVec maPages; String aName; SdDrawDocument* pDoc; @@ -65,14 +69,14 @@ public: // @@@ copy ctor, but no copy assignment? @@@ SdCustomShow( const SdCustomShow& rShow ); +PageVec& PagesVector(); +void ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage ); + void SetName(const String& rName); String GetName() const; SdDrawDocument* GetDoc() const { return pDoc; } -void ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage ); -void RemovePage( const SdPage* pPage ); - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoCustomShow(); }; diff --git a/sd/source/core/cusshow.cxx b/sd/source/core/cusshow.cxx index c604344..dcdb343 100644 --- a/sd/source/core/cusshow.cxx +++ b/sd/source/core/cusshow.cxx @@ -45,7 +45,7 @@ using namespace ::com::sun::star; |* \/ SdCustomShow::SdCustomShow(SdDrawDocument* pDrawDoc) - : List(), + : maPages(), pDoc(pDrawDoc) { } @@ -56,14 +56,14 @@ SdCustomShow::SdCustomShow(SdDrawDocument* pDrawDoc) |* \/ SdCustomShow::SdCustomShow( const SdCustomShow& rShow ) -: List( rShow ) +: maPages(rShow.maPages) { aName = rShow.GetName(); pDoc = rShow.GetDoc(); } SdCustomShow::SdCustomShow(SdDrawDocument* pDrawDoc, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xShow ) - : List(), + : maPages(), pDoc(pDrawDoc), mxUnoCustomShow( xShow ) { @@ -97,28 +97,20 @@ uno::Reference< uno::XInterface > SdCustomShow::getUnoCustomShow() return xShow; } +SdCustomShow::PageVec& SdCustomShow::PagesVector() +{ +return maPages; +} + void SdCustomShow::ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage ) { if( !pNewPage ) { -RemovePage( pOldPage ); +::std::remove(maPages.begin(), maPages.end(), pOldPage); } else { -sal_uLong nPos; -while( (nPos = GetPos( (void*)pOldPage )) != CONTAINER_ENTRY_NOTFOUND ) -{ -Replace( (void*)pNewPage, nPos ); -} -} -} - -void SdCustomShow::RemovePage( const SdPage* pPage ) -{ -sal_uLong nPos; -while( (nPos = GetPos( (void*)pPage )) != CONTAINER_ENTRY_NOTFOUND ) -{ -Remove( nPos ); +::std::replace(maPages.begin(), maPages.end(), pOldPage, pNewPage); } } diff --git a/sd/source/core/drawdoc_animations.cxx b/sd/source/core/drawdoc_animations.cxx index 5b41d0c..de62ec5 100644 --- a/sd/source/core/drawdoc_animations.cxx +++ b/sd/source/core/drawdoc_animations.cxx @@ -44,7 +44,8 @@ void SdDrawDocument::ReplacePageInCustomShows( const SdPage* pOldPage, const SdP { SdCustomShow* pCustomShow = (SdCustomShow*) mpCustomShowList->GetObject(i); if( pNewPage == 0 ) -pCustomShow->RemovePage(pOldPage); +::std::remove(pCustomShow->PagesVector().begin(), pCustomShow->PagesVector().end(), +pOldPage); else pCustomShow->ReplacePage(pOldPage,pNewPage); } diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 203d2f3..af5dd14 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -1301,7 +1301,7 @@ sal_Bool ImplSdPPTImport::Import() SdPage* pPage = mpDoc->GetSdPage( nPage, PK_STANDARD ); if ( pPage ) { -pSdCus