summaryrefslogtreecommitdiff
path: root/sw/inc/unoframe.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-08-15 23:21:05 +0200
committerMichael Stahl <mstahl@redhat.com>2014-08-20 16:40:08 +0200
commit00b5f1ef2e06d5ae2ce7469710e85c4a06c20a5f (patch)
tree1ecc3c0d541f1d6be7ce4128f7feaa6d466eed9d /sw/inc/unoframe.hxx
parentbcbab38792f47cb1e27a8fb4bc0523ea135a2e75 (diff)
i#105557: thread-safe caching of SwXFrame instances
Replace SwXFrames::GetObject() with factory functions that use the WeakReference SwFrmFmt::m_wXObject to cache the instance in a thread-safe way. Change-Id: If56e4d7f95cb4f2e112139f228fb832ae9bf7d76
Diffstat (limited to 'sw/inc/unoframe.hxx')
-rw-r--r--sw/inc/unoframe.hxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx
index afd243736a44..23af07c96fab 100644
--- a/sw/inc/unoframe.hxx
+++ b/sw/inc/unoframe.hxx
@@ -78,13 +78,14 @@ protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) SAL_OVERRIDE;
virtual ~SwXFrame();
-public:
+
SwXFrame(FlyCntType eSet,
const SfxItemPropertySet* pPropSet,
SwDoc *pDoc ); //Descriptor-If
SwXFrame(SwFrmFmt& rFrmFmt, FlyCntType eSet,
const SfxItemPropertySet* pPropSet);
+public:
static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
//XUnoTunnel
@@ -174,6 +175,9 @@ public:
SwXTextFrame(SwDoc *pDoc);
SwXTextFrame(SwFrmFmt& rFmt);
+ static SW_DLLPUBLIC css::uno::Reference<css::text::XTextFrame>
+ CreateXTextFrame(SwDoc & rDoc, SwFrmFmt * pFrmFmt);
+
// FIXME: EVIL HACK: make available for SwXFrame::attachToRange
void SetDoc(SwDoc *const pDoc) { SwXText::SetDoc(pDoc); };
@@ -241,6 +245,9 @@ public:
SwXTextGraphicObject( SwDoc *pDoc );
SwXTextGraphicObject(SwFrmFmt& rFmt);
+ static css::uno::Reference<css::text::XTextContent>
+ CreateXTextGraphicObject(SwDoc & rDoc, SwFrmFmt * pFrmFmt);
+
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL acquire( ) throw() SAL_OVERRIDE;
virtual void SAL_CALL release( ) throw() SAL_OVERRIDE;
@@ -287,6 +294,9 @@ public:
SwXTextEmbeddedObject( SwDoc *pDoc );
SwXTextEmbeddedObject(SwFrmFmt& rFmt);
+ static css::uno::Reference<css::text::XTextContent>
+ CreateXTextEmbeddedObject(SwDoc & rDoc, SwFrmFmt * pFrmFmt);
+
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL acquire( ) throw() SAL_OVERRIDE;
virtual void SAL_CALL release( ) throw() SAL_OVERRIDE;