diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-11-30 15:22:30 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-11-30 15:27:25 +0100 |
commit | 424d17e62e0d670aa79a890f85bb98c19169f9f5 (patch) | |
tree | 49c82966c1465065da435d6f6b6255cf3c96675c | |
parent | 579feb4d841ea80de699f4124378d0701034833e (diff) |
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
-rw-r--r-- | include/sfx2/viewfrm.hxx | 3 | ||||
-rw-r--r-- | include/sfx2/viewsh.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/prevwsh.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/tabvwsh.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/prevwsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh4.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/inc/ViewShellBase.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 14 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 3 | ||||
-rw-r--r-- | starmath/inc/view.hxx | 2 | ||||
-rw-r--r-- | starmath/source/view.cxx | 2 | ||||
-rw-r--r-- | sw/inc/view.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/pview.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/pview.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewport.cxx | 2 |
16 files changed, 29 insertions, 22 deletions
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx index d692f5ae3626..d25095483772 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -124,7 +124,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 f7a672fd96f9..14466922f461 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -160,7 +160,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 dab12bc523b1..967c194db501 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 4ec942bf0f03..1b6551f1e82c 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -196,7 +196,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 7311751d4bfc..f35a0f6ea5b5 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -224,7 +224,7 @@ void ScPreviewShell::AdjustPosSizePixel( const Point &rPos, const Size &rSize ) UpdateNeededScrollBars(false); } -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 edf2953668c9..df9eaba40dc4 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -339,7 +339,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() ) @@ -379,7 +379,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 a2b15a5a2246..65e481ec0fdc 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -118,7 +118,7 @@ public: virtual bool HasSelection(bool = true ) 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 668127a48ed2..598ec11227c8 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -470,7 +470,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 c9585d41007e..69aaa29c2ab0 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1096,7 +1096,8 @@ void SfxViewFrame::InvalidateBorderImpl( const SfxViewShell* pSh ) } DoAdjustPosSizePixel( GetViewShell(), Point(), - GetWindow().GetOutputSizePixel() ); + GetWindow().GetOutputSizePixel(), + false ); } } } @@ -1512,7 +1513,8 @@ void SfxViewFrame::DoAdjustPosSizePixel //! divide on Inner.../Outer... ( SfxViewShell* pSh, const Point& rPos, - const Size& rSize + const Size& rSize, + bool inplaceEditModeChange ) { @@ -1521,7 +1523,7 @@ void SfxViewFrame::DoAdjustPosSizePixel //! divide on Inner.../Outer... { m_nAdjustPosPixelLock++; if ( m_pImpl->bResizeInToOut ) - pSh->InnerResizePixel( rPos, rSize ); + pSh->InnerResizePixel( rPos, rSize, inplaceEditModeChange ); else pSh->OuterResizePixel( rPos, rSize ); m_nAdjustPosPixelLock--; @@ -2002,7 +2004,7 @@ bool SfxViewFrame::SwitchToViewShell_Impl UnlockAdjustPosSizePixel(); if ( GetWindow().IsReallyVisible() ) - DoAdjustPosSizePixel( pNewSh, Point(), GetWindow().GetOutputSizePixel() ); + DoAdjustPosSizePixel( pNewSh, Point(), GetWindow().GetOutputSizePixel(), false ); GetBindings().LEAVEREGISTRATIONS(); delete pOldSh; @@ -2314,11 +2316,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 ad6d6cc5d0ce..4d55babc23ee 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -967,7 +967,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 e6bf3238bec5..a1a3b4964f13 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -263,7 +263,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 2456fb2ec1dc..00bae3b48c3f 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -892,7 +892,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 d3eec4ad5783..a2321ce13531 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -351,7 +351,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 2ad2cadaaba9..80edefd8dec0 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 ); 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 72dc3936ad2e..1e334ab5b564 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1333,7 +1333,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 00a773f71e98..7cfd3dd45539 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -952,7 +952,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 ) |