[Libreoffice-commits] .: Branch 'feature/editable-formulae' - 3 commits - starmath/inc starmath/source

Michael Meeks mmeeks at kemper.freedesktop.org
Sat Oct 23 09:55:07 PDT 2010


 starmath/inc/caret.hxx       |   26 +++++++
 starmath/inc/cursor.hxx      |   26 +++++++
 starmath/inc/edit.hxx        |    6 +
 starmath/inc/node.hxx        |   19 +++--
 starmath/inc/view.hxx        |   20 +++++
 starmath/inc/visitors.hxx    |   26 +++++++
 starmath/source/caret.cxx    |   26 +++++++
 starmath/source/cursor.cxx   |   26 +++++++
 starmath/source/document.cxx |    6 -
 starmath/source/edit.cxx     |   61 ++++++++++++++++
 starmath/source/view.cxx     |  155 +++++++++++++++++++++++++++++++++++++++----
 starmath/source/visitors.cxx |   26 +++++++
 12 files changed, 397 insertions(+), 26 deletions(-)

New commits:
commit f1b82f5c544e8e34ae46f3fabf284a113fc482ba
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Sat Oct 23 17:52:33 2010 +0100

    re-instate the nasty old editing paths as a run-time conditional

diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index cd0c6cb..7249cc3 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -65,13 +65,15 @@ class SmEditWindow : public Window, public DropTargetHelper
     ScrollBar	   *pHScrollBar,
                    *pVScrollBar;
     ScrollBarBox   *pScrollBox;
-    Timer			aModifyTimer;
+    Timer			aModifyTimer,
+                    aCursorMoveTimer;
     ESelection		aOldSelection;
 
     virtual void KeyInput(const KeyEvent& rKEvt);
     virtual void Command(const CommandEvent& rCEvt);
     DECL_LINK(MenuSelectHdl, Menu *);
     DECL_LINK(ModifyTimerHdl, Timer *);
+    DECL_LINK(CursorMoveTimerHdl, Timer *);
 
     virtual void DataChanged( const DataChangedEvent& );
     virtual void Resize();
@@ -133,6 +135,8 @@ public:
     void ApplyColorConfigValues( const svtools::ColorConfig &rColorCfg );
 
     BOOL                HandleWheelCommands( const CommandEvent &rCEvt );
+    bool                IsInlineEditEnabled();
+    void                StartCursorMove();
 
     // for Accessibility
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index f6a33a6..7f7981d 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -34,9 +34,10 @@
 #include <iostream>
 #include <stdio.h>
 
-//My special assert macro
-//TODO: replace this with DBG_ASSERT when this patch moves to production, can be done using search/replace
-#define j_assert(cond, msg)     do{                                                             \
+#define j_assert(cond, msg) DBG_ASSERT(cond, msg)
+#if 0
+// easier to read assert macro
+    do{                                                             \
                                     if(!(cond))                                                 \
                                     {                                                           \
                                         std::cerr<<"Failed assertion: "<<msg<<", at line ";     \
@@ -48,7 +49,9 @@
                                         fprintf(stderr, "%d in %s\n", __LINE__, f + 1);         \
                                     }                                                           \
                                 } while(false)
-//TODO: Comment out below to disable dumpasdot
+#endif
+
+// Comment out below to disable dumpasdot
 #define DEBUG_ENABLE_DUMPASDOT
 
 #include "parse.hxx"
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 67e83ac..f867e4a 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -51,8 +51,23 @@ class SmPrintUIOptions;
 
 class SmGraphicWindow : public ScrollableWindow
 {
-    Point			aFormulaDrawPos;
+    Point     aFormulaDrawPos;
 
+    // old style editing pieces
+    Rectangle aCursorRect;
+    bool      bIsCursorVisible;
+public:
+    BOOL IsCursorVisible() const { return bIsCursorVisible; }
+    void ShowCursor(BOOL bShow);
+    const SmNode * SetCursorPos(USHORT nRow, USHORT nCol);
+protected:
+    void		SetIsCursorVisible(BOOL bVis) { bIsCursorVisible = bVis; }
+    using   Window::SetCursor;
+    void        SetCursor(const SmNode *pNode);
+    void 		SetCursor(const Rectangle &rRect);
+    bool        IsInlineEditEnabled() const;
+
+private:
     ::com::sun::star::uno::Reference<
         ::com::sun::star::accessibility::XAccessible >  xAccessible;
     SmGraphicAccessible *                                       pAccessible;
@@ -298,6 +313,9 @@ public:
     void SetInsertIntoEditWindow(BOOL bEditWindowHadFocusLast = TRUE){
         bInsertIntoEditWindow = bEditWindowHadFocusLast;
     }
+    bool IsInlineEditEnabled() const {
+        return false;
+    }
 };
 
 #endif
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 7029228..d2d893f 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -98,6 +98,7 @@
 #include <sfx2/sfxsids.hrc>
 #include <svx/svxids.hrc>
 #include "cursor.hxx"
+#include "visitors.hxx"
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
@@ -435,8 +436,6 @@ SfxItemPool& SmDocShell::GetEditEngineItemPool()
     OSL_ENSURE( pEditEngineItemPool, "EditEngineItemPool missing" );
     return *pEditEngineItemPool;
 }
-//TODO: Move to the top of the file...
-#include "visitors.hxx"
 
 void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, BOOL bDrawSelection)
 {
@@ -530,8 +529,7 @@ Size SmDocShell::GetSize()
 }
 
 void SmDocShell::InvalidateCursor(){
-    if(pCursor)
-        delete pCursor;
+    delete pCursor;
     pCursor = NULL;
 }
 
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 3974065..a9a1ad2 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -96,6 +96,11 @@ void SmGetLeftSelectionPart(const ESelection aSel,
     }
 }
 
+bool SmEditWindow::IsInlineEditEnabled()
+{
+    return GetView()->IsInlineEditEnabled();
+}
+
 ////////////////////////////////////////
 
 SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) :
@@ -122,6 +127,12 @@ SmEditWindow::SmEditWindow( SmCmdBoxWindow &rMyCmdBoxWin ) :
     aModifyTimer.SetTimeoutHdl(LINK(this, SmEditWindow, ModifyTimerHdl));
     aModifyTimer.SetTimeout(500);
 
+    if (!IsInlineEditEnabled())
+    {
+        aCursorMoveTimer.SetTimeoutHdl(LINK(this, SmEditWindow, CursorMoveTimerHdl));
+        aCursorMoveTimer.SetTimeout(500);
+    }
+
     // if not called explicitly the this edit window within the
     // command window will just show an empty gray panel.
     Show();
@@ -132,6 +143,7 @@ SmEditWindow::~SmEditWindow()
 {
     aModifyTimer.Stop();
 
+    StartCursorMove();
 
     // #112565# clean up of classes used for accessibility
     // must be done before EditView (and thus EditEngine) is no longer
@@ -156,6 +168,12 @@ SmEditWindow::~SmEditWindow()
     delete pScrollBox;
 }
 
+void SmEditWindow::StartCursorMove()
+{
+    if (!IsInlineEditEnabled())
+        aCursorMoveTimer.Stop();
+}
+
 void SmEditWindow::InvalidateSlots()
 {
     SfxBindings& rBind = GetView()->GetViewFrame()->GetBindings();
@@ -253,6 +271,35 @@ IMPL_LINK( SmEditWindow, ModifyTimerHdl, Timer *, EMPTYARG /*pTimer*/ )
     return 0;
 }
 
+IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Timer *, EMPTYARG /*pTimer*/)
+    // every once in a while check cursor position (selection) of edit
+    // window and if it has changed (try to) set the formula-cursor
+    // according to that.
+{
+    if (IsInlineEditEnabled())
+        return 0;
+
+    ESelection aNewSelection(GetSelection());
+
+    if (!aNewSelection.IsEqual(aOldSelection))
+    {
+        SmViewShell *pView = rCmdBox.GetView();
+        if (pView)
+        {
+            // get row and column to look for
+            USHORT  nRow, nCol;
+            SmGetLeftSelectionPart(aNewSelection, nRow, nCol);
+            nRow++;
+            nCol++;
+            pView->GetGraphicWindow().SetCursorPos(nRow, nCol);
+            aOldSelection = aNewSelection;
+        }
+    }
+    aCursorMoveTimer.Stop();
+
+    return 0;
+}
+
 void SmEditWindow::Resize()
 {
     if (!pEditView)
@@ -286,6 +333,8 @@ void SmEditWindow::MouseButtonUp(const MouseEvent &rEvt)
     else
         Window::MouseButtonUp (rEvt);
 
+    if (!IsInlineEditEnabled())
+        CursorMoveTimerHdl(&aCursorMoveTimer);
     InvalidateSlots();
 }
 
@@ -390,6 +439,8 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt)
     }
     else
     {
+        StartCursorMove();
+
         if (!pEditView)
             CreateEditView();
         if ( !pEditView->PostKeyEvent(rKEvt) )
@@ -616,7 +667,7 @@ void SmEditWindow::GetFocus()
         pEditEngine->SetStatusEventHdl( LINK(this, SmEditWindow, EditStatusHdl) );
 
     //Let SmViewShell know we got focus
-    if(GetView())
+    if(GetView() && IsInlineEditEnabled())
         GetView()->SetInsertIntoEditWindow(TRUE);
 }
 
@@ -700,7 +751,7 @@ void SmEditWindow::InsertCommand(USHORT nCommand)
         }
 
         aModifyTimer.Start();
-
+        StartCursorMove();
         GrabFocus();
     }
 }
@@ -887,6 +938,7 @@ void SmEditWindow::InsertText(const String& Text)
     {
         pEditView->InsertText(Text);
         aModifyTimer.Start();
+        StartCursorMove();
     }
 }
 
@@ -904,6 +956,11 @@ void SmEditWindow::Flush()
                     new SfxStringItem(SID_TEXT, GetText()), 0L);
         }
     }
+    if (aCursorMoveTimer.IsActive())
+    {
+        aCursorMoveTimer.Stop();
+        CursorMoveTimerHdl(&aCursorMoveTimer);
+    }
 }
 
 
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index f06244b..7e98170 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -169,16 +169,50 @@ void SmGraphicWindow::MouseButtonDown(const MouseEvent& rMEvt)
         Point  aPos (PixelToLogic(rMEvt.GetPosPixel())
                      - GetFormulaDrawPos());
 
-        const SmNode* pTree = pViewShell->GetDoc()->GetFormulaTree();
-
+        const SmNode *pTree = pViewShell->GetDoc()->GetFormulaTree();
+        if (!pTree)
+            return;
+
+        if (IsInlineEditEnabled()) {
+            // if it was clicked inside the formula then get the appropriate node
+            if (pTree->OrientedDist(aPos) <= 0)
+                pViewShell->GetDoc()->GetCursor().MoveTo(this, aPos, !rMEvt.IsShift());
+            return;
+        }
+        const SmNode *pNode = 0;
         // if it was clicked inside the formula then get the appropriate node
         if (pTree->OrientedDist(aPos) <= 0)
-            pViewShell->GetDoc()->GetCursor().MoveTo(this, aPos, !rMEvt.IsShift());
+            pNode = pTree->FindRectClosestTo(aPos);
+
+        if (pNode)
+        {	SmEditWindow  *pEdit = pViewShell->GetEditWindow();
+            const SmToken  aToken (pNode->GetToken());
+
+            // set selection to the beginning of the token
+            ESelection  aSel (aToken.nRow - 1, aToken.nCol - 1);
+
+            if (rMEvt.GetClicks() != 1 || aToken.eType == TPLACE)
+                aSel.nEndPos = aSel.nEndPos + sal::static_int_cast< USHORT >(aToken.aText.Len());
+
+            pEdit->SetSelection(aSel);
+            SetCursor(pNode);
+
+            // allow for immediate editing and
+            //! implicitly synchronize the cursor position mark in this window
+            pEdit->GrabFocus();
+        }
     }
 }
 
+bool SmGraphicWindow::IsInlineEditEnabled() const
+{
+    return pViewShell->GetEditWindow()->IsInlineEditEnabled();
+}
+
 void SmGraphicWindow::GetFocus()
 {
+    if (!IsInlineEditEnabled())
+        return;
     pViewShell->GetEditWindow()->Flush();
     //Let view shell know what insertions should be done in visual editor
     pViewShell->SetInsertIntoEditWindow(FALSE);
@@ -197,6 +231,80 @@ void SmGraphicWindow::LoseFocus()
     }
 }
 
+void SmGraphicWindow::ShowCursor(BOOL bShow)
+    // shows or hides the formula-cursor depending on 'bShow' is TRUE or not
+{
+    if (IsInlineEditEnabled())
+        return;
+
+    BOOL  bInvert = bShow != IsCursorVisible();
+
+    if (bInvert)
+        InvertTracking(aCursorRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW);
+
+    SetIsCursorVisible(bShow);
+}
+
+
+void SmGraphicWindow::SetCursor(const SmNode *pNode)
+{
+    if (IsInlineEditEnabled())
+        return;
+
+    const SmNode *pTree = pViewShell->GetDoc()->GetFormulaTree();
+
+    // get appropriate rectangle
+    Point aOffset (pNode->GetTopLeft() - pTree->GetTopLeft()),
+          aTLPos  (GetFormulaDrawPos() + aOffset);
+    aTLPos.X() -= pNode->GetItalicLeftSpace();
+    Size  aSize   (pNode->GetItalicSize());
+    Point aBRPos  (aTLPos.X() + aSize.Width(), aTLPos.Y() + aSize.Height());
+
+    SetCursor(Rectangle(aTLPos, aSize));
+}
+
+void SmGraphicWindow::SetCursor(const Rectangle &rRect)
+    // sets cursor to new position (rectangle) 'rRect'.
+    // The old cursor will be removed, and the new one will be shown if
+    // that is activated in the ConfigItem
+{
+    if (IsInlineEditEnabled())
+        return;
+
+    SmModule *pp = SM_MOD();
+
+    if (IsCursorVisible())
+        ShowCursor(FALSE);		// clean up remainings of old cursor
+    aCursorRect = rRect;
+    if (pp->GetConfig()->IsShowFormulaCursor())
+        ShowCursor(TRUE);		// draw new cursor
+}
+
+const SmNode * SmGraphicWindow::SetCursorPos(USHORT nRow, USHORT nCol)
+    // looks for a VISIBLE node in the formula tree with it's token at
+    // (or around) the position 'nRow', 'nCol' in the edit window
+    // (row and column numbering starts with 1 there!).
+    // If there is such a node the formula-cursor is set to cover that nodes
+    // rectangle. If not the formula-cursor will be hidden.
+    // In any case the search result is being returned.
+{
+    if (IsInlineEditEnabled())
+        return NULL;
+
+    // find visible node with token at nRow, nCol
+    const SmNode *pTree = pViewShell->GetDoc()->GetFormulaTree(),
+                 *pNode = 0;
+    if (pTree)
+        pNode = pTree->FindTokenAt(nRow, nCol);
+
+    if (pNode)
+        SetCursor(pNode);
+    else
+        ShowCursor(FALSE);
+
+    return pNode;
+}
+
 void SmGraphicWindow::Paint(const Rectangle&)
 {
     OSL_ENSURE(pViewShell, "Sm : NULL pointer");
@@ -207,9 +315,27 @@ void SmGraphicWindow::Paint(const Rectangle&)
     rDoc.DrawFormula(*this, aPoint, TRUE);	//! modifies aPoint to be the topleft
                                 //! corner of the formula
     SetFormulaDrawPos(aPoint);
-    //Draw cursor if any...
-    if(pViewShell->GetDoc()->HasCursor())
-        pViewShell->GetDoc()->GetCursor().Draw(*this, aPoint);
+    if(IsInlineEditEnabled()) {
+        //Draw cursor if any...
+        if(pViewShell->GetDoc()->HasCursor())
+            pViewShell->GetDoc()->GetCursor().Draw(*this, aPoint);
+    } else {
+    SetIsCursorVisible(FALSE);	// (old) cursor must be drawn again
+
+    const SmEditWindow *pEdit = pViewShell->GetEditWindow();
+    if (pEdit)
+    {	// get new position for formula-cursor (for possible altered formula)
+        USHORT	nRow, nCol;
+        SmGetLeftSelectionPart(pEdit->GetSelection(), nRow, nCol);
+        nRow++;
+        nCol++;
+        const SmNode *pFound = SetCursorPos(nRow, nCol);
+
+        SmModule  *pp = SM_MOD();
+        if (pFound && pp->GetConfig()->IsShowFormulaCursor())
+            ShowCursor(TRUE);
+    }
+    }
 }
 
 
@@ -223,6 +349,11 @@ void SmGraphicWindow::SetTotalSize ()
 
 void SmGraphicWindow::KeyInput(const KeyEvent& rKEvt)
 {
+    if (!IsInlineEditEnabled()) {
+        if (! (GetView() && GetView()->KeyInput(rKEvt)) )
+            ScrollableWindow::KeyInput(rKEvt);
+        return;
+    }
     USHORT nCode = rKEvt.GetKeyCode().GetCode();
     SmCursor& rCursor = pViewShell->GetDoc()->GetCursor();
     switch(nCode)
@@ -1360,8 +1491,8 @@ void SmViewShell::Execute(SfxRequest& rReq)
                 bVal = !pp->GetConfig()->IsShowFormulaCursor();
 
             pp->GetConfig()->SetShowFormulaCursor(bVal);
-            //GetGraphicWindow().ShowCursor(bVal);
-            //TODO Consider disabling this option!!!
+            if (!IsInlineEditEnabled())
+                GetGraphicWindow().ShowCursor(bVal);
             break;
         }
         case SID_DRAW:
@@ -1506,9 +1637,9 @@ void SmViewShell::Execute(SfxRequest& rReq)
             const SfxInt16Item& rItem =
                 (const SfxInt16Item&)rReq.GetArgs()->Get(SID_INSERTCOMMAND);
 
-            if (pWin && bInsertIntoEditWindow)
+            if (pWin && (bInsertIntoEditWindow || !IsInlineEditEnabled()))
                 pWin->InsertCommand(rItem.GetValue());
-            if (GetDoc() && !bInsertIntoEditWindow) {
+            if (IsInlineEditEnabled() && (GetDoc() && !bInsertIntoEditWindow)) {
                 GetDoc()->GetCursor().InsertCommand(rItem.GetValue());
                 GetGraphicWindow().GrabFocus();
             }
@@ -1520,9 +1651,9 @@ void SmViewShell::Execute(SfxRequest& rReq)
             const SfxStringItem& rItem =
                 (const SfxStringItem&)rReq.GetArgs()->Get(SID_INSERTSYMBOL);
 
-            if (pWin && bInsertIntoEditWindow)
+            if (pWin && (bInsertIntoEditWindow || !IsInlineEditEnabled()))
                 pWin->InsertText(rItem.GetValue());
-            if(GetDoc() && !bInsertIntoEditWindow)
+            if (IsInlineEditEnabled() && (GetDoc() && !bInsertIntoEditWindow))
                 GetDoc()->GetCursor().InsertSpecial(rItem.GetValue());
             break;
         }
commit 01f4b50072f4d06aad01d3a310e9b6e946988129
Author: Jonas Finnemann Jensen <jopsen at gmail.com>
Date:   Sat Oct 23 16:39:57 2010 +0100

    Use the right license header

diff --git a/starmath/inc/caret.hxx b/starmath/inc/caret.hxx
index ae0f0fc..df8abaf 100644
--- a/starmath/inc/caret.hxx
+++ b/starmath/inc/caret.hxx
@@ -1,3 +1,29 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ *       Jonas Finnemann Jensen <jopsen at gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jonas Finnemann Jensen <jopsen at gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
 #ifndef CARET_H
 #define CARET_H
 
diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx
index d78aad7..fab86a4 100644
--- a/starmath/inc/cursor.hxx
+++ b/starmath/inc/cursor.hxx
@@ -1,3 +1,29 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ *       Jonas Finnemann Jensen <jopsen at gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jonas Finnemann Jensen <jopsen at gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
 #ifndef SMCURSOR_H
 #define SMCURSOR_H
 
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
index bb4ee15..d63bc13 100644
--- a/starmath/inc/visitors.hxx
+++ b/starmath/inc/visitors.hxx
@@ -1,3 +1,29 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ *       Jonas Finnemann Jensen <jopsen at gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jonas Finnemann Jensen <jopsen at gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
 #ifndef SMVISITORS_H
 #define SMVISITORS_H
 
diff --git a/starmath/source/caret.cxx b/starmath/source/caret.cxx
index 24374be..128c427 100644
--- a/starmath/source/caret.cxx
+++ b/starmath/source/caret.cxx
@@ -1,3 +1,29 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ *       Jonas Finnemann Jensen <jopsen at gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jonas Finnemann Jensen <jopsen at gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
 #include "caret.hxx"
 
 /////////////////////////////// SmCaretPosGraph ////////////////////////////////
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index 3b5022c..5613c3b 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -1,3 +1,29 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ *       Jonas Finnemann Jensen <jopsen at gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jonas Finnemann Jensen <jopsen at gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
 #include "cursor.hxx"
 #include "parse.hxx"
 #include "visitors.hxx"
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index f7418c0..dc5dd38 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -1,3 +1,29 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ *       Jonas Finnemann Jensen <jopsen at gmail.com>
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jonas Finnemann Jensen <jopsen at gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
 #include "visitors.hxx"
 #include "cursor.hxx"
 
commit 87a7f1813a40d73fadb430985d5601d1128fd057
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Sat Oct 23 16:29:59 2010 +0100

    undo merging issue

diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 04a954e..f6a33a6 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -114,8 +114,12 @@ class SmNode : public SmRect
     SmNodeType		eType;
     SmScaleMode		eScaleMode;
     RectHorAlign	eRectHorAlign;
-    USHORT		nFlags, nAttributes;
-    BOOL		bIsPhantom, bIsDebug;
+    USHORT			nFlags,
+                    nAttributes;
+    BOOL			bIsPhantom,
+                    bIsDebug;
+
+    BOOL            bIsSelected;
 
 protected:
     SmNode(SmNodeType eNodeType, const SmToken &rNodeToken);


More information about the Libreoffice-commits mailing list