ooo-build r14393 - in trunk: . patches/dev300
- From: freuter svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14393 - in trunk: . patches/dev300
- Date: Wed, 22 Oct 2008 15:05:52 +0000 (UTC)
Author: freuter
Date: Wed Oct 22 15:05:51 2008
New Revision: 14393
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14393&view=rev
Log:
MS-like border spacing (n#391591)
Added:
trunk/patches/dev300/sw-invert-border-spacing.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Wed Oct 22 15:05:51 2008
@@ -2729,6 +2729,7 @@
cws-impress163-sd.diff, thorsten
cws-impress163-svx.diff, thorsten
cws-impress163-slideshow.diff, thorsten
+sw-invert-border-spacing.diff, n#391591, flr
[ MinGW ]
SectionOwner => jholesov
Added: trunk/patches/dev300/sw-invert-border-spacing.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/sw-invert-border-spacing.diff Wed Oct 22 15:05:51 2008
@@ -0,0 +1,237 @@
+diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
+index 2478dbf..1923d5a 100644
+--- sw/inc/IDocumentSettingAccess.hxx
++++ sw/inc/IDocumentSettingAccess.hxx
+@@ -84,6 +84,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 a/sw/inc/doc.hxx b/sw/inc/doc.hxx
+index c971473..588b8bd 100644
+--- sw/inc/doc.hxx
++++ sw/inc/doc.hxx
+@@ -609,6 +609,7 @@ private:
+ bool mbUnixForceZeroExtLeading : 1; // FME 2006-10-09 #i60945#
+ bool mbOldPrinterMetrics : 1; // FME 2007-05-14 #147385#
+ bool mbProtectForm : 1;
++ bool mbInvertBorderSpacing : 1;
+ bool mbTabRelativeToIndent; // #i24363# tab stops relative to indent
+ bool mbTabAtLeftIndentForParagraphsInList; // OD 2008-06-05 #i89181# - see above
+
+diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
+index 1e63ae6..c690edb 100644
+--- sw/source/core/doc/doc.cxx
++++ sw/source/core/doc/doc.cxx
+@@ -184,6 +184,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;
+@@ -307,6 +308,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 a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
+index 7821682..4034134 100644
+--- sw/source/core/doc/docnew.cxx
++++ sw/source/core/doc/docnew.cxx
+@@ -380,6 +380,7 @@ SwDoc::SwDoc() :
+ // --> OD 2008-06-05 #i89181#
+ mbTabAtLeftIndentForParagraphsInList = false; // hidden
+ // <--
++ mbInvertBorderSpacing = false; // hidden
+
+ //
+ // COMPATIBILITY FLAGS END
+diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
+index 0421344..df08b8e 100644
+--- sw/source/core/layout/frmtool.cxx
++++ sw/source/core/layout/frmtool.cxx
+@@ -1990,20 +1990,22 @@ void SwBorderAttrs::_CalcBottom()
+
+ long SwBorderAttrs::CalcRight( const SwFrm* pCaller ) const
+ {
+- long nRight;
++ long nRight=0;
+
+- // 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() )
+- nRight = CalcLeftLine();
+- else
+- nRight = CalcRightLine();
+-
+- // for paragraphs, "left" is "before text" and "right" is "after text"
+- if ( pCaller->IsTxtFrm() && pCaller->IsRightToLeft() )
+- nRight += rLR.GetLeft();
+- else
+- nRight += rLR.GetRight();
++ 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() )
++ nRight = CalcLeftLine();
++ else
++ nRight = CalcRightLine();
++
++ // for paragraphs, "left" is "before text" and "right" is "after text"
++ if ( pCaller->IsTxtFrm() && pCaller->IsRightToLeft() )
++ nRight += rLR.GetLeft();
++ else
++ nRight += rLR.GetRight();
++ }
+
+ // --> OD 2008-01-21 #newlistlevelattrs#
+ // correction: retrieve left margin for numbering in R2L-layout
+@@ -2018,20 +2020,23 @@ long SwBorderAttrs::CalcRight( const SwFrm* pCaller ) const
+
+ long SwBorderAttrs::CalcLeft( const SwFrm *pCaller ) const
+ {
+- long nLeft;
++ long nLeft=0;
+
+- // 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() )
+- nLeft += rLR.GetRight();
+- else
+- nLeft += rLR.GetLeft();
++ 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() )
++ nLeft += rLR.GetRight();
++ else
++ nLeft += rLR.GetLeft();
++ }
++
+
+ // --> OD 2008-01-21 #newlistlevelattrs#
+ // correction: do not retrieve left margin for numbering in R2L-layout
+diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
+index b022499..8d8f310 100644
+--- sw/source/core/layout/paintfrm.cxx
++++ sw/source/core/layout/paintfrm.cxx
+@@ -4630,7 +4630,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 a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
+index 16bad6c..5a3691f 100644
+--- sw/source/filter/ww8/ww8par.cxx
++++ sw/source/filter/ww8/ww8par.cxx
+@@ -1475,6 +1475,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 a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
+index c1405d5..288f62d 100644
+--- sw/source/filter/ww8/ww8par6.cxx
++++ sw/source/filter/ww8/ww8par6.cxx
+@@ -4707,10 +4707,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 a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
+index d187c0e..80c699e 100644
+--- sw/source/ui/uno/SwXDocumentSettings.cxx
++++ sw/source/ui/uno/SwXDocumentSettings.cxx
+@@ -131,6 +131,7 @@ enum SwDocumentSettingsPropertyHandles
+ // --> OD 2008-06-05 #i89181#
+ HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
+ // <--
++ ,HANDLE_INVERT_BORDER_SPACING
+ };
+
+ MasterPropertySetInfo * lcl_createSettingsInfo()
+@@ -184,7 +185,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo()
+ { RTL_CONSTASCII_STRINGPARAM("ProtectForm"), HANDLE_PROTECT_FORM, CPPUTYPE_BOOLEAN, 0, 0},
+ // --> 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("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
+@@ -678,6 +679,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
+ }
+ break;
+ // <--
++ case HANDLE_INVERT_BORDER_SPACING:
++ {
++ sal_Bool bTmp = *(sal_Bool*)rValue.getValue();
++ mpDoc->set(IDocumentSettingAccess::INVERT_BORDER_SPACING, bTmp);
++ }
++ break;
+ default:
+ throw UnknownPropertyException();
+ }
+@@ -1004,7 +1011,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
+ }
+ break;
+ // <--
+-
++ case HANDLE_INVERT_BORDER_SPACING:
++ {
++ sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::INVERT_BORDER_SPACING);
++ rValue.setValue( &bTmp, ::getBooleanCppuType() );
++ }
++ break;
+ default:
+ throw UnknownPropertyException();
+ }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]