EE_APPEND now has to be the max value of size_t.
This commit is contained in:
parent
f75df5e338
commit
b447f763f2
4 changed files with 41 additions and 1 deletions
|
@ -55,6 +55,7 @@ $(eval $(call gb_Library_add_exception_objects,editeng,\
|
|||
editeng/source/accessibility/AccessibleStaticTextBase \
|
||||
editeng/source/accessibility/AccessibleStringWrap \
|
||||
editeng/source/editeng/editattr \
|
||||
editeng/source/editeng/editdata \
|
||||
editeng/source/editeng/editdbg \
|
||||
editeng/source/editeng/editdoc \
|
||||
editeng/source/editeng/editeng \
|
||||
|
|
|
@ -52,9 +52,10 @@ enum EVAnchorMode {
|
|||
#define EE_PARA_NOT_FOUND 0xFFFF
|
||||
#define EE_PARA_APPEND 0xFFFF
|
||||
#define EE_PARA_ALL 0xFFFF
|
||||
#define EE_APPEND 0xFFFF
|
||||
#define EE_INDEX_NOT_FOUND 0xFFFF
|
||||
|
||||
extern size_t EE_APPEND;
|
||||
|
||||
// Error messages for Read / Write Method
|
||||
#define EE_READWRITE_OK (SVSTREAM_OK)
|
||||
#define EE_READWRITE_WRONGFORMAT (SVSTREAM_ERRBASE_USER+1)
|
||||
|
|
35
editeng/source/editeng/editdata.cxx
Normal file
35
editeng/source/editeng/editdata.cxx
Normal file
|
@ -0,0 +1,35 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License or as specified alternatively below. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* Major Contributor(s):
|
||||
* Copyright (C) 2012 Kohei Yoshida <kohei.yoshida@suse.com>
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* For minor contributions see the git repository.
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
|
||||
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
|
||||
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
|
||||
* instead of those above.
|
||||
*/
|
||||
|
||||
#include "editeng/editdata.hxx"
|
||||
|
||||
#include <limits>
|
||||
|
||||
size_t EE_APPEND = std::numeric_limits<size_t>::max();
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
@ -383,6 +383,9 @@ EditView* EditEngine::RemoveView(size_t nIndex)
|
|||
{
|
||||
DBG_CHKTHIS( EditEngine, 0 );
|
||||
ImpEditEngine::ViewsType& rViews = pImpEditEngine->GetEditViews();
|
||||
if (nIndex >= rViews.size())
|
||||
return NULL;
|
||||
|
||||
EditView* pView = rViews[nIndex];
|
||||
if ( pView )
|
||||
return RemoveView( pView );
|
||||
|
|
Loading…
Reference in a new issue