[Libreoffice-commits] .: 13 commits - sw/source

Jan Holesovsky kendy at kemper.freedesktop.org
Mon Jun 6 05:13:42 PDT 2011


 sw/source/core/doc/notxtfrm.cxx   |    2 +-
 sw/source/core/graphic/ndgrf.cxx  |    3 +--
 sw/source/filter/ww8/wrtw8nds.cxx |   15 +++++++++++----
 sw/source/filter/xml/xmlimp.cxx   |   10 ++++++++++
 4 files changed, 23 insertions(+), 7 deletions(-)

New commits:
commit fdcc0252d11b05dd4deb14105221864951fe5065
Merge: 3cf3d76... 349cdd3...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Mon Jun 6 12:53:25 2011 +0200

    Merge remote-tracking branch 'origin/libreoffice-3-4'

diff --cc sw/source/core/graphic/ndgrf.cxx
index e130b27,0a11a93..775c46e
mode 100755,100644..100755
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
diff --cc sw/source/filter/xml/xmlimp.cxx
index 70b467b,6f8cf88..d0c6b2e
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@@ -1431,16 -1431,7 +1431,26 @@@ void SwXMLImport::SetConfigurationSetti
          xProps->setPropertyValue(
              OUString( RTL_CONSTASCII_USTRINGPARAM("UseOldPrinterMetrics") ), makeAny( true ) );
      }
 -    // <--
 +
 +    // Old LO versions had 66 as the value for small caps percentage, later changed to 80.
 +    // In order to keep backwards compatibility, SmallCapsPercentage66 option is written to .odt
 +    // files, and the default for new documents is 'false'. Files without this option
 +    // are considered to be old files, so set the compatibility option too.
 +    if ( !bSmallCapsPercentage66 )
 +    {
++        xProps->setPropertyValue(
++            OUString( RTL_CONSTASCII_USTRINGPARAM("SmallCapsPercentage66") ), makeAny( true ) );
++    }
++
++    // Old LO versions had 66 as the value for small caps percentage, later changed to 80.
++    // In order to keep backwards compatibility, SmallCapsPercentage66 option is written to .odt
++    // files, and the default for new documents is 'false'. Files without this option
++    // are considered to be old files, so set the compatibility option too.
++    if ( !bSmallCapsPercentage66 )
++    {
 +        xProps->setPropertyValue(
 +            OUString( RTL_CONSTASCII_USTRINGPARAM("SmallCapsPercentage66") ), makeAny( true ) );
 +    }
  
      // Old LO versions had 66 as the value for small caps percentage, later changed to 80.
      // In order to keep backwards compatibility, SmallCapsPercentage66 option is written to .odt
commit 349cdd39cb23c99ecc4a299729dbc8ab0ac89bd8
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Fri Jun 3 14:35:38 2011 +0200

    Fix one of the crashes in wizards - fdo#36306
    
    This fixes the following problem:
    
    - open "File/Wizards/Letter"
    - select "Formal Personal letter" radio button
    - press "Finish" button
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 6bcbec2..0a11a93 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -806,8 +806,7 @@ SvStream* SwGrfNode::_GetStreamForEmbedGrf(
         {
             xub_StrLen nExtPos = _aStrmName.Search( '.' );
             String aExtStr = _aStrmName.Copy( nExtPos );
-            Graphic aGraphic( GetGrfObj().GetGraphic() );
-            if ( aGraphic.GetType() != GRAPHIC_NONE )
+            if ( GetGrfObj().GetType() != GRAPHIC_NONE )
             {
                 _aStrmName = String( GetGrfObj().GetUniqueID(), RTL_TEXTENCODING_ASCII_US );
                 _aStrmName += aExtStr;
commit 3860483d8cb9e259ca3f68347ba0e35f7bfb1739
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 2 11:39:43 2011 +0100

    Resolves: rhbz#710004 band-aid for immediate crash in IsAlignPossible
    (cherry picked from commit d6839fa9aaac82892b5af2bc00c9ad196c9ff4bb)

diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index ef9becd..87bc266 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2566,8 +2566,9 @@ sal_Bool SwFEShell::IsAlignPossible() const
         {
             SdrObject *pO = Imp()->GetDrawView()->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
             SwDrawContact *pC = (SwDrawContact*)GetUserCall(pO);
+            OSL_ENSURE( pC, "No SwDrawContact!");
             //only as character bound drawings can be aligned
-            bRet = (pC->GetFmt()->GetAnchor().GetAnchorId() == FLY_AS_CHAR);
+            bRet = pC ? (pC->GetFmt()->GetAnchor().GetAnchorId() == FLY_AS_CHAR) : sal_False;
         }
         if ( bRet )
             return Imp()->GetDrawView()->IsAlignPossible();
commit d1a735e8a8d52f7a4f9f2d63f403215bdc5f0561
Author: jeffrey <jeffrey at linux-ow08.site>
Date:   Wed Jun 1 23:22:17 2011 +0800

    Made changes to fix sentence delete in bug 34786.
    
    Signed-off-by: Noel Power <noel.power at novell.com>

diff --git a/sw/source/ui/wrtsh/wrtsh4.cxx b/sw/source/ui/wrtsh/wrtsh4.cxx
index 9469ff2..f455338 100644
--- a/sw/source/ui/wrtsh/wrtsh4.cxx
+++ b/sw/source/ui/wrtsh/wrtsh4.cxx
@@ -235,7 +235,7 @@ sal_Bool SwWrtShell::_BwdSentence()
         Pop();
         return 1;
     }
-    if( !GoPrevSentence()  && !IsSttPara() )
+    if( !GoStartSentence()  && !IsSttPara() )
             // nicht gefunden --> an den Absatz Anfang
         SwCrsrShell::MovePara( fnParaCurr, fnParaStart );
     ClearMark();
commit 5bc702e5487ba931b2707770a5e25a883bd89b76
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri May 27 15:33:40 2011 +0100

    Resolves: rhbz#707317 avoid crash in getRowSpan
    (cherry picked from commit 23c4f82e9084f8b15f149b074a8ad4ff6a7a4204)

diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 4f646d2..c27d8f7 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1665,8 +1665,7 @@ sal_Bool SwCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
             {
                 // Set cursor to start/end of covered cell:
                 SwTableBox* pTableBox = pOldTabBoxSttNode->GetTblBox();
-                const long nRowSpan = pTableBox->getRowSpan();
-                if ( nRowSpan > 1 )
+                if ( pTableBox && pTableBox->getRowSpan() > 1 )
                 {
                     pTableBox = & pTableBox->FindEndOfRowSpan( pOldTabSttNode->GetTable(), (sal_uInt16)(pTableBox->getRowSpan() + mnRowSpanOffset ) );
                     SwNodeIndex& rPtIdx = GetPoint()->nNode;
@@ -1953,7 +1952,7 @@ sal_Bool SwCursor::GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt )
         // proceeding:
         if ( mnRowSpanOffset )
         {
-            if ( pTableBox->getRowSpan() > 1 )
+            if ( pTableBox && pTableBox->getRowSpan() > 1 )
             {
                 pTableBox = & pTableBox->FindEndOfRowSpan( pTblNd->GetTable(), (sal_uInt16)(pTableBox->getRowSpan() + mnRowSpanOffset) );
                 SwNodeIndex aNewIdx( *pTableBox->GetSttNd() );
@@ -1976,7 +1975,7 @@ sal_Bool SwCursor::GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt )
 
         pTableBoxStartNode = rPtIdx.GetNode().FindTableBoxStartNode();
         pTableBox = pTableBoxStartNode->GetTblBox();
-        if ( pTableBox->getRowSpan() < 1 )
+        if ( pTableBox && pTableBox->getRowSpan() < 1 )
         {
             mnRowSpanOffset = pTableBox->getRowSpan();
             // move cursor to non-covered cell:
commit 87c6a672c577bab7caa7cc87de467da11c60ef44
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date:   Thu May 26 10:37:18 2011 +0100

    fix for ww8 export of relative hyperlinks: i#115297
    
    Actually check that the output URL is relative or absolute. Non mark-only
    URLs doesn't necessarily reflect absolute URLs!

diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 7808f89..863b2ea 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -893,8 +893,12 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
     // now write the picture structur
     sURL = aURL.GetURLNoMark();
 
-    //all links end up in the data stream as absolute references.
-    bool bAbsolute = !bBookMarkOnly;
+    // Compare the URL written by AnalyzeURL with the original one to see if
+    // the output URL is absolute or relative.
+    String sRelativeURL;
+    if ( rUrl.Len() )
+        sRelativeURL = URIHelper::simpleNormalizedMakeRelative( m_rWW8Export.GetWriter().GetBaseURL(), rUrl );
+    bool bAbsolute = sRelativeURL.Equals( rUrl );
 
     static sal_uInt8 aURLData1[] = {
         0,0,0,0,        // len of struct
@@ -912,11 +916,14 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
     };
 
     m_rWW8Export.pDataStrm->Write( aURLData1, sizeof( aURLData1 ) );
+    /* Write HFD Structure */
     sal_uInt8 nAnchor = 0x00;
     if ( sMark.Len() )
         nAnchor = 0x08;
-    m_rWW8Export.pDataStrm->Write( &nAnchor, 1 );
-    m_rWW8Export.pDataStrm->Write( MAGIC_A, sizeof(MAGIC_A) );
+    m_rWW8Export.pDataStrm->Write( &nAnchor, 1 ); // HFDBits
+    m_rWW8Export.pDataStrm->Write( MAGIC_A, sizeof(MAGIC_A) ); //clsid
+
+    /* Write Hyperlink Object see [MS-OSHARED] spec*/
     SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, 0x00000002);
     sal_uInt32 nFlag = bBookMarkOnly ? 0 : 0x01;
     if ( bAbsolute )
commit c3f1dc1148593224aa77b1f4bdc3db1804adb07a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed May 25 13:20:11 2011 +0100

    Resolves: fdo#35937 temp ole docshell on dtor deletes SwDoc on 0 refcount
    
    copy of ole objects creates a temp docshell, whose dtor on 0 ref count deletes
    the SwDoc handle. So add an acquire/release pair.
    (cherry picked from commit fb5c25294efd2ef9138df61e82cd438ff07f4bf1)

diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 0527ab9..6cc62a1 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -1048,6 +1048,7 @@ void SwDoc::InitTOXTypes()
 SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
 {
     SwDoc* pRet = new SwDoc;
+
     //copy settings
     sal_uInt16 aRangeOfDefaults[] = {
         RES_FRMATR_BEGIN, RES_FRMATR_END-1,
@@ -1058,22 +1059,24 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
         0
     };
 
-    SfxItemSet aNewDefaults( pRet->GetAttrPool(), aRangeOfDefaults );
-
-    sal_uInt16 nWhich;
-    sal_uInt16 nRange = 0;
-    while( aRangeOfDefaults[nRange] != 0)
     {
-        for( nWhich = aRangeOfDefaults[nRange]; nWhich < aRangeOfDefaults[nRange + 1]; ++nWhich )
+        SfxItemSet aNewDefaults( pRet->GetAttrPool(), aRangeOfDefaults );
+
+        sal_uInt16 nWhich;
+        sal_uInt16 nRange = 0;
+        while( aRangeOfDefaults[nRange] != 0)
         {
-            const SfxPoolItem& rSourceAttr = mpAttrPool->GetDefaultItem( nWhich );
-            if( rSourceAttr != pRet->mpAttrPool->GetDefaultItem( nWhich ) )
-                aNewDefaults.Put( rSourceAttr );
+            for( nWhich = aRangeOfDefaults[nRange]; nWhich < aRangeOfDefaults[nRange + 1]; ++nWhich )
+            {
+                const SfxPoolItem& rSourceAttr = mpAttrPool->GetDefaultItem( nWhich );
+                if( rSourceAttr != pRet->mpAttrPool->GetDefaultItem( nWhich ) )
+                    aNewDefaults.Put( rSourceAttr );
+            }
+            nRange += 2;
         }
-        nRange += 2;
+        if( aNewDefaults.Count() )
+            pRet->SetDefault( aNewDefaults );
     }
-    if( aNewDefaults.Count() )
-        pRet->SetDefault( aNewDefaults );
 
     pRet->n32DummyCompatabilityOptions1 = n32DummyCompatabilityOptions1;
     pRet->n32DummyCompatabilityOptions2 = n32DummyCompatabilityOptions2;
@@ -1117,12 +1120,16 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
         pRetShell->DoInitNew();
     }
 
+    pRet->acquire();
+
     //copy content 
     pRet->Paste( *this );
 
     // remove the temporary shell if it is there as it was done before
     pRet->SetTmpDocShell( (SfxObjectShell*)NULL );
 
+    pRet->release();
+
     return pRetShell;
 }
 
commit 82fbf515a88feb1fd4f5e1028498674471a38a48
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed May 25 10:09:27 2011 +0100

    document as a fdo bug

diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 0293d22..a5e4f2f 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -818,7 +818,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
 
     if( pGrfNd )
     {
-        // Fix for bug #33781
+        // Fix for bug fdo#33781
         if (pShell->Imp()->GetDrawView()->IsAntiAliasing())
         {
             pOut->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
commit e11d6076cd88b219e0bace8caac791e2e780f257
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date:   Thu May 19 12:40:09 2011 +0200

    fdo#36329: Fix crash reading some documents with fields
    
    The problem came from the unsigned integer positions... Needed to
    prevent the end position to get -1/max value.
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>

diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 0619118..2b2af4f 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -84,7 +84,8 @@ namespace
             rStart.nNode.GetNode().GetTxtNode();
         SwTxtNode const*const pEndTxtNode = rEnd.nNode.GetNode().GetTxtNode();
         const sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(rStart.nContent.GetIndex());
-        xub_StrLen nEndPos = rEnd == rStart ? rEnd.nContent.GetIndex() : rEnd.nContent.GetIndex() - 1;
+        xub_StrLen nEndPos = ( rEnd == rStart ||  rEnd.nContent.GetIndex() == 0 ) ?
+            rEnd.nContent.GetIndex() : rEnd.nContent.GetIndex() - 1;
         const sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar( nEndPos );
         SwPaM aStartPaM(rStart);
         SwPaM aEndPaM(rEnd);
commit 27875f65e2c1953fbf636af32556833c44849f53
Author: Jean-Baptiste Faure <jbf.faure at orange.fr>
Date:   Sat May 21 21:37:39 2011 +0200

    give more room to style listbox
    
    Signed-off-by: Andras Timar <atimar at suse.com>

diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src
index 27e28d7..26f69d6 100644
--- a/sw/source/ui/frmdlg/column.src
+++ b/sw/source/ui/frmdlg/column.src
@@ -269,7 +269,7 @@ TabPage TP_COLUMN
     {
         HelpID = "sw:ListBox:TP_COLUMN:LB_STYLE";
         Pos = MAP_APPFONT ( 45 , 154 ) ;
-        Size = MAP_APPFONT ( 35 , 66 ) ;
+        Size = MAP_APPFONT ( 40 , 66 ) ;
         TabStop = TRUE ;
         DropDown = TRUE ;
     };
@@ -284,7 +284,7 @@ TabPage TP_COLUMN
     {
         Border = TRUE ;
         Pos = MAP_APPFONT ( 45 , 170 ) ;
-        Size = MAP_APPFONT ( 35 , 12 ) ;
+        Size = MAP_APPFONT ( 40 , 12 ) ;
         TabStop = TRUE ;
         Spin = TRUE ;
         Repeat = TRUE ;
@@ -298,7 +298,7 @@ TabPage TP_COLUMN
     };
     FixedText FT_COLOR
     {
-        Pos = MAP_APPFONT ( 160 , 156 ) ;
+        Pos = MAP_APPFONT ( 165 , 156 ) ;
         Size = MAP_APPFONT ( 25 , 8 ) ;
         Text [ en-US ] = "~Color" ;
         Left = TRUE ;
@@ -306,7 +306,7 @@ TabPage TP_COLUMN
     ListBox LB_COLOR
     {
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 188 , 154 ) ;
+        Pos = MAP_APPFONT ( 193 , 154 ) ;
         Size = MAP_APPFONT ( 60 , 68 ) ;
         DropDown = TRUE ;
         DDExtraWidth = TRUE ;
@@ -314,7 +314,7 @@ TabPage TP_COLUMN
     };
     FixedText FT_HEIGHT
     {
-        Pos = MAP_APPFONT ( 86 , 156 ) ;
+        Pos = MAP_APPFONT ( 91 , 156 ) ;
         Size = MAP_APPFONT ( 30 , 8 ) ;
         Text [ en-US ] = "H~eight" ;
         Left = TRUE ;
@@ -323,7 +323,7 @@ TabPage TP_COLUMN
     {
         HelpID = "sw:MetricField:TP_COLUMN:ED_HEIGHT";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 119 , 154 ) ;
+        Pos = MAP_APPFONT ( 124 , 154 ) ;
         Size = MAP_APPFONT ( 35 , 12 ) ;
         TabStop = TRUE ;
         Left = TRUE ;
@@ -339,7 +339,7 @@ TabPage TP_COLUMN
     };
     FixedText FT_POSITION
     {
-        Pos = MAP_APPFONT ( 86 , 172 ) ;
+        Pos = MAP_APPFONT ( 91 , 172 ) ;
         Size = MAP_APPFONT ( 30 , 8 ) ;
         Left = TRUE ;
         Text [ en-US ] = "~Position" ;
@@ -347,7 +347,7 @@ TabPage TP_COLUMN
     ListBox LB_POSITION
     {
         HelpID = "sw:ListBox:TP_COLUMN:LB_POSITION";
-        Pos = MAP_APPFONT ( 119 , 170 ) ;
+        Pos = MAP_APPFONT ( 124 , 170 ) ;
         Size = MAP_APPFONT ( 35 , 40 ) ;
         TabStop = TRUE ;
         DropDown = TRUE ;
@@ -376,7 +376,7 @@ TabPage TP_COLUMN
         HelpID = "sw:ListBox:TP_COLUMN:LB_TEXTDIRECTION";
         Border = TRUE ;
         Pos = MAP_APPFONT ( 75 , 58 ) ;
-        Size = MAP_APPFONT ( 127 , 50 ) ;
+        Size = MAP_APPFONT ( 150 , 50 ) ;
         DropDown = TRUE ;
         Hide = TRUE ;
     StringList [ en-US ] =
commit 335cc3bb837a671b3d6644bf9b4bc13a116102da
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date:   Fri May 20 19:22:15 2011 +0200

    fdo#37387, reorganized columns dialog to show text direction correctly
    
    Signed-off-by: Andras Timar <atimar at suse.com>

diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 058a622..fc4da4a 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -449,8 +449,6 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet)
     aLinePosLbl(this,       SW_RES(FT_POSITION)),
     aLinePosDLB(this,       SW_RES(LB_POSITION)),
 
-    aVertFL(this,         SW_RES(FL_VERT)),
-    aPropertiesFL(  this,    SW_RES( FL_PROPERTIES    )),
     aTextDirectionFT( this,  SW_RES( FT_TEXTDIRECTION )),
     aTextDirectionLB( this,  SW_RES( LB_TEXTDIRECTION )),
 
@@ -1332,25 +1330,8 @@ void SwColumnPage::SetInSection(sal_Bool bSet)
     if(!SW_MOD()->GetCTLOptions().IsCTLFontEnabled())
         return;
 
-    aVertFL.Show(bSet);
-    aPropertiesFL.Show(bSet);
     aTextDirectionFT.Show(bSet);
     aTextDirectionLB.Show(bSet);
-    if(bSet)
-    {
-        //resize line type FixedLine
-        Point aLtPos = aFLLineType.GetPosPixel();
-        Point aPropPos = aPropertiesFL.GetPosPixel();
-        Size aSz = aFLLineType.GetSizePixel();
-        aSz.Width() = aPropPos.X() - aLtPos.X() - LogicToPixel(Size(8, 8), MAP_APPFONT).Width();
-        aFLLineType.SetSizePixel(aSz);
-    }
-    else
-    {
-        Size aSz = aFLLineType.GetSizePixel();
-        aSz.Width() = LogicToPixel(Size(248, 248), MAP_APPFONT).Width();
-        aFLLineType.SetSizePixel(aSz);
-    }
 }
 
 void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt )
diff --git a/sw/source/ui/frmdlg/column.hrc b/sw/source/ui/frmdlg/column.hrc
index a45c68d..906f1b8 100644
--- a/sw/source/ui/frmdlg/column.hrc
+++ b/sw/source/ui/frmdlg/column.hrc
@@ -75,10 +75,8 @@
 #define PB_CANCEL               56
 #define PB_OK                   57
 #define CB_BALANCECOLS			58
-#define FL_PROPERTIES           59
 #define FT_TEXTDIRECTION        60
 #define LB_TEXTDIRECTION        61
-#define FL_VERT                 62
 
 #define FT_LINEWIDTH            63
 #define ED_LINEWIDTH            64
diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src
index 30d96c5..27e28d7 100644
--- a/sw/source/ui/frmdlg/column.src
+++ b/sw/source/ui/frmdlg/column.src
@@ -85,7 +85,7 @@ TabPage TP_COLUMN
     };
     FixedText FT_COLUMN
     {
-        Pos = MAP_APPFONT ( 12 , 70 ) ;
+        Pos = MAP_APPFONT ( 12 , 86 ) ;
         Size = MAP_APPFONT ( 50 , 8 ) ;
         Left = TRUE ;
         Text [ en-US ] = "Column";
@@ -99,28 +99,28 @@ TabPage TP_COLUMN
     {
         HelpID = "sw:ImageButton:TP_COLUMN:BTN_DOWN";
         Disable = TRUE ;
-        Pos = MAP_APPFONT ( 62 , 69 ) ;
+        Pos = MAP_APPFONT ( 62 , 85 ) ;
         Size = MAP_APPFONT ( 10 , 10 ) ;
         TabStop = TRUE ;
         SYMBOL = IMAGEBUTTON_ARROW_LEFT ;
     };
     FixedText FT_1
     {
-        Pos = MAP_APPFONT ( 100 , 71 ) ;
+        Pos = MAP_APPFONT ( 100 , 87 ) ;
         Size = MAP_APPFONT ( 10 , 8 ) ;
         Text = "~1" ;
         Center = TRUE ;
     };
     FixedText FT_2
     {
-        Pos = MAP_APPFONT ( 150 , 71 ) ;
+        Pos = MAP_APPFONT ( 150 , 87 ) ;
         Size = MAP_APPFONT ( 10 , 8 ) ;
         Text = "~2" ;
         Center = TRUE ;
     };
     FixedText FT_3
     {
-        Pos = MAP_APPFONT ( 200 , 71 ) ;
+        Pos = MAP_APPFONT ( 200 , 87 ) ;
         Size = MAP_APPFONT ( 10 , 8 ) ;
         Text = "~3" ;
         Center = TRUE ;
@@ -129,14 +129,14 @@ TabPage TP_COLUMN
     {
         HelpID = "sw:ImageButton:TP_COLUMN:BTN_UP";
         Disable = TRUE ;
-        Pos = MAP_APPFONT ( 238 , 69 ) ;
+        Pos = MAP_APPFONT ( 238 , 85 ) ;
         Size = MAP_APPFONT ( 10 , 10 ) ;
         TabStop = TRUE ;
         SYMBOL = IMAGEBUTTON_ARROW_RIGHT ;
     };
     FixedText FT_WIDTH
     {
-        Pos = MAP_APPFONT ( 12 , 85 ) ;
+        Pos = MAP_APPFONT ( 12 , 101 ) ;
         Size = MAP_APPFONT ( 50 , 8 ) ;
         Left = TRUE ;
         Text [ en-US ] = "Width" ;
@@ -146,7 +146,7 @@ TabPage TP_COLUMN
         HelpID = "sw:MetricField:TP_COLUMN:ED_1";
         Disable = TRUE ;
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 87 , 83 ) ;
+        Pos = MAP_APPFONT ( 87 , 99 ) ;
         Size = MAP_APPFONT ( 36 , 12 ) ;
         TabStop = TRUE ;
         Left = TRUE ;
@@ -165,7 +165,7 @@ TabPage TP_COLUMN
         HelpID = "sw:MetricField:TP_COLUMN:ED_2";
         Disable = TRUE ;
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 137 , 83 ) ;
+        Pos = MAP_APPFONT ( 137 , 99 ) ;
         Size = MAP_APPFONT ( 36 , 12 ) ;
         TabStop = TRUE ;
         Left = TRUE ;
@@ -184,7 +184,7 @@ TabPage TP_COLUMN
         HelpID = "sw:MetricField:TP_COLUMN:ED_3";
         Disable = TRUE ;
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 187 , 83 ) ;
+        Pos = MAP_APPFONT ( 187 , 99 ) ;
         Size = MAP_APPFONT ( 36 , 12 ) ;
         TabStop = TRUE ;
         Left = TRUE ;
@@ -200,7 +200,7 @@ TabPage TP_COLUMN
     };
     FixedText FT_DIST
     {
-        Pos = MAP_APPFONT ( 12 , 101 ) ;
+        Pos = MAP_APPFONT ( 12 , 117 ) ;
         Size = MAP_APPFONT ( 50 , 8 ) ;
         Left = TRUE ;
         Text [ en-US ] = "Spacing" ;
@@ -210,7 +210,7 @@ TabPage TP_COLUMN
         HelpID = "sw:MetricField:TP_COLUMN:ED_DIST1";
         Disable = TRUE ;
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 112 , 99 ) ;
+        Pos = MAP_APPFONT ( 112 , 115 ) ;
         Size = MAP_APPFONT ( 36 , 12 ) ;
         TabStop = TRUE ;
         Left = TRUE ;
@@ -229,7 +229,7 @@ TabPage TP_COLUMN
         HelpID = "sw:MetricField:TP_COLUMN:ED_DIST2";
         Disable = TRUE ;
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 162 , 99 ) ;
+        Pos = MAP_APPFONT ( 162 , 115 ) ;
         Size = MAP_APPFONT ( 36 , 12 ) ;
         TabStop = TRUE ;
         Left = TRUE ;
@@ -246,45 +246,45 @@ TabPage TP_COLUMN
     CheckBox CB_AUTO_WIDTH
     {
         HelpID = "sw:CheckBox:TP_COLUMN:CB_AUTO_WIDTH";
-        Pos = MAP_APPFONT ( 87 , 115 ) ;
+        Pos = MAP_APPFONT ( 87 , 131 ) ;
         Size = MAP_APPFONT ( 100 , 10 ) ;
         Text [ en-US ] = "Auto~Width" ;
         TabStop = TRUE ;
     };
     FixedLine FL_LAYOUT
     {
-        Pos = MAP_APPFONT ( 6 , 58 ) ;
+        Pos = MAP_APPFONT ( 6 , 74 ) ;
         Size = MAP_APPFONT ( 248 , 8 ) ;
         Text [ en-US ] = "Width and spacing";
     };
 
     FixedText FT_STYLE
     {
-        Pos = MAP_APPFONT ( 12 , 140 ) ;
-        Size = MAP_APPFONT ( 35 , 8 ) ;
+        Pos = MAP_APPFONT ( 12 , 156 ) ;
+        Size = MAP_APPFONT ( 30 , 8 ) ;
         Text [ en-US ] = "St~yle" ;
         Left = TRUE ;
     };
     ListBox LB_STYLE
     {
         HelpID = "sw:ListBox:TP_COLUMN:LB_STYLE";
-        Pos = MAP_APPFONT ( 50 , 138 ) ;
-        Size = MAP_APPFONT ( 60 , 66 ) ;
+        Pos = MAP_APPFONT ( 45 , 154 ) ;
+        Size = MAP_APPFONT ( 35 , 66 ) ;
         TabStop = TRUE ;
         DropDown = TRUE ;
     };
     FixedText FT_LINEWIDTH
     {
-        Pos = MAP_APPFONT ( 12 , 156 ) ;
-        Size = MAP_APPFONT ( 35 , 8 ) ;
+        Pos = MAP_APPFONT ( 12 , 172 ) ;
+        Size = MAP_APPFONT ( 30 , 8 ) ;
         Text [ en-US ] = "~Width" ;
         Left = TRUE ;
     };
     MetricField ED_LINEWIDTH
     {
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 50 , 154 ) ;
-        Size = MAP_APPFONT ( 60 , 12 ) ;
+        Pos = MAP_APPFONT ( 45 , 170 ) ;
+        Size = MAP_APPFONT ( 35 , 12 ) ;
         TabStop = TRUE ;
         Spin = TRUE ;
         Repeat = TRUE ;
@@ -298,15 +298,15 @@ TabPage TP_COLUMN
     };
     FixedText FT_COLOR
     {
-        Pos = MAP_APPFONT ( 12 , 172 ) ;
-        Size = MAP_APPFONT ( 35 , 8 ) ;
+        Pos = MAP_APPFONT ( 160 , 156 ) ;
+        Size = MAP_APPFONT ( 25 , 8 ) ;
         Text [ en-US ] = "~Color" ;
         Left = TRUE ;
     };
     ListBox LB_COLOR
     {
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 50 , 170 ) ;
+        Pos = MAP_APPFONT ( 188 , 154 ) ;
         Size = MAP_APPFONT ( 60 , 68 ) ;
         DropDown = TRUE ;
         DDExtraWidth = TRUE ;
@@ -314,8 +314,8 @@ TabPage TP_COLUMN
     };
     FixedText FT_HEIGHT
     {
-        Pos = MAP_APPFONT ( 122 , 140 ) ;
-        Size = MAP_APPFONT ( 35 , 8 ) ;
+        Pos = MAP_APPFONT ( 86 , 156 ) ;
+        Size = MAP_APPFONT ( 30 , 8 ) ;
         Text [ en-US ] = "H~eight" ;
         Left = TRUE ;
     };
@@ -323,8 +323,8 @@ TabPage TP_COLUMN
     {
         HelpID = "sw:MetricField:TP_COLUMN:ED_HEIGHT";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 160 , 138 ) ;
-        Size = MAP_APPFONT ( 60 , 12 ) ;
+        Pos = MAP_APPFONT ( 119 , 154 ) ;
+        Size = MAP_APPFONT ( 35 , 12 ) ;
         TabStop = TRUE ;
         Left = TRUE ;
         Repeat = TRUE ;
@@ -339,16 +339,16 @@ TabPage TP_COLUMN
     };
     FixedText FT_POSITION
     {
-        Pos = MAP_APPFONT ( 122 , 156 ) ;
-        Size = MAP_APPFONT ( 35 , 8 ) ;
+        Pos = MAP_APPFONT ( 86 , 172 ) ;
+        Size = MAP_APPFONT ( 30 , 8 ) ;
         Left = TRUE ;
         Text [ en-US ] = "~Position" ;
     };
     ListBox LB_POSITION
     {
         HelpID = "sw:ListBox:TP_COLUMN:LB_POSITION";
-        Pos = MAP_APPFONT ( 160 , 154 ) ;
-        Size = MAP_APPFONT ( 60 , 40 ) ;
+        Pos = MAP_APPFONT ( 119 , 170 ) ;
+        Size = MAP_APPFONT ( 35 , 40 ) ;
         TabStop = TRUE ;
         DropDown = TRUE ;
         StringList [ en-US ] =
@@ -360,28 +360,14 @@ TabPage TP_COLUMN
     };
     FixedLine FL_LINETYPE
     {
-        Pos = MAP_APPFONT ( 6 , 127 ) ;
+        Pos = MAP_APPFONT ( 6 , 143 ) ;
         Size = MAP_APPFONT ( 248 , 8 ) ;
         Text [ en-US ] = "Separator line" ;
     };
-    FixedLine  FL_VERT
-    {
-        Pos = MAP_APPFONT ( 116 , 138 ) ;
-        Size = MAP_APPFONT ( 4 , 43 ) ;
-        Hide = TRUE ;
-        Vert = TRUE;
-    };
-    FixedLine   FL_PROPERTIES
-    {
-        Pos = MAP_APPFONT ( 121 , 127 ) ;
-        Size = MAP_APPFONT ( 133 , 8 ) ;
-        Hide = TRUE ;
-        Text [ en-US ] = "Properties";
-    };
     FixedText   FT_TEXTDIRECTION
     {
-        Pos = MAP_APPFONT ( 127 , 138 ) ;
-        Size = MAP_APPFONT ( 127 , 8 ) ;
+        Pos = MAP_APPFONT ( 12 , 60 ) ;
+        Size = MAP_APPFONT ( 60 , 8 ) ;
         Hide = TRUE ;
         Text [ en-US ] = "Text ~direction";
     };
@@ -389,7 +375,7 @@ TabPage TP_COLUMN
     {
         HelpID = "sw:ListBox:TP_COLUMN:LB_TEXTDIRECTION";
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 127 , 149 ) ;
+        Pos = MAP_APPFONT ( 75 , 58 ) ;
         Size = MAP_APPFONT ( 127 , 50 ) ;
         DropDown = TRUE ;
         Hide = TRUE ;
diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx
index 865e55c..04ca404 100644
--- a/sw/source/ui/inc/column.hxx
+++ b/sw/source/ui/inc/column.hxx
@@ -139,8 +139,6 @@ class SwColumnPage : public SfxTabPage
     FixedText		aLinePosLbl;
     ListBox			aLinePosDLB;
 
-    FixedLine       aVertFL;
-    FixedLine       aPropertiesFL;
     FixedText       aTextDirectionFT;
     ListBox         aTextDirectionLB;
 
commit 5000d925e3773b10e87008597cd49168f3f33f60
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Fri May 20 14:44:03 2011 +0200

    compatibility option for old size of small caps (bnc#691473)
    
    Version 3.2 had 66 as the small capitals size percentage, later
    changed to 80 (see e.g. http://openoffice.org/bugzilla/show_bug.cgi?id=1526).
    This however can destroy layout of old documents that rely on the old
    size. So for backwards compatibility the old value is used if either
    the .odt document has an option enabled or does not have the option
    at all (meaning it's an older .odt document). There's unfortunately
    a period when the new value was already in effect where this change
    can break those documents :-/.

diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
index 266be7f..4e83e72 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -81,6 +81,7 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
          TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
      INVERT_BORDER_SPACING,
          COLLAPSE_EMPTY_CELL_PARA,
+         SMALL_CAPS_PERCENTAGE_66,
          // COMPATIBILITY FLAGS END
 
          BROWSE_MODE,
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 4ff6238..72df51d 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -580,6 +580,7 @@ private:
     bool mbInvertBorderSpacing                      : 1;
     bool mbCollapseEmptyCellPara                    : 1;
     bool mbTabAtLeftIndentForParagraphsInList;             // #i89181# - see above
+    bool mbSmallCapsPercentage66;
 
     bool mbLastBrowseMode                           : 1;
 
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index edcbb2d..0086fc9 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -201,6 +201,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const
         case TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST: return mbTabAtLeftIndentForParagraphsInList;
         case INVERT_BORDER_SPACING: return mbInvertBorderSpacing;
         case COLLAPSE_EMPTY_CELL_PARA: return mbCollapseEmptyCellPara;
+        case SMALL_CAPS_PERCENTAGE_66: return mbSmallCapsPercentage66;
 
         case BROWSE_MODE: return mbLastBrowseMode; // Attention: normally the ViewShell has to be asked!
         case HTML_MODE: return mbHTMLMode;
@@ -331,6 +332,10 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
         case COLLAPSE_EMPTY_CELL_PARA:
             mbCollapseEmptyCellPara = value;
             break;
+
+        case SMALL_CAPS_PERCENTAGE_66:
+            mbSmallCapsPercentage66 = value;
+            break;
          // COMPATIBILITY FLAGS END
 
         case BROWSE_MODE: //can be used temporary (load/save) when no ViewShell is avaiable
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 49d4dea..0527ab9 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -356,6 +356,7 @@ SwDoc::SwDoc()
     mbTabAtLeftIndentForParagraphsInList    = false;        // hidden #i89181#
     mbInvertBorderSpacing                   = false;        // hidden
     mbCollapseEmptyCellPara                 = true;        // hidden
+    mbSmallCapsPercentage66                 = false;        // hidden
 
     //
     // COMPATIBILITY FLAGS END
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index bd29634..c26ba79 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -58,8 +58,9 @@ class SwSubFont : public SvxFont
     sal_uInt16	 	nOrgHeight;		// Hoehe inkl. Escapement/Proportion
     sal_uInt16	 	nOrgAscent;		// Ascent inkl. Escapement/Proportion
     sal_uInt16		nPropWidth;		// proportional width
+    bool smallCapsPercentage66;
     inline SwSubFont() : aSize(0,0)
-    { pMagic = NULL; nFntIndex = nOrgHeight = nOrgAscent = 0; nPropWidth =100; }
+    { pMagic = NULL; nFntIndex = nOrgHeight = nOrgAscent = 0; nPropWidth =100; smallCapsPercentage66 = false; }
 
     sal_uInt16 CalcEscAscent( const sal_uInt16 nOldAscent ) const;
     sal_uInt16 CalcEscHeight( const sal_uInt16 nOldHeight,
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index 4ee0af6..440e169 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -622,8 +622,13 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
     else
         pBigFont = pLastFont;
 
-    // Hier entsteht der Kleinbuchstabenfont:
-    aFont.SetProportion( (aFont.GetPropr() * SMALL_CAPS_PERCENTAGE ) / 100L );
+    // Older LO versions had 66 as the small caps percentage size, later changed to 80,
+    // therefore a backwards compatibility option is kept (otherwise layout is changed).
+    // NOTE: There are more uses of SMALL_CAPS_PERCENTAGE in editeng, but it seems they
+    // do not matter for Writer (and if they did it'd be pretty ugly to propagate
+    // the option there).
+    int smallCapsPercentage = smallCapsPercentage66 ? 66 : SMALL_CAPS_PERCENTAGE;
+    aFont.SetProportion( (aFont.GetPropr() * smallCapsPercentage ) / 100L );
     pMagic2 = NULL;
     nIndex2 = 0;
     SwFntAccess *pSmallFontAccess = new SwFntAccess( pMagic2, nIndex2, &aFont,
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 773d9e5..b0bc6c5 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -560,6 +560,12 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
         SetVertical( pAttrSet->GetCharRotate().GetValue() );
     else
         SetVertical( 0 );
+    if( pIDocumentSettingAccess && pIDocumentSettingAccess->get( IDocumentSettingAccess::SMALL_CAPS_PERCENTAGE_66 ))
+    {
+        aSub[ SW_LATIN ].smallCapsPercentage66 = true;
+        aSub[ SW_CJK ].smallCapsPercentage66 = true;
+        aSub[ SW_CTL ].smallCapsPercentage66 = true;
+    }
 }
 
 SwSubFont& SwSubFont::operator=( const SwSubFont &rFont )
@@ -571,6 +577,7 @@ SwSubFont& SwSubFont::operator=( const SwSubFont &rFont )
     nOrgAscent = rFont.nOrgAscent;
     nPropWidth = rFont.nPropWidth;
     aSize = rFont.aSize;
+    smallCapsPercentage66 = rFont.smallCapsPercentage66;
     return *this;
 }
 
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 78757d9..6f8cf88 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1189,6 +1189,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
     aSet.insert(String("UpdateFromTemplate", RTL_TEXTENCODING_ASCII_US));
     aSet.insert(String("PrinterIndependentLayout", RTL_TEXTENCODING_ASCII_US));
     aSet.insert(String("PrintEmptyPages", RTL_TEXTENCODING_ASCII_US));
+    aSet.insert(String("SmallCapsPercentage66", RTL_TEXTENCODING_ASCII_US));
 
     sal_Int32 nCount = aConfigProps.getLength();
     const PropertyValue* pValues = aConfigProps.getConstArray();
@@ -1217,6 +1218,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
     bool bClipAsCharacterAnchoredWriterFlyFrames( false );
     bool bUnixForceZeroExtLeading = false;
     bool bUseOldPrinterMetrics = false;
+    bool bSmallCapsPercentage66 = false;
 
     OUString sRedlineProtectionKey( RTL_CONSTASCII_USTRINGPARAM( "RedlineProtectionKey" ) );
 
@@ -1284,6 +1286,8 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
                     bUnixForceZeroExtLeading = true;
                 else if( pValues->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UseOldPrinterMetrics")) )
                     bUseOldPrinterMetrics = true;
+                else if( pValues->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SmallCapsPercentage66")) )
+                    bSmallCapsPercentage66 = true;
             }
             catch( Exception& )
             {
@@ -1429,6 +1433,16 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
     }
     // <--
 
+    // Old LO versions had 66 as the value for small caps percentage, later changed to 80.
+    // In order to keep backwards compatibility, SmallCapsPercentage66 option is written to .odt
+    // files, and the default for new documents is 'false'. Files without this option
+    // are considered to be old files, so set the compatibility option too.
+    if ( !bSmallCapsPercentage66 )
+    {
+        xProps->setPropertyValue(
+            OUString( RTL_CONSTASCII_USTRINGPARAM("SmallCapsPercentage66") ), makeAny( true ) );
+    }
+
     Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
     Reference < XText > xText = xTextDoc->getText();
     Reference<XUnoTunnel> xTextTunnel( xText, UNO_QUERY);
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index 639d0bd..907aaa2 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -122,7 +122,8 @@ enum SwDocumentSettingsPropertyHandles
     HANDLE_MODIFYPASSWORDINFO,
     HANDLE_MATH_BASELINE_ALIGNMENT,
     HANDLE_INVERT_BORDER_SPACING,
-    HANDLE_COLLAPSE_EMPTY_CELL_PARA
+    HANDLE_COLLAPSE_EMPTY_CELL_PARA,
+    HANDLE_SMALL_CAPS_PERCENTAGE_66
 };
 
 MasterPropertySetInfo * lcl_createSettingsInfo()
@@ -180,6 +181,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo()
         { RTL_CONSTASCII_STRINGPARAM("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, CPPUTYPE_BOOLEAN, 0, 0},
         { RTL_CONSTASCII_STRINGPARAM("InvertBorderSpacing"), HANDLE_INVERT_BORDER_SPACING, CPPUTYPE_BOOLEAN, 0, 0},
         { RTL_CONSTASCII_STRINGPARAM("CollapseEmptyCellPara"), HANDLE_COLLAPSE_EMPTY_CELL_PARA, CPPUTYPE_BOOLEAN, 0, 0},
+        { RTL_CONSTASCII_STRINGPARAM("SmallCapsPercentage66"), HANDLE_SMALL_CAPS_PERCENTAGE_66, CPPUTYPE_BOOLEAN, 0, 0},
 /*
  * As OS said, we don't have a view when we need to set this, so I have to
  * find another solution before adding them to this property set - MTG
@@ -705,6 +707,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
             mpDoc->set(IDocumentSettingAccess::COLLAPSE_EMPTY_CELL_PARA, bTmp);
         }
         break;
+        case HANDLE_SMALL_CAPS_PERCENTAGE_66:
+        {
+            sal_Bool bTmp = *(sal_Bool*)rValue.getValue();
+            mpDoc->set(IDocumentSettingAccess::SMALL_CAPS_PERCENTAGE_66, bTmp);
+        }
+        break;
         default:
             throw UnknownPropertyException();
     }
@@ -1050,6 +1058,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
             rValue.setValue( &bTmp, ::getBooleanCppuType() );
         }
         break;
+        case HANDLE_SMALL_CAPS_PERCENTAGE_66:
+        {
+            sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::SMALL_CAPS_PERCENTAGE_66 );
+            rValue.setValue( &bTmp, ::getBooleanCppuType() );
+        }
+        break;
         default:
             throw UnknownPropertyException();
     }
commit c5bc685a669b956f4d0cbd596791ce9cab84044d
Author: Noel Power <noel.power at novell.com>
Date:   Wed May 18 16:13:20 2011 +0100

    fix for fdo#36552
    
    fix up exported column widths
    
    Signed-off-by: Cedric Bosdonnat <cedric.bosdonnat.ooo at free.fr>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 74af00c..9fd3150 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1478,6 +1478,8 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
 
     // Cell prefered width
     SwTwips nWidth = GetGridCols( pTableTextNodeInfoInner )->at( pTableTextNodeInfoInner->getCell() );
+    if ( pTableTextNodeInfoInner->getCell() )
+        nWidth = nWidth - GetGridCols( pTableTextNodeInfoInner )->at( pTableTextNodeInfoInner->getCell() - 1 );
     m_pSerializer->singleElementNS( XML_w, XML_tcW,
            FSNS( XML_w, XML_w ), OString::valueOf( sal_Int32( nWidth ) ).getStr( ),
            FSNS( XML_w, XML_type ), "dxa",
@@ -1712,12 +1714,16 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
 
     // Write the table grid infos
     m_pSerializer->startElementNS( XML_w, XML_tblGrid, FSEND );
-
+    sal_Int32 nPrv = 0;
     ww8::GridColsPtr pGridCols = GetGridCols( pTableTextNodeInfoInner );
     for ( ww8::GridCols::const_iterator it = pGridCols->begin(); it != pGridCols->end(); ++it )
+    {
+        sal_Int32 nWidth  =  sal_Int32( *it ) - nPrv;
         m_pSerializer->singleElementNS( XML_w, XML_gridCol,
-               FSNS( XML_w, XML_w ), OString::valueOf( sal_Int32( *it ) ).getStr( ),
+               FSNS( XML_w, XML_w ), OString::valueOf( nWidth ).getStr( ),
                FSEND );
+        nPrv = sal_Int32( *it );
+    }
 
     m_pSerializer->endElementNS( XML_w, XML_tblGrid );
 }


More information about the Libreoffice-commits mailing list