summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-11 16:01:26 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-10-11 15:14:52 +0000
commit8044acf2db9d125d5ed58ed25df5df4a90f37ac6 (patch)
tree67af1fff3f9bc0d144b80d5ecbe5a078cd08dbd3 /starmath
parentcb7ede2d9970a4d162dc71922f578922c0d6235a (diff)
convert SFX_CALLMODE constants to SfxCallMode enum class
and fix a couple of bugs in SC and SW where the call mode was being passed to the hints parameter by accident Change-Id: Ief805410b3f7035e012e229e77f92d5832430f58 Reviewed-on: https://gerrit.libreoffice.org/11916 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/qa/cppunit/test_starmath.cxx28
-rw-r--r--starmath/source/ElementsDockingWindow.cxx2
-rw-r--r--starmath/source/dialog.cxx2
-rw-r--r--starmath/source/edit.cxx4
-rw-r--r--starmath/source/toolbox.cxx4
-rw-r--r--starmath/source/view.cxx4
6 files changed, 22 insertions, 22 deletions
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx
index 3889c40d29c8..fe4b7ef008f4 100644
--- a/starmath/qa/cppunit/test_starmath.cxx
+++ b/starmath/qa/cppunit/test_starmath.cxx
@@ -185,7 +185,7 @@ void Test::editUndoRedo()
CPPUNIT_ASSERT_MESSAGE("Strings must match", sStringTwo == sFinalText);
}
- SfxRequest aUndo(SID_UNDO, SFX_CALLMODE_SYNCHRON, m_xDocShRef->GetPool());
+ SfxRequest aUndo(SID_UNDO, SfxCallMode::SYNCHRON, m_xDocShRef->GetPool());
{
m_xDocShRef->Execute(aUndo);
@@ -201,7 +201,7 @@ void Test::editUndoRedo()
CPPUNIT_ASSERT_MESSAGE("Must now be empty", !sFinalText.getLength());
}
- SfxRequest aRedo(SID_REDO, SFX_CALLMODE_SYNCHRON, m_xDocShRef->GetPool());
+ SfxRequest aRedo(SID_REDO, SfxCallMode::SYNCHRON, m_xDocShRef->GetPool());
{
m_xDocShRef->Execute(aRedo);
m_xDocShRef->UpdateText();
@@ -238,14 +238,14 @@ void Test::viewZoom()
nOrigZoom = rGraphicWindow.GetZoom();
{
- SfxRequest aZoomIn(SID_ZOOMIN, SFX_CALLMODE_SYNCHRON, m_pViewShell->GetPool());
+ SfxRequest aZoomIn(SID_ZOOMIN, SfxCallMode::SYNCHRON, m_pViewShell->GetPool());
m_pViewShell->Execute(aZoomIn);
nNextZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should be bigger", nNextZoom > nOrigZoom);
}
{
- SfxRequest aZoomOut(SID_ZOOMOUT, SFX_CALLMODE_SYNCHRON, m_pViewShell->GetPool());
+ SfxRequest aZoomOut(SID_ZOOMOUT, SfxCallMode::SYNCHRON, m_pViewShell->GetPool());
m_pViewShell->Execute(aZoomOut);
nFinalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should be equal", nFinalZoom == nOrigZoom);
@@ -254,7 +254,7 @@ void Test::viewZoom()
sal_uInt16 nOptimalZoom=0;
{
- SfxRequest aZoom(SID_ZOOM_OPTIMAL, SFX_CALLMODE_SYNCHRON, m_pViewShell->GetPool());
+ SfxRequest aZoom(SID_ZOOM_OPTIMAL, SfxCallMode::SYNCHRON, m_pViewShell->GetPool());
m_pViewShell->Execute(aZoom);
nOptimalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should be about 800%", nOptimalZoom > nOrigZoom);
@@ -263,7 +263,7 @@ void Test::viewZoom()
{
SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
aSet.Put(SvxZoomItem(SVX_ZOOM_OPTIMAL, 0));
- SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should be optimal zoom", nFinalZoom == nOptimalZoom);
@@ -273,28 +273,28 @@ void Test::viewZoom()
//consistent value regardless of
#if 0
{
- SfxRequest aZoomOut(SID_ZOOMOUT, SFX_CALLMODE_SYNCHRON, m_pViewShell->GetPool());
+ SfxRequest aZoomOut(SID_ZOOMOUT, SfxCallMode::SYNCHRON, m_pViewShell->GetPool());
m_pViewShell->Execute(aZoomOut);
nFinalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should not be optimal zoom", nFinalZoom != nOptimalZoom);
SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
aSet.Put(SvxZoomItem(SVX_ZOOM_PAGEWIDTH, 0));
- SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should be same as optimal zoom", nFinalZoom == nOptimalZoom);
}
{
- SfxRequest aZoomOut(SID_ZOOMOUT, SFX_CALLMODE_SYNCHRON, m_pViewShell->GetPool());
+ SfxRequest aZoomOut(SID_ZOOMOUT, SfxCallMode::SYNCHRON, m_pViewShell->GetPool());
m_pViewShell->Execute(aZoomOut);
nFinalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should not be optimal zoom", nFinalZoom != nOptimalZoom);
SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
aSet.Put(SvxZoomItem(SVX_ZOOM_WHOLEPAGE, 0));
- SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should be same as optimal zoom", nFinalZoom == nOptimalZoom);
@@ -302,14 +302,14 @@ void Test::viewZoom()
#endif
{
- SfxRequest aZoomOut(SID_ZOOMOUT, SFX_CALLMODE_SYNCHRON, m_pViewShell->GetPool());
+ SfxRequest aZoomOut(SID_ZOOMOUT, SfxCallMode::SYNCHRON, m_pViewShell->GetPool());
m_pViewShell->Execute(aZoomOut);
nFinalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should not be optimal zoom", nFinalZoom != nOptimalZoom);
SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
aSet.Put(SvxZoomItem(SVX_ZOOM_PERCENT, 50));
- SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should be 50%", nFinalZoom == 50);
@@ -318,7 +318,7 @@ void Test::viewZoom()
{
SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
aSet.Put(SvxZoomItem(SVX_ZOOM_PERCENT, 5));
- SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should be Clipped to 25%", nFinalZoom == 25);
@@ -327,7 +327,7 @@ void Test::viewZoom()
{
SfxItemSet aSet(m_xDocShRef->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM);
aSet.Put(SvxZoomItem(SVX_ZOOM_PERCENT, 1000));
- SfxRequest aZoom(SID_ATTR_ZOOM, SFX_CALLMODE_SYNCHRON, aSet);
+ SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet);
m_pViewShell->Execute(aZoom);
nFinalZoom = rGraphicWindow.GetZoom();
CPPUNIT_ASSERT_MESSAGE("Should be Clipped to 800%", nFinalZoom == 800);
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 059a1d1c00c7..9ea3b2cebfb7 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -669,7 +669,7 @@ IMPL_LINK( SmElementsDockingWindow, SelectClickHdl, SmElement*, pElement)
if (pViewSh)
{
pViewSh->GetViewFrame()->GetDispatcher()->Execute(
- SID_INSERTCOMMANDTEXT, SFX_CALLMODE_STANDARD,
+ SID_INSERTCOMMANDTEXT, SfxCallMode::RECORD,
new SfxStringItem(SID_INSERTCOMMANDTEXT, pElement->getText()), 0L);
}
return 0;
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index e731fb6bc6d0..272405ba5164 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1439,7 +1439,7 @@ IMPL_LINK_NOARG( SmSymbolDialog, GetClickHdl )
aText.append('%').append(pSym->GetName()).append(' ');
rViewSh.GetViewFrame()->GetDispatcher()->Execute(
- SID_INSERTSYMBOL, SFX_CALLMODE_STANDARD,
+ SID_INSERTSYMBOL, SfxCallMode::RECORD,
new SfxStringItem(SID_INSERTSYMBOL, aText.makeStringAndClear()), 0L);
}
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 9ab5776e9810..f7a751a7b743 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -397,7 +397,7 @@ IMPL_LINK_INLINE_START( SmEditWindow, MenuSelectHdl, Menu *, pMenu )
SmViewShell *pViewSh = rCmdBox.GetView();
if (pViewSh)
pViewSh->GetViewFrame()->GetDispatcher()->Execute(
- SID_INSERTCOMMAND, SFX_CALLMODE_STANDARD,
+ SID_INSERTCOMMAND, SfxCallMode::RECORD,
new SfxInt16Item(SID_INSERTCOMMAND, pMenu->GetCurItemId()), 0L);
return 0;
}
@@ -1078,7 +1078,7 @@ void SmEditWindow::Flush()
if (pViewSh)
{
pViewSh->GetViewFrame()->GetDispatcher()->Execute(
- SID_TEXT, SFX_CALLMODE_STANDARD,
+ SID_TEXT, SfxCallMode::RECORD,
new SfxStringItem(SID_TEXT, GetText()), 0L);
}
}
diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx
index 04a93553be68..7b64e3c09516 100644
--- a/starmath/source/toolbox.cxx
+++ b/starmath/source/toolbox.cxx
@@ -240,7 +240,7 @@ bool SmToolBoxWindow::Close()
SmViewShell *pViewSh = GetView();
if (pViewSh)
pViewSh->GetViewFrame()->GetDispatcher()->Execute(
- SID_TOOLBOX, SFX_CALLMODE_STANDARD,
+ SID_TOOLBOX, SfxCallMode::RECORD,
new SfxBoolItem(SID_TOOLBOX, false), 0L);
return true;
}
@@ -334,7 +334,7 @@ IMPL_LINK( SmToolBoxWindow, CmdSelectHdl, ToolBox*, pToolBox)
SmViewShell *pViewSh = GetView();
if (pViewSh)
pViewSh->GetViewFrame()->GetDispatcher()->Execute(
- SID_INSERTCOMMAND, SFX_CALLMODE_STANDARD,
+ SID_INSERTCOMMAND, SfxCallMode::RECORD,
new SfxInt16Item(SID_INSERTCOMMAND, pToolBox->GetCurItemId()), 0L);
return 0;
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index f9c77ca2b4ca..075941d4d670 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1603,7 +1603,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
if (pWin->IsAllSelected())
{
GetViewFrame()->GetDispatcher()->Execute(
- SID_COPYOBJECT, SFX_CALLMODE_STANDARD,
+ SID_COPYOBJECT, SfxCallMode::RECORD,
new SfxVoidItem(SID_COPYOBJECT), 0L);
}
else
@@ -1629,7 +1629,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
if( bCallExec )
{
GetViewFrame()->GetDispatcher()->Execute(
- SID_PASTEOBJECT, SFX_CALLMODE_STANDARD,
+ SID_PASTEOBJECT, SfxCallMode::RECORD,
new SfxVoidItem(SID_PASTEOBJECT), 0L);
}
}