/* -*- 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_SFX2_METADATABLE_HXX #define INCLUDED_SFX2_METADATABLE_HXX
namespace com::sun::star { namespace frame { class XModel; }
}
namespace sfx2 { class IXmlIdRegistry;
}
namespace sfx2 {
class XmlIdRegistry; class MetadatableUndo;
// XML ID handling ---------------------------------------------------
/// create a sfx2::XmlIdRegistryDocument or a sfx2::XmlIdRegistryClipboard
SFX2_DLLPUBLIC ::sfx2::IXmlIdRegistry *
createXmlIdRegistry(constbool i_DocIsClipboard);
/** base class for core objects that may have xml:id.
<p>The interface of this class consists of 3 parts: <ul><li>implementations that are used by the MetadatableMixin below</li> <li>hooks to be called by the sw core whenever actions that are relevant to the uniqueness of xml:ids are taken (copying, splitting, merging, deletion, undo, etc.)</li> <li>abstract methods that are called by the implementation of the previous hooks</li></ul> </p>
*/ class SFX2_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE("crosscast") Metadatable
{ public:
Metadatable() : m_pReg(nullptr) {}
// note that Reg may be a XmlIdRegistryDocument or a XmlIdRegistryClipboard
XmlIdRegistry* m_pReg; // null => no XmlId
};
/** base class for UNO objects that implement XMetadatable.
<p>An instance of this base class is associated with an instance of Metadatable.</p>
*/ class SFX2_DLLPUBLIC MetadatableMixin : public cppu::WeakImplHelper<css::rdf::XMetadatable>
{
protected: /// get the core object corresponding to this UNO object. virtual Metadatable * GetCoreObject() = 0; /// get the XModel for the document virtual css::uno::Reference< css::frame::XModel >
GetModel() = 0;
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 ist noch experimentell.