diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-09 12:14:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-09 13:52:30 +0200 |
commit | 12191a4f30078bb81c39a74a994ba7b2b410adaf (patch) | |
tree | 394626ae75e6b77e4159657847f894e4f7c9495b | |
parent | 3a9854a92923df8013ca832c48aa9f284bcb1adc (diff) |
make loplugin constantparam smarter about string params
Change-Id: Id3df69b38fd35f46735246a6d307a89aa10d4294
Reviewed-on: https://gerrit.libreoffice.org/37426
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
56 files changed, 117 insertions, 146 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index ac8bf7f56d87..c3e0a63c2668 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -425,9 +425,9 @@ SbxBase* SbiFactory::Create( sal_uInt16 nSbxId, sal_uInt32 nCreator ) case SBXID_BASICMETHOD: return new SbMethod( "", SbxVARIANT, nullptr ); case SBXID_JSCRIPTMOD: - return new SbJScriptModule( "" ); + return new SbJScriptModule; case SBXID_JSCRIPTMETH: - return new SbJScriptMethod( "", SbxVARIANT ); + return new SbJScriptMethod( SbxVARIANT ); } } return nullptr; diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 50b435c7c80a..aca923d8c7d5 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1913,8 +1913,8 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH // Implementation SbJScriptModule (Basic module for JavaScript source code) -SbJScriptModule::SbJScriptModule( const OUString& rName ) - :SbModule( rName ) +SbJScriptModule::SbJScriptModule() + :SbModule( "" ) { } @@ -2135,8 +2135,8 @@ void SbMethod::Broadcast( SfxHintId nHintId ) // Implementation of SbJScriptMethod (method class as a wrapper for JavaScript-functions) -SbJScriptMethod::SbJScriptMethod( const OUString& r, SbxDataType t ) - : SbMethod( r, t, nullptr ) +SbJScriptMethod::SbJScriptMethod( SbxDataType t ) + : SbMethod( "", t, nullptr ) { } diff --git a/basic/source/inc/sbjsmeth.hxx b/basic/source/inc/sbjsmeth.hxx index 3403b392986d..2e4abc509bed 100644 --- a/basic/source/inc/sbjsmeth.hxx +++ b/basic/source/inc/sbjsmeth.hxx @@ -30,7 +30,7 @@ class SbJScriptMethod : public SbMethod { public: - SbJScriptMethod( const OUString&, SbxDataType ); + SbJScriptMethod( SbxDataType ); virtual ~SbJScriptMethod() override; SBX_DECL_PERSIST_NODATA(SBXID_JSCRIPTMETH,2); diff --git a/basic/source/inc/sbjsmod.hxx b/basic/source/inc/sbjsmod.hxx index a29d5704d469..9d2d7d8f4194 100644 --- a/basic/source/inc/sbjsmod.hxx +++ b/basic/source/inc/sbjsmod.hxx @@ -32,7 +32,7 @@ class SbJScriptModule : public SbModule virtual bool StoreData( SvStream& ) const override; public: SBX_DECL_PERSIST_NODATA(SBXID_JSCRIPTMOD,1); - SbJScriptModule( const OUString& ); // hand through + SbJScriptModule(); // hand through }; #endif diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx index 060b09101152..b165f3a8371d 100644 --- a/basic/source/sbx/sbxbase.cxx +++ b/basic/source/sbx/sbxbase.cxx @@ -157,7 +157,7 @@ SbxBase* SbxBase::Create( sal_uInt16 nSbxId, sal_uInt32 nCreator ) case SBXID_OBJECT: return new SbxObject( "" ); case SBXID_COLLECTION: return new SbxCollection( "" ); case SBXID_FIXCOLLECTION: - return new SbxStdCollection( "", "" ); + return new SbxStdCollection; case SBXID_METHOD: return new SbxMethod( "", SbxEMPTY ); case SBXID_PROPERTY: return new SbxProperty( "", SbxEMPTY ); } diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx index 3fa3b690d19b..a624d0241cf7 100644 --- a/basic/source/sbx/sbxcoll.cxx +++ b/basic/source/sbx/sbxcoll.cxx @@ -237,9 +237,8 @@ bool SbxCollection::LoadData( SvStream& rStrm, sal_uInt16 nVer ) } -SbxStdCollection::SbxStdCollection - ( const OUString& rClass, const OUString& rElem ) - : SbxCollection( rClass ), aElemClass( rElem ), +SbxStdCollection::SbxStdCollection() + : SbxCollection( "" ), bAddRemoveOk( true ) {} diff --git a/compilerplugins/clang/constantparam.cxx b/compilerplugins/clang/constantparam.cxx index 3f22324c60c2..b2d2ebd67395 100644 --- a/compilerplugins/clang/constantparam.cxx +++ b/compilerplugins/clang/constantparam.cxx @@ -14,6 +14,7 @@ #include "plugin.hxx" #include "compat.hxx" +#include "check.hxx" /* Find params on methods where the param is only ever passed as a single constant value. @@ -59,6 +60,14 @@ public: virtual void run() override { + // ignore some files that make clang crash inside EvaluateAsInt + std::string fn( compiler.getSourceManager().getFileEntryForID( + compiler.getSourceManager().getMainFileID())->getName() ); + normalizeDotDotInFilePath(fn); + if (fn == SRCDIR "/basegfx/source/matrix/b2dhommatrix.cxx" + || fn == SRCDIR "/basegfx/source/matrix/b3dhommatrix.cxx") + return; + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); // dump all our output in one write call - this is to try and limit IO "crosstalk" between multiple processes @@ -169,10 +178,19 @@ std::string ConstantParam::getCallValue(const Expr* arg) if (isa<MaterializeTemporaryExpr>(arg)) { const CXXBindTemporaryExpr* strippedArg = dyn_cast_or_null<CXXBindTemporaryExpr>(arg->IgnoreParenCasts()); - if (strippedArg && isa<CXXTemporaryObjectExpr>(strippedArg->getSubExpr()) - && dyn_cast<CXXTemporaryObjectExpr>(strippedArg->getSubExpr())->getNumArgs() == 0) + if (strippedArg) { - return "defaultConstruct"; + auto temp = dyn_cast<CXXTemporaryObjectExpr>(strippedArg->getSubExpr()); + if (temp->getNumArgs() == 0) + { + if (loplugin::TypeCheck(temp->getType()).Class("OUString").Namespace("rtl").GlobalNamespace()) { + return "\"\""; + } + if (loplugin::TypeCheck(temp->getType()).Class("OString").Namespace("rtl").GlobalNamespace()) { + return "\"\""; + } + return "defaultConstruct"; + } } } @@ -192,6 +210,14 @@ std::string ConstantParam::getCallValue(const Expr* arg) std::replace( s.begin(), s.end(), '\r', ' '); std::replace( s.begin(), s.end(), '\n', ' '); std::replace( s.begin(), s.end(), '\t', ' '); + + // now normalize the value. For some params, like OUString, we can pass it as OUString() or "" and they are the same thing + if (s == "OUString()") + s = "\"\""; + else if (s == "OString()") + s = "\"\""; + else if (s == "aEmptyOUStr") + s = "\"\""; return s; } diff --git a/compilerplugins/clang/constantparam.py b/compilerplugins/clang/constantparam.py index fd299d85405b..99ef69c8816a 100755 --- a/compilerplugins/clang/constantparam.py +++ b/compilerplugins/clang/constantparam.py @@ -38,7 +38,7 @@ def RepresentsInt(s): except ValueError: return False -consRegex = re.compile("^\w+\(\)$") +constructor_regex = re.compile("^\w+\(\)$") tmp1list = list() tmp2list = list() @@ -72,7 +72,7 @@ for callInfo, callValues in callDict.iteritems(): else: tmp2list.append((sourceLoc, functionSig, callInfo[3] + " " + callInfo[2], callValue)) # look for places where the callsite is always a constructor invocation - elif consRegex.match(callValue): + elif constructor_regex.match(callValue) or callValue == "\"\"": if callValue.startswith("Get"): continue if callValue.startswith("get"): continue if "operator=" in functionSig: continue diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 5dd81df801b4..a3949f974372 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -388,7 +388,6 @@ void SAL_CALL OApplicationController::disposing() aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ), aFilter, getStrippedDatabaseName(), - OUString(), boost::none); // add to recent document list diff --git a/dbaccess/source/ui/inc/TableConnectionData.hxx b/dbaccess/source/ui/inc/TableConnectionData.hxx index 9a4484c2222c..52b2792f6fe4 100644 --- a/dbaccess/source/ui/inc/TableConnectionData.hxx +++ b/dbaccess/source/ui/inc/TableConnectionData.hxx @@ -51,8 +51,7 @@ namespace dbaui public: OTableConnectionData(); OTableConnectionData( const TTableWindowData::value_type& _pReferencingTable, - const TTableWindowData::value_type& _pReferencedTable, - const OUString& rConnName = OUString() ); + const TTableWindowData::value_type& _pReferencedTable ); OTableConnectionData( const OTableConnectionData& rConnData ); virtual ~OTableConnectionData(); diff --git a/dbaccess/source/ui/inc/TokenWriter.hxx b/dbaccess/source/ui/inc/TokenWriter.hxx index 0a8320a9b1d9..ceca8068ae8c 100644 --- a/dbaccess/source/ui/inc/TokenWriter.hxx +++ b/dbaccess/source/ui/inc/TokenWriter.hxx @@ -86,8 +86,7 @@ namespace dbaui // export data ODatabaseImportExport( const svx::ODataAccessDescriptor& _aDataDescriptor, const css::uno::Reference< css::uno::XComponentContext >& _rM, - const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF, - const OUString& rExchange = OUString()); + const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF); // import data ODatabaseImportExport( const SharedConnection& _rxConnection, @@ -127,7 +126,7 @@ namespace dbaui ORTFImportExport( const svx::ODataAccessDescriptor& _aDataDescriptor, const css::uno::Reference< css::uno::XComponentContext >& _rM, const css::uno::Reference< css::util::XNumberFormatter >& _rxNumberF) - : ODatabaseImportExport(_aDataDescriptor,_rM,_rxNumberF,OUString()) {}; + : ODatabaseImportExport(_aDataDescriptor,_rM,_rxNumberF) {}; // import data ORTFImportExport( const SharedConnection& _rxConnection, diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx index e178dea9416c..06beb6157fd7 100644 --- a/dbaccess/source/ui/misc/RowSetDrop.cxx +++ b/dbaccess/source/ui/misc/RowSetDrop.cxx @@ -43,7 +43,7 @@ ORowSetImportExport::ORowSetImportExport( vcl::Window* _pParent, const svx::ODataAccessDescriptor& _aDataDescriptor, const Reference< XComponentContext >& _rM ) - : ODatabaseImportExport(_aDataDescriptor,_rM,nullptr,OUString()) + : ODatabaseImportExport(_aDataDescriptor,_rM,nullptr) ,m_xTargetResultSetUpdate(_xResultSetUpdate) ,m_xTargetRowUpdate(_xResultSetUpdate,UNO_QUERY) ,m_pParent(_pParent) diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 982d2bad9800..b3c390171ec3 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -74,13 +74,11 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::util; -#define SBA_FORMAT_SELECTION_COUNT 4 #define CELL_X 1437 ODatabaseImportExport::ODatabaseImportExport(const svx::ODataAccessDescriptor& _aDataDescriptor, const Reference< XComponentContext >& _rM, - const Reference< css::util::XNumberFormatter >& _rxNumberF, - const OUString& rExchange) + const Reference< css::util::XNumberFormatter >& _rxNumberF) :m_bBookmarkSelection( false ) ,m_xFormatter(_rxNumberF) ,m_xContext(_rM) @@ -95,14 +93,6 @@ ODatabaseImportExport::ODatabaseImportExport(const svx::ODataAccessDescriptor& _ osl_atomic_increment( &m_refCount ); impl_initFromDescriptor( _aDataDescriptor, false ); - - sal_Int32 nCount = comphelper::string::getTokenCount(rExchange, char(11)); - if( nCount > SBA_FORMAT_SELECTION_COUNT && !rExchange.getToken(4, ';').isEmpty()) - { - m_pRowMarker = new sal_Int32[nCount-SBA_FORMAT_SELECTION_COUNT]; - for(sal_Int32 i=SBA_FORMAT_SELECTION_COUNT; i<nCount; ++i) - m_pRowMarker[i-SBA_FORMAT_SELECTION_COUNT] = rExchange.getToken(i,char(11)).toInt32(); - } osl_atomic_decrement( &m_refCount ); } @@ -626,7 +616,7 @@ const char OHTMLImportExport::sIndentSource[nIndentMax+1] = "\t\t\t\t\t\t\t\t\t\ OHTMLImportExport::OHTMLImportExport(const svx::ODataAccessDescriptor& _aDataDescriptor, const Reference< XComponentContext >& _rM, const Reference< css::util::XNumberFormatter >& _rxNumberF) - : ODatabaseImportExport(_aDataDescriptor,_rM,_rxNumberF,OUString()) + : ODatabaseImportExport(_aDataDescriptor,_rM,_rxNumberF) ,m_nIndent(0) #if OSL_DEBUG_LEVEL > 0 ,m_bCheckFont(false) diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx index 7f5fb4c59ed1..bfecb4906cde 100644 --- a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx @@ -48,7 +48,7 @@ OQueryTableConnectionData::OQueryTableConnectionData( const OQueryTableConnectio OQueryTableConnectionData::OQueryTableConnectionData(const TTableWindowData::value_type& _pReferencingTable, const TTableWindowData::value_type& _pReferencedTable) - : OTableConnectionData( _pReferencingTable,_pReferencedTable, OUString() ) + : OTableConnectionData( _pReferencingTable,_pReferencedTable ) , m_nFromEntryIndex(0) , m_nDestEntryIndex(0) , m_eJoinType (INNER_JOIN) diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx index 161945620a00..22fff0de020f 100644 --- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx @@ -29,11 +29,9 @@ OTableConnectionData::OTableConnectionData() } OTableConnectionData::OTableConnectionData(const TTableWindowData::value_type& _pReferencingTable - ,const TTableWindowData::value_type& _pReferencedTable - ,const OUString& rConnName ) + ,const TTableWindowData::value_type& _pReferencedTable ) :m_pReferencingTable(_pReferencingTable) ,m_pReferencedTable(_pReferencedTable) - ,m_aConnName( rConnName ) { Init(); } diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index c1ebe72c3212..f44d432db3ae 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -539,12 +539,12 @@ void EditView::Redo() pImpEditView->pEditEngine->Redo( this ); } -sal_uInt32 EditView::Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs ) +sal_uInt32 EditView::Read( SvStream& rInput, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs ) { EditSelection aOldSel( pImpEditView->GetEditSelection() ); pImpEditView->DrawSelection(); pImpEditView->pEditEngine->pImpEditEngine->UndoActionStart( EDITUNDO_READ ); - EditPaM aEndPaM = pImpEditView->pEditEngine->pImpEditEngine->Read( rInput, rBaseURL, eFormat, aOldSel, pHTTPHeaderAttrs ); + EditPaM aEndPaM = pImpEditView->pEditEngine->pImpEditEngine->Read( rInput, "", eFormat, aOldSel, pHTTPHeaderAttrs ); pImpEditView->pEditEngine->pImpEditEngine->UndoActionEnd(); EditSelection aNewSel( aEndPaM, aEndPaM ); diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index bfd8b329f4b4..8f77e901b0cc 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -1384,7 +1384,7 @@ sal_uLong OutlinerView::Read( SvStream& rInput, EETextFormat eFormat, SvKeyValue ESelection aOldSel = pEditView->GetSelection(); aOldSel.Adjust(); - sal_uLong nRet = pEditView->Read( rInput, OUString(), eFormat, pHTTPHeaderAttrs ); + sal_uLong nRet = pEditView->Read( rInput, eFormat, pHTTPHeaderAttrs ); long nParaDiff = pEditView->GetEditEngine()->GetParagraphCount() - nOldParaCount; sal_Int32 nChangesStart = aOldSel.nStartPara; diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx index debfa2e535ea..6b2890688710 100644 --- a/include/basic/sbx.hxx +++ b/include/basic/sbx.hxx @@ -242,7 +242,7 @@ protected: virtual void CollRemove( SbxArray* pPar ) override; public: SBX_DECL_PERSIST_NODATA(SBXID_FIXCOLLECTION,1); - SbxStdCollection( const OUString& rClassname, const OUString& rElemClass ); + SbxStdCollection(); SbxStdCollection( const SbxStdCollection& ); SbxStdCollection& operator=( const SbxStdCollection& ); virtual void Insert( SbxVariable* ) override; diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index 3ff03cc7097b..a5768897a3e9 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -188,7 +188,7 @@ public: void RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich ); void RemoveAttribsKeepLanguages( bool bRemoveParaAttribs ); - sal_uInt32 Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs ); + sal_uInt32 Read( SvStream& rInput, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs ); void SetBackgroundColor( const Color& rColor ); Color GetBackgroundColor() const; diff --git a/include/svtools/imap.hxx b/include/svtools/imap.hxx index e54bb3193ccb..871cf940ace0 100644 --- a/include/svtools/imap.hxx +++ b/include/svtools/imap.hxx @@ -111,8 +111,8 @@ public: void Write ( SvStream& rOStm, const OUString& rBaseURL ) const; void Read( SvStream& rIStm, const OUString& rBaseURL ); - void Write( SvStream& rOStm, sal_uLong nFormat, const OUString& rBaseURL ) const; - sal_uLong Read( SvStream& rIStm, sal_uLong nFormat, const OUString& rBaseURL ); + void Write( SvStream& rOStm, sal_uLong nFormat ) const; + sal_uLong Read( SvStream& rIStm, sal_uLong nFormat ); }; class IMapCompat diff --git a/include/svtools/inetimg.hxx b/include/svtools/inetimg.hxx index e257fc55f69d..1acee86b5d95 100644 --- a/include/svtools/inetimg.hxx +++ b/include/svtools/inetimg.hxx @@ -31,19 +31,16 @@ class INetImage OUString aImageURL; OUString aTargetURL; OUString aTargetFrame; - OUString aAlternateText; Size aSizePixel; public: INetImage( const OUString& rImageURL, const OUString& rTargetURL, - const OUString& rTargetFrame, - const OUString& rAlternateText ) + const OUString& rTargetFrame ) : aImageURL( rImageURL ), aTargetURL( rTargetURL ), - aTargetFrame( rTargetFrame ), - aAlternateText( rAlternateText ) + aTargetFrame( rTargetFrame ) {} INetImage() {} diff --git a/include/unotools/historyoptions.hxx b/include/unotools/historyoptions.hxx index 62457d3007bd..2d2994da7994 100644 --- a/include/unotools/historyoptions.hxx +++ b/include/unotools/historyoptions.hxx @@ -92,11 +92,10 @@ public: @param sURL URL to save in history @param sFilter filter name to save in history @param sTitle document title to save in history - @param sPassword password to save in history */ void AppendItem(EHistoryType eHistory, const OUString& sURL, const OUString& sFilter, const OUString& sTitle, - const OUString& sPassword, const boost::optional<OUString>& sThumbnail); + const boost::optional<OUString>& sThumbnail); /** Delete item from the specified list. */ diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx index 4d44a6968206..0aa29ecd6e79 100644 --- a/include/vbahelper/vbahelper.hxx +++ b/include/vbahelper/vbahelper.hxx @@ -262,7 +262,7 @@ class VBAHELPER_DLLPUBLIC DebugHelper { public: /// @throws css::script::BasicErrorException - static void basicexception( const OUString& DetailedMessage, const css::uno::Exception& ex, int err, const OUString& /*additionalArgument*/ ); + static void basicexception( const css::uno::Exception& ex, int err, const OUString& /*additionalArgument*/ ); /// @throws css::script::BasicErrorException static void basicexception( int err, const OUString& additionalArgument ); diff --git a/include/xmloff/styleexp.hxx b/include/xmloff/styleexp.hxx index 5f215069d06a..fbe6b5107e59 100644 --- a/include/xmloff/styleexp.hxx +++ b/include/xmloff/styleexp.hxx @@ -57,7 +57,6 @@ class XMLOFF_DLLPUBLIC XMLStyleExport : public salhelper::SimpleReferenceObject const OUString sFollowStyle; const OUString sNumberingStyleName; const OUString sOutlineLevel; - const OUString sPoolStyleName; SvXMLAutoStylePoolP *pAutoStylePool; protected: @@ -79,7 +78,6 @@ protected: public: XMLStyleExport( SvXMLExport& rExp, - const OUString& rPoolStyleName, SvXMLAutoStylePoolP *pAutoStyleP=nullptr ); virtual ~XMLStyleExport() override; diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx index 51580da6e301..094907096a82 100644 --- a/sc/source/filter/xml/xmlstyle.cxx +++ b/sc/source/filter/xml/xmlstyle.cxx @@ -833,7 +833,7 @@ void ScXMLStyleExport::exportStyleContent( const css::uno::Reference<css::style: ScXMLStyleExport::ScXMLStyleExport( SvXMLExport& rExp, SvXMLAutoStylePoolP *pAutoStyleP ) - : XMLStyleExport(rExp, OUString(), pAutoStyleP) + : XMLStyleExport(rExp, pAutoStyleP) { } diff --git a/sd/source/ui/inc/PreviewRenderer.hxx b/sd/source/ui/inc/PreviewRenderer.hxx index 3c0e97254b0e..e8d815d59bcc 100644 --- a/sd/source/ui/inc/PreviewRenderer.hxx +++ b/sd/source/ui/inc/PreviewRenderer.hxx @@ -69,10 +69,6 @@ public: The page to render. @param aPreviewPixelSize The size in device coordinates of the preview. - @param sSubstitutionText - When the actual preview can not be created for some reason, then - this text is painted in an empty rectangle of the requested size - instead. @param bObeyHighContrastMode When <FALSE/> then the high contrast mode of the application is ignored and the preview is rendered in normal mode. When @@ -85,7 +81,6 @@ public: Image RenderPage ( const SdPage* pPage, const Size aPreviewPixelSize, - const OUString& sSubstitutionText, const bool bObeyHighContrastMode, const bool bDisplayPresentationObjects = true); diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx index f00cff827f4b..a5ca061a4a1d 100644 --- a/sd/source/ui/presenter/SlideRenderer.cxx +++ b/sd/source/ui/presenter/SlideRenderer.cxx @@ -175,7 +175,7 @@ BitmapEx SlideRenderer::CreatePreview ( const Image aPreview = maPreviewRenderer.RenderPage ( pPage, Size(aPreviewSize.Width*nFactor, aPreviewSize.Height*nFactor), - OUString(), true); + true); if (nFactor == 1) return aPreview.GetBitmapEx(); else diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx index 782e55ae3dfc..cb18c6efad25 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx @@ -64,7 +64,6 @@ Bitmap BitmapFactory::CreateBitmap ( Bitmap aPreview (maRenderer.RenderPage ( &rPage, aSize, - OUString(), true, false).GetBitmapEx().GetBitmap()); if (bDoSuperSampling) diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index c41822289095..384b53dbbf0d 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -95,7 +95,6 @@ Image PreviewRenderer::RenderPage ( return RenderPage ( pPage, Size(nWidth,nHeight), - OUString(), false/*bObeyHighContrastMode*/); } else @@ -105,7 +104,6 @@ Image PreviewRenderer::RenderPage ( Image PreviewRenderer::RenderPage ( const SdPage* pPage, Size aPixelSize, - const OUString& rSubstitutionText, const bool bObeyHighContrastMode, const bool bDisplayPresentationObjects) { @@ -118,7 +116,7 @@ Image PreviewRenderer::RenderPage ( if (Initialize(pPage, aPixelSize, bObeyHighContrastMode)) { PaintPage(pPage, bDisplayPresentationObjects); - PaintSubstitutionText(rSubstitutionText); + PaintSubstitutionText(""); PaintFrame(); Size aSize (mpPreviewDevice->GetOutputSizePixel()); diff --git a/sdext/source/presenter/PresenterPaneFactory.cxx b/sdext/source/presenter/PresenterPaneFactory.cxx index 592277ff88b2..e9a5f950557e 100644 --- a/sdext/source/presenter/PresenterPaneFactory.cxx +++ b/sdext/source/presenter/PresenterPaneFactory.cxx @@ -235,7 +235,6 @@ Reference<XResource> PresenterPaneFactory::CreatePane ( { return CreatePane( rxPaneId, - OUString(), xParentPane, rxPaneId->getFullResourceURL().Arguments == "Sprite=1"); } @@ -249,7 +248,6 @@ Reference<XResource> PresenterPaneFactory::CreatePane ( Reference<XResource> PresenterPaneFactory::CreatePane ( const Reference<XResourceId>& rxPaneId, - const OUString& rsTitle, const Reference<drawing::framework::XPane>& rxParentPane, const bool bIsSpritePane) { @@ -276,7 +274,7 @@ Reference<XResource> PresenterPaneFactory::CreatePane ( aArguments[0] <<= rxPaneId; aArguments[1] <<= rxParentPane->getWindow(); aArguments[2] <<= rxParentPane->getCanvas(); - aArguments[3] <<= rsTitle; + aArguments[3] <<= OUString(); aArguments[4] <<= Reference<drawing::framework::XPaneBorderPainter>( static_cast<XWeak*>(mpPresenterController->GetPaneBorderPainter().get()), UNO_QUERY); diff --git a/sdext/source/presenter/PresenterPaneFactory.hxx b/sdext/source/presenter/PresenterPaneFactory.hxx index e1016d39fdfd..39aae51ccf15 100644 --- a/sdext/source/presenter/PresenterPaneFactory.hxx +++ b/sdext/source/presenter/PresenterPaneFactory.hxx @@ -104,7 +104,6 @@ private: const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId); css::uno::Reference<css::drawing::framework::XResource> CreatePane ( const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId, - const OUString& rsTitle, const css::uno::Reference<css::drawing::framework::XPane>& rxParentPane, const bool bIsSpritePane); diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 9007ae389582..7af2a0c7f604 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1168,7 +1168,7 @@ void BookmarksBox_Impl::dispose() { OUString aTitle = GetEntry(i); OUString* pURL = static_cast<OUString*>(GetEntryData(i)); - aHistOpt.AppendItem(eHELPBOOKMARKS, *pURL, "", aTitle, "", boost::none); + aHistOpt.AppendItem(eHELPBOOKMARKS, *pURL, "", aTitle, boost::none); delete pURL; } ListBox::dispose(); diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx index 90ee46f4e480..3a22edca1f90 100644 --- a/sfx2/source/appl/sfxpicklist.cxx +++ b/sfx2/source/appl/sfxpicklist.cxx @@ -174,7 +174,6 @@ void SfxPickListImpl::AddDocumentToPickList( SfxObjectShell* pDocSh ) aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ), aFilter, aTitle, - OUString(), aThumbnail); if ( aURL.GetProtocol() == INetProtocol::File ) diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx index 1c86d6d4bd85..6f01c15a1fcc 100644 --- a/svtools/source/misc/imap2.cxx +++ b/svtools/source/misc/imap2.cxx @@ -140,13 +140,13 @@ void IMapPolygonObject::WriteNCSA( SvStream& rOStm, const OUString& rBaseURL ) rOStm.WriteLine(aStrBuf.makeStringAndClear()); } -void ImageMap::Write( SvStream& rOStm, sal_uLong nFormat, const OUString& rBaseURL ) const +void ImageMap::Write( SvStream& rOStm, sal_uLong nFormat ) const { switch( nFormat ) { - case IMAP_FORMAT_BIN : Write( rOStm, rBaseURL ); break; - case IMAP_FORMAT_CERN : ImpWriteCERN( rOStm, rBaseURL ); break; - case IMAP_FORMAT_NCSA : ImpWriteNCSA( rOStm, rBaseURL ); break; + case IMAP_FORMAT_BIN : Write( rOStm, "" ); break; + case IMAP_FORMAT_CERN : ImpWriteCERN( rOStm, "" ); break; + case IMAP_FORMAT_NCSA : ImpWriteNCSA( rOStm, "" ); break; default: break; @@ -209,7 +209,7 @@ void ImageMap::ImpWriteNCSA( SvStream& rOStm, const OUString& rBaseURL ) const } } -sal_uLong ImageMap::Read( SvStream& rIStm, sal_uLong nFormat, const OUString& rBaseURL ) +sal_uLong ImageMap::Read( SvStream& rIStm, sal_uLong nFormat ) { sal_uLong nRet = IMAP_ERR_FORMAT; @@ -218,9 +218,9 @@ sal_uLong ImageMap::Read( SvStream& rIStm, sal_uLong nFormat, const OUString& rB switch ( nFormat ) { - case IMAP_FORMAT_BIN : Read( rIStm, rBaseURL ); break; - case IMAP_FORMAT_CERN : nRet = ImpReadCERN( rIStm, rBaseURL ); break; - case IMAP_FORMAT_NCSA : nRet = ImpReadNCSA( rIStm, rBaseURL ); break; + case IMAP_FORMAT_BIN : Read( rIStm, "" ); break; + case IMAP_FORMAT_CERN : nRet = ImpReadCERN( rIStm, "" ); break; + case IMAP_FORMAT_NCSA : nRet = ImpReadNCSA( rIStm, "" ); break; default: break; diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 4fc4f5d5dfb1..8046143f1b62 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -335,8 +335,7 @@ namespace svt { namespace table if ( impl_isAccessibleAlive() ) { impl_commitAccessibleEvent( AccessibleEventId::TABLE_MODEL_CHANGED, - makeAny( AccessibleTableModelChange( AccessibleTableModelChangeType::INSERT, i_first, i_last, 0, m_pModel->getColumnCount() ) ), - Any() + makeAny( AccessibleTableModelChange( AccessibleTableModelChangeType::INSERT, i_first, i_last, 0, m_pModel->getColumnCount() ) ) ); } @@ -2320,7 +2319,7 @@ namespace svt { namespace table void TableControl_Impl::commitAccessibleEvent( sal_Int16 const i_eventID ) { - impl_commitAccessibleEvent( i_eventID, Any(), Any() ); + impl_commitAccessibleEvent( i_eventID, Any() ); } @@ -2430,10 +2429,10 @@ namespace svt { namespace table } - void TableControl_Impl::impl_commitAccessibleEvent( sal_Int16 const i_eventID, Any const & i_newValue, Any const & i_oldValue ) + void TableControl_Impl::impl_commitAccessibleEvent( sal_Int16 const i_eventID, Any const & i_newValue ) { if ( impl_isAccessibleAlive() ) - m_pAccessibleTable->commitEvent( i_eventID, i_newValue, i_oldValue ); + m_pAccessibleTable->commitEvent( i_eventID, i_newValue, Any() ); } diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 1cb24ae7af49..b2773971c6c4 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -299,8 +299,7 @@ namespace svt { namespace table bool impl_isAccessibleAlive() const; void impl_commitAccessibleEvent( sal_Int16 const i_eventID, - css::uno::Any const & i_newValue, - css::uno::Any const & i_oldValue + css::uno::Any const & i_newValue ); /** toggles the cursor visibility diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx index 36efa809fb4b..df3f7a210970 100644 --- a/svtools/source/urlobj/inetimg.cxx +++ b/svtools/source/urlobj/inetimg.cxx @@ -34,7 +34,7 @@ void INetImage::Write( SvStream& rOStm, SotClipboardFormatId nFormat ) const OUString sString( aImageURL + OUStringLiteral1(TOKEN_SEPARATOR) + aTargetURL + OUStringLiteral1(TOKEN_SEPARATOR) + aTargetFrame - + OUStringLiteral1(TOKEN_SEPARATOR) + aAlternateText + + OUStringLiteral1(TOKEN_SEPARATOR) /* + aAlternateText */ + OUStringLiteral1(TOKEN_SEPARATOR) + OUString::number(aSizePixel.Width()) + OUStringLiteral1(TOKEN_SEPARATOR) @@ -67,7 +67,7 @@ bool INetImage::Read( SvStream& rIStm, SotClipboardFormatId nFormat ) aImageURL = sINetImg.getToken( 0, TOKEN_SEPARATOR, nStart ); aTargetURL = sINetImg.getToken( 0, TOKEN_SEPARATOR, nStart ); aTargetFrame = sINetImg.getToken( 0, TOKEN_SEPARATOR, nStart ); - aAlternateText = sINetImg.getToken( 0, TOKEN_SEPARATOR, nStart ); + /*aAlternateText =*/ sINetImg.getToken( 0, TOKEN_SEPARATOR, nStart ); aSizePixel.Width() = sINetImg.getToken( 0, TOKEN_SEPARATOR, nStart ).toInt32(); aSizePixel.Height() = sINetImg.getToken( 0, TOKEN_SEPARATOR, @@ -112,10 +112,8 @@ bool INetImage::Read( SvStream& rIStm, SotClipboardFormatId nFormat ) if( nAltOffset ) { rIStm.Seek( nFilePos + nAltOffset ); - aAlternateText = read_zeroTerminated_uInt8s_ToOUString(rIStm, eSysCSet); + /*aAlternateText =*/ read_zeroTerminated_uInt8s_ToOUString(rIStm, eSysCSet); } - else if( !aAlternateText.isEmpty() ) - aAlternateText.clear(); if( nAnchorOffset ) { diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 94fbd4454a7f..6c6cb6467bf9 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -471,7 +471,7 @@ void SvxIMapDlg::DoOpen() if( pIStm ) { - aLoadIMap.Read( *pIStm, IMAP_FORMAT_DETECT, "" ); + aLoadIMap.Read( *pIStm, IMAP_FORMAT_DETECT ); if( pIStm->GetError() ) { @@ -545,7 +545,7 @@ bool SvxIMapDlg::DoSave() std::unique_ptr<SvStream> pOStm(::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE | StreamMode::TRUNC )); if( pOStm ) { - pIMapWnd->GetImageMap().Write( *pOStm, nFormat, "" ); + pIMapWnd->GetImageMap().Write( *pOStm, nFormat ); if( pOStm->GetError() ) ErrorHandler::HandleError( ERRCODE_IO_GENERAL ); diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 39618a8f0b4a..295b0bb95961 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -573,8 +573,7 @@ public: void InsertDrawObj( SdrObject& rDrawObj, const Point& rInsertPosition ); - bool ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltName, - const Graphic* pGrf ); + bool ReplaceSdrObj( const OUString& rGrfName, const Graphic* pGrf ); // --> #i972# /** for starmath formulas anchored 'as char' it aligns it baseline to baseline diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx index 617232a50da5..51fdeb49d208 100644 --- a/sw/inc/swtblfmt.hxx +++ b/sw/inc/swtblfmt.hxx @@ -45,9 +45,8 @@ class SwTableLineFormat : public SwFrameFormat friend class SwDoc; protected: - SwTableLineFormat( SwAttrPool& rPool, const OUString &rFormatNm, - SwFrameFormat *pDrvdFrame ) - : SwFrameFormat( rPool, rFormatNm, pDrvdFrame, RES_FRMFMT, aTableLineSetRange ) + SwTableLineFormat( SwAttrPool& rPool, SwFrameFormat *pDrvdFrame ) + : SwFrameFormat( rPool, OUString(), pDrvdFrame, RES_FRMFMT, aTableLineSetRange ) {} public: @@ -62,9 +61,8 @@ class SW_DLLPUBLIC SwTableBoxFormat : public SwFrameFormat friend class SwDoc; protected: - SwTableBoxFormat( SwAttrPool& rPool, const OUString &rFormatNm, - SwFrameFormat *pDrvdFrame ) - : SwFrameFormat( rPool, rFormatNm, pDrvdFrame, RES_FRMFMT, aTableBoxSetRange ) + SwTableBoxFormat( SwAttrPool& rPool, SwFrameFormat *pDrvdFrame ) + : SwFrameFormat( rPool, OUString(), pDrvdFrame, RES_FRMFMT, aTableBoxSetRange ) {} // For recognition of changes (especially TableBoxAttribute). diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx index f7482231ec02..831f7923def8 100644 --- a/sw/source/core/crsr/crossrefbookmark.cxx +++ b/sw/source/core/crsr/crossrefbookmark.cxx @@ -35,11 +35,10 @@ namespace sw { namespace mark CrossRefBookmark::CrossRefBookmark(const SwPaM& rPaM, const vcl::KeyCode& rCode, const OUString& rName, - const OUString& rShortName, const OUString& rPrefix) : Bookmark( // ensure that m_pPos2 is null by only passing start to super - SwPaM(*rPaM.Start()), rCode, rName, rShortName) + SwPaM(*rPaM.Start()), rCode, rName, OUString()) { assert( IDocumentMarkAccess::IsLegalPaMForCrossRefHeadingBookmark(rPaM) && "<CrossRefBookmark::CrossRefBookmark(..)>" @@ -71,7 +70,7 @@ namespace sw { namespace mark CrossRefHeadingBookmark::CrossRefHeadingBookmark(const SwPaM& rPaM, const vcl::KeyCode& rCode, const OUString& rName) - : CrossRefBookmark(rPaM, rCode, rName, OUString(), IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix()+"_Toc") + : CrossRefBookmark(rPaM, rCode, rName, IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix()+"_Toc") { } bool CrossRefHeadingBookmark::IsLegalName(const OUString& rName) @@ -82,7 +81,7 @@ namespace sw { namespace mark CrossRefNumItemBookmark::CrossRefNumItemBookmark(const SwPaM& rPaM, const vcl::KeyCode& rCode, const OUString& rName) - : CrossRefBookmark(rPaM, rCode, rName, OUString(), CrossRefNumItemBookmark_NamePrefix) + : CrossRefBookmark(rPaM, rCode, rName, CrossRefNumItemBookmark_NamePrefix) { } bool CrossRefNumItemBookmark::IsLegalName(const OUString& rName) diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 6b008513020e..59dec3745cd9 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1699,16 +1699,14 @@ bool SwDoc::DontExpandFormat( const SwPosition& rPos, bool bFlag ) SwTableBoxFormat* SwDoc::MakeTableBoxFormat() { - SwTableBoxFormat* pFormat = new SwTableBoxFormat( GetAttrPool(), aEmptyOUStr, - mpDfltFrameFormat ); + SwTableBoxFormat* pFormat = new SwTableBoxFormat( GetAttrPool(), mpDfltFrameFormat ); getIDocumentState().SetModified(); return pFormat; } SwTableLineFormat* SwDoc::MakeTableLineFormat() { - SwTableLineFormat* pFormat = new SwTableLineFormat( GetAttrPool(), aEmptyOUStr, - mpDfltFrameFormat ); + SwTableLineFormat* pFormat = new SwTableLineFormat( GetAttrPool(), mpDfltFrameFormat ); getIDocumentState().SetModified(); return pFormat; } diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 66fbcfcee252..8bd52f04c3b5 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -1726,8 +1726,7 @@ ObjCntType SwFEShell::GetObjCntTypeOfSelection() const return eType; } -bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltName, - const Graphic* pGrf ) +bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const Graphic* pGrf ) { SET_CURR_SHELL( this ); @@ -1773,7 +1772,7 @@ bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltNam // delete "Sdr-Object", insert the graphic instead DelSelectedObj(); - GetDoc()->getIDocumentContentOperations().Insert( *GetCursor(), rGrfName, rFltName, pGrf, &aFrameSet, nullptr, nullptr ); + GetDoc()->getIDocumentContentOperations().Insert( *GetCursor(), rGrfName, "", pGrf, &aFrameSet, nullptr, nullptr ); EndUndo(); EndAllAction(); diff --git a/sw/source/core/inc/crossrefbookmark.hxx b/sw/source/core/inc/crossrefbookmark.hxx index 818af727cb66..d98fdf7c30db 100644 --- a/sw/source/core/inc/crossrefbookmark.hxx +++ b/sw/source/core/inc/crossrefbookmark.hxx @@ -34,7 +34,6 @@ namespace sw { CrossRefBookmark(const SwPaM& rPaM, const vcl::KeyCode& rCode, const OUString& rName, - const OUString& rShortName, const OUString& rPrefix); // getters diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 57270b8e2a31..28ae025eeb47 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -477,8 +477,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo m_pImageMap = new ImageMap( *rURL.GetMap() ); else if( !rURL.GetURL().isEmpty() ) m_pTargetURL = new INetImage( aEmptyOUStr, rURL.GetURL(), - rURL.GetTargetFrameName(), - aEmptyOUStr ); + rURL.GetTargetFrameName() ); } } @@ -1003,8 +1002,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) else if( !rURL.GetURL().isEmpty() ) { m_pTargetURL = new INetImage( sGrfNm, rURL.GetURL(), - rURL.GetTargetFrameName(), - aEmptyOUStr ); + rURL.GetTargetFrameName() ); AddFormat( SotClipboardFormatId::INET_IMAGE ); } } @@ -1969,7 +1967,7 @@ bool SwTransferable::PasteTargetURL( TransferableDataHelper& rData, case SwPasteSdr::Replace: if( rSh.IsObjSelected() ) { - rSh.ReplaceSdrObj( sURL, aEmptyOUStr, &aGraphic ); + rSh.ReplaceSdrObj( sURL, &aGraphic ); Point aPt( pPt ? *pPt : rSh.GetCursorDocPos() ); SwTransferable::SetSelInShell( rSh, true, &aPt ); } @@ -2442,7 +2440,7 @@ bool SwTransferable::PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, if( pStream != nullptr && !pStream->GetError() && // mba: no BaseURL for clipboard functionality - aMap.Read( *pStream, IMAP_FORMAT_DETECT, OUString() ) == IMAP_ERR_OK && + aMap.Read( *pStream, IMAP_FORMAT_DETECT ) == IMAP_ERR_OK && aMap.GetIMapObjectCount() ) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); @@ -3141,8 +3139,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) else if( !rURL.GetURL().isEmpty() ) { m_pTargetURL = new INetImage( sGrfNm, rURL.GetURL(), - rURL.GetTargetFrameName(), - aEmptyOUStr ); + rURL.GetTargetFrameName() ); AddFormat( SotClipboardFormatId::INET_IMAGE ); } } diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index 79121f2239e4..301c083220d4 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -151,8 +151,7 @@ SwReadOnlyPopup::SwReadOnlyPopup(const Point &rDPos, SwView &rV) else if( !rURL.GetURL().isEmpty() ) pTargetURL = new INetImage( bLink ? sGrfName : OUString(), rURL.GetURL(), - rURL.GetTargetFrameName(), - OUString() ); + rURL.GetTargetFrameName() ); } } diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx index 45cce2ab9f4a..2c1a39ee7fc8 100644 --- a/unotools/source/config/historyoptions.cxx +++ b/unotools/source/config/historyoptions.cxx @@ -561,11 +561,11 @@ Sequence< Sequence< PropertyValue > > SvtHistoryOptions::GetList( EHistoryType e void SvtHistoryOptions::AppendItem(EHistoryType eHistory, const OUString& sURL, const OUString& sFilter, const OUString& sTitle, - const OUString& sPassword, const boost::optional<OUString>& sThumbnail) + const boost::optional<OUString>& sThumbnail) { MutexGuard aGuard(theHistoryOptionsMutex::get()); - m_pImpl->AppendItem(eHistory, sURL, sFilter, sTitle, sPassword, sThumbnail); + m_pImpl->AppendItem(eHistory, sURL, sFilter, sTitle, ""/*sPassword*/, sThumbnail); } void SvtHistoryOptions::DeleteItem(EHistoryType eHistory, const OUString& sURL) diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index eee12b2c15da..80db71b984d3 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -1045,20 +1045,20 @@ void ShapeHelper::setTop(double _fTop) xShape->setPosition(aPoint); } -void DebugHelper::basicexception( const OUString& DetailedMessage, const css::uno::Exception& ex, int err, const OUString& /*additionalArgument*/ ) +void DebugHelper::basicexception( const css::uno::Exception& ex, int err, const OUString& /*additionalArgument*/ ) { // #TODO #FIXME ( do we want to support additionalArg here ) - throw css::script::BasicErrorException( DetailedMessage.concat( " " ).concat( ex.Message ), css::uno::Reference< css::uno::XInterface >(), err, OUString() ); + throw css::script::BasicErrorException( ex.Message, css::uno::Reference< css::uno::XInterface >(), err, OUString() ); } void DebugHelper::basicexception( int err, const OUString& additionalArgument ) { - basicexception( OUString(), css::uno::Exception(), err, additionalArgument ); + basicexception( css::uno::Exception(), err, additionalArgument ); } void DebugHelper::basicexception( const css::uno::Exception& ex ) { - basicexception( OUString(), ex, ERRCODE_BASIC_INTERNAL_ERROR, OUString() ); + basicexception( ex, ERRCODE_BASIC_INTERNAL_ERROR, OUString() ); } void DebugHelper::runtimeexception( int err ) diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index e3892a381bed..60e78e15d101 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -382,7 +382,6 @@ public: const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, - const OUString& aCaption, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion, const OutputDevice *pOutDev ); diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index b4e7e66e1564..3b64a33fd6b8 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -711,7 +711,7 @@ bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const } bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const tools::Rectangle& rControlRegion, ControlState nState, - const ImplControlValue& aValue, const OUString& aCaption, + const ImplControlValue& aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion, const OutputDevice *pOutDev ) { if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) ) @@ -720,7 +720,7 @@ bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, mirror( rgn, pOutDev ); std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone()); mirror( *mirrorValue, pOutDev ); - if( getNativeControlRegion( nType, nPart, rgn, nState, *mirrorValue, aCaption, + if( getNativeControlRegion( nType, nPart, rgn, nState, *mirrorValue, OUString(), rNativeBoundingRegion, rNativeContentRegion ) ) { mirror( rNativeBoundingRegion, pOutDev, true ); @@ -730,7 +730,7 @@ bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, return false; } else - return getNativeControlRegion( nType, nPart, rControlRegion, nState, aValue, aCaption, + return getNativeControlRegion( nType, nPart, rControlRegion, nState, aValue, OUString(), rNativeBoundingRegion, rNativeContentRegion ); } diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx index 3f931bf85930..2a9eee180e43 100644 --- a/vcl/source/outdev/nativecontrols.cxx +++ b/vcl/source/outdev/nativecontrols.cxx @@ -332,7 +332,7 @@ bool OutputDevice::GetNativeControlRegion( ControlType nType, tools::Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) ); bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue, - OUString(), rNativeBoundingRegion, + rNativeBoundingRegion, rNativeContentRegion, this ); if( bRet ) { diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 567ba9bf577f..ba792d13f128 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -1678,7 +1678,7 @@ void SdXMLExport::ImpWritePresentationStyles() // write presentation styles (ONLY if presentation) if(IsImpress() && mxDocStyleFamilies.is() && xNamed.is()) { - rtl::Reference<XMLStyleExport> aStEx(new XMLStyleExport(*this, OUString(), GetAutoStylePool().get())); + rtl::Reference<XMLStyleExport> aStEx(new XMLStyleExport(*this, GetAutoStylePool().get())); const rtl::Reference< SvXMLExportPropertyMapper > aMapperRef( GetPropertySetMapper() ); OUString aPrefix( xNamed->getName() ); diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 93584d1c8f1c..cf378dc65991 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -1253,7 +1253,7 @@ void XMLShapeExport::ImpExportGluePoints( const uno::Reference< drawing::XShape void XMLShapeExport::ExportGraphicDefaults() { - rtl::Reference<XMLStyleExport> aStEx(new XMLStyleExport(mrExport, OUString(), mrExport.GetAutoStylePool().get())); + rtl::Reference<XMLStyleExport> aStEx(new XMLStyleExport(mrExport, mrExport.GetAutoStylePool().get())); // construct PropertySetMapper rtl::Reference< SvXMLExportPropertyMapper > xPropertySetMapper( CreateShapePropMapper( mrExport ) ); diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index 286097a836b4..b0f145aa9707 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -57,7 +57,6 @@ using ::com::sun::star::document::XEventsSupplier; XMLStyleExport::XMLStyleExport( SvXMLExport& rExp, - const OUString& rPoolStyleName, SvXMLAutoStylePoolP *pAutoStyleP ) : rExport( rExp ), sIsPhysical( "IsPhysical" ), @@ -65,7 +64,6 @@ XMLStyleExport::XMLStyleExport( sFollowStyle( "FollowStyle" ), sNumberingStyleName( "NumberingStyleName" ), sOutlineLevel( "OutlineLevel" ), - sPoolStyleName( rPoolStyleName ), pAutoStylePool( pAutoStyleP ) { } @@ -143,8 +141,6 @@ bool XMLStyleExport::exportStyle( sParent = *pPrefix; sParent += sParentString; } - else - sParent = sPoolStyleName; if( !sParent.isEmpty() ) GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_PARENT_STYLE_NAME, diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index e01ada60b83c..7a291c0a2370 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -485,13 +485,13 @@ void XMLTableExport::exportTableStyles() if (mbWriter) { sCellStyleName = "CellStyles"; - aStEx.set(new XMLStyleExport(mrExport, OUString())); + aStEx.set(new XMLStyleExport(mrExport)); } else { // write graphic family styles sCellStyleName = "cell"; - aStEx.set(new XMLStyleExport(mrExport, OUString(), mrExport.GetAutoStylePool().get())); + aStEx.set(new XMLStyleExport(mrExport, mrExport.GetAutoStylePool().get())); } aStEx->exportStyleFamily(sCellStyleName, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME), mxCellExportPropertySetMapper.get(), true, XML_STYLE_FAMILY_TABLE_CELL); diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 6c16d7d44eff..903a35f517ce 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -1154,7 +1154,7 @@ XMLTextParagraphExport::XMLTextParagraphExport( SvXMLExport& rExp, SvXMLAutoStylePoolP & rASP ) : - XMLStyleExport( rExp, OUString(), &rASP ), + XMLStyleExport( rExp, &rASP ), m_xImpl(new Impl), rAutoStylePool( rASP ), pBoundFrameSets(new BoundFrameSets(GetExport().GetModel())), |