LibreOffice Module oox (master)  1
axcontrol.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_OOX_OLE_AXCONTROL_HXX
21 #define INCLUDED_OOX_OLE_AXCONTROL_HXX
22 
23 #include <memory>
24 #include <vector>
25 
26 #include <com/sun/star/uno/Reference.hxx>
27 #include <com/sun/star/uno/Sequence.hxx>
28 #include <oox/dllapi.h>
32 #include <oox/ole/axfontdata.hxx>
33 #include <oox/ole/olehelper.hxx>
34 #include <rtl/ustring.hxx>
35 #include <sal/types.h>
36 
37 namespace com::sun::star {
38  namespace awt { class XControlModel; }
39  namespace container { class XIndexContainer; }
40  namespace drawing { class XDrawPage; }
41  namespace frame { class XModel; }
42  namespace form { class XFormsSupplier; }
43  namespace lang { class XMultiServiceFactory; }
44 }
45 
46 namespace oox {
47  class BinaryInputStream;
48  class BinaryOutputStream;
49  class GraphicHelper;
50  class PropertyMap;
51 }
52 
53 namespace oox::ole {
54 
55 
56 #define COMCTL_GUID_SCROLLBAR_60 "{FE38753A-44A3-11D1-B5B7-0000C09000C4}"
57 #define COMCTL_GUID_PROGRESSBAR_50 "{0713E8D2-850A-101B-AFC0-4210102A8DA7}"
58 #define COMCTL_GUID_PROGRESSBAR_60 "{35053A22-8589-11D1-B16A-00C0F0283628}"
59 
60 const sal_uInt16 COMCTL_VERSION_50 = 5;
61 const sal_uInt16 COMCTL_VERSION_60 = 6;
62 
63 
64 #define AX_GUID_COMMANDBUTTON "{D7053240-CE69-11CD-a777-00dd01143c57}"
65 #define AX_GUID_LABEL "{978C9E23-D4B0-11CE-bf2d-00aa003f40d0}"
66 #define AX_GUID_IMAGE "{4C599241-6926-101B-9992-00000b65c6f9}"
67 #define AX_GUID_TOGGLEBUTTON "{8BD21D60-EC42-11CE-9e0d-00aa006002f3}"
68 #define AX_GUID_CHECKBOX "{8BD21D40-EC42-11CE-9e0d-00aa006002f3}"
69 #define AX_GUID_OPTIONBUTTON "{8BD21D50-EC42-11CE-9e0d-00aa006002f3}"
70 #define AX_GUID_TEXTBOX "{8BD21D10-EC42-11CE-9e0d-00aa006002f3}"
71 #define AX_GUID_LISTBOX "{8BD21D20-EC42-11CE-9e0d-00aa006002f3}"
72 #define AX_GUID_COMBOBOX "{8BD21D30-EC42-11CE-9e0d-00aa006002f3}"
73 #define AX_GUID_SPINBUTTON "{79176FB0-B7F2-11CE-97ef-00aa006d2776}"
74 #define AX_GUID_SCROLLBAR "{DFD181E0-5E2F-11CE-a449-00aa004a803d}"
75 #define AX_GUID_FRAME "{6E182020-F460-11CE-9bcd-00aa00608e01}"
76 
77 // Html control GUID(s)
78 
79 #define HTML_GUID_SELECT "{5512D122-5CC6-11CF-8d67-00aa00bdce1d}"
80 #define HTML_GUID_TEXTBOX "{5512D124-5CC6-11CF-8d67-00aa00bdce1d}"
81 
82 const sal_uInt32 AX_SYSCOLOR_WINDOWBACK = 0x80000005;
83 const sal_uInt32 AX_SYSCOLOR_WINDOWFRAME = 0x80000006;
84 const sal_uInt32 AX_SYSCOLOR_WINDOWTEXT = 0x80000008;
85 const sal_uInt32 AX_SYSCOLOR_BUTTONFACE = 0x8000000F;
86 const sal_uInt32 AX_SYSCOLOR_BUTTONTEXT = 0x80000012;
87 
88 const sal_uInt32 AX_FLAGS_ENABLED = 0x00000002;
89 const sal_uInt32 AX_FLAGS_LOCKED = 0x00000004;
90 const sal_uInt32 AX_FLAGS_OPAQUE = 0x00000008;
91 const sal_uInt32 AX_FLAGS_COLUMNHEADS = 0x00000400;
92 const sal_uInt32 AX_FLAGS_ENTIREROWS = 0x00000800;
93 const sal_uInt32 AX_FLAGS_EXISTINGENTRIES = 0x00001000;
94 const sal_uInt32 AX_FLAGS_CAPTIONLEFT = 0x00002000;
95 const sal_uInt32 AX_FLAGS_EDITABLE = 0x00004000;
96 const sal_uInt32 AX_FLAGS_IMEMODE_MASK = 0x00078000;
97 const sal_uInt32 AX_FLAGS_DRAGENABLED = 0x00080000;
98 const sal_uInt32 AX_FLAGS_ENTERASNEWLINE = 0x00100000;
99 const sal_uInt32 AX_FLAGS_KEEPSELECTION = 0x00200000;
100 const sal_uInt32 AX_FLAGS_TABASCHARACTER = 0x00400000;
101 const sal_uInt32 AX_FLAGS_WORDWRAP = 0x00800000;
102 const sal_uInt32 AX_FLAGS_BORDERSSUPPRESSED = 0x02000000;
103 const sal_uInt32 AX_FLAGS_SELECTLINE = 0x04000000;
104 const sal_uInt32 AX_FLAGS_SINGLECHARSELECT = 0x08000000;
105 const sal_uInt32 AX_FLAGS_AUTOSIZE = 0x10000000;
106 const sal_uInt32 AX_FLAGS_HIDESELECTION = 0x20000000;
107 const sal_uInt32 AX_FLAGS_MAXLENAUTOTAB = 0x40000000;
108 const sal_uInt32 AX_FLAGS_MULTILINE = 0x80000000;
109 
110 const sal_Int32 AX_BORDERSTYLE_NONE = 0;
111 const sal_Int32 AX_BORDERSTYLE_SINGLE = 1;
112 
113 const sal_Int32 AX_SPECIALEFFECT_FLAT = 0;
114 const sal_Int32 AX_SPECIALEFFECT_RAISED = 1;
115 const sal_Int32 AX_SPECIALEFFECT_SUNKEN = 2;
116 const sal_Int32 AX_SPECIALEFFECT_ETCHED = 3;
117 const sal_Int32 AX_SPECIALEFFECT_BUMPED = 6;
118 
119 const sal_Int32 AX_PICSIZE_CLIP = 0;
120 const sal_Int32 AX_PICSIZE_STRETCH = 1;
121 const sal_Int32 AX_PICSIZE_ZOOM = 3;
122 
123 const sal_Int32 AX_PICALIGN_TOPLEFT = 0;
124 const sal_Int32 AX_PICALIGN_TOPRIGHT = 1;
125 const sal_Int32 AX_PICALIGN_CENTER = 2;
126 const sal_Int32 AX_PICALIGN_BOTTOMLEFT = 3;
127 const sal_Int32 AX_PICALIGN_BOTTOMRIGHT = 4;
128 
129 const sal_Int32 AX_DISPLAYSTYLE_TEXT = 1;
130 const sal_Int32 AX_DISPLAYSTYLE_LISTBOX = 2;
131 const sal_Int32 AX_DISPLAYSTYLE_COMBOBOX = 3;
132 const sal_Int32 AX_DISPLAYSTYLE_CHECKBOX = 4;
133 const sal_Int32 AX_DISPLAYSTYLE_OPTBUTTON = 5;
134 const sal_Int32 AX_DISPLAYSTYLE_TOGGLE = 6;
135 const sal_Int32 AX_DISPLAYSTYLE_DROPDOWN = 7;
136 
137 const sal_Int32 AX_SELECTION_SINGLE = 0;
138 const sal_Int32 AX_SELECTION_MULTI = 1;
139 const sal_Int32 AX_SELECTION_EXTENDED = 2;
140 
141 const sal_Int32 AX_SHOWDROPBUTTON_NEVER = 0;
142 const sal_Int32 AX_SHOWDROPBUTTON_FOCUS = 1;
143 const sal_Int32 AX_SHOWDROPBUTTON_ALWAYS = 2;
144 
145 const sal_Int32 AX_SCROLLBAR_NONE = 0x00;
146 const sal_Int32 AX_SCROLLBAR_HORIZONTAL = 0x01;
147 const sal_Int32 AX_SCROLLBAR_VERTICAL = 0x02;
148 
149 
152 {
171 };
172 
173 
176 {
177  NotSupported,
178  Void,
179 };
180 
183 {
187 };
188 
189 
194 {
195 public:
196  explicit ControlConverter(
197  const css::uno::Reference< css::frame::XModel >& rxDocModel,
198  const GraphicHelper& rGraphicHelper,
199  bool bDefaultColorBgr = true );
200  ~ControlConverter();
201 
202  // Generic conversion -----------------------------------------------------
203 
205  void convertPosition(
206  PropertyMap& rPropMap,
207  const AxPairData& rPos ) const;
208 
210  void convertSize(
211  PropertyMap& rPropMap,
212  const AxPairData& rSize ) const;
213 
215  void convertColor(
216  PropertyMap& rPropMap,
217  sal_Int32 nPropId,
218  sal_uInt32 nOleColor ) const;
219 
220  static void convertToMSColor(
221  PropertySet const & rPropSet,
222  sal_Int32 nPropId,
223  sal_uInt32& nOleColor,
224  sal_uInt32 nDefault = 0 );
225 
226 
228  void convertPicture(
229  PropertyMap& rPropMap,
230  const StreamDataSequence& rPicData ) const;
231 
233  static void convertOrientation(
234  PropertyMap& rPropMap,
235  bool bHorizontal );
236 
237  static void convertToMSOrientation(
238  PropertySet const & rPropMap,
239  bool& bHorizontal );
240 
242  static void convertVerticalAlign(
243  PropertyMap& rPropMap,
244  sal_Int32 nVerticalAlign );
245 
247  static void convertScrollBar(
248  PropertyMap& rPropMap,
249  sal_Int32 nMin, sal_Int32 nMax, sal_Int32 nPosition,
250  sal_Int32 nSmallChange, sal_Int32 nLargeChange, bool bAwtModel );
251 
253  void convertScrollabilitySettings(
254  PropertyMap& rPropMap,
255  const AxPairData& rScrollPos, const AxPairData& rScrollArea,
256  sal_Int32 nScrollBars ) const;
257 
260  void bindToSources(
261  const css::uno::Reference< css::awt::XControlModel >& rxCtrlModel,
262  const OUString& rCtrlSource,
263  const OUString& rRowSource,
264  sal_Int32 nRefSheet = 0 ) const;
265 
266  // ActiveX (Forms 2.0) specific conversion --------------------------------
267 
269  void convertAxBackground(
270  PropertyMap& rPropMap,
271  sal_uInt32 nBackColor,
272  sal_uInt32 nFlags,
273  ApiTransparencyMode eTranspMode ) const;
274 
276  void convertAxBorder(
277  PropertyMap& rPropMap,
278  sal_uInt32 nBorderColor,
279  sal_Int32 nBorderStyle,
280  sal_Int32 nSpecialEffect ) const;
281 
282  static void convertToAxBorder(
283  PropertySet const & rPropSet,
284  sal_uInt32& nBorderColor,
285  sal_Int32& nBorderStyle,
286  sal_Int32& nSpecialEffect );
287 
289  static void convertAxVisualEffect(
290  PropertyMap& rPropMap,
291  sal_Int32 nSpecialEffect );
292 
293  static void convertToAxVisualEffect(
294  PropertySet const & rPropSet,
295  sal_Int32& nSpecialEffect );
296 
299  void convertAxPicture(
300  PropertyMap& rPropMap,
301  const StreamDataSequence& rPicData,
302  sal_uInt32 nPicPos ) const;
303 
306  void convertAxPicture(
307  PropertyMap& rPropMap,
308  const StreamDataSequence& rPicData,
309  sal_Int32 nPicSizeMode ) const;
310 
313  static void convertAxState(
314  PropertyMap& rPropMap,
315  const OUString& rValue,
316  sal_Int32 nMultiSelect,
317  ApiDefaultStateMode eDefStateMode,
318  bool bAwtModel );
319 
320  static void convertToAxState(
321  PropertySet const & rPropSet,
322  OUString& rValue,
323  sal_Int32& nMultiSelect,
324  ApiDefaultStateMode eDefStateMode );
325 
327  static void convertAxOrientation(
328  PropertyMap& rPropMap,
329  const AxPairData& rSize,
330  sal_Int32 nOrientation );
331 
332  static void convertToAxOrientation(
333  PropertySet const & rPropSet,
334  sal_Int32& nOrientation );
335 
336 private:
337  css::uno::Reference< css::frame::XModel > mxDocModel;
342 };
343 
344 
347 {
348 public:
349  explicit ControlModelBase();
350  virtual ~ControlModelBase();
351 
353  void setAwtModelMode() { mbAwtModel = true; }
355  void setFormComponentMode() { mbAwtModel = false; }
356 
359  OUString getServiceName() const;
360 
362  virtual void importProperty( sal_Int32 nPropId, const OUString& rValue );
364  virtual void importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm );
366  virtual bool importBinaryModel( BinaryInputStream& rInStrm ) = 0;
368  virtual void exportBinaryModel( BinaryOutputStream& /*rOutStrm*/ ) {}
370  virtual void exportCompObj( BinaryOutputStream& /*rOutStrm*/ ) {}
372  virtual ApiControlType getControlType() const = 0;
374  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const;
376  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv );
377 
379  void convertSize( PropertyMap& rPropMap, const ControlConverter& rConv ) const;
380 
381 public: // direct access needed for legacy VML drawing controls
383 
384 protected:
385  bool mbAwtModel;
386 };
387 
388 typedef std::shared_ptr< ControlModelBase > ControlModelRef;
389 
390 
393 {
394 public:
395  explicit ComCtlModelBase(
396  sal_uInt32 nDataPartId5, sal_uInt32 nDataPartId6, sal_uInt16 nVersion );
397 
398  virtual bool importBinaryModel( BinaryInputStream& rInStrm ) override;
399  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
400 
401 protected:
402  virtual void importControlData( BinaryInputStream& rInStrm ) = 0;
403 
404 private:
406  sal_uInt32 getDataPartId() const;
407 
408  static bool readPartHeader( BinaryInputStream& rInStrm,
409  sal_uInt32 nExpPartId,
410  sal_uInt16 nExpMajor = SAL_MAX_UINT16,
411  sal_uInt16 nExpMinor = SAL_MAX_UINT16 );
412 
413  bool importSizePart( BinaryInputStream& rInStrm );
414  bool importCommonPart( BinaryInputStream& rInStrm, sal_uInt32 nPartSize );
415  bool importComplexPart( BinaryInputStream& rInStrm );
416 
417 protected:
420  sal_uInt32 mnFlags;
421  const sal_uInt16 mnVersion;
422 
423 private:
424  sal_uInt32 mnDataPartId5;
425  sal_uInt32 mnDataPartId6;
428 };
429 
430 
433 {
434 public:
435  explicit ComCtlScrollBarModel( sal_uInt16 nVersion );
436 
437  virtual ApiControlType getControlType() const override;
438  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
439 
440 private:
441  virtual void importControlData( BinaryInputStream& rInStrm ) override;
442 
443  sal_uInt32 mnScrollBarFlags;
444  sal_Int32 mnLargeChange;
445  sal_Int32 mnSmallChange;
446  sal_Int32 mnMin;
447  sal_Int32 mnMax;
448  sal_Int32 mnPosition;
449 };
450 
451 
454 {
455 public:
456  explicit ComCtlProgressBarModel( sal_uInt16 nVersion );
457 
458  virtual ApiControlType getControlType() const override;
459  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
460 
461 private:
462  virtual void importControlData( BinaryInputStream& rInStrm ) override;
463 
464  float mfMin;
465  float mfMax;
466  sal_uInt16 mnVertical;
467  sal_uInt16 mnSmooth;
468 };
469 
470 
473 {
474 public:
475  explicit AxControlModelBase();
476 
477  virtual void importProperty( sal_Int32 nPropId, const OUString& rValue ) override;
478 };
479 
480 
483 {
484 public:
485  explicit AxFontDataModel( bool bSupportsAlign = true );
486 
487  virtual void importProperty( sal_Int32 nPropId, const OUString& rValue ) override;
488  virtual bool importBinaryModel( BinaryInputStream& rInStrm ) override;
489  virtual void exportBinaryModel( BinaryOutputStream& rOutStrm ) override;
490  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
491  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) override;
492 
494  sal_Int16 getFontHeight() const { return maFontData.getHeightPoints(); }
495 
496 public: // direct access needed for legacy VML drawing controls
498 
499 private:
501 };
502 
503 
506 {
507 public:
508  explicit AxCommandButtonModel();
509 
510  virtual void importProperty( sal_Int32 nPropId, const OUString& rValue ) override;
511  virtual void importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm ) override;
512  virtual bool importBinaryModel( BinaryInputStream& rInStrm ) override;
513  virtual void exportBinaryModel( BinaryOutputStream& rOutStrm ) override;
514  virtual void exportCompObj( BinaryOutputStream& rOutStrm ) override;
515 
516  virtual ApiControlType getControlType() const override;
517  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
518  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) override;
519 
520 public: // direct access needed for legacy VML drawing controls
522  OUString maCaption;
523  sal_uInt32 mnTextColor;
524  sal_uInt32 mnBackColor;
525  sal_uInt32 mnFlags;
526  sal_uInt32 mnPicturePos;
527  sal_Int32 mnVerticalAlign;
529 };
530 
531 
534 {
535 public:
536  explicit AxLabelModel();
537 
538  virtual void importProperty( sal_Int32 nPropId, const OUString& rValue ) override;
539  virtual bool importBinaryModel( BinaryInputStream& rInStrm ) override;
540  virtual void exportBinaryModel( BinaryOutputStream& rOutStrm ) override;
541  virtual void exportCompObj( BinaryOutputStream& rOutStrm ) override;
542 
543  virtual ApiControlType getControlType() const override;
544  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
545  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) override;
546 
547 public: // direct access needed for legacy VML drawing controls
548  OUString maCaption;
549  sal_uInt32 mnTextColor;
550  sal_uInt32 mnBackColor;
551  sal_uInt32 mnFlags;
552  sal_uInt32 mnBorderColor;
553  sal_Int32 mnBorderStyle;
554  sal_Int32 mnSpecialEffect;
555  sal_Int32 mnVerticalAlign;
556 };
557 
558 
561 {
562 public:
563  explicit AxImageModel();
564 
565  virtual void importProperty( sal_Int32 nPropId, const OUString& rValue ) override;
566  virtual void importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm ) override;
567  virtual bool importBinaryModel( BinaryInputStream& rInStrm ) override;
568  virtual void exportBinaryModel( BinaryOutputStream& rOutStrm ) override;
569  virtual void exportCompObj( BinaryOutputStream& rOutStrm ) override;
570 
571  virtual ApiControlType getControlType() const override;
572  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
573 
574 private:
576  sal_uInt32 mnBackColor;
577  sal_uInt32 mnFlags;
578  sal_uInt32 mnBorderColor;
579  sal_Int32 mnBorderStyle;
580  sal_Int32 mnSpecialEffect;
581  sal_Int32 mnPicSizeMode;
582  sal_Int32 mnPicAlign;
583  bool mbPicTiling;
584 };
585 
587 {
588 public:
589  explicit AxTabStripModel();
590 
591  virtual bool importBinaryModel( BinaryInputStream& rInStrm ) override;
592 
593  virtual ApiControlType getControlType() const override;
594 
595 public:
596  sal_uInt32 mnListIndex;
597  sal_uInt32 mnTabStyle;
598  sal_uInt32 mnTabData;
600  std::vector< OUString > maItems; // captions for each tab
601  std::vector< OUString > maTabNames; // names for each tab
602 };
603 
604 
607 {
608 public:
609  explicit AxMorphDataModelBase();
610 
611  virtual void importProperty( sal_Int32 nPropId, const OUString& rValue ) override;
612  virtual void importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm ) override;
613  virtual bool importBinaryModel( BinaryInputStream& rInStrm ) override;
614  virtual void exportBinaryModel( BinaryOutputStream& rOutStrm ) override;
615  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
616  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) override;
617 
618 public: // direct access needed for legacy VML drawing controls
620  OUString maCaption;
621  OUString maValue;
622  OUString maGroupName;
623  sal_uInt32 mnTextColor;
624  sal_uInt32 mnBackColor;
625  sal_uInt32 mnFlags;
626  sal_uInt32 mnPicturePos;
627  sal_uInt32 mnBorderColor;
628  sal_Int32 mnBorderStyle;
629  sal_Int32 mnSpecialEffect;
630  sal_Int32 mnDisplayStyle;
631  sal_Int32 mnMultiSelect;
632  sal_Int32 mnScrollBars;
633  sal_Int32 mnMatchEntry;
634  sal_Int32 mnShowDropButton;
635  sal_Int32 mnMaxLength;
636  sal_Int32 mnPasswordChar;
637  sal_Int32 mnListRows;
638  sal_Int32 mnVerticalAlign;
639 };
640 
641 
644 {
645 public:
646  explicit AxToggleButtonModel();
647 
648  virtual ApiControlType getControlType() const override;
649  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
650  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) override;
651  virtual void exportCompObj( BinaryOutputStream& rOutStrm ) override;
652 };
653 
654 
657 {
658 public:
659  explicit AxCheckBoxModel();
660 
661  virtual ApiControlType getControlType() const override;
662  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
663  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) override;
664  virtual void exportCompObj( BinaryOutputStream& rOutStrm ) override;
665 };
666 
667 
670 {
671 public:
672  explicit AxOptionButtonModel();
673 
675  const OUString& getGroupName() const { return maGroupName; }
676 
677  virtual ApiControlType getControlType() const override;
678  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
679  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) override;
680  virtual void exportCompObj( BinaryOutputStream& rOutStrm ) override;
681 };
682 
683 
686 {
687 public:
688  explicit AxTextBoxModel();
689 
690  virtual ApiControlType getControlType() const override;
691  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
692  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) override;
693  virtual void exportCompObj( BinaryOutputStream& rOutStrm ) override;
694 };
695 
696 
699 {
700 public:
701  explicit AxNumericFieldModel();
702 
703  virtual ApiControlType getControlType() const override;
704  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
705  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) override;
706  virtual void exportCompObj( BinaryOutputStream& rOutStrm ) override;
707 };
708 
709 
712 {
713 public:
714  explicit AxListBoxModel();
715 
716  virtual ApiControlType getControlType() const override;
717  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
718  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) override;
719  virtual void exportCompObj( BinaryOutputStream& rOutStrm ) override;
720 };
721 
722 
725 {
726 public:
727  explicit AxComboBoxModel();
728 
729  virtual ApiControlType getControlType() const override;
730  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
731  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) override;
732  virtual void exportCompObj( BinaryOutputStream& rOutStrm ) override;
733 };
734 
735 
738 {
739 public:
740  explicit AxSpinButtonModel();
741 
742  virtual void importProperty( sal_Int32 nPropId, const OUString& rValue ) override;
743  virtual bool importBinaryModel( BinaryInputStream& rInStrm ) override;
744  virtual void exportBinaryModel( BinaryOutputStream& rOutStrm ) override;
745 
746  virtual ApiControlType getControlType() const override;
747  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
748  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) override;
749  virtual void exportCompObj( BinaryOutputStream& rOutStrm ) override;
750 
751 public: // direct access needed for legacy VML drawing controls
752  sal_uInt32 mnArrowColor;
753  sal_uInt32 mnBackColor;
754  sal_uInt32 mnFlags;
755  sal_Int32 mnOrientation;
756  sal_Int32 mnMin;
757  sal_Int32 mnMax;
758  sal_Int32 mnPosition;
759  sal_Int32 mnSmallChange;
760  sal_Int32 mnDelay;
761 };
762 
763 
766 {
767 public:
768  explicit AxScrollBarModel();
769 
770  virtual void importProperty( sal_Int32 nPropId, const OUString& rValue ) override;
771  virtual bool importBinaryModel( BinaryInputStream& rInStrm ) override;
772  virtual void exportBinaryModel( BinaryOutputStream& rOutStrm ) override;
773  virtual void exportCompObj( BinaryOutputStream& rOutStrm ) override;
774 
775  virtual ApiControlType getControlType() const override;
776  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
777  virtual void convertFromProperties( PropertySet& rPropSet, const ControlConverter& rConv ) override;
778 
779 public: // direct access needed for legacy VML drawing controls
780  sal_uInt32 mnArrowColor;
781  sal_uInt32 mnBackColor;
782  sal_uInt32 mnFlags;
783  sal_Int32 mnOrientation;
784  sal_Int32 mnPropThumb;
785  sal_Int32 mnMin;
786  sal_Int32 mnMax;
787  sal_Int32 mnPosition;
788  sal_Int32 mnSmallChange;
789  sal_Int32 mnLargeChange;
790  sal_Int32 mnDelay;
791 };
792 
793 
794 typedef ::std::vector< OUString > AxClassTable;
795 
798 {
799 public:
800  explicit AxContainerModelBase( bool bFontSupport = false );
801 
803  virtual void importProperty( sal_Int32 nPropId, const OUString& rValue ) override;
806  virtual bool importBinaryModel( BinaryInputStream& rInStrm ) override;
808  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
809 
812  bool importClassTable( BinaryInputStream& rInStrm, AxClassTable& orClassTable );
813 
814 public: // direct access needed for legacy VML drawing controls
816  OUString maCaption;
819  sal_uInt32 mnBackColor;
820  sal_uInt32 mnTextColor;
821  sal_uInt32 mnFlags;
822  sal_uInt32 mnBorderColor;
823  sal_Int32 mnBorderStyle;
824  sal_Int32 mnScrollBars;
825  sal_Int32 mnCycleType;
826  sal_Int32 mnSpecialEffect;
827  sal_Int32 mnPicAlign;
828  sal_Int32 mnPicSizeMode;
829  bool mbPicTiling;
831 };
832 
833 
836 {
837 public:
838  explicit AxFrameModel();
839 
840  virtual ApiControlType getControlType() const override;
841  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
842 };
843 
845 {
846 public:
847  explicit AxPageModel();
848 
849  virtual ApiControlType getControlType() const override;
850  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
851 };
852 
854 {
855 public:
856  explicit AxMultiPageModel();
857 
858  virtual ApiControlType getControlType() const override;
859  void importPageAndMultiPageProperties( BinaryInputStream& rInStrm, sal_Int32 nPages );
860  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
861  std::vector<sal_uInt32> mnIDs;
862  sal_uInt32 mnActiveTab;
863  sal_uInt32 mnTabStyle;
864 };
865 
866 
869 {
870 public:
871  explicit AxUserFormModel();
872 
873  virtual ApiControlType getControlType() const override;
874  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
875 };
876 
877 class HtmlSelectModel final : public AxListBoxModel
878 {
879  css::uno::Sequence< OUString > msListData;
880  css::uno::Sequence< sal_Int16 > msIndices;
881 public:
882  HtmlSelectModel();
883  virtual bool importBinaryModel( BinaryInputStream& rInStrm ) override;
884  virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const override;
885 };
886 
887 class HtmlTextBoxModel final : public AxTextBoxModel
888 {
889 public:
890  explicit HtmlTextBoxModel();
891  virtual bool importBinaryModel( BinaryInputStream& rInStrm ) override;
892 };
893 
894 
898 {
899 public:
900  explicit EmbeddedControl( const OUString& rName );
901 
903  template< typename ModelType >
904  inline ModelType& createModel();
905 
907  template< typename ModelType, typename ParamType >
908  inline ModelType& createModel( const ParamType& rParam );
909 
912  ControlModelBase* createModelFromGuid( const OUString& rClassId );
913 
915  bool hasModel() const { return bool(mxModel); }
917  const ControlModelBase* getModel() const { return mxModel.get(); }
919  ControlModelBase* getModel() { return mxModel.get(); }
920 
922  OUString getServiceName() const;
923 
925  bool convertProperties(
926  const css::uno::Reference< css::awt::XControlModel >& rxCtrlModel,
927  const ControlConverter& rConv ) const;
928 
929  void convertFromProperties(
930  const css::uno::Reference< css::awt::XControlModel >& rxCtrlModel,
931  const ControlConverter& rConv );
932 
933 private:
934  ControlModelRef mxModel;
935  OUString maName;
936 };
937 
938 
939 template< typename ModelType >
940 inline ModelType& EmbeddedControl::createModel()
941 {
942  auto xModel = std::make_shared<ModelType>();
943  mxModel = xModel;
944  xModel->setFormComponentMode();
945  return *xModel;
946 }
947 
948 template< typename ModelType, typename ParamType >
949 inline ModelType& EmbeddedControl::createModel( const ParamType& rParam )
950 {
951  auto xModel = std::make_shared<ModelType>( rParam );
952  mxModel = xModel;
953  xModel->setFormComponentMode();
954  return *xModel;
955 }
956 
957 
960 {
961 public:
962  explicit EmbeddedForm(
963  const css::uno::Reference< css::frame::XModel >& rxDocModel,
964  const css::uno::Reference< css::drawing::XDrawPage >& rxDrawPage,
965  const GraphicHelper& rGraphicHelper );
966 
969  css::uno::Reference< css::awt::XControlModel >
970  convertAndInsert( const EmbeddedControl& rControl, sal_Int32& rnCtrlIndex );
971 
973  const css::uno::Reference< css::container::XIndexContainer >&
974  getXForm() const { return mxFormIC; }
975 
976 private:
978  css::uno::Reference< css::container::XIndexContainer > const &
979  createXForm();
980 
981 private:
983  css::uno::Reference< css::lang::XMultiServiceFactory > mxModelFactory;
984  css::uno::Reference< css::form::XFormsSupplier > mxFormsSupp;
985  css::uno::Reference< css::container::XIndexContainer > mxFormIC;
986 };
987 
988 
989 } // namespace oox::ole
990 
991 #endif
992 
993 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool mbSupportsAlign
True = UNO model supports Align property.
Definition: axcontrol.hxx:500
sal_Int32 mnSmallChange
Increment step size (buttons).
Definition: axcontrol.hxx:788
OUString maCaption
Visible caption of the button.
Definition: axcontrol.hxx:548
sal_uInt32 mnFlags
Various flags.
Definition: axcontrol.hxx:625
Provides helper functions for colors, device measurement conversion, graphics, and graphic objects ha...
Model for a Forms 2.0 list box.
Definition: axcontrol.hxx:711
ComCtlProgressBarModel(sal_uInt16 nVersion)
Definition: axcontrol.cxx:797
void setAwtModelMode()
Sets this control model to AWT model mode.
Definition: axcontrol.hxx:353
sal_Int32 mnVerticalAlign
Vertical alignment (legacy VML drawing controls only).
Definition: axcontrol.hxx:638
sal_Int32 mnShowDropButton
When to show the dropdown button.
Definition: axcontrol.hxx:634
sal_uInt32 mnArrowColor
Button arrow color.
Definition: axcontrol.hxx:780
StreamDataSequence maPictureData
Binary picture stream.
Definition: axcontrol.hxx:575
A helper that maps property identifiers to property values.
Definition: propertymap.hxx:52
ModelType & createModel()
Creates and returns the internal control model of the specified type.
Definition: axcontrol.hxx:940
Base class for a Forms 2.0 morph data control.
Definition: axcontrol.hxx:606
sal_Int32 mnDisplayStyle
Type of the morph control.
Definition: axcontrol.hxx:630
const sal_Int32 AX_DISPLAYSTYLE_OPTBUTTON
Definition: axcontrol.hxx:133
const sal_Int32 AX_BORDERSTYLE_SINGLE
Definition: axcontrol.hxx:111
ControlConverter maControlConv
Definition: axcontrol.hxx:982
sal_Int16 getFontHeight() const
Returns the font height in points.
Definition: axcontrol.hxx:494
sal_uInt32 mnFlags
Various flags.
Definition: axcontrol.hxx:821
const sal_uInt32 AX_FLAGS_OPAQUE
Definition: axcontrol.hxx:90
A wrapper for a control form embedded directly in a draw page.
Definition: axcontrol.hxx:959
const sal_uInt32 AX_FLAGS_TABASCHARACTER
Definition: axcontrol.hxx:100
const sal_Int32 AX_SPECIALEFFECT_SUNKEN
Definition: axcontrol.hxx:115
bool mbCommonPart
True = the COMCTL_COMMONDATA part exists.
Definition: axcontrol.hxx:426
sal_Int32 mnPasswordChar
Password character in edit fields.
Definition: axcontrol.hxx:636
const sal_Int32 AX_PICSIZE_STRETCH
Definition: axcontrol.hxx:120
ApiDefaultStateMode
Specifies how a form control supports the DefaultState property.
Definition: axcontrol.hxx:182
const sal_uInt32 AX_FLAGS_CAPTIONLEFT
Definition: axcontrol.hxx:94
StreamDataSequence maPictureData
Binary picture stream.
Definition: axcontrol.hxx:815
std::vector< sal_uInt32 > mnIDs
Definition: axcontrol.hxx:861
Model for a ComCtl progress bar.
Definition: axcontrol.hxx:453
void setFormComponentMode()
Sets this control model to form component mode.
Definition: axcontrol.hxx:355
AxFontData maFontData
The font settings.
Definition: axcontrol.hxx:497
Transparency is enabled by missing fill color.
sal_uInt32 mnTextColor
Text color.
Definition: axcontrol.hxx:523
Model for a Forms 2.0 combo box.
Definition: axcontrol.hxx:724
bool mbComplexPart
True = the COMCTL_COMPLEXDATA part exists.
Definition: axcontrol.hxx:427
sal_Int32 mnSmallChange
Increment step size (buttons).
Definition: axcontrol.hxx:445
Model for a Forms 2.0 option button.
Definition: axcontrol.hxx:669
sal_uInt32 mnFlags
Various flags.
Definition: axcontrol.hxx:577
const sal_Int32 AX_SCROLLBAR_HORIZONTAL
Definition: axcontrol.hxx:146
exports com.sun.star. awt
Model for a Forms 2.0 frame control.
Definition: axcontrol.hxx:835
const sal_uInt32 AX_FLAGS_ENABLED
Definition: axcontrol.hxx:88
const sal_Int32 AX_SHOWDROPBUTTON_ALWAYS
Definition: axcontrol.hxx:143
::std::pair< sal_Int32, sal_Int32 > AxPairData
A pair of integer values as a property.
css::uno::Reference< css::frame::XModel2 > mxModel
sal_uInt32 mnDataPartId5
Identifier for version 5.0 control data.
Definition: axcontrol.hxx:424
const sal_uInt32 AX_FLAGS_KEEPSELECTION
Definition: axcontrol.hxx:99
sal_Int32 mnVerticalAlign
Vertical alignment (legacy VML drawing controls only).
Definition: axcontrol.hxx:555
bool importSizePart(BinaryInputStream &rInStrm)
Definition: axcontrol.cxx:726
const OUString & getGroupName() const
Returns the group name used to goup several option buttons together.
Definition: axcontrol.hxx:675
bool mbAwtModel
True = AWT control model, false = form component.
Definition: axcontrol.hxx:385
const sal_Int32 AX_PICSIZE_CLIP
Definition: axcontrol.hxx:119
const sal_Int32 AX_SPECIALEFFECT_ETCHED
Definition: axcontrol.hxx:116
const sal_uInt32 AX_FLAGS_SELECTLINE
Definition: axcontrol.hxx:103
virtual void exportBinaryModel(BinaryOutputStream &)
Derived classes export a form control model to the passed output stream.
Definition: axcontrol.hxx:368
const sal_uInt32 AX_FLAGS_SINGLECHARSELECT
Definition: axcontrol.hxx:104
sal_Int32 mnPicSizeMode
Clip, stretch, zoom.
Definition: axcontrol.hxx:828
bool mbFocusOnClick
True = take focus on click.
Definition: axcontrol.hxx:528
sal_Int32 mnVerticalAlign
Vertical alignment (legacy VML drawing controls only).
Definition: axcontrol.hxx:527
sal_Int32 mnOrientation
Orientation of the buttons.
Definition: axcontrol.hxx:783
sal_uInt32 mnFlags
Common flags for ComCtl controls.
Definition: axcontrol.hxx:420
sal_Int32 mnCycleType
Cycle in all forms or in this form.
Definition: axcontrol.hxx:825
Interface for binary output stream classes.
sal_Int32 mnPosition
Value of the spin button.
Definition: axcontrol.hxx:787
const sal_Int32 AX_SCROLLBAR_NONE
Definition: axcontrol.hxx:145
const sal_uInt32 AX_SYSCOLOR_BUTTONTEXT
Definition: axcontrol.hxx:86
sal_Int32 mnPicAlign
Anchor position of the picture.
Definition: axcontrol.hxx:582
static bool readPartHeader(BinaryInputStream &rInStrm, sal_uInt32 nExpPartId, sal_uInt16 nExpMajor=SAL_MAX_UINT16, sal_uInt16 nExpMinor=SAL_MAX_UINT16)
Definition: axcontrol.cxx:713
bool mbFontSupport
True = control supports the font property.
Definition: axcontrol.hxx:830
const sal_uInt32 AX_SYSCOLOR_WINDOWBACK
Definition: axcontrol.hxx:82
All entries of a font property.
Definition: axfontdata.hxx:53
exports com.sun.star. container
A form control embedded in a document draw page.
Definition: axcontrol.hxx:897
sal_uInt32 getDataPartId() const
Returns the data part identifier according to the model version.
Definition: axcontrol.cxx:702
const sal_Int32 AX_PICALIGN_CENTER
Definition: axcontrol.hxx:125
const sal_Int32 AX_PICSIZE_ZOOM
Definition: axcontrol.hxx:121
bool mbPicTiling
True = picture is repeated.
Definition: axcontrol.hxx:583
ApiControlType
Enumerates all UNO API control types supported by these filters.
Definition: axcontrol.hxx:151
sal_uInt16 mnSmooth
0 = progress blocks, 1 = pixel resolution.
Definition: axcontrol.hxx:467
Model for a Forms 2.0 label.
Definition: axcontrol.hxx:533
::std::vector< OUString > AxClassTable
Definition: axcontrol.hxx:794
sal_Int32 mnPicSizeMode
Clip, stretch, zoom.
Definition: axcontrol.hxx:581
exports com.sun.star. frame
#define SAL_MAX_UINT16
ControlModelRef mxModel
Control model containing the properties.
Definition: axcontrol.hxx:934
const sal_Int32 AX_PICALIGN_BOTTOMLEFT
Definition: axcontrol.hxx:126
sal_Int32 mnSpecialEffect
3D border effect.
Definition: axcontrol.hxx:580
OUString maCaption
Visible caption of the button.
Definition: axcontrol.hxx:522
sal_Int32 mnSpecialEffect
3D border effect.
Definition: axcontrol.hxx:554
StreamDataSequence maPictureData
Binary picture stream.
Definition: axcontrol.hxx:521
Model for a Forms 2.0 spin button.
Definition: axcontrol.hxx:737
float mfMax
Maximum of the value range.
Definition: axcontrol.hxx:465
Base class for all models of ComCtl form controls.
Definition: axcontrol.hxx:392
exports com.sun.star. drawing
const sal_Int32 AX_DISPLAYSTYLE_TEXT
Definition: axcontrol.hxx:129
Control does not support tri-state, state is given as boolean.
Definition: axcontrol.hxx:184
Model for a numeric field (legacy drawing controls only).
Definition: axcontrol.hxx:698
sal_Int32 mnListRows
Number of rows in dropdown box.
Definition: axcontrol.hxx:637
sal_Int32 mnMin
Minimum of the value range.
Definition: axcontrol.hxx:756
StreamDataSequence maMouseIcon
Binary picture stream for mouse icon.
Definition: axcontrol.hxx:419
PropertySet maAddressConverter
Definition: axcontrol.hxx:339
const sal_Int32 AX_SHOWDROPBUTTON_FOCUS
Definition: axcontrol.hxx:142
std::map< sal_Int32, STLPropertyMapEntry > PropertyMap
virtual void convertProperties(PropertyMap &rPropMap, const ControlConverter &rConv) const override
Derived classes convert all control properties.
Definition: axcontrol.cxx:2636
sal_Int32 mnLargeChange
Increment step size (thumb).
Definition: axcontrol.hxx:789
css::uno::Reference< css::form::XFormsSupplier > mxFormsSupp
Definition: axcontrol.hxx:984
const sal_uInt32 AX_FLAGS_MAXLENAUTOTAB
Definition: axcontrol.hxx:107
Model for a Forms 2.0 toggle button.
Definition: axcontrol.hxx:643
sal_Int32 mnOrientation
Orientation of the buttons.
Definition: axcontrol.hxx:755
Interface for binary input stream classes.
Model for a Forms 2.0 user form.
Definition: axcontrol.hxx:868
sal_uInt32 mnDataPartId6
Identifier for version 6.0 control data.
Definition: axcontrol.hxx:425
StreamDataSequence maPictureData
Binary picture stream.
Definition: axcontrol.hxx:619
virtual bool importBinaryModel(BinaryInputStream &rInStrm) override
Derived classes import a form control model from the passed input stream.
Definition: axcontrol.cxx:2573
sal_Int32 mnScrollBars
Horizontal/vertical scroll bar.
Definition: axcontrol.hxx:824
sal_Int32 mnPropThumb
Proportional thumb size.
Definition: axcontrol.hxx:784
sal_Int32 mnSmallChange
Increment step size.
Definition: axcontrol.hxx:759
virtual ApiControlType getControlType() const override
Derived classes return the UNO control type enum value.
Definition: axcontrol.cxx:774
const GraphicHelper & mrGraphicHelper
Definition: axcontrol.hxx:338
css::uno::Sequence< sal_Int8 > StreamDataSequence
sal_uInt32 mnBackColor
Fill color.
Definition: axcontrol.hxx:624
StdFontInfo maFontData
Font formatting.
Definition: axcontrol.hxx:418
A base class with useful helper functions for something that is able to convert ActiveX and ComCtl fo...
Definition: axcontrol.hxx:193
const sal_Int32 AX_SHOWDROPBUTTON_NEVER
Definition: axcontrol.hxx:141
sal_uInt32 mnTextColor
Text color.
Definition: axcontrol.hxx:820
const sal_Int32 AX_PICALIGN_TOPRIGHT
Definition: axcontrol.hxx:124
Model for a Forms 2.0 text box.
Definition: axcontrol.hxx:685
virtual ApiControlType getControlType() const override
Derived classes return the UNO control type enum value.
Definition: axcontrol.cxx:806
virtual bool importBinaryModel(BinaryInputStream &rInStrm) override
Derived classes import a form control model from the passed input stream.
Definition: axcontrol.cxx:673
const sal_Int32 AX_SCROLLBAR_VERTICAL
Definition: axcontrol.hxx:147
const sal_Int32 AX_BORDERSTYLE_NONE
Definition: axcontrol.hxx:110
sal_uInt32 mnVariousPropertyBits
Definition: axcontrol.hxx:599
sal_Int32 mnDelay
Repeat delay in milliseconds.
Definition: axcontrol.hxx:790
OUString maCaption
Visible caption of the button.
Definition: axcontrol.hxx:620
const sal_uInt32 AX_SYSCOLOR_BUTTONFACE
Definition: axcontrol.hxx:85
OUString maName
Name of the control.
Definition: axcontrol.hxx:935
Base class for Forms 2.0 controls supporting text formatting.
Definition: axcontrol.hxx:482
bool hasModel() const
Returns true, if the internal control model exists.
Definition: axcontrol.hxx:915
sal_uInt32 mnPicturePos
Position of the picture relative to text.
Definition: axcontrol.hxx:626
sal_Int32 mnMin
Minimum of the value range.
Definition: axcontrol.hxx:785
const sal_uInt32 AX_FLAGS_HIDESELECTION
Definition: axcontrol.hxx:106
css::uno::Reference< css::lang::XMultiServiceFactory > mxModelFactory
Definition: axcontrol.hxx:983
const sal_Int32 AX_SPECIALEFFECT_FLAT
Definition: axcontrol.hxx:113
sal_Int32 mnPosition
Value of the spin button.
Definition: axcontrol.hxx:758
Model for a Forms 2.0 check box.
Definition: axcontrol.hxx:656
ParamType
const sal_uInt32 AX_FLAGS_MULTILINE
Definition: axcontrol.hxx:108
sal_Int32 mnScrollBars
Horizontal/vertical scroll bar.
Definition: axcontrol.hxx:632
const sal_uInt32 AX_SYSCOLOR_WINDOWFRAME
Definition: axcontrol.hxx:83
A wrapper for a UNO property set.
Definition: propertyset.hxx:57
AxPairData maSize
Size of the control in 1/100 mm.
Definition: axcontrol.hxx:382
sal_uInt32 mnPicturePos
Position of the picture relative to text.
Definition: axcontrol.hxx:526
const sal_Int32 AX_SELECTION_MULTI
Definition: axcontrol.hxx:138
sal_Int16 nVersion
const sal_uInt32 AX_FLAGS_LOCKED
Definition: axcontrol.hxx:89
sal_Int32 mnMax
Maximum of the value range.
Definition: axcontrol.hxx:786
sal_uInt32 mnFlags
Various flags.
Definition: axcontrol.hxx:782
const sal_Int32 AX_DISPLAYSTYLE_COMBOBOX
Definition: axcontrol.hxx:131
const sal_Int32 AX_SELECTION_SINGLE
Definition: axcontrol.hxx:137
AxPairData maLogicalSize
Logical form size (scroll area).
Definition: axcontrol.hxx:817
sal_Int32 mnMultiSelect
Selection mode.
Definition: axcontrol.hxx:631
const sal_uInt16 COMCTL_VERSION_50
Definition: axcontrol.hxx:60
sal_uInt32 mnFlags
Various flags.
Definition: axcontrol.hxx:525
sal_uInt32 mnFlags
Various flags.
Definition: axcontrol.hxx:754
sal_Int32 mnMatchEntry
Auto completion mode.
Definition: axcontrol.hxx:633
const sal_uInt16 COMCTL_VERSION_60
Definition: axcontrol.hxx:61
const sal_Int32 AX_DISPLAYSTYLE_CHECKBOX
Definition: axcontrol.hxx:132
sal_Int32 mnBorderStyle
Flat border style.
Definition: axcontrol.hxx:579
exports com.sun.star. form
Base class for all models of form controls.
Definition: axcontrol.hxx:346
sal_Int32 mnBorderStyle
Flat border style.
Definition: axcontrol.hxx:553
sal_Int32 mnSpecialEffect
3D border effect.
Definition: axcontrol.hxx:826
sal_Int32 mnMax
Maximum of the value range.
Definition: axcontrol.hxx:447
const sal_Int32 AX_SPECIALEFFECT_RAISED
Definition: axcontrol.hxx:114
sal_uInt32 mnTextColor
Text color.
Definition: axcontrol.hxx:549
Base class for ActiveX container controls.
Definition: axcontrol.hxx:797
OUString maGroupName
Group name for option buttons.
Definition: axcontrol.hxx:622
sal_uInt32 mnBorderColor
Flat border color.
Definition: axcontrol.hxx:822
Stores data about a StdFont font structure.
Definition: olehelper.hxx:68
const sal_uInt16 mnVersion
Current version of the ComCtl control model.
Definition: axcontrol.hxx:421
OUString maValue
Current value of the control.
Definition: axcontrol.hxx:621
const sal_uInt32 AX_FLAGS_EDITABLE
Definition: axcontrol.hxx:95
AxPairData maScrollPos
Scroll position.
Definition: axcontrol.hxx:818
virtual void convertProperties(PropertyMap &rPropMap, const ControlConverter &rConv) const override
Derived classes convert all control properties.
Definition: axcontrol.cxx:811
const sal_uInt32 AX_FLAGS_IMEMODE_MASK
Definition: axcontrol.hxx:96
const sal_Int32 AX_SELECTION_EXTENDED
Definition: axcontrol.hxx:139
css::uno::Reference< css::awt::XControlModel > convertAndInsert(const EmbeddedControl &rControl, sal_Int32 &rnCtrlIndex)
Converts the passed control and inserts the control model into the form.
Definition: axcontrol.cxx:2735
const sal_uInt32 AX_FLAGS_ENTERASNEWLINE
Definition: axcontrol.hxx:98
ApiTransparencyMode
Specifies how a form control supports transparent background.
Definition: axcontrol.hxx:175
css::uno::Reference< css::frame::XModel > mxDocModel
Definition: axcontrol.hxx:337
sal_uInt32 mnBackColor
Fill color.
Definition: axcontrol.hxx:781
OUString maCaption
Visible caption of the form.
Definition: axcontrol.hxx:816
virtual void exportCompObj(BinaryOutputStream &)
Derived classes export CompObjStream contents.
Definition: axcontrol.hxx:370
sal_uInt32 mnBackColor
Fill color.
Definition: axcontrol.hxx:753
exports com.sun.star. lang
Model for a Forms 2.0 image.
Definition: axcontrol.hxx:560
ComCtlScrollBarModel(sal_uInt16 nVersion)
Definition: axcontrol.cxx:763
sal_Int32 mnPicAlign
Anchor position of the picture.
Definition: axcontrol.hxx:827
EmbeddedForm(const css::uno::Reference< css::frame::XModel > &rxDocModel, const css::uno::Reference< css::drawing::XDrawPage > &rxDrawPage, const GraphicHelper &rGraphicHelper)
Definition: axcontrol.cxx:2726
sal_Int32 mnBorderStyle
Flat border style.
Definition: axcontrol.hxx:823
const sal_uInt32 AX_SYSCOLOR_WINDOWTEXT
Definition: axcontrol.hxx:84
sal_Int32 mnMax
Maximum of the value range.
Definition: axcontrol.hxx:757
const sal_uInt32 AX_FLAGS_COLUMNHEADS
Definition: axcontrol.hxx:91
const sal_Int32 AX_DISPLAYSTYLE_LISTBOX
Definition: axcontrol.hxx:130
css::uno::Reference< css::container::XIndexContainer > mxFormIC
Definition: axcontrol.hxx:985
sal_Int32 mnSpecialEffect
3D border effect.
Definition: axcontrol.hxx:629
sal_Int32 mnMin
Minimum of the value range.
Definition: axcontrol.hxx:446
sal_uInt32 mnScrollBarFlags
Special flags for scroll bar model.
Definition: axcontrol.hxx:443
const sal_uInt32 AX_FLAGS_WORDWRAP
Definition: axcontrol.hxx:101
const sal_Int32 AX_SPECIALEFFECT_BUMPED
Definition: axcontrol.hxx:117
sal_uInt32 mnBackColor
Fill color.
Definition: axcontrol.hxx:550
ControlModelBase * getModel()
Returns read/write access to the internal control model.
Definition: axcontrol.hxx:919
Base class for all models of Form 2.0 form controls.
Definition: axcontrol.hxx:472
#define OOX_DLLPUBLIC
Definition: dllapi.h:28
sal_uInt32 mnBorderColor
Flat border color.
Definition: axcontrol.hxx:552
const sal_uInt32 AX_FLAGS_BORDERSSUPPRESSED
Definition: axcontrol.hxx:102
Control does not support transparency.
const sal_uInt32 AX_FLAGS_ENTIREROWS
Definition: axcontrol.hxx:92
virtual void importControlData(BinaryInputStream &rInStrm) override
Definition: axcontrol.cxx:822
std::shared_ptr< ControlModelBase > ControlModelRef
Definition: axcontrol.hxx:388
std::vector< OUString > maTabNames
Definition: axcontrol.hxx:601
const sal_Int32 AX_DISPLAYSTYLE_TOGGLE
Definition: axcontrol.hxx:134
bool importComplexPart(BinaryInputStream &rInStrm)
Definition: axcontrol.cxx:750
Reference< XModel > xModel
sal_Int32 mnBorderStyle
Flat border style.
Definition: axcontrol.hxx:628
bool importCommonPart(BinaryInputStream &rInStrm, sal_uInt32 nPartSize)
Definition: axcontrol.cxx:737
virtual bool importBinaryModel(BinaryInputStream &rInStrm) override
Derived classes import a form control model from the passed input stream.
Definition: axcontrol.cxx:2649
sal_uInt32 mnFlags
Various flags.
Definition: axcontrol.hxx:551
ComCtlModelBase(sal_uInt32 nDataPartId5, sal_uInt32 nDataPartId6, sal_uInt16 nVersion)
Definition: axcontrol.cxx:661
sal_uInt32 mnBackColor
Fill color.
Definition: axcontrol.hxx:819
sal_Int32 mnPosition
Value of the spin button.
Definition: axcontrol.hxx:448
sal_uInt32 mnTextColor
Text color.
Definition: axcontrol.hxx:623
const sal_Int32 AX_DISPLAYSTYLE_DROPDOWN
Definition: axcontrol.hxx:135
const sal_Int32 AX_PICALIGN_BOTTOMRIGHT
Definition: axcontrol.hxx:127
sal_Int32 mnMaxLength
Maximum character count.
Definition: axcontrol.hxx:635
sal_uInt16 mnVertical
0 = horizontal, 1 = vertical.
Definition: axcontrol.hxx:466
sal_uInt32 mnBackColor
Fill color.
Definition: axcontrol.hxx:576
const ControlModelBase * getModel() const
Returns read-only access to the internal control model.
Definition: axcontrol.hxx:917
Model for a ComCtl scroll bar.
Definition: axcontrol.hxx:432
bool mbPicTiling
True = picture is repeated.
Definition: axcontrol.hxx:829
float mfMin
Minimum of the value range.
Definition: axcontrol.hxx:464
sal_uInt32 mnBorderColor
Flat border color.
Definition: axcontrol.hxx:578
css::uno::Reference< css::container::XIndexContainer > const & createXForm()
Creates the form that will hold the form controls.
Definition: axcontrol.cxx:2760
Control does not support tri-state, state is given as short.
Definition: axcontrol.hxx:185
sal_uInt32 mnBackColor
Fill color.
Definition: axcontrol.hxx:524
const sal_uInt32 AX_FLAGS_DRAGENABLED
Definition: axcontrol.hxx:97
sal_Int32 mnDelay
Repeat delay in milliseconds.
Definition: axcontrol.hxx:760
css::uno::Sequence< OUString > msListData
Definition: axcontrol.hxx:879
const sal_uInt32 AX_FLAGS_EXISTINGENTRIES
Definition: axcontrol.hxx:93
sal_Int32 mnLargeChange
Increment step size (thumb).
Definition: axcontrol.hxx:444
virtual void convertProperties(PropertyMap &rPropMap, const ControlConverter &rConv) const override
Derived classes convert all control properties.
Definition: axcontrol.cxx:779
Model for a Forms 2.0 command button.
Definition: axcontrol.hxx:505
Model for a Forms 2.0 scroll bar.
Definition: axcontrol.hxx:765
virtual void convertProperties(PropertyMap &rPropMap, const ControlConverter &rConv) const override
Derived classes convert all control properties.
Definition: axcontrol.cxx:695
Control supports tri-state, state is given as short.
Definition: axcontrol.hxx:186
const sal_Int32 AX_PICALIGN_TOPLEFT
Definition: axcontrol.hxx:123
const sal_uInt32 AX_FLAGS_AUTOSIZE
Definition: axcontrol.hxx:105
const css::uno::Reference< css::container::XIndexContainer > & getXForm() const
Returns the XIndexContainer interface of the UNO control form, if existing.
Definition: axcontrol.hxx:974
css::uno::Sequence< sal_Int16 > msIndices
Definition: axcontrol.hxx:880
sal_uInt32 mnBorderColor
Flat border color.
Definition: axcontrol.hxx:627
std::vector< OUString > maItems
Definition: axcontrol.hxx:600
virtual void importControlData(BinaryInputStream &rInStrm)=0
sal_uInt32 mnArrowColor
Button arrow color.
Definition: axcontrol.hxx:752
virtual void importControlData(BinaryInputStream &rInStrm) override
Definition: axcontrol.cxx:787