diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-09-28 11:07:45 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-09-28 11:07:45 -0400 |
commit | f2ab6ab8380f520ede5a46bfe5cf014dad97f05a (patch) | |
tree | 3c08cd965011f5dbe87d15112bdba7ffb3bbd7d8 /sc | |
parent | 232deabc45e2c24c8f91296d8f5afbda4f0c5289 (diff) |
Remove datapilot autoformat feature.
This reverts commit 1cd57db36c14e98190311ceed238c01f2dd60eea.
The current datapilot autoformat feature was done by "duct-taping"
two separate features together which don't mix well and cause stability
issues. This feature needs to be re-implemented the right way in the
future.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/sc.hrc | 9 | ||||
-rw-r--r-- | sc/sdi/pivotsh.sdi | 1 | ||||
-rw-r--r-- | sc/sdi/scalc.sdi | 24 | ||||
-rw-r--r-- | sc/source/ui/docshell/dbdocfun.cxx | 30 | ||||
-rw-r--r-- | sc/source/ui/inc/dbfunc.hxx | 8 | ||||
-rw-r--r-- | sc/source/ui/inc/viewdata.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/makefile.mk | 2 | ||||
-rw-r--r-- | sc/source/ui/src/popup.src | 78 | ||||
-rwxr-xr-x | sc/source/ui/view/dbfunc3.cxx | 26 | ||||
-rw-r--r-- | sc/source/ui/view/pivotsh.cxx | 44 | ||||
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 16 |
11 files changed, 7 insertions, 235 deletions
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index d7cb3513713a..4d4c94d32d04 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -1662,15 +1662,12 @@ #define SC_OOO_BUILD_START (SC_DIALOGS_END) -// Autoformat for DataPilot -#define SID_PIVOT_AFMT (SC_OOO_BUILD_START + 1) - // Toggle sheet grid -#define FID_TAB_TOGGLE_GRID (SC_OOO_BUILD_START + 2) +#define FID_TAB_TOGGLE_GRID (SC_OOO_BUILD_START + 1) // Formula options page -#define RID_SCPAGE_FORMULA (SC_OOO_BUILD_START + 3) -#define HID_SCPAGE_FORMULA (SC_OOO_BUILD_START + 4) +#define RID_SCPAGE_FORMULA (SC_OOO_BUILD_START + 2) +#define HID_SCPAGE_FORMULA (SC_OOO_BUILD_START + 3) #endif diff --git a/sc/sdi/pivotsh.sdi b/sc/sdi/pivotsh.sdi index 51ff6c7d7af6..d763aa8c995a 100644 --- a/sc/sdi/pivotsh.sdi +++ b/sc/sdi/pivotsh.sdi @@ -31,7 +31,6 @@ interface Pivot SID_PIVOT_RECALC [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] SID_PIVOT_KILL [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] SID_DP_FILTER [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] - SID_PIVOT_AFMT [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ] } shell ScPivotShell diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index 3f28012166f6..e72b3e33ddf7 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -1872,30 +1872,6 @@ SfxVoidItem DeletePivotTable SID_PIVOT_KILL GroupId = GID_DATA; ] -SfxVoidItem AutoFormatPivotTable SID_PIVOT_AFMT -() -[ - /* flags: */ - AutoUpdate = FALSE, - Cachable = Cachable, - FastCall = FALSE, - HasCoreId = FALSE, - HasDialog = FALSE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - Synchron; - - /* config: */ - AccelConfig = FALSE, - MenuConfig = TRUE, - StatusBarConfig = FALSE, - ToolBoxConfig = FALSE, - GroupId = GID_DATA; -] - //-------------------------------------------------------------------------- SfxVoidItem DeletePrintArea SID_DELETE_PRINTAREA () diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 66c9a4db58ea..cf149d258062 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -1413,36 +1413,6 @@ BOOL ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb delete pNewUndoDoc; delete pUndoDPObj; - if (pNewObj && pNewObj->GetAutoFormatIndex() != 65535) - { - ScViewData* pViewData = rDocShell.GetViewData(); - ScTabViewShell* pViewShell = pViewData->GetViewShell(); - pViewShell->GetDBData( TRUE, SC_DB_OLD ); - const ScMarkData& rMark1 = pViewData->GetMarkData(); - SCCOL nStartCol; - SCROW nStartRow; - SCTAB nStartTab; - SCCOL nEndCol; - SCROW nEndRow; - SCTAB nEndTab; - - rDocShell.GetViewData()->GetSimpleArea( nStartCol,nStartRow,nStartTab,nEndCol,nEndRow,nEndTab ); - ScRange Outrange = pNewObj->GetOutRange(); - if (( (Outrange.aStart.Col() <= nStartCol) && (nStartCol <= Outrange.aEnd.Col() )&& (nStartTab == Outrange.aStart.Tab())) - && ( (Outrange.aStart.Row() <= nStartRow) && (nStartRow <= Outrange.aEnd.Row() )) ) - { - - if ( !rMark1.IsMarked() && !rMark1.IsMultiMarked() ) - pViewShell->MarkDataArea( TRUE ); - //FIXME: Autoformat even when clicked from a non-dp cell. - pViewData->MoveNextRow(); - sal_uInt16 nAutoFmtIndex = pNewObj->GetAutoFormatIndex(); - pViewShell->AutoFormat(nAutoFmtIndex); - pViewShell->AutoFormatPivotTable(const_cast<ScDPObject*>(pNewObj), nAutoFmtIndex); - pViewData->MovePrevRow(); - } - } - if (bDone) { // notify API objects diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx index 566fa7a1eb27..6a178b62aa6b 100644 --- a/sc/source/ui/inc/dbfunc.hxx +++ b/sc/source/ui/inc/dbfunc.hxx @@ -86,10 +86,10 @@ public: bool MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, BOOL bNewTable, const ScDPObject& rSource, BOOL bApi = FALSE ); void DeletePivotTable(); - ULONG RecalcPivotTable(); - void AutoFormatPivotTable(USHORT nIndex); - void AutoFormatPivotTable(ScDPObject* pDPObj, USHORT nIndex); - + // Wang Xu Ming -- 2009-6-17 + // DataPilot Migration + ULONG RecalcPivotTable(); + // End Comments BOOL HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts ); BOOL HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo ); void GroupDataPilot(); diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 52923d1d240c..5d1a60a214c6 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -337,10 +337,6 @@ public: ScMarkType GetSimpleArea( SCCOL& rStartCol, SCROW& rStartRow, SCTAB& rStartTab, SCCOL& rEndCol, SCROW& rEndRow, SCTAB& rEndTab ) const; ScMarkType GetSimpleArea( ScRange& rRange ) const; - - void MoveNextRow(); - void MovePrevRow(); - /// May modify rNewMark using MarkToSimple(). ScMarkType GetSimpleArea( ScRange & rRange, ScMarkData & rNewMark ) const; void GetMultiArea( ScRangeListRef& rRange ) const; diff --git a/sc/source/ui/miscdlgs/makefile.mk b/sc/source/ui/miscdlgs/makefile.mk index 8c561010432e..d34994341ade 100644 --- a/sc/source/ui/miscdlgs/makefile.mk +++ b/sc/source/ui/miscdlgs/makefile.mk @@ -118,8 +118,6 @@ LIB1OBJFILES = \ $(SLO)$/warnbox.obj \ $(SLO)$/conflictsdlg.obj \ $(SLO)$/sharedocdlg.obj \ - $(SLO)$/scuiautofmt.obj \ - $(SLO)$/strindlg.obj \ $(SLO)$/protectiondlg.obj \ $(SLO)$/retypepassdlg.obj diff --git a/sc/source/ui/src/popup.src b/sc/source/ui/src/popup.src index 5ced53410d60..9753aa1590e3 100644 --- a/sc/source/ui/src/popup.src +++ b/sc/source/ui/src/popup.src @@ -225,84 +225,6 @@ Menu RID_POPUP_PIVOT }; MenuItem { - Identifier = SID_PIVOT_AFMT ; - HelpId = SID_PIVOT_AFMT ; - Text [ en-US ] = "~AutoFormat..." ; - Text [ de ] = "A~utoFormat" ; - Text [ af ] = "OutoFormateer..." ; - Text [ ar ] = "تنسيق تلقائي..." ; - Text [ as-IN ] = "স্বয়ংক্ৰিয় ফৰমেট ..." ; - Text [ be-BY ] = "Аўта-фармат..." ; - Text [ bg ] = "Автоформат..." ; - Text [ br ] = "EmVentrezhañ..." ; - Text [ bs ] = "AutoFormat..." ; - Text [ ca ] = "Formatació automàtica..." ; - Text [ cs ] = "Automatický formát..." ; - Text [ cy ] = "AwtoFformat..." ; - Text [ da ] = "Autoformat..." ; - Text [ el ] = "Αυτόματη μορφοποίηση..." ; - Text [ en-GB ] = "AutoFormat..." ; - Text [ en-ZA ] = "AutoFormat..." ; - Text [ eo ] = "Aŭtomate Formati..." ; - Text [ es ] = "Formateado automático..." ; - Text [ et ] = "Automaatvormindus..." ; - Text [ fa ] = "قالببندی خودکار..." ; - Text [ fi ] = "Automaattinen muotoilu..." ; - Text [ fr ] = "AutoFormat..." ; - Text [ ga ] = "UathFhormáidigh..." ; - Text [ gu ] = "આપોઆપબંધારણ..." ; - Text [ gu-IN ] = "આપોઆપબંધારણ..." ; - Text [ hi-IN ] = "स्वचालित ढंग से रचना..." ; - Text [ hr ] = "SamoOblikovanje..." ; - Text [ hu ] = "Automatikus formázás..." ; - Text [ it ] = "Formattazione automatica..." ; - Text [ ja ] = "オートフォーマット..." ; - Text [ ka ] = "ავტო-ფორმატირება..." ; - Text [ km ] = "ទ្រង់ទ្រាយស្វ័យប្រវត្តិ..." ; - Text [ ko ] = "자동 서식..." ; - Text [ ku ] = "TeşekirinaBixweber..." ; - Text [ lt ] = "Automatinis formatavimas..." ; - Text [ mk ] = "Автоматско форматирање..." ; - Text [ ml-IN ] = "സ്വയം രൂപപ്പെടുത്തുക..." ; - Text [ mr-IN ] = "स्वंयचलित रचना..." ; - Text [ nb ] = "Autoformatering..." ; - Text [ nl ] = "AutoOpmaak..." ; - Text [ nn ] = "Autoformatering..." ; - Text [ nr ] = "Fometha ngokuzenzakalela..." ; - Text [ ns ] = "Fomate ye e Itiragalelago..." ; - Text [ or-IN ] = "ସ୍ବଯଂଚାଳିତଫର୍ମାଟ..." ; - Text [ pa-IN ] = "ਸਵੈ-ਫਾਰਮਿਟ..." ; - Text [ pl ] = "Autoformatowanie..." ; - Text [ pt ] = "Formatação automática..." ; - Text [ pt-BR ] = "AutoFormatar..." ; - Text [ ru ] = "Автоформат..." ; - Text [ rw ] = "Nyamwihamiterere..." ; - Text [ sh-YU ] = "Automatsko formatiranje..." ; - Text [ sk ] = "Automatický formát..." ; - Text [ sl ] = "Samooblikovanje..." ; - Text [ sr-CS ] = "Аутоматско форматирање..." ; - Text [ ss ] = "Kutifomethekela..." ; - Text [ st ] = "Fomate e iketsahallang..." ; - Text [ sv ] = "Autoformat..." ; - Text [ sw-TZ ] = "AutoFormat..." ; - Text [ ta ] = "தானியக்க வடிவம்..." ; - Text [ ta-IN ] = "தானியக்க வடிவம்..." ; - Text [ te-IN ] = "స్వయంరూపలావణ్యం..." ; - Text [ tg ] = "Автоформат..." ; - Text [ th ] = "AutoFormat..." ; - Text [ tr ] = "Otomatik Biçimlendirme..." ; - Text [ ts ] = "Fomati yo tiendlekela hi yoxe..." ; - Text [ uk ] = "Автоформат..." ; - Text [ ur-IN ] = "خودکارطریقہ..." ; - Text [ ve ] = "OthoFomathi..." ; - Text [ vi ] = "Tự định dạng..." ; - Text [ xh ] = "Ulungiselelo Oluzenzekelayo..." ; - Text [ zh-CN ] = "自动格式..." ; - Text [ zh-TW ] = "自動格式..." ; - Text [ zu ] = "Isakhiwo esizenzekelayo..." ; - }; - MenuItem - { Identifier = SID_PIVOT_RECALC ; HelpId = SID_PIVOT_RECALC ; Text [ en-US ] = "~Refresh" ; diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index af2beec4afae..9004c5fc486f 100755 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -2369,29 +2369,3 @@ void ScDBFunc::RepeatDB( BOOL bRecord ) else // "Keine Operationen auszufuehren" ErrorMessage(STR_MSSG_REPEATDB_0); } - -void ScDBFunc::AutoFormatPivotTable(USHORT nIndex) -{ - ScDocument* pDoc = GetViewData()->GetDocument(); - - // old pivot not used any more - - ScDPObject* pDPObj = pDoc->GetDPAtCursor( - GetViewData()->GetCurX(), GetViewData()->GetCurY(), GetViewData()->GetTabNo() ); - - if ( pDPObj ) - { - pDPObj->SetAutoFormatIndex(nIndex); - } - else - ErrorMessage(STR_PIVOT_NOTFOUND); - -} - -void ScDBFunc::AutoFormatPivotTable(ScDPObject* pDPObj, USHORT nIndex) -{ - pDPObj->SetAutoFormatIndex(nIndex); -} - - - diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx index a946b18f7855..a65f86ffed2c 100644 --- a/sc/source/ui/view/pivotsh.cxx +++ b/sc/source/ui/view/pivotsh.cxx @@ -53,12 +53,6 @@ #include "uiitems.hxx" //CHINA001 #include "pfiltdlg.hxx" #include "scabstdlg.hxx" //CHINA001 - -#include "autoform.hxx" -#include "scuiautofmt.hxx" -#include "editable.hxx" - - //------------------------------------------------------------------------ #define ScPivotShell @@ -105,45 +99,7 @@ void ScPivotShell::Execute( SfxRequest& rReq ) case SID_PIVOT_RECALC: pViewShell->RecalcPivotTable(); break; - case SID_PIVOT_AFMT: - { - ScViewData* pViewData = pViewShell->GetViewData(); - - pViewShell->GetDBData( TRUE, SC_DB_OLD ); - const ScMarkData& rMark1 = pViewData->GetMarkData(); - if ( !rMark1.IsMarked() && !rMark1.IsMultiMarked() ) - pViewShell->MarkDataArea( TRUE ); - Window* pDlgParent = pViewShell->GetDialogParent(); - - pViewData->MoveNextRow(); - - ScGlobal::ClearAutoFormat(); - ScAutoFormatData* pNewEntry = pViewShell->CreateAutoFormatData(); - ScAutoFormatDlg* pDlg = new ScAutoFormatDlg( - pDlgParent, ScGlobal::GetAutoFormat(), pNewEntry, pViewData->GetDocument() ); - - if ( pDlg->Execute() == RET_OK ) - { - ScEditableTester aTester( pViewShell ); - if ( !aTester.IsEditable() ) - { - pViewShell->ErrorMessage(aTester.GetMessageId()); - } - else - { - /* AutoFormat and Store the index */ - pViewShell->AutoFormat( pDlg->GetIndex() ); - pViewShell->AutoFormatPivotTable( pDlg->GetIndex() ); - } - } - delete pDlg; - delete pNewEntry; - - //pViewShell->DeletePivotTable(); - //pViewShell->RecalcPivotTable(); - } - break; case SID_PIVOT_KILL: pViewShell->DeletePivotTable(); break; diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 679838e8138d..408995258384 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -768,22 +768,6 @@ void ScViewData::RefreshZoom() aLogicMode.SetScaleY( GetZoomY() ); } -void ScViewData::MoveNextRow() -{ - ScRange aMarkRange; - aMarkData.GetMarkArea(aMarkRange); - aMarkRange.aStart.Set(aMarkRange.aStart.Col(), aMarkRange.aStart.Row() +1, aMarkRange.aStart.Tab()); - aMarkData.SetMarkArea(aMarkRange); -} - -void ScViewData::MovePrevRow() -{ - ScRange aMarkRange; - aMarkData.GetMarkArea(aMarkRange); - aMarkRange.aStart.Set(aMarkRange.aStart.Col(), aMarkRange.aStart.Row() -1, aMarkRange.aStart.Tab()); - aMarkData.SetMarkArea(aMarkRange); -} - void ScViewData::SetPagebreakMode( BOOL bSet ) { bPagebreak = bSet; |