diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/DocumentFieldsManager.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/html/htmldrawreader.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlfonte.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/dbui/selectdbtabledialog.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/misc/srtdlg.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/lingu/hhcwrp.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/workctrl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/drwtxtsh.cxx | 3 |
16 files changed, 31 insertions, 30 deletions
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index 4dafcf02ff62..636325f872b5 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -1332,7 +1332,7 @@ void DocumentFieldsManager::SetFixFields( const DateTime* pNewDateTime ) nTime = tools::Time( tools::Time::SYSTEM ).GetTime(); } - SwFieldIds aTypes[5] = { + SwFieldIds const aTypes[] { /*0*/ SwFieldIds::DocInfo, /*1*/ SwFieldIds::Author, /*2*/ SwFieldIds::ExtUser, diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 6ce19ccd6390..42e841b080cd 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -319,7 +319,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, sw::DocumentContentOperationsManager::ParaRstFormat aPara( pStt, pEnd, pHst ); // mst: not including META here; it seems attrs with CH_TXTATR are omitted - sal_uInt16 aResetableSetRange[] = { + sal_uInt16 const aResetableSetRange[] { RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_CHRATR_BEGIN, RES_CHRATR_END-1, RES_PARATR_BEGIN, RES_PARATR_END-1, diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index e65d24c2692b..8b4fb2936fe2 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -3082,7 +3082,7 @@ void sw_BoxSetSplitBoxFormats( SwTableBox* pBox, SwCollectTableLineBoxes* pSplPa } else { - sal_uInt16 aTableSplitBoxSetRange[] = { + sal_uInt16 const aTableSplitBoxSetRange[] { RES_LR_SPACE, RES_UL_SPACE, RES_BACKGROUND, RES_SHADOW, RES_PROTECT, RES_PROTECT, diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 493eb8ea3185..2bca01b9ca08 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -6862,8 +6862,8 @@ static drawinglayer::primitive2d::Primitive2DContainer lcl_CreatePageAreaDelimit double nLineLength = 200.0; // in Twips Point aPoints[] = { rRect.TopLeft(), rRect.TopRight(), rRect.BottomRight(), rRect.BottomLeft() }; - double aXOffDirs[] = { -1.0, 1.0, 1.0, -1.0 }; - double aYOffDirs[] = { -1.0, -1.0, 1.0, 1.0 }; + double const aXOffDirs[] = { -1.0, 1.0, 1.0, -1.0 }; + double const aYOffDirs[] = { -1.0, -1.0, 1.0, 1.0 }; // Actually loop over the corners to create the two lines for ( int i = 0; i < 4; i++ ) @@ -6917,8 +6917,8 @@ static drawinglayer::primitive2d::Primitive2DContainer lcl_CreateColumnAreaDelim double nLineLength = 100.0; // in Twips Point aPoints[] = { rRect.TopLeft(), rRect.TopRight(), rRect.BottomRight(), rRect.BottomLeft() }; - double aXOffDirs[] = { 1.0, -1.0, -1.0, 1.0 }; - double aYOffDirs[] = { 1.0, 1.0, -1.0, -1.0 }; + double const aXOffDirs[] = { 1.0, -1.0, -1.0, 1.0 }; + double const aYOffDirs[] = { 1.0, 1.0, -1.0, -1.0 }; // Actually loop over the corners to create the two lines for ( int i = 0; i < 4; i++ ) diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index 7654a703bdf5..d773d0173646 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -370,10 +370,10 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) eAniDir = SdrTextAniDirection::Right; // re set the attributes needed for scrolling - sal_uInt16 aWhichMap[7] = { XATTR_FILL_FIRST, XATTR_FILL_LAST, - SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST, - EE_CHAR_START, EE_CHAR_END, - 0 }; + sal_uInt16 const aWhichMap[] { XATTR_FILL_FIRST, XATTR_FILL_LAST, + SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST, + EE_CHAR_START, EE_CHAR_END, + 0 }; SfxItemSet aItemSet( pModel->GetItemPool(), aWhichMap ); aItemSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); aItemSet.Put( makeSdrTextAutoGrowHeightItem( true ) ); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index e20400036e23..f014dfe59ebd 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2553,8 +2553,8 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t m_rWW8Export.InsUInt16( aShd.GetValue() ); } - sal_uInt32 aSprmIds[] = { NS_sprm::sprmTDefTableShd, - NS_sprm::sprmTDefTableShdRaw }; + sal_uInt32 const aSprmIds[] { NS_sprm::sprmTDefTableShd, + NS_sprm::sprmTDefTableShdRaw }; sal_uInt8 nBoxes0 = rTabBoxes.size(); if (nBoxes0 > 21) nBoxes0 = 21; @@ -3253,7 +3253,7 @@ void WW8Export::ExportDocument_Impl() pDataStrm = aTempData.GetStream( StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE ); - sal_uInt8 aRC4EncryptionHeader[ 52 ] = {0}; + sal_uInt8 const aRC4EncryptionHeader[ 52 ] = {0}; pTableStrm->WriteBytes(aRC4EncryptionHeader, 52); } diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 15d8b4192bef..59395790d65a 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -1585,7 +1585,7 @@ static void InsertSpecialChar( WW8Export& rWrt, sal_uInt8 c, rStrm.WriteBytes( aEmptyHeader, nEmptyHdrLen ); // writer fixed header const sal_uInt16 nFixHdrLen = 0x19; - sal_uInt8 aFixHeader[ nFixHdrLen ] = + sal_uInt8 const aFixHeader[ nFixHdrLen ] = { 0x08, 0xD0, 0xC9, 0xEA, 0x79, 0xF9, 0xBA, 0xCE, 0x11, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index e5ed1e137ce3..624a7b26cb8e 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -219,10 +219,10 @@ void SwWW8ImplReader::ReadEmbeddedData(SvStream& rStrm, SwDocShell* pDocShell, s //sal_uInt8 maGuidStdLink[ 16 ] ={ // 0xD0, 0xC9, 0xEA, 0x79, 0xF9, 0xBA, 0xCE, 0x11, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B }; - sal_uInt8 aGuidUrlMoniker[ 16 ] = { + sal_uInt8 const aGuidUrlMoniker[ 16 ] = { 0xE0, 0xC9, 0xEA, 0x79, 0xF9, 0xBA, 0xCE, 0x11, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B }; - sal_uInt8 aGuidFileMoniker[ 16 ] = { + sal_uInt8 const aGuidFileMoniker[ 16 ] = { 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; sal_uInt8 aGuid[16]; diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx index f954394cbb29..0cd7aecd50de 100644 --- a/sw/source/filter/xml/xmlfonte.cxx +++ b/sw/source/filter/xml/xmlfonte.cxx @@ -40,8 +40,8 @@ SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl( SwXMLExport& _rExport, bool blockFontEmbedding ) : XMLFontAutoStylePool( _rExport, blockFontEmbedding ) { - sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, - RES_CHRATR_CTL_FONT }; + sal_uInt16 const aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, + RES_CHRATR_CTL_FONT }; const SfxItemPool& rPool = _rExport.getDoc()->GetAttrPool(); const SfxPoolItem* pItem; diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx index 362ce43259af..385761245168 100644 --- a/sw/source/ui/dbui/selectdbtabledialog.cxx +++ b/sw/source/ui/dbui/selectdbtabledialog.cxx @@ -106,7 +106,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(vcl::Window* pParent, pHeaderTreeContainer->set_width_request(aSize.Width()); pHeaderTreeContainer->set_height_request(aSize.Height()); m_pTable = VclPtr<SwAddressTable>::Create(*pHeaderTreeContainer); - long aStaticTabs[]= { 2, 0, 0 }; + long const aStaticTabs[]= { 2, 0, 0 }; m_pTable->SetTabs( aStaticTabs ); m_pTable->InsertHeaderItem(1, m_sName ); m_pTable->InsertHeaderItem(2, m_sType ); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 3c8657f07063..80095a2bdc13 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2170,8 +2170,8 @@ void SwFramePage::Init(const SfxItemSet& rSet, bool bReset) sal_uInt32 n1; sal_uInt16 n2, n3; sal_uInt8 b8, b9, b10, b11, b12, b13, b14, b15; - } aGlbNmIds[4] = { { SO3_SM_CLASSID_60 }, { SO3_SM_CLASSID_50 }, - { SO3_SM_CLASSID_40 }, { SO3_SM_CLASSID_30 } }; + } const aGlbNmIds[] = { { SO3_SM_CLASSID_60 }, { SO3_SM_CLASSID_50 }, + { SO3_SM_CLASSID_40 }, { SO3_SM_CLASSID_30 } }; for (const GlobalNameId & rId : aGlbNmIds) { SvGlobalName aGlbNm( rId.n1, rId.n2, rId.n3, diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 1a6e5dd0bb4e..7ee772395282 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -438,7 +438,7 @@ void SwSortDlg::LanguageHdl(ListBox* pLBox) const int nLstBoxCnt = 3; ListBox* aLstArr[ nLstBoxCnt ] = { m_pTypDLB1, m_pTypDLB2, m_pTypDLB3 }; - sal_uInt16* aTypeArr[ nLstBoxCnt ] = { &nType1, &nType2, &nType3 }; + sal_uInt16* const aTypeArr[ nLstBoxCnt ] = { &nType1, &nType2, &nType3 }; OUString aOldStrArr[ nLstBoxCnt ]; for( int n = 0; n < nLstBoxCnt; ++n ) diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index d793e2c43886..65b5cae493d4 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -911,8 +911,10 @@ void SwDocShell::Execute(SfxRequest& rReq) "" }; - const char** pHelpIds = bCreateHtml ? aHTMLHelpIds : aMasterHelpIds; - aDlgHelper.SetControlHelpIds( nControlIds, pHelpIds ); + if (bCreateHtml) + aDlgHelper.SetControlHelpIds( nControlIds, aHTMLHelpIds ); + else + aDlgHelper.SetControlHelpIds( nControlIds, aMasterHelpIds ); uno::Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker(); std::shared_ptr<const SfxFilter> pFlt; diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx index 98323e84b665..27cd912a8d57 100644 --- a/sw/source/uibase/lingu/hhcwrp.cxx +++ b/sw/source/uibase/lingu/hhcwrp.cxx @@ -319,7 +319,7 @@ void SwHHCWrapper::ChangeText_impl( const OUString &rNewText, bool bKeepAttribut if (bKeepAttributes) { // get item set with all relevant attributes - sal_uInt16 aRanges[] = { + sal_uInt16 const aRanges[] { RES_CHRATR_BEGIN, RES_FRMATR_END, 0, 0, 0 }; SfxItemSet aItemSet( m_rWrtShell.GetAttrPool(), aRanges ); @@ -475,7 +475,7 @@ void SwHHCWrapper::ReplaceUnit( OSL_ENSURE( GetTargetLanguage() == LANGUAGE_CHINESE_SIMPLIFIED || GetTargetLanguage() == LANGUAGE_CHINESE_TRADITIONAL, "SwHHCWrapper::ReplaceUnit : unexpected target language" ); - sal_uInt16 aRanges[] = { + sal_uInt16 const aRanges[] { RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CJK_FONT, RES_CHRATR_CJK_FONT, 0, 0, 0 }; diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index c6d1b3250e99..d8bb9811fe9a 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -446,7 +446,7 @@ SwZoomBox_Impl::SwZoomBox_Impl(vcl::Window* pParent, sal_uInt16 nSlot) SetHelpId(HID_PVIEW_ZOOM_LB); SetSizePixel(LogicToPixel(Size(30, 86), MapUnit::MapAppFont)); EnableAutocomplete( false ); - const char* aZoomValues[] = + const char* const aZoomValues[] = { RID_SVXSTR_ZOOM_25 , RID_SVXSTR_ZOOM_50 , RID_SVXSTR_ZOOM_75 , RID_SVXSTR_ZOOM_100 , RID_SVXSTR_ZOOM_150 , RID_SVXSTR_ZOOM_200 , diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index 1c5bbb245ab3..af34bbf45445 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -295,9 +295,8 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq) if (!xMCF.is()) return; - OUString sService("com.sun.star.linguistic2.ChineseTranslationDialog"); Reference<ui::dialogs::XExecutableDialog> xDialog( - xMCF->createInstanceWithContext(sService, xContext), UNO_QUERY); + xMCF->createInstanceWithContext("com.sun.star.linguistic2.ChineseTranslationDialog", xContext), UNO_QUERY); Reference<lang::XInitialization> xInit(xDialog, UNO_QUERY); |