ooo-build r13542 - in trunk: . patches/dev300



Author: kyoshida
Date: Wed Aug 13 14:53:10 2008
New Revision: 13542
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13542&view=rev

Log:
2008-08-13  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/calc-datapilot-cells-not-empty.diff: use SfxBoolItem
	instead of defining a new ScBoolItem (i#92378).


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/calc-datapilot-cells-not-empty.diff

Modified: trunk/patches/dev300/calc-datapilot-cells-not-empty.diff
==============================================================================
--- trunk/patches/dev300/calc-datapilot-cells-not-empty.diff	(original)
+++ trunk/patches/dev300/calc-datapilot-cells-not-empty.diff	Wed Aug 13 14:53:10 2008
@@ -1,47 +1,5 @@
-diff --git sc/source/ui/app/uiitems.cxx sc/source/ui/app/uiitems.cxx
-index d7453a2..39c3744 100644
---- sc/source/ui/app/uiitems.cxx
-+++ sc/source/ui/app/uiitems.cxx
-@@ -744,3 +744,37 @@ SfxPoolItem* __EXPORT ScCondFrmtItem::Clone( SfxItemPool * ) const
- {
- 	return new ScCondFrmtItem( *this );
- }
-+
-+//------------------------------------------------------------------------
-+
-+ScBoolItem::ScBoolItem(USHORT nWhich, bool bValue) :
-+    SfxPoolItem(nWhich), mbValue(bValue)
-+{
-+}
-+
-+ScBoolItem::ScBoolItem(const ScBoolItem& r) :
-+    SfxPoolItem(r), mbValue(r.mbValue)
-+{
-+}
-+
-+ScBoolItem::~ScBoolItem()
-+{
-+}
-+
-+int ScBoolItem::operator ==(const SfxPoolItem& rItem) const
-+{
-+    DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
-+    const ScBoolItem& rBItem = static_cast<const ScBoolItem&>(rItem);
-+    return mbValue == rBItem.mbValue;
-+}
-+
-+bool ScBoolItem::GetBoolValue() const
-+{
-+    return mbValue;
-+}
-+
-+SfxPoolItem* ScBoolItem::Clone(SfxItemPool*) const
-+{
-+    return new ScBoolItem(*this);
-+}
-+
 diff --git sc/source/ui/dbgui/pvlaydlg.cxx sc/source/ui/dbgui/pvlaydlg.cxx
-index 0ba15ab..202d33f 100644
+index 0ba15ab..0c0bdd5 100644
 --- sc/source/ui/dbgui/pvlaydlg.cxx
 +++ sc/source/ui/dbgui/pvlaydlg.cxx
 @@ -1562,10 +1562,25 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButton *, EMPTYARG )
@@ -56,9 +14,9 @@
 +            bool bSuccess = true;
 +            if (pRet)
 +            {
-+                const ScBoolItem* pItem = dynamic_cast<const ScBoolItem*>(pRet);
++                const SfxBoolItem* pItem = dynamic_cast<const SfxBoolItem*>(pRet);
 +                if (pItem)
-+                    bSuccess = pItem->GetBoolValue();
++                    bSuccess = pItem->GetValue();
 +            }
 +            if (bSuccess)
 +                // Table successfully inserted.
@@ -87,36 +45,8 @@
  	void			DeletePivotTable();
  	void			RecalcPivotTable();
          void                    AutoFormatPivotTable(USHORT nIndex);
-diff --git sc/source/ui/inc/uiitems.hxx sc/source/ui/inc/uiitems.hxx
-index 274ba00..ca19927 100644
---- sc/source/ui/inc/uiitems.hxx
-+++ sc/source/ui/inc/uiitems.hxx
-@@ -371,6 +371,23 @@ private:
- 	ScConditionalFormat	theCondFrmtData;
- };
- 
-+class ScBoolItem : public SfxPoolItem
-+{
-+public:
-+    explicit ScBoolItem(USHORT nWhich, bool bValue);
-+    explicit ScBoolItem(const ScBoolItem& r);
-+    virtual ~ScBoolItem();
-+    virtual int operator==(const SfxPoolItem& rItem) const;
-+    virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
-+
-+    bool GetBoolValue() const;
-+
-+private:
-+    ScBoolItem();
-+
-+    bool mbValue;
-+};
-+
- 
- 
- #endif
 diff --git sc/source/ui/view/cellsh2.cxx sc/source/ui/view/cellsh2.cxx
-index 7b82845..8974b0c 100644
+index 7b82845..fdee73c 100644
 --- sc/source/ui/view/cellsh2.cxx
 +++ sc/source/ui/view/cellsh2.cxx
 @@ -643,11 +643,10 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
@@ -130,7 +60,7 @@
 -											*pDPObject );
 +                        bool bSuccess = pTabViewShell->MakePivotTable(
 +                            pPItem->GetData(), pPItem->GetDestRange(), pPItem->IsNewSheet(), *pDPObject );
-+                        ScBoolItem aRet(0, bSuccess);
++                        SfxBoolItem aRet(0, bSuccess);
 +                        rReq.SetReturnValue(aRet);
  					}
  					rReq.Done();



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