21#include <com/sun/star/drawing/XLayerSupplier.hpp>
22#include <com/sun/star/container/XIndexAccess.hpp>
23#include <com/sun/star/beans/XPropertySet.hpp>
24#include <com/sun/star/frame/XModel.hpp>
31using ::com::sun::star::uno::Reference;
33using namespace ::
cppu;
44 Reference< XLayerSupplier > xLayerSupplier( rExport.
GetModel(), UNO_QUERY );
45 if( !xLayerSupplier.is() )
48 Reference< XIndexAccess > xLayerManager( xLayerSupplier->getLayerManager(), UNO_QUERY );
49 if( !xLayerManager.is() )
52 const sal_Int32
nCount = xLayerManager->getCount();
56 static constexpr OUStringLiteral strName(
u"Name" );
57 static constexpr OUStringLiteral strTitle(
u"Title" );
58 static constexpr OUStringLiteral strDescription(
u"Description" );
59 static constexpr OUStringLiteral strIsVisible(
u"IsVisible");
60 static constexpr OUStringLiteral strIsPrintable(
u"IsPrintable");
61 static constexpr OUStringLiteral strIsLocked(
u"IsLocked" );
72 Reference< XPropertySet> xLayer( xLayerManager->getByIndex(
nIndex ), UNO_QUERY_THROW );
73 xLayer->getPropertyValue( strName ) >>= sTmp;
77 bool bTmpVisible(
true );
78 bool bTmpPrintable(
true );
79 xLayer->getPropertyValue( strIsVisible) >>= bTmpVisible;
80 xLayer->getPropertyValue( strIsPrintable) >>= bTmpPrintable;
95 bool bTmpLocked(
false );
96 xLayer->getPropertyValue( strIsLocked ) >>= bTmpLocked;
106 xLayer->getPropertyValue(strTitle) >>= sTmp;
114 xLayer->getPropertyValue(strDescription) >>= sTmp;
static void exportLayer(SvXMLExport &rExport)
void AddAttribute(sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
void Characters(const OUString &rChars)
const css::uno::Reference< css::frame::XModel > & GetModel() const
#define TOOLS_WARN_EXCEPTION(area, stream)
Handling of tokens in XML:
constexpr sal_uInt16 XML_NAMESPACE_DRAW
constexpr sal_uInt16 XML_NAMESPACE_SVG