22 #include <string_view>
36 #include <sfx2/sfxsids.hrc>
50 #include <com/sun/star/form/ListSourceType.hpp>
51 #include <com/sun/star/form/FormButtonType.hpp>
52 #include <com/sun/star/form/FormSubmitEncoding.hpp>
53 #include <com/sun/star/form/FormSubmitMethod.hpp>
54 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
55 #include <com/sun/star/script/XEventAttacherManager.hpp>
56 #include <com/sun/star/text/WrapTextMode.hpp>
57 #include <com/sun/star/text/HoriOrientation.hpp>
58 #include <com/sun/star/text/VertOrientation.hpp>
59 #include <com/sun/star/text/TextContentAnchorType.hpp>
60 #include <com/sun/star/container/XIndexContainer.hpp>
61 #include <com/sun/star/drawing/XControlShape.hpp>
62 #include <com/sun/star/awt/XTextLayoutConstrains.hpp>
63 #include <com/sun/star/awt/XLayoutConstrains.hpp>
64 #include <com/sun/star/awt/XImageConsumer.hpp>
65 #include <com/sun/star/awt/ImageStatus.hpp>
66 #include <com/sun/star/form/XImageProducerSupplier.hpp>
67 #include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
68 #include <com/sun/star/form/XForm.hpp>
97 {
nullptr, FormSubmitMethod(0) }
105 {
nullptr, FormSubmitEncoding(0) }
126 SvMacroItemId::HtmlOnSubmitForm,
127 SvMacroItemId::HtmlOnResetForm,
128 SvMacroItemId::HtmlOnGetFocus,
129 SvMacroItemId::HtmlOnLoseFocus,
130 SvMacroItemId::HtmlOnClick,
131 SvMacroItemId::HtmlOnClickItem,
132 SvMacroItemId::HtmlOnChange,
133 SvMacroItemId::HtmlOnSelect,
143 "XApproveActionListener",
168 OOO_STRING_SVTOOLS_HTML_O_SDonclick,
180 OOO_STRING_SVTOOLS_HTML_O_onclick,
193 uno::Reference< container::XIndexContainer >
m_xForms;
213 m_pHeaderAttrs( pDSh ? pDSh->GetHeaderAttributes() : nullptr )
215 OSL_ENSURE( m_pDocShell,
"No DocShell, no Controls" );
220 const uno::Reference< drawing::XShapes >&
GetShapes();
223 const uno::Reference< container::XIndexContainer >&
GetForms();
225 const uno::Reference< container::XIndexContainer >&
GetFormComps()
const
230 void SetFormComps(
const uno::Reference< container::XIndexContainer >& r )
244 m_xFCompPropertySet = r;
250 void SetShape(
const uno::Reference< drawing::XShape >& r ) { m_xShape = r; }
258 m_aStringList.clear();
264 m_aValueList.clear();
270 m_aSelectedList.clear();
284 "XServiceFactory not received from model" );
295 OSL_ENSURE( xTextDoc.is(),
296 "drawing::XDrawPageSupplier not received from model" );
298 OSL_ENSURE( m_xDrawPage.is(),
"drawing::XDrawPage not received" );
309 uno::Reference< XFormsSupplier > xFormsSupplier(
m_xDrawPage, UNO_QUERY );
310 OSL_ENSURE( xFormsSupplier.is(),
311 "XFormsSupplier not received from drawing::XDrawPage" );
313 uno::Reference< container::XNameContainer > xNameCont =
314 xFormsSupplier->getForms();
315 m_xForms.set( xNameCont, UNO_QUERY );
317 OSL_ENSURE(
m_xForms.is(),
"XForms not received" );
332 "XShapes not received from drawing::XDrawPage" );
338 const uno::Reference< script::XEventAttacherManager >&
344 uno::Reference< script::XEventAttacherManager >(
m_xFormComps, UNO_QUERY );
346 "uno::Reference< XEventAttacherManager > not received from xFormComps" );
352 const uno::Reference< script::XEventAttacherManager >&
361 uno::Reference< script::XEventAttacherManager >(
m_xForms, UNO_QUERY );
363 "uno::Reference< XEventAttacherManager > not received from xForms" );
372 class SwHTMLImageWatcher :
373 public cppu::WeakImplHelper< awt::XImageConsumer, XEventListener >
375 uno::Reference< drawing::XShape > xShape;
376 uno::Reference< XImageProducerSupplier > xSrc;
377 uno::Reference< awt::XImageConsumer > xThis;
384 SwHTMLImageWatcher(
const uno::Reference< drawing::XShape > & rShape,
385 bool bWidth,
bool bHeight );
389 void start() { xSrc->getImageProducer()->startProduction(); }
394 virtual void SAL_CALL
init( sal_Int32 Width, sal_Int32 Height)
override;
395 virtual void SAL_CALL setColorModel(
396 sal_Int16 BitCount,
const uno::Sequence< sal_Int32 >& RGBAPal,
397 sal_Int32 RedMask, sal_Int32 GreenMask, sal_Int32 BlueMask,
399 virtual void SAL_CALL setPixelsByBytes(
400 sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height,
401 const uno::Sequence< sal_Int8 >& ProducerData,
402 sal_Int32 Offset, sal_Int32 Scansize)
override;
403 virtual void SAL_CALL setPixelsByLongs(
404 sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height,
405 const uno::Sequence< sal_Int32 >& ProducerData,
406 sal_Int32 Offset, sal_Int32 Scansize)
override;
407 virtual void SAL_CALL complete(
409 const uno::Reference< awt::XImageProducer > & Producer)
override;
412 virtual void SAL_CALL disposing(
const EventObject& Source )
override;
417 SwHTMLImageWatcher::SwHTMLImageWatcher(
418 const uno::Reference< drawing::XShape >& rShape,
419 bool bWidth,
bool bHeight ) :
421 bSetWidth( bWidth ), bSetHeight( bHeight )
424 uno::Reference< drawing::XControlShape > xControlShape( xShape, UNO_QUERY );
425 uno::Reference< awt::XControlModel > xControlModel(
426 xControlShape->getControl() );
427 xSrc.set( xControlModel, UNO_QUERY );
428 OSL_ENSURE( xSrc.is(),
"No XImageProducerSupplier" );
431 uno::Reference< XEventListener > xEvtLstnr =
static_cast<XEventListener *
>(
this);
432 uno::Reference< XComponent > xComp( xShape, UNO_QUERY );
433 xComp->addEventListener( xEvtLstnr );
437 xThis =
static_cast<awt::XImageConsumer *
>(
this);
440 xSrc->getImageProducer()->addConsumer( xThis );
443 void SwHTMLImageWatcher::clear()
446 uno::Reference< XEventListener > xEvtLstnr =
static_cast<XEventListener *
>(
this);
447 uno::Reference< XComponent > xComp( xShape, UNO_QUERY );
448 xComp->removeEventListener( xEvtLstnr );
451 uno::Reference<awt::XImageProducer> xProd = xSrc->getImageProducer();
453 xProd->removeConsumer( xThis );
456 void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height )
458 OSL_ENSURE( bSetWidth || bSetHeight,
459 "Width or height has to be adjusted" );
464 if( !Width && !Height )
468 aNewSz.Width = Width;
469 aNewSz.Height = Height;
472 Size aTmp(aNewSz.Width, aNewSz.Height);
475 aNewSz.Width = aTmp.Width();
476 aNewSz.Height = aTmp.Height();
479 if( !bSetWidth || !bSetHeight )
481 awt::Size aSz( xShape->getSize() );
482 if( bSetWidth && aNewSz.Height )
484 aNewSz.Width *= aSz.Height;
485 aNewSz.Width /= aNewSz.Height;
486 aNewSz.Height = aSz.Height;
488 if( bSetHeight && aNewSz.Width )
490 aNewSz.Height *= aSz.Width;
491 aNewSz.Height /= aNewSz.Width;
492 aNewSz.Width = aSz.Width;
495 if( aNewSz.Width <
MINFLY )
497 if( aNewSz.Height <
MINFLY )
500 xShape->setSize( aNewSz );
507 uno::Reference< beans::XPropertySet > xPropSet( xShape, UNO_QUERY );
508 SwXShape *pSwShape = comphelper::getUnoTunnelImplementation<SwXShape>(xPropSet);
510 OSL_ENSURE( pSwShape,
"Where is SW-Shape?" );
525 const sal_uInt16 nBrowseWidth =
530 pLayout->
Resize( nBrowseWidth,
true,
true,
544 void SwHTMLImageWatcher::setColorModel(
545 sal_Int16,
const Sequence< sal_Int32 >&, sal_Int32, sal_Int32,
546 sal_Int32, sal_Int32 )
550 void SwHTMLImageWatcher::setPixelsByBytes(
551 sal_Int32, sal_Int32, sal_Int32, sal_Int32,
552 const Sequence< sal_Int8 >&, sal_Int32, sal_Int32 )
556 void SwHTMLImageWatcher::setPixelsByLongs(
557 sal_Int32, sal_Int32, sal_Int32, sal_Int32,
558 const Sequence< sal_Int32 >&, sal_Int32, sal_Int32 )
562 void SwHTMLImageWatcher::complete( sal_Int32
Status,
563 const uno::Reference< awt::XImageProducer >& )
565 if( awt::ImageStatus::IMAGESTATUS_ERROR == Status || awt::ImageStatus::IMAGESTATUS_ABORTED == Status )
573 void SwHTMLImageWatcher::disposing(
const lang::EventObject& evt)
575 uno::Reference< awt::XImageConsumer > xTmp;
578 if( evt.Source == xShape )
581 xTmp =
static_cast<awt::XImageConsumer*
>(
this);
593 const uno::Reference< beans::XPropertySet >& rPropSet )
597 GetDefaultFontFlags::OnlyOne ) );
600 rPropSet->setPropertyValue(
"FontName", aTmp );
603 rPropSet->setPropertyValue(
"FontStyleName",
607 rPropSet->setPropertyValue(
"FontFamily", aTmp );
609 aTmp <<= static_cast<sal_Int16>(aFixedFont.
GetCharSet());
610 rPropSet->setPropertyValue(
"FontCharset",
613 aTmp <<= static_cast<sal_Int16>(aFixedFont.
GetPitch());
614 rPropSet->setPropertyValue(
"FontPitch", aTmp );
616 aTmp <<= float(10.0);
617 rPropSet->setPropertyValue(
"FontHeight", aTmp );
625 if( !rTextSz.
Width() && !rTextSz.
Height() && !bMinWidth && !bMinHeight )
630 uno::Reference< beans::XPropertySet > xPropSet( rShape, UNO_QUERY );
650 pVSh =
m_xDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
652 m_xDoc->GetIDocumentUndoRedo().DoUndo(
false);
656 SwXShape *pSwShape = comphelper::getUnoTunnelImplementation<SwXShape>(xPropSet);
658 OSL_ENSURE( pSwShape,
"Where is SW-Shape?" );
662 OSL_ENSURE( pFrameFormat &&
RES_DRAWFRMFMT == pFrameFormat->
Which(),
"No DrawFrameFormat" );
666 OSL_ENSURE( pObj,
"SdrObject not found" );
667 OSL_ENSURE( pObj && SdrInventor::FmForm == pObj->GetObjInventor(),
"wrong Inventor" );
672 uno::Reference< awt::XControl > xControl;
673 if ( pDrawView && pVSh->
GetWin() && pFormObj )
676 awt::Size aSz( rShape->getSize() );
677 awt::Size aNewSz( 0, 0 );
682 if( bMinWidth || bMinHeight )
684 uno::Reference< awt::XLayoutConstrains > xLC( xControl, UNO_QUERY );
685 awt::Size aTmpSz( xLC->getPreferredSize() );
687 aNewSz.Width = aTmpSz.Width;
689 aNewSz.Height = aTmpSz.Height;
693 uno::Reference< awt::XTextLayoutConstrains > xLC( xControl, UNO_QUERY );
694 OSL_ENSURE( xLC.is(),
"no XTextLayoutConstrains" );
697 awt::Size aTmpSz( rTextSz.
Width(), rTextSz.
Height() );
698 if( -1 == rTextSz.
Width() )
703 aTmpSz = xLC->getMinimumSize( static_cast< sal_Int16 >(aTmpSz.Width), static_cast< sal_Int16 >(aTmpSz.Height) );
704 if( rTextSz.
Width() )
705 aNewSz.Width = aTmpSz.Width;
707 aNewSz.Height = aTmpSz.Height;
714 Size aTmpSz( aNewSz.Width, aNewSz.Height );
717 aNewSz.Width = aTmpSz.
Width();
718 aNewSz.Height = aTmpSz.
Height();
722 if( aNewSz.Width <
MINLAY )
724 aSz.Width = aNewSz.Width;
728 if( aNewSz.Height <
MINLAY )
730 aSz.Height = aNewSz.Height;
733 rShape->setSize( aSz );
737 const uno::Reference< script::XEventAttacherManager > & rEvtMn,
739 const std::vector<OUString>& rUnoMacroTable,
740 const std::vector<OUString>& rUnoMacroParamTable,
741 const OUString& rType )
744 sal_Int32 nEvents = 0;
753 for(
const auto &rStr : rUnoMacroTable )
756 if( rStr.getToken( 0,
'-', nIndex ).isEmpty() || -1 == nIndex )
758 if( rStr.getToken( 0,
'-', nIndex ).isEmpty() || -1 == nIndex )
760 if( nIndex < rStr.getLength() )
767 Sequence<script::ScriptEventDescriptor> aDescs( nEvents );
768 script::ScriptEventDescriptor* pDescs = aDescs.getArray();
769 sal_Int32 nEvent = 0;
776 script::ScriptEventDescriptor& rDesc = pDescs[nEvent++];
785 for(
const auto &rStr : rUnoMacroTable )
788 OUString sListener( rStr.getToken( 0,
'-', nIndex ) );
789 if( sListener.isEmpty() || -1 == nIndex )
792 OUString sMethod( rStr.getToken( 0,
'-', nIndex ) );
793 if( sMethod.isEmpty() || -1 == nIndex )
796 OUString sCode( rStr.copy( nIndex ) );
797 if( sCode.isEmpty() )
800 script::ScriptEventDescriptor& rDesc = pDescs[nEvent++];
801 rDesc.ListenerType = sListener;
802 rDesc.EventMethod = sMethod;
803 rDesc.ScriptType = rType;
804 rDesc.ScriptCode = sCode;
805 rDesc.AddListenerParam.clear();
807 if(!rUnoMacroParamTable.empty())
809 OUString sSearch = sListener +
"-" +sMethod +
"-";
810 sal_Int32 nLen = sSearch.getLength();
811 for(
const auto & rParam : rUnoMacroParamTable)
813 if( rParam.startsWith( sSearch ) && rParam.getLength() > nLen )
815 rDesc.AddListenerParam = rParam.copy(nLen);
821 rEvtMn->registerScriptEvents( nPos, aDescs );
826 std::vector<OUString>& rUnoMacroTable,
827 std::vector<OUString>& rUnoMacroParamTable )
833 rUnoMacroTable.push_back(aEvent);
839 rUnoMacroParamTable.push_back(aParam);
844 const uno::Reference< XFormComponent > & rFComp,
845 const uno::Reference< beans::XPropertySet > & rFCompPropSet,
846 const Size& rSize, sal_Int16 eVertOri, sal_Int16 eHoriOri,
848 const SvxMacroTableDtor& rMacroTable,
const std::vector<OUString>& rUnoMacroTable,
849 const std::vector<OUString>& rUnoMacroParamTable,
bool bSetFCompPropSet,
852 uno::Reference< drawing::XShape > xShape;
854 const uno::Reference< container::XIndexContainer > & rFormComps =
857 rFormComps->insertByIndex( rFormComps->getCount(), aAny );
862 sal_Int32 nLeftSpace = 0;
863 sal_Int32 nRightSpace = 0;
864 sal_Int32 nUpperSpace = 0;
865 sal_Int32 nLowerSpace = 0;
867 const uno::Reference< XMultiServiceFactory > & rServiceFactory =
869 if( !rServiceFactory.is() )
872 uno::Reference< XInterface > xCreate = rServiceFactory->createInstance(
"com.sun.star.drawing.ControlShape" );
876 xShape.set( xCreate, UNO_QUERY );
878 OSL_ENSURE( xShape.is(),
"XShape not received" );
880 aTmpSz.Width = rSize.
Width();
881 aTmpSz.Height = rSize.
Height();
882 xShape->setSize( aTmpSz );
884 uno::Reference< beans::XPropertySet > xShapePropSet( xCreate, UNO_QUERY );
907 if( nLeftSpace || nRightSpace )
910 aAny2 <<= nLeftSpace;
911 xShapePropSet->setPropertyValue(
"LeftMargin", aAny2 );
913 aAny2 <<= nRightSpace;
914 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";
951 xPropSetInfo->hasPropertyByName( sPropName ) )
959 rFCompPropSet->setPropertyValue( sPropName, aTmp );
964 sPropName =
"TextColor";
967 xPropSetInfo->hasPropertyByName( sPropName ) )
971 rFCompPropSet->setPropertyValue( sPropName, aTmp );
974 sPropName =
"FontHeight";
977 xPropSetInfo->hasPropertyByName( sPropName ) )
979 float fVal =
static_cast< float >(
982 rFCompPropSet->setPropertyValue( sPropName, aTmp );
989 sPropName =
"FontName";
990 if( xPropSetInfo->hasPropertyByName( sPropName ) )
993 rFCompPropSet->setPropertyValue( sPropName, aTmp );
995 sPropName =
"FontStyleName";
996 if( xPropSetInfo->hasPropertyByName( sPropName ) )
999 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1001 sPropName =
"FontFamily";
1002 if( xPropSetInfo->hasPropertyByName( sPropName ) )
1004 aTmp <<= static_cast<sal_Int16>(pFontItem->
GetFamily()) ;
1005 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1007 sPropName =
"FontCharset";
1008 if( xPropSetInfo->hasPropertyByName( sPropName ) )
1010 aTmp <<= static_cast<sal_Int16>(pFontItem->
GetCharSet()) ;
1011 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1013 sPropName =
"FontPitch";
1014 if( xPropSetInfo->hasPropertyByName( sPropName ) )
1016 aTmp <<= static_cast<sal_Int16>(pFontItem->
GetPitch()) ;
1017 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1021 sPropName =
"FontWeight";
1024 xPropSetInfo->hasPropertyByName( sPropName ) )
1027 static_cast<const SvxWeightItem *>(pItem)->GetWeight() );
1029 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1032 sPropName =
"FontSlant";
1035 xPropSetInfo->hasPropertyByName( sPropName ) )
1037 aTmp <<= static_cast<sal_Int16>(
static_cast<const SvxPostureItem *
>(pItem)->GetPosture());
1038 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1041 sPropName =
"FontUnderline";
1044 xPropSetInfo->hasPropertyByName( sPropName ) )
1046 aTmp <<= static_cast<sal_Int16>(
static_cast<const SvxUnderlineItem *
>(pItem)->GetLineStyle());
1047 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1050 sPropName =
"FontStrikeout";
1053 xPropSetInfo->hasPropertyByName( sPropName ) )
1055 aTmp <<= static_cast<sal_Int16>(
static_cast<const SvxCrossedOutItem *
>(pItem)->GetStrikeout());
1056 rFCompPropSet->setPropertyValue( sPropName, aTmp );
1059 uno::Reference< text::XTextRange > xTextRg;
1060 text::TextContentAnchorType nAnchorType = text::TextContentAnchorType_AS_CHARACTER;
1061 bool bSetPos =
false, bSetSurround =
false;
1062 sal_Int32 nXPos = 0, nYPos = 0;
1063 text::WrapTextMode nSurround = text::WrapTextMode_NONE;
1073 nAnchorType = text::TextContentAnchorType_AT_FRAME;
1074 SwPaM aPaM( *pFlySttNd );
1076 uno::Reference< text::XText > xDummyTextRef;
1081 nAnchorType = text::TextContentAnchorType_AT_PAGE;
1087 nSurround = text::WrapTextMode_THROUGH;
1088 bSetSurround =
true;
1090 else if( SvxAdjust::Left == rCSS1PropInfo.
m_eFloat ||
1091 text::HoriOrientation::LEFT == eHoriOri )
1093 nAnchorType = text::TextContentAnchorType_AT_PARAGRAPH;
1095 nYPos = nUpperSpace;
1097 nSurround = text::WrapTextMode_RIGHT;
1098 bSetSurround =
true;
1105 case text::VertOrientation::TOP:
1106 nVertOri = text::VertOrientation::TOP;
1108 case text::VertOrientation::CENTER:
1109 nVertOri = text::VertOrientation::CENTER;
1111 case text::VertOrientation::BOTTOM:
1112 nVertOri = text::VertOrientation::BOTTOM;
1114 case text::VertOrientation::CHAR_TOP:
1115 nVertOri = text::VertOrientation::CHAR_TOP;
1117 case text::VertOrientation::CHAR_CENTER:
1118 nVertOri = text::VertOrientation::CHAR_CENTER;
1120 case text::VertOrientation::CHAR_BOTTOM:
1121 nVertOri = text::VertOrientation::CHAR_BOTTOM;
1123 case text::VertOrientation::LINE_TOP:
1124 nVertOri = text::VertOrientation::LINE_TOP;
1126 case text::VertOrientation::LINE_CENTER:
1127 nVertOri = text::VertOrientation::LINE_CENTER;
1129 case text::VertOrientation::LINE_BOTTOM:
1130 nVertOri = text::VertOrientation::LINE_BOTTOM;
1138 xShapePropSet->setPropertyValue(
"VertOrient", aTmp );
1141 aTmp <<= nAnchorType ;
1142 xShapePropSet->setPropertyValue(
"AnchorType", aTmp );
1144 if( text::TextContentAnchorType_AT_PAGE == nAnchorType )
1146 aTmp <<= sal_Int16(1) ;
1147 xShapePropSet->setPropertyValue(
"AnchorPageNo", aTmp );
1153 uno::Reference< text::XText > xDummyTextRef;
1158 xShapePropSet->setPropertyValue(
"TextRange", aTmp );
1164 xShapePropSet->setPropertyValue(
"HoriOrient", aTmp );
1166 xShapePropSet->setPropertyValue(
"HoriOrientPosition", aTmp );
1169 xShapePropSet->setPropertyValue(
"VertOrient", aTmp );
1171 xShapePropSet->setPropertyValue(
"VertOrientPosition", aTmp );
1175 aTmp <<= nSurround ;
1176 xShapePropSet->setPropertyValue(
"Surround", aTmp );
1182 uno::Reference< drawing::XControlShape > xControlShape( xShape, UNO_QUERY );
1183 uno::Reference< awt::XControlModel > xControlModel( rFComp, UNO_QUERY );
1184 xControlShape->setControl( xControlModel );
1189 if( !rMacroTable.
empty() || !rUnoMacroTable.empty() )
1192 rFormComps->getCount() - 1,
1193 rMacroTable, rUnoMacroTable, rUnoMacroParamTable,
1199 if( bSetFCompPropSet )
1225 OUString
sName, sTarget;
1226 FormSubmitEncoding nEncType = FormSubmitEncoding_URL;
1227 FormSubmitMethod nMethod = FormSubmitMethod_GET;
1229 std::vector<OUString> aUnoMacroTable;
1230 std::vector<OUString> aUnoMacroParamTable;
1236 for (
size_t i = rHTMLOptions.size();
i; )
1241 bool bSetEvent =
false;
1245 case HtmlOptionId::ACTION:
1248 case HtmlOptionId::METHOD:
1249 nMethod = rOption.
GetEnum( aHTMLFormMethodTable, nMethod );
1251 case HtmlOptionId::ENCTYPE:
1252 nEncType = rOption.
GetEnum( aHTMLFormEncTypeTable, nEncType );
1254 case HtmlOptionId::TARGET:
1257 case HtmlOptionId::NAME:
1261 case HtmlOptionId::SDONSUBMIT:
1264 case HtmlOptionId::ONSUBMIT:
1265 nEvent = SvMacroItemId::HtmlOnSubmitForm;
1269 case HtmlOptionId::SDONRESET:
1272 case HtmlOptionId::ONRESET:
1273 nEvent = SvMacroItemId::HtmlOnResetForm;
1280 aUnoMacroTable, aUnoMacroParamTable );
1287 if( !sEvent.isEmpty() )
1290 OUString aScriptType2;
1292 aScriptType2 = rDfltScriptType;
1293 aMacroTable.
Insert( nEvent,
SvxMacro( sEvent, aScriptType2, eScriptType2 ) );
1298 const uno::Reference< XMultiServiceFactory > & rSrvcMgr =
1300 if( !rSrvcMgr.is() )
1303 uno::Reference< XInterface > xInt;
1306 xInt = rSrvcMgr->createInstance(
"com.sun.star.form.component.Form");
1308 catch (
const css::lang::ServiceNotRegisteredException&)
1314 uno::Reference< XForm > xForm( xInt, UNO_QUERY );
1315 OSL_ENSURE( xForm.is(),
"no Form?" );
1317 uno::Reference< container::XIndexContainer > xFormComps( xForm, UNO_QUERY );
1320 uno::Reference< beans::XPropertySet > xFormPropSet( xForm, UNO_QUERY );
1324 xFormPropSet->setPropertyValue(
"Name", aTmp );
1326 if( !aAction.isEmpty() )
1337 xFormPropSet->setPropertyValue(
"TargetURL",
1341 xFormPropSet->setPropertyValue(
"SubmitMethod",
1345 xFormPropSet->setPropertyValue(
"SubmitEncoding", aTmp );
1347 if( !sTarget.isEmpty() )
1350 xFormPropSet->setPropertyValue(
"TargetFrame", aTmp );
1353 const uno::Reference< container::XIndexContainer > & rForms =
1356 rForms->insertByIndex( rForms->getCount(), aAny );
1357 if( !aMacroTable.
empty() )
1360 rForms->getCount() - 1,
1361 aMacroTable, aUnoMacroTable, aUnoMacroParamTable,
1391 OUString sImgSrc,
aId, aClass, aStyle,
sName;
1394 std::vector<OUString> aUnoMacroTable;
1395 std::vector<OUString> aUnoMacroParamTable;
1396 sal_uInt16 nSize = 0;
1397 sal_Int16 nMaxLen = 0;
1401 bool bDisabled =
false, bValue =
false;
1402 bool bSetGrfWidth =
false, bSetGrfHeight =
false;
1403 bool bHidden =
false;
1405 sal_Int16 eVertOri = text::VertOrientation::TOP;
1412 const HTMLOptions& rHTMLOptions = GetOptions( &nKeepCRLFToken );
1413 for (
size_t i = rHTMLOptions.size();
i; )
1418 bool bSetEvent =
false;
1422 case HtmlOptionId::ID:
1425 case HtmlOptionId::STYLE:
1428 case HtmlOptionId::CLASS:
1431 case HtmlOptionId::TYPE:
1434 case HtmlOptionId::NAME:
1437 case HtmlOptionId::VALUE:
1441 case HtmlOptionId::CHECKED:
1444 case HtmlOptionId::DISABLED:
1447 case HtmlOptionId::MAXLENGTH:
1448 nMaxLen =
static_cast<sal_Int16
>(rOption.
GetNumber());
1450 case HtmlOptionId::SIZE:
1451 nSize =
static_cast<sal_uInt16
>(rOption.
GetNumber());
1453 case HtmlOptionId::SRC:
1456 case HtmlOptionId::WIDTH:
1460 case HtmlOptionId::HEIGHT:
1464 case HtmlOptionId::ALIGN:
1470 case HtmlOptionId::TABINDEX:
1475 case HtmlOptionId::SDONFOCUS:
1478 case HtmlOptionId::ONFOCUS:
1479 nEvent = SvMacroItemId::HtmlOnGetFocus;
1483 case HtmlOptionId::SDONBLUR:
1486 case HtmlOptionId::ONBLUR:
1487 nEvent = SvMacroItemId::HtmlOnLoseFocus;
1491 case HtmlOptionId::SDONCLICK:
1494 case HtmlOptionId::ONCLICK:
1495 nEvent = SvMacroItemId::HtmlOnClick;
1499 case HtmlOptionId::SDONCHANGE:
1502 case HtmlOptionId::ONCHANGE:
1503 nEvent = SvMacroItemId::HtmlOnChange;
1507 case HtmlOptionId::SDONSELECT:
1510 case HtmlOptionId::ONSELECT:
1511 nEvent = SvMacroItemId::HtmlOnSelect;
1518 aUnoMacroTable, aUnoMacroParamTable );
1525 if( !sEvent.isEmpty() )
1528 OUString aScriptType2;
1530 aScriptType2 = rDfltScriptType;
1531 aMacroTable.
Insert( nEvent,
SvxMacro( sEvent, aScriptType2, eScriptType2 ) );
1536 if( HTMLInputType::Image==eType )
1539 if( sImgSrc.isEmpty() )
1546 eVertOri = text::VertOrientation::TOP;
1551 const char *pType =
"TextField";
1552 bool bKeepCRLFInValue =
false;
1555 case HTMLInputType::Checkbox:
1557 bKeepCRLFInValue =
true;
1560 case HTMLInputType::Radio:
1561 pType =
"RadioButton";
1562 bKeepCRLFInValue =
true;
1565 case HTMLInputType::Password:
1566 bKeepCRLFInValue =
true;
1569 case HTMLInputType::Button:
1570 bKeepCRLFInValue =
true;
1572 case HTMLInputType::Submit:
1573 case HTMLInputType::Reset:
1574 pType =
"CommandButton";
1577 case HTMLInputType::Image:
1578 pType =
"ImageButton";
1581 case HTMLInputType::File:
1582 pType =
"FileControl";
1585 case HTMLInputType::Hidden:
1586 pType =
"HiddenControl";
1587 bKeepCRLFInValue =
true;
1594 if( !bKeepCRLFInValue )
1596 sText = sText.replaceAll(
"\r",
"").replaceAll(
"\n",
"");
1599 const uno::Reference< XMultiServiceFactory > & rServiceFactory =
1601 if( !rServiceFactory.is() )
1604 OUString
sServiceName =
"com.sun.star.form.component." +
1605 OUString::createFromAscii(pType);
1606 uno::Reference< XInterface > xInt =
1607 rServiceFactory->createInstance( sServiceName );
1611 uno::Reference< XFormComponent > xFComp( xInt, UNO_QUERY );
1615 uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY );
1619 xPropSet->setPropertyValue(
"Name", aTmp );
1621 if( HTMLInputType::Hidden != eType )
1625 aTmp <<= static_cast<sal_Int16>(nTabIndex) ;
1626 xPropSet->setPropertyValue(
"TabIndex", aTmp );
1631 xPropSet->setPropertyValue(
"Enabled",
makeAny(
false) );
1638 Size aTextSz( 0, 0 );
1639 bool bMinWidth =
false, bMinHeight =
false;
1640 bool bUseSize =
false;
1643 case HTMLInputType::Checkbox:
1644 case HTMLInputType::Radio:
1648 xPropSet->setPropertyValue(
"RefValue",
1650 aTmp <<= OUString();
1651 xPropSet->setPropertyValue(
"Label",
1656 if( HTMLInputType::Checkbox == eType )
1659 xPropSet->setPropertyValue(
"DefaultState", aTmp );
1662 const SvxMacro* pMacro = aMacroTable.
Get( SvMacroItemId::HtmlOnClick );
1665 aMacroTable.
Insert( SvMacroItemId::HtmlOnClickItem, *pMacro );
1666 aMacroTable.
Erase( SvMacroItemId::HtmlOnClick );
1669 bMinWidth = bMinHeight =
true;
1673 case HTMLInputType::Image:
1676 aSz.
setWidth( nSize ? nSize : nWidth );
1684 aTmp <<= FormButtonType_SUBMIT;
1685 xPropSet->setPropertyValue(
"ButtonType", aTmp );
1687 aTmp <<= sal_Int16(0) ;
1688 xPropSet->setPropertyValue(
"Border",
1693 case HTMLInputType::Button:
1694 case HTMLInputType::Submit:
1695 case HTMLInputType::Reset:
1697 FormButtonType eButtonType;
1700 case HTMLInputType::Button:
1701 eButtonType = FormButtonType_PUSH;
1703 case HTMLInputType::Submit:
1704 eButtonType = FormButtonType_SUBMIT;
1705 if (sText.isEmpty())
1708 case HTMLInputType::Reset:
1709 eButtonType = FormButtonType_RESET;
1710 if (sText.isEmpty())
1717 xPropSet->setPropertyValue(
"Label",
1720 aTmp <<= eButtonType;
1721 xPropSet->setPropertyValue(
"ButtonType", aTmp );
1723 bMinWidth = bMinHeight =
true;
1728 case HTMLInputType::Password:
1729 case HTMLInputType::Text:
1730 case HTMLInputType::File:
1731 if( HTMLInputType::File != eType )
1734 xPropSet->setPropertyValue(
"DefaultText", aTmp );
1738 xPropSet->setPropertyValue(
"MaxTextLen", aTmp );
1742 if( HTMLInputType::Password == eType )
1744 aTmp <<= sal_Int16(
'*') ;
1745 xPropSet->setPropertyValue(
"EchoChar", aTmp );
1756 case HTMLInputType::Hidden:
1757 xPropSet->setPropertyValue(
"HiddenValue", aTmp );
1764 if( bUseSize && nSize>0 )
1768 Size aNewSz( nSize, 0 );
1772 OSL_ENSURE( !aTextSz.
Width(),
"text width is present" );
1782 if( !aId.isEmpty() )
1800 if( HTMLInputType::Image== eType )
1805 bSetGrfWidth =
true;
1812 bSetGrfHeight =
true;
1821 xFComp, xPropSet, aSz,
1823 aCSS1ItemSet, aCSS1PropInfo,
1824 aMacroTable, aUnoMacroTable,
1825 aUnoMacroParamTable,
false,
1827 if( aTextSz.
Width() || aTextSz.
Height() || bMinWidth || bMinHeight )
1829 OSL_ENSURE( !(bSetGrfWidth || bSetGrfHeight),
"Adjust graphic size???" );
1833 if( HTMLInputType::Radio == eType )
1836 xPropSet->setPropertyValue(
"DefaultState", aTmp );
1839 if( HTMLInputType::Image == eType )
1843 aTmp <<= URIHelper::SmartRel2Abs(INetURLObject(m_sBaseURL), sImgSrc, Link<OUString *, bool>(),
false);
1844 xPropSet->setPropertyValue(
"ImageURL",
1848 if( bSetGrfWidth || bSetGrfHeight )
1851 new SwHTMLImageWatcher( xShape, bSetGrfWidth, bSetGrfHeight );
1860 OSL_ENSURE( !
m_bTextArea,
"TextArea in TextArea?" );
1862 "TextArea in Control?" );
1871 OUString
aId, aClass, aStyle;
1875 std::vector<OUString> aUnoMacroTable;
1876 std::vector<OUString> aUnoMacroParamTable;
1877 sal_uInt16 nRows = 0, nCols = 0;
1879 bool bDisabled =
false;
1885 for (
size_t i = rHTMLOptions.size();
i; )
1890 bool bSetEvent =
false;
1894 case HtmlOptionId::ID:
1897 case HtmlOptionId::STYLE:
1900 case HtmlOptionId::CLASS:
1903 case HtmlOptionId::NAME:
1906 case HtmlOptionId::DISABLED:
1909 case HtmlOptionId::ROWS:
1910 nRows =
static_cast<sal_uInt16
>(rOption.
GetNumber());
1912 case HtmlOptionId::COLS:
1913 nCols =
static_cast<sal_uInt16
>(rOption.
GetNumber());
1915 case HtmlOptionId::WRAP:
1916 nWrap = rOption.
GetEnum( aHTMLTextAreaWrapTable, nWrap );
1919 case HtmlOptionId::TABINDEX:
1923 case HtmlOptionId::SDONFOCUS:
1926 case HtmlOptionId::ONFOCUS:
1927 nEvent = SvMacroItemId::HtmlOnGetFocus;
1931 case HtmlOptionId::SDONBLUR:
1934 case HtmlOptionId::ONBLUR:
1935 nEvent = SvMacroItemId::HtmlOnLoseFocus;
1939 case HtmlOptionId::SDONCLICK:
1942 case HtmlOptionId::ONCLICK:
1943 nEvent = SvMacroItemId::HtmlOnClick;
1947 case HtmlOptionId::SDONCHANGE:
1950 case HtmlOptionId::ONCHANGE:
1951 nEvent = SvMacroItemId::HtmlOnChange;
1955 case HtmlOptionId::SDONSELECT:
1958 case HtmlOptionId::ONSELECT:
1959 nEvent = SvMacroItemId::HtmlOnSelect;
1966 aUnoMacroTable, aUnoMacroParamTable );
1973 if( !sEvent.isEmpty() )
1983 const uno::Reference< lang::XMultiServiceFactory > & rSrvcMgr =
1985 if( !rSrvcMgr.is() )
1990 uno::Reference< uno::XInterface > xInt = rSrvcMgr->createInstance(
1991 "com.sun.star.form.component.TextField" );
1998 uno::Reference< XFormComponent > xFComp( xInt, UNO_QUERY );
1999 OSL_ENSURE( xFComp.is(),
"no FormComponent?" );
2001 uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY );
2005 xPropSet->setPropertyValue(
"Name", aTmp );
2008 xPropSet->setPropertyValue(
"MultiLine", aTmp );
2009 xPropSet->setPropertyValue(
"VScroll", aTmp );
2010 if( HTML_WM_OFF == nWrap )
2011 xPropSet->setPropertyValue(
"HScroll", aTmp );
2012 if( HTML_WM_HARD == nWrap )
2013 xPropSet->setPropertyValue(
"HardLineBreaks", aTmp );
2017 aTmp <<= static_cast<sal_Int16>(nTabIndex) ;
2018 xPropSet->setPropertyValue(
"TabIndex", aTmp );
2025 xPropSet->setPropertyValue(
"Enabled",
makeAny(
false) );
2035 Size aTextSz( nCols, nRows );
2042 if( !aId.isEmpty() )
2062 uno::Reference< drawing::XShape > xShape =
InsertControl( xFComp, xPropSet, aSz,
2064 aCSS1ItemSet, aCSS1PropInfo,
2065 aMacroTable, aUnoMacroTable,
2066 aUnoMacroParamTable );
2071 std::unique_ptr<HTMLAttrContext> xCntxt(
new HTMLAttrContext(HtmlTokenId::TEXTAREA_ON));
2083 OSL_ENSURE(
m_bTextArea,
"no TextArea or wrong type" );
2085 "TextArea missing" );
2087 const uno::Reference< beans::XPropertySet > & rPropSet =
2092 rPropSet->setPropertyValue(
"DefaultText", aTmp );
2098 std::unique_ptr<HTMLAttrContext> xCntxt(
PopContext(HtmlTokenId::TEXTAREA_ON));
2110 OSL_ENSURE(
m_bTextArea,
"no TextArea or wrong type" );
2112 "TextArea missing" );
2117 case HtmlTokenId::TEXTTOKEN:
2120 case HtmlTokenId::NEWPARA:
2126 rText += sSaveToken;
2127 if( !aToken.isEmpty() )
2142 OSL_ENSURE( !
m_bSelect,
"Select in Select?" );
2144 "Select in Control?" );
2149 OUString
aId, aClass, aStyle;
2153 std::vector<OUString> aUnoMacroTable;
2154 std::vector<OUString> aUnoMacroParamTable;
2155 bool bMultiple =
false;
2156 bool bDisabled =
false;
2163 for (
size_t i = rHTMLOptions.size();
i; )
2168 bool bSetEvent =
false;
2172 case HtmlOptionId::ID:
2175 case HtmlOptionId::STYLE:
2178 case HtmlOptionId::CLASS:
2181 case HtmlOptionId::NAME:
2184 case HtmlOptionId::MULTIPLE:
2187 case HtmlOptionId::DISABLED:
2190 case HtmlOptionId::SIZE:
2194 case HtmlOptionId::TABINDEX:
2198 case HtmlOptionId::SDONFOCUS:
2201 case HtmlOptionId::ONFOCUS:
2202 nEvent = SvMacroItemId::HtmlOnGetFocus;
2206 case HtmlOptionId::SDONBLUR:
2209 case HtmlOptionId::ONBLUR:
2210 nEvent = SvMacroItemId::HtmlOnLoseFocus;
2214 case HtmlOptionId::SDONCLICK:
2217 case HtmlOptionId::ONCLICK:
2218 nEvent = SvMacroItemId::HtmlOnClick;
2222 case HtmlOptionId::SDONCHANGE:
2225 case HtmlOptionId::ONCHANGE:
2226 nEvent = SvMacroItemId::HtmlOnChange;
2233 aUnoMacroTable, aUnoMacroParamTable );
2240 if( !sEvent.isEmpty() )
2250 const uno::Reference< lang::XMultiServiceFactory > & rSrvcMgr =
2252 if( !rSrvcMgr.is() )
2257 uno::Reference< uno::XInterface > xInt = rSrvcMgr->createInstance(
2258 "com.sun.star.form.component.ListBox" );
2265 uno::Reference< XFormComponent > xFComp( xInt, UNO_QUERY );
2266 OSL_ENSURE(xFComp.is(),
"no FormComponent?");
2268 uno::Reference< beans::XPropertySet > xPropSet( xFComp, UNO_QUERY );
2272 xPropSet->setPropertyValue(
"Name", aTmp );
2276 aTmp <<= static_cast<sal_Int16>(nTabIndex) ;
2277 xPropSet->setPropertyValue(
"TabIndex", aTmp );
2282 xPropSet->setPropertyValue(
"Enabled",
makeAny(
false) );
2285 Size aTextSz( 0, 0 );
2286 bool bMinWidth =
true, bMinHeight =
true;
2289 xPropSet->setPropertyValue(
"Dropdown",
makeAny(
true) );
2298 xPropSet->setPropertyValue(
"MultiSelection",
makeAny(
true) );
2309 if( !aId.isEmpty() )
2332 uno::Reference< drawing::XShape > xShape =
InsertControl( xFComp, xPropSet, aSz,
2334 aCSS1ItemSet, aCSS1PropInfo,
2335 aMacroTable, aUnoMacroTable,
2336 aUnoMacroParamTable );
2339 if( aTextSz.
Height() || bMinWidth || bMinHeight )
2343 std::unique_ptr<HTMLAttrContext> xCntxt(
new HTMLAttrContext(HtmlTokenId::SELECT_ON));
2358 "no select control" );
2360 const uno::Reference< beans::XPropertySet > & rPropSet =
2368 OUString *pStrings = aList.getArray();
2369 OUString *
pValues = aValueList.getArray();
2371 for(
size_t i = 0;
i < nEntryCnt; ++
i)
2375 pStrings[
i] = sText;
2381 rPropSet->setPropertyValue(
"StringItemList",
Any(aList) );
2383 rPropSet->setPropertyValue(
"ListSourceType",
Any(ListSourceType_VALUELIST) );
2385 rPropSet->setPropertyValue(
"ListSource",
Any(aValueList) );
2394 Sequence<sal_Int16> aSelList( static_cast<sal_Int32>(nSelCnt) );
2395 sal_Int16 *pSels = aSelList.getArray();
2396 for(
size_t i = 0;
i < nSelCnt; ++
i)
2400 rPropSet->setPropertyValue(
"DefaultSelection",
Any(aSelList) );
2411 Size aTextSz( -1, 0 );
2418 std::unique_ptr<HTMLAttrContext> xCntxt(
PopContext(HtmlTokenId::SELECT_ON));
2432 "no Select-Control" );
2438 for (
size_t i = rHTMLOptions.size();
i; )
2443 case HtmlOptionId::ID:
2446 case HtmlOptionId::SELECTED:
2447 m_bLBEntrySelected =
true;
2449 case HtmlOptionId::VALUE:
2451 if( aValue.isEmpty() )
2452 aValue =
"$$$empty$$$";
2461 if( m_bLBEntrySelected )
2471 "no select control" );
2478 if( !aToken.isEmpty() &&
' '==aToken[ 0 ] )
2480 sal_Int32 nLen = rText.getLength();
2481 if( !nLen ||
' '==rText[nLen-1])
2482 aToken = aToken.replaceAt( 0, 1,
"" );
2484 if( !aToken.isEmpty() )
sal_uInt16 IncGrfsThatResizeTable()
OString stripEnd(const OString &rIn, char c)
std::vector< SwPending > m_vPendingStack
Starts a section of nodes in the document model.
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
SvxMacro & Insert(SvMacroItemId nEvent, const SvxMacro &rMacro)
SvxCSS1LengthType m_eLeftType
EnumT GetEnum(const HTMLOptionEnum< EnumT > *pOptEnums, EnumT nDflt=static_cast< EnumT >(0)) const
void SplitPREListingXMP(HTMLAttrContext *pCntxt)
HtmlOptionId GetToken() const
SvxCSS1LengthType m_eTopType
#define OOO_STRING_SVTOOLS_HTML_O_onsubmit
TOOLS_DLLPUBLIC OString convertLineEnd(const OString &rIn, LineEnd eLineEnd)
Marks a position in the document model.
void SetControlSize(const css::uno::Reference< css::drawing::XShape > &rShape, const Size &rTextSz, bool bMinWidth, bool bMinHeight)
void EndForm(bool bAppend=true)
const OUString & GetFamilyName() const
#define OOO_STRING_SVTOOLS_HTML_O_SDonsubmit
#define OOO_STRING_SVTOOLS_HTML_O_onblur
sal_uInt16 GetLower() const
OUString GetLanguage() const
void setWidth(tools::Long nWidth)
#define LANGUAGE_ENGLISH_US
sal_uInt16 m_nSelectEntryCnt
const OUString & GetStyleName() const
#define OOO_STRING_SVTOOLS_HTML_O_sdaddparam
void InsertBookmark(const OUString &rName)
tools::Long GetRight() const
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
const OUString & GetString() const
HTMLInputType GetInputType() const
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
void NewForm(bool bAppend=true)
FontPitch GetPitch() const
#define OOO_STRING_SVTOOLS_HTML_O_SDonreset
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
#define OOO_STRING_SVTOOLS_HTML_WW_off
FontFamily GetFamily() const
FontFamily GetFamilyType()
constexpr auto convertTwipToMm100(N n)
static OutputDevice * GetDefaultDevice()
constexpr auto SFX_INTERFACE_NONE
#define OOO_STRING_SVTOOLS_HTML_IT_reset
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)
ScriptType GetScriptType(SvKeyValueIterator *) const
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
rtl_TextEncoding GetCharSet() const
bool ParseStyleOptions(const OUString &rStyle, const OUString &rId, const OUString &rClass, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, const OUString *pLang=nullptr, const OUString *pDir=nullptr)
constexpr OUStringLiteral sServiceName
#define OOO_STRING_SVTOOLS_HTML_O_onchange
LineEnd GetSystemLineEnd()
#define OOO_STRING_SVTOOLS_HTML_METHOD_post
const SwTable & GetTable() const
#define OOO_STRING_SVTOOLS_HTML_O_sdevent
css::uno::Reference< css::frame::XModel > GetBaseModel() const
#define OOO_STRING_SVTOOLS_HTML_WW_soft
const OUString & GetStyleName() const
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
PaM is Point and Mark: a selection of the document model.
sal_uInt16 GetBrowseWidthByTable(const SwDoc &rDoc) const
Calculates available width by the table-frame or static GetBrowseWidth if no layout exists...
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SwPosition * GetPoint() const
#define OOO_STRING_SVTOOLS_HTML_O_SDonchange
void NotifyMacroEventRead()
sal_Int32 GetSNumber() const
std::unique_ptr< SwCSS1Parser > m_pCSS1Parser
tools::Long GetLeft() const
#define OOO_STRING_SVTOOLS_HTML_O_SDonblur
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
tools::Long Width() const
void EndContext(HTMLAttrContext *pContext)
#define OOO_STRING_SVTOOLS_HTML_WW_virtual
std::unique_ptr< HTMLAttrContext > PopContext(HtmlTokenId nToken=HtmlTokenId::NONE)
void Erase(SvMacroItemId nEvent)
SvxCSS1Position m_ePosition
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.
SfxItemSet * GetItemSet() const
#define OOO_STRING_SVTOOLS_HTML_ET_multipart
HTMLOptionEnum< sal_Int16 > const aHTMLImgVAlignTable[]
sal_uInt32 GetNumber() const
SfxViewFrame * m_pTempViewFrame
Point PixelToLogic(const Point &rDevicePt) const
#define HTML_DFLT_IMG_WIDTH
#define OOO_STRING_SVTOOLS_HTML_WW_physical
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
const OUString & GetFamilyName() const
const PropertyValue * pValues
const SvxMacro * Get(SvMacroItemId nEvent) const
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
sal_uInt16 DecGrfsThatResize()
#define OOO_STRING_SVTOOLS_HTML_ET_url
#define OOO_STRING_SVTOOLS_HTML_O_SDonfocus
static SfxViewFrame * LoadHiddenDocument(SfxObjectShell const &i_rDoc, SfxInterfaceId i_nViewId)
OUString GetPartBeforeLastName() const
void InsertTextAreaText(HtmlTokenId nToken)
vcl::Window * GetWin() const
SwHTMLTableLayout * GetHTMLTableLayout()
VCL_DLLPUBLIC float ConvertFontWeight(FontWeight eWeight)
::std::vector< HTMLOption > HTMLOptions
#define OOO_STRING_SVTOOLS_HTML_WW_hard
sal_Int32 GetIndex() const
#define OOO_STRING_SVTOOLS_HTML_O_onclick
SwHTMLForm_Impl * m_pFormImpl
tools::Long Height() const
#define OOO_STRING_SVTOOLS_HTML_O_onreset
#define OOO_STRING_SVTOOLS_HTML_METHOD_get
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
constexpr TypedWhichId< SwDrawFrameFormat > RES_DRAWFRMFMT(157)
css::uno::Reference< css::awt::XControl > GetUnoControl(const SdrView &_rView, const OutputDevice &_rOut) const
FILE * init(int, char **)
std::shared_ptr< HTMLTable > m_xTable
const OUString & GetTokenString() const
#define OOO_STRING_SVTOOLS_HTML_ET_text
SwTableNode * FindTableNode()
Search table node, in which it is.
#define OOO_STRING_SVTOOLS_HTML_IT_submit
void setHeight(tools::Long nHeight)
const SwStartNode * FindFlyStartNode() const
#define HTML_DFLT_IMG_HEIGHT
void InsertSelectOption()
HTMLOptionEnum< sal_Int16 > const aHTMLImgHAlignTable[]
const OUString & GetScriptTypeString(SvKeyValueIterator *) const
bool AppendTextNode(SwHTMLAppendMode eMode=AM_NORMAL, bool bUpdateNum=true)
#define OOO_STRING_SVTOOLS_HTML_on
void PushContext(std::unique_ptr< HTMLAttrContext > &rCntxt)
#define OOO_STRING_SVTOOLS_HTML_O_onfocus
SwViewShell * CallStartAction(SwViewShell *pVSh=nullptr, bool bChkPtr=true)
rtl::Reference< SwDoc > m_xDoc
SwFrameFormat * GetFrameFormat() const
const OUString & GetMacName() const
#define HTMLTABLE_RESIZE_NOW
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
#define OOO_STRING_SVTOOLS_HTML_O_SDonclick
rtl_TextEncoding GetCharSet() const
static bool HasStyleOptions(std::u16string_view rStyle, std::u16string_view rId, std::u16string_view rClass, const OUString *pLang=nullptr, const OUString *pDir=nullptr)
sal_uInt16 GetUpper() const
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)
SfxMedium * GetMedium() const
css::uno::Any SAL_CALL makeAny(const SharedUNOComponent< INTERFACE, COMPONENT > &value)