diff options
author | Jan Holesovsky <kendy@collabora.com> | 2017-09-12 13:28:32 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-09-13 08:42:38 +0200 |
commit | 9ead87264328beddddead1c7e878c2aee03e03af (patch) | |
tree | 2e5baaea051cda259c2babb3ee947c6306a1380e | |
parent | 8e0fb74dc01927b60d8b868548ef8fe1d7a80ce3 (diff) |
tdf#112191: Don't export bullets when only one paragraph is selected.
Change-Id: Ibea54f857e78a850ea05643743884ae2157dae57
Reviewed-on: https://gerrit.libreoffice.org/42202
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r-- | sw/inc/shellio.hxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ascii/ascatr.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/writer/writer.cxx | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index 1ebc33e4e0a8..92544413bdfa 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -370,7 +370,6 @@ class SW_DLLPUBLIC Writer protected: - SwPaM* pOrigPam; // Last Pam that has to be processed. const OUString* pOrigFileName; void ResetWriter(); @@ -390,6 +389,7 @@ protected: public: SwDoc* pDoc; + SwPaM* pOrigPam; // Last Pam that has to be processed. SwPaM* pCurPam; bool bWriteAll : 1; bool bShowProgress : 1; @@ -544,7 +544,7 @@ namespace SwReaderWriter } void GetRTFWriter( const OUString&, const OUString&, WriterRef& ); -void GetASCWriter( const OUString&, const OUString&, WriterRef& ); +SW_DLLPUBLIC void GetASCWriter(const OUString&, const OUString&, WriterRef&); void GetHTMLWriter( const OUString&, const OUString&, WriterRef& ); void GetXMLWriter( const OUString&, const OUString&, WriterRef& ); diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index 1a3f416ea91f..77b57e4f01dd 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -178,10 +178,12 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, SwContentNode& rNode ) if( bLastNd ) nEnd = rWrt.pCurPam->GetMark()->nContent.GetIndex(); + bool bIsOneParagraph = rWrt.pOrigPam->Start()->nNode == rWrt.pOrigPam->End()->nNode; + SwASC_AttrIter aAttrIter( static_cast<SwASCWriter&>(rWrt), rNd, nStrPos ); const SwNumRule* pNumRule = rNd.GetNumRule(); - if (pNumRule && !nStrPos && rWrt.bExportPargraphNumbering) + if (pNumRule && !nStrPos && rWrt.bExportPargraphNumbering && !bIsOneParagraph) { bool bIsOutlineNumRule = pNumRule == rNd.GetDoc()->GetOutlineNumRule(); diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 863a016a10bc..50cd3a3812c4 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -116,7 +116,7 @@ void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk) Writer::Writer() : m_pImpl(o3tl::make_unique<Writer_Impl>()) - , pOrigPam(nullptr), pOrigFileName(nullptr), pDoc(nullptr), pCurPam(nullptr) + , pOrigFileName(nullptr), pDoc(nullptr), pOrigPam(nullptr), pCurPam(nullptr) { bWriteAll = bShowProgress = bUCS2_WithStartChar = true; bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR = |