diff options
author | sb <sb@openoffice.org> | 2010-05-20 15:46:46 +0200 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-05-20 15:46:46 +0200 |
commit | d18de1ac029a718f36afd501b73a774901c06e8a (patch) | |
tree | 9d2582336e5e76e5104268bbf6a8e6ed172770fc /svl | |
parent | b57975f75a01d5e79f8473c2b5481bed283bec2a (diff) | |
parent | 51066323fd14918f65ea7ba66e14b9c7604eb978 (diff) |
sb120: merged in DEV300_m78
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/style.cxx | 22 | ||||
-rw-r--r-- | svl/source/misc/inettype.cxx | 17 | ||||
-rw-r--r-- | svl/source/misc/urihelper.cxx | 3 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 2 |
4 files changed, 30 insertions, 14 deletions
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index b8bed49b603b..60c622208d53 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -28,7 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" -#ifndef GCC +#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_ +#include <com/sun/star/lang/XComponent.hpp> #endif #define _SVSTDARR_STRINGS @@ -808,6 +809,16 @@ void SfxStyleSheetBasePool::Remove( SfxStyleSheetBase* p ) { // Alle Styles umsetzen, deren Parent dieser hier ist ChangeParent( p->GetName(), p->GetParent() ); + + com::sun::star::uno::Reference< com::sun::star::lang::XComponent > xComp( static_cast< ::cppu::OWeakObject* >((*aIter).get()), com::sun::star::uno::UNO_QUERY ); + if( xComp.is() ) try + { + xComp->dispose(); + } + catch( com::sun::star::uno::Exception& ) + { + } + aStyles.erase(aIter); Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_ERASED, *p ) ); } @@ -838,6 +849,15 @@ void SfxStyleSheetBasePool::Clear() SfxStyles::iterator aIter( aClearStyles.begin() ); while( aIter != aClearStyles.end() ) { + com::sun::star::uno::Reference< com::sun::star::lang::XComponent > xComp( static_cast< ::cppu::OWeakObject* >((*aIter).get()), com::sun::star::uno::UNO_QUERY ); + if( xComp.is() ) try + { + xComp->dispose(); + } + catch( com::sun::star::uno::Exception& ) + { + } + Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_ERASED, *(*aIter++).get() ) ); } } diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx index bec8b91e7c22..ee9aa5932525 100644 --- a/svl/source/misc/inettype.cxx +++ b/svl/source/misc/inettype.cxx @@ -806,16 +806,13 @@ namespace unnamed_svl_inettype { MediaTypeEntry const * seekEntry(UniString const & rTypeName, MediaTypeEntry const * pMap, sal_Size nSize) { -#if defined DBG_UTIL || defined INETTYPE_DEBUG - static bool bChecked = false; - if (!bChecked) - { - for (sal_Size i = 0; i < nSize - 1; ++i) - DBG_ASSERT(pMap[i].m_pTypeName < pMap[i + 1].m_pTypeName, - "seekEntry(): Bad map"); - bChecked = true; - } -#endif // DBG_UTIL, INETTYPE_DEBUG +#if defined DBG_UTIL + for (sal_Size i = 0; i < nSize - 1; ++i) + DBG_ASSERT( + rtl_str_compare( + pMap[i].m_pTypeName, pMap[i + 1].m_pTypeName) < 0, + "seekEntry(): Bad map"); +#endif sal_Size nLow = 0; sal_Size nHigh = nSize; diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx index a3a3f63367c1..46063564193d 100644 --- a/svl/source/misc/urihelper.cxx +++ b/svl/source/misc/urihelper.cxx @@ -123,8 +123,7 @@ inline UniString SmartRel2Abs_Impl(INetURLObject const & rTheBaseURIRef, eStyle); if (bCheckFileExists && !bWasAbsolute - && (aAbsURIRef.GetProtocol() == INET_PROT_FILE - || aAbsURIRef.GetProtocol() == INET_PROT_VND_SUN_STAR_WFS)) + && (aAbsURIRef.GetProtocol() == INET_PROT_FILE)) { INetURLObject aNonFileURIRef; aNonFileURIRef.SetSmartURL(rTheRelURIRef, diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 5b7821aa457e..32c65b06d2f1 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -675,7 +675,7 @@ SvNumberformat::SvNumberformat(String& rString, xub_StrLen nAnzChars = ImpGetNumber(rString, nPos, sStr); if (nAnzChars > 0) { - short F_Type; + short F_Type = NUMBERFORMAT_UNDEFINED; if (!pISc->IsNumberFormat(sStr,F_Type,fNumber) || ( F_Type != NUMBERFORMAT_NUMBER && F_Type != NUMBERFORMAT_SCIENTIFIC) ) |