[ooo-build-commit] .: 4 commits - patches/dev300

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Tue Sep 14 05:41:15 PDT 2010


 patches/dev300/apply                                      |    6 
 patches/dev300/sw-allow-negative-spacing.diff             |   40 -
 patches/dev300/sw-collapse-empty-table-par-like-html.diff |  439 --------------
 patches/dev300/sw-invert-border-spacing.diff              |  240 -------
 patches/dev300/sw-section-import-fix.diff                 |   25 
 5 files changed, 750 deletions(-)

New commits:
commit 238b69b765cfabf61082626c9b07e9b086d8d76d
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Tue Sep 14 14:40:43 2010 +0200

    sw-collapse-empty-table-par-like-html.diff: moved to git repos

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 2eb1b80..8a1e0eb 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2649,7 +2649,6 @@ solenv-installer-unopkg-call.diff, thorsten
 # (disabled) debug code extracting SdrOLE streams to some tmp location
 svx-debug-sdrolestreams.diff, thorsten
 sal-disable-backtrace.diff, thorsten
-sw-collapse-empty-table-par-like-html.diff, n#376690, flr
 
 sw-table-join-fix-i99267.diff, n#417814, flr
 svtools-svrtf-token-ignore-case.diff, n#417818, flr
diff --git a/patches/dev300/sw-collapse-empty-table-par-like-html.diff b/patches/dev300/sw-collapse-empty-table-par-like-html.diff
deleted file mode 100644
index 8917cad..0000000
--- a/patches/dev300/sw-collapse-empty-table-par-like-html.diff
+++ /dev/null
@@ -1,439 +0,0 @@
----
- sw/inc/IDocumentSettingAccess.hxx        |    1 +
- sw/inc/doc.hxx                           |    1 +
- sw/inc/ndtxt.hxx                         |    2 +
- sw/source/core/crsr/callnk.cxx           |   50 ++++++++++++++++++++++++++++++
- sw/source/core/doc/doc.cxx               |    4 ++
- sw/source/core/doc/docnew.cxx            |    1 +
- sw/source/core/inc/frame.hxx             |    4 ++
- sw/source/core/layout/calcmove.cxx       |   43 +++++++++++++++++++++++++
- sw/source/core/layout/findfrm.cxx        |    9 +++++
- sw/source/core/text/frmpaint.cxx         |   34 +++++++++++---------
- sw/source/core/text/porrst.cxx           |   16 +++++++++
- sw/source/filter/ww8/ww8par.cxx          |    1 +
- sw/source/filter/ww8/ww8par2.cxx         |   14 --------
- sw/source/ui/uno/SwXDocumentSettings.cxx |   14 ++++++++
- 14 files changed, 165 insertions(+), 29 deletions(-)
-
-diff --git sw/inc/IDocumentSettingAccess.hxx sw/inc/IDocumentSettingAccess.hxx
-index 1b38208..0a9039d 100644
---- sw/inc/IDocumentSettingAccess.hxx
-+++ sw/inc/IDocumentSettingAccess.hxx
-@@ -82,6 +82,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,
-          // COMPATIBILITY FLAGS END
- 
-          BROWSE_MODE,
-diff --git sw/inc/doc.hxx sw/inc/doc.hxx
-index 42c336b..09a3862 100644
---- sw/inc/doc.hxx
-+++ sw/inc/doc.hxx
-@@ -599,6 +599,7 @@ private:
-     bool mbTabRelativeToIndent                      : 1;   // #i24363# tab stops relative to indent
-     bool mbProtectForm                              : 1;
-     bool mbInvertBorderSpacing                      : 1;
-+    bool mbCollapseEmptyCellPara                    : 1;
-     bool mbTabAtLeftIndentForParagraphsInList;             // OD 2008-06-05 #i89181# - see above
- 
-     // #i78591#
-diff --git sw/inc/ndtxt.hxx sw/inc/ndtxt.hxx
-index c63efbe..6d60b48 100644
---- sw/inc/ndtxt.hxx
-+++ sw/inc/ndtxt.hxx
-@@ -856,6 +856,8 @@ public:
-     virtual ::com::sun::star::uno::Reference<
-         ::com::sun::star::rdf::XMetadatable > MakeUnoObject();
- 
-+    bool IsCollapse() const;
-+
-     DECL_FIXEDMEMPOOL_NEWDEL(SwTxtNode)
- };
- 
-diff --git sw/source/core/crsr/callnk.cxx sw/source/core/crsr/callnk.cxx
-index 9e37e40..f72be56 100644
---- sw/source/core/crsr/callnk.cxx
-+++ sw/source/core/crsr/callnk.cxx
-@@ -43,10 +43,15 @@
- #include <doc.hxx>
- #include <frmfmt.hxx>
- #include <txtfrm.hxx>
-+#include <tabfrm.hxx>
-+#include <rowfrm.hxx>
-+#include <fmtfsize.hxx>
- #include <ndtxt.hxx>
- #include <flyfrm.hxx>
- #include <breakit.hxx>
- 
-+#include<vcl/window.hxx>
-+
- 
- SwCallLink::SwCallLink( SwCrsrShell & rSh, ULONG nAktNode, xub_StrLen nAktCntnt,
-                         BYTE nAktNdTyp, long nLRPos, bool bAktSelection )
-@@ -97,6 +102,51 @@ SwCallLink::~SwCallLink()
-     if( !pCNd )
-         return;
- 
-+    bool bUpdatedTable = false;
-+    SwFrm *myFrm=pCNd->GetFrm();
-+    if (myFrm!=NULL)
-+    {
-+        // We need to emulated a change of the row height in order
-+        // to have the complete row redrawn
-+        SwRowFrm* pRow = myFrm->FindRowFrm( );
-+        if ( pRow )
-+        {
-+            const SwTableLine* pLine = pRow->GetTabLine( );
-+            SwFmtFrmSize pSize = pLine->GetFrmFmt( )->GetFrmSize( );
-+            pRow->Modify( NULL, &pSize );
-+
-+            bUpdatedTable = true;
-+        }
-+    }
-+
-+    const SwDoc *pDoc=rShell.GetDoc();
-+    const SwCntntNode *pNode = NULL;
-+    if ( ( pDoc != NULL && nNode < pDoc->GetNodes( ).Count( ) ) )
-+    {
-+        pNode = pDoc->GetNodes()[nNode]->GetCntntNode();
-+    }
-+    if ( pNode != NULL )
-+    {
-+        SwFrm *myFrm2=pNode->GetFrm();
-+        if (myFrm2!=NULL)
-+        {
-+            // We need to emulated a change of the row height in order
-+            // to have the complete row redrawn
-+            SwRowFrm* pRow = myFrm2->FindRowFrm();
-+            if ( pRow )
-+            {
-+                const SwTableLine* pLine = pRow->GetTabLine( );
-+                SwFmtFrmSize pSize = pLine->GetFrmFmt( )->GetFrmSize( );
-+                pRow->Modify( NULL, &pSize );
-+
-+                bUpdatedTable = true;
-+            }
-+        }
-+    }
-+
-+    if ( bUpdatedTable )
-+        rShell.GetWin( )->Invalidate( 0 );
-+
-     xub_StrLen nCmp, nAktCntnt = pCurCrsr->GetPoint()->nContent.GetIndex();
-     USHORT nNdWhich = pCNd->GetNodeType();
-     ULONG nAktNode = pCurCrsr->GetPoint()->nNode.GetIndex();
-diff --git sw/source/core/doc/doc.cxx sw/source/core/doc/doc.cxx
-index 087ce19..eb5bb74 100755
---- sw/source/core/doc/doc.cxx
-+++ sw/source/core/doc/doc.cxx
-@@ -195,6 +195,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;
-          // COMPATIBILITY FLAGS END
- 
-         case BROWSE_MODE: return mbBrowseMode;
-@@ -321,6 +322,9 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
-     case INVERT_BORDER_SPACING:
-         mbInvertBorderSpacing = value;
-     break;
-+        case COLLAPSE_EMPTY_CELL_PARA:
-+            mbCollapseEmptyCellPara = value;
-+         break;
-          // COMPATIBILITY FLAGS END
- 
-         case BROWSE_MODE:
-diff --git sw/source/core/doc/docnew.cxx sw/source/core/doc/docnew.cxx
-index 15f86f2..6ee9dbc 100644
---- sw/source/core/doc/docnew.cxx
-+++ sw/source/core/doc/docnew.cxx
-@@ -384,6 +384,7 @@ SwDoc::SwDoc() :
-     mbTabAtLeftIndentForParagraphsInList    = false;        // hidden
-     // <--
-     mbInvertBorderSpacing                   = false;        // hidden
-+    mbCollapseEmptyCellPara                 = true;        // hidden
- 
-     //
-     // COMPATIBILITY FLAGS END
-diff --git sw/source/core/inc/frame.hxx sw/source/core/inc/frame.hxx
-index 6d61b3a..ca1deea 100644
---- sw/source/core/inc/frame.hxx
-+++ sw/source/core/inc/frame.hxx
-@@ -624,6 +624,7 @@ public:
-     SwRootFrm			*FindRootFrm();
-     SwPageFrm	   		*FindPageFrm();
-     SwFrm				*FindColFrm();
-+    SwRowFrm			*FindRowFrm();
-     SwFtnBossFrm		*FindFtnBossFrm( BOOL bFootnotes = FALSE );
-     SwTabFrm			*ImplFindTabFrm();
-     SwFtnFrm			*ImplFindFtnFrm();
-@@ -910,6 +911,9 @@ public:
- 
-     // FME 2007-08-30 #i81146# new loop control
-     void ValidateThisAndAllLowers( const USHORT nStage );
-+
-+public:
-+    bool IsCollapse() const;
- };
- 
- inline BOOL	SwFrm::IsInDocBody() const
-diff --git sw/source/core/layout/calcmove.cxx sw/source/core/layout/calcmove.cxx
-index 28d3a9b..3afa737 100644
---- sw/source/core/layout/calcmove.cxx
-+++ sw/source/core/layout/calcmove.cxx
-@@ -63,6 +63,8 @@
- #include <flyfrms.hxx>
- // <--
- 
-+#include <ndtxt.hxx>
-+
- //------------------------------------------------------------------------
- //				Move-Methoden
- //------------------------------------------------------------------------
-@@ -952,6 +954,42 @@ void SwLayoutFrm::MakeAll()
- |*	Letzte Aenderung	MA 03. Mar. 96
- |*
- |*************************************************************************/
-+bool SwTxtNode::IsCollapse() const
-+{
-+    if ( GetDoc()->get( IDocumentSettingAccess::COLLAPSE_EMPTY_CELL_PARA ) &&  GetTxt().Len()==0 ) {
-+        ULONG nIdx=GetIndex();
-+        const SwEndNode *pNdBefore=GetNodes()[nIdx-1]->GetEndNode();
-+        const SwEndNode *pNdAfter=GetNodes()[nIdx+1]->GetEndNode();
-+
-+        // The paragraph is collapsed only if the NdAfter is the end of a cell
-+        bool bInTable = this->FindTableNode( ) != NULL;
-+
-+        SwSortedObjs* pObjs = this->GetFrm()->GetDrawObjs( );
-+        sal_uInt32 nObjs = ( pObjs != NULL ) ? pObjs->Count( ) : 0;
-+
-+        if ( pNdBefore!=NULL && pNdAfter!=NULL && nObjs == 0 && bInTable ) {
-+            return true;
-+        } else {
-+            return false;
-+        }
-+    } else
-+        return false;
-+}
-+
-+bool SwFrm::IsCollapse() const
-+{
-+    if (IsTxtFrm()) {
-+        const SwTxtFrm *pTxtFrm=(SwTxtFrm*)this;
-+        const SwTxtNode *pTxtNode=pTxtFrm->GetTxtNode();
-+        if (pTxtNode && pTxtNode->IsCollapse()) {
-+            return true;
-+        } else {
-+            return false;
-+        }
-+    } else {
-+        return false;
-+    }
-+}
- 
- BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
- {
-@@ -1054,6 +1092,11 @@ BOOL SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
- 
-             // OD 2004-03-02 #106629# - use new method <CalcLowerSpace(..)>
-             SwTwips nLower = CalcLowerSpace( &rAttrs );
-+        if (IsCollapse()) {
-+        ViewShell *pSh = GetShell();
-+        nUpper=0;
-+        nLower=0;
-+        }
- //            // in balanced columned section frames we do not want the
- //            // common border
- //            sal_Bool bCommonBorder = sal_True;
-diff --git sw/source/core/layout/findfrm.cxx sw/source/core/layout/findfrm.cxx
-index 1f7856c..cf4c84e 100644
---- sw/source/core/layout/findfrm.cxx
-+++ sw/source/core/layout/findfrm.cxx
-@@ -596,6 +596,15 @@ SwFrm *SwFrm::FindColFrm()
-     return pFrm;
- }
- 
-+SwRowFrm *SwFrm::FindRowFrm()
-+{
-+    SwFrm *pFrm = this;
-+    do
-+    {	pFrm = pFrm->GetUpper();
-+    } while ( pFrm && !pFrm->IsRowFrm() );
-+    return dynamic_cast< SwRowFrm* >( pFrm );
-+}
-+
- SwFrm* SwFrm::FindFooterOrHeader()
- {
-     SwFrm* pRet = this;
-diff --git sw/source/core/text/frmpaint.cxx sw/source/core/text/frmpaint.cxx
-index e8fc5b3..4b0246c 100644
---- sw/source/core/text/frmpaint.cxx
-+++ sw/source/core/text/frmpaint.cxx
-@@ -566,21 +566,25 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const
-                     }
-                 }
- 
--                const XubString aTmp( CH_PAR );
--                SwDrawTextInfo aDrawInf( pSh, *pSh->GetOut(), 0, aTmp, 0, 1 );
--                aDrawInf.SetLeft( rRect.Left() );
--                aDrawInf.SetRight( rRect.Right() );
--                aDrawInf.SetPos( aPos );
--                aDrawInf.SetSpace( 0 );
--                aDrawInf.SetKanaComp( 0 );
--                aDrawInf.SetWrong( NULL );
--                aDrawInf.SetGrammarCheck( NULL );
--                aDrawInf.SetSmartTags( NULL ); // SMARTTAGS
--                aDrawInf.SetFrm( this );
--                aDrawInf.SetFont( pFnt );
--                aDrawInf.SetSnapToGrid( sal_False );
--
--                pFnt->_DrawText( aDrawInf );
-+                // Don't show the paragraph mark for collapsed paragraphs, when they are hidden
-+                if ( EmptyHeight( ) > 1 )
-+                {
-+                    const XubString aTmp( CH_PAR );
-+                    SwDrawTextInfo aDrawInf( pSh, *pSh->GetOut(), 0, aTmp, 0, 1 );
-+                    aDrawInf.SetLeft( rRect.Left() );
-+                    aDrawInf.SetRight( rRect.Right() );
-+                    aDrawInf.SetPos( aPos );
-+                    aDrawInf.SetSpace( 0 );
-+                    aDrawInf.SetKanaComp( 0 );
-+                    aDrawInf.SetWrong( NULL );
-+                    aDrawInf.SetGrammarCheck( NULL );
-+                    aDrawInf.SetSmartTags( NULL ); // SMARTTAGS
-+                    aDrawInf.SetFrm( this );
-+                    aDrawInf.SetFont( pFnt );
-+                    aDrawInf.SetSnapToGrid( sal_False );
-+
-+                    pFnt->_DrawText( aDrawInf );
-+                }
-                 delete pClip;
-             }
-             delete pFnt;
-diff --git sw/source/core/text/porrst.cxx sw/source/core/text/porrst.cxx
-index 9ca3d5d..3a84683 100644
---- sw/source/core/text/porrst.cxx
-+++ sw/source/core/text/porrst.cxx
-@@ -58,6 +58,8 @@
- #include <IDocumentSettingAccess.hxx>
- #include <IDocumentDeviceAccess.hxx>
- 
-+#include <crsrsh.hxx>
-+
- /*************************************************************************
-  *                      class SwTmpEndPortion
-  *************************************************************************/
-@@ -228,6 +230,20 @@ SwLinePortion *SwArrowPortion::Compress() { return this; }
- 
- SwTwips SwTxtFrm::EmptyHeight() const
- {
-+    if (IsCollapse()) {
-+        ViewShell *pSh = GetShell();
-+        if ( pSh->IsA( TYPE(SwCrsrShell) ) ) {
-+            SwCrsrShell *pCrSh=(SwCrsrShell*)pSh;
-+            SwCntntFrm *pCurrFrm=pCrSh->GetCurrFrm();
-+            if (pCurrFrm==(SwCntntFrm*)this) {
-+                // do nothing
-+            } else {
-+                return 1;
-+            }
-+        } else {
-+            return 1;
-+        }
-+    }
-     ASSERT( ! IsVertical() || ! IsSwapped(),"SwTxtFrm::EmptyHeight with swapped frame" );
- 
-     SwFont *pFnt;
-diff --git sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.cxx
-index f7b7385..a5292dd 100644
---- sw/source/filter/ww8/ww8par.cxx
-+++ sw/source/filter/ww8/ww8par.cxx
-@@ -1395,6 +1395,7 @@ void SwWW8ImplReader::ImportDop()
-     // <--
- 
-     rDoc.set(IDocumentSettingAccess::INVERT_BORDER_SPACING, true);
-+    rDoc.set(IDocumentSettingAccess::COLLAPSE_EMPTY_CELL_PARA, true);
- 
-     //
-     // COMPATIBILITY FLAGS END
-diff --git sw/source/filter/ww8/ww8par2.cxx sw/source/filter/ww8/ww8par2.cxx
-index 176abfa..5207ef6 100644
---- sw/source/filter/ww8/ww8par2.cxx
-+++ sw/source/filter/ww8/ww8par2.cxx
-@@ -3639,22 +3639,8 @@ bool lcl_PamContainsFly(SwPaM & rPam)
- void SwWW8ImplReader::TabCellEnd()
- {
-     if (nInTable && pTableDesc)
--    {
-         pTableDesc->TableCellEnd();
- 
--        if (bReadTable
--            && pWFlyPara == NULL
--            && mpTableEndPaM.get() != NULL
--            && (! SwPaM::Overlap(*pPaM, *mpTableEndPaM))
--            && SwPaM::LessThan(*mpTableEndPaM, *pPaM)
--            && mpTableEndPaM->GetPoint()->nNode.GetNode().IsTxtNode()
--            && !lcl_PamContainsFly(*mpTableEndPaM)
--            )
--        {
--            rDoc.DelFullPara(*mpTableEndPaM);
--        }
--    }
--
-     bFirstPara = true;    // We have come to the end of a cell so FirstPara flag
-     bReadTable = false;
-     mpTableEndPaM.reset();
-diff --git sw/source/ui/uno/SwXDocumentSettings.cxx sw/source/ui/uno/SwXDocumentSettings.cxx
-index f2c84b4..70690bc 100644
---- sw/source/ui/uno/SwXDocumentSettings.cxx
-+++ sw/source/ui/uno/SwXDocumentSettings.cxx
-@@ -125,7 +125,8 @@ enum SwDocumentSettingsPropertyHandles
-     HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
-     // <--
-     HANDLE_MODIFYPASSWORDINFO,
--    HANDLE_INVERT_BORDER_SPACING
-+    HANDLE_INVERT_BORDER_SPACING,
-+    HANDLE_COLLAPSE_EMPTY_CELL_PARA
- };
- 
- MasterPropertySetInfo * lcl_createSettingsInfo()
-@@ -179,6 +180,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo()
-         { RTL_CONSTASCII_STRINGPARAM("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, CPPUTYPE_BOOLEAN, 0, 0},
-         { RTL_CONSTASCII_STRINGPARAM("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, CPPUTYPE_PROPERTYVALUE, 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},
- /*
-  * 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
-@@ -678,6 +680,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
-             mpDoc->set(IDocumentSettingAccess::INVERT_BORDER_SPACING, bTmp);
-     }
-     break;
-+        case HANDLE_COLLAPSE_EMPTY_CELL_PARA:
-+        {
-+            sal_Bool bTmp = *(sal_Bool*)rValue.getValue();
-+            mpDoc->set(IDocumentSettingAccess::COLLAPSE_EMPTY_CELL_PARA, bTmp);
-+        }
-+        break;
-         default:
-             throw UnknownPropertyException();
-     }
-@@ -1011,6 +1019,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
-             rValue.setValue( &bTmp, ::getBooleanCppuType() );
-     }
-     break;
-+        case HANDLE_COLLAPSE_EMPTY_CELL_PARA:
-+        {
-+            sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::COLLAPSE_EMPTY_CELL_PARA );
-+            rValue.setValue( &bTmp, ::getBooleanCppuType() );
-+        }
-+        break;
-         default:
-             throw UnknownPropertyException();
-     }
--- 
-1.7.0.1
-
commit df14fc58c4f0a1dcc16c445e1a2f111811350acc
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Tue Sep 14 14:38:12 2010 +0200

    sw-invert-border-spacing.diff: moved to git repos

diff --git a/patches/dev300/apply b/patches/dev300/apply
index b659699..2eb1b80 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2649,7 +2649,6 @@ solenv-installer-unopkg-call.diff, thorsten
 # (disabled) debug code extracting SdrOLE streams to some tmp location
 svx-debug-sdrolestreams.diff, thorsten
 sal-disable-backtrace.diff, thorsten
-sw-invert-border-spacing.diff, n#391591, flr
 sw-collapse-empty-table-par-like-html.diff, n#376690, flr
 
 sw-table-join-fix-i99267.diff, n#417814, flr
diff --git a/patches/dev300/sw-invert-border-spacing.diff b/patches/dev300/sw-invert-border-spacing.diff
deleted file mode 100644
index e03d669..0000000
--- a/patches/dev300/sw-invert-border-spacing.diff
+++ /dev/null
@@ -1,240 +0,0 @@
----
- sw/inc/IDocumentSettingAccess.hxx        |    1 +
- sw/inc/doc.hxx                           |    1 +
- sw/source/core/doc/doc.cxx               |    4 ++++
- sw/source/core/doc/docnew.cxx            |    1 +
- sw/source/core/layout/frmtool.cxx        |    9 +++++++--
- sw/source/core/layout/paintfrm.cxx       |    2 +-
- sw/source/filter/rtf/swparrtf.cxx        |    2 +-
- sw/source/filter/ww8/ww8par.cxx          |    2 ++
- sw/source/filter/ww8/ww8par6.cxx         |   17 +++++++++++++----
- sw/source/ui/uno/SwXDocumentSettings.cxx |   16 ++++++++++++++--
- 10 files changed, 45 insertions(+), 10 deletions(-)
-
-diff --git sw/inc/IDocumentSettingAccess.hxx sw/inc/IDocumentSettingAccess.hxx
-index 58a6df6..1b38208 100644
---- sw/inc/IDocumentSettingAccess.hxx
-+++ sw/inc/IDocumentSettingAccess.hxx
-@@ -81,6 +81,7 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
-          // --> OD 2008-06-05 #i89181#
-          TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
-          // <--
-+     INVERT_BORDER_SPACING,
-          // COMPATIBILITY FLAGS END
- 
-          BROWSE_MODE,
-diff --git sw/inc/doc.hxx sw/inc/doc.hxx
-index ab413e1..42c336b 100644
---- sw/inc/doc.hxx
-+++ sw/inc/doc.hxx
-@@ -598,6 +598,7 @@ private:
-     bool mbOldPrinterMetrics                        : 1;   // FME 2007-05-14 #147385#
-     bool mbTabRelativeToIndent                      : 1;   // #i24363# tab stops relative to indent
-     bool mbProtectForm                              : 1;
-+    bool mbInvertBorderSpacing                      : 1;
-     bool mbTabAtLeftIndentForParagraphsInList;             // OD 2008-06-05 #i89181# - see above
- 
-     // #i78591#
-diff --git sw/source/core/doc/doc.cxx sw/source/core/doc/doc.cxx
-index d25e4bd..087ce19 100755
---- sw/source/core/doc/doc.cxx
-+++ sw/source/core/doc/doc.cxx
-@@ -194,6 +194,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const
-         // --> OD 2008-06-05 #i89181#
-         case TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST: return mbTabAtLeftIndentForParagraphsInList;
-         // <--
-+    case INVERT_BORDER_SPACING: return mbInvertBorderSpacing;
-          // COMPATIBILITY FLAGS END
- 
-         case BROWSE_MODE: return mbBrowseMode;
-@@ -317,6 +318,9 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
-             mbTabAtLeftIndentForParagraphsInList = value;
-         break;
-         // <--
-+    case INVERT_BORDER_SPACING:
-+        mbInvertBorderSpacing = value;
-+    break;
-          // COMPATIBILITY FLAGS END
- 
-         case BROWSE_MODE:
-diff --git sw/source/core/doc/docnew.cxx sw/source/core/doc/docnew.cxx
-index 3b81863..15f86f2 100644
---- sw/source/core/doc/docnew.cxx
-+++ sw/source/core/doc/docnew.cxx
-@@ -383,6 +383,7 @@ SwDoc::SwDoc() :
-     // --> OD 2008-06-05 #i89181#
-     mbTabAtLeftIndentForParagraphsInList    = false;        // hidden
-     // <--
-+    mbInvertBorderSpacing                   = false;        // hidden
- 
-     //
-     // COMPATIBILITY FLAGS END
-diff --git sw/source/core/layout/frmtool.cxx sw/source/core/layout/frmtool.cxx
-index b525043..dd0a3eb 100644
---- sw/source/core/layout/frmtool.cxx
-+++ sw/source/core/layout/frmtool.cxx
-@@ -2002,8 +2002,9 @@ void SwBorderAttrs::_CalcBottom()
- 
- long SwBorderAttrs::CalcRight( const SwFrm* pCaller ) const
- {
--    long nRight;
-+    long nRight=0;
- 
-+    if (!pCaller->IsTxtFrm() || !((SwTxtFrm*)pCaller)->GetTxtNode()->GetDoc()->get(IDocumentSettingAccess::INVERT_BORDER_SPACING)) {
-     // OD 23.01.2003 #106895# - for cell frame in R2L text direction the left
-     // and right border are painted on the right respectively left.
-     if ( pCaller->IsCellFrm() && pCaller->IsRightToLeft() )
-@@ -2011,6 +2012,7 @@ long SwBorderAttrs::CalcRight( const SwFrm* pCaller ) const
-     else
-         nRight = CalcRightLine();
- 
-+    }
-     // for paragraphs, "left" is "before text" and "right" is "after text"
-     if ( pCaller->IsTxtFrm() && pCaller->IsRightToLeft() )
-         nRight += rLR.GetLeft();
-@@ -2030,14 +2032,16 @@ long SwBorderAttrs::CalcRight( const SwFrm* pCaller ) const
- 
- long SwBorderAttrs::CalcLeft( const SwFrm *pCaller ) const
- {
--    long nLeft;
-+    long nLeft=0;
- 
-+    if (!pCaller->IsTxtFrm() || !((SwTxtFrm*)pCaller)->GetTxtNode()->GetDoc()->get(IDocumentSettingAccess::INVERT_BORDER_SPACING)) {
-     // OD 23.01.2003 #106895# - for cell frame in R2L text direction the left
-     // and right border are painted on the right respectively left.
-     if ( pCaller->IsCellFrm() && pCaller->IsRightToLeft() )
-         nLeft = CalcRightLine();
-     else
-         nLeft = CalcLeftLine();
-+    }
- 
-     // for paragraphs, "left" is "before text" and "right" is "after text"
-     if ( pCaller->IsTxtFrm() && pCaller->IsRightToLeft() )
-@@ -2045,6 +2049,7 @@ long SwBorderAttrs::CalcLeft( const SwFrm *pCaller ) const
-     else
-         nLeft += rLR.GetLeft();
- 
-+
-     // --> OD 2008-01-21 #newlistlevelattrs#
-     // correction: do not retrieve left margin for numbering in R2L-layout
- //    if ( pCaller->IsTxtFrm() )
-diff --git sw/source/core/layout/paintfrm.cxx sw/source/core/layout/paintfrm.cxx
-index 3c6d082..7a432fd 100644
---- sw/source/core/layout/paintfrm.cxx
-+++ sw/source/core/layout/paintfrm.cxx
-@@ -4662,7 +4662,7 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
-                          const SwBorderAttrs &rAttrs ) const
- {
-     //fuer (Row,Body,Ftn,Root,Column,NoTxt) gibt's hier nix zu tun
--    if ( (GetType() & 0x90C5) || (Prt().SSize() == Frm().SSize()) )
-+    if ( (GetType() & 0x90C5) )
-         return;
- 
-     if ( (GetType() & 0x2000) && 	//Cell
-diff --git sw/source/filter/rtf/swparrtf.cxx sw/source/filter/rtf/swparrtf.cxx
-index e437f24..fccac64 100644
---- sw/source/filter/rtf/swparrtf.cxx
-+++ sw/source/filter/rtf/swparrtf.cxx
-@@ -296,7 +296,7 @@ void SwRTFParser::Continue( int nToken )
-             // --> FME 2006-02-10 #131283#
-             pDoc->set(IDocumentSettingAccess::TABLE_ROW_KEEP, true);
-             pDoc->set(IDocumentSettingAccess::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, true);
--
-+        pDoc->set(IDocumentSettingAccess::INVERT_BORDER_SPACING, true);
-             //
-             // COMPATIBILITY FLAGS END
-             //
-diff --git sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.cxx
-index e89e330..f7b7385 100644
---- sw/source/filter/ww8/ww8par.cxx
-+++ sw/source/filter/ww8/ww8par.cxx
-@@ -1394,6 +1394,8 @@ void SwWW8ImplReader::ImportDop()
-     rDoc.set(IDocumentSettingAccess::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, true);
-     // <--
- 
-+    rDoc.set(IDocumentSettingAccess::INVERT_BORDER_SPACING, true);
-+
-     //
-     // COMPATIBILITY FLAGS END
-     //
-diff --git sw/source/filter/ww8/ww8par6.cxx sw/source/filter/ww8/ww8par6.cxx
-index 037dbe1..cdc0959 100644
---- sw/source/filter/ww8/ww8par6.cxx
-+++ sw/source/filter/ww8/ww8par6.cxx
-@@ -4779,10 +4779,19 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
- 
-                 maTracer.Log(sw::log::eBorderDistOutside);
- 
--                aBox.SetDistance( (USHORT)aInnerDist.Left(), BOX_LINE_LEFT );
--                aBox.SetDistance( (USHORT)aInnerDist.Top(), BOX_LINE_TOP );
--                aBox.SetDistance( (USHORT)aInnerDist.Right(), BOX_LINE_RIGHT );
--                aBox.SetDistance( (USHORT)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
-+        if ((nBorder & WW8_LEFT)==WW8_LEFT) {
-+            aBox.SetDistance( (USHORT)aInnerDist.Left(), BOX_LINE_LEFT );
-+        }
-+        if ((nBorder & WW8_TOP)==WW8_TOP) {
-+            aBox.SetDistance( (USHORT)aInnerDist.Top(), BOX_LINE_TOP );
-+        }
-+        if ((nBorder & WW8_RIGHT)==WW8_RIGHT) {
-+            aBox.SetDistance( (USHORT)aInnerDist.Right(), BOX_LINE_RIGHT );
-+        }
-+
-+        if ((nBorder & WW8_BOT)==WW8_BOT) {
-+            aBox.SetDistance( (USHORT)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
-+        }
- 
-                 NewAttr( aBox );
- 
-diff --git sw/source/ui/uno/SwXDocumentSettings.cxx sw/source/ui/uno/SwXDocumentSettings.cxx
-index df8e740..f2c84b4 100644
---- sw/source/ui/uno/SwXDocumentSettings.cxx
-+++ sw/source/ui/uno/SwXDocumentSettings.cxx
-@@ -124,7 +124,8 @@ enum SwDocumentSettingsPropertyHandles
-     // --> OD 2008-06-05 #i89181#
-     HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
-     // <--
--    HANDLE_MODIFYPASSWORDINFO
-+    HANDLE_MODIFYPASSWORDINFO,
-+    HANDLE_INVERT_BORDER_SPACING
- };
- 
- MasterPropertySetInfo * lcl_createSettingsInfo()
-@@ -177,7 +178,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo()
-         // --> OD 2008-06-05 #i89181#
-         { RTL_CONSTASCII_STRINGPARAM("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, CPPUTYPE_BOOLEAN, 0, 0},
-         { RTL_CONSTASCII_STRINGPARAM("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, CPPUTYPE_PROPERTYVALUE, 0,   0},
--
-+        { RTL_CONSTASCII_STRINGPARAM("InvertBorderSpacing"), HANDLE_INVERT_BORDER_SPACING, 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
-@@ -671,6 +672,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
-                     uno::Reference< uno::XInterface >() );
-         }
-         break;
-+    case HANDLE_INVERT_BORDER_SPACING:
-+    {
-+            sal_Bool bTmp = *(sal_Bool*)rValue.getValue();
-+            mpDoc->set(IDocumentSettingAccess::INVERT_BORDER_SPACING, bTmp);
-+    }
-+    break;
-         default:
-             throw UnknownPropertyException();
-     }
-@@ -998,7 +1005,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
-             rValue <<= mpDocSh->GetModifyPasswordInfo();
-         }
-         break;
--
-+    case HANDLE_INVERT_BORDER_SPACING:
-+    {
-+            sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::INVERT_BORDER_SPACING);
-+            rValue.setValue( &bTmp, ::getBooleanCppuType() );
-+    }
-+    break;
-         default:
-             throw UnknownPropertyException();
-     }
--- 
-1.7.0.1
-
commit 1cfddfc0cd766d79aa6e489acd5f77150fe47f7b
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Tue Sep 14 14:37:35 2010 +0200

    sw-allow-negative-spacing.diff: Moved to git repos

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 19cdab6..b659699 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2551,8 +2551,6 @@ win32-restore-associations.diff, n#530872, tml
 [ Fixes ]
 fix-ppt-linespacing-import-export.diff, n#355302, rodo
 
-sw-allow-negative-spacing.diff, n#364534, freuter
-
 # Activate the changed upstreamed by cbosdo02 CWS
 fields-enable.diff, cbosdo
 field-patch-uno-fix.diff, cbosdo #upstreamed?
diff --git a/patches/dev300/sw-allow-negative-spacing.diff b/patches/dev300/sw-allow-negative-spacing.diff
deleted file mode 100644
index 01eb79b..0000000
--- a/patches/dev300/sw-allow-negative-spacing.diff
+++ /dev/null
@@ -1,40 +0,0 @@
----
- sw/source/core/text/itrform2.cxx |   22 ++++++++++++++++++++++
- 1 files changed, 22 insertions(+), 0 deletions(-)
-
-diff --git sw/source/core/text/itrform2.cxx sw/source/core/text/itrform2.cxx
-index eb39c9e..e86cafd 100644
---- sw/source/core/text/itrform2.cxx
-+++ sw/source/core/text/itrform2.cxx
-@@ -1740,6 +1740,28 @@ void SwTxtFormatter::CalcRealHeight( sal_Bool bNewLine )
-             switch( pSpace->GetLineSpaceRule() )
-             {
-                 case SVX_LINE_SPACE_AUTO:
-+            if (pSpace->GetInterLineSpaceRule()==SVX_INTER_LINE_SPACE_PROP) {
-+                        long nTmp = pSpace->GetPropLineSpace();
-+                        if (nTmp<100) { // code adaped from fixed line height
-+                            nTmp *= nLineHeight;
-+                            nTmp /= 100;
-+                            if( !nTmp )
-+                                ++nTmp;
-+                            nLineHeight = (KSHORT)nTmp;
-+/*
-+                            //@TODO figure out how WW maps ascent and descent
-+                            //in case of prop  line spacing <100%
-+                            KSHORT nAsc = ( 4 * nLineHeight ) / 5;  // 80%
-+                            if( nAsc < pCurr->GetAscent() ||
-+                                nLineHeight - nAsc < pCurr->Height() -
-+pCurr->GetAscent() )
-+                                pCurr->SetClipping( sal_True );
-+                            pCurr->SetAscent( nAsc );
-+*/
-+                            pCurr->Height( nLineHeight );
-+                            pInf->GetParaPortion()->SetFixLineHeight();
-+                        }
-+                    }
-                 break;
-                 case SVX_LINE_SPACE_MIN:
-                 {
--- 
-1.7.0.1
-
commit 7f40923a94e96f178d354ccf302dc8c6f1314ce2
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Tue Sep 14 14:30:40 2010 +0200

    sw-section-import-fix.diff: Moved top git repos

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 95768ff..19cdab6 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2551,8 +2551,6 @@ win32-restore-associations.diff, n#530872, tml
 [ Fixes ]
 fix-ppt-linespacing-import-export.diff, n#355302, rodo
 
-sw-section-import-fix.diff, n#364533, freuter
-
 sw-allow-negative-spacing.diff, n#364534, freuter
 
 # Activate the changed upstreamed by cbosdo02 CWS
diff --git a/patches/dev300/sw-section-import-fix.diff b/patches/dev300/sw-section-import-fix.diff
deleted file mode 100644
index 9edb6a8..0000000
--- a/patches/dev300/sw-section-import-fix.diff
+++ /dev/null
@@ -1,25 +0,0 @@
----
- sw/source/filter/ww8/ww8par.cxx |    7 ++++---
- 1 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.cxx
-index 2945cde..1101227 100644
---- sw/source/filter/ww8/ww8par.cxx
-+++ sw/source/filter/ww8/ww8par.cxx
-@@ -2708,9 +2708,10 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
-             else if (!nInTable)
-             {
-                 // Always insert a txtnode for a column break, e.g. ##
--                AppendTxtNode(*pPaM->GetPoint());
--                rDoc.InsertPoolItem(*pPaM,
--                    SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK), 0);
-+                SwCntntNode *pCntNd=pPaM->GetCntntNode();
-+                if (pCntNd!=NULL && pCntNd->Len()>0) // if par is empty not break is needed
-+                    AppendTxtNode(*pPaM->GetPoint());
-+                rDoc.InsertPoolItem(*pPaM, SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK), 0);
-             }
-             break;
-         case 0x7:
--- 
-1.7.0.1
-


More information about the ooo-build-commit mailing list