From 53600134ec737d50808c0f630b536229ad3310bb Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 5 Apr 2012 08:38:09 +0100 Subject: no use is made of FmFormObj::m_nType --- .../source/drivers/mozab/MPreparedStatement.cxx | 7 +--- .../source/drivers/mozab/MPreparedStatement.hxx | 3 -- editeng/source/editeng/editdoc.cxx | 10 ------ editeng/source/editeng/editdoc.hxx | 3 -- svx/source/form/fmdmod.cxx | 2 +- svx/source/form/fmdpage.cxx | 2 +- svx/source/form/fmobj.cxx | 12 ++----- svx/source/form/fmobjfac.cxx | 4 +-- svx/source/inc/fmobj.hxx | 9 ++--- unusedcode.easy | 9 ----- xmloff/inc/txtflde.hxx | 6 ---- xmloff/source/text/XMLPropertyBackpatcher.cxx | 41 ---------------------- xmloff/source/text/XMLPropertyBackpatcher.hxx | 15 -------- xmloff/source/text/txtflde.cxx | 15 -------- 14 files changed, 9 insertions(+), 129 deletions(-) diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.cxx b/connectivity/source/drivers/mozab/MPreparedStatement.cxx index bc19e36a99f2..c9b27e306293 100644 --- a/connectivity/source/drivers/mozab/MPreparedStatement.cxx +++ b/connectivity/source/drivers/mozab/MPreparedStatement.cxx @@ -382,12 +382,7 @@ void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,cons OCommonStatement::setFastPropertyValue_NoBroadcast(nHandle,rValue); } } -// ----------------------------------------------------------------------------- -void OPreparedStatement::checkParameterIndex(sal_Int32 _parameterIndex) -{ - if( !_parameterIndex || _parameterIndex > m_nNumParams) - ::dbtools::throwInvalidIndexException(*this); -} + // ----------------------------------------------------------------------------- void OPreparedStatement::checkAndResizeParameters(sal_Int32 parameterIndex) { diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.hxx b/connectivity/source/drivers/mozab/MPreparedStatement.hxx index 2151b3d43112..eca24fd8b5bb 100644 --- a/connectivity/source/drivers/mozab/MPreparedStatement.hxx +++ b/connectivity/source/drivers/mozab/MPreparedStatement.hxx @@ -78,9 +78,6 @@ namespace connectivity ::rtl::Reference m_xParamColumns; // the parameter columns OValueRow m_aParameterRow; - - void checkParameterIndex(sal_Int32 _parameterIndex); - protected: virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue) diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index c4449509d92b..f797d2416a9e 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -1154,16 +1154,6 @@ void EditPaM::SetNode(ContentNode* p) pNode = p; } -bool EditPaM::IsParaStart() const -{ - return nIndex == 0; -} - -bool EditPaM::IsParaEnd() const -{ - return nIndex == pNode->Len(); -} - sal_Bool EditPaM::DbgIsBuggy( EditDoc& rDoc ) { if ( !pNode ) diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx index 8b70806f768d..27c5b142253e 100644 --- a/editeng/source/editeng/editdoc.hxx +++ b/editeng/source/editeng/editdoc.hxx @@ -337,9 +337,6 @@ public: sal_uInt16& GetIndex() { return nIndex; } void SetIndex( sal_uInt16 n ) { nIndex = n; } - bool IsParaStart() const; - bool IsParaEnd() const; - sal_Bool DbgIsBuggy( EditDoc& rDoc ); EditPaM& operator = ( const EditPaM& rPaM ); diff --git a/svx/source/form/fmdmod.cxx b/svx/source/form/fmdmod.cxx index fbc4b5a53607..86ee670152e1 100644 --- a/svx/source/form/fmdmod.cxx +++ b/svx/source/form/fmdmod.cxx @@ -46,7 +46,7 @@ using namespace ::svxform; } else if ( ServiceSpecifier.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ControlShape")) ) { - SdrObject* pObj = new FmFormObj(OBJ_FM_CONTROL); + SdrObject* pObj = new FmFormObj(); xRet = static_cast(static_cast(new SvxShapeControl(pObj))); } if (!xRet.is()) diff --git a/svx/source/form/fmdpage.cxx b/svx/source/form/fmdpage.cxx index 450d85c07871..5b8791978a74 100644 --- a/svx/source/form/fmdpage.cxx +++ b/svx/source/form/fmdpage.cxx @@ -97,7 +97,7 @@ SdrObject *SvxFmDrawPage::_CreateSdrObject( const ::com::sun::star::uno::Referen if ( aShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.ShapeControl" ) ) // compatibility || aShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.ControlShape" ) ) ) - return new FmFormObj( OBJ_FM_CONTROL ); + return new FmFormObj(); else return SvxDrawPage::_CreateSdrObject( xDescr ); diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index 1610bb1c815f..c8e8689a6192 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -69,10 +69,9 @@ using namespace ::svxform; TYPEINIT1(FmFormObj, SdrUnoObj); DBG_NAME(FmFormObj); //------------------------------------------------------------------ -FmFormObj::FmFormObj(const ::rtl::OUString& rModelName,sal_Int32 _nType) +FmFormObj::FmFormObj(const ::rtl::OUString& rModelName) :SdrUnoObj ( rModelName ) ,m_nPos ( -1 ) - ,m_nType ( _nType ) ,m_pLastKnownRefDevice ( NULL ) { DBG_CTOR(FmFormObj, NULL); @@ -83,10 +82,9 @@ FmFormObj::FmFormObj(const ::rtl::OUString& rModelName,sal_Int32 _nType) } //------------------------------------------------------------------ -FmFormObj::FmFormObj( sal_Int32 _nType ) +FmFormObj::FmFormObj() :SdrUnoObj ( String() ) ,m_nPos ( -1 ) - ,m_nType ( _nType ) ,m_pLastKnownRefDevice ( NULL ) { DBG_CTOR(FmFormObj, NULL); @@ -705,12 +703,6 @@ void FmFormObj::BrkCreate( SdrDragStat& rStat ) impl_isolateControlModel_nothrow(); } -// ----------------------------------------------------------------------------- -sal_Int32 FmFormObj::getType() const -{ - return m_nType; -} - // ----------------------------------------------------------------------------- // #i70852# overload Layer interface to force to FormColtrol layer diff --git a/svx/source/form/fmobjfac.cxx b/svx/source/form/fmobjfac.cxx index a2b692572082..37afeecd23f9 100644 --- a/svx/source/form/fmobjfac.cxx +++ b/svx/source/form/fmobjfac.cxx @@ -237,9 +237,9 @@ IMPL_LINK(FmFormObjFactory, MakeObject, SdrObjFactory*, pObjFactory) // create the actual object if ( !sServiceSpecifier.isEmpty() ) - pObjFactory->pNewObj = new FmFormObj( sServiceSpecifier, pObjFactory->nIdentifier ); + pObjFactory->pNewObj = new FmFormObj(sServiceSpecifier); else - pObjFactory->pNewObj = new FmFormObj( pObjFactory->nIdentifier ); + pObjFactory->pNewObj = new FmFormObj(); // initialize some properties which we want to differ from the defaults for ( PropertyValueArray::const_iterator aInitProp = aInitialProperties.begin(); diff --git a/svx/source/inc/fmobj.hxx b/svx/source/inc/fmobj.hxx index 35297c2ad013..b86b8ef908f2 100644 --- a/svx/source/inc/fmobj.hxx +++ b/svx/source/inc/fmobj.hxx @@ -53,15 +53,14 @@ class FmFormObj: public SdrUnoObj ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> m_xParent; ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > m_xEnvironmentHistory; sal_Int32 m_nPos; - sal_Int32 m_nType; OutputDevice* m_pLastKnownRefDevice; // the last ref device we know, as set at the model // only to be used for comparison with the current ref device! public: - SVX_DLLPUBLIC FmFormObj(const ::rtl::OUString& rModelName,sal_Int32 _nType); - SVX_DLLPUBLIC FmFormObj(sal_Int32 _nType); + SVX_DLLPUBLIC FmFormObj(const ::rtl::OUString& rModelName); + SVX_DLLPUBLIC FmFormObj(); TYPEINFO(); @@ -105,10 +104,6 @@ public: static FmFormObj* GetFormObject( SdrObject* _pSdrObject ); static const FmFormObj* GetFormObject( const SdrObject* _pSdrObject ); - /** returns the type of this form object. See fmglob.hxx - */ - sal_Int32 getType() const; - virtual void SetUnoControlModel( const ::com::sun::star::uno::Reference< com::sun::star::awt::XControlModel >& _rxModel ); protected: diff --git a/unusedcode.easy b/unusedcode.easy index ed53d240c403..19586dee9147 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -7,7 +7,6 @@ FmEntryDataArray::Insert(FmEntryData* const*, unsigned short) FmEntryDataArray::Insert(FmEntryDataArray const*, unsigned short, unsigned short) FmEntryDataArray::Remove(FmEntryData* const&, unsigned short) FmFieldWinMgr::GetChildWindowId() -FmFormObj::getType() const FmPropBrwMgr::GetChildWindowId() FontSelectPattern::FontSelectPattern(ImplFontData const&, Size const&, float, int, bool) FontStyleBox::FontStyleBox(Window*, long) @@ -326,13 +325,6 @@ XMLFontAutoStylePoolNames_Impl::Remove(rtl::OUString*) XMLFontAutoStylePool_Impl::GetPos(XMLFontAutoStylePoolEntry_Impl const*) const XMLFontAutoStylePool_Impl::Remove(XMLFontAutoStylePoolEntry_Impl*) XMLParentNode::AddChild(XMLChildNode*, unsigned long) -XMLPropertyBackpatcher::XMLPropertyBackpatcher(char const*) -XMLPropertyBackpatcher::XMLPropertyBackpatcher(char const*, char const*, unsigned char, rtl::OUString) -XMLPropertyBackpatcher::XMLPropertyBackpatcher(rtl::OUString const&, rtl::OUString const&, unsigned char, rtl::OUString) -XMLPropertyBackpatcher::XMLPropertyBackpatcher(char const*) -XMLPropertyBackpatcher::XMLPropertyBackpatcher(char const*, char const*, unsigned char, short) -XMLPropertyBackpatcher::XMLPropertyBackpatcher(rtl::OUString const&, rtl::OUString const&, unsigned char, short) -XMLTextFieldExport::ProcessDate(xmloff::token::XMLTokenEnum, com::sun::star::util::Date const&, unsigned short) XMLTextListAutoStylePoolNames_Impl::GetPos(rtl::OUString const*) const XMLTextListAutoStylePoolNames_Impl::Remove(rtl::OUString*) XMLTextListAutoStylePool_Impl::GetPos(XMLTextListAutoStylePoolEntry_Impl const*) const @@ -768,7 +760,6 @@ connectivity::mozab::MQueryHelper::hasMore() const connectivity::mozab::MQueryHelper::next() connectivity::mozab::MQueryHelper::rewind() connectivity::mozab::OCatalog::getDot() -connectivity::mozab::OPreparedStatement::checkParameterIndex(int) connectivity::mozab::OResultSet::initializeRow(rtl::Reference >&, int) connectivity::mozab::OTable::OTable(connectivity::sdbcx::OCollection*, connectivity::mozab::OConnection*) connectivity::sdbcx::OGroup::OGroup(rtl::OUString const&, unsigned char) diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index 2c94703596ea..4aad9a6bfc96 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.hxx @@ -377,12 +377,6 @@ protected: sal_Bool bIsDate, /// export as date (rather than date/time)? sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix - /// export date according to ISO 8601 - void ProcessDate( - enum ::xmloff::token::XMLTokenEnum eXMLName, /// attribute token - const ::com::sun::star::util::Date& rTime, /// date value - sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix - /// export all attributes for bibliography data fields void ProcessBibliographyData( const ::com::sun::star::uno::Reference < diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx index 0d8beec53194..9e4f47dababe 100644 --- a/xmloff/source/text/XMLPropertyBackpatcher.cxx +++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx @@ -53,47 +53,6 @@ XMLPropertyBackpatcher::XMLPropertyBackpatcher( { } -template -XMLPropertyBackpatcher::XMLPropertyBackpatcher( - const OUString& sPropName, - const OUString& sPreserveName, - sal_Bool bDefault, - A aDef) -: sPropertyName(sPropName) -, bDefaultHandling(bDefault) -, bPreserveProperty(!sPreserveName.isEmpty()) -, sPreservePropertyName(sPreserveName) -, aDefault(aDef) -{ -} - -template -XMLPropertyBackpatcher::XMLPropertyBackpatcher( - const sal_Char* pPropName) -: bDefaultHandling(sal_False) -, bPreserveProperty(sal_False) -{ - DBG_ASSERT(pPropName != NULL, "need property name"); - sPropertyName = OUString::createFromAscii(pPropName); -} - -template -XMLPropertyBackpatcher::XMLPropertyBackpatcher( - const sal_Char* pPropName, - const sal_Char* pPreservePropName, - sal_Bool bDefault, - A aDef) -: bDefaultHandling(bDefault) -, bPreserveProperty(pPreservePropName != NULL) -, aDefault(aDef) -{ - DBG_ASSERT(pPropName != NULL, "need property name"); - sPropertyName = OUString::createFromAscii(pPropName); - if (pPreservePropName != NULL) - { - sPreservePropertyName = OUString::createFromAscii(pPreservePropName); - } -} template XMLPropertyBackpatcher::~XMLPropertyBackpatcher() diff --git a/xmloff/source/text/XMLPropertyBackpatcher.hxx b/xmloff/source/text/XMLPropertyBackpatcher.hxx index 42f2009f25e0..872bf2d1b0d3 100644 --- a/xmloff/source/text/XMLPropertyBackpatcher.hxx +++ b/xmloff/source/text/XMLPropertyBackpatcher.hxx @@ -105,21 +105,6 @@ public: XMLPropertyBackpatcher( const ::rtl::OUString& sPropertyName); - XMLPropertyBackpatcher( - const ::rtl::OUString& sPropertyName, - const ::rtl::OUString& sPreservePropertyName, - sal_Bool bDefault, - A aDef); - - XMLPropertyBackpatcher( - const sal_Char* pPropertyName); - - XMLPropertyBackpatcher( - const sal_Char* pPropertyName, - const sal_Char* pPreservePropertyName, - sal_Bool bDefault, - A aDef); - ~XMLPropertyBackpatcher(); /// resolve a known ID. diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index cc8a3991633c..410bb05d6938 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -2656,21 +2656,6 @@ void XMLTextFieldExport::ProcessDateTime(enum XMLTokenEnum eName, ProcessString(eName, aBuffer.makeStringAndClear(), sal_True, nPrefix); } -/// export date according to ISO 8601 -void XMLTextFieldExport::ProcessDate( - enum XMLTokenEnum eName, - const ::com::sun::star::util::Date& rDate, - sal_uInt16 nPrefix) -{ - // the easiest way: delegate to ProcessDateTime (as date) - DateTime aDateTime; - aDateTime.Day = rDate.Day; - aDateTime.Month = rDate.Month; - aDateTime.Year = rDate.Year; - ProcessDateTime(eName, aDateTime, sal_True, nPrefix); -} - - /// export a date, time, or duration void XMLTextFieldExport::ProcessDateTime(enum XMLTokenEnum eName, sal_Int32 nMinutes, -- cgit