/* -*- 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 .
*/ #include"vbalistformat.hxx" #include <utility> #include <vbahelper/vbahelper.hxx> #include <ooo/vba/word/WdListApplyTo.hpp> #include <ooo/vba/word/WdDefaultListBehavior.hpp> #include <com/sun/star/awt/FontDescriptor.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/container/XEnumeration.hpp> #include <com/sun/star/document/XUndoManagerSupplier.hpp> #include <com/sun/star/beans/XMultiPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/style/TabStop.hpp> #include <com/sun/star/text/PositionAndSpaceMode.hpp> #include <com/sun/star/text/XTextTable.hpp> #include <com/sun/star/util/Color.hpp> #include <comphelper/sequence.hxx> #include <comphelper/sequenceashashmap.hxx> #include <comphelper/scopeguard.hxx> #include <editeng/numitem.hxx> #include"vbalisttemplate.hxx" #include"wordvbahelper.hxx" #include <unotxdoc.hxx>
rPropertySet->setPropertyValue(u"ParaLeftMargin"_ustr, css::uno::Any(nIndentAt));
rPropertySet->setPropertyValue(u"ParaFirstLineIndent"_ustr, css::uno::Any(nFirstLineIndent)); if (nLabelFollowedBy == SvxNumberFormat::LabelFollowedBy::LISTTAB)
{
css::uno::Sequence<css::style::TabStop> stops;
rPropertySet->getPropertyValue(u"ParaTabStops"_ustr) >>= stops;
css::style::TabStop tabStop{};
tabStop.Position = nListtabStopPosition;
tabStop.Alignment = css::style::TabAlign::TabAlign_LEFT;
tabStop.FillChar = ' ';
rPropertySet->setPropertyValue(u"ParaTabStops"_ustr,
css::uno::Any(comphelper::combineSequences({ tabStop }, stops))); // FIXME: What if added tap stop is greater than already defined ones?
}
} else
{ continue; // for now, keep such lists as is
}
// In case of higher outline levels, each assignment of empty value just sets level 1 while (rPropertySet->getPropertyValue(u"NumberingRules"_ustr) != css::uno::Any())
{
rPropertySet->setPropertyValue(u"NumberingRules"_ustr, css::uno::Any());
}
}
}
}
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.