[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - include/sfx2 sc/source sd/source sfx2/source starmath/inc starmath/source sw/inc sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Nov 20 10:56:25 UTC 2018


 include/sfx2/viewfrm.hxx             |    3 ++-
 include/sfx2/viewsh.hxx              |    2 +-
 sc/source/ui/inc/prevwsh.hxx         |    2 +-
 sc/source/ui/inc/tabvwsh.hxx         |    2 +-
 sc/source/ui/view/prevwsh.cxx        |    2 +-
 sc/source/ui/view/tabvwsh4.cxx       |    7 +++++--
 sd/source/ui/inc/ViewShellBase.hxx   |    2 +-
 sd/source/ui/view/ViewShellBase.cxx  |    2 +-
 sfx2/source/view/viewfrm.cxx         |   14 ++++++++------
 sfx2/source/view/viewsh.cxx          |    3 ++-
 starmath/inc/view.hxx                |    2 +-
 starmath/source/view.cxx             |    2 +-
 sw/inc/view.hxx                      |    2 +-
 sw/source/uibase/inc/pview.hxx       |    2 +-
 sw/source/uibase/uiview/pview.cxx    |    2 +-
 sw/source/uibase/uiview/viewport.cxx |    2 +-
 16 files changed, 29 insertions(+), 22 deletions(-)

New commits:
commit 67d7d8be25819a291a6363fed0112146ba436619
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Nov 30 15:22:30 2016 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Nov 20 11:55:56 2018 +0100

    ScTabViewShell::InnerResizePixel must not mark document as modified...
    
    ...when merely toggling the edit mode of a Calc document embedded in another
    document (via "Insert - Object - OLE Object... - LibreOffice 5.4 Spreadsheet").
    
    Interestingly, none of the other document kinds seem to have this problem.
    (Maybe it's even unhelpful that ScTabViewShell::InnerResizePixel calls
    SetDocumentModified() at all?)  Anyway, pass this inplaceEditModeChange
    information down there.
    
    Change-Id: Iffb24b068419e3608c9f4b5e9645e44e1716aafe
    Reviewed-on: https://gerrit.libreoffice.org/63582
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 3a3e8dd6a5e3..dfae17f0a81d 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -128,7 +128,8 @@ public:
     void                    UnlockAdjustPosSizePixel()
                             { m_nAdjustPosPixelLock--; }
     void                    DoAdjustPosSizePixel( SfxViewShell * pSh,
-                                        const Point &rPos, const Size &rSize );
+                                        const Point &rPos, const Size &rSize,
+                                        bool inplaceEditModeChange );
     void                    Show();
     bool                    IsVisible() const;
     void                    ToTop();
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index f76e00c70328..00195db4350a 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -159,7 +159,7 @@ protected:
     virtual void                Activate(bool IsMDIActivate) override;
     virtual void                Deactivate(bool IsMDIActivate) override;
 
-    virtual void                InnerResizePixel( const Point &rOfs, const Size &rSize );
+    virtual void                InnerResizePixel( const Point &rOfs, const Size &rSize, bool inplaceEditModeChange );
     virtual void                OuterResizePixel( const Point &rOfs, const Size &rSize );
     virtual void                SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY );
 
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 59f10257c805..a476976b1aef 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -65,7 +65,7 @@ protected:
     virtual void    Deactivate(bool bMDI) override;
     virtual void    AdjustPosSizePixel( const Point &rPos, const Size &rSize ) override;
 
-    virtual void    InnerResizePixel( const Point &rOfs, const Size &rSize ) override;
+    virtual void    InnerResizePixel( const Point &rOfs, const Size &rSize, bool inplaceEditModeChange ) override;
     virtual void    OuterResizePixel( const Point &rOfs, const Size &rSize ) override;
 
     virtual void    WriteUserData(OUString &, bool bBrowse = false) override;
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 1dc17536be4e..9cef71bc509a 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -193,7 +193,7 @@ protected:
 
     virtual void    AdjustPosSizePixel( const Point &rPos, const Size &rSize ) override;     // alt
 
-    virtual void    InnerResizePixel( const Point &rOfs, const Size &rSize ) override;       // neu
+    virtual void    InnerResizePixel( const Point &rOfs, const Size &rSize, bool inplaceEditModeChange ) override; // neu
     virtual void    OuterResizePixel( const Point &rOfs, const Size &rSize ) override;
     virtual void    SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY ) override;
 
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 885273f78739..8f0ddf44ab04 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -223,7 +223,7 @@ void ScPreviewShell::AdjustPosSizePixel( const Point &rPos, const Size &rSize )
     UpdateNeededScrollBars();
 }
 
-void ScPreviewShell::InnerResizePixel( const Point &rOfs, const Size &rSize )
+void ScPreviewShell::InnerResizePixel( const Point &rOfs, const Size &rSize, bool )
 {
     AdjustPosSizePixel( rOfs,rSize );
 }
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index f203b13bbc10..b0542d72499a 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -330,7 +330,7 @@ void ScTabViewShell::AdjustPosSizePixel( const Point &rPos, const Size &rSize )
     OuterResizePixel( rPos, rSize );
 }
 
-void ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize )
+void ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize, bool inplaceEditModeChange )
 {
     Size aNewSize( rSize );
     if ( GetViewFrame()->GetFrame().IsInPlace() )
@@ -370,7 +370,10 @@ void ScTabViewShell::InnerResizePixel( const Point &rOfs, const Size &rSize )
 
     UpdateOleZoom();                                    // calculate zoom for in-place
 
-    GetViewData().GetDocShell()->SetDocumentModified();
+    if (!inplaceEditModeChange)
+    {
+        GetViewData().GetDocShell()->SetDocumentModified();
+    }
 }
 
 void ScTabViewShell::OuterResizePixel( const Point &rOfs, const Size &rSize )
diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx
index 8a5d2c8337fd..606fe99722a1 100644
--- a/sd/source/ui/inc/ViewShellBase.hxx
+++ b/sd/source/ui/inc/ViewShellBase.hxx
@@ -118,7 +118,7 @@ public:
     virtual bool HasSelection(bool) const override;
 
     SvBorder GetBorder (bool bOuterResize);
-    virtual void InnerResizePixel (const Point& rOrigin, const Size& rSize) override;
+    virtual void InnerResizePixel (const Point& rOrigin, const Size& rSize, bool inplaceEditModeChange) override;
     virtual void OuterResizePixel (const Point& rOrigin, const Size& rSize) override;
 
     /** This call is forwarded to the main sub-shell.
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index ae01eb9f3bc7..b080fae77167 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -457,7 +457,7 @@ bool ViewShellBase::HasSelection(bool bText) const
         :   SfxViewShell::HasSelection(bText);
 }
 
-void ViewShellBase::InnerResizePixel (const Point& rOrigin, const Size &rSize)
+void ViewShellBase::InnerResizePixel (const Point& rOrigin, const Size &rSize, bool)
 {
     Size aObjSize = GetObjectShell()->GetVisArea().GetSize();
     if ( aObjSize.Width() > 0 && aObjSize.Height() > 0 )
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 4046ba616ceb..6a29e63aebd6 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1166,7 +1166,8 @@ void SfxViewFrame::InvalidateBorderImpl( const SfxViewShell* pSh )
             }
 
             DoAdjustPosSizePixel( GetViewShell(), Point(),
-                                            GetWindow().GetOutputSizePixel() );
+                                            GetWindow().GetOutputSizePixel(),
+                                            false );
         }
     }
 }
@@ -1562,7 +1563,8 @@ void SfxViewFrame::DoAdjustPosSizePixel //! divide on Inner.../Outer...
 (
     SfxViewShell*   pSh,
     const Point&    rPos,
-    const Size&     rSize
+    const Size&     rSize,
+    bool inplaceEditModeChange
 )
 {
 
@@ -1571,7 +1573,7 @@ void SfxViewFrame::DoAdjustPosSizePixel //! divide on Inner.../Outer...
     {
         m_nAdjustPosPixelLock++;
         if ( m_pImp->bResizeInToOut )
-            pSh->InnerResizePixel( rPos, rSize );
+            pSh->InnerResizePixel( rPos, rSize, inplaceEditModeChange );
         else
             pSh->OuterResizePixel( rPos, rSize );
         m_nAdjustPosPixelLock--;
@@ -2106,7 +2108,7 @@ bool SfxViewFrame::SwitchToViewShell_Impl
         UnlockAdjustPosSizePixel();
 
         if ( GetWindow().IsReallyVisible() )
-            DoAdjustPosSizePixel( pNewSh, Point(), GetWindow().GetOutputSizePixel() );
+            DoAdjustPosSizePixel( pNewSh, Point(), GetWindow().GetOutputSizePixel(), false );
 
         GetBindings().LEAVEREGISTRATIONS();
         delete pOldSh;
@@ -2428,11 +2430,11 @@ void SfxViewFrame::Resize( bool bForce )
             if ( GetFrame().IsInPlace() )
             {
                 Point aPoint = GetWindow().GetPosPixel();
-                DoAdjustPosSizePixel( pShell, aPoint, aSize );
+                DoAdjustPosSizePixel( pShell, aPoint, aSize, true );
             }
             else
             {
-                DoAdjustPosSizePixel( pShell, Point(), aSize );
+                DoAdjustPosSizePixel( pShell, Point(), aSize, false );
             }
         }
     }
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 4aaff2c6c8d5..dbddf49d33ad 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -964,7 +964,8 @@ void SfxViewShell::OuterResizePixel
 void SfxViewShell::InnerResizePixel
 (
     const Point&    /*rToolOffset*/,// Upper left corner Tools in Frame-Window
-    const Size&     /*rSize*/       // All available sizes.
+    const Size&     /*rSize*/,      // All available sizes.
+    bool
 )
 
 /*  [Description]
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 1fc1b25cea76..918508bc73d3 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -269,7 +269,7 @@ protected:
     virtual void Deactivate(bool IsMDIActivate) override;
     virtual void Activate(bool IsMDIActivate) override;
     virtual void AdjustPosSizePixel(const Point &rPos, const Size &rSize) override;
-    virtual void InnerResizePixel(const Point &rOfs, const Size  &rSize) override;
+    virtual void InnerResizePixel(const Point &rOfs, const Size  &rSize, bool inplaceEditModeChange) override;
     virtual void OuterResizePixel(const Point &rOfs, const Size  &rSize) override;
     virtual void QueryObjAreaPixel( Rectangle& rRect ) const override;
     virtual void SetZoomFactor( const Fraction &rX, const Fraction &rY ) override;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index bd531fc417ec..38688720e716 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -897,7 +897,7 @@ void SmViewShell::AdjustPosSizePixel(const Point &rPos, const Size &rSize)
     aGraphic->SetPosSizePixel(rPos, rSize);
 }
 
-void SmViewShell::InnerResizePixel(const Point &rOfs, const Size &rSize)
+void SmViewShell::InnerResizePixel(const Point &rOfs, const Size &rSize, bool)
 {
     Size aObjSize = GetObjectShell()->GetVisArea().GetSize();
     if ( aObjSize.Width() > 0 && aObjSize.Height() > 0 )
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index e1f7f3a88f91..890510c58f6c 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -355,7 +355,7 @@ protected:
 
     virtual void    Activate(bool) override;
     virtual void    Deactivate(bool) override;
-    virtual void    InnerResizePixel( const Point &rOfs, const Size &rSize ) override;
+    virtual void    InnerResizePixel( const Point &rOfs, const Size &rSize, bool inplaceEditModeChange ) override;
     virtual void    OuterResizePixel( const Point &rOfs, const Size &rSize ) override;
 
     const SwFrameFormat* GetLastTableFrameFormat() const {return m_pLastTableFormat;}
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index f7e61f210169..c16b7a129b41 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -218,7 +218,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell
                              SfxRequest* _pReq = nullptr );
 
 protected:
-    virtual void    InnerResizePixel( const Point &rOfs, const Size &rSize ) override;
+    virtual void    InnerResizePixel( const Point &rOfs, const Size &rSize, bool inplaceEditModeChange ) override;
     virtual void    OuterResizePixel( const Point &rOfs, const Size &rSize ) override;
 
     void         SetZoom(SvxZoomType eSet, sal_uInt16 nFactor);
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index de1b914a0a25..55651707e4ab 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -1332,7 +1332,7 @@ void SwPagePreview::CalcAndSetBorderPixel( SvBorder &rToFill, bool /*bInner*/ )
     SetBorderPixel( rToFill );
 }
 
-void  SwPagePreview::InnerResizePixel( const Point &rOfst, const Size &rSize )
+void  SwPagePreview::InnerResizePixel( const Point &rOfst, const Size &rSize, bool )
 {
     SvBorder aBorder;
     CalcAndSetBorderPixel( aBorder, true );
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index 9b7af74a4804..763cbd1e4b93 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -949,7 +949,7 @@ void SwView::ShowAtResize()
         m_pHRuler->Show();
 }
 
-void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
+void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize, bool )
 {
     Size aObjSize = GetObjectShell()->GetVisArea().GetSize();
     if ( aObjSize.Width() > 0 && aObjSize.Height() > 0 )


More information about the Libreoffice-commits mailing list