don't InvalidateAll in online for a OuterResize case
which is triggered on a new joiner to a shared document but doesn't seem useful in the online case at least https: //github.com/CollaboraOnline/online/issues/6379 Change-Id: Ic5034658d9e8a7ca1dfab44ce3905b95a5705eb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152164 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
@@ -187,7 +187,7 @@ class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell>
|
||||
|
||||
SAL_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt );
|
||||
|
||||
SAL_DLLPRIVATE void InvalidateAll(const std::vector<LockPaintReason>& rReasons);
|
||||
SAL_DLLPRIVATE void InvalidateAll(std::vector<LockPaintReason>& rReasons);
|
||||
|
||||
protected:
|
||||
static ShellResource* spShellRes; ///< Resources for the Shell.
|
||||
@@ -492,7 +492,7 @@ public:
|
||||
inline void LockPaint(LockPaintReason eReason);
|
||||
void ImplLockPaint();
|
||||
inline void UnlockPaint(bool bVirDev = false );
|
||||
void ImplUnlockPaint( const std::vector<LockPaintReason>& rReasons, bool bVirDev );
|
||||
void ImplUnlockPaint( std::vector<LockPaintReason>& rReasons, bool bVirDev );
|
||||
bool IsPaintLocked() const { return mnLockPaint != 0; }
|
||||
|
||||
// Get/set DrawView and PageView.
|
||||
|
@@ -417,7 +417,7 @@ void SwViewShell::ImplLockPaint()
|
||||
Imp()->LockPaint();
|
||||
}
|
||||
|
||||
void SwViewShell::ImplUnlockPaint(const std::vector<LockPaintReason>& rReasons, bool bVirDev)
|
||||
void SwViewShell::ImplUnlockPaint(std::vector<LockPaintReason>& rReasons, bool bVirDev)
|
||||
{
|
||||
CurrShell aCurr( this );
|
||||
if ( GetWin() && GetWin()->IsVisible() )
|
||||
@@ -515,11 +515,23 @@ namespace
|
||||
};
|
||||
}
|
||||
|
||||
void SwViewShell::InvalidateAll(const std::vector<LockPaintReason>& rReasons)
|
||||
void SwViewShell::InvalidateAll(std::vector<LockPaintReason>& rReasons)
|
||||
{
|
||||
assert(!rReasons.empty() && "there must be a reason to InvalidateAll");
|
||||
|
||||
for (const auto& reason : rReasons)
|
||||
SAL_INFO("sw.core", "InvalidateAll because of: " << to_string(reason));
|
||||
GetWin()->Invalidate(InvalidateFlags::Children);
|
||||
|
||||
if (comphelper::LibreOfficeKit::isActive())
|
||||
{
|
||||
// https://github.com/CollaboraOnline/online/issues/6379
|
||||
// ditch OuterResize as a reason to invalidate all in the online case
|
||||
rReasons.erase(std::remove(rReasons.begin(), rReasons.end(), LockPaintReason::OuterResize), rReasons.end());
|
||||
}
|
||||
|
||||
if (!rReasons.empty())
|
||||
GetWin()->Invalidate(InvalidateFlags::Children);
|
||||
rReasons.clear();
|
||||
}
|
||||
|
||||
bool SwViewShell::AddPaintRect( const SwRect & rRect )
|
||||
|
Reference in New Issue
Block a user