diff options
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.hxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/FormControlHelper.cxx | 22 | ||||
-rw-r--r-- | writerfilter/source/dmapper/FormControlHelper.hxx | 4 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLPropertySet.cxx | 17 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLPropertySet.hxx | 6 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsprm.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsprm.hxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/component/documentdigitalsignatures.cxx | 4 | ||||
-rw-r--r-- | xmlsecurity/source/component/documentdigitalsignatures.hxx | 2 |
10 files changed, 18 insertions, 52 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index dd51988a62d0..651fb275bae2 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -4849,12 +4849,10 @@ void DomainMapper_Impl::RegisterFrameConversion( } -bool DomainMapper_Impl::ExecuteFrameConversion() +void DomainMapper_Impl::ExecuteFrameConversion() { - bool bRet = false; if( m_xFrameStartRange.is() && m_xFrameEndRange.is() && !m_bDiscardHeaderFooter ) { - bRet = true; try { uno::Reference< text::XTextAppendAndConvert > xTextAppendAndConvert( GetTopTextAppend(), uno::UNO_QUERY_THROW ); @@ -4866,13 +4864,11 @@ bool DomainMapper_Impl::ExecuteFrameConversion() catch( const uno::Exception& rEx) { SAL_WARN( "writerfilter", "Exception caught when converting to frame: " + rEx.Message ); - bRet = false; } } m_xFrameStartRange = nullptr; m_xFrameEndRange = nullptr; m_aFrameProperties.clear(); - return bRet; } void DomainMapper_Impl::AddNewRedline( sal_uInt32 sprmId ) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 7aace410c990..a5e495a3de06 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -753,7 +753,7 @@ public: void RegisterFrameConversion(css::uno::Reference<css::text::XTextRange> const& xFrameStartRange, css::uno::Reference<css::text::XTextRange> const& xFrameEndRange, const std::vector<css::beans::PropertyValue>& aFrameProperties); - bool ExecuteFrameConversion(); + void ExecuteFrameConversion(); void AddNewRedline( sal_uInt32 sprmId ); diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx index abcdc9f680c0..22f7bb6b29a7 100644 --- a/writerfilter/source/dmapper/FormControlHelper.cxx +++ b/writerfilter/source/dmapper/FormControlHelper.cxx @@ -206,9 +206,8 @@ bool FormControlHelper::createCheckbox(uno::Reference<text::XTextRange> const& x return true; } -bool FormControlHelper::processField(uno::Reference<text::XFormField> const& xFormField) +void FormControlHelper::processField(uno::Reference<text::XFormField> const& xFormField) { - bool bRes = true; uno::Reference<container::XNameContainer> xNameCont = xFormField->getParameters(); uno::Reference<container::XNamed> xNamed( xFormField, uno::UNO_QUERY ); if ( m_pFFData && xNamed.is() && xNameCont.is() ) @@ -255,20 +254,17 @@ bool FormControlHelper::processField(uno::Reference<text::XFormField> const& xFo } } } - else - bRes = false; - return bRes; } -bool FormControlHelper::insertControl(uno::Reference<text::XTextRange> const& xTextRange) +void FormControlHelper::insertControl(uno::Reference<text::XTextRange> const& xTextRange) { bool bCreated = false; if ( !m_pFFData ) - return false; + return; uno::Reference<container::XNameContainer> xFormCompsByName(m_pImpl->getForm(), uno::UNO_QUERY); uno::Reference<container::XIndexContainer> xFormComps(m_pImpl->getFormComps()); if (! xFormComps.is()) - return false; + return; static const char sControl[] = "Control"; @@ -300,23 +296,23 @@ bool FormControlHelper::insertControl(uno::Reference<text::XTextRange> const& xT } if (!bCreated) - return false; + return; uno::Any aAny(m_pImpl->rFormComponent); xFormComps->insertByIndex(xFormComps->getCount(), aAny); if (! m_pImpl->getServiceFactory().is()) - return false; + return; uno::Reference<uno::XInterface> xInterface = m_pImpl->getServiceFactory()->createInstance("com.sun.star.drawing.ControlShape"); if (! xInterface.is()) - return false; + return; uno::Reference<drawing::XShape> xShape(xInterface, uno::UNO_QUERY); if (! xShape.is()) - return false; + return; xShape->setSize(m_pImpl->aSize); @@ -340,8 +336,6 @@ bool FormControlHelper::insertControl(uno::Reference<text::XTextRange> const& xT xControlShape->setControl(xControlModel); m_pImpl->getDrawPage()->add(xShape); - - return true; } }} diff --git a/writerfilter/source/dmapper/FormControlHelper.hxx b/writerfilter/source/dmapper/FormControlHelper.hxx index ab70695f80d9..1e6b85877097 100644 --- a/writerfilter/source/dmapper/FormControlHelper.hxx +++ b/writerfilter/source/dmapper/FormControlHelper.hxx @@ -37,8 +37,8 @@ public: FFDataHandler::Pointer_t pFFData); ~FormControlHelper(); - bool insertControl(css::uno::Reference<css::text::XTextRange> const& xTextRange); - bool processField(css::uno::Reference<css::text::XFormField> const& xFormField); + void insertControl(css::uno::Reference<css::text::XTextRange> const& xTextRange); + void processField(css::uno::Reference<css::text::XFormField> const& xFormField); bool hasFFDataHandler() const { return (m_pFFData != nullptr); } private: FFDataHandler::Pointer_t m_pFFData; diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx index 9ca93cddd1fd..82c6cfd0bf93 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx @@ -335,23 +335,6 @@ OOXMLValue * OOXMLInputStreamValue::clone() const return new OOXMLInputStreamValue(mxInputStream); } -/* - struct OOXMLPropertySetImplCompare - */ - -bool OOXMLPropertySetCompare::operator()(const OOXMLProperty::Pointer_t& x, - const OOXMLProperty::Pointer_t& y) const -{ - bool bResult = false; - - if (x.get() == nullptr && y.get() != nullptr) - bResult = true; - else if (x.get() != nullptr && y.get() != nullptr) - bResult = x->getId() < y->getId(); - - return bResult; -} - /** class OOXMLPropertySet */ diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.hxx b/writerfilter/source/ooxml/OOXMLPropertySet.hxx index 4af5aec6c1ea..c7deb523163d 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.hxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.hxx @@ -138,12 +138,6 @@ public: virtual OOXMLValue * clone() const override; }; -struct OOXMLPropertySetCompare -{ - bool operator()(const OOXMLProperty::Pointer_t& x, - const OOXMLProperty::Pointer_t& y) const; -}; - class OOXMLPropertySet : public writerfilter::Reference<Properties> { public: diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx index e19d27e7b0ec..12d90d4bd921 100644 --- a/writerfilter/source/rtftok/rtfsprm.cxx +++ b/writerfilter/source/rtftok/rtfsprm.cxx @@ -124,7 +124,7 @@ bool RTFSprms::erase(Id nKeyword) return false; } -bool RTFSprms::eraseLast(Id nKeyword) +void RTFSprms::eraseLast(Id nKeyword) { ensureCopyBeforeWrite(); for (RTFSprms::ReverseIterator_t i = m_pSprms->rbegin(); i != m_pSprms->rend(); ++i) @@ -132,10 +132,9 @@ bool RTFSprms::eraseLast(Id nKeyword) if (i->first == nKeyword) { m_pSprms->erase(std::next(i).base()); - return true; + return; } } - return false; } static RTFValue::Pointer_t getDefaultSPRM(Id const id) diff --git a/writerfilter/source/rtftok/rtfsprm.hxx b/writerfilter/source/rtftok/rtfsprm.hxx index 79b6b38a83e8..2479b407c7ab 100644 --- a/writerfilter/source/rtftok/rtfsprm.hxx +++ b/writerfilter/source/rtftok/rtfsprm.hxx @@ -65,7 +65,7 @@ public: /// Does the same as ->push_back(), except that it can overwrite or ignore existing entries. void set(Id nKeyword, RTFValue::Pointer_t pValue, RTFOverwrite eOverwrite = RTFOverwrite::YES); bool erase(Id nKeyword); - bool eraseLast(Id nKeyword); + void eraseLast(Id nKeyword); /// Removes elements which are already in the reference set. /// Also insert default values to override attributes of style /// (yes, really; that's what Word does). diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx index 728c34584a6d..754f34305270 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.cxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx @@ -204,7 +204,7 @@ OUString DocumentDigitalSignatures::getPackageSignatureDefaultStreamName( ) } -bool DocumentDigitalSignatures::ImplViewSignatures( +void DocumentDigitalSignatures::ImplViewSignatures( const Reference< css::embed::XStorage >& rxStorage, const Reference< css::io::XInputStream >& xSignStream, DocumentSignatureMode eMode, bool bReadOnly ) throw (RuntimeException, std::exception) @@ -212,7 +212,7 @@ bool DocumentDigitalSignatures::ImplViewSignatures( Reference< io::XStream > xStream; if ( xSignStream.is() ) xStream.set( xSignStream, UNO_QUERY ); - return ImplViewSignatures( rxStorage, xStream, eMode, bReadOnly ); + ImplViewSignatures( rxStorage, xStream, eMode, bReadOnly ); } bool DocumentDigitalSignatures::ImplViewSignatures( diff --git a/xmlsecurity/source/component/documentdigitalsignatures.hxx b/xmlsecurity/source/component/documentdigitalsignatures.hxx index 1030b6e5e633..975256603c37 100644 --- a/xmlsecurity/source/component/documentdigitalsignatures.hxx +++ b/xmlsecurity/source/component/documentdigitalsignatures.hxx @@ -53,7 +53,7 @@ private: bool m_bHasDocumentSignature; bool ImplViewSignatures( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& rxStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xSignStream, DocumentSignatureMode eMode, bool bReadOnly ) throw (css::uno::RuntimeException, std::exception); - bool ImplViewSignatures( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& rxStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xSignStream, DocumentSignatureMode eMode, bool bReadOnly ) throw (::com::sun::star::uno::RuntimeException, std::exception); + void ImplViewSignatures( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& rxStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xSignStream, DocumentSignatureMode eMode, bool bReadOnly ) throw (::com::sun::star::uno::RuntimeException, std::exception); com::sun::star::uno::Sequence< ::com::sun::star::security::DocumentSignatureInformation > ImplVerifySignatures( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& rxStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xSignStream, DocumentSignatureMode eMode ) throw (::com::sun::star::uno::RuntimeException); public: |