summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uno
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-28 19:07:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-28 19:09:27 +0100
commit2828d92eee63a4a5306ef64482bc7d1db3459406 (patch)
tree0fe6e09f55f278bf9c32d36e9375fb7258b6ed0a /sw/source/uibase/uno
parent85f28ec44a2c169c91dac9346e9c71feda6a6cab (diff)
Clean up C-style casts from pointers to void
Change-Id: I2ec58d0bfe13fae4fc2141f9b017b5a72e0ba2c2
Diffstat (limited to 'sw/source/uibase/uno')
-rw-r--r--sw/source/uibase/uno/SwXDocumentSettings.cxx88
-rw-r--r--sw/source/uibase/uno/unomod.cxx36
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx14
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx2
4 files changed, 70 insertions, 70 deletions
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index 3cd2506da44f..990c20a25f98 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -337,7 +337,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_FIELD_AUTO_UPDATE:
{
- bool bUpdateField = *(sal_Bool*)rValue.getValue();
+ bool bUpdateField = *static_cast<sal_Bool const *>(rValue.getValue());
SwFldUpdateFlags nFlag = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true);
mpDoc->getIDocumentSettingAccess().setFieldUpdateFlags( bUpdateField ?
nFlag == AUTOUPD_FIELD_AND_CHARTS ?
@@ -348,7 +348,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_CHART_AUTO_UPDATE:
{
- bool bUpdateChart = *(sal_Bool*)rValue.getValue();
+ bool bUpdateChart = *static_cast<sal_Bool const *>(rValue.getValue());
SwFldUpdateFlags nFlag = mpDoc->getIDocumentSettingAccess().getFieldUpdateFlags(true);
mpDoc->getIDocumentSettingAccess().setFieldUpdateFlags( (nFlag == AUTOUPD_FIELD_ONLY || nFlag == AUTOUPD_FIELD_AND_CHARTS ) ?
bUpdateChart ?
@@ -373,7 +373,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_ALIGN_TAB_STOP_POSITION:
{
- bool bAlignTab = *(sal_Bool*)rValue.getValue();
+ bool bAlignTab = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::TAB_COMPAT, bAlignTab);
}
break;
@@ -438,7 +438,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_IS_KERN_ASIAN_PUNCTUATION:
{
- bool bIsKern = *(sal_Bool*)(rValue).getValue();
+ bool bIsKern = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::KERN_ASIAN_PUNCTUATION, bIsKern);
SwEditShell* pEditSh = mpDoc->GetEditShell();
if(pEditSh)
@@ -463,12 +463,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_APPLY_USER_DATA:
{
- mpDocSh->SetUseUserData( *(sal_Bool*)rValue.getValue() );
+ mpDocSh->SetUseUserData( *static_cast<sal_Bool const *>(rValue.getValue()) );
}
break;
case HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS:
{
- bool bSaveGlobal = *(sal_Bool*)rValue.getValue();
+ bool bSaveGlobal = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::GLOBAL_DOCUMENT_SAVE_LINKS, bSaveGlobal );
}
break;
@@ -503,12 +503,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_SAVE_VERSION_ON_CLOSE:
{
- mpDocSh->SetSaveVersionOnClose( *(sal_Bool*)rValue.getValue() );
+ mpDocSh->SetSaveVersionOnClose( *static_cast<sal_Bool const *>(rValue.getValue()) );
}
break;
case HANDLE_UPDATE_FROM_TEMPLATE:
{
- mpDocSh->SetQueryLoadTemplate( *(sal_Bool*)rValue.getValue() );
+ mpDocSh->SetQueryLoadTemplate( *static_cast<sal_Bool const *>(rValue.getValue()) );
}
break;
case HANDLE_PRINTER_INDEPENDENT_LAYOUT:
@@ -538,25 +538,25 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_IS_ADD_FLY_OFFSET:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::ADD_FLY_OFFSETS, bTmp);
}
break;
case HANDLE_IS_ADD_EXTERNAL_LEADING:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::ADD_EXT_LEADING, bTmp);
}
break;
case HANDLE_OLD_NUMBERING: // #111955#
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::OLD_NUMBERING, bTmp);
}
break;
case HANDLE_OUTLINELEVEL_YIELDS_NUMBERING:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::OUTLINE_LEVEL_YIELDS_OUTLINE_RULE, bTmp);
}
break;
@@ -570,25 +570,25 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_USE_FORMER_LINE_SPACING:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::OLD_LINE_SPACING, bTmp);
}
break;
case HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::ADD_PARA_SPACING_TO_TABLE_CELLS, bTmp);
}
break;
case HANDLE_USE_FORMER_OBJECT_POSITIONING:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::USE_FORMER_OBJECT_POS, bTmp);
}
break;
case HANDLE_USE_FORMER_TEXT_WRAPPING:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::USE_FORMER_TEXT_WRAPPING, bTmp);
}
break;
@@ -609,60 +609,60 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_CONSIDER_WRAP_ON_OBJPOS:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION, bTmp );
}
break;
case HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING, bTmp);
}
break;
case HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, bTmp);
}
break;
case HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT, bTmp);
}
break;
case HANDLE_TABLE_ROW_KEEP:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::TABLE_ROW_KEEP, bTmp);
}
break;
case HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, bTmp);
}
break;
case HANDLE_LOAD_READONLY:
{
- mpDocSh->SetLoadReadonly( *(sal_Bool*)rValue.getValue() );
+ mpDocSh->SetLoadReadonly( *static_cast<sal_Bool const *>(rValue.getValue()) );
}
break;
case HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, bTmp);
}
break;
case HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME, bTmp);
}
break;
case HANDLE_UNIX_FORCE_ZERO_EXT_LEADING:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::UNIX_FORCE_ZERO_EXT_LEADING, bTmp);
}
break;
@@ -671,7 +671,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_TABS_RELATIVE_TO_INDENT:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::TABS_RELATIVE_TO_INDENT, bTmp);
}
break;
@@ -691,14 +691,14 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_PROTECT_FORM:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::PROTECT_FORM, bTmp);
}
break;
// #i89181#
case HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, bTmp);
}
break;
@@ -719,91 +719,91 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_MATH_BASELINE_ALIGNMENT:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set( DocumentSettingId::MATH_BASELINE_ALIGNMENT, bTmp );
}
break;
case HANDLE_INVERT_BORDER_SPACING:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::INVERT_BORDER_SPACING, bTmp);
}
break;
case HANDLE_COLLAPSE_EMPTY_CELL_PARA:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::COLLAPSE_EMPTY_CELL_PARA, bTmp);
}
break;
case HANDLE_SMALL_CAPS_PERCENTAGE_66:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::SMALL_CAPS_PERCENTAGE_66, bTmp);
}
break;
case HANDLE_TAB_OVERFLOW:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::TAB_OVERFLOW, bTmp);
}
break;
case HANDLE_UNBREAKABLE_NUMBERINGS:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::UNBREAKABLE_NUMBERINGS, bTmp);
}
break;
case HANDLE_STYLES_NODEFAULT:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::STYLES_NODEFAULT, bTmp);
}
break;
case HANDLE_FLOATTABLE_NOMARGINS:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::FLOATTABLE_NOMARGINS, bTmp);
}
break;
case HANDLE_CLIPPED_PICTURES:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::CLIPPED_PICTURES, bTmp);
}
break;
case HANDLE_BACKGROUND_PARA_OVER_DRAWINGS:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::BACKGROUND_PARA_OVER_DRAWINGS, bTmp);
}
break;
case HANDLE_EMBED_FONTS:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::EMBED_FONTS, bTmp);
}
break;
case HANDLE_EMBED_SYSTEM_FONTS:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::EMBED_SYSTEM_FONTS, bTmp);
}
break;
case HANDLE_TAB_OVER_MARGIN:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::TAB_OVER_MARGIN, bTmp);
}
break;
case HANDLE_SURROUND_TEXT_WRAP_SMALL:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::SURROUND_TEXT_WRAP_SMALL, bTmp);
}
break;
case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING:
{
- bool bTmp = *(sal_Bool*)rValue.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.getValue());
mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, bTmp);
}
break;
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index 52444be8911a..b66cf6e1a7bb 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -287,79 +287,79 @@ void SwXPrintSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo,
bool bVal;
if ( rInfo.mnHandle != HANDLE_PRINTSET_ANNOTATION_MODE &&
rInfo.mnHandle != HANDLE_PRINTSET_FAX_NAME )
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
switch( rInfo.mnHandle )
{
case HANDLE_PRINTSET_LEFT_PAGES:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintLeftPage(bVal);
}
break;
case HANDLE_PRINTSET_RIGHT_PAGES:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintRightPage(bVal);
}
break;
case HANDLE_PRINTSET_REVERSED:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintReverse(bVal);
}
break;
case HANDLE_PRINTSET_PROSPECT:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintProspect(bVal);
}
break;
case HANDLE_PRINTSET_GRAPHICS:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintGraphic(bVal);
}
break;
case HANDLE_PRINTSET_TABLES:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintTable(bVal);
}
break;
case HANDLE_PRINTSET_DRAWINGS:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintDraw(bVal);
}
break;
case HANDLE_PRINTSET_CONTROLS:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintControl(bVal);
}
break;
case HANDLE_PRINTSET_PAGE_BACKGROUND:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintPageBackground(bVal);
}
break;
case HANDLE_PRINTSET_BLACK_FONTS:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintBlackFont(bVal);
}
break;
case HANDLE_PRINTSET_SINGLE_JOBS:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintSingleJobs(bVal);
}
break;
case HANDLE_PRINTSET_PAPER_FROM_SETUP:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPaperFromSetup(bVal);
}
break;
@@ -375,7 +375,7 @@ void SwXPrintSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo,
break;
case HANDLE_PRINTSET_EMPTY_PAGES:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintEmptyPages(bVal);
}
break;
@@ -390,19 +390,19 @@ void SwXPrintSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo,
break;
case HANDLE_PRINTSET_PROSPECT_RTL:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintProspect_RTL(bVal);
}
break;
case HANDLE_PRINTSET_PLACEHOLDER:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintTextPlaceholder(bVal);
}
break;
case HANDLE_PRINTSET_HIDDEN_TEXT:
{
- bVal = *(sal_Bool*)rValue.getValue();
+ bVal = *static_cast<sal_Bool const *>(rValue.getValue());
mpPrtOpt->SetPrintHiddenText(bVal);
}
break;
@@ -591,7 +591,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
IllegalArgumentException, WrappedTargetException,
RuntimeException, std::exception)
{
- bool bVal = HANDLE_VIEWSET_ZOOM != rInfo.mnHandle && *(sal_Bool*)rValue.getValue();
+ bool bVal = HANDLE_VIEWSET_ZOOM != rInfo.mnHandle && *static_cast<sal_Bool const *>(rValue.getValue());
// the API flag should not be set to the application's view settings
switch( rInfo.mnHandle )
{
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index d9d01b7cb068..02c603cdddbf 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -1125,7 +1125,7 @@ void SwXTextDocument::setPagePrintSettings(const Sequence< beans::PropertyValue
else if(sName == "IsLandscape")
{
bException = (::getBooleanCppuType() != rVal.getValueType());
- aData.SetLandscape(*(sal_Bool*)rVal.getValue());
+ aData.SetLandscape(*static_cast<sal_Bool const *>(rVal.getValue()));
}
else
bException = true;
@@ -1183,7 +1183,7 @@ void SwXTextDocument::printPages(const Sequence< beans::PropertyValue >& xOption
{
if ( rProp.Value.getValueType() == ::getBooleanCppuType())
- aReq.AppendItem(SfxBoolItem( SID_PRINT_COLLATE, *(sal_Bool*)rProp.Value.getValue() ) );
+ aReq.AppendItem(SfxBoolItem( SID_PRINT_COLLATE, *static_cast<sal_Bool const *>(rProp.Value.getValue()) ) );
else
throw IllegalArgumentException();
}
@@ -1192,7 +1192,7 @@ void SwXTextDocument::printPages(const Sequence< beans::PropertyValue >& xOption
else if ( rProp.Name == UNO_NAME_SORT )
{
if ( rProp.Value.getValueType() == ::getBooleanCppuType() )
- aReq.AppendItem(SfxBoolItem( SID_PRINT_SORT, *(sal_Bool*)rProp.Value.getValue() ) );
+ aReq.AppendItem(SfxBoolItem( SID_PRINT_SORT, *static_cast<sal_Bool const *>(rProp.Value.getValue()) ) );
else
throw IllegalArgumentException();
}
@@ -1859,7 +1859,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
case WID_DOC_CHANGES_RECORD:
case WID_DOC_CHANGES_SHOW:
{
- bool bSet = *(sal_Bool*)aValue.getValue();
+ bool bSet = *static_cast<sal_Bool const *>(aValue.getValue());
sal_uInt16 eMode = pDocShell->GetDoc()->getIDocumentRedlineAccess().GetRedlineMode();
if(WID_DOC_CHANGES_SHOW == pEntry->nWID)
{
@@ -1899,7 +1899,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
}
break;
case WID_DOC_HIDE_TIPS :
- SW_MOD()->GetModuleConfig()->SetHideFieldTips(*(sal_Bool*)aValue.getValue());
+ SW_MOD()->GetModuleConfig()->SetHideFieldTips(*static_cast<sal_Bool const *>(aValue.getValue()));
break;
case WID_DOC_REDLINE_DISPLAY:
{
@@ -1932,7 +1932,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
case WID_DOC_AUTOMATIC_CONTROL_FOCUS:
{
SwDrawModel * pDrawDoc;
- bool bAuto = *(sal_Bool*) aValue.getValue();
+ bool bAuto = *static_cast<sal_Bool const *>(aValue.getValue());
if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
pDrawDoc->SetAutoControlFocus( bAuto );
@@ -1952,7 +1952,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
case WID_DOC_APPLY_FORM_DESIGN_MODE:
{
SwDrawModel * pDrawDoc;
- bool bMode = *(sal_Bool*)aValue.getValue();
+ bool bMode = *static_cast<sal_Bool const *>(aValue.getValue());
if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
pDrawDoc->SetOpenInDesignMode( bMode );
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index fff7af2313b7..08a0564cc002 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -633,7 +633,7 @@ void SAL_CALL SwXTextView::setRubyList(
else if(pProperties[nProp].Name == UNO_NAME_RUBY_IS_ABOVE)
{
bool bValue = !pProperties[nProp].Value.hasValue() ||
- *(sal_Bool*)pProperties[nProp].Value.getValue();
+ *static_cast<sal_Bool const *>(pProperties[nProp].Value.getValue());
pEntry->GetRubyAttr().SetPosition(bValue ? 0 : 1);
}
}