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

Fridrich Strba fridrich at kemper.freedesktop.org
Wed Sep 15 05:26:21 PDT 2010


 patches/dev300/apply                               |   83 -
 patches/dev300/calc-filter-xml-free-context.diff   |   19 
 patches/dev300/calc-multiline-pattern-fix.diff     |   40 
 patches/dev300/chart-odf-always-calc-a1.diff       |  148 ---
 patches/dev300/sc-autofilter-empty-nonempty.diff   |   51 -
 patches/dev300/sc-change-record-dnd.diff           |   53 -
 patches/dev300/sc-datapilot-autoformat.diff        |  378 ---------
 patches/dev300/sc-date-fix.diff                    |   44 -
 patches/dev300/sc-dp-gridlayout.diff               |  123 --
 patches/dev300/sc-drwlayer-units.diff              |  107 --
 patches/dev300/sc-excel-chart-default-xlabels.diff |   29 
 patches/dev300/sc-extra-cell-margins.diff          |   23 
 patches/dev300/sc-filters-fill-fix.diff            |   29 
 patches/dev300/sc-natural-sort.diff                |  629 ---------------
 patches/dev300/sc-overwrite-char-font-attrs.diff   |  879 ---------------------
 patches/dev300/sc-print-lines.diff                 |   22 
 patches/dev300/sc-print-selected-sheets.diff       |   70 -
 patches/dev300/sc-read-only-colrow-resize.diff     |   56 -
 patches/dev300/sc-save-password-minlength.diff     |  154 ---
 patches/dev300/sc-xls-builtin-name-scope.diff      |  290 ------
 20 files changed, 3227 deletions(-)

New commits:
commit 7302be884fd34cf2753e0ecf96261f28fd863c09
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 12:34:26 2010 +0200

    chart-odf-always-calc-a1.diff: Migrate to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 57c2255..b401924 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -528,11 +528,6 @@ sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 # keybindings: <ctrl> +/‑ to insert/delete a complete line in calc (X#62530)
 calc-new-acceleration.diff, i#67029, michael
 
-# always store ranges in ODF using Calc A1 formula syntax.
-chart-odf-always-calc-a1.diff, n#463305, kohei
-
-[ CalcFixes ]
-
 enable-sheet-protection-options.diff, kohei
 
 # Dynyamically resize filtered range when new data rows are present.
diff --git a/patches/dev300/chart-odf-always-calc-a1.diff b/patches/dev300/chart-odf-always-calc-a1.diff
deleted file mode 100644
index 820c09c..0000000
--- a/patches/dev300/chart-odf-always-calc-a1.diff
+++ /dev/null
@@ -1,148 +0,0 @@
----
- sc/inc/rangeutl.hxx              |    5 +++
- sc/source/core/tool/rangeutl.cxx |   57 ++++++++++++++++++++++++++++++++++++-
- 2 files changed, 60 insertions(+), 2 deletions(-)
-
-diff --git sc/inc/rangeutl.hxx sc/inc/rangeutl.hxx
-index b8af2f2..af8b7f1 100644
---- sc/inc/rangeutl.hxx
-+++ sc/inc/rangeutl.hxx
-@@ -35,6 +35,11 @@
- #include <com/sun/star/table/CellRangeAddress.hpp>
- #include <com/sun/star/uno/Sequence.hxx>
- 
-+// Chart always stores cell range addresses using CONV_OOO convention. But
-+// if parsing with CONV_OOO fails, try parsing it using the current address
-+// convention.
-+#define CHART_ADDRESS_CONV_WORKAROUND 1
-+
- //------------------------------------------------------------------------
- 
- class SvStream;
-diff --git sc/source/core/tool/rangeutl.cxx sc/source/core/tool/rangeutl.cxx
-index 97f55d4..82034d2 100644
---- sc/source/core/tool/rangeutl.cxx
-+++ sc/source/core/tool/rangeutl.cxx
-@@ -476,6 +476,11 @@ sal_Bool ScRangeStringConverter::GetAddressFromString(
-     {
-         if ((rAddress.Parse( sToken, const_cast<ScDocument*>(pDocument), eConv ) & SCA_VALID) == SCA_VALID)
-             return true;
-+#if CHART_ADDRESS_CONV_WORKAROUND
-+        ::formula::FormulaGrammar::AddressConvention eConvUI = pDocument->GetAddressConvention();
-+        if (eConv != eConvUI)
-+            return ((rAddress.Parse(sToken, const_cast<ScDocument*>(pDocument), eConvUI) & SCA_VALID) == SCA_VALID);
-+#endif
-     }
-     return sal_False;
- }
-@@ -502,6 +507,11 @@ sal_Bool ScRangeStringConverter::GetRangeFromString(
-             if ( aUIString.GetChar(0) == (sal_Unicode) '.' )
-                 aUIString.Erase( 0, 1 );
-             bResult = ((rRange.aStart.Parse( aUIString, const_cast<ScDocument*> (pDocument), eConv) & SCA_VALID) == SCA_VALID);
-+#if CHART_ADDRESS_CONV_WORKAROUND
-+            if (!bResult && eConv != eConv)
-+                bResult = ((rRange.aStart.Parse(
-+                    aUIString, const_cast<ScDocument*>(pDocument), eConv) & SCA_VALID) == SCA_VALID);
-+#endif
-             rRange.aEnd = rRange.aStart;
-         }
-         else
-@@ -526,6 +536,15 @@ sal_Bool ScRangeStringConverter::GetRangeFromString(
-                                 eConv) & SCA_VALID) == SCA_VALID) &&
-                           ((rRange.aEnd.Parse( aUIString.Copy((xub_StrLen)nIndex+1), const_cast<ScDocument*>(pDocument),
-                                 eConv) & SCA_VALID) == SCA_VALID);
-+#if CHART_ADDRESS_CONV_WORKAROUND
-+                if (!bResult && eConv != eConv)
-+                {
-+                    bResult = ((rRange.aStart.Parse( aUIString.Copy(0, (xub_StrLen)nIndex), const_cast<ScDocument*>(pDocument),
-+                                    eConv) & SCA_VALID) == SCA_VALID) &&
-+                              ((rRange.aEnd.Parse( aUIString.Copy((xub_StrLen)nIndex+1), const_cast<ScDocument*>(pDocument),
-+                                    eConv) & SCA_VALID) == SCA_VALID);
-+                }
-+#endif
-             }
-         }
-     }
-@@ -860,6 +879,8 @@ static void lcl_appendCellRangeAddress(
- 
- void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, const OUString& rXMLRange, ScDocument* pDoc )
- {
-+    FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
-+    const OUString aRangeSep = GetScCompilerNativeSymbol(ocSep);
-     const sal_Unicode cSep = ' ';
-     const sal_Unicode cQuote = '\'';
- 
-@@ -912,13 +933,37 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con
-             rtl::OUString aBuf;
-             USHORT nRet = aCell1.Parse(aBeginCell, pDoc, FormulaGrammar::CONV_OOO, &aExtInfo1);
-             if ((nRet & SCA_VALID) != SCA_VALID)
-+            {
-                 // first cell is invalid.
-+#if CHART_ADDRESS_CONV_WORKAROUND
-+                if (eConv == FormulaGrammar::CONV_OOO)
-+                    continue;
-+
-+                nRet = aCell1.Parse(aBeginCell, pDoc, eConv, &aExtInfo1);
-+                if ((nRet & SCA_VALID) != SCA_VALID)
-+                    // first cell is really invalid.
-+                    continue;
-+#else
-                 continue;
-+#endif
-+            }
- 
-             nRet = aCell2.Parse(aEndCell, pDoc, FormulaGrammar::CONV_OOO, &aExtInfo2);
-             if ((nRet & SCA_VALID) != SCA_VALID)
-+            {
-                 // second cell is invalid.
-+#if CHART_ADDRESS_CONV_WORKAROUND
-+                if (eConv == FormulaGrammar::CONV_OOO)
-+                    continue;
-+
-+                nRet = aCell2.Parse(aEndCell, pDoc, eConv, &aExtInfo2);
-+                if ((nRet & SCA_VALID) != SCA_VALID)
-+                    // second cell is really invalid.
-+                    continue;
-+#else
-                 continue;
-+#endif
-+            }
- 
-             if (aExtInfo1.mnFileId != aExtInfo2.mnFileId || aExtInfo1.mbExternal != aExtInfo2.mbExternal)
-                 // external info inconsistency.
-@@ -929,7 +974,7 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con
-             if (bFirst)
-                 bFirst = false;
-             else
--                aRetStr.appendAscii(";");
-+                aRetStr.append(aRangeSep);
- 
-             lcl_appendCellRangeAddress(aRetStr, pDoc, aCell1, aCell2, aExtInfo1, aExtInfo2);
-         }
-@@ -940,14 +985,22 @@ void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, con
-             ScAddress aCell;
-             USHORT nRet = aCell.Parse(aToken, pDoc, ::formula::FormulaGrammar::CONV_OOO, &aExtInfo);
-             if ((nRet & SCA_VALID) != SCA_VALID)
-+            {
-+#if CHART_ADDRESS_CONV_WORKAROUND
-+                nRet = aCell.Parse(aToken, pDoc, eConv, &aExtInfo);
-+                if ((nRet & SCA_VALID) != SCA_VALID)
-+                    continue;
-+#else
-                 continue;
-+#endif
-+            }
- 
-             // Looks good!
- 
-             if (bFirst)
-                 bFirst = false;
-             else
--                aRetStr.appendAscii(";");
-+                aRetStr.append(aRangeSep);
- 
-             lcl_appendCellAddress(aRetStr, pDoc, aCell, aExtInfo);
-         }
--- 
-1.7.0.1
-
commit d3f8e329781ea705d2fb9e573b363ca6a56a9f33
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 12:32:02 2010 +0200

    sc-overwrite-char-font-attrs.diff: Migrate to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 0e14f76..57c2255 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -528,9 +528,6 @@ sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 # keybindings: <ctrl> +/‑ to insert/delete a complete line in calc (X#62530)
 calc-new-acceleration.diff, i#67029, michael
 
-# overwrite character level font attributes when changing them at cell level.
-sc-overwrite-char-font-attrs.diff, n#374580, i#53545, i#96853, kohei
-
 # always store ranges in ODF using Calc A1 formula syntax.
 chart-odf-always-calc-a1.diff, n#463305, kohei
 
diff --git a/patches/dev300/sc-overwrite-char-font-attrs.diff b/patches/dev300/sc-overwrite-char-font-attrs.diff
deleted file mode 100644
index bd1f5f6..0000000
--- a/patches/dev300/sc-overwrite-char-font-attrs.diff
+++ /dev/null
@@ -1,879 +0,0 @@
----
- sc/inc/attarray.hxx              |   10 +++-
- sc/inc/cell.hxx                  |   51 ++++++++++++++++++++
- sc/inc/column.hxx                |    6 ++-
- sc/inc/document.hxx              |    6 ++-
- sc/inc/table.hxx                 |    6 ++-
- sc/source/core/data/attarray.cxx |   37 ++++++++++++++-
- sc/source/core/data/cell2.cxx    |   94 ++++++++++++++++++++++++++++++++++++++
- sc/source/core/data/column.cxx   |    9 ++--
- sc/source/core/data/document.cxx |   11 ++--
- sc/source/core/data/table2.cxx   |    9 ++--
- sc/source/ui/docshell/docsh.cxx  |   46 +++++++++---------
- sc/source/ui/inc/undoblk.hxx     |    7 +++
- sc/source/ui/inc/undocell.hxx    |   11 ++++-
- sc/source/ui/undo/undoblk3.cxx   |   26 ++++++++++
- sc/source/ui/undo/undocell.cxx   |   24 ++++++++--
- sc/source/ui/view/viewfunc.cxx   |   37 ++++++++++-----
- 16 files changed, 326 insertions(+), 64 deletions(-)
-
-diff --git sc/inc/attarray.hxx sc/inc/attarray.hxx
-index 5e6b4df..f3a3361 100644
---- sc/inc/attarray.hxx
-+++ sc/inc/attarray.hxx
-@@ -32,6 +32,7 @@
- #include "attrib.hxx"
- 
- class ScDocument;
-+class ScEditDataArray;
- class ScMarkArray;
- class ScPatternAttr;
- class ScStyleSheet;
-@@ -102,6 +103,9 @@ friend void lcl_IterGetNumberFormat( ULONG& nFormat,
-                             SCROW nStartRow, SCROW nEndRow,
-                             BOOL bLeft, SCCOL nDistRight, BOOL bTop, SCROW nDistBottom );
- 
-+    void RemoveCellCharAttribs( SCROW nStartRow, SCROW nEndRow,
-+                              const ScPatternAttr* pPattern, ScEditDataArray* pDataArray );
-+
- public:
-             ScAttrArray( SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc );
-             ~ScAttrArray();
-@@ -124,9 +128,11 @@ public:
-                             SCROW nStartRow, SCROW nEndRow, BOOL bLeft, SCCOL nDistRight );
- 
-     void	SetPattern( SCROW nRow, const ScPatternAttr* pPattern, BOOL bPutToPool = FALSE );
--    void	SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr* pPattern, BOOL bPutToPool = FALSE);
-+    void	SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr* pPattern,
-+                            BOOL bPutToPool = FALSE, ScEditDataArray* pDataArray = NULL );
-     void	ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet* pStyle );
--    void	ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCache* pCache );
-+    void	ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCache* pCache,
-+                            ScEditDataArray* pDataArray = NULL );
-     void	ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
-                                 const SvxBorderLine* pLine, BOOL bColorOnly );
- 
-diff --git sc/inc/cell.hxx sc/inc/cell.hxx
-index ac9e84b..c5f17a4 100644
---- sc/inc/cell.hxx
-+++ sc/inc/cell.hxx
-@@ -31,6 +31,9 @@
- #include <stddef.h>
- 
- #include <set>
-+#include <vector>
-+#include <boost/shared_ptr.hpp>
-+
- #include <tools/mempool.hxx>
- #include <svl/listener.hxx>
- #include "global.hxx"
-@@ -56,6 +59,7 @@ class SvtBroadcaster;
- class ScCodeArray;
- class ScProgress;
- class ScPostIt;
-+class ScPatternAttr;
- 
- // ============================================================================
- 
-@@ -276,6 +280,53 @@ public:
-     void			GetString( String& rString ) const;
- 
-     const EditTextObject* GetData() const	{ return pData; }
-+
-+    /** Removes character attribute based on new pattern attributes. */
-+    void            RemoveCharAttribs( const ScPatternAttr& rAttr );
-+};
-+
-+// ============================================================================
-+
-+class ScEditDataArray
-+{
-+public:
-+    class Item
-+    {
-+    public:
-+        explicit Item(SCTAB nTab, SCCOL nCol, SCROW nRow,
-+                      EditTextObject* pOldData, EditTextObject* pNewData);
-+        ~Item();
-+
-+        const EditTextObject* GetOldData() const;
-+        const EditTextObject* GetNewData() const;
-+        SCTAB GetTab() const;
-+        SCCOL GetCol() const;
-+        SCROW GetRow() const;
-+
-+    private:
-+        Item(); // disabled
-+
-+    private:
-+        ::boost::shared_ptr<EditTextObject> mpOldData;
-+        ::boost::shared_ptr<EditTextObject> mpNewData;
-+        SCTAB mnTab;
-+        SCCOL mnCol;
-+        SCROW mnRow;
-+
-+    };
-+
-+    ScEditDataArray();
-+    ~ScEditDataArray();
-+
-+    void AddItem(SCTAB nTab, SCCOL nCol, SCROW nRow,
-+                 EditTextObject* pOldData, EditTextObject* pNewData);
-+
-+    const Item* First();
-+    const Item* Next();
-+
-+private:
-+    ::std::vector<Item>::const_iterator maIter;
-+    ::std::vector<Item> maArray;
- };
- 
- // ============================================================================
-diff --git sc/inc/column.hxx sc/inc/column.hxx
-index 53e1120..7987301 100644
---- sc/inc/column.hxx
-+++ sc/inc/column.hxx
-@@ -53,6 +53,7 @@ class ScAttrIterator;
- class ScAttrArray;
- class ScBaseCell;
- class ScDocument;
-+class ScEditDataArray;
- class ScFormulaCell;
- class ScMarkData;
- class ScPatternAttr;
-@@ -311,7 +312,8 @@ public:
- 
-     void		ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr );
-     void		ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr );
--    void		ApplyPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& rPatAttr );
-+    void		ApplyPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& rPatAttr,
-+                                  ScEditDataArray* pDataArray = NULL );
-     void		SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, BOOL bPutToPool = FALSE );
-     void		SetPatternArea( SCROW nStartRow, SCROW nEndRow,
-                                 const ScPatternAttr& rPatAttr, BOOL bPutToPool = FALSE );
-@@ -343,7 +345,7 @@ public:
- 
-     void		RemoveProtected( SCROW nStartRow, SCROW nEndRow );
- 
--    SCsROW		ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark );
-+    SCsROW		ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray = NULL );
-     void        DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark );
- 
-     void		ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark );
-diff --git sc/inc/document.hxx sc/inc/document.hxx
-index c434b56..7313e02 100644
---- sc/inc/document.hxx
-+++ sc/inc/document.hxx
-@@ -1191,7 +1191,8 @@ public:
-                                     const ScPatternAttr& rAttr );
-     SC_DLLPUBLIC void			ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
-                                         SCCOL nEndCol, SCROW nEndRow,
--                                        const ScMarkData& rMark, const ScPatternAttr& rAttr );
-+                                        const ScMarkData& rMark, const ScPatternAttr& rAttr,
-+                                        ScEditDataArray* pDataArray = NULL );
-     SC_DLLPUBLIC void			ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
-                                             SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
-                                             const ScPatternAttr& rAttr );
-@@ -1253,7 +1254,8 @@ public:
-                             SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
-                             const String& sValStr, double& nX);
- 
--    void			ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark );
-+    void			ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark,
-+                                           ScEditDataArray* pDataArray = NULL );
-     void            DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark );
-     void			DeleteSelectionTab( SCTAB nTab, USHORT nDelFlag, const ScMarkData& rMark );
- 
-diff --git sc/inc/table.hxx sc/inc/table.hxx
-index cea90b6..0bbf7da 100644
---- sc/inc/table.hxx
-+++ sc/inc/table.hxx
-@@ -64,6 +64,7 @@ class ScAutoFormatData;
- class ScBaseCell;
- class ScDocument;
- class ScDrawLayer;
-+class ScEditDataArray;
- class ScFormulaCell;
- class ScOutlineTable;
- class ScPostIt;
-@@ -526,7 +527,8 @@ public:
- 
-     void		ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr );
-     void		ApplyPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr );
--    void		ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScPatternAttr& rAttr );
-+    void		ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
-+                                  const ScPatternAttr& rAttr, ScEditDataArray* pDataArray = NULL );
-     void		SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr, BOOL bPutToPool = FALSE )
-                     {
-                         if (ValidColRow(rPos.Col(),rPos.Row()))
-@@ -557,7 +559,7 @@ public:
-     BOOL		ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, INT16 nFlags );
-     BOOL		RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, INT16 nFlags );
- 
--    void		ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark );
-+    void		ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray = NULL );
-     void        DeleteSelection( USHORT nDelFlag, const ScMarkData& rMark );
- 
-     void		ClearSelectionItems( const USHORT* pWhich, const ScMarkData& rMark );
-diff --git sc/source/core/data/attarray.cxx sc/source/core/data/attarray.cxx
-index 79eb1be..d5001ad 100644
---- sc/source/core/data/attarray.cxx
-+++ sc/source/core/data/attarray.cxx
-@@ -38,6 +38,7 @@
- #include <editeng/bolnitem.hxx>
- #include <editeng/frmdiritem.hxx>
- #include <editeng/shaditem.hxx>
-+#include <editeng/editobj.hxx>
- #include <svl/poolcach.hxx>
- #include <editeng/fontitem.hxx>
- #include <unotools/fontcvt.hxx>
-@@ -53,6 +54,7 @@
- #include "rechead.hxx"
- #include "globstr.hrc"
- #include "segmenttree.hxx"
-+#include "cell.hxx"
- 
- #undef DBG_INVALIDATE
- #define DBGOUTPUT(s) \
-@@ -299,8 +301,31 @@ void ScAttrArray::SetPattern( SCROW nRow, const ScPatternAttr* pPattern, BOOL bP
-     SetPatternArea( nRow, nRow, pPattern, bPutToPool );
- }
- 
-+void ScAttrArray::RemoveCellCharAttribs( SCROW nStartRow, SCROW nEndRow,
-+                                       const ScPatternAttr* pPattern, ScEditDataArray* pDataArray )
-+{
-+    for (SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow)
-+    {
-+        ScBaseCell* pCell;
-+        pDocument->GetCell(nCol, nRow, nTab, pCell);
-+        if (pCell && pCell->GetCellType() == CELLTYPE_EDIT)
-+        {
-+            EditTextObject* pOldData = NULL;
-+            ScEditCell* pEditCell = static_cast<ScEditCell*>(pCell);
-+            if (pDataArray)
-+                pOldData = pEditCell->GetData()->Clone();
-+            pEditCell->RemoveCharAttribs(*pPattern);
-+            if (pDataArray)
-+            {
-+                EditTextObject* pNewData = pEditCell->GetData()->Clone();
-+                pDataArray->AddItem(nTab, nCol, nRow, pOldData, pNewData);
-+            }
-+        }
-+    }
-+}
- 
--void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern, BOOL bPutToPool )
-+void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern,
-+                                 BOOL bPutToPool, ScEditDataArray* pDataArray )
- {
-     if (ValidRow(nStartRow) && ValidRow(nEndRow))
-     {
-@@ -470,6 +495,12 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
-                     pData[nInsert-1].nRow = nStartRow - 1;
-                 pData[nInsert].nRow = nEndRow;
-                 pData[nInsert].pPattern = pPattern;
-+
-+                // Remove character attributes from these cells if the pattern
-+                // is applied during normal session.
-+                if (pDataArray)
-+                    RemoveCellCharAttribs(nStartRow, nEndRow, pPattern, pDataArray);
-+
-                 nCount++;
-             }
- 
-@@ -711,7 +742,7 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow,
- #undef SET_LINE
- 
- 
--void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCache* pCache )
-+void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCache* pCache, ScEditDataArray* pDataArray )
- {
- #ifdef DBG_UTIL
-     TestData();
-@@ -746,7 +777,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
-                 {
-                     if (nY1 < nStartRow) nY1=nStartRow;
-                     if (nY2 > nEndRow) nY2=nEndRow;
--                    SetPatternArea( nY1, nY2, pNewPattern );
-+                    SetPatternArea( nY1, nY2, pNewPattern, false, pDataArray );
-                     Search( nStart, nPos );
-                 }
-                 else
-diff --git sc/source/core/data/cell2.cxx sc/source/core/data/cell2.cxx
-index c056c39..f2a1429 100644
---- sc/source/core/data/cell2.cxx
-+++ sc/source/core/data/cell2.cxx
-@@ -51,6 +51,8 @@
- #include "editutil.hxx"
- #include "chgtrack.hxx"
- #include "externalrefmgr.hxx"
-+#include "scitems.hxx"
-+#include "patattr.hxx"
- 
- using namespace formula;
- 
-@@ -139,6 +141,28 @@ void ScEditCell::GetString( String& rString ) const
-         rString.Erase();
- }
- 
-+void ScEditCell::RemoveCharAttribs( const ScPatternAttr& rAttr )
-+{
-+    const struct {
-+        USHORT nAttrType;
-+        USHORT nCharType;
-+    } AttrTypeMap[] = {
-+        { ATTR_FONT,        EE_CHAR_FONTINFO },
-+        { ATTR_FONT_HEIGHT, EE_CHAR_FONTHEIGHT },
-+        { ATTR_FONT_WEIGHT, EE_CHAR_WEIGHT },
-+        { ATTR_FONT_COLOR,  EE_CHAR_COLOR }
-+    };
-+    USHORT nMapCount = sizeof(AttrTypeMap) / sizeof(AttrTypeMap[0]);
-+
-+    const SfxItemSet& rSet = rAttr.GetItemSet();
-+    const SfxPoolItem* pItem;
-+    for (USHORT i = 0; i < nMapCount; ++i)
-+    {
-+        if ( rSet.GetItemState(AttrTypeMap[i].nAttrType, false, &pItem) == SFX_ITEM_SET )
-+            pData->RemoveCharAttribs(AttrTypeMap[i].nCharType);
-+    }
-+}
-+
- void ScEditCell::SetTextObject( const EditTextObject* pObject,
-             const SfxItemPool* pFromPool )
- {
-@@ -174,6 +198,76 @@ void ScEditCell::SetTextObject( const EditTextObject* pObject,
-         pData = NULL;
- }
- 
-+ScEditDataArray::ScEditDataArray()
-+{
-+}
-+
-+ScEditDataArray::~ScEditDataArray()
-+{
-+}
-+
-+void ScEditDataArray::AddItem(SCTAB nTab, SCCOL nCol, SCROW nRow,
-+                              EditTextObject* pOldData, EditTextObject* pNewData)
-+{
-+    maArray.push_back(Item(nTab, nCol, nRow, pOldData, pNewData));
-+}
-+
-+const ScEditDataArray::Item* ScEditDataArray::First()
-+{
-+    maIter = maArray.begin();
-+    if (maIter == maArray.end())
-+        return NULL;
-+    return &(*maIter++);
-+}
-+
-+const ScEditDataArray::Item* ScEditDataArray::Next()
-+{
-+    if (maIter == maArray.end())
-+        return NULL;
-+    return &(*maIter++);
-+}
-+
-+// ============================================================================
-+
-+ScEditDataArray::Item::Item(SCTAB nTab, SCCOL nCol, SCROW nRow,
-+                            EditTextObject* pOldData, EditTextObject* pNewData) :
-+    mnTab(nTab),
-+    mnCol(nCol),
-+    mnRow(nRow)
-+{
-+    mpOldData.reset(pOldData);
-+    mpNewData.reset(pNewData);
-+}
-+
-+ScEditDataArray::Item::~Item()
-+{
-+}
-+
-+const EditTextObject* ScEditDataArray::Item::GetOldData() const
-+{
-+    return mpOldData.get();
-+}
-+
-+const EditTextObject* ScEditDataArray::Item::GetNewData() const
-+{
-+    return mpNewData.get();
-+}
-+
-+SCTAB ScEditDataArray::Item::GetTab() const
-+{
-+    return mnTab;
-+}
-+
-+SCCOL ScEditDataArray::Item::GetCol() const
-+{
-+    return mnCol;
-+}
-+
-+SCROW ScEditDataArray::Item::GetRow() const
-+{
-+    return mnRow;
-+}
-+
- // ============================================================================
- 
- namespace
-diff --git sc/source/core/data/column.cxx sc/source/core/data/column.cxx
-index ae9cb4a..9d7fdd0 100644
---- sc/source/core/data/column.cxx
-+++ sc/source/core/data/column.cxx
-@@ -361,7 +361,7 @@ ULONG ScColumn::GetNumberFormat( SCROW nRow ) const
- }
- 
- 
--SCsROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark )
-+SCsROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray )
- {
-     SCROW nTop = 0;
-     SCROW nBottom = 0;
-@@ -372,7 +372,7 @@ SCsROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData
-         ScMarkArrayIter aMarkIter( rMark.GetArray() + nCol );
-         while (aMarkIter.Next( nTop, nBottom ))
-         {
--            pAttrArray->ApplyCacheArea( nTop, nBottom, pCache );
-+            pAttrArray->ApplyCacheArea( nTop, nBottom, pCache, pDataArray );
-             bFound = TRUE;
-         }
-     }
-@@ -446,11 +446,12 @@ void ScColumn::ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr )
- }
- 
- 
--void ScColumn::ApplyPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& rPatAttr )
-+void ScColumn::ApplyPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& rPatAttr,
-+                                 ScEditDataArray* pDataArray )
- {
-     const SfxItemSet* pSet = &rPatAttr.GetItemSet();
-     SfxItemPoolCache aCache( pDocument->GetPool(), pSet );
--    pAttrArray->ApplyCacheArea( nStartRow, nEndRow, &aCache );
-+    pAttrArray->ApplyCacheArea( nStartRow, nEndRow, &aCache, pDataArray );
- }
- 
- 
-diff --git sc/source/core/data/document.cxx sc/source/core/data/document.cxx
-index 6ea75b4..8e96721 100644
---- sc/source/core/data/document.cxx
-+++ sc/source/core/data/document.cxx
-@@ -3832,12 +3832,13 @@ void ScDocument::ApplyPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatte
- void ScDocument::ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
-                         SCCOL nEndCol, SCROW nEndRow,
-                         const ScMarkData& rMark,
--                        const ScPatternAttr& rAttr )
-+                        const ScPatternAttr& rAttr,
-+                        ScEditDataArray* pDataArray )
- {
-     for (SCTAB i=0; i <= MAXTAB; i++)
-         if (pTab[i])
-             if (rMark.GetTableSelect(i))
--                pTab[i]->ApplyPatternArea( nStartCol, nStartRow, nEndCol, nEndRow, rAttr );
-+                pTab[i]->ApplyPatternArea( nStartCol, nStartRow, nEndCol, nEndRow, rAttr, pDataArray );
- }
- 
- 
-@@ -4772,7 +4773,7 @@ void ScDocument::ApplyFrameAreaTab( const ScRange& rRange,
- }
- 
- 
--void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark )
-+void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark, ScEditDataArray* pDataArray )
- {
-     const SfxItemSet* pSet = &rAttr.GetItemSet();
-     BOOL bSet = FALSE;
-@@ -4789,7 +4790,7 @@ void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMark
-             ScRange aRange;
-             rMark.GetMarkArea( aRange );
-             ApplyPatternArea( aRange.aStart.Col(), aRange.aStart.Row(),
--                              aRange.aEnd.Col(), aRange.aEnd.Row(), rMark, rAttr );
-+                              aRange.aEnd.Col(), aRange.aEnd.Row(), rMark, rAttr, pDataArray );
-         }
-         else
-         {
-@@ -4797,7 +4798,7 @@ void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMark
-             for (SCTAB nTab=0; nTab<=MAXTAB; nTab++)
-                 if (pTab[nTab])
-                     if (rMark.GetTableSelect(nTab))
--                        pTab[nTab]->ApplySelectionCache( &aCache, rMark );
-+                        pTab[nTab]->ApplySelectionCache( &aCache, rMark, pDataArray );
-         }
-     }
- }
-diff --git sc/source/core/data/table2.cxx sc/source/core/data/table2.cxx
-index 3bca189..0b2979f 100644
---- sc/source/core/data/table2.cxx
-+++ sc/source/core/data/table2.cxx
-@@ -1783,14 +1783,14 @@ void ScTable::ApplyPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr )
- 
- 
- void ScTable::ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
--                                     const ScPatternAttr& rAttr )
-+                                     const ScPatternAttr& rAttr, ScEditDataArray* pDataArray )
- {
-     if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow))
-     {
-         PutInOrder(nStartCol, nEndCol);
-         PutInOrder(nStartRow, nEndRow);
-         for (SCCOL i = nStartCol; i <= nEndCol; i++)
--            aCol[i].ApplyPatternArea(nStartRow, nEndRow, rAttr);
-+            aCol[i].ApplyPatternArea(nStartRow, nEndRow, rAttr, pDataArray);
-     }
- }
- 
-@@ -1986,10 +1986,11 @@ void ScTable::ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr )
- }
- 
- 
--void ScTable::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark )
-+void ScTable::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark,
-+                                   ScEditDataArray* pDataArray )
- {
-     for (SCCOL i=0; i<=MAXCOL; i++)
--        aCol[i].ApplySelectionCache( pCache, rMark );
-+        aCol[i].ApplySelectionCache( pCache, rMark, pDataArray );
- }
- 
- 
-diff --git sc/source/ui/docshell/docsh.cxx sc/source/ui/docshell/docsh.cxx
-index 925c677..f0bab17 100644
---- sc/source/ui/docshell/docsh.cxx
-+++ sc/source/ui/docshell/docsh.cxx
-@@ -396,6 +396,27 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
-     aDocument.DisableIdle( FALSE );
- }
- 
-+namespace {
-+
-+class LoadMediumGuard
-+{
-+public:
-+    explicit LoadMediumGuard(ScDocument* pDoc) :
-+        mpDoc(pDoc)
-+    {
-+        mpDoc->SetLoadingMedium(true);
-+    }
-+
-+    ~LoadMediumGuard()
-+    {
-+        mpDoc->SetLoadingMedium(false);
-+    }
-+private:
-+    ScDocument* mpDoc;
-+};
-+
-+}
-+
- BOOL ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStor )
- {
-     RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "sb99857", "ScDocShell::LoadXML" );
-@@ -452,7 +473,7 @@ BOOL ScDocShell::SaveXML( SfxMedium* pSaveMedium, const ::com::sun::star::uno::R
- BOOL __EXPORT ScDocShell::Load( SfxMedium& rMedium )
- {
-     RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::Load" );
--
-+    LoadMediumGuard aLoadGuard(&aDocument);
-     ScRefreshTimerProtector( aDocument.GetRefreshTimerControlAddress() );
- 
-     //	only the latin script language is loaded
-@@ -815,7 +836,7 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
- BOOL __EXPORT ScDocShell::LoadFrom( SfxMedium& rMedium )
- {
-     RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::LoadFrom" );
--
-+    LoadMediumGuard aLoadGuard(&aDocument);
-     ScRefreshTimerProtector( aDocument.GetRefreshTimerControlAddress() );
- 
-     WaitObject aWait( GetActiveDialogParent() );
-@@ -867,27 +888,6 @@ static void lcl_parseHtmlFilterOption(const OUString& rOption, LanguageType& rLa
-     rDateConvert = static_cast<bool>(aTokens[1].toInt32());
- }
- 
--namespace {
--
--class LoadMediumGuard
--{
--public:
--    explicit LoadMediumGuard(ScDocument* pDoc) :
--        mpDoc(pDoc)
--    {
--        mpDoc->SetLoadingMedium(true);
--    }
--
--    ~LoadMediumGuard()
--    {
--        mpDoc->SetLoadingMedium(false);
--    }
--private:
--    ScDocument* mpDoc;
--};
--
--}
--
- BOOL __EXPORT ScDocShell::ConvertFrom( SfxMedium& rMedium )
- {
-     RTL_LOGFILE_CONTEXT_AUTHOR ( aLog, "sc", "nn93723", "ScDocShell::ConvertFrom" );
-diff --git sc/source/ui/inc/undoblk.hxx sc/source/ui/inc/undoblk.hxx
-index 350a416..f1aab93 100644
---- sc/source/ui/inc/undoblk.hxx
-+++ sc/source/ui/inc/undoblk.hxx
-@@ -32,6 +32,10 @@
- #include "viewutil.hxx"
- #include "spellparam.hxx"
- 
-+#include "cell.hxx"
-+
-+#include <boost/shared_ptr.hpp>
-+
- class ScDocShell;
- class ScBaseCell;
- class ScDocument;
-@@ -351,9 +355,11 @@ public:
- 
-     virtual String	GetComment() const;
- 
-+    ScEditDataArray*    GetDataArray();
- private:
-     ScMarkData		aMarkData;
-     ScRange			aRange;
-+    ScEditDataArray aDataArray;
-     ScDocument*		pUndoDoc;
-     BOOL			bMulti;
-     ScPatternAttr*	pApplyPattern;
-@@ -361,6 +367,7 @@ private:
-     SvxBoxInfoItem*	pLineInner;
- 
-     void			DoChange( const BOOL bUndo );
-+    void            ChangeEditData( const bool bUndo );
- };
- 
- 
-diff --git sc/source/ui/inc/undocell.hxx sc/source/ui/inc/undocell.hxx
-index 8bded7d..5b95faf 100644
---- sc/source/ui/inc/undocell.hxx
-+++ sc/source/ui/inc/undocell.hxx
-@@ -31,6 +31,8 @@
- #include "undobase.hxx"
- #include "postit.hxx"
- 
-+#include <boost/shared_ptr.hpp>
-+
- class ScDocShell;
- class ScBaseCell;
- class ScPatternAttr;
-@@ -59,6 +61,11 @@ public:
- 
-     virtual String	GetComment() const;
- 
-+    /** once the objects are passed to this class, their life-cycle is
-+        managed by this class; the calling function must pass new'ed
-+        objects to this method. */
-+    void            SetEditData( EditTextObject* pOld, EditTextObject* pNew );
-+
- private:
-     SCCOL			nCol;
-     SCROW			nRow;
-@@ -66,9 +73,11 @@ private:
-     ScPatternAttr*	pOldPattern;
-     ScPatternAttr*	pNewPattern;
-     ScPatternAttr*	pApplyPattern;
-+    ::boost::shared_ptr<EditTextObject> pOldEditData;
-+    ::boost::shared_ptr<EditTextObject> pNewEditData;
-     BOOL			bIsAutomatic;
- 
--    void			DoChange( const ScPatternAttr* pWhichPattern ) const;
-+    void			DoChange( const ScPatternAttr* pWhichPattern, const ::boost::shared_ptr<EditTextObject>& pEditData ) const;
- };
- 
- 
-diff --git sc/source/ui/undo/undoblk3.cxx sc/source/ui/undo/undoblk3.cxx
-index 28ae1cf..629fb32 100644
---- sc/source/ui/undo/undoblk3.cxx
-+++ sc/source/ui/undo/undoblk3.cxx
-@@ -479,6 +479,12 @@ String __EXPORT ScUndoSelectionAttr::GetComment() const
-     return ScGlobal::GetRscString( pLineOuter ? STR_UNDO_SELATTRLINES : STR_UNDO_SELATTR );
- }
- 
-+//----------------------------------------------------------------------------
-+
-+ScEditDataArray* ScUndoSelectionAttr::GetDataArray()
-+{
-+    return &aDataArray;
-+}
- 
- //----------------------------------------------------------------------------
- 
-@@ -497,6 +503,8 @@ void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
-     USHORT nExtFlags = 0;
-     pDocShell->UpdatePaintExt( nExtFlags, aEffRange );
- 
-+    ChangeEditData(bUndo);
-+
-     if (bUndo)	// nur bei Undo
-     {
-         ScRange aCopyRange = aRange;
-@@ -521,6 +529,24 @@ void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
-     ShowTable( aRange );
- }
- 
-+void ScUndoSelectionAttr::ChangeEditData( const bool bUndo )
-+{
-+    ScDocument* pDoc = pDocShell->GetDocument();
-+    for (const ScEditDataArray::Item* pItem = aDataArray.First(); pItem; pItem = aDataArray.Next())
-+    {
-+        ScBaseCell* pCell;
-+        pDoc->GetCell(pItem->GetCol(), pItem->GetRow(), pItem->GetTab(), pCell);
-+        if (!pCell || pCell->GetCellType() != CELLTYPE_EDIT)
-+            continue;
-+
-+        ScEditCell* pEditCell = static_cast<ScEditCell*>(pCell);
-+        if (bUndo)
-+            pEditCell->SetData(pItem->GetOldData(), NULL);
-+        else
-+            pEditCell->SetData(pItem->GetNewData(), NULL);
-+    }
-+}
-+
- 
- //----------------------------------------------------------------------------
- 
-diff --git sc/source/ui/undo/undocell.cxx sc/source/ui/undo/undocell.cxx
-index 453bd15..dd0c15a 100644
---- sc/source/ui/undo/undocell.cxx
-+++ sc/source/ui/undo/undocell.cxx
-@@ -54,6 +54,8 @@
- #include "sc.hrc"
- #include "docuno.hxx"
- 
-+using ::boost::shared_ptr;
-+
- // STATIC DATA -----------------------------------------------------------
- 
- TYPEINIT1(ScUndoCursorAttr, ScSimpleUndo);
-@@ -82,6 +84,8 @@ ScUndoCursorAttr::ScUndoCursorAttr( ScDocShell* pNewDocShell,
-     nCol( nNewCol ),
-     nRow( nNewRow ),
-     nTab( nNewTab ),
-+    pOldEditData( static_cast<EditTextObject*>(NULL) ),
-+    pNewEditData( static_cast<EditTextObject*>(NULL) ),
-     bIsAutomatic( bAutomatic )
- {
-     ScDocumentPool* pPool = pDocShell->GetDocument()->GetPool();
-@@ -106,9 +110,21 @@ String __EXPORT ScUndoCursorAttr::GetComment() const
-     return ScGlobal::GetRscString( nId );
- }
- 
--void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern ) const
-+void ScUndoCursorAttr::SetEditData( EditTextObject* pOld, EditTextObject* pNew )
-+{
-+    pOldEditData.reset(pOld);
-+    pNewEditData.reset(pNew);
-+}
-+
-+void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern, const shared_ptr<EditTextObject>& pEditData ) const
- {
--    pDocShell->GetDocument()->SetPattern( nCol, nRow, nTab, *pWhichPattern, TRUE );
-+    ScDocument* pDoc = pDocShell->GetDocument();
-+    pDoc->SetPattern( nCol, nRow, nTab, *pWhichPattern, TRUE );
-+
-+    ScBaseCell* pCell;
-+    pDoc->GetCell(nCol, nRow, nTab, pCell);
-+    if (pCell && pCell->GetCellType() == CELLTYPE_EDIT && pEditData.get())
-+        static_cast<ScEditCell*>(pCell)->SetData(pEditData.get(), NULL);
- 
-     ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
-     if (pViewShell)
-@@ -134,7 +150,7 @@ void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern ) const
- void __EXPORT ScUndoCursorAttr::Undo()
- {
-     BeginUndo();
--    DoChange(pOldPattern);
-+    DoChange(pOldPattern, pOldEditData);
- 
-     if ( bIsAutomatic )
-     {
-@@ -152,7 +168,7 @@ void __EXPORT ScUndoCursorAttr::Undo()
- void __EXPORT ScUndoCursorAttr::Redo()
- {
-     BeginRedo();
--    DoChange(pNewPattern);
-+    DoChange(pNewPattern, pNewEditData);
-     EndRedo();
- }
- 
-diff --git sc/source/ui/view/viewfunc.cxx sc/source/ui/view/viewfunc.cxx
-index 3017088..3384fd6 100644
---- sc/source/ui/view/viewfunc.cxx
-+++ sc/source/ui/view/viewfunc.cxx
-@@ -1313,6 +1313,8 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
-         SCROW nEndRow = aMarkRange.aEnd.Row();
-         SCTAB nEndTab = aMarkRange.aEnd.Tab();
- 
-+        ScUndoSelectionAttr* pUndoAttr = NULL;
-+        ScEditDataArray* pEditDataArray = NULL;
-         if (bRecord)
-         {
-             ScRange aCopyRange = aMarkRange;
-@@ -1328,15 +1330,14 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
- 
-             aFuncMark.MarkToMulti();
- 
--            pDocSh->GetUndoManager()->AddUndoAction(
--                new ScUndoSelectionAttr(
--                            pDocSh, aFuncMark,
--                            nStartCol, nStartRow, nStartTab,
--                            nEndCol, nEndRow, nEndTab,
--                            pUndoDoc, bMulti, &rAttr ) );
-+            pUndoAttr = new ScUndoSelectionAttr(
-+                pDocSh, aFuncMark, nStartCol, nStartRow, nStartTab,
-+                nEndCol, nEndRow, nEndTab, pUndoDoc, bMulti, &rAttr );
-+            pDocSh->GetUndoManager()->AddUndoAction(pUndoAttr);
-+            pEditDataArray = pUndoAttr->GetDataArray();
-         }
- 
--        pDoc->ApplySelectionPattern( rAttr, aFuncMark );
-+        pDoc->ApplySelectionPattern( rAttr, aFuncMark, pEditDataArray );
- 
-         pDocSh->PostPaint( nStartCol, nStartRow, nStartTab,
-                            nEndCol,   nEndRow,   nEndTab,
-@@ -1350,6 +1351,19 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
-         SCCOL nCol = pViewData->GetCurX();
-         SCROW nRow = pViewData->GetCurY();
-         SCTAB nTab = pViewData->GetTabNo();
-+
-+        ScBaseCell* pCell;
-+        pDoc->GetCell(nCol, nRow, nTab, pCell);
-+        EditTextObject* pOldEditData = NULL;
-+        EditTextObject* pNewEditData = NULL;
-+        if (pCell && pCell->GetCellType() == CELLTYPE_EDIT)
-+        {
-+            ScEditCell* pEditCell = static_cast<ScEditCell*>(pCell);
-+            pOldEditData = pEditCell->GetData()->Clone();
-+            pEditCell->RemoveCharAttribs(rAttr);
-+            pNewEditData = pEditCell->GetData()->Clone();
-+        }
-+
-         aChangeRanges.Append( ScRange( nCol, nRow, nTab ) );
-         ScPatternAttr* pOldPat = new ScPatternAttr(*pDoc->GetPattern( nCol, nRow, nTab ));
- 
-@@ -1359,11 +1373,10 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
- 
-         if (bRecord)
-         {
--            pDocSh->GetUndoManager()->AddUndoAction(
--                        new ScUndoCursorAttr( pDocSh,
--                                              nCol, nRow, nTab,
--                                              pOldPat, pNewPat, &rAttr,
--                                              FALSE ) );	// FALSE = nicht automatisch
-+            ScUndoCursorAttr* pUndo = new ScUndoCursorAttr(
-+                pDocSh, nCol, nRow, nTab, pOldPat, pNewPat, &rAttr, false );
-+            pUndo->SetEditData(pOldEditData, pNewEditData);
-+            pDocSh->GetUndoManager()->AddUndoAction(pUndo);
-         }
-         delete pOldPat;		// wird im Undo kopiert (Pool)
- 
--- 
-1.7.0.1
-
commit 6b47603f46e58b688eb99edab6458762ec59b601
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 12:27:25 2010 +0200

    sc-excel-chart-default-xlabels.diff: Migrate to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 2d9a57d..0e14f76 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -528,11 +528,6 @@ sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 # keybindings: <ctrl> +/‑ to insert/delete a complete line in calc (X#62530)
 calc-new-acceleration.diff, i#67029, michael
 
-# Change default numbering scheme of x-y plot chart from Row 1, Row2, ... to
-# 1, 2, 3... when the X labels are not explicitly given.  This is what Excel
-# does.
-sc-excel-chart-default-xlabels.diff, n#257079, i#83679, kohei
-
 # overwrite character level font attributes when changing them at cell level.
 sc-overwrite-char-font-attrs.diff, n#374580, i#53545, i#96853, kohei
 
diff --git a/patches/dev300/sc-excel-chart-default-xlabels.diff b/patches/dev300/sc-excel-chart-default-xlabels.diff
deleted file mode 100644
index 563778e..0000000
--- a/patches/dev300/sc-excel-chart-default-xlabels.diff
+++ /dev/null
@@ -1,29 +0,0 @@
----
- sc/source/ui/unoobj/chart2uno.cxx |   11 +++--------
- 1 files changed, 3 insertions(+), 8 deletions(-)
-
-diff --git sc/source/ui/unoobj/chart2uno.cxx sc/source/ui/unoobj/chart2uno.cxx
-index cd7984d..bdd26e8 100644
---- sc/source/ui/unoobj/chart2uno.cxx
-+++ sc/source/ui/unoobj/chart2uno.cxx
-@@ -3690,14 +3690,9 @@ uno::Sequence< rtl::OUString > SAL_CALL ScChart2EmptyDataSequence::getTextualDat
-         }
-         else
-         {
--            for (sal_Int32 nRow = p->aStart.Row(); nRow <= p->aEnd.Row(); ++nRow)
--            {
--                String aString = ScGlobal::GetRscString(STR_ROW);
--                aString += ' ';
--                aString += String::CreateFromInt32( nRow+1 );
--                pArr[nCount] = aString;
--                ++nCount;
--            }
-+            sal_Int32 n = p->aEnd.Row() - p->aStart.Row() + 1;
-+            for (sal_Int32 i = 0; i < n; ++i)
-+                pArr[nCount++] = String::CreateFromInt32( i+1 );
-         }
-     }
-     return aSeq;
--- 
-1.7.0.1
-
commit 5f7c92977750fb222e53d230d72fe024b4e337a1
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 12:23:26 2010 +0200

    sc-drwlayer-units.diff: Migrate to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 1a664ff..2d9a57d 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -533,14 +533,6 @@ calc-new-acceleration.diff, i#67029, michael
 # does.
 sc-excel-chart-default-xlabels.diff, n#257079, i#83679, kohei
 
-
-# Delete Rows/Delete Columns should remember the content so that the user is
-# able to paste it elsewhere (similar to Insert Cut Cells in Excel)
-#TODO: we need to re-implement this as a separate menu option. (n#500985)
-#sc-delete-rows-columns-remembers-content.diff, i#71921, jholesov
-
-# Unit conversion fixes in ScDrawLayer.
-sc-drwlayer-units.diff, i#83735, jonp
 # overwrite character level font attributes when changing them at cell level.
 sc-overwrite-char-font-attrs.diff, n#374580, i#53545, i#96853, kohei
 
diff --git a/patches/dev300/sc-drwlayer-units.diff b/patches/dev300/sc-drwlayer-units.diff
deleted file mode 100644
index 1131b84..0000000
--- a/patches/dev300/sc-drwlayer-units.diff
+++ /dev/null
@@ -1,107 +0,0 @@
----
- sc/source/core/data/drwlayer.cxx |   42 +++++++++++++++++++++++++------------
- 1 files changed, 28 insertions(+), 14 deletions(-)
-
-diff --git sc/source/core/data/drwlayer.cxx sc/source/core/data/drwlayer.cxx
-index eb568dd..252449a 100755
---- sc/source/core/data/drwlayer.cxx
-+++ sc/source/core/data/drwlayer.cxx
-@@ -82,6 +82,10 @@
- #include "attrib.hxx"
- #include "charthelper.hxx"
- 
-+#ifndef _SV_FIELD_HXX //autogen
-+#include <vcl/field.hxx>
-+#endif
-+
- #define DET_ARROW_OFFSET	1000
- 
- //	Abstand zur naechsten Zelle beim Loeschen (bShrink), damit der Anker
-@@ -170,16 +174,26 @@ __EXPORT ScTabSizeChangedHint::~ScTabSizeChangedHint()
- 
- #define MAXMM	10000000
- 
-+inline long TwipsToHmm (long nVal)
-+{
-+    return static_cast< long >( MetricField::ConvertDoubleValue (static_cast<sal_Int64>(nVal), 0, 0,
-+            FUNIT_TWIP, FUNIT_100TH_MM) );
-+}
-+
-+inline long HmmToTwips (long nVal)
-+{
-+    return static_cast< long > ( MetricField::ConvertDoubleValue (static_cast<sal_Int64>(nVal), 0, 0,
-+            FUNIT_100TH_MM, FUNIT_TWIP) );
-+}
-+
- inline void TwipsToMM( long& nVal )
- {
--    nVal = (long) ( nVal * HMM_PER_TWIPS );
-+    nVal = TwipsToHmm (nVal);
- }
- 
- inline void ReverseTwipsToMM( long& nVal )
- {
--    //	reverse the effect of TwipsToMM - round up here (add 1)
--
--    nVal = ((long) ( nVal / HMM_PER_TWIPS )) + 1;
-+    nVal = HmmToTwips (nVal);
- }
- 
- void lcl_TwipsToMM( Point& rPoint )
-@@ -571,8 +585,8 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, const ScDrawObjData& rData, bool b
- 
-         //	Berechnung und Werte wie in detfunc.cxx
- 
--        Size aSize( (long)(pDoc->GetColWidth( nCol1, nTab1 ) * HMM_PER_TWIPS),
--                    (long)(pDoc->GetRowHeight( nRow1, nTab1 ) * HMM_PER_TWIPS) );
-+        Size aSize( (long)( TwipsToHmm( pDoc->GetColWidth( nCol1, nTab1) ) ),
-+                    (long)( TwipsToHmm( pDoc->GetRowHeight( nRow1, nTab1) ) ) );
-         Rectangle aRect( aPos, aSize );
-         aRect.Left()	-= 250;
-         aRect.Right()	+= 250;
-@@ -732,16 +746,16 @@ BOOL ScDrawLayer::GetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) co
-         SCCOL nEndCol = rRange.aEnd.Col();
-         for (i=nStartCol; i<=nEndCol; i++)
-             nEndX += pDoc->GetColWidth(i,nTab);
--        nStartX = (long)(nStartX * HMM_PER_TWIPS);
--        nEndX   = (long)(nEndX   * HMM_PER_TWIPS);
-+        nStartX = TwipsToHmm( nStartX );
-+        nEndX   = TwipsToHmm( nEndX );
-     }
-     if (!bSetVer)
-     {
- 		nStartY = pDoc->GetRowHeight( 0, rRange.aStart.Row()-1, nTab);
-         nEndY = nStartY + pDoc->GetRowHeight( rRange.aStart.Row(),
-                 rRange.aEnd.Row(), nTab);
--        nStartY = (long)(nStartY * HMM_PER_TWIPS);
--        nEndY   = (long)(nEndY   * HMM_PER_TWIPS);
-+        nStartY = TwipsToHmm( nStartY );
-+        nEndY   = TwipsToHmm( nEndY );
-     }
- 
-     if ( bNegativePage )
-@@ -799,8 +813,8 @@ BOOL ScDrawLayer::GetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) co
- 
-         if (bSetHor)
-         {
--            nStartX = (long) (nStartX / HMM_PER_TWIPS);
--            nEndX = (long) (nEndX / HMM_PER_TWIPS);
-+            nStartX = HmmToTwips( nStartX );
-+            nEndX = HmmToTwips( nEndX );
-             long nWidth;
-             SCCOL i;
- 
-@@ -817,8 +831,8 @@ BOOL ScDrawLayer::GetPrintArea( ScRange& rRange, BOOL bSetHor, BOOL bSetVer ) co
- 
-         if (bSetVer)
-         {
--            nStartY = (long) (nStartY / HMM_PER_TWIPS);
--            nEndY = (long) (nEndY / HMM_PER_TWIPS);
-+            nStartY = HmmToTwips( nStartY );
-+            nEndY = HmmToTwips( nEndY );
-             SCROW nRow = pDoc->GetRowForHeight( nTab, nStartY);
-             rRange.aStart.SetRow( nRow>0 ? (nRow-1) : 0);
-             nRow = pDoc->GetRowForHeight( nTab, nEndY);
--- 
-1.7.0.1
-
commit 6fdfe64fe84d396b1c78148bf6b856d7883094c1
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 12:20:17 2010 +0200

    calc-multiline-pattern-fix.diff: Migrate to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index fc90c4f..1a664ff 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -528,10 +528,6 @@ sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 # keybindings: <ctrl> +/‑ to insert/delete a complete line in calc (X#62530)
 calc-new-acceleration.diff, i#67029, michael
 
-# For multi-line cell contents, bolding the first line shouldn't bold the
-# entire cell.
-calc-multiline-pattern-fix.diff, n#359690, n#437137, i#99291, kohei
-
 # Change default numbering scheme of x-y plot chart from Row 1, Row2, ... to
 # 1, 2, 3... when the X labels are not explicitly given.  This is what Excel
 # does.
diff --git a/patches/dev300/calc-multiline-pattern-fix.diff b/patches/dev300/calc-multiline-pattern-fix.diff
deleted file mode 100644
index dff6394..0000000
--- a/patches/dev300/calc-multiline-pattern-fix.diff
+++ /dev/null
@@ -1,40 +0,0 @@
----
- sc/source/ui/app/inputhdl.cxx |   16 +++++++++++++++-
- 1 files changed, 15 insertions(+), 1 deletions(-)
-
-diff --git sc/source/ui/app/inputhdl.cxx sc/source/ui/app/inputhdl.cxx
-index c8a85e4..91fd711 100644
---- sc/source/ui/app/inputhdl.cxx
-+++ sc/source/ui/app/inputhdl.cxx
-@@ -2509,13 +2509,27 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
-         USHORT nParCnt = pEngine->GetParagraphCount();
-         if ( nParCnt == 0 )
-             nParCnt = 1;
-+
-+        bool bUniformAttribs = true;
-+        SfxItemSet aPara1Attribs = pEngine->GetAttribs(0, 0, pEngine->GetTextLen(0));
-+        for (USHORT nPara = 1; nPara < nParCnt; ++nPara)
-+        {
-+            SfxItemSet aPara2Attribs = pEngine->GetAttribs(nPara, 0, pEngine->GetTextLen(nPara));
-+            if (!(aPara1Attribs == aPara2Attribs))
-+            {
-+                // paragraph format different from that of the 1st paragraph.
-+                bUniformAttribs = false;
-+                break;
-+            }
-+        }
-+
-         ESelection aSel( 0, 0, nParCnt-1, pEngine->GetTextLen(nParCnt-1) );
-         SfxItemSet aOldAttribs = pEngine->GetAttribs( aSel );
-         const SfxPoolItem* pItem = NULL;
- 
-         //	find common (cell) attributes before RemoveAdjust
- 
--        if ( pActiveViewSh )
-+        if ( pActiveViewSh && bUniformAttribs )
-         {
-             SfxItemSet* pCommonAttrs = NULL;
-             for (USHORT nId = EE_CHAR_START; nId <= EE_CHAR_END; nId++)
--- 
-1.7.0.1
-
commit aea3221275c112d0ec2fcd5692b78caa73e89d3d
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 12:16:14 2010 +0200

    sc-natural-sort.diff: Migrate to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index a70d232..fc90c4f 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -528,9 +528,6 @@ sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 # keybindings: <ctrl> +/‑ to insert/delete a complete line in calc (X#62530)
 calc-new-acceleration.diff, i#67029, michael
 
-# Add a 'Natural' variant of sorting, blocking on ODF extension issues
-sc-natural-sort.diff, i#26565, kohei
-
 # For multi-line cell contents, bolding the first line shouldn't bold the
 # entire cell.
 calc-multiline-pattern-fix.diff, n#359690, n#437137, i#99291, kohei
diff --git a/patches/dev300/sc-natural-sort.diff b/patches/dev300/sc-natural-sort.diff
deleted file mode 100644
index 7fda872..0000000
--- a/patches/dev300/sc-natural-sort.diff
+++ /dev/null
@@ -1,629 +0,0 @@
----
- sc/inc/dbcolect.hxx               |    1 +
- sc/inc/sc.hrc                     |    1 +
- sc/inc/sortparam.hxx              |    1 +
- sc/sdi/scalc.sdi                  |    2 +-
- sc/source/core/data/sortparam.cxx |    6 +-
- sc/source/core/data/table3.cxx    |  166 +++++++++++++++++++++++++++++++++++--
- sc/source/core/tool/dbcolect.cxx  |    4 +
- sc/source/ui/dbgui/tpsort.cxx     |   19 +++--
- sc/source/ui/inc/sortdlg.hrc      |    3 +-
- sc/source/ui/inc/tpsort.hxx       |    7 +-
- sc/source/ui/src/sortdlg.src      |   37 ++++++---
- sc/source/ui/view/cellsh2.cxx     |    7 ++-
- 12 files changed, 219 insertions(+), 35 deletions(-)
-
-diff --git sc/inc/dbcolect.hxx sc/inc/dbcolect.hxx
-index 840977b..8be1868 100644
---- sc/inc/dbcolect.hxx
-+++ sc/inc/dbcolect.hxx
-@@ -60,6 +60,7 @@ private:
-     BOOL			bStripData;
-     // SortParam
-     BOOL			bSortCaseSens;
-+    BOOL			bSortNaturalSort;
-     BOOL			bIncludePattern;
-     BOOL			bSortInplace;
-     BOOL			bSortUserDef;
-diff --git sc/inc/sc.hrc sc/inc/sc.hrc
-index bdd23bc..30560a0 100644
---- sc/inc/sc.hrc
-+++ sc/inc/sc.hrc
-@@ -1123,6 +1123,7 @@
- #define SID_SORT_CASESENS		(SC_PARAM_START+2)
- #define SID_SORT_ATTRIBS		(SC_PARAM_START+3)
- #define SID_SORT_USERDEF		(SC_PARAM_START+4)
-+#define SID_SORT_NATURALSORT	(SC_PARAM_START+5)
- 
- // Resourcen -------------------------------------------------------------
- 
-diff --git sc/inc/sortparam.hxx sc/inc/sortparam.hxx
-index 5d7a098..fb72f01 100644
---- sc/inc/sortparam.hxx
-+++ sc/inc/sortparam.hxx
-@@ -49,6 +49,7 @@ struct SC_DLLPUBLIC ScSortParam
-     BOOL		bHasHeader;
-     BOOL		bByRow;
-     BOOL		bCaseSens;
-+    BOOL		bNaturalSort;
-     BOOL		bUserDef;
-     USHORT		nUserIndex;
-     BOOL		bIncludePattern;
-diff --git sc/sdi/scalc.sdi sc/sdi/scalc.sdi
-index 9e30a2f..1b48cb9 100644
---- sc/sdi/scalc.sdi
-+++ sc/sdi/scalc.sdi
-@@ -1574,7 +1574,7 @@ SfxVoidItem DataSelect SID_DATA_SELECT
- 
- //--------------------------------------------------------------------------
- SfxVoidItem DataSort SID_SORT
--(SfxBoolItem ByRows SID_SORT_BYROW,SfxBoolItem HasHeader SID_SORT_HASHEADER,SfxBoolItem CaseSensitive SID_SORT_CASESENS,SfxBoolItem IncludeAttribs SID_SORT_ATTRIBS,SfxUInt16Item UserDefIndex SID_SORT_USERDEF,SfxInt32Item Col1 FN_PARAM_1,SfxBoolItem Ascending1 FN_PARAM_2,SfxInt32Item Col2 FN_PARAM_3,SfxBoolItem Ascending2 FN_PARAM_4,SfxInt32Item Col3 FN_PARAM_5,SfxBoolItem Ascending3 FN_PARAM_6)
-+(SfxBoolItem ByRows SID_SORT_BYROW,SfxBoolItem HasHeader SID_SORT_HASHEADER,SfxBoolItem CaseSensitive SID_SORT_CASESENS,SfxBoolItem NaturalSort SID_SORT_NATURALSORT,SfxBoolItem IncludeAttribs SID_SORT_ATTRIBS,SfxUInt16Item UserDefIndex SID_SORT_USERDEF,SfxInt32Item Col1 FN_PARAM_1,SfxBoolItem Ascending1 FN_PARAM_2,SfxInt32Item Col2 FN_PARAM_3,SfxBoolItem Ascending2 FN_PARAM_4,SfxInt32Item Col3 FN_PARAM_5,SfxBoolItem Ascending3 FN_PARAM_6)
- [
-     /* flags: */
-     AutoUpdate = FALSE,
-diff --git sc/source/core/data/sortparam.cxx sc/source/core/data/sortparam.cxx
-index dd3a9cd..a7960ad 100644
---- sc/source/core/data/sortparam.cxx
-+++ sc/source/core/data/sortparam.cxx
-@@ -48,7 +48,7 @@ ScSortParam::ScSortParam()
- 
- ScSortParam::ScSortParam( const ScSortParam& r ) :
-         nCol1(r.nCol1),nRow1(r.nRow1),nCol2(r.nCol2),nRow2(r.nRow2),
--        bHasHeader(r.bHasHeader),bByRow(r.bByRow),bCaseSens(r.bCaseSens),
-+        bHasHeader(r.bHasHeader),bByRow(r.bByRow),bCaseSens(r.bCaseSens),bNaturalSort(r.bNaturalSort),
-         bUserDef(r.bUserDef),nUserIndex(r.nUserIndex),bIncludePattern(r.bIncludePattern),
-         bInplace(r.bInplace),
-         nDestTab(r.nDestTab),nDestCol(r.nDestCol),nDestRow(r.nDestRow),
-@@ -71,7 +71,7 @@ void ScSortParam::Clear()
-     nCompatHeader = 2;
-     nDestTab = 0;
-     nUserIndex = 0;
--    bHasHeader=bCaseSens=bUserDef = FALSE;
-+    bHasHeader=bCaseSens=bUserDef=bNaturalSort = FALSE;
-     bByRow=bIncludePattern=bInplace	= TRUE;
-     aCollatorLocale = ::com::sun::star::lang::Locale();
-     aCollatorAlgorithm.Erase();
-@@ -94,6 +94,7 @@ ScSortParam& ScSortParam::operator=( const ScSortParam& r )
-     nRow2			= r.nRow2;
-     bHasHeader		= r.bHasHeader;
-     bCaseSens		= r.bCaseSens;
-+    bNaturalSort	= r.bNaturalSort;
-     bByRow			= r.bByRow;
-     bUserDef		= r.bUserDef;
-     nUserIndex		= r.nUserIndex;
-@@ -135,6 +136,7 @@ BOOL ScSortParam::operator==( const ScSortParam& rOther ) const
-         && (bHasHeader		== rOther.bHasHeader)
-         && (bByRow			== rOther.bByRow)
-         && (bCaseSens		== rOther.bCaseSens)
-+        && (bNaturalSort	== rOther.bNaturalSort)
-         && (bUserDef		== rOther.bUserDef)
-         && (nUserIndex		== rOther.nUserIndex)
-         && (bIncludePattern == rOther.bIncludePattern)
-diff --git sc/source/core/data/table3.cxx sc/source/core/data/table3.cxx
-index a009d93..3a548c4 100644
---- sc/source/core/data/table3.cxx
-+++ sc/source/core/data/table3.cxx
-@@ -62,6 +62,143 @@
- 
- #include <vector>
- 
-+using namespace ::com::sun::star;
-+
-+namespace naturalsort {
-+
-+using namespace ::com::sun::star::i18n;
-+
-+/** Splits a given string into three parts: the prefix, number string, and
-+    the suffix.
-+
-+    @param sWhole
-+    Original string to be split into pieces
-+
-+    @param sPrefix
-+    Prefix string that consists of the part before the first number token
-+
-+    @param sSuffix
-+    String after the last number token.  This may still contain number strings.
-+
-+    @param fNum
-+    Number converted from the middle number string
-+
-+    @return Returns TRUE if a numeral element is found in a given string, or
-+    FALSE if no numeral element is found.
-+*/
-+bool SplitString( const rtl::OUString &sWhole,
-+    rtl::OUString &sPrefix, rtl::OUString &sSuffix, double &fNum )
-+{
-+    i18n::LocaleDataItem aLocaleItem = ScGlobal::pLocaleData->getLocaleItem();
-+
-+    // Get prefix element
-+    rtl::OUString sEmpty, sUser = rtl::OUString::createFromAscii( "-" );
-+    ParseResult aPRPre = ScGlobal::pCharClass->parsePredefinedToken(
-+        KParseType::IDENTNAME, sWhole, 0,
-+        KParseTokens::ANY_LETTER, sUser, KParseTokens::ANY_LETTER, sUser );
-+    sPrefix = sWhole.copy( 0, aPRPre.EndPos );
-+
-+    // Return FALSE if no numeral element is found
-+    if ( aPRPre.EndPos == sWhole.getLength() )
-+        return false;
-+
-+    // Get numeral element
-+    sUser = aLocaleItem.decimalSeparator;
-+    ParseResult aPRNum = ScGlobal::pCharClass->parsePredefinedToken(
-+        KParseType::ANY_NUMBER, sWhole, aPRPre.EndPos,
-+        KParseTokens::ANY_NUMBER, sEmpty, KParseTokens::ANY_NUMBER, sUser );
-+
-+    if ( aPRNum.EndPos == aPRPre.EndPos )
-+        return false;
-+
-+    fNum = aPRNum.Value;
-+    sSuffix = sWhole.copy( aPRNum.EndPos );
-+
-+    return true;
-+}
-+
-+/** Naturally compares two given strings.
-+
-+    This is the main function that should be called externally.  It returns
-+    either 1, 0, or -1 depending on the comparison result of given two strings.
-+
-+    @param sInput1
-+    Input string 1
-+
-+    @param sInput2
-+    Input string 2
-+
-+    @param bCaseSens
-+    Boolean value for case sensitivity
-+
-+    @param pData
-+    Pointer to user defined sort list
-+
-+    @param pCW
-+    Pointer to collator wrapper for normal string comparison
-+
-+    @return Returnes 1 if sInput1 is greater, 0 if sInput1 == sInput2, and -1 if
-+    sInput2 is greater.
-+*/
-+short Compare( const String &sInput1, const String &sInput2,
-+               const BOOL bCaseSens, const ScUserListData* pData, const CollatorWrapper *pCW )
-+{
-+    rtl::OUString sStr1( sInput1 ), sStr2( sInput2 ), sPre1, sSuf1, sPre2, sSuf2;
-+
-+    do
-+    {
-+        double nNum1, nNum2;
-+        BOOL bNumFound1 = SplitString( sStr1, sPre1, sSuf1, nNum1 );
-+        BOOL bNumFound2 = SplitString( sStr2, sPre2, sSuf2, nNum2 );
-+
-+        short nPreRes; // Prefix comparison result
-+        if ( pData )
-+        {
-+            if ( bCaseSens )
-+            {
-+                if ( !bNumFound1 || !bNumFound2 )
-+                    return static_cast<short>(pData->Compare( sStr1, sStr2 ));
-+                else
-+                    nPreRes = pData->Compare( sPre1, sPre2 );
-+            }
-+            else
-+            {
-+                if ( !bNumFound1 || !bNumFound2 )
-+                    return static_cast<short>(pData->ICompare( sStr1, sStr2 ));
-+                else
-+                    nPreRes = pData->ICompare( sPre1, sPre2 );
-+            }
-+        }
-+        else
-+        {
-+            if ( !bNumFound1 || !bNumFound2 )
-+                return static_cast<short>(pCW->compareString( sStr1, sStr2 ));
-+            else
-+                nPreRes = static_cast<short>(pCW->compareString( sPre1, sPre2 ));
-+        }
-+
-+        // Prefix strings differ.  Return immediately.
-+        if ( nPreRes != 0 ) return nPreRes;
-+
-+        if ( nNum1 != nNum2 )
-+        {
-+            if ( nNum1 < nNum2 ) return -1;
-+            return static_cast<short>( nNum1 > nNum2 );
-+        }
-+
-+        // The prefix and the first numerical elements are equal, but the suffix
-+        // strings may still differ.  Stay in the loop.
-+
-+        sStr1 = sSuf1;
-+        sStr2 = sSuf2;
-+
-+    } while (true);
-+
-+    return 0;
-+}
-+
-+}
-+
- // STATIC DATA -----------------------------------------------------------
- 
- const USHORT nMaxSorts = 3;		// maximale Anzahl Sortierkriterien in aSortParam
-@@ -280,25 +417,40 @@ short ScTable::CompareCell( USHORT nSort,
-                     ((ScStringCell*)pCell2)->GetString(aStr2);
-                 else
-                     GetString(nCell2Col, nCell2Row, aStr2);
--                BOOL bUserDef = aSortParam.bUserDef;
-+
-+                BOOL bUserDef     = aSortParam.bUserDef;		// custom sort order
-+                BOOL bNaturalSort = aSortParam.bNaturalSort;	// natural sort
-+                BOOL bCaseSens    = aSortParam.bCaseSens;		// case sensitivity
-+
-                 if (bUserDef)
-                 {
-                     ScUserListData* pData =
--                        (ScUserListData*)(ScGlobal::GetUserList()->At(
--                        aSortParam.nUserIndex));
-+                        static_cast<ScUserListData*>( (ScGlobal::GetUserList()->At(
-+                        aSortParam.nUserIndex)) );
-+
-                     if (pData)
-                     {
--                        if ( aSortParam.bCaseSens )
--                            nRes = sal::static_int_cast<short>( pData->Compare(aStr1, aStr2) );
-+                        if ( bNaturalSort )
-+                            nRes = naturalsort::Compare( aStr1, aStr2, bCaseSens, pData, pSortCollator );
-                         else
--                            nRes = sal::static_int_cast<short>( pData->ICompare(aStr1, aStr2) );
-+                        {
-+                            if ( bCaseSens )
-+                                nRes = sal::static_int_cast<short>( pData->Compare(aStr1, aStr2) );
-+                            else
-+                                nRes = sal::static_int_cast<short>( pData->ICompare(aStr1, aStr2) );
-+                        }
-                     }
-                     else
-                         bUserDef = FALSE;
- 
-                 }
-                 if (!bUserDef)
--                    nRes = (short) pSortCollator->compareString( aStr1, aStr2 );
-+                {
-+                    if ( bNaturalSort )
-+                        nRes = naturalsort::Compare( aStr1, aStr2, bCaseSens, NULL, pSortCollator );
-+                    else
-+                        nRes = static_cast<short>( pSortCollator->compareString( aStr1, aStr2 ) );
-+                }
-             }
-             else if ( bStr1 )				// String <-> Zahl
-                 nRes = 1;					// Zahl vorne
-diff --git sc/source/core/tool/dbcolect.cxx sc/source/core/tool/dbcolect.cxx
-index 0f1d26f..92fef62 100644
---- sc/source/core/tool/dbcolect.cxx
-+++ sc/source/core/tool/dbcolect.cxx
-@@ -102,6 +102,7 @@ ScDBData::ScDBData( const ScDBData& rData ) :
-     bKeepFmt			(rData.bKeepFmt),
-     bStripData			(rData.bStripData),
-     bSortCaseSens   	(rData.bSortCaseSens),
-+    bSortNaturalSort	(rData.bSortNaturalSort),
-     bIncludePattern 	(rData.bIncludePattern),
-     bSortInplace		(rData.bSortInplace),
-     bSortUserDef		(rData.bSortUserDef),
-@@ -196,6 +197,7 @@ ScDBData& ScDBData::operator= (const ScDBData& rData)
-     bKeepFmt			= rData.bKeepFmt;
-     bStripData			= rData.bStripData;
-     bSortCaseSens   	= rData.bSortCaseSens;
-+    bSortNaturalSort	= rData.bSortNaturalSort;
-     bIncludePattern 	= rData.bIncludePattern;
-     bSortInplace		= rData.bSortInplace;
-     nSortDestTab		= rData.nSortDestTab;
-@@ -448,6 +450,7 @@ void ScDBData::GetSortParam( ScSortParam& rSortParam ) const
-     rSortParam.bByRow = bByRow;
-     rSortParam.bHasHeader = bHasHeader;
-     rSortParam.bCaseSens = bSortCaseSens;
-+    rSortParam.bNaturalSort = bSortNaturalSort;
-     rSortParam.bInplace = bSortInplace;
-     rSortParam.nDestTab = nSortDestTab;
-     rSortParam.nDestCol = nSortDestCol;
-@@ -468,6 +471,7 @@ void ScDBData::GetSortParam( ScSortParam& rSortParam ) const
- void ScDBData::SetSortParam( const ScSortParam& rSortParam )
- {
-     bSortCaseSens = rSortParam.bCaseSens;
-+    bSortNaturalSort = rSortParam.bNaturalSort;
-     bIncludePattern = rSortParam.bIncludePattern;
-     bSortInplace = rSortParam.bInplace;
-     nSortDestTab = rSortParam.nDestTab;
-diff --git sc/source/ui/dbgui/tpsort.cxx sc/source/ui/dbgui/tpsort.cxx
-index 0a222c5..216cb74 100644
---- sc/source/ui/dbgui/tpsort.cxx
-+++ sc/source/ui/dbgui/tpsort.cxx
-@@ -564,6 +564,7 @@ ScTabPageSortOptions::ScTabPageSortOptions( Window* 			pParent,
-         aBtnHeader		( this, ScResId( BTN_LABEL ) ),
-         aBtnFormats 	( this, ScResId( BTN_FORMATS ) ),
-         aBtnCopyResult	( this, ScResId( BTN_COPYRESULT ) ),
-+        aBtnNaturalSort	( this, ScResId( BTN_NATURALSORT ) ),
-         aLbOutPos		( this, ScResId( LB_OUTAREA ) ),
-         aEdOutPos		( this, ScResId( ED_OUTAREA ) ),
-         aBtnSortUser	( this, ScResId( BTN_SORT_USER ) ),
-@@ -575,7 +576,7 @@ ScTabPageSortOptions::ScTabPageSortOptions( Window* 			pParent,
-         aLineDirection	( this, ScResId( FL_DIRECTION ) ),
-         aBtnTopDown 	( this, ScResId( BTN_TOP_DOWN ) ),
-         aBtnLeftRight	( this, ScResId( BTN_LEFT_RIGHT ) ),
--        aFtAreaLabel	( this, ScResId( FT_AREA_LABEL ) ),
-+// 		aFtAreaLabel	( this, ScResId( FT_AREA_LABEL ) ),
- //		aFtArea 		( this, ScResId( FT_AREA ) ),
-         //
- #if ENABLE_LAYOUT_EXPERIMENTAL
-@@ -619,8 +620,8 @@ __EXPORT ScTabPageSortOptions::~ScTabPageSortOptions()
- 
- void ScTabPageSortOptions::Init()
- {
--    aStrAreaLabel = aFtAreaLabel.GetText();
--    aStrAreaLabel.Append( (sal_Unicode) ' ' );
-+// 	aStrAreaLabel = aFtAreaLabel.GetText();
-+// 	aStrAreaLabel.Append( (sal_Unicode) ' ' );
- 
-     //	CollatorRessource has user-visible names for sort algorithms
-     pColRes = new CollatorRessource();
-@@ -699,8 +700,8 @@ void ScTabPageSortOptions::Init()
-         theArea += ')';
- 
-         //aFtArea.SetText( theArea );
--        theArea.Insert( aStrAreaLabel, 0 );
--        aFtAreaLabel.SetText( theArea );
-+        //theArea.Insert( aStrAreaLabel, 0 );
-+        //aFtAreaLabel.SetText( theArea );
- 
-         aBtnHeader.SetText( aStrColLabel );
-     }
-@@ -749,9 +750,10 @@ void __EXPORT ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ )
-         aLbSortUser.SelectEntryPos( 0 );
-     }
- 
--    aBtnCase.Check		( rSortData.bCaseSens );
--    aBtnFormats.Check	( rSortData.bIncludePattern );
--    aBtnHeader.Check	( rSortData.bHasHeader );
-+    aBtnCase.Check			( rSortData.bCaseSens );
-+    aBtnFormats.Check		( rSortData.bIncludePattern );
-+    aBtnHeader.Check		( rSortData.bHasHeader );
-+    aBtnNaturalSort.Check	( rSortData.bNaturalSort );
- 
-     if ( rSortData.bByRow )
-     {
-@@ -817,6 +819,7 @@ BOOL __EXPORT ScTabPageSortOptions::FillItemSet( SfxItemSet& rArgSet )
-     theSortData.bByRow			= aBtnTopDown.IsChecked();
-     theSortData.bHasHeader		= aBtnHeader.IsChecked();
-     theSortData.bCaseSens		= aBtnCase.IsChecked();
-+    theSortData.bNaturalSort	= aBtnNaturalSort.IsChecked();
-     theSortData.bIncludePattern = aBtnFormats.IsChecked();
-     theSortData.bInplace		= !aBtnCopyResult.IsChecked();
-     theSortData.nDestCol		= theOutPos.Col();
-diff --git sc/source/ui/inc/sortdlg.hrc sc/source/ui/inc/sortdlg.hrc
-index 40f5d04..2e55f44 100644
---- sc/source/ui/inc/sortdlg.hrc
-+++ sc/source/ui/inc/sortdlg.hrc
-@@ -63,7 +63,7 @@
- #define LB_SORT_USER		2
- #define LB_OUTAREA			3
- #define ED_OUTAREA          4
--#define FT_AREA_LABEL       5
-+//#define FT_AREA_LABEL       5
- //#define FT_AREA             6
- #define BTN_SORT_USER       7
- #define BTN_CASESENSITIVE   8
-@@ -78,6 +78,7 @@
- #define LB_LANGUAGE         17
- #define FT_ALGORITHM        18
- #define LB_ALGORITHM        19
-+#define	BTN_NATURALSORT		20
- 
- //#define RID_SCDLG_SORT_WARNING
- #define FT_TEXT             1
-diff --git sc/source/ui/inc/tpsort.hxx sc/source/ui/inc/tpsort.hxx
-index f197ca6..007c28f 100644
---- sc/source/ui/inc/tpsort.hxx
-+++ sc/source/ui/inc/tpsort.hxx
-@@ -50,7 +50,7 @@ class ScSortDlg;
- struct ScSortParam;
- 
- //========================================================================
--// Kriterien
-+// Kriterien (Sort Criteria)
- 
- class ScTabPageSortFields : public SfxTabPage
- {
-@@ -122,7 +122,7 @@ private:
- };
- 
- //========================================================================
--// Sortieroptionen:
-+// Sortieroptionen (Sort Options)
- 
- class ScDocument;
- class ScRangeData;
-@@ -164,6 +164,7 @@ private:
-     CheckBox            aBtnCase;
-     CheckBox            aBtnHeader;
-     CheckBox            aBtnFormats;
-+    CheckBox			aBtnNaturalSort;
- 
-     CheckBox            aBtnCopyResult;
-     ListBox             aLbOutPos;
-@@ -181,7 +182,7 @@ private:
-     RadioButton         aBtnTopDown;
-     RadioButton         aBtnLeftRight;
- 
--    FixedText           aFtAreaLabel;
-+//     FixedText           aFtAreaLabel;
- //  FixedInfo           aFtArea;
-     LocalizedString aStrRowLabel;
-     LocalizedString aStrColLabel;
-diff --git sc/source/ui/src/sortdlg.src sc/source/ui/src/sortdlg.src
-index ec03bb2..4090bba 100644
---- sc/source/ui/src/sortdlg.src
-+++ sc/source/ui/src/sortdlg.src
-@@ -151,17 +151,28 @@ TabPage RID_SCPAGE_SORT_OPTIONS
-         Text [ en-US ] = "Include ~formats" ;
-         TabStop = TRUE ;
-     };
--    CheckBox BTN_COPYRESULT
-+    CheckBox BTN_NATURALSORT
-     {
-         Pos = MAP_APPFONT ( 12 , 48 ) ;
-         Size = MAP_APPFONT ( 242 , 10 ) ;
-+        Text [ de ] = "Enable ~natural sort" ;
-+        Text [ en-US ] = "Enable ~natural sort" ;
-+        Text [ cs ] = "Aktivovat přirozené třídění" ;
-+       Text [ sk ] = "Aktivovať prirodzené triedenie" ;
-+        TabStop = TRUE ;
-+        Text [ x-comment ] = " " ;
-+    };
-+    CheckBox BTN_COPYRESULT
-+    {
-+        Pos = MAP_APPFONT ( 12 , 62 ) ;
-+        Size = MAP_APPFONT ( 242 , 10 ) ;
-         Text [ en-US ] = "~Copy sort results to:" ;
-         TabStop = TRUE ;
-     };
-     ListBox LB_OUTAREA
-     {
-         Border = TRUE ;
--        Pos = MAP_APPFONT ( 20 , 59 ) ;
-+        Pos = MAP_APPFONT ( 20 , 73 ) ;
-         Size = MAP_APPFONT ( 93 , 90 ) ;
-         TabStop = TRUE ;
-         DropDown = TRUE ;
-@@ -170,13 +181,13 @@ TabPage RID_SCPAGE_SORT_OPTIONS
-     {
-         Disable = TRUE ;
-         Border = TRUE ;
--        Pos = MAP_APPFONT ( 119 , 59 ) ;
-+        Pos = MAP_APPFONT ( 119 , 73 ) ;
-         Size = MAP_APPFONT ( 132 , 12 ) ;
-         TabStop = TRUE ;
-     };
-     CheckBox BTN_SORT_USER
-     {
--        Pos = MAP_APPFONT ( 12 , 75 ) ;
-+        Pos = MAP_APPFONT ( 12 , 89 ) ;
-         Size = MAP_APPFONT ( 242 , 10 ) ;
-         Text [ en-US ] = "Custom sort ~order" ;
-         TabStop = TRUE ;
-@@ -185,21 +196,21 @@ TabPage RID_SCPAGE_SORT_OPTIONS
-     {
-         Disable = TRUE ;
-         Border = TRUE ;
--        Pos = MAP_APPFONT ( 20 , 86 ) ;
-+        Pos = MAP_APPFONT ( 20 , 100 ) ;
-         Size = MAP_APPFONT ( 231 , 90 ) ;
-         TabStop = TRUE ;
-         DropDown = TRUE ;
-     };
-     FixedText FT_LANGUAGE
-     {
--        Pos = MAP_APPFONT ( 12 , 104 ) ;
-+        Pos = MAP_APPFONT ( 12 , 118 ) ;
-         Size = MAP_APPFONT ( 101 , 8 ) ;
-         Text [ en-US ] = "~Language";
-     };
-     ListBox LB_LANGUAGE
-     {
-         Border = TRUE ;
--        Pos = MAP_APPFONT ( 12 , 115 ) ;
-+        Pos = MAP_APPFONT ( 12 , 129 ) ;
-         Size = MAP_APPFONT ( 101 , 90 ) ;
-         TabStop = TRUE ;
-         DropDown = TRUE ;
-@@ -207,44 +218,46 @@ TabPage RID_SCPAGE_SORT_OPTIONS
-     };
-     FixedText FT_ALGORITHM
-     {
--        Pos = MAP_APPFONT ( 119 , 104 ) ;
-+        Pos = MAP_APPFONT ( 119 , 118 ) ;
-         Size = MAP_APPFONT ( 132 , 8 ) ;
-         Text [ en-US ] = "O~ptions";
-     };
-     ListBox LB_ALGORITHM
-     {
-         Border = TRUE ;
--        Pos = MAP_APPFONT ( 119 , 115 ) ;
-+        Pos = MAP_APPFONT ( 119 , 129 ) ;
-         Size = MAP_APPFONT ( 132 , 90 ) ;
-         TabStop = TRUE ;
-         DropDown = TRUE ;
-     };
-     FixedLine FL_DIRECTION
-     {
--        Pos = MAP_APPFONT ( 6 , 133 ) ;
-+        Pos = MAP_APPFONT ( 6 , 147 ) ;
-         Size = MAP_APPFONT ( 248 , 8 ) ;
-         Text [ en-US ] = "Direction" ;
-     };
-     RadioButton BTN_TOP_DOWN
-     {
--        Pos = MAP_APPFONT ( 12 , 144 ) ;
-+        Pos = MAP_APPFONT ( 12 , 158 ) ;
-         Size = MAP_APPFONT ( 242 , 10 ) ;
-         Text [ en-US ] = "~Top to bottom (sort rows)" ;
-         TabStop = TRUE ;
-     };
-     RadioButton BTN_LEFT_RIGHT
-     {
--        Pos = MAP_APPFONT ( 12 , 158 ) ;
-+        Pos = MAP_APPFONT ( 12 , 172 ) ;
-         Size = MAP_APPFONT ( 242 , 10 ) ;
-         Text [ en-US ] = "L~eft to right (sort columns)" ;
-         TabStop = TRUE ;
-     };
-+/*
-     FixedText FT_AREA_LABEL
-     {
-         Pos = MAP_APPFONT ( 6 , 171 ) ;
-         Size = MAP_APPFONT ( 248 , 8 ) ;
-         Text [ en-US ] = "Data area:" ;
-     };
-+*/
- };
- TabDialog RID_SCDLG_SORT
- {
-diff --git sc/source/ui/view/cellsh2.cxx sc/source/ui/view/cellsh2.cxx
-index 62af646..3908596 100644
---- sc/source/ui/view/cellsh2.cxx
-+++ sc/source/ui/view/cellsh2.cxx
-@@ -438,6 +438,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
-                     aSortParam.bHasHeader		= bHasHeader;
-                     aSortParam.bByRow			= TRUE;
-                     aSortParam.bCaseSens		= FALSE;
-+                    aSortParam.bNaturalSort		= FALSE;
-                     aSortParam.bIncludePattern	= TRUE;
-                     aSortParam.bInplace 		= TRUE;
-                     aSortParam.bDoSort[0]		= TRUE;
-@@ -489,6 +490,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
-                             aSortParam.bHasHeader = ((const SfxBoolItem*)pItem)->GetValue();
-                         if ( pArgs->GetItemState( SID_SORT_CASESENS, TRUE, &pItem ) == SFX_ITEM_SET )
-                             aSortParam.bCaseSens = ((const SfxBoolItem*)pItem)->GetValue();
-+                    if ( pArgs->GetItemState( SID_SORT_NATURALSORT, TRUE, &pItem ) == SFX_ITEM_SET )
-+                        aSortParam.bNaturalSort = ((const SfxBoolItem*)pItem)->GetValue();
-                         if ( pArgs->GetItemState( SID_SORT_ATTRIBS, TRUE, &pItem ) == SFX_ITEM_SET )
-                             aSortParam.bIncludePattern = ((const SfxBoolItem*)pItem)->GetValue();
-                         if ( pArgs->GetItemState( SID_SORT_USERDEF, TRUE, &pItem ) == SFX_ITEM_SET )
-@@ -552,7 +555,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
- 
-                         pDlg = pFact->CreateScSortDlg( pTabViewShell->GetDialogParent(),  &aArgSet, RID_SCDLG_SORT );
-                         DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001
--                        pDlg->SetCurPageId(1);
-+                    pDlg->SetCurPageId(1);	// 1=sort field tab  2=sort options tab
- 
-                         if ( pDlg->Execute() == RET_OK )
-                         {
-@@ -571,6 +574,8 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
-                                     rOutParam.bHasHeader ) );
-                                 rReq.AppendItem( SfxBoolItem( SID_SORT_CASESENS,
-                                     rOutParam.bCaseSens ) );
-+                            rReq.AppendItem( SfxBoolItem( SID_SORT_NATURALSORT,
-+                                                rOutParam.bNaturalSort ) );
-                                 rReq.AppendItem( SfxBoolItem( SID_SORT_ATTRIBS,
-                                     rOutParam.bIncludePattern ) );
-                                 USHORT nUser = rOutParam.bUserDef ? ( rOutParam.nUserIndex + 1 ) : 0;
--- 
-1.7.0.1
-
commit bb1cd46a36cdea15bb3a6fe6c063e05f8f49d511
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 12:13:48 2010 +0200

    sc-save-password-minlength.diff: Migrate to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index d4b15a2..a70d232 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -525,9 +525,6 @@ sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 
 [ CalcFixes ]
 
-# Display min password length in dialog BINC 773
-sc-save-password-minlength.diff, i#21923, kohei
-
 # keybindings: <ctrl> +/‑ to insert/delete a complete line in calc (X#62530)
 calc-new-acceleration.diff, i#67029, michael
 
diff --git a/patches/dev300/sc-save-password-minlength.diff b/patches/dev300/sc-save-password-minlength.diff
deleted file mode 100644
index 0385879..0000000
--- a/patches/dev300/sc-save-password-minlength.diff
+++ /dev/null
@@ -1,154 +0,0 @@
----
- sfx2/inc/sfx2/passwd.hxx      |    6 ++++++
- sfx2/source/dialog/passwd.cxx |   26 ++++++++++++++++++++++++++
- sfx2/source/dialog/passwd.hrc |    3 +++
- sfx2/source/dialog/passwd.src |   16 ++++++++++++++++
- 4 files changed, 51 insertions(+), 0 deletions(-)
-
-diff --git sfx2/inc/sfx2/passwd.hxx sfx2/inc/sfx2/passwd.hxx
-index e6cbed2..6a583fe 100644
---- sfx2/inc/sfx2/passwd.hxx
-+++ sfx2/inc/sfx2/passwd.hxx
-@@ -55,6 +55,7 @@ private:
-     Edit			maPasswordED;
-     FixedText		maConfirmFT;
-     Edit			maConfirmED;
-+    FixedText		maMinLengthFT;
-     FixedLine       maPasswordBox;
- 
-     OKButton		maOKBtn;
-@@ -63,12 +64,17 @@ private:
- 
-     String			maConfirmStr;
-     USHORT			mnMinLen;
-+    String			maMinLenPwdStr;
-+    String			maEmptyPwdStr;
-+    String			maMainPwdStr;
-     USHORT			mnExtras;
- 
-     bool            mbAsciiOnly;
-     DECL_DLLPRIVATE_LINK( EditModifyHdl, Edit* );
-     DECL_DLLPRIVATE_LINK( OKHdl, OKButton* );
- 
-+    void			SetPasswdText();
-+
- public:
-     SfxPasswordDialog( Window* pParent, const String* pGroupText = NULL );
- 
-diff --git sfx2/source/dialog/passwd.cxx sfx2/source/dialog/passwd.cxx
-index 0999ae5..d454c8c 100644
---- sfx2/source/dialog/passwd.cxx
-+++ sfx2/source/dialog/passwd.cxx
-@@ -103,6 +103,7 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
-     maPasswordED	( this, SfxResId( ED_PASSWD_PASSWORD ) ),
-     maConfirmFT		( this, SfxResId( FT_PASSWD_CONFIRM ) ),
-     maConfirmED		( this, SfxResId( ED_PASSWD_CONFIRM ) ),
-+    maMinLengthFT	( this, SfxResId( FT_PASSWD_MINLEN ) ),
-     maPasswordBox	( this, SfxResId( GB_PASSWD_PASSWORD ) ),
-     maOKBtn			( this, SfxResId( BTN_PASSWD_OK ) ),
-     maCancelBtn		( this, SfxResId( BTN_PASSWD_CANCEL ) ),
-@@ -110,6 +111,9 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
-     maConfirmStr	( 		SfxResId( STR_PASSWD_CONFIRM ) ),
- 
-     mnMinLen		( 5 ),
-+    maMinLenPwdStr	( SfxResId( STR_PASSWD_MIN_LEN ) ),
-+    maEmptyPwdStr	( SfxResId( STR_PASSWD_EMPTY ) ),
-+    maMainPwdStr    ( ),
-     mnExtras		( 0 ),
-     mbAsciiOnly     ( false )
- 
-@@ -123,6 +127,25 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
- 
-     if ( pGroupText )
-           maPasswordBox.SetText( *pGroupText );
-+
-+//set the text to the pasword length
-+    SetPasswdText();
-+}
-+
-+// -----------------------------------------------------------------------
-+
-+void SfxPasswordDialog::SetPasswdText( )
-+{
-+//set the new string to the minimum password length
-+    if( mnMinLen == 0 )
-+        maMinLengthFT.SetText( maEmptyPwdStr );
-+    else
-+    {
-+        maMainPwdStr = maMinLenPwdStr;
-+        maMainPwdStr.SearchAndReplace( String::CreateFromAscii( "$(MINLEN)" ), String::CreateFromInt32((sal_Int32) mnMinLen ), 0);
-+        maMinLengthFT.SetText( maMainPwdStr );
-+        maMinLengthFT.Show();
-+    }
- }
- 
- // -----------------------------------------------------------------------
-@@ -130,6 +153,7 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
- void SfxPasswordDialog::SetMinLen( USHORT nLen )
- {
-     mnMinLen = nLen;
-+    SetPasswdText();
-     EditModifyHdl( NULL );
- }
- 
-@@ -189,8 +213,10 @@ short SfxPasswordDialog::Execute()
-             aPos = maUserED.GetPosPixel();
-             maPasswordED.SetPosPixel( aPos );
- 
-+            aPos = maConfirmFT.GetPosPixel();
-             maConfirmFT.SetPosPixel( aPwdPos1 );
-             maConfirmED.SetPosPixel( aPwdPos2 );
-+            maMinLengthFT.SetPosPixel(aPos);
-         }
- 
-         Size aBoxSize = maPasswordBox.GetSizePixel();
-diff --git sfx2/source/dialog/passwd.hrc sfx2/source/dialog/passwd.hrc
-index 7c96e13..059619a 100644
---- sfx2/source/dialog/passwd.hrc
-+++ sfx2/source/dialog/passwd.hrc
-@@ -36,12 +36,15 @@
- #define ED_PASSWD_PASSWORD 14
- #define FT_PASSWD_CONFIRM 15
- #define ED_PASSWD_CONFIRM 16
-+#define FT_PASSWD_MINLEN 17
- 
- #define BTN_PASSWD_OK 20
- #define BTN_PASSWD_CANCEL 21
- #define BTN_PASSWD_HELP 22
- 
- #define STR_PASSWD_CONFIRM 30
-+#define STR_PASSWD_MIN_LEN	31
-+#define STR_PASSWD_EMPTY	32
- 
- #endif
- 
-diff --git sfx2/source/dialog/passwd.src sfx2/source/dialog/passwd.src
-index b95c14c..b335bf0 100644
---- sfx2/source/dialog/passwd.src
-+++ sfx2/source/dialog/passwd.src
-@@ -77,6 +77,22 @@ ModalDialog DLG_PASSWD
-         Pos = MAP_APPFONT( 57, 44 );
-         Size = MAP_APPFONT( 75, 12 );
-     };
-+
-+    String STR_PASSWD_MIN_LEN
-+    {
-+        Text [ en-US ] = "(Minimum $(MINLEN) characters)" ;
-+    };
-+    String STR_PASSWD_EMPTY
-+    {
-+        Text [ en-US ] = "(The password can be empty)" ;
-+    };
-+
-+    FixedText FT_PASSWD_MINLEN
-+    {
-+        Pos = MAP_APPFONT(12, 65 );
-+        Size = MAP_APPFONT( 126, 10 );
-+    };
-+
-     FixedLine GB_PASSWD_PASSWORD
-     {
-         Pos = MAP_APPFONT( 6, 3 );
--- 
-1.7.0.1
-
commit 711e0c5057d781328652391350a047652cb1c4fa
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 12:08:43 2010 +0200

    calc-filter-xml-free-context.diff: Migrated to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index e0a239e..d4b15a2 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -575,9 +575,6 @@ sc-cellformat-icon-toggle.diff, n#358548, i#86377, kohei
 # is used, for Excel interoperability.
 sc-fit-to-width-height-skip-breaks.diff, n#404232, n#404563, i#94698, kohei
 
-# Don't use pShapeContext after deleting the instance.  Fixes SEGFAULT.
-calc-filter-xml-free-context.diff, n#467536, jonp
-
 # default output to new sheet, instead of current sheet.
 calc-dp-default-new-sheet.diff, i#50886, kohei
 
diff --git a/patches/dev300/calc-filter-xml-free-context.diff b/patches/dev300/calc-filter-xml-free-context.diff
deleted file mode 100644
index ee52860..0000000
--- a/patches/dev300/calc-filter-xml-free-context.diff
+++ /dev/null
@@ -1,19 +0,0 @@
----
- sc/source/filter/xml/xmlannoi.cxx |    1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git sc/source/filter/xml/xmlannoi.cxx sc/source/filter/xml/xmlannoi.cxx
-index 80c4edb..b13e148 100644
---- sc/source/filter/xml/xmlannoi.cxx
-+++ sc/source/filter/xml/xmlannoi.cxx
-@@ -192,6 +192,7 @@ void ScXMLAnnotationContext::EndElement()
-     {
-         pShapeContext->EndElement();
-         delete pShapeContext;
-+        pShapeContext = NULL;
-     }
- 
-     mrAnnotationData.maAuthor = maAuthorBuffer.makeStringAndClear();
--- 
-1.7.0.1
-
commit f8eb13438442344c77b55820362fbf815f72b576
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 12:06:16 2010 +0200

    sc-print-lines.diff: Migrate to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 7f00ebb..e0a239e 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -561,14 +561,6 @@ chart-odf-always-calc-a1.diff, n#463305, kohei
 
 enable-sheet-protection-options.diff, kohei
 
-# Allow objects to stay within cells as expected when rows are resized.
-# FIXME: 2009-08-11: doesn't appply, no obvious way to make it apply,
-# actual understanding of code needed. --tml
-# sc-object-row-position.diff, i#47088, jonp
-
-# Support print & page preview for files containing only lines
-sc-print-lines.diff, n#351468, i#85076, jonp
-
 # Dynyamically resize filtered range when new data rows are present.
 sc-dbrange-dynamic-resize.diff, n#352662, i#85305, kohei
 
diff --git a/patches/dev300/sc-print-lines.diff b/patches/dev300/sc-print-lines.diff
deleted file mode 100644
index 1df4319..0000000
--- a/patches/dev300/sc-print-lines.diff
+++ /dev/null
@@ -1,22 +0,0 @@
----
- sc/source/core/data/column2.cxx |    4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git sc/source/core/data/column2.cxx sc/source/core/data/column2.cxx
-index 18e00af..77fcc57 100644
---- sc/source/core/data/column2.cxx
-+++ sc/source/core/data/column2.cxx
-@@ -1321,6 +1321,10 @@ BOOL ScColumn::IsEmpty() const
- 
- BOOL ScColumn::IsEmptyBlock(SCROW nStartRow, SCROW nEndRow, bool bIgnoreNotes) const
- {
-+    Rectangle aRect;
-+    if (pAttrArray->HasLines(nStartRow, nEndRow, aRect, TRUE, TRUE))
-+        return FALSE;
-+
-     if ( nCount == 0 || !pItems )
-         return TRUE;
- 
--- 
-1.7.0.1
-
commit 91e3e8c7fad63f290244387864e64d2f3a6a71aa
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 12:03:26 2010 +0200

    sc-print-selected-sheets.diff: Migrate to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 40cd690..7f00ebb 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -561,9 +561,6 @@ chart-odf-always-calc-a1.diff, n#463305, kohei
 
 enable-sheet-protection-options.diff, kohei
 
-# Ensure that Print Preview is consistent with Print output.
-sc-print-selected-sheets.diff, n#335684, i#45497, jonp
-
 # Allow objects to stay within cells as expected when rows are resized.
 # FIXME: 2009-08-11: doesn't appply, no obvious way to make it apply,
 # actual understanding of code needed. --tml
diff --git a/patches/dev300/sc-print-selected-sheets.diff b/patches/dev300/sc-print-selected-sheets.diff
deleted file mode 100644
index a1ced98..0000000
--- a/patches/dev300/sc-print-selected-sheets.diff
+++ /dev/null
@@ -1,70 +0,0 @@
----
- sc/source/ui/inc/preview.hxx   |    2 ++
- sc/source/ui/view/preview.cxx  |   10 ++++++++++
- sc/source/ui/view/tabvwsh4.cxx |    5 +++++
- 3 files changed, 17 insertions(+), 0 deletions(-)
-
-diff --git sc/source/ui/inc/preview.hxx sc/source/ui/inc/preview.hxx
-index 51370b6..6a446de 100644
---- sc/source/ui/inc/preview.hxx
-+++ sc/source/ui/inc/preview.hxx
-@@ -63,6 +63,8 @@ private:
-     ScPreviewLocationData* pLocationData;	// stores table layout for accessibility API
-     FmFormView*		pDrawView;
- 
-+    SCTAB           nCurTab;
-+
-                                         // intern:
-     BOOL			bInPaint;
-     BOOL			bInGetState;
-diff --git sc/source/ui/view/preview.cxx sc/source/ui/view/preview.cxx
-index f96aa09..7e01874 100644
---- sc/source/ui/view/preview.cxx
-+++ sc/source/ui/view/preview.cxx
-@@ -109,6 +109,7 @@ ScPreview::ScPreview( Window* pParent, ScDocShell* pDocSh, ScPreviewShell* pView
-     bLocationValid( FALSE ),
-     pLocationData( NULL ),
-     pDrawView( NULL ),
-+    nCurTab ( ScDocShell::GetCurTab() ),
-     bInPaint( FALSE ),
-     bInGetState( FALSE ),
-     pDocShell( pDocSh ),
-@@ -249,8 +250,17 @@ void ScPreview::CalcPages( SCTAB /*nToWhichTab*/ )
-     //	but always all sheets are used (there is no selected sheet)
-     ScPrintOptions aOptions = SC_MOD()->GetPrintOptions();
- 
-+    ScMarkData aMarkData;
-+    aMarkData.SelectTable( nCurTab, TRUE );
-+
-     for (SCTAB i=nStart; i<nAnz; i++)
-     {
-+        if (!aOptions.GetAllSheets() && !aMarkData.GetTableSelect( i )) {
-+            nPages[i] = 0;
-+            nFirstAttr[i] = 0;
-+            continue;
-+        }
-+
-         long nAttrPage = i > 0 ? nFirstAttr[i-1] : 1;
- 
-         long nThisStart = nTotalPages;
-diff --git sc/source/ui/view/tabvwsh4.cxx sc/source/ui/view/tabvwsh4.cxx
-index cd52b98..095a6f3 100644
---- sc/source/ui/view/tabvwsh4.cxx
-+++ sc/source/ui/view/tabvwsh4.cxx
-@@ -1189,8 +1189,13 @@ PrintDialog* __EXPORT ScTabViewShell::CreatePrintDialog( Window *pParent )
-     // instead of a separate progress for each sheet from ScPrintFunc
-     pDocShell->UpdatePendingRowHeights( MAXTAB, true );
- 
-+    ScMarkData aMarkData;
-+    aMarkData.SelectTable( GetViewData()->GetTabNo(), TRUE );
-+
-     for ( SCTAB i=0; i<nTabCount; i++ )
-     {
-+        if ( !bAllTabs && !aMarkData.GetTableSelect( i ) )
-+            continue;
-         ScPrintFunc aPrintFunc( pDocShell, pPrinter, i );
-         nDocPageMax += aPrintFunc.GetTotalPages();
-     }
--- 
-1.7.0.1
-
commit 4b64c67dc13071fa675884582b0e2b820bd4361a
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 12:00:15 2010 +0200

    sc-extra-cell-margins.diff: Migrated to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 2d6f028..40cd690 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -538,9 +538,6 @@ sc-natural-sort.diff, i#26565, kohei
 # entire cell.
 calc-multiline-pattern-fix.diff, n#359690, n#437137, i#99291, kohei
 
-# Add extra padding so that the cell height is larger -- increases legibility.
-sc-extra-cell-margins.diff, n#361358, jonp
-
 # Change default numbering scheme of x-y plot chart from Row 1, Row2, ... to
 # 1, 2, 3... when the X labels are not explicitly given.  This is what Excel
 # does.
diff --git a/patches/dev300/sc-extra-cell-margins.diff b/patches/dev300/sc-extra-cell-margins.diff
deleted file mode 100644
index 877762b..0000000
--- a/patches/dev300/sc-extra-cell-margins.diff
+++ /dev/null
@@ -1,23 +0,0 @@
----
- sc/source/core/data/docpool.cxx |    5 ++++-
- 1 files changed, 4 insertions(+), 1 deletions(-)
-
-diff --git sc/source/core/data/docpool.cxx sc/source/core/data/docpool.cxx
-index 4589e79..1430bee 100644
---- sc/source/core/data/docpool.cxx
-+++ sc/source/core/data/docpool.cxx
-@@ -274,7 +274,10 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, BOOL bLoadRefCounts )
-     ppPoolDefaults[ ATTR_SHRINKTOFIT     - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_SHRINKTOFIT );
-     ppPoolDefaults[ ATTR_BORDER_TLBR     - ATTR_STARTINDEX ] = new SvxLineItem( ATTR_BORDER_TLBR );
-     ppPoolDefaults[ ATTR_BORDER_BLTR     - ATTR_STARTINDEX ] = new SvxLineItem( ATTR_BORDER_BLTR );
--    ppPoolDefaults[ ATTR_MARGIN          - ATTR_STARTINDEX ] = new SvxMarginItem( ATTR_MARGIN );
-+    SvxMarginItem* pItem = new SvxMarginItem( ATTR_MARGIN );
-+    pItem->SetTopMargin( 27 );
-+    pItem->SetBottomMargin( 27 );
-+    ppPoolDefaults[ ATTR_MARGIN          - ATTR_STARTINDEX ] = pItem;
-     ppPoolDefaults[	ATTR_MERGE			 - ATTR_STARTINDEX ] = new ScMergeAttr;
-     ppPoolDefaults[	ATTR_MERGE_FLAG		 - ATTR_STARTINDEX ] = new ScMergeFlagAttr;
-     ppPoolDefaults[	ATTR_VALUE_FORMAT	 - ATTR_STARTINDEX ] = new SfxUInt32Item( ATTR_VALUE_FORMAT, 0 );
--- 
-1.7.0.1
-
commit 14a19f234b67acb335e283465ba8293e55dab3d9
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 11:56:02 2010 +0200

    sc-date-fix.diff: Migrated to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 3b75bc9..2d6f028 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -534,9 +534,6 @@ calc-new-acceleration.diff, i#67029, michael
 # Add a 'Natural' variant of sorting, blocking on ODF extension issues
 sc-natural-sort.diff, i#26565, kohei
 
-# Allow 'june-2007' to be properly parsed as June 1 2007 in en-US locales.
-sc-date-fix.diff, n#358750, jonp
-
 # For multi-line cell contents, bolding the first line shouldn't bold the
 # entire cell.
 calc-multiline-pattern-fix.diff, n#359690, n#437137, i#99291, kohei
diff --git a/patches/dev300/sc-date-fix.diff b/patches/dev300/sc-date-fix.diff
deleted file mode 100644
index 507bdf2..0000000
--- a/patches/dev300/sc-date-fix.diff
+++ /dev/null
@@ -1,44 +0,0 @@
----
- svl/source/numbers/zforfind.cxx |   18 ++++++++++++++++--
- 1 files changed, 16 insertions(+), 2 deletions(-)
-
-diff --git svl/source/numbers/zforfind.cxx svl/source/numbers/zforfind.cxx
-index 1152d54..a049895 100644
---- svl/source/numbers/zforfind.cxx
-+++ svl/source/numbers/zforfind.cxx
-@@ -1109,9 +1109,16 @@ input for the following reasons:
-                         switch (DateFmt)
-                         {
-                             case MDY:
--                            case YMD:
--                                pCal->setValue( CalendarFieldIndex::DAY_OF_MONTH, ImplGetDay(0) );
-+                            case YMD: {
-+                                USHORT nDay = ImplGetDay(0);
-+                                USHORT nYear = ImplGetYear(0);
-+                                if (nDay == 0 || nDay > 32) {
-+                                    pCal->setValue( CalendarFieldIndex::YEAR, nYear);
-+                                }
-+                                else
-+                                    pCal->setValue( CalendarFieldIndex::DAY_OF_MONTH, ImplGetDay(0) );
-                                 break;
-+                            }
-                             case DMY:
-                                 pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(0) );
-                                 break;
-@@ -1550,6 +1557,13 @@ BOOL ImpSvNumberInputScan::ScanStartString( const String& rString,
-         }
-     }
- 
-+    // skip any trailing '-' or '/' chars
-+    if (nPos < rString.Len())
-+    {
-+        while (SkipChar ('-', rString, nPos) || SkipChar ('/', rString, nPos)) {
-+            // do nothing
-+        }
-+    }
-     if (nPos < rString.Len())                       // not everything consumed
-     {
-         // Does input StartString equal StartString of format?
--- 
-1.7.0.1
-
commit aa5173ee205c88e3d9ec247fac85d309451135ca
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Sep 15 11:52:24 2010 +0200

    sc-xls-builtin-name-scope.diff: Migrated to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index ddae898..3b75bc9 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -531,9 +531,6 @@ sc-save-password-minlength.diff, i#21923, kohei
 # keybindings: <ctrl> +/‑ to insert/delete a complete line in calc (X#62530)
 calc-new-acceleration.diff, i#67029, michael
 
-# Print_Area/Print_Titles are only relevant for sheet local names, n#191005
-sc-xls-builtin-name-scope.diff, n#191005, n#257422, jonp
-
 # Add a 'Natural' variant of sorting, blocking on ODF extension issues
 sc-natural-sort.diff, i#26565, kohei
 
diff --git a/patches/dev300/sc-xls-builtin-name-scope.diff b/patches/dev300/sc-xls-builtin-name-scope.diff
deleted file mode 100644
index a884d49..0000000
--- a/patches/dev300/sc-xls-builtin-name-scope.diff
+++ /dev/null
@@ -1,290 +0,0 @@
----
- sc/source/filter/excel/excform.cxx  |   17 +++++++++--------
- sc/source/filter/excel/excform8.cxx |   17 +++++++++--------
- sc/source/filter/excel/frmbase.cxx  |   26 ++++++++++++++++++--------
- sc/source/filter/excel/xiname.cxx   |    6 ++++--
- sc/source/filter/inc/excform.hxx    |    4 ++--
- sc/source/filter/inc/formel.hxx     |    6 +++---
- 6 files changed, 45 insertions(+), 31 deletions(-)
-
-diff --git sc/source/filter/excel/excform.cxx sc/source/filter/excel/excform.cxx
-index cf22c81..51c3d4b 100644
---- sc/source/filter/excel/excform.cxx
-+++ sc/source/filter/excel/excform.cxx
-@@ -898,7 +898,8 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
- 
- 
- // stream seeks to first byte after <nFormulaLen>
--ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_Size nFormulaLen, const FORMULA_TYPE eFT )
-+ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_Size nFormulaLen,
-+                            SCsTAB nTab, const FORMULA_TYPE eFT )
- {
-     RootData&       rR = GetOldRoot();
-     BYTE			nOp, nLen;
-@@ -1066,7 +1067,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
- 
-                 ExcRelToScRel( nUINT16, nByte, aSRD, bRangeName );
- 
--                rRangeList.Append( aSRD );
-+                rRangeList.Append( aSRD, nTab );
-                 break;
-             case 0x45:
-             case 0x65:
-@@ -1093,7 +1094,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
-                 else if( IsComplRowRange( nRowFirst, nRowLast ) )
-                     SetComplRow( aCRD );
- 
--                rRangeList.Append( aCRD );
-+                rRangeList.Append( aCRD, nTab );
-             }
-                 break;
-             case 0x46:
-@@ -1130,7 +1131,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
- 
-                 ExcRelToScRel( nUINT16, nByte, aSRD, bRNorSF );
- 
--                rRangeList.Append( aSRD );
-+                rRangeList.Append( aSRD, nTab );
-             }
-                 break;
-             case 0x4D:
-@@ -1156,7 +1157,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
-                 else if( IsComplRowRange( nRowFirst, nRowLast ) )
-                     SetComplRow( aCRD );
- 
--                rRangeList.Append( aCRD );
-+                rRangeList.Append( aCRD, nTab );
-             }
-                 break;
-             case 0x49:
-@@ -1226,10 +1227,10 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
-                         b3D = ( static_cast<SCTAB>(nTabLast) != aEingPos.Tab() );
-                         aCRD.Ref2.SetFlag3D( b3D );
-                         aCRD.Ref2.SetTabRel( FALSE );
--                        rRangeList.Append( aCRD );
-+                        rRangeList.Append( aCRD, nTab );
-                     }
-                     else
--                        rRangeList.Append( aSRD );
-+                        rRangeList.Append( aSRD, nTab );
-                 }
-             }
- 
-@@ -1284,7 +1285,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
-                     else if( IsComplRowRange( nRowFirst, nRowLast ) )
-                         SetComplRow( aCRD );
- 
--                    rRangeList.Append( aCRD );
-+                    rRangeList.Append( aCRD, nTab );
-                 }//ENDE in aktuellem Workbook
-             }
-                 break;
-diff --git sc/source/filter/excel/excform8.cxx sc/source/filter/excel/excform8.cxx
-index c50151c..ab5dc89 100644
---- sc/source/filter/excel/excform8.cxx
-+++ sc/source/filter/excel/excform8.cxx
-@@ -871,7 +871,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
- 
- 
- // stream seeks to first byte after <nFormulaLen>

... etc. - the rest is truncated


More information about the ooo-build-commit mailing list