summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMathieu Vonlanthen <mat_von@fastmail.fm>2012-07-19 11:02:45 +0200
committerMichael Meeks <michael.meeks@suse.com>2012-07-23 15:12:44 +0100
commit0f6101cfef4c2e45d9f1f1b3a61ef94799e4526b (patch)
tree5b545b1e2a221f5a1b3d36acc3298bcb2f3649f8 /sc
parent65e2c77e762a667b965ab3dc2bcaf8b8d1a0bc91 (diff)
fdo#48549 System::Beep() removal
Change-Id: I8fe133dd8d1f759fbe21d47ae358c0b5451812b5
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/documen4.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx6
-rw-r--r--sc/source/ui/docshell/docfunc.cxx6
-rw-r--r--sc/source/ui/docshell/olinefun.cxx8
-rw-r--r--sc/source/ui/navipi/content.cxx2
-rw-r--r--sc/source/ui/navipi/navipi.cxx2
-rw-r--r--sc/source/ui/view/editsh.cxx12
-rw-r--r--sc/source/ui/view/gridwin.cxx10
-rw-r--r--sc/source/ui/view/gridwin2.cxx2
-rw-r--r--sc/source/ui/view/select.cxx1
-rw-r--r--sc/source/ui/view/tabcont.cxx3
-rw-r--r--sc/source/ui/view/tabvwshe.cxx1
-rw-r--r--sc/source/ui/view/viewfun2.cxx4
-rw-r--r--sc/source/ui/view/viewfun6.cxx47
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
15 files changed, 8 insertions, 100 deletions
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 41e058a48cfb..a315f3cc6dc7 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -146,7 +146,6 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
nTab1 = i;
if (!bStop)
{
- Sound::Beep();
OSL_FAIL("ScDocument::InsertMatrixFormula Keine Tabelle markiert");
return;
}
@@ -239,7 +238,6 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
nTab1 = i;
if (!bStop)
{
- Sound::Beep();
OSL_FAIL("ScDocument::InsertTableOp: Keine Tabelle markiert");
return;
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index cbadad7940e0..5721c880d43e 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1659,12 +1659,6 @@ void ScInputHandler::NextAutoEntry( bool bBack )
bInOwnChange = false;
}
- else
- {
- // mehr gibts nicht
-
- Sound::Beep();
- }
}
}
}
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 29dda061dda0..f6941a1b46c2 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -4520,17 +4520,13 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, sal_Bool bRecord
bRecord = false;
ScDocument* pUndoDoc = NULL;
- bool bBeep = false;
for (set<SCTAB>::const_iterator itr = rOption.maTabs.begin(), itrEnd = rOption.maTabs.end();
itr != itrEnd; ++itr)
{
SCTAB nTab = *itr;
ScRange aRange = rOption.getSingleRange(nTab);
if ( !pDoc->HasAttrib(aRange, HASATTR_MERGED) )
- {
- bBeep = true;
continue;
- }
ScRange aExtended = aRange;
pDoc->ExtendMerge(aExtended);
@@ -4563,8 +4559,6 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, sal_Bool bRecord
if ( !AdjustRowHeight( aExtended ) )
rDocShell.PostPaint( aExtended, PAINT_GRID );
}
- if (bBeep && !bApi)
- Sound::Beep();
if (bRecord)
{
diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx
index 455bc56759b2..3c177eba368d 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -271,8 +271,6 @@ sal_Bool ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, sal_Bool bRecord, sal_
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
bSuccess = sal_True;
}
- else if (!bApi)
- Sound::Beep();
return bSuccess;
}
@@ -548,9 +546,6 @@ sal_Bool ScOutlineDocFunc::ShowMarkedOutlines( const ScRange& rRange, sal_Bool b
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
}
- if (!bDone && !bApi)
- Sound::Beep();
-
return bDone;
}
@@ -646,9 +641,6 @@ sal_Bool ScOutlineDocFunc::HideMarkedOutlines( const ScRange& rRange, sal_Bool b
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
}
- if (!bDone && !bApi)
- Sound::Beep();
-
return bDone;
}
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 30df413aba30..e6e92cbf4514 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -1296,8 +1296,6 @@ sal_Bool ScContentTree::LoadFile( const String& rUrl )
pParentWindow->GetDocNames( &aHiddenTitle ); // Liste fuellen
}
- else
- Sound::Beep(); // Fehler beim Laden
// Dokument wird im dtor von ScDocumentLoader wieder geschlossen
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 6b2f9aa89396..d89f87bd12cc 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -1034,8 +1034,6 @@ void ScNavigatorDlg::SetCurrentTableStr( const rtl::OUString& rName )
return;
}
}
-
- Sound::Beep(); // Tabelle nicht gefunden
}
//------------------------------------------------------------------------
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 66ac4881e427..305b24bc693f 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -292,10 +292,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
// while the dialog was open, edit mode may have been stopped
if (!SC_MOD()->IsInputMode())
- {
- Sound::Beep();
return;
- }
if (nFormat > 0)
{
@@ -366,10 +363,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
// while the dialog was open, edit mode may have been stopped
if (!SC_MOD()->IsInputMode())
- {
- Sound::Beep();
return;
- }
}
if ( aString.Len() )
@@ -420,7 +414,6 @@ void ScEditShell::Execute( SfxRequest& rReq )
// while the dialog was open, edit mode may have been stopped
if (!SC_MOD()->IsInputMode())
{
- Sound::Beep();
delete pDlg;
return;
}
@@ -466,7 +459,6 @@ void ScEditShell::Execute( SfxRequest& rReq )
// while the dialog was open, edit mode may have been stopped
if (!SC_MOD()->IsInputMode())
{
- Sound::Beep();
delete pDlg;
return;
}
@@ -482,7 +474,6 @@ void ScEditShell::Execute( SfxRequest& rReq )
case SID_TOGGLE_REL:
{
- bool bOk = false;
if (pEngine->GetParagraphCount() == 1)
{
String aText = pEngine->GetText();
@@ -502,14 +493,11 @@ void ScEditShell::Execute( SfxRequest& rReq )
pTopView->GetEditEngine()->SetText( aNew );
pTopView->SetSelection( aNewSel );
}
- bOk = true;
// Referenz wird selektiert -> beim Tippen nicht ueberschreiben
bSetSelIsRef = sal_True;
}
}
- if (!bOk)
- Sound::Beep(); // keine Referenzen oder mehrere Absaetze
}
break;
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index d5400f3da78d..3ef6eb1848f8 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1401,7 +1401,6 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec
{
DELETEZ(pFilterBox); // war nix
DELETEZ(pFilterFloat);
- Sound::Beep(); // bemerkbar machen
}
else
{
@@ -1775,10 +1774,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt )
ScModule* pScMod = SC_MOD();
if (pScMod->IsModalMode(pViewData->GetSfxDocShell()))
- {
- Sound::Beep();
return;
- }
pScActiveViewShell = pViewData->GetViewShell(); // falls auf Link geklickt wird
nScClickMouseModifier = rMEvt.GetModifier(); // um Control-Klick immer zu erkennen
@@ -2143,8 +2139,6 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
::svl::IUndoManager* pMgr = pViewData->GetDocShell()->GetUndoManager();
if ( pMgr->GetUndoActionCount() && pMgr->GetUndoActionId() == STR_UNDO_APPLYCELLSTYLE )
pMgr->Undo();
- else
- Sound::Beep();
return;
}
@@ -2330,8 +2324,6 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
Sequence<sheet::DataPilotFieldFilter> aFilters;
if ( pDPObj->GetDataFieldPositionData(aCellPos, aFilters) )
pViewData->GetView()->ShowDataPilotSourceData( *pDPObj, aFilters );
- else
- Sound::Beep(); // nothing to expand/collapse/show
}
return;
@@ -4199,8 +4191,6 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
pDocSh->GetUndoManager()->LeaveListAction();
- if (!bDone)
- Sound::Beep(); // instead of error message in drop handler
}
else
bDone = sal_True; // nothing to do
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 0c7fb5468e4d..d569a4942cd7 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -234,8 +234,6 @@ void ScGridWindow::DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt
}
delete pDlg;
}
- else
- Sound::Beep();
}
else
{
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index 5bcaa8485ea7..6536d5a694d5 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -229,7 +229,6 @@ void ScViewFunctionSet::BeginDrag()
}
}
- Sound::Beep(); // can't drag
}
// Selection
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 26a7017bc641..bc5cf5062b41 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -230,7 +230,6 @@ void ScTabControl::Select()
SelectPage( static_cast<sal_uInt16>(i)+1, rMark.GetTableSelect(i) );
SetCurPageId( static_cast<sal_uInt16>(pViewData->GetTabNo()) + 1 );
- Sound::Beep();
return;
}
@@ -517,8 +516,6 @@ sal_Int8 ScTabControl::ExecuteDrop( const ExecuteDropEvent& rEvt )
rData.pCellTransfer->SetDragWasInternal(); // don't delete
return sal_True;
}
- else
- Sound::Beep();
}
}
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index f3c678f3ce16..3f941bc7f45f 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -198,7 +198,6 @@ void ScTabViewShell::InsertURLField( const String& rName, const String& rURL, co
if ( !SelectionEditable() )
{
// no error message (may be called from drag&drop)
- Sound::Beep();
return;
}
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index dcc3b0582d40..e3515d795a36 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2832,8 +2832,6 @@ void ScViewFunc::ShowTable( const String& rName )
pDocSh->PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS);
pDocSh->SetDocumentModified();
}
- else
- Sound::Beep();
}
@@ -2868,8 +2866,6 @@ void ScViewFunc::HideTable( SCTAB nTab )
pDocSh->PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS);
pDocSh->SetDocumentModified();
}
- else
- Sound::Beep();
}
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 87f5ec1fcb6a..2b9c1f703741 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -66,87 +66,56 @@ using ::std::vector;
void ScViewFunc::DetectiveAddPred()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- sal_Bool bDone = pDocSh->GetDocFunc().
- DetectiveAddPred( GetViewData()->GetCurPos() );
- if (!bDone)
- Sound::Beep();
-
+ pDocSh->GetDocFunc().DetectiveAddPred( GetViewData()->GetCurPos() );
RecalcPPT(); //! use broadcast in DocFunc instead?
}
void ScViewFunc::DetectiveDelPred()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- sal_Bool bDone = pDocSh->GetDocFunc().
- DetectiveDelPred( GetViewData()->GetCurPos() );
- if (!bDone)
- Sound::Beep();
-
+ pDocSh->GetDocFunc().DetectiveDelPred( GetViewData()->GetCurPos() );
RecalcPPT();
}
void ScViewFunc::DetectiveAddSucc()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- sal_Bool bDone = pDocSh->GetDocFunc().
- DetectiveAddSucc( GetViewData()->GetCurPos() );
- if (!bDone)
- Sound::Beep();
-
+ pDocSh->GetDocFunc().DetectiveAddSucc( GetViewData()->GetCurPos() );
RecalcPPT();
}
void ScViewFunc::DetectiveDelSucc()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- sal_Bool bDone = pDocSh->GetDocFunc().
- DetectiveDelSucc( GetViewData()->GetCurPos() );
- if (!bDone)
- Sound::Beep();
-
+ pDocSh->GetDocFunc().DetectiveDelSucc( GetViewData()->GetCurPos() );
RecalcPPT();
}
void ScViewFunc::DetectiveAddError()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- sal_Bool bDone = pDocSh->GetDocFunc().
- DetectiveAddError( GetViewData()->GetCurPos() );
- if (!bDone)
- Sound::Beep();
-
+ pDocSh->GetDocFunc().DetectiveAddError( GetViewData()->GetCurPos() );
RecalcPPT();
}
void ScViewFunc::DetectiveDelAll()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- sal_Bool bDone = pDocSh->GetDocFunc().
- DetectiveDelAll( GetViewData()->GetTabNo() );
- if (!bDone)
- Sound::Beep();
-
+ pDocSh->GetDocFunc().DetectiveDelAll( GetViewData()->GetTabNo() );
RecalcPPT();
}
void ScViewFunc::DetectiveMarkInvalid()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- sal_Bool bDone = pDocSh->GetDocFunc().
- DetectiveMarkInvalid( GetViewData()->GetTabNo() );
- if (!bDone)
- Sound::Beep();
-
+ pDocSh->GetDocFunc().DetectiveMarkInvalid( GetViewData()->GetTabNo() );
RecalcPPT();
}
void ScViewFunc::DetectiveRefresh()
{
ScDocShell* pDocSh = GetViewData()->GetDocShell();
- sal_Bool bDone = pDocSh->GetDocFunc().DetectiveRefresh();
- if (!bDone)
- Sound::Beep();
-
+ pDocSh->GetDocFunc().DetectiveRefresh();
RecalcPPT();
}
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 4f0b3048a647..b55d508b1268 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2753,8 +2753,6 @@ void ScViewFunc::ChangeNumFmtDecimals( sal_Bool bIncrement )
// ATTR_LANGUAGE_FORMAT not
ApplySelectionPattern( aNewAttrs, sal_True );
}
- else
- Sound::Beep(); // was nothing
}
void ScViewFunc::ChangeIndent( sal_Bool bIncrement )