diff options
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/dbui/mmconfigitem.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/bookmark.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/workctrl.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 9 |
4 files changed, 13 insertions, 6 deletions
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index 01560e02cae3..cdcb729c10a1 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -55,7 +55,7 @@ using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdbcx; -const char16_t cAddressDataAssignments[] = u"AddressDataAssignments"; +constexpr char16_t cAddressDataAssignments[] = u"AddressDataAssignments"; const char cDBColumnAssignments[] = "DBColumnAssignments"; const char cDataSourceName[] = "DataSource/DataSourceName"; const char cDataTableName[] = "DataSource/DataTableName" ; diff --git a/sw/source/uibase/inc/bookmark.hxx b/sw/source/uibase/inc/bookmark.hxx index 2699c03eefe3..b6107e2914af 100644 --- a/sw/source/uibase/inc/bookmark.hxx +++ b/sw/source/uibase/inc/bookmark.hxx @@ -57,7 +57,7 @@ public: int get_sort_column() const { return m_xControl->get_sort_column(); } void set_sort_column(int nColumn) { m_xControl->set_sort_column(nColumn); } - static const OUStringLiteral aForbiddenChars; + static constexpr OUStringLiteral aForbiddenChars = u"/\\@*?\",#"; static const char cSeparator; }; diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index d38711fa6cef..6a73899d52f9 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <string_view> + #include <i18nutil/unicode.hxx> #include <vcl/InterimItemWindow.hxx> #include <sfx2/dispatch.hxx> @@ -175,7 +179,7 @@ static sal_uInt16 aNavigationInsertIds[ NAVI_ENTRIES ] = NID_TABLE_FORMULA_ERROR }; -OUStringLiteral const aNavigationImgIds[ NAVI_ENTRIES ] = +std::u16string_view const aNavigationImgIds[ NAVI_ENTRIES ] = { u"" RID_BMP_RIBBAR_TBL, u"" RID_BMP_RIBBAR_FRM, diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index bf235be5d1ec..b4ae522a2cf9 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -139,6 +139,7 @@ #include <pagefrm.hxx> #include <memory> +#include <string_view> const char sStatusDelim[] = " : "; @@ -193,7 +194,7 @@ OUString SwView::GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUStr { // Show user-defined page number in brackets if any. OUString extra; - if (!rPgStr.isEmpty() && OUString::number(nPhyNum) != rPgStr) + if (!rPgStr.isEmpty() && std::u16string_view(OUString::number(nPhyNum)) != rPgStr) extra = rPgStr; else if (nPhyNum != nVirtNum) extra = OUString::number(nVirtNum); @@ -1361,7 +1362,8 @@ void SwView::UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUStr const SfxStringItem aTmp( FN_STAT_PAGE, sTemp ); // Used to distinguish which tooltip to show const SfxBoolItem bExtendedTooltip( FN_STAT_PAGE, - !rPgStr.isEmpty() && OUString::number(nPhyNum) != rPgStr + !rPgStr.isEmpty() + && std::u16string_view(OUString::number(nPhyNum)) != rPgStr && nPhyNum != nVirtNum ); SfxBindings &rBnd = GetViewFrame()->GetBindings(); @@ -1423,7 +1425,8 @@ void SwView::StateStatusLine(SfxItemSet &rSet) GetViewFrame()->GetBindings().SetState( aTmp ); // Used to distinguish which tooltip to show const SfxBoolItem bExtendedTooltip( FN_STAT_PAGE, !sDisplay.isEmpty() && - OUString::number( nPage ) != sDisplay && + std::u16string_view(OUString::number( nPage )) + != sDisplay && nPage != nLogPage ); GetViewFrame()->GetBindings().SetState( bExtendedTooltip ); //if existing page number is not equal to old page number, send out this event. |