[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/GraphicZOrderHelper.hxx |2 writerfilter/source/dmapper/DomainMapper.cxx |6 +- writerfilter/source/dmapper/DomainMapper.hxx |2 writerfilter/source/dmapper/GraphicHelpers.cxx |8 +- writerfilter/source/dmapper/TagLogger.cxx| 62 +++ writerfilter/source/dmapper/TagLogger.hxx|4 - writerfilter/source/rtftok/rtfsprm.cxx |8 +- 7 files changed, 46 insertions(+), 46 deletions(-) New commits: commit 24f0e121b06252b323e237d9e7f47fcb28bff41e Author: Miklos Vajna AuthorDate: Mon Feb 13 08:37:14 2023 +0100 Commit: Miklos Vajna CommitDate: Mon Feb 13 08:20:15 2023 + writerfilter: prefix members of DomainMapper, GraphicZOrderHelper, ... ... RTFSprms_compare and TagLogger See tdf#94879 for motivation. Change-Id: I94c432a3aa592f2deb32175938e19047cc65fa44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146852 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx b/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx index a6458333b560..c6a308ddf819 100644 --- a/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx +++ b/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx @@ -22,7 +22,7 @@ public: private: using Items = std::map>; -Items items; +Items m_items; }; } // namespace writerfilter::dmapper diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 61b4d6d114d4..c2e84cf1534a 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -4511,9 +4511,9 @@ SettingsTablePtr const & DomainMapper::GetSettingsTable() GraphicZOrderHelper* DomainMapper::graphicZOrderHelper() { -if (zOrderHelper == nullptr) -zOrderHelper.reset( new GraphicZOrderHelper ); -return zOrderHelper.get(); +if (m_zOrderHelper == nullptr) +m_zOrderHelper.reset( new GraphicZOrderHelper ); +return m_zOrderHelper.get(); } uno::Reference DomainMapper::PopPendingShape() diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx index cb68954c7929..b9771b8ad749 100644 --- a/writerfilter/source/dmapper/DomainMapper.hxx +++ b/writerfilter/source/dmapper/DomainMapper.hxx @@ -183,7 +183,7 @@ private: bool mbIsSplitPara; bool mbHasControls; bool mbWasShapeInPara; -std::unique_ptr< GraphicZOrderHelper > zOrderHelper; +std::unique_ptr< GraphicZOrderHelper > m_zOrderHelper; OUString m_sGlossaryEntryName; }; diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx index 44949e28e754..67739d4986e5 100644 --- a/writerfilter/source/dmapper/GraphicHelpers.cxx +++ b/writerfilter/source/dmapper/GraphicHelpers.cxx @@ -272,7 +272,7 @@ text::WrapTextMode WrapHandler::getWrapMode( ) const void GraphicZOrderHelper::addItem(uno::Reference const& props, sal_Int32 const relativeHeight) { -items[ relativeHeight ] = props; +m_items[ relativeHeight ] = props; } // The relativeHeight value in .docx is an arbitrary number, where only the relative ordering matters. @@ -281,7 +281,7 @@ void GraphicZOrderHelper::addItem(uno::Reference const& pro sal_Int32 GraphicZOrderHelper::findZOrder( sal_Int32 relativeHeight, bool bOldStyle ) { // std::map is iterated sorted by key -auto it = std::find_if(items.cbegin(), items.cend(), +auto it = std::find_if(m_items.cbegin(), m_items.cend(), [relativeHeight, bOldStyle](const Items::value_type& rItem) { // Old-style ordering differs in what should happen when there is already an item with the same z-order: // we belong under it in case of new-style, but we belong above it in case of old-style. @@ -289,9 +289,9 @@ sal_Int32 GraphicZOrderHelper::findZOrder( sal_Int32 relativeHeight, bool bOldSt } ); sal_Int32 itemZOrderOffset(0); // before the item -if( it == items.end()) // we're topmost +if( it == m_items.end()) // we're topmost { -if( items.empty()) +if( m_items.empty()) return 0; --it; itemZOrderOffset = 1; // after the topmost diff --git a/writerfilter/source/dmapper/TagLogger.cxx b/writerfilter/source/dmapper/TagLogger.cxx index 69ffbbc09f39..7116ef2a5e58 100644 --- a/writerfilter/source/dmapper/TagLogger.cxx +++ b/writerfilter/source/dmapper/TagLogger.cxx @@ -28,20 +28,20 @@ using namespace css; namespace writerfilter { TagLogger::TagLogger() -: pWriter( nullptr ), pName( "DOMAINMAPPER" ) +: m_pWriter( nullptr ), m_pName( "DOMAINMAPPER" ) { } TagLogger::~TagLogger() { -pWriter = nullptr; -pName = nullptr; +m_pWriter = nullptr; +m_pName = nullptr; } #ifdef DBG_UTIL void TagLogger::setFileName( const
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/resourcemodel.hxx|7 ++- writerfilter/source/dmapper/DomainMapper.cxx |2 +- writerfilter/source/dmapper/DomainMapper.hxx |2 +- writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 +- writerfilter/source/dmapper/DomainMapper_Impl.hxx |4 ++-- writerfilter/source/dmapper/LoggedResources.hxx |2 +- 6 files changed, 12 insertions(+), 7 deletions(-) New commits: commit ab8333baee56fa20dae644c85fa29a7edb2d55b1 Author: Caolán McNamara AuthorDate: Tue Dec 28 19:51:07 2021 + Commit: Caolán McNamara CommitDate: Wed Dec 29 16:43:40 2021 +0100 be more exact about the type of pDocument Change-Id: Iab0d23e8ee691ac6ed3381bd7e1ee02bb59dc64f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127661 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/writerfilter/inc/dmapper/resourcemodel.hxx b/writerfilter/inc/dmapper/resourcemodel.hxx index 9e980494b09b..65682d78e381 100644 --- a/writerfilter/inc/dmapper/resourcemodel.hxx +++ b/writerfilter/inc/dmapper/resourcemodel.hxx @@ -178,6 +178,11 @@ const sal_uInt8 cFieldStart = 0x13; const sal_uInt8 cFieldSep = 0x14; const sal_uInt8 cFieldEnd = 0x15; +namespace ooxml +{ +class OOXMLDocument; +} + /** Handler for a stream. */ @@ -202,7 +207,7 @@ public: /// The current section is the last one in this body text. virtual void markLastSectionGroup(){}; -virtual void setDocumentReference(void* pDocument) = 0; +virtual void setDocumentReference(writerfilter::ooxml::OOXMLDocument* pDocument) = 0; /** Receives start mark for group with the same paragraph properties. diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index b5e08cfe5bc9..43d134b23805 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -187,7 +187,7 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon catch( const uno::Exception& ) {} } -void DomainMapper::setDocumentReference(void* pDocument) +void DomainMapper::setDocumentReference(writerfilter::ooxml::OOXMLDocument* pDocument) { m_pImpl->setDocumentReference(pDocument); } diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx index 4ed2cca83526..c0134866537c 100644 --- a/writerfilter/source/dmapper/DomainMapper.hxx +++ b/writerfilter/source/dmapper/DomainMapper.hxx @@ -80,7 +80,7 @@ public: utl::MediaDescriptor const & rMediaDesc); virtual ~DomainMapper() override; -virtual void setDocumentReference(void* pDocument) override; +virtual void setDocumentReference(writerfilter::ooxml::OOXMLDocument* pDocument) override; // Stream virtual void markLastParagraphInSection() override; diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 96b7b1391877..0bf0834febde 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -405,7 +405,7 @@ DomainMapper_Impl::~DomainMapper_Impl() writerfilter::ooxml::OOXMLDocument* DomainMapper_Impl::getDocumentReference() const { -return static_cast(m_pOOXMLDocument); +return m_pOOXMLDocument; } uno::Reference< container::XNameContainer > const & DomainMapper_Impl::GetPageStyles() diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index ee6813f9d293..ae267c5c390e 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -449,7 +449,7 @@ public: private: SourceDocumentType m_eDocumentType; DomainMapper& m_rDMapper; -void* m_pOOXMLDocument; +writerfilter::ooxml::OOXMLDocument* m_pOOXMLDocument; OUString m_aBaseUrl; css::uno::Reference m_xTextDocument; css::uno::Reference m_xDocumentSettings; @@ -634,7 +634,7 @@ public: utl::MediaDescriptor const & rMediaDesc); ~DomainMapper_Impl(); -void setDocumentReference(void* pDocument) { if (!m_pOOXMLDocument) m_pOOXMLDocument = pDocument; }; +void setDocumentReference(writerfilter::ooxml::OOXMLDocument* pDocument) { if (!m_pOOXMLDocument) m_pOOXMLDocument = pDocument; }; writerfilter::ooxml::OOXMLDocument* getDocumentReference() const; SectionPropertyMap* GetLastSectionContext( ) diff --git a/writerfilter/source/dmapper/LoggedResources.hxx b/writerfilter/source/dmapper/LoggedResources.hxx index 848d17b68219..74b7b0b2c9a5 100644 --- a/writerfilter/source/dmapper/LoggedResources.hxx +++ b/writerfilter/source/dmapper/LoggedResources.hxx @@ -72,7 +72,7 @@ public: void startGlossaryEntry() override;
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/resourcemodel.hxx|2 writerfilter/source/dmapper/DomainMapper.cxx |5 ++ writerfilter/source/dmapper/DomainMapper.hxx |2 writerfilter/source/dmapper/DomainMapper_Impl.cxx |8 ++- writerfilter/source/dmapper/DomainMapper_Impl.hxx |8 +++ writerfilter/source/dmapper/LoggedResources.hxx |2 writerfilter/source/dmapper/SdtHelper.cxx | 55 +- writerfilter/source/dmapper/SdtHelper.hxx | 16 +- writerfilter/source/ooxml/OOXMLDocumentImpl.cxx |2 9 files changed, 96 insertions(+), 4 deletions(-) New commits: commit be172e5a93a94b2c615dc0aae0979b9a9fa9ebab Author: Vasily Melenchuk AuthorDate: Fri Nov 19 15:09:31 2021 +0300 Commit: Vasily Melenchuk CommitDate: Sat Dec 18 15:54:11 2021 +0100 tdf#104823: basic support for reading field data from databinding Change-Id: Ie45eb18205c1c54a631303b45887e54e456b6d5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125550 Tested-by: Jenkins Reviewed-by: Vasily Melenchuk diff --git a/writerfilter/inc/dmapper/resourcemodel.hxx b/writerfilter/inc/dmapper/resourcemodel.hxx index 1a525b12296f..9e980494b09b 100644 --- a/writerfilter/inc/dmapper/resourcemodel.hxx +++ b/writerfilter/inc/dmapper/resourcemodel.hxx @@ -202,6 +202,8 @@ public: /// The current section is the last one in this body text. virtual void markLastSectionGroup(){}; +virtual void setDocumentReference(void* pDocument) = 0; + /** Receives start mark for group with the same paragraph properties. */ diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 2958f004553d..a7b759ed0e2d 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -187,6 +187,11 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon catch( const uno::Exception& ) {} } +void DomainMapper::setDocumentReference(void* pDocument) +{ +m_pImpl->setDocumentReference(pDocument); +} + DomainMapper::~DomainMapper() { try diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx index 688f4c37edc0..4ed2cca83526 100644 --- a/writerfilter/source/dmapper/DomainMapper.hxx +++ b/writerfilter/source/dmapper/DomainMapper.hxx @@ -80,6 +80,8 @@ public: utl::MediaDescriptor const & rMediaDesc); virtual ~DomainMapper() override; +virtual void setDocumentReference(void* pDocument) override; + // Stream virtual void markLastParagraphInSection() override; virtual void markLastSectionGroup() override; diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 5662e8967d8b..96b7b1391877 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -275,6 +275,7 @@ DomainMapper_Impl::DomainMapper_Impl( utl::MediaDescriptor const & rMediaDesc) : m_eDocumentType( eDocumentType ), m_rDMapper( rDMapper ), +m_pOOXMLDocument(nullptr), m_xTextDocument( xModel, uno::UNO_QUERY ), m_xTextFactory( xModel, uno::UNO_QUERY ), m_xComponentContext( xContext ), @@ -378,7 +379,7 @@ DomainMapper_Impl::DomainMapper_Impl( getTableManager( ).startLevel(); m_bUsingEnhancedFields = !utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Filter::Microsoft::Import::ImportWWFieldsAsEnhancedFields::get(m_xComponentContext); -m_pSdtHelper = new SdtHelper(*this); +m_pSdtHelper = new SdtHelper(*this, m_xComponentContext); m_aRedlines.push(std::vector()); @@ -402,6 +403,11 @@ DomainMapper_Impl::~DomainMapper_Impl() } } +writerfilter::ooxml::OOXMLDocument* DomainMapper_Impl::getDocumentReference() const +{ +return static_cast(m_pOOXMLDocument); +} + uno::Reference< container::XNameContainer > const & DomainMapper_Impl::GetPageStyles() { if(!m_xPageStyles1.is()) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index fb89fb7a7087..b4633cf8beeb 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -67,6 +67,10 @@ namespace com::sun::star{ namespace beans{ class XPropertySet;} } +namespace writerfilter::ooxml { +class OOXMLDocument; +} + namespace writerfilter::dmapper { class SdtHelper; @@ -445,6 +449,7 @@ public: private: SourceDocumentType m_eDocumentType; DomainMapper& m_rDMapper; +void* m_pOOXMLDocument; OUString m_aBaseUrl; css::uno::Reference m_xTextDocument; css::uno::Reference m_xDocumentSettings; @@
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/CommentProperties.hxx|8 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx | 12 2 files changed, 20 insertions(+) New commits: commit f067e06c2ff1fa12e5a45c34186aae75a2aff3b1 Author: Mike Kaganski AuthorDate: Tue Apr 20 14:34:19 2021 +0300 Commit: Mike Kaganski CommitDate: Tue Apr 20 15:23:29 2021 +0200 Document the new classes added in d8c0b63355af6caf3f0145dd1c10a93d63134a88 Change-Id: Ib7421dd9dfe9245f3b6d98b772c74f22ab7f983f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114333 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/writerfilter/inc/dmapper/CommentProperties.hxx b/writerfilter/inc/dmapper/CommentProperties.hxx index 1cba6930d4c6..d22a2f7261d3 100644 --- a/writerfilter/inc/dmapper/CommentProperties.hxx +++ b/writerfilter/inc/dmapper/CommentProperties.hxx @@ -11,6 +11,14 @@ namespace writerfilter { +/** + A container for the extended comment properties linked to the last paragraph of a comment + + Corresponds to the data available in w15:commentEx elements from commentsExtended stream + ([MS-DOCX]): resolved state and parent (referring to comment that this one answers to; TODO). + + @since 7.2 +*/ struct CommentProperties { bool bDone; diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index 6aa2bd2ed6c2..dc5c369aa0fe 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -599,6 +599,18 @@ protected: virtual void process() override; }; +/** + A class that reads individual w15:commentEx elements from commentsExtended stream [MS-DOCX]. + + It is used to pre-populate the extended comment properties in domain mapper. The stream + contains information about resolved state of the comments ("done" attribute) and the parent + comment (the one that this comment answers to). + + Note that the data is linked to paraId identifiers (also introduced in [MS-DOCX]), which + correspond to paragraphs, not directly to comment ids. + + @since 7.2 +*/ class OOXMLFastContextHandlerCommentEx : public OOXMLFastContextHandler { public: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/ooxml/OOXMLDocument.hxx|1 - writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 14 -- writerfilter/source/ooxml/OOXMLDocumentImpl.hxx |5 + 3 files changed, 5 insertions(+), 15 deletions(-) New commits: commit 57924e5bef323c34e870f111288123887f07378d Author: Noel Grandin AuthorDate: Thu Oct 17 12:36:53 2019 +0200 Commit: Noel Grandin CommitDate: Thu Oct 17 20:32:20 2019 +0200 loplugin:virtualdead unused param in OOXMLDocument::setXNoteType which means the whole method is dead Change-Id: Ib3349f5beb8b9bb9fe223bc33aca84a20e581445 Reviewed-on: https://gerrit.libreoffice.org/80954 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx index 124368ee0bc1..7856a6a4dced 100644 --- a/writerfilter/inc/ooxml/OOXMLDocument.hxx +++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx @@ -213,7 +213,6 @@ public: virtual css::uno::Reference getInputStreamForId(const OUString & rId) = 0; virtual void setXNoteId(const sal_Int32 nId) = 0; virtual sal_Int32 getXNoteId() const = 0; -virtual void setXNoteType(Id nId) = 0; virtual const OUString & getTarget() const = 0; virtual css::uno::Reference getShapeContext( ) = 0; virtual void setShapeContext( css::uno::Reference xContext ) = 0; diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index 888f69a2320d..bec04a949ac7 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -237,10 +237,6 @@ sal_Int32 OOXMLDocumentImpl::getXNoteId() const return mnXNoteId; } -void OOXMLDocumentImpl::setXNoteType(Id /*nId*/) -{ -} - const OUString & OOXMLDocumentImpl::getTarget() const { return mpStream->getTarget(); @@ -262,15 +258,13 @@ OOXMLDocumentImpl::getSubStream(const OUString & rId) } writerfilter::Reference::Pointer_t -OOXMLDocumentImpl::getXNoteStream(OOXMLStream::StreamType_t nType, Id aType, - const sal_Int32 nId) +OOXMLDocumentImpl::getXNoteStream(OOXMLStream::StreamType_t nType, const sal_Int32 nId) { OOXMLStream::Pointer_t pStream = OOXMLDocumentFactory::createStream(mpStream, nType); // See above, no status indicator for the note stream, either. OOXMLDocumentImpl * pDocument = new OOXMLDocumentImpl(pStream, uno::Reference(), mbSkipImages, maMediaDescriptor); pDocument->setXNoteId(nId); -pDocument->setXNoteType(aType); pDocument->setModel(getModel()); pDocument->setDrawPage(getDrawPage()); @@ -282,7 +276,7 @@ void OOXMLDocumentImpl::resolveFootnote(Stream & rStream, const sal_Int32 nNoteId) { writerfilter::Reference::Pointer_t pStream = -getXNoteStream(OOXMLStream::FOOTNOTES, aType, nNoteId); +getXNoteStream(OOXMLStream::FOOTNOTES, nNoteId); Id nId; switch (aType) @@ -304,7 +298,7 @@ void OOXMLDocumentImpl::resolveEndnote(Stream & rStream, const sal_Int32 nNoteId) { writerfilter::Reference::Pointer_t pStream = -getXNoteStream(OOXMLStream::ENDNOTES, aType, nNoteId); +getXNoteStream(OOXMLStream::ENDNOTES, nNoteId); Id nId; switch (aType) @@ -325,7 +319,7 @@ void OOXMLDocumentImpl::resolveComment(Stream & rStream, const sal_Int32 nId) { writerfilter::Reference::Pointer_t pStream = -getXNoteStream(OOXMLStream::COMMENTS, 0, nId); +getXNoteStream(OOXMLStream::COMMENTS, nId); resolveFastSubStreamWithId(rStream, pStream, NS_ooxml::LN_annotation); } diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx index 059ac1cea601..2bcc1e746ab0 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx @@ -82,9 +82,7 @@ private: getSubStream(const OUString & rId); writerfilter::Reference::Pointer_t -getXNoteStream(OOXMLStream::StreamType_t nType, - Id aType, - const sal_Int32 nNoteId); +getXNoteStream(OOXMLStream::StreamType_t nType, const sal_Int32 nNoteId); void resolveCustomXmlStream(Stream & rStream); void resolveGlossaryStream(Stream & rStream); @@ -122,7 +120,6 @@ public: virtual css::uno::Reference getInputStreamForId(const OUString & rId) override; virtual void setXNoteId(const sal_Int32 nId) override; virtual sal_Int32 getXNoteId() const override; -virtual void setXNoteType(Id aId) override; virtual const OUString & getTarget() const override; virtual css::uno::Reference getShapeContext( ) override; virtual void setShapeContext( css::uno::Reference xContext ) override; ___
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/resourcemodel.hxx |6 +++ writerfilter/source/dmapper/PropertyMap.hxx|5 ++ writerfilter/source/ooxml/OOXMLPropertySet.hxx | 45 + writerfilter/source/rtftok/rtfsprm.cxx |6 --- writerfilter/source/rtftok/rtfsprm.hxx |7 +++ 5 files changed, 62 insertions(+), 7 deletions(-) New commits: commit 2fb6ac75eb63368b1a0b52d82ae9adab9e012ab3 Author: Stephan Bergmann AuthorDate: Thu Jul 26 12:20:50 2018 +0200 Commit: Stephan Bergmann CommitDate: Thu Jul 26 20:43:47 2018 +0200 writerfilter: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9) ...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc.; and by removing explicitly user- provided functions that do the same as their implicitly-defined counterparts, but may prevent implicitly declared copy functions from being defined as non- deleted in the future. (Even if such a user-provided function was declared non-inline in an include file, the apparently-used implicitly-defined copy functions are already include, so why bother with non-inline functions.) Change-Id: I08632dcf7ccac1ab7efa0d5e8f4985d74cd31eac Reviewed-on: https://gerrit.libreoffice.org/58077 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/writerfilter/inc/dmapper/resourcemodel.hxx b/writerfilter/inc/dmapper/resourcemodel.hxx index b2caa3ad97fa..8e2ffc546682 100644 --- a/writerfilter/inc/dmapper/resourcemodel.hxx +++ b/writerfilter/inc/dmapper/resourcemodel.hxx @@ -99,6 +99,12 @@ public: */ virtual void resolve(T & rHandler) = 0; +Reference() = default; +Reference(Reference const &) = default; +Reference(Reference &&) = default; +Reference & operator =(Reference const &) = default; +Reference & operator =(Reference &&) = default; + protected: ~Reference() override {} }; diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 91e182d3997f..f43bb38cad77 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -409,6 +409,11 @@ private: public: ParagraphProperties(); +ParagraphProperties(ParagraphProperties const &) = default; +ParagraphProperties(ParagraphProperties &&) = default; +ParagraphProperties & operator =(ParagraphProperties const &) = default; +ParagraphProperties & operator =(ParagraphProperties &&) = default; + // Does not compare the starting/ending range, m_sParaStyleName and m_nDropCapLength bool operator==( const ParagraphProperties& ); diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.hxx b/writerfilter/source/ooxml/OOXMLPropertySet.hxx index 2950d250b398..5d744015eb3f 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.hxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.hxx @@ -35,6 +35,11 @@ public: OOXMLValue(); virtual ~OOXMLValue() override; +OOXMLValue(OOXMLValue const &) = default; +OOXMLValue(OOXMLValue &&) = default; +OOXMLValue & operator =(OOXMLValue const &) = default; +OOXMLValue & operator =(OOXMLValue &&) = default; + virtual int getInt() const override; ; virtual OUString getString() const override; @@ -96,6 +101,11 @@ public: virtual ~OOXMLBooleanValue() override; +OOXMLBooleanValue(OOXMLBooleanValue const &) = default; +OOXMLBooleanValue(OOXMLBooleanValue &&) = default; +OOXMLBooleanValue & operator =(OOXMLBooleanValue const &) = default; +OOXMLBooleanValue & operator =(OOXMLBooleanValue &&) = default; + virtual int getInt() const override; virtual css::uno::Any getAny() const override; #ifdef DEBUG_WRITERFILTER @@ -111,6 +121,11 @@ public: explicit OOXMLStringValue(const OUString & rStr); virtual ~OOXMLStringValue() override; +OOXMLStringValue(OOXMLStringValue const &) = default; +OOXMLStringValue(OOXMLStringValue &&) = default; +OOXMLStringValue & operator =(OOXMLStringValue const &) = default; +OOXMLStringValue & operator =(OOXMLStringValue &&) = default; + virtual css::uno::Any getAny() const override; virtual OUString getString() const override; #ifdef DEBUG_WRITERFILTER @@ -146,6 +161,11 @@ public: OOXMLPropertySet(); virtual ~OOXMLPropertySet() override; +OOXMLPropertySet(OOXMLPropertySet const &) = default; +OOXMLPropertySet(OOXMLPropertySet &&) = default; +OOXMLPropertySet & operator =(OOXMLPropertySet const &) = default; +OOXMLPropertySet & operator =(OOXMLPropertySet &&) = default; + void resolve(Properties & rHandler) override; void
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source writerperfect/source
writerfilter/inc/ooxml/QNameToString.hxx|1 - writerfilter/source/dmapper/StyleSheetTable.hxx |9 +++-- writerfilter/source/filter/WriterFilter.cxx |2 -- writerfilter/source/ooxml/OOXMLDocumentImpl.hxx |2 +- writerfilter/source/ooxml/OOXMLFastContextHandler.hxx | 12 +--- writerfilter/source/ooxml/OOXMLPropertySet.hxx |9 - writerperfect/source/writer/WordPerfectImportFilter.hxx |1 - 7 files changed, 9 insertions(+), 27 deletions(-) New commits: commit 4791e6061518c49dcce937d7fafa57f5b9bef77f Author: Noel GrandinDate: Wed Oct 4 09:34:10 2017 +0200 loplugin:finalclasses in writerfilter Change-Id: I590de2fd15c630d5ea5e706ce9421ee8bfe19db7 Reviewed-on: https://gerrit.libreoffice.org/43116 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/writerfilter/inc/ooxml/QNameToString.hxx b/writerfilter/inc/ooxml/QNameToString.hxx index 603204a1dbed..7e6a0b9ec4e2 100644 --- a/writerfilter/inc/ooxml/QNameToString.hxx +++ b/writerfilter/inc/ooxml/QNameToString.hxx @@ -40,7 +40,6 @@ class QNameToString Map mMap; -protected: /** Generated. */ diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx index 63c4c787fbc8..bbaae80c5241 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.hxx +++ b/writerfilter/source/dmapper/StyleSheetTable.hxx @@ -121,11 +121,6 @@ typedef std::shared_ptr< StyleSheetTable > StyleSheetTablePtr; class TableStyleSheetEntry : public StyleSheetEntry { -private: -typedef std::map TblStylePrs; - -TblStylePrs m_aStyles; - public: // Adds a new tblStylePr to the table style entry. This method // fixes some possible properties conflicts, like borders ones. @@ -141,7 +136,9 @@ public: TableStyleSheetEntry( StyleSheetEntry& aEntry ); virtual ~TableStyleSheetEntry( ) override; -protected: +private: +typedef std::map TblStylePrs; +TblStylePrs m_aStyles; PropertyMapPtr GetLocalPropertiesFromMask( sal_Int32 nMask ); }; diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx index 36527b7a5223..44dec903a42e 100644 --- a/writerfilter/source/filter/WriterFilter.cxx +++ b/writerfilter/source/filter/WriterFilter.cxx @@ -90,8 +90,6 @@ class WriterFilter : public cppu::WeakImplHelper lang::XServiceInfo > { - -protected: uno::Reference m_xContext; uno::Reference m_xSrcDoc, m_xDstDoc; diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx index 48412cd64ffd..968b16dea3e9 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx @@ -66,7 +66,7 @@ class OOXMLDocumentImpl : public OOXMLDocument OUString m_rBaseURL; css::uno::Sequence maMediaDescriptor; -protected: +private: void resolveFastSubStream(Stream & rStream, OOXMLStream::StreamType_t nType); diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index 2b52eb16c0a2..a89644dc6e2d 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -308,11 +308,11 @@ public: explicit OOXMLFastContextHandlerPropertyTable(OOXMLFastContextHandler * pContext); virtual ~OOXMLFastContextHandlerPropertyTable() override; -protected: +private: OOXMLTable mTable; virtual void lcl_endFastElement(Token_t Element) override; - }; +}; class OOXMLFastContextHandlerValue : public OOXMLFastContextHandler @@ -333,7 +333,7 @@ public: virtual void setDefaultHexValue() override; virtual void setDefaultStringValue() override; -protected: +private: OOXMLValue::Pointer_t mpValue; }; @@ -346,7 +346,7 @@ public: virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext (Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs) override; -protected: +private: OOXMLTable mTable; css::uno::Reference mCurrentChild; @@ -431,11 +431,11 @@ protected: class OOXMLFastContextHandlerShape: public OOXMLFastContextHandlerProperties { -private: bool m_bShapeSent; bool m_bShapeStarted; /// Is it necessary to pop the stack in the dtor? bool m_bShapeContextPushed; +css::uno::Reference mrShapeContext; public: explicit OOXMLFastContextHandlerShape(OOXMLFastContextHandler * pContext); @@ -459,8 +459,6 @@ public: bool isShapeSent( ) { return m_bShapeSent; } protected: -css::uno::Reference mrShapeContext; - virtual
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/DomainMapperFactory.hxx |2 - writerfilter/source/dmapper/ConversionHelper.cxx |2 - writerfilter/source/dmapper/DomainMapper.cxx |2 - writerfilter/source/dmapper/DomainMapper.hxx |2 - writerfilter/source/dmapper/DomainMapperTableHandler.cxx |2 - writerfilter/source/dmapper/DomainMapperTableManager.cxx |2 - writerfilter/source/dmapper/DomainMapperTableManager.hxx |2 - writerfilter/source/dmapper/DomainMapper_Impl.cxx| 14 ++--- writerfilter/source/dmapper/DomainMapper_Impl.hxx| 16 +++ writerfilter/source/dmapper/GraphicImport.cxx|6 ++--- writerfilter/source/dmapper/GraphicImport.hxx|2 - writerfilter/source/dmapper/PropertyMap.cxx |2 - writerfilter/source/dmapper/SdtHelper.cxx|4 +-- writerfilter/source/dmapper/SdtHelper.hxx|2 - writerfilter/source/dmapper/StyleSheetTable.cxx |4 +-- writerfilter/source/dmapper/domainmapperfactory.cxx |2 - writerfilter/source/ooxml/OOXMLStreamImpl.cxx|4 +-- writerfilter/source/ooxml/OOXMLStreamImpl.hxx|4 +-- writerfilter/source/rtftok/rtfdocumentimpl.cxx |9 +++- writerfilter/source/rtftok/rtfdocumentimpl.hxx |4 +-- writerfilter/source/rtftok/rtfsdrimport.cxx |2 - writerfilter/source/rtftok/rtfsdrimport.hxx |2 - writerfilter/source/rtftok/rtftokenizer.cxx |2 - writerfilter/source/rtftok/rtftokenizer.hxx |2 - 24 files changed, 47 insertions(+), 48 deletions(-) New commits: commit 3b04455e23174a5f479932f919b7b2b9831b2c54 Author: Noel GrandinDate: Mon Jul 31 15:59:52 2017 +0200 loplugin:constparams in writerfilter Change-Id: Ic0455f0a61825ec649ecbb78244f78a20df2787a Reviewed-on: https://gerrit.libreoffice.org/40595 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/writerfilter/inc/dmapper/DomainMapperFactory.hxx b/writerfilter/inc/dmapper/DomainMapperFactory.hxx index 01c347edf903..331d871128ad 100644 --- a/writerfilter/inc/dmapper/DomainMapperFactory.hxx +++ b/writerfilter/inc/dmapper/DomainMapperFactory.hxx @@ -42,7 +42,7 @@ public: css::uno::Reference const& xModel, bool bRepairStorage, SourceDocumentType eDocumentType, - utl::MediaDescriptor& rMediaDesc); + utl::MediaDescriptor const & rMediaDesc); }; // export just for test diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx index 7560a8ff9ef5..6af143a4706b 100644 --- a/writerfilter/source/dmapper/ConversionHelper.cxx +++ b/writerfilter/source/dmapper/ConversionHelper.cxx @@ -288,7 +288,7 @@ void lcl_SwapQuotesInField(OUString ) } rFmt = aBuffer.makeStringAndClear(); } -bool lcl_IsNotAM(OUString& rFmt, sal_Int32 nPos) +bool lcl_IsNotAM(OUString const & rFmt, sal_Int32 nPos) { return ( (nPos == rFmt.getLength() - 1) || diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 6a79f2318055..05a3e0ed16bf 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -96,7 +96,7 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon uno::Reference const& xModel, bool bRepairStorage, SourceDocumentType eDocumentType, -utl::MediaDescriptor& rMediaDesc) : +utl::MediaDescriptor const & rMediaDesc) : LoggedProperties("DomainMapper"), LoggedTable("DomainMapper"), LoggedStream("DomainMapper"), diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx index f509efef8870..b2b89f1776c1 100644 --- a/writerfilter/source/dmapper/DomainMapper.hxx +++ b/writerfilter/source/dmapper/DomainMapper.hxx @@ -75,7 +75,7 @@ public: css::uno::Reference const& xModel, bool bRepairStorage, SourceDocumentType eDocumentType, - utl::MediaDescriptor& rMediaDesc); + utl::MediaDescriptor const & rMediaDesc); virtual ~DomainMapper() override; // Stream diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 07742f27563b..a00548c84b56 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -261,7 +261,7 @@ struct TableInfo namespace { -bool lcl_extractTableBorderProperty(const
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/rtftok/RTFDocument.hxx |4 writerfilter/source/rtftok/rtfdocumentimpl.cxx| 55 - writerfilter/source/rtftok/rtfdocumentimpl.hxx| 110 +- writerfilter/source/rtftok/rtflistener.hxx|2 writerfilter/source/rtftok/rtflookahead.hxx | 34 ++--- writerfilter/source/rtftok/rtfreferenceproperties.hxx |2 writerfilter/source/rtftok/rtfreferencetable.hxx |2 writerfilter/source/rtftok/rtfsprm.cxx|6 writerfilter/source/rtftok/rtfsprm.hxx| 15 +- writerfilter/source/rtftok/rtfvalue.cxx | 36 + writerfilter/source/rtftok/rtfvalue.hxx | 20 +-- 11 files changed, 116 insertions(+), 170 deletions(-) New commits: commit bcbdb64a60d88aa19842582a8a8e3f438a0d0642 Author: Miklos VajnaDate: Fri Jun 23 10:31:52 2017 +0200 writerfilter: remove redundant virtual keywords in the RTF import Also use default member initializers where possible. Change-Id: I535c467cb0d604863a47aafbe42dcf3498c8717c Reviewed-on: https://gerrit.libreoffice.org/39155 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/writerfilter/inc/rtftok/RTFDocument.hxx b/writerfilter/inc/rtftok/RTFDocument.hxx index 086b39a8ce5a..2ee3f5fbba41 100644 --- a/writerfilter/inc/rtftok/RTFDocument.hxx +++ b/writerfilter/inc/rtftok/RTFDocument.hxx @@ -29,10 +29,10 @@ public: /// Pointer to this stream. using Pointer_t = std::shared_ptr; -virtual ~RTFDocument() { } +virtual ~RTFDocument() = default; /// Resolves this document to a stream handler. -virtual void resolve(Stream& rHandler) override = 0; +void resolve(Stream& rHandler) override = 0; }; /// Interface to create an RTFDocument instance. diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index f9a4983dcf67..33d0eefd5b6c 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2088,7 +2088,7 @@ RTFError RTFDocumentImpl::popState() case Destination::SHAPEPROPERTYNAME: if (_aStates.top().aDestinationText != m_aStates.top().pDestinationText) break; // not for nested group - aState.aShape.aProperties.push_back(std::make_pair(m_aStates.top().pDestinationText->makeStringAndClear(), OUString())); + aState.aShape.aProperties.emplace_back(m_aStates.top().pDestinationText->makeStringAndClear(), OUString()); break; case Destination::SHAPEPROPERTYVALUE: if (aState.aShape.aProperties.size()) @@ -3258,58 +3258,13 @@ void RTFDocumentImpl::resetFrame() m_aStates.top().aFrame = RTFFrame(_aStates.top()); } -RTFColorTableEntry::RTFColorTableEntry() -: nRed(0), - nGreen(0), - nBlue(0) -{ -} +RTFColorTableEntry::RTFColorTableEntry() = default; -RTFPicture::RTFPicture() -: nWidth(0), - nHeight(0), - nGoalWidth(0), - nGoalHeight(0), - nScaleX(100), - nScaleY(100), - nCropT(0), - nCropB(0), - nCropL(0), - nCropR(0), - eWMetafile(0), - eStyle(RTFBmpStyle::NONE) -{ -} +RTFPicture::RTFPicture() = default; -RTFShape::RTFShape() -: nLeft(0), - nTop(0), - nRight(0), - nBottom(0), - nHoriOrientRelation(0), - nVertOrientRelation(0), - nHoriOrientRelationToken(0), - nVertOrientRelationToken(0), - nWrap(text::WrapTextMode::WrapTextMode_MAKE_FIXED_SIZE), - bInBackground(false) -{ -} +RTFShape::RTFShape() = default; -RTFDrawingObject::RTFDrawingObject() -: nLineColorR(0), - nLineColorG(0), - nLineColorB(0), - bHasLineColor(false), - nFillColorR(0), - nFillColorG(0), - nFillColorB(0), - bHasFillColor(false), - nDhgt(0), - nFLine(-1), - nPolyLineCount(0), - bHadShapeText(false) -{ -} +RTFDrawingObject::RTFDrawingObject() = default; RTFFrame::RTFFrame(RTFParserState* pParserState) : m_pDocumentImpl(pParserState->m_pDocumentImpl), diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 560b4cd0e9e2..6c96a89d7f64 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -110,12 +110,12 @@ struct TableRowBuffer writerfilter::Reference::Pointer_t pFrameProperties; writerfilter::Reference::Pointer_t pRowProperties; -TableRowBuffer(RTFBuffer_t const& rBuffer, - ::std::deque const& rSprms, - ::std::deque const& rAttributes, +TableRowBuffer(RTFBuffer_t aBuffer, + std::deque aSprms, + std::deque aAttributes, int const i_nCells) -: buffer(rBuffer) -, cellsSprms(rSprms),
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source writerperfect/source xmlhelp/Library_ucpchelp1.mk xmlhelp/source xmloff/inc xmloff/source
writerfilter/inc/ooxml/OOXMLDocument.hxx|1 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx |5 writerfilter/source/ooxml/OOXMLDocumentImpl.hxx |1 writerfilter/source/ooxml/OOXMLFactory.hxx |2 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx |1 writerperfect/source/writer/WordPerfectImportFilter.cxx | 92 --- writerperfect/source/writer/WordPerfectImportFilter.hxx | 41 --- xmlhelp/Library_ucpchelp1.mk|1 xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx | 205 xmlhelp/source/cxxhelp/provider/bufferedinputstream.hxx | 107 xmlhelp/source/cxxhelp/provider/urlparameter.cxx|2 xmloff/inc/StyleMap.hxx |5 xmloff/inc/txtfldi.hxx | 19 - xmloff/source/chart/SchXMLPlotAreaContext.hxx |3 xmloff/source/chart/transporttypes.hxx | 17 - xmloff/source/forms/elementimport.hxx |3 xmloff/source/text/txtparaimphint.hxx |7 xmloff/source/transform/TransformerActions.hxx | 16 - 18 files changed, 2 insertions(+), 526 deletions(-) New commits: commit e9af29ba8328cad918c5146e3cb1be0a72ebd791 Author: Noel GrandinDate: Thu May 19 10:43:16 2016 +0200 loplugin:unusedmethods in writerfilter to xmloff Change-Id: If95890eff0f785111e8b511ac1d5481c6910f099 Reviewed-on: https://gerrit.libreoffice.org/25148 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx index 6a3370f..8c51240 100644 --- a/writerfilter/inc/ooxml/OOXMLDocument.hxx +++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx @@ -216,7 +216,6 @@ public: virtual css::uno::Reference getModel() = 0; virtual void setDrawPage(css::uno::Reference xDrawPage) = 0; virtual css::uno::Reference getDrawPage() = 0; -virtual css::uno::Reference getStorageStream() = 0; virtual css::uno::Reference getInputStreamForId(const OUString & rId) = 0; virtual void setXNoteId(const sal_Int32 nId) = 0; virtual sal_Int32 getXNoteId() const = 0; diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index 78b3907..9ede743 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -883,11 +883,6 @@ uno::Reference OOXMLDocumentImpl::getDrawPage() return mxDrawPage; } -uno::Reference OOXMLDocumentImpl::getStorageStream() -{ -return mpStream->getStorageStream(); -} - const uno::Sequence& OOXMLDocumentImpl::getMediaDescriptor() { return maMediaDescriptor; diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx index 3c29704..a0f1fc5 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx @@ -122,7 +122,6 @@ public: virtual css::uno::Reference getModel() override; virtual void setDrawPage(css::uno::Reference xDrawPage) override; virtual css::uno::Reference getDrawPage() override; -virtual css::uno::Reference getStorageStream() override; virtual css::uno::Reference getInputStreamForId(const OUString & rId) override; virtual void setXNoteId(const sal_Int32 nId) override; virtual sal_Int32 getXNoteId() const override; diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx b/writerfilter/source/ooxml/OOXMLFactory.hxx index edf9e63..e1f7a63 100644 --- a/writerfilter/source/ooxml/OOXMLFactory.hxx +++ b/writerfilter/source/ooxml/OOXMLFactory.hxx @@ -98,7 +98,7 @@ public: static void endAction(OOXMLFastContextHandler * pHandler, Token_t nToken); private: -OOXMLFactory() {} +OOXMLFactory() = delete; static OOXMLFactory_ns::Pointer_t getFactoryForNamespace(Id id); static css::uno::Reference< css::xml::sax::XFastContextHandler> createFastChildContextFromFactory(OOXMLFastContextHandler * pHandler, OOXMLFactory_ns::Pointer_t pFactory, Token_t Element); diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index 11f2ea9..34c118d 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -44,7 +44,6 @@ public: enum ResourceEnum_t { UNKNOWN, STREAM, PROPERTIES, TABLE, SHAPE }; -OOXMLFastContextHandler(); explicit OOXMLFastContextHandler(css::uno::Reference< css::uno::XComponentContext > const & context); explicit OOXMLFastContextHandler(OOXMLFastContextHandler * pContext); diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx index
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source xmloff/inc xmloff/source xmlsecurity/inc xmlsecurity/Library_xsec_xmlsec.mk xmlsecurity/source
writerfilter/inc/ooxml/OOXMLDocument.hxx |2 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |9 - writerfilter/source/ooxml/OOXMLFastContextHandler.hxx |5 - writerfilter/source/ooxml/OOXMLFastHelper.hxx | 18 --- xmloff/inc/DomExport.hxx |1 xmloff/source/core/DomExport.cxx |6 - xmloff/source/forms/elementimport.hxx | 15 --- xmloff/source/forms/elementimport_impl.hxx| 67 -- xmlsecurity/Library_xsec_xmlsec.mk|1 xmlsecurity/inc/xmlsecurity/certvalidity.hxx | 30 -- xmlsecurity/source/xmlsec/certvalidity.cxx| 86 -- 11 files changed, 240 deletions(-) New commits: commit 35e68754ec3cff30c5cdb665688a9b13f29dd439 Author: Noel GrandinDate: Thu Oct 1 15:10:56 2015 +0200 loplugin:unusedmethods Change-Id: I3d6f1300f4fae2af9e580d1d3b2c2c80fa9e9268 Reviewed-on: https://gerrit.libreoffice.org/19075 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx index a17e517..52b6430 100644 --- a/writerfilter/inc/ooxml/OOXMLDocument.hxx +++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx @@ -258,8 +258,6 @@ public: }; -void ooxmlidsToXML(::std::iostream & out); - std::string fastTokenToId(sal_uInt32 nToken); }} diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 2125b81..898dacd 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -828,10 +828,6 @@ OUString OOXMLFastContextHandler::getTargetForId return mpParserState->getDocument()->getTargetForId(rId); } -void OOXMLFastContextHandler::resolvePropertySetAttrs() -{ -} - void OOXMLFastContextHandler::sendPropertyToParent() { if (mpParent != nullptr) @@ -913,11 +909,6 @@ void OOXMLFastContextHandlerStream::sendProperty(Id nId) } -void OOXMLFastContextHandlerStream::resolvePropertySetAttrs() -{ -mpStream->props(mpPropertySetAttrs); -} - OOXMLPropertySet::Pointer_t OOXMLFastContextHandlerStream::getPropertySet() const { diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index a0a6b45..6886e4a 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -225,8 +225,6 @@ protected: void startAction(Token_t Element); void endAction(Token_t Element); -virtual void resolvePropertySetAttrs(); - css::uno::Reference< css::uno::XComponentContext > getComponentContext() { return m_xContext;} sal_uInt32 mnInstanceNumber; @@ -262,9 +260,6 @@ public: void handleHyperlink(); -protected: -virtual void resolvePropertySetAttrs() SAL_OVERRIDE; - private: mutable OOXMLPropertySet::Pointer_t mpPropertySetAttrs; }; diff --git a/writerfilter/source/ooxml/OOXMLFastHelper.hxx b/writerfilter/source/ooxml/OOXMLFastHelper.hxx index 88e5c23..b368916 100644 --- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx +++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx @@ -36,15 +36,7 @@ public: (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId, Id nDefine); static void newProperty(OOXMLFastContextHandler * pHandler, -Id nId, -const OUString & rValue); - -static void newProperty(OOXMLFastContextHandler * pHandler, Id nId, sal_Int32 nValue); - -static void attributes -(OOXMLFastContextHandler * pContext, - const css::uno::Reference < css::xml::sax::XFastAttributeList > & Attribs); }; template @@ -64,16 +56,6 @@ css::uno::Reference OOXMLFastHelper::crea template void OOXMLFastHelper::newProperty(OOXMLFastContextHandler * pHandler, Id nId, - const OUString & rValue) -{ -OOXMLValue::Pointer_t pVal(new T(rValue)); - -pHandler->newProperty(nId, pVal); -} - -template -void OOXMLFastHelper::newProperty(OOXMLFastContextHandler * pHandler, - Id nId, sal_Int32 nVal) { OOXMLValue::Pointer_t pVal(T::Create(nVal)); diff --git a/xmloff/inc/DomExport.hxx b/xmloff/inc/DomExport.hxx index 6f88dc3..c8c9a5d 100644 --- a/xmloff/inc/DomExport.hxx +++ b/xmloff/inc/DomExport.hxx @@ -30,7 +30,6 @@ namespace com { namespace sun { namespace star { } } } void exportDom( SvXMLExport&, const com::sun::star::uno::Reference& ); -void exportDom( SvXMLExport&, const com::sun::star::uno::Reference& ); #endif diff --git a/xmloff/source/core/DomExport.cxx
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/resourcemodel.hxx |2 writerfilter/source/dmapper/BorderHandler.hxx|4 writerfilter/source/dmapper/ConversionHelper.cxx |4 writerfilter/source/dmapper/ConversionHelper.hxx | 13 - writerfilter/source/dmapper/DomainMapper.cxx | 46 ++-- writerfilter/source/dmapper/DomainMapper.hxx | 29 +- writerfilter/source/dmapper/DomainMapperTableHandler.hxx | 16 - writerfilter/source/dmapper/DomainMapperTableManager.hxx |2 writerfilter/source/dmapper/DomainMapper_Impl.cxx| 24 +- writerfilter/source/dmapper/DomainMapper_Impl.hxx| 165 +++ writerfilter/source/dmapper/FontTable.hxx|4 writerfilter/source/dmapper/GraphicHelpers.cxx | 12 - writerfilter/source/dmapper/GraphicImport.cxx| 12 - writerfilter/source/dmapper/LoggedResources.hxx |4 writerfilter/source/dmapper/ModelEventListener.hxx |7 writerfilter/source/dmapper/NumberingManager.hxx | 44 +--- writerfilter/source/dmapper/OLEHandler.hxx | 28 +- writerfilter/source/dmapper/PageBordersHandler.hxx |2 writerfilter/source/dmapper/PropertyMap.cxx |3 writerfilter/source/dmapper/PropertyMap.hxx | 72 +++--- writerfilter/source/dmapper/SettingsTable.hxx|4 writerfilter/source/dmapper/StyleSheetTable.hxx |3 writerfilter/source/dmapper/TDefTableHandler.hxx | 16 - writerfilter/source/dmapper/TablePropertiesHandler.cxx |2 writerfilter/source/dmapper/TrackChangesHandler.hxx |4 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx|2 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx| 11 - writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx |4 writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx |4 writerfilter/source/ooxml/OOXMLStreamImpl.cxx| 10 30 files changed, 262 insertions(+), 291 deletions(-) New commits: commit a96425461482ac24e54f01e3a48b4fcd96a45bda Author: Miklos Vajna vmik...@collabora.co.uk Date: Sat Apr 11 18:28:57 2015 +0200 writerfilter: no need to spell out com::sun::star, css is enough Change-Id: I7dfcb041509508969135a325bdef709de7a8218f Reviewed-on: https://gerrit.libreoffice.org/15247 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Jenkins c...@libreoffice.org diff --git a/writerfilter/inc/dmapper/resourcemodel.hxx b/writerfilter/inc/dmapper/resourcemodel.hxx index d76a0a4..9a1fc0a 100644 --- a/writerfilter/inc/dmapper/resourcemodel.hxx +++ b/writerfilter/inc/dmapper/resourcemodel.hxx @@ -223,7 +223,7 @@ public: /** Receives a shape. */ -virtual void startShape( ::com::sun::star::uno::Reference ::com::sun::star::drawing::XShape const xShape ) = 0; +virtual void startShape(css::uno::Referencecss::drawing::XShape const xShape) = 0; virtual void endShape( ) = 0; diff --git a/writerfilter/source/dmapper/BorderHandler.hxx b/writerfilter/source/dmapper/BorderHandler.hxx index 58e3bc0..602e2fe 100644 --- a/writerfilter/source/dmapper/BorderHandler.hxx +++ b/writerfilter/source/dmapper/BorderHandler.hxx @@ -55,7 +55,7 @@ private: boolm_bOOXML; boolm_aFilledLines[BORDER_COUNT]; -::com::sun::star::table::BorderLine2m_aBorderLines[BORDER_COUNT]; +css::table::BorderLine2 m_aBorderLines[BORDER_COUNT]; OUString m_aInteropGrabBagName; std::vectorcss::beans::PropertyValue m_aInteropGrabBag; void appendGrabBag(const OUString aKey, const OUString aValue); @@ -69,7 +69,7 @@ public: virtual ~BorderHandler(); ::std::shared_ptrPropertyMapgetProperties(); -::com::sun::star::table::BorderLine2getBorderLine(); +css::table::BorderLine2 getBorderLine(); sal_Int32 getLineDistance() const { return m_nLineDistance;} boolgetShadow() { return m_bShadow;} void enableInteropGrabBag(const OUString aName); diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx index 495ab69..77f935c 100644 --- a/writerfilter/source/dmapper/ConversionHelper.cxx +++ b/writerfilter/source/dmapper/ConversionHelper.cxx @@ -581,9 +581,9 @@ sal_Int16 ConvertNumberingType(sal_Int32 nFmt) return nRet; } -com::sun::star::util::DateTime ConvertDateStringToDateTime( const OUString rDateTime ) +util::DateTime ConvertDateStringToDateTime( const OUString rDateTime ) { -com::sun::star::util::DateTime aDateTime; +util::DateTime aDateTime; //xsd::DateTime in the format [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm] example: 2008-01-21T10:42:00Z //OUString getToken( sal_Int32 token, sal_Unicode cTok, sal_Int32 index ) const
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/resourcemodel.hxx |7 ++ writerfilter/inc/ooxml/OOXMLDocument.hxx |4 +-- writerfilter/inc/ooxml/QNameToString.hxx |4 +-- writerfilter/inc/pch/precompiled_writerfilter.hxx|2 - writerfilter/inc/rtftok/RTFDocument.hxx |2 - writerfilter/source/dmapper/BorderHandler.hxx|6 ++--- writerfilter/source/dmapper/CellColorHandler.hxx |6 ++--- writerfilter/source/dmapper/CellMarginHandler.hxx|6 ++--- writerfilter/source/dmapper/DomainMapper.cxx |6 ++--- writerfilter/source/dmapper/DomainMapper.hxx | 12 +-- writerfilter/source/dmapper/DomainMapperTableHandler.hxx |8 +++ writerfilter/source/dmapper/DomainMapperTableManager.cxx |6 ++--- writerfilter/source/dmapper/DomainMapperTableManager.hxx |2 - writerfilter/source/dmapper/DomainMapper_Impl.hxx| 10 - writerfilter/source/dmapper/FFDataHandler.hxx|2 - writerfilter/source/dmapper/FontTable.hxx|6 ++--- writerfilter/source/dmapper/FormControlHelper.hxx|4 +-- writerfilter/source/dmapper/GraphicHelpers.hxx |7 ++ writerfilter/source/dmapper/GraphicImport.hxx|2 - writerfilter/source/dmapper/LatentStyleHandler.hxx |4 +-- writerfilter/source/dmapper/MeasureHandler.hxx |4 +-- writerfilter/source/dmapper/NumberingManager.cxx |2 - writerfilter/source/dmapper/NumberingManager.hxx | 16 +++ writerfilter/source/dmapper/OLEHandler.hxx |4 +-- writerfilter/source/dmapper/PageBordersHandler.hxx |4 +-- writerfilter/source/dmapper/PropertyMap.hxx | 14 ++--- writerfilter/source/dmapper/SectionColumnHandler.hxx |4 +-- writerfilter/source/dmapper/SettingsTable.hxx|2 - writerfilter/source/dmapper/StyleSheetTable.hxx |8 +++ writerfilter/source/dmapper/TDefTableHandler.cxx |2 - writerfilter/source/dmapper/TDefTableHandler.hxx |8 +++ writerfilter/source/dmapper/TableData.hxx|8 +++ writerfilter/source/dmapper/TableManager.hxx |6 ++--- writerfilter/source/dmapper/TablePositionHandler.hxx |4 +-- writerfilter/source/dmapper/TablePropertiesHandler.hxx |4 +-- writerfilter/source/dmapper/TagLogger.hxx|6 ++--- writerfilter/source/dmapper/TblStylePrHandler.hxx|4 +-- writerfilter/source/dmapper/TextEffectsHandler.hxx |2 - writerfilter/source/dmapper/ThemeTable.hxx |2 - writerfilter/source/dmapper/TrackChangesHandler.hxx |5 +--- writerfilter/source/dmapper/WrapPolygonHandler.hxx |2 - writerfilter/source/ooxml/OOXMLFactory.hxx |4 +-- writerfilter/source/ooxml/OOXMLFastContextHandler.cxx|4 +-- writerfilter/source/ooxml/OOXMLFastContextHandler.hxx|4 +-- writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx |1 writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx |4 +-- writerfilter/source/ooxml/OOXMLParserState.hxx |2 - writerfilter/source/ooxml/OOXMLPropertySet.hxx |4 +-- writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx |6 ++--- writerfilter/source/ooxml/OOXMLStreamImpl.hxx|2 - writerfilter/source/ooxml/factory_ns.py |2 - writerfilter/source/rtftok/rtfdocumentimpl.cxx |2 - writerfilter/source/rtftok/rtfdocumentimpl.hxx | 16 +++ writerfilter/source/rtftok/rtflookahead.cxx |1 writerfilter/source/rtftok/rtflookahead.hxx |3 +- writerfilter/source/rtftok/rtfsprm.hxx |2 - writerfilter/source/rtftok/rtfvalue.hxx |8 +++ 57 files changed, 139 insertions(+), 143 deletions(-) New commits: commit 54bd92d7fce1ec4d8d779751168c698cc44a33ba Author: Miklos Vajna vmik...@collabora.co.uk Date: Tue Dec 30 20:29:56 2014 +0100 writerfilter: boost::shared_ptr - c++11 std::shared_ptr Change-Id: Ib5649d8979093bb147c61eebcf95a472ad899672 diff --git a/writerfilter/inc/dmapper/resourcemodel.hxx b/writerfilter/inc/dmapper/resourcemodel.hxx index 0e07757..d76a0a4 100644 --- a/writerfilter/inc/dmapper/resourcemodel.hxx +++ b/writerfilter/inc/dmapper/resourcemodel.hxx @@ -22,7 +22,6 @@ #include string #include memory -#include boost/shared_ptr.hpp #include sal/types.h #include com/sun/star/drawing/XShape.hpp #include com/sun/star/uno/Any.hxx @@ -86,7 +85,7 @@ public: @attention The ownership of a reference is transferred when the reference is passed. */ -typedef boost::shared_ptr ReferenceT Pointer_t; +typedef std::shared_ptr ReferenceT Pointer_t; /** Resolves
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/DomainMapperFactory.hxx |6 +++--- writerfilter/source/dmapper/DomainMapper_Impl.hxx |4 ++-- writerfilter/source/filter/ImportFilter.cxx |2 +- writerfilter/source/filter/RtfFilter.cxx |3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) New commits: commit 3f62ee6e371e3a922d6f4e4b5368271c18fc4f69 Author: Miklos Vajna vmik...@collabora.co.uk Date: Thu Dec 25 12:21:07 2014 +0100 writerfilter: turn SourceDocumentType into a C++11 scoped enumeration Change-Id: I11c550d0ec5a10f17116ac8f7025c0283e292f2e diff --git a/writerfilter/inc/dmapper/DomainMapperFactory.hxx b/writerfilter/inc/dmapper/DomainMapperFactory.hxx index 39a9aa7..306870a 100644 --- a/writerfilter/inc/dmapper/DomainMapperFactory.hxx +++ b/writerfilter/inc/dmapper/DomainMapperFactory.hxx @@ -25,10 +25,10 @@ namespace writerfilter namespace dmapper { -enum SourceDocumentType +enum class SourceDocumentType { -DOCUMENT_OOXML, -DOCUMENT_RTF +OOXML, +RTF }; /// Interface to create a DomainMapper instance. diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 3cabbf5..d93657a 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -710,9 +710,9 @@ public: DeletableTabStopm_aCurrentTabStop; -bool IsOOXMLImport() const { return m_eDocumentType == DOCUMENT_OOXML; } +bool IsOOXMLImport() const { return m_eDocumentType == SourceDocumentType::OOXML; } -bool IsRTFImport() const { return m_eDocumentType == DOCUMENT_RTF; } +bool IsRTFImport() const { return m_eDocumentType == SourceDocumentType::RTF; } void InitPageMargins() { m_aPageMargins = _PageMar(); } void SetPageMarginTwip( PageMarElement eElement, sal_Int32 nValue ); diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx index ed9e57d..d14ce08 100644 --- a/writerfilter/source/filter/ImportFilter.cxx +++ b/writerfilter/source/filter/ImportFilter.cxx @@ -76,7 +76,7 @@ sal_Bool WriterFilter::filter( const uno::Sequence beans::PropertyValue aDes if ( !xInputStream.is() ) return sal_False; -writerfilter::dmapper::SourceDocumentType eType = writerfilter::dmapper::DOCUMENT_OOXML; +writerfilter::dmapper::SourceDocumentType eType = writerfilter::dmapper::SourceDocumentType::OOXML; writerfilter::Stream::Pointer_t pStream( writerfilter::dmapper::DomainMapperFactory::createMapper(m_xContext, xInputStream, m_xDstDoc, bRepairStorage, eType, uno::Referencetext::XTextRange(), aMediaDesc)); //create the tokenizer and domain mapper diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx index 2ae224d..cd55a85 100644 --- a/writerfilter/source/filter/RtfFilter.cxx +++ b/writerfilter/source/filter/RtfFilter.cxx @@ -101,8 +101,9 @@ sal_Bool RtfFilter::filter(const uno::Sequence beans::PropertyValue aDescrip xStatusIndicator = aMediaDesc.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_STATUSINDICATOR(), uno::Referencetask::XStatusIndicator()); +writerfilter::dmapper::SourceDocumentType eType = writerfilter::dmapper::SourceDocumentType::RTF; writerfilter::Stream::Pointer_t pStream( - writerfilter::dmapper::DomainMapperFactory::createMapper(m_xContext, xInputStream, m_xDstDoc, bRepairStorage, writerfilter::dmapper::DOCUMENT_RTF, xInsertTextRange, aMediaDesc)); + writerfilter::dmapper::DomainMapperFactory::createMapper(m_xContext, xInputStream, m_xDstDoc, bRepairStorage, eType, xInsertTextRange, aMediaDesc)); writerfilter::rtftok::RTFDocument::Pointer_t const pDocument( writerfilter::rtftok::RTFDocumentFactory::createDocument(m_xContext, xInputStream, m_xDstDoc, xFrame, xStatusIndicator)); pDocument-resolve(*pStream); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/resourcemodel/TableData.hxx | 423 -- writerfilter/source/dmapper/TableData.hxx| 426 +++ writerfilter/source/dmapper/TableManager.hxx |3 3 files changed, 427 insertions(+), 425 deletions(-) New commits: commit 1ef57521af0a53d03c68321817f9dadf7f4dd730 Author: Miklos Vajna vmik...@collabora.co.uk Date: Wed Dec 3 21:27:46 2014 +0100 writerfilter: only dmapper needs TableData Change-Id: I4c2ead05d845eebe101d34ed8fe9284509beb752 diff --git a/writerfilter/inc/resourcemodel/TableData.hxx b/writerfilter/source/dmapper/TableData.hxx similarity index 97% rename from writerfilter/inc/resourcemodel/TableData.hxx rename to writerfilter/source/dmapper/TableData.hxx index 53299b8..7f8b406 100644 --- a/writerfilter/inc/resourcemodel/TableData.hxx +++ b/writerfilter/source/dmapper/TableData.hxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_TABLEDATA_HXX -#define INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_TABLEDATA_HXX +#ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_RESOURCEMODEL_TABLEDATA_HXX +#define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_RESOURCEMODEL_TABLEDATA_HXX #include resourcemodel/WW8ResourceModel.hxx @@ -27,6 +27,8 @@ namespace writerfilter { +namespace dmapper +{ template typename T, typename PropertiesPointer /** @@ -417,7 +419,8 @@ public: }; } +} -#endif // INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_TABLEDATA_HXX +#endif // INCLUDED_WRITERFILTER_SOURCE_DMAPPER_RESOURCEMODEL_TABLEDATA_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/TableManager.hxx b/writerfilter/source/dmapper/TableManager.hxx index 2559d54..b7fed59 100644 --- a/writerfilter/source/dmapper/TableManager.hxx +++ b/writerfilter/source/dmapper/TableManager.hxx @@ -20,8 +20,6 @@ #ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_TABLEMANAGER_HXX #define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_TABLEMANAGER_HXX -#include resourcemodel/TableData.hxx - #include resourcemodel/WW8ResourceModel.hxx #include ooxml/resourceids.hxx @@ -33,6 +31,7 @@ #include rtl/strbuf.hxx #include PropertyMap.hxx +#include TableData.hxx namespace writerfilter { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/resourcemodel/TableManager.hxx | 46 +-- writerfilter/source/dmapper/DomainMapper.cxx | 26 +++--- writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 10 +- writerfilter/source/dmapper/DomainMapperTableManager.cxx |8 +- writerfilter/source/dmapper/DomainMapper_Impl.cxx| 16 ++-- writerfilter/source/dmapper/DomainMapper_Impl.hxx|2 writerfilter/source/dmapper/FormControlHelper.hxx|2 writerfilter/source/dmapper/GraphicImport.cxx|2 writerfilter/source/dmapper/NumberingManager.cxx |6 - writerfilter/source/dmapper/StyleSheetTable.cxx | 14 +-- writerfilter/source/dmapper/TablePropertiesHandler.cxx | 10 +- writerfilter/source/dmapper/TblStylePrHandler.cxx|2 writerfilter/source/dmapper/TextEffectsHandler.cxx |2 writerfilter/source/filter/ImportFilter.cxx |2 writerfilter/source/filter/WriterFilter.cxx |8 +- writerfilter/source/ooxml/Handler.cxx|4 - writerfilter/source/ooxml/OOXMLDocumentImpl.cxx |2 writerfilter/source/ooxml/OOXMLFactory.cxx | 12 +-- writerfilter/source/ooxml/OOXMLFastContextHandler.cxx| 58 +++ writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx |8 +- writerfilter/source/ooxml/OOXMLParserState.cxx | 18 ++-- writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx | 30 +++ writerfilter/source/resourcemodel/TagLogger.cxx | 14 +-- writerfilter/source/resourcemodel/qnametostrcore.cxx |2 writerfilter/source/rtftok/rtfdocumentimpl.cxx | 34 25 files changed, 169 insertions(+), 169 deletions(-) New commits: commit fda06137cc2cac8e223149195c225aded28a13ef Author: Stephan Bergmann sberg...@redhat.com Date: Fri Oct 17 10:58:49 2014 +0200 Work around Clang 3.2 -Wnull-conversion bug ...by running all of writerfilter through loplugin:nullptr rewriter Change-Id: Ie6ec5dd989dc2035ccd10941bc38e557e128be0f diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx index 4b2a3d6..c13303c 100644 --- a/writerfilter/inc/resourcemodel/TableManager.hxx +++ b/writerfilter/inc/resourcemodel/TableManager.hxx @@ -643,7 +643,7 @@ template typename T, typename PropertiesPointer void TableManagerT, PropertiesPointer::cellDepth(sal_uInt32 nDepth) { #ifdef DEBUG_WRITERFILTER -if (mpTableLogger != NULL) +if (mpTableLogger != nullptr) { mpTableLogger-startElement(tablemanager.cellDepth); mpTableLogger-attribute(depth, nDepth); @@ -658,7 +658,7 @@ template typename T, typename PropertiesPointer void TableManagerT, PropertiesPointer::inCell() { #ifdef DEBUG_WRITERFILTER -if (mpTableLogger != NULL) +if (mpTableLogger != nullptr) mpTableLogger-element(tablemanager.inCell); #endif setInCell(true); @@ -671,7 +671,7 @@ template typename T, typename PropertiesPointer void TableManagerT, PropertiesPointer::endCell() { #ifdef DEBUG_WRITERFILTER -if (mpTableLogger != NULL) +if (mpTableLogger != nullptr) mpTableLogger-element(tablemanager.endCell); #endif @@ -682,7 +682,7 @@ template typename T, typename PropertiesPointer void TableManagerT, PropertiesPointer::endRow() { #ifdef DEBUG_WRITERFILTER -if (mpTableLogger != NULL) +if (mpTableLogger != nullptr) mpTableLogger-element(tablemanager.endRow); #endif @@ -724,7 +724,7 @@ template typename T, typename PropertiesPointer void TableManagerT, PropertiesPointer::startLevel() { #ifdef DEBUG_WRITERFILTER -if (mpTableLogger != NULL) +if (mpTableLogger != nullptr) { typename TableDataT, PropertiesPointer::Pointer_t pTableData; @@ -734,7 +734,7 @@ void TableManagerT, PropertiesPointer::startLevel() mpTableLogger-startElement(tablemanager.startLevel); mpTableLogger-attribute(level, mTableDataStack.size()); -if (pTableData.get() != NULL) +if (pTableData.get() != nullptr) mpTableLogger-attribute(openCell, pTableData-isCellOpen() ? yes : no); @@ -764,7 +764,7 @@ void TableManagerT, PropertiesPointer::startLevel() template typename T, typename PropertiesPointer void TableManagerT, PropertiesPointer::endLevel() { -if (mpTableDataHandler.get() != NULL) +if (mpTableDataHandler.get() != nullptr) resolveCurrentTable(); // Store the unfinished row as it will be used for the next table @@ -774,7 +774,7 @@ void TableManagerT, PropertiesPointer::endLevel() mTableDataStack.pop(); #ifdef DEBUG_WRITERFILTER -if (mpTableLogger != NULL) +if (mpTableLogger != nullptr) { typename TableDataT, PropertiesPointer::Pointer_t pTableData; @@ -784,7 +784,7 @@ void TableManagerT, PropertiesPointer::endLevel()
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/resourcemodel/TableManager.hxx |7 +-- writerfilter/source/dmapper/DomainMapper.cxx | 14 +- writerfilter/source/dmapper/GraphicImport.cxx|8 +--- writerfilter/source/dmapper/NumberingManager.cxx | 14 +- writerfilter/source/dmapper/StyleSheetTable.cxx | 16 ++-- 5 files changed, 10 insertions(+), 49 deletions(-) New commits: commit cf1c3b5c5ae7f691cbd7330f49713d65822f1c1f Author: Miklos Vajna vmik...@collabora.co.uk Date: Wed Oct 15 22:13:21 2014 +0200 writerfilter: call to SAL_WARN() is not expensive So guards like '#if OSL_DEBUG_LEVEL 0' around it can be dropped in most cases. Also, dumping the hex value of token IDs no longer makes sense, now that doctok is gone. Change-Id: I2c0d466e4bdde63d271a83aa4e7eebb52294e363 diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx index bdb6504..02700d8 100644 --- a/writerfilter/inc/resourcemodel/TableManager.hxx +++ b/writerfilter/inc/resourcemodel/TableManager.hxx @@ -31,9 +31,7 @@ #include util.hxx #include TagLogger.hxx -#if OSL_DEBUG_LEVEL 0 -# include rtl/strbuf.hxx -#endif +#include rtl/strbuf.hxx namespace writerfilter { @@ -1047,10 +1045,7 @@ void TableManagerT, PropertiesPointer::resolveCurrentTable() } catch (css::uno::Exception const e) { -(void) e; -#if OSL_DEBUG_LEVEL 0 SAL_WARN(writerfilter, resolving of current table failed with: e.Message); -#endif } } resetTableProps(); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index d1aec85..01101c2 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1022,19 +1022,7 @@ void DomainMapper::lcl_attribute(Id nName, Value val) m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, val, sStringValue); break; default: -{ -#if OSL_DEBUG_LEVEL 0 -OString sMessage(DomainMapper::attribute() - Id: ); -sMessage += OString::number( nName, 10 ); -sMessage += / 0x; -sMessage += OString::number( nName, 16 ); -sMessage += value: ; -sMessage += OString::number( nIntValue, 10 ); -sMessage += / 0x; -sMessage += OString::number( nIntValue, 16 ); -SAL_WARN(writerfilter, sMessage.getStr()); -#endif -} +SAL_WARN(writerfilter, DomainMapper::lcl_attribute: unhandled token: nName); } } diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index c44ac41..7562c01 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -1122,13 +1122,7 @@ void GraphicImport::lcl_sprm(Sprm rSprm) } break; default: -#if OSL_DEBUG_LEVEL 0 -OString sMessage( GraphicImport::sprm() - Id: ); -sMessage += OString::number( nSprmId, 10 ); -sMessage += / 0x; -sMessage += OString::number( nSprmId, 16 ); -SAL_WARN(writerfilter, sMessage.getStr()); -#endif +SAL_WARN(writerfilter, GraphicImport::lcl_sprm: unhandled token: nSprmId); break; } } diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index 2bafbb6..63c44e2 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -809,19 +809,7 @@ void ListsManager::lcl_attribute( Id nName, Value rVal ) m_pCurrentNumPicBullet-SetId(rVal.getString().toInt32()); break; default: -{ -#if OSL_DEBUG_LEVEL 0 -OString sMessage( ListTable::attribute() - Id: ); -sMessage += OString::number( nName, 10 ); -sMessage += / 0x; -sMessage += OString::number( nName, 16 ); -sMessage += value: ; -sMessage += OString::number( nIntValue, 10 ); -sMessage += / 0x; -sMessage += OString::number( nIntValue, 16 ); -SAL_WARN(writerfilter, sMessage.getStr()); -#endif -} +SAL_WARN(writerfilter, ListsManager::lcl_attribute: unhandled token: nName); } } diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index a8a8a8d..bd40814 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -1174,19 +1174,15 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) catch( const lang::WrappedTargetException rWrapped) { (void) rWrapped; -
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/ooxml/OOXMLDocument.hxx |2 -- writerfilter/inc/resourcemodel/util.hxx |2 -- writerfilter/source/dmapper/PropertyMap.cxx |4 ++-- writerfilter/source/dmapper/PropertyMap.hxx |2 +- writerfilter/source/dmapper/PropertyMapHelper.cxx|6 -- writerfilter/source/dmapper/PropertyMapHelper.hxx|4 ++-- writerfilter/source/ooxml/factoryimpl.py |4 ++-- writerfilter/source/resourcemodel/qnametostrcore.cxx |4 ++-- writerfilter/source/resourcemodel/util.cxx |4 ++-- 9 files changed, 15 insertions(+), 17 deletions(-) New commits: commit 585fea6e3e92a312921bb1bff119f731ca0e87cb Author: Miklos Vajna vmik...@collabora.co.uk Date: Fri Oct 17 07:47:02 2014 +0200 fix incremental build Change-Id: I28dd6c72c665abd95be6d14dc629296850e03e1d diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx index ab932c6..8032f60 100644 --- a/writerfilter/inc/ooxml/OOXMLDocument.hxx +++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx @@ -273,9 +273,7 @@ public: void ooxmlidsToXML(::std::iostream out); -#ifdef DEBUG_DOMAINMAPPER std::string fastTokenToId(sal_uInt32 nToken); -#endif }} #endif // INCLUDED_WRITERFILTER_INC_OOXML_OOXMLDOCUMENT_HXX diff --git a/writerfilter/inc/resourcemodel/util.hxx b/writerfilter/inc/resourcemodel/util.hxx index b176cd82..18e424f 100644 --- a/writerfilter/inc/resourcemodel/util.hxx +++ b/writerfilter/inc/resourcemodel/util.hxx @@ -26,9 +26,7 @@ namespace writerfilter { -#ifdef DEBUG_DOMAINMAPPER std::string toString(css::uno::Reference css::text::XTextRange textRange); -#endif } #endif // INCLUDED_WRITERFILTER_INC_RESOURCEMODEL_UTIL_HXX diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 8f3594c..2d9c77d 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -368,9 +368,9 @@ void PropertyMap::insertTableProperties( const PropertyMap* ) #endif } -#ifdef DEBUG_DOMAINMAPPER void PropertyMap::printProperties() { +#ifdef DEBUG_DOMAINMAPPER dmapper_logger-startElement(properties); MapIterator aMapIter = m_vMap.begin(); @@ -399,8 +399,8 @@ void PropertyMap::printProperties() } dmapper_logger-endElement(); -} #endif +} SectionPropertyMap::SectionPropertyMap(bool bIsFirstSection) : m_bIsFirstSection( bIsFirstSection ) diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index c496f97..2369cf3 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -170,8 +170,8 @@ public: const std::vector RedlineParamsPtr Redlines() const { return m_aRedlines; } std::vector RedlineParamsPtr Redlines() { return m_aRedlines; } -#ifdef DEBUG_DOMAINMAPPER void printProperties(); +#ifdef DEBUG_DOMAINMAPPER virtual void dumpXml( const TagLogger::Pointer_t pLogger ) const; #endif static com::sun::star::table::ShadowFormat getShadowFromBorder(com::sun::star::table::BorderLine2 aBorder); diff --git a/writerfilter/source/dmapper/PropertyMapHelper.cxx b/writerfilter/source/dmapper/PropertyMapHelper.cxx index b35145b..0c22146 100644 --- a/writerfilter/source/dmapper/PropertyMapHelper.cxx +++ b/writerfilter/source/dmapper/PropertyMapHelper.cxx @@ -21,7 +21,6 @@ #include resourcemodel/TagLogger.hxx #include PropertyMapHelper.hxx -#ifdef DEBUG_DOMAINMAPPER namespace writerfilter { namespace dmapper @@ -31,6 +30,7 @@ using namespace ::com::sun::star; void lcl_DumpTableColumnSeparators(const TagLogger::Pointer_t pLogger, const uno::Any rTableColumnSeparators) { +#ifdef DEBUG_DOMAINMAPPER uno::Sequencetext::TableColumnSeparator aSeq; rTableColumnSeparators = aSeq; @@ -48,8 +48,10 @@ void lcl_DumpTableColumnSeparators(const TagLogger::Pointer_t pLogger, const uno } pLogger-endElement(); +#endif // DEBUG_DOMAINMAPPER } +#ifdef DEBUG_DOMAINMAPPER void lcl_DumpPropertyValues(const TagLogger::Pointer_t pLogger, beans::PropertyValues rValues) { pLogger-startElement(propertyValues); @@ -109,9 +111,9 @@ void lcl_DumpPropertyValueSeqSeq(const TagLogger::Pointer_t pLogger, PropertyVal pLogger-endElement(); } +#endif // DEBUG_DOMAINMAPPER } } -#endif // DEBUG_DOMAINMAPPER /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/PropertyMapHelper.hxx b/writerfilter/source/dmapper/PropertyMapHelper.hxx index a92bc10..fe22298 100644 --- a/writerfilter/source/dmapper/PropertyMapHelper.hxx +++ b/writerfilter/source/dmapper/PropertyMapHelper.hxx @@ -20,7 +20,6 @@ #ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_PROPERTYMAPHELPER_HXX #define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_PROPERTYMAPHELPER_HXX -#ifdef DEBUG_DOMAINMAPPER #include PropertyMap.hxx #include
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/DomainMapper.hxx |2 writerfilter/source/dmapper/DomainMapper.cxx | 83 + writerfilter/source/ooxml/model.xml| 36 +- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 42 ++-- 4 files changed, 99 insertions(+), 64 deletions(-) New commits: commit aa3696b1ac6c66865d24300e92eed57fff8efbef Author: Miklos Vajna vmik...@collabora.co.uk Date: Sun Sep 14 21:47:35 2014 +0200 Use constants for ST_Underline values The integers were a leftover from doctok's Kul enumeration. Change-Id: I71ee4add743af9ae5b5dee877536c09ca48b854c diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx index ea743be..6c44d02 100644 --- a/writerfilter/inc/dmapper/DomainMapper.hxx +++ b/writerfilter/inc/dmapper/DomainMapper.hxx @@ -161,7 +161,7 @@ private: // Table virtual void lcl_entry(int pos, writerfilter::ReferenceProperties::Pointer_t ref) SAL_OVERRIDE; -void handleUnderlineType(const sal_Int32 nIntValue, const ::boost::shared_ptrPropertyMap pContext); +void handleUnderlineType(const Id nId, const ::boost::shared_ptrPropertyMap pContext); void handleParaJustification(const sal_Int32 nIntValue, const ::boost::shared_ptrPropertyMap pContext, const bool bExchangeLeftRight); bool getColorFromId(const Id, sal_Int32 nColor); sal_Int16 getEmphasisValue(const sal_Int32 nIntValue); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index b7aec84..b0d4f82 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3145,33 +3145,68 @@ void DomainMapper::lcl_info(const std::string /*info_*/) { } -void DomainMapper::handleUnderlineType(const sal_Int32 nIntValue, const ::boost::shared_ptrPropertyMap pContext) +void DomainMapper::handleUnderlineType(const Id nId, const ::boost::shared_ptrPropertyMap pContext) { -sal_Int16 eUnderline = awt::FontUnderline::NONE; +sal_Int16 nUnderline = awt::FontUnderline::NONE; -switch(nIntValue) +switch (nId) { -case 0: eUnderline = awt::FontUnderline::NONE; break; -case 2: pContext-Insert(PROP_CHAR_WORD_MODE, uno::makeAny( true ) ); // TODO: how to get rid of it? -case 1: eUnderline = awt::FontUnderline::SINGLE; break; -case 3: eUnderline = awt::FontUnderline::DOUBLE; break; -case 4: eUnderline = awt::FontUnderline::DOTTED; break; -case 7: eUnderline = awt::FontUnderline::DASH; break; -case 9: eUnderline = awt::FontUnderline::DASHDOT; break; -case 10:eUnderline = awt::FontUnderline::DASHDOTDOT; break; -case 6: eUnderline = awt::FontUnderline::BOLD; break; -case 11:eUnderline = awt::FontUnderline::WAVE; break; -case 20:eUnderline = awt::FontUnderline::BOLDDOTTED; break; -case 23:eUnderline = awt::FontUnderline::BOLDDASH; break; -case 39:eUnderline = awt::FontUnderline::LONGDASH; break; -case 55:eUnderline = awt::FontUnderline::BOLDLONGDASH; break; -case 25:eUnderline = awt::FontUnderline::BOLDDASHDOT; break; -case 26:eUnderline = awt::FontUnderline::BOLDDASHDOTDOT;break; -case 27:eUnderline = awt::FontUnderline::BOLDWAVE; break; -case 43:eUnderline = awt::FontUnderline::DOUBLEWAVE; break; -default: ; -} -pContext-Insert(PROP_CHAR_UNDERLINE, uno::makeAny( eUnderline ) ); +case NS_ooxml::LN_Value_ST_Underline_none: +nUnderline = awt::FontUnderline::NONE; +break; +case NS_ooxml::LN_Value_ST_Underline_words: +pContext-Insert(PROP_CHAR_WORD_MODE, uno::makeAny(true)); +// fall-through intended +case NS_ooxml::LN_Value_ST_Underline_single: +nUnderline = awt::FontUnderline::SINGLE; +break; +case NS_ooxml::LN_Value_ST_Underline_double: +nUnderline = awt::FontUnderline::DOUBLE; +break; +case NS_ooxml::LN_Value_ST_Underline_dotted: +nUnderline = awt::FontUnderline::DOTTED; +break; +case NS_ooxml::LN_Value_ST_Underline_dash: +nUnderline = awt::FontUnderline::DASH; +break; +case NS_ooxml::LN_Value_ST_Underline_dotDash: +nUnderline = awt::FontUnderline::DASHDOT; +break; +case NS_ooxml::LN_Value_ST_Underline_dotDotDash: +nUnderline = awt::FontUnderline::DASHDOTDOT; +break; +case NS_ooxml::LN_Value_ST_Underline_thick: +nUnderline = awt::FontUnderline::BOLD; +break; +case NS_ooxml::LN_Value_ST_Underline_wave: +nUnderline = awt::FontUnderline::WAVE; +break; +case NS_ooxml::LN_Value_ST_Underline_dottedHeavy: +nUnderline = awt::FontUnderline::BOLDDOTTED; +break; +case NS_ooxml::LN_Value_ST_Underline_dashedHeavy: +nUnderline = awt::FontUnderline::BOLDDASH; +break; +case
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/resourcemodel/WW8ResourceModel.hxx |6 - writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx |5 - writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx |5 - writerfilter/source/ooxml/factoryimpl.xsl | 63 writerfilter/source/rtftok/rtfsprm.cxx |5 - writerfilter/source/rtftok/rtfsprm.hxx |1 6 files changed, 85 deletions(-) New commits: commit f46e392050a949c2d573b768eeb70d94fff550c2 Author: Miklos Vajna vmik...@collabora.co.uk Date: Sun Jul 6 19:41:47 2014 +0200 writerfilter: remove unused getKind() Change-Id: I7d98d1fb400e1a73ca0d935d5cfbb82de43d795e diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx index 995dd55..d991a23 100644 --- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx +++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx @@ -348,7 +348,6 @@ public: SAL_WNODEPRECATED_DECLARATIONS_PUSH typedef std::auto_ptrSprm Pointer_t; SAL_WNODEPRECATED_DECLARATIONS_POP -enum Kind { UNKNOWN, CHARACTER, PARAGRAPH, TABLE }; /** Returns id of the SPRM. @@ -377,11 +376,6 @@ public: virtual writerfilter::ReferenceProperties::Pointer_t getProps() = 0; /** - Returns the kind of this SPRM. -*/ -virtual Kind getKind() = 0; - -/** Returns name of sprm. */ #ifdef DEBUG_DOMAINMAPPER diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx index c718a52..4061de2 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx @@ -143,11 +143,6 @@ string OOXMLPropertyImpl::toString() const } #endif -Sprm::Kind OOXMLPropertyImpl::getKind() -{ -return SprmKind(getId()); -} - Sprm * OOXMLPropertyImpl::clone() { return new OOXMLPropertyImpl(*this); diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx index e9ca21a..96197b6 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx @@ -78,9 +78,6 @@ public: virtual writerfilter::ReferenceProperties::Pointer_t getProps() SAL_OVERRIDE; #ifdef DEBUG_DOMAINMAPPER virtual std::string getName() const SAL_OVERRIDE; -#endif -virtual Kind getKind() SAL_OVERRIDE; -#ifdef DEBUG_DOMAINMAPPER virtual std::string toString() const SAL_OVERRIDE; #endif virtual Sprm * clone() SAL_OVERRIDE; @@ -326,8 +323,6 @@ public: int getValue() const { return mnValue;} }; -Sprm::Kind SprmKind(sal_uInt32 nSprmCode); - } // namespace ooxml } // namespace writerfilter diff --git a/writerfilter/source/ooxml/factoryimpl.xsl b/writerfilter/source/ooxml/factoryimpl.xsl index f1fb236..986312e 100644 --- a/writerfilter/source/ooxml/factoryimpl.xsl +++ b/writerfilter/source/ooxml/factoryimpl.xsl @@ -223,68 +223,6 @@ string fastTokenToId(sal_uInt32 nToken) /xsl:text /xsl:template - !-- - Generates case labels for mapping from token ids to a single kind - of sprm. - - @param kind the sprm kind for which to generate the case labels - -- - - xsl:template name=sprmkindcase -xsl:param name=kind/ -xsl:for-each select=key('resources-with-kind', $kind)/element - xsl:if test=generate-id(.) = generate-id(key('sprms-with-code', @tokenid)) - xsl:text - case /xsl:text - xsl:call-template name=idtoqname - xsl:with-param name=id select=@tokenid/ - /xsl:call-template - xsl:text: ///xsl:text - xsl:value-of select=ancestor::resource/@name/ - xsl:text, /xsl:text - xsl:value-of select=@name/ - /xsl:if -/xsl:for-each - /xsl:template - - !-- - Generates SprmKind. - -- - xsl:template name=sprmkind -xsl:text -Sprm::Kind SprmKind(sal_uInt32 nSprmCode) -{ -Sprm::Kind nResult = Sprm::UNKNOWN; - -switch (nSprmCode) -{/xsl:text -xsl:call-template name=sprmkindcase - xsl:with-param name=kindparagraph/xsl:with-param -/xsl:call-template -xsl:text - nResult = Sprm::PARAGRAPH; - break;/xsl:text -xsl:call-template name=sprmkindcase - xsl:with-param name=kindcharacter/xsl:with-param -/xsl:call-template -xsl:text - nResult = Sprm::CHARACTER; - break;/xsl:text -xsl:call-template name=sprmkindcase - xsl:with-param name=kindtable/xsl:with-param -/xsl:call-template -xsl:text - nResult = Sprm::TABLE; - break;/xsl:text -xsl:text -default: - break; -} - -return nResult; -}/xsl:text - /xsl:template - xsl:template name=getfastparser xsl:text uno::Reference lt; xml::sax::XFastParser gt; OOXMLStreamImpl::getFastParser() @@ -327,7 +265,6 @@ namespace ooxml { xsl:call-template name=factoryfornamespace/ xsl:call-template name=factorycreatefromstart/ xsl:call-template
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/resourcemodel/TagLogger.hxx |2 + writerfilter/inc/resourcemodel/WW8ResourceModel.hxx |6 +++ writerfilter/inc/resourcemodel/util.hxx |2 - writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |6 +-- writerfilter/source/ooxml/OOXMLPropertySet.hxx|4 ++ writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx| 30 -- writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx| 28 writerfilter/source/ooxml/factoryimpl.xsl |2 + writerfilter/source/ooxml/fasttokens.py |2 + writerfilter/source/resourcemodel/util.cxx|5 +-- writerfilter/source/rtftok/rtfsprm.cxx|6 ++- writerfilter/source/rtftok/rtfsprm.hxx|2 + writerfilter/source/rtftok/rtfvalue.cxx |2 + writerfilter/source/rtftok/rtfvalue.hxx |2 + 14 files changed, 88 insertions(+), 11 deletions(-) New commits: commit f8c5a61e052c500201c7bfc4c36f127c0ac36b30 Author: Jan Holesovsky ke...@collabora.com Date: Thu Jun 19 09:37:43 2014 +0200 writerfilter: Hide more debug-only stuff behind the DEBUG_DOMAINMAPPER. Change-Id: I0e86cafab97f0adad516660c6fdf40e13d114bf2 diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx index c75af7b..92ad860 100644 --- a/writerfilter/inc/resourcemodel/TagLogger.hxx +++ b/writerfilter/inc/resourcemodel/TagLogger.hxx @@ -30,6 +30,7 @@ namespace writerfilter { +#ifdef DEBUG_DOMAINMAPPER class IdToString { public: @@ -39,6 +40,7 @@ namespace writerfilter protected: ~IdToString() {} }; +#endif class TagLogger { diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx index 0d36342..995dd55 100644 --- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx +++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx @@ -333,7 +333,9 @@ public: /** Returns string representation of this value. */ +#ifdef DEBUG_DOMAINMAPPER virtual std::string toString() const = 0; +#endif }; /** @@ -382,12 +384,16 @@ public: /** Returns name of sprm. */ +#ifdef DEBUG_DOMAINMAPPER virtual std::string getName() const = 0; +#endif /** Returns string repesentation of sprm. */ +#ifdef DEBUG_DOMAINMAPPER virtual std::string toString() const = 0; +#endif protected: ~Sprm() {} diff --git a/writerfilter/inc/resourcemodel/util.hxx b/writerfilter/inc/resourcemodel/util.hxx index 24abfe8..b176cd82 100644 --- a/writerfilter/inc/resourcemodel/util.hxx +++ b/writerfilter/inc/resourcemodel/util.hxx @@ -26,7 +26,7 @@ namespace writerfilter { -#if OSL_DEBUG_LEVEL 1 +#ifdef DEBUG_DOMAINMAPPER std::string toString(css::uno::Reference css::text::XTextRange textRange); #endif } diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 49db4fb..cc20804 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -87,7 +87,7 @@ static string resourceToString setOOXMLFastContextHandler * aSetContexts; -#if OSL_DEBUG_LEVEL 1 +#ifdef DEBUG_DOMAINMAPPER class OOXMLIdToString : public IdToString { public: @@ -377,7 +377,7 @@ void OOXMLFastContextHandler::endAction(Token_t Element) OOXMLFactory::getInstance()-endAction(this, Element); } -#if OSL_DEBUG_LEVEL 1 +#ifdef DEBUG_DOMAINMAPPER void OOXMLFastContextHandler::dumpXml( const TagLogger::Pointer_t pLogger ) const { pLogger-startElement(context); @@ -1088,7 +1088,7 @@ OOXMLValue::Pointer_t OOXMLFastContextHandlerProperties::getValue() const return OOXMLValue::Pointer_t(new OOXMLPropertySetValue(mpPropertySet)); } -#if OSL_DEBUG_LEVEL 1 +#ifdef DEBUG_DOMAINMAPPER void OOXMLFastContextHandlerProperties::dumpXml( const TagLogger::Pointer_t pLogger) const { pLogger-startElement(context); diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.hxx b/writerfilter/source/ooxml/OOXMLPropertySet.hxx index 76ac56a..354bdd7 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.hxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.hxx @@ -37,8 +37,10 @@ public: virtual writerfilter::ReferenceBinaryObj::Pointer_t getBinary() SAL_OVERRIDE = 0; virtual writerfilter::ReferenceStream::Pointer_t getStream() SAL_OVERRIDE = 0; virtual writerfilter::ReferenceProperties::Pointer_t getProps() SAL_OVERRIDE = 0; +#ifdef DEBUG_DOMAINMAPPER virtual std::string getName() const SAL_OVERRIDE = 0; virtual std::string toString() const SAL_OVERRIDE = 0; +#endif virtual void resolve(Properties rProperties) = 0; virtual Sprm * clone() = 0; @@ -58,7 +60,9 @@ public: virtual OOXMLPropertySet * clone() const = 0; virtual void
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/ooxml/OOXMLDocument.hxx |2 +- writerfilter/source/filter/ImportFilter.cxx |8 writerfilter/source/ooxml/OOXMLStreamImpl.cxx |4 3 files changed, 13 insertions(+), 1 deletion(-) New commits: commit 2c66056bec75105566c5dcbb9726dd77b83be768 Author: Miklos Vajna vmik...@collabora.co.uk Date: Fri May 23 11:40:59 2014 +0200 DOCX import: detect document signature Change-Id: Ic84b1f1446d6ab1a1529de4e0a435afbf62915a7 diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx index da25adf..18c21da 100644 --- a/writerfilter/inc/ooxml/OOXMLDocument.hxx +++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx @@ -75,7 +75,7 @@ class OOXMLStream { public: enum StreamType_t { UNKNOWN, DOCUMENT, STYLES, WEBSETTINGS, FONTTABLE, NUMBERING, -FOOTNOTES, ENDNOTES, COMMENTS, THEME, CUSTOMXML, CUSTOMXMLPROPS, ACTIVEX, ACTIVEXBIN, GLOSSARY, CHARTS, EMBEDDINGS, SETTINGS, VBAPROJECT, FOOTER, HEADER }; +FOOTNOTES, ENDNOTES, COMMENTS, THEME, CUSTOMXML, CUSTOMXMLPROPS, ACTIVEX, ACTIVEXBIN, GLOSSARY, CHARTS, EMBEDDINGS, SETTINGS, VBAPROJECT, FOOTER, HEADER, SIGNATURE }; typedef boost::shared_ptrOOXMLStream Pointer_t; virtual ~OOXMLStream() {} diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx index 277f2da..2380d1f 100644 --- a/writerfilter/source/filter/ImportFilter.cxx +++ b/writerfilter/source/filter/ImportFilter.cxx @@ -175,6 +175,14 @@ sal_Bool WriterFilter::filter( const uno::Sequence beans::PropertyValue aDes oox::GraphicHelper gHelper( m_xContext, xFrame, xVbaPrjStrg ); aVbaProject.importVbaProject( *xVbaPrjStrg, gHelper ); } + +// Document signature. +writerfilter::ooxml::OOXMLStream::Pointer_t pSignatureStream; +pSignatureStream = writerfilter::ooxml::OOXMLDocumentFactory::createStream(m_xContext, xInputStream, bRepairStorage, writerfilter::ooxml::OOXMLStream::SIGNATURE); +if (pSignatureStream-getDocumentStream().is()) +{ +// TODO found, handle it. +} } pStream.reset(); diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx index c000e78..759762a 100644 --- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx @@ -157,6 +157,7 @@ bool OOXMLStreamImpl::lcl_getTarget(uno::Referenceembed::XRelationshipAccess static OUString sFooterType(http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer;); static OUString sHeaderType(http://schemas.openxmlformats.org/officeDocument/2006/relationships/header;); static OUString sOleObjectType(http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject;); +static OUString sSignatureType(http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin;); // OOXML strict static OUString sDocumentTypeStrict(http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument;); static OUString sStylesTypeStrict(http://purl.oclc.org/ooxml/officeDocument/relationships/styles;); @@ -264,6 +265,9 @@ bool OOXMLStreamImpl::lcl_getTarget(uno::Referenceembed::XRelationshipAccess sStreamType = sHeaderType; sStreamTypeStrict = sHeaderTypeStrict; break; +case SIGNATURE: +sStreamType = sSignatureType; +break; default: break; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/resourcemodel/QNameToString.hxx |2 writerfilter/source/dmapper/BorderHandler.cxx|1 writerfilter/source/dmapper/DomainMapper.cxx | 45 +-- writerfilter/source/ooxml/Handler.cxx|1 writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx |6 ++ writerfilter/source/resourcemodel/qnametostrcore.cxx |2 writerfilter/source/rtftok/rtfsprm.cxx |6 ++ 7 files changed, 47 insertions(+), 16 deletions(-) New commits: commit f2b815de56a2c2cfe6bb3f757cd70f7bbcbfe562 Author: Jan Holesovsky ke...@collabora.com Date: Mon Apr 14 19:45:32 2014 +0200 writerfilter: QNameToString is for debugging, avoid using that in real code. Change-Id: I8462204bb0fe4da8de1d05a42347466e40e54169 diff --git a/writerfilter/inc/resourcemodel/QNameToString.hxx b/writerfilter/inc/resourcemodel/QNameToString.hxx index 8090882..95e8cb1f 100644 --- a/writerfilter/inc/resourcemodel/QNameToString.hxx +++ b/writerfilter/inc/resourcemodel/QNameToString.hxx @@ -69,7 +69,9 @@ protected: public: static Pointer_t Instance(); +#ifdef DEBUG_LOGGING string operator()(sal_uInt32 nId); +#endif }; diff --git a/writerfilter/source/dmapper/BorderHandler.cxx b/writerfilter/source/dmapper/BorderHandler.cxx index dd82dd7..efa6be2 100644 --- a/writerfilter/source/dmapper/BorderHandler.cxx +++ b/writerfilter/source/dmapper/BorderHandler.cxx @@ -19,7 +19,6 @@ #include BorderHandler.hxx #include TDefTableHandler.hxx #include PropertyMap.hxx -#include resourcemodel/QNameToString.hxx #include ConversionHelper.hxx #include com/sun/star/table/BorderLine2.hpp #include ooxml/resourceids.hxx diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 23152e6..cb2c8f7 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -911,13 +911,14 @@ void DomainMapper::lcl_attribute(Id nName, Value val) m_pImpl-m_bIgnoreNextPara = true; break; case NS_ooxml::LN_CT_DataBinding_prefixMappings: +m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, ooxml:CT_DataBinding_prefixMappings, sStringValue); +break; case NS_ooxml::LN_CT_DataBinding_xpath: +m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, ooxml:CT_DataBinding_xpath, sStringValue); +break; case NS_ooxml::LN_CT_DataBinding_storeItemID: -{ -OUString sName = OUString::createFromAscii((*QNameToString::Instance())(nName).c_str()); -m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, sName, sStringValue); -} -break; +m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, ooxml:CT_DataBinding_storeItemID, sStringValue); +break; default: { #if OSL_DEBUG_LEVEL 0 @@ -2268,7 +2269,21 @@ void DomainMapper::sprmWithProps( Sprm rSprm, PropertyMapPtr rContext ) case NS_ooxml::LN_CT_SdtPr_id: { // this is an unsupported SDT property, create a grab bag for it -OUString sName = OUString::createFromAscii((*QNameToString::Instance())(nSprmId).c_str()); +OUString sName; +switch (nSprmId) +{ +case NS_ooxml::LN_CT_SdtPr_dataBinding: sName = ooxml:CT_SdtPr_dataBinding; break; +case NS_ooxml::LN_CT_SdtPr_equation:sName = ooxml:CT_SdtPr_equation; break; +case NS_ooxml::LN_CT_SdtPr_checkbox:sName = ooxml:CT_SdtPr_checkbox; break; +case NS_ooxml::LN_CT_SdtPr_docPartObj: sName = ooxml:CT_SdtPr_docPartObj; break; +case NS_ooxml::LN_CT_SdtPr_docPartList: sName = ooxml:CT_SdtPr_docPartList; break; +case NS_ooxml::LN_CT_SdtPr_picture: sName = ooxml:CT_SdtPr_picture; break; +case NS_ooxml::LN_CT_SdtPr_citation:sName = ooxml:CT_SdtPr_citation; break; +case NS_ooxml::LN_CT_SdtPr_group: sName = ooxml:CT_SdtPr_group; break; +case NS_ooxml::LN_CT_SdtPr_text:sName = ooxml:CT_SdtPr_text; break; +case NS_ooxml::LN_CT_SdtPr_id: sName = ooxml:CT_SdtPr_id; break; +default: assert(false); +}; enableInteropGrabBag(sName); // process subitems @@ -2281,17 +2296,23 @@ void DomainMapper::sprmWithProps( Sprm rSprm, PropertyMapPtr rContext ) } break; case NS_ooxml::LN_CT_SdtCheckbox_checked: +m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, ooxml:CT_SdtCheckbox_checked, sStringValue); +break; case NS_ooxml::LN_CT_SdtCheckbox_checkedState: +m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, ooxml:CT_SdtCheckbox_checkedState, sStringValue); +break; case NS_ooxml::LN_CT_SdtCheckbox_uncheckedState: +m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, ooxml:CT_SdtCheckbox_uncheckedState, sStringValue); +break; case
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/ooxml/OOXMLDocument.hxx |3 writerfilter/source/filter/ImportFilter.cxx |3 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 62 -- writerfilter/source/ooxml/OOXMLDocumentImpl.hxx | 13 +++ writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |2 5 files changed, 75 insertions(+), 8 deletions(-) New commits: commit fdacaab2485fa42648ae96348b9ad6a9e1f49424 Author: Miklos Vajna vmik...@collabora.co.uk Date: Fri Mar 21 15:31:21 2014 +0100 DOCX import: implement progressbar The design follows what we do in case of ODT import already: read the number of paragraphs from the document statistics metadata, and then estimate progress based on the number of already imported paragraphs. Change-Id: I042cc6014c05ca7456fdf1c8d7247b615ba3a244 diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx index 4bbc31b..7f104ab 100644 --- a/writerfilter/inc/ooxml/OOXMLDocument.hxx +++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx @@ -24,6 +24,7 @@ #include com/sun/star/io/XInputStream.hpp #include com/sun/star/uno/XComponentContext.hpp #include resourcemodel/WW8ResourceModel.hxx +#include com/sun/star/task/XStatusIndicator.hpp #include com/sun/star/xml/sax/XParser.hpp #include com/sun/star/xml/sax/XFastParser.hpp #include com/sun/star/xml/sax/XFastTokenHandler.hpp @@ -269,7 +270,7 @@ public: createStream(OOXMLStream::Pointer_t pStream, const OUString rId); static OOXMLDocument * -createDocument(OOXMLStream::Pointer_t pStream); +createDocument(OOXMLStream::Pointer_t pStream, const uno::Referencetask::XStatusIndicator xStatusIndicator); }; diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx index b6615a9..d75e56b 100644 --- a/writerfilter/source/filter/ImportFilter.cxx +++ b/writerfilter/source/filter/ImportFilter.cxx @@ -105,7 +105,8 @@ sal_Bool WriterFilter::filter( const uno::Sequence beans::PropertyValue aDes if( eType == writerfilter::dmapper::DOCUMENT_OOXML ) { writerfilter::ooxml::OOXMLStream::Pointer_t pDocStream = writerfilter::ooxml::OOXMLDocumentFactory::createStream(m_xContext, xInputStream, bRepairStorage); -writerfilter::ooxml::OOXMLDocument::Pointer_t pDocument(writerfilter::ooxml::OOXMLDocumentFactory::createDocument(pDocStream)); +uno::Referencetask::XStatusIndicator xStatusIndicator = aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_STATUSINDICATOR(), uno::Referencetask::XStatusIndicator()); +writerfilter::ooxml::OOXMLDocument::Pointer_t pDocument(writerfilter::ooxml::OOXMLDocumentFactory::createDocument(pDocStream, xStatusIndicator)); uno::Referenceframe::XModel xModel(m_xDstDoc, uno::UNO_QUERY_THROW); pDocument-setModel(xModel); diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index 60ac009..83cdb58 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -17,8 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include comphelper/sequenceashashmap.hxx + #include com/sun/star/xml/sax/XParser.hpp +#include com/sun/star/document/XDocumentPropertiesSupplier.hpp #include com/sun/star/xml/sax/SAXException.hpp #include com/sun/star/xml/dom/DocumentBuilder.hpp #include com/sun/star/embed/XHierarchicalStorageAccess.hpp @@ -30,6 +33,11 @@ #include OOXMLPropertySetImpl.hxx #include ooxmlLoggers.hxx +#include tools/resmgr.hxx +#include vcl/svapp.hxx +#include vcl/settings.hxx +#include svx/dialogs.hrc + #include iostream // this extern variable is declared in OOXMLStreamImpl.hxx @@ -46,12 +54,17 @@ TagLogger::Pointer_t debug_logger(TagLogger::getInstance(DEBUG)); using namespace ::std; -OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream) +OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream, const uno::Referencetask::XStatusIndicator xStatusIndicator) : mpStream(pStream) +, mxStatusIndicator(xStatusIndicator) , mnXNoteId(0) , mXNoteType(0) , mxThemeDom(0) , mbIsSubstream(false) +, mnPercentSize(0) +, mnProgressLastPos(0) +, mnProgressCurrentPos(0) +, mnProgressEndPos(0) { } @@ -257,7 +270,8 @@ OOXMLDocumentImpl::getSubStream(const OUString rId) (OOXMLDocumentFactory::createStream(mpStream, rId)); OOXMLDocumentImpl * pTemp; -writerfilter::ReferenceStream::Pointer_t pRet( pTemp = new OOXMLDocumentImpl(pStream) ); +// Do not pass status indicator to sub-streams: they are typically marginal in size, so we just track the main document for now. +writerfilter::ReferenceStream::Pointer_t pRet( pTemp = new OOXMLDocumentImpl(pStream, uno::Referencetask::XStatusIndicator()) ); pTemp-setModel(mxModel);
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/DomainMapper.hxx|2 +- writerfilter/source/dmapper/DomainMapper.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 960ef265fca5d7a555c41e0dc9bf2bd8ac9370f4 Author: Miklos Vajna vmik...@collabora.co.uk Date: Fri Mar 7 17:41:39 2014 +0100 unused parameter Change-Id: I788999f29b32de4232efc9e8c4dc75238224f5a8 diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx index a2d6006..25c1232 100644 --- a/writerfilter/inc/dmapper/DomainMapper.hxx +++ b/writerfilter/inc/dmapper/DomainMapper.hxx @@ -93,7 +93,7 @@ public: virtual void data(const sal_uInt8* buf, size_t len, writerfilter::ReferenceProperties::Pointer_t ref); -void sprmWithProps( Sprm sprm, ::boost::shared_ptrPropertyMap pContext, SprmType = SPRM_DEFAULT ); +void sprmWithProps( Sprm sprm, ::boost::shared_ptrPropertyMap pContext ); void PushStyleSheetProperties( ::boost::shared_ptrPropertyMap pStyleProperties, bool bAffectTableMngr = false ); void PopStyleSheetProperties( bool bAffectTableMngr = false ); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index aae1066..45d77e1 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -974,7 +974,7 @@ static bool ExchangeLeftRight( const PropertyMapPtr rContext, DomainMapper_Impl* return bExchangeLeftRight; } -void DomainMapper::sprmWithProps( Sprm rSprm, PropertyMapPtr rContext, SprmType /*eSprmType*/ ) +void DomainMapper::sprmWithProps( Sprm rSprm, PropertyMapPtr rContext ) { OSL_ENSURE(rContext.get(), PropertyMap has to be valid!); if(!rContext.get()) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/resourcemodel/TableManager.hxx |9 - writerfilter/source/dmapper/DomainMapper.cxx |7 - writerfilter/source/dmapper/DomainMapper_Impl.hxx |2 writerfilter/source/doctok/resources.xmi | 124 -- writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 16 +- writerfilter/source/ooxml/model.xml |7 + writerfilter/source/rtftok/rtfdocumentimpl.cxx| 12 - 7 files changed, 30 insertions(+), 147 deletions(-) New commits: commit 2e0f89980f40f14b36bc45176504861f3624ea99 Author: Miklos Vajna vmik...@collabora.co.uk Date: Sun Mar 2 19:43:57 2014 +0100 writerfilter: convert sprm:P{TableDepth,FInTable,Cell,Row} With this, source/ooxml no longer depends on the 'NS_sprm' namespace doctok provides. Change-Id: I58d5514dea25f1fbc8806863d976f6a24934ea61 diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx index e463c56..68e6573 100644 --- a/writerfilter/inc/resourcemodel/TableManager.hxx +++ b/writerfilter/inc/resourcemodel/TableManager.hxx @@ -25,6 +25,7 @@ #include resourcemodel/WW8ResourceModel.hxx #include doctok/sprmids.hxx +#include ooxml/resourceids.hxx #include boost/shared_ptr.hpp #include stack @@ -859,20 +860,20 @@ bool TableManagerT, PropertiesPointer::sprm(Sprm rSprm) bool bRet = true; switch (rSprm.getId()) { -case NS_sprm::LN_PTableDepth: +case NS_ooxml::LN_tblDepth: { Value::Pointer_t pValue = rSprm.getValue(); cellDepth(pValue-getInt()); } break; -case NS_sprm::LN_PFInTable: +case NS_ooxml::LN_inTbl: inCell(); break; -case NS_sprm::LN_PCell: +case NS_ooxml::LN_tblCell: endCell(); break; -case NS_sprm::LN_PRow: +case NS_ooxml::LN_tblRow: endRow(); break; default: diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 8aa8e64..e01df18 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1089,10 +1089,9 @@ void DomainMapper::sprmWithProps( Sprm rSprm, PropertyMapPtr rContext, SprmType eSprmType == SPRM_DEFAULT ? PROP_PARA_FIRST_LINE_INDENT : PROP_FIRST_LINE_OFFSET, uno::makeAny( ConversionHelper::convertTwipToMM100(nIntValue ) )); break; -case 24: // sprmPFInTable -case NS_sprm::LN_PFInTable: -break; // sprmPFInTable -case NS_sprm::LN_PTableDepth: //sprmPTableDepth +case NS_ooxml::LN_inTbl: +break; +case NS_ooxml::LN_tblDepth: //not handled via sprm but via text( 0x07 ) break; case NS_ooxml::LN_CT_FramePr_w: diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index d1e9bb4..fba09b9 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -725,7 +725,7 @@ public: * getTableManager().isInTable(), unless we're in the first paragraph of a * table, or first paragraph after a table, as the table manager is only * updated once we ended the paragraph (and know if the para has the - * PFInTable SPRM or not). + * inTbl SPRM or not). */ sal_Int32 m_nTableDepth; diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi index d6539ee..f4561e7 100644 --- a/writerfilter/source/doctok/resources.xmi +++ b/writerfilter/source/doctok/resources.xmi @@ -69,99 +69,6 @@ /UML:ModelElement.taggedValue /UML:Class !--SPRM sprmPDxaLeft-- -!--SPRM sprmPFInTable-- -UML:Class xmi.id=sprmPFInTable name=sprmPFInTable - UML:ModelElement.stereotype -UML:Stereotype xmi.idref=ww8sprm/ - /UML:ModelElement.stereotype - UML:ModelElement.taggedValue -UML:TaggedValue - UML:TaggedValue.dataValue0x2416/UML:TaggedValue.dataValue - UML:TaggedValue.type -UML:TagDefinition xmi.idref=sprmcode/ - /UML:TaggedValue.type -/UML:TaggedValue - /UML:ModelElement.taggedValue - UML:ModelElement.taggedValue -UML:TaggedValue - UML:TaggedValue.dataValuertf:sprmPFInTable/UML:TaggedValue.dataValue - UML:TaggedValue.type -UML:TagDefinition xmi.idref=sprmid/ - /UML:TaggedValue.type -/UML:TaggedValue - /UML:ModelElement.taggedValue - UML:ModelElement.taggedValue -UML:TaggedValue - UML:TaggedValue.dataValueparagraph/UML:TaggedValue.dataValue - UML:TaggedValue.type -UML:TagDefinition xmi.idref=kind/ - /UML:TaggedValue.type -
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/DomainMapper.hxx |2 +- writerfilter/source/dmapper/BorderHandler.hxx |2 +- writerfilter/source/dmapper/CellColorHandler.hxx |2 +- writerfilter/source/dmapper/CellMarginHandler.hxx |2 +- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 10 +- writerfilter/source/dmapper/FieldTypes.hxx |2 +- writerfilter/source/dmapper/FontTable.hxx |2 +- writerfilter/source/dmapper/GraphicImport.hxx |2 +- writerfilter/source/dmapper/MeasureHandler.hxx |2 +- writerfilter/source/dmapper/ModelEventListener.hxx |2 +- writerfilter/source/dmapper/NumberingManager.cxx |2 +- writerfilter/source/dmapper/OLEHandler.hxx |2 +- writerfilter/source/dmapper/SectionColumnHandler.hxx |2 +- writerfilter/source/dmapper/SettingsTable.hxx |2 +- writerfilter/source/dmapper/StyleSheetTable.hxx|4 ++-- writerfilter/source/dmapper/TDefTableHandler.hxx |2 +- writerfilter/source/dmapper/TablePropertiesHandler.cxx |2 +- writerfilter/source/dmapper/ThemeTable.hxx |2 +- writerfilter/source/dmapper/TrackChangesHandler.hxx|2 +- 19 files changed, 24 insertions(+), 24 deletions(-) New commits: commit 8440c9ed92561c307bfab131c7de7144ed24100b Author: Alexander Wilms f.alexander.wi...@gmail.com Date: Tue Feb 25 23:10:59 2014 +0100 Remove visual noise from writerfilter Change-Id: I2470e26f1b0a7c3b28fbc0ec44170565f250fc40 Reviewed-on: https://gerrit.libreoffice.org/8342 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx index ce30d69..0a9ecbe 100644 --- a/writerfilter/inc/dmapper/DomainMapper.hxx +++ b/writerfilter/inc/dmapper/DomainMapper.hxx @@ -174,6 +174,6 @@ private: } // namespace dmapper } // namespace writerfilter -#endif // +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/BorderHandler.hxx b/writerfilter/source/dmapper/BorderHandler.hxx index 7b52962..efe2909 100644 --- a/writerfilter/source/dmapper/BorderHandler.hxx +++ b/writerfilter/source/dmapper/BorderHandler.hxx @@ -78,6 +78,6 @@ public: typedef boost::shared_ptr BorderHandler BorderHandlerPtr; }} -#endif // +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/CellColorHandler.hxx b/writerfilter/source/dmapper/CellColorHandler.hxx index 1683d50..fbfef52 100644 --- a/writerfilter/source/dmapper/CellColorHandler.hxx +++ b/writerfilter/source/dmapper/CellColorHandler.hxx @@ -64,6 +64,6 @@ public: typedef boost::shared_ptr CellColorHandler CellColorHandlerPtr; }} -#endif // +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/CellMarginHandler.hxx b/writerfilter/source/dmapper/CellMarginHandler.hxx index 902ef80..24be82b 100644 --- a/writerfilter/source/dmapper/CellMarginHandler.hxx +++ b/writerfilter/source/dmapper/CellMarginHandler.hxx @@ -67,6 +67,6 @@ public: typedef boost::shared_ptr CellMarginHandler CellMarginHandlerPtr; }} -#endif // +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 6e4d439..f86fbd5 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1038,10 +1038,10 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) } } -else // +else { // (1) doesn't need handling -// + if( !bIsDropCap pParaContext-IsFrameMode() ) { pToBeSavedProperties.reset( new ParagraphProperties(*pParaContext) ); @@ -1258,7 +1258,7 @@ void DomainMapper_Impl::appendOLE( const OUString rStreamName, OLEHandlerPtr pO RemoveLastParagraph(); m_aTextAppendStack.pop(); -// + appendTextContent( xOLE, uno::Sequence beans::PropertyValue () ); } @@ -3717,9 +3717,9 @@ void DomainMapper_Impl::PopFieldContext() OSL_FAIL( exception in PopFieldContext() ); } } -// + //TOCs have to include all the imported content -//... + } //remove the field context m_aFieldStack.pop(); diff --git a/writerfilter/source/dmapper/FieldTypes.hxx b/writerfilter/source/dmapper/FieldTypes.hxx index 2a54dfe..9d3d360 100644 --- a/writerfilter/source/dmapper/FieldTypes.hxx +++ b/writerfilter/source/dmapper/FieldTypes.hxx @@ -176,7 +176,7 @@ enum FieldId \w paragraph number in full context \*
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/DomainMapper.hxx|2 writerfilter/source/dmapper/DomainMapper.cxx | 57 +-- 2 files changed, 39 insertions(+), 20 deletions(-) New commits: commit af84f04c10724fdeecfc25de46fa1d54cf905bd2 Author: Adam Co rattles2...@gmail.com Date: Mon Feb 3 14:13:37 2014 +0200 Refactor some code for handling redline in DOCX importer Change-Id: Id5d0814c1ebbcd85507d11cf562d394a748773a6 Reviewed-on: https://gerrit.libreoffice.org/7807 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx index f7d6fcb..ce30d69 100644 --- a/writerfilter/inc/dmapper/DomainMapper.hxx +++ b/writerfilter/inc/dmapper/DomainMapper.hxx @@ -129,6 +129,8 @@ public: uno::Sequencebeans::PropertyValue GetThemeFontLangProperties() const; +void HandleRedline( Sprm rSprm ); + private: // Stream virtual void lcl_startSectionGroup(); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index bd8e6fd..5751e33 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2224,26 +2224,7 @@ void DomainMapper::sprmWithProps( Sprm rSprm, PropertyMapPtr rContext, SprmType case NS_ooxml::LN_trackchange: case NS_ooxml::LN_EG_RPrContent_rPrChange: { -m_pImpl-AddNewRedline( ); - -if (nSprmId == NS_ooxml::LN_CT_PPr_pPrChange) -{ -m_pImpl-SetCurrentRedlineToken( ooxml::OOXML_ParagraphFormat ); -} - -resolveSprmProps(*this, rSprm ); -// now the properties author, date and id should be available -sal_Int32 nToken = m_pImpl-GetCurrentRedlineToken(); -switch( nToken 0x ) -{ -case ooxml::OOXML_mod : -case ooxml::OOXML_ins : -case ooxml::OOXML_del : -case ooxml::OOXML_ParagraphFormat : -break; -default: OSL_FAIL( redline token other than mod, ins or del ); -} -m_pImpl-EndParaMarkerChange( ); +HandleRedline( rSprm ); } break; case NS_ooxml::LN_endtrackchange: @@ -3190,6 +3171,42 @@ uno::Sequencebeans::PropertyValue DomainMapper::GetThemeFontLangProperties() c return m_pImpl-GetSettingsTable()-GetThemeFontLangProperties(); } +void DomainMapper::HandleRedline( Sprm rSprm ) +{ +sal_uInt32 nSprmId = rSprm.getId(); + +m_pImpl-AddNewRedline( ); + +if (nSprmId == NS_ooxml::LN_CT_PPr_pPrChange) +{ +m_pImpl-SetCurrentRedlineToken( ooxml::OOXML_ParagraphFormat ); +} +else if (nSprmId == NS_ooxml::LN_CT_TrPr_ins) +{ +m_pImpl-SetCurrentRedlineToken( ooxml::OOXML_tableRowInsert ); +} +else if (nSprmId == NS_ooxml::LN_CT_TrPr_del) +{ +m_pImpl-SetCurrentRedlineToken( ooxml::OOXML_tableRowDelete ); +} + +resolveSprmProps(*this, rSprm ); +// now the properties author, date and id should be available +sal_Int32 nToken = m_pImpl-GetCurrentRedlineToken(); +switch( nToken 0x ) +{ +case ooxml::OOXML_mod : +case ooxml::OOXML_ins : +case ooxml::OOXML_del : +case ooxml::OOXML_ParagraphFormat : +case ooxml::OOXML_tableRowInsert: +case ooxml::OOXML_tableRowDelete: +break; +default: OSL_FAIL( redline token other than mod, ins, del or table row ); break; +} +m_pImpl-EndParaMarkerChange( ); +} + } //namespace dmapper } //namespace writerfilter ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/DomainMapper.hxx |1 writerfilter/inc/resourcemodel/LoggedResources.hxx|2 + writerfilter/inc/resourcemodel/WW8ResourceModel.hxx |2 + writerfilter/source/dmapper/DomainMapper.cxx |5 +++ writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 - writerfilter/source/dmapper/DomainMapper_Impl.hxx |4 +++ writerfilter/source/dmapper/GraphicImport.cxx | 23 +++--- writerfilter/source/dmapper/GraphicImport.hxx |5 +++ writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 11 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx |1 writerfilter/source/ooxml/factoryimpl_ns.xsl |3 ++ writerfilter/source/ooxml/model.xml |7 + writerfilter/source/resourcemodel/LoggedResources.cxx | 14 ++ writerfilter/source/resourcemodel/resourcemodel.hxx |1 14 files changed, 76 insertions(+), 5 deletions(-) New commits: commit 166af05c63598426c375544b5e1e01818aa13747 Author: Miklos Vajna vmik...@collabora.co.uk Date: Mon Jan 27 17:51:50 2014 +0100 DOCX import: handle wp14:pctWidth for Writer TextFrames Change-Id: I721a1ddd8299ff9639fd5fe4a25852e9418c00e2 diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx index 4a168d9..f7d6fcb 100644 --- a/writerfilter/inc/dmapper/DomainMapper.hxx +++ b/writerfilter/inc/dmapper/DomainMapper.hxx @@ -142,6 +142,7 @@ private: virtual void lcl_text(const sal_uInt8 * data, size_t len); virtual void lcl_utext(const sal_uInt8 * data, size_t len); +virtual void lcl_positivePercentage(const OUString rText) SAL_OVERRIDE; virtual void lcl_props(writerfilter::ReferenceProperties::Pointer_t ref); virtual void lcl_table(Id name, writerfilter::ReferenceTable::Pointer_t ref); diff --git a/writerfilter/inc/resourcemodel/LoggedResources.hxx b/writerfilter/inc/resourcemodel/LoggedResources.hxx index 419bde7..5eaa781 100644 --- a/writerfilter/inc/resourcemodel/LoggedResources.hxx +++ b/writerfilter/inc/resourcemodel/LoggedResources.hxx @@ -64,6 +64,7 @@ public: void endShape(); void text(const sal_uInt8 * data, size_t len); void utext(const sal_uInt8 * data, size_t len); +void positivePercentage(const OUString rText); void props(writerfilter::ReferenceProperties::Pointer_t ref); void table(Id name, writerfilter::ReferenceTable::Pointer_t ref); void substream(Id name, writerfilter::ReferenceStream::Pointer_t ref); @@ -80,6 +81,7 @@ protected: virtual void lcl_endShape() = 0; virtual void lcl_text(const sal_uInt8 * data, size_t len) = 0; virtual void lcl_utext(const sal_uInt8 * data, size_t len) = 0; +virtual void lcl_positivePercentage(const OUString /*rText*/) { } virtual void lcl_props(writerfilter::ReferenceProperties::Pointer_t ref) = 0; virtual void lcl_table(Id name, writerfilter::ReferenceTable::Pointer_t ref) = 0; virtual void lcl_substream(Id name, writerfilter::ReferenceStream::Pointer_t ref) = 0; diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx index 886d2f6..01106ae 100644 --- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx +++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx @@ -246,6 +246,8 @@ public: */ virtual void utext(const sal_uInt8 * data, size_t len) = 0; +virtual void positivePercentage(const OUString rText) = 0; + /** Receives properties of the current run of text. diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index d095df8..1a79129 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3293,6 +3293,11 @@ void DomainMapper::lcl_text(const sal_uInt8 * data_, size_t len) } } +void DomainMapper::lcl_positivePercentage(const OUString rText) +{ +m_pImpl-m_aPositivePercentages.push(rText); +} + void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) { OUString sText; diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 74173fd..8b7dc2d 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -3762,7 +3762,7 @@ void DomainMapper_Impl::AddAnnotationPosition( GraphicImportPtr DomainMapper_Impl::GetGraphicImport(GraphicImportType eGraphicImportType) { if(!m_pGraphicImport) -m_pGraphicImport.reset( new GraphicImport( m_xComponentContext, m_xTextFactory, m_rDMapper, eGraphicImportType ) ); +m_pGraphicImport.reset( new GraphicImport( m_xComponentContext, m_xTextFactory, m_rDMapper, eGraphicImportType, m_aPositivePercentages ) ); return m_pGraphicImport; }
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/ooxml/OOXMLDocument.hxx|3 - writerfilter/source/filter/ImportFilter.cxx |6 +- writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 68 writerfilter/source/ooxml/OOXMLDocumentImpl.hxx |4 + writerfilter/source/ooxml/OOXMLStreamImpl.cxx | 12 +++- writerfilter/source/ooxml/OOXMLStreamImpl.hxx |1 6 files changed, 91 insertions(+), 3 deletions(-) New commits: commit 0e114b9967ddfb490cd9865220520701004db7ab Author: sushil_shinde sushil.shi...@synerzip.com Date: Fri Dec 27 14:25:16 2013 +0530 fdo#72520 : Added embedded data of docx file to InteropGrabBag. - Added embedded exel sheet data for charts to grab bag. Change-Id: I7f52b56de2306671fea9247c8a789c0e2a5a8874 Reviewed-on: https://gerrit.libreoffice.org/7211 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx index 13f365e..4bbc31b 100644 --- a/writerfilter/inc/ooxml/OOXMLDocument.hxx +++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx @@ -76,7 +76,7 @@ class WRITERFILTER_OOXML_DLLPUBLIC OOXMLStream { public: enum StreamType_t { UNKNOWN, DOCUMENT, STYLES, WEBSETTINGS, FONTTABLE, NUMBERING, -FOOTNOTES, ENDNOTES, COMMENTS, THEME, CUSTOMXML, CUSTOMXMLPROPS, ACTIVEX, ACTIVEXBIN, GLOSSARY, SETTINGS, VBAPROJECT }; +FOOTNOTES, ENDNOTES, COMMENTS, THEME, CUSTOMXML, CUSTOMXMLPROPS, ACTIVEX, ACTIVEXBIN, GLOSSARY, CHARTS, EMBEDDINGS, SETTINGS, VBAPROJECT }; typedef boost::shared_ptrOOXMLStream Pointer_t; virtual ~OOXMLStream() {} @@ -248,6 +248,7 @@ public: virtual uno::Sequenceuno::Referencexml::dom::XDocument getCustomXmlDomPropsList( ) = 0; virtual uno::Sequenceuno::Referencexml::dom::XDocument getActiveXDomList( ) = 0; virtual uno::Sequenceuno::Referenceio::XInputStream getActiveXBinList() = 0; +virtual uno::Sequencebeans::PropertyValue getEmbeddingsList() = 0; }; diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx index 90c4c98..ac2902d 100644 --- a/writerfilter/source/filter/ImportFilter.cxx +++ b/writerfilter/source/filter/ImportFilter.cxx @@ -119,7 +119,7 @@ sal_Bool WriterFilter::filter( const uno::Sequence beans::PropertyValue aDes pDocument-resolve(*pStream); // Adding some properties to the document's grab bag for interoperability purposes: -uno::Sequencebeans::PropertyValue aGrabBagProperties(8); +uno::Sequencebeans::PropertyValue aGrabBagProperties(9); // Adding the saved Theme DOM aGrabBagProperties[0].Name = OOXTheme; @@ -147,6 +147,10 @@ sal_Bool WriterFilter::filter( const uno::Sequence beans::PropertyValue aDes aGrabBagProperties[7].Name = OOXGlossaryDom; aGrabBagProperties[7].Value = uno::makeAny( pDocument-getGlossaryDomList() ); +// Adding the saved embedding document to document's grab bag +aGrabBagProperties[8].Name = OOXEmbeddings; +aGrabBagProperties[8].Value = uno::makeAny( pDocument-getEmbeddingsList() ); + putPropertiesToDocumentGrabBag( aGrabBagProperties ); writerfilter::ooxml::OOXMLStream::Pointer_t pVBAProjectStream(writerfilter::ooxml::OOXMLDocumentFactory::createStream( pDocStream, writerfilter::ooxml::OOXMLStream::VBAPROJECT )); diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index cf4de5c..05292a5 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -35,6 +35,7 @@ // this extern variable is declared in OOXMLStreamImpl.hxx OUString customTarget; +OUString embeddingsTarget; using ::com::sun::star::xml::sax::SAXException; namespace writerfilter { namespace ooxml @@ -157,6 +158,10 @@ uno::Referencexml::dom::XDocument OOXMLDocumentImpl::importSubStream(OOXMLStre { importSubStreamRelations(pStream, OOXMLStream::ACTIVEXBIN); } +if(OOXMLStream::CHARTS == nType) +{ +importSubStreamRelations(pStream, OOXMLStream::EMBEDDINGS); +} return xRet; } @@ -207,6 +212,11 @@ void OOXMLDocumentImpl::importSubStreamRelations(OOXMLStream::Pointer_t pStream, // imporing activex.bin files for activex.xml from activeX folder. mxActiveXBin = xcpInputStream; } +else if(OOXMLStream::EMBEDDINGS == nType) +{ +// imporing activex.bin files for activex.xml from activeX folder. +mxEmbeddings = xcpInputStream; +} } @@ -441,6 +451,9 @@ void OOXMLDocumentImpl::resolve(Stream rStream) mxGlossaryDocDom = importSubStream(OOXMLStream::GLOSSARY); if (mxGlossaryDocDom.is()) resolveGlossaryStream(rStream); + +resolveEmbeddingsStream(rStream); + // Custom
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/dmapper/DomainMapper.hxx |5 +++ writerfilter/source/dmapper/DomainMapper.cxx | 31 ++ writerfilter/source/dmapper/DomainMapper_Impl.cxx | 27 +++ writerfilter/source/dmapper/DomainMapper_Impl.hxx | 13 + writerfilter/source/dmapper/StyleSheetTable.cxx | 13 + 5 files changed, 89 insertions(+) New commits: commit af70016923b42940715c618caf01c78e892aa797 Author: Miklos Vajna vmik...@collabora.co.uk Date: Mon Oct 28 18:05:15 2013 +0100 DOCX import: store table style's pPr in InteropGrabBag Change-Id: I0cecdc23053c0c03866ad808038d99a3bea3256e diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx index a879115..d6b5d37 100644 --- a/writerfilter/inc/dmapper/DomainMapper.hxx +++ b/writerfilter/inc/dmapper/DomainMapper.hxx @@ -122,6 +122,11 @@ public: const std::map sal_Int32, com::sun::star::uno::Any deferredCharacterProperties ); void setInTableStyleRunProps(bool bInTableStyleRunProps); +/// Enable storing of seen tokens in a named grab bag. +void enableInteropGrabBag(OUString aName); +/// Get the stored tokens and clear the internal storage. +beans::PropertyValue getInteropGrabBag(); + private: // Stream virtual void lcl_startSectionGroup(); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index ad74662..9760403 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -977,6 +977,7 @@ void DomainMapper::lcl_attribute(Id nName, Value val) case NS_ooxml::LN_CT_Spacing_beforeLines: break; case NS_ooxml::LN_CT_Spacing_after: +m_pImpl-appendGrabBag(m_pImpl-m_aSubInteropGrabBag, after, OUString::number(nIntValue)); if (m_pImpl-GetTopContext()) // Don't overwrite NS_ooxml::LN_CT_Spacing_afterAutospacing. m_pImpl-GetTopContext()-Insert(PROP_PARA_BOTTOM_MARGIN, uno::makeAny( ConversionHelper::convertTwipToMM100( nIntValue ) ), false); @@ -1008,6 +1009,7 @@ void DomainMapper::lcl_attribute(Id nName, Value val) } if( nName == NS_ooxml::LN_CT_Spacing_line ) { +m_pImpl-appendGrabBag(m_pImpl-m_aSubInteropGrabBag, line, OUString::number(nIntValue)); //now set the value depending on the Mode if( aSpacing.Mode == style::LineSpacingMode::PROP ) aSpacing.Height = sal_Int16(sal_Int32(nIntValue) * 100 / SINGLE_LINE_SPACING ); @@ -1019,14 +1021,21 @@ void DomainMapper::lcl_attribute(Id nName, Value val) // exactly, atLeast, auto if( sal::static_int_castId(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_LineSpacingRule_auto) { +m_pImpl-appendGrabBag(m_pImpl-m_aSubInteropGrabBag, lineRule, auto); aSpacing.Mode = style::LineSpacingMode::PROP; //reinterpret the already set value aSpacing.Height = sal_Int16( aSpacing.Height * 100 / ConversionHelper::convertTwipToMM100( SINGLE_LINE_SPACING )); } else if( sal::static_int_castId(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_LineSpacingRule_atLeast) +{ +m_pImpl-appendGrabBag(m_pImpl-m_aSubInteropGrabBag, lineRule, atLeast); aSpacing.Mode = style::LineSpacingMode::MINIMUM; +} else // NS_ooxml::LN_Value_wordprocessingml_ST_LineSpacingRule_exact +{ +m_pImpl-appendGrabBag(m_pImpl-m_aSubInteropGrabBag, lineRule, exact); aSpacing.Mode = style::LineSpacingMode::FIX; +} } if (pTopContext) pTopContext-Insert(PROP_PARA_LINE_SPACING, uno::makeAny( aSpacing )); @@ -2987,6 +2996,8 @@ void DomainMapper::sprmWithProps( Sprm rSprm, PropertyMapPtr rContext, SprmType if (nSprmId == NS_ooxml::LN_CT_PPr_sectPr) m_pImpl-SetParaSectpr(true); resolveSprmProps(*this, rSprm); +if (nSprmId == NS_ooxml::LN_CT_PPrBase_spacing) +m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, spacing, m_pImpl-m_aSubInteropGrabBag); break; case NS_ooxml::LN_EG_SectPrContents_footnotePr: case NS_ooxml::LN_EG_SectPrContents_endnotePr: @@ -4204,6 +4215,26 @@ bool DomainMapper::IsInHeaderFooter() const return m_pImpl-IsInHeaderFooter(); } +void DomainMapper::enableInteropGrabBag(OUString aName) +{ +m_pImpl-m_aInteropGrabBagName = aName; +} + +beans::PropertyValue DomainMapper::getInteropGrabBag() +{ +beans::PropertyValue aRet; +aRet.Name = m_pImpl-m_aInteropGrabBagName; + +
[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source
writerfilter/inc/doctok/WW8Document.hxx| 11 --- writerfilter/source/doctok/WW8DocumentImpl.cxx | 13 - writerfilter/source/filter/ImportFilter.cxx|7 --- 3 files changed, 31 deletions(-) New commits: commit a5097b664a38c7da37955c6e3e56a8078abafcdf Author: Miklos Vajna vmik...@collabora.co.uk Date: Wed Sep 25 09:53:51 2013 +0200 writerfilter: remove dead WW8DocumentFactory Change-Id: I9896c3b221d2ec4766b9ee63aadc90bff9c33ea6 diff --git a/writerfilter/inc/doctok/WW8Document.hxx b/writerfilter/inc/doctok/WW8Document.hxx index b624ce7..9300e2f 100644 --- a/writerfilter/inc/doctok/WW8Document.hxx +++ b/writerfilter/inc/doctok/WW8Document.hxx @@ -416,17 +416,6 @@ public: virtual WW8DocumentIterator::Pointer_t end() = 0; }; -class WRITERFILTER_DOCTOK_DLLPUBLIC WW8DocumentFactory -{ -public: -static WW8Stream::Pointer_t -createStream(uno::Referenceuno::XComponentContext rContext, - uno::Referenceio::XInputStream rStream); - -static WW8Document * -createDocument(WW8Stream::Pointer_t rpStream); -}; - }} #endif // INCLUDED_WW8_DOCUMENT_HXX diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx index 9e914a4..f55566c 100644 --- a/writerfilter/source/doctok/WW8DocumentImpl.cxx +++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx @@ -1776,19 +1776,6 @@ void WW8DocumentImpl::resolve(Stream rStream) } -WW8Stream::Pointer_t -WW8DocumentFactory::createStream(uno::Referenceuno::XComponentContext rContext, - uno::Referenceio::XInputStream rStream) -{ -return WW8Stream::Pointer_t(new WW8StreamImpl(rContext, rStream)); -} - -WW8Document * -WW8DocumentFactory::createDocument(WW8Stream::Pointer_t rpStream) -{ -return new WW8DocumentImpl(rpStream); -} - writerfilter::ReferenceProperties::Pointer_t WW8SED::get_sepx() { diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx index df5604b..784a18a 100644 --- a/writerfilter/source/filter/ImportFilter.cxx +++ b/writerfilter/source/filter/ImportFilter.cxx @@ -167,13 +167,6 @@ sal_Bool WriterFilter::filter( const uno::Sequence beans::PropertyValue aDes aVbaProject.importVbaProject( *xVbaPrjStrg, gHelper ); } } -else -{ -writerfilter::doctok::WW8Stream::Pointer_t pDocStream = writerfilter::doctok::WW8DocumentFactory::createStream(m_xContext, xInputStream); -writerfilter::doctok::WW8Document::Pointer_t pDocument(writerfilter::doctok::WW8DocumentFactory::createDocument(pDocStream)); - -pDocument-resolve(*pStream); -} pStream.reset(); #ifdef DEBUG_IMPORT ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits