From f6880eac22ea62ce236ea60af7391560f8d4f962 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 4 Sep 2011 22:04:35 +0200 Subject: [PATCH] Drop unused parts --- sw/source/filter/ww8/WW8TableInfo.cxx | 31 ------------------- sw/source/filter/ww8/WW8TableInfo.hxx | 3 -- unusedcode.easy | 9 ------ writerfilter/inc/resourcemodel/Fraction.hxx | 1 - .../source/dmapper/DomainMapper_Impl.cxx | 10 ------ .../source/dmapper/DomainMapper_Impl.hxx | 1 - .../source/dmapper/MeasureHandler.cxx | 6 ---- .../source/dmapper/MeasureHandler.hxx | 2 -- writerfilter/source/dmapper/PropertyMap.cxx | 15 --------- writerfilter/source/dmapper/PropertyMap.hxx | 3 -- .../source/dmapper/StyleSheetTable.cxx | 7 ----- .../source/dmapper/StyleSheetTable.hxx | 1 - .../source/ooxml/OOXMLFastContextHandler.cxx | 11 +++---- .../source/ooxml/OOXMLFastContextHandler.hxx | 3 -- .../source/resourcemodel/Fraction.cxx | 5 --- 15 files changed, 4 insertions(+), 104 deletions(-) diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 429cc4aa17a0..ade3e02f51f4 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -349,32 +349,6 @@ WW8TableNodeInfo::~WW8TableNodeInfo() { } -::std::string WW8TableNodeInfo::toString() const -{ - static char buffer[1024]; - snprintf(buffer, sizeof(buffer), - "" - ,this, getDepth()); - - ::std::string sResult(buffer); - - Inners_t::const_iterator aIt(mInners.begin()); - Inners_t::const_iterator aEnd(mInners.end()); - - while (aIt != aEnd) - { - WW8TableNodeInfoInner::Pointer_t pInner = aIt->second; - sResult += pInner->toString(); - - aIt++; - } -#if OSL_DEBUG_LEVEL > 1 - sResult += dbg_out(*mpNode); -#endif - sResult += ""; - - return sResult; -} void WW8TableNodeInfo::setDepth(sal_uInt32 nDepth) { mnDepth = nDepth; @@ -508,11 +482,6 @@ const SwTableBox * WW8TableNodeInfo::getTableBox() const return getInnerForDepth(mnDepth)->getTableBox(); } -const SwTable * WW8TableNodeInfo::getTable() const -{ - return getInnerForDepth(mnDepth)->getTable(); -} - WW8TableNodeInfo * WW8TableNodeInfo::getNext() const { return mpNext; diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index 96baf314cf4d..e1c4d53b25f0 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -167,7 +167,6 @@ public: bool isFirstInTable() const; const SwNode * getNode() const; const SwTableBox * getTableBox() const; - const SwTable * getTable() const; WW8TableNodeInfo * getNext() const; const SwNode * getNextNode() const; const SwRect & getRect() const; @@ -179,8 +178,6 @@ public: sal_uInt32 getCell() const; sal_uInt32 getRow() const; - ::std::string toString() const; - bool operator < (const WW8TableNodeInfo & rInfo) const; }; diff --git a/unusedcode.easy b/unusedcode.easy index 60862fade22d..d1614a0fdb5b 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -3144,12 +3144,3 @@ writerfilter::XPathLogger::XPathLogger() writerfilter::XPathLogger::endElement() writerfilter::XPathLogger::getXPath() const writerfilter::XPathLogger::startElement(std::basic_string, std::allocator >) -writerfilter::dmapper::FIB::GetData(unsigned int) -writerfilter::dmapper::MeasureHandler::isAutoWidth() const -writerfilter::dmapper::SectionPropertyMap::GetPageStyleName(bool) -writerfilter::dmapper::SectionPropertyMap::SetPageStyleName(bool, rtl::OUString const&) -writerfilter::dmapper::StyleSheetTable::resolveSprmProps(writerfilter::Sprm&) -writerfilter::ooxml::OOXMLFastContextHandler::getResourceString() const -writerfilter::resourcemodel::Fraction::Fraction(writerfilter::resourcemodel::Fraction const&, writerfilter::resourcemodel::Fraction const&) -ww8::WW8TableNodeInfo::getTable() const -ww8::WW8TableNodeInfo::toString() const diff --git a/writerfilter/inc/resourcemodel/Fraction.hxx b/writerfilter/inc/resourcemodel/Fraction.hxx index 152e6a694d6d..a318b18ca037 100644 --- a/writerfilter/inc/resourcemodel/Fraction.hxx +++ b/writerfilter/inc/resourcemodel/Fraction.hxx @@ -39,7 +39,6 @@ class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Fraction { public: explicit Fraction(sal_Int32 nNumerator, sal_Int32 nDenominator = 1); - explicit Fraction(const Fraction & a, const Fraction & b); virtual ~Fraction(); void init(sal_Int32 nNumerator, sal_Int32 nDenominator); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 99a0f79e8d9f..c9cfd5502834 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -164,16 +164,6 @@ typedef ::std::map< ::rtl::OUString, FieldConversion> FieldConversionMap_t; - -sal_Int32 FIB::GetData( Id nName ) -{ - if( nName >= NS_rtf::LN_WIDENT && nName <= NS_rtf::LN_LCBSTTBFUSSR) - return aFIBData[nName - NS_rtf::LN_WIDENT]; - OSL_FAIL( "invalid index in FIB"); - return -1; -} - - void FIB::SetData( Id nName, sal_Int32 nValue ) { OSL_ENSURE( nName >= NS_rtf::LN_WIDENT && nName <= NS_rtf::LN_LCBSTTBFUSSR, "invalid index in FIB"); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 1b8b2be25036..b9e9af17c153 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -206,7 +206,6 @@ class FIB sal_Int32 GetLNCHS() const {return nLNCHS;} void SetLNCHS(sal_Int32 nValue) {nLNCHS = nValue;} - sal_Int32 GetData( Id nName ); void SetData( Id nName, sal_Int32 nValue ); }; diff --git a/writerfilter/source/dmapper/MeasureHandler.cxx b/writerfilter/source/dmapper/MeasureHandler.cxx index 51d351f10b3f..fcb7aa577cbc 100644 --- a/writerfilter/source/dmapper/MeasureHandler.cxx +++ b/writerfilter/source/dmapper/MeasureHandler.cxx @@ -112,12 +112,6 @@ sal_Int32 MeasureHandler::getMeasureValue() const return nRet; } - -bool MeasureHandler::isAutoWidth() const -{ - return sal::static_int_cast(m_nUnit) == NS_ooxml::LN_Value_ST_TblWidth_auto; -} - } //namespace dmapper } //namespace writerfilter diff --git a/writerfilter/source/dmapper/MeasureHandler.hxx b/writerfilter/source/dmapper/MeasureHandler.hxx index 1fc9ae96985c..3c9de2427d06 100644 --- a/writerfilter/source/dmapper/MeasureHandler.hxx +++ b/writerfilter/source/dmapper/MeasureHandler.hxx @@ -55,8 +55,6 @@ public: virtual ~MeasureHandler(); sal_Int32 getMeasureValue() const; - //at least tables can have automatic width - bool isAutoWidth() const; sal_Int16 GetRowHeightSizeType() const { return m_nRowHeightSizeType;} }; diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 7cadff2d091e..310bcbaa21ff 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -331,21 +331,6 @@ SectionPropertyMap::~SectionPropertyMap() } -const ::rtl::OUString& SectionPropertyMap::GetPageStyleName( bool bFirst ) -{ - return bFirst ? m_sFirstPageStyleName : m_sFollowPageStyleName; -} - - -void SectionPropertyMap::SetPageStyleName( bool bFirst, const ::rtl::OUString& rName) -{ - if( bFirst ) - m_sFirstPageStyleName = rName; - else - m_sFollowPageStyleName = rName; -} - - ::rtl::OUString lcl_FindUnusedPageStyleName(const uno::Sequence< ::rtl::OUString >& rPageStyleNames) { static const sal_Char cDefaultStyle[] = "Converted"; diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 5a36690c047e..3b93061ec240 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -225,9 +225,6 @@ public: m_xStartingRange = xRange; } - const ::rtl::OUString& GetPageStyleName( bool bFirst ); - void SetPageStyleName( bool bFirst, const ::rtl::OUString& rName); - ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > GetPageStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xStyles, const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory >& xTextFactory, diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 85b5d3f108df..6b824b26cd86 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -1166,13 +1166,6 @@ static const sal_Char* const aStyleNamePairs[] = return sRet; } -void StyleSheetTable::resolveSprmProps(Sprm & rSprm) -{ - writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); - if( pProperties.get()) - pProperties->resolve(*this); -} - void StyleSheetTable::resolveAttributeProperties(Value & val) { writerfilter::Reference::Pointer_t pProperties = val.getProperties(); diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx index 8f3811b5066a..ccae544898c6 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.hxx +++ b/writerfilter/source/dmapper/StyleSheetTable.hxx @@ -114,7 +114,6 @@ private: virtual void lcl_entry(int pos, writerfilter::Reference::Pointer_t ref); void resolveAttributeProperties(Value & val); - void resolveSprmProps(Sprm & sprm_); void applyDefaults(bool bParaProperties); }; typedef boost::shared_ptr< StyleSheetTable > StyleSheetTablePtr; diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 6487415dd359..b38da42943a1 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -67,6 +67,7 @@ using ::com::sun::star::lang::XMultiComponentFactory; using namespace ::com::sun::star; using namespace ::std; +#if OSL_DEBUG_LEVEL > 1 static string resourceToString (OOXMLFastContextHandler::ResourceEnum_t eResource) { @@ -92,6 +93,7 @@ static string resourceToString return sResult; } +#endif set aSetContexts; @@ -414,7 +416,7 @@ void OOXMLFastContextHandler::dumpXml( const TagLogger::Pointer_t pLogger ) cons pLogger->attribute("parent", sBuffer); pLogger->attribute("type", getType()); - pLogger->attribute("resource", getResourceString()); + pLogger->attribute("resource", resourceToString(getResource())); pLogger->attribute("token", fastTokenToId(getToken())); pLogger->attribute("id", (*QNameToString::Instance())(getId())); @@ -435,11 +437,6 @@ void OOXMLFastContextHandler::dumpXml( const TagLogger::Pointer_t pLogger ) cons #endif -string OOXMLFastContextHandler::getResourceString() const -{ - return resourceToString(getResource()); -} - void OOXMLFastContextHandler::setId(Id rId) { #ifdef DEBUG_CONTEXT_HANDLER @@ -1317,7 +1314,7 @@ void OOXMLFastContextHandlerProperties::dumpXml( const TagLogger::Pointer_t pLog pLogger->attribute("parent", sBuffer); pLogger->attribute("type", getType()); - pLogger->attribute("resource", getResourceString()); + pLogger->attribute("resource", resourceToString(getResource())); pLogger->attribute("token", fastTokenToId(getToken())); pLogger->attribute("id", (*QNameToString::Instance())(getId())); diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index 52c149c6c747..b2f82c80fbe1 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -275,9 +275,6 @@ protected: virtual void lcl_endAction(Token_t Element); - // Returns string for resource of this context. (debug) - string getResourceString() const; - virtual OOXMLPropertySet * getPicturePropSet (const ::rtl::OUString & rId); virtual void resolvePropertySetAttrs(); diff --git a/writerfilter/source/resourcemodel/Fraction.cxx b/writerfilter/source/resourcemodel/Fraction.cxx index c50668a7db03..fd9045b06585 100644 --- a/writerfilter/source/resourcemodel/Fraction.cxx +++ b/writerfilter/source/resourcemodel/Fraction.cxx @@ -79,11 +79,6 @@ Fraction::Fraction(sal_Int32 nNumerator, sal_Int32 nDenominator) init(nNumerator, nDenominator); } -Fraction::Fraction(const Fraction & a, const Fraction & b) -{ - init(a.mnNumerator * b.mnDenominator, a.mnDenominator * b.mnNumerator); -} - Fraction::~Fraction() { }