Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


This fixes the following error:

/source/libo/libo/reportdesign/source/core/sdr/ReportDrawPage.cxx:96:24:
error: ambiguous conversion from derived class 'SvxShapeControl' to base
class 'cppu::OWeakObject':
    class SvxShapeControl -> class SvxShapeText -> class SvxShape ->
SvxShape_UnoImplHelper -> class cppu::OWeakAggObject -> ::cppu::OWeakObject
    class SvxShapeControl -> class SvxShapeText -> class SvxUnoTextBase ->
class SvxUnoTextBase_Base -> SvxUnoTextBase_Base0 -> class
SvxUnoTextRangeBase -> SvxUnoTextRangeBase_Base -> class
cppu::OWeakAggObject -> ::cppu::OWeakObject
            xShape.set(*pShape,uno::UNO_QUERY);
                       ^~~~~~~

Of course, the real fix is possibly to fix the class hierarchy itself.



regards,

-kris.
From dba4b722dcb907f000d54634748b7b3a8265eb2d Mon Sep 17 00:00:00 2001
From: Kristian Rietveld <kris@lanedo.com>
Date: Sat, 22 Oct 2011 10:16:19 +0200
Subject: [PATCH 7/8] Eliminate ambiguous conversion to cppu::OWeakObject

---
 reportdesign/source/core/sdr/ReportDrawPage.cxx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx 
b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index d34b72d..aa2f6ff 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -93,7 +93,7 @@ uno::Reference< drawing::XShape >  OReportDrawPage::_CreateShape( SdrObject *pOb
             else
                 bChangeOrientation = pUnoObj->GetObjIdentifier() == OBJ_DLG_HFIXEDLINE;
             SvxShapeControl* pShape = new SvxShapeControl( pObj );
-            xShape.set(*pShape,uno::UNO_QUERY);
+            xShape.set(static_cast<cppu::OWeakObject*>(static_cast<SvxShape_UnoImplHelper 
*>(pShape)),uno::UNO_QUERY);
             pShape->setShapeKind(pObj->GetObjIdentifier());
         }
         else if ( pObj->ISA(OCustomShape) )
-- 
1.7.4.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.