diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-02 18:32:36 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-02 18:33:37 +0200 |
commit | 54e87df11faf697d3b2666198a3d20b3ee091419 (patch) | |
tree | 8cfe316f012a4969ca6980fa6ac2fdb3a9424118 /sw | |
parent | 3aac11a1233f679ea813fee8b8de134553d7db60 (diff) |
Change INetProtocol enumerators to CamelCase
...to avoid clashes with macros and poor warnings about hiding global FILE
Change-Id: I444e8b958f029201b228937e088efabc4b6d3050
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/DocumentLinksAdministrationManager.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/acmplwrd.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/fields/docufld.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/graphic/ndgrf.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/swg/SwXMLTextBlocks.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unofield.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/basflt/iodetect.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlgrin.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/envelp/mailmrge.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/fldui/javaedit.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/vba/vbadocument.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbadocuments.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/vba/vbasystem.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uno/unomailmerge.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uno/unomod.cxx | 2 |
21 files changed, 33 insertions, 33 deletions
diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx index 45733f588737..b542395e5463 100644 --- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx +++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx @@ -77,8 +77,8 @@ namespace rLnkMgr.GetDisplayNames( xLink, 0, &sFName, 0, 0 ); INetURLObject aURL( sFName ); - if( INetProtocol::FILE == aURL.GetProtocol() || - INetProtocol::CID == aURL.GetProtocol() ) + if( INetProtocol::File == aURL.GetProtocol() || + INetProtocol::Cid == aURL.GetProtocol() ) return pLnk; } } diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index 1170ef387d63..c00f1c94fe06 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -242,7 +242,7 @@ bool SwAutoCompleteWord::InsertWord( const OUString& rWord, SwDoc& rDoc ) if( pMedium ) { const INetURLObject& rURL = pMedium->GetURLObject(); - if ( rURL.GetProtocol() == INetProtocol::VND_SUN_STAR_HELP ) + if ( rURL.GetProtocol() == INetProtocol::VndSunStarHelp ) return false; } diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index efae9eed545e..9d18a0022de2 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -422,7 +422,7 @@ OUString SwFileNameFieldType::Expand(sal_uLong nFmt) const { case FF_PATH: { - if( INetProtocol::FILE == rURLObj.GetProtocol() ) + if( INetProtocol::File == rURLObj.GetProtocol() ) { INetURLObject aTemp(rURLObj); aTemp.removeSegment(); @@ -452,7 +452,7 @@ OUString SwFileNameFieldType::Expand(sal_uLong nFmt) const break; default: - if( INetProtocol::FILE == rURLObj.GetProtocol() ) + if( INetProtocol::File == rURLObj.GetProtocol() ) aRet = rURLObj.GetFull(); else aRet = URIHelper::removePassword( diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 2d38b75cc2a9..a77c1d118aaf 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -127,7 +127,7 @@ SwGrfNode::SwGrfNode( const SwNodeIndex & rWhere, if( IsLinkedFile() ) { INetURLObject aUrl( rGrfName ); - if( INetProtocol::FILE == aUrl.GetProtocol() && + if( INetProtocol::File == aUrl.GetProtocol() && FStatHelper::IsDocument( aUrl.GetMainURL( INetURLObject::NO_DECODE ) )) { // file exists, so create connection without an update diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index 75186b277a18..f7a094a766f9 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -523,7 +523,7 @@ bool SwXMLTextBlocks::IsFileUCBStorage( const OUString & rFileName) { OUString aName( rFileName ); INetURLObject aObj( aName ); - if ( aObj.GetProtocol() == INetProtocol::NOT_VALID ) + if ( aObj.GetProtocol() == INetProtocol::NotValid ) { OUString aURL; ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aName, aURL ); diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 3b37e31c82a7..e76e0b6068a0 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -886,7 +886,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, // a non-empty string. INetURLObject aObj; aObj.SetURL( aDataSource ); - bool bIsURL = aObj.GetProtocol() != INetProtocol::NOT_VALID; + bool bIsURL = aObj.GetProtocol() != INetProtocol::NotValid; if (bIsURL && rPropertyName == UNO_NAME_DATA_BASE_URL) pStr = &aDataSource; // DataBaseURL else if (!bIsURL && rPropertyName == UNO_NAME_DATA_BASE_NAME) @@ -925,7 +925,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, // only one of these properties returns a non-empty string. INetURLObject aObj; aObj.SetURL(m_pImpl->m_sParam5); // SetSmartURL - bool bIsURL = aObj.GetProtocol() != INetProtocol::NOT_VALID; + bool bIsURL = aObj.GetProtocol() != INetProtocol::NotValid; if (bIsURL && rPropertyName == UNO_NAME_DATA_BASE_URL) aRet <<= m_pImpl->m_sParam5; // DataBaseURL else if ( rPropertyName == UNO_NAME_DATA_BASE_NAME) diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index af2f911f987b..c71a2bcb9f3f 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -158,7 +158,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const OUString& rFileName) // package storage or OLEStorage based format SotStorageRef xStg; INetURLObject aObj; - aObj.SetSmartProtocol( INetProtocol::FILE ); + aObj.SetSmartProtocol( INetProtocol::File ); aObj.SetSmartURL( rFileName ); SfxMedium aMedium(aObj.GetMainURL(INetURLObject::NO_DECODE), STREAM_STD_READ); diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index fb5b960ab38c..acb05069bc36 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -466,7 +466,7 @@ IMAGE_SETEVENT: Graphic aGraphic; INetURLObject aGraphicURL( sGrfNm ); - if( aGraphicURL.GetProtocol() == INetProtocol::DATA ) + if( aGraphicURL.GetProtocol() == INetProtocol::Data ) { std::unique_ptr<SvMemoryStream> const pStream(aGraphicURL.getData()); if (pStream) diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 40977d4dbe6e..880c3e3b953c 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -219,7 +219,7 @@ void SwBasicEscherEx::WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFm } // file link or URL - if (eProtocol == INetProtocol::FILE || (eProtocol == INetProtocol::NOT_VALID && rUrl[0] != '#')) + if (eProtocol == INetProtocol::File || (eProtocol == INetProtocol::NotValid && rUrl[0] != '#')) { sal_uInt16 nLevel; bool bRel; @@ -242,7 +242,7 @@ void SwBasicEscherEx::WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFm tmpStrm.WriteUInt16( 0x0003 ); SwWW8Writer::WriteString16(tmpStrm, aFileName, false); } - else if( eProtocol != INetProtocol::NOT_VALID ) + else if( eProtocol != INetProtocol::NotValid ) { tmpStrm.Write( maGuidUrlMoniker,sizeof(maGuidUrlMoniker) ); SwWW8Writer::WriteLong(tmpStrm, 2*(rUrl.getLength()+1)); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index ed3f07edf3e0..f477ff4613e8 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -877,7 +877,7 @@ bool AttributeOutputBase::AnalyzeURL( const OUString& rUrl, const OUString& /*rT } else { - INetURLObject aURL( rUrl, INetProtocol::NOT_VALID ); + INetURLObject aURL( rUrl, INetProtocol::NotValid ); sURL = aURL.GetURLNoMark( INetURLObject::DECODE_UNAMBIGUOUS ); sMark = aURL.GetMark( INetURLObject::DECODE_UNAMBIGUOUS ); } @@ -993,7 +993,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, nFlag ); INetProtocol eProto = aURL.GetProtocol(); - if ( eProto == INetProtocol::FILE || eProto == INetProtocol::SMB ) + if ( eProto == INetProtocol::File || eProto == INetProtocol::Smb ) { // version 1 (for a document) @@ -1011,7 +1011,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget // save the links to files as relative sURL = URIHelper::simpleNormalizedMakeRelative( m_rWW8Export.GetWriter().GetBaseURL(), sURL ); - if ( eProto == INetProtocol::FILE && sURL.startsWith( "/" ) ) + if ( eProto == INetProtocol::File && sURL.startsWith( "/" ) ) sURL = aURL.PathToFileName(); // special case for the absolute windows names @@ -1028,7 +1028,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget // n#261623 convert smb notation to '\\' const char pSmb[] = "smb://"; - if ( eProto == INetProtocol::SMB && sURL.startsWith( pSmb ) ) + if ( eProto == INetProtocol::Smb && sURL.startsWith( pSmb ) ) { sURL = sURL.copy( sizeof(pSmb)-3 ).replaceAll( "/", "\\" ); } @@ -1044,7 +1044,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget SwWW8Writer::WriteShort( *m_rWW8Export.pDataStrm, 3 ); SwWW8Writer::WriteString16( *m_rWW8Export.pDataStrm, sURL, false ); } - else if ( eProto != INetProtocol::NOT_VALID ) + else if ( eProto != INetProtocol::NotValid ) { // version 2 (simple url) // an write some data to the data stream, but dont ask diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 615b2af56e2e..7f92c2f57936 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4743,7 +4743,7 @@ static void lcl_createTemplateToProjectEntry( const uno::Reference< container::X { INetURLObject aObj; aObj.SetURL( sTemplatePathOrURL ); - bool bIsURL = aObj.GetProtocol() != INetProtocol::NOT_VALID; + bool bIsURL = aObj.GetProtocol() != INetProtocol::NotValid; OUString aURL; if ( bIsURL ) aURL = sTemplatePathOrURL; @@ -4828,7 +4828,7 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom, { INetURLObject aObj; aObj.SetURL( sGlobalTemplates[ i ] ); - bool bIsURL = aObj.GetProtocol() != INetProtocol::NOT_VALID; + bool bIsURL = aObj.GetProtocol() != INetProtocol::NotValid; OUString aURL; if ( bIsURL ) aURL = sGlobalTemplates[ i ]; diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 592f643645ad..f2ed24dbff59 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -314,7 +314,7 @@ SwMailMergeDlg::SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rShell, sPath = aPathOpt.GetWorkPath(); } INetURLObject aURL(sPath); - if(aURL.GetProtocol() == INetProtocol::FILE) + if(aURL.GetProtocol() == INetProtocol::File) m_pPathED->SetText(aURL.PathToFileName()); else m_pPathED->SetText(aURL.GetFull()); @@ -605,7 +605,7 @@ IMPL_LINK_NOARG(SwMailMergeDlg, InsertPathHdl) if( xFP->execute() == RET_OK ) { INetURLObject aURL(xFP->getDirectory()); - if(aURL.GetProtocol() == INetProtocol::FILE) + if(aURL.GetProtocol() == INetProtocol::File) m_pPathED->SetText(aURL.PathToFileName()); else m_pPathED->SetText(aURL.GetFull()); diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index 2271593839c9..8bf330418207 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -161,7 +161,7 @@ void SwJavaEditDialog::CheckTravel() if(!sURL.isEmpty()) { INetURLObject aINetURL(sURL); - if(INetProtocol::FILE == aINetURL.GetProtocol()) + if(INetProtocol::File == aINetURL.GetProtocol()) sURL = aINetURL.PathToFileName(); } m_pUrlED->SetText(sURL); @@ -267,7 +267,7 @@ IMPL_LINK_NOARG(SwJavaEditDialog, DlgClosedHdl) if ( !sFileName.isEmpty() ) { INetURLObject aINetURL( sFileName ); - if ( INetProtocol::FILE == aINetURL.GetProtocol() ) + if ( INetProtocol::File == aINetURL.GetProtocol() ) sFileName = aINetURL.PathToFileName(); } m_pUrlED->SetText( sFileName ); diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx index 912cf162c9bb..c22bb07efa3a 100644 --- a/sw/source/ui/vba/vbadocument.cxx +++ b/sw/source/ui/vba/vbadocument.cxx @@ -270,7 +270,7 @@ SwVbaDocument::setAttachedTemplate( const css::uno::Any& _attachedtemplate ) thr OUString aURL; INetURLObject aObj; aObj.SetURL( sTemplate ); - bool bIsURL = aObj.GetProtocol() != INetProtocol::NOT_VALID; + bool bIsURL = aObj.GetProtocol() != INetProtocol::NotValid; if ( bIsURL ) aURL = sTemplate; else diff --git a/sw/source/ui/vba/vbadocuments.cxx b/sw/source/ui/vba/vbadocuments.cxx index d2b4e6b6f6ee..67cd7374d4c2 100644 --- a/sw/source/ui/vba/vbadocuments.cxx +++ b/sw/source/ui/vba/vbadocuments.cxx @@ -132,7 +132,7 @@ SwVbaDocuments::Open( const OUString& Filename, const uno::Any& /*ConfirmConvers OUString aURL; INetURLObject aObj; aObj.SetURL( Filename ); - bool bIsURL = aObj.GetProtocol() != INetProtocol::NOT_VALID; + bool bIsURL = aObj.GetProtocol() != INetProtocol::NotValid; if ( bIsURL ) aURL = Filename; else diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx index 6e2fd2f6c203..7eea0d52e4f1 100644 --- a/sw/source/ui/vba/vbasystem.cxx +++ b/sw/source/ui/vba/vbasystem.cxx @@ -249,7 +249,7 @@ SwVbaSystem::PrivateProfileString( const OUString& rFilename, const OUString& rS { INetURLObject aObj; aObj.SetURL( rFilename ); - bool bIsURL = aObj.GetProtocol() != INetProtocol::NOT_VALID; + bool bIsURL = aObj.GetProtocol() != INetProtocol::NotValid; if ( bIsURL ) sFileUrl = rFilename; else diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 4df243b2500c..f3056be8a357 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1542,7 +1542,7 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh, // 2. Open the file ourselves SfxMedium* pMed = new SfxMedium( aTmpObj.GetMainURL( INetURLObject::NO_DECODE ), StreamMode::READ ); - if( INetProtocol::FILE == aTmpObj.GetProtocol() ) + if( INetProtocol::File == aTmpObj.GetProtocol() ) pMed->Download(); // Touch the medium (download it) const SfxFilter* pSfxFlt = 0; diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index f354333a4d05..1df19b765208 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -2500,7 +2500,7 @@ bool SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, // first, make the URL absolute INetURLObject aURL; - aURL.SetSmartProtocol( INetProtocol::FILE ); + aURL.SetSmartProtocol( INetProtocol::File ); aURL.SetSmartURL( sFile ); sFile = aURL.GetMainURL( INetURLObject::NO_DECODE ); @@ -2594,7 +2594,7 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData, // first, make the URL absolute INetURLObject aURL; - aURL.SetSmartProtocol( INetProtocol::FILE ); + aURL.SetSmartProtocol( INetProtocol::File ); aURL.SetSmartURL( sFile ); sFile = aURL.GetMainURL( INetURLObject::NO_DECODE ); diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index d4761633bc5f..afcd73fd55db 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -251,7 +251,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) INetURLObject(), aStrURL, URIHelper::GetMaybeFileHdl() ); INetURLObject url; - url.SetSmartProtocol( INetProtocol::FILE ); + url.SetSmartProtocol( INetProtocol::File ); if ( url.SetURL( aStrURL, INetURLObject::WAS_ENCODED ) ) { diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index 1af660cb393d..609414bd3262 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -703,7 +703,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( case MailMergeType::MAIL: { INetURLObject aURLObj; - aURLObj.SetSmartProtocol( INetProtocol::FILE ); + aURLObj.SetSmartProtocol( INetProtocol::File ); if (!aCurDocumentURL.isEmpty()) { diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx index 6c9fcb187baf..30dcaf8e8849 100644 --- a/sw/source/uibase/uno/unomod.cxx +++ b/sw/source/uibase/uno/unomod.cxx @@ -729,7 +729,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c throw IllegalArgumentException(); INetURLObject aHID( sHelpURL ); - if ( aHID.GetProtocol() == INetProtocol::HID ) + if ( aHID.GetProtocol() == INetProtocol::Hid ) pView->GetEditWin().SetHelpId( OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ) ); else throw IllegalArgumentException (); |