28#include <bitmaps.hlst>
29#include <fpicker/strings.hrc>
32#include <svx/svxids.hrc>
46#include <com/sun/star/beans/PropertyAttribute.hpp>
47#include <com/sun/star/container/XSet.hpp>
48#include <com/sun/star/frame/XController.hpp>
49#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
50#include <com/sun/star/xforms/XFormsSupplier.hpp>
51#include <com/sun/star/xml/dom/XDocument.hpp>
108 #define MIN_PAGE_COUNT 3
115 explicit ItemNode(
const Reference< css::xml::dom::XNode >& _rxNode ) :
117 explicit ItemNode(
const Reference< XPropertySet >& _rxSet ) :
122 : DropTargetHelper(rWidget.get_drop_target())
138 if (rCEvt.GetCommand() != CommandEventId::ContextMenu)
141 Point aPos(rCEvt.GetMousePosPixel());
143 if (m_xItemList->get_dest_row_at_pos(aPos, m_xScratchIter.get(),
false) && !m_xItemList->is_selected(*m_xScratchIter))
145 m_xItemList->select(*m_xScratchIter);
146 ItemSelectHdl(*m_xItemList);
150 m_xMenu = xBuilder->weld_menu(
"menu");
151 m_aRemovedMenuEntries.clear();
154 m_aRemovedMenuEntries.insert(
"additem");
157 m_aRemovedMenuEntries.insert(
"addelement");
158 m_aRemovedMenuEntries.insert(
"addattribute");
162 m_xMenu->set_label(
"additem",
SvxResId(RID_STR_DATANAV_ADD_SUBMISSION));
163 m_xMenu->set_label(
"edit",
SvxResId(RID_STR_DATANAV_EDIT_SUBMISSION));
164 m_xMenu->set_label(
"delete",
SvxResId(RID_STR_DATANAV_REMOVE_SUBMISSION));
168 m_xMenu->set_label(
"additem",
SvxResId(RID_STR_DATANAV_ADD_BINDING));
169 m_xMenu->set_label(
"edit",
SvxResId(RID_STR_DATANAV_EDIT_BINDING));
170 m_xMenu->set_label(
"delete",
SvxResId(RID_STR_DATANAV_REMOVE_BINDING));
173 for (
const auto& rRemove : m_aRemovedMenuEntries)
174 m_xMenu->remove(rRemove);
176 OUString sCommand = m_xMenu->popup_at_rect(m_xItemList.get(),
tools::Rectangle(aPos,
Size(1,1)));
177 if (!sCommand.isEmpty())
178 DoMenuAction(sCommand);
186 delete weld::fromId<ItemNode*>(
m_xItemList->get_id(rEntry));
202 :
BuilderPage(pPage, nullptr,
"svx/ui/xformspage.ui",
"XFormsPage")
204 , m_xToolBox(m_xBuilder->weld_toolbar(
"toolbar"))
205 , m_xItemList(m_xBuilder->weld_tree_view(
"items"))
206 , m_xScratchIter(m_xItemList->make_iterator())
207 , m_aDropHelper(*m_xItemList)
208 , m_pNaviWin(_pNaviWin)
216 m_xToolBox->set_item_visible(
"additem",
false);
219 m_xToolBox->set_item_visible(
"addelement",
false);
220 m_xToolBox->set_item_visible(
"addattribute",
false);
253 DoToolBoxAction(rIdent);
283 Reference< css::xforms::XDataTypeRepository > xDataTypes =
284 xModel->getDataTypeRepository();
304 Reference<css::xml::dom::XNode> xNode(pItemNode->
m_xNode);
305 Reference<XPropertySet> xPropSet(pItemNode->
m_xPropSet);
309 auto fnCreateFormsDescriptor = [
this, szName, xNode, xPropSet](){
310 OXFormsDescriptor desc;
311 desc.szName = szName;
316 DBG_ASSERT( desc.xPropSet.is(),
"DataTreeListBox::StartDrag(): invalid node binding" );
320 desc.xPropSet = xPropSet;
330 const Reference< css::xml::dom::XNode >& _xNode)
336 Reference< css::xml::dom::XNodeList > xNodeList = _xNode->getChildNodes();
337 if ( xNodeList.is() )
340 sal_Int32
i, nNodeCount = xNodeList->getLength();
341 for (
i = 0;
i < nNodeCount; ++
i )
343 Reference< css::xml::dom::XNode > xChild = xNodeList->item(
i);
344 css::xml::dom::NodeType eChildType = xChild->getNodeType();
346 switch ( eChildType )
348 case css::xml::dom::NodeType_ATTRIBUTE_NODE:
349 aExpImg = RID_SVXBMP_ATTRIBUTE;
351 case css::xml::dom::NodeType_ELEMENT_NODE:
352 aExpImg = RID_SVXBMP_ELEMENT;
354 case css::xml::dom::NodeType_TEXT_NODE:
355 aExpImg = RID_SVXBMP_TEXT;
358 aExpImg = RID_SVXBMP_OTHER;
362 if ( !
sName.isEmpty() )
366 std::unique_ptr<weld::TreeIter> xEntry =
m_xItemList->make_iterator();
370 if ( xChild->hasAttributes() )
372 Reference< css::xml::dom::XNamedNodeMap > xMap = xChild->getAttributes();
375 aExpImg = RID_SVXBMP_ATTRIBUTE;
376 sal_Int32 j, nMapLen = xMap->getLength();
377 for ( j = 0; j < nMapLen; ++j )
379 Reference< css::xml::dom::XNode > xAttr = xMap->item(j);
382 OUString sAttrName =
m_xUIHelper->getNodeDisplayName( xAttr, bShowDetails );
388 if ( xChild->hasChildNodes() )
402 bool bHandled =
false;
403 bool bIsDocModified =
false;
406 if (rToolBoxID ==
u"additem" || rToolBoxID ==
u"addelement" || rToolBoxID ==
u"addattribute")
410 DBG_ASSERT(
xModel.is(),
"XFormsPage::DoToolBoxAction(): Action without model" );
418 Reference< css::xforms::XSubmission > xNewSubmission = aDlg.
GetNewSubmission();
419 Reference< XSet > xSubmissions =
xModel->getSubmissions();
420 xSubmissions->insert(
Any( xNewSubmission ) );
423 bIsDocModified =
true;
435 std::unique_ptr<weld::TreeIter> xEntry(
m_xItemList->make_iterator());
436 bool bEntry =
m_xItemList->get_selected(xEntry.get());
438 std::unique_ptr<ItemNode> pNode;
439 Reference< css::xml::dom::XNode > xParentNode;
440 Reference< XPropertySet > xNewBinding;
442 bool bIsElement =
true;
452 DBG_ASSERT( bEntry,
"XFormsPage::DoToolBoxAction(): no entry" );
454 DBG_ASSERT( pParentNode,
"XFormsPage::DoToolBoxAction(): no parent node" );
455 xParentNode = pParentNode->
m_xNode;
456 Reference< css::xml::dom::XNode > xNewNode;
457 if (rToolBoxID ==
u"addelement")
461 pResId = RID_STR_DATANAV_ADD_ELEMENT;
466 TOOLS_WARN_EXCEPTION(
"svx.form",
"XFormsPage::DoToolBoxAction(): exception while create element" );
471 pResId = RID_STR_DATANAV_ADD_ATTRIBUTE;
480 TOOLS_WARN_EXCEPTION(
"svx.form",
"XFormsPage::DoToolBoxAction(): exception while create attribute" );
486 xNewNode = xParentNode->appendChild( xNewNode );
490 TOOLS_WARN_EXCEPTION(
"svx.form",
"XFormsPage::DoToolBoxAction(): exception while append child" );
495 Reference< css::xml::dom::XNode > xPNode;
497 xPNode = xNewNode->getParentNode();
500 || xPNode.is(),
"XFormsPage::DoToolboxAction(): node not added" );
513 TOOLS_WARN_EXCEPTION(
"svx.form",
"XFormsPage::DoToolBoxAction(): exception while get binding for node" );
515 pNode.reset(
new ItemNode( xNewNode ));
521 pResId = RID_STR_DATANAV_ADD_BINDING;
522 xNewBinding =
xModel->createBinding();
523 Reference< XSet > xBindings =
xModel->getBindings();
524 xBindings->insert(
Any( xNewBinding ) );
525 pNode.reset(
new ItemNode( xNewBinding ));
530 TOOLS_WARN_EXCEPTION(
"svx.form",
"XFormsPage::DoToolBoxAction(): exception while adding binding" );
537 short nReturn = aDlg.
run();
545 bIsDocModified =
true;
551 Reference< css::xml::dom::XNode > xPNode;
552 Reference< css::xml::dom::XNode > xNode =
553 xParentNode->removeChild( pNode->m_xNode );
555 xPNode = xNode->getParentNode();
556 DBG_ASSERT( !xPNode.is(),
"XFormsPage::RemoveEntry(): node not removed" );
570 bIsDocModified =
true;
576 Reference< XSet > xBindings =
xModel->getBindings();
577 xBindings->remove(
Any( xNewBinding ) );
587 else if (rToolBoxID ==
u"edit")
591 std::unique_ptr<weld::TreeIter> xEntry(
m_xItemList->make_iterator());
592 bool bEntry =
m_xItemList->get_selected(xEntry.get());
612 if ( pNode && pNode->
m_xNode.is() )
616 css::xml::dom::NodeType eChildType = pNode->
m_xNode->getNodeType();
617 if ( eChildType == css::xml::dom::NodeType_ATTRIBUTE_NODE )
619 pResId = RID_STR_DATANAV_EDIT_ATTRIBUTE;
630 pResId = RID_STR_DATANAV_EDIT_BINDING;
657 sNewName += sTemp +
": ";
668 bIsDocModified =
true;
678 bIsDocModified =
true;
683 else if (rToolBoxID ==
u"delete")
696 OSL_FAIL(
"XFormsPage::DoToolboxAction: unknown ID!" );
701 if ( bIsDocModified )
711 std::unique_ptr<weld::TreeIter> xParent(
m_xItemList->make_iterator());
714 OUString aImage(_bIsElement ? OUString(RID_SVXBMP_ELEMENT) : OUString(RID_SVXBMP_ATTRIBUTE));
737 OUString aImage(RID_SVXBMP_ELEMENT);
749 m_xItemList->insert(
nullptr, -1, &sTemp, &sId,
nullptr,
nullptr,
false, pRet);
751 std::unique_ptr<weld::TreeIter> xRes(
m_xItemList->make_iterator());
754 OUString sEntry =
SvxResId( RID_STR_DATANAV_SUBM_ACTION ) + sTemp;
755 m_xItemList->insert(pRet, -1, &sEntry,
nullptr,
nullptr,
nullptr,
false, xRes.get());
759 sEntry =
SvxResId( RID_STR_DATANAV_SUBM_METHOD ) +
761 m_xItemList->insert(pRet, -1, &sEntry,
nullptr,
nullptr,
nullptr,
false, xRes.get());
765 sEntry =
SvxResId( RID_STR_DATANAV_SUBM_REF ) + sTemp;
766 m_xItemList->insert(pRet, -1, &sEntry,
nullptr,
nullptr,
nullptr,
false, xRes.get());
770 sEntry =
SvxResId( RID_STR_DATANAV_SUBM_BIND ) + sTemp;
771 m_xItemList->insert(pRet, -1, &sEntry,
nullptr,
nullptr,
nullptr,
false, xRes.get());
775 sEntry =
SvxResId( RID_STR_DATANAV_SUBM_REPLACE ) +
777 m_xItemList->insert(pRet, -1, &sEntry,
nullptr,
nullptr,
nullptr,
false, xRes.get());
780 catch ( Exception
const & )
791 sName += sTemp +
": ";
796 m_xItemList->insert(
nullptr, -1, &
sName, &sId,
nullptr,
nullptr,
false, pRet);
799 catch ( Exception
const & )
813 std::unique_ptr<weld::TreeIter> xEntry(
m_xItemList->make_iterator());
816 SAL_WARN(
"svx.form",
"corrupt tree" );
831 OUString sEntry =
SvxResId( RID_STR_DATANAV_SUBM_BIND ) + sTemp;
834 SAL_WARN(
"svx.form",
"corrupt tree" );
839 sEntry =
SvxResId( RID_STR_DATANAV_SUBM_REF ) + sTemp;
842 SAL_WARN(
"svx.form",
"corrupt tree" );
847 sEntry =
SvxResId( RID_STR_DATANAV_SUBM_ACTION ) + sTemp;
850 SAL_WARN(
"svx.form",
"corrupt tree" );
854 sEntry =
SvxResId( RID_STR_DATANAV_SUBM_METHOD ) +
858 SAL_WARN(
"svx.form",
"corrupt tree" );
863 sEntry =
SvxResId( RID_STR_DATANAV_SUBM_REPLACE ) +
867 SAL_WARN(
"svx.form",
"corrupt tree" );
882 std::unique_ptr<weld::TreeIter> xEntry(
m_xItemList->make_iterator());
883 bool bEntry =
m_xItemList->get_selected(xEntry.get());
890 DBG_ASSERT( pNode,
"XFormsPage::RemoveEntry(): no node" );
897 css::xml::dom::NodeType eChildType = pNode->
m_xNode->getNodeType();
898 bool bIsElement = ( eChildType == css::xml::dom::NodeType_ELEMENT_NODE );
899 TranslateId pResId = bIsElement ? RID_STR_QRY_REMOVE_ELEMENT : RID_STR_QRY_REMOVE_ATTRIBUTE;
902 VclMessageType::Question, VclButtonsType::YesNo,
904 OUString sMessText = xQBox->get_primary_text();
905 sMessText = sMessText.replaceFirst(
907 xQBox->set_primary_text(sMessText);
910 std::unique_ptr<weld::TreeIter> xParent(
m_xItemList->make_iterator(xEntry.get()));
911 bool bParent =
m_xItemList->iter_parent(*xParent); (void)bParent;
912 assert(bParent &&
"XFormsPage::RemoveEntry(): no parent entry");
914 DBG_ASSERT( pParentNode && pParentNode->
m_xNode.is(),
"XFormsPage::RemoveEntry(): no parent XNode" );
916 Reference< css::xml::dom::XNode > xPNode;
917 Reference< css::xml::dom::XNode > xNode =
920 xPNode = xNode->getParentNode();
921 DBG_ASSERT( !xPNode.is(),
"XFormsPage::RemoveEntry(): node not removed" );
934 TranslateId pResId = bSubmission ? RID_STR_QRY_REMOVE_SUBMISSION : RID_STR_QRY_REMOVE_BINDING;
947 VclMessageType::Question, VclButtonsType::YesNo,
949 OUString sMessText = xQBox->get_primary_text();
950 sMessText = sMessText.replaceFirst( sSearch,
sName);
951 xQBox->set_primary_text(sMessText);
981 bool bHandled =
false;
983 sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
985 bHandled = DoMenuAction(
u"delete");
992 DBG_ASSERT( _xModel.is(),
"XFormsPage::SetModel(): invalid model" );
1002 DBG_ASSERT( _nPagePos != -1,
"XFormsPage::SetModel(): invalid page position" );
1005 Reference< XContainer > xContainer( _xModel->getInstances(), UNO_QUERY );
1006 if ( xContainer.is() )
1009 Reference< XEnumerationAccess > xNumAccess = _xModel->getInstances();
1010 if ( xNumAccess.is() )
1012 Reference < XEnumeration > xNum = xNumAccess->createEnumeration();
1013 if ( xNum.is() && xNum->hasMoreElements() )
1016 while ( xNum->hasMoreElements() )
1018 if ( nIter == _nPagePos )
1020 Sequence< PropertyValue > xPropSeq;
1021 Any aAny = xNum->nextElement();
1022 if ( aAny >>= xPropSeq )
1026 SAL_WARN(
"svx.form",
"XFormsPage::SetModel(): invalid instance" );
1032 xNum->nextElement();
1048 DBG_ASSERT( _nPagePos == -1,
"XFormsPage::SetModel(): invalid page position" );
1051 Reference< XContainer > xContainer( _xModel->getSubmissions(), UNO_QUERY );
1052 if ( xContainer.is() )
1055 Reference< XEnumerationAccess > xNumAccess = _xModel->getSubmissions();
1056 if ( xNumAccess.is() )
1058 Reference < XEnumeration > xNum = xNumAccess->createEnumeration();
1059 if ( xNum.is() && xNum->hasMoreElements() )
1061 while ( xNum->hasMoreElements() )
1063 Reference< XPropertySet > xPropSet;
1064 Any aAny = xNum->nextElement();
1065 if ( aAny >>= xPropSet )
1080 DBG_ASSERT( _nPagePos == -1,
"XFormsPage::SetModel(): invalid page position" );
1083 Reference< XContainer > xContainer( _xModel->getBindings(), UNO_QUERY );
1084 if ( xContainer.is() )
1087 Reference< XEnumerationAccess > xNumAccess = _xModel->getBindings();
1088 if ( xNumAccess.is() )
1090 Reference < XEnumeration > xNum = xNumAccess->createEnumeration();
1091 if ( xNum.is() && xNum->hasMoreElements() )
1093 OUString aImage(RID_SVXBMP_ELEMENT);
1094 std::unique_ptr<weld::TreeIter> xRes(
m_xItemList->make_iterator());
1095 while ( xNum->hasMoreElements() )
1097 Reference< XPropertySet > xPropSet;
1098 Any aAny = xNum->nextElement();
1099 if ( aAny >>= xPropSet )
1104 sEntry += sTemp +
": ";
1111 m_xItemList->insert(
nullptr, -1, &sEntry, &
sId,
nullptr,
nullptr,
false, xRes.get());
1125 OSL_FAIL(
"XFormsPage::SetModel: unknown group!" );
1147 for (
const PropertyValue& rProp : _xPropSeq )
1149 if ( sInstModel == rProp.Name )
1151 Reference< css::xml::dom::XNode > xRoot;
1152 if ( rProp.Value >>= xRoot )
1156 Reference< XEventTarget >
xTarget( xRoot, UNO_QUERY );
1160 OUString sNodeName =
1162 if ( sNodeName.isEmpty() )
1163 sNodeName = xRoot->getNodeName();
1164 if ( xRoot->hasChildNodes() )
1173 else if ( sInstName == rProp.Name && ( rProp.Value >>= sTemp ) )
1175 else if ( sInstURL == rProp.Name && ( rProp.Value >>= sTemp ) )
1191 m_xMenu->set_sensitive(rIdent, bSensitive);
1196 bool bEnableAdd =
false;
1197 bool bEnableEdit =
false;
1198 bool bEnableRemove =
false;
1200 std::unique_ptr<weld::TreeIter> xEntry(
m_xItemList->make_iterator());
1201 bool bEntry =
m_xItemList->get_selected(xEntry.get());
1205 bool bSubmitChild =
false;
1209 bSubmitChild =
true;
1215 bEnableRemove = !bSubmitChild;
1217 bEnableRemove =
false;
1222 css::xml::dom::NodeType eChildType = pNode->
m_xNode->getNodeType();
1223 if ( eChildType != css::xml::dom::NodeType_ELEMENT_NODE
1224 && eChildType != css::xml::dom::NodeType_DOCUMENT_NODE )
1239 m_xToolBox->set_item_sensitive(
"additem", bEnableAdd);
1240 m_xToolBox->set_item_sensitive(
"addelement", bEnableAdd);
1241 m_xToolBox->set_item_sensitive(
"addattribute", bEnableAdd);
1242 m_xToolBox->set_item_sensitive(
"edit", bEnableEdit);
1243 m_xToolBox->set_item_sensitive(
"delete", bEnableRemove);
1256 TranslateId pResId1 = RID_STR_DATANAV_EDIT_ELEMENT;
1257 TranslateId pResId2 = RID_STR_DATANAV_REMOVE_ELEMENT;
1261 if ( pNode && pNode->
m_xNode.is() )
1265 css::xml::dom::NodeType eChildType = pNode->
m_xNode->getNodeType();
1266 if ( eChildType == css::xml::dom::NodeType_ATTRIBUTE_NODE )
1268 pResId1 = RID_STR_DATANAV_EDIT_ATTRIBUTE;
1269 pResId2 = RID_STR_DATANAV_REMOVE_ATTRIBUTE;
1288 : m_xParent(pParent)
1289 , m_xModelsBox(rBuilder.weld_combo_box(
"modelslist"))
1290 , m_xModelBtn(rBuilder.weld_menu_button(
"modelsbutton"))
1291 , m_xTabCtrl(rBuilder.weld_notebook(
"tabcontrol"))
1292 , m_xInstanceBtn(rBuilder.weld_menu_button(
"instances"))
1293 , m_nLastSelectedPos(-1)
1294 , m_bShowDetails(false)
1295 , m_bIsNotifyDisabled(false)
1296 , m_aUpdateTimer(
"svx DataNavigatorWindow m_aUpdateTimer")
1312 OUString sPageId(
"instance");
1316 OUString sNewPageId = aViewOpt.
GetPageID();
1317 if (
m_xTabCtrl->get_page_index(sNewPageId) != -1)
1318 sPageId = sNewPageId;
1325 ActivatePageHdl(sPageId);
1329 "DataNavigatorWindow::LoadModels(): no SfxBindings; can't get frame" );
1334 m_xFrame->addFrameActionListener( xListener );
1341 pPage->SelectFirstEntry();
1347 m_xFrame->removeFrameActionListener( xListener );
1368 ModelSelectHdl(&rBox);
1386 bool bIsDocModified =
false;
1387 Reference< css::xforms::XFormsUIHelper1 > xUIHelper;
1388 sal_Int32 nSelectedPos = m_xModelsBox->get_active();
1389 OUString sSelectedModel(m_xModelsBox->get_text(nSelectedPos));
1390 Reference< css::xforms::XModel >
xModel;
1393 Any aAny = m_xDataContainer->getByName( sSelectedModel );
1395 xUIHelper.set(
xModel, UNO_QUERY );
1401 DBG_ASSERT( xUIHelper.is(),
"DataNavigatorWindow::MenuSelectHdl(): no UIHelper" );
1403 m_bIsNotifyDisabled =
true;
1405 if (rIdent ==
"modelsadd")
1408 bool bShowDialog =
true;
1409 while ( bShowDialog )
1411 bShowDialog =
false;
1414 OUString sNewName = aDlg.
GetName();
1417 if (m_xModelsBox->find_text(sNewName) != -1)
1421 VclMessageType::Warning, VclButtonsType::Ok,
1422 SvxResId(RID_STR_DOUBLE_MODELNAME)));
1423 xErrBox->set_primary_text(xErrBox->get_primary_text().replaceFirst(
MSG_VARIABLE, sNewName));
1432 Reference< css::xforms::XModel > xNewModel(
1433 xUIHelper->newModel( m_xFrameModel, sNewName ), UNO_SET_THROW );
1435 Reference< XPropertySet > xModelProps( xNewModel, UNO_QUERY_THROW );
1436 xModelProps->setPropertyValue(
"ExternalData",
Any( !bDocumentData ) );
1438 m_xModelsBox->append_text(sNewName);
1439 m_xModelsBox->set_active(m_xModelsBox->get_count() - 1);
1440 ModelSelectHdl(m_xModelsBox.get());
1441 bIsDocModified =
true;
1451 else if (rIdent ==
"modelsedit")
1454 aDlg.
SetName( sSelectedModel );
1456 bool bDocumentData(
false );
1459 Reference< css::xforms::XFormsSupplier > xFormsSupp( m_xFrameModel, UNO_QUERY_THROW );
1460 Reference< XNameContainer > xXForms( xFormsSupp->getXForms(), UNO_SET_THROW );
1461 Reference< XPropertySet > xModelProps( xXForms->getByName( sSelectedModel ), UNO_QUERY_THROW );
1462 bool bExternalData =
false;
1463 OSL_VERIFY( xModelProps->getPropertyValue(
"ExternalData" ) >>= bExternalData );
1464 bDocumentData = !bExternalData;
1479 Reference< css::xforms::XFormsSupplier > xFormsSupp( m_xFrameModel, UNO_QUERY_THROW );
1480 Reference< XNameContainer > xXForms( xFormsSupp->getXForms(), UNO_SET_THROW );
1481 Reference< XPropertySet > xModelProps( xXForms->getByName( sSelectedModel ), UNO_QUERY_THROW );
1482 xModelProps->setPropertyValue(
"ExternalData",
Any( !bDocumentData ) );
1483 bIsDocModified =
true;
1491 OUString sNewName = aDlg.
GetName();
1492 if ( !sNewName.isEmpty() && ( sNewName != sSelectedModel ) )
1496 xUIHelper->renameModel( m_xFrameModel, sSelectedModel, sNewName );
1498 m_xModelsBox->remove(nSelectedPos);
1499 m_xModelsBox->append_text(sNewName);
1500 m_xModelsBox->set_active(m_xModelsBox->get_count() - 1);
1501 bIsDocModified =
true;
1510 else if (rIdent ==
"modelsremove")
1513 VclMessageType::Question, VclButtonsType::YesNo,
1514 SvxResId( RID_STR_QRY_REMOVE_MODEL)));
1515 OUString sText = xQBox->get_primary_text();
1516 sText = sText.replaceFirst(
MODELNAME, sSelectedModel );
1517 xQBox->set_primary_text(sText);
1522 xUIHelper->removeModel( m_xFrameModel, sSelectedModel );
1528 m_xModelsBox->remove(nSelectedPos);
1529 if (m_xModelsBox->get_count() <= nSelectedPos)
1530 nSelectedPos = m_xModelsBox->get_count() - 1;
1531 m_xModelsBox->set_active(nSelectedPos);
1532 ModelSelectHdl(m_xModelsBox.get());
1533 bIsDocModified =
true;
1536 else if (rIdent ==
"instancesadd")
1541 OUString sPageId = GetNewPageId();
1544 if (
sName.isEmpty())
1546 SAL_WARN(
"svx.form",
"DataNavigatorWindow::CreateInstancePage(): instance without name" );
1550 OUString sURL = aDlg.
GetURL();
1554 xUIHelper->newInstance(
sName, sURL, !bLinkOnce );
1560 ModelSelectHdl(
nullptr );
1566 ActivatePageHdl(sPageId);
1568 bIsDocModified =
true;
1571 else if (rIdent ==
"instancesedit")
1573 OUString sIdent = GetCurrentPage();
1581 OUString sOldName = aDlg.
GetName();
1584 OUString sNewName = aDlg.
GetName();
1585 OUString sURL = aDlg.
GetURL();
1589 xUIHelper->renameInstance( sOldName,
1601 m_xTabCtrl->set_tab_label_text(sIdent, sNewName);
1602 bIsDocModified =
true;
1606 else if (rIdent ==
"instancesremove")
1608 OUString sIdent = GetCurrentPage();
1614 VclMessageType::Question, VclButtonsType::YesNo,
1615 SvxResId(RID_STR_QRY_REMOVE_INSTANCE)));
1616 OUString sMessText = xQBox->get_primary_text();
1617 sMessText = sMessText.replaceFirst(
INSTANCENAME, sInstName );
1618 xQBox->set_primary_text(sMessText);
1621 bool bDoRemove =
false;
1622 if (IsAdditionalPage(sIdent))
1624 auto aPageListEnd = m_aPageList.end();
1625 auto aFoundPage = std::find_if(m_aPageList.begin(), aPageListEnd,
1626 [pPage](
const auto&elem) { return elem.get() == pPage; });
1627 if ( aFoundPage != aPageListEnd )
1629 m_aPageList.erase( aFoundPage );
1635 m_xInstPage.reset();
1643 xUIHelper->removeInstance( sInstName );
1649 m_xTabCtrl->remove_page(sIdent);
1650 m_xTabCtrl->set_current_page(
"instance");
1651 ModelSelectHdl(
nullptr );
1652 bIsDocModified =
true;
1657 else if (rIdent ==
"instancesdetails")
1659 m_bShowDetails = !m_bShowDetails;
1660 m_xInstanceBtn->set_item_active(
"instancesdetails", m_bShowDetails);
1661 ModelSelectHdl(m_xModelsBox.get());
1665 SAL_WARN(
"svx.form",
"DataNavigatorWindow::MenuSelectHdl(): wrong menu item" );
1668 m_bIsNotifyDisabled =
false;
1670 if ( bIsDocModified )
1681 if (m_xInstanceBtn.get() == &rBtn)
1683 OUString sIdent(m_xTabCtrl->get_current_page_ident());
1684 bool bIsInstPage = (IsAdditionalPage(sIdent) || sIdent ==
"instance");
1685 m_xInstanceBtn->set_item_sensitive(
"instancesedit", bIsInstPage );
1686 m_xInstanceBtn->set_item_sensitive(
"instancesremove",
1688 m_xInstanceBtn->set_item_sensitive(
"instancesdetails", bIsInstPage );
1690 else if (m_xModelBtn.get() == &rBtn)
1693 m_xModelBtn->set_item_sensitive(
"modelsremove", m_xModelsBox->get_count() > 1 );
1697 SAL_WARN(
"svx.form",
"DataNavigatorWindow::MenuActivateHdl(): wrong button" );
1706 if (m_xDataContainer.is() && !pPage->
HasModel())
1707 SetPageModel(rIdent);
1712 ModelSelectHdl(
nullptr );
1718 if (rCurId ==
"submissions")
1724 else if (rCurId ==
"bindings")
1730 else if (rCurId ==
"instance")
1762 Reference< XController > xCtrl =
m_xFrame->getController();
1780 Reference< css::xforms::XFormsSupplier > xFormsSupp(
m_xFrameModel, UNO_QUERY );
1781 if ( xFormsSupp.is() )
1783 Reference< XNameContainer > xContainer = xFormsSupp->getXForms();
1784 if ( xContainer.is() )
1787 const Sequence< OUString > aNameList =
m_xDataContainer->getElementNames();
1788 for (
const OUString& rName : aNameList )
1791 Reference< css::xforms::XModel > xFormsModel;
1792 if ( aAny >>= xFormsModel )
1817 Reference< css::xforms::XModel > xFormsModel;
1818 if ( aAny >>= xFormsModel )
1822 DBG_ASSERT( pPage,
"DataNavigatorWindow::SetPageModel(): no page" );
1826 nPagePos =
m_xTabCtrl->get_page_index(rIdent);
1829 OUString sText = pPage->
SetModel( xFormsModel, nPagePos );
1831 if (!sText.isEmpty())
1832 m_xTabCtrl->set_tab_label_text(rIdent, sText);
1835 catch (
const NoSuchElementException& )
1837 SAL_WARN(
"svx.form",
"DataNavigatorWindow::SetPageModel(): no such element" );
1851 Reference< css::xforms::XModel >
xModel;
1854 Reference< XEnumerationAccess > xNumAccess =
xModel->getInstances();
1855 if ( xNumAccess.is() )
1857 Reference < XEnumeration > xNum = xNumAccess->createEnumeration();
1858 if ( xNum.is() && xNum->hasMoreElements() )
1860 sal_Int32 nAlreadyLoadedCount =
m_aPageList.size();
1862 nAlreadyLoadedCount--;
1864 while ( xNum->hasMoreElements() )
1866 if ( nIdx > nAlreadyLoadedCount )
1868 Sequence< PropertyValue > xPropSeq;
1869 if ( xNum->nextElement() >>= xPropSeq )
1873 SAL_WARN(
"svx.form",
"DataNavigator::InitPages(): invalid instance" );
1877 xNum->nextElement();
1884 catch ( NoSuchElementException& )
1886 SAL_WARN(
"svx.form",
"DataNavigatorWindow::SetPageModel(): no such element" );
1921 auto pProp = std::find_if(_xPropSeq.begin(), _xPropSeq.end(),
1922 [](
const PropertyValue& rProp) { return PN_INSTANCE_ID == rProp.Name; });
1923 if (pProp != _xPropSeq.end())
1924 pProp->Value >>= sInstName;
1927 if ( sInstName.isEmpty() )
1929 SAL_WARN(
"svx.form",
"DataNavigatorWindow::CreateInstancePage(): instance without name" );
1930 sInstName =
"untitled";
1937 return m_xTabCtrl->get_page_ident(0) ==
"instance";
1949 if (!sIdent.startsWith(
"additional", &sNumber))
1951 int nPageId = sNumber.toInt32();
1956 return "additional" + OUString::number(nMax + 1);
1962 DBG_ASSERT( pCurrentDoc,
"DataNavigatorWindow::SetDocModified(): no objectshell" );
1990 xContainer->addContainerListener( xListener );
2023 :
SfxDockingWindow(_pBindings, _pMgr, _pParent,
"DataNavigator",
"svx/ui/datanavigator.ui")
2029 Size aSize = GetOptimalSize();
2030 Size aLogSize = PixelToLogic(aSize,
MapMode(MapUnit::MapAppFont));
2052 if ( ( eAlign == SfxChildAlignment::TOP ) || ( eAlign == SfxChildAlignment::BOTTOM ) )
2062 case SfxChildAlignment::LEFT:
2063 case SfxChildAlignment::RIGHT:
2064 case SfxChildAlignment::NOALIGNMENT:
2074 DataNavigatorManager::DataNavigatorManager(
2082 GetWindow()->SetSizePixel(
Size( 250, 400 ) );
2087 const Reference< css::xforms::XFormsUIHelper1 >& _rUIHelper)
2088 : GenericDialogController(pParent,
"svx/ui/adddataitemdialog.ui",
"AddDataItemDialog")
2089 , m_xUIHelper(_rUIHelper)
2090 , m_pItemNode(_pNode)
2092 , m_sFL_Element(
SvxResId(RID_STR_ELEMENT))
2093 , m_sFL_Attribute(
SvxResId(RID_STR_ATTRIBUTE))
2094 , m_sFL_Binding(
SvxResId(RID_STR_BINDING))
2095 , m_sFT_BindingExp(
SvxResId(RID_STR_BINDING_EXPR))
2096 , m_xItemFrame(m_xBuilder->weld_frame(
"itemframe"))
2097 , m_xNameFT(m_xBuilder->weld_label(
"nameft"))
2098 , m_xNameED(m_xBuilder->weld_entry(
"name"))
2099 , m_xDefaultFT(m_xBuilder->weld_label(
"valueft"))
2100 , m_xDefaultED(m_xBuilder->weld_entry(
"value"))
2101 , m_xDefaultBtn(m_xBuilder->weld_button(
"browse"))
2102 , m_xSettingsFrame(m_xBuilder->weld_widget(
"settingsframe"))
2103 , m_xDataTypeLB(m_xBuilder->weld_combo_box(
"datatype"))
2104 , m_xRequiredCB(m_xBuilder->weld_check_button(
"required"))
2105 , m_xRequiredBtn(m_xBuilder->weld_button(
"requiredcond"))
2106 , m_xRelevantCB(m_xBuilder->weld_check_button(
"relevant"))
2107 , m_xRelevantBtn(m_xBuilder->weld_button(
"relevantcond"))
2108 , m_xConstraintCB(m_xBuilder->weld_check_button(
"constraint"))
2109 , m_xConstraintBtn(m_xBuilder->weld_button(
"constraintcond"))
2110 , m_xReadonlyCB(m_xBuilder->weld_check_button(
"readonly"))
2111 , m_xReadonlyBtn(m_xBuilder->weld_button(
"readonlycond"))
2112 , m_xCalculateCB(m_xBuilder->weld_check_button(
"calculate"))
2113 , m_xCalculateBtn(m_xBuilder->weld_button(
"calculatecond"))
2114 , m_xOKBtn(m_xBuilder->weld_button(
"ok"))
2131 Reference < XSet > xBindings =
xModel->getBindings();
2132 if ( xBindings.is() )
2165 OUString sTemp, sPropName;
2178 if ( bIsChecked && sTemp.isEmpty() )
2180 else if ( !bIsChecked && !sTemp.isEmpty() )
2188 if ( m_xDefaultBtn.get() == &rBtn )
2190 else if ( m_xRequiredBtn.get() == &rBtn )
2192 else if ( m_xRelevantBtn.get() == &rBtn )
2194 else if ( m_xConstraintBtn.get() == &rBtn )
2196 else if (m_xReadonlyBtn.get() == &rBtn)
2198 else if (m_xCalculateBtn.get() == &rBtn)
2201 bool bIsDefBtn = ( m_xDefaultBtn.get() == &rBtn );
2202 OUString sCondition;
2204 sCondition = m_xDefaultED->get_text();
2208 m_xTempBinding->getPropertyValue( sPropName ) >>= sTemp;
2209 if ( sTemp.isEmpty() )
2219 m_xDefaultED->set_text(sNewCondition);
2223 m_xTempBinding->setPropertyValue(
2224 sPropName,
Any( sNewCondition ) );
2229 static void copyPropSet(
const Reference< XPropertySet >& xFrom, Reference< XPropertySet >
const & xTo )
2231 DBG_ASSERT( xFrom.is(),
"copyPropSet(): no source" );
2232 DBG_ASSERT( xTo.is(),
"copyPropSet(): no target" );
2237 const Sequence< Property >
aProperties = xTo->getPropertySetInfo()->getProperties();
2238 Reference< XPropertySetInfo > xFromInfo = xFrom->getPropertySetInfo();
2241 const OUString& rName = rProperty.Name;
2245 if ( xFromInfo->hasPropertyByName( rName ) )
2248 Property aProperty = xFromInfo->getPropertyByName( rName );
2249 if ( ( aProperty.Attributes & PropertyAttribute::READONLY ) == 0 )
2250 xTo->setPropertyValue(rName, xFrom->getPropertyValue( rName ));
2263 bool bIsHandleBinding = (
DITBinding == m_eItemType );
2264 bool bIsHandleText = (
DITText == m_eItemType );
2265 OUString sNewName( m_xNameED->get_text() );
2267 if ( ( !bIsHandleBinding && !bIsHandleText && !m_xUIHelper->isValidXMLName( sNewName ) ) ||
2268 ( bIsHandleBinding && sNewName.isEmpty() ) )
2272 VclMessageType::Warning, VclButtonsType::Ok,
2273 SvxResId(RID_STR_INVALID_XMLNAME)));
2274 xErrBox->set_primary_text(xErrBox->get_primary_text().replaceFirst(
MSG_VARIABLE, sNewName));
2279 OUString sDataType( m_xDataTypeLB->get_active_text() );
2282 if ( bIsHandleBinding )
2285 copyPropSet( m_xTempBinding, m_pItemNode->m_xPropSet );
2288 OUString sValue = m_xNameED->get_text();
2290 sValue = m_xDefaultED->get_text();
2304 if ( bIsHandleText )
2305 m_xUIHelper->setNodeValue( m_pItemNode->m_xNode, m_xDefaultED->get_text() );
2308 Reference< css::xml::dom::XNode > xNewNode =
2309 m_xUIHelper->renameNode( m_pItemNode->m_xNode, m_xNameED->get_text() );
2310 m_xUIHelper->setNodeValue( xNewNode, m_xDefaultED->get_text() );
2311 m_pItemNode->m_xNode = xNewNode;
2354 switch ( eChildType )
2356 case css::xml::dom::NodeType_ATTRIBUTE_NODE:
2359 case css::xml::dom::NodeType_ELEMENT_NODE:
2362 case css::xml::dom::NodeType_TEXT_NODE:
2366 OSL_FAIL(
"AddDataItemDialog::InitFronNode: cannot handle this node type!" );
2384 Reference < XSet > xBindings =
xModel->getBindings();
2385 if ( xBindings.is() )
2411 Reference < XSet > xBindings =
xModel->getBindings();
2412 if ( xBindings.is() )
2451 && !sTemp.isEmpty() )
2454 && !sTemp.isEmpty() )
2457 && !sTemp.isEmpty() )
2460 && !sTemp.isEmpty() )
2463 && !sTemp.isEmpty() )
2492 Reference< css::xforms::XDataTypeRepository > xDataTypes =
2493 xModel->getDataTypeRepository();
2494 if ( xDataTypes.is() )
2496 const Sequence< OUString > aNameList = xDataTypes->getElementNames();
2497 for (
const OUString& rName : aNameList )
2551 OUString _aPropertyName,
2552 const Reference< XPropertySet >& _rPropSet)
2553 : GenericDialogController(pParent,
"svx/ui/addconditiondialog.ui",
"AddConditionDialog")
2554 , m_aResultIdle(
"svx AddConditionDialog m_aResultIdle")
2555 , m_sPropertyName(
std::move(_aPropertyName))
2556 , m_xBinding(_rPropSet)
2557 , m_xConditionED(m_xBuilder->weld_text_view(
"condition"))
2558 , m_xResultWin(m_xBuilder->weld_text_view(
"result"))
2559 , m_xEditNamespacesBtn(m_xBuilder->weld_button(
"edit"))
2560 , m_xOKBtn(m_xBuilder->weld_button(
"ok"))
2581 && !sTemp.isEmpty() )
2591 Reference< css::xforms::XModel >
xModel;
2611 Reference< XNameContainer > xNameContnr;
2639 m_aResultIdle.Start();
2646 if ( !sCondition.isEmpty() )
2650 sResult = m_xUIHelper->getResultForExpression( m_xBinding, ( m_sPropertyName ==
PN_BINDING_EXPR ), sCondition );
2657 m_xResultWin->set_text(sResult);
2661 : GenericDialogController(pCondDlg->getDialog(),
"svx/ui/namespacedialog.ui",
"NamespaceDialog")
2662 , m_pConditionDlg(pCondDlg)
2663 , m_rNamespaces(rContainer)
2664 , m_xNamespacesList(m_xBuilder->weld_tree_view(
"namespaces"))
2665 , m_xAddNamespaceBtn(m_xBuilder->weld_button(
"add"))
2666 , m_xEditNamespaceBtn(m_xBuilder->weld_button(
"edit"))
2667 , m_xDeleteNamespaceBtn(m_xBuilder->weld_button(
"delete"))
2668 , m_xOKBtn(m_xBuilder->weld_button(
"ok"))
2673 std::vector<int> aWidths
2696 bool bEnable = m_xNamespacesList->get_selected_index() != -1;
2697 m_xEditNamespaceBtn->set_sensitive( bEnable );
2698 m_xDeleteNamespaceBtn->set_sensitive( bEnable );
2703 if (m_xAddNamespaceBtn.get() == &rButton)
2708 m_xNamespacesList->append_text(aDlg.
GetPrefix());
2709 int nRow = m_xNamespacesList->n_children();
2710 m_xNamespacesList->set_text(nRow - 1, aDlg.
GetURL(), 1);
2713 else if (m_xEditNamespaceBtn.get() == &rButton)
2716 int nEntry = m_xNamespacesList->get_selected_index();
2717 DBG_ASSERT( nEntry != -1,
"NamespaceItemDialog::ClickHdl(): no entry" );
2718 OUString
sPrefix(m_xNamespacesList->get_text(nEntry, 0));
2724 m_aRemovedList.push_back(
sPrefix );
2726 m_xNamespacesList->set_text(nEntry, aDlg.
GetPrefix(), 0);
2727 m_xNamespacesList->set_text(nEntry, aDlg.
GetURL(), 1);
2730 else if (m_xDeleteNamespaceBtn.get() == &rButton)
2732 int nEntry = m_xNamespacesList->get_selected_index();
2733 DBG_ASSERT( nEntry != -1,
"NamespaceItemDialog::ClickHdl(): no entry" );
2734 OUString
sPrefix(m_xNamespacesList->get_text(nEntry, 0));
2735 m_aRemovedList.push_back(
sPrefix );
2736 m_xNamespacesList->remove(nEntry);
2740 SAL_WARN(
"svx.form",
"NamespaceItemDialog::ClickHdl(): invalid button" );
2743 SelectHdl(*m_xNamespacesList);
2751 sal_Int32
i, nRemovedCount = m_aRemovedList.size();
2752 for(
i = 0;
i < nRemovedCount; ++
i )
2753 m_rNamespaces->removeByName( m_aRemovedList[
i] );
2755 sal_Int32 nEntryCount = m_xNamespacesList->n_children();
2756 for(
i = 0;
i < nEntryCount; ++
i )
2758 OUString
sPrefix(m_xNamespacesList->get_text(
i, 0));
2759 OUString sURL(m_xNamespacesList->get_text(
i, 1));
2761 if ( m_rNamespaces->hasByName(
sPrefix ) )
2762 m_rNamespaces->replaceByName(
sPrefix,
Any( sURL ) );
2764 m_rNamespaces->insertByName(
sPrefix,
Any( sURL ) );
2780 const Sequence< OUString > aAllNames =
m_rNamespaces->getElementNames();
2781 for (
const OUString&
sPrefix : aAllNames )
2803 : GenericDialogController(pParent,
"svx/ui/addnamespacedialog.ui",
"AddNamespaceDialog")
2804 , m_pConditionDlg(pCondDlg)
2805 , m_xPrefixED(m_xBuilder->weld_entry(
"prefix"))
2806 , m_xUrlED(m_xBuilder->weld_entry(
"url"))
2807 , m_xOKBtn(m_xBuilder->weld_button(
"ok"))
2808 , m_xAltTitle(m_xBuilder->weld_label(
"alttitle"))
2822 OUString
sPrefix = m_xPrefixED->get_text();
2826 if (!m_pConditionDlg->GetUIHelper()->isValidPrefixName(
sPrefix))
2829 VclMessageType::Warning, VclButtonsType::Ok,
2830 SvxResId(RID_STR_INVALID_XMLPREFIX)));
2831 xErrBox->set_primary_text(xErrBox->get_primary_text().replaceFirst(
MSG_VARIABLE,
sPrefix));
2847 const Reference< css::xforms::XFormsUIHelper1 >& _rUIHelper)
2848 : GenericDialogController(pParent,
"svx/ui/addsubmissiondialog.ui",
"AddSubmissionDialog")
2849 , m_pItemNode(_pNode)
2850 , m_xUIHelper(_rUIHelper)
2851 , m_xNameED(m_xBuilder->weld_entry(
"name"))
2852 , m_xActionED(m_xBuilder->weld_entry(
"action"))
2853 , m_xMethodLB(m_xBuilder->weld_combo_box(
"method"))
2854 , m_xRefED(m_xBuilder->weld_entry(
"expression"))
2855 , m_xRefBtn(m_xBuilder->weld_button(
"browse"))
2856 , m_xBindLB(m_xBuilder->weld_combo_box(
"binding"))
2857 , m_xReplaceLB(m_xBuilder->weld_combo_box(
"replace"))
2858 , m_xOKBtn(m_xBuilder->weld_button(
"ok"))
2883 OUString
sName(m_xNameED->get_text());
2887 VclMessageType::Warning, VclButtonsType::Ok,
2888 SvxResId(RID_STR_EMPTY_SUBMISSIONNAME)));
2893 if ( !m_xSubmission.is() )
2896 "AddSubmissionDialog::OKHdl(): new submission already exists" );
2899 Reference< css::xforms::XModel >
xModel( m_xUIHelper, UNO_QUERY );
2904 m_xNewSubmission =
xModel->createSubmission();
2905 m_xSubmission = m_xNewSubmission;
2914 if ( m_xSubmission.is() )
2916 OUString sTemp = m_xNameED->get_text();
2920 sTemp = m_xActionED->get_text();
2922 sTemp = m_aMethodString.toAPI( m_xMethodLB->get_active_text() );
2924 sTemp = m_xRefED->get_text();
2926 OUString sEntry = m_xBindLB->get_active_text();
2927 sal_Int32 nColonIdx = sEntry.indexOf(
':');
2928 if (nColonIdx != -1)
2929 sEntry = sEntry.copy(0, nColonIdx);
2932 sTemp = m_aReplaceString.toAPI( m_xReplaceLB->get_active_text() );
2958 Reference< XEnumerationAccess > xNumAccess =
xModel->getBindings();
2959 if ( xNumAccess.is() )
2961 Reference < XEnumeration > xNum = xNumAccess->createEnumeration();
2962 if ( xNum.is() && xNum->hasMoreElements() )
2964 while ( xNum->hasMoreElements() )
2966 Reference< XPropertySet > xPropSet;
2967 Any aAny = xNum->nextElement();
2968 if ( aAny >>= xPropSet )
2973 sEntry += sTemp +
": ";
2996 Reference<css::xml::dom::XNode>(
2997 xModel->getDefaultInstance()->getDocumentElement(),
3044 if ( sTemp.isEmpty() )
3064 : GenericDialogController(pParent,
"svx/ui/addmodeldialog.ui",
"AddModelDialog")
3065 , m_xNameED(m_xBuilder->weld_entry(
"name"))
3066 , m_xModifyCB(m_xBuilder->weld_check_button(
"modify"))
3067 , m_xAltTitle(m_xBuilder->weld_label(
"alttitle"))
3078 : GenericDialogController(pParent,
"svx/ui/addinstancedialog.ui",
"AddInstanceDialog")
3079 , m_xNameED(m_xBuilder->weld_entry(
"name"))
3080 , m_xURLED(new
SvtURLBox(m_xBuilder->weld_combo_box(
"url")))
3081 , m_xFilePickerBtn(m_xBuilder->weld_button(
"browse"))
3082 , m_xLinkInstanceCB(m_xBuilder->weld_check_button(
"link"))
3083 , m_xAltTitle(m_xBuilder->weld_label(
"alttitle"))
3102 css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
3103 FileDialogFlags::NONE,
m_xDialog.get());
3107 OUString sFilterName(
"XML" );
3112 m_xURLED->set_entry_text(aDlg.
GetPath());
3116 : MessageDialogController(pParent,
"svx/ui/formlinkwarndialog.ui",
3117 "FormLinkWarnDialog")
PropertiesInfo aProperties
constexpr OUStringLiteral sModel
Reference< XExecutableDialog > m_xDialog
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
std::unique_ptr< weld::Container > m_xContainer
SfxDispatcher * GetDispatcher() const
SfxViewFrame * GetFrame() const
void Initialize(SfxChildWinInfo *pInfo)
void SetAlignment(SfxChildAlignment eAlign)
void SetFloatingSize(const Size &rSize)
virtual Size CalcDockingSize(SfxChildAlignment)
virtual void dispose() override
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
bool IsEnableSetModified() const
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
virtual void SetModified(bool bModified=true)
SfxFrame & GetFrame() const
void SetPageID(const OUString &rID)
css::uno::Any GetUserItem(const OUString &sName) const
void SetUserItem(const OUString &sName, const css::uno::Any &aValue)
OUString GetPageID() const
void SetPriority(TaskPriority ePriority)
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
virtual void Start(bool bStartTimer=true) override
const_iterator find(const Value &x) const
const_iterator end() const
void AddFilter(const OUString &rFilterName, const OUString &rExtension)
void SetCurrentFilter(const OUString &rFilter)
void SetContext(Context _eNewContext)
OUString LoadInstance(const css::uno::Sequence< css::beans::PropertyValue > &_xPropSeq)
std::unique_ptr< weld::Toolbar > m_xToolBox
std::unique_ptr< weld::Menu > m_xMenu
void AddEntry(std::unique_ptr< ItemNode > _pNewNode, bool _bIsElement, weld::TreeIter *pRet=nullptr)
void SetInstanceName(const OUString &name)
OUString SetModel(const css::uno::Reference< css::xforms::XModel > &_xModel, int _nPagePos)
css::uno::Reference< css::xforms::XFormsUIHelper1 > m_xUIHelper
void AddChildren(const weld::TreeIter *_pParent, const css::uno::Reference< css::xml::dom::XNode > &_xNode)
DataNavigatorWindow * m_pNaviWin
std::unique_ptr< weld::TreeView > m_xItemList
void SetLinkOnce(bool bLinkOnce)
const OUString & GetInstanceName() const
o3tl::sorted_vector< OUString > m_aRemovedMenuEntries
void EditEntry(const css::uno::Reference< css::beans::XPropertySet > &_rPropSet)
OUString GetServiceNameForNode(const css::uno::Reference< css::xml::dom::XNode > &xNode)
ReplaceString m_aReplaceString
XFormsPage(weld::Container *pParent, DataNavigatorWindow *_pNaviWin, DataGroupType _eGroup)
css::uno::Reference< css::beans::XPropertySet > GetBindingForNode(const css::uno::Reference< css::xml::dom::XNode > &xNode)
bool DoMenuAction(std::u16string_view rMenuID)
weld::Container * m_pParent
virtual ~XFormsPage() override
void SetMenuEntrySensitive(const OUString &rIdent, bool bSensitive)
void SetInstanceURL(const OUString &url)
const css::uno::Reference< css::xforms::XFormsUIHelper1 > & GetXFormsHelper() const
MethodString m_aMethodString
const OUString & GetInstanceURL() const
void DeleteAndClearTree()
std::unique_ptr< weld::TreeIter > m_xScratchIter
bool DoToolBoxAction(std::u16string_view rToolBoxID)
virtual void move(weld::Widget *pWidget, weld::Container *pNewParent)=0
void set_title(const OUString &rTitle)
std::shared_ptr< weld::Dialog > m_xDialog
virtual bool get_active() const=0
constexpr OUStringLiteral MODELNAME
constexpr OUStringLiteral INSTANCENAME
constexpr OUStringLiteral SUBMISSIONNAME
constexpr OUStringLiteral ATTRIBUTENAME
constexpr OUStringLiteral CFGNAME_SHOWDETAILS
constexpr OUStringLiteral BINDINGNAME
constexpr OUStringLiteral ELEMENTNAME
constexpr OUStringLiteral MSG_VARIABLE
constexpr OUStringLiteral CFGNAME_DATANAVIGATOR
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
OUString SvxResId(TranslateId aId)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
virtual void SetText(const OUString &rStr) override
Reference< XInterface > xTarget
constexpr OUStringLiteral FM_COMPONENT_COMMANDBUTTON
constexpr OUStringLiteral FILEDIALOG_FILTER_ALL
constexpr sal_uInt16 KEY_DELETE
#define LINK(Instance, Class, Member)
#define SAL_WARN(area, stream)
std::locale Create(std::string_view aPrefixName, const LanguageTag &rLocale)
OUString get(TranslateId sContextAndId, const std::locale &loc)
OString strip(const OString &rIn, char c)
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
OUString toId(const void *pValue)
SFX_IMPL_DOCKINGWINDOW(SwNavigatorWrapper, SID_NAVIGATOR)
Reference< XModel > xModel