summaryrefslogtreecommitdiffstats
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx2
-rw-r--r--sc/source/ui/unoobj/confuno.cxx3
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx15
-rw-r--r--sc/source/ui/unoobj/servuno.cxx2
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx2
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx28
-rw-r--r--sc/source/ui/vba/vbaaxes.cxx4
-rw-r--r--sc/source/ui/vba/vbaaxis.cxx2
-rw-r--r--sc/source/ui/vba/vbaborders.cxx14
-rw-r--r--sc/source/ui/vba/vbacharacters.cxx2
-rw-r--r--sc/source/ui/vba/vbachartobjects.cxx4
-rw-r--r--sc/source/ui/vba/vbacomment.cxx2
-rw-r--r--sc/source/ui/vba/vbafont.cxx15
-rw-r--r--sc/source/ui/vba/vbaformat.cxx2
-rw-r--r--sc/source/ui/vba/vbaglobals.cxx3
-rw-r--r--sc/source/ui/vba/vbahelper.cxx8
-rw-r--r--sc/source/ui/vba/vbahyperlink.cxx2
-rw-r--r--sc/source/ui/vba/vbahyperlinks.cxx2
-rw-r--r--sc/source/ui/vba/vbainterior.cxx6
-rw-r--r--sc/source/ui/vba/vbamenubars.cxx2
-rw-r--r--sc/source/ui/vba/vbanames.cxx7
-rw-r--r--sc/source/ui/vba/vbapalette.cxx2
-rw-r--r--sc/source/ui/vba/vbapane.cxx10
-rw-r--r--sc/source/ui/vba/vbarange.cxx122
-rw-r--r--sc/source/ui/vba/vbatextboxshape.cxx2
-rw-r--r--sc/source/ui/vba/vbavalidation.cxx10
-rw-r--r--sc/source/ui/vba/vbawindow.cxx10
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx8
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx6
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx4
30 files changed, 138 insertions, 163 deletions
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 910d7583f1d4..4648c25d59e7 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -548,7 +548,7 @@ void WorkbookGlobals::initialize( bool bWorkbookFile )
}
if (!mpDoc)
- throw RuntimeException("Workbookhelper::getScDocument(): Failed to access ScDocument from model", Reference<XInterface>());
+ throw RuntimeException("Workbookhelper::getScDocument(): Failed to access ScDocument from model");
mxDocImport.reset(new ScDocumentImport(*mpDoc));
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 58f8b891c614..1f2637257801 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -275,8 +275,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
if ( !pDocShell->SetModifyPasswordInfo( aInfo ) )
throw beans::PropertyVetoException(
- OUString( "The hash is not allowed to be changed now!" ),
- uno::Reference< uno::XInterface >() );
+ "The hash is not allowed to be changed now!" );
}
else if ( aPropertyName.equalsAscii( SC_UNO_EMBED_FONTS ) )
{
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index 86e7fc84581d..24769484d77d 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -1197,9 +1197,8 @@ uno::Sequence< uno::Sequence< uno::Any > > ScDDELinkObj::getResults( )
if ( !bSuccess )
{
- throw uno::RuntimeException( OUString(
- "ScDDELinkObj::getResults: failed to get results!" ),
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(
+ "ScDDELinkObj::getResults: failed to get results!" );
}
return aReturn;
@@ -1229,9 +1228,8 @@ void ScDDELinkObj::setResults( const uno::Sequence< uno::Sequence< uno::Any > >&
if ( !bSuccess )
{
- throw uno::RuntimeException( OUString(
- "ScDDELinkObj::setResults: failed to set results!" ),
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(
+ "ScDDELinkObj::setResults: failed to set results!" );
}
}
@@ -1446,9 +1444,8 @@ uno::Reference< sheet::XDDELink > ScDDELinksObj::addDDELink(
if ( !xLink.is() )
{
- throw uno::RuntimeException( OUString(
- "ScDDELinksObj::addDDELink: cannot add DDE link!" ),
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(
+ "ScDDELinksObj::addDDELink: cannot add DDE link!" );
}
return xLink;
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index f5eeccee27e5..7227f056fc95 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -85,7 +85,7 @@ public:
{
ScDocument* pDoc = mpDocShell->GetDocument();
if ( !pDoc )
- throw uno::RuntimeException("", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException();
uno::Sequence< uno::Any > aArgs(2);
// access the application object ( parent for workbook )
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index d57988c5f92c..ef7ebc1ad8d8 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -81,7 +81,7 @@ ScDocShell* GetDocShellFromRange( const uno::Reference< uno::XInterface >& xRang
ScCellRangesBase* pScCellRangesBase = ScCellRangesBase::getImplementation( xRange );
if ( !pScCellRangesBase )
{
- throw uno::RuntimeException("Failed to access underlying doc shell uno range object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access underlying doc shell uno range object" );
}
return pScCellRangesBase->GetDocShell();
}
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index aed59b724ec1..0a4e66bec4ab 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -251,9 +251,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException, std::exception)
if (!aSelection.is())
{
- throw uno::RuntimeException(
- OUString("failed to obtain current selection"),
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "failed to obtain current selection" );
}
uno::Reference< lang::XServiceInfo > xServiceInfo( aSelection, uno::UNO_QUERY_THROW );
@@ -292,8 +290,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException, std::exception)
}
else
{
- throw uno::RuntimeException( sImplementationName + OUString(
- " not supported"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( sImplementationName + OUString(" not supported" ) );
}
}
@@ -304,10 +301,10 @@ ScVbaApplication::getActiveCell() throw (uno::RuntimeException, std::exception )
uno::Reference< table::XCellRange > xRange( xView->getActiveSheet(), ::uno::UNO_QUERY_THROW);
ScTabViewShell* pViewShell = excel::getCurrentBestViewShell(mxContext);
if ( !pViewShell )
- throw uno::RuntimeException("No ViewShell available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No ViewShell available" );
ScViewData* pTabView = pViewShell->GetViewData();
if ( !pTabView )
- throw uno::RuntimeException("No ViewData available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No ViewData available" );
sal_Int32 nCursorX = pTabView->GetCurX();
sal_Int32 nCursorY = pTabView->GetCurY();
@@ -426,8 +423,7 @@ ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::Runtime
}
}
else
- throw uno::RuntimeException("Invalid prarameter. It should be a string or False",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid prarameter. It should be a string or False" );
}
::sal_Int32 SAL_CALL
@@ -527,8 +523,7 @@ ScVbaApplication::getActiveSheet() throw (uno::RuntimeException, std::exception)
if ( !result.is() )
{
// Fixme - check if this is reasonable/desired behavior
- throw uno::RuntimeException("No activeSheet available",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No activeSheet available" );
}
return result;
@@ -559,8 +554,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro
bScroll = aScroll;
}
else
- throw uno::RuntimeException("second parameter should be boolean",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("second parameter should be boolean" );
}
OUString sRangeName;
@@ -605,8 +599,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro
//and the createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) to get a root browse::XBrowseNode.
//for query XInvocation interface.
//but how to directly get the XInvocation?
- throw uno::RuntimeException("invalid reference for range name, it should be procedure name",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("invalid reference for range name, it should be procedure name" );
}
return;
}
@@ -640,8 +633,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro
}
return;
}
- throw uno::RuntimeException("invalid reference or name",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("invalid reference or name" );
}
sal_Int32 SAL_CALL
@@ -693,7 +685,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException, s
break;
}
default:
- throw uno::RuntimeException("Unknown value for Cursor pointer", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Unknown value for Cursor pointer" );
// TODO: isn't this a flaw in the API? It should be allowed to throw an
// IllegalArgumentException, or so
}
diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx
index e99db4336a75..98052249cf6a 100644
--- a/sc/source/ui/vba/vbaaxes.cxx
+++ b/sc/source/ui/vba/vbaaxes.cxx
@@ -64,7 +64,7 @@ ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& xChart, const uno:
{
ScVbaChart* pChart = static_cast< ScVbaChart* >( xChart.get() );
if ( !pChart )
- throw uno::RuntimeException("Object failure, can't access chart implementation", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Object failure, can't access chart implementation" );
uno::Reference< beans::XPropertySet > xAxisPropertySet;
if (((nType == xlCategory) || (nType == xlSeriesAxis) || (nType == xlValue)))
@@ -160,7 +160,7 @@ ScVbaAxes::Item( const css::uno::Any& _nType, const css::uno::Any& _oAxisGroup)
sal_Int32 nAxisGroup = xlPrimary;
sal_Int32 nType = -1;
if ( !_nType.hasValue() || ( ( _nType >>= nType ) == false ) )
- throw uno::RuntimeException("Axes::Item Failed to extract type", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Axes::Item Failed to extract type" );
if ( _oAxisGroup.hasValue() )
_oAxisGroup >>= nAxisGroup ;
diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx
index 1dc45d1c09d7..939bc1493ac9 100644
--- a/sc/source/ui/vba/vbaaxis.cxx
+++ b/sc/source/ui/vba/vbaaxis.cxx
@@ -38,7 +38,7 @@ ScVbaAxis::getChartPtr() throw( uno::RuntimeException )
{
ScVbaChart* pChart = static_cast< ScVbaChart* >( moChartParent.get() );
if ( !pChart )
- throw uno::RuntimeException("Can't access parent chart impl", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't access parent chart impl" );
return pChart;
}
diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx
index 270885332301..dd363406b387 100644
--- a/sc/source/ui/vba/vbaborders.cxx
+++ b/sc/source/ui/vba/vbaborders.cxx
@@ -167,7 +167,7 @@ public:
table::BorderLine aBorderLine;
if ( getBorderLine( aBorderLine ) )
return uno::makeAny( OORGBToXLRGB( aBorderLine.Color ) );
- throw uno::RuntimeException("No Implementation available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No Implementation available" );
}
void SAL_CALL setColor( const uno::Any& _color ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE
{
@@ -180,7 +180,7 @@ public:
setBorderLine( aBorderLine );
}
else
- throw uno::RuntimeException("No Implementation available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No Implementation available" );
}
uno::Any SAL_CALL getColorIndex() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE
@@ -231,7 +231,7 @@ public:
break;
}
}
- throw uno::RuntimeException("Method failed", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Method failed" );
}
void SAL_CALL setWeight( const uno::Any& _weight ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE
{
@@ -255,12 +255,12 @@ public:
aBorderLine.OuterLineWidth = OOLineHairline;
break;
default:
- throw uno::RuntimeException("Bad param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Bad param" );
}
setBorderLine( aBorderLine );
}
else
- throw uno::RuntimeException("Method failed", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Method failed" );
}
uno::Any SAL_CALL getLineStyle() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE
@@ -289,12 +289,12 @@ public:
case XlLineStyle::xlSlantDashDot:
break;
default:
- throw uno::RuntimeException("Bad param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Bad param" );
}
setBorderLine( aBorderLine );
}
else
- throw uno::RuntimeException("Method failed", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Method failed" );
}
};
diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx
index 64bf5946b7af..5eb7b9f1caef 100644
--- a/sc/source/ui/vba/vbacharacters.cxx
+++ b/sc/source/ui/vba/vbacharacters.cxx
@@ -87,7 +87,7 @@ void SAL_CALL
ScVbaCharacters::setFont( const uno::Reference< excel::XFont >& /*_font*/ ) throw (css::uno::RuntimeException, std::exception)
{
// #TODO #FIXME needs implementation, or can't be done?
- throw uno::RuntimeException("Not Implemented", uno::Reference< XInterface >() );
+ throw uno::RuntimeException("Not Implemented" );
}
diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx
index 9b6fae7c9a45..935ddbaf2e9e 100644
--- a/sc/source/ui/vba/vbachartobjects.cxx
+++ b/sc/source/ui/vba/vbachartobjects.cxx
@@ -74,10 +74,10 @@ ScVbaChartObjects::getChartObjectNames() throw( css::script::BasicErrorException
ScCellRangesBase* pUno= dynamic_cast< ScCellRangesBase* >( xIf.get() );
ScDocShell* pDocShell = NULL;
if ( !pUno )
- throw uno::RuntimeException("Failed to obtain the impl class from the drawpage", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to obtain the impl class from the drawpage" );
pDocShell = pUno->GetDocShell();
if ( !pDocShell )
- throw uno::RuntimeException("Failed to obtain the docshell implclass", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to obtain the docshell implclass" );
uno::Reference< sheet::XSpreadsheetDocument > xSpreadsheetDocument( pDocShell->GetModel(), uno::UNO_QUERY_THROW );
uno::Reference< sheet::XSpreadsheets > xSpreadsheets = xSpreadsheetDocument->getSheets();
diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx
index b44fa29d3c07..f62e838fa6f6 100644
--- a/sc/source/ui/vba/vbacomment.cxx
+++ b/sc/source/ui/vba/vbacomment.cxx
@@ -200,7 +200,7 @@ ScVbaComment::Text( const uno::Any& aText, const uno::Any& aStart, const uno::An
xAnnoText->insertString( xRange, sText, bOverwrite );
return xAnnoText->getString();
}
- throw uno::RuntimeException("ScVbaComment::Text - bad Start value ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("ScVbaComment::Text - bad Start value " );
}
else if ( aText.hasValue() )
{
diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx
index 3b97f85cf9ad..72dabbe69a15 100644
--- a/sc/source/ui/vba/vbafont.cxx
+++ b/sc/source/ui/vba/vbafont.cxx
@@ -260,7 +260,7 @@ ScVbaFont::setStandardFontSize( const uno::Any& /*aValue*/ ) throw( uno::Runtime
//XXX #TODO# #FIXME#
//mxFont->setPropertyValue("CharSize", ( uno::Any )fValue );
throw uno::RuntimeException(
- OUString("setStandardFontSize not supported"), uno::Reference< uno::XInterface >() );
+ "setStandardFontSize not supported" );
}
@@ -268,8 +268,7 @@ uno::Any SAL_CALL
ScVbaFont::getStandardFontSize() throw ( uno::RuntimeException, std::exception )
{
//XXX #TODO# #FIXME#
- throw uno::RuntimeException(
- OUString("getStandardFontSize not supported"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "getStandardFontSize not supported" );
// return uno::Any();
}
@@ -278,8 +277,7 @@ void SAL_CALL
ScVbaFont::setStandardFont( const uno::Any& /*aValue*/ ) throw( uno::RuntimeException, std::exception )
{
//XXX #TODO# #FIXME#
- throw uno::RuntimeException(
- OUString("setStandardFont not supported"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("setStandardFont not supported" );
}
@@ -287,8 +285,7 @@ uno::Any SAL_CALL
ScVbaFont::getStandardFont() throw ( uno::RuntimeException, std::exception )
{
//XXX #TODO# #FIXME#
- throw uno::RuntimeException(
- OUString("getStandardFont not supported"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("getStandardFont not supported");
// return uno::Any();
}
@@ -379,7 +376,7 @@ ScVbaFont::setUnderline( const uno::Any& aValue ) throw ( uno::RuntimeException,
nValue = awt::FontUnderline::DOUBLE;
break;
default:
- throw uno::RuntimeException("Unknown value for Underline", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Unknown value for Underline" );
}
mxFont->setPropertyValue("CharUnderline", ( uno::Any )nValue );
@@ -407,7 +404,7 @@ ScVbaFont::getUnderline() throw ( uno::RuntimeException, std::exception )
nValue = excel::XlUnderlineStyle::xlUnderlineStyleNone;
break;
default:
- throw uno::RuntimeException("Unknown value retrieved for Underline", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Unknown value retrieved for Underline" );
}
return uno::makeAny( nValue );
diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx
index 3f56aac5d665..bf1da4afcc06 100644
--- a/sc/source/ui/vba/vbaformat.cxx
+++ b/sc/source/ui/vba/vbaformat.cxx
@@ -803,7 +803,7 @@ ScVbaFormat<Ifc1>::getCurrentDataSet( ) throw ( uno::RuntimeException )
{
SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( getCellRangesBase() );
if ( !pDataSet )
- throw uno::RuntimeException("Can't access Itemset for XPropertySet", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't access Itemset for XPropertySet" );
return pDataSet;
}
diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index 30983e5579fb..70055e15543d 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -87,8 +87,7 @@ ScVbaGlobals::getActiveWorkbook() throw (uno::RuntimeException, std::exception)
return xWorkbook;
}
// FIXME check if this is correct/desired behavior
- throw uno::RuntimeException( OUString(
- "No activeWorkbook available" ), Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "No activeWorkbook available" );
}
diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx
index cd03ac58f0ce..039d767358cf 100644
--- a/sc/source/ui/vba/vbahelper.cxx
+++ b/sc/source/ui/vba/vbahelper.cxx
@@ -272,7 +272,7 @@ getCurrentDocument() throw (uno::RuntimeException)
if ( !xModel.is() )
{
throw uno::RuntimeException(
- "Can't extract model from basic ( its obviously not set yet therefore don't know the currently selected document)", uno::Reference< uno::XInterface >() );
+ "Can't extract model from basic ( its obviously not set yet therefore don't know the currently selected document)" );
}
return xModel;
}
@@ -286,9 +286,7 @@ getCurrentDocument() throw (uno::RuntimeException)
else
{
OSL_TRACE("Failed to get ThisComponent");
- throw uno::RuntimeException(
- OUString( "Can't determine the currently selected document" ),
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Can't determine the currently selected document" );
}
return xModel;
}
@@ -517,7 +515,7 @@ OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeExcepti
break;
}
default:
- throw uno::RuntimeException("Invalid type, can't convert", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid type, can't convert" );
}
return sString;
}
diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx
index af6fbec8a7bd..71c75faefbb1 100644
--- a/sc/source/ui/vba/vbahyperlink.cxx
+++ b/sc/source/ui/vba/vbahyperlink.cxx
@@ -51,7 +51,7 @@ ScVbaHyperlink::ScVbaHyperlink( const uno::Reference< XHelperInterface >& rxAnch
UrlComponents aUrlComp;
OUString aTextToDisplay;
if( !(rAddress >>= aUrlComp.first) || aUrlComp.first.isEmpty() )
- throw uno::RuntimeException("Cannot get address", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot get address" );
rSubAddress >>= aUrlComp.second;
rScreenTip >>= maScreenTip;
rTextToDisplay >>= aTextToDisplay;
diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx
index bad71e7c81ae..6cf6ec14a9cb 100644
--- a/sc/source/ui/vba/vbahyperlinks.cxx
+++ b/sc/source/ui/vba/vbahyperlinks.cxx
@@ -35,7 +35,7 @@ bool lclContains( const ScRangeList& rScOuter, const uno::Reference< excel::XRan
{
const ScRangeList& rScInner = ScVbaRange::getScRangeList( rxInner );
if( rScInner.empty() || rScOuter.empty() )
- throw uno::RuntimeException("Empty range objects", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Empty range objects" );
for( size_t nIndex = 0, nCount = rScInner.size(); nIndex < nCount; ++nIndex )
if( !rScOuter.In( *rScInner[ nIndex ] ) )
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index cf9896857702..d75d3fce5945 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -310,7 +310,7 @@ ScVbaInterior::setPattern( const uno::Any& _pattern ) throw (uno::RuntimeExcepti
SetMixedColor();
}
else
- throw uno::RuntimeException("Invalid Pattern index", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid Pattern index" );
}
Color
ScVbaInterior::GetBackColor()
@@ -358,7 +358,7 @@ ScVbaInterior::setPatternColor( const uno::Any& _patterncolor ) throw (uno::Runt
SetMixedColor();
}
else
- throw uno::RuntimeException("Invalid Pattern Color", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid Pattern Color" );
}
uno::Any SAL_CALL
ScVbaInterior::getPatternColorIndex() throw (uno::RuntimeException, std::exception)
@@ -381,7 +381,7 @@ ScVbaInterior::setPatternColorIndex( const uno::Any& _patterncolorindex ) throw
setPatternColor( uno::makeAny( OORGBToXLRGB( nPattColor ) ) );
}
else
- throw uno::RuntimeException("Invalid Pattern Color", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid Pattern Color" );
}
OUString
diff --git a/sc/source/ui/vba/vbamenubars.cxx b/sc/source/ui/vba/vbamenubars.cxx
index 8bb6a2fe9dc0..5387427533e1 100644
--- a/sc/source/ui/vba/vbamenubars.cxx
+++ b/sc/source/ui/vba/vbamenubars.cxx
@@ -93,7 +93,7 @@ ScVbaMenuBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) throw
return uno::makeAny( xMenuBar );
}
- throw uno::RuntimeException("Not implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Not implemented" );
}
// XHelperInterface
diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx
index 94460328b676..c93fdbac564b 100644
--- a/sc/source/ui/vba/vbanames.cxx
+++ b/sc/source/ui/vba/vbanames.cxx
@@ -77,10 +77,10 @@ ScVbaNames::getScDocument()
uno::Reference< frame::XModel > xModel( getModel() , uno::UNO_QUERY_THROW );
ScTabViewShell * pTabViewShell = excel::getBestViewShell( xModel );
if ( !pTabViewShell )
- throw uno::RuntimeException( "No ViewShell available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "No ViewShell available" );
ScViewData* pViewData = pTabViewShell->GetViewData();
if ( !pViewData )
- throw uno::RuntimeException( "No ViewData available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "No ViewData available" );
return pViewData->GetDocument();
}
@@ -119,8 +119,7 @@ ScVbaNames::Add( const css::uno::Any& Name ,
sResult = sName.copy( nIndex );
sName = sResult ;
if ( !ScRangeData::IsNameValid( sName , getScDocument() ) )
- throw uno::RuntimeException( "This Name is not valid .",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "This Name is not valid ." );
}
}
uno::Reference< table::XCellRange > xUnoRange;
diff --git a/sc/source/ui/vba/vbapalette.cxx b/sc/source/ui/vba/vbapalette.cxx
index 070feafc80df..2d52843d511a 100644
--- a/sc/source/ui/vba/vbapalette.cxx
+++ b/sc/source/ui/vba/vbapalette.cxx
@@ -97,7 +97,7 @@ ScVbaPalette::getPalette() const
if ( m_pShell )
xProps.set( m_pShell->GetModel(), uno::UNO_QUERY_THROW );
else
- throw uno::RuntimeException("Can't extract palette, no doc shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't extract palette, no doc shell" );
xIndex.set( xProps->getPropertyValue("ColorPalette"), uno::UNO_QUERY );
if ( !xIndex.is() )
return new DefaultPalette();
diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx
index 334a0e61cd46..d69c0c0600b6 100644
--- a/sc/source/ui/vba/vbapane.cxx
+++ b/sc/source/ui/vba/vbapane.cxx
@@ -48,8 +48,7 @@ ScVbaPane::setScrollColumn( sal_Int32 _scrollcolumn ) throw (uno::RuntimeExcepti
{
if( _scrollcolumn < 1 )
{
- throw uno::RuntimeException("Column number should not less than 1",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Column number should not less than 1" );
}
m_xViewPane->setFirstVisibleColumn( _scrollcolumn - 1 );
}
@@ -65,8 +64,7 @@ ScVbaPane::setScrollRow( sal_Int32 _scrollrow ) throw (uno::RuntimeException, st
{
if( _scrollrow < 1 )
{
- throw uno::RuntimeException("Row number should not less than 1",
- uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Row number should not less than 1" );
}
m_xViewPane->setFirstVisibleRow( _scrollrow - 1 );
}
@@ -126,7 +124,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
messageBuffer += OUString( "Error getting parameter: ToLeft\n" );
}
if( !messageBuffer.isEmpty() )
- throw(uno::RuntimeException( messageBuffer, uno::Reference< uno::XInterface >() ) );
+ throw uno::RuntimeException( messageBuffer );
sal_Int32 newStartRow = visibleRange.StartRow + downRows;
if( newStartRow < 0 )
@@ -181,7 +179,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
messageBuffer += OUString( "Error getting parameter: ToLeft\n" );
}
if( !messageBuffer.isEmpty() )
- throw(uno::RuntimeException( messageBuffer, uno::Reference< uno::XInterface >() ) );
+ throw uno::RuntimeException( messageBuffer );
sal_Int32 newStartRow = visibleRange.StartRow + (downPages * vertPageSize );
if( newStartRow < 0 )
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 9095c60dc2c8..e52ca43e2747 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -254,7 +254,7 @@ ScCellRangesBase* ScVbaRange::getCellRangesBase() throw ( uno::RuntimeException
return ScCellRangesBase::getImplementation( mxRanges );
if( mxRange.is() )
return ScCellRangesBase::getImplementation( mxRange );
- throw uno::RuntimeException("General Error creating range - Unknown", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("General Error creating range - Unknown" );
}
ScCellRangeObj* ScVbaRange::getCellRangeObj() throw ( uno::RuntimeException )
@@ -266,7 +266,7 @@ SfxItemSet* ScVbaRange::getCurrentDataSet( ) throw ( uno::RuntimeException )
{
SfxItemSet* pDataSet = excel::ScVbaCellRangeAccess::GetDataSet( getCellRangesBase() );
if ( !pDataSet )
- throw uno::RuntimeException("Can't access Itemset for range", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't access Itemset for range" );
return pDataSet;
}
@@ -393,7 +393,7 @@ getDocShellFromIf( const uno::Reference< uno::XInterface >& xIf ) throw ( uno::R
{
ScCellRangesBase* pUno = ScCellRangesBase::getImplementation( xIf );
if ( !pUno )
- throw uno::RuntimeException("Failed to access underlying uno range object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access underlying uno range object" );
return pUno->GetDocShell();
}
@@ -431,7 +431,7 @@ getDocumentFromRange( const uno::Reference< table::XCellRange >& xRange )
{
ScDocShell* pDocShell = getDocShellFromRange( xRange );
if ( !pDocShell )
- throw uno::RuntimeException("Failed to access underlying docshell from uno range object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access underlying docshell from uno range object" );
ScDocument* pDoc = pDocShell->GetDocument();
return pDoc;
}
@@ -484,14 +484,14 @@ const ScRangeList& ScVbaRange::getScRangeList() throw (uno::RuntimeException)
{
if( ScCellRangesBase* pScRangesBase = getCellRangesBase() )
return pScRangesBase->GetRangeList();
- throw uno::RuntimeException("Cannot obtain UNO range implementation object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain UNO range implementation object" );
}
const ScRangeList& ScVbaRange::getScRangeList( const uno::Reference< excel::XRange >& rxRange ) throw (uno::RuntimeException)
{
if( ScVbaRange* pScVbaRange = getImplementation( rxRange ) )
return pScVbaRange->getScRangeList();
- throw uno::RuntimeException("Cannot obtain VBA range implementation object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain VBA range implementation object" );
}
@@ -1307,10 +1307,10 @@ uno::Reference< sheet::XSheetCellRange > lclExpandToMerged( const uno::Reference
uno::Reference< sheet::XSheetCellRangeContainer > lclExpandToMerged( const uno::Reference< sheet::XSheetCellRangeContainer >& rxCellRanges, bool bRecursive ) throw (uno::RuntimeException)
{
if( !rxCellRanges.is() )
- throw uno::RuntimeException("Missing cell ranges object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Missing cell ranges object" );
sal_Int32 nCount = rxCellRanges->getCount();
if( nCount < 1 )
- throw uno::RuntimeException("Missing cell ranges object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Missing cell ranges object" );
ScRangeList aScRanges;
for( sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex )
@@ -1415,7 +1415,7 @@ table::CellRangeAddress getCellRangeAddressForVBARange( const uno::Any& aParam,
break;
default:
- throw uno::RuntimeException("Can't extact CellRangeAddress from type", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't extact CellRangeAddress from type" );
}
return lclGetRangeAddress( xRangeParam );
}
@@ -1426,7 +1426,7 @@ lcl_setupBorders( const uno::Reference< excel::XRange >& xParentRange, const uno
uno::Reference< XHelperInterface > xParent( xParentRange, uno::UNO_QUERY_THROW );
ScDocument* pDoc = getDocumentFromRange(xRange);
if ( !pDoc )
- throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access document from shell" );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
uno::Reference< XCollection > borders( new ScVbaBorders( xParent, xContext, xRange, aPalette ) );
return borders;
@@ -2138,7 +2138,7 @@ ScVbaRange::Font() throw ( script::BasicErrorException, uno::RuntimeException)
else if ( mxRanges.is() )
xProps.set(mxRanges, ::uno::UNO_QUERY );
if ( !pDoc )
- throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access document from shell" );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
ScCellRangeObj* pRangeObj = NULL;
@@ -2260,7 +2260,7 @@ ScVbaRange::Select() throw (uno::RuntimeException, std::exception)
{
ScCellRangesBase* pUnoRangesBase = getCellRangesBase();
if ( !pUnoRangesBase )
- throw uno::RuntimeException("Failed to access underlying uno range object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access underlying uno range object" );
ScDocShell* pShell = pUnoRangesBase->GetDocShell();
if ( pShell )
{
@@ -2394,10 +2394,10 @@ ScVbaRange::Rows(const uno::Any& aIndex ) throw (uno::RuntimeException, std::exc
aRange.aEnd.SetRow( aRange.aStart.Row() + ( nEndRow - nStartRow ));
}
else
- throw uno::RuntimeException("Illegal param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Illegal param" );
if ( aRange.aStart.Row() < 0 || aRange.aEnd.Row() < 0 )
- throw uno::RuntimeException("Internal failure, illegal param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Internal failure, illegal param" );
// return a normal range ( even for multi-selection
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) );
return new ScVbaRange( mxParent, mxContext, xRange, true );
@@ -2438,10 +2438,10 @@ ScVbaRange::Columns(const uno::Any& aIndex ) throw (uno::RuntimeException, std::
aRange.aEnd.SetCol( aRange.aStart.Col() + ( nEndCol - nStartCol ));
}
else
- throw uno::RuntimeException("Illegal param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Illegal param" );
if ( aRange.aStart.Col() < 0 || aRange.aEnd.Col() < 0 )
- throw uno::RuntimeException("Internal failure, illegal param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Internal failure, illegal param" );
}
// Columns() - no params
uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) );
@@ -2515,7 +2515,7 @@ void
ScVbaRange::Copy(const ::uno::Any& Destination) throw (uno::RuntimeException, std::exception)
{
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException("That command cannot be used on multiple selections", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("That command cannot be used on multiple selections" );
if ( Destination.hasValue() )
{
uno::Reference< excel::XRange > xRange( Destination, uno::UNO_QUERY_THROW );
@@ -2545,7 +2545,7 @@ void
ScVbaRange::Cut(const ::uno::Any& Destination) throw (uno::RuntimeException, std::exception)
{
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException("That command cannot be used on multiple selections", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("That command cannot be used on multiple selections" );
if (Destination.hasValue())
{
uno::Reference< excel::XRange > xRange( Destination, uno::UNO_QUERY_THROW );
@@ -2723,9 +2723,7 @@ ScVbaRange::Range( const uno::Any &Cell1, const uno::Any &Cell2, bool bForceUseI
xAddressable.set( xReferrer, uno::UNO_QUERY_THROW );
if( !Cell1.hasValue() )
- throw uno::RuntimeException(
- OUString( " Invalid Argument " ),
- uno::Reference< XInterface >() );
+ throw uno::RuntimeException( "Invalid Argument" );
table::CellRangeAddress resultAddress;
table::CellRangeAddress parentRangeAddress = xAddressable->getRangeAddress();
@@ -2871,11 +2869,11 @@ void SAL_CALL
ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, const uno::Any& SkipBlanks, const uno::Any& Transpose ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException("That command cannot be used on multiple selections", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("That command cannot be used on multiple selections" );
ScDocShell* pShell = getScDocShell();
if (!pShell)
- throw uno::RuntimeException("That command cannot be used with no ScDocShell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("That command cannot be used with no ScDocShell" );
uno::Reference< frame::XModel > xModel(pShell->GetModel(), uno::UNO_QUERY_THROW);
uno::Reference< view::XSelectionSupplier > xSelection( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
@@ -3007,11 +3005,11 @@ ScVbaRange::getHidden() throw (uno::RuntimeException, std::exception)
{
uno::Reference< beans::XPropertySet > xProps = getRowOrColumnProps( mxRange, mbIsRows );
if ( !( xProps->getPropertyValue( ISVISIBLE ) >>= bIsVisible ) )
- throw uno::RuntimeException("Failed to get IsVisible property", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to get IsVisible property" );
}
catch( const uno::Exception& e )
{
- throw uno::RuntimeException( e.Message, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( e.Message );
}
return uno::makeAny( !bIsVisible );
}
@@ -3038,7 +3036,7 @@ ScVbaRange::setHidden( const uno::Any& _hidden ) throw (uno::RuntimeException, s
}
catch( const uno::Exception& e )
{
- throw uno::RuntimeException( e.Message, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( e.Message );
}
}
@@ -3057,7 +3055,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un
// sanity check required params
if ( What.isEmpty() )
- throw uno::RuntimeException("Range::Replace, missing params", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, missing params" );
OUString sWhat = VBAToRegexp( What);
// #TODO #FIXME SearchFormat & ReplacesFormat are not processed
// What do we do about MatchByte.. we don't seem to support that
@@ -3087,7 +3085,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un
else if ( nLook == excel::XlLookAt::xlWhole )
bSearchWords = true;
else
- throw uno::RuntimeException("Range::Replace, illegal value for LookAt", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for LookAt" );
// set global search props ( affects the find dialog
// and of course the defaults for this method
newOptions.SetWordOnly( bSearchWords );
@@ -3103,7 +3101,7 @@ ScVbaRange::Replace( const OUString& What, const OUString& Replacement, const un
else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
bSearchByRow = true;
else
- throw uno::RuntimeException("Range::Replace, illegal value for SearchOrder", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for SearchOrder" );
newOptions.SetRowDirection( bSearchByRow );
xDescriptor->setPropertyValue( SC_UNO_SRCHBYROW, uno::makeAny( bSearchByRow ) );
@@ -3158,7 +3156,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
if( What >>= sWhat )
{
if( sWhat.isEmpty() )
- throw uno::RuntimeException("Range::Find, missing params", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Find, missing params" );
}
else if( What >>= nWhat )
{
@@ -3169,7 +3167,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
sWhat = OUString::number( fWhat );
}
else
- throw uno::RuntimeException("Range::Find, missing params", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Find, missing params" );
OUString sSearch = VBAToRegexp( sWhat );
@@ -3192,10 +3190,10 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
{
// After must be a single cell in the range
if( xAfterRange->getCount() > 1 )
- throw uno::RuntimeException("After must be a single cell.", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("After must be a single cell." );
uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), uno::UNO_QUERY );
if( !xCell.is() )
- throw uno::RuntimeException("After must be in range.", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("After must be in range." );
xStartCell.set( xAfterRange->getCellRange(), uno::UNO_QUERY_THROW );
}
@@ -3218,7 +3216,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
nSearchType = SVX_SEARCHIN_VALUE;
break;
default:
- throw uno::RuntimeException("Range::Replace, illegal value for LookIn.", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for LookIn." );
}
newOptions.SetCellType( nSearchType );
xDescriptor->setPropertyValue( "SearchType", uno::makeAny( nSearchType ) );
@@ -3235,7 +3233,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
else if ( nLookAt == excel::XlLookAt::xlWhole )
bSearchWords = true;
else
- throw uno::RuntimeException("Range::Replace, illegal value for LookAt", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for LookAt" );
newOptions.SetWordOnly( bSearchWords );
xDescriptor->setPropertyValue( SC_UNO_SRCHWORDS, uno::makeAny( bSearchWords ) );
}
@@ -3250,7 +3248,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
else if ( nSearchOrder == excel::XlSearchOrder::xlByRows )
bSearchByRow = true;
else
- throw uno::RuntimeException("Range::Replace, illegal value for SearchOrder", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for SearchOrder" );
newOptions.SetRowDirection( bSearchByRow );
xDescriptor->setPropertyValue( SC_UNO_SRCHBYROW, uno::makeAny( bSearchByRow ) );
@@ -3268,7 +3266,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
else if( nSearchDirection == excel::XlSearchDirection::xlPrevious )
bSearchBackwards = true;
else
- throw uno::RuntimeException("Range::Replace, illegal value for SearchDirection", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for SearchDirection" );
newOptions.SetBackward( bSearchBackwards );
xDescriptor->setPropertyValue( "SearchBackwards", uno::makeAny( bSearchBackwards ) );
}
@@ -3280,7 +3278,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
{
// SearchCaseSensitive
if( !( MatchCase >>= bMatchCase ) )
- throw uno::RuntimeException("Range::Replace, illegal value for MatchCase", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Replace, illegal value for MatchCase" );
}
xDescriptor->setPropertyValue( SC_UNO_SRCHCASE, uno::makeAny( bMatchCase ) );
@@ -3327,11 +3325,11 @@ uno::Reference< table::XCellRange > processKey( const uno::Any& Key, uno::Refere
OUString sRangeName = ::comphelper::getString( Key );
table::CellRangeAddress aRefAddr;
if ( !pDocSh )
- throw uno::RuntimeException("Range::Sort no docshell to calculate key param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Sort no docshell to calculate key param" );
xKeyRange = getRangeForName( xContext, sRangeName, pDocSh, aRefAddr );
}
else
- throw uno::RuntimeException("Range::Sort illegal type value for key param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Sort illegal type value for key param" );
uno::Reference< table::XCellRange > xKey;
xKey.set( xKeyRange->getCellRange(), uno::UNO_QUERY_THROW );
return xKey;
@@ -3349,7 +3347,7 @@ const OUString& sPropName ) throw( uno::RuntimeException )
if ( pProp->Name.equals( sPropName ) )
return count;
if ( count == nItems )
- throw uno::RuntimeException("Range::Sort unknown sort property", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Sort unknown sort property" );
return -1; //should never reach here ( satisfy compiler )
}
@@ -3385,7 +3383,7 @@ void updateTableSortField( const uno::Reference< table::XCellRange >& xParentRan
aTableField.IsAscending = false;
}
else
- throw uno::RuntimeException("Illegal Key param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Illegal Key param" );
}
@@ -3395,7 +3393,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
{
// #TODO# #FIXME# can we do something with Type
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException("That command cannot be used on multiple selections", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("That command cannot be used on multiple selections" );
sal_Int16 nDataOption1 = excel::XlSortDataOption::xlSortNormal;
sal_Int16 nDataOption2 = excel::XlSortDataOption::xlSortNormal;
@@ -3403,7 +3401,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
ScDocument* pDoc = getScDocument();
if ( !pDoc )
- throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access document from shell" );
RangeHelper thisRange( mxRange );
table::CellRangeAddress thisRangeAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
@@ -3527,7 +3525,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
ScDocShell* pDocShell = getScDocShell();
xKey1 = processKey( Key1, mxContext, pDocShell );
if ( !xKey1.is() )
- throw uno::RuntimeException("Range::Sort needs a key1 param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Range::Sort needs a key1 param" );
if ( Key2.hasValue() )
xKey2 = processKey( Key2, mxContext, pDocShell );
@@ -3622,7 +3620,7 @@ ScVbaRange::End( ::sal_Int32 Direction ) throw (uno::RuntimeException, std::exc
nSID = SID_CURSORBLKRIGHT;
break;
default:
- throw uno::RuntimeException(": Invalid ColumnIndex", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException(": Invalid ColumnIndex" );
}
if ( pDispatcher )
{
@@ -3662,11 +3660,11 @@ uno::Reference< excel::XCharacters > SAL_CALL
ScVbaRange::characters( const uno::Any& Start, const uno::Any& Length ) throw (uno::RuntimeException, std::exception)
{
if ( !isSingleCellRange() )
- throw uno::RuntimeException("Can't create Characters property for multicell range ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't create Characters property for multicell range " );
uno::Reference< text::XSimpleText > xSimple(mxRange->getCellByPosition(0,0) , uno::UNO_QUERY_THROW );
ScDocument* pDoc = getDocumentFromRange(mxRange);
if ( !pDoc )
- throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access document from shell" );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
return new ScVbaCharacters( this, mxContext, aPalette, xSimple, Start, Length );
@@ -3701,7 +3699,7 @@ ScVbaRange::Delete( const uno::Any& Shift ) throw (uno::RuntimeException, std::e
mode = sheet::CellDeleteMode_LEFT;
break;
default:
- throw uno::RuntimeException("Illegal parameter ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Illegal parameter " );
}
}
else
@@ -3895,7 +3893,7 @@ uno::Reference< excel::XRange >
ScVbaRange::getArea( sal_Int32 nIndex ) throw( css::uno::RuntimeException )
{
if ( !m_Areas.is() )
- throw uno::RuntimeException("No areas available", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No areas available" );
uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( ++nIndex ), uno::Any() ), uno::UNO_QUERY_THROW );
return xRange;
}
@@ -4418,7 +4416,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const
if ( !bHasAuto )
{
if ( m_Areas->getCount() > 1 )
- throw uno::RuntimeException( STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY );
table::CellRangeAddress autoFiltAddress;
//CurrentRegion()
@@ -4431,7 +4429,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const
if ( pRange )
{
if ( pRange->isSingleCellRange() )
- throw uno::RuntimeException("Can't create AutoFilter", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can't create AutoFilter" );
RangeHelper currentRegion( pRange->mxRange );
autoFiltAddress = currentRegion.getCellRangeAddressable()->getRangeAddress();
}
@@ -4466,7 +4464,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const
xDataBaseRange.set( xDBRanges->getByTable(nSheet ), uno::UNO_QUERY_THROW );
}
if ( !xDataBaseRange.is() )
- throw uno::RuntimeException("Failed to find the autofilter placeholder range", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to find the autofilter placeholder range" );
uno::Reference< beans::XPropertySet > xDBRangeProps( xDataBaseRange, uno::UNO_QUERY_THROW );
// set autofilt
@@ -4580,7 +4578,7 @@ ScVbaRange::AutoFilter( const uno::Any& aField, const uno::Any& Criteria1, const
nConn = sheet::FilterConnection_AND;
break;
default:
- throw uno::RuntimeException("UnknownOption", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("UnknownOption" );
}
@@ -4675,7 +4673,7 @@ ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& /*CopyOrigin*/ ) thro
mode = sheet::CellInsertMode_DOWN;
break;
default:
- throw uno::RuntimeException("Illegal parameter ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Illegal parameter " );
}
}
else
@@ -4752,7 +4750,7 @@ ScVbaRange::Hyperlinks( const uno::Any& aIndex ) throw (uno::RuntimeException, s
uno::Reference< excel::XHyperlinks > xSheetHlinks( xWorksheet->Hyperlinks( uno::Any() ), uno::UNO_QUERY_THROW );
ScVbaHyperlinksRef xScSheetHlinks( dynamic_cast< ScVbaHyperlinks* >( xSheetHlinks.get() ) );
if( !xScSheetHlinks.is() )
- throw uno::RuntimeException("Cannot obtain hyperlinks implementation object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain hyperlinks implementation object" );
// create a new local hyperlinks object based on the sheet hyperlinks
ScVbaHyperlinksRef xHlinks( new ScVbaHyperlinks( getParent(), mxContext, xScSheetHlinks, getScRangeList() ) );
@@ -4857,7 +4855,7 @@ uno::Any SAL_CALL ScVbaRange::getPrefixCharacter() throw (uno::RuntimeException,
return lclGetPrefixVariant( lclGetPrefixChar( mxRange ) );
if( mxRanges.is() )
return lclGetPrefixVariant( lclGetPrefixChar( mxRanges ) );
- throw uno::RuntimeException("Unexpected empty Range object", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Unexpected empty Range object" );
}
uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException, std::exception)
@@ -4866,7 +4864,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException, std::ex
// In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
if( m_Areas->getCount() > 1 )
- throw uno::RuntimeException("Can not get Range.ShowDetail attribute ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can not get Range.ShowDetail attribute " );
bool bShowDetail = false;
@@ -4898,7 +4896,7 @@ uno::Any ScVbaRange::getShowDetail() throw ( css::uno::RuntimeException, std::ex
}
else
{
- throw uno::RuntimeException("Can not set Range.ShowDetail attribute ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can not set Range.ShowDetail attribute" );
}
return aNULL();
}
@@ -4909,7 +4907,7 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru
// In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
if( m_Areas->getCount() > 1 )
- throw uno::RuntimeException("Can not set Range.ShowDetail attribute ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can not set Range.ShowDetail attribute" );
bool bShowDetail = extractBoolFromAny( aShowDetail );
@@ -4934,7 +4932,7 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru
}
else
{
- throw uno::RuntimeException("Can not set Range.ShowDetail attribute ", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Can not set Range.ShowDetail attribute" );
}
}
@@ -5099,7 +5097,7 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const
eCmd = FILL_GROWTH;
break;
case excel::XlAutoFillType::xlFillFormats:
- throw uno::RuntimeException("xlFillFormat not supported for AutoFill", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("xlFillFormat not supported for AutoFill" );
case excel::XlAutoFillType::xlFillValues:
case excel::XlAutoFillType::xlFillSeries:
case excel::XlAutoFillType::xlLinearTrend:
diff --git a/sc/source/ui/vba/vbatextboxshape.cxx b/sc/source/ui/vba/vbatextboxshape.cxx
index 9c652643ce2d..3cbb47743ea1 100644
--- a/sc/source/ui/vba/vbatextboxshape.cxx
+++ b/sc/source/ui/vba/vbatextboxshape.cxx
@@ -50,7 +50,7 @@ ScVbaTextBoxShape::characters( const uno::Any& Start, const uno::Any& Length ) t
ScDocument* pDoc = pDocShell ? pDocShell->GetDocument() : NULL;
if ( !pDoc )
- throw uno::RuntimeException("Failed to access document from shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Failed to access document from shell" );
uno::Reference< text::XSimpleText > xSimple( m_xTextRange, uno::UNO_QUERY_THROW );
ScVbaPalette aPalette( pDoc->GetDocumentShell() );
diff --git a/sc/source/ui/vba/vbavalidation.cxx b/sc/source/ui/vba/vbavalidation.cxx
index 6bb090f7c31d..edb3b9d72eac 100644
--- a/sc/source/ui/vba/vbavalidation.cxx
+++ b/sc/source/ui/vba/vbavalidation.cxx
@@ -233,10 +233,10 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un
sheet::ValidationType nValType = sheet::ValidationType_ANY;
xProps->getPropertyValue( STYPE ) >>= nValType;
if ( nValType != sheet::ValidationType_ANY )
- throw uno::RuntimeException("validation object already exists", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("validation object already exists" );
sal_Int32 nType = -1;
if ( !Type.hasValue() || !( Type >>= nType ) )
- throw uno::RuntimeException("missing required param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("missing required param" );
Delete(); // set up defaults
OUString sFormula1;
@@ -250,7 +250,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un
// for validate list
// at least formula1 is required
if ( !Formula1.hasValue() )
- throw uno::RuntimeException("missing param", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("missing param" );
nValType = sheet::ValidationType_LIST;
xProps->setPropertyValue( STYPE, uno::makeAny(nValType ));
// #TODO validate required params
@@ -262,7 +262,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un
xProps->setPropertyValue( STYPE, uno::makeAny(nValType ));
break;
default:
- throw uno::RuntimeException("unsupported operation...", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("unsupported operation..." );
}
sheet::ValidationAlertStyle eStyle = sheet::ValidationAlertStyle_STOP;
@@ -283,7 +283,7 @@ ScVbaValidation::Add( const uno::Any& Type, const uno::Any& AlertStyle, const un
eStyle = sheet::ValidationAlertStyle_INFO;
break;
default:
- throw uno::RuntimeException("bad param...", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("bad param..." );
}
}
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index c7e196af3e66..ac89af3c0ab4 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -103,13 +103,13 @@ public:
{
ScModelObj* pModel = static_cast< ScModelObj* >( m_xModel.get() );
if ( !pModel )
- throw uno::RuntimeException("Cannot obtain current document", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain current document" );
ScDocShell* pDocShell = (ScDocShell*)pModel->GetEmbeddedObject();
if ( !pDocShell )
- throw uno::RuntimeException("Cannot obtain docshell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain docshell" );
ScTabViewShell* pViewShell = excel::getBestViewShell( m_xModel );
if ( !pViewShell )
- throw uno::RuntimeException("Cannot obtain view shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain view shell" );
SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
SCTAB nIndex = 0;
@@ -289,7 +289,7 @@ ScVbaWindow::ScrollWorkbookTabs( const uno::Any& /*Sheets*/, const uno::Any& /*P
/*
sal_Int32 nSheets = 0;
sal_Int32 nPosition = 0;
- throw uno::RuntimeException("No Implemented", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("No Implemented" );
sal_Bool bSheets = ( Sheets >>= nSheets );
sal_Bool bPosition = ( Position >>= nPosition );
if ( bSheets || bPosition ) // at least one param specified
@@ -443,7 +443,7 @@ ScVbaWindow::setWindowState( const uno::Any& _windowstate ) throw (uno::RuntimeE
else if (nwindowState == xlNormal)
pWork -> Restore();
else
- throw uno::RuntimeException("Invalid Parameter", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Invalid Parameter" );
}
}
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index 9a57a837e238..9c01a17d5cb1 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -248,7 +248,7 @@ ScVbaWorkbooks::Open( const OUString& rFileName, const uno::Any& /*UpdateLinks*/
Format >>= nFormat; // val of nFormat overwritten if extracted
// validate param
if ( nFormat < 1 || nFormat > 6 )
- throw uno::RuntimeException("Illegal value for Format", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Illegal value for Format" );
}
sal_Int16 nDelim = getCurrentDelim();
@@ -261,13 +261,13 @@ ScVbaWorkbooks::Open( const OUString& rFileName, const uno::Any& /*UpdateLinks*/
{
// Need to check Delimiter param
if ( !Delimiter.hasValue() )
- throw uno::RuntimeException("Expected value for Delimiter", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Expected value for Delimiter" );
OUString sStr;
Delimiter >>= sStr;
if ( !sStr.isEmpty() )
nDelim = sStr[0];
else
- throw uno::RuntimeException("Incorrect value for Delimiter", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Incorrect value for Delimiter" );
}
getCurrentDelim() = nDelim; //set new current
@@ -282,7 +282,7 @@ ScVbaWorkbooks::Open( const OUString& rFileName, const uno::Any& /*UpdateLinks*/
sProps[ nIndex ].Value <<= OUString("com.sun.star.sheet.SpreadsheetDocument");
}
else if ( !isSpreadSheetFile( sType ) )
- throw uno::RuntimeException("Bad Format", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Bad Format" );
uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( openDocument( rFileName, ReadOnly, sProps ), uno::UNO_QUERY_THROW );
uno::Any aRet = getWorkbook( mxContext, xSpreadDoc, mxParent );
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 72b553d314dc..71bacc8efe81 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -360,8 +360,7 @@ ScVbaWorksheet::getEnableSelection() throw (uno::RuntimeException, std::exceptio
return excel::XlEnableSelection::xlNoSelection;
}
else
- throw uno::RuntimeException("Sheet Name does not exist. ",
- uno::Reference< XInterface >() );
+ throw uno::RuntimeException("Sheet Name does not exist." );
}
@@ -401,8 +400,7 @@ ScVbaWorksheet::setEnableSelection( sal_Int32 nSelection ) throw (uno::RuntimeEx
}
}
else
- throw uno::RuntimeException("Sheet Name does not exist. ",
- uno::Reference< XInterface >() );
+ throw uno::RuntimeException("Sheet Name does not exist." );
}
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index 71598bbee9cc..b55016aecf0d 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -360,7 +360,7 @@ ScVbaWorksheets::setVisible( const uno::Any& _visible ) throw (uno::RuntimeExcep
}
}
else
- throw uno::RuntimeException("Visible property doesn't support non boolean #FIXME", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Visible property doesn't support non boolean #FIXME" );
}
void SAL_CALL
@@ -368,7 +368,7 @@ ScVbaWorksheets::Select( const uno::Any& Replace ) throw (uno::RuntimeException,
{
ScTabViewShell* pViewShell = excel::getBestViewShell( mxModel );
if ( !pViewShell )
- throw uno::RuntimeException("Cannot obtain view shell", uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException("Cannot obtain view shell" );
ScMarkData& rMarkData = pViewShell->GetViewData()->GetMarkData();
bool bReplace = true;