[Libreoffice-commits] .: 5 commits - filter/source oox/inc oox/source reportdesign/source sc/source sd/source svtools/inc svtools/source svx/inc svx/source sw/inc sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 17 11:29:47 PST 2013


 filter/source/msfilter/escherex.cxx                      |    2 
 oox/inc/oox/export/drawingml.hxx                         |    2 
 oox/inc/oox/export/shapes.hxx                            |    2 
 oox/source/export/drawingml.cxx                          |    2 
 oox/source/export/shapes.cxx                             |    4 
 reportdesign/source/core/sdr/ReportDrawPage.cxx          |    1 
 reportdesign/source/core/sdr/RptObject.cxx               |    1 
 reportdesign/source/ui/report/dlgedfunc.cxx              |    1 
 sc/source/core/tool/chartlock.cxx                        |    2 
 sc/source/filter/html/htmlexp2.cxx                       |    2 
 sc/source/filter/xcl97/xcl97rec.cxx                      |    1 
 sc/source/ui/drawfunc/chartsh.cxx                        |    2 
 sc/source/ui/view/drawvie3.cxx                           |    2 
 sc/source/ui/view/drawvie4.cxx                           |    5 
 sd/source/ui/app/sdxfer.cxx                              |    2 
 svtools/inc/svtools/embedhlp.hxx                         |  162 +++----
 svtools/inc/svtools/embedtransfer.hxx                    |    4 
 svtools/source/misc/embedhlp.cxx                         |  321 ++++++++-------
 svtools/source/misc/embedtransfer.cxx                    |    4 
 svx/inc/svx/svdoole2.hxx                                 |    2 
 svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx |    1 
 svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx  |    2 
 svx/source/svdraw/charthelper.cxx                        |    1 
 svx/source/svdraw/svdoole2.cxx                           |    4 
 svx/source/unodraw/unoshap4.cxx                          |    7 
 svx/source/unodraw/unoshape.cxx                          |    2 
 sw/inc/ndole.hxx                                         |    2 
 sw/source/core/doc/notxtfrm.cxx                          |    2 
 sw/source/core/draw/dview.cxx                            |    1 
 sw/source/core/frmedt/fecopy.cxx                         |    2 
 sw/source/core/frmedt/feshview.cxx                       |    6 
 sw/source/core/ole/ndole.cxx                             |    2 
 sw/source/core/unocore/unoframe.cxx                      |    2 
 sw/source/filter/html/htmlplug.cxx                       |    7 
 sw/source/filter/ww8/docxattributeoutput.cxx             |    2 
 sw/source/filter/ww8/rtfattributeoutput.cxx              |    2 
 sw/source/filter/ww8/writerhelper.hxx                    |    2 
 sw/source/filter/ww8/wrtw8esh.cxx                        |    2 
 sw/source/filter/ww8/ww8par4.cxx                         |    1 
 sw/source/filter/xml/swxml.cxx                           |    2 
 sw/source/ui/dochdl/swdtflvr.cxx                         |    4 
 sw/source/ui/inc/swdtflvr.hxx                            |    2 
 sw/source/ui/shells/textsh.cxx                           |    1 
 43 files changed, 311 insertions(+), 272 deletions(-)

New commits:
commit 1fb5ecdd7442247e0ed8154928b66fab0bcbe3ad
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Jan 17 14:28:41 2013 -0500

    Const correct-ness in one place...
    
    And an avalanche of changes that ensued.
    
    Change-Id: I7f882b621ba5af4cd01b2ac7f482ee3eed24e3d5

diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 9949d3d..cf08b7f 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1132,7 +1132,7 @@ sal_Bool EscherPropertyContainer::CreateOLEGraphicProperties(
         SdrObject* pSdrOLE2( GetSdrObjectFromXShape( rXShape ) );   // SJ: leaving unoapi, because currently there is
         if ( pSdrOLE2 && pSdrOLE2->ISA( SdrOle2Obj ) )              // no access to the native graphic object
         {
-            Graphic* pGraphic = ((SdrOle2Obj*)pSdrOLE2)->GetGraphic();
+            const Graphic* pGraphic = static_cast<SdrOle2Obj*>(pSdrOLE2)->GetGraphic();
             if ( pGraphic )
             {
                 GraphicObject aGraphicObject( *pGraphic );
diff --git a/oox/inc/oox/export/drawingml.hxx b/oox/inc/oox/export/drawingml.hxx
index 818531d..a355ac4 100644
--- a/oox/inc/oox/export/drawingml.hxx
+++ b/oox/inc/oox/export/drawingml.hxx
@@ -110,7 +110,7 @@ public:
     void WriteStretch();
     void WriteLinespacing( ::com::sun::star::style::LineSpacing& rLineSpacing );
 
-    ::rtl::OUString WriteBlip( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet, ::rtl::OUString& rURL, Graphic *pGraphic=NULL );
+    ::rtl::OUString WriteBlip( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet, ::rtl::OUString& rURL, const Graphic *pGraphic=NULL );
     void WriteBlipMode( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet );
 
     void WriteShapeTransformation( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > rXShape,
diff --git a/oox/inc/oox/export/shapes.hxx b/oox/inc/oox/export/shapes.hxx
index 5f83326..39b4c0d 100644
--- a/oox/inc/oox/export/shapes.hxx
+++ b/oox/inc/oox/export/shapes.hxx
@@ -62,7 +62,7 @@ public:
 protected:
     sal_Int32           mnShapeIdMax, mnPictureIdMax;
 
-    void WriteGraphicObjectShapePart( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape, Graphic *pGraphic=NULL );
+    void WriteGraphicObjectShapePart( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape, const Graphic *pGraphic=NULL );
 
 private:
     sal_Int32           mnXmlNamespace;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 1a57432..2d9bd9f 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -526,7 +526,7 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic )
     return sRelId;
 }
 
-OUString DrawingML::WriteBlip( Reference< XPropertySet > rXPropSet, OUString& rURL, Graphic *pGraphic )
+OUString DrawingML::WriteBlip( Reference< XPropertySet > rXPropSet, OUString& rURL, const Graphic *pGraphic )
 {
     OUString sRelId = pGraphic ? WriteImage( *pGraphic ) : WriteImage( rURL );
     sal_Int16 nBright = 0;
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 9c8436e..df14d12 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -816,7 +816,7 @@ ShapeExport& ShapeExport::WriteGraphicObjectShape( Reference< XShape > xShape )
     return *this;
 }
 
-void ShapeExport::WriteGraphicObjectShapePart( Reference< XShape > xShape, Graphic* pGraphic )
+void ShapeExport::WriteGraphicObjectShapePart( Reference< XShape > xShape, const Graphic* pGraphic )
 {
     DBG(printf("write graphic object shape\n"));
 
@@ -1382,7 +1382,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( Reference< XShape > xShape )
                         SdrObject* pSdrOLE2( GetSdrObjectFromXShape( xShape ) );
                         if ( pSdrOLE2 && pSdrOLE2->ISA( SdrOle2Obj ) )
                         {
-                            Graphic* pGraphic = ((SdrOle2Obj*)pSdrOLE2)->GetGraphic();
+                            const Graphic* pGraphic = ((SdrOle2Obj*)pSdrOLE2)->GetGraphic();
                             if ( pGraphic )
                                 WriteGraphicObjectShapePart( xShape, pGraphic );
                         }
diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx
index dfc8fb1..0d31c27 100644
--- a/sc/source/filter/html/htmlexp2.cxx
+++ b/sc/source/filter/html/htmlexp2.cxx
@@ -160,7 +160,7 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE )
         break;
         case OBJ_OLE2:
         {
-            Graphic* pGraphic = ((SdrOle2Obj*)pObject)->GetGraphic();
+            const Graphic* pGraphic = static_cast<SdrOle2Obj*>(pObject)->GetGraphic();
             if ( pGraphic )
             {
                 String aLinkName;
diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx
index 251fa5d..06ff385 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -90,7 +90,7 @@ void ScChartShell::ExecuteExportAsGraphic( SfxRequest& )
         {
             SdrOle2Obj* aOle2Object = ((SdrOle2Obj*) pObject)->Clone();
             aOle2Object->NbcResize(Point(), Fraction(1,1), Fraction(1,1));
-            Graphic* pGraphic = aOle2Object->GetGraphic();
+            const Graphic* pGraphic = aOle2Object->GetGraphic();
             if( pGraphic != NULL )
             {
                 String sGrfNm, sFilterNm;
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index 363fbf4..cb3799f 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -214,7 +214,7 @@ void ScDrawView::UpdateIMap( SdrObject* pObj )
             aGraphic = ( (SdrGrafObj*) pObj )->GetGraphic();
         else
         {
-            Graphic* pGraphic = ((const SdrOle2Obj*) pObj )->GetGraphic();
+            const Graphic* pGraphic = static_cast<const SdrOle2Obj*>(pObj)->GetGraphic();
             if ( pGraphic )
                 aGraphic = *pGraphic;
         }
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index c4a9c0d..bd6c094 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -183,7 +183,7 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj )
 
                     // TODO/LATER: the standalone handling of the graphic should not be used any more in future
                     // The EmbedDataHelper should bring the graphic in future
-                    Graphic* pObjGr = static_cast< SdrOle2Obj* >( pObj )->GetGraphic();
+                    const Graphic* pObjGr = static_cast< SdrOle2Obj* >( pObj )->GetGraphic();
                     if ( pObjGr )
                         mpGraphic = new Graphic( *pObjGr );
                 }
diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx
index 28976c6..606aad3 100644
--- a/svtools/inc/svtools/embedhlp.hxx
+++ b/svtools/inc/svtools/embedhlp.hxx
@@ -88,7 +88,7 @@ public:
 
     sal_Int64       GetViewAspect() const;
     void            SetViewAspect( sal_Int64 nAspect );
-    Graphic*        GetGraphic( ::rtl::OUString* pMediaType=0 ) const;
+    const Graphic* GetGraphic( OUString* pMediaType = NULL ) const;
 
     // the original size of the object ( size of the icon for iconified object )
     // no conversion is done if no target mode is provided
diff --git a/svtools/inc/svtools/embedtransfer.hxx b/svtools/inc/svtools/embedtransfer.hxx
index b637725..9da80b8 100644
--- a/svtools/inc/svtools/embedtransfer.hxx
+++ b/svtools/inc/svtools/embedtransfer.hxx
@@ -42,13 +42,13 @@ protected:
 public:
     // object, replacement image, and the aspect
     SvEmbedTransferHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >& xObj,
-                            Graphic* pGraphic,
+                           const Graphic* pGraphic,
                             sal_Int64 nAspect );
     ~SvEmbedTransferHelper();
 
     static void         FillTransferableObjectDescriptor( TransferableObjectDescriptor& rDesc,
                             const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >& xObj,
-                            Graphic* pGraphic,
+                            const Graphic* pGraphic,
                             sal_Int64 nAspect );
 };
 
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index c405e38..07b90d4 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -431,13 +431,13 @@ void EmbeddedObjectRef::GetReplacement( bool bUpdate )
     {
         GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
         if( mpImpl->pGraphic )
-            rGF.ImportGraphic( *mpImpl->pGraphic, String(), *pGraphicStream, GRFILTER_FORMAT_DONTKNOW );
+            rGF.ImportGraphic( *mpImpl->pGraphic, OUString(), *pGraphicStream, GRFILTER_FORMAT_DONTKNOW );
         mpImpl->mnGraphicVersion++;
         delete pGraphicStream;
     }
 }
 
-Graphic* EmbeddedObjectRef::GetGraphic( ::rtl::OUString* pMediaType ) const
+const Graphic* EmbeddedObjectRef::GetGraphic( OUString* pMediaType ) const
 {
     if ( mpImpl->bNeedUpdate )
         // bNeedUpdate will be set to false while retrieving new replacement
@@ -457,7 +457,7 @@ Size EmbeddedObjectRef::GetSize( MapMode* pTargetMapMode ) const
 
     if ( mpImpl->nViewAspect == embed::Aspects::MSOLE_ICON )
     {
-        Graphic* pGraphic = GetGraphic();
+        const Graphic* pGraphic = GetGraphic();
         if ( pGraphic )
         {
             aSourceMapMode = pGraphic->GetPrefMapMode();
diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx
index af115a0..4caf4fb 100644
--- a/svtools/source/misc/embedtransfer.cxx
+++ b/svtools/source/misc/embedtransfer.cxx
@@ -39,7 +39,7 @@
 using namespace ::com::sun::star;
 
 SvEmbedTransferHelper::SvEmbedTransferHelper( const uno::Reference< embed::XEmbeddedObject >& xObj,
-                                                Graphic* pGraphic,
+                                              const Graphic* pGraphic,
                                                 sal_Int64 nAspect )
 : m_xObj( xObj )
 , m_pGraphic( pGraphic ? new Graphic( *pGraphic ) : NULL )
@@ -190,7 +190,7 @@ void SvEmbedTransferHelper::ObjectReleased()
 
 void SvEmbedTransferHelper::FillTransferableObjectDescriptor( TransferableObjectDescriptor& rDesc,
     const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject >& xObj,
-    Graphic* pGraphic,
+    const Graphic* pGraphic,
     sal_Int64 nAspect )
 {
     //TODO/LATER: need TypeName to fill it into the Descriptor (will be shown in listbox)
diff --git a/svx/inc/svx/svdoole2.hxx b/svx/inc/svx/svdoole2.hxx
index 6fdc74d..b5442dc 100644
--- a/svx/inc/svx/svdoole2.hxx
+++ b/svx/inc/svx/svdoole2.hxx
@@ -97,7 +97,7 @@ public:
     // Ein OLE-Zeichenobjekt kann eine StarView-Grafik beinhalten.
     // Diese wird angezeigt, wenn das OLE-Objekt leer ist.
     void        SetGraphic(const Graphic* pGrf);
-    Graphic*    GetGraphic() const;
+    const Graphic* GetGraphic() const;
     void        GetNewReplacement();
 
     // the original size of the object ( size of the icon for iconified object )
diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
index 5ecedad..597b526 100644
--- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
@@ -43,7 +43,7 @@ namespace drawinglayer
 
             if(pSource)
             {
-                Graphic* pOLEGraphic = pSource->GetGraphic();
+                const Graphic* pOLEGraphic = pSource->GetGraphic();
 
                 if(pOLEGraphic)
                 {
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index cb0760e..98bd1ec 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -1291,7 +1291,7 @@ void SdrOle2Obj::Disconnect_Impl()
 
 SdrObject* SdrOle2Obj::createSdrGrafObjReplacement(bool bAddText, bool /* bUseHCGraphic */) const
 {
-    Graphic* pOLEGraphic = GetGraphic();
+    const Graphic* pOLEGraphic = GetGraphic();
 
     if(pOLEGraphic)
     {
@@ -1855,7 +1855,7 @@ void SdrOle2Obj::NbcSetLogicRect(const Rectangle& rRect)
         ImpSetVisAreaSize();
 }
 
-Graphic* SdrOle2Obj::GetGraphic() const
+const Graphic* SdrOle2Obj::GetGraphic() const
 {
     if ( xObjRef.is() )
         return xObjRef.GetGraphic();
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index a79ef11..3baea70 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -220,7 +220,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sfx
         SdrOle2Obj* pObj = dynamic_cast<SdrOle2Obj*>(mpObj.get());
         if( pObj )
         {
-            Graphic* pGraphic = pObj->GetGraphic();
+            const Graphic* pGraphic = pObj->GetGraphic();
             if( pGraphic )
             {
                 sal_Bool bIsWMF = sal_False;
@@ -326,7 +326,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sfx
     case OWN_ATTR_VALUE_GRAPHIC:
     {
         uno::Reference< graphic::XGraphic > xGraphic;
-        Graphic* pGraphic = static_cast<SdrOle2Obj*>( mpObj.get() )->GetGraphic();
+        const Graphic* pGraphic = static_cast<SdrOle2Obj*>( mpObj.get() )->GetGraphic();
         if( pGraphic )
             xGraphic = pGraphic->GetXGraphic();
         rValue <<= xGraphic;
@@ -339,7 +339,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sfx
         SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >( mpObj.get() );
         if( pOle )
         {
-            Graphic* pGraphic = pOle->GetGraphic();
+            const Graphic* pGraphic = pOle->GetGraphic();
 
             // if there isn't already a preview graphic set, check if we need to generate
             // one if model says so
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 8ff4a8b..2219525 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2928,7 +2928,7 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper
         SdrOle2Obj* pObj = dynamic_cast<SdrOle2Obj*>(mpObj.get());
         if( pObj )
         {
-            Graphic* pGraphic = pObj->GetGraphic();
+            const Graphic* pGraphic = pObj->GetGraphic();
             if( pGraphic )
             {
                 sal_Bool bIsWMF = sal_False;
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index a93911e..9596d4b 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 914e189..e87c9bf 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 e30b18f..7144549 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 71775aa..f9dbc73 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 b70bc19..4e3d783 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 9d1ded5..b2cf7e3 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 14afa36..867d6c2 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 ad8f3a8..ef37386 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 8707c22..d0e16d7 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 c009af1..84a49a3 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 9dd3f36..30b8ae9 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 9a87ec6..c461026 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
commit 3f390be5a7f3dd0108e2257fa57cfcca6d0859e3
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Jan 17 13:40:58 2013 -0500

    sal_Bool to bool.
    
    Change-Id: I6ad0385041618ebff879ec8533c13ef0ddbe239c

diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx
index 66c609b..28976c6 100644
--- a/svtools/inc/svtools/embedhlp.hxx
+++ b/svtools/inc/svtools/embedhlp.hxx
@@ -47,15 +47,15 @@ class SVT_DLLPUBLIC EmbeddedObjectRef
 {
     EmbeddedObjectRef_Impl* mpImpl;
 
-    SVT_DLLPRIVATE SvStream*   GetGraphicStream( sal_Bool bUpdate ) const;
-    SVT_DLLPRIVATE void        GetReplacement( sal_Bool bUpdate );
+    SVT_DLLPRIVATE SvStream* GetGraphicStream( bool bUpdate ) const;
+    SVT_DLLPRIVATE void GetReplacement( bool bUpdate );
 
     EmbeddedObjectRef& operator = ( const EmbeddedObjectRef& );
 
 public:
     static void DrawPaintReplacement( const Rectangle &rRect, const OUString &rText, OutputDevice *pOut );
     static void DrawShading( const Rectangle &rRect, OutputDevice *pOut );
-    static sal_Bool TryRunningState( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& );
+    static bool TryRunningState( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& );
     static void SetGraphicToContainer( const Graphic& rGraphic,
                                         comphelper::EmbeddedObjectContainer& aContainer,
                                         const ::rtl::OUString& aName,
@@ -101,12 +101,12 @@ public:
 
     void            UpdateReplacement();
     void            UpdateReplacementOnDemand();
-    void            Lock( sal_Bool bLock = sal_True );
-    sal_Bool            IsLocked() const;
+    void Lock( bool bLock = true );
     void            Clear();
     bool is() const;
 
-    sal_Bool            IsChart() const;
+    bool IsLocked() const;
+    bool IsChart() const;
 
     // #i104867#
     // Provides a graphic version number for the fetchable Graphic during this object's lifetime. Internally,
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 1bf1e77..c405e38 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -48,8 +48,7 @@
 
 using namespace com::sun::star;
 
-namespace svt
-{
+namespace svt {
 
 class EmbedEventListener_Impl : public ::cppu::WeakImplHelper4 < embed::XStateChangeListener,
                                                                  document::XEventListener,
@@ -339,7 +338,7 @@ void EmbeddedObjectRef::Clear()
                 try
                 {
                     mpImpl->mxObj->changeState(embed::EmbedStates::LOADED);
-                    xClose->close( sal_True );
+                    xClose->close( true );
                 }
                 catch (const util::CloseVetoException&)
                 {
@@ -360,12 +359,12 @@ void EmbeddedObjectRef::Clear()
         }
 
         mpImpl->mxObj = NULL;
-        mpImpl->bNeedUpdate = sal_False;
+        mpImpl->bNeedUpdate = false;
     }
 
     mpImpl->pContainer = 0;
-    mpImpl->bIsLocked = sal_False;
-    mpImpl->bNeedUpdate = sal_False;
+    mpImpl->bIsLocked = false;
+    mpImpl->bNeedUpdate = false;
 }
 
 bool EmbeddedObjectRef::is() const
@@ -397,17 +396,17 @@ void EmbeddedObjectRef::SetViewAspect( sal_Int64 nAspect )
     mpImpl->nViewAspect = nAspect;
 }
 
-void EmbeddedObjectRef::Lock( sal_Bool bLock )
+void EmbeddedObjectRef::Lock( bool bLock )
 {
     mpImpl->bIsLocked = bLock;
 }
 
-sal_Bool EmbeddedObjectRef::IsLocked() const
+bool EmbeddedObjectRef::IsLocked() const
 {
     return mpImpl->bIsLocked;
 }
 
-void EmbeddedObjectRef::GetReplacement( sal_Bool bUpdate )
+void EmbeddedObjectRef::GetReplacement( bool bUpdate )
 {
     if ( bUpdate )
     {
@@ -442,9 +441,9 @@ Graphic* EmbeddedObjectRef::GetGraphic( ::rtl::OUString* pMediaType ) const
 {
     if ( mpImpl->bNeedUpdate )
         // bNeedUpdate will be set to false while retrieving new replacement
-        const_cast < EmbeddedObjectRef* >(this)->GetReplacement( sal_True );
+        const_cast < EmbeddedObjectRef* >(this)->GetReplacement( true );
     else if ( !mpImpl->pGraphic )
-        const_cast < EmbeddedObjectRef* >(this)->GetReplacement( sal_False );
+        const_cast < EmbeddedObjectRef* >(this)->GetReplacement( false );
 
     if ( mpImpl->pGraphic && pMediaType )
         *pMediaType = mpImpl->aMediaType;
@@ -538,7 +537,7 @@ void EmbeddedObjectRef::SetGraphicStream( const uno::Reference< io::XInputStream
         delete pGraphicStream;
     }
 
-    mpImpl->bNeedUpdate = sal_False;
+    mpImpl->bNeedUpdate = false;
 
 }
 
@@ -553,10 +552,10 @@ void EmbeddedObjectRef::SetGraphic( const Graphic& rGraphic, const ::rtl::OUStri
     if ( mpImpl->pContainer )
         SetGraphicToContainer( rGraphic, *mpImpl->pContainer, mpImpl->aPersistName, rMediaType );
 
-    mpImpl->bNeedUpdate = sal_False;
+    mpImpl->bNeedUpdate = false;
 }
 
-SvStream* EmbeddedObjectRef::GetGraphicStream( sal_Bool bUpdate ) const
+SvStream* EmbeddedObjectRef::GetGraphicStream( bool bUpdate ) const
 {
     RTL_LOGFILE_CONTEXT( aLog, "svtools (mv76033) svt::EmbeddedObjectRef::GetGraphicStream" );
     DBG_ASSERT( bUpdate || mpImpl->pContainer, "Can't retrieve current graphic!" );
@@ -605,7 +604,7 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( sal_Bool bUpdate ) const
 
             SvStream* pResult = ::utl::UcbStreamHelper::CreateStream( xStream );
             if ( pResult && bUpdate )
-                mpImpl->bNeedUpdate = sal_False;
+                mpImpl->bNeedUpdate = false;
 
             return pResult;
         }
@@ -619,7 +618,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt
     MapMode aMM( MAP_APPFONT );
     Size aAppFontSz = pOut->LogicToLogic( Size( 0, 8 ), &aMM, NULL );
     Font aFnt( rtl::OUString("Helvetica"), aAppFontSz );
-    aFnt.SetTransparent( sal_True );
+    aFnt.SetTransparent( true );
     aFnt.SetColor( Color( COL_LIGHTRED ) );
     aFnt.SetWeight( WEIGHT_BOLD );
     aFnt.SetFamily( FAMILY_SWISS );
@@ -636,9 +635,9 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt
         aPt.X() = (rRect.GetWidth()  - pOut->GetTextWidth( rText )) / 2;
         aPt.Y() = (rRect.GetHeight() - pOut->GetTextHeight()) / 2;
 
-        sal_Bool bTiny = sal_False;
-        if( aPt.X() < 0 ) bTiny = sal_True, aPt.X() = 0;
-        if( aPt.Y() < 0 ) bTiny = sal_True, aPt.Y() = 0;
+        bool bTiny = false;
+        if( aPt.X() < 0 ) bTiny = true, aPt.X() = 0;
+        if( aPt.Y() < 0 ) bTiny = true, aPt.Y() = 0;
         if( bTiny )
         {
             // heruntergehen bei kleinen Bildern
@@ -720,10 +719,10 @@ void EmbeddedObjectRef::DrawShading( const Rectangle &rRect, OutputDevice *pOut
 
 }
 
-sal_Bool EmbeddedObjectRef::TryRunningState( const uno::Reference < embed::XEmbeddedObject >& xEmbObj )
+bool EmbeddedObjectRef::TryRunningState( const uno::Reference < embed::XEmbeddedObject >& xEmbObj )
 {
     if ( !xEmbObj.is() )
-        return sal_False;
+        return false;
 
     try
     {
@@ -732,10 +731,10 @@ sal_Bool EmbeddedObjectRef::TryRunningState( const uno::Reference < embed::XEmbe
     }
     catch (const uno::Exception&)
     {
-        return sal_False;
+        return false;
     }
 
-    return sal_True;
+    return true;
 }
 
 void EmbeddedObjectRef::SetGraphicToContainer( const Graphic& rGraphic,
@@ -767,13 +766,13 @@ uno::Reference< io::XInputStream > EmbeddedObjectRef::GetGraphicReplacementStrea
 
 void EmbeddedObjectRef::UpdateReplacement()
 {
-    GetReplacement( sal_True );
+    GetReplacement( true );
 }
 
 void EmbeddedObjectRef::UpdateReplacementOnDemand()
 {
     DELETEZ( mpImpl->pGraphic );
-    mpImpl->bNeedUpdate = sal_True;
+    mpImpl->bNeedUpdate = true;
     mpImpl->mnGraphicVersion++;
 
     if( mpImpl->pContainer )
@@ -783,7 +782,7 @@ void EmbeddedObjectRef::UpdateReplacementOnDemand()
     }
 }
 
-sal_Bool EmbeddedObjectRef::IsChart() const
+bool EmbeddedObjectRef::IsChart() const
 {
     //todo maybe for 3.0:
     //if the changes work good for chart
@@ -802,10 +801,10 @@ sal_Bool EmbeddedObjectRef::IsChart() const
         || SvGlobalName(SO3_SCH_CLASSID_50) == aObjClsId
         || SvGlobalName(SO3_SCH_CLASSID_60) == aObjClsId)
     {
-        return sal_True;
+        return true;
     }
 
-    return sal_False;
+    return false;
 }
 
 // #i104867#
commit a6b459c8598df19f62b0cd4cb4b29de3791a3991
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Jan 17 11:36:39 2013 -0500

    Proper construction of the impl class, using initializer.
    
    And make sure the whole thing still builds.
    
    Change-Id: I49d3c01d288df800e3261ce7d4f07080be2a4098

diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index 11cf7cc..137278a 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -29,6 +29,7 @@
 #include <svx/svdmodel.hxx>
 #include <com/sun/star/report/XFixedLine.hpp>
 #include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
 
 #include <tools/diagnose_ex.h>
 #include <svx/unoshape.hxx>
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 13fb18a..6ba0623 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -47,6 +47,7 @@
 #include <com/sun/star/awt/TextAlign.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/embed/XComponentSupplier.hpp>
 #include <com/sun/star/script/XScriptEventsSupplier.hpp>
 #include <com/sun/star/container/XContainer.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx
index a6adf88..3b044fa 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -21,6 +21,7 @@
 #include <vcl/seleng.hxx>
 #include <com/sun/star/linguistic2/XSpellChecker1.hpp>
 #include <com/sun/star/embed/EmbedStates.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 
 #include <svx/svdview.hxx>
diff --git a/sc/source/core/tool/chartlock.cxx b/sc/source/core/tool/chartlock.cxx
index dd6c182..5e73c82 100644
--- a/sc/source/core/tool/chartlock.cxx
+++ b/sc/source/core/tool/chartlock.cxx
@@ -27,6 +27,8 @@
 #include "document.hxx"
 #include "drwlayer.hxx"
 
+#include <com/sun/star/embed/XComponentSupplier.hpp>
+
 using namespace com::sun::star;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::WeakReference;
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index ec653f0..a7a042e 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -70,6 +70,7 @@
 
 #include <com/sun/star/sheet/XCellAddressable.hpp>
 #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
 #include <oox/token/tokens.hxx>
 #include <oox/export/shapes.hxx>
 #include <oox/export/utils.hxx>
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index cf5dbe9..c49820b 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
-
 #include <svx/svditer.hxx>
 #include <svx/svdograf.hxx>
 #include <svx/svdogrp.hxx>
@@ -42,6 +40,9 @@
 #include "globstr.hrc"
 #include "chartarr.hxx"
 
+#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
+
 using namespace com::sun::star;
 
 // STATIC DATA -----------------------------------------------------------
diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx
index 6e05212..66c609b 100644
--- a/svtools/inc/svtools/embedhlp.hxx
+++ b/svtools/inc/svtools/embedhlp.hxx
@@ -22,8 +22,6 @@
 
 #include "svtools/svtdllapi.h"
 #include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/embed/XEmbeddedObject.hpp>
-#include <com/sun/star/embed/Aspects.hpp>
 #include <com/sun/star/io/XInputStream.hpp>
 #include <vcl/graph.hxx>
 #include <tools/mapunit.hxx>
@@ -34,27 +32,27 @@ namespace comphelper
     class EmbeddedObjectContainer;
 }
 
+namespace com { namespace sun { namespace star { namespace embed {
+    class XEmbeddedObject;
+}}}}
+
 class Rectangle;
 class OutputDevice;
 
 namespace svt {
 
 struct EmbeddedObjectRef_Impl;
+
 class SVT_DLLPUBLIC EmbeddedObjectRef
 {
-    EmbeddedObjectRef_Impl*  mpImp;
-    ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject > mxObj;
+    EmbeddedObjectRef_Impl* mpImpl;
 
     SVT_DLLPRIVATE SvStream*   GetGraphicStream( sal_Bool bUpdate ) const;
     SVT_DLLPRIVATE void        GetReplacement( sal_Bool bUpdate );
-    SVT_DLLPRIVATE void        Construct_Impl();
 
     EmbeddedObjectRef& operator = ( const EmbeddedObjectRef& );
 
 public:
-    const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& operator ->() const { return mxObj; }
-    const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& GetObject() const { return mxObj; }
-
     static void DrawPaintReplacement( const Rectangle &rRect, const OUString &rText, OutputDevice *pOut );
     static void DrawShading( const Rectangle &rRect, OutputDevice *pOut );
     static sal_Bool TryRunningState( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& );
@@ -69,6 +67,9 @@ public:
                                         ::rtl::OUString* pMediaType )
                             throw();
 
+    const com::sun::star::uno::Reference <com::sun::star::embed::XEmbeddedObject>& operator->() const;
+    const com::sun::star::uno::Reference <com::sun::star::embed::XEmbeddedObject>& GetObject() const;
+
     // default constructed object; needs further assignment before it can be used
     EmbeddedObjectRef();
 
@@ -98,12 +99,12 @@ public:
                         const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInGrStream,
                         const ::rtl::OUString& rMediaType );
 
-    void            UpdateReplacement() { GetReplacement( sal_True ); }
+    void            UpdateReplacement();
     void            UpdateReplacementOnDemand();
     void            Lock( sal_Bool bLock = sal_True );
     sal_Bool            IsLocked() const;
     void            Clear();
-    sal_Bool            is() const { return mxObj.is(); }
+    bool is() const;
 
     sal_Bool            IsChart() const;
 
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 2fa75fd..1bf1e77 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -33,10 +33,12 @@
 #include <sot/clsids.hxx>
 #include <com/sun/star/util/XModifyListener.hpp>
 #include <com/sun/star/util/XModifiable.hpp>
-#include <com/sun/star/embed/EmbedStates.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
 #include <com/sun/star/embed/EmbedMisc.hpp>
-#include <com/sun/star/embed/XStateChangeListener.hpp>
+#include <com/sun/star/embed/EmbedStates.hpp>
 #include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/embed/XStateChangeListener.hpp>
 #include <com/sun/star/datatransfer/XTransferable.hpp>
 #include <com/sun/star/chart2/XDefaultSizeTransmitter.hpp>
 #include <cppuhelper/implbase4.hxx>
@@ -218,81 +220,93 @@ void SAL_CALL EmbedEventListener_Impl::disposing( const lang::EventObject& aEven
 
 struct EmbeddedObjectRef_Impl
 {
+    uno::Reference <embed::XEmbeddedObject> mxObj;
+
     EmbedEventListener_Impl*                    xListener;
     ::rtl::OUString                             aPersistName;
     ::rtl::OUString                             aMediaType;
     comphelper::EmbeddedObjectContainer*        pContainer;
     Graphic*                                    pGraphic;
     sal_Int64                                   nViewAspect;
-    sal_Bool                                        bIsLocked;
-    sal_Bool                                    bNeedUpdate;
+    bool                                        bIsLocked:1;
+    bool                                        bNeedUpdate:1;
 
     // #i104867#
     sal_uInt32                                  mnGraphicVersion;
     awt::Size                                   aDefaultSizeForChart_In_100TH_MM;//#i103460# charts do not necessaryly have an own size within ODF files, in this case they need to use the size settings from the surrounding frame, which is made available with this member
+
+    EmbeddedObjectRef_Impl() :
+        pContainer(NULL),
+        pGraphic(NULL),
+        nViewAspect(embed::Aspects::MSOLE_CONTENT),
+        bIsLocked(false),
+        bNeedUpdate(false),
+        mnGraphicVersion(0),
+        aDefaultSizeForChart_In_100TH_MM(awt::Size(8000,7000))
+    {}
+
+    EmbeddedObjectRef_Impl( const EmbeddedObjectRef_Impl& r ) :
+        mxObj(r.mxObj),
+        aPersistName(r.aPersistName),
+        aMediaType(r.aMediaType),
+        pContainer(r.pContainer),
+        pGraphic(NULL),
+        nViewAspect(r.nViewAspect),
+        bIsLocked(r.bIsLocked),
+        bNeedUpdate(r.bNeedUpdate),
+        mnGraphicVersion(0),
+        aDefaultSizeForChart_In_100TH_MM(r.aDefaultSizeForChart_In_100TH_MM)
+    {
+        if (r.pGraphic && !r.bNeedUpdate)
+            pGraphic = new Graphic(*r.pGraphic);
+    }
+
+    ~EmbeddedObjectRef_Impl()
+    {
+        delete pGraphic;
+    }
 };
 
-void EmbeddedObjectRef::Construct_Impl()
+const uno::Reference <embed::XEmbeddedObject>& EmbeddedObjectRef::operator->() const
 {
-    mpImp = new EmbeddedObjectRef_Impl;
-    mpImp->pContainer = 0;
-    mpImp->pGraphic = 0;
-    mpImp->nViewAspect = embed::Aspects::MSOLE_CONTENT;
-    mpImp->bIsLocked = sal_False;
-    mpImp->bNeedUpdate = sal_False;
-    mpImp->mnGraphicVersion = 0;
-    mpImp->aDefaultSizeForChart_In_100TH_MM = awt::Size(8000,7000);
+    return mpImpl->mxObj;
 }
 
-EmbeddedObjectRef::EmbeddedObjectRef()
+const uno::Reference <embed::XEmbeddedObject>& EmbeddedObjectRef::GetObject() const
 {
-    Construct_Impl();
+    return mpImpl->mxObj;
 }
 
-EmbeddedObjectRef::EmbeddedObjectRef( const uno::Reference < embed::XEmbeddedObject >& xObj, sal_Int64 nAspect )
+EmbeddedObjectRef::EmbeddedObjectRef() : mpImpl(new EmbeddedObjectRef_Impl) {}
+
+EmbeddedObjectRef::EmbeddedObjectRef( const uno::Reference < embed::XEmbeddedObject >& xObj, sal_Int64 nAspect ) :
+    mpImpl(new EmbeddedObjectRef_Impl)
 {
-    Construct_Impl();
-    mpImp->nViewAspect = nAspect;
-    mxObj = xObj;
-    mpImp->xListener = EmbedEventListener_Impl::Create( this );
+    mpImpl->nViewAspect = nAspect;
+    mpImpl->mxObj = xObj;
+    mpImpl->xListener = EmbedEventListener_Impl::Create( this );
 }
 
-EmbeddedObjectRef::EmbeddedObjectRef( const EmbeddedObjectRef& rObj )
+EmbeddedObjectRef::EmbeddedObjectRef( const EmbeddedObjectRef& rObj ) :
+    mpImpl(new EmbeddedObjectRef_Impl(*rObj.mpImpl))
 {
-    mpImp = new EmbeddedObjectRef_Impl;
-    mpImp->pContainer = rObj.mpImp->pContainer;
-    mpImp->nViewAspect = rObj.mpImp->nViewAspect;
-    mpImp->bIsLocked = rObj.mpImp->bIsLocked;
-    mxObj = rObj.mxObj;
-    mpImp->xListener = EmbedEventListener_Impl::Create( this );
-    mpImp->aPersistName = rObj.mpImp->aPersistName;
-    mpImp->aMediaType = rObj.mpImp->aMediaType;
-    mpImp->bNeedUpdate = rObj.mpImp->bNeedUpdate;
-    mpImp->aDefaultSizeForChart_In_100TH_MM = rObj.mpImp->aDefaultSizeForChart_In_100TH_MM;
-
-    if ( rObj.mpImp->pGraphic && !rObj.mpImp->bNeedUpdate )
-        mpImp->pGraphic = new Graphic( *rObj.mpImp->pGraphic );
-    else
-        mpImp->pGraphic = 0;
-
-    mpImp->mnGraphicVersion = 0;
+    mpImpl->xListener = EmbedEventListener_Impl::Create( this );
 }
 
 EmbeddedObjectRef::~EmbeddedObjectRef()
 {
-    delete mpImp->pGraphic;
     Clear();
-    delete mpImp;
+    delete mpImpl;
 }
 
 void EmbeddedObjectRef::Assign( const uno::Reference < embed::XEmbeddedObject >& xObj, sal_Int64 nAspect )
 {
-    DBG_ASSERT( !mxObj.is(), "Never assign an already assigned object!" );
+    DBG_ASSERT(!mpImpl->mxObj.is(), "Never assign an already assigned object!");
 
     Clear();
-    mpImp->nViewAspect = nAspect;
-    mxObj = xObj;
-    mpImp->xListener = EmbedEventListener_Impl::Create( this );
+    mpImpl->nViewAspect = nAspect;
+    mpImpl->mxObj = xObj;
+    mpImpl->xListener = EmbedEventListener_Impl::Create( this );
 
     //#i103460#
     if ( IsChart() )
@@ -300,31 +314,31 @@ void EmbeddedObjectRef::Assign( const uno::Reference < embed::XEmbeddedObject >&
         uno::Reference < chart2::XDefaultSizeTransmitter > xSizeTransmitter( xObj, uno::UNO_QUERY );
         DBG_ASSERT( xSizeTransmitter.is(), "Object does not support XDefaultSizeTransmitter -> will cause #i103460#!" );
         if( xSizeTransmitter.is() )
-            xSizeTransmitter->setDefaultSize( mpImp->aDefaultSizeForChart_In_100TH_MM );
+            xSizeTransmitter->setDefaultSize( mpImpl->aDefaultSizeForChart_In_100TH_MM );
     }
 }
 
 void EmbeddedObjectRef::Clear()
 {
-    if ( mxObj.is() && mpImp->xListener )
+    if (mpImpl->mxObj.is() && mpImpl->xListener)
     {
-        mxObj->removeStateChangeListener( mpImp->xListener );
+        mpImpl->mxObj->removeStateChangeListener(mpImpl->xListener);
 
-        uno::Reference < util::XCloseable > xClose( mxObj, uno::UNO_QUERY );
+        uno::Reference<util::XCloseable> xClose(mpImpl->mxObj, uno::UNO_QUERY);
         if ( xClose.is() )
-            xClose->removeCloseListener( mpImp->xListener );
+            xClose->removeCloseListener( mpImpl->xListener );
 
-        uno::Reference < document::XEventBroadcaster > xBrd( mxObj, uno::UNO_QUERY );
+        uno::Reference<document::XEventBroadcaster> xBrd(mpImpl->mxObj, uno::UNO_QUERY);
         if ( xBrd.is() )
-            xBrd->removeEventListener( mpImp->xListener );
+            xBrd->removeEventListener( mpImpl->xListener );
 
-        if ( mpImp->bIsLocked )
+        if ( mpImpl->bIsLocked )
         {
             if ( xClose.is() )
             {
                 try
                 {
-                    mxObj->changeState( embed::EmbedStates::LOADED );
+                    mpImpl->mxObj->changeState(embed::EmbedStates::LOADED);
                     xClose->close( sal_True );
                 }
                 catch (const util::CloseVetoException&)
@@ -338,69 +352,74 @@ void EmbeddedObjectRef::Clear()
             }
         }
 
-        if ( mpImp->xListener )
+        if ( mpImpl->xListener )
         {
-            mpImp->xListener->pObject = 0;
-            mpImp->xListener->release();
-            mpImp->xListener = 0;
+            mpImpl->xListener->pObject = 0;
+            mpImpl->xListener->release();
+            mpImpl->xListener = 0;
         }
 
-        mxObj = 0;
-        mpImp->bNeedUpdate = sal_False;
+        mpImpl->mxObj = NULL;
+        mpImpl->bNeedUpdate = sal_False;
     }
 
-    mpImp->pContainer = 0;
-    mpImp->bIsLocked = sal_False;
-    mpImp->bNeedUpdate = sal_False;
+    mpImpl->pContainer = 0;
+    mpImpl->bIsLocked = sal_False;
+    mpImpl->bNeedUpdate = sal_False;
+}
+
+bool EmbeddedObjectRef::is() const
+{
+    return mpImpl->mxObj.is();
 }
 
 void EmbeddedObjectRef::AssignToContainer( comphelper::EmbeddedObjectContainer* pContainer, const ::rtl::OUString& rPersistName )
 {
-    mpImp->pContainer = pContainer;
-    mpImp->aPersistName = rPersistName;
+    mpImpl->pContainer = pContainer;
+    mpImpl->aPersistName = rPersistName;
 
-    if ( mpImp->pGraphic && !mpImp->bNeedUpdate && pContainer )
-        SetGraphicToContainer( *mpImp->pGraphic, *pContainer, mpImp->aPersistName, ::rtl::OUString() );
+    if ( mpImpl->pGraphic && !mpImpl->bNeedUpdate && pContainer )
+        SetGraphicToContainer( *mpImpl->pGraphic, *pContainer, mpImpl->aPersistName, ::rtl::OUString() );
 }
 
 comphelper::EmbeddedObjectContainer* EmbeddedObjectRef::GetContainer() const
 {
-    return mpImp->pContainer;
+    return mpImpl->pContainer;
 }
 
 sal_Int64 EmbeddedObjectRef::GetViewAspect() const
 {
-    return mpImp->nViewAspect;
+    return mpImpl->nViewAspect;
 }
 
 void EmbeddedObjectRef::SetViewAspect( sal_Int64 nAspect )
 {
-    mpImp->nViewAspect = nAspect;
+    mpImpl->nViewAspect = nAspect;
 }
 
 void EmbeddedObjectRef::Lock( sal_Bool bLock )
 {
-    mpImp->bIsLocked = bLock;
+    mpImpl->bIsLocked = bLock;
 }
 
 sal_Bool EmbeddedObjectRef::IsLocked() const
 {
-    return mpImp->bIsLocked;
+    return mpImpl->bIsLocked;
 }
 
 void EmbeddedObjectRef::GetReplacement( sal_Bool bUpdate )
 {
     if ( bUpdate )
     {
-        DELETEZ( mpImp->pGraphic );
-        mpImp->aMediaType = ::rtl::OUString();
-        mpImp->pGraphic = new Graphic;
-        mpImp->mnGraphicVersion++;
+        DELETEZ( mpImpl->pGraphic );
+        mpImpl->aMediaType = ::rtl::OUString();
+        mpImpl->pGraphic = new Graphic;
+        mpImpl->mnGraphicVersion++;
     }
-    else if ( !mpImp->pGraphic )
+    else if ( !mpImpl->pGraphic )
     {
-        mpImp->pGraphic = new Graphic;
-        mpImp->mnGraphicVersion++;
+        mpImpl->pGraphic = new Graphic;
+        mpImpl->mnGraphicVersion++;
     }
     else
     {
@@ -412,24 +431,24 @@ void EmbeddedObjectRef::GetReplacement( sal_Bool bUpdate )
     if ( pGraphicStream )
     {
         GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
-        if( mpImp->pGraphic )
-            rGF.ImportGraphic( *mpImp->pGraphic, String(), *pGraphicStream, GRFILTER_FORMAT_DONTKNOW );
-        mpImp->mnGraphicVersion++;
+        if( mpImpl->pGraphic )
+            rGF.ImportGraphic( *mpImpl->pGraphic, String(), *pGraphicStream, GRFILTER_FORMAT_DONTKNOW );
+        mpImpl->mnGraphicVersion++;
         delete pGraphicStream;
     }
 }
 
 Graphic* EmbeddedObjectRef::GetGraphic( ::rtl::OUString* pMediaType ) const
 {
-    if ( mpImp->bNeedUpdate )
+    if ( mpImpl->bNeedUpdate )
         // bNeedUpdate will be set to false while retrieving new replacement
         const_cast < EmbeddedObjectRef* >(this)->GetReplacement( sal_True );
-    else if ( !mpImp->pGraphic )
+    else if ( !mpImpl->pGraphic )
         const_cast < EmbeddedObjectRef* >(this)->GetReplacement( sal_False );
 
-    if ( mpImp->pGraphic && pMediaType )
-        *pMediaType = mpImp->aMediaType;
-    return mpImp->pGraphic;
+    if ( mpImpl->pGraphic && pMediaType )
+        *pMediaType = mpImpl->aMediaType;
+    return mpImpl->pGraphic;
 }
 
 Size EmbeddedObjectRef::GetSize( MapMode* pTargetMapMode ) const
@@ -437,7 +456,7 @@ Size EmbeddedObjectRef::GetSize( MapMode* pTargetMapMode ) const
     MapMode aSourceMapMode( MAP_100TH_MM );
     Size aResult;
 
-    if ( mpImp->nViewAspect == embed::Aspects::MSOLE_ICON )
+    if ( mpImpl->nViewAspect == embed::Aspects::MSOLE_ICON )
     {
         Graphic* pGraphic = GetGraphic();
         if ( pGraphic )
@@ -452,11 +471,11 @@ Size EmbeddedObjectRef::GetSize( MapMode* pTargetMapMode ) const
     {
         awt::Size aSize;
 
-        if ( mxObj.is() )
+        if (mpImpl->mxObj.is())
         {
             try
             {
-                aSize = mxObj->getVisualAreaSize( mpImp->nViewAspect );
+                aSize = mpImpl->mxObj->getVisualAreaSize(mpImpl->nViewAspect);
             }
             catch(const embed::NoVisualAreaSizeException&)
             {
@@ -468,7 +487,7 @@ Size EmbeddedObjectRef::GetSize( MapMode* pTargetMapMode ) const
 
             try
             {
-                aSourceMapMode = VCLUnoHelper::UnoEmbed2VCLMapUnit( mxObj->getMapUnit( mpImp->nViewAspect ) );
+                aSourceMapMode = VCLUnoHelper::UnoEmbed2VCLMapUnit(mpImpl->mxObj->getMapUnit(mpImpl->nViewAspect));
             }
             catch(const uno::Exception&)
             {
@@ -494,59 +513,59 @@ Size EmbeddedObjectRef::GetSize( MapMode* pTargetMapMode ) const
 void EmbeddedObjectRef::SetGraphicStream( const uno::Reference< io::XInputStream >& xInGrStream,
                                             const ::rtl::OUString& rMediaType )
 {
-    if ( mpImp->pGraphic )
-        delete mpImp->pGraphic;
-    mpImp->pGraphic = new Graphic();
-    mpImp->aMediaType = rMediaType;
-    mpImp->mnGraphicVersion++;
+    if ( mpImpl->pGraphic )
+        delete mpImpl->pGraphic;
+    mpImpl->pGraphic = new Graphic();
+    mpImpl->aMediaType = rMediaType;
+    mpImpl->mnGraphicVersion++;
 
     SvStream* pGraphicStream = ::utl::UcbStreamHelper::CreateStream( xInGrStream );
 
     if ( pGraphicStream )
     {
         GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
-        rGF.ImportGraphic( *mpImp->pGraphic, String(), *pGraphicStream, GRFILTER_FORMAT_DONTKNOW );
-        mpImp->mnGraphicVersion++;
+        rGF.ImportGraphic( *mpImpl->pGraphic, String(), *pGraphicStream, GRFILTER_FORMAT_DONTKNOW );
+        mpImpl->mnGraphicVersion++;
 
-        if ( mpImp->pContainer )
+        if ( mpImpl->pContainer )
         {
             pGraphicStream->Seek( 0 );
             uno::Reference< io::XInputStream > xInSeekGrStream = new ::utl::OSeekableInputStreamWrapper( pGraphicStream );
 
-            mpImp->pContainer->InsertGraphicStream( xInSeekGrStream, mpImp->aPersistName, rMediaType );
+            mpImpl->pContainer->InsertGraphicStream( xInSeekGrStream, mpImpl->aPersistName, rMediaType );
         }
 
         delete pGraphicStream;
     }
 
-    mpImp->bNeedUpdate = sal_False;
+    mpImpl->bNeedUpdate = sal_False;
 
 }
 
 void EmbeddedObjectRef::SetGraphic( const Graphic& rGraphic, const ::rtl::OUString& rMediaType )
 {
-    if ( mpImp->pGraphic )
-        delete mpImp->pGraphic;
-    mpImp->pGraphic = new Graphic( rGraphic );
-    mpImp->aMediaType = rMediaType;
-    mpImp->mnGraphicVersion++;
+    if ( mpImpl->pGraphic )
+        delete mpImpl->pGraphic;
+    mpImpl->pGraphic = new Graphic( rGraphic );
+    mpImpl->aMediaType = rMediaType;
+    mpImpl->mnGraphicVersion++;
 
-    if ( mpImp->pContainer )
-        SetGraphicToContainer( rGraphic, *mpImp->pContainer, mpImp->aPersistName, rMediaType );
+    if ( mpImpl->pContainer )
+        SetGraphicToContainer( rGraphic, *mpImpl->pContainer, mpImpl->aPersistName, rMediaType );
 
-    mpImp->bNeedUpdate = sal_False;
+    mpImpl->bNeedUpdate = sal_False;
 }
 
 SvStream* EmbeddedObjectRef::GetGraphicStream( sal_Bool bUpdate ) const
 {
     RTL_LOGFILE_CONTEXT( aLog, "svtools (mv76033) svt::EmbeddedObjectRef::GetGraphicStream" );
-    DBG_ASSERT( bUpdate || mpImp->pContainer, "Can't retrieve current graphic!" );
+    DBG_ASSERT( bUpdate || mpImpl->pContainer, "Can't retrieve current graphic!" );
     uno::Reference < io::XInputStream > xStream;
-    if ( mpImp->pContainer && !bUpdate )
+    if ( mpImpl->pContainer && !bUpdate )
     {
         RTL_LOGFILE_CONTEXT_TRACE( aLog, "getting stream from container" );
         // try to get graphic stream from container storage
-        xStream = mpImp->pContainer->GetGraphicStream( mxObj, &mpImp->aMediaType );
+        xStream = mpImpl->pContainer->GetGraphicStream(mpImpl->mxObj, &mpImpl->aMediaType);
         if ( xStream.is() )
         {
             const sal_Int32 nConstBufferSize = 32000;
@@ -577,16 +596,16 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( sal_Bool bUpdate ) const
     {
         RTL_LOGFILE_CONTEXT_TRACE( aLog, "getting stream from object" );
         // update wanted or no stream in container storage available
-        xStream = GetGraphicReplacementStream( mpImp->nViewAspect, mxObj, &mpImp->aMediaType );
+        xStream = GetGraphicReplacementStream(mpImpl->nViewAspect, mpImpl->mxObj, &mpImpl->aMediaType);
 
         if ( xStream.is() )
         {
-            if ( mpImp->pContainer )
-                mpImp->pContainer->InsertGraphicStream( xStream, mpImp->aPersistName, mpImp->aMediaType );
+            if ( mpImpl->pContainer )
+                mpImpl->pContainer->InsertGraphicStream( xStream, mpImpl->aPersistName, mpImpl->aMediaType );
 
             SvStream* pResult = ::utl::UcbStreamHelper::CreateStream( xStream );
             if ( pResult && bUpdate )
-                mpImp->bNeedUpdate = sal_False;
+                mpImpl->bNeedUpdate = sal_False;
 
             return pResult;
         }
@@ -746,16 +765,21 @@ uno::Reference< io::XInputStream > EmbeddedObjectRef::GetGraphicReplacementStrea
     return ::comphelper::EmbeddedObjectContainer::GetGraphicReplacementStream(nViewAspect,xObj,pMediaType);
 }
 
+void EmbeddedObjectRef::UpdateReplacement()
+{
+    GetReplacement( sal_True );
+}
+
 void EmbeddedObjectRef::UpdateReplacementOnDemand()
 {
-    DELETEZ( mpImp->pGraphic );
-    mpImp->bNeedUpdate = sal_True;
-    mpImp->mnGraphicVersion++;
+    DELETEZ( mpImpl->pGraphic );
+    mpImpl->bNeedUpdate = sal_True;
+    mpImpl->mnGraphicVersion++;
 
-    if( mpImp->pContainer )
+    if( mpImpl->pContainer )
     {
         //remove graphic from container thus a new up to date one is requested on save
-        mpImp->pContainer->RemoveGraphicStream( mpImp->aPersistName );
+        mpImpl->pContainer->RemoveGraphicStream( mpImpl->aPersistName );
     }
 }
 
@@ -768,10 +792,10 @@ sal_Bool EmbeddedObjectRef::IsChart() const
     //#i83708# #i81857# #i79578# request an ole replacement image only if really necessary
     //as this call can be very expensive and does block the user interface as long at it takes
 
-    if ( !mxObj.is() )
+    if (!mpImpl->mxObj.is())
         return false;
 
-    SvGlobalName aObjClsId( mxObj->getClassID() );
+    SvGlobalName aObjClsId(mpImpl->mxObj->getClassID());
     if(
         SvGlobalName(SO3_SCH_CLASSID_30) == aObjClsId
         || SvGlobalName(SO3_SCH_CLASSID_40) == aObjClsId
@@ -787,7 +811,7 @@ sal_Bool EmbeddedObjectRef::IsChart() const
 // #i104867#
 sal_uInt32 EmbeddedObjectRef::getGraphicVersion() const
 {
-    return mpImp->mnGraphicVersion;
+    return mpImpl->mnGraphicVersion;
 }
 
 void EmbeddedObjectRef::SetDefaultSizeForChart( const Size& rSizeIn_100TH_MM )
@@ -796,12 +820,12 @@ void EmbeddedObjectRef::SetDefaultSizeForChart( const Size& rSizeIn_100TH_MM )
     //for this case they need to use the size settings from the surrounding frame,
     //which is made available with this method
 
-    mpImp->aDefaultSizeForChart_In_100TH_MM = awt::Size( rSizeIn_100TH_MM.getWidth(), rSizeIn_100TH_MM.getHeight() );
+    mpImpl->aDefaultSizeForChart_In_100TH_MM = awt::Size( rSizeIn_100TH_MM.getWidth(), rSizeIn_100TH_MM.getHeight() );
 
-    uno::Reference < chart2::XDefaultSizeTransmitter > xSizeTransmitter( mxObj, uno::UNO_QUERY );
+    uno::Reference<chart2::XDefaultSizeTransmitter> xSizeTransmitter(mpImpl->mxObj, uno::UNO_QUERY);
     DBG_ASSERT( xSizeTransmitter.is(), "Object does not support XDefaultSizeTransmitter -> will cause #i103460#!" );
     if( xSizeTransmitter.is() )
-        xSizeTransmitter->setDefaultSize( mpImp->aDefaultSizeForChart_In_100TH_MM );
+        xSizeTransmitter->setDefaultSize( mpImpl->aDefaultSizeForChart_In_100TH_MM );
 }
 
 } // namespace svt
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx
index cb4edcb..fe82ff2 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx
@@ -27,6 +27,7 @@
 #include <basegfx/polygon/b2dpolygontools.hxx>
 #include <com/sun/star/embed/EmbedMisc.hpp>
 #include <com/sun/star/embed/EmbedStates.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 
diff --git a/svx/source/svdraw/charthelper.cxx b/svx/source/svdraw/charthelper.cxx
index c4cb613..cc87019 100644
--- a/svx/source/svdraw/charthelper.cxx
+++ b/svx/source/svdraw/charthelper.cxx
@@ -20,6 +20,7 @@
 #include <svtools/embedhlp.hxx>
 #include <tools/globname.hxx>
 #include <sot/clsids.hxx>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <com/sun/star/util/XUpdatable.hpp>
 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index c516b6f..a79ef11 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -20,6 +20,7 @@
 #include <com/sun/star/util/XModifiable.hpp>
 #include <com/sun/star/embed/XLinkageSupport.hpp>
 #include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
 #include <com/sun/star/task/XInteractionHandler.hpp>
 
 #include <vcl/virdev.hxx>
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 21c7537..e61d7b0 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -48,6 +48,7 @@
 #include <editeng/outliner.hxx>
 
 #include <com/sun/star/embed/EmbedMisc.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
 
 #include <vector>
 // #i28701#
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index de5622c..3576033 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -17,9 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
-#include <com/sun/star/embed/EmbedMisc.hpp>
-
 #include "hintids.hxx"
 
 #include <svx/sdrobjectfilter.hxx>
@@ -81,6 +78,9 @@
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <switerator.hxx>
 
+#include <com/sun/star/embed/EmbedMisc.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
+
 #define SCROLLVAL 75
 
 using namespace com::sun::star;
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 39cca4b..b6d257d 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -17,9 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <com/sun/star/embed/EmbedStates.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-
 #include "hintids.hxx"
 #include <rtl/strbuf.hxx>
 #include <svl/urihelper.hxx>
@@ -53,6 +50,10 @@
 #include "htmlfly.hxx"
 #include "swcss1.hxx"
 #include <com/sun/star/embed/XClassifiedObject.hpp>
+#include <com/sun/star/embed/EmbedStates.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+
 #include <comphelper/embeddedobjectcontainer.hxx>
 #include <sot/clsids.hxx>
 
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index 3349fbf..a5346d1 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -20,6 +20,7 @@
 #include <doc.hxx>
 #include "writerhelper.hxx"
 #include <com/sun/star/embed/XClassifiedObject.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
 
 #include <algorithm>
 #include <functional>
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 1a56086..40baae6 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -56,6 +56,7 @@
 #include <svtools/htmlcfg.hxx>
 #include <com/sun/star/i18n/TransliterationModules.hpp>
 #include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
 
 #include <sot/clsids.hxx>
 #include <editeng/acorrcfg.hxx>
commit ab1f30eed23944468427bf0e28659139b9eadea1
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Jan 17 11:20:05 2013 -0500

    Unindent the class declaration.
    
    Indenting on namespace scopes is too much.
    
    Change-Id: I1d22103c02c16a128e627f53859cc09006fb02f1

diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx
index cd4f759..6e05212 100644
--- a/svtools/inc/svtools/embedhlp.hxx
+++ b/svtools/inc/svtools/embedhlp.hxx
@@ -37,84 +37,85 @@ namespace comphelper
 class Rectangle;
 class OutputDevice;
 
-namespace svt
+namespace svt {
+
+struct EmbeddedObjectRef_Impl;
+class SVT_DLLPUBLIC EmbeddedObjectRef
 {
-    struct EmbeddedObjectRef_Impl;
-    class SVT_DLLPUBLIC EmbeddedObjectRef
-    {
-        EmbeddedObjectRef_Impl*  mpImp;
-        ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject > mxObj;
-
-        SVT_DLLPRIVATE SvStream*   GetGraphicStream( sal_Bool bUpdate ) const;
-        /* SVT_DLLPRIVATE */ void        GetReplacement( sal_Bool bUpdate );
-        SVT_DLLPRIVATE void        Construct_Impl();
-
-        EmbeddedObjectRef& operator = ( const EmbeddedObjectRef& );
-
-    public:
-        const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& operator ->() const { return mxObj; }
-        const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& GetObject() const { return mxObj; }
-
-        static void DrawPaintReplacement( const Rectangle &rRect, const OUString &rText, OutputDevice *pOut );
-        static void DrawShading( const Rectangle &rRect, OutputDevice *pOut );
-        static sal_Bool TryRunningState( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& );
-        static void SetGraphicToContainer( const Graphic& rGraphic,
-                                            comphelper::EmbeddedObjectContainer& aContainer,
-                                            const ::rtl::OUString& aName,
-                                            const ::rtl::OUString& aMediaType );
-
-        static ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetGraphicReplacementStream(
-                                            sal_Int64 nViewAspect,
-                                            const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >&,
-                                            ::rtl::OUString* pMediaType )
-                                throw();
-
-        // default constructed object; needs further assignment before it can be used
-        EmbeddedObjectRef();
-
-        // assign a previously default constructed object
-        void Assign( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj, sal_Int64 nAspect );
-
-        // create object for a certain view aspect
-        EmbeddedObjectRef( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj, sal_Int64 nAspect );
-
-        ~EmbeddedObjectRef();
-        EmbeddedObjectRef( const EmbeddedObjectRef& );
-
-        // assigning to a container enables the object to exchange graphical representations with a storage
-        void            AssignToContainer( comphelper::EmbeddedObjectContainer* pContainer, const ::rtl::OUString& rPersistName );
-        comphelper::EmbeddedObjectContainer* GetContainer() const;
-
-        sal_Int64       GetViewAspect() const;
-        void            SetViewAspect( sal_Int64 nAspect );
-        Graphic*        GetGraphic( ::rtl::OUString* pMediaType=0 ) const;
-
-        // the original size of the object ( size of the icon for iconified object )
-        // no conversion is done if no target mode is provided
-        Size            GetSize( MapMode* pTargetMapMode = NULL ) const;
-
-        void            SetGraphic( const Graphic& rGraphic, const ::rtl::OUString& rMediaType );
-        void            SetGraphicStream(
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInGrStream,
-                            const ::rtl::OUString& rMediaType );
-
-        void            UpdateReplacement() { GetReplacement( sal_True ); }
-        void            UpdateReplacementOnDemand();
-        void            Lock( sal_Bool bLock = sal_True );
-        sal_Bool            IsLocked() const;
-        void            Clear();
-        sal_Bool            is() const { return mxObj.is(); }
-
-        sal_Bool            IsChart() const;
-
-        // #i104867#
-        // Provides a graphic version number for the fetchable Graphic during this object's lifetime. Internally,
-        // that number is incremented at each change of the Graphic. This mechanism is needed to identify if a
-        // remembered Graphic (e.g. primitives) has changed compared to the current one, but without actively
-        // fetching the Graphic what would be too expensive e.g. for charts
-        sal_uInt32 getGraphicVersion() const;
-        void            SetDefaultSizeForChart( const Size& rSizeIn_100TH_MM );//#i103460# charts do not necessaryly have an own size within ODF files, in this case they need to use the size settings from the surrounding frame, which is made available with this method
-    };
+    EmbeddedObjectRef_Impl*  mpImp;
+    ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject > mxObj;
+
+    SVT_DLLPRIVATE SvStream*   GetGraphicStream( sal_Bool bUpdate ) const;
+    SVT_DLLPRIVATE void        GetReplacement( sal_Bool bUpdate );
+    SVT_DLLPRIVATE void        Construct_Impl();
+
+    EmbeddedObjectRef& operator = ( const EmbeddedObjectRef& );
+
+public:
+    const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& operator ->() const { return mxObj; }
+    const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& GetObject() const { return mxObj; }
+
+    static void DrawPaintReplacement( const Rectangle &rRect, const OUString &rText, OutputDevice *pOut );
+    static void DrawShading( const Rectangle &rRect, OutputDevice *pOut );
+    static sal_Bool TryRunningState( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& );
+    static void SetGraphicToContainer( const Graphic& rGraphic,
+                                        comphelper::EmbeddedObjectContainer& aContainer,
+                                        const ::rtl::OUString& aName,
+                                        const ::rtl::OUString& aMediaType );
+
+    static ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetGraphicReplacementStream(
+                                        sal_Int64 nViewAspect,
+                                        const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >&,
+                                        ::rtl::OUString* pMediaType )
+                            throw();
+
+    // default constructed object; needs further assignment before it can be used
+    EmbeddedObjectRef();
+
+    // assign a previously default constructed object
+    void Assign( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj, sal_Int64 nAspect );
+
+    // create object for a certain view aspect
+    EmbeddedObjectRef( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& xObj, sal_Int64 nAspect );
+
+    ~EmbeddedObjectRef();
+    EmbeddedObjectRef( const EmbeddedObjectRef& );
+
+    // assigning to a container enables the object to exchange graphical representations with a storage
+    void            AssignToContainer( comphelper::EmbeddedObjectContainer* pContainer, const ::rtl::OUString& rPersistName );
+    comphelper::EmbeddedObjectContainer* GetContainer() const;
+
+    sal_Int64       GetViewAspect() const;
+    void            SetViewAspect( sal_Int64 nAspect );
+    Graphic*        GetGraphic( ::rtl::OUString* pMediaType=0 ) const;
+
+    // the original size of the object ( size of the icon for iconified object )
+    // no conversion is done if no target mode is provided
+    Size            GetSize( MapMode* pTargetMapMode = NULL ) const;
+
+    void            SetGraphic( const Graphic& rGraphic, const ::rtl::OUString& rMediaType );
+    void            SetGraphicStream(
+                        const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInGrStream,
+                        const ::rtl::OUString& rMediaType );
+
+    void            UpdateReplacement() { GetReplacement( sal_True ); }
+    void            UpdateReplacementOnDemand();
+    void            Lock( sal_Bool bLock = sal_True );
+    sal_Bool            IsLocked() const;
+    void            Clear();
+    sal_Bool            is() const { return mxObj.is(); }
+
+    sal_Bool            IsChart() const;
+
+    // #i104867#
+    // Provides a graphic version number for the fetchable Graphic during this object's lifetime. Internally,
+    // that number is incremented at each change of the Graphic. This mechanism is needed to identify if a
+    // remembered Graphic (e.g. primitives) has changed compared to the current one, but without actively
+    // fetching the Graphic what would be too expensive e.g. for charts
+    sal_uInt32 getGraphicVersion() const;
+    void            SetDefaultSizeForChart( const Size& rSizeIn_100TH_MM );//#i103460# charts do not necessaryly have an own size within ODF files, in this case they need to use the size settings from the surrounding frame, which is made available with this method
+};
+
 }
 
 #endif
commit 93b8ccb4ade28815e50cd0ce9fd8d48114a619ed
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Jan 17 11:10:24 2013 -0500

    String cleanup.
    
    Change-Id: I3ae62993a1b753927af236b3a7923eacbb4c8cc0

diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx
index 87910d1..cd4f759 100644
--- a/svtools/inc/svtools/embedhlp.hxx
+++ b/svtools/inc/svtools/embedhlp.hxx
@@ -36,7 +36,7 @@ namespace comphelper
 
 class Rectangle;
 class OutputDevice;
-class String;
+
 namespace svt
 {
     struct EmbeddedObjectRef_Impl;
@@ -55,7 +55,7 @@ namespace svt
         const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& operator ->() const { return mxObj; }
         const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& GetObject() const { return mxObj; }
 
-        static void DrawPaintReplacement( const Rectangle &rRect, const String &rText, OutputDevice *pOut );
+        static void DrawPaintReplacement( const Rectangle &rRect, const OUString &rText, OutputDevice *pOut );
         static void DrawShading( const Rectangle &rRect, OutputDevice *pOut );
         static sal_Bool TryRunningState( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& );
         static void SetGraphicToContainer( const Graphic& rGraphic,
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 5d6ac82..2fa75fd 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -595,7 +595,7 @@ SvStream* EmbeddedObjectRef::GetGraphicStream( sal_Bool bUpdate ) const
     return NULL;
 }
 
-void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const String &rText, OutputDevice *pOut )
+void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUString &rText, OutputDevice *pOut )
 {
     MapMode aMM( MAP_APPFONT );
     Size aAppFontSz = pOut->LogicToLogic( Size( 0, 8 ), &aMM, NULL );


More information about the Libreoffice-commits mailing list