ooo-build r12993 - in branches/ooo-build-2-4-1: . patches/src680



Author: pmladek
Date: Mon Jun 30 12:37:48 2008
New Revision: 12993
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12993&view=rev

Log:
2008-06-30  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/sc-fit-to-width-height-skip-breaks.diff: skip manual
	column/row breaks when the "fit to x pages wide and x pages tall" 
	option is used, similar to how we ignore manual breaks when fitting to
	x pages.  This is for Excel interoperability (n#404232, n#404563).
	
	* patches/dev300/apply: apply the above patch.



Added:
   branches/ooo-build-2-4-1/patches/src680/sc-fit-to-width-height-skip-breaks.diff
Modified:
   branches/ooo-build-2-4-1/ChangeLog
   branches/ooo-build-2-4-1/patches/src680/apply

Modified: branches/ooo-build-2-4-1/patches/src680/apply
==============================================================================
--- branches/ooo-build-2-4-1/patches/src680/apply	(original)
+++ branches/ooo-build-2-4-1/patches/src680/apply	Mon Jun 30 12:37:48 2008
@@ -819,6 +819,10 @@
 # overwrite character level font attributes when changing them at cell level.
 sc-overwrite-char-font-attrs.diff, n#374580, kohei
 
+# ignore manual breaks when the "fit to x pages wide and x pages tall" option
+# is used, for Excel interoperability.
+sc-fit-to-width-height-skip-breaks.diff, n#404232, n#404563, kohei
+
 [ CalcFixes < ooh680-m14]
 
 # make some symbols from svtools visible for the kde fpicker when compiling with gcc4

Added: branches/ooo-build-2-4-1/patches/src680/sc-fit-to-width-height-skip-breaks.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-2-4-1/patches/src680/sc-fit-to-width-height-skip-breaks.diff	Mon Jun 30 12:37:48 2008
@@ -0,0 +1,20 @@
+diff --git sc/source/core/data/table5.cxx sc/source/core/data/table5.cxx
+index 72be7a5..e9a678f 100644
+--- sc/source/core/data/table5.cxx
++++ sc/source/core/data/table5.cxx
+@@ -126,6 +126,15 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
+ 		DBG_ASSERT( pItem->ISA(SfxUInt16Item), "falsches Item" );
+ 		bSkipBreaks = ( ((const SfxUInt16Item*)pItem)->GetValue() > 0 );
+ 	}
++    
++    if (!bSkipBreaks && pStyleSet->GetItemState(ATTR_PAGE_SCALETO, false, &pItem) == SFX_ITEM_SET)
++    {
++        const ScPageScaleToItem& rScaleToItem = static_cast<const ScPageScaleToItem&>(
++            pStyleSet->Get(ATTR_PAGE_SCALETO));
++        if (rScaleToItem.GetWidth() > 0 || rScaleToItem.GetHeight() > 0)
++            // when fitting to a fixed width x height, ignore manual breaks.
++            bSkipBreaks = true;
++    }
+ 
+ 	//--------------------------------------------------------------------------
+ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]