summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2010-05-26 11:58:33 +0200
committerCarsten Driesner <cd@openoffice.org>2010-05-26 11:58:33 +0200
commit8e00524fd2505b73190affc9b12ef21c0fd774b7 (patch)
tree60d8330099114127ac3f3e7739691ac92c88218d /svl
parent806700f86b2b9c96d4ca076545c5f263a8c1b9c3 (diff)
parent51066323fd14918f65ea7ba66e14b9c7604eb978 (diff)
findbar01: Merge changes from m78
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/style.cxx22
-rw-r--r--svl/source/misc/inettype.cxx17
-rw-r--r--svl/source/misc/urihelper.cxx3
-rw-r--r--svl/source/numbers/zformat.cxx2
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) )