summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorJacek Fraczek <fraczek.jacek@gmail.com>2016-10-05 22:00:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-10 08:48:30 +0000
commitf004aa99514d385f3ee254bba735f5eaeb7d9ad8 (patch)
treeaacd5792f553b8e9cbf029cc7e0797ed0dd423fe /starmath
parent728c7327bd97602a38723553ed044ea4c01d13b2 (diff)
tdf#89307: Removed SvRef::operator T*()
Conditional statements are using SvRef::Is() method. Changed static_cast<T*>(svRef<T>) occurances to svRef.get(). Added operator == and != to SvRef. SbxObject::Execute is using SbxVariableRef internally. SbxObject::FindQualified is using SbxVariableRef internally. Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395 Reviewed-on: https://gerrit.libreoffice.org/29621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/qa/cppunit/test_cursor.cxx8
-rw-r--r--starmath/qa/cppunit/test_node.cxx2
-rw-r--r--starmath/qa/cppunit/test_nodetotextvisitors.cxx8
-rw-r--r--starmath/qa/cppunit/test_parse.cxx2
-rw-r--r--starmath/qa/extras/mmlexport-test.cxx2
-rw-r--r--starmath/qa/extras/mmlimport-test.cxx2
-rw-r--r--starmath/source/document.cxx2
-rw-r--r--starmath/source/smdetect.cxx2
-rw-r--r--starmath/source/unofilter.cxx2
9 files changed, 15 insertions, 15 deletions
diff --git a/starmath/qa/cppunit/test_cursor.cxx b/starmath/qa/cppunit/test_cursor.cxx
index 51e555f777fd..6cbc4fe2ef41 100644
--- a/starmath/qa/cppunit/test_cursor.cxx
+++ b/starmath/qa/cppunit/test_cursor.cxx
@@ -71,7 +71,7 @@ void Test::testCopyPaste()
std::unique_ptr<SmNode> xTree(SmParser().Parse(sInput));
xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
- SmCursor aCursor(xTree.get(), xDocShRef);
+ SmCursor aCursor(xTree.get(), xDocShRef.get());
ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
// go to the position at "*"
@@ -94,7 +94,7 @@ void Test::testCopySelectPaste()
std::unique_ptr<SmNode> xTree(SmParser().Parse(sInput));
xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
- SmCursor aCursor(xTree.get(), xDocShRef);
+ SmCursor aCursor(xTree.get(), xDocShRef.get());
ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
// go to the right end
@@ -121,7 +121,7 @@ void Test::testCutPaste()
std::unique_ptr<SmNode> xTree(SmParser().Parse(sInput));
xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
- SmCursor aCursor(xTree.get(), xDocShRef);
+ SmCursor aCursor(xTree.get(), xDocShRef.get());
ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
// go to the position at "*"
@@ -144,7 +144,7 @@ void Test::testCutSelectPaste()
std::unique_ptr<SmNode> xTree(SmParser().Parse(sInput));
xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
- SmCursor aCursor(xTree.get(), xDocShRef);
+ SmCursor aCursor(xTree.get(), xDocShRef.get());
ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
// go to the right end
diff --git a/starmath/qa/cppunit/test_node.cxx b/starmath/qa/cppunit/test_node.cxx
index b07f26ca039a..fbeca91dbdc1 100644
--- a/starmath/qa/cppunit/test_node.cxx
+++ b/starmath/qa/cppunit/test_node.cxx
@@ -55,7 +55,7 @@ void NodeTest::setUp()
void NodeTest::tearDown()
{
- if (mxDocShell)
+ if (mxDocShell.Is())
mxDocShell->DoClose();
BootstrapFixture::tearDown();
}
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index f6f82918eee1..c3c17f96cb7a 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -521,7 +521,7 @@ void Test::testBinomInBinHor()
pTree = SmParser().Parse(sInput);
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
- SmCursor aCursor(pTree, xDocShRef);
+ SmCursor aCursor(pTree, xDocShRef.get());
ScopedVclPtrInstance< VirtualDevice > pOutputDevice;
// move forward (more than) enough places to be at the end
@@ -549,7 +549,7 @@ void Test::testBinVerInUnary()
pTree = SmParser().Parse(sInput);
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
- SmCursor aCursor(pTree, xDocShRef);
+ SmCursor aCursor(pTree, xDocShRef.get());
ScopedVclPtrInstance< VirtualDevice > pOutputDevice;
// move forward (more than) enough places to be at the end
@@ -578,7 +578,7 @@ void Test::testBinHorInSubSup()
SmNode* pTree = SmParser().Parse(sInput);
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
- SmCursor aCursor(pTree, xDocShRef);
+ SmCursor aCursor(pTree, xDocShRef.get());
ScopedVclPtrInstance< VirtualDevice > pOutputDevice;
// Insert an RSup expression with a BinHor for the exponent
@@ -606,7 +606,7 @@ void Test::testUnaryInMixedNumberAsNumerator()
SmNode* pTree = SmParser().Parse(sInput);
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
- SmCursor aCursor(pTree, xDocShRef);
+ SmCursor aCursor(pTree, xDocShRef.get());
ScopedVclPtrInstance< VirtualDevice > pOutputDevice;
// move forward (more than) enough places to be at the end
diff --git a/starmath/qa/cppunit/test_parse.cxx b/starmath/qa/cppunit/test_parse.cxx
index fd601c1d4463..2aff581cf375 100644
--- a/starmath/qa/cppunit/test_parse.cxx
+++ b/starmath/qa/cppunit/test_parse.cxx
@@ -52,7 +52,7 @@ void ParseTest::setUp()
void ParseTest::tearDown()
{
- if (mxDocShell)
+ if (mxDocShell.Is())
mxDocShell->DoClose();
BootstrapFixture::tearDown();
}
diff --git a/starmath/qa/extras/mmlexport-test.cxx b/starmath/qa/extras/mmlexport-test.cxx
index 3a2d222f18e4..1266ca0ec3e5 100644
--- a/starmath/qa/extras/mmlexport-test.cxx
+++ b/starmath/qa/extras/mmlexport-test.cxx
@@ -63,7 +63,7 @@ void MathMLExportTest::setUp()
void MathMLExportTest::tearDown()
{
- if (mxDocShell)
+ if (mxDocShell.Is())
mxDocShell->DoClose();
BootstrapFixture::tearDown();
}
diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx
index fcb6be9e6d8a..5ca5d70e8012 100644
--- a/starmath/qa/extras/mmlimport-test.cxx
+++ b/starmath/qa/extras/mmlimport-test.cxx
@@ -80,7 +80,7 @@ void Test::setUp()
void Test::tearDown()
{
- if (mxDocShell) mxDocShell->DoClose();
+ if (mxDocShell.Is()) mxDocShell->DoClose();
BootstrapFixture::tearDown();
}
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index deb7d1514003..64847fd591e0 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -702,7 +702,7 @@ bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
{
// is this a MathType Storage?
MathType aEquation( maText );
- bSuccess = aEquation.Parse( aStorage );
+ bSuccess = aEquation.Parse( aStorage.get() );
if ( bSuccess )
Parse();
}
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index 058f387124b2..18dfa736bd51 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -76,7 +76,7 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
if ( aStorage->IsStream("Equation Native") )
{
sal_uInt8 nVersion;
- if ( GetMathTypeVersion( aStorage, nVersion ) && nVersion <=3 )
+ if ( GetMathTypeVersion( aStorage.get(), nVersion ) && nVersion <=3 )
return OUString("math_MathType_3x");
}
}
diff --git a/starmath/source/unofilter.cxx b/starmath/source/unofilter.cxx
index e5369e2d3d98..8caf72ef308a 100644
--- a/starmath/source/unofilter.cxx
+++ b/starmath/source/unofilter.cxx
@@ -76,7 +76,7 @@ sal_Bool MathTypeFilter::filter(const uno::Sequence<beans::PropertyValue>& rDesc
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
OUString aText = pDocShell->GetText();
MathType aEquation(aText);
- bSuccess = aEquation.Parse(aStorage);
+ bSuccess = aEquation.Parse(aStorage.get());
if (bSuccess)
{
pDocShell->SetText(aText);