ooo-build r14182 - branches/ooo-build-3-0/patches/dev300



Author: kyoshida
Date: Wed Oct  1 18:52:18 2008
New Revision: 14182
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14182&view=rev

Log:
2008-10-01  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/calc-dp-no-drilldown-when-readonly.diff: don't insert
	drill-down sheet when the document is in read-only mode (i#90402).

	* patches/dev300/apply: apply the new patch.


Added:
   branches/ooo-build-3-0/patches/dev300/calc-dp-no-drilldown-when-readonly.diff
Modified:
   branches/ooo-build-3-0/patches/dev300/apply

Modified: branches/ooo-build-3-0/patches/dev300/apply
==============================================================================
--- branches/ooo-build-3-0/patches/dev300/apply	(original)
+++ branches/ooo-build-3-0/patches/dev300/apply	Wed Oct  1 18:52:18 2008
@@ -776,6 +776,9 @@
 # show COUNT and COUNTA results even if current range contains an error.
 calc-status-bar-func.diff, n#430655, kohei
 
+# Don't insert drill-down sheet in read-only mode.
+calc-dp-no-drilldown-when-readonly.diff, i#90402, kohei
+
 [ CalcFixes < ooo300-m3 ]
 # Fix a regression on filtering by page field.
 calc-fix-datapilot-date-filter.diff, i#90022, kohei

Added: branches/ooo-build-3-0/patches/dev300/calc-dp-no-drilldown-when-readonly.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-3-0/patches/dev300/calc-dp-no-drilldown-when-readonly.diff	Wed Oct  1 18:52:18 2008
@@ -0,0 +1,26 @@
+diff --git sc/source/ui/view/dbfunc3.cxx sc/source/ui/view/dbfunc3.cxx
+index 514d512..cc98745 100644
+--- sc/source/ui/view/dbfunc3.cxx
++++ sc/source/ui/view/dbfunc3.cxx
+@@ -1735,6 +1735,13 @@ void ScDBFunc::SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName
+ 
+ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet::DataPilotFieldFilter>& rFilters )
+ {
++    ScDocument* pDoc = GetViewData()->GetDocument();
++    if (pDoc->GetDocumentShell()->IsReadOnly())
++    {
++        ErrorMessage(STR_READONLYERR);
++        return;
++    }
++
+     Reference<sheet::XDimensionsSupplier> xDimSupplier = rDPObj.GetSource();
+     Reference<container::XNameAccess> xDims = xDimSupplier->getDimensions();
+     Reference<sheet::XDrillDownDataSupplier> xDDSupplier(xDimSupplier, UNO_QUERY);
+@@ -1749,7 +1756,6 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
+ 
+     sal_Int32 nColSize = aTabData[0].getLength();
+ 
+-    ScDocument* pDoc = GetViewData()->GetDocument();
+     SCTAB nNewTab = GetViewData()->GetTabNo();
+ 
+     auto_ptr<ScDocument> pInsDoc(new ScDocument(SCDOCMODE_CLIP));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]