summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/wrtww8.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-07-03 10:35:48 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-07-03 12:58:16 +0200
commit132803f99818bffbdc260918ad7a304f228f2843 (patch)
tree2ad2132ea85ce9bd554ec0e7d650fbd33de9e53b /sw/source/filter/ww8/wrtww8.hxx
parent58ef52cf3258030860d34f05bc19e2b42d9503c6 (diff)
sw comments on frames: fix DOC handling
The export part didn't use HasFlysAt() to decide what to do with empty annotation marks. Regarding the import side, the only problem was that the start of the annotation range wasn't adjusted to cover the comment anchor, similar to what the UI and the UNO API already does. Change-Id: Ibcbaafa9f3f70de95a70b424aca31ebdc9df099d Reviewed-on: https://gerrit.libreoffice.org/75025 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/filter/ww8/wrtww8.hxx')
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 6a01f61ed3c0..1ee0c86581bf 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1230,8 +1230,11 @@ struct WW8_Annotation
OUString m_sInitials;
DateTime maDateTime;
WW8_CP m_nRangeStart, m_nRangeEnd;
+ bool m_bIgnoreEmpty = true;
WW8_Annotation(const SwPostItField* pPostIt, WW8_CP nRangeStart, WW8_CP nRangeEnd);
explicit WW8_Annotation(const SwRedlineData* pRedline);
+ /// An annotation has a range if start != end or the m_bIgnoreEmpty flag is cleared.
+ bool HasRange() const;
};
class WW8_WrPlcAnnotations : public WW8_WrPlcSubDoc // double Plc for Postits
@@ -1241,12 +1244,12 @@ private:
WW8_WrPlcAnnotations& operator=(WW8_WrPlcAnnotations const &) = delete;
std::set<const SwRedlineData*> maProcessedRedlines;
- std::map<const OUString, WW8_CP> m_aRangeStartPositions;
+ std::map<const OUString, std::pair<WW8_CP, bool>> m_aRangeStartPositions;
public:
WW8_WrPlcAnnotations() {}
virtual ~WW8_WrPlcAnnotations() override;
- void AddRangeStartPosition(const OUString& rName, WW8_CP nStartCp);
+ void AddRangeStartPosition(const OUString& rName, WW8_CP nStartCp, bool bIgnoreEmpty);
void Append( WW8_CP nCp, const SwPostItField* pPostIt );
void Append( WW8_CP nCp, const SwRedlineData* pRedLine );
bool IsNewRedlineComment( const SwRedlineData* pRedLine );