summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-01-17 14:28:41 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-01-17 14:30:59 -0500
commit1fb5ecdd7442247e0ed8154928b66fab0bcbe3ad (patch)
treeb3fb2f85d285f2080a65b0d0526a3f82d7790bec /sw
parent3f390be5a7f3dd0108e2257fa57cfcca6d0859e3 (diff)
Const correct-ness in one place...
And an avalanche of changes that ensued. Change-Id: I7f882b621ba5af4cd01b2ac7f482ee3eed24e3d5
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/ndole.hxx2
-rw-r--r--sw/source/core/doc/notxtfrm.cxx2
-rw-r--r--sw/source/core/frmedt/fecopy.cxx2
-rw-r--r--sw/source/core/ole/ndole.cxx2
-rw-r--r--sw/source/core/unocore/unoframe.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx2
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx2
-rw-r--r--sw/source/filter/xml/swxml.cxx2
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx4
-rw-r--r--sw/source/ui/inc/swdtflvr.hxx2
12 files changed, 13 insertions, 13 deletions
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index a93911e6b7bc..9596d4ba7d81 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -110,7 +110,7 @@ public:
virtual Size GetTwipSize() const;
- Graphic* GetGraphic();
+ const Graphic* GetGraphic();
void GetNewReplacement();
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 914e189a2707..e87c9bf26a32 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -1114,7 +1114,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
//TODO/LATER: is it a problem that the JobSetup isn't used?
//xRef->DoDraw( pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), *pJobSetup );
- Graphic* pGraphic = pOLENd->GetGraphic();
+ const Graphic* pGraphic = pOLENd->GetGraphic();
if ( pGraphic && pGraphic->GetType() != GRAPHIC_NONE )
{
pGraphic->Draw( pOut, aPosition, aSize );
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index e30b18f9cba9..7144549f658d 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1312,7 +1312,7 @@ static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SdrModel* _pModel )
// get its graphic
Graphic aGraphic;
pOle2Obj->Connect();
- Graphic* pGraphic = pOle2Obj->GetGraphic();
+ const Graphic* pGraphic = pOle2Obj->GetGraphic();
if( pGraphic )
aGraphic = *pGraphic;
pOle2Obj->Disconnect();
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 71775aa33853..f9dbc73a5ff9 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -262,7 +262,7 @@ SwOLENode::~SwOLENode()
delete pGraphic;
}
-Graphic* SwOLENode::GetGraphic()
+const Graphic* SwOLENode::GetGraphic()
{
if ( aOLEObj.GetOleRef().is() )
return aOLEObj.xOLERef.GetGraphic();
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index b70bc19ecf59..4e3d78360c0d 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -3085,7 +3085,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL SwXTextEmbeddedObject::getReplaceme
pDoc->GetNodes()[ pCnt->GetCntntIdx()->
GetIndex() + 1 ]->GetOLENode(), "kein OLE-Node?");
- Graphic* pGraphic = pDoc->GetNodes()[ pCnt->GetCntntIdx()->GetIndex() + 1 ]->GetOLENode()->GetGraphic();
+ const Graphic* pGraphic = pDoc->GetNodes()[ pCnt->GetCntntIdx()->GetIndex() + 1 ]->GetOLENode()->GetGraphic();
if ( pGraphic )
return pGraphic->GetXGraphic();
}
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 9d1ded5a685f..b2cf7e303a75 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2025,7 +2025,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
else
{
// inline, we also have to write the image itself
- Graphic* pGraphic = 0;
+ const Graphic* pGraphic = 0;
if (pGrfNode)
pGraphic = &const_cast< Graphic& >( pGrfNode->GetGrf() );
else
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 14afa3619218..867d6c290522 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3336,7 +3336,7 @@ void RtfAttributeOutput::FlyFrameOLEReplacement(const SwFlyFrmFmt* pFlyFrmFmt, S
Size aRendered(aSize);
aRendered.Width() = rSize.Width();
aRendered.Height() = rSize.Height();
- Graphic* pGraphic = rOLENode.GetGraphic();
+ const Graphic* pGraphic = rOLENode.GetGraphic();
Size aMapped(pGraphic->GetPrefSize());
const SwCropGrf &rCr = (const SwCropGrf &)rOLENode.GetAttr(RES_GRFATR_CROPGRF);
const sal_Char* pBLIPType = OOO_STRING_SVTOOLS_RTF_PNGBLIP;
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index ad8f3a88bab1..ef3738695690 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -866,7 +866,7 @@ namespace sw
rtl::OUString msOrigPersistName;
com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > mxIPRef;
SfxObjectShell& mrPers;
- Graphic* mpGraphic;
+ const Graphic* mpGraphic;
public:
/** Take ownership of a SdrOle2Objs OLE object
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 8707c22a0510..d0e16d787651 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1552,7 +1552,7 @@ sal_Int32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nSh
instead ==> allows unicode text to be preserved
*/
#ifdef OLE_PREVIEW_AS_EMF
- Graphic* pGraphic = rOLENd.GetGraphic();
+ const Graphic* pGraphic = rOLENd.GetGraphic();
#endif
OpenContainer(ESCHER_SpContainer);
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index c009af1b627b..84a49a34ba45 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -490,7 +490,7 @@ static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SwDoc& _rDoc )
// get its graphic
Graphic aGraphic;
pOle2Obj->Connect();
- Graphic* pGraphic = pOle2Obj->GetGraphic();
+ const Graphic* pGraphic = pOle2Obj->GetGraphic();
if( pGraphic )
aGraphic = *pGraphic;
pOle2Obj->Disconnect();
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 9dd3f36c9d9d..30b8ae9471cc 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -327,7 +327,7 @@ uno::Reference < embed::XEmbeddedObject > SwTransferable::FindOLEObj( sal_Int64&
return xObj;
}
-Graphic* SwTransferable::FindOLEReplacementGraphic() const
+const Graphic* SwTransferable::FindOLEReplacementGraphic() const
{
if( pClpDocFac )
{
@@ -456,7 +456,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
// get OLE-Object from ClipDoc and get the data from that.
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; // will be set in the next statement
uno::Reference < embed::XEmbeddedObject > xObj = FindOLEObj( nAspect );
- Graphic* pOLEGraph = FindOLEReplacementGraphic();
+ const Graphic* pOLEGraph = FindOLEReplacementGraphic();
if( xObj.is() )
{
TransferableDataHelper aD( new SvEmbedTransferHelper( xObj, pOLEGraph, nAspect ) );
diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx
index 9a87ec66092a..c4610263246b 100644
--- a/sw/source/ui/inc/swdtflvr.hxx
+++ b/sw/source/ui/inc/swdtflvr.hxx
@@ -79,7 +79,7 @@ class SwTransferable : public TransferableHelper
// helper methods for the copy
com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > FindOLEObj( sal_Int64& nAspect ) const;
- Graphic* FindOLEReplacementGraphic() const;
+ const Graphic* FindOLEReplacementGraphic() const;
void DeleteSelection();
// helper methods for the paste