[Libreoffice-commits] .: 3 commits - starmath/source sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Mar 14 09:46:09 PDT 2011


 starmath/source/rect.cxx           |    2 +-
 sw/source/filter/rtf/rtftbl.cxx    |    2 +-
 sw/source/filter/rtf/swparrtf.cxx  |    6 +++---
 sw/source/ui/shells/langhelper.cxx |   23 ++++++++++++++++++++++-
 4 files changed, 27 insertions(+), 6 deletions(-)

New commits:
commit 5054bf5dae5fbb7e1e2641480911a0e9dbb438cd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 14 16:45:55 2011 +0000

    Resolves: fdo#35282 clear styles as well when using "for all text"

diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx
index 0b8ee3c..aba8f7f 100644
--- a/sw/source/ui/shells/langhelper.cxx
+++ b/sw/source/ui/shells/langhelper.cxx
@@ -34,6 +34,9 @@
 #include <vcl/window.hxx>
 
 #include <wrtsh.hxx>
+#include <doc.hxx>
+#include <docary.hxx>
+#include <charfmt.hxx>
 
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
@@ -299,8 +302,26 @@ namespace SwLangHelper
                          case EE_CHAR_LANGUAGE_CJK :  nLangWhichId = RES_CHRATR_CJK_LANGUAGE; break;
                          case EE_CHAR_LANGUAGE_CTL :  nLangWhichId = RES_CHRATR_CTL_LANGUAGE; break;
                     }
+                    //Set the default document language
                     rWrtSh.SetDefault( SvxLanguageItem( nLang, nLangWhichId ) );
-                
+
+                    //Resolves: fdo#35282 Clear the language from all Text Styles, and
+                    //fallback to default document language
+                    const SwTxtFmtColls *pColls = rWrtSh.GetDoc()->GetTxtFmtColls();
+                    for(sal_uInt16 i = 0, nCount = pColls->Count(); i < nCount; ++i)
+                    {
+                        SwTxtFmtColl &rTxtColl = *pColls->GetObject( i );
+                        rTxtColl.ResetFmtAttr(nLangWhichId);
+                    }
+                    //Resolves: fdo#35282 Clear the language from all Character Styles,
+                    //and fallback to default document language
+                    const SwCharFmts *pCharFmts = rWrtSh.GetDoc()->GetCharFmts();
+                    for(sal_uInt16 i = 0, nCount = pCharFmts->Count(); i < nCount; ++i)
+                    {
+                        SwCharFmt &rCharFmt = *pCharFmts->GetObject( i );
+                        rCharFmt.ResetFmtAttr(nLangWhichId);
+                    }
+
                     // set respective language attribute in text document to default 
                     // (for all text in the document - which should be selected by now...)
                     SvUShortsSort aAttribs;
commit 8df0a4e6726d0af6bbea4f63574978e0d3f5b286
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 14 13:40:35 2011 +0000

    drop username in comment

diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx
index bdbedcb..6235b6d 100644
--- a/sw/source/filter/rtf/rtftbl.cxx
+++ b/sw/source/filter/rtf/rtftbl.cxx
@@ -357,7 +357,7 @@ void SwRTFParser::ReadTable( int nToken )
             break;
 
         case RTF_TRGAPH:
-                //$flr bug: RTF: wrong internal table cell margin imported (A13)
+                //bug: RTF: wrong internal table cell margin imported (A13)
                 aRow.mnBrdDist = (nTokenValue>0?(USHORT)nTokenValue:0); // filter out negative values of \trgaph
             break;
 
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 8eb9ee2..f2d331a 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -431,8 +431,8 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
         sal_uInt16 nPageDescOffset = pDoc->GetPageDescCnt();
         maSegments.InsertSegments(IsNewDoc());
         UpdatePageDescs(*pDoc, nPageDescOffset);
-        //$flr folloing garbe collecting code has been moved from the previous procedure
-        //     UpdatePageDescs to here in order to fix a bug
+        // following garbage collecting code has been moved from the previous
+        // procedure UpdatePageDescs to here in order to fix a bug
         rtfSections::myrDummyIter aDEnd = maSegments.maDummyPageNos.rend();
         for (rtfSections::myrDummyIter aI = maSegments.maDummyPageNos.rbegin(); aI != aDEnd; ++aI)
             pDoc->DelPageDesc(*aI);
@@ -4073,7 +4073,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
                 NewTblLine();           // evt. Line copieren
             else
             {
-                static int _do=0; //$flr 
+                static int _do=0;
                 // Crsr nicht mehr in der Tabelle ?
                 if( !pPam->GetNode()->FindTableNode() && _do )
                 {
commit d16b8b3a96c709a2c5bb5da1782342c7589a1901
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 14 13:38:09 2011 +0000

    drop username in comment

diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 90d805d..bcd2b59 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -648,7 +648,7 @@ bool SmGetGlyphBoundRect(const OutputDevice &rDev,
     // in significant incorrect bounding rectangles for some charcters.
     Size aFntSize = aFnt.GetSize();
 
-    // HDU: workaround to avoid HUGE font sizes and resulting problems
+    // Workaround to avoid HUGE font sizes and resulting problems
     long nScaleFactor = 1;
     while( aFntSize.Height() > 2000 * nScaleFactor )
         nScaleFactor *= 2;


More information about the Libreoffice-commits mailing list