You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/06/12 11:50:11 UTC
svn commit: r1492126 - in /openoffice/trunk/main/sc: inc/document.hxx
source/core/data/documen2.cxx source/ui/docshell/docsh.cxx
source/ui/unoobj/chart2uno.cxx
Author: alg
Date: Wed Jun 12 09:50:11 2013
New Revision: 1492126
URL: http://svn.apache.org/r1492126
Log:
i118840 Make it possible to identify temporary calc docs and use it to not access inexistent data
Modified:
openoffice/trunk/main/sc/inc/document.hxx
openoffice/trunk/main/sc/source/core/data/documen2.cxx
openoffice/trunk/main/sc/source/ui/docshell/docsh.cxx
openoffice/trunk/main/sc/source/ui/unoobj/chart2uno.cxx
Modified: openoffice/trunk/main/sc/inc/document.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/inc/document.hxx?rev=1492126&r1=1492125&r2=1492126&view=diff
==============================================================================
--- openoffice/trunk/main/sc/inc/document.hxx (original)
+++ openoffice/trunk/main/sc/inc/document.hxx Wed Jun 12 09:50:11 2013
@@ -435,6 +435,9 @@ private:
bool mbChangeReadOnlyEnabled; // allow changes in read-only document (for API import filters)
bool mbStreamValidLocked;
+ // #118840# Have a flag to know that this ScDocument is used temporary
+ bool mbIsTemporary : 1;
+
sal_Int16 mnNamedRangesLockCount;
public:
@@ -611,6 +614,10 @@ public:
void SetStreamValid( SCTAB nTab, sal_Bool bSet, sal_Bool bIgnoreLock = sal_False );
void LockStreamValid( bool bLock );
bool IsStreamValidLocked() const { return mbStreamValidLocked; }
+
+ // #118840# Have a flag to know that this ScDocument is used temporary
+ bool IsTemporary() const { return mbIsTemporary; }
+
SC_DLLPUBLIC sal_Bool IsPendingRowHeights( SCTAB nTab ) const;
SC_DLLPUBLIC void SetPendingRowHeights( SCTAB nTab, sal_Bool bSet );
SC_DLLPUBLIC void SetLayoutRTL( SCTAB nTab, sal_Bool bRTL );
Modified: openoffice/trunk/main/sc/source/core/data/documen2.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/core/data/documen2.cxx?rev=1492126&r1=1492125&r2=1492126&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/core/data/documen2.cxx (original)
+++ openoffice/trunk/main/sc/source/core/data/documen2.cxx Wed Jun 12 09:50:11 2013
@@ -215,6 +215,7 @@ ScDocument::ScDocument( ScDocumentMode e
mbExecuteLinkEnabled( true ),
mbChangeReadOnlyEnabled( false ),
mbStreamValidLocked( false ),
+ mbIsTemporary(false), // #118840#
mnNamedRangesLockCount( 0 )
{
SetStorageGrammar( formula::FormulaGrammar::GRAM_STORAGE_DEFAULT);
Modified: openoffice/trunk/main/sc/source/ui/docshell/docsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/ui/docshell/docsh.cxx?rev=1492126&r1=1492125&r2=1492126&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/ui/docshell/docsh.cxx (original)
+++ openoffice/trunk/main/sc/source/ui/docshell/docsh.cxx Wed Jun 12 09:50:11 2013
@@ -2589,6 +2589,13 @@ ScDocShell::ScDocShell( const sal_uInt64
bIsInplace = (GetCreateMode() == SFX_CREATE_MODE_EMBEDDED);
// wird zurueckgesetzt, wenn nicht inplace
+ // #118840# set flag at ScDocument that it is used temporary (e.g. inplace
+ // for transporting a chart over the clipboard)
+ if(bIsInplace)
+ {
+ aDocument.mbIsTemporary = true;
+ }
+
pDocFunc = new ScDocFunc(*this);
// SetBaseModel needs exception handling
Modified: openoffice/trunk/main/sc/source/ui/unoobj/chart2uno.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/ui/unoobj/chart2uno.cxx?rev=1492126&r1=1492125&r2=1492126&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/ui/unoobj/chart2uno.cxx (original)
+++ openoffice/trunk/main/sc/source/ui/unoobj/chart2uno.cxx Wed Jun 12 09:50:11 2013
@@ -2176,7 +2176,16 @@ rtl::OUString SAL_CALL ScChart2DataProvi
}
OUString aRet;
- ScRangeStringConverter::GetStringFromXMLRangeString(aRet, sXMLRange, m_pDocument);
+
+ // #118840# Only interpret range string when the ScDocument is not just used
+ // temporary (e.g. for transporting a chart over the clipboard). In that case, the local
+ // cell data would be invalid; despite the fact that a 'Sheet1' exists (just because
+ // it's the default)
+ if(!m_pDocument->IsTemporary())
+ {
+ ScRangeStringConverter::GetStringFromXMLRangeString(aRet, sXMLRange, m_pDocument);
+ }
+
return aRet;
}