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 );
909 if( nLeftSpace || nRightSpace )
912 aAny2 <<= nLeftSpace;
913 xShapePropSet->setPropertyValue(
"LeftMargin", aAny2 );
915 aAny2 <<= nRightSpace;
916 xShapePropSet->setPropertyValue(
"RightMargin", aAny2 );
936 if( nUpperSpace || nLowerSpace )
939 aAny2 <<= nUpperSpace;
940 xShapePropSet->setPropertyValue(
"TopMargin", aAny2 );
942 aAny2 <<= nLowerSpace;
943 xShapePropSet->setPropertyValue(
"BottomMargin", aAny2 );
946 uno::Reference< beans::XPropertySetInfo > xPropSetInfo =
947 rFCompPropSet->getPropertySetInfo();
948 OUString sPropName =
"BackgroundColor";
950 if( pBrushItem && xPropSetInfo->hasPropertyByName( sPropName ) )
958 rFCompPropSet->setPropertyValue( sPropName, aTmp );
963 sPropName =
"TextColor";
965 if( pColorItem && xPropSetInfo->hasPropertyByName( sPropName ) )
968 rFCompPropSet->setPropertyValue( sPropName, aTmp );
971 sPropName =
"FontHeight";
973 if( pFontHeightItem && xPropSetInfo->hasPropertyByName( sPropName ) )
975 float fVal =
static_cast< float >( pFontHeightItem->
GetHeight() / 20.0 );
977 rFCompPropSet->setPropertyValue( sPropName, aTmp );
982 sPropName =
"FontName";
983 if( xPropSetInfo->hasPropertyByName( sPropName ) )
985 aTmp <<= pFontItem->GetFamilyName();
986 rFCompPropSet->setPropertyValue( sPropName, aTmp );
988 sPropName =
"FontStyleName";
989 if( xPropSetInfo->hasPropertyByName( sPropName ) )
991 aTmp <<= pFontItem->GetStyleName();
992 rFCompPropSet->setPropertyValue( sPropName, aTmp );
994 sPropName =
"FontFamily";
995 if( xPropSetInfo->hasPropertyByName( sPropName ) )
997 aTmp <<= static_cast<sal_Int16>(pFontItem->GetFamily()) ;
998 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1000 sPropName =
"FontCharset";
1001 if( xPropSetInfo->hasPropertyByName( sPropName ) )
1003 aTmp <<= static_cast<sal_Int16>(pFontItem->GetCharSet()) ;
1004 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1006 sPropName =
"FontPitch";
1007 if( xPropSetInfo->hasPropertyByName( sPropName ) )
1009 aTmp <<= static_cast<sal_Int16>(pFontItem->GetPitch()) ;
1010 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1014 sPropName =
"FontWeight";
1016 if( pWeightItem && xPropSetInfo->hasPropertyByName( sPropName ) )
1021 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1024 sPropName =
"FontSlant";
1026 if( pPostureItem && xPropSetInfo->hasPropertyByName( sPropName ) )
1028 aTmp <<= static_cast<sal_Int16>(pPostureItem->
GetPosture());
1029 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1032 sPropName =
"FontUnderline";
1034 if( pUnderlineItem && xPropSetInfo->hasPropertyByName( sPropName ) )
1036 aTmp <<= static_cast<sal_Int16>(pUnderlineItem->
GetLineStyle());
1037 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1040 sPropName =
"FontStrikeout";
1042 if( pCrossedOutItem && xPropSetInfo->hasPropertyByName( sPropName ) )
1044 aTmp <<= static_cast<sal_Int16>(pCrossedOutItem->
GetStrikeout());
1045 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1048 uno::Reference< text::XTextRange > xTextRg;
1049 text::TextContentAnchorType nAnchorType = text::TextContentAnchorType_AS_CHARACTER;
1050 bool bSetPos =
false, bSetSurround =
false;
1051 sal_Int32 nXPos = 0, nYPos = 0;
1052 text::WrapTextMode nSurround = text::WrapTextMode_NONE;
1062 nAnchorType = text::TextContentAnchorType_AT_FRAME;
1063 SwPaM aPaM( *pFlySttNd );
1065 uno::Reference< text::XText > xDummyTextRef;
1070 nAnchorType = text::TextContentAnchorType_AT_PAGE;
1076 nSurround = text::WrapTextMode_THROUGH;
1077 bSetSurround =
true;
1079 else if( SvxAdjust::Left == rCSS1PropInfo.
m_eFloat ||
1080 text::HoriOrientation::LEFT == eHoriOri )
1082 nAnchorType = text::TextContentAnchorType_AT_PARAGRAPH;
1084 nYPos = nUpperSpace;
1086 nSurround = text::WrapTextMode_RIGHT;
1087 bSetSurround =
true;
1094 case text::VertOrientation::TOP:
1095 nVertOri = text::VertOrientation::TOP;
1097 case text::VertOrientation::CENTER:
1098 nVertOri = text::VertOrientation::CENTER;
1100 case text::VertOrientation::BOTTOM:
1101 nVertOri = text::VertOrientation::BOTTOM;
1103 case text::VertOrientation::CHAR_TOP:
1104 nVertOri = text::VertOrientation::CHAR_TOP;
1106 case text::VertOrientation::CHAR_CENTER:
1107 nVertOri = text::VertOrientation::CHAR_CENTER;
1109 case text::VertOrientation::CHAR_BOTTOM:
1110 nVertOri = text::VertOrientation::CHAR_BOTTOM;
1112 case text::VertOrientation::LINE_TOP:
1113 nVertOri = text::VertOrientation::LINE_TOP;
1115 case text::VertOrientation::LINE_CENTER:
1116 nVertOri = text::VertOrientation::LINE_CENTER;
1118 case text::VertOrientation::LINE_BOTTOM:
1119 nVertOri = text::VertOrientation::LINE_BOTTOM;
1127 xShapePropSet->setPropertyValue(
"VertOrient", aTmp );
1130 aTmp <<= nAnchorType ;
1131 xShapePropSet->setPropertyValue(
"AnchorType", aTmp );
1133 if( text::TextContentAnchorType_AT_PAGE == nAnchorType )
1135 aTmp <<= sal_Int16(1) ;
1136 xShapePropSet->setPropertyValue(
"AnchorPageNo", aTmp );
1142 uno::Reference< text::XText > xDummyTextRef;
1147 xShapePropSet->setPropertyValue(
"TextRange", aTmp );
1153 xShapePropSet->setPropertyValue(
"HoriOrient", aTmp );
1155 xShapePropSet->setPropertyValue(
"HoriOrientPosition", aTmp );
1158 xShapePropSet->setPropertyValue(
"VertOrient", aTmp );
1160 xShapePropSet->setPropertyValue(
"VertOrientPosition", aTmp );
1164 aTmp <<= nSurround ;
1165 xShapePropSet->setPropertyValue(
"Surround", aTmp );
1171 uno::Reference< drawing::XControlShape > xControlShape( xShape, UNO_QUERY );
1172 uno::Reference< awt::XControlModel > xControlModel( rFComp, UNO_QUERY );
1173 xControlShape->setControl( xControlModel );
1178 if( !rMacroTable.
empty() || !rUnoMacroTable.empty() )
1181 rFormComps->getCount() - 1,
1182 rMacroTable, rUnoMacroTable, rUnoMacroParamTable,
1188 if( bSetFCompPropSet )
1214 OUString
sName, sTarget;
1215 FormSubmitEncoding nEncType = FormSubmitEncoding_URL;
1216 FormSubmitMethod nMethod = FormSubmitMethod_GET;
1218 std::vector<OUString> aUnoMacroTable;
1219 std::vector<OUString> aUnoMacroParamTable;
1225 for (
size_t i = rHTMLOptions.size();
i; )
1230 bool bSetEvent =
false;
1234 case HtmlOptionId::ACTION:
1237 case HtmlOptionId::METHOD:
1240 case HtmlOptionId::ENCTYPE:
1243 case HtmlOptionId::TARGET:
1246 case HtmlOptionId::NAME:
1250 case HtmlOptionId::SDONSUBMIT:
1253 case HtmlOptionId::ONSUBMIT:
1254 nEvent = SvMacroItemId::HtmlOnSubmitForm;
1258 case HtmlOptionId::SDONRESET:
1261 case HtmlOptionId::ONRESET:
1262 nEvent = SvMacroItemId::HtmlOnResetForm;
1269 aUnoMacroTable, aUnoMacroParamTable );
1276 if( !sEvent.isEmpty() )
1279 OUString aScriptType2;
1281 aScriptType2 = rDfltScriptType;
1282 aMacroTable.
Insert( nEvent,
SvxMacro( sEvent, aScriptType2, eScriptType2 ) );
1287 const uno::Reference< XMultiServiceFactory > & rSrvcMgr =
1289 if( !rSrvcMgr.is() )
1292 uno::Reference< XInterface > xInt;
1293 uno::Reference<XForm> xForm;
1296 xInt = rSrvcMgr->createInstance(
"com.sun.star.form.component.Form");
1299 xForm.set(xInt, UNO_QUERY);
1300 SAL_WARN_IF(!xForm.is(),
"sw",
"no XForm for com.sun.star.form.component.Form?");
1310 uno::Reference< container::XIndexContainer > xFormComps( xForm, UNO_QUERY );
1313 uno::Reference< beans::XPropertySet > xFormPropSet( xForm, UNO_QUERY );
1317 xFormPropSet->setPropertyValue(
"Name", aTmp );
1319 if( !aAction.isEmpty() )
1330 xFormPropSet->setPropertyValue(
"TargetURL",
1334 xFormPropSet->setPropertyValue(
"SubmitMethod",
1338 xFormPropSet->setPropertyValue(
"SubmitEncoding", aTmp );
1340 if( !sTarget.isEmpty() )
1343 xFormPropSet->setPropertyValue(
"TargetFrame", aTmp );
1346 const uno::Reference< container::XIndexContainer > & rForms =
1349 rForms->insertByIndex( rForms->getCount(), aAny );
1350 if( !aMacroTable.
empty() )
1353 rForms->getCount() - 1,
1354 aMacroTable, aUnoMacroTable, aUnoMacroParamTable,
1384 OUString sImgSrc, aId, aClass, aStyle,
sName;
1387 std::vector<OUString> aUnoMacroTable;
1388 std::vector<OUString> aUnoMacroParamTable;
1389 sal_uInt16 nSize = 0;
1390 sal_Int16 nMaxLen = 0;
1394 bool bDisabled =
false, bValue =
false;
1395 bool bSetGrfWidth =
false, bSetGrfHeight =
false;
1396 bool bHidden =
false;
1398 sal_Int16 eVertOri = text::VertOrientation::TOP;
1405 const HTMLOptions& rHTMLOptions = GetOptions( &nKeepCRLFToken );
1406 for (
size_t i = rHTMLOptions.size();
i; )
1411 bool bSetEvent =
false;
1415 case HtmlOptionId::ID:
1418 case HtmlOptionId::STYLE:
1421 case HtmlOptionId::CLASS:
1424 case HtmlOptionId::TYPE:
1427 case HtmlOptionId::NAME:
1430 case HtmlOptionId::VALUE:
1434 case HtmlOptionId::CHECKED:
1437 case HtmlOptionId::DISABLED:
1440 case HtmlOptionId::MAXLENGTH:
1441 nMaxLen =
static_cast<sal_Int16
>(rOption.
GetNumber());
1443 case HtmlOptionId::SIZE:
1444 nSize = o3tl::narrowing<sal_uInt16>(rOption.
GetNumber());
1446 case HtmlOptionId::SRC:
1449 case HtmlOptionId::WIDTH:
1453 case HtmlOptionId::HEIGHT:
1457 case HtmlOptionId::ALIGN:
1463 case HtmlOptionId::TABINDEX:
1468 case HtmlOptionId::SDONFOCUS:
1471 case HtmlOptionId::ONFOCUS:
1472 nEvent = SvMacroItemId::HtmlOnGetFocus;
1476 case HtmlOptionId::SDONBLUR:
1479 case HtmlOptionId::ONBLUR:
1480 nEvent = SvMacroItemId::HtmlOnLoseFocus;
1484 case HtmlOptionId::SDONCLICK:
1487 case HtmlOptionId::ONCLICK:
1488 nEvent = SvMacroItemId::HtmlOnClick;
1492 case HtmlOptionId::SDONCHANGE:
1495 case HtmlOptionId::ONCHANGE:
1496 nEvent = SvMacroItemId::HtmlOnChange;
1500 case HtmlOptionId::SDONSELECT:
1503 case HtmlOptionId::ONSELECT:
1504 nEvent = SvMacroItemId::HtmlOnSelect;
1511 aUnoMacroTable, aUnoMacroParamTable );
1518 if( !sEvent.isEmpty() )
1521 OUString aScriptType2;
1523 aScriptType2 = rDfltScriptType;
1524 aMacroTable.
Insert( nEvent,
SvxMacro( sEvent, aScriptType2, eScriptType2 ) );
1529 if( HTMLInputType::Image==
eType )
1532 if( sImgSrc.isEmpty() )
1539 eVertOri = text::VertOrientation::TOP;
1544 const char *pType =
"TextField";
1545 bool bKeepCRLFInValue =
false;
1548 case HTMLInputType::Checkbox:
1550 bKeepCRLFInValue =
true;
1553 case HTMLInputType::Radio:
1554 pType =
"RadioButton";
1555 bKeepCRLFInValue =
true;
1558 case HTMLInputType::Password:
1559 bKeepCRLFInValue =
true;
1562 case HTMLInputType::Button:
1563 bKeepCRLFInValue =
true;
1565 case HTMLInputType::Submit:
1566 case HTMLInputType::Reset:
1567 pType =
"CommandButton";
1570 case HTMLInputType::Image:
1571 pType =
"ImageButton";
1574 case HTMLInputType::File:
1575 pType =
"FileControl";
1578 case HTMLInputType::Hidden:
1579 pType =
"HiddenControl";
1580 bKeepCRLFInValue =
true;
1587 if( !bKeepCRLFInValue )
1589 sText = sText.replaceAll(
"\r",
"").replaceAll(
"\n",
"");
1592 const uno::Reference< XMultiServiceFactory > & rServiceFactory =
1594 if( !rServiceFactory.is() )
1597 OUString
sServiceName =
"com.sun.star.form.component." +
1598 OUString::createFromAscii(pType);
1599 uno::Reference< XInterface > xInt =
1604 uno::Reference< XFormComponent > xFComp( xInt, UNO_QUERY );
1608 uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY );
1612 xPropSet->setPropertyValue(
"Name", aTmp );
1614 if( HTMLInputType::Hidden !=
eType )
1618 aTmp <<= static_cast<sal_Int16>(nTabIndex) ;
1619 xPropSet->setPropertyValue(
"TabIndex", aTmp );
1624 xPropSet->setPropertyValue(
"Enabled",
Any(
false) );
1631 Size aTextSz( 0, 0 );
1632 bool bMinWidth =
false, bMinHeight =
false;
1633 bool bUseSize =
false;
1636 case HTMLInputType::Checkbox:
1637 case HTMLInputType::Radio:
1641 xPropSet->setPropertyValue(
"RefValue",
1643 aTmp <<= OUString();
1644 xPropSet->setPropertyValue(
"Label",
1649 if( HTMLInputType::Checkbox ==
eType )
1652 xPropSet->setPropertyValue(
"DefaultState", aTmp );
1655 const SvxMacro* pMacro = aMacroTable.
Get( SvMacroItemId::HtmlOnClick );
1658 aMacroTable.
Insert( SvMacroItemId::HtmlOnClickItem, *pMacro );
1659 aMacroTable.
Erase( SvMacroItemId::HtmlOnClick );
1662 bMinWidth = bMinHeight =
true;
1666 case HTMLInputType::Image:
1669 aSz.
setWidth( nSize ? nSize : nWidth );
1677 aTmp <<= FormButtonType_SUBMIT;
1678 xPropSet->setPropertyValue(
"ButtonType", aTmp );
1680 aTmp <<= sal_Int16(0) ;
1681 xPropSet->setPropertyValue(
"Border",
1686 case HTMLInputType::Button:
1687 case HTMLInputType::Submit:
1688 case HTMLInputType::Reset:
1690 FormButtonType eButtonType;
1693 case HTMLInputType::Button:
1694 eButtonType = FormButtonType_PUSH;
1696 case HTMLInputType::Submit:
1697 eButtonType = FormButtonType_SUBMIT;
1698 if (sText.isEmpty())
1701 case HTMLInputType::Reset:
1702 eButtonType = FormButtonType_RESET;
1703 if (sText.isEmpty())
1710 xPropSet->setPropertyValue(
"Label",
1713 aTmp <<= eButtonType;
1714 xPropSet->setPropertyValue(
"ButtonType", aTmp );
1716 bMinWidth = bMinHeight =
true;
1721 case HTMLInputType::Password:
1722 case HTMLInputType::Text:
1723 case HTMLInputType::File:
1724 if( HTMLInputType::File !=
eType )
1727 xPropSet->setPropertyValue(
"DefaultText", aTmp );
1731 xPropSet->setPropertyValue(
"MaxTextLen", aTmp );
1735 if( HTMLInputType::Password ==
eType )
1737 aTmp <<= sal_Int16(
'*') ;
1738 xPropSet->setPropertyValue(
"EchoChar", aTmp );
1749 case HTMLInputType::Hidden:
1750 xPropSet->setPropertyValue(
"HiddenValue", aTmp );
1757 if( bUseSize && nSize>0 )
1761 Size aNewSz( nSize, 0 );
1765 OSL_ENSURE( !aTextSz.
Width(),
"text width is present" );
1775 if( !aId.isEmpty() )
1793 if( HTMLInputType::Image==
eType )
1798 bSetGrfWidth =
true;
1805 bSetGrfHeight =
true;
1814 xFComp, xPropSet, aSz,
1816 aCSS1ItemSet, aCSS1PropInfo,
1817 aMacroTable, aUnoMacroTable,
1818 aUnoMacroParamTable,
false,
1820 if( aTextSz.
Width() || aTextSz.
Height() || bMinWidth || bMinHeight )
1822 OSL_ENSURE( !(bSetGrfWidth || bSetGrfHeight),
"Adjust graphic size???" );
1826 if( HTMLInputType::Radio ==
eType )
1829 xPropSet->setPropertyValue(
"DefaultState", aTmp );
1832 if( HTMLInputType::Image ==
eType )
1836 aTmp <<= URIHelper::SmartRel2Abs(INetURLObject(m_sBaseURL), sImgSrc, Link<OUString *, bool>(),
false);
1837 xPropSet->setPropertyValue(
"ImageURL",
1841 if( bSetGrfWidth || bSetGrfHeight )
1844 new SwHTMLImageWatcher( xShape, bSetGrfWidth, bSetGrfHeight );
1853 OSL_ENSURE( !
m_bTextArea,
"TextArea in TextArea?" );
1855 "TextArea in Control?" );
1864 OUString aId, aClass, aStyle;
1868 std::vector<OUString> aUnoMacroTable;
1869 std::vector<OUString> aUnoMacroParamTable;
1870 sal_uInt16 nRows = 0, nCols = 0;
1871 HTMLWordWrapMode nWrap = HTML_WM_OFF;
1872 bool bDisabled =
false;
1878 for (
size_t i = rHTMLOptions.size();
i; )
1883 bool bSetEvent =
false;
1887 case HtmlOptionId::ID:
1890 case HtmlOptionId::STYLE:
1893 case HtmlOptionId::CLASS:
1896 case HtmlOptionId::NAME:
1899 case HtmlOptionId::DISABLED:
1902 case HtmlOptionId::ROWS:
1903 nRows = o3tl::narrowing<sal_uInt16>(rOption.
GetNumber());
1905 case HtmlOptionId::COLS:
1906 nCols = o3tl::narrowing<sal_uInt16>(rOption.
GetNumber());
1908 case HtmlOptionId::WRAP:
1912 case HtmlOptionId::TABINDEX:
1916 case HtmlOptionId::SDONFOCUS:
1919 case HtmlOptionId::ONFOCUS:
1920 nEvent = SvMacroItemId::HtmlOnGetFocus;
1924 case HtmlOptionId::SDONBLUR:
1927 case HtmlOptionId::ONBLUR:
1928 nEvent = SvMacroItemId::HtmlOnLoseFocus;
1932 case HtmlOptionId::SDONCLICK:
1935 case HtmlOptionId::ONCLICK:
1936 nEvent = SvMacroItemId::HtmlOnClick;
1940 case HtmlOptionId::SDONCHANGE:
1943 case HtmlOptionId::ONCHANGE:
1944 nEvent = SvMacroItemId::HtmlOnChange;
1948 case HtmlOptionId::SDONSELECT:
1951 case HtmlOptionId::ONSELECT:
1952 nEvent = SvMacroItemId::HtmlOnSelect;
1959 aUnoMacroTable, aUnoMacroParamTable );
1966 if( !sEvent.isEmpty() )
1976 const uno::Reference< lang::XMultiServiceFactory > & rSrvcMgr =
1978 if( !rSrvcMgr.is() )
1983 uno::Reference< uno::XInterface > xInt = rSrvcMgr->createInstance(
1984 "com.sun.star.form.component.TextField" );
1991 uno::Reference< XFormComponent > xFComp( xInt, UNO_QUERY );
1992 OSL_ENSURE( xFComp.is(),
"no FormComponent?" );
1994 uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY );
1998 xPropSet->setPropertyValue(
"Name", aTmp );
2001 xPropSet->setPropertyValue(
"MultiLine", aTmp );
2002 xPropSet->setPropertyValue(
"VScroll", aTmp );
2003 if( HTML_WM_OFF == nWrap )
2004 xPropSet->setPropertyValue(
"HScroll", aTmp );
2005 if( HTML_WM_HARD == nWrap )
2006 xPropSet->setPropertyValue(
"HardLineBreaks", aTmp );
2010 aTmp <<= static_cast<sal_Int16>(nTabIndex) ;
2011 xPropSet->setPropertyValue(
"TabIndex", aTmp );
2018 xPropSet->setPropertyValue(
"Enabled",
Any(
false) );
2028 Size aTextSz( nCols, nRows );
2035 if( !aId.isEmpty() )
2055 uno::Reference< drawing::XShape > xShape =
InsertControl( xFComp, xPropSet, aSz,
2057 aCSS1ItemSet, aCSS1PropInfo,
2058 aMacroTable, aUnoMacroTable,
2059 aUnoMacroParamTable );
2064 std::unique_ptr<HTMLAttrContext> xCntxt(
new HTMLAttrContext(HtmlTokenId::TEXTAREA_ON));
2076 OSL_ENSURE(
m_bTextArea,
"no TextArea or wrong type" );
2078 "TextArea missing" );
2080 const uno::Reference< beans::XPropertySet > & rPropSet =
2085 rPropSet->setPropertyValue(
"DefaultText", aTmp );
2091 std::unique_ptr<HTMLAttrContext> xCntxt(
PopContext(HtmlTokenId::TEXTAREA_ON));
2103 OSL_ENSURE(
m_bTextArea,
"no TextArea or wrong type" );
2105 "TextArea missing" );
2110 case HtmlTokenId::TEXTTOKEN:
2113 case HtmlTokenId::NEWPARA:
2119 rText += sSaveToken;
2120 if( !aToken.isEmpty() )
2135 OSL_ENSURE( !
m_bSelect,
"Select in Select?" );
2137 "Select in Control?" );
2142 OUString aId, aClass, aStyle;
2146 std::vector<OUString> aUnoMacroTable;
2147 std::vector<OUString> aUnoMacroParamTable;
2148 bool bMultiple =
false;
2149 bool bDisabled =
false;
2156 for (
size_t i = rHTMLOptions.size();
i; )
2161 bool bSetEvent =
false;
2165 case HtmlOptionId::ID:
2168 case HtmlOptionId::STYLE:
2171 case HtmlOptionId::CLASS:
2174 case HtmlOptionId::NAME:
2177 case HtmlOptionId::MULTIPLE:
2180 case HtmlOptionId::DISABLED:
2183 case HtmlOptionId::SIZE:
2187 case HtmlOptionId::TABINDEX:
2191 case HtmlOptionId::SDONFOCUS:
2194 case HtmlOptionId::ONFOCUS:
2195 nEvent = SvMacroItemId::HtmlOnGetFocus;
2199 case HtmlOptionId::SDONBLUR:
2202 case HtmlOptionId::ONBLUR:
2203 nEvent = SvMacroItemId::HtmlOnLoseFocus;
2207 case HtmlOptionId::SDONCLICK:
2210 case HtmlOptionId::ONCLICK:
2211 nEvent = SvMacroItemId::HtmlOnClick;
2215 case HtmlOptionId::SDONCHANGE:
2218 case HtmlOptionId::ONCHANGE:
2219 nEvent = SvMacroItemId::HtmlOnChange;
2226 aUnoMacroTable, aUnoMacroParamTable );
2233 if( !sEvent.isEmpty() )
2243 const uno::Reference< lang::XMultiServiceFactory > & rSrvcMgr =
2245 if( !rSrvcMgr.is() )
2250 uno::Reference< uno::XInterface > xInt = rSrvcMgr->createInstance(
2251 "com.sun.star.form.component.ListBox" );
2258 uno::Reference< XFormComponent > xFComp( xInt, UNO_QUERY );
2259 OSL_ENSURE(xFComp.is(),
"no FormComponent?");
2261 uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY );
2265 xPropSet->setPropertyValue(
"Name", aTmp );
2269 aTmp <<= static_cast<sal_Int16>(nTabIndex) ;
2270 xPropSet->setPropertyValue(
"TabIndex", aTmp );
2275 xPropSet->setPropertyValue(
"Enabled",
Any(
false) );
2278 Size aTextSz( 0, 0 );
2279 bool bMinWidth =
true, bMinHeight =
true;
2282 xPropSet->setPropertyValue(
"Dropdown",
Any(
true) );
2291 xPropSet->setPropertyValue(
"MultiSelection",
Any(
true) );
2302 if( !aId.isEmpty() )
2325 uno::Reference< drawing::XShape > xShape =
InsertControl( xFComp, xPropSet, aSz,
2327 aCSS1ItemSet, aCSS1PropInfo,
2328 aMacroTable, aUnoMacroTable,
2329 aUnoMacroParamTable );
2332 if( aTextSz.
Height() || bMinWidth || bMinHeight )
2336 std::unique_ptr<HTMLAttrContext> xCntxt(
new HTMLAttrContext(HtmlTokenId::SELECT_ON));
2351 "no select control" );
2353 const uno::Reference< beans::XPropertySet > & rPropSet =
2359 Sequence<OUString> aList(
static_cast<sal_Int32
>(nEntryCnt) );
2360 Sequence<OUString> aValueList(
static_cast<sal_Int32
>(nEntryCnt) );
2361 OUString *pStrings = aList.getArray();
2362 OUString *
pValues = aValueList.getArray();
2364 for(
size_t i = 0;
i < nEntryCnt; ++
i)
2368 pStrings[
i] = sText;
2374 rPropSet->setPropertyValue(
"StringItemList",
Any(aList) );
2376 rPropSet->setPropertyValue(
"ListSourceType",
Any(ListSourceType_VALUELIST) );
2378 rPropSet->setPropertyValue(
"ListSource",
Any(aValueList) );
2387 Sequence<sal_Int16> aSelList(
static_cast<sal_Int32
>(nSelCnt) );
2388 sal_Int16 *pSels = aSelList.getArray();
2389 for(
size_t i = 0;
i < nSelCnt; ++
i)
2393 rPropSet->setPropertyValue(
"DefaultSelection",
Any(aSelList) );
2404 Size aTextSz( -1, 0 );
2411 std::unique_ptr<HTMLAttrContext> xCntxt(
PopContext(HtmlTokenId::SELECT_ON));
2425 "no Select-Control" );
2431 for (
size_t i = rHTMLOptions.size();
i; )
2436 case HtmlOptionId::ID:
2439 case HtmlOptionId::SELECTED:
2442 case HtmlOptionId::VALUE:
2444 if( aValue.isEmpty() )
2445 aValue =
"$$$empty$$$";
2464 "no select control" );
2471 if( !aToken.isEmpty() &&
' '==aToken[ 0 ] )
2473 sal_Int32 nLen = rText.getLength();
2474 if( !nLen ||
' '==rText[nLen-1])
2475 aToken.remove( 0, 1 );
2477 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)
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
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
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< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(165)
constexpr TypedWhichId< SvxRightMarginItem > RES_MARGIN_RIGHT(93)
constexpr TypedWhichId< SvxTextLeftMarginItem > RES_MARGIN_TEXTLEFT(92)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(98)
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