diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:38:59 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:38:59 +0200 |
commit | 0fb9e53c06265200b8836e60d9c748671126ca2b (patch) | |
tree | 647997dd5fa67284473575a16208fc029853b175 | |
parent | ebcd1df9ff6e712ac67dbea480bdb0be03068835 (diff) | |
parent | e8d28c5df00e9bc6171e5461f81a723db0818367 (diff) |
Merge branch 'master' into feature/gnumake4
61 files changed, 290 insertions, 244 deletions
diff --git a/animations/prj/build.lst b/animations/prj/build.lst index 276f25e46..ef1b0946a 100644 --- a/animations/prj/build.lst +++ b/animations/prj/build.lst @@ -1,3 +1,3 @@ -animations animations : cppuhelper comphelper offuh LIBXSLT:libxslt NULL +animations animations : cppuhelper comphelper offapi LIBXSLT:libxslt NULL animations animations usr1 - all animations_mkout NULL animations animations\source\animcore nmake - all animations_animcore NULL diff --git a/animations/source/animcore/factreg.cxx b/animations/source/animcore/factreg.cxx index 9aa48477b..d297f6f0d 100644 --- a/animations/source/animcore/factreg.cxx +++ b/animations/source/animcore/factreg.cxx @@ -78,13 +78,7 @@ sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) { return g_moduleCount.canUnload( &g_moduleCount , pTime ); } - -//================================================================================================== -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} + //================================================================================================== SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) diff --git a/animations/source/animcore/makefile.mk b/animations/source/animcore/makefile.mk index 9c6b4a2cd..fac27baa1 100644 --- a/animations/source/animcore/makefile.mk +++ b/animations/source/animcore/makefile.mk @@ -50,7 +50,7 @@ SHL1VERSIONMAP=$(SOLARENV)/src/unloadablecomponent.map SHL1STDLIBS= \ $(SALLIB) \ $(CPPULIB) \ - $(CPPUHELPERLIB) + $(CPPUHELPERLIB) SHL1DEPN= diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk index a348884af..db7dda5a1 100644 --- a/sd/CppunitTest_sd_uimpress.mk +++ b/sd/CppunitTest_sd_uimpress.mk @@ -32,13 +32,17 @@ $(eval $(call gb_CppunitTest_set_include,sd_uimpress,\ -I$(realpath $(SRCDIR)/sd/inc) \ -I$(realpath $(SRCDIR)/sd/inc/pch) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ )) $(eval $(call gb_CppunitTest_add_defs,sd_uimpress,\ -DSD_DLLIMPLEMENTATION \ )) +$(eval $(call gb_CppunitTest_add_api,sd_uimpress,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_CppunitTest_add_library_objects,sd_uimpress,sd)) $(eval $(call gb_CppunitTest_add_linked_libs,sd_uimpress,\ @@ -87,6 +91,7 @@ $(eval $(call gb_CppunitTest_add_service_rdbs,sd_uimpress,\ $(eval $(call gb_CppunitTest_set_args,sd_uimpress,\ --headless \ --invisible \ + --protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \ )) $(eval $(call gb_RdbTarget_RdbTarget,sd_uimpress)) diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index f4673abc4..d0d4e1cf4 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -44,7 +44,6 @@ $(eval $(call gb_Library_set_include,sd,\ -I$(WORKDIR)/inc/sd \ -I$(WORKDIR)/SdiTarget/sd/sdi \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ )) $(eval $(call gb_Library_add_defs,sd,\ @@ -58,6 +57,11 @@ $(eval $(call gb_Library_set_defs,sd,\ )) endif +$(eval $(call gb_Library_add_api,sd,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_Library_add_linked_libs,sd,\ avmedia \ basegfx \ diff --git a/sd/Library_sdd.mk b/sd/Library_sdd.mk index 894e39963..61ae7d3b0 100644 --- a/sd/Library_sdd.mk +++ b/sd/Library_sdd.mk @@ -34,7 +34,11 @@ $(eval $(call gb_Library_set_include,sdd,\ -I$(realpath $(SRCDIR)/sd/inc) \ -I$(realpath $(SRCDIR)/sd/inc/pch) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_add_api,sdd,\ + offapi \ + udkapi \ )) $(eval $(call gb_Library_add_linked_libs,sdd,\ diff --git a/sd/Library_sdfilt.mk b/sd/Library_sdfilt.mk index 94563c6ff..507695064 100644 --- a/sd/Library_sdfilt.mk +++ b/sd/Library_sdfilt.mk @@ -34,7 +34,6 @@ $(eval $(call gb_Library_set_include,sdfilt,\ -I$(realpath $(SRCDIR)/sd/inc) \ -I$(realpath $(SRCDIR)/sd/inc/pch) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ )) $(eval $(call gb_Library_add_defs,sdfilt,\ @@ -47,6 +46,11 @@ $(eval $(call gb_Library_add_defs,sdfilt,\ )) endif +$(eval $(call gb_Library_add_api,sdfilt,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_Library_add_linked_libs,sdfilt,\ comphelper \ cppu \ diff --git a/sd/Library_sdui.mk b/sd/Library_sdui.mk index 012fad46a..8d418250f 100644 --- a/sd/Library_sdui.mk +++ b/sd/Library_sdui.mk @@ -35,13 +35,17 @@ $(eval $(call gb_Library_set_include,sdui,\ -I$(realpath $(SRCDIR)/sd/inc/pch) \ -I$(realpath $(SRCDIR)/sd/source/ui/inc) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ )) $(eval $(call gb_Library_add_defs,sdui,\ -DSD_DLLIMPLEMENTATION \ )) +$(eval $(call gb_Library_add_api,sdui,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_Library_add_linked_libs,sdui,\ basegfx \ comphelper \ diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index e8e46b94c..d69122633 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -502,7 +502,6 @@ #include "svtools/ctrltool.hxx" #include "svtools/ehdl.hxx" #include "svl/eitem.hxx" -#include "svtools/filedlg.hxx" #include "svtools/filter.hxx" #include "svl/flagitem.hxx" #include "svtools/fltcall.hxx" diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx index d1cede9fd..bdcb832c3 100644 --- a/sd/inc/sdabstdlg.hxx +++ b/sd/inc/sdabstdlg.hxx @@ -200,7 +200,8 @@ public: virtual AbstractMorphDlg* CreateMorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0; virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL ) = 0; virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr ) = 0; - virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, List& rPageNames, List* pCSList ) = 0; + virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, + const std::vector<String> &rPageNames, List* pCSList ) = 0; virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0; virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs) = 0; virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) = 0; diff --git a/sd/prj/build.lst b/sd/prj/build.lst index dc4c16095..cc8eca8dd 100644 --- a/sd/prj/build.lst +++ b/sd/prj/build.lst @@ -1,3 +1,3 @@ -sd sd : filter TRANSLATIONS:translations animations svx sfx2 stoc canvas LIBXSLT:libxslt oox ure NULL +sd sd : filter TRANSLATIONS:translations animations svx sfx2 stoc canvas LIBXSLT:libxslt oox ure test NULL sd sd usr1 - all sd_mkout NULL sd sd\prj nmake - all sd_prj NULL diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index d1bee4455..407c1bf31 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -870,7 +870,7 @@ void SdStyleSheetPool::UpdateStdNames() { String aHelpFile; sal_uInt32 nCount = aStyles.size(); - List* pEraseList = NULL; + std::vector<SfxStyleSheetBase*> aEraseList; for( sal_uInt32 n=0; n < nCount; n++ ) { @@ -953,30 +953,16 @@ void SdStyleSheetPool::UpdateStdNames() else { // Sheet existiert schon: Altes Sheet muss entfernt werden - if( !pEraseList ) - { - pEraseList = new List(); - } - - pEraseList->Insert( pStyle ); + aEraseList.push_back( pStyle ); } } } } } - if ( pEraseList ) - { - // Styles, welche nicht umbenannt werden konnten, muessen entfernt werden - for ( sal_uLong i = 0; i < pEraseList->Count(); i++ ) - { - SfxStyleSheetBase* pEraseSheet = ( SfxStyleSheetBase* ) pEraseList->GetObject( i ); - Remove( pEraseSheet ); - } - - delete pEraseList; - pEraseList = NULL; - } + // Styles, welche nicht umbenannt werden konnten, muessen entfernt werden + for ( size_t i = 0, n = aEraseList.size(); i < n; ++i ) + Remove( aEraseList[ i ] ); } // -------------------------------------------------------------------- // Neues SvxNumBulletItem fuer das jeweilige StyleSheet setzen diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 39691f4c4..69c231aba 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -2218,9 +2218,6 @@ OUString PowerPointExport::implGetImplementationName() const } // UNO component -// ------------------------------------------ -// - component_getImplementationEnvironment - -// ------------------------------------------ static struct cppu::ImplementationEntry g_entries[] = { @@ -2239,11 +2236,6 @@ extern "C" { #endif -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - // ------------------------ // - component_getFactory - // ------------------------ diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index eaa0a0cce..37017f4d7 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -100,9 +100,17 @@ #include <com/sun/star/document/XDocumentProperties.hpp> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> +#include <comphelper/processfactory.hxx> +#include <comphelper/componentcontext.hxx> using namespace ::com::sun::star; +uno::Reference< uno::XComponentContext > +lcl_getUnoCtx() +{ + comphelper::ComponentContext aCtx( ::comphelper::getProcessServiceFactory() ); + return aCtx.getUNOContext(); +} SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SvStorage& rStorage, SfxMedium& rMedium, MSFilterTracer* pTracer ) { @@ -2699,6 +2707,14 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi return pObj; } + +bool +ImplSdPPTImport::ReadFormControl( uno::Reference< io::XInputStream >& xIs, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const +{ + ::oox::ole::OleFormCtrlImportHelper maFormCtrlHelper( xIs, lcl_getUnoCtx(), mpDoc->GetDocSh()->GetModel() ); + return maFormCtrlHelper.importFormControlFromObjStorage( rFormComp ); +} + // --------------------- // - exported function - // --------------------- diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx index 2947c5c9f..662ed2754 100644 --- a/sd/source/filter/ppt/pptin.hxx +++ b/sd/source/filter/ppt/pptin.hxx @@ -36,6 +36,7 @@ #include <filter/msfilter/msfiltertracer.hxx> #include <com/sun/star/uno/Any.h> #include <boost/shared_ptr.hpp> +#include <oox/ole/olehelper.hxx> class SdDrawDocument; class SfxMedium; @@ -70,7 +71,7 @@ class ImplSdPPTImport : public SdrPowerPointImport SdrLayerID mnBackgroundObjectsLayerID; tAnimationMap maAnimations; - +// ::oox::ole::OleFormCtrlImportHelper maFormCtrlHelper; void SetHeaderFooterPageSettings( SdPage* pPage, const PptSlidePersistEntry* pMasterPersist ); void ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimationsUsed ); @@ -89,6 +90,7 @@ public: ~ImplSdPPTImport(); sal_Bool Import(); + virtual bool ReadFormControl( com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& xIs, com::sun::star::uno::Reference< com::sun::star::form::XFormComponent > & rFormComp ) const; }; class SdPPTImport diff --git a/sd/source/ui/accessibility/AccessiblePageShape.cxx b/sd/source/ui/accessibility/AccessiblePageShape.cxx index 827f2a2d4..4c9645891 100644 --- a/sd/source/ui/accessibility/AccessiblePageShape.cxx +++ b/sd/source/ui/accessibility/AccessiblePageShape.cxx @@ -200,7 +200,7 @@ sal_Int32 SAL_CALL AccessiblePageShape::getForeground (void) aColor >>= nColor; } } - catch (::com::sun::star::beans::UnknownPropertyException) + catch (const ::com::sun::star::beans::UnknownPropertyException&) { // Ignore exception and return default color. } @@ -254,7 +254,7 @@ sal_Int32 SAL_CALL AccessiblePageShape::getBackground (void) OSL_TRACE ("no Background property in page"); } } - catch (::com::sun::star::beans::UnknownPropertyException) + catch (const ::com::sun::star::beans::UnknownPropertyException&) { OSL_TRACE ("caught excption due to unknown property"); // Ignore exception and return default color. @@ -351,7 +351,7 @@ void AccessiblePageShape::dispose (void) xPageProperties->getPropertyValue(A2S("LinkDisplayName")) >>= sCurrentSlideName; } } - catch (beans::UnknownPropertyException&) + catch (const beans::UnknownPropertyException&) { } diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx index 896ea1375..ccbaf158a 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx @@ -698,8 +698,8 @@ void CustomAnimationCreateDialog::storePosition() // save settings (screen position and current page) SvtViewOptions aDlgOpt( E_TABDIALOG, String::CreateFromInt32( DLG_CUSTOMANIMATION_CREATE ) ); - aDlgOpt.SetWindowState( - OUString::createFromAscii( GetWindowState( WINDOWSTATE_MASK_POS ).GetBuffer() ) ); + aDlgOpt.SetWindowState(OStringToOUString( + GetWindowState(WINDOWSTATE_MASK_POS), RTL_TEXTENCODING_ASCII_US)); } } diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index a1e64d212..f7d5b2b9f 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -533,6 +533,7 @@ void CustomAnimationList::select( CustomAnimationEffectPtr pEffect, bool bSelect if( pEntry->getEffect() == pEffect ) { Select( pEntry, bSelect ); + MakeVisible( pEntry ); break; } pEntry = static_cast< CustomAnimationListEntry* >(Next( pEntry )); @@ -587,21 +588,51 @@ void stl_append_effect_func::operator()(CustomAnimationEffectPtr pEffect) void CustomAnimationList::update() { mbIgnorePaint = true; + SetUpdateMode( sal_False ); CustomAnimationListEntry* pEntry = 0; std::list< CustomAnimationEffectPtr > aExpanded; std::list< CustomAnimationEffectPtr > aSelected; - CustomAnimationEffectPtr pFirstVisibleEffect; + CustomAnimationEffectPtr pFirstSelEffect; + CustomAnimationEffectPtr pLastSelEffect; + long nFirstVis = -1; + long nLastVis = -1; + long nFirstSelOld = -1; + long nFirstSelNew = -1; + long nLastSelOld = -1; + long nLastSelNew = -1; + bool bMoved = false; + bool bMovedUp = false; + bool bMovedDown = false; if( mpMainSequence.get() ) { - // save selection and expand states - pEntry = static_cast<CustomAnimationListEntry*>(FirstVisible()); + // save scroll position + pEntry = static_cast<CustomAnimationListEntry*>(GetFirstEntryInView()); + if( pEntry ) + nFirstVis = GetAbsPos( pEntry ); + + pEntry = static_cast<CustomAnimationListEntry*>(GetLastEntryInView()); + if( pEntry ) + nLastVis = GetAbsPos( pEntry ); + + pEntry = static_cast<CustomAnimationListEntry*>(FirstSelected()); if( pEntry ) - pFirstVisibleEffect = pEntry->getEffect(); + { + pFirstSelEffect = pEntry->getEffect(); + nFirstSelOld = GetAbsPos( pEntry ); + } + pEntry = static_cast<CustomAnimationListEntry*>(LastSelected()); + if( pEntry ) + { + pLastSelEffect = pEntry->getEffect(); + nLastSelOld = GetAbsPos( pEntry ); + } + + // save selection and expand states pEntry = static_cast<CustomAnimationListEntry*>(First()); while( pEntry ) @@ -668,15 +699,59 @@ void CustomAnimationList::update() if( std::find( aSelected.begin(), aSelected.end(), pEffect ) != aSelected.end() ) Select( pEntry ); - if( pFirstVisibleEffect == pEffect ) - MakeVisible( pEntry ); + if( pEffect == pFirstSelEffect ) + nFirstSelNew = GetAbsPos( pEntry ); + + if( pEffect == pLastSelEffect ) + nLastSelNew = GetAbsPos( pEntry ); } pEntry = static_cast<CustomAnimationListEntry*>(Next( pEntry )); } + + // Scroll to a selected entry, depending on where the selection moved. + bMoved = nFirstSelNew != nFirstSelOld; + bMovedUp = nFirstSelNew < nFirstSelOld; + bMovedDown = nFirstSelNew > nFirstSelOld; + + if( bMoved && nLastSelOld < nFirstVis && nLastSelNew < nFirstVis ) + { + // The selection is above the visible area. + // Scroll up to show the last few selected entries. + if( nLastSelNew - (nLastVis - nFirstVis) > nFirstSelNew) + { + // The entries in the selection range can't fit in view. + // Scroll so the last selected entry is last in view. + ScrollToAbsPos( nLastSelNew - (nLastVis - nFirstVis) ); + } + else + ScrollToAbsPos( nFirstSelNew ); + } + else if( bMoved && nFirstSelOld > nLastVis && nFirstSelNew > nLastVis ) + { + // The selection is below the visible area. + // Scroll down to the first few selected entries. + ScrollToAbsPos( nFirstSelNew ); + } + else if( bMovedUp && nFirstSelOld <= nFirstVis ) + { + // A visible entry has moved up out of view; scroll up one. + ScrollToAbsPos( nFirstVis - 1 ); + } + else if( bMovedDown && nLastSelOld >= nLastVis ) + { + // An entry has moved down out of view; scroll down one. + ScrollToAbsPos( nFirstVis + 1 ); + } + else if ( nFirstVis != -1 ) + { + // The selection is still in view, or it hasn't moved. + ScrollToAbsPos( nFirstVis ); + } } mbIgnorePaint = false; + SetUpdateMode( sal_True ); Invalidate(); } @@ -791,6 +866,8 @@ void CustomAnimationList::onSelectionChanged( Any aSelection ) void CustomAnimationList::SelectHdl() { + if( mbIgnorePaint ) + return; SvTreeListBox::SelectHdl(); mpController->onSelect(); } diff --git a/sd/source/ui/app/popup2_tmpl.src b/sd/source/ui/app/popup2_tmpl.src index d3fe0b4b5..3ed1830ac 100644 --- a/sd/source/ui/app/popup2_tmpl.src +++ b/sd/source/ui/app/popup2_tmpl.src @@ -560,23 +560,19 @@ MN_SLIDE_MENU #elif SD_POPUP == RID_GRAPHIC_TEXTOBJ_POPUP MN_PAGE_MENU -#endif - SEPARATOR - MN_CAPTUREPOINT - SEPARATOR - MN_LEAVE_GROUP - SEPARATOR +#endif MN_NAVIGATOR - SEPARATOR - MN_GRID - SEPARATOR - MN_HELPLINES #if SD_POPUP == RID_DRAW_TEXTOBJ_POPUP - SEPARATOR MN_OUTLINEMODE MN_DIAMODE MN_PRESENTATION #endif + SEPARATOR + MN_GRID + MN_HELPLINES + MN_CAPTUREPOINT + SEPARATOR + MN_LEAVE_GROUP }; }; diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx index 8dd347a68..687ecc196 100644 --- a/sd/source/ui/dlg/filedlg.cxx +++ b/sd/source/ui/dlg/filedlg.cxx @@ -142,7 +142,7 @@ IMPL_LINK( SdFileDialog_Imp, PlayMusicHdl, void *, EMPTYARG ) mbLabelPlaying = sal_False; } - catch( css::lang::IllegalArgumentException ) + catch(const css::lang::IllegalArgumentException&) { #ifdef DBG_UTIL OSL_FAIL( "Cannot access play button" ); @@ -161,9 +161,8 @@ IMPL_LINK( SdFileDialog_Imp, PlayMusicHdl, void *, EMPTYARG ) maUpdateTimer.SetTimeout( 100 ); maUpdateTimer.Start(); } - catch( css::uno::Exception& e ) + catch (const css::uno::Exception&) { - (void)e; mxPlayer.clear(); } @@ -176,7 +175,7 @@ IMPL_LINK( SdFileDialog_Imp, PlayMusicHdl, void *, EMPTYARG ) mbLabelPlaying = sal_True; } - catch( css::lang::IllegalArgumentException ) + catch (const css::lang::IllegalArgumentException&) { #ifdef DBG_UTIL OSL_FAIL( "Cannot access play button" ); @@ -212,7 +211,7 @@ IMPL_LINK( SdFileDialog_Imp, IsMusicStoppedHdl, void *, EMPTYARG ) String( SdResId( STR_PLAY ) ) ); mbLabelPlaying = sal_False; } - catch( css::lang::IllegalArgumentException ) + catch (const css::lang::IllegalArgumentException&) { #ifdef DBG_UTIL OSL_FAIL( "Cannot access play button" ); @@ -237,7 +236,7 @@ void SdFileDialog_Imp::CheckSelectionState() else mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, sal_True ); } - catch( css::lang::IllegalArgumentException ) + catch (const css::lang::IllegalArgumentException&) { #ifdef DBG_UTIL OSL_FAIL( "Cannot access \"selection\" checkbox" ); @@ -271,7 +270,7 @@ SdFileDialog_Imp::SdFileDialog_Imp( const short nDialogType, mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY, String( SdResId( STR_PLAY ) ) ); } - catch( css::lang::IllegalArgumentException ) + catch (const css::lang::IllegalArgumentException&) { #ifdef DBG_UTIL OSL_FAIL( "Cannot set play button label" ); @@ -284,7 +283,7 @@ SdFileDialog_Imp::SdFileDialog_Imp( const short nDialogType, { mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, sal_False ); } - catch( css::lang::IllegalArgumentException ) + catch (const css::lang::IllegalArgumentException&) { #ifdef DBG_UTIL OSL_FAIL( "Cannot disable selection checkbox" ); diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx index f164dcfae..30f609d72 100644 --- a/sd/source/ui/dlg/present.cxx +++ b/sd/source/ui/dlg/present.cxx @@ -55,7 +55,7 @@ using namespace ::com::sun::star::beans; \************************************************************************/ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow, const SfxItemSet& rInAttrs, - List& rPageNames, List* pCSList ) : + const std::vector<String> &rPageNames, List* pCSList ) : ModalDialog ( pWindow, SdResId( DLG_START_PRESENTATION ) ), aGrpRange ( this, SdResId( GRP_RANGE ) ), aRbtAll ( this, SdResId( RBT_ALL ) ), @@ -119,14 +119,8 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow, aTmfPause.SetAccessibleName(aRbtAuto.GetText()); // Listbox mit Seitennamen fuellen - rPageNames.First(); - for( sal_uInt16 i = 0; - i < rPageNames.Count(); - i++ ) - { - aLbDias.InsertEntry( *( String* ) rPageNames.GetCurObject() ); - rPageNames.Next(); - } + for (std::vector<String>::const_iterator pIter = rPageNames.begin(); pIter != rPageNames.end(); ++pIter) + aLbDias.InsertEntry(*pIter); if( pCustomShowList ) { diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx index 90c60c9b0..6f361755e 100644 --- a/sd/source/ui/dlg/sddlgfact.cxx +++ b/sd/source/ui/dlg/sddlgfact.cxx @@ -484,7 +484,8 @@ SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdParagraphTabDlg( : // add for OutlineBulletDlg end // add for SdStartPresentationDlg begin -AbstractSdStartPresDlg * SdAbstractDialogFactory_Impl::CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, List& rPageNames, List* pCSList ) +AbstractSdStartPresDlg * SdAbstractDialogFactory_Impl::CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, + const std::vector<String> &rPageNames, List* pCSList ) { return new AbstractSdStartPresDlg_Impl( new SdStartPresentationDlg( pWindow, rInAttrs, rPageNames, pCSList ) ); } diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index d227e774f..895ac8408 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -273,7 +273,8 @@ public: virtual AbstractMorphDlg* CreateMorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2); virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL ); virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr ); - virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, List& rPageNames, List* pCSList ); + virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, + const std::vector<String> &rPageNames, List* pCSList ); virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ); virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs); virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ); diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx index ecfc89c79..b4e93418e 100644 --- a/sd/source/ui/dlg/tpaction.cxx +++ b/sd/source/ui/dlg/tpaction.cxx @@ -170,7 +170,6 @@ SdTPAction::SdTPAction( Window* pWindow, const SfxItemSet& rInAttrs ) : SdTPAction::~SdTPAction() { - delete pCurrentActions; } // ----------------------------------------------------------------------- @@ -267,25 +266,24 @@ void SdTPAction::Construct() } } - pCurrentActions = new List; - pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_NONE, LIST_APPEND); - pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_PREVPAGE, LIST_APPEND); - pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_NEXTPAGE, LIST_APPEND); - pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_FIRSTPAGE, LIST_APPEND); - pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_LASTPAGE, LIST_APPEND); - pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_BOOKMARK, LIST_APPEND); - pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_DOCUMENT, LIST_APPEND); - pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_SOUND, LIST_APPEND); + maCurrentActions.push_back( presentation::ClickAction_NONE ); + maCurrentActions.push_back( presentation::ClickAction_PREVPAGE ); + maCurrentActions.push_back( presentation::ClickAction_NEXTPAGE ); + maCurrentActions.push_back( presentation::ClickAction_FIRSTPAGE ); + maCurrentActions.push_back( presentation::ClickAction_LASTPAGE ); + maCurrentActions.push_back( presentation::ClickAction_BOOKMARK ); + maCurrentActions.push_back( presentation::ClickAction_DOCUMENT ); + maCurrentActions.push_back( presentation::ClickAction_SOUND ); if( bOLEAction && aLbOLEAction.GetEntryCount() ) - pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_VERB, LIST_APPEND ); - pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_PROGRAM, LIST_APPEND); - pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_MACRO, LIST_APPEND); - pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_STOPPRESENTATION, LIST_APPEND); + maCurrentActions.push_back( presentation::ClickAction_VERB ); + maCurrentActions.push_back( presentation::ClickAction_PROGRAM ); + maCurrentActions.push_back( presentation::ClickAction_MACRO ); + maCurrentActions.push_back( presentation::ClickAction_STOPPRESENTATION ); // Action-Listbox fuellen - for (sal_uLong nAction = 0; nAction < pCurrentActions->Count(); nAction++) + for (size_t nAction = 0, n = maCurrentActions.size(); nAction < n; nAction++) { - sal_uInt16 nRId = GetClickActionSdResId((presentation::ClickAction)(sal_uLong)pCurrentActions->GetObject(nAction)); + sal_uInt16 nRId = GetClickActionSdResId( maCurrentActions[ nAction ] ); aLbAction.InsertEntry( String( SdResId( nRId ) ) ); } @@ -753,8 +751,8 @@ presentation::ClickAction SdTPAction::GetActualClickAction() presentation::ClickAction eCA = presentation::ClickAction_NONE; sal_uInt16 nPos = aLbAction.GetSelectEntryPos(); - if (nPos != LISTBOX_ENTRY_NOTFOUND) - eCA = (presentation::ClickAction)(sal_uLong)pCurrentActions->GetObject((sal_uLong)nPos); + if (nPos != LISTBOX_ENTRY_NOTFOUND && nPos < maCurrentActions.size()) + eCA = maCurrentActions[ nPos ]; return( eCA ); } @@ -762,9 +760,11 @@ presentation::ClickAction SdTPAction::GetActualClickAction() void SdTPAction::SetActualClickAction( presentation::ClickAction eCA ) { - sal_uInt16 nPos = (sal_uInt16)pCurrentActions->GetPos((void*)(sal_uLong)eCA); - DBG_ASSERT(nPos != 0xffff, "unbekannte Interaktion"); - aLbAction.SelectEntryPos(nPos); + std::vector<com::sun::star::presentation::ClickAction>::const_iterator pIter = + std::find(maCurrentActions.begin(),maCurrentActions.end(),eCA); + + if ( pIter != maCurrentActions.end() ) + aLbAction.SelectEntryPos( pIter-maCurrentActions.begin() ); } //------------------------------------------------------------------------ diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index dd7c931f0..c127454d7 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -825,7 +825,7 @@ void SdTpOptionsMisc::UpdateCompatibilityControls (void) } while (false); // One 'loop'. } - catch (uno::Exception e) + catch (const uno::Exception&) { // When there is an exception then simply use the default value of // bIsEnabled and disable the controls. diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx index 3f339e31b..d15977a4f 100644 --- a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx +++ b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx @@ -116,14 +116,14 @@ void ConfigurationControllerBroadcaster::NotifyListeners ( aEvent.UserData = iListener->maUserData; iListener->mxListener->notifyConfigurationChange(aEvent); } - catch (lang::DisposedException& rException) + catch (const lang::DisposedException& rException) { // When the exception comes from the listener itself then // unregister it. if (rException.Context == iListener->mxListener) RemoveListener(iListener->mxListener); } - catch(RuntimeException&) + catch (const RuntimeException&) { DBG_UNHANDLED_EXCEPTION(); } @@ -172,7 +172,7 @@ void ConfigurationControllerBroadcaster::NotifyListeners ( { NotifyListeners(aEvent); } - catch (lang::DisposedException) + catch (const lang::DisposedException&) { } } @@ -211,7 +211,7 @@ void ConfigurationControllerBroadcaster::DisposeAndClear (void) RemoveListener(iMap->second.front().mxListener); xListener->disposing(aEvent); } - catch (RuntimeException&) + catch (const RuntimeException&) { DBG_UNHANDLED_EXCEPTION(); } diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index 521c91a85..70915c83a 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -243,7 +243,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) ++aIter; } } - catch(IllegalArgumentException) + catch (const IllegalArgumentException&) { } } diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx index 409e99adc..0c805db94 100644 --- a/sd/source/ui/func/fusldlg.cxx +++ b/sd/source/ui/func/fusldlg.cxx @@ -81,7 +81,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& ) PresentationSettings& rPresentationSettings = mpDoc->getPresentationSettings(); SfxItemSet aDlgSet( mpDoc->GetPool(), ATTR_PRESENT_START, ATTR_PRESENT_END ); - List aPageNameList; + std::vector<String> aPageNameList(mpDoc->GetSdPageCount( PK_STANDARD )); const String& rPresPage = rPresentationSettings.maPresPage; String aFirstPage; String aStandardName( SdResId( STR_PAGE ) ); @@ -91,21 +91,21 @@ void FuSlideShowDlg::DoExecute( SfxRequest& ) for( nPage = mpDoc->GetSdPageCount( PK_STANDARD ) - 1L; nPage >= 0L; nPage-- ) { pPage = mpDoc->GetSdPage( (sal_uInt16) nPage, PK_STANDARD ); - String* pStr = new String( pPage->GetName() ); + String aStr( pPage->GetName() ); - if ( !pStr->Len() ) + if ( !aStr.Len() ) { - *pStr = String( SdResId( STR_PAGE ) ); - (*pStr).Append( UniString::CreateFromInt32( nPage + 1 ) ); + aStr = String( SdResId( STR_PAGE ) ); + aStr.Append( UniString::CreateFromInt32( nPage + 1 ) ); } - aPageNameList.Insert( pStr, (sal_uLong) 0 ); + aPageNameList[ nPage ] = aStr; // ist dies unsere (vorhandene) erste Seite? - if ( rPresPage == *pStr ) + if ( rPresPage == aStr ) aFirstPage = rPresPage; else if ( pPage->IsSelected() && !aFirstPage.Len() ) - aFirstPage = *pStr; + aFirstPage = aStr; } List* pCustomShowList = mpDoc->GetCustomShowList(); // No Create @@ -248,9 +248,6 @@ void FuSlideShowDlg::DoExecute( SfxRequest& ) mpDoc->SetChanged( sal_True ); } delete pDlg; - // Strings aus Liste loeschen - for( void* pStr = aPageNameList.First(); pStr; pStr = aPageNameList.Next() ) - delete (String*) pStr; } } // end of namespace sd diff --git a/sd/source/ui/inc/FrameView.hxx b/sd/source/ui/inc/FrameView.hxx index 6c8a4047e..58ba873be 100644 --- a/sd/source/ui/inc/FrameView.hxx +++ b/sd/source/ui/inc/FrameView.hxx @@ -43,11 +43,11 @@ namespace sd { |* View fuer den MDIFrame |* \************************************************************************/ -class FrameView +class SD_DLLPUBLIC FrameView : public SdrView { public: - SD_DLLPUBLIC FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView = NULL ); + FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView = NULL ); FrameView(const FrameView& rFrameView); virtual ~FrameView(); @@ -104,7 +104,7 @@ public: /** can be used to get the page kind that was selected on last save of this document */ PageKind GetPageKindOnLoad() const { return mePageKindOnLoad; } - SD_DLLPUBLIC void SetSelectedPage (sal_uInt16 nPage); + void SetSelectedPage (sal_uInt16 nPage); sal_uInt16 GetSelectedPage () const; /** is used in FrameView::ReadUserDataSequence() only to store the @@ -114,7 +114,7 @@ public: /** can be used to get the page that was selected on last save of this document */ sal_uInt16 GetSelectedPageOnLoad () const { return mnSelectedPageOnLoad; } - SD_DLLPUBLIC void SetViewShEditMode(EditMode eMode, PageKind eKind); + void SetViewShEditMode(EditMode eMode, PageKind eKind); EditMode GetViewShEditMode (PageKind eKind); /** Remember the edit mode of the main view shell at the time when the diff --git a/sd/source/ui/inc/present.hxx b/sd/source/ui/inc/present.hxx index 6069edcde..11681ce41 100644 --- a/sd/source/ui/inc/present.hxx +++ b/sd/source/ui/inc/present.hxx @@ -95,7 +95,7 @@ private: public: SdStartPresentationDlg( Window* pWindow, const SfxItemSet& rInAttrs, - List& rPageNames, + const std::vector<String> &rPageNames, List* pCSList ); void GetAttr( SfxItemSet& rOutAttrs ); diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx index 116d8150f..ecb203453 100644 --- a/sd/source/ui/inc/tpaction.hxx +++ b/sd/source/ui/inc/tpaction.hxx @@ -32,7 +32,6 @@ #include <com/sun/star/presentation/ClickAction.hpp> #include <com/sun/star/presentation/AnimationEffect.hpp> -#include <svtools/filedlg.hxx> #include <vcl/group.hxx> #include <vcl/fixed.hxx> #include <svx/dlgctrl.hxx> @@ -97,7 +96,7 @@ private: XColorTable* pColTab; sal_Bool bTreeUpdated; - List* pCurrentActions; + std::vector<com::sun::star::presentation::ClickAction> maCurrentActions; String aLastFile; ::std::vector< long > aVerbVector; diff --git a/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx b/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx index 2eb3d5495..6036f2173 100644 --- a/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx +++ b/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx @@ -174,8 +174,12 @@ IMPL_LINK(CacheCompactor, CompactionCallback, Timer*, EMPTYARG) { Run(); } - catch(::com::sun::star::uno::RuntimeException e) { } - catch(::com::sun::star::uno::Exception e) { } + catch (const ::com::sun::star::uno::RuntimeException&) + { + } + catch (const ::com::sun::star::uno::Exception&) + { + } mbIsCompactionRunning = false; return 1; diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx index 98c295b91..ea35320a1 100644 --- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx @@ -285,7 +285,7 @@ void GenericPageCache::ReleasePreviewBitmap (const CacheKey aKey) { mpQueueProcessor->Start(maRequestQueue.GetFrontPriorityClass()); } - catch (::com::sun::star::uno::RuntimeException) + catch (const ::com::sun::star::uno::RuntimeException&) { } } diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx index d26d9b7e3..8cd692418 100644 --- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx @@ -259,7 +259,7 @@ void CurrentSlideManager::SetCurrentSlideAtXController (const SharedPageDescript aPage); } } - catch (Exception aException) + catch (const Exception&) { // We have not been able to set the current page at the main view. // This is sad but still leaves us in a valid state. Therefore, diff --git a/sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx b/sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx index a0a9641e7..6f0f2f634 100644 --- a/sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx +++ b/sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx @@ -177,7 +177,6 @@ void SlideSorterCacheDisplay::Resize (void) else ++nC; } - double nAspect2 = double(nC) / double(nR); mnRowCount = nR; mnColumnCount = nC; diff --git a/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx b/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx index 904c0dcad..89565baed 100644 --- a/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx +++ b/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx @@ -222,7 +222,7 @@ TaskPaneShellManager* TreeNode::GetShellManager (void) { ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> xParent; - if (pWindow!=NULL && pWindow->GetAccessibleParentWindow()!=NULL) + if (pWindow->GetAccessibleParentWindow()!=NULL) xParent = pWindow->GetAccessibleParentWindow()->GetAccessible(); xAccessible = CreateAccessibleObject(xParent); pWindow->SetAccessible(xAccessible); diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx index bbce925ba..101528212 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx @@ -635,7 +635,7 @@ MasterPageContainer::Implementation::~Implementation (void) { xCloseable->close(true); } - catch (::com::sun::star::util::CloseVetoException aException) + catch (const ::com::sun::star::util::CloseVetoException&) { } } diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx index a9fa93d5c..59c989ee6 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx @@ -163,7 +163,7 @@ Image TemplatePreviewProvider::operator() ( } } } - catch (uno::Exception& rException) + catch (const uno::Exception& rException) { OSL_TRACE ( "caught exception while trying to access Thumbnail/thumbnail.png of %s: %s", @@ -196,7 +196,7 @@ Image TemplatePreviewProvider::operator() ( } } } - catch (uno::Exception& rException) + catch (const uno::Exception& rException) { OSL_TRACE ( "caught exception while trying to access Thumbnails/thumbnail.png of %s: %s", @@ -207,7 +207,7 @@ Image TemplatePreviewProvider::operator() ( } } } - catch (uno::Exception& rException) + catch (const uno::Exception& rException) { OSL_TRACE ( "caught exception while trying to access tuhmbnail of %s: %s", @@ -291,7 +291,7 @@ SdPage* TemplatePageObjectProvider::operator() (SdDrawDocument* pContainerDocume } } } - catch (uno::RuntimeException) + catch (const uno::RuntimeException&) { DBG_UNHANDLED_EXCEPTION(); pPage = NULL; diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx index fa7436164..0ca94d34d 100644 --- a/sd/source/ui/tools/EventMultiplexer.cxx +++ b/sd/source/ui/tools/EventMultiplexer.cxx @@ -206,10 +206,10 @@ EventMultiplexer::~EventMultiplexer (void) mpImpl->release(); mpImpl.release(); } - catch (RuntimeException aException) + catch (const RuntimeException&) { } - catch (Exception aException) + catch (const Exception&) { } } @@ -445,7 +445,7 @@ void EventMultiplexer::Implementation::ConnectToController (void) { xSet->addPropertyChangeListener(msCurrentPagePropertyName, this); } - catch (beans::UnknownPropertyException) + catch (const beans::UnknownPropertyException&) { OSL_TRACE("EventMultiplexer::ConnectToController: CurrentPage unknown"); } @@ -454,7 +454,7 @@ void EventMultiplexer::Implementation::ConnectToController (void) { xSet->addPropertyChangeListener(msEditModePropertyName, this); } - catch (beans::UnknownPropertyException) + catch (const beans::UnknownPropertyException&) { OSL_TRACE("EventMultiplexer::ConnectToController: IsMasterPageMode unknown"); } @@ -467,7 +467,7 @@ void EventMultiplexer::Implementation::ConnectToController (void) xSelection->addSelectionChangeListener(this); } } - catch (const lang::DisposedException aException) + catch (const lang::DisposedException&) { mbListeningToController = false; } @@ -492,7 +492,7 @@ void EventMultiplexer::Implementation::DisconnectFromController (void) { xSet->removePropertyChangeListener(msCurrentPagePropertyName, this); } - catch (beans::UnknownPropertyException aEvent) + catch (const beans::UnknownPropertyException&) { OSL_TRACE ("DisconnectFromController: CurrentPage unknown"); } @@ -501,7 +501,7 @@ void EventMultiplexer::Implementation::DisconnectFromController (void) { xSet->removePropertyChangeListener(msEditModePropertyName, this); } - catch (beans::UnknownPropertyException aEvent) + catch (const beans::UnknownPropertyException&) { OSL_TRACE ("DisconnectFromController: IsMasterPageMode unknown"); } diff --git a/sd/source/ui/tools/IdleDetection.cxx b/sd/source/ui/tools/IdleDetection.cxx index f9cee99f9..1e1a1b7b2 100644 --- a/sd/source/ui/tools/IdleDetection.cxx +++ b/sd/source/ui/tools/IdleDetection.cxx @@ -89,9 +89,8 @@ sal_Int32 IdleDetection::CheckSlideShowRunning (void) if (xFrame.is() && xFrame->isActive()) bIgnoreFrame = false; } - catch (uno::RuntimeException e) + catch (const uno::RuntimeException&) { - (void) e; } if (bIgnoreFrame) continue; diff --git a/sd/source/ui/tools/TimerBasedTaskExecution.cxx b/sd/source/ui/tools/TimerBasedTaskExecution.cxx index a2ad2e696..2831b5392 100644 --- a/sd/source/ui/tools/TimerBasedTaskExecution.cxx +++ b/sd/source/ui/tools/TimerBasedTaskExecution.cxx @@ -91,7 +91,7 @@ void TimerBasedTaskExecution::ReleaseTask ( ::boost::shared_ptr<tools::TimerBasedTaskExecution> pExecution (rpExecution); pExecution->Release(); } - catch (::boost::bad_weak_ptr) + catch (const ::boost::bad_weak_ptr&) { // When a bad_weak_ptr has been thrown then the object pointed // to by rpTask has been released right after we checked that it diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index 43beb5377..02d0225de 100644 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -367,7 +367,7 @@ void SAL_CALL if (pListener != NULL) pListener->selectionChanged (rEvent); } - catch (RuntimeException aException) + catch (const RuntimeException&) { } } @@ -461,7 +461,7 @@ void DrawController::FireSelectionChangeListener() throw() if (pL != NULL) pL->selectionChanged( aEvent ); } - catch (RuntimeException aException) + catch (const RuntimeException&) { } } @@ -524,9 +524,8 @@ void DrawController::FireSwitchCurrentPage (SdPage* pNewCurrentPage) throw() mpCurrentPage.reset(pNewCurrentPage); } - catch( uno::Exception& e ) + catch (const uno::Exception&) { - (void)e; OSL_FAIL( (::rtl::OString("sd::SdUnoDrawView::FireSwitchCurrentPage(), " "exception caught: ") + @@ -549,7 +548,7 @@ void DrawController::FirePropertyChange ( { fire (&nHandle, &rNewValue, &rOldValue, 1, sal_False); } - catch (RuntimeException aException) + catch (const RuntimeException&) { // Ignore this exception. Exceptions should be handled in the // fire() function so that all listeners are called. This is @@ -808,7 +807,7 @@ sal_Bool DrawController::convertFastPropertyValue ( rOldValue = mxSubController->getFastPropertyValue(nHandle); bResult = (rOldValue != rConvertedValue); } - catch(beans::UnknownPropertyException aException) + catch (const beans::UnknownPropertyException&) { // The prperty is unknown and thus an illegal argument to this method. throw com::sun::star::lang::IllegalArgumentException(); @@ -883,7 +882,7 @@ void DrawController::ProvideFrameworkControllers (void) xContext, xController); } - catch (RuntimeException&) + catch (const RuntimeException&) { mxConfigurationController = NULL; mxModuleController = NULL; diff --git a/sd/source/ui/unoidl/SdUnoSlideView.cxx b/sd/source/ui/unoidl/SdUnoSlideView.cxx index 3541c82d6..72c432049 100644 --- a/sd/source/ui/unoidl/SdUnoSlideView.cxx +++ b/sd/source/ui/unoidl/SdUnoSlideView.cxx @@ -100,7 +100,7 @@ sal_Bool SAL_CALL SdUnoSlideView::select (const Any& aSelection) nPageNumber -=1; // Transform 1-based page numbers to 0-based ones. rSelector.SelectPage(nPageNumber); } - catch(RuntimeException e) + catch (const RuntimeException&) { } } diff --git a/sd/source/ui/unoidl/detreg.cxx b/sd/source/ui/unoidl/detreg.cxx index 2d4beb853..82ed24e28 100644 --- a/sd/source/ui/unoidl/detreg.cxx +++ b/sd/source/ui/unoidl/detreg.cxx @@ -42,13 +42,6 @@ using namespace ::com::sun::star::lang; extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char** ppEnvironmentTypeName, - uno_Environment** ) -{ - *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx index 4359c1de5..a7b8cf1f4 100644 --- a/sd/source/ui/unoidl/facreg.cxx +++ b/sd/source/ui/unoidl/facreg.cxx @@ -297,13 +297,6 @@ static ::boost::shared_ptr<FactoryMap> spFactoryMap; extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, - uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index f4f803325..b66eecf27 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -968,7 +968,7 @@ void Outliner::ProvideNextTextObject (void) { mpView->SdrEndTextEdit(); } - catch (::com::sun::star::uno::Exception e) + catch (const ::com::sun::star::uno::Exception&) { DBG_UNHANDLED_EXCEPTION(); } diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx index 81b193736..e95baafac 100644 --- a/sd/source/ui/view/ToolBarManager.cxx +++ b/sd/source/ui/view/ToolBarManager.cxx @@ -676,7 +676,7 @@ void ToolBarManager::Implementation::SetValid (bool bValid) Any aValue (xFrameProperties->getPropertyValue(OUSTRING("LayoutManager"))); aValue >>= mxLayouter; } - catch (RuntimeException aException) + catch (const RuntimeException&) { } diff --git a/sd/source/ui/view/UpdateLockManager.cxx b/sd/source/ui/view/UpdateLockManager.cxx index 260d2a64e..351821fd0 100644 --- a/sd/source/ui/view/UpdateLockManager.cxx +++ b/sd/source/ui/view/UpdateLockManager.cxx @@ -288,8 +288,9 @@ void UpdateLockManager::Implementation::Unlock (void) } } } - catch (RuntimeException) - { } + catch (const RuntimeException&) + { + } // Force a rearrangement of the UI elements of the views. mrBase.Rearrange(); @@ -410,9 +411,8 @@ Reference< ::com::sun::star::frame::XLayoutManager> ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LayoutManager")))); aValue >>= xLayoutManager; } - catch (const beans::UnknownPropertyException& rException) + catch (const beans::UnknownPropertyException&) { - (void)rException; } } mxLayoutManager = xLayoutManager; diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 1f7fc6d92..1731ff8e9 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -392,8 +392,9 @@ void ViewShellBase::LateInit (const ::rtl::OUString& rsDefaultView) } } } - catch (RuntimeException&) - {} + catch (const RuntimeException&) + { + } // AutoLayouts have to be ready. GetDocument()->StopWorkStartupDelay(); @@ -1193,7 +1194,7 @@ void ViewShellBase::SetViewTabBar (const ::rtl::Reference<ViewTabBar>& rViewTabB } } } - catch ( Exception& ) + catch (const Exception&) { } @@ -1395,7 +1396,7 @@ void ViewShellBase::Implementation::SetPaneVisibility ( xConfigurationController->requestResourceDeactivation( xPaneId); } - catch (const Exception &) + catch (const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -1491,7 +1492,7 @@ void ViewShellBase::Implementation::GetSlotState (SfxItemSet& rSet) break; } } - catch (DeploymentException) + catch (const DeploymentException&) { } @@ -1531,7 +1532,7 @@ void ViewShellBase::Implementation::GetSlotState (SfxItemSet& rSet) nItemId = aSetIterator.NextWhich(); } } - catch (RuntimeException&) + catch (const RuntimeException&) { DBG_UNHANDLED_EXCEPTION(); } @@ -1635,13 +1636,13 @@ void CurrentPageSetter::operator() (bool) Reference<beans::XPropertySet> xSet (mrBase.GetController(), UNO_QUERY_THROW); xSet->setPropertyValue (String::CreateFromAscii("CurrentPage"), aPage); } - catch (RuntimeException aException) + catch (const RuntimeException&) { // We have not been able to set the current page at the main view. // This is sad but still leaves us in a valid state. Therefore, // this exception is silently ignored. } - catch (beans::UnknownPropertyException aException) + catch (const beans::UnknownPropertyException&) { DBG_ASSERT(false,"CurrentPage property unknown"); } diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx index 661440d38..67790cc90 100644 --- a/sd/source/ui/view/ViewTabBar.cxx +++ b/sd/source/ui/view/ViewTabBar.cxx @@ -136,8 +136,9 @@ ViewTabBar::ViewTabBar ( xTunnel->getSomething(DrawController::getUnoTunnelId())); mpViewShellBase = pController->GetViewShellBase(); } - catch(RuntimeException&) - {} + catch (const RuntimeException&) + { + } // Register as listener at XConfigurationController. Reference<XControllerManager> xControllerManager (mxController, UNO_QUERY); @@ -189,7 +190,7 @@ void ViewTabBar::disposing (void) { mxConfigurationController->removeConfigurationChangeListener(this); } - catch (lang::DisposedException e) + catch (const lang::DisposedException&) { // Receiving a disposed exception is the normal case. Is there // a way to avoid it? @@ -236,8 +237,9 @@ void ViewTabBar::disposing (void) xTunnel->getSomething(DrawController::getUnoTunnelId())); pBase = pController->GetViewShellBase(); } - catch(RuntimeException&) - {} + catch (const RuntimeException&) + { + } // The ViewTabBar supports at the moment only the center pane. if (rxViewTabBarId.is() @@ -260,8 +262,9 @@ void ViewTabBar::disposing (void) if (xCC.is()) xPane = Reference<XPane>(xCC->getResource(rxViewTabBarId->getAnchor()), UNO_QUERY); } - catch (RuntimeException&) - {} + catch (const RuntimeException&) + { + } // Tunnel through the XWindow to the VCL side. try @@ -272,8 +275,9 @@ void ViewTabBar::disposing (void) if (pPane != NULL) pWindow = pPane->GetWindow()->GetParent(); } - catch (RuntimeException&) - {} + catch (const RuntimeException&) + { + } } return pWindow; @@ -437,7 +441,7 @@ bool ViewTabBar::ActivatePage (void) FrameworkHelper::msCenterPaneURL)), UNO_QUERY); } - catch (DeploymentException) + catch (const DeploymentException&) { } @@ -464,7 +468,7 @@ bool ViewTabBar::ActivatePage (void) UpdateActiveButton(); } } - catch (RuntimeException&) + catch (const RuntimeException&) { DBG_UNHANDLED_EXCEPTION(); } diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx index 9f4c16f13..7b8c9474b 100644 --- a/sd/source/ui/view/drviewsc.cxx +++ b/sd/source/ui/view/drviewsc.cxx @@ -592,14 +592,13 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq) case SID_IMAP: { - SvxIMapDlg* pDlg; sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId(); GetViewFrame()->ToggleChildWindow( nId ); GetViewFrame()->GetBindings().Invalidate( SID_IMAP ); if ( GetViewFrame()->HasChildWindow( nId ) - && ( ( pDlg = ViewShell::Implementation::GetImageMapDialog() ) != NULL ) ) + && ( ( ViewShell::Implementation::GetImageMapDialog() ) != NULL ) ) { const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); diff --git a/sd/util/exports.dxp b/sd/util/exports.dxp index 0cb5620a1..700330789 100755 --- a/sd/util/exports.dxp +++ b/sd/util/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment -component_getFactory
\ No newline at end of file +component_getFactory diff --git a/sd/util/makefile.pmk b/sd/util/makefile.pmk deleted file mode 100644 index 0ae6fe664..000000000 --- a/sd/util/makefile.pmk +++ /dev/null @@ -1,32 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* -INCPRE+=$(SOLARINCDIR)$/offuh - -# define SD_DLLIMPLEMENTATION (see @ sddllapi.h) -CDEFS += -DSD_DLLIMPLEMENTATION - -VISIBILITY_HIDDEN=TRUE diff --git a/sd/util/sdfilt.map b/sd/util/sdfilt.map index 223201489..ed43ed59c 100644 --- a/sd/util/sdfilt.map +++ b/sd/util/sdfilt.map @@ -3,7 +3,6 @@ UDK_3_0_0 { ExportPPT; ImportPPT; SaveVBA; - component_getImplementationEnvironment; component_getFactory; local: *; diff --git a/slideshow/CppunitTest_slideshow.mk b/slideshow/CppunitTest_slideshow.mk index 3105f9091..39675246d 100644 --- a/slideshow/CppunitTest_slideshow.mk +++ b/slideshow/CppunitTest_slideshow.mk @@ -34,7 +34,6 @@ $(eval $(call gb_CppunitTest_set_include,slideshow,\ -I$(realpath $(SRCDIR)/slideshow/inc/pch) \ -I$(realpath $(SRCDIR)/slideshow/source/inc) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ )) $(eval $(call gb_CppunitTest_set_defs,slideshow,\ @@ -49,6 +48,11 @@ $(eval $(call gb_CppunitTest_set_defs,slideshow,\ )) endif +$(eval $(call gb_CppunitTest_add_api,slideshow,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_CppunitTest_add_library_objects,slideshow,slideshow)) $(eval $(call gb_CppunitTest_add_linked_libs,slideshow,\ diff --git a/slideshow/Executable_demoshow.mk b/slideshow/Executable_demoshow.mk index 6c54ff5ba..a50d79aae 100644 --- a/slideshow/Executable_demoshow.mk +++ b/slideshow/Executable_demoshow.mk @@ -34,7 +34,6 @@ $(eval $(call gb_Executable_set_include,demoshow,\ -I$(realpath $(SRCDIR)/slideshow/inc/pch) \ -I$(realpath $(SRCDIR)/slideshow/source/inc) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ )) ifeq ($(strip $(VERBOSE)),TRUE) @@ -51,6 +50,11 @@ $(eval $(call gb_Executable_set_defs,demoshow,\ )) endif +$(eval $(call gb_Library_add_api,demoshow,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_Executable_add_linked_libs,demoshow,\ basegfx \ comphelper \ diff --git a/slideshow/Library_OGLTrans.mk b/slideshow/Library_OGLTrans.mk index 3d59377a1..f6d1ec076 100644 --- a/slideshow/Library_OGLTrans.mk +++ b/slideshow/Library_OGLTrans.mk @@ -33,7 +33,6 @@ $(eval $(call gb_Library_set_include,OGLTrans,\ $$(INCLUDE) \ -I$(realpath $(SRCDIR)/slideshow/inc/pch) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ )) ifeq ($(strip $(VERBOSE)),TRUE) @@ -48,6 +47,11 @@ $(eval $(call gb_Library_add_defs,OGLTrans,\ )) endif +$(eval $(call gb_Library_add_api,OGLTrans,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_Library_add_linked_libs,OGLTrans,\ canvastools \ comphelper \ diff --git a/slideshow/Library_slideshow.mk b/slideshow/Library_slideshow.mk index e5cce3153..abbaa5676 100644 --- a/slideshow/Library_slideshow.mk +++ b/slideshow/Library_slideshow.mk @@ -34,7 +34,6 @@ $(eval $(call gb_Library_set_include,slideshow,\ -I$(realpath $(SRCDIR)/slideshow/inc/pch) \ -I$(realpath $(SRCDIR)/slideshow/source/inc) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ )) $(eval $(call gb_Library_add_defs,slideshow,\ @@ -48,6 +47,11 @@ $(eval $(call gb_Library_add_defs,slideshow,\ )) endif +$(eval $(call gb_Library_add_api,slideshow,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_Library_add_linked_libs,slideshow,\ avmedia \ basegfx \ diff --git a/slideshow/prj/build.lst b/slideshow/prj/build.lst index 30c3d3af0..71b351b16 100644 --- a/slideshow/prj/build.lst +++ b/slideshow/prj/build.lst @@ -1,3 +1,3 @@ -pe slideshow : tools sal cppu vcl comphelper cppuhelper offuh cppcanvas basegfx svtools unotools toolkit animations avmedia MESA:Mesa LIBXSLT:libxslt NULL +pe slideshow : tools sal cppu vcl comphelper cppuhelper offapi cppcanvas basegfx svtools unotools toolkit animations avmedia MESA:Mesa LIBXSLT:libxslt NULL pe slideshow usr1 - all pe_mkout NULL pe slideshow\prj nmake - all pe_prj NULL diff --git a/slideshow/source/engine/OGLTrans/exports.dxp b/slideshow/source/engine/OGLTrans/exports.dxp index f0e1c6993..700330789 100644 --- a/slideshow/source/engine/OGLTrans/exports.dxp +++ b/slideshow/source/engine/OGLTrans/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment component_getFactory diff --git a/slideshow/util/exports.dxp b/slideshow/util/exports.dxp index 0cb5620a1..700330789 100644 --- a/slideshow/util/exports.dxp +++ b/slideshow/util/exports.dxp @@ -1,2 +1 @@ -component_getImplementationEnvironment -component_getFactory
\ No newline at end of file +component_getFactory |