summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-11-13 15:15:53 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-11-28 13:28:29 -0500
commit7a3bfca5862619260f8050e45085a7a74e1054ae (patch)
treebe9c910130428775280c8e40c141abbe9b013ca1 /sc
parent78ac5e853302566b191dd902ef75c1e16c48ccf1 (diff)
Broadcast and re-paint when the XML import is complete.
Change-Id: I8bf7a3331a24d39ce327264cd43ccb5910ce1251
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 5f3a6e14f5a1..f9c2c13aa24f 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -15,10 +15,12 @@
#include "orcusfilters.hxx"
#include "filter.hxx"
#include "reffact.hxx"
+#include "tabvwsh.hxx"
#include "unotools/pathoptions.hxx"
#include "tools/urlobj.hxx"
#include "svtools/svlbitm.hxx"
+#include "sfx2/objsh.hxx"
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
@@ -485,12 +487,22 @@ void ScXMLSourceDlg::OkPressed()
}
}
+ // Now do the import.
ScOrcusFilters* pOrcus = ScFormatFilter::Get().GetOrcusFilters();
if (!pOrcus)
return;
pOrcus->importXML(*mpDoc, maSrcPath, aParam);
+ // Don't forget to broadcast the change.
+ SfxObjectShell* pShell = mpDoc->GetDocumentShell();
+ pShell->Broadcast(SfxSimpleHint(FID_DATACHANGED));
+
+ // Repaint the grid to force repaint the cell values.
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
+ if (pViewShell)
+ pViewShell->PaintGrid();
+
Close();
}