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

Fridrich Strba fridrich at kemper.freedesktop.org
Thu Sep 16 01:40:25 PDT 2010


 patches/dev300/apply                                         |   10 
 patches/dev300/calc-autoinput-case-insensitive-matching.diff |   30 
 patches/dev300/calc-jump-on-formula-ref-offapi.diff          |   26 
 patches/dev300/calc-jump-on-formula-ref-officecfg.diff       |   28 
 patches/dev300/calc-jump-on-formula-ref-sc.diff              |  652 -----------
 patches/dev300/calc-jump-on-formula-ref-sfx2.diff            |   50 
 patches/dev300/calc-jump-on-formula-ref-vcl.diff             |   81 -
 7 files changed, 877 deletions(-)

New commits:
commit 6eec61a66cf7a0b45bc9829af7621715c32722c6
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Thu Sep 16 10:39:44 2010 +0200

    calc-jump-on-formula-ref-\*.diff: Migrated to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 5369cad..eb48841 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -528,13 +528,6 @@ sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 calc-enhanced-merge-cells-sc.diff,        n#213205, i#67243, i#101042, jholesov/kohei
 calc-enhanced-merge-cells-officecfg.diff, n#213205, i#67243, i#101042, jholesov/kohei
 
-# allow ctrl-[ and ctrl-] to jump to references used in a formula expression.
-calc-jump-on-formula-ref-offapi.diff,    n#464359, i#101018, kohei
-calc-jump-on-formula-ref-officecfg.diff, n#464359, i#101018, kohei
-calc-jump-on-formula-ref-sc.diff,        n#464359, i#101018, kohei
-calc-jump-on-formula-ref-sfx2.diff,      n#464359, i#101018, kohei
-calc-jump-on-formula-ref-vcl.diff,       n#464359, i#101018, kohei
-
 # support ods import/export of sheet options and password hash.
 calc-ods-sheet-protection-sc.diff,      i#60305, i#71468, kohei
 calc-ods-sheet-protection-xmloff.diff,  i#60305, i#71468, kohei
diff --git a/patches/dev300/calc-jump-on-formula-ref-offapi.diff b/patches/dev300/calc-jump-on-formula-ref-offapi.diff
deleted file mode 100644
index 186ec9b..0000000
--- a/patches/dev300/calc-jump-on-formula-ref-offapi.diff
+++ /dev/null
@@ -1,26 +0,0 @@
----
- offapi/com/sun/star/awt/Key.idl |    8 ++++++++
- 1 files changed, 8 insertions(+), 0 deletions(-)
-
-diff --git offapi/com/sun/star/awt/Key.idl offapi/com/sun/star/awt/Key.idl
-index d34b3f4..26176d8 100644
---- offapi/com/sun/star/awt/Key.idl
-+++ offapi/com/sun/star/awt/Key.idl
-@@ -459,6 +459,14 @@ published constants Key
-     const short DELETE_TO_BEGIN_OF_PARAGRAPH = 1538;
-     
-     //-------------------------------------------------------------------------
-+
-+    const short BRACKETLEFT = 1315;
-+
-+    //-------------------------------------------------------------------------
-+
-+    const short BRACKETRIGHT = 1316;
-+
-+    //-------------------------------------------------------------------------
-     
-     const short DELETE_TO_END_OF_PARAGRAPH = 1539;
-     
--- 
-1.7.0.1
-
diff --git a/patches/dev300/calc-jump-on-formula-ref-officecfg.diff b/patches/dev300/calc-jump-on-formula-ref-officecfg.diff
deleted file mode 100644
index 991bf15..0000000
--- a/patches/dev300/calc-jump-on-formula-ref-officecfg.diff
+++ /dev/null
@@ -1,28 +0,0 @@
----
- .../data/org/openoffice/Office/UI/CalcCommands.xcu |   10 ++++++++++
- 1 files changed, 10 insertions(+), 0 deletions(-)
-
-diff --git officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
-index 308eb12..1c71f00 100644
---- officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
-+++ officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
-@@ -1600,6 +1600,16 @@
-                     <value xml:lang="en-US">Assign Macro...</value>
-                 </prop>
-             </node>
-+            <node oor:name=".uno:MarkPrecedents" oor:op="replace">
-+                <prop oor:name="Label" oor:type="xs:string">
-+                    <value xml:lang="en-US">Mark Precedents</value>
-+                </prop>
-+            </node>
-+            <node oor:name=".uno:MarkDependents" oor:op="replace">
-+                <prop oor:name="Label" oor:type="xs:string">
-+                    <value xml:lang="en-US">Mark Dependents</value>
-+                </prop>
-+            </node>
-         </node>
-     </node>
- </oor:component-data>
--- 
-1.7.0.1
-
diff --git a/patches/dev300/calc-jump-on-formula-ref-sc.diff b/patches/dev300/calc-jump-on-formula-ref-sc.diff
deleted file mode 100644
index e94cbb4..0000000
--- a/patches/dev300/calc-jump-on-formula-ref-sc.diff
+++ /dev/null
@@ -1,652 +0,0 @@
----
- sc/inc/cell.hxx                        |    1 +
- sc/inc/detfunc.hxx                     |    7 ++
- sc/inc/reftokenhelper.hxx              |    3 +
- sc/inc/sc.hrc                          |    3 +
- sc/sdi/cellsh.sdi                      |    2 +
- sc/sdi/scalc.sdi                       |   49 +++++++++++
- sc/source/core/data/cell.cxx           |   26 ++++---
- sc/source/core/tool/detfunc.cxx        |   52 ++++++++++++
- sc/source/core/tool/makefile.mk        |    1 +
- sc/source/core/tool/reftokenhelper.cxx |   16 ++++
- sc/source/ui/docshell/docfunc.cxx      |   39 +++++++++
- sc/source/ui/inc/docfunc.hxx           |    6 ++
- sc/source/ui/inc/viewfunc.hxx          |    4 +
- sc/source/ui/view/cellsh1.cxx          |    7 ++
- sc/source/ui/view/gridwin.cxx          |   11 +++
- sc/source/ui/view/tabvwsh3.cxx         |    4 +-
- sc/source/ui/view/viewfun6.cxx         |  137 ++++++++++++++++++++++++++++++++
- 17 files changed, 356 insertions(+), 12 deletions(-)
-
-diff --git sc/inc/cell.hxx sc/inc/cell.hxx
-index c5f17a4..93818ec 100644
---- sc/inc/cell.hxx
-+++ sc/inc/cell.hxx
-@@ -549,6 +549,7 @@ private:
- public:
-                 ScDetectiveRefIter( ScFormulaCell* pCell );
-     BOOL		GetNextRef( ScRange& rRange );
-+    ScToken*    GetNextRefToken();
- };
- 
- // ============================================================================
-diff --git sc/inc/detfunc.hxx sc/inc/detfunc.hxx
-index 4e72dea..117dbf1 100644
---- sc/inc/detfunc.hxx
-+++ sc/inc/detfunc.hxx
-@@ -32,6 +32,9 @@
- #include <tools/gen.hxx>
- #include <tools/color.hxx>
- #include "scdllapi.h"
-+#include "token.hxx"
-+
-+#include <vector>
- 
- class SdrObject;
- class SdrPage;
-@@ -43,6 +46,7 @@ class ScDetectiveData;
- class ScDocument;
- class ScAddress;
- class ScRange;
-+class ScRangeList;
- 
- #define SC_DET_MAXCIRCLE	1000
- 
-@@ -144,6 +148,9 @@ public:
- 
-     BOOL		MarkInvalid(BOOL& rOverflow);
- 
-+    void        GetAllPreds(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ::std::vector<ScSharedTokenRef>& rRefTokens);
-+    void        GetAllSuccs(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ::std::vector<ScSharedTokenRef>& rRefTokens);
-+
-     static void UpdateAllComments( ScDocument& rDoc );        // on all tables
-     void		UpdateAllArrowColors();		// on all tables
- 
-diff --git sc/inc/reftokenhelper.hxx sc/inc/reftokenhelper.hxx
-index 4a1e47c..972f588 100644
---- sc/inc/reftokenhelper.hxx
-+++ sc/inc/reftokenhelper.hxx
-@@ -75,6 +75,9 @@ public:
-     static void SC_DLLPUBLIC join(::std::vector<ScSharedTokenRef>& rTokens, const ScSharedTokenRef& pToken);
- 
-     static bool getDoubleRefDataFromToken(ScComplexRefData& rData, const ScSharedTokenRef& pToken);
-+
-+    static ScSharedTokenRef createRefToken(const ScAddress& rAddr);
-+    static ScSharedTokenRef createRefToken(const ScRange& rRange);
- };
- 
- #endif
-diff --git sc/inc/sc.hrc sc/inc/sc.hrc
-index bde1d80..f342d9c 100644
---- sc/inc/sc.hrc
-+++ sc/inc/sc.hrc
-@@ -901,6 +901,9 @@
- #define SID_DETECTIVE_REFRESH   (DETECTIVE_START+14)
- #define SID_DETECTIVE_AUTO      (DETECTIVE_START+15)
- 
-+#define SID_DETECTIVE_MARK_PRED (DETECTIVE_START+16)
-+#define SID_DETECTIVE_MARK_SUCC (DETECTIVE_START+17)
-+
- #define DETECTIVE_END			(DETECTIVE_START+20)
- 
- #define SID_API_SLOTS			(DETECTIVE_END)
-diff --git sc/sdi/cellsh.sdi sc/sdi/cellsh.sdi
-index 0b89ca0..957c3d1 100644
---- sc/sdi/cellsh.sdi
-+++ sc/sdi/cellsh.sdi
-@@ -112,6 +112,8 @@ interface CellSelection
-     SID_DETECTIVE_ADD_ERR	[ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
-     SID_DETECTIVE_INVALID	[ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
-     SID_DETECTIVE_REFRESH	[ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
-+    SID_DETECTIVE_MARK_PRED	[ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
-+    SID_DETECTIVE_MARK_SUCC	[ ExecMethod = ExecuteEdit; StateMethod = GetState; ]
-     FID_INS_ROW				[ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
-     FID_INS_COLUMN			[ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
-     FID_INS_CELLSDOWN		[ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
-diff --git sc/sdi/scalc.sdi sc/sdi/scalc.sdi
-index 0bf0611..dade68a 100644
---- sc/sdi/scalc.sdi
-+++ sc/sdi/scalc.sdi
-@@ -7828,6 +7828,55 @@ SvxColorItem TabBgColor FID_TAB_SET_TAB_BG_COLOR
- ]
- 
- //--------------------------------------------------------------------------
-+SfxVoidItem MarkPrecedents SID_DETECTIVE_MARK_PRED
-+()
-+[
-+    /* flags: */
-+    AutoUpdate = FALSE,
-+    Cachable = Cachable,
-+    FastCall = FALSE,
-+    HasCoreId = FALSE,
-+    HasDialog = FALSE,
-+    ReadOnlyDoc = TRUE,
-+    Toggle = FALSE,
-+    Container = FALSE,
-+    RecordAbsolute = FALSE,
-+    RecordPerSet;
-+    Synchron;
-+
-+    /* config: */
-+    AccelConfig = TRUE,
-+    MenuConfig = TRUE,
-+    StatusBarConfig = FALSE,
-+    ToolBoxConfig = FALSE,
-+    GroupId = GID_OPTIONS;
-+]
-+
-+//--------------------------------------------------------------------------
-+SfxVoidItem MarkDependents SID_DETECTIVE_MARK_SUCC
-+()
-+[
-+    /* flags: */
-+    AutoUpdate = FALSE,
-+    Cachable = Cachable,
-+    FastCall = FALSE,
-+    HasCoreId = FALSE,
-+    HasDialog = FALSE,
-+    ReadOnlyDoc = TRUE,
-+    Toggle = FALSE,
-+    Container = FALSE,
-+    RecordAbsolute = FALSE,
-+    RecordPerSet;
-+    Synchron;
-+
-+    /* config: */
-+    AccelConfig = TRUE,
-+    MenuConfig = TRUE,
-+    StatusBarConfig = FALSE,
-+    ToolBoxConfig = FALSE,
-+    GroupId = GID_OPTIONS;
-+]
-+//--------------------------------------------------------------------------
- SfxVoidItem SetTabBgColor FID_TAB_MENU_SET_TAB_BG_COLOR
- (SvxColorItem TabBgColor FID_TAB_SET_TAB_BG_COLOR)
- [
-diff --git sc/source/core/data/cell.cxx sc/source/core/data/cell.cxx
-index a88dad5..d73bc1f 100644
---- sc/source/core/data/cell.cxx
-+++ sc/source/core/data/cell.cxx
-@@ -1998,7 +1998,7 @@ BOOL lcl_ScDetectiveRefIter_SkipRef( ScToken* p )
-     if ( rRef1.IsColDeleted() || rRef1.IsRowDeleted() || rRef1.IsTabDeleted()
-             || !rRef1.Valid() )
-         return TRUE;
--    if ( p->GetType() == svDoubleRef )
-+    if ( p->GetType() == svDoubleRef || p->GetType() == svExternalDoubleRef )
-     {
-         ScSingleRefData& rRef2 = p->GetDoubleRef().Ref2;
-         if ( rRef2.IsColDeleted() || rRef2.IsRowDeleted() || rRef2.IsTabDeleted()
-@@ -2011,7 +2011,20 @@ BOOL lcl_ScDetectiveRefIter_SkipRef( ScToken* p )
- BOOL ScDetectiveRefIter::GetNextRef( ScRange& rRange )
- {
-     BOOL bRet = FALSE;
-+    ScToken* p = GetNextRefToken();
-+    if( p )
-+    {
-+        SingleDoubleRefProvider aProv( *p );
-+        rRange.aStart.Set( aProv.Ref1.nCol, aProv.Ref1.nRow, aProv.Ref1.nTab );
-+        rRange.aEnd.Set( aProv.Ref2.nCol, aProv.Ref2.nRow, aProv.Ref2.nTab );
-+        bRet = TRUE;
-+    }
- 
-+    return bRet;
-+}
-+
-+ScToken* ScDetectiveRefIter::GetNextRefToken()
-+{
-     ScToken* p = static_cast<ScToken*>(pCode->GetNextReferenceRPN());
-     if (p)
-         p->CalcAbsIfRel( aPos );
-@@ -2022,16 +2035,7 @@ BOOL ScDetectiveRefIter::GetNextRef( ScRange& rRange )
-         if (p)
-             p->CalcAbsIfRel( aPos );
-     }
--
--    if( p )
--    {
--        SingleDoubleRefProvider aProv( *p );
--        rRange.aStart.Set( aProv.Ref1.nCol, aProv.Ref1.nRow, aProv.Ref1.nTab );
--        rRange.aEnd.Set( aProv.Ref2.nCol, aProv.Ref2.nRow, aProv.Ref2.nTab );
--        bRet = TRUE;
--    }
--
--    return bRet;
-+    return p;
- }
- 
- // ============================================================================
-diff --git sc/source/core/tool/detfunc.cxx sc/source/core/tool/detfunc.cxx
-index b104592..993a257 100644
---- sc/source/core/tool/detfunc.cxx
-+++ sc/source/core/tool/detfunc.cxx
-@@ -77,6 +77,12 @@
- #include "attrib.hxx"
- #include "scmod.hxx"
- #include "postit.hxx"
-+#include "rangelst.hxx"
-+#include "reftokenhelper.hxx"
-+
-+#include <vector>
-+
-+using ::std::vector;
- 
- //------------------------------------------------------------------------
- 
-@@ -1420,6 +1426,52 @@ BOOL ScDetectiveFunc::MarkInvalid(BOOL& rOverflow)
-     return ( bDeleted || nInsCount != 0 );
- }
- 
-+void ScDetectiveFunc::GetAllPreds(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
-+                                  vector<ScSharedTokenRef>& rRefTokens)
-+{
-+    ScCellIterator aCellIter(pDoc, nCol1, nRow1, nTab, nCol2, nRow2, nTab);
-+    for (ScBaseCell* pCell = aCellIter.GetFirst(); pCell; pCell = aCellIter.GetNext())
-+    {
-+        if (pCell->GetCellType() != CELLTYPE_FORMULA)
-+            continue;
-+
-+        ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
-+        ScDetectiveRefIter aRefIter(pFCell);
-+        for (ScToken* p = aRefIter.GetNextRefToken(); p; p = aRefIter.GetNextRefToken())
-+        {
-+            ScSharedTokenRef pRef(static_cast<ScToken*>(p->Clone()));
-+            ScRefTokenHelper::join(rRefTokens, pRef);
-+        }
-+    }
-+}
-+
-+void ScDetectiveFunc::GetAllSuccs(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
-+                                  vector<ScSharedTokenRef>& rRefTokens)
-+{
-+    vector<ScSharedTokenRef> aSrcRange;
-+    aSrcRange.push_back(
-+        ScRefTokenHelper::createRefToken(ScRange(nCol1, nRow1, nTab, nCol2, nRow2, nTab)));
-+
-+    ScCellIterator aCellIter(pDoc, 0, 0, nTab, MAXCOL, MAXROW, nTab);
-+    for (ScBaseCell* pCell = aCellIter.GetFirst(); pCell; pCell = aCellIter.GetNext())
-+    {
-+        if (pCell->GetCellType() != CELLTYPE_FORMULA)
-+            continue;
-+
-+        ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell);
-+        ScDetectiveRefIter aRefIter(pFCell);
-+        for (ScToken* p = aRefIter.GetNextRefToken(); p; p = aRefIter.GetNextRefToken())
-+        {
-+            ScSharedTokenRef pRef(static_cast<ScToken*>(p->Clone()));
-+            if (ScRefTokenHelper::intersects(aSrcRange, pRef))
-+            {
-+                pRef = ScRefTokenHelper::createRefToken(aCellIter.GetPos());
-+                ScRefTokenHelper::join(rRefTokens, pRef);
-+            }
-+        }
-+    }
-+}
-+
- void ScDetectiveFunc::UpdateAllComments( ScDocument& rDoc )
- {
-     //	for all caption objects, update attributes and SpecialTextBoxShadow flag
-diff --git sc/source/core/tool/makefile.mk sc/source/core/tool/makefile.mk
-index c0258e6..9c4cac2 100644
---- sc/source/core/tool/makefile.mk
-+++ sc/source/core/tool/makefile.mk
-@@ -121,6 +121,7 @@ EXCEPTIONSFILES= \
-         $(SLO)$/chartlock.obj \
-         $(SLO)$/chgtrack.obj \
-         $(SLO)$/compiler.obj \
-+        $(SLO)$/detfunc.obj \
-         $(SLO)$/doubleref.obj \
-         $(SLO)$/formulaparserpool.obj \
-         $(SLO)$/interpr1.obj \
-diff --git sc/source/core/tool/reftokenhelper.cxx sc/source/core/tool/reftokenhelper.cxx
-index b89e9fe..590f0ff 100644
---- sc/source/core/tool/reftokenhelper.cxx
-+++ sc/source/core/tool/reftokenhelper.cxx
-@@ -477,3 +477,19 @@ bool ScRefTokenHelper::getDoubleRefDataFromToken(ScComplexRefData& rData, const
-     }
-     return true;
- }
-+
-+ScSharedTokenRef ScRefTokenHelper::createRefToken(const ScAddress& rAddr)
-+{
-+    ScSingleRefData aRefData;
-+    aRefData.InitAddress(rAddr);
-+    ScSharedTokenRef pRef(new ScSingleRefToken(aRefData));
-+    return pRef;
-+}
-+
-+ScSharedTokenRef ScRefTokenHelper::createRefToken(const ScRange& rRange)
-+{
-+    ScComplexRefData aRefData;
-+    aRefData.InitRange(rRange);
-+    ScSharedTokenRef pRef(new ScDoubleRefToken(aRefData));
-+    return pRef;
-+}
-diff --git sc/source/ui/docshell/docfunc.cxx sc/source/ui/docshell/docfunc.cxx
-index 80af0ec..cb2cb0f 100644
---- sc/source/ui/docshell/docfunc.cxx
-+++ sc/source/ui/docshell/docfunc.cxx
-@@ -108,6 +108,7 @@
- 
- using namespace com::sun::star;
- using ::com::sun::star::uno::Sequence;
-+using ::std::vector;
- 
- // STATIC DATA -----------------------------------------------------------
- 
-@@ -538,6 +539,44 @@ BOOL ScDocFunc::DetectiveRefresh( BOOL bAutomatic )
-     return bDone;
- }
- 
-+static void lcl_collectAllPredOrSuccRanges(
-+    const ScRangeList& rSrcRanges, vector<ScSharedTokenRef>& rRefTokens, ScDocShell& rDocShell,
-+    bool bPred)
-+{
-+    ScDocument* pDoc = rDocShell.GetDocument();
-+    vector<ScSharedTokenRef> aRefTokens;
-+    ScRangeList aSrcRanges(rSrcRanges);
-+    ScRange* p = aSrcRanges.First();
-+    if (!p)
-+        return;
-+    ScDetectiveFunc aDetFunc(pDoc, p->aStart.Tab());
-+    ScRangeList aDestRanges;
-+    for (; p; p = aSrcRanges.Next())
-+    {
-+        if (bPred)
-+        {
-+            aDetFunc.GetAllPreds(
-+                p->aStart.Col(), p->aStart.Row(), p->aEnd.Col(), p->aEnd.Row(), aRefTokens);
-+        }
-+        else
-+        {
-+            aDetFunc.GetAllSuccs(
-+                p->aStart.Col(), p->aStart.Row(), p->aEnd.Col(), p->aEnd.Row(), aRefTokens);
-+        }
-+    }
-+    rRefTokens.swap(aRefTokens);
-+}
-+
-+void ScDocFunc::DetectiveCollectAllPreds(const ScRangeList& rSrcRanges, vector<ScSharedTokenRef>& rRefTokens)
-+{
-+    lcl_collectAllPredOrSuccRanges(rSrcRanges, rRefTokens, rDocShell, true);
-+}
-+
-+void ScDocFunc::DetectiveCollectAllSuccs(const ScRangeList& rSrcRanges, vector<ScSharedTokenRef>& rRefTokens)
-+{
-+    lcl_collectAllPredOrSuccRanges(rSrcRanges, rRefTokens, rDocShell, false);
-+}
-+
- //------------------------------------------------------------------------
- 
- BOOL ScDocFunc::DeleteContents( const ScMarkData& rMark, USHORT nFlags,
-diff --git sc/source/ui/inc/docfunc.hxx sc/source/ui/inc/docfunc.hxx
-index dfded9e..7f63499 100644
---- sc/source/ui/inc/docfunc.hxx
-+++ sc/source/ui/inc/docfunc.hxx
-@@ -32,6 +32,9 @@
- #include "global.hxx"
- #include "formula/grammar.hxx"
- #include "tabbgcolor.hxx"
-+#include "token.hxx"
-+
-+#include <vector>
- 
- class ScEditEngineDefaulter;
- class SdrUndoAction;
-@@ -40,6 +43,7 @@ class ScDocShell;
- class ScMarkData;
- class ScPatternAttr;
- class ScRange;
-+class ScRangeList;
- class ScRangeName;
- class ScBaseCell;
- class ScTokenArray;
-@@ -75,6 +79,8 @@ public:
-     BOOL			DetectiveMarkInvalid(SCTAB nTab);
-     BOOL			DetectiveDelAll(SCTAB nTab);
-     BOOL			DetectiveRefresh(BOOL bAutomatic = FALSE);
-+    void            DetectiveCollectAllPreds(const ScRangeList& rSrcRanges, ::std::vector<ScSharedTokenRef>& rRefTokens);
-+    void            DetectiveCollectAllSuccs(const ScRangeList& rSrcRanges, ::std::vector<ScSharedTokenRef>& rRefTokens);
- 
-     BOOL			DeleteContents( const ScMarkData& rMark, USHORT nFlags,
-                                     BOOL bRecord, BOOL bApi );
-diff --git sc/source/ui/inc/viewfunc.hxx sc/source/ui/inc/viewfunc.hxx
-index 5483138..8a5aeee 100644
---- sc/source/ui/inc/viewfunc.hxx
-+++ sc/source/ui/inc/viewfunc.hxx
-@@ -328,6 +328,8 @@ public:
-     void			DetectiveMarkInvalid();
-     void			DetectiveDelAll();
-     void			DetectiveRefresh();
-+    void            DetectiveMarkPred();
-+    void            DetectiveMarkSucc();
- 
-     void			ShowNote( bool bShow = true );
-     inline void		HideNote() { ShowNote( false ); }
-@@ -361,6 +363,8 @@ private:
-     BOOL			TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrChanged );
-     void			DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
-                                         BOOL bAttrChanged, BOOL bAddUndo );
-+
-+    void            MarkAndJumpToRanges(const ScRangeList& rRanges);
- };
- 
- 
-diff --git sc/source/ui/view/cellsh1.cxx sc/source/ui/view/cellsh1.cxx
-index d5841fa..4282c14 100644
---- sc/source/ui/view/cellsh1.cxx
-+++ sc/source/ui/view/cellsh1.cxx
-@@ -1548,6 +1548,13 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
-             rReq.Done();
-             break;
- 
-+        case SID_DETECTIVE_MARK_PRED:
-+            pTabViewShell->DetectiveMarkPred();
-+            break;
-+        case SID_DETECTIVE_MARK_SUCC:
-+            pTabViewShell->DetectiveMarkSucc();
-+            break;
-+
-         case SID_SPELL_DIALOG:
- //           pTabViewShell->DoSpellingChecker();
-             {
-diff --git sc/source/ui/view/gridwin.cxx sc/source/ui/view/gridwin.cxx
-index b08f3bb..19bae47 100644
---- sc/source/ui/view/gridwin.cxx
-+++ sc/source/ui/view/gridwin.cxx
-@@ -3093,6 +3093,17 @@ void __EXPORT ScGridWindow::KeyInput(const KeyEvent& rKEvt)
-                 ShowNoteMarker( pViewData->GetCurX(), pViewData->GetCurY(), TRUE );
-             return;
-         }
-+        if (aCode.GetCode() == KEY_BRACKETLEFT && aCode.GetModifier() == KEY_MOD1)
-+        {
-+            pViewSh->DetectiveMarkPred();
-+            return;
-+        }
-+        if (aCode.GetCode() == KEY_BRACKETRIGHT && aCode.GetModifier() == KEY_MOD1)
-+        {
-+            pViewSh->DetectiveMarkSucc();
-+            return;
-+        }
-+
-     }
- 
-     Window::KeyInput(rKEvt);
-diff --git sc/source/ui/view/tabvwsh3.cxx sc/source/ui/view/tabvwsh3.cxx
-index e10052d..c09f44a 100644
---- sc/source/ui/view/tabvwsh3.cxx
-+++ sc/source/ui/view/tabvwsh3.cxx
-@@ -403,13 +403,15 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
-                     {
-                         pViewData->ResetOldCursor();
-                         SetCursor( nCol, nRow );
--                        AlignToCursor( nCol, nRow, SC_FOLLOW_JUMP );
-                         rBindings.Invalidate( SID_CURRENTCELL );
-                         rBindings.Update( nSlot );
- 
-                         if (!rReq.IsAPI())
-                             rReq.Done();
-                     }
-+                    // align to cursor even if the cursor position hasn't changed,
-+                    // because the cursor may be set outside the visible area.
-+                    AlignToCursor( nCol, nRow, SC_FOLLOW_JUMP );
- 
-                     rReq.SetReturnValue( SfxStringItem( SID_CURRENTCELL, aAddress ) );
-                 }
-diff --git sc/source/ui/view/viewfun6.cxx sc/source/ui/view/viewfun6.cxx
-index d744582..ce62dd0 100644
---- sc/source/ui/view/viewfun6.cxx
-+++ sc/source/ui/view/viewfun6.cxx
-@@ -47,6 +47,13 @@
- #include "globstr.hrc"
- #include "sc.hrc"
- #include "fusel.hxx"
-+#include "reftokenhelper.hxx"
-+#include "externalrefmgr.hxx"
-+
-+#include <vector>
-+
-+using ::rtl::OUStringBuffer;
-+using ::std::vector;
- 
- //==================================================================
- 
-@@ -137,6 +144,136 @@ void ScViewFunc::DetectiveRefresh()
-     RecalcPPT();
- }
- 
-+static void lcl_jumpToRange(const ScRange& rRange, ScViewData* pView, ScDocument* pDoc)
-+{
-+    String aAddrText;
-+    rRange.Format(aAddrText, SCR_ABS_3D, pDoc);
-+    SfxStringItem aPosItem(SID_CURRENTCELL, aAddrText);
-+    SfxBoolItem aUnmarkItem(FN_PARAM_1, TRUE);        // remove existing selection
-+    pView->GetDispatcher().Execute(
-+        SID_CURRENTCELL, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD,
-+        &aPosItem, &aUnmarkItem, 0L);
-+}
-+
-+void ScViewFunc::MarkAndJumpToRanges(const ScRangeList& rRanges)
-+{
-+    ScViewData* pView = GetViewData();
-+    ScDocShell* pDocSh = pView->GetDocShell();
-+
-+    ScRangeList aRanges(rRanges);
-+    ScRange* p = aRanges.First();
-+    ScRangeList aRangesToMark;
-+    ScAddress aCurPos = pView->GetCurPos();
-+    for (; p; p = aRanges.Next())
-+    {
-+        // Collect only those ranges that are on the same sheet as the current
-+        // cursor.
-+
-+        if (p->aStart.Tab() == aCurPos.Tab())
-+            aRangesToMark.Append(*p);
-+    }
-+
-+    if (!aRangesToMark.Count())
-+        return;
-+
-+    // Jump to the first range of all precedent ranges.
-+    p = aRangesToMark.First();
-+    lcl_jumpToRange(*p, pView, pDocSh->GetDocument());
-+
-+    for (; p; p = aRangesToMark.Next())
-+        MarkRange(*p, false, true);
-+}
-+
-+void ScViewFunc::DetectiveMarkPred()
-+{
-+    ScViewData* pView = GetViewData();
-+    ScDocShell* pDocSh = pView->GetDocShell();
-+    ScDocument* pDoc = pDocSh->GetDocument();
-+    ScMarkData& rMarkData = pView->GetMarkData();
-+    ScAddress aCurPos = pView->GetCurPos();
-+    ScRangeList aRanges;
-+    if (rMarkData.IsMarked() || rMarkData.IsMultiMarked())
-+        rMarkData.FillRangeListWithMarks(&aRanges, false);
-+    else
-+        aRanges.Append(aCurPos);
-+
-+    vector<ScSharedTokenRef> aRefTokens;
-+    pDocSh->GetDocFunc().DetectiveCollectAllPreds(aRanges, aRefTokens);
-+
-+    if (aRefTokens.empty())
-+        // No precedents found.  Nothing to do.
-+        return;
-+
-+    ScSharedTokenRef p = aRefTokens.front();
-+    if (ScRefTokenHelper::isExternalRef(p))
-+    {
-+        // This is external.  Open the external document if available, and
-+        // jump to the destination.
-+
-+        sal_uInt16 nFileId = p->GetIndex();
-+        ScExternalRefManager* pRefMgr = pDoc->GetExternalRefManager();
-+        const String* pPath = pRefMgr->getExternalFileName(nFileId);
-+
-+        ScRange aRange;
-+        if (pPath && ScRefTokenHelper::getRangeFromToken(aRange, p, true))
-+        {
-+            const String& rTabName = p->GetString();
-+            OUStringBuffer aBuf;
-+            aBuf.append(*pPath);
-+            aBuf.append(sal_Unicode('#'));
-+            aBuf.append(rTabName);
-+            aBuf.append(sal_Unicode('.'));
-+
-+            String aRangeStr;
-+            aRange.Format(aRangeStr, SCA_VALID);
-+            aBuf.append(aRangeStr);
-+
-+            ScGlobal::OpenURL(aBuf.makeStringAndClear(), String());
-+        }
-+        return;
-+    }
-+    else
-+    {
-+        ScRange aRange;
-+        ScRefTokenHelper::getRangeFromToken(aRange, p, false);
-+        if (aRange.aStart.Tab() != aCurPos.Tab())
-+        {
-+            // The first precedent range is on a different sheet.  Jump to it
-+            // immediately and forget the rest.
-+            lcl_jumpToRange(aRange, pView, pDoc);
-+            return;
-+        }
-+    }
-+
-+    ScRangeList aDestRanges;
-+    ScRefTokenHelper::getRangeListFromTokens(aDestRanges, aRefTokens);
-+    MarkAndJumpToRanges(aDestRanges);
-+}
-+
-+void ScViewFunc::DetectiveMarkSucc()
-+{
-+    ScViewData* pView = GetViewData();
-+    ScDocShell* pDocSh = pView->GetDocShell();
-+    ScMarkData& rMarkData = pView->GetMarkData();
-+    ScAddress aCurPos = pView->GetCurPos();
-+    ScRangeList aRanges;
-+    if (rMarkData.IsMarked() || rMarkData.IsMultiMarked())
-+        rMarkData.FillRangeListWithMarks(&aRanges, false);
-+    else
-+        aRanges.Append(aCurPos);
-+
-+    vector<ScSharedTokenRef> aRefTokens;
-+    pDocSh->GetDocFunc().DetectiveCollectAllSuccs(aRanges, aRefTokens);
-+
-+    if (aRefTokens.empty())
-+        // No dependants found.  Nothing to do.
-+        return;
-+
-+    ScRangeList aDestRanges;
-+    ScRefTokenHelper::getRangeListFromTokens(aDestRanges, aRefTokens);
-+    MarkAndJumpToRanges(aDestRanges);
-+}
-+
- //---------------------------------------------------------------------------
- 
- void ScViewFunc::ShowNote( bool bShow )
--- 
-1.7.0.1
-
diff --git a/patches/dev300/calc-jump-on-formula-ref-sfx2.diff b/patches/dev300/calc-jump-on-formula-ref-sfx2.diff
deleted file mode 100644
index 66b5c4d..0000000
--- a/patches/dev300/calc-jump-on-formula-ref-sfx2.diff
+++ /dev/null
@@ -1,50 +0,0 @@
----
- sfx2/source/appl/appopen.cxx |   25 ++++++++++++++++++++++++-
- 1 files changed, 24 insertions(+), 1 deletions(-)
-
-diff --git sfx2/source/appl/appopen.cxx sfx2/source/appl/appopen.cxx
-index b7cf712..588a7be 100644
---- sfx2/source/appl/appopen.cxx
-+++ sfx2/source/appl/appopen.cxx
-@@ -652,6 +652,29 @@ void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
- 
- //---------------------------------------------------------------------------
- 
-+namespace {
-+
-+/** 
-+ * Check if a given filter type should open the hyperlinked document 
-+ * natively. 
-+ *
-+ * @param rFilter filter object
-+ */
-+bool lcl_isFilterNativelySupported(const SfxFilter& rFilter)
-+{
-+    if (rFilter.IsOwnFormat())
-+        return true;
-+
-+    ::rtl::OUString aName = rFilter.GetFilterName();
-+    if (aName.indexOf(::rtl::OUString::createFromAscii("MS Excel")) == 0)
-+        // We can handle all Excel variants natively.
-+        return true;
-+
-+    return false;
-+}
-+
-+}
-+
- void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
- {
-     DBG_MEMTEST();
-@@ -961,7 +984,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
-             aTypeName = xTypeDetection->queryTypeByURL( aURL.Main );
-             SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
-             const SfxFilter* pFilter = rMatcher.GetFilter4EA( aTypeName );
--            if ( !pFilter || !( pFilter->IsOwnFormat() ))
-+            if (!pFilter || !lcl_isFilterNativelySupported(*pFilter))
-             {
-                 // hyperlink does not link to own type => special handling (http, ftp) browser and (other external protocols) OS
-                 Reference< XSystemShellExecute > xSystemShellExecute( ::comphelper::getProcessServiceFactory()->createInstance(
--- 
-1.7.0.1
-
diff --git a/patches/dev300/calc-jump-on-formula-ref-vcl.diff b/patches/dev300/calc-jump-on-formula-ref-vcl.diff
deleted file mode 100644
index 3fd1c54..0000000
--- a/patches/dev300/calc-jump-on-formula-ref-vcl.diff
+++ /dev/null
@@ -1,81 +0,0 @@
----
- vcl/inc/vcl/keycodes.hxx        |    2 ++
- vcl/unx/gtk/window/gtkframe.cxx |    2 ++
- vcl/unx/source/app/saldisp.cxx  |   14 ++++++++++++++
- vcl/win/source/app/salinst.cxx  |    2 ++
- 4 files changed, 20 insertions(+), 0 deletions(-)
-
-diff --git vcl/inc/vcl/keycodes.hxx vcl/inc/vcl/keycodes.hxx
-index bf03613..8316ec7 100644
---- vcl/inc/vcl/keycodes.hxx
-+++ vcl/inc/vcl/keycodes.hxx
-@@ -155,6 +155,8 @@
- #define KEY_DECIMAL     ((USHORT)::com::sun::star::awt::Key::DECIMAL)
- #define KEY_TILDE       ((USHORT)::com::sun::star::awt::Key::TILDE)
- #define KEY_QUOTELEFT   ((USHORT)::com::sun::star::awt::Key::QUOTELEFT)
-+#define KEY_BRACKETLEFT ((USHORT)::com::sun::star::awt::Key::BRACKETLEFT)
-+#define KEY_BRACKETRIGHT ((USHORT)::com::sun::star::awt::Key::BRACKETRIGHT)
- 
- #define KEY_CODE		((USHORT)0x0FFF)
- 
-diff --git vcl/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkframe.cxx
-index a75d0b5..5748c43 100644
---- vcl/unx/gtk/window/gtkframe.cxx
-+++ vcl/unx/gtk/window/gtkframe.cxx
-@@ -211,6 +211,8 @@ static USHORT GetKeyCode( guint keyval )
-             case GDK_asciitilde:	nCode = KEY_TILDE;		break;
-             case GDK_leftsinglequotemark:
-             case GDK_quoteleft:	nCode = KEY_QUOTELEFT;		break;           
-+            case GDK_bracketleft:  nCode = KEY_BRACKETLEFT;  break;
-+            case GDK_bracketright: nCode = KEY_BRACKETRIGHT; break;
-             // some special cases, also see saldisp.cxx
-             // - - - - - - - - - - - - -  Apollo - - - - - - - - - - - - - 0x1000
-             case 0x1000FF02: // apXK_Copy
-diff --git vcl/unx/source/app/saldisp.cxx vcl/unx/source/app/saldisp.cxx
-index 841bd3f..fbb00da 100644
---- vcl/unx/source/app/saldisp.cxx
-+++ vcl/unx/source/app/saldisp.cxx
-@@ -1261,6 +1261,12 @@ XubString SalDisplay::GetKeyName( USHORT nKeyCode ) const
-         case KEY_QUOTELEFT:
-             nKeySym = XK_grave;
-             break;
-+        case KEY_BRACKETLEFT:
-+            nKeySym = XK_bracketleft;
-+            break;
-+        case KEY_BRACKETRIGHT:
-+            nKeySym = XK_bracketright;
-+            break;
- 
-         default:
-             nKeySym = 0;
-@@ -1591,6 +1597,14 @@ USHORT SalDisplay::GetKeyCode( KeySym keysym, char*pcPrintable ) const
-             nKey = KEY_QUOTELEFT;
-             *pcPrintable = '`';
-             break;
-+        case XK_bracketleft:
-+            nKey = KEY_BRACKETLEFT;
-+            *pcPrintable = '[';
-+            break;
-+         case XK_bracketright:
-+             nKey = KEY_BRACKETRIGHT;
-+             *pcPrintable = ']';
-+             break;
- //      case XK_Linefeed:
- //          *pcPrintable = '\n';
- //          break;
-diff --git vcl/win/source/app/salinst.cxx vcl/win/source/app/salinst.cxx
-index bc2ab17..03011a7 100644
---- vcl/win/source/app/salinst.cxx
-+++ vcl/win/source/app/salinst.cxx
-@@ -376,6 +376,8 @@ void SalData::initKeyCodeMap()
-     initKey( '=', KEY_EQUAL );
-     initKey( '~', KEY_TILDE );
-     initKey( '`', KEY_QUOTELEFT );
-+    initKey( '[', KEY_BRACKETLEFT );
-+    initKey( ']', KEY_BRACKETRIGHT );
- }
- 
- // =======================================================================
--- 
-1.7.0.1
-
commit 4daab1159556dc7eec1be25fcd47ffad800a7961
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Thu Sep 16 10:24:08 2010 +0200

    calc-autoinput-case-insensitive-matching.diff: Migrated to git

diff --git a/patches/dev300/apply b/patches/dev300/apply
index c9f3915..5369cad 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -528,9 +528,6 @@ sw-ww8-styles-import-fix.diff, i#21939, cbosdo
 calc-enhanced-merge-cells-sc.diff,        n#213205, i#67243, i#101042, jholesov/kohei
 calc-enhanced-merge-cells-officecfg.diff, n#213205, i#67243, i#101042, jholesov/kohei
 
-# don't do useless case matching on autoinput.
-calc-autoinput-case-insensitive-matching.diff, n#472395, i#101046, kohei
-
 # allow ctrl-[ and ctrl-] to jump to references used in a formula expression.
 calc-jump-on-formula-ref-offapi.diff,    n#464359, i#101018, kohei
 calc-jump-on-formula-ref-officecfg.diff, n#464359, i#101018, kohei
diff --git a/patches/dev300/calc-autoinput-case-insensitive-matching.diff b/patches/dev300/calc-autoinput-case-insensitive-matching.diff
deleted file mode 100644
index 3e30bfb..0000000
--- a/patches/dev300/calc-autoinput-case-insensitive-matching.diff
+++ /dev/null
@@ -1,30 +0,0 @@
----
- sc/source/ui/app/inputhdl.cxx |   12 +++---------
- 1 files changed, 3 insertions(+), 9 deletions(-)
-
-diff --git sc/source/ui/app/inputhdl.cxx sc/source/ui/app/inputhdl.cxx
-index 91fd711..0e46332 100644
---- sc/source/ui/app/inputhdl.cxx
-+++ sc/source/ui/app/inputhdl.cxx
-@@ -2611,15 +2611,9 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
-         }
-         else if (bAutoComplete)			// Gross-/Kleinschreibung anpassen
-         {
--            if (pColumnData)
--                pColumnData->GetExactMatch( aString );
--
--            //!	effizienter in der Liste suchen (ScUserList, nur einmal ToUpper)
--
--            USHORT nIndex;
--            ScUserListData* pData = ScGlobal::GetUserList()->GetData(aString);
--            if ( pData && pData->GetSubIndex( aString, nIndex ) )
--                aString = pData->GetSubStr( nIndex );
-+            // Perform case-matching only when the typed text is partial.
-+            if (pColumnData && aAutoSearch.Len() < aString.Len())
-+                pColumnData->GetExactMatch(aString);
-         }
-     }
- 
--- 
-1.7.0.1
-


More information about the ooo-build-commit mailing list