office-gobmx/sd/inc/VectorGraphicSearchContext.hxx
Tomaž Vajngerl 74e2f2178f move vector graphic search to View, so it works in multiple views
VectorGraphicSearch was instantiated for the Outline, which is
the same for every view. The problem with this is that when we
have multiple views, the search would interfere with each other,
which is especially distracting in online when multiple users
connect to the same document and try searching.
This adds VectorGraphicSearchContext class, that is added to the
View, which makes the search view dependent and multiple instances
of VectorGraphicSearch are created, each one for its own view.

Change-Id: Ia0f34647b30b35f4ddb84d33353990d635756905
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100837
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-08-17 16:49:39 +02:00

35 lines
806 B
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*/
#pragma once
#include <vcl/VectorGraphicSearch.hxx>
namespace sd
{
struct VectorGraphicSearchContext
{
bool mbCurrentIsVectorGraphic;
std::unique_ptr<VectorGraphicSearch> mpVectorGraphicSearch;
VectorGraphicSearchContext()
: mbCurrentIsVectorGraphic(false)
{
}
void reset()
{
mbCurrentIsVectorGraphic = false;
mpVectorGraphicSearch.reset();
}
};
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */