29#include <com/sun/star/frame/XModel.hpp>
41 using ::com::sun::star::xml::sax::XFastAttributeList;
55 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList )
60 pRet =
GetImport().GetFormImport()->createContext( _nElement, xAttrList );
69 const Reference< XPropertySet >& _rxProps,
const Reference< XPropertySetInfo >& _rxPropInfo,
70 const OUString& _rPropName,
bool _bDefault)
78 OUString sAttributeValue = _rxAttributes->getOptionalValue(nCompleteAttributeName);
79 bool bValue = _bDefault;
83 if (_rxPropInfo->hasPropertyByName(_rPropName))
85 _rxProps->setPropertyValue(_rPropName,
Any(bValue));
95 Reference< XPropertySet > xDocProperties(
GetImport().GetModel(), UNO_QUERY);
96 if ( xDocProperties.is() )
99 Reference< XPropertySetInfo > xDocPropInfo;
100 if (xDocProperties.is())
101 xDocPropInfo = xDocProperties->getPropertySetInfo();
110 "caught an exception while setting the document properties!");
132 const Reference< XPropertySet >& _rxProps,
const Reference< XPropertySetInfo >& _rxPropInfo,
133 const OUString& _rPropName,
bool _bDefault)
136 bool bValue = _bDefault;
137 if (_rxPropInfo->hasPropertyByName(_rPropName))
138 bValue = ::cppu::any2bool(_rxProps->getPropertyValue(_rPropName));
141 OUStringBuffer aValue;
148 aValue.makeStringAndClear());
155 Reference< XPropertySet > xDocProperties(_rExp.
GetModel(), UNO_QUERY);
156 if ( xDocProperties.is() )
159 Reference< XPropertySetInfo > xDocPropInfo;
160 if (xDocProperties.is())
161 xDocPropInfo = xDocProperties->getPropertySetInfo();
170 "caught an exception while retrieving the document properties!");
void AddAttribute(sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
const css::uno::Reference< css::frame::XModel > & GetModel() const
This class deliberately does not support XWeak, to improve performance when loading large documents.
SvXMLImport & GetImport()
static bool convertBool(bool &rBool, std::u16string_view rString)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
#define LEAVE_LOG_CONTEXT()
#define ENTER_LOG_CONTEXT(name)
constexpr OUStringLiteral PROPERTY_AUTOCONTROLFOCUS
constexpr OUStringLiteral PROPERTY_APPLYDESIGNMODE
#define XML_ELEMENT(prefix, name)
constexpr sal_uInt16 XML_NAMESPACE_OFFICE