summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-05-19 23:19:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-05-20 15:21:51 +0100
commit45c009cfc8e7f3f8d8a7177aa493ac53657c09dc (patch)
treeca9948c9dc873f24698ff787b246e71007b7b797
parent908f56761eb0b789137c50cfee1e8a84a1db51d2 (diff)
adjust for return by ref instead of pointer
-rw-r--r--sc/source/filter/html/htmlpars.cxx10
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx2
-rw-r--r--sc/source/ui/view/viewfun4.cxx6
3 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 7af88be0b..0c3531af7 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -82,9 +82,9 @@ ScHTMLParser::ScHTMLParser( EditEngine* pEditEngine, ScDocument* pDoc ) :
ScEEParser( pEditEngine ),
mpDoc( pDoc )
{
- SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
+ SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get();
for( sal_uInt16 nIndex = 0; nIndex < SC_HTML_FONTSIZES; ++nIndex )
- maFontHeights[ nIndex ] = pHtmlOptions->GetFontSize( nIndex ) * 20;
+ maFontHeights[ nIndex ] = rHtmlOptions.GetFontSize( nIndex ) * 20;
}
ScHTMLParser::~ScHTMLParser()
@@ -1285,9 +1285,9 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo )
sal_uInt16 nFormat;
Graphic* pGraphic = new Graphic;
- GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter();
+ GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
if ( GRFILTER_OK != GraphicFilter::LoadGraphic( pImage->aURL, pImage->aFilterName,
- *pGraphic, pFilter, &nFormat ) )
+ *pGraphic, &rFilter, &nFormat ) )
{
delete pGraphic;
return ; // dumm gelaufen
@@ -1297,7 +1297,7 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo )
pActEntry->bHasGraphic = sal_True;
pActEntry->aAltText.Erase();
}
- pImage->aFilterName = pFilter->GetImportFormatName( nFormat );
+ pImage->aFilterName = rFilter.GetImportFormatName( nFormat );
pImage->pGraphic = pGraphic;
if ( !(pImage->aSize.Width() && pImage->aSize.Height()) )
{
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index 392497f54..30549f6ec 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -224,7 +224,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
bAsLink = ((const SfxBoolItem*)pItem)->GetValue();
Graphic aGraphic;
- int nError = GraphicFilter::LoadGraphic( aFileName, aFilterName, aGraphic, GraphicFilter::GetGraphicFilter() );
+ int nError = GraphicFilter::LoadGraphic( aFileName, aFilterName, aGraphic, &GraphicFilter::GetGraphicFilter() );
if ( nError == GRFILTER_OK )
{
lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, sal_True, pViewSh, pWindow, pView );
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 818f3f560..48474282c 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -653,15 +653,15 @@ sal_Bool ScViewFunc::PasteFile( const Point& rPos, const String& rFile, sal_Bool
sal_uInt16 nFilterFormat;
Graphic aGraphic;
- GraphicFilter* pGraphicFilter = GraphicFilter::GetGraphicFilter();
+ GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
- if (!pGraphicFilter->ImportGraphic(aGraphic, aURL,
+ if (!rGraphicFilter.ImportGraphic(aGraphic, aURL,
GRFILTER_FORMAT_DONTKNOW, &nFilterFormat ))
{
if ( bLink )
{
- String aFltName = pGraphicFilter->GetImportFormatName(nFilterFormat);
+ String aFltName = rGraphicFilter.GetImportFormatName(nFilterFormat);
return PasteGraphic( rPos, aGraphic, aStrURL, aFltName );
}
else