summaryrefslogtreecommitdiff
path: root/sw/source/ui/table
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/table')
-rw-r--r--sw/source/ui/table/chartins.cxx28
-rw-r--r--sw/source/ui/table/chartins.src2
-rw-r--r--sw/source/ui/table/colwd.cxx14
-rw-r--r--sw/source/ui/table/convert.cxx7
-rw-r--r--sw/source/ui/table/instable.cxx9
-rw-r--r--sw/source/ui/table/mergetbl.cxx6
-rw-r--r--sw/source/ui/table/rowht.cxx12
-rw-r--r--sw/source/ui/table/rowht.src2
-rw-r--r--sw/source/ui/table/splittbl.cxx7
-rw-r--r--sw/source/ui/table/swtablerep.cxx46
-rw-r--r--sw/source/ui/table/tabledlg.cxx218
-rw-r--r--sw/source/ui/table/tabledlg.src1
-rw-r--r--sw/source/ui/table/tablemgr.cxx26
-rw-r--r--sw/source/ui/table/tablepg.hxx9
-rw-r--r--sw/source/ui/table/tautofmt.cxx48
-rw-r--r--sw/source/ui/table/tautofmt.src2
16 files changed, 94 insertions, 343 deletions
diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx
index ce370ced3304..ba251cd045b9 100644
--- a/sw/source/ui/table/chartins.cxx
+++ b/sw/source/ui/table/chartins.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,7 +83,7 @@ Point SwGetChartDialogPos( const Window *pParentWin, const Size& rDialogSize, co
Point aRet;
- DBG_ASSERT( pParentWin, "Window not found" );
+ OSL_ENSURE( pParentWin, "Window not found" );
if (pParentWin)
{
Rectangle aObjPixel = pParentWin->LogicToPixel( rLogicChart, pParentWin->GetMapMode() );
@@ -148,11 +149,6 @@ Point SwGetChartDialogPos( const Window *pParentWin, const Size& rDialogSize, co
return aRet;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
void SwInsertChart(Window* pParent, SfxBindings* pBindings )
{
(void) pParent;
@@ -177,9 +173,6 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
{
SwFrmFmt* pTblFmt = rWrtShell.GetTableFmt();
String aCurrentTblName = pTblFmt->GetName();
-// String aText( String::CreateFromAscii("<.>") ); // was used for UI
-// aText.Insert( rWrtShell.GetBoxNms(), 2);
-// aText.Insert( aCurrentTblName, 1 );
aRangeString = aCurrentTblName;
aRangeString += OUString::valueOf( sal_Unicode('.') );
aRangeString += rWrtShell.GetBoxNms();
@@ -203,7 +196,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
{
uno::Reference< ui::dialogs::XExecutableDialog > xDialog(
xMCF->createInstanceWithContext(
- C2U("com.sun.star.comp.chart2.WizardDialog")
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.chart2.WizardDialog"))
, xContext), uno::UNO_QUERY);
uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY );
if( xInit.is() )
@@ -213,10 +206,10 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
uno::Sequence<uno::Any> aSeq(2);
uno::Any* pArray = aSeq.getArray();
beans::PropertyValue aParam1;
- aParam1.Name = C2U("ParentWindow");
+ aParam1.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow"));
aParam1.Value <<= uno::makeAny(xDialogParentWindow);
beans::PropertyValue aParam2;
- aParam2.Name = C2U("ChartModel");
+ aParam2.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ChartModel"));
aParam2.Value <<= uno::makeAny(xChartModel);
pArray[0] <<= uno::makeAny(aParam1);
pArray[1] <<= uno::makeAny(aParam2);
@@ -230,7 +223,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
{
//get dialog size:
awt::Size aDialogAWTSize;
- if( xDialogProps->getPropertyValue( ::rtl::OUString::createFromAscii("Size") )
+ if( xDialogProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) )
>>= aDialogAWTSize )
{
Size aDialogSize( aDialogAWTSize.Width, aDialogAWTSize.Height );
@@ -242,14 +235,14 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
aSwRect = pFlyFrmFmt->GetAnchoredObj()->GetObjRectWithSpaces();
Rectangle aRect( aSwRect.SVRect() );
Point aDialogPos = SwGetChartDialogPos( &rWrtShell.GetView().GetEditWin(), aDialogSize, aRect );
- xDialogProps->setPropertyValue( ::rtl::OUString::createFromAscii("Position"),
+ xDialogProps->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Position")),
uno::makeAny( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) );
}
}
}
catch( uno::Exception& )
{
- DBG_ERROR( "Chart wizard couldn't be positioned automatically\n" );
+ OSL_FAIL("Chart wizard couldn't be positioned automatically\n" );
}
}
@@ -261,7 +254,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
}
else
{
- DBG_ASSERT( nDialogRet == ui::dialogs::ExecutableDialogResults::OK,
+ OSL_ENSURE( nDialogRet == ui::dialogs::ExecutableDialogResults::OK,
"dialog execution failed" );
}
}
@@ -273,7 +266,7 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
}
-void __EXPORT AutoEdit::KeyInput( const KeyEvent& rEvt )
+void AutoEdit::KeyInput( const KeyEvent& rEvt )
{
sal_uInt16 nCode = rEvt.GetKeyCode().GetCode();
if( nCode != KEY_SPACE )
@@ -283,3 +276,4 @@ void __EXPORT AutoEdit::KeyInput( const KeyEvent& rEvt )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/chartins.src b/sw/source/ui/table/chartins.src
index b4cd8fdbeff0..a65c8801db20 100644
--- a/sw/source/ui/table/chartins.src
+++ b/sw/source/ui/table/chartins.src
@@ -102,8 +102,6 @@ ModelessDialog DLG_INSERT_CHART
HelpID = "sw:PushButton:DLG_INSERT_CHART:BT_PREV";
Pos = MAP_APPFONT ( 130 , 151 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
- // ### ACHTUNG: Neuer Text in Resource? << ~Zurück : << Zurück
- /* ### ACHTUNG: Neuer Text in Resource? << ~Zurück : << ~Zur³ck */
TabStop = TRUE ;
Disable = TRUE ;
Text [ en-US ] = "<< ~Back" ;
diff --git a/sw/source/ui/table/colwd.cxx b/sw/source/ui/table/colwd.cxx
index d9e3d64b22e2..e3cb3f1b3536 100644
--- a/sw/source/ui/table/colwd.cxx
+++ b/sw/source/ui/table/colwd.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,27 +39,15 @@
#include <colwd.hxx>
#include <tablemgr.hxx>
#include <wrtsh.hxx>
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swmodule.hxx>
-#ifndef _MODCFG_HXX
#include <modcfg.hxx>
-#endif
#include <usrpref.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _COLWD_HRC
#include <colwd.hrc>
-#endif
-#ifndef _TABLE_HRC
#include <table.hrc>
-#endif
IMPL_LINK_INLINE_START( SwTableWidthDlg, LoseFocusHdl, Edit *, EMPTYARG )
@@ -121,3 +110,4 @@ void SwTableWidthDlg::Apply()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index 411868ac6b3d..f2752fe92781 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -233,10 +234,10 @@ SwConvertTableDlg:: ~SwConvertTableDlg()
IMPL_LINK( SwConvertTableDlg, AutoFmtHdl, PushButton*, pButton )
{
SwAbstractDialogFactory* pFact = swui::GetFactory();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
delete pDlg;
@@ -279,3 +280,5 @@ IMPL_LINK(SwConvertTableDlg, ReapeatHeaderCheckBoxHdl, void*, EMPTYARG)
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index e6ad93335c0d..9f8a711c4533 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -184,9 +185,6 @@ IMPL_LINK_INLINE_START( SwInsTableDlg, ModifyName, Edit *, pEdit )
}
IMPL_LINK_INLINE_END( SwInsTableDlg, ModifyName, Edit *, EMPTYARG )
-/*-----------------15.04.98 11:36-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwInsTableDlg, ModifyRowCol, NumericField *, pField )
{
if(pField == &aColEdit)
@@ -220,10 +218,10 @@ IMPL_LINK( SwInsTableDlg, ModifyRowCol, NumericField *, pField )
IMPL_LINK( SwInsTableDlg, AutoFmtHdl, PushButton*, pButton )
{
SwAbstractDialogFactory* pFact = swui::GetFactory();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton,pShell, DLG_AUTOFMT_TABLE, sal_False, pTAutoFmt );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute())
pDlg->FillAutoFmtOfIndex( pTAutoFmt );
delete pDlg;
@@ -251,3 +249,4 @@ IMPL_LINK(SwInsTableDlg, ModifyRepeatHeaderNF_Hdl, void*, EMPTYARG)
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/mergetbl.cxx b/sw/source/ui/table/mergetbl.cxx
index 377959ec89cc..dc5c41cec24a 100644
--- a/sw/source/ui/table/mergetbl.cxx
+++ b/sw/source/ui/table/mergetbl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,12 +36,8 @@
#include <swtypes.hxx>
#include <mergetbl.hxx>
-#ifndef _MERGETBL_HRC
#include <mergetbl.hrc>
-#endif
-#ifndef _TABLE_HRC
#include <table.hrc>
-#endif
SwMergeTblDlg::SwMergeTblDlg( Window *pParent, sal_Bool& rWithPrev )
@@ -64,3 +61,4 @@ void SwMergeTblDlg::Apply()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/rowht.cxx b/sw/source/ui/table/rowht.cxx
index a1d1770136d7..676bc8a038db 100644
--- a/sw/source/ui/table/rowht.cxx
+++ b/sw/source/ui/table/rowht.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,24 +45,14 @@
#include <rowht.hxx>
#include <wrtsh.hxx>
#include <frmatr.hxx>
-#ifndef _WDOCSH_HXX
#include <wdocsh.hxx>
-#endif
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <swmodule.hxx>
#include <usrpref.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _ROWHT_HRC
#include <rowht.hrc>
-#endif
-#ifndef _TABLE_HRC
#include <table.hrc>
-#endif
@@ -118,3 +109,4 @@ SwTableHeightDlg::SwTableHeightDlg( Window *pParent, SwWrtShell &rS ) :
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/rowht.src b/sw/source/ui/table/rowht.src
index b9abcd05ce94..c947ed7405d5 100644
--- a/sw/source/ui/table/rowht.src
+++ b/sw/source/ui/table/rowht.src
@@ -35,7 +35,6 @@ ModalDialog DLG_ROW_HEIGHT
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 157 , 60 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? Zeilenhöhe : Zellenhöhe */
Text [ en-US ] = "Row Height" ;
Moveable = TRUE ;
OKButton BT_OK
@@ -80,7 +79,6 @@ ModalDialog DLG_ROW_HEIGHT
HelpID = "sw:CheckBox:DLG_ROW_HEIGHT:CB_AUTOHEIGHT";
Pos = MAP_APPFONT ( 12 , 34 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
- /* ### ACHTUNG: Neuer Text in Resource? ~dynamisch anpassen : auto. H~öhe */
TabStop = TRUE ;
Text [ en-US ] = "~Fit to size" ;
};
diff --git a/sw/source/ui/table/splittbl.cxx b/sw/source/ui/table/splittbl.cxx
index 7037e2b0aa05..35315ca22ef2 100644
--- a/sw/source/ui/table/splittbl.cxx
+++ b/sw/source/ui/table/splittbl.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,9 +39,7 @@
#include <splittbl.hrc>
#include <table.hrc>
#include <tblenum.hxx>
-/*-----------------17.03.98 10:56-------------------
---------------------------------------------------*/
SwSplitTblDlg::SwSplitTblDlg( Window *pParent, SwWrtShell &rSh ) :
SvxStandardDialog(pParent, SW_RES(DLG_SPLIT_TABLE)),
aOKPB( this, SW_RES(PB_OK )),
@@ -58,9 +57,6 @@ SwSplitTblDlg::SwSplitTblDlg( Window *pParent, SwWrtShell &rSh ) :
aCntntCopyRB.Check();
}
-/*-----------------17.03.98 10:56-------------------
-
---------------------------------------------------*/
void SwSplitTblDlg::Apply()
{
m_nSplit = HEADLINE_CNTNTCOPY;
@@ -77,3 +73,4 @@ void SwSplitTblDlg::Apply()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx
index a6b96ab8930c..a3ca467f4d1a 100644
--- a/sw/source/ui/table/swtablerep.cxx
+++ b/sw/source/ui/table/swtablerep.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,13 +29,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
-#include <tools/list.hxx>
#include <vcl/msgbox.hxx>
#include <svl/stritem.hxx>
#include <svl/intitem.hxx>
-#include <svx/htmlmode.hxx>
#include <editeng/keepitem.hxx>
#include <editeng/brkitem.hxx>
#include <editeng/ulspitem.hxx>
@@ -49,53 +47,25 @@
#include <fmtrowsplt.hxx>
#include <svx/htmlmode.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <viewopt.hxx>
#include <uitool.hxx>
#include <frmatr.hxx>
-#ifndef _TABLEPG_HXX
#include <tablepg.hxx>
-#endif
#include <tablemgr.hxx>
#include <pagedesc.hxx>
#include <poolfmt.hxx>
#include <SwStyleNameMapper.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _TABLEDLG_HRC
#include <tabledlg.hrc>
-#endif
-#ifndef _TABLE_HRC
#include <table.hrc>
-#endif
#include "swtablerep.hxx"
-#ifdef DEBUG_TBLDLG
-void DbgTColumn(TColumn* pTColumn, sal_uInt16 nCount)
-{
- for(sal_uInt16 i = 0; i < nCount; i++)
- {
- String sMsg(i);
- sMsg += pTColumn[i].bVisible ? " v " : " h ";
- sMsg += pTColumn[i].nWidth;
- DBG_ERROR(sMsg)
- }
-}
-#endif
-
-
-/*-----------------20.08.96 09.43-------------------
---------------------------------------------------*/
SwTableRep::SwTableRep( const SwTabCols& rTabCol, sal_Bool bCplx )
:
nTblWidth(0),
@@ -128,15 +98,11 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol, sal_Bool bCplx )
nAllCols++;
}
-/*-----------------20.08.96 09.43-------------------
---------------------------------------------------*/
SwTableRep::~SwTableRep()
{
delete[] pTColumns;
}
-/*-----------------20.08.96 13.33-------------------
---------------------------------------------------*/
sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
{
long nOldLeft = rTabCols.GetLeft(),
@@ -152,10 +118,6 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
break;
}
-#ifdef DEBUG_TBLDLG
-#define DbgTColumn(pTColumns, nAllCols);
-#endif
-
SwTwips nPos = 0;
SwTwips nLeft = GetLeftSpace();
rTabCols.SetLeft(nLeft);
@@ -176,10 +138,6 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
pOldTColumns[nAllCols - 1].nWidth = rTabCols.GetRight() - rTabCols.GetLeft() - nStart;
pOldTColumns[nAllCols - 1].bVisible = sal_True;
-#ifdef DEBUG_TBLDLG
-#define DbgTColumn(pOldTColumns, nAllCols);
-#endif
-
sal_uInt16 nOldPos = 0;
sal_uInt16 nNewPos = 0;
SwTwips nOld = 0;
@@ -239,3 +197,5 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
rTabCols.SetRight(rTabCols.GetRightMax());
return bSingleLine;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 9fe0b570cc6f..006c78003975 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,13 +33,10 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
#include <hintids.hxx>
-#include <tools/list.hxx>
#include <vcl/msgbox.hxx>
#include <svl/stritem.hxx>
#include <svl/intitem.hxx>
-#include <svx/htmlmode.hxx>
#include <editeng/keepitem.hxx>
#include <editeng/brkitem.hxx>
#include <editeng/ulspitem.hxx>
@@ -55,35 +53,23 @@
#include "access.hrc"
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <viewopt.hxx>
#include <uitool.hxx>
#include <frmatr.hxx>
#include <tabledlg.hxx>
-#ifndef _TABLEPG_HXX
#include <tablepg.hxx>
-#endif
#include <tablemgr.hxx>
#include <pagedesc.hxx>
#include <uiitems.hxx>
#include <poolfmt.hxx>
#include <SwStyleNameMapper.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _TABLEDLG_HRC
#include <tabledlg.hrc>
-#endif
-#ifndef _TABLE_HRC
#include <table.hrc>
-#endif
#include <svx/svxids.hrc>
#include <svx/dialogs.hrc>
#include <svx/flagsdef.hxx>
@@ -92,41 +78,6 @@
using namespace ::com::sun::star;
-#ifdef DEBUG_TBLDLG
-void DbgTblRep(SwTableRep* pRep)
-{
- DBG_ERROR(String(pRep->GetColCount()))
- DBG_ERROR(String(pRep->GetAllColCount()))
- SwTwips nSum = 0;
- for(sal_uInt16 i = 0; i < pRep->GetAllColCount(); i++)
- {
- String sMsg(i);
- sMsg += pRep->GetColumns()[i].bVisible ? " v " : " h ";
- sMsg += pRep->GetColumns()[i].nWidth;
- nSum +=pRep->GetColumns()[i].nWidth;
- DBG_ERROR(sMsg)
- }
- String sMsg("Spaltensumme: ");
- sMsg += nSum;
- sMsg += " Tblbreite: ";
- sMsg += pRep->GetWidth();
- DBG_ERROR(sMsg)
- sMsg = "Gesamt/Links/Rechts: ";
- sMsg += pRep->GetSpace();
- sMsg += '/';
- sMsg += pRep->GetLeftSpace();
- sMsg += '/';
- sMsg += pRep->GetRightSpace();
- DBG_ERROR(sMsg)
- sMsg = "Align: ";
- sMsg += pRep->GetAlign();
- DBG_ERROR(sMsg)
-
-};
-
-#endif
-
-
SwFormatTablePage::SwFormatTablePage( Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage(pParent, SW_RES( TP_FORMAT_TABLE ), rSet ),
aOptionsFL(this, SW_RES( FL_OPTIONS )),
@@ -183,8 +134,7 @@ SwFormatTablePage::SwFormatTablePage( Window* pParent, const SfxItemSet& rSet )
Init();
}
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
void SwFormatTablePage::Init()
{
aLeftMF.MetricField::SetMin(-999999);
@@ -225,7 +175,7 @@ void SwFormatTablePage::Init()
IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn )
{
- DBG_ASSERT(pTblData, "Tabellendaten nicht da?");
+ OSL_ENSURE(pTblData, "table data not available?");
sal_Bool bIsChecked = pBtn->IsChecked();
sal_Int64 nLeft = aLeftMF.DenormalizePercent(aLeftMF.GetValue(FUNIT_TWIP ));
sal_Int64 nRight = aRightMF.DenormalizePercent(aRightMF.GetValue(FUNIT_TWIP ));
@@ -259,8 +209,7 @@ IMPL_LINK( SwFormatTablePage, RelWidthClickHdl, CheckBox *, pBtn )
return 0;
}
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
IMPL_LINK( SwFormatTablePage, AutoClickHdl, CheckBox *, pBox )
{
sal_Bool bRestore = sal_True,
@@ -332,9 +281,7 @@ IMPL_LINK( SwFormatTablePage, RightModifyHdl, MetricField *, EMPTYARG )
if(aFreeBtn.IsChecked())
{
sal_Bool bEnable = aRightMF.GetValue() == 0;
-// aWidthMF.Enable(bEnable);
aRelWidthCB.Enable(bEnable);
-// aWidthFT.Enable(bEnable);
if ( !bEnable )
{
aRelWidthCB.Check(sal_False);
@@ -347,8 +294,7 @@ IMPL_LINK( SwFormatTablePage, RightModifyHdl, MetricField *, EMPTYARG )
return 0;
}
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
IMPL_LINK_INLINE_START( SwFormatTablePage, UpDownLoseFocusHdl, MetricField *, pEdit )
{
if( &aRightMF == pEdit)
@@ -460,16 +406,14 @@ void SwFormatTablePage::ModifyHdl( Edit* pEdit )
bModified = sal_True;
}
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
SfxTabPage* SwFormatTablePage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
return new SwFormatTablePage( pParent, rAttrSet );
}
-/*------------------------------------------------------------------------
--------------------------------------------------------------------------*/
+
sal_Bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet )
{
// Testen, ob eins der Control noch den Focus hat
@@ -517,8 +461,7 @@ sal_Bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet )
return bModified;
}
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
void SwFormatTablePage::Reset( const SfxItemSet& )
{
const SfxItemSet& rSet = GetItemSet();
@@ -654,7 +597,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
//text direction
if( SFX_ITEM_SET == rSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem ) )
{
- sal_uInt32 nVal = ((SvxFrameDirectionItem*)pItem)->GetValue();
+ sal_uIntPtr nVal = ((SvxFrameDirectionItem*)pItem)->GetValue();
sal_uInt16 nPos = aTextDirectionLB.GetEntryPos( (void*) nVal );
aTextDirectionLB.SelectEntryPos( nPos );
aTextDirectionLB.SaveValue();
@@ -667,11 +610,10 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
}
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
void SwFormatTablePage::ActivatePage( const SfxItemSet& rSet )
{
- DBG_ASSERT(pTblData, "Tabellendaten nicht da?");
+ OSL_ENSURE(pTblData, "table data not available?");
if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP ))
{
SwTwips nCurWidth = text::HoriOrientation::FULL != pTblData->GetAlign() ?
@@ -694,8 +636,7 @@ void SwFormatTablePage::ActivatePage( const SfxItemSet& rSet )
}
}
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
{
// os: VCL sorgt nicht dafuer, dass das aktive Control im
@@ -799,8 +740,6 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
pTblData->SetAlign(nAlign);
}
-
- // if( text::HoriOrientation::CENTER && lWidth != (SwTwips)aWidthMF.GetSavedValue())
if(pTblData->GetWidth() != lWidth )
{
pTblData->SetWidthChanged();
@@ -810,9 +749,6 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
if(pTblData->HasWidthChanged())
_pSet->Put(SwPtrItem(FN_TABLE_REP, pTblData));
}
-#ifdef DEBUG_TBLDLG
-DbgTblRep(pTblData)
-#endif
}
return sal_True;
}
@@ -883,16 +819,14 @@ SwTableColumnPage::SwTableColumnPage( Window* pParent,
{
};
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
SfxTabPage* SwTableColumnPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
return new SwTableColumnPage( pParent, rAttrSet );
};
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
void SwTableColumnPage::Reset( const SfxItemSet& )
{
const SfxItemSet& rSet = GetItemSet();
@@ -939,8 +873,7 @@ void SwTableColumnPage::Reset( const SfxItemSet& )
};
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
void SwTableColumnPage::Init(sal_Bool bWeb)
{
FieldUnit aMetric = ::GetDfltMetric(bWeb);
@@ -967,8 +900,7 @@ void SwTableColumnPage::Init(sal_Bool bWeb)
aProportionalCB.SetClickHdl( aLk );
};
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
{
//Anzeigefenster verschieben
@@ -1009,8 +941,7 @@ IMPL_LINK( SwTableColumnPage, AutoClickHdl, CheckBox *, pBox )
return 0;
};
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
IMPL_LINK_INLINE_START( SwTableColumnPage, UpHdl, PercentField *, pEdit )
{
bModified = sal_True;
@@ -1019,8 +950,7 @@ IMPL_LINK_INLINE_START( SwTableColumnPage, UpHdl, PercentField *, pEdit )
};
IMPL_LINK_INLINE_END( SwTableColumnPage, UpHdl, PercentField *, pEdit )
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
IMPL_LINK_INLINE_START( SwTableColumnPage, DownHdl, PercentField *, pEdit )
{
bModified = sal_True;
@@ -1029,8 +959,7 @@ IMPL_LINK_INLINE_START( SwTableColumnPage, DownHdl, PercentField *, pEdit )
};
IMPL_LINK_INLINE_END( SwTableColumnPage, DownHdl, PercentField *, pEdit )
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
IMPL_LINK_INLINE_START( SwTableColumnPage, LoseFocusHdl, PercentField *, pEdit )
{
if(pEdit->IsModified())
@@ -1042,8 +971,7 @@ IMPL_LINK_INLINE_START( SwTableColumnPage, LoseFocusHdl, PercentField *, pEdit )
};
IMPL_LINK_INLINE_END( SwTableColumnPage, LoseFocusHdl, PercentField *, pEdit )
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox )
{
sal_Bool bCheck = pBox->IsChecked();
@@ -1056,8 +984,7 @@ IMPL_LINK( SwTableColumnPage, ModeHdl, CheckBox*, pBox )
return 0;
};
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
sal_Bool SwTableColumnPage::FillItemSet( SfxItemSet& )
{
for( sal_uInt16 i = 0; i < MET_FIELDS; i++ )
@@ -1076,8 +1003,7 @@ sal_Bool SwTableColumnPage::FillItemSet( SfxItemSet& )
return bModified;
};
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
void SwTableColumnPage::ModifyHdl( PercentField* pEdit )
{
sal_uInt16 nAktPos;
@@ -1093,8 +1019,7 @@ void SwTableColumnPage::ModifyHdl( PercentField* pEdit )
UpdateCols( nAktPos );
};
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
{
SwTwips nSum = 0;
@@ -1145,7 +1070,7 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
nDiff = 0;
SetVisibleWidth(nAktPos, GetVisibleWidth(nAktPos) -nDiff);
}
- DBG_ASSERT(nDiff >= 0, "nDiff < 0 kann hier nicht sein!");
+ OSL_ENSURE(nDiff >= 0, "nDiff < 0 cannot be here!");
}
}
}
@@ -1153,7 +1078,7 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
{
// Differenz wird ueber die Tabellenbreite ausgeglichen,
// andere Spalten bleiben unveraendert
- DBG_ASSERT(nDiff <= pTblData->GetSpace() - nTableWidth, "Maximum falsch eingestellt" );
+ OSL_ENSURE(nDiff <= pTblData->GetSpace() - nTableWidth, "wrong maximum" );
SwTwips nActSpace = pTblData->GetSpace() - nTableWidth;
if(nDiff > nActSpace)
{
@@ -1169,7 +1094,7 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
{
// Alle Spalten werden proportional mitveraendert, die Tabellenbreite wird
// entsprechend angepasst
- DBG_ASSERT(nDiff * nNoOfVisibleCols <= pTblData->GetSpace() - nTableWidth, "Maximum falsch eingestellt" );
+ OSL_ENSURE(nDiff * nNoOfVisibleCols <= pTblData->GetSpace() - nTableWidth, "wrong maximum" );
long nAdd = nDiff;
if(nDiff * nNoOfVisibleCols > pTblData->GetSpace() - nTableWidth)
{
@@ -1196,35 +1121,8 @@ void SwTableColumnPage::UpdateCols( sal_uInt16 nAktPos )
}
nTableWidth += nAdd;
-
- }
- else
- {
-// Die Differenz wird gleichmaessig auf alle anderen Spalten aufgeteilt
-// die Tabellenbreite bleibt konstant
-/*
- SwTwips nDiffn = nDiff/(nNoOfVisibleCols - 1);
- if(nDiff < 0 && (nNoOfVisibleCols - 1) * nDiffn != nDiff)
- nDiffn-- ;
- sal_uInt16 nStart = nAktPos++;
- if(nAktPos == nNoOfVisibleCols)
- nStart = 0;
- for(sal_uInt16 i = 0; i < nNoOfVisibleCols; i++ )
- {
- if((nVisWidth = GetVisibleWidth(i)) + nDiff < MINLAY)
- {
- nAdd += nVisWidth - MINLAY;
- SetVisibleWidth(i, MINLAY);
- }
- }
-*/
-
}
-#ifdef DEBUG_TBLDLG
-DbgTblRep(pTblData)
-#endif
-
if(!bPercentMode)
aSpaceED.SetValue(aSpaceED.Normalize( pTblData->GetSpace() - nTableWidth) , FUNIT_TWIP);
@@ -1237,8 +1135,7 @@ DbgTblRep(pTblData)
}
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
void SwTableColumnPage::ActivatePage( const SfxItemSet& )
{
bPercentMode = pTblData->GetWidthPercent() != 0;
@@ -1277,17 +1174,12 @@ void SwTableColumnPage::ActivatePage( const SfxItemSet& )
aModifyTableCB.Enable( !bPercentMode && bModifyTbl );
aProportionalCB.Enable(!bPercentMode && bModifyTbl );
-/* if(pTblData->IsLineSelected() && pTblData->IsComplex())
- {
-
- }*/
aSpaceED.SetValue(aSpaceED.Normalize(
pTblData->GetSpace() - nTableWidth) , FUNIT_TWIP);
}
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
int SwTableColumnPage::DeactivatePage( SfxItemSet* _pSet )
{
if(_pSet)
@@ -1345,16 +1237,12 @@ int SwTableColumnPage::DeactivatePage( SfxItemSet* _pSet )
}
pTblData->SetWidthChanged();
}
-#ifdef DEBUG_TBLDLG
-DbgTblRep(pTblData)
-#endif
_pSet->Put(SwPtrItem( FN_TABLE_REP, pTblData ));
}
return sal_True;
}
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
SwTwips SwTableColumnPage::GetVisibleWidth(sal_uInt16 nPos)
{
sal_uInt16 i=0;
@@ -1366,16 +1254,14 @@ SwTwips SwTableColumnPage::GetVisibleWidth(sal_uInt16 nPos)
i++;
}
SwTwips nReturn = pTblData->GetColumns()[i].nWidth;
- DBG_ASSERT(i < nNoOfCols, "Array index out of range");
+ OSL_ENSURE(i < nNoOfCols, "Array index out of range");
while(!pTblData->GetColumns()[i].bVisible && (i + 1) < nNoOfCols)
nReturn += pTblData->GetColumns()[++i].nWidth;
-// return (*ppTableColumns)[i].nWidth;
return nReturn;
}
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth)
{
sal_uInt16 i=0;
@@ -1385,15 +1271,14 @@ void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth)
nPos--;
i++;
}
- DBG_ASSERT(i < nNoOfCols, "Array index out of range");
+ OSL_ENSURE(i < nNoOfCols, "Array index out of range");
pTblData->GetColumns()[i].nWidth = nNewWidth;
while(!pTblData->GetColumns()[i].bVisible && (i + 1) < nNoOfCols)
pTblData->GetColumns()[++i].nWidth = 0;
}
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
+
SwTableTabDlg::SwTableTabDlg(Window* pParent, SfxItemPool& ,
const SfxItemSet* pItemSet, SwWrtShell* pSh ) :
SfxTabDialog(pParent, SW_RES(DLG_FORMAT_TABLE), pItemSet,0),
@@ -1402,7 +1287,7 @@ SwTableTabDlg::SwTableTabDlg(Window* pParent, SfxItemPool& ,
{
FreeResource();
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AddTabPage(TP_FORMAT_TABLE, &SwFormatTablePage::Create, 0 );
AddTabPage(TP_TABLE_TEXTFLOW, &SwTextFlowPage::Create, 0 );
AddTabPage(TP_TABLE_COLUMN, &SwTableColumnPage::Create, 0 );
@@ -1411,8 +1296,6 @@ SwTableTabDlg::SwTableTabDlg(Window* pParent, SfxItemPool& ,
}
-/*------------------------------------------------------------------------
-------------------------------------------------------------------------*/
void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
@@ -1439,8 +1322,6 @@ void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
}
}
-/*-----------------12.12.96 12.22-------------------
---------------------------------------------------*/
SwTextFlowPage::SwTextFlowPage( Window* pParent,
const SfxItemSet& rSet ) :
SfxTabPage(pParent, SW_RES( TP_TABLE_TEXTFLOW ), rSet ),
@@ -1517,22 +1398,16 @@ SwTextFlowPage::SwTextFlowPage( Window* pParent,
HeadLineCBClickHdl();
}
-/*-----------------12.12.96 12.22-------------------
---------------------------------------------------*/
SwTextFlowPage::~SwTextFlowPage()
{
}
-/*-----------------12.12.96 12.22-------------------
---------------------------------------------------*/
SfxTabPage* SwTextFlowPage::Create( Window* pParent,
const SfxItemSet& rAttrSet)
{
return new SwTextFlowPage(pParent, rAttrSet);
}
-/*-----------------12.12.96 12.22-------------------
---------------------------------------------------*/
sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
{
sal_Bool bModified = sal_False;
@@ -1649,8 +1524,6 @@ sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
}
-/*-----------------12.12.96 12.22-------------------
---------------------------------------------------*/
void SwTextFlowPage::Reset( const SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
@@ -1835,9 +1708,6 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
HeadLineCBClickHdl();
}
-/*-----------------16.04.98 14:48-------------------
-
---------------------------------------------------*/
void SwTextFlowPage::SetShell(SwWrtShell* pSh)
{
@@ -1850,8 +1720,6 @@ void SwTextFlowPage::SetShell(SwWrtShell* pSh)
}
}
-/*-----------------12.12.96 16.18-------------------
---------------------------------------------------*/
IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG )
{
if( aPgBrkCB.IsChecked() )
@@ -1890,8 +1758,6 @@ IMPL_LINK( SwTextFlowPage, PageBreakHdl_Impl, CheckBox*, EMPTYARG )
return 0;
}
-/*-----------------12.12.96 16.18-------------------
---------------------------------------------------*/
IMPL_LINK( SwTextFlowPage, ApplyCollClickHdl_Impl, CheckBox*, EMPTYARG )
{
sal_Bool bEnable = sal_False;
@@ -1914,8 +1780,6 @@ IMPL_LINK( SwTextFlowPage, ApplyCollClickHdl_Impl, CheckBox*, EMPTYARG )
return 0;
}
-/*-----------------12.12.96 16.18-------------------
---------------------------------------------------*/
IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn )
{
if ( aPgBrkCB.IsChecked() )
@@ -1946,8 +1810,6 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn )
return 0;
}
-/*-----------------12.12.96 16.18-------------------
---------------------------------------------------*/
IMPL_LINK( SwTextFlowPage, PageBreakTypeHdl_Impl, RadioButton*, pBtn )
{
if ( pBtn == &aColBrkRB || aPgBrkAfterRB.IsChecked() )
@@ -1962,17 +1824,13 @@ IMPL_LINK( SwTextFlowPage, PageBreakTypeHdl_Impl, RadioButton*, pBtn )
PageBreakPosHdl_Impl( &aPgBrkBeforeRB );
return 0;
}
-/*-----------------17.11.2003 11:30-----------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwTextFlowPage, SplitHdl_Impl, CheckBox*, pBox )
{
aSplitRowCB.Enable(pBox->IsChecked());
return 0;
}
-/*-----------------17.11.2003 11:30-----------------
- *
- * --------------------------------------------------*/
+
IMPL_LINK( SwTextFlowPage, SplitRowHdl_Impl, TriStateBox*, pBox )
{
pBox->EnableTriState(sal_False);
@@ -1986,9 +1844,6 @@ IMPL_LINK( SwTextFlowPage, HeadLineCBClickHdl, void*, EMPTYARG )
return 0;
}
-/*-----------------30.05.97 07:37-------------------
-
---------------------------------------------------*/
void SwTextFlowPage::DisablePageBreak()
{
bPageBreak = sal_False;
@@ -2005,3 +1860,4 @@ void SwTextFlowPage::DisablePageBreak()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/tabledlg.src b/sw/source/ui/table/tabledlg.src
index 51248119c5f1..1a0fc0ea55ee 100644
--- a/sw/source/ui/table/tabledlg.src
+++ b/sw/source/ui/table/tabledlg.src
@@ -616,7 +616,6 @@ TabPage TP_TABLE_TEXTFLOW
// Disable = TRUE;
Pos = MAP_APPFONT ( 178 , 14 ) ;
Size = MAP_APPFONT ( 70 , 10 ) ;
- // ### ACHTUNG: Neuer Text in Resource? S~palte : ~Spalte
Text [ en-US ] = "Col~umn" ;
};
RadioButton RB_PAGEBREAKBEFORE
diff --git a/sw/source/ui/table/tablemgr.cxx b/sw/source/ui/table/tablemgr.cxx
index 7d4272880643..9887e91955f0 100644
--- a/sw/source/ui/table/tablemgr.cxx
+++ b/sw/source/ui/table/tablemgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,7 +38,6 @@
#include <sot/clsids.hxx>
#include "edtwin.hxx"
-#include "errhdl.hxx"
#include "wrtsh.hxx"
#include "cmdid.h"
#include "frmatr.hxx"
@@ -66,10 +66,10 @@ void SwTableFUNC::ColWidthDlg( Window *pParent )
{
InitTabCols();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
VclAbstractDialog* pDlg = pFact->CreateSwTableWidthDlg( pParent, *this ,DLG_COL_WIDTH );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->Execute();
delete pDlg;
}
@@ -113,7 +113,7 @@ SwTwips SwTableFUNC::GetColWidth(sal_uInt16 nNum) const
SwTwips SwTableFUNC::GetMaxColWidth( sal_uInt16 nNum ) const
{
- ASSERT(nNum <= aCols.Count(), "Index out of Area");
+ OSL_ENSURE(nNum <= aCols.Count(), "Index out of Area");
if ( GetColCount() > 0 )
{
@@ -138,13 +138,12 @@ void SwTableFUNC::SetColWidth(sal_uInt16 nNum, SwTwips nNewWidth )
// aktuelle Breite setzen
// alle folgenden Verschieben
sal_Bool bCurrentOnly = sal_False;
- SwTwips nWidth = 0;
if ( aCols.Count() > 0 )
{
if(aCols.Count() != GetColCount())
bCurrentOnly = sal_True;
- nWidth = GetColWidth(nNum);
+ SwTwips nWidth = GetColWidth(nNum);
int nDiff = (int)(nNewWidth - nWidth);
if( !nNum )
@@ -175,7 +174,7 @@ void SwTableFUNC::SetColWidth(sal_uInt16 nNum, SwTwips nNewWidth )
void SwTableFUNC::InitTabCols()
{
- ASSERT(pSh, keine Shell);
+ OSL_ENSURE(pSh, "no Shell");
if( pFmt && pSh)
pSh->GetTabCols( aCols );
@@ -314,22 +313,22 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
else if (nColLen > 1)
eDataRowSource = chart::ChartDataRowSource_COLUMNS;
else {
- DBG_ERROR( "unexpected state" );
+ OSL_FAIL("unexpected state" );
}
}
uno::Sequence< beans::PropertyValue > aArgs( 4 );
aArgs[0] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CellRangeRepresentation")), -1,
uno::makeAny( rCellRange ), beans::PropertyState_DIRECT_VALUE );
aArgs[1] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("HasCategories"), -1,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasCategories")), -1,
uno::makeAny( bHasCategories ), beans::PropertyState_DIRECT_VALUE );
aArgs[2] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("FirstCellAsLabel"), -1,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FirstCellAsLabel")), -1,
uno::makeAny( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE );
aArgs[3] = beans::PropertyValue(
- ::rtl::OUString::createFromAscii("DataRowSource"), -1,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataRowSource")), -1,
uno::makeAny( eDataRowSource ), beans::PropertyState_DIRECT_VALUE );
xDataReceiver->setArguments( aArgs );
}
@@ -367,7 +366,7 @@ sal_uInt16 SwTableFUNC::GetColCount() const
int SwTableFUNC::GetRightSeparator(int nNum) const
{
- DBG_ASSERT( nNum < (int)GetColCount() ,"Index out of range");
+ OSL_ENSURE( nNum < (int)GetColCount() ,"Index out of range");
int i = 0;
while( nNum >= 0 )
{
@@ -380,3 +379,4 @@ int SwTableFUNC::GetRightSeparator(int nNum) const
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/tablepg.hxx b/sw/source/ui/table/tablepg.hxx
index 07f408ec8556..d18f23dcfd74 100644
--- a/sw/source/ui/table/tablepg.hxx
+++ b/sw/source/ui/table/tablepg.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,15 +28,9 @@
#ifndef _SWTABLEPG_HXX
#define _SWTABLEPG_HXX
#include <sfx2/tabdlg.hxx>
-#ifndef _FIXED_HXX //autogen
#include <vcl/fixed.hxx>
-#endif
-#ifndef _IMAGEBTN_HXX //autogen
#include <vcl/button.hxx>
-#endif
-#ifndef _LSTBOX_HXX //autogen
#include <vcl/lstbox.hxx>
-#endif
#include <actctrl.hxx>
#include "prcntfld.hxx"
#include "swtypes.hxx"
@@ -236,3 +231,5 @@ public:
};
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index e64c5110a942..4ba64561840b 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -35,12 +36,8 @@
-#ifndef _EDIT_HXX //autogen
#include <vcl/edit.hxx>
-#endif
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <vcl/svapp.hxx>
#include <svl/zforlist.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -51,18 +48,12 @@
#include <svx/framelinkarray.hxx>
#include "swmodule.hxx"
#include "swtypes.hxx"
-#ifndef _VIEW_HXX
#include "view.hxx"
-#endif
#include "wrtsh.hxx"
#include "tblafmt.hxx"
-#ifndef _TAUTOFMT_HXX
#include "tautofmt.hxx"
-#endif
#include "shellres.hxx"
-#ifndef _TAUTOFMT_HRC
#include "tautofmt.hrc"
-#endif
using namespace com::sun::star;
@@ -170,7 +161,7 @@ void SwStringInputDlg::GetInputString( String& rString ) const
}
-__EXPORT SwStringInputDlg::~SwStringInputDlg()
+SwStringInputDlg::~SwStringInputDlg()
{
}
@@ -224,7 +215,7 @@ SwAutoFormatDlg::SwAutoFormatDlg( Window* pParent, SwWrtShell* pWrtShell,
//------------------------------------------------------------------------
-__EXPORT SwAutoFormatDlg::~SwAutoFormatDlg()
+SwAutoFormatDlg::~SwAutoFormatDlg()
{
delete pWndPreview;
@@ -337,8 +328,6 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
pData->SetBackground( bCheck );
else if ( pBtn == &aBtnAlignment )
pData->SetJustify( bCheck );
-// else if ( pBtn == &aBtnAdjust )
-// pData->SetIncludeWidthHeight( bCheck );
else
bDataChgd = sal_False;
@@ -608,12 +597,12 @@ AutoFmtPreview::AutoFmtPreview( Window* pParent, const ResId& rRes, SwWrtShell*
else
mbRTL = pWrtShell->IsTableRightToLeft();
- DBG_ASSERT( m_xMSF.is(), "AutoFmtPreview: no MultiServiceFactory");
+ OSL_ENSURE( m_xMSF.is(), "AutoFmtPreview: no MultiServiceFactory");
if ( m_xMSF.is() )
{
m_xBreak = uno::Reference< i18n::XBreakIterator >(
m_xMSF->createInstance (
- rtl::OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator")) ),
uno::UNO_QUERY);
}
pNumFmt = new SvNumberFormatter( m_xMSF, LANGUAGE_SYSTEM );
@@ -623,7 +612,7 @@ AutoFmtPreview::AutoFmtPreview( Window* pParent, const ResId& rRes, SwWrtShell*
//------------------------------------------------------------------------
-__EXPORT AutoFmtPreview::~AutoFmtPreview()
+AutoFmtPreview::~AutoFmtPreview()
{
delete pNumFmt;
}
@@ -764,9 +753,6 @@ MAKENUMSTR:
Rectangle cellRect = maArray.GetCellRect( nCol, nRow );
Point aPos = cellRect.TopLeft();
sal_uInt16 nRightX = 0;
-// sal_Bool bJustify = aCurData.IsJustify();
-// ScHorJustifyAttr aHorJustifyItem;
-// CellHorJustify eJustification;
Size theMaxStrSize( cellRect.GetWidth() - FRAME_OFFSET,
cellRect.GetHeight() - FRAME_OFFSET );
@@ -795,9 +781,6 @@ MAKENUMSTR:
while( theMaxStrSize.Width() <= aStrSize.Width() &&
cellString.Len() > 1 )
{
-// if( eJustification == SVX_HOR_JUSTIFY_RIGHT )
-// cellString.Erase( 0, 1 );
-// else
cellString.Erase( cellString.Len() - 1 );
aScriptedText.SetText( cellString, m_xBreak );
aStrSize = aScriptedText.GetTextSize();
@@ -806,18 +789,6 @@ MAKENUMSTR:
nRightX = (sal_uInt16)( cellRect.GetWidth()
- aStrSize.Width()
- FRAME_OFFSET );
- //-------------
- // Ausrichtung:
- //-------------
- /* if ( bJustify )
- {
- aCurData.GetHorJustify( nFmtIndex, aHorJustifyItem );
- eJustification = (CellHorJustify)aHorJustifyItem.GetValue();
- }
- else
- {
- eJustification = SC_HOR_JUSTIFY_STANDARD;
- }*/
//-----------------------------
// vertikal (immer zentrieren):
@@ -827,7 +798,6 @@ MAKENUMSTR:
//-----------
// horizontal
//-----------
-/* if ( eJustification != SC_HOR_JUSTIFY_STANDARD )*/
if( mbRTL )
aPos.X() += nRightX;
else if (aCurData.IsJustify())
@@ -922,7 +892,7 @@ void AutoFmtPreview::PaintCells()
//------------------------------------------------------------------------
-void __EXPORT AutoFmtPreview::Init()
+void AutoFmtPreview::Init()
{
SetBorderStyle( GetBorderStyle() | WINDOW_BORDER_MONO );
maArray.Initialize( 5, 5 );
@@ -1051,7 +1021,9 @@ void AutoFmtPreview::DoPaint( const Rectangle& /*rRect*/ )
//------------------------------------------------------------------------
-void __EXPORT AutoFmtPreview::Paint( const Rectangle& rRect )
+void AutoFmtPreview::Paint( const Rectangle& rRect )
{
DoPaint( rRect );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/table/tautofmt.src b/sw/source/ui/table/tautofmt.src
index e338dc9a4b73..1b3d66b79905 100644
--- a/sw/source/ui/table/tautofmt.src
+++ b/sw/source/ui/table/tautofmt.src
@@ -214,8 +214,6 @@ ModalDialog DLG_AUTOFMT_TABLE
};
String STR_INVALID_AFNAME
{
- /* ### ACHTUNG: Neuer Text in Resource? Sie haben einen ungültigen Namen angegeben.\nDas AutoFormat konnte nicht angelegt werden.\nWählen Sie einen anderen Namen. : Sie haben einen ungültigen Namen angegeben.\nDas Autoformat konnte nicht angelegt werden.\nWählen Sie einen anderen Namen. */
- /* ### ACHTUNG: Neuer Text in Resource? Sie haben einen ungültigen Namen angegeben.\nDas AutoFormat konnte nicht angelegt werden.\nWählen Sie einen anderen Namen. : Sie haben einen ungültigen Namen angegeben.\nDas Autoformat konnte nicht angelegt werden.\nWählen Sie einen anderen Namen. */
Text [ en-US ] = "You have entered an invalid name.\nThe desired AutoFormat could not be created. \nTry again using a different name." ;
};
};