summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-18 21:30:43 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-20 09:06:51 +0100
commit42a53497708e8b3b9b2d93bd39ac782fc185ac3e (patch)
tree288a49e85d66efd0006c5a6b161f893d3f14da6c /sfx2/source
parent6812daf27117041eb02709291f506136259df264 (diff)
Some more loplugin:cstylecast: sfx2
Change-Id: I19f3ce00e5e19dd34db2d92cae1b532d3c3eae6a
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/app.cxx4
-rw-r--r--sfx2/source/appl/appinit.cxx2
-rw-r--r--sfx2/source/appl/appserv.cxx2
-rw-r--r--sfx2/source/appl/appuno.cxx44
-rw-r--r--sfx2/source/appl/impldde.cxx2
-rw-r--r--sfx2/source/appl/lnkbase2.cxx2
-rw-r--r--sfx2/source/appl/shutdowniconunx.cxx4
-rw-r--r--sfx2/source/bastyp/helper.cxx2
-rw-r--r--sfx2/source/control/unoctitm.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx2
-rw-r--r--sfx2/source/view/viewprn.cxx2
11 files changed, 34 insertions, 34 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 5b8ff78ddd8e..7073ef95de39 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -494,7 +494,7 @@ IMPL_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic )
aMod.loadRelative(&thisModule, SVLIBRARY("basctl"), 0);
// get symbol
- basicide_handle_basic_error pSymbol = (basicide_handle_basic_error) aMod.getFunctionSymbol("basicide_handle_basic_error");
+ basicide_handle_basic_error pSymbol = reinterpret_cast<basicide_handle_basic_error>(aMod.getFunctionSymbol("basicide_handle_basic_error"));
aMod.release();
@@ -592,7 +592,7 @@ void SfxApplication::MacroOrganizer( sal_Int16 nTabId )
aMod.loadRelative(&thisModule, SVLIBRARY("basctl"), 0);
// get symbol
- basicide_macro_organizer pSymbol = (basicide_macro_organizer) aMod.getFunctionSymbol("basicide_macro_organizer");
+ basicide_macro_organizer pSymbol = reinterpret_cast<basicide_macro_organizer>(aMod.getFunctionSymbol("basicide_macro_organizer"));
SAL_WARN_IF(!pSymbol, "sfx.doc", "SfxApplication::MacroOrganizer, no symbol!");
if (!pSymbol)
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 2c64e342fd54..9580a6433044 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -185,7 +185,7 @@ OUString GetSpecialCharsForEdit(vcl::Window* pParent, const vcl::Font& rFont)
// get symbol
OUString aSymbol( "GetSpecialCharsForEdit" );
- pfunc_getSpecialCharsForEdit = (PFunc_getSpecialCharsForEdit)aMod.getFunctionSymbol(aSymbol);
+ pfunc_getSpecialCharsForEdit = reinterpret_cast<PFunc_getSpecialCharsForEdit>(aMod.getFunctionSymbol(aSymbol));
DBG_ASSERT( pfunc_getSpecialCharsForEdit, "GetSpecialCharsForEdit() not found!" );
aMod.release();
#else
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 84de443c619e..9256ea270966 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -853,7 +853,7 @@ OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, bool bChoose
aMod.loadRelative(&thisModule, SVLIBRARY("basctl"), 0);
// get symbol
- basicide_choose_macro pSymbol = (basicide_choose_macro) aMod.getFunctionSymbol("basicide_choose_macro");
+ basicide_choose_macro pSymbol = reinterpret_cast<basicide_choose_macro>(aMod.getFunctionSymbol("basicide_choose_macro"));
SAL_WARN_IF(!pSymbol, "sfx.doc", "SfxApplication::MacroOrganizer, no symbol!");
if (!pSymbol)
return OUString();
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 01b950d46202..a64ec0369229 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -79,28 +79,28 @@ using namespace ::com::sun::star::io;
// needs to be converted to a better data structure
SfxFormalArgument aFormalArgs[] = {
- { (const SfxType*) &aSfxStringItem_Impl, "SuggestedSaveAsName", SID_DEFAULTFILENAME },
- { (const SfxType*) &aSfxStringItem_Impl, "SuggestedSaveAsDir", SID_DEFAULTFILEPATH },
- { (const SfxType*) &aSfxStringItem_Impl, "VersionAuthor", SID_DOCINFO_AUTHOR },
- { (const SfxType*) &aSfxStringItem_Impl, "VersionComment", SID_DOCINFO_COMMENTS },
- { (const SfxType*) &aSfxBoolItem_Impl, "VersionMajor", SID_DOCINFO_MAJOR },
- { (const SfxType*) &aSfxStringItem_Impl, "FilterOptions", SID_FILE_FILTEROPTIONS },
- { (const SfxType*) &aSfxStringItem_Impl, "FilterName", SID_FILTER_NAME },
-// { (const SfxType*) &aSfxStringItem_Impl, "FileName", SID_FILE_NAME },
- { (const SfxType*) &aSfxStringItem_Impl, "URL", SID_FILE_NAME },
- { (const SfxType*) &aSfxStringItem_Impl, "OpenFlags", SID_OPTIONS },
- { (const SfxType*) &aSfxBoolItem_Impl, "Overwrite", SID_OVERWRITE },
- { (const SfxType*) &aSfxStringItem_Impl, "Password", SID_PASSWORD },
- { (const SfxType*) &aSfxBoolItem_Impl, "PasswordInteraction", SID_PASSWORDINTERACTION },
- { (const SfxType*) &aSfxStringItem_Impl, "Referer", SID_REFERER },
- { (const SfxType*) &aSfxBoolItem_Impl, "SaveTo", SID_SAVETO },
- { (const SfxType*) &aSfxStringItem_Impl, "TemplateName", SID_TEMPLATE_NAME },
- { (const SfxType*) &aSfxStringItem_Impl, "TemplateRegion", SID_TEMPLATE_REGIONNAME },
-// { (const SfxType*) &aSfxStringItem_Impl, "Region", SID_TEMPLATE_REGIONNAME },
-// { (const SfxType*) &aSfxStringItem_Impl, "Name", SID_TEMPLATE_NAME },
- { (const SfxType*) &aSfxBoolItem_Impl, "Unpacked", SID_UNPACK },
- { (const SfxType*) &aSfxInt16Item_Impl, "Version", SID_VERSION },
- { (const SfxType*) &aSfxBoolItem_Impl, "SaveACopy", SID_SAVEACOPYITEM },
+ { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "SuggestedSaveAsName", SID_DEFAULTFILENAME },
+ { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "SuggestedSaveAsDir", SID_DEFAULTFILEPATH },
+ { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "VersionAuthor", SID_DOCINFO_AUTHOR },
+ { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "VersionComment", SID_DOCINFO_COMMENTS },
+ { reinterpret_cast<SfxType*>(&aSfxBoolItem_Impl), "VersionMajor", SID_DOCINFO_MAJOR },
+ { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "FilterOptions", SID_FILE_FILTEROPTIONS },
+ { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "FilterName", SID_FILTER_NAME },
+// { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "FileName", SID_FILE_NAME },
+ { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "URL", SID_FILE_NAME },
+ { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "OpenFlags", SID_OPTIONS },
+ { reinterpret_cast<SfxType*>(&aSfxBoolItem_Impl), "Overwrite", SID_OVERWRITE },
+ { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "Password", SID_PASSWORD },
+ { reinterpret_cast<SfxType*>(&aSfxBoolItem_Impl), "PasswordInteraction", SID_PASSWORDINTERACTION },
+ { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "Referer", SID_REFERER },
+ { reinterpret_cast<SfxType*>(&aSfxBoolItem_Impl), "SaveTo", SID_SAVETO },
+ { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "TemplateName", SID_TEMPLATE_NAME },
+ { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "TemplateRegion", SID_TEMPLATE_REGIONNAME },
+// { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "Region", SID_TEMPLATE_REGIONNAME },
+// { reinterpret_cast<SfxType*>(&aSfxStringItem_Impl), "Name", SID_TEMPLATE_NAME },
+ { reinterpret_cast<SfxType*>(&aSfxBoolItem_Impl), "Unpacked", SID_UNPACK },
+ { reinterpret_cast<SfxType*>(&aSfxInt16Item_Impl), "Version", SID_VERSION },
+ { reinterpret_cast<SfxType*>(&aSfxBoolItem_Impl), "SaveACopy", SID_SAVEACOPYITEM },
};
static sal_uInt16 nMediaArgsCount = sizeof(aFormalArgs) / sizeof (SfxFormalArgument);
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 526a83932207..6f1cb5196bfb 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -327,7 +327,7 @@ IMPL_LINK( SvDDEObject, ImplGetDDEData, DdeData*, pData )
const sal_Char* p = (sal_Char*)( pData->operator const void*() );
long nLen = FORMAT_STRING == nFmt ? (p ? strlen( p ) : 0) : (long)*pData;
- Sequence< sal_Int8 > aSeq( (const sal_Int8*)p, nLen );
+ Sequence< sal_Int8 > aSeq( reinterpret_cast<const sal_Int8*>(p), nLen );
if( pGetData )
{
*pGetData <<= aSeq; // Copy Data
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index ab22c6db2efe..9e1e8603d941 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -592,7 +592,7 @@ DdeData* ImplDdeItem::Get( sal_uIntPtr nFormat )
{
if( aValue >>= aSeq )
{
- aData = DdeData( (const char *)aSeq.getConstArray(), aSeq.getLength(), nFormat );
+ aData = DdeData( aSeq.getConstArray(), aSeq.getLength(), nFormat );
bIsValidData = true;
return &aData;
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index 199674f13909..8c85946d6a6c 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -155,7 +155,7 @@ static GdkPixbuf * ResIdToPixbuf( sal_uInt16 nResId )
GDK_COLORSPACE_RGB, sal_True, 8,
aSize.Width(), aSize.Height(),
aSize.Width() * 4,
- (GdkPixbufDestroyNotify) g_free,
+ reinterpret_cast<GdkPixbufDestroyNotify>(g_free),
NULL );
}
@@ -412,7 +412,7 @@ void plugin_init_sys_tray()
if (pFile)
{
if ((pMonitor = g_file_monitor_file(pFile, G_FILE_MONITOR_NONE, NULL, NULL)))
- g_signal_connect(pMonitor, "changed", (GCallback)notify_file_changed, NULL);
+ g_signal_connect(pMonitor, "changed", reinterpret_cast<GCallback>(notify_file_changed), NULL);
g_object_unref(pFile);
}
#endif
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index e00e6cb266d5..49260741f329 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -206,7 +206,7 @@ OUString SfxContentHelper::GetActiveHelpString( const OUString& rURL )
sal_Int32 nRead = xStream->readBytes( lData, 1024 );
while ( nRead > 0 )
{
- OString sOldString( (sal_Char*)lData.getConstArray(), nRead );
+ OString sOldString( reinterpret_cast<char const *>(lData.getConstArray()), nRead );
OUString sString = OStringToOUString( sOldString, RTL_TEXTENCODING_UTF8 );
aRet.append( sString );
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index fd356017fa6f..d687a5d8a7d1 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -342,7 +342,7 @@ const ::com::sun::star::uno::Sequence< sal_Int8 >& SfxOfficeDispatch::impl_getSt
{
// {38 57 CA 80 09 36 11 d4 83 FE 00 50 04 52 6B 21}
static const sal_uInt8 pGUID[16] = { 0x38, 0x57, 0xCA, 0x80, 0x09, 0x36, 0x11, 0xd4, 0x83, 0xFE, 0x00, 0x50, 0x04, 0x52, 0x6B, 0x21 };
- static ::com::sun::star::uno::Sequence< sal_Int8 > seqID((const sal_Int8*)pGUID,16) ;
+ static ::com::sun::star::uno::Sequence< sal_Int8 > seqID(reinterpret_cast<const sal_Int8*>(pGUID), 16) ;
return seqID ;
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 6fe904b6f725..d24cb6b34d30 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -2041,7 +2041,7 @@ void WriteStringInStream( const uno::Reference< io::XOutputStream >& xOutStream,
if ( xOutStream.is() )
{
OString aStrLog = OUStringToOString( aString, RTL_TEXTENCODING_UTF8 );
- uno::Sequence< sal_Int8 > aLogData( (const sal_Int8*)aStrLog.getStr(), aStrLog.getLength() );
+ uno::Sequence< sal_Int8 > aLogData( reinterpret_cast<const sal_Int8*>(aStrLog.getStr()), aStrLog.getLength() );
xOutStream->writeBytes( aLogData );
aLogData.realloc( 1 );
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 0edd5046c15c..4130262d222a 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -477,7 +477,7 @@ SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
// Evaluate Printer Options
sal_uInt16 nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC);
const SfxFlagItem *pFlagItem = 0;
- pDocPrinter->GetOptions().GetItemState( nWhich, false, (const SfxPoolItem**) &pFlagItem );
+ pDocPrinter->GetOptions().GetItemState( nWhich, false, reinterpret_cast<const SfxPoolItem**>(&pFlagItem) );
bool bOriToDoc = pFlagItem && (pFlagItem->GetValue() & SFX_PRINTER_CHG_ORIENTATION);
bool bSizeToDoc = pFlagItem && (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE);