[Libreoffice-commits] .: Branch 'feature/calc-xml-source' - 826 commits - accessibility/bridge accessibility/inc accessibility/Makefile accessibility/source android/abs-lib android/Bootstrap android/experimental android/sdremote animations/source apache-commons/ExternalProject_apache_commons_codec.mk apache-commons/ExternalProject_apache_commons_httpclient.mk apache-commons/ExternalProject_apache_commons_lang.mk apache-commons/ExternalProject_apache_commons_logging.mk apache-commons/Module_apache_commons.mk apache-commons/Module_apache-commons.mk apache-commons/UnpackedTarball_apache_commons_codec.mk avmedia/Module_avmedia.mk avmedia/source avmedia/util basctl/source basctl/util basebmp/source basegfx/inc basic/source beanshell/ExternalProject_beanshell.mk beanshell/Makefile beanshell/makefile.mk beanshell/Module_beanshell.mk beanshell/Package_beanshell.mk beanshell/prj beanshell/UnpackedTarball_beanshell.mk binaryurp/README binaryurp/source boost/boost.vc2012.patch boost/UnpackedTarball_ boost.mk bridges/CustomTarget_gcc3_ios_arm.mk bridges/Library_msvc_win32_intel.mk bridges/Library_msvc_win32_x86-64.mk bridges/source canvas/inc canvas/Library_canvasfactory.mk canvas/Library_directx9canvas.mk canvas/Library_gdipluscanvas.mk canvas/Makefile canvas/source canvas/StaticLibrary_directxcanvas.mk canvas/workben chart2/source cli_ure/CliLibrary_cli_basetypes.mk cli_ure/CliLibrary_cli_ure.mk cli_ure/CliNativeLibrary_cli_cppuhelper.mk cli_ure/CliUnoApi_cli_uretypes.mk cli_ure/Library_cli_cppuhelper_native.mk cli_ure/Library_cli_uno.mk cli_ure/source codemaker/source codemaker/StaticLibrary_codemaker_cpp.mk codemaker/StaticLibrary_codemaker_java.mk codemaker/StaticLibrary_codemaker.mk comphelper/inc comphelper/qa comphelper/source compilerplugins/clang compilerplugins/.gitignore compilerplugins/Makefile compilerplugins/Makefile-clang.mk compilerplugins/Makefile.mk compilerplugins/README config_host.mk.in configure.in connectivity/com connectivity/CppunitTest_connecti vity_mork.mk connectivity/inc connectivity/Library_ado.mk connectivity/Library_postgresql-sdbc.mk connectivity/Module_connectivity.mk connectivity/org connectivity/qa connectivity/source cppuhelper/inc cppuhelper/Library_cppuhelper.mk cppuhelper/Module_cppuhelper.mk cppuhelper/Package_findsofficepath.mk cppuhelper/source cppuhelper/StaticLibrary_findsofficepath.mk cppu/inc cppu/source cpputools/source crashrep/source cross_tail_build/prj ct2n/README cui/AllLangResTarget_cui.mk cui/Makefile cui/README cui/source cui/uiconfig cui/UI_cui.mk cui/util dbaccess/Library_sdbt.mk dbaccess/Makefile dbaccess/qa dbaccess/source desktop/AllLangResTarget_deploymentgui.mk desktop/inc desktop/Library_offacc.mk desktop/scripts desktop/source desktop/unx desktop/win32 distro-configs/LibreOfficeAndroid.conf distro-configs/LibreOfficeAndroidX86.conf distro-configs/LibreOfficeLinux.conf distro-configs/LibreOfficeMacOSX.conf distro-configs/LibreOfficeWin32.conf distro-configs/LibreOfficeWin64.con f distro-configs/OxygenOfficeLinux.conf distro-configs/OxygenOfficeWin32.conf download drawinglayer/README drawinglayer/source dtrans/source editeng/AllLangResTarget_editeng.mk editeng/inc editeng/source embeddedobj/Library_embobj.mk embeddedobj/Makefile embeddedobj/qa embeddedobj/source embeddedobj/test embeddedobj/util embedserv/Library_emser.mk embedserv/source embedserv/util expat/expat-2.1.0.patch expat/README extensions/Executable_nsplugin.mk extensions/Library_bib.mk extensions/Library_log.mk extensions/Library_npsoplugin.mk extensions/Library_oleautobridge2.mk extensions/Library_oleautobridge.mk extensions/Library_so_activex.mk extensions/Library_so_activex_x64.mk extensions/Module_extensions.mk extensions/source extensions/workben external/msm100 external/msm110 external/prj extras/source fileaccess/source filter/inc filter/Library_odfflatxml.mk filter/Library_PptImporter.mk filter/Makefile filter/Module_filter.mk filter/qa filter/README filter/source fontconfig/fon tconfig-2.8.0.patch fontconfig/README forms/qa forms/source forms/util formula/inc formula/source fpicker/source framework/inc framework/source freetype/README gdk-pixbuf/README gettext/README git-hooks/README glib/README graphite/graphite2.patch graphite/graphite_make.patch graphite/makefile.mk helpcompiler/Executable_helpindexer.mk helpcompiler/Executable_helplinker.mk helpcompiler/inc helpcompiler/Library_helplinker.mk helpcompiler/Makefile helpcompiler/source hsqldb/ExternalProject_hsqldb.mk hwpfilter/source i18npool/Executable_saxparser.mk i18npool/Library_i18nisolang1.mk i18npool/Library_textconv_dict.mk i18npool/README i18npool/source i18nutil/inc i18nutil/source icon-themes/galaxy icon-themes/README instsetoo_native/inc_openoffice io/source javaunohelper/com javaunohelper/source jfreereport/ExternalProject_jfreereport_flow_engine.mk jfreereport/ExternalProject_jfreereport_flute.mk jfreereport/ExternalProject_jfreereport_libbase.mk jfreereport/ExternalProject_jfreerep ort_libfonts.mk jfreereport/ExternalProject_jfreereport_libformula.mk jfreereport/ExternalProject_jfreereport_liblayout.mk jfreereport/ExternalProject_jfreereport_libloader.mk jfreereport/ExternalProject_jfreereport_librepository.mk jfreereport/ExternalProject_jfreereport_libserializer.mk jfreereport/ExternalProject_jfreereport_libxml.mk jfreereport/ExternalProject_jfreereport_sac.mk jfreereport/java jfreereport/Makefile jfreereport/Module_jfreereport.mk jfreereport/Package_jfreereport_flow_engine.mk jfreereport/Package_jfreereport_flute.mk jfreereport/Package_jfreereport_libbase.mk jfreereport/Package_jfreereport_libfonts.mk jfreereport/Package_jfreereport_libformula.mk jfreereport/Package_jfreereport_liblayout.mk jfreereport/Package_jfreereport_libloader.mk jfreereport/Package_jfreereport_librepository.mk jfreereport/Package_jfreereport_libserializer.mk jfreereport/Package_jfreereport_libxml.mk jfreereport/Package_jfreereport_sac.mk jfreereport/Package_jfreereport_version. mk jfreereport/patches jfreereport/prj jfreereport/UnpackedTarball_jfreereport_flow_engine.mk jfreereport/UnpackedTarball_jfreereport_flute.mk jfreereport/UnpackedTarball_jfreereport_libbase.mk jfreereport/UnpackedTarball_jfreereport_libfonts.mk jfreereport/UnpackedTarball_jfreereport_libformula.mk jfreereport/UnpackedTarball_jfreereport_liblayout.mk jfreereport/UnpackedTarball_jfreereport_libloader.mk jfreereport/UnpackedTarball_jfreereport_librepository.mk jfreereport/UnpackedTarball_jfreereport_libserializer.mk jfreereport/UnpackedTarball_jfreereport_libxml.mk jfreereport/UnpackedTarball_jfreereport_sac.mk jpeg/configs jpeg/ExternalPackage_jpeg.mk jpeg/jpeg-8c.patch jpeg/Makefile jpeg/makefile.mk jpeg/Module_jpeg.mk jpeg/patches jpeg/prj jpeg/StaticLibrary_jpeg.mk jpeg/struct_alignment.patch jpeg/UnpackedTarball_jpeg.mk jurt/com jvmfwk/README jvmfwk/source l10ntools/inc l10ntools/Makefile l10ntools/scripts l10ntools/source languagetool/ExternalProject_languagetool.mk lang uagetool/JLanguageTool-1.4.0-no-hc.patch languagetool/Makefile languagetool/makefile.mk languagetool/Module_languagetool.mk languagetool/Package_languagetool.mk languagetool/prj languagetool/UnpackedTarball_languagetool.mk lcms2/lcms2-2.4-windows.patch lcms2/lcms2.patch lcms2/lcms2-windows-export.patch lcms2/makefile.mk libcdr/ExternalPackage_libcdr.mk libcdr/ExternalProject_libcdr.mk libcdr/libcdr-0.0.8-msc.patch libcdr/libcdr-configure.patch.1 libcdr/libcdr-msvc.patch libcdr/Module_libcdr.mk libcdr/StaticLibrary_cdr.mk libcdr/UnpackedTarball_cdr.mk liborcus/ExternalProject_liborcus.mk Library_merged.mk libvisio/libvisio-0.0.19.patch libvisio/UnpackedTarball_visio.mk libwpd/ExternalProject_libwpd.mk lingucomponent/config lingucomponent/Makefile lingucomponent/source lingucomponent/StaticLibrary_ulingu.mk linguistic/inc linguistic/Makefile linguistic/qa linguistic/source linguistic/workben linguistic/xml lotuswordpro/source lotuswordpro/util Makefile.top mdds/UnpackedTarball _mdds.mk Module_cross_tail_build.mk Module_tail_build.mk neon/Library_neon.mk nss/prj odk/examples odk/index.html odk/source offapi/com offapi/type_reference offapi/UnoApi_offapi.mk officecfg/registry ooo.lst.in oowintool oox/inc oox/source oox/util openssl/makefile.mk package/source padmin/source post_download.in postprocess/packcomponents postprocess/prj postprocess/rebase python/makefile.mk python/Python-2.6.1-vc12.patch pyuno/source rdbmaker/inc rdbmaker/source readlicense_oo/html readlicense_oo/odt readlicense_oo/Package_files.mk readlicense_oo/txt regexp/inc registry/source remotebridges/source reportbuilder/java reportdesign/inc reportdesign/Makefile reportdesign/prj reportdesign/qa reportdesign/source reportdesign/uiconfig reportdesign/util RepositoryExternal.mk Repository.mk RepositoryModule_ooo.mk rhino/ExternalProject_rhino.mk rhino/Makefile rhino/makefile.mk rhino/Module_rhino.mk rhino/OfficeScriptInfo.java rhino/Package_rhino.mk rhino/prj rhino/rhino1_5R5.patch rhino/UnpackedTarball_rhino.mk rsc/source sal/android sal/cppunittester salhelper/CppunitTest_salhelper_testapi.mk salhelper/Module_salhelper.mk salhelper/qa salhelper/source sal/inc sal/Module_sal.mk sal/osl sal/Package_inc.mk sal/prj sal/qa sal/rtl sal/util saxon/build.xml saxon/ExternalProject_saxon.mk saxon/Makefile saxon/makefile.mk saxon/Module_saxon.mk saxon/Package_saxon.mk saxon/prj saxon/saxon-9.0.0.7-bj.patch saxon/UnpackedTarball_saxon.mk sax/StaticLibrary_sax_shared.mk scaddins/source sc/AllLangResTarget_sc.mk sccomp/source sc/CppunitTest_sc_annotationshapeobj.mk sc/CppunitTest_sc_cellrangeobj.mk sc/CppunitTest_sc_chart_regression_test.mk sc/CppunitTest_sc_datapilotfieldobj.mk sc/CppunitTest_sc_datapilottableobj.mk sc/CppunitTest_sc_editfieldobj_cell.mk sc/CppunitTest_sc_editfieldobj_header.mk sc/CppunitTest_sc_macros_test.mk sc/CppunitTest_sc_modelobj.mk sc/CppunitTest_sc_namedrangeobj.mk sc/CppunitTest_sc_namedrangesobj.mk sc/CppunitTest_sc_rangelst_test.mk sc /CppunitTest_sc_tableautoformatfield.mk sc/CppunitTest_sc_tablesheetobj.mk sc/CppunitTest_sc_tablesheetsobj.mk sc/CppunitTest_sc_ucalc.mk sc/inc sc/Library_sc.mk sc/Library_scui.mk scp2/InstallModule_ooo.mk scp2/source sc/qa scripting/examples scripting/Library_protocolhandler.mk scripting/README scripting/source scripting/util sc/sdi sc/source sc/uiconfig sdext/CustomTarget_presenter.mk sdext/Extension_minimizer.mk sdext/Extension_pdfimport.mk sdext/Extension_presenter.mk sdext/Library_presenter.mk sdext/Makefile sdext/Module_sdext.mk sdext/platform.mk sdext/source sdext/StaticLibrary_pdfimport_s.mk sd/inc sd/Library_sd.mk sd/sdi sd/source setup_native/prj setup_native/source sfx2/AllLangResTarget_sfx2.mk sfx2/CppunitTest_sfx2_metadatable.mk sfx2/inc sfx2/Library_sfx.mk sfx2/Module_sfx2.mk sfx2/Package_inc.mk sfx2/source sfx2/uiconfig sfx2/UI_sfx.mk shell/inc shell/Library_ooofilt.mk shell/Library_ooofilt_x64.mk shell/Library_propertyhdl.mk shell/Library_propertyhdl_x64.mk shell/Library_shlxthdl.mk shell/Library_shlxthdl_x64.mk shell/Makefile shell/qa shell/source shell/StaticLibrary_shlxthandler_common.mk shell/StaticLibrary_shlxthandler_common_x64.mk shell/StaticLibrary_xmlparser.mk shell/StaticLibrary_xmlparser_x64.mk solenv/bin solenv/gbuild solenv/inc soltools/adjustvisibility soltools/checkdll soltools/cpp soltools/Executable_adjustvisibility.mk soltools/Executable_checkdll.mk soltools/Executable_cpp.mk soltools/Executable_javadep.mk soltools/Executable_ldump4.mk soltools/Executable_makedepend.mk soltools/giparser soltools/inc soltools/javadep soltools/ldump soltools/Makefile soltools/mkdepend soltools/Module_soltools.mk soltools/Package_inc.mk soltools/prj soltools/support soltools/testhxx soltools/util soltools/winunistd sot/source starmath/inc starmath/Library_smd.mk starmath/qa starmath/README starmath/source stoc/InternalUnoApi_bootstrap.mk stoc/Library_bootstrap.mk stoc/Module_stoc.mk stoc/source stoc/test store/source store/workbe n svl/inc svl/source svtools/AllLangResTarget_svt.mk svtools/inc svtools/Library_hatchwindowfactory.mk svtools/Library_svt.mk svtools/Module_svtools.mk svtools/Package_inc.mk svtools/source svtools/uiconfig svtools/UI_svt.mk svx/inc svx/Library_textconversiondlgs.mk svx/source svx/workben sw/AllLangResTarget_sw.mk sw/CppunitTest_sw_filters_test.mk sw/CppunitTest_sw_subsequent_odfexport.mk sw/CppunitTest_sw_subsequent_odfimport.mk sw/CppunitTest_sw_subsequent_ooxmlexport.mk sw/CppunitTest_sw_subsequent_rtfexport.mk sw/CppunitTest_sw_subsequent_rtfimport.mk sw/inc sw/Package_uiconfig.mk sw/qa sw/sdi sw/source sw/uiconfig sw/UI_sw.mk sw/UI_swriter.mk sysui/prj tail_build/prj test/source testtools/source testtools/StaticLibrary_bridgetest.mk tomcat/build.xml tomcat/ExternalProject_tomcat.mk tomcat/Makefile tomcat/Module_tomcat.mk tomcat/Package_tomcat.mk tomcat/prj tomcat/tomcat.patch tomcat/UnpackedTarball_tomcat.mk toolkit/inc toolkit/JunitTest_toolkit_complex.mk toolkit/Junit Test_toolkit_unoapi.mk toolkit/Module_toolkit.mk toolkit/Package_inc.mk toolkit/qa toolkit/source toolkit/src2xml toolkit/util tools/inc tools/source tubes/qa tubes/source ucb/Library_srtrs1.mk ucb/Library_ucpdav1.mk ucb/Library_ucpext.mk ucb/Library_ucphier1.mk ucb/Makefile ucb/qa ucb/source ucb/test ucb/workben ucpp/Makefile udkapi/com udm/StaticLibrary_udm.mk unotools/inc unotools/source unoxml/source unusedcode.easy ure/README uui/source vbahelper/source vbahelper/util vcl/aqua vcl/generic vcl/inc vcl/Library_vcl.mk vcl/Library_vclplug_gtk3.mk vcl/Library_vclplug_tde.mk vcl/Package_inc.mk vcl/source vcl/StaticLibrary_headless.mk vcl/StaticLibrary_vclmain.mk vcl/unx wizards/com wizards/Pyuno_commonwizards.mk writerfilter/source writerfilter/util writerperfect/source writerperfect/StaticLibrary_writerperfect.mk xml2cmp/Executable_xml2cmp.mk xml2cmp/Makefile xml2cmp/Module_xml2cmp.mk xml2cmp/prj xml2cmp/README xml2cmp/source xmlhelp/source xmloff/source xmlscript/source xml script/test xmlsecurity/inc xmlsecurity/source xpdf/makefile.mk xpdf/xpdf-no-writable-literals.patch

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Oct 12 11:01:46 PDT 2012


Rebased ref, commits from common ancestor:
commit e8e35cc6a8420acf705f42417a9b533def674673
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Oct 12 13:34:51 2012 -0400

    Get it to build.
    
    Change-Id: If281653d848f9940befcb59210bcacf918c422ee

diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 31cd8ba..8d8705c 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -12,7 +12,7 @@
 #include "document.hxx"
 
 #include "tools/urlobj.hxx"
-#include "svtools/svtreebx.hxx"
+#include "svtools/treelistbox.hxx"
 
 #define __ORCUS_STATIC_LIB
 #include <orcus/spreadsheet/import_interface.hpp>
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index b25bd77..6eb8600 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -122,7 +122,7 @@ IMPL_ABSTDLG_BASE(AbstractScStringInputDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScTabBgColorDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScImportOptionsDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScTextImportOptionsDlg_Impl);
-IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl);
+IMPL_ABSTDLG_BASE(ScAbstractTabDialog_Impl);
 
 // ScAbstractTabDialog_Impl begin
 void ScAbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index 965dae7..28e39c3 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -12,7 +12,7 @@
 
 #include "vcl/button.hxx"
 #include "vcl/fixed.hxx"
-#include "svtools/svtreebx.hxx"
+#include "svtools/treelistbox.hxx"
 
 #include "expftext.hxx"
 #include "anyrefdg.hxx"
commit beb6b31ef106358433ccc4bc75bbdec424984e5e
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Oct 12 11:45:59 2012 -0400

    I forgot to remove these.
    
    Change-Id: Id84d391b346c7044e3c3b5fd58b42365a8ebc79d

diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index d5c650e..b25bd77 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -123,7 +123,6 @@ IMPL_ABSTDLG_BASE(AbstractScTabBgColorDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScImportOptionsDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScTextImportOptionsDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl);
-IMPL_ABSTDLG_BASE(AbstractScXMLSourceDlg_Impl);
 
 // ScAbstractTabDialog_Impl begin
 void ScAbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 0bde100..391896c 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -64,7 +64,6 @@ class ScImportOptionsDlg;
 class SfxTabDialog;
 class ScTextImportOptionsDlg;
 class ScCondFormatManagerDlg;
-class ScXMLSourceDlg;
 
 #define DECL_ABSTDLG_BASE(Class,DialogClass)        \
     DialogClass*        pDlg;                       \
commit ef34c3cc7cc9c07433e62a0789b3f8167712ad38
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Oct 11 12:23:28 2012 -0400

    Disable update while populating the tree control.
    
    Change-Id: Ic0f5822072a817addc7d296eceadf59467e5ba0f

diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 824eea9..31cd8ba 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -173,6 +173,8 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, const OUString& rPath) cons
     return true;
 }
 
+namespace {
+
 void populateTree(
    SvTreeListBox& rTreeCtrl, orcus::xml_structure_tree::walker& rWalker,
    const orcus::xml_structure_tree::entity_name& rElemName, bool bRepeat,
@@ -214,6 +216,23 @@ void populateTree(
     }
 }
 
+class TreeUpdateSwitch
+{
+    SvTreeListBox& mrTreeCtrl;
+public:
+    TreeUpdateSwitch(SvTreeListBox& rTreeCtrl) : mrTreeCtrl(rTreeCtrl)
+    {
+        mrTreeCtrl.SetUpdateMode(false);
+    }
+
+    ~TreeUpdateSwitch()
+    {
+        mrTreeCtrl.SetUpdateMode(true);
+    }
+};
+
+}
+
 bool ScOrcusFiltersImpl::loadXMLStructure(
    SvTreeListBox& rTreeCtrl, const rtl::OUString& rPath,
    const Image& rImgDefaultElem, const Image& rImgRepeatElem, const Image& rImgElemAttr) const
@@ -235,6 +254,7 @@ bool ScOrcusFiltersImpl::loadXMLStructure(
     {
         aXmlTree.parse(&aStrm[0], aStrm.size());
 
+        TreeUpdateSwitch aSwitch(rTreeCtrl);
         rTreeCtrl.Clear();
         rTreeCtrl.SetDefaultCollapsedEntryBmp(rImgDefaultElem);
         rTreeCtrl.SetDefaultExpandedEntryBmp(rImgDefaultElem);
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index cc255b8..5f244f2 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -151,8 +151,8 @@ void ScXMLSourceDlg::SelectSourceFile()
     if (!aFiles.getLength())
         return;
 
-    maSrcPath = aFiles[0];
     // There should only be one file returned from the file picker.
+    maSrcPath = aFiles[0];
     maFtSourceFile.SetText(maSrcPath);
 
     LoadSourceFileStructure(maSrcPath);
commit 91e1a54deaa10511457136d3a9d55e2f91cc2ca4
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Oct 11 01:22:21 2012 -0400

    Use sensible directory path for file picker, handle tree item select.
    
    Change-Id: I2638b1d870ee6b7e6c8697a38df07872184df8c6

diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index c145f8b..965dae7 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -52,6 +52,8 @@ class ScXMLSourceDlg : public ScAnyRefDlg
     rtl::OUString maStrCellLink;
     rtl::OUString maStrRangeLink;
 
+    rtl::OUString maSrcPath;
+
     ScDocument* mpDoc;
 
     formula::RefEdit* mpActiveEdit;
@@ -74,10 +76,12 @@ private:
     void LoadSourceFileStructure(const OUString& rPath);
     void HandleGetFocus(Control* pCtrl);
     void HandleLoseFocus(Control* pCtrl);
+    void TreeItemSelected();
 
     DECL_LINK(GetFocusHdl, Control*);
     DECL_LINK(LoseFocusHdl, Control*);
     DECL_LINK(BtnPressedHdl, Button*);
+    DECL_LINK(TreeItemSelectHdl, void*);
 };
 
 #endif
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 3a07997..cc255b8 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -16,6 +16,9 @@
 #include "filter.hxx"
 #include "reffact.hxx"
 
+#include "unotools/pathoptions.hxx"
+#include "tools/urlobj.hxx"
+
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/ui/dialogs/XFilePicker.hpp>
 #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
@@ -60,6 +63,8 @@ ScXMLSourceDlg::ScXMLSourceDlg(
     maEdit.SetLoseFocusHdl(aLink);
     maBtnRb.SetLoseFocusHdl(aLink);
 
+    aLink = LINK(this, ScXMLSourceDlg, TreeItemSelectHdl);
+    maLbTree.SetSelectHdl(aLink);
     maFtMappedCellTitle.SetText(maStrCellLink);
 }
 
@@ -125,6 +130,19 @@ void ScXMLSourceDlg::SelectSourceFile()
     if (!xFilePicker.is())
         return;
 
+    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);
+    }
+
     if (xFilePicker->execute() != ui::dialogs::ExecutableDialogResults::OK)
         // File picker dialog cancelled.
         return;
@@ -133,10 +151,11 @@ void ScXMLSourceDlg::SelectSourceFile()
     if (!aFiles.getLength())
         return;
 
+    maSrcPath = aFiles[0];
     // There should only be one file returned from the file picker.
-    maFtSourceFile.SetText(aFiles[0]);
+    maFtSourceFile.SetText(maSrcPath);
 
-    LoadSourceFileStructure(aFiles[0]);
+    LoadSourceFileStructure(maSrcPath);
 }
 
 void ScXMLSourceDlg::LoadSourceFileStructure(const OUString& rPath)
@@ -163,6 +182,14 @@ void ScXMLSourceDlg::HandleLoseFocus(Control* /*pCtrl*/)
 {
 }
 
+void ScXMLSourceDlg::TreeItemSelected()
+{
+    SvLBoxEntry* pEntry = maLbTree.GetCurEntry();
+    OUString aName = maLbTree.GetEntryText(pEntry);
+    fprintf(stdout, "ScXMLSourceDlg::TreeItemSelected:   name = '%s'\n",
+            rtl::OUStringToOString(aName, RTL_TEXTENCODING_UTF8).getStr());
+}
+
 IMPL_LINK(ScXMLSourceDlg, GetFocusHdl, Control*, pCtrl)
 {
     HandleGetFocus(pCtrl);
@@ -182,4 +209,10 @@ IMPL_LINK(ScXMLSourceDlg, BtnPressedHdl, Button*, pBtn)
     return 0;
 }
 
+IMPL_LINK_NOARG(ScXMLSourceDlg, TreeItemSelectHdl)
+{
+    TreeItemSelected();
+    return 0;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 03cc0373978c7f5131eed39e7a46cfe29d69a19c
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu Oct 11 00:20:46 2012 -0400

    Get the reference edit box to work properly.
    
    Change-Id: Ifd01fe05312c0ece867100019a9f84162e5778c4

diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index ee8225c..c145f8b 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -54,7 +54,8 @@ class ScXMLSourceDlg : public ScAnyRefDlg
 
     ScDocument* mpDoc;
 
-    bool mbRefMode;
+    formula::RefEdit* mpActiveEdit;
+    bool mbDlgLostFocus;
 
 public:
     ScXMLSourceDlg(
@@ -63,6 +64,7 @@ public:
 
     virtual sal_Bool IsRefInputMode() const;
     virtual void SetReference(const ScRange& rRange, ScDocument* pDoc);
+    virtual void Deactivate();
     virtual void SetActive();
     virtual sal_Bool Close();
 
@@ -70,7 +72,11 @@ private:
 
     void SelectSourceFile();
     void LoadSourceFileStructure(const OUString& rPath);
+    void HandleGetFocus(Control* pCtrl);
+    void HandleLoseFocus(Control* pCtrl);
 
+    DECL_LINK(GetFocusHdl, Control*);
+    DECL_LINK(LoseFocusHdl, Control*);
     DECL_LINK(BtnPressedHdl, Button*);
 };
 
diff --git a/sc/source/ui/src/xmlsourcedlg.src b/sc/source/ui/src/xmlsourcedlg.src
index d4ef5ce..4119601 100644
--- a/sc/source/ui/src/xmlsourcedlg.src
+++ b/sc/source/ui/src/xmlsourcedlg.src
@@ -50,7 +50,7 @@ ModelessDialog RID_SCDLG_XML_SOURCE
 
     FixedText FT_MAPPED_CELL_TITLE
     {
-        Pos = MAP_APPFONT( 12, 50 );
+        Pos = MAP_APPFONT( 12, 52 );
         Size = MAP_APPFONT ( 100 , 8 ) ;
 
         Text [ en-US ] = "";
@@ -59,15 +59,14 @@ ModelessDialog RID_SCDLG_XML_SOURCE
     Edit ED_MAPPED_CELL
     {
         Border = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 63 ) ;
+        Pos = MAP_APPFONT ( 12 , 66 ) ;
         Size = MAP_APPFONT ( 69 , 12 ) ;
         TabStop = TRUE ;
     };
 
-
     ImageButton BTN_MAPPED_CELL
     {
-        Pos = MAP_APPFONT ( 83 , 62 ) ;
+        Pos = MAP_APPFONT ( 83 , 65 ) ;
         Size = MAP_APPFONT ( 13 , 15 ) ;
         TabStop = FALSE ;
         QuickHelpText [ en-US ] = "Shrink" ;
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 37e6c72..3a07997 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -34,8 +34,8 @@ ScXMLSourceDlg::ScXMLSourceDlg(
     maFtSourceFile(this, ScResId(FT_SOURCE_FILE)),
     maFtMapXmlDoc(this, ScResId(FL_MAP_XML_TO_DOCUMENT)),
     maFtMappedCellTitle(this, ScResId(FT_MAPPED_CELL_TITLE)),
-    maEdit(this, ScResId(ED_MAPPED_CELL)),
-    maBtnRb(this, ScResId(BTN_MAPPED_CELL)),
+    maEdit(this, this, ScResId(ED_MAPPED_CELL)),
+    maBtnRb(this, ScResId(BTN_MAPPED_CELL), &maEdit, this),
     maLbTree(this, ScResId(LB_SOURCE_TREE)),
     maBtnCancel(this, ScResId(BTN_CANCEL)),
     maImgFileOpen(ScResId(IMG_FILE_OPEN)),
@@ -45,13 +45,21 @@ ScXMLSourceDlg::ScXMLSourceDlg(
     maStrCellLink(ScResId(STR_CELL_LINK).toString()),
     maStrRangeLink(ScResId(STR_RANGE_LINK).toString()),
     mpDoc(pDoc),
-    mbRefMode(false)
+    mpActiveEdit(&maEdit),
+    mbDlgLostFocus(false)
 {
     maBtnSelectSource.SetModeImage(maImgFileOpen);
     FreeResource();
 
     maBtnSelectSource.SetClickHdl(LINK(this, ScXMLSourceDlg, BtnPressedHdl));
 
+    Link aLink = LINK(this, ScXMLSourceDlg, GetFocusHdl);
+    maEdit.SetGetFocusHdl(aLink);
+    maBtnRb.SetGetFocusHdl(aLink);
+    aLink = LINK(this, ScXMLSourceDlg, LoseFocusHdl);
+    maEdit.SetLoseFocusHdl(aLink);
+    maBtnRb.SetLoseFocusHdl(aLink);
+
     maFtMappedCellTitle.SetText(maStrCellLink);
 }
 
@@ -61,16 +69,43 @@ ScXMLSourceDlg::~ScXMLSourceDlg()
 
 sal_Bool ScXMLSourceDlg::IsRefInputMode() const
 {
-    return mbRefMode;
+    return mpActiveEdit != NULL;
 }
 
 void ScXMLSourceDlg::SetReference(const ScRange& rRange, ScDocument* pDoc)
 {
+    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);
+}
+
+void ScXMLSourceDlg::Deactivate()
+{
+    mbDlgLostFocus = true;
 }
 
 void ScXMLSourceDlg::SetActive()
 {
-    GrabFocus();
+    if (mbDlgLostFocus)
+    {
+        mbDlgLostFocus = false;
+        if (mpActiveEdit)
+        {
+            mpActiveEdit->GrabFocus();
+        }
+    }
+    else
+    {
+        GrabFocus();
+    }
+
+    RefInputDone();
 }
 
 sal_Bool ScXMLSourceDlg::Close()
@@ -114,6 +149,32 @@ void ScXMLSourceDlg::LoadSourceFileStructure(const OUString& rPath)
         maLbTree, rPath, maImgElemDefault, maImgElemRepeat, maImgElemAttribute);
 }
 
+void ScXMLSourceDlg::HandleGetFocus(Control* pCtrl)
+{
+    mpActiveEdit = NULL;
+    if (pCtrl == &maEdit || pCtrl == &maBtnRb)
+        mpActiveEdit = &maEdit;
+
+    if (mpActiveEdit)
+        mpActiveEdit->SetSelection(Selection(0, SELECTION_MAX));
+}
+
+void ScXMLSourceDlg::HandleLoseFocus(Control* /*pCtrl*/)
+{
+}
+
+IMPL_LINK(ScXMLSourceDlg, GetFocusHdl, Control*, pCtrl)
+{
+    HandleGetFocus(pCtrl);
+    return 0;
+}
+
+IMPL_LINK(ScXMLSourceDlg, LoseFocusHdl, Control*, pCtrl)
+{
+    HandleLoseFocus(pCtrl);
+    return 0;
+}
+
 IMPL_LINK(ScXMLSourceDlg, BtnPressedHdl, Button*, pBtn)
 {
     if (pBtn == &maBtnSelectSource)
commit 820f80c15c0600882d55d365fde68b0bcfee43f3
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Oct 10 20:45:55 2012 -0400

    Turned the xml source dialog into a reference dialog.
    
    Change-Id: Ifb3ebd3c0166343f42dd53bcee83c6b31c84f081

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index f4cdafa..2953b4a 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -571,6 +571,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 	sc/source/ui/view/viewfunc \
 	sc/source/ui/view/viewutil \
 	sc/source/ui/view/waitoff \
+	sc/source/ui/xmlsource/xmlsourcedlg \
 ))
 
 $(eval $(call gb_SdiTarget_SdiTarget,sc/sdi/scslots,sc/sdi/scalc))
diff --git a/sc/Library_scui.mk b/sc/Library_scui.mk
index 819b907..b1eb772 100644
--- a/sc/Library_scui.mk
+++ b/sc/Library_scui.mk
@@ -114,7 +114,6 @@ $(eval $(call gb_Library_add_exception_objects,scui,\
     sc/source/ui/pagedlg/tphf \
     sc/source/ui/pagedlg/tptable \
     sc/source/ui/styleui/styledlg \
-    sc/source/ui/xmlsource/xmlsourcedlg \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index bd4f09f..ea5e692 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -326,11 +326,6 @@ public:
     virtual bool IsDateConversionSet() const = 0;
 };
 
-class AbstractScXMLSourceDlg : public VclAbstractDialog
-{
-public:
-};
-
 //-------Scabstract fractory ---------------------------
 class ScAbstractDialogFactory
 {
@@ -524,8 +519,6 @@ public:
     virtual SfxAbstractTabDialog * CreateScSortDlg( Window*          pParent, //add for ScSortDlg
                                                     const SfxItemSet* pArgSet,int nId ) = 0;
 
-    virtual AbstractScXMLSourceDlg* CreateScXMLSourceDlg(Window* pParent, ScDocument* pDoc, int nId) = 0;
-
     // for tabpage
     virtual CreateTabPage               GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
     virtual GetTabPageRanges            GetTabPageRangesFunc( sal_uInt16 nId ) = 0;
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 6d56712..9c06371 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -257,6 +257,7 @@ void ScDLL::Init()
             sal::static_int_cast<sal_uInt16>(ScTabViewShell::GetInterfaceId()), pMod);
     ScSolverDlgWrapper          ::RegisterChildWindow(false, pMod);
     ScOptSolverDlgWrapper       ::RegisterChildWindow(false, pMod);
+    ScXMLSourceDlgWrapper       ::RegisterChildWindow(false, pMod);
     ScNameDlgWrapper            ::RegisterChildWindow(false, pMod);
     ScNameDefDlgWrapper         ::RegisterChildWindow(false, pMod);
     ScCondFormatConditionDlgWrapper ::RegisterChildWindow(false, pMod);
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 2e8a536..d5c650e 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -122,9 +122,8 @@ IMPL_ABSTDLG_BASE(AbstractScStringInputDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScTabBgColorDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScImportOptionsDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScTextImportOptionsDlg_Impl);
-IMPL_ABSTDLG_BASE(ScAbstractTabDialog_Impl);
-IMPL_ABSTDLG_BASE(AbstractScXMLSourceDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl);
+IMPL_ABSTDLG_BASE(AbstractScXMLSourceDlg_Impl);
 
 // ScAbstractTabDialog_Impl begin
 void ScAbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
@@ -1559,13 +1558,6 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg( Window*
     return 0;
 }
 
-AbstractScXMLSourceDlg* ScAbstractDialogFactory_Impl::CreateScXMLSourceDlg(Window* pParent, ScDocument* pDoc, int nId)
-{
-    ScXMLSourceDlg* pDlg = (nId == RID_SCDLG_XML_SOURCE) ? new ScXMLSourceDlg(pParent, pDoc) : NULL;
-
-    return pDlg ? new AbstractScXMLSourceDlg_Impl(pDlg) : NULL;
-}
-
 #undef SfxTabDialog
 #undef ScAbstractTabDialog_Impl
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index b0763ac..0bde100 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -378,11 +378,6 @@ class AbstractScTextImportOptionsDlg_Impl : public AbstractScTextImportOptionsDl
     virtual bool IsDateConversionSet() const;
 };
 
-class AbstractScXMLSourceDlg_Impl : public AbstractScXMLSourceDlg
-{
-    DECL_ABSTDLG_BASE(AbstractScXMLSourceDlg_Impl, ScXMLSourceDlg)
-};
-
 //add for ScAttrDlg , ScHFEditDlg, ScStyleDlg, ScSubTotalDlg, ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg
 class ScAbstractTabDialog_Impl : public SfxAbstractTabDialog
 {
@@ -593,8 +588,6 @@ public:
     virtual SfxAbstractTabDialog * CreateScSortDlg( Window*          pParent, //add for ScSortDlg
                                                     const SfxItemSet* pArgSet,int nId );
 
-    virtual AbstractScXMLSourceDlg* CreateScXMLSourceDlg(Window* pParent, ScDocument* pDoc, int nId);
-
     // For TabPage
     virtual CreateTabPage               GetTabPageCreatorFunc( sal_uInt16 nId );
 
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index e906e8c..447383b 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -50,6 +50,7 @@ DECL_WRAPPER_WITHID(ScCondFormatColorScaleDlgWrapper)
 DECL_WRAPPER_WITHID(ScCondFormatDataBarDlgWrapper)
 DECL_WRAPPER_WITHID(ScSolverDlgWrapper)
 DECL_WRAPPER_WITHID(ScOptSolverDlgWrapper)
+DECL_WRAPPER_WITHID(ScXMLSourceDlgWrapper)
 DECL_WRAPPER_WITHID(ScPivotLayoutWrapper)
 DECL_WRAPPER_WITHID(ScTabOpDlgWrapper)
 DECL_WRAPPER_WITHID(ScFilterDlgWrapper)
diff --git a/sc/source/ui/inc/xmlsourcedlg.hrc b/sc/source/ui/inc/xmlsourcedlg.hrc
index ec10aff..67cf9b8 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hrc
+++ b/sc/source/ui/inc/xmlsourcedlg.hrc
@@ -17,11 +17,17 @@
 #define FT_SOURCE_FILE 12
 
 #define FL_MAP_XML_TO_DOCUMENT 20
-#define LB_SOURCE_TREE 21
+#define FT_MAPPED_CELL_TITLE 21
+#define ED_MAPPED_CELL 22
+#define BTN_MAPPED_CELL 23
+#define LB_SOURCE_TREE 24
 
 #define IMG_ELEMENT_DEFAULT 50
 #define IMG_ELEMENT_REPEAT  51
 #define IMG_ELEMENT_ATTRIBUTE 52
 #define IMG_FILE_OPEN 53
 
+#define STR_CELL_LINK 70
+#define STR_RANGE_LINK 71
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index 39bfa6b..ee8225c 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -11,15 +11,16 @@
 #define __SC_XMLSOURCEDLG_HXX__
 
 #include "vcl/button.hxx"
-#include "vcl/dialog.hxx"
 #include "vcl/fixed.hxx"
 #include "svtools/svtreebx.hxx"
 
 #include "expftext.hxx"
+#include "anyrefdg.hxx"
 
 #include <boost/scoped_ptr.hpp>
 
 class ScDocument;
+class ScRange;
 
 class ScXMLSourceTree : public SvTreeListBox
 {
@@ -27,7 +28,7 @@ public:
     ScXMLSourceTree(Window* pParent, const ResId& rResId);
 };
 
-class ScXMLSourceDlg : public ModalDialog
+class ScXMLSourceDlg : public ScAnyRefDlg
 {
     FixedLine maFlSourceFile;
     ImageButton maBtnSelectSource;
@@ -35,6 +36,10 @@ class ScXMLSourceDlg : public ModalDialog
 
     FixedLine maFtMapXmlDoc;
 
+    FixedText maFtMappedCellTitle;
+    formula::RefEdit   maEdit;
+    formula::RefButton maBtnRb;
+
     ScXMLSourceTree maLbTree;
 
     CancelButton maBtnCancel;
@@ -44,12 +49,23 @@ class ScXMLSourceDlg : public ModalDialog
     Image maImgElemRepeat;
     Image maImgElemAttribute;
 
+    rtl::OUString maStrCellLink;
+    rtl::OUString maStrRangeLink;
+
     ScDocument* mpDoc;
 
+    bool mbRefMode;
+
 public:
-    ScXMLSourceDlg(Window* pParent, ScDocument* pDoc);
+    ScXMLSourceDlg(
+        SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, ScDocument* pDoc);
     virtual ~ScXMLSourceDlg();
 
+    virtual sal_Bool IsRefInputMode() const;
+    virtual void SetReference(const ScRange& rRange, ScDocument* pDoc);
+    virtual void SetActive();
+    virtual sal_Bool Close();
+
 private:
 
     void SelectSourceFile();
diff --git a/sc/source/ui/src/xmlsourcedlg.src b/sc/source/ui/src/xmlsourcedlg.src
index 8a7b13a..d4ef5ce 100644
--- a/sc/source/ui/src/xmlsourcedlg.src
+++ b/sc/source/ui/src/xmlsourcedlg.src
@@ -8,7 +8,7 @@
 
 #include "xmlsourcedlg.hrc"
 
-ModalDialog RID_SCDLG_XML_SOURCE
+ModelessDialog RID_SCDLG_XML_SOURCE
 {
     HelpID = "sc:ModalDialog:RID_SCDLG_XML_SOURCE";
     Text [ en-US ] = "XML Source" ;
@@ -48,6 +48,31 @@ ModalDialog RID_SCDLG_XML_SOURCE
         Text [ en-US ] = "Map to document";
     };
 
+    FixedText FT_MAPPED_CELL_TITLE
+    {
+        Pos = MAP_APPFONT( 12, 50 );
+        Size = MAP_APPFONT ( 100 , 8 ) ;
+
+        Text [ en-US ] = "";
+    };
+
+    Edit ED_MAPPED_CELL
+    {
+        Border = TRUE ;
+        Pos = MAP_APPFONT ( 12 , 63 ) ;
+        Size = MAP_APPFONT ( 69 , 12 ) ;
+        TabStop = TRUE ;
+    };
+
+
+    ImageButton BTN_MAPPED_CELL
+    {
+        Pos = MAP_APPFONT ( 83 , 62 ) ;
+        Size = MAP_APPFONT ( 13 , 15 ) ;
+        TabStop = FALSE ;
+        QuickHelpText [ en-US ] = "Shrink" ;
+    };
+
     Control LB_SOURCE_TREE
     {
         Border = TRUE ;
@@ -85,5 +110,15 @@ ModalDialog RID_SCDLG_XML_SOURCE
         Pos = MAP_APPFONT ( 194 , 181 ) ;
         Size = MAP_APPFONT ( 50 , 14 ) ;
     };
+
+    String STR_CELL_LINK
+    {
+        Text [ en-US ] = "Link to cell";
+    };
+
+    String STR_RANGE_LINK
+    {
+        Text [ en-US ] = "Link to range";
+    };
 };
 
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index addfd75..426e803 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2403,14 +2403,12 @@ void ScCellShell::ExecuteXMLSourceDialog()
     if (!pTabViewShell)
         return;
 
-    boost::scoped_ptr<AbstractScXMLSourceDlg> pDlg(
-        pFact->CreateScXMLSourceDlg(
-            pTabViewShell->GetDialogParent(), GetViewData()->GetDocument(), RID_SCDLG_XML_SOURCE));
-
-    if (!pDlg)
-        return;
+    ScModule* pScMod = SC_MOD();
 
-    pDlg->Execute();
+    sal_uInt16 nId = ScXMLSourceDlgWrapper::GetChildWindowId();
+    SfxViewFrame* pViewFrame = pTabViewShell->GetViewFrame();
+    SfxChildWindow* pWnd = pViewFrame->GetChildWindow(nId);
+    pScMod->SetRefDialog(nId, pWnd ? false : true);
 }
 
 void ScCellShell::ExecuteSubtotals(SfxRequest& rReq)
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index dfc2b1d..052fcaf 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -49,6 +49,7 @@ SFX_IMPL_MODELESSDIALOG_WITHID(ScCondFormatColorScaleDlgWrapper, SID_OPENDLG_COL
 SFX_IMPL_MODELESSDIALOG_WITHID(ScCondFormatDataBarDlgWrapper, SID_OPENDLG_DATABAR )
 SFX_IMPL_MODELESSDIALOG_WITHID(ScSolverDlgWrapper, SID_OPENDLG_SOLVE )
 SFX_IMPL_MODELESSDIALOG_WITHID(ScOptSolverDlgWrapper, SID_OPENDLG_OPTSOLVER )
+SFX_IMPL_MODELESSDIALOG_WITHID(ScXMLSourceDlgWrapper, SID_MANAGE_XML_SOURCE)
 SFX_IMPL_MODELESSDIALOG_WITHID(ScPivotLayoutWrapper, SID_OPENDLG_PIVOTTABLE )
 SFX_IMPL_MODELESSDIALOG_WITHID(ScTabOpDlgWrapper, SID_OPENDLG_TABOP )
 SFX_IMPL_MODELESSDIALOG_WITHID(ScFilterDlgWrapper, SID_FILTER )
@@ -62,6 +63,7 @@ SFX_IMPL_MODELESSDIALOG_WITHID(ScAcceptChgDlgWrapper, FID_CHG_ACCEPT )
 SFX_IMPL_MODELESSDIALOG_WITHID(ScHighlightChgDlgWrapper, FID_CHG_SHOW )
 SFX_IMPL_MODELESSDIALOG_WITHID(ScSimpleRefDlgWrapper, WID_SIMPLE_REF )
 SFX_IMPL_CHILDWINDOW_WITHID(ScValidityRefChildWin, SID_VALIDITY_REFERENCE)
+
 SfxChildWinInfo ScValidityRefChildWin::GetInfo() const
 {
     SfxChildWinInfo anInfo = SfxChildWindow::GetInfo();
@@ -148,6 +150,8 @@ IMPL_CHILD_CTOR( ScSolverDlgWrapper, SID_OPENDLG_SOLVE )
 
 IMPL_CHILD_CTOR( ScOptSolverDlgWrapper, SID_OPENDLG_OPTSOLVER )
 
+IMPL_CHILD_CTOR(ScXMLSourceDlgWrapper, SID_MANAGE_XML_SOURCE)
+
 //-------------------------------------------------------------------------
 // ScPivotLayoutWrapper
 //-------------------------------------------------------------------------
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 06f6dd4..75f3836 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -70,6 +70,7 @@ SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL))
     SFX_CHILDWINDOW_REGISTRATION(ScCondFormatDataBarDlgWrapper::GetChildWindowId());
     SFX_CHILDWINDOW_REGISTRATION(ScSolverDlgWrapper::GetChildWindowId());
     SFX_CHILDWINDOW_REGISTRATION(ScOptSolverDlgWrapper::GetChildWindowId());
+    SFX_CHILDWINDOW_REGISTRATION(ScXMLSourceDlgWrapper::GetChildWindowId());
     SFX_CHILDWINDOW_REGISTRATION(ScPivotLayoutWrapper::GetChildWindowId());
     SFX_CHILDWINDOW_REGISTRATION(ScTabOpDlgWrapper::GetChildWindowId());
     SFX_CHILDWINDOW_REGISTRATION(ScFilterDlgWrapper::GetChildWindowId());
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 6ef470a..0744b37 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -64,6 +64,7 @@
 #include "markdata.hxx"
 #include "reffact.hxx"
 #include "condformatdlg.hxx"
+#include "xmlsourcedlg.hxx"
 
 //------------------------------------------------------------------
 
@@ -406,6 +407,12 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
         }
         break;
 
+        case SID_MANAGE_XML_SOURCE:
+        {
+            pResult = new ScXMLSourceDlg(pB, pCW, pParent, pDoc);
+        }
+        break;
+
         case FID_CHG_SHOW:
         {
             //  Dialog schaut selber, was in der Zelle steht
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 2a94a9b..37e6c72 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -14,6 +14,7 @@
 #include "document.hxx"
 #include "orcusfilters.hxx"
 #include "filter.hxx"
+#include "reffact.hxx"
 
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/ui/dialogs/XFilePicker.hpp>
@@ -25,30 +26,58 @@ using namespace com::sun::star;
 ScXMLSourceTree::ScXMLSourceTree(Window* pParent, const ResId& rResId) :
     SvTreeListBox(pParent, rResId) {}
 
-ScXMLSourceDlg::ScXMLSourceDlg(Window* pParent, ScDocument* pDoc) :
-    ModalDialog(pParent, ScResId(RID_SCDLG_XML_SOURCE)),
+ScXMLSourceDlg::ScXMLSourceDlg(
+    SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, ScDocument* pDoc) :
+    ScAnyRefDlg(pB, pCW, pParent, RID_SCDLG_XML_SOURCE),
     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)),
+    maFtMappedCellTitle(this, ScResId(FT_MAPPED_CELL_TITLE)),
+    maEdit(this, ScResId(ED_MAPPED_CELL)),
+    maBtnRb(this, ScResId(BTN_MAPPED_CELL)),
     maLbTree(this, ScResId(LB_SOURCE_TREE)),
     maBtnCancel(this, ScResId(BTN_CANCEL)),
     maImgFileOpen(ScResId(IMG_FILE_OPEN)),
     maImgElemDefault(ScResId(IMG_ELEMENT_DEFAULT)),
     maImgElemRepeat(ScResId(IMG_ELEMENT_REPEAT)),
     maImgElemAttribute(ScResId(IMG_ELEMENT_ATTRIBUTE)),
-    mpDoc(pDoc)
+    maStrCellLink(ScResId(STR_CELL_LINK).toString()),
+    maStrRangeLink(ScResId(STR_RANGE_LINK).toString()),
+    mpDoc(pDoc),
+    mbRefMode(false)
 {
     maBtnSelectSource.SetModeImage(maImgFileOpen);
     FreeResource();
 
     maBtnSelectSource.SetClickHdl(LINK(this, ScXMLSourceDlg, BtnPressedHdl));
+
+    maFtMappedCellTitle.SetText(maStrCellLink);
 }
 
 ScXMLSourceDlg::~ScXMLSourceDlg()
 {
 }
 
+sal_Bool ScXMLSourceDlg::IsRefInputMode() const
+{
+    return mbRefMode;
+}
+
+void ScXMLSourceDlg::SetReference(const ScRange& rRange, ScDocument* pDoc)
+{
+}
+
+void ScXMLSourceDlg::SetActive()
+{
+    GrabFocus();
+}
+
+sal_Bool ScXMLSourceDlg::Close()
+{
+    return DoClose(ScXMLSourceDlgWrapper::GetChildWindowId());
+}
+
 void ScXMLSourceDlg::SelectSourceFile()
 {
     uno::Reference<lang::XMultiServiceFactory> xServiceMgr = mpDoc->GetServiceManager();
commit eca6e6fff3d05f99f7d188a85a64fe21061e141d
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Oct 5 17:48:48 2012 -0400

    Use different icon image for the attribute entries.
    
    Change-Id: Icd053ba7906191f3bc937cdb3c76d037fd67dab5

diff --git a/sc/inc/orcusfilters.hxx b/sc/inc/orcusfilters.hxx
index 2ec5a49..7db7034 100644
--- a/sc/inc/orcusfilters.hxx
+++ b/sc/inc/orcusfilters.hxx
@@ -28,7 +28,7 @@ public:
 
     virtual bool loadXMLStructure(
        SvTreeListBox& rTreeCtrl, const rtl::OUString& rPath,
-       const Image& rImgDefaultElem, const Image& rImgRepeatElem) const = 0;
+       const Image& rImgDefaultElem, const Image& rImgRepeatElem, const Image& rImgElemAttr) const = 0;
 };
 
 #endif
diff --git a/sc/source/filter/inc/orcusfiltersimpl.hxx b/sc/source/filter/inc/orcusfiltersimpl.hxx
index 311b6e0..2f42d0b 100644
--- a/sc/source/filter/inc/orcusfiltersimpl.hxx
+++ b/sc/source/filter/inc/orcusfiltersimpl.hxx
@@ -19,7 +19,7 @@ public:
 
     virtual bool loadXMLStructure(
        SvTreeListBox& rTreeCtrl, const rtl::OUString& rPath,
-       const Image& rImgDefaultElem, const Image& rImgRepeatElem) const;
+       const Image& rImgDefaultElem, const Image& rImgRepeatElem, const Image& rImgElemAttr) const;
 };
 
 #endif
diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 4635175..824eea9 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -175,7 +175,9 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, const OUString& rPath) cons
 
 void populateTree(
    SvTreeListBox& rTreeCtrl, orcus::xml_structure_tree::walker& rWalker,
-   const orcus::xml_structure_tree::entity_name& rElemName, bool bRepeat, const Image& rImgRepeatElem, SvLBoxEntry* pParent)
+   const orcus::xml_structure_tree::entity_name& rElemName, bool bRepeat,
+   const Image& rImgRepeatElem, const Image& rImgElemAttr,
+   SvLBoxEntry* pParent)
 {
     OUString aName(rElemName.name.get(), rElemName.name.size(), RTL_TEXTENCODING_UTF8);
     SvLBoxEntry* pEntry = rTreeCtrl.InsertEntry(aName, pParent);
@@ -196,7 +198,9 @@ void populateTree(
     for (; it != itEnd; ++it)
     {
         orcus::xml_structure_tree::entity_name aAttrName = *it;
-        rTreeCtrl.InsertEntry(OUString(aAttrName.name.get(), aAttrName.name.size(), RTL_TEXTENCODING_UTF8), pEntry);
+        SvLBoxEntry* pAttr = rTreeCtrl.InsertEntry(OUString(aAttrName.name.get(), aAttrName.name.size(), RTL_TEXTENCODING_UTF8), pEntry);
+        rTreeCtrl.SetExpandedEntryBmp(pAttr, rImgElemAttr);
+        rTreeCtrl.SetCollapsedEntryBmp(pAttr, rImgElemAttr);
     }
     rTreeCtrl.Expand(pEntry);
 
@@ -205,13 +209,14 @@ void populateTree(
     for (it = aNames.begin(), itEnd = aNames.end(); it != itEnd; ++it)
     {
         orcus::xml_structure_tree::element aElem = rWalker.descend(*it);
-        populateTree(rTreeCtrl, rWalker, *it, aElem.repeat, rImgRepeatElem, pEntry);
+        populateTree(rTreeCtrl, rWalker, *it, aElem.repeat, rImgRepeatElem, rImgElemAttr, pEntry);
         rWalker.ascend();
     }
 }
 
 bool ScOrcusFiltersImpl::loadXMLStructure(
-   SvTreeListBox& rTreeCtrl, const rtl::OUString& rPath, const Image& rImgDefaultElem, const Image& rImgRepeatElem) const
+   SvTreeListBox& rTreeCtrl, const rtl::OUString& rPath,
+   const Image& rImgDefaultElem, const Image& rImgRepeatElem, const Image& rImgElemAttr) const
 {
     INetURLObject aURL(rPath);
     OString aSysPath = rtl::OUStringToOString(aURL.getFSysPath(SYSTEM_PATH), RTL_TEXTENCODING_UTF8);
@@ -238,7 +243,7 @@ bool ScOrcusFiltersImpl::loadXMLStructure(
 
         // Root element.
         orcus::xml_structure_tree::element aElem = aWalker.root();
-        populateTree(rTreeCtrl, aWalker, aElem.name, aElem.repeat, rImgRepeatElem, NULL);
+        populateTree(rTreeCtrl, aWalker, aElem.name, aElem.repeat, rImgRepeatElem, rImgElemAttr, NULL);
     }
     catch (const std::exception&)
     {
diff --git a/sc/source/ui/inc/xmlsourcedlg.hrc b/sc/source/ui/inc/xmlsourcedlg.hrc
index 24c40b1..ec10aff 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hrc
+++ b/sc/source/ui/inc/xmlsourcedlg.hrc
@@ -21,6 +21,7 @@
 
 #define IMG_ELEMENT_DEFAULT 50
 #define IMG_ELEMENT_REPEAT  51
-#define IMG_FILE_OPEN 52
+#define IMG_ELEMENT_ATTRIBUTE 52
+#define IMG_FILE_OPEN 53
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index b6fb2ba..39bfa6b 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -42,6 +42,7 @@ class ScXMLSourceDlg : public ModalDialog
     Image maImgFileOpen;
     Image maImgElemDefault;
     Image maImgElemRepeat;
+    Image maImgElemAttribute;
 
     ScDocument* mpDoc;
 
diff --git a/sc/source/ui/src/xmlsourcedlg.src b/sc/source/ui/src/xmlsourcedlg.src
index 564b9d1..8a7b13a 100644
--- a/sc/source/ui/src/xmlsourcedlg.src
+++ b/sc/source/ui/src/xmlsourcedlg.src
@@ -68,6 +68,12 @@ ModalDialog RID_SCDLG_XML_SOURCE
         MaskColor = STD_MASKCOLOR ;
     };
 
+    Image IMG_ELEMENT_ATTRIBUTE
+    {
+        ImageBitmap = Bitmap { File = "time.png" ; };
+        MaskColor = STD_MASKCOLOR ;
+    };
+
     Image IMG_FILE_OPEN
     {
         ImageBitmap = Bitmap { File = "file.png" ; };
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 7f0a48b..2a94a9b 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -36,6 +36,7 @@ ScXMLSourceDlg::ScXMLSourceDlg(Window* pParent, ScDocument* pDoc) :
     maImgFileOpen(ScResId(IMG_FILE_OPEN)),
     maImgElemDefault(ScResId(IMG_ELEMENT_DEFAULT)),
     maImgElemRepeat(ScResId(IMG_ELEMENT_REPEAT)),
+    maImgElemAttribute(ScResId(IMG_ELEMENT_ATTRIBUTE)),
     mpDoc(pDoc)
 {
     maBtnSelectSource.SetModeImage(maImgFileOpen);
@@ -80,7 +81,8 @@ void ScXMLSourceDlg::LoadSourceFileStructure(const OUString& rPath)
     if (!pOrcus)
         return;
 
-    pOrcus->loadXMLStructure(maLbTree, rPath, maImgElemDefault, maImgElemRepeat);
+    pOrcus->loadXMLStructure(
+        maLbTree, rPath, maImgElemDefault, maImgElemRepeat, maImgElemAttribute);
 }
 
 IMPL_LINK(ScXMLSourceDlg, BtnPressedHdl, Button*, pBtn)
commit 064cefd2cc42fa232eff0aae625b818bd01dddaa
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Oct 5 17:41:33 2012 -0400

    Add detected attributes to the tree too.
    
    Change-Id: I6d4b757f599ac8d33be3775ee55eaef61d89871a

diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 8453043..4635175 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -175,10 +175,8 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, const OUString& rPath) cons
 
 void populateTree(
    SvTreeListBox& rTreeCtrl, orcus::xml_structure_tree::walker& rWalker,
-   const orcus::xml_structure_tree::element_name& rElemName, bool bRepeat, const Image& rImgRepeatElem, SvLBoxEntry* pParent)
+   const orcus::xml_structure_tree::entity_name& rElemName, bool bRepeat, const Image& rImgRepeatElem, SvLBoxEntry* pParent)
 {
-    // TODO: Make use of bRepeat flag.
-
     OUString aName(rElemName.name.get(), rElemName.name.size(), RTL_TEXTENCODING_UTF8);
     SvLBoxEntry* pEntry = rTreeCtrl.InsertEntry(aName, pParent);
     if (bRepeat)
@@ -190,13 +188,22 @@ void populateTree(
     if (pParent)
         rTreeCtrl.Expand(pParent);
 
-    orcus::xml_structure_tree::element_names_type aChildElements;
-    rWalker.get_children(aChildElements);
+    orcus::xml_structure_tree::entity_names_type aNames;
 
-    orcus::xml_structure_tree::element_names_type::const_iterator it = aChildElements.begin();
-    orcus::xml_structure_tree::element_names_type::const_iterator itEnd = aChildElements.end();
+    rWalker.get_attributes(aNames);
+    orcus::xml_structure_tree::entity_names_type::const_iterator it = aNames.begin();
+    orcus::xml_structure_tree::entity_names_type::const_iterator itEnd = aNames.end();
     for (; it != itEnd; ++it)
     {
+        orcus::xml_structure_tree::entity_name aAttrName = *it;
+        rTreeCtrl.InsertEntry(OUString(aAttrName.name.get(), aAttrName.name.size(), RTL_TEXTENCODING_UTF8), pEntry);
+    }
+    rTreeCtrl.Expand(pEntry);
+
+    rWalker.get_children(aNames);
+
+    for (it = aNames.begin(), itEnd = aNames.end(); it != itEnd; ++it)
+    {
         orcus::xml_structure_tree::element aElem = rWalker.descend(*it);
         populateTree(rTreeCtrl, rWalker, *it, aElem.repeat, rImgRepeatElem, pEntry);
         rWalker.ascend();
commit 9eb668a3f25f913d510ee4bfa85932ec67313616
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Oct 3 10:33:09 2012 -0400

    Use different icon for recurring elements.
    
    Change-Id: I3869e4a1f2f4b68d57641395daaf79d911a1a891

diff --git a/sc/inc/orcusfilters.hxx b/sc/inc/orcusfilters.hxx
index 2379c67..2ec5a49 100644
--- a/sc/inc/orcusfilters.hxx
+++ b/sc/inc/orcusfilters.hxx
@@ -14,6 +14,7 @@
 
 class ScDocument;
 class SvTreeListBox;
+class Image;
 
 /**
  * Collection of orcus filter wrappers.
@@ -25,7 +26,9 @@ public:
 
     virtual bool importCSV(ScDocument& rDoc, const rtl::OUString& rPath) const = 0;
 
-    virtual bool loadXMLStructure(const rtl::OUString& rPath, SvTreeListBox& rTree) const = 0;
+    virtual bool loadXMLStructure(
+       SvTreeListBox& rTreeCtrl, const rtl::OUString& rPath,
+       const Image& rImgDefaultElem, const Image& rImgRepeatElem) const = 0;
 };
 
 #endif
diff --git a/sc/source/filter/inc/orcusfiltersimpl.hxx b/sc/source/filter/inc/orcusfiltersimpl.hxx
index f51f00f..311b6e0 100644
--- a/sc/source/filter/inc/orcusfiltersimpl.hxx
+++ b/sc/source/filter/inc/orcusfiltersimpl.hxx
@@ -17,7 +17,9 @@ class ScOrcusFiltersImpl : public ScOrcusFilters
 public:
     virtual bool importCSV(ScDocument& rDoc, const rtl::OUString& rPath) const;
 
-    virtual bool loadXMLStructure(const rtl::OUString& rPath, SvTreeListBox& rTree) const;
+    virtual bool loadXMLStructure(
+       SvTreeListBox& rTreeCtrl, const rtl::OUString& rPath,
+       const Image& rImgDefaultElem, const Image& rImgRepeatElem) const;
 };
 
 #endif
diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 721e5ee..8453043 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -175,12 +175,18 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, const OUString& rPath) cons
 
 void populateTree(
    SvTreeListBox& rTreeCtrl, orcus::xml_structure_tree::walker& rWalker,
-   const orcus::xml_structure_tree::element_name& rElemName, bool bRepeat, SvLBoxEntry* pParent)
+   const orcus::xml_structure_tree::element_name& rElemName, bool bRepeat, const Image& rImgRepeatElem, SvLBoxEntry* pParent)
 {
     // TODO: Make use of bRepeat flag.
 
     OUString aName(rElemName.name.get(), rElemName.name.size(), RTL_TEXTENCODING_UTF8);
     SvLBoxEntry* pEntry = rTreeCtrl.InsertEntry(aName, pParent);
+    if (bRepeat)
+    {
+        rTreeCtrl.SetExpandedEntryBmp(pEntry, rImgRepeatElem);
+        rTreeCtrl.SetCollapsedEntryBmp(pEntry, rImgRepeatElem);
+    }
+
     if (pParent)
         rTreeCtrl.Expand(pParent);
 
@@ -192,12 +198,13 @@ void populateTree(
     for (; it != itEnd; ++it)
     {
         orcus::xml_structure_tree::element aElem = rWalker.descend(*it);
-        populateTree(rTreeCtrl, rWalker, *it, aElem.repeat, pEntry);
+        populateTree(rTreeCtrl, rWalker, *it, aElem.repeat, rImgRepeatElem, pEntry);
         rWalker.ascend();
     }
 }
 
-bool ScOrcusFiltersImpl::loadXMLStructure(const OUString& rPath, SvTreeListBox& rTreeCtrl) const
+bool ScOrcusFiltersImpl::loadXMLStructure(
+   SvTreeListBox& rTreeCtrl, const rtl::OUString& rPath, const Image& rImgDefaultElem, const Image& rImgRepeatElem) const
 {
     INetURLObject aURL(rPath);
     OString aSysPath = rtl::OUStringToOString(aURL.getFSysPath(SYSTEM_PATH), RTL_TEXTENCODING_UTF8);
@@ -217,12 +224,14 @@ bool ScOrcusFiltersImpl::loadXMLStructure(const OUString& rPath, SvTreeListBox&
         aXmlTree.parse(&aStrm[0], aStrm.size());
 
         rTreeCtrl.Clear();
+        rTreeCtrl.SetDefaultCollapsedEntryBmp(rImgDefaultElem);
+        rTreeCtrl.SetDefaultExpandedEntryBmp(rImgDefaultElem);
 
         orcus::xml_structure_tree::walker aWalker = aXmlTree.get_walker();
 
         // Root element.
         orcus::xml_structure_tree::element aElem = aWalker.root();
-        populateTree(rTreeCtrl, aWalker, aElem.name, aElem.repeat, NULL);
+        populateTree(rTreeCtrl, aWalker, aElem.name, aElem.repeat, rImgRepeatElem, NULL);
     }
     catch (const std::exception&)
     {
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index 6e32d12..b6fb2ba 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -23,8 +23,6 @@ class ScDocument;
 
 class ScXMLSourceTree : public SvTreeListBox
 {
-    Image maImgElemDefault;
-    Image maImgElemRepeat;
 public:
     ScXMLSourceTree(Window* pParent, const ResId& rResId);
 };
@@ -42,6 +40,8 @@ class ScXMLSourceDlg : public ModalDialog
     CancelButton maBtnCancel;
 
     Image maImgFileOpen;
+    Image maImgElemDefault;
+    Image maImgElemRepeat;
 
     ScDocument* mpDoc;
 
diff --git a/sc/source/ui/src/xmlsourcedlg.src b/sc/source/ui/src/xmlsourcedlg.src
index f55110b..564b9d1 100644
--- a/sc/source/ui/src/xmlsourcedlg.src
+++ b/sc/source/ui/src/xmlsourcedlg.src
@@ -62,6 +62,12 @@ ModalDialog RID_SCDLG_XML_SOURCE
         MaskColor = STD_MASKCOLOR ;
     };
 
+    Image IMG_ELEMENT_REPEAT
+    {
+        ImageBitmap = Bitmap { File = "pages.png" ; };
+        MaskColor = STD_MASKCOLOR ;
+    };
+
     Image IMG_FILE_OPEN
     {
         ImageBitmap = Bitmap { File = "file.png" ; };
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 39ccbe5..7f0a48b 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -23,13 +23,7 @@ using namespace com::sun::star;
 
 
 ScXMLSourceTree::ScXMLSourceTree(Window* pParent, const ResId& rResId) :
-    SvTreeListBox(pParent, rResId),
-    maImgElemDefault(ScResId(IMG_ELEMENT_DEFAULT)),
-    maImgElemRepeat(ScResId(IMG_ELEMENT_REPEAT))
-{
-    SetDefaultExpandedEntryBmp(maImgElemDefault);
-    SetDefaultCollapsedEntryBmp(maImgElemDefault);
-}
+    SvTreeListBox(pParent, rResId) {}
 
 ScXMLSourceDlg::ScXMLSourceDlg(Window* pParent, ScDocument* pDoc) :
     ModalDialog(pParent, ScResId(RID_SCDLG_XML_SOURCE)),
@@ -40,6 +34,8 @@ ScXMLSourceDlg::ScXMLSourceDlg(Window* pParent, ScDocument* pDoc) :
     maLbTree(this, ScResId(LB_SOURCE_TREE)),
     maBtnCancel(this, ScResId(BTN_CANCEL)),
     maImgFileOpen(ScResId(IMG_FILE_OPEN)),
+    maImgElemDefault(ScResId(IMG_ELEMENT_DEFAULT)),
+    maImgElemRepeat(ScResId(IMG_ELEMENT_REPEAT)),
     mpDoc(pDoc)
 {
     maBtnSelectSource.SetModeImage(maImgFileOpen);
@@ -84,7 +80,7 @@ void ScXMLSourceDlg::LoadSourceFileStructure(const OUString& rPath)
     if (!pOrcus)
         return;
 
-    pOrcus->loadXMLStructure(rPath, maLbTree);
+    pOrcus->loadXMLStructure(maLbTree, rPath, maImgElemDefault, maImgElemRepeat);
 }
 
 IMPL_LINK(ScXMLSourceDlg, BtnPressedHdl, Button*, pBtn)
commit f347e609a66337e481dff141731205424d6bb5cf
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Oct 3 10:00:36 2012 -0400

    Pass the 'repeat' flag of each element too, for recurring elements.
    
    Change-Id: I2d5ad0724b45d448b18a04ec58f5f06c7aa86e2b

diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index b07647b..721e5ee 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -175,8 +175,10 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, const OUString& rPath) cons
 
 void populateTree(
    SvTreeListBox& rTreeCtrl, orcus::xml_structure_tree::walker& rWalker,
-   const orcus::xml_structure_tree::element_name& rElemName, SvLBoxEntry* pParent)
+   const orcus::xml_structure_tree::element_name& rElemName, bool bRepeat, SvLBoxEntry* pParent)
 {
+    // TODO: Make use of bRepeat flag.
+
     OUString aName(rElemName.name.get(), rElemName.name.size(), RTL_TEXTENCODING_UTF8);
     SvLBoxEntry* pEntry = rTreeCtrl.InsertEntry(aName, pParent);
     if (pParent)
@@ -189,8 +191,8 @@ void populateTree(
     orcus::xml_structure_tree::element_names_type::const_iterator itEnd = aChildElements.end();
     for (; it != itEnd; ++it)
     {
-        rWalker.descend(*it);
-        populateTree(rTreeCtrl, rWalker, *it, pEntry);
+        orcus::xml_structure_tree::element aElem = rWalker.descend(*it);
+        populateTree(rTreeCtrl, rWalker, *it, aElem.repeat, pEntry);
         rWalker.ascend();
     }
 }
@@ -220,7 +222,7 @@ bool ScOrcusFiltersImpl::loadXMLStructure(const OUString& rPath, SvTreeListBox&
 
         // Root element.
         orcus::xml_structure_tree::element aElem = aWalker.root();
-        populateTree(rTreeCtrl, aWalker, aElem.name, NULL);
+        populateTree(rTreeCtrl, aWalker, aElem.name, aElem.repeat, NULL);
     }
     catch (const std::exception&)
     {
commit e13f12e450aead1dc48188d3b66614b40217eab5
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Oct 3 09:51:52 2012 -0400

    A little cleanup.
    
    Change-Id: I04ac6b95fec116f13507f8f012320d522120fef3

diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 0afaee4..b07647b 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -173,12 +173,14 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, const OUString& rPath) cons
     return true;
 }
 
-void populateTree(SvTreeListBox& rTree, orcus::xml_structure_tree::walker& rWalker, const orcus::xml_structure_tree::element_name& rElemName, SvLBoxEntry* pParent)
+void populateTree(
+   SvTreeListBox& rTreeCtrl, orcus::xml_structure_tree::walker& rWalker,
+   const orcus::xml_structure_tree::element_name& rElemName, SvLBoxEntry* pParent)
 {
     OUString aName(rElemName.name.get(), rElemName.name.size(), RTL_TEXTENCODING_UTF8);
-    SvLBoxEntry* pEntry = rTree.InsertEntry(aName, pParent);
+    SvLBoxEntry* pEntry = rTreeCtrl.InsertEntry(aName, pParent);
     if (pParent)
-        rTree.Expand(pParent);
+        rTreeCtrl.Expand(pParent);
 
     orcus::xml_structure_tree::element_names_type aChildElements;
     rWalker.get_children(aChildElements);
@@ -188,12 +190,12 @@ void populateTree(SvTreeListBox& rTree, orcus::xml_structure_tree::walker& rWalk
     for (; it != itEnd; ++it)
     {
         rWalker.descend(*it);
-        populateTree(rTree, rWalker, *it, pEntry);
+        populateTree(rTreeCtrl, rWalker, *it, pEntry);
         rWalker.ascend();
     }
 }
 
-bool ScOrcusFiltersImpl::loadXMLStructure(const OUString& rPath, SvTreeListBox& rTree) const
+bool ScOrcusFiltersImpl::loadXMLStructure(const OUString& rPath, SvTreeListBox& rTreeCtrl) const
 {
     INetURLObject aURL(rPath);
     OString aSysPath = rtl::OUStringToOString(aURL.getFSysPath(SYSTEM_PATH), RTL_TEXTENCODING_UTF8);
@@ -207,10 +209,18 @@ bool ScOrcusFiltersImpl::loadXMLStructure(const OUString& rPath, SvTreeListBox&
         return false;
 
     orcus::xmlns_repository aNsRepo; // xml namespace repository.
-    orcus::xml_structure_tree aTree(aNsRepo);
+    orcus::xml_structure_tree aXmlTree(aNsRepo);
     try
     {
-        aTree.parse(&aStrm[0], aStrm.size());
+        aXmlTree.parse(&aStrm[0], aStrm.size());
+
+        rTreeCtrl.Clear();
+
+        orcus::xml_structure_tree::walker aWalker = aXmlTree.get_walker();
+
+        // Root element.
+        orcus::xml_structure_tree::element aElem = aWalker.root();
+        populateTree(rTreeCtrl, aWalker, aElem.name, NULL);
     }
     catch (const std::exception&)
     {
@@ -218,14 +228,6 @@ bool ScOrcusFiltersImpl::loadXMLStructure(const OUString& rPath, SvTreeListBox&
         return false;
     }
 
-    rTree.Clear();
-
-    orcus::xml_structure_tree::walker aWalker = aTree.get_walker();
-
-    // Root element.
-    orcus::xml_structure_tree::element aElem = aWalker.root();
-    populateTree(rTree, aWalker, aElem.name, NULL);
-
     return true;
 }
 
commit 89939813fc1fae456c6e36bb08191395f6726da7
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Oct 3 09:47:07 2012 -0400

    Populate the tree box with real xml structure tree.
    
    Change-Id: Ia91340cee5e25b118ae72a62e0d94cdc976bc14e

diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index e5c5507..0afaee4 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -17,6 +17,9 @@
 #define __ORCUS_STATIC_LIB
 #include <orcus/spreadsheet/import_interface.hpp>
 #include <orcus/orcus_csv.hpp>
+#include <orcus/xml_structure_tree.hpp>
+#include <orcus/xml_namespace.hpp>
+#include <orcus/global.hpp>
 
 #include <boost/ptr_container/ptr_vector.hpp>
 
@@ -170,14 +173,59 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, const OUString& rPath) cons
     return true;
 }
 
-bool ScOrcusFiltersImpl::loadXMLStructure(const OUString& rPath, SvTreeListBox& /*rTree*/) const
+void populateTree(SvTreeListBox& rTree, orcus::xml_structure_tree::walker& rWalker, const orcus::xml_structure_tree::element_name& rElemName, SvLBoxEntry* pParent)
+{
+    OUString aName(rElemName.name.get(), rElemName.name.size(), RTL_TEXTENCODING_UTF8);
+    SvLBoxEntry* pEntry = rTree.InsertEntry(aName, pParent);
+    if (pParent)
+        rTree.Expand(pParent);
+
+    orcus::xml_structure_tree::element_names_type aChildElements;
+    rWalker.get_children(aChildElements);
+
+    orcus::xml_structure_tree::element_names_type::const_iterator it = aChildElements.begin();
+    orcus::xml_structure_tree::element_names_type::const_iterator itEnd = aChildElements.end();
+    for (; it != itEnd; ++it)
+    {
+        rWalker.descend(*it);
+        populateTree(rTree, rWalker, *it, pEntry);
+        rWalker.ascend();
+    }
+}
+
+bool ScOrcusFiltersImpl::loadXMLStructure(const OUString& rPath, SvTreeListBox& rTree) const
 {
     INetURLObject aURL(rPath);
     OString aSysPath = rtl::OUStringToOString(aURL.getFSysPath(SYSTEM_PATH), RTL_TEXTENCODING_UTF8);
     const char* path = aSysPath.getStr();
-    fprintf(stdout, "ScOrcusFiltersImpl::loadXMLStructure:   path = '%s'\n", path);
 
-    // TODO: Load the tree box.
+    // TODO: Use our own stream loading call instead of one from orcus.
+    std::string aStrm;
+    orcus::load_file_content(path, aStrm);
+
+    if (aStrm.empty())
+        return false;
+
+    orcus::xmlns_repository aNsRepo; // xml namespace repository.
+    orcus::xml_structure_tree aTree(aNsRepo);
+    try
+    {
+        aTree.parse(&aStrm[0], aStrm.size());
+    }
+    catch (const std::exception&)
+    {
+        // Parsing of this XML file failed.
+        return false;
+    }
+
+    rTree.Clear();
+
+    orcus::xml_structure_tree::walker aWalker = aTree.get_walker();
+
+    // Root element.
+    orcus::xml_structure_tree::element aElem = aWalker.root();
+    populateTree(rTree, aWalker, aElem.name, NULL);
+
     return true;
 }
 
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index e94d132..39ccbe5 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -29,15 +29,6 @@ ScXMLSourceTree::ScXMLSourceTree(Window* pParent, const ResId& rResId) :
 {
     SetDefaultExpandedEntryBmp(maImgElemDefault);
     SetDefaultCollapsedEntryBmp(maImgElemDefault);
-
-    SvLBoxEntry* p = InsertEntry(OUString("Test1"));
-    p = InsertEntry(OUString("Test2"));
-    SvLBoxEntry* pPar = p;
-    p = InsertEntry(OUString("Test3"), p);
-    Expand(pPar);
-    pPar = p;
-    p = InsertEntry(OUString("Test4"), p);
-    Expand(pPar);
 }
 
 ScXMLSourceDlg::ScXMLSourceDlg(Window* pParent, ScDocument* pDoc) :
commit cd68b7c78c333752cb57b81a75f0723754599f85
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Tue Oct 2 19:46:47 2012 -0400

    orcus from master now has a new interface.
    
    Change-Id: I1d03d5dd2b12cdc1eab2d599199c333d49d306b8

diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 7152b68..e5c5507 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -61,6 +61,9 @@ public:
     virtual void set_formula_result(row_t row, col_t col, const char* p, size_t n);
     virtual void set_shared_formula(
         row_t row, col_t col, formula_grammar_t grammar, size_t sindex,
+        const char* p_formula, size_t n_formula);
+    virtual void set_shared_formula(
+        row_t row, col_t col, formula_grammar_t grammar, size_t sindex,
         const char* p_formula, size_t n_formula, const char* p_range, size_t n_range);
     virtual void set_shared_formula(row_t row, col_t col, size_t sindex);
     virtual void set_string(row_t row, col_t col, size_t sindex);
@@ -122,6 +125,12 @@ void ScOrcusSheet::set_formula_result(row_t /*row*/, col_t /*col*/, const char*
 
 void ScOrcusSheet::set_shared_formula(
     row_t /*row*/, col_t /*col*/, formula_grammar_t /*grammar*/, size_t /*sindex*/,
+    const char* /*p_formula*/, size_t /*n_formula*/)
+{
+}
+
+void ScOrcusSheet::set_shared_formula(
+    row_t /*row*/, col_t /*col*/, formula_grammar_t /*grammar*/, size_t /*sindex*/,
     const char* /*p_formula*/, size_t /*n_formula*/, const char* /*p_range*/, size_t /*n_range*/)
 {
 }
commit fcc000dd27c5c8502c34a0734c7b3b3e645e9aa8
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Sep 28 22:34:46 2012 -0400

    Pop up a full path in case the path is cut off.
    
    Change-Id: I7a5c1fe86c4162de6d3dec301cbea6299d07212d

diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index 44dd44e..6e32d12 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -15,6 +15,8 @@
 #include "vcl/fixed.hxx"
 #include "svtools/svtreebx.hxx"
 
+#include "expftext.hxx"
+
 #include <boost/scoped_ptr.hpp>
 
 class ScDocument;
@@ -31,7 +33,7 @@ class ScXMLSourceDlg : public ModalDialog
 {
     FixedLine maFlSourceFile;
     ImageButton maBtnSelectSource;
-    FixedText maFtSourceFile;
+    ScExpandedFixedText maFtSourceFile;
 
     FixedLine maFtMapXmlDoc;
 
diff --git a/sc/source/ui/src/xmlsourcedlg.src b/sc/source/ui/src/xmlsourcedlg.src
index 86f8a7d..f55110b 100644
--- a/sc/source/ui/src/xmlsourcedlg.src
+++ b/sc/source/ui/src/xmlsourcedlg.src
@@ -35,7 +35,7 @@ ModalDialog RID_SCDLG_XML_SOURCE
     FixedText FT_SOURCE_FILE
     {
         Pos = MAP_APPFONT ( 25 , 21 ) ;
-        Size = MAP_APPFONT ( 225 , 8 ) ;
+        Size = MAP_APPFONT ( 219 , 8 ) ;
 
         Text [ en-US ] = "- not set -";
     };
commit 9681c69eb046cec6b70a84bae627ffa29093d145
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Sep 28 22:19:46 2012 -0400

    Call orcus filter accessor from the dialog when a new source file is set.
    
    For now it doesn't do anything.
    
    Change-Id: I8e41c7e15c3b99ab0ddec8e68242176c97f368fc

diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx
index 2359927..7eef93d 100644
--- a/sc/inc/filter.hxx
+++ b/sc/inc/filter.hxx
@@ -32,6 +32,8 @@
 #include <tools/string.hxx>
 #include <rtl/textenc.h>
 
+#include "scdllapi.h"
+
 class SfxMedium;
 class SvStream;
 
@@ -133,7 +135,7 @@ extern "C" {
 
 class ScFormatFilter {
     public:
-    static ScFormatFilterPlugin &Get();
+    SC_DLLPUBLIC static ScFormatFilterPlugin &Get();
 };
 
 #endif
diff --git a/sc/inc/orcusfilters.hxx b/sc/inc/orcusfilters.hxx
index b7e3198..2379c67 100644
--- a/sc/inc/orcusfilters.hxx
+++ b/sc/inc/orcusfilters.hxx
@@ -13,6 +13,7 @@
 #include "rtl/ustring.hxx"
 
 class ScDocument;
+class SvTreeListBox;
 
 /**
  * Collection of orcus filter wrappers.
@@ -23,6 +24,8 @@ public:
     virtual ~ScOrcusFilters() {}
 
     virtual bool importCSV(ScDocument& rDoc, const rtl::OUString& rPath) const = 0;
+
+    virtual bool loadXMLStructure(const rtl::OUString& rPath, SvTreeListBox& rTree) const = 0;
 };
 
 #endif
diff --git a/sc/source/filter/inc/orcusfiltersimpl.hxx b/sc/source/filter/inc/orcusfiltersimpl.hxx
index e349120..f51f00f 100644
--- a/sc/source/filter/inc/orcusfiltersimpl.hxx
+++ b/sc/source/filter/inc/orcusfiltersimpl.hxx
@@ -16,6 +16,8 @@ class ScOrcusFiltersImpl : public ScOrcusFilters
 {
 public:
     virtual bool importCSV(ScDocument& rDoc, const rtl::OUString& rPath) const;
+
+    virtual bool loadXMLStructure(const rtl::OUString& rPath, SvTreeListBox& rTree) const;
 };
 
 #endif
diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 3c8c211..7152b68 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -7,11 +7,12 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include "orcusfiltersimpl.hxx"
+
 #include "document.hxx"
 
 #include "tools/urlobj.hxx"
-
-#include "orcusfiltersimpl.hxx"
+#include "svtools/svtreebx.hxx"
 
 #define __ORCUS_STATIC_LIB
 #include <orcus/spreadsheet/import_interface.hpp>
@@ -143,7 +144,8 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, const OUString& rPath) cons
 {
     ScOrcusFactory aFactory(rDoc);
     INetURLObject aURL(rPath);
-    const char* path = rtl::OUStringToOString(aURL.getFSysPath(SYSTEM_PATH), RTL_TEXTENCODING_UTF8).getStr();
+    OString aSysPath = rtl::OUStringToOString(aURL.getFSysPath(SYSTEM_PATH), RTL_TEXTENCODING_UTF8);
+    const char* path = aSysPath.getStr();
 
     try
     {
@@ -159,4 +161,15 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, const OUString& rPath) cons
     return true;
 }
 
+bool ScOrcusFiltersImpl::loadXMLStructure(const OUString& rPath, SvTreeListBox& /*rTree*/) const
+{
+    INetURLObject aURL(rPath);
+    OString aSysPath = rtl::OUStringToOString(aURL.getFSysPath(SYSTEM_PATH), RTL_TEXTENCODING_UTF8);
+    const char* path = aSysPath.getStr();
+    fprintf(stdout, "ScOrcusFiltersImpl::loadXMLStructure:   path = '%s'\n", path);
+
+    // TODO: Load the tree box.
+    return true;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index 5a54c70..44dd44e 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -50,6 +50,7 @@ public:
 private:
 
     void SelectSourceFile();
+    void LoadSourceFileStructure(const OUString& rPath);
 
     DECL_LINK(BtnPressedHdl, Button*);
 };
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index e44f5c0..e94d132 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -12,6 +12,8 @@
 
 #include "scresid.hxx"
 #include "document.hxx"
+#include "orcusfilters.hxx"
+#include "filter.hxx"
 
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/ui/dialogs/XFilePicker.hpp>
@@ -81,6 +83,17 @@ void ScXMLSourceDlg::SelectSourceFile()
 
     // There should only be one file returned from the file picker.
     maFtSourceFile.SetText(aFiles[0]);
+
+    LoadSourceFileStructure(aFiles[0]);
+}
+
+void ScXMLSourceDlg::LoadSourceFileStructure(const OUString& rPath)
+{
+    ScOrcusFilters* pOrcus = ScFormatFilter::Get().GetOrcusFilters();
+    if (!pOrcus)
+        return;
+
+    pOrcus->loadXMLStructure(rPath, maLbTree);
 }
 
 IMPL_LINK(ScXMLSourceDlg, BtnPressedHdl, Button*, pBtn)
commit d91b42fc780f98f3d32f703edfb4852b2d291423
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Sep 28 20:22:23 2012 -0400

    Use file picker dialog to pick the source xml file.
    
    Change-Id: Ie927d8a83fa93e3f61c2c2133fe655854667854c

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 5b164f3..bd4f09f 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -524,7 +524,7 @@ public:
     virtual SfxAbstractTabDialog * CreateScSortDlg( Window*          pParent, //add for ScSortDlg
                                                     const SfxItemSet* pArgSet,int nId ) = 0;
 
-    virtual AbstractScXMLSourceDlg* CreateScXMLSourceDlg(Window* pParent, int nId) = 0;
+    virtual AbstractScXMLSourceDlg* CreateScXMLSourceDlg(Window* pParent, ScDocument* pDoc, int nId) = 0;
 
     // for tabpage
     virtual CreateTabPage               GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index e98f29b..2e8a536 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -1559,9 +1559,9 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg( Window*
     return 0;
 }
 
-AbstractScXMLSourceDlg* ScAbstractDialogFactory_Impl::CreateScXMLSourceDlg(Window* pParent, int nId)
+AbstractScXMLSourceDlg* ScAbstractDialogFactory_Impl::CreateScXMLSourceDlg(Window* pParent, ScDocument* pDoc, int nId)
 {
-    ScXMLSourceDlg* pDlg = (nId == RID_SCDLG_XML_SOURCE) ? new ScXMLSourceDlg(pParent) : NULL;
+    ScXMLSourceDlg* pDlg = (nId == RID_SCDLG_XML_SOURCE) ? new ScXMLSourceDlg(pParent, pDoc) : NULL;
 
     return pDlg ? new AbstractScXMLSourceDlg_Impl(pDlg) : NULL;
 }
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 00dba7f..b0763ac 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -593,7 +593,7 @@ public:
     virtual SfxAbstractTabDialog * CreateScSortDlg( Window*          pParent, //add for ScSortDlg
                                                     const SfxItemSet* pArgSet,int nId );
 
-    virtual AbstractScXMLSourceDlg* CreateScXMLSourceDlg(Window* pParent, int nId);
+    virtual AbstractScXMLSourceDlg* CreateScXMLSourceDlg(Window* pParent, ScDocument* pDoc, int nId);
 
     // For TabPage
     virtual CreateTabPage               GetTabPageCreatorFunc( sal_uInt16 nId );
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index 2213d42..5a54c70 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -15,6 +15,10 @@
 #include "vcl/fixed.hxx"
 #include "svtools/svtreebx.hxx"
 
+#include <boost/scoped_ptr.hpp>
+
+class ScDocument;
+
 class ScXMLSourceTree : public SvTreeListBox
 {
     Image maImgElemDefault;
@@ -37,9 +41,17 @@ class ScXMLSourceDlg : public ModalDialog
 
     Image maImgFileOpen;
 
+    ScDocument* mpDoc;
+
 public:
-    ScXMLSourceDlg(Window* pParent);
+    ScXMLSourceDlg(Window* pParent, ScDocument* pDoc);
     virtual ~ScXMLSourceDlg();
+
+private:
+
+    void SelectSourceFile();
+
+    DECL_LINK(BtnPressedHdl, Button*);
 };
 
 #endif
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 8660140..addfd75 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2405,7 +2405,7 @@ void ScCellShell::ExecuteXMLSourceDialog()
 
     boost::scoped_ptr<AbstractScXMLSourceDlg> pDlg(
         pFact->CreateScXMLSourceDlg(
-            pTabViewShell->GetDialogParent(), RID_SCDLG_XML_SOURCE));
+            pTabViewShell->GetDialogParent(), GetViewData()->GetDocument(), RID_SCDLG_XML_SOURCE));
 
     if (!pDlg)
         return;
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 378ba5f..e44f5c0 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -11,6 +11,14 @@
 #include "xmlsourcedlg.hrc"
 
 #include "scresid.hxx"
+#include "document.hxx"
+
+#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;
+
 
 ScXMLSourceTree::ScXMLSourceTree(Window* pParent, const ResId& rResId) :
     SvTreeListBox(pParent, rResId),
@@ -30,7 +38,7 @@ ScXMLSourceTree::ScXMLSourceTree(Window* pParent, const ResId& rResId) :
     Expand(pPar);
 }
 
-ScXMLSourceDlg::ScXMLSourceDlg(Window* pParent) :
+ScXMLSourceDlg::ScXMLSourceDlg(Window* pParent, ScDocument* pDoc) :
     ModalDialog(pParent, ScResId(RID_SCDLG_XML_SOURCE)),
     maFlSourceFile(this, ScResId(FL_SOURCE_FILE)),
     maBtnSelectSource(this, ScResId(BTN_SELECT_SOURCE_FILE)),
@@ -38,14 +46,48 @@ ScXMLSourceDlg::ScXMLSourceDlg(Window* pParent) :
     maFtMapXmlDoc(this, ScResId(FL_MAP_XML_TO_DOCUMENT)),
     maLbTree(this, ScResId(LB_SOURCE_TREE)),
     maBtnCancel(this, ScResId(BTN_CANCEL)),
-    maImgFileOpen(ScResId(IMG_FILE_OPEN))
+    maImgFileOpen(ScResId(IMG_FILE_OPEN)),
+    mpDoc(pDoc)
 {
     maBtnSelectSource.SetModeImage(maImgFileOpen);
     FreeResource();
+
+    maBtnSelectSource.SetClickHdl(LINK(this, ScXMLSourceDlg, BtnPressedHdl));
 }
 
 ScXMLSourceDlg::~ScXMLSourceDlg()
 {
 }
 
+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;
+
+    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.
+    maFtSourceFile.SetText(aFiles[0]);
+}
+
+IMPL_LINK(ScXMLSourceDlg, BtnPressedHdl, Button*, pBtn)
+{
+    if (pBtn == &maBtnSelectSource)
+        SelectSourceFile();
+    return 0;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 003d50d4a9d987386a134f0f78d7fd446b12f8d7
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Sep 28 17:51:09 2012 -0400

    Some basic dialog layout.  It's not functional yet.
    
    Change-Id: Icd46699b8249768fdda1ee140fdacca182a731c0

diff --git a/sc/source/ui/inc/xmlsourcedlg.hrc b/sc/source/ui/inc/xmlsourcedlg.hrc
index b87b6a3..24c40b1 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hrc
+++ b/sc/source/ui/inc/xmlsourcedlg.hrc
@@ -12,4 +12,15 @@
 #define BTN_OK 0
 #define BTN_CANCEL 1
 
+#define FL_SOURCE_FILE 10
+#define BTN_SELECT_SOURCE_FILE 11
+#define FT_SOURCE_FILE 12
+
+#define FL_MAP_XML_TO_DOCUMENT 20
+#define LB_SOURCE_TREE 21
+
+#define IMG_ELEMENT_DEFAULT 50
+#define IMG_ELEMENT_REPEAT  51
+#define IMG_FILE_OPEN 52
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index 3d0237f..2213d42 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -10,10 +10,33 @@
 #ifndef __SC_XMLSOURCEDLG_HXX__
 #define __SC_XMLSOURCEDLG_HXX__
 
+#include "vcl/button.hxx"
 #include "vcl/dialog.hxx"
+#include "vcl/fixed.hxx"
+#include "svtools/svtreebx.hxx"
+
+class ScXMLSourceTree : public SvTreeListBox
+{
+    Image maImgElemDefault;
+    Image maImgElemRepeat;
+public:
+    ScXMLSourceTree(Window* pParent, const ResId& rResId);
+};
 
 class ScXMLSourceDlg : public ModalDialog
 {
+    FixedLine maFlSourceFile;
+    ImageButton maBtnSelectSource;
+    FixedText maFtSourceFile;
+
+    FixedLine maFtMapXmlDoc;
+
+    ScXMLSourceTree maLbTree;
+
+    CancelButton maBtnCancel;
+
+    Image maImgFileOpen;
+
 public:
     ScXMLSourceDlg(Window* pParent);
     virtual ~ScXMLSourceDlg();
diff --git a/sc/source/ui/src/xmlsourcedlg.src b/sc/source/ui/src/xmlsourcedlg.src
index ba80a99..86f8a7d 100644
--- a/sc/source/ui/src/xmlsourcedlg.src
+++ b/sc/source/ui/src/xmlsourcedlg.src
@@ -12,8 +12,66 @@ ModalDialog RID_SCDLG_XML_SOURCE
 {
     HelpID = "sc:ModalDialog:RID_SCDLG_XML_SOURCE";
     Text [ en-US ] = "XML Source" ;
-    Size = MAP_APPFONT ( 250 , 135 ) ;
+    Size = MAP_APPFONT ( 250 , 200 ) ;
     Moveable = TRUE ;
     Closeable = TRUE ;
+
+    FixedLine FL_SOURCE_FILE
+    {
+        Pos = MAP_APPFONT ( 6 , 5 ) ;
+        Size = MAP_APPFONT ( 238 , 8 ) ;
+
+        Text [ en-US ] = "Source file";
+    };
+
+    ImageButton BTN_SELECT_SOURCE_FILE
+    {
+        Pos = MAP_APPFONT ( 6 , 17 ) ;
+        Size = MAP_APPFONT ( 13 , 15 ) ;
+
+        QuickHelpText [ en-US ] = "Browse to set source file.";
+    };
+
+    FixedText FT_SOURCE_FILE
+    {
+        Pos = MAP_APPFONT ( 25 , 21 ) ;
+        Size = MAP_APPFONT ( 225 , 8 ) ;
+
+        Text [ en-US ] = "- not set -";
+    };
+
+    FixedLine FL_MAP_XML_TO_DOCUMENT
+    {
+        Pos = MAP_APPFONT ( 6 , 38 ) ;
+        Size = MAP_APPFONT ( 238 , 8 ) ;
+
+        Text [ en-US ] = "Map to document";
+    };
+
+    Control LB_SOURCE_TREE
+    {
+        Border = TRUE ;
+        Pos = MAP_APPFONT ( 114 , 50 ) ;
+        Size = MAP_APPFONT ( 130 , 120 ) ;
+        TabStop = TRUE ;
+    };
+
+    Image IMG_ELEMENT_DEFAULT
+    {
+        ImageBitmap = Bitmap { File = "page.png" ; };
+        MaskColor = STD_MASKCOLOR ;
+    };
+
+    Image IMG_FILE_OPEN
+    {
+        ImageBitmap = Bitmap { File = "file.png" ; };
+        MaskColor = STD_MASKCOLOR ;
+    };
+
+    CancelButton BTN_CANCEL
+    {
+        Pos = MAP_APPFONT ( 194 , 181 ) ;
+        Size = MAP_APPFONT ( 50 , 14 ) ;
+    };
 };
 
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 58f764e..378ba5f 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -12,9 +12,35 @@
 
 #include "scresid.hxx"
 
+ScXMLSourceTree::ScXMLSourceTree(Window* pParent, const ResId& rResId) :
+    SvTreeListBox(pParent, rResId),
+    maImgElemDefault(ScResId(IMG_ELEMENT_DEFAULT)),
+    maImgElemRepeat(ScResId(IMG_ELEMENT_REPEAT))
+{
+    SetDefaultExpandedEntryBmp(maImgElemDefault);
+    SetDefaultCollapsedEntryBmp(maImgElemDefault);
+
+    SvLBoxEntry* p = InsertEntry(OUString("Test1"));
+    p = InsertEntry(OUString("Test2"));
+    SvLBoxEntry* pPar = p;
+    p = InsertEntry(OUString("Test3"), p);
+    Expand(pPar);
+    pPar = p;
+    p = InsertEntry(OUString("Test4"), p);
+    Expand(pPar);
+}
+
 ScXMLSourceDlg::ScXMLSourceDlg(Window* pParent) :
-    ModalDialog(pParent, ScResId(RID_SCDLG_XML_SOURCE))
+    ModalDialog(pParent, ScResId(RID_SCDLG_XML_SOURCE)),
+    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)),
+    maLbTree(this, ScResId(LB_SOURCE_TREE)),
+    maBtnCancel(this, ScResId(BTN_CANCEL)),
+    maImgFileOpen(ScResId(IMG_FILE_OPEN))
 {
+    maBtnSelectSource.SetModeImage(maImgFileOpen);
     FreeResource();
 }
 
commit 1b8436579c32d352821f820c71c34c2881eb487d
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Sep 26 21:12:11 2012 -0400

    Use the resource file correctly.
    
    Change-Id: I40af0beaf0de25347e8241c08e3be5f92ac16f93

diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index 2d3c64c..9ff824f 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -82,6 +82,7 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
     sc/source/ui/src/colorformat.src \
     sc/source/ui/src/condformatdlg.src \
     sc/source/ui/src/condformatmgr.src \
+    sc/source/ui/src/xmlsourcedlg.src \
     sc/source/ui/cctrl/checklistmenu.src \
     sc/source/ui/navipi/navipi.src \
     sc/source/ui/docshell/tpstat.src \
diff --git a/sc/source/ui/src/xmlsourcedlg.src b/sc/source/ui/src/xmlsourcedlg.src
index 7d67abe..ba80a99 100644
--- a/sc/source/ui/src/xmlsourcedlg.src
+++ b/sc/source/ui/src/xmlsourcedlg.src
@@ -1,4 +1,3 @@
-
 /*
  * This file is part of the LibreOffice project.
  *
@@ -17,3 +16,4 @@ ModalDialog RID_SCDLG_XML_SOURCE
     Moveable = TRUE ;
     Closeable = TRUE ;
 };
+
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 01a09dd..58f764e 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -10,9 +10,12 @@
 #include "xmlsourcedlg.hxx"
 #include "xmlsourcedlg.hrc"
 
+#include "scresid.hxx"
+
 ScXMLSourceDlg::ScXMLSourceDlg(Window* pParent) :
-    ModalDialog(pParent, RID_SCDLG_XML_SOURCE)
+    ModalDialog(pParent, ScResId(RID_SCDLG_XML_SOURCE))
 {
+    FreeResource();
 }
 
 ScXMLSourceDlg::~ScXMLSourceDlg()
commit b7026c2d0a76385d853653877defc439aba5478b
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Sep 26 21:06:00 2012 -0400

    I forgot to add this.
    
    Change-Id: Idf3600f0194326365e90fbf683cd2133656d3d91

diff --git a/sc/source/ui/src/xmlsourcedlg.src b/sc/source/ui/src/xmlsourcedlg.src
new file mode 100644
index 0000000..7d67abe
--- /dev/null
+++ b/sc/source/ui/src/xmlsourcedlg.src
@@ -0,0 +1,19 @@
+
+/*
+ * 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.hrc"
+
+ModalDialog RID_SCDLG_XML_SOURCE
+{
+    HelpID = "sc:ModalDialog:RID_SCDLG_XML_SOURCE";
+    Text [ en-US ] = "XML Source" ;
+    Size = MAP_APPFONT ( 250 , 135 ) ;
+    Moveable = TRUE ;
+    Closeable = TRUE ;
+};
commit 3a90f3ce8bffabb21abc23076e809cafcce09ae7
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Sep 26 20:21:03 2012 -0400

    Launch the dialog for real.
    
    Change-Id: I974599f3bd30f5a70bad69d9fde727fef965933c

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 1c26ff7..8660140 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2395,7 +2395,22 @@ void ScCellShell::ExecuteDataPilotDialog()
 
 void ScCellShell::ExecuteXMLSourceDialog()
 {
-    fprintf(stdout, "ScCellShell::ExecuteXMLSourceDialog:   launch xml dialog\n");
+    ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
+    if (!pFact)
+        return;
+
+    ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
+    if (!pTabViewShell)
+        return;
+
+    boost::scoped_ptr<AbstractScXMLSourceDlg> pDlg(
+        pFact->CreateScXMLSourceDlg(
+            pTabViewShell->GetDialogParent(), RID_SCDLG_XML_SOURCE));
+
+    if (!pDlg)
+        return;
+
+    pDlg->Execute();
 }
 
 void ScCellShell::ExecuteSubtotals(SfxRequest& rReq)
commit dae02ff5810e17ddb21957dac942e089b13c9b40
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Sep 26 20:13:42 2012 -0400

    Abstract dialog instantiation code.
    
    Change-Id: I28e7b354928d349d9f6c90092ead2010cfe3c29b

diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 63d558b..b7d3e8a 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1093,6 +1093,7 @@
 #define RID_SCDLG_FORMULA_CALCOPTIONS   (SC_DIALOGS_START + 157)
 
 #define RID_SCDLG_COND_FORMAT_MANAGER   (SC_DIALOGS_START + 158)
+#define RID_SCDLG_XML_SOURCE            (SC_DIALOGS_START + 159)
 
 #define SC_DIALOGS_END                  (SC_DIALOGS_START + 160)
 
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index d09027c..5b164f3 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -326,6 +326,11 @@ public:
     virtual bool IsDateConversionSet() const = 0;
 };
 
+class AbstractScXMLSourceDlg : public VclAbstractDialog
+{
+public:
+};
+
 //-------Scabstract fractory ---------------------------
 class ScAbstractDialogFactory
 {
@@ -518,6 +523,9 @@ public:
                                                         const SfxItemSet* pArgSet,int nId, ScTabViewShell *pTabVwSh  ) = 0;
     virtual SfxAbstractTabDialog * CreateScSortDlg( Window*          pParent, //add for ScSortDlg
                                                     const SfxItemSet* pArgSet,int nId ) = 0;
+
+    virtual AbstractScXMLSourceDlg* CreateScXMLSourceDlg(Window* pParent, int nId) = 0;
+
     // for tabpage
     virtual CreateTabPage               GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
     virtual GetTabPageRanges            GetTabPageRangesFunc( sal_uInt16 nId ) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index a23d0ed..e98f29b 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -82,6 +82,7 @@
 #include "colorformat.hxx"
 #include "condformatdlg.hxx"
 #include "condformatmgr.hxx"
+#include "xmlsourcedlg.hxx"
 
 // ause
 #include "editutil.hxx"
@@ -122,6 +123,8 @@ IMPL_ABSTDLG_BASE(AbstractScTabBgColorDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScImportOptionsDlg_Impl);
 IMPL_ABSTDLG_BASE(AbstractScTextImportOptionsDlg_Impl);
 IMPL_ABSTDLG_BASE(ScAbstractTabDialog_Impl);
+IMPL_ABSTDLG_BASE(AbstractScXMLSourceDlg_Impl);
+IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl);
 
 // ScAbstractTabDialog_Impl begin
 void ScAbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
@@ -683,8 +686,6 @@ AbstractScTextImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScTextImpor
     return pDlg ? new AbstractScTextImportOptionsDlg_Impl(pDlg) : NULL;
 }
 
-
-
 AbstractScAutoFormatDlg * ScAbstractDialogFactory_Impl::CreateScAutoFormatDlg( Window*                  pParent,
                                                                 ScAutoFormat*               pAutoFormat,
                                                                 const ScAutoFormatData*    pSelFormatData,
@@ -1557,6 +1558,14 @@ SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScSortDlg( Window*
         return new ScAbstractTabDialog_Impl( pDlg );
     return 0;
 }
+
+AbstractScXMLSourceDlg* ScAbstractDialogFactory_Impl::CreateScXMLSourceDlg(Window* pParent, int nId)
+{
+    ScXMLSourceDlg* pDlg = (nId == RID_SCDLG_XML_SOURCE) ? new ScXMLSourceDlg(pParent) : NULL;
+
+    return pDlg ? new AbstractScXMLSourceDlg_Impl(pDlg) : NULL;
+}
+
 #undef SfxTabDialog
 #undef ScAbstractTabDialog_Impl
 
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index dfbd7fd..00dba7f 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -64,6 +64,7 @@ class ScImportOptionsDlg;
 class SfxTabDialog;
 class ScTextImportOptionsDlg;
 class ScCondFormatManagerDlg;
+class ScXMLSourceDlg;
 
 #define DECL_ABSTDLG_BASE(Class,DialogClass)        \
     DialogClass*        pDlg;                       \
@@ -377,6 +378,11 @@ class AbstractScTextImportOptionsDlg_Impl : public AbstractScTextImportOptionsDl
     virtual bool IsDateConversionSet() const;
 };
 
+class AbstractScXMLSourceDlg_Impl : public AbstractScXMLSourceDlg
+{
+    DECL_ABSTDLG_BASE(AbstractScXMLSourceDlg_Impl, ScXMLSourceDlg)
+};
+
 //add for ScAttrDlg , ScHFEditDlg, ScStyleDlg, ScSubTotalDlg, ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg
 class ScAbstractTabDialog_Impl : public SfxAbstractTabDialog
 {
@@ -389,6 +395,7 @@ class ScAbstractTabDialog_Impl : public SfxAbstractTabDialog
     virtual void        SetText( const XubString& rStr );
     virtual String      GetText() const;
 };
+
 //------------------------------------------------------------------------
 //AbstractDialogFactory_Impl implementations
 class ScAbstractDialogFactory_Impl : public ScAbstractDialogFactory
@@ -585,6 +592,9 @@ public:
 
     virtual SfxAbstractTabDialog * CreateScSortDlg( Window*          pParent, //add for ScSortDlg
                                                     const SfxItemSet* pArgSet,int nId );
+
+    virtual AbstractScXMLSourceDlg* CreateScXMLSourceDlg(Window* pParent, int nId);
+
     // For TabPage
     virtual CreateTabPage               GetTabPageCreatorFunc( sal_uInt16 nId );
 
diff --git a/sc/source/ui/inc/xmlsourcedlg.hrc b/sc/source/ui/inc/xmlsourcedlg.hrc
index 323ef7c..b87b6a3 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hrc
+++ b/sc/source/ui/inc/xmlsourcedlg.hrc
@@ -9,6 +9,7 @@
 
 #include "sc.hrc"
 
-
+#define BTN_OK 0
+#define BTN_CANCEL 1
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index 6177cf3..3d0237f 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -10,8 +10,13 @@
 #ifndef __SC_XMLSOURCEDLG_HXX__
 #define __SC_XMLSOURCEDLG_HXX__
 
-class XMLSourceDlg
+#include "vcl/dialog.hxx"
+
+class ScXMLSourceDlg : public ModalDialog
 {
+public:
+    ScXMLSourceDlg(Window* pParent);
+    virtual ~ScXMLSourceDlg();
 };
 
 #endif
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 59a133c..01a09dd 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -10,4 +10,13 @@
 #include "xmlsourcedlg.hxx"
 #include "xmlsourcedlg.hrc"
 
+ScXMLSourceDlg::ScXMLSourceDlg(Window* pParent) :
+    ModalDialog(pParent, RID_SCDLG_XML_SOURCE)
+{
+}
+
+ScXMLSourceDlg::~ScXMLSourceDlg()
+{
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit caf1e6ae7518da72a8e5413177369e00cd673cf7
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Sep 26 17:53:12 2012 -0400

    Add new skeleton files for the new xml source dialog.
    
    Change-Id: I2ac196ea74185fd7f10919ad64434855c5c8b5fa

diff --git a/sc/Library_scui.mk b/sc/Library_scui.mk
index b1eb772..819b907 100644
--- a/sc/Library_scui.mk
+++ b/sc/Library_scui.mk
@@ -114,6 +114,7 @@ $(eval $(call gb_Library_add_exception_objects,scui,\
     sc/source/ui/pagedlg/tphf \
     sc/source/ui/pagedlg/tptable \
     sc/source/ui/styleui/styledlg \
+    sc/source/ui/xmlsource/xmlsourcedlg \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/sc/source/ui/inc/xmlsourcedlg.hrc b/sc/source/ui/inc/xmlsourcedlg.hrc
new file mode 100644
index 0000000..323ef7c
--- /dev/null
+++ b/sc/source/ui/inc/xmlsourcedlg.hrc
@@ -0,0 +1,14 @@
+/* -*- 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 "sc.hrc"
+
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
new file mode 100644
index 0000000..6177cf3
--- /dev/null
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -0,0 +1,19 @@
+/* -*- 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/.
+ */
+
+#ifndef __SC_XMLSOURCEDLG_HXX__
+#define __SC_XMLSOURCEDLG_HXX__
+
+class XMLSourceDlg
+{
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
new file mode 100644
index 0000000..59a133c
--- /dev/null
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -0,0 +1,13 @@
+/* -*- 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"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit adf51f496061eed40ef1cca0173539d3dccbaa39
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Sep 26 17:41:01 2012 -0400

    Separate method to launch xml source dialog.
    
    Change-Id: Iac7898d695cd7659f44944d6615a91d4e2b6a52e

diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx
index 88043ce..c2f7f01 100644
--- a/sc/source/ui/inc/cellsh.hxx
+++ b/sc/source/ui/inc/cellsh.hxx
@@ -67,6 +67,7 @@ private:
                     const String& _rSource, sal_uLong _nRefresh, SfxRequest& _rRequest );
 
     void ExecuteDataPilotDialog();
+    void ExecuteXMLSourceDialog();
     void ExecuteSubtotals(SfxRequest& rReq);
 
     DECL_LINK( ClipboardChanged, TransferableDataHelper* );
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 6cfd3f8..1c26ff7 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2393,6 +2393,11 @@ void ScCellShell::ExecuteDataPilotDialog()
     }
 }
 
+void ScCellShell::ExecuteXMLSourceDialog()
+{
+    fprintf(stdout, "ScCellShell::ExecuteXMLSourceDialog:   launch xml dialog\n");
+}
+
 void ScCellShell::ExecuteSubtotals(SfxRequest& rReq)
 {
     ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index d05e385..aecb65c 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -746,7 +746,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
             break;
 
         case SID_MANAGE_XML_SOURCE:
-            fprintf(stdout, "ScCellShell::ExecuteDB:   SID_MANAGE_XML_SOURCE\n");
+            ExecuteXMLSourceDialog();
         break;
         case FID_VALIDATION:
             {
commit b1f8a1ba5a8410948201b2ef47d7cbf9e84feb68
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Sep 26 16:11:52 2012 -0400

    Add new slot ID for 'Manage XML Source' menu entry.
    
    Plus unwind the mess of slot ID collision between sc and svx.
    
    Change-Id: Iad236e50f58160d85c997d6f8f6dfce405fd82bb

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 7418498..0d636ad 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1204,6 +1204,11 @@
                     <value xml:lang="en-US">Select ~Range...</value>
                 </prop>
             </node>
+            <node oor:name=".uno:ManageXMLSource" oor:op="replace">
+                <prop oor:name="Label" oor:type="xs:string">
+                    <value xml:lang="en-US">Manage ~XML Source...</value>
+                </prop>
+            </node>
             <node oor:name=".uno:DataSort" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
                     <value xml:lang="en-US">~Sort...</value>
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index efec7ab..63d558b 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -363,6 +363,7 @@
 #define SID_AUTO_FILTER         (DATA_MENU_START + 5)
 #define SID_UNFILTER            (DATA_MENU_START + 6)
 #define SID_QUERY               (DATA_MENU_START + 7)
+#define SID_MANAGE_XML_SOURCE   (DATA_MENU_START + 8)
 #define SID_SUBTOTALS           (DATA_MENU_START + 13)
 #define SID_AUTO_OUTLINE        (DATA_MENU_START + 14)
 #define SID_IMPORT_DATA         (DATA_MENU_START + 15)
diff --git a/sc/inc/sccommands.h b/sc/inc/sccommands.h
index 1350c0c..783f757 100644
--- a/sc/inc/sccommands.h
+++ b/sc/inc/sccommands.h
@@ -101,6 +101,7 @@
 #define CMD_FID_TAB_EVENTS                          ".uno:TableEvents"
 #define CMD_FID_TAB_MENU_SET_TAB_BG_COLOR           ".uno:SetTabBgColor"
 #define CMD_FID_TAB_SET_TAB_BG_COLOR                ".uno:TabBgColor"
+#define CMD_SID_MANAGE_XML_SOURCE                   ".uno:ManageXMLSource"
 
 #endif
 
diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
index 1086fd5..e4781b8 100644
--- a/sc/sdi/cellsh.sdi
+++ b/sc/sdi/cellsh.sdi
@@ -60,6 +60,7 @@ interface CellSelection
     SID_REFRESH_DBAREA      [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
     SID_SBA_BRW_INSERT      [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
     SID_SELECT_DB           [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
+    SID_MANAGE_XML_SOURCE   [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
     SID_SORT                [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
     SID_DATA_FORM           [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
     FID_FILTER_OK           [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 8e0cf31..b75f7ff 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -5811,7 +5811,30 @@ SfxVoidItem SelectDB SID_SELECT_DB
     GroupId = GID_DATA;
 ]
 
-//--------------------------------------------------------------------------
+SfxVoidItem ManageXMLSource SID_MANAGE_XML_SOURCE
+(SfxStringItem DbName SID_MANAGE_XML_SOURCE)
+[
+    /* flags: */
+    AutoUpdate = FALSE,
+    Cachable = Cachable,
+    FastCall = FALSE,
+    HasCoreId = FALSE,
+    HasDialog = TRUE,
+    ReadOnlyDoc = TRUE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+    Synchron;
+
+    /* config: */
+    AccelConfig = TRUE,
+    MenuConfig = TRUE,
+    StatusBarConfig = FALSE,
+    ToolBoxConfig = FALSE,
+    GroupId = GID_DATA;
+]
+
 SfxObjectItem SelectedObject SID_SC_ACTIVEOBJECT
 
 [
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 3f120ad..d05e385 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -745,6 +745,9 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
             }
             break;
 
+        case SID_MANAGE_XML_SOURCE:
+            fprintf(stdout, "ScCellShell::ExecuteDB:   SID_MANAGE_XML_SOURCE\n");
+        break;
         case FID_VALIDATION:
             {
                 const SfxPoolItem* pItem;
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index 621586e..c89c6a3 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -418,6 +418,8 @@
             <menu:menuitem menu:id=".uno:DefineDBName"/>
             <menu:menuitem menu:id=".uno:SelectDB"/>
             <menu:menuseparator/>
+            <menu:menuitem menu:id=".uno:ManageXMLSource"/>
+            <menu:menuseparator/>
             <menu:menuitem menu:id=".uno:DataSort"/>
             <menu:menu menu:id=".uno:FilterMenu">
                 <menu:menupopup>
commit d5b42aa92a289b94de364fe6ca3479f580b4f3c9
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Sep 26 13:02:20 2012 -0400

    Switch to orcus-0.3.0 (work-in-progress version from master).
    
    Change-Id: I786face760685a243e6b78f71094a8733256aa46

diff --git a/configure.in b/configure.in
index f2eb784..175b5c0 100644
--- a/configure.in
+++ b/configure.in
@@ -8902,7 +8902,7 @@ AC_MSG_CHECKING([which orcus library to use])
 if test "$with_system_orcus" = "yes"; then
     AC_MSG_RESULT([external])
     SYSTEM_LIBORCUS=YES
-    PKG_CHECK_MODULES(ORCUS, liborcus-0.2 >= 0.1.0)
+    PKG_CHECK_MODULES(ORCUS, liborcus-0.4 >= 0.3.0)
 else
     AC_MSG_RESULT([internal])
     ORCUS_TARBALL=46d9f4cf8b145c21ce1056e116d2ce71-liborcus_0.1.0.tar.bz2
commit a551cad4e35b6b664167d65dfc25e5a0f6990687
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Oct 12 11:07:13 2012 -0400

    Always disable anti-aliasing for drawing cell borders.
    
    It looks better that way & that's the way it was before.
    
    Change-Id: Iedb5234f4b032d4362f91f811bb9131824267704

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 1922a08..24b4fca 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -33,6 +33,7 @@
 #include <editeng/brshitem.hxx>
 #include <editeng/editdata.hxx>
 #include <svtools/colorcfg.hxx>
+#include "svtools/optionsdrawinglayer.hxx"
 #include <svx/rotmodit.hxx>
 #include <editeng/shaditem.hxx>
 #include <editeng/svxfont.hxx>
@@ -1237,10 +1238,7 @@ void ScOutputData::DrawClear()
     }
 }
 
-
-//
-//  Linien
-//
+namespace {
 
 long lclGetSnappedX( OutputDevice& rDev, long nPosX, bool bSnapPixel )
 {
@@ -1257,8 +1255,32 @@ size_t lclGetArrayColFromCellInfoX( sal_uInt16 nCellInfoX, sal_uInt16 nCellInfoF
     return static_cast< size_t >( bRTL ? (nCellInfoLastX + 2 - nCellInfoX) : (nCellInfoX - nCellInfoFirstX) );
 }
 
+/**
+ * Temporarily turn off antialiasing.
+ */
+class AntiAliasingSwitch
+{
+    SvtOptionsDrawinglayer maDrawOpt;
+    bool mbOldSetting;
+public:
+    AntiAliasingSwitch(bool bOn) : mbOldSetting(maDrawOpt.IsAntiAliasing())
+    {
+        maDrawOpt.SetAntiAliasing(bOn);
+    }
+
+    ~AntiAliasingSwitch()
+    {
+        maDrawOpt.SetAntiAliasing(mbOldSetting);
+    }
+};
+
+}
+
 void ScOutputData::DrawFrame()
 {
+    // No anti-aliasing for drawing cell borders.
+    AntiAliasingSwitch aAASwitch(false);
+
     sal_uLong nOldDrawMode = mpDev->GetDrawMode();
 
     Color aSingleColor;
commit e02ff224b64671db33543a1be2b48c0fa5caf786
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Fri Oct 12 17:04:31 2012 +0200

    fix file permissions
    
    Change-Id: If923db4ff67f72158fcdf7c002eda38c9cdeb786

diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
old mode 100755
new mode 100644
commit 21d10c6f3266d4fac9c91f9d0fab529a6841b39e
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Fri Oct 12 16:49:40 2012 +0200

    mark lcl_ functions static or rename them if they are not local at all
    
    http://lists.freedesktop.org/archives/libreoffice/2012-October/039639.html
    
    Change-Id: I21e12d6a4dfb9697d2346a4e564e96af0ad03f96

diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx
index 247717e..0aad748 100644
--- a/sw/inc/anchoredobject.hxx
+++ b/sw/inc/anchoredobject.hxx
@@ -175,9 +175,9 @@ class SW_DLLPUBLIC SwAnchoredObject
         void _CheckTopOfLine( const SwFmtAnchor& _rAnch,
                               const SwTxtFrm& _rAnchorCharFrm );
 
-        // method <lcl_HideObj(..)> sets needed data structure values for the
+        // method <sw_HideObj(..)> sets needed data structure values for the
         // object positioning
-        friend bool lcl_HideObj( const SwTxtFrm& _rFrm,
+        friend bool sw_HideObj( const SwTxtFrm& _rFrm,
                                  const RndStdIds _eAnchorType,
                                  const xub_StrLen _nObjAnchorPos,
                                  SwAnchoredObject* _pAnchoredObj );
diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx
index a47bbaf..dc8c5db 100644
--- a/sw/inc/index.hxx
+++ b/sw/inc/index.hxx
@@ -121,7 +121,7 @@ public:
 class SwIndexReg
 {
     friend class SwIndex;
-    friend bool lcl_PosOk(const SwPosition & aPos);
+    friend bool sw_PosOk(const SwPosition & aPos);
 
     const SwIndex * m_pFirst;
     const SwIndex * m_pLast;
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index 18a0029..f81830e 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -87,10 +87,10 @@ class SwXCell : public SwXCellBaseClass,
     public SwXText,
     public SwClient
 {
-    friend void   lcl_setString( SwXCell &rCell, const rtl::OUString &rTxt,
+    friend void   sw_setString( SwXCell &rCell, const rtl::OUString &rTxt,
                                  sal_Bool bKeepNumberFmt = sal_False );
-    friend double lcl_getValue( SwXCell &rCell );
-    friend void   lcl_setValue( SwXCell &rCell, double nVal );
+    friend double sw_getValue( SwXCell &rCell );
+    friend void   sw_setValue( SwXCell &rCell, double nVal );
 
 
     const SfxItemPropertySet*   m_pPropSet;
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 0ae229a..e9a14bb 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -917,7 +917,7 @@ void SAL_CALL SwAccessibleParagraph::grabFocus()
 }
 
 // #i71385#
-bool lcl_GetBackgroundColor( Color & rColor,
+static bool lcl_GetBackgroundColor( Color & rColor,
                              const SwFrm* pFrm,
                              SwCrsrShell* pCrsrSh )
 {
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 8de93ef..450d290 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -229,7 +229,7 @@ inline LanguageType GetDocAppScriptLang( SwDoc& rDoc )
             )).GetLanguage();
 }
 
-double lcl_ConvertToDateValue( SwDoc& rDoc, sal_Int32 nDate )
+static double lcl_ConvertToDateValue( SwDoc& rDoc, sal_Int32 nDate )
 {
     double nRet = 0;
     SvNumberFormatter* pFormatter = rDoc.GetNumberFormatter();
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 29ae8cb..e1a749c 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -85,7 +85,7 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh )
     }
 }
 
-void lcl_notifyRow(const SwCntntNode* pNode, SwCrsrShell& rShell)
+static void lcl_notifyRow(const SwCntntNode* pNode, SwCrsrShell& rShell)
 {
     if ( pNode != NULL )
     {
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 8dfc238..2e4b709 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -607,7 +607,7 @@ sal_Bool SwCrsrShell::MoveSection( SwWhichSection fnWhichSect,
 // position cursor
 
 
-SwFrm* lcl_IsInHeaderFooter( const SwNodeIndex& rIdx, Point& rPt )
+static SwFrm* lcl_IsInHeaderFooter( const SwNodeIndex& rIdx, Point& rPt )
 {
     SwFrm* pFrm = 0;
     SwCntntNode* pCNd = rIdx.GetNode().GetCntntNode();
@@ -3113,7 +3113,7 @@ void SwCrsrShell::SetSelection( const SwPaM& rCrsr )
     EndAction();
 }
 

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list