summaryrefslogtreecommitdiff
path: root/sw/inc/unoframe.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-08-17 19:21:35 +0200
committerMichael Stahl <mstahl@redhat.com>2014-08-20 16:40:09 +0200
commit102348fcd17ab4a862d6f15565f97d8a88cd9231 (patch)
tree7a78ea26c828e38360b697ad8e74070907b1ea9c /sw/inc/unoframe.hxx
parent851af7040e05e956a5c8f145679c8141a07fecb4 (diff)
make SwXFrame derived constructors private
... so that new instances have to be created by the factory functions. Change-Id: I643a154609b1a277d5cbc22d739ef8e357028f56
Diffstat (limited to 'sw/inc/unoframe.hxx')
-rw-r--r--sw/inc/unoframe.hxx20
1 files changed, 17 insertions, 3 deletions
diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx
index 23af07c96fab..3e5bb973f0ac 100644
--- a/sw/inc/unoframe.hxx
+++ b/sw/inc/unoframe.hxx
@@ -85,6 +85,10 @@ protected:
SwXFrame(SwFrmFmt& rFrmFmt, FlyCntType eSet,
const SfxItemPropertySet* pPropSet);
+ template<class Interface, class Impl>
+ static css::uno::Reference<Interface>
+ CreateXFrame(SwDoc & rDoc, SwFrmFmt *const pFrmFmt);
+
public:
static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
@@ -163,6 +167,8 @@ class SwXTextFrame : public SwXTextFrameBaseClass,
public SwXFrame
{
protected:
+ friend class SwXFrame; // just for CreateXFrame
+
virtual const SwStartNode *GetStartNode() const SAL_OVERRIDE;
virtual ::com::sun::star::uno::Reference<
@@ -171,10 +177,11 @@ protected:
throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
virtual ~SwXTextFrame();
-public:
+
SwXTextFrame(SwDoc *pDoc);
SwXTextFrame(SwFrmFmt& rFmt);
+public:
static SW_DLLPUBLIC css::uno::Reference<css::text::XTextFrame>
CreateXTextFrame(SwDoc & rDoc, SwFrmFmt * pFrmFmt);
@@ -240,11 +247,15 @@ class SwXTextGraphicObject : public SwXTextGraphicObjectBaseClass,
public SwXFrame
{
protected:
+ friend class SwXFrame; // just for CreateXFrame
+
virtual ~SwXTextGraphicObject();
-public:
+
SwXTextGraphicObject( SwDoc *pDoc );
SwXTextGraphicObject(SwFrmFmt& rFmt);
+public:
+
static css::uno::Reference<css::text::XTextContent>
CreateXTextGraphicObject(SwDoc & rDoc, SwFrmFmt * pFrmFmt);
@@ -288,12 +299,15 @@ class SwXTextEmbeddedObject : public SwXTextEmbeddedObjectBaseClass,
public SwXFrame
{
protected:
+ friend class SwXFrame; // just for CreateXFrame
+
virtual ~SwXTextEmbeddedObject();
-public:
SwXTextEmbeddedObject( SwDoc *pDoc );
SwXTextEmbeddedObject(SwFrmFmt& rFmt);
+public:
+
static css::uno::Reference<css::text::XTextContent>
CreateXTextEmbeddedObject(SwDoc & rDoc, SwFrmFmt * pFrmFmt);
1 conditionalsRohan Kumar I removed all the OSL_DEBUG_LEVEL > 1 conditionals by SAL_INFOs or OSL_DEBUG_LEVEL > 0 Change-Id: I261644a179e763612204bbb0e54a869fa1a62298 Reviewed-on: https://gerrit.libreoffice.org/23035 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> 2015-12-21loplugin:unusedfields in sfx2,slideshow,starmath,stocNoel Grandin Change-Id: If3622b23c45dd3a2a4e9869452142d1f6b47919e 2015-11-15use initialiser syntax for Sequence<OUString>Noel Grandin replaced using the script: git grep -lP 'Sequence.*OUString.*\(1\)' | xargs perl -0777 -pi -e "s/Sequence< OUString > (\w+)\(1\); .*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g" Change-Id: I23688a91562051a8eed11fc2a85599545c285c34 Reviewed-on: https://gerrit.libreoffice.org/19967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> 2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann Change-Id: I162b47199e959f97c3bed1f307225db944017e4f 2015-11-04yyyyyNoel Grandin Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548 2015-06-08loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann Change-Id: Iaf1585c0413d07ce4f8712570d9195d6a21fa174 2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann Change-Id: I2ac79c757d9116d35436ae1adc0e11e7040e725d 2014-12-16stoc: Use appropriate OUString functions on string constantsStephan Bergmann Change-Id: If8c20c8a0958016c14007406244fc8ab9a742933 2014-05-29remove more unnecesary OUString constructor useNoel Grandin when throwing exceptions Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac 2014-05-23Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part20Julien Nabet Change-Id: If87cdfb2c605254f6d69baa4ca5aec09091caa68 2014-05-23remove boilerplate in UNO Exception constructor callsNoel Grandin Now that we have default values for Exception constructor params, remove lots of boilerplate code. Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74 2014-05-22stoc: fix includesThomas Arnhold Change-Id: I0809bfa6897d469e63d6e84898f60aae16a14862 2014-05-22stoc: make use of css aliasThomas Arnhold Change-Id: I1dd85a7b1236cfebd5e653fe6d329968e556364b 2014-05-22stoc: remove using namespace from headersThomas Arnhold Change-Id: I1bee29ddcef66cb38ef2619507ad66c886f6f20d 2014-03-10stoc: simplify deprecated XTypeProvider.getImplementationIdStephan Bergmann Change-Id: I57eca2dcf316232c26c528015c4ba18ba3c4760d 2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3 2014-02-26Remove visual noise from stocAlexander Wilms Change-Id: I19edfb2796298c4870124d0d1e9488974a010bb8 Reviewed-on: https://gerrit.libreoffice.org/8316 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2014-02-23Remove unneccessary commentsAlexander Wilms Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2014-01-31Remove UNOIDL "array" and "union" vaporware remnantsStephan Bergmann ...and deprecate what cannot be removed for compatibility. Change-Id: I1ea335af775b867b468b8285113631167729a92a 2014-01-28coverity#440504 Dereference before null checkCaolán McNamara Change-Id: Ia7c817ca0b002279bee8699e4940c57937657ad4 2013-12-16Clean-up uno/lbnames.hStephan Bergmann Change-Id: I4bd729499aa8be58f04194656e35c1f79d5d4919 2013-10-22fdo#54938: Adapt supportsService implementations..Marcos Paulo de Souza to cppu::supportsService Change-Id: I0b03d3910f094f2183bf9859db9d5bcaf35d1f14 Reviewed-on: https://gerrit.libreoffice.org/6370 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com> 2013-08-22Mark as constTakeshi Abe Change-Id: I65a05b59da6dbc2d37a55129c54ca0f322702364 2013-05-06remove usage of RTL_CONSTASCII_USTRINGPARAMLuboš Luňák Mechanical removal of usage together with OUString ctor, done by compiler plugin. Change-Id: I554227f76df0dac620b1b46fca32516f78b462c5 2013-04-19Remove any remaining remnants of unused component_canUnload featureStephan Bergmann Change-Id: I635fd006b5ba9f5fb0091748ee2ff9bc3c1a2d2a 2013-04-19remove unused component_canUnload functionsMatúš Kukan Change-Id: Id3f41e2a620c47bb848718d0fc994739be2d64fc 2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk have kept them, in order not to break external API (the automatic using declaration is LO-internal). Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09 2013-03-19automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStringsThomas Arnhold Done with a perl regex: s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec Reviewed-on: https://gerrit.libreoffice.org/2832 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org> 2013-01-30API CHANGE: Make TypeDescriptionManager/Provider more consistentStephan Bergmann ...by letting their getByHierarchicalName methods return information about UNO constants as X(Constant)TypeDescription values, just as for (alomst -- see the odd enum member case) all other entities. This will make future changes in this area easier. The only affected client I could find so far is the core reflection service, but there might be more that I overlooked. Change-Id: I6731f2914773d49e33eeaec6e256ff2e5409ad2d 2012-09-20No point with component_canUnload when DISABLE_DYNLOADINGTor Lillqvist Change-Id: I85016d1e70dbb5e499aefad568179800b5d00ab7 2012-09-01add more component prefixesMatúš Kukan Change-Id: I3afe59a6326b9e5cb26c39a82d7aabdb05cc2b7e 2012-06-29re-base on ALv2 code.Michael Meeks 2012-04-17prefix the component_getFactory name for DISABLE_DYNLOADINGTor Lillqvist 2012-02-19Get rid of size() == 0Elton Chung 2011-12-27function component_canUnload is exportedDavid Tardon 2011-11-27remove include of pch header from stocNorbert Thiebaud