summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-11-26 15:19:48 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-11-26 15:19:48 +0000
commita32d78a5175178eba6d6c93f2441b4698bf05974 (patch)
treee359a0f4af75e1a5840b8abbcc9c88eccc291586
parent360a19c7a96ce7dc7069fcdcb61b5d669370871f (diff)
CWS-TOOLING: integrate CWS rtlchart01
-rw-r--r--sw/inc/unochart.hxx10
-rw-r--r--sw/source/core/unocore/unochart.cxx42
-rw-r--r--sw/source/ui/app/docst.cxx12
3 files changed, 61 insertions, 3 deletions
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
index 4cd03dc8f20e..a3936fbe6bb5 100644
--- a/sw/inc/unochart.hxx
+++ b/sw/inc/unochart.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: unochart.hxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.6.256.1 $
*
* This file is part of OpenOffice.org.
*
@@ -75,6 +75,14 @@ sal_Bool FillRangeDescriptor( SwRangeDescriptor &rDesc, const String &rCellRange
//////////////////////////////////////////////////////////////////////
+class SwChartHelper
+{
+public:
+ static void DoUpdateAllCharts( SwDoc* pDoc );
+};
+
+//////////////////////////////////////////////////////////////////////
+
class SwChartLockController_Helper
{
SwDoc *pDoc;
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index c72c396bb50f..4d2306af6f7d 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: unochart.cxx,v $
- * $Revision: 1.18 $
+ * $Revision: 1.18.36.1 $
*
* This file is part of OpenOffice.org.
*
@@ -46,6 +46,7 @@
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <svtools/zforlist.hxx> // SvNumberFormatter
+#include <svtools/chartprettypainter.hxx>
#include <tools/link.hxx>
@@ -95,6 +96,45 @@ extern void lcl_NormalizeRange( String &rCell1, String &rCell2 );
//////////////////////////////////////////////////////////////////////
+//static
+void SwChartHelper::DoUpdateAllCharts( SwDoc* pDoc )
+{
+ if (!pDoc)
+ return;
+
+ uno::Reference< frame::XModel > xRes;
+
+ SwOLENode *pONd;
+ SwStartNode *pStNd;
+ SwNodeIndex aIdx( *pDoc->GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
+ while( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
+ {
+ aIdx++;
+ if (0 != ( pONd = aIdx.GetNode().GetOLENode() ) &&
+ ChartPrettyPainter::IsChart( pONd->GetOLEObj().GetObject() ) )
+ {
+ // Load the object and set modified
+
+ uno::Reference < embed::XEmbeddedObject > xIP = pONd->GetOLEObj().GetOleRef();
+ if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
+ {
+ try
+ {
+ uno::Reference< util::XModifiable > xModif( xIP->getComponent(), uno::UNO_QUERY_THROW );
+ xModif->setModified( sal_True );
+ }
+ catch ( uno::Exception& )
+ {
+ }
+
+ }
+ }
+ aIdx.Assign( *pStNd->EndOfSectionNode(), + 1 );
+ }
+}
+
+//////////////////////////////////////////////////////////////////////
+
SwChartLockController_Helper::SwChartLockController_Helper( SwDoc *pDocument ) :
pDoc( pDocument )
{
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 91fe4ade3a95..692e054edd54 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: docst.cxx,v $
- * $Revision: 1.36 $
+ * $Revision: 1.36.136.1 $
*
* This file is part of OpenOffice.org.
*
@@ -45,6 +45,8 @@
#include <svtools/macitem.hxx>
#include <svx/brshitem.hxx>
#include <svtools/stritem.hxx>
+#include <svtools/languageoptions.hxx>
+#include <svx/eeitem.hxx>
#include <svx/htmlmode.hxx>
#include <swmodule.hxx>
#include <wdocsh.hxx>
@@ -74,6 +76,7 @@
#include "frmmgr.hxx" //SwFrmValid
#include "swevent.hxx"
#include "edtwin.hxx"
+#include "unochart.hxx"
#include "app.hrc"
#include <fmtui.hrc>
@@ -712,6 +715,13 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
aTmpSet.ClearItem( RES_BACKGROUND );
}
xTmp->SetItemSet( aTmpSet );
+
+ if( SFX_STYLE_FAMILY_PAGE == nFamily && SvtLanguageOptions().IsCTLFontEnabled() )
+ {
+ const SfxPoolItem *pItem = NULL;
+ if( aTmpSet.GetItemState( GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, FALSE ) , TRUE, &pItem ) == SFX_ITEM_SET )
+ SwChartHelper::DoUpdateAllCharts( pDoc );
+ }
}
if(SFX_STYLE_FAMILY_PAGE == nFamily)
pView->InvalidateRulerPos();