39#include <sfx2/sfxsids.hrc>
53#include <com/sun/star/form/ListSourceType.hpp>
54#include <com/sun/star/form/FormButtonType.hpp>
55#include <com/sun/star/form/FormSubmitEncoding.hpp>
56#include <com/sun/star/form/FormSubmitMethod.hpp>
57#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
58#include <com/sun/star/script/XEventAttacherManager.hpp>
59#include <com/sun/star/text/WrapTextMode.hpp>
60#include <com/sun/star/text/HoriOrientation.hpp>
61#include <com/sun/star/text/VertOrientation.hpp>
62#include <com/sun/star/text/TextContentAnchorType.hpp>
63#include <com/sun/star/container/XIndexContainer.hpp>
64#include <com/sun/star/drawing/XControlShape.hpp>
65#include <com/sun/star/awt/XTextLayoutConstrains.hpp>
66#include <com/sun/star/awt/XLayoutConstrains.hpp>
67#include <com/sun/star/awt/XImageConsumer.hpp>
68#include <com/sun/star/awt/ImageStatus.hpp>
69#include <com/sun/star/form/XImageProducerSupplier.hpp>
70#include <com/sun/star/form/XForm.hpp>
99 {
nullptr, FormSubmitMethod(0) }
107 {
nullptr, FormSubmitEncoding(0) }
112enum HTMLWordWrapMode { HTML_WM_OFF, HTML_WM_HARD, HTML_WM_SOFT };
123 {
nullptr, HTMLWordWrapMode(0) }
128 SvMacroItemId::HtmlOnSubmitForm,
129 SvMacroItemId::HtmlOnResetForm,
130 SvMacroItemId::HtmlOnGetFocus,
131 SvMacroItemId::HtmlOnLoseFocus,
132 SvMacroItemId::HtmlOnClick,
133 SvMacroItemId::HtmlOnClickItem,
134 SvMacroItemId::HtmlOnChange,
135 SvMacroItemId::HtmlOnSelect,
145 "XApproveActionListener",
195 uno::Reference< container::XIndexContainer >
m_xForms;
217 OSL_ENSURE(
m_pDocShell,
"No DocShell, no Controls" );
222 const uno::Reference< drawing::XShapes >&
GetShapes();
225 const uno::Reference< container::XIndexContainer >&
GetForms();
227 const uno::Reference< container::XIndexContainer >&
GetFormComps()
const
232 void SetFormComps(
const uno::Reference< container::XIndexContainer >& r )
286 "XServiceFactory not received from model" );
297 OSL_ENSURE( xTextDoc.is(),
298 "drawing::XDrawPageSupplier not received from model" );
300 OSL_ENSURE(
m_xDrawPage.is(),
"drawing::XDrawPage not received" );
311 uno::Reference< XFormsSupplier > xFormsSupplier(
m_xDrawPage, UNO_QUERY );
312 OSL_ENSURE( xFormsSupplier.is(),
313 "XFormsSupplier not received from drawing::XDrawPage" );
315 uno::Reference< container::XNameContainer > xNameCont =
316 xFormsSupplier->getForms();
317 m_xForms.set( xNameCont, UNO_QUERY );
319 OSL_ENSURE(
m_xForms.is(),
"XForms not received" );
334 "XShapes not received from drawing::XDrawPage" );
340const uno::Reference< script::XEventAttacherManager >&
346 uno::Reference< script::XEventAttacherManager >(
m_xFormComps, UNO_QUERY );
348 "uno::Reference< XEventAttacherManager > not received from xFormComps" );
354const uno::Reference< script::XEventAttacherManager >&
363 uno::Reference< script::XEventAttacherManager >(
m_xForms, UNO_QUERY );
365 "uno::Reference< XEventAttacherManager > not received from xForms" );
374class SwHTMLImageWatcher :
375 public cppu::WeakImplHelper< awt::XImageConsumer, XEventListener >
377 uno::Reference< drawing::XShape > m_xShape;
378 uno::Reference< XImageProducerSupplier > m_xSrc;
379 uno::Reference< awt::XImageConsumer > m_xThis;
386 SwHTMLImageWatcher( uno::Reference< drawing::XShape > xShape,
387 bool bWidth,
bool bHeight );
391 void start() { m_xSrc->getImageProducer()->startProduction(); }
396 virtual void SAL_CALL
init( sal_Int32 Width, sal_Int32 Height)
override;
397 virtual void SAL_CALL setColorModel(
398 sal_Int16 BitCount,
const uno::Sequence< sal_Int32 >& RGBAPal,
399 sal_Int32 RedMask, sal_Int32 GreenMask, sal_Int32 BlueMask,
401 virtual void SAL_CALL setPixelsByBytes(
402 sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height,
403 const uno::Sequence< sal_Int8 >& ProducerData,
404 sal_Int32 Offset, sal_Int32 Scansize)
override;
405 virtual void SAL_CALL setPixelsByLongs(
406 sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height,
407 const uno::Sequence< sal_Int32 >& ProducerData,
408 sal_Int32 Offset, sal_Int32 Scansize)
override;
409 virtual void SAL_CALL complete(
411 const uno::Reference< awt::XImageProducer > & Producer)
override;
414 virtual void SAL_CALL disposing(
const EventObject& Source )
override;
419SwHTMLImageWatcher::SwHTMLImageWatcher(
420 uno::Reference< drawing::XShape > xShape,
421 bool bWidth,
bool bHeight ) :
422 m_xShape(
std::move( xShape )),
423 m_bSetWidth( bWidth ), m_bSetHeight( bHeight )
426 uno::Reference< drawing::XControlShape > xControlShape(
m_xShape, UNO_QUERY );
427 uno::Reference< awt::XControlModel > xControlModel(
428 xControlShape->getControl() );
429 m_xSrc.set( xControlModel, UNO_QUERY );
430 OSL_ENSURE( m_xSrc.is(),
"No XImageProducerSupplier" );
433 uno::Reference< XEventListener > xEvtLstnr =
static_cast<XEventListener *
>(
this);
434 uno::Reference< XComponent > xComp(
m_xShape, UNO_QUERY );
435 xComp->addEventListener( xEvtLstnr );
439 m_xThis =
static_cast<awt::XImageConsumer *
>(
this);
442 m_xSrc->getImageProducer()->addConsumer( m_xThis );
445void SwHTMLImageWatcher::clear()
448 uno::Reference< XEventListener > xEvtLstnr =
static_cast<XEventListener *
>(
this);
449 uno::Reference< XComponent > xComp( m_xShape, UNO_QUERY );
450 xComp->removeEventListener( xEvtLstnr );
453 uno::Reference<awt::XImageProducer> xProd = m_xSrc->getImageProducer();
455 xProd->removeConsumer( m_xThis );
458void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height )
460 OSL_ENSURE( m_bSetWidth || m_bSetHeight,
461 "Width or height has to be adjusted" );
466 if( !Width && !Height )
470 aNewSz.Width =
Width;
474 Size aTmp(aNewSz.Width, aNewSz.Height);
477 aNewSz.Width = aTmp.Width();
478 aNewSz.Height = aTmp.Height();
481 if( !m_bSetWidth || !m_bSetHeight )
483 awt::Size aSz( m_xShape->getSize() );
484 if( m_bSetWidth && aNewSz.Height )
486 aNewSz.Width *= aSz.Height;
487 aNewSz.Width /= aNewSz.Height;
488 aNewSz.Height = aSz.Height;
490 if( m_bSetHeight && aNewSz.Width )
492 aNewSz.Height *= aSz.Width;
493 aNewSz.Height /= aNewSz.Width;
494 aNewSz.Width = aSz.Width;
497 if( aNewSz.Width <
MINFLY )
499 if( aNewSz.Height <
MINFLY )
502 m_xShape->setSize( aNewSz );
509 uno::Reference< beans::XPropertySet > xPropSet( m_xShape, UNO_QUERY );
510 SwXShape *pSwShape = comphelper::getFromUnoTunnel<SwXShape>(xPropSet);
512 OSL_ENSURE( pSwShape,
"Where is SW-Shape?" );
520 if (pAnchorNode &&
nullptr != (pTableNd = pAnchorNode->
FindTableNode()))
527 const sal_uInt16 nBrowseWidth =
532 pLayout->
Resize( nBrowseWidth,
true,
true,
546void SwHTMLImageWatcher::setColorModel(
547 sal_Int16,
const Sequence< sal_Int32 >&, sal_Int32, sal_Int32,
548 sal_Int32, sal_Int32 )
552void SwHTMLImageWatcher::setPixelsByBytes(
553 sal_Int32, sal_Int32, sal_Int32, sal_Int32,
554 const Sequence< sal_Int8 >&, sal_Int32, sal_Int32 )
558void SwHTMLImageWatcher::setPixelsByLongs(
559 sal_Int32, sal_Int32, sal_Int32, sal_Int32,
560 const Sequence< sal_Int32 >&, sal_Int32, sal_Int32 )
564void SwHTMLImageWatcher::complete( sal_Int32
Status,
565 const uno::Reference< awt::XImageProducer >& )
567 if( awt::ImageStatus::IMAGESTATUS_ERROR ==
Status || awt::ImageStatus::IMAGESTATUS_ABORTED ==
Status )
575void SwHTMLImageWatcher::disposing(
const lang::EventObject& evt)
577 uno::Reference< awt::XImageConsumer > xTmp;
580 if( evt.Source == m_xShape )
583 xTmp =
static_cast<awt::XImageConsumer*
>(
this);
595 const uno::Reference< beans::XPropertySet >& rPropSet )
599 GetDefaultFontFlags::OnlyOne ) );
602 rPropSet->setPropertyValue(
"FontName", aTmp );
605 rPropSet->setPropertyValue(
"FontStyleName",
609 rPropSet->setPropertyValue(
"FontFamily", aTmp );
611 aTmp <<= static_cast<sal_Int16>(aFixedFont.
GetCharSet());
612 rPropSet->setPropertyValue(
"FontCharset",
615 aTmp <<= static_cast<sal_Int16>(aFixedFont.
GetPitch());
616 rPropSet->setPropertyValue(
"FontPitch", aTmp );
618 aTmp <<= float(10.0);
619 rPropSet->setPropertyValue(
"FontHeight", aTmp );
627 if( !rTextSz.
Width() && !rTextSz.
Height() && !bMinWidth && !bMinHeight )
632 uno::Reference< beans::XPropertySet > xPropSet( rShape, UNO_QUERY );
652 pVSh =
m_xDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
654 m_xDoc->GetIDocumentUndoRedo().DoUndo(
false);
658 SwXShape *pSwShape = comphelper::getFromUnoTunnel<SwXShape>(xPropSet);
660 OSL_ENSURE( pSwShape,
"Where is SW-Shape?" );
664 OSL_ENSURE( pFrameFormat &&
RES_DRAWFRMFMT == pFrameFormat->
Which(),
"No DrawFrameFormat" );
668 OSL_ENSURE( pObj,
"SdrObject not found" );
669 OSL_ENSURE( pObj && SdrInventor::FmForm == pObj->
GetObjInventor(),
"wrong Inventor" );
674 uno::Reference< awt::XControl > xControl;
675 if ( pDrawView && pVSh->
GetWin() && pFormObj )
678 awt::Size aSz( rShape->getSize() );
679 awt::Size aNewSz( 0, 0 );
684 if( bMinWidth || bMinHeight )
686 uno::Reference< awt::XLayoutConstrains > xLC( xControl, UNO_QUERY );
687 awt::Size aTmpSz( xLC->getPreferredSize() );
689 aNewSz.Width = aTmpSz.Width;
691 aNewSz.Height = aTmpSz.Height;
695 uno::Reference< awt::XTextLayoutConstrains > xLC( xControl, UNO_QUERY );
696 OSL_ENSURE( xLC.is(),
"no XTextLayoutConstrains" );
699 awt::Size aTmpSz( rTextSz.
Width(), rTextSz.
Height() );
700 if( -1 == rTextSz.
Width() )
705 aTmpSz = xLC->getMinimumSize(
static_cast< sal_Int16
>(aTmpSz.Width),
static_cast< sal_Int16
>(aTmpSz.Height) );
706 if( rTextSz.
Width() )
707 aNewSz.Width = aTmpSz.Width;
709 aNewSz.Height = aTmpSz.Height;
716 Size aTmpSz( aNewSz.Width, aNewSz.Height );
719 aNewSz.Width = aTmpSz.
Width();
720 aNewSz.Height = aTmpSz.
Height();
724 if( aNewSz.Width <
MINLAY )
726 aSz.Width = aNewSz.Width;
730 if( aNewSz.Height <
MINLAY )
732 aSz.Height = aNewSz.Height;
735 rShape->setSize( aSz );
739 const uno::Reference< script::XEventAttacherManager > & rEvtMn,
741 const std::vector<OUString>& rUnoMacroTable,
742 const std::vector<OUString>& rUnoMacroParamTable,
743 const OUString& rType )
746 sal_Int32 nEvents = 0;
755 for(
const auto &rStr : rUnoMacroTable )
762 if(
nIndex < rStr.getLength() )
769 Sequence<script::ScriptEventDescriptor> aDescs( nEvents );
770 script::ScriptEventDescriptor* pDescs = aDescs.getArray();
771 sal_Int32 nEvent = 0;
778 script::ScriptEventDescriptor& rDesc = pDescs[nEvent++];
787 for(
const auto &rStr : rUnoMacroTable )
790 OUString sListener( rStr.getToken( 0,
'-',
nIndex ) );
791 if( sListener.isEmpty() || -1 ==
nIndex )
794 OUString sMethod( rStr.getToken( 0,
'-',
nIndex ) );
795 if( sMethod.isEmpty() || -1 ==
nIndex )
798 OUString sCode( rStr.copy(
nIndex ) );
799 if( sCode.isEmpty() )
802 script::ScriptEventDescriptor& rDesc = pDescs[nEvent++];
803 rDesc.ListenerType = sListener;
804 rDesc.EventMethod = sMethod;
805 rDesc.ScriptType = rType;
806 rDesc.ScriptCode = sCode;
807 rDesc.AddListenerParam.clear();
809 if(!rUnoMacroParamTable.empty())
811 OUString sSearch = sListener +
"-" +sMethod +
"-";
812 sal_Int32 nLen = sSearch.getLength();
813 for(
const auto & rParam : rUnoMacroParamTable)
815 if( rParam.startsWith( sSearch ) && rParam.getLength() > nLen )
817 rDesc.AddListenerParam = rParam.copy(nLen);
823 rEvtMn->registerScriptEvents(
nPos, aDescs );
828 std::vector<OUString>& rUnoMacroTable,
829 std::vector<OUString>& rUnoMacroParamTable )
835 rUnoMacroTable.push_back(
aEvent);
841 rUnoMacroParamTable.push_back(aParam);
846 const uno::Reference< XFormComponent > & rFComp,
847 const uno::Reference< beans::XPropertySet > & rFCompPropSet,
848 const Size& rSize, sal_Int16 eVertOri, sal_Int16 eHoriOri,
850 const SvxMacroTableDtor& rMacroTable,
const std::vector<OUString>& rUnoMacroTable,
851 const std::vector<OUString>& rUnoMacroParamTable,
bool bSetFCompPropSet,
854 uno::Reference< drawing::XShape > xShape;
856 const uno::Reference< container::XIndexContainer > & rFormComps =
859 rFormComps->insertByIndex( rFormComps->getCount(), aAny );
864 sal_Int32 nLeftSpace = 0;
865 sal_Int32 nRightSpace = 0;
866 sal_Int32 nUpperSpace = 0;
867 sal_Int32 nLowerSpace = 0;
869 const uno::Reference< XMultiServiceFactory > & rServiceFactory =
871 if( !rServiceFactory.is() )
874 uno::Reference< XInterface > xCreate = rServiceFactory->createInstance(
"com.sun.star.drawing.ControlShape" );
878 xShape.set( xCreate, UNO_QUERY );
880 OSL_ENSURE( xShape.is(),
"XShape not received" );
882 aTmpSz.Width = rSize.
Width();
883 aTmpSz.Height = rSize.
Height();
884 xShape->setSize( aTmpSz );
886 uno::Reference< beans::XPropertySet > xShapePropSet( xCreate, UNO_QUERY );
906 if( nLeftSpace || nRightSpace )
909 aAny2 <<= nLeftSpace;
910 xShapePropSet->setPropertyValue(
"LeftMargin", aAny2 );
912 aAny2 <<= nRightSpace;
913 xShapePropSet->setPropertyValue(
"RightMargin", aAny2 );
933 if( nUpperSpace || nLowerSpace )
936 aAny2 <<= nUpperSpace;
937 xShapePropSet->setPropertyValue(
"TopMargin", aAny2 );
939 aAny2 <<= nLowerSpace;
940 xShapePropSet->setPropertyValue(
"BottomMargin", aAny2 );
943 uno::Reference< beans::XPropertySetInfo > xPropSetInfo =
944 rFCompPropSet->getPropertySetInfo();
945 OUString sPropName =
"BackgroundColor";
947 if( pBrushItem && xPropSetInfo->hasPropertyByName( sPropName ) )
955 rFCompPropSet->setPropertyValue( sPropName, aTmp );
960 sPropName =
"TextColor";
962 if( pColorItem && xPropSetInfo->hasPropertyByName( sPropName ) )
965 rFCompPropSet->setPropertyValue( sPropName, aTmp );
968 sPropName =
"FontHeight";
970 if( pFontHeightItem && xPropSetInfo->hasPropertyByName( sPropName ) )
972 float fVal =
static_cast< float >( pFontHeightItem->
GetHeight() / 20.0 );
974 rFCompPropSet->setPropertyValue( sPropName, aTmp );
979 sPropName =
"FontName";
980 if( xPropSetInfo->hasPropertyByName( sPropName ) )
982 aTmp <<= pFontItem->GetFamilyName();
983 rFCompPropSet->setPropertyValue( sPropName, aTmp );
985 sPropName =
"FontStyleName";
986 if( xPropSetInfo->hasPropertyByName( sPropName ) )
988 aTmp <<= pFontItem->GetStyleName();
989 rFCompPropSet->setPropertyValue( sPropName, aTmp );
991 sPropName =
"FontFamily";
992 if( xPropSetInfo->hasPropertyByName( sPropName ) )
994 aTmp <<= static_cast<sal_Int16>(pFontItem->GetFamily()) ;
995 rFCompPropSet->setPropertyValue( sPropName, aTmp );
997 sPropName =
"FontCharset";
998 if( xPropSetInfo->hasPropertyByName( sPropName ) )
1000 aTmp <<= static_cast<sal_Int16>(pFontItem->GetCharSet()) ;
1001 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1003 sPropName =
"FontPitch";
1004 if( xPropSetInfo->hasPropertyByName( sPropName ) )
1006 aTmp <<= static_cast<sal_Int16>(pFontItem->GetPitch()) ;
1007 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1011 sPropName =
"FontWeight";
1013 if( pWeightItem && xPropSetInfo->hasPropertyByName( sPropName ) )
1018 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1021 sPropName =
"FontSlant";
1023 if( pPostureItem && xPropSetInfo->hasPropertyByName( sPropName ) )
1025 aTmp <<= static_cast<sal_Int16>(pPostureItem->
GetPosture());
1026 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1029 sPropName =
"FontUnderline";
1031 if( pUnderlineItem && xPropSetInfo->hasPropertyByName( sPropName ) )
1033 aTmp <<= static_cast<sal_Int16>(pUnderlineItem->
GetLineStyle());
1034 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1037 sPropName =
"FontStrikeout";
1039 if( pCrossedOutItem && xPropSetInfo->hasPropertyByName( sPropName ) )
1041 aTmp <<= static_cast<sal_Int16>(pCrossedOutItem->
GetStrikeout());
1042 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1045 uno::Reference< text::XTextRange > xTextRg;
1046 text::TextContentAnchorType nAnchorType = text::TextContentAnchorType_AS_CHARACTER;
1047 bool bSetPos =
false, bSetSurround =
false;
1048 sal_Int32 nXPos = 0, nYPos = 0;
1049 text::WrapTextMode nSurround = text::WrapTextMode_NONE;
1059 nAnchorType = text::TextContentAnchorType_AT_FRAME;
1060 SwPaM aPaM( *pFlySttNd );
1062 uno::Reference< text::XText > xDummyTextRef;
1067 nAnchorType = text::TextContentAnchorType_AT_PAGE;
1073 nSurround = text::WrapTextMode_THROUGH;
1074 bSetSurround =
true;
1076 else if( SvxAdjust::Left == rCSS1PropInfo.
m_eFloat ||
1077 text::HoriOrientation::LEFT == eHoriOri )
1079 nAnchorType = text::TextContentAnchorType_AT_PARAGRAPH;
1081 nYPos = nUpperSpace;
1083 nSurround = text::WrapTextMode_RIGHT;
1084 bSetSurround =
true;
1091 case text::VertOrientation::TOP:
1092 nVertOri = text::VertOrientation::TOP;
1094 case text::VertOrientation::CENTER:
1095 nVertOri = text::VertOrientation::CENTER;
1097 case text::VertOrientation::BOTTOM:
1098 nVertOri = text::VertOrientation::BOTTOM;
1100 case text::VertOrientation::CHAR_TOP:
1101 nVertOri = text::VertOrientation::CHAR_TOP;
1103 case text::VertOrientation::CHAR_CENTER:
1104 nVertOri = text::VertOrientation::CHAR_CENTER;
1106 case text::VertOrientation::CHAR_BOTTOM:
1107 nVertOri = text::VertOrientation::CHAR_BOTTOM;
1109 case text::VertOrientation::LINE_TOP:
1110 nVertOri = text::VertOrientation::LINE_TOP;
1112 case text::VertOrientation::LINE_CENTER:
1113 nVertOri = text::VertOrientation::LINE_CENTER;
1115 case text::VertOrientation::LINE_BOTTOM:
1116 nVertOri = text::VertOrientation::LINE_BOTTOM;
1124 xShapePropSet->setPropertyValue(
"VertOrient", aTmp );
1127 aTmp <<= nAnchorType ;
1128 xShapePropSet->setPropertyValue(
"AnchorType", aTmp );
1130 if( text::TextContentAnchorType_AT_PAGE == nAnchorType )
1132 aTmp <<= sal_Int16(1) ;
1133 xShapePropSet->setPropertyValue(
"AnchorPageNo", aTmp );
1139 uno::Reference< text::XText > xDummyTextRef;
1144 xShapePropSet->setPropertyValue(
"TextRange", aTmp );
1150 xShapePropSet->setPropertyValue(
"HoriOrient", aTmp );
1152 xShapePropSet->setPropertyValue(
"HoriOrientPosition", aTmp );
1155 xShapePropSet->setPropertyValue(
"VertOrient", aTmp );
1157 xShapePropSet->setPropertyValue(
"VertOrientPosition", aTmp );
1161 aTmp <<= nSurround ;
1162 xShapePropSet->setPropertyValue(
"Surround", aTmp );
1168 uno::Reference< drawing::XControlShape > xControlShape( xShape, UNO_QUERY );
1169 uno::Reference< awt::XControlModel > xControlModel( rFComp, UNO_QUERY );
1170 xControlShape->setControl( xControlModel );
1175 if( !rMacroTable.
empty() || !rUnoMacroTable.empty() )
1178 rFormComps->getCount() - 1,
1179 rMacroTable, rUnoMacroTable, rUnoMacroParamTable,
1185 if( bSetFCompPropSet )
1211 OUString
sName, sTarget;
1212 FormSubmitEncoding nEncType = FormSubmitEncoding_URL;
1213 FormSubmitMethod nMethod = FormSubmitMethod_GET;
1215 std::vector<OUString> aUnoMacroTable;
1216 std::vector<OUString> aUnoMacroParamTable;
1222 for (
size_t i = rHTMLOptions.size();
i; )
1227 bool bSetEvent =
false;
1231 case HtmlOptionId::ACTION:
1234 case HtmlOptionId::METHOD:
1237 case HtmlOptionId::ENCTYPE:
1240 case HtmlOptionId::TARGET:
1243 case HtmlOptionId::NAME:
1247 case HtmlOptionId::SDONSUBMIT:
1250 case HtmlOptionId::ONSUBMIT:
1251 nEvent = SvMacroItemId::HtmlOnSubmitForm;
1255 case HtmlOptionId::SDONRESET:
1258 case HtmlOptionId::ONRESET:
1259 nEvent = SvMacroItemId::HtmlOnResetForm;
1266 aUnoMacroTable, aUnoMacroParamTable );
1273 if( !sEvent.isEmpty() )
1276 OUString aScriptType2;
1278 aScriptType2 = rDfltScriptType;
1279 aMacroTable.
Insert( nEvent,
SvxMacro( sEvent, aScriptType2, eScriptType2 ) );
1284 const uno::Reference< XMultiServiceFactory > & rSrvcMgr =
1286 if( !rSrvcMgr.is() )
1289 uno::Reference< XInterface > xInt;
1290 uno::Reference<XForm> xForm;
1293 xInt = rSrvcMgr->createInstance(
"com.sun.star.form.component.Form");
1296 xForm.set(xInt, UNO_QUERY);
1297 SAL_WARN_IF(!xForm.is(),
"sw",
"no XForm for com.sun.star.form.component.Form?");
1307 uno::Reference< container::XIndexContainer > xFormComps( xForm, UNO_QUERY );
1310 uno::Reference< beans::XPropertySet > xFormPropSet( xForm, UNO_QUERY );
1314 xFormPropSet->setPropertyValue(
"Name", aTmp );
1316 if( !aAction.isEmpty() )
1327 xFormPropSet->setPropertyValue(
"TargetURL",
1331 xFormPropSet->setPropertyValue(
"SubmitMethod",
1335 xFormPropSet->setPropertyValue(
"SubmitEncoding", aTmp );
1337 if( !sTarget.isEmpty() )
1340 xFormPropSet->setPropertyValue(
"TargetFrame", aTmp );
1343 const uno::Reference< container::XIndexContainer > & rForms =
1346 rForms->insertByIndex( rForms->getCount(), aAny );
1347 if( !aMacroTable.
empty() )
1350 rForms->getCount() - 1,
1351 aMacroTable, aUnoMacroTable, aUnoMacroParamTable,
1381 OUString sImgSrc, aId, aClass, aStyle,
sName;
1384 std::vector<OUString> aUnoMacroTable;
1385 std::vector<OUString> aUnoMacroParamTable;
1386 sal_uInt16 nSize = 0;
1387 sal_Int16 nMaxLen = 0;
1391 bool bDisabled =
false, bValue =
false;
1392 bool bSetGrfWidth =
false, bSetGrfHeight =
false;
1393 bool bHidden =
false;
1395 sal_Int16 eVertOri = text::VertOrientation::TOP;
1402 const HTMLOptions& rHTMLOptions = GetOptions( &nKeepCRLFToken );
1403 for (
size_t i = rHTMLOptions.size();
i; )
1408 bool bSetEvent =
false;
1412 case HtmlOptionId::ID:
1415 case HtmlOptionId::STYLE:
1418 case HtmlOptionId::CLASS:
1421 case HtmlOptionId::TYPE:
1424 case HtmlOptionId::NAME:
1427 case HtmlOptionId::VALUE:
1431 case HtmlOptionId::CHECKED:
1434 case HtmlOptionId::DISABLED:
1437 case HtmlOptionId::MAXLENGTH:
1438 nMaxLen =
static_cast<sal_Int16
>(rOption.
GetNumber());
1440 case HtmlOptionId::SIZE:
1441 nSize = o3tl::narrowing<sal_uInt16>(rOption.
GetNumber());
1443 case HtmlOptionId::SRC:
1446 case HtmlOptionId::WIDTH:
1450 case HtmlOptionId::HEIGHT:
1454 case HtmlOptionId::ALIGN:
1460 case HtmlOptionId::TABINDEX:
1465 case HtmlOptionId::SDONFOCUS:
1468 case HtmlOptionId::ONFOCUS:
1469 nEvent = SvMacroItemId::HtmlOnGetFocus;
1473 case HtmlOptionId::SDONBLUR:
1476 case HtmlOptionId::ONBLUR:
1477 nEvent = SvMacroItemId::HtmlOnLoseFocus;
1481 case HtmlOptionId::SDONCLICK:
1484 case HtmlOptionId::ONCLICK:
1485 nEvent = SvMacroItemId::HtmlOnClick;
1489 case HtmlOptionId::SDONCHANGE:
1492 case HtmlOptionId::ONCHANGE:
1493 nEvent = SvMacroItemId::HtmlOnChange;
1497 case HtmlOptionId::SDONSELECT:
1500 case HtmlOptionId::ONSELECT:
1501 nEvent = SvMacroItemId::HtmlOnSelect;
1508 aUnoMacroTable, aUnoMacroParamTable );
1515 if( !sEvent.isEmpty() )
1518 OUString aScriptType2;
1520 aScriptType2 = rDfltScriptType;
1521 aMacroTable.
Insert( nEvent,
SvxMacro( sEvent, aScriptType2, eScriptType2 ) );
1526 if( HTMLInputType::Image==
eType )
1529 if( sImgSrc.isEmpty() )
1536 eVertOri = text::VertOrientation::TOP;
1541 const char *pType =
"TextField";
1542 bool bKeepCRLFInValue =
false;
1545 case HTMLInputType::Checkbox:
1547 bKeepCRLFInValue =
true;
1550 case HTMLInputType::Radio:
1551 pType =
"RadioButton";
1552 bKeepCRLFInValue =
true;
1555 case HTMLInputType::Password:
1556 bKeepCRLFInValue =
true;
1559 case HTMLInputType::Button:
1560 bKeepCRLFInValue =
true;
1562 case HTMLInputType::Submit:
1563 case HTMLInputType::Reset:
1564 pType =
"CommandButton";
1567 case HTMLInputType::Image:
1568 pType =
"ImageButton";
1571 case HTMLInputType::File:
1572 pType =
"FileControl";
1575 case HTMLInputType::Hidden:
1576 pType =
"HiddenControl";
1577 bKeepCRLFInValue =
true;
1584 if( !bKeepCRLFInValue )
1586 sText = sText.replaceAll(
"\r",
"").replaceAll(
"\n",
"");
1589 const uno::Reference< XMultiServiceFactory > & rServiceFactory =
1591 if( !rServiceFactory.is() )
1594 OUString
sServiceName =
"com.sun.star.form.component." +
1595 OUString::createFromAscii(pType);
1596 uno::Reference< XInterface > xInt =
1601 uno::Reference< XFormComponent > xFComp( xInt, UNO_QUERY );
1605 uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY );
1609 xPropSet->setPropertyValue(
"Name", aTmp );
1611 if( HTMLInputType::Hidden !=
eType )
1615 aTmp <<= static_cast<sal_Int16>(nTabIndex) ;
1616 xPropSet->setPropertyValue(
"TabIndex", aTmp );
1621 xPropSet->setPropertyValue(
"Enabled",
Any(
false) );
1628 Size aTextSz( 0, 0 );
1629 bool bMinWidth =
false, bMinHeight =
false;
1630 bool bUseSize =
false;
1633 case HTMLInputType::Checkbox:
1634 case HTMLInputType::Radio:
1638 xPropSet->setPropertyValue(
"RefValue",
1640 aTmp <<= OUString();
1641 xPropSet->setPropertyValue(
"Label",
1646 if( HTMLInputType::Checkbox ==
eType )
1649 xPropSet->setPropertyValue(
"DefaultState", aTmp );
1652 const SvxMacro* pMacro = aMacroTable.
Get( SvMacroItemId::HtmlOnClick );
1655 aMacroTable.
Insert( SvMacroItemId::HtmlOnClickItem, *pMacro );
1656 aMacroTable.
Erase( SvMacroItemId::HtmlOnClick );
1659 bMinWidth = bMinHeight =
true;
1663 case HTMLInputType::Image:
1666 aSz.
setWidth( nSize ? nSize : nWidth );
1674 aTmp <<= FormButtonType_SUBMIT;
1675 xPropSet->setPropertyValue(
"ButtonType", aTmp );
1677 aTmp <<= sal_Int16(0) ;
1678 xPropSet->setPropertyValue(
"Border",
1683 case HTMLInputType::Button:
1684 case HTMLInputType::Submit:
1685 case HTMLInputType::Reset:
1687 FormButtonType eButtonType;
1690 case HTMLInputType::Button:
1691 eButtonType = FormButtonType_PUSH;
1693 case HTMLInputType::Submit:
1694 eButtonType = FormButtonType_SUBMIT;
1695 if (sText.isEmpty())
1698 case HTMLInputType::Reset:
1699 eButtonType = FormButtonType_RESET;
1700 if (sText.isEmpty())
1707 xPropSet->setPropertyValue(
"Label",
1710 aTmp <<= eButtonType;
1711 xPropSet->setPropertyValue(
"ButtonType", aTmp );
1713 bMinWidth = bMinHeight =
true;
1718 case HTMLInputType::Password:
1719 case HTMLInputType::Text:
1720 case HTMLInputType::File:
1721 if( HTMLInputType::File !=
eType )
1724 xPropSet->setPropertyValue(
"DefaultText", aTmp );
1728 xPropSet->setPropertyValue(
"MaxTextLen", aTmp );
1732 if( HTMLInputType::Password ==
eType )
1734 aTmp <<= sal_Int16(
'*') ;
1735 xPropSet->setPropertyValue(
"EchoChar", aTmp );
1746 case HTMLInputType::Hidden:
1747 xPropSet->setPropertyValue(
"HiddenValue", aTmp );
1754 if( bUseSize && nSize>0 )
1758 Size aNewSz( nSize, 0 );
1762 OSL_ENSURE( !aTextSz.
Width(),
"text width is present" );
1772 if( !aId.isEmpty() )
1790 if( HTMLInputType::Image==
eType )
1795 bSetGrfWidth =
true;
1802 bSetGrfHeight =
true;
1811 xFComp, xPropSet, aSz,
1813 aCSS1ItemSet, aCSS1PropInfo,
1814 aMacroTable, aUnoMacroTable,
1815 aUnoMacroParamTable,
false,
1817 if( aTextSz.
Width() || aTextSz.
Height() || bMinWidth || bMinHeight )
1819 OSL_ENSURE( !(bSetGrfWidth || bSetGrfHeight),
"Adjust graphic size???" );
1823 if( HTMLInputType::Radio ==
eType )
1826 xPropSet->setPropertyValue(
"DefaultState", aTmp );
1829 if( HTMLInputType::Image ==
eType )
1833 aTmp <<= URIHelper::SmartRel2Abs(INetURLObject(m_sBaseURL), sImgSrc, Link<OUString *, bool>(),
false);
1834 xPropSet->setPropertyValue(
"ImageURL",
1838 if( bSetGrfWidth || bSetGrfHeight )
1841 new SwHTMLImageWatcher( xShape, bSetGrfWidth, bSetGrfHeight );
1850 OSL_ENSURE( !
m_bTextArea,
"TextArea in TextArea?" );
1852 "TextArea in Control?" );
1861 OUString aId, aClass, aStyle;
1865 std::vector<OUString> aUnoMacroTable;
1866 std::vector<OUString> aUnoMacroParamTable;
1867 sal_uInt16 nRows = 0, nCols = 0;
1868 HTMLWordWrapMode nWrap = HTML_WM_OFF;
1869 bool bDisabled =
false;
1875 for (
size_t i = rHTMLOptions.size();
i; )
1880 bool bSetEvent =
false;
1884 case HtmlOptionId::ID:
1887 case HtmlOptionId::STYLE:
1890 case HtmlOptionId::CLASS:
1893 case HtmlOptionId::NAME:
1896 case HtmlOptionId::DISABLED:
1899 case HtmlOptionId::ROWS:
1900 nRows = o3tl::narrowing<sal_uInt16>(rOption.
GetNumber());
1902 case HtmlOptionId::COLS:
1903 nCols = o3tl::narrowing<sal_uInt16>(rOption.
GetNumber());
1905 case HtmlOptionId::WRAP:
1909 case HtmlOptionId::TABINDEX:
1913 case HtmlOptionId::SDONFOCUS:
1916 case HtmlOptionId::ONFOCUS:
1917 nEvent = SvMacroItemId::HtmlOnGetFocus;
1921 case HtmlOptionId::SDONBLUR:
1924 case HtmlOptionId::ONBLUR:
1925 nEvent = SvMacroItemId::HtmlOnLoseFocus;
1929 case HtmlOptionId::SDONCLICK:
1932 case HtmlOptionId::ONCLICK:
1933 nEvent = SvMacroItemId::HtmlOnClick;
1937 case HtmlOptionId::SDONCHANGE:
1940 case HtmlOptionId::ONCHANGE:
1941 nEvent = SvMacroItemId::HtmlOnChange;
1945 case HtmlOptionId::SDONSELECT:
1948 case HtmlOptionId::ONSELECT:
1949 nEvent = SvMacroItemId::HtmlOnSelect;
1956 aUnoMacroTable, aUnoMacroParamTable );
1963 if( !sEvent.isEmpty() )
1973 const uno::Reference< lang::XMultiServiceFactory > & rSrvcMgr =
1975 if( !rSrvcMgr.is() )
1980 uno::Reference< uno::XInterface > xInt = rSrvcMgr->createInstance(
1981 "com.sun.star.form.component.TextField" );
1988 uno::Reference< XFormComponent > xFComp( xInt, UNO_QUERY );
1989 OSL_ENSURE( xFComp.is(),
"no FormComponent?" );
1991 uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY );
1995 xPropSet->setPropertyValue(
"Name", aTmp );
1998 xPropSet->setPropertyValue(
"MultiLine", aTmp );
1999 xPropSet->setPropertyValue(
"VScroll", aTmp );
2000 if( HTML_WM_OFF == nWrap )
2001 xPropSet->setPropertyValue(
"HScroll", aTmp );
2002 if( HTML_WM_HARD == nWrap )
2003 xPropSet->setPropertyValue(
"HardLineBreaks", aTmp );
2007 aTmp <<= static_cast<sal_Int16>(nTabIndex) ;
2008 xPropSet->setPropertyValue(
"TabIndex", aTmp );
2015 xPropSet->setPropertyValue(
"Enabled",
Any(
false) );
2025 Size aTextSz( nCols, nRows );
2032 if( !aId.isEmpty() )
2052 uno::Reference< drawing::XShape > xShape =
InsertControl( xFComp, xPropSet, aSz,
2054 aCSS1ItemSet, aCSS1PropInfo,
2055 aMacroTable, aUnoMacroTable,
2056 aUnoMacroParamTable );
2061 std::unique_ptr<HTMLAttrContext> xCntxt(
new HTMLAttrContext(HtmlTokenId::TEXTAREA_ON));
2073 OSL_ENSURE(
m_bTextArea,
"no TextArea or wrong type" );
2075 "TextArea missing" );
2077 const uno::Reference< beans::XPropertySet > & rPropSet =
2082 rPropSet->setPropertyValue(
"DefaultText", aTmp );
2088 std::unique_ptr<HTMLAttrContext> xCntxt(
PopContext(HtmlTokenId::TEXTAREA_ON));
2100 OSL_ENSURE(
m_bTextArea,
"no TextArea or wrong type" );
2102 "TextArea missing" );
2107 case HtmlTokenId::TEXTTOKEN:
2110 case HtmlTokenId::NEWPARA:
2116 rText += sSaveToken;
2117 if( !aToken.isEmpty() )
2132 OSL_ENSURE( !
m_bSelect,
"Select in Select?" );
2134 "Select in Control?" );
2139 OUString aId, aClass, aStyle;
2143 std::vector<OUString> aUnoMacroTable;
2144 std::vector<OUString> aUnoMacroParamTable;
2145 bool bMultiple =
false;
2146 bool bDisabled =
false;
2153 for (
size_t i = rHTMLOptions.size();
i; )
2158 bool bSetEvent =
false;
2162 case HtmlOptionId::ID:
2165 case HtmlOptionId::STYLE:
2168 case HtmlOptionId::CLASS:
2171 case HtmlOptionId::NAME:
2174 case HtmlOptionId::MULTIPLE:
2177 case HtmlOptionId::DISABLED:
2180 case HtmlOptionId::SIZE:
2184 case HtmlOptionId::TABINDEX:
2188 case HtmlOptionId::SDONFOCUS:
2191 case HtmlOptionId::ONFOCUS:
2192 nEvent = SvMacroItemId::HtmlOnGetFocus;
2196 case HtmlOptionId::SDONBLUR:
2199 case HtmlOptionId::ONBLUR:
2200 nEvent = SvMacroItemId::HtmlOnLoseFocus;
2204 case HtmlOptionId::SDONCLICK:
2207 case HtmlOptionId::ONCLICK:
2208 nEvent = SvMacroItemId::HtmlOnClick;
2212 case HtmlOptionId::SDONCHANGE:
2215 case HtmlOptionId::ONCHANGE:
2216 nEvent = SvMacroItemId::HtmlOnChange;
2223 aUnoMacroTable, aUnoMacroParamTable );
2230 if( !sEvent.isEmpty() )
2240 const uno::Reference< lang::XMultiServiceFactory > & rSrvcMgr =
2242 if( !rSrvcMgr.is() )
2247 uno::Reference< uno::XInterface > xInt = rSrvcMgr->createInstance(
2248 "com.sun.star.form.component.ListBox" );
2255 uno::Reference< XFormComponent > xFComp( xInt, UNO_QUERY );
2256 OSL_ENSURE(xFComp.is(),
"no FormComponent?");
2258 uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY );
2262 xPropSet->setPropertyValue(
"Name", aTmp );
2266 aTmp <<= static_cast<sal_Int16>(nTabIndex) ;
2267 xPropSet->setPropertyValue(
"TabIndex", aTmp );
2272 xPropSet->setPropertyValue(
"Enabled",
Any(
false) );
2275 Size aTextSz( 0, 0 );
2276 bool bMinWidth =
true, bMinHeight =
true;
2279 xPropSet->setPropertyValue(
"Dropdown",
Any(
true) );
2288 xPropSet->setPropertyValue(
"MultiSelection",
Any(
true) );
2299 if( !aId.isEmpty() )
2322 uno::Reference< drawing::XShape > xShape =
InsertControl( xFComp, xPropSet, aSz,
2324 aCSS1ItemSet, aCSS1PropInfo,
2325 aMacroTable, aUnoMacroTable,
2326 aUnoMacroParamTable );
2329 if( aTextSz.
Height() || bMinWidth || bMinHeight )
2333 std::unique_ptr<HTMLAttrContext> xCntxt(
new HTMLAttrContext(HtmlTokenId::SELECT_ON));
2348 "no select control" );
2350 const uno::Reference< beans::XPropertySet > & rPropSet =
2356 Sequence<OUString> aList(
static_cast<sal_Int32
>(nEntryCnt) );
2357 Sequence<OUString> aValueList(
static_cast<sal_Int32
>(nEntryCnt) );
2358 OUString *pStrings = aList.getArray();
2359 OUString *
pValues = aValueList.getArray();
2361 for(
size_t i = 0;
i < nEntryCnt; ++
i)
2365 pStrings[
i] = sText;
2371 rPropSet->setPropertyValue(
"StringItemList",
Any(aList) );
2373 rPropSet->setPropertyValue(
"ListSourceType",
Any(ListSourceType_VALUELIST) );
2375 rPropSet->setPropertyValue(
"ListSource",
Any(aValueList) );
2384 Sequence<sal_Int16> aSelList(
static_cast<sal_Int32
>(nSelCnt) );
2385 sal_Int16 *pSels = aSelList.getArray();
2386 for(
size_t i = 0;
i < nSelCnt; ++
i)
2390 rPropSet->setPropertyValue(
"DefaultSelection",
Any(aSelList) );
2401 Size aTextSz( -1, 0 );
2408 std::unique_ptr<HTMLAttrContext> xCntxt(
PopContext(HtmlTokenId::SELECT_ON));
2422 "no Select-Control" );
2428 for (
size_t i = rHTMLOptions.size();
i; )
2433 case HtmlOptionId::ID:
2436 case HtmlOptionId::SELECTED:
2439 case HtmlOptionId::VALUE:
2441 if( aValue.isEmpty() )
2442 aValue =
"$$$empty$$$";
2461 "no select control" );
2468 if( !aToken.isEmpty() &&
' '==aToken[ 0 ] )
2470 sal_Int32 nLen = rText.getLength();
2471 if( !nLen ||
' '==rText[nLen-1])
2472 aToken.remove( 0, 1 );
2474 if( !aToken.isEmpty() )
const PropertyValue * pValues
constexpr auto convertTwipToMm100(N n)
constexpr OUStringLiteral sServiceName
FILE * init(int, char **)
static OutputDevice * GetDefaultDevice()
Color GetRGBColor() const
HtmlOptionId GetToken() const
const OUString & GetTokenString() const
const OUString & GetString() const
sal_Int32 GetSNumber() const
EnumT GetEnum(const HTMLOptionEnum< EnumT > *pOptEnums, EnumT nDflt=static_cast< EnumT >(0)) const
HTMLInputType GetInputType() const
sal_uInt32 GetNumber() const
OUString GetPartBeforeLastName() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
virtual SdrInventor GetObjInventor() const
css::uno::Reference< css::awt::XControl > GetUnoControl(const SdrView &_rView, const OutputDevice &_rOut) const
ScriptType GetScriptType(SvKeyValueIterator *) const
const OUString & GetScriptTypeString(SvKeyValueIterator *) const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemSet * GetItemSet() const
SfxMedium * GetMedium() const
css::uno::Reference< css::frame::XModel3 > GetBaseModel() const
static SfxViewFrame * LoadHiddenDocument(SfxObjectShell const &i_rDoc, SfxInterfaceId i_nViewId)
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetColor() const
SvxCSS1LengthType m_eHeightType
SvxCSS1Position m_ePosition
SvxCSS1LengthType m_eWidthType
SvxCSS1LengthType m_eTopType
SvxCSS1LengthType m_eLeftType
const Color & GetValue() const
FontStrikeout GetStrikeout() const
sal_uInt32 GetHeight() const
tools::Long GetRight() const
tools::Long GetLeft() const
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
void Erase(SvMacroItemId nEvent)
SvxMacro & Insert(SvMacroItemId nEvent, const SvxMacro &rMacro)
const SvxMacro * Get(SvMacroItemId nEvent) const
const OUString & GetMacName() const
OUString GetLanguage() const
FontItalic GetPosture() const
FontLineStyle GetLineStyle() const
FontWeight GetWeight() const
std::shared_ptr< HTMLTable > m_xTable
void SetControlSize(const css::uno::Reference< css::drawing::XShape > &rShape, const Size &rTextSz, bool bMinWidth, bool bMinHeight)
sal_uInt16 m_nSelectEntryCnt
void PushContext(std::unique_ptr< HTMLAttrContext > &rCntxt)
std::unique_ptr< HTMLAttrContext > PopContext(HtmlTokenId nToken=HtmlTokenId::NONE)
SwHTMLForm_Impl * m_pFormImpl
void InsertBookmark(const OUString &rName)
css::uno::Reference< css::drawing::XShape > InsertControl(const css::uno::Reference< css::form::XFormComponent > &rFormComp, const css::uno::Reference< css::beans::XPropertySet > &rFCompPropSet, const Size &rSize, sal_Int16 eVertOri, sal_Int16 eHoriOri, SfxItemSet &rCSS1ItemSet, SvxCSS1PropertyInfo &rCSS1PropInfo, const SvxMacroTableDtor &rMacroTable, const std::vector< OUString > &rUnoMacroTable, const std::vector< OUString > &rUnoMacroParamTable, bool bSetPropSet=true, bool bHidden=false)
void EndForm(bool bAppend=true)
SwViewShell * CallStartAction(SwViewShell *pVSh=nullptr, bool bChkPtr=true)
static bool HasStyleOptions(std::u16string_view rStyle, std::u16string_view rId, std::u16string_view rClass, const OUString *pLang=nullptr, const OUString *pDir=nullptr)
rtl::Reference< SwDoc > m_xDoc
bool ParseStyleOptions(const OUString &rStyle, const OUString &rId, const OUString &rClass, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, const OUString *pLang=nullptr, const OUString *pDir=nullptr)
void InsertSelectOption()
std::unique_ptr< SwCSS1Parser > m_pCSS1Parser
void SplitPREListingXMP(HTMLAttrContext *pCntxt)
void NotifyMacroEventRead()
std::vector< SwPending > m_vPendingStack
SfxViewFrame * m_pTempViewFrame
bool AppendTextNode(SwHTMLAppendMode eMode=AM_NORMAL, bool bUpdateNum=true)
void InsertTextAreaText(HtmlTokenId nToken)
void EndContext(HTMLAttrContext *pContext)
sal_uInt16 IncGrfsThatResizeTable()
void NewForm(bool bAppend=true)
bool Resize(sal_uInt16 nAbsAvail, bool bRecalc=false, bool bForce=false, sal_uLong nDelay=0)
Recalculation of table widths for available width that has been passed.
sal_uInt16 GetBrowseWidthByTable(const SwDoc &rDoc) const
Calculates available width by the table-frame or static GetBrowseWidth if no layout exists.
Base class of the Writer document model elements.
const SwStartNode * FindFlyStartNode() const
SwTableNode * FindTableNode()
Search table node, in which it is.
PaM is Point and Mark: a selection of the document model.
const SwPosition * GetPoint() const
Starts a section of nodes in the document model.
const SwTable & GetTable() const
sal_uInt16 DecGrfsThatResize()
SwHTMLTableLayout * GetHTMLTableLayout()
vcl::Window * GetWin() const
SwFrameFormat * GetFrameFormat() const
FontFamily GetFamilyType()
const OUString & GetStyleName() const
const OUString & GetFamilyName() const
rtl_TextEncoding GetCharSet() const
::OutputDevice const * GetOutDev() const
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define TOOLS_WARN_EXCEPTION(area, stream)
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(159)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
HTMLOptionEnum< sal_Int16 > const aHTMLImgVAlignTable[]
HTMLOptionEnum< sal_Int16 > const aHTMLImgHAlignTable[]
#define OOO_STRING_SVTOOLS_HTML_O_onreset
#define OOO_STRING_SVTOOLS_HTML_O_onchange
#define OOO_STRING_SVTOOLS_HTML_WW_physical
#define OOO_STRING_SVTOOLS_HTML_IT_reset
#define OOO_STRING_SVTOOLS_HTML_IT_submit
#define OOO_STRING_SVTOOLS_HTML_WW_soft
#define OOO_STRING_SVTOOLS_HTML_METHOD_get
#define OOO_STRING_SVTOOLS_HTML_O_SDonreset
#define OOO_STRING_SVTOOLS_HTML_WW_off
#define OOO_STRING_SVTOOLS_HTML_O_onfocus
#define OOO_STRING_SVTOOLS_HTML_ET_url
#define OOO_STRING_SVTOOLS_HTML_WW_virtual
#define OOO_STRING_SVTOOLS_HTML_ET_text
#define OOO_STRING_SVTOOLS_HTML_O_SDonfocus
#define OOO_STRING_SVTOOLS_HTML_O_SDonblur
#define OOO_STRING_SVTOOLS_HTML_METHOD_post
#define OOO_STRING_SVTOOLS_HTML_O_onclick
#define OOO_STRING_SVTOOLS_HTML_O_onblur
#define OOO_STRING_SVTOOLS_HTML_O_SDonsubmit
#define OOO_STRING_SVTOOLS_HTML_O_sdaddparam
#define OOO_STRING_SVTOOLS_HTML_O_sdevent
#define OOO_STRING_SVTOOLS_HTML_on
#define OOO_STRING_SVTOOLS_HTML_WW_hard
#define OOO_STRING_SVTOOLS_HTML_ET_multipart
#define OOO_STRING_SVTOOLS_HTML_O_SDonclick
#define OOO_STRING_SVTOOLS_HTML_O_onsubmit
#define OOO_STRING_SVTOOLS_HTML_O_SDonchange
#define HTMLTABLE_RESIZE_NOW
#define LANGUAGE_ENGLISH_US
LineEnd GetSystemLineEnd()
TOOLS_DLLPUBLIC OString convertLineEnd(const OString &rIn, LineEnd eLineEnd)
#define SAL_WARN_IF(condition, area, stream)
SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const &rTheBaseURIRef, OUString const &rTheRelURIRef, Link< OUString *, bool > const &rMaybeFileHdl=Link< OUString *, bool >(), bool bCheckFileExists=true, bool bIgnoreFragment=false, INetURLObject::EncodeMechanism eEncodeMechanism=INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism eDecodeMechanism=INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
OString stripEnd(const OString &rIn, char c)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
VCL_DLLPUBLIC float ConvertFontWeight(FontWeight eWeight)
::std::vector< HTMLOption > HTMLOptions
constexpr auto SFX_INTERFACE_NONE
sal_Int32 GetContentIndex() const
constexpr tools::Long HTML_DFLT_IMG_HEIGHT
constexpr tools::Long HTML_DFLT_IMG_WIDTH