diff options
Diffstat (limited to 'sw/source/ui/table')
-rw-r--r-- | sw/source/ui/table/chartins.cxx | 9 | ||||
-rw-r--r-- | sw/source/ui/table/colwd.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/table/convert.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/table/rowht.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/table/swtablerep.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/table/tabledlg.cxx | 63 | ||||
-rw-r--r-- | sw/source/ui/table/tablemgr.cxx | 23 | ||||
-rw-r--r-- | sw/source/ui/table/tablepg.hxx | 5 |
8 files changed, 27 insertions, 91 deletions
diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx index eb9cb6c32ff9..c33991127529 100644 --- a/sw/source/ui/table/chartins.cxx +++ b/sw/source/ui/table/chartins.cxx @@ -60,12 +60,9 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; - - Point SwGetChartDialogPos( const Window *pParentWin, const Size& rDialogSize, const Rectangle& rLogicChart ) { - // !! positioning code according to spepc; similar to Calc fuins2.cxx - + // positioning code according to spepc; similar to Calc fuins2.cxx Point aRet; OSL_ENSURE( pParentWin, "Window not found" ); @@ -247,7 +244,6 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings ) } } - void AutoEdit::KeyInput( const KeyEvent& rEvt ) { sal_uInt16 nCode = rEvt.GetKeyCode().GetCode(); @@ -255,7 +251,4 @@ void AutoEdit::KeyInput( const KeyEvent& rEvt ) Edit::KeyInput( rEvt ); } - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx index 134cab20871f..16207f89191e 100644 --- a/sw/source/ui/table/colwd.cxx +++ b/sw/source/ui/table/colwd.cxx @@ -31,7 +31,6 @@ #include <cmdid.h> #include <table.hrc> - IMPL_LINK_NOARG_INLINE_START(SwTableWidthDlg, LoseFocusHdl) { sal_uInt16 nId = (sal_uInt16)m_pColNF->GetValue()-1; @@ -42,8 +41,6 @@ IMPL_LINK_NOARG_INLINE_START(SwTableWidthDlg, LoseFocusHdl) } IMPL_LINK_NOARG_INLINE_END(SwTableWidthDlg, LoseFocusHdl) - - SwTableWidthDlg::SwTableWidthDlg(Window *pParent, SwTableFUNC &rTableFnc ) : SvxStandardDialog( pParent, "ColumnWidthDialog", "modules/swriter/ui/columnwidth.ui" ) , rFnc(rTableFnc) @@ -70,8 +67,6 @@ SwTableWidthDlg::SwTableWidthDlg(Window *pParent, SwTableFUNC &rTableFnc ) LoseFocusHdl(); } - - void SwTableWidthDlg::Apply() { rFnc.InitTabCols(); @@ -80,7 +75,4 @@ void SwTableWidthDlg::Apply() static_cast< sal_uInt16 >(m_pWidthMF->Denormalize(m_pWidthMF->GetValue(FUNIT_TWIP)))); } - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 4fc5ecfcb34c..fd2e827fbdb0 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -78,7 +78,6 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim, } } - sal_uInt16 nInsMode = 0; if (mpBorderCB->IsChecked()) nInsMode |= tabopts::DEFAULT_BORDER; @@ -97,7 +96,6 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim, rInsTblOpts.mnInsMode = nInsMode; } - SwConvertTableDlg::SwConvertTableDlg( SwView& rView, bool bToTable ) : SfxModalDialog(&rView.GetViewFrame()->GetWindow(), "ConvertTextTableDialog", "modules/swriter/ui/converttexttable.ui" ) , sConvertTextTable(SW_RES(STR_CONVERT_TEXT_TABLE)) diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx index 76ae477e78bd..348c5e8045af 100644 --- a/sw/source/ui/table/rowht.cxx +++ b/sw/source/ui/table/rowht.cxx @@ -22,7 +22,6 @@ #include <sfx2/dispatch.hxx> #include <svx/dlgutil.hxx> - #include <fmtfsize.hxx> #include <swtypes.hxx> #include <rowht.hxx> @@ -50,7 +49,6 @@ void SwTableHeightDlg::Apply() rSh.SetRowHeight( aSz ); } - SwTableHeightDlg::SwTableHeightDlg(Window *pParent, SwWrtShell &rS) : SvxStandardDialog(pParent, "RowHeightDialog", "modules/swriter/ui/rowheight.ui") , rSh( rS ) @@ -77,6 +75,4 @@ SwTableHeightDlg::SwTableHeightDlg(Window *pParent, SwWrtShell &rS) } } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx index 9eae380e0ad8..f1176b07727f 100644 --- a/sw/source/ui/table/swtablerep.cxx +++ b/sw/source/ui/table/swtablerep.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <hintids.hxx> #include <vcl/msgbox.hxx> #include <svl/stritem.hxx> @@ -53,7 +52,6 @@ #include <table.hrc> #include "swtablerep.hxx" - SwTableRep::SwTableRep( const SwTabCols& rTabCol ) : nTblWidth(0), @@ -172,7 +170,7 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const } } -// intercept rounding errors + // intercept rounding errors if(std::abs((long)nOldLeft - (long)rTabCols.GetLeft()) < 3) rTabCols.SetLeft(nOldLeft); diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 0ab390563d1e..c6cb1405489c 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -61,7 +61,6 @@ using namespace ::com::sun::star; - SwFormatTablePage::SwFormatTablePage(Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "FormatTablePage", "modules/swriter/ui/formattablepage.ui", rSet) , pTblData(0) @@ -103,13 +102,12 @@ SwFormatTablePage::SwFormatTablePage(Window* pParent, const SfxItemSet& rSet) Init(); } - void SwFormatTablePage::Init() { m_aLeftMF.SetMetricFieldMin(-999999); m_aRightMF.SetMetricFieldMin(-999999); - // handler + //handler Link aLk = LINK( this, SwFormatTablePage, AutoClickHdl ); m_pFullBtn->SetClickHdl( aLk ); m_pFreeBtn->SetClickHdl( aLk ); @@ -155,15 +153,15 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) m_aWidthMF.SetRefValue(pTblData->GetSpace()); m_aLeftMF.SetRefValue(pTblData->GetSpace()); m_aRightMF.SetRefValue(pTblData->GetSpace()); - m_aLeftMF.SetMetricFieldMin(0); // will be overwritten by the Percentfield - m_aRightMF.SetMetricFieldMin(0); // -""- - m_aLeftMF.SetMetricFieldMax(99); // - m_aRightMF.SetMetricFieldMax(99); // + m_aLeftMF.SetMetricFieldMin(0); //will be overwritten by the Percentfield + m_aRightMF.SetMetricFieldMin(0); //dito + m_aLeftMF.SetMetricFieldMax(99); + m_aRightMF.SetMetricFieldMax(99); m_aLeftMF.SetPrcntValue(m_aLeftMF.NormalizePercent(nLeft ), FUNIT_TWIP ); m_aRightMF.SetPrcntValue(m_aRightMF.NormalizePercent(nRight ), FUNIT_TWIP ); } else - ModifyHdl(m_aLeftMF.get()); // correct values again + ModifyHdl(m_aLeftMF.get()); //correct values again if(m_pFreeBtn->IsChecked()) { @@ -176,7 +174,6 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn ) return 0; } - IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox ) { sal_Bool bRestore = sal_True, @@ -232,8 +229,8 @@ IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox ) if(bFull && bRestore) { - // After being switched on automatic, the width was pinned - // in order to restore the width while switching back to. + //After being switched on automatic, the width was pinned + //in order to restore the width while switching back to. bFull = sal_False; m_aWidthMF.SetPrcntValue(m_aWidthMF.NormalizePercent(nSaveWidth ), FUNIT_TWIP ); } @@ -259,7 +256,6 @@ void SwFormatTablePage::RightModify() } } - IMPL_LINK_INLINE_START( SwFormatTablePage, UpDownLoseFocusHdl, MetricField *, pEdit ) { if( m_aRightMF.get() == pEdit) @@ -371,17 +367,15 @@ void SwFormatTablePage::ModifyHdl(const Edit * pEdit) bModified = sal_True; } - SfxTabPage* SwFormatTablePage::Create( Window* pParent, const SfxItemSet& rAttrSet) { return new SwFormatTablePage( pParent, rAttrSet ); } - sal_Bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) { - // Test if one of the controls still has the focus. + //Test if one of the controls still has the focus if (m_aWidthMF.HasFocus()) ModifyHdl(m_aWidthMF.get()); else if (m_aLeftMF.HasFocus()) @@ -426,7 +420,6 @@ sal_Bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet ) return bModified; } - void SwFormatTablePage::Reset( const SfxItemSet& ) { const SfxItemSet& rSet = GetItemSet(); @@ -558,7 +551,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) m_pBottomMF->SaveValue(); } - //text direction + //Text direction if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, true, &pItem ) ) { sal_uIntPtr nVal = ((SvxFrameDirectionItem*)pItem)->GetValue(); @@ -603,10 +596,10 @@ void SwFormatTablePage::ActivatePage( const SfxItemSet& rSet ) int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) { - // os: VCL sorgt nicht dafuer, dass das aktive Control im - // dialog bei OK den focus verliert + //os: VCL doesn't take care of making the active widget + //in the dialog lose the focus m_pNameED->GrabFocus(); - // Test the table name for spaces + //test the table name for spaces OUString sTblName = m_pNameED->GetText(); if(sTblName.indexOf(' ') != -1) { @@ -716,6 +709,7 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet ) } return sal_True; } + //Description: Page column configuration SwTableColumnPage::SwTableColumnPage(Window* pParent, const SfxItemSet& rSet) : SfxTabPage(pParent, "TableColumnPage", @@ -815,7 +809,6 @@ void SwTableColumnPage::Reset( const SfxItemSet& ) }; - void SwTableColumnPage::Init(sal_Bool bWeb) { FieldUnit aMetric = ::GetDfltMetric(bWeb); @@ -841,7 +834,6 @@ void SwTableColumnPage::Init(sal_Bool bWeb) m_pProportionalCB->SetClickHdl( aLk ); }; - IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox ) { //move display window @@ -880,7 +872,6 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox ) return 0; }; - IMPL_LINK_INLINE_START( SwTableColumnPage, UpHdl, MetricField*, pEdit ) { bModified = sal_True; @@ -889,7 +880,6 @@ IMPL_LINK_INLINE_START( SwTableColumnPage, UpHdl, MetricField*, pEdit ) }; IMPL_LINK_INLINE_END( SwTableColumnPage, UpHdl, MetricField*, pEdit ) - IMPL_LINK_INLINE_START( SwTableColumnPage, DownHdl, MetricField*, pEdit ) { bModified = sal_True; @@ -898,7 +888,6 @@ IMPL_LINK_INLINE_START( SwTableColumnPage, DownHdl, MetricField*, pEdit ) }; IMPL_LINK_INLINE_END( SwTableColumnPage, DownHdl, MetricField*, pEdit ) - IMPL_LINK_INLINE_START( SwTableColumnPage, LoseFocusHdl, MetricField*, pEdit ) { if (pEdit->IsModified()) @@ -910,7 +899,6 @@ IMPL_LINK_INLINE_START( SwTableColumnPage, LoseFocusHdl, MetricField*, pEdit ) }; IMPL_LINK_INLINE_END( SwTableColumnPage, LoseFocusHdl, MetricField*, pEdit ) - IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox ) { sal_Bool bCheck = pBox->IsChecked(); @@ -942,7 +930,6 @@ sal_Bool SwTableColumnPage::FillItemSet( SfxItemSet& ) return bModified; }; - void SwTableColumnPage::ModifyHdl( MetricField* pField ) { PercentField *pEdit = NULL; @@ -970,7 +957,6 @@ void SwTableColumnPage::ModifyHdl( MetricField* pField ) UpdateCols( nAktPos ); }; - void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos ) { SwTwips nSum = 0; @@ -987,7 +973,7 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos ) if(!bModifyTable && !bProp ) { -// the table width is constant, the difference is balanced with the other columns + //The table width is constant, the difference is balanced with the other columns sal_uInt16 nLoopCount = 0; while( nDiff ) { @@ -1027,8 +1013,8 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos ) } else if(bModifyTable && !bProp) { -// Difference is balanced by the width of the table, -// other columns remain unchanged. + //Difference is balanced by the width of the table, + //other columns remain unchanged. OSL_ENSURE(nDiff <= pTblData->GetSpace() - nTableWidth, "wrong maximum" ); SwTwips nActSpace = pTblData->GetSpace() - nTableWidth; if(nDiff > nActSpace) @@ -1043,8 +1029,8 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos ) } else if(bModifyTable & bProp) { -// All columns will be changed proportionally with, -// the table width is adjusted accordingly. + //All columns will be changed proportionally with, + //the table width is adjusted accordingly. OSL_ENSURE(nDiff * nNoOfVisibleCols <= pTblData->GetSpace() - nTableWidth, "wrong maximum" ); long nAdd = nDiff; if(nDiff * nNoOfVisibleCols > pTblData->GetSpace() - nTableWidth) @@ -1128,7 +1114,6 @@ void SwTableColumnPage::ActivatePage( const SfxItemSet& ) } - int SwTableColumnPage::DeactivatePage( SfxItemSet* _pSet ) { if(_pSet) @@ -1191,7 +1176,6 @@ int SwTableColumnPage::DeactivatePage( SfxItemSet* _pSet ) return sal_True; } - SwTwips SwTableColumnPage::GetVisibleWidth(sal_uInt16 nPos) { sal_uInt16 i=0; @@ -1210,7 +1194,6 @@ SwTwips SwTableColumnPage::GetVisibleWidth(sal_uInt16 nPos) return nReturn; } - void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth) { sal_uInt16 i=0; @@ -1351,7 +1334,7 @@ sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) { bool bModified = false; - // Repeat Heading + //Repeat Heading if(TriState(m_pHeadLineCB->IsChecked()) != m_pHeadLineCB->GetSavedValue() || OUString::number( static_cast< sal_Int32 >(m_pRepeatHeaderNF->GetValue()) ) != m_pRepeatHeaderNF->GetSavedValue() ) { @@ -1374,7 +1357,7 @@ sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet ) sal_Bool bState = m_pPageCollCB->IsChecked(); - // If we have a page style, then there's no break + //If we have a page style, then there's no break sal_Bool bPageItemPut = sal_False; if ( bState != m_pPageCollCB->GetSavedValue() || ( bState && @@ -1470,7 +1453,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) bool bFlowAllowed = !bHtmlMode || rHtmlOpt.IsPrintLayoutExtension(); if(bFlowAllowed) { - // Inserting of the existing page templates in the list box. + //Inserting of the existing page templates in the list box const sal_uInt16 nCount = pShell->GetPageDescCnt(); sal_uInt16 i; @@ -1804,6 +1787,4 @@ void SwTextFlowPage::DisablePageBreak() m_pPageNoNF->Disable(); } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx index 947e3ddaa61e..d823f4571932 100644 --- a/sw/source/ui/table/tablemgr.cxx +++ b/sw/source/ui/table/tablemgr.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <com/sun/star/chart/ChartDataRowSource.hpp> #include <com/sun/star/chart2/data/XDataProvider.hpp> #include <com/sun/star/chart2/data/XDataReceiver.hpp> @@ -48,7 +47,6 @@ using namespace ::com::sun::star; // Adjust line height (dialogue) - void SwTableFUNC::ColWidthDlg( Window *pParent ) { InitTabCols(); @@ -62,8 +60,6 @@ void SwTableFUNC::ColWidthDlg( Window *pParent ) } // Determine the width - - SwTwips SwTableFUNC::GetColWidth(sal_uInt16 nNum) const { SwTwips nWidth = 0; @@ -94,8 +90,6 @@ SwTwips SwTableFUNC::GetColWidth(sal_uInt16 nNum) const return nWidth; } - - SwTwips SwTableFUNC::GetMaxColWidth( sal_uInt16 nNum ) const { OSL_ENSURE(nNum <= aCols.Count(), "Index out of Area"); @@ -116,8 +110,6 @@ SwTwips SwTableFUNC::GetMaxColWidth( sal_uInt16 nNum ) const return GetColWidth(nNum); } - - void SwTableFUNC::SetColWidth(sal_uInt16 nNum, SwTwips nNewWidth ) { // set current width @@ -155,8 +147,6 @@ void SwTableFUNC::SetColWidth(sal_uInt16 nNum, SwTwips nNewWidth ) pSh->EndAllAction(); } - - void SwTableFUNC::InitTabCols() { OSL_ENSURE(pSh, "no Shell"); @@ -165,20 +155,16 @@ void SwTableFUNC::InitTabCols() pSh->GetTabCols( aCols ); } - - SwTableFUNC::SwTableFUNC(SwWrtShell *pShell, sal_Bool bCopyFmt) : pFmt(pShell->GetTableFmt()), pSh(pShell), bCopy(bCopyFmt) { - // if applicable copy the format for edit + // if applicable copy the format for edit if( pFmt && bCopy ) pFmt = new SwFrmFmt( *pFmt ); } - - SwTableFUNC::~SwTableFUNC() { if(bCopy) @@ -338,9 +324,6 @@ sal_uInt16 SwTableFUNC::GetCurColNum() const return nPos - nCount; } - - - sal_uInt16 SwTableFUNC::GetColCount() const { sal_uInt16 nCount = 0; @@ -350,8 +333,6 @@ sal_uInt16 SwTableFUNC::GetColCount() const return aCols.Count() - nCount; } - - int SwTableFUNC::GetRightSeparator(int nNum) const { OSL_ENSURE( nNum < (int)GetColCount() ,"Index out of range"); @@ -365,6 +346,4 @@ int SwTableFUNC::GetRightSeparator(int nNum) const return i - 1; } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx index 92732c00c444..24b6ee83d238 100644 --- a/sw/source/ui/table/tablepg.hxx +++ b/sw/source/ui/table/tablepg.hxx @@ -90,7 +90,6 @@ public: }; // TabPage Format/Table/Columns - #define MET_FIELDS 6 //Number of the used MetricFields class SwTableColumnPage : public SfxTabPage @@ -109,8 +108,8 @@ class SwTableColumnPage : public SfxTabPage SwTwips nMinWidth; sal_uInt16 nNoOfCols; sal_uInt16 nNoOfVisibleCols; - //Remember the width, when switching to autoalign - sal_uInt16 aValueTbl[MET_FIELDS];//primary assignment of the MetricFields + // Remember the width, when switching to autoalign + sal_uInt16 aValueTbl[MET_FIELDS];// primary assignment of the MetricFields sal_Bool bModified:1; sal_Bool bModifyTbl:1; sal_Bool bPercentMode:1; |