diff options
author | Andras Timar <atimar@suse.com> | 2012-10-13 17:41:05 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-10-13 17:41:05 +0200 |
commit | e5ce011c3f32f53ef073aec5485450b2588b656a (patch) | |
tree | 8a838a53bcdd70cc3d4cdbca0ebe07504790952e /sd | |
parent | c6b26144c93aa5222e4260c5b0ef45ce5bdc18d2 (diff) | |
parent | e74fc93e4aba7887e6a278cc44c4bc0962471065 (diff) |
Merge branch 'master' into feature/killsdf
Conflicts:
Makefile.top
Module_tail_build.mk
RepositoryExternal.mk
RepositoryFixes.mk
accessibility/source/standard/vclxaccessibletoolbox.cxx
basic/source/uno/dlgcont.cxx
connectivity/Library_ado.mk
cross_tail_build/prj/build.lst
desktop/source/offacc/acceptor.cxx
filter/Library_PptImporter.mk
filter/source/t602/filterenv.cxx
i18npool/Library_textconv_dict.mk
ooo.lst.in
saxon/ExternalProject_saxon.mk
saxon/build.xml
sc/sdi/scalc.sdi
sc/source/filter/xml/xmlstyli.cxx
sc/source/ui/condformat/condformatdlg.cxx
sc/source/ui/condformat/condformatmgr.cxx
sc/source/ui/view/cellsh1.cxx
sdext/source/pdfimport/misc/pwdinteract.cxx
shell/qa/zip/makefile.mk
shell/qa/zip/testimpl/makefile.mk
solenv/gbuild/CppunitTest.mk
solenv/gbuild/gbuild.mk
solenv/gbuild/platform/android.mk
solenv/gbuild/platform/com_GCC_defs.mk
solenv/gbuild/platform/macosx.mk
soltools/Executable_adjustvisibility.mk
soltools/Executable_checkdll.mk
soltools/Executable_cpp.mk
soltools/Executable_javadep.mk
soltools/Executable_makedepend.mk
sw/qa/extras/rtfimport/rtfimport.cxx
tail_build/prj/build.lst
tomcat/ExternalProject_tomcat.mk
ucb/source/ucp/webdav/webdavcontent.cxx
xml2cmp/Executable_xml2cmp.mk
Diffstat (limited to 'sd')
52 files changed, 369 insertions, 587 deletions
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index 05a7baf7c9d1..ba2fe9ef4ff8 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -257,7 +257,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/ui/framework/module/ImpressModule \ sd/source/ui/framework/module/ModuleController \ sd/source/ui/framework/module/PresentationModule \ - sd/source/ui/framework/module/ReadOnlyModeObserver \ sd/source/ui/framework/module/ResourceManager \ sd/source/ui/framework/module/ShellStackGuard \ sd/source/ui/framework/module/SlideSorterModule \ diff --git a/sd/inc/sdfilter.hxx b/sd/inc/sdfilter.hxx index 1f3ea8024930..d44121487001 100644 --- a/sd/inc/sdfilter.hxx +++ b/sd/inc/sdfilter.hxx @@ -57,8 +57,9 @@ protected: SdDrawDocument& mrDocument; sal_Bool mbIsDraw : 1; sal_Bool mbShowProgress : 1; - +#ifndef DISABLE_DYNLOADING ::osl::Module* OpenLibrary( const ::rtl::OUString& rLibraryName ) const; +#endif void CreateStatusIndicator(); private: diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx index 364df812206a..191bcf97b471 100644 --- a/sd/inc/stlsheet.hxx +++ b/sd/inc/stlsheet.hxx @@ -54,13 +54,13 @@ public: SdStyleSheet( const rtl::OUString& rDisplayName, SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily, sal_uInt16 nMask ); SdStyleSheet( const SdStyleSheet& ); - virtual sal_Bool SetParent (const String& rParentName); + virtual bool SetParent (const String& rParentName); virtual SfxItemSet& GetItemSet(); - virtual sal_Bool IsUsed() const; - virtual sal_Bool HasFollowSupport() const; - virtual sal_Bool HasParentSupport() const; - virtual sal_Bool HasClearParentSupport() const; - virtual sal_Bool SetName( const UniString& ); + virtual bool IsUsed() const; + virtual bool HasFollowSupport() const; + virtual bool HasParentSupport() const; + virtual bool HasClearParentSupport() const; + virtual bool SetName( const UniString& ); virtual void SetHelpId( const String& r, sal_uLong nId ); void AdjustToFontHeight(SfxItemSet& rSet, sal_Bool bOnlyMissingItems = sal_True); diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index 4b09d0c9d29a..cc811d591d0a 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -80,6 +80,11 @@ interface DrawView ExecMethod = FuTemporary ; StateMethod = GetMenuState ; ] + SID_EXTERNAL_EDIT + [ + ExecMethod = FuTemporary ; + StateMethod = GetMenuState ; + ] SID_CUT // ole : no, status : ? [ ExecMethod = FuSupport ; diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index 8eb74eeaabcf..87e19f8ee4a5 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -31,7 +31,7 @@ #include <com/sun/star/animations/XAnimationNodeSupplier.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/xml/sax/InputSource.hpp> -#include <com/sun/star/xml/sax/XParser.hpp> +#include <com/sun/star/xml/sax/Parser.hpp> #include <com/sun/star/xml/sax/SAXParseException.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/presentation/EffectPresetClass.hpp> @@ -266,11 +266,7 @@ Reference< XAnimationNode > implImportEffects( const Reference< XMultiServiceFac aParserInput.aInputStream = xInputStream; // get parser - Reference< xml::sax::XParser > xParser( xServiceFactory->createInstance("com.sun.star.xml.sax.Parser" ), UNO_QUERY ); - - DBG_ASSERT( xParser.is(), "Can't create parser" ); - if( !xParser.is() ) - return xRootNode; + Reference< xml::sax::XParser > xParser = xml::sax::Parser::create( comphelper::getComponentContext(xServiceFactory) ); // get filter Reference< xml::sax::XDocumentHandler > xFilter( xServiceFactory->createInstance("com.sun.star.comp.Xmloff.AnimationsImport" ), UNO_QUERY ); diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index ab8b0e5e82c6..50a3466ed350 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -127,7 +127,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc |* \************************************************************************/ -void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBookmarkDoc, +static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBookmarkDoc, const std::vector<rtl::OUString> &rBookmarkList, sal_uInt16 nBMSdPageCount, InsertBookmarkAsPage_FindDuplicateLayouts& rPageIterator ) { diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 0d44e14e3029..7c52a626de85 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1214,7 +1214,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize); if( bRightToLeft && (nLayout != 9) ) - ::std::swap< Rectangle >( rRectangle[1], rRectangle[2] ); + ::std::swap( rRectangle[1], rRectangle[2] ); break; case 2: // title, shape, 2 shapes aTempPnt = aLayoutPos; @@ -1234,7 +1234,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe if( bRightToLeft ) { - ::std::swap< long >( rRectangle[1].Left(), rRectangle[2].Left() ); + ::std::swap( rRectangle[1].Left(), rRectangle[2].Left() ); rRectangle[3].Left() = rRectangle[2].Left(); } break; @@ -1256,7 +1256,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe if( bRightToLeft ) { - ::std::swap< long >( rRectangle[1].Left(), rRectangle[2].Left() ); + ::std::swap( rRectangle[1].Left(), rRectangle[2].Left() ); rRectangle[3].Left() = rRectangle[2].Left(); } break; diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 4bedcc0fdbfc..5c56cfbf97d9 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -197,9 +197,9 @@ void SdStyleSheet::Store(SvStream& rOut) |* \************************************************************************/ -sal_Bool SdStyleSheet::SetParent(const String& rParentName) +bool SdStyleSheet::SetParent(const String& rParentName) { - sal_Bool bResult = sal_False; + bool bResult = sal_False; if (SfxStyleSheet::SetParent(rParentName)) { @@ -211,7 +211,7 @@ sal_Bool SdStyleSheet::SetParent(const String& rParentName) SfxStyleSheetBase* pStyle = pPool->Find(rParentName, nFamily); if (pStyle) { - bResult = sal_True; + bResult = true; SfxItemSet& rParentSet = pStyle->GetItemSet(); GetItemSet().SetParent(&rParentSet); Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) ); @@ -219,14 +219,14 @@ sal_Bool SdStyleSheet::SetParent(const String& rParentName) } else { - bResult = sal_True; + bResult = true; GetItemSet().SetParent(NULL); Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) ); } } else { - bResult = sal_True; + bResult = true; } } return bResult; @@ -342,9 +342,9 @@ SfxItemSet& SdStyleSheet::GetItemSet() |* \************************************************************************/ -sal_Bool SdStyleSheet::IsUsed() const +bool SdStyleSheet::IsUsed() const { - sal_Bool bResult = sal_False; + bool bResult = false; sal_uInt16 nListenerCount = GetListenerCount(); if (nListenerCount > 0) @@ -636,28 +636,28 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, sal_Bool bOnlyMissingIte // -------------------------------------------------------------------- -sal_Bool SdStyleSheet::HasFollowSupport() const +bool SdStyleSheet::HasFollowSupport() const { - return sal_False; + return false; } // -------------------------------------------------------------------- -sal_Bool SdStyleSheet::HasParentSupport() const +bool SdStyleSheet::HasParentSupport() const { - return sal_True; + return true; } // -------------------------------------------------------------------- -sal_Bool SdStyleSheet::HasClearParentSupport() const +bool SdStyleSheet::HasClearParentSupport() const { - return sal_True; + return true; } // -------------------------------------------------------------------- -sal_Bool SdStyleSheet::SetName( const UniString& rName ) +bool SdStyleSheet::SetName( const UniString& rName ) { return SfxStyleSheet::SetName( rName ); } diff --git a/sd/source/filter/cgm/sdcgmfilter.cxx b/sd/source/filter/cgm/sdcgmfilter.cxx index 6c6ef43ce22a..0f6a0d94626e 100644 --- a/sd/source/filter/cgm/sdcgmfilter.cxx +++ b/sd/source/filter/cgm/sdcgmfilter.cxx @@ -66,8 +66,15 @@ using namespace ::com::sun::star::frame; // - Typedefs - // ------------ -typedef sal_uInt32 ( __LOADONCALLAPI *ImportCGM )( ::rtl::OUString&, Reference< XModel >&, sal_uInt32, Reference< XStatusIndicator >& ); -typedef sal_Bool ( __LOADONCALLAPI *ExportCGM )( ::rtl::OUString&, Reference< XModel >&, Reference< XStatusIndicator >&, void* ); + +typedef sal_uInt32 ( __LOADONCALLAPI *ImportCGMPointer )( ::rtl::OUString&, Reference< XModel >&, sal_uInt32, Reference< XStatusIndicator >& ); +typedef sal_Bool ( __LOADONCALLAPI *ExportCGMPointer )( ::rtl::OUString&, Reference< XModel >&, Reference< XStatusIndicator >&, void* ); + +#ifdef DISABLE_DYNLOADING + +extern "C" sal_uInt32 ImportCGM( ::rtl::OUString&, Reference< XModel >&, sal_uInt32, Reference< XStatusIndicator >& ); + +#endif // --------------- // - SdPPTFilter - @@ -88,12 +95,22 @@ SdCGMFilter::~SdCGMFilter() sal_Bool SdCGMFilter::Import() { +#ifndef DISABLE_DYNLOADING ::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() ); +#endif sal_Bool bRet = sal_False; - if( pLibrary && mxModel.is() ) + if( +#ifndef DISABLE_DYNLOADING + pLibrary && +#endif + mxModel.is() ) { - ImportCGM FncImportCGM = reinterpret_cast< ImportCGM >( pLibrary->getFunctionSymbol( "ImportCGM" ) ); +#ifndef DISABLE_DYNLOADING + ImportCGMPointer FncImportCGM = reinterpret_cast< ImportCGMPointer >( pLibrary->getFunctionSymbol( "ImportCGM" ) ); +#else + ImportCGMPointer FncImportCGM = ImportCGM; +#endif ::rtl::OUString aFileURL( mrMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ); sal_uInt32 nRetValue; @@ -122,9 +139,9 @@ sal_Bool SdCGMFilter::Import() } } } - +#ifndef DISABLE_DYNLOADING delete pLibrary; - +#endif return bRet; } @@ -132,12 +149,16 @@ sal_Bool SdCGMFilter::Import() sal_Bool SdCGMFilter::Export() { +#ifdef DISABLE_DYNLOADING + // No ExportCGM function exists(!) + return sal_False; +#else ::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() ); sal_Bool bRet = sal_False; if( pLibrary && mxModel.is() ) { - ExportCGM FncCGMExport = reinterpret_cast< ExportCGM >( pLibrary->getFunctionSymbol( "ExportCGM" ) ); + ExportCGMPointer FncCGMExport = reinterpret_cast< ExportCGMPointer >( pLibrary->getFunctionSymbol( "ExportCGM" ) ); if( FncCGMExport ) { @@ -149,8 +170,8 @@ sal_Bool SdCGMFilter::Export() } delete pLibrary; - return bRet; +#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 043907769dd5..babb586e702d 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -3316,16 +3316,16 @@ HtmlErrorContext::HtmlErrorContext(Window *_pWin) // ===================================================================== -sal_Bool HtmlErrorContext::GetString( sal_uLong, String& rCtxStr ) +sal_Bool HtmlErrorContext::GetString( sal_uLong, OUString& rCtxStr ) { DBG_ASSERT( mnResId != 0, "No error context set" ); if( mnResId == 0 ) return false; - rCtxStr = String( SdResId( mnResId ) ); + rCtxStr = SdResId( mnResId ); - rCtxStr.SearchAndReplace( rtl::OUString("$(URL1)"), maURL1 ); - rCtxStr.SearchAndReplace( rtl::OUString("$(URL2)"), maURL2 ); + rCtxStr = rCtxStr.replaceAll( rtl::OUString("$(URL1)"), maURL1 ); + rCtxStr = rCtxStr.replaceAll( rtl::OUString("$(URL2)"), maURL2 ); return true; } diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx index 0b4a4aa3b9a1..7a4ac0061c78 100644 --- a/sd/source/filter/html/htmlex.hxx +++ b/sd/source/filter/html/htmlex.hxx @@ -81,7 +81,7 @@ public: HtmlErrorContext(Window *pWin=0); ~HtmlErrorContext() {}; - virtual sal_Bool GetString( sal_uLong nErrId, String& rCtxStr ); + virtual sal_Bool GetString( sal_uLong nErrId, OUString& rCtxStr ); void SetContext( sal_uInt16 nResId, const String& rURL ); void SetContext( sal_uInt16 nResId, const String& rURL1, const String& rURL2 ); diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx index ec245925a3af..d379ffd1780f 100644 --- a/sd/source/filter/sdfilter.cxx +++ b/sd/source/filter/sdfilter.cxx @@ -85,6 +85,7 @@ SdFilter::~SdFilter() // ----------------------------------------------------------------------------- +#ifndef DISABLE_DYNLOADING extern "C" { static void SAL_CALL thisModule() {} } ::osl::Module* SdFilter::OpenLibrary( const ::rtl::OUString& rLibraryName ) const @@ -95,6 +96,8 @@ extern "C" { static void SAL_CALL thisModule() {} } ? mod.release() : 0; } +#endif + // ----------------------------------------------------------------------------- void SdFilter::CreateStatusIndicator() diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx index 6be40e8e9535..72baaf4cf9c9 100644 --- a/sd/source/filter/sdpptwrp.cxx +++ b/sd/source/filter/sdpptwrp.cxx @@ -49,14 +49,27 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::task; using namespace ::com::sun::star::frame; -typedef sal_Bool ( __LOADONCALLAPI *ExportPPT )( const std::vector< com::sun::star::beans::PropertyValue >&, SvStorageRef&, +typedef sal_Bool ( __LOADONCALLAPI *ExportPPTPointer )( const std::vector< com::sun::star::beans::PropertyValue >&, SvStorageRef&, Reference< XModel > &, Reference< XStatusIndicator > &, SvMemoryStream*, sal_uInt32 nCnvrtFlags ); -typedef sal_Bool ( SAL_CALL *ImportPPT )( SdDrawDocument*, SvStream&, SvStorage&, SfxMedium& ); +typedef sal_Bool ( SAL_CALL *ImportPPTPointer )( SdDrawDocument*, SvStream&, SvStorage&, SfxMedium& ); -typedef sal_Bool ( __LOADONCALLAPI *SaveVBA )( SfxObjectShell&, SvMemoryStream*& ); +typedef sal_Bool ( __LOADONCALLAPI *SaveVBAPointer )( SfxObjectShell&, SvMemoryStream*& ); + +#ifdef DISABLE_DYNLOADING + +extern "C" sal_Bool ExportPPT( const std::vector< com::sun::star::beans::PropertyValue >&, SvStorageRef&, + Reference< XModel > &, + Reference< XStatusIndicator > &, + SvMemoryStream*, sal_uInt32 nCnvrtFlags ); + +extern "C" sal_Bool ImportPPT( SdDrawDocument*, SvStream&, SvStorage&, SfxMedium& ); + +extern "C" sal_Bool SaveVBA( SfxObjectShell&, SvMemoryStream*& ); + +#endif // --------------- // - SdPPTFilter - @@ -102,16 +115,22 @@ sal_Bool SdPPTFilter::Import() mrMedium.SetError( ERRCODE_SVX_READ_FILTER_PPOINT, OSL_LOG_PREFIX ); else { +#ifndef DISABLE_DYNLOADING ::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() ); if ( pLibrary ) { - ImportPPT PPTImport = reinterpret_cast< ImportPPT >( pLibrary->getFunctionSymbol( "ImportPPT" ) ); + ImportPPTPointer PPTImport = reinterpret_cast< ImportPPTPointer >( pLibrary->getFunctionSymbol( "ImportPPT" ) ); if ( PPTImport ) bRet = PPTImport( &mrDocument, *pDocStream, *pStorage, mrMedium ); if ( !bRet ) mrMedium.SetError( SVSTREAM_WRONGVERSION, OSL_LOG_PREFIX ); } +#else + bRet = ImportPPT( &mrDocument, *pDocStream, *pStorage, mrMedium ); + if ( !bRet ) + mrMedium.SetError( SVSTREAM_WRONGVERSION, OSL_LOG_PREFIX ); +#endif } delete pDocStream; @@ -125,15 +144,23 @@ sal_Bool SdPPTFilter::Import() sal_Bool SdPPTFilter::Export() { +#ifndef DISABLE_DYNLOADING ::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() ); +#endif sal_Bool bRet = sal_False; +#ifndef DISABLE_DYNLOADING if( pLibrary ) +#endif { if( mxModel.is() ) { SotStorageRef xStorRef = new SotStorage( mrMedium.GetOutStream(), sal_False ); - ExportPPT PPTExport = reinterpret_cast<ExportPPT>(pLibrary->getFunctionSymbol( "ExportPPT" )); +#ifndef DISABLE_DYNLOADING + ExportPPTPointer PPTExport = reinterpret_cast<ExportPPTPointer>(pLibrary->getFunctionSymbol( "ExportPPT" )); +#else + ExportPPTPointer PPTExport = ExportPPT; +#endif if( PPTExport && xStorRef.Is() ) { @@ -166,7 +193,9 @@ sal_Bool SdPPTFilter::Export() xStorRef->Commit(); } } +#ifndef DISABLE_DYNLOADING delete pLibrary; +#endif } return bRet; } @@ -176,15 +205,19 @@ void SdPPTFilter::PreSaveBasic() const SvtFilterOptions& rFilterOptions = SvtFilterOptions::Get(); if( rFilterOptions.IsLoadPPointBasicStorage() ) { +#ifndef DISABLE_DYNLOADING ::osl::Module* pLibrary = OpenLibrary( mrMedium.GetFilter()->GetUserData() ); if( pLibrary ) { - SaveVBA pSaveVBA= reinterpret_cast<SaveVBA>(pLibrary->getFunctionSymbol( "SaveVBA" )); + SaveVBAPointer pSaveVBA= reinterpret_cast<SaveVBAPointer>(pLibrary->getFunctionSymbol( "SaveVBA" )); if( pSaveVBA ) { pSaveVBA( (SfxObjectShell&) mrDocShell, pBas ); } } +#else + SaveVBA( (SfxObjectShell&) mrDocShell, pBas ); +#endif } } diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 77caf60e8467..f9cf8e3a804f 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -58,9 +58,10 @@ #include <com/sun/star/xml/sax/XEntityResolver.hpp> #include <com/sun/star/xml/sax/InputSource.hpp> #include <com/sun/star/xml/sax/XDTDHandler.hpp> -#include <com/sun/star/xml/sax/XParser.hpp> +#include <com/sun/star/xml/sax/Parser.hpp> #include <com/sun/star/io/XActiveDataSource.hpp> #include <com/sun/star/io/XActiveDataControl.hpp> +#include <comphelper/componentcontext.hxx> #include <comphelper/genericpropertyset.hxx> #include <comphelper/propertysetinfo.hxx> #include <unotools/saveopt.hxx> @@ -228,12 +229,7 @@ sal_Int32 ReadThroughComponent( aParserInput.aInputStream = xInputStream; // get parser - Reference< xml::sax::XParser > xParser( - rFactory->createInstance("com.sun.star.xml.sax.Parser" ), - UNO_QUERY ); - DBG_ASSERT( xParser.is(), "Can't create parser" ); - if( !xParser.is() ) - return SD_XML_READERROR; + Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(comphelper::getComponentContext(rFactory)); RTL_LOGFILE_CONTEXT_TRACE( aLog, "parser created" ); // get filter diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 55393d8ab8fb..a9378697ab37 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -45,6 +45,8 @@ #include <vcl/svapp.hxx> #include "sdresid.hxx" +#include "svtools/svlbitm.hxx" + #include "res_bmp.hrc" #include "glob.hrc" @@ -210,8 +212,8 @@ class CustomAnimationListEntryItem : public SvLBoxString public: CustomAnimationListEntryItem( SvLBoxEntry*,sal_uInt16 nFlags, OUString aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent ); virtual ~CustomAnimationListEntryItem(); - void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* ); - void Paint( const Point&, SvLBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* ); + void InitViewData( SvTreeListBox*,SvLBoxEntry*,SvViewDataItem* ); + void Paint( const Point&, SvTreeListBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* ); SvLBoxItem* Create() const; void Clone( SvLBoxItem* pSource ); @@ -239,7 +241,7 @@ CustomAnimationListEntryItem::~CustomAnimationListEntryItem() // -------------------------------------------------------------------- -void CustomAnimationListEntryItem::InitViewData( SvLBox* pView, SvLBoxEntry* pEntry, SvViewDataItem* pViewData ) +void CustomAnimationListEntryItem::InitViewData( SvTreeListBox* pView, SvLBoxEntry* pEntry, SvViewDataItem* pViewData ) { if( !pViewData ) pViewData = pView->GetViewDataItem( pEntry, this ); @@ -252,7 +254,7 @@ void CustomAnimationListEntryItem::InitViewData( SvLBox* pView, SvLBoxEntry* pEn // -------------------------------------------------------------------- -void CustomAnimationListEntryItem::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) +void CustomAnimationListEntryItem::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) { SvViewDataItem* pViewData = mpParent->GetViewDataItem( pEntry, this ); @@ -361,8 +363,8 @@ public: CustomAnimationTriggerEntryItem( SvLBoxEntry*,sal_uInt16 nFlags, OUString aDescription ); virtual ~CustomAnimationTriggerEntryItem(); virtual sal_uInt16 IsA(); - void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* ); - void Paint( const Point&, SvLBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* ); + void InitViewData( SvTreeListBox*,SvLBoxEntry*,SvViewDataItem* ); + void Paint( const Point&, SvTreeListBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* ); SvLBoxItem* Create() const; void Clone( SvLBoxItem* pSource ); @@ -392,7 +394,7 @@ sal_uInt16 CustomAnimationTriggerEntryItem::IsA() // -------------------------------------------------------------------- -void CustomAnimationTriggerEntryItem::InitViewData( SvLBox* pView, SvLBoxEntry* pEntry, SvViewDataItem* pViewData ) +void CustomAnimationTriggerEntryItem::InitViewData( SvTreeListBox* pView, SvLBoxEntry* pEntry, SvViewDataItem* pViewData ) { if( !pViewData ) pViewData = pView->GetViewDataItem( pEntry, this ); @@ -405,7 +407,7 @@ void CustomAnimationTriggerEntryItem::InitViewData( SvLBox* pView, SvLBoxEntry* // -------------------------------------------------------------------- -void CustomAnimationTriggerEntryItem::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* ) +void CustomAnimationTriggerEntryItem::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16, SvLBoxEntry* ) { Size aSize( rDev.GetOutputSizePixel().Width(), static_cast< SvTreeListBox* >(&rDev)->GetEntryHeight() ); diff --git a/sd/source/ui/animations/CustomAnimationList.hxx b/sd/source/ui/animations/CustomAnimationList.hxx index 914e29e685d7..693d6e3422dc 100644 --- a/sd/source/ui/animations/CustomAnimationList.hxx +++ b/sd/source/ui/animations/CustomAnimationList.hxx @@ -30,7 +30,7 @@ #define _SD_CUSTOMANIMATIONLIST_HXX #include <com/sun/star/drawing/XShape.hpp> -#include <svtools/svtreebx.hxx> +#include <svtools/treelistbox.hxx> #include <CustomAnimationEffect.hxx> #include "CustomAnimationPreset.hxx" #include "CustomAnimation.hrc" diff --git a/sd/source/ui/app/popup2_tmpl.src b/sd/source/ui/app/popup2_tmpl.src index 67628796964c..4520e602ff4d 100644 --- a/sd/source/ui/app/popup2_tmpl.src +++ b/sd/source/ui/app/popup2_tmpl.src @@ -660,6 +660,7 @@ SEPARATOR MenuItem { ITEM_SAVE_GRAPHIC }; MenuItem { ITEM_COMPRESS_GRAPHIC }; + MenuItem { ITEM_EXTERNAL_EDIT }; }; }; diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 8653fc6f546d..6e23f76e5803 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -388,7 +388,7 @@ static sal_Bool lcl_HasOnlyControls( SdrModel* pModel ) // ----------------------------------------------------------------------------- -bool lcl_HasOnlyOneTable( SdrModel* pModel ) +static bool lcl_HasOnlyOneTable( SdrModel* pModel ) { if ( pModel ) { diff --git a/sd/source/ui/dlg/RemoteDialog.hxx b/sd/source/ui/dlg/RemoteDialog.hxx index 3ef7de15d53d..bc4831bd4ab6 100644 --- a/sd/source/ui/dlg/RemoteDialog.hxx +++ b/sd/source/ui/dlg/RemoteDialog.hxx @@ -14,7 +14,7 @@ #include <vcl/button.hxx> #include <vcl/dialog.hxx> #include <vcl/field.hxx> -#include <svtools/svtreebx.hxx> +#include <svtools/treelistbox.hxx> #include "RemoteDialogClientBox.hxx" diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx index 321605ee59d2..c5dcc2c70a30 100644 --- a/sd/source/ui/dlg/dlgassim.cxx +++ b/sd/source/ui/dlg/dlgassim.cxx @@ -38,6 +38,7 @@ #include "res_bmp.hrc" #include <vcl/svapp.hxx> +#include "svtools/svlbitm.hxx" #include "dlgassim.hxx" diff --git a/sd/source/ui/dlg/dlgassim.hxx b/sd/source/ui/dlg/dlgassim.hxx index aec9c1d8ce31..f6f9b792bf35 100644 --- a/sd/source/ui/dlg/dlgassim.hxx +++ b/sd/source/ui/dlg/dlgassim.hxx @@ -29,7 +29,7 @@ #include <svl/dateitem.hxx> #include "drawdoc.hxx" #include <svx/svdotext.hxx> -#include <svtools/svtreebx.hxx> +#include <svtools/treelistbox.hxx> #include "sdresid.hxx" diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx index ed7976a53f12..1f67940fb587 100644 --- a/sd/source/ui/dlg/prntopts.cxx +++ b/sd/source/ui/dlg/prntopts.cxx @@ -258,7 +258,7 @@ void SdPrintOptions::updateControls() aCbxPagename.Enable( !aRbtBooklet.IsChecked() && (aCbxDraw.IsChecked() || aCbxNotes.IsChecked() || aCbxOutline.IsChecked()) ); } -void lcl_MoveRB_Impl(Window& rBtn, long nXDiff) +static void lcl_MoveRB_Impl(Window& rBtn, long nXDiff) { Point aPos(rBtn.GetPosPixel()); aPos.X() -= nXDiff; diff --git a/sd/source/ui/dlg/sdabstdlg.cxx b/sd/source/ui/dlg/sdabstdlg.cxx index 520f5a4a4926..6c4951e40ffe 100644 --- a/sd/source/ui/dlg/sdabstdlg.cxx +++ b/sd/source/ui/dlg/sdabstdlg.cxx @@ -35,10 +35,19 @@ typedef SdAbstractDialogFactory* (__LOADONCALLAPI *SdFuncPtrCreateDialogFactory)(); +#ifndef DISABLE_DYNLOADING + extern "C" { static void SAL_CALL thisModule() {} } +#else + +extern "C" SdAbstractDialogFactory* SdCreateDialogFactory(); + +#endif + SdAbstractDialogFactory* SdAbstractDialogFactory::Create() { +#ifndef DISABLE_DYNLOADING SdFuncPtrCreateDialogFactory fp = 0; static ::osl::Module aDialogLibrary; static const ::rtl::OUString sLibName(::vcl::unohelper::CreateLibraryName("sdui", sal_True)); @@ -48,6 +57,9 @@ SdAbstractDialogFactory* SdAbstractDialogFactory::Create() if ( fp ) return fp(); return 0; +#else + return SdCreateDialogFactory(); +#endif } diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index a00f663d489b..44c0c8165dc3 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -61,10 +61,10 @@ #include "masterlayoutdlg.hxx" #include "headerfooterdlg.hxx" -IMPL_ABSTDLG_BASE(VclAbstractDialog_Impl); +IMPL_ABSTDLG_BASE(SdVclAbstractDialog_Impl); IMPL_ABSTDLG_BASE(AbstractCopyDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSdCustomShowDlg_Impl); -IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); +IMPL_ABSTDLG_BASE(SdAbstractTabDialog_Impl); IMPL_ABSTDLG_BASE(SdPresLayoutTemplateDlg_Impl); IMPL_ABSTDLG_BASE(AbstractAssistentDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSdModifyFieldDlg_Impl); @@ -75,7 +75,7 @@ IMPL_ABSTDLG_BASE(AbstractSdInsertPagesObjsDlg_Impl); IMPL_ABSTDLG_BASE(AbstractMorphDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSdStartPresDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSdPresLayoutDlg_Impl); -IMPL_ABSTDLG_BASE(AbstractSfxDialog_Impl); +IMPL_ABSTDLG_BASE(SdAbstractSfxDialog_Impl); IMPL_ABSTDLG_BASE(AbstractSdVectorizeDlg_Impl); IMPL_ABSTDLG_BASE(AbstractSdPublishingDlg_Impl); IMPL_ABSTDLG_BASE(AbstractHeaderFooterDialog_Impl); @@ -99,33 +99,33 @@ sal_Bool AbstractSdCustomShowDlg_Impl::IsCustomShow() const } // AbstractSdCustomShowDlg_Impl end -// AbstractTabDialog_Impl begin -void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) +// SdAbstractTabDialog_Impl begin +void SdAbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId ) { pDlg->SetCurPageId( nId ); } -const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const +const SfxItemSet* SdAbstractTabDialog_Impl::GetOutputItemSet() const { return pDlg->GetOutputItemSet(); } -const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) +const sal_uInt16* SdAbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem ) { return pDlg->GetInputRanges( pItem ); } -void AbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) +void SdAbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet ) { pDlg->SetInputSet( pInSet ); } //From class Window. -void AbstractTabDialog_Impl::SetText( const XubString& rStr ) +void SdAbstractTabDialog_Impl::SetText( const XubString& rStr ) { pDlg->SetText( rStr ); } -String AbstractTabDialog_Impl::GetText() const +String SdAbstractTabDialog_Impl::GetText() const { return pDlg->GetText(); } -//add for AbstractTabDialog_Impl end +//add for SdAbstractTabDialog_Impl end // -------------------------------------------------------------------- @@ -332,15 +332,15 @@ void AbstractSdPresLayoutDlg_Impl::GetAttr( SfxItemSet& rOutAttrs ) // AbstractSdPresLayoutDlg_Impl end //SfxAbstractDialog_Impl begin -const SfxItemSet* AbstractSfxDialog_Impl::GetOutputItemSet() const +const SfxItemSet* SdAbstractSfxDialog_Impl::GetOutputItemSet() const { return pDlg->GetOutputItemSet(); } -void AbstractSfxDialog_Impl::SetText( const XubString& rStr ) +void SdAbstractSfxDialog_Impl::SetText( const XubString& rStr ) { pDlg->SetText( rStr ); } -String AbstractSfxDialog_Impl::GetText() const +String SdAbstractSfxDialog_Impl::GetText() const { return pDlg->GetText(); } @@ -388,7 +388,7 @@ VclAbstractDialog * SdAbstractDialogFactory_Impl::CreateBreakDlg( sal_uLong nSumActionCount, sal_uLong nObjCount ) //add for BreakDlg { - return new VclAbstractDialog_Impl( new ::sd::BreakDlg( pWindow, pDrView, pShell, nSumActionCount, nObjCount ) ); + return new SdVclAbstractDialog_Impl( new ::sd::BreakDlg( pWindow, pDrView, pShell, nSumActionCount, nObjCount ) ); } //add for BreakDlg end @@ -412,13 +412,13 @@ AbstractSdCustomShowDlg * SdAbstractDialogFactory_Impl::CreateSdCustomShowDlg( : // add for SdCharDlg begin SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdTabCharDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell ) { - return new AbstractTabDialog_Impl( new SdCharDlg( pParent, pAttr, pDocShell ) ); + return new SdAbstractTabDialog_Impl( new SdCharDlg( pParent, pAttr, pDocShell ) ); } SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdTabPageDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, sal_Bool bAreaPage ) { - return new AbstractTabDialog_Impl( new SdPageDlg( pDocShell, pParent, pAttr, bAreaPage ) ); + return new SdAbstractTabDialog_Impl( new SdPageDlg( pDocShell, pParent, pAttr, bAreaPage ) ); } // add for SdCharDlg end @@ -479,7 +479,7 @@ SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdOutlineBulletTabDl SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdParagraphTabDlg( ::Window* pParent, const SfxItemSet* pAttr ) { - return new AbstractTabDialog_Impl( new SdParagraphDlg( pParent, pAttr ) ); + return new SdAbstractTabDialog_Impl( new SdParagraphDlg( pParent, pAttr ) ); } // add for OutlineBulletDlg end @@ -494,7 +494,7 @@ AbstractSdStartPresDlg * SdAbstractDialogFactory_Impl::CreateSdStartPresentatio // add for SdRemoteDlg begin VclAbstractDialog * SdAbstractDialogFactory_Impl::CreateRemoteDialog( ::Window* pWindow ) { - return new VclAbstractDialog_Impl( new ::sd::RemoteDialog( pWindow ) ); + return new SdVclAbstractDialog_Impl( new ::sd::RemoteDialog( pWindow ) ); } // add for SdRemoteDlg end @@ -514,13 +514,13 @@ AbstractSdPresLayoutDlg * SdAbstractDialogFactory_Impl::CreateSdPresLayoutDlg( // add for SdTabTemplateDlg begin SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) { - return new AbstractTabDialog_Impl( new SdTabTemplateDlg( pParent, pDocShell, rStyleBase, pModel, pView ) ); + return new SdAbstractTabDialog_Impl( new SdTabTemplateDlg( pParent, pDocShell, rStyleBase, pModel, pView ) ); } // add for SdTabTemplateDlg end SfxAbstractDialog* SdAbstractDialogFactory_Impl::CreatSdActionDialog( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ) { - return new AbstractSfxDialog_Impl( new SdActionDlg( pParent, pAttr, pView ) ); + return new SdAbstractSfxDialog_Impl( new SdActionDlg( pParent, pAttr, pView ) ); } // add for SdVectorizeDlg begin @@ -561,7 +561,7 @@ CreateTabPage SdAbstractDialogFactory_Impl::GetSdOptionsSnapTabPageCreatorFunc() VclAbstractDialog* SdAbstractDialogFactory_Impl::CreateMasterLayoutDialog( ::Window* pParent, SdDrawDocument* pDoc, SdPage* pCurrentPage ) { - return new VclAbstractDialog_Impl( new ::sd::MasterLayoutDialog( pParent, pDoc, pCurrentPage )); + return new SdVclAbstractDialog_Impl( new ::sd::MasterLayoutDialog( pParent, pDoc, pCurrentPage )); } AbstractHeaderFooterDialog* SdAbstractDialogFactory_Impl::CreateHeaderFooterDialog( ViewShell* pViewShell, diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index 65c5fad42962..e29d2d20c227 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -59,9 +59,9 @@ namespace sd { } // add for BreakDlg class Dialog; -class VclAbstractDialog_Impl : public VclAbstractDialog +class SdVclAbstractDialog_Impl : public VclAbstractDialog { - DECL_ABSTDLG_BASE(VclAbstractDialog_Impl,Dialog) + DECL_ABSTDLG_BASE(SdVclAbstractDialog_Impl,Dialog) }; // add for CopyDlg @@ -83,9 +83,9 @@ class AbstractSdCustomShowDlg_Impl : public AbstractSdCustomShowDlg //add for SdCharDlg begin class SfxTabDialog; -class AbstractTabDialog_Impl : public SfxAbstractTabDialog +class SdAbstractTabDialog_Impl : public SfxAbstractTabDialog { - DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog ) + DECL_ABSTDLG_BASE( SdAbstractTabDialog_Impl,SfxTabDialog ) virtual void SetCurPageId( sal_uInt16 nId ); virtual const SfxItemSet* GetOutputItemSet() const; virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ); @@ -218,9 +218,9 @@ class AbstractSdPresLayoutDlg_Impl : public AbstractSdPresLayoutDlg }; // add for SdActionDlg -class AbstractSfxDialog_Impl : public SfxAbstractDialog +class SdAbstractSfxDialog_Impl : public SfxAbstractDialog { - DECL_ABSTDLG_BASE(AbstractSfxDialog_Impl,SfxModalDialog) + DECL_ABSTDLG_BASE(SdAbstractSfxDialog_Impl,SfxModalDialog) virtual const SfxItemSet* GetOutputItemSet() const; virtual void SetText( const XubString& rStr ); virtual String GetText() const; diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 534c178a51e9..8637efa62936 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -1081,7 +1081,7 @@ sal_Int8 SdPageObjsTLB::AcceptDrop (const AcceptDropEvent& rEvent) { ImplShowTargetEmphasis( pTargetEntry, sal_False ); } - else if( !nDragDropMode ) + else if( !GetDragDropMode() ) { SAL_WARN( "sc.ui", "SdPageObjsTLB::AcceptDrop(): no target" ); } diff --git a/sd/source/ui/dlg/sduiexp.cxx b/sd/source/ui/dlg/sduiexp.cxx index 962f86cdbf5a..d9505a198514 100644 --- a/sd/source/ui/dlg/sduiexp.cxx +++ b/sd/source/ui/dlg/sduiexp.cxx @@ -34,6 +34,10 @@ #include "sddlgfact.hxx" #include "sal/types.h" +#ifdef DISABLE_DYNLOADING +#define CreateDialogFactory SdCreateDialogFactory +#endif + extern "C" { SAL_DLLPUBLIC_EXPORT SdAbstractDialogFactory* CreateDialogFactory() diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index d9372e4b9632..5e0753acb62c 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -708,7 +708,7 @@ IMPL_LINK_NOARG(SdTPAction, CheckFileHdl) if( aMedium.IsStorage() ) { - WaitObject aWait( GetParent()->GetParent() ); + WaitObject aWait( GetParentDialog() ); // ist es eine Draw-Datei? // mit READ oeffnen, sonst schreiben die Storages evtl. in die Datei! diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx index 9badf15dd459..237dc720c08c 100644 --- a/sd/source/ui/framework/factories/BasicViewFactory.cxx +++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx @@ -368,10 +368,22 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments) pDescriptor->mpViewShell->Init(bIsCenterPane); mpBase->GetViewShellManager()->ActivateViewShell(pDescriptor->mpViewShell.get()); + Reference<awt::XWindow> xWindow(rxPane->getWindow()); pDescriptor->mpWrapper = new ViewShellWrapper( pDescriptor->mpViewShell, rxViewId, - rxPane->getWindow()); + xWindow); + + // register ViewShellWrapper on pane window + if (xWindow.is()) + { + xWindow->addWindowListener(pDescriptor->mpWrapper); + if (pDescriptor->mpViewShell != NULL) + { + pDescriptor->mpViewShell->Resize(); + } + } + pDescriptor->mxView.set( pDescriptor->mpWrapper->queryInterface( XResource::static_type() ), UNO_QUERY_THROW ); } diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx index 1108ffe23c58..058577a36970 100644 --- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx +++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx @@ -30,11 +30,22 @@ #include "framework/ViewShellWrapper.hxx" #include "framework/Pane.hxx" #include "taskpane/ToolPanelViewShell.hxx" +#include "sdpage.hxx" #include "ViewShell.hxx" #include "Window.hxx" +#include "SlideSorter.hxx" +#include "SlideSorterViewShell.hxx" +#include "controller/SlsPageSelector.hxx" +#include "controller/SlsCurrentSlideManager.hxx" +#include "controller/SlideSorterController.hxx" +#include "model/SlsPageEnumerationProvider.hxx" +#include "model/SlideSorterModel.hxx" +#include "model/SlsPageDescriptor.hxx" + #include <com/sun/star/drawing/framework/XPane.hpp> #include <com/sun/star/lang/DisposedException.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> #include <toolkit/helper/vclunohelper.hxx> #include <comphelper/sequence.hxx> @@ -64,17 +75,11 @@ ViewShellWrapper::ViewShellWrapper ( const Reference<awt::XWindow>& rxWindow) : ViewShellWrapperInterfaceBase(MutexOwner::maMutex), mpViewShell(pViewShell), + mpSlideSorterViewShell( + ::boost::dynamic_pointer_cast< ::sd::slidesorter::SlideSorterViewShell >( pViewShell )), mxViewId(rxViewId), mxWindow(rxWindow) { - if (rxWindow.is()) - { - rxWindow->addWindowListener(this); - if (pViewShell != NULL) - { - pViewShell->Resize(); - } - } } @@ -102,6 +107,20 @@ void SAL_CALL ViewShellWrapper::disposing (void) mpViewShell.reset(); } +uno::Any SAL_CALL ViewShellWrapper::queryInterface( const uno::Type & rType ) throw(uno::RuntimeException) +{ + if( mpSlideSorterViewShell && + rType == ::getCppuType( static_cast< uno::Reference< view::XSelectionSupplier > * >( 0 ) ) ) + { + uno::Any aAny; + uno::Reference<view::XSelectionSupplier> xSupplier( this ); + aAny <<= xSupplier; + + return aAny; + } + else + return ViewShellWrapperInterfaceBase::queryInterface( rType ); +} @@ -131,6 +150,70 @@ sal_Bool SAL_CALL ViewShellWrapper::isAnchorOnly (void) } +//----- XSelectionSupplier -------------------------------------------------- + +sal_Bool SAL_CALL ViewShellWrapper::select( const ::com::sun::star::uno::Any& aSelection ) throw(lang::IllegalArgumentException, uno::RuntimeException) +{ + bool bOk = true; + + ::sd::slidesorter::controller::SlideSorterController& rSlideSorterController + = mpSlideSorterViewShell->GetSlideSorter().GetController(); + ::sd::slidesorter::controller::PageSelector& rSelector (rSlideSorterController.GetPageSelector()); + rSelector.DeselectAllPages(); + Sequence<Reference<drawing::XDrawPage> > xPages; + aSelection >>= xPages; + const sal_uInt32 nCount = xPages.getLength(); + for (sal_uInt32 nIndex=0; nIndex<nCount; ++nIndex) + { + Reference<beans::XPropertySet> xSet (xPages[nIndex], UNO_QUERY); + if (xSet.is()) + { + try + { + Any aNumber = xSet->getPropertyValue("Number"); + sal_Int32 nPageNumber = 0; + aNumber >>= nPageNumber; + nPageNumber -=1; // Transform 1-based page numbers to 0-based ones. + rSelector.SelectPage(nPageNumber); + } + catch (const RuntimeException&) + { + } + } + } + + return bOk; +} + +uno::Any SAL_CALL ViewShellWrapper::getSelection() throw(uno::RuntimeException) +{ + Any aResult; + + slidesorter::model::PageEnumeration aSelectedPages ( + slidesorter::model::PageEnumerationProvider::CreateSelectedPagesEnumeration( + mpSlideSorterViewShell->GetSlideSorter().GetModel())); + int nSelectedPageCount ( + mpSlideSorterViewShell->GetSlideSorter().GetController().GetPageSelector().GetSelectedPageCount()); + + Sequence<Reference<XInterface> > aPages(nSelectedPageCount); + int nIndex = 0; + while (aSelectedPages.HasMoreElements() && nIndex<nSelectedPageCount) + { + slidesorter::model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement()); + aPages[nIndex++] = pDescriptor->GetPage()->getUnoPage(); + } + aResult <<= aPages; + + return aResult; +} + +void SAL_CALL ViewShellWrapper::addSelectionChangeListener( const uno::Reference< view::XSelectionChangeListener >& ) throw(uno::RuntimeException) +{ +} + +void SAL_CALL ViewShellWrapper::removeSelectionChangeListener( const uno::Reference< view::XSelectionChangeListener >& ) throw(uno::RuntimeException) +{ +} //----- XRelocatableResource -------------------------------------------------- diff --git a/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx b/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx deleted file mode 100644 index 423d503645e3..000000000000 --- a/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx +++ /dev/null @@ -1,215 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -#include "ReadOnlyModeObserver.hxx" - -#include <com/sun/star/drawing/framework/XControllerManager.hpp> -#include <com/sun/star/lang/DisposedException.hpp> -#include <com/sun/star/util/URLTransformer.hpp> -#include <com/sun/star/util/XURLTransformer.hpp> -#include <comphelper/processfactory.hxx> -#include <cppuhelper/interfacecontainer.hxx> - -#include "tools/SlotStateListener.hxx" -#include "framework/FrameworkHelper.hxx" - -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star; -using namespace ::com::sun::star::drawing::framework; -using ::rtl::OUString; - -namespace sd { namespace framework { - -class ReadOnlyModeObserver::ModifyBroadcaster - : public ::cppu::OBroadcastHelper -{ -public: - explicit ModifyBroadcaster (::osl::Mutex& rOslMutex) : ::cppu::OBroadcastHelper(rOslMutex) {} -}; - - - - -ReadOnlyModeObserver::ReadOnlyModeObserver ( - const Reference<frame::XController>& rxController) - : ReadOnlyModeObserverInterfaceBase(maMutex), - maSlotNameURL(), - mxController(rxController), - mxConfigurationController(NULL), - mxDispatch(NULL), - mpBroadcaster(new ModifyBroadcaster(maMutex)) -{ - // Create a URL object for the slot name. - maSlotNameURL.Complete = ".uno:EditDoc"; - Reference<util::XURLTransformer> xTransformer(util::URLTransformer::create(::comphelper::getProcessComponentContext())); - xTransformer->parseStrict(maSlotNameURL); - - if ( ! ConnectToDispatch()) - { - // The controller is not yet connected to a frame. This means that - // the dispatcher is not yet set up. We wait for this to happen by - // waiting for configuration updates and try again. - Reference<XControllerManager> xControllerManager (rxController, UNO_QUERY); - if (xControllerManager.is()) - { - mxConfigurationController = xControllerManager->getConfigurationController(); - if (mxConfigurationController.is()) - { - mxConfigurationController->addConfigurationChangeListener( - this, - FrameworkHelper::msConfigurationUpdateStartEvent, - Any()); - } - } - } -} - - - - -ReadOnlyModeObserver::~ReadOnlyModeObserver (void) -{ -} - - - - -void SAL_CALL ReadOnlyModeObserver::disposing (void) -{ - if (mxController.is()) - { - mxController = NULL; - } - if (mxConfigurationController.is()) - { - mxConfigurationController->removeConfigurationChangeListener(this); - mxConfigurationController = NULL; - } - if (mxDispatch.is()) - { - mxDispatch->removeStatusListener(this, maSlotNameURL); - mxDispatch = NULL; - } - - lang::EventObject aEvent; - aEvent.Source = static_cast<XWeak*>(this); - ::cppu::OInterfaceContainerHelper* pIterator - = mpBroadcaster->getContainer(getCppuType((Reference<frame::XStatusListener>*)NULL)); - pIterator->disposeAndClear(aEvent); -} - - - - -void ReadOnlyModeObserver::AddStatusListener ( - const Reference<frame::XStatusListener>& rxListener) -{ - mpBroadcaster->addListener( - getCppuType((Reference<frame::XStatusListener>*)NULL), - rxListener); -} - - - - -bool ReadOnlyModeObserver::ConnectToDispatch (void) -{ - if ( ! mxDispatch.is()) - { - // Get the dispatch object. - Reference<frame::XDispatchProvider> xProvider (mxController->getFrame(), UNO_QUERY); - if (xProvider.is()) - { - mxDispatch = xProvider->queryDispatch(maSlotNameURL, OUString(), 0); - if (mxDispatch.is()) - { - mxDispatch->addStatusListener(this, maSlotNameURL); - } - } - } - - return mxDispatch.is(); -} - - - - -void ReadOnlyModeObserver::statusChanged (const frame::FeatureStateEvent& rEvent) - throw (RuntimeException) -{ - ::cppu::OInterfaceContainerHelper* pIterator - = mpBroadcaster->getContainer(getCppuType((Reference<frame::XStatusListener>*)NULL)); - if (pIterator != NULL) - { - pIterator->notifyEach(&frame::XStatusListener::statusChanged, rEvent); - } -} - - - - -//----- XEventListener -------------------------------------------------------- - -void SAL_CALL ReadOnlyModeObserver::disposing ( - const lang::EventObject& rEvent) - throw (RuntimeException) -{ - if (rEvent.Source == mxConfigurationController) - mxConfigurationController = NULL; - else if (rEvent.Source == mxDispatch) - mxDispatch = NULL; - - dispose(); -} - - - - -void SAL_CALL ReadOnlyModeObserver::notifyConfigurationChange ( - const ConfigurationChangeEvent& rEvent) - throw (RuntimeException) -{ - if (rEvent.Type.equals(FrameworkHelper::msConfigurationUpdateStartEvent)) - { - if (mxController.is() && mxController->getFrame().is()) - { - if (ConnectToDispatch()) - { - // We have connected successfully to the dispatcher and - // therefore can disconnect from the configuration controller. - mxConfigurationController->removeConfigurationChangeListener(this); - mxConfigurationController = NULL; - } - } - } -} - -} } // end of namespace sd::framework - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx b/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx deleted file mode 100644 index c8f0ea2393d6..000000000000 --- a/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx +++ /dev/null @@ -1,132 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef SD_FRAMEWORK_READ_ONLY_MODE_OBSERVER_HXX -#define SD_FRAMEWORK_READ_ONLY_MODE_OBSERVER_HXX - -#include "MutexOwner.hxx" - -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/frame/XController.hpp> -#include <com/sun/star/frame/XStatusListener.hpp> -#include <com/sun/star/frame/XDispatch.hpp> -#include <com/sun/star/lang/XEventListener.hpp> -#include <com/sun/star/util/XModifyListener.hpp> -#include <com/sun/star/drawing/framework/XConfigurationController.hpp> -#include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp> -#include <osl/mutex.hxx> -#include <cppuhelper/compbase2.hxx> -#include <boost/function.hpp> -#include <boost/scoped_ptr.hpp> -#include <boost/shared_ptr.hpp> - -namespace { - -typedef ::cppu::WeakComponentImplHelper2 < - ::com::sun::star::drawing::framework::XConfigurationChangeListener, - ::com::sun::star::frame::XStatusListener - > ReadOnlyModeObserverInterfaceBase; - -} // end of anonymous namespace. - - - - -namespace sd { namespace framework { - -/** Wait for changes of the read-only mode. On switching between read-only - mode and read-write the registered listeners are called. - - This class handles the case that the given controller is not yet - connected to a frame and that the dispatcher is not yet set up. It - waits for this to happen and then registers at the .uno:EditDoc command - and waits for state changes. -*/ -class ReadOnlyModeObserver - : private sd::MutexOwner, - public ReadOnlyModeObserverInterfaceBase -{ -public: - /** Create a new read-only mode observer for the given controller. - */ - ReadOnlyModeObserver ( - const ::com::sun::star::uno::Reference<com::sun::star::frame::XController>& rxController); - virtual ~ReadOnlyModeObserver (void); - - virtual void SAL_CALL disposing (void); - - - /** Add a status listener that is called when the state of the - .uno:EditDoc command changes. Note that the listener has to take - into account both the IsEnabled and the State fields of the - FeatureStateEvent. Only when IsEnabled is true then the State field - is valid. - */ - void AddStatusListener ( - const ::com::sun::star::uno::Reference< - com::sun::star::frame::XStatusListener>& rxListener); - - // XEventListener - - virtual void SAL_CALL disposing ( - const com::sun::star::lang::EventObject& rEvent) - throw (com::sun::star::uno::RuntimeException); - - - // frame::XStatusListener - - /** Called by slot state change broadcasters. - @throws DisposedException - */ - virtual void SAL_CALL - statusChanged ( - const ::com::sun::star::frame::FeatureStateEvent& rState) - throw (::com::sun::star::uno::RuntimeException); - - // XConfigurationChangeListener - - virtual void SAL_CALL notifyConfigurationChange ( - const ::com::sun::star::drawing::framework::ConfigurationChangeEvent& rEvent) - throw (::com::sun::star::uno::RuntimeException); - -private: - ::com::sun::star::util::URL maSlotNameURL; - /** The XController is stored to enable repeated calls to - ConnectToDispatch() (get access to the XDispatchProvider. - */ - ::com::sun::star::uno::Reference<com::sun::star::frame::XController> - mxController; - ::com::sun::star::uno::Reference<com::sun::star::drawing::framework::XConfigurationController> - mxConfigurationController; - ::com::sun::star::uno::Reference<com::sun::star::frame::XDispatch> - mxDispatch; - class ModifyBroadcaster; - ::boost::scoped_ptr<ModifyBroadcaster> mpBroadcaster; - - /** Listen for the .uno:EditMode command. Returns <TRUE/> when the connection - has been established. - */ - bool ConnectToDispatch (void); -}; - -} } // end of namespace sd::framework - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/custsdlg.hxx b/sd/source/ui/inc/custsdlg.hxx index 774497664932..a176707e9912 100644 --- a/sd/source/ui/inc/custsdlg.hxx +++ b/sd/source/ui/inc/custsdlg.hxx @@ -34,7 +34,7 @@ #include <vcl/lstbox.hxx> #include <vcl/fixed.hxx> #include <vcl/edit.hxx> -#include <svtools/svtreebx.hxx> +#include <svtools/treelistbox.hxx> #include <vcl/dialog.hxx> class SdDrawDocument; diff --git a/sd/source/ui/inc/framework/ViewShellWrapper.hxx b/sd/source/ui/inc/framework/ViewShellWrapper.hxx index 87c2eb7a2ce2..b49147695342 100644 --- a/sd/source/ui/inc/framework/ViewShellWrapper.hxx +++ b/sd/source/ui/inc/framework/ViewShellWrapper.hxx @@ -23,18 +23,20 @@ #include "MutexOwner.hxx" #include <com/sun/star/drawing/framework/XView.hpp> #include <com/sun/star/drawing/framework/XRelocatableResource.hpp> +#include <com/sun/star/view/XSelectionSupplier.hpp> #include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> #include <osl/mutex.hxx> -#include <cppuhelper/compbase4.hxx> +#include <cppuhelper/compbase5.hxx> #include <cppuhelper/implbase1.hxx> #include <boost/shared_ptr.hpp> namespace { -typedef ::cppu::WeakComponentImplHelper4 < ::com::sun::star::lang::XUnoTunnel +typedef ::cppu::WeakComponentImplHelper5 < ::com::sun::star::lang::XUnoTunnel , ::com::sun::star::awt::XWindowListener + , ::com::sun::star::view::XSelectionSupplier , ::com::sun::star::drawing::framework::XRelocatableResource , ::com::sun::star::drawing::framework::XView > ViewShellWrapperInterfaceBase; @@ -42,6 +44,7 @@ typedef ::cppu::WeakComponentImplHelper4 < ::com::sun::star::lang::XUnoTunn } // end of anonymous namespace. namespace sd { class ViewShell; } +namespace sd { namespace slidesorter { class SlideSorterViewShell; } } namespace sd { namespace framework { @@ -72,6 +75,7 @@ public: virtual ~ViewShellWrapper (void); virtual void SAL_CALL disposing (void); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); static const ::com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId (void); @@ -95,6 +99,12 @@ public: virtual sal_Bool SAL_CALL isAnchorOnly (void) throw (com::sun::star::uno::RuntimeException); + // XSelectionSupplier + + virtual sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& aSelection ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getSelection( ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException); // XRelocatableResource @@ -131,6 +141,7 @@ public: private: ::boost::shared_ptr< ViewShell > mpViewShell; + ::boost::shared_ptr< ::sd::slidesorter::SlideSorterViewShell > mpSlideSorterViewShell; const ::com::sun::star::uno::Reference< com::sun::star::drawing::framework::XResourceId > mxViewId; ::com::sun::star::uno::Reference<com::sun::star::awt::XWindow > mxWindow; }; diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx index 63ac738498e5..21d89c9a6705 100644 --- a/sd/source/ui/inc/sdtreelb.hxx +++ b/sd/source/ui/inc/sdtreelb.hxx @@ -35,7 +35,7 @@ #include "pres.hxx" #include "sddllapi.h" #include <tools/string.hxx> -#include <svtools/svtreebx.hxx> +#include <svtools/treelistbox.hxx> #include <svl/urlbmk.hxx> #include <tools/ref.hxx> #include "sdxfer.hxx" @@ -223,7 +223,7 @@ public: sal_Bool IsLinkableSelected() const { return mbLinkableSelected; } static sal_Bool IsInDrag(); - using SvLBox::ExecuteDrop; + using SvTreeListBox::ExecuteDrop; using SvTreeListBox::SelectEntry; private: diff --git a/sd/source/ui/remotecontrol/Communicator.cxx b/sd/source/ui/remotecontrol/Communicator.cxx index 02a39d8df7f1..0d1beb62d1f3 100644 --- a/sd/source/ui/remotecontrol/Communicator.cxx +++ b/sd/source/ui/remotecontrol/Communicator.cxx @@ -123,8 +123,4 @@ void Communicator::disposeListener() } } -Transmitter* Communicator::getTransmitter() -{ - return pTransmitter; -} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/remotecontrol/Communicator.hxx b/sd/source/ui/remotecontrol/Communicator.hxx index d7ad796aa77a..81b9e673acd4 100644 --- a/sd/source/ui/remotecontrol/Communicator.hxx +++ b/sd/source/ui/remotecontrol/Communicator.hxx @@ -45,7 +45,6 @@ namespace sd Communicator( BufferedStreamSocket *pSocket ); ~Communicator(); - Transmitter* getTransmitter(); void presentationStarted( const css::uno::Reference< css::presentation::XSlideShowController > &rController ); void informListenerDestroyed(); diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx index 0ea63027828d..e5423d392695 100644 --- a/sd/source/ui/remotecontrol/ImagePreparer.cxx +++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx @@ -85,7 +85,6 @@ void ImagePreparer::execute() } sendNotes( i ); } -// notesToHtml( 0 ); mRef.clear(); } @@ -220,53 +219,6 @@ void ImagePreparer::sendNotes( sal_uInt32 aSlideNumber ) } sal_Bool ExportTo( uno::Reference< drawing::XDrawPage>& aNotesPage, String aUrl ); -OString ImagePreparer::notesToHtml( sal_uInt32 aSlideNumber ) -{ - OString aRet(""); - - OUString aFileURL; - FileBase::createTempFile( 0, 0, &aFileURL ); - fprintf( stderr, "%s", OUStringToOString( aFileURL, RTL_TEXTENCODING_UTF8).getStr() ); - - if ( !xController->isRunning() ) - return ""; - - - - - // Get the page - uno::Reference< drawing::XDrawPage > xNotesPage; - uno::Reference< drawing::XDrawPage > xSourceDoc( - xController->getSlideByIndex( aSlideNumber ), - uno::UNO_QUERY_THROW ); - - uno::Reference<presentation::XPresentationPage> xPresentationPage( - xSourceDoc, UNO_QUERY); - if (xPresentationPage.is()) - xNotesPage = uno::Reference< drawing::XDrawPage >( - xPresentationPage->getNotesPage(), uno::UNO_QUERY_THROW ); - else - return ""; - - - ExportTo( xNotesPage, aFileURL ); - - // FIXME: error handling. - -// File aFile( aFileURL ); -// aFile.open(0); -// sal_uInt64 aRead; -// rSize = 0; -// aFile.getSize( rSize ); -// uno::Sequence<sal_Int8> aContents( rSize ); - -// aFile.read( aContents.getArray(), rSize, aRead ); -// aFile.close(); -// File::remove( aFileURL ); -// return aContents; - - return aRet; -} // Code copied from sdremote/source/presenter/PresenterNotesView.cxx OString ImagePreparer::prepareNotes( sal_uInt32 aSlideNumber ) diff --git a/sd/source/ui/remotecontrol/ImagePreparer.hxx b/sd/source/ui/remotecontrol/ImagePreparer.hxx index 2adf22863900..130eeb699041 100644 --- a/sd/source/ui/remotecontrol/ImagePreparer.hxx +++ b/sd/source/ui/remotecontrol/ImagePreparer.hxx @@ -45,7 +45,6 @@ private: void sendNotes( sal_uInt32 aSlideNumber ); rtl::OString prepareNotes( sal_uInt32 aSlideNumber ); - rtl::OString notesToHtml( sal_uInt32 aSlideNumber ); }; } diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx index 8ec942d201d5..deb881431f82 100644 --- a/sd/source/ui/remotecontrol/Server.cxx +++ b/sd/source/ui/remotecontrol/Server.cxx @@ -186,7 +186,7 @@ void RemoteServer::presentationStarted( const css::uno::Reference< return; MutexGuard aGuard( spServer->mDataMutex ); for ( vector<Communicator*>::const_iterator aIt = spServer->mCommunicators.begin(); - aIt < spServer->mCommunicators.end(); aIt++ ) + aIt != spServer->mCommunicators.end(); ++aIt ) { (*aIt)->presentationStarted( rController ); } @@ -197,7 +197,7 @@ void RemoteServer::presentationStopped() return; MutexGuard aGuard( spServer->mDataMutex ); for ( vector<Communicator*>::const_iterator aIt = spServer->mCommunicators.begin(); - aIt < spServer->mCommunicators.end(); aIt++ ) + aIt != spServer->mCommunicators.end(); ++aIt ) { (*aIt)->disposeListener(); } @@ -209,7 +209,7 @@ void RemoteServer::removeCommunicator( Communicator* mCommunicator ) return; MutexGuard aGuard( spServer->mDataMutex ); for ( vector<Communicator*>::iterator aIt = spServer->mCommunicators.begin(); - aIt < spServer->mCommunicators.end(); aIt++ ) + aIt != spServer->mCommunicators.end(); ++aIt ) { if ( mCommunicator == *aIt ) { @@ -275,7 +275,7 @@ sal_Bool RemoteServer::connectClient( ClientInfo* pClient, rtl::OUString aPin ) spServer->mCommunicators.push_back( pCommunicator ); for ( vector<ClientInfoInternal*>::iterator aIt = spServer->mAvailableClients.begin(); - aIt < spServer->mAvailableClients.end(); aIt++ ) + aIt != spServer->mAvailableClients.end(); ++aIt ) { if ( pClient == *aIt ) { diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index e085f47a6d86..2cc9d30f8bf2 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -44,6 +44,7 @@ #include <toolkit/unohlp.hxx> +#include <sfx2/infobar.hxx> #include <sfx2/imagemgr.hxx> #include <sfx2/request.hxx> #include <sfx2/docfile.hxx> @@ -2570,7 +2571,8 @@ FncGetChildWindowId aShowChildren[] = &SvxIMapDlgChildWindow::GetChildWindowId, &SvxHlinkDlgWrapper::GetChildWindowId, &SfxTemplateDialogWrapper::GetChildWindowId, - &GalleryChildWindow::GetChildWindowId + &GalleryChildWindow::GetChildWindowId, + &SfxInfoBarContainerChild::GetChildWindowId }; #define NAVIGATOR_CHILD_MASK 0x80000000UL diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx index 2d901efae1ce..6b31439680f4 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx @@ -41,10 +41,6 @@ #include <vcl/bmpacc.hxx> #include <vcl/pngwrite.hxx> -const static sal_Int32 gnSuperSampleFactor (2); -const static bool gbAllowSuperSampling (false); - - namespace sd { namespace slidesorter { namespace view { class SlideSorterView; class PageObjectViewObjectContact; @@ -73,10 +69,12 @@ Bitmap BitmapFactory::CreateBitmap ( const bool bDoSuperSampling) { Size aSize (rPixelSize); - if (bDoSuperSampling && gbAllowSuperSampling) + if (bDoSuperSampling) { - aSize.Width() *= gnSuperSampleFactor; - aSize.Height() *= gnSuperSampleFactor; + // Supersampling factor + int aSuperSamplingFactor = 2; + aSize.Width() *= aSuperSamplingFactor; + aSize.Height() *= aSuperSamplingFactor; } Bitmap aPreview (maRenderer.RenderPage ( @@ -85,7 +83,7 @@ Bitmap BitmapFactory::CreateBitmap ( String(), true, false).GetBitmapEx().GetBitmap()); - if (bDoSuperSampling && gbAllowSuperSampling) + if (bDoSuperSampling) { aPreview.Scale(rPixelSize, BMP_SCALE_BEST); } diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx index db3f12d377ab..27c263d1a35b 100644 --- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx @@ -147,7 +147,7 @@ Bitmap GenericPageCache::GetPreviewBitmap ( // i.e. the bitmap is not empty. if (bResize && aBitmapSize.Width()>0 && aBitmapSize.Height()>0) { - aPreview.Scale(maPreviewSize, BMP_SCALE_FAST); + aPreview.Scale(maPreviewSize); } bMayBeUpToDate = false; } @@ -184,7 +184,7 @@ Bitmap GenericPageCache::GetMarkedPreviewBitmap ( // i.e. the bitmap is not empty. if (aBitmapSize.Width()>0 && aBitmapSize.Height()>0) { - aMarkedPreview.Scale(maPreviewSize, BMP_SCALE_FAST); + aMarkedPreview.Scale(maPreviewSize); } } diff --git a/sd/source/ui/slidesorter/controller/SlsProperties.cxx b/sd/source/ui/slidesorter/controller/SlsProperties.cxx index 1f7cd71d0f59..ccf83b290fb2 100644 --- a/sd/source/ui/slidesorter/controller/SlsProperties.cxx +++ b/sd/source/ui/slidesorter/controller/SlsProperties.cxx @@ -254,14 +254,6 @@ bool Properties::IsOnlyPreviewTriggersMouseOver (void) const } - - -bool Properties::IsHighContrastModeActive (void) const -{ - return mbIsHighContrastModeActive; -} - - } } } // end of namespace ::sd::slidesorter::controller /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx index 990d66afdb4e..c775e6fc39ac 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx @@ -120,7 +120,6 @@ public: */ bool IsOnlyPreviewTriggersMouseOver (void) const; - bool IsHighContrastModeActive (void) const; private: bool mbIsHighlightCurrentSlide; diff --git a/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx b/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx index a296568e844a..6df9a88e8143 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx @@ -54,14 +54,6 @@ public: */ void SetPage (const model::SharedPageDescriptor& rpPage); - /** Show a previously set default help text. - */ - void ShowDefaultHelpText (void); - - /** Show a temporary help text. - */ - void ShowHelpText (const ::rtl::OUString& rsHelpText); - /** Hide the tool tip. @return Returns whether the tool tip was visible at the time this method diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index 23516a95b3a2..66c3cdf0d315 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -819,7 +819,7 @@ void SlideSorterView::ConfigurationChanged ( mpPreviewCache.reset( new cache::PageCache( mpLayouter->GetPageObjectSize(), - false, + true, cache::SharedCacheContext(new ViewCacheContext(mrSlideSorter)))); } diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx index 217d9290264f..43dfb721d8af 100644 --- a/sd/source/ui/slidesorter/view/SlsToolTip.cxx +++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx @@ -102,37 +102,6 @@ void ToolTip::SetPage (const model::SharedPageDescriptor& rpDescriptor) - -void ToolTip::ShowDefaultHelpText (void) -{ - if (msCurrentHelpText != msDefaultHelpText) - { - const bool bIsVisible (Hide()); - - msCurrentHelpText = msDefaultHelpText; - - Show(bIsVisible); - } -} - - - - -void ToolTip::ShowHelpText (const ::rtl::OUString& rsHelpText) -{ - if (msCurrentHelpText != rsHelpText) - { - const bool bIsVisible (Hide()); - - msCurrentHelpText = rsHelpText; - - Show(bIsVisible); - } -} - - - - void ToolTip::Show (const bool bNoDelay) { if (bNoDelay) diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index c0f468cda2a3..5dda9c76355e 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -171,7 +171,7 @@ static SdTypesCache gImplTypesCache; { 0,0,0,0,0,0} - const SfxItemPropertyMapEntry* lcl_GetImpress_SdXShapePropertyGraphicMap_Impl() + static const SfxItemPropertyMapEntry* lcl_GetImpress_SdXShapePropertyGraphicMap_Impl() { static const SfxItemPropertyMapEntry aImpress_SdXShapePropertyGraphicMap_Impl[] = @@ -182,7 +182,7 @@ static SdTypesCache gImplTypesCache; return aImpress_SdXShapePropertyGraphicMap_Impl; } - const SfxItemPropertyMapEntry* lcl_GetImpress_SdXShapePropertySimpleMap_Impl() + static const SfxItemPropertyMapEntry* lcl_GetImpress_SdXShapePropertySimpleMap_Impl() { static const SfxItemPropertyMapEntry aImpress_SdXShapePropertySimpleMap_Impl[] = @@ -199,7 +199,7 @@ static SdTypesCache gImplTypesCache; { MAP_CHAR_LEN("NavigationOrder"), WID_NAVORDER, &::getCppuType((const sal_Int32*)0), 0, 0},\ { 0,0,0,0,0,0} - const SfxItemPropertyMapEntry* lcl_GetDraw_SdXShapePropertySimpleMap_Impl() + static const SfxItemPropertyMapEntry* lcl_GetDraw_SdXShapePropertySimpleMap_Impl() { static const SfxItemPropertyMapEntry aDraw_SdXShapePropertyMap_Impl[] = { @@ -207,7 +207,7 @@ static SdTypesCache gImplTypesCache; }; return aDraw_SdXShapePropertyMap_Impl; } - const SfxItemPropertyMapEntry* lcl_GetDraw_SdXShapePropertyGraphicMap_Impl() + static const SfxItemPropertyMapEntry* lcl_GetDraw_SdXShapePropertyGraphicMap_Impl() { static const SfxItemPropertyMapEntry aDraw_SdXShapePropertyGraphicMap_Impl[] = { @@ -216,7 +216,7 @@ static SdTypesCache gImplTypesCache; }; return aDraw_SdXShapePropertyGraphicMap_Impl; } - const SfxItemPropertyMapEntry* lcl_ImplGetShapePropertyMap( sal_Bool bImpress, sal_Bool bGraphicObj ) + static const SfxItemPropertyMapEntry* lcl_ImplGetShapePropertyMap( sal_Bool bImpress, sal_Bool bGraphicObj ) { const SfxItemPropertyMapEntry* pRet = 0; if( bImpress ) @@ -236,7 +236,7 @@ static SdTypesCache gImplTypesCache; return pRet; } - const SvxItemPropertySet* lcl_ImplGetShapePropertySet( sal_Bool bImpress, sal_Bool bGraphicObj ) + static const SvxItemPropertySet* lcl_ImplGetShapePropertySet( sal_Bool bImpress, sal_Bool bGraphicObj ) { const SvxItemPropertySet* pRet = 0; if( bImpress ) @@ -267,7 +267,7 @@ static SdTypesCache gImplTypesCache; } return pRet; } - const SfxItemPropertyMapEntry* lcl_GetEmpty_SdXShapePropertyMap_Impl() + static const SfxItemPropertyMapEntry* lcl_GetEmpty_SdXShapePropertyMap_Impl() { static SfxItemPropertyMapEntry aEmpty_SdXShapePropertyMap_Impl[] = { diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 75ff0f135d49..53e3a760036c 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -49,6 +49,7 @@ #include <svx/xlineit0.hxx> #include <svx/graphichelper.hxx> #include <svx/compressgraphicdialog.hxx> +#include <svx/extedit.hxx> #include <svx/svdoutl.hxx> #include <svx/xlnwtit.hxx> #include <svx/svdoattr.hxx> @@ -93,6 +94,34 @@ using namespace ::com::sun::star::uno; namespace sd { +class SdExternalToolEdit : public ExternalToolEdit +{ + FmFormView* m_pView; + SdrObject* m_pObj; + +public: + SdExternalToolEdit ( FmFormView* pView, SdrObject* pObj ) : + m_pView (pView), + m_pObj (pObj) + {} + + virtual void Update( Graphic& aGraphic ) + { + SdrPageView* pPageView = m_pView->GetSdrPageView(); + if( pPageView ) + { + SdrGrafObj* pNewObj = (SdrGrafObj*) m_pObj->Clone(); + String aStr( m_pView->GetDescriptionOfMarkedObjects() ); + aStr.Append( sal_Unicode(' ') ); + aStr.Append( String( "External Edit" ) ); + m_pView->BegUndo( aStr ); + pNewObj->SetGraphicObject( aGraphic ); + m_pView->ReplaceObjectAtView( m_pObj, *pPageView, pNewObj ); + m_pView->EndUndo(); + } + } +}; + /************************************************************************* |* |* SfxRequests fuer temporaere Funktionen @@ -950,6 +979,24 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) } break; + case SID_EXTERNAL_EDIT: + { + const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); + if( rMarkList.GetMarkCount() == 1 ) + { + SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); + if( pObj && pObj->ISA( SdrGrafObj ) && ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP ) + { + GraphicObject aGraphicObject( ( (SdrGrafObj*) pObj )->GetGraphicObject() ); + SdExternalToolEdit* aExternalToolEdit = new SdExternalToolEdit( mpDrawView, pObj ); + aExternalToolEdit->Edit( &aGraphicObject ); + } + } + Cancel(); + rReq.Ignore(); + } + break; + case SID_COMPRESS_GRAPHIC: { const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); diff --git a/sd/source/ui/view/drvwshrg.cxx b/sd/source/ui/view/drvwshrg.cxx index 6f21afefa53c..51b9e2773cee 100644 --- a/sd/source/ui/view/drvwshrg.cxx +++ b/sd/source/ui/view/drvwshrg.cxx @@ -29,6 +29,7 @@ #include "DrawViewShell.hxx" #include <sfx2/templdlg.hxx> +#include <sfx2/infobar.hxx> #include <svx/fontwork.hxx> #include <svx/bmpmask.hxx> @@ -77,6 +78,7 @@ SFX_IMPL_INTERFACE(DrawViewShell, SfxShell, SdResId(STR_DRAWVIEWSHELL)) SFX_POPUPMENU_REGISTRATION( SdResId(RID_DRAW_TEXTOBJ_INSIDE_POPUP) ); SFX_CHILDWINDOW_CONTEXT_REGISTRATION( SID_NAVIGATOR ); SFX_CHILDWINDOW_REGISTRATION( SfxTemplateDialogWrapper::GetChildWindowId() ); + SFX_CHILDWINDOW_REGISTRATION( SfxInfoBarContainerChild::GetChildWindowId() ); SFX_CHILDWINDOW_REGISTRATION( SvxFontWorkChildWindow::GetChildWindowId() ); SFX_CHILDWINDOW_REGISTRATION( SvxColorChildWindow::GetChildWindowId() ); SFX_CHILDWINDOW_REGISTRATION( AnimationChildWindow::GetChildWindowId() ); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index fbf2b18b2720..2b93ed6213b9 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -36,6 +36,7 @@ #include <svx/hyperdlg.hxx> #include <svx/zoomslideritem.hxx> +#include <sfx2/infobar.hxx> #include <sfx2/objface.hxx> #include <sot/exchange.hxx> #include <svx/ruler.hxx> @@ -126,6 +127,7 @@ SFX_IMPL_INTERFACE(OutlineViewShell, SfxShell, SdResId(STR_OUTLINEVIEWSHELL)) SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_APPLICATION | SFX_VISIBILITY_DESKTOP | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_CLIENT | SFX_VISIBILITY_VIEWER | SFX_VISIBILITY_READONLYDOC, SdResId(RID_DRAW_VIEWER_TOOLBOX) ); SFX_CHILDWINDOW_REGISTRATION( SfxTemplateDialogWrapper::GetChildWindowId() ); + SFX_CHILDWINDOW_REGISTRATION( SfxInfoBarContainerChild::GetChildWindowId() ); SFX_CHILDWINDOW_REGISTRATION( SvxHlinkDlgWrapper::GetChildWindowId() ); SFX_CHILDWINDOW_REGISTRATION( ::sd::SpellDialogChildWindow::GetChildWindowId() ); SFX_CHILDWINDOW_REGISTRATION( SID_SEARCH_DLG ); |