2012-09-26 17:53:12 -04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "xmlsourcedlg.hxx"
|
|
|
|
#include "xmlsourcedlg.hrc"
|
|
|
|
|
2012-09-26 21:12:11 -04:00
|
|
|
#include "scresid.hxx"
|
2012-09-28 20:22:23 -04:00
|
|
|
#include "document.hxx"
|
2012-09-28 22:19:46 -04:00
|
|
|
#include "orcusfilters.hxx"
|
|
|
|
#include "filter.hxx"
|
2012-10-10 20:45:55 -04:00
|
|
|
#include "reffact.hxx"
|
2012-09-28 20:22:23 -04:00
|
|
|
|
2012-10-11 01:22:21 -04:00
|
|
|
#include "unotools/pathoptions.hxx"
|
|
|
|
#include "tools/urlobj.hxx"
|
|
|
|
|
2012-09-28 20:22:23 -04:00
|
|
|
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
|
|
|
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
|
|
|
|
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
|
|
|
|
|
|
|
|
using namespace com::sun::star;
|
|
|
|
|
2012-09-26 21:12:11 -04:00
|
|
|
|
2012-09-28 17:51:09 -04:00
|
|
|
ScXMLSourceTree::ScXMLSourceTree(Window* pParent, const ResId& rResId) :
|
2012-10-03 10:33:09 -04:00
|
|
|
SvTreeListBox(pParent, rResId) {}
|
2012-09-28 17:51:09 -04:00
|
|
|
|
2012-10-10 20:45:55 -04:00
|
|
|
ScXMLSourceDlg::ScXMLSourceDlg(
|
|
|
|
SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, ScDocument* pDoc) :
|
|
|
|
ScAnyRefDlg(pB, pCW, pParent, RID_SCDLG_XML_SOURCE),
|
2012-09-28 17:51:09 -04:00
|
|
|
maFlSourceFile(this, ScResId(FL_SOURCE_FILE)),
|
|
|
|
maBtnSelectSource(this, ScResId(BTN_SELECT_SOURCE_FILE)),
|
|
|
|
maFtSourceFile(this, ScResId(FT_SOURCE_FILE)),
|
|
|
|
maFtMapXmlDoc(this, ScResId(FL_MAP_XML_TO_DOCUMENT)),
|
2012-10-10 20:45:55 -04:00
|
|
|
maFtMappedCellTitle(this, ScResId(FT_MAPPED_CELL_TITLE)),
|
2012-10-12 21:32:09 -04:00
|
|
|
maRefEdit(this, this, ScResId(ED_MAPPED_CELL)),
|
|
|
|
maRefBtn(this, ScResId(BTN_MAPPED_CELL), &maRefEdit, this),
|
2012-09-28 17:51:09 -04:00
|
|
|
maLbTree(this, ScResId(LB_SOURCE_TREE)),
|
|
|
|
maBtnCancel(this, ScResId(BTN_CANCEL)),
|
2012-09-28 20:22:23 -04:00
|
|
|
maImgFileOpen(ScResId(IMG_FILE_OPEN)),
|
2012-10-10 20:45:55 -04:00
|
|
|
mpDoc(pDoc),
|
2012-10-12 21:32:09 -04:00
|
|
|
mpActiveEdit(&maRefEdit),
|
2012-10-11 00:20:46 -04:00
|
|
|
mbDlgLostFocus(false)
|
2012-09-26 20:13:42 -04:00
|
|
|
{
|
2012-10-12 16:35:27 -04:00
|
|
|
maXMLParam.maImgElementDefault = Image(ScResId(IMG_ELEMENT_DEFAULT));
|
|
|
|
maXMLParam.maImgElementRepeat = Image(ScResId(IMG_ELEMENT_REPEAT));
|
|
|
|
maXMLParam.maImgAttribute = Image(ScResId(IMG_ELEMENT_ATTRIBUTE));
|
|
|
|
|
2012-09-28 17:51:09 -04:00
|
|
|
maBtnSelectSource.SetModeImage(maImgFileOpen);
|
2012-09-26 21:12:11 -04:00
|
|
|
FreeResource();
|
2012-09-28 20:22:23 -04:00
|
|
|
|
|
|
|
maBtnSelectSource.SetClickHdl(LINK(this, ScXMLSourceDlg, BtnPressedHdl));
|
2012-10-10 20:45:55 -04:00
|
|
|
|
2012-10-11 00:20:46 -04:00
|
|
|
Link aLink = LINK(this, ScXMLSourceDlg, GetFocusHdl);
|
2012-10-12 21:32:09 -04:00
|
|
|
maRefEdit.SetGetFocusHdl(aLink);
|
|
|
|
maRefBtn.SetGetFocusHdl(aLink);
|
2012-10-11 00:20:46 -04:00
|
|
|
aLink = LINK(this, ScXMLSourceDlg, LoseFocusHdl);
|
2012-10-12 21:32:09 -04:00
|
|
|
maRefEdit.SetLoseFocusHdl(aLink);
|
|
|
|
maRefBtn.SetLoseFocusHdl(aLink);
|
2012-10-11 00:20:46 -04:00
|
|
|
|
2012-10-11 01:22:21 -04:00
|
|
|
aLink = LINK(this, ScXMLSourceDlg, TreeItemSelectHdl);
|
|
|
|
maLbTree.SetSelectHdl(aLink);
|
2012-10-12 21:32:09 -04:00
|
|
|
|
|
|
|
SetNonLinkable();
|
2012-09-26 20:13:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ScXMLSourceDlg::~ScXMLSourceDlg()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-10-10 20:45:55 -04:00
|
|
|
sal_Bool ScXMLSourceDlg::IsRefInputMode() const
|
|
|
|
{
|
2012-10-12 23:45:50 -04:00
|
|
|
return mpActiveEdit != NULL && mpActiveEdit->IsEnabled();
|
2012-10-10 20:45:55 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void ScXMLSourceDlg::SetReference(const ScRange& rRange, ScDocument* pDoc)
|
|
|
|
{
|
2012-10-11 00:20:46 -04:00
|
|
|
if (!mpActiveEdit)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (rRange.aStart != rRange.aEnd)
|
|
|
|
RefInputStart(mpActiveEdit);
|
|
|
|
|
|
|
|
OUString aStr;
|
|
|
|
rRange.aStart.Format(aStr, SCA_ABS_3D, pDoc, pDoc->GetAddressConvention());
|
|
|
|
mpActiveEdit->SetRefString(aStr);
|
2012-10-12 21:47:20 -04:00
|
|
|
|
|
|
|
// Set this address to currently selected tree item.
|
2012-11-07 13:06:35 -05:00
|
|
|
SvTreeListEntry* pEntry = maLbTree.GetCurEntry();
|
2012-10-12 21:47:20 -04:00
|
|
|
if (!pEntry)
|
|
|
|
return;
|
|
|
|
|
|
|
|
ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(*pEntry);
|
|
|
|
if (!pUserData)
|
|
|
|
return;
|
|
|
|
|
|
|
|
pUserData->maLinkedPos = rRange.aStart;
|
2012-10-12 23:53:44 -04:00
|
|
|
pUserData->mbRangeParent = pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat;
|
2012-10-11 00:20:46 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void ScXMLSourceDlg::Deactivate()
|
|
|
|
{
|
|
|
|
mbDlgLostFocus = true;
|
2012-10-10 20:45:55 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void ScXMLSourceDlg::SetActive()
|
|
|
|
{
|
2012-10-11 00:20:46 -04:00
|
|
|
if (mbDlgLostFocus)
|
|
|
|
{
|
|
|
|
mbDlgLostFocus = false;
|
|
|
|
if (mpActiveEdit)
|
|
|
|
{
|
|
|
|
mpActiveEdit->GrabFocus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
GrabFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
RefInputDone();
|
2012-10-10 20:45:55 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
sal_Bool ScXMLSourceDlg::Close()
|
|
|
|
{
|
|
|
|
return DoClose(ScXMLSourceDlgWrapper::GetChildWindowId());
|
|
|
|
}
|
|
|
|
|
2012-09-28 20:22:23 -04:00
|
|
|
void ScXMLSourceDlg::SelectSourceFile()
|
|
|
|
{
|
|
|
|
uno::Reference<lang::XMultiServiceFactory> xServiceMgr = mpDoc->GetServiceManager();
|
|
|
|
if (!xServiceMgr.is())
|
|
|
|
return;
|
|
|
|
|
|
|
|
uno::Reference<ui::dialogs::XFilePicker> xFilePicker(
|
|
|
|
xServiceMgr->createInstance("com.sun.star.ui.dialogs.FilePicker"), uno::UNO_QUERY);
|
|
|
|
|
|
|
|
if (!xFilePicker.is())
|
|
|
|
return;
|
|
|
|
|
2012-10-11 01:22:21 -04:00
|
|
|
if (maSrcPath.isEmpty())
|
|
|
|
// Use default path.
|
|
|
|
xFilePicker->setDisplayDirectory(SvtPathOptions().GetWorkPath());
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Use the directory of current source file.
|
|
|
|
INetURLObject aURL(maSrcPath);
|
|
|
|
aURL.removeSegment();
|
|
|
|
aURL.removeFinalSlash();
|
|
|
|
OUString aPath = aURL.GetMainURL(INetURLObject::NO_DECODE);
|
|
|
|
xFilePicker->setDisplayDirectory(aPath);
|
|
|
|
}
|
|
|
|
|
2012-09-28 20:22:23 -04:00
|
|
|
if (xFilePicker->execute() != ui::dialogs::ExecutableDialogResults::OK)
|
|
|
|
// File picker dialog cancelled.
|
|
|
|
return;
|
|
|
|
|
|
|
|
uno::Sequence<OUString> aFiles = xFilePicker->getFiles();
|
|
|
|
if (!aFiles.getLength())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// There should only be one file returned from the file picker.
|
2012-10-11 12:23:28 -04:00
|
|
|
maSrcPath = aFiles[0];
|
2012-10-11 01:22:21 -04:00
|
|
|
maFtSourceFile.SetText(maSrcPath);
|
2012-09-28 22:19:46 -04:00
|
|
|
|
2012-10-11 01:22:21 -04:00
|
|
|
LoadSourceFileStructure(maSrcPath);
|
2012-09-28 22:19:46 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void ScXMLSourceDlg::LoadSourceFileStructure(const OUString& rPath)
|
|
|
|
{
|
|
|
|
ScOrcusFilters* pOrcus = ScFormatFilter::Get().GetOrcusFilters();
|
|
|
|
if (!pOrcus)
|
|
|
|
return;
|
|
|
|
|
2012-10-12 17:20:52 -04:00
|
|
|
pOrcus->loadXMLStructure(rPath, maLbTree, maXMLParam);
|
2012-09-28 20:22:23 -04:00
|
|
|
}
|
|
|
|
|
2012-10-11 00:20:46 -04:00
|
|
|
void ScXMLSourceDlg::HandleGetFocus(Control* pCtrl)
|
|
|
|
{
|
|
|
|
mpActiveEdit = NULL;
|
2012-10-12 21:32:09 -04:00
|
|
|
if (pCtrl == &maRefEdit || pCtrl == &maRefBtn)
|
|
|
|
mpActiveEdit = &maRefEdit;
|
2012-10-11 00:20:46 -04:00
|
|
|
|
|
|
|
if (mpActiveEdit)
|
|
|
|
mpActiveEdit->SetSelection(Selection(0, SELECTION_MAX));
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScXMLSourceDlg::HandleLoseFocus(Control* /*pCtrl*/)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-10-11 01:22:21 -04:00
|
|
|
void ScXMLSourceDlg::TreeItemSelected()
|
|
|
|
{
|
2012-11-07 13:06:35 -05:00
|
|
|
SvTreeListEntry* pEntry = maLbTree.GetCurEntry();
|
2012-10-12 21:32:09 -04:00
|
|
|
if (!pEntry)
|
|
|
|
return;
|
|
|
|
|
|
|
|
ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(*pEntry);
|
2012-10-12 23:08:53 -04:00
|
|
|
OSL_ASSERT(pUserData);
|
2012-10-12 21:32:09 -04:00
|
|
|
|
2012-10-12 21:47:20 -04:00
|
|
|
const ScAddress& rPos = pUserData->maLinkedPos;
|
|
|
|
if (rPos.IsValid())
|
|
|
|
{
|
|
|
|
OUString aStr;
|
|
|
|
rPos.Format(aStr, SCA_ABS_3D, mpDoc, mpDoc->GetAddressConvention());
|
|
|
|
maRefEdit.SetRefString(aStr);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
maRefEdit.SetRefString(OUString());
|
|
|
|
|
2012-10-12 21:32:09 -04:00
|
|
|
switch (pUserData->meType)
|
|
|
|
{
|
|
|
|
case ScOrcusXMLTreeParam::Attribute:
|
|
|
|
AttributeSelected(*pEntry);
|
|
|
|
break;
|
|
|
|
case ScOrcusXMLTreeParam::ElementDefault:
|
|
|
|
DefaultElementSelected(*pEntry);
|
|
|
|
break;
|
|
|
|
case ScOrcusXMLTreeParam::ElementRepeat:
|
|
|
|
RepeatElementSelected(*pEntry);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-11-07 13:06:35 -05:00
|
|
|
void ScXMLSourceDlg::DefaultElementSelected(SvTreeListEntry& rEntry)
|
2012-10-12 21:32:09 -04:00
|
|
|
{
|
2012-10-12 23:08:53 -04:00
|
|
|
ScOrcusXMLTreeParam::EntryData* pUserData = NULL;
|
|
|
|
|
2012-10-12 21:32:09 -04:00
|
|
|
if (maLbTree.GetChildCount(&rEntry) > 0)
|
|
|
|
{
|
|
|
|
// Only an element with no child elements (leaf element) can be linked.
|
2012-10-12 23:08:53 -04:00
|
|
|
bool bHasChild = false;
|
2012-11-07 13:06:35 -05:00
|
|
|
for (SvTreeListEntry* pChild = maLbTree.FirstChild(&rEntry); pChild; pChild = maLbTree.NextSibling(pChild))
|
2012-10-12 23:08:53 -04:00
|
|
|
{
|
|
|
|
pUserData = ScOrcusXMLTreeParam::getUserData(*pChild);
|
|
|
|
OSL_ASSERT(pUserData);
|
|
|
|
if (pUserData->meType != ScOrcusXMLTreeParam::Attribute)
|
|
|
|
{
|
|
|
|
// This child is not an attribute. Bail out.
|
|
|
|
bHasChild = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (bHasChild)
|
|
|
|
{
|
|
|
|
SetNonLinkable();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check all its parents and make sure non of them are range-linked nor
|
|
|
|
// repeat elements.
|
|
|
|
if (IsParentDirty(&rEntry))
|
|
|
|
{
|
2012-10-12 21:32:09 -04:00
|
|
|
SetNonLinkable();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
SetSingleLinkable();
|
|
|
|
}
|
|
|
|
|
2012-11-07 13:06:35 -05:00
|
|
|
void ScXMLSourceDlg::RepeatElementSelected(SvTreeListEntry& rEntry)
|
2012-10-12 21:32:09 -04:00
|
|
|
{
|
2012-10-12 23:42:27 -04:00
|
|
|
// Check all its parents first.
|
2012-10-12 21:32:09 -04:00
|
|
|
|
2012-10-12 23:42:27 -04:00
|
|
|
if (IsParentDirty(&rEntry))
|
|
|
|
{
|
|
|
|
SetNonLinkable();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check all its child elements / attributes and make sure non of them are
|
|
|
|
// linked or repeat elements. In the future we will support range linking
|
|
|
|
// of repeat element who has another repeat elements. But first I need to
|
|
|
|
// support that scenario in orcus.
|
|
|
|
|
|
|
|
if (IsChildrenDirty(&rEntry))
|
|
|
|
{
|
|
|
|
SetNonLinkable();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
SetRangeLinkable();
|
2012-10-12 21:32:09 -04:00
|
|
|
}
|
|
|
|
|
2012-11-07 13:06:35 -05:00
|
|
|
void ScXMLSourceDlg::AttributeSelected(SvTreeListEntry& rEntry)
|
2012-10-12 21:32:09 -04:00
|
|
|
{
|
2012-10-12 23:08:53 -04:00
|
|
|
// Check all its parent elements and make sure non of them are linked nor
|
|
|
|
// repeat elements. In attribute's case, it's okay to have the immediate
|
|
|
|
// parent element linked (but not range-linked).
|
|
|
|
|
2012-11-07 13:06:35 -05:00
|
|
|
SvTreeListEntry* pParent = maLbTree.GetParent(&rEntry);
|
2012-10-12 23:08:53 -04:00
|
|
|
OSL_ASSERT(pParent); // attribute should have a parent element.
|
|
|
|
|
|
|
|
ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(*pParent);
|
|
|
|
OSL_ASSERT(pUserData);
|
|
|
|
if (pUserData->maLinkedPos.IsValid() && pUserData->mbRangeParent)
|
|
|
|
{
|
|
|
|
// Parent element is range-linked. Bail out.
|
|
|
|
SetNonLinkable();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (IsParentDirty(pParent))
|
|
|
|
{
|
|
|
|
SetNonLinkable();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-10-12 21:32:09 -04:00
|
|
|
SetSingleLinkable();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScXMLSourceDlg::SetNonLinkable()
|
|
|
|
{
|
|
|
|
maFtMappedCellTitle.Disable();
|
|
|
|
maRefEdit.Disable();
|
|
|
|
maRefBtn.Disable();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScXMLSourceDlg::SetSingleLinkable()
|
|
|
|
{
|
|
|
|
maFtMappedCellTitle.Enable();
|
|
|
|
maRefEdit.Enable();
|
|
|
|
maRefBtn.Enable();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ScXMLSourceDlg::SetRangeLinkable()
|
|
|
|
{
|
|
|
|
maFtMappedCellTitle.Enable();
|
|
|
|
maRefEdit.Enable();
|
|
|
|
maRefBtn.Enable();
|
2012-10-11 01:22:21 -04:00
|
|
|
}
|
|
|
|
|
2012-11-07 13:06:35 -05:00
|
|
|
bool ScXMLSourceDlg::IsParentDirty(SvTreeListEntry* pEntry) const
|
2012-10-12 23:08:53 -04:00
|
|
|
{
|
|
|
|
ScOrcusXMLTreeParam::EntryData* pUserData = NULL;
|
2012-11-07 13:06:35 -05:00
|
|
|
SvTreeListEntry* pParent = maLbTree.GetParent(pEntry);
|
2012-10-12 23:08:53 -04:00
|
|
|
while (pParent)
|
|
|
|
{
|
|
|
|
pUserData = ScOrcusXMLTreeParam::getUserData(*pParent);
|
|
|
|
OSL_ASSERT(pUserData);
|
|
|
|
if (pUserData->maLinkedPos.IsValid())
|
|
|
|
{
|
|
|
|
// This parent is already linked.
|
|
|
|
return true;
|
|
|
|
}
|
2012-10-12 23:12:52 -04:00
|
|
|
if (pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat)
|
|
|
|
{
|
|
|
|
// This is a repeat element.
|
|
|
|
return true;
|
|
|
|
}
|
2012-10-12 23:08:53 -04:00
|
|
|
pParent = maLbTree.GetParent(pParent);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2012-11-07 13:06:35 -05:00
|
|
|
bool ScXMLSourceDlg::IsChildrenDirty(SvTreeListEntry* pEntry) const
|
2012-10-12 23:42:27 -04:00
|
|
|
{
|
|
|
|
ScOrcusXMLTreeParam::EntryData* pUserData = NULL;
|
2012-11-07 13:06:35 -05:00
|
|
|
for (SvTreeListEntry* pChild = maLbTree.FirstChild(pEntry); pChild; pChild = maLbTree.NextSibling(pChild))
|
2012-10-12 23:42:27 -04:00
|
|
|
{
|
|
|
|
pUserData = ScOrcusXMLTreeParam::getUserData(*pChild);
|
|
|
|
OSL_ASSERT(pUserData);
|
|
|
|
if (pUserData->maLinkedPos.IsValid())
|
|
|
|
// Already linked.
|
|
|
|
return true;
|
|
|
|
|
|
|
|
if (pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat)
|
|
|
|
// We don't support linking of nested repeat elements (yet).
|
|
|
|
return true;
|
|
|
|
|
|
|
|
if (pUserData->meType == ScOrcusXMLTreeParam::ElementDefault)
|
|
|
|
{
|
|
|
|
// Check recursively.
|
|
|
|
if (IsChildrenDirty(pChild))
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2012-10-11 00:20:46 -04:00
|
|
|
IMPL_LINK(ScXMLSourceDlg, GetFocusHdl, Control*, pCtrl)
|
|
|
|
{
|
|
|
|
HandleGetFocus(pCtrl);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
IMPL_LINK(ScXMLSourceDlg, LoseFocusHdl, Control*, pCtrl)
|
|
|
|
{
|
|
|
|
HandleLoseFocus(pCtrl);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-09-28 20:22:23 -04:00
|
|
|
IMPL_LINK(ScXMLSourceDlg, BtnPressedHdl, Button*, pBtn)
|
|
|
|
{
|
|
|
|
if (pBtn == &maBtnSelectSource)
|
|
|
|
SelectSourceFile();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-10-11 01:22:21 -04:00
|
|
|
IMPL_LINK_NOARG(ScXMLSourceDlg, TreeItemSelectHdl)
|
|
|
|
{
|
|
|
|
TreeItemSelected();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-09-26 17:53:12 -04:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|