UnoControls/inc/multiplexer.hxx | 2 include/svtools/accessibletable.hxx | 2 include/svtools/brwbox.hxx | 2 include/svtools/contextmenuhelper.hxx | 2 include/svtools/ctrlbox.hxx | 2 include/svtools/editbrowsebox.hxx | 1 include/svtools/ehdl.hxx | 2 include/svtools/extcolorcfg.hxx | 3 include/svtools/grfmgr.hxx | 4 include/svtools/imap.hxx | 1 include/svtools/inetimg.hxx | 2 include/svtools/ivctrl.hxx | 2 include/svtools/parhtml.hxx | 2 include/svtools/svlbitm.hxx | 2 include/svtools/svparser.hxx | 14 +- include/svtools/tabbar.hxx | 2 include/svtools/treelistbox.hxx | 10 - include/svtools/valueset.hxx | 2 include/svtools/wizardmachine.hxx | 5 include/svx/AccessibleShape.hxx | 8 - include/svx/EnhancedCustomShape2d.hxx | 4 include/svx/ShapeTypeHandler.hxx | 5 include/svx/fmsrcimp.hxx | 4 include/svx/fmtools.hxx | 3 include/svx/gallery1.hxx | 2 include/svx/langbox.hxx | 6 - include/svx/nbdtmg.hxx | 24 ++-- include/svx/sdr/table/tablecontroller.hxx | 2 include/svx/sdrmasterpagedescriptor.hxx | 4 include/svx/svdedtv.hxx | 4 include/svx/svdedxv.hxx | 4 include/svx/svdetc.hxx | 6 - include/svx/svdglue.hxx | 1 include/svx/svdhdl.hxx | 2 include/svx/svdlayer.hxx | 4 include/svx/svdmark.hxx | 5 include/svx/svdmodel.hxx | 6 - include/svx/svdmrkv.hxx | 12 +- include/svx/svdobj.hxx | 2 include/svx/svdotext.hxx | 2 include/svx/svdpagv.hxx | 2 include/svx/svdsnpv.hxx | 6 - include/svx/unoshape.hxx | 2 include/svx/xbitmap.hxx | 1 include/svx/xmleohlp.hxx | 2 include/svx/xpoly.hxx | 3 svtools/inc/table/tablecontrol.hxx | 2 svtools/source/brwbox/brwbox1.cxx | 17 --- svtools/source/contnr/ivctrl.cxx | 4 svtools/source/contnr/svlbitm.cxx | 4 svtools/source/contnr/treelistbox.cxx | 35 ++---- svtools/source/control/ctrlbox.cxx | 4 svtools/source/control/tabbar.cxx | 6 - svtools/source/control/valueset.cxx | 8 - svtools/source/dialogs/wizardmachine.cxx | 9 - svtools/source/graphic/grfmgr.cxx | 6 - svtools/source/misc/ehdl.cxx | 5 svtools/source/svhtml/htmlsupp.cxx | 4 svtools/source/table/tablecontrol.cxx | 4 svtools/source/uno/contextmenuhelper.cxx | 6 - svtools/source/urlobj/inetimg.cxx | 5 svx/source/accessibility/AccessibleShape.cxx | 8 - svx/source/accessibility/ShapeTypeHandler.cxx | 4 svx/source/customshapes/EnhancedCustomShape2d.cxx | 16 -- svx/source/dialog/langbox.cxx | 14 +- svx/source/form/fmsrcimp.cxx | 11 - svx/source/gallery2/gallery1.cxx | 6 - svx/source/sidebar/nbdtmg.cxx | 102 +++++------------- svx/source/svdraw/sdrmasterpagedescriptor.cxx | 14 -- svx/source/svdraw/svdedtv.cxx | 5 svx/source/svdraw/svdedxv.cxx | 7 - svx/source/svdraw/svdetc.cxx | 12 +- svx/source/svdraw/svdlayer.cxx | 3 svx/source/svdraw/svdmodel.cxx | 13 -- svx/source/svdraw/svdmrkv.cxx | 16 -- svx/source/svdraw/svdobj.cxx | 4 svx/source/svdraw/svdotext.cxx | 3 svx/source/svdraw/svdpagv.cxx | 4 svx/source/svdraw/svdsnpv.cxx | 18 --- svx/source/table/tablecontroller.cxx | 7 - svx/source/unodraw/unoshap4.cxx | 6 - svx/source/xml/xmleohlp.cxx | 10 - svx/source/xoutdev/_xpoly.cxx | 19 --- svx/source/xoutdev/xattrbmp.cxx | 24 ---- ucb/source/cacher/contentresultsetwrapper.cxx | 6 - ucb/source/cacher/contentresultsetwrapper.hxx | 4 ucb/source/core/ucb.cxx | 8 - ucb/source/core/ucb.hxx | 2 ucb/source/inc/regexpmap.hxx | 34 ------ ucb/source/ucp/ftp/ftpstrcont.hxx | 2 ucb/source/ucp/hierarchy/hierarchycontent.cxx | 4 ucb/source/ucp/hierarchy/hierarchycontent.hxx | 2 ucb/source/ucp/package/pkgcontent.cxx | 10 - ucb/source/ucp/package/pkgcontent.hxx | 2 ucb/source/ucp/package/pkgprovider.cxx | 5 ucb/source/ucp/package/pkgprovider.hxx | 6 - ucb/source/ucp/tdoc/tdoc_content.cxx | 20 +-- ucb/source/ucp/tdoc/tdoc_content.hxx | 2 unotools/source/config/lingucfg.cxx | 6 - unotools/source/config/searchopt.cxx | 6 - unotools/source/ucbhelper/ucblockbytes.cxx | 4 unotools/source/ucbhelper/ucblockbytes.hxx | 2 vbahelper/source/vbahelper/vbacommandbarhelper.cxx | 5 vbahelper/source/vbahelper/vbacommandbarhelper.hxx | 2 writerfilter/source/rtftok/rtfdocumentimpl.cxx | 12 -- writerfilter/source/rtftok/rtfdocumentimpl.hxx | 2 xmloff/inc/TransGradientStyle.hxx | 4 xmloff/inc/XMLEmbeddedObjectImportContext.hxx | 2 xmloff/inc/txtflde.hxx | 2 xmloff/source/chart/SchXMLPlotAreaContext.cxx | 11 - xmloff/source/chart/SchXMLPlotAreaContext.hxx | 2 xmloff/source/core/XMLEmbeddedObjectImportContext.cxx | 8 - xmloff/source/draw/sdxmlimp_impl.hxx | 8 - xmloff/source/style/TransGradientStyle.cxx | 18 --- xmloff/source/text/txtflde.cxx | 11 - xmlscript/source/xmldlg_imexp/imp_share.hxx | 14 +- xmlscript/source/xmldlg_imexp/xmldlg_import.cxx | 48 ++------ 117 files changed, 268 insertions(+), 639 deletions(-)
New commits: commit 60904f1a7ed71adece23bed6072adc59e459aa5b Author: Noel Grandin <[email protected]> Date: Wed Jan 13 12:07:59 2016 +0200 loplugin:unusedmethods unused return value in xmloff/ Change-Id: Ia5a3716ca4f7eb987092837ac83a415e5c0730df diff --git a/xmloff/inc/TransGradientStyle.hxx b/xmloff/inc/TransGradientStyle.hxx index c2d8293..6bf80fc 100644 --- a/xmloff/inc/TransGradientStyle.hxx +++ b/xmloff/inc/TransGradientStyle.hxx @@ -41,7 +41,7 @@ public: XMLTransGradientStyleImport( SvXMLImport& rImport ); ~XMLTransGradientStyleImport(); - bool importXML( + void importXML( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList, css::uno::Any& rValue, OUString& rStrName ); @@ -55,7 +55,7 @@ public: XMLTransGradientStyleExport( SvXMLExport& rExport ); ~XMLTransGradientStyleExport(); - bool exportXML( const OUString& rStrName, const css::uno::Any& rValue ); + void exportXML( const OUString& rStrName, const css::uno::Any& rValue ); }; #endif // INCLUDED_XMLOFF_INC_TRANSGRADIENTSTYLE_HXX diff --git a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx index f5c6cbc..b071f06 100644 --- a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx +++ b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx @@ -55,7 +55,7 @@ public: virtual void Characters( const OUString& rChars ) override; - bool SetComponent( + void SetComponent( css::uno::Reference< css::lang::XComponent >& rComp ); }; diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index 3ce56f5..a064f0d 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.hxx @@ -410,7 +410,7 @@ protected: /// explode a field master name into field type and field name - bool ExplodeFieldMasterName( + void ExplodeFieldMasterName( const OUString& sMasterName, /// name as returned by SO API OUString& sFieldType, /// out: field type OUString& sVarName); /// out: variable name diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index c7f9ae3..07e4db5 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -689,11 +689,8 @@ bool SchXMLPositonAttributesHelper::isAutomatic() const return m_bAutoSize || m_bAutoPosition; } -bool SchXMLPositonAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue ) +void SchXMLPositonAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue ) { - //returns true if the attribute was proccessed - bool bReturn = true; - if( XML_NAMESPACE_SVG == nPrefix ) { if( IsXMLToken( rLocalName, XML_X ) ) @@ -720,13 +717,7 @@ bool SchXMLPositonAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix m_aSize.Height, rValue ); m_bHasSizeHeight = true; } - else - bReturn = false; } - else - bReturn = false; - - return bReturn; } void SchXMLPositonAttributesHelper::readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ) diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index 487ab35..c8066cb 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -60,7 +60,7 @@ public: explicit SchXMLPositonAttributesHelper( SvXMLImport& rImporter ); ~SchXMLPositonAttributesHelper(); - bool readPositioningAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue ); + void readPositioningAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue ); void readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ); bool hasPosSize() const; diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index 55089bf..edd01ee 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx @@ -135,11 +135,11 @@ void XMLEmbeddedObjectImportContext_Impl::Characters( const OUString& rChars ) } -bool XMLEmbeddedObjectImportContext::SetComponent( +void XMLEmbeddedObjectImportContext::SetComponent( Reference< XComponent >& rComp ) { if( !rComp.is() || sFilterService.isEmpty() ) - return false; + return; Sequence<Any> aArgs( 0 ); @@ -150,7 +150,7 @@ bool XMLEmbeddedObjectImportContext::SetComponent( UNO_QUERY); if( !xHandler.is() ) - return false; + return; try { @@ -165,8 +165,6 @@ bool XMLEmbeddedObjectImportContext::SetComponent( xImporter->setTargetDocument( rComp ); xComp = rComp; // keep ref to component only if there is a handler - - return true; } XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext( diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx index 4a585e7..ccda6f1 100644 --- a/xmloff/source/draw/sdxmlimp_impl.hxx +++ b/xmloff/source/draw/sdxmlimp_impl.hxx @@ -143,14 +143,6 @@ enum SdXMLPresentationPlaceholderAttrTokenMap XML_TOK_PRESENTATIONPLACEHOLDER_HEIGHT }; -struct SdXMLltXDrawPageId -{ - bool operator()(sal_Int32 nId1, sal_Int32 nId2 ) const - { - return nId1 < nId2; - } -}; - class SvXMLUnitConverter; class SvXMLTokenMap; class SdXMLMasterStylesContext; diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx index 39b5713..035aa2b 100644 --- a/xmloff/source/style/TransGradientStyle.cxx +++ b/xmloff/source/style/TransGradientStyle.cxx @@ -75,12 +75,11 @@ XMLTransGradientStyleImport::~XMLTransGradientStyleImport() { } -bool XMLTransGradientStyleImport::importXML( +void XMLTransGradientStyleImport::importXML( const uno::Reference< xml::sax::XAttributeList >& xAttrList, uno::Any& rValue, OUString& rStrName ) { - bool bRet = false; bool bHasName = false; bool bHasStyle = false; OUString aDisplayName; @@ -200,10 +199,6 @@ bool XMLTransGradientStyleImport::importXML( aDisplayName ); rStrName = aDisplayName; } - - bRet = bHasName && bHasStyle; - - return bRet; } // Export @@ -217,11 +212,10 @@ XMLTransGradientStyleExport::~XMLTransGradientStyleExport() { } -bool XMLTransGradientStyleExport::exportXML( +void XMLTransGradientStyleExport::exportXML( const OUString& rStrName, const uno::Any& rValue ) { - bool bRet = false; awt::Gradient aGradient; if( !rStrName.isEmpty() ) @@ -232,11 +226,7 @@ bool XMLTransGradientStyleExport::exportXML( OUStringBuffer aOut; // Style - if( !SvXMLUnitConverter::convertEnum( aOut, aGradient.Style, pXML_GradientStyle_Enum ) ) - { - bRet = false; - } - else + if( SvXMLUnitConverter::convertEnum( aOut, aGradient.Style, pXML_GradientStyle_Enum ) ) { // Name bool bEncoded = false; @@ -299,8 +289,6 @@ bool XMLTransGradientStyleExport::exportXML( } } } - - return bRet; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 2e53ecf..f8dde83 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -2884,30 +2884,21 @@ void XMLTextFieldExport::ExportDataBaseElement( // explode a field master name into field type and field name -bool XMLTextFieldExport::ExplodeFieldMasterName( +void XMLTextFieldExport::ExplodeFieldMasterName( const OUString& sMasterName, OUString& sFieldType, OUString& sVarName) { sal_Int32 nLength = sFieldMasterPrefix.getLength(); sal_Int32 nSeparator = sMasterName.indexOf('.', nLength); - bool bReturn = true; - -#ifdef DBG_UTIL - // check for service name - bReturn &= (0 == sFieldMasterPrefix.compareTo(sMasterName, nLength)); -#endif // '.' found? if (nSeparator <= nLength) { SAL_WARN("xmloff.text", "no field var name!"); - bReturn = false; } else { sFieldType = sMasterName.copy(nLength, nSeparator-nLength); sVarName = sMasterName.copy(nSeparator+1); } - - return bReturn; } commit 83f3cefaa3ee7740ab738f394791bc505358bac3 Author: Noel Grandin <[email protected]> Date: Wed Jan 13 12:07:48 2016 +0200 loplugin:unusedmethods unused return value in writerfilter/ Change-Id: I0eef0cb336a2d9450ede01c8fe1c02fbd3b2b57f diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 92ba692..938e92a 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -741,7 +741,7 @@ void RTFDocumentImpl::resolve(Stream& rMapper) } } -RTFError RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XShape> const& i_xShape) +void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XShape> const& i_xShape) { SvMemoryStream aStream; SvStream* pStream = nullptr; @@ -761,7 +761,7 @@ RTFError RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing b = b << 4; sal_Int8 parsed = RTFTokenizer::asHex(ch); if (parsed == -1) - return RTFError::HEX_INVALID; + return; b += parsed; count--; if (!count) @@ -778,7 +778,7 @@ RTFError RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing if (!pStream->Tell()) // No destination text? Then we'll get it later. - return RTFError::OK; + return; // Store, and get its URL. pStream->Seek(0); @@ -866,7 +866,7 @@ RTFError RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing auto pShapeValue = std::make_shared<RTFValue>(xShape); m_aObjectAttributes.set(NS_ooxml::LN_shape, pShapeValue); - return RTFError::OK; + return; } if (xPropertySet.is()) @@ -877,7 +877,7 @@ RTFError RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing // Send the shape directly, no section is started, to additional properties will be ignored anyway. Mapper().startShape(xShape); Mapper().endShape(); - return RTFError::OK; + return; } // Send it to the dmapper. @@ -1013,8 +1013,6 @@ RTFError RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing auto pValue = std::make_shared<RTFValue>(aAttributes, aSprms); m_aStates.top().pCurrentBuffer->push_back(Buf_t(BUFFER_PROPS, pValue)); } - - return RTFError::OK; } RTFError RTFDocumentImpl::resolveChars(char ch) diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 7ef2b4f..cc658d0 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -373,7 +373,7 @@ public: bool isInBackground(); void setDestinationText(OUString& rString); /// Resolve a picture: If not inline, then anchored. - RTFError resolvePict(bool bInline, css::uno::Reference<css::drawing::XShape> const& xShape); + void resolvePict(bool bInline, css::uno::Reference<css::drawing::XShape> const& xShape); /// If this is the first run of the document, starts the initial paragraph. void checkFirstRun(); commit 5b5f3ccdbb34687f85f68f9900d02432ad21f60a Author: Noel Grandin <[email protected]> Date: Wed Jan 13 12:07:29 2016 +0200 loplugin:unusedmethods unused return value in vbahelper/ Change-Id: I654f1b2d3a488e147acdeb790ce9a9ff3dde61f1 diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx index 8fbfd1b9..ecfd335 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx @@ -160,16 +160,13 @@ void VbaCommandBarHelper::ApplyChange( const OUString& sResourceUrl, const css:: } } -bool VbaCommandBarHelper::persistChanges() throw (css::uno::RuntimeException) +void VbaCommandBarHelper::persistChanges() throw (css::uno::RuntimeException) { uno::Reference< css::ui::XUIConfigurationPersistence > xConfigPersistence( m_xDocCfgMgr, uno::UNO_QUERY_THROW ); - bool result = false; if( xConfigPersistence->isModified() ) { xConfigPersistence->store(); - result = true; } - return result; } uno::Reference< frame::XLayoutManager > VbaCommandBarHelper::getLayoutManager() throw (uno::RuntimeException) diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx index 08f6f13..b54f001 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx @@ -69,7 +69,7 @@ public: { return m_xWindowState; } - bool persistChanges() throw (css::uno::RuntimeException); + void persistChanges() throw (css::uno::RuntimeException); css::uno::Reference< css::container::XIndexAccess > getSettings( const OUString& sResourceUrl ) throw (css::uno::RuntimeException); void removeSettings( const OUString& sResourceUrl ) throw (css::uno::RuntimeException); void ApplyChange( const OUString& sResourceUrl, const css::uno::Reference< css::container::XIndexAccess >& xSettings, bool bTemporary = true ) throw (css::uno::RuntimeException); commit 5ec991b6fecba3f8bad120dd89bb4482d6498480 Author: Noel Grandin <[email protected]> Date: Wed Jan 13 12:07:16 2016 +0200 loplugin:unusedmethods unused return value unotools/ Change-Id: I5fbb0fe5910d4f430fe4885eae5689592c366500 diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index aa50fe9..cab762a 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -148,7 +148,7 @@ class SvtLinguConfigItem : public utl::ConfigItem static bool GetHdlByName( sal_Int32 &rnHdl, const OUString &rPropertyName, bool bFullPropName = false ); static const uno::Sequence< OUString > GetPropertyNames(); - bool LoadOptions( const uno::Sequence< OUString > &rProperyNames ); + void LoadOptions( const uno::Sequence< OUString > &rProperyNames ); bool SaveOptions( const uno::Sequence< OUString > &rProperyNames ); SvtLinguConfigItem(const SvtLinguConfigItem&) = delete; @@ -548,7 +548,7 @@ const SvtLinguOptions& SvtLinguConfigItem::GetOptions() const return aOpt; } -bool SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyNames ) +void SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyNames ) { osl::MutexGuard aGuard(theSvtLinguConfigItemMutex::get()); @@ -661,8 +661,6 @@ bool SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN bRes = true; } DBG_ASSERT( bRes, "LoadOptions failed" ); - - return bRes; } bool SvtLinguConfigItem::SaveOptions( const uno::Sequence< OUString > &rProperyNames ) diff --git a/unotools/source/config/searchopt.cxx b/unotools/source/config/searchopt.cxx index 6c1a2b3..cc491e0 100644 --- a/unotools/source/config/searchopt.cxx +++ b/unotools/source/config/searchopt.cxx @@ -50,7 +50,7 @@ protected: bool IsModified() const { return bModified; } using ConfigItem::SetModified; void SetModified( bool bVal ); - bool Load(); + void Load(); bool Save(); static Sequence< OUString > GetPropertyNames(); @@ -161,7 +161,7 @@ Sequence< OUString > SvtSearchOptions_Impl::GetPropertyNames() return aNames; } -bool SvtSearchOptions_Impl::Load() +void SvtSearchOptions_Impl::Load() { bool bSucc = false; @@ -210,8 +210,6 @@ bool SvtSearchOptions_Impl::Load() } } DBG_ASSERT( bSucc, "LoadConfig failed" ); - - return bSucc; } bool SvtSearchOptions_Impl::Save() diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx index e9f6259..784c1ed 100644 --- a/unotools/source/ucbhelper/ucblockbytes.cxx +++ b/unotools/source/ucbhelper/ucblockbytes.cxx @@ -1093,7 +1093,7 @@ Reference < XInputStream > UcbLockBytes::getInputStream() return m_xInputStream; } -bool UcbLockBytes::setStream_Impl( const Reference<XStream>& aStream ) +void UcbLockBytes::setStream_Impl( const Reference<XStream>& aStream ) { osl::MutexGuard aGuard( m_aMutex ); if ( aStream.is() ) @@ -1107,8 +1107,6 @@ bool UcbLockBytes::setStream_Impl( const Reference<XStream>& aStream ) m_xOutputStream.clear(); setInputStream_Impl( Reference < XInputStream >() ); } - - return m_xInputStream.is(); } bool UcbLockBytes::setInputStream_Impl( const Reference<XInputStream> &rxInputStream, bool bSetXSeekable ) diff --git a/unotools/source/ucbhelper/ucblockbytes.hxx b/unotools/source/ucbhelper/ucblockbytes.hxx index b97151f..1fd6f5a 100644 --- a/unotools/source/ucbhelper/ucblockbytes.hxx +++ b/unotools/source/ucbhelper/ucblockbytes.hxx @@ -128,7 +128,7 @@ public: bool setInputStream_Impl( const css::uno::Reference < css::io::XInputStream > &rxInputStream, bool bSetXSeekable = true ); - bool setStream_Impl( const css::uno::Reference < css::io::XStream > &rxStream ); + void setStream_Impl( const css::uno::Reference < css::io::XStream > &rxStream ); void terminate_Impl(); css::uno::Reference < css::io::XInputStream > getInputStream_Impl() const commit 8a43ba529a9cd5ba7658334f9546f978175921ab Author: Noel Grandin <[email protected]> Date: Wed Jan 13 12:06:54 2016 +0200 loplugin:unusedmethods unused return value in ucb/ Change-Id: Ib988c919a21f58b7dc302810ec6c63534a51f382 diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx index 6390550..ebad2c6 100644 --- a/ucb/source/cacher/contentresultsetwrapper.cxx +++ b/ucb/source/cacher/contentresultsetwrapper.cxx @@ -178,22 +178,20 @@ void SAL_CALL ContentResultSetWrapper::impl_EnsureNotDisposed() throw DisposedException(); } -ContentResultSetWrapper::PropertyChangeListenerContainer_Impl* SAL_CALL ContentResultSetWrapper::impl_getPropertyChangeListenerContainer() +void SAL_CALL ContentResultSetWrapper::impl_getPropertyChangeListenerContainer() { osl::Guard< osl::Mutex > aGuard( m_aMutex ); if ( !m_pPropertyChangeListeners ) m_pPropertyChangeListeners = new PropertyChangeListenerContainer_Impl( m_aContainerMutex ); - return m_pPropertyChangeListeners; } -ContentResultSetWrapper::PropertyChangeListenerContainer_Impl* SAL_CALL ContentResultSetWrapper::impl_getVetoableChangeListenerContainer() +void SAL_CALL ContentResultSetWrapper::impl_getVetoableChangeListenerContainer() { osl::Guard< osl::Mutex > aGuard( m_aMutex ); if ( !m_pVetoableChangeListeners ) m_pVetoableChangeListeners = new PropertyChangeListenerContainer_Impl( m_aContainerMutex ); - return m_pVetoableChangeListeners; } void SAL_CALL ContentResultSetWrapper::impl_notifyPropertyChangeListeners( const PropertyChangeEvent& rEvt ) diff --git a/ucb/source/cacher/contentresultsetwrapper.hxx b/ucb/source/cacher/contentresultsetwrapper.hxx index 138856c..baf84f1 100644 --- a/ucb/source/cacher/contentresultsetwrapper.hxx +++ b/ucb/source/cacher/contentresultsetwrapper.hxx @@ -142,10 +142,10 @@ private: //methods: private: - PropertyChangeListenerContainer_Impl* SAL_CALL + void SAL_CALL impl_getPropertyChangeListenerContainer(); - PropertyChangeListenerContainer_Impl* SAL_CALL + void SAL_CALL impl_getVetoableChangeListenerContainer(); protected: diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index 5f5cff3..b25e266 100644 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.cxx @@ -815,7 +815,7 @@ Reference< XContentProvider > UniversalContentBroker::queryContentProvider( : Reference< XContentProvider >(); } -bool UniversalContentBroker::configureUcb() +void UniversalContentBroker::configureUcb() throw (uno::RuntimeException) { OUString aKey1; @@ -824,19 +824,17 @@ bool UniversalContentBroker::configureUcb() || !(m_aArguments[0] >>= aKey1) || !(m_aArguments[1] >>= aKey2)) { OSL_FAIL("UniversalContentBroker::configureUcb(): Bad arguments"); - return false; + return; } ContentProviderDataList aData; if (!getContentProviderData(aKey1, aKey2, aData)) { OSL_TRACE("UniversalContentBroker::configureUcb(): No configuration"); - return false; + return; } prepareAndRegister(aData); - - return true; } void UniversalContentBroker::prepareAndRegister( diff --git a/ucb/source/core/ucb.hxx b/ucb/source/core/ucb.hxx index 4e094de..a280832 100644 --- a/ucb/source/core/ucb.hxx +++ b/ucb/source/core/ucb.hxx @@ -190,7 +190,7 @@ private: const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv ) throw( css::uno::Exception ); - bool configureUcb() + void configureUcb() throw ( css::uno::RuntimeException); bool getContentProviderData( diff --git a/ucb/source/inc/regexpmap.hxx b/ucb/source/inc/regexpmap.hxx index 7485e1e..389b8fe 100644 --- a/ucb/source/inc/regexpmap.hxx +++ b/ucb/source/inc/regexpmap.hxx @@ -268,8 +268,6 @@ public: RegexpMapConstIter operator ++(int); - RegexpMapEntry< Val > const & operator *() const; - RegexpMapEntry< Val > const * operator ->() const; bool equals(RegexpMapConstIter const & rOther) const; @@ -328,12 +326,6 @@ RegexpMapConstIter< Val > RegexpMapConstIter< Val >::operator ++(int) } template< typename Val > -RegexpMapEntry< Val > const & RegexpMapConstIter< Val >::operator *() const -{ - return m_pImpl->get(); -} - -template< typename Val > RegexpMapEntry< Val > const * RegexpMapConstIter< Val >::operator ->() const { return &m_pImpl->get(); @@ -359,10 +351,6 @@ public: RegexpMapIter operator ++(int); - RegexpMapEntry< Val > & operator *(); - - RegexpMapEntry< Val > const & operator *() const; - RegexpMapEntry< Val > * operator ->(); RegexpMapEntry< Val > const * operator ->() const; @@ -392,18 +380,6 @@ RegexpMapIter< Val > RegexpMapIter< Val >::operator ++(int) } template< typename Val > -RegexpMapEntry< Val > & RegexpMapIter< Val >::operator *() -{ - return this->m_pImpl->get(); -} - -template< typename Val > -RegexpMapEntry< Val > const & RegexpMapIter< Val >::operator *() const -{ - return this->m_pImpl->get(); -} - -template< typename Val > RegexpMapEntry< Val > * RegexpMapIter< Val >::operator ->() { return &this->m_pImpl->get(); @@ -432,7 +408,7 @@ public: RegexpMap & operator =(RegexpMap const & rOther); - bool add(OUString const & rKey, Val const & rValue, bool bOverwrite, + void add(OUString const & rKey, Val const & rValue, bool bOverwrite, OUString * pReverse = nullptr); iterator find(OUString const & rKey, OUString * pReverse = nullptr); @@ -481,7 +457,7 @@ RegexpMap< Val > & RegexpMap< Val >::operator =(RegexpMap const & rOther) } template< typename Val > -bool RegexpMap< Val >::add(rtl::OUString const & rKey, Val const & rValue, +void RegexpMap< Val >::add(rtl::OUString const & rKey, Val const & rValue, bool bOverwrite, rtl::OUString * pReverse) { Regexp aRegexp(Regexp::parse(rKey)); @@ -491,7 +467,7 @@ bool RegexpMap< Val >::add(rtl::OUString const & rKey, Val const & rValue, if (m_pImpl->m_pDefault) { if (!bOverwrite) - return false; + return; delete m_pImpl->m_pDefault; } m_pImpl->m_pDefault = new Entry< Val >(aRegexp, rValue); @@ -511,7 +487,7 @@ bool RegexpMap< Val >::add(rtl::OUString const & rKey, Val const & rValue, break; } else - return false; + return; } } @@ -520,8 +496,6 @@ bool RegexpMap< Val >::add(rtl::OUString const & rKey, Val const & rValue, if (pReverse) *pReverse = aRegexp.getRegexp(true); - - return true; } template< typename Val > diff --git a/ucb/source/ucp/ftp/ftpstrcont.hxx b/ucb/source/ucp/ftp/ftpstrcont.hxx index fe766ab..44fda8f 100644 --- a/ucb/source/ucp/ftp/ftpstrcont.hxx +++ b/ucb/source/ucp/ftp/ftpstrcont.hxx @@ -52,8 +52,6 @@ namespace ftp { explicit FTPInputStreamContainer(FTPInputStream* out); virtual ~FTPInputStreamContainer() {} - - css::uno::Reference< css::io::XInputStream> operator()(); }; } diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index 4260e7f..1961ff5 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -694,13 +694,13 @@ bool HierarchyContent::storeData() } -bool HierarchyContent::renameData( +void HierarchyContent::renameData( const uno::Reference< ucb::XContentIdentifier >& xOldId, const uno::Reference< ucb::XContentIdentifier >& xNewId ) { HierarchyEntry aEntry( m_xContext, m_pProvider, xOldId->getContentIdentifier() ); - return aEntry.move( xNewId->getContentIdentifier(), + aEntry.move( xNewId->getContentIdentifier(), m_aProps.getHierarchyEntryData() ); } diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.hxx b/ucb/source/ucp/hierarchy/hierarchycontent.hxx index 60740ae..ff2d46c 100644 --- a/ucb/source/ucp/hierarchy/hierarchycontent.hxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.hxx @@ -143,7 +143,7 @@ private: const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier, HierarchyContentProperties& rProps ); bool storeData(); - bool renameData( const css::uno::Reference< css::ucb::XContentIdentifier >& xOldId, + void renameData( const css::uno::Reference< css::ucb::XContentIdentifier >& xOldId, const css::uno::Reference< css::ucb::XContentIdentifier >& xNewId ); bool removeData(); diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index c0929f2..7bce4df 100644 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -2439,7 +2439,7 @@ bool Content::loadData( } -bool Content::renameData( +void Content::renameData( const uno::Reference< ucb::XContentIdentifier >& xOldId, const uno::Reference< ucb::XContentIdentifier >& xNewId ) { @@ -2450,7 +2450,7 @@ bool Content::renameData( aURI ); if ( !xNA->hasByHierarchicalName( aURI.getPath() ) ) - return false; + return; try { @@ -2461,22 +2461,18 @@ bool Content::renameData( if ( !xNamed.is() ) { OSL_FAIL( "Content::renameData - Got no XNamed interface!" ); - return false; + return; } PackageUri aNewURI( xNewId->getContentIdentifier() ); // No success indicator!? No return value / exceptions specified. xNamed->setName( aNewURI.getName() ); - - return true; } catch ( container::NoSuchElementException const & ) { // getByHierarchicalName } - - return false; } diff --git a/ucb/source/ucp/package/pkgcontent.hxx b/ucb/source/ucp/package/pkgcontent.hxx index ff0a917..241b92c 100644 --- a/ucb/source/ucp/package/pkgcontent.hxx +++ b/ucb/source/ucp/package/pkgcontent.hxx @@ -155,7 +155,7 @@ private: bool hasData( const PackageUri& rURI ); - bool + void renameData( const css::uno::Reference< css::ucb::XContentIdentifier >& xOldId, const css::uno::Reference< css::ucb::XContentIdentifier >& xNewId ); bool diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx index 64ebe11..b4e62b9 100644 --- a/ucb/source/ucp/package/pkgprovider.cxx +++ b/ucb/source/ucp/package/pkgprovider.cxx @@ -262,7 +262,7 @@ ContentProvider::createPackage( const PackageUri & rURI ) } -bool ContentProvider::removePackage( const OUString & rName ) +void ContentProvider::removePackage( const OUString & rName ) { osl::MutexGuard aGuard( m_aMutex ); @@ -272,10 +272,9 @@ bool ContentProvider::removePackage( const OUString & rName ) if ( it != m_pPackages->end() ) { m_pPackages->erase( it ); - return true; + return; } } - return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/package/pkgprovider.hxx b/ucb/source/ucp/package/pkgprovider.hxx index cec29da..c335499 100644 --- a/ucb/source/ucp/package/pkgprovider.hxx +++ b/ucb/source/ucp/package/pkgprovider.hxx @@ -89,16 +89,12 @@ public: css::uno::RuntimeException, std::exception ) override; - // Additional interfaces - - - // Non-interface methods. css::uno::Reference< css::container::XHierarchicalNameAccess > createPackage( const PackageUri & rParam ); - bool + void removePackage( const OUString & rName ); }; diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index d28f750..d35cdda 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -2488,7 +2488,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData, } -bool Content::renameData( +void Content::renameData( const uno::Reference< ucb::XContentIdentifier >& xOldId, const uno::Reference< ucb::XContentIdentifier >& xNewId ) { @@ -2498,7 +2498,7 @@ bool Content::renameData( if ( ( eType == ROOT ) || ( eType == DOCUMENT ) ) { OSL_FAIL( "renameData not supported by root and documents!" ); - return false; + return; } Uri aOldUri( xOldId->getContentIdentifier() ); @@ -2507,7 +2507,7 @@ bool Content::renameData( aOldUri.getParentUri(), READ_WRITE_NOCREATE ); if ( !xStorage.is() ) - return false; + return; try { @@ -2519,40 +2519,40 @@ bool Content::renameData( { // this storage is in invalid state for eny reason OSL_FAIL( "Caught InvalidStorageException!" ); - return false; + return; } catch ( lang::IllegalArgumentException const & ) { // an illegal argument is provided OSL_FAIL( "Caught IllegalArgumentException!" ); - return false; + return; } catch ( container::NoSuchElementException const & ) { // there is no element with old name in this storage OSL_FAIL( "Caught NoSuchElementException!" ); - return false; + return; } catch ( container::ElementExistException const & ) { // an element with new name already exists in this storage OSL_FAIL( "Caught ElementExistException!" ); - return false; + return; } catch ( io::IOException const & ) { // in case of io errors during renaming OSL_FAIL( "Caught IOException!" ); - return false; + return; } catch ( embed::StorageWrappedTargetException const & ) { // wraps other exceptions OSL_FAIL( "Caught StorageWrappedTargetException!" ); - return false; + return; } - return commitStorage( xStorage ); + commitStorage( xStorage ); } diff --git a/ucb/source/ucp/tdoc/tdoc_content.hxx b/ucb/source/ucp/tdoc/tdoc_content.hxx index 1ae0e65..8d04503 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.hxx +++ b/ucb/source/ucp/tdoc/tdoc_content.hxx @@ -126,7 +126,7 @@ private: throw ( css::ucb::CommandFailedException, css::task::DocumentPasswordRequest, css::uno::RuntimeException ); - bool renameData( const css::uno::Reference< css::ucb::XContentIdentifier >& xOldId, + void renameData( const css::uno::Reference< css::ucb::XContentIdentifier >& xOldId, const css::uno::Reference< css::ucb::XContentIdentifier >& xNewId ); bool removeData(); commit c263b4ae5fa9f56199129febeeea74a036535cc2 Author: Noel Grandin <[email protected]> Date: Wed Jan 13 12:06:41 2016 +0200 loplugin:unusedmethods unused return value in UnoControl Change-Id: I6099667c1a057e36cd10a9d79792fadbb84fbf26 diff --git a/UnoControls/inc/multiplexer.hxx b/UnoControls/inc/multiplexer.hxx index b148b9c..d82f073 100644 --- a/UnoControls/inc/multiplexer.hxx +++ b/UnoControls/inc/multiplexer.hxx @@ -121,8 +121,6 @@ public: virtual void SAL_CALL release() throw() override; - operator css::uno::Reference< css::uno::XInterface >() const { return (static_cast<OWeakObject*>(const_cast<OMRCListenerMultiplexerHelper *>(this)));} - OMRCListenerMultiplexerHelper& operator= ( const OMRCListenerMultiplexerHelper& aCopyInstance ); // container methods commit 91a5acfb0e91222017b7472a8b94f0b3db0ccefe Author: Noel Grandin <[email protected]> Date: Wed Jan 13 11:13:59 2016 +0200 loplugin:unusedmethods unused return value in xmlscript/ Change-Id: I076b589686302a9093eae934533e823f12e003b9 diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx index 2c176c9..48bc18b 100644 --- a/xmlscript/source/xmldlg_imexp/imp_share.hxx +++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx @@ -290,19 +290,19 @@ public: virtual void SAL_CALL endElement() throw (css::xml::sax::SAXException, css::uno::RuntimeException, std::exception) override; - bool importTextColorStyle( + void importTextColorStyle( css::uno::Reference< css::beans::XPropertySet > const & xProps ); - bool importTextLineColorStyle( + void importTextLineColorStyle( css::uno::Reference< css::beans::XPropertySet > const & xProps ); - bool importFillColorStyle( + void importFillColorStyle( css::uno::Reference< css::beans::XPropertySet > const & xProps ); - bool importBackgroundColorStyle( + void importBackgroundColorStyle( css::uno::Reference< css::beans::XPropertySet > const & xProps ); - bool importFontStyle( + void importFontStyle( css::uno::Reference< css::beans::XPropertySet > const & xProps ); - bool importBorderStyle( + void importBorderStyle( css::uno::Reference< css::beans::XPropertySet > const & xProps ); - bool importVisualEffectStyle( + void importVisualEffectStyle( css::uno::Reference< css::beans::XPropertySet > const & xProps ); StyleElement( diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx index b5191b1..89069cb 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx @@ -125,7 +125,7 @@ OUString ControlElement::getControlModelName( return aModel; } -bool StyleElement::importTextColorStyle( +void StyleElement::importTextColorStyle( Reference< beans::XPropertySet > const & xProps ) { if ((_inited & 0x2) != 0) @@ -133,9 +133,8 @@ bool StyleElement::importTextColorStyle( if ((_hasValue & 0x2) != 0) { xProps->setPropertyValue("TextColor", makeAny( _textColor ) ); - return true; } - return false; + return; } _inited |= 0x2; @@ -143,12 +142,11 @@ bool StyleElement::importTextColorStyle( { _hasValue |= 0x2; xProps->setPropertyValue( "TextColor", makeAny( _textColor ) ); - return true; + return; } - return false; } -bool StyleElement::importTextLineColorStyle( +void StyleElement::importTextLineColorStyle( Reference< beans::XPropertySet > const & xProps ) { if ((_inited & 0x20) != 0) @@ -156,9 +154,8 @@ bool StyleElement::importTextLineColorStyle( if ((_hasValue & 0x20) != 0) { xProps->setPropertyValue( "TextLineColor", makeAny( _textLineColor ) ); - return true; } - return false; + return; } _inited |= 0x20; @@ -166,12 +163,10 @@ bool StyleElement::importTextLineColorStyle( { _hasValue |= 0x20; xProps->setPropertyValue( "TextLineColor", makeAny( _textLineColor ) ); - return true; } - return false; } -bool StyleElement::importFillColorStyle( +void StyleElement::importFillColorStyle( Reference< beans::XPropertySet > const & xProps ) { if ((_inited & 0x10) != 0) @@ -179,9 +174,8 @@ bool StyleElement::importFillColorStyle( if ((_hasValue & 0x10) != 0) { xProps->setPropertyValue( "FillColor", makeAny( _fillColor ) ); - return true; } - return false; + return; } _inited |= 0x10; @@ -189,12 +183,10 @@ bool StyleElement::importFillColorStyle( { _hasValue |= 0x10; xProps->setPropertyValue( "FillColor", makeAny( _fillColor ) ); - return true; } - return false; } -bool StyleElement::importBackgroundColorStyle( +void StyleElement::importBackgroundColorStyle( Reference< beans::XPropertySet > const & xProps ) { if ((_inited & 0x1) != 0) @@ -202,9 +194,8 @@ bool StyleElement::importBackgroundColorStyle( if ((_hasValue & 0x1) != 0) { xProps->setPropertyValue( "BackgroundColor", makeAny( _backgroundColor ) ); - return true; } - return false; + return; } _inited |= 0x1; @@ -212,12 +203,10 @@ bool StyleElement::importBackgroundColorStyle( { _hasValue |= 0x1; xProps->setPropertyValue( "BackgroundColor", makeAny( _backgroundColor ) ); - return true; } - return false; } -bool StyleElement::importBorderStyle( +void StyleElement::importBorderStyle( Reference< beans::XPropertySet > const & xProps ) { if ((_inited & 0x4) != 0) @@ -227,9 +216,8 @@ bool StyleElement::importBorderStyle( xProps->setPropertyValue( "Border", makeAny( _border == BORDER_SIMPLE_COLOR ? BORDER_SIMPLE : _border ) ); if (_border == BORDER_SIMPLE_COLOR) xProps->setPropertyValue( "BorderColor", makeAny(_borderColor) ); - return true; } - return false; + return; } _inited |= 0x4; @@ -250,10 +238,9 @@ bool StyleElement::importBorderStyle( _hasValue |= 0x4; importBorderStyle(xProps); // write values } - return false; } -bool StyleElement::importVisualEffectStyle( +void StyleElement::importVisualEffectStyle( Reference<beans::XPropertySet> const & xProps ) { if ((_inited & 0x40) != 0) @@ -261,9 +248,8 @@ bool StyleElement::importVisualEffectStyle( if ((_hasValue & 0x40) != 0) { xProps->setPropertyValue( "VisualEffect", makeAny(_visualEffect) ); - return true; } - return false; + return; } _inited |= 0x40; @@ -288,7 +274,6 @@ bool StyleElement::importVisualEffectStyle( _hasValue |= 0x40; xProps->setPropertyValue( "VisualEffect", makeAny(_visualEffect) ); } - return false; } void StyleElement::setFontProperties( @@ -299,7 +284,7 @@ void StyleElement::setFontProperties( xProps->setPropertyValue("FontRelief", makeAny( _fontRelief ) ); } -bool StyleElement::importFontStyle( +void StyleElement::importFontStyle( Reference< beans::XPropertySet > const & xProps ) { if ((_inited & 0x8) != 0) @@ -307,9 +292,8 @@ bool StyleElement::importFontStyle( if ((_hasValue & 0x8) != 0) { setFontProperties( xProps ); - return true; } - return false; + return; } _inited |= 0x8; @@ -681,8 +665,6 @@ bool StyleElement::importFontStyle( _hasValue |= 0x8; setFontProperties( xProps ); } - - return bFontImport; } bool ImportContext::importStringProperty( commit 139c2e8cbde7e176d184c46583d1b78ef851515a Author: Noel Grandin <[email protected]> Date: Wed Jan 13 10:58:54 2016 +0200 loplugin:unusedmethods unused return value in include/svx Change-Id: I9a5e937905fd71ecbbf9cb215ff6cc2b7defc6f3 diff --git a/include/svx/AccessibleShape.hxx b/include/svx/AccessibleShape.hxx index 822be7e..a3abffb 100644 --- a/include/svx/AccessibleShape.hxx +++ b/include/svx/AccessibleShape.hxx @@ -161,14 +161,6 @@ public: */ virtual void Init(); - /** Compare two accessible shapes using object identity - @param rShape - This is the second operand. - @return - Returns true if both shapes are the same object. - */ - bool operator== (const AccessibleShape& rShape); - /** Set the specified state. If the state is <const>FOCUSED</const> then, additionally to the inherited functionality, the focus listeners registered with the XAccessibleComponent diff --git a/include/svx/EnhancedCustomShape2d.hxx b/include/svx/EnhancedCustomShape2d.hxx index 667ad5c..c85f888 100644 --- a/include/svx/EnhancedCustomShape2d.hxx +++ b/include/svx/EnhancedCustomShape2d.hxx @@ -132,7 +132,7 @@ class SVX_DLLPUBLIC EnhancedCustomShape2d : public SfxItemSet SAL_DLLPRIVATE Color GetColorData( const Color& rFillColor, sal_uInt32 nIndex, double dBrightness ) const; SAL_DLLPRIVATE void AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rCustomShapeSet, sal_uInt32& nColorIndex, sal_uInt32 nColorCount); - SAL_DLLPRIVATE bool GetParameter( double& rParameterReturnValue, const css::drawing::EnhancedCustomShapeParameter&, + SAL_DLLPRIVATE void GetParameter( double& rParameterReturnValue, const css::drawing::EnhancedCustomShapeParameter&, const bool bReplaceGeoWidth, const bool bReplaceGeoHeight ) const; SAL_DLLPRIVATE Point GetPoint( const css::drawing::EnhancedCustomShapeParameterPair&, const bool bScale = true, const bool bReplaceGeoSize = false ) const; @@ -141,7 +141,7 @@ class SVX_DLLPUBLIC EnhancedCustomShape2d : public SfxItemSet bool bLineGeometryNeededOnly, bool bSortFilledObjectsToBack, sal_Int32 nIndex ); SAL_DLLPRIVATE SdrObject* CreatePathObj( bool bLineGeometryNeededOnly ); - SAL_DLLPRIVATE const sal_Int32* ApplyShapeAttributes( const SdrCustomShapeGeometryItem& rItem ); + SAL_DLLPRIVATE void ApplyShapeAttributes( const SdrCustomShapeGeometryItem& rItem ); SAL_DLLPRIVATE void SetPathSize( sal_Int32 nIndex = 0 ); diff --git a/include/svx/ShapeTypeHandler.hxx b/include/svx/ShapeTypeHandler.hxx index 8557301..796fe88 100644 --- a/include/svx/ShapeTypeHandler.hxx +++ b/include/svx/ShapeTypeHandler.hxx @@ -131,11 +131,8 @@ public: Number of new shape types. @param aDescriptorList Array of new shape type descriptors. - @return - The returned flag indicates whether the specified shape - descriptors have been successfully added. */ - bool AddShapeTypeList (int nDescriptorCount, + void AddShapeTypeList (int nDescriptorCount, ShapeTypeDescriptor aDescriptorList[]); /// get the accessible base name for an object diff --git a/include/svx/fmsrcimp.hxx b/include/svx/fmsrcimp.hxx index 74305a9..6e5ed19 100644 --- a/include/svx/fmsrcimp.hxx +++ b/include/svx/fmsrcimp.hxx @@ -89,7 +89,7 @@ class SAL_WARN_UNUSED FmRecordCountListener : public ::cppu::WeakImplHelper1< cs // attribute access public: - Link<sal_Int32,void> SetPropChangeHandler(const Link<sal_Int32,void>& lnk); + void SetPropChangeHandler(const Link<sal_Int32,void>& lnk); // methods public: @@ -338,7 +338,7 @@ public: /** only valid, if not an (asynchronous) search is running, the next search will then be executed on top of the new iterator with the new parameter */ - bool SwitchToContext(const css::uno::Reference< css::sdbc::XResultSet >& xCursor, const OUString& strVisibleFields, const InterfaceArray& arrFields, + void SwitchToContext(const css::uno::Reference< css::sdbc::XResultSet >& xCursor, const OUString& strVisibleFields, const InterfaceArray& arrFields, sal_Int32 nFieldIndex); protected: diff --git a/include/svx/fmtools.hxx b/include/svx/fmtools.hxx index 3c970a0..6e90694 100644 --- a/include/svx/fmtools.hxx +++ b/include/svx/fmtools.hxx @@ -116,14 +116,11 @@ public: bool is() const { return m_xMoveOperations.is(); } bool Is() const { return m_xMoveOperations.is(); } - CursorWrapper* operator ->() { return this; } operator const css::uno::Reference< css::uno::XInterface>& () const{ return m_xGeneric; } // 'Conversions' const CursorWrapper& operator=(const css::uno::Reference< css::sdbc::XRowSet>& xCursor); operator const css::uno::Reference< css::sdbc::XResultSet>& () const { return m_xMoveOperations; } - operator const css::uno::Reference< css::sdbcx::XRowLocate>& () const { return m_xBookmarkOperations; } - operator const css::uno::Reference< css::sdbcx::XColumnsSupplier>& () const { return m_xColumnsSupplier; } const css::uno::Reference< css::beans::XPropertySet >& getPropertySet() const { return m_xPropertyAccess; } diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx index dc5d0a9..5879e20 100644 --- a/include/svx/gallery1.hxx +++ b/include/svx/gallery1.hxx @@ -134,7 +134,7 @@ public: SAL_DLLPRIVATE OUString GetThemeName( sal_uIntPtr nThemeId ) const; bool CreateTheme( const OUString& rThemeName ); - SAL_DLLPRIVATE bool RenameTheme( const OUString& rOldName, const OUString& rNewName ); + SAL_DLLPRIVATE void RenameTheme( const OUString& rOldName, const OUString& rNewName ); bool RemoveTheme( const OUString& rThemeName ); GalleryTheme* AcquireTheme( const OUString& rThemeName, SfxListener& rListener ); diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx index cfc1e18..f88ca53 100644 --- a/include/svx/langbox.hxx +++ b/include/svx/langbox.hxx @@ -69,9 +69,9 @@ public: bool bCheckSpellAvail = false ); sal_Int32 InsertLanguage( const LanguageType eLangType, sal_Int32 nPos = LISTBOX_APPEND ); - sal_Int32 InsertDefaultLanguage( sal_Int16 nType, sal_Int32 nPos = LISTBOX_APPEND ); - sal_Int32 InsertSystemLanguage( sal_Int32 nPos = LISTBOX_APPEND ); - sal_Int32 InsertLanguage( const LanguageType eLangType, + void InsertDefaultLanguage( sal_Int16 nType, sal_Int32 nPos = LISTBOX_APPEND ); + void InsertSystemLanguage( sal_Int32 nPos = LISTBOX_APPEND ); + void InsertLanguage( const LanguageType eLangType, bool bCheckEntry, sal_Int32 nPos = LISTBOX_APPEND ); void RemoveLanguage( const LanguageType eLangType ); void SelectLanguage( const LanguageType eLangType, bool bSelect = true ); diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx index f8251d7..55059bc 100644 --- a/include/svx/nbdtmg.hxx +++ b/include/svx/nbdtmg.hxx @@ -217,8 +217,8 @@ class SVX_DLLPUBLIC NBOTypeMgrBase virtual ~NBOTypeMgrBase() {} virtual void Init()=0; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0)=0; - virtual bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF)=0; - virtual bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF, bool isDefault=false,bool isResetSize=false)=0; + virtual void RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF)=0; + virtual void ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF, bool isDefault=false,bool isResetSize=false)=0; virtual OUString GetDescription(sal_uInt16 nIndex,bool isDefault=false)=0; virtual bool IsCustomized(sal_uInt16 nIndex)=0; static sal_uInt16 IsSingleLevel(sal_uInt16 nCurLevel); @@ -249,8 +249,8 @@ class SVX_DLLPUBLIC BulletsTypeMgr: public NBOTypeMgrBase virtual ~BulletsTypeMgr() {} virtual void Init() override; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override; - virtual bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF) override; - virtual bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,bool isDefault=false,bool isResetSize=false) override; + virtual void RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF) override; + virtual void ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,bool isDefault=false,bool isResetSize=false) override; virtual OUString GetDescription(sal_uInt16 nIndex,bool isDefault=false) override; virtual bool IsCustomized(sal_uInt16 nIndex) override; static sal_Unicode GetBulChar(sal_uInt16 nIndex); @@ -271,8 +271,8 @@ class SVX_DLLPUBLIC GraphyicBulletsTypeMgr: public NBOTypeMgrBase virtual ~GraphyicBulletsTypeMgr(); virtual void Init() override; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override; - virtual bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF) override; - virtual bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,bool isDefault=false,bool isResetSize=false) override; + virtual void RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF) override; + virtual void ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,bool isDefault=false,bool isResetSize=false) override; virtual OUString GetDescription(sal_uInt16 nIndex,bool isDefault=false) override; virtual bool IsCustomized(sal_uInt16 nIndex) override; OUString GetGrfName(sal_uInt16 nIndex); @@ -292,8 +292,8 @@ class SVX_DLLPUBLIC MixBulletsTypeMgr: public NBOTypeMgrBase virtual ~MixBulletsTypeMgr() {} virtual void Init() override; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override; - virtual bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF) override; - virtual bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,bool isDefault=false,bool isResetSize=false) override; + virtual void RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF) override; + virtual void ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,bool isDefault=false,bool isResetSize=false) override; virtual OUString GetDescription(sal_uInt16 nIndex,bool isDefault=false) override; virtual bool IsCustomized(sal_uInt16 nIndex) override; static MixBulletsTypeMgr& GetInstance(); @@ -310,8 +310,8 @@ class SVX_DLLPUBLIC NumberingTypeMgr: public NBOTypeMgrBase virtual ~NumberingTypeMgr(); virtual void Init() override; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override; - virtual bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF) override; - virtual bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,bool isDefault=false,bool isResetSize=false) override; + virtual void RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF) override; + virtual void ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,bool isDefault=false,bool isResetSize=false) override; virtual OUString GetDescription(sal_uInt16 nIndex,bool isDefault=false) override; virtual bool IsCustomized(sal_uInt16 nIndex) override; static NumberingTypeMgr& GetInstance(); @@ -328,8 +328,8 @@ class SVX_DLLPUBLIC OutlineTypeMgr: public NBOTypeMgrBase virtual ~OutlineTypeMgr() {} virtual void Init() override; virtual sal_uInt16 GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex=0) override; - virtual bool RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF) override; - virtual bool ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,bool isDefault=false,bool isResetSize=false) override; + virtual void RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF) override; + virtual void ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel=(sal_uInt16)0xFFFF,bool isDefault=false,bool isResetSize=false) override; virtual OUString GetDescription(sal_uInt16 nIndex,bool isDefault=false) override; virtual bool IsCustomized(sal_uInt16 nIndex) override; static OutlineTypeMgr& GetInstance(); diff --git a/include/svx/sdr/table/tablecontroller.hxx b/include/svx/sdr/table/tablecontroller.hxx index d1a87a2..b8cf893 100644 --- a/include/svx/sdr/table/tablecontroller.hxx +++ b/include/svx/sdr/table/tablecontroller.hxx @@ -135,7 +135,7 @@ private: SVX_DLLPRIVATE void MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow ); SVX_DLLPRIVATE void EditCell( const CellPos& rPos, vcl::Window* pWindow, const css::awt::MouseEvent* pMouseEvent = nullptr, sal_uInt16 nAction = 0 ); - SVX_DLLPRIVATE bool StopTextEdit(); + SVX_DLLPRIVATE void StopTextEdit(); SVX_DLLPRIVATE sal_uInt16 getKeyboardAction( const KeyEvent& rKEvt, vcl::Window* pWindow ); SVX_DLLPRIVATE bool executeAction( sal_uInt16 nAction, bool bSelect, vcl::Window* pWindow ); diff --git a/include/svx/sdrmasterpagedescriptor.hxx b/include/svx/sdrmasterpagedescriptor.hxx index a13cea3..2469e07 100644 --- a/include/svx/sdrmasterpagedescriptor.hxx +++ b/include/svx/sdrmasterpagedescriptor.hxx @@ -74,10 +74,6 @@ namespace sdr const SetOfByte& GetVisibleLayers() const { return maVisibleLayers; } void SetVisibleLayers(const SetOfByte& rNew); - // operators - bool operator==(const MasterPageDescriptor& rCandidate) const; - bool operator!=(const MasterPageDescriptor& rCandidate) const; - const SdrPageProperties* getCorrectSdrPageProperties() const; }; } // end of namespace sdr diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx index 3da98ac..104d9a1 100644 --- a/include/svx/svdedtv.hxx +++ b/include/svx/svdedtv.hxx @@ -194,9 +194,9 @@ public: void AddUndoActions( std::vector< SdrUndoAction* >& ); // Layermanagement with Undo. - SdrLayer* InsertNewLayer(const OUString& rName, sal_uInt16 nPos=0xFFFF); + void InsertNewLayer(const OUString& rName, sal_uInt16 nPos=0xFFFF); // Delete a layer including all objects contained - void DeleteLayer(const OUString& rName); + void DeleteLayer(const OUString& rName); // Marked objects which are outside a page // are assigned to an other page; at the moment without undo!!! diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx index 5fccc68..63b9152 100644 --- a/include/svx/svdedxv.hxx +++ b/include/svx/svdedxv.hxx @@ -247,7 +247,7 @@ public: // Has only effect, if the document has draw-objects with macrofunctionality (SdrObject::HasMacro()==sal_True). bool IsMacroMode() const { return bMacroMode; } bool BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin); - bool BegMacroObj(const Point& rPnt, SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin) { return BegMacroObj(rPnt,-2,pObj,pPV,pWin); } + void BegMacroObj(const Point& rPnt, SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin) { BegMacroObj(rPnt,-2,pObj,pPV,pWin); } void MovMacroObj(const Point& rPnt); void BrkMacroObj(); bool EndMacroObj(); @@ -265,7 +265,7 @@ public: static bool SupportsFormatPaintbrush( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier ); /** returns a format paint brush set from the current selection */ - bool TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& rFormatSet ); + void TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& rFormatSet ); /** applies a format paint brush set from the current selection. if bNoCharacterFormats is true, no character attributes are changed. diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx index 0cc1798..17f3f3d 100644 --- a/include/svx/svdetc.hxx +++ b/include/svx/svdetc.hxx @@ -149,13 +149,13 @@ public: void Init( sal_uIntPtr _nSumActionCount, sal_uIntPtr _nObjCount ); - bool SetNextObject(); + void SetNextObject(); void SetActionCount( sal_uIntPtr _nActionCount ); void SetInsertCount( sal_uIntPtr _nInsertCount ); bool ReportActions( sal_uIntPtr nActionCount ); - bool ReportInserts( sal_uIntPtr nInsertCount ); + void ReportInserts( sal_uIntPtr nInsertCount ); sal_uIntPtr GetSumCurAction() const { return nSumCurAction; }; sal_uIntPtr GetObjCount() const { return nObjCount; }; @@ -167,7 +167,7 @@ public: sal_uIntPtr GetInsertCount() const { return nInsertCount; }; sal_uIntPtr GetCurInsert() const { return nCurInsert; }; - bool ReportRescales( sal_uIntPtr nRescaleCount ); + void ReportRescales( sal_uIntPtr nRescaleCount ); }; diff --git a/include/svx/svdglue.hxx b/include/svx/svdglue.hxx index c880eab..cd543f6 100644 --- a/include/svx/svdglue.hxx +++ b/include/svx/svdglue.hxx @@ -79,7 +79,6 @@ public: SdrGluePoint(): nEscDir(SdrEscapeDirection::SMART),nId(0),nAlign(SdrAlign::NONE),bNoPercent(false),bReallyAbsolute(false),bUserDefined(true) {} SdrGluePoint(const Point& rNewPos, bool bNewPercent=true, SdrAlign nNewAlign = SdrAlign::HORZ_CENTER): aPos(rNewPos),nEscDir(SdrEscapeDirection::SMART),nId(0),nAlign(nNewAlign),bNoPercent(!bNewPercent),bReallyAbsolute(false),bUserDefined(true) {} bool operator==(const SdrGluePoint& rCmpGP) const { return aPos==rCmpGP.aPos && nEscDir==rCmpGP.nEscDir && nId==rCmpGP.nId && nAlign==rCmpGP.nAlign && bNoPercent==rCmpGP.bNoPercent && bReallyAbsolute==rCmpGP.bReallyAbsolute && bUserDefined==rCmpGP.bUserDefined; } - bool operator!=(const SdrGluePoint& rCmpGP) const { return !operator==(rCmpGP); } const Point& GetPos() const { return aPos; } void SetPos(const Point& rNewPos) { aPos=rNewPos; } SdrEscapeDirection GetEscDir() const { return nEscDir; } diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx index 50b9d7e..3b9fcf4 100644 --- a/include/svx/svdhdl.hxx +++ b/include/svx/svdhdl.hxx @@ -445,8 +445,6 @@ protected: private: SVX_DLLPRIVATE SdrHdlList(const SdrHdlList&): aList() {} SVX_DLLPRIVATE void operator=(const SdrHdlList&) {} - SVX_DLLPRIVATE bool operator==(const SdrHdlList&) const { return false; } - SVX_DLLPRIVATE bool operator!=(const SdrHdlList&) const { return false; } public: explicit SdrHdlList(SdrMarkView* pV); diff --git a/include/svx/svdlayer.hxx b/include/svx/svdlayer.hxx index d412c13..48df21b 100644 --- a/include/svx/svdlayer.hxx +++ b/include/svx/svdlayer.hxx @@ -70,7 +70,6 @@ class SVX_DLLPUBLIC SdrLayer public: bool operator==(const SdrLayer& rCmpLayer) const; - bool operator!=(const SdrLayer& rCmpLayer) const { return !operator==(rCmpLayer); } void SetName(const OUString& rNewName); const OUString& GetName() const { return maName; } @@ -114,7 +113,6 @@ public: ~SdrLayerAdmin(); const SdrLayerAdmin& operator=(const SdrLayerAdmin& rSrcLayerAdmin); bool operator==(const SdrLayerAdmin& rCmpLayerAdmin) const; - bool operator!=(const SdrLayerAdmin& rCmpLayerAdmin) const { return !operator==(rCmpLayerAdmin); } void SetParent(SdrLayerAdmin* pNewParent) { pParent=pNewParent; } void SetModel(SdrModel* pNewModel); void InsertLayer(SdrLayer* pLayer, sal_uInt16 nPos) @@ -135,7 +133,7 @@ public: SdrLayer* NewLayer(const OUString& rName, sal_uInt16 nPos=0xFFFF); // New layer, name is retrieved from the resource - SdrLayer* NewStandardLayer(sal_uInt16 nPos=0xFFFF); + void NewStandardLayer(sal_uInt16 nPos=0xFFFF); // Iterate over all layers sal_uInt16 GetLayerCount() const { return sal_uInt16(aLayer.size()); } diff --git a/include/svx/svdmark.hxx b/include/svx/svdmark.hxx index ff8510b..2bcd84e 100644 --- a/include/svx/svdmark.hxx +++ b/include/svx/svdmark.hxx @@ -65,10 +65,6 @@ public: SdrMark& operator=(const SdrMark& rMark); bool operator==(const SdrMark& rMark) const; - bool operator!=(const SdrMark& rMark) const - { - return !(operator==(rMark)); - } void SetMarkedSdrObj(SdrObject* pNewObj); SdrObject* GetMarkedSdrObj() const { return mpSelectedSdrObject;} @@ -170,7 +166,6 @@ protected: bool mbSorted; private: - SVX_DLLPRIVATE bool operator==(const SdrMarkList& rCmpMarkList) const; SVX_DLLPRIVATE void ImpForceSort(); private: diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index 4a246d9..86956c3 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -517,9 +517,9 @@ public: bool HasUndoActions() const; bool HasRedoActions() const; - bool Undo(); - bool Redo(); - bool Repeat(SfxRepeatTarget&); + void Undo(); + void Redo(); + void Repeat(SfxRepeatTarget&); // The application can set a handler here which collects the UndoActions einsammelt. // The handler has the following signature: diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx index 5e8d87b..df25580 100644 --- a/include/svx/svdmrkv.hxx +++ b/include/svx/svdmrkv.hxx @@ -252,7 +252,7 @@ public: OUString GetDescriptionOfMarkedObjects() const { return GetMarkedObjectList().GetMarkDescription(); } OUString GetDescriptionOfMarkedPoints() const { return GetMarkedObjectList().GetPointMarkDescription(); } OUString GetDescriptionOfMarkedGluePoints() const { return GetMarkedObjectList().GetGluePointMarkDescription(); } - bool GetBoundRectFromMarkedObjects(SdrPageView* pPageView, Rectangle& rRect) const { return GetMarkedObjectList().TakeBoundRect(pPageView, rRect); } + void GetBoundRectFromMarkedObjects(SdrPageView* pPageView, Rectangle& rRect) const { GetMarkedObjectList().TakeBoundRect(pPageView, rRect); } bool GetSnapRectFromMarkedObjects(SdrPageView* pPageView, Rectangle& rRect) const { return GetMarkedObjectList().TakeSnapRect(pPageView, rRect); } // Get a list of all those links which are connected to marked nodes, @@ -303,7 +303,7 @@ public: // Mark all objects within a rectangular area // Just objects are marked which are inclosed completely - bool MarkObj(const Rectangle& rRect, bool bUnmark=false); + void MarkObj(const Rectangle& rRect, bool bUnmark=false); void MarkObj(SdrObject* pObj, SdrPageView* pPV, bool bUnmark=false, bool bImpNoSetMarkHdl=false); void MarkAllObj(SdrPageView* pPV=nullptr); // pPage=NULL => all displayed pages void UnmarkAllObj(SdrPageView* pPV=nullptr); // pPage=NULL => all displayed pages @@ -333,7 +333,7 @@ public: bool MarkPointHelper(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark); // Mark all points within this rectangular alle Punkte (View coordinates) - bool MarkPoints(const Rectangle& rRect, bool bUnmark=false) { return MarkPoints(&rRect,bUnmark); } + void MarkPoints(const Rectangle& rRect, bool bUnmark=false) { MarkPoints(&rRect,bUnmark); } bool UnmarkPoint(SdrHdl& rHdl) { return MarkPoint(rHdl,true); } bool IsPointMarked(const SdrHdl& rHdl) const { ForceUndirtyMrkPnt(); return rHdl.IsSelected(); } bool MarkAllPoints() { return MarkPoints(nullptr,false); } @@ -384,7 +384,7 @@ public: // Pick: Supported options for nOptions are SEARCH_NEXT, SEARCH_BACKWARD bool PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16& rnId, SdrPageView*& rpPV, SdrSearchOptions nOptions=SdrSearchOptions::NONE) const; bool MarkGluePoint(const SdrObject* pObj, sal_uInt16 nId, const SdrPageView* pPV, bool bUnmark=false); - bool UnmarkGluePoint(const SdrObject* pObj, sal_uInt16 nId, const SdrPageView* pPV) { return MarkGluePoint(pObj,nId,pPV,true); } + void UnmarkGluePoint(const SdrObject* pObj, sal_uInt16 nId, const SdrPageView* pPV) { MarkGluePoint(pObj,nId,pPV,true); } bool IsGluePointMarked(const SdrObject* pObj, sal_uInt16 nId) const; // Get the Hdl (handle) of a marked GluePoint. Non-marked @@ -408,7 +408,7 @@ public: // bool BegMarkGluePoints(const Point& rPnt, OutputDevice* pOut); bool BegMarkGluePoints(const Point& rPnt, bool bUnmark = false); void MovMarkGluePoints(const Point& rPnt); - bool EndMarkGluePoints(); + void EndMarkGluePoints(); void BrkMarkGluePoints(); bool IsMarkGluePoints() const { return (nullptr != mpMarkGluePointsOverlay); } @@ -437,7 +437,7 @@ public: // objects may not be processed in the meantime (until the next // LeaveGroup()). With markings which overlaps pages, every page is processed // separately. The method returns sal_True, if at least one group was entered. - bool EnterMarkedGroup(); + void EnterMarkedGroup(); // Is set by DragView automatically when finishing a Crook-Drag. void SetLastCrookCenter(const Point& rPt) { maLastCrookCenter=rPt; } diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 5d83a8d..b75a37c 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -522,7 +522,7 @@ public: // Tooling for painting a single object to a OutputDevice. This will be needed as long // as not all painting is changed to use DrawContact objects. - bool SingleObjectPainter(OutputDevice& rOut) const; + void SingleObjectPainter(OutputDevice& rOut) const; bool LineGeometryUsageIsNecessary() const; // Returns a copy of the object. Every inherited class must reimplement this (in class Foo diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index c2e1435..5b9abe5 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -312,7 +312,7 @@ protected: virtual SdrObjGeoData* NewGeoData() const override; virtual void SaveGeoData(SdrObjGeoData& rGeo) const override; virtual void RestGeoData(const SdrObjGeoData& rGeo) override; - bool NbcSetEckenradius(long nRad); + void NbcSetEckenradius(long nRad); // #115391# new method for SdrObjCustomShape and SdrTextObj to correctly handle and set // SdrTextMinFrameWidthItem and SdrTextMinFrameHeightItem based on all settings, necessities diff --git a/include/svx/svdpagv.hxx b/include/svx/svdpagv.hxx index beaf794..7db3565 100644 --- a/include/svx/svdpagv.hxx +++ b/include/svx/svdpagv.hxx @@ -114,7 +114,7 @@ public: const SdrPageWindow* FindPatchedPageWindow( const OutputDevice& rOutDev ) const; private: - SVX_DLLPRIVATE SdrPageWindow& CreateNewPageWindowEntry(SdrPaintWindow& rPaintWindow); + SVX_DLLPRIVATE void CreateNewPageWindowEntry(SdrPaintWindow& rPaintWindow); void ImpInvalidateHelpLineArea(sal_uInt16 nNum) const; diff --git a/include/svx/svdsnpv.hxx b/include/svx/svdsnpv.hxx index 37e2755..61d14f6 100644 --- a/include/svx/svdsnpv.hxx +++ b/include/svx/svdsnpv.hxx @@ -182,9 +182,9 @@ public: bool IsMoveSnapOnlyTopLeft() const { return bMoveSnapOnlyTopLeft; } // #114409#-1 Migrate PageOrigin - bool BegSetPageOrg(const Point& rPnt); + void BegSetPageOrg(const Point& rPnt); void MovSetPageOrg(const Point& rPnt); - bool EndSetPageOrg(); + void EndSetPageOrg(); void BrkSetPageOrg(); bool IsSetPageOrg() const { return (nullptr != mpPageOriginOverlay); } @@ -195,7 +195,7 @@ public: // Move of an available auxiliary line. Use nHelpLineNum and pPV from PickHelpLine. bool BegDragHelpLine(sal_uInt16 nHelpLineNum, SdrPageView* pPV); // interactive insertion of a new auxiliary line - bool BegDragHelpLine(const Point& rPnt, SdrHelpLineKind eNewKind); + void BegDragHelpLine(const Point& rPnt, SdrHelpLineKind eNewKind); Pointer GetDraggedHelpLinePointer() const; // change the type of auxiliary line while dragging diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx index 5dd4f10..be0b4b5 100644 --- a/include/svx/unoshape.hxx +++ b/include/svx/unoshape.hxx @@ -580,7 +580,7 @@ public: bool createObject( const SvGlobalName &aClassName ); - bool createLink( const OUString& aLinkURL ); + void createLink( const OUString& aLinkURL ); // XInterface virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override; diff --git a/include/svx/xbitmap.hxx b/include/svx/xbitmap.hxx index 606339b..7f514d1 100644 --- a/include/svx/xbitmap.hxx +++ b/include/svx/xbitmap.hxx @@ -45,7 +45,6 @@ public: ~XOBitmap(); XOBitmap& operator=( const XOBitmap& rXOBitmap ); - bool operator==( const XOBitmap& rXOBitmap ) const; void Bitmap2Array(); void Array2Bitmap(); diff --git a/include/svx/xmleohlp.hxx b/include/svx/xmleohlp.hxx index 2879548..cc496a3 100644 --- a/include/svx/xmleohlp.hxx +++ b/include/svx/xmleohlp.hxx @@ -84,7 +84,7 @@ private: SVX_DLLPRIVATE css::uno::Reference < css::embed::XStorage > ImplGetContainerStorage( const OUString& rStorageName ); - SVX_DLLPRIVATE bool ImplReadObject( + SVX_DLLPRIVATE void ImplReadObject( const OUString& rContainerStorageName, OUString& rObjName, const SvGlobalName *pClassId, diff --git a/include/svx/xpoly.hxx b/include/svx/xpoly.hxx index 9d96d40..6dfb0af 100644 --- a/include/svx/xpoly.hxx +++ b/include/svx/xpoly.hxx @@ -88,7 +88,6 @@ public: Point& operator[]( sal_uInt16 nPos ); XPolygon& operator=( const XPolygon& rXPoly ); bool operator==( const XPolygon& rXPoly ) const; - bool operator!=( const XPolygon& rXPoly ) const; XPolyFlags GetFlags( sal_uInt16 nPos ) const; void SetFlags( sal_uInt16 nPos, XPolyFlags eFlags ); @@ -150,8 +149,6 @@ public: XPolygon& operator[]( sal_uInt16 nPos ); XPolyPolygon& operator=( const XPolyPolygon& rXPolyPoly ); - bool operator==( const XPolyPolygon& rXPolyPoly ) const; - bool operator!=( const XPolyPolygon& rXPolyPoly ) const; // transformations void Distort(const Rectangle& rRefRect, const XPolygon& rDistortedRect); diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 93b4e13..67f8800 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -248,14 +248,6 @@ OUString AccessibleShape::GetStyle() return ShapeTypeHandler::CreateAccessibleBaseName( mxShape ); } -bool AccessibleShape::operator== (const AccessibleShape& rShape) -{ - return this==&rShape; -} - - - - bool AccessibleShape::SetState (sal_Int16 aState) { bool bStateHasChanged = false; diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx index c6e2766..2c88a77 100644 --- a/svx/source/accessibility/ShapeTypeHandler.cxx +++ b/svx/source/accessibility/ShapeTypeHandler.cxx @@ -160,7 +160,7 @@ ShapeTypeHandler::~ShapeTypeHandler() -bool ShapeTypeHandler::AddShapeTypeList (int nDescriptorCount, +void ShapeTypeHandler::AddShapeTypeList (int nDescriptorCount, ShapeTypeDescriptor aDescriptorList[]) { SolarMutexGuard aGuard; @@ -186,8 +186,6 @@ bool ShapeTypeHandler::AddShapeTypeList (int nDescriptorCount, // Update inverse mapping from service name to the descriptor's position. maServiceNameToSlotId[aDescriptorList[i].msServiceName] = nFirstId+i; } - - return true; } diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index e65e60c..7fd344a 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -534,7 +534,7 @@ bool EnhancedCustomShape2d::ConvertSequenceToEnhancedCustomShape2dHandle( return bRetValue; } -const sal_Int32* EnhancedCustomShape2d::ApplyShapeAttributes( const SdrCustomShapeGeometryItem& rGeometryItem ) +void EnhancedCustomShape2d::ApplyShapeAttributes( const SdrCustomShapeGeometryItem& rGeometryItem ) { const sal_Int32* pDefData = nullptr; const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( eSpType ); @@ -621,8 +621,6 @@ const sal_Int32* EnhancedCustomShape2d::ApplyShapeAttributes( const SdrCustomSha pAny = ((SdrCustomShapeGeometryItem&)rGeometryItem).GetPropertyValueByName( "Handles" ); if ( pAny ) *pAny >>= seqHandles; - - return pDefData; } EnhancedCustomShape2d::~EnhancedCustomShape2d() @@ -954,11 +952,10 @@ Point EnhancedCustomShape2d::GetPoint( const css::drawing::EnhancedCustomShapePa return aRetValue; } -bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCustomShapeParameter& rParameter, +void EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCustomShapeParameter& rParameter, const bool bReplaceGeoWidth, const bool bReplaceGeoHeight ) const { rRetValue = 0.0; - bool bRetValue = false; switch ( rParameter.Type ) { case EnhancedCustomShapeParameterType::ADJUSTMENT : @@ -967,7 +964,6 @@ bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCusto if ( rParameter.Value >>= nAdjustmentIndex ) { rRetValue = GetAdjustValueAsDouble( nAdjustmentIndex ); - bRetValue = true; } } break; @@ -977,7 +973,6 @@ bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCusto if ( rParameter.Value >>= nEquationIndex ) { rRetValue = GetEquationValueAsDouble( nEquationIndex ); - bRetValue = true; } } break; @@ -989,7 +984,6 @@ bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCusto if ( rParameter.Value >>= fValue ) { rRetValue = fValue; - bRetValue = true; } } else @@ -998,7 +992,6 @@ bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCusto if ( rParameter.Value >>= nValue ) { rRetValue = nValue; - bRetValue = true; if ( bReplaceGeoWidth && ( nValue == nCoordWidth ) ) rRetValue *= fXRatio; else if ( bReplaceGeoHeight && ( nValue == nCoordHeight ) ) @@ -1010,29 +1003,24 @@ bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedCusto case EnhancedCustomShapeParameterType::LEFT : { rRetValue = 0.0; - bRetValue = true; } break; case EnhancedCustomShapeParameterType::TOP : { rRetValue = 0.0; - bRetValue = true; } break; case EnhancedCustomShapeParameterType::RIGHT : { rRetValue = nCoordWidth; - bRetValue = true; } break; case EnhancedCustomShapeParameterType::BOTTOM : { rRetValue = nCoordHeight; - bRetValue = true; } break; } - return bRetValue; } // nLumDat 28-31 = number of luminance entries in nLumDat diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 533c9f8..fdd7550 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -358,19 +358,19 @@ sal_Int32 SvxLanguageBoxBase::ImplInsertLanguage( const LanguageType nLangType, } -sal_Int32 SvxLanguageBoxBase::InsertDefaultLanguage( sal_Int16 nType, sal_Int32 nPos ) +void SvxLanguageBoxBase::InsertDefaultLanguage( sal_Int16 nType, sal_Int32 nPos ) { - return ImplInsertLanguage( LANGUAGE_SYSTEM, nPos, nType ); + ImplInsertLanguage( LANGUAGE_SYSTEM, nPos, nType ); } -sal_Int32 SvxLanguageBoxBase::InsertSystemLanguage( sal_Int32 nPos ) +void SvxLanguageBoxBase::InsertSystemLanguage( sal_Int32 nPos ) { - return ImplInsertLanguage( LANGUAGE_USER_SYSTEM_CONFIG, nPos, css::i18n::ScriptType::WEAK ); + ImplInsertLanguage( LANGUAGE_USER_SYSTEM_CONFIG, nPos, css::i18n::ScriptType::WEAK ); } -sal_Int32 SvxLanguageBoxBase::InsertLanguage( const LanguageType nLangType, +void SvxLanguageBoxBase::InsertLanguage( const LanguageType nLangType, bool bCheckEntry, sal_Int32 nPos ) { LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( nLangType); @@ -381,7 +381,7 @@ sal_Int32 SvxLanguageBoxBase::InsertLanguage( const LanguageType nLangType, { sal_Int32 nAt = ImplTypeToPos( nLang ); if ( nAt != LISTBOX_ENTRY_NOTFOUND ) - return nAt; + return; } OUString aStrEntry = SvtLanguageTable::GetLanguageString( nLang ); @@ -390,8 +390,6 @@ sal_Int32 SvxLanguageBoxBase::InsertLanguage( const LanguageType nLangType, sal_Int32 nAt = ImplInsertImgEntry( aStrEntry, nPos, bCheckEntry ); ImplSetEntryData( nAt, reinterpret_cast<void*>(nLang) ); - - return nAt; } diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index 519dced..1d35cfa 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -106,15 +106,12 @@ FmRecordCountListener::FmRecordCountListener(const Reference< css::sdbc::XResult } -Link<sal_Int32,void> FmRecordCountListener::SetPropChangeHandler(const Link<sal_Int32,void>& lnk) +void FmRecordCountListener::SetPropChangeHandler(const Link<sal_Int32,void>& lnk) { - Link<sal_Int32,void> lnkReturn = m_lnkWhoWantsToKnow; m_lnkWhoWantsToKnow = lnk; if (m_xListening.is()) NotifyCurrentCount(); - - return lnkReturn; } @@ -1131,12 +1128,12 @@ void FmSearchEngine::CancelSearch() } -bool FmSearchEngine::SwitchToContext(const Reference< css::sdbc::XResultSet > & xCursor, const OUString& sVisibleFields, const InterfaceArray& arrFields, +void FmSearchEngine::SwitchToContext(const Reference< css::sdbc::XResultSet > & xCursor, const OUString& sVisibleFields, const InterfaceArray& arrFields, sal_Int32 nFieldIndex) { DBG_ASSERT(!m_bSearchingCurrently, "FmSearchEngine::SwitchToContext : please do not call while I'm searching !"); if (m_bSearchingCurrently) - return false; + return; m_xSearchCursor = xCursor; m_xOriginalIterator = xCursor; @@ -1147,8 +1144,6 @@ bool FmSearchEngine::SwitchToContext(const Reference< css::sdbc::XResultSet > & Init(sVisibleFields); RebuildUsedFields(nFieldIndex, true); - - return true; } diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index a5ce139..389a982 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -524,10 +524,9 @@ bool Gallery::CreateTheme( const OUString& rThemeName ) return bRet; } -bool Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewName ) +void Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewName ) { GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rOldName ); - bool bRet = false; // check if the new theme name is already present if( pThemeEntry && !HasTheme( rNewName ) && !pThemeEntry->IsReadOnly() ) @@ -544,11 +543,8 @@ bool Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewName ) Broadcast( GalleryHint( GalleryHintType::THEME_RENAMED, aOldName, pThm->GetName() ) ); ReleaseTheme( pThm, aListener ); - bRet = true; } } - - return bRet; } bool Gallery::RemoveTheme( const OUString& rThemeName ) diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 142739b..591d8ad 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -336,18 +336,18 @@ sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLe return (sal_uInt16)0xFFFF; } -bool BulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) +void BulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) { if ( mLevel == (sal_uInt16)0xFFFF || mLevel == 0) - return false; + return; if ( GetNBOIndexForNumRule(aNum,mLevel) != (sal_uInt16)0xFFFF ) - return false; + return; sal_uInt16 nActLv = IsSingleLevel(mLevel); if ( nActLv == (sal_uInt16)0xFFFF ) - return false; + return; SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); sal_Unicode cChar = aFmt.GetBulletChar(); @@ -372,7 +372,7 @@ bool BulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI }*/ //nLength = sizeof(pActualBullets)/sizeof(BulletsSettings_Impl); if ( nIndex >= DEFAULT_BULLET_TYPES ) - return false; + return; pActualBullets[nIndex]->cBulletChar = cChar; if ( pFont ) @@ -384,11 +384,9 @@ bool BulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI OUString sNUM = OUString::number( nIndex + 1 ); aStrFromRES = aStrFromRES.replaceFirst(aReplace,sNUM); pActualBullets[nIndex]->sDescription = aStrFromRES; - - return true; } -bool BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool /*isDefault*/, bool isResetSize) +void BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool /*isDefault*/, bool isResetSize) { //if ( mLevel == (sal_uInt16)0xFFFF ) // return sal_False; @@ -414,7 +412,7 @@ bool BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 }*/ //nLength = sizeof(pActualBullets)/sizeof(BulletsSettings_Impl); if ( nIndex >= DEFAULT_BULLET_TYPES ) - return false; + return; cChar = pActualBullets[nIndex]->cBulletChar; //vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); vcl::Font rActBulletFont = pActualBullets[nIndex]->aFont; @@ -437,8 +435,6 @@ bool BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 } nMask <<= 1; } - - return true; } OUString BulletsTypeMgr::GetDescription(sal_uInt16 nIndex, bool /*isDefault*/) @@ -615,20 +611,20 @@ sal_uInt16 GraphyicBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uI return (sal_uInt16)0xFFFF; } -bool GraphyicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) +void GraphyicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) { if ( mLevel == (sal_uInt16)0xFFFF || mLevel > aNum.GetLevelCount() || mLevel == 0) - return false; + return; if ( GetNBOIndexForNumRule(aNum,mLevel) != (sal_uInt16)0xFFFF ) - return false; + return; if ( nIndex >= aGrfDataLst.size() ) - return false; + return; sal_uInt16 nActLv = IsSingleLevel(mLevel); if ( nActLv == (sal_uInt16)0xFFFF ) - return false; + return; SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); const SvxBrushItem* pBrsh = aFmt.GetBrush(); @@ -636,7 +632,7 @@ bool GraphyicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex if ( pBrsh ) pGrf = pBrsh->GetGraphic(); else - return false; + return; if ( pGrf ) { @@ -652,21 +648,16 @@ bool GraphyicBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex OUString sNUM = OUString::number( nIndex + 1 ); aStrFromRES = aStrFromRES.replaceFirst("%LIST_NUM",sNUM); pEntry->sDescription = aStrFromRES; - }else - { - return false; } - - return true; } -bool GraphyicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool /*isDefault*/, bool /*isResetSize*/) +void GraphyicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool /*isDefault*/, bool /*isResetSize*/) { //if ( mLevel == (sal_uInt16)0xFFFF ) // return sal_False; if ( nIndex >= aGrfDataLst.size() ) - return false; + return; OUString sGrfName; GrfBulDataRelation* pEntry = aGrfDataLst[nIndex]; @@ -701,8 +692,6 @@ bool GraphyicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, s } nMask <<= 1 ; } - - return true; } OUString GraphyicBulletsTypeMgr::GetDescription(sal_uInt16 nIndex, bool /*isDefault*/) @@ -989,10 +978,10 @@ sal_uInt16 MixBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 return (sal_uInt16)0xFFFF; } -bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel) +void MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel) { if ( mLevel == (sal_uInt16)0xFFFF || mLevel == 0 || nIndex>=DEFAULT_BULLET_TYPES) - return false; + return; //if ( GetNBOIndexForNumRule(aNum,mLevel) != (sal_uInt16)0xFFFF ) // return sal_False; @@ -1000,7 +989,7 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u sal_uInt16 nActLv = IsSingleLevel(mLevel); if ( nActLv == (sal_uInt16)0xFFFF ) - return false; + return; SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); sal_Int16 eNumType = aFmt.GetNumberingType(); @@ -1024,7 +1013,7 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u if ( pBrsh ) pGrf = pBrsh->GetGraphic(); else - return false; + return; OUString sEmpty; if ( pGrf ) @@ -1050,7 +1039,7 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u pEntry->bIsCustomized = true; }else { - return false; + return; } }else { @@ -1079,7 +1068,7 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u if ( pBrsh ) pGrf = pBrsh->GetGraphic(); else - return false; + return; OUString aGrfName; if ( pGrf ) @@ -1127,14 +1116,13 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u } } ImplStore("standard.sya"); - return true; } -bool MixBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault, bool isResetSize) +void MixBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault, bool isResetSize) { //if ( mLevel == (sal_uInt16)0xFFFF || nIndex>=DEFAULT_BULLET_TYPES ) if ( nIndex>=DEFAULT_BULLET_TYPES ) - return false; + return; MixBulletsSettings_Impl* pCurrentBullets = pActualBullets[nIndex]; if (isDefault) pCurrentBullets=pDefaultActualBullets[nIndex]; @@ -1221,8 +1209,6 @@ bool MixBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI nMask <<= 1 ; } } - - return true; } OUString MixBulletsTypeMgr::GetDescription(sal_uInt16 nIndex, bool isDefault) @@ -1353,27 +1339,19 @@ sal_uInt16 NumberingTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 m return (sal_uInt16)0xFFFF; } -bool NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) +void NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) { - //if ( mLevel == (sal_uInt16)0xFFFF || mLevel == 0) - // return sal_False; - - //if ( GetNBOIndexForNumRule(aNum,mLevel) != (sal_uInt16)0xFFFF ) - // return sal_False; - sal_uInt16 nActLv = IsSingleLevel(mLevel); if ( nActLv == (sal_uInt16)0xFFFF ) - return false; + return; SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); - //sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix())[0]; - //sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix())[0]; sal_Int16 eNumType = aFmt.GetNumberingType(); sal_uInt16 nCount = pNumberSettingsArr->size(); if ( nIndex >= nCount ) - return false; + return; NumberSettings_Impl* _pSet = (*pNumberSettingsArr)[nIndex].get(); @@ -1396,17 +1374,12 @@ bool NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_ _pSet->sDescription = GetDescription(nIndex,true); } ImplStore("standard.syb"); - return true; } -bool NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault, bool isResetSize) +void NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel, bool isDefault, bool isResetSize) { - //if ( mLevel == (sal_uInt16)0xFFFF ) - // return sal_False; - - //DBG_ASSERT(pNumSettingsArr->Count() > nIndex, "wrong index"); if(pNumberSettingsArr->size() <= nIndex) - return false; + return; NumberSettingsArr_Impl* pCurrentNumberSettingsArr=pNumberSettingsArr; if (isDefault) pCurrentNumberSettingsArr=pDefaultNumberSettingsArr; NumberSettings_Impl* _pSet = (*pCurrentNumberSettingsArr)[nIndex].get(); @@ -1430,8 +1403,6 @@ bool NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uIn } nMask <<= 1 ; } - - return true; } OUString NumberingTypeMgr::GetDescription(sal_uInt16 nIndex, bool isDefault) @@ -1618,14 +1589,11 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m return (sal_uInt16)0xFFFF; } -bool OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) +void OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 mLevel) { - //if ( mLevel == 0 || mLevel == (sal_uInt16)0xFFFF ) - // return sal_False; - sal_uInt16 nLength = sizeof(pOutlineSettingsArrs)/sizeof(OutlineSettings_Impl*); if ( nIndex >= nLength ) - return false; + return; OutlineSettings_Impl* pItemArr = pOutlineSettingsArrs[nIndex]; sal_uInt16 nCount = pItemArr->pNumSettingsArr->size(); @@ -1686,17 +1654,13 @@ bool OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI pItemArr->sDescription = GetDescription(nIndex,true); } ImplStore("standard.syc"); - return true; } -bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 /*mLevel*/, bool isDefault, bool isResetSize) +void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt16 /*mLevel*/, bool isDefault, bool isResetSize) { - //if ( mLevel == (sal_uInt16)0xFFFF ) - // return sal_False; - DBG_ASSERT(DEFAULT_NUM_VALUSET_COUNT > nIndex, "wrong index"); if(DEFAULT_NUM_VALUSET_COUNT <= nIndex) - return false; + return; const FontList* pList = nullptr; @@ -1803,8 +1767,6 @@ bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 aFmt.SetSuffix(pLevelSettings->sSuffix); aNum.SetLevel(i, aFmt); } - - return true; } OUString OutlineTypeMgr::GetDescription(sal_uInt16 nIndex, bool isDefault) diff --git a/svx/source/svdraw/sdrmasterpagedescriptor.cxx b/svx/source/svdraw/sdrmasterpagedescriptor.cxx index 22f50a5..2d9a80f 100644 --- a/svx/source/svdraw/sdrmasterpagedescriptor.cxx +++ b/svx/source/svdraw/sdrmasterpagedescriptor.cxx @@ -87,20 +87,6 @@ namespace sdr } } - // operators - bool MasterPageDescriptor::operator==(const MasterPageDescriptor& rCandidate) const - { - return (&maOwnerPage == &rCandidate.maOwnerPage - && &maUsedPage == &rCandidate.maUsedPage - && maVisibleLayers == rCandidate.maVisibleLayers); - } - - bool MasterPageDescriptor::operator!=(const MasterPageDescriptor& rCandidate) const - { - return (&maOwnerPage != &rCandidate.maOwnerPage - || &maUsedPage != &rCandidate.maUsedPage - || maVisibleLayers != rCandidate.maVisibleLayers); - } const SdrPageProperties* MasterPageDescriptor::getCorrectSdrPageProperties() const { diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index c2d705c..ab122e9 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -104,18 +104,17 @@ SdrEditView::~SdrEditView() -SdrLayer* SdrEditView::InsertNewLayer(const OUString& rName, sal_uInt16 nPos) +void SdrEditView::InsertNewLayer(const OUString& rName, sal_uInt16 nPos) { SdrLayerAdmin& rLA=mpModel->GetLayerAdmin(); sal_uInt16 nMax=rLA.GetLayerCount(); if (nPos>nMax) nPos=nMax; - SdrLayer* pNewLayer=rLA.NewLayer(rName,nPos); + rLA.NewLayer(rName,nPos); if( GetModel()->IsUndoEnabled() ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewLayer(nPos,rLA,*mpModel)); mpModel->SetChanged(); - return pNewLayer; } #include <svx/svdogrp.hxx> diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index af307c4..9c9b244 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2110,10 +2110,10 @@ static const sal_uInt16* GetFormatRangeImpl( bool bTextOnly ) return &gRanges[ bTextOnly ? 10 : 0]; } -bool SdrObjEditView::TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& rFormatSet ) +void SdrObjEditView::TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& rFormatSet ) { if( mxSelectionController.is() && mxSelectionController->TakeFormatPaintBrush(rFormatSet) ) - return true; + return; const SdrMarkList& rMarkList = GetMarkedObjectList(); if( rMarkList.GetMarkCount() > 0 ) @@ -2130,10 +2130,7 @@ bool SdrObjEditView::TakeFormatPaintBrush( std::shared_ptr< SfxItemSet >& rForma const bool bOnlyHardAttr = false; rFormatSet->Put( GetAttrFromMarked(bOnlyHardAttr) ); } - return true; } - - return false; } static SfxItemSet CreatePaintSet( const sal_uInt16 *pRanges, SfxItemPool& rPool, const SfxItemSet& rSourceSet, const SfxItemSet& rTargetSet, bool bNoCharacterFormats, bool bNoParagraphFormats ) diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 1912588..437e674 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -583,18 +583,18 @@ bool SvdProgressInfo::ReportActions( sal_uIntPtr nAnzActions ) return maLink.Call(nullptr); } -bool SvdProgressInfo::ReportInserts( sal_uIntPtr nAnzInserts ) +void SvdProgressInfo::ReportInserts( sal_uIntPtr nAnzInserts ) { nSumCurAction += nAnzInserts; nCurInsert += nAnzInserts; - return maLink.Call(nullptr); + maLink.Call(nullptr); } -bool SvdProgressInfo::ReportRescales( sal_uIntPtr nAnzRescales ) +void SvdProgressInfo::ReportRescales( sal_uIntPtr nAnzRescales ) { nSumCurAction += nAnzRescales; - return maLink.Call(nullptr); + maLink.Call(nullptr); } void SvdProgressInfo::SetActionCount( sal_uIntPtr _nActionCount ) @@ -607,7 +607,7 @@ void SvdProgressInfo::SetInsertCount( sal_uIntPtr _nInsertCount ) nInsertCount = _nInsertCount; } -bool SvdProgressInfo::SetNextObject() +void SvdProgressInfo::SetNextObject() { nActionCount = 0; nCurAction = 0; @@ -616,7 +616,7 @@ bool SvdProgressInfo::SetNextObject() nCurInsert = 0; nCurObj++; - return ReportActions(0); + ReportActions(0); } // #i101872# isolate GetTextEditBackgroundColor to tooling; it will anyways only be used as long diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx index 644b449..7a7ae77 100644 --- a/svx/source/svdraw/svdlayer.cxx +++ b/svx/source/svdraw/svdlayer.cxx @@ -239,7 +239,7 @@ SdrLayer* SdrLayerAdmin::NewLayer(const OUString& rName, sal_uInt16 nPos) return pLay; } -SdrLayer* SdrLayerAdmin::NewStandardLayer(sal_uInt16 nPos) +void SdrLayerAdmin::NewStandardLayer(sal_uInt16 nPos) { SdrLayerID nID=GetUniqueLayerID(); SdrLayer* pLay=new SdrLayer(nID,OUString()); @@ -250,7 +250,6 @@ SdrLayer* SdrLayerAdmin::NewStandardLayer(sal_uInt16 nPos) else aLayer.insert(aLayer.begin() + nPos, pLay); Broadcast(); - return pLay; } sal_uInt16 SdrLayerAdmin::GetLayerPos(SdrLayer* pLayer) const diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index a500958..85a5c54 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -380,9 +380,8 @@ bool SdrModel::HasRedoActions() const return pRedoStack && !pRedoStack->empty(); } -bool SdrModel::Undo() +void SdrModel::Undo() { - bool bRet = false; if( mpImpl->mpUndoManager ) { OSL_FAIL("svx::SdrModel::Undo(), method not supported with application undo manager!"); @@ -403,12 +402,10 @@ bool SdrModel::Undo() mbUndoEnabled = bWasUndoEnabled; } } ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
