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 | 418a4edf9a13bb5ca376b057f7240ed76b2e2f8f (patch) | |
tree | 8d89620e96f73a3149c951670dd34f72040dcdaf /sd/source | |
parent | 74bb009eaf645e029b790248f385f66eb1ce3233 (diff) | |
parent | 4cae99bd81d4c64a292b5e59753916b67c9dc24c (diff) |
Merge branch 'master' into feature/gnumake4
Diffstat (limited to 'sd/source')
40 files changed, 234 insertions, 183 deletions
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index c5f36fe94791..826e340e7331 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 39691f4c45b7..69c231abaeb5 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 6ce7c23382d1..c2a7ea4d4006 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 78f09d7bf89d..babc2a3ae538 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 574b4a90d27a..031cc1a95d25 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 539c6864b15c..21c9093b2405 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 421344b34cfa..66488fbb57fe 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 24250f4ef384..a1ded7cff714 100644 --- a/sd/source/ui/app/popup2_tmpl.src +++ b/sd/source/ui/app/popup2_tmpl.src @@ -561,22 +561,18 @@ #elif SD_POPUP == RID_GRAPHIC_TEXTOBJ_POPUP MN_PAGE_MENU #endif - SEPARATOR - MN_CAPTUREPOINT - SEPARATOR - MN_LEAVE_GROUP - SEPARATOR 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 a80feb80e3f7..ea869cc064cc 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 192e57c21b91..a345d5827114 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 bb1930c43b2a..33bd1013211c 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 5ff7effcbc33..612d7878e8a6 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 e56d98f3fddf..988b288871e0 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 8f1c4135e3a2..1ed3d3d9b8c7 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 7c8141da4cab..67b3f8616721 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 59a1d9a0b65d..fed1af0420b4 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 3756baabc74b..3af6ccbde996 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 058880e9da4c..838e0d05ea73 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 65ec34f2ac20..da7a348045ba 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 66afd44f582c..58f701d55a59 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 4e48d5ac2510..e1a9bf2cce37 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 0677035e31e4..18d2156af44a 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 97de9f7b2c20..6d9c5af8ae0c 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 821fa89ff0c4..f9ec936cede5 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 ed65ec99b27b..3c77ef1210d9 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 3daf7d49d6db..704244d90144 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 8e834b222d3e..5f2b782356df 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 91c277a50b1d..9891e574e9f3 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 e68ff356e7b0..4ba616330965 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 6822b917cb7d..cbd75f6979a6 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 6b67bcead477..c76c325d0480 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 59564ef71985..a4c58c7be005 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 2cf653f3f3df..92fb91fe1d17 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 709b1a5f00ca..563c374286c9 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 31eb68e2341c..1fd57d052eda 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 e62aa1635414..509d878d5ad9 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 ea0f40471686..d1079731096a 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 fdd23b247c38..cfb3193aba2a 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 588fd65604a7..f075af56bb39 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 e9820c5ae6fe..7fad9f041ca5 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(); |