1f6b7030cb
The abstractNum needs to correspond to a SwList, not to a SwNumRule as it is currently implemented. Add a mapping to MSWordExportBase for "overriding" numbering definitions; these are added to m_pUsedNumTable, which appears to be necessary to interact with DuplicateNumRule(), but here we just add nullpointers, because we don't need to modify the SwNumrule, and neither do we want the vector to double-delete it. The mapping is created while iterating over the document, in AttributeOutputBase::ParaNumRule(). It turns out that this approach would work for WW8 too as DuplicateNumRule() was originally added for that format but it won't work easily for RTF; in the DOCX case the WriteNumbering() is called after the main text and footnotes/endnotes, but with RTF it's the other way around :( Change-Id: Ia0409f5ad0b2e089005024ef7f61850a06d4dcbe Reviewed-on: https://gerrit.libreoffice.org/78607 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
69 lines
2.2 KiB
C++
69 lines
2.2 KiB
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/.
|
|
*
|
|
* 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 .
|
|
*/
|
|
|
|
#ifndef INCLUDED_SW_INC_LIST_HXX
|
|
#define INCLUDED_SW_INC_LIST_HXX
|
|
|
|
#include <o3tl/deleter.hxx>
|
|
#include <rtl/ustring.hxx>
|
|
#include <memory>
|
|
|
|
#include "swdllapi.h"
|
|
|
|
class SwNumRule;
|
|
class SwNodes;
|
|
class SwNodeNum;
|
|
|
|
class SwListImpl;
|
|
|
|
class SwList
|
|
{
|
|
public:
|
|
SwList( const OUString& sListId,
|
|
SwNumRule& rDefaultListStyle,
|
|
const SwNodes& rNodes );
|
|
~SwList();
|
|
|
|
const OUString & GetListId() const;
|
|
|
|
SW_DLLPUBLIC const OUString & GetDefaultListStyleName() const;
|
|
void SetDefaultListStyleName(OUString const&);
|
|
|
|
void InsertListItem( SwNodeNum& rNodeNum,
|
|
bool isHiddenRedlines,
|
|
const int nLevel );
|
|
static void RemoveListItem( SwNodeNum& rNodeNum );
|
|
|
|
void InvalidateListTree();
|
|
void ValidateListTree();
|
|
|
|
void MarkListLevel( const int nListLevel,
|
|
const bool bValue );
|
|
|
|
bool IsListLevelMarked( const int nListLevel ) const;
|
|
|
|
private:
|
|
SwList( const SwList& ) = delete;
|
|
SwList& operator=( const SwList& ) = delete;
|
|
|
|
std::unique_ptr<SwListImpl, o3tl::default_delete<SwListImpl>> mpListImpl;
|
|
};
|
|
#endif // INCLUDED_SW_INC_LIST_HXX
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|