[Libreoffice-commits] core.git: editeng/qa editeng/source include/editeng include/svx sd/qa sd/source svx/source

2018-11-16 Thread Libreoffice Gerrit user
 dev/null |binary
 editeng/qa/unit/core-test.cxx|  144 ---
 editeng/source/editeng/editeng.cxx   |5 -
 editeng/source/editeng/impedit.hxx   |9 --
 editeng/source/editeng/impedit2.cxx  |   10 --
 editeng/source/editeng/impedit3.cxx  |   12 --
 editeng/source/outliner/outliner.cxx |5 -
 include/editeng/editeng.hxx  |3 
 include/editeng/outliner.hxx |3 
 include/svx/svdmodel.hxx |4 
 sd/qa/unit/import-tests.cxx  |   32 ---
 sd/source/ui/docshell/docshel4.cxx   |   16 ---
 sd/source/ui/view/Outliner.cxx   |1 
 svx/source/svdraw/svdetc.cxx |1 
 svx/source/svdraw/svdmodel.cxx   |   22 -
 15 files changed, 7 insertions(+), 260 deletions(-)

New commits:
commit cb1d625aee558c9aa3c0bf3ea44b65f37dca48a8
Author: Tamás Zolnai 
AuthorDate: Fri Nov 16 17:06:02 2018 +0100
Commit: Tamás Zolnai 
CommitDate: Fri Nov 16 18:22:04 2018 +0100

Revert "tdf#115639: Align right/center with trailing spaces the same"

.. as MS PowerPoint"
This reverts commit 1da3a3cb74a415a76fa547ef0c8f61780e260e7f.
It was a bad solution for the problem.

Change-Id: I6f6fecb7c74a884fbfb04c6e7204eb8bf347a272
Reviewed-on: https://gerrit.libreoffice.org/63473
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai 

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index ad56407d4dca..6d600b462f39 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -33,7 +33,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
@@ -100,9 +99,6 @@ public:
 
 void testTransliterate();
 
-/// Test HoriAlignIgnoreTrailingWhitespace compatibility flag
-void testHoriAlignIgnoreTrailingWhitespace();
-
 DECL_STATIC_LINK( Test, CalcFieldValueHdl, EditFieldInfo*, void );
 
 CPPUNIT_TEST_SUITE(Test);
@@ -125,7 +121,6 @@ public:
 CPPUNIT_TEST(testSectionAttributes);
 CPPUNIT_TEST(testLargeParaCopyPaste);
 CPPUNIT_TEST(testTransliterate);
-CPPUNIT_TEST(testHoriAlignIgnoreTrailingWhitespace);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1843,145 +1838,6 @@ void Test::testTransliterate()
 CPPUNIT_ASSERT_EQUAL(OUString("One (Two) Three"), aEditEngine.GetText());
 }
 
-void Test::testHoriAlignIgnoreTrailingWhitespace()
-{
-// Create EditEngine's instance
-EditEngine aEditEngine(mpItemPool);
-
-// Get EditDoc for current EditEngine's instance
-EditDoc  = aEditEngine.GetEditDoc();
-
-// Initially no text should be there
-CPPUNIT_ASSERT_EQUAL(sal_uLong(0), rDoc.GetTextLen());
-CPPUNIT_ASSERT_EQUAL(OUString(), rDoc.GetParaAsString(sal_Int32(0)));
-
-// Set initial text
-OUString aText = "Some text";
-sal_Int32 aTextLen = aText.getLength();
-aEditEngine.SetText(aText);
-
-// Assert changes - text insertion
-CPPUNIT_ASSERT_EQUAL(static_cast(aTextLen), rDoc.GetTextLen());
-CPPUNIT_ASSERT_EQUAL(aText, 
rDoc.GetParaAsString(static_cast(0)));
-
-// First test case: center alignment with compatibility option enabled
-{
-aEditEngine.SetHoriAlignIgnoreTrailingWhitespace(true);
-std::unique_ptr pSet(new 
SfxItemSet(aEditEngine.GetEmptyItemSet()));
-pSet->Put(SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ));
-CPPUNIT_ASSERT_EQUAL(static_cast(1), pSet->Count());
-
-// Select all paragraphs and apply changes
-ESelection aSelection(0, 0, 0, aTextLen);
-aEditEngine.QuickSetAttribs(*pSet, aSelection);
-
-// Use a one line paragraph
-aEditEngine.SetPaperSize(Size(1, 6000));
-CPPUNIT_ASSERT_EQUAL(static_cast(1), 
aEditEngine.GetLineCount(0));
-
-// Check horizontal position
-ParaPortion* pParaPortion = aEditEngine.GetParaPortions()[0];
-EditLine* pLine = >GetLines()[0];
-CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(4527), 
pLine->GetStartPosX(), 100);
-}
-
-// Second test case: center alignment with compatibility option disabled
-{
-aEditEngine.SetHoriAlignIgnoreTrailingWhitespace(false);
-std::unique_ptr pSet(new 
SfxItemSet(aEditEngine.GetEmptyItemSet()));
-pSet->Put(SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ));
-CPPUNIT_ASSERT_EQUAL(static_cast(1), pSet->Count());
-
-// Select all paragraphs and apply changes
-ESelection aSelection(0, 0, 0, aTextLen);
-aEditEngine.QuickSetAttribs(*pSet, aSelection);
-
-// Use a one line paragraph
-aEditEngine.SetPaperSize(Size(1, 6000));
-CPPUNIT_ASSERT_EQUAL(static_cast(1), 
aEditEngine.GetLineCount(0));
-
-// Check horizontal position
-ParaPortion* pParaPortion = aEditEngine.GetParaPortions()[0];
-EditLine* pLine = >GetLines()[0];
-CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(4407), 
pLine->GetStartPosX(), 100);
-}
-
-// Third test case: right alignment with 

[Libreoffice-commits] core.git: editeng/qa editeng/source include/editeng

2018-02-19 Thread Tamás Zolnai
 editeng/qa/unit/core-test.cxx   |   33 +
 editeng/source/editeng/editeng.cxx  |4 ++--
 editeng/source/editeng/impedit.hxx  |2 +-
 editeng/source/editeng/impedit2.cxx |4 ++--
 editeng/source/editeng/impedit3.cxx |4 ++--
 include/editeng/editeng.hxx |2 +-
 6 files changed, 41 insertions(+), 8 deletions(-)

New commits:
commit f0485ba2d90aae0312f5775588f22789016165d2
Author: Tamás Zolnai 
Date:   Mon Feb 19 22:23:32 2018 +0100

tdf#115639: Handle alignment correctly for multiple paragraph case

I used the wrong calculator method to get the line width.
This commit also fixes the crashes found by crashtest.

Change-Id: I25392f86af912ee54c07b14480d82282210ac346
Reviewed-on: https://gerrit.libreoffice.org/49994
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 195fae1bcb4a..5907e5c0100f 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -1957,6 +1957,39 @@ void Test::testHoriAlignIgnoreTrailingWhitespace()
 EditLine* pLine = >GetLines()[0];
 CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(8815), 
pLine->GetStartPosX(), 10);
 }
+
+// Test multiple paragraph case
+{
+// Set initial text
+aText = "Some text\nMore Text   ";
+aTextLen = aText.getLength();
+aEditEngine.SetText(aText);
+
+// Assert changes - text insertion
+CPPUNIT_ASSERT_EQUAL(static_cast(aTextLen - 1), 
rDoc.GetTextLen());
+CPPUNIT_ASSERT_EQUAL(OUString("Some text"), 
rDoc.GetParaAsString(static_cast(0)));
+CPPUNIT_ASSERT_EQUAL(OUString("More Text   "), 
rDoc.GetParaAsString(static_cast(1)));
+
+aEditEngine.SetHoriAlignIgnoreTrailingWhitespace(true);
+std::unique_ptr pSet(new 
SfxItemSet(aEditEngine.GetEmptyItemSet()));
+pSet->Put(SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ));
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pSet->Count());
+
+// Select all paragraphs and apply changes
+ESelection aSelection(0, 0, 0, aTextLen);
+aEditEngine.QuickSetAttribs(*pSet, aSelection);
+
+// Get one line paragraphs
+aEditEngine.SetPaperSize(Size(1, 6000));
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
aEditEngine.GetLineCount(0));
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
aEditEngine.GetLineCount(1));
+
+// Check horizontal position
+ParaPortion* pParaPortion = aEditEngine.GetParaPortions()[0];
+CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(4527), 
pParaPortion->GetLines()[0].GetStartPosX(), 50);
+pParaPortion = aEditEngine.GetParaPortions()[1];
+CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(8815), 
pParaPortion->GetLines()[0].GetStartPosX(), 50);
+}
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 1b9494655818..a822a23406ef 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1433,13 +1433,13 @@ sal_uInt32 EditEngine::GetTextHeightNTP() const
 return pImpEditEngine->GetTextHeightNTP();
 }
 
-sal_uInt32 EditEngine::CalcTextWidth(bool bIgnoreTrailingWhiteSpaces)
+sal_uInt32 EditEngine::CalcTextWidth()
 {
 
 if ( !pImpEditEngine->IsFormatted() )
 pImpEditEngine->FormatDoc();
 
-sal_uInt32 nWidth = !IsVertical() ? pImpEditEngine->CalcTextWidth( true, 
bIgnoreTrailingWhiteSpaces ) : pImpEditEngine->GetTextHeight();
+sal_uInt32 nWidth = !IsVertical() ? pImpEditEngine->CalcTextWidth( true ) 
: pImpEditEngine->GetTextHeight();
  return nWidth;
 }
 
diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index fb8a2a542aec..864ba04e31ba 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -833,7 +833,7 @@ public:
 sal_uInt32  CalcTextHeight( sal_uInt32* pHeightNTP );
 sal_uInt32  GetTextHeight() const;
 sal_uInt32  GetTextHeightNTP() const;
-sal_uInt32  CalcTextWidth( bool bIgnoreExtraSpace, bool 
bIgnoreTrailingWhiteSpaces = false );
+sal_uInt32  CalcTextWidth( bool bIgnoreExtraSpace );
 sal_uInt32  CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, 
bool bIgnoreExtraSpace, bool bIgnoreTrailingWhiteSpaces = false );
 sal_Int32   GetLineCount( sal_Int32 nParagraph ) const;
 sal_Int32   GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const;
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index 651ac12d1de5..695914548927 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3090,7 +3090,7 @@ sal_uInt32 ImpEditEngine::GetTextHeight() const
 return nCurTextHeight;
 }
 
-sal_uInt32 ImpEditEngine::CalcTextWidth( bool 

[Libreoffice-commits] core.git: editeng/qa editeng/source include/editeng include/svx sd/qa sd/source svx/source

2018-02-16 Thread Tamás Zolnai
 editeng/qa/unit/core-test.cxx|  111 +++
 editeng/source/editeng/editeng.cxx   |   14 +++-
 editeng/source/editeng/impedit.hxx   |9 ++
 editeng/source/editeng/impedit2.cxx  |   14 ++--
 editeng/source/editeng/impedit3.cxx  |   12 +++
 editeng/source/outliner/outliner.cxx |   10 +++
 include/editeng/editeng.hxx  |6 +
 include/editeng/outliner.hxx |4 +
 include/svx/svdmodel.hxx |4 +
 sd/qa/unit/data/odp/tdf115639.odp|binary
 sd/qa/unit/data/ppt/tdf115639.ppt|binary
 sd/qa/unit/data/pptx/tdf115639.pptx  |binary
 sd/qa/unit/import-tests.cxx  |   33 ++
 sd/source/ui/docshell/docshel4.cxx   |   16 +
 sd/source/ui/view/Outliner.cxx   |1 
 svx/source/svdraw/svdetc.cxx |1 
 svx/source/svdraw/svdmodel.cxx   |   22 ++
 17 files changed, 245 insertions(+), 12 deletions(-)

New commits:
commit 1da3a3cb74a415a76fa547ef0c8f61780e260e7f
Author: Tamás Zolnai 
Date:   Sat Feb 17 06:35:29 2018 +0100

tdf#115639: Align right/center with trailing spaces the same as MS 
PowerPoint

* Add HoriAlignIgnoreTrailingWhitespace compatibility option.
** For MSO file formats it is set to true
** For ODP format it's set to false by default
** The flag is saved to ODP format as user data if the document
comes from an MSO format.

Change-Id: Ie22233d33a25e605de46120bfc2195038dffd63c
Reviewed-on: https://gerrit.libreoffice.org/49889
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 2e122cc59c1d..195fae1bcb4a 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -97,6 +98,9 @@ public:
 
 void testTransliterate();
 
+/// Test HoriAlignIgnoreTrailingWhitespace compatibility flag
+void testHoriAlignIgnoreTrailingWhitespace();
+
 DECL_STATIC_LINK( Test, CalcFieldValueHdl, EditFieldInfo*, void );
 
 CPPUNIT_TEST_SUITE(Test);
@@ -117,6 +121,7 @@ public:
 CPPUNIT_TEST(testSectionAttributes);
 CPPUNIT_TEST(testLargeParaCopyPaste);
 CPPUNIT_TEST(testTransliterate);
+CPPUNIT_TEST(testHoriAlignIgnoreTrailingWhitespace);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1848,6 +1853,112 @@ void Test::testTransliterate()
 CPPUNIT_ASSERT_EQUAL(aExpected, aEditEngine.GetText());
 }
 
+void Test::testHoriAlignIgnoreTrailingWhitespace()
+{
+// Create EditEngine's instance
+EditEngine aEditEngine(mpItemPool);
+
+// Get EditDoc for current EditEngine's instance
+EditDoc  = aEditEngine.GetEditDoc();
+
+// Initially no text should be there
+CPPUNIT_ASSERT_EQUAL(sal_uLong(0), rDoc.GetTextLen());
+CPPUNIT_ASSERT_EQUAL(OUString(), rDoc.GetParaAsString(sal_Int32(0)));
+
+// Set initial text
+OUString aText = "Some text";
+sal_Int32 aTextLen = aText.getLength();
+aEditEngine.SetText(aText);
+
+// Assert changes - text insertion
+CPPUNIT_ASSERT_EQUAL(static_cast(aTextLen), rDoc.GetTextLen());
+CPPUNIT_ASSERT_EQUAL(aText, 
rDoc.GetParaAsString(static_cast(0)));
+
+// First test case: center alignment with compatibility option enabled
+{
+aEditEngine.SetHoriAlignIgnoreTrailingWhitespace(true);
+std::unique_ptr pSet(new 
SfxItemSet(aEditEngine.GetEmptyItemSet()));
+pSet->Put(SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ));
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pSet->Count());
+
+// Select all paragraphs and apply changes
+ESelection aSelection(0, 0, 0, aTextLen);
+aEditEngine.QuickSetAttribs(*pSet, aSelection);
+
+// Use a one line paragraph
+aEditEngine.SetPaperSize(Size(1, 6000));
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
aEditEngine.GetLineCount(0));
+
+// Check horizontal position
+ParaPortion* pParaPortion = aEditEngine.GetParaPortions()[0];
+EditLine* pLine = >GetLines()[0];
+CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(4527), 
pLine->GetStartPosX(), 10);
+}
+
+// Second test case: center alignment with compatibility option disabled
+{
+aEditEngine.SetHoriAlignIgnoreTrailingWhitespace(false);
+std::unique_ptr pSet(new 
SfxItemSet(aEditEngine.GetEmptyItemSet()));
+pSet->Put(SvxAdjustItem( SvxAdjust::Center, EE_PARA_JUST ));
+CPPUNIT_ASSERT_EQUAL(static_cast(1), pSet->Count());
+
+// Select all paragraphs and apply changes
+ESelection aSelection(0, 0, 0, aTextLen);
+aEditEngine.QuickSetAttribs(*pSet, aSelection);
+
+// Use a one line paragraph
+aEditEngine.SetPaperSize(Size(1, 6000));
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
aEditEngine.GetLineCount(0));
+
+// Check horizontal position
+ParaPortion* 

[Libreoffice-commits] core.git: editeng/qa editeng/source include/editeng sw/inc sw/source

2017-08-23 Thread Eike Rathke
 editeng/qa/unit/core-test.cxx   |   18 --
 editeng/source/editeng/editeng.cxx  |3 +--
 editeng/source/editeng/impedit.hxx  |6 ++
 editeng/source/editeng/impedit2.cxx |5 +++--
 editeng/source/misc/svxacorr.cxx|   16 +++-
 include/editeng/svxacorr.hxx|   18 ++
 sw/inc/editsh.hxx   |   12 
 sw/source/core/edit/autofmt.cxx |5 +++--
 sw/source/core/edit/edws.cxx|7 ---
 sw/source/uibase/docvw/edtwin.cxx   |5 ++---
 10 files changed, 60 insertions(+), 35 deletions(-)

New commits:
commit 06d14411a447cd798d1f0678a3c5e06f5278a1cb
Author: Eike Rathke 
Date:   Wed Aug 23 17:44:16 2017 +0200

Related: tdf#108795 a shared SvxAutoCorrect instance can not be stateful

An SvxAutoCorrect instance is shared via 
SvxAutoCorrCfg::Get().GetAutoCorrect().
Since commit 284eb106767d094fc5c547efd6c11cc390e3538a and following the
SvxAutoCorrect::bRunNext/HasRunNext() introduced a state whether a 
previously
inserted NO-BREAK SPACE should be removed again, depending on the next
character input. That does not work, for example, if
SvxAutoCorrect::DoAutoCorrect() is called from two different EditEngine
instances, like it is the case in the Calc input line and cell which are
synchronized; or any other two or more instances for that matter. The caller
has to pass and remember a flag that is maintained by SvxAutoCorrect.

Change-Id: I79a26d2ba44cc40771979a78b686c89f0c80b412
Reviewed-on: https://gerrit.libreoffice.org/41475
Reviewed-by: Eike Rathke 
Tested-by: Jenkins 

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index f806a056ff26..6345473d4257 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -353,9 +353,10 @@ void Test::testAutocorrect()
 OUString sInput("TEst-TEst");
 sal_Unicode const cNextChar(' ');
 OUString const sExpected("Test-Test ");
+bool bNbspRunNext = false;
 
 TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US);
-aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), 
cNextChar, true);
+aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), 
cNextChar, true, bNbspRunNext);
 
 CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", sExpected, 
aFoo.getResult());
 }
@@ -364,9 +365,10 @@ void Test::testAutocorrect()
 OUString sInput("TEst/TEst");
 sal_Unicode const cNextChar(' ');
 OUString const sExpected("Test/Test ");
+bool bNbspRunNext = false;
 
 TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US);
-aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), 
cNextChar, true);
+aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), 
cNextChar, true, bNbspRunNext);
 
 CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", sExpected, 
aFoo.getResult());
 }
@@ -376,9 +378,10 @@ void Test::testAutocorrect()
 OUString sInput("*foo");
 sal_Unicode const cNextChar('*');
 OUString const sExpected("foo");
+bool bNbspRunNext = false;
 
 TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US);
-aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), 
cNextChar, true);
+aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), 
cNextChar, true, bNbspRunNext);
 
 CPPUNIT_ASSERT_EQUAL(sExpected, aFoo.getResult());
 }
@@ -387,9 +390,10 @@ void Test::testAutocorrect()
 OUString sInput("Test. test");
 sal_Unicode const cNextChar(' ');
 OUString const sExpected("Test. Test ");
+bool bNbspRunNext = false;
 
 TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US);
-aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), 
cNextChar, true);
+aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), 
cNextChar, true, bNbspRunNext);
 
 CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", sExpected, 
aFoo.getResult());
 }
@@ -399,9 +403,10 @@ void Test::testAutocorrect()
 OUString sInput("Test. \x01 test");
 sal_Unicode const cNextChar(' ');
 OUString const sExpected("Test. \x01 test ");
+bool bNbspRunNext = false;
 
 TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US);
-aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), 
cNextChar, true);
+aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), 
cNextChar, true, bNbspRunNext);
 
 CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", sExpected, 
aFoo.getResult());
 }
@@ -412,10 +417,11 @@ void Test::testAutocorrect()
 sal_Unicode const cNextChar('"');
 const sal_Unicode EXPECTED[] = { 'T', 0x01, 0x0201d };
 OUString sExpected(EXPECTED, SAL_N_ELEMENTS(EXPECTED));
+bool bNbspRunNext = false;
 
 TestAutoCorrDoc 

[Libreoffice-commits] core.git: editeng/qa editeng/source include/editeng include/svl include/svx sc/source sd/source sfx2/source svl/source svx/source sw/source

2017-08-17 Thread Varun Dhall
 editeng/qa/unit/core-test.cxx  |2 -
 editeng/source/editeng/editdoc.cxx |6 ++--
 editeng/source/editeng/editdoc.hxx |2 -
 editeng/source/editeng/editeng.cxx |4 +--
 include/editeng/editeng.hxx|2 -
 include/svl/itempool.hxx   |7 -
 include/svl/macitem.hxx|2 -
 include/svx/svdpool.hxx|2 -
 include/svx/xpool.hxx  |2 -
 sc/source/core/data/docpool.cxx|2 -
 sc/source/core/data/poolhelp.cxx   |1 
 sd/source/ui/annotations/annotationmanager.cxx |2 -
 sfx2/source/explorer/nochaos.cxx   |2 -
 svl/source/inc/poolio.hxx  |   32 -
 svl/source/items/itempool.cxx  |   21 
 svl/source/items/macitem.cxx   |   14 --
 svx/source/svdraw/svdattr.cxx  |5 +--
 svx/source/svdraw/svdmodel.cxx |4 +--
 svx/source/xoutdev/xpool.cxx   |4 +--
 sw/source/core/attr/swatrset.cxx   |2 -
 20 files changed, 21 insertions(+), 97 deletions(-)

New commits:
commit 006a7b50546c57e260245d4630de565705f2fc38
Author: Varun Dhall 
Date:   Thu Aug 17 01:57:59 2017 +0530

Removing unused serialisation code

Change-Id: I86911c77f0831d448ff803afae2a74ec55ad4dd8
Reviewed-on: https://gerrit.libreoffice.org/41233
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index ceea79b810d4..f806a056ff26 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -118,7 +118,7 @@ void Test::setUp()
 {
 test::BootstrapFixture::setUp();
 
-mpItemPool = new EditEngineItemPool(true);
+mpItemPool = new EditEngineItemPool();
 
 SfxApplication::GetOrCreate();
 }
diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index 36c101fa8146..3b974ecdb0ef 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1927,7 +1927,7 @@ void ItemList::Insert( const SfxPoolItem* pItem )
 
 EditDoc::EditDoc( SfxItemPool* pPool ) :
 nLastCache(0),
-pItemPool(pPool ? pPool : new EditEngineItemPool(false)),
+pItemPool(pPool ? pPool : new EditEngineItemPool()),
 nDefTab(DEFTAB),
 bIsVertical(false),
 bIsTopToBottomVert(false),
@@ -3021,9 +3021,9 @@ void CharAttribList::dumpAsXml(struct _xmlTextWriter* 
pWriter) const
 xmlTextWriterEndElement(pWriter);
 }
 
-EditEngineItemPool::EditEngineItemPool( bool bPersistenRefCounts )
+EditEngineItemPool::EditEngineItemPool()
 : SfxItemPool( "EditEngineItemPool", EE_ITEMS_START, EE_ITEMS_END,
-aItemInfos, nullptr, bPersistenRefCounts )
+aItemInfos, nullptr )
 {
 m_xDefItems = EditDLL::Get().GetGlobalData()->GetDefItems();
 SetDefaults(m_xDefItems->getDefaults());
diff --git a/editeng/source/editeng/editdoc.hxx 
b/editeng/source/editeng/editdoc.hxx
index 40cbcd1ea720..5665b2ef3379 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -836,7 +836,7 @@ class EditEngineItemPool : public SfxItemPool
 private:
 std::shared_ptr m_xDefItems;
 public:
-EditEngineItemPool(bool bPersistenRefCounts);
+EditEngineItemPool();
 protected:
 virtual ~EditEngineItemPool() override;
 };
diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 402f1abd88a7..f3a1abd2df5e 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2570,9 +2570,9 @@ void EditEngine::FieldClicked( const SvxFieldItem&, 
sal_Int32, sal_Int32 )
 
 // == Static Methods ===
 
-SfxItemPool* EditEngine::CreatePool( bool bPersistentRefCounts )
+SfxItemPool* EditEngine::CreatePool()
 {
-SfxItemPool* pPool = new EditEngineItemPool( bPersistentRefCounts );
+SfxItemPool* pPool = new EditEngineItemPool();
 return pPool;
 }
 
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index 55fe8dc174af..e7b33cfd5345 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -506,7 +506,7 @@ public:
 
 virtual tools::Rectangle GetBulletArea( sal_Int32 nPara );
 
-static SfxItemPool* CreatePool( bool bLoadRefCounts = true );
+static SfxItemPool* CreatePool();
 static SfxItemPool& GetGlobalItemPool();
 static bool DoesKeyChangeText( const KeyEvent& rKeyEvent );
 static bool DoesKeyMoveCursor( const KeyEvent& rKeyEvent );
diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx
index f2940ad49732..f8d5ca32f0af 100644
--- a/include/svl/itempool.hxx
+++ b/include/svl/itempool.hxx
@@ -91,8 

[Libreoffice-commits] core.git: editeng/qa editeng/source include/editeng sw/source

2014-02-07 Thread Michael Stahl
 editeng/qa/unit/core-test.cxx   |4 ++--
 editeng/source/editeng/edtspell.cxx |8 
 editeng/source/editeng/edtspell.hxx |2 +-
 editeng/source/misc/svxacorr.cxx|6 +++---
 include/editeng/svxacorr.hxx|2 +-
 sw/source/core/edit/acorrect.cxx|9 +
 sw/source/core/inc/acorrect.hxx |2 +-
 7 files changed, 17 insertions(+), 16 deletions(-)

New commits:
commit ebd0d0056d89a6a69d2cb75e28758132cb5c236b
Author: Michael Stahl mst...@redhat.com
Date:   Sat Feb 8 00:23:10 2014 +0100

fdo#74363: fix auto correct of initial capitals on start of first para

The GetPrevPara() method apparently has to return 0 when there is no
previous paragraph.

(regression from ac85b6cff11d193f5f71d11b1f3cc1c474653f59)

Change-Id: I09a3e1d3a3adb33562e4e03c0755447047cbd433

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index bae28f4..2f7b7d8 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -267,10 +267,10 @@ private:
 //fprintf(stderr, TestAutoCorrDoc::SetINetAttr\n);
 return true;
 }
-virtual OUString GetPrevPara( sal_Bool )
+virtual OUString const* GetPrevPara(bool)
 {
 //fprintf(stderr, TestAutoCorrDoc::GetPrevPara\n);
-return OUString();
+return 0;
 }
 virtual bool ChgAutoCorrWord( sal_Int32 rSttPos,
 sal_Int32 nEndPos, SvxAutoCorrect rACorrect,
diff --git a/editeng/source/editeng/edtspell.cxx 
b/editeng/source/editeng/edtspell.cxx
index 160a77e..1ee9734 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -696,7 +696,7 @@ sal_Bool EdtAutoCorrDoc::SetINetAttr(sal_Int32 nStt, 
sal_Int32 nEnd,
 return true;
 }
 
-OUString EdtAutoCorrDoc::GetPrevPara( sal_Bool )
+OUString const* EdtAutoCorrDoc::GetPrevPara(bool const)
 {
 // Return previous paragraph, so that it can be determined,
 // whether the current word is at the beginning of a sentence.
@@ -719,16 +719,16 @@ OUString EdtAutoCorrDoc::GetPrevPara( sal_Bool )
 bBullet = true;
 }
 if ( bBullet )
-return OUString();
+return 0;
 
 for ( sal_Int32 n = nPos; n; )
 {
 n--;
 ContentNode* pNode = rNodes[n];
 if ( pNode-Len() )
-return pNode-GetString();
+return  pNode-GetString();
 }
-return OUString();
+return 0;
 
 }
 
diff --git a/editeng/source/editeng/edtspell.hxx 
b/editeng/source/editeng/edtspell.hxx
index 2af8d1f..75e1ef0 100644
--- a/editeng/source/editeng/edtspell.hxx
+++ b/editeng/source/editeng/edtspell.hxx
@@ -147,7 +147,7 @@ public:
 virtual sal_BoolSetAttr( sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 
nSlotId, SfxPoolItem );
 virtual sal_BoolSetINetAttr( sal_Int32 nStt, sal_Int32 nEnd, const 
OUString rURL );
 
-virtual OUStringGetPrevPara( sal_Bool bAtNormalPos );
+virtual OUString const* GetPrevPara(bool bAtNormalPos) SAL_OVERRIDE;
 
 virtual boolChgAutoCorrWord( sal_Int32 rSttPos, sal_Int32 nEndPos,
   SvxAutoCorrect rACorrect, OUString* pPara );
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 651b380..fcb91dd 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -865,8 +865,8 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc 
rDoc,
 {
 // Check out the previous paragraph, if it exists.
 // If so, then check to paragraph separator at the end.
-OUString aPrevPara = rDoc.GetPrevPara( bNormalPos );
-if( !aPrevPara.isEmpty() )
+OUString const*const pPrevPara = rDoc.GetPrevPara(bNormalPos);
+if (!pPrevPara)
 {
 // valid separator - replace
 OUString sChar( *pWordStt );
@@ -875,7 +875,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc 
rDoc,
 rDoc.ReplaceRange( pWordStt - pStart, 1, sChar );
 }
 
-aText = aPrevPara;
+aText = *pPrevPara;
 bAtStart = sal_False;
 pStart = aText.getStr();
 pStr = pStart + aText.getLength();
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index ce43b62..97ca2f4 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -101,7 +101,7 @@ public:
 //  TRUE: before the normal insertion position (TRUE)
 //  FALSE: in which the corrected word was inserted.
 // (Does not to have to be the same paragraph )
-virtual OUString GetPrevPara( sal_Bool bAtNormalPos ) = 0;
+virtual OUString const* GetPrevPara(bool bAtNormalPos) = 0;
 
 virtual bool ChgAutoCorrWord( sal_Int32 rSttPos, sal_Int32 nEndPos,
   SvxAutoCorrect rACorrect,
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 33472cd..4d6c10e 100644
--- 

[Libreoffice-commits] core.git: editeng/qa editeng/source include/editeng sw/source

2013-09-21 Thread Eike Rathke
 editeng/qa/unit/core-test.cxx   |3 
 editeng/source/editeng/edtspell.cxx |5 -
 editeng/source/misc/svxacorr.cxx|  158 +---
 include/editeng/svxacorr.hxx|   12 +-
 sw/source/core/edit/acorrect.cxx|5 -
 5 files changed, 107 insertions(+), 76 deletions(-)

New commits:
commit a641bbff59cdd55cfc9757e6a43e732a3c8867be
Author: Eike Rathke er...@redhat.com
Date:   Sat Sep 21 15:20:49 2013 +0200

map autocorrection files with LanguageTag key

... as several tags (i.e. renamed) may map to the same LangID.

Change-Id: I8202b18ea0dc8034522017be59bb104b3d06c0f4

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 57c62c3..d0437f4 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -281,8 +281,9 @@ private:
 if (m_rText.isEmpty())
 return false;
 
+LanguageTag aLanguageTag( m_eLang);
 const SvxAutocorrWord* pFnd = rACorrect.SearchWordsInList(
-m_rText, rSttPos, nEndPos, *this, m_eLang);
+m_rText, rSttPos, nEndPos, *this, aLanguageTag);
 if (pFnd  pFnd-IsTextOnly())
 {
 m_rText = m_rText.replaceAt(rSttPos, nEndPos, pFnd-GetLong());
diff --git a/editeng/source/editeng/edtspell.cxx 
b/editeng/source/editeng/edtspell.cxx
index 6787981..f9eb356 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -741,8 +741,9 @@ bool EdtAutoCorrDoc::ChgAutoCorrWord( sal_Int32 rSttPos,
 if( aShort.isEmpty() )
 return bRet;
 
-LanguageType eLang = mpEditEngine-GetLanguage( EditPaM( pCurNode, 
rSttPos+1 ) );
-const SvxAutocorrWord* pFnd = 
rACorrect.SearchWordsInList(pCurNode-GetString(), rSttPos, nEndPos, *this, 
eLang);
+LanguageTag aLanguageTag( mpEditEngine-GetLanguage( EditPaM( pCurNode, 
rSttPos+1 ) ));
+const SvxAutocorrWord* pFnd = rACorrect.SearchWordsInList(
+pCurNode-GetString(), rSttPos, nEndPos, *this, aLanguageTag);
 if( pFnd  pFnd-IsTextOnly() )
 {
 // then replace
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 14d3de7..1c65aea 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -223,7 +223,7 @@ static CollatorWrapper GetCollatorWrapper()
 return aCollWrp;
 }
 
-static void lcl_ClearTable(boost::ptr_mapLanguageType, 
SvxAutoCorrectLanguageLists rLangTable)
+static void lcl_ClearTable(boost::ptr_mapLanguageTag, 
SvxAutoCorrectLanguageLists rLangTable)
 {
 rLangTable.clear();
 }
@@ -282,7 +282,7 @@ SvxAutoCorrect::SvxAutoCorrect( const OUString 
rShareAutocorrFile,
 const OUString rUserAutocorrFile )
 : sShareAutoCorrFile( rShareAutocorrFile ),
 sUserAutoCorrFile( rUserAutocorrFile ),
-pLangTable( new boost::ptr_mapLanguageType, SvxAutoCorrectLanguageLists 
),
+pLangTable( new boost::ptr_mapLanguageTag, SvxAutoCorrectLanguageLists ),
 pCharClass( 0 ), bRunNext( false ),
 cStartDQuote( 0 ), cEndDQuote( 0 ), cStartSQuote( 0 ), cEndSQuote( 0 )
 {
@@ -298,7 +298,7 @@ SvxAutoCorrect::SvxAutoCorrect( const SvxAutoCorrect rCpy )
 
 aSwFlags( rCpy.aSwFlags ),
 
-pLangTable( new boost::ptr_mapLanguageType, SvxAutoCorrectLanguageLists 
),
+pLangTable( new boost::ptr_mapLanguageTag, SvxAutoCorrectLanguageLists ),
 pCharClass( 0 ), bRunNext( false ),
 
 nFlags( rCpy.nFlags  ~(ChgWordLstLoad|CplSttLstLoad|WrdSttLstLoad)),
@@ -319,7 +319,7 @@ SvxAutoCorrect::~SvxAutoCorrect()
 void SvxAutoCorrect::_GetCharClass( LanguageType eLang )
 {
 delete pCharClass;
-pCharClass = new CharClass( LanguageTag( eLang ));
+pCharClass = new CharClass( LanguageTag( eLang));
 eCharClassLang = eLang;
 }
 
@@ -1441,14 +1441,15 @@ SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc rDoc, 
const OUString rTxt,
 SvxAutoCorrectLanguageLists SvxAutoCorrect::_GetLanguageList(
 LanguageType eLang )
 {
-if(pLangTable-find(eLang) == pLangTable-end())
-CreateLanguageFile(eLang, sal_True);
-return *(pLangTable-find(eLang)-second);
+LanguageTag aLanguageTag( eLang);
+if(pLangTable-find(aLanguageTag) == pLangTable-end())
+CreateLanguageFile(aLanguageTag, sal_True);
+return *(pLangTable-find(aLanguageTag)-second);
 }
 
 void SvxAutoCorrect::SaveCplSttExceptList( LanguageType eLang )
 {
-boost::ptr_mapLanguageType, SvxAutoCorrectLanguageLists::iterator 
nTmpVal = pLangTable-find(eLang);
+boost::ptr_mapLanguageTag, SvxAutoCorrectLanguageLists::iterator nTmpVal 
= pLangTable-find(LanguageTag(eLang));
 if(nTmpVal != pLangTable-end()  nTmpVal-second)
 nTmpVal-second-SaveCplSttExceptList();
 #ifdef DBG_UTIL
@@ -1461,7 +1462,7 @@ void SvxAutoCorrect::SaveCplSttExceptList( LanguageType 
eLang )
 
 void SvxAutoCorrect::SaveWrdSttExceptList(LanguageType eLang)
 {
-

[Libreoffice-commits] core.git: editeng/qa editeng/source include/editeng sw/inc sw/source

2013-07-30 Thread Matteo Casalin
 editeng/qa/unit/core-test.cxx   |2 -
 editeng/source/editeng/edtspell.cxx |2 -
 editeng/source/editeng/edtspell.hxx |2 -
 include/editeng/svxacorr.hxx|2 -
 sw/inc/crsrsh.hxx   |2 -
 sw/inc/doc.hxx  |2 -
 sw/inc/editsh.hxx   |2 -
 sw/inc/fmtinfmt.hxx |   29 +--
 sw/source/core/access/acchyperlink.cxx  |8 ++---
 sw/source/core/bastyp/init.cxx  |2 -
 sw/source/core/crsr/crstrvl.cxx |4 +-
 sw/source/core/doc/doc.cxx  |4 +-
 sw/source/core/doc/docfmt.cxx   |4 +-
 sw/source/core/doc/docglbl.cxx  |2 -
 sw/source/core/edit/acorrect.cxx|4 +-
 sw/source/core/edit/editsh.cxx  |   10 +++---
 sw/source/core/inc/acorrect.hxx |2 -
 sw/source/core/txtnode/fmtatr2.cxx  |   42 
 sw/source/core/txtnode/txtatr2.cxx  |2 -
 sw/source/filter/html/htmlatr.cxx   |4 +-
 sw/source/filter/html/htmlgrin.cxx  |2 -
 sw/source/filter/ww8/rtfattributeoutput.cxx |2 -
 sw/source/filter/ww8/ww8atr.cxx |6 ++--
 sw/source/ui/dochdl/swdtflvr.cxx|8 ++---
 sw/source/ui/wrtsh/wrtsh2.cxx   |   21 ++
 25 files changed, 92 insertions(+), 78 deletions(-)

New commits:
commit 31ab7f0c7d20f1d7be5ce818d0d99b6bd5a8edde
Author: Matteo Casalin matteo.casa...@yahoo.com
Date:   Sun Jul 28 16:40:20 2013 +0200

String to OUString

Change-Id: I8d4f62b473ad43807621a9dbb826ed33857b737e
Reviewed-on: https://gerrit.libreoffice.org/5189
Reviewed-by: Luboš Luňák l.lu...@suse.cz
Tested-by: Luboš Luňák l.lu...@suse.cz

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 0975efb..ae3749c 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -253,7 +253,7 @@ private:
 //fprintf(stderr, TestAutoCorrDoc::SetAttr\n);
 return true;
 }
-virtual sal_Bool SetINetAttr( xub_StrLen, xub_StrLen, const String )
+virtual sal_Bool SetINetAttr( xub_StrLen, xub_StrLen, const OUString )
 {
 //fprintf(stderr, TestAutoCorrDoc::SetINetAttr\n);
 return true;
diff --git a/editeng/source/editeng/edtspell.cxx 
b/editeng/source/editeng/edtspell.cxx
index 3e1a3c9..37b1bf6f 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -660,7 +660,7 @@ sal_Bool EdtAutoCorrDoc::SetAttr( sal_uInt16 nStt, 
sal_uInt16 nEnd,
 }
 
 sal_Bool EdtAutoCorrDoc::SetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd,
-const String rURL )
+const OUString rURL )
 {
 // Turn the Text into a command field ...
 EditSelection aSel( EditPaM( pCurNode, nStt ), EditPaM( pCurNode, nEnd ) );
diff --git a/editeng/source/editeng/edtspell.hxx 
b/editeng/source/editeng/edtspell.hxx
index 699a6df..7df5e08 100644
--- a/editeng/source/editeng/edtspell.hxx
+++ b/editeng/source/editeng/edtspell.hxx
@@ -148,7 +148,7 @@ public:
 virtual sal_BoolReplaceRange( xub_StrLen nPos, xub_StrLen nLen, const 
String rTxt );
 
 virtual sal_BoolSetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, sal_uInt16 
nSlotId, SfxPoolItem );
-virtual sal_BoolSetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, const 
String rURL );
+virtual sal_BoolSetINetAttr( sal_uInt16 nStt, sal_uInt16 nEnd, const 
OUString rURL );
 
 virtual const String* GetPrevPara( sal_Bool bAtNormalPos );
 
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index 0a493d7..a90f14f 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -96,7 +96,7 @@ public:
 virtual sal_Bool SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 
nSlotId,
 SfxPoolItem ) = 0;
 
-virtual sal_Bool SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const 
String rURL ) = 0;
+virtual sal_Bool SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const 
OUString rURL ) = 0;
 
 // Return the text of a previous paragraph. This must not be empty!
 // If no paragraph exits or just an empty one, then return 0.
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index a652acc..61a7d2a 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -777,7 +777,7 @@ public:
 
 sal_Bool SelectTxtAttr( sal_uInt16 nWhich, sal_Bool bExpand, const 
SwTxtAttr* pAttr = 0 );
 bool GotoINetAttr( const SwTxtINetFmt rAttr );
-const SwFmtINetFmt* FindINetAttr( const String rName ) const;
+const SwFmtINetFmt* FindINetAttr( const OUString rName ) const;
 
 sal_Bool CheckTblBoxCntnt( const SwPosition* pPos = 0 );
 void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 854b869..b032324 100644
--- a/sw/inc/doc.hxx
+++