diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-09 08:45:51 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-13 09:37:12 +0200 |
commit | 26ec80f47df1b32c5e1ae8c96d597ef8c90fee86 (patch) | |
tree | 11b53e701f50ff170552054ef7d23136cd4710b6 | |
parent | b5f5a386504e320b022f8609c9c36652ae2d3d18 (diff) |
loplugin:staticmethods
Change-Id: I33a8ca28b0c3bf1c31758d93238e74927bebde9c
36 files changed, 128 insertions, 179 deletions
diff --git a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx index a24e8c94af77..1f2b65c99a8d 100644 --- a/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx +++ b/accessibility/inc/accessibility/extended/textwindowaccessibility.hxx @@ -589,7 +589,7 @@ private: // Must be called with both the external (Solar) and internal mutex // locked, and after init has been called: - ::rtl::Reference< Paragraph > + static ::rtl::Reference< Paragraph > getParagraph(Paragraphs::iterator const & rIt); // Must be called with both the external (Solar) and internal mutex @@ -633,7 +633,7 @@ private: static ::FontWeight mapFontWeight(css::uno::Any const & rWeight); - void retrieveDefaultAttributesImpl( + static void retrieveDefaultAttributesImpl( Paragraph const * pParagraph, const css::uno::Sequence< OUString >& RequestedAttributes, tPropValMap& rDefAttrSeq); diff --git a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx index d96ffc617f32..432e3212563f 100644 --- a/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx +++ b/accessibility/inc/accessibility/standard/vclxaccessiblelist.hxx @@ -135,7 +135,7 @@ public: void UpdateSelection_Impl_Acc (bool b_IsDropDownList); void UpdateFocus_Impl_Acc ( sal_uInt16 nPos, bool b_IsDropDownList) ; - void NotifyListItem(::com::sun::star::uno::Any& val); + static void NotifyListItem(::com::sun::star::uno::Any& val); protected: BoxType m_aBoxType; ::accessibility::IComboListBoxHelper* m_pListBoxHelper; diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index b9a1e37f348e..d9258e99bf7e 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -3124,7 +3124,7 @@ OUString ChartView::dump() throw (uno::RuntimeException, std::exception) if(xShape.is()) { XShapeDumper dumper; - OUString aString = dumper.dump(mxRootShape); + OUString aString = XShapeDumper::dump(mxRootShape); aBuffer.append(aString); } else @@ -3133,7 +3133,7 @@ OUString ChartView::dump() throw (uno::RuntimeException, std::exception) if(!xSingleShape.is()) continue; XShapeDumper dumper; - OUString aString = dumper.dump(xSingleShape); + OUString aString = XShapeDumper::dump(xSingleShape); aBuffer.append(aString); } aBuffer.append("\n\n"); diff --git a/compilerplugins/clang/staticmethods.cxx b/compilerplugins/clang/staticmethods.cxx index 5ac9da42f9aa..e59a48f60072 100644 --- a/compilerplugins/clang/staticmethods.cxx +++ b/compilerplugins/clang/staticmethods.cxx @@ -142,7 +142,12 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl) { return true; } - + std::string fqn = aParentName + "::" + pCXXMethodDecl->getNameAsString(); + // only empty on Linux, not on windows + if (fqn == "OleEmbeddedObject::GetVisualRepresentationInNativeFormat_Impl" + || fqn == "OleEmbeddedObject::GetRidOfComponent") { + return true; + } bVisitedThis = false; TraverseStmt(pCXXMethodDecl->getBody()); @@ -152,7 +157,7 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl) report( DiagnosticsEngine::Warning, - "this method can be declared static " + aParentName, + "this method can be declared static " + fqn, pCXXMethodDecl->getCanonicalDecl()->getLocStart()) << pCXXMethodDecl->getCanonicalDecl()->getSourceRange(); return true; diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index 1aa88f199f84..7514bc4205b5 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -219,8 +219,8 @@ static float GetSwapFloat( SvStream& rSt ) typedef ::std::vector< MtfAction > ActionVector; /* EMF+ */ - void ReadRectangle (SvStream& s, float& x, float& y, float &width, float& height, bool bCompressed = false); - void ReadPoint (SvStream& s, float& x, float& y, sal_uInt32 flags); + static void ReadRectangle (SvStream& s, float& x, float& y, float &width, float& height, bool bCompressed = false); + static void ReadPoint (SvStream& s, float& x, float& y, sal_uInt32 flags); void MapToDevice (double &x, double &y); ::basegfx::B2DPoint Map (double ix, double iy); ::basegfx::B2DSize MapSize (double iwidth, double iheight); @@ -231,18 +231,18 @@ static float GetSwapFloat( SvStream& rSt ) ImplRenderer(const ImplRenderer&) SAL_DELETED_FUNCTION; ImplRenderer& operator=( const ImplRenderer& ) SAL_DELETED_FUNCTION; - void updateClipping( const ::basegfx::B2DPolyPolygon& rClipPoly, + static void updateClipping( const ::basegfx::B2DPolyPolygon& rClipPoly, const ActionFactoryParameters& rParms, bool bIntersect ); - void updateClipping( const ::Rectangle& rClipRect, + static void updateClipping( const ::Rectangle& rClipRect, const ActionFactoryParameters& rParms, bool bIntersect ); - ::com::sun::star::uno::Reference< + static ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > createFont( double& o_rFontRotation, const ::vcl::Font& rFont, - const ActionFactoryParameters& rParms ) const; + const ActionFactoryParameters& rParms ); bool createActions( GDIMetaFile& rMtf, const ActionFactoryParameters& rParms, bool bSubsettableActions ); @@ -250,13 +250,13 @@ static float GetSwapFloat( SvStream& rSt ) const ActionFactoryParameters& rParms ); bool createFillAndStroke( const ::basegfx::B2DPolygon& rPoly, const ActionFactoryParameters& rParms ); - void skipContent( GDIMetaFile& rMtf, + static void skipContent( GDIMetaFile& rMtf, const char* pCommentString, - sal_Int32& io_rCurrActionIndex ) const; + sal_Int32& io_rCurrActionIndex ); - bool isActionContained( GDIMetaFile& rMtf, + static bool isActionContained( GDIMetaFile& rMtf, const char* pCommentString, - sal_uInt16 nType ) const; + sal_uInt16 nType ); void createGradientAction( const ::tools::PolyPolygon& rPoly, const ::Gradient& rGradient, diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index c5cf98172231..5afa0b27d691 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1880,7 +1880,7 @@ namespace cppcanvas float dx, dy, dw, dh; - ReadRectangle (rMF, dx, dy, dw, dh, flags & 0x4000); + ReadRectangle (rMF, dx, dy, dw, dh, bool(flags & 0x4000)); SAL_INFO("cppcanvas.emf", "EMF+ RectData: " << dx << "," << dy << " " << dw << "x" << dh); @@ -1939,7 +1939,7 @@ namespace cppcanvas float dx, dy, dw, dh; - ReadRectangle (rMF, dx, dy, dw, dh, flags & 0x4000); + ReadRectangle (rMF, dx, dy, dw, dh, bool(flags & 0x4000)); SAL_INFO("cppcanvas.emf", "EMF+ RectData: " << dx << "," << dy << " " << dw << "x" << dh); @@ -2098,7 +2098,7 @@ namespace cppcanvas } else if (type == EmfPlusRecordTypeDrawImage) { float dx, dy, dw, dh; - ReadRectangle (rMF, dx, dy, dw, dh, flags & 0x4000); + ReadRectangle (rMF, dx, dy, dw, dh, bool(flags & 0x4000)); SAL_INFO("cppcanvas.emf", "EMF+ destination rectangle: " << dx << "," << dy << " " << dw << "x" << dh); diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index edc3a6ef887d..9e93995ed2af 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -419,7 +419,7 @@ namespace cppcanvas void ImplRenderer::skipContent( GDIMetaFile& rMtf, const char* pCommentString, - sal_Int32& io_rCurrActionIndex ) const + sal_Int32& io_rCurrActionIndex ) { ENSURE_OR_THROW( pCommentString, "ImplRenderer::skipContent(): NULL string given" ); @@ -445,7 +445,7 @@ namespace cppcanvas bool ImplRenderer::isActionContained( GDIMetaFile& rMtf, const char* pCommentString, - sal_uInt16 nType ) const + sal_uInt16 nType ) { ENSURE_OR_THROW( pCommentString, "ImplRenderer::isActionContained(): NULL string given" ); @@ -754,7 +754,7 @@ namespace cppcanvas uno::Reference< rendering::XCanvasFont > ImplRenderer::createFont( double& o_rFontRotation, const vcl::Font& rFont, - const ActionFactoryParameters& rParms ) const + const ActionFactoryParameters& rParms ) { rendering::FontRequest aFontRequest; @@ -2688,7 +2688,7 @@ namespace cppcanvas { } - bool result() const + static bool result() { return true; // nothing can fail here } diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx index fa91a85f1c3f..8237a12216b4 100644 --- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx +++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx @@ -350,7 +350,7 @@ namespace cppcanvas // update buffered bitmap and transformation - BitmapSharedPtr aBmp( VCLFactory::getInstance().createBitmap( + BitmapSharedPtr aBmp( VCLFactory::createBitmap( mpCanvas, aVDev.GetBitmapEx( aEmptyPoint, diff --git a/cppcanvas/source/uno/uno_mtfrenderer.cxx b/cppcanvas/source/uno/uno_mtfrenderer.cxx index ea9fe16d64f6..ba220ab08342 100644 --- a/cppcanvas/source/uno/uno_mtfrenderer.cxx +++ b/cppcanvas/source/uno/uno_mtfrenderer.cxx @@ -22,9 +22,8 @@ void MtfRenderer::setMetafile (const uno::Sequence< sal_Int8 >& /*rMtf*/) throw void MtfRenderer::draw (double fScaleX, double fScaleY) throw (uno::RuntimeException, std::exception) { if (mpMetafile && mxCanvas.get()) { - cppcanvas::VCLFactory& factory = cppcanvas::VCLFactory::getInstance(); - cppcanvas::BitmapCanvasSharedPtr canvas = factory.createBitmapCanvas (mxCanvas); - cppcanvas::RendererSharedPtr renderer = factory.createRenderer (canvas, *mpMetafile, cppcanvas::Renderer::Parameters ()); + cppcanvas::BitmapCanvasSharedPtr canvas = cppcanvas::VCLFactory::createBitmapCanvas (mxCanvas); + cppcanvas::RendererSharedPtr renderer = cppcanvas::VCLFactory::createRenderer (canvas, *mpMetafile, cppcanvas::Renderer::Parameters ()); ::basegfx::B2DHomMatrix aMatrix; aMatrix.scale( fScaleX, fScaleY ); canvas->setTransformation( aMatrix ); diff --git a/cppcanvas/source/wrapper/basegfxfactory.cxx b/cppcanvas/source/wrapper/basegfxfactory.cxx index 0cca17086d34..f72394be8252 100644 --- a/cppcanvas/source/wrapper/basegfxfactory.cxx +++ b/cppcanvas/source/wrapper/basegfxfactory.cxx @@ -44,28 +44,8 @@ using namespace ::com::sun::star; namespace cppcanvas { - /* Singleton handling */ - struct InitInstance2 - { - BaseGfxFactory* operator()() - { - return new BaseGfxFactory(); - } - }; - - BaseGfxFactory& BaseGfxFactory::getInstance() - { - return *rtl_Instance< BaseGfxFactory, InitInstance2, ::osl::MutexGuard, - ::osl::GetGlobalMutex >::create( - InitInstance2(), ::osl::GetGlobalMutex()); - } - - BaseGfxFactory::BaseGfxFactory() - { - } - PolyPolygonSharedPtr BaseGfxFactory::createPolyPolygon( const CanvasSharedPtr& rCanvas, - const ::basegfx::B2DPolygon& rPoly ) const + const ::basegfx::B2DPolygon& rPoly ) { OSL_ENSURE( rCanvas.get() != NULL && rCanvas->getUNOCanvas().is(), @@ -86,7 +66,7 @@ namespace cppcanvas } BitmapSharedPtr BaseGfxFactory::createBitmap( const CanvasSharedPtr& rCanvas, - const ::basegfx::B2ISize& rSize ) const + const ::basegfx::B2ISize& rSize ) { OSL_ENSURE( rCanvas.get() != NULL && rCanvas->getUNOCanvas().is(), @@ -106,7 +86,7 @@ namespace cppcanvas } BitmapSharedPtr BaseGfxFactory::createAlphaBitmap( const CanvasSharedPtr& rCanvas, - const ::basegfx::B2ISize& rSize ) const + const ::basegfx::B2ISize& rSize ) { OSL_ENSURE( rCanvas.get() != NULL && rCanvas->getUNOCanvas().is(), diff --git a/cppcanvas/source/wrapper/vclfactory.cxx b/cppcanvas/source/wrapper/vclfactory.cxx index 0b5f7c33fd80..669aabfc16e3 100644 --- a/cppcanvas/source/wrapper/vclfactory.cxx +++ b/cppcanvas/source/wrapper/vclfactory.cxx @@ -39,26 +39,6 @@ using namespace ::com::sun::star; namespace cppcanvas { - /* Singleton handling */ - struct InitInstance - { - VCLFactory* operator()() - { - return new VCLFactory(); - } - }; - - VCLFactory& VCLFactory::getInstance() - { - return *rtl_Instance< VCLFactory, InitInstance, ::osl::MutexGuard, - ::osl::GetGlobalMutex >::create( - InitInstance(), ::osl::GetGlobalMutex()); - } - - VCLFactory::VCLFactory() - { - } - CanvasSharedPtr VCLFactory::createCanvas( const uno::Reference< rendering::XCanvas >& xCanvas ) { return CanvasSharedPtr( @@ -71,7 +51,7 @@ namespace cppcanvas new internal::ImplBitmapCanvas( xCanvas ) ); } - SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const vcl::Window& rVCLWindow ) const + SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const vcl::Window& rVCLWindow ) { return SpriteCanvasSharedPtr( new internal::ImplSpriteCanvas( @@ -80,14 +60,14 @@ namespace cppcanvas uno::UNO_QUERY) ) ); } - SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const uno::Reference< rendering::XSpriteCanvas >& xCanvas ) const + SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const uno::Reference< rendering::XSpriteCanvas >& xCanvas ) { return SpriteCanvasSharedPtr( new internal::ImplSpriteCanvas( xCanvas ) ); } BitmapSharedPtr VCLFactory::createBitmap( const CanvasSharedPtr& rCanvas, - const ::BitmapEx& rBmpEx ) const + const ::BitmapEx& rBmpEx ) { OSL_ENSURE( rCanvas.get() != NULL && rCanvas->getUNOCanvas().is(), @@ -108,7 +88,7 @@ namespace cppcanvas RendererSharedPtr VCLFactory::createRenderer( const CanvasSharedPtr& rCanvas, const ::GDIMetaFile& rMtf, - const Renderer::Parameters& rParms ) const + const Renderer::Parameters& rParms ) { return RendererSharedPtr( new internal::ImplRenderer( rCanvas, rMtf, diff --git a/embeddedobj/source/inc/commonembobj.hxx b/embeddedobj/source/inc/commonembobj.hxx index ae3a09accb18..bc89f9a8c853 100644 --- a/embeddedobj/source/inc/commonembobj.hxx +++ b/embeddedobj/source/inc/commonembobj.hxx @@ -223,7 +223,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > CreateTempDocFromLink_Impl(); OUString GetBaseURL_Impl() const; - OUString GetBaseURLFrom_Impl( + static OUString GetBaseURLFrom_Impl( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs ); diff --git a/embeddedobj/source/inc/docholder.hxx b/embeddedobj/source/inc/docholder.hxx index a35209ebe35f..d372a57fe805 100644 --- a/embeddedobj/source/inc/docholder.hxx +++ b/embeddedobj/source/inc/docholder.hxx @@ -141,7 +141,7 @@ public: void PlaceFrame( const ::com::sun::star::awt::Rectangle& aNewRect ); - bool SetFrameLMVisibility( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, + static bool SetFrameLMVisibility( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, bool bVisible ); bool ShowInplace( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParent, diff --git a/hwpfilter/source/cspline.cxx b/hwpfilter/source/cspline.cxx index 06dde6cf3176..90f8c1c3520d 100644 --- a/hwpfilter/source/cspline.cxx +++ b/hwpfilter/source/cspline.cxx @@ -126,8 +126,8 @@ void PeriodicSpline (int N, double* x, double* a, double*& b, double*& c, h[i] = x[i+1]-x[i]; mgcLinearSystemD sys; - double** mat = sys.NewMatrix(N+1); // guaranteed to be zeroed memory - c = sys.NewVector(N+1); // guaranteed to be zeroed memory + double** mat = mgcLinearSystemD::NewMatrix(N+1); // guaranteed to be zeroed memory + c = mgcLinearSystemD::NewVector(N+1); // guaranteed to be zeroed memory // c[0] - c[N] = 0 mat[0][0] = +1.0f; @@ -152,7 +152,7 @@ void PeriodicSpline (int N, double* x, double* a, double*& b, double*& c, c[N] = 3.0f*((a[1]-a[0])/h[0] - (a[0]-a[N-1])/h[N-1]); // solve for c[0] through c[N] - sys.Solve(N+1,mat,c); + mgcLinearSystemD::Solve(N+1,mat,c); const double oneThird = 1.0/3.0; b = new double[N]; @@ -164,7 +164,7 @@ void PeriodicSpline (int N, double* x, double* a, double*& b, double*& c, } delete[] h; - sys.DeleteMatrix(N+1,mat); + mgcLinearSystemD::DeleteMatrix(N+1,mat); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx index 95252d95824c..c3ef10af05b7 100644 --- a/hwpfilter/source/hwpreader.hxx +++ b/hwpfilter/source/hwpreader.hxx @@ -147,8 +147,8 @@ private: void makeTableStyle(Table *); void parseCharShape(CharShape *); void parseParaShape(ParaShape *); - char* getTStyleName(int, char *); - char* getPStyleName(int, char *); + static char* getTStyleName(int, char *); + static char* getPStyleName(int, char *); }; class HwpImportFilter : public WeakImplHelper4< XFilter, XImporter, XServiceInfo, XExtendedFilterDetection > diff --git a/hwpfilter/source/solver.h b/hwpfilter/source/solver.h index 0b1fffd5301e..8aba94a1125b 100644 --- a/hwpfilter/source/solver.h +++ b/hwpfilter/source/solver.h @@ -25,11 +25,11 @@ class mgcLinearSystemD public: mgcLinearSystemD() {;} - double** NewMatrix (int N); - void DeleteMatrix (int N, double** A); - double* NewVector (int N); + static double** NewMatrix (int N); + static void DeleteMatrix (int N, double** A); + static double* NewVector (int N); - int Solve (int N, double** A, double* b); + static int Solve (int N, double** A, double* b); // Input: // A[N][N] coefficient matrix, entries are A[row][col] // b[N] vector, entries are b[row] diff --git a/include/cppcanvas/basegfxfactory.hxx b/include/cppcanvas/basegfxfactory.hxx index 115211461d8f..5341cd631ebc 100644 --- a/include/cppcanvas/basegfxfactory.hxx +++ b/include/cppcanvas/basegfxfactory.hxx @@ -53,29 +53,23 @@ namespace cppcanvas class CPPCANVAS_DLLPUBLIC BaseGfxFactory { public: - static BaseGfxFactory& getInstance(); - /** Create a polygon from a ::basegfx::B2DPolygon The created polygon initially has the same size in user coordinate space as the source polygon */ - PolyPolygonSharedPtr createPolyPolygon( const CanvasSharedPtr&, const ::basegfx::B2DPolygon& rPoly ) const; + static PolyPolygonSharedPtr createPolyPolygon( const CanvasSharedPtr&, const ::basegfx::B2DPolygon& rPoly ); /** Create an uninitialized bitmap with the given size */ - BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ) const; + static BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ); /** Create an uninitialized alpha bitmap with the given size */ - BitmapSharedPtr createAlphaBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ) const; + static BitmapSharedPtr createAlphaBitmap( const CanvasSharedPtr&, const ::basegfx::B2ISize& rSize ); private: - friend struct InitInstance2; - - // singleton - BaseGfxFactory(); - + BaseGfxFactory() SAL_DELETED_FUNCTION; BaseGfxFactory(const BaseGfxFactory&) SAL_DELETED_FUNCTION; BaseGfxFactory& operator=( const BaseGfxFactory& ) SAL_DELETED_FUNCTION; }; diff --git a/include/cppcanvas/vclfactory.hxx b/include/cppcanvas/vclfactory.hxx index 4db42264f21d..ef0777f89a08 100644 --- a/include/cppcanvas/vclfactory.hxx +++ b/include/cppcanvas/vclfactory.hxx @@ -62,36 +62,30 @@ namespace cppcanvas class CPPCANVAS_DLLPUBLIC VCLFactory { public: - static VCLFactory& getInstance(); - - CanvasSharedPtr createCanvas( const ::com::sun::star::uno::Reference< + static CanvasSharedPtr createCanvas( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas >& xCanvas ); - BitmapCanvasSharedPtr createBitmapCanvas( const ::com::sun::star::uno::Reference< + static BitmapCanvasSharedPtr createBitmapCanvas( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas >& xCanvas ); - SpriteCanvasSharedPtr createSpriteCanvas( const vcl::Window& rVCLWindow ) const; - SpriteCanvasSharedPtr createSpriteCanvas( const ::com::sun::star::uno::Reference< - ::com::sun::star::rendering::XSpriteCanvas >& xCanvas ) const; + static SpriteCanvasSharedPtr createSpriteCanvas( const vcl::Window& rVCLWindow ); + static SpriteCanvasSharedPtr createSpriteCanvas( const ::com::sun::star::uno::Reference< + ::com::sun::star::rendering::XSpriteCanvas >& xCanvas ); /** Create a bitmap from a VCL Bitmap */ - BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::BitmapEx& rBmpEx ) const; + static BitmapSharedPtr createBitmap( const CanvasSharedPtr&, const ::BitmapEx& rBmpEx ); /** Create a renderer object from a Metafile The created renderer initially draws the metafile one-by-one units large, in user coordinate space */ - RendererSharedPtr createRenderer( const CanvasSharedPtr& rCanvas, + static RendererSharedPtr createRenderer( const CanvasSharedPtr& rCanvas, const ::GDIMetaFile& rMtf, - const Renderer::Parameters& rParms ) const; + const Renderer::Parameters& rParms ); private: - friend struct InitInstance; - - // singleton - VCLFactory(); - + VCLFactory() SAL_DELETED_FUNCTION; VCLFactory(const VCLFactory&) SAL_DELETED_FUNCTION; VCLFactory& operator=( const VCLFactory& ) SAL_DELETED_FUNCTION; }; diff --git a/include/drawinglayer/XShapeDumper.hxx b/include/drawinglayer/XShapeDumper.hxx index e8c50bcaf59d..ac0b780ff46e 100644 --- a/include/drawinglayer/XShapeDumper.hxx +++ b/include/drawinglayer/XShapeDumper.hxx @@ -46,8 +46,8 @@ class DRAWINGLAYER_DLLPUBLIC XShapeDumper public: XShapeDumper(); - OUString dump(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> xPageShapes, bool bDumpInteropProperties=false); - OUString dump(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> xPageShapes, bool bDumpInteropProperties=false); + static OUString dump(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> xPageShapes, bool bDumpInteropProperties=false); + static OUString dump(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> xPageShapes, bool bDumpInteropProperties=false); }; #endif diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx index c0ad5afb2787..96925af4beb5 100644 --- a/sd/qa/unit/sdmodeltestbase.hxx +++ b/sd/qa/unit/sdmodeltestbase.hxx @@ -218,7 +218,7 @@ protected: uno::Any aAny = xDrawPages->getByIndex(i); aAny >>= xDrawPage; uno::Reference< drawing::XShapes > xShapes(xDrawPage, uno::UNO_QUERY_THROW); - OUString aString = xShapeDumper.dump(xShapes); + OUString aString = XShapeDumper::dump(xShapes); OStringBuffer aFileNameBuf( OUStringToOString( rShapesDumpFileNameBase, RTL_TEXTENCODING_UTF8 ) ); aFileNameBuf.append(i); diff --git a/sd/source/ui/framework/factories/Pane.cxx b/sd/source/ui/framework/factories/Pane.cxx index 978cb870f8ec..321692e2e87a 100644 --- a/sd/source/ui/framework/factories/Pane.cxx +++ b/sd/source/ui/framework/factories/Pane.cxx @@ -178,7 +178,7 @@ Reference<rendering::XCanvas> Pane::CreateCanvas (void) if (mpWindow != NULL) { ::cppcanvas::SpriteCanvasSharedPtr pCanvas ( - ::cppcanvas::VCLFactory::getInstance().createSpriteCanvas(*mpWindow)); + cppcanvas::VCLFactory::createSpriteCanvas(*mpWindow)); if (pCanvas.get() != NULL) xCanvas = Reference<rendering::XCanvas>(pCanvas->getUNOSpriteCanvas(), UNO_QUERY); } diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx index fa55eee8f5fa..8e62792adb37 100644 --- a/sd/source/ui/presenter/PresenterHelper.cxx +++ b/sd/source/ui/presenter/PresenterHelper.cxx @@ -398,14 +398,14 @@ Reference<rendering::XBitmap> SAL_CALL PresenterHelper::loadBitmap ( ::osl::MutexGuard aGuard (::osl::Mutex::getGlobalMutex()); const cppcanvas::CanvasSharedPtr pCanvas ( - cppcanvas::VCLFactory::getInstance().createCanvas( + cppcanvas::VCLFactory::createCanvas( Reference<css::rendering::XCanvas>(rxCanvas,UNO_QUERY))); if (pCanvas.get() != NULL) { BitmapEx aBitmapEx = SdResId(nid); cppcanvas::BitmapSharedPtr xBitmap( - cppcanvas::VCLFactory::getInstance().createBitmap(pCanvas, + cppcanvas::VCLFactory::createBitmap(pCanvas, aBitmapEx)); if (xBitmap.get() == NULL) return NULL; diff --git a/sd/source/ui/presenter/PresenterPreviewCache.cxx b/sd/source/ui/presenter/PresenterPreviewCache.cxx index 22bdfa96930e..c4fd99bb1b7e 100644 --- a/sd/source/ui/presenter/PresenterPreviewCache.cxx +++ b/sd/source/ui/presenter/PresenterPreviewCache.cxx @@ -138,7 +138,7 @@ Reference<rendering::XBitmap> SAL_CALL PresenterPreviewCache::getSlidePreview ( OSL_ASSERT(mpCacheContext.get()!=NULL); cppcanvas::CanvasSharedPtr pCanvas ( - cppcanvas::VCLFactory::getInstance().createCanvas(rxCanvas)); + cppcanvas::VCLFactory::createCanvas(rxCanvas)); const SdrPage* pPage = mpCacheContext->GetPage(nSlideIndex); if (pPage == NULL) @@ -148,7 +148,7 @@ Reference<rendering::XBitmap> SAL_CALL PresenterPreviewCache::getSlidePreview ( if (aPreview.IsEmpty()) return NULL; else - return cppcanvas::VCLFactory::getInstance().createBitmap( + return cppcanvas::VCLFactory::createBitmap( pCanvas, aPreview)->getUNOBitmap(); } diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index a9c746fe5f19..b9fe2662921e 100644 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -128,7 +128,7 @@ void SAL_CALL PresenterTextView::initialize (const Sequence<Any>& rArguments) if (xCanvas.is()) { mpImplementation->SetCanvas( - cppcanvas::VCLFactory::getInstance().createCanvas(xCanvas)); + cppcanvas::VCLFactory::createCanvas(xCanvas)); } } catch (RuntimeException&) @@ -476,7 +476,7 @@ Reference<rendering::XBitmap> PresenterTextView::Implementation::GetBitmap (void mpEditEngine->Draw(mpOutputDevice, aWindowBox, Point(0,mnTop)); const BitmapEx aBitmap (mpOutputDevice->GetBitmapEx(Point(0,0), maSize)); - mxBitmap = cppcanvas::VCLFactory::getInstance().createBitmap( + mxBitmap = cppcanvas::VCLFactory::createBitmap( mpCanvas, aBitmap )->getUNOBitmap(); diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx index c744aac4a378..bec55173cf9a 100644 --- a/sd/source/ui/presenter/SlideRenderer.cxx +++ b/sd/source/ui/presenter/SlideRenderer.cxx @@ -107,9 +107,9 @@ Reference<rendering::XBitmap> SlideRenderer::createPreviewForCanvas ( SolarMutexGuard aGuard; cppcanvas::CanvasSharedPtr pCanvas ( - cppcanvas::VCLFactory::getInstance().createCanvas(rxCanvas)); + cppcanvas::VCLFactory::createCanvas(rxCanvas)); if (pCanvas.get() != NULL) - return cppcanvas::VCLFactory::getInstance().createBitmap( + return cppcanvas::VCLFactory::createBitmap( pCanvas, CreatePreview(rxSlide, rMaximalSize, nSuperSampleFactor))->getUNOBitmap(); else diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx index 093c920c7e23..7ae836be6975 100644 --- a/sd/source/ui/slideshow/slideshowviewimpl.cxx +++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx @@ -183,7 +183,7 @@ SlideShowView::SlideShowView( ShowWindow& rOutputWindow, SlideshowImpl* pSlideShow, bool bFullScreen ) : SlideShowView_Base( m_aMutex ), - mpCanvas( ::cppcanvas::VCLFactory::getInstance().createSpriteCanvas( rOutputWindow ) ), + mpCanvas( ::cppcanvas::VCLFactory::createSpriteCanvas( rOutputWindow ) ), mxWindow( VCLUnoHelper::GetInterface( &rOutputWindow ), uno::UNO_QUERY_THROW ), mxWindowPeer( mxWindow, uno::UNO_QUERY_THROW ), mxPointer(), @@ -305,7 +305,7 @@ void SAL_CALL SlideShowView::clear() throw (::com::sun::star::uno::RuntimeExcept aWindowSize.Width(), aWindowSize.Height() ) ) ); ::cppcanvas::PolyPolygonSharedPtr pPolyPoly( - ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( mpCanvas, aPoly ) ); + ::cppcanvas::BaseGfxFactory::createPolyPolygon( mpCanvas, aPoly ) ); if( pPolyPoly.get() ) { diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx b/slideshow/source/engine/rehearsetimingsactivity.cxx index 72d6db281812..34f628cc83a5 100644 --- a/slideshow/source/engine/rehearsetimingsactivity.cxx +++ b/slideshow/source/engine/rehearsetimingsactivity.cxx @@ -475,7 +475,7 @@ void RehearseTimingsActivity::paint( cppcanvas::CanvasSharedPtr const & canvas ) metaFile.WindStart(); cppcanvas::RendererSharedPtr renderer( - cppcanvas::VCLFactory::getInstance().createRenderer( + cppcanvas::VCLFactory::createRenderer( canvas, metaFile, cppcanvas::Renderer::Parameters() ) ); const bool succ = renderer->draw(); OSL_ASSERT( succ ); diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx index eca253a0b4aa..b0826834ed84 100644 --- a/slideshow/source/engine/shapes/shapeimporter.cxx +++ b/slideshow/source/engine/shapes/shapeimporter.cxx @@ -497,8 +497,8 @@ void ShapeImporter::importPolygons(uno::Reference<beans::XPropertySet> const& xP while(aIter != aEnd) { ::cppcanvas::PolyPolygonSharedPtr pPolyPoly( - ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( (*aIter)->getCanvas(), - aPoly ) ); + ::cppcanvas::BaseGfxFactory::createPolyPolygon( (*aIter)->getCanvas(), + aPoly ) ); if( pPolyPoly ) { pPolyPoly->setRGBALineColor( unoColor2RGBColor( nLineColor ).getIntegerColor() ); diff --git a/slideshow/source/engine/shapes/viewbackgroundshape.cxx b/slideshow/source/engine/shapes/viewbackgroundshape.cxx index 05f255b28604..cdef389d59ce 100644 --- a/slideshow/source/engine/shapes/viewbackgroundshape.cxx +++ b/slideshow/source/engine/shapes/viewbackgroundshape.cxx @@ -84,7 +84,7 @@ namespace slideshow // create a bitmap of appropriate size ::cppcanvas::BitmapSharedPtr pBitmap( - ::cppcanvas::BaseGfxFactory::getInstance().createBitmap( + ::cppcanvas::BaseGfxFactory::createBitmap( rDestinationCanvas, aBmpSizePixel ) ); @@ -112,7 +112,7 @@ namespace slideshow maBounds.getMinX(), maBounds.getMinY())); ::cppcanvas::RendererSharedPtr pRenderer( - ::cppcanvas::VCLFactory::getInstance().createRenderer( + ::cppcanvas::VCLFactory::createRenderer( pBitmapCanvas, *rMtf.get(), ::cppcanvas::Renderer::Parameters() ) ); diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index edbd66631a16..bb87b65534e6 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -158,9 +158,9 @@ namespace slideshow } } - io_rCacheEntry.mpRenderer = ::cppcanvas::VCLFactory::getInstance().createRenderer( rDestinationCanvas, - *rMtf.get(), - aParms ); + io_rCacheEntry.mpRenderer = ::cppcanvas::VCLFactory::createRenderer( rDestinationCanvas, + *rMtf.get(), + aParms ); io_rCacheEntry.mpMtf = rMtf; io_rCacheEntry.mpDestinationCanvas = rDestinationCanvas; @@ -619,7 +619,7 @@ namespace slideshow { // create a bitmap of appropriate size ::cppcanvas::BitmapSharedPtr pBitmap( - ::cppcanvas::BaseGfxFactory::getInstance().createAlphaBitmap( + ::cppcanvas::BaseGfxFactory::createAlphaBitmap( rDestinationCanvas, aBmpSize ) ); diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index 7e76377a4c97..079139377720 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -717,7 +717,7 @@ SlideBitmapSharedPtr SlideImpl::createCurrentSlideBitmap( const UnoViewSharedPtr // create a bitmap of appropriate size ::cppcanvas::BitmapSharedPtr pBitmap( - ::cppcanvas::BaseGfxFactory::getInstance().createBitmap( + ::cppcanvas::BaseGfxFactory::createBitmap( pCanvas, rBmpSize ) ); diff --git a/slideshow/source/engine/slide/userpaintoverlay.cxx b/slideshow/source/engine/slide/userpaintoverlay.cxx index 7fa45a298012..cdab35a9a919 100644 --- a/slideshow/source/engine/slide/userpaintoverlay.cxx +++ b/slideshow/source/engine/slide/userpaintoverlay.cxx @@ -418,8 +418,8 @@ namespace slideshow ++aIter ) { ::cppcanvas::PolyPolygonSharedPtr pPolyPoly( - ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( (*aIter)->getCanvas(), - aPoly ) ); + ::cppcanvas::BaseGfxFactory::createPolyPolygon( (*aIter)->getCanvas(), + aPoly ) ); if( pPolyPoly ) { diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx index e63ee87f0d3d..a0dab4db4164 100644 --- a/slideshow/source/engine/slideview.cxx +++ b/slideshow/source/engine/slideview.cxx @@ -180,8 +180,7 @@ void clearRect( ::cppcanvas::CanvasSharedPtr const& pCanvas, basegfx::B2DRange(rArea))); ::cppcanvas::PolyPolygonSharedPtr pPolyPoly( - ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( pCanvas, - aPoly ) ); + ::cppcanvas::BaseGfxFactory::createPolyPolygon( pCanvas, aPoly ) ); if( pPolyPoly ) { @@ -782,7 +781,7 @@ SlideView::SlideView( const uno::Reference<presentation::XSlideShowView>& xView, ENSURE_OR_THROW( mxView.is(), "SlideView::SlideView(): Invalid view" ); - mpCanvas = cppcanvas::VCLFactory::getInstance().createSpriteCanvas( + mpCanvas = cppcanvas::VCLFactory::createSpriteCanvas( xView->getCanvas() ); ENSURE_OR_THROW( mpCanvas, "Could not create cppcanvas" ); diff --git a/slideshow/source/engine/tools.cxx b/slideshow/source/engine/tools.cxx index ea01de32691d..3bd58aeaf077 100644 --- a/slideshow/source/engine/tools.cxx +++ b/slideshow/source/engine/tools.cxx @@ -677,8 +677,7 @@ namespace slideshow ::basegfx::tools::createPolygonFromRect( rRect )); ::cppcanvas::PolyPolygonSharedPtr pPolyPoly( - ::cppcanvas::BaseGfxFactory::getInstance().createPolyPolygon( rCanvas, - aPoly ) ); + ::cppcanvas::BaseGfxFactory::createPolyPolygon( rCanvas, aPoly ) ); if( pPolyPoly ) { diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx index dd0cabfbce4d..d78361ff5b97 100644 --- a/slideshow/source/engine/transitions/slidechangebase.cxx +++ b/slideshow/source/engine/transitions/slidechangebase.cxx @@ -105,7 +105,7 @@ SlideBitmapSharedPtr SlideChangeBase::createBitmap( const UnoViewSharedPtr& // create a bitmap of appropriate size cppcanvas::BitmapSharedPtr pBitmap( - cppcanvas::BaseGfxFactory::getInstance().createBitmap( + cppcanvas::BaseGfxFactory::createBitmap( pCanvas, slideSizePixel ) ); diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index 869482888bca..f28b0f896563 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -235,22 +235,22 @@ public: librdf_storage *createStorage_Lock(librdf_world *i_pWorld) const; librdf_model *createModel_Lock(librdf_world *i_pWorld, librdf_storage * i_pStorage) const; - librdf_uri* mkURI_Lock(librdf_world* i_pWorld, - const OString & i_rURI) const; - librdf_node* mkResource_Lock(librdf_world* i_pWorld, - const Resource * i_pResource) const; - librdf_node* mkNode_Lock(librdf_world* i_pWorld, - const Node * i_pNode) const; - librdf_statement* mkStatement_Lock(librdf_world* i_pWorld, - Statement const& i_rStatement) const; - ::boost::shared_ptr<Resource> extractResource_NoLock( - const uno::Reference< rdf::XResource > & i_xResource) const; - ::boost::shared_ptr<Node> extractNode_NoLock( - const uno::Reference< rdf::XNode > & i_xNode) const; - Statement extractStatement_NoLock( + static librdf_uri* mkURI_Lock(librdf_world* i_pWorld, + const OString & i_rURI); + static librdf_node* mkResource_Lock(librdf_world* i_pWorld, + const Resource * i_pResource); + static librdf_node* mkNode_Lock(librdf_world* i_pWorld, + const Node * i_pNode); + static librdf_statement* mkStatement_Lock(librdf_world* i_pWorld, + Statement const& i_rStatement); + static ::boost::shared_ptr<Resource> extractResource_NoLock( + const uno::Reference< rdf::XResource > & i_xResource); + static ::boost::shared_ptr<Node> extractNode_NoLock( + const uno::Reference< rdf::XNode > & i_xNode); + static Statement extractStatement_NoLock( const uno::Reference< rdf::XResource > & i_xSubject, const uno::Reference< rdf::XURI > & i_xPredicate, - const uno::Reference< rdf::XNode > & i_xObject) const; + const uno::Reference< rdf::XNode > & i_xObject); uno::Reference<rdf::XURI> convertToXURI(librdf_uri* i_pURI) const; uno::Reference<rdf::XURI> convertToXURI(librdf_node* i_pURI) const; uno::Reference<rdf::XResource> @@ -1355,13 +1355,13 @@ throw (uno::RuntimeException, rdf::RepositoryException, std::exception) } librdf_TypeConverter::Statement const stmt( - m_TypeConverter.extractStatement_NoLock( + librdf_TypeConverter::extractStatement_NoLock( i_xSubject, i_xPredicate, i_xObject)); ::osl::MutexGuard g(m_aMutex); // don't call i_x* with mutex locked const boost::shared_ptr<librdf_statement> pStatement( - m_TypeConverter.mkStatement_Lock(m_pWorld.get(), stmt), + librdf_TypeConverter::mkStatement_Lock(m_pWorld.get(), stmt), safe_librdf_free_statement); OSL_ENSURE(pStatement, "mkStatement failed"); @@ -1581,15 +1581,14 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, } ::boost::shared_ptr<librdf_TypeConverter::Resource> const pSubject( - m_TypeConverter.extractResource_NoLock(i_xSubject)); + librdf_TypeConverter::extractResource_NoLock(i_xSubject)); ::boost::shared_ptr<librdf_TypeConverter::Node> const pContent( - m_TypeConverter.extractNode_NoLock(xContent)); + librdf_TypeConverter::extractNode_NoLock(xContent)); ::std::vector< ::boost::shared_ptr<librdf_TypeConverter::Resource> > predicates; ::std::transform(i_rPredicates.begin(), i_rPredicates.end(), ::std::back_inserter(predicates), - ::boost::bind(&librdf_TypeConverter::extractResource_NoLock, - m_TypeConverter, _1)); + ::boost::bind(&librdf_TypeConverter::extractResource_NoLock, _1)); removeStatementRDFa(i_xObject); // not atomic with insertion? @@ -1733,13 +1732,13 @@ throw (uno::RuntimeException, rdf::RepositoryException, std::exception) } librdf_TypeConverter::Statement const stmt( - m_TypeConverter.extractStatement_NoLock( + librdf_TypeConverter::extractStatement_NoLock( i_xSubject, i_xPredicate, i_xObject)); ::osl::MutexGuard g(m_aMutex); // don't call i_x* with mutex locked const boost::shared_ptr<librdf_statement> pStatement( - m_TypeConverter.mkStatement_Lock(m_pWorld.get(), stmt), + librdf_TypeConverter::mkStatement_Lock(m_pWorld.get(), stmt), safe_librdf_free_statement); OSL_ENSURE(pStatement, "mkStatement failed"); @@ -1844,7 +1843,7 @@ void librdf_Repository::addStatementGraph_NoLock( } librdf_TypeConverter::Statement const stmt( - m_TypeConverter.extractStatement_NoLock( + librdf_TypeConverter::extractStatement_NoLock( i_xSubject, i_xPredicate, i_xObject)); const OUString contextU( i_xGraphName->getStringValue() ); @@ -1879,7 +1878,7 @@ void librdf_Repository::addStatementGraph_Lock( "librdf_new_node_from_uri_string failed", *this); } const boost::shared_ptr<librdf_statement> pStatement( - m_TypeConverter.mkStatement_Lock(m_pWorld.get(), i_rStatement), + librdf_TypeConverter::mkStatement_Lock(m_pWorld.get(), i_rStatement), safe_librdf_free_statement); OSL_ENSURE(pStatement, "mkStatement failed"); @@ -1919,7 +1918,7 @@ void librdf_Repository::removeStatementsGraph_NoLock( } librdf_TypeConverter::Statement const stmt( - m_TypeConverter.extractStatement_NoLock( + librdf_TypeConverter::extractStatement_NoLock( i_xSubject, i_xPredicate, i_xObject)); const OUString contextU( i_xGraphName->getStringValue() ); @@ -1943,7 +1942,7 @@ void librdf_Repository::removeStatementsGraph_NoLock( "librdf_new_node_from_uri_string failed", *this); } const boost::shared_ptr<librdf_statement> pStatement( - m_TypeConverter.mkStatement_Lock(m_pWorld.get(), stmt), + librdf_TypeConverter::mkStatement_Lock(m_pWorld.get(), stmt), safe_librdf_free_statement); OSL_ENSURE(pStatement, "mkStatement failed"); @@ -1999,7 +1998,7 @@ librdf_Repository::getStatementsGraph_NoLock( } librdf_TypeConverter::Statement const stmt( - m_TypeConverter.extractStatement_NoLock( + librdf_TypeConverter::extractStatement_NoLock( i_xSubject, i_xPredicate, i_xObject)); const OUString contextU( i_xGraphName->getStringValue() ); @@ -2023,7 +2022,7 @@ librdf_Repository::getStatementsGraph_NoLock( "librdf_new_node_from_uri_string failed", *this); } const boost::shared_ptr<librdf_statement> pStatement( - m_TypeConverter.mkStatement_Lock(m_pWorld.get(), stmt), + librdf_TypeConverter::mkStatement_Lock(m_pWorld.get(), stmt), safe_librdf_free_statement); OSL_ENSURE(pStatement, "mkStatement failed"); @@ -2119,7 +2118,7 @@ librdf_model *librdf_TypeConverter::createModel_Lock( // this does NOT create a node, only URI librdf_uri* librdf_TypeConverter::mkURI_Lock( librdf_world* i_pWorld, - OString const& i_rURI) const + OString const& i_rURI) { librdf_uri *pURI( librdf_new_uri(i_pWorld, reinterpret_cast<const unsigned char *>(i_rURI.getStr()))); @@ -2133,7 +2132,7 @@ librdf_uri* librdf_TypeConverter::mkURI_Lock( librdf_world* i_pWorld, // extract blank or URI node - call without Mutex locked ::boost::shared_ptr<librdf_TypeConverter::Resource> librdf_TypeConverter::extractResource_NoLock( - const uno::Reference< rdf::XResource > & i_xResource) const + const uno::Reference< rdf::XResource > & i_xResource) { if (!i_xResource.is()) { return ::boost::shared_ptr<Resource>(); @@ -2154,7 +2153,7 @@ librdf_TypeConverter::extractResource_NoLock( // create blank or URI node librdf_node* librdf_TypeConverter::mkResource_Lock( librdf_world* i_pWorld, - Resource const*const i_pResource) const + Resource const*const i_pResource) { if (!i_pResource) return 0; BlankNode const*const pBlankNode( @@ -2188,7 +2187,7 @@ librdf_node* librdf_TypeConverter::mkResource_Lock( librdf_world* i_pWorld, // extract blank or URI or literal node - call without Mutex locked ::boost::shared_ptr<librdf_TypeConverter::Node> librdf_TypeConverter::extractNode_NoLock( - const uno::Reference< rdf::XNode > & i_xNode) const + const uno::Reference< rdf::XNode > & i_xNode) { if (!i_xNode.is()) { return ::boost::shared_ptr<Node>(); @@ -2221,7 +2220,7 @@ librdf_TypeConverter::extractNode_NoLock( // create blank or URI or literal node librdf_node* librdf_TypeConverter::mkNode_Lock( librdf_world* i_pWorld, - Node const*const i_pNode) const + Node const*const i_pNode) { if (!i_pNode) return 0; Resource const*const pResource(dynamic_cast<Resource const*>(i_pNode)); @@ -2266,7 +2265,7 @@ librdf_node* librdf_TypeConverter::mkNode_Lock( librdf_world* i_pWorld, librdf_TypeConverter::Statement librdf_TypeConverter::extractStatement_NoLock( const uno::Reference< rdf::XResource > & i_xSubject, const uno::Reference< rdf::XURI > & i_xPredicate, - const uno::Reference< rdf::XNode > & i_xObject) const + const uno::Reference< rdf::XNode > & i_xObject) { ::boost::shared_ptr<Resource> const pSubject( extractResource_NoLock(i_xSubject)); @@ -2279,7 +2278,7 @@ librdf_TypeConverter::Statement librdf_TypeConverter::extractStatement_NoLock( } librdf_statement* librdf_TypeConverter::mkStatement_Lock(librdf_world* i_pWorld, - Statement const& i_rStatement) const + Statement const& i_rStatement) { librdf_node *const pSubject( mkResource_Lock(i_pWorld, i_rStatement.pSubject.get()) ); |