diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-30 10:53:10 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-30 10:53:10 +0200 |
commit | 0dccc59702c4a30e9aca8251e64678a2588a5513 (patch) | |
tree | 409bd4e48b6efc331baedd0a7a07184ddad03a68 | |
parent | a29efdc0489df61a4ad6b717d93775a7c244596f (diff) |
Use typed MaybeFile Link
Change-Id: Ic9eebca9d8fe3e9173b1873bdc7800e5161f9999
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 2 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfilterjar.cxx | 4 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertabpagexslt.cxx | 2 | ||||
-rw-r--r-- | include/sfx2/fcontnr.hxx | 2 | ||||
-rw-r--r-- | include/svl/urihelper.hxx | 6 | ||||
-rw-r--r-- | sfx2/source/appl/appmain.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 6 | ||||
-rw-r--r-- | svl/source/misc/urihelper.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/html/htmlcss1.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlform.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/htmlgrin.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlnumreader.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlsect.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/svxcss1.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par5.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/chardlg.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 4 |
18 files changed, 30 insertions, 30 deletions
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 63744f858d1a..5e4062de42eb 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -567,7 +567,7 @@ namespace pcr else { INetURLObject aDocURL( impl_getDocumentURL_nothrow() ); - aPropertyValue <<= URIHelper::SmartRel2Abs( aDocURL, sControlValue, Link<>(), false, true, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_TO_IURI ); + aPropertyValue <<= URIHelper::SmartRel2Abs( aDocURL, sControlValue, Link<OUString *, bool>(), false, true, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_TO_IURI ); } } break; diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx index 6558733c51a1..c14917b4f9fb 100644 --- a/filter/source/xsltdialog/xmlfilterjar.cxx +++ b/filter/source/xsltdialog/xmlfilterjar.cxx @@ -125,7 +125,7 @@ void XMLFilterJarHelper::addFile( Reference< XInterface > xRootFolder, Reference if( !aFileURL.matchIgnoreAsciiCase( OUString("file://") ) ) { - aFileURL = URIHelper::SmartRel2Abs( INetURLObject(sProgPath), aFileURL, Link<>(), false ); + aFileURL = URIHelper::SmartRel2Abs( INetURLObject(sProgPath), aFileURL, Link<OUString *, bool>(), false ); } INetURLObject aURL( aFileURL ); @@ -343,7 +343,7 @@ bool XMLFilterJarHelper::copyFile( Reference< XHierarchicalNameAccess > xIfc, OU INetURLObject aBaseURL( rTargetURL ); - rURL = URIHelper::SmartRel2Abs( aBaseURL, szPackagePath, Link<>(), false ); + rURL = URIHelper::SmartRel2Abs( aBaseURL, szPackagePath, Link<OUString *, bool>(), false ); if( !rURL.isEmpty() ) { diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx index 536e39006127..dfcf3afb9736 100644 --- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx +++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx @@ -122,7 +122,7 @@ void XMLFilterTabPageXSLT::SetURL( SvtURLBox* rURLBox, const OUString& rURL ) else if( !rURL.isEmpty() ) { OUString aURL( rURL ); - aURL = URIHelper::SmartRel2Abs( INetURLObject(sInstPath), aURL, Link<>(), false ); + aURL = URIHelper::SmartRel2Abs( INetURLObject(sInstPath), aURL, Link<OUString *, bool>(), false ); osl::FileBase::getSystemPathFromFileURL( aURL, aPath ); rURLBox->SetBaseURL( aURL ); diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx index 1c325b92f628..4ff4e7508c40 100644 --- a/include/sfx2/fcontnr.hxx +++ b/include/sfx2/fcontnr.hxx @@ -108,7 +108,7 @@ public: ~SfxFilterMatcher(); SAL_DLLPRIVATE static bool IsFilterInstalled_Impl( const SfxFilter* pFilter ); - DECL_DLLPRIVATE_STATIC_LINK( SfxFilterMatcher, MaybeFileHdl_Impl, OUString* ); + DECL_DLLPRIVATE_STATIC_LINK_TYPED( SfxFilterMatcher, MaybeFileHdl_Impl, OUString*, bool ); sal_uInt32 GuessFilterIgnoringContent( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; sal_uInt32 GuessFilter( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; diff --git a/include/svl/urihelper.hxx b/include/svl/urihelper.hxx index 125234ea9921..6007b672a333 100644 --- a/include/svl/urihelper.hxx +++ b/include/svl/urihelper.hxx @@ -51,7 +51,7 @@ namespace URIHelper { */ SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const & rTheBaseURIRef, OUString const & rTheRelURIRef, - Link<> const & rMaybeFileHdl = Link<>(), + Link<OUString *, bool> const & rMaybeFileHdl = Link<OUString *, bool>(), bool bCheckFileExists = true, bool bIgnoreFragment = false, INetURLObject::EncodeMechanism eEncodeMechanism = INetURLObject::WAS_ENCODED, @@ -60,9 +60,9 @@ SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const & rTheBaseURIRef, bool bRelativeNonURIs = false, INetURLObject::FSysStyle eStyle = INetURLObject::FSYS_DETECT); -SVL_DLLPUBLIC void SetMaybeFileHdl(Link<> const & rTheMaybeFileHdl); +SVL_DLLPUBLIC void SetMaybeFileHdl(Link<OUString *, bool> const & rTheMaybeFileHdl); -SVL_DLLPUBLIC Link<> GetMaybeFileHdl(); +SVL_DLLPUBLIC Link<OUString *, bool> GetMaybeFileHdl(); /** Converts a URI reference to a relative one, ignoring certain differences (for diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx index c8f8da897a18..128b6f9ff1c6 100644 --- a/sfx2/source/appl/appmain.cxx +++ b/sfx2/source/appl/appmain.cxx @@ -51,7 +51,7 @@ SfxFilterMatcher& SfxApplication::GetFilterMatcher() if( !pAppData_Impl->pMatcher ) { pAppData_Impl->pMatcher = new SfxFilterMatcher(); - URIHelper::SetMaybeFileHdl( LINK( + URIHelper::SetMaybeFileHdl( LINK_TYPED( pAppData_Impl->pMatcher, SfxFilterMatcher, MaybeFileHdl_Impl ) ); } return *pAppData_Impl->pMatcher; diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 6db9950b47e0..09f59473b5b6 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -862,7 +862,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const OUString& rName, return NULL; } -IMPL_STATIC_LINK( SfxFilterMatcher, MaybeFileHdl_Impl, OUString*, pString ) +IMPL_STATIC_LINK_TYPED( SfxFilterMatcher, MaybeFileHdl_Impl, OUString*, pString, bool ) { const SfxFilter* pFilter = pThis->GetFilter4Extension( *pString, SfxFilterFlags::IMPORT ); if (pFilter && !pFilter->GetWildcard().Matches( OUString() ) && @@ -870,9 +870,9 @@ IMPL_STATIC_LINK( SfxFilterMatcher, MaybeFileHdl_Impl, OUString*, pString ) !pFilter->GetWildcard().Matches(OUString('*')) ) { - return sal_True; + return true; } - return sal_False; + return false; } diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx index 7103dc8a1c1b..25ba86dd40f2 100644 --- a/svl/source/misc/urihelper.cxx +++ b/svl/source/misc/urihelper.cxx @@ -49,7 +49,7 @@ using namespace com::sun::star; OUString URIHelper::SmartRel2Abs(INetURLObject const & rTheBaseURIRef, OUString const & rTheRelURIRef, - Link<> const & rMaybeFileHdl, + Link<OUString *, bool> const & rMaybeFileHdl, bool bCheckFileExists, bool bIgnoreFragment, INetURLObject::EncodeMechanism eEncodeMechanism, @@ -91,7 +91,7 @@ OUString URIHelper::SmartRel2Abs(INetURLObject const & rTheBaseURIRef, if (rMaybeFileHdl.IsSet()) { OUString aFilePath(rTheRelURIRef); - bMaybeFile = rMaybeFileHdl.Call(&aFilePath) != 0; + bMaybeFile = rMaybeFileHdl.Call(&aFilePath); } if (!bMaybeFile) aAbsURIRef = aNonFileURIRef; @@ -101,14 +101,14 @@ OUString URIHelper::SmartRel2Abs(INetURLObject const & rTheBaseURIRef, return aAbsURIRef.GetMainURL(eDecodeMechanism, eCharset); } -namespace { struct MaybeFileHdl : public rtl::Static< Link<>, MaybeFileHdl > {}; } +namespace { struct MaybeFileHdl : public rtl::Static< Link<OUString *, bool>, MaybeFileHdl > {}; } -void URIHelper::SetMaybeFileHdl(Link<> const & rTheMaybeFileHdl) +void URIHelper::SetMaybeFileHdl(Link<OUString *, bool> const & rTheMaybeFileHdl) { MaybeFileHdl::get() = rTheMaybeFileHdl; } -Link<> URIHelper::GetMaybeFileHdl() +Link<OUString *, bool> URIHelper::GetMaybeFileHdl() { return MaybeFileHdl::get(); } diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 9c2bde214c7f..a0ddb955bcfa 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -1765,7 +1765,7 @@ void SwHTMLParser::InsertLink() sRel = rOption.GetString(); break; case HTML_O_HREF: - sHRef = URIHelper::SmartRel2Abs( INetURLObject( sBaseURL ), rOption.GetString(), Link<>(), false ); + sHRef = URIHelper::SmartRel2Abs( INetURLObject( sBaseURL ), rOption.GetString(), Link<OUString *, bool>(), false ); break; case HTML_O_TYPE: sType = rOption.GetString(); diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 622eaa7341a0..ea8b4ab9d4cc 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -1345,7 +1345,7 @@ void SwHTMLParser::NewForm( bool bAppend ) if( !aAction.isEmpty() ) { - aAction = URIHelper::SmartRel2Abs(INetURLObject(sBaseURL), aAction, Link<>(), false); + aAction = URIHelper::SmartRel2Abs(INetURLObject(sBaseURL), aAction, Link<OUString *, bool>(), false); } else { @@ -1866,7 +1866,7 @@ void SwHTMLParser::InsertInput() // Die URL erst nach dem Einfuegen setzen, weil sich der // Download der Grafik erst dann am XModel anmelden kann, // wenn das Control eingefuegt ist. - aTmp <<= OUString( URIHelper::SmartRel2Abs(INetURLObject(sBaseURL), sImgSrc, Link<>(), false)); + aTmp <<= OUString( URIHelper::SmartRel2Abs(INetURLObject(sBaseURL), sImgSrc, Link<OUString *, bool>(), false)); xPropSet->setPropertyValue("ImageURL", aTmp ); } diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 5bed2bbfe84f..5a3349588675 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -1230,7 +1230,7 @@ ANCHOR_SETEVENT: { if( !sHRef.isEmpty() ) { - sHRef = URIHelper::SmartRel2Abs( INetURLObject(sBaseURL), sHRef, Link<>(), false ); + sHRef = URIHelper::SmartRel2Abs( INetURLObject(sBaseURL), sHRef, Link<OUString *, bool>(), false ); } else { diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx index 4bfa12171a3f..69a2c28868ce 100644 --- a/sw/source/filter/html/htmlnumreader.cxx +++ b/sw/source/filter/html/htmlnumreader.cxx @@ -199,7 +199,7 @@ void SwHTMLParser::NewNumBulList( int nToken ) { aBulletSrc = rOption.GetString(); if( !InternalImgToPrivateURL(aBulletSrc) ) - aBulletSrc = URIHelper::SmartRel2Abs( INetURLObject( sBaseURL ), aBulletSrc, Link<>(), false ); + aBulletSrc = URIHelper::SmartRel2Abs( INetURLObject( sBaseURL ), aBulletSrc, Link<OUString *, bool>(), false ); } break; case HTML_O_WIDTH: diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index bd03a2eb0282..b8e77ac69a8d 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -283,11 +283,11 @@ void SwHTMLParser::NewDivision( int nToken ) OUString aURL; if( nPos == -1 ) { - aURL = URIHelper::SmartRel2Abs(INetURLObject( sBaseURL ), aHRef, Link<>(), false); + aURL = URIHelper::SmartRel2Abs(INetURLObject( sBaseURL ), aHRef, Link<OUString *, bool>(), false); } else { - aURL = URIHelper::SmartRel2Abs(INetURLObject( sBaseURL ), aHRef.copy( 0, nPos ), Link<>(), false ); + aURL = URIHelper::SmartRel2Abs(INetURLObject( sBaseURL ), aHRef.copy( 0, nPos ), Link<OUString *, bool>(), false ); aURL += OUString(sfx2::cTokenSeparator); if( nPos2 == -1 ) { diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index b43afd5ce6ca..39bcbf198ee3 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -2974,7 +2974,7 @@ SvxBrushItem* SwHTMLParser::CreateBrushItem( const Color *pColor, if( !rImageURL.isEmpty() ) { - pBrushItem->SetGraphicLink( URIHelper::SmartRel2Abs( INetURLObject(sBaseURL), rImageURL, Link<>(), false) ); + pBrushItem->SetGraphicLink( URIHelper::SmartRel2Abs( INetURLObject(sBaseURL), rImageURL, Link<OUString *, bool>(), false) ); pBrushItem->SetGraphicPos( GPOS_TILED ); } } diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index fe99845e7474..084289c1bbe9 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -1573,7 +1573,7 @@ static void ParseCSS1_background( const CSS1Expression *pExpr, if( !aURL.isEmpty() ) { - aBrushItem.SetGraphicLink( URIHelper::SmartRel2Abs( INetURLObject( rParser.GetBaseURL()), aURL, Link<>(), false ) ); + aBrushItem.SetGraphicLink( URIHelper::SmartRel2Abs( INetURLObject( rParser.GetBaseURL()), aURL, Link<OUString *, bool>(), false ) ); aBrushItem.SetGraphicPos( eRepeat ); } diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 7b03c6449f7b..bc69c7927e55 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -259,7 +259,7 @@ OUString SwWW8ImplReader::ConvertFFileName(const OUString& rOrg) // Need the more sophisticated url converter. if (!aName.isEmpty()) aName = URIHelper::SmartRel2Abs( - INetURLObject(sBaseURL), aName, Link<>(), false); + INetURLObject(sBaseURL), aName, Link<OUString *, bool>(), false); return aName; } diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index 9511cd2f9043..da7c147b8e9c 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -254,7 +254,7 @@ bool SwCharURLPage::FillItemSet(SfxItemSet* rSet) OUString sURL = m_pURLED->GetText(); if(!sURL.isEmpty()) { - sURL = URIHelper::SmartRel2Abs(INetURLObject(), sURL, Link<>(), false ); + sURL = URIHelper::SmartRel2Abs(INetURLObject(), sURL, Link<OUString *, bool>(), false ); // #i100683# file URLs should be normalized in the UI if ( sURL.startsWith("file:") ) sURL = URIHelper::simpleNormalizedMakeRelative(OUString(), sURL); diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 242ed2e1a0a7..cf964bf93174 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -2303,7 +2303,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, SwTransferable::_CheckForURLOrLNKFile( rData, sTxt, &sDesc ); aBkmk = INetBookmark( - URIHelper::SmartRel2Abs(INetURLObject(), sTxt, Link<>(), false ), + URIHelper::SmartRel2Abs(INetURLObject(), sTxt, Link<OUString *, bool>(), false ), sDesc ); bCheckForGrf = true; bCheckForImageMap = SW_PASTESDR_REPLACE == nAction; @@ -2573,7 +2573,7 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData, bool bIsURLFile = SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc ); //Own FileFormat? --> insert, not for StarWriter/Web - OUString sFileURL = URIHelper::SmartRel2Abs(INetURLObject(), sFile, Link<>(), false ); + OUString sFileURL = URIHelper::SmartRel2Abs(INetURLObject(), sFile, Link<OUString *, bool>(), false ); const SfxFilter* pFlt = SW_PASTESDR_SETATTR == nAction ? 0 : SwIoSystem::GetFileFilter(sFileURL); if( pFlt && !rSh.GetView().GetDocShell()->ISA(SwWebDocShell) ) |