summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-01 16:47:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-02 09:00:13 +0200
commit0265bdb92e5dbb5ba851a3d89eb8722bdaf081be (patch)
tree46c8f87d626cb6c74e211f4dce2721ab5c9b9e14 /sw
parentcf0651fe736c1f411651ee2691ab009fe271be2f (diff)
convert GRFILTER constants to ERRCODE_GRFILTER_
since various code mixes these constants in with ErrCode values from other code, let us just make it into real ErrCode values. Change-Id: Ifa3d0f7526172609a44e6749bed9f730ab6b1a95 Reviewed-on: https://gerrit.libreoffice.org/38313 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/view.hxx2
-rw-r--r--sw/source/core/doc/notxtfrm.cxx2
-rw-r--r--sw/source/core/graphic/ndgrf.cxx4
-rw-r--r--sw/source/filter/html/htmlgrin.cxx4
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx4
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx4
-rw-r--r--sw/source/uibase/shells/drawsh.cxx4
-rw-r--r--sw/source/uibase/uiview/view2.cxx22
8 files changed, 23 insertions, 23 deletions
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index 55f87ec82937..23136b765819 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -615,7 +615,7 @@ public:
void StateFormatPaintbrush(SfxItemSet &);
//public fuer D&D
- int InsertGraphic( const OUString &rPath, const OUString &rFilter,
+ ErrCode InsertGraphic( const OUString &rPath, const OUString &rFilter,
bool bLink, GraphicFilter *pFlt );
void ExecuteScan( SfxRequest& rReq );
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 4156753cf966..811b0ceb1c7e 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -800,7 +800,7 @@ void paintGraphicUsingPrimitivesHelper(vcl::RenderContext & rOutputDevice,
Graphic aTempGraphic;
INetURLObject aURL(rGrfObj.GetLink());
- if (GRFILTER_OK == GraphicFilter::GetGraphicFilter().ImportGraphic(aTempGraphic, aURL))
+ if (ERRCODE_NONE == GraphicFilter::GetGraphicFilter().ImportGraphic(aTempGraphic, aURL))
{
if(aTempGraphic.IsLink() && GfxLinkType::NativeJpg == aTempGraphic.GetLink().GetType())
{
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 72c4c3cc3f76..49052dfa0e23 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -769,9 +769,9 @@ void SwGrfNode::ReleaseLink()
// data we have (but without knowing the original format)
GraphicFilter& rFlt = GraphicFilter::GetGraphicFilter();
Graphic aNew;
- int nRes = GraphicFilter::LoadGraphic( aFileName, OUString(), aNew, &rFlt);
+ ErrCode nRes = GraphicFilter::LoadGraphic( aFileName, OUString(), aNew, &rFlt);
- if(GRFILTER_OK == nRes)
+ if(ERRCODE_NONE == nRes)
{
maGrfObj.SetGraphic(aNew);
}
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 153d1e31e346..12f035d83b76 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -457,13 +457,13 @@ IMAGE_SETEVENT:
std::unique_ptr<SvMemoryStream> const pStream(aGraphicURL.getData());
if (pStream)
{
- if (GRFILTER_OK == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, "", *pStream))
+ if (ERRCODE_NONE == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, "", *pStream))
sGrfNm.clear();
}
}
else if (m_sBaseURL.isEmpty()) // sBaseURL is empty if the source is clipboard
{
- if (GRFILTER_OK == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, aGraphicURL))
+ if (ERRCODE_NONE == GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, aGraphicURL))
sGrfNm.clear();
}
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index d509c8af8c35..e11013186485 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -169,13 +169,13 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
{
Graphic aGr1;
GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
- if( rGF.ImportGraphic( aGr1, OUString(), *pGraphicStream ) == GRFILTER_OK )
+ if( rGF.ImportGraphic( aGr1, OUString(), *pGraphicStream ) == ERRCODE_NONE )
{
Graphic aGr2;
delete pGraphicStream;
pGraphicStream =
::utl::UcbStreamHelper::CreateStream( aCnt.GetGraphicStream( pRet->GetObjRef() ) );
- if( pGraphicStream && rGF.ImportGraphic( aGr2, OUString(), *pGraphicStream ) == GRFILTER_OK )
+ if( pGraphicStream && rGF.ImportGraphic( aGr2, OUString(), *pGraphicStream ) == ERRCODE_NONE )
{
if ( aGr1 == aGr2 )
bGraphicNeeded = false;
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index a21b3648dd72..edcad002edc8 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1950,7 +1950,7 @@ bool SwTransferable::PasteTargetURL( TransferableDataHelper& rData,
//!!! check at FileSystem - only then it make sense to test graphics !!!
Graphic aGraphic;
GraphicFilter &rFlt = GraphicFilter::GetGraphicFilter();
- bRet = GRFILTER_OK == GraphicFilter::LoadGraphic( sURL, aEmptyOUStr, aGraphic, &rFlt );
+ bRet = ERRCODE_NONE == GraphicFilter::LoadGraphic( sURL, aEmptyOUStr, aGraphic, &rFlt );
if( bRet )
{
@@ -2313,7 +2313,7 @@ bool SwTransferable::PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
{
//!!! check at FileSystem - only then it makes sense to test the graphics !!!
GraphicFilter &rFlt = GraphicFilter::GetGraphicFilter();
- bRet = GRFILTER_OK == GraphicFilter::LoadGraphic( aBkmk.GetURL(), aEmptyOUStr,
+ bRet = ERRCODE_NONE == GraphicFilter::LoadGraphic( aBkmk.GetURL(), aEmptyOUStr,
aGraphic, &rFlt );
if( !bRet && SwPasteSdr::SetAttr == nAction &&
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index 0d529b38d81d..b1b97df5368c 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -126,12 +126,12 @@ void SwDrawShell::InsertPictureFromFile(SdrObject& rObject)
{
SvxOpenGraphicDialog aDlg(SwResId(STR_INSERT_GRAPHIC));
- if(GRFILTER_OK == aDlg.Execute())
+ if(ERRCODE_NONE == aDlg.Execute())
{
Graphic aGraphic;
int nError(aDlg.GetGraphic(aGraphic));
- if(GRFILTER_OK == nError)
+ if(ERRCODE_NONE == nError)
{
const bool bAsLink(aDlg.IsAsLink());
SdrObject* pResult = &rObject;
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index a677c3ac9ad6..117dd7fbd969 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -212,20 +212,20 @@ OUString SwView::GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUStr
return aStr;
}
-int SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter,
+ErrCode SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter,
bool bLink, GraphicFilter *pFilter )
{
SwWait aWait( *GetDocShell(), true );
Graphic aGraphic;
- int aResult = GRFILTER_OK;
+ ErrCode aResult = ERRCODE_NONE;
if( !pFilter )
{
pFilter = &GraphicFilter::GetGraphicFilter();
}
aResult = GraphicFilter::LoadGraphic( rPath, rFilter, aGraphic, pFilter );
- if( GRFILTER_OK == aResult )
+ if( ERRCODE_NONE == aResult )
{
GraphicNativeMetadata aMetadata;
if ( aMetadata.read(aGraphic) )
@@ -449,10 +449,10 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
rSh.StartUndo(SwUndoId::INSERT, &aRewriter);
- int nError = InsertGraphic( aFileName, aFilterName, bAsLink, &GraphicFilter::GetGraphicFilter() );
+ ErrCode nError = InsertGraphic( aFileName, aFilterName, bAsLink, &GraphicFilter::GetGraphicFilter() );
// format not equal to current filter (with autodetection)
- if( nError == GRFILTER_FORMATERROR )
+ if( nError == ERRCODE_GRFILTER_FORMATERROR )
nError = InsertGraphic( aFileName, OUString(), bAsLink, &GraphicFilter::GetGraphicFilter() );
// #i123922# no new FrameFormat for replace mode, only when new object was created,
@@ -470,22 +470,22 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
sal_uInt32 nResId(0);
switch( nError )
{
- case GRFILTER_OPENERROR:
+ case ERRCODE_GRFILTER_OPENERROR:
nResId = STR_GRFILTER_OPENERROR;
break;
- case GRFILTER_IOERROR:
+ case ERRCODE_GRFILTER_IOERROR:
nResId = STR_GRFILTER_IOERROR;
break;
- case GRFILTER_FORMATERROR:
+ case ERRCODE_GRFILTER_FORMATERROR:
nResId = STR_GRFILTER_FORMATERROR;
break;
- case GRFILTER_VERSIONERROR:
+ case ERRCODE_GRFILTER_VERSIONERROR:
nResId = STR_GRFILTER_VERSIONERROR;
break;
- case GRFILTER_FILTERERROR:
+ case ERRCODE_GRFILTER_FILTERERROR:
nResId = STR_GRFILTER_FILTERERROR;
break;
- case GRFILTER_TOOBIG:
+ case ERRCODE_GRFILTER_TOOBIG:
nResId = STR_GRFILTER_TOOBIG;
break;
}