/* -*- 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/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
if (itr != m_Entries.end())
{
m_Entries.erase(itr); if (m_Entries.size() < MAXQUERY) // Make sure that we have at least MAXQUERY number of entries at // all times.
m_Entries.resize(MAXQUERY);
bRet = true;
}
/* TODO: pContext currently is also used as a flag whether matching * empty cells with an empty string is triggered from the interpreter. * This could be handled independently if all queries should support
* it, needs to be evaluated if that actually is desired. */
// Interpreter queries have only one query, also QueryByEmpty and // QueryByNonEmpty rely on that. if (nIndex != 0) return;
// (empty = empty) is a match, and (empty <> not-empty) also is a // match. (empty = 0) is not a match.
rItem.mbMatchEmpty = ((rEntry.eOp == SC_EQUAL && rItem.maString.isEmpty())
|| (rEntry.eOp == SC_NOT_EQUAL && !rItem.maString.isEmpty()));
// SetQueryBy override item members with special values, so do this last. if (bByEmpty)
rEntry.SetQueryByEmpty(); elseif (bByNonEmpty)
rEntry.SetQueryByNonEmpty(); else
{
sal_uInt32 nFormat = 0; bool bNumber = pContext->NFIsNumberFormat( rItem.maString.getString(), nFormat, rItem.mfVal);
rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString;
}
}
// Are the number of queries equal?
SCSIZE nUsed = 0;
SCSIZE nOtherUsed = 0;
SCSIZE nEntryCount = GetEntryCount();
SCSIZE nOtherEntryCount = rOther.GetEntryCount();
while (nUsed<nEntryCount && m_Entries[nUsed].bDoQuery) ++nUsed; while (nOtherUsed<nOtherEntryCount && rOther.m_Entries[nOtherUsed].bDoQuery)
++nOtherUsed;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.