summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-08-12 11:31:56 +0200
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-08-12 11:34:53 +0200
commit616fa2e637852d31d61342625ce9c7d92834904d (patch)
tree0d98bc189cb94e91a7bc2bc2657158528cfbc4f0 /sw
parent7e7640beb9ceea90467cf4028f926e4358957800 (diff)
sw: Removed SwWrtShell::_CanInsert(), that method only for a beep...
Used SwWrtShell::CanInsert() instead as it's the one doing the job. The _CanInsert was just a wrapper to Beep() when the result was false. Yuk!
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/inc/wrtsh.hxx1
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx33
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx6
3 files changed, 12 insertions, 28 deletions
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 634cd97966c4..ef7337d6178f 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -612,7 +612,6 @@ private:
SW_DLLPRIVATE long Ignore(const Point *, sal_Bool bProp=sal_False );
SW_DLLPRIVATE void LeaveExtSel() { bSelWrd = bSelLn = sal_False;}
- SW_DLLPRIVATE sal_Bool _CanInsert();
SW_DLLPRIVATE sal_Bool GoStart(sal_Bool KeepArea = sal_False, sal_Bool * = 0,
sal_Bool bSelect = sal_False, sal_Bool bDontMoveRegion = sal_False);
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index 97c1ca230b79..9a3a7d953644 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -183,21 +183,6 @@ sal_Bool SwWrtShell::IsEndWrd()
/*------------------------------------------------------------------------
- Beschreibung: Abfrage, ob Einfuegen moeglich ist; gfs. Beep
-------------------------------------------------------------------------*/
-
-
-
-sal_Bool SwWrtShell::_CanInsert()
-{
- if(!CanInsert())
- {
- Sound::Beep();
- return sal_False;
- }
- return sal_True;
-}
-/*------------------------------------------------------------------------
Beschreibung: String einfuegen
------------------------------------------------------------------------*/
@@ -225,7 +210,7 @@ void SwWrtShell::InsertByWord( const String & rStr)
void SwWrtShell::Insert( const String &rStr )
{
ResetCursorStack();
- if( !_CanInsert() )
+ if( !CanInsert() )
return;
sal_Bool bStarted = sal_False, bHasSel = HasSelection(),
@@ -278,7 +263,7 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter,
sal_Bool bRule )
{
ResetCursorStack();
- if ( !_CanInsert() )
+ if ( !CanInsert() )
return;
StartAllAction();
@@ -378,7 +363,7 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
sal_Bool bActivate, sal_uInt16 nSlotId )
{
ResetCursorStack();
- if( !_CanInsert() )
+ if( !CanInsert() )
return;
if( !xRef.is() )
@@ -906,7 +891,7 @@ void SwWrtShell::ConnectObj( svt::EmbeddedObjectRef& xObj, const SwRect &rPrt,
void SwWrtShell::InsertPageBreak(const String *pPageDesc, sal_uInt16 nPgNum )
{
ResetCursorStack();
- if( _CanInsert() )
+ if( CanInsert() )
{
ACT_KONTEXT(this);
StartUndo(UNDO_UI_INSERT_PAGE_BREAK);
@@ -942,7 +927,7 @@ void SwWrtShell::InsertPageBreak(const String *pPageDesc, sal_uInt16 nPgNum )
void SwWrtShell::InsertLineBreak()
{
ResetCursorStack();
- if( _CanInsert() )
+ if( CanInsert() )
{
if(HasSelection())
DelRight();
@@ -965,7 +950,7 @@ void SwWrtShell::InsertColumnBreak()
{
ACT_KONTEXT(this);
ResetCursorStack();
- if( _CanInsert() )
+ if( CanInsert() )
{
StartUndo(UNDO_UI_INSERT_COLUMN_BREAK);
@@ -990,7 +975,7 @@ void SwWrtShell::InsertColumnBreak()
void SwWrtShell::InsertFootnote(const String &rStr, sal_Bool bEndNote, sal_Bool bEdit )
{
ResetCursorStack();
- if( _CanInsert() )
+ if( CanInsert() )
{
if(HasSelection())
{
@@ -1025,7 +1010,7 @@ void SwWrtShell::InsertFootnote(const String &rStr, sal_Bool bEndNote, sal_Bool
void SwWrtShell::SplitNode( sal_Bool bAutoFmt, sal_Bool bCheckTableStart )
{
ResetCursorStack();
- if( _CanInsert() )
+ if( CanInsert() )
{
ACT_KONTEXT(this);
@@ -1675,7 +1660,7 @@ void SwWrtShell::AutoUpdateFrame( SwFrmFmt* pFmt, const SfxItemSet& rStyleSet )
void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar )
{
ResetCursorStack();
- if(_CanInsert())
+ if(CanInsert())
{
sal_Bool bStarted = sal_False;
if(HasSelection())
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index d5612caaceb6..172500cd3fd0 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -77,7 +77,7 @@
void SwWrtShell::Insert(SwField &rFld)
{
ResetCursorStack();
- if(!_CanInsert())
+ if(!CanInsert())
return;
StartAllAction();
@@ -196,7 +196,7 @@ sal_Bool SwWrtShell::StartDropDownFldDlg(SwField* pFld, sal_Bool bNextButton, By
void SwWrtShell::InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
{
- if(!_CanInsert())
+ if(!CanInsert())
return;
if(HasSelection())
@@ -214,7 +214,7 @@ sal_Bool SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet
{
sal_Bool bResult = sal_False;
- if(_CanInsert())
+ if(CanInsert())
{
bResult = SwEditShell::UpdateTableOf(rTOX, pSet);