LibreOffice Module sw (master) 1
|
#include <sal/config.h>
#include <string_view>
#include <editsh.hxx>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/document/XActionLockable.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/drawing/HomogenMatrix3.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/WrapTextMode.hpp>
#include <com/sun/star/text/XTextContent.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/text/XTextField.hpp>
#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/text/XParagraphAppend.hpp>
#include <com/sun/star/text/XParagraphCursor.hpp>
#include <com/sun/star/awt/FontWeight.hpp>
#include <com/sun/star/rdf/XMetadatable.hpp>
#include <com/sun/star/security/DocumentDigitalSignatures.hpp>
#include <com/sun/star/security/XCertificate.hpp>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <comphelper/propertysequence.hxx>
#include <comphelper/propertyvalue.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/scopeguard.hxx>
#include <comphelper/string.hxx>
#include <editeng/unoprnms.hxx>
#include <sfx2/classificationhelper.hxx>
#include <svx/ClassificationCommon.hxx>
#include <svx/ClassificationField.hxx>
#include <svl/cryptosign.hxx>
#include <svl/sigstruct.hxx>
#include <utility>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <vcl/virdev.hxx>
#include <redline.hxx>
#include <poolfmt.hxx>
#include <hintids.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <ndtxt.hxx>
#include <paratr.hxx>
#include <viewopt.hxx>
#include <SwRewriter.hxx>
#include <numrule.hxx>
#include <swundo.hxx>
#include <docary.hxx>
#include <docsh.hxx>
#include <unoprnms.hxx>
#include <rootfrm.hxx>
#include <pagefrm.hxx>
#include <txtfrm.hxx>
#include <rdfhelper.hxx>
#include <sfx2/watermarkitem.hxx>
#include <unoparagraph.hxx>
#include <strings.hrc>
#include <undobj.hxx>
#include <UndoParagraphSignature.hxx>
#include <txtatr.hxx>
#include <fmtmeta.hxx>
#include <unotxdoc.hxx>
#include <unotextbodyhf.hxx>
#include <unoport.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <IDocumentRedlineAccess.hxx>
Go to the source code of this file.
Macros | |
#define | WATERMARK_AUTO_SIZE sal_uInt32(1) |
Functions | |
static void | insertFieldToDocument (uno::Reference< lang::XMultiServiceFactory > const &rxMultiServiceFactory, uno::Reference< text::XText > const &rxText, uno::Reference< text::XParagraphCursor > const &rxParagraphCursor, OUString const &rsKey) |
static void | removeAllClassificationFields (std::u16string_view rPolicy, uno::Reference< text::XText > const &rxText) |
static sal_Int32 | getNumberOfParagraphs (uno::Reference< text::XText > const &xText) |
static void | equaliseNumberOfParagraph (std::vector< svx::ClassificationResult > const &rResults, uno::Reference< text::XText > const &xText) |
static void | lcl_ApplyParagraphClassification (SwDoc *pDoc, const uno::Reference< frame::XModel > &xModel, const rtl::Reference< SwXParagraph > &xParent, const css::uno::Reference< css::rdf::XResource > &xNodeSubject, std::vector< svx::ClassificationResult > aResults) |
static std::vector< svx::ClassificationResult > | lcl_CollectParagraphClassification (const uno::Reference< frame::XModel > &xModel, const uno::Reference< text::XTextContent > &xParagraph) |
static sal_Int16 | lcl_GetAngle (const drawing::HomogenMatrix3 &rMatrix) |
static void | lcl_placeWatermarkInHeader (const SfxWatermarkItem &rWatermark, const uno::Reference< frame::XModel > &xModel, const uno::Reference< beans::XPropertySet > &xPageStyle, const uno::Reference< text::XText > &xHeaderText) |
static uno::Reference< text::XTextField > | lcl_GetParagraphMetadataFieldAtIndex (const SwDocShell *pDocSh, SwTextNode const *pNode, const sal_uLong index) |
static OUString | lcl_GetParagraphClassification (SfxClassificationHelper &rHelper, sfx::ClassificationKeyCreator const &rKeyCreator, const uno::Reference< frame::XModel > &xModel, const rtl::Reference< SwXParagraph > &xParagraph) |
static OUString | lcl_GetHighestClassificationParagraphClass (SwPaM *pCursor) |
Variables | |
constexpr OUStringLiteral | WATERMARK_NAME = u"PowerPlusWaterMarkObject" |
#define WATERMARK_AUTO_SIZE sal_uInt32(1) |
Definition at line 105 of file edfcol.cxx.
|
static |
Definition at line 761 of file edfcol.cxx.
References getNumberOfParagraphs(), and svx::PARAGRAPH.
Referenced by SwEditShell::ApplyAdvancedClassification().
|
static |
Definition at line 748 of file edfcol.cxx.
Referenced by equaliseNumberOfParagraph().
|
static |
Definition at line 704 of file edfcol.cxx.
References UNO_NAME_NAME.
Referenced by SwEditShell::ApplyAdvancedClassification().
|
static |
Definition at line 1168 of file edfcol.cxx.
References SwRDFHelper::addStatement(), aFieldNames, svx::CATEGORY, first, SfxClassificationHelper::getPolicyType(), svx::INTELLECTUAL_PROPERTY_PART, sfx::ClassificationKeyCreator::makeCategoryIdentifierKey(), sfx::ClassificationKeyCreator::makeCategoryNameKey(), sfx::ClassificationKeyCreator::makeNumberedIntellectualPropertyPartKey(), sfx::ClassificationKeyCreator::makeNumberedMarkingKey(), sfx::ClassificationKeyCreator::makeNumberedTextKey(), svx::MARKING, svx::ClassificationResult::meType, svx::ClassificationResult::msAbbreviatedName, svx::ClassificationResult::msIdentifier, svx::ClassificationResult::msName, nIndex, SwRDFHelper::removeStatement(), svx::TEXT, and xModel.
Referenced by SwEditShell::ApplyParagraphClassification(), and SwEditShell::RestoreMetadataFieldsAndValidateParagraphSignatures().
|
static |
Definition at line 1293 of file edfcol.cxx.
References aName, svx::CATEGORY, SfxClassificationHelper::getPolicyType(), svx::INTELLECTUAL_PROPERTY_PART, sfx::ClassificationKeyCreator::isCategoryIdentifierKey(), sfx::ClassificationKeyCreator::isCategoryNameKey(), sfx::ClassificationKeyCreator::isIntellectualPropertyPartKey(), sfx::ClassificationKeyCreator::isMarkingKey(), sfx::ClassificationKeyCreator::isMarkingTextKey(), svx::MARKING, SfxClassificationHelper::policyTypeToString(), svx::TEXT, u, UNO_NAME_TEXT_FIELD, UNO_NAME_TEXT_PORTION_TYPE, and xModel.
Referenced by SwEditShell::CollectParagraphClassification().
|
static |
Definition at line 1368 of file edfcol.cxx.
References basegfx::B2DHomMatrix::decompose(), basegfx::rad2deg(), round, and basegfx::B2DHomMatrix::set().
Referenced by SwEditShell::GetWatermark(), and lcl_placeWatermarkInHeader().
|
static |
Definition at line 2116 of file edfcol.cxx.
References aHelper, SfxObjectShell::GetBaseModel(), SwNode::GetDoc(), SfxObjectShell::getDocProperties(), SwDoc::GetDocShell(), SwPosition::GetNode(), SfxClassificationHelper::getPolicyType(), SwNode::GetTextNode(), lcl_GetParagraphClassification(), SwPaM::Start(), and xModel.
Referenced by SwEditShell::ClassifyDocPerHighestParagraphClass().
|
static |
Definition at line 2096 of file edfcol.cxx.
References SfxClassificationHelper::GetBACNameForIdentifier(), sfx::ClassificationKeyCreator::makeCategoryIdentifierKey(), sfx::ClassificationKeyCreator::makeCategoryNameKey(), and xModel.
Referenced by lcl_GetHighestClassificationParagraphClass().
|
static |
Definition at line 1896 of file edfcol.cxx.
References SwTextAttr::GetAttr(), SfxObjectShell::GetBaseModel(), SwFormatMeta::GetMeta(), SwTextNode::GetTextAttrAt(), index, RES_TXTATR_METAFIELD(), and xModel.
Referenced by SwEditShell::IsCursorInParagraphMetadataField(), and SwEditShell::RemoveParagraphMetadataFieldAtCursor().
|
static |
Definition at line 1446 of file edfcol.cxx.
References aPropertyValues, comphelper::containerToSequence(), basegfx::deg2rad(), basegfx::B2DHomMatrix::get(), SfxWatermarkItem::GetAngle(), SfxWatermarkItem::GetColor(), SfxWatermarkItem::GetFont(), SfxWatermarkItem::GetText(), SfxWatermarkItem::GetTransparency(), basegfx::B2DHomMatrix::identity(), comphelper::InitPropertySequence(), lcl_GetAngle(), comphelper::makePropertyValue(), nBottomMargin, nLeftMargin, nRightMargin, nTopMargin, basegfx::B2DHomMatrix::rotate(), basegfx::B2DHomMatrix::scale(), vcl::Font::SetFamilyName(), vcl::Font::SetFontSize(), UNO_NAME_ANCHOR_TYPE, UNO_NAME_BOTTOM_MARGIN, UNO_NAME_CHAR_FONT_NAME, UNO_NAME_CHAR_FONT_NAME_ASIAN, UNO_NAME_CHAR_FONT_NAME_COMPLEX, UNO_NAME_CHAR_HEIGHT, UNO_NAME_FILL_TRANSPARENCE, UNO_NAME_FILLCOLOR, UNO_NAME_FILLSTYLE, UNO_NAME_HORI_ORIENT, UNO_NAME_HORI_ORIENT_RELATION, UNO_NAME_LEFT_MARGIN, UNO_NAME_LINESTYLE, UNO_NAME_OPAQUE, UNO_NAME_RIGHT_MARGIN, UNO_NAME_SIZE, UNO_NAME_TEXT_AUTOGROWHEIGHT, UNO_NAME_TEXT_AUTOGROWWIDTH, UNO_NAME_TEXT_MINFRAMEHEIGHT, UNO_NAME_TEXT_MINFRAMEWIDTH, UNO_NAME_TEXT_WRAP, UNO_NAME_TOP_MARGIN, UNO_NAME_VERT_ORIENT, UNO_NAME_VERT_ORIENT_RELATION, WATERMARK_AUTO_SIZE, WATERMARK_NAME, and xModel.
Referenced by SwEditShell::SetWatermark().
|
static |
Definition at line 715 of file edfcol.cxx.
References aName, UNO_NAME_NAME, UNO_NAME_TEXT_FIELD, and UNO_NAME_TEXT_PORTION_TYPE.
Referenced by SwEditShell::ApplyAdvancedClassification().
|
constexpr |
Definition at line 104 of file edfcol.cxx.
Referenced by lcl_placeWatermarkInHeader().