summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-30 15:22:30 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-30 15:56:24 +0000
commit7d7278427a4c0c7f66f054ed36d32824969c3e5b (patch)
treedef87098cce1aacf82ae21d66c1390756d6542dd
parentResolves: tdf#104152 suppress notifications from EditEngine during Paste (diff)
downloadcore-7d7278427a4c0c7f66f054ed36d32824969c3e5b.tar.gz
core-7d7278427a4c0c7f66f054ed36d32824969c3e5b.zip
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 (cherry picked from commit 424d17e62e0d670aa79a890f85bb98c19169f9f5) Reviewed-on: https://gerrit.libreoffice.org/31428 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--include/sfx2/viewfrm.hxx3
-rw-r--r--include/sfx2/viewsh.hxx2
-rw-r--r--sc/source/ui/inc/prevwsh.hxx2
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx2
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx7
-rw-r--r--sd/source/ui/inc/ViewShellBase.hxx2
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx14
-rw-r--r--sfx2/source/view/viewsh.cxx3
-rw-r--r--starmath/inc/view.hxx2
-rw-r--r--starmath/source/view.cxx2
-rw-r--r--sw/inc/view.hxx2
-rw-r--r--sw/source/uibase/inc/pview.hxx2
-rw-r--r--sw/source/uibase/uiview/pview.cxx2
-rw-r--r--sw/source/uibase/uiview/viewport.cxx2
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 5b4dc42bf29d..0722b4980af7 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 b27d5355ba45..e6384aaef90e 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(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 f3b4666653f1..e8f4491ae26e 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -338,7 +338,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() )
@@ -378,7 +378,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 3586a9ac3559..551cb94ae14a 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 61895fbf3cf5..162751f513ac 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -891,7 +891,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 9b89c3965000..4cd1a7f0ce24 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 f34b89cd842a..ef0ed12b7b4e 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 )