[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Sat Sep 24 13:14:43 UTC 2016
sw/source/filter/ww8/ww8par.cxx | 2 +-
sw/source/filter/ww8/ww8par.hxx | 12 ++++++++++--
sw/source/filter/ww8/ww8par5.cxx | 4 ++--
3 files changed, 13 insertions(+), 5 deletions(-)
New commits:
commit ad4026693a372fbc4037bd8d7ced839e0d0f545f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 24 14:11:25 2016 +0100
this is a (dubious?) compareToIgnoreAsciiCase not compare, so restore
Change-Id: I2c4c4d20f2f2c06310b926fb573ba41820022b43
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index f3f7df9..1d176f2 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1396,7 +1396,7 @@ void SwWW8ReferencedFltEndStack::SetAttrInDoc( const SwPosition& rTmpPos,
if ( pFltBookmark != nullptr && pFltBookmark->IsTOCBookmark() )
{
const OUString& rName = pFltBookmark->GetName();
- std::set<OUString>::const_iterator aResult = aReferencedTOCBookmarks.find(rName);
+ std::set< OUString, SwWW8::ltstr >::const_iterator aResult = aReferencedTOCBookmarks.find(rName);
if ( aResult == aReferencedTOCBookmarks.end() )
{
bInsertBookmarkIntoDoc = false;
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index c5f42b1..39c7df7 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -428,6 +428,14 @@ private:
namespace SwWW8
{
+ struct ltstr
+ {
+ bool operator()(const OUString &r1, const OUString &r2) const
+ {
+ return r1.compareToIgnoreAsciiCase(r2)<0;
+ }
+ };
+
struct ltnode
{
bool operator()(const SwTextNode *r1, const SwTextNode *r2) const
@@ -447,7 +455,7 @@ public:
// Keep track of referenced TOC bookmarks in order to suppress the import
// of unreferenced ones.
- std::set<OUString> aReferencedTOCBookmarks;
+ std::set<OUString, SwWW8::ltstr> aReferencedTOCBookmarks;
protected:
virtual void SetAttrInDoc( const SwPosition& rTmpPos,
SwFltStackEntry& rEntry ) override;
@@ -465,7 +473,7 @@ public:
//Keep track of variable names created with fields, and the bookmark
//mapped to their position, hopefully the same, but very possibly
//an additional pseudo bookmark
- std::map<OUString, OUString> aFieldVarNames;
+ std::map<OUString, OUString, SwWW8::ltstr> aFieldVarNames;
protected:
SwFltStackEntry *RefToVar(const SwField* pField,SwFltStackEntry& rEntry);
virtual void SetAttrInDoc(const SwPosition& rTmpPos,
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 82af4ab..aef81a9 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -1273,7 +1273,7 @@ SwFltStackEntry *SwWW8FltRefStack::RefToVar(const SwField* pField,
{
//Get the name of the ref field, and see if actually a variable
const OUString sName = pField->GetPar1();
- std::map<OUString, OUString>::const_iterator
+ std::map<OUString, OUString, SwWW8::ltstr>::const_iterator
aResult = aFieldVarNames.find(sName);
if (aResult != aFieldVarNames.end())
@@ -1297,7 +1297,7 @@ OUString SwWW8ImplReader::GetMappedBookmark(const OUString &rOrigName)
//See if there has been a variable set with this name, if so get
//the pseudo bookmark name that was set with it.
- std::map<OUString, OUString>::const_iterator aResult =
+ std::map<OUString, OUString, SwWW8::ltstr>::const_iterator aResult =
m_pReffingStck->aFieldVarNames.find(sName);
return (aResult == m_pReffingStck->aFieldVarNames.end())
More information about the Libreoffice-commits
mailing list