diff options
author | Michael Stahl <mstahl@redhat.com> | 2011-11-02 17:49:42 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-11-02 17:49:42 +0100 |
commit | 66d9925bb6e9c43aacfe9e4ac6f1ee10a8e25166 (patch) | |
tree | ea3e9cb2bd0ca5a8fe7432908bdfdd5071f0773d /sfx2/source | |
parent | b2254d5d6fde8c28501e99e29bc824e935a25247 (diff) | |
parent | f6f5c89259867b5aeb86d5509f826da949d122c4 (diff) |
Merge branch 'master' of git://anongit.freedesktop.org/libreoffice/core
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/appmisc.cxx | 78 | ||||
-rw-r--r-- | sfx2/source/appl/workwin.cxx | 40 | ||||
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/control/macrconf.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 38 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/docvor.cxx | 16 | ||||
-rw-r--r-- | sfx2/source/inc/appdata.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 5 | ||||
-rw-r--r-- | sfx2/source/inc/workwin.hxx | 4 |
12 files changed, 67 insertions, 150 deletions
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx index fffecd3f348e..6e76d4428175 100644 --- a/sfx2/source/appl/appmisc.cxx +++ b/sfx2/source/appl/appmisc.cxx @@ -170,10 +170,10 @@ SfxProgress* SfxApplication::GetProgress() const //------------------------------------------------------------------------ -SvUShorts* SfxApplication::GetDisabledSlotList_Impl() +std::vector<sal_uInt16>* SfxApplication::GetDisabledSlotList_Impl() { sal_Bool bError = sal_False; - SvUShorts* pList = pAppData_Impl->pDisabledSlotList; + std::vector<sal_uInt16>* pList = pAppData_Impl->pDisabledSlotList; if ( !pList ) { // Is there a slot file? @@ -200,13 +200,13 @@ SvUShorts* SfxApplication::GetDisabledSlotList_Impl() sal_uInt16 nCount; (*pStream) >> nCount; pList = pAppData_Impl->pDisabledSlotList = - new SvUShorts( nCount < 255 ? (sal_Int8) nCount : 255, 255 ); + new std::vector<sal_uInt16>; sal_uInt16 nSlot; for ( sal_uInt16 n=0; n<nCount; n++ ) { (*pStream) >> nSlot; - pList->Insert( nSlot, n ); + pList->push_back( nSlot ); } pStream->ReadByteString(aTitle); @@ -231,13 +231,13 @@ SvUShorts* SfxApplication::GetDisabledSlotList_Impl() delete pStream; } - else if ( pList == (SvUShorts*) -1L ) + else if ( pList == (std::vector<sal_uInt16>*) -1L ) { return NULL; } if ( !pList ) - pAppData_Impl->pDisabledSlotList = (SvUShorts*) -1L; + pAppData_Impl->pDisabledSlotList = (std::vector<sal_uInt16>*) -1L; if ( bError ) { @@ -280,72 +280,12 @@ sal_Bool SfxApplication::IsDowning() const { return pAppData_Impl->bDowning; } SfxDispatcher* SfxApplication::GetAppDispatcher_Impl() { return pAppData_Impl->pAppDispat; } SfxSlotPool& SfxApplication::GetAppSlotPool_Impl() const { return *pAppData_Impl->pSlotPool; } -static bool impl_loadBitmap( - const rtl::OUString &rPath, const rtl::OUString &rBmpFileName, - Image &rLogo ) -{ - rtl::OUString uri( rPath ); - rtl::Bootstrap::expandMacros( uri ); - INetURLObject aObj( uri ); - aObj.insertName( rBmpFileName ); - SvFileStream aStrm( aObj.PathToFileName(), STREAM_STD_READ ); - if ( !aStrm.GetError() ) - { - // Use graphic class to also support more graphic formats (bmp,png,...) - Graphic aGraphic; - - GraphicFilter& rGF = GraphicFilter::GetGraphicFilter(); - rGF.ImportGraphic( aGraphic, String(), aStrm, GRFILTER_FORMAT_DONTKNOW ); - - // Default case, we load the intro bitmap from a seperate file - // (e.g. staroffice_intro.bmp or starsuite_intro.bmp) - BitmapEx aBmp = aGraphic.GetBitmapEx(); - rLogo = Image( aBmp ); - return true; - } - return false; -} - /** loads the application logo as used in the about dialog and impress slideshow pause screen */ Image SfxApplication::GetApplicationLogo() { - Image aAppLogo; - - rtl::OUString aAbouts; - bool bLoaded = false; - sal_Int32 nIndex = 0; - do - { - bLoaded = impl_loadBitmap( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/program")), - aAbouts.getToken( 0, ',', nIndex ), aAppLogo ); - } - while ( !bLoaded && ( nIndex >= 0 ) ); - - // fallback to "about.bmp" - if ( !bLoaded ) - { - bLoaded = impl_loadBitmap( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/program/edition")), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("about.png")), aAppLogo ); - if ( !bLoaded ) - bLoaded = impl_loadBitmap( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/program/edition")), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("about.bmp")), aAppLogo ); - } - - if ( !bLoaded ) - { - bLoaded = impl_loadBitmap( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/program")), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("about.png")), aAppLogo ); - if ( !bLoaded ) - bLoaded = impl_loadBitmap( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/program")), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("about.bmp")), aAppLogo ); - } - - return aAppLogo; + BitmapEx aBitmap; + Application::LoadBrandBitmap ("about", aBitmap); + return Image( aBitmap ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index bdd2c417a36e..2ea9a9f2d922 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -516,18 +516,18 @@ sal_uInt16 ChildTravelValue( SfxChildAlignment eAlign ) void SfxWorkWindow::Sort_Impl() { - aSortedList.Remove(0, aSortedList.Count()); + aSortedList.clear(); for (sal_uInt16 i=0; i<pChilds->Count(); i++) { SfxChild_Impl *pCli = (*pChilds)[i]; if (pCli) { sal_uInt16 k; - for (k=0; k<aSortedList.Count(); k++) + for (k=0; k<aSortedList.size(); k++) if (ChildAlignValue((*pChilds)[aSortedList[k]]->eAlign) > ChildAlignValue(pCli->eAlign)) break; - aSortedList.Insert (i,k); + aSortedList.insert( aSortedList.begin() + k, i ); } } @@ -825,7 +825,7 @@ SvBorder SfxWorkWindow::Arrange_Impl() Size aSize; Rectangle aTmp( aClientArea ); - for ( sal_uInt16 n=0; n<aSortedList.Count(); ++n ) + for ( sal_uInt16 n=0; n<aSortedList.size(); ++n ) { SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]]; if ( !pCli->pWin ) @@ -1786,7 +1786,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, SfxChild_Impl *pChild = 0; sal_uInt16 n; - for ( n=0; n<aSortedList.Count(); ++n ) + for ( n=0; n<aSortedList.size(); ++n ) { pChild = (*pChilds)[aSortedList[n]]; if ( pChild ) @@ -1794,7 +1794,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, break; } - if ( n < aSortedList.Count() ) + if ( n < aSortedList.size() ) // sometimes called while toggeling float mode nPos = aSortedList[n]; @@ -1812,7 +1812,7 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild, // The current affected window is included in the calculation of // the inner rectangle! - for ( sal_uInt16 m=0; m<aSortedList.Count(); ++m ) + for ( sal_uInt16 m=0; m<aSortedList.size(); ++m ) { sal_uInt16 i=aSortedList[m]; SfxChild_Impl* pCli = (*pChilds)[i]; @@ -2542,7 +2542,7 @@ void SfxWorkWindow::MakeChildsVisible_Impl( sal_Bool bVis ) { if ( !bSorted ) Sort_Impl(); - for ( sal_uInt16 n=0; n<aSortedList.Count(); ++n ) + for ( sal_uInt16 n=0; n<aSortedList.size(); ++n ) { SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]]; if ( (pCli->eAlign == SFX_ALIGN_NOALIGNMENT) || (IsDockingAllowed() && bInternalDockingAllowed) ) @@ -2553,7 +2553,7 @@ void SfxWorkWindow::MakeChildsVisible_Impl( sal_Bool bVis ) { if ( !bSorted ) Sort_Impl(); - for ( sal_uInt16 n=0; n<aSortedList.Count(); ++n ) + for ( sal_uInt16 n=0; n<aSortedList.size(); ++n ) { SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]]; pCli->nVisible &= ~CHILD_ACTIVE; @@ -2761,37 +2761,37 @@ void SfxWorkWindow::SetActiveChild_Impl( Window *pChild ) sal_Bool SfxWorkWindow::ActivateNextChild_Impl( sal_Bool bForward ) { // Sort all children under list - SvUShorts aList; + std::vector<sal_uInt16> aList; for ( sal_uInt16 i=SFX_OBJECTBAR_MAX; i<pChilds->Count(); i++) { SfxChild_Impl *pCli = (*pChilds)[i]; if ( pCli && pCli->bCanGetFocus && pCli->pWin ) { sal_uInt16 k; - for (k=0; k<aList.Count(); k++) + for (k=0; k<aList.size(); k++) if ( ChildTravelValue((*pChilds)[aList[k]]->eAlign) > ChildTravelValue(pCli->eAlign) ) break; - aList.Insert(i,k); + aList.insert( aList.begin() + k, i ); } } - if ( aList.Count() == 0 ) + if ( aList.empty() ) return sal_False; sal_uInt16 nTopValue = ChildTravelValue( SFX_ALIGN_LOWESTTOP ); - for ( sal_uInt16 i=0; i<aList.Count(); i++ ) + for ( sal_uInt16 i=0; i<aList.size(); i++ ) { SfxChild_Impl* pCli = (*pChilds)[aList[i]]; if ( pCli->pWin && ChildTravelValue( pCli->eAlign ) > nTopValue ) break; } - sal_uInt16 n = bForward ? 0 : aList.Count()-1; + sal_uInt16 n = bForward ? 0 : aList.size()-1; SfxChild_Impl *pAct=NULL; if ( pActiveChild ) { // Look for the active window - for ( n=0; n<aList.Count(); n++ ) + for ( n=0; n<aList.size(); n++ ) { SfxChild_Impl* pCli = (*pChilds)[aList[n]]; if ( pCli && pCli->pWin && ( pCli->pWin == pActiveChild || !pActiveChild ) ) @@ -2803,8 +2803,8 @@ sal_Bool SfxWorkWindow::ActivateNextChild_Impl( sal_Bool bForward ) } // dummy entries for the container window - aList.Insert( 0xFFFF, 0 ); - aList.Insert( 0xFFFF, aList.Count() ); + aList.insert( aList.begin(), 0xFFFF ); + aList.push_back( 0xFFFF ); n = n + 1; if ( pAct ) { @@ -2827,7 +2827,7 @@ sal_Bool SfxWorkWindow::ActivateNextChild_Impl( sal_Bool bForward ) else n = n-1; - if ( n == 0 || n == aList.Count()-1 ) + if ( n == 0 || n == aList.size()-1 ) return sal_False; } @@ -2865,7 +2865,7 @@ sal_Bool SfxWorkWindow::ActivateNextChild_Impl( sal_Bool bForward ) else n = n-1; - if ( n == 0 || n == aList.Count()-1 ) + if ( n == 0 || n == aList.size()-1 ) break; } diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 63add660c327..2d347781f585 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -988,7 +988,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl( { aResult = xTypeCFG->getByName( sType ); } - catch( ::com::sun::star::container::NoSuchElementException& ) + catch (const ::com::sun::star::container::NoSuchElementException&) { aResult = ::com::sun::star::uno::Any(); } @@ -1156,7 +1156,7 @@ void SfxFilterContainer::ReadFilters_Impl( sal_Bool bUpdate ) } } } - catch( ::com::sun::star::uno::Exception& ) + catch(const ::com::sun::star::uno::Exception&) { DBG_ASSERT( sal_False, "SfxFilterContainer::ReadFilter()\nException detected. Possible not all filters could be cached.\n" ); } diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 5aa16e163ff7..8df3b4a00a6a 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -164,7 +164,7 @@ struct SfxDispatcher_Impl sal_uInt16 nFilterCount; // Number of SIDs in pFilterSIDs const sal_uInt16* pFilterSIDs; // sorted Array of SIDs sal_uInt16 nStandardMode; // ExecuteMode from PlugInDispatcher - SvUShorts* pDisableList; + std::vector<sal_uInt16>* pDisableList; sal_uInt32 nDisableFlags; }; @@ -2498,8 +2498,8 @@ sal_Bool SfxDispatcher::IsAllowed } // BinSearch in the disable list - SvUShorts& rList = *pImp->pDisableList; - sal_uInt16 nCount = rList.Count(); + std::vector<sal_uInt16>& rList = *pImp->pDisableList; + sal_uInt16 nCount = rList.size(); sal_uInt16 nLow = 0, nMid = 0, nHigh; sal_Bool bFound = sal_False; nHigh = nCount - 1; diff --git a/sfx2/source/control/macrconf.cxx b/sfx2/source/control/macrconf.cxx index 1464ffe0abed..c02dc8fd45a6 100644 --- a/sfx2/source/control/macrconf.cxx +++ b/sfx2/source/control/macrconf.cxx @@ -447,7 +447,7 @@ sal_uInt16 SfxMacroConfig::GetSlotId(SfxMacroInfoPtr pInfo) if (i == nCount) { // Macro still unknown - nCount = aIdArray.Count(); + nCount = aIdArray.size(); sal_uInt16 n; for (n=0; n<nCount; n++) // Seearch for free SlotId if (aIdArray[n] > SID_MACRO_START + n) @@ -456,7 +456,7 @@ sal_uInt16 SfxMacroConfig::GetSlotId(SfxMacroInfoPtr pInfo) sal_uInt16 nNewSlotId = SID_MACRO_START + n; if ( nNewSlotId > SID_MACRO_END ) return 0; - aIdArray.Insert( SID_MACRO_START + n, n ); + aIdArray.insert( aIdArray.begin() + n, SID_MACRO_START + n ); SfxSlot *pNewSlot = new SfxSlot; pNewSlot->nSlotId = SID_MACRO_START + n; @@ -531,12 +531,12 @@ void SfxMacroConfig::ReleaseSlotId(sal_uInt16 nId) pImp->aArr.Remove(i); // Release SlotId again - sal_uInt16 nIdCount = aIdArray.Count(); + sal_uInt16 nIdCount = aIdArray.size(); for (sal_uInt16 n=0; n<nIdCount; n++) { if (aIdArray[n] == nId) { - aIdArray.Remove(n); + aIdArray.erase( aIdArray.begin() + n ); break; } } diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index e1d90733c480..84e9a8a6d1a0 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -148,7 +148,7 @@ void SfxModalDialog::GetDialogData_Impl() if ( aDlgOpt.Exists() ) { // load settings - SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) ); + SetWindowState( rtl::OUStringToOString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) ); Any aUserItem = aDlgOpt.GetUserItem( USERITEM_NAME ); OUString aTemp; if ( aUserItem >>= aTemp ) diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 57e60136b617..2390c005f86d 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -31,12 +31,10 @@ #include <limits.h> #include <stdlib.h> +#include <algorithm> #include <vcl/msgbox.hxx> #include <unotools/viewoptions.hxx> -#define _SVSTDARR_sal_uInt16S -#include <svl/svstdarr.hxx> - #include "appdata.hxx" #include "sfxtypes.hxx" #include <sfx2/minarray.hxx> @@ -738,7 +736,7 @@ void SfxTabDialog::Start_Impl() if ( aDlgOpt.Exists() ) { #if !ENABLE_LAYOUT_SFX_TABDIALOG - SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) ); + SetWindowState(rtl::OUStringToOString(aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US)); #endif /* !ENABLE_LAYOUT_SFX_TABDIALOG */ // initial TabPage from Program/Help/config @@ -1453,19 +1451,6 @@ IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl ) // ----------------------------------------------------------------------- -extern "C" int SAL_CALL TabDlgCmpUS_Impl( const void* p1, const void* p2 ) - -/* [Description] - - Comparison function for qsort -*/ - -{ - return *(sal_uInt16*)p1 - *(sal_uInt16*)p2; -} - -// ----------------------------------------------------------------------- - void SfxTabDialog::ShowPage( sal_uInt16 nId ) /* [Description] @@ -1509,7 +1494,7 @@ const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool ) if ( pRanges ) return pRanges; - SvUShorts aUS( 16, 16 ); + std::vector<sal_uInt16> aUS; sal_uInt16 nCount = pImpl->pData->Count(); sal_uInt16 i; @@ -1525,26 +1510,27 @@ const sal_uInt16* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool ) sal_uInt16 nLen; for( nLen = 0; *pIter; ++nLen, ++pIter ) ; - aUS.Insert( pTmpRanges, nLen, aUS.Count() ); + aUS.insert( aUS.end(), pTmpRanges, pTmpRanges + nLen ); } } //! Remove duplicated Ids? { - nCount = aUS.Count(); + nCount = aUS.size(); for ( i = 0; i < nCount; ++i ) aUS[i] = rPool.GetWhich( aUS[i] ); } // sort - if ( aUS.Count() > 1 ) - qsort( (void*)aUS.GetData(), - aUS.Count(), sizeof(sal_uInt16), TabDlgCmpUS_Impl ); + if ( aUS.size() > 1 ) + { + std::sort( aUS.begin(), aUS.end() ); + } - pRanges = new sal_uInt16[aUS.Count() + 1]; - memcpy(pRanges, aUS.GetData(), sizeof(sal_uInt16) * aUS.Count()); - pRanges[aUS.Count()] = 0; + pRanges = new sal_uInt16[aUS.size() + 1]; + std::copy( aUS.begin(), aUS.end(), pRanges ); + pRanges[aUS.size()] = 0; return pRanges; } diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index df6f09d76322..c9252483c975 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2796,7 +2796,7 @@ void SfxTemplateCatalog_Impl::CheckItem(sal_uInt16 nMesId, sal_Bool /*bCheck*/) if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR ) return; sal_uInt16 i; - for ( i = 0; i < aFamIds.Count() && aFamIds[i] != nMesId; i++ ) ; + for ( i = 0; i < aFamIds.size() && aFamIds[i] != nMesId; i++ ) ; aFamList.SelectEntryPos(i); } @@ -2807,7 +2807,7 @@ sal_Bool SfxTemplateCatalog_Impl::IsCheckedItem(sal_uInt16 nMesId) if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR ) return sal_False; sal_uInt16 i; - for ( i = 0; i < aFamIds.Count() && aFamIds[i] != nMesId; i++ ) + for ( i = 0; i < aFamIds.size() && aFamIds[i] != nMesId; i++ ) ; return aFamList.IsEntrySelected( String::CreateFromInt32(i) ); } @@ -2818,10 +2818,10 @@ sal_Bool SfxTemplateCatalog_Impl::IsCheckedItem(sal_uInt16 nMesId) void SfxTemplateCatalog_Impl::EnableFamilyItem( sal_uInt16 nId, sal_Bool bEnable ) { if ( !bEnable ) - for ( sal_uInt16 nPos = aFamIds.Count(); nPos--; ) + for ( sal_uInt16 nPos = aFamIds.size(); nPos--; ) if ( aFamIds[ nPos ] == nId ) { - aFamIds.Remove( nPos ); + aFamIds.erase( aFamIds.begin() + nPos ); aFamList.RemoveEntry( nPos ); } } @@ -2831,13 +2831,13 @@ void SfxTemplateCatalog_Impl::InsertFamilyItem( sal_uInt16 nId, const SfxStyleFa if ( nId > SFX_STYLE_FAMILY_PSEUDO || nId < SFX_STYLE_FAMILY_CHAR ) return; aFamList.InsertEntry( pItem->GetText(), 0 ); - aFamIds.Insert( nId, 0 ); + aFamIds.insert( aFamIds.begin(), nId ); } void SfxTemplateCatalog_Impl::ClearFamilyList() { aFamList.Clear(); - aFamIds.Remove( 0, aFamIds.Count() ); + aFamIds.clear(); } void SfxTemplateCatalog_Impl::PrepareDeleteAction() diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx index 0f9609f1c420..26b35dd8e16a 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -381,7 +381,7 @@ void ErrorDelete_Impl(Window *pParent, const String &rName, sal_Bool bFolder = s struct ImpPath_Impl { - SvUShorts aUS; + std::vector<sal_uInt16> aUS; sal_uInt16 nRef; ImpPath_Impl(); @@ -390,7 +390,7 @@ struct ImpPath_Impl //------------------------------------------------------------------------- -ImpPath_Impl::ImpPath_Impl() : aUS(5), nRef(1) +ImpPath_Impl::ImpPath_Impl() : nRef(1) { } @@ -398,14 +398,9 @@ ImpPath_Impl::ImpPath_Impl() : aUS(5), nRef(1) ImpPath_Impl::ImpPath_Impl( const ImpPath_Impl& rCopy ) : - aUS ( (sal_uInt8)rCopy.aUS.Count() ), - nRef( 1 ) + aUS(rCopy.aUS), nRef( 1 ) { - const sal_uInt16 nCount = rCopy.aUS.Count(); - - for ( sal_uInt16 i = 0; i < nCount; ++i ) - aUS.Insert( rCopy.aUS[i], i ); } //========================================================================== @@ -442,7 +437,7 @@ public: if(!--pData->nRef) delete pData; } - sal_uInt16 Count() const { return pData->aUS.Count(); } + sal_uInt16 Count() const { return pData->aUS.size(); } sal_uInt16 operator[]( sal_uInt16 i ) const { return i < Count()? pData->aUS[i]: INDEX_IGNORE; @@ -459,7 +454,8 @@ Path::Path(SvLBox *pBox, SvLBoxEntry *pEntry) : return; SvLBoxEntry *pParent = pBox->GetParent(pEntry); do { - pData->aUS.Insert((sal_uInt16)pBox->GetModel()->GetRelPos(pEntry), 0); + pData->aUS.insert(pData->aUS.begin(), + (sal_uInt16)pBox->GetModel()->GetRelPos(pEntry)); if(0 == pParent) break; pEntry = pParent; diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx index b807f5cd21a7..8783675fc40e 100644 --- a/sfx2/source/inc/appdata.hxx +++ b/sfx2/source/inc/appdata.hxx @@ -38,6 +38,7 @@ #include <com/sun/star/frame/XModel.hpp> #include "bitset.hxx" +#include <vector> class SfxApplication; class SvStrings; @@ -50,7 +51,6 @@ class SfxMacroConfig; class SfxItemPool; class SfxInitLinkList; class SfxFilterMatcher; -class SvUShorts; class ISfxTemplateCommon; class SfxFilterMatcher; class SfxStatusDispatcher; @@ -124,7 +124,7 @@ public: // global pointers SfxItemPool* pPool; - SvUShorts* pDisabledSlotList; + std::vector<sal_uInt16>* pDisabledSlotList; SvStrings* pSecureURLs; SvtSaveOptions* pSaveOptions; SvtUndoOptions* pUndoOptions; diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index 45e00a25a8e8..ea797bed53aa 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -37,9 +37,6 @@ class SfxTemplateControllerItem; #include <svtools/svtreebx.hxx> #include <svl/eitem.hxx> -#define _SVSTDARR_USHORTS -#include <svl/svstdarr.hxx> // SvUShorts - #include <rsc/rscsfx.hxx> #include <tools/rtti.hxx> @@ -344,7 +341,7 @@ private: HelpButton aHelpBtn; SfxTemplateCatalog* pReal; - SvUShorts aFamIds; + std::vector<sal_uInt16> aFamIds; SfxModalDefParentHelper aHelper; protected: diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx index eebc3412d11c..347147d2a835 100644 --- a/sfx2/source/inc/workwin.hxx +++ b/sfx2/source/inc/workwin.hxx @@ -38,8 +38,6 @@ #include <cppuhelper/weak.hxx> #include <cppuhelper/propshlp.hxx> -#define _SVSTDARR_sal_uInt16S -#include <svl/svstdarr.hxx> // SvUShorts #include <rtl/ustring.hxx> #include <osl/mutex.hxx> @@ -234,7 +232,7 @@ class SfxWorkWindow friend class LayoutManagerListener; protected: - SvUShorts aSortedList; + std::vector<sal_uInt16> aSortedList; SfxStatBar_Impl aStatBar; std::vector< SfxObjectBar_Impl > aObjBarList; Rectangle aClientArea; |