20#ifndef INCLUDED_OOX_OLE_OLEHELPER_HXX
21#define INCLUDED_OOX_OLE_OLEHELPER_HXX
23#include <com/sun/star/uno/Reference.hxx>
28#include <rtl/ustring.hxx>
34 namespace awt {
class XControlModel; }
35 namespace awt {
struct Size; }
36 namespace form {
class XFormComponent; }
37 namespace frame {
class XModel; }
38 namespace io {
class XOutputStream; }
39 namespace uno {
class XComponentContext; }
47 class BinaryInputStream;
48 class BinaryOutputStream;
52 class ControlModelBase;
53 class EmbeddedControl;
56#define OLE_GUID_STDFONT "{0BE35203-8F91-11CE-9DE3-00AA004BB851}"
57#define OLE_GUID_STDPIC "{0BE35204-8F91-11CE-9DE3-00AA004BB851}"
103 sal_uInt32 nOleColor,
104 bool bDefaultColorBgr );
146 OleFormCtrlExportHelper(
const css::uno::Reference< css::uno::XComponentContext >& rxCtx,
const css::uno::Reference< css::frame::XModel >& xDocModel,
const css::uno::Reference< css::awt::XControlModel >& xModel );
151 std::u16string_view sResult;
152 if ( maGUID.getLength() > 2 )
153 sResult = maGUID.subView(1, maGUID.getLength() - 2 );
159 bool isValid()
const {
return mpModel !=
nullptr; }
160 void exportName(
const css::uno::Reference< css::io::XOutputStream >& rxOut );
161 void exportCompObj(
const css::uno::Reference< css::io::XOutputStream >& rxOut );
162 void exportControl(
const css::uno::Reference< css::io::XOutputStream >& rxOut,
const css::awt::Size& rSize,
bool bAutoClose =
false );
172 css::uno::Reference< css::uno::XComponentContext >
mxCtx;
177 css::uno::Reference< css::form::XFormComponent > & rxFormComp,
178 std::u16string_view rGuidString );
180 css::uno::Reference< css::form::XFormComponent > & rxFormComp,
181 const OUString& rGuidString,
186 bool ReadOCXStorage(
tools::SvRef<SotStorage> const & rSrc1, css::uno::Reference< css::form::XFormComponent > & rxFormComp );
188 sal_Int32 nPos, sal_Int32 nSize );
189 static bool WriteOCXStream(
const css::uno::Reference< css::frame::XModel >& rxModel,
tools::SvRef<SotStorage> const &rSrc1,
const css::uno::Reference< css::awt::XControlModel > &rControlModel,
const css::awt::Size& rSize,OUString &rName);
190 static bool WriteOCXExcelKludgeStream(
const css::uno::Reference< css::frame::XModel >& rxModel,
const css::uno::Reference< css::io::XOutputStream >& xOutStrm,
const css::uno::Reference< css::awt::XControlModel > &rControlModel,
const css::awt::Size& rSize,OUString &rName);
Interface for binary output stream classes.
Provides helper functions for colors, device measurement conversion, graphics, and graphic objects ha...
Base class for all models of form controls.
css::uno::Reference< css::uno::XComponentContext > mxCtx
bool importControlFromStream(::oox::BinaryInputStream &rInStrm, css::uno::Reference< css::form::XFormComponent > &rxFormComp, std::u16string_view rGuidString)
::oox::GraphicHelper maGrfHelper
bool importControlFromStream(::oox::BinaryInputStream &rInStrm, css::uno::Reference< css::form::XFormComponent > &rxFormComp, const OUString &rGuidString, sal_Int32 nSize)
OOX_DLLPUBLIC OUString importGuid(BinaryInputStream &rInStrm)
Imports a GUID from the passed binary stream and returns its string representation (in uppercase char...
OOX_DLLPUBLIC::Color decodeOleColor(const GraphicHelper &rGraphicHelper, sal_uInt32 nOleColor, bool bDefaultColorBgr)
Returns the UNO RGB color from the passed encoded OLE color.
OOX_DLLPUBLIC void exportGuid(BinaryOutputStream &rOutStrm, const SvGlobalName &rId)
OOX_DLLPUBLIC bool importStdPic(StreamDataSequence &orGraphicData, BinaryInputStream &rInStrm)
Imports an OLE StdPic picture from the current position of the passed binary stream.
OOX_DLLPUBLIC bool importStdFont(StdFontInfo &orFontInfo, BinaryInputStream &rInStrm, bool bWithGuid)
Imports an OLE StdFont font structure from the current position of the passed binary stream.
OOX_DLLPUBLIC sal_uInt32 encodeOleColor(sal_Int32 nRgbColor)
Returns the OLE color from the passed UNO RGB color.
const sal_uInt16 OLE_STDFONT_NORMAL
const sal_uInt16 OLE_STDFONT_BOLD
const sal_uInt8 OLE_STDFONT_ITALIC
const sal_uInt8 OLE_STDFONT_UNDERLINE
const sal_uInt8 OLE_STDFONT_STRIKE
css::uno::Sequence< sal_Int8 > StreamDataSequence
Stores data about a StdFont font structure.
sal_uInt8 mnFlags
Font flags.
sal_uInt32 mnHeight
Font height (1/10,000 points).
sal_uInt16 mnCharSet
Font charset.
sal_uInt16 mnWeight
Font weight (normal/bold).
OUString maName
Font name.
Stores data about a StdHlink hyperlink.