[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source

2014-06-25 Thread Clarence Guo
 sw/source/core/txtnode/thints.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit fba2d04a09a2e040f36991f42062a1c5110fea13
Author: Clarence Guo clarence_...@apache.org
Date:   Wed Jun 25 06:08:29 2014 +

Fix issue 125154

diff --git a/sw/source/core/txtnode/thints.cxx 
b/sw/source/core/txtnode/thints.cxx
index 66781e0..19fe3e5 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1790,10 +1790,10 @@ void SwTxtNode::DelSoftHyph( const xub_StrLen nStt, 
const xub_StrLen nEnd )
 }
 
 //Modify here for #119405, by easyfan, 2012-05-24
-//In MS Word, the font underline setting of the paragraph end position wont 
affect the formatting of numbering, so we ignore it
+//In MS Word, the font underline setting of the paragraph end position wont 
affect the formatting of numbering, escapement, etc, so we ignore them
 bool lcl_IsIgnoredCharFmtForNumbering(const sal_uInt16 nWhich)
 {
-return (nWhich ==  RES_CHRATR_UNDERLINE);
+return (nWhich == RES_CHRATR_UNDERLINE || nWhich == RES_CHRATR_ESCAPEMENT);
 }
 
 //In MS Word, following properties of the paragraph end position wont affect 
the formatting of bullets, so we ignore them:
@@ -1802,7 +1802,7 @@ bool lcl_IsIgnoredCharFmtForNumbering(const sal_uInt16 
nWhich)
 //Font Bold of Wertern, CJK and CTL;
 bool lcl_IsIgnoredCharFmtForBullets(const sal_uInt16 nWhich)
 {
-return (nWhich ==  RES_CHRATR_UNDERLINE || nWhich ==  RES_CHRATR_POSTURE 
|| nWhich ==  RES_CHRATR_WEIGHT
+return (nWhich == RES_CHRATR_UNDERLINE || nWhich == RES_CHRATR_POSTURE || 
nWhich == RES_CHRATR_WEIGHT
 || nWhich == RES_CHRATR_CJK_POSTURE || nWhich == RES_CHRATR_CJK_WEIGHT
 || nWhich == RES_CHRATR_CTL_POSTURE || nWhich == 
RES_CHRATR_CTL_WEIGHT);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-25 Thread Clarence Guo
 sw/source/core/txtnode/thints.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit db960181fe63efa28c2370505b2074d1db485e07
Author: Clarence Guo clarence_...@apache.org
Date:   Wed Jun 25 06:08:29 2014 +

Resolves: #i125154# numbering too small on sample .doc import

(cherry picked from commit fba2d04a09a2e040f36991f42062a1c5110fea13)

Conflicts:
sw/source/core/txtnode/thints.cxx

Change-Id: Idd086e20161fd5f3fd4c23f009c1a0f2061af07e

diff --git a/sw/source/core/txtnode/thints.cxx 
b/sw/source/core/txtnode/thints.cxx
index 294f28a..465a7c5 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1764,7 +1764,7 @@ void SwTxtNode::DelSoftHyph( const sal_Int32 nStt, const 
sal_Int32 nEnd )
 //In MS Word, the font underline setting of the paragraph end position wont 
affect the formatting of numbering, so we ignore it
 bool lcl_IsIgnoredCharFmtForNumbering(const sal_uInt16 nWhich)
 {
-return (nWhich ==  RES_CHRATR_UNDERLINE || nWhich == 
RES_CHRATR_BACKGROUND);
+return (nWhich ==  RES_CHRATR_UNDERLINE || nWhich == RES_CHRATR_BACKGROUND 
|| nWhich == RES_CHRATR_ESCAPEMENT);
 }
 
 //In MS Word, following properties of the paragraph end position wont affect 
the formatting of bullets, so we ignore them:
@@ -1773,7 +1773,7 @@ bool lcl_IsIgnoredCharFmtForNumbering(const sal_uInt16 
nWhich)
 //Font Bold of Wertern, CJK and CTL;
 bool lcl_IsIgnoredCharFmtForBullets(const sal_uInt16 nWhich)
 {
-return (nWhich ==  RES_CHRATR_UNDERLINE || nWhich ==  RES_CHRATR_POSTURE 
|| nWhich ==  RES_CHRATR_WEIGHT
+return (nWhich == RES_CHRATR_UNDERLINE || nWhich == RES_CHRATR_POSTURE || 
nWhich == RES_CHRATR_WEIGHT
 || nWhich == RES_CHRATR_CJK_POSTURE || nWhich == RES_CHRATR_CJK_WEIGHT
 || nWhich == RES_CHRATR_CTL_POSTURE || nWhich == 
RES_CHRATR_CTL_WEIGHT);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/source

2014-06-25 Thread Clarence Guo
 sw/source/core/txtnode/thints.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ab4ab2fe75010270d7a0ba3956c366cd9e991df0
Author: Clarence Guo clarence_...@apache.org
Date:   Wed Jun 25 06:08:29 2014 +

Resolves: #i125154# numbering too small on sample .doc import

(cherry picked from commit fba2d04a09a2e040f36991f42062a1c5110fea13)

Conflicts:
sw/source/core/txtnode/thints.cxx

Change-Id: Idd086e20161fd5f3fd4c23f009c1a0f2061af07e
(cherry picked from commit db960181fe63efa28c2370505b2074d1db485e07)

diff --git a/sw/source/core/txtnode/thints.cxx 
b/sw/source/core/txtnode/thints.cxx
index cae6296..4932195 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1764,7 +1764,7 @@ void SwTxtNode::DelSoftHyph( const sal_Int32 nStt, const 
sal_Int32 nEnd )
 //In MS Word, the font underline setting of the paragraph end position wont 
affect the formatting of numbering, so we ignore it
 bool lcl_IsIgnoredCharFmtForNumbering(const sal_uInt16 nWhich)
 {
-return (nWhich ==  RES_CHRATR_UNDERLINE || nWhich == 
RES_CHRATR_BACKGROUND);
+return (nWhich ==  RES_CHRATR_UNDERLINE || nWhich == RES_CHRATR_BACKGROUND 
|| nWhich == RES_CHRATR_ESCAPEMENT);
 }
 
 //In MS Word, following properties of the paragraph end position wont affect 
the formatting of bullets, so we ignore them:
@@ -1773,7 +1773,7 @@ bool lcl_IsIgnoredCharFmtForNumbering(const sal_uInt16 
nWhich)
 //Font Bold of Wertern, CJK and CTL;
 bool lcl_IsIgnoredCharFmtForBullets(const sal_uInt16 nWhich)
 {
-return (nWhich ==  RES_CHRATR_UNDERLINE || nWhich ==  RES_CHRATR_POSTURE 
|| nWhich ==  RES_CHRATR_WEIGHT
+return (nWhich == RES_CHRATR_UNDERLINE || nWhich == RES_CHRATR_POSTURE || 
nWhich == RES_CHRATR_WEIGHT
 || nWhich == RES_CHRATR_CJK_POSTURE || nWhich == RES_CHRATR_CJK_WEIGHT
 || nWhich == RES_CHRATR_CTL_POSTURE || nWhich == 
RES_CHRATR_CTL_WEIGHT);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - oox/inc oox/source

2014-05-26 Thread Clarence Guo
 oox/inc/oox/xls/richstring.hxx |1 +
 oox/source/xls/richstring.cxx  |   10 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit d39da40700ceab57e9f80bd9851598e1d455f121
Author: Clarence Guo clarence_...@apache.org
Date:   Mon May 26 03:03:05 2014 +

for #i124928, rich text portion could be converted several times, each time 
when it is converted, the string will be set once, but in the setString logic, 
the text is inserted instead of set.

Repeated conversion is unnecessary, add a flag to avoid repeated conversion

diff --git a/oox/inc/oox/xls/richstring.hxx b/oox/inc/oox/xls/richstring.hxx
index 18f177b..afd88f1 100644
--- a/oox/inc/oox/xls/richstring.hxx
+++ b/oox/inc/oox/xls/richstring.hxx
@@ -78,6 +78,7 @@ private:
 ::rtl::OUString maText; /// Portion text.
 FontRef mxFont; /// Embedded portion font, may be 
empty.
 sal_Int32   mnFontId;   /// Link to global font list.
+boolmbConverted;/// Without repeatly convert
 };
 
 typedef ::boost::shared_ptr RichStringPortion  RichStringPortionRef;
diff --git a/oox/source/xls/richstring.cxx b/oox/source/xls/richstring.cxx
index b2349ab..1fb24f4 100644
--- a/oox/source/xls/richstring.cxx
+++ b/oox/source/xls/richstring.cxx
@@ -19,8 +19,6 @@
  *
  */
 
-
-
 #include oox/xls/richstring.hxx
 
 #include com/sun/star/text/XText.hpp
@@ -59,7 +57,8 @@ inline bool lclNeedsRichTextFormat( const Font* pFont )
 
 RichStringPortion::RichStringPortion( const WorkbookHelper rHelper ) :
 WorkbookHelper( rHelper ),
-mnFontId( -1 )
+mnFontId( -1 ),
+mbConverted( false )
 {
 }
 
@@ -89,6 +88,9 @@ void RichStringPortion::finalizeImport()
 
 void RichStringPortion::convert( const Reference XText  rxText, const Font* 
pFont, bool bReplace )
 {
+if ( mbConverted )
+return;
+
 Reference XTextRange  xRange;
 if( bReplace )
 xRange.set( rxText, UNO_QUERY );
@@ -113,6 +115,8 @@ void RichStringPortion::convert( const Reference XText  
rxText, const Font* p
 pFont-writeToPropertySet( aPropSet, FONT_PROPTYPE_TEXT );
 }
 }
+
+mbConverted = true;
 }
 
 // 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2014-05-26 Thread Clarence Guo
 sc/source/filter/inc/richstring.hxx |1 +
 sc/source/filter/oox/richstring.cxx |8 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 8a93ce4c402fc164a86b04973cac924d318b6525
Author: Clarence Guo clarence_...@apache.org
Date:   Mon May 26 03:03:05 2014 +

Resolves: #i124928# rich text portion could be converted several times...

each time when it is converted, the string will be set once, but in the
setString logic, the text is inserted instead of set

Repeated conversion is unnecessary, add a flag to avoid repeated conversion

(cherry picked from commit d39da40700ceab57e9f80bd9851598e1d455f121)

Conflicts:
sc/source/filter/oox/richstring.cxx

Change-Id: I3ae08d59050ce84fb6ca0f2a82acdd27e71ba52b

diff --git a/sc/source/filter/inc/richstring.hxx 
b/sc/source/filter/inc/richstring.hxx
index d26ce76..645a335 100644
--- a/sc/source/filter/inc/richstring.hxx
+++ b/sc/source/filter/inc/richstring.hxx
@@ -80,6 +80,7 @@ private:
 OUString maText; /// Portion text.
 FontRef mxFont; /// Embedded portion font, may be 
empty.
 sal_Int32   mnFontId;   /// Link to global font list.
+boolmbConverted;/// Without repeatly convert
 };
 
 typedef ::boost::shared_ptr RichStringPortion  RichStringPortionRef;
diff --git a/sc/source/filter/oox/richstring.cxx 
b/sc/source/filter/oox/richstring.cxx
index 646ee82..894974f 100644
--- a/sc/source/filter/oox/richstring.cxx
+++ b/sc/source/filter/oox/richstring.cxx
@@ -48,7 +48,8 @@ inline bool lclNeedsRichTextFormat( const Font* pFont )
 
 RichStringPortion::RichStringPortion( const WorkbookHelper rHelper ) :
 WorkbookHelper( rHelper ),
-mnFontId( -1 )
+mnFontId( -1 ),
+mbConverted( false )
 {
 }
 
@@ -78,6 +79,9 @@ void RichStringPortion::finalizeImport()
 
 void RichStringPortion::convert( const Reference XText  rxText, const Font* 
pFont, bool bReplace )
 {
+if ( mbConverted )
+return;
+
 Reference XTextRange  xRange;
 if( bReplace )
 xRange.set( rxText, UNO_QUERY );
@@ -103,6 +107,8 @@ void RichStringPortion::convert( const Reference XText  
rxText, const Font* p
 pFont-writeToPropertySet( aPropSet, FONT_PROPTYPE_TEXT );
 }
 }
+
+mbConverted = true;
 }
 
 void RichStringPortion::convert( ScEditEngineDefaulter rEE, ESelection 
rSelection, const Font* pFont )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits