[Libreoffice-commits] core.git: 2 commits - chart2/source formula/source

Markus Mohrhard markus.mohrhard at googlemail.com
Thu Jul 30 05:15:04 PDT 2015


 chart2/source/controller/sidebar/ChartLinePanel.cxx |    5 
 formula/source/ui/dlg/formula.cxx                   |  299 ++++++++++----------
 2 files changed, 155 insertions(+), 149 deletions(-)

New commits:
commit 025fb3c66085ebd7cbb3f4bad01d777f7bc54c2e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 30 14:13:32 2015 +0200

    prevent panel update when updating values from panel
    
    Change-Id: I10debb5119ce78638db42315594cda4d65092fb0

diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx b/chart2/source/controller/sidebar/ChartLinePanel.cxx
index d677e20..eead55d 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx
@@ -224,6 +224,7 @@ void ChartLinePanel::setLineStyle(const XLineStyleItem& rItem)
     if (!xPropSet.is())
         return;
 
+    PreventUpdate aPreventUpdate(mbUpdate);
     xPropSet->setPropertyValue("LineStyle", css::uno::makeAny(rItem.GetValue()));
 }
 
@@ -235,6 +236,7 @@ void ChartLinePanel::setLineDash(const XLineDashItem& rItem)
     if (!xPropSet.is())
         return;
 
+    PreventUpdate aPreventUpdate(mbUpdate);
     css::uno::Any aAny;
     rItem.QueryValue(aAny, MID_LINEDASH);
     OUString aDashName = PropertyHelper::addLineDashUniqueNameToTable(aAny,
@@ -260,6 +262,7 @@ void ChartLinePanel::setLineJoint(const XLineJointItem* pItem)
     if (!xPropSet.is())
         return;
 
+    PreventUpdate aPreventUpdate(mbUpdate);
     if (pItem)
         xPropSet->setPropertyValue("LineJoint", css::uno::makeAny(pItem->GetValue()));
 }
@@ -276,6 +279,7 @@ void ChartLinePanel::setLineTransparency(const XLineTransparenceItem& rItem)
     if (!xPropSet.is())
         return;
 
+    PreventUpdate aPreventUpdate(mbUpdate);
     xPropSet->setPropertyValue("LineTransparence", css::uno::makeAny(rItem.GetValue()));
 }
 
@@ -287,6 +291,7 @@ void ChartLinePanel::setLineWidth(const XLineWidthItem& rItem)
     if (!xPropSet.is())
         return;
 
+    PreventUpdate aPreventUpdate(mbUpdate);
     xPropSet->setPropertyValue("LineWidth", css::uno::makeAny(rItem.GetValue()));
 }
 
commit 0b4c89c2c1ec9865466446e07073b83ea6b508c8
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Jul 30 05:56:16 2015 +0200

    fix indentation
    
    Change-Id: I9dddec04d1a929fa406973d3157e309a9511f29c

diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 7399e06..ad3cbe4 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -69,156 +69,157 @@
 #define TOKEN_SEP   2
 namespace formula
 {
-    using namespace ::com::sun::star;
-
-    class FormulaDlg_Impl
-    {
-    public:
-        ::std::pair<RefButton*,RefEdit*>
-                        RefInputStartBefore( RefEdit* pEdit, RefButton* pButton );
-        void            RefInputStartAfter( RefEdit* pEdit, RefButton* pButton );
-        void            RefInputDoneAfter( bool bForced );
-        bool        CalcValue( const OUString& rStrExp, OUString& rStrResult );
-        bool        CalcStruct( const OUString& rStrExp);
-        void            UpdateValues();
-        void            DeleteArgs();
-        sal_Int32       GetFunctionPos(sal_Int32 nPos);
-        void            ClearAllParas();
-
-        void            MakeTree(IStructHelper* _pTree,SvTreeListEntry* pParent,FormulaToken* _pToken,long Count);
-        void            fillTree(IStructHelper* _pTree);
-        void            UpdateTokenArray( const OUString& rStrExp);
-        OUString        RepairFormula(const OUString& aFormula);
-        void            FillDialog(bool nFlag=true);
-        bool            EditNextFunc( bool bForward, sal_Int32 nFStart=NOT_FOUND );
-        void            EditThisFunc(sal_Int32 nFStart);
-
-        void            StoreFormEditData(FormEditData* pEditData);
-
-        void            Update();
-        void            Update(const OUString& _sExp);
-
-        void            SaveArg( sal_uInt16 nEd );
-        void            UpdateSelection();
-        void            DoEnter( bool bOk );
-        void            FillListboxes();
-        void            FillControls(bool &rbNext, bool &rbPrev);
-
-        FormulaDlgMode  SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, bool bMatrix, bool _bSelect, bool _bUpdate);
-        void            SetMeText(const OUString& _sText);
-        bool            CheckMatrix(OUString& aFormula /*IN/OUT*/);
-
-        void            SetEdSelection();
-
-        bool            UpdateParaWin(Selection& _rSelection);
-        void            UpdateParaWin(const Selection& _rSelection,const OUString& _sRefStr);
-
-        void            SetData(sal_Int32 nFStart, sal_Int32 nNextFStart, sal_Int32 nNextFEnd, sal_Int32& PrivStart, sal_Int32& PrivEnd);
-        void            PreNotify( NotifyEvent& rNEvt );
-
-        RefEdit*        GetCurrRefEdit();
-
-        const FormulaHelper& GetFormulaHelper() const { return m_aFormulaHelper;}
-        uno::Reference< sheet::XFormulaOpCodeMapper > GetFormulaOpCodeMapper() const;
-
-        DECL_LINK( ModifyHdl, ParaWin* );
-        DECL_LINK( FxHdl, ParaWin* );
-
-        DECL_LINK(MatrixHdl, void *);
-        DECL_LINK(FormulaHdl, void *);
-        DECL_LINK(FormulaCursorHdl, void *);
-        DECL_LINK( BtnHdl, PushButton* );
-        DECL_LINK(DblClkHdl, void *);
-        DECL_LINK(FuncSelHdl, void *);
-        DECL_LINK(StructSelHdl, void *);
-    public:
-        mutable uno::Reference< sheet::XFormulaOpCodeMapper>    m_xOpCodeMapper;
-        uno::Sequence< sheet::FormulaToken >                    m_aTokenList;
-        ::std::unique_ptr<FormulaTokenArray>                    m_pTokenArray;
-        mutable uno::Sequence< sheet::FormulaOpCodeMapEntry >   m_aSpecialOpCodes;
-        mutable const sheet::FormulaOpCodeMapEntry*             m_pSpecialOpCodesEnd;
-        mutable uno::Sequence< sheet::FormulaToken >            m_aSeparatorsOpCodes;
-        mutable uno::Sequence< sheet::FormulaOpCodeMapEntry >   m_aFunctionOpCodes;
-        mutable const sheet::FormulaOpCodeMapEntry*             m_pFunctionOpCodesEnd;
-        mutable uno::Sequence< sheet::FormulaOpCodeMapEntry >   m_aUnaryOpCodes;
-        mutable const sheet::FormulaOpCodeMapEntry*             m_pUnaryOpCodesEnd;
-        mutable uno::Sequence< sheet::FormulaOpCodeMapEntry >   m_aBinaryOpCodes;
-        mutable const sheet::FormulaOpCodeMapEntry*             m_pBinaryOpCodesEnd;
-        ::std::map<FormulaToken*,sheet::FormulaToken>           m_aTokenMap;
-        IFormulaEditorHelper*                                   m_pHelper;
-        VclPtr<Dialog>          m_pParent;
-        IControlReferenceHandler*  m_pDlg;
-        VclPtr<TabControl>      m_pTabCtrl;
-        VclPtr<VclVBox>         m_pParaWinBox;
-        VclPtr<ParaWin>         pParaWin;
-        VclPtr<FixedText>       m_pFtHeadLine;
-        VclPtr<FixedText>       m_pFtFuncName;
-        VclPtr<FixedText>       m_pFtFuncDesc;
-
-        VclPtr<FixedText>       m_pFtEditName;
-
-        VclPtr<FixedText>       m_pFtResult;
-        VclPtr<Edit>            m_pWndResult;
-
-        VclPtr<FixedText>       m_pFtFormula;
-        VclPtr<EditBox>         m_pMEFormula;
-
-        VclPtr<CheckBox>        m_pBtnMatrix;
-        VclPtr<CancelButton>    m_pBtnCancel;
-
-        VclPtr<PushButton>      m_pBtnBackward;
-        VclPtr<PushButton>      m_pBtnForward;
-        VclPtr<OKButton>        m_pBtnEnd;
-
-        VclPtr<RefEdit>         m_pEdRef;
-        VclPtr<RefButton>       m_pRefBtn;
-
-        VclPtr<FixedText>       m_pFtFormResult;
-        VclPtr<Edit>            m_pWndFormResult;
-
-        VclPtr<RefEdit>        pTheRefEdit;
-        VclPtr<RefButton>      pTheRefButton;
-        VclPtr<FuncPage>       pFuncPage;
-        VclPtr<StructPage>     pStructPage;
-        OUString        aOldFormula;
-        bool        bStructUpdate;
-        VclPtr<MultiLineEdit>  pMEdit;
-        bool        bUserMatrixFlag;
-        Idle            aIdle;
-
-        const OUString  aTitle1;
-        const OUString  aTitle2;
-        const OUString  aTxtEnd;
-        OUString  aTxtOk;     // behind aBtnEnd
-        FormulaHelper   m_aFormulaHelper;
-
-        OString    m_aEditHelpId;
-
-        OString    aOldHelp;
-        OString    aOldUnique;
-        OString    aActivWinId;
-        bool            bIsShutDown;
-        bool            bMakingTree; //in method of constructing tree
-
-        vcl::Font       aFntBold;
-        vcl::Font       aFntLight;
-        sal_uInt16      nEdFocus;
-        bool            bEditFlag;
-        const IFunctionDescription* pFuncDesc;
-        sal_Int32      nArgs;
-        ::std::vector< OUString > m_aArguments;
-        Selection       aFuncSel;
-
-        FormulaDlg_Impl(Dialog* pParent
-                        , bool _bSupportFunctionResult
-                        , bool _bSupportResult
-                        , bool _bSupportMatrix
-                        ,IFormulaEditorHelper* _pHelper
-                        ,const IFunctionManager* _pFunctionMgr
-                        ,IControlReferenceHandler* _pDlg);
-        ~FormulaDlg_Impl();
 
-    };
+using namespace ::com::sun::star;
+
+class FormulaDlg_Impl
+{
+public:
+    ::std::pair<RefButton*,RefEdit*>
+        RefInputStartBefore( RefEdit* pEdit, RefButton* pButton );
+    void            RefInputStartAfter( RefEdit* pEdit, RefButton* pButton );
+    void            RefInputDoneAfter( bool bForced );
+    bool        CalcValue( const OUString& rStrExp, OUString& rStrResult );
+    bool        CalcStruct( const OUString& rStrExp);
+    void            UpdateValues();
+    void            DeleteArgs();
+    sal_Int32       GetFunctionPos(sal_Int32 nPos);
+    void            ClearAllParas();
+
+    void            MakeTree(IStructHelper* _pTree,SvTreeListEntry* pParent,FormulaToken* _pToken,long Count);
+    void            fillTree(IStructHelper* _pTree);
+    void            UpdateTokenArray( const OUString& rStrExp);
+    OUString        RepairFormula(const OUString& aFormula);
+    void            FillDialog(bool nFlag=true);
+    bool            EditNextFunc( bool bForward, sal_Int32 nFStart=NOT_FOUND );
+    void            EditThisFunc(sal_Int32 nFStart);
+
+    void            StoreFormEditData(FormEditData* pEditData);
+
+    void            Update();
+    void            Update(const OUString& _sExp);
+
+    void            SaveArg( sal_uInt16 nEd );
+    void            UpdateSelection();
+    void            DoEnter( bool bOk );
+    void            FillListboxes();
+    void            FillControls(bool &rbNext, bool &rbPrev);
+
+    FormulaDlgMode  SetMeText(const OUString& _sText, sal_Int32 PrivStart, sal_Int32 PrivEnd, bool bMatrix, bool _bSelect, bool _bUpdate);
+    void            SetMeText(const OUString& _sText);
+    bool            CheckMatrix(OUString& aFormula /*IN/OUT*/);
+
+    void            SetEdSelection();
+
+    bool            UpdateParaWin(Selection& _rSelection);
+    void            UpdateParaWin(const Selection& _rSelection,const OUString& _sRefStr);
+
+    void            SetData(sal_Int32 nFStart, sal_Int32 nNextFStart, sal_Int32 nNextFEnd, sal_Int32& PrivStart, sal_Int32& PrivEnd);
+    void            PreNotify( NotifyEvent& rNEvt );
+
+    RefEdit*        GetCurrRefEdit();
+
+    const FormulaHelper& GetFormulaHelper() const { return m_aFormulaHelper;}
+    uno::Reference< sheet::XFormulaOpCodeMapper > GetFormulaOpCodeMapper() const;
+
+    DECL_LINK( ModifyHdl, ParaWin* );
+    DECL_LINK( FxHdl, ParaWin* );
+
+    DECL_LINK(MatrixHdl, void *);
+    DECL_LINK(FormulaHdl, void *);
+    DECL_LINK(FormulaCursorHdl, void *);
+    DECL_LINK( BtnHdl, PushButton* );
+    DECL_LINK(DblClkHdl, void *);
+    DECL_LINK(FuncSelHdl, void *);
+    DECL_LINK(StructSelHdl, void *);
+public:
+    mutable uno::Reference< sheet::XFormulaOpCodeMapper>    m_xOpCodeMapper;
+    uno::Sequence< sheet::FormulaToken >                    m_aTokenList;
+    ::std::unique_ptr<FormulaTokenArray>                    m_pTokenArray;
+    mutable uno::Sequence< sheet::FormulaOpCodeMapEntry >   m_aSpecialOpCodes;
+    mutable const sheet::FormulaOpCodeMapEntry*             m_pSpecialOpCodesEnd;
+    mutable uno::Sequence< sheet::FormulaToken >            m_aSeparatorsOpCodes;
+    mutable uno::Sequence< sheet::FormulaOpCodeMapEntry >   m_aFunctionOpCodes;
+    mutable const sheet::FormulaOpCodeMapEntry*             m_pFunctionOpCodesEnd;
+    mutable uno::Sequence< sheet::FormulaOpCodeMapEntry >   m_aUnaryOpCodes;
+    mutable const sheet::FormulaOpCodeMapEntry*             m_pUnaryOpCodesEnd;
+    mutable uno::Sequence< sheet::FormulaOpCodeMapEntry >   m_aBinaryOpCodes;
+    mutable const sheet::FormulaOpCodeMapEntry*             m_pBinaryOpCodesEnd;
+    ::std::map<FormulaToken*,sheet::FormulaToken>           m_aTokenMap;
+    IFormulaEditorHelper*                                   m_pHelper;
+    VclPtr<Dialog>          m_pParent;
+    IControlReferenceHandler*  m_pDlg;
+    VclPtr<TabControl>      m_pTabCtrl;
+    VclPtr<VclVBox>         m_pParaWinBox;
+    VclPtr<ParaWin>         pParaWin;
+    VclPtr<FixedText>       m_pFtHeadLine;
+    VclPtr<FixedText>       m_pFtFuncName;
+    VclPtr<FixedText>       m_pFtFuncDesc;
+
+    VclPtr<FixedText>       m_pFtEditName;
+
+    VclPtr<FixedText>       m_pFtResult;
+    VclPtr<Edit>            m_pWndResult;
+
+    VclPtr<FixedText>       m_pFtFormula;
+    VclPtr<EditBox>         m_pMEFormula;
+
+    VclPtr<CheckBox>        m_pBtnMatrix;
+    VclPtr<CancelButton>    m_pBtnCancel;
+
+    VclPtr<PushButton>      m_pBtnBackward;
+    VclPtr<PushButton>      m_pBtnForward;
+    VclPtr<OKButton>        m_pBtnEnd;
+
+    VclPtr<RefEdit>         m_pEdRef;
+    VclPtr<RefButton>       m_pRefBtn;
+
+    VclPtr<FixedText>       m_pFtFormResult;
+    VclPtr<Edit>            m_pWndFormResult;
+
+    VclPtr<RefEdit>        pTheRefEdit;
+    VclPtr<RefButton>      pTheRefButton;
+    VclPtr<FuncPage>       pFuncPage;
+    VclPtr<StructPage>     pStructPage;
+    OUString        aOldFormula;
+    bool        bStructUpdate;
+    VclPtr<MultiLineEdit>  pMEdit;
+    bool        bUserMatrixFlag;
+    Idle            aIdle;
+
+    const OUString  aTitle1;
+    const OUString  aTitle2;
+    const OUString  aTxtEnd;
+    OUString  aTxtOk;     // behind aBtnEnd
+    FormulaHelper   m_aFormulaHelper;
+
+    OString    m_aEditHelpId;
+
+    OString    aOldHelp;
+    OString    aOldUnique;
+    OString    aActivWinId;
+    bool            bIsShutDown;
+    bool            bMakingTree; //in method of constructing tree
+
+    vcl::Font       aFntBold;
+    vcl::Font       aFntLight;
+    sal_uInt16      nEdFocus;
+    bool            bEditFlag;
+    const IFunctionDescription* pFuncDesc;
+    sal_Int32      nArgs;
+    ::std::vector< OUString > m_aArguments;
+    Selection       aFuncSel;
+
+    FormulaDlg_Impl(Dialog* pParent
+            , bool _bSupportFunctionResult
+            , bool _bSupportResult
+            , bool _bSupportMatrix
+            ,IFormulaEditorHelper* _pHelper
+            ,const IFunctionManager* _pFunctionMgr
+            ,IControlReferenceHandler* _pDlg);
+    ~FormulaDlg_Impl();
+
+};
 
 FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent
                                         , bool _bSupportFunctionResult


More information about the Libreoffice-commits mailing list