[Libreoffice-commits] .: Branch 'feature/calc-xml-source' - 2 commits - sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 13 12:18:34 PST 2012
sc/source/ui/app/scmod.cxx | 5 +++++
sc/source/ui/xmlsource/xmlsourcedlg.cxx | 12 ++++++++++++
2 files changed, 17 insertions(+)
New commits:
commit 008cc14af68bc38dcf484ceff86d081ea283a4a0
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Tue Nov 13 15:15:53 2012 -0500
Broadcast and re-paint when the XML import is complete.
Change-Id: I8bf7a3331a24d39ce327264cd43ccb5910ce1251
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 5f3a6e1..f9c2c13 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();
}
commit d7f043d843b62e27604b5b8928cebcdf500044b9
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Tue Nov 13 14:14:30 2012 -0500
fdo#56776: Change in formula options should cause repaint.
Else Calc would fail to update the column headers due to A1 to R1C1
change (and vise versa).
Change-Id: I2c403212f5bc539aea92370e60da96f480549d6d
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 3a9ff2f..2dd1158 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1068,6 +1068,11 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
if (rOptSet.HasItem(SID_SCFORMULAOPTIONS, &pItem))
{
const ScFormulaOptions& rOpt = ((const ScTpFormulaItem*)pItem)->GetFormulaOptions();
+
+ if (!pFormulaCfg || (*pFormulaCfg != rOpt))
+ // Formula options have changed. Repaint the column headers.
+ bRepaint = true;
+
SetFormulaOptions( rOpt );
if ( pDocSh )
More information about the Libreoffice-commits
mailing list