[Libreoffice-commits] core.git: 4 commits - editeng/source filter/source forms/source toolkit/source
Caolán McNamara
caolanm at redhat.com
Tue Jun 24 06:29:00 PDT 2014
editeng/source/editeng/eehtml.cxx | 1
filter/source/config/cache/typedetection.cxx | 81 +++++++++++++--------------
forms/source/xforms/binding.cxx | 4 -
forms/source/xforms/binding.hxx | 2
toolkit/source/awt/vclxwindow.cxx | 1
5 files changed, 44 insertions(+), 45 deletions(-)
New commits:
commit 46b6721c030edc2c73600225c03e04125a0a911a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 24 12:34:27 2014 +0100
coverity#706534 Uncaught exception
Change-Id: Iac2e63ee2588148f8c29c46684288f1fc69d4ff1
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index f937f5b..315bb3d 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -372,49 +372,47 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css::
{
// make the descriptor more useable :-)
utl::MediaDescriptor stlDescriptor(lDescriptor);
+ OUString sType, sURL;
- // SAFE -> ----------------------------------
- ::osl::ResettableMutexGuard aLock(m_aLock);
-
+ try
+ {
+ // SAFE -> ----------------------------------
+ ::osl::ResettableMutexGuard aLock(m_aLock);
- // parse given URL to split it into e.g. main and jump marks ...
- OUString sURL = stlDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL(), OUString());
+ // parse given URL to split it into e.g. main and jump marks ...
+ sURL = stlDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL(), OUString());
#if OSL_DEBUG_LEVEL > 0
- if (stlDescriptor.find( "FileName" ) != stlDescriptor.end())
- OSL_FAIL("Detect using of deprecated and already unsupported MediaDescriptor property \"FileName\"!");
+ if (stlDescriptor.find( "FileName" ) != stlDescriptor.end())
+ OSL_FAIL("Detect using of deprecated and already unsupported MediaDescriptor property \"FileName\"!");
#endif
- css::util::URL aURL;
- aURL.Complete = sURL;
- css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(m_xContext));
- xParser->parseStrict(aURL);
+ css::util::URL aURL;
+ aURL.Complete = sURL;
+ css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(m_xContext));
+ xParser->parseStrict(aURL);
- OUString aSelectedFilter = stlDescriptor.getUnpackedValueOrDefault(
- utl::MediaDescriptor::PROP_FILTERNAME(), OUString());
- if (!aSelectedFilter.isEmpty())
- {
- // Caller specified the filter type. Honor it. Just get the default
- // type for that filter, and bail out.
- if (impl_validateAndSetFilterOnDescriptor(stlDescriptor, aSelectedFilter))
- return stlDescriptor[utl::MediaDescriptor::PROP_TYPENAME()].get<OUString>();
- }
+ OUString aSelectedFilter = stlDescriptor.getUnpackedValueOrDefault(
+ utl::MediaDescriptor::PROP_FILTERNAME(), OUString());
+ if (!aSelectedFilter.isEmpty())
+ {
+ // Caller specified the filter type. Honor it. Just get the default
+ // type for that filter, and bail out.
+ if (impl_validateAndSetFilterOnDescriptor(stlDescriptor, aSelectedFilter))
+ return stlDescriptor[utl::MediaDescriptor::PROP_TYPENAME()].get<OUString>();
+ }
- FlatDetection lFlatTypes;
- impl_getAllFormatTypes(aURL, stlDescriptor, lFlatTypes);
+ FlatDetection lFlatTypes;
+ impl_getAllFormatTypes(aURL, stlDescriptor, lFlatTypes);
- aLock.clear();
- // <- SAFE ----------------------------------
+ aLock.clear();
+ // <- SAFE ----------------------------------
- // Properly prioritize all candidate types.
- lFlatTypes.sort(SortByPriority());
- lFlatTypes.unique(EqualByType());
+ // Properly prioritize all candidate types.
+ lFlatTypes.sort(SortByPriority());
+ lFlatTypes.unique(EqualByType());
- OUString sType ;
- OUString sLastChance;
-
- try
- {
+ OUString sLastChance;
// verify every flat detected (or preselected!) type
// by calling its registered deep detection service.
@@ -445,16 +443,17 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css::
}
}
catch(const css::uno::RuntimeException&)
- { throw; }
+ {
+ throw;
+ }
catch(const css::uno::Exception& e)
- {
- SAL_WARN(
- "filter.config",
- "caught Exception \"" << e.Message
- << "\" while querying type of <" << sURL << ">");
- sType = OUString();
- }
-
+ {
+ SAL_WARN(
+ "filter.config",
+ "caught Exception \"" << e.Message
+ << "\" while querying type of <" << sURL << ">");
+ sType = OUString();
+ }
// adapt media descriptor, so it contains the right values
// for type/filter name/document service/ etcpp.
commit 4a67abb3b2b4c308cb4ca5252e70c239689feaed
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 24 12:30:27 2014 +0100
coverity#706547 Uncaught exception
Change-Id: Ib619e1ab3f091c04ec27a249b733e54ce469cf82
diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx
index 187d556..2bfb98b 100644
--- a/forms/source/xforms/binding.cxx
+++ b/forms/source/xforms/binding.cxx
@@ -135,13 +135,11 @@ Binding::Binding() :
initializePropertySet();
}
-Binding::~Binding() throw()
+Binding::~Binding()
{
_setModel(NULL);
}
-
-
void Binding::_setModel( const Model_t& xModel )
{
PropertyChangeNotifier aNotifyModelChange( *this, HANDLE_Model );
diff --git a/forms/source/xforms/binding.hxx b/forms/source/xforms/binding.hxx
index 6af252f..2f5e2b2 100644
--- a/forms/source/xforms/binding.hxx
+++ b/forms/source/xforms/binding.hxx
@@ -172,7 +172,7 @@ private:
public:
Binding();
- virtual ~Binding() throw();
+ virtual ~Binding();
// property methods: get/set value
commit 22357c172f457aba46b48d982a1b23ab91184087
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 24 12:13:25 2014 +0100
coverity#705322 Missing break in switch, assuming incorrect
especially because the setProperty logic now matches the getPropery one
Change-Id: I7ebeabc9defed00d1853c3b91fbbf592e1940aa8
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 3743415..96a663f 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -2077,6 +2077,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st
break;
}
}
+ break;
case BASEPROPERTY_MULTILINE:
{
if ( ( eWinType == WINDOW_FIXEDTEXT )
commit 804c4983f2efc33adb9786d808c36aa6bdbfde35
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 24 12:08:36 2014 +0100
coverity#1103694 Missing break in switch, assuming this is wrong
Change-Id: I9a631eb28647ecf2633d6443d7af95cb37b860a3
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 40e8e1d..38065cf 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -165,6 +165,7 @@ void EditHTMLParser::NextToken( int nToken )
ImpInsertParaBreak();
ImpInsertParaBreak();
}
+ break;
case HTML_NONBREAKSPACE:
{
if ( bInPara )
More information about the Libreoffice-commits
mailing list