diff options
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r-- | sw/source/filter/ww8/WW8Sttbf.hxx | 20 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 17 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.hxx | 1 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 11 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.hxx | 4 |
5 files changed, 9 insertions, 44 deletions
diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx b/sw/source/filter/ww8/WW8Sttbf.hxx index 9e05bae2b61b..8c50744be0fc 100644 --- a/sw/source/filter/ww8/WW8Sttbf.hxx +++ b/sw/source/filter/ww8/WW8Sttbf.hxx @@ -30,11 +30,10 @@ namespace ww8 { - typedef boost::shared_array<sal_uInt8> DataArray_t; -class WW8Struct : public ::sw::ExternalData + class WW8Struct : public ::sw::ExternalData { - DataArray_t mp_data; + boost::shared_array<sal_uInt8> mp_data; sal_uInt32 mn_offset; sal_uInt32 mn_size; @@ -51,29 +50,22 @@ class WW8Struct : public ::sw::ExternalData OUString getUString(sal_uInt32 nOffset, sal_uInt32 nCount); }; -typedef ::std::vector<OUString> StringVector_t; template <class T> class WW8Sttb : public WW8Struct { typedef std::shared_ptr< void > ExtraPointer_t; - typedef ::std::vector< ExtraPointer_t > ExtrasVector_t; - bool bDoubleByteCharacters; - StringVector_t m_Strings; - ExtrasVector_t m_Extras; + bool bDoubleByteCharacters; + std::vector<OUString> m_Strings; + std::vector< ExtraPointer_t > m_Extras; public: WW8Sttb(SvStream& rSt, sal_Int32 nPos, sal_uInt32 nSize); virtual ~WW8Sttb(); - StringVector_t & getStrings() + std::vector<OUString> & getStrings() { return m_Strings; } - - const T * getExtra(sal_uInt32 nEntry) const - { - return dynamic_cast<const T *> (m_Extras[nEntry].get()); - } }; template <class T> diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index a0f8c04cdcaf..8aba8533f343 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -8540,23 +8540,6 @@ void DocxAttributeOutput::BulletDefinition(int nId, const Graphic& rGraphic, Siz m_pSerializer->endElementNS(XML_w, XML_numPicBullet); } -void DocxAttributeOutput::AddToAttrList( std::unique_ptr<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrs, ... ) -{ - if( !pAttrList ) - pAttrList.reset(FastSerializerHelper::createAttrList()); - - va_list args; - va_start( args, nAttrs ); - for( sal_Int32 i = 0; i<nAttrs; i++) - { - sal_Int32 nName = va_arg( args, sal_Int32 ); - const char* pValue = va_arg( args, const char* ); - if( pValue ) - pAttrList->add( nName, pValue ); - } - va_end( args ); -} - void DocxAttributeOutput::AddToAttrList( uno::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue ) { AddToAttrList( pAttrList, 1, nAttrName, sAttrValue ); diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 187856049b8e..6bdf73a3388c 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -714,7 +714,6 @@ private: void CmdField_Impl( FieldInfos& rInfos ); void EndField_Impl( FieldInfos& rInfos ); - static void AddToAttrList( std::unique_ptr<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nArgs, ... ); static void AddToAttrList( css::uno::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue ); static void AddToAttrList( css::uno::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nArgs, ... ); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 6aecff939c48..7091d250006a 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2751,16 +2751,7 @@ void WW8Export::WriteFkpPlcUsw() if ( pSttbfAssoc ) // #i106057# { - ::std::vector<OUString> aStrings; - - ::ww8::StringVector_t & aSttbStrings = pSttbfAssoc->getStrings(); - ::ww8::StringVector_t::const_iterator aItEnd = aSttbStrings.end(); - for (::ww8::StringVector_t::const_iterator aIt = aSttbStrings.begin(); - aIt != aItEnd; ++aIt) - { - aStrings.push_back(aIt->getStr()); - } - + ::std::vector<OUString> aStrings(pSttbfAssoc->getStrings()); WriteAsStringTable(aStrings, pFib->fcSttbfAssoc, pFib->lcbSttbfAssoc); } diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 970f0c5f4661..7684aa3a8f9b 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -293,7 +293,7 @@ class wwFont //In some future land the stream could be converted to a nice stream interface //and we could have harmony private: - sal_uInt8 maWW8_FFN[6]; +sal_uInt8 maWW8_FFN[6]; OUString msFamilyNm; OUString msAltNm; bool mbAlt; @@ -301,7 +301,7 @@ private: FontFamily meFamily; rtl_TextEncoding meChrSet; public: - wwFont( const OUString &rFamilyName, FontPitch ePitch, FontFamily eFamily, + wwFont( const OUString &rFamilyName, FontPitch ePitch, FontFamily eFamily, rtl_TextEncoding eChrSet); bool Write( SvStream *pTableStram ) const; void WriteDocx( DocxAttributeOutput* rAttrOutput ) const; |